freebsd-nq/sys
Konstantin Belousov a9c7546a1d Fix a corner case in demotion of kernel mappings.
It is possible for the kernel mapping to be created with superpage by
directly installing pde using pmap_enter_2mpage() without filling the
corresponding page table page.  This can happen e.g. if the range is
already backed by reservation and vm_fault_soft_fast() conditions are
satisfied, which was observed on the pipe_map.

In this case, demotion must fill the page obtained from the pmap
radix, same as if the page is newly allocated.  Use PG_PROMOTED bit as
an indicator that the page is valid, instead of the wire count of the
page table page.

Since the PG_PROMOTED bit is set on pde when we leave TLB entries for
4k pages around, which in particular means that the ptes were filled,
it provides more correct indicator.  Note that pmap_protect_pde()
clears PG_PROMOTED, which handles the case when protection was changed
on the superpage without adjusting ptes.

Reported by:	pho
In collaboration with:	alc
Tested by:	alc, pho
Sponsored by:	The FreeBSD Foundation
MFC after:	1 week
Differential revision:	https://reviews.freebsd.org/D20380
2019-05-24 17:19:06 +00:00
..
amd64 Fix a corner case in demotion of kernel mappings. 2019-05-24 17:19:06 +00:00
arm arm: allwinner: Remove frac mode from NM clk 2019-05-23 17:36:55 +00:00
arm64 Include ktr.h in more compilation units 2019-05-21 20:38:48 +00:00
bsm Create new EINTEGRITY error with message "Integrity check failed". 2019-01-17 06:35:45 +00:00
cam Simplify math added in r310524. 2019-05-22 15:39:35 +00:00
cddl Allocate buffers smaller then ABD chunk size as linear. 2019-05-22 18:43:48 +00:00
compat Do not leak sa in linux_recvmsg() call if kern_recvit() fails. 2019-05-21 18:08:19 +00:00
conf Use ACPI SPCR on x86 2019-05-23 19:55:53 +00:00
contrib Extract eventfilter declarations to sys/_eventfilter.h 2019-05-20 00:38:23 +00:00
crypto Extract eventfilter declarations to sys/_eventfilter.h 2019-05-20 00:38:23 +00:00
ddb Extract eventfilter declarations to sys/_eventfilter.h 2019-05-20 00:38:23 +00:00
dev amdgpio: small formatting cleanup 2019-05-24 06:07:33 +00:00
dts arm64: Add support for NanoPI NEO2 2019-05-02 12:56:13 +00:00
fs Include ktr.h in more compilation units 2019-05-21 20:38:48 +00:00
gdb
geom Add deprecation warnings for weaker algorithms to geli(4). 2019-05-23 22:31:55 +00:00
gnu dts: Import files from Linux 5.1 2019-05-08 19:27:30 +00:00
i386 Fix a corner case in demotion of kernel mappings. 2019-05-24 17:19:06 +00:00
isa
kern EKCD: Add Chacha20 encryption mode 2019-05-23 20:12:24 +00:00
kgssapi * Handle SIGPIPE in gssd 2019-02-21 01:30:37 +00:00
libkern random(4): depessimize arc4random 2019-05-12 06:32:46 +00:00
mips Display CPU model in dmesg on mips targets 2019-05-24 01:43:35 +00:00
modules Add common support functions for USB devices configured via FDT data. 2019-05-19 16:56:59 +00:00
net Fix gateway setup for the interface routes. 2019-05-22 21:20:15 +00:00
net80211 net80211: correct check for SMPS node flags updates 2019-03-18 02:40:22 +00:00
netgraph Remove 'dir' argument in ng_ipfw_input, since ip_fw_args now has this info. 2019-03-14 22:30:05 +00:00
netinet Massively blow up the locking-related KASSERTs used to make sure 2019-05-21 19:23:56 +00:00
netinet6 Restore IPV6_NEXTHOP option support that seem was partially broken 2019-05-24 11:45:32 +00:00
netipsec Add deprecation warnings for IPsec algorithms deprecated in RFC 8221. 2019-05-23 22:06:57 +00:00
netpfil Add IPv6 support for O_IPLEN opcode. 2019-04-29 09:33:16 +00:00
netsmb Remove unused argument to priv_check_cred. 2018-12-11 19:32:16 +00:00
nfs
nfsclient
nfsserver
nlm
ofed Include eventhandler.h in more compilation units 2019-05-21 01:18:43 +00:00
opencrypto cryptodeflate: Drop z_stream zbuf.state->dummy from SDT probe. 2019-05-24 02:44:15 +00:00
powerpc powerpc/mpc85xx: Use the proper (EREF) form of writing to DBCR0 2019-05-23 03:47:25 +00:00
riscv Include ktr.h in more compilation units 2019-05-21 20:38:48 +00:00
rpc Fix malloc stats for the RPCSEC_GSS server code when DEBUG is enabled. 2019-04-04 01:23:06 +00:00
security Extract eventfilter declarations to sys/_eventfilter.h 2019-05-20 00:38:23 +00:00
sparc64 FCP-101: Remove wb(4) 2019-05-17 15:24:34 +00:00
sys EKCD: Add Chacha20 encryption mode 2019-05-23 20:12:24 +00:00
teken Attempt to complete fixing programmable function keys for syscons. 2019-02-20 02:14:41 +00:00
tests Regularize the Netflix copyright 2019-02-04 21:28:25 +00:00
tools Avoid literal @generated tag in file-generating scripts 2019-05-08 13:35:51 +00:00
ufs Include ktr.h in more compilation units 2019-05-21 20:38:48 +00:00
vm Fix typo from r348128: _func__ -> __func__ 2019-05-23 02:10:41 +00:00
x86 Add a constant for the LS config MSR on AMD CPUs. 2019-05-23 23:37:11 +00:00
xdr
xen xen: introduce a new way to setup event channel upcall 2019-01-30 11:34:52 +00:00
Makefile