linux-postmarketos-exynos4: update to 7.1.1

Enable more config options, and add a patch to fix an issue in lima
driver.

Part-of: <https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/8881>
This commit is contained in:
Henrik Grimler 2026-06-21 21:07:29 +02:00 committed by The Friendly Meow (merge) Bot
parent d52d4707eb
commit c125130f8f
No known key found for this signature in database
3 changed files with 617 additions and 303 deletions

View file

@ -0,0 +1,91 @@
From d7a8ed3dd6fcf706f76555ab8b70503054e1b931 Mon Sep 17 00:00:00 2001
From: Aelin Reidel <aelin@mainlining.org>
Date: Sat, 20 Jun 2026 00:49:13 +0200
Subject: [PATCH] resolve_btfids: preserve tag and parameter names when
processing implicit args
process_kfunc_with_implicit_args() obtains parameter names through
btf__name_by_offset() and passes them to btf__add_func_param() while
constructing a new function prototype. Tag names are processed in a
similar fashion.
The returned name pointer references memory owned by the BTF object.
btf__add_func_param(), btf__add_decl_tag(), etc. modify the same BTF and
may grow its internal storage, invalidating previously returned string
pointers.
This can result in btf__add_func_param(), btf__add_decl_tag(), etc.
dereferencing a stale pointer when copying the string, leading to crashes
in strset__add_str().
Duplicate the parameter name before calling btf__add_func_param() so it
remains valid across BTF updates.
Fixes: 9d199965990c ("resolve_btfids: Support for KF_IMPLICIT_ARGS")
Cc: stable@vger.kernel.org
Signed-off-by: Aelin Reidel <aelin@mainlining.org>
---
tools/bpf/resolve_btfids/main.c | 20 +++++++++++++++-----
1 file changed, 15 insertions(+), 5 deletions(-)
diff --git a/tools/bpf/resolve_btfids/main.c b/tools/bpf/resolve_btfids/main.c
index f8a91fa7584f..94b89e9c942e 100644
--- a/tools/bpf/resolve_btfids/main.c
+++ b/tools/bpf/resolve_btfids/main.c
@@ -1113,6 +1113,7 @@ static int process_kfunc_with_implicit_args(struct btf2btf_context *ctx, struct
{
s32 idx, new_proto_id, new_func_id, proto_id;
const char *param_name, *tag_name;
+ char *tmp_param_name, *tmp_tag_name;
const struct btf_param *params;
enum btf_func_linkage linkage;
char tmp_name[KSYM_NAME_LEN];
@@ -1163,18 +1164,22 @@ static int process_kfunc_with_implicit_args(struct btf2btf_context *ctx, struct
if (strcmp(tag_name, "bpf_kfunc") == 0)
continue;
+ tmp_tag_name = strdup(tag_name);
idx = btf_decl_tag(t)->component_idx;
if (btf_kflag(t))
- err = btf__add_decl_attr(btf, tag_name, new_func_id, idx);
+ err = btf__add_decl_attr(btf, tmp_tag_name, new_func_id, idx);
else
- err = btf__add_decl_tag(btf, tag_name, new_func_id, idx);
+ err = btf__add_decl_tag(btf, tmp_tag_name, new_func_id, idx);
if (err < 0) {
pr_err("ERROR: resolve_btfids: failed to add decl tag %s for %s\n",
- tag_name, tmp_name);
+ tmp_tag_name, tmp_name);
+ free(tmp_tag_name);
return -EINVAL;
}
+
+ free(tmp_tag_name);
}
add_new_proto:
@@ -1193,12 +1198,17 @@ static int process_kfunc_with_implicit_args(struct btf2btf_context *ctx, struct
if (is_kf_implicit_arg(btf, &params[i]))
break;
param_name = btf__name_by_offset(btf, params[i].name_off);
- err = btf__add_func_param(btf, param_name, params[i].type);
+ tmp_param_name = strdup(param_name);
+ if (!tmp_param_name)
+ return -ENOMEM;
+ err = btf__add_func_param(btf, tmp_param_name, params[i].type);
if (err < 0) {
pr_err("ERROR: resolve_btfids: failed to add param %s for %s\n",
- param_name, kfunc->name);
+ tmp_param_name, kfunc->name);
+ free(tmp_param_name);
return err;
}
+ free(tmp_param_name);
t = (struct btf_type *)btf__type_by_id(btf, proto_id);
}
--
2.54.0

View file

@ -3,8 +3,8 @@
# Co-Maintainer: knuxify <knuxify@gmail.com>
maintainer="Stefan Hansson <newbyte@postmarketos.org>"
pkgname=linux-postmarketos-exynos4
pkgver=6.18.9
pkgrel=3
pkgver=7.1.1
pkgrel=0
pkgdesc="Mainline kernel fork for Samsung Exynos4 devices"
arch="armv7"
_carch="arm"
@ -43,6 +43,7 @@ _tag="v${pkgver//_/-}-exynos4"
source="
$pkgname-$_tag.tar.bz2::$url/-/archive/$_tag/linux-$_tag.tar.bz2
$_config
0001-resolve_btfids-preserve-tag-and-parameter-names-when.patch
"
builddir="$srcdir/linux-$_tag"
@ -72,6 +73,7 @@ package() {
}
sha512sums="
06d400fca544c3a38d54c6dada3ed6257eb13c64ab7b9c0459a87d1b6a01bde69b6488eb478b06da5c03e8083c2aca01d4a04424d7f91b4b1195a7b738ebd9ca linux-postmarketos-exynos4-v6.18.9-exynos4.tar.bz2
80d8239339951debd87b01dd451abd6982f39831d7d131c9b7e348c3e1f55bc42708a3b03857177be4d3e0f853cceb453cd4a026bb7b65016aa4075270f4e790 config-postmarketos-exynos4.armv7
b44766295029c7e70cbb6862d3de49704ab3d9b871e7c39d5181311aa26ff514779b441211223c39ed51040d037e17a03e6656d655621622676c3c0c6d338ab3 linux-postmarketos-exynos4-v7.1.1-exynos4.tar.bz2
284b3bd846fa5b64a50616e9fb040815fd5149259522fd67dea82933f3a5ac6a86707660f5da19b3a509f50a435835444b6c4be3cf67f3ad7509c556678e1258 config-postmarketos-exynos4.armv7
245374b2d41771514774f729b577342f304c83437ef28cdf7b616c4d6421af7b33d72f0cda15ca1e50197019a71b50ef56393954ea4b98988882dd0a21cba5de 0001-resolve_btfids-preserve-tag-and-parameter-names-when.patch
"