commit 81d0cc85caabe062991ea45ddada814835d47fb0
Author: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Date:   Wed Feb 7 11:12:26 2018 -0800

    Linux 4.14.18

commit 8d1ed7d4e1ce6d4d08676f5b2bb1a4e83b3ad5f7
Author: Ian Abbott <abbotti@mev.co.uk>
Date:   Wed Nov 15 16:33:12 2017 -0600

    fpga: region: release of_parse_phandle nodes after use
    
    commit 0f5eb1545907edeea7672a9c1652c4231150ff22 upstream.
    
    Both fpga_region_get_manager() and fpga_region_get_bridges() call
    of_parse_phandle(), but nothing calls of_node_put() on the returned
    struct device_node pointers.  Make sure to do that to stop their
    reference counters getting out of whack.
    
    Fixes: 0fa20cdfcc1f ("fpga: fpga-region: device tree control for FPGA")
    Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
    Signed-off-by: Alan Tull <atull@kernel.org>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

commit a252f37c5f8b998ccd419d1562a3c069890eb1d4
Author: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
Date:   Thu Jan 11 18:57:26 2018 +0100

    serial: core: mark port as initialized after successful IRQ change
    
    commit 44117a1d1732c513875d5a163f10d9adbe866c08 upstream.
    
    setserial changes the IRQ via uart_set_info(). It invokes
    uart_shutdown() which free the current used IRQ and clear
    TTY_PORT_INITIALIZED. It will then update the IRQ number and invoke
    uart_startup() before returning to the caller leaving
    TTY_PORT_INITIALIZED cleared.
    
    The next open will crash with
    |  list_add double add: new=ffffffff839fcc98, prev=ffffffff839fcc98, next=ffffffff839fcc98.
    since the close from the IOCTL won't free the IRQ (and clean the list)
    due to the TTY_PORT_INITIALIZED check in uart_shutdown().
    
    There is same pattern in uart_do_autoconfig() and I *think* it also
    needs to set TTY_PORT_INITIALIZED there.
    Is there a reason why uart_startup() does not set the flag by itself
    after the IRQ has been acquired (since it is cleared in uart_shutdown)?
    
    Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

commit f6d90612c96c99d98f204c7641becfd7295a6fc2
Author: KarimAllah Ahmed <karahmed@amazon.de>
Date:   Sat Feb 3 15:56:23 2018 +0100

    KVM/SVM: Allow direct access to MSR_IA32_SPEC_CTRL
    
    commit b2ac58f90540e39324e7a29a7ad471407ae0bf48
    
    [ Based on a patch from Paolo Bonzini <pbonzini@redhat.com> ]
    
    ... basically doing exactly what we do for VMX:
    
    - Passthrough SPEC_CTRL to guests (if enabled in guest CPUID)
    - Save and restore SPEC_CTRL around VMExit and VMEntry only if the guest
      actually used it.
    
    Signed-off-by: KarimAllah Ahmed <karahmed@amazon.de>
    Signed-off-by: David Woodhouse <dwmw@amazon.co.uk>
    Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
    Reviewed-by: Darren Kenny <darren.kenny@oracle.com>
    Reviewed-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
    Cc: Andrea Arcangeli <aarcange@redhat.com>
    Cc: Andi Kleen <ak@linux.intel.com>
    Cc: Jun Nakajima <jun.nakajima@intel.com>
    Cc: kvm@vger.kernel.org
    Cc: Dave Hansen <dave.hansen@intel.com>
    Cc: Tim Chen <tim.c.chen@linux.intel.com>
    Cc: Andy Lutomirski <luto@kernel.org>
    Cc: Asit Mallick <asit.k.mallick@intel.com>
    Cc: Arjan Van De Ven <arjan.van.de.ven@intel.com>
    Cc: Greg KH <gregkh@linuxfoundation.org>
    Cc: Paolo Bonzini <pbonzini@redhat.com>
    Cc: Dan Williams <dan.j.williams@intel.com>
    Cc: Linus Torvalds <torvalds@linux-foundation.org>
    Cc: Ashok Raj <ashok.raj@intel.com>
    Link: https://lkml.kernel.org/r/1517669783-20732-1-git-send-email-karahmed@amazon.de
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

commit 4a82531c96a20ab008e7f5a903e85d46a81fd3a3
Author: KarimAllah Ahmed <karahmed@amazon.de>
Date:   Thu Feb 1 22:59:45 2018 +0100

    KVM/VMX: Allow direct access to MSR_IA32_SPEC_CTRL
    
    commit d28b387fb74da95d69d2615732f50cceb38e9a4d
    
    [ Based on a patch from Ashok Raj <ashok.raj@intel.com> ]
    
    Add direct access to MSR_IA32_SPEC_CTRL for guests. This is needed for
    guests that will only mitigate Spectre V2 through IBRS+IBPB and will not
    be using a retpoline+IBPB based approach.
    
    To avoid the overhead of saving and restoring the MSR_IA32_SPEC_CTRL for
    guests that do not actually use the MSR, only start saving and restoring
    when a non-zero is written to it.
    
    No attempt is made to handle STIBP here, intentionally. Filtering STIBP
    may be added in a future patch, which may require trapping all writes
    if we don't want to pass it through directly to the guest.
    
    [dwmw2: Clean up CPUID bits, save/restore manually, handle reset]
    
    Signed-off-by: KarimAllah Ahmed <karahmed@amazon.de>
    Signed-off-by: David Woodhouse <dwmw@amazon.co.uk>
    Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
    Reviewed-by: Darren Kenny <darren.kenny@oracle.com>
    Reviewed-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
    Reviewed-by: Jim Mattson <jmattson@google.com>
    Cc: Andrea Arcangeli <aarcange@redhat.com>
    Cc: Andi Kleen <ak@linux.intel.com>
    Cc: Jun Nakajima <jun.nakajima@intel.com>
    Cc: kvm@vger.kernel.org
    Cc: Dave Hansen <dave.hansen@intel.com>
    Cc: Tim Chen <tim.c.chen@linux.intel.com>
    Cc: Andy Lutomirski <luto@kernel.org>
    Cc: Asit Mallick <asit.k.mallick@intel.com>
    Cc: Arjan Van De Ven <arjan.van.de.ven@intel.com>
    Cc: Greg KH <gregkh@linuxfoundation.org>
    Cc: Paolo Bonzini <pbonzini@redhat.com>
    Cc: Dan Williams <dan.j.williams@intel.com>
    Cc: Linus Torvalds <torvalds@linux-foundation.org>
    Cc: Ashok Raj <ashok.raj@intel.com>
    Link: https://lkml.kernel.org/r/1517522386-18410-5-git-send-email-karahmed@amazon.de
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

commit 0716f551d5a29dc3abb128996aa02269b527fa45
Author: KarimAllah Ahmed <karahmed@amazon.de>
Date:   Thu Feb 1 22:59:44 2018 +0100

    KVM/VMX: Emulate MSR_IA32_ARCH_CAPABILITIES
    
    commit 28c1c9fabf48d6ad596273a11c46e0d0da3e14cd
    
    Intel processors use MSR_IA32_ARCH_CAPABILITIES MSR to indicate RDCL_NO
    (bit 0) and IBRS_ALL (bit 1). This is a read-only MSR. By default the
    contents will come directly from the hardware, but user-space can still
    override it.
    
    [dwmw2: The bit in kvm_cpuid_7_0_edx_x86_features can be unconditional]
    
    Signed-off-by: KarimAllah Ahmed <karahmed@amazon.de>
    Signed-off-by: David Woodhouse <dwmw@amazon.co.uk>
    Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
    Reviewed-by: Paolo Bonzini <pbonzini@redhat.com>
    Reviewed-by: Darren Kenny <darren.kenny@oracle.com>
    Reviewed-by: Jim Mattson <jmattson@google.com>
    Reviewed-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
    Cc: Andrea Arcangeli <aarcange@redhat.com>
    Cc: Andi Kleen <ak@linux.intel.com>
    Cc: Jun Nakajima <jun.nakajima@intel.com>
    Cc: kvm@vger.kernel.org
    Cc: Dave Hansen <dave.hansen@intel.com>
    Cc: Linus Torvalds <torvalds@linux-foundation.org>
    Cc: Andy Lutomirski <luto@kernel.org>
    Cc: Asit Mallick <asit.k.mallick@intel.com>
    Cc: Arjan Van De Ven <arjan.van.de.ven@intel.com>
    Cc: Greg KH <gregkh@linuxfoundation.org>
    Cc: Dan Williams <dan.j.williams@intel.com>
    Cc: Tim Chen <tim.c.chen@linux.intel.com>
    Cc: Ashok Raj <ashok.raj@intel.com>
    Link: https://lkml.kernel.org/r/1517522386-18410-4-git-send-email-karahmed@amazon.de
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

commit d395d69de67ea95760e1f207eb0f6fdfbcb6e069
Author: Ashok Raj <ashok.raj@intel.com>
Date:   Thu Feb 1 22:59:43 2018 +0100

    KVM/x86: Add IBPB support
    
    commit 15d45071523d89b3fb7372e2135fbd72f6af9506
    
    The Indirect Branch Predictor Barrier (IBPB) is an indirect branch
    control mechanism. It keeps earlier branches from influencing
    later ones.
    
    Unlike IBRS and STIBP, IBPB does not define a new mode of operation.
    It's a command that ensures predicted branch targets aren't used after
    the barrier. Although IBRS and IBPB are enumerated by the same CPUID
    enumeration, IBPB is very different.
    
    IBPB helps mitigate against three potential attacks:
    
    * Mitigate guests from being attacked by other guests.
      - This is addressed by issing IBPB when we do a guest switch.
    
    * Mitigate attacks from guest/ring3->host/ring3.
      These would require a IBPB during context switch in host, or after
      VMEXIT. The host process has two ways to mitigate
      - Either it can be compiled with retpoline
      - If its going through context switch, and has set !dumpable then
        there is a IBPB in that path.
        (Tim's patch: https://patchwork.kernel.org/patch/10192871)
      - The case where after a VMEXIT you return back to Qemu might make
        Qemu attackable from guest when Qemu isn't compiled with retpoline.
      There are issues reported when doing IBPB on every VMEXIT that resulted
      in some tsc calibration woes in guest.
    
    * Mitigate guest/ring0->host/ring0 attacks.
      When host kernel is using retpoline it is safe against these attacks.
      If host kernel isn't using retpoline we might need to do a IBPB flush on
      every VMEXIT.
    
    Even when using retpoline for indirect calls, in certain conditions 'ret'
    can use the BTB on Skylake-era CPUs. There are other mitigations
    available like RSB stuffing/clearing.
    
    * IBPB is issued only for SVM during svm_free_vcpu().
      VMX has a vmclear and SVM doesn't.  Follow discussion here:
      https://lkml.org/lkml/2018/1/15/146
    
    Please refer to the following spec for more details on the enumeration
    and control.
    
    Refer here to get documentation about mitigations.
    
    https://software.intel.com/en-us/side-channel-security-support
    
    [peterz: rebase and changelog rewrite]
    [karahmed: - rebase
               - vmx: expose PRED_CMD if guest has it in CPUID
               - svm: only pass through IBPB if guest has it in CPUID
               - vmx: support !cpu_has_vmx_msr_bitmap()]
               - vmx: support nested]
    [dwmw2: Expose CPUID bit too (AMD IBPB only for now as we lack IBRS)
            PRED_CMD is a write-only MSR]
    
    Signed-off-by: Ashok Raj <ashok.raj@intel.com>
    Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
    Signed-off-by: David Woodhouse <dwmw@amazon.co.uk>
    Signed-off-by: KarimAllah Ahmed <karahmed@amazon.de>
    Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
    Reviewed-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
    Cc: Andrea Arcangeli <aarcange@redhat.com>
    Cc: Andi Kleen <ak@linux.intel.com>
    Cc: kvm@vger.kernel.org
    Cc: Asit Mallick <asit.k.mallick@intel.com>
    Cc: Linus Torvalds <torvalds@linux-foundation.org>
    Cc: Andy Lutomirski <luto@kernel.org>
    Cc: Dave Hansen <dave.hansen@intel.com>
    Cc: Arjan Van De Ven <arjan.van.de.ven@intel.com>
    Cc: Greg KH <gregkh@linuxfoundation.org>
    Cc: Jun Nakajima <jun.nakajima@intel.com>
    Cc: Paolo Bonzini <pbonzini@redhat.com>
    Cc: Dan Williams <dan.j.williams@intel.com>
    Cc: Tim Chen <tim.c.chen@linux.intel.com>
    Link: http://lkml.kernel.org/r/1515720739-43819-6-git-send-email-ashok.raj@intel.com
    Link: https://lkml.kernel.org/r/1517522386-18410-3-git-send-email-karahmed@amazon.de
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

