]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
Fixed accesses to addresses between VM_MAXUSER_ADDRESS (normally
authorBruce Evans <bde@FreeBSD.org>
Mon, 19 Jan 1998 15:27:56 +0000 (15:27 +0000)
committerBruce Evans <bde@FreeBSD.org>
Mon, 19 Jan 1998 15:27:56 +0000 (15:27 +0000)
commit9bb4a86cf09cfc7ab5c5bfe8b83259ccd5dcc5f6
tree2af5177ba8c901f9cc4595eb59594598da7e4efa
parent04822660a1a37a9c653025cfb3e04a76c41341a5
Fixed accesses to addresses between VM_MAXUSER_ADDRESS (normally
0xefbfe000) and kernel_start (normally 0xf0100000).

Things are unnecessarily (?) difficult because procfs is used to
access user addresses in the live-kernel case although we must have
access to /dev/mem to work at all, and whatever works for the
dead-kernel case should work in all cases (modulo volatility of
live kernel variables).  We used the wrong range [0, kernel_start)
for user addresses.  Procfs should only work up to VM_MAXUSER_ADDRESS,
but it bogusly works for reads up to the address 2 pages higher
(the user area, including the kernel stack, is mapped to where the
user area used to be (WTUAUTB)).  Procfs can not work at all for
addresses between WTUAUTB and kernel_start.

Now we use procfs only to access addresses up to VM_MAXUSER_ADDRESS.
Higher addresses are translated normally using kvtophys(), so the
user ptd is used for addresses below the real kernel start (0xf0000000;
see INKERNEL()) and nothing is found WTUAUTB.

Strange accesses that cross the user-kernel boundary are now handled,
but such ranges are currently always errors because they necessarily
overlap the hole WTUAUTB.

Short reads are still not handled.
gnu/usr.bin/binutils/gdb/i386/kvm-fbsd.c
gnu/usr.bin/binutils/gdb/kvm-fbsd.c
gnu/usr.bin/gdb/gdb/kvm-fbsd.c