Commit graph

977,765 commits

Author SHA1 Message Date
Daniel Colascione
8b618316b7
UPSTREAM: fs: add LSM-supporting anon-inode interface
This change adds a new function, anon_inode_getfd_secure, that creates
anonymous-node file with individual non-S_PRIVATE inode to which security
modules can apply policy. Existing callers continue using the original
singleton-inode kind of anonymous-inode file. We can transition anonymous
inode users to the new kind of anonymous inode in individual patches for
the sake of bisection and review.

The new function accepts an optional context_inode parameter that callers
can use to provide additional contextual information to security modules.
For example, in case of userfaultfd, the created inode is a 'logical child'
of the context_inode (userfaultfd inode of the parent process) in the sense
that it provides the security context required during creation of the child
process' userfaultfd inode.

Signed-off-by: Daniel Colascione <dancol@google.com>
[LG: Delete obsolete comments to alloc_anon_inode()]
[LG: Add context_inode description in comments to anon_inode_getfd_secure()]
[LG: Remove definition of anon_inode_getfile_secure() as there are no callers]
[LG: Make __anon_inode_getfile() static]
[LG: Use correct error cast in __anon_inode_getfile()]
[LG: Fix error handling in __anon_inode_getfile()]
Signed-off-by: Lokesh Gidra <lokeshgidra@google.com>
Reviewed-by: Eric Biggers <ebiggers@google.com>
Signed-off-by: Paul Moore <paul@paul-moore.com>
(cherry picked from commit e7e832ce6fa769f800cd7eaebdb0459ad31e0416)
Signed-off-by: Lokesh Gidra <lokeshgidra@google.com>
Bug: 160737021
Bug: 169683130
Change-Id: I88f1821243c58454ce445fd50fd804221e0bfc67
2025-02-20 04:17:45 +02:00
Lokesh Gidra
4849cd6fa3
BACKPORT: security: add inode_init_security_anon() LSM hook
This change adds a new LSM hook, inode_init_security_anon(), that will
be used while creating secure anonymous inodes. The hook allows/denies
its creation and assigns a security context to the inode.

The new hook accepts an optional context_inode parameter that callers
can use to provide additional contextual information to security modules
for granting/denying permission to create an anon-inode of the same type.
This context_inode's security_context can also be used to initialize the
newly created anon-inode's security_context.

Signed-off-by: Lokesh Gidra <lokeshgidra@google.com>
Reviewed-by: Eric Biggers <ebiggers@google.com>
Signed-off-by: Paul Moore <paul@paul-moore.com>
(cherry picked from commit 215b674b84dd052098fe6389e32a5afaff8b4d56)

Conflicts:
    include/linux/lsm_hook_defs.h

(1. Added LSM hook in lsm_hook.h and removd lsm_hook_defs.h as per
98e828a0650f348be85728c69875260cf78069e6, which is not merged here)

Signed-off-by: Lokesh Gidra <lokeshgidra@google.com>
Bug: 160737021
Bug: 169683130
Change-Id: I83fe318c891f034b4dd7f3f357cc74964b55ffc8
2025-02-20 04:17:45 +02:00
Lokesh Gidra
a04582fb0f
UPSTREAM: userfaultfd: add user-mode only option to unprivileged_userfaultfd sysctl knob
With this change, when the knob is set to 0, it allows unprivileged users
to call userfaultfd, like when it is set to 1, but with the restriction
that page faults from only user-mode can be handled.  In this mode, an
unprivileged user (without SYS_CAP_PTRACE capability) must pass
UFFD_USER_MODE_ONLY to userfaultd or the API will fail with EPERM.

This enables administrators to reduce the likelihood that an attacker with
access to userfaultfd can delay faulting kernel code to widen timing
windows for other exploits.

The default value of this knob is changed to 0.  This is required for
correct functioning of pipe mutex.  However, this will fail postcopy live
migration, which will be unnoticeable to the VM guests.  To avoid this,
set 'vm.userfault = 1' in /sys/sysctl.conf.

The main reason this change is desirable as in the short term is that the
Android userland will behave as with the sysctl set to zero.  So without
this commit, any Linux binary using userfaultfd to manage its memory would
behave differently if run within the Android userland.  For more details,
refer to Andrea's reply [1].

[1] https://lore.kernel.org/lkml/20200904033438.GI9411@redhat.com/

Link: https://lkml.kernel.org/r/20201120030411.2690816-3-lokeshgidra@google.com
Signed-off-by: Lokesh Gidra <lokeshgidra@google.com>
Reviewed-by: Andrea Arcangeli <aarcange@redhat.com>
Cc: Kees Cook <keescook@chromium.org>
Cc: Jonathan Corbet <corbet@lwn.net>
Cc: Peter Xu <peterx@redhat.com>
Cc: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
Cc: Alexander Viro <viro@zeniv.linux.org.uk>
Cc: Stephen Smalley <stephen.smalley.work@gmail.com>
Cc: Eric Biggers <ebiggers@kernel.org>
Cc: Daniel Colascione <dancol@dancol.org>
Cc: "Joel Fernandes (Google)" <joel@joelfernandes.org>
Cc: Kalesh Singh <kaleshsingh@google.com>
Cc: Suren Baghdasaryan <surenb@google.com>
Cc: Jeff Vander Stoep <jeffv@google.com>
Cc: <calin@google.com>
Cc: Mike Rapoport <rppt@linux.vnet.ibm.com>
Cc: Shaohua Li <shli@fb.com>
Cc: Jerome Glisse <jglisse@redhat.com>
Cc: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
Cc: Johannes Weiner <hannes@cmpxchg.org>
Cc: Mel Gorman <mgorman@techsingularity.net>
Cc: Nitin Gupta <nigupta@nvidia.com>
Cc: Vlastimil Babka <vbabka@suse.cz>
Cc: Iurii Zaikin <yzaikin@google.com>
Cc: Luis Chamberlain <mcgrof@kernel.org>
Cc: Daniel Colascione <dancol@google.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
(cherry picked from commit d0d4730ac2e404a5b0da9a87ef38c73e51cb1664)
Signed-off-by: Lokesh Gidra <lokeshgidra@google.com>
Bug: 160737021
Bug: 169683130
Change-Id: Ic46c0be47d6394d25bd3443ff524936fa568ab85
2025-02-20 04:17:45 +02:00
Lokesh Gidra
c73faa2aa2
BACKPORT: userfaultfd: add UFFD_USER_MODE_ONLY
Patch series "Control over userfaultfd kernel-fault handling", v6.

This patch series is split from [1].  The other series enables SELinux
support for userfaultfd file descriptors so that its creation and movement
can be controlled.

It has been demonstrated on various occasions that suspending kernel code
execution for an arbitrary amount of time at any access to userspace
memory (copy_from_user()/copy_to_user()/...) can be exploited to change
the intended behavior of the kernel.  For instance, handling page faults
in kernel-mode using userfaultfd has been exploited in [2, 3].  Likewise,
FUSE, which is similar to userfaultfd in this respect, has been exploited
in [4, 5] for similar outcome.

This small patch series adds a new flag to userfaultfd(2) that allows
callers to give up the ability to handle kernel-mode faults with the
resulting UFFD file object.  It then adds a 'user-mode only' option to the
unprivileged_userfaultfd sysctl knob to require unprivileged callers to
use this new flag.

The purpose of this new interface is to decrease the chance of an
unprivileged userfaultfd user taking advantage of userfaultfd to enhance
security vulnerabilities by lengthening the race window in kernel code.

[1] https://lore.kernel.org/lkml/20200211225547.235083-1-dancol@google.com/
[2] https://duasynt.com/blog/linux-kernel-heap-spray
[3] https://duasynt.com/blog/cve-2016-6187-heap-off-by-one-exploit
[4] https://googleprojectzero.blogspot.com/2016/06/exploiting-recursion-in-linux-kernel_20.html
[5] https://bugs.chromium.org/p/project-zero/issues/detail?id=808

This patch (of 2):

userfaultfd handles page faults from both user and kernel code.  Add a new
UFFD_USER_MODE_ONLY flag for userfaultfd(2) that makes the resulting
userfaultfd object refuse to handle faults from kernel mode, treating
these faults as if SIGBUS were always raised, causing the kernel code to
fail with EFAULT.

A future patch adds a knob allowing administrators to give some processes
the ability to create userfaultfd file objects only if they pass
UFFD_USER_MODE_ONLY, reducing the likelihood that these processes will
exploit userfaultfd's ability to delay kernel page faults to open timing
windows for future exploits.

Link: https://lkml.kernel.org/r/20201120030411.2690816-1-lokeshgidra@google.com
Link: https://lkml.kernel.org/r/20201120030411.2690816-2-lokeshgidra@google.com
Signed-off-by: Daniel Colascione <dancol@google.com>
Signed-off-by: Lokesh Gidra <lokeshgidra@google.com>
Reviewed-by: Andrea Arcangeli <aarcange@redhat.com>
Cc: Alexander Viro <viro@zeniv.linux.org.uk>
Cc: <calin@google.com>
Cc: Daniel Colascione <dancol@dancol.org>
Cc: Eric Biggers <ebiggers@kernel.org>
Cc: Iurii Zaikin <yzaikin@google.com>
Cc: Jeff Vander Stoep <jeffv@google.com>
Cc: Jerome Glisse <jglisse@redhat.com>
Cc: "Joel Fernandes (Google)" <joel@joelfernandes.org>
Cc: Johannes Weiner <hannes@cmpxchg.org>
Cc: Jonathan Corbet <corbet@lwn.net>
Cc: Kalesh Singh <kaleshsingh@google.com>
Cc: Kees Cook <keescook@chromium.org>
Cc: Luis Chamberlain <mcgrof@kernel.org>
Cc: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
Cc: Mel Gorman <mgorman@techsingularity.net>
Cc: Mike Rapoport <rppt@linux.vnet.ibm.com>
Cc: Nitin Gupta <nigupta@nvidia.com>
Cc: Peter Xu <peterx@redhat.com>
Cc: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
Cc: Shaohua Li <shli@fb.com>
Cc: Stephen Smalley <stephen.smalley.work@gmail.com>
Cc: Suren Baghdasaryan <surenb@google.com>
Cc: Vlastimil Babka <vbabka@suse.cz>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
(cherry picked from commit 37cd0575b8510159992d279c530c05f872990b02)

Conflicts:
    include/uapi/linux/userfaultfd.h
(1. Removed uffdio_writeprotect struct part of 63b2d4174c4ad)

Bug: 160737021
Bug: 169683130
Signed-off-by: Lokesh Gidra <lokeshgidra@google.com>
Change-Id: Ic4cecce08956402f91f866ae08f1d4ec21d64289
2025-02-20 04:17:44 +02:00
Michael Bestas
c7040e764a
userfaultd: Fix mismerge of ASB-2024-11-05_11-5.4
Change-Id: I709043d9ae119d2676523b57a0b066a897591f24
2025-02-20 04:17:44 +02:00
Yan Yan
b6f910c0f0
ANDROID: GKI: Enable XFRM_MIGRATE
To be able to update addresses of an IPsec SA, as required by
supporting MOBIKE

Bug: 169169084
Signed-off-by: Yan Yan <evitayan@google.com>
Change-Id: I5aa3f3556d615e4f0695bb78cd3cad9e83851df5
2025-02-20 03:40:37 +02:00
Michael Bestas
0ef9f95480
Reapply "ANDROID: GKI: Enable CHACHA20POLY1305 and XCBC"
This reverts commit e785a25f52.

Reason for revert: Required by FCM level 6

Change-Id: I29ecf7dadf31f65432da2fa4c738b16af3381512
2025-02-20 03:40:33 +02:00
Nick Reuter
638599aca3
Partially revert "msm: ipa: Check GSI status during deepsleep resume"
This partially reverts commit 2e77a46f0d.

Reason for revert: ipa3_mdt_load_ipa_fws is not present in this kernel,
this is a bad cherrypick resolution by qcom.

Change-Id: I218978168a6c3fe9f6139a6688be1cb4c0f96b94
2025-02-14 13:41:01 +02:00
Michael Bestas
e82fabf302
Merge tag 'LA.UM.9.14.r1-25800-LAHAINA.QSSI15.0' of https://git.codelinaro.org/clo/la/platform/vendor/opensource/display-drivers into android13-5.4-lahaina
"LA.UM.9.14.r1-25800-LAHAINA.QSSI15.0"

