1. 30 Aug, 2024 5 commits
    • Xi Ruoyao's avatar
      selftests: vDSO: add --cflags for pkg-config command querying libsodium · 1e661b34
      Xi Ruoyao authored
      When libsodium is installed into its own prefix, the --cflags output is
      needed for the compiler to find libsodium headers.
      Signed-off-by: default avatarXi Ruoyao <xry111@xry111.site>
      Signed-off-by: default avatarJason A. Donenfeld <Jason@zx2c4.com>
      1e661b34
    • Christophe Leroy's avatar
      selftests: vDSO: look for arch-specific function name in getrandom test · e1bbcab4
      Christophe Leroy authored
      Don't hard-code x86 specific names. Rather, use vdso_config definitions
      to find the correct function matching the architecture.
      
      Add random VDSO function names in names[][]. Remove the #ifdef
      CONFIG_VDSO32, as having the name there all the time is harmless and
      guaranties a steady index for following strings.
      Signed-off-by: default avatarChristophe Leroy <christophe.leroy@csgroup.eu>
      [Jason: add [6] to variable declaration rather than each usage site.]
      Signed-off-by: default avatarJason A. Donenfeld <Jason@zx2c4.com>
      e1bbcab4
    • Christophe Leroy's avatar
      selftests: vDSO: fix include order in build of test_vdso_chacha · f8d92fc5
      Christophe Leroy authored
      Building test_vdso_chacha currently leads to following issue:
      
        In file included from /home/chleroy/linux-powerpc/include/linux/limits.h:7,
                         from /opt/powerpc64-e5500--glibc--stable-2024.02-1/powerpc64-buildroot-linux-gnu/sysroot/usr/include/bits/local_lim.h:38,
                         from /opt/powerpc64-e5500--glibc--stable-2024.02-1/powerpc64-buildroot-linux-gnu/sysroot/usr/include/bits/posix1_lim.h:161,
                         from /opt/powerpc64-e5500--glibc--stable-2024.02-1/powerpc64-buildroot-linux-gnu/sysroot/usr/include/limits.h:195,
                         from /opt/powerpc64-e5500--glibc--stable-2024.02-1/lib/gcc/powerpc64-buildroot-linux-gnu/12.3.0/include-fixed/limits.h:203,
                         from /opt/powerpc64-e5500--glibc--stable-2024.02-1/lib/gcc/powerpc64-buildroot-linux-gnu/12.3.0/include-fixed/syslimits.h:7,
                         from /opt/powerpc64-e5500--glibc--stable-2024.02-1/lib/gcc/powerpc64-buildroot-linux-gnu/12.3.0/include-fixed/limits.h:34,
                         from /tmp/sodium/usr/local/include/sodium/export.h:7,
                         from /tmp/sodium/usr/local/include/sodium/crypto_stream_chacha20.h:14,
                         from vdso_test_chacha.c:6:
        /opt/powerpc64-e5500--glibc--stable-2024.02-1/powerpc64-buildroot-linux-gnu/sysroot/usr/include/bits/xopen_lim.h:99:6: error: missing binary operator before token "("
           99 | # if INT_MAX == 32767
              |      ^~~~~~~
        /opt/powerpc64-e5500--glibc--stable-2024.02-1/powerpc64-buildroot-linux-gnu/sysroot/usr/include/bits/xopen_lim.h:102:7: error: missing binary operator before token "("
          102 | #  if INT_MAX == 2147483647
              |       ^~~~~~~
        /opt/powerpc64-e5500--glibc--stable-2024.02-1/powerpc64-buildroot-linux-gnu/sysroot/usr/include/bits/xopen_lim.h:126:6: error: missing binary operator before token "("
          126 | # if LONG_MAX == 2147483647
              |      ^~~~~~~~
      
      This is due to kernel include/linux/limits.h being included instead of
      libc's limits.h.
      
      This is because directory include/ is added through option -isystem so
      it goes prior to glibc's include directory.
      
      Replace -isystem by -idirafter.
      
      But this implies that now tools/include/linux/linkage.h is included
      instead of include/linux/linkage.h, so define a stub for
      SYM_FUNC_START() and SYM_FUNC_END().
      Signed-off-by: default avatarChristophe Leroy <christophe.leroy@csgroup.eu>
      Signed-off-by: default avatarJason A. Donenfeld <Jason@zx2c4.com>
      f8d92fc5
    • Christophe Leroy's avatar
      selftests: vDSO: don't hard-code location of vDSO sources · 20a9af05
      Christophe Leroy authored
      Architectures use different location for vDSO sources:
      
      	arch/mips/vdso
      	arch/sparc/vdso
      	arch/arm64/kernel/vdso
      	arch/riscv/kernel/vdso
      	arch/csky/kernel/vdso
      	arch/x86/um/vdso
      	arch/x86/entry/vdso
      	arch/powerpc/kernel/vdso
      	arch/arm/vdso
      	arch/loongarch/vdso
      
      Don't hard-code vdso sources location in selftest Makefile. Instead
      create a vdso/ symbolic link in tools/arch/$arch/ and update Makefile
      accordingly.
      Signed-off-by: default avatarChristophe Leroy <christophe.leroy@csgroup.eu>
      Signed-off-by: default avatarJason A. Donenfeld <Jason@zx2c4.com>
      20a9af05
    • Jason A. Donenfeld's avatar
      selftests: vDSO: simplify getrandom thread local storage and structs · 01b52f01
      Jason A. Donenfeld authored
      Rather than using pthread_get/set_specific, just use gcc's __thread
      annotation, which is noticeably faster and makes the code more obvious.
      
      Also, just have one simplified struct called vgrnd, instead of trying to
      split things up semantically. Those divisions were useful when this code
      was split across several commit *messages*, but doesn't make as much
      sense within a single file. This should make the code more clear and
      provide a better example for implementers.
      Signed-off-by: default avatarJason A. Donenfeld <Jason@zx2c4.com>
      01b52f01
  2. 29 Aug, 2024 1 commit
    • Linus Torvalds's avatar
      Merge tag 'random-6.11-rc6-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/crng/random · d5d547aa
      Linus Torvalds authored
      Pull random number generator fix from Jason Donenfeld:
       "Reject invalid flags passed to vgetrandom() in the same way that
        getrandom() does, so that the behavior is the same, from Yann.
      
        The flags argument to getrandom() only has a behavioral effect on the
        function if the RNG isn't initialized yet, so vgetrandom() falls back
        to the syscall in that case. But if the RNG is initialized, all of the
        flags behave the same way, so vgetrandom() didn't bother checking
        them, and just ignored them entirely.
      
        But that doesn't account for invalid flags passed in, which need to be
        rejected so we can use them later"
      
      * tag 'random-6.11-rc6-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/crng/random:
        random: vDSO: reject unknown getrandom() flags
      d5d547aa
  3. 28 Aug, 2024 6 commits
  4. 27 Aug, 2024 6 commits
    • Linus Torvalds's avatar
      Merge tag 'livepatching-for-6.11-rc6' of... · 3ec3f5fc
      Linus Torvalds authored
      Merge tag 'livepatching-for-6.11-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/livepatching/livepatching
      
      Pull livepatching fix from Petr Mladek:
       "Selftest regression fix"
      
      * tag 'livepatching-for-6.11-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/livepatching/livepatching:
        selftests/livepatch: wait for atomic replace to occur
      3ec3f5fc
    • Linus Torvalds's avatar
      Merge tag 'pinctrl-v6.11-2' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-pinctrl · 41594663
      Linus Torvalds authored
      Pull pin control fixes from Linus Walleij:
      
       - Fix the hwirq map and pin offsets in the Qualcomm X1E80100 driver
      
       - Fix the pin range handling in the AT91 driver so it works again
      
       - Fix a NULL-dereference risk in pinctrl single
      
       - Fix a serious biasing bug in the Mediatek driver
      
       - Fix the level trigged IRQ in the StarFive JH7110
      
       - Fix the iomux width in the Rockchip GPIO2-B pin handling
      
      * tag 'pinctrl-v6.11-2' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-pinctrl:
        pinctrl: rockchip: correct RK3328 iomux width flag for GPIO2-B pins
        pinctrl: starfive: jh7110: Correct the level trigger configuration of iev register
        pinctrl: qcom: x1e80100: Fix special pin offsets
        pinctrl: mediatek: common-v2: Fix broken bias-disable for PULL_PU_PD_RSEL_TYPE
        pinctrl: single: fix potential NULL dereference in pcs_get_function()
        pinctrl: at91: make it work with current gpiolib
        pinctrl: qcom: x1e80100: Update PDC hwirq map
      41594663
    • Linus Torvalds's avatar
      Merge tag 'sound-6.11-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound · 6ace1c7e
      Linus Torvalds authored
      Pull sound fixes from Takashi Iwai:
       "It became a bit larger collection of fixes than wished at this time,
        but all changes are small and mostly device-specific fixes that should
        be fairly safe to apply.
      
        Majority of fixes are about ASoC for AMD SOF, Cirrus codecs, lpass,
        etc, in addition to the usual HD-audio quirks / fixes"
      
      * tag 'sound-6.11-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound: (22 commits)
        ALSA: hda: hda_component: Fix mutex crash if nothing ever binds
        ALSA: hda/realtek: support HP Pavilion Aero 13-bg0xxx Mute LED
        ALSA: hda/realtek: Fix the speaker output on Samsung Galaxy Book3 Ultra
        ASoC: cs-amp-lib: Ignore empty UEFI calibration entries
        ASoC: cs-amp-lib-test: Force test calibration blob entries to be valid
        ALSA: hda/realtek - FIxed ALC285 headphone no sound
        ALSA: hda/realtek - Fixed ALC256 headphone no sound
        ASoC: allow module autoloading for table board_ids
        ASoC: allow module autoloading for table db1200_pids
        ALSA: hda: cs35l56: Don't use the device index as a calibration index
        ALSA: seq: Skip event type filtering for UMP events
        ALSA: hda/realtek: Enable mute/micmute LEDs on HP Laptop 14-ey0xxx
        ASoC: SOF: amd: Fix for acp init sequence
        ASoC: amd: acp: fix module autoloading
        ASoC: mediatek: mt8188: Mark AFE_DAC_CON0 register as volatile
        ASoC: codecs: wcd937x: Fix missing de-assert of reset GPIO
        ASoC: SOF: mediatek: Add missing board compatible
        ASoC: MAINTAINERS: Drop Banajit Goswami from Qualcomm sound drivers
        ASoC: SOF: amd: Fix for incorrect acp error register offsets
        ASoC: SOF: amd: move iram-dram fence register programming sequence
        ...
      6ace1c7e
    • Stefan Berger's avatar
      tpm: ibmvtpm: Call tpm2_sessions_init() to initialize session support · 08d08e2e
      Stefan Berger authored
      Commit d2add27c ("tpm: Add NULL primary creation") introduced
      CONFIG_TCG_TPM2_HMAC. When this option is enabled on ppc64 then the
      following message appears in the kernel log due to a missing call to
      tpm2_sessions_init().
      
      [    2.654549] tpm tpm0: auth session is not active
      
      Add the missing call to tpm2_session_init() to the ibmvtpm driver to
      resolve this issue.
      
      Cc: stable@vger.kernel.org # v6.10+
      Fixes: d2add27c ("tpm: Add NULL primary creation")
      Signed-off-by: default avatarStefan Berger <stefanb@linux.ibm.com>
      Reviewed-by: default avatarJarkko Sakkinen <jarkko@kernel.org>
      Signed-off-by: default avatarJarkko Sakkinen <jarkko@kernel.org>
      08d08e2e
    • Filipe Manana's avatar
      btrfs: fix uninitialized return value from btrfs_reclaim_sweep() · ecb54277
      Filipe Manana authored
      The return variable 'ret' at btrfs_reclaim_sweep() is never assigned if
      none of the space infos is reclaimable (for example if periodic reclaim
      is disabled, which is the default), so we return an undefined value.
      
      This can be fixed my making btrfs_reclaim_sweep() not return any value
      as well as do_reclaim_sweep() because:
      
      1) do_reclaim_sweep() always returns 0, so we can make it return void;
      
      2) The only caller of btrfs_reclaim_sweep() (btrfs_reclaim_bgs()) doesn't
         care about its return value, and in its context there's nothing to do
         about any errors anyway.
      
      Therefore remove the return value from btrfs_reclaim_sweep() and
      do_reclaim_sweep().
      
      Fixes: e4ca3932 ("btrfs: periodic block_group reclaim")
      Reviewed-by: default avatarJosef Bacik <josef@toxicpanda.com>
      Signed-off-by: default avatarFilipe Manana <fdmanana@suse.com>
      Reviewed-by: default avatarDavid Sterba <dsterba@suse.com>
      Signed-off-by: default avatarDavid Sterba <dsterba@suse.com>
      ecb54277
    • Linus Torvalds's avatar
      Merge tag 'vfs-6.11-rc6.fixes' of gitolite.kernel.org:pub/scm/linux/kernel/git/vfs/vfs · 3e9bff3b
      Linus Torvalds authored
      Pull vfs fixes from Christian Brauner:
       "VFS:
      
         - Ensure that backing files uses file->f_ops->splice_write() for
           splice
      
        netfs:
      
         - Revert the removal of PG_private_2 from netfs_release_folio() as
           cephfs still relies on this
      
         - When AS_RELEASE_ALWAYS is set on a mapping the folio needs to
           always be invalidated during truncation
      
         - Fix losing untruncated data in a folio by making letting
           netfs_release_folio() return false if the folio is dirty
      
         - Fix trimming of streaming-write folios in netfs_inval_folio()
      
         - Reset iterator before retrying a short read
      
         - Fix interaction of streaming writes with zero-point tracker
      
        afs:
      
         - During truncation afs currently calls truncate_setsize() which sets
           i_size, expands the pagecache and truncates it. The first two
           operations aren't needed because they will have already been done.
           So call truncate_pagecache() instead and skip the redundant parts
      
        overlayfs:
      
         - Fix checking of the number of allowed lower layers so 500 layers
           can actually be used instead of just 499
      
         - Add missing '\n' to pr_err() output
      
         - Pass string to ovl_parse_layer() and thus allow it to be used for
           Opt_lowerdir as well
      
        pidfd:
      
         - Revert blocking the creation of pidfds for kthread as apparently
           userspace relies on this. Specifically, it breaks systemd during
           shutdown
      
        romfs:
      
         - Fix romfs_read_folio() to use the correct offset with
           folio_zero_tail()"
      
      * tag 'vfs-6.11-rc6.fixes' of gitolite.kernel.org:pub/scm/linux/kernel/git/vfs/vfs:
        netfs: Fix interaction of streaming writes with zero-point tracker
        netfs: Fix missing iterator reset on retry of short read
        netfs: Fix trimming of streaming-write folios in netfs_inval_folio()
        netfs: Fix netfs_release_folio() to say no if folio dirty
        afs: Fix post-setattr file edit to do truncation correctly
        mm: Fix missing folio invalidation calls during truncation
        ovl: ovl_parse_param_lowerdir: Add missed '\n' for pr_err
        ovl: fix wrong lowerdir number check for parameter Opt_lowerdir
        ovl: pass string to ovl_parse_layer()
        backing-file: convert to using fops->splice_write
        Revert "pidfd: prevent creation of pidfds for kthreads"
        romfs: fix romfs_read_folio()
        netfs, ceph: Partially revert "netfs: Replace PG_fscache by setting folio->private and marking dirty"
      3e9bff3b
  5. 26 Aug, 2024 15 commits
  6. 25 Aug, 2024 7 commits