cvs commit: src/sys/kern kern_malloc.c src/sys/sys malloc.h src/sys/vm memguard.c memguard.h

Pawel Jakub Dawidek pjd at FreeBSD.org
Fri Dec 30 05:42:27 PST 2005


On Fri, Dec 30, 2005 at 08:15:56AM -0500, John Baldwin wrote:
+> On Friday 30 December 2005 06:45 am, Pawel Jakub Dawidek wrote:
+> > pjd         2005-12-30 11:45:07 UTC
+> >
+> >   FreeBSD src repository
+> >
+> >   Modified files:
+> >     sys/kern             kern_malloc.c
+> >     sys/sys              malloc.h
+> >     sys/vm               memguard.c memguard.h
+> >   Log:
+> >   Improve memguard a bit:
+> >   - Provide tunable vm.memguard.desc, so one can specify memory type
+> > without changing the code and recompiling the kernel.
+> >   - Allow to use memguard for kernel modules by providing sysctl
+> >     vm.memguard.desc, which can be changed to short description of memory
+> >     type before module is loaded.
+> 
+> You don't actually need a sysctl for this case.  You can use kenv to set a 
+> tunable after boot but before loading the module to achieve the same purpose.  
+> E.g.  'kenv vm.memguard.desc=FOO' will work and TUNABLE_FETCH will find it 
+> during a subsequent kldload.  Just FYI.

But I need to control vm.memguard.desc change to be able to detect if
memory type has allocated memory already, etc. and eventually deny the
change.
AFAIK it won't be possible with kenv.

-- 
Pawel Jakub Dawidek                       http://www.wheel.pl
pjd at FreeBSD.org                           http://www.FreeBSD.org
FreeBSD committer                         Am I Evil? Yes, I Am!
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 187 bytes
Desc: not available
Url : http://lists.freebsd.org/pipermail/cvs-src/attachments/20051230/51378009/attachment.bin


More information about the cvs-src mailing list