* tag 'LA.UM.9.14.r1-25800-LAHAINA.QSSI15.0' of https://git.codelinaro.org/clo/la/platform/vendor/opensource/display-drivers:
  disp: msm: dsi: add null pointer check in dsi_display_dev_remove

 Conflicts:
	techpack/display/msm/dsi/dsi_display.c

Change-Id: Ife03a5542c77ab531a902c5b7f6c07d6a867f9b6
2025-02-14 03:39:30 +02:00
Michael Bestas
d1d77077b6
Merge tag 'LA.UM.9.14.r1-25800-LAHAINA.QSSI15.0' of https://git.codelinaro.org/clo/la/platform/vendor/opensource/dataipa into android13-5.4-lahaina
"LA.UM.9.14.r1-25800-LAHAINA.QSSI15.0"

* tag 'LA.UM.9.14.r1-25800-LAHAINA.QSSI15.0' of https://git.codelinaro.org/clo/la/platform/vendor/opensource/dataipa:
  msm: ipa: Check GSI status during deepsleep resume
  msm: ipa3: supporting hibernate & cleanup unused deepsleep API's

 Conflicts:
	techpack/dataipa/drivers/platform/msm/ipa/ipa_v3/ipa.c

Change-Id: I7a69389ca80dee1ecb236f14706965b1d2bf3adb
2025-02-14 03:34:01 +02:00
Michael Bestas
8efcbedd97
Merge tag 'LA.UM.9.14.r1-25800-LAHAINA.QSSI15.0' of https://git.codelinaro.org/clo/la/platform/vendor/opensource/camera-kernel into android13-5.4-lahaina
"LA.UM.9.14.r1-25800-LAHAINA.QSSI15.0"

* tag 'LA.UM.9.14.r1-25800-LAHAINA.QSSI15.0' of https://git.codelinaro.org/clo/la/platform/vendor/opensource/camera-kernel:
  msm: camera: isp: Copy the userdata in kernel to avoid TOCTOU condition
  msm: camera: ois: Copy packet header in kernel
  msm: camera: sensor: TOCTOU error handling
  msm: camera: common: Add missing put_cpu_buf calls

Change-Id: Ic121b19c5d8911f3e223a11389208763f5ac2229
2025-02-14 03:31:00 +02:00
Michael Bestas
cd0212695a
Merge tag 'LA.UM.9.14.r1-25800-LAHAINA.QSSI15.0' of https://git.codelinaro.org/clo/la/platform/vendor/opensource/audio-kernel into android13-5.4-lahaina
"LA.UM.9.14.r1-25800-LAHAINA.QSSI15.0"

* tag 'LA.UM.9.14.r1-25800-LAHAINA.QSSI15.0' of https://git.codelinaro.org/clo/la/platform/vendor/opensource/audio-kernel:
  asoc: codec: avoid out of bound write to map array
  asoc: codec: avoid out of bound write to map array
  asoc: Fixed OOB issue in qcs405
  asoc: codec: wcd934x: enable auto recovery when port overflows

Change-Id: I51a30fe905251b6f66e733bae43fdcd3b0a7e787
2025-02-14 03:28:21 +02:00
Michael Bestas
48d717fa96
Merge tag 'LA.UM.9.14.r1-25800-LAHAINA.QSSI15.0' of https://git.codelinaro.org/clo/la/platform/vendor/qcom-opensource/wlan/qcacld-3.0 into android13-5.4-lahaina
"LA.UM.9.14.r1-25800-LAHAINA.QSSI15.0"

* tag 'LA.UM.9.14.r1-25800-LAHAINA.QSSI15.0' of https://git.codelinaro.org/clo/la/platform/vendor/qcom-opensource/wlan/qcacld-3.0:
  qcacld-3.0: Fix the possible OOB write in country IE unpack
  qcacld-3.0: Correcting the TSInfo structure size according to the Spec
  Release 2.0.8.34Y
  qcacld-3.0: Correcting the TSInfo structure size according to the Spec
  Release 2.0.8.34X
  qcacld-3.0: Remove use-after-free of frame in tx mgmt send
  Release 2.0.8.34W
  qcacld-3.0: Fix the possible OOB write in country IE unpack
  Release 2.0.8.34V
  qcacld-3.0: Enhance the RSNXE inter-op logic
  Release 2.0.8.34U
  qcacld-3.0: Set sar safety req resp event before unsolited work stop
  Release 2.0.8.34T
  qcacld-3.0: Update connect request crypto parameters
  qcacld-3.0: Enable CFG80211_MULTI_AKM_CONNECT_SUPPORT from kernelv6.0
  qcacld-3.0: Update wiphy max_num_akms_connect variable

Change-Id: I79d549c4c8c2f38dc18509f91f12befc15bb19c6
2025-02-14 03:26:23 +02:00
Michael Bestas
db27e33f03
Merge tag 'LA.UM.9.14.r1-25800-LAHAINA.QSSI15.0' of https://git.codelinaro.org/clo/la/platform/vendor/qcom-opensource/wlan/qca-wifi-host-cmn into android13-5.4-lahaina
"LA.UM.9.14.r1-25800-LAHAINA.QSSI15.0"

* tag 'LA.UM.9.14.r1-25800-LAHAINA.QSSI15.0' of https://git.codelinaro.org/clo/la/platform/vendor/qcom-opensource/wlan/qca-wifi-host-cmn:
  qcacmn: Fix length check to parse non-inheritance list
  qcacmn: Fix issue about generating MBSSID frames
  qcacmn: Add macro to determine WPA3 AKM
  qcacmn: Correct RSNXE capability indexes
  qcacmn: Allow WAPI packet delivering if no valid peer

Change-Id: I84c3b6e3ff3a08eb4e962df88632fcc37bd942b3
2025-02-14 02:47:19 +02:00
Michael Bestas
4dece2e773
Merge tag 'LA.UM.9.14.r1-25800-LAHAINA.QSSI15.0' of https://git.codelinaro.org/clo/la/platform/vendor/qcom-opensource/wlan/fw-api into android13-5.4-lahaina
"LA.UM.9.14.r1-25800-LAHAINA.QSSI15.0"

* tag 'LA.UM.9.14.r1-25800-LAHAINA.QSSI15.0' of https://git.codelinaro.org/clo/la/platform/vendor/qcom-opensource/wlan/fw-api:
  fw-api: CL 28313244 - update fw common interface files
  fw-api: CL 28312163 - update fw common interface files
  fw-api: CL 28311952 - update fw common interface files
  fw-api: CL 28298732 - update fw common interface files
  fw-api: CL 28298000 - update fw common interface files
  fw-api: CL 28214991 - update fw common interface files
  fw-api: CL 28142292 - update fw common interface files
  fw-api: CL 28121255 - update fw common interface files
  fw-api: CL 28111557 - update fw common interface files
  fw-api: CL 28109039 - update fw common interface files
  fw-api: CL 28108516 - update fw common interface files
  fw-api: CL 28092531 - update fw common interface files
  fw-api: CL 28087373 - update fw common interface files
  fw-api: CL 28063488 - update fw common interface files
  fw-api: CL 28063775 - update fw common interface files
  fw-api: CL 28053398 - update fw common interface files
  fw-api: CL 28043541 - update fw common interface files
  fw-api: CL 28034615 - update fw common interface files
  fw-api: CL 28021676 - update fw common interface files
  fw-api: CL 28002815 - update fw common interface files
  fw-api: CL 27995720 - update fw common interface files
  fw-api: CL 27993660 - update fw common interface files
  fw-api: CL 27983080 - update fw common interface files
  fw-api: CL 27964384 - update fw common interface files
  fw-api: CL 27942817 - update fw common interface files
  fw-api: CL 27940458 - update fw common interface files
  fw-api: CL 27931985 - update fw common interface files
  fw-api: CL 27929485 - update fw common interface files
  fw-api: CL 27920732 - update fw common interface files
  fw-api: CL 27912893 - update fw common interface files
  fw-api: CL 27902326 - update fw common interface files
  fw-api: CL 27885947 - update fw common interface files
  fw-api: CL 27875409 - update fw common interface files
  fw-api: CL 27869351 - update fw common interface files
  fw-api: Add REO2SW1 ring status address to peach and kiwi
  fw-api: CL 27854709 - update fw common interface files
  fw-api: CL 27833624 - update fw common interface files
  fw-api: CL 27833622 - update fw common interface files
  fw-api: CL 27829186 - update fw common interface files
  fw-api: CL 27814056 - update fw common interface files
  fw-api: CL 27796261 - update fw common interface files
  fw-api: CL 27786552 - update fw common interface files
  fw-api: CL 27773686 - update fw common interface files
  fw-api: CL 27771965 - update fw common interface files
  fw-api: CL 27741883 - update fw common interface files
  fw-api: CL 27739788 - update fw common interface files
  fw-api: CL 27733361 - update fw common interface files
  fw-api: CL 27708433 - update fw common interface files
  fw-api: CL 27688085 - update fw common interface files
  fw-api: CL 27676361 - update fw common interface files
  fw-api: CL 27676510 - update fw common interface files
  fw-api: CL 27676646 - update fw common interface files
  fw-api: CL 27667035 - update fw common interface files
  fw-api: CL 27656641 - update fw common interface files
  fw-api: CL 27618422 - update fw common interface files
  fw-api: CL 27594770 - update fw common interface files
  fw-api: CL 27586781 - update fw common interface files
  fw-api: CL 27577821 - update fw common interface files
  fw-api: CL 27552754 - update fw common interface files
  fw-api: CL 27518685 - update fw common interface files
  fw-api: CL 27510301 - update fw common interface files
  fw-api: CL 27497193 - update fw common interface files
  fw-api: CL 27465688 - update fw common interface files
  fw-api: Add NAN file to host driver also
  fw-api: CL 27444604 - update fw common interface files
  fw-api: CL 27418163 - update fw common interface files
  fw-api: CL 27407027 - update fw common interface files
  fw-api: CL 27360144 - update fw common interface files
  fw-api: CL 27338232 - update fw common interface files
  fw-api: CL 27334210 - update fw common interface files
  fw-api: CL 27314804 - update fw common interface files
  fw-api: CL 27232968 - update fw common interface files
  fw-api: CL 27213127 - update fw common interface files
  fw-api: CL 27205261 - update fw common interface files
  fw-api: CL 27193005 - update fw common interface files
  fw-api: CL 27179058 - update fw common interface files

Change-Id: Idbf9e80f677fa3702366d7766ca65265cf42f98a
2025-02-14 02:45:49 +02:00
Michael Bestas
b964d75b7e
Merge tag 'LA.UM.9.14.r1-25800-LAHAINA.QSSI15.0' of https://git.codelinaro.org/clo/la/kernel/msm-5.4 into android13-5.4-lahaina
"LA.UM.9.14.r1-25800-LAHAINA.QSSI15.0"

* tag 'LA.UM.9.14.r1-25800-LAHAINA.QSSI15.0' of https://git.codelinaro.org/clo/la/kernel/msm-5.4:
  msm: eva: Validating the SFR buffer size before accessing
  msm: eva: Copy back the validated size to avoid security issue
  msm: npu: Fix use after free issue
  USB: dwc3: gadget: Add stop transfer request for isoc transfers
  arm64: defconfig: Enable uvc for QCM6490 IOT target
  firmware: qcom_scm: do not clear dump mode from shutdown
  msm: virtio_npu: Fix use-after-free issue in unmap_buf
  msm: virtio_npu: Fix use-after-free issue in virt_npu_map_buf
  i2c: i2c-master-msm-geni: add null pointer check in event call back
  firmware: qcom_scm: handle echo b > /proc/sysrq-trigger
  scripts: mod: replace with a safe function
  msm: ep_pcie: Disable hot reset and ignore linkdown
  coresight-tmc: Replace deprecated function
  USB: dwc3: gadget: Queue data for 16 micro frames ahead in future
  power: reset: Disable support of dynamic download mode (ramdump)

 Conflicts:
	arch/arm64/boot/dts/vendor/bindings/sound/rt5645.txt

