freebsd-skq/sys
Konstantin Belousov b8db977617 Remove a check which caused spurious SIGSEGV on usermode access to the
mapped address without valid pte installed, when parallel wiring of
the entry happen.  The entry must be copy on write.  If entry is COW
but was already copied, and parallel wiring set
MAP_ENTRY_IN_TRANSITION, vm_fault() would sleep waiting for the
MAP_ENTRY_IN_TRANSITION flag to clear.  After that, the fault handler
is restarted and vm_map_lookup() or vm_map_lookup_locked() trip over
the check.  Note that this is race, if the address is accessed after
the wiring is done, the entry does not fault at all.

There is no reason in the current kernel to disallow write access to
the COW wired entry if the entry permissions allow it.  Initially this
was done in r24666, since that kernel did not supported proper
copy-on-write for wired text, which was fixed in r199869.  The r251901
revision re-introduced the r24666 fix for the current VM.

Note that write access must clear MAP_ENTRY_NEEDS_COPY entry flag by
performing COW.  In reverse, when MAP_ENTRY_NEEDS_COPY is set in
vmspace_fork(), the MAP_ENTRY_USER_WIRED flag is cleared.  Put the
assert stating the invariant, instead of returning the error.

Reported and debugging help by:	peter
Reviewed by:	alc
Sponsored by:	The FreeBSD Foundation
MFC after:	1 week
2015-09-09 06:19:33 +00:00
..
amd64 Remove an unneeded instruction. 2015-08-28 00:17:21 +00:00
arm Clean up the style of the LEAVE_HYP macro. 2015-08-31 09:39:16 +00:00
arm64 Add support for pmap_mincore on arm64 by walking the page tables to find 2015-09-08 18:41:06 +00:00
boot As expected, things aren't as simple as hoped. Consequently, we have 2015-09-07 17:56:49 +00:00
bsm
cam Allow LUN options modification via CTL_LUNREQ_MODIFY. 2015-09-06 11:23:01 +00:00
cddl Expose an interface to determine if an ACE is inherited. 2015-09-04 00:14:20 +00:00
compat Fixes a panic triggered by threaded Linux applications when running 2015-09-02 14:04:13 +00:00
conf Remove opt_random.h header pollution from sys/random.h by moving 2015-09-08 08:50:28 +00:00
contrib Fix compilation error on gcc-5.2.0 - it now warns on non-paranthen'ed 2015-08-30 08:46:50 +00:00
crypto const'ify an arg that we don't update... 2015-07-29 23:37:15 +00:00
ddb Make kstack_pages a tunable on arm, x86, and powepc. On i386, the 2015-08-10 17:18:21 +00:00
dev Correct setting R92C_TDECTRL_BLK_DESC_NUM_M bit. 2015-09-09 01:51:38 +00:00
fs Fix an NFS server bug that manifested in "ls -al" displaying a plus 2015-08-28 14:26:11 +00:00
gdb CALLOUT_MPSAFE has lost its meaning since r141428, i.e., for more than ten 2015-05-22 17:05:21 +00:00
geom After the introduction of direct dispatch, the pacing code in g_down() 2015-09-02 17:29:30 +00:00
gnu Using consistent coding style to deal with error inside the loop. 2015-08-18 13:16:23 +00:00
i386 preload_search_info: make sure mod is set 2015-08-21 15:57:57 +00:00
isa
kern fd: make rights a mandatory argument to fgetvp_rights 2015-09-07 20:05:56 +00:00
kgssapi
libkern Remove checks for __ARM_EABI__, we only build for EABI now. 2015-07-09 21:02:40 +00:00
mips Remove rge driver from Broadcom XLR 2015-09-04 19:57:28 +00:00
modules Revert r286984 (adding opt_random.h to sys/modules/zfs/Makefile) 2015-09-08 08:54:40 +00:00
net Constantify lookup key in ifa_ifwith* functions. 2015-09-05 05:33:20 +00:00
net80211 Replay r286410. Change KPI of how device drivers that provide wireless 2015-08-27 08:56:39 +00:00
netgraph * Address review (and add a bit myself). 2015-07-12 18:14:38 +00:00
netinet RFC 4960 requires that packets containing an INIT chunk bundled with 2015-09-07 14:00:38 +00:00
netinet6 Add support for receiving flowtype, flowid and RSS bucket information as part of recvmsg(). 2015-09-06 20:57:57 +00:00
netipsec Make IPsec work with AES-GCM and AES-ICM (aka CTR) in OCF... IPsec 2015-08-04 17:47:11 +00:00
netnatm
netpfil pf: Fix misdetection of forwarding when net.link.bridge.pfil_bridge is set 2015-09-01 19:04:04 +00:00
netsmb
nfs
nfsclient
nfsserver
nlm
ofed Currently the Linux character device mmap handling only supports mmap 2015-09-03 18:27:39 +00:00
opencrypto Make IPsec work with AES-GCM and AES-ICM (aka CTR) in OCF... IPsec 2015-08-04 17:47:11 +00:00
pc98 Add missing ofw_machdep.h. Make x86 ofw_machdep.h work pc98 too. 2015-08-28 15:41:09 +00:00
powerpc Add PVR identifier for E6500, from the reference. 2015-09-09 03:15:25 +00:00
rpc Set curvnet context inside the RPC code in more places. 2015-08-18 18:12:46 +00:00
security fd: make 'rights' a manadatory argument to fget* functions 2015-07-05 19:05:16 +00:00
sparc64 Rationalize BSD license on sys/*/include/in_cksum.h 2015-08-05 19:05:12 +00:00
sys Remove opt_random.h header pollution from sys/random.h by moving 2015-09-08 08:50:28 +00:00
teken Sync HPA and VPA implementations with CUP. 2015-08-24 07:49:27 +00:00
tools
ufs Do not consume extra reference. This is a bug in r287479. 2015-09-05 12:28:18 +00:00
vm Remove a check which caused spurious SIGSEGV on usermode access to the 2015-09-09 06:19:33 +00:00
x86 Add missing ofw_machdep.h. Make x86 ofw_machdep.h work pc98 too. 2015-08-28 15:41:09 +00:00
xdr
xen xen: allow disabling PV disks and nics 2015-08-21 15:53:08 +00:00
Makefile Kill EoL whitespace. 2015-05-29 14:03:07 +00:00