commit 8f7c4d52a0e82854e5ccc15a2b53d3ab3efe0452
Author: KarimAllah Ahmed <karahmed@amazon.de>
Date:   Thu Feb 1 22:59:42 2018 +0100

    KVM/x86: Update the reverse_cpuid list to include CPUID_7_EDX
    
    commit b7b27aa011a1df42728d1768fc181d9ce69e6911
    
    [dwmw2: Stop using KF() for bits in it, too]
    Signed-off-by: KarimAllah Ahmed <karahmed@amazon.de>
    Signed-off-by: David Woodhouse <dwmw@amazon.co.uk>
    Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
    Reviewed-by: Paolo Bonzini <pbonzini@redhat.com>
    Reviewed-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
    Reviewed-by: Jim Mattson <jmattson@google.com>
    Cc: kvm@vger.kernel.org
    Cc: Radim Krčmář <rkrcmar@redhat.com>
    Link: https://lkml.kernel.org/r/1517522386-18410-2-git-send-email-karahmed@amazon.de
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

commit 4c8298c1fdd3317658a3dcd055b19a4c60df947d
Author: Darren Kenny <darren.kenny@oracle.com>
Date:   Fri Feb 2 19:12:20 2018 +0000

    x86/speculation: Fix typo IBRS_ATT, which should be IBRS_ALL
    
    commit af189c95a371b59f493dbe0f50c0a09724868881
    
    Fixes: 117cc7a908c83 ("x86/retpoline: Fill return stack buffer on vmexit")
    Signed-off-by: Darren Kenny <darren.kenny@oracle.com>
    Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
    Reviewed-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
    Cc: Tom Lendacky <thomas.lendacky@amd.com>
    Cc: Andi Kleen <ak@linux.intel.com>
    Cc: Borislav Petkov <bp@alien8.de>
    Cc: Masami Hiramatsu <mhiramat@kernel.org>
    Cc: Arjan van de Ven <arjan@linux.intel.com>
    Cc: David Woodhouse <dwmw@amazon.co.uk>
    Link: https://lkml.kernel.org/r/20180202191220.blvgkgutojecxr3b@starbug-vm.ie.oracle.com
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

commit 6dd1f6989a545446661d0cbecf8748c8d2093549
Author: Arnd Bergmann <arnd@arndb.de>
Date:   Fri Feb 2 22:39:23 2018 +0100

    x86/pti: Mark constant arrays as __initconst
    
    commit 4bf5d56d429cbc96c23d809a08f63cd29e1a702e
    
    I'm seeing build failures from the two newly introduced arrays that
    are marked 'const' and '__initdata', which are mutually exclusive:
    
    arch/x86/kernel/cpu/common.c:882:43: error: 'cpu_no_speculation' causes a section type conflict with 'e820_table_firmware_init'
    arch/x86/kernel/cpu/common.c:895:43: error: 'cpu_no_meltdown' causes a section type conflict with 'e820_table_firmware_init'
    
    The correct annotation is __initconst.
    
    Fixes: fec9434a12f3 ("x86/pti: Do not enable PTI on CPUs which are not vulnerable to Meltdown")
    Signed-off-by: Arnd Bergmann <arnd@arndb.de>
    Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
    Cc: Ricardo Neri <ricardo.neri-calderon@linux.intel.com>
    Cc: Andy Lutomirski <luto@kernel.org>
    Cc: Borislav Petkov <bp@suse.de>
    Cc: Thomas Garnier <thgarnie@google.com>
    Cc: David Woodhouse <dwmw@amazon.co.uk>
    Link: https://lkml.kernel.org/r/20180202213959.611210-1-arnd@arndb.de
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

commit ebaf2271a024a7000dc83e061349f7bbf2b44281
Author: KarimAllah Ahmed <karahmed@amazon.de>
Date:   Thu Feb 1 11:27:21 2018 +0000

    x86/spectre: Simplify spectre_v2 command line parsing
    
    commit 9005c6834c0ffdfe46afa76656bd9276cca864f6
    
    [dwmw2: Use ARRAY_SIZE]
    
    Signed-off-by: KarimAllah Ahmed <karahmed@amazon.de>
    Signed-off-by: David Woodhouse <dwmw@amazon.co.uk>
    Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
    Cc: peterz@infradead.org
    Cc: bp@alien8.de
    Link: https://lkml.kernel.org/r/1517484441-1420-3-git-send-email-dwmw@amazon.co.uk
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

commit 838dbae0acd06da5fb0d0173dfddc72ca5650eb0
Author: David Woodhouse <dwmw@amazon.co.uk>
Date:   Thu Feb 1 11:27:20 2018 +0000

    x86/retpoline: Avoid retpolines for built-in __init functions
    
    commit 66f793099a636862a71c59d4a6ba91387b155e0c
    
    There's no point in building init code with retpolines, since it runs before
    any potentially hostile userspace does. And before the retpoline is actually
    ALTERNATIVEd into place, for much of it.
    
    Signed-off-by: David Woodhouse <dwmw@amazon.co.uk>
    Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
    Cc: karahmed@amazon.de
    Cc: peterz@infradead.org
    Cc: bp@alien8.de
    Link: https://lkml.kernel.org/r/1517484441-1420-2-git-send-email-dwmw@amazon.co.uk
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

commit 6f6eb84b14aca572ebe50984be94e036075e6e2b
Author: Dan Williams <dan.j.williams@intel.com>
Date:   Wed Jan 31 17:47:03 2018 -0800

    x86/kvm: Update spectre-v1 mitigation
    
    commit 085331dfc6bbe3501fb936e657331ca943827600
    
    Commit 75f139aaf896 "KVM: x86: Add memory barrier on vmcs field lookup"
    added a raw 'asm("lfence");' to prevent a bounds check bypass of
    'vmcs_field_to_offset_table'.
    
    The lfence can be avoided in this path by using the array_index_nospec()
    helper designed for these types of fixes.
    
    Signed-off-by: Dan Williams <dan.j.williams@intel.com>
    Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
    Acked-by: Paolo Bonzini <pbonzini@redhat.com>
    Cc: Andrew Honig <ahonig@google.com>
    Cc: kvm@vger.kernel.org
    Cc: Jim Mattson <jmattson@google.com>
    Link: https://lkml.kernel.org/r/151744959670.6342.3001723920950249067.stgit@dwillia2-desk3.amr.corp.intel.com
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

commit 7f8da2c8a191f274600bafcf6e58f54e16d5c8de
Author: Paolo Bonzini <pbonzini@redhat.com>
Date:   Tue Jan 16 16:51:18 2018 +0100

    KVM: VMX: make MSR bitmaps per-VCPU
    
    commit 904e14fb7cb96401a7dc803ca2863fd5ba32ffe6
    
    Place the MSR bitmap in struct loaded_vmcs, and update it in place
    every time the x2apic or APICv state can change.  This is rare and
    the loop can handle 64 MSRs per iteration, in a similar fashion as
    nested_vmx_prepare_msr_bitmap.
    
    This prepares for choosing, on a per-VM basis, whether to intercept
    the SPEC_CTRL and PRED_CMD MSRs.
    
    Cc: stable@vger.kernel.org       # prereq for Spectre mitigation
    Suggested-by: Jim Mattson <jmattson@google.com>
    Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

commit ad368e5b2d56ed059ebc8343cd7e713f3a7717d4
Author: Josh Poimboeuf <jpoimboe@redhat.com>
Date:   Tue Jan 30 22:13:33 2018 -0600

    x86/paravirt: Remove 'noreplace-paravirt' cmdline option
    
    commit 12c69f1e94c89d40696e83804dd2f0965b5250cd
    
    The 'noreplace-paravirt' option disables paravirt patching, leaving the
    original pv indirect calls in place.
    
    That's highly incompatible with retpolines, unless we want to uglify
    paravirt even further and convert the paravirt calls to retpolines.
    
    As far as I can tell, the option doesn't seem to be useful for much
    other than introducing surprising corner cases and making the kernel
    vulnerable to Spectre v2.  It was probably a debug option from the early
    paravirt days.  So just remove it.
    
    Signed-off-by: Josh Poimboeuf <jpoimboe@redhat.com>
    Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
    Reviewed-by: Juergen Gross <jgross@suse.com>
    Cc: Andrea Arcangeli <aarcange@redhat.com>
    Cc: Peter Zijlstra <peterz@infradead.org>
    Cc: Andi Kleen <ak@linux.intel.com>
    Cc: Ashok Raj <ashok.raj@intel.com>
    Cc: Greg KH <gregkh@linuxfoundation.org>
    Cc: Jun Nakajima <jun.nakajima@intel.com>
    Cc: Tim Chen <tim.c.chen@linux.intel.com>
    Cc: Rusty Russell <rusty@rustcorp.com.au>
    Cc: Dave Hansen <dave.hansen@intel.com>
    Cc: Asit Mallick <asit.k.mallick@intel.com>
    Cc: Andy Lutomirski <luto@kernel.org>
    Cc: Linus Torvalds <torvalds@linux-foundation.org>
    Cc: Jason Baron <jbaron@akamai.com>
    Cc: Paolo Bonzini <pbonzini@redhat.com>
    Cc: Alok Kataria <akataria@vmware.com>
    Cc: Arjan Van De Ven <arjan.van.de.ven@intel.com>
    Cc: David Woodhouse <dwmw2@infradead.org>
    Cc: Dan Williams <dan.j.williams@intel.com>
    Link: https://lkml.kernel.org/r/20180131041333.2x6blhxirc2kclrq@treble
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