Change-Id: I57c063465c2804c77c5a6f62acb6c7987a38bc7f
2025-02-14 02:42:56 +02:00
Michael Bestas
b9715311a2
Merge tag 'ASB-2025-02-05_11-5.4' of https://android.googlesource.com/kernel/common into android13-5.4-lahaina
https://source.android.com/docs/security/bulletin/2025-02-01
CVE-2024-53104
CVE-2025-0088

* tag 'ASB-2025-02-05_11-5.4' of https://android.googlesource.com/kernel/common: (449 commits)
  ANDROID: gki - change networking configuration
  ANDROID: kernelci build-break for 64-bit riscv clang builds (5.4 only)
  Revert "BACKPORT: RISC-V: Stop relying on GCC's register allocator's hueristics"
  Revert "ANDROID: declare sp_in_global outside of CONFIG_FRAME_POINTER"
  ANDROID: GKI: add Trimble symbol list
  UPSTREAM: selinux: ignore unknown extended permissions
  ANDROID: ABI: Update allowed list for galaxy
  Revert "netfilter: Replace zero-length array with flexible-array member"
  Revert "tracing: Constify string literal data member in struct trace_event_call"
  Revert "skb_expand_head() adjust skb->truesize incorrectly"
  Linux 5.4.289
  ftrace: use preempt_enable/disable notrace macros to avoid double fault
  mm: vmscan: account for free pages to prevent infinite Loop in throttle_direct_reclaim()
  drm: adv7511: Drop dsi single lane support
  net/sctp: Prevent autoclose integer overflow in sctp_association_init()
  sky2: Add device ID 11ab:4373 for Marvell 88E8075
  pinctrl: mcp23s08: Fix sleeping in atomic context due to regmap locking
  RDMA/uverbs: Prevent integer overflow issue
  modpost: fix the missed iteration for the max bit in do_input()
  modpost: fix input MODULE_DEVICE_TABLE() built for 64-bit on 32-bit host
  ...

 Conflicts:
	arch/arm64/boot/dts/vendor/bindings/clock/adi,axi-clkgen.yaml
	arch/arm64/boot/dts/vendor/bindings/clock/axi-clkgen.txt
	drivers/rpmsg/qcom_glink_native.c
	drivers/soc/qcom/socinfo.c

Change-Id: I60727e0cdd974fda5ca71f938bc2f984a8bbf19a
2025-02-06 22:53:05 +02:00
Michael Bestas
1917162586
arm64: Only enable CC_HAVE_STACKPROTECTOR_SYSREG for GCC
When STACKPROTECTOR_PER_TASK is enabled, __stack_chk_guard is not
exported which breaks external modules due to missing symbols.

Change-Id: I633dcdd3343f63f6af34aab87e98cc81c6c56fe2
2025-02-04 21:35:49 +02:00
Swami Reddy Reddy
771c29041c
msm: camera: sensor: TOCTOU error handling
- Proper Handling in case of invalid pinctrl index
- Removing dead code and unused variables
- Change to dereference s_ctrl only after proper
  NULL Dereference Check.

CRs-Fixed: 3875406
Change-Id: I8e2c717b22efff2a7d6503d38c048e30eff230da
Signed-off-by: Swami Reddy Reddy <quic_swamired@quicinc.com>
2025-02-04 21:35:46 +02:00
Maciej Żenczykowski
c1ccccc765 ANDROID: gki - change networking configuration
Make the following configuration changes:
  CONFIG_NET_CLS_MATCHALL=y
  CONFIG_NET_ACT_POLICE=y
  CONFIG_NET_ACT_BPF=y
  CONFIG_USB_RTL8150=y
  CONFIG_USB_NET_CDC_EEM=y
  CONFIG_USB_NET_CDC_NCM=y
  CONFIG_USB_NET_AQC111=y

Note: 4 of these are already enabled in android12-5.4,
and the remaining 3 will be enabled as well in
https://android-review.googlesource.com/c/kernel/common/+/3470489

Test: TreeHugger
Bug: 377436524
Bug: 391669319
Signed-off-by: Maciej Żenczykowski <maze@google.com>
Change-Id: I1737c1e18a072cac9dd50e4d21b52b220c2ec40c
2025-02-04 09:51:11 -08:00
Todd Kjos
26399219f0 ANDROID: kernelci build-break for 64-bit riscv clang builds (5.4 only)
No 64-bit riscv builds were working with clang (found via kernelci) for our 5.4 kernels:

ld.lld: error: arch/riscv/built-in.a(kernel/signal.o):(function do_notify_resume: .text+0x30c): relocation R_RISCV_PCREL_HI20 out of range: 33554406 is not in [-524288, 524287]; references '__vdso_rt_sigreturn'
>>> referenced by signal.c
>>> defined in arch/riscv/built-in.a(kernel/vdso/vdso-syms.o)

There are two ANDROID-specific patches that added global variables that
must be reverted to fix the build:

f06e9ec979 ("BACKPORT: RISC-V: Stop relying on GCC's register allocator's hueristics")
3818981c3332 ("ANDROID: declare sp_in_global outside of CONFIG_FRAME_POINTER")

Also, CONFIG_INIT_STACK_ALL_PATTERN must be disabled to avoid the
relocation issues.

These issues all seem to be fixed in 5.10 and later kernels.

Bug: 393656515
Signed-off-by: Todd Kjos <tkjos@google.com>
Change-Id: I0a5395a9767b94ec2291c9ef7e9a69f1f4665730
2025-01-31 16:42:47 -08:00
Todd Kjos
2c4041228e Revert "BACKPORT: RISC-V: Stop relying on GCC's register allocator's hueristics"
This reverts commit f06e9ec979.

Breaks 64-bit riscv builds in kernelci

Bug: 393656515
Change-Id: I3a4cf13f4ebde7d84f4d9b6f88729b7afb9735f7
Signed-off-by: Todd Kjos <tkjos@google.com>
2025-01-31 16:42:39 -08:00
Todd Kjos
c065d06153 Revert "ANDROID: declare sp_in_global outside of CONFIG_FRAME_POINTER"
This reverts commit 3818981c333235449aa71c20848b175571a0c1cb.

Breaks 64-bit riscv builds in kernelci

Bug: 393656515
Change-Id: Ia980771e1895e2360a7e9ec6eca8ff495123bdd7
Signed-off-by: Todd Kjos <tkjos@google.com>
2025-01-31 16:42:22 -08:00
Tommy Webb
45610a015f Revert "usb: dwc3: dwc3-msm: Save dr_mode from DWC3 core node into mdwc"
This reverts commit 6dea6a501418e1561d48f141d288866d71684372.

Reason for revert: Prevents device from entering deep sleep (possibly
improper port).

NOTE: dwc3_msm_role_allowed was added in a later change, specifically
"usb: dwc3: dwc3-msm-core: Reject incompatible role/mode request", but
it is necessary to modify it here due to that change's dependency
on dr_mode being present where it is no longer available
after this revert (it is available elsewhere).

Issue: https://gitlab.com/LineageOS/issues/android/-/issues/8226
Issue: calyxos#2970
Change-Id: I03e9b7960d62999e019464b538a2642644e7fc6c
2025-01-29 20:14:01 +00:00
Linux Build Service Account
c96b7bed76 Merge "msm: eva: Copy back the validated size to avoid security issue" into kernel.lnx.5.4.r1-rel 2025-01-24 04:34:56 -08:00
Pulkit Singh Tak
d7c484822f msm: eva: Validating the SFR buffer size before accessing
To avoid any OOB write or other security issues, it's good to
validate the buffer size before accessing it.

Change-Id: Ibfdef21293c9385119cfb6338ef36e20c0fc1f2f
Signed-off-by: Pulkit Singh Tak <quic_ptak@quicinc.com>
(cherry picked from commit 8ee6cd6bef)
2025-01-23 23:42:16 -08:00
Madhu Ananthula
f4425004fe msm: eva: Copy back the validated size to avoid security issue
As we are reading the packet from a shared queue, there is a
possibility to corrupt the packet->size data of shared queue by
malicious FW after validating it in the kernel driver.

Change-Id: I9bff8f2daa64054eada37de54fe3fa837d57b22a
Signed-off-by: Aniruddh Sharma <quic_anirshar@quicinc.com>
Signed-off-by: Madhu Ananthula <quic_mananthu@quicinc.com>
(cherry picked from commit bb8a45801d)
2025-01-23 23:33:17 -08:00
Sultan Alsawaf
e21e264ca9
usb: dwc3: msm: Enforce usb_data_enabled by blocking role switches
Block USB enumeration from the get-go by blocking role switches away from
USB_ROLE_NONE when usb_data_enabled is false.

Change-Id: I0eff78e56e4a3b64262f220a085cfec5910baf30
Signed-off-by: Sultan Alsawaf <sultan@osomprivacy.com>
2025-01-23 15:28:30 +02:00
Pavankumar Kondeti
c22c572f86
usb: dwc3: dwc3-msm-core: Reject incompatible role/mode request
If USB controller is configured to work in a specific mode, reject
any compatible role/mode request. For example, if device mode is
only allowed, switching to host mode/role is not allowed. The current
code allows this and it results in accessing invalid dwc host structures.

Change-Id: I5e4d905c8240ad228f48b40fe36298029d8770e1
Signed-off-by: Pavankumar Kondeti <quic_pkondeti@quicinc.com>
2025-01-23 15:28:29 +02:00
Wesley Cheng
8f05d443e4
usb: dwc3: dwc3-msm: Save dr_mode from DWC3 core node into mdwc
To avoid dependencies for the DWC3 core device to be present during
dwc3_msm_probe(), read out the dr_mode property from the DT node directly.
Since this property can not dynamically change, it will be the same per
compile time setting.

Change-Id: I3b56bde13af141ea01f06ea5b81e44bc034bf7b1
Signed-off-by: Wesley Cheng <wcheng@codeaurora.org>
2025-01-23 15:28:29 +02:00
Tommy Webb
5c0c40f028
Revert "usb: dwc3: Handle charging behavior when usb data is disabled"
This reverts commit f60138b6bc.

Reason for revert: Conflicts with upstream changes.

Change-Id: Ic376c5d1b2fe9e5ae961c1114375ffbc3ae781f3
2025-01-23 15:28:28 +02:00
Greg Kroah-Hartman
4c8fb32758 Merge tag 'android11-5.4.289_r00' into android11-5.4
This merges the android11-5.4.289_r00 tag into the android11-5.4 branch,
catching it up with the latest LTS releases.

It contains the following commits:

