19 Oct, 2016

1 commit


27 Sep, 2016

2 commits


30 Jul, 2016

1 commit

  • Pull security subsystem updates from James Morris:
    "Highlights:

    - TPM core and driver updates/fixes
    - IPv6 security labeling (CALIPSO)
    - Lots of Apparmor fixes
    - Seccomp: remove 2-phase API, close hole where ptrace can change
    syscall #"

    * 'next' of git://git.kernel.org/pub/scm/linux/kernel/git/jmorris/linux-security: (156 commits)
    apparmor: fix SECURITY_APPARMOR_HASH_DEFAULT parameter handling
    tpm: Add TPM 2.0 support to the Nuvoton i2c driver (NPCT6xx family)
    tpm: Factor out common startup code
    tpm: use devm_add_action_or_reset
    tpm2_i2c_nuvoton: add irq validity check
    tpm: read burstcount from TPM_STS in one 32-bit transaction
    tpm: fix byte-order for the value read by tpm2_get_tpm_pt
    tpm_tis_core: convert max timeouts from msec to jiffies
    apparmor: fix arg_size computation for when setprocattr is null terminated
    apparmor: fix oops, validate buffer size in apparmor_setprocattr()
    apparmor: do not expose kernel stack
    apparmor: fix module parameters can be changed after policy is locked
    apparmor: fix oops in profile_unpack() when policy_db is not present
    apparmor: don't check for vmalloc_addr if kvzalloc() failed
    apparmor: add missing id bounds check on dfa verification
    apparmor: allow SYS_CAP_RESOURCE to be sufficient to prlimit another task
    apparmor: use list_next_entry instead of list_entry_next
    apparmor: fix refcount race when finding a child profile
    apparmor: fix ref count leak when profile sha1 hash is read
    apparmor: check that xindex is in trans_table bounds
    ...

    Linus Torvalds
     

11 Jun, 2016

1 commit

  • We always mixed in the parent pointer into the dentry name hash, but we
    did it late at lookup time. It turns out that we can simplify that
    lookup-time action by salting the hash with the parent pointer early
    instead of late.

    A few other users of our string hashes also wanted to mix in their own
    pointers into the hash, and those are updated to use the same mechanism.

    Hash users that don't have any particular initial salt can just use the
    NULL pointer as a no-salt.

    Cc: Vegard Nossum
    Cc: George Spelvin
    Cc: Al Viro
    Signed-off-by: Linus Torvalds

    Linus Torvalds
     

06 Jun, 2016

1 commit


28 Mar, 2016

10 commits


16 Feb, 2016

1 commit

  • For protection keys, we need to understand whether protections
    should be enforced in software or not. In general, we enforce
    protections when working on our own task, but not when on others.
    We call these "current" and "remote" operations.

    This patch introduces a new get_user_pages() variant:

    get_user_pages_remote()

    Which is a replacement for when get_user_pages() is called on
    non-current tsk/mm.

    We also introduce a new gup flag: FOLL_REMOTE which can be used
    for the "__" gup variants to get this new behavior.

    The uprobes is_trap_at_addr() location holds mmap_sem and
    calls get_user_pages(current->mm) on an instruction address. This
    makes it a pretty unique gup caller. Being an instruction access
    and also really originating from the kernel (vs. the app), I opted
    to consider this a 'remote' access where protection keys will not
    be enforced.

    Without protection keys, this patch should not change any behavior.

    Signed-off-by: Dave Hansen
    Reviewed-by: Thomas Gleixner
    Cc: Andrea Arcangeli
    Cc: Andrew Morton
    Cc: Andy Lutomirski
    Cc: Borislav Petkov
    Cc: Brian Gerst
    Cc: Dave Hansen
    Cc: Denys Vlasenko
    Cc: H. Peter Anvin
    Cc: Kirill A. Shutemov
    Cc: Linus Torvalds
    Cc: Naoya Horiguchi
    Cc: Peter Zijlstra
    Cc: Rik van Riel
    Cc: Srikar Dronamraju
    Cc: Vlastimil Babka
    Cc: jack@suse.cz
    Cc: linux-mm@kvack.org
    Link: http://lkml.kernel.org/r/20160212210154.3F0E51EA@viggo.jf.intel.com
    Signed-off-by: Ingo Molnar

    Dave Hansen
     

04 Jan, 2016

1 commit


12 May, 2015