commit 7a3f12294da45e779b313b33077f04b87782985b
Author: Tim Chen <tim.c.chen@linux.intel.com>
Date:   Mon Jan 29 22:04:47 2018 +0000

    x86/speculation: Use Indirect Branch Prediction Barrier in context switch
    
    commit 18bf3c3ea8ece8f03b6fc58508f2dfd23c7711c7
    
    Flush indirect branches when switching into a process that marked itself
    non dumpable. This protects high value processes like gpg better,
    without having too high performance overhead.
    
    If done naïvely, we could switch to a kernel idle thread and then back
    to the original process, such as:
    
        process A -> idle -> process A
    
    In such scenario, we do not have to do IBPB here even though the process
    is non-dumpable, as we are switching back to the same process after a
    hiatus.
    
    To avoid the redundant IBPB, which is expensive, we track the last mm
    user context ID. The cost is to have an extra u64 mm context id to track
    the last mm we were using before switching to the init_mm used by idle.
    Avoiding the extra IBPB is probably worth the extra memory for this
    common scenario.
    
    For those cases where tlb_defer_switch_to_init_mm() returns true (non
    PCID), lazy tlb will defer switch to init_mm, so we will not be changing
    the mm for the process A -> idle -> process A switch. So IBPB will be
    skipped for this case.
    
    Thanks to the reviewers and Andy Lutomirski for the suggestion of
    using ctx_id which got rid of the problem of mm pointer recycling.
    
    Signed-off-by: Tim Chen <tim.c.chen@linux.intel.com>
    Signed-off-by: David Woodhouse <dwmw@amazon.co.uk>
    Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
    Cc: ak@linux.intel.com
    Cc: karahmed@amazon.de
    Cc: arjan@linux.intel.com
    Cc: torvalds@linux-foundation.org
    Cc: linux@dominikbrodowski.net
    Cc: peterz@infradead.org
    Cc: bp@alien8.de
    Cc: luto@kernel.org
    Cc: pbonzini@redhat.com
    Cc: gregkh@linux-foundation.org
    Link: https://lkml.kernel.org/r/1517263487-3708-1-git-send-email-dwmw@amazon.co.uk
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

commit 85543d7613c481392d564a4956850591b2025f5d
Author: David Woodhouse <dwmw@amazon.co.uk>
Date:   Tue Jan 30 14:30:23 2018 +0000

    x86/cpuid: Fix up "virtual" IBRS/IBPB/STIBP feature bits on Intel
    
    commit 7fcae1118f5fd44a862aa5c3525248e35ee67c3b
    
    Despite the fact that all the other code there seems to be doing it, just
    using set_cpu_cap() in early_intel_init() doesn't actually work.
    
    For CPUs with PKU support, setup_pku() calls get_cpu_cap() after
    c->c_init() has set those feature bits. That resets those bits back to what
    was queried from the hardware.
    
    Turning the bits off for bad microcode is easy to fix. That can just use
    setup_clear_cpu_cap() to force them off for all CPUs.
    
    I was less keen on forcing the feature bits *on* that way, just in case
    of inconsistencies. I appreciate that the kernel is going to get this
    utterly wrong if CPU features are not consistent, because it has already
    applied alternatives by the time secondary CPUs are brought up.
    
    But at least if setup_force_cpu_cap() isn't being used, we might have a
    chance of *detecting* the lack of the corresponding bit and either
    panicking or refusing to bring the offending CPU online.
    
    So ensure that the appropriate feature bits are set within get_cpu_cap()
    regardless of how many extra times it's called.
    
    Fixes: 2961298e ("x86/cpufeatures: Clean up Spectre v2 related CPUID flags")
    Signed-off-by: David Woodhouse <dwmw@amazon.co.uk>
    Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
    Cc: karahmed@amazon.de
    Cc: peterz@infradead.org
    Cc: bp@alien8.de
    Link: https://lkml.kernel.org/r/1517322623-15261-1-git-send-email-dwmw@amazon.co.uk
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

commit c962dfa4aca010e05730ff458210b04c4eb9af14
Author: Colin Ian King <colin.king@canonical.com>
Date:   Tue Jan 30 19:32:18 2018 +0000

    x86/spectre: Fix spelling mistake: "vunerable"-> "vulnerable"
    
    commit e698dcdfcda41efd0984de539767b4cddd235f1e
    
    Trivial fix to spelling mistake in pr_err error message text.
    
    Signed-off-by: Colin Ian King <colin.king@canonical.com>
    Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
    Cc: Andi Kleen <ak@linux.intel.com>
    Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
    Cc: kernel-janitors@vger.kernel.org
    Cc: Andy Lutomirski <luto@kernel.org>
    Cc: Borislav Petkov <bp@suse.de>
    Cc: David Woodhouse <dwmw@amazon.co.uk>
    Link: https://lkml.kernel.org/r/20180130193218.9271-1-colin.king@canonical.com
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

commit 863b308dbb1945949529a0e523c34636430884a7
Author: Dan Williams <dan.j.williams@intel.com>
Date:   Mon Jan 29 17:03:21 2018 -0800

    x86/spectre: Report get_user mitigation for spectre_v1
    
    commit edfbae53dab8348fca778531be9f4855d2ca0360
    
    Reflect the presence of get_user(), __get_user(), and 'syscall' protections
    in sysfs. The expectation is that new and better tooling will allow the
    kernel to grow more usages of array_index_nospec(), for now, only claim
    mitigation for __user pointer de-references.
    
    Reported-by: Jiri Slaby <jslaby@suse.cz>
    Signed-off-by: Dan Williams <dan.j.williams@intel.com>
    Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
    Cc: linux-arch@vger.kernel.org
    Cc: kernel-hardening@lists.openwall.com
    Cc: gregkh@linuxfoundation.org
    Cc: torvalds@linux-foundation.org
    Cc: alan@linux.intel.com
    Link: https://lkml.kernel.org/r/151727420158.33451.11658324346540434635.stgit@dwillia2-desk3.amr.corp.intel.com
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

commit c9daf8144642b9daad69ab50e9cba5ecea2c8e25
Author: Dan Williams <dan.j.williams@intel.com>
Date:   Mon Jan 29 17:03:15 2018 -0800

    nl80211: Sanitize array index in parse_txq_params
    
    commit 259d8c1e984318497c84eef547bbb6b1d9f4eb05
    
    Wireless drivers rely on parse_txq_params to validate that txq_params->ac
    is less than NL80211_NUM_ACS by the time the low-level driver's ->conf_tx()
    handler is called. Use a new helper, array_index_nospec(), to sanitize
    txq_params->ac with respect to speculation. I.e. ensure that any
    speculation into ->conf_tx() handlers is done with a value of
    txq_params->ac that is within the bounds of [0, NL80211_NUM_ACS).
    
    Reported-by: Christian Lamparter <chunkeey@gmail.com>
    Reported-by: Elena Reshetova <elena.reshetova@intel.com>
    Signed-off-by: Dan Williams <dan.j.williams@intel.com>
    Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
    Acked-by: Johannes Berg <johannes@sipsolutions.net>
    Cc: linux-arch@vger.kernel.org
    Cc: kernel-hardening@lists.openwall.com
    Cc: gregkh@linuxfoundation.org
    Cc: linux-wireless@vger.kernel.org
    Cc: torvalds@linux-foundation.org
    Cc: "David S. Miller" <davem@davemloft.net>
    Cc: alan@linux.intel.com
    Link: https://lkml.kernel.org/r/151727419584.33451.7700736761686184303.stgit@dwillia2-desk3.amr.corp.intel.com
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

commit 98116c32d3b4b60bc1add46a81ed4f991ef02a7d
Author: Dan Williams <dan.j.williams@intel.com>
Date:   Mon Jan 29 17:03:05 2018 -0800

    vfs, fdtable: Prevent bounds-check bypass via speculative execution
    
    commit 56c30ba7b348b90484969054d561f711ba196507
    
    'fd' is a user controlled value that is used as a data dependency to
    read from the 'fdt->fd' array.  In order to avoid potential leaks of
    kernel memory values, block speculative execution of the instruction
    stream that could issue reads based on an invalid 'file *' returned from
    __fcheck_files.
    
    Co-developed-by: Elena Reshetova <elena.reshetova@intel.com>
    Signed-off-by: Dan Williams <dan.j.williams@intel.com>
    Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
    Cc: linux-arch@vger.kernel.org
    Cc: kernel-hardening@lists.openwall.com
    Cc: gregkh@linuxfoundation.org
    Cc: Al Viro <viro@zeniv.linux.org.uk>
    Cc: torvalds@linux-foundation.org
    Cc: alan@linux.intel.com
    Link: https://lkml.kernel.org/r/151727418500.33451.17392199002892248656.stgit@dwillia2-desk3.amr.corp.intel.com
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

commit 0035134041207f990e0756e2a6f63b7dc3bfe95b
Author: Dan Williams <dan.j.williams@intel.com>
Date:   Mon Jan 29 17:02:59 2018 -0800

    x86/syscall: Sanitize syscall table de-references under speculation
    
    commit 2fbd7af5af8665d18bcefae3e9700be07e22b681
    
    The syscall table base is a user controlled function pointer in kernel
    space. Use array_index_nospec() to prevent any out of bounds speculation.
    
    While retpoline prevents speculating into a userspace directed target it
    does not stop the pointer de-reference, the concern is leaking memory
    relative to the syscall table base, by observing instruction cache
    behavior.
    
    Reported-by: Linus Torvalds <torvalds@linux-foundation.org>
    Signed-off-by: Dan Williams <dan.j.williams@intel.com>
    Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
    Cc: linux-arch@vger.kernel.org
    Cc: kernel-hardening@lists.openwall.com
    Cc: gregkh@linuxfoundation.org
    Cc: Andy Lutomirski <luto@kernel.org>
    Cc: alan@linux.intel.com
    Link: https://lkml.kernel.org/r/151727417984.33451.1216731042505722161.stgit@dwillia2-desk3.amr.corp.intel.com
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

commit edaf1538d3a5620862544a20aab14cb601787e1a
Author: Dan Williams <dan.j.williams@intel.com>
Date:   Mon Jan 29 17:02:54 2018 -0800

    x86/get_user: Use pointer masking to limit speculation
    
    commit c7f631cb07e7da06ac1d231ca178452339e32a94
    
    Quoting Linus:
    
        I do think that it would be a good idea to very expressly document
        the fact that it's not that the user access itself is unsafe. I do
        agree that things like "get_user()" want to be protected, but not
        because of any direct bugs or problems with get_user() and friends,
        but simply because get_user() is an excellent source of a pointer
        that is obviously controlled from a potentially attacking user
        space. So it's a prime candidate for then finding _subsequent_
        accesses that can then be used to perturb the cache.
    
    Unlike the __get_user() case get_user() includes the address limit check
    near the pointer de-reference. With that locality the speculation can be
    mitigated with pointer narrowing rather than a barrier, i.e.
    array_index_nospec(). Where the narrowing is performed by:
    
            cmp %limit, %ptr
            sbb %mask, %mask
            and %mask, %ptr
    
    With respect to speculation the value of %ptr is either less than %limit
    or NULL.
    
    Co-developed-by: Linus Torvalds <torvalds@linux-foundation.org>
    Signed-off-by: Dan Williams <dan.j.williams@intel.com>
    Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
    Cc: linux-arch@vger.kernel.org
    Cc: Kees Cook <keescook@chromium.org>
    Cc: kernel-hardening@lists.openwall.com
    Cc: gregkh@linuxfoundation.org
    Cc: Al Viro <viro@zeniv.linux.org.uk>
    Cc: Andy Lutomirski <luto@kernel.org>
    Cc: torvalds@linux-foundation.org
    Cc: alan@linux.intel.com
    Link: https://lkml.kernel.org/r/151727417469.33451.11804043010080838495.stgit@dwillia2-desk3.amr.corp.intel.com
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

