#
79aa17d9 |
| 27-Mar-2022 |
christos <christos@NetBSD.org> |
Expose groupmember as kauth_cred_groupmember and use it.
|
#
7cd8f2ab |
| 21-Feb-2020 |
joerg <joerg@NetBSD.org> |
Explicitly cast pointers to uintptr_t before casting to enums. They are not necessarily the same size. Don't cast pointers to bool, check for NULL instead.
|
#
ef2c7644 |
| 07-Aug-2019 |
pgoyette <pgoyette@NetBSD.org> |
Many years ago someone created a new __link_set_sysctl_funcs to hold the list of routines that need to be called for setting up sysctl variables. This worked great for all code included in the kerne
Many years ago someone created a new __link_set_sysctl_funcs to hold the list of routines that need to be called for setting up sysctl variables. This worked great for all code included in the kernel itself, but didn't deal with modules that want to create their own sysctl data. So, we ended up with a lot of #ifdef _MODULE blocks so modules could explicitly call their setup functions when loaded as non-built-in modules.
So today, we complete the task that was started so many years ago.
When modules are loaded, after we've called xxx_modcmd(INIT...) we check if the module contains its own __link_set_sysctl_funcs, and if so we call the functions listed. We add a struct sysctllog member to the struct module so we can call sysctl_teardown() when the module gets unloaded. (The sequence of events ensures that the sysctl stuff doesn't get created until the rest of the module's init code does any required memory allocation.)
So, no more need to explicitly call the sysctl setup routines when built as a loadable module.
show more ...
|
#
506d1edf |
| 10-Apr-2019 |
pgoyette <pgoyette@NetBSD.org> |
Replace some "panic()" calls with simple "printf() ; return error"
There's no good reason for these build-time parameters to be allowed to panic the kernel when it is easy to simply disable the modu
Replace some "panic()" calls with simple "printf() ; return error"
There's no good reason for these build-time parameters to be allowed to panic the kernel when it is easy to simply disable the module code and fail gracefully.
While we're at it, similarly replace panic() when malloc fails to also fail gracefully.
show more ...
|
#
8e0d61ef |
| 09-Apr-2019 |
pgoyette <pgoyette@NetBSD.org> |
defparam all of the config variables associated with SYSV IPC stuff. The variables were removed from sys/conf/param.c and moved into the SYSV IPC code, but config options were never propagated via an
defparam all of the config variables associated with SYSV IPC stuff. The variables were removed from sys/conf/param.c and moved into the SYSV IPC code, but config options were never propagated via any opt_* file.
This should fix an issue reported on netbsd-users list from Dima Veselov.
Note that this does not address other parameters included in that report, including CHILD_MAX and NOFILE; this commit only affects items related to the SYSV IPC code. Also note that this does not affect non-built-in sysv_ipc modules, for which you need to update the Makefile to use any non-standard config values - just like any other non-built-in modules which have config params.
XXX Pull-up to -8 and -8-0
XXX Note that there are a couple of panic() calls in msginit() which XXX really should be changed to simple printf() and then result in XXX msginit failure. Unfortunately msginit() currently doesn't return XXX a value so we cannot indicate failure to the caller. I will fix XXX this is a future commit.
show more ...
|
#
1a480a4c |
| 01-Mar-2019 |
pgoyette <pgoyette@NetBSD.org> |
Rename the MODULE_*_HOOK() macros to MODULE_HOOK_*() as briefly discussed on irc.
NFCI intended.
Ride the earlier kernel bump - it;s getting crowded.
|
#
314d436d |
| 29-Jan-2019 |
pgoyette <pgoyette@NetBSD.org> |
Normalize all the compat hooks' names to the form
<subsystem>_<function>_<version>_hook
NFCI
XXX Note that although this introduces a change in the kernel-to- XXX module interface, we are NOT bum
Normalize all the compat hooks' names to the form
<subsystem>_<function>_<version>_hook
NFCI
XXX Note that although this introduces a change in the kernel-to- XXX module interface, we are NOT bumping the kernel version number. XXX We will bump the version number once the interface stabilizes.
show more ...
|
#
cc17ee2e |
| 27-Jan-2019 |
pgoyette <pgoyette@NetBSD.org> |
Merge the [pgoyette-compat] branch
|
#
b12782e8 |
| 10-Jan-2019 |
christos <christos@NetBSD.org> |
handle errors from loading the syscalls and bail early. establish sysctl later.
|
#
a8a5c538 |
| 03-Sep-2018 |
riastradh <riastradh@NetBSD.org> |
Rename min/max -> uimin/uimax for better honesty.
These functions are defined on unsigned int. The generic name min/max should not silently truncate to 32 bits on 64-bit systems. This is purely a n
Rename min/max -> uimin/uimax for better honesty.
These functions are defined on unsigned int. The generic name min/max should not silently truncate to 32 bits on 64-bit systems. This is purely a name change -- no functional change intended.
HOWEVER! Some subsystems have
#define min(a, b) ((a) < (b) ? (a) : (b)) #define max(a, b) ((a) > (b) ? (a) : (b))
even though our standard name for that is MIN/MAX. Although these may invite multiple evaluation bugs, these do _not_ cause integer truncation.
To avoid `fixing' these cases, I first changed the name in libkern, and then compile-tested every file where min/max occurred in order to confirm that it failed -- and thus confirm that nothing shadowed min/max -- before changing it.
I have left a handful of bootloaders that are too annoying to compile-test, and some dead code:
cobalt ews4800mips hp300 hppa ia64 luna68k vax acorn32/if_ie.c (not included in any kernels) macppc/if_gm.c (superseded by gem(4))
It should be easy to fix the fallout once identified -- this way of doing things fails safe, and the goal here, after all, is to _avoid_ silent integer truncations, not introduce them.
Maybe one day we can reintroduce min/max as type-generic things that never silently truncate. But we should avoid doing that for a while, so that existing code has a chance to be detected by the compiler for conversion to uimin/uimax without changing the semantics until we can properly audit it all. (Who knows, maybe in some cases integer truncation is actually intended!)
show more ...
|
#
2ca54995 |
| 05-Dec-2015 |
pgoyette <pgoyette@NetBSD.org> |
When unloading the module, clear the address of the kauth_listener after removing the listener. This enables the module to (attempt to) initialize again without hitting the KASSERT() is sysvipc_init
When unloading the module, clear the address of the kauth_listener after removing the listener. This enables the module to (attempt to) initialize again without hitting the KASSERT() is sysvipc_init().
XXX This will allow standard kernels to boot successfully. However, XXX module initializtion is still broken.
show more ...
|
#
ef6316ef |
| 03-Dec-2015 |
pgoyette <pgoyette@NetBSD.org> |
Merge the compat_sysv module into the sysv_ipc module - it should never have been a separate module in the first place (my bad).
Adjust dependencies as appropriate.
|
#
5a7bb120 |
| 06-Nov-2015 |
pgoyette <pgoyette@NetBSD.org> |
In sysv_sem.c, defer establishment of exithook so we can initialize the module code from module_init() rather than waiting until after calling exec_init(). Use a RUN_ONCE routine at entry to each sy
In sysv_sem.c, defer establishment of exithook so we can initialize the module code from module_init() rather than waiting until after calling exec_init(). Use a RUN_ONCE routine at entry to each sys_sem* syscall to establish the exithook, and no longer KASSERT that the hook has been set before removing it. (A manually loaded module can be unloaded before any syscalls have been invoked.)
Remove the conditional calls to the various xxx_init() routines from init_main.c - we now rely on module_init() to handle initialization.
Let each sub-component's xxx_init() routine handle its own sysctl sub-tree initialization; this removes another set of #ifdef ugliness.
Tested both built-in and loadable versions and verified that atf test kernel/t_sysv passes.
show more ...
|
#
854ef728 |
| 06-Nov-2015 |
pgoyette <pgoyette@NetBSD.org> |
As long as we still claim to build each subcomponent separately, make sure we properly define the (sub)set of syscalls we're building.
|
#
ea8db424 |
| 13-May-2015 |
pgoyette <pgoyette@NetBSD.org> |
Create a new sysv_ipc module to contain the SYSVSHM, SYSVSEM, and SYSVMSG options. Move associated variables out of param.c and into the module's source file.
|
#
fbd526e0 |
| 13-May-2015 |
pgoyette <pgoyette@NetBSD.org> |
Another xxxfini() routine.
|
#
c0696ff1 |
| 10-May-2015 |
pgoyette <pgoyette@NetBSD.org> |
Split the SYSV* compat code out into a separate compat_sysv module.
For monolithic kernels, both modules will be compiled as "built-ins", while modular environments will be able to load the SYSVSEM,
Split the SYSV* compat code out into a separate compat_sysv module.
For monolithic kernels, both modules will be compiled as "built-ins", while modular environments will be able to load the SYSVSEM, SYSVSHM, and SYSVMSG code independant from the rest of compat.
This is a necessary precursor step to making the "STD" SYSV* code into a separate module.
Tested in both monolithic and modular environments with no errors seen.
show more ...
|
#
05fd0bf3 |
| 25-Feb-2014 |
pooka <pooka@NetBSD.org> |
Ensure that the top level sysctl nodes (kern, vfs, net, ...) exist before the sysctl link sets are processed, and remove redundancy.
Shaves >13kB off of an amd64 GENERIC, not to mention >1k duplicat
Ensure that the top level sysctl nodes (kern, vfs, net, ...) exist before the sysctl link sets are processed, and remove redundancy.
Shaves >13kB off of an amd64 GENERIC, not to mention >1k duplicate lines of code.
show more ...
|
#
bd26c726 |
| 13-Mar-2012 |
elad <elad@NetBSD.org> |
Replace the remaining KAUTH_GENERIC_ISSUSER authorization calls with something meaningful. All relevant documentation has been updated or written.
Most of these changes were brought up in the follow
Replace the remaining KAUTH_GENERIC_ISSUSER authorization calls with something meaningful. All relevant documentation has been updated or written.
Most of these changes were brought up in the following messages:
http://mail-index.netbsd.org/tech-kern/2012/01/18/msg012490.html http://mail-index.netbsd.org/tech-kern/2012/01/19/msg012502.html http://mail-index.netbsd.org/tech-kern/2012/02/17/msg012728.html
Thanks to christos, manu, njoly, and jmmv for input.
Huge thanks to pgoyette for spinning these changes through some build cycles and ATF.
show more ...
|
#
71923f26 |
| 16-Apr-2009 |
rmind <rmind@NetBSD.org> |
Replace malloc with kmem(9).
|
#
143e6033 |
| 19-Jan-2009 |
christos <christos@NetBSD.org> |
Provide compatibility for pre-christos-time_t sysv sysctls.
|
#
ce099b40 |
| 28-Apr-2008 |
martin <martin@NetBSD.org> |
Remove clause 3 and 4 from TNF licenses
|
#
b07ec3fc |
| 09-Feb-2007 |
ad <ad@NetBSD.org> |
Merge newlock2 to head.
|
#
1e70d648 |
| 04-Jan-2007 |
elad <elad@NetBSD.org> |
Consistent usage of KAUTH_GENERIC_ISSUSER.
|
#
df031f1e |
| 25-Nov-2006 |
christos <christos@NetBSD.org> |
PR/34837: Mindaguas: Add SysV SHM dynamic reallocation and locking to the physical memory
|