* b9aba1f4e2 Revert "netfilter: Replace zero-length array with flexible-array member"
* 196c9546b3 Revert "tracing: Constify string literal data member in struct trace_event_call"
* c32bcb5cc0 Revert "skb_expand_head() adjust skb->truesize incorrectly"
*   a85d92d704 Merge 5.4.289 into android11-5.4-lts
|\
| * 7f0e075be1 Linux 5.4.289
| * 177516053e ftrace: use preempt_enable/disable notrace macros to avoid double fault
| * 66cd37660e mm: vmscan: account for free pages to prevent infinite Loop in throttle_direct_reclaim()
| * bad27f62d8 drm: adv7511: Drop dsi single lane support
| * 94b7ed0a48 net/sctp: Prevent autoclose integer overflow in sctp_association_init()
| * 9efc2a85ed sky2: Add device ID 11ab:4373 for Marvell 88E8075
| * 788d9e9a41 pinctrl: mcp23s08: Fix sleeping in atomic context due to regmap locking
| * c57721b24b RDMA/uverbs: Prevent integer overflow issue
| * 213305a1cb modpost: fix the missed iteration for the max bit in do_input()
| * f072e43697 modpost: fix input MODULE_DEVICE_TABLE() built for 64-bit on 32-bit host
| * 6103478629 ARC: build: Try to guess GCC variant of cross compiler
| * 512929f115 irqchip/gic: Correct declaration of *percpu_base pointer in union gic_base
| * 520e02b7fe net: usb: qmi_wwan: add Telit FE910C04 compositions
| * f960a6b5d9 bpf: fix potential error return
| * 8929492594 sound: usb: format: don't warn that raw DSD is unsupported
| * 155f6a7e0a wifi: mac80211: wake the queues in case of failure in resume
| * 1638f430f8 ila: serialize calls to nf_register_net_hooks()
| * 560cbdd26b af_packet: fix vlan_get_protocol_dgram() vs MSG_PEEK
| * 66ffb0cf21 af_packet: fix vlan_get_tci() vs MSG_PEEK
| * 7b91cd2a43 ALSA: usb-audio: US16x08: Initialize array before use
| * 6889d622b1 net: llc: reset skb->transport_header
| * 352f8eaaab netfilter: nft_set_hash: unaligned atomic read on struct nft_set_ext
| * 9857e028d4 netfilter: Replace zero-length array with flexible-array member
| * 64e9f54a14 netrom: check buffer length before accessing it
| * 53425075fb drm/bridge: adv7511_audio: Update Audio InfoFrame properly
| * 6ffd9a346f drm: bridge: adv7511: Enable SPDIF DAI
| * eea3fbfcbd RDMA/bnxt_re: Fix max_qp_wrs reported
| * cddb0c59fc RDMA/bnxt_re: Fix reporting hw_ver in query_device
| * 1dcf5cb17d RDMA/bnxt_re: Add check for path mtu in modify_qp
| * 4e726e6b5f RDMA/mlx5: Enforce same type port association for multiport RoCE
| * 63e7bc7261 net/mlx5: Make API mlx5_core_is_ecpf accept const pointer
| * bb92b36156 IB/mlx5: Introduce and use mlx5_core_is_vf()
| * f091a224a2 Drivers: hv: util: Avoid accessing a ringbuffer not initialized yet
| * f45a77dd24 selinux: ignore unknown extended permissions
| * b3a3d5333c ipv6: prevent possible UAF in ip6_xmit()
| * 43e7958cf7 skb_expand_head() adjust skb->truesize incorrectly
| * 3d770d44dd btrfs: avoid monopolizing a core when activating a swap file
| * 30080cdde6 tracing: Constify string literal data member in struct trace_event_call
| * 078f7e1521 bpf: fix recursive lock when verdict program return SK_PASS
| * ae8512e93f ipv6: fix possible UAF in ip6_finish_output2()
| * 81d626b00b ipv6: use skb_expand_head in ip6_xmit
| * 1598154fd2 ipv6: use skb_expand_head in ip6_finish_output2
| * 7e13e59bf6 skbuff: introduce skb_expand_head()
| * 0d1a6cd2d7 MIPS: Probe toolchain support of -msym32
| * 59a9c2a351 epoll: Add synchronous wakeup support for ep_poll_callback
| * d738f3215b virtio-blk: don't keep queue frozen during system suspend
| * 4ed6d56e85 scsi: mpt3sas: Diag-Reset when Doorbell-In-Use bit is set during driver load time
| * 436df0cfe8 platform/x86: asus-nb-wmi: Ignore unknown event 0xCF
| * c2dae50ddb regmap: Use correct format specifier for logging range errors
| * 78afb9bfad scsi: megaraid_sas: Fix for a potential deadlock
| * de349d2382 scsi: qla1280: Fix hw revision numbering for ISP1020/1040
| * 0146a07f95 tracing/kprobe: Make trace_kprobe's module callback called after jump_label update
| * ca9818554b mtd: rawnand: fix double free in atmel_pmecc_create_user()
| * 3d229600c5 dmaengine: at_xdmac: avoid null_prt_deref in at_xdmac_prep_dma_memset
| * 3e351d0279 dmaengine: mv_xor: fix child node refcount handling in early exit
| * 677e77d2b5 phy: core: Fix that API devm_phy_destroy() fails to destroy the phy
| * ce14e466d5 phy: core: Fix that API devm_phy_put() fails to release the phy
| * 696bb5ec8e phy: core: Fix an OF node refcount leakage in of_phy_provider_lookup()
| * 99ac4a47a0 phy: core: Fix an OF node refcount leakage in _of_phy_get()
| * 63055e47cf mtd: diskonchip: Cast an operand to prevent potential overflow
| * aa577b51d5 nfsd: restore callback functionality for NFSv4.0
| * 06f6b1717c bpf: Check negative offsets in __bpf_skb_min_len()
| * 035772fcd6 media: dvb-frontends: dib3000mb: fix uninit-value in dib3000_write_reg
| * f15dec32fb of: Fix refcount leakage for OF node returned by __of_get_dma_parent()
| * 24937f999b of: Fix error path in of_parse_phandle_with_args_map()
| * cb70f37c10 udmabuf: also check for F_SEAL_FUTURE_WRITE
| * 55e4baa0d3 nilfs2: prevent use of deleted inode
| * 353e49dd5d of/irq: Fix using uninitialized variable @addr_len in API of_irq_parse_one()
| * 40c6a6b6bd NFS/pnfs: Fix a live lock between recalled layouts and layoutget
| * 703388839b btrfs: tree-checker: reject inline extent items with 0 ref count
| * 9202cc7852 zram: refuse to use zero sized block device as backing device
| * fa6f0fbb1c sh: clk: Fix clk_enable() to return 0 on NULL clk
| * a36572118c USB: serial: option: add Telit FE910C04 rmnet compositions
| * dfe21fb44e USB: serial: option: add MediaTek T7XX compositions
| * e3374308d2 USB: serial: option: add Netprisma LCUK54 modules for WWAN Ready
| * dafbc0d826 USB: serial: option: add MeiG Smart SLM770A
| * a678147a6b USB: serial: option: add TCL IK512 MBIM & ECM
| * dbb8df1d30 efivarfs: Fix error on non-existent file
| * e062021441 i2c: riic: Always round-up when calculating bus period
| * 8e9f1f405a chelsio/chtls: prevent potential integer overflow on 32bit
| * 4b794b6e59 mmc: sdhci-tegra: Remove SDHCI_QUIRK_BROKEN_ADMA_ZEROLEN_DESC quirk
| * f89fae2cd2 netfilter: ipset: Fix for recursive locking warning
| * cb743fe159 net: ethernet: bgmac-platform: fix an OF node reference leak
| * 5fcc7e6643 net: hinic: Fix cleanup in create_rxqs/txqs()
| * fe65c3e36a ionic: use ee->offset when returning sprom data
| * c9d5f2776c net/smc: check sndbuf_space again after NOSPACE flag is set in smc_poll
| * 70a727901d erofs: fix incorrect symlink detection in fast symlink
| * 17a0cdbd7b erofs: fix order >= MAX_ORDER warning due to crafted negative i_size
| * 0430f13291 drm/i915: Fix memory leak by correcting cache object name in error handler
| * e00e6283e9 i2c: pnx: Fix timeout in wait functions
| * 7d7fed7f2a PCI: Add ACS quirk for Broadcom BCM5760X NIC
| * 8f9e9c8d08 ALSA: usb: Fix UBSAN warning in parse_audio_unit()
| * d41fcaa12a PCI/AER: Disable AER service on suspend
| * f413230a1f usb: dwc2: gadget: Don't write invalid mapped sg entries into dma_desc with iommu enabled
| * 44782565e1 net: sched: fix ordering of qlen adjustment
* | 4d8aad9b5e Merge 5.4.288 into android11-5.4-lts
|\|
| * e0646975af Linux 5.4.288
| * 1102fb2aa4 ALSA: usb-audio: Fix a DMA to stack memory bug
| * 20f7f0cf7a xen/netfront: fix crash when removing device
| * 20df02cb98 tracing/kprobes: Skip symbol counting logic for module symbols in create_local_trace_kprobe()
| * fb5b4d675d KVM: arm64: Ignore PMCNTENSET_EL0 while checking for overflow status
| * 2870cd0286 blk-iocost: Avoid using clamp() on inuse in __propagate_weights()
| * a3b64f8ac1 blk-iocost: fix weight updates of inner active iocgs
| * 24075e3895 blk-iocost: clamp inuse and skip noops in __propagate_weights()
| * 8c29e7ece6 ACPICA: events/evxfregn: don't release the ContextMutex that was never acquired
| * 83c6ab12f0 net/sched: netem: account for backlog updates from child qdisc
| * 26a5f515ef qca_spi: Make driver probing reliable
| * f07818a854 qca_spi: Fix clock speed for multiple QCA7000
| * 0e7585572a ACPI: resource: Fix memory resource type union access
| * 3aa2ef7ffd net: lapb: increase LAPB_HEADER_LEN
| * d1d4dfb189 tipc: fix NULL deref in cleanup_bearer()
| * 89d94cf7a7 batman-adv: Do not let TT changes list grows indefinitely
| * 0d2fbae5f5 batman-adv: Remove uninitialized data in full table TT response
| * 860e733982 batman-adv: Do not send uninitialized TT changes
| * 1b0d7e51ac bpf, sockmap: Fix update element with same
| * 0520483177 xfs: don't drop errno values when we fail to ficlone the entire range
| * 4efdfdc32d usb: gadget: u_serial: Fix the issue that gs_start_io crashed due to accessing null pointer
| * 357219c16f usb: ehci-hcd: fix call balance of clocks handling routines
| * 2da6e4d35d usb: dwc2: hcd: Fix GetPortStatus & SetPortFeature
| * efd985332e ata: sata_highbank: fix OF node reference leak in highbank_initialize_phys()
| * d4b2afe2fa usb: host: max3421-hcd: Correctly abort a USB request.
* | d93411f753 Revert "cgroup: Make operations on the cgroup root_list RCU safe"
* | 0f76afd374 Revert "cgroup: Move rcu_head up near the top of cgroup_root"
* | ad8d63bdc6 Merge 5.4.287 into android11-5.4-lts
|\|
| * 6708005a36 Linux 5.4.287
| * 7eb794e1a9 bpf, xdp: Update devmap comments to reflect napi/rcu usage
| * a632bdcb35 ALSA: usb-audio: Fix out of bounds reads when finding clock sources
| * 4fed24bf45 PCI: rockchip-ep: Fix address translation unit programming
| * e0e1cde240 Revert "drm/amdgpu: add missing size check in amdgpu_debugfs_gprwave_read()"
| * 42c5ed5252 modpost: Add .irqentry.text to OTHER_SECTIONS
| * 89236868a1 ocfs2: Revert "ocfs2: fix the la space leak when unmounting an ocfs2 volume"
| * 54832216f1 jffs2: Fix rtime decompressor
| * 421f9e9f0f jffs2: Prevent rtime decompress memory corruption
| * 4098c94097 KVM: arm64: vgic-its: Clear ITE when DISCARD frees an ITE
| * 0ba044be2b KVM: arm64: vgic-its: Clear DTE when MAPD unmaps a device
| * 3c6c631f28 KVM: arm64: vgic-its: Add a data length check in vgic_its_save_*
| * c0978ecb28 perf/x86/intel/pt: Fix buffer full but size is 0 case
| * 119f470a31 Revert "unicode: Don't special case ignorable code points"
| * 0f170e91d3 bpf: fix OOB devmap writes when deleting elements
| * 8b69c887f1 xdp: Simplify devmap cleanup
| * 9ab3a1aaa5 misc: eeprom: eeprom_93cx6: Add quirk for extra read clock cycle
| * 0b94d83801 powerpc/prom_init: Fixup missing powermac #size-cells
| * e99a36ed0c usb: chipidea: udc: handle USB Error Interrupt if IOC not set
| * 9a2173660e i3c: Use i3cdev->desc->info instead of calling i3c_device_get_info() to avoid deadlock
| * 44c73d8f4f PCI: Add ACS quirk for Wangxun FF5xxx NICs
| * 88da5d46b6 PCI: Add 'reset_subordinate' to reset hierarchy below bridge
| * ac8aaf78bd f2fs: fix f2fs_bug_on when uninstalling filesystem call f2fs_evict_inode.
| * 77ae53c490 nvdimm: rectify the illogical code within nd_dax_probe()
| * 61b32d4af7 pinctrl: qcom-pmic-gpio: add support for PM8937
| * 631c1e6b68 scsi: st: Add MTIOCGET and MTLOAD to ioctls allowed after device reset
| * e6e6045f86 scsi: st: Don't modify unknown block number in MTIOCGET
| * 84b42d5b5f leds: class: Protect brightness_show() with led_cdev->led_access mutex
| * c67aeff289 tracing: Use atomic64_inc_return() in trace_clock_counter()
| * 383833f04c netpoll: Use rcu_access_pointer() in __netpoll_setup
| * 6978e400bf net/neighbor: clear error in case strict check is not set
| * cf0d36cf00 rocker: fix link status detection in rocker_carrier_init()
| * 97ecf3dbdd ASoC: hdmi-codec: reorder channel allocation list
| * 802216bc7b Bluetooth: btusb: Add RTL8852BE device 0489:e123 to device tables
| * 342f87d263 wifi: brcmfmac: Fix oops due to NULL pointer dereference in brcmf_sdiod_sglist_rw()
| * d336bf8680 wifi: ipw2x00: libipw_rx_any(): fix bad alignment
| * b5807a0895 drm/amdgpu: set the right AMDGPU sg segment limitation
| * b15000bcbe jfs: add a check to prevent array-index-out-of-bounds in dbAdjTree
| * b62f41aeec jfs: fix array-index-out-of-bounds in jfs_readdir
| * bbb24ce7f0 jfs: fix shift-out-of-bounds in dbSplit
| * 25f1e673ef jfs: array-index-out-of-bounds fix in dtReadFirst
| * 685ee05004 wifi: ath5k: add PCI ID for Arcadyan devices
| * b10be84272 wifi: ath5k: add PCI ID for SX76X
| * f2709d1271 net: inet6: do not leave a dangling sk pointer in inet6_create()
| * f8a3f255f7 net: inet: do not leave a dangling sk pointer in inet_create()
| * 1d5fe782c0 net: ieee802154: do not leave a dangling sk pointer in ieee802154_create()
| * 884ae8bcee net: af_can: do not leave a dangling sk pointer in can_create()
| * f6ad641646 Bluetooth: L2CAP: do not leave dangling sk pointer on error in l2cap_sock_create()
| * 71b22837a5 af_packet: avoid erroring out after sock_init_data() in packet_create()
| * 4803d81373 net/sched: cbs: Fix integer overflow in cbs_set_port_rate()
| * fb5b3a35c6 net: ethernet: fs_enet: Use %pa to format resource_size_t
| * e0e2dabcf0 net: fec_mpc52xx_phy: Use %pa to format resource_size_t
| * c2c01ee592 samples/bpf: Fix a resource leak
| * cb8ae56d73 drm/radeon/r600_cs: Fix possible int overflow in r600_packet3_check()
| * 4c245d6d19 drm/mcde: Enable module autoloading
| * 920c9149bd drm: panel-orientation-quirks: Add quirk for AYA NEO 2 model
| * 30af4d9845 media: cx231xx: Add support for Dexatek USB Video Grabber 1d19:6108
| * a6ba781b0b media: uvcvideo: Add a quirk for the Kaiweets KTI-W02 infrared camera
| * 238e3af849 s390/cpum_sf: Handle CPU hotplug remove during sampling
| * 4eb49404de mmc: core: Further prevent card detect during shutdown
| * f44895aa11 regmap: detach regmap from dev on regmap_exit
| * 83df6a591a dma-buf: fix dma_fence_array_signaled v4
| * 4379c58284 bcache: revert replacing IS_ERR_OR_NULL with IS_ERR again
| * 09d6d05579 nilfs2: fix potential out-of-bounds memory access in nilfs_find_entry()
| * 0bdf3905cd scsi: qla2xxx: Remove check req_sg_cnt should be equal to rsp_sg_cnt
| * ad7556f1b8 scsi: qla2xxx: Supported speed displayed incorrectly for VPorts
| * 541236f95a scsi: qla2xxx: Fix NVMe and NPIV connect issue
| * 4f394bf499 ocfs2: update seq_file index in ocfs2_dlm_seq_next
| * a1c78bcc70 tracing: Fix cmp_entries_dup() to respect sort() comparison rules
| * d031eef3cc HID: wacom: fix when get product name maybe null pointer
| * f247471e3a bpf: Fix exact match conditions in trie_get_next_key()
| * 50e06cbb60 bpf: Handle BPF_EXIST and BPF_NOEXIST for LPM trie
| * 911fcc95b5 ocfs2: free inode when ocfs2_get_init_inode() fails
| * d0cde3911c spi: mpc52xx: Add cancel_work_sync before module remove
| * 905d82e6e7 tcp_bpf: Fix the sk_mem_uncharge logic in tcp_bpf_sendmsg
| * 079484a928 drm/sti: Add __iomem for mixer_dbg_mxn's parameter
| * 53ff0caa6a gpio: grgpio: Add NULL check in grgpio_probe
| * c2d1bc4163 gpio: grgpio: use a helper variable to store the address of ofdev->dev
| * eb30e6b51a crypto: x86/aegis128 - access 32-bit arguments as 32-bit
| * 7475e47200 x86/asm: Reorder early variables
| * 87106169b4 xen: Fix the issue of resource not being properly released in xenbus_dev_probe()
| * 1c264dd643 xen/xenbus: fix locking
| * 7c138d1284 xenbus/backend: Protect xenbus callback with lock
| * bae18180aa xenbus/backend: Add memory pressure handler callback
| * 892ad83f20 xen/xenbus: reference count registered modules
| * 98d62cf0e2 netfilter: nft_set_hash: skip duplicated elements pending gc run
| * e5e2d30247 netfilter: ipset: Hold module reference while requesting a module
| * 4458046617 igb: Fix potential invalid memory access in igb_init_module()
| * 5cabe42ead net/qed: allow old cards not supporting "num_images" to work
| * 4e69457f9d tipc: Fix use-after-free of kernel socket in cleanup_bearer().
| * bd09e2482d tipc: add new AEAD key structure for user API
| * 0b8f0026bb tipc: enable creating a "preliminary" node
| * 6b7fbc30ec tipc: add reference counter to bearer
| * 623be080ab dccp: Fix memory leak in dccp_feat_change_recv
| * a95808252e net/ipv6: release expired exception dst cached in socket
| * 224e606a8d can: j1939: j1939_session_new(): fix skb reference counting
| * dfc2e58028 net/sched: tbf: correct backlog statistic for GSO packets
| * 147a42bb02 netfilter: x_tables: fix LED ID check in led_tg_check()
| * 31d1ddc1ce ipvs: fix UB due to uninitialized stack access in ip_vs_protocol_init()
| * 9c6c2d0d43 can: sun4i_can: sun4i_can_err(): fix {rx,tx}_errors statistics
| * f8138cba7b can: sun4i_can: sun4i_can_err(): call can_change_state() even if cf is NULL
| * 5ba0a19a6f watchdog: mediatek: Make sure system reset gets asserted in mtk_wdt_restart()
| * b467087053 iTCO_wdt: mask NMI_NOW bit for update_no_reboot_bit() call
| * f145c9924c drm/etnaviv: flush shader L1 cache after user commandstream
| * a85364f0d3 nfsd: fix nfs4_openowner leak when concurrent nfsd4_open occur
| * e2fa0d0e32 nfsd: make sure exp active before svc_export_show
| * c470d6194f dm thin: Add missing destroy_work_on_stack()
| * c2f0ce2411 i3c: master: Fix miss free init_dyn_addr at i3c_master_put_i3c_addrs()
| * 7cd787499d util_macros.h: fix/rework find_closest() macros
| * 18fb33df1d ad7780: fix division by zero in ad7780_write_raw()
| * a42d050d07 clk: qcom: gcc-qcs404: fix initial rate of GPLL3
| * 43ca32ce12 ftrace: Fix regression with module command in stack_trace_filter
| * f9248e2f73 ovl: Filter invalid inodes with missing lookup function
| * cf642904be media: platform: allegro-dvt: Fix possible memory leak in allocate_buffers_internal()
| * 6ef14ba50a media: gspca: ov534-ov772x: Fix off-by-one error in set_frame_rate()
| * 214db0ab96 media: venus: Fix pm_runtime_set_suspended() with runtime pm enabled
| * ced1c04e82 media: ts2020: fix null-ptr-deref in ts2020_probe()
| * 13193a97dd media: i2c: tc358743: Fix crash in the probe error path when using polling
| * dfb9fe7de6 btrfs: ref-verify: fix use-after-free after invalid ref action
| * a5abba5e0e quota: flush quota_release_work upon quota writeback
| * 21fd6b2f0e ASoC: fsl_micfil: fix the naming style for mask definition
| * d8de818df1 sh: intc: Fix use-after-free bug in register_intc_controller()
| * cc91d59d34 sunrpc: clear XPRT_SOCK_UPD_TIMEOUT when reset transport
| * e89ac70361 SUNRPC: Replace internal use of SOCKWQ_ASYNC_NOSPACE
| * 768df674c5 SUNRPC: correct error code comment in xs_tcp_setup_socket()
| * 3c5c4d1216 modpost: remove incorrect code in do_eisa_entry()
| * 4c54ffc23b rtc: ab-eoz9: don't fail temperature reads on undervoltage notification
| * d74b4b2970 9p/xen: fix release of IRQ
| * be216f99df 9p/xen: fix init sequence
| * 847d94e60e block: return unsigned int from bdev_io_min
| * f4f31bd51e jffs2: fix use of uninitialized variable
| * daac4aa182 ubifs: authentication: Fix use-after-free in ubifs_tnc_end_commit
| * 871c148f8e ubi: fastmap: Fix duplicate slab cache names while attaching
| * f1f685b3dd ubifs: Correct the total block count by deducting journal reservation
| * 44b3257ff7 rtc: check if __rtc_read_time was successful in rtc_timer_do_work()
| * 1a7d4c093b rtc: abx80x: Fix WDT bit position of the status register
| * 0bce88e065 rtc: st-lpc: Use IRQF_NO_AUTOEN flag in request_irq()
| * 7bf6bf130a NFSv4.0: Fix a use-after-free problem in the asynchronous open()
| * 9e497ef3a6 um: Always dump trace for specified task in show_stack
| * 115e3e51b1 um: Clean up stacktrace dump
| * abf08999d9 um: add show_stack_loglvl()
| * 3103837c50 um/sysrq: remove needless variable sp
| * ea8b2f3718 um: Fix the return value of elf_core_copy_task_fpregs
| * 5c710f4581 um: Fix potential integer overflow during physmem setup
| * 5398de330c rpmsg: glink: Propagate TX failures in intentless mode as well
| * e9be26735d SUNRPC: make sure cache entry active before cache_show
| * 90adbae9dd NFSD: Prevent a potential integer overflow
| * af1db93c94 lib: string_helpers: silence snprintf() output truncation warning
| * a70316b52e usb: dwc3: gadget: Fix checking for number of TRBs left
| * 2a9cbaeb4c ALSA: hda/realtek: Apply quirk for Medion E15433
| * 7f57353abc ALSA: hda/realtek: Fix Internal Speaker and Mic boost of Infinix Y4 Max
| * 937a94c977 ALSA: hda/realtek: Set PCBeep to default value for ALC274
| * 2be4e4fe88 ALSA: hda/realtek: Update ALC225 depop procedure
| * 3c818ad07e media: wl128x: Fix atomicity violation in fmc_send_cmd()
| * c8e5e170d9 HID: wacom: Interpret tilt data from Intuos Pro BT as signed values
| * 383455a9aa block: fix ordering between checking BLK_MQ_S_STOPPED request adding
| * 25ace006e9 arm64: tls: Fix context-switching of tpidrro_el0 when kpti is enabled
| * f8f26cf690 sh: cpuinfo: Fix a warning for CONFIG_CPUMASK_OFFSTACK
| * 376c7f0beb um: vector: Do not use drvdata in release
| * 7b5e40abd1 serial: 8250: omap: Move pm_runtime_get_sync
| * 8d9d174d3f um: net: Do not use drvdata in release
| * 300e277e46 um: ubd: Do not use drvdata in release
| * 7cf819ea37 ubi: wl: Put source PEB into correct list if trying locking LEB failed
| * 2afe950e49 spi: Fix acpi deferred irq probe
| * 78b0f2028f netfilter: ipset: add missing range check in bitmap_ip_uadt
| * 2d64a005ba Revert "serial: sh-sci: Clean sci_ports[0] after at earlycon exit"
| * 0fd14b63fa serial: sh-sci: Clean sci_ports[0] after at earlycon exit
| * eff104b29c Revert "usb: gadget: composite: fix OS descriptors w_value logic"
| * 37fb0fd3fb Bluetooth: Fix type of len in rfcomm_sock_getsockopt{,_old}()
| * 1ebbcaf0d5 tty: ldsic: fix tty_ldisc_autoload sysctl's proc_handler
| * 57f048c2d2 comedi: Flush partial mappings in error case
| * d0ddd2c92b PCI: Fix use-after-free of slot->bus on hot remove
| * 02ca7b6027 ASoC: codecs: Fix atomicity violation in snd_soc_component_get_drvdata()
| * 6e39b681d1 jfs: xattr: check invalid xattr size more strictly
| * dc331ed4cc ext4: fix FS_IOC_GETFSMAP handling
| * 56b8416193 ext4: supress data-race warnings in ext4_free_inodes_{count,set}()
| * 9b8460a2a7 ALSA: usb-audio: Fix potential out-of-bound accesses for Extigy and Mbox devices
| * f7b0952a70 soc: qcom: socinfo: fix revision check in qcom_socinfo_probe()
| * 047f0ee8b5 cgroup: Move rcu_head up near the top of cgroup_root
| * 92f6ebead8 cgroup: Make operations on the cgroup root_list RCU safe
| * a35767ab80 usb: ehci-spear: fix call balance of sehci clk handling routines
| * 2c312ab8f2 apparmor: fix 'Do simple duplicate message elimination'
| * d6de1aaa0f staging: greybus: uart: clean up TIOCGSERIAL
| * aabb00874a misc: apds990x: Fix missing pm_runtime_disable()
| * 7aacc23608 USB: chaoskey: Fix possible deadlock chaoskey_list_lock
| * a6b88ed51e USB: chaoskey: fail open after removal
| * bcb28ed2e1 usb: yurex: make waiting on yurex_write interruptible
| * 516e667442 usb: using mutex lock and supporting O_NONBLOCK flag in iowarrior_read()
| * b4ccc582ef ipmr: fix tables suspicious RCU usage
| * 59be0c8afc ipmr: convert /proc handlers to rcu_read_lock()
| * 5743a2db46 net: stmmac: dwmac-socfpga: Set RX watchdog interrupt as broken
| * 9be33a1eb0 marvell: pxa168_eth: fix call balance of pep->clk handling routines
| * d720e8ccc2 net: usb: lan78xx: Fix refcounting and autosuspend on invalid WoL configuration
| * 1604c6d440 tg3: Set coherent DMA mask bits to 31 for BCM57766 chipsets
| * 7b99620a9f net: usb: lan78xx: Fix memory leak on device unplug by freeing PHY device
| * c423afa170 power: supply: core: Remove might_sleep() from power_supply_put()
| * 7d121f66b6 vfio/pci: Properly hide first-in-list PCIe extended capability
| * d68d5f63b6 NFSD: Fix nfsd4_shutdown_copy()
| * c6dc01d04c NFSD: Cap the number of bytes copied by nfs4_reset_recoverydir()
| * cac1405e3f NFSD: Prevent NULL dereference in nfsd4_process_cb_update()
| * 68c3b7cdef rpmsg: glink: use only lower 16-bits of param2 for CMD_OPEN name length
| * 83f8eb3280 rpmsg: glink: Fix GLINK command prefix
| * 6094d8c3d2 rpmsg: glink: Send READ_NOTIFY command in FIFO full case
| * 4e318b935d rpmsg: glink: Add TX_DATA_CONT command while sending
| * 82137bab80 perf trace: Avoid garbage when not printing a syscall's arguments
| * e2956feece perf trace: Do not lose last events in a race
| * 7a78e2865a m68k: coldfire/device.c: only build FEC when HW macros are defined
| * 32d587a538 m68k: mcfgpio: Fix incorrect register offset for CONFIG_M5441x
| * 5ad6ca7662 PCI: cpqphp: Fix PCIBIOS_* return value confusion
| * d8392686ad PCI: cpqphp: Use PCI_POSSIBLE_ERROR() to check config reads
| * 25b338db0c perf probe: Correct demangled symbols in C++ program
| * 1ed167325c perf cs-etm: Don't flush when packet_queue fills up
| * b106f718fc clk: clk-axi-clkgen: make sure to enable the AXI bus clock
| * 31fe8bc84b clk: axi-clkgen: use devm_platform_ioremap_resource() short-hand
| * 17aad93e2b dt-bindings: clock: axi-clkgen: include AXI clk
| * 80d2319709 dt-bindings: clock: adi,axi-clkgen: convert old binding to yaml format
| * d48cbfa90d fbdev: sh7760fb: Fix a possible memory leak in sh7760fb_alloc_mem()
| * dd3a6d5441 fbdev/sh7760fb: Alloc DMA memory from hardware device
| * 1403e7b10c powerpc/sstep: make emulate_vsx_load and emulate_vsx_store static
| * f4078ef38d ocfs2: fix uninitialized value in ocfs2_file_read_iter()
| * eaf92fad1f scsi: qedi: Fix a possible memory leak in qedi_alloc_and_init_sb()
| * 97384449dd scsi: qedf: Fix a possible memory leak in qedf_alloc_and_init_sb()
| * c7da99b2d4 scsi: fusion: Remove unused variable 'rc'
| * 3932c753f8 scsi: bfa: Fix use-after-free in bfad_im_module_exit()
| * 5ea4b832b5 mfd: rt5033: Fix missing regmap_del_irq_chip()
| * 171bb5aefc RDMA/bnxt_re: Check cqe flags to know imm_data vs inv_irkey
| * 22fbbc37ed mtd: rawnand: atmel: Fix possible memory leak
| * b3617ac6aa cpufreq: loongson2: Unregister platform_driver on failure
| * 6ea17c03ed mfd: intel_soc_pmic_bxtwc: Use IRQ domain for PMIC devices
| * b7c7c400de mfd: intel_soc_pmic_bxtwc: Use IRQ domain for TMU device
| * 0997e77c51 mfd: intel_soc_pmic_bxtwc: Use IRQ domain for USB Type-C device
| * 851f94e403 mfd: intel_soc_pmic_bxtwc: Use dev_err_probe()
| * a4eb13644d mfd: da9052-spi: Change read-mask to write-mask
| * 321d24f9a5 mfd: tps65010: Use IRQF_NO_AUTOEN flag in request_irq() to fix race
| * 7022d187cb powerpc/vdso: Flag VDSO64 entry points as functions
| * 598b156722 trace/trace_event_perf: remove duplicate samples on the first tracepoint event
| * 85cf038c39 netpoll: Use rcu_access_pointer() in netpoll_poll_lock
| * 273eec2346 ALSA: 6fire: Release resources at card release
| * ebad462eec ALSA: caiaq: Use snd_card_free_when_closed() at disconnection
| * 75f418b249 ALSA: us122l: Use snd_card_free_when_closed() at disconnection
| * 71d55e19fe net: rfkill: gpio: Add check for clk_enable()
| * cb158d79b1 selftests: net: really check for bg process completion
| * 3d106b2f9f bpf, sockmap: Fix sk_msg_reset_curr
| * d3f5763b30 bpf, sockmap: Several fixes to bpf_msg_pop_data
| * 962932ee62 bpf, sockmap: Several fixes to bpf_msg_push_data
| * 2cc97daab5 drm/etnaviv: hold GPU lock across perfmon sampling
| * b8132704a6 drm/etnaviv: fix power register offset on GC300
| * b8777d076e drm/etnaviv: dump: fix sparse warnings
| * 41c7200d66 drm/msm/adreno: Use IRQF_NO_AUTOEN flag in request_irq()
| * 8b49ea3418 drm/panfrost: Remove unused id_mask from struct panfrost_model
| * 1de0ca1d73 wifi: mwifiex: Fix memcpy() field-spanning write warning in mwifiex_config_scan()
| * de94dc8a1f bpf: Fix the xdp_adjust_tail sample prog issue
| * 7913bf6f8c ASoC: fsl_micfil: fix regmap_write_bits usage
| * c5cde68215 ASoC: fsl_micfil: use GENMASK to define register bit fields
| * d7b49f67c7 ASoC: fsl_micfil: do not define SHIFT/MASK for single bits
| * f8fe5b13ab ASoC: fsl_micfil: Drop unnecessary register read
| * 50383e18bf dt-bindings: vendor-prefixes: Add NeoFidelity, Inc
| * 22e700ee09 drm/imx/ipuv3: Use IRQF_NO_AUTOEN flag in request_irq()
| * d766e4dfae wifi: mwifiex: Use IRQF_NO_AUTOEN flag in request_irq()
| * 0e720766e0 wifi: p54: Use IRQF_NO_AUTOEN flag in request_irq()
| * 6dfbea145a drm/omap: Fix locking in omap_gem_new_dmabuf()
| * cb480ae80f wifi: ath9k: add range check for conn_rsp_epid in htc_connect_service()
| * 5665bb4371 drm/mm: Mark drm_mm_interval_tree*() functions with __maybe_unused
| * 8be4e51f3e firmware: arm_scpi: Check the DVFS OPP count returned by the firmware
| * 3491404405 regmap: irq: Set lockdep class for hierarchical IRQ domains
| * a6e1387e9f ARM: dts: cubieboard4: Fix DCDC5 regulator constraints
| * 6f0093c15f tpm: fix signed/unsigned bug when checking event logs
| * 2fc27a7fc5 efi/tpm: Pass correct address to memblock_reserve
| * 5ad7dc9748 mmc: mmc_spi: drop buggy snprintf()
| * 7a3465b79e soc: qcom: geni-se: fix array underflow in geni_se_clk_tbl_get()
| * 6ebcbacbcf soc: ti: smartreflex: Use IRQF_NO_AUTOEN flag in request_irq()
| * 054de36e91 time: Fix references to _msecs_to_jiffies() handling of values
| * 3428cc5047 crypto: cavium - Fix an error handling path in cpt_ucode_load_fw()
| * 75e1e38e5d crypto: bcm - add error check in the ahash_hmac_init function
| * 2d721b961d crypto: cavium - Fix the if condition to exit loop after timeout
| * fca8aed122 crypto: pcrypt - Call crypto layer directly when padata_do_parallel() return -EBUSY
| * adadb7167a EDAC/fsl_ddr: Fix bad bit shift operations
| * 8cc31cfa36 EDAC/bluefield: Fix potential integer overflow
| * de5d5b84a6 firmware: google: Unregister driver_info on failure
| * 659e78fe61 firmware: google: Unregister driver_info on failure and exit in gsmi
| * f57725bcc5 hfsplus: don't query the device logical block size multiple times
| * b76579701b s390/syscalls: Avoid creation of arch/arch/ directory
| * 52a1c2242e acpi/arm64: Adjust error handling procedure in gtdt_parse_timer_block()
| * b3b2838426 m68k: mvme147: Reinstate early console
| * 83ba8219bf m68k: mvme16x: Add and use "mvme16x.h"
| * f1441a0dce m68k: mvme147: Fix SCSI controller IRQ numbers
| * ac22240540 nvme-pci: fix freeing of the HMB descriptor table
| * c509b1acbd initramfs: avoid filename buffer overrun
| * 30608827e8 mips: asm: fix warning when disabling MIPS_FP_SUPPORT
| * b214a6dd48 x86/xen/pvh: Annotate indirect branch as safe
| * 7f591ed125 nvme: fix metadata handling in nvme-passthrough
| * ab64809049 NFSD: Force all NFSv4.2 COPY requests to be synchronous
| * 7b222d6cb8 cifs: Fix buffer overflow when parsing NFS reparse points
| * bdd8bfe75d ipmr: Fix access to mfc_cache_list without lock held
| * bff0f725c7 proc/softirqs: replace seq_printf with seq_put_decimal_ull_width
| * 1c3c3d8177 ASoC: stm: Prevent potential division by zero in stm32_sai_get_clk_div()
| * 05fc0c3d6f ASoC: stm: Prevent potential division by zero in stm32_sai_mclk_round_rate()
| * 43cec71ce2 regulator: rk808: Add apply_bit for BUCK3 on RK809
| * e5137997b8 soc: qcom: Add check devm_kasprintf() returned value
| * 3b084fe40c net: usb: qmi_wwan: add Quectel RG650V
| * ffa5b6230a x86/amd_nb: Fix compile-testing without CONFIG_AMD_NB
| * cb3309b9ae ALSA: hda/realtek: Add subwoofer quirk for Infinix ZERO BOOK 13
| * 50c946b263 selftests/watchdog-test: Fix system accidentally reset after watchdog-test
| * a862a826cb mac80211: fix user-power when emulating chanctx
| * ab38b9267f ASoC: Intel: bytcr_rt5640: Add DMI quirk for Vexia Edu Atla 10 tablet
| * a3c65022d8 mm: revert "mm: shmem: fix data-race in shmem_getattr()"
| * b8a78600ce kbuild: Use uname for LINUX_COMPILE_HOST detection
| * e3439cc573 media: dvbdev: fix the logic when DVB_DYNAMIC_MINORS is not set
| * 47693ba35b Revert "mmc: dw_mmc: Fix IDMAC operation with pages bigger than 4K"
| * 0ce59fb1c7 nilfs2: fix null-ptr-deref in block_dirty_buffer tracepoint
| * a3abb97830 ocfs2: fix UBSAN warning in ocfs2_verify_volume()
| * 6438f3f42c nilfs2: fix null-ptr-deref in block_touch_buffer tracepoint
| * c3742319d0 KVM: VMX: Bury Intel PT virtualization (guest/host mode) behind CONFIG_BROKEN
| * 5ae8cc0b0c ocfs2: uncache inode which has failed entering the group
| * a0ddb20a74 net/mlx5e: kTLS, Fix incorrect page refcounting
| * 0d568258f9 net/mlx5: fs, lock FTE when checking if active
| * 598c956b62 netlink: terminate outstanding dump on socket close
* 4ed1e6725b Merge branch 'android11-5.4' into android11-5.4-lts

