From: Greg Kroah-Hartman Date: Wed, 15 Nov 2023 20:08:34 +0000 (-0500) Subject: 6.5-stable patches X-Git-Tag: v4.14.330~11 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=7fc937567b27ba365f063a395b982687603d7d9d;p=thirdparty%2Fkernel%2Fstable-queue.git 6.5-stable patches added patches: bpf-x86-initialize-the-variable-first_off-in-save_args.patch perf-parse-events-fix-driver-config-term.patch --- diff --git a/queue-6.5/bpf-x86-initialize-the-variable-first_off-in-save_args.patch b/queue-6.5/bpf-x86-initialize-the-variable-first_off-in-save_args.patch new file mode 100644 index 00000000000..d461ac826cc --- /dev/null +++ b/queue-6.5/bpf-x86-initialize-the-variable-first_off-in-save_args.patch @@ -0,0 +1,36 @@ +From 492e797fdab25f2d8eb1b6bb3236f4aac474f878 Mon Sep 17 00:00:00 2001 +From: Menglong Dong +Date: Wed, 19 Jul 2023 19:03:30 +0800 +Subject: bpf, x86: initialize the variable "first_off" in save_args() + +From: Menglong Dong + +commit 492e797fdab25f2d8eb1b6bb3236f4aac474f878 upstream. + +As Dan Carpenter reported, the variable "first_off" which is passed to +clean_stack_garbage() in save_args() can be uninitialized, which can +cause runtime warnings with KMEMsan. Therefore, init it with 0. + +Fixes: 473e3150e30a ("bpf, x86: allow function arguments up to 12 for TRACING") +Cc: Hao Peng +Reported-by: Dan Carpenter +Closes: https://lore.kernel.org/bpf/09784025-a812-493f-9829-5e26c8691e07@moroto.mountain/ +Signed-off-by: Menglong Dong +Link: https://lore.kernel.org/r/20230719110330.2007949-1-imagedong@tencent.com +Signed-off-by: Alexei Starovoitov +Signed-off-by: Greg Kroah-Hartman +--- + arch/x86/net/bpf_jit_comp.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +--- a/arch/x86/net/bpf_jit_comp.c ++++ b/arch/x86/net/bpf_jit_comp.c +@@ -1927,7 +1927,7 @@ static int get_nr_used_regs(const struct + static void save_args(const struct btf_func_model *m, u8 **prog, + int stack_size, bool for_call_origin) + { +- int arg_regs, first_off, nr_regs = 0, nr_stack_slots = 0; ++ int arg_regs, first_off = 0, nr_regs = 0, nr_stack_slots = 0; + int i, j; + + /* Store function arguments to stack. diff --git a/queue-6.5/perf-parse-events-fix-driver-config-term.patch b/queue-6.5/perf-parse-events-fix-driver-config-term.patch new file mode 100644 index 00000000000..78f97e7f2cf --- /dev/null +++ b/queue-6.5/perf-parse-events-fix-driver-config-term.patch @@ -0,0 +1,55 @@ +From 45fc4628c15ab2cb7b2f53354b21db63f0a41f81 Mon Sep 17 00:00:00 2001 +From: Ian Rogers +Date: Mon, 4 Sep 2023 20:38:05 -0700 +Subject: perf parse-events: Fix driver config term + +From: Ian Rogers + +commit 45fc4628c15ab2cb7b2f53354b21db63f0a41f81 upstream. + +Inadvertently deleted in commit 30f4ade33d649aa0 ("perf tools: Revert +enable indices setting syntax for BPF map"). + +Fixes: 30f4ade33d649aa0 ("perf tools: Revert enable indices setting syntax for BPF map") +Reported-by: James Clark +Reviewed-by: James Clark +Signed-off-by: Ian Rogers +Cc: Adrian Hunter +Cc: Alexander Shishkin +Cc: Jiri Olsa +Cc: Mark Rutland +Cc: Namhyung Kim +Cc: Peter Zijlstra +Link: http://lore.kernel.org/lkml/20230905033805.3094293-1-irogers@google.com +Signed-off-by: Arnaldo Carvalho de Melo +Signed-off-by: Greg Kroah-Hartman +--- + tools/perf/util/parse-events.y | 17 +++++++++++++++++ + 1 file changed, 17 insertions(+) + +--- a/tools/perf/util/parse-events.y ++++ b/tools/perf/util/parse-events.y +@@ -870,6 +870,23 @@ PE_TERM + + $$ = term; + } ++| ++PE_DRV_CFG_TERM ++{ ++ struct parse_events_term *term; ++ char *config = strdup($1); ++ int err; ++ ++ if (!config) ++ YYNOMEM; ++ err = parse_events_term__str(&term, PARSE_EVENTS__TERM_TYPE_DRV_CFG, config, $1, &@1, NULL); ++ if (err) { ++ free($1); ++ free(config); ++ PE_ABORT(err); ++ } ++ $$ = term; ++} + + sep_dc: ':' | + diff --git a/queue-6.5/series b/queue-6.5/series index b3d32b6441c..cab49252dc1 100644 --- a/queue-6.5/series +++ b/queue-6.5/series @@ -547,4 +547,6 @@ x86-amd_nb-use-family-19h-models-60h-7fh-function-4-ids.patch revert-pci-aspm-disable-only-aspm_state_l1-when-driver-disables-l1.patch revert-mmc-core-capture-correct-oemid-bits-for-emmc-cards.patch btrfs-use-u64-for-buffer-sizes-in-the-tree-search-io.patch +bpf-x86-initialize-the-variable-first_off-in-save_args.patch +perf-parse-events-fix-driver-config-term.patch btrfs-make-found_logical_ret-parameter-mandatory-for.patch