freebsd-skq/sys/amd64
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 sys/amd64: Small spelling fixes. 2016-05-03 22:13:04 +00:00
amd64 Remove buggy adjustment of page tables in db_write_bytes(). 2017-03-24 17:34:55 +00:00
cloudabi32 Stop providing the compat_3_brand. 2017-03-23 14:12:21 +00:00
cloudabi64 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
ia32 Renumber copyright clause 4 2017-02-28 23:42:47 +00:00
include Add support for 8- and 16-bit atomic_(f)cmpset to x86. 2017-03-22 17:29:04 +00:00
linux Implement getrandom() syscall. 2017-03-18 18:34:29 +00:00
linux32 Implement getrandom() syscall. 2017-03-18 18:34:29 +00:00
pci Pull in r267961 and r267973 again. Fix for issues reported will follow. 2014-06-28 03:56:17 +00:00
vmm Hide the AMD MONITORX/MWAITX capability. 2017-03-16 03:21:42 +00:00
Makefile Bring the tags and links entries for amd64 up to date. 2015-10-27 22:59:24 +00:00