commit 5f40de41ccae0c17105d8336e44d704dc5500a50
Author: Dan Williams <dan.j.williams@intel.com>
Date:   Mon Jan 29 17:02:49 2018 -0800

    x86/uaccess: Use __uaccess_begin_nospec() and uaccess_try_nospec
    
    commit 304ec1b050310548db33063e567123fae8fd0301
    
    Quoting Linus:
    
        I do think that it would be a good idea to very expressly document
        the fact that it's not that the user access itself is unsafe. I do
        agree that things like "get_user()" want to be protected, but not
        because of any direct bugs or problems with get_user() and friends,
        but simply because get_user() is an excellent source of a pointer
        that is obviously controlled from a potentially attacking user
        space. So it's a prime candidate for then finding _subsequent_
        accesses that can then be used to perturb the cache.
    
    __uaccess_begin_nospec() covers __get_user() and copy_from_iter() where the
    limit check is far away from the user pointer de-reference. In those cases
    a barrier_nospec() prevents speculation with a potential pointer to
    privileged memory. uaccess_try_nospec covers get_user_try.
    
    Suggested-by: Linus Torvalds <torvalds@linux-foundation.org>
    Suggested-by: Andi Kleen <ak@linux.intel.com>
    Signed-off-by: Dan Williams <dan.j.williams@intel.com>
    Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
    Cc: linux-arch@vger.kernel.org
    Cc: Kees Cook <keescook@chromium.org>
    Cc: kernel-hardening@lists.openwall.com
    Cc: gregkh@linuxfoundation.org
    Cc: Al Viro <viro@zeniv.linux.org.uk>
    Cc: alan@linux.intel.com
    Link: https://lkml.kernel.org/r/151727416953.33451.10508284228526170604.stgit@dwillia2-desk3.amr.corp.intel.com
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

commit 2406eb9f4568098f2353f1c9267dbe7e7f4a546b
Author: Dan Williams <dan.j.williams@intel.com>
Date:   Mon Jan 29 17:02:44 2018 -0800

    x86/usercopy: Replace open coded stac/clac with __uaccess_{begin, end}
    
    commit b5c4ae4f35325d520b230bab6eb3310613b72ac1
    
    In preparation for converting some __uaccess_begin() instances to
    __uacess_begin_nospec(), make sure all 'from user' uaccess paths are
    using the _begin(), _end() helpers rather than open-coded stac() and
    clac().
    
    No functional changes.
    
    Suggested-by: Ingo Molnar <mingo@redhat.com>
    Signed-off-by: Dan Williams <dan.j.williams@intel.com>
    Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
    Cc: linux-arch@vger.kernel.org
    Cc: Tom Lendacky <thomas.lendacky@amd.com>
    Cc: Kees Cook <keescook@chromium.org>
    Cc: kernel-hardening@lists.openwall.com
    Cc: gregkh@linuxfoundation.org
    Cc: Al Viro <viro@zeniv.linux.org.uk>
    Cc: torvalds@linux-foundation.org
    Cc: alan@linux.intel.com
    Link: https://lkml.kernel.org/r/151727416438.33451.17309465232057176966.stgit@dwillia2-desk3.amr.corp.intel.com
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

commit 31c5b332189ec6692ddd92269261db93c835a4d9
Author: Dan Williams <dan.j.williams@intel.com>
Date:   Mon Jan 29 17:02:39 2018 -0800

    x86: Introduce __uaccess_begin_nospec() and uaccess_try_nospec
    
    commit b3bbfb3fb5d25776b8e3f361d2eedaabb0b496cd
    
    For __get_user() paths, do not allow the kernel to speculate on the value
    of a user controlled pointer. In addition to the 'stac' instruction for
    Supervisor Mode Access Protection (SMAP), a barrier_nospec() causes the
    access_ok() result to resolve in the pipeline before the CPU might take any
    speculative action on the pointer value. Given the cost of 'stac' the
    speculation barrier is placed after 'stac' to hopefully overlap the cost of
    disabling SMAP with the cost of flushing the instruction pipeline.
    
    Since __get_user is a major kernel interface that deals with user
    controlled pointers, the __uaccess_begin_nospec() mechanism will prevent
    speculative execution past an access_ok() permission check. While
    speculative execution past access_ok() is not enough to lead to a kernel
    memory leak, it is a necessary precondition.
    
    To be clear, __uaccess_begin_nospec() is addressing a class of potential
    problems near __get_user() usages.
    
    Note, that while the barrier_nospec() in __uaccess_begin_nospec() is used
    to protect __get_user(), pointer masking similar to array_index_nospec()
    will be used for get_user() since it incorporates a bounds check near the
    usage.
    
    uaccess_try_nospec provides the same mechanism for get_user_try.
    
    No functional changes.
    
    Suggested-by: Linus Torvalds <torvalds@linux-foundation.org>
    Suggested-by: Andi Kleen <ak@linux.intel.com>
    Suggested-by: Ingo Molnar <mingo@redhat.com>
    Signed-off-by: Dan Williams <dan.j.williams@intel.com>
    Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
    Cc: linux-arch@vger.kernel.org
    Cc: Tom Lendacky <thomas.lendacky@amd.com>
    Cc: Kees Cook <keescook@chromium.org>
    Cc: kernel-hardening@lists.openwall.com
    Cc: gregkh@linuxfoundation.org
    Cc: Al Viro <viro@zeniv.linux.org.uk>
    Cc: alan@linux.intel.com
    Link: https://lkml.kernel.org/r/151727415922.33451.5796614273104346583.stgit@dwillia2-desk3.amr.corp.intel.com
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

commit 437ac7b6868da05620764c143c0e4f7aa91e8fc7
Author: Dan Williams <dan.j.williams@intel.com>
Date:   Mon Jan 29 17:02:33 2018 -0800

    x86: Introduce barrier_nospec
    
    commit b3d7ad85b80bbc404635dca80f5b129f6242bc7a
    
    Rename the open coded form of this instruction sequence from
    rdtsc_ordered() into a generic barrier primitive, barrier_nospec().
    
    One of the mitigations for Spectre variant1 vulnerabilities is to fence
    speculative execution after successfully validating a bounds check. I.e.
    force the result of a bounds check to resolve in the instruction pipeline
    to ensure speculative execution honors that result before potentially
    operating on out-of-bounds data.
    
    No functional changes.
    
    Suggested-by: Linus Torvalds <torvalds@linux-foundation.org>
    Suggested-by: Andi Kleen <ak@linux.intel.com>
    Suggested-by: Ingo Molnar <mingo@redhat.com>
    Signed-off-by: Dan Williams <dan.j.williams@intel.com>
    Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
    Cc: linux-arch@vger.kernel.org
    Cc: Tom Lendacky <thomas.lendacky@amd.com>
    Cc: Kees Cook <keescook@chromium.org>
    Cc: kernel-hardening@lists.openwall.com
    Cc: gregkh@linuxfoundation.org
    Cc: Al Viro <viro@zeniv.linux.org.uk>
    Cc: alan@linux.intel.com
    Link: https://lkml.kernel.org/r/151727415361.33451.9049453007262764675.stgit@dwillia2-desk3.amr.corp.intel.com
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

commit 4820d42835b2741fc18b8f6135c90dc1128974bc
Author: Dan Williams <dan.j.williams@intel.com>
Date:   Mon Jan 29 17:02:28 2018 -0800

    x86: Implement array_index_mask_nospec
    
    commit babdde2698d482b6c0de1eab4f697cf5856c5859
    
    array_index_nospec() uses a mask to sanitize user controllable array
    indexes, i.e. generate a 0 mask if 'index' >= 'size', and a ~0 mask
    otherwise. While the default array_index_mask_nospec() handles the
    carry-bit from the (index - size) result in software.
    
    The x86 array_index_mask_nospec() does the same, but the carry-bit is
    handled in the processor CF flag without conditional instructions in the
    control flow.
    
    Suggested-by: Linus Torvalds <torvalds@linux-foundation.org>
    Signed-off-by: Dan Williams <dan.j.williams@intel.com>
    Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
    Cc: linux-arch@vger.kernel.org
    Cc: kernel-hardening@lists.openwall.com
    Cc: gregkh@linuxfoundation.org
    Cc: alan@linux.intel.com
    Link: https://lkml.kernel.org/r/151727414808.33451.1873237130672785331.stgit@dwillia2-desk3.amr.corp.intel.com
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

commit 478742cf80b732f6c3227c572184e18b6e8bcb05
Author: Dan Williams <dan.j.williams@intel.com>
Date:   Mon Jan 29 17:02:22 2018 -0800

    array_index_nospec: Sanitize speculative array de-references
    
    commit f3804203306e098dae9ca51540fcd5eb700d7f40
    
    array_index_nospec() is proposed as a generic mechanism to mitigate
    against Spectre-variant-1 attacks, i.e. an attack that bypasses boundary
    checks via speculative execution. The array_index_nospec()
    implementation is expected to be safe for current generation CPUs across
    multiple architectures (ARM, x86).
    
    Based on an original implementation by Linus Torvalds, tweaked to remove
    speculative flows by Alexei Starovoitov, and tweaked again by Linus to
    introduce an x86 assembly implementation for the mask generation.
    
    Co-developed-by: Linus Torvalds <torvalds@linux-foundation.org>
    Co-developed-by: Alexei Starovoitov <ast@kernel.org>
    Suggested-by: Cyril Novikov <cnovikov@lynx.com>
    Signed-off-by: Dan Williams <dan.j.williams@intel.com>
    Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
    Cc: linux-arch@vger.kernel.org
    Cc: kernel-hardening@lists.openwall.com
    Cc: Peter Zijlstra <peterz@infradead.org>
    Cc: Catalin Marinas <catalin.marinas@arm.com>
    Cc: Will Deacon <will.deacon@arm.com>
    Cc: Russell King <linux@armlinux.org.uk>
    Cc: gregkh@linuxfoundation.org
    Cc: torvalds@linux-foundation.org
    Cc: alan@linux.intel.com
    Link: https://lkml.kernel.org/r/151727414229.33451.18411580953862676575.stgit@dwillia2-desk3.amr.corp.intel.com
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

commit e72041f70c3c7d149a8c444262173b7e70e3d4f8
Author: Mark Rutland <mark.rutland@arm.com>
Date:   Mon Jan 29 17:02:16 2018 -0800

    Documentation: Document array_index_nospec
    
    commit f84a56f73dddaeac1dba8045b007f742f61cd2da
    
    Document the rationale and usage of the new array_index_nospec() helper.
    
    Signed-off-by: Mark Rutland <mark.rutland@arm.com>
    Signed-off-by: Will Deacon <will.deacon@arm.com>
    Signed-off-by: Dan Williams <dan.j.williams@intel.com>
    Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
    Reviewed-by: Kees Cook <keescook@chromium.org>
    Cc: linux-arch@vger.kernel.org
    Cc: Jonathan Corbet <corbet@lwn.net>
    Cc: Peter Zijlstra <peterz@infradead.org>
    Cc: gregkh@linuxfoundation.org
    Cc: kernel-hardening@lists.openwall.com
    Cc: torvalds@linux-foundation.org
    Cc: alan@linux.intel.com
    Link: https://lkml.kernel.org/r/151727413645.33451.15878817161436755393.stgit@dwillia2-desk3.amr.corp.intel.com
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

