freebsd-skq/sys
Bruce Evans 701ac88055 Use the MI macro TRAPF_USERMODE() instead of open-coded checks for
SEL_UPL and sometimes PSL_VM.  This is just a style change on amd64,
but on i386 it fixes 1 unimportant place where the PSL_VM check was
missing and starts fixing 1 important place where the PSL_VM check
had a logic error.

Fix logic errors in treating vm86 bioscall mode as kernel mode.  The
main place checked all the necessary flags, but put the necessary
parentheses for the PSL_VM and PCB_VM86CALL checks in the wrong
place.  The broken case is only reached if a vm86 bioscall uses a
%cs which is nonzero mod 4, but that is unusual -- most bios calls
start with %cs = 0xc000 or 0xf000 and rarely change it.  Another
place was missing the check for PCB_VM86CALL, but was only reachable
if there are bugs virtualizing PSL_I.

Add a macro TF_HAS_STACKREGS() and use this instead of converting
open-coded checks of SEL_UPL, etc. to TRAPF_USERMODE() when we only
care about whether the frame has stack registers.  This fixes 3
places in my recent fix for register variables in vm86 mode where I
messed up the PSL_VM check and cleans up other places.
2016-09-14 12:57:40 +00:00
..
amd64 Use the MI macro TRAPF_USERMODE() instead of open-coded checks for 2016-09-14 12:57:40 +00:00
arm Remove CUBIEBOARD kernel config file. 2016-09-12 16:13:27 +00:00
arm64 Add a missing opt_ddb.h include from places that include debug_moditor.h 2016-09-13 16:20:31 +00:00
boot Make the callout structure in the boot loader's kernel shim more 2016-09-14 11:16:00 +00:00
bsm
cam Don't report to devd statuses that CAM doesn't consider errors. 2016-09-08 13:33:33 +00:00
cddl MFV r268120: 2016-09-11 17:48:06 +00:00
compat Remove a pointless translation of struct ioc_toc_header. 2016-09-08 00:38:50 +00:00
conf Fix the arm64 kernel build when DDB is disabled, debug_monitor.c depends on 2016-09-13 15:45:22 +00:00
contrib [ath_hal] quieten a bit of the boot messages - this stuff has been working for a while. 2016-09-12 04:58:59 +00:00
crypto Fix typo in skein amd64 assembly 2016-09-08 02:38:55 +00:00
ddb Pass the trap type and code down from db_trap() to db_stop_at_pc() so 2016-09-09 15:53:42 +00:00
dev Improve USB polling mode by not locking any mutexes, asserting any 2016-09-14 12:07:34 +00:00
fs nullfs: plug vnode ref leak in null_vptocnp 2016-09-09 10:40:55 +00:00
gdb
geom Don't treat an error from g_mirror_clear_metadata() as fatal. 2016-09-06 23:42:59 +00:00
gnu Revert changes for local testing, inadvertantly commited in r300811. 2016-05-26 23:59:42 +00:00
i386 Use the MI macro TRAPF_USERMODE() instead of open-coded checks for 2016-09-14 12:57:40 +00:00
isa
kern fd: add fget_cap and fget_cap_locked primitives 2016-09-12 22:46:19 +00:00
kgssapi
libkern
mips Add SMP support for MTI Malta 34kf CPU. 2016-09-12 16:38:51 +00:00
modules Chelsio T4/T5 VF driver. 2016-09-07 18:13:57 +00:00
net hyperv/hn: Stringent RNDIS packet message length/offset check. 2016-09-06 03:20:06 +00:00
net80211 net80211: improve error checking in ieee80211_parse_{wpa,rsn}() 2016-09-13 22:59:38 +00:00
netgraph Avoid panic from ng_uncallout when unpluggin ethernet cable with active 2016-08-08 19:31:01 +00:00
netinet With clang 3.9.0, compiling sys/netinet/igmp.c results in the following 2016-09-04 17:23:10 +00:00
netinet6 Fix L2 caching for UDP over IPv6 2016-08-24 00:52:30 +00:00
netipsec Remove redundant sanity checks from ipsec[46]_common_input_cb(). 2016-08-31 11:51:52 +00:00
netnatm
netpfil Fix swap tables between sets when this functional is enabled. 2016-09-13 18:16:15 +00:00
netsmb
nfs Hide the boottime and bootimebin globals, provide the getboottime(9) 2016-07-27 11:08:59 +00:00
nfsclient
nfsserver
nlm When sleeping waiting for either local or remote advisory lock, 2016-06-26 20:08:42 +00:00
ofed Do not free an uninitialized pointer on soaccept failure in the iWARP 2016-08-26 08:25:28 +00:00
opencrypto opencrypto AES-ICM: Fix heap corruption typo 2016-08-01 22:57:03 +00:00
pc98 Remove the ie(4) driver for Intel 82586 ISA Ethernet adapters. 2016-08-20 00:49:29 +00:00
powerpc Various changes to pmap_ts_referenced() 2016-09-10 16:49:25 +00:00
riscv Various changes to pmap_ts_referenced() 2016-09-10 16:49:25 +00:00
rpc Hide the boottime and bootimebin globals, provide the getboottime(9) 2016-07-27 11:08:59 +00:00
security Don't check aq64_minfree which is unsigned for negative values. 2016-09-08 19:47:57 +00:00
sparc64 Various changes to pmap_ts_referenced() 2016-09-10 16:49:25 +00:00
sys fd: add fget_cap and fget_cap_locked primitives 2016-09-12 22:46:19 +00:00
teken
tests
tools Consider CROSS_BINUTILS_PREFIX environment variable so we use correct 2016-08-10 13:49:17 +00:00
ufs Sprinkle DOINGASYNC() checks so as to do delayed writes for async 2016-09-08 17:40:40 +00:00
vm Various changes to pmap_ts_referenced() 2016-09-10 16:49:25 +00:00
x86 Use the MI macro TRAPF_USERMODE() instead of open-coded checks for 2016-09-14 12:57:40 +00:00
xdr
xen xen: Correct typo in #undef for symbol NBPL 2016-06-06 14:55:46 +00:00
Makefile