]> Git Repo - linux.git/commitdiff
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jmorris...
authorLinus Torvalds <[email protected]>
Tue, 21 Jan 2014 17:06:02 +0000 (09:06 -0800)
committerLinus Torvalds <[email protected]>
Tue, 21 Jan 2014 17:06:02 +0000 (09:06 -0800)
Pull security layer updates from James Morris:
 "Changes for this kernel include maintenance updates for Smack, SELinux
  (and several networking fixes), IMA and TPM"

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jmorris/linux-security: (39 commits)
  SELinux: Fix memory leak upon loading policy
  tpm/tpm-sysfs: active_show() can be static
  tpm: tpm_tis: Fix compile problems with CONFIG_PM_SLEEP/CONFIG_PNP
  tpm: Make tpm-dev allocate a per-file structure
  tpm: Use the ops structure instead of a copy in tpm_vendor_specific
  tpm: Create a tpm_class_ops structure and use it in the drivers
  tpm: Pull all driver sysfs code into tpm-sysfs.c
  tpm: Move sysfs functions from tpm-interface to tpm-sysfs
  tpm: Pull everything related to /dev/tpmX into tpm-dev.c
  char: tpm: nuvoton: remove unused variable
  tpm: MAINTAINERS: Cleanup TPM Maintainers file
  tpm/tpm_i2c_atmel: fix coccinelle warnings
  tpm/tpm_ibmvtpm: fix unreachable code warning (smatch warning)
  tpm/tpm_i2c_stm_st33: Check return code of get_burstcount
  tpm/tpm_ppi: Check return value of acpi_get_name
  tpm/tpm_ppi: Do not compare strcmp(a,b) == -1
  ima: remove unneeded size_limit argument from ima_eventdigest_init_common()
  ima: update IMA-templates.txt documentation
  ima: pass HASH_ALGO__LAST as hash algo in ima_eventdigest_init()
  ima: change the default hash algorithm to SHA1 in ima_eventdigest_ng_init()
  ...

1  2 
MAINTAINERS
drivers/char/tpm/tpm_ppi.c
security/selinux/hooks.c

diff --combined MAINTAINERS
index 88ae0eca7cd838c36be4657f46000e6fbc56e404,1d33e215e0f122426b8d138c8af0a7e38bc3b4c0..5c214024f60a8c84accdac11ff95609128e41a4e
@@@ -2619,7 -2619,7 +2619,7 @@@ S:      Maintaine
  F:    drivers/platform/x86/dell-laptop.c
  
  DELL LAPTOP SMM DRIVER
 -S:    Orphan
 +M:    Guenter Roeck <[email protected]>
  F:    drivers/char/i8k.c
  F:    include/uapi/linux/i8k.h
  
@@@ -2638,7 -2638,7 +2638,7 @@@ DESIGNWARE USB2 DRD IP DRIVE
  M:    Paul Zimmerman <[email protected]>
  L:    [email protected]
  S:    Maintained
 -F:    drivers/staging/dwc2/
 +F:    drivers/usb/dwc2/
  
  DESIGNWARE USB3 DRD IP DRIVER
  M:    Felipe Balbi <[email protected]>
@@@ -2828,10 -2828,8 +2828,10 @@@ F:    include/uapi/drm
  
  INTEL DRM DRIVERS (excluding Poulsbo, Moorestown and derivative chipsets)
  M:    Daniel Vetter <[email protected]>
 +M:    Jani Nikula <[email protected]>
  L:    [email protected]
  L:    [email protected]
 +Q:    http://patchwork.freedesktop.org/project/intel-gfx/
  T:    git git://people.freedesktop.org/~danvet/drm-intel
  S:    Supported
  F:    drivers/gpu/drm/i915/