commit fb9f2d9ab83d9ab1d5286db9432266b353c201c1
Author: Andy Lutomirski <luto@kernel.org>
Date:   Sun Jan 28 10:38:50 2018 -0800

    x86/asm: Move 'status' from thread_struct to thread_info
    
    commit 37a8f7c38339b22b69876d6f5a0ab851565284e3
    
    The TS_COMPAT bit is very hot and is accessed from code paths that mostly
    also touch thread_info::flags.  Move it into struct thread_info to improve
    cache locality.
    
    The only reason it was in thread_struct is that there was a brief period
    during which arch-specific fields were not allowed in struct thread_info.
    
    Linus suggested further changing:
    
      ti->status &= ~(TS_COMPAT|TS_I386_REGS_POKED);
    
    to:
    
      if (unlikely(ti->status & (TS_COMPAT|TS_I386_REGS_POKED)))
              ti->status &= ~(TS_COMPAT|TS_I386_REGS_POKED);
    
    on the theory that frequently dirtying the cacheline even in pure 64-bit
    code that never needs to modify status hurts performance.  That could be a
    reasonable followup patch, but I suspect it matters less on top of this
    patch.
    
    Suggested-by: Linus Torvalds <torvalds@linux-foundation.org>
    Signed-off-by: Andy Lutomirski <luto@kernel.org>
    Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
    Reviewed-by: Ingo Molnar <mingo@kernel.org>
    Acked-by: Linus Torvalds <torvalds@linux-foundation.org>
    Cc: Borislav Petkov <bp@alien8.de>
    Cc: Kernel Hardening <kernel-hardening@lists.openwall.com>
    Link: https://lkml.kernel.org/r/03148bcc1b217100e6e8ecf6a5468c45cf4304b6.1517164461.git.luto@kernel.org
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

commit 90522d30b223fe35957fc8c8ee3b7a63dc9844b1
Author: Andy Lutomirski <luto@kernel.org>
Date:   Sun Jan 28 10:38:49 2018 -0800

    x86/entry/64: Push extra regs right away
    
    commit d1f7732009e0549eedf8ea1db948dc37be77fd46
    
    With the fast path removed there is no point in splitting the push of the
    normal and the extra register set. Just push the extra regs right away.
    
    [ tglx: Split out from 'x86/entry/64: Remove the SYSCALL64 fast path' ]
    
    Signed-off-by: Andy Lutomirski <luto@kernel.org>
    Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
    Acked-by: Ingo Molnar <mingo@kernel.org>
    Cc: Borislav Petkov <bp@alien8.de>
    Cc: Linus Torvalds <torvalds@linux-foundation.org>
    Cc: Kernel Hardening <kernel-hardening@lists.openwall.com>
    Link: https://lkml.kernel.org/r/462dff8d4d64dfbfc851fbf3130641809d980ecd.1517164461.git.luto@kernel.org
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

commit 8459ebcbd6ecbbefd6455315985dc0da1a450b13
Author: Andy Lutomirski <luto@kernel.org>
Date:   Sun Jan 28 10:38:49 2018 -0800

    x86/entry/64: Remove the SYSCALL64 fast path
    
    commit 21d375b6b34ff511a507de27bf316b3dde6938d9
    
    The SYCALLL64 fast path was a nice, if small, optimization back in the good
    old days when syscalls were actually reasonably fast.  Now there is PTI to
    slow everything down, and indirect branches are verboten, making everything
    messier.  The retpoline code in the fast path is particularly nasty.
    
    Just get rid of the fast path. The slow path is barely slower.
    
    [ tglx: Split out the 'push all extra regs' part ]
    
    Signed-off-by: Andy Lutomirski <luto@kernel.org>
    Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
    Acked-by: Ingo Molnar <mingo@kernel.org>
    Cc: Borislav Petkov <bp@alien8.de>
    Cc: Linus Torvalds <torvalds@linux-foundation.org>
    Cc: Kernel Hardening <kernel-hardening@lists.openwall.com>
    Link: https://lkml.kernel.org/r/462dff8d4d64dfbfc851fbf3130641809d980ecd.1517164461.git.luto@kernel.org
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

commit 74ae346691dd34d49a5e733af40ca25a4dd42245
Author: Dou Liyang <douly.fnst@cn.fujitsu.com>
Date:   Tue Jan 30 14:13:50 2018 +0800

    x86/spectre: Check CONFIG_RETPOLINE in command line parser
    
    commit 9471eee9186a46893726e22ebb54cade3f9bc043
    
    The spectre_v2 option 'auto' does not check whether CONFIG_RETPOLINE is
    enabled. As a consequence it fails to emit the appropriate warning and sets
    feature flags which have no effect at all.
    
    Add the missing IS_ENABLED() check.
    
    Fixes: da285121560e ("x86/spectre: Add boot time option to select Spectre v2 mitigation")
    Signed-off-by: Dou Liyang <douly.fnst@cn.fujitsu.com>
    Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
    Cc: ak@linux.intel.com
    Cc: peterz@infradead.org
    Cc: Tomohiro <misono.tomohiro@jp.fujitsu.com>
    Cc: dave.hansen@intel.com
    Cc: bp@alien8.de
    Cc: arjan@linux.intel.com
    Cc: dwmw@amazon.co.uk
    Cc: stable@vger.kernel.org
    Link: https://lkml.kernel.org/r/f5892721-7528-3647-08fb-f8d10e65ad87@cn.fujitsu.com
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

commit 04e073072d1494ce9f60cc2db68fb79aee4283dd
Author: William Grant <william.grant@canonical.com>
Date:   Tue Jan 30 22:22:55 2018 +1100

    x86/mm: Fix overlap of i386 CPU_ENTRY_AREA with FIX_BTMAP
    
    commit 55f49fcb879fbeebf2a8c1ac7c9e6d90df55f798
    
    Since commit 92a0f81d8957 ("x86/cpu_entry_area: Move it out of the
    fixmap"), i386's CPU_ENTRY_AREA has been mapped to the memory area just
    below FIXADDR_START. But already immediately before FIXADDR_START is the
    FIX_BTMAP area, which means that early_ioremap can collide with the entry
    area.
    
    It's especially bad on PAE where FIX_BTMAP_BEGIN gets aligned to exactly
    match CPU_ENTRY_AREA_BASE, so the first early_ioremap slot clobbers the
    IDT and causes interrupts during early boot to reset the system.
    
    The overlap wasn't a problem before the CPU entry area was introduced,
    as the fixmap has classically been preceded by the pkmap or vmalloc
    areas, neither of which is used until early_ioremap is out of the
    picture.
    
    Relocate CPU_ENTRY_AREA to below FIX_BTMAP, not just below the permanent
    fixmap area.
    
    Fixes: commit 92a0f81d8957 ("x86/cpu_entry_area: Move it out of the fixmap")
    Signed-off-by: William Grant <william.grant@canonical.com>
    Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
    Cc: stable@vger.kernel.org
    Link: https://lkml.kernel.org/r/7041d181-a019-e8b9-4e4e-48215f841e2c@canonical.com
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

commit 23a4ca4e749a300a29abff1e304c55b55b6e59a3
Author: Josh Poimboeuf <jpoimboe@redhat.com>
Date:   Mon Jan 29 22:00:41 2018 -0600

    objtool: Warn on stripped section symbol
    
    commit 830c1e3d16b2c1733cd1ec9c8f4d47a398ae31bc
    
    With the following fix:
    
      2a0098d70640 ("objtool: Fix seg fault with gold linker")
    
    ... a seg fault was avoided, but the original seg fault condition in
    objtool wasn't fixed.  Replace the seg fault with an error message.
    
    Suggested-by: Ingo Molnar <mingo@kernel.org>
    Signed-off-by: Josh Poimboeuf <jpoimboe@redhat.com>
    Cc: Andy Lutomirski <luto@kernel.org>
    Cc: Borislav Petkov <bp@alien8.de>
    Cc: Dave Hansen <dave.hansen@linux.intel.com>
    Cc: David Woodhouse <dwmw2@infradead.org>
    Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
    Cc: Guenter Roeck <linux@roeck-us.net>
    Cc: H. Peter Anvin <hpa@zytor.com>
    Cc: Juergen Gross <jgross@suse.com>
    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/dc4585a70d6b975c99fc51d1957ccdde7bd52f3a.1517284349.git.jpoimboe@redhat.com
    Signed-off-by: Ingo Molnar <mingo@kernel.org>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

commit 3e04e09855c5cbc4f18c2d14bec326b1ff6f11f6
Author: Josh Poimboeuf <jpoimboe@redhat.com>
Date:   Mon Jan 29 22:00:40 2018 -0600

    objtool: Add support for alternatives at the end of a section
    
    commit 17bc33914bcc98ba3c6b426fd1c49587a25c0597
    
    Now that the previous patch gave objtool the ability to read retpoline
    alternatives, it shows a new warning:
    
      arch/x86/entry/entry_64.o: warning: objtool: .entry_trampoline: don't know how to handle alternatives at end of section
    
    This is due to the JMP_NOSPEC in entry_SYSCALL_64_trampoline().
    
    Previously, objtool ignored this situation because it wasn't needed, and
    it would have required a bit of extra code.  Now that this case exists,
    add proper support for it.
    
    Signed-off-by: Josh Poimboeuf <jpoimboe@redhat.com>
    Cc: Andy Lutomirski <luto@kernel.org>
    Cc: Borislav Petkov <bp@alien8.de>
    Cc: Dave Hansen <dave.hansen@linux.intel.com>
    Cc: David Woodhouse <dwmw2@infradead.org>
    Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
    Cc: Guenter Roeck <linux@roeck-us.net>
    Cc: H. Peter Anvin <hpa@zytor.com>
    Cc: Juergen Gross <jgross@suse.com>
    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/2a30a3c2158af47d891a76e69bb1ef347e0443fd.1517284349.git.jpoimboe@redhat.com
    Signed-off-by: Ingo Molnar <mingo@kernel.org>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

commit a358df03279e806f8f4217eacf813c5b6c3578ee
Author: Josh Poimboeuf <jpoimboe@redhat.com>
Date:   Mon Jan 29 22:00:39 2018 -0600

    objtool: Improve retpoline alternative handling
    
    commit a845c7cf4b4cb5e9e3b2823867892b27646f3a98
    
    Currently objtool requires all retpolines to be:
    
      a) patched in with alternatives; and
    
      b) annotated with ANNOTATE_NOSPEC_ALTERNATIVE.
    
    If you forget to do both of the above, objtool segfaults trying to
    dereference a NULL 'insn->call_dest' pointer.
    
    Avoid that situation and print a more helpful error message:
    
      quirks.o: warning: objtool: efi_delete_dummy_variable()+0x99: unsupported intra-function call
      quirks.o: warning: objtool: If this is a retpoline, please patch it in with alternatives and annotate it with ANNOTATE_NOSPEC_ALTERNATIVE.
    
    Future improvements can be made to make objtool smarter with respect to
    retpolines, but this is a good incremental improvement for now.
    
    Reported-and-tested-by: Guenter Roeck <linux@roeck-us.net>
    Signed-off-by: Josh Poimboeuf <jpoimboe@redhat.com>
    Cc: Andy Lutomirski <luto@kernel.org>
    Cc: Borislav Petkov <bp@alien8.de>
    Cc: Dave Hansen <dave.hansen@linux.intel.com>
    Cc: David Woodhouse <dwmw2@infradead.org>
    Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
    Cc: H. Peter Anvin <hpa@zytor.com>
    Cc: Juergen Gross <jgross@suse.com>
    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/819e50b6d9c2e1a22e34c1a636c0b2057cc8c6e5.1517284349.git.jpoimboe@redhat.com
    Signed-off-by: Ingo Molnar <mingo@kernel.org>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

