freebsd-skq/sys/i386
Konstantin Belousov b42dfd6dff Fill tf_trapno for trap frames created for syscall.
If tf_trapno contains garbage which appears to be equal to T_NMI,
e.g. due to thread previously entered kernel due to NMI, doreti
sequence skips ast, and does so until a trap or hardware interrupt
occur.

The visible effects of the issue are quite confusing.  First, signals
delivery is postponed in observable ways.  In particular, the
guarantee that unblocked async signals queue is flushed before a
return from syscall, is broken.  Second, if there are pending signals,
all interruptible sleeps of the stuck thread are aborted immediately.

Since modern CPUs are relatively fast and tickless kernel generates
low interrupt rate, the faulty condition might exist for long time (in
an application time scale).

In collaboration with:	pho
Sponsored by:	The FreeBSD Foundation
MFC after:	1 week
2016-07-11 15:52:52 +00:00
..
acpica If x86 CPU implementation of the MWAIT instruction reasonably 2015-05-09 12:28:48 +00:00
bios Make it explicit that D_MEM cdevsw d_flag is to signify that the 2016-05-01 17:46:56 +00:00
conf Native PCI-express HotPlug support. 2016-05-05 22:26:23 +00:00
i386 Fill tf_trapno for trap frames created for syscall. 2016-07-11 15:52:52 +00:00
ibcs2 X86: use our nitems() macro when it is avaliable through param.h. 2016-04-19 23:41:46 +00:00
include Replace a number of conflations of mp_ncpus and mp_maxid with either 2016-07-06 14:09:49 +00:00
isa Migrate many bus_alloc_resource() calls to bus_alloc_resource_anywhere(). 2016-02-27 03:38:01 +00:00
linux Fix a copy/paste bug introduced during X86_64 Linuxulator work. 2016-07-10 08:22:04 +00:00
pci As <machine/pmap.h> is included from <vm/pmap.h>, there is no need to 2016-02-22 09:02:20 +00:00
svr4 sys: use our roundup2/rounddown2() macros when param.h is available. 2016-04-21 19:57:40 +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