@@@ -3335,7 -3333,6 +3335,7 @@@ EXTERNAL CONNECTOR SUBSYSTEM (EXTCON
  M:    MyungJoo Ham <[email protected]>
  M:    Chanwoo Choi <[email protected]>
  L:    [email protected]
 +T:    git git://git.kernel.org/pub/scm/linux/kernel/git/chanwoo/extcon.git
  S:    Maintained
  F:    drivers/extcon/
  F:    Documentation/extcon/
@@@ -5142,11 -5139,6 +5142,11 @@@ F:    drivers/lguest
  F:    include/linux/lguest*.h
  F:    tools/lguest/
  
 +LIBLOCKDEP
 +M:    Sasha Levin <[email protected]>
 +S:    Maintained
 +F:    tools/lib/lockdep/
 +
  LINUX FOR IBM pSERIES (RS/6000)
  M:    Paul Mackerras <[email protected]>
  W:    http://www.ibm.com/linux/ltc/projects/ppc
@@@ -7105,12 -7097,6 +7105,12 @@@ T:    git git://git.kernel.org/pub/scm/lin
  F:    Documentation/RCU/torture.txt
  F:    kernel/rcu/torture.c
  
 +RCUTORTURE TEST FRAMEWORK
 +M:    "Paul E. McKenney" <[email protected]>
 +S:    Supported
 +T:    git git://git.kernel.org/pub/scm/linux/kernel/git/paulmck/linux-rcu.git
 +F:    tools/testing/selftests/rcutorture
 +
  RDC R-321X SoC
  M:    Florian Fainelli <[email protected]>
  S:    Maintained
@@@ -8746,14 -8732,10 +8746,10 @@@ S:   Odd fixe
  F:    drivers/media/usb/tm6000/
  
  TPM DEVICE DRIVER
- M:    Leonidas Da Silva Barbosa <[email protected]>
- M:    Ashley Lai <[email protected]>
  M:    Peter Huewe <[email protected]>
- M:    Rajiv Andrade <[email protected]>
- W:    http://tpmdd.sourceforge.net
+ M:    Ashley Lai <[email protected]>
  M:    Marcel Selhorst <[email protected]>
- M:    Sirrix AG <[email protected]>
- W:    http://www.sirrix.com
+ W:    http://tpmdd.sourceforge.net
  L:    [email protected] (moderated for non-subscribers)
  S:    Maintained
  F:    drivers/char/tpm/
@@@ -9243,7 -9225,6 +9239,7 @@@ F:      include/media/videobuf2-
  
  VIRTIO CONSOLE DRIVER
  M:    Amit Shah <[email protected]>
 +L:    [email protected]
  L:    [email protected]
  S:    Maintained
  F:    drivers/char/virtio_console.c
@@@ -9253,7 -9234,6 +9249,7 @@@ F:      include/uapi/linux/virtio_console.
  VIRTIO CORE, NET AND BLOCK DRIVERS
  M:    Rusty Russell <[email protected]>
  M:    "Michael S. Tsirkin" <[email protected]>
 +L:    [email protected]
  L:    [email protected]
  S:    Maintained
  F:    drivers/virtio/
@@@ -9266,7 -9246,6 +9262,7 @@@ F:      include/uapi/linux/virtio_*.
  VIRTIO HOST (VHOST)
  M:    "Michael S. Tsirkin" <[email protected]>
  L:    [email protected]
 +L:    [email protected]
  L:    [email protected]
  L:    [email protected]
  S:    Maintained
index e1f3337a0cf9f7d7fa223a86e84282765d915108,6ac9d275b73263a942ebe61dc296bcb4ae5f6185..2db4419831be981691ee493457c9002c3d05b086
@@@ -27,18 -27,18 +27,18 @@@ static char *tpm_device_name = "TPM"
  static acpi_status ppi_callback(acpi_handle handle, u32 level, void *context,
                                void **return_value)
  {
 -      acpi_status status;
 +      acpi_status status = AE_OK;
        struct acpi_buffer buffer = { ACPI_ALLOCATE_BUFFER, NULL };
 -      status = acpi_get_name(handle, ACPI_FULL_PATHNAME, &buffer);
 -      if (ACPI_FAILURE(status))
 -              return status;
  
 -      if (strstr(buffer.pointer, context) != NULL) {
 -              *return_value = handle;
 +      if (ACPI_SUCCESS(acpi_get_name(handle, ACPI_FULL_PATHNAME, &buffer))) {
 +              if (strstr(buffer.pointer, context) != NULL) {
 +                      *return_value = handle;
 +                      status = AE_CTRL_TERMINATE;
 +              }
                kfree(buffer.pointer);
 -              return AE_CTRL_TERMINATE;
        }
 -      return AE_OK;
 +
 +      return status;
  }
  
  static inline void ppi_assign_params(union acpi_object params[4],
@@@ -172,7 -172,7 +172,7 @@@ static ssize_t tpm_store_ppi_request(st
         * is updated with function index from SUBREQ to SUBREQ2 since PPI
         * version 1.1
         */
-       if (strcmp(version, "1.1") == -1)
+       if (strcmp(version, "1.1") < 0)
                params[2].integer.value = TPM_PPI_FN_SUBREQ;
        else
                params[2].integer.value = TPM_PPI_FN_SUBREQ2;
         * string/package type. For PPI version 1.0 and 1.1, use buffer type
         * for compatibility, and use package type since 1.2 according to spec.
         */
-       if (strcmp(version, "1.2") == -1) {
+       if (strcmp(version, "1.2") < 0) {
                params[3].type = ACPI_TYPE_BUFFER;
                params[3].buffer.length = sizeof(req);
                sscanf(buf, "%d", &req);
@@@ -248,7 -248,7 +248,7 @@@ static ssize_t tpm_show_ppi_transition_
         * (e.g. Capella with PPI 1.0) need integer/string/buffer type, so for
         * compatibility, define params[3].type as buffer, if PPI version < 1.2
         */
-       if (strcmp(version, "1.2") == -1) {
+       if (strcmp(version, "1.2") < 0) {
                params[3].type = ACPI_TYPE_BUFFER;
                params[3].buffer.length =  0;
                params[3].buffer.pointer = NULL;
@@@ -390,7 -390,7 +390,7 @@@ static ssize_t show_ppi_operations(cha
        kfree(output.pointer);
        output.length = ACPI_ALLOCATE_BUFFER;
        output.pointer = NULL;
-       if (strcmp(version, "1.2") == -1)
+       if (strcmp(version, "1.2") < 0)
                return -EPERM;
  
        params[2].integer.value = TPM_PPI_FN_GETOPR;
diff --combined security/selinux/hooks.c
index 57b0b49f4e6e23a9c6dd974e3f9dd78664f1f59a,3219560f9fae17598dde8bc70285f2fb1846e63a..4b34847208cc9690284e9e7c7b6f9a960cfbead3
@@@ -82,7 -82,6 +82,6 @@@
  #include <linux/syslog.h>
  #include <linux/user_namespace.h>
  #include <linux/export.h>
- #include <linux/security.h>
  #include <linux/msg.h>
  #include <linux/shm.h>
  
@@@ -234,14 -233,6 +233,14 @@@ static int inode_alloc_security(struct 
        return 0;
  }
  
 +static void inode_free_rcu(struct rcu_head *head)
 +{
 +      struct inode_security_struct *isec;
 +
 +      isec = container_of(head, struct inode_security_struct, rcu);
 +      kmem_cache_free(sel_inode_cache, isec);
 +}
 +
  static void inode_free_security(struct inode *inode)
  {
        struct inode_security_struct *isec = inode->i_security;
                list_del_init(&isec->list);
        spin_unlock(&sbsec->isec_lock);
  
 -      inode->i_security = NULL;
 -      kmem_cache_free(sel_inode_cache, isec);
 +      /*
 +       * The inode may still be referenced in a path walk and
 +       * a call to selinux_inode_permission() can be made
 +       * after inode_free_security() is called. Ideally, the VFS
 +       * wouldn't do this, but fixing that is a much harder
 +       * job. For now, simply free the i_security via RCU, and
 +       * leave the current inode->i_security pointer intact.
 +       * The inode will be freed after the RCU grace period too.
 +       */
 +      call_rcu(&isec->rcu, inode_free_rcu);
  }
  
  static int file_alloc_security(struct file *file)
@@@ -4490,14 -4473,10 +4489,10 @@@ static int selinux_inet_conn_request(st
  {
        struct sk_security_struct *sksec = sk->sk_security;
        int err;
-       u16 family = sk->sk_family;
+       u16 family = req->rsk_ops->family;
        u32 connsid;
        u32 peersid;
  
-       /* handle mapped IPv4 packets arriving via IPv6 sockets */
-       if (family == PF_INET6 && skb->protocol == htons(ETH_P_IP))
-               family = PF_INET;
        err = selinux_skb_peerlbl_sid(skb, family, &peersid);
        if (err)
                return err;
This page took 0.103006 seconds and 4 git commands to generate.