mirror of
https://gitlab.alpinelinux.org/alpine/aports.git
synced 2026-03-02 04:02:22 +01:00
community/linux-tools: patch gcc15
This commit is contained in:
parent
d4e3285957
commit
ead7cdcd98
@ -72,6 +72,7 @@ source="https://kernel.org/pub/linux/kernel/v6.x/linux-$_kernver.tar.xz
|
||||
cpupower.confd
|
||||
usbip.initd
|
||||
usbip.confd
|
||||
gcc15.patch
|
||||
"
|
||||
# append patch for non .0
|
||||
case $pkgver in
|
||||
@ -293,4 +294,5 @@ ea04b71c828df423e55ce22058015fe3cf13f58a1adbddefa61a8df26b343d22596d16737c592ead
|
||||
63cd12a4d8782198c71662e9205e346e064b65bae5e3e175b5bc43bdf7ec6ddf675b60349750afe3c37c8a925f9ae9a93530671821342581bd282a69e0773b8c cpupower.confd
|
||||
fcbd64d844c9bc187d08cef5995e91a46c0df78deb24e96ac9210c0e2c730eca0301970d9b8ffbf003df274682d05072431a26b59d8c491f396618268a12ec92 usbip.initd
|
||||
eb8de617e27c4d5fdfee9c442e8f74b0afb4d0fe7b59eca3a19629eb70fea7e09b3c125bc968aa8810d845ce661c829bd0f3fdb2288664f2cccf423bc0ae6ae8 usbip.confd
|
||||
26c3f5fcf48cae17a618443df323e51553044286dc9365382c7bd3d2c9a3094930823e155017fbc838f8571449b543596b3febe943118068cfa1b4ee12721698 gcc15.patch
|
||||
"
|
||||
|
||||
59
community/linux-tools/gcc15.patch
Normal file
59
community/linux-tools/gcc15.patch
Normal file
@ -0,0 +1,59 @@
|
||||
From 00f61be94dfdc94e2cb60e0620af9c529531680d Mon Sep 17 00:00:00 2001
|
||||
From: Achill Gilgenast <fossdd@pwned.life>
|
||||
Date: Sat, 26 Jul 2025 20:27:24 +0200
|
||||
Subject: [PATCH] FROMLIST: libbpf: avoid possible use of uninitialized mod_len
|
||||
|
||||
If not fn_name, mod_len does never get initialized which fails now with
|
||||
gcc15 on Alpine Linux edge:
|
||||
|
||||
libbpf.c: In function 'find_kernel_btf_id.constprop':
|
||||
libbpf.c:10100:33: error: 'mod_len' may be used uninitialized [-Werror=maybe-uninitialized]
|
||||
10100 | if (mod_name && strncmp(mod->name, mod_name, mod_len) != 0)
|
||||
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
libbpf.c:10070:21: note: 'mod_len' was declared here
|
||||
10070 | int ret, i, mod_len;
|
||||
| ^~~~~~~
|
||||
|
||||
Link: https://lore.kernel.org/lkml/20250729094611.2065713-1-fossdd@pwned.life/
|
||||
Fixes: 8f8a024272f3 ("libbpf: support "module: Function" syntax for tracing programs")
|
||||
Signed-off-by: Achill Gilgenast <fossdd@pwned.life>
|
||||
---
|
||||
tools/lib/bpf/libbpf.c | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/tools/lib/bpf/libbpf.c b/tools/lib/bpf/libbpf.c
|
||||
index c8e29c52d28c..cdef24c31d11 100644
|
||||
--- a/tools/lib/bpf/libbpf.c
|
||||
+++ b/tools/lib/bpf/libbpf.c
|
||||
@@ -10057,27 +10057,27 @@ static int libbpf_find_prog_btf_id(const char *name, __u32 attach_prog_fd, int t
|
||||
btf__free(btf);
|
||||
if (err <= 0) {
|
||||
pr_warn("%s is not found in prog's BTF\n", name);
|
||||
goto out;
|
||||
}
|
||||
out:
|
||||
return err;
|
||||
}
|
||||
|
||||
static int find_kernel_btf_id(struct bpf_object *obj, const char *attach_name,
|
||||
enum bpf_attach_type attach_type,
|
||||
int *btf_obj_fd, int *btf_type_id)
|
||||
{
|
||||
- int ret, i, mod_len;
|
||||
+ int ret, i, mod_len = 0;
|
||||
const char *fn_name, *mod_name = NULL;
|
||||
|
||||
fn_name = strchr(attach_name, ':');
|
||||
if (fn_name) {
|
||||
mod_name = attach_name;
|
||||
mod_len = fn_name - mod_name;
|
||||
fn_name++;
|
||||
}
|
||||
|
||||
if (!mod_name || strncmp(mod_name, "vmlinux", mod_len) == 0) {
|
||||
ret = find_attach_btf_id(obj->btf_vmlinux,
|
||||
mod_name ? fn_name : attach_name,
|
||||
attach_type);
|
||||
--
|
||||
2.50.1
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user