commit 92f4b68ed14c7731cadd5bf7501a98da5302c093
Author: Paolo Bonzini <pbonzini@redhat.com>
Date:   Thu Jan 11 12:16:15 2018 +0100

    KVM: VMX: introduce alloc_loaded_vmcs
    
    commit f21f165ef922c2146cc5bdc620f542953c41714b
    
    Group together the calls to alloc_vmcs and loaded_vmcs_init.  Soon we'll also
    allocate an MSR bitmap there.
    
    Cc: stable@vger.kernel.org       # prereq for Spectre mitigation
    Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

commit 2e9521197f08d8cec826d3a5ff04131e40a79120
Author: Jim Mattson <jmattson@google.com>
Date:   Mon Nov 27 17:22:25 2017 -0600

    KVM: nVMX: Eliminate vmcs02 pool
    
    commit de3a0021a60635de96aa92713c1a31a96747d72c
    
    The potential performance advantages of a vmcs02 pool have never been
    realized. To simplify the code, eliminate the pool. Instead, a single
    vmcs02 is allocated per VCPU when the VCPU enters VMX operation.
    
    Cc: stable@vger.kernel.org       # prereq for Spectre mitigation
    Signed-off-by: Jim Mattson <jmattson@google.com>
    Signed-off-by: Mark Kanda <mark.kanda@oracle.com>
    Reviewed-by: Ameya More <ameya.more@oracle.com>
    Reviewed-by: David Hildenbrand <david@redhat.com>
    Reviewed-by: Paolo Bonzini <pbonzini@redhat.com>
    Signed-off-by: Radim Krčmář <rkrcmar@redhat.com>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

commit 76f06358ec400cd5f7c8260fd290e7a7ee20fbcf
Author: Jesse Chan <jc@linux.com>
Date:   Sun Nov 19 23:45:49 2017 -0800

    ASoC: pcm512x: add missing MODULE_DESCRIPTION/AUTHOR/LICENSE
    
    commit 0cab20cec0b663b7be8e2be5998d5a4113647f86 upstream.
    
    This change resolves a new compile-time warning
    when built as a loadable module:
    
    WARNING: modpost: missing MODULE_LICENSE() in sound/soc/codecs/snd-soc-pcm512x-spi.o
    see include/linux/module.h for more information
    
    This adds the license as "GPL v2", which matches the header of the file.
    
    MODULE_DESCRIPTION and MODULE_AUTHOR are also added.
    
    Signed-off-by: Jesse Chan <jc@linux.com>
    Signed-off-by: Mark Brown <broonie@kernel.org>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

commit bc484da3e18c13b15badcc861e816514ccd86f8c
Author: Jesse Chan <jc@linux.com>
Date:   Mon Nov 20 12:58:03 2017 -0800

    pinctrl: pxa: pxa2xx: add missing MODULE_DESCRIPTION/AUTHOR/LICENSE
    
    commit 0b9335cbd38e3bd2025bcc23b5758df4ac035f75 upstream.
    
    This change resolves a new compile-time warning
    when built as a loadable module:
    
    WARNING: modpost: missing MODULE_LICENSE() in drivers/pinctrl/pxa/pinctrl-pxa2xx.o
    see include/linux/module.h for more information
    
    This adds the license as "GPL v2", which matches the header of the file.
    
    MODULE_DESCRIPTION and MODULE_AUTHOR are also added.
    
    Signed-off-by: Jesse Chan <jc@linux.com>
    Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

commit ce094a80f019049a7bfb6860a91f3856bd53ec3b
Author: Linus Walleij <linus.walleij@linaro.org>
Date:   Mon Nov 13 11:29:55 2017 +0100

    iio: adc/accel: Fix up module licenses
    
    commit 9a0ebbc93547d88f422905c34dcceebe928f3e9e upstream.
    
    The module license checker complains about these two so just fix
    it up. They are both GPLv2, both written by me or using code
    I extracted while refactoring from the GPLv2 drivers.
    
    Cc: Randy Dunlap <rdunlap@infradead.org>
    Reported-by: Randy Dunlap <rdunlap@infradead.org>
    Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
    Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

commit c8aa5cd906a583332f831b88a9d7177f0427b986
Author: Jesse Chan <jc@linux.com>
Date:   Wed Jan 10 17:41:10 2018 +0100

    auxdisplay: img-ascii-lcd: add missing MODULE_DESCRIPTION/AUTHOR/LICENSE
    
    commit 09c479f7f1fbfaf848e5813996793966cd50be81 upstream.
    
    This change resolves a new compile-time warning
    when built as a loadable module:
    
    WARNING: modpost: missing MODULE_LICENSE() in drivers/auxdisplay/img-ascii-lcd.o
    see include/linux/module.h for more information
    
    This adds the license as "GPL", which matches the header of the file.
    
    MODULE_DESCRIPTION and MODULE_AUTHOR are also added.
    
    Signed-off-by: Jesse Chan <jc@linux.com>
    Signed-off-by: Arnd Bergmann <arnd@arndb.de>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

commit 9f8955f96bd520efc7def658ae61b67db20b1b46
Author: Borislav Petkov <bp@suse.de>
Date:   Sat Jan 27 16:24:34 2018 +0000

    x86/speculation: Simplify indirect_branch_prediction_barrier()
    
    commit 64e16720ea0879f8ab4547e3b9758936d483909b
    
    Make it all a function which does the WRMSR instead of having a hairy
    inline asm.
    
    [dwmw2: export it, fix CONFIG_RETPOLINE issues]
    
    Signed-off-by: Borislav Petkov <bp@suse.de>
    Signed-off-by: David Woodhouse <dwmw@amazon.co.uk>
    Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
    Cc: ak@linux.intel.com
    Cc: dave.hansen@intel.com
    Cc: karahmed@amazon.de
    Cc: arjan@linux.intel.com
    Cc: torvalds@linux-foundation.org
    Cc: peterz@infradead.org
    Cc: bp@alien8.de
    Cc: pbonzini@redhat.com
    Cc: tim.c.chen@linux.intel.com
    Cc: gregkh@linux-foundation.org
    Link: https://lkml.kernel.org/r/1517070274-12128-4-git-send-email-dwmw@amazon.co.uk
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

commit 52d78bce4965e685eea60763076f688272f963ea
Author: Borislav Petkov <bp@alien8.de>
Date:   Sat Jan 27 16:24:33 2018 +0000

    x86/retpoline: Simplify vmexit_fill_RSB()
    
    commit 1dde7415e99933bb7293d6b2843752cbdb43ec11
    
    Simplify it to call an asm-function instead of pasting 41 insn bytes at
    every call site. Also, add alignment to the macro as suggested here:
    
      https://support.google.com/faqs/answer/7625886
    
    [dwmw2: Clean up comments, let it clobber %ebx and just tell the compiler]
    
    Signed-off-by: Borislav Petkov <bp@suse.de>
    Signed-off-by: David Woodhouse <dwmw@amazon.co.uk>
    Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
    Cc: ak@linux.intel.com
    Cc: dave.hansen@intel.com
    Cc: karahmed@amazon.de
    Cc: arjan@linux.intel.com
    Cc: torvalds@linux-foundation.org
    Cc: peterz@infradead.org
    Cc: bp@alien8.de
    Cc: pbonzini@redhat.com
    Cc: tim.c.chen@linux.intel.com
    Cc: gregkh@linux-foundation.org
    Link: https://lkml.kernel.org/r/1517070274-12128-3-git-send-email-dwmw@amazon.co.uk
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

commit 7f3e0daa9e125d3d4d7720136370303009edbdeb
Author: David Woodhouse <dwmw@amazon.co.uk>
Date:   Sat Jan 27 16:24:32 2018 +0000

    x86/cpufeatures: Clean up Spectre v2 related CPUID flags
    
    commit 2961298efe1ea1b6fc0d7ee8b76018fa6c0bcef2
    
    We want to expose the hardware features simply in /proc/cpuinfo as "ibrs",
    "ibpb" and "stibp". Since AMD has separate CPUID bits for those, use them
    as the user-visible bits.
    
    When the Intel SPEC_CTRL bit is set which indicates both IBRS and IBPB
    capability, set those (AMD) bits accordingly. Likewise if the Intel STIBP
    bit is set, set the AMD STIBP that's used for the generic hardware
    capability.
    
    Hide the rest from /proc/cpuinfo by putting "" in the comments. Including
    RETPOLINE and RETPOLINE_AMD which shouldn't be visible there. There are
    patches to make the sysfs vulnerabilities information non-readable by
    non-root, and the same should apply to all information about which
    mitigations are actually in use. Those *shouldn't* appear in /proc/cpuinfo.
    
    The feature bit for whether IBPB is actually used, which is needed for
    ALTERNATIVEs, is renamed to X86_FEATURE_USE_IBPB.
    
    Originally-by: Borislav Petkov <bp@suse.de>
    Signed-off-by: David Woodhouse <dwmw@amazon.co.uk>
    Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
    Cc: ak@linux.intel.com
    Cc: dave.hansen@intel.com
    Cc: karahmed@amazon.de
    Cc: arjan@linux.intel.com
    Cc: torvalds@linux-foundation.org
    Cc: peterz@infradead.org
    Cc: bp@alien8.de
    Cc: pbonzini@redhat.com
    Cc: tim.c.chen@linux.intel.com
    Cc: gregkh@linux-foundation.org
    Link: https://lkml.kernel.org/r/1517070274-12128-2-git-send-email-dwmw@amazon.co.uk
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

commit 249b1f7a7f09c9c5243f8c592ea7fb13871968bc
Author: Thomas Gleixner <tglx@linutronix.de>
Date:   Sat Jan 27 15:45:14 2018 +0100

    x86/cpu/bugs: Make retpoline module warning conditional
    
    commit e383095c7fe8d218e00ec0f83e4b95ed4e627b02
    
    If sysfs is disabled and RETPOLINE not defined:
    
    arch/x86/kernel/cpu/bugs.c:97:13: warning: ‘spectre_v2_bad_module’ defined but not used
    [-Wunused-variable]
     static bool spectre_v2_bad_module;
    
    Hide it.
    
    Fixes: caf7501a1b4e ("module/retpoline: Warn about missing retpoline in module")
    Reported-by: Borislav Petkov <bp@alien8.de>
    Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
    Cc: Andi Kleen <ak@linux.intel.com>
    Cc: David Woodhouse <dwmw2@infradead.org>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

