Source-Changes archive

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

CVS commit: src/sys/kern



Module Name:    src
Committed By:   riastradh
Date:           Sat Sep 11 10:09:31 UTC 2021

Modified Files:
        src/sys/kern: kern_ksyms.c

Log Message:
ksyms(4): Take a complete snapshot on each open.

- Snapshots are stored in pageable anonymous uvm objects.
- Snapshots are reference-counted so they can be reused across opens.
- Opening /dev/ksyms blocks module unload until snapshot is taken.
- Merely holding /dev/ksyms open does not block module unload.
- /dev/ksyms is now mmappable.

This slightly changes the behaviour of fstat(2) on /dev/ksyms -- it
is a little more useful now!  In particular, st_size is the size of
the symbol table.  Some other fields which were not very useful to
begin with -- st_dev, st_ino, st_mode, st_nlink, st_*time,
st_blksize, st_blocks -- are now different, and independent of the
file system on which the device node resides.

Discussed in

https://mail-index.netbsd.org/source-changes-d/2021/08/17/msg013425.html

This is option (3), adapted to make the ksyms snapshots pageable,
after options (1) and (2) posed practical problems.


To generate a diff of this commit:
cvs rdiff -u -r1.102 -r1.103 src/sys/kern/kern_ksyms.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.




Home | Main Index | Thread Index | Old Index