opnsense-src/sys
Mark Johnston 8bebdbe494 amd64: Make it possible to grow the KERNBASE region of KVA
pmap_growkernel() may be called when mapping a region above KERNBASE,
typically for a kernel module.  If we have enough PTPs left over from
bootstrap, pmap_growkernel() does nothing.  However, it's possible to
run out, and in this case pmap_growkernel() will try to grow the kernel
map all the way from kernel_vm_end to somewhere past KERNBASE, which can
easily run the system out of memory.  This happens with large kernel
modules such as the nvidia GPU driver.  There is also a WIP dtrace
provider which needs to map KVA in the region above KERNBASE (to provide
trampolines which allow a copy of traced kernel instruction to be
executed), and its allocations could potentially trigger this scenario.

This change modifies pmap_growkernel() to manage the two regions
separately, allowing them to grow independently.  The end of the
KERNBASE region is tracked by modifying "nkpt".

PR:		265019
Reviewed by:	alc, imp, kib

(cherry picked from commit 0b29f5efcc)
2022-10-09 11:21:10 -04:00
..
amd64 amd64: Make it possible to grow the KERNBASE region of KVA 2022-10-09 11:21:10 -04:00
arm fdt_win_process_child: eliminate write only size variable 2022-10-01 22:25:51 -06:00
arm64 arm64: Handle 1GB mappings in pmap_enter_quick_locked() 2022-10-03 09:06:22 -04:00
bsm
cam CTL: Validate IOCTL parameters. 2022-09-14 13:27:04 -04:00
cddl dtrace/amd64: Implement emulation of call instructions 2022-08-23 16:05:07 -04:00
compat LinuxKPI: Use SYSCTL_FOREACH() 2022-10-04 16:40:53 +02:00
conf powerpc/pseries: Allow radix pmap in pseries for ISA 3.0 2022-10-04 13:24:14 -03:00
contrib zfs: merge openzfs/zfs@6a6bd4939 (zfs-2.1-release) into stable/13 2022-10-04 17:52:45 +02:00
crypto Fix the IV length in the armv8 AES GCM code 2022-09-21 10:45:52 +01:00
ddb ddb: add _FLAGS command variants 2022-08-11 11:22:57 -03:00
dev vt(4): Make sure vt_switch_timer() has a sleepable context. 2022-10-04 16:40:46 +02:00
dts
fs nfs_clvnops.c: Fix access to v_mount when vnode unlocked 2022-10-08 16:29:22 -07:00
gdb ddb: use _FLAGS command macros where appropriate 2022-08-11 11:25:53 -03:00
geom Delay GEOM disk_create() until CAM periph probe completes. 2022-08-15 13:37:58 -04:00
gnu bwn: eliminate dead writes in BWN_GPL_PHY 2022-05-12 08:56:04 -04:00
i386 i386: explain the handshake between copyout_fast.s and page fault handler 2022-09-21 12:29:02 +03:00
isa Adjust function definition in isa's pnp.c to avoid clang 15 warning 2022-08-01 20:07:10 +02:00
kern Add vn_rlimit_fsizex() and vn_rlimit_fsizex_res() 2022-10-08 03:29:36 +03:00
kgssapi
libkern libkern: Fix a typo in a source code comment 2022-06-10 14:24:24 +02:00
mips mips busdma: expunge an extra closing brace 2022-07-12 13:47:44 -05:00
modules zfs: merge openzfs/zfs@6a6bd4939 (zfs-2.1-release) into stable/13 2022-10-04 17:52:45 +02:00
net sysctl_dumpentry: move error to inner scope 2022-10-01 22:25:57 -06:00
net80211 net80211: update (parts of) Action field categories 2022-09-21 11:46:47 +00:00
netgraph Adjust ng_{name,ID}_rehash() definitions to avoid clang 15 warnings 2022-07-29 20:28:08 +02:00
netinet tcp: fix cwnd restricted SACK retransmission loop 2022-09-25 10:56:28 +02:00
netinet6 pim6_input: eliminate write only variable rc 2022-10-01 22:25:57 -06:00
netipsec ipsec: replace SECASVAR mtx by rmlock 2022-08-09 15:46:57 +02:00
netpfil netpfil: Fix some typos in source code comments 2022-09-18 08:06:06 +02:00
netsmb smb_smb_treedisconnect: eliminate write only variable mbp 2022-10-01 22:25:57 -06:00
nfs nfs: skip bootpc when vfs.root.mountfrom is other than nfs 2022-10-05 21:13:06 -03:00
nfsclient
nfsserver
nlm
ofed ibcore: Add support for RDMA/RoCE using VLAN(4) devices. 2022-08-29 14:03:57 +02:00
opencrypto opencrypto: mark INVARIANTS variables as __diagused 2022-08-28 21:03:48 -04:00
powerpc powerpc: slb_alloc_user_cache: fix missing uma_zalloc wait flag 2022-10-05 21:14:29 -03:00
riscv arm64, riscv: size boot stacks appropriately 2022-09-18 01:26:39 -05:00
rpc svc_vc_rendezvous_stat: eliminiate write only variable stat 2022-10-01 22:25:57 -06:00
security sysent: Get rid of bogus sys/sysent.h include. 2022-06-17 22:35:31 +03:00
sys Add vn_rlimit_fsizex() and vn_rlimit_fsizex_res() 2022-10-08 03:29:36 +03:00
teken teken: color #3 is yellow not brown - use TC_YELLOW as the name 2022-05-03 14:20:44 -04:00
tests
tools firmware: Map '@' in filenames to '_' in symbols. 2022-07-13 09:19:51 -07:00
ufs FFS: truncate write if it would exceed the fs max file size or RLIMIT_FSIZE 2022-10-08 03:29:36 +03:00
vm vm/vm.h: cleanup 2022-09-30 03:29:10 +03:00
x86 x86/mp: don't create empty cpu groups 2022-09-29 15:58:50 -04:00
xdr
xen Create wrapper for Giant taken for newbus 2022-06-21 17:13:20 +02:00
Makefile