Change-Id: I6fbef186b3de42a158c8ad0e8a06de08f08e6509
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
2025-01-17 09:32:49 +00:00
joann_liu
bf5b85fe24 ANDROID: GKI: add Trimble symbol list
Add symbol list for cdc_mbim.ko and qmi_wwan.ko

Leaf changes summary: 3 artifacts changed
Changed leaf types summary: 0 leaf type changed
Removed/Changed/Added functions summary: 0 Removed, 0 Changed, 3 Added functions
Removed/Changed/Added variables summary: 0 Removed, 0 Changed, 0 Added variable

3 Added functions:

  [A] 'function void in6_dev_finish_destroy(inet6_dev*)'
  [A] 'function void netdev_stats_to_stats64(rtnl_link_stats64*, const net_device_stats*)'
  [A] 'function net_device* netdev_upper_get_next_dev_rcu(net_device*, list_head**)'

Bug: 390219540
Change-Id: I9ea4615f36b1e9ec89d2f8247eafae6f0fdb0778
Signed-off-by: joann_liu <joann_liu@pegatroncorp.com>
2025-01-16 06:41:15 -08:00
Thiébaud Weksteen
4cd26955b0 UPSTREAM: selinux: ignore unknown extended permissions
commit 900f83cf376bdaf798b6f5dcb2eae0c822e908b6 upstream.

