/dev/mem wrap-around behavior

Andriy Gapon avg at icyb.net.ua
Tue May 13 19:26:13 UTC 2008


This is just out of curiosity, not a real issue.
I use i386 RELENG_7.

I recently played with dd-ing memory contents out of /dev/mem and 
examining various stuff. I "intuitively" expected dd to reach EOF at 
0xFFFFFFFF (i.e. maximum possible address for i386 non-PAE), but it 
continued on. Apparently this happens because off_t is somewhere 
assigned to caddr_t (or something like that) without any extra checks.
So, I am curious if this intentional, unintentional or it just happened 
to be this way and nobody really cares.

-- 
Andriy Gapon


More information about the freebsd-hackers mailing list