1. 14 Mar, 2022 22 commits
  2. 13 Mar, 2022 2 commits
  3. 12 Mar, 2022 8 commits
  4. 11 Mar, 2022 8 commits
    • Randy Dunlap's avatar
      ARM: Spectre-BHB: provide empty stub for non-config · 68453767
      Randy Dunlap authored
      When CONFIG_GENERIC_CPU_VULNERABILITIES is not set, references
      to spectre_v2_update_state() cause a build error, so provide an
      empty stub for that function when the Kconfig option is not set.
      
      Fixes this build error:
      
        arm-linux-gnueabi-ld: arch/arm/mm/proc-v7-bugs.o: in function `cpu_v7_bugs_init':
        proc-v7-bugs.c:(.text+0x52): undefined reference to `spectre_v2_update_state'
        arm-linux-gnueabi-ld: proc-v7-bugs.c:(.text+0x82): undefined reference to `spectre_v2_update_state'
      
      Fixes: b9baf5c8 ("ARM: Spectre-BHB workaround")
      Signed-off-by: default avatarRandy Dunlap <rdunlap@infradead.org>
      Reported-by: default avatarkernel test robot <lkp@intel.com>
      Cc: Russell King <rmk+kernel@armlinux.org.uk>
      Cc: Catalin Marinas <catalin.marinas@arm.com>
      Cc: linux-arm-kernel@lists.infradead.org
      Cc: patches@armlinux.org.uk
      Acked-by: default avatarRussell King (Oracle) <rmk+kernel@armlinux.org.uk>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      68453767
    • Linus Torvalds's avatar
      Merge tag 'riscv-for-linus-5.17-rc8' of git://git.kernel.org/pub/scm/linux/kernel/git/riscv/linux · 77fe1ba9
      Linus Torvalds authored
      Pull RISC-V fixes from Palmer Dabbelt:
      
       - prevent users from enabling the alternatives framework (and thus
         errata handling) on XIP kernels, where runtime code patching does not
         function correctly.
      
       - properly detect offset overflow for AUIPC-based relocations in
         modules. This may manifest as modules calling arbitrary invalid
         addresses, depending on the address allocated when a module is
         loaded.
      
      * tag 'riscv-for-linus-5.17-rc8' of git://git.kernel.org/pub/scm/linux/kernel/git/riscv/linux:
        riscv: Fix auipc+jalr relocation range checks
        riscv: alternative only works on !XIP_KERNEL
      77fe1ba9
    • Linus Torvalds's avatar
      Merge tag 'powerpc-5.17-6' of git://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux · 878409ec
      Linus Torvalds authored
      Pull powerpc fix from Michael Ellerman:
       "Fix STACKTRACE=n build, in particular for skiroot_defconfig"
      
      * tag 'powerpc-5.17-6' of git://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux:
        powerpc: Fix STACKTRACE=n build
      878409ec
    • Russell King (Oracle)'s avatar
      ARM: fix Thumb2 regression with Spectre BHB · 6c7cb60b
      Russell King (Oracle) authored
      When building for Thumb2, the vectors make use of a local label. Sadly,
      the Spectre BHB code also uses a local label with the same number which
      results in the Thumb2 reference pointing at the wrong place. Fix this
      by changing the number used for the Spectre BHB local label.
      
      Fixes: b9baf5c8 ("ARM: Spectre-BHB workaround")
      Tested-by: default avatarNathan Chancellor <nathan@kernel.org>
      Signed-off-by: default avatarRussell King (Oracle) <rmk+kernel@armlinux.org.uk>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      6c7cb60b
    • Linus Torvalds's avatar
      Merge tag 'mmc-v5.17-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/ulfh/mmc · 3977a3fb
      Linus Torvalds authored
      Pull MMC fixes from Ulf Hansson:
       "MMC core:
         - Restore (mostly) the busy polling for MMC_SEND_OP_COND
      
        MMC host:
         - meson-gx: Fix DMA usage of meson_mmc_post_req()"
      
      * tag 'mmc-v5.17-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/ulfh/mmc:
        mmc: core: Restore (almost) the busy polling for MMC_SEND_OP_COND
        mmc: meson: Fix usage of meson_mmc_post_req()
      3977a3fb
    • Jarkko Sakkinen's avatar
      x86/sgx: Free backing memory after faulting the enclave page · 08999b24
      Jarkko Sakkinen authored
      There is a limited amount of SGX memory (EPC) on each system.  When that
      memory is used up, SGX has its own swapping mechanism which is similar
      in concept but totally separate from the core mm/* code.  Instead of
      swapping to disk, SGX swaps from EPC to normal RAM.  That normal RAM
      comes from a shared memory pseudo-file and can itself be swapped by the
      core mm code.  There is a hierarchy like this:
      
      	EPC <-> shmem <-> disk
      
      After data is swapped back in from shmem to EPC, the shmem backing
      storage needs to be freed.  Currently, the backing shmem is not freed.
      This effectively wastes the shmem while the enclave is running.  The
      memory is recovered when the enclave is destroyed and the backing
      storage freed.
      
      Sort this out by freeing memory with shmem_truncate_range(), as soon as
      a page is faulted back to the EPC.  In addition, free the memory for
      PCMD pages as soon as all PCMD's in a page have been marked as unused
      by zeroing its contents.
      
      Cc: stable@vger.kernel.org
      Fixes: 1728ab54 ("x86/sgx: Add a page reclaimer")
      Reported-by: default avatarDave Hansen <dave.hansen@linux.intel.com>
      Signed-off-by: default avatarJarkko Sakkinen <jarkko@kernel.org>
      Signed-off-by: default avatarDave Hansen <dave.hansen@linux.intel.com>
      Link: https://lkml.kernel.org/r/20220303223859.273187-1-jarkko@kernel.org
      08999b24
    • Linus Torvalds's avatar
      Merge branch 'davidh' (fixes from David Howells) · 93ce9358
      Linus Torvalds authored
      Merge misc fixes from David Howells:
       "A set of patches for watch_queue filter issues noted by Jann. I've
        added in a cleanup patch from Christophe Jaillet to convert to using
        formal bitmap specifiers for the note allocation bitmap.
      
        Also two filesystem fixes (afs and cachefiles)"
      
      * emailed patches from David Howells <dhowells@redhat.com>:
        cachefiles: Fix volume coherency attribute
        afs: Fix potential thrashing in afs writeback
        watch_queue: Make comment about setting ->defunct more accurate
        watch_queue: Fix lack of barrier/sync/lock between post and read
        watch_queue: Free the alloc bitmap when the watch_queue is torn down
        watch_queue: Fix the alloc bitmap size to reflect notes allocated
        watch_queue: Use the bitmap API when applicable
        watch_queue: Fix to always request a pow-of-2 pipe ring size
        watch_queue: Fix to release page in ->release()
        watch_queue, pipe: Free watchqueue state after clearing pipe ring
        watch_queue: Fix filter limit check
      93ce9358
    • David Howells's avatar
      cachefiles: Fix volume coherency attribute · 413a4a6b
      David Howells authored
      A network filesystem may set coherency data on a volume cookie, and if
      given, cachefiles will store this in an xattr on the directory in the
      cache corresponding to the volume.
      
      The function that sets the xattr just stores the contents of the volume
      coherency buffer directly into the xattr, with nothing added; the
      checking function, on the other hand, has a cut'n'paste error whereby it
      tries to interpret the xattr contents as would be the xattr on an
      ordinary file (using the cachefiles_xattr struct).  This results in a
      failure to match the coherency data because the buffer ends up being
      shifted by 18 bytes.
      
      Fix this by defining a structure specifically for the volume xattr and
      making both the setting and checking functions use it.
      
      Since the volume coherency doesn't work if used, take the opportunity to
      insert a reserved field for future use, set it to 0 and check that it is
      0.  Log mismatch through the appropriate tracepoint.
      
      Note that this only affects cifs; 9p, afs, ceph and nfs don't use the
      volume coherency data at the moment.
      
      Fixes: 32e15003 ("fscache, cachefiles: Store the volume coherency data")
      Reported-by: default avatarRohith Surabattula <rohiths.msft@gmail.com>
      Signed-off-by: default avatarDavid Howells <dhowells@redhat.com>
      Reviewed-by: default avatarJeff Layton <jlayton@kernel.org>
      cc: Steve French <smfrench@gmail.com>
      cc: linux-cifs@vger.kernel.org
      cc: linux-cachefs@redhat.com
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      413a4a6b