id stringlengths 40 40 | instruction stringlengths 68 308 | input stringlengths 17 33.4k | output stringlengths 100 30k |
|---|---|---|---|
d6ab440240a04b8737ee4c7bb21af9182e451733 | Analyze and fix the following issue in the Linux kernel code: RDMA/rxe: Copy WQE to local buffer in non-SRQ receive path | Problem Details:
For non-SRQ QPs, the responder reads WQE fields directly from the
shared queue buffer mapped into userspace. This allows a malicious
user to modify fields like num_sge or sge entries while the kernel
is processing the WQE, leading to out-of-bounds reads in
rxe_resp_check_length() and copy_data().
Intr... | ```diff
diff --git a/drivers/infiniband/sw/rxe/rxe_resp.c b/drivers/infiniband/sw/rxe/rxe_resp.c
index 29438bcde46f..d8cbdfa70cdb 100644
--- a/drivers/infiniband/sw/rxe/rxe_resp.c
+++ b/drivers/infiniband/sw/rxe/rxe_resp.c
@@ -310,6 +310,29 @@ event:
return RESPST_CHK_LENGTH;
}
+static enum resp_states rxe_get_rec... |
22b8fbded65b8c441b634a185f8da67657df6c50 | Analyze and fix the following issue in the Linux kernel code: RDMA/rxe: Fix TOCTOU heap overflow in get_srq_wqe | Problem Details:
get_srq_wqe() reads wqe->dma.num_sge from the shared receive queue
buffer, which is mapped into userspace. It validates num_sge against
max_sge, but then re-reads the same field to calculate the memcpy
size. A concurrent userspace thread can modify num_sge between
validation and use, causing a heap buf... | ```diff
diff --git a/drivers/infiniband/sw/rxe/rxe_resp.c b/drivers/infiniband/sw/rxe/rxe_resp.c
index d8d1b7f2f341..29438bcde46f 100644
--- a/drivers/infiniband/sw/rxe/rxe_resp.c
+++ b/drivers/infiniband/sw/rxe/rxe_resp.c
@@ -264,6 +264,7 @@ static enum resp_states get_srq_wqe(struct rxe_qp *qp)
struct rxe_recv_wqe ... |
2cc10972f5f4f123e5a7658824db4f7b5abfc410 | Analyze and fix the following issue in the Linux kernel code: RDMA/umem: Add ib_umem_is_contiguous() stub for !CONFIG_INFINIBAND_USER_MEM | Problem Details:
ib_umem_is_contiguous() is defined under #ifdef
CONFIG_INFINIBAND_USER_MEM, but the #else branch lacks a stub.
Add the missing inline to fix potential broken build.
Fixes: c897c2c8b8e8 ("RDMA/core: Add umem "is_contiguous" and "start_dma_addr" helpers")
Link: https://patch.msgid.link/r/20260529134312... | ```diff
diff --git a/include/rdma/ib_umem.h b/include/rdma/ib_umem.h
index 370d802f0e63..bc1e6ed73b3f 100644
--- a/include/rdma/ib_umem.h
+++ b/include/rdma/ib_umem.h
@@ -244,6 +244,10 @@ static inline unsigned long ib_umem_find_best_pgoff(struct ib_umem *umem,
{
return 0;
}
+static inline bool ib_umem_is_contiguou... |
555aa0e83b16b55f47f1940f89ae30595de4f414 | Analyze and fix the following issue in the Linux kernel code: KVM: x86: ioapic: Use old_dest_mode consistently in ioapic_write_indirect() | Problem Details:
When reconstructing a temporary IRQ state from the historical/old IOAPIC
redirection table configuration in ioapic_write_indirect(), the code
previously assigned 'irq.dest_id' from 'old_dest_id', but incorrectly
queried the live/new 'e->fields.dest_mode' to populate 'irq.dest_mode'.
Mixing the old des... | ```diff
diff --git a/arch/x86/kvm/ioapic.c b/arch/x86/kvm/ioapic.c
index eed96ff6e722..f3f4a483ca15 100644
--- a/arch/x86/kvm/ioapic.c
+++ b/arch/x86/kvm/ioapic.c
@@ -441,7 +441,7 @@ static void ioapic_write_indirect(struct kvm_ioapic *ioapic, u32 val)
irq.dest_id = old_dest_id;
irq.dest_mode =
kvm_l... |
44eeff9bc467bc7d1fec34fc3f6001f385fe462c | Analyze and fix the following issue in the Linux kernel code: Revert "x86/fpu: Refine and simplify the magic number check during signal return" | Problem Details:
This reverts
dc8aa31a7ac2 ("x86/fpu: Refine and simplify the magic number check during signal return").
The aforementioned commit broke applications that construct signal frames in
userspace (such as CRIU and gVisor) if the frame's xstate size is smaller than
the kernel's fpstate->user_size.
Furth... | ```diff
diff --git a/arch/x86/kernel/fpu/signal.c b/arch/x86/kernel/fpu/signal.c
index c3ec2512f2bb..20b638c507ca 100644
--- a/arch/x86/kernel/fpu/signal.c
+++ b/arch/x86/kernel/fpu/signal.c
@@ -27,14 +27,19 @@
static inline bool check_xstate_in_sigframe(struct fxregs_state __user *fxbuf,
struct _fpx_sw_byte... |
3f786abd23951f3f600a62fef42469d9200d5f52 | Analyze and fix the following issue in the Linux kernel code: Revert "pinctrl-amd: enable IRQ for WACF2200 touchscreen on Lenovo Yoga 7 14AGP11" | Problem Details:
This reverts commit 3812a9e84265a5cdd90d29fe8d97a023e91fb945.
The probe ordering fix in the following patch ensures amd_gpio_probe()
completes before i2c-designware probes AMDI0010:02, allowing the
existing amd_gpio_irq_enable() flow to work correctly. The manual IRQ
restoration added by this patch is... | ```diff
diff --git a/drivers/pinctrl/pinctrl-amd.c b/drivers/pinctrl/pinctrl-amd.c
index 64315b0edf2a..e3128b0045d2 100644
--- a/drivers/pinctrl/pinctrl-amd.c
+++ b/drivers/pinctrl/pinctrl-amd.c
@@ -26,7 +26,6 @@
#include <linux/interrupt.h>
#include <linux/bitops.h>
#include <linux/pinctrl/pinconf.h>
-#include <lin... |
7164d78559b0ff29931a366a840a9e5dd53d4b7c | Analyze and fix the following issue in the Linux kernel code: drm/gem: fix race between change_handle and handle_delete | Problem Details:
drm_gem_change_handle_ioctl leaves the old handle live in the IDR
during the window between spin_unlock(table_lock) and the final
spin_lock(table_lock). A concurrent drm_gem_handle_delete on the old
handle succeeds in this window, decrements handle_count to 0, and frees
the GEM object while the new han... | ```diff
diff --git a/drivers/gpu/drm/drm_gem.c b/drivers/gpu/drm/drm_gem.c
index e3b8a1f353cb..e12cdf91f4dc 100644
--- a/drivers/gpu/drm/drm_gem.c
+++ b/drivers/gpu/drm/drm_gem.c
@@ -1065,6 +1065,7 @@ int drm_gem_change_handle_ioctl(struct drm_device *dev, void *data,
goto out_unlock;
}
+ idr_replace... |
9c72d26e9fe3be79dd1d8a2ba00a033503ffd27d | Analyze and fix the following issue in the Linux kernel code: kbuild: move vmlinux.a build rule to scripts/Makefile.vmlinux_a | Problem Details:
Move the build rule for vmlinux.a to a separate file in preparation
for supporting distributed builds with Clang ThinLTO.
Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
Tested-by: Rong Xu <xur@google.com>
Tested-by: Piotr Gorski <piotrgorski@cachyos.org>
Tested-by: Nathan Chancellor <nathan@ker... | ```diff
diff --git a/Makefile b/Makefile
index e27c91ea56fc..0fce9557a115 100644
--- a/Makefile
+++ b/Makefile
@@ -1291,7 +1291,7 @@ export ARCH_DRIVERS := $(drivers-y) $(drivers-m)
KBUILD_VMLINUX_OBJS := built-in.a $(patsubst %/, %/lib.a, $(filter %/, $(libs-y)))
KBUILD_VMLINUX_LIBS := $(filter-out %/, $(libs-y))
... |
2a02b4f96f7bb77ae4cef5d41494f83d01d022dd | Analyze and fix the following issue in the Linux kernel code: rust: pin-init: docs: fix typos in MaybeZeroable documentation | Problem Details:
Signed-off-by: Xiaobo Liu <cppcoffee@gmail.com>
Link: https://patch.msgid.link/20260527-pin-init-sync-v1-4-e20335ed2501@garyguo.net
Signed-off-by: Gary Guo <gary@garyguo.net> | ```diff
diff --git a/rust/pin-init/src/lib.rs b/rust/pin-init/src/lib.rs
index c9e2cbe27915..84099474324e 100644
--- a/rust/pin-init/src/lib.rs
+++ b/rust/pin-init/src/lib.rs
@@ -431,7 +431,7 @@ pub use ::pin_init_internal::Zeroable;
/// ```
/// use pin_init::MaybeZeroable;
///
-/// // implmements `Zeroable`
+/// //... |
5423ef9d4db852835746001d0840231227bb0e39 | Analyze and fix the following issue in the Linux kernel code: rust: pin-init: internal: suppress `non_snake_case` lint in `[pin_]init!` | Problem Details:
Allows `non_snake_case` lint on local variables generated in `[pin_]init!`.
Conceptually the identifiers in `[pin_]init!` just references the field
names, and are not defining them, so the warning should not be generated,
similar to how constructing a struct with non-snake-case field names do no
gener... | ```diff
diff --git a/rust/pin-init/internal/src/init.rs b/rust/pin-init/internal/src/init.rs
index 699b105570a5..041a84593730 100644
--- a/rust/pin-init/internal/src/init.rs
+++ b/rust/pin-init/internal/src/init.rs
@@ -296,7 +296,9 @@ fn init_fields(
#init
#(#cfgs)*
- #[allow(unus... |
f75e3eb08fe31d30a9af6ed80cdd22e6772837e2 | Analyze and fix the following issue in the Linux kernel code: wireguard: send: append trailer after expanding head | Problem Details:
With how this is currently written, we add the trailer, zero it out, and
then add the header space on. If that header space requires a
reallocation + copy, the zeros in the trailer aren't copied, because the
skb len hasn't actually been yet expanded to cover that. Instead add the
padding at the end of ... | ```diff
diff --git a/drivers/net/wireguard/send.c b/drivers/net/wireguard/send.c
index 26e09c30d596..67d01478eb76 100644
--- a/drivers/net/wireguard/send.c
+++ b/drivers/net/wireguard/send.c
@@ -177,16 +177,6 @@ static bool encrypt_packet(struct sk_buff *skb, struct noise_keypair *keypair)
trailer_len = padding_len +... |
072aa0f5c3d8f11f3159037418ec45edce7440b8 | Analyze and fix the following issue in the Linux kernel code: Revert "ipv6: preserve insertion order for same-scope addresses" | Problem Details:
Chris Adams reported that preserving insertion order for same-scope
addresses is causing SSH connections to be dropped after stopping a VM
while running NetworkManager.
NetworkManager caches the IPv6 address configuration, when a RA arrives,
it determines the list of addresses to configure and checks ... | ```diff
diff --git a/net/ipv6/addrconf.c b/net/ipv6/addrconf.c
index 5476b6536eb7..bb84a78b80f6 100644
--- a/net/ipv6/addrconf.c
+++ b/net/ipv6/addrconf.c
@@ -1013,7 +1013,7 @@ ipv6_link_dev_addr(struct inet6_dev *idev, struct inet6_ifaddr *ifp)
list_for_each(p, &idev->addr_list) {
struct inet6_ifaddr *ifa
= l... |
ca61bcec3e8a52ad2bf8b02f9244df1d47447ffa | Analyze and fix the following issue in the Linux kernel code: arm64: dts: ti: k3-am62-verdin: Reserve UART_4 for Cortex-M4F | Problem Details:
Add a device tree overlay reserving AM62 MCU_UART0 (Verdin UART_4) for
use by the Cortex-M4F co-processor as its debug UART.
Assisted-by: Claude:claude-sonnet-4.6
Signed-off-by: Vitor Soares <vitor.soares@toradex.com>
Reviewed-by: Francesco Dolcini <francesco.dolcini@toradex.com>
Link: https://patch.m... | ```diff
diff --git a/arch/arm64/boot/dts/ti/Makefile b/arch/arm64/boot/dts/ti/Makefile
index a1083c0b2502..31c9bc1d48b1 100644
--- a/arch/arm64/boot/dts/ti/Makefile
+++ b/arch/arm64/boot/dts/ti/Makefile
@@ -44,6 +44,7 @@ dtb-$(CONFIG_ARCH_K3) += k3-am625-verdin-nonwifi-zinnia.dtb
dtb-$(CONFIG_ARCH_K3) += k3-am625-verd... |
119de2c33d96d2b4e79f8fbe8ec0c5b5939e0a52 | Analyze and fix the following issue in the Linux kernel code: pinctrl: tegra238: remove unused entries | Problem Details:
The -Wunused-const-variable check points out a number of added
entries that are currently not referenced:
drivers/pinctrl/tegra/pinctrl-tegra238.c:1169:27: error: 'soc_gpio86_phh3_pins' defined but not used [-Werror=unused-const-variable=]
1169 | static const unsigned int soc_gpio86_phh3_pins[] = {
... | ```diff
diff --git a/drivers/pinctrl/tegra/pinctrl-tegra238.c b/drivers/pinctrl/tegra/pinctrl-tegra238.c
index 421da334151c..c765b6b880e5 100644
--- a/drivers/pinctrl/tegra/pinctrl-tegra238.c
+++ b/drivers/pinctrl/tegra/pinctrl-tegra238.c
@@ -1074,102 +1074,6 @@ static const unsigned int pwm7_pee1_pins[] = {
TEGRA_PI... |
ff6e798c2eac3ebd0501ad7e796f583fab928de8 | Analyze and fix the following issue in the Linux kernel code: net: skbuff: fix pskb_carve leaking zcopy pages | Problem Details:
When SKBFL_MANAGED_FRAG_REFS is set, frag pages are not refcounted but
their lifetime is controlled by the attached ubuf_info. To make a copy
of the skb_shared_info, we either should clear the flag and reference
the frags, or keep the flag and have frags unreferenced.
pskb_carve_inside_header() and ps... | ```diff
diff --git a/net/core/skbuff.c b/net/core/skbuff.c
index 0d3cc115f2e7..c02f0a507ba8 100644
--- a/net/core/skbuff.c
+++ b/net/core/skbuff.c
@@ -6823,6 +6823,11 @@ static int pskb_carve_inside_header(struct sk_buff *skb, const u32 off,
skb_copy_from_linear_data_offset(skb, off, data, new_hlen);
skb->len -= of... |
9c7da87c2dc860bb17ca1ece942495d28b1ce3b9 | Analyze and fix the following issue in the Linux kernel code: ipv6: fix possible infinite loop in fib6_select_path() | Problem Details:
Found while auditing the same pattern Sashiko reported in
rt6_fill_node() [1]. Apply the same fix as
commit f8d8ce1b515a ("ipv6: fix possible infinite loop in fib6_info_uses_dev()").
Writers holding tb6_lock can list_del_rcu(&first->fib6_siblings)
without waiting for RCU readers; first->fib6_siblings.... | ```diff
diff --git a/net/ipv6/route.c b/net/ipv6/route.c
index dad416fdc585..636f0120d7e3 100644
--- a/net/ipv6/route.c
+++ b/net/ipv6/route.c
@@ -481,6 +481,9 @@ void fib6_select_path(const struct net *net, struct fib6_result *res,
const struct fib6_nh *nh = sibling->fib6_nh;
int nh_upper_bound;
+ if (!READ_O... |
9f72412bcf60144f252b0d6205106abf14344abc | Analyze and fix the following issue in the Linux kernel code: ipv6: fix possible infinite loop in rt6_fill_node() | Problem Details:
Sashiko reported this issue [1]. Apply the same fix as
commit f8d8ce1b515a ("ipv6: fix possible infinite loop in fib6_info_uses_dev()").
Writers holding tb6_lock can list_del_rcu(&rt->fib6_siblings)
without waiting for RCU readers; rt->fib6_siblings.next then still
points into the old ring and this so... | ```diff
diff --git a/net/ipv6/route.c b/net/ipv6/route.c
index b106e5fef9cb..dad416fdc585 100644
--- a/net/ipv6/route.c
+++ b/net/ipv6/route.c
@@ -5902,6 +5902,8 @@ static int rt6_fill_node(struct net *net, struct sk_buff *skb,
goto nla_put_failure;
}
+ if (!READ_ONCE(rt->fib6_nsiblings))
+ break;
}
... |
f72eed9b84fb771019a955908132410a9ba9ea3f | Analyze and fix the following issue in the Linux kernel code: bpf: sockmap: fix tail fragment offset in bpf_msg_push_data | Problem Details:
When bpf_msg_push_data() inserts data in the middle of a scatterlist
entry, it splits the original entry into a left fragment and a right
fragment.
The right fragment offset is page-local, but the code advances it with
`start`, which is the message-global insertion point. For inserts into a
non-first ... | ```diff
diff --git a/net/core/filter.c b/net/core/filter.c
index 9590877b0714..80439767e0ee 100644
--- a/net/core/filter.c
+++ b/net/core/filter.c
@@ -2869,7 +2869,7 @@ BPF_CALL_4(bpf_msg_push_data, struct sk_msg *, msg, u32, start,
psge->length = start - offset;
rsge.length -= psge->length;
- rsge.offset += s... |
1e584c304cfb94a759417130b1fc6d30b30c4cce | Analyze and fix the following issue in the Linux kernel code: vsock/virtio: bind uarg before filling zerocopy skb | Problem Details:
virtio_transport_send_pkt_info() allocates or reuses the zerocopy uarg
before entering the send loop, but virtio_transport_alloc_skb() still
fills the skb before it inherits that uarg. When fixed-buffer vectored
zerocopy hits MAX_SKB_FRAGS, io_sg_from_iter() may partially attach
managed frags and retur... | ```diff
diff --git a/net/vmw_vsock/virtio_transport_common.c b/net/vmw_vsock/virtio_transport_common.c
index b143290a311d..b10666937c49 100644
--- a/net/vmw_vsock/virtio_transport_common.c
+++ b/net/vmw_vsock/virtio_transport_common.c
@@ -205,6 +205,7 @@ static u16 virtio_transport_get_type(struct sock *sk)
static str... |
b8fbbfe81d3e9678290923f374d700aa03fa8d4e | Analyze and fix the following issue in the Linux kernel code: batman-adv: add missing includes | Problem Details:
Some of the recent fixes required features from new header files. There is
currently no build problem because transitive includes take care of it. But
the batman-adv source code tries to avoid the dependency to
transitive/implicite includes because it has no control over them and they
might get removed... | ```diff
diff --git a/net/batman-adv/bat_v_ogm.c b/net/batman-adv/bat_v_ogm.c
index d66ca77b1aaa..6436e9bc079b 100644
--- a/net/batman-adv/bat_v_ogm.c
+++ b/net/batman-adv/bat_v_ogm.c
@@ -8,6 +8,7 @@
#include "main.h"
#include <linux/atomic.h>
+#include <linux/bug.h>
#include <linux/byteorder/generic.h>
#include <... |
1e323d0e7d2292057701fba40414166488bfb9fb | Analyze and fix the following issue in the Linux kernel code: MAINTAINERS: Rename batman-adv T(ree) | Problem Details:
Replace the batman-adv tree name "linux-merge" with "batadv" to match the
patch prefix convention used in subject lines (e.g. "[PATCH batadv 1/10]").
The previous name "linux-merge" was ambiguous and was not suitable as a
easy-to-recognize prefix. Routing of patches to net-next vs. net remains at
maint... | ```diff
diff --git a/MAINTAINERS b/MAINTAINERS
index f1d2a924d53d..741fb4166aa2 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -4440,7 +4440,7 @@ W: https://www.open-mesh.org/
Q: https://patchwork.open-mesh.org/project/batman/list/
B: https://www.open-mesh.org/projects/batman-adv/issues
C: ircs://irc.hackint.org/bata... |
c8cc238093ca6c99267032f6cfe78f59389f3157 | Analyze and fix the following issue in the Linux kernel code: KVM: SEV: Use READ_ONCE() when reading entries/indices from PSC buffer | Problem Details:
Use READ_ONCE() when reading entries/indices from the guest-accessible
Page State Change buffer to defend against TOCTOU bugs.
Don't bother with READ_ONCE()/WRITE_ONCE() for cases where KVM is writing
(and not consuming the result!), as the guest isn't supposed to touch the
buffer while it's being pro... | ```diff
diff --git a/arch/x86/kvm/svm/sev.c b/arch/x86/kvm/svm/sev.c
index 6e8cbae2135a..62b5befe0eed 100644
--- a/arch/x86/kvm/svm/sev.c
+++ b/arch/x86/kvm/svm/sev.c
@@ -3872,9 +3872,9 @@ static void __snp_complete_one_psc(struct vcpu_svm *svm)
*/
for (idx = svm->sev_es.psc_idx; svm->sev_es.psc_inflight;
s... |
121d88de56bc5c0ba0ce2f6381af67f948a7e7c1 | Analyze and fix the following issue in the Linux kernel code: KVM: SEV: Check PSC request indices against the actual size of the buffer | Problem Details:
When processing Page State Change (PSC) requests, validate the PSC buffer
against the effective size of the scratch area, which could be less than
the maximum size if the guest provided a pointer that isn't exactly at the
start of the GHCB shared buffer.
Fixes: 9b54e248d264 ("KVM: SEV: Add support to ... | ```diff
diff --git a/arch/x86/kvm/svm/sev.c b/arch/x86/kvm/svm/sev.c
index 8577451b82b2..6e8cbae2135a 100644
--- a/arch/x86/kvm/svm/sev.c
+++ b/arch/x86/kvm/svm/sev.c
@@ -3903,7 +3903,7 @@ static int snp_begin_psc(struct vcpu_svm *svm)
struct kvm_vcpu *vcpu = &svm->vcpu;
struct psc_hdr *hdr = &psc->hdr;
struct ps... |
5867d7e202e09f037cefe77f7af4413c7c0fa088 | Analyze and fix the following issue in the Linux kernel code: KVM: SEV: Compute the correct max length of the in-GHCB scratch area | Problem Details:
When setting the length of the GHCB scratch area, and the area is in the
GHCB shared buffer, set the effective length of the scratch area to the max
possible size given the start of the guest-provided pointer, and the end of
the shared buffer.
The code was "fine" when first introduced, as KVM doesn't ... | ```diff
diff --git a/arch/x86/kvm/svm/sev.c b/arch/x86/kvm/svm/sev.c
index cbb3040e0778..6072fecfe994 100644
--- a/arch/x86/kvm/svm/sev.c
+++ b/arch/x86/kvm/svm/sev.c
@@ -3662,7 +3662,7 @@ int pre_sev_run(struct vcpu_svm *svm, int cpu)
}
#define GHCB_SCRATCH_AREA_LIMIT (16ULL * PAGE_SIZE)
-static int setup_vmgexit... |
2be54670bdc017004c4a4b8bddb6ff02ebe7dbe2 | Analyze and fix the following issue in the Linux kernel code: KVM: SEV: Use the size of the PSC header as the minimum size for PSC requests | Problem Details:
When handling a Page State Change (PSC) #VMGEXIT use the size of the PSC
header as the minimum size for the scratch area. Per the GHCB spec, PSC
requests do NOT provide the length, i.e. using control->exit_info_2 for the
length is completely made up behavior. The existing code "works", e.g.
even thou... | ```diff
diff --git a/arch/x86/kvm/svm/sev.c b/arch/x86/kvm/svm/sev.c
index 52703c954856..cbb3040e0778 100644
--- a/arch/x86/kvm/svm/sev.c
+++ b/arch/x86/kvm/svm/sev.c
@@ -4559,7 +4559,7 @@ int sev_handle_vmgexit(struct kvm_vcpu *vcpu)
vcpu->run->system_event.data[0] = control->ghcb_gpa;
break;
case SVM_VMGEXIT_... |
3988bd2723de407ae90fa7a6f6029b4e60238c58 | Analyze and fix the following issue in the Linux kernel code: KVM: SEV: Ignore Port I/O requests of length '0' | Problem Details:
Explicitly ignore Port I/O requests of length '0' (or count '0'), so that
setting up the software scratch area (and other code) doesn't have to
worry about underflowing the length, and to allow for WARNing on trying
to configure the scratch area with len==0.
Fixes: 291bd20d5d88 ("KVM: SVM: Add initial... | ```diff
diff --git a/arch/x86/kvm/svm/sev.c b/arch/x86/kvm/svm/sev.c
index e6579ca9f364..52703c954856 100644
--- a/arch/x86/kvm/svm/sev.c
+++ b/arch/x86/kvm/svm/sev.c
@@ -4585,6 +4585,11 @@ int sev_handle_vmgexit(struct kvm_vcpu *vcpu)
control->exit_info_1, control->exit_info_2);
ret = -EINVAL;
break;
+ c... |
dcf1b2d4b0564a27e4ca7c654871aab4f9620046 | Analyze and fix the following issue in the Linux kernel code: KVM: SEV: Reject MMIO requests larger than 8 bytes with GHCB v2+ | Problem Details:
When using GHCB v2+, reject MMIO requests that are larger than 8 bytes.
Per the GHCB spec:
SW_EXITINFO2 must be less than or equal to 0x7fffffff for version 1 and
less than or equal to 0x8 for all other versions.
Fixes: 4af663c2f64a ("KVM: SEV: Allow per-guest configuration of GHCB protocol versi... | ```diff
diff --git a/arch/x86/kvm/svm/sev.c b/arch/x86/kvm/svm/sev.c
index fb2174b6d1ba..e6579ca9f364 100644
--- a/arch/x86/kvm/svm/sev.c
+++ b/arch/x86/kvm/svm/sev.c
@@ -4502,6 +4502,11 @@ int sev_handle_vmgexit(struct kvm_vcpu *vcpu)
if (!len)
return 1;
+ if (to_kvm_sev_info(vcpu->kvm)->ghcb_version >= 2 &&... |
1aa8a6dc7dac8b83234b53518311bf78231f4fa5 | Analyze and fix the following issue in the Linux kernel code: KVM: SEV: Ignore MMIO requests of length '0' | Problem Details:
Explicitly ignore MMIO requests of length '0', so that setting up the
software scratch area (and other code) doesn't have to worry about
underflowing the length, and to allow for special casing '0' in the
future.
Fixes: 8f423a80d299 ("KVM: SVM: Support MMIO for an SEV-ES guest")
Cc: stable@vger.kernel... | ```diff
diff --git a/arch/x86/kvm/svm/sev.c b/arch/x86/kvm/svm/sev.c
index 23170b64f4a3..fb2174b6d1ba 100644
--- a/arch/x86/kvm/svm/sev.c
+++ b/arch/x86/kvm/svm/sev.c
@@ -4497,13 +4497,17 @@ int sev_handle_vmgexit(struct kvm_vcpu *vcpu)
case SVM_VMGEXIT_MMIO_READ:
case SVM_VMGEXIT_MMIO_WRITE: {
bool is_write = c... |
db3f2195d29344a3cf1e9dd9ab7f21ced7308cf7 | Analyze and fix the following issue in the Linux kernel code: KVM: SEV: Require in-GHCB scratch area if GHCB v2+ is in use | Problem Details:
As per the GHCB spec, when using GHCB v2+ require the software scratch area
to reside in the GHCB's shared buffer. Note, things like Page State Change
(PSC) requests _rely_ on this behavior, as the guest can't provide a length
when making the request, i.e. the size of the guest payload is bounded by
t... | ```diff
diff --git a/arch/x86/kvm/svm/sev.c b/arch/x86/kvm/svm/sev.c
index c2126b3c3072..23170b64f4a3 100644
--- a/arch/x86/kvm/svm/sev.c
+++ b/arch/x86/kvm/svm/sev.c
@@ -3703,6 +3703,10 @@ static int setup_vmgexit_scratch(struct vcpu_svm *svm, bool sync, u64 len)
scratch_va = (void *)svm->sev_es.ghcb;
scratch_va... |
245552af869d35ae27cac2121696dd630f15b3bf | Analyze and fix the following issue in the Linux kernel code: arm: dts: bcm2711: Fix typo in gpio-line-names | Problem Details:
Replace "RGMIO_MDC" with "RGMII_MDC" in gpio-line-names.
Signed-off-by: Jinseok Kim <always.starving0@gmail.com>
Link: https://lore.kernel.org/r/20260527103930.2973-1-always.starving0@gmail.com
Fixes: cd87c180b301 ("ARM: dts: bcm2711-rpi-4-b: Add SoC GPIO labels")
Fixes: ea93ada05c9e ("ARM: dts: Add R... | ```diff
diff --git a/arch/arm/boot/dts/broadcom/bcm2711-rpi-4-b.dts b/arch/arm/boot/dts/broadcom/bcm2711-rpi-4-b.dts
index 353bb50ce542..5469fa663526 100644
--- a/arch/arm/boot/dts/broadcom/bcm2711-rpi-4-b.dts
+++ b/arch/arm/boot/dts/broadcom/bcm2711-rpi-4-b.dts
@@ -110,7 +110,7 @@
"GPIO26",
"GPIO27",
... |
fba4a31a7f3b6b29b01c83180f83e7ed4c398738 | Analyze and fix the following issue in the Linux kernel code: arm64: dts: st: Fix SAI addresses on stm32mp251 | Problem Details:
The second field of SAI register addresses should be within 0x3f0 bytes
from the start of the SAI register addresses, the second field describes
the ID registers which are at that addrses. Currently, the second field
does not match RM, fix it.
Fixes: bf26d75a95f1 ("arm64: dts: st: add sai support on s... | ```diff
diff --git a/arch/arm64/boot/dts/st/stm32mp251.dtsi b/arch/arm64/boot/dts/st/stm32mp251.dtsi
index 673fbc5632e6..9c63fdb5a885 100644
--- a/arch/arm64/boot/dts/st/stm32mp251.dtsi
+++ b/arch/arm64/boot/dts/st/stm32mp251.dtsi
@@ -1202,7 +1202,7 @@
sai1: sai@40290000 {
compatible = "st,stm32mp25-sai";
- ... |
bebda0aba2cf64271ded37746c48f9ab6652ca31 | Analyze and fix the following issue in the Linux kernel code: EDAC/{skx_common,i10nm,imh}: Move MC register access helpers to skx_common | Problem Details:
Both i10nm_basic.c and imh_basic.c use identical helpers for accessing
memory controller MMIO-based registers. Move these helpers to skx_common.c
to eliminate code duplication. This change also prepares for an upcoming
patch that will move RRL(retry_rd_err_log) code from i10nm_basic.c to
skx_common.c, ... | ```diff
diff --git a/drivers/edac/i10nm_base.c b/drivers/edac/i10nm_base.c
index de6c52dbd9d2..0a0236583eb7 100644
--- a/drivers/edac/i10nm_base.c
+++ b/drivers/edac/i10nm_base.c
@@ -47,12 +47,6 @@
readl((m)->mbase + ((m)->hbm_mc ? 0xef8 : \
(res_cfg->type == GNR ? 0xaf8 : 0x20ef8)) + \
(i) * (m)->chan_mmio_sz)
-... |
c63ed6e1f5fe648a4a099b6717f679999be482ef | Analyze and fix the following issue in the Linux kernel code: EDAC/{skx_common,skx}: Fix UBSAN shift-out-of-bounds in skx_get_dimm_info | Problem Details:
When the skx_get_dimm_attr() helper returns -EINVAL,
skx_get_dimm_info() does not validate these return values before using
them in a shift operation:
size = ((1ull << (rows + cols + ranks)) * banks) >> (20 - 3);
If all three values are -22, the shift exponent becomes -66, triggering
a UBSAN shif... | ```diff
diff --git a/drivers/edac/skx_common.c b/drivers/edac/skx_common.c
index a9557c8344bc..f15de0ea96c8 100644
--- a/drivers/edac/skx_common.c
+++ b/drivers/edac/skx_common.c
@@ -466,6 +466,9 @@ int skx_get_dimm_info(u32 mtr, u32 mcmtr, u32 amap, struct dimm_info *dimm,
rows = numrow(mtr);
cols = imc->hbm_mc ? ... |
114bfa24eacb688488caa2e459358a1b9b89b16d | Analyze and fix the following issue in the Linux kernel code: EDAC/igen6: Fix memory topology parsing for Panther Lake-H SoCs | Problem Details:
Panther Lake-H SoC memory controller registers for memory topology have
been updated, but the current igen6_edac driver still uses old generation
ones to incorrectly parse memory topology.
Fix the issue by adding memory topology parsing function pointers to the
'struct res_config' and creating a new c... | ```diff
diff --git a/drivers/edac/igen6_edac.c b/drivers/edac/igen6_edac.c
index 0bf9cf349d0b..f849e3299593 100644
--- a/drivers/edac/igen6_edac.c
+++ b/drivers/edac/igen6_edac.c
@@ -122,6 +122,20 @@
#define MEM_SLICE_HASH_MASK(v) (GET_BITFIELD(v, 6, 19) << 6)
#define MEM_SLICE_HASH_LSB_MASK_BIT(v) GET_BITFIELD(v, 2... |
ab1f9d466c7d83ab0d2a529e07984e53b5960dcd | Analyze and fix the following issue in the Linux kernel code: EDAC/igen6: Fix call trace due to missing release() | Problem Details:
When unloading the igen6_edac driver, there is a call trace:
Device '(null)' does not have a release() function, it is broken and must be fixed.
See Documentation/core-api/kobject.rst.
WARNING: drivers/base/core.c:2567 at device_release+0x84/0x90, CPU#5: rmmod/127209
...
RIP: 0010:device_rel... | ```diff
diff --git a/drivers/edac/igen6_edac.c b/drivers/edac/igen6_edac.c
index fcb8ab44cba5..0bf9cf349d0b 100644
--- a/drivers/edac/igen6_edac.c
+++ b/drivers/edac/igen6_edac.c
@@ -1296,6 +1296,11 @@ static bool igen6_imc_absent(void __iomem *window)
return readl(window + MAD_INTER_CHANNEL_OFFSET) == ~0;
}
+stat... |
b0947c6d2464ce58a6a80548d2135f9e95d2aa02 | Analyze and fix the following issue in the Linux kernel code: EDAC/sb_edac: fix grammar in sb_decode_ddr3 warning | Problem Details:
Fix the warning in sb_decode_ddr3() by adding the missing verb "is" and
using "supported" instead of "support" to match the LockStep warning in
sb_decode_ddr4().
Signed-off-by: Thorsten Blum <thorsten.blum@linux.dev>
Signed-off-by: Tony Luck <tony.luck@intel.com>
Reviewed-by: Qiuxu Zhuo <qiuxu.zhuo@in... | ```diff
diff --git a/drivers/edac/sb_edac.c b/drivers/edac/sb_edac.c
index 7b282dfd093f..35eb7a2038ab 100644
--- a/drivers/edac/sb_edac.c
+++ b/drivers/edac/sb_edac.c
@@ -2016,7 +2016,7 @@ static bool sb_decode_ddr4(struct mem_ctl_info *mci, int ch, u8 rank,
static bool sb_decode_ddr3(struct mem_ctl_info *mci, int ch,... |
9581123304b23049437324038698af9fb56ee663 | Analyze and fix the following issue in the Linux kernel code: perf/ftrace: Fix WARNING in __unregister_ftrace_function | Problem Details:
perf_ftrace_function_unregister() unconditionally calls
unregister_ftrace_function() without checking whether the ftrace_ops
was ever successfully registered. This triggers a WARN_ON in
__unregister_ftrace_function() when the ops doesn't have
FTRACE_OPS_FL_ENABLED set.
This can happen during perf_even... | ```diff
diff --git a/kernel/trace/trace_event_perf.c b/kernel/trace/trace_event_perf.c
index a6bb7577e8c5..5b272856e5ab 100644
--- a/kernel/trace/trace_event_perf.c
+++ b/kernel/trace/trace_event_perf.c
@@ -497,7 +497,17 @@ static int perf_ftrace_function_register(struct perf_event *event)
static int perf_ftrace_funct... |
01046072880b654dbadf71be2f645aad4a7b5d87 | Analyze and fix the following issue in the Linux kernel code: tracing: Disable KCOV instrumentation for trace_irqsoff.o | Problem Details:
When KCOV runs its boot selftest with whole-kernel instrumentation
enabled, it sets current->kcov_mode to KCOV_MODE_TRACE_PC without
installing a coverage area. Any instrumented code accepted as task-context
coverage in that window dereferences current->kcov_area and crashes.
On ARMv5 Versatile PB wit... | ```diff
diff --git a/kernel/trace/Makefile b/kernel/trace/Makefile
index 9b0834134cae..660675e1d426 100644
--- a/kernel/trace/Makefile
+++ b/kernel/trace/Makefile
@@ -48,9 +48,10 @@ ifdef CONFIG_GCOV_PROFILE_FTRACE
GCOV_PROFILE := y
endif
-# Functions in this file could be invoked from early interrupt
-# code and p... |
6f31bb737ef8c519e0d58d39d93a5352b920b9b7 | Analyze and fix the following issue in the Linux kernel code: perf test: Make leafloop workload immune to compiler options | Problem Details:
Since the leafloop test program was moved into the main Perf binary as a
workload, it inherited the same compiler options as Perf. In this case
the -fstack-protector option broke the assumption that simple leaf
frames don't have a stack frame on Arm. This causes
test_arm_callgraph_fp.sh to pass even if... | ```diff
diff --git a/tools/perf/tests/workloads/leafloop.c b/tools/perf/tests/workloads/leafloop.c
index f7561767e32c..c20c75f7ba49 100644
--- a/tools/perf/tests/workloads/leafloop.c
+++ b/tools/perf/tests/workloads/leafloop.c
@@ -6,26 +6,48 @@
#include "../tests.h"
/* We want to check these symbols in perf script ... |
48d004c0742dcbc940ffb3b7390540c5a200729e | Analyze and fix the following issue in the Linux kernel code: perf kwork: Bounds check work->cpu before indexing cpus_runtime[] | Problem Details:
work->cpu comes from sample->cpu which is (u32)-1 when
PERF_SAMPLE_CPU is absent. Stored as int, this becomes -1
which passes the signed BUG_ON(work->cpu >= MAX_NR_CPUS) but
causes an out-of-bounds access on cpus_runtime[-1].
Replace the BUG_ON in top_calc_total_runtime() with an unsigned
bounds chec... | ```diff
diff --git a/tools/perf/builtin-kwork.c b/tools/perf/builtin-kwork.c
index f793ea578515..99dc293a0744 100644
--- a/tools/perf/builtin-kwork.c
+++ b/tools/perf/builtin-kwork.c
@@ -467,7 +467,9 @@ static bool profile_event_match(struct perf_kwork *kwork,
u64 time = sample->time;
struct perf_time_interval *pti... |
a2e59fb79f449fb43ca277a413f1e1de3c3a6326 | Analyze and fix the following issue in the Linux kernel code: perf session: Bound nr_cpus_avail and validate sample CPU | Problem Details:
Several downstream consumers (timechart, kwork, sched) use fixed-size
arrays indexed by CPU. A crafted perf.data can supply arbitrary CPU
values that index past these arrays, causing out-of-bounds access.
Validate sample.cpu against min(nr_cpus_avail, MAX_NR_CPUS) in
perf_session__deliver_event() bef... | ```diff
diff --git a/tools/perf/util/header.c b/tools/perf/util/header.c
index f771a76321c1..5b1fa1653d2a 100644
--- a/tools/perf/util/header.c
+++ b/tools/perf/util/header.c
@@ -48,6 +48,7 @@
#include <api/io_dir.h>
#include "asm/bug.h"
#include "tool.h"
+#include "../perf.h"
#include "time-utils.h"
#include "uni... |
d88e954c8271c9c47d6d50dcfdd864e6b031d166 | Analyze and fix the following issue in the Linux kernel code: perf session: Check for decompression buffer size overflow | Problem Details:
On 32-bit systems, sizeof(struct decomp) + decomp_len can wrap
size_t when comp_mmap_len is large. The preceding patch validates
comp_mmap_len alignment but does not cap the upper bound, so two
additions can still overflow:
1. decomp_len += decomp_last_rem: on 32-bit, adding a u64 to
size_t silent... | ```diff
diff --git a/tools/perf/util/tool.c b/tools/perf/util/tool.c
index 18641919473a..25c9b378aa16 100644
--- a/tools/perf/util/tool.c
+++ b/tools/perf/util/tool.c
@@ -34,9 +34,22 @@ static int perf_session__process_compressed_event(const struct perf_tool *tool _
if (decomp_last->head > decomp_last->size)
ret... |
1c9d2ac2ead70d4d7c70e7f1276d68ca86e15fa4 | Analyze and fix the following issue in the Linux kernel code: perf session: Add byte-swap handler for PERF_RECORD_COMPRESSED2 | Problem Details:
PERF_RECORD_COMPRESSED2 events carry a data_size field that must be
byte-swapped when reading cross-endian perf.data files. Without a
swap handler, reading COMPRESSED2 events on a different-endian machine
would misinterpret data_size as a garbage value, causing the
decompression path to read the wrong... | ```diff
diff --git a/tools/perf/util/session.c b/tools/perf/util/session.c
index 8280413f4528..9271885e3920 100644
--- a/tools/perf/util/session.c
+++ b/tools/perf/util/session.c
@@ -1056,6 +1056,14 @@ static int perf_event__time_conv_swap(union perf_event *event,
return 0;
}
+static int perf_event__compressed2_sw... |
3669697bda41c562d90eb38f54881cc02ef3d51c | Analyze and fix the following issue in the Linux kernel code: perf header: Validate bitmap size before allocating in do_read_bitmap() | Problem Details:
do_read_bitmap() reads a u64 bit count from the file and passes it
to bitmap_zalloc() without checking it against the remaining section
size. A crafted perf.data could trigger a large allocation that would
only fail later when the per-element reads exceed section bounds.
Additionally, bitmap_zalloc() ... | ```diff
diff --git a/tools/perf/util/header.c b/tools/perf/util/header.c
index 37d7c9849e0e..2fea0172140e 100644
--- a/tools/perf/util/header.c
+++ b/tools/perf/util/header.c
@@ -178,15 +178,25 @@ int do_write(struct feat_fd *ff, const void *buf, size_t size)
/* Return: 0 if succeeded, -ERR if failed. */
static int d... |
944f65c8b8231d26d4db6be67bcb641142603cb4 | Analyze and fix the following issue in the Linux kernel code: perf header: Sanity check HEADER_EVENT_DESC attr.size before swap | Problem Details:
read_event_desc() reads nre (event count), sz (attr size), and nr
(IDs per event) from the file and uses them to control allocations
and loops without validating them against the section size.
A crafted perf.data could trigger large allocations or many loop
iterations before __do_read() eventually rej... | ```diff
diff --git a/tools/perf/util/header.c b/tools/perf/util/header.c
index 90417a478c8d..37d7c9849e0e 100644
--- a/tools/perf/util/header.c
+++ b/tools/perf/util/header.c
@@ -2173,9 +2173,28 @@ static struct evsel *read_event_desc(struct feat_fd *ff)
if (do_read_u32(ff, &nre))
goto error;
+ /* Size of each o... |
7685cc0f2ea34b341524453badf1933142a0961d | Analyze and fix the following issue in the Linux kernel code: perf header: Validate f_attr.ids section before use in perf_session__read_header() | Problem Details:
perf_session__read_header() reads f_attr.ids.size from the perf.data
file and divides it by sizeof(u64) to compute nr_ids, which is
declared as int. No validation is performed on the value before it
is used to allocate arrays and drive a read loop.
On 32-bit architectures, a crafted f_attr.ids.size o... | ```diff
diff --git a/tools/perf/util/header.c b/tools/perf/util/header.c
index f4e0e257ff72..fe23bbd8370c 100644
--- a/tools/perf/util/header.c
+++ b/tools/perf/util/header.c
@@ -64,6 +64,25 @@
#include <event-parse.h>
#endif
+/*
+ * nr_ids * sizeof(struct perf_sample_id) must not overflow
+ * size_t on 32-bit; the... |
7d19f2008abf4b5440bfd9962f46f605beab69df | Analyze and fix the following issue in the Linux kernel code: perf header: Propagate feature section processing errors | Problem Details:
perf_session__read_header() discards the return value from
perf_header__process_sections(), so any error from a feature
section processor (process_nrcpus, process_compressed, etc.)
is silently ignored and the session opens as if nothing went
wrong.
This defeats the validation added by subsequent commi... | ```diff
diff --git a/tools/perf/util/header.c b/tools/perf/util/header.c
index 9e3a08b1f8ae..f4e0e257ff72 100644
--- a/tools/perf/util/header.c
+++ b/tools/perf/util/header.c
@@ -2748,8 +2748,9 @@ static int process_tracing_data(struct feat_fd *ff __maybe_unused, void *data __
return ret < 0 ? -1 : 0;
#else
- pr_e... |
2bd03e3054a4e21895e6aa20dd8a14c08e37edee | Analyze and fix the following issue in the Linux kernel code: perf tools: Bounds check perf_event_attr fields against attr.size before printing | Problem Details:
perf_event_attr__fprintf() accessed all struct fields unconditionally,
but attrs from older perf.data files or BPF-captured syscall payloads
may have a smaller size than the current struct. Fields beyond the
recorded size contain uninitialized or zero-filled data.
Add size-guarded macros (PRINT_ATTRn... | ```diff
diff --git a/tools/perf/trace/beauty/perf_event_open.c b/tools/perf/trace/beauty/perf_event_open.c
index c1c7445dcff9..6315b46bcdf0 100644
--- a/tools/perf/trace/beauty/perf_event_open.c
+++ b/tools/perf/trace/beauty/perf_event_open.c
@@ -1,4 +1,5 @@
// SPDX-License-Identifier: LGPL-2.1
+#include <string.h>
#... |
3c18544fb18b18fa824d072fc6a22e8d9f6dc070 | Analyze and fix the following issue in the Linux kernel code: perf header: Validate null-termination in PERF_RECORD_EVENT_UPDATE string fields | Problem Details:
strdup(ev->unit) and strdup(ev->name) read until '\0' with no
guarantee the string is null-terminated within event->header.size.
The dump_trace fprintf path has the same problem with %s.
Validate before either path runs — same class of bug fixed for
MMAP/MMAP2/COMM/CGROUP by perf_event__check_nul().
... | ```diff
diff --git a/tools/perf/util/header.c b/tools/perf/util/header.c
index c0b5c99f462a..9e3a08b1f8ae 100644
--- a/tools/perf/util/header.c
+++ b/tools/perf/util/header.c
@@ -5117,15 +5117,76 @@ size_t perf_event__fprintf_event_update(union perf_event *event, FILE *fp)
switch (ev->type) {
case PERF_EVENT_UPDA... |
355ca55e3e96ea272b330f3fb80401472f60d18c | Analyze and fix the following issue in the Linux kernel code: perf session: Add byte-swap and bounds check for PERF_RECORD_BPF_METADATA events | Problem Details:
PERF_RECORD_BPF_METADATA has no entry in perf_event__swap_ops[], so its
nr_entries field is never byte-swapped when reading a cross-endian
perf.data file. Downstream processing in
perf_event__fprintf_bpf_metadata() loops over nr_entries, so a
foreign-endian value causes out-of-bounds reads.
Add a swa... | ```diff
diff --git a/tools/perf/util/session.c b/tools/perf/util/session.c
index 092fccbea8f8..95eb793026de 100644
--- a/tools/perf/util/session.c
+++ b/tools/perf/util/session.c
@@ -961,6 +961,48 @@ static int perf_event__time_conv_swap(union perf_event *event,
return 0;
}
+static int perf_event__bpf_metadata_swa... |
97cd22555c6dd3c5124ff16417fa66dd7bb844be | Analyze and fix the following issue in the Linux kernel code: perf auxtrace: Harden auxtrace_error event handling | Problem Details:
Fix four issues in PERF_RECORD_AUXTRACE_ERROR handling:
1. auxtrace_error_name() takes a signed int parameter, but e->type
is __u32. A crafted value like 0xFFFFFFFF converts to -1, passes
the bounds check, and causes a negative array index. Fix by
changing the parameter to unsigned int.
2.... | ```diff
diff --git a/tools/perf/util/auxtrace.c b/tools/perf/util/auxtrace.c
index a9f007d47c0b..fcf564e0d777 100644
--- a/tools/perf/util/auxtrace.c
+++ b/tools/perf/util/auxtrace.c
@@ -1774,7 +1774,7 @@ static const char * const auxtrace_error_type_name[] = {
[PERF_AUXTRACE_ERROR_ITRACE] = "instruction trace",
};
... |
23d6be944edd59f2e0a9a2a186388c0c58e85416 | Analyze and fix the following issue in the Linux kernel code: perf header: Byte-swap build ID event pid and bounds check section entries | Problem Details:
perf_header__read_build_ids() swaps the event header fields for cross-endian
perf.data files but not bev.pid. This causes perf_session__findnew_machine()
to look up the wrong machine for guest VM build IDs, misattributing them.
Swap bev.pid alongside the header fields.
Also add a build_id_swap callbac... | ```diff
diff --git a/tools/perf/util/header.c b/tools/perf/util/header.c
index 967c3d8ff12c..c0b5c99f462a 100644
--- a/tools/perf/util/header.c
+++ b/tools/perf/util/header.c
@@ -1,6 +1,7 @@
// SPDX-License-Identifier: GPL-2.0
#include <errno.h>
#include <inttypes.h>
+#include <limits.h>
#include "string2.h"
#incl... |
5682175baf39cddefe6697ee3faed05928c26364 | Analyze and fix the following issue in the Linux kernel code: perf session: Validate nr fields against event size on both swap and common paths | Problem Details:
Several event types use an nr field to control iteration over
variable-length arrays. The swap handlers byte-swap and loop using
these fields without bounds checks, and the native processing path
trusts them as well.
Add bounds checks on both paths for:
- PERF_RECORD_THREAD_MAP: validate nr against ... | ```diff
diff --git a/tools/perf/util/session.c b/tools/perf/util/session.c
index aef10d42be35..8588e12f110f 100644
--- a/tools/perf/util/session.c
+++ b/tools/perf/util/session.c
@@ -496,13 +496,35 @@ static int perf_event__throttle_swap(union perf_event *event,
static int perf_event__namespaces_swap(union perf_event ... |
6a38b515a5ea7101e8a9e14acf248d14083c632f | Analyze and fix the following issue in the Linux kernel code: perf session: Validate HEADER_ATTR attr.size before swapping | Problem Details:
Harden PERF_RECORD_HEADER_ATTR handling against crafted perf.data:
- Validate attr.size: must be >= PERF_ATTR_SIZE_VER0, a multiple
of sizeof(u64), and fit within the event payload.
- Copy only min(attr.size, sizeof(struct perf_event_attr)) bytes
into a local attr, zeroing the rest so legacy files... | ```diff
diff --git a/tools/perf/builtin-inject.c b/tools/perf/builtin-inject.c
index 41a3721a194d..d8cb1f562f69 100644
--- a/tools/perf/builtin-inject.c
+++ b/tools/perf/builtin-inject.c
@@ -229,6 +229,7 @@ static int perf_event__repipe_attr(const struct perf_tool *tool,
struct perf_inject *inject = container_of(tool... |
981f13ae6255fe8e9e68ca6435cd8194446460ec | Analyze and fix the following issue in the Linux kernel code: perf session: Add validated swap infrastructure with null-termination checks | Problem Details:
Change swap callbacks from void to int return so handlers can
propagate errors. All 28 existing handlers are converted to
return 0 on success, -1 on error. Three new handlers (KSYMBOL,
BPF_EVENT, HEADER_FEATURE) are added returning int from the
start, with sample_id_all handling for the kernel event ... | ```diff
diff --git a/tools/perf/util/session.c b/tools/perf/util/session.c
index 37544a357418..d5864e380c1b 100644
--- a/tools/perf/util/session.c
+++ b/tools/perf/util/session.c
@@ -290,28 +290,44 @@ static void swap_sample_id_all(union perf_event *event, void *data)
mem_bswap_64(data, size);
}
-static void perf... |
315c81b4b971b6e92cb47c990fb4fbaa14f0386c | Analyze and fix the following issue in the Linux kernel code: perf session: Fix swap_sample_id_all() crash on crafted events | Problem Details:
swap_sample_id_all() calls BUG_ON(size % sizeof(u64)) which kills
perf on any event where the sample_id_all tail is not 8-byte aligned.
A crafted perf.data can trigger this trivially.
Replace BUG_ON with a bounds check: skip the swap if the data pointer
is past the end of the event, and only swap when... | ```diff
diff --git a/tools/perf/util/session.c b/tools/perf/util/session.c
index 24f2ba599b80..37544a357418 100644
--- a/tools/perf/util/session.c
+++ b/tools/perf/util/session.c
@@ -276,10 +276,18 @@ void perf_session__delete(struct perf_session *session)
static void swap_sample_id_all(union perf_event *event, void *... |
fe84caf425f9d404833dc165eb60efbd0fc54e43 | Analyze and fix the following issue in the Linux kernel code: perf session: Fix PERF_RECORD_READ swap and dump for variable-length events | Problem Details:
The kernel dynamically sizes PERF_RECORD_READ based on
attr.read_format: only the fields enabled by PERF_FORMAT_TOTAL_TIME_ENABLED,
PERF_FORMAT_TOTAL_TIME_RUNNING, PERF_FORMAT_ID, and PERF_FORMAT_LOST
are emitted, packed with no gaps.
perf_event__read_swap() unconditionally byte-swapped time_enabled,
... | ```diff
diff --git a/tools/perf/util/session.c b/tools/perf/util/session.c
index c4cd8ad6d810..24f2ba599b80 100644
--- a/tools/perf/util/session.c
+++ b/tools/perf/util/session.c
@@ -354,17 +354,24 @@ static void perf_event__task_swap(union perf_event *event, bool sample_id_all)
swap_sample_id_all(event, &event->for... |
3ec93875fda94e7f4c466855825c860a2e0ceac2 | Analyze and fix the following issue in the Linux kernel code: perf zstd: Fix multi-iteration decompression and error handling | Problem Details:
zstd_decompress_stream() has two bugs in its multi-iteration loop:
1. After each ZSTD_decompressStream() call, the code advances
output.dst by output.pos but doesn't reset output.pos to 0.
ZSTD interprets output.pos relative to output.dst, so the
next iteration writes at (dst + pos) + pos = d... | ```diff
diff --git a/tools/perf/util/zstd.c b/tools/perf/util/zstd.c
index ecda9deb53b7..21a0eb58597c 100644
--- a/tools/perf/util/zstd.c
+++ b/tools/perf/util/zstd.c
@@ -123,14 +123,26 @@ size_t zstd_decompress_stream(struct zstd_data *data, void *src, size_t src_size
}
}
while (input.pos < input.size) {
+ siz... |
a18908b5056b8fdb2c44505f0c57ff05865740a3 | Analyze and fix the following issue in the Linux kernel code: perf zstd: Fix compression error path in zstd_compress_stream_to_records() | Problem Details:
The error fallback does memcpy(dst, src, src_size) intending to store
uncompressed data when compression fails, but this has three bugs:
1. dst has been advanced past the record header (and potentially
past earlier compressed records), so the copy writes to the
wrong offset in the output buffer.... | ```diff
diff --git a/tools/perf/builtin-record.c b/tools/perf/builtin-record.c
index 4a30688699d5..a33c78f030d9 100644
--- a/tools/perf/builtin-record.c
+++ b/tools/perf/builtin-record.c
@@ -2744,7 +2744,7 @@ static int __cmd_record(struct record *rec, int argc, const char **argv)
trigger_error(&auxtrace_snapshot_t... |
1a646a28a0063f1fb31589f7190f2b4fb613e413 | Analyze and fix the following issue in the Linux kernel code: perf tools: Fix event_contains() macro to verify full field extent | Problem Details:
event_contains() checked whether a field's start offset was within
the event (header.size > offsetof), but not whether the full field
fit. A crafted event with header.size = offsetof(field) + 1 would
pass the check, but an 8-byte access (bswap_64, direct read) would
overrun the event boundary by up to... | ```diff
diff --git a/tools/lib/perf/include/perf/event.h b/tools/lib/perf/include/perf/event.h
index 9043dc72b5d6..fdced574c889 100644
--- a/tools/lib/perf/include/perf/event.h
+++ b/tools/lib/perf/include/perf/event.h
@@ -8,7 +8,14 @@
#include <linux/bpf.h>
#include <sys/types.h> /* pid_t */
-#define event_contain... |
1e389b7639f17e947ab9ed77bcba9f2ab7420f74 | Analyze and fix the following issue in the Linux kernel code: perf session: Bounds-check one_mmap event pointer in peek_event | Problem Details:
perf_session__peek_event() computes an event pointer directly from
file_offset when one_mmap is active, without verifying that file_offset
and the subsequent event->header.size fall within the mapped region.
A corrupted perf.data file could cause out-of-bounds memory reads.
Add one_mmap_size to the se... | ```diff
diff --git a/tools/perf/util/session.c b/tools/perf/util/session.c
index 0523fd243e02..c4cd8ad6d810 100644
--- a/tools/perf/util/session.c
+++ b/tools/perf/util/session.c
@@ -1887,12 +1887,27 @@ int perf_session__peek_event(struct perf_session *session, off_t file_offset,
*event_ptr = NULL;
if (session->o... |
da27c4379ce6b2b7d5d3359e9b10c829b9e5dbbe | Analyze and fix the following issue in the Linux kernel code: perf session: Add minimum event size and alignment validation | Problem Details:
Add a per-type minimum size table (perf_event__min_size[]) and
enforce it before swap and processing, so that both cross-endian
and native-endian paths are protected from accessing fields past
the event boundary.
The table uses offsetof() for types with trailing variable-length
fields (filenames, stri... | ```diff
diff --git a/tools/perf/util/session.c b/tools/perf/util/session.c
index 1e25892963b7..0523fd243e02 100644
--- a/tools/perf/util/session.c
+++ b/tools/perf/util/session.c
@@ -1759,15 +1759,121 @@ int perf_session__deliver_synth_attr_event(struct perf_session *session,
return perf_session__deliver_synth_event(... |
9cb99c598643ba78638dfd668cf020544159cf70 | Analyze and fix the following issue in the Linux kernel code: tracing/osnoise: Array printk init and cleanup | Problem Details:
None of the calls to trace_array_printk_buf() will do anything
if we don't initialize the buffer on instance creation (unless
some other tracer called it), so do that.
Add an osnoise_print() function to facilitate adding debug prints
(without tainting).
Use trace_array_printk() instead of trace_array... | ```diff
diff --git a/kernel/trace/trace_osnoise.c b/kernel/trace/trace_osnoise.c
index 62c2667d97fa..5e83c4f6f2b4 100644
--- a/kernel/trace/trace_osnoise.c
+++ b/kernel/trace/trace_osnoise.c
@@ -83,6 +83,22 @@ struct osnoise_instance {
static struct list_head osnoise_instances;
+static void osnoise_print(const cha... |
d4939b77c118dc3ed78334a897b4bb1c98311c53 | Analyze and fix the following issue in the Linux kernel code: drm/msm/a6xx: Increase pwrup_reglist size | Problem Details:
To make room for appending SEL reg programming. Without increasing the
size, we would overflow the pwrup_reglist at ~190 counters on gen8.
Or possibly fewer, considering that some gen8 counter groups also have
separate slice vs unslice SELectors.
Signed-off-by: Rob Clark <robin.clark@oss.qualcomm.com... | ```diff
diff --git a/drivers/gpu/drm/msm/adreno/a6xx_gpu.c b/drivers/gpu/drm/msm/adreno/a6xx_gpu.c
index 2178b4960979..8613d21cecb5 100644
--- a/drivers/gpu/drm/msm/adreno/a6xx_gpu.c
+++ b/drivers/gpu/drm/msm/adreno/a6xx_gpu.c
@@ -1106,7 +1106,7 @@ static int a6xx_ucode_load(struct msm_gpu *gpu)
msm_gem_object_set_n... |
586a34dafc08c4fa68d1b4673de24cd84d09df05 | Analyze and fix the following issue in the Linux kernel code: drm/msm/a8xx: Fix RSCC offset | Problem Details:
In A8xx, the RSCC block is part of GPU's register space. Update the
virtual base address of rscc to point to the correct address.
Fixes: 50e8a557d8d3 ("drm/msm/a8xx: Add support for A8x GMU")
Signed-off-by: Akhil P Oommen <akhilpo@oss.qualcomm.com>
Patchwork: https://patchwork.freedesktop.org/patch/72... | ```diff
diff --git a/drivers/gpu/drm/msm/adreno/a6xx_gmu.c b/drivers/gpu/drm/msm/adreno/a6xx_gmu.c
index b7166a883b01..616198a836a4 100644
--- a/drivers/gpu/drm/msm/adreno/a6xx_gmu.c
+++ b/drivers/gpu/drm/msm/adreno/a6xx_gmu.c
@@ -2401,7 +2401,12 @@ int a6xx_gmu_init(struct a6xx_gpu *a6xx_gpu, struct device_node *node)... |
fb495a57d66e791144ad1da898914b97a87853d6 | Analyze and fix the following issue in the Linux kernel code: drm/msm/a6xx: Limit GXPD votes to recovery in A8x | Problem Details:
In A8x GPUs, the GX GDSC is moved to a separate block called GXCLKCTL
which is under the GX power domain. Due to the way the support for this
block is implemented in its driver, pm_runtime votes result in a vote on
GX/GMxC/MxC rails from the APPS RSC. This is against the Adreno
architecture which requi... | ```diff
diff --git a/drivers/gpu/drm/msm/adreno/a6xx_gmu.c b/drivers/gpu/drm/msm/adreno/a6xx_gmu.c
index 1b44b9e21ad8..b7166a883b01 100644
--- a/drivers/gpu/drm/msm/adreno/a6xx_gmu.c
+++ b/drivers/gpu/drm/msm/adreno/a6xx_gmu.c
@@ -1250,6 +1250,56 @@ done:
return 0;
}
+static int a6xx_gmu_gxpd_get(struct a6xx_gmu *... |
e7c45d9838b7487c1846a0202c649336b2f5bf87 | Analyze and fix the following issue in the Linux kernel code: drm/msm/a8xx: Make a8xx_recover IFPC safe | Problem Details:
Similar to a6xx_recover(), check the GX power domain status before
accessing mmio in GX domain a8xx_recover().
Fixes: 288a93200892 ("drm/msm/adreno: Introduce A8x GPU Support")
Signed-off-by: Akhil P Oommen <akhilpo@oss.qualcomm.com>
Reviewed-by: Konrad Dybcio <konrad.dybcio@oss.qualcomm.com>
Signed-o... | ```diff
diff --git a/drivers/gpu/drm/msm/adreno/a8xx_gpu.c b/drivers/gpu/drm/msm/adreno/a8xx_gpu.c
index 29d559fe4683..86f2b1af9e2a 100644
--- a/drivers/gpu/drm/msm/adreno/a8xx_gpu.c
+++ b/drivers/gpu/drm/msm/adreno/a8xx_gpu.c
@@ -882,17 +882,22 @@ void a8xx_recover(struct msm_gpu *gpu)
adreno_dump_info(gpu);
- i... |
7b661285aa7507eab79efff0a418445157db4141 | Analyze and fix the following issue in the Linux kernel code: firmware: samsung: acpm: remove compile-testing stubs | Problem Details:
Sashiko reported an inconsistent use of NULL vs ERR_PTR()
returns in the stub helpers in xynos-acpm-protocol.h.
Since this only happens on dead code for COMPILE_TEST=y, this is not
really a bug though. Having stub functions that return NULL is a common
way to define optional interfaces, where callers... | ```diff
diff --git a/drivers/clk/samsung/Kconfig b/drivers/clk/samsung/Kconfig
index 70a8b82a0136..198d8b621289 100644
--- a/drivers/clk/samsung/Kconfig
+++ b/drivers/clk/samsung/Kconfig
@@ -97,7 +97,7 @@ config EXYNOS_CLKOUT
config EXYNOS_ACPM_CLK
tristate "Clock driver controlled via ACPM interface"
- depends on... |
50b400214abaec9122558e3f9c6fdd6295914c3c | Analyze and fix the following issue in the Linux kernel code: firmware: samsung: acpm: Make acpm_ops const and access via pointer | Problem Details:
Replace the embedded `struct acpm_ops` inside `struct acpm_handle` with
a pointer to a `const struct acpm_ops`.
Previously, the operations structure was embedded directly within the
handle and populated dynamically at runtime via `acpm_setup_ops()`.
This resulted in mutable function pointers and unnec... | ```diff
diff --git a/drivers/clk/samsung/clk-acpm.c b/drivers/clk/samsung/clk-acpm.c
index 93667777094c..953ca8d5720a 100644
--- a/drivers/clk/samsung/clk-acpm.c
+++ b/drivers/clk/samsung/clk-acpm.c
@@ -68,8 +68,8 @@ static unsigned long acpm_clk_recalc_rate(struct clk_hw *hw,
{
struct acpm_clk *clk = to_acpm_clk(hw... |
9d7a681915245e0e191abfd4b31d010c7037573c | Analyze and fix the following issue in the Linux kernel code: firmware: samsung: acpm: Drop redundant _ops suffix in acpm_ops members | Problem Details:
Rename the `dvfs_ops` and `pmic_ops` members of `struct acpm_ops` to
`dvfs` and `pmic` respectively.
Since these members are housed within the `acpm_ops` structure and
utilize the `acpm_*_ops` types, the `_ops` suffix on the variable names
creates unnecessary redundancy (e.g., `handle.ops.dvfs_ops`).
... | ```diff
diff --git a/drivers/clk/samsung/clk-acpm.c b/drivers/clk/samsung/clk-acpm.c
index d8944160793a..93667777094c 100644
--- a/drivers/clk/samsung/clk-acpm.c
+++ b/drivers/clk/samsung/clk-acpm.c
@@ -68,8 +68,8 @@ static unsigned long acpm_clk_recalc_rate(struct clk_hw *hw,
{
struct acpm_clk *clk = to_acpm_clk(hw... |
ded0abacdc162cf16fdd75d3b04f2be8f67f4654 | Analyze and fix the following issue in the Linux kernel code: RDMA/rxe: Fix typos in comments | Problem Details:
Fix typos found by codespell in driver comments:
rxe.c: s/mangagement/management/
rxe_param.h: s/interations/iterations/
rxe_resp.c: s/recive/receive/
No functional change.
Link: https://patch.msgid.link/r/20260527104527.3222-1-purush.ramalingam@gmail.com
Signed-off-by: Purushothaman Ra... | ```diff
diff --git a/drivers/infiniband/sw/rxe/rxe.c b/drivers/infiniband/sw/rxe/rxe.c
index b0714f9abe3d..af39209d0fcf 100644
--- a/drivers/infiniband/sw/rxe/rxe.c
+++ b/drivers/infiniband/sw/rxe/rxe.c
@@ -81,7 +81,7 @@ static void rxe_init_device_param(struct rxe_dev *rxe, struct net_device *ndev)
} else {
/*
... |
94044acc20cdb99a0429723bcca5e1d828dbf47f | Analyze and fix the following issue in the Linux kernel code: dt-bindings: mmc: sdhci-msm: Rename the binding to include 'qcom' prefix | Problem Details:
This is the only Qcom binding that doesn't have 'qcom' prefix in the
bindings name. This doesn't match with the regex in MAINTAINERS file and
the 'get_maintainer.pl' script fails to list the 'linux-arm-msm' list:
Ulf Hansson <ulfh@kernel.org> (maintainer:MULTIMEDIA CARD (MMC), SECURE DIGITAL (SD) AND.... | ```diff
diff --git a/Documentation/devicetree/bindings/mmc/sdhci-msm.yaml b/Documentation/devicetree/bindings/mmc/qcom,sdhci-msm.yaml
similarity index 99%
rename from Documentation/devicetree/bindings/mmc/sdhci-msm.yaml
rename to Documentation/devicetree/bindings/mmc/qcom,sdhci-msm.yaml
index df81b6accc72..bd558a11b792... |
f595e8e77a51eee35e331f69321766593a845ef2 | Analyze and fix the following issue in the Linux kernel code: mmc: sdhci: add signal voltage switch in sdhci_resume_host | Problem Details:
I met one suspend/resume issue with sdr104 capable sdio wifi card (with
"keep-power-in-suspend" set in DT property):
After resuming from suspend to ram, the sdio wifi card stops working.
Further debug shows that although ios shows the sdio card is at sdr104
mode, the voltage is still at 3V3. This is du... | ```diff
diff --git a/drivers/mmc/host/sdhci.c b/drivers/mmc/host/sdhci.c
index 605be55f8d2d..e3bf901b10aa 100644
--- a/drivers/mmc/host/sdhci.c
+++ b/drivers/mmc/host/sdhci.c
@@ -3836,6 +3836,7 @@ int sdhci_resume_host(struct sdhci_host *host)
host->pwr = 0;
host->clock = 0;
host->reinit_uhs = true;
+ mmc->op... |
1e9a4850afa0ceb63984fb1a9f3e86d0fc4fd18f | Analyze and fix the following issue in the Linux kernel code: mmc: dw_mmc-rockchip: Add missing private data for very old controllers | Problem Details:
The really old controllers (rk2928, rk3066, rk3188) do not support UHS
speeds at all, and thus never handled phase data.
For that reason it never had a parse_dt callback and no driver private
data at all.
Commit ff6f0286c896 ("mmc: dw_mmc-rockchip: Add memory clock auto-gating
support") makes the pri... | ```diff
diff --git a/drivers/mmc/host/dw_mmc-rockchip.c b/drivers/mmc/host/dw_mmc-rockchip.c
index c6eece4ec3fd..75c82ff20f17 100644
--- a/drivers/mmc/host/dw_mmc-rockchip.c
+++ b/drivers/mmc/host/dw_mmc-rockchip.c
@@ -441,6 +441,22 @@ static int dw_mci_common_parse_dt(struct dw_mci *host)
return 0;
}
+static int ... |
423ab671bb921206bab25ffe61adc5da98a64e6c | Analyze and fix the following issue in the Linux kernel code: mmc: sdhci-of-dwcmshc: remove redundant IS_ERR() check | Problem Details:
The clk_disable_unprepare() function has internal protection against
ERR_PTR and NULL pointers (IS_ERR_OR_NULL). Remove the redundant
IS_ERR() check for bus_clk in dwcmshc_suspend() and in the error
path of dwcmshc_resume() to simplify the code.
Note that the clk_prepare_enable() call in dwcmshc_resum... | ```diff
diff --git a/drivers/mmc/host/sdhci-of-dwcmshc.c b/drivers/mmc/host/sdhci-of-dwcmshc.c
index b9ecd91f44ad..0786304e7a2f 100644
--- a/drivers/mmc/host/sdhci-of-dwcmshc.c
+++ b/drivers/mmc/host/sdhci-of-dwcmshc.c
@@ -2564,8 +2564,7 @@ static int dwcmshc_suspend(struct device *dev)
return ret;
clk_disable_u... |
99982b743e5ba72bd1f5de0e03e3b96ae70b1e51 | Analyze and fix the following issue in the Linux kernel code: mmc: litex_mmc: Set mandatory idle clocks before CMD0 | Problem Details:
The litex_mmc driver assumes the card is already probed in the BIOS
and skip the phy initialization. This will cause the command fail
like the following when the old card is unplugged and then insert
a new card:
[ 62.923593] litex-mmc f0004000.mmc: Command (cmd 8) error, status -110
[ 62.949717] l... | ```diff
diff --git a/drivers/mmc/host/litex_mmc.c b/drivers/mmc/host/litex_mmc.c
index 52571bb17c61..3655542ca998 100644
--- a/drivers/mmc/host/litex_mmc.c
+++ b/drivers/mmc/host/litex_mmc.c
@@ -69,6 +69,9 @@
#define SD_SLEEP_US 5
#define SD_TIMEOUT_US 20000
+#define SD_INIT_DELAY_US 1000
+#define SD_INIT_CL... |
b837e38c255dd9f8b53511d52e87f1fda32b3dfe | Analyze and fix the following issue in the Linux kernel code: mmc: litex_mmc: Use DIV_ROUND_UP for more accurate clock calculation | Problem Details:
The previous clock uses roundup_pow_of_two() to calculate the core
clock frequency. It does not meet the actual hardware meaning.
The actual frequency is calculated by "ref_clk / ((div >> 1) << 1)".
Fix the clock divider calculation.
Fixes: 92e099104729 ("mmc: Add driver for LiteX's LiteSDCard interf... | ```diff
diff --git a/drivers/mmc/host/litex_mmc.c b/drivers/mmc/host/litex_mmc.c
index d2f19c2dc673..52571bb17c61 100644
--- a/drivers/mmc/host/litex_mmc.c
+++ b/drivers/mmc/host/litex_mmc.c
@@ -16,6 +16,7 @@
#include <linux/interrupt.h>
#include <linux/iopoll.h>
#include <linux/litex.h>
+#include <linux/math.h>
#i... |
8399055d9f98e94c33608fe9d61afc09a43cc4df | Analyze and fix the following issue in the Linux kernel code: ARM: tegra: lg-x3: Complete video device graph | Problem Details:
Add front and rear camera nodes and interlink them with Tegra CSI and VI.
Adjust camera PMIC voltages to better fit requirements and fix the focuser
node.
Signed-off-by: Svyatoslav Ryhel <clamor95@gmail.com>
Signed-off-by: Thierry Reding <treding@nvidia.com> | ```diff
diff --git a/arch/arm/boot/dts/nvidia/tegra30-lg-p880.dts b/arch/arm/boot/dts/nvidia/tegra30-lg-p880.dts
index cc14e6dca770..1b21d7628c8c 100644
--- a/arch/arm/boot/dts/nvidia/tegra30-lg-p880.dts
+++ b/arch/arm/boot/dts/nvidia/tegra30-lg-p880.dts
@@ -12,6 +12,18 @@
mmc2 = &sdmmc1; /* WiFi */
};
+ host1x@... |
f48ee49726ee4ab545fd2dc644f169c0809b19b3 | Analyze and fix the following issue in the Linux kernel code: mmc: renesas_sdhi: Add OF entry for RZ/G2H SoC | Problem Details:
The RZ/G2H (R8A774E1) SoC was previously handled via the generic
"renesas,rcar-gen3-sdhi" fallback compatible string. However, because
the SDHI IP on RZ/G2H is identical with the R-Car H3-N (R8A77951), it
requires the specific quirks and configuration defined in
`of_r8a7795_compatible` rather than the ... | ```diff
diff --git a/drivers/mmc/host/renesas_sdhi_internal_dmac.c b/drivers/mmc/host/renesas_sdhi_internal_dmac.c
index f6ebb7bc7ede..838248bf8dd6 100644
--- a/drivers/mmc/host/renesas_sdhi_internal_dmac.c
+++ b/drivers/mmc/host/renesas_sdhi_internal_dmac.c
@@ -279,6 +279,7 @@ static const struct renesas_sdhi_of_data_... |
d04e0151d316edbdb4f0397a9b92a1936e4a1421 | Analyze and fix the following issue in the Linux kernel code: mmc: davinci: fix mmc_add_host order in probe | Problem Details:
mmc_add_host() makes the host visible to the MMC core. Register the
interrupt handlers and advertise MMC_CAP_SDIO_IRQ before that, so the
core cannot start using the host before IRQ handling is set up.
Signed-off-by: Osama Abdelkader <osama.abdelkader@gmail.com>
Signed-off-by: Ulf Hansson <ulfh@kernel... | ```diff
diff --git a/drivers/mmc/host/davinci_mmc.c b/drivers/mmc/host/davinci_mmc.c
index 42ad87aa48f5..cdb9fa94b56d 100644
--- a/drivers/mmc/host/davinci_mmc.c
+++ b/drivers/mmc/host/davinci_mmc.c
@@ -1294,14 +1294,10 @@ static int davinci_mmcsd_probe(struct platform_device *pdev)
goto cpu_freq_fail;
}
- ret =... |
8d4ae34e997062076a9098602eaca43353665bd9 | Analyze and fix the following issue in the Linux kernel code: mmc: sdhci-of-dwcmshc: Fix reset, clk, and SDIO support for Eswin EIC7700 | Problem Details:
The EIC7700 code in sdhci-of-dwcmshc uses host->mmc->caps2 to select
different configuration paths for different card types. The current logic
distinguishes eMMC and SD, but does not handle SDIO separately.
Update the EIC7700 card-type checks so that eMMC, SD and SDIO are
distinguished explicitly.
Sw... | ```diff
diff --git a/drivers/mmc/host/sdhci-of-dwcmshc.c b/drivers/mmc/host/sdhci-of-dwcmshc.c
index 0b2158a7e409..b9ecd91f44ad 100644
--- a/drivers/mmc/host/sdhci-of-dwcmshc.c
+++ b/drivers/mmc/host/sdhci-of-dwcmshc.c
@@ -277,6 +277,7 @@
#define PHY_DELAY_CODE_MAX 0x7f
#define PHY_DELAY_CODE_EMMC 0x17
#define PHY... |
7fe40c32a33905302341797b5d12c541729dd08d | Analyze and fix the following issue in the Linux kernel code: firmware: samsung: acpm: Fix infinite loop on sequence number exhaustion | Problem Details:
Sashiko identified a possible infinite loop [1].
ACPM IPC sequence numbers are tracked via a 64-bit bitmap. Previously,
acpm_prepare_xfer() used a do...while loop to search for a free
sequence number.
If all 63 available sequence numbers are leaked due to transient
hardware timeouts or mailbox failur... | ```diff
diff --git a/drivers/firmware/samsung/exynos-acpm.c b/drivers/firmware/samsung/exynos-acpm.c
index 3fa9fe283be4..19db3674a28f 100644
--- a/drivers/firmware/samsung/exynos-acpm.c
+++ b/drivers/firmware/samsung/exynos-acpm.c
@@ -12,6 +12,7 @@
#include <linux/container_of.h>
#include <linux/delay.h>
#include <l... |
bf296f83a3ddab1ab875edc4e8862cb10553064f | Analyze and fix the following issue in the Linux kernel code: firmware: samsung: acpm: Fix missing LKMM barriers in sequence allocator | Problem Details:
Sashiko identified memory ordering races in [1].
The ACPM driver uses a globally shared 'bitmap_seqnum' to track
available sequence numbers. Even though threads now strictly free their
own sequence numbers, the allocation and freeing of these bits across
concurrent threads are effectively lockless ope... | ```diff
diff --git a/drivers/firmware/samsung/exynos-acpm.c b/drivers/firmware/samsung/exynos-acpm.c
index 620880d8820a..3fa9fe283be4 100644
--- a/drivers/firmware/samsung/exynos-acpm.c
+++ b/drivers/firmware/samsung/exynos-acpm.c
@@ -7,7 +7,7 @@
#include <linux/bitfield.h>
#include <linux/bitmap.h>
-#include <linu... |
c889b146478885344a220dd468e5a08de088cbc5 | Analyze and fix the following issue in the Linux kernel code: firmware: samsung: acpm: Fix false timeouts and Use-After-Free in polling | Problem Details:
Sashiko identified severe races in the polling state machine [1].
In the ACPM driver's polling mode, threads waited for responses by
monitoring the globally shared 'bitmap_seqnum'. This caused false
timeouts because if a thread processed its response and freed the
sequence number, a concurrent TX thre... | ```diff
diff --git a/drivers/firmware/samsung/exynos-acpm.c b/drivers/firmware/samsung/exynos-acpm.c
index 9766425a44ab..620880d8820a 100644
--- a/drivers/firmware/samsung/exynos-acpm.c
+++ b/drivers/firmware/samsung/exynos-acpm.c
@@ -105,11 +105,14 @@ struct acpm_queue {
* @cmd: pointer to where the data shall be sa... |
8de061ca149c94871e41d91a5b2e442ecc26a572 | Analyze and fix the following issue in the Linux kernel code: drm/msm: Restore second parameter name in purge() and evict() | Problem Details:
After commit 3392291fc509 ("drm/msm: Fix shrinker deadlock"), all
supported versions of clang warn (or error with CONFIG_WERROR=y):
drivers/gpu/drm/msm/msm_gem_shrinker.c:105:58: error: omitting the parameter name in a function definition is a C23 extension [-Werror,-Wc23-extensions]
105 | purge... | ```diff
diff --git a/drivers/gpu/drm/msm/msm_gem_shrinker.c b/drivers/gpu/drm/msm/msm_gem_shrinker.c
index 6e39e4e578bb..8f118b5185a1 100644
--- a/drivers/gpu/drm/msm/msm_gem_shrinker.c
+++ b/drivers/gpu/drm/msm/msm_gem_shrinker.c
@@ -102,7 +102,7 @@ out_unlock:
}
static bool
-purge(struct drm_gem_object *obj, stru... |
c2aed45fda708607ba0bcc15aa6cc3dd0ac390ec | Analyze and fix the following issue in the Linux kernel code: drm/msm/dp: Add sink_count to debug logs | Problem Details:
Add sink count to the debug logs for [un]plug and HPD IRQ handling.
Signed-off-by: Jessica Zhang <jessica.zhang@oss.qualcomm.com>
[DB: dropped link_ready handling]
Tested-by: Val Packett <val@packett.cool> # x1e80100-dell-latitude-7455
Tested-by: Yongxing Mou <yongxing.mou@oss.qualcomm.com> # Hamoa IO... | ```diff
diff --git a/drivers/gpu/drm/msm/dp/dp_display.c b/drivers/gpu/drm/msm/dp/dp_display.c
index 9292c475e4e7..bf31bc3f8377 100644
--- a/drivers/gpu/drm/msm/dp/dp_display.c
+++ b/drivers/gpu/drm/msm/dp/dp_display.c
@@ -389,8 +389,9 @@ static int msm_dp_hpd_plug_handle(struct msm_dp_display_private *dp)
int ret;
... |
3fbfdc3b1d48cc115a86953e5df0c76cd2efc42b | Analyze and fix the following issue in the Linux kernel code: drm/msm/dp: Fix the ISR_* enum values | Problem Details:
The ISR_HPD_* enum should represent values that can be read from the
REG_DP_DP_HPD_INT_STATUS register. Swap ISR_HPD_IO_GLITCH_COUNT and
ISR_HPD_REPLUG_COUNT to map them correctly to register values.
While we are at it, correct the spelling for ISR_HPD_REPLUG_COUNT.
Fixes: 8ede2ecc3e5e ("drm/msm/dp: ... | ```diff
diff --git a/drivers/gpu/drm/msm/dp/dp_display.c b/drivers/gpu/drm/msm/dp/dp_display.c
index d2124d625485..cf2415635c42 100644
--- a/drivers/gpu/drm/msm/dp/dp_display.c
+++ b/drivers/gpu/drm/msm/dp/dp_display.c
@@ -38,9 +38,9 @@ enum {
ISR_DISCONNECTED,
ISR_CONNECT_PENDING,
ISR_CONNECTED,
- ISR_HPD_REPLUG... |
2e6c2e81d81251623c458a60e2a57447dcbc988e | Analyze and fix the following issue in the Linux kernel code: drm/msm/dp: fix HPD state status bit shift value | Problem Details:
The HPD state status is the 3 most significant bits, not 4 bits of the
HPD_INT_STATUS register.
Fix the bit shift macro so that the correct bits are returned in
msm_dp_aux_is_link_connected().
Fixes: 19e52bcb27c2 ("drm/msm/dp: return correct connection status after suspend")
Signed-off-by: Jessica Zh... | ```diff
diff --git a/drivers/gpu/drm/msm/dp/dp_reg.h b/drivers/gpu/drm/msm/dp/dp_reg.h
index 7c44d4e2cf13..3689642b7fc0 100644
--- a/drivers/gpu/drm/msm/dp/dp_reg.h
+++ b/drivers/gpu/drm/msm/dp/dp_reg.h
@@ -68,8 +68,8 @@
#define DP_DP_IRQ_HPD_INT_ACK (0x00000002)
#define DP_DP_HPD_REPLUG_INT_ACK (0x00000004)
#def... |
f78073e84c800ae146ce62447e7a685a5ceeb92d | Analyze and fix the following issue in the Linux kernel code: Revert "media: renesas: vsp1: brx: Fix format propagation" | Problem Details:
This reverts commit 937f3e6b51f1cea079be9ba642665f2bf8bcc31f.
The change to format propagation in the BRx broke configuration of the
DRM pipeline. Revert it to fix the regression.
The original commit was meant to fix a v4l2-compliance failure, with no
known userspace applications being affected besid... | ```diff
diff --git a/drivers/media/platform/renesas/vsp1/vsp1_brx.c b/drivers/media/platform/renesas/vsp1/vsp1_brx.c
index b1a2c68e9944..9d93cb8b8e82 100644
--- a/drivers/media/platform/renesas/vsp1/vsp1_brx.c
+++ b/drivers/media/platform/renesas/vsp1/vsp1_brx.c
@@ -156,20 +156,14 @@ static int brx_set_format(struct v4... |
a0d8f7ac03e387634c5a7efe3dc162f7d605e2cd | Analyze and fix the following issue in the Linux kernel code: Revert "media: renesas: vsp1: Initialize format on all pads" | Problem Details:
This reverts commit 133ac42af0a1b389e8b7b3dc7c1cc8c30ff162b6.
The change to format initialization, along with the change to format
propagation in the BRx in commit 937f3e6b51f1 ("media: renesas: vsp1:
brx: Fix format propagation"), broke configuration of the DRM pipeline.
Revert it to fix the regressi... | ```diff
diff --git a/drivers/media/platform/renesas/vsp1/vsp1_entity.c b/drivers/media/platform/renesas/vsp1/vsp1_entity.c
index 1dad9589768c..839b75b62ceb 100644
--- a/drivers/media/platform/renesas/vsp1/vsp1_entity.c
+++ b/drivers/media/platform/renesas/vsp1/vsp1_entity.c
@@ -380,7 +380,7 @@ static int vsp1_entity_in... |
e7b63427fdb4977621d69085a97272c8856644fe | Analyze and fix the following issue in the Linux kernel code: sched_ext: Auto-register/unregister dl_server reservations | Problem Details:
Commit cd959a3562050d ("sched_ext: Add a DL server for sched_ext tasks")
introduced an ext_server deadline server to protect sched_ext tasks from
fair/RT starvation, mirroring the existing fair_server.
Currently, both servers reserve their 50ms/1000ms bandwidth at boot,
regardless of whether a BPF sch... | ```diff
diff --git a/include/linux/sched.h b/include/linux/sched.h
index da6a0907a78c..8130d13850fc 100644
--- a/include/linux/sched.h
+++ b/include/linux/sched.h
@@ -702,6 +702,11 @@ struct sched_dl_entity {
* running, skipping the defer phase.
*
* @dl_defer_idle tracks idle state
+ *
+ * @dl_bw_attached te... |
4043f549841619a01999bf5d4e0b7931ef87f6cc | Analyze and fix the following issue in the Linux kernel code: sched/deadline: Reject debugfs dl_server writes for offline CPUs | Problem Details:
Writing runtime or period via the per-CPU dl_server debugfs files
(/sys/kernel/debug/sched/{fair,ext}_server/cpu*/{runtime,period}) on an
offline CPU can trigger two distinct kernel issues:
1) Divide-by-zero in dl_server_apply_params():
Oops: divide error: 0000 [#1] SMP NOPTI
RIP: 0010:dl_server_... | ```diff
diff --git a/kernel/sched/debug.c b/kernel/sched/debug.c
index 4809e1d23081..5e09cf9fae3e 100644
--- a/kernel/sched/debug.c
+++ b/kernel/sched/debug.c
@@ -416,6 +416,9 @@ static ssize_t sched_server_write_common(struct file *filp, const char __user *u
return -EINVAL;
}
+ if (!cpu_online(cpu_of(rq)))
... |
1eae219ea0e80eed83c129e8cae0f007843f1893 | Analyze and fix the following issue in the Linux kernel code: sched/topology: Provide arch_llc_mask for cache aware scheduling | Problem Details:
Venkat Reported a boot kernel panic next-20260522. Git bisect pointed to
b5ea300a17e3 ("sched/cache: Make LLC id continuous")
Stacktrace points to llc_mask being null.
NIP [c000000000e58504] _find_first_bit+0x44/0x130
LR [c000000000e58500] _find_first_bit+0x40/0x130
Call Trace:
build_sched_do... | ```diff
diff --git a/arch/powerpc/include/asm/topology.h b/arch/powerpc/include/asm/topology.h
index 66ed5fe1b718..44ec416fa489 100644
--- a/arch/powerpc/include/asm/topology.h
+++ b/arch/powerpc/include/asm/topology.h
@@ -135,6 +135,13 @@ struct cpumask *cpu_coregroup_mask(int cpu);
const struct cpumask *cpu_die_mask... |
235ab68d67eadbef1fdbfb771f21f5bacc77a2ae | Analyze and fix the following issue in the Linux kernel code: tools/mm/slabinfo: Fix trace disable logic inversion | Problem Details:
The disable trace path in slab_debug() had a logic error where it would
set trace=1 instead of trace=0. This made trace functionality permanently
enabled once turned on for any slab cache.
Fixes: a87615b8f9e2 ("SLUB: slabinfo upgrade")
Cc: stable@vger.kernel.org
Reviewed-by: SeongJae Park <sj@kernel.o... | ```diff
diff --git a/tools/mm/slabinfo.c b/tools/mm/slabinfo.c
index 54c7265ab52d..39f7eae7eecd 100644
--- a/tools/mm/slabinfo.c
+++ b/tools/mm/slabinfo.c
@@ -798,7 +798,7 @@ static void slab_debug(struct slabinfo *s)
fprintf(stderr, "%s can only enable trace for one slab at a time\n", s->name);
}
if (!tracing ... |
f412fe573b3c78fdcf351e282a3c488bb073846b | Analyze and fix the following issue in the Linux kernel code: drm/sched: Fix clang build warning in kunit tests | Problem Details:
Initializing compile time constant struct or arrays from another such
variable is a gcc extension, while clang strictly requires a compile time
constant literal.
As reported by LKP:
>> drivers/gpu/drm/scheduler/tests/tests_scheduler.c:675:10: error: initializer element is not a compile-time constant
... | ```diff
diff --git a/drivers/gpu/drm/scheduler/tests/tests_scheduler.c b/drivers/gpu/drm/scheduler/tests/tests_scheduler.c
index 8b2e4ef9915f..90d31888cf92 100644
--- a/drivers/gpu/drm/scheduler/tests/tests_scheduler.c
+++ b/drivers/gpu/drm/scheduler/tests/tests_scheduler.c
@@ -666,14 +666,10 @@ static void drm_sched_s... |
fa09f08ede3db3050ae16ae1ed92c902d0cada23 | Analyze and fix the following issue in the Linux kernel code: coresight: etb10: restore atomic_t for shared reading state | Problem Details:
The etb10 miscdevice uses drvdata->reading as a shared exclusivity gate
for userspace buffer access. etb_open() claims that gate with
local_cmpxchg(), and etb_release() clears it with local_set().
That gate is shared per-device state rather than CPU-local state. A
running system can reach it whenever ... | ```diff
diff --git a/drivers/hwtracing/coresight/coresight-etb10.c b/drivers/hwtracing/coresight/coresight-etb10.c
index b952a1d47f12..a827f76b8144 100644
--- a/drivers/hwtracing/coresight/coresight-etb10.c
+++ b/drivers/hwtracing/coresight/coresight-etb10.c
@@ -83,7 +83,7 @@ struct etb_drvdata {
struct coresight_dev... |
4982e58669b11c43644efb5fb7435975848b716e | Analyze and fix the following issue in the Linux kernel code: gfs2: page poisoning fix | Problem Details:
Processes can write to the last page of a file using mmap, and when the file
size is not a multiple of the page size, this can be used to write beyond the
end of the file. This is sometimes referred to as page poisoning, and it is
not a problem in itself because the data beyond eof will be ignored. H... | ```diff
diff --git a/fs/gfs2/bmap.c b/fs/gfs2/bmap.c
index b3d7fcd95f03..95a64819fe2c 100644
--- a/fs/gfs2/bmap.c
+++ b/fs/gfs2/bmap.c
@@ -1321,6 +1321,19 @@ static int gfs2_block_zero_range(struct inode *inode, loff_t from, loff_t length
&gfs2_iomap_write_ops, NULL);
}
+int gfs2_clear_beyond_eof(struct inode *i... |
83726330748981372bde86ed5411d7b306612991 | Analyze and fix the following issue in the Linux kernel code: KVM: arm64: Correctly cap ZCR_EL2 provided by a guest hypervisor | Problem Details:
ZCR_EL2 can be updated by a VHE guest hypervisor either using ZCR_EL2
(which traps) or ZCR_EL1 (which does not trap). KVM handles both in
different way:
- on ZCR_EL2 trap, ZCR_EL2.LEN is immediately capped at the VM's own
VL limit. This has the potential to break existing SW that relies
on the ful... | ```diff
diff --git a/arch/arm64/include/asm/kvm_host.h b/arch/arm64/include/asm/kvm_host.h
index 65eead8362e0..a49042bfa801 100644
--- a/arch/arm64/include/asm/kvm_host.h
+++ b/arch/arm64/include/asm/kvm_host.h
@@ -511,7 +511,6 @@ enum vcpu_sysreg {
ACTLR_EL2, /* Auxiliary Control Register (EL2) */
CPTR_EL2, /* Arc... |
91bc6767a4f55dc470d8a56b55b9f2ea09094efe | Analyze and fix the following issue in the Linux kernel code: iio: adc: ad_sigma_delta: fix clear_pending_event for registerless devices | Problem Details:
ad_sigma_delta_clear_pending_event() falls through to the status register
read path for devices with has_registers = false and no rdy_gpiod. For
such devices, ad_sd_read_reg() skips the address byte entirely and clocks
raw MISO bytes with no address phase — making it byte-for-byte identical
to reading ... | ```diff
diff --git a/drivers/iio/adc/ad_sigma_delta.c b/drivers/iio/adc/ad_sigma_delta.c
index 651ade67ad2e..1b410291da53 100644
--- a/drivers/iio/adc/ad_sigma_delta.c
+++ b/drivers/iio/adc/ad_sigma_delta.c
@@ -262,11 +262,25 @@ static int ad_sigma_delta_clear_pending_event(struct ad_sigma_delta *sigma_delta
/*
... |
c72da0688575e5ef39c36bb44fed53aa18f8ae65 | Analyze and fix the following issue in the Linux kernel code: iio: adc: ad_sigma_delta: fix CS held asserted and state leaks | Problem Details:
In ad_sigma_delta_single_conversion(), set_mode(AD_SD_MODE_IDLE) and
disable_one() were called from the out: block while keep_cs_asserted
was still true. This caused any SPI transfer issued by those callbacks
to carry cs_change=1, leaving CS permanently asserted after the
conversion. Fix by moving both... | ```diff
diff --git a/drivers/iio/adc/ad_sigma_delta.c b/drivers/iio/adc/ad_sigma_delta.c
index a955556f9ec8..651ade67ad2e 100644
--- a/drivers/iio/adc/ad_sigma_delta.c
+++ b/drivers/iio/adc/ad_sigma_delta.c
@@ -441,11 +441,10 @@ int ad_sigma_delta_single_conversion(struct iio_dev *indio_dev,
out:
ad_sd_disable_irq(s... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.