summaryrefslogtreecommitdiff
path: root/kernel/bpf
diff options
context:
space:
mode:
authorVitor Soares <vitor.soares@toradex.com>2025-09-14 22:18:28 +0100
committerVitor Soares <vitor.soares@toradex.com>2025-09-14 22:18:28 +0100
commit88e9f1ec02f87bb86c41152f0b18eec78d0fbfeb (patch)
tree0c407998a20d8c7eb2c9a8ee23c10fd0214cb74f /kernel/bpf
parentfb37aea8060496d2afb461eb2bccf8f87106e7ec (diff)
parent74449729f3b3e0e7997860bd2b5d1bb862dca21d (diff)
Merge commit '74449729f3b3' of github.com/Freescale/linux-fslctoradex_5.15-2.2.x-imx
Sync with the latest linux-fslc branch 5.15-2.2.x-imx which includes the v5.15.191 stable update. Signed-off-by: Vitor Soares <vitor.soares@toradex.com>
Diffstat (limited to 'kernel/bpf')
-rw-r--r--kernel/bpf/helpers.c11
1 files changed, 8 insertions, 3 deletions
diff --git a/kernel/bpf/helpers.c b/kernel/bpf/helpers.c
index d3feaf6d68eb..b40ca025d9a4 100644
--- a/kernel/bpf/helpers.c
+++ b/kernel/bpf/helpers.c
@@ -832,6 +832,13 @@ int bpf_bprintf_prepare(char *fmt, u32 fmt_size, const u64 *raw_args,
if (fmt[i] == 'p') {
sizeof_cur_arg = sizeof(long);
+ if (fmt[i + 1] == 0 || isspace(fmt[i + 1]) ||
+ ispunct(fmt[i + 1])) {
+ if (tmp_buf)
+ cur_arg = raw_args[num_spec];
+ goto nocopy_fmt;
+ }
+
if ((fmt[i + 1] == 'k' || fmt[i + 1] == 'u') &&
fmt[i + 2] == 's') {
fmt_ptype = fmt[i + 1];
@@ -839,11 +846,9 @@ int bpf_bprintf_prepare(char *fmt, u32 fmt_size, const u64 *raw_args,
goto fmt_str;
}
- if (fmt[i + 1] == 0 || isspace(fmt[i + 1]) ||
- ispunct(fmt[i + 1]) || fmt[i + 1] == 'K' ||
+ if (fmt[i + 1] == 'K' ||
fmt[i + 1] == 'x' || fmt[i + 1] == 's' ||
fmt[i + 1] == 'S') {
- /* just kernel pointers */
if (tmp_buf)
cur_arg = raw_args[num_spec];
i++;