3 commits

  • Instead of using a vector of security operations
    with explicit, special case stacking of the capability
    and yama hooks use lists of hooks with capability and
    yama hooks included as appropriate.

    The security_operations structure is no longer required.
    Instead, there is a union of the function pointers that
    allows all the hooks lists to use a common mechanism for
    list management while retaining typing. Each module
    supplies an array describing the hooks it provides instead
    of a sparsely populated security_operations structure.
    The description includes the element that gets put on
    the hook list, avoiding the issues surrounding individual
    element allocation.

    The method for registering security modules is changed to
    reflect the information available. The method for removing
    a module, currently only used by SELinux, has also changed.
    It should be generic now, however if there are potential
    race conditions based on ordering of hook removal that needs
    to be addressed by the calling module.

    The security hooks are called from the lists and the first
    failure is returned.

    Signed-off-by: Casey Schaufler
    Acked-by: John Johansen
    Acked-by: Kees Cook
    Acked-by: Paul Moore
    Acked-by: Stephen Smalley
    Acked-by: Tetsuo Handa
    Signed-off-by: James Morris

    Casey Schaufler
     
  • Add a list header for each security hook. They aren't used until
    later in the patch series. They are grouped together in a structure
    so that there doesn't need to be an external address for each.

    Macro-ize the initialization of the security_operations
    for each security module in anticipation of changing out
    the security_operations structure.

    Signed-off-by: Casey Schaufler
    Acked-by: John Johansen
    Acked-by: Kees Cook
    Acked-by: Paul Moore
    Acked-by: Stephen Smalley
    Acked-by: Tetsuo Handa
    Signed-off-by: James Morris

    Casey Schaufler
     
  • The security.h header file serves two purposes,
    interfaces for users of the security modules and
    interfaces for security modules. Users of the
    security modules don't need to know about what's
    in the security_operations structure, so pull it
    out into it's own header, lsm_hooks.h

    Signed-off-by: Casey Schaufler
    Acked-by: John Johansen
    Acked-by: Kees Cook
    Acked-by: Paul Moore
    Acked-by: Stephen Smalley
    Acked-by: Tetsuo Handa
    Signed-off-by: James Morris

    Casey Schaufler
     

27 Apr, 2015

1 commit

  • Pull fourth vfs update from Al Viro:
    "d_inode() annotations from David Howells (sat in for-next since before
    the beginning of merge window) + four assorted fixes"

    * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs:
    RCU pathwalk breakage when running into a symlink overmounting something
    fix I_DIO_WAKEUP definition
    direct-io: only inc/dec inode->i_dio_count for file systems
    fs/9p: fix readdir()
    VFS: assorted d_backing_inode() annotations
    VFS: fs/inode.c helpers: d_inode() annotations
    VFS: fs/cachefiles: d_backing_inode() annotations
    VFS: fs library helpers: d_inode() annotations
    VFS: assorted weird filesystems: d_inode() annotations
    VFS: normal filesystems (and lustre): d_inode() annotations
    VFS: security/: d_inode() annotations
    VFS: security/: d_backing_inode() annotations
    VFS: net/: d_inode() annotations
    VFS: net/unix: d_backing_inode() annotations
    VFS: kernel/: d_inode() annotations
    VFS: audit: d_backing_inode() annotations
    VFS: Fix up some ->d_inode accesses in the chelsio driver
    VFS: Cachefiles should perform fs modifications on the top layer only
    VFS: AF_UNIX sockets should call mknod on the top layer only

    Linus Torvalds
     

17 Apr, 2015

1 commit

  • The mm->exe_file is currently serialized with mmap_sem (shared) in order
    to both safely (1) read the file and (2) compute the realpath by calling
    tomoyo_realpath_from_path, making it an absolute overkill. Good users
    will, on the other hand, make use of the more standard get_mm_exe_file(),
    requiring only holding the mmap_sem to read the value, and relying on
    reference

    [akpm@linux-foundation.org: coding-style fixes]
    Signed-off-by: Davidlohr Bueso
    Acked-by: Tetsuo Handa
    Cc: James Morris
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Davidlohr Bueso
     

16 Apr, 2015

2 commits

  • most of the ->d_inode uses there refer to the same inode IO would
    go to, i.e. d_backing_inode()

    Signed-off-by: David Howells
    Signed-off-by: Al Viro

    David Howells
     
  • Pull security subsystem updates from James Morris:
    "Highlights for this window:

    - improved AVC hashing for SELinux by John Brooks and Stephen Smalley

    - addition of an unconfined label to Smack

    - Smack documentation update

    - TPM driver updates"

    * 'next' of git://git.kernel.org/pub/scm/linux/kernel/git/jmorris/linux-security: (28 commits)
    lsm: copy comm before calling audit_log to avoid race in string printing
    tomoyo: Do not generate empty policy files
    tomoyo: Use if_changed when generating builtin-policy.h
    tomoyo: Use bin2c to generate builtin-policy.h
    selinux: increase avtab max buckets
    selinux: Use a better hash function for avtab
    selinux: convert avtab hash table to flex_array
    selinux: reconcile security_netlbl_secattr_to_sid() and mls_import_netlbl_cat()
    selinux: remove unnecessary pointer reassignment
    Smack: Updates for Smack documentation
    tpm/st33zp24/spi: Add missing device table for spi phy.
    tpm/st33zp24: Add proper wait for ordinal duration in case of irq mode
    smack: Fix gcc warning from unused smack_syslog_lock mutex in smackfs.c
    Smack: Allow an unconfined label in bringup mode
    Smack: getting the Smack security context of keys
    Smack: Assign smack_known_web as default smk_in label for kernel thread's socket
    tpm/tpm_infineon: Use struct dev_pm_ops for power management
    MAINTAINERS: Add Jason as designated reviewer for TPM
    tpm: Update KConfig text to include TPM2.0 FIFO chips
    tpm/st33zp24/dts/st33zp24-spi: Add dts documentation for st33zp24 spi phy
    ...

    Linus Torvalds
     

