Source-Changes-D archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: CVS commit: src/sys



> Date: Wed, 6 Oct 2021 17:44:22 +0200
> From: Reinoud Zandijk <reinoud%NetBSD.org@localhost>
> 
> Sorry for my ignorance but I thought that the ksyms list was static? ie
> read-only? Or is this change to support kernel modules symbols too and thus
> need rw access control?

The main kernel's symbols don't change, but the whole ksyms object
consists of the main kernel's symbol table and every module's symbol
table, which changes every time a module is loaded or unloaded.  This
has been the case ever since ksyms was first introduced in 2003.

Previously callers in the kernel getting at ksyms were required to
hold ksyms_lock, or have all other CPUs quiescent like in ddb, or,
realistically, just pray no modules get loaded or unloaded.  Now they
can do it reliably and scalably in a pserialize read section.


Home | Main Index | Thread Index | Old Index