Skip to content
  1. Jan 21, 2018
  2. Jan 19, 2018
    • Paul Mackerras's avatar
      KVM: PPC: Book3S: Provide information about hardware/firmware CVE workarounds · 3214d01f
      Paul Mackerras authored
      
      
      This adds a new ioctl, KVM_PPC_GET_CPU_CHAR, that gives userspace
      information about the underlying machine's level of vulnerability
      to the recently announced vulnerabilities CVE-2017-5715,
      CVE-2017-5753 and CVE-2017-5754, and whether the machine provides
      instructions to assist software to work around the vulnerabilities.
      
      The ioctl returns two u64 words describing characteristics of the
      CPU and required software behaviour respectively, plus two mask
      words which indicate which bits have been filled in by the kernel,
      for extensibility.  The bit definitions are the same as for the
      new H_GET_CPU_CHARACTERISTICS hypercall.
      
      There is also a new capability, KVM_CAP_PPC_GET_CPU_CHAR, which
      indicates whether the new ioctl is available.
      
      Signed-off-by: default avatarPaul Mackerras <paulus@ozlabs.org>
      3214d01f
  3. Jan 17, 2018
  4. Jan 15, 2018
    • Linus Torvalds's avatar
      Linux 4.15-rc8 · a8750ddc
      Linus Torvalds authored
      a8750ddc
    • Linus Torvalds's avatar
      Merge branch 'x86-pti-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip · aaae98a8
      Linus Torvalds authored
      Pull x86 fixlet from Thomas Gleixner.
      
      Remove a warning about lack of compiler support for retpoline that most
      people can't do anything about, so it just annoys them needlessly.
      
      * 'x86-pti-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
        x86/retpoline: Remove compile time warning
      aaae98a8
    • Linus Torvalds's avatar
      Merge tag 'powerpc-4.15-7' of git://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux · 6bb82119
      Linus Torvalds authored
      Pull powerpc fixes from Michael Ellerman:
       "One fix for an oops at boot if we take a hotplug interrupt before we
        are ready to handle it.
      
        The bulk is patches to implement mitigation for Meltdown, see the
        change logs for more details.
      
        Thanks to: Nicholas Piggin, Michael Neuling, Oliver O'Halloran, Jon
        Masters, Jose Ricardo Ziviani, David Gibson"
      
      * tag 'powerpc-4.15-7' of git://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux:
        powerpc/powernv: Check device-tree for RFI flush settings
        powerpc/pseries: Query hypervisor for RFI flush settings
        powerpc/64s: Support disabling RFI flush with no_rfi_flush and nopti
        powerpc/64s: Add support for RFI flush of L1-D cache
        powerpc/64s: Convert slb_miss_common to use RFI_TO_USER/KERNEL
        powerpc/64: Convert fast_exception_return to use RFI_TO_USER/KERNEL
        powerpc/64: Convert the syscall exit path to use RFI_TO_USER/KERNEL
        powerpc/64s: Simple RFI macro conversions
        powerpc/64: Add macros for annotating the destination of rfid/hrfid
        powerpc/pseries: Add H_GET_CPU_CHARACTERISTICS flags & wrapper
        powerpc/pseries: Make RAS IRQ explicitly dependent on DLPAR WQ
      6bb82119
    • Thomas Gleixner's avatar
      x86/retpoline: Remove compile time warning · b8b9ce4b
      Thomas Gleixner authored
      Remove the compile time warning when CONFIG_RETPOLINE=y and the compiler
      does not have retpoline support. Linus rationale for this is:
      
        It's wrong because it will just make people turn off RETPOLINE, and the
        asm updates - and return stack clearing - that are independent of the
        compiler are likely the most important parts because they are likely the
        ones easiest to target.
      
        And it's annoying because most people won't be able to do anything about
        it. The number of people building their own compiler? Very small. So if
        their distro hasn't got a compiler yet (and pretty much nobody does), the
        warning is just annoying crap.
      
        It is already properly reported as part of the sysfs interface. The
        compile-time warning only encourages bad things.
      
      Fixes: 76b04384
      
       ("x86/retpoline: Add initial retpoline support")
      Requested-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      Signed-off-by: default avatarThomas Gleixner <tglx@linutronix.de>
      Cc: David Woodhouse <dwmw@amazon.co.uk>
      Cc: Peter Zijlstra (Intel) <peterz@infradead.org>
      Cc: gnomes@lxorguk.ukuu.org.uk
      Cc: Rik van Riel <riel@redhat.com>
      Cc: Andi Kleen <ak@linux.intel.com>
      Cc: Josh Poimboeuf <jpoimboe@redhat.com>
      Cc: thomas.lendacky@amd.com
      Cc: Linus Torvalds <torvalds@linux-foundation.org>
      Cc: Jiri Kosina <jikos@kernel.org>
      Cc: Andy Lutomirski <luto@amacapital.net>
      Cc: Dave Hansen <dave.hansen@intel.com>
      Cc: Kees Cook <keescook@google.com>
      Cc: Tim Chen <tim.c.chen@linux.intel.com>
      Cc: Greg Kroah-Hartman <gregkh@linux-foundation.org>
      Link: https://lkml.kernel.org/r/CA+55aFzWgquv4i6Mab6bASqYXg3ErV3XDFEYf=GEcCDQg5uAtw@mail.gmail.com
      b8b9ce4b
    • Linus Torvalds's avatar
      Merge branch 'for-linus' of git://git.kernel.dk/linux-block · 9443c168
      Linus Torvalds authored
      Pull NVMe fix from Jens Axboe:
       "Just a single fix for nvme over fabrics that should go into 4.15"
      
      * 'for-linus' of git://git.kernel.dk/linux-block:
        nvme-fabrics: initialize default host->id in nvmf_host_default()
      9443c168
    • Linus Torvalds's avatar
      Merge branch 'x86-pti-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip · 40548c6b
      Linus Torvalds authored
      Pull x86 pti updates from Thomas Gleixner:
       "This contains:
      
         - a PTI bugfix to avoid setting reserved CR3 bits when PCID is
           disabled. This seems to cause issues on a virtual machine at least
           and is incorrect according to the AMD manual.
      
         - a PTI bugfix which disables the perf BTS facility if PTI is
           enabled. The BTS AUX buffer is not globally visible and causes the
           CPU to fault when the mapping disappears on switching CR3 to user
           space. A full fix which restores BTS on PTI is non trivial and will
           be worked on.
      
         - PTI bugfixes for EFI and trusted boot which make sure that the user
           space visible page table entries have the NX bit cleared
      
         - removal of dead code in the PTI pagetable setup functions
      
         - add PTI documentation
      
         - add a selftest for vsyscall to verify that the kernel actually
           implements what it advertises.
      
         - a sysfs interface to expose vulnerability and mitigation
           information so there is a coherent way for users to retrieve the
           status.
      
         - the initial spectre_v2 mitigations, aka retpoline:
      
            + The necessary ASM thunk and compiler support
      
            + The ASM variants of retpoline and the conversion of affected ASM
              code
      
            + Make LFENCE serializing on AMD so it can be used as speculation
              trap
      
            + The RSB fill after vmexit
      
         - initial objtool support for retpoline
      
        As I said in the status mail this is the most of the set of patches
        which should go into 4.15 except two straight forward patches still on
        hold:
      
         - the retpoline add on of LFENCE which waits for ACKs
      
         - the RSB fill after context switch
      
        Both should be ready to go early next week and with that we'll have
        covered the major holes of spectre_v2 and go back to normality"
      
      * 'x86-pti-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: (28 commits)
        x86,perf: Disable intel_bts when PTI
        security/Kconfig: Correct the Documentation reference for PTI
        x86/pti: Fix !PCID and sanitize defines
        selftests/x86: Add test_vsyscall
        x86/retpoline: Fill return stack buffer on vmexit
        x86/retpoline/irq32: Convert assembler indirect jumps
        x86/retpoline/checksum32: Convert assembler indirect jumps
        x86/retpoline/xen: Convert Xen hypercall indirect jumps
        x86/retpoline/hyperv: Convert assembler indirect jumps
        x86/retpoline/ftrace: Convert ftrace assembler indirect jumps
        x86/retpoline/entry: Convert entry assembler indirect jumps
        x86/retpoline/crypto: Convert crypto assembler indirect jumps
        x86/spectre: Add boot time option to select Spectre v2 mitigation
        x86/retpoline: Add initial retpoline support
        objtool: Allow alternatives to be ignored
        objtool: Detect jumps to retpoline thunks
        x86/pti: Make unpoison of pgd for trusted boot work for real
        x86/alternatives: Fix optimize_nops() checking
        sysfs/cpu: Fix typos in vulnerability documentation
        x86/cpu/AMD: Use LFENCE_RDTSC in preference to MFENCE_RDTSC
        ...
      40548c6b
  5. Jan 14, 2018
    • Peter Zijlstra's avatar
      x86,perf: Disable intel_bts when PTI · 99a9dc98
      Peter Zijlstra authored
      The intel_bts driver does not use the 'normal' BTS buffer which is exposed
      through the cpu_entry_area but instead uses the memory allocated for the
      perf AUX buffer.
      
      This obviously comes apart when using PTI because then the kernel mapping;
      which includes that AUX buffer memory; disappears. Fixing this requires to
      expose a mapping which is visible in all context and that's not trivial.
      
      As a quick fix disable this driver when PTI is enabled to prevent
      malfunction.
      
      Fixes: 385ce0ea
      
       ("x86/mm/pti: Add Kconfig")
      Reported-by: default avatarVince Weaver <vincent.weaver@maine.edu>
      Reported-by: default avatarRobert Święcki <robert@swiecki.net>
      Signed-off-by: default avatarPeter Zijlstra (Intel) <peterz@infradead.org>
      Signed-off-by: default avatarThomas Gleixner <tglx@linutronix.de>
      Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
      Cc: greg@kroah.com
      Cc: hughd@google.com
      Cc: luto@amacapital.net
      Cc: Vince Weaver <vince@deater.net>
      Cc: torvalds@linux-foundation.org
      Cc: stable@vger.kernel.org
      Link: https://lkml.kernel.org/r/20180114102713.GB6166@worktop.programming.kicks-ass.net
      99a9dc98
    • W. Trevor King's avatar
      security/Kconfig: Correct the Documentation reference for PTI · a237f762
      W. Trevor King authored
      When the config option for PTI was added a reference to documentation was
      added as well. But the documentation did not exist at that point. The final
      documentation has a different file name.
      
      Fix it up to point to the proper file.
      
      Fixes: 385ce0ea
      
       ("x86/mm/pti: Add Kconfig")
      Signed-off-by: default avatarW. Trevor King <wking@tremily.us>
      Signed-off-by: default avatarThomas Gleixner <tglx@linutronix.de>
      Cc: Dave Hansen <dave.hansen@linux.intel.com>
      Cc: linux-mm@kvack.org
      Cc: linux-security-module@vger.kernel.org
      Cc: James Morris <james.l.morris@oracle.com>
      Cc: "Serge E. Hallyn" <serge@hallyn.com>
      Cc: stable@vger.kernel.org
      Link: https://lkml.kernel.org/r/3009cc8ccbddcd897ec1e0cb6dda524929de0d14.1515799398.git.wking@tremily.us
      a237f762
    • Thomas Gleixner's avatar
      x86/pti: Fix !PCID and sanitize defines · f10ee3dc
      Thomas Gleixner authored
      The switch to the user space page tables in the low level ASM code sets
      unconditionally bit 12 and bit 11 of CR3. Bit 12 is switching the base
      address of the page directory to the user part, bit 11 is switching the
      PCID to the PCID associated with the user page tables.
      
      This fails on a machine which lacks PCID support because bit 11 is set in
      CR3. Bit 11 is reserved when PCID is inactive.
      
      While the Intel SDM claims that the reserved bits are ignored when PCID is
      disabled, the AMD APM states that they should be cleared.
      
      This went unnoticed as the AMD APM was not checked when the code was
      developed and reviewed and test systems with Intel CPUs never failed to
      boot. The report is against a Centos 6 host where the guest fails to boot,
      so it's not yet clear whether this is a virt issue or can happen on real
      hardware too, but thats irrelevant as the AMD APM clearly ask for clearing
      the reserved bits.
      
      Make sure that on non PCID machines bit 11 is not set by the page table
      switching code.
      
      Andy suggested to rename the related bits and masks so they are clearly
      describing what they should be used for, which is done as well for clarity.
      
      That split could have been done with alternatives but the macro hell is
      horrible and ugly. This can be done on top if someone cares to remove the
      extra orq. For now it's a straight forward fix.
      
      Fixes: 6fd166aa
      
       ("x86/mm: Use/Fix PCID to optimize user/kernel switches")
      Reported-by: default avatarLaura Abbott <labbott@redhat.com>
      Signed-off-by: default avatarThomas Gleixner <tglx@linutronix.de>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: stable <stable@vger.kernel.org>
      Cc: Borislav Petkov <bp@alien8.de>
      Cc: Andy Lutomirski <luto@kernel.org>
      Cc: Willy Tarreau <w@1wt.eu>
      Cc: David Woodhouse <dwmw@amazon.co.uk>
      Link: https://lkml.kernel.org/r/alpine.DEB.2.20.1801140009150.2371@nanos
      f10ee3dc
    • Linus Torvalds's avatar
      Merge tag 'usb-4.15-rc8' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb · 2c1cfa49
      Linus Torvalds authored
      Pull USB fixes from Greg KH:
       "Here are some small USB fixes and device ids for 4.15-rc8
      
        Nothing major, small fixes for various devices, some resolutions for
        bugs found by fuzzers, and the usual handful of new device ids.
      
        All of these have been in linux-next with no reported issues"
      
      * tag 'usb-4.15-rc8' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb:
        Documentation: usb: fix typo in UVC gadgetfs config command
        usb: misc: usb3503: make sure reset is low for at least 100us
        uas: ignore UAS for Norelsys NS1068(X) chips
        USB: UDC core: fix double-free in usb_add_gadget_udc_release
        USB: fix usbmon BUG trigger
        usbip: vudc_tx: fix v_send_ret_submit() vulnerability to null xfer buffer
        usbip: remove kernel addresses from usb device and urb debug msgs
        usbip: fix vudc_rx: harden CMD_SUBMIT path to handle malicious input
        USB: serial: cp210x: add new device ID ELV ALC 8xxx
        USB: serial: cp210x: add IDs for LifeScan OneTouch Verio IQ
      2c1cfa49
    • Linus Torvalds's avatar
      Merge tag 'staging-4.15-rc8' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging · d5a047fd
      Linus Torvalds authored
      Pull staging driver fix from Greg KH:
       "Here is a single android ashmem bugfix that resolves a reported issue
        in that interface. It's been in linux-next this week with no reported
        issues"
      
      * tag 'staging-4.15-rc8' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging:
        staging: android: ashmem: fix a race condition in ASHMEM_SET_SIZE ioctl
      d5a047fd
    • Linus Torvalds's avatar
      Merge tag 'char-misc-4.15-rc8' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc · 9e8f8f1e
      Linus Torvalds authored
      Pull char/misc fixes from Greg KH:
       "Here are two bugfixes for some driver bugs for 4.15-rc8
      
        The first is a bluetooth security bug that has been ignored by the
        Bluetooth developers for months for no obvious reason at all, so I've
        taken it through my tree.
      
        The second is a simple double-free bug in the mux subsystem.
      
        Both have been in linux-next for a while with no reported issues"
      
      * tag 'char-misc-4.15-rc8' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc:
        mux: core: fix double get_device()
        Bluetooth: Prevent stack info leak from the EFS element.
      9e8f8f1e
    • Linus Torvalds's avatar
      Merge tag 'kbuild-fixes-v4.15' of... · 22079ee4
      Linus Torvalds authored
      Merge tag 'kbuild-fixes-v4.15' of git://git.kernel.org/pub/scm/linux/kernel/git/masahiroy/linux-kbuild
      
      Pull Kbuild fixes from Masahiro Yamada:
      
       - fix cross-compilation for architectures that setup CROSS_COMPILE in
         their arch Makefile
      
       - fix Kconfig rational operators for bool / tristate
      
       - drop a gperf-generated file from .gitignore
      
      * tag 'kbuild-fixes-v4.15' of git://git.kernel.org/pub/scm/linux/kernel/git/masahiroy/linux-kbuild:
        genksyms: drop *.hash.c from .gitignore
        kconfig: fix relational operators for bool and tristate symbols
        kbuild: move cc-option and cc-disable-warning after incl. arch Makefile
      22079ee4
    • Linus Torvalds's avatar
      Merge tag 'apparmor-pr-2018-01-12' of... · 852b0a89
      Linus Torvalds authored
      Merge tag 'apparmor-pr-2018-01-12' of git://git.kernel.org/pub/scm/linux/kernel/git/jj/linux-apparmor
      
      Pull apparmor regression fixes from John Johansen:
       "This fixes a couple bugs I have been working with Matthew Garrett on
        this week. Specifically a regression in the handling of a conflicting
        profile attachment and label match restrictions for ptrace when
        profiles are stacked.
      
        Summary:
      
         - fix ptrace label match when matching stacked labels
      
         - fix regression in profile conflict logic"
      
      * tag 'apparmor-pr-2018-01-12' of git://git.kernel.org/pub/scm/linux/kernel/git/jj/linux-apparmor:
        apparmor: Fix regression in profile conflict logic
        apparmor: fix ptrace label match when matching stacked labels
      852b0a89
    • Linus Torvalds's avatar
      Merge tag 'pci-v4.15-fixes-2' of git://git.kernel.org/pub/scm/linux/kernel/git/helgaas/pci · 8e66791a
      Linus Torvalds authored
      Pull PCI fixes from Bjorn Helgaas:
       "Fix AMD boot regression due to 64-bit window conflicting with system
        memory (Christian König)"
      
      * tag 'pci-v4.15-fixes-2' of git://git.kernel.org/pub/scm/linux/kernel/git/helgaas/pci:
        x86/PCI: Move and shrink AMD 64-bit window to avoid conflict
        x86/PCI: Add "pci=big_root_window" option for AMD 64-bit windows
      8e66791a
    • Linus Torvalds's avatar
      Merge branch 'akpm' (patches from Andrew) · ed93de84
      Linus Torvalds authored
      Merge misc fixlets from Andrew Morton:
       "4 fixes"
      
      * emailed patches from Andrew Morton <akpm@linux-foundation.org>:
        tools/objtool/Makefile: don't assume sync-check.sh is executable
        kdump: write correct address of mem_section into vmcoreinfo
        kmemleak: allow to coexist with fault injection
        MAINTAINERS, nilfs2: change project home URLs
      ed93de84
    • Andrew Morton's avatar
      tools/objtool/Makefile: don't assume sync-check.sh is executable · 0f908ccb
      Andrew Morton authored
      patch(1) loses the x bit.  So if a user follows our patching
      instructions in Documentation/admin-guide/README.rst, their kernel will
      not compile.
      
      Fixes: 3bd51c5a
      
       ("objtool: Move kernel headers/code sync check to a script")
      Reported-by: default avatarNicolas Bock <nicolasbock@gentoo.org>
      Reported-by Joakim Tjernlund <Joakim.Tjernlund@infinera.com>
      Cc: Ingo Molnar <mingo@kernel.org>
      Cc: Josh Poimboeuf <jpoimboe@redhat.com>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      0f908ccb
    • Kirill A. Shutemov's avatar
      kdump: write correct address of mem_section into vmcoreinfo · a0b12803
      Kirill A. Shutemov authored
      
      
      Depending on configuration mem_section can now be an array or a pointer
      to an array allocated dynamically.  In most cases, we can continue to
      refer to it as 'mem_section' regardless of what it is.
      
      But there's one exception: '&mem_section' means "address of the array"
      if mem_section is an array, but if mem_section is a pointer, it would
      mean "address of the pointer".
      
      We've stepped onto this in kdump code.  VMCOREINFO_SYMBOL(mem_section)
      writes down address of pointer into vmcoreinfo, not array as we wanted.
      
      Let's introduce VMCOREINFO_SYMBOL_ARRAY() that would handle the
      situation correctly for both cases.
      
      Link: http://lkml.kernel.org/r/20180112162532.35896-1-kirill.shutemov@linux.intel.com
      Signed-off-by: default avatarKirill A. Shutemov <kirill.shutemov@linux.intel.com>
      Fixes: 83e3c487
      
       ("mm/sparsemem: Allocate mem_section at runtime for CONFIG_SPARSEMEM_EXTREME=y")
      Acked-by: default avatarBaoquan He <bhe@redhat.com>
      Acked-by: default avatarDave Young <dyoung@redhat.com>
      Cc: Ingo Molnar <mingo@redhat.com>
      Cc: Thomas Gleixner <tglx@linutronix.de>
      Cc: "H. Peter Anvin" <hpa@zytor.com>
      Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
      Cc: Dave Young <dyoung@redhat.com>
      Cc: Baoquan He <bhe@redhat.com>
      Cc: Vivek Goyal <vgoyal@redhat.com>
      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>
      a0b12803
    • Dmitry Vyukov's avatar
      kmemleak: allow to coexist with fault injection · d9570ee3
      Dmitry Vyukov authored
      
      
      kmemleak does one slab allocation per user allocation.  So if slab fault
      injection is enabled to any degree, kmemleak instantly fails to allocate
      and turns itself off.  However, it's useful to use kmemleak with fault
      injection to find leaks on error paths.  On the other hand, checking
      kmemleak itself is not so useful because (1) it's a debugging tool and
      (2) it has a very regular allocation pattern (basically a single
      allocation site, so it either works or not).
      
      Turn off fault injection for kmemleak allocations.
      
      Link: http://lkml.kernel.org/r/20180109192243.19316-1-dvyukov@google.com
      Signed-off-by: default avatarDmitry Vyukov <dvyukov@google.com>
      Cc: Catalin Marinas <catalin.marinas@arm.com>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      d9570ee3
    • Ryusuke Konishi's avatar
      MAINTAINERS, nilfs2: change project home URLs · bed6760c
      Ryusuke Konishi authored
      
      
      The domain of NILFS project home was changed to "nilfs.sourceforge.io"
      to enable https access (the previous domain "nilfs.sourceforge.net" is
      redirected to the new one).  Modify URLs of the project home to reflect
      this change and to replace their protocol from http to https.
      
      Link: http://lkml.kernel.org/r/1515416141-5614-1-git-send-email-konishi.ryusuke@lab.ntt.co.jp
      Signed-off-by: default avatarRyusuke Konishi <konishi.ryusuke@lab.ntt.co.jp>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      bed6760c
  6. Jan 13, 2018
    • Masahiro Yamada's avatar
      genksyms: drop *.hash.c from .gitignore · 36c16816
      Masahiro Yamada authored
      This is a left-over of commit bb3290d9
      
       ("Remove gperf usage from
      toolchain").
      
      We do not generate a hash function any more.
      
      Signed-off-by: default avatarMasahiro Yamada <yamada.masahiro@socionext.com>
      36c16816
    • Andy Lutomirski's avatar
      selftests/x86: Add test_vsyscall · 352909b4
      Andy Lutomirski authored
      
      
      This tests that the vsyscall entries do what they're expected to do.
      It also confirms that attempts to read the vsyscall page behave as
      expected.
      
      If changes are made to the vsyscall code or its memory map handling,
      running this test in all three of vsyscall=none, vsyscall=emulate,
      and vsyscall=native are helpful.
      
      (Because it's easy, this also compares the vsyscall results to their
       vDSO equivalents.)
      
      Note to KAISER backporters: please test this under all three
      vsyscall modes.  Also, in the emulate and native modes, make sure
      that test_vsyscall_64 agrees with the command line or config
      option as to which mode you're in.  It's quite easy to mess up
      the kernel such that native mode accidentally emulates
      or vice versa.
      
      Greg, etc: please backport this to all your Meltdown-patched
      kernels.  It'll help make sure the patches didn't regress
      vsyscalls.
      
      CSigned-off-by: default avatarAndy Lutomirski <luto@kernel.org>
      Cc: Andy Lutomirski <luto@kernel.org>
      Cc: Borislav Petkov <bp@alien8.de>
      Cc: Dave Hansen <dave.hansen@linux.intel.com>
      Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
      Cc: H. Peter Anvin <hpa@zytor.com>
      Cc: Hugh Dickins <hughd@google.com>
      Cc: Josh Poimboeuf <jpoimboe@redhat.com>
      Cc: Juergen Gross <jgross@suse.com>
      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>
      Cc: stable@vger.kernel.org
      Link: http://lkml.kernel.org/r/2b9c5a174c1d60fd7774461d518aa75598b1d8fd.1515719552.git.luto@kernel.org
      Signed-off-by: default avatarIngo Molnar <mingo@kernel.org>
      352909b4
    • Matthew Garrett's avatar
      apparmor: Fix regression in profile conflict logic · 1a3881d3
      Matthew Garrett authored
      The intended behaviour in apparmor profile matching is to flag a
      conflict if two profiles match equally well. However, right now a
      conflict is generated if another profile has the same match length even
      if that profile doesn't actually match. Fix the logic so we only
      generate a conflict if the profiles match.
      
      Fixes: 844b8292
      
       ("apparmor: ensure that undecidable profile attachments fail")
      Cc: Stable <stable@vger.kernel.org>
      Signed-off-by: default avatarMatthew Garrett <mjg59@google.com>
      Signed-off-by: default avatarJohn Johansen <john.johansen@canonical.com>
      1a3881d3
    • John Johansen's avatar
      apparmor: fix ptrace label match when matching stacked labels · 0dda0b3f
      John Johansen authored
      Given a label with a profile stack of
        A//&B or A//&C ...
      
      A ptrace rule should be able to specify a generic trace pattern with
      a rule like
      
        ptrace trace A//&**,
      
      however this is failing because while the correct label match routine
      is called, it is being done post label decomposition so it is always
      being done against a profile instead of the stacked label.
      
      To fix this refactor the cross check to pass the full peer label in to
      the label_match.
      
      Fixes: 290f458a
      
       ("apparmor: allow ptrace checks to be finer grained than just capability")
      Cc: Stable <stable@vger.kernel.org>
      Reported-by: default avatarMatthew Garrett <mjg59@google.com>
      Tested-by: default avatarMatthew Garrett <mjg59@google.com>
      Signed-off-by: default avatarJohn Johansen <john.johansen@canonical.com>
      0dda0b3f
    • Linus Torvalds's avatar
      Merge branch 'x86-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip · c92a9a46
      Linus Torvalds authored
      Pull x86 fixes from Ingo Molnar:
       "Two pending (non-PTI) x86 fixes:
      
         - an Intel-MID crash fix
      
         - and an Intel microcode loader blacklist quirk to avoid a
           problematic revision"
      
      * 'x86-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
        x86/platform/intel-mid: Revert "Make 'bt_sfi_data' const"
        x86/microcode/intel: Extend BDW late-loading with a revision check
      c92a9a46
    • Linus Torvalds's avatar
      Merge branch 'sched-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip · 67549d46
      Linus Torvalds authored
      Pull scheduler fixes from Ingo Molnar:
       "A Kconfig fix, a build fix and a membarrier bug fix"
      
      * 'sched-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
        membarrier: Disable preemption when calling smp_call_function_many()
        sched/isolation: Make CONFIG_CPU_ISOLATION=y depend on SMP or COMPILE_TEST
        ia64, sched/cputime: Fix build error if CONFIG_VIRT_CPU_ACCOUNTING_NATIVE=y
      67549d46
    • Linus Torvalds's avatar
      Merge branch 'locking-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip · 02776b9b
      Linus Torvalds authored
      Pull locking fixes from Ingo Molnar:
       "No functional effects intended: removes leftovers from recent lockdep
        and refcounts work"
      
      * 'locking-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
        locking/refcounts: Remove stale comment from the ARCH_HAS_REFCOUNT Kconfig entry
        locking/lockdep: Remove cross-release leftovers
        locking/Documentation: Remove stale crossrelease_fullstack parameter
      02776b9b
    • Linus Torvalds's avatar
      Merge tag 'for-linus-4.15-rc8-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/xen/tip · aefd1404
      Linus Torvalds authored
      Pull xen fixes from Juergen Gross:
       "This contains two build fixes for clang and two fixes for rather
        unlikely situations in the Xen gntdev driver"
      
      * tag 'for-linus-4.15-rc8-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/xen/tip:
        xen/gntdev: Fix partial gntdev_mmap() cleanup
        xen/gntdev: Fix off-by-one error when unmapping with holes
        x86: xen: remove the use of VLAIS
        x86/xen/time: fix section mismatch for xen_init_time_ops()
      aefd1404
    • Linus Torvalds's avatar
      Merge tag 'for-linus' of git://git.kernel.org/pub/scm/virt/kvm/kvm · 4e67483a
      Linus Torvalds authored
      Pull KVM fixes from Paolo Bonzini:
       "PPC:
         - user-triggerable use-after-free in HPT resizing
         - stale TLB entries in the guest
         - trap-and-emulate (PR) KVM guests failing to start under pHyp
      
        x86:
         - Another "Spectre" fix.
         - async pagefault fix
         - Revert an old fix for x86 nested virtualization, which turned out
           to do more harm than good
         - Check shrinker registration return code, to avoid warnings from
           upcoming 4.16 -mm patches"
      
      * tag 'for-linus' of git://git.kernel.org/pub/scm/virt/kvm/kvm:
        KVM: x86: Add memory barrier on vmcs field lookup
        KVM: x86: emulate #UD while in guest mode
        x86: kvm: propagate register_shrinker return code
        KVM MMU: check pending exception before injecting APF
        KVM: PPC: Book3S HV: Always flush TLB in kvmppc_alloc_reset_hpt()
        KVM: PPC: Book3S PR: Fix WIMG handling under pHyp
        KVM: PPC: Book3S HV: Fix use after free in case of multiple resize requests
        KVM: PPC: Book3S HV: Drop prepare_done from struct kvm_resize_hpt
      4e67483a
    • Linus Torvalds's avatar
      Merge branch 'linus' of git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6 · 70cd9071
      Linus Torvalds authored
      Pull crypto fix from Herbert Xu:
       "This fixes a NULL pointer dereference in crypto_remove_spawns that can
        be triggered through af_alg"
      
      * 'linus' of git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6:
        crypto: algapi - fix NULL dereference in crypto_remove_spawns()
      70cd9071
    • Jens Axboe's avatar
      Merge branch 'nvme-4.15' of git://git.infradead.org/nvme into for-linus · 32835a07
      Jens Axboe authored
      Pull a single NVMe fix from Christoph for 4.15.
      32835a07
    • Linus Torvalds's avatar
      Merge tag 'mmc-v4.15-rc2-2' of git://git.kernel.org/pub/scm/linux/kernel/git/ulfh/mmc · f12e0dd0
      Linus Torvalds authored
      Pull MMC host fixes from Ulf Hansson:
      
       - s3mci: mark debug_regs[] as static
      
       - renesas_sdhi: Add MODULE_LICENSE
      
      * tag 'mmc-v4.15-rc2-2' of git://git.kernel.org/pub/scm/linux/kernel/git/ulfh/mmc:
        mmc: s3mci: mark debug_regs[] as static
        mmc: renesas_sdhi: Add MODULE_LICENSE
      f12e0dd0
    • Linus Torvalds's avatar
      Merge tag 'drm-fixes-for-v4.15-rc8' of git://people.freedesktop.org/~airlied/linux · 352ef571
      Linus Torvalds authored
      Pull drm fixes from Dave Airlie:
      
       - Nouveau: regression fix
      
       - Tegra: regression fix
      
       - vmwgfx: crasher + freed data leak
      
       - i915: KASAN use after free fix, whitelist register to avoid hang fix,
         GVT fixes
      
       - vc4: irq/pm fix
      
      * tag 'drm-fixes-for-v4.15-rc8' of git://people.freedesktop.org/~airlied/linux:
        drm/i915: Don't adjust priority on an already signaled fence
        drm/i915: Whitelist SLICE_COMMON_ECO_CHICKEN1 on Geminilake.
        drm/vmwgfx: Potential off by one in vmw_view_add()
        drm/tegra: sor: Fix hang on Tegra124 eDP
        drm/vmwgfx: Don't cache framebuffer maps
        drm/nouveau/disp/gf119: add missing drive vfunc ptr
        drm/i915/gvt: Fix stack-out-of-bounds bug in cmd parser
        drm/i915/gvt: Clear the shadow page table entry after post-sync
        drm/vc4: Move IRQ enable to PM path
      352ef571
  7. Jan 12, 2018
    • David Woodhouse's avatar
      x86/retpoline: Fill return stack buffer on vmexit · 117cc7a9
      David Woodhouse authored
      
      
      In accordance with the Intel and AMD documentation, we need to overwrite
      all entries in the RSB on exiting a guest, to prevent malicious branch
      target predictions from affecting the host kernel. This is needed both
      for retpoline and for IBRS.
      
      [ak: numbers again for the RSB stuffing labels]
      
      Signed-off-by: default avatarDavid Woodhouse <dwmw@amazon.co.uk>
      Signed-off-by: default avatarThomas Gleixner <tglx@linutronix.de>
      Tested-by: default avatarPeter Zijlstra (Intel) <peterz@infradead.org>
      Cc: gnomes@lxorguk.ukuu.org.uk
      Cc: Rik van Riel <riel@redhat.com>
      Cc: Andi Kleen <ak@linux.intel.com>
      Cc: Josh Poimboeuf <jpoimboe@redhat.com>
      Cc: thomas.lendacky@amd.com
      Cc: Linus Torvalds <torvalds@linux-foundation.org>
      Cc: Jiri Kosina <jikos@kernel.org>
      Cc: Andy Lutomirski <luto@amacapital.net>
      Cc: Dave Hansen <dave.hansen@intel.com>
      Cc: Kees Cook <keescook@google.com>
      Cc: Tim Chen <tim.c.chen@linux.intel.com>
      Cc: Greg Kroah-Hartman <gregkh@linux-foundation.org>
      Cc: Paul Turner <pjt@google.com>
      Link: https://lkml.kernel.org/r/1515755487-8524-1-git-send-email-dwmw@amazon.co.uk
      117cc7a9