29 Jan, 2013

1 commit

  • Pull networking updates from David Miller:
    "Much more accumulated than I would have liked due to an unexpected
    bout with a nasty flu:

    1) AH and ESP input don't set ECN field correctly because the
    transport head of the SKB isn't set correctly, fix from Li
    RongQing.

    2) If netfilter conntrack zones are disabled, we can return an
    uninitialized variable instead of the proper error code. Fix from
    Borislav Petkov.

    3) Fix double SKB free in ath9k driver beacon handling, from Felix
    Feitkau.

    4) Remove bogus assumption about netns cleanup ordering in
    nf_conntrack, from Pablo Neira Ayuso.

    5) Remove a bogus BUG_ON in the new TCP fastopen code, from Eric
    Dumazet. It uses spin_is_locked() in it's test and is therefore
    unsuitable for UP.

    6) Fix SELINUX labelling regressions added by the tuntap multiqueue
    changes, from Paul Moore.

    7) Fix CRC errors with jumbo frame receive in tg3 driver, from Nithin
    Nayak Sujir.

    8) CXGB4 driver sets interrupt coalescing parameters only on first
    queue, rather than all of them. Fix from Thadeu Lima de Souza
    Cascardo.

    9) Fix regression in the dispatch of read/write registers in dm9601
    driver, from Tushar Behera.

    10) ipv6_append_data miscalculates header length, from Romain KUNTZ.

    11) Fix PMTU handling regressions on ipv4 routes, from Steffen
    Klassert, Timo Teräs, and Julian Anastasov.

    12) In 3c574_cs driver, add necessary parenthesis to "x << y & z"
    expression. From Nickolai Zeldovich.

    13) macvlan_get_size() causes underallocation netlink message space,
    fix from Eric Dumazet.

    14) Avoid division by zero in xfrm_replay_advance_bmp(), from Nickolai
    Zeldovich. Amusingly the zero check was already there, we were
    just performing it after the modulus :-)

    15) Some more splice bug fixes from Eric Dumazet, which fix things
    mostly eminating from how we now more aggressively use high-order
    pages in SKBs.

    16) Fix size calculation bug when freeing hash tables in the IPSEC
    xfrm code, from Michal Kubecek.

    17) Fix PMTU event propagation into socket cached routes, from Steffen
    Klassert.

    18) Fix off by one in TX buffer release in netxen driver, from Eric
    Dumazet.

    19) Fix rediculous memory allocation requirements introduced by the
    tuntap multiqueue changes, from Jason Wang.

    20) Remove bogus AMD platform workaround in r8169 driver that causes
    major problems in normal operation, from Timo Teräs.

    21) virtio-net set affinity and select queue don't handle
    discontiguous cpu numbers properly, fix from Wanlong Gao.

    22) Fix a route refcounting issue in loopback driver, from Eric
    Dumazet. There's a similar fix coming that we might add to the
    macvlan driver as well.

    23) Fix SKB leaks in batman-adv's distributed arp table code, from
    Matthias Schiffer.

    24) r8169 driver gives descriptor ownership back the hardware before
    we're done reading the VLAN tag out of it, fix from Francois
    Romieu.

    25) Checksums not calculated properly in GRE tunnel driver fix from
    Pravin B Shelar.

    26) Fix SCTP memory leak on namespace exit."

    * git://git.kernel.org/pub/scm/linux/kernel/git/davem/net: (101 commits)
    dm9601: support dm9620 variant
    SCTP: Free the per-net sysctl table on net exit. v2
    net: phy: icplus: fix broken INTR pin settings
    net: phy: icplus: Use the RGMII interface mode to configure clock delays
    IP_GRE: Fix kernel panic in IP_GRE with GRE csum.
    sctp: set association state to established in dupcook_a handler
    ip6mr: limit IPv6 MRT_TABLE identifiers
    r8169: fix vlan tag read ordering.
    net: cdc_ncm: use IAD provided by the USB core
    batman-adv: filter ARP packets with invalid MAC addresses in DAT
    batman-adv: check for more types of invalid IP addresses in DAT
    batman-adv: fix skb leak in batadv_dat_snoop_incoming_arp_reply()
    net: loopback: fix a dst refcounting issue
    virtio-net: reset virtqueue affinity when doing cpu hotplug
    virtio-net: split out clean affinity function
    virtio-net: fix the set affinity bug when CPU IDs are not consecutive
    can: pch_can: fix invalid error codes
    can: ti_hecc: fix invalid error codes
    can: c_can: fix invalid error codes
    r8169: remove the obsolete and incorrect AMD workaround
    ...

    Linus Torvalds
     

21 Jan, 2013

