1. 21 Sep, 2015 1 commit
    • Borislav Petkov's avatar
      x86/entry/vsyscall: Fix undefined symbol warning · 93f13a9f
      Borislav Petkov authored
      Commit:
      
        3dc33bd3 ("x86/entry/vsyscall: Add CONFIG to control default")
      
      did the ifdef/elif thing but GCC doesn't like that:
      
        arch/x86/entry/vsyscall/vsyscall_64.c:44:7: warning: "CONFIG_LEGACY_VSYSCALL_NONE" is not defined [-Wundef]
         #elif CONFIG_LEGACY_VSYSCALL_NONE
               ^
      
      Use defined() instead.
      Signed-off-by: default avatarBorislav Petkov <bp@suse.de>
      Cc: Andy Lutomirski <luto@amacapital.net>
      Cc: Brian Gerst <brgerst@gmail.com>
      Cc: Denys Vlasenko <dvlasenk@redhat.com>
      Cc: H. Peter Anvin <hpa@zytor.com>
      Cc: Josh Triplett <josh@joshtriplett.org>
      Cc: Kees Cook <keescook@chromium.org>
      Cc: Linus Torvalds <torvalds@linux-foundation.org>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Thomas Gleixner <tglx@linutronix.de>
      Link: http://lkml.kernel.org/r/20150921074829.GA3550@pd.tnicSigned-off-by: default avatarIngo Molnar <mingo@kernel.org>
      93f13a9f
  2. 20 Sep, 2015 1 commit
  3. 18 Sep, 2015 12 commits
    • Denys Vlasenko's avatar
      x86/asm/entry/32, selftests: Add 'test_syscall_vdso' test · c25be94f
      Denys Vlasenko authored
      This new test checks that all x86 registers are preserved across
      32-bit syscalls. It tests syscalls through VDSO (if available)
      and through INT 0x80, normally and under ptrace.
      
      If kernel is a 64-bit one, high registers (r8..r15) are poisoned
      before the syscall is called and are checked afterwards.
      
      They must be either preserved, or cleared to zero (but r11 is
      special); r12..15 must be preserved for INT 0x80.
      
      EFLAGS is checked for changes too, but change there is not
      considered to be a bug (paravirt kernels do not preserve
      arithmetic flags).
      
      Run-tested on 64-bit kernel:
      
      	$ ./test_syscall_vdso_32
      	[RUN]	Executing 6-argument 32-bit syscall via VDSO
      	[OK]	Arguments are preserved across syscall
      	[NOTE]	R11 has changed:0000000000200ed7 - assuming clobbered by
      	SYSRET insn [OK]	R8..R15 did not leak kernel data
      	[RUN]	Executing 6-argument 32-bit syscall via INT 80
      	[OK]	Arguments are preserved across syscall
      	[OK]	R8..R15 did not leak kernel data
      	[RUN]	Running tests under ptrace
      	[RUN]	Executing 6-argument 32-bit syscall via VDSO
      	[OK]	Arguments are preserved across syscall
      	[OK]	R8..R15 did not leak kernel data
      	[RUN]	Executing 6-argument 32-bit syscall via INT 80
      	[OK]	Arguments are preserved across syscall
      	[OK]	R8..R15 did not leak kernel data
      
      On 32-bit paravirt kernel:
      
      	$ ./test_syscall_vdso_32
      	[NOTE]	Not a 64-bit kernel, won't test R8..R15 leaks
      	[RUN]	Executing 6-argument 32-bit syscall via VDSO
      	[WARN]	Flags before=0000000000200ed7 id 0 00 o d i s z 0 a 0 p 1 c
      	[WARN]	Flags  after=0000000000200246 id 0 00 i z 0 0 p 1
      	[WARN]	Flags change=0000000000000c91 0 00 o d s 0 a 0 0 c
      	[OK]	Arguments are preserved across syscall
      	[RUN]	Executing 6-argument 32-bit syscall via INT 80
      	[OK]	Arguments are preserved across syscall
      	[RUN]	Running tests under ptrace
      	[RUN]	Executing 6-argument 32-bit syscall via VDSO
      	[OK]	Arguments are preserved across syscall
      	[RUN]	Executing 6-argument 32-bit syscall via INT 80
      	[OK]	Arguments are preserved across syscall
      Signed-off-by: default avatarDenys Vlasenko <dvlasenk@redhat.com>
      Acked-by: default avatarAndy Lutomirski <luto@amacapital.net>
      Cc: Alexei Starovoitov <ast@plumgrid.com>
      Cc: Borislav Petkov <bp@alien8.de>
      Cc: Brian Gerst <brgerst@gmail.com>
      Cc: Frederic Weisbecker <fweisbec@gmail.com>
      Cc: H. Peter Anvin <hpa@zytor.com>
      Cc: Kees Cook <keescook@chromium.org>
      Cc: Linus Torvalds <torvalds@linux-foundation.org>
      Cc: Oleg Nesterov <oleg@redhat.com>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Shuah Khan <shuahkh@osg.samsung.com>
      Cc: Steven Rostedt <rostedt@goodmis.org>
      Cc: Thomas Gleixner <tglx@linutronix.de>
      Cc: Will Drewry <wad@chromium.org>
      Cc: linux-kernel@vger.kernel.org
      Link: http://lkml.kernel.org/r/1442427809-2027-1-git-send-email-dvlasenk@redhat.comSigned-off-by: default avatarIngo Molnar <mingo@kernel.org>
      c25be94f
    • Linus Torvalds's avatar
      Merge tag 'platform-drivers-x86-v4.3-2' of... · a7d5c189
      Linus Torvalds authored
      Merge tag 'platform-drivers-x86-v4.3-2' of git://git.infradead.org/users/dvhart/linux-platform-drivers-x86
      
      Pull x86 platform driver fixes from Darren Hart:
       "Fix an issue introduced by the previous major toshiba rework.  Add a
        quirk.  Workaround a few platform specific firmware items.  One
        cleanup to wmi I inadvertently dropped from a previous pull request.
      
        Details:
      
        hp-wmi:
         - limit hotkey enable
      
        toshiba_acpi:
         - Fix hotkeys registration on some toshiba models
         - Fix USB Sleep and Music always disabled
      
        wmi:
         - Remove private %pUL implementation
      
        asus-nb-wmi:
         - Add wapf=4 quirk for X456UA/X456UF"
      
      * tag 'platform-drivers-x86-v4.3-2' of git://git.infradead.org/users/dvhart/linux-platform-drivers-x86:
        hp-wmi: limit hotkey enable
        toshiba_acpi: Fix hotkeys registration on some toshiba models
        toshiba_acpi: Fix USB Sleep and Music always disabled
        wmi: Remove private %pUL implementation
        asus-nb-wmi: Add wapf=4 quirk for X456UA/X456UF
      a7d5c189
    • Linus Torvalds's avatar
      Merge branch 'akpm' (patches from Andrew) · a8f15585
      Linus Torvalds authored
      Merge misc fixes from ANdrew Morton:
       "8 fixes"
      
      * emailed patches from Andrew Morton <akpm@linux-foundation.org>:
        revert "mm: make sure all file VMAs have ->vm_ops set"
        MAINTAINERS: update LTP mailing list
        userfaultfd: add missing mmput() in error path
        lib/string_helpers.c: fix infinite loop in string_get_size()
        alpha: lib: export __delay
        alpha: io: define ioremap_uc
        kasan: fix last shadow judgement in memory_is_poisoned_16()
        zram: fix possible use after free in zcomp_create()
      a8f15585
    • Andrew Morton's avatar
      revert "mm: make sure all file VMAs have ->vm_ops set" · 28c553d0
      Andrew Morton authored
      Revert commit 6dc296e7 "mm: make sure all file VMAs have ->vm_ops
      set".
      
      Will Deacon reports that it "causes some mmap regressions in LTP, which
      appears to use a MAP_PRIVATE mmap of /dev/zero as a way to get anonymous
      pages in some of its tests (specifically mmap10 [1])".
      
      William Shuman reports Oracle crashes.
      
      So revert the patch while we work out what to do.
      Reported-by: default avatarWilliam Shuman <wshuman3@gmail.com>
      Reported-by: default avatarWill Deacon <will.deacon@arm.com>
      Cc: Kirill A. Shutemov <kirill.shutemov@linux.intel.com>
      Cc: Oleg Nesterov <oleg@redhat.com>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      28c553d0
    • Cyril Hrubis's avatar
      MAINTAINERS: update LTP mailing list · 0526109a
      Cyril Hrubis authored
      [akpm@linux-foundation.org: Wanlong Gao has moved]
      Signed-off-by: default avatarCyril Hrubis <chrubis@suse.cz>
      Cc: Jan Stancek <jstancek@redhat.com>
      Cc: Stanislav Kholmanskikh <stanislav.kholmanskikh@oracle.com>
      Cc: Alexey Kodanev <alexey.kodanev@oracle.com>
      Cc: Wanlong Gao <wanlong.gao@gmail.com>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      0526109a
    • Eric Biggers's avatar
      userfaultfd: add missing mmput() in error path · c03e946f
      Eric Biggers authored
      This fixes a memleak if anon_inode_getfile() fails in userfaultfd().
      Signed-off-by: default avatarEric Biggers <ebiggers3@gmail.com>
      Signed-off-by: default avatarAndrea Arcangeli <aarcange@redhat.com>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      c03e946f
    • Vitaly Kuznetsov's avatar
      lib/string_helpers.c: fix infinite loop in string_get_size() · 62bef58a
      Vitaly Kuznetsov authored
      Some string_get_size() calls (e.g.:
       string_get_size(1, 512, STRING_UNITS_10, ..., ...)
       string_get_size(15, 64, STRING_UNITS_10, ..., ...)
      ) result in an infinite loop. The problem is that if size is equal to
      divisor[units]/blk_size and is smaller than divisor[units] we'll end
      up with size == 0 when we start doing sf_cap calculations:
      
      For string_get_size(1, 512, STRING_UNITS_10, ..., ...) case:
         ...
         remainder = do_div(size, divisor[units]); -> size is 0, remainder is 1
         remainder *= blk_size; -> remainder is 512
         ...
         size *= blk_size; -> size is still 0
         size += remainder / divisor[units]; -> size is still 0
      
      The caller causing the issue is sd_read_capacity(), the problem was
      noticed on Hyper-V, such weird size was reported by host when scanning
      collides with device removal.  This is probably a separate issue worth
      fixing, this patch is intended to prevent the library routine from
      infinite looping.
      Signed-off-by: default avatarVitaly Kuznetsov <vkuznets@redhat.com>
      Acked-by: default avatarJames Bottomley <JBottomley@Odin.com>
      Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
      Cc: Rasmus Villemoes <linux@rasmusvillemoes.dk>
      Cc: "K. Y. Srinivasan" <kys@microsoft.com>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      62bef58a
    • Sudip Mukherjee's avatar
      alpha: lib: export __delay · 14b97ded
      Sudip Mukherjee authored
      __delay was not exported as a result while building with allmodconfig we
      were getting build error of undefined symbol.  __delay is being used by:
      drivers/net/phy/mdio-octeon.c
      Signed-off-by: default avatarSudip Mukherjee <sudip@vectorindia.org>
      Cc: Richard Henderson <rth@twiddle.net>
      Cc: Ivan Kokshaysky <ink@jurassic.park.msu.ru>
      Cc: Matt Turner <mattst88@gmail.com>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      14b97ded
    • Sudip Mukherjee's avatar
      alpha: io: define ioremap_uc · 969560d2
      Sudip Mukherjee authored
      ioremap_uc was not defined and as a result while building with
      allmodconfig were getting build error of: implicit declaration of
      function 'ioremap_uc'.
      Signed-off-by: default avatarSudip Mukherjee <sudip@vectorindia.org>
      Cc: Richard Henderson <rth@twiddle.net>
      Cc: Ivan Kokshaysky <ink@jurassic.park.msu.ru>
      Cc: Matt Turner <mattst88@gmail.com>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      969560d2
    • Xishi Qiu's avatar
      kasan: fix last shadow judgement in memory_is_poisoned_16() · 8d77a6d1
      Xishi Qiu authored
      The shadow which correspond 16 bytes memory may span 2 or 3 bytes.  If
      the memory is aligned on 8, then the shadow takes only 2 bytes.  So we
      check "shadow_first_bytes" is enough, and need not to call
      "memory_is_poisoned_1(addr + 15);".  But the code "if
      (likely(!last_byte))" is wrong judgement.
      
      e.g.  addr=0, so last_byte = 15 & KASAN_SHADOW_MASK = 7, then the code
      will continue to call "memory_is_poisoned_1(addr + 15);"
      Signed-off-by: default avatarXishi Qiu <qiuxishi@huawei.com>
      Acked-by: default avatarAndrey Ryabinin <aryabinin@virtuozzo.com>
      Cc: Andrey Konovalov <adech.fo@gmail.com>
      Cc: Rusty Russell <rusty@rustcorp.com.au>
      Cc: Michal Marek <mmarek@suse.cz>
      Cc: <zhongjiang@huawei.com>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      8d77a6d1
    • Luis Henriques's avatar
      zram: fix possible use after free in zcomp_create() · 3aaf14da
      Luis Henriques authored
      zcomp_create() verifies the success of zcomp_strm_{multi,single}_create()
      through comp->stream, which can potentially be pointing to memory that
      was freed if these functions returned an error.
      
      While at it, replace a 'ERR_PTR(-ENOMEM)' by a more generic
      'ERR_PTR(error)' as in the future zcomp_strm_{multi,siggle}_create()
      could return other error codes.  Function documentation updated
      accordingly.
      
      Fixes: beca3ec7 ("zram: add multi stream functionality")
      Signed-off-by: default avatarLuis Henriques <luis.henriques@canonical.com>
      Acked-by: default avatarSergey Senozhatsky <sergey.senozhatsky@gmail.com>
      Acked-by: default avatarMinchan Kim <minchan@kernel.org>
      Cc: <stable@vger.kernel.org>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      3aaf14da
    • Kyle Evans's avatar
      hp-wmi: limit hotkey enable · 8a1513b4
      Kyle Evans authored
      Do not write initialize magic on systems that do not have
      feature query 0xb. Fixes Bug #82451.
      
      Redefine FEATURE_QUERY to align with 0xb and FEATURE2 with 0xd
      for code clearity.
      
      Add a new test function, hp_wmi_bios_2008_later() & simplify
      hp_wmi_bios_2009_later(), which fixes a bug in cases where
      an improper value is returned. Probably also fixes Bug #69131.
      
      Add missing __init tag.
      Signed-off-by: default avatarKyle Evans <kvans32@gmail.com>
      Cc: stable@vger.kernel.org
      Signed-off-by: default avatarDarren Hart <dvhart@linux.intel.com>
      8a1513b4
  4. 17 Sep, 2015 14 commits
  5. 16 Sep, 2015 7 commits
    • Linus Torvalds's avatar
      Merge tag 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dledford/rdma · 72714841
      Linus Torvalds authored
      Pull rdma driver move from Doug Ledford:
       "This is a move only, no functional changes.
      
        I tried to get it in prior to the rc1 release, but we were waiting on
        IBM to get back to us that they were OK with the deprecation and
        eventual removal of this driver.  That OK didn't materialize until
        last week, so integration and testing time pushed us beyond the rc1
        release.
      
        Summary:
      
         - Move ehca driver to staging/rdma and schedule for deletion"
      
      * tag 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dledford/rdma:
        IB/ehca: Deprecate driver, move to staging, schedule deletion
      72714841
    • Linus Torvalds's avatar
      Merge tag 'hwmon-for-linus-v4.3-rc2' of... · 30255100
      Linus Torvalds authored
      Merge tag 'hwmon-for-linus-v4.3-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/groeck/linux-staging
      
      Pull hwmon fixes from Guenter Roeck:
       "Two patches for the nct6775 driver: add support for NCT6793D, and fix
        swapped registers"
      
      * tag 'hwmon-for-linus-v4.3-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/groeck/linux-staging:
        hwmon: (nct6775) Add support for NCT6793D
        hwmon: (nct6775) Swap STEP_UP_TIME and STEP_DOWN_TIME registers for most chips
      30255100
    • Linus Torvalds's avatar
      Merge tag 'pinctrl-v4.3-2' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-pinctrl · 9efeaaf9
      Linus Torvalds authored
      Pull pin control fixes from Linus Walleij:
       "This is a first set of pin control fixes for the v4.3 series.  Nothing
        special to say, business as usual.
      
         - Some IS_ERR() fixes from Julia Lawall.  I always wanted the
           compiler to catch these but error pointers by nailing them as an
           err pointer intrinsic type or something seem to be a "no can do".
           In any case, cocinelle is obviously up to the task, better than
           bugs staying around.
      
         - Better error handling for NULL GPIO chips.
      
         - Fix a compile error from the big irq desc refactoring.  I'm
           surprised the fallout wasn't bigger than this"
      
      * tag 'pinctrl-v4.3-2' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-pinctrl:
        pinctrl: samsung: s3c24xx: fix syntax error
        pinctrl: core: Warn about NULL gpio_chip in pinctrl_ready_for_gpio_range()
        pinctrl: join lines that can be a single line within 80 columns
        pinctrl: digicolor: convert null test to IS_ERR test
        pinctrl: qcom: ssbi: convert null test to IS_ERR test
      9efeaaf9
    • Linus Torvalds's avatar
      Merge tag 'gpio-v4.3-2' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-gpio · d1291ebd
      Linus Torvalds authored
      Pull GPIO fixes from Linus Walleij:
       "This is the first round of GPIO fixes for v4.3.  Quite a lot of
        patches, but the influx of new stuff in the merge window was equally
        big, so I'm not surprised.
      
         - Return value checks and thus nicer errorpath for two drivers.
      
         - Make GPIO_RCAR arch neutral.
      
         - Propagate errors from GPIO chip ->get() vtable call.  It turned out
           these can actually fail sometimes, especially on slowpath
           controllers doing I2C traffic and similar.
      
         - Update documentation to be in sync with the massive changes in the
           v4.3 merge window, phew.
      
         - Handle deferred probe properly in the OMAP driver.
      
         - Get rid of surplus MODULE_ALIAS() from sx150x"
      
      * tag 'gpio-v4.3-2' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-gpio:
        gpio: omap: Fix GPIO numbering for deferred probe
        Documentation: gpio: Explain that <function>-gpio is also supported
        gpio: omap: Fix gpiochip_add() handling for deferred probe
        gpio: sx150x: Remove unnecessary MODULE_ALIAS()
        Documentation: gpio: board: describe the con_id parameter
        Documentation: gpio: board: add flags parameter to gpiod_get*() functions
        gpio: Propagate errors from chip->get()
        gpio: rcar: GPIO_RCAR doesn't relate to ARM
        gpio: mxs: need to check return value of irq_alloc_generic_chip
        gpio: mxc: need to check return value of irq_alloc_generic_chip
      d1291ebd
    • Linus Torvalds's avatar
      Merge git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6 · aa57e0b2
      Linus Torvalds authored
      Pull crypto fixes from Herbert Xu:
       "This fixes the following issues:
      
         - The selftest overreads the IV test vector.
      
        - Fix potential infinite loop in sunxi-ss driver.
      
         - Fix powerpc build failure when VMX is set without VSX"
      
      * git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6:
        crypto: testmgr - don't copy from source IV too much
        crypto: sunxi-ss - Fix a possible driver hang with ciphers
        crypto: vmx - VMX crypto should depend on CONFIG_VSX
      aa57e0b2
    • David Woodhouse's avatar
      x86/platform: Fix Geode LX timekeeping in the generic x86 build · 03da3ff1
      David Woodhouse authored
      In 2007, commit 07190a08 ("Mark TSC on GeodeLX reliable")
      bypassed verification of the TSC on Geode LX. However, this code
      (now in the check_system_tsc_reliable() function in
      arch/x86/kernel/tsc.c) was only present if CONFIG_MGEODE_LX was
      set.
      
      OpenWRT has recently started building its generic Geode target
      for Geode GX, not LX, to include support for additional
      platforms. This broke the timekeeping on LX-based devices,
      because the TSC wasn't marked as reliable:
      https://dev.openwrt.org/ticket/20531
      
      By adding a runtime check on is_geode_lx(), we can also include
      the fix if CONFIG_MGEODEGX1 or CONFIG_X86_GENERIC are set, thus
      fixing the problem.
      Signed-off-by: default avatarDavid Woodhouse <David.Woodhouse@intel.com>
      Cc: Andres Salomon <dilinger@queued.net>
      Cc: Linus Torvalds <torvalds@linux-foundation.org>
      Cc: Marcelo Tosatti <marcelo@kvack.org>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Thomas Gleixner <tglx@linutronix.de>
      Cc: stable@vger.kernel.org
      Link: http://lkml.kernel.org/r/1442409003.131189.87.camel@infradead.orgSigned-off-by: default avatarIngo Molnar <mingo@kernel.org>
      03da3ff1
    • Ingo Molnar's avatar
      Merge tag 'perf-urgent-for-mingo' of... · f6cf87f7
      Ingo Molnar authored
      Merge tag 'perf-urgent-for-mingo' of git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux into perf/urgent
      
      Pull perf/urgent fixes from Arnaldo Carvalho de Melo:
      
      - Fix segfault pressing -> in 'perf top' with no hist entries. (Wang Nan)
      
         E.g:
      	perf top -e page-faults --pid 11400 # 11400 generates no page-fault
      
      - Fix propagation of thread and cpu maps, that got broken when doing incomplete
        changes to better support events with a PMU cpu mask, leading to Intel PT to
        fail with an error like:
      
          $ perf record -e intel_pt//u uname
          Error: The sys_perf_event_open() syscall returned with
                    22 (Invalid argument) for event (sched:sched_switch).
      
        Because intel_pt adds that sched:sched_switch evsel to the evlist after the
        thread/cpu maps were propagated to the evsels, fix it. (Adrian Hunter)
      Signed-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      Signed-off-by: default avatarIngo Molnar <mingo@kernel.org>
      f6cf87f7
  6. 15 Sep, 2015 5 commits