commit 91ff9a75f360eb89e913fcc4b3a7fbb602c67cbb
Author: Borislav Petkov <bp@suse.de>
Date:   Fri Jan 26 13:11:39 2018 +0100

    x86/bugs: Drop one "mitigation" from dmesg
    
    commit 55fa19d3e51f33d9cd4056d25836d93abf9438db
    
    Make
    
    [    0.031118] Spectre V2 mitigation: Mitigation: Full generic retpoline
    
    into
    
    [    0.031118] Spectre V2: Mitigation: Full generic retpoline
    
    to reduce the mitigation mitigations strings.
    
    Signed-off-by: Borislav Petkov <bp@suse.de>
    Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
    Reviewed-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
    Cc: riel@redhat.com
    Cc: ak@linux.intel.com
    Cc: peterz@infradead.org
    Cc: David Woodhouse <dwmw2@infradead.org>
    Cc: jikos@kernel.org
    Cc: luto@amacapital.net
    Cc: dave.hansen@intel.com
    Cc: torvalds@linux-foundation.org
    Cc: keescook@google.com
    Cc: Josh Poimboeuf <jpoimboe@redhat.com>
    Cc: tim.c.chen@linux.intel.com
    Cc: pjt@google.com
    Link: https://lkml.kernel.org/r/20180126121139.31959-5-bp@alien8.de
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

commit b955239cf4ea953eb5fca5409a5524daf20f642a
Author: Borislav Petkov <bp@suse.de>
Date:   Fri Jan 26 13:11:37 2018 +0100

    x86/nospec: Fix header guards names
    
    commit 7a32fc51ca938e67974cbb9db31e1a43f98345a9
    
    ... to adhere to the _ASM_X86_ naming scheme.
    
    No functional change.
    
    Signed-off-by: Borislav Petkov <bp@suse.de>
    Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
    Cc: riel@redhat.com
    Cc: ak@linux.intel.com
    Cc: peterz@infradead.org
    Cc: David Woodhouse <dwmw2@infradead.org>
    Cc: jikos@kernel.org
    Cc: luto@amacapital.net
    Cc: dave.hansen@intel.com
    Cc: torvalds@linux-foundation.org
    Cc: keescook@google.com
    Cc: Josh Poimboeuf <jpoimboe@redhat.com>
    Cc: tim.c.chen@linux.intel.com
    Cc: gregkh@linux-foundation.org
    Cc: pjt@google.com
    Link: https://lkml.kernel.org/r/20180126121139.31959-3-bp@alien8.de
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

commit 67eb59b8ecfb319438706cee2cb67a3045b54494
Author: Borislav Petkov <bp@suse.de>
Date:   Fri Jan 26 13:11:36 2018 +0100

    x86/alternative: Print unadorned pointers
    
    commit 0e6c16c652cadaffd25a6bb326ec10da5bcec6b4
    
    After commit ad67b74d2469 ("printk: hash addresses printed with %p")
    pointers are being hashed when printed. However, this makes the alternative
    debug output completely useless. Switch to %px in order to see the
    unadorned kernel pointers.
    
    Signed-off-by: Borislav Petkov <bp@suse.de>
    Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
    Cc: riel@redhat.com
    Cc: ak@linux.intel.com
    Cc: peterz@infradead.org
    Cc: David Woodhouse <dwmw2@infradead.org>
    Cc: jikos@kernel.org
    Cc: luto@amacapital.net
    Cc: dave.hansen@intel.com
    Cc: torvalds@linux-foundation.org
    Cc: keescook@google.com
    Cc: Josh Poimboeuf <jpoimboe@redhat.com>
    Cc: tim.c.chen@linux.intel.com
    Cc: gregkh@linux-foundation.org
    Cc: pjt@google.com
    Link: https://lkml.kernel.org/r/20180126121139.31959-2-bp@alien8.de
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

commit dbbbafce5380f2df32e142e5f08f17cf1b55b59c
Author: David Woodhouse <dwmw@amazon.co.uk>
Date:   Thu Jan 25 16:14:15 2018 +0000

    x86/speculation: Add basic IBPB (Indirect Branch Prediction Barrier) support
    
    commit 20ffa1caecca4db8f79fe665acdeaa5af815a24d
    
    Expose indirect_branch_prediction_barrier() for use in subsequent patches.
    
    [ tglx: Add IBPB status to spectre_v2 sysfs file ]
    
    Co-developed-by: KarimAllah Ahmed <karahmed@amazon.de>
    Signed-off-by: KarimAllah Ahmed <karahmed@amazon.de>
    Signed-off-by: David Woodhouse <dwmw@amazon.co.uk>
    Cc: gnomes@lxorguk.ukuu.org.uk
    Cc: ak@linux.intel.com
    Cc: ashok.raj@intel.com
    Cc: dave.hansen@intel.com
    Cc: arjan@linux.intel.com
    Cc: torvalds@linux-foundation.org
    Cc: peterz@infradead.org
    Cc: bp@alien8.de
    Cc: pbonzini@redhat.com
    Cc: tim.c.chen@linux.intel.com
    Cc: gregkh@linux-foundation.org
    Link: https://lkml.kernel.org/r/1516896855-7642-8-git-send-email-dwmw@amazon.co.uk
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

commit 0fd222b19766ba28cf6e45b6ad461f1a303831bd
Author: David Woodhouse <dwmw@amazon.co.uk>
Date:   Thu Jan 25 16:14:14 2018 +0000

    x86/cpufeature: Blacklist SPEC_CTRL/PRED_CMD on early Spectre v2 microcodes
    
    commit a5b2966364538a0e68c9fa29bc0a3a1651799035
    
    This doesn't refuse to load the affected microcodes; it just refuses to
    use the Spectre v2 mitigation features if they're detected, by clearing
    the appropriate feature bits.
    
    The AMD CPUID bits are handled here too, because hypervisors *may* have
    been exposing those bits even on Intel chips, for fine-grained control
    of what's available.
    
    It is non-trivial to use x86_match_cpu() for this table because that
    doesn't handle steppings. And the approach taken in commit bd9240a18
    almost made me lose my lunch.
    
    Signed-off-by: David Woodhouse <dwmw@amazon.co.uk>
    Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
    Reviewed-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
    Cc: gnomes@lxorguk.ukuu.org.uk
    Cc: ak@linux.intel.com
    Cc: ashok.raj@intel.com
    Cc: dave.hansen@intel.com
    Cc: karahmed@amazon.de
    Cc: arjan@linux.intel.com
    Cc: torvalds@linux-foundation.org
    Cc: peterz@infradead.org
    Cc: bp@alien8.de
    Cc: pbonzini@redhat.com
    Cc: tim.c.chen@linux.intel.com
    Cc: gregkh@linux-foundation.org
    Link: https://lkml.kernel.org/r/1516896855-7642-7-git-send-email-dwmw@amazon.co.uk
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

commit d9b47a41160c71b217582b9876129e3fbf587225
Author: David Woodhouse <dwmw@amazon.co.uk>
Date:   Thu Jan 25 16:14:13 2018 +0000

    x86/pti: Do not enable PTI on CPUs which are not vulnerable to Meltdown
    
    commit fec9434a12f38d3aeafeb75711b71d8a1fdef621
    
    Also, for CPUs which don't speculate at all, don't report that they're
    vulnerable to the Spectre variants either.
    
    Leave the cpu_no_meltdown[] match table with just X86_VENDOR_AMD in it
    for now, even though that could be done with a simple comparison, on the
    assumption that we'll have more to add.
    
    Based on suggestions from Dave Hansen and Alan Cox.
    
    Signed-off-by: David Woodhouse <dwmw@amazon.co.uk>
    Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
    Reviewed-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
    Reviewed-by: Borislav Petkov <bp@suse.de>
    Acked-by: Dave Hansen <dave.hansen@intel.com>
    Cc: gnomes@lxorguk.ukuu.org.uk
    Cc: ak@linux.intel.com
    Cc: ashok.raj@intel.com
    Cc: karahmed@amazon.de
    Cc: arjan@linux.intel.com
    Cc: torvalds@linux-foundation.org
    Cc: peterz@infradead.org
    Cc: bp@alien8.de
    Cc: pbonzini@redhat.com
    Cc: tim.c.chen@linux.intel.com
    Cc: gregkh@linux-foundation.org
    Link: https://lkml.kernel.org/r/1516896855-7642-6-git-send-email-dwmw@amazon.co.uk
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

commit a65710dc584c1c424eb358a1f6e8c01d706e9f81
Author: David Woodhouse <dwmw@amazon.co.uk>
Date:   Thu Jan 25 16:14:12 2018 +0000

    x86/msr: Add definitions for new speculation control MSRs
    
    commit 1e340c60d0dd3ae07b5bedc16a0469c14b9f3410
    
    Add MSR and bit definitions for SPEC_CTRL, PRED_CMD and ARCH_CAPABILITIES.
    
    See Intel's 336996-Speculative-Execution-Side-Channel-Mitigations.pdf
    
    Signed-off-by: David Woodhouse <dwmw@amazon.co.uk>
    Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
    Reviewed-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
    Cc: gnomes@lxorguk.ukuu.org.uk
    Cc: ak@linux.intel.com
    Cc: ashok.raj@intel.com
    Cc: dave.hansen@intel.com
    Cc: karahmed@amazon.de
    Cc: arjan@linux.intel.com
    Cc: torvalds@linux-foundation.org
    Cc: peterz@infradead.org
    Cc: bp@alien8.de
    Cc: pbonzini@redhat.com
    Cc: tim.c.chen@linux.intel.com
    Cc: gregkh@linux-foundation.org
    Link: https://lkml.kernel.org/r/1516896855-7642-5-git-send-email-dwmw@amazon.co.uk
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

commit 15ee82be40b6895edeb324435621ef1869aac173
Author: David Woodhouse <dwmw@amazon.co.uk>
Date:   Thu Jan 25 16:14:11 2018 +0000

    x86/cpufeatures: Add AMD feature bits for Speculation Control
    
    commit 5d10cbc91d9eb5537998b65608441b592eec65e7
    
    AMD exposes the PRED_CMD/SPEC_CTRL MSRs slightly differently to Intel.
    See http://lkml.kernel.org/r/2b3e25cc-286d-8bd0-aeaf-9ac4aae39de8@amd.com
    
    Signed-off-by: David Woodhouse <dwmw@amazon.co.uk>
    Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
    Reviewed-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
    Cc: Tom Lendacky <thomas.lendacky@amd.com>
    Cc: gnomes@lxorguk.ukuu.org.uk
    Cc: ak@linux.intel.com
    Cc: ashok.raj@intel.com
    Cc: dave.hansen@intel.com
    Cc: karahmed@amazon.de
    Cc: arjan@linux.intel.com
    Cc: torvalds@linux-foundation.org
    Cc: peterz@infradead.org
    Cc: bp@alien8.de
    Cc: pbonzini@redhat.com
    Cc: tim.c.chen@linux.intel.com
    Cc: gregkh@linux-foundation.org
    Link: https://lkml.kernel.org/r/1516896855-7642-4-git-send-email-dwmw@amazon.co.uk
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