2 commits

  • devcgroup_css_free() calls dev_exception_clean() without the devcgroup_mutex being locked.

    Shutting down a kvm virt was giving me the following trace:

    [36280.732764] ------------[ cut here ]------------
    [36280.732778] WARNING: at /home/snits/dev/linux/security/device_cgroup.c:172 dev_exception_clean+0xa9/0xc0()
    [36280.732782] Hardware name: Studio XPS 8100
    [36280.732785] Modules linked in: xt_REDIRECT fuse ebtable_nat ebtables ipt_MASQUERADE iptable_nat nf_nat_ipv4 nf_nat xt_CHECKSUM iptable_mangle bridge stp llc nf_conntrack_ipv4 ip6t_REJECT nf_conntrack_ipv6 nf_defrag_ipv6 nf_defrag_ipv4 ip6table_filter it87 hwmon_vid xt_state nf_conntrack ip6_tables snd_hda_codec_hdmi snd_hda_codec_realtek snd_hda_intel snd_hda_codec snd_hwdep snd_seq coretemp snd_seq_device crc32c_intel snd_pcm snd_page_alloc snd_timer snd broadcom tg3 serio_raw i7core_edac edac_core ptp pps_core lpc_ich pcspkr mfd_core soundcore microcode i2c_i801 nfsd auth_rpcgss nfs_acl lockd vhost_net sunrpc tun macvtap macvlan kvm_intel kvm uinput binfmt_misc autofs4 usb_storage firewire_ohci firewire_core crc_itu_t radeon drm_kms_helper ttm
    [36280.732921] Pid: 933, comm: libvirtd Tainted: G W 3.8.0-rc3-00307-g4c217de #1
    [36280.732922] Call Trace:
    [36280.732927] [] warn_slowpath_common+0x93/0xc0
    [36280.732930] [] warn_slowpath_null+0x1a/0x20
    [36280.732932] [] dev_exception_clean+0xa9/0xc0
    [36280.732934] [] devcgroup_css_free+0x1a/0x30
    [36280.732938] [] cgroup_diput+0x76/0x210
    [36280.732941] [] d_delete+0x120/0x180
    [36280.732943] [] vfs_rmdir+0xef/0x130
    [36280.732945] [] do_rmdir+0x107/0x1c0
    [36280.732949] [] ? trace_hardirqs_on_thunk+0x3a/0x3f
    [36280.732951] [] sys_rmdir+0x16/0x20
    [36280.732954] [] system_call_fastpath+0x16/0x1b
    [36280.732956] ---[ end trace ca39dced899a7d9f ]---

    Signed-off-by: Jerry Snitselaar
    Cc: stable@kernel.org
    Signed-off-by: James Morris

    Jerry Snitselaar
     
  • The following lines of code produce a kernel oops.

    fd = socket(PF_FILE, SOCK_STREAM|SOCK_CLOEXEC|SOCK_NONBLOCK, 0);
    fchmod(fd, 0666);

    [ 139.922364] BUG: unable to handle kernel NULL pointer dereference at (null)
    [ 139.924982] IP: [< (null)>] (null)
    [ 139.924982] *pde = 00000000
    [ 139.924982] Oops: 0000 [#5] SMP
    [ 139.924982] Modules linked in: fuse dm_crypt dm_mod i2c_piix4 serio_raw evdev binfmt_misc button
    [ 139.924982] Pid: 3070, comm: acpid Tainted: G D 3.8.0-rc2-kds+ #465 Bochs Bochs
    [ 139.924982] EIP: 0060:[] EFLAGS: 00010246 CPU: 0
    [ 139.924982] EIP is at 0x0
    [ 139.924982] EAX: cf5ef000 EBX: cf5ef000 ECX: c143d600 EDX: c15225f2
    [ 139.924982] ESI: cf4d2a1c EDI: cf4d2a1c EBP: cc02df10 ESP: cc02dee4
    [ 139.924982] DS: 007b ES: 007b FS: 00d8 GS: 0033 SS: 0068
    [ 139.924982] CR0: 80050033 CR2: 00000000 CR3: 0c059000 CR4: 000006d0
    [ 139.924982] DR0: 00000000 DR1: 00000000 DR2: 00000000 DR3: 00000000
    [ 139.924982] DR6: ffff0ff0 DR7: 00000400
    [ 139.924982] Process acpid (pid: 3070, ti=cc02c000 task=d7705340 task.ti=cc02c000)
    [ 139.924982] Stack:
    [ 139.924982] c1203c88 00000000 cc02def4 cf4d2a1c ae21eefa 471b60d5 1083c1ba c26a5940
    [ 139.924982] e891fb5e 00000041 00000004 cc02df1c c1203964 00000000 cc02df4c c10e20c3
    [ 139.924982] 00000002 00000000 00000000 22222222 c1ff2222 cf5ef000 00000000 d76efb08
    [ 139.924982] Call Trace:
    [ 139.924982] [] ? evm_update_evmxattr+0x5b/0x62
    [ 139.924982] [] evm_inode_post_setattr+0x22/0x26
    [ 139.924982] [] notify_change+0x25f/0x281
    [ 139.924982] [] chmod_common+0x59/0x76
    [ 139.924982] [] ? put_unused_fd+0x33/0x33
    [ 139.924982] [] sys_fchmod+0x39/0x5c
    [ 139.924982] [] syscall_call+0x7/0xb
    [ 139.924982] Code: Bad EIP value.

    This happens because sockets do not define the removexattr operation.
    Before removing the xattr, verify the removexattr function pointer is
    not NULL.

    Signed-off-by: Dmitry Kasatkin
    Signed-off-by: Mimi Zohar
    Cc: stable@vger.kernel.org
    Signed-off-by: James Morris

    Dmitry Kasatkin
     

15 Jan, 2013

2 commits

  • This patch corrects some problems with LSM/SELinux that were introduced
    with the multiqueue patchset. The problem stems from the fact that the
    multiqueue work changed the relationship between the tun device and its
    associated socket; before the socket persisted for the life of the
    device, however after the multiqueue changes the socket only persisted
    for the life of the userspace connection (fd open). For non-persistent
    devices this is not an issue, but for persistent devices this can cause
    the tun device to lose its SELinux label.

    We correct this problem by adding an opaque LSM security blob to the
    tun device struct which allows us to have the LSM security state, e.g.
    SELinux labeling information, persist for the lifetime of the tun
    device. In the process we tweak the LSM hooks to work with this new
    approach to TUN device/socket labeling and introduce a new LSM hook,
    security_tun_dev_attach_queue(), to approve requests to attach to a
    TUN queue via TUNSETQUEUE.

    The SELinux code has been adjusted to match the new LSM hooks, the
    other LSMs do not make use of the LSM TUN controls. This patch makes
    use of the recently added "tun_socket:attach_queue" permission to
    restrict access to the TUNSETQUEUE operation. On older SELinux
    policies which do not define the "tun_socket:attach_queue" permission
    the access control decision for TUNSETQUEUE will be handled according
    to the SELinux policy's unknown permission setting.

    Signed-off-by: Paul Moore
    Acked-by: Eric Paris
    Tested-by: Jason Wang
    Signed-off-by: David S. Miller

    Paul Moore
     
  • Add a new permission to align with the new TUN multiqueue support,
    "tun_socket:attach_queue".

    The corresponding SELinux reference policy patch is show below:

    diff --git a/policy/flask/access_vectors b/policy/flask/access_vectors
    index 28802c5..a0664a1 100644
    --- a/policy/flask/access_vectors
    +++ b/policy/flask/access_vectors
    @@ -827,6 +827,9 @@ class kernel_service

    class tun_socket
    inherits socket
    +{
    + attach_queue
    +}

    class x_pointer
    inherits x_device

    Signed-off-by: Paul Moore
    Acked-by: Eric Paris
    Tested-by: Jason Wang
    Signed-off-by: David S. Miller

    Paul Moore
     

24 Dec, 2012

1 commit

  • The new kernel module syscall appraises kernel modules based
    on policy. If the IMA policy requires kernel module checking,
    fallback to module signature enforcing for the existing syscall.
    Without CONFIG_MODULE_SIG_FORCE enabled, the kernel module's
    integrity is unknown, return -EACCES.

    Changelog v1:
    - Fix ima_module_check() return result (Tetsuo Handa)

    Reported-by: Tetsuo Handa
    Reviewed-by: Tetsuo Handa
    Signed-off-by: Mimi Zohar

    Mimi Zohar
     

21 Dec, 2012

1 commit


20 Dec, 2012

1 commit

  • Pull networking fixes from David Miller:

    1) Really fix tuntap SKB use after free bug, from Eric Dumazet.

    2) Adjust SKB data pointer to point past the transport header before
    calling icmpv6_notify() so that the headers are in the state which
    that function expects. From Duan Jiong.

    3) Fix ambiguities in the new tuntap multi-queue APIs. From Jason
    Wang.

    4) mISDN needs to use del_timer_sync(), from Konstantin Khlebnikov.

    5) Don't destroy mutex after freeing up device private in mac802154,
    fix also from Konstantin Khlebnikov.

    6) Fix INET request socket leak in TCP and DCCP, from Christoph Paasch.

    7) SCTP HMAC kconfig rework, from Neil Horman.

    8) Fix SCTP jprobes function signature, otherwise things explode, from
    Daniel Borkmann.

    9) Fix typo in ipv6-offload Makefile variable reference, from Simon
    Arlott.

    10) Don't fail USBNET open just because remote wakeup isn't supported,
    from Oliver Neukum.

    11) be2net driver bug fixes from Sathya Perla.

    12) SOLOS PCI ATM driver bug fixes from Nathan Williams and David
    Woodhouse.

    13) Fix MTU changing regression in 8139cp driver, from John Greene.

    * git://git.kernel.org/pub/scm/linux/kernel/git/davem/net: (45 commits)
    solos-pci: ensure all TX packets are aligned to 4 bytes
    solos-pci: add firmware upgrade support for new models
    solos-pci: remove superfluous debug output
    solos-pci: add GPIO support for newer versions on Geos board
    8139cp: Prevent dev_close/cp_interrupt race on MTU change
    net: qmi_wwan: add ZTE MF880
    drivers/net: Use of_match_ptr() macro in smsc911x.c
    drivers/net: Use of_match_ptr() macro in smc91x.c
    ipv6: addrconf.c: remove unnecessary "if"
    bridge: Correctly encode addresses when dumping mdb entries
    bridge: Do not unregister all PF_BRIDGE rtnl operations
    use generic usbnet_manage_power()
    usbnet: generic manage_power()
    usbnet: handle PM failure gracefully
    ksz884x: fix receive polling race condition
    qlcnic: update driver version
    qlcnic: fix unused variable warnings
    net: fec: forbid FEC_PTP on SoCs that do not support
    be2net: fix wrong frag_idx reported by RX CQ
    be2net: fix be_close() to ensure all events are ack'ed
    ...

    Linus Torvalds
     

