1. 06 Oct, 2014 1 commit
    • Andy Lutomirski's avatar
      x86_64, entry: Filter RFLAGS.NT on entry from userspace · 8c7aa698
      Andy Lutomirski authored
      The NT flag doesn't do anything in long mode other than causing IRET
      to #GP.  Oddly, CPL3 code can still set NT using popf.
      
      Entry via hardware or software interrupt clears NT automatically, so
      the only relevant entries are fast syscalls.
      
      If user code causes kernel code to run with NT set, then there's at
      least some (small) chance that it could cause trouble.  For example,
      user code could cause a call to EFI code with NT set, and who knows
      what would happen?  Apparently some games on Wine sometimes do
      this (!), and, if an IRET return happens, they will segfault.  That
      segfault cannot be handled, because signal delivery fails, too.
      
      This patch programs the CPU to clear NT on entry via SYSCALL (both
      32-bit and 64-bit, by my reading of the AMD APM), and it clears NT
      in software on entry via SYSENTER.
      
      To save a few cycles, this borrows a trick from Jan Beulich in Xen:
      it checks whether NT is set before trying to clear it.  As a result,
      it seems to have very little effect on SYSENTER performance on my
      machine.
      
      There's another minor bug fix in here: it looks like the CFI
      annotations were wrong if CONFIG_AUDITSYSCALL=n.
      
      Testers beware: on Xen, SYSENTER with NT set turns into a GPF.
      
      I haven't touched anything on 32-bit kernels.
      
      The syscall mask change comes from a variant of this patch by Anish
      Bhatt.
      
      Note to stable maintainers: there is no known security issue here.
      A misguided program can set NT and cause the kernel to try and fail
      to deliver SIGSEGV, crashing the program.  This patch fixes Far Cry
      on Wine: https://bugs.winehq.org/show_bug.cgi?id=33275
      
      Cc: <stable@vger.kernel.org>
      Reported-by: default avatarAnish Bhatt <anish@chelsio.com>
      Signed-off-by: default avatarAndy Lutomirski <luto@amacapital.net>
      Link: http://lkml.kernel.org/r/395749a5d39a29bd3e4b35899cf3a3c1340e5595.1412189265.git.luto@amacapital.netSigned-off-by: default avatarH. Peter Anvin <hpa@zytor.com>
      8c7aa698
  2. 01 Oct, 2014 1 commit
  3. 28 Sep, 2014 3 commits
  4. 27 Sep, 2014 15 commits
  5. 26 Sep, 2014 14 commits
  6. 25 Sep, 2014 6 commits
    • Linus Torvalds's avatar
      Merge tag 'pm+acpi-3.17-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm · f4cb707e
      Linus Torvalds authored
      Pull ACPI and power management fixes from Rafael Wysocki:
       "These are regression fixes (ACPI hotplug, cpufreq, hibernation, ACPI
        LPSS driver), fixes for stuff that never worked correctly (ACPI GPIO
        support in some cases and a wrong sign of an error code in the ACPI
        core in one place), and one blacklist item for ACPI backlight
        handling.
      
        Specifics:
      
         - Revert of a recent hibernation core commit that introduced a NULL
           pointer dereference during resume for at least one user (Rafael J
           Wysocki).
      
         - Fix for the ACPI LPSS (Low-Power Subsystem) driver to disable
           asynchronous PM callback execution for LPSS devices during system
           suspend/resume (introduced in 3.16) which turns out to break
           ordering expectations on some systems.  From Fu Zhonghui.
      
         - cpufreq core fix related to the handling of sysfs nodes during
           system suspend/resume that has been broken for intel_pstate since
           3.15 from Lan Tianyu.
      
         - Restore the generation of "online" uevents for ACPI container
           devices that was removed in 3.14, but some user space utilities
           turn out to need them (Rafael J Wysocki).
      
         - The cpufreq core fails to release a lock in an error code path
           after changes made in 3.14.  Fix from Prarit Bhargava.
      
         - ACPICA and ACPI/GPIO fixes to make the handling of ACPI GPIO
           operation regions (which means AML using GPIOs) work correctly in
           all cases from Bob Moore and Srinivas Pandruvada.
      
         - Fix for a wrong sign of the ACPI core's create_modalias() return
           value in case of an error from Mika Westerberg.
      
         - ACPI backlight blacklist entry for ThinkPad X201s from Aaron Lu"
      
      * tag 'pm+acpi-3.17-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm:
        Revert "PM / Hibernate: Iterate over set bits instead of PFNs in swsusp_free()"
        gpio / ACPI: Use pin index and bit length
        ACPICA: Update to GPIO region handler interface.
        ACPI / platform / LPSS: disable async suspend/resume of LPSS devices
        cpufreq: release policy->rwsem on error
        cpufreq: fix cpufreq suspend/resume for intel_pstate
        ACPI / scan: Correct error return value of create_modalias()
        ACPI / video: disable native backlight for ThinkPad X201s
        ACPI / hotplug: Generate online uevents for ACPI containers
      f4cb707e
    • Linus Torvalds's avatar
      Merge branch 'i2c/for-current' of git://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux · 12df9f37
      Linus Torvalds authored
      Pull i2c fixes from Wolfram Sang:
       "This is probably not the kind of pull request you want to see that
        late in the cycle.  Yet, the ACPI refactorization was problematic
        again and caused another two issues which need fixing.  My holidays
        with limited internet (plus travelling) and the developer's illness
        didn't help either :(
      
        The details:
      
         - ACPI code was refactored out into a seperate file and as a
           side-effect, the i2c-core module got renamed.  Jean Delvare
           rightfully complained about the rename being problematic for
           distributions.  So, Mika and I thought the least problematic way to
           deal with it is to move all the code back into the main i2c core
           source file.  This is mainly a huge code move with some #ifdeffery
           applied.  No functional code changes.  Our personal tests and the
           testbots did not find problems.  (I was thinking about reverting,
           too, yet that would also have ~800 lines changed)
      
         - The new ACPI code also had a NULL pointer exception, thanks to
           Peter for finding and fixing it.
      
         - Mikko fixed a locking problem by decoupling clock_prepare and
           clock_enable.
      
         - Addy learnt that the datasheet was wrong and reimplemented the
           frequency setup according to the new algorithm.
      
        - Fan fixed an off-by-one error when copying data
      
        - Janusz fixed a copy'n'paste bug which gave a wrong error message
      
        - Sergei made sure that "don't touch" bits are not accessed"
      
      * 'i2c/for-current' of git://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux:
        i2c: acpi: Fix NULL Pointer dereference
        i2c: move acpi code back into the core
        i2c: rk3x: fix divisor calculation for SCL frequency
        i2c: mxs: fix error message in pio transfer
        i2c: ismt: use correct length when copy buffer
        i2c: rcar: fix RCAR_IRQ_ACK_{RECV|SEND}
        i2c: tegra: Move clk_prepare/clk_set_rate to probe
      12df9f37
    • Randy Dunlap's avatar
      MAINTAINERS: new Documentation maintainer · d671e424
      Randy Dunlap authored
      Transfer Documentation maintainership to Jiri Kosina.
      Thanks, Jiri.
      
      I'll still be reviewing and working on documentation.
      Signed-off-by: default avatarRandy Dunlap <rdunlap@infradead.org>
      Acked-by: default avatarJiri Kosina <jkosina@suse.cz>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      d671e424
    • Rafael J. Wysocki's avatar
      Merge branches 'pm-cpufreq' and 'pm-sleep' · 381e63da
      Rafael J. Wysocki authored
      * pm-cpufreq:
        cpufreq: release policy->rwsem on error
        cpufreq: fix cpufreq suspend/resume for intel_pstate
      
      * pm-sleep:
        Revert "PM / Hibernate: Iterate over set bits instead of PFNs in swsusp_free()"
      381e63da
    • Rafael J. Wysocki's avatar
      Merge branches 'acpi-hotplug', 'acpi-scan', 'acpi-lpss', 'acpi-gpio' and 'acpi-video' · 9ef5a306
      Rafael J. Wysocki authored
      * acpi-hotplug:
        ACPI / hotplug: Generate online uevents for ACPI containers
      
      * acpi-scan:
        ACPI / scan: Correct error return value of create_modalias()
      
      * acpi-lpss:
        ACPI / platform / LPSS: disable async suspend/resume of LPSS devices
      
      * acpi-gpio:
        gpio / ACPI: Use pin index and bit length
        ACPICA: Update to GPIO region handler interface.
      
      * acpi-video:
        ACPI / video: disable native backlight for ThinkPad X201s
      9ef5a306
    • Linus Torvalds's avatar
      Merge tag 'gpio-v3.17-4' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-gpio · 2289823c
      Linus Torvalds authored
      Pull gpio fixes from Linus Walleij:
       "Two GPIO fixes:
      
         - GPIO direction flags where handled wrong in the new descriptor-
           based API, so direction changes did not always "take".
      
         - Fix a handler installation race in the generic GPIO irqchip code"
      
      * tag 'gpio-v3.17-4' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-gpio:
        gpio: Fix potential NULL handler data in chained irqchip handler
        gpio: Fix gpio direction flags not getting set
      2289823c