freebsd-nq/sys/i386
Bruce Evans 4e501eb7cc Remove buggy adjustment of page tables in db_write_bytes().
Long ago, perhaps only on i386, kernel text was mapped read-only and
it was necessary to change the mapping to read-write to set breakpoints
in kernel text.  Other writes by ddb to kernel text were also allowed.
This write protection is harder to implement with 4MB pages, and was
lost even for 4K pages when 4MB pages were implemented.  So changing
the mapping became useless.  It was actually worse than useless since
it followed followed various null and otherwise garbage pointers to
not change random memory instead of the mapping.  (On i386s, the
pointers became good in pmap_bootstrap(), and on amd64 the pointers
became bad in pmap_bootstrap() if not before.)

Another bug broke detection of following of null pointers on i386,
except early in boot where not detecting this was a feature.  When
I fixed the bug, I accidentally broke the feature and soon got traps
in db_write_bytes().  Setting breakpoints early in ddb was broken.

kib pointed out that a clean way to do the adjustment would be to use
a special [sub]map giving a small window on the bytes to be written.

The trap handler didn't know how to fix up errors for pagefaults
accessing the map itself.  Such errors rarely need fixups, since most
traps for the map are for the first access which is a read.

Reviewed by:	kib
2017-03-24 17:34:55 +00:00
..
acpica If x86 CPU implementation of the MWAIT instruction reasonably 2015-05-09 12:28:48 +00:00
bios Remove Micro Channel Architecture support. Of the commonly available 2017-02-15 23:04:25 +00:00
cloudabi32 Stop providing the compat_3_brand. 2017-03-23 14:12:21 +00:00
conf Remove i915drm and radeondrm from NOTES and conf. 2017-03-12 00:52:16 +00:00
i386 Remove buggy adjustment of page tables in db_write_bytes(). 2017-03-24 17:34:55 +00:00
ibcs2 Regenerate all the system call tables to drop "created from" lines. 2017-02-10 19:45:02 +00:00
include Add support for 8- and 16-bit atomic_(f)cmpset to x86. 2017-03-22 17:29:04 +00:00
isa Renumber copyright clause 4 2017-02-28 23:42:47 +00:00
linux Implement getrandom() syscall. 2017-03-18 18:34:29 +00:00
pci Remove pc98 support completely. 2017-01-28 02:22:15 +00:00
xbox After r261980, the local ptr variable in xbox_init() is no longer used, 2014-02-16 22:48:36 +00:00
Makefile