12 Apr, 2015

2 commits


08 Apr, 2015

3 commits

  • The Makefile automatically generates the tomoyo policy files, which are
    not removed by make clean (because they could have been provided by the
    user). Instead of generating the missing files, use /dev/null if a
    given file is not provided. Store the default exception_policy in
    exception_policy.conf.default.

    Acked-by: Tetsuo Handa
    Signed-off-by: Michal Marek

    Michal Marek
     
  • Combine the generation of builtin-policy.h into a single command and use
    if_changed, so that the file is regenerated each time the command
    changes. The next patch will make use of this.

    Acked-by: Tetsuo Handa
    Signed-off-by: Michal Marek

    Michal Marek
     
  • Simplify the Makefile by using a readily available tool instead of a
    custom sed script. The downside is that builtin-policy.h becomes
    unreadable for humans, but it is only a generated file.

    Acked-by: Tetsuo Handa
    Signed-off-by: Michal Marek

    Michal Marek
     

23 Feb, 2015

1 commit


07 Jan, 2015

1 commit

  • SRCU is not necessary to be compiled by default in all cases. For tinification
    efforts not compiling SRCU unless necessary is desirable.

    The current patch tries to make compiling SRCU optional by introducing a new
    Kconfig option CONFIG_SRCU which is selected when any of the components making
    use of SRCU are selected.

    If we do not select CONFIG_SRCU, srcu.o will not be compiled at all.

    text data bss dec hex filename
    2007 0 0 2007 7d7 kernel/rcu/srcu.o

    Size of arch/powerpc/boot/zImage changes from

    text data bss dec hex filename
    831552 64180 23944 919676 e087c arch/powerpc/boot/zImage : before
    829504 64180 23952 917636 e0084 arch/powerpc/boot/zImage : after

    so the savings are about ~2000 bytes.

    Signed-off-by: Pranith Kumar
    CC: Paul E. McKenney
    CC: Josh Triplett
    CC: Lai Jiangshan
    Signed-off-by: Paul E. McKenney
    [ paulmck: resolve conflict due to removal of arch/ia64/kvm/Kconfig. ]

    Pranith Kumar
     

27 Aug, 2014

1 commit

  • Commit 7177a9c4b509 ("fs: call rename2 if exists") changed
    "struct inode_operations"->rename == NULL if
    "struct inode_operations"->rename2 != NULL .

    TOMOYO needs to check for both ->rename and ->rename2 , or
    a system on (e.g.) ext4 filesystem won't boot.

    Signed-off-by: Tetsuo Handa
    Signed-off-by: Serge E. Hallyn

    Tetsuo Handa
     

12 Jun, 2014

1 commit

  • There is no point in calling gettimeofday if only the seconds part of
    the timespec is used. Use get_seconds() instead. It's not only the
    proper interface it's also faster.

    Signed-off-by: Thomas Gleixner
    Acked-by: Tetsuo Handa
    Cc: John Stultz
    Cc: Peter Zijlstra
    Cc: Kentaro Takeda
    Cc: linux-security-module@vger.kernel.org
    Link: http://lkml.kernel.org/r/20140611234607.775273584@linutronix.de

    Thomas Gleixner
     

02 Apr, 2014

1 commit


02 May, 2013

1 commit

  • Pull VFS updates from Al Viro,

    Misc cleanups all over the place, mainly wrt /proc interfaces (switch
    create_proc_entry to proc_create(), get rid of the deprecated
    create_proc_read_entry() in favor of using proc_create_data() and
    seq_file etc).

    7kloc removed.

    * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs: (204 commits)
    don't bother with deferred freeing of fdtables
    proc: Move non-public stuff from linux/proc_fs.h to fs/proc/internal.h
    proc: Make the PROC_I() and PDE() macros internal to procfs
    proc: Supply a function to remove a proc entry by PDE
    take cgroup_open() and cpuset_open() to fs/proc/base.c
    ppc: Clean up scanlog
    ppc: Clean up rtas_flash driver somewhat
    hostap: proc: Use remove_proc_subtree()
    drm: proc: Use remove_proc_subtree()
    drm: proc: Use minor->index to label things, not PDE->name
    drm: Constify drm_proc_list[]
    zoran: Don't print proc_dir_entry data in debug
    reiserfs: Don't access the proc_dir_entry in r_open(), r_start() r_show()
    proc: Supply an accessor for getting the data from a PDE's parent
    airo: Use remove_proc_subtree()
    rtl8192u: Don't need to save device proc dir PDE
    rtl8187se: Use a dir under /proc/net/r8180/
    proc: Add proc_mkdir_data()
    proc: Move some bits from linux/proc_fs.h to linux/{of.h,signal.h,tty.h}
    proc: Move PDE_NET() to fs/proc/proc_net.c
    ...

    Linus Torvalds
     

30 Apr, 2013

1 commit


18 Mar, 2013

1 commit


23 Feb, 2013

1 commit


12 Oct, 2012

1 commit