1. 08 Oct, 2024 4 commits
    • Linus Torvalds's avatar
      Merge tag 'sched_ext-for-6.12-rc2-fixes' of... · 75b607fa
      Linus Torvalds authored
      Merge tag 'sched_ext-for-6.12-rc2-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/sched_ext
      
      Pull sched_ext fixes from Tejun Heo:
      
       - ops.enqueue() didn't have a way to tell whether select_task_rq_scx()
         and thus ops.select() were skipped. Some schedulers were incorrectly
         using SCX_ENQ_WAKEUP. Add SCX_ENQ_CPU_SELECTED and fix scx_qmap using
         it.
      
       - Remove a spurious WARN_ON_ONCE() in scx_cgroup_exit()
      
       - Fix error information clobbering during load
      
       - Add missing __weak markers to BPF helper declarations
      
       - Doc update
      
      * tag 'sched_ext-for-6.12-rc2-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/sched_ext:
        sched_ext: Documentation: Update instructions for running example schedulers
        sched_ext, scx_qmap: Add and use SCX_ENQ_CPU_SELECTED
        sched/core: Add ENQUEUE_RQ_SELECTED to indicate whether ->select_task_rq() was called
        sched/core: Make select_task_rq() take the pointer to wake_flags instead of value
        sched_ext: scx_cgroup_exit() may be called without successful scx_cgroup_init()
        sched_ext: Improve error reporting during loading
        sched_ext: Add __weak markers to BPF helper function decalarations
      75b607fa
    • Devaansh-Kumar's avatar
      sched_ext: Documentation: Update instructions for running example schedulers · e0ed5215
      Devaansh-Kumar authored
      Since the artifact paths for tools changed, we need to update the documentation to reflect that path.
      Signed-off-by: default avatarDevaansh-Kumar <devaanshk840@gmail.com>
      Signed-off-by: default avatarTejun Heo <tj@kernel.org>
      e0ed5215
    • Linus Torvalds's avatar
      Merge tag 'ntfs3_for_6.12' of https://github.com/Paragon-Software-Group/linux-ntfs3 · 5b7c893e
      Linus Torvalds authored
      Pull ntfs3 updates from Konstantin Komarov:
      "New:
         - implement fallocate for compressed files
         - add support for the compression attribute
         - optimize large writes to sparse files
      
       Fixes:
         - fix several potential deadlock scenarios
         - fix various internal bugs detected by syzbot
         - add checks before accessing NTFS structures during parsing
         - correct the format of output messages
      
        Refactoring:
         - replace fsparam_flag_no with fsparam_flag in options parser
         - remove unused functions and macros"
      
      * tag 'ntfs3_for_6.12' of https://github.com/Paragon-Software-Group/linux-ntfs3: (25 commits)
        fs/ntfs3: Format output messages like others fs in kernel
        fs/ntfs3: Additional check in ntfs_file_release
        fs/ntfs3: Fix general protection fault in run_is_mapped_full
        fs/ntfs3: Sequential field availability check in mi_enum_attr()
        fs/ntfs3: Additional check in ni_clear()
        fs/ntfs3: Fix possible deadlock in mi_read
        ntfs3: Change to non-blocking allocation in ntfs_d_hash
        fs/ntfs3: Remove unused al_delete_le
        fs/ntfs3: Rename ntfs3_setattr into ntfs_setattr
        fs/ntfs3: Replace fsparam_flag_no -> fsparam_flag
        fs/ntfs3: Add support for the compression attribute
        fs/ntfs3: Implement fallocate for compressed files
        fs/ntfs3: Make checks in run_unpack more clear
        fs/ntfs3: Add rough attr alloc_size check
        fs/ntfs3: Stale inode instead of bad
        fs/ntfs3: Refactor enum_rstbl to suppress static checker
        fs/ntfs3: Fix sparse warning in ni_fiemap
        fs/ntfs3: Fix warning possible deadlock in ntfs_set_state
        fs/ntfs3: Fix sparse warning for bigendian
        fs/ntfs3: Separete common code for file_read/write iter/splice
        ...
      5b7c893e
    • Linus Torvalds's avatar
      Merge tag 'perf-tools-fixes-for-v6.12-1-2024-10-08' of... · b2760b83
      Linus Torvalds authored
      Merge tag 'perf-tools-fixes-for-v6.12-1-2024-10-08' of git://git.kernel.org/pub/scm/linux/kernel/git/perf/perf-tools
      
      Pull perf tools fixes from Arnaldo Carvalho de Melo:
      
       - Fix an assert() to handle captured and unprocessed ARM CoreSight CPU
         traces
      
       - Fix static build compilation error when libdw isn't installed or is
         too old
      
       - Add missing include when building with
         !HAVE_DWARF_GETLOCATIONS_SUPPORT
      
       - Add missing refcount put on 32-bit DSOs
      
       - Fix disassembly of user space binaries by setting the binary_type of
         DSO when loading
      
       - Update headers with the kernel sources, including asound.h, sched.h,
         fcntl, msr-index.h, irq_vectors.h, socket.h, list_sort.c and arm64's
         cputype.h
      
      * tag 'perf-tools-fixes-for-v6.12-1-2024-10-08' of git://git.kernel.org/pub/scm/linux/kernel/git/perf/perf-tools:
        perf cs-etm: Fix the assert() to handle captured and unprocessed cpu trace
        perf build: Fix build feature-dwarf_getlocations fail for old libdw
        perf build: Fix static compilation error when libdw is not installed
        perf dwarf-aux: Fix build with !HAVE_DWARF_GETLOCATIONS_SUPPORT
        tools headers arm64: Sync arm64's cputype.h with the kernel sources
        perf tools: Cope with differences for lib/list_sort.c copy from the kernel
        tools check_headers.sh: Add check variant that excludes some hunks
        perf beauty: Update copy of linux/socket.h with the kernel sources
        tools headers UAPI: Sync the linux/in.h with the kernel sources
        perf trace beauty: Update the arch/x86/include/asm/irq_vectors.h copy with the kernel sources
        tools arch x86: Sync the msr-index.h copy with the kernel sources
        tools include UAPI: Sync linux/fcntl.h copy with the kernel sources
        tools include UAPI: Sync linux/sched.h copy with the kernel sources
        tools include UAPI: Sync sound/asound.h copy with the kernel sources
        perf vdso: Missed put on 32-bit dsos
        perf symbol: Set binary_type of dso when loading
      b2760b83
  2. 07 Oct, 2024 6 commits
    • Tejun Heo's avatar
      sched_ext, scx_qmap: Add and use SCX_ENQ_CPU_SELECTED · 9b671793
      Tejun Heo authored
      scx_qmap and other schedulers in the SCX repo are using SCX_ENQ_WAKEUP to
      tell whether ops.select_cpu() was called. This is incorrect as
      ops.select_cpu() can be skipped in the wakeup path and leads to e.g.
      incorrectly skipping direct dispatch for tasks that are bound to a single
      CPU.
      
      sched core has been updated to specify ENQUEUE_RQ_SELECTED if
      ->select_task_rq() was called. Map it to SCX_ENQ_CPU_SELECTED and update
      scx_qmap to test it instead of SCX_ENQ_WAKEUP.
      Signed-off-by: default avatarTejun Heo <tj@kernel.org>
      Acked-by: default avatarDavid Vernet <void@manifault.com>
      Cc: Daniel Hodges <hodges.daniel.scott@gmail.com>
      Cc: Changwoo Min <multics69@gmail.com>
      Cc: Andrea Righi <andrea.righi@linux.dev>
      Cc: Dan Schatzberg <schatzberg.dan@gmail.com>
      9b671793
    • Tejun Heo's avatar
      sched/core: Add ENQUEUE_RQ_SELECTED to indicate whether ->select_task_rq() was called · f207dc2d
      Tejun Heo authored
      During ttwu, ->select_task_rq() can be skipped if only one CPU is allowed or
      migration is disabled. sched_ext schedulers may perform operations such as
      direct dispatch from ->select_task_rq() path and it is useful for them to
      know whether ->select_task_rq() was skipped in the ->enqueue_task() path.
      
      Currently, sched_ext schedulers are using ENQUEUE_WAKEUP for this purpose
      and end up assuming incorrectly that ->select_task_rq() was called for tasks
      that are bound to a single CPU or migration disabled.
      
      Make select_task_rq() indicate whether ->select_task_rq() was called by
      setting WF_RQ_SELECTED in *wake_flags and make ttwu_do_activate() map that
      to ENQUEUE_RQ_SELECTED for ->enqueue_task().
      
      This will be used by sched_ext to fix ->select_task_rq() skip detection.
      Signed-off-by: default avatarTejun Heo <tj@kernel.org>
      Acked-by: default avatarDavid Vernet <void@manifault.com>
      f207dc2d
    • Tejun Heo's avatar
      sched/core: Make select_task_rq() take the pointer to wake_flags instead of value · b62933ee
      Tejun Heo authored
      This will be used to allow select_task_rq() to indicate whether
      ->select_task_rq() was called by modifying *wake_flags.
      
      This makes try_to_wake_up() call all functions that take wake_flags with
      WF_TTWU set. Previously, only select_task_rq() was. Using the same flags is
      more consistent, and, as the flag is only tested by ->select_task_rq()
      implementations, it doesn't cause any behavior differences.
      Signed-off-by: default avatarTejun Heo <tj@kernel.org>
      Acked-by: default avatarDavid Vernet <void@manifault.com>
      b62933ee
    • Linus Torvalds's avatar
      Merge tag 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mst/vhost · 87d6aab2
      Linus Torvalds authored
      Pull virtio fixes from Michael Tsirkin:
       "Several small bugfixes all over the place.
      
        Most notably, fixes the vsock allocation with GFP_KERNEL in atomic
        context, which has been triggering warnings for lots of testers"
      
      * tag 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mst/vhost:
        vhost/scsi: null-ptr-dereference in vhost_scsi_get_req()
        vsock/virtio: use GFP_ATOMIC under RCU read lock
        virtio_console: fix misc probe bugs
        virtio_ring: tag event_triggered as racy for KCSAN
        vdpa/octeon_ep: Fix format specifier for pointers in debug messages
      87d6aab2
    • Haoran Zhang's avatar
      vhost/scsi: null-ptr-dereference in vhost_scsi_get_req() · 221af82f
      Haoran Zhang authored
      Since commit 3f8ca2e1 ("vhost/scsi: Extract common handling code
      from control queue handler") a null pointer dereference bug can be
      triggered when guest sends an SCSI AN request.
      
      In vhost_scsi_ctl_handle_vq(), `vc.target` is assigned with
      `&v_req.tmf.lun[1]` within a switch-case block and is then passed to
      vhost_scsi_get_req() which extracts `vc->req` and `tpg`. However, for
      a `VIRTIO_SCSI_T_AN_*` request, tpg is not required, so `vc.target` is
      set to NULL in this branch. Later, in vhost_scsi_get_req(),
      `vc->target` is dereferenced without being checked, leading to a null
      pointer dereference bug. This bug can be triggered from guest.
      
      When this bug occurs, the vhost_worker process is killed while holding
      `vq->mutex` and the corresponding tpg will remain occupied
      indefinitely.
      
      Below is the KASAN report:
      Oops: general protection fault, probably for non-canonical address
      0xdffffc0000000000: 0000 [#1] PREEMPT SMP KASAN NOPTI
      KASAN: null-ptr-deref in range [0x0000000000000000-0x0000000000000007]
      CPU: 1 PID: 840 Comm: poc Not tainted 6.10.0+ #1
      Hardware name: QEMU Ubuntu 24.04 PC (i440FX + PIIX, 1996), BIOS
      1.16.3-debian-1.16.3-2 04/01/2014
      RIP: 0010:vhost_scsi_get_req+0x165/0x3a0
      Code: 00 fc ff df 48 89 fa 48 c1 ea 03 80 3c 02 00 0f 85 2b 02 00 00
      48 b8 00 00 00 00 00 fc ff df 4d 8b 65 30 4c 89 e2 48 c1 ea 03 <0f> b6
      04 02 4c 89 e2 83 e2 07 38 d0 7f 08 84 c0 0f 85 be 01 00 00
      RSP: 0018:ffff888017affb50 EFLAGS: 00010246
      RAX: dffffc0000000000 RBX: ffff88801b000000 RCX: 0000000000000000
      RDX: 0000000000000000 RSI: 0000000000000000 RDI: ffff888017affcb8
      RBP: ffff888017affb80 R08: 0000000000000000 R09: 0000000000000000
      R10: 0000000000000000 R11: 0000000000000000 R12: 0000000000000000
      R13: ffff888017affc88 R14: ffff888017affd1c R15: ffff888017993000
      FS:  000055556e076500(0000) GS:ffff88806b100000(0000) knlGS:0000000000000000
      CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
      CR2: 00000000200027c0 CR3: 0000000010ed0004 CR4: 0000000000370ef0
      Call Trace:
       <TASK>
       ? show_regs+0x86/0xa0
       ? die_addr+0x4b/0xd0
       ? exc_general_protection+0x163/0x260
       ? asm_exc_general_protection+0x27/0x30
       ? vhost_scsi_get_req+0x165/0x3a0
       vhost_scsi_ctl_handle_vq+0x2a4/0xca0
       ? __pfx_vhost_scsi_ctl_handle_vq+0x10/0x10
       ? __switch_to+0x721/0xeb0
       ? __schedule+0xda5/0x5710
       ? __kasan_check_write+0x14/0x30
       ? _raw_spin_lock+0x82/0xf0
       vhost_scsi_ctl_handle_kick+0x52/0x90
       vhost_run_work_list+0x134/0x1b0
       vhost_task_fn+0x121/0x350
      ...
       </TASK>
      ---[ end trace 0000000000000000 ]---
      
      Let's add a check in vhost_scsi_get_req.
      
      Fixes: 3f8ca2e1 ("vhost/scsi: Extract common handling code from control queue handler")
      Signed-off-by: default avatarHaoran Zhang <wh1sper@zju.edu.cn>
      [whitespace fixes]
      Signed-off-by: default avatarMike Christie <michael.christie@oracle.com>
      Message-Id: <b26d7ddd-b098-4361-88f8-17ca7f90adf7@oracle.com>
      Signed-off-by: default avatarMichael S. Tsirkin <mst@redhat.com>
      221af82f
    • Michael S. Tsirkin's avatar
      vsock/virtio: use GFP_ATOMIC under RCU read lock · a194c985
      Michael S. Tsirkin authored
      virtio_transport_send_pkt in now called on transport fast path,
      under RCU read lock. In that case, we have a bug: virtio_add_sgs
      is called with GFP_KERNEL, and might sleep.
      
      Pass the gfp flags as an argument, and use GFP_ATOMIC on
      the fast path.
      
      Link: https://lore.kernel.org/all/hfcr2aget2zojmqpr4uhlzvnep4vgskblx5b6xf2ddosbsrke7@nt34bxgp7j2x
      Fixes: efcd71af ("vsock/virtio: avoid queuing packets when intermediate queue is empty")
      Reported-by: default avatarChristian Brauner <brauner@kernel.org>
      Cc: Stefano Garzarella <sgarzare@redhat.com>
      Cc: Luigi Leonardi <luigi.leonardi@outlook.com>
      Message-ID: <3fbfb6e871f625f89eb578c7228e127437b1975a.1727876449.git.mst@redhat.com>
      Signed-off-by: default avatarMichael S. Tsirkin <mst@redhat.com>
      Reviewed-by: default avatarPankaj Gupta <pankaj.gupta@amd.com>
      Reviewed-by: default avatarChristian Brauner <brauner@kernel.org>
      Reviewed-by: default avatarLuigi Leonardi <luigi.leonardi@outlook.com>
      Reviewed-by: default avatarStefano Garzarella <sgarzare@redhat.com>
      a194c985
  3. 06 Oct, 2024 20 commits
  4. 05 Oct, 2024 10 commits
    • Linus Torvalds's avatar
      Merge tag 'bcachefs-2024-10-05' of git://evilpiepirate.org/bcachefs · 8f602276
      Linus Torvalds authored
      Pull bcachefs fixes from Kent Overstreet:
       "A lot of little fixes, bigger ones include:
      
         - bcachefs's __wait_on_freeing_inode() was broken in rc1 due to vfs
           changes, now fixed along with another lost wakeup
      
         - fragmentation LRU fixes; fsck now repairs successfully (this is the
           data structure copygc uses); along with some nice simplification.
      
         - Rework logged op error handling, so that if logged op replay errors
           (due to another filesystem error) we delete the logged op instead
           of going into an infinite loop)
      
         - Various small filesystem connectivitity repair fixes"
      
      * tag 'bcachefs-2024-10-05' of git://evilpiepirate.org/bcachefs:
        bcachefs: Rework logged op error handling
        bcachefs: Add warn param to subvol_get_snapshot, peek_inode
        bcachefs: Kill snapshot arg to fsck_write_inode()
        bcachefs: Check for unlinked, non-empty dirs in check_inode()
        bcachefs: Check for unlinked inodes with dirents
        bcachefs: Check for directories with no backpointers
        bcachefs: Kill alloc_v4.fragmentation_lru
        bcachefs: minor lru fsck fixes
        bcachefs: Mark more errors AUTOFIX
        bcachefs: Make sure we print error that causes fsck to bail out
        bcachefs: bkey errors are only AUTOFIX during read
        bcachefs: Create lost+found in correct snapshot
        bcachefs: Fix reattach_inode()
        bcachefs: Add missing wakeup to bch2_inode_hash_remove()
        bcachefs: Fix trans_commit disk accounting revert
        bcachefs: Fix bch2_inode_is_open() check
        bcachefs: Fix return type of dirent_points_to_inode_nowarn()
        bcachefs: Fix bad shift in bch2_read_flag_list()
      8f602276
    • Linus Torvalds's avatar
      Merge tag 'for-linus-6.12a-rc2-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/xen/tip · fc20a3e5
      Linus Torvalds authored
      Pull xen fix from Juergen Gross:
       "Fix Xen config issue introduced in the merge window"
      
      * tag 'for-linus-6.12a-rc2-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/xen/tip:
        xen: Fix config option reference in XEN_PRIVCMD definition
      fc20a3e5
    • Linus Torvalds's avatar
      Merge tag 'ext4_for_linus-5.12-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/tytso/ext4 · fdd0a94d
      Linus Torvalds authored
      Pull ext4 fixes from Ted Ts'o:
       "Fix some ext4 bugs and regressions relating to oneline resize and fast
        commits"
      
      * tag 'ext4_for_linus-5.12-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/tytso/ext4:
        ext4: fix off by one issue in alloc_flex_gd()
        ext4: mark fc as ineligible using an handle in ext4_xattr_set()
        ext4: use handle to mark fc as ineligible in __track_dentry_update()
      fdd0a94d
    • Linus Torvalds's avatar
      Merge tag 'cxl-fixes-6.12-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/cxl/cxl · 7c50f221
      Linus Torvalds authored
      Pull cxl fix from Ira Weiny:
      
       - Fix calculation for SBDF in error injection
      
      * tag 'cxl-fixes-6.12-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/cxl/cxl:
        EINJ, CXL: Fix CXL device SBDF calculation
      7c50f221
    • Linus Torvalds's avatar
      Merge tag 'i2c-for-6.12-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux · 3a28c9e1
      Linus Torvalds authored
      Pull i2c fix from Wolfram Sang:
      
       - Fix potential deadlock during runtime suspend and resume (stm32f7)
      
      * tag 'i2c-for-6.12-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux:
        i2c: stm32f7: Do not prepare/unprepare clock during runtime suspend/resume
      3a28c9e1
    • Linus Torvalds's avatar
      Merge tag 'spi-fix-v6.12-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/spi · 60b9f47e
      Linus Torvalds authored
      Pull spi fixes from Mark Brown:
       "A small set of driver specific fixes that came in since the merge
        window, about half of which is fixes for correctness in the use of the
        runtime PM APIs done as part of a broader cleanup"
      
      * tag 'spi-fix-v6.12-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/spi:
        spi: s3c64xx: fix timeout counters in flush_fifo
        spi: atmel-quadspi: Fix wrong register value written to MR
        spi: spi-cadence: Fix missing spi_controller_is_target() check
        spi: spi-cadence: Fix pm_runtime_set_suspended() with runtime pm enabled
        spi: spi-imx: Fix pm_runtime_set_suspended() with runtime pm enabled
      60b9f47e
    • Linus Torvalds's avatar
      Merge tag 'hardening-v6.12-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/kees/linux · 9ec2236a
      Linus Torvalds authored
      Pull hardening fixes from Kees Cook:
      
       - gcc plugins: Avoid Kconfig warnings with randstruct (Nathan
         Chancellor)
      
       - MAINTAINERS: Add security/Kconfig.hardening to hardening section
         (Nathan Chancellor)
      
       - MAINTAINERS: Add unsafe_memcpy() to the FORTIFY review list
      
      * tag 'hardening-v6.12-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/kees/linux:
        MAINTAINERS: Add security/Kconfig.hardening to hardening section
        hardening: Adjust dependencies in selection of MODVERSIONS
        MAINTAINERS: Add unsafe_memcpy() to the FORTIFY review list
      9ec2236a
    • Linus Torvalds's avatar
      Merge tag 'lsm-pr-20241004' of git://git.kernel.org/pub/scm/linux/kernel/git/pcmoore/lsm · fb9b7674
      Linus Torvalds authored
      Pull lsm revert from Paul Moore:
       "Here is the CONFIG_SECURITY_TOMOYO_LKM revert that we've been
        discussing this week. With near unanimous agreement that the original
        TOMOYO patches were not the right way to solve the distro problem
        Tetsuo is trying the solve, reverting is our best option at this time"
      
      * tag 'lsm-pr-20241004' of git://git.kernel.org/pub/scm/linux/kernel/git/pcmoore/lsm:
        tomoyo: revert CONFIG_SECURITY_TOMOYO_LKM support
      fb9b7674
    • Zach Wade's avatar
      platform/x86: ISST: Fix the KASAN report slab-out-of-bounds bug · 7d59ac07
      Zach Wade authored
      Attaching SST PCI device to VM causes "BUG: KASAN: slab-out-of-bounds".
      kasan report:
      [   19.411889] ==================================================================
      [   19.413702] BUG: KASAN: slab-out-of-bounds in _isst_if_get_pci_dev+0x3d5/0x400 [isst_if_common]
      [   19.415634] Read of size 8 at addr ffff888829e65200 by task cpuhp/16/113
      [   19.417368]
      [   19.418627] CPU: 16 PID: 113 Comm: cpuhp/16 Tainted: G            E      6.9.0 #10
      [   19.420435] Hardware name: VMware, Inc. VMware20,1/440BX Desktop Reference Platform, BIOS VMW201.00V.20192059.B64.2207280713 07/28/2022
      [   19.422687] Call Trace:
      [   19.424091]  <TASK>
      [   19.425448]  dump_stack_lvl+0x5d/0x80
      [   19.426963]  ? _isst_if_get_pci_dev+0x3d5/0x400 [isst_if_common]
      [   19.428694]  print_report+0x19d/0x52e
      [   19.430206]  ? __pfx__raw_spin_lock_irqsave+0x10/0x10
      [   19.431837]  ? _isst_if_get_pci_dev+0x3d5/0x400 [isst_if_common]
      [   19.433539]  kasan_report+0xf0/0x170
      [   19.435019]  ? _isst_if_get_pci_dev+0x3d5/0x400 [isst_if_common]
      [   19.436709]  _isst_if_get_pci_dev+0x3d5/0x400 [isst_if_common]
      [   19.438379]  ? __pfx_sched_clock_cpu+0x10/0x10
      [   19.439910]  isst_if_cpu_online+0x406/0x58f [isst_if_common]
      [   19.441573]  ? __pfx_isst_if_cpu_online+0x10/0x10 [isst_if_common]
      [   19.443263]  ? ttwu_queue_wakelist+0x2c1/0x360
      [   19.444797]  cpuhp_invoke_callback+0x221/0xec0
      [   19.446337]  cpuhp_thread_fun+0x21b/0x610
      [   19.447814]  ? __pfx_cpuhp_thread_fun+0x10/0x10
      [   19.449354]  smpboot_thread_fn+0x2e7/0x6e0
      [   19.450859]  ? __pfx_smpboot_thread_fn+0x10/0x10
      [   19.452405]  kthread+0x29c/0x350
      [   19.453817]  ? __pfx_kthread+0x10/0x10
      [   19.455253]  ret_from_fork+0x31/0x70
      [   19.456685]  ? __pfx_kthread+0x10/0x10
      [   19.458114]  ret_from_fork_asm+0x1a/0x30
      [   19.459573]  </TASK>
      [   19.460853]
      [   19.462055] Allocated by task 1198:
      [   19.463410]  kasan_save_stack+0x30/0x50
      [   19.464788]  kasan_save_track+0x14/0x30
      [   19.466139]  __kasan_kmalloc+0xaa/0xb0
      [   19.467465]  __kmalloc+0x1cd/0x470
      [   19.468748]  isst_if_cdev_register+0x1da/0x350 [isst_if_common]
      [   19.470233]  isst_if_mbox_init+0x108/0xff0 [isst_if_mbox_msr]
      [   19.471670]  do_one_initcall+0xa4/0x380
      [   19.472903]  do_init_module+0x238/0x760
      [   19.474105]  load_module+0x5239/0x6f00
      [   19.475285]  init_module_from_file+0xd1/0x130
      [   19.476506]  idempotent_init_module+0x23b/0x650
      [   19.477725]  __x64_sys_finit_module+0xbe/0x130
      [   19.476506]  idempotent_init_module+0x23b/0x650
      [   19.477725]  __x64_sys_finit_module+0xbe/0x130
      [   19.478920]  do_syscall_64+0x82/0x160
      [   19.480036]  entry_SYSCALL_64_after_hwframe+0x76/0x7e
      [   19.481292]
      [   19.482205] The buggy address belongs to the object at ffff888829e65000
       which belongs to the cache kmalloc-512 of size 512
      [   19.484818] The buggy address is located 0 bytes to the right of
       allocated 512-byte region [ffff888829e65000, ffff888829e65200)
      [   19.487447]
      [   19.488328] The buggy address belongs to the physical page:
      [   19.489569] page: refcount:1 mapcount:0 mapping:0000000000000000 index:0xffff888829e60c00 pfn:0x829e60
      [   19.491140] head: order:3 entire_mapcount:0 nr_pages_mapped:0 pincount:0
      [   19.492466] anon flags: 0x57ffffc0000840(slab|head|node=1|zone=2|lastcpupid=0x1fffff)
      [   19.493914] page_type: 0xffffffff()
      [   19.494988] raw: 0057ffffc0000840 ffff88810004cc80 0000000000000000 0000000000000001
      [   19.496451] raw: ffff888829e60c00 0000000080200018 00000001ffffffff 0000000000000000
      [   19.497906] head: 0057ffffc0000840 ffff88810004cc80 0000000000000000 0000000000000001
      [   19.499379] head: ffff888829e60c00 0000000080200018 00000001ffffffff 0000000000000000
      [   19.500844] head: 0057ffffc0000003 ffffea0020a79801 ffffea0020a79848 00000000ffffffff
      [   19.502316] head: 0000000800000000 0000000000000000 00000000ffffffff 0000000000000000
      [   19.503784] page dumped because: kasan: bad access detected
      [   19.505058]
      [   19.505970] Memory state around the buggy address:
      [   19.507172]  ffff888829e65100: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
      [   19.508599]  ffff888829e65180: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
      [   19.510013] >ffff888829e65200: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
      [   19.510014]                    ^
      [   19.510016]  ffff888829e65280: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
      [   19.510018]  ffff888829e65300: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
      [   19.515367] ==================================================================
      
      The reason for this error is physical_package_ids assigned by VMware VMM
      are not continuous and have gaps. This will cause value returned by
      topology_physical_package_id() to be more than topology_max_packages().
      
      Here the allocation uses topology_max_packages(). The call to
      topology_max_packages() returns maximum logical package ID not physical
      ID. Hence use topology_logical_package_id() instead of
      topology_physical_package_id().
      
      Fixes: 9a1aac8a ("platform/x86: ISST: PUNIT device mapping with Sub-NUMA clustering")
      Cc: stable@vger.kernel.org
      Acked-by: default avatarSrinivas Pandruvada <srinivas.pandruvada@linux.intel.com>
      Signed-off-by: default avatarZach Wade <zachwade.k@gmail.com>
      Link: https://lore.kernel.org/r/20240923144508.1764-1-zachwade.k@gmail.comReviewed-by: default avatarHans de Goede <hdegoede@redhat.com>
      Signed-off-by: default avatarHans de Goede <hdegoede@redhat.com>
      7d59ac07
    • Linus Torvalds's avatar
      Merge tag 'linux_kselftest-fixes-6.12-rc2' of... · 27cc6fdf
      Linus Torvalds authored
      Merge tag 'linux_kselftest-fixes-6.12-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/shuah/linux-kselftest
      
      Pull kselftest fixes from Shuah Khan:
       "Fixes to build warnings, install scripts, run-time error path, and git
        status cleanups to tests:
      
         - devices/probe: fix for Python3 regex string syntax warnings
      
         - clone3: removing unused macro from clone3_cap_checkpoint_restore()
      
         - vDSO: fix to align getrandom states to cache line
      
         - core and exec: add missing executables to .gitignore files
      
         - rtc: change to skip test if /dev/rtc0 can't be accessed
      
         - timers/posix: fix warn_unused_result result in __fatal_error()
      
         - breakpoints: fix to detect suspend successful condition correctly
      
         - hid: fix to install required dependencies to run the test"
      
      * tag 'linux_kselftest-fixes-6.12-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/shuah/linux-kselftest:
        selftests: breakpoints: use remaining time to check if suspend succeed
        kselftest/devices/probe: Fix SyntaxWarning in regex strings for Python3
        selftest: hid: add missing run-hid-tools-tests.sh
        selftests: vDSO: align getrandom states to cache line
        selftests: exec: update gitignore for load_address
        selftests: core: add unshare_test to gitignore
        clone3: clone3_cap_checkpoint_restore: remove unused MAX_PID_NS_LEVEL macro
        selftests:timers: posix_timers: Fix warn_unused_result in __fatal_error()
        selftest: rtc: Check if could access /dev/rtc0 before testing
      27cc6fdf