commit 343c91242d092852ab22411780f886317d7001aa
Author: David Woodhouse <dwmw@amazon.co.uk>
Date:   Thu Jan 25 16:14:10 2018 +0000

    x86/cpufeatures: Add Intel feature bits for Speculation Control
    
    commit fc67dd70adb711a45d2ef34e12d1a8be75edde61
    
    Add three feature bits exposed by new microcode on Intel CPUs for
    speculation control.
    
    Signed-off-by: David Woodhouse <dwmw@amazon.co.uk>
    Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
    Reviewed-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
    Reviewed-by: Borislav Petkov <bp@suse.de>
    Cc: gnomes@lxorguk.ukuu.org.uk
    Cc: ak@linux.intel.com
    Cc: ashok.raj@intel.com
    Cc: dave.hansen@intel.com
    Cc: karahmed@amazon.de
    Cc: arjan@linux.intel.com
    Cc: torvalds@linux-foundation.org
    Cc: peterz@infradead.org
    Cc: bp@alien8.de
    Cc: pbonzini@redhat.com
    Cc: tim.c.chen@linux.intel.com
    Cc: gregkh@linux-foundation.org
    Link: https://lkml.kernel.org/r/1516896855-7642-3-git-send-email-dwmw@amazon.co.uk
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

commit 76c4bd53969bcbaf19fe12218785411b390fd14b
Author: David Woodhouse <dwmw@amazon.co.uk>
Date:   Thu Jan 25 16:14:09 2018 +0000

    x86/cpufeatures: Add CPUID_7_EDX CPUID leaf
    
    commit 95ca0ee8636059ea2800dfbac9ecac6212d6b38f
    
    This is a pure feature bits leaf. There are two AVX512 feature bits in it
    already which were handled as scattered bits, and three more from this leaf
    are going to be added for speculation control features.
    
    Signed-off-by: David Woodhouse <dwmw@amazon.co.uk>
    Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
    Reviewed-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
    Reviewed-by: Borislav Petkov <bp@suse.de>
    Cc: gnomes@lxorguk.ukuu.org.uk
    Cc: ak@linux.intel.com
    Cc: ashok.raj@intel.com
    Cc: dave.hansen@intel.com
    Cc: karahmed@amazon.de
    Cc: arjan@linux.intel.com
    Cc: torvalds@linux-foundation.org
    Cc: peterz@infradead.org
    Cc: bp@alien8.de
    Cc: pbonzini@redhat.com
    Cc: tim.c.chen@linux.intel.com
    Cc: gregkh@linux-foundation.org
    Link: https://lkml.kernel.org/r/1516896855-7642-2-git-send-email-dwmw@amazon.co.uk
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

commit 86b5b1eb18aa49eedff2c9a9087fc48d03099844
Author: Andi Kleen <ak@linux.intel.com>
Date:   Thu Jan 25 15:50:28 2018 -0800

    module/retpoline: Warn about missing retpoline in module
    
    commit caf7501a1b4ec964190f31f9c3f163de252273b8
    
    There's a risk that a kernel which has full retpoline mitigations becomes
    vulnerable when a module gets loaded that hasn't been compiled with the
    right compiler or the right option.
    
    To enable detection of that mismatch at module load time, add a module info
    string "retpoline" at build time when the module was compiled with
    retpoline support. This only covers compiled C source, but assembler source
    or prebuilt object files are not checked.
    
    If a retpoline enabled kernel detects a non retpoline protected module at
    load time, print a warning and report it in the sysfs vulnerability file.
    
    [ tglx: Massaged changelog ]
    
    Signed-off-by: Andi Kleen <ak@linux.intel.com>
    Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
    Cc: David Woodhouse <dwmw2@infradead.org>
    Cc: gregkh@linuxfoundation.org
    Cc: torvalds@linux-foundation.org
    Cc: jeyu@kernel.org
    Cc: arjan@linux.intel.com
    Link: https://lkml.kernel.org/r/20180125235028.31211-1-andi@firstfloor.org
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

commit c927726674c7dfe42e8de585b70ffbd9ec775fc6
Author: Peter Zijlstra <peterz@infradead.org>
Date:   Thu Jan 25 10:58:14 2018 +0100

    KVM: VMX: Make indirect call speculation safe
    
    commit c940a3fb1e2e9b7d03228ab28f375fb5a47ff699
    
    Replace indirect call with CALL_NOSPEC.
    
    Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
    Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
    Reviewed-by: David Woodhouse <dwmw@amazon.co.uk>
    Cc: Andrea Arcangeli <aarcange@redhat.com>
    Cc: Andi Kleen <ak@linux.intel.com>
    Cc: Ashok Raj <ashok.raj@intel.com>
    Cc: Greg KH <gregkh@linuxfoundation.org>
    Cc: Jun Nakajima <jun.nakajima@intel.com>
    Cc: David Woodhouse <dwmw2@infradead.org>
    Cc: Linus Torvalds <torvalds@linux-foundation.org>
    Cc: rga@amazon.de
    Cc: Dave Hansen <dave.hansen@intel.com>
    Cc: Asit Mallick <asit.k.mallick@intel.com>
    Cc: Andy Lutomirski <luto@kernel.org>
    Cc: Josh Poimboeuf <jpoimboe@redhat.com>
    Cc: Jason Baron <jbaron@akamai.com>
    Cc: Paolo Bonzini <pbonzini@redhat.com>
    Cc: Dan Williams <dan.j.williams@intel.com>
    Cc: Arjan Van De Ven <arjan.van.de.ven@intel.com>
    Cc: Tim Chen <tim.c.chen@linux.intel.com>
    Link: https://lkml.kernel.org/r/20180125095843.645776917@infradead.org
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

commit 76bee09efb89b0a71566bec5f36d9e65d9034aef
Author: Peter Zijlstra <peterz@infradead.org>
Date:   Thu Jan 25 10:58:13 2018 +0100

    KVM: x86: Make indirect calls in emulator speculation safe
    
    commit 1a29b5b7f347a1a9230c1e0af5b37e3e571588ab
    
    Replace the indirect calls with CALL_NOSPEC.
    
    Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
    Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
    Reviewed-by: David Woodhouse <dwmw@amazon.co.uk>
    Cc: Andrea Arcangeli <aarcange@redhat.com>
    Cc: Andi Kleen <ak@linux.intel.com>
    Cc: Ashok Raj <ashok.raj@intel.com>
    Cc: Greg KH <gregkh@linuxfoundation.org>
    Cc: Jun Nakajima <jun.nakajima@intel.com>
    Cc: David Woodhouse <dwmw2@infradead.org>
    Cc: Linus Torvalds <torvalds@linux-foundation.org>
    Cc: rga@amazon.de
    Cc: Dave Hansen <dave.hansen@intel.com>
    Cc: Asit Mallick <asit.k.mallick@intel.com>
    Cc: Andy Lutomirski <luto@kernel.org>
    Cc: Josh Poimboeuf <jpoimboe@redhat.com>
    Cc: Jason Baron <jbaron@akamai.com>
    Cc: Paolo Bonzini <pbonzini@redhat.com>
    Cc: Dan Williams <dan.j.williams@intel.com>
    Cc: Arjan Van De Ven <arjan.van.de.ven@intel.com>
    Cc: Tim Chen <tim.c.chen@linux.intel.com>
    Link: https://lkml.kernel.org/r/20180125095843.595615683@infradead.org
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

commit 4ce354deed2cc18b5b2175cf487011e375e89c75
Author: Waiman Long <longman@redhat.com>
Date:   Mon Jan 22 17:09:34 2018 -0500

    x86/retpoline: Remove the esp/rsp thunk
    
    commit 1df37383a8aeabb9b418698f0bcdffea01f4b1b2
    
    It doesn't make sense to have an indirect call thunk with esp/rsp as
    retpoline code won't work correctly with the stack pointer register.
    Removing it will help compiler writers to catch error in case such
    a thunk call is emitted incorrectly.
    
    Fixes: 76b043848fd2 ("x86/retpoline: Add initial retpoline support")
    Suggested-by: Jeff Law <law@redhat.com>
    Signed-off-by: Waiman Long <longman@redhat.com>
    Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
    Acked-by: David Woodhouse <dwmw@amazon.co.uk>
    Cc: Tom Lendacky <thomas.lendacky@amd.com>
    Cc: Kees Cook <keescook@google.com>
    Cc: Andi Kleen <ak@linux.intel.com>
    Cc: Tim Chen <tim.c.chen@linux.intel.com>
    Cc: Peter Zijlstra <peterz@infradead.org>
    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: Josh Poimboeuf <jpoimboe@redhat.com>
    Cc: Arjan van de Ven <arjan@linux.intel.com>
    Cc: Greg Kroah-Hartman <gregkh@linux-foundation.org>
    Cc: Paul Turner <pjt@google.com>
    Link: https://lkml.kernel.org/r/1516658974-27852-1-git-send-email-longman@redhat.com
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

commit d6eded6c94530cb2f359f1fbffcb5f92ee0fa8b2
Author: Michael Ellerman <mpe@ellerman.id.au>
Date:   Tue Jan 16 22:17:18 2018 +1100

    powerpc/64s: Allow control of RFI flush via debugfs
    
    commit 236003e6b5443c45c18e613d2b0d776a9f87540e upstream.
    
    Expose the state of the RFI flush (enabled/disabled) via debugfs, and
    allow it to be enabled/disabled at runtime.
    
    eg: $ cat /sys/kernel/debug/powerpc/rfi_flush
        1
        $ echo 0 > /sys/kernel/debug/powerpc/rfi_flush
        $ cat /sys/kernel/debug/powerpc/rfi_flush
        0
    
    Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
    Reviewed-by: Nicholas Piggin <npiggin@gmail.com>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

commit 517bdccc3af650316046801fdcd828d7b6aa42ba
Author: Michael Ellerman <mpe@ellerman.id.au>
Date:   Tue Jan 16 21:20:05 2018 +1100

    powerpc/64s: Wire up cpu_show_meltdown()
    
    commit fd6e440f20b1a4304553775fc55938848ff617c9 upstream.
    
    The recent commit 87590ce6e373 ("sysfs/cpu: Add vulnerability folder")
    added a generic folder and set of files for reporting information on
    CPU vulnerabilities. One of those was for meltdown:
    
      /sys/devices/system/cpu/vulnerabilities/meltdown
    
    This commit wires up that file for 64-bit Book3S powerpc.
    
    For now we default to "Vulnerable" unless the RFI flush is enabled.
    That may not actually be true on all hardware, further patches will
    refine the reporting based on the CPU/platform etc. But for now we
    default to being pessimists.
    
    Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

commit 16d3d10d29f753d0247d94f5e889e93dd13f56bb
Author: Liu, Changcheng <changcheng.liu@intel.com>
Date:   Thu Dec 14 15:32:48 2017 -0800

    scripts/faddr2line: fix CROSS_COMPILE unset error
    
    commit 4cc90b4cc3d4955f79eae4f7f9d64e67e17b468e upstream.
    
    faddr2line hit var unbound error when CROSS_COMPILE isn't set since
    nounset option is set in bash script.
    
    Link: http://lkml.kernel.org/r/20171206013022.GA83929@sofia
    Fixes: 95a879825419 ("scripts/faddr2line: extend usage on generic arch")
    Signed-off-by: Liu Changcheng <changcheng.liu@intel.com>
    Reported-by: Richard Weinberger <richard.weinberger@gmail.com>
    Reviewed-by: Richard Weinberger <richard@nod.at>
    Cc: Thomas Gleixner <tglx@linutronix.de>
    Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
    Cc: Philippe Ombredanne <pombredanne@nexb.com>
    Cc: NeilBrown <neilb@suse.com>
    Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
    Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>