Skip to content
Snippets Groups Projects
  1. Dec 31, 2024
    • Seiji Nishikawa's avatar
      mm: vmscan: account for free pages to prevent infinite Loop in throttle_direct_reclaim() · 6aaced5a
      Seiji Nishikawa authored
      The task sometimes continues looping in throttle_direct_reclaim() because
      allow_direct_reclaim(pgdat) keeps returning false.  
      
       #0 [ffff80002cb6f8d0] __switch_to at ffff8000080095ac
       #1 [ffff80002cb6f900] __schedule at ffff800008abbd1c
       #2 [ffff80002cb6f990] schedule at ffff800008abc50c
       #3 [ffff80002cb6f9b0] throttle_direct_reclaim at ffff800008273550
       #4 [ffff80002cb6fa20] try_to_free_pages at ffff800008277b68
       #5 [ffff80002cb6fae0] __alloc_pages_nodemask at ffff8000082c4660
       #6 [ffff80002cb6fc50] alloc_pages_vma at ffff8000082e4a98
       #7 [ffff80002cb6fca0] do_anonymous_page at ffff80000829f5a8
       #8 [ffff80002cb6fce0] __handle_mm_fault at ffff8000082a5974
       #9 [ffff80002cb6fd90] handle_mm_fault at ffff8000082a5bd4
      
      At this point, the pgdat contains the following two zones:
      
              NODE: 4  ZONE: 0  ADDR: ffff00817fffe540  NAME: "DMA32"
                SIZE: 20480  MIN/LOW/HIGH: 11/28/45
                VM_STAT:
                      NR_FREE_PAGES: 359
              NR_ZONE_INACTIVE_ANON: 18813
                NR_ZONE_ACTIVE_ANON: 0
              NR_ZONE_INACTIVE_FILE: 50
                NR_ZONE_ACTIVE_FILE: 0
                NR_ZONE_UNEVICTABLE: 0
              NR_ZONE_WRITE_PENDING: 0
                           NR_MLOCK: 0
                          NR_BOUNCE: 0
                         NR_ZSPAGES: 0
                  NR_FREE_CMA_PAGES: 0
      
              NODE: 4  ZONE: 1  ADDR: ffff00817fffec00  NAME: "Normal"
                SIZE: 8454144  PRESENT: 98304  MIN/LOW/HIGH: 68/166/264
                VM_STAT:
                      NR_FREE_PAGES: 146
              NR_ZONE_INACTIVE_ANON: 94668
                NR_ZONE_ACTIVE_ANON: 3
              NR_ZONE_INACTIVE_FILE: 735
                NR_ZONE_ACTIVE_FILE: 78
                NR_ZONE_UNEVICTABLE: 0
              NR_ZONE_WRITE_PENDING: 0
                           NR_MLOCK: 0
                          NR_BOUNCE: 0
                         NR_ZSPAGES: 0
                  NR_FREE_CMA_PAGES: 0
      
      In allow_direct_reclaim(), while processing ZONE_DMA32, the sum of
      inactive/active file-backed pages calculated in zone_reclaimable_pages()
      based on the result of zone_page_state_snapshot() is zero.  
      
      Additionally, since this system lacks swap, the calculation of inactive/
      active anonymous pages is skipped.
      
              crash> p nr_swap_pages
              nr_swap_pages = $1937 = {
                counter = 0
              }
      
      As a result, ZONE_DMA32 is deemed unreclaimable and skipped, moving on to
      the processing of the next zone, ZONE_NORMAL, despite ZONE_DMA32 having
      free pages significantly exceeding the high watermark.
      
      The problem is that the pgdat->kswapd_failures hasn't been incremented.
      
              crash> px ((struct pglist_data *) 0xffff00817fffe540)->kswapd_failures
              $1935 = 0x0
      
      This is because the node deemed balanced.  The node balancing logic in
      balance_pgdat() evaluates all zones collectively.  If one or more zones
      (e.g., ZONE_DMA32) have enough free pages to meet their watermarks, the
      entire node is deemed balanced.  This causes balance_pgdat() to exit early
      before incrementing the kswapd_failures, as it considers the overall
      memory state acceptable, even though some zones (like ZONE_NORMAL) remain
      under significant pressure.
      
      
      The patch ensures that zone_reclaimable_pages() includes free pages
      (NR_FREE_PAGES) in its calculation when no other reclaimable pages are
      available (e.g., file-backed or anonymous pages).  This change prevents
      zones like ZONE_DMA32, which have sufficient free pages, from being
      mistakenly deemed unreclaimable.  By doing so, the patch ensures proper
      node balancing, avoids masking pressure on other zones like ZONE_NORMAL,
      and prevents infinite loops in throttle_direct_reclaim() caused by
      allow_direct_reclaim(pgdat) repeatedly returning false.
      
      
      The kernel hangs due to a task stuck in throttle_direct_reclaim(), caused
      by a node being incorrectly deemed balanced despite pressure in certain
      zones, such as ZONE_NORMAL.  This issue arises from
      zone_reclaimable_pages() returning 0 for zones without reclaimable file-
      backed or anonymous pages, causing zones like ZONE_DMA32 with sufficient
      free pages to be skipped.
      
      The lack of swap or reclaimable pages results in ZONE_DMA32 being ignored
      during reclaim, masking pressure in other zones.  Consequently,
      pgdat->kswapd_failures remains 0 in balance_pgdat(), preventing fallback
      mechanisms in allow_direct_reclaim() from being triggered, leading to an
      infinite loop in throttle_direct_reclaim().
      
      This patch modifies zone_reclaimable_pages() to account for free pages
      (NR_FREE_PAGES) when no other reclaimable pages exist.  This ensures zones
      with sufficient free pages are not skipped, enabling proper balancing and
      reclaim behavior.
      
      [akpm@linux-foundation.org: coding-style cleanups]
      Link: https://lkml.kernel.org/r/20241130164346.436469-1-snishika@redhat.com
      Link: https://lkml.kernel.org/r/20241130161236.433747-2-snishika@redhat.com
      
      
      Fixes: 5a1c84b4 ("mm: remove reclaim and compaction retry approximations")
      Signed-off-by: default avatarSeiji Nishikawa <snishika@redhat.com>
      Cc: Mel Gorman <mgorman@techsingularity.net>
      Cc: <stable@vger.kernel.org>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      6aaced5a
    • Lorenzo Stoakes's avatar
      selftests/memfd: add test for mapping write-sealed memfd read-only · ea0916e0
      Lorenzo Stoakes authored
      Now we have reinstated the ability to map F_SEAL_WRITE mappings read-only,
      assert that we are able to do this in a test to ensure that we do not
      regress this again.
      
      Link: https://lkml.kernel.org/r/a6377ec470b14c0539b4600cf8fa24bf2e4858ae.1732804776.git.lorenzo.stoakes@oracle.com
      
      
      Signed-off-by: default avatarLorenzo Stoakes <lorenzo.stoakes@oracle.com>
      Cc: Jann Horn <jannh@google.com>
      Cc: Julian Orth <ju.orth@gmail.com>
      Cc: Liam R. Howlett <Liam.Howlett@Oracle.com>
      Cc: Linus Torvalds <torvalds@linux-foundation.org>
      Cc: Shuah Khan <shuah@kernel.org>
      Cc: Vlastimil Babka <vbabka@suse.cz>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      ea0916e0
    • Lorenzo Stoakes's avatar
      mm: reinstate ability to map write-sealed memfd mappings read-only · 8ec396d0
      Lorenzo Stoakes authored
      Patch series "mm: reinstate ability to map write-sealed memfd mappings
      read-only".
      
      In commit 15897894 ("mm: perform the mapping_map_writable() check
      after call_mmap()") (and preceding changes in the same series) it became
      possible to mmap() F_SEAL_WRITE sealed memfd mappings read-only.
      
      Commit 5de19506 ("mm: resolve faulty mmap_region() error path
      behaviour") unintentionally undid this logic by moving the
      mapping_map_writable() check before the shmem_mmap() hook is invoked,
      thereby regressing this change.
      
      This series reworks how we both permit write-sealed mappings being mapped
      read-only and disallow mprotect() from undoing the write-seal, fixing this
      regression.
      
      We also add a regression test to ensure that we do not accidentally
      regress this in future.
      
      Thanks to Julian Orth for reporting this regression.
      
      
      This patch (of 2):
      
      In commit 15897894 ("mm: perform the mapping_map_writable() check
      after call_mmap()") (and preceding changes in the same series) it became
      possible to mmap() F_SEAL_WRITE sealed memfd mappings read-only.
      
      This was previously unnecessarily disallowed, despite the man page
      documentation indicating that it would be, thereby limiting the usefulness
      of F_SEAL_WRITE logic.
      
      We fixed this by adapting logic that existed for the F_SEAL_FUTURE_WRITE
      seal (one which disallows future writes to the memfd) to also be used for
      F_SEAL_WRITE.
      
      For background - the F_SEAL_FUTURE_WRITE seal clears VM_MAYWRITE for a
      read-only mapping to disallow mprotect() from overriding the seal - an
      operation performed by seal_check_write(), invoked from shmem_mmap(), the
      f_op->mmap() hook used by shmem mappings.
      
      By extending this to F_SEAL_WRITE and critically - checking
      mapping_map_writable() to determine if we may map the memfd AFTER we
      invoke shmem_mmap() - the desired logic becomes possible.  This is because
      mapping_map_writable() explicitly checks for VM_MAYWRITE, which we will
      have cleared.
      
      Commit 5de19506 ("mm: resolve faulty mmap_region() error path
      behaviour") unintentionally undid this logic by moving the
      mapping_map_writable() check before the shmem_mmap() hook is invoked,
      thereby regressing this change.
      
      We reinstate this functionality by moving the check out of shmem_mmap()
      and instead performing it in do_mmap() at the point at which VMA flags are
      being determined, which seems in any case to be a more appropriate place
      in which to make this determination.
      
      In order to achieve this we rework memfd seal logic to allow us access to
      this information using existing logic and eliminate the clearing of
      VM_MAYWRITE from seal_check_write() which we are performing in do_mmap()
      instead.
      
      Link: https://lkml.kernel.org/r/99fc35d2c62bd2e05571cf60d9f8b843c56069e0.1732804776.git.lorenzo.stoakes@oracle.com
      
      
      Fixes: 5de19506 ("mm: resolve faulty mmap_region() error path behaviour")
      Signed-off-by: default avatarLorenzo Stoakes <lorenzo.stoakes@oracle.com>
      Reported-by: default avatarJulian Orth <ju.orth@gmail.com>
      Closes: https://lore.kernel.org/all/CAHijbEUMhvJTN9Xw1GmbM266FXXv=U7s4L_Jem5x3AaPZxrYpQ@mail.gmail.com/
      
      
      Cc: Jann Horn <jannh@google.com>
      Cc: Liam R. Howlett <Liam.Howlett@Oracle.com>
      Cc: Linus Torvalds <torvalds@linux-foundation.org>
      Cc: Shuah Khan <shuah@kernel.org>
      Cc: Vlastimil Babka <vbabka@suse.cz>
      Cc: <stable@vger.kernel.org>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      8ec396d0
  2. Dec 22, 2024
    • Linus Torvalds's avatar
      Linux 6.13-rc4 · 4bbf9020
      Linus Torvalds authored
      4bbf9020
    • Linus Torvalds's avatar
      Merge tag 'for-linus' of git://git.kernel.org/pub/scm/virt/kvm/kvm · b1fdbe77
      Linus Torvalds authored
      Pull KVM x86 fixes from Paolo Bonzini:
      
       - Disable AVIC on SNP-enabled systems that don't allow writes to the
         virtual APIC page, as such hosts will hit unexpected RMP #PFs in the
         host when running VMs of any flavor.
      
       - Fix a WARN in the hypercall completion path due to KVM trying to
         determine if a guest with protected register state is in 64-bit mode
         (KVM's ABI is to assume such guests only make hypercalls in 64-bit
         mode).
      
       - Allow the guest to write to supported bits in MSR_AMD64_DE_CFG to fix
         a regression with Windows guests, and because KVM's read-only
         behavior appears to be entirely made up.
      
       - Treat TDP MMU faults as spurious if the faulting access is allowed
         given the existing SPTE. This fixes a benign WARN (other than the
         WARN itself) due to unexpectedly replacing a writable SPTE with a
         read-only SPTE.
      
       - Emit a warning when KVM is configured with ignore_msrs=1 and also to
         hide the MSRs that the guest is looking for from the kernel logs.
         ignore_msrs can trick guests into assuming that certain processor
         features are present, and this in turn leads to bogus bug reports.
      
      * tag 'for-linus' of git://git.kernel.org/pub/scm/virt/kvm/kvm:
        KVM: x86: let it be known that ignore_msrs is a bad idea
        KVM: VMX: don't include '<linux/find.h>' directly
        KVM: x86/mmu: Treat TDP MMU faults as spurious if access is already allowed
        KVM: SVM: Allow guest writes to set MSR_AMD64_DE_CFG bits
        KVM: x86: Play nice with protected guests in complete_hypercall_exit()
        KVM: SVM: Disable AVIC on SNP-enabled system without HvInUseWrAllowed feature
      b1fdbe77
    • Paolo Bonzini's avatar
      Merge tag 'kvm-x86-fixes-6.13-rcN' of https://github.com/kvm-x86/linux into HEAD · 8afa5b10
      Paolo Bonzini authored
      KVM x86 fixes for 6.13:
      
       - Disable AVIC on SNP-enabled systems that don't allow writes to the virtual
         APIC page, as such hosts will hit unexpected RMP #PFs in the host when
         running VMs of any flavor.
      
       - Fix a WARN in the hypercall completion path due to KVM trying to determine
         if a guest with protected register state is in 64-bit mode (KVM's ABI is to
         assume such guests only make hypercalls in 64-bit mode).
      
       - Allow the guest to write to supported bits in MSR_AMD64_DE_CFG to fix a
         regression with Windows guests, and because KVM's read-only behavior appears
         to be entirely made up.
      
       - Treat TDP MMU faults as spurious if the faulting access is allowed given the
         existing SPTE.  This fixes a benign WARN (other than the WARN itself) due to
         unexpectedly replacing a writable SPTE with a read-only SPTE.
      8afa5b10
    • Paolo Bonzini's avatar
      KVM: x86: let it be known that ignore_msrs is a bad idea · 398b7b6c
      Paolo Bonzini authored
      When running KVM with ignore_msrs=1 and report_ignored_msrs=0, the user has
      no clue that that the guest is being lied to.  This may cause bug reports
      such as https://gitlab.com/qemu-project/qemu/-/issues/2571
      
      , where enabling
      a CPUID bit in QEMU caused Linux guests to try reading MSR_CU_DEF_ERR; and
      being lied about the existence of MSR_CU_DEF_ERR caused the guest to assume
      other things about the local APIC which were not true:
      
        Sep 14 12:02:53 kernel: mce: [Firmware Bug]: Your BIOS is not setting up LVT offset 0x2 for deferred error IRQs correctly.
        Sep 14 12:02:53 kernel: unchecked MSR access error: RDMSR from 0x852 at rIP: 0xffffffffb548ffa7 (native_read_msr+0x7/0x40)
        Sep 14 12:02:53 kernel: Call Trace:
        ...
        Sep 14 12:02:53 kernel:  native_apic_msr_read+0x20/0x30
        Sep 14 12:02:53 kernel:  setup_APIC_eilvt+0x47/0x110
        Sep 14 12:02:53 kernel:  mce_amd_feature_init+0x485/0x4e0
        ...
        Sep 14 12:02:53 kernel: [Firmware Bug]: cpu 0, try to use APIC520 (LVT offset 2) for vector 0xf4, but the register is already in use for vector 0x0 on this cpu
      
      Without reported_ignored_msrs=0 at least the host kernel log will contain
      enough information to avoid going on a wild goose chase.  But if reports
      about individual MSR accesses are being silenced too, at least complain
      loudly the first time a VM is started.
      
      Signed-off-by: default avatarPaolo Bonzini <pbonzini@redhat.com>
      398b7b6c
    • Wolfram Sang's avatar
      KVM: VMX: don't include '<linux/find.h>' directly · 37d1d99b
      Wolfram Sang authored
      
      The header clearly states that it does not want to be included directly,
      only via '<linux/bitmap.h>'. Replace the include accordingly.
      
      Signed-off-by: default avatarWolfram Sang <wsa+renesas@sang-engineering.com>
      Message-ID: <20241217070539.2433-2-wsa+renesas@sang-engineering.com>
      Signed-off-by: default avatarPaolo Bonzini <pbonzini@redhat.com>
      37d1d99b
    • Linus Torvalds's avatar
      Merge tag 'devicetree-fixes-for-6.13-1' of git://git.kernel.org/pub/scm/linux/kernel/git/robh/linux · bcde95ce
      Linus Torvalds authored
      Pull devicetree fixes from Rob Herring:
      
       - Disable #address-cells/#size-cells warning on coreboot (Chromebooks)
         platforms
      
       - Add missing root #address-cells/#size-cells in default empty DT
      
       - Fix uninitialized variable in of_irq_parse_one()
      
       - Fix interrupt-map cell length check in of_irq_parse_imap_parent()
      
       - Fix refcount handling in __of_get_dma_parent()
      
       - Fix error path in of_parse_phandle_with_args_map()
      
       - Fix dma-ranges handling with flags cells
      
       - Drop explicit fw_devlink handling of 'interrupt-parent'
      
       - Fix "compression" typo in fixed-partitions binding
      
       - Unify "fsl,liodn" property type definitions
      
      * tag 'devicetree-fixes-for-6.13-1' of git://git.kernel.org/pub/scm/linux/kernel/git/robh/linux:
        of: Add coreboot firmware to excluded default cells list
        of/irq: Fix using uninitialized variable @addr_len in API of_irq_parse_one()
        of/irq: Fix interrupt-map cell length check in of_irq_parse_imap_parent()
        of: Fix refcount leakage for OF node returned by __of_get_dma_parent()
        of: Fix error path in of_parse_phandle_with_args_map()
        dt-bindings: mtd: fixed-partitions: Fix "compression" typo
        of: Add #address-cells/#size-cells in the device-tree root empty node
        dt-bindings: Unify "fsl,liodn" type definitions
        of: address: Preserve the flags portion on 1:1 dma-ranges mapping
        of/unittest: Add empty dma-ranges address translation tests
        of: property: fw_devlink: Do not use interrupt-parent directly
      bcde95ce
  3. Dec 21, 2024
    • Linus Torvalds's avatar
      Merge tag 'soc-fixes-6.13-2' of git://git.kernel.org/pub/scm/linux/kernel/git/soc/soc · 48f506ad
      Linus Torvalds authored
      Pull SoC fixes from Arnd Bergmann:
       "Two more small fixes, correcting the cacheline size on Raspberry Pi 5
        and fixing a logic mistake in the microchip mpfs firmware driver"
      
      * tag 'soc-fixes-6.13-2' of git://git.kernel.org/pub/scm/linux/kernel/git/soc/soc:
        arm64: dts: broadcom: Fix L2 linesize for Raspberry Pi 5
        firmware: microchip: fix UL_IAP lock check in mpfs_auto_update_state()
      48f506ad
    • Linus Torvalds's avatar
      Merge tag 'mm-hotfixes-stable-2024-12-21-12-09' of... · 4aa748dd
      Linus Torvalds authored
      Merge tag 'mm-hotfixes-stable-2024-12-21-12-09' of git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm
      
      Pull misc fixes from Andrew Morton:
       "25 hotfixes.  16 are cc:stable.  19 are MM and 6 are non-MM.
      
        The usual bunch of singletons and doubletons - please see the relevant
        changelogs for details"
      
      * tag 'mm-hotfixes-stable-2024-12-21-12-09' of git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm: (25 commits)
        mm: huge_memory: handle strsep not finding delimiter
        alloc_tag: fix set_codetag_empty() when !CONFIG_MEM_ALLOC_PROFILING_DEBUG
        alloc_tag: fix module allocation tags populated area calculation
        mm/codetag: clear tags before swap
        mm/vmstat: fix a W=1 clang compiler warning
        mm: convert partially_mapped set/clear operations to be atomic
        nilfs2: fix buffer head leaks in calls to truncate_inode_pages()
        vmalloc: fix accounting with i915
        mm/page_alloc: don't call pfn_to_page() on possibly non-existent PFN in split_large_buddy()
        fork: avoid inappropriate uprobe access to invalid mm
        nilfs2: prevent use of deleted inode
        zram: fix uninitialized ZRAM not releasing backing device
        zram: refuse to use zero sized block device as backing device
        mm: use clear_user_(high)page() for arch with special user folio handling
        mm: introduce cpu_icache_is_aliasing() across all architectures
        mm: add RCU annotation to pte_offset_map(_lock)
        mm: correctly reference merged VMA
        mm: use aligned address in copy_user_gigantic_page()
        mm: use aligned address in clear_gigantic_page()
        mm: shmem: fix ShmemHugePages at swapout
        ...
      4aa748dd
    • Steven Rostedt's avatar
      staging: gpib: Fix allyesconfig build failures · e84a3bf7
      Steven Rostedt authored
      
      My tests run an allyesconfig build and it failed with the following errors:
      
          LD [M]  samples/kfifo/dma-example.ko
        ld.lld: error: undefined symbol: nec7210_board_reset
        ld.lld: error: undefined symbol: nec7210_read
        ld.lld: error: undefined symbol: nec7210_write
      
      It appears that some modules call the function nec7210_board_reset()
      that is defined in nec7210.c.  In an allyesconfig build, these other
      modules are built in.  But the file that holds nec7210_board_reset()
      has:
      
        obj-m += nec7210.o
      
      Where that "-m" means it only gets built as a module. With the other
      modules built in, they have no access to nec7210_board_reset() and the build
      fails.
      
      This isn't the only function. After fixing that one, I hit another:
      
        ld.lld: error: undefined symbol: push_gpib_event
        ld.lld: error: undefined symbol: gpib_match_device_path
      
      Where push_gpib_event() was also used outside of the file it was defined
      in, and that file too only was built as a module.
      
      Since the directory that nec7210.c is only traversed when
      CONFIG_GPIB_NEC7210 is set, and the directory with gpib_common.c is only
      traversed when CONFIG_GPIB_COMMON is set, use those configs as the
      option to build those modules.  When it is an allyesconfig, then they
      will both be built in and their functions will be available to the other
      modules that are also built in.
      
      Fixes: 3ba84ac6 ("staging: gpib: Add nec7210 GPIB chip driver")
      Fixes: 9dde4559 ("staging: gpib: Add GPIB common core driver")
      Signed-off-by: default avatarSteven Rostedt (Google) <rostedt@goodmis.org>
      Reviewed-by: default avatarPalmer Dabbelt <palmer@rivosinc.com>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      e84a3bf7
    • Linus Torvalds's avatar
      Merge tag 'kbuild-fixes-v6.13-2' of... · a016546b
      Linus Torvalds authored
      Merge tag 'kbuild-fixes-v6.13-2' of git://git.kernel.org/pub/scm/linux/kernel/git/masahiroy/linux-kbuild
      
      Pull Kbuild fixes from Masahiro Yamada:
      
       - Remove stale code in usr/include/headers_check.pl
      
       - Fix issues in the user-mode-linux Debian package
      
       - Fix false-positive "export twice" errors in modpost
      
      * tag 'kbuild-fixes-v6.13-2' of git://git.kernel.org/pub/scm/linux/kernel/git/masahiroy/linux-kbuild:
        modpost: distinguish same module paths from different dump files
        kbuild: deb-pkg: Do not install maint scripts for arch 'um'
        kbuild: deb-pkg: add debarch for ARCH=um
        kbuild: Drop support for include/asm-<arch> in headers_check.pl
      a016546b
    • Linus Torvalds's avatar
      Merge tag 'bpf-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/bpf/bpf · 9c707ba9
      Linus Torvalds authored
      Pull BPF fixes from Daniel Borkmann:
      
       - Fix inlining of bpf_get_smp_processor_id helper for !CONFIG_SMP
         systems (Andrea Righi)
      
       - Fix BPF USDT selftests helper code to use asm constraint "m" for
         LoongArch (Tiezhu Yang)
      
       - Fix BPF selftest compilation error in get_uprobe_offset when
         PROCMAP_QUERY is not defined (Jerome Marchand)
      
       - Fix BPF bpf_skb_change_tail helper when used in context of BPF
         sockmap to handle negative skb header offsets (Cong Wang)
      
       - Several fixes to BPF sockmap code, among others, in the area of
         socket buffer accounting (Levi Zim, Zijian Zhang, Cong Wang)
      
      * tag 'bpf-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/bpf/bpf:
        selftests/bpf: Test bpf_skb_change_tail() in TC ingress
        selftests/bpf: Introduce socket_helpers.h for TC tests
        selftests/bpf: Add a BPF selftest for bpf_skb_change_tail()
        bpf: Check negative offsets in __bpf_skb_min_len()
        tcp_bpf: Fix copied value in tcp_bpf_sendmsg
        skmsg: Return copied bytes in sk_msg_memcopy_from_iter
        tcp_bpf: Add sk_rmem_alloc related logic for tcp_bpf ingress redirection
        tcp_bpf: Charge receive socket buffer in bpf_tcp_ingress()
        selftests/bpf: Fix compilation error in get_uprobe_offset()
        selftests/bpf: Use asm constraint "m" for LoongArch
        bpf: Fix bpf_get_smp_processor_id() on !CONFIG_SMP
      9c707ba9
    • Linus Torvalds's avatar
      Merge tag 'media/v6.13-3' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-media · 876685ce
      Linus Torvalds authored
      Pull media fixes from Mauro Carvalho Chehab:
      
       - fix a clang build issue with mediatec vcodec
      
       - add missing variable initialization to dib3000mb write function
      
      * tag 'media/v6.13-3' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-media:
        media: mediatek: vcodec: mark vdec_vp9_slice_map_counts_eob_coef noinline
        media: dvb-frontends: dib3000mb: fix uninit-value in dib3000_write_reg
      876685ce
    • Linus Torvalds's avatar
      Merge tag 'pci-v6.13-fixes-2' of git://git.kernel.org/pub/scm/linux/kernel/git/pci/pci · a99b4a36
      Linus Torvalds authored
      Pull PCI fixes from Krzysztof Wilczyński:
       "Two small patches that are important for fixing boot time hang on
        Intel JHL7540 'Titan Ridge' platforms equipped with a Thunderbolt
        controller.
      
        The boot time issue manifests itself when a PCI Express bandwidth
        control is unnecessarily enabled on the Thunderbolt controller
        downstream ports, which only supports a link speed of 2.5 GT/s in
        accordance with USB4 v2 specification (p. 671, sec. 11.2.1, "PCIe
        Physical Layer Logical Sub-block").
      
        As such, there is no need to enable bandwidth control on such
        downstream port links, which also works around the issue.
      
        Both patches were tested by the original reporter on the hardware on
        which the failure origin golly manifested itself. Both fixes were
        proven to resolve the reported boot hang issue, and both patches have
        been in linux-next this week with no reported problems"
      
      * tag 'pci-v6.13-fixes-2' of git://git.kernel.org/pub/scm/linux/kernel/git/pci/pci:
        PCI/bwctrl: Enable only if more than one speed is supported
        PCI: Honor Max Link Speed when determining supported speeds
      a99b4a36
    • Linus Torvalds's avatar
      Merge tag 'pm-6.13-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm · 78b13461
      Linus Torvalds authored
      Pull power management fixes from Rafael Wysocki:
       "These fix some amd-pstate driver issues:
      
         - Detect preferred core support in amd-pstate before driver
           registration to avoid initialization ordering issues (K Prateek
           Nayak)
      
         - Fix issues with with boost numerator handling in amd-pstate leading
           to inconsistently programmed CPPC max performance values (Mario
           Limonciello)"
      
      * tag 'pm-6.13-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm:
        cpufreq/amd-pstate: Use boost numerator for upper bound of frequencies
        cpufreq/amd-pstate: Store the boost numerator as highest perf again
        cpufreq/amd-pstate: Detect preferred core support before driver registration
      78b13461
    • Linus Torvalds's avatar
      Merge tag 'thermal-6.13-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm · be6bb361
      Linus Torvalds authored
      Pull thermal control fixes from Rafael Wysocki:
       "Fix two issues with the user thermal thresholds feature introduced in
        this development cycle (Daniel Lezcano)"
      
      * tag 'thermal-6.13-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm:
        thermal/thresholds: Fix boundaries and detection routine
        thermal/thresholds: Fix uapi header macros leading to a compilation error
      be6bb361
    • Linus Torvalds's avatar
      Merge tag 'acpi-6.13-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm · 5100b6f9
      Linus Torvalds authored
      Pull ACPI fix from Rafael Wysocki:
       "Unbreak ACPI EC support on LoongArch that has been broken earlier in
        this development cycle (Huacai Chen)"
      
      * tag 'acpi-6.13-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm:
        ACPI: EC: Enable EC support on LoongArch by default
      5100b6f9
    • Linus Torvalds's avatar
      Merge tag '6.13-rc3-SMB3-client-fixes' of git://git.samba.org/sfrench/cifs-2.6 · baa172c7
      Linus Torvalds authored
      Pull smb client fixes from Steve French:
      
       - fix regression in display of write stats
      
       - fix rmmod failure with network namespaces
      
       - two minor cleanups
      
      * tag '6.13-rc3-SMB3-client-fixes' of git://git.samba.org/sfrench/cifs-2.6:
        smb: fix bytes written value in /proc/fs/cifs/Stats
        smb: client: fix TCP timers deadlock after rmmod
        smb: client: Deduplicate "select NETFS_SUPPORT" in Kconfig
        smb: use macros instead of constants for leasekey size and default cifsattrs value
      baa172c7
    • Linus Torvalds's avatar
      Merge tag 'nfs-for-6.13-2' of git://git.linux-nfs.org/projects/trondmy/linux-nfs · 4a5da3f5
      Linus Torvalds authored
      Pull NFS client fixes from Trond Myklebust:
      
       - NFS/pnfs: Fix a live lock between recalled layouts and layoutget
      
       - Fix a build warning about an undeclared symbol 'nfs_idmap_cache_timeout'
      
      * tag 'nfs-for-6.13-2' of git://git.linux-nfs.org/projects/trondmy/linux-nfs:
        fs/nfs: fix missing declaration of nfs_idmap_cache_timeout
        NFS/pnfs: Fix a live lock between recalled layouts and layoutget
      4a5da3f5
    • Linus Torvalds's avatar
      Merge tag 'ceph-for-6.13-rc4' of https://github.com/ceph/ceph-client · 7684392f
      Linus Torvalds authored
      Pull ceph fixes from Ilya Dryomov:
       "A handful of important CephFS fixes from Max, Alex and myself: memory
        corruption due to a buffer overrun, potential infinite loop and
        several memory leaks on the error paths. All but one marked for
        stable"
      
      * tag 'ceph-for-6.13-rc4' of https://github.com/ceph/ceph-client:
        ceph: allocate sparse_ext map only for sparse reads
        ceph: fix memory leak in ceph_direct_read_write()
        ceph: improve error handling and short/overflow-read logic in __ceph_sync_read()
        ceph: validate snapdirname option length when mounting
        ceph: give up on paths longer than PATH_MAX
        ceph: fix memory leaks in __ceph_sync_read()
      7684392f
    • Masahiro Yamada's avatar
      modpost: distinguish same module paths from different dump files · 9435dc77
      Masahiro Yamada authored
      
      Since commit 13b25489 ("kbuild: change working directory to external
      module directory with M="), module paths are always relative to the top
      of the external module tree.
      
      The module paths recorded in Module.symvers are no longer globally unique
      when they are passed via KBUILD_EXTRA_SYMBOLS for building other external
      modules, which may result in false-positive "exported twice" errors.
      Such errors should not occur because external modules should be able to
      override in-tree modules.
      
      To address this, record the dump file path in struct module and check it
      when searching for a module.
      
      Fixes: 13b25489 ("kbuild: change working directory to external module directory with M=")
      Reported-by: default avatarJon Hunter <jonathanh@nvidia.com>
      Closes: https://lore.kernel.org/all/eb21a546-a19c-40df-b821-bbba80f19a3d@nvidia.com/
      
      
      Signed-off-by: default avatarMasahiro Yamada <masahiroy@kernel.org>
      Tested-by: default avatarJon Hunter <jonathanh@nvidia.com>
      9435dc77
    • Nicolas Schier's avatar
      kbuild: deb-pkg: Do not install maint scripts for arch 'um' · 54956567
      Nicolas Schier authored
      
      Stop installing Debian maintainer scripts when building a
      user-mode-linux Debian package.
      
      Debian maintainer scripts are used for e.g. requesting rebuilds of
      initrd, rebuilding DKMS modules and updating of grub configuration.  As
      all of this is not relevant for UML but also may lead to failures while
      processing the kernel hooks, do no more install maintainer scripts for
      the UML package.
      
      Suggested-by: default avatarMasahiro Yamada <masahiroy@kernel.org>
      Signed-off-by: default avatarNicolas Schier <nicolas@fjasle.eu>
      Signed-off-by: default avatarMasahiro Yamada <masahiroy@kernel.org>
      54956567
    • Masahiro Yamada's avatar
      kbuild: deb-pkg: add debarch for ARCH=um · a34e92d2
      Masahiro Yamada authored
      
      'make ARCH=um bindeb-pkg' shows the following warning.
      
        $ make ARCH=um bindeb-pkg
           [snip]
          GEN     debian
      
        ** ** **  WARNING  ** ** **
      
        Your architecture doesn't have its equivalent
        Debian userspace architecture defined!
        Falling back to the current host architecture (amd64).
        Please add support for um to ./scripts/package/mkdebian ...
      
      This commit hard-codes i386/amd64 because UML is only supported for x86.
      
      Signed-off-by: default avatarMasahiro Yamada <masahiroy@kernel.org>
      Reviewed-by: default avatarNicolas Schier <nicolas@fjasle.eu>
      a34e92d2
    • Geert Uytterhoeven's avatar
      kbuild: Drop support for include/asm-<arch> in headers_check.pl · d67393f4
      Geert Uytterhoeven authored
      
      "include/asm-<arch>" was replaced by "arch/<arch>/include/asm" a long
      time ago.  All assembler header files are now included using
      "#include <asm/*>", so there is no longer a need to rewrite paths.
      
      Signed-off-by: default avatarGeert Uytterhoeven <geert+renesas@glider.be>
      Signed-off-by: default avatarMasahiro Yamada <masahiroy@kernel.org>
      d67393f4
  4. Dec 20, 2024
Loading