On Tue, Jan 18, 2011 at 11:00:22PM +0000, Konstantin Belousov wrote: > Author: kib > Date: Tue Jan 18 23:00:22 2011 > New Revision: 217564 > URL: http://svn.freebsd.org/changeset/base/217564 > > Log: > Make the length of the LDT a loader tunable, machdep.max_ldt_segment, > and export it with read-only sysctl. Remove unused defines. > > Reviewed by: jhb (previous version) > MFC after: 1 week > > Modified: > head/sys/amd64/amd64/sys_machdep.c > > Modified: head/sys/amd64/amd64/sys_machdep.c > ============================================================================== > --- head/sys/amd64/amd64/sys_machdep.c Tue Jan 18 22:56:10 2011 > (r217563) > +++ head/sys/amd64/amd64/sys_machdep.c Tue Jan 18 23:00:22 2011 > (r217564) > @@ -35,6 +35,7 @@ __FBSDID("$FreeBSD$"); > > #include <sys/param.h> > #include <sys/systm.h> > +#include <sys/kernel.h> > #include <sys/lock.h> > #include <sys/malloc.h> > #include <sys/mutex.h> > @@ -58,9 +59,24 @@ __FBSDID("$FreeBSD$"); > > #include <security/audit/audit.h> > > +#define MAX_LD 8192 > + > int max_ldt_segment = 1024; > -#define LD_PER_PAGE 512 > -#define NULL_LDT_BASE ((caddr_t)NULL) > +SYSCTL_INT(_machdep, OID_AUTO, max_ldt_segment, CTLFLAG_RD, &max_ldt_segment,
Please, use CTLFLAG_RDTUN if tunable also exist. -- Pawel Jakub Dawidek http://www.wheelsystems.com p...@freebsd.org http://www.FreeBSD.org FreeBSD committer Am I Evil? Yes, I Am!
pgpTYIuv48kVy.pgp
Description: PGP signature