When evaluating extended permissions, ignore unknown permissions instead
of calling BUG(). This commit ensures that future permissions can be
added without interfering with older kernels.

Cc: stable@vger.kernel.org
Fixes: fa1aa143ac ("selinux: extended permissions for ioctls")
Signed-off-by: Thiébaud Weksteen <tweek@google.com>
Signed-off-by: Paul Moore <paul@paul-moore.com>
Acked-by: Paul Moore <paul@paul-moore.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Thiébaud Weksteen <tweek@google.com>
Change-Id: I1689d8c5084a24c1a34ef3d15d71f8cfa4122447
2025-01-16 00:50:13 -08:00
Vivekananda T
bfe1e93700 Merge commit '1a2fc5395e' into wlan-cld3.driver.lnx.2.0.r11-rel
Change-Id: Ib118ffa6e76657689a37319095e7ddeb3abcc15d
2025-01-15 14:20:58 +05:30
Heegon Lee
1194f08d5c ANDROID: ABI: Update allowed list for galaxy
Leaf changes summary: 1 artifact changed
Changed leaf types summary: 0 leaf type changed
Removed/Changed/Added functions summary: 0 Removed, 0 Changed, 1 Added function
Removed/Changed/Added variables summary: 0 Removed, 0 Changed, 0 Added variable

