Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 11 Nov 2003 19:14:32 -0800 (PST)
From:      Robert Watson <rwatson@FreeBSD.org>
To:        src-committers@FreeBSD.org, cvs-src@FreeBSD.org, cvs-all@FreeBSD.org
Subject:   cvs commit: src/sys/conf files src/sys/fs/devfs devfs.h src/sys/kern kern_exec.c kern_mac.c src/sys/net bpfdesc.h if_var.h src/sys/netinet ip_var.h src/sys/security/mac mac_internal.h mac_label.c mac_net.c mac_pipe.c mac_process.c mac_system.c ...
Message-ID:  <200311120314.hAC3EWf8030528@repoman.freebsd.org>

next in thread | raw e-mail | index | archive | help
rwatson     2003/11/11 19:14:32 PST

  FreeBSD src repository

  Modified files:
    sys/conf             files 
    sys/fs/devfs         devfs.h 
    sys/kern             kern_exec.c kern_mac.c 
    sys/net              bpfdesc.h if_var.h 
    sys/netinet          ip_var.h 
    sys/security/mac     mac_internal.h mac_net.c mac_pipe.c 
                         mac_process.c mac_system.c mac_vfs.c 
    sys/security/mac_biba mac_biba.c 
    sys/security/mac_lomac mac_lomac.c 
    sys/security/mac_mls mac_mls.c 
    sys/security/mac_partition mac_partition.c 
    sys/security/mac_test mac_test.c 
    sys/sys              mac.h mount.h pipe.h proc.h socketvar.h 
                         ucred.h vnode.h 
  Added files:
    sys/security/mac     mac_label.c 
  Log:
  Modify the MAC Framework so that instead of embedding a (struct label)
  in various kernel objects to represent security data, we embed a
  (struct label *) pointer, which now references labels allocated using
  a UMA zone (mac_label.c).  This allows the size and shape of struct
  label to be varied without changing the size and shape of these kernel
  objects, which become part of the frozen ABI with 5-STABLE.  This opens
  the door for boot-time selection of the number of label slots, and hence
  changes to the bound on the number of simultaneous labeled policies
  at boot-time instead of compile-time.  This also makes it easier to
  embed label references in new objects as required for locking/caching
  with fine-grained network stack locking, such as inpcb structures.
  
  This change also moves us further in the direction of hiding the
  structure of kernel objects from MAC policy modules, not to mention
  dramatically reducing the number of '&' symbols appearing in both the
  MAC Framework and MAC policy modules, and improving readability.
  
  While this results in minimal performance change with MAC enabled, it
  will observably shrink the size of a number of critical kernel data
  structures for the !MAC case, and should have a small (but measurable)
  performance benefit (i.e., struct vnode, struct socket) do to memory
  conservation and reduced cost of zeroing memory.
  
  NOTE: Users of MAC must recompile their kernel and all MAC modules as a
  result of this change.  Because this is an API change, third party
  MAC modules will also need to be updated to make less use of the '&'
  symbol.
  
  Suggestions from:       bmilekic
  Obtained from:          TrustedBSD Project
  Sponsored by:           DARPA, Network Associates Laboratories
  
  Revision  Changes    Path
  1.849     +1 -0      src/sys/conf/files
  1.18      +1 -1      src/sys/fs/devfs/devfs.h
  1.232     +11 -13    src/sys/kern/kern_exec.c
  1.105     +57 -62    src/sys/kern/kern_mac.c
  1.24      +1 -2      src/sys/net/bpfdesc.h
  1.62      +1 -2      src/sys/net/if_var.h
  1.79      +1 -5      src/sys/netinet/ip_var.h
  1.106     +9 -5      src/sys/security/mac/mac_internal.h
  1.1       +97 -0     src/sys/security/mac/mac_label.c (new)
  1.105     +155 -104  src/sys/security/mac/mac_net.c
  1.104     +11 -14    src/sys/security/mac/mac_pipe.c
  1.104     +43 -21    src/sys/security/mac/mac_process.c
  1.102     +4 -4      src/sys/security/mac/mac_system.c
  1.104     +139 -83   src/sys/security/mac/mac_vfs.c
  1.66      +68 -68    src/sys/security/mac_biba/mac_biba.c
  1.21      +56 -56    src/sys/security/mac_lomac/mac_lomac.c
  1.53      +61 -61    src/sys/security/mac_mls/mac_mls.c
  1.8       +9 -9      src/sys/security/mac_partition/mac_partition.c
  1.32      +91 -91    src/sys/security/mac_test/mac_test.c
  1.47      +7 -4      src/sys/sys/mac.h
  1.151     +2 -3      src/sys/sys/mount.h
  1.25      +0 -1      src/sys/sys/pipe.h
  1.358     +1 -2      src/sys/sys/proc.h
  1.107     +2 -3      src/sys/sys/socketvar.h
  1.47      +1 -2      src/sys/sys/ucred.h
  1.230     +1 -2      src/sys/sys/vnode.h



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200311120314.hAC3EWf8030528>