opnsense-src/sys/kern
Kyle Evans 7771f2a0c9 kern: physmem: improve region coalescing logic
The existing logic didn't take into account newly inserted mappings
wholly contained by an existing region (or vice versa), nor did it
account for weird overlap scenarios.  The latter is probably unlikely
to happen, but the former may happen in UEFI: BootServicesData allocated
within a large chunk of ConventionalMemory.  This situation blows up vm
initialization.

While we're here, remove the "exact match" logic as it's likely wrong;
if an exact match exists with conflicting flags, for instance, then we
should probably be doing something else.  The new logic takes into
account exact matches as part of the overlapping efforts.

Reviewed by:	kib, mhorne (both earlier version)
Differential Revision:	https://reviews.freebsd.org/D32701
2021-11-03 02:32:46 -05:00
..
bus_if.m device: add device_get_property and device_has_property 2021-09-20 17:17:57 +02:00
clock_if.m
cpufreq_if.m
device_if.m
firmw.S Use a template assembly file for firmware object files. 2020-12-17 20:31:17 +00:00
genassym.sh genassym.sh: Fix two minor issues found by shellcheck 2021-07-28 13:49:16 -06:00
genoffset.c Merge td_epochnest with td_no_sleeping. 2019-10-29 17:28:25 +00:00
genoffset.sh genoffset.sh: Use 10 X's instead of 5 for pick mkdtemp implementations 2021-09-07 10:08:51 -06:00
imgact_aout.c fork: Allow ABI to specify fork return values for child. 2021-08-12 11:45:25 +03:00
imgact_binmisc.c imgact_binmisc: limit the extent of match on incoming entries 2020-11-08 04:24:29 +00:00
imgact_elf.c setrlimit: Take stack gap into account. 2021-10-15 10:21:47 +02:00
imgact_elf32.c
imgact_elf64.c
imgact_shell.c
init_main.c fork: Allow ABI to specify fork return values for child. 2021-08-12 11:45:25 +03:00
init_sysent.c Regen after 0dc332bff2 2021-08-05 23:22:02 +08:00
kern_acct.c acct: Zero pad bytes in accounting records 2021-07-23 10:29:57 -04:00
kern_alq.c alq_open_flags(): mark local td variable as unused 2021-10-21 21:40:46 +03:00
kern_clock.c kern: clean up empty lines in .c and .h files 2020-09-01 22:12:32 +00:00
kern_clocksource.c
kern_condvar.c Use sleepq_signal(SLEEPQ_DROP) in cv_signal(). 2021-07-09 20:57:58 -04:00
kern_conf.c Fix handling of D_GIANTOK 2021-06-07 16:45:50 -04:00
kern_cons.c Re-implement virtual console (constty). 2021-09-03 22:18:51 -04:00
kern_context.c
kern_cpu.c Make CPU children explicitly share parent unit numbers. 2021-09-24 23:31:51 -04:00
kern_cpuset.c domainset: Define additional global policies 2021-04-14 13:03:33 -04:00
kern_ctf.c kern_ctf: Use zlib's uncompress function for simpler code. 2021-09-25 23:33:00 -07:00
kern_descrip.c cache: add empty path support 2021-10-16 20:08:37 +00:00
kern_dtrace.c dtrace: stop using eventhandlers for the part compiled into the kernel 2020-11-23 18:27:21 +00:00
kern_dump.c minidump: De-duplicate the progress bar 2021-09-29 16:42:21 -03:00
kern_environment.c kenv: allow listing of static kernel environments 2021-07-18 23:06:19 -05:00
kern_et.c Remove NO_EVENTTIMERS support 2020-11-19 02:50:48 +00:00
kern_event.c vfs: remove thread argument from VOP_STAT 2021-10-11 13:22:32 +00:00
kern_exec.c Unmap shared page manually before doing vm_map_remove() on exit or exec 2021-10-28 22:01:59 +03:00
kern_exit.c Unmap shared page manually before doing vm_map_remove() on exit or exec 2021-10-28 22:01:59 +03:00
kern_fail.c kern: clean up empty lines in .c and .h files 2020-09-01 22:12:32 +00:00
kern_ffclock.c Mark more nodes as CTLFLAG_MPSAFE or CTLFLAG_NEEDGIANT (17 of many) 2020-02-26 14:26:36 +00:00
kern_fork.c exec: store parent directory and hardlink name of the binary in struct proc 2021-10-28 20:49:56 +03:00
kern_hhook.c Remove duplicated empty lines from kern/*.c 2020-01-30 20:05:05 +00:00
kern_idle.c
kern_intr.c hwpmc: fix performance issues 2021-09-23 07:15:42 +02:00
kern_jail.c jail(8): Fix a few common typos in source code comments 2021-10-27 06:16:06 +02:00
kern_kcov.c kcov: Disable address and memory sanitizers in get_kinfo() 2021-09-17 14:19:05 -04:00
kern_khelp.c
kern_kthread.c umtx: Split umtx.h on two counterparts. 2021-07-29 12:41:29 +03:00
kern_ktr.c kern: clean up empty lines in .c and .h files 2020-09-01 22:12:32 +00:00
kern_ktrace.c ktrace: Zero request structures when populating the pool 2021-07-23 10:29:53 -04:00
kern_linker.c link_elf_obj: Invoke fini callbacks 2021-07-29 09:46:25 -04:00
kern_lock.c lockmgr: fix lock profiling of face adaptive spinning 2021-09-18 10:16:58 +00:00
kern_lockf.c kern: clean up empty lines in .c and .h files 2020-09-01 22:12:32 +00:00
kern_lockstat.c Add lockmgr(9) probes to the lockstat DTrace provider. 2019-08-21 23:43:58 +00:00
kern_loginclass.c Drop "All rights reserved" from all my stuff. This includes 2020-10-28 13:46:11 +00:00
kern_malloc.c malloc: Unmark KASAN redzones if the full allocation size was requested 2021-10-06 16:09:41 -04:00
kern_mbuf.c Convert vm_page_alloc() callers to use vm_page_alloc_noobj(). 2021-10-19 21:22:56 -04:00
kern_mib.c jail: Consistently handle the pr_allow bitmask 2020-12-26 20:25:02 -08:00
kern_module.c kern: clean up empty lines in .c and .h files 2020-09-01 22:12:32 +00:00
kern_mtxpool.c Remove duplicated empty lines from kern/*.c 2020-01-30 20:05:05 +00:00
kern_mutex.c callout(9): Allow spin locks use with callout_init_mtx(). 2021-09-02 21:16:46 -04:00
kern_ntptime.c Add kern_ntp_adjtime(9). 2020-12-04 18:56:44 +00:00
kern_osd.c osd: Fix racy assertions 2021-09-09 10:11:02 -04:00
kern_physio.c Minor style tidy: if( -> if ( 2021-04-18 11:19:15 -06:00
kern_pmc.c kern: clean up empty lines in .c and .h files 2020-09-01 22:12:32 +00:00
kern_poll.c Mark more nodes as CTLFLAG_MPSAFE or CTLFLAG_NEEDGIANT (17 of many) 2020-02-26 14:26:36 +00:00
kern_priv.c jail: Consistently handle the pr_allow bitmask 2020-12-26 20:25:02 -08:00
kern_proc.c Extract proc_get_binpath() from sysctl_kern_proc_pathname() 2021-10-31 03:05:14 +02:00
kern_procctl.c procctl: stop using SA_*LOCKED, define local enum 2021-10-20 00:25:19 +03:00
kern_prot.c kern: fail getgroup and setgroup with negative int 2021-06-02 13:22:57 -06:00
kern_racct.c umtx: Split umtx.h on two counterparts. 2021-07-29 12:41:29 +03:00
kern_rangelock.c rangelock: add rangelock_cookie_assert 2019-09-15 02:59:53 +00:00
kern_rctl.c rctl(4): support throttling resource usage to 0 2021-01-11 15:36:57 -08:00
kern_resource.c setrlimit: Take stack gap into account. 2021-10-15 10:21:47 +02:00
kern_rmlock.c rmslock: Update td_locks during lock and unlock operations 2021-10-27 11:18:13 -04:00
kern_rwlock.c lockprof: pass lock type as an argument instead of reading the spin flag 2021-05-23 17:55:27 +00:00
kern_sdt.c
kern_sema.c
kern_sendfile.c socket: Remove unneeded SOLISTENING checks 2021-09-07 17:12:09 -04:00
kern_sharedpage.c Remove bogus cast from exec_sysvec_init(). 2021-07-20 09:54:09 +03:00
kern_shutdown.c boot(9): update to match reality 2021-09-28 11:36:09 -03:00
kern_sig.c sig_ast_checksusp(): mark the local p as __diagused 2021-10-21 21:40:46 +03:00
kern_switch.c Mark more nodes as CTLFLAG_MPSAFE or CTLFLAG_NEEDGIANT (17 of many) 2020-02-26 14:26:36 +00:00
kern_sx.c lockprof: pass lock type as an argument instead of reading the spin flag 2021-05-23 17:55:27 +00:00
kern_synch.c Add _sleep to TSLOG 2021-09-05 12:50:15 -07:00
kern_syscalls.c Move syscall_thread_{enter,exit}() into the slow path. This is only 2020-11-08 15:54:59 +00:00
kern_sysctl.c Escape any '.' characters in sysctl node names 2021-07-22 10:22:48 -06:00
kern_tc.c timecounter: Load the currently selected tc once in tc_windup() 2021-10-29 14:30:15 -04:00
kern_thr.c umtx: Split umtx.h on two counterparts. 2021-07-29 12:41:29 +03:00
kern_thread.c i386: fix struct proc layout asserts after 351d5f7fc5 2021-10-28 21:56:21 +03:00
kern_time.c itimer: Serialize access to the p_itimers array 2021-08-31 16:38:05 -04:00
kern_timeout.c callout(9): Allow spin locks use with callout_init_mtx(). 2021-09-02 21:16:46 -04:00
kern_tslog.c TSLOG: Report final execname, not first 2021-10-17 13:36:38 -07:00
kern_ubsan.c ubsan: Fix a typo in an error message 2021-09-25 11:47:24 +02:00
kern_umtx.c umtxq_requeue: remove write-only variable uh2 2021-10-21 21:40:46 +03:00
kern_uuid.c validate_uuid: absorb the rest of parse_uuid with a flags arg 2020-04-15 18:39:12 +00:00
kern_xxx.c kern: clean up empty lines in .c and .h files 2020-09-01 22:12:32 +00:00
ksched.c
link_elf.c Add pmap_change_prot on arm64 2021-10-11 10:26:45 +01:00
link_elf_obj.c link_elf_obj: Invoke fini callbacks 2021-07-29 09:46:25 -04:00
linker_if.m
Make.tags.inc Bring the tags and links entries for amd64 up to date. 2021-09-27 20:04:51 -07:00
Makefile syscalls.master: switch to CAPENABLED flags 2021-09-01 21:58:16 +01:00
md4c.c
md5c.c
msi_if.m Remove "All Rights Reserved" from FreeBSD Foundation sys/ copyrights 2021-08-08 10:42:24 -04:00
p1003_1b.c
pic_if.m
posix4_mib.c kern: clean up empty lines in .c and .h files 2020-09-01 22:12:32 +00:00
sched_4bsd.c umtx: Split umtx.h on two counterparts. 2021-07-29 12:41:29 +03:00
sched_ule.c sched_ule(4): Fix possible significance loss. 2021-10-02 00:09:45 -04:00
serdev_if.m
stack_protector.c Revert r346292 (permit_nonrandom_stackcookies) 2019-05-13 23:37:44 +00:00
subr_acl_nfs4.c Drop "All rights reserved" from all my stuff. This includes 2020-10-28 13:46:11 +00:00
subr_acl_posix1e.c vfs: remove the obsolete privused argument from vaccess 2020-08-05 09:27:03 +00:00
subr_asan.c Add interceptors for atomic operations on userspace memory 2021-07-29 21:14:36 -04:00
subr_atomic64.c emulated atomic64: disable interrupts as the lock mechanism on !SMP 2020-01-03 18:29:20 +00:00
subr_autoconf.c Add run_interrupt_driven_config_hooks to TSLOG 2021-09-05 12:45:29 -07:00
subr_blist.c blist: Correct the node count computed in blist_create() 2021-07-13 17:47:27 -04:00
subr_boot.c When parsing command line stuff, treat tabs and spaces the same. 2019-04-18 22:52:12 +00:00
subr_bufring.c kern: clean up empty lines in .c and .h files 2020-09-01 22:12:32 +00:00
subr_bus.c bus: Cleanup device_probe_child() 2021-09-24 20:34:56 -04:00
subr_bus_dma.c busdma: Add KMSAN integration 2021-08-10 21:27:54 -04:00
subr_busdma_bufalloc.c kern: clean up empty lines in .c and .h files 2020-09-01 22:12:32 +00:00
subr_capability.c Remove "All Rights Reserved" from FreeBSD Foundation sys/ copyrights 2021-08-08 10:42:24 -04:00
subr_clock.c Remove duplicated empty lines from kern/*.c 2020-01-30 20:05:05 +00:00
subr_compressor.c clamp kernel dump compression level when using gzip 2020-02-20 23:53:48 +00:00
subr_counter.c Rationalize per-cpu zones. 2020-11-05 15:08:56 +00:00
subr_coverage.c kcov: Integrate with KMSAN 2021-09-14 14:29:27 -04:00
subr_csan.c Simplify kernel sanitizer interceptors 2021-07-29 21:13:32 -04:00
subr_devmap.c riscv: Implement pmap_mapdev_attr 2021-10-17 15:31:35 +01:00
subr_devstat.c Speed up geom_stats_resync in the presence of many devices 2021-03-02 18:33:45 -07:00
subr_disk.c Enable bioq 'car limit' added at r335066 at 128 bios. 2020-10-26 04:04:06 +00:00
subr_dummy_vdso_tc.c
subr_early.c
subr_epoch.c The old thread priority must be stored as part of the EPOCH(9) tracker. 2021-05-23 10:53:25 +02:00
subr_eventhandler.c Include ktr.h in more compilation units 2019-05-21 20:38:48 +00:00
subr_fattime.c Remove duplicated empty lines from kern/*.c 2020-01-30 20:05:05 +00:00
subr_filter.c kern: clean up empty lines in .c and .h files 2020-09-01 22:12:32 +00:00
subr_firmware.c subr_firmware.c::unloadentry(): remote write-only variable 2021-10-21 21:40:46 +03:00
subr_gtaskqueue.c Import kernel WireGuard support 2020-11-29 19:38:03 +00:00
subr_hash.c
subr_hints.c Optimize res_find(). 2021-08-08 21:54:49 -04:00
subr_intr.c intrng: remove now redundant shadow variable. 2021-07-08 08:46:41 +02:00
subr_kdb.c kdb: Handle process enumeration before procinit() 2021-08-11 14:44:22 -03:00
subr_kobj.c newbus: Optimize/Simplify kobj_class_compile_common a little 2021-04-21 15:37:24 -06:00
subr_lock.c lockprof: move panic check after inspecting the state 2021-05-23 17:55:27 +00:00
subr_log.c Document kern.log_wakeups_per_second. 2021-08-04 11:50:34 -07:00
subr_mchain.c kern: clean up empty lines in .c and .h files 2020-09-01 22:12:32 +00:00
subr_module.c sysctl debug.dump_modinfo should recognize font module 2021-01-08 09:24:49 +02:00
subr_msan.c kmsan: Export kmsan_mark_mbuf() and kmsan_mark_bio() 2021-08-11 16:33:41 -04:00
subr_msgbuf.c kern: clean up empty lines in .c and .h files 2020-09-01 22:12:32 +00:00
subr_param.c Move mips and arm to 1000Hz by default. 2021-06-16 20:00:14 -06:00
subr_pcpu.c Add more per-cpu zones. 2020-11-09 00:34:23 +00:00
subr_pctrie.c Use SMR to provide safe unlocked lookup for pctries from SMR zones 2020-07-24 17:32:10 +00:00
subr_physmem.c kern: physmem: improve region coalescing logic 2021-11-03 02:32:46 -05:00
subr_pidctrl.c
subr_power.c kern: clean up empty lines in .c and .h files 2020-09-01 22:12:32 +00:00
subr_prf.c Unify console output. 2021-09-03 23:13:42 -04:00
subr_prng.c Add prng(9) API 2020-08-13 20:48:14 +00:00
subr_prof.c x86: remove gcov kernel support 2021-04-02 15:41:51 +03:00
subr_rangeset.c Remove "All Rights Reserved" from FreeBSD Foundation sys/ copyrights 2021-08-08 10:42:24 -04:00
subr_rman.c rman: fix overflow in rman_reserve_resource_bound() 2021-09-27 14:38:26 -03:00
subr_rtc.c Address whitespace nits in subr_rtc.c 2020-09-28 17:19:57 +00:00
subr_sbuf.c sbuf(9): Microoptimize sbuf_put_byte() 2021-10-05 14:47:38 -04:00
subr_scanf.c kern: clean up empty lines in .c and .h files 2020-09-01 22:12:32 +00:00
subr_sfbuf.c
subr_sglist.c sglist: Add sglist_append_single_mbuf(). 2021-05-25 16:59:18 -07:00
subr_sleepqueue.c When queuing ignored signal, only abort target thread' sleep if it is inside sigwait() 2021-10-06 17:05:22 +03:00
subr_smp.c Refactor/optimize cpu_search_*(). 2021-07-28 22:00:29 -04:00
subr_smr.c Use COUNTER_U64_DEFINE_EARLY() in places where it simplifies things. 2020-03-06 19:10:00 +00:00
subr_stack.c kern.tty_info_kstacks: add a compact format 2020-07-06 16:33:28 +00:00
subr_stats.c stats(3): Improve t-digest merging of samples which result in mu adjustment underflow. 2021-04-02 13:17:53 +11:00
subr_syscall.c linux: Add additional ptracestop only if the debugger is Linux 2021-10-30 09:54:17 +01:00
subr_taskqueue.c callout(9): Allow spin locks use with callout_init_mtx(). 2021-09-02 21:16:46 -04:00
subr_terminal.c Remove "All Rights Reserved" from FreeBSD Foundation sys/ copyrights 2021-08-08 10:42:24 -04:00
subr_trap.c kqueue: drain kqueue taskqueue if syscall tickled it 2021-09-07 02:43:34 +03:00
subr_turnstile.c Use atomic loads/stores when updating td->td_state 2021-02-18 14:02:48 +00:00
subr_uio.c kern: clean up empty lines in .c and .h files 2020-09-01 22:12:32 +00:00
subr_unit.c kern: clean up empty lines in .c and .h files 2020-09-01 22:12:32 +00:00
subr_vmem.c vmem: disable debug.vmem_check by default 2021-09-02 18:28:45 +00:00
subr_witness.c witness: remove ifnet_rw 2021-08-18 08:51:26 +02:00
sys_capability.c Enter a write sequence when updating rights. 2020-03-19 15:39:45 +00:00
sys_eventfd.c vfs: remove thread argument from VOP_STAT 2021-10-11 13:22:32 +00:00
sys_generic.c selsocket: handle sopoll() errors correctly 2021-10-14 00:43:48 +01:00
sys_getrandom.c Fix a typo in r356667 comment 2020-01-12 23:52:16 +00:00
sys_pipe.c fifos: delegate unhandled kqueue filters to underlying filesystem 2021-10-12 02:43:07 -05:00
sys_procdesc.c vfs: remove thread argument from VOP_STAT 2021-10-11 13:22:32 +00:00
sys_process.c Remove PT_GET_SC_ARGS_ALL 2021-09-16 20:11:27 +03:00
sys_socket.c Stop creating socket aio kprocs during boot. 2021-10-12 14:03:07 -07:00
syscalls.c Regen after 0dc332bff2 2021-08-05 23:22:02 +08:00
syscalls.master syscalls.master: correct formatting issues 2021-09-01 21:58:22 +01:00
systrace_args.c Regen after 0dc332bff2 2021-08-05 23:22:02 +08:00
sysv_ipc.c sysv: get rid of fork/exit hooks if the code is compiled in 2019-05-04 19:05:30 +00:00
sysv_msg.c jail: Change the locking around pr_ref and pr_uref 2021-02-21 10:55:44 -08:00
sysv_sem.c jail: Change the locking around pr_ref and pr_uref 2021-02-21 10:55:44 -08:00
sysv_shm.c jail: Change the locking around pr_ref and pr_uref 2021-02-21 10:55:44 -08:00
tty.c Re-implement virtual console (constty). 2021-09-03 22:18:51 -04:00
tty_compat.c
tty_info.c kern.tty_info_kstacks: set compact format as default 2020-07-06 16:34:15 +00:00
tty_inq.c
tty_outq.c Minor style cleanup 2021-04-18 11:14:17 -06:00
tty_pts.c vfs: remove thread argument from VOP_STAT 2021-10-11 13:22:32 +00:00
tty_tty.c Extract eventfilter declarations to sys/_eventfilter.h 2019-05-20 00:38:23 +00:00
tty_ttydisc.c Implement FLUSHO 2020-08-27 05:11:15 +00:00
uipc_accf.c Consistently use the SOLISTENING() macro 2021-06-14 17:32:27 -04:00
uipc_debug.c
uipc_domain.c net: Enter a net epoch around protocol if_up/down notifications 2021-09-10 09:07:40 -04:00
uipc_ktls.c ktls: Always create a software backend for receive sessions. 2021-10-21 09:37:17 -07:00
uipc_mbuf.c Convert vm_page_alloc() callers to use vm_page_alloc_noobj(). 2021-10-19 21:22:56 -04:00
uipc_mbuf2.c m_pulldown(): Change an if () panic() into a KASSERT(). 2019-11-06 22:40:19 +00:00
uipc_mbufhash.c Implement mbuf hashing routines for IP over infiniband, IPoIB. 2020-10-22 09:17:56 +00:00
uipc_mqueue.c vfs: remove thread argument from VOP_STAT 2021-10-11 13:22:32 +00:00
uipc_sem.c vfs: remove thread argument from VOP_STAT 2021-10-11 13:22:32 +00:00
uipc_shm.c uipc_shm: silent warnings about write-only variables in largepage code 2021-10-21 21:40:46 +03:00
uipc_sockbuf.c socket: Rename sb(un)lock() and interlock with listen(2) 2021-09-07 15:06:48 -04:00
uipc_socket.c Re-style dfcef87714 to keep the code and variables related to 2021-10-01 13:38:24 -07:00
uipc_syscalls.c socket: Avoid clearing SS_ISCONNECTING if soconnect() fails 2021-09-07 17:12:09 -04:00
uipc_usrreq.c unix: Fix a use-after-free in unp_drop() 2021-09-18 10:38:39 -04:00
vfs_acl.c vfs: fix trivial whitespace issues which don't interefere with blame 2020-07-10 09:01:36 +00:00
vfs_aio.c aio_aqueue(): avoid ucred leak on failure path 2021-09-24 03:18:34 +03:00
vfs_bio.c Allow biodone() to be used as a completion routine. 2021-10-23 14:11:57 -07:00
vfs_cache.c Make vn_fullpath_hardlink() externally callable 2021-10-28 20:49:26 +03:00
vfs_cluster.c cluster_write(): do not access buffer after it is released 2021-09-02 21:36:33 +03:00
vfs_default.c vfs_default: Change vop_stddeallocate() from static to global 2021-08-27 18:25:44 -07:00
vfs_export.c kern: clean up empty lines in .c and .h files 2020-09-01 22:12:32 +00:00
vfs_extattr.c O_PATH: allow vfs_extattr syscalls 2021-10-11 20:09:49 +03:00
vfs_hash.c vfs_hash_rehash(): require the vnode to be exclusively locked 2021-08-27 18:39:45 +03:00
vfs_init.c VFS_QUOTACTL(9): allow implementation to indicate busy state changes 2021-05-30 14:53:47 -07:00
vfs_lookup.c cache: add empty path support 2021-10-16 20:08:37 +00:00
vfs_mount.c mount: Check for !VDIR mount points before handling -o emptydir 2021-10-13 09:33:35 -04:00
vfs_mountroot.c vfs: add missing VIRF_MOUNTPOINT in vfs_mountroot_shuffle 2021-09-18 21:13:51 +02:00
vfs_subr.c mount: Check for !VDIR mount points before handling -o emptydir 2021-10-13 09:33:35 -04:00
vfs_syscalls.c vfs: remove thread argument from VOP_STAT 2021-10-11 13:22:32 +00:00
vfs_vnops.c vfs: remove thread argument from VOP_STAT 2021-10-11 13:22:32 +00:00
vnode_if.src vfs: remove thread argument from VOP_STAT 2021-10-11 13:22:32 +00:00