1. 22 Sep, 2022 1 commit
    • Linus Torvalds's avatar
      Merge tag 'perf-tools-fixes-for-v6.0-2022-09-21' of... · 9597f088
      Linus Torvalds authored
      Merge tag 'perf-tools-fixes-for-v6.0-2022-09-21' of git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux
      
      Pull perf tools fixes from Arnaldo Carvalho de Melo:
      
       - Fix polling of system-wide events related to mixing per-cpu and
         per-thread events.
      
       - Do not check if /proc/modules is unchanged when copying /proc/kcore,
         that doesn't get in the way of post processing analysis.
      
       - Include program header in ELF files generated for JIT files, so that
         they can be opened by tools using elfutils libraries.
      
       - Enter namespaces when synthesizing build-ids.
      
       - Fix some bugs related to a recent cpu_map overhaul where we should be
         using an index and not the cpu number.
      
       - Fix BPF program ELF section name, using the naming expected by libbpf
         when using BPF counters in 'perf stat'.
      
       - Add a new test for perf stat cgroup BPF counter.
      
       - Adjust check on 'perf test wp' for older kernels, where the
         PERF_EVENT_IOC_MODIFY_ATTRIBUTES ioctl isn't supported.
      
       - Sync x86 cpufeatures with the kernel sources, no changes in tooling.
      
      * tag 'perf-tools-fixes-for-v6.0-2022-09-21' of git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux:
        perf tools: Honor namespace when synthesizing build-ids
        tools headers cpufeatures: Sync with the kernel sources
        perf kcore_copy: Do not check /proc/modules is unchanged
        libperf evlist: Fix polling of system-wide events
        perf record: Fix cpu mask bit setting for mixed mmaps
        perf test: Skip wp modify test on old kernels
        perf jit: Include program header in ELF files
        perf test: Add a new test for perf stat cgroup BPF counter
        perf stat: Use evsel->core.cpus to iterate cpus in BPF cgroup counters
        perf stat: Fix cpu map index in bperf cgroup code
        perf stat: Fix BPF program section name
      9597f088
  2. 21 Sep, 2022 20 commits
  3. 20 Sep, 2022 5 commits
    • Linus Torvalds's avatar
      Merge tag 'for-6.0-rc6-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/kdave/linux · 60891ec9
      Linus Torvalds authored
      Pull btrfs fixes from David Sterba:
      
       - two fixes for hangs in the umount sequence where threads depend on
         each other and the work must be finished in the right order
      
       - in zoned mode, wait for flushing all block group metadata IO before
         finishing the zone
      
      * tag 'for-6.0-rc6-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/kdave/linux:
        btrfs: zoned: wait for extent buffer IOs before finishing a zone
        btrfs: fix hang during unmount when stopping a space reclaim worker
        btrfs: fix hang during unmount when stopping block group reclaim worker
      60891ec9
    • Linus Torvalds's avatar
      Merge tag 'fs.fixes.v6.0-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/vfs/idmapping · 84a31938
      Linus Torvalds authored
      Pull vfs fix from Christian Brauner:
       "Beginning of the merge window we introduced the vfs{g,u}id_t types in
        b27c82e1 ("attr: port attribute changes to new types") and changed
        various codepaths over including chown_common().
      
        When userspace passes -1 for an ownership change the ownership fields
        in struct iattr stay uninitialized. Usually this is fine because any
        code making use of any fields in struct iattr must check the
        ->ia_valid field whether the value of interest has been initialized.
        That's true for all struct iattr passing code.
      
        However, over the course of the last year with more heavy use of KMSAN
        we found quite a few places that got this wrong. A recent one I fixed
        was 3cb6ee99 ("9p: only copy valid iattrs in 9P2000.L setattr
        implementation").
      
        But we also have LSM hooks. Actually we have two. The first one is
        security_inode_setattr() in notify_change() which does the right thing
        and passes the full struct iattr down to LSMs and thus LSMs can check
        whether it is initialized.
      
        But then we also have security_path_chown() which passes down a path
        argument and the target ownership as the filesystem would see it. For
        the latter we now generate the target values based on struct iattr and
        pass it down. However, when userspace passes -1 then struct iattr
        isn't initialized.
      
        This patch simply initializes ->ia_vfs{g,u}id with INVALID_VFS{G,U}ID
        so the hook continue to see invalid ownership when -1 is passed from
        userspace. The only LSM that cares about the actual values is Tomoyo.
      
        The vfs codepaths don't look at these fields without ->ia_valid being
        set so there's no harm in initializing ->ia_vfs{g,u}id. Arguably this
        is also safer since we can't end up copying valid ownership values
        when invalid ownership values should be passed.
      
        This only affects mainline. No kernel has been released with this and
        thus no backport is needed. The commit is thus marked with a Fixes:
        tag but annotated with "# mainline only" (I didn't quite remember what
        Greg said about how to tell stable autoselect to not bother with fixes
        for mainline only)"
      
      * tag 'fs.fixes.v6.0-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/vfs/idmapping:
        open: always initialize ownership fields
      84a31938
    • Linus Torvalds's avatar
      Merge tag 'execve-v6.0-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/kees/linux · f489921d
      Linus Torvalds authored
      Pull execve reverts from Kees Cook:
       "The recent work to support time namespace unsharing turns out to have
        some undesirable corner cases, so rather than allowing the API to stay
        exposed for another release, it'd be best to remove it ASAP, with the
        replacement getting another cycle of testing. Nothing is known to use
        this yet, so no userspace breakage is expected.
      
        For more details, see:
      
          https://lore.kernel.org/lkml/ed418e43ad28b8688cfea2b7c90fce1c@ispras.ru
      
        Summary:
      
         - Remove the recent 'unshare time namespace on vfork+exec' feature
           (Andrei Vagin)"
      
      * tag 'execve-v6.0-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/kees/linux:
        Revert "fs/exec: allow to unshare a time namespace on vfork+exec"
        Revert "selftests/timens: add a test for vfork+exit"
      f489921d
    • Takashi Iwai's avatar
      Revert "ALSA: usb-audio: Split endpoint setups for hw_params and prepare" · 79764ec7
      Takashi Iwai authored
      This reverts commit ff878b40.
      
      Unfortunately the recent fix seems bringing another regressions with
      PulseAudio / pipewire, at least for Steinberg and MOTU devices.
      
      As a temporary solution, do a straight revert.  The issue for Android
      will be revisited again later by another different fix (if any).
      
      Fixes: ff878b40 ("ALSA: usb-audio: Split endpoint setups for hw_params and prepare")
      Cc: <stable@vger.kernel.org>
      BugLink: https://bugzilla.kernel.org/show_bug.cgi?id=216500
      Link: https://lore.kernel.org/r/20220920113929.25162-1-tiwai@suse.deSigned-off-by: default avatarTakashi Iwai <tiwai@suse.de>
      79764ec7
    • Tetsuo Handa's avatar
      open: always initialize ownership fields · f52d74b1
      Tetsuo Handa authored
      Beginning of the merge window we introduced the vfs{g,u}id_t types in
      b27c82e1 ("attr: port attribute changes to new types") and changed
      various codepaths over including chown_common().
      
      During that change we forgot to account for the case were the passed
      ownership value is -1. In this case the ownership fields in struct iattr
      aren't initialized but we rely on them being initialized by the time we
      generate the ownership to pass down to the LSMs. All the major LSMs
      don't care about the ownership values at all. Only Tomoyo uses them and
      so it took a while for syzbot to unearth this issue.
      
      Fix this by initializing the ownership fields and do it within the
      retry_deleg block. While notify_change() doesn't alter the ownership
      fields currently we shouldn't rely on it.
      
      Since no kernel has been released with these changes this does not
      needed to be backported to any stable kernels.
      
      [Christian Brauner (Microsoft) <brauner@kernel.org>]
      * rewrote commit message
      * use INVALID_VFS{G,U}ID macros
      
      Fixes: b27c82e1 ("attr: port attribute changes to new types") # mainline only
      Reported-and-tested-by: syzbot+541e21dcc32c4046cba9@syzkaller.appspotmail.com
      Signed-off-by: default avatarTetsuo Handa <penguin-kernel@I-love.SAKURA.ne.jp>
      Reviewed-by: default avatarSeth Forshee (DigitalOcean) <sforshee@kernel.org>
      Signed-off-by: default avatarChristian Brauner (Microsoft) <brauner@kernel.org>
      f52d74b1
  4. 19 Sep, 2022 8 commits
  5. 18 Sep, 2022 5 commits
  6. 16 Sep, 2022 1 commit