1. 18 Nov, 2014 2 commits
    • Kees Cook's avatar
      x86, mm: Set NX across entire PMD at boot · 45e2a9d4
      Kees Cook authored
      When setting up permissions on kernel memory at boot, the end of the
      PMD that was split from bss remained executable. It should be NX like
      the rest. This performs a PMD alignment instead of a PAGE alignment to
      get the correct span of memory.
      
      Before:
      ---[ High Kernel Mapping ]---
      ...
      0xffffffff8202d000-0xffffffff82200000  1868K     RW       GLB NX pte
      0xffffffff82200000-0xffffffff82c00000    10M     RW   PSE GLB NX pmd
      0xffffffff82c00000-0xffffffff82df5000  2004K     RW       GLB NX pte
      0xffffffff82df5000-0xffffffff82e00000    44K     RW       GLB x  pte
      0xffffffff82e00000-0xffffffffc0000000   978M                     pmd
      
      After:
      ---[ High Kernel Mapping ]---
      ...
      0xffffffff8202d000-0xffffffff82200000  1868K     RW       GLB NX pte
      0xffffffff82200000-0xffffffff82e00000    12M     RW   PSE GLB NX pmd
      0xffffffff82e00000-0xffffffffc0000000   978M                     pmd
      
      [ tglx: Changed it to roundup(_brk_end, PMD_SIZE) and added a comment.
              We really should unmap the reminder along with the holes
              caused by init,initdata etc. but thats a different issue ]
      Signed-off-by: default avatarKees Cook <keescook@chromium.org>
      Cc: Andy Lutomirski <luto@amacapital.net>
      Cc: Toshi Kani <toshi.kani@hp.com>
      Cc: Yasuaki Ishimatsu <isimatu.yasuaki@jp.fujitsu.com>
      Cc: David Vrabel <david.vrabel@citrix.com>
      Cc: Wang Nan <wangnan0@huawei.com>
      Cc: Yinghai Lu <yinghai@kernel.org>
      Cc: stable@vger.kernel.org
      Link: http://lkml.kernel.org/r/20141114194737.GA3091@www.outflux.netSigned-off-by: default avatarThomas Gleixner <tglx@linutronix.de>
      45e2a9d4
    • Borislav Petkov's avatar
      x86, microcode: Update BSPs microcode on resume · fb86b973
      Borislav Petkov authored
      In the situation when we apply early microcode but do *not* apply late
      microcode, we fail to update the BSP's microcode on resume because we
      haven't initialized the uci->mc microcode pointer. So, in order to
      alleviate that, we go and dig out the stashed microcode patch during
      early boot. It is basically the same thing that is done on the APs early
      during boot so do that too here.
      
      Tested-by: alex.schnaidt@gmail.com
      Fixes: https://bugzilla.kernel.org/show_bug.cgi?id=88001
      Cc: Henrique de Moraes Holschuh <hmh@hmh.eng.br>
      Cc: Fenghua Yu <fenghua.yu@intel.com>
      Cc: <stable@vger.kernel.org> # v3.9
      Signed-off-by: default avatarBorislav Petkov <bp@suse.de>
      Link: http://lkml.kernel.org/r/20141118094657.GA6635@pd.tnicSigned-off-by: default avatarThomas Gleixner <tglx@linutronix.de>
      fb86b973
  2. 16 Nov, 2014 1 commit
    • Dave Hansen's avatar
      x86: Require exact match for 'noxsave' command line option · 2cd3949f
      Dave Hansen authored
      We have some very similarly named command-line options:
      
      arch/x86/kernel/cpu/common.c:__setup("noxsave", x86_xsave_setup);
      arch/x86/kernel/cpu/common.c:__setup("noxsaveopt", x86_xsaveopt_setup);
      arch/x86/kernel/cpu/common.c:__setup("noxsaves", x86_xsaves_setup);
      
      __setup() is designed to match options that take arguments, like
      "foo=bar" where you would have:
      
      	__setup("foo", x86_foo_func...);
      
      The problem is that "noxsave" actually _matches_ "noxsaves" in
      the same way that "foo" matches "foo=bar".  If you boot an old
      kernel that does not know about "noxsaves" with "noxsaves" on the
      command line, it will interpret the argument as "noxsave", which
      is not what you want at all.
      
      This makes the "noxsave" handler only return success when it finds
      an *exact* match.
      
      [ tglx: We really need to make __setup() more robust. ]
      Signed-off-by: default avatarDave Hansen <dave.hansen@linux.intel.com>
      Cc: Dave Hansen <dave@sr71.net>
      Cc: Fenghua Yu <fenghua.yu@intel.com>
      Cc: x86@kernel.org
      Cc: stable@vger.kernel.org
      Link: http://lkml.kernel.org/r/20141111220133.FE053984@viggo.jf.intel.comSigned-off-by: default avatarThomas Gleixner <tglx@linutronix.de>
      2cd3949f
  3. 10 Nov, 2014 3 commits
  4. 05 Nov, 2014 1 commit
  5. 01 Nov, 2014 7 commits
    • Junjie Mao's avatar
      x86, kaslr: Prevent .bss from overlaping initrd · e6023367
      Junjie Mao authored
      When choosing a random address, the current implementation does not take into
      account the reversed space for .bss and .brk sections. Thus the relocated kernel
      may overlap other components in memory. Here is an example of the overlap from a
      x86_64 kernel in qemu (the ranges of physical addresses are presented):
      
       Physical Address
      
          0x0fe00000                  --+--------------------+  <-- randomized base
                                     /  |  relocated kernel  |
                         vmlinux.bin    | (from vmlinux.bin) |
          0x1336d000    (an ELF file)   +--------------------+--
                                     \  |                    |  \
          0x1376d870                  --+--------------------+   |
                                        |    relocs table    |   |
          0x13c1c2a8                    +--------------------+   .bss and .brk
                                        |                    |   |
          0x13ce6000                    +--------------------+   |
                                        |                    |  /
          0x13f77000                    |       initrd       |--
                                        |                    |
          0x13fef374                    +--------------------+
      
      The initrd image will then be overwritten by the memset during early
      initialization:
      
      [    1.655204] Unpacking initramfs...
      [    1.662831] Initramfs unpacking failed: junk in compressed archive
      
      This patch prevents the above situation by requiring a larger space when looking
      for a random kernel base, so that existing logic can effectively avoids the
      overlap.
      
      [kees: switched to perl to avoid hex translation pain in mawk vs gawk]
      [kees: calculated overlap without relocs table]
      
      Fixes: 82fa9637 ("x86, kaslr: Select random position from e820 maps")
      Reported-by: default avatarFengguang Wu <fengguang.wu@intel.com>
      Signed-off-by: default avatarJunjie Mao <eternal.n08@gmail.com>
      Signed-off-by: default avatarKees Cook <keescook@chromium.org>
      Cc: Josh Triplett <josh@joshtriplett.org>
      Cc: Matt Fleming <matt.fleming@intel.com>
      Cc: Ard Biesheuvel <ard.biesheuvel@linaro.org>
      Cc: Vivek Goyal <vgoyal@redhat.com>
      Cc: Andi Kleen <ak@linux.intel.com>
      Cc: stable@vger.kernel.org
      Link: http://lkml.kernel.org/r/1414762838-13067-1-git-send-email-eternal.n08@gmail.comSigned-off-by: default avatarThomas Gleixner <tglx@linutronix.de>
      e6023367
    • Borislav Petkov's avatar
      x86, microcode, AMD: Fix early ucode loading on 32-bit · 4750a0d1
      Borislav Petkov authored
      Konrad triggered the following splat below in a 32-bit guest on an AMD
      box. As it turns out, in save_microcode_in_initrd_amd() we're using the
      *physical* address of the container *after* we have enabled paging and
      thus we #PF in load_microcode_amd() when trying to access the microcode
      container in the ramdisk range.
      
      Because the ramdisk is exactly there:
      
      [    0.000000] RAMDISK: [mem 0x35e04000-0x36ef9fff]
      
      and we fault at 0x35e04304.
      
      And since this guest doesn't relocate the ramdisk, we don't do the
      computation which will give us the correct virtual address and we end up
      with the PA.
      
      So, we should actually be using virtual addresses on 32-bit too by the
      time we're freeing the initrd. Do that then!
      
      Unpacking initramfs...
      BUG: unable to handle kernel paging request at 35d4e304
      IP: [<c042e905>] load_microcode_amd+0x25/0x4a0
      *pde = 00000000
      Oops: 0000 [#1] SMP
      Modules linked in:
      CPU: 0 PID: 1 Comm: swapper/0 Not tainted 3.17.1-302.fc21.i686 #1
      Hardware name: Xen HVM domU, BIOS 4.4.1 10/01/2014
      task: f5098000 ti: f50d0000 task.ti: f50d0000
      EIP: 0060:[<c042e905>] EFLAGS: 00010246 CPU: 0
      EIP is at load_microcode_amd+0x25/0x4a0
      EAX: 00000000 EBX: f6e9ec4c ECX: 00001ec4 EDX: 00000000
      ESI: f5d4e000 EDI: 35d4e2fc EBP: f50d1ed0 ESP: f50d1e94
       DS: 007b ES: 007b FS: 00d8 GS: 00e0 SS: 0068
      CR0: 8005003b CR2: 35d4e304 CR3: 00e33000 CR4: 000406d0
      Stack:
       00000000 00000000 f50d1ebc f50d1ec4 f5d4e000 c0d7735a f50d1ed0 15a3d17f
       f50d1ec4 00600f20 00001ec4 bfb83203 f6e9ec4c f5d4e000 c0d7735a f50d1ed8
       c0d80861 f50d1ee0 c0d80429 f50d1ef0 c0d889a9 f5d4e000 c0000000 f50d1f04
      Call Trace:
      ? unpack_to_rootfs
      ? unpack_to_rootfs
      save_microcode_in_initrd_amd
      save_microcode_in_initrd
      free_initrd_mem
      populate_rootfs
      ? unpack_to_rootfs
      do_one_initcall
      ? unpack_to_rootfs
      ? repair_env_string
      ? proc_mkdir
      kernel_init_freeable
      kernel_init
      ret_from_kernel_thread
      ? rest_init
      Reported-and-tested-by: default avatarKonrad Rzeszutek Wilk <konrad.wilk@oracle.com>
      References: https://bugzilla.redhat.com/show_bug.cgi?id=1158204
      Fixes: 75a1ba5b ("x86, microcode, AMD: Unify valid container checks")
      Signed-off-by: default avatarBorislav Petkov <bp@suse.de>
      Cc: <stable@vger.kernel.org> # v3.14+
      Link: http://lkml.kernel.org/r/20141101100100.GA4462@pd.tnicSigned-off-by: default avatarThomas Gleixner <tglx@linutronix.de>
      4750a0d1
    • Linus Torvalds's avatar
      Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mason/linux-btrfs · 4f4274af
      Linus Torvalds authored
      Pull btrfs fixes from Chris Mason:
       "Filipe is nailing down some problems with our skinny extent variation,
        and Dave's patch fixes endian problems in the new super block checks"
      
      * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mason/linux-btrfs:
        Btrfs: fix race that makes btrfs_lookup_extent_info miss skinny extent items
        Btrfs: properly clean up btrfs_end_io_wq_cache
        Btrfs: fix invalid leaf slot access in btrfs_lookup_extent()
        btrfs: use macro accessors in superblock validation checks
      4f4274af
    • Linus Torvalds's avatar
      Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input · 9f935675
      Linus Torvalds authored
      Pull input updates from Dmitry Torokhov:
       "A bunch of fixes for minor defects reported by Coverity, a few driver
        fixups and revert of i8042.nomux change so that we are once again
        enable active MUX mode if box claims to support it"
      
      * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input:
        Revert "Input: i8042 - disable active multiplexing by default"
        Input: altera_ps2 - use correct type for irq return value
        Input: altera_ps2 - write to correct register when disabling interrupts
        Input: max77693-haptic - fix potential overflow
        Input: psmouse - remove unneeded check in psmouse_reconnect()
        Input: vsxxxaa - fix code dropping bytes from queue
        Input: ims-pcu - fix dead code in ims_pcu_ofn_reg_addr_store()
        Input: opencores-kbd - fix error handling
        Input: wm97xx - adapt parameters to tosa touchscreen.
        Input: i8042 - quirks for Fujitsu Lifebook A544 and Lifebook AH544
        Input: stmpe-keypad - fix valid key line bitmask
        Input: soc_button_array - update calls to gpiod_get*()
      9f935675
    • Linus Torvalds's avatar
      Merge tag 'pm+acpi-3.18-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm · ab01f963
      Linus Torvalds authored
      Pull ACPI and power management fixes from Rafael Wysocki:
       "These are fixes received after my previous pull request plus one that
        has been in the works for quite a while, but its previous version
        caused problems to happen, so it's been deferred till now.
      
        Fixed are two recent regressions (MFD enumeration and cpufreq-dt),
        ACPI EC regression introduced in 3.17, system suspend error code path
        regression introduced in 3.15, an older bug related to recovery from
        failing resume from hibernation and a cpufreq-dt driver issue related
        to operation performance points.
      
        Specifics:
      
         - Fix a crash on r8a7791/koelsch during resume from system suspend
           caused by a recent cpufreq-dt commit (Geert Uytterhoeven).
      
         - Fix an MFD enumeration problem introduced by a recent commit adding
           ACPI support to the MFD subsystem that exposed a weakness in the
           ACPI core causing ACPI enumeration to be applied to all devices
           associated with one ACPI companion object, although it should be
           used for one of them only (Mika Westerberg).
      
         - Fix an ACPI EC regression introduced during the 3.17 cycle causing
           some Samsung laptops to misbehave as a result of a workaround
           targeted at some Acer machines.  That includes a revert of a commit
           that went too far and a quirk for the Acer machines in question.
           From Lv Zheng.
      
         - Fix a regression in the system suspend error code path introduced
           during the 3.15 cycle that causes it to fail to take errors from
           asychronous execution of "late" suspend callbacks into account
           (Imre Deak).
      
         - Fix a long-standing bug in the hibernation resume error code path
           that fails to roll back everything correcty on "freeze" callback
           errors and leaves some devices in a "suspended" state causing more
           breakage to happen subsequently (Imre Deak).
      
         - Make the cpufreq-dt driver disable operation performance points
           that are not supported by the VR connected to the CPU voltage plane
           with acceptable tolerance instead of constantly failing voltage
           scaling later on (Lucas Stach)"
      
      * tag 'pm+acpi-3.18-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm:
        ACPI / EC: Fix regression due to conflicting firmware behavior between Samsung and Acer.
        Revert "ACPI / EC: Add support to disallow QR_EC to be issued before completing previous QR_EC"
        cpufreq: cpufreq-dt: Restore default cpumask_setall(policy->cpus)
        PM / Sleep: fix recovery during resuming from hibernation
        PM / Sleep: fix async suspend_late/freeze_late error handling
        ACPI: Use ACPI companion to match only the first physical device
        cpufreq: cpufreq-dt: disable unsupported OPPs
      ab01f963
    • Linus Torvalds's avatar
      Merge tag 'pci-v3.18-fixes-1' of git://git.kernel.org/pub/scm/linux/kernel/git/helgaas/pci · 08da742e
      Linus Torvalds authored
      Pull PCI fixes from Bjorn Helgaas:
       "These changes, intended for v3.18, fix:
      
        Sysfs
          - Fix "enable" filename change (Greg Kroah-Hartman)
      
            An unintentional sysfs filename change in commit 5136b2da
            ("PCI: convert bus code to use dev_groups"), which appeared in
            v3.13, changed "enable" to "enabled", and this changes it back.
      
            Old users of "enable" are currently broken and will be helped by
            this change.  Anything that started to use "enabled" after v3.13
            will be broken by this change.  If necessary, we can add a symlink
            to make both work, but this patch doesn't do that.
      
        PCI device hotplug
          - Revert duplicate merge (Kamal Mostafa)
      
            A mistaken duplicate merge that added a check twice.  Nothing's
            broken; this just removes the unnecessary code.
      
        Freescale i.MX6
          - Wait for clocks to stabilize after ref_en (Richard Zhu)
      
            An i.MX6 clock problem that prevents mx6 nitrogen boards from booting"
      
      * tag 'pci-v3.18-fixes-1' of git://git.kernel.org/pub/scm/linux/kernel/git/helgaas/pci:
        PCI: Rename sysfs 'enabled' file back to 'enable'
        PCI: imx6: Wait for clocks to stabilize after ref_en
        Revert duplicate "PCI: pciehp: Prevent NULL dereference during probe"
      08da742e
    • Andy Lutomirski's avatar
      x86_64, entry: Fix out of bounds read on sysenter · 653bc77a
      Andy Lutomirski authored
      Rusty noticed a Really Bad Bug (tm) in my NT fix.  The entry code
      reads out of bounds, causing the NT fix to be unreliable.  But, and
      this is much, much worse, if your stack is somehow just below the
      top of the direct map (or a hole), you read out of bounds and crash.
      
      Excerpt from the crash:
      
      [    1.129513] RSP: 0018:ffff88001da4bf88  EFLAGS: 00010296
      
        2b:*    f7 84 24 90 00 00 00     testl  $0x4000,0x90(%rsp)
      
      That read is deterministically above the top of the stack.  I
      thought I even single-stepped through this code when I wrote it to
      check the offset, but I clearly screwed it up.
      
      Fixes: 8c7aa698 ("x86_64, entry: Filter RFLAGS.NT on entry from userspace")
      Reported-by: default avatarRusty Russell <rusty@ozlabs.org>
      Cc: stable@vger.kernel.org
      Signed-off-by: default avatarAndy Lutomirski <luto@amacapital.net>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      653bc77a
  6. 31 Oct, 2014 26 commits
    • Linus Torvalds's avatar
      Merge tag 'ext4_for_linus_stable' of git://git.kernel.org/pub/scm/linux/kernel/git/tytso/ext4 · 32e8fd2f
      Linus Torvalds authored
      Pull ext4 bugfixes from Ted Ts'o:
       "A set of miscellaneous ext4 bug fixes for 3.18"
      
      * tag 'ext4_for_linus_stable' of git://git.kernel.org/pub/scm/linux/kernel/git/tytso/ext4:
        ext4: make ext4_ext_convert_to_initialized() return proper number of blocks
        ext4: bail early when clearing inode journal flag fails
        ext4: bail out from make_indexed_dir() on first error
        jbd2: use a better hash function for the revoke table
        ext4: prevent bugon on race between write/fcntl
        ext4: remove extent status procfs files if journal load fails
        ext4: disallow changing journal_csum option during remount
        ext4: enable journal checksum when metadata checksum feature enabled
        ext4: fix oops when loading block bitmap failed
        ext4: fix overflow when updating superblock backups after resize
      32e8fd2f
    • Linus Torvalds's avatar
      Merge branch 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jack/linux-fs · e2488ab6
      Linus Torvalds authored
      Pull quota and ext3 fixes from Jan Kara.
      
      * 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jack/linux-fs:
        fs, jbd: use a more generic hash function
        quota: Properly return errors from dquot_writeback_dquots()
        ext3: Don't check quota format when there are no quota files
      e2488ab6
    • Linus Torvalds's avatar
      Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net · 89453379
      Linus Torvalds authored
      Pull networking fixes from David Miller:
       "A bit has accumulated, but it's been a week or so since my last batch
        of post-merge-window fixes, so...
      
         1) Missing module license in netfilter reject module, from Pablo.
            Lots of people ran into this.
      
         2) Off by one in mac80211 baserate calculation, from Karl Beldan.
      
         3) Fix incorrect return value from ax88179_178a driver's set_mac_addr
            op, which broke use of it with bonding.  From Ian Morgan.
      
         4) Checking of skb_gso_segment()'s return value was not all
            encompassing, it can return an SKB pointer, a pointer error, or
            NULL.  Fix from Florian Westphal.
      
            This is crummy, and longer term will be fixed to just return error
            pointers or a real SKB.
      
         6) Encapsulation offloads not being handled by
            skb_gso_transport_seglen().  From Florian Westphal.
      
         7) Fix deadlock in TIPC stack, from Ying Xue.
      
         8) Fix performance regression from using rhashtable for netlink
            sockets.  The problem was the synchronize_net() invoked for every
            socket destroy.  From Thomas Graf.
      
         9) Fix bug in eBPF verifier, and remove the strong dependency of BPF
            on NET.  From Alexei Starovoitov.
      
        10) In qdisc_create(), use the correct interface to allocate
            ->cpu_bstats, otherwise the u64_stats_sync member isn't
            initialized properly.  From Sabrina Dubroca.
      
        11) Off by one in ip_set_nfnl_get_byindex(), from Dan Carpenter.
      
        12) nf_tables_newchain() was erroneously expecting error pointers from
            netdev_alloc_pcpu_stats().  It only returna a valid pointer or
            NULL.  From Sabrina Dubroca.
      
        13) Fix use-after-free in _decode_session6(), from Li RongQing.
      
        14) When we set the TX flow hash on a socket, we mistakenly do so
            before we've nailed down the final source port.  Move the setting
            deeper to fix this.  From Sathya Perla.
      
        15) NAPI budget accounting in amd-xgbe driver was counting descriptors
            instead of full packets, fix from Thomas Lendacky.
      
        16) Fix total_data_buflen calculation in hyperv driver, from Haiyang
            Zhang.
      
        17) Fix bcma driver build with OF_ADDRESS disabled, from Hauke
            Mehrtens.
      
        18) Fix mis-use of per-cpu memory in TCP md5 code.  The problem is
            that something that ends up being vmalloc memory can't be passed
            to the crypto hash routines via scatter-gather lists.  From Eric
            Dumazet.
      
        19) Fix regression in promiscuous mode enabling in cdc-ether, from
            Olivier Blin.
      
        20) Bucket eviction and frag entry killing can race with eachother,
            causing an unlink of the object from the wrong list.  Fix from
            Nikolay Aleksandrov.
      
        21) Missing initialization of spinlock in cxgb4 driver, from Anish
            Bhatt.
      
        22) Do not cache ipv4 routing failures, otherwise if the sysctl for
            forwarding is subsequently enabled this won't be seen.  From
            Nicolas Cavallari"
      
      * git://git.kernel.org/pub/scm/linux/kernel/git/davem/net: (131 commits)
        drivers: net: cpsw: Support ALLMULTI and fix IFF_PROMISC in switch mode
        drivers: net: cpsw: Fix broken loop condition in switch mode
        net: ethtool: Return -EOPNOTSUPP if user space tries to read EEPROM with lengh 0
        stmmac: pci: set default of the filter bins
        net: smc91x: Fix gpios for device tree based booting
        mpls: Allow mpls_gso to be built as module
        mpls: Fix mpls_gso handler.
        r8152: stop submitting intr for -EPROTO
        netfilter: nft_reject_bridge: restrict reject to prerouting and input
        netfilter: nft_reject_bridge: don't use IP stack to reject traffic
        netfilter: nf_reject_ipv6: split nf_send_reset6() in smaller functions
        netfilter: nf_reject_ipv4: split nf_send_reset() in smaller functions
        netfilter: nf_tables_bridge: update hook_mask to allow {pre,post}routing
        drivers/net: macvtap and tun depend on INET
        drivers/net, ipv6: Select IPv6 fragment idents for virtio UFO packets
        drivers/net: Disable UFO through virtio
        net: skb_fclone_busy() needs to detect orphaned skb
        gre: Use inner mac length when computing tunnel length
        mlx4: Avoid leaking steering rules on flow creation error flow
        net/mlx4_en: Don't attempt to TX offload the outer UDP checksum for VXLAN
        ...
      89453379
    • Linus Torvalds's avatar
      Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/sparc · 53429290
      Linus Torvalds authored
      Pull sparc update from David Miller:
       "Two changes:
      
        1) It makes no sense to execute a VTOC partition table request in the
           Sun virtual block device driver and fail to load if it doesn't
           succeed because a) we don't use the result at all and b) it won't
           succeed if there is an EFI partition on the disk, for example.
      
           We read the partition table via the normal means in the block layer
           anyways, so this is really completely useless, so just remove it.
      
           From Dwight Engen.
      
        2) Hook up new bpf system call"
      
      * git://git.kernel.org/pub/scm/linux/kernel/git/davem/sparc:
        sunvdc: don't call VD_OP_GET_VTOC
        sparc: Hook up bpf system call.
      53429290
    • Linus Torvalds's avatar
      Merge tag 'microblaze-3.18-rc3' of git://git.monstr.eu/linux-2.6-microblaze · 9f58c62f
      Linus Torvalds authored
      Pull Microblaze updates from Michal Simek:
       - wire-up new bpf syscall
       - fix PCI bug
       - fix Kconfig warning
      
      * tag 'microblaze-3.18-rc3' of git://git.monstr.eu/linux-2.6-microblaze:
        microblaze: Wire up bpf syscall
        microblaze: Fix IO space breakage after of_pci_range_to_resource() change
        microblaze: Fix missing NR_CPUS in menuconfig
      9f58c62f
    • Linus Torvalds's avatar
      Merge branch 'x86-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip · 19e0d5f1
      Linus Torvalds authored
      Pull x86 fixes from Ingo Molnar:
       "Fixes from all around the place:
      
         - hyper-V 32-bit PAE guest kernel fix
         - two IRQ allocation fixes on certain x86 boards
         - intel-mid boot crash fix
         - intel-quark quirk
         - /proc/interrupts duplicate irq chip name fix
         - cma boot crash fix
         - syscall audit fix
         - boot crash fix with certain TSC configurations (seen on Qemu)
         - smpboot.c build warning fix"
      
      * 'x86-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
        x86, pageattr: Prevent overflow in slow_virt_to_phys() for X86_PAE
        ACPI, irq, x86: Return IRQ instead of GSI in mp_register_gsi()
        x86, intel-mid: Create IRQs for APB timers and RTC timers
        x86: Don't enable F00F workaround on Intel Quark processors
        x86/irq: Fix XT-PIC-XT-PIC in /proc/interrupts
        x86, cma: Reserve DMA contiguous area after initmem_init()
        i386/audit: stop scribbling on the stack frame
        x86, apic: Handle a bad TSC more gracefully
        x86: ACPI: Do not translate GSI number if IOAPIC is disabled
        x86/smpboot: Move data structure to its primary usage scope
      19e0d5f1
    • Rafael J. Wysocki's avatar
      Merge branches 'pm-cpufreq' and 'pm-sleep' · 7d627280
      Rafael J. Wysocki authored
      * pm-cpufreq:
        cpufreq: cpufreq-dt: Restore default cpumask_setall(policy->cpus)
        cpufreq: cpufreq-dt: disable unsupported OPPs
      
      * pm-sleep:
        PM / Sleep: fix recovery during resuming from hibernation
        PM / Sleep: fix async suspend_late/freeze_late error handling
      7d627280
    • Rafael J. Wysocki's avatar
      Merge branches 'acpi-scan' and 'acpi-ec' · 76dfdc2c
      Rafael J. Wysocki authored
      * acpi-scan:
        ACPI: Use ACPI companion to match only the first physical device
      
      * acpi-ec:
        ACPI / EC: Fix regression due to conflicting firmware behavior between Samsung and Acer.
        Revert "ACPI / EC: Add support to disallow QR_EC to be issued before completing previous QR_EC"
      76dfdc2c
    • Linus Torvalds's avatar
      Merge branch 'sched-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip · f5fa3630
      Linus Torvalds authored
      Pull scheduler fixes from Ingo Molnar:
       "Various scheduler fixes all over the place: three SCHED_DL fixes,
        three sched/numa fixes, two generic race fixes and a comment fix"
      
      * 'sched-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
        sched/dl: Fix preemption checks
        sched: Update comments for CLONE_NEWNS
        sched: stop the unbound recursion in preempt_schedule_context()
        sched/fair: Fix division by zero sysctl_numa_balancing_scan_size
        sched/fair: Care divide error in update_task_scan_period()
        sched/numa: Fix unsafe get_task_struct() in task_numa_assign()
        sched/deadline: Fix races between rt_mutex_setprio() and dl_task_timer()
        sched/deadline: Don't replenish from a !SCHED_DEADLINE entity
        sched: Fix race between task_group and sched_task_group
      f5fa3630
    • Linus Torvalds's avatar
      Merge branch 'perf-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip · 5656b408
      Linus Torvalds authored
      Pull perf fixes from Ingo Molnar:
       "Mostly tooling fixes, plus on the kernel side:
      
         - a revert for a newly introduced PMU driver which isn't complete yet
           and where we ran out of time with fixes (to be tried again in
           v3.19) - this makes up for a large chunk of the diffstat.
      
         - compilation warning fixes
      
         - a printk message fix
      
         - event_idx usage fixes/cleanups"
      
      * 'perf-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
        perf probe: Trivial typo fix for --demangle
        perf tools: Fix report -F dso_from for data without branch info
        perf tools: Fix report -F dso_to for data without branch info
        perf tools: Fix report -F symbol_from for data without branch info
        perf tools: Fix report -F symbol_to for data without branch info
        perf tools: Fix report -F mispredict for data without branch info
        perf tools: Fix report -F in_tx for data without branch info
        perf tools: Fix report -F abort for data without branch info
        perf tools: Make CPUINFO_PROC an array to support different kernel versions
        perf callchain: Use global caching provided by libunwind
        perf/x86/intel: Revert incomplete and undocumented Broadwell client support
        perf/x86: Fix compile warnings for intel_uncore
        perf: Fix typos in sample code in the perf_event.h header
        perf: Fix and clean up initialization of pmu::event_idx
        perf: Fix bogus kernel printk
        perf diff: Add missing hists__init() call at tool start
      5656b408
    • Linus Torvalds's avatar
      Merge branch 'locking-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip · c958f920
      Linus Torvalds authored
      Pull futex fixes from Ingo Molnar:
       "This contains two futex fixes: one fixes a race condition, the other
        clarifies shared/private futex comments"
      
      * 'locking-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
        futex: Fix a race condition between REQUEUE_PI and task death
        futex: Mention key referencing differences between shared and private futexes
      c958f920
    • David S. Miller's avatar
      Merge tag 'master-2014-10-30' of git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless · 99a49ce6
      David S. Miller authored
      John W. Linville says:
      
      ====================
      pull request: wireless 2014-10-31
      
      Please pull this small batch of spooky fixes intended for the 3.18
      stream...boo!
      
      Cyril Brulebois adds an rt2x00 device ID.
      
      Dan Carpenter provides a one-line masking fix for an ath9k debugfs
      entry.
      
      Larry Finger gives us a package of small rtlwifi fixes which add some
      bits that were left out of some feature updates that were included
      in the merge window.  Hopefully this isn't a sign that the rtlwifi
      base is getting too big...
      
      Marc Yang brings a fix for a temporary mwifiex stall when doing 11n
      RX reordering.
      
      Please let me know if there are problems!
      ====================
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      99a49ce6
    • Lennart Sorensen's avatar
      drivers: net: cpsw: Support ALLMULTI and fix IFF_PROMISC in switch mode · 1e5c4bc4
      Lennart Sorensen authored
      The cpsw driver did not support the IFF_ALLMULTI flag which makes dynamic
      multicast routing not work.  Related to this, when enabling IFF_PROMISC
      in switch mode, all registered multicast addresses are flushed, resulting
      in only broadcast and unicast traffic being received.
      
      A new cpsw_ale_set_allmulti function now scans through the ALE entry
      table and adds/removes the host port from the unregistered multicast
      port mask of each vlan entry depending on the state of IFF_ALLMULTI.
      In promiscious mode, cpsw_ale_set_allmulti is used to force reception
      of all multicast traffic in addition to the unicast and broadcast traffic.
      
      With this change dynamic multicast and promiscious mode both work in
      switch mode.
      Signed-off-by: default avatarLen Sorensen <lsorense@csclub.uwaterloo.ca>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      1e5c4bc4
    • Lennart Sorensen's avatar
      drivers: net: cpsw: Fix broken loop condition in switch mode · 6f979eb3
      Lennart Sorensen authored
      0d961b3b (drivers: net: cpsw: fix buggy
      loop condition) accidentally fixed a loop comparison in too many places
      while fixing a real bug.
      
      It was correct to fix the dual_emac mode section since there 'i' is used
      as an index into priv->slaves which is a 0 based array.
      
      However the other two changes (which are only used in switch mode)
      are wrong since there 'i' is actually the ALE port number, and port 0
      is the host port, while port 1 and up are the slave ports.
      
      Putting the loop condition back in the switch mode section fixes it.
      
      A comment has been added to point out the intent clearly to avoid future
      confusion.  Also a comment is fixed that said the opposite of what was
      actually happening.
      Signed-off-by: default avatarLen Sorensen <lsorense@csclub.uwaterloo.ca>
      Acked-by: default avatarHeiko Schocher <hs@denx.de>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      6f979eb3
    • Guenter Roeck's avatar
      net: ethtool: Return -EOPNOTSUPP if user space tries to read EEPROM with lengh 0 · e0fb6fb6
      Guenter Roeck authored
      If a driver supports reading EEPROM but no EEPROM is installed in the system,
      the driver's get_eeprom_len function returns 0. ethtool will subsequently
      try to read that zero-length EEPROM anyway. If the driver does not support
      EEPROM access at all, this operation will return -EOPNOTSUPP. If the driver
      does support EEPROM access but no EEPROM is installed, the operation will
      return -EINVAL. Return -EOPNOTSUPP in both cases for consistency.
      Signed-off-by: default avatarGuenter Roeck <linux@roeck-us.net>
      Tested-by: default avatarAndrew Lunn <andrew@lunn.ch>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      e0fb6fb6
    • Andy Shevchenko's avatar
      stmmac: pci: set default of the filter bins · 1e19e084
      Andy Shevchenko authored
      The commit 3b57de95 brought the support for a different amount of the
      filter bins, but didn't update the PCI driver accordingly. This patch appends
      the default values when the device is enumerated via PCI bus.
      
      Fixes: 3b57de95 (net: stmmac: Support devicetree configs for mcast and ucast filter entries)
      Signed-off-by: default avatarAndy Shevchenko <andriy.shevchenko@linux.intel.com>
      Cc: stable@vger.kernel.org
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      1e19e084
    • Tony Lindgren's avatar
      net: smc91x: Fix gpios for device tree based booting · 7d2911c4
      Tony Lindgren authored
      With legacy booting, the platform init code was taking care of
      the configuring of GPIOs. With device tree based booting, things
      may or may not work depending what bootloader has configured or
      if the legacy platform code gets called.
      
      Let's add support for the pwrdn and reset GPIOs to the smc91x
      driver to fix the issues of smc91x not working properly when
      booted in device tree mode.
      
      And let's change n900 to use these settings as some versions
      of the bootloader do not configure things properly causing
      errors.
      Reported-by: default avatarKevin Hilman <khilman@linaro.org>
      Signed-off-by: default avatarTony Lindgren <tony@atomide.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      7d2911c4
    • Dwight Engen's avatar
      sunvdc: don't call VD_OP_GET_VTOC · 85b0c6e6
      Dwight Engen authored
      The VD_OP_GET_VTOC operation will succeed only if the vdisk backend has a
      VTOC label, otherwise it will fail. In particular, it will return error
      48 (ENOTSUP) if the disk has an EFI label. VTOC disk labels are already
      handled by directly reading the disk in block/partitions/sun.c (enabled by
      CONFIG_SUN_PARTITION which defaults to y on SPARC). Since port->label is
      unused in the driver, remove the call and the field.
      Signed-off-by: default avatarDwight Engen <dwight.engen@oracle.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      85b0c6e6
    • Pravin B Shelar's avatar
      mpls: Allow mpls_gso to be built as module · de05c400
      Pravin B Shelar authored
      Kconfig already allows mpls to be built as module. Following patch
      fixes Makefile to do same.
      
      CC: Simon Horman <simon.horman@netronome.com>
      Signed-off-by: default avatarPravin B Shelar <pshelar@nicira.com>
      Acked-by: default avatarSimon Horman <simon.horman@netronome.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      de05c400
    • Pravin B Shelar's avatar
      mpls: Fix mpls_gso handler. · f7065f4b
      Pravin B Shelar authored
      mpls gso handler needs to pull skb after segmenting skb.
      
      CC: Simon Horman <simon.horman@netronome.com>
      Signed-off-by: default avatarPravin B Shelar <pshelar@nicira.com>
      Acked-by: default avatarSimon Horman <simon.horman@netronome.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      f7065f4b
    • Linus Torvalds's avatar
      Merge branch 'core-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip · aea4869f
      Linus Torvalds authored
      Pull core fixes from Ingo Molnar:
       "The tree contains two RCU fixes and a compiler quirk comment fix"
      
      * 'core-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
        rcu: Make rcu_barrier() understand about missing rcuo kthreads
        compiler/gcc4+: Remove inaccurate comment about 'asm goto' miscompiles
        rcu: More on deadlock between CPU hotplug and expedited grace periods
      aea4869f
    • Linus Torvalds's avatar
      Merge branch 'timers-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip · 0f4b0676
      Linus Torvalds authored
      Pull timer fixes from Thomas Gleixner:
       "As you requested in the rc2 release mail the timer department serves
        you a few real bug fixes:
      
         - Fix the probe logic of the architected arm/arm64 timer
         - Plug a stack info leak in posix-timers
         - Prevent a shift out of bounds issue in the clockevents core"
      
      * 'timers-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
        ARM/ARM64: arch-timer: fix arch_timer_probed logic
        clockevents: Prevent shift out of bounds
        posix-timers: Fix stack info leak in timer_create()
      0f4b0676
    • Linus Torvalds's avatar
      Merge tag 'trace-fixes-v3.18-rc1-2' of... · bcdfdaee
      Linus Torvalds authored
      Merge tag 'trace-fixes-v3.18-rc1-2' of git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-trace
      
      Pull tracing fix from Steven Rostedt:
       "ARM has system calls outside the NR_syscalls range, and the generic
        tracing system does not support that and without checks, it can cause
        an oops to be reported.
      
        Rabin Vincent added checks in the return code on syscall events to
        make sure that the system call number is within the range that tracing
        knows about, and if not, simply ignores the system call.
      
        The system call tracing infrastructure needs to be rewritten to handle
        these cases better, but for now, to keep from oopsing, this patch will
        do"
      
      * tag 'trace-fixes-v3.18-rc1-2' of git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-trace:
        tracing/syscalls: Ignore numbers outside NR_syscalls' range
      bcdfdaee
    • Linus Torvalds's avatar
      Merge tag 'docs-for-linus' of git://git.lwn.net/linux-2.6 · 4f080f05
      Linus Torvalds authored
      Pull documentation fixes from Jonathan Corbet:
       "So this is my first pull request since I rashly agreed to look after
        the documentation subtree.  It contains some typo fixes, a few minor
        documentation improvements, and, most importantly, fixes for a couple
        of build problems in various bits of sample code.
      
        I fully intend to start sending pull requests with signed tags.
        However, due to poor planning on my part and the general obnoxiousness
        of life, I'm 2000 miles away from my private key which is sitting on a
        powered-down machine.  This should be fixed before my next request.
      
        Meanwhile git.lwn.net is a machine under my control, the patches are
        all trivial, and all have done time in linux-next"
      
      * tag 'docs-for-linus' of git://git.lwn.net/linux-2.6:
        Documentation/SubmittingPatches: Reported-by tags and permission
        Documentation: remove outdated references to the linux-next wiki
        Documentation: Restrict TSC test code to x86
        doc: kernel-parameters.txt: Add ide-generic.probe-mask
        vdso: don't require 64-bit math in standalone test
        Documentation: Add CONFIG_DEBUG_KMEMLEAK_DEFAULT_OFF case
        Documentation: Add default kmemleak off case in kernel-parameters.txt
        Docs: Document that the sticky bit is understood by hugetlbfs
        DocBook: Reduce noise from make cleandocs
        Documentation: fix vdso_standalone_test_x86 on 32-bit
        Documentation: dt-bindings: Explain order in patch series
        Documentation/ABI/testing/sysfs-ibft: fix a typo
      4f080f05
    • hayeswang's avatar
      r8152: stop submitting intr for -EPROTO · d59c876d
      hayeswang authored
      For Renesas USB 3.0 host controller, when unplugging the usb hub which
      has the RTL8153 plugged, the driver would get -EPROTO for interrupt
      transfer. There is high probability to get the information of "HC died;
      cleaning up", if the driver continues to submit the interrupt transfer
      before the disconnect() is called.
      
      [ 1024.197678] r8152 9-1.4:1.0 eth0: intr status -71
      [ 1024.213673] r8152 9-1.4:1.0 eth0: intr status -71
      [ 1024.229668] r8152 9-1.4:1.0 eth0: intr status -71
      [ 1024.245661] r8152 9-1.4:1.0 eth0: intr status -71
      [ 1024.261653] r8152 9-1.4:1.0 eth0: intr status -71
      [ 1024.277648] r8152 9-1.4:1.0 eth0: intr status -71
      [ 1024.293642] r8152 9-1.4:1.0 eth0: intr status -71
      [ 1024.309638] r8152 9-1.4:1.0 eth0: intr status -71
      [ 1024.325633] r8152 9-1.4:1.0 eth0: intr status -71
      [ 1024.341627] r8152 9-1.4:1.0 eth0: intr status -71
      [ 1024.357621] r8152 9-1.4:1.0 eth0: intr status -71
      [ 1024.373615] r8152 9-1.4:1.0 eth0: intr status -71
      [ 1024.383097] usb 9-1: USB disconnect, device number 2
      [ 1024.383103] usb 9-1.4: USB disconnect, device number 6
      [ 1029.391010] xhci_hcd 0000:04:00.0: xHCI host not responding to stop endpoint command.
      [ 1029.391016] xhci_hcd 0000:04:00.0: Assuming host is dying, halting host.
      [ 1029.392551] xhci_hcd 0000:04:00.0: HC died; cleaning up
      [ 1029.421480] usb 8-1: USB disconnect, device number 2
      Signed-off-by: default avatarHayes Wang <hayeswang@realtek.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      d59c876d
    • Dmitry Torokhov's avatar
      Revert "Input: i8042 - disable active multiplexing by default" · e55a3366
      Dmitry Torokhov authored
      This reverts commit 68da1664.
      
      It turns out that the assertion about scope of regressions due to
      always keeping keyboard controller in legacy mode was proven wrong.
      There are laptops, such as Clevo W650SH, that only have internal
      touchpad (no external PS/2 ports), that require active multiplexing
      mode to switch the touchpad (Elantech) into native mode instead of
      basic PS/2 emulation.
      Reported-by: default avatarRoel Aaij <roel.aaij@gmail.com>
      Signed-off-by: default avatarDmitry Torokhov <dmitry.torokhov@gmail.com>
      e55a3366