1 Added function:

  [A] 'function int usb_driver_set_configuration(usb_device*, int)'

Bug: 390078050
Change-Id: I2c3b389c4b0032b877f1c6112695eff296b6a68e
Signed-off-by: Heegon Lee <heegon.lee@samsung.com>
2025-01-15 17:23:38 +09:00
Linux Build Service Account
59b19eff23 Merge 6ea403acf3 on remote branch
Change-Id: I56b796bf0bc3983711d547ef0bbf64b90dcd2c6b
2025-01-14 12:04:43 -08:00
Linux Build Service Account
ca64b8bcb3 Merge 250ab26be0 on remote branch
Change-Id: I15290ef3c1062dcf27065e9f38df417a5cb5686d
2025-01-14 12:00:03 -08:00
Linux Build Service Account
b7b6011d60 Merge a2450eb8bc on remote branch
Change-Id: I8949af549dc3fdb84f93144750ba0a56aa690d1c
2025-01-14 11:18:05 -08:00
Linux Build Service Account
32b8a0ed5e Merge 3cf1c80c93 on remote branch
Change-Id: I74603c71c7acf204ee46595d81bc6334b80282af
2025-01-14 11:11:02 -08:00
Linux Build Service Account
1989f99f98 Merge 5bd7691e3c on remote branch
Change-Id: I72dc5157dd3587d99d8151572ce5d85ebea5d8e3
2025-01-14 11:01:02 -08:00
Greg Kroah-Hartman
b9aba1f4e2 Revert "netfilter: Replace zero-length array with flexible-array member"
This reverts commit 9857e028d4 which is
commit 6daf14140129d30207ed6a0a69851fa6a3636bda 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: I72ea16907de19ad38a993363ae45bab25f67d57a
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
2025-01-14 17:17:17 +00:00
Greg Kroah-Hartman
196c9546b3 Revert "tracing: Constify string literal data member in struct trace_event_call"
This reverts commit 30080cdde6 which is
commit 452f4b31e3f70a52b97890888eeb9eaa9a87139a 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: Ib63a284c6a02575a89f533f77da910de420989a7
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
2025-01-13 09:47:29 +00:00
Tommaso Fonda
7a0d694b18 power: supply: qti_battery_charger: Implement charging_enabled node
Change-Id: Id927c07bab305a63665edfe44228051d76951933
2025-01-12 23:13:07 +00:00
Michael Bestas
3bc8134025 Merge tag 'ASB-2025-01-05_11-5.4' of https://android.googlesource.com/kernel/common into android13-5.4-lahaina
https://source.android.com/docs/security/bulletin/2025-01-01

* tag 'ASB-2025-01-05_11-5.4' of https://android.googlesource.com/kernel/common:
  UPSTREAM: ALSA: usb-audio: Fix a DMA to stack memory bug
  UPSTREAM: ALSA: usb-audio: Fix out of bounds reads when finding clock sources
  UPSTREAM: ALSA: usb-audio: Fix potential out-of-bound accesses for Extigy and Mbox devices
  Revert "UPSTREAM: unicode: Don't special case ignorable code points"
  Reapply "UPSTREAM: unicode: Don't special case ignorable code points"
  Revert "UPSTREAM: unicode: Don't special case ignorable code points"

Change-Id: Ibfa7592f50072262205201b39dd2e37a1ee3c289
2025-01-12 23:10:36 +00:00
Greg Kroah-Hartman
c32bcb5cc0 Revert "skb_expand_head() adjust skb->truesize incorrectly"
This reverts commit 43e7958cf7 which is
commit 7f678def99d29c520418607509bb19c7fc96a6db upstream.

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

Bug: 161946584
Change-Id: I21417bd6cf13432836618e2c0be84c79a9998b60
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
2025-01-10 09:20:55 +00:00
Greg Kroah-Hartman
a85d92d704 This is the 5.4.289 stable release
-----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCAAdFiEEZH8oZUiU471FcZm+ONu9yGCSaT4FAmd/v80ACgkQONu9yGCS
 aT6efw//UHOD4GORAmNhbC5i1A7+anJJpafHEDDb3f7yYpPsAeZMo3wS1zXesoIl
 1x3aSBAUW6651gpO7FMQx16VMl9gtF2LRYtQomVvyqIi53a2XvZUGdmhnZBaXfNz
 F7EX4bn3/wKtYfEC0buDCBzFZUzsLLnkwpiIwzMWymZsHS/lMvu9F+Ap240gy3MG
 60ikjLpWbkrmfgJVHHKn+xeTUp8ikqDsx9JW+VYAqBENUr6+ZKZxKgo8SNh+Z+3n
 xk39Rq/hzXyMtsQR7s8+3QSCJoh6VYhl7l6yvGYZ+BW8BKpqDl4lcKxiNUPUFjXL
 mSk9AISKMUnBiPKQmhK0Yewns8aX0qIdLpZiUoSg+Ul+hlBf1bD//0AvJZ7A8kT0
 I7s8OiemcrVMTW0m9HzY6XAgXhF9TutbrHTBn8IjDunQGz6Rz1pBsk7ka6boHf9K
 6Cxb/VcsB3OsZGzVc7wULCVki5PWSRbQ4AklmCSlLnbMC8saVTkvH5cd0b6CeCB9
 HJzZC4N77nUHUpRLz9ybu+bZFlJAwsXLrz84c50oU8RYSOPwIWOYsJgOmEpy1gbx
 THGLBhs6xCdzOUB4deRS9MXcVDzLvVo5qcT7XAnVABz2XULfEPN1aD2ZbBsxQoxU
 KIkmryxsohsLkomIxzSZHRTHptHCL+qtAPkDb0OgRkINlBb3Gbw=
 =5mLz
 -----END PGP SIGNATURE-----

Merge 5.4.289 into android11-5.4-lts

