1. 25 Jun, 2024 5 commits
    • Arnd Bergmann's avatar
      parisc: use generic sys_fanotify_mark implementation · 403f17a3
      Arnd Bergmann authored
      The sys_fanotify_mark() syscall on parisc uses the reverse word order
      for the two halves of the 64-bit argument compared to all syscalls on
      all 32-bit architectures. As far as I can tell, the problem is that
      the function arguments on parisc are sorted backwards (26, 25, 24, 23,
      ...) compared to everyone else, so the calling conventions of using an
      even/odd register pair in native word order result in the lower word
      coming first in function arguments, matching the expected behavior
      on little-endian architectures. The system call conventions however
      ended up matching what the other 32-bit architectures do.
      
      A glibc cleanup in 2020 changed the userspace behavior in a way that
      handles all architectures consistently, but this inadvertently broke
      parisc32 by changing to the same method as everyone else.
      
      The change made it into glibc-2.35 and subsequently into debian 12
      (bookworm), which is the latest stable release. This means we
      need to choose between reverting the glibc change or changing the
      kernel to match it again, but either hange will leave some systems
      broken.
      
      Pick the option that is more likely to help current and future
      users and change the kernel to match current glibc. This also
      means the behavior is now consistent across architectures, but
      it breaks running new kernels with old glibc builds before 2.35.
      
      Link: https://sourceware.org/git/?p=glibc.git;a=commitdiff;h=d150181d73d9
      Link: https://git.kernel.org/pub/scm/linux/kernel/git/history/history.git/commit/arch/parisc/kernel/sys_parisc.c?h=57b1dfbd5b4a39d
      Cc: Adhemerval Zanella <adhemerval.zanella@linaro.org>
      Tested-by: default avatarHelge Deller <deller@gmx.de>
      Acked-by: default avatarHelge Deller <deller@gmx.de>
      Signed-off-by: default avatarArnd Bergmann <arnd@arndb.de>
      ---
      I found this through code inspection, please double-check to make
      sure I got the bug and the fix right.
      
      The alternative is to fix this by reverting glibc back to the
      unusual behavior.
      403f17a3
    • Arnd Bergmann's avatar
      parisc: use correct compat recv/recvfrom syscalls · 20a50787
      Arnd Bergmann authored
      Johannes missed parisc back when he introduced the compat version
      of these syscalls, so receiving cmsg messages that require a compat
      conversion is still broken.
      
      Use the correct calls like the other architectures do.
      
      Fixes: 1dacc76d ("net/compat/wext: send different messages to compat tasks")
      Acked-by: default avatarHelge Deller <deller@gmx.de>
      Signed-off-by: default avatarArnd Bergmann <arnd@arndb.de>
      20a50787
    • Arnd Bergmann's avatar
      sparc: fix compat recv/recvfrom syscalls · d6fbd26f
      Arnd Bergmann authored
      sparc has the wrong compat version of recv() and recvfrom() for both the
      direct syscalls and socketcall().
      
      The direct syscalls just need to use the compat version. For socketcall,
      the same thing could be done, but it seems better to completely remove
      the custom assembler code for it and just use the same implementation that
      everyone else has.
      
      Fixes: 1dacc76d ("net/compat/wext: send different messages to compat tasks")
      Signed-off-by: default avatarArnd Bergmann <arnd@arndb.de>
      d6fbd26f
    • Arnd Bergmann's avatar
      sparc: fix old compat_sys_select() · bae6428a
      Arnd Bergmann authored
      sparc has two identical select syscalls at numbers 93 and 230, respectively.
      During the conversion to the modern syscall.tbl format, the older one of the
      two broke in compat mode, and now refers to the native 64-bit syscall.
      
      Restore the correct behavior. This has very little effect, as glibc has
      been using the newer number anyway.
      
      Fixes: 6ff645dd ("sparc: add system call table generation support")
      Signed-off-by: default avatarArnd Bergmann <arnd@arndb.de>
      bae6428a
    • Arnd Bergmann's avatar
      syscalls: fix compat_sys_io_pgetevents_time64 usage · d3882564
      Arnd Bergmann authored
      Using sys_io_pgetevents() as the entry point for compat mode tasks
      works almost correctly, but misses the sign extension for the min_nr
      and nr arguments.
      
      This was addressed on parisc by switching to
      compat_sys_io_pgetevents_time64() in commit 6431e92f ("parisc:
      io_pgetevents_time64() needs compat syscall in 32-bit compat mode"),
      as well as by using more sophisticated system call wrappers on x86 and
      s390. However, arm64, mips, powerpc, sparc and riscv still have the
      same bug.
      
      Change all of them over to use compat_sys_io_pgetevents_time64()
      like parisc already does. This was clearly the intention when the
      function was originally added, but it got hooked up incorrectly in
      the tables.
      
      Cc: stable@vger.kernel.org
      Fixes: 48166e6e ("y2038: add 64-bit time_t syscalls to all 32-bit architectures")
      Acked-by: Heiko Carstens <hca@linux.ibm.com> # s390
      Signed-off-by: default avatarArnd Bergmann <arnd@arndb.de>
      d3882564
  2. 24 Jun, 2024 1 commit
    • Arnd Bergmann's avatar
      ftruncate: pass a signed offset · 4b8e88e5
      Arnd Bergmann authored
      The old ftruncate() syscall, using the 32-bit off_t misses a sign
      extension when called in compat mode on 64-bit architectures.  As a
      result, passing a negative length accidentally succeeds in truncating
      to file size between 2GiB and 4GiB.
      
      Changing the type of the compat syscall to the signed compat_off_t
      changes the behavior so it instead returns -EINVAL.
      
      The native entry point, the truncate() syscall and the corresponding
      loff_t based variants are all correct already and do not suffer
      from this mistake.
      
      Fixes: 3f6d078d ("fix compat truncate/ftruncate")
      Reviewed-by: default avatarChristian Brauner <brauner@kernel.org>
      Cc: stable@vger.kernel.org
      Signed-off-by: default avatarArnd Bergmann <arnd@arndb.de>
      4b8e88e5
  3. 23 Jun, 2024 8 commits
  4. 22 Jun, 2024 19 commits
  5. 21 Jun, 2024 7 commits
    • Linus Torvalds's avatar
      Merge tag 'scsi-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi · 35bb670d
      Linus Torvalds authored
      Pull SCSI fixes from James Bottomley:
       "Two fixes: one in the ufs driver fixing an obvious memory leak and the
        other (with a core flag based update) trying to prevent USB crashes by
        stopping the core from issuing a request for the I/O Hints mode page"
      
      * tag 'scsi-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi:
        scsi: usb: uas: Do not query the IO Advice Hints Grouping mode page for USB/UAS devices
        scsi: core: Introduce the BLIST_SKIP_IO_HINTS flag
        scsi: ufs: core: Free memory allocated for model before reinit
      35bb670d
    • Linus Torvalds's avatar
      Merge tag 'drm-fixes-2024-06-22' of https://gitlab.freedesktop.org/drm/kernel · d6c94157
      Linus Torvalds authored
      Pull drm fixes from Dave Airlie:
       "Still pretty quiet, two weeks worth of amdgpu fixes, with one i915 and
        one xe. I didn't get the drm-misc-fixes tree PR this week, but there
        was only one fix queued and I think it can wait another week, so seems
        pretty normal.
      
        xe:
         - Fix for invalid register access
      
        i915:
         - Fix conditions for joiner usage, it's not possible with eDP MSO
      
        amdgpu:
         - Fix display idle optimization race
         - Fix GPUVM TLB flush locking scope
         - IPS fix
         - GFX 9.4.3 harvesting fix
         - Runtime pm fix for shared buffers
         - DCN 3.5.x fixes
         - USB4 fix
         - RISC-V clang fix
         - Silence UBSAN warnings
         - MES11 fix
         - PSP 14.0.x fix"
      
      * tag 'drm-fixes-2024-06-22' of https://gitlab.freedesktop.org/drm/kernel:
        drm/xe/vf: Don't touch GuC irq registers if using memory irqs
        drm/amdgpu: init TA fw for psp v14
        drm/amdgpu: cleanup MES11 command submission
        drm/amdgpu: fix UBSAN warning in kv_dpm.c
        drm/radeon: fix UBSAN warning in kv_dpm.c
        drm/amd/display: Disable CONFIG_DRM_AMD_DC_FP for RISC-V with clang
        drm/amd/display: Attempt to avoid empty TUs when endpoint is DPIA
        drm/amd/display: change dram_clock_latency to 34us for dcn35
        drm/amd/display: Change dram_clock_latency to 34us for dcn351
        drm/amdgpu: revert "take runtime pm reference when we attach a buffer" v2
        drm/amdgpu: Indicate CU havest info to CP
        drm/amd/display: prevent register access while in IPS
        drm/amdgpu: fix locking scope when flushing tlb
        drm/amd/display: Remove redundant idle optimization check
        drm/i915/mso: using joiner is not possible with eDP MSO
      d6c94157
    • Linus Torvalds's avatar
      Merge tag 'ovl-fixes-6.10-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/overlayfs/vfs · 264efe48
      Linus Torvalds authored
      Pull overlayfs fixes from Miklos Szeredi:
       "Fix two bugs, one originating in this cycle and one from 6.6"
      
      * tag 'ovl-fixes-6.10-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/overlayfs/vfs:
        ovl: fix encoding fid for lower only root
        ovl: fix copy-up in tmpfile
      264efe48
    • Linus Torvalds's avatar
      Merge tag 'io_uring-6.10-20240621' of git://git.kernel.dk/linux · a502e727
      Linus Torvalds authored
      Pull io_uring fix from Jens Axboe:
       "Just a single cleanup for the fixed buffer iov_iter import.
      
        More cosmetic than anything else, but let's get it cleaned up as it's
        confusing"
      
      * tag 'io_uring-6.10-20240621' of git://git.kernel.dk/linux:
        io_uring/rsrc: fix incorrect assignment of iter->nr_segs in io_import_fixed
      a502e727
    • Linus Torvalds's avatar
      Merge tag 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/rdma/rdma · ffdf504c
      Linus Torvalds authored
      Pull rdma fixes from Jason Gunthorpe:
       "Small bug fixes:
      
         - Prevent a crash in bnxt if the en and rdma drivers disagree on the
           MSI vectors
      
         - Have rxe memcpy inline data from the correct address
      
         - Fix rxe's validation of UD packets
      
         - Several mlx5 mr cache issues: bad lock balancing on error, missing
           propagation of the ATS property to the HW, wrong bucketing of freed
           mrs in some cases
      
         - Incorrect goto error unwind in mlx5 driver probe
      
         - Missed userspace input validation in mlx5 SRQ create
      
         - Incorrect uABI in MANA rejecting valid optional MR creation flags"
      
      * tag 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/rdma/rdma:
        RDMA/mana_ib: Ignore optional access flags for MRs
        RDMA/mlx5: Add check for srq max_sge attribute
        RDMA/mlx5: Fix unwind flow as part of mlx5_ib_stage_init_init
        RDMA/mlx5: Ensure created mkeys always have a populated rb_key
        RDMA/mlx5: Follow rb_key.ats when creating new mkeys
        RDMA/mlx5: Remove extra unlock on error path
        RDMA/rxe: Fix responder length checking for UD request packets
        RDMA/rxe: Fix data copy for IB_SEND_INLINE
        RDMA/bnxt_re: Fix the max msix vectors macro
      ffdf504c
    • Linus Torvalds's avatar
      Merge tag 'sound-6.10-rc5-2' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound · 4545981f
      Linus Torvalds authored
      Pull  more sound fixes from Takashi Iwai:
       "A follow-up fix for a random build issue, as well as another trivial
        HD-audio quirk"
      
      * tag 'sound-6.10-rc5-2' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound:
        ALSA: hda: Use imply for suggesting CONFIG_SERIAL_MULTI_INSTANTIATE
        ALSA: hda/realtek: Add quirk for Lenovo Yoga Pro 7 14AHP9
      4545981f
    • Linus Torvalds's avatar
      Merge tag 'acpi-6.10-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm · 36c07583
      Linus Torvalds authored
      Pull ACPI fixes from Rafael Wysocki:
       "These address a possible NULL pointer dereference in the ACPICA code
        and quirk camera enumeration on multiple platforms where incorrect
        data are present in the platform firmware.
      
        Specifics:
      
         - Undo an ACPICA code change that attempted to keep operation regions
           within a page boundary, but allowed accesses to unmapped memory to
           occur (Raju Rangoju)
      
         - Ignore MIPI camera graph port nodes created with the help of the
           information from the ACPI tables on all Dell Tiger, Alder and
           Raptor Lake models as that information is reported to be invalid on
           the platforms in question (Hans de Goede)
      
         - Use new Intel CPU model matching macros in the MIPI DisCo for
           Imaging part of ACPI device enumeration (Hans de Goede)"
      
      * tag 'acpi-6.10-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm:
        ACPI: mipi-disco-img: Switch to new Intel CPU model defines
        ACPI: scan: Ignore camera graph port nodes on all Dell Tiger, Alder and Raptor Lake models
        ACPICA: Revert "ACPICA: avoid Info: mapping multiple BARs. Your kernel is fine."
      36c07583