freebsd-dev/sys
Bruce Evans ff17a6773e Don't access the reserved registers %dr4 and %dr5 on i386.
On the original i386, %dr[4-5] were unimplemented but not very clearly
reserved, so debuggers read them to print them.  i386 was still doing
this.

On the original athlon64, %dr[4-5] are documented as reserved but are
aliased to %dr[6-7] unless CR4_DE is set, when accessing them traps.

On 2 of my systems, accessing %dr[4-5] trapped sometimes.  On my Haswell
system, the apparent randomness was because the boot CPU starts with
CR4_DE set while all other CPUs start with CR4_DE clear.  FreeBSD
doesn't support the data breakpoints enabled by CR4_DE and it never
changes this flag, so the flag remains different across CPUs and
the behaviour seemed inconsistent except while booting when the CPU
doesn't change.

The invalid accesses broke:
- read access for printing the registers in ddb "show watches" on CPUs
  with CR4_DE set
- read accesses in fill_dbregs() on CPUs with CR4_DE set.  This didn't
  implement panic(3) since the user case always skipped %dr[4-5].
- write accesses in set_dbregs().  This also didn't affect userland.
  When it didn't trap, the aliasing made it fragile.

Don't print the dummy (zero) values of %dr[4-5] in "show watches" for
i386 or amd64.  Fix style bugs near this printing.

amd64 also has space in the dbregs struct for the reserved %dr[8-15]
and already didn't print the dummy values for these, and never accessed
any of the 10 reserved debug registers.

Remove cpufuncs for making the invalid accesses.  Even amd64 had these.
2017-03-17 13:49:05 +00:00
..
amd64 Don't access the reserved registers %dr4 and %dr5 on i386. 2017-03-17 13:49:05 +00:00
arm Remove code for Marvell SoCs that lack a kernel config. 2017-03-17 12:59:16 +00:00
arm64 If ofw_bus_msimap fails don't try to use the invalid MSI/MSI-X parent node. 2017-03-16 17:49:37 +00:00
boot Mark the EFI PE header as allocated. While ld.bfd doesn't seem to care 2017-03-17 13:31:24 +00:00
bsm
cam Increase device openings to tagged maximum. 2017-03-11 18:46:46 +00:00
cddl Reduce ARC fragmentation threshold 2017-03-17 12:34:57 +00:00
compat Implement minimalistic memory mapping structure, struct mm_struct, and 2017-03-17 10:30:06 +00:00
conf Remove code for Marvell SoCs that lack a kernel config. 2017-03-17 12:59:16 +00:00
contrib Copy needed include files from EDK2. This is a minimal set gleened 2017-03-08 02:47:59 +00:00
crypto Remove pc98 support completely. 2017-01-28 02:22:15 +00:00
ddb Renumber copyright clause 4 2017-02-28 23:42:47 +00:00
dev Make the default FDT implementation of platform_mp_setmaxid use the cpu 2017-03-17 12:45:53 +00:00
fs remove procfs ctl interface 2017-03-05 03:05:24 +00:00
gdb
geom After r315112 I broke the tests with eli, instead to pass 0, I should pass 2017-03-13 13:56:01 +00:00
gnu Update our device tree files to a Linux 4.10 2017-03-07 13:56:49 +00:00
i386 Don't access the reserved registers %dr4 and %dr5 on i386. 2017-03-17 13:49:05 +00:00
isa Renumber copyright clause 4 2017-02-28 23:42:47 +00:00
kern When clearing altsigstack settings on exec, do it to the right thread. 2017-03-17 13:37:37 +00:00
kgssapi
libkern Discard first 3072 bytes of RC4 keystream, this is a bandaid 2017-03-14 06:00:44 +00:00
mips Add cavium octeon 'bootoctlinux' boot argument support 2017-03-16 00:49:59 +00:00
modules - Add support for eMMC "partitions". Besides the user data area, i. e. 2017-03-16 22:23:04 +00:00
net Change casting to a uintptr_t to be compatible with non-x86 architectures. 2017-03-14 22:25:07 +00:00
net80211 [net80211] begin fleshing out per-VAP WME configurations. 2017-03-13 16:44:06 +00:00
netgraph mppc - Finish pluging NETGRAPH_MPPC_COMPRESSION. 2017-01-20 00:02:11 +00:00
netinet Add some ntohl() love to r315277 2017-03-14 20:57:54 +00:00
netinet6 The patch provides the same socket option as Linux IP_ORIGDSTADDR. 2017-03-06 04:01:58 +00:00
netipsec Introduce the concept of IPsec security policies scope. 2017-03-07 00:13:53 +00:00
netnatm
netpfil Use memset with structure size. 2017-03-14 07:57:33 +00:00
netsmb
nfs Renumber copyright clause 4 2017-02-28 23:42:47 +00:00
nfsclient Renumber copyright clause 4 2017-02-28 23:42:47 +00:00
nfsserver Renumber copyright clause 4 2017-02-28 23:42:47 +00:00
nlm
ofed Add basic support for VIMAGE to the LinuxKPI and ibcore. 2017-03-16 09:59:35 +00:00
opencrypto Add support for the fpu_kern(9) KPI on arm64. It hooks into the existing 2016-10-20 09:22:10 +00:00
powerpc Fix booting with >4GB RAM on PowerMac G5 hardware 2017-03-07 22:11:57 +00:00
riscv Implement atomic_fcmpset_*() for RISC-V. 2017-02-05 00:32:12 +00:00
rpc Renumber copyright clause 4 2017-02-28 23:42:47 +00:00
security Audit 'fd' and 'cmd' arguments to fcntl(2), and when generating BSM, 2016-11-22 00:41:24 +00:00
sparc64 Renumber copyright clause 4 2017-02-28 23:42:47 +00:00
sys - Add support for eMMC "partitions". Besides the user data area, i. e. 2017-03-16 22:23:04 +00:00
teken Add teken_256to16() to convert xterm-256 256-color codes to xterm 16-color 2017-03-16 16:40:54 +00:00
tests
tools [fdt] Make DTBs generated by make_dtb.sh overlay-ready 2017-03-10 22:45:07 +00:00
ufs Renumber copyright clause 4 2017-02-28 23:42:47 +00:00
vm The adj_free and max_free values of new_entry will be calculated and 2017-03-16 05:44:16 +00:00
x86 x86/srat: fix parsing of APIC IDs > MAX_APIC_ID 2017-03-16 09:33:36 +00:00
xdr
xen xenstore: fix suspension when using the xenstore device 2017-03-07 09:17:48 +00:00
Makefile Remove pc98 support completely. 2017-01-28 02:22:15 +00:00