Changes in 5.4.289
	net: sched: fix ordering of qlen adjustment
	usb: dwc2: gadget: Don't write invalid mapped sg entries into dma_desc with iommu enabled
	PCI/AER: Disable AER service on suspend
	ALSA: usb: Fix UBSAN warning in parse_audio_unit()
	PCI: Add ACS quirk for Broadcom BCM5760X NIC
	i2c: pnx: Fix timeout in wait functions
	drm/i915: Fix memory leak by correcting cache object name in error handler
	erofs: fix order >= MAX_ORDER warning due to crafted negative i_size
	erofs: fix incorrect symlink detection in fast symlink
	net/smc: check sndbuf_space again after NOSPACE flag is set in smc_poll
	ionic: use ee->offset when returning sprom data
	net: hinic: Fix cleanup in create_rxqs/txqs()
	net: ethernet: bgmac-platform: fix an OF node reference leak
	netfilter: ipset: Fix for recursive locking warning
	mmc: sdhci-tegra: Remove SDHCI_QUIRK_BROKEN_ADMA_ZEROLEN_DESC quirk
	chelsio/chtls: prevent potential integer overflow on 32bit
	i2c: riic: Always round-up when calculating bus period
	efivarfs: Fix error on non-existent file
	USB: serial: option: add TCL IK512 MBIM & ECM
	USB: serial: option: add MeiG Smart SLM770A
	USB: serial: option: add Netprisma LCUK54 modules for WWAN Ready
	USB: serial: option: add MediaTek T7XX compositions
	USB: serial: option: add Telit FE910C04 rmnet compositions
	sh: clk: Fix clk_enable() to return 0 on NULL clk
	zram: refuse to use zero sized block device as backing device
	btrfs: tree-checker: reject inline extent items with 0 ref count
	NFS/pnfs: Fix a live lock between recalled layouts and layoutget
	of/irq: Fix using uninitialized variable @addr_len in API of_irq_parse_one()
	nilfs2: prevent use of deleted inode
	udmabuf: also check for F_SEAL_FUTURE_WRITE
	of: Fix error path in of_parse_phandle_with_args_map()
	of: Fix refcount leakage for OF node returned by __of_get_dma_parent()
	media: dvb-frontends: dib3000mb: fix uninit-value in dib3000_write_reg
	bpf: Check negative offsets in __bpf_skb_min_len()
	nfsd: restore callback functionality for NFSv4.0
	mtd: diskonchip: Cast an operand to prevent potential overflow
	phy: core: Fix an OF node refcount leakage in _of_phy_get()
	phy: core: Fix an OF node refcount leakage in of_phy_provider_lookup()
	phy: core: Fix that API devm_phy_put() fails to release the phy
	phy: core: Fix that API devm_phy_destroy() fails to destroy the phy
	dmaengine: mv_xor: fix child node refcount handling in early exit
	dmaengine: at_xdmac: avoid null_prt_deref in at_xdmac_prep_dma_memset
	mtd: rawnand: fix double free in atmel_pmecc_create_user()
	tracing/kprobe: Make trace_kprobe's module callback called after jump_label update
	scsi: qla1280: Fix hw revision numbering for ISP1020/1040
	scsi: megaraid_sas: Fix for a potential deadlock
	regmap: Use correct format specifier for logging range errors
	platform/x86: asus-nb-wmi: Ignore unknown event 0xCF
	scsi: mpt3sas: Diag-Reset when Doorbell-In-Use bit is set during driver load time
	virtio-blk: don't keep queue frozen during system suspend
	epoll: Add synchronous wakeup support for ep_poll_callback
	MIPS: Probe toolchain support of -msym32
	skbuff: introduce skb_expand_head()
	ipv6: use skb_expand_head in ip6_finish_output2
	ipv6: use skb_expand_head in ip6_xmit
	ipv6: fix possible UAF in ip6_finish_output2()
	bpf: fix recursive lock when verdict program return SK_PASS
	tracing: Constify string literal data member in struct trace_event_call
	btrfs: avoid monopolizing a core when activating a swap file
	skb_expand_head() adjust skb->truesize incorrectly
	ipv6: prevent possible UAF in ip6_xmit()
	selinux: ignore unknown extended permissions
	Drivers: hv: util: Avoid accessing a ringbuffer not initialized yet
	IB/mlx5: Introduce and use mlx5_core_is_vf()
	net/mlx5: Make API mlx5_core_is_ecpf accept const pointer
	RDMA/mlx5: Enforce same type port association for multiport RoCE
	RDMA/bnxt_re: Add check for path mtu in modify_qp
	RDMA/bnxt_re: Fix reporting hw_ver in query_device
	RDMA/bnxt_re: Fix max_qp_wrs reported
	drm: bridge: adv7511: Enable SPDIF DAI
	drm/bridge: adv7511_audio: Update Audio InfoFrame properly
	netrom: check buffer length before accessing it
	netfilter: Replace zero-length array with flexible-array member
	netfilter: nft_set_hash: unaligned atomic read on struct nft_set_ext
	net: llc: reset skb->transport_header
	ALSA: usb-audio: US16x08: Initialize array before use
	af_packet: fix vlan_get_tci() vs MSG_PEEK
	af_packet: fix vlan_get_protocol_dgram() vs MSG_PEEK
	ila: serialize calls to nf_register_net_hooks()
	wifi: mac80211: wake the queues in case of failure in resume
	sound: usb: format: don't warn that raw DSD is unsupported
	bpf: fix potential error return
	net: usb: qmi_wwan: add Telit FE910C04 compositions
	irqchip/gic: Correct declaration of *percpu_base pointer in union gic_base
	ARC: build: Try to guess GCC variant of cross compiler
	modpost: fix input MODULE_DEVICE_TABLE() built for 64-bit on 32-bit host
	modpost: fix the missed iteration for the max bit in do_input()
	RDMA/uverbs: Prevent integer overflow issue
	pinctrl: mcp23s08: Fix sleeping in atomic context due to regmap locking
	sky2: Add device ID 11ab:4373 for Marvell 88E8075
	net/sctp: Prevent autoclose integer overflow in sctp_association_init()
	drm: adv7511: Drop dsi single lane support
	mm: vmscan: account for free pages to prevent infinite Loop in throttle_direct_reclaim()
	ftrace: use preempt_enable/disable notrace macros to avoid double fault
	Linux 5.4.289

Change-Id: I2fe8ada5386224ce16b22d4e1eff016656be40f3
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
2025-01-10 07:30:07 +00:00
Greg Kroah-Hartman
7f0e075be1 Linux 5.4.289
Link: https://lore.kernel.org/r/20250106151128.686130933@linuxfoundation.org
Tested-by: Florian Fainelli <florian.fainelli@broadcom.com>
Tested-by: Jon Hunter <jonathanh@nvidia.com>
Tested-by: Linux Kernel Functional Testing <lkft@linaro.org>
Tested-by: Shuah Khan <skhan@linuxfoundation.org>
Tested-by: kernelci.org bot <bot@kernelci.org>
Tested-by: Harshit Mogalapalli <harshit.m.mogalapalli@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2025-01-09 13:23:37 +01:00
Koichiro Den
177516053e ftrace: use preempt_enable/disable notrace macros to avoid double fault
Since the backport commit eea46baf14 ("ftrace: Fix possible
use-after-free issue in ftrace_location()") on linux-5.4.y branch, the
old ftrace_int3_handler()->ftrace_location() path has included
rcu_read_lock(), which has mcount location inside and leads to potential
double fault.

Replace rcu_read_lock/unlock with preempt_enable/disable notrace macros
so that the mcount location does not appear on the int3 handler path.

This fix is specific to linux-5.4.y branch, the only branch still using
ftrace_int3_handler with commit e60b613df8b6 ("ftrace: Fix possible
use-after-free issue in ftrace_location()") backported. It also avoids
the need to backport the code conversion to text_poke() on this branch.

Reported-by: Koichiro Den <koichiro.den@canonical.com>
Closes: https://lore.kernel.org/all/74gjhwxupvozwop7ndhrh7t5qeckomt7yqvkkbm5j2tlx6dkfk@rgv7sijvry2k
Fixes: eea46baf14 ("ftrace: Fix possible use-after-free issue in ftrace_location()") # linux-5.4.y
Signed-off-by: Steven Rostedt (Google) <rostedt@goodmis.org>
Signed-off-by: Koichiro Den <koichiro.den@canonical.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2025-01-09 13:23:37 +01:00
Seiji Nishikawa
66cd37660e mm: vmscan: account for free pages to prevent infinite Loop in throttle_direct_reclaim()
commit 6aaced5abd32e2a57cd94fd64f824514d0361da8 upstream.

The task sometimes continues looping in throttle_direct_reclaim() because
allow_direct_reclaim(pgdat) keeps returning false.

 #0 [ffff80002cb6f8d0] __switch_to at ffff8000080095ac
 #1 [ffff80002cb6f900] __schedule at ffff800008abbd1c
 #2 [ffff80002cb6f990] schedule at ffff800008abc50c
 #3 [ffff80002cb6f9b0] throttle_direct_reclaim at ffff800008273550
 #4 [ffff80002cb6fa20] try_to_free_pages at ffff800008277b68
 #5 [ffff80002cb6fae0] __alloc_pages_nodemask at ffff8000082c4660
 #6 [ffff80002cb6fc50] alloc_pages_vma at ffff8000082e4a98
 #7 [ffff80002cb6fca0] do_anonymous_page at ffff80000829f5a8
 #8 [ffff80002cb6fce0] __handle_mm_fault at ffff8000082a5974
 #9 [ffff80002cb6fd90] handle_mm_fault at ffff8000082a5bd4

At this point, the pgdat contains the following two zones:

        NODE: 4  ZONE: 0  ADDR: ffff00817fffe540  NAME: "DMA32"
          SIZE: 20480  MIN/LOW/HIGH: 11/28/45
          VM_STAT:
                NR_FREE_PAGES: 359
        NR_ZONE_INACTIVE_ANON: 18813
          NR_ZONE_ACTIVE_ANON: 0
        NR_ZONE_INACTIVE_FILE: 50
          NR_ZONE_ACTIVE_FILE: 0
          NR_ZONE_UNEVICTABLE: 0
        NR_ZONE_WRITE_PENDING: 0
                     NR_MLOCK: 0
                    NR_BOUNCE: 0
                   NR_ZSPAGES: 0
            NR_FREE_CMA_PAGES: 0

        NODE: 4  ZONE: 1  ADDR: ffff00817fffec00  NAME: "Normal"
          SIZE: 8454144  PRESENT: 98304  MIN/LOW/HIGH: 68/166/264
          VM_STAT:
                NR_FREE_PAGES: 146
        NR_ZONE_INACTIVE_ANON: 94668
          NR_ZONE_ACTIVE_ANON: 3
        NR_ZONE_INACTIVE_FILE: 735
          NR_ZONE_ACTIVE_FILE: 78
          NR_ZONE_UNEVICTABLE: 0
        NR_ZONE_WRITE_PENDING: 0
                     NR_MLOCK: 0
                    NR_BOUNCE: 0
                   NR_ZSPAGES: 0
            NR_FREE_CMA_PAGES: 0

In allow_direct_reclaim(), while processing ZONE_DMA32, the sum of
inactive/active file-backed pages calculated in zone_reclaimable_pages()
based on the result of zone_page_state_snapshot() is zero.

Additionally, since this system lacks swap, the calculation of inactive/
active anonymous pages is skipped.

        crash> p nr_swap_pages
        nr_swap_pages = $1937 = {
          counter = 0
        }

As a result, ZONE_DMA32 is deemed unreclaimable and skipped, moving on to
the processing of the next zone, ZONE_NORMAL, despite ZONE_DMA32 having
free pages significantly exceeding the high watermark.

The problem is that the pgdat->kswapd_failures hasn't been incremented.

        crash> px ((struct pglist_data *) 0xffff00817fffe540)->kswapd_failures
        $1935 = 0x0

This is because the node deemed balanced.  The node balancing logic in
balance_pgdat() evaluates all zones collectively.  If one or more zones
(e.g., ZONE_DMA32) have enough free pages to meet their watermarks, the
entire node is deemed balanced.  This causes balance_pgdat() to exit early
before incrementing the kswapd_failures, as it considers the overall
memory state acceptable, even though some zones (like ZONE_NORMAL) remain
under significant pressure.


The patch ensures that zone_reclaimable_pages() includes free pages
(NR_FREE_PAGES) in its calculation when no other reclaimable pages are
available (e.g., file-backed or anonymous pages).  This change prevents
zones like ZONE_DMA32, which have sufficient free pages, from being
mistakenly deemed unreclaimable.  By doing so, the patch ensures proper
node balancing, avoids masking pressure on other zones like ZONE_NORMAL,
and prevents infinite loops in throttle_direct_reclaim() caused by
allow_direct_reclaim(pgdat) repeatedly returning false.


The kernel hangs due to a task stuck in throttle_direct_reclaim(), caused
by a node being incorrectly deemed balanced despite pressure in certain
zones, such as ZONE_NORMAL.  This issue arises from
zone_reclaimable_pages() returning 0 for zones without reclaimable file-
backed or anonymous pages, causing zones like ZONE_DMA32 with sufficient
free pages to be skipped.

The lack of swap or reclaimable pages results in ZONE_DMA32 being ignored
during reclaim, masking pressure in other zones.  Consequently,
pgdat->kswapd_failures remains 0 in balance_pgdat(), preventing fallback
mechanisms in allow_direct_reclaim() from being triggered, leading to an
infinite loop in throttle_direct_reclaim().

This patch modifies zone_reclaimable_pages() to account for free pages
(NR_FREE_PAGES) when no other reclaimable pages exist.  This ensures zones
with sufficient free pages are not skipped, enabling proper balancing and
reclaim behavior.

[akpm@linux-foundation.org: coding-style cleanups]
Link: https://lkml.kernel.org/r/20241130164346.436469-1-snishika@redhat.com
Link: https://lkml.kernel.org/r/20241130161236.433747-2-snishika@redhat.com
Fixes: 5a1c84b404 ("mm: remove reclaim and compaction retry approximations")
Signed-off-by: Seiji Nishikawa <snishika@redhat.com>
Cc: Mel Gorman <mgorman@techsingularity.net>
Cc: <stable@vger.kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2025-01-09 13:23:37 +01:00