Commit Graph

1170170 Commits

Author SHA1 Message Date
Arnd Bergmann
d8780220fd UPSTREAM: scripts/unifdef: avoid constexpr keyword
Starting with c23, 'constexpr' is a keyword in C like in C++ and cannot
be used as an identifier:

scripts/unifdef.c:206:25: error: 'constexpr' can only be used in variable declarations
  206 | static bool             constexpr;              /* constant #if expression */
      |                         ^
scripts/unifdef.c:880:13: error: expected identifier or '('
  880 |                 constexpr = false;
      |                           ^

Rename this instance to allow changing to C23 at some point in the future.

Bug: 401172689
Bug: 422603167
Change-Id: I19e1c13f5dcffe98b8189d3317100f20774f1d4c
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Reviewed-By: Tony Finch <dot@dotat.at>
Reviewed-by: Nicolas Schier <nicolas@fjasle.eu>
Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
(cherry picked from commit 10f94d8fcc0880c93d7697184fe199022792a61c)
Signed-off-by: Srinivasarao Pathipati <quic_c_spathi@quicinc.com>
(cherry picked from commit b7fd55a297a77e72154def86b46c3d1cf1ffa1e1)
2025-06-05 08:48:52 -07:00
jianhua hao
3048ff6925 ANDROID: GKI: Update symbol list file for xiaomi
INFO: 3 function symbol(s) added
  'struct page* read_swap_cache_async(swp_entry_t, gfp_t, struct vm_area_struct*, unsigned long, struct swap_iocb**)'
  'int unuse_swap_pte(struct vm_area_struct*, pmd_t*, unsigned long, swp_entry_t, struct folio*)'
  'int vfs_fadvise(struct file*, loff_t, loff_t, int)'

Bug: 415852480

Change-Id: I5c4d50e042dd8dc8ba4df430614b0ac79ffb41cd
Signed-off-by: jianhua hao <haojianhua1@xiaomi.com>
2025-06-04 08:49:15 -07:00
jianhua hao
7f2f532bd0 ANDROID: mm: export __pte_offset_map/unuse_swap_pte/read_swap_cache_async
Export __pte_offset_map facilitate retrieving the corresponding PTE using PMD and an address.
Add and export unuse_swap_pte to facilitate releasing the PTE resources corresponding to pages preloaded via swapin.
Export read_swap_cache_async to facilitate asynchronously reading pages from the swap partition using PTE-prefetch scanning.

Bug: 415852480

Change-Id: Ie200656ec97b087936ca98c06b0a370f547d5d0a
Signed-off-by: jianhua hao <haojianhua1@xiaomi.com>
(cherry picked from commit 88cb3505ebf4d9eb1dd0d3c63403727eb4b239bd)
(cherry picked from commit c5defcb638906800d4ab6b50e79e9f25538aefbd)
2025-06-04 08:49:15 -07:00
Chao Yu
4cf22d9783 FROMGIT: f2fs: sysfs: export linear_lookup in features directory
cat /sys/fs/f2fs/features/linear_lookup
supported

