1. 20 Oct, 2021 31 commits
  2. 16 Oct, 2021 2 commits
  3. 11 Oct, 2021 2 commits
    • Borislav Petkov's avatar
      x86/Kconfig: Do not enable AMD_MEM_ENCRYPT_ACTIVE_BY_DEFAULT automatically · 71188590
      Borislav Petkov authored
      This Kconfig option was added initially so that memory encryption is
      enabled by default on machines which support it.
      
      However, devices which have DMA masks that are less than the bit
      position of the encryption bit, aka C-bit, require the use of an IOMMU
      or the use of SWIOTLB.
      
      If the IOMMU is disabled or in passthrough mode, the kernel would switch
      to SWIOTLB bounce-buffering for those transfers.
      
      In order to avoid that,
      
        2cc13bb4 ("iommu: Disable passthrough mode when SME is active")
      
      disables the default IOMMU passthrough mode so that devices for which the
      default 256K DMA is insufficient, can use the IOMMU instead.
      
      However 2, there are cases where the IOMMU is disabled in the BIOS, etc.
      (think the usual hardware folk "oops, I dropped the ball there" cases) or a
      driver doesn't properly use the DMA APIs or a device has a firmware or
      hardware bug, e.g.:
      
        ea68573d ("drm/amdgpu: Fail to load on RAVEN if SME is active")
      
      However 3, in the above GPU use case, there are APIs like Vulkan and
      some OpenGL/OpenCL extensions which are under the assumption that
      user-allocated memory can be passed in to the kernel driver and both the
      GPU and CPU can do coherent and concurrent access to the same memory.
      That cannot work with SWIOTLB bounce buffers, of course.
      
      So, in order for those devices to function, drop the "default y" for the
      SME by default active option so that users who want to have SME enabled,
      will need to either enable it in their config or use "mem_encrypt=on" on
      the kernel command line.
      
       [ tlendacky: Generalize commit message. ]
      
      Fixes: 7744ccdb ("x86/mm: Add Secure Memory Encryption (SME) support")
      Reported-by: default avatarPaul Menzel <pmenzel@molgen.mpg.de>
      Signed-off-by: default avatarBorislav Petkov <bp@suse.de>
      Acked-by: default avatarAlex Deucher <alexander.deucher@amd.com>
      Acked-by: default avatarTom Lendacky <thomas.lendacky@amd.com>
      Cc: <stable@vger.kernel.org>
      Link: https://lkml.kernel.org/r/8bbacd0e-4580-3194-19d2-a0ecad7df09c@molgen.mpg.de
      71188590
    • Linus Torvalds's avatar
      Linux 5.15-rc5 · 64570fbc
      Linus Torvalds authored
      64570fbc
  4. 10 Oct, 2021 3 commits
    • Linus Torvalds's avatar
      Merge tag 'powerpc-5.15-3' of git://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux · efb52a7d
      Linus Torvalds authored
      Pull powerpc fixes from Michael Ellerman:
       "A bit of a big batch, partly because I didn't send any last week, and
        also just because the BPF fixes happened to land this week.
      
        Summary:
      
         - Fix a regression hit by the IPR SCSI driver, introduced by the
           recent addition of MSI domains on pseries.
      
         - A big series including 8 BPF fixes, some with potential security
           impact and the rest various code generation issues.
      
         - Fix our program check assembler entry path, which was accidentally
           jumping into a gas macro and generating strange stack frames, which
           could confuse find_bug().
      
         - A couple of fixes, and related changes, to fix corner cases in our
           machine check handling.
      
         - Fix our DMA IOMMU ops, which were not always returning the optimal
           DMA mask, leading to at least one device falling back to 32-bit DMA
           when it shouldn't.
      
         - A fix for KUAP handling on 32-bit Book3S.
      
         - Fix crashes seen when kdumping on some pseries systems.
      
        Thanks to Naveen N. Rao, Nicholas Piggin, Alexey Kardashevskiy, Cédric
        Le Goater, Christophe Leroy, Mahesh Salgaonkar, Abdul Haleem,
        Christoph Hellwig, Johan Almbladh, Stan Johnson"
      
      * tag 'powerpc-5.15-3' of git://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux:
        pseries/eeh: Fix the kdump kernel crash during eeh_pseries_init
        powerpc/32s: Fix kuap_kernel_restore()
        powerpc/pseries/msi: Add an empty irq_write_msi_msg() handler
        powerpc/64s: Fix unrecoverable MCE calling async handler from NMI
        powerpc/64/interrupt: Reconcile soft-mask state in NMI and fix false BUG
        powerpc/64: warn if local irqs are enabled in NMI or hardirq context
        powerpc/traps: do not enable irqs in _exception
        powerpc/64s: fix program check interrupt emergency stack path
        powerpc/bpf ppc32: Fix BPF_SUB when imm == 0x80000000
        powerpc/bpf ppc32: Do not emit zero extend instruction for 64-bit BPF_END
        powerpc/bpf ppc32: Fix JMP32_JSET_K
        powerpc/bpf ppc32: Fix ALU32 BPF_ARSH operation
        powerpc/bpf: Emit stf barrier instruction sequences for BPF_NOSPEC
        powerpc/security: Add a helper to query stf_barrier type
        powerpc/bpf: Fix BPF_SUB when imm == 0x80000000
        powerpc/bpf: Fix BPF_MOD when imm == 1
        powerpc/bpf: Validate branch ranges
        powerpc/lib: Add helper to check if offset is within conditional branch range
        powerpc/iommu: Report the correct most efficient DMA mask for PCI devices
      efb52a7d
    • Linus Torvalds's avatar
      Merge tag 'objtool_urgent_for_v5.15_rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip · 75cd9b01
      Linus Torvalds authored
      Pull objtool fixes from Borislav Petkov:
      
       - Remove an extra section.len member in favour of section.sh_size
      
       - Align .altinstructions section creation with the kernel's by creating
         them with entry size of 0
      
       - Fix objtool to convert a reloc symbol to a section offset and not to
         not warn about not knowing how
      
      * tag 'objtool_urgent_for_v5.15_rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
        objtool: Remove redundant 'len' field from struct section
        objtool: Make .altinstructions section entry size consistent
        objtool: Remove reloc symbol type checks in get_alt_entry()
      75cd9b01
    • Linus Torvalds's avatar
      Merge tag 'x86_urgent_for_v5.15_rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip · c22ccc4a
      Linus Torvalds authored
      Pull x86 fixes from Borislav Petkov:
      
       - A FPU fix to properly handle invalid MXCSR values: 32-bit masks them
         out due to historical reasons and 64-bit kernels reject them
      
       - A fix to clear X86_FEATURE_SMAP when support for is not
         config-enabled
      
       - Three fixes correcting misspelled Kconfig symbols used in code
      
       - Two resctrl object cleanup fixes
      
       - Yet another attempt at fixing the neverending saga of botched x86
         timers, this time because some incredibly smart hardware decides to
         turn off the HPET timer in a low power state - who cares if the OS is
         relying on it...
      
       - Check the full return value range of an SEV VMGEXIT call to determine
         whether it returned an error
      
      * tag 'x86_urgent_for_v5.15_rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
        x86/fpu: Restore the masking out of reserved MXCSR bits
        x86/Kconfig: Correct reference to MWINCHIP3D
        x86/platform/olpc: Correct ifdef symbol to intended CONFIG_OLPC_XO15_SCI
        x86/entry: Clear X86_FEATURE_SMAP when CONFIG_X86_SMAP=n
        x86/entry: Correct reference to intended CONFIG_64_BIT
        x86/resctrl: Fix kfree() of the wrong type in domain_add_cpu()
        x86/resctrl: Free the ctrlval arrays when domain_setup_mon_state() fails
        x86/hpet: Use another crystalball to evaluate HPET usability
        x86/sev: Return an error on a returned non-zero SW_EXITINFO1[31:0]
      c22ccc4a
  5. 09 Oct, 2021 2 commits