19 Dec, 2012

2 commits

  • Pull module update from Rusty Russell:
    "Nothing all that exciting; a new module-from-fd syscall for those who
    want to verify the source of the module (ChromeOS) and/or use standard
    IMA on it or other security hooks."

    * tag 'modules-next-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/rusty/linux:
    MODSIGN: Fix kbuild output when using default extra_certificates
    MODSIGN: Avoid using .incbin in C source
    modules: don't hand 0 to vmalloc.
    module: Remove a extra null character at the top of module->strtab.
    ASN.1: Use the ASN1_LONG_TAG and ASN1_INDEFINITE_LENGTH constants
    ASN.1: Define indefinite length marker constant
    moduleparam: use __UNIQUE_ID()
    __UNIQUE_ID()
    MODSIGN: Add modules_sign make target
    powerpc: add finit_module syscall.
    ima: support new kernel module syscall
    add finit_module syscall to asm-generic
    ARM: add finit_module syscall to ARM
    security: introduce kernel_module_from_file hook
    module: add flags arg to sys_finit_module()
    module: add syscall to load module from fd

    Linus Torvalds
     
  • Pull (again) user namespace infrastructure changes from Eric Biederman:
    "Those bugs, those darn embarrasing bugs just want don't want to get
    fixed.

    Linus I just updated my mirror of your kernel.org tree and it appears
    you successfully pulled everything except the last 4 commits that fix
    those embarrasing bugs.

    When you get a chance can you please repull my branch"

    * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/ebiederm/user-namespace:
    userns: Fix typo in description of the limitation of userns_install
    userns: Add a more complete capability subset test to commit_creds
    userns: Require CAP_SYS_ADMIN for most uses of setns.
    Fix cap_capable to only allow owners in the parent user namespace to have caps.

    Linus Torvalds
     

18 Dec, 2012

1 commit

  • Pull user namespace changes from Eric Biederman:
    "While small this set of changes is very significant with respect to
    containers in general and user namespaces in particular. The user
    space interface is now complete.

    This set of changes adds support for unprivileged users to create user
    namespaces and as a user namespace root to create other namespaces.
    The tyranny of supporting suid root preventing unprivileged users from
    using cool new kernel features is broken.

    This set of changes completes the work on setns, adding support for
    the pid, user, mount namespaces.

    This set of changes includes a bunch of basic pid namespace
    cleanups/simplifications. Of particular significance is the rework of
    the pid namespace cleanup so it no longer requires sending out
    tendrils into all kinds of unexpected cleanup paths for operation. At
    least one case of broken error handling is fixed by this cleanup.

    The files under /proc//ns/ have been converted from regular files
    to magic symlinks which prevents incorrect caching by the VFS,
    ensuring the files always refer to the namespace the process is
    currently using and ensuring that the ptrace_mayaccess permission
    checks are always applied.

    The files under /proc//ns/ have been given stable inode numbers
    so it is now possible to see if different processes share the same
    namespaces.

    Through the David Miller's net tree are changes to relax many of the
    permission checks in the networking stack to allowing the user
    namespace root to usefully use the networking stack. Similar changes
    for the mount namespace and the pid namespace are coming through my
    tree.

    Two small changes to add user namespace support were commited here adn
    in David Miller's -net tree so that I could complete the work on the
    /proc//ns/ files in this tree.

    Work remains to make it safe to build user namespaces and 9p, afs,
    ceph, cifs, coda, gfs2, ncpfs, nfs, nfsd, ocfs2, and xfs so the
    Kconfig guard remains in place preventing that user namespaces from
    being built when any of those filesystems are enabled.

    Future design work remains to allow root users outside of the initial
    user namespace to mount more than just /proc and /sys."

    * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/ebiederm/user-namespace: (38 commits)
    proc: Usable inode numbers for the namespace file descriptors.
    proc: Fix the namespace inode permission checks.
    proc: Generalize proc inode allocation
    userns: Allow unprivilged mounts of proc and sysfs
    userns: For /proc/self/{uid,gid}_map derive the lower userns from the struct file
    procfs: Print task uids and gids in the userns that opened the proc file
    userns: Implement unshare of the user namespace
    userns: Implent proc namespace operations
    userns: Kill task_user_ns
    userns: Make create_new_namespaces take a user_ns parameter
    userns: Allow unprivileged use of setns.
    userns: Allow unprivileged users to create new namespaces
    userns: Allow setting a userns mapping to your current uid.
    userns: Allow chown and setgid preservation
    userns: Allow unprivileged users to create user namespaces.
    userns: Ignore suid and sgid on binaries if the uid or gid can not be mapped
    userns: fix return value on mntns_install() failure
    vfs: Allow unprivileged manipulation of the mount namespace.
    vfs: Only support slave subtrees across different user namespaces
    vfs: Add a user namespace reference from struct mnt_namespace
    ...

    Linus Torvalds
     

17 Dec, 2012

1 commit

  • Pull security subsystem updates from James Morris:
    "A quiet cycle for the security subsystem with just a few maintenance
    updates."

    * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jmorris/linux-security:
    Smack: create a sysfs mount point for smackfs
    Smack: use select not depends in Kconfig
    Yama: remove locking from delete path
    Yama: add RCU to drop read locking
    drivers/char/tpm: remove tasklet and cleanup
    KEYS: Use keyring_alloc() to create special keyrings
    KEYS: Reduce initial permissions on keys
    KEYS: Make the session and process keyrings per-thread
    seccomp: Make syscall skipping and nr changes more consistent
    key: Fix resource leak
    keys: Fix unreachable code
    KEYS: Add payload preparsing opportunity prior to key instantiate or update

    Linus Torvalds
     

16 Dec, 2012

1 commit


15 Dec, 2012

3 commits

  • Andy Lutomirski pointed out that the current behavior of allowing the
    owner of a user namespace to have all caps when that owner is not in a
    parent user namespace is wrong. Add a test to ensure the owner of a user
    namespace is in the parent of the user namespace to fix this bug.

    Thankfully this bug did not apply to the initial user namespace, keeping
    the mischief that can be caused by this bug quite small.

    This is bug was introduced in v3.5 by commit 783291e6900
    "Simplify the user_namespace by making userns->creator a kuid."
    But did not matter until the permisions required to create
    a user namespace were relaxed allowing a user namespace to be created
    inside of a user namespace.

    The bug made it possible for the owner of a user namespace to be
    present in a child user namespace. Since the owner of a user nameapce
    is granted all capabilities it became possible for users in a
    grandchild user namespace to have all privilges over their parent user
    namspace.

    Reorder the checks in cap_capable. This should make the common case
    faster and make it clear that nothing magic happens in the initial
    user namespace. The reordering is safe because cred->user_ns
    can only be in targ_ns or targ_ns->parent but not both.

    Add a comment a the top of the loop to make the logic of
    the code clear.

    Add a distinct variable ns that changes as we walk up
    the user namespace hierarchy to make it clear which variable
    is changing.

    Acked-by: Serge Hallyn
    Signed-off-by: "Eric W. Biederman"

    Eric W. Biederman
     
  • There are a number of "conventions" for where to put LSM filesystems.
    Smack adheres to none of them. Create a mount point at /sys/fs/smackfs
    for mounting smackfs so that Smack can be conventional.

    Targeted for git://git.gitorious.org/smack-next/kernel.git

    Signed-off-by: Casey Schaufler

    Casey Schaufler
     
  • The components NETLABEL and SECURITY_NETWORK are required by
    Smack. Using "depends" in Kconfig hides the Smack option
    if the user hasn't figured out that they need to be enabled
    while using make menuconfig. Using select is a better choice.
    Because select is not recursive depends on NET and SECURITY
    are added. The reflects similar usage in TOMOYO and AppArmor.

    Targeted for git://git.gitorious.org/smack-next/kernel.git

    Signed-off-by: Casey Schaufler

    Casey Schaufler
     

14 Dec, 2012

3 commits

  • With the addition of the new kernel module syscall, which defines two
    arguments - a file descriptor to the kernel module and a pointer to a NULL
    terminated string of module arguments - it is now possible to measure and
    appraise kernel modules like any other file on the file system.

    This patch adds support to measure and appraise kernel modules in an
    extensible and consistent manner.

    To support filesystems without extended attribute support, additional
    patches could pass the signature as the first parameter.

    Signed-off-by: Mimi Zohar
    Signed-off-by: Rusty Russell

    Mimi Zohar
     
  • Now that kernel module origins can be reasoned about, provide a hook to
    the LSMs to make policy decisions about the module file. This will let
    Chrome OS enforce that loadable kernel modules can only come from its
    read-only hash-verified root filesystem. Other LSMs can, for example,
    read extended attributes for signatures, etc.

    Signed-off-by: Kees Cook
    Acked-by: Serge E. Hallyn
    Acked-by: Eric Paris
    Acked-by: Mimi Zohar
    Acked-by: James Morris
    Signed-off-by: Rusty Russell

    Kees Cook
     
  • Pull trivial branch from Jiri Kosina:
    "Usual stuff -- comment/printk typo fixes, documentation updates, dead
    code elimination."

    * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/trivial: (39 commits)
    HOWTO: fix double words typo
    x86 mtrr: fix comment typo in mtrr_bp_init
    propagate name change to comments in kernel source
    doc: Update the name of profiling based on sysfs
    treewide: Fix typos in various drivers
    treewide: Fix typos in various Kconfig
    wireless: mwifiex: Fix typo in wireless/mwifiex driver
    messages: i2o: Fix typo in messages/i2o
    scripts/kernel-doc: check that non-void fcts describe their return value
    Kernel-doc: Convention: Use a "Return" section to describe return values
    radeon: Fix typo and copy/paste error in comments
    doc: Remove unnecessary declarations from Documentation/accounting/getdelays.c
    various: Fix spelling of "asynchronous" in comments.
    Fix misspellings of "whether" in comments.
    eisa: Fix spelling of "asynchronous".
    various: Fix spelling of "registered" in comments.
    doc: fix quite a few typos within Documentation
    target: iscsi: fix comment typos in target/iscsi drivers
    treewide: fix typo of "suport" in various comments and Kconfig
    treewide: fix typo of "suppport" in various comments
    ...

    Linus Torvalds
     

13 Dec, 2012

2 commits

  • Pull networking changes from David Miller:

    1) Allow to dump, monitor, and change the bridge multicast database
    using netlink. From Cong Wang.

    2) RFC 5961 TCP blind data injection attack mitigation, from Eric
    Dumazet.

    3) Networking user namespace support from Eric W. Biederman.

    4) tuntap/virtio-net multiqueue support by Jason Wang.

    5) Support for checksum offload of encapsulated packets (basically,
    tunneled traffic can still be checksummed by HW). From Joseph
    Gasparakis.

    6) Allow BPF filter access to VLAN tags, from Eric Dumazet and
    Daniel Borkmann.

    7) Bridge port parameters over netlink and BPDU blocking support
    from Stephen Hemminger.

    8) Improve data access patterns during inet socket demux by rearranging
    socket layout, from Eric Dumazet.

    9) TIPC protocol updates and cleanups from Ying Xue, Paul Gortmaker, and
    Jon Maloy.

    10) Update TCP socket hash sizing to be more in line with current day
    realities. The existing heurstics were choosen a decade ago.
    From Eric Dumazet.

    11) Fix races, queue bloat, and excessive wakeups in ATM and
    associated drivers, from Krzysztof Mazur and David Woodhouse.

    12) Support DOVE (Distributed Overlay Virtual Ethernet) extensions
    in VXLAN driver, from David Stevens.

    13) Add "oops_only" mode to netconsole, from Amerigo Wang.

    14) Support set and query of VEB/VEPA bridge mode via PF_BRIDGE, also
    allow DCB netlink to work on namespaces other than the initial
    namespace. From John Fastabend.

    15) Support PTP in the Tigon3 driver, from Matt Carlson.

    16) tun/vhost zero copy fixes and improvements, plus turn it on
    by default, from Michael S. Tsirkin.

    17) Support per-association statistics in SCTP, from Michele
    Baldessari.

    And many, many, driver updates, cleanups, and improvements. Too
    numerous to mention individually.

    * git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next: (1722 commits)
    net/mlx4_en: Add support for destination MAC in steering rules
    net/mlx4_en: Use generic etherdevice.h functions.
    net: ethtool: Add destination MAC address to flow steering API
    bridge: add support of adding and deleting mdb entries
    bridge: notify mdb changes via netlink
    ndisc: Unexport ndisc_{build,send}_skb().
    uapi: add missing netconf.h to export list
    pkt_sched: avoid requeues if possible
    solos-pci: fix double-free of TX skb in DMA mode
    bnx2: Fix accidental reversions.
    bna: Driver Version Updated to 3.1.2.1
    bna: Firmware update
    bna: Add RX State
    bna: Rx Page Based Allocation
    bna: TX Intr Coalescing Fix
    bna: Tx and Rx Optimizations
    bna: Code Cleanup and Enhancements
    ath9k: check pdata variable before dereferencing it
    ath5k: RX timestamp is reported at end of frame
    ath9k_htc: RX timestamp is reported at end of frame
    ...

    Linus Torvalds
     
  • Pull cgroup changes from Tejun Heo:
    "A lot of activities on cgroup side. The big changes are focused on
    making cgroup hierarchy handling saner.

    - cgroup_rmdir() had peculiar semantics - it allowed cgroup
    destruction to be vetoed by individual controllers and tried to
    drain refcnt synchronously. The vetoing never worked properly and
    caused good deal of contortions in cgroup. memcg was the last
    reamining user. Michal Hocko removed the usage and cgroup_rmdir()
    path has been simplified significantly. This was done in a
    separate branch so that the memcg people can base further memcg
    changes on top.

    - The above allowed cleaning up cgroup lifecycle management and
    implementation of generic cgroup iterators which are used to
    improve hierarchy support.

    - cgroup_freezer updated to allow migration in and out of a frozen
    cgroup and handle hierarchy. If a cgroup is frozen, all descendant
    cgroups are frozen.

    - netcls_cgroup and netprio_cgroup updated to handle hierarchy
    properly.

    - Various fixes and cleanups.

    - Two merge commits. One to pull in memcg and rmdir cleanups (needed
    to build iterators). The other pulled in cgroup/for-3.7-fixes for
    device_cgroup fixes so that further device_cgroup patches can be
    stacked on top."

    Fixed up a trivial conflict in mm/memcontrol.c as per Tejun (due to
    commit bea8c150a7 ("memcg: fix hotplugged memory zone oops") in master
    touching code close to commit 2ef37d3fe4 ("memcg: Simplify
    mem_cgroup_force_empty_list error handling") in for-3.8)

    * 'for-3.8' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/cgroup: (65 commits)
    cgroup: update Documentation/cgroups/00-INDEX
    cgroup_rm_file: don't delete the uncreated files
    cgroup: remove subsystem files when remounting cgroup
    cgroup: use cgroup_addrm_files() in cgroup_clear_directory()
    cgroup: warn about broken hierarchies only after css_online
    cgroup: list_del_init() on removed events
    cgroup: fix lockdep warning for event_control
    cgroup: move list add after list head initilization
    netprio_cgroup: allow nesting and inherit config on cgroup creation
    netprio_cgroup: implement netprio[_set]_prio() helpers
    netprio_cgroup: use cgroup->id instead of cgroup_netprio_state->prioidx
    netprio_cgroup: reimplement priomap expansion
    netprio_cgroup: shorten variable names in extend_netdev_table()
    netprio_cgroup: simplify write_priomap()
    netcls_cgroup: move config inheritance to ->css_online() and remove .broken_hierarchy marking
    cgroup: remove obsolete guarantee from cgroup_task_migrate.
    cgroup: add cgroup->id
    cgroup, cpuset: remove cgroup_subsys->post_clone()
    cgroup: s/CGRP_CLONE_CHILDREN/CGRP_CPUSET_CLONE_CHILDREN/
    cgroup: rename ->create/post_create/pre_destroy/destroy() to ->css_alloc/online/offline/free()
    ...

    Linus Torvalds
     

11 Dec, 2012

1 commit


08 Dec, 2012

1 commit

  • V5: fix two bugs pointed out by Thomas
    remove seq check for now, mark it as TODO

    V4: remove some useless #include
    some coding style fix

    V3: drop debugging printk's
    update selinux perm table as well

    V2: drop patch 1/2, export ifindex directly
    Redesign netlink attributes
    Improve netlink seq check
    Handle IPv6 addr as well

    This patch exports bridge multicast database via netlink
    message type RTM_GETMDB. Similar to fdb, but currently bridge-specific.
    We may need to support modify multicast database too (RTM_{ADD,DEL}MDB).

    (Thanks to Thomas for patient reviews)

    Cc: Herbert Xu
    Cc: Stephen Hemminger
    Cc: "David S. Miller"
    Cc: Thomas Graf
    Cc: Jesper Dangaard Brouer
    Signed-off-by: Cong Wang
    Acked-by: Thomas Graf
    Signed-off-by: David S. Miller

    Cong Wang
     

21 Nov, 2012

3 commits

  • ===============================
    [ INFO: suspicious RCU usage. ]
    3.5.0-rc1+ #63 Not tainted
    -------------------------------
    security/selinux/netnode.c:178 suspicious rcu_dereference_check() usage!

    other info that might help us debug this:

    rcu_scheduler_active = 1, debug_locks = 0
    1 lock held by trinity-child1/8750:
    #0: (sel_netnode_lock){+.....}, at: [] sel_netnode_sid+0x16a/0x3e0

    stack backtrace:
    Pid: 8750, comm: trinity-child1 Not tainted 3.5.0-rc1+ #63
    Call Trace:
    [] lockdep_rcu_suspicious+0xfd/0x130
    [] sel_netnode_sid+0x3b1/0x3e0
    [] ? sel_netnode_find+0x1a0/0x1a0
    [] selinux_socket_bind+0xf6/0x2c0
    [] ? trace_hardirqs_off+0xd/0x10
    [] ? lock_release_holdtime.part.9+0x15/0x1a0
    [] ? lock_hrtimer_base+0x31/0x60
    [] security_socket_bind+0x16/0x20
    [] sys_bind+0x7a/0x100
    [] ? sysret_check+0x22/0x5d
    [] ? trace_hardirqs_on_caller+0x10d/0x1a0
    [] ? trace_hardirqs_on_thunk+0x3a/0x3f
    [] system_call_fastpath+0x16/0x1b

    This patch below does what Paul McKenney suggested in the previous thread.

    Signed-off-by: Dave Jones
    Reviewed-by: Paul E. McKenney
    Acked-by: Paul Moore
    Cc: Eric Paris
    Cc:
    Signed-off-by: Andrew Morton
    Signed-off-by: James Morris

    Dave Jones
     
  • Instead of locking the list during a delete, mark entries as invalid
    and trigger a workqueue to clean them up. This lets us easily handle
    task_free from interrupt context.

    Signed-off-by: Kees Cook

    Kees Cook
     
  • Stop using spinlocks in the read path. Add RCU list to handle the readers.

    Signed-off-by: Kees Cook
    Reviewed-by: Serge E. Hallyn
    Acked-by: John Johansen

    Kees Cook
     

20 Nov, 2012

2 commits

  • The task_user_ns function hides the fact that it is getting the user
    namespace from struct cred on the task. struct cred may go away as
    soon as the rcu lock is released. This leads to a race where we
    can dereference a stale user namespace pointer.

    To make it obvious a struct cred is involved kill task_user_ns.

    To kill the race modify the users of task_user_ns to only
    reference the user namespace while the rcu lock is held.

    Cc: Kees Cook
    Cc: James Morris
    Acked-by: Kees Cook
    Acked-by: Serge Hallyn
    Signed-off-by: "Eric W. Biederman"

    Eric W. Biederman
     
  • Rename cgroup_subsys css lifetime related callbacks to better describe
    what their roles are. Also, update documentation.

    Signed-off-by: Tejun Heo
    Acked-by: Li Zefan

    Tejun Heo
     

07 Nov, 2012

2 commits

  • device_cgroup uses RCU safe ->exceptions list which is write-protected
    by devcgroup_mutex and has had some issues using locking correctly.
    Add lockdep asserts to utility functions so that future errors can be
    easily detected.

    Signed-off-by: Tejun Heo
    Acked-by: Serge E. Hallyn
    Cc: Aristeu Rozanski
    Cc: Li Zefan

    Tejun Heo
     
  • dev_cgroup->exceptions is protected with devcgroup_mutex for writes
    and RCU for reads; however, RCU usage isn't correct.

    * dev_exception_clean() doesn't use RCU variant of list_del() and
    kfree(). The function can race with may_access() and may_access()
    may end up dereferencing already freed memory. Use list_del_rcu()
    and kfree_rcu() instead.

    * may_access() may be called only with RCU read locked but doesn't use
    RCU safe traversal over ->exceptions. Use list_for_each_entry_rcu().

    Signed-off-by: Tejun Heo
    Acked-by: Serge E. Hallyn
    Cc: stable@vger.kernel.org
    Cc: Aristeu Rozanski
    Cc: Li Zefan

    Tejun Heo
     

06 Nov, 2012

1 commit

  • In 4cef7299b478687 ("device_cgroup: add proper checking when changing
    default behavior") the cgroup parent usage is unchecked. root will not
    have a parent and trying to use device.{allow,deny} will cause problems.
    For some reason my stressing scripts didn't test the root directory so I
    didn't catch it on my regular tests.

    Signed-off-by: Aristeu Rozanski
    Cc: Li Zefan
    Cc: James Morris
    Cc: Pavel Emelyanov
    Acked-by: Serge E. Hallyn
    Cc: Jiri Slaby
    Cc: Tejun Heo
    Signed-off-by: Tejun Heo

    Aristeu Rozanski
     

29 Oct, 2012

1 commit


26 Oct, 2012

5 commits

  • Before changing a group's default behavior to ALLOW, we must check if
    its parent's behavior is also ALLOW.

    Signed-off-by: Aristeu Rozanski
    Cc: Tejun Heo
    Cc: Li Zefan
    Cc: James Morris
    Cc: Pavel Emelyanov
    Acked-by: Serge Hallyn
    Cc: Jiri Slaby
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Aristeu Rozanski
     
  • Convert the code to use kstrtou32() instead of simple_strtoul() which is
    deprecated. The real size of the variables are u32, so use kstrtou32
    instead of kstrtoul

    Signed-off-by: Aristeu Rozanski
    Cc: Dave Jones
    Cc: Tejun Heo
    Cc: Li Zefan
    Cc: James Morris
    Cc: Pavel Emelyanov
    Acked-by: Serge Hallyn
    Cc: Jiri Slaby
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Aristeu Rozanski
     
  • This was done in a v2 patch but v1 ended up being committed. The
    variable name is less confusing and stores the default behavior when no
    matching exception exists.

    Signed-off-by: Aristeu Rozanski
    Cc: Dave Jones
    Cc: Tejun Heo
    Cc: Li Zefan
    Cc: James Morris
    Cc: Pavel Emelyanov
    Acked-by: Serge Hallyn
    Cc: Jiri Slaby
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Aristeu Rozanski
     
  • Commit ad676077a2ae ("device_cgroup: convert device_cgroup internally to
    policy + exceptions") removed rcu locks which are needed in
    task_devcgroup called in this chain:

    devcgroup_inode_mknod OR __devcgroup_inode_permission ->
    __devcgroup_inode_permission ->
    task_devcgroup ->
    task_subsys_state ->
    task_subsys_state_check.

    Change the code so that task_devcgroup is safely called with rcu read
    lock held.

    ===============================
    [ INFO: suspicious RCU usage. ]
    3.6.0-rc5-next-20120913+ #42 Not tainted
    -------------------------------
    include/linux/cgroup.h:553 suspicious rcu_dereference_check() usage!

    other info that might help us debug this:

    rcu_scheduler_active = 1, debug_locks = 0
    2 locks held by kdevtmpfs/23:
    #0: (sb_writers){.+.+.+}, at: []
    mnt_want_write+0x1f/0x50
    #1: (&sb->s_type->i_mutex_key#3/1){+.+.+.}, at: []
    kern_path_create+0x7f/0x170

    stack backtrace:
    Pid: 23, comm: kdevtmpfs Not tainted 3.6.0-rc5-next-20120913+ #42
    Call Trace:
    lockdep_rcu_suspicious+0xfd/0x130
    devcgroup_inode_mknod+0x19d/0x240
    vfs_mknod+0x71/0xf0
    handle_create.isra.2+0x72/0x200
    devtmpfsd+0x114/0x140
    ? handle_create.isra.2+0x200/0x200
    kthread+0xd6/0xe0
    kernel_thread_helper+0x4/0x10

    Signed-off-by: Jiri Slaby
    Cc: Dave Jones
    Cc: Tejun Heo
    Cc: Li Zefan
    Cc: James Morris
    Cc: Pavel Emelyanov
    Acked-by: Serge Hallyn
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Jiri Slaby
     
  • We set ret to NULL then test it. Remove the bogus test

    Signed-off-by: Alan Cox
    Signed-off-by: Jiri Kosina

    Alan Cox
     

24 Oct, 2012

1 commit

  • BugLink: http://bugs.launchpad.net/bugs/1056078

    Profile replacement can cause long chains of profiles to build up when
    the profile being replaced is pinned. When the pinned profile is finally
    freed, it puts the reference to its replacement, which may in turn nest
    another call to free_profile on the stack. Because this may happen for
    each profile in the replacedby chain this can result in a recusion that
    causes the stack to overflow.

    Break this nesting by directly walking the chain of replacedby profiles
    (ie. use iteration instead of recursion to free the list). This results
    in at most 2 levels of free_profile being called, while freeing a
    replacedby chain.

    Signed-off-by: John Johansen
    Signed-off-by: James Morris

    John Johansen
     

18 Oct, 2012

1 commit

  • The capability defines have moved causing the auto generated names
    of capabilities that apparmor uses in logging to be incorrect.

    Fix the autogenerated table source to uapi/linux/capability.h

    Reported-by: YanHong
    Reported-by: Krzysztof Kolasa
    Analyzed-by: Al Viro
    Signed-off-by: John Johansen
    Acked-by: David Howells
    Acked-by: James Morris
    Signed-off-by: Linus Torvalds

    John Johansen
     

17 Oct, 2012

1 commit

  • replace_fd() began with "eats a reference, tries to insert into
    descriptor table" semantics; at some point I'd switched it to
    much saner current behaviour ("try to insert into descriptor
    table, grabbing a new reference if inserted; caller should do
    fput() in any case"), but forgot to update the callers.
    Mea culpa...

    [Spotted by Pavel Roskin, who has really weird system with pipe-fed
    coredumps as part of what he considers a normal boot ;-)]

    Signed-off-by: Al Viro

    Al Viro