Bug: 410768629
(cherry picked from commit 617e0491abe4d8d45c5110ca474c0feb428e6828
https://git.kernel.org/pub/scm/linux/kernel/git/jaegeuk/f2fs.git dev)
Link: https://lore.kernel.org/linux-f2fs-devel/20250416054805.1416834-2-chao@kernel.org
Change-Id: I9762dc9d918f96e716a2e0b76a9fe6d168a6b56a
Signed-off-by: Chao Yu <chao@kernel.org>
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
[Chao: Resolved conflicts in fs/f2fs/sysfs.c ]
2025-06-04 01:03:37 -07:00
Chao Yu
1619abb40c FROMGIT: f2fs: sysfs: add encoding_flags entry
This patch adds a new sysfs entry /sys/fs/f2fs/<disk>/encoding_flags,
it is a read-only entry to show the value of sb.s_encoding_flags, the
value is hexadecimal.

============================     ==========
Flag_Name                        Flag_Value
============================     ==========
SB_ENC_STRICT_MODE_FL            0x00000001
SB_ENC_NO_COMPAT_FALLBACK_FL     0x00000002
============================     ==========

case#1
mkfs.f2fs -f -O casefold -C utf8:strict /dev/vda
mount /dev/vda /mnt/f2fs
cat /sys/fs/f2fs/vda/encoding_flags
1

case#2
mkfs.f2fs -f -O casefold -C utf8 /dev/vda
fsck.f2fs --nolinear-lookup=1 /dev/vda
mount /dev/vda /mnt/f2fs
cat /sys/fs/f2fs/vda/encoding_flags
2

Bug: 410768629
(cherry picked from commit 3fea0641b06ff4e53d95d07a96764d8951d4ced6
https://git.kernel.org/pub/scm/linux/kernel/git/jaegeuk/f2fs.git dev)
Link: https://lore.kernel.org/linux-f2fs-devel/20250506074725.12315-1-chao@kernel.org
Change-Id: I8a06c81d74278f148c0619fa905989aa75da8719
Signed-off-by: Chao Yu <chao@kernel.org>
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
[Chao: Resolved conflicts in sysfs-fs-f2fs ]
2025-06-04 01:03:37 -07:00
Chao Yu
78be72f696 FROMGIT: f2fs: support to disable linear lookup fallback
After commit 91b587ba79e1 ("f2fs: Introduce linear search for
dentries"), f2fs forced to use linear lookup whenever a hash-based
lookup fails on casefolded directory, it may affect performance for
scenarios: a) create a new file w/ filename it doesn't exist in
directory, b) lookup a file which may be removed.

This patch supports to disable linear lookup fallback, so, once there is
a solution for commit 5c26d2f1d3f5 ("unicode: Don't special case
ignorable code points") to fix red heart unicode issue, then we can set
an encodeing flag to disable the fallback for performance recovery.

The way is kept in line w/ ext4, refer to commit 9e28059d5664 ("ext4:
introduce linear search for dentries").

Bug: 410768629
(cherry picked from commit aa00c6d5d05a80ef5946984025c25ab231b722f9
https://git.kernel.org/pub/scm/linux/kernel/git/jaegeuk/f2fs.git dev)
Link: https://lore.kernel.org/linux-f2fs-devel/20250401035800.51504-1-chao@kernel.org
[Chao: backport dependent macro from commit 9e28059d5664 ("ext4:
introduce linear search for dentries")]
Cc: Daniel Lee <chullee@google.com>
Cc: Gabriel Krisman Bertazi <krisman@suse.de>
Change-Id: Idff994f832dcaa1b9a5eb750b8ae03a5e580c1c6
Signed-off-by: Chao Yu <chao@kernel.org>
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
2025-06-04 01:03:37 -07:00
Huan Yang
5b87067cdd UPSTREAM: mm/memcg: use kmem_cache when alloc memcg pernode info
When tracing mem_cgroup_per_node allocations with kmalloc ftrace:

kmalloc: call_site=mem_cgroup_css_alloc+0x1d8/0x5b4 ptr=00000000d798700c
    bytes_req=2896 bytes_alloc=4096 gfp_flags=GFP_KERNEL|__GFP_ZERO node=0
    accounted=false

This reveals the slab allocator provides 4096B chunks for 2896B
mem_cgroup_per_node due to:

1. The slab allocator predefines bucket sizes from 64B to 8096B
2. The mem_cgroup allocation size (2312B) falls between the 2KB and 4KB
   slabs
3. The allocator rounds up to the nearest larger slab (4KB), resulting in
   ~1KB wasted memory per memcg alloc - per node.

This patch introduces a dedicated kmem_cache for mem_cgroup structs,
achieving precise memory allocation. Post-patch ftrace verification shows:

kmem_cache_alloc: call_site=mem_cgroup_css_alloc+0x1b8/0x5d4
    ptr=000000002989e63a bytes_req=2896 bytes_alloc=2944
    gfp_flags=GFP_KERNEL|__GFP_ZERO node=0 accounted=false

Each mem_cgroup_per_node alloc 2944bytes(include hw cacheline align),
compare to 4096, it avoid waste.

Link: https://lkml.kernel.org/r/20250425031935.76411-4-link@vivo.com
Signed-off-by: Huan Yang <link@vivo.com>
Acked-by: Shakeel Butt <shakeel.butt@linux.dev>
Acked-by: Johannes Weiner <hannes@cmpxchg.org>
Cc: Francesco Valla <francesco@valla.it>
Cc: guoweikang <guoweikang.kernel@gmail.com>
Cc: Huang Shijie <shijie@os.amperecomputing.com>
Cc: KP Singh <kpsingh@kernel.org>
Cc: Michal Hocko <mhocko@kernel.org>
Cc: Muchun Song <muchun.song@linux.dev>
Cc: "Paul E . McKenney" <paulmck@kernel.org>
Cc: Petr Mladek <pmladek@suse.com>
Cc: Rasmus Villemoes <linux@rasmusvillemoes.dk>
Cc: Raul E Rangel <rrangel@chromium.org>
Cc: Roman Gushchin <roman.gushchin@linux.dev>
Cc: "Uladzislau Rezki (Sony)" <urezki@gmail.com>
Cc: Vlastimil Babka <vbabka@suse.cz>
Cc: Matthew Wilcox <willy@infradead.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
(cherry picked from commit 1b6a58e205ed0bbeeeca46388f0649f322b04f06)
Change-Id: I83a4f675dd8b539a8a40617cc1c1f10e3588e955
Bug: 417296244
Signed-off-by: T.J. Mercier <tjmercier@google.com>
2025-06-02 13:00:45 -07:00
Huan Yang
19d3046bc5 BACKPORT: mm/memcg: use kmem_cache when alloc memcg
When tracing mem_cgroup_alloc() with kmalloc ftrace, we observe:

kmalloc: call_site=mem_cgroup_css_alloc+0xd8/0x5b4 ptr=000000003e4c3799
    bytes_req=2312 bytes_alloc=4096 gfp_flags=GFP_KERNEL|__GFP_ZERO node=-1
    accounted=false

The output indicates that while allocating mem_cgroup struct (2312 bytes),
the slab allocator actually provides 4096-byte chunks. This occurs because:

1. The slab allocator predefines bucket sizes from 64B to 8096B
2. The mem_cgroup allocation size (2312B) falls between the 2KB and 4KB
   slabs
3. The allocator rounds up to the nearest larger slab (4KB), resulting in
   ~1KB wasted memory per allocation

This patch introduces a dedicated kmem_cache for mem_cgroup structs,
achieving precise memory allocation. Post-patch ftrace verification shows:

kmem_cache_alloc: call_site=mem_cgroup_css_alloc+0xbc/0x5d4
    ptr=00000000695c1806 bytes_req=2312 bytes_alloc=2368
    gfp_flags=GFP_KERNEL|__GFP_ZERO node=-1 accounted=false

Each memcg alloc offer 2368bytes(include hw cacheline align), compare to
4096, avoid waste.

Link: https://lkml.kernel.org/r/20250425031935.76411-3-link@vivo.com
Signed-off-by: Huan Yang <link@vivo.com>
Acked-by: Shakeel Butt <shakeel.butt@linux.dev>
Acked-by: Johannes Weiner <hannes@cmpxchg.org>
Cc: Francesco Valla <francesco@valla.it>
Cc: guoweikang <guoweikang.kernel@gmail.com>
Cc: Huang Shijie <shijie@os.amperecomputing.com>
Cc: KP Singh <kpsingh@kernel.org>
Cc: Michal Hocko <mhocko@kernel.org>
Cc: Muchun Song <muchun.song@linux.dev>
Cc: "Paul E . McKenney" <paulmck@kernel.org>
Cc: Petr Mladek <pmladek@suse.com>
Cc: Rasmus Villemoes <linux@rasmusvillemoes.dk>
Cc: Raul E Rangel <rrangel@chromium.org>
Cc: Roman Gushchin <roman.gushchin@linux.dev>
Cc: "Uladzislau Rezki (Sony)" <urezki@gmail.com>
Cc: Vlastimil Babka <vbabka@suse.cz>
Cc: Matthew Wilcox <willy@infradead.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
(cherry picked from commit 97e4fc4b35dc1b98f28671fda35bd37d4f401bca)
[TJ: struct_size_t not available. Open code it with struct_size.]
Change-Id: Ib5c73e7af6eaf2b3066088566690cd0c6f4c796c
Bug: 417296244
Signed-off-by: T.J. Mercier <tjmercier@google.com>
2025-06-02 13:00:45 -07:00
Huan Yang
db3b80e22e UPSTREAM: mm/memcg: move mem_cgroup_init() ahead of cgroup_init()
Patch series "Use kmem_cache for memcg alloc", v3.

(willy tldr: "you've gone from allocating 8 objects per 32KiB to
allocating 13 objects per 32KiB, a 62% improvement in memory consumption"
[1])

The mem_cgroup_alloc function creates mem_cgroup struct and it's
associated structures including mem_cgroup_per_node.  Through detailed
analysis on our test machine (Arm64, 16GB RAM, 6.6 kernel, 1 NUMA node,
memcgv2 with nokmem,nosocket,cgroup_disable=pressure), we can observe the
memory allocation for these structures using the following shell commands:

  # Enable tracing
  echo 1 > /sys/kernel/tracing/events/kmem/kmalloc/enable
  echo 1 > /sys/kernel/tracing/tracing_on
  cat /sys/kernel/tracing/trace_pipe | grep kmalloc | grep mem_cgroup

  # Trigger allocation if cgroup subtree do not enable memcg
  echo +memory > /sys/fs/cgroup/cgroup.subtree_control

Ftrace Output:

  # mem_cgroup struct allocation
  sh-6312    [000] ..... 58015.698365: kmalloc:
    call_site=mem_cgroup_css_alloc+0xd8/0x5b4
    ptr=000000003e4c3799 bytes_req=2312 bytes_alloc=4096
    gfp_flags=GFP_KERNEL|__GFP_ZERO node=-1 accounted=false

  # mem_cgroup_per_node allocation
  sh-6312    [000] ..... 58015.698389: kmalloc:
    call_site=mem_cgroup_css_alloc+0x1d8/0x5b4
    ptr=00000000d798700c bytes_req=2896 bytes_alloc=4096
    gfp_flags=GFP_KERNEL|__GFP_ZERO node=0 accounted=false

Key Observations:

  1. Both structures use kmalloc with requested sizes between 2KB-4KB
  2. Allocation alignment forces 4KB slab usage due to pre-defined sizes
     (64B, 128B,..., 2KB, 4KB, 8KB)
  3. Memory waste per memcg instance:
      Base struct: 4096 - 2312 = 1784 bytes
      Per-node struct: 4096 - 2896 = 1200 bytes
      Total waste: 2984 bytes (1-node system)
      NUMA scaling: (1200 + 8) * nr_node_ids bytes

So, it's a little waste.

This patchset introduces dedicated kmem_cache:
  Patch2 - mem_cgroup kmem_cache - memcg_cachep
  Patch3 - mem_cgroup_per_node kmem_cache - memcg_pn_cachep

The benefits of this change can be observed with the following tracing
commands:

  # Enable tracing
  echo 1 > /sys/kernel/tracing/events/kmem/kmem_cache_alloc/enable
  echo 1 > /sys/kernel/tracing/tracing_on
  cat /sys/kernel/tracing/trace_pipe | grep kmem_cache_alloc | grep mem_cgroup
  # In another terminal:
  echo +memory > /sys/fs/cgroup/cgroup.subtree_control

The output might now look like this:

  # mem_cgroup struct allocation
  sh-9827     [000] .....   289.513598: kmem_cache_alloc:
    call_site=mem_cgroup_css_alloc+0xbc/0x5d4 ptr=00000000695c1806
    bytes_req=2312 bytes_alloc=2368 gfp_flags=GFP_KERNEL|__GFP_ZERO node=-1
    accounted=false
  # mem_cgroup_per_node allocation
  sh-9827     [000] .....   289.513602: kmem_cache_alloc:
    call_site=mem_cgroup_css_alloc+0x1b8/0x5d4 ptr=000000002989e63a
    bytes_req=2896 bytes_alloc=2944 gfp_flags=GFP_KERNEL|__GFP_ZERO node=0
    accounted=false

This indicates that the `mem_cgroup` struct now requests 2312 bytes and is
allocated 2368 bytes, while `mem_cgroup_per_node` requests 2896 bytes and
is allocated 2944 bytes.  The slight increase in allocated size is due to
`SLAB_HWCACHE_ALIGN` in the `kmem_cache`.

Without `SLAB_HWCACHE_ALIGN`, the allocation might appear as:

  # mem_cgroup struct allocation
  sh-9269     [003] .....    80.396366: kmem_cache_alloc:
    call_site=mem_cgroup_css_alloc+0xbc/0x5d4 ptr=000000005b12b475
    bytes_req=2312 bytes_alloc=2312 gfp_flags=GFP_KERNEL|__GFP_ZERO node=-1
    accounted=false

  # mem_cgroup_per_node allocation
  sh-9269     [003] .....    80.396411: kmem_cache_alloc:
    call_site=mem_cgroup_css_alloc+0x1b8/0x5d4 ptr=00000000f347adc6
    bytes_req=2896 bytes_alloc=2896 gfp_flags=GFP_KERNEL|__GFP_ZERO node=0
    accounted=false

While the `bytes_alloc` now matches the `bytes_req`, this patchset
defaults to using `SLAB_HWCACHE_ALIGN` as it is generally considered more
beneficial for performance.  Please let me know if there are any issues or
if I've misunderstood anything.

This patchset also move mem_cgroup_init ahead of cgroup_init() due to
cgroup_init() will allocate root_mem_cgroup, but each initcall invoke
after cgroup_init, so if each kmem_cache do not prepare, we need testing
NULL before use it.

This patch (of 3):

When cgroup_init() creates root_mem_cgroup through css_alloc callback,
some critical resources might not be fully initialized, forcing later
operations to perform conditional checks for resource availability.

This patch move mem_cgroup_init() to address the init order, it invoke
before cgroup_init, so, compare to subsys_initcall, it can use to prepare
some key resources before root_mem_cgroup alloc.

Link: https://lkml.kernel.org/r/aAsRCj-niMMTtmK8@casper.infradead.org [1]
Link: https://lkml.kernel.org/r/20250425031935.76411-1-link@vivo.com
Link: https://lkml.kernel.org/r/20250425031935.76411-2-link@vivo.com
Signed-off-by: Huan Yang <link@vivo.com>
Suggested-by: Shakeel Butt <shakeel.butt@linux.dev>
Acked-by: Shakeel Butt <shakeel.butt@linux.dev>
Acked-by: Johannes Weiner <hannes@cmpxchg.org>
Cc: Francesco Valla <francesco@valla.it>
Cc: guoweikang <guoweikang.kernel@gmail.com>
Cc: Huang Shijie <shijie@os.amperecomputing.com>
Cc: KP Singh <kpsingh@kernel.org>
Cc: Michal Hocko <mhocko@kernel.org>
Cc: Muchun Song <muchun.song@linux.dev>
Cc: "Paul E . McKenney" <paulmck@kernel.org>
Cc: Petr Mladek <pmladek@suse.com>
Cc: Rasmus Villemoes <linux@rasmusvillemoes.dk>
Cc: Raul E Rangel <rrangel@chromium.org>
Cc: Roman Gushchin <roman.gushchin@linux.dev>
Cc: "Uladzislau Rezki (Sony)" <urezki@gmail.com>
Cc: Vlastimil Babka <vbabka@suse.cz>
Cc: Matthew Wilcox <willy@infradead.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
(cherry picked from commit bc9817bb7a21f64fbca2c4b83811d943036ec870)
Change-Id: I71005c1ad3d826b99fa698358bcf357ff7924c8c
Bug: 417296244
Signed-off-by: T.J. Mercier <tjmercier@google.com>
2025-06-02 13:00:45 -07:00
Barry Song
db710ea87c BACKPORT: mm: avoid unconditional one-tick sleep when swapcache_prepare fails
Commit 13ddaf26be32 ("mm/swap: fix race when skipping swapcache")
introduced an unconditional one-tick sleep when `swapcache_prepare()`
fails, which has led to reports of UI stuttering on latency-sensitive
Android devices.  To address this, we can use a waitqueue to wake up tasks
that fail `swapcache_prepare()` sooner, instead of always sleeping for a
full tick.  While tasks may occasionally be woken by an unrelated
`do_swap_page()`, this method is preferable to two scenarios: rapid
re-entry into page faults, which can cause livelocks, and multiple
millisecond sleeps, which visibly degrade user experience.

Oven's testing shows that a single waitqueue resolves the UI stuttering
issue.  If a 'thundering herd' problem becomes apparent later, a waitqueue
hash similar to `folio_wait_table[PAGE_WAIT_TABLE_SIZE]` for page bit
locks can be introduced.

[v-songbaohua@oppo.com: wake_up only when swapcache_wq waitqueue is active]
  Link: https://lkml.kernel.org/r/20241008130807.40833-1-21cnbao@gmail.com
Link: https://lkml.kernel.org/r/20240926211936.75373-1-21cnbao@gmail.com
Fixes: 13ddaf26be32 ("mm/swap: fix race when skipping swapcache")
Change-Id: I6cd3d6ef318d660ee6290554b5e864d90a70b920
Signed-off-by: Barry Song <v-songbaohua@oppo.com>
Reported-by: Oven Liyang <liyangouwen1@oppo.com>
Tested-by: Oven Liyang <liyangouwen1@oppo.com>
Cc: Kairui Song <kasong@tencent.com>
Cc: "Huang, Ying" <ying.huang@intel.com>
Cc: Yu Zhao <yuzhao@google.com>
Cc: David Hildenbrand <david@redhat.com>
Cc: Chris Li <chrisl@kernel.org>
Cc: Hugh Dickins <hughd@google.com>
Cc: Johannes Weiner <hannes@cmpxchg.org>
Cc: Matthew Wilcox (Oracle) <willy@infradead.org>
Cc: Michal Hocko <mhocko@suse.com>
Cc: Minchan Kim <minchan@kernel.org>
Cc: Yosry Ahmed <yosryahmed@google.com>
Cc: SeongJae Park <sj@kernel.org>
Cc: Kalesh Singh <kaleshsingh@google.com>
Cc: Suren Baghdasaryan <surenb@google.com>
Cc: <stable@vger.kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
(cherry picked from commit 01626a18230246efdcea322aa8f067e60ffe5ccd)
Bug: 313807618
Signed-off-by: Kalesh Singh <kaleshsingh@google.com>
Signed-off-by: Oven <liyangouwen1@oppo.com>
2025-05-27 14:04:25 -07:00
Greg Kroah-Hartman
9e207186c7 Merge tag 'android14-6.1.138_r00' into android14-6.1
This merges the android14-6.1.138_r00 tag into the android14-6.1 branch,
catching it up with the latest LTS releases.

It contains the following commits:

* 4894546596 Revert "cpufreq: Avoid using inconsistent policy->min and policy->max"
* 9840922a87 Revert "cpufreq: Fix setting policy limits when frequency tables are used"
* 1e50e672f2 UPSTREAM: arm64: errata: Add newer ARM cores to the spectre_bhb_loop_affected() lists
*   4c7f06c5da Merge 6.1.138 into android14-6.1-lts
|\
| * 02b72ccb5f Linux 6.1.138
| * 5626b47a3e ASoC: soc-core: Stop using of_property_read_bool() for non-boolean properties
| * 79ff5e2629 ASoC: Use of_property_read_bool()
| * e25139c4aa drm/amd/display: Fix slab-use-after-free in hdcp
| * 942ecb9e8f drm/amd/display: Add scoped mutexes for amdgpu_dm_dhcp
| * e07ed98515 drm/amd/display: Change HDCP update sequence for DM
| * e56b7400e9 drm/amd/display: Clean up style problems in amdgpu_dm_hdcp.c
| * 8a86bb891b drm/amd/display: phase2 enable mst hdcp multiple displays
| * 8316820e40 iommu/arm-smmu-v3: Fix iommu_device_probe bug due to duplicated stream ids
| * 28ddd9cf9d iommu/arm-smmu-v3: Use the new rb tree helpers
| * 4c4f168b46 dm: fix copying after src array boundaries
| * dc0d654eb4 irqchip/gic-v2m: Prevent use after free of gicv2m_get_fwnode()
| * c8f809b3de irqchip/gic-v2m: Mark a few functions __init
| * 36d4ce271b Revert "drm/meson: vclk: fix calculation of 59.94 fractional rates"
| * 9b89102fbb net: phy: microchip: force IRQ polling mode for lan88xx
| * 72a797facb ARM: dts: opos6ul: add ksz8081 phy properties
| * 88d7fd2d46 firmware: arm_ffa: Skip Rx buffer ownership release if not acquired
| * ff4273d47d firmware: arm_scmi: Balance device refcount when destroying devices
| * c13b801e85 Revert "x86/kexec: Allocate PGD for x86_64 transition page tables separately"
| * be9e230281 sch_ets: make est_qlen_notify() idempotent
| * 83fb922d06 sch_qfq: make qfq_qlen_notify() idempotent
| * 0475c85426 sch_hfsc: make hfsc_qlen_notify() idempotent
| * 0e59ce6cf3 sch_drr: make drr_qlen_notify() idempotent
| * 73cf6af131 sch_htb: make htb_qlen_notify() idempotent
| * 85bb073b89 PCI: imx6: Skip controller_id generation logic for i.MX7D
| * 8dcd498116 md: move initialization and destruction of 'io_acct_set' to md.c
| * 01b8322147 net: vertexcom: mse102x: Fix RX error handling
| * 7bdc90cf92 net: vertexcom: mse102x: Add range check for CMD_RTS
| * 9e951979ef net: vertexcom: mse102x: Fix LEN_MASK
| * 53b6b3614d net: vertexcom: mse102x: Fix possible stuck of SPI interrupt
| * 2735065ac6 net: hns3: defer calling ptp_clock_register()
| * de5ad4dbec net: hns3: fixed debugfs tm_qset size
| * 9137a78d0b net: hns3: fix an interrupt residual problem
| * e15d00593d net: hns3: store rx VLAN tag offload state for VF
| * 328e124da6 net: fec: ERR007885 Workaround for conventional TX
| * a0e0efbabb net: lan743x: Fix memleak issue when GSO enabled
| * 44c3f30c8e nvme-tcp: fix premature queue removal and I/O failover
| * 2922716d94 bnxt_en: Fix ethtool -d byte order for 32-bit values
| * 43292b8342 bnxt_en: Fix out-of-bound memcpy() during ethtool -w
| * b1c2b19dcc bnxt_en: Fix coredump logic to free allocated buffer
| * 68bfb59b3c net: ipv6: fix UDPv6 GSO segmentation with NAT
| * f57fd07d7c net: dsa: felix: fix broken taprio gate states after clock jump
| * 9f9c9d1c08 net: dlink: Correct endianness handling of led_mode
| * 0561f2e374 ice: Check VF VSI Pointer Value in ice_vc_add_fdir_fltr()
| * 0aa23e0856 net_sched: qfq: Fix double list add in class with netem as child qdisc
| * 9efb6a0fa8 net_sched: ets: Fix double list add in class with netem as child qdisc
| * 8df7d37d62 net_sched: hfsc: Fix a UAF vulnerability in class with netem as child qdisc
| * 4f0ecf50cd net_sched: drr: Fix double list add in class with netem as child qdisc
| * eaf2494138 net: ethernet: mtk-star-emac: rearm interrupts in rx_poll only when advised
| * 94107259f9 net: ethernet: mtk-star-emac: fix spinlock recursion issues on rx/tx poll
| * 4195bd195a net: mscc: ocelot: delete PVID VLAN when readding it as non-PVID
| * 2ab2780146 net: mscc: ocelot: treat 802.1ad tagged traffic as 802.1Q-untagged
| * 901346b673 net/mlx5: E-switch, Fix error handling for enabling roce
| * 455a5261c9 net/mlx5: E-Switch, Initialize MAC Address for Default GID
| * 2d4a121296 vxlan: vnifilter: Fix unlocked deletion of default FDB entry
| * 93d646911b wifi: plfxlc: Remove erroneous assert in plfxlc_mac_release
| * 92b0c8414c ASoC: soc-pcm: Fix hw_params() and DAPM widget sequence
| * a99f5bf4f7 dm-bufio: don't schedule in atomic context
| * 93eeb6df16 KVM: x86: Load DR6 with guest value only before entering .vcpu_run() loop
| * 227bda0fd0 xfs: restrict when we try to align cow fork delalloc to cowextsz hints
| * 6724a3faa8 xfs: allow unlinked symlinks and dirs with zero size
| * df403c882f xfs: fix freeing speculative preallocations for preallocated files
| * 9e1ad0875e xfs: make sure sb_fdblocks is non-negative
| * 80d3d1e7a2 xfs: allow symlinks with short remote targets
| * 251af3b8c1 xfs: convert delayed extents to unwritten when zeroing post eof blocks
| * 9ae4afcb9f xfs: make xfs_bmapi_convert_delalloc() to allocate the target offset
| * b4dbf90564 xfs: make the seq argument to xfs_bmapi_convert_delalloc() optional
| * 0e2fcf273b xfs: match lock mode in xfs_buffered_write_iomap_begin()
| * 7bfa86d204 xfs: revert commit 44af6c7e59
| * b359d2ee93 xfs: validate recovered name buffers when recovering xattr items
| * d6f7f0ddc4 xfs: check opcode and iovec count match in xlog_recover_attri_commit_pass2
| * 3a97d267fd xfs: require XFS_SB_FEAT_INCOMPAT_LOG_XATTRS for attr log intent item recovery
| * 2edfd2c87c xfs: remove a racy if_bytes check in xfs_reflink_end_cow_extent
| * 1e2a60807f xfs: fix xfs_bmap_add_extent_delay_real for partial conversions
| * ddbfb6adb0 xfs: fix error returns from xfs_bmapi_write
| * 441021e5b3 tracing: Fix oob write in trace_seq_to_buffer()
| * 15888cd413 cpufreq: Fix setting policy limits when frequency tables are used
| * 681400579b cpufreq: Avoid using inconsistent policy->min and policy->max
| * e34a33d5d7 ksmbd: fix use-after-free in kerberos authentication
| * cf443f3145 platform/x86/intel-uncore-freq: Fix missing uncore sysfs during CPU hotplug
| * 810947bfbb iommu/vt-d: Apply quirk_iommu_igfx for 8086:0044 (QM57/QS57)
| * c3f37faa71 iommu/amd: Fix potential buffer overflow in parse_ivrs_acpihid
| * 2dd9448441 dm: always update the array size in realloc_argv on success
| * 12351db6c3 dm-integrity: fix a warning on invalid table line
| * 524b70441b wifi: brcm80211: fmac: Add error handling for brcmf_usb_dl_writeimage()
| * 3eaa5e3630 mmc: renesas_sdhi: Fix error handling in renesas_sdhi_probe
| * 45aced97f0 irqchip/qcom-mpm: Prevent crash when trying to handle non-wake GPIOs
| * bdabd4ee04 amd-xgbe: Fix to ensure dependent features are toggled with RX checksum offload
| * 160153cf9e perf/x86/intel: KVM: Mask PEBS_ENABLE loaded for guest with vCPU's value.
| * 6c639af49e parisc: Fix double SIGFPE crash
| * 446289b8b3 arm64: errata: Add missing sentinels to Spectre-BHB MIDR arrays
| * b36749bb27 i2c: imx-lpi2c: Fix clock count when probe defers
| * a62780b542 EDAC/altera: Set DDR and SDMMC interrupt mask before registration
| * 1705059287 EDAC/altera: Test the correct error reg offset
| * 47ca11836c drm/nouveau: Fix WARN_ON in nouveau_fence_context_kill()
| * 6649a1dbcd ALSA: usb-audio: Add second USB ID for Jabra Evolve 65 headset
| * 3cdbf62209 Revert "rndis_host: Flag RNDIS modems as WWAN devices"
* | a70a8dc18f Merge 6.1.137 into android14-6.1-lts
|\|
| * ac7079a42e Linux 6.1.137
| * 8b4c07bb51 LoongArch: Fix build error due to backport
* | 3b32124339 ANDROID: GKI: Add bpf_redirect_info to virtual_device symbol list.
* | 6751b87143 ANDROID: GKI: fix up crc issue in crypto_get_default_null_skcipher()
* | 0b32b5b8c1 Revert "module: sign with sha512 instead of sha1 by default"
* | e63ea17387 Merge 6.1.136 into android14-6.1-lts
|\|
| * b6736e0375 Linux 6.1.136
| * 715b345153 objtool: Silence more KCOV warnings, part 2
| * cfe7fd06a1 ASoC: qcom: q6afe-dai: fix Display Port Playback stream name
| * fbf45385e3 PCI: Fix use-after-free in pci_bus_release_domain_nr()
| * 353e182012 tracing: Remove pointer (asterisk) and brackets from cpumask_t field
| * c8cbb6179c phy: freescale: imx8m-pcie: Add one missing error return
| * fc053d2df4 phy: freescale: imx8m-pcie: Do CMN_RST just before PHY PLL lock check
| * 1a9e5875c5 nvme: fixup scan failure for non-ANA multipath controllers
| * 48600cbc4b MIPS: cm: Fix warning if MIPS_CM is disabled
| * ae43d74d45 xdp: Reset bpf_redirect_info before running a xdp's BPF prog.
| * 3aaca46e8f net: dsa: mv88e6xxx: enable STU methods for 6320 family
| * 503d67b31c net: dsa: mv88e6xxx: enable .port_set_policy() for 6320 family
| * 9ff467ae32 net: dsa: mv88e6xxx: enable PVT for 6321 switch
| * dc6b55cfe7 net: dsa: mv88e6xxx: fix atu_move_port_mask for 6341 family
| * e873e8f7d0 net/sched: act_mirred: don't override retval if we already lost the skb
| * 4f9f61598b crypto: atmel-sha204a - Set hwrng quality to lowest possible
| * 3a57f45b91 comedi: jr3_pci: Fix synchronous deletion of timer
| * 63d956acbf jfs: define xtree root and page independently
| * 5d59fd637a of: module: add buffer overflow check in of_modalias()
| * 2fea0d6d7b spi: spi-imx: Add check for spi_imx_setupxfer()
| * fc9629651b md/raid1: Add check for missing source disk in process_checks()
| * 61b36bdc70 ubsan: Fix panic from test_ubsan_out_of_bounds
| * af1c735e21 spi: tegra210-quad: add rate limiting and simplify timeout error message
| * 009847bd69 spi: tegra210-quad: use WARN_ON_ONCE instead of WARN_ON for timeouts
| * 342a5dfc21 loop: aio inherit the ioprio of original request
| * ddc9ef51bc x86/i8253: Call clockevent_i8253_disable() with interrupts disabled
| * 30e482dfb8 scsi: pm80xx: Set phy_attached to zero when device is gone
| * dae1e15fcc scsi: ufs: exynos: Ensure pre_link() executes before exynos_ufs_phy_init()
| * 9e3014d786 scsi: hisi_sas: Fix I/O errors caused by hardware port ID changes
| * 39ebdc2d51 ext4: make block validity check resistent to sb bh corruption
| * 0c2aea3235 nvmet-fc: put ref when assoc->del_work is already scheduled
| * b7f235cb88 nvmet-fc: take tgtport reference only once
| * 2184c42971 x86/bugs: Don't fill RSB on context switch with eIBRS
| * 3b2efa5695 x86/bugs: Don't fill RSB on VMEXIT with eIBRS+retpoline
| * 14b1cbf034 x86/bugs: Use SBPB in write_ibpb() if applicable
| * 6c94a16ba2 selftests/mincore: Allow read-ahead pages to reach the end of the file
| * 4aebc6708c objtool: Stop UNRET validation on UD2
| * 498027367f nvme: re-read ANA log page after ns scan completes
| * 510ba30dd3 ACPI PPTT: Fix coding mistakes in a couple of sizeof() calls
| * d4444abc19 ACPI: EC: Set ec_no_wakeup for Lenovo Go S
| * 2fbd0e1930 nvme: requeue namespace scan on missed AENs
| * e9f8bfb80e xen: Change xen-acpi-processor dom0 dependency
| * 9ce224eb5a selftests: ublk: fix test_stripe_04
| * 3f6c9d66e0 udmabuf: fix a buf size overflow issue during udmabuf creation
| * b16d315a18 KVM: s390: Don't use %pK through tracepoints
| * dcd21345eb sched/isolation: Make CONFIG_CPU_ISOLATION depend on CONFIG_SMP
| * b22fac54c5 rtc: pcf85063: do a SW reset if POR failed
| * 468ff4a7c6 9p/net: fix improper handling of bogus negative read/write replies
| * 43b498a845 ntb_hw_amd: Add NTB PCI ID for new gen CPU
| * 763bf67ed3 ntb: reduce stack usage in idt_scan_mws
| * 545defa656 qibfs: fix _another_ leak
| * f93a840d4b objtool, lkdtm: Obfuscate the do_nothing() pointer
| * 4e57e330fb objtool, ASoC: codecs: wcd934x: Remove potential undefined behavior in wcd934x_slim_irq_handler()
| * 5f9385723a objtool: Silence more KCOV warnings
| * bc49c5103e thunderbolt: Scan retimers after device router has been enumerated
| * 7e8f1dbf9b usb: host: xhci-plat: mvebu: use ->quirks instead of ->init_quirk() func
| * 36d6815171 usb: gadget: aspeed: Add NULL pointer check in ast_vhub_init_dev()
| * 9e7bcd1e2b usb: xhci: Avoid Stop Endpoint retry loop if the endpoint seems Running
| * d9a60dd67b dmaengine: dmatest: Fix dmatest waiting less when interrupted
| * 54c7b864fb sound/virtio: Fix cancel_sync warnings on uninitialized work_structs
| * c2902e8abc usb: dwc3: gadget: Avoid using reserved endpoints on Intel Merrifield
| * a7a27cf25b usb: dwc3: gadget: Refactor loop to avoid NULL endpoints
| * 609c9ea787 fs/ntfs3: Fix WARNING in ntfs_extend_initialized_size
| * 27b12b5878 usb: host: max3421-hcd: Add missing spi_device_id table
| * 57089df327 s390/tty: Fix a potential memory leak bug
| * 397254706e s390/sclp: Add check for get_zeroed_page()
| * d0db2eb990 parisc: PDT: Fix missing prototype warning
| * 2236d765a3 clk: check for disabled clock-provider in of_clk_get_hw_from_clkspec()
| * 255cbc9db7 bpf: Fix deadlock between rcu_tasks_trace and event_mutex.
| * e27244cbe1 crypto: null - Use spin lock instead of mutex
| * aba9e3096b MIPS: cm: Detect CM quirks from device tree
| * ba9bf51801 pinctrl: renesas: rza2: Fix potential NULL pointer dereference
| * 64ebb33768 USB: wdm: add annotation
| * e0917befd1 USB: wdm: wdm_wwan_port_tx_complete mutex in atomic context
| * 217fe1fc7d USB: wdm: close race between wdm_open and wdm_wwan_port_stop
| * 15a7f14737 USB: wdm: handle IO errors in wdm_wwan_port_start
| * 6b607ae3f4 USB: VLI disk crashes if LPM is used
| * 219716ce07 usb: quirks: Add delay init quirk for SanDisk 3.2Gen1 Flash Drive
| * a408b8043a usb: quirks: add DELAY_INIT quirk for Silicon Motion Flash Drive
| * 07b491b601 usb: dwc3: xilinx: Prevent spike in reset signal
| * a445470152 usb: dwc3: gadget: check that event count does not exceed event buffer length
| * 8b4b7ad42a USB: OHCI: Add quirk for LS7A OHCI controller (rev 0x02)
| * df727eba55 usb: chipidea: ci_hdrc_imx: implement usb_phy_init() error handling
| * d2daafc3f0 usb: chipidea: ci_hdrc_imx: fix call balance of regulator routines
| * 0ee460498c usb: chipidea: ci_hdrc_imx: fix usbmisc handling
| * c27db84ed4 usb: cdns3: Fix deadlock when using NCM gadget
| * 0a8f200a1a USB: serial: simple: add OWON HDS200 series oscilloscope support
| * a5d0eaa074 USB: serial: option: add Sierra Wireless EM9291
| * acb866379e USB: serial: ftdi_sio: add support for Abacus Electrics Optical Probe
| * fd93c803f2 serial: sifive: lock port in startup()/shutdown() callbacks
| * 1adf7a1165 serial: msm: Configure correct working mode before starting earlycon
| * 4d43b7091e misc: microchip: pci1xxxx: Fix incorrect IRQ status handling during ack
| * 1263d5f581 misc: microchip: pci1xxxx: Fix Kernel panic during IRQ handler registration
| * 023816bd5f KVM: x86: Reset IRTE to host control if *new* route isn't postable
| * 38cfa866b7 KVM: x86: Explicitly treat routing entry type changes as changes
| * 05a5c6b0e8 mei: me: add panther lake H DID
| * 90757407ca USB: storage: quirk for ADATA Portable HDD CH94
| * c5b8a549ef mcb: fix a double free bug in chameleon_parse_gdd()
| * f46d889308 KVM: SVM: Allocate IR data using atomic allocation
| * 5d4636859a LoongArch: Remove a bogus reference to ZONE_DMA
| * 3425680572 LoongArch: Return NULL from huge_pte_offset() for invalid PMD
| * 128d261c72 drm/amd/display: Force full update in gpu reset
| * a4be735fe0 drm/amd/display: Fix gpu reset in multidisplay config
| * 24023ed8ff net: selftests: initialize TCP header and skb payload with zero
| * 5b83d30c63 xen-netfront: handle NULL returned by xdp_convert_buff_to_frame()
| * baa332e22f virtio_console: fix missing byte order handling for cols and rows
| * 4e8ce3978d wifi: rtw88: use ieee80211_purge_tx_queue() to purge TX skb
| * ff5a5dae30 wifi: mac80211: export ieee80211_purge_tx_queue() for drivers
| * 4e773aea05 LoongArch: Make regs_irqs_disabled() more clear
| * da3170fea4 LoongArch: Select ARCH_USE_MEMTEST
| * ecb3f8f890 perf/x86: Fix non-sampling (counting) events on certain x86 platforms
| * 9e75c93472 iommu/amd: Return an error if vCPU affinity is set for non-vCPU IRTE
| * 11bccb054c net_sched: hfsc: Fix a potential UAF in hfsc_dequeue() too
| * 20d584a33e net_sched: hfsc: Fix a UAF vulnerability in class handling
| * e79e8e05aa tipc: fix NULL pointer dereference in tipc_mon_reinit_self()
| * f41f097f68 net: phy: leds: fix memory leak
| * ceceff6d31 net: lwtunnel: disable BHs when required
| * 790bad9dc2 scsi: core: Clear flags for scsi_cmnd that did not complete
| * fd18210acb btrfs: avoid page_lockend underflow in btrfs_punch_hole_lock_range()
| * a252684ea1 cpufreq: cppc: Fix invalid return value in .get() callback
| * da8ee91e53 cpufreq: scpi: Fix null-ptr-deref in scpi_cpufreq_get_rate()
| * f9c5423855 cpufreq: scmi: Fix null-ptr-deref in scmi_cpufreq_get_rate()
| * 4bf6d7defb dma/contiguous: avoid warning about unused size_bytes
| * 19cc82616b selftests/mm: generate a temporary mountpoint for cgroup filesystem
| * d78888853e ASoC: qcom: Fix sc7280 lpass potential buffer overflow
| * 20ecb510d4 ASoC: qcom: q6dsp: add support to more display ports
| * 11f56f5a25 phy: freescale: imx8m-pcie: assert phy reset and perst in power off
| * cf0fbe3e9b phy: freescale: imx8m-pcie: Add i.MX8MP PCIe PHY support
| * b783478e0c PCI: Fix reference leak in pci_register_host_bridge()
| * ead4d69b3e PCI: Assign PCI domain IDs by ida_alloc()
| * 9c32eaf8e4 of: resolver: Fix device node refcount leakage in of_resolve_phandles()
| * fc7e57c56d of: resolver: Simplify of_resolve_phandles() using __free()
| * b7f5964d03 clk: renesas: r9a07g043: Fix HP clock source for RZ/Five
| * 5053ee6f8d clk: renesas: r9a07g04[34]: Fix typo for sel_shdi variable
| * 8213d3a61f clk: renesas: r9a07g04[34]: Use SEL_SDHI1_STS status configuration for SD1 mux
| * 50563380f7 clk: renesas: rzg2l: Refactor SD mux driver
| * 94c31387f6 clk: renesas: rzg2l: Remove CPG_SDHI_DSEL from generic header
| * 0b78075a9c clk: renesas: rzg2l: Add struct clk_hw_data
| * a70a0ac48b clk: renesas: rzg2l: Use u32 for flag and mux_flags
| * b447885ec9 backlight: led_bl: Hold led_access lock when calling led_sysfs_disable()
| * c5a9d6c54d backlight: led_bl: Convert to platform remove callback returning void
| * 11f724853e iio: adc: ad7768-1: Fix conversion result sign
| * c13b7cacbc iio: adc: ad7768-1: Move setting of val a bit later to avoid unnecessary return value check
| * c239afce68 net: dsa: mv88e6xxx: fix VTU methods for 6320 family
| * 58c14a5e2a net: dsa: mv88e6xxx: fix internal PHYs for 6320 family
| * 4db3e956ca net: dsa: mv88e6xxx: add field to specify internal phys layout
| * 7cdba14d75 net: dsa: mv88e6xxx: pass directly chip structure to mv88e6xxx_phy_is_internal
| * 3edbf0fd90 net: dsa: mv88e6xxx: move link forcing to mac_prepare/mac_finish
| * f27b1e1fd3 net: dsa: add support for mac_prepare() and mac_finish() calls
| * 9369d414ee net: dsa: mv88e6xxx: don't dispose of Global2 IRQ mappings from mdiobus code
| * 0882b47507 auxdisplay: hd44780: Fix an API misuse in hd44780.c
| * 4b9c5e6e89 auxdisplay: hd44780: Convert to platform remove callback returning void
| * 6854c87ac8 tracing: Verify event formats that have "%*p.."
| * 480b9fc4b2 tracing: Add __print_dynamic_array() helper
| * 247feaa174 tracing: Add __string_len() example
| * 41abc05ab8 tracing: Fix cpumask() example typo
| * 3c8a30f95b tracing: Add __cpumask to denote a trace event field that is a cpumask_t
| * 7c2f874c63 module: sign with sha512 instead of sha1 by default
* | ae9d2e99d9 Merge 6.1.135 into android14-6.1-lts
|\|
| * 535ec20c50 Linux 6.1.135
| * ed4125569b ALSA: hda/realtek: Fix built-in mic on another ASUS VivoBook model
| * ca9f84de76 md: fix mddev uaf while iterating all_mddevs list
| * bf1dc50bd5 md: factor out a helper from mddev_put()
| * 92f0f21b9a MIPS: ds1287: Match ds1287_set_base_clock() function types
| * d268e58918 MIPS: cevt-ds1287: Add missing ds1287.h include
| * 0dde1e38fb MIPS: dec: Declare which_prom() as static
* | fcf8d4d8b3 Merge f331105699 ("sign-file,extract-cert: use pkcs11 provider for OPENSSL MAJOR >= 3") into android14-6.1-lts
|\|
| * f331105699 sign-file,extract-cert: use pkcs11 provider for OPENSSL MAJOR >= 3
| * 6e3319a2e0 sign-file,extract-cert: avoid using deprecated ERR_get_error_line()
| * 3437e90d15 sign-file,extract-cert: move common SSL helper functions to a header
* | 816b54a70d Revert "blk-cgroup: support to track if policy is online"
* | 44fe4b43e9 Revert "blk-iocost: do not WARN if iocg was already offlined"
* | ac80043d0f Revert "bpf: Prevent tail call between progs attached to different hooks"
* | 92d048684a Merge 16c54d6a49 ("mm: fix apply_to_existing_page_range()") into android14-6.1-lts
|\|
| * 16c54d6a49 mm: fix apply_to_existing_page_range()
| * aed0aac18f blk-iocost: do not WARN if iocg was already offlined
| * 3154d64ff9 blk-cgroup: support to track if policy is online
| * d9a807fb7c bpf: Prevent tail call between progs attached to different hooks
| * 4759acbd44 bpf: avoid holding freeze_mutex during mmap operation
| * 282d1aa225 btrfs: fix the length of reserved qgroup to free
| * 7d8bb979f6 cifs: use origin fullpath for automounts
| * ec28c35029 smb/server: fix potential null-ptr-deref of lease_ctx_info in smb2_open()
| * f27602b638 nvmet-fc: Remove unused functions
| * e37eabef53 Revert "LoongArch: BPF: Fix off-by-one error in build_prologue()"
| * b66bc16f4c landlock: Add the errata interface
| * 13080d052c drm/amd/display: Stop amdgpu_dm initialize when link nums greater than max_links
| * 615c8f70be Revert "Xen/swiotlb: mark xen_swiotlb_fixup() __init"
| * eec34d7d14 btrfs: zoned: fix zone finishing with missing devices
| * 4aecf1c211 btrfs: zoned: fix zone activation with missing devices
| * 159f0f61b2 btrfs: fix qgroup reserve leaks in cow_file_range
| * 2a07aea0ac LoongArch: Eliminate superfluous get_numa_distances_cnt()
| * b137af7953 powerpc/rtas: Prevent Spectre v1 gadget construction in sys_rtas()
| * 32e3456454 x86/pvh: Call C code via the kernel virtual mapping
| * 8dfff85d5d x86/split_lock: Fix the delayed detection logic
| * edde34b792 mm: Fix is_zero_page() usage in try_grab_page()
| * 13beac8e96 misc: pci_endpoint_test: Fix 'irq_type' to convey the correct type
| * 53f4df92a8 misc: pci_endpoint_test: Fix displaying 'irq_type' after 'request_irq' error
| * 9d5118b107 misc: pci_endpoint_test: Avoid issue of interrupts remaining after request_irq error
| * 6cc2c355aa mptcp: sockopt: fix getting freebind & transparent
| * 89e1132bbf media: mediatek: vcodec: mark vdec_vp9_slice_map_counts_eob_coef noinline
| * b3c789419f kbuild: Add '-fno-builtin-wcslen'
| * 0bf87fafc1 cpufreq: Reference count policy in cpufreq_update_limits()
* | 3ba386dd55 Merge 17c7f46efb ("KVM: arm64: Eagerly switch ZCR_EL{1,2}") into android14-6.1-lts
|\|
| * 17c7f46efb KVM: arm64: Eagerly switch ZCR_EL{1,2}
| * bde20e154a KVM: arm64: Calculate cptr_el2 traps on activating traps
| * 0ff8c9a71e KVM: arm64: Mark some header functions as inline
| * 60d55eb282 KVM: arm64: Refactor exit handlers
| * 6648fef8ff KVM: arm64: Remove VHE host restore of CPACR_EL1.SMEN
| * 9f2386b273 KVM: arm64: Remove VHE host restore of CPACR_EL1.ZEN
| * a539ca5c23 KVM: arm64: Remove host FPSIMD saving for non-protected KVM
| * 04c50cc23a KVM: arm64: Unconditionally save+flush host FPSIMD/SVE/SME state
| * 2fb8365017 arm64/fpsimd: Stop using TIF_SVE to manage register saving in KVM
| * 254fe3a162 arm64/fpsimd: Have KVM explicitly say which FP registers to save
| * 312024dc1b arm64/fpsimd: Track the saved FPSIMD state type separately to TIF_SVE
| * d5f7d3833b KVM: arm64: Discard any SVE state when entering KVM guests
* | d46f37d6c7 Merge dc7bdc1f2d ("io_uring/net: fix accept multishot handling") into android14-6.1-lts
|\|
| * dc7bdc1f2d io_uring/net: fix accept multishot handling
| * b8acdc413f drm/i915/gvt: fix unterminated-string-initialization warning
| * 4e4bd92623 drm/sti: remove duplicate object names
| * 12b038d521 drm/nouveau: prime: fix ttm_bo_delayed_delete oops
| * 6785702f4a drm/amdgpu/dma_buf: fix page_link check
| * ffd6888044 drm/amd/pm/powerplay/hwmgr/vega20_thermal: Prevent division by zero
| * 8f7b5987e2 drm/amd/pm/swsmu/smu13/smu_v13_0: Prevent division by zero
| * 5fc4fb54f6 drm/amd/pm/powerplay/hwmgr/smu7_thermal: Prevent division by zero
| * de6f8e0534 drm/amd/pm/smu11: Prevent division by zero
| * 836a189fb4 drm/amd/pm/powerplay: Prevent division by zero
| * 402964994e drm/amd/pm: Prevent division by zero
| * c812997534 drm/amd: Handle being compiled without SI or CIK support better
| * db783adae1 drm/msm/a6xx: Fix stale rpmh votes from GPU
| * 3ba56fc34f drm/repaper: fix integer overflows in repeat functions
| * 59f3925c3f perf/x86/intel/uncore: Fix the scale of IIO free running counters on SPR
| * 96b2982f12 perf/x86/intel/uncore: Fix the scale of IIO free running counters on ICX
| * 8a809a8bcb perf/x86/intel/uncore: Fix the scale of IIO free running counters on SNR
| * 311b205fa9 perf/x86/intel: Allow to update user space GPRs from PEBS records
| * 51003b2c87 RDMA/cma: Fix workqueue crash in cma_netevent_work_handler
| * 3ddca18534 scsi: ufs: exynos: Ensure consistent phy reference counts
| * e72c35de50 scsi: megaraid_sas: Block zero-length ATA VPD inquiry
| * 599d1e2a6a virtiofs: add filesystem context source name check
| * b4a9e164dd tracing: Fix filter string testing
| * b04eaa8de3 string: Add load_unaligned_zeropad() code path to sized_strscpy()
| * 220f0fd6ac smb3 client: fix open hardlink on deferred close file error
| * 0f5de9dee5 riscv: Avoid fortify warning in syscall_get_arguments()
| * 44079e544c ksmbd: fix the warning from __kernel_write_iter
| * 817fbb8957 ksmbd: Prevent integer overflow in calculation of deadtime
| * d5b554bc8d ksmbd: Fix dangling pointer in krb_authenticate
| * f95a2ec3ec mm: fix filemap_get_folios_contig returning batches of identical folios
| * a6e7f6018d mm/gup: fix wrongly calculated returned value in fault_in_safe_writeable()
| * 5cdc985c41 loop: LOOP_SET_FD: send uevents for partitions
| * df5118fd61 loop: properly send KOBJ_CHANGED uevent for disk device
| * 0fdafdaef7 isofs: Prevent the use of too small fid
| * 3090cad5cc i2c: cros-ec-tunnel: defer probe if parent EC is not present
* | b918f051e3 Revert "arm64: errata: Add newer ARM cores to the spectre_bhb_loop_affected() lists"
* | e106f14940 Merge 0296f97335 ("hfs/hfsplus: fix slab-out-of-bounds in hfs_bnode_read_key") into android14-6.1-lts
|\|
| * 0296f97335 hfs/hfsplus: fix slab-out-of-bounds in hfs_bnode_read_key
| * e9b5d6e1bd crypto: caam/qi - Fix drv_ctx refcount bug
| * 9734612bd8 btrfs: correctly escape subvol in btrfs_show_options()
| * ba903539ff nfsd: decrease sc_count directly if fail to queue dl_recall
| * 3a47d1e8ef nfs: add missing selections of CONFIG_CRC32
| * 5ed9e05f59 nfs: move nfs_fhandle_hash to common include file
| * 943fe13970 asus-laptop: Fix an uninitialized variable
| * 8ba70a72f5 ASoC: codecs:lpass-wsa-macro: Fix logic of enabling vi channels
| * 96c93b30e1 ASoC: codecs:lpass-wsa-macro: Fix vi feedback rate
| * 94515f5fc0 Revert "PCI: Avoid reset when disabled via sysfs"
| * b4df8b74bd writeback: fix false warning in inode_to_wb()
| * 0819b7c062 cpufreq/sched: Fix the usage of CPUFREQ_NEED_UPDATE_LIMITS
| * 6a088c7d50 riscv: KGDB: Remove ".option norvc/.option rvc" for kgdb_compiled_break
| * 0047bf9bda riscv: KGDB: Do not inline arch_kgdb_breakpoint()
| * b23e67fac7 riscv: Properly export reserved regions in /proc/iomem
| * a6cb881e21 ptp: ocp: fix start time alignment in ptp_ocp_signal_set
| * 343246e469 net: dsa: avoid refcount warnings when ds->ops->tag_8021q_vlan_del() fails
| * 35cde75c08 net: dsa: mv88e6xxx: fix -ENOENT when deleting VLANs and MST is unsupported
| * b3c70dfe51 net: dsa: mv88e6xxx: avoid unregistering devlink regions which were never registered
| * f06b5b4225 net: bridge: switchdev: do not notify new brentries as changed
| * 464f78d35f net: b53: enable BPDU reception for management port
| * fa2d770895 cxgb4: fix memory leak in cxgb4_init_ethtool_filters() error path
| * 1489c195c8 net: openvswitch: fix nested key length validation in the set() action
| * b9764ebebb net: mctp: Set SOCK_RCU_FREE
| * d8a632fbc7 test suite: use %zu to print size_t
| * eac3413518 igc: cleanup PTP module if probe fails
| * 81e25321c6 igc: handle the IGC_PTP_ENABLED flag correctly
| * cfeeec7c5e igc: move ktime snapshot into PTM retry loop
| * 0c03e4fbe1 igc: fix PTM cycle trigger logic
| * e4cab92aca Revert "wifi: mac80211: Update skb's control block key in ieee80211_tx_dequeue()"
| * c6d527bbd3 Bluetooth: l2cap: Check encryption key size on incoming connection
| * d844181869 Bluetooth: btrtl: Prevent potential NULL dereference
| * d54bc626c8 Bluetooth: hci_event: Fix sending MGMT_EV_DEVICE_FOUND for invalid address
| * 6c588e9afb RDMA/core: Silence oversized kvmalloc() warning
| * 883ca52730 RDMA/hns: Fix wrong maximum DMA segment size
| * 837af21fd3 RDMA/usnic: Fix passing zero to PTR_ERR in usnic_ib_pci_probe()
| * 065f4b1cd4 md/md-bitmap: fix stats collection for external bitmaps
| * 4a05f7ae33 md/raid10: fix missing discard IO accounting
| * 3943754c69 scsi: iscsi: Fix missing scsi_host_put() in error path
| * 8fd4b9551a wifi: wl1251: fix memory leak in wl1251_tx_work
| * 5f6863dc40 wifi: mac80211: Purge vif txq in ieee80211_do_stop()
| * a167a2833d wifi: mac80211: Update skb's control block key in ieee80211_tx_dequeue()
| * 5e7df74745 wifi: at76c50x: fix use after free access in at76_disconnect
| * 1ac5eb4aa2 scsi: hisi_sas: Enable force phy when SATA disk directly connected
| * d58493832e HSI: ssi_protocol: Fix use after free vulnerability in ssi_protocol Driver Due to Race Condition
| * 80f14e9de6 Bluetooth: hci_uart: Fix another race during initialization
| * 8a1b01b7f6 x86/e820: Fix handling of subpage regions when calculating nosave ranges in e820__register_nosave_regions()
| * 6dd04ebe2b ACPI: platform-profile: Fix CFI violation when accessing sysfs files
| * a53b3599d9 arm64: errata: Add newer ARM cores to the spectre_bhb_loop_affected() lists
* | 4f3eb66089 Merge 47b445fc79 ("selftests: mptcp: close fd_in before returning in main_loop") into android14-6.1-lts
|\|
| * 47b445fc79 selftests: mptcp: close fd_in before returning in main_loop
* | 8d8b1f0393 Merge 696198f89a ("pinctrl: qcom: Clear latched interrupt status when changing IRQ type") into android14-6.1-lts
|\|
| * 696198f89a pinctrl: qcom: Clear latched interrupt status when changing IRQ type
| * eb602e8c4e PCI: Fix reference leak in pci_alloc_child_bus()
| * 210f00e9b5 PCI: brcmstb: Fix missing of_node_put() in brcm_pcie_probe()
| * c467dbd5f1 of/irq: Fix device node refcount leakages in of_irq_init()
| * 338f7aa649 of/irq: Fix device node refcount leakage in API irq_of_parse_and_map()
| * 78d928bd60 of/irq: Fix device node refcount leakages in of_irq_count()
| * b84b58ae4f of/irq: Fix device node refcount leakage in API of_irq_parse_raw()
| * ceb4266a78 of/irq: Fix device node refcount leakage in API of_irq_parse_one()
| * fbb0967846 ntb: use 64-bit arithmetic for the MSI doorbell mask
| * 0357c8406d KVM: x86: Acquire SRCU in KVM_GET_MP_STATE to protect guest memory accesses
| * 3d4aa02359 gve: handle overflow when reporting TX consumed descriptors
| * bcfb1e4eb0 gpio: zynq: Fix wakeup source leaks on device unbind
| * 5b3cc7e03c gpio: tegra186: fix resource handling in ACPI probe path
| * 8dd7d72803 ftrace: Add cond_resched() to ftrace_graph_set_hash()
| * 3e070367ff dm-verity: fix prefetch-vs-suspend race
| * 5162ecc2d9 dm-integrity: set ti->error on memory allocation failure
| * e89228ddd5 dm-ebs: fix prefetch-vs-suspend race
| * 0642f87cbf crypto: ccp - Fix check for the primary ASP device
| * 8b75a7c1e4 clk: qcom: gdsc: Set retain_ff before moving to HW CTRL
| * c0322b7635 clk: qcom: gdsc: Capture pm_genpd_add_subdomain result code
| * 62d14a1d2e clk: qcom: gdsc: Release pm subdomains in reverse add order
| * 3db0ca61cb cifs: fix integer overflow in match_server()
| * b2a1833e1c cifs: avoid NULL pointer dereference in dbg call
| * ad756ecd45 thermal/drivers/rockchip: Add missing rk3328 mapping entry
| * 7a63f4fb0e sctp: detect and prevent references to a freed transport in sendmsg
| * 974193e137 mm/hwpoison: do not send SIGBUS to processes with recovered clean pages
| * 45970be1f0 mm: add missing release barrier on PGDAT_RECLAIM_LOCKED unlock
| * aa82be5125 mm/rmap: reject hugetlb folios in folio_make_device_exclusive()
| * 36106d1c27 sparc/mm: disable preemption in lazy mmu mode
| * 6eef9c02b6 btrfs: fix non-empty delayed iputs list on unmount due to compressed write workers
| * 11a99abdda arm64: dts: mediatek: mt8173: Fix disp-pwm compatible string
| * f4c4bb9eb3 arm64: mm: Correct the update of max_pfn
| * a84cbabf06 mtd: rawnand: Add status chack in r852_ready()
| * 6af3b92b1c mtd: inftlcore: Add error check for inftl_read_oob()
| * 1c20a592a1 mptcp: only inc MPJoinAckHMacFailure for HMAC failures
| * 855bf0aacd mptcp: fix NULL pointer in can_accept_new_subflow
| * becd8185b5 lib: scatterlist: fix sg_split_phys to preserve original scatterlist offsets
| * a9e4bebec6 locking/lockdep: Decrease nr_unused_locks if lock unused in zap_class()
| * 2edb5b29b1 mfd: ene-kb3930: Fix a potential NULL pointer dereference
| * 3b4643ffaf jbd2: remove wrong sb->s_sequence check
| * d83b0c03ef i3c: Add NULL pointer check in i3c_master_queue_ibi()
| * e49341f7a6 i3c: master: svc: Use readsb helper for reading MDB
| * 4e73e1f685 smb311 client: fix missing tcon check when mounting with linux/posix extensions
| * 475b9b45dc soc: samsung: exynos-chipid: Add NULL pointer check in exynos_chipid_probe()
| * d3071c1b7c vdpa/mlx5: Fix oversized null mkey longer than 32bit
| * 35d0aa6db9 ext4: fix off-by-one error in do_split
| * 3e7ecf181c bus: mhi: host: Fix race between unprepare and queue_buf
| * 8a021b7701 ASoC: qdsp6: q6asm-dai: fix q6asm_dai_compr_set_params error path
| * f4b34e1e97 ASoC: qdsp6: q6apm-dai: fix capture pipeline overruns.
| * ad3f29747a ASoC: qdsp6: q6apm-dai: set 10 ms period and buffer alignment.
* | 055c0956b9 Merge be562a7f7f ("io_uring/kbuf: reject zero sized provided buffers") into android14-6.1-lts
|\|
| * be562a7f7f io_uring/kbuf: reject zero sized provided buffers
| * 43736338e3 wifi: mac80211: fix integer overflow in hwmp_route_info_get()
| * 5862c312f5 wifi: mt76: Add check for devm_kstrdup()
| * 58f6dae978 clocksource/drivers/stm32-lptimer: Use wakeup capable instead of init wakeup
| * 7312fc9dde mtd: Replace kcalloc() with devm_kcalloc()
| * 5ad7308011 net: dsa: mv88e6xxx: workaround RGMII transmit delay erratum for 6320 family
| * b279480adc mtd: Add check for devm_kcalloc()
| * 12025f8350 mptcp: sockopt: fix getting IPV6_V6ONLY
| * 0f9a4bab7d media: venus: hfi_parser: refactor hfi packet parsing logic
| * 26bbedd06d media: venus: hfi_parser: add check to avoid out of bound access
| * bb786c8144 media: i2c: ov7251: Introduce 1 ms delay between regulators and en GPIO
| * 2dd2d13c0b media: i2c: ov7251: Set enable GPIO low in probe
| * a32e7319e6 media: i2c: ccs: Set the device's runtime PM status correctly in probe
| * 26ddb187ba media: i2c: ccs: Set the device's runtime PM status correctly in remove
| * dc4620a0d8 media: v4l2-dv-timings: prevent possible overflow in v4l2_detect_gtf()
| * f8b29f2d90 media: platform: stm32: Add check for clk_enable()
| * b31a8ec0d8 media: streamzap: prevent processing IR data on URB failure
| * a3f4d28273 tpm, tpm_tis: Fix timeout handling when waiting for TPM status
| * 9dd161f707 mtd: rawnand: brcmnand: fix PM resume warning
| * 076cce6f50 spi: cadence-qspi: Fix probe on AM62A LP SK
| * 07476e0d93 KVM: arm64: Tear down vGIC on failed vCPU creation
| * 75791c0441 arm64: errata: Add KRYO 2XX/3XX/4XX silver cores to Spectre BHB safe list
| * f2e4ca0c40 arm64: errata: Assume that unknown CPUs _are_ vulnerable to Spectre BHB
| * e03cc3e607 arm64: errata: Add QCOM_KRYO_4XX_GOLD to the spectre_bhb_k24_list
| * 2ab5389f9d arm64: cputype: Add MIDR_CORTEX_A76AE
| * 4b8cf3ca46 xenfs/xensyms: respect hypervisor's "next" indication
| * 2257072fc6 media: siano: Fix error handling in smsdvb_module_init()
| * 455fd2951b media: vim2m: print device name after registering device
| * cf5f7bb4e0 media: venus: hfi: add check to handle incorrect queue size
| * 4e95233af5 media: venus: hfi: add a check to handle OOB in sfr region
| * aaf8d62abe media: i2c: adv748x: Fix test pattern selection mask
| * ac8d33ae62 ext4: don't treat fhandle lookup of ea_inode as FS corruption
| * 08a6459207 bpf: support SKF_NET_OFF and SKF_LL_OFF on skb frags
| * d2134bf402 pwm: fsl-ftm: Handle clk_get_rate() returning 0
| * 52bced4b6c pwm: rcar: Improve register calculation
| * f3e9cf266c pwm: mediatek: Prevent divide-by-zero in pwm_mediatek_config()
| * b79faed289 tpm, tpm_tis: Workaround failed command reception on Infineon devices
| * 1a5b71022e ktest: Fix Test Failures Due to Missing LOG_FILE Directories
| * 660a53a069 fbdev: omapfb: Add 'plane' value check
| * b951cf102f drm/amdgpu: grab an additional reference on the gang fence v2
| * c2968c8123 PCI: vmd: Make vmd_dev::cfg_lock a raw_spinlock_t type
| * 55ef52c30c drm/amdgpu: handle amdgpu_cgs_create_device() errors in amd_powerplay_create()
| * dd686b699b drm/mediatek: mtk_dpi: Explicitly manage TVD clock in power on/off
| * 0003302ff2 drm/mediatek: mtk_dpi: Move the input_2p_en bit to platform data
| * 4262d78491 drm/amdkfd: Fix pqm_destroy_queue race with GPU reset
| * 57c9dabda8 drm/amdkfd: Fix mode1 reset crash issue
| * 82b6aaa867 drm/amdkfd: clamp queue size to minimum
| * 16961e025b drivers: base: devres: Allow to release group on device release
| * 0b67e9c8e7 drm/bridge: panel: forbid initializing a panel with unknown connector type
| * 55bd37d4be drm: panel-orientation-quirks: Add quirk for OneXPlayer Mini (Intel)
| * 2f292d7e28 drm: panel-orientation-quirks: Add new quirk for GPD Win 2
| * e6920a632a drm: panel-orientation-quirks: Add quirk for AYA NEO Slide
| * c7b6d31422 drm: panel-orientation-quirks: Add quirks for AYA NEO Flip DS and KB
| * 0f1abea4a0 drm: panel-orientation-quirks: Add support for AYANEO 2S
* | c80ed510de Merge b2ebe6c3ff ("drm/amd/display: Update Cursor request mode to the beginning prefetch always") into android14-6.1-lts
|\|
| * b2ebe6c3ff drm/amd/display: Update Cursor request mode to the beginning prefetch always
| * b09c25c6b0 drm: allow encoder mode_set even when connectors change for crtc
| * 6e5534f4f9 Bluetooth: qca: simplify WCN399x NVM loading
| * 9cf7dccaa7 Bluetooth: hci_uart: fix race during initialization
| * 1b1828b42f tracing: fix return value in __ftrace_event_enable_disable for TRACE_REG_UNREGISTER
| * 53fb25e90c net: vlan: don't propagate flags on open
| * 31d4365223 wifi: mt76: mt76x2u: add TP-Link TL-WDN6200 ID to device table
| * f746fe0c51 scsi: st: Fix array overflow in st_setup()
| * cf9291a344 ext4: ignore xattrs past end
| * 54f4e64de7 ext4: protect ext4_release_dquot against freezing
| * 4d82ed5801 ahci: add PCI ID for Marvell 88SE9215 SATA Controller
| * 98dbf2af63 f2fs: fix to avoid out-of-bounds access in f2fs_truncate_inode_blocks()
| * 5b4fc3c402 ata: libata-eh: Do not use ATAPI DMA for a device limited to PIO mode
| * a260bf14cd jfs: add sanity check for agwidth in dbMount
| * c9541c2bd0 jfs: Prevent copying of nlink with value 0 from disk inode
| * 55edbf5dbf fs/jfs: Prevent integer overflow in AG size calculation
| * 7307c8a0cc fs/jfs: cast inactags to s64 to prevent potential overflow
| * cab1852368 jfs: Fix uninit-value access of imap allocated in the diMount() function
| * 90e089a645 page_pool: avoid infinite loop to schedule delayed worker
| * 3d1b15f620 f2fs: don't retry IO for corrupted data scenario
| * c9c018678e ASoC: amd: Add DMI quirk for ACP6X mic support
| * 908abfdfdb ALSA: usb-audio: Fix CME quirk for UF series keyboards
| * 2de2827e5c mmc: dw_mmc: add a quirk for accessing 64-bit FIFOs in two halves
| * 4e587fb8b6 ASoC: fsl_audmix: register card device depends on 'dais' property
| * 2bb2136ef5 ALSA: hda: intel: Add Lenovo IdeaPad Z570 to probe denylist
| * 922c542886 ALSA: hda: intel: Fix Optimus when GPU has no sound
| * ddb1478852 HID: pidff: Fix null pointer dereference in pidff_find_fields
| * e916d4587b HID: pidff: Do not send effect envelope if it's empty
| * fbb2f79b3c HID: pidff: Convert infinite length from Linux API to PID standard
| * 72be128730 xen/mcelog: Add __nonstring annotations for unterminated strings
| * 4746f2dd81 arm64: cputype: Add QCOM_CPU_PART_KRYO_3XX_GOLD
| * 36a7a63c39 perf: arm_pmu: Don't disable counter in armpmu_add()
| * 5d2f3d433f x86/cpu: Don't clear X86_FEATURE_LAHF_LM flag in init_amd_k8() on AMD when running in a virtual machine
| * 87b9f0867c pm: cpupower: bench: Prevent NULL dereference on malloc failure
| * eda5865869 umount: Allow superblock owners to force umount
| * 08cf79c786 fs: consistently deref the files table with rcu_dereference_raw()
| * 2f75cb27be iommu/mediatek: Fix NULL pointer deference in mtk_iommu_device_group
| * 4ffb746ece nft_set_pipapo: fix incorrect avx2 match of 5th field octet
| * b78f2b458f net: ppp: Add bound checking for skb data on ppp_sync_txmung
| * a98d0ba2f6 ipv6: Align behavior across nexthops during path selection
| * 1348214fa0 net_sched: sch_sfq: move the limit validation
| * d5108432f0 net_sched: sch_sfq: use a temporary work area for validating configuration
| * b64c8c75c9 nvmet-fcloop: swap list_add_tail arguments
| * 25344c2a95 ata: sata_sx4: Add error handling in pdc20621_i2c_read()
| * ec9faff49a net: ethtool: Don't call .cleanup_data when prepare_data fails
| * f6b84d1cfb tc: Ensure we have enough buffer space when sending filter netlink notifications
| * 3051d6d2d4 net/sched: cls_api: conditional notification of events
| * db5d2b27e4 rtnl: add helper to check if a notification is needed
| * 8ab0c35a95 rtnl: add helper to check if rtnl group has listeners
| * f3ce4d3f87 net: tls: explicitly disallow disconnect
| * 829c49b6b2 codel: remove sch->q.qlen check before qdisc_tree_reduce_backlog()
| * 24e6280cdd tipc: fix memory leak in tipc_link_xmit
| * 2dc53c7a0c ata: pata_pxa: Fix potential NULL pointer dereference in pxa_ata_probe()
| * d4d8662e6e selftests/futex: futex_waitv wouldblock test should fail
* 2b26f9c343 Merge branch 'android14-6.1' into android14-6.1-lts

Change-Id: I1c8bdcd91094e2f166307124d6f94efa65158437
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
2025-05-26 03:39:00 -07:00
Chungkai Mei
3c6d0251e1 ANDROID: ABI: Update pixel symbol list
Adding the following symbols:
  - param_ops_ullong
  - __traceiter_android_rvh_setscheduler_prio
  - __tracepoint_android_rvh_setscheduler_prio
  - usb_gadget_connect
  - usb_gadget_disconnect

Bug: 409176857
Change-Id: I026c6a80ef4c31577bb2fc28b0b3d9e2e709a200
Signed-off-by: Chungkai Mei <chungkai@google.com>
2025-05-21 00:30:14 -07:00
Chungkai Mei
ed6999107e ANDROID: vendor_hook: add trace_android_rvh_setscheduler_prio
To modify priority of specific tasks, add the vendor hook in __setscheduler_prio

Bug: 409176857
Change-Id: Id5a2309378f1a8c3ecc1de71c20f44f73b3f7557
Signed-off-by: Chungkai Mei <chungkai@google.com>
2025-05-20 22:00:47 -07:00
zhanghao56
5b71d36425 ANDROID: binder: fix minimum node priority comparison
The "desired" priority for a transaction can be adjusted depending on
various factors. For instance, it might be set to SCHED_NORMAL 120, when
the caller is RT and the target node has !inherit_rt.

However, instead of using these adjustments, the existing logic compares
the minimum node priority against the original transaction priority.
If the transaction priority is "higher", then the minimum node priority
is ignored. This is particularly a problem when the "desired" priority
has been changed to SCHED_NORMAL.

This patch corrects the logic, comparing the minimum node priority
against the (potentially adjusted) "desired" priority. This guarantees
that the node's minimum priority is honored.

Bug: 417382411
Cc: Martijn Coenen <maco@google.com>
Fixes: c46810c235 ("ANDROID: binder: add RT inheritance flag to node.")
Change-Id: I813073241b996c1c38c29f20849b247023697102
Signed-off-by: zhanghao56 <zhanghao56@xiaomi.corp-partner.google.com>
Signed-off-by: Carlos Llamas <cmllamas@google.com>
2025-05-20 22:30:31 +00:00
Mark Rutland
785e577258 BACKPORT: KVM: arm64: Eagerly switch ZCR_EL{1,2}
[ Upstream commit 59419f10045bc955d2229819c7cf7a8b0b9c5b59 ]

In non-protected KVM modes, while the guest FPSIMD/SVE/SME state is live on the
CPU, the host's active SVE VL may differ from the guest's maximum SVE VL:

* For VHE hosts, when a VM uses NV, ZCR_EL2 contains a value constrained
  by the guest hypervisor, which may be less than or equal to that
  guest's maximum VL.

  Note: in this case the value of ZCR_EL1 is immaterial due to E2H.

* For nVHE/hVHE hosts, ZCR_EL1 contains a value written by the guest,
  which may be less than or greater than the guest's maximum VL.

  Note: in this case hyp code traps host SVE usage and lazily restores
  ZCR_EL2 to the host's maximum VL, which may be greater than the
  guest's maximum VL.

This can be the case between exiting a guest and kvm_arch_vcpu_put_fp().
If a softirq is taken during this period and the softirq handler tries
to use kernel-mode NEON, then the kernel will fail to save the guest's
FPSIMD/SVE state, and will pend a SIGKILL for the current thread.

This happens because kvm_arch_vcpu_ctxsync_fp() binds the guest's live
FPSIMD/SVE state with the guest's maximum SVE VL, and
fpsimd_save_user_state() verifies that the live SVE VL is as expected
before attempting to save the register state:

| if (WARN_ON(sve_get_vl() != vl)) {
|         force_signal_inject(SIGKILL, SI_KERNEL, 0, 0);
|         return;
| }

Fix this and make this a bit easier to reason about by always eagerly
switching ZCR_EL{1,2} at hyp during guest<->host transitions. With this
happening, there's no need to trap host SVE usage, and the nVHE/nVHE
__deactivate_cptr_traps() logic can be simplified to enable host access
to all present FPSIMD/SVE/SME features.

In protected nVHE/hVHE modes, the host's state is always saved/restored
by hyp, and the guest's state is saved prior to exit to the host, so
from the host's PoV the guest never has live FPSIMD/SVE/SME state, and
the host's ZCR_EL1 is never clobbered by hyp.

Bug: 411040189
Change-Id: Ifecd5024230fadd0b73755587950ba651b94dae0
Fixes: 8c8010d69c ("KVM: arm64: Save/restore SVE state for nVHE")
Fixes: 2e3cf82063a00ea0 ("KVM: arm64: nv: Ensure correct VL is loaded before saving SVE state")
Signed-off-by: Mark Rutland <mark.rutland@arm.com>
Reviewed-by: Mark Brown <broonie@kernel.org>
Tested-by: Mark Brown <broonie@kernel.org>
Cc: Catalin Marinas <catalin.marinas@arm.com>
Cc: Fuad Tabba <tabba@google.com>
Cc: Marc Zyngier <maz@kernel.org>
Cc: Oliver Upton <oliver.upton@linux.dev>
Cc: Will Deacon <will@kernel.org>
Reviewed-by: Oliver Upton <oliver.upton@linux.dev>
Link: https://lore.kernel.org/r/20250210195226.1215254-9-mark.rutland@arm.com
Signed-off-by: Marc Zyngier <maz@kernel.org>
[ v6.6 lacks pKVM saving of host SVE state, pull in discovery of maximum
  host VL separately -- broonie ]
Signed-off-by: Mark Brown <broonie@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Fuad Tabba <tabba@google.com>
2025-05-20 06:56:53 -07:00
Fuad Tabba
6a31e426c6 BACKPORT: KVM: arm64: Calculate cptr_el2 traps on activating traps
[ Upstream commit 2fd5b4b0e7b440602455b79977bfa64dea101e6c ]

Similar to VHE, calculate the value of cptr_el2 from scratch on
activate traps. This removes the need to store cptr_el2 in every
vcpu structure. Moreover, some traps, such as whether the guest
owns the fp registers, need to be set on every vcpu run.

[tabba@ Kept cptr_el2 as to not break the KMI.]

Bug: 411040189
Reported-by: James Clark <james.clark@linaro.org>
Fixes: 5294afdbf45a ("KVM: arm64: Exclude FP ownership from kvm_vcpu_arch")
Change-Id: Iba65e9bb65d8498007423dc5b137dedc602359de
Signed-off-by: Fuad Tabba <tabba@google.com>
Link: https://lore.kernel.org/r/20241216105057.579031-13-tabba@google.com
Signed-off-by: Marc Zyngier <maz@kernel.org>
Signed-off-by: Mark Brown <broonie@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2025-05-20 06:56:53 -07:00
Mark Rutland
89720e9e1b BACKPORT: KVM: arm64: Mark some header functions as inline
[ Upstream commit f9dd00de1e53a47763dfad601635d18542c3836d ]

The shared hyp switch header has a number of static functions which
might not be used by all files that include the header, and when unused
they will provoke compiler warnings, e.g.

| In file included from arch/arm64/kvm/hyp/nvhe/hyp-main.c:8:
| ./arch/arm64/kvm/hyp/include/hyp/switch.h:703:13: warning: 'kvm_hyp_handle_dabt_low' defined but not used [-Wunused-function]
|   703 | static bool kvm_hyp_handle_dabt_low(struct kvm_vcpu *vcpu, u64 *exit_code)
|       |             ^~~~~~~~~~~~~~~~~~~~~~~
| ./arch/arm64/kvm/hyp/include/hyp/switch.h:682:13: warning: 'kvm_hyp_handle_cp15_32' defined but not used [-Wunused-function]
|   682 | static bool kvm_hyp_handle_cp15_32(struct kvm_vcpu *vcpu, u64 *exit_code)
|       |             ^~~~~~~~~~~~~~~~~~~~~~
| ./arch/arm64/kvm/hyp/include/hyp/switch.h:662:13: warning: 'kvm_hyp_handle_sysreg' defined but not used [-Wunused-function]
|   662 | static bool kvm_hyp_handle_sysreg(struct kvm_vcpu *vcpu, u64 *exit_code)
|       |             ^~~~~~~~~~~~~~~~~~~~~
| ./arch/arm64/kvm/hyp/include/hyp/switch.h:458:13: warning: 'kvm_hyp_handle_fpsimd' defined but not used [-Wunused-function]
|   458 | static bool kvm_hyp_handle_fpsimd(struct kvm_vcpu *vcpu, u64 *exit_code)
|       |             ^~~~~~~~~~~~~~~~~~~~~
| ./arch/arm64/kvm/hyp/include/hyp/switch.h:329:13: warning: 'kvm_hyp_handle_mops' defined but not used [-Wunused-function]
|   329 | static bool kvm_hyp_handle_mops(struct kvm_vcpu *vcpu, u64 *exit_code)
|       |             ^~~~~~~~~~~~~~~~~~~

Mark these functions as 'inline' to suppress this warning. This
shouldn't result in any functional change.

At the same time, avoid the use of __alias() in the header and alias
kvm_hyp_handle_iabt_low() and kvm_hyp_handle_watchpt_low() to
kvm_hyp_handle_memory_fault() using CPP, matching the style in the rest
of the kernel. For consistency, kvm_hyp_handle_memory_fault() is also
marked as 'inline'.

Bug: 411040189
Change-Id: I5766401542afda440f737c1fee1810a73e89e86d
Signed-off-by: Mark Rutland <mark.rutland@arm.com>
Reviewed-by: Mark Brown <broonie@kernel.org>
Tested-by: Mark Brown <broonie@kernel.org>
Acked-by: Will Deacon <will@kernel.org>
Cc: Catalin Marinas <catalin.marinas@arm.com>
Cc: Fuad Tabba <tabba@google.com>
Cc: Marc Zyngier <maz@kernel.org>
Cc: Oliver Upton <oliver.upton@linux.dev>
Reviewed-by: Oliver Upton <oliver.upton@linux.dev>
Link: https://lore.kernel.org/r/20250210195226.1215254-8-mark.rutland@arm.com
Signed-off-by: Marc Zyngier <maz@kernel.org>
Signed-off-by: Mark Brown <broonie@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Fuad Tabba <tabba@google.com>
2025-05-20 06:56:53 -07:00
Mark Rutland
b9b8d84f6c BACKPORT: KVM: arm64: Refactor exit handlers
[ Upstream commit 9b66195063c5a145843547b1d692bd189be85287 ]

The hyp exit handling logic is largely shared between VHE and nVHE/hVHE,
with common logic in arch/arm64/kvm/hyp/include/hyp/switch.h. The code
in the header depends on function definitions provided by
arch/arm64/kvm/hyp/vhe/switch.c and arch/arm64/kvm/hyp/nvhe/switch.c
when they include the header.

This is an unusual header dependency, and prevents the use of
arch/arm64/kvm/hyp/include/hyp/switch.h in other files as this would
result in compiler warnings regarding missing definitions, e.g.

| In file included from arch/arm64/kvm/hyp/nvhe/hyp-main.c:8:
| ./arch/arm64/kvm/hyp/include/hyp/switch.h:733:31: warning: 'kvm_get_exit_handler_array' used but never defined
|   733 | static const exit_handler_fn *kvm_get_exit_handler_array(struct kvm_vcpu *vcpu);
|       |                               ^~~~~~~~~~~~~~~~~~~~~~~~~~
| ./arch/arm64/kvm/hyp/include/hyp/switch.h:735:13: warning: 'early_exit_filter' used but never defined
|   735 | static void early_exit_filter(struct kvm_vcpu *vcpu, u64 *exit_code);
|       |             ^~~~~~~~~~~~~~~~~

Refactor the logic such that the header doesn't depend on anything from
the C files. There should be no functional change as a result of this
patch.

Bug: 411040189
Change-Id: I4e58bad80763afd73fd03f9653ed4e66dfe97255
Signed-off-by: Mark Rutland <mark.rutland@arm.com>
Reviewed-by: Mark Brown <broonie@kernel.org>
Tested-by: Mark Brown <broonie@kernel.org>
Acked-by: Will Deacon <will@kernel.org>
Cc: Catalin Marinas <catalin.marinas@arm.com>
Cc: Fuad Tabba <tabba@google.com>
Cc: Marc Zyngier <maz@kernel.org>
Cc: Oliver Upton <oliver.upton@linux.dev>
Reviewed-by: Oliver Upton <oliver.upton@linux.dev>
Link: https://lore.kernel.org/r/20250210195226.1215254-7-mark.rutland@arm.com
Signed-off-by: Marc Zyngier <maz@kernel.org>
Signed-off-by: Mark Brown <broonie@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Fuad Tabba <tabba@google.com>
2025-05-20 06:56:53 -07:00
Mark Rutland
c00c44bea2 BACKPORT: KVM: arm64: Remove VHE host restore of CPACR_EL1.SMEN
[ Upstream commit 407a99c4654e8ea65393f412c421a55cac539f5b ]

When KVM is in VHE mode, the host kernel tries to save and restore the
configuration of CPACR_EL1.SMEN (i.e. CPTR_EL2.SMEN when HCR_EL2.E2H=1)
across kvm_arch_vcpu_load_fp() and kvm_arch_vcpu_put_fp(), since the
configuration may be clobbered by hyp when running a vCPU. This logic
has historically been broken, and is currently redundant.

This logic was originally introduced in commit:

  861262ab86 ("KVM: arm64: Handle SME host state when running guests")

At the time, the VHE hyp code would reset CPTR_EL2.SMEN to 0b00 when
returning to the host, trapping host access to SME state. Unfortunately,
this was unsafe as the host could take a softirq before calling
kvm_arch_vcpu_put_fp(), and if a softirq handler were to use kernel mode
NEON the resulting attempt to save the live FPSIMD/SVE/SME state would
result in a fatal trap.

That issue was limited to VHE mode. For nVHE/hVHE modes, KVM always
saved/restored the host kernel's CPACR_EL1 value, and configured
CPTR_EL2.TSM to 0b0, ensuring that host usage of SME would not be
trapped.

The issue above was incidentally fixed by commit:

  375110ab51 ("KVM: arm64: Fix resetting SME trap values on reset for (h)VHE")

That commit changed the VHE hyp code to configure CPTR_EL2.SMEN to 0b01
when returning to the host, permitting host kernel usage of SME,
avoiding the issue described above. At the time, this was not identified
as a fix for commit 861262ab86.

Now that the host eagerly saves and unbinds its own FPSIMD/SVE/SME
state, there's no need to save/restore the state of the EL0 SME trap.
The kernel can safely save/restore state without trapping, as described
above, and will restore userspace state (including trap controls) before
returning to userspace.

Remove the redundant logic.

Bug: 411040189
Change-Id: Ia2fbb22a21da8e63f0a3b9a76d47ee2c987e2fa5
Signed-off-by: Mark Rutland <mark.rutland@arm.com>
Reviewed-by: Mark Brown <broonie@kernel.org>
Tested-by: Mark Brown <broonie@kernel.org>
Acked-by: Will Deacon <will@kernel.org>
Cc: Catalin Marinas <catalin.marinas@arm.com>
Cc: Fuad Tabba <tabba@google.com>
Cc: Marc Zyngier <maz@kernel.org>
Cc: Oliver Upton <oliver.upton@linux.dev>
Reviewed-by: Oliver Upton <oliver.upton@linux.dev>
Link: https://lore.kernel.org/r/20250210195226.1215254-5-mark.rutland@arm.com
Signed-off-by: Marc Zyngier <maz@kernel.org>
[Update for rework of flags storage -- broonie]
Signed-off-by: Mark Brown <broonie@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Fuad Tabba <tabba@google.com>
2025-05-20 06:56:53 -07:00
Mark Rutland
c952e23cf8 BACKPORT: KVM: arm64: Remove VHE host restore of CPACR_EL1.ZEN
[ Upstream commit 459f059be702056d91537b99a129994aa6ccdd35 ]

When KVM is in VHE mode, the host kernel tries to save and restore the
configuration of CPACR_EL1.ZEN (i.e. CPTR_EL2.ZEN when HCR_EL2.E2H=1)
across kvm_arch_vcpu_load_fp() and kvm_arch_vcpu_put_fp(), since the
configuration may be clobbered by hyp when running a vCPU. This logic is
currently redundant.

The VHE hyp code unconditionally configures CPTR_EL2.ZEN to 0b01 when
returning to the host, permitting host kernel usage of SVE.

Now that the host eagerly saves and unbinds its own FPSIMD/SVE/SME
state, there's no need to save/restore the state of the EL0 SVE trap.
The kernel can safely save/restore state without trapping, as described
above, and will restore userspace state (including trap controls) before
returning to userspace.

Remove the redundant logic.

Bug: 411040189
Change-Id: I43bf5587223aae54caf9389eb3de17f155043d96
Signed-off-by: Mark Rutland <mark.rutland@arm.com>
Reviewed-by: Mark Brown <broonie@kernel.org>
Tested-by: Mark Brown <broonie@kernel.org>
Acked-by: Will Deacon <will@kernel.org>
Cc: Catalin Marinas <catalin.marinas@arm.com>
Cc: Fuad Tabba <tabba@google.com>
Cc: Marc Zyngier <maz@kernel.org>
Cc: Oliver Upton <oliver.upton@linux.dev>
Reviewed-by: Oliver Upton <oliver.upton@linux.dev>
Link: https://lore.kernel.org/r/20250210195226.1215254-4-mark.rutland@arm.com
Signed-off-by: Marc Zyngier <maz@kernel.org>
[Rework for refactoring of where the flags are stored -- broonie]
Signed-off-by: Mark Brown <broonie@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Fuad Tabba <tabba@google.com>
2025-05-20 06:56:53 -07:00
Mark Rutland
a08391468f BACKPORT: KVM: arm64: Remove host FPSIMD saving for non-protected KVM
[ Upstream commit 8eca7f6d5100b6997df4f532090bc3f7e0203bef ]

Now that the host eagerly saves its own FPSIMD/SVE/SME state,
non-protected KVM never needs to save the host FPSIMD/SVE/SME state,
and the code to do this is never used. Protected KVM still needs to
save/restore the host FPSIMD/SVE state to avoid leaking guest state to
the host (and to avoid revealing to the host whether the guest used
FPSIMD/SVE/SME), and that code needs to be retained.

Remove the unused code and data structures.

To avoid the need for a stub copy of kvm_hyp_save_fpsimd_host() in the
VHE hyp code, the nVHE/hVHE version is moved into the shared switch
header, where it is only invoked when KVM is in protected mode.

[tabba@ Kept user_fpsimd_state as to not break the KMI.]

Bug: 411040189
Change-Id: I0088db7c5f75c9331956867040b8eb69976aabf8
Signed-off-by: Mark Rutland <mark.rutland@arm.com>
Reviewed-by: Mark Brown <broonie@kernel.org>
Tested-by: Mark Brown <broonie@kernel.org>
Acked-by: Will Deacon <will@kernel.org>
Cc: Catalin Marinas <catalin.marinas@arm.com>
Cc: Fuad Tabba <tabba@google.com>
Cc: Marc Zyngier <maz@kernel.org>
Cc: Oliver Upton <oliver.upton@linux.dev>
Reviewed-by: Oliver Upton <oliver.upton@linux.dev>
Link: https://lore.kernel.org/r/20250210195226.1215254-3-mark.rutland@arm.com
Signed-off-by: Marc Zyngier <maz@kernel.org>
Signed-off-by: Mark Brown <broonie@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Fuad Tabba <tabba@google.com>
2025-05-20 06:56:53 -07:00
Mark Rutland
12921b6e23 BACKPORT: KVM: arm64: Unconditionally save+flush host FPSIMD/SVE/SME state
[ Upstream commit fbc7e61195e23f744814e78524b73b59faa54ab4 ]

There are several problems with the way hyp code lazily saves the host's
FPSIMD/SVE state, including:

* Host SVE being discarded unexpectedly due to inconsistent
  configuration of TIF_SVE and CPACR_ELx.ZEN. This has been seen to
  result in QEMU crashes where SVE is used by memmove(), as reported by
  Eric Auger:

  https://issues.redhat.com/browse/RHEL-68997

* Host SVE state is discarded *after* modification by ptrace, which was an
  unintentional ptrace ABI change introduced with lazy discarding of SVE state.

* The host FPMR value can be discarded when running a non-protected VM,
  where FPMR support is not exposed to a VM, and that VM uses
  FPSIMD/SVE. In these cases the hyp code does not save the host's FPMR
  before unbinding the host's FPSIMD/SVE/SME state, leaving a stale
  value in memory.

Avoid these by eagerly saving and "flushing" the host's FPSIMD/SVE/SME
state when loading a vCPU such that KVM does not need to save any of the
host's FPSIMD/SVE/SME state. For clarity, fpsimd_kvm_prepare() is
removed and the necessary call to fpsimd_save_and_flush_cpu_state() is
placed in kvm_arch_vcpu_load_fp(). As 'fpsimd_state' and 'fpmr_ptr'
should not be used, they are set to NULL; all uses of these will be
removed in subsequent patches.

Historical problems go back at least as far as v5.17, e.g. erroneous
assumptions about TIF_SVE being clear in commit:

  8383741ab2 ("KVM: arm64: Get rid of host SVE tracking/saving")

... and so this eager save+flush probably needs to be backported to ALL
stable trees.

Bug: 411040189
Fixes: 93ae6b01ba ("KVM: arm64: Discard any SVE state when entering KVM guests")
Fixes: 8c845e2731 ("arm64/sve: Leave SVE enabled on syscall if we don't context switch")
Fixes: ef3be86021c3bdf3 ("KVM: arm64: Add save/restore support for FPMR")
Reported-by: Eric Auger <eauger@redhat.com>
Reported-by: Wilco Dijkstra <wilco.dijkstra@arm.com>
Reviewed-by: Mark Brown <broonie@kernel.org>
Tested-by: Mark Brown <broonie@kernel.org>
Tested-by: Eric Auger <eric.auger@redhat.com>
Acked-by: Will Deacon <will@kernel.org>
Cc: Catalin Marinas <catalin.marinas@arm.com>
Cc: Florian Weimer <fweimer@redhat.com>
Cc: Fuad Tabba <tabba@google.com>
Cc: Jeremy Linton <jeremy.linton@arm.com>
Cc: Marc Zyngier <maz@kernel.org>
Cc: Oliver Upton <oliver.upton@linux.dev>
Cc: Paolo Bonzini <pbonzini@redhat.com>
Change-Id: I2c230b8db86f5c68ebf24f06d1e4787da284c80d
Signed-off-by: Mark Rutland <mark.rutland@arm.com>
Reviewed-by: Oliver Upton <oliver.upton@linux.dev>
Link: https://lore.kernel.org/r/20250210195226.1215254-2-mark.rutland@arm.com
Signed-off-by: Marc Zyngier <maz@kernel.org>
[ Mark: Handle vcpu/host flag conflict, remove host_data_ptr() ]
Signed-off-by: Mark Rutland <mark.rutland@arm.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Fuad Tabba <tabba@google.com>
2025-05-20 06:56:53 -07:00
Mark Brown
f1df93017e BACKPORT: KVM: arm64: Discard any SVE state when entering KVM guests
[ Upstream commit 93ae6b01ba ]

Since 8383741ab2 (KVM: arm64: Get rid of host SVE tracking/saving)
KVM has not tracked the host SVE state, relying on the fact that we
currently disable SVE whenever we perform a syscall. This may not be true
in future since performance optimisation may result in us keeping SVE
enabled in order to avoid needing to take access traps to reenable it.
Handle this by clearing TIF_SVE and converting the stored task state to
FPSIMD format when preparing to run the guest.  This is done with a new
call fpsimd_kvm_prepare() to keep the direct state manipulation
functions internal to fpsimd.c.

Change-Id: Ie011c8f17dfebd82f796aaaa62d1502a3207c7db
Signed-off-by: Mark Brown <broonie@kernel.org>
Reviewed-by: Catalin Marinas <catalin.marinas@arm.com>
Reviewed-by: Marc Zyngier <maz@kernel.org>
Link: https://lore.kernel.org/r/20221115094640.112848-2-broonie@kernel.org
Signed-off-by: Will Deacon <will@kernel.org>
[ Mark: trivial backport to v6.1 ]
Signed-off-by: Mark Rutland <mark.rutland@arm.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Fuad Tabba <tabba@google.com>
2025-05-20 06:56:53 -07:00
Fuad Tabba
21c687a8c5 ANDROID: KVM: arm64: Eagerly restore host FPSIMD/SVE state in pKVM
Eagerly restore the host fpsimd/sve state after every vcpu run in
protected mode if the fpsimd/sve unit was used by the guest, instead of
setting fpsimd/simd traps and restoring if the host triggers them.

Note that the behavior with this patch is the existing behavior in
Android 16 (except for restoring ZCL_EL2, which is being fixed in
conjunction with this patch there as well).

Bug: 411040189
Change-Id: I5702590331093937c1cd0d08ac754c634054c7f7
Signed-off-by: Fuad Tabba <tabba@google.com>
2025-05-20 06:56:53 -07:00
Fuad Tabba
d871a6444c ANDROID: KVM: arm64: Move __deactivate_fpsimd_traps() to switch.h
Move __deactivate_fpsimd_traps() to the shared switch header, instead of
having separate implementations in the vhe/nvhe switch.c files.
Subsequent patches will remove all specific implementations from
switch.c and include switch.h in other files.

Bug: 411040189
Change-Id: I42c545e939b230366fbd9ad8e41a614193169bce
Signed-off-by: Fuad Tabba <tabba@google.com>
2025-05-20 06:56:53 -07:00
Fuad Tabba
1b3dfc7c38 ANDROID: KVM: arm64: Move kvm_hyp_handle_fpsimd_host() to switch.h
Move kvm_hyp_handle_fpsimd_host() to the shared switch header, instead
of having separate implementations in the vhe/nvhe switch.c files.
Subsequent patches will remove all specific implementations from
switch.c and include switch.h in other files.

Bug: 411040189
Change-Id: I07f1d92f96b072435ded5f0b84a446df4e6a81ab
Signed-off-by: Fuad Tabba <tabba@google.com>
2025-05-20 06:56:53 -07:00
Fuad Tabba
c3b505e78c ANDROID: KVM: arm64: Remove pkvm_set_max_sve_vq()
This function doesn't encapsulate that much code, and removing it makes
backporting SVE-fix patches easier and cleaner.

No functional change intended.

Bug: 411040189
Change-Id: I27b3fe467b1896a393751349b86771ddbb1bd62b
Signed-off-by: Fuad Tabba <tabba@google.com>
2025-05-20 06:56:53 -07:00
Fuad Tabba
d653b32842 Revert "ANDROID: KVM: arm64: Use enum instead of helper for fp state"
This reverts commit 26d24625b3, which
didn't introduce any functional change. This is reverted because
backported commits rely on the helpers that the commit has removed.
Reverting it makes it easier and cleaner to apply the backports.

No functional change intended.

Bug: 411040189
Change-Id: Ie29ece274cfc970cf116f8781b841b9ac2c5aa56
Signed-off-by: Fuad Tabba <tabba@google.com>
2025-05-20 06:56:53 -07:00
Marcus Ma
b07be5e511 ANDROID: GKI: update symbol list file for xiaomi
add 2 function:
	trace_android_vh_drain_all_pages_bypass()
	trace_android_vh_pageset_update()

Bug: 418695654

Change-Id: Id1bbb269b7650528dcb2dfac29e7a611154954b3
Signed-off-by: Marcus Ma <maminghui5@xiaomi.corp-partner.google.com>
2025-05-19 21:55:22 -07:00
Marcus Ma
58b3f63bc6 ANDROID: vendor_hooks: Add hooks for pcp related optimization.
We want to make some optimizations to the pcp buffer. First, when directly recycling, we skip drain_all_pages when it is known that the pcp buffer is small to reduce zone->lock contention. In addition, the default pcp buffer size is still relatively small for mobile phones with large memory. We want to increase the pcp buffer area to reduce zone->lock contention.

Bug: 418695654

Change-Id: I38c7a3715500918d839e4363bbcc41cdbf4bd643
Signed-off-by: Marcus Ma <maminghui5@xiaomi.corp-partner.google.com>
2025-05-19 21:55:22 -07:00
Barry Song
ad7902a401 BACKPORT: mm: userfaultfd: correct dirty flags set for both present and swap pte
As David pointed out, what truly matters for mremap and userfaultfd move
operations is the soft dirty bit.  The current comment and
implementation—which always sets the dirty bit for present PTEs and
fails to set the soft dirty bit for swap PTEs—are incorrect.  This could
break features like Checkpoint-Restore in Userspace (CRIU).

This patch updates the behavior to correctly set the soft dirty bit for
both present and swap PTEs in accordance with mremap.

Link: https://lkml.kernel.org/r/20250508220912.7275-1-21cnbao@gmail.com
Fixes: adef440691ba ("userfaultfd: UFFDIO_MOVE uABI")
Signed-off-by: Barry Song <v-songbaohua@oppo.com>
Reported-by: David Hildenbrand <david@redhat.com>
Closes: https://lore.kernel.org/linux-mm/02f14ee1-923f-47e3-a994-4950afb9afcc@redhat.com/
Acked-by: Peter Xu <peterx@redhat.com>
Reviewed-by: Suren Baghdasaryan <surenb@google.com>
Cc: Lokesh Gidra <lokeshgidra@google.com>
Cc: Andrea Arcangeli <aarcange@redhat.com>
Cc: <stable@vger.kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
(cherry picked from commit 75cb1cca2c880179a11c7dd9380b6f14e41a06a4)

Merge Conflicts:
1. pte_mkwrite() doesn't take vma as second argument, so removed it.

Change-Id: I5fc25f9028ad7972ea1b6d873f072fd15f9c7214
Signed-off-by: Lokesh Gidra <lokeshgidra@google.com>
2025-05-19 16:49:00 -07:00
Kalesh Singh
e30317e116 ANDROID: 16K: Remove ELF padding entry from map_file ranges
Symbolization techniques use address ranges as reported in /proc/*/maps
to infer the corresponding /proc/*/map_files/ entry.

Per Daniel, this is done because the path in /proc/*/maps is problematic
for at least two reasons:

    1. The file could have been deleted from the file system (this is
       indicated with the  (deleted) suffix), meaning that you can't
       actually open it through the "regular" file system. However,
       while the mapping is alive, the kernel keeps the inode accessible
       via the corresponding /proc/*/map_files entry, allowing for
       access after all.

    2. It makes dealing with changed root and file system namespaces
       much more painful. The /proc/*/maps path is relative, and so now
       you need to concatenate paths etc. Accessing file through
       /proc/*/map_files just works (assuming necessary permissions), as
       the kernel redirects the request to the proper inode,
       irrespective of how it is exposed through the non-proc
       filesystem.

Android extends ELF padding regions to be contiguously mapped in memory
to mitigate increase in unreclaimable VMA slab memory usage.

Commit 8c2a805a857914324b077708b45c31c2f20d02da [1] emulates the padding
region of such extended mappings to be outputted as PROT_NONE
[page size compat] entries from /proc/*/[s]maps. This breaks the use
case of /proc/*/maps_files/, as the ranges in /proc/*/map_files/ are
the true ranges of the actual underlying VMA layout; while those in
/proc/*/[s]maps are the emulated (shortened) ranges.

Remove the padding (extended) ranges from /proc/*/maps_files entries.

====== Example Output ======

=== maps ===

❯ adb shell cat /proc/1/maps | grep -A1 libdl_android.so | sed '$d'

7f76663df000-7f76663e0000 r--p 00000000 fe:09 1911                       /system/lib64/bootstrap/libdl_android.so
7f76663e0000-7f76663e3000 ---p 00000000 00:00 0                          [page size compat]
7f76663e3000-7f76663e4000 r-xp 00004000 fe:09 1911                       /system/lib64/bootstrap/libdl_android.so
7f76663e4000-7f76663e7000 ---p 00000000 00:00 0                          [page size compat]
7f76663e7000-7f76663e8000 r--p 00008000 fe:09 1911                       /system/lib64/bootstrap/libdl_android.s

=== map_files - Before patch ===

❯ adb shell ls /proc/1/map_files | grep -A2 7f76663df000

7f76663df000-7f76663e3000
7f76663e3000-7f76663e7000
7f76663e7000-7f76663e8000

=== map_files - After patch ===

❯ adb shell ls /proc/1/map_files | grep -A2 7f76663df000

7f76663df000-7f76663e0000
7f76663e3000-7f76663e4000
7f76663e7000-7f76663e8000

[1] 8c2a805a85

Bug: 418042003
Change-Id: I0f6d703715a0e709fa1d4bd52241b5fd913dd55e
Reported-by: Daniel Müller <deso@posteo.net>
Signed-off-by: Kalesh Singh <kaleshsingh@google.com>
2025-05-19 13:26:15 -07:00
Octavian Purdila
228e0f23bd UPSTREAM: net_sched: sch_sfq: move the limit validation
[ Upstream commit b3bf8f63e6179076b57c9de660c9f80b5abefe70 ]

It is not sufficient to directly validate the limit on the data that
the user passes as it can be updated based on how the other parameters
are changed.

Move the check at the end of the configuration update process to also
catch scenarios where the limit is indirectly updated, for example
with the following configurations:

tc qdisc add dev dummy0 handle 1: root sfq limit 2 flows 1 depth 1
tc qdisc add dev dummy0 handle 1: root sfq limit 2 flows 1 divisor 1

This fixes the following syzkaller reported crash:

------------[ cut here ]------------
UBSAN: array-index-out-of-bounds in net/sched/sch_sfq.c:203:6
index 65535 is out of range for type 'struct sfq_head[128]'
CPU: 1 UID: 0 PID: 3037 Comm: syz.2.16 Not tainted 6.14.0-rc2-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 12/27/2024
Call Trace:
 <TASK>
 __dump_stack lib/dump_stack.c:94 [inline]
 dump_stack_lvl+0x201/0x300 lib/dump_stack.c:120
 ubsan_epilogue lib/ubsan.c:231 [inline]
 __ubsan_handle_out_of_bounds+0xf5/0x120 lib/ubsan.c:429
 sfq_link net/sched/sch_sfq.c:203 [inline]
 sfq_dec+0x53c/0x610 net/sched/sch_sfq.c:231
 sfq_dequeue+0x34e/0x8c0 net/sched/sch_sfq.c:493
 sfq_reset+0x17/0x60 net/sched/sch_sfq.c:518
 qdisc_reset+0x12e/0x600 net/sched/sch_generic.c:1035
 tbf_reset+0x41/0x110 net/sched/sch_tbf.c:339
 qdisc_reset+0x12e/0x600 net/sched/sch_generic.c:1035
 dev_reset_queue+0x100/0x1b0 net/sched/sch_generic.c:1311
 netdev_for_each_tx_queue include/linux/netdevice.h:2590 [inline]
 dev_deactivate_many+0x7e5/0xe70 net/sched/sch_generic.c:1375

Bug: 413623519
Reported-by: syzbot <syzkaller@googlegroups.com>
Fixes: 10685681bafc ("net_sched: sch_sfq: don't allow 1 packet limit")
Signed-off-by: Octavian Purdila <tavip@google.com>
Acked-by: Cong Wang <xiyou.wangcong@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Sasha Levin <sashal@kernel.org>
(cherry picked from commit f86293adce0c201cfabb283ef9d6f21292089bb8)
Signed-off-by: Lee Jones <joneslee@google.com>
Change-Id: Ie5fc222b52c59eaa1070cc03402f8a624af60cd9
2025-05-19 15:20:05 +01:00
Octavian Purdila
3e7cb920f1 UPSTREAM: net_sched: sch_sfq: use a temporary work area for validating configuration
[ Upstream commit 8c0cea59d40cf6dd13c2950437631dd614fbade6 ]

Many configuration parameters have influence on others (e.g. divisor
-> flows -> limit, depth -> limit) and so it is difficult to correctly
do all of the validation before applying the configuration. And if a
validation error is detected late it is difficult to roll back a
partially applied configuration.

To avoid these issues use a temporary work area to update and validate
the configuration and only then apply the configuration to the
internal state.

Bug: 413623519
Signed-off-by: Octavian Purdila <tavip@google.com>
Acked-by: Cong Wang <xiyou.wangcong@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Stable-dep-of: b3bf8f63e617 ("net_sched: sch_sfq: move the limit validation")
Signed-off-by: Sasha Levin <sashal@kernel.org>
(cherry picked from commit 70449ca40609ec77f58b93ed154d54e1fdb197b6)
Signed-off-by: Lee Jones <joneslee@google.com>
Change-Id: Icab9dc62eddd23f6a2c5d06dd1f8457294716fb8
2025-05-19 15:19:58 +01:00
Yabin Cui
a0fa2316cc ANDROID: ABI: Update pixel symbol list
Adding the following symbols:
  - irq_check_status_bit
  - irq_get_percpu_devid_partition
  - irq_work_run
  - perf_aux_output_skip
  - this_cpu_has_cap

Bug: 393467632
Change-Id: I8e9f34b6b40ec078586d175efb835a6898cbc4f1
Signed-off-by: Yabin Cui <yabinc@google.com>
2025-05-15 15:05:50 -07:00
Yabin Cui
218e2bd245 FROMGIT: perf/aux: Allocate non-contiguous AUX pages by default
perf always allocates contiguous AUX pages based on aux_watermark.
However, this contiguous allocation doesn't benefit all PMUs. For
instance, ARM SPE and TRBE operate with virtual pages, and Coresight
ETR allocates a separate buffer. For these PMUs, allocating contiguous
AUX pages unnecessarily exacerbates memory fragmentation. This
fragmentation can prevent their use on long-running devices.

This patch modifies the perf driver to be memory-friendly by default,
by allocating non-contiguous AUX pages. For PMUs requiring contiguous
pages (Intel BTS and some Intel PT), the existing
PERF_PMU_CAP_AUX_NO_SG capability can be used. For PMUs that don't
require but can benefit from contiguous pages (some Intel PT), a new
capability, PERF_PMU_CAP_AUX_PREFER_LARGE, is added to maintain their
existing behavior.

Bug: 393467632
(cherry picked from commit 18049c8cff9cc89daadc4df6975f7d9069638926
 git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git perf/core)
Change-Id: Iaff554201726bf271c7625a6df59fb35c6cfbc5d
Signed-off-by: Yabin Cui <yabinc@google.com>
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Reviewed-by: James Clark <james.clark@linaro.org>
Reviewed-by: Anshuman Khandual <anshuman.khandual@arm.com>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Arnaldo Carvalho de Melo <acme@redhat.com>
Cc: Jiri Olsa <jolsa@redhat.com>
Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
Cc: Mark Rutland <mark.rutland@arm.com>
Cc: Namhyung Kim <namhyung@kernel.org>
Link: https://lore.kernel.org/r/20250508232642.148767-1-yabinc@google.com
2025-05-15 11:01:13 -07:00
Alex Williamson
3cd01bb5bd UPSTREAM: mm: Fix is_zero_page() usage in try_grab_page()
The backport of upstream commit c8070b7875 ("mm: Don't pin ZERO_PAGE
in pin_user_pages()") into v6.1.130 noted below in Fixes does not
account for commit 0f0892356f ("mm: allow multiple error returns in
try_grab_page()"), which changed the return value of try_grab_page()
from bool to int.  Therefore returning 0, success in the upstream
version, becomes an error here.  Fix the return value.

Bug: 411256892
Fixes: 476c1dfefa ("mm: Don't pin ZERO_PAGE in pin_user_pages()")
Link: https://lore.kernel.org/all/Z_6uhLQjJ7SSzI13@eldamar.lan
Reported-by: Salvatore Bonaccorso <carnil@debian.org>
Reported-by: Milan Broz <gmazyland@gmail.com>
Reviewed-by: David Hildenbrand <david@redhat.com>
Cc: stable@vger.kernel.org
Cc: linux-kernel@vger.kernel.org
Cc: linux-mm@kvack.org
Cc: Sasha Levin <sashal@kernel.org>
Change-Id: I1a124e70161e48c9b3374aa3fc541c6a13ea1ff0
Signed-off-by: Alex Williamson <alex.williamson@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
(cherry picked from commit edde34b792)
Signed-off-by: Will McVicker <willmcvicker@google.com>
2025-05-13 15:49:24 -07:00
Norihiko Hama
53b26534cc UPSTREAM: usb-storage: Optimize scan delay more precisely
Current storage scan delay is reduced by the following old commit.

a4a47bc03f ("Lower USB storage settling delay to something more reasonable")

It means that delay is at least 'one second', or zero with delay_use=0.
'one second' is still long delay especially for embedded system but
when delay_use is set to 0 (no delay), still error observed on some USB drives.

So delay_use should not be set to 0 but 'one second' is quite long.
Especially for embedded system, it's important for end user
how quickly access to USB drive when it's connected.
That's why we have a chance to minimize such a constant long delay.

This patch optimizes scan delay more precisely
to minimize delay time but not to have any problems on USB drives
by extending module parameter 'delay_use' in milliseconds internally.
The parameter 'delay_use' optionally supports in milliseconds
if it ends with 'ms'.
It makes the range of value to 1 / 1000 in internal 32-bit value
but it's still enough to set the delay time.
By default, delay time is 'one second' for backward compatibility.

For example, it seems to be good by changing delay_use=100ms,
that is 100 millisecond delay without issues for most USB pen drives.

Bug: 408977963
Change-Id: I77521bc01a7dadaa5bb94aecd361f2507892928c
(cherry picked from commit 804da867ad016d53bf33373cfeaae041775455f1)
Signed-off-by: Norihiko Hama <Norihiko.Hama@alpsalpine.com>
Link: https://lore.kernel.org/r/20240515004339.29892-1-Norihiko.Hama@alpsalpine.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2025-05-13 08:25:30 -07:00
Greg Kroah-Hartman
4894546596 Revert "cpufreq: Avoid using inconsistent policy->min and policy->max"
This reverts commit 681400579b which is
commit 7491cdf46b5cbdf123fc84fbe0a07e9e3d7b7620 upstream.

It breaks the Android kernel abi and can be brought back in the future
in an abi-safe way if it is really needed.

Bug: 161946584
Change-Id: I8c729ffa77816414bc3ae3f4db045116e4b04569
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
2025-05-11 05:37:23 +00:00
Greg Kroah-Hartman
9840922a87 Revert "cpufreq: Fix setting policy limits when frequency tables are used"
This reverts commit 15888cd413 which is
commit b79028039f440e7d2c4df6ab243060c4e3803e84 upstream.

It breaks the Android kernel abi and can be brought back in the future
in an abi-safe way if it is really needed.

Bug: 161946584
Change-Id: I82289f4148265e8e3264bf9b372b638a59a70d47
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
2025-05-11 05:36:04 +00:00
Douglas Anderson
1e50e672f2 UPSTREAM: arm64: errata: Add newer ARM cores to the spectre_bhb_loop_affected() lists
commit a5951389e58d2e816eed3dbec5877de9327fd881 upstream.

When comparing to the ARM list [1], it appears that several ARM cores
were missing from the lists in spectre_bhb_loop_affected(). Add them.

NOTE: for some of these cores it may not matter since other ways of
clearing the BHB may be used (like the CLRBHB instruction or ECBHB),
but it still seems good to have all the info from ARM's whitepaper
included.

[1] https://developer.arm.com/Arm%20Security%20Center/Spectre-BHB

Fixes: 558c303c97 ("arm64: Mitigate spectre style branch history side channels")
Cc: stable@vger.kernel.org
Change-Id: I4c4178a7d4883cf3cd02fc7c83569b438cfd9a08
Signed-off-by: Douglas Anderson <dianders@chromium.org>
Reviewed-by: James Morse <james.morse@arm.com>
Link: https://lore.kernel.org/r/20250107120555.v4.5.I4a9a527e03f663040721c5401c41de587d015c82@changeid
Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
(cherry picked from commit a53b3599d9)
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
2025-05-10 12:56:44 +00:00
Greg Kroah-Hartman
4c7f06c5da Merge 6.1.138 into android14-6.1-lts
Changes in 6.1.138
	Revert "rndis_host: Flag RNDIS modems as WWAN devices"
	ALSA: usb-audio: Add second USB ID for Jabra Evolve 65 headset
	drm/nouveau: Fix WARN_ON in nouveau_fence_context_kill()
	EDAC/altera: Test the correct error reg offset
	EDAC/altera: Set DDR and SDMMC interrupt mask before registration
	i2c: imx-lpi2c: Fix clock count when probe defers
	arm64: errata: Add missing sentinels to Spectre-BHB MIDR arrays
	parisc: Fix double SIGFPE crash
	perf/x86/intel: KVM: Mask PEBS_ENABLE loaded for guest with vCPU's value.
	amd-xgbe: Fix to ensure dependent features are toggled with RX checksum offload
	irqchip/qcom-mpm: Prevent crash when trying to handle non-wake GPIOs
	mmc: renesas_sdhi: Fix error handling in renesas_sdhi_probe
	wifi: brcm80211: fmac: Add error handling for brcmf_usb_dl_writeimage()
	dm-integrity: fix a warning on invalid table line
	dm: always update the array size in realloc_argv on success
	iommu/amd: Fix potential buffer overflow in parse_ivrs_acpihid
	iommu/vt-d: Apply quirk_iommu_igfx for 8086:0044 (QM57/QS57)
	platform/x86/intel-uncore-freq: Fix missing uncore sysfs during CPU hotplug
	ksmbd: fix use-after-free in kerberos authentication
	cpufreq: Avoid using inconsistent policy->min and policy->max
	cpufreq: Fix setting policy limits when frequency tables are used
	tracing: Fix oob write in trace_seq_to_buffer()
	xfs: fix error returns from xfs_bmapi_write
	xfs: fix xfs_bmap_add_extent_delay_real for partial conversions
	xfs: remove a racy if_bytes check in xfs_reflink_end_cow_extent
	xfs: require XFS_SB_FEAT_INCOMPAT_LOG_XATTRS for attr log intent item recovery
	xfs: check opcode and iovec count match in xlog_recover_attri_commit_pass2
	xfs: validate recovered name buffers when recovering xattr items
	xfs: revert commit 44af6c7e59
	xfs: match lock mode in xfs_buffered_write_iomap_begin()
	xfs: make the seq argument to xfs_bmapi_convert_delalloc() optional
	xfs: make xfs_bmapi_convert_delalloc() to allocate the target offset
	xfs: convert delayed extents to unwritten when zeroing post eof blocks
	xfs: allow symlinks with short remote targets
	xfs: make sure sb_fdblocks is non-negative
	xfs: fix freeing speculative preallocations for preallocated files
	xfs: allow unlinked symlinks and dirs with zero size
	xfs: restrict when we try to align cow fork delalloc to cowextsz hints
	KVM: x86: Load DR6 with guest value only before entering .vcpu_run() loop
	dm-bufio: don't schedule in atomic context
	ASoC: soc-pcm: Fix hw_params() and DAPM widget sequence
	wifi: plfxlc: Remove erroneous assert in plfxlc_mac_release
	vxlan: vnifilter: Fix unlocked deletion of default FDB entry
	net/mlx5: E-Switch, Initialize MAC Address for Default GID
	net/mlx5: E-switch, Fix error handling for enabling roce
	net: mscc: ocelot: treat 802.1ad tagged traffic as 802.1Q-untagged
	net: mscc: ocelot: delete PVID VLAN when readding it as non-PVID
	net: ethernet: mtk-star-emac: fix spinlock recursion issues on rx/tx poll
	net: ethernet: mtk-star-emac: rearm interrupts in rx_poll only when advised
	net_sched: drr: Fix double list add in class with netem as child qdisc
	net_sched: hfsc: Fix a UAF vulnerability in class with netem as child qdisc
	net_sched: ets: Fix double list add in class with netem as child qdisc
	net_sched: qfq: Fix double list add in class with netem as child qdisc
	ice: Check VF VSI Pointer Value in ice_vc_add_fdir_fltr()
	net: dlink: Correct endianness handling of led_mode
	net: dsa: felix: fix broken taprio gate states after clock jump
	net: ipv6: fix UDPv6 GSO segmentation with NAT
	bnxt_en: Fix coredump logic to free allocated buffer
	bnxt_en: Fix out-of-bound memcpy() during ethtool -w
	bnxt_en: Fix ethtool -d byte order for 32-bit values
	nvme-tcp: fix premature queue removal and I/O failover
	net: lan743x: Fix memleak issue when GSO enabled
	net: fec: ERR007885 Workaround for conventional TX
	net: hns3: store rx VLAN tag offload state for VF
	net: hns3: fix an interrupt residual problem
	net: hns3: fixed debugfs tm_qset size
	net: hns3: defer calling ptp_clock_register()
	net: vertexcom: mse102x: Fix possible stuck of SPI interrupt
	net: vertexcom: mse102x: Fix LEN_MASK
	net: vertexcom: mse102x: Add range check for CMD_RTS
	net: vertexcom: mse102x: Fix RX error handling
	md: move initialization and destruction of 'io_acct_set' to md.c
	PCI: imx6: Skip controller_id generation logic for i.MX7D
	sch_htb: make htb_qlen_notify() idempotent
	sch_drr: make drr_qlen_notify() idempotent
	sch_hfsc: make hfsc_qlen_notify() idempotent
	sch_qfq: make qfq_qlen_notify() idempotent
	sch_ets: make est_qlen_notify() idempotent
	Revert "x86/kexec: Allocate PGD for x86_64 transition page tables separately"
	firmware: arm_scmi: Balance device refcount when destroying devices
	firmware: arm_ffa: Skip Rx buffer ownership release if not acquired
	ARM: dts: opos6ul: add ksz8081 phy properties
	net: phy: microchip: force IRQ polling mode for lan88xx
	Revert "drm/meson: vclk: fix calculation of 59.94 fractional rates"
	irqchip/gic-v2m: Mark a few functions __init
	irqchip/gic-v2m: Prevent use after free of gicv2m_get_fwnode()
	dm: fix copying after src array boundaries
	iommu/arm-smmu-v3: Use the new rb tree helpers
	iommu/arm-smmu-v3: Fix iommu_device_probe bug due to duplicated stream ids
	drm/amd/display: phase2 enable mst hdcp multiple displays
	drm/amd/display: Clean up style problems in amdgpu_dm_hdcp.c
	drm/amd/display: Change HDCP update sequence for DM
	drm/amd/display: Add scoped mutexes for amdgpu_dm_dhcp
	drm/amd/display: Fix slab-use-after-free in hdcp
	ASoC: Use of_property_read_bool()
	ASoC: soc-core: Stop using of_property_read_bool() for non-boolean properties
	Linux 6.1.138

Change-Id: I8f925d0c86ef5afce8775e0a7d2a2ba4bf287427
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
2025-05-09 12:00:36 +00:00
Greg Kroah-Hartman
02b72ccb5f Linux 6.1.138
Link: https://lore.kernel.org/r/20250507183806.987408728@linuxfoundation.org
Tested-by: Pavel Machek (CIP) <pavel@denx.de>
Tested-by: Florian Fainelli <florian.fainelli@broadcom.com>
Tested-by: Shuah Khan <skhan@linuxfoundation.org>
Tested-by: Salvatore Bonaccorso <carnil@debian.org>
Link: https://lore.kernel.org/r/20250508112609.711621924@linuxfoundation.org
Tested-by: Peter Schneider <pschneider1968@googlemail.com>
Tested-by: Jon Hunter <jonathanh@nvidia.com>
Tested-by: Florian Fainelli <florian.fainelli@broadcom.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2025-05-09 09:41:46 +02:00
Geert Uytterhoeven
5626b47a3e ASoC: soc-core: Stop using of_property_read_bool() for non-boolean properties
[ Upstream commit 6eab7034579917f207ca6d8e3f4e11e85e0ab7d5 ]

On R-Car:

    OF: /sound: Read of boolean property 'simple-audio-card,bitclock-master' with a value.
    OF: /sound: Read of boolean property 'simple-audio-card,frame-master' with a value.

or:

    OF: /soc/sound@ec500000/ports/port@0/endpoint: Read of boolean property 'bitclock-master' with a value.
    OF: /soc/sound@ec500000/ports/port@0/endpoint: Read of boolean property 'frame-master' with a value.

The use of of_property_read_bool() for non-boolean properties is
deprecated in favor of of_property_present() when testing for property
presence.

Replace testing for presence before calling of_property_read_u32() by
testing for an -EINVAL return value from the latter, to simplify the
code.

Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
Link: https://patch.msgid.link/db10e96fbda121e7456d70e97a013cbfc9755f4d.1737533954.git.geert+renesas@glider.be
Signed-off-by: Mark Brown <broonie@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2025-05-09 09:41:46 +02:00
Rob Herring (Arm)
79ff5e2629 ASoC: Use of_property_read_bool()
[ Upstream commit 69dd15a8ef0ae494179fd15023aa8172188db6b7 ]

Use of_property_read_bool() to read boolean properties rather than
of_get_property(). This is part of a larger effort to remove callers
of of_get_property() and similar functions. of_get_property() leaks
the DT property data pointer which is a problem for dynamically
allocated nodes which may be freed.

Signed-off-by: Rob Herring (Arm) <robh@kernel.org>
Link: https://patch.msgid.link/20240731191312.1710417-20-robh@kernel.org
Signed-off-by: Mark Brown <broonie@kernel.org>
Stable-dep-of: 6eab70345799 ("ASoC: soc-core: Stop using of_property_read_bool() for non-boolean properties")
Signed-off-by: Sasha Levin <sashal@kernel.org>
2025-05-09 09:41:46 +02:00
Chris Bainbridge
e25139c4aa drm/amd/display: Fix slab-use-after-free in hdcp
[ Upstream commit be593d9d91c5a3a363d456b9aceb71029aeb3f1d ]

The HDCP code in amdgpu_dm_hdcp.c copies pointers to amdgpu_dm_connector
objects without incrementing the kref reference counts. When using a
USB-C dock, and the dock is unplugged, the corresponding
amdgpu_dm_connector objects are freed, creating dangling pointers in the
HDCP code. When the dock is plugged back, the dangling pointers are
dereferenced, resulting in a slab-use-after-free:

[   66.775837] BUG: KASAN: slab-use-after-free in event_property_validate+0x42f/0x6c0 [amdgpu]
[   66.776171] Read of size 4 at addr ffff888127804120 by task kworker/0:1/10

[   66.776179] CPU: 0 UID: 0 PID: 10 Comm: kworker/0:1 Not tainted 6.14.0-rc7-00180-g54505f727a38-dirty #233
[   66.776183] Hardware name: HP HP Pavilion Aero Laptop 13-be0xxx/8916, BIOS F.17 12/18/2024
[   66.776186] Workqueue: events event_property_validate [amdgpu]
[   66.776494] Call Trace:
[   66.776496]  <TASK>
[   66.776497]  dump_stack_lvl+0x70/0xa0
[   66.776504]  print_report+0x175/0x555
[   66.776507]  ? __virt_addr_valid+0x243/0x450
[   66.776510]  ? kasan_complete_mode_report_info+0x66/0x1c0
[   66.776515]  kasan_report+0xeb/0x1c0
[   66.776518]  ? event_property_validate+0x42f/0x6c0 [amdgpu]
[   66.776819]  ? event_property_validate+0x42f/0x6c0 [amdgpu]
[   66.777121]  __asan_report_load4_noabort+0x14/0x20
[   66.777124]  event_property_validate+0x42f/0x6c0 [amdgpu]
[   66.777342]  ? __lock_acquire+0x6b40/0x6b40
[   66.777347]  ? enable_assr+0x250/0x250 [amdgpu]
[   66.777571]  process_one_work+0x86b/0x1510
[   66.777575]  ? pwq_dec_nr_in_flight+0xcf0/0xcf0
[   66.777578]  ? assign_work+0x16b/0x280
[   66.777580]  ? lock_is_held_type+0xa3/0x130
[   66.777583]  worker_thread+0x5c0/0xfa0
[   66.777587]  ? process_one_work+0x1510/0x1510
[   66.777588]  kthread+0x3a2/0x840
[   66.777591]  ? kthread_is_per_cpu+0xd0/0xd0
[   66.777594]  ? trace_hardirqs_on+0x4f/0x60
[   66.777597]  ? _raw_spin_unlock_irq+0x27/0x60
[   66.777599]  ? calculate_sigpending+0x77/0xa0
[   66.777602]  ? kthread_is_per_cpu+0xd0/0xd0
[   66.777605]  ret_from_fork+0x40/0x90
[   66.777607]  ? kthread_is_per_cpu+0xd0/0xd0
[   66.777609]  ret_from_fork_asm+0x11/0x20
[   66.777614]  </TASK>

[   66.777643] Allocated by task 10:
[   66.777646]  kasan_save_stack+0x39/0x60
[   66.777649]  kasan_save_track+0x14/0x40
[   66.777652]  kasan_save_alloc_info+0x37/0x50
[   66.777655]  __kasan_kmalloc+0xbb/0xc0
[   66.777658]  __kmalloc_cache_noprof+0x1c8/0x4b0
[   66.777661]  dm_dp_add_mst_connector+0xdd/0x5c0 [amdgpu]
[   66.777880]  drm_dp_mst_port_add_connector+0x47e/0x770 [drm_display_helper]
[   66.777892]  drm_dp_send_link_address+0x1554/0x2bf0 [drm_display_helper]
[   66.777901]  drm_dp_check_and_send_link_address+0x187/0x1f0 [drm_display_helper]
[   66.777909]  drm_dp_mst_link_probe_work+0x2b8/0x410 [drm_display_helper]
[   66.777917]  process_one_work+0x86b/0x1510
[   66.777919]  worker_thread+0x5c0/0xfa0
[   66.777922]  kthread+0x3a2/0x840
[   66.777925]  ret_from_fork+0x40/0x90
[   66.777927]  ret_from_fork_asm+0x11/0x20

[   66.777932] Freed by task 1713:
[   66.777935]  kasan_save_stack+0x39/0x60
[   66.777938]  kasan_save_track+0x14/0x40
[   66.777940]  kasan_save_free_info+0x3b/0x60
[   66.777944]  __kasan_slab_free+0x52/0x70
[   66.777946]  kfree+0x13f/0x4b0
[   66.777949]  dm_dp_mst_connector_destroy+0xfa/0x150 [amdgpu]
[   66.778179]  drm_connector_free+0x7d/0xb0
[   66.778184]  drm_mode_object_put.part.0+0xee/0x160
[   66.778188]  drm_mode_object_put+0x37/0x50
[   66.778191]  drm_atomic_state_default_clear+0x220/0xd60
[   66.778194]  __drm_atomic_state_free+0x16e/0x2a0
[   66.778197]  drm_mode_atomic_ioctl+0x15ed/0x2ba0
[   66.778200]  drm_ioctl_kernel+0x17a/0x310
[   66.778203]  drm_ioctl+0x584/0xd10
[   66.778206]  amdgpu_drm_ioctl+0xd2/0x1c0 [amdgpu]
[   66.778375]  __x64_sys_ioctl+0x139/0x1a0
[   66.778378]  x64_sys_call+0xee7/0xfb0
[   66.778381]  do_syscall_64+0x87/0x140
[   66.778385]  entry_SYSCALL_64_after_hwframe+0x4b/0x53

Fix this by properly incrementing and decrementing the reference counts
when making and deleting copies of the amdgpu_dm_connector pointers.

(Mario: rebase on current code and update fixes tag)

Closes: https://gitlab.freedesktop.org/drm/amd/-/issues/4006
Signed-off-by: Chris Bainbridge <chris.bainbridge@gmail.com>
Fixes: da3fd7ac0b ("drm/amd/display: Update CP property based on HW query")
Reviewed-by: Alex Hung <alex.hung@amd.com>
Link: https://lore.kernel.org/r/20250417215005.37964-1-mario.limonciello@amd.com
Signed-off-by: Mario Limonciello <mario.limonciello@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
(cherry picked from commit d4673f3c3b3dcb74e36e53cdfc880baa7a87b330)
Cc: stable@vger.kernel.org
Signed-off-by: Sasha Levin <sashal@kernel.org>
2025-05-09 09:41:46 +02:00
Mario Limonciello
942ecb9e8f drm/amd/display: Add scoped mutexes for amdgpu_dm_dhcp
[ Upstream commit 6b675ab8efbf2bcee25be29e865455c56e246401 ]

[Why]
Guards automatically release mutex when it goes out of scope making
code easier to follow.

[How]
Replace all use of mutex_lock()/mutex_unlock() with guard(mutex).

Reviewed-by: Alex Hung <alex.hung@amd.com>
Signed-off-by: Mario Limonciello <mario.limonciello@amd.com>
Signed-off-by: Tom Chung <chiahsuan.chung@amd.com>
Tested-by: Daniel Wheeler <daniel.wheeler@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Stable-dep-of: be593d9d91c5 ("drm/amd/display: Fix slab-use-after-free in hdcp")
Signed-off-by: Sasha Levin <sashal@kernel.org>
2025-05-09 09:41:46 +02:00
Bhawanpreet Lakha
e07ed98515 drm/amd/display: Change HDCP update sequence for DM
[ Upstream commit 393e834848 ]

Refactor the sequence in hdcp_update_display() to use
mod_hdcp_update_display().

Previous sequence:
	- remove()->add()

This Sequence was used to update the display, (mod_hdcp_update_display
didn't exist at the time). This meant for any hdcp updates (type changes,
enable/disable) we would remove, reconstruct, and add. This leads to
unnecessary calls to psp eventually

New Sequence using mod_hdcp_update_display():
	- add() once when stream is enabled
	- use update() for all updates

The update function checks for prev == new states and will not
unnecessarily end up calling psp via add/remove.

Reviewed-by: Qingqing Zhuo <qingqing.zhuo@amd.com>
Acked-by: Tom Chung <chiahsuan.chung@amd.com>
Signed-off-by: Bhawanpreet Lakha <bhawanpreet.lakha@amd.com>
Tested-by: Daniel Wheeler <daniel.wheeler@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Stable-dep-of: be593d9d91c5 ("drm/amd/display: Fix slab-use-after-free in hdcp")
Signed-off-by: Sasha Levin <sashal@kernel.org>
2025-05-09 09:41:46 +02:00
Srinivasan Shanmugam
e56b7400e9 drm/amd/display: Clean up style problems in amdgpu_dm_hdcp.c
[ Upstream commit a19de9dbb4 ]

Conform to Linux kernel coding style.

And promote sysfs entry for set/get srm to kdoc.

Suggested-by: Rodrigo Siqueira <Rodrigo.Siqueira@amd.com>
Cc: Rodrigo Siqueira <Rodrigo.Siqueira@amd.com>
Cc: Aurabindo Pillai <aurabindo.pillai@amd.com>
Signed-off-by: Srinivasan Shanmugam <srinivasan.shanmugam@amd.com>
Reviewed-by: Aurabindo Pillai <aurabindo.pillai@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Stable-dep-of: be593d9d91c5 ("drm/amd/display: Fix slab-use-after-free in hdcp")
Signed-off-by: Sasha Levin <sashal@kernel.org>
2025-05-09 09:41:45 +02:00
hersen wu
8a86bb891b drm/amd/display: phase2 enable mst hdcp multiple displays
[ Upstream commit aa9fdd5d5a ]

[why]
For MST topology with 1 physical link and multiple connectors (>=2),
e.g. daisy cahined MST + SST, or 1-to-multi MST hub, if userspace
set to enable the HDCP simultaneously on all connected outputs, the
commit tail iteratively call the hdcp_update_display() for each
display (connector). However, the hdcp workqueue data structure for
each link has only one DM connector and encryption status members,
which means the work queue of property_validate/update() would only
be triggered for the last connector within this physical link, and
therefore the HDCP property value of other connectors would stay on
DESIRED instead of switching to ENABLED, which is NOT as expected.

[how]
Use array of AMDGPU_DM_MAX_DISPLAY_INDEX for both aconnector and
encryption status in hdcp workqueue data structure for each physical
link. For property validate/update work queue, we iterates over the
array and do similar operation/check for each connected display.

Tested-by: Daniel Wheeler <Daniel.Wheeler@amd.com>
Signed-off-by: hersen wu <hersenxs.wu@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Stable-dep-of: be593d9d91c5 ("drm/amd/display: Fix slab-use-after-free in hdcp")
Signed-off-by: Sasha Levin <sashal@kernel.org>
2025-05-09 09:41:45 +02:00