]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/commitdiff
6.5-stable patches
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 15 Nov 2023 20:08:34 +0000 (15:08 -0500)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 15 Nov 2023 20:08:34 +0000 (15:08 -0500)
added patches:
bpf-x86-initialize-the-variable-first_off-in-save_args.patch
perf-parse-events-fix-driver-config-term.patch

queue-6.5/bpf-x86-initialize-the-variable-first_off-in-save_args.patch [new file with mode: 0644]
queue-6.5/perf-parse-events-fix-driver-config-term.patch [new file with mode: 0644]
queue-6.5/series

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 (file)
index 0000000..d461ac8
--- /dev/null
@@ -0,0 +1,36 @@
+From 492e797fdab25f2d8eb1b6bb3236f4aac474f878 Mon Sep 17 00:00:00 2001
+From: Menglong Dong <imagedong@tencent.com>
+Date: Wed, 19 Jul 2023 19:03:30 +0800
+Subject: bpf, x86: initialize the variable "first_off" in save_args()
+
+From: Menglong Dong <imagedong@tencent.com>
+
+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 <flyingpeng@tencent.com>
+Reported-by: Dan Carpenter <dan.carpenter@linaro.org>
+Closes: https://lore.kernel.org/bpf/09784025-a812-493f-9829-5e26c8691e07@moroto.mountain/
+Signed-off-by: Menglong Dong <imagedong@tencent.com>
+Link: https://lore.kernel.org/r/20230719110330.2007949-1-imagedong@tencent.com
+Signed-off-by: Alexei Starovoitov <ast@kernel.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ 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 (file)
index 0000000..78f97e7
--- /dev/null
@@ -0,0 +1,55 @@
+From 45fc4628c15ab2cb7b2f53354b21db63f0a41f81 Mon Sep 17 00:00:00 2001
+From: Ian Rogers <irogers@google.com>
+Date: Mon, 4 Sep 2023 20:38:05 -0700
+Subject: perf parse-events: Fix driver config term
+
+From: Ian Rogers <irogers@google.com>
+
+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 <james.clark@arm.com>
+Reviewed-by: James Clark <james.clark@arm.com>
+Signed-off-by: Ian Rogers <irogers@google.com>
+Cc: Adrian Hunter <adrian.hunter@intel.com>
+Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
+Cc: Jiri Olsa <jolsa@kernel.org>
+Cc: Mark Rutland <mark.rutland@arm.com>
+Cc: Namhyung Kim <namhyung@kernel.org>
+Cc: Peter Zijlstra <peterz@infradead.org>
+Link: http://lore.kernel.org/lkml/20230905033805.3094293-1-irogers@google.com
+Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ 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: ':' |
index b3d32b6441c12487b982e55187ab13377d520cc2..cab49252dc1cdc15f1f7338c7b3180f214863e25 100644 (file)
@@ -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