Page MenuHomeFreeBSD

kern: Rename null_sysvec to kernel_sysvec
Needs ReviewPublic

Authored by jrtc27 on Jan 2 2022, 5:00 PM.

Details

Reviewers
kib
imp
brooks
jhb
Summary

This more accurately reflects what it is, namely the dummy sysvec used
for kernel processes, and mirrors the naming pattern for real sysvecs.

Diff Detail

Repository
rS FreeBSD src repository - subversion
Lint
Lint OK
Unit
No Unit Test Coverage
Build Status
Buildable 43678
Build 40566: arc lint + arc unit

Event Timeline

jrtc27 requested review of this revision.Jan 2 2022, 5:00 PM
jrtc27 created this revision.
sys/kern/init_main.c
423

I wonder if some of these shouldn't be 0 instead? For kernel processes without any userland memory at all these next 4 things are kind of bogus.

433

I guess it is better to use these wrappers vs NULL function pointers (matching existing code).

sys/kern/init_main.c
423

Yeah, those thoughts crossed my mind... hopefully nothing relies on these but who knows?

433

Yeah, it's marginally more debuggable

elf is not some random prefix, it specifes 'ELF ABI' for userspace processes to distinguish e.g. from a.out. elf_kernel does not provide any useful info there IMO. What if kernel becomes COFF/PE one day to satisfy requirements of UEFI 3.0?

sys/kern/init_main.c
423

The sv_min/maxuser are only relevant at the exec time, where the values from new sysent are taken. We never evaluate old sysent min/maxuser (or we should not) because it is old vmspace that determines the layout of the address space that goes out.

In other words, it should be a nop change if you decide to tweak these.

Sure, if the kernel is ever something other than an ELF then the name would be wrong. But it isn't currently; the kernel is an ELF binary, and all kernel modules are ELF files, so it is appropriate to call it an ELF, but if it ever becomes something else then whoever makes that change can change the names.