From: Greg Kroah-Hartman Date: Sat, 14 Jan 2023 10:01:31 +0000 (+0100) Subject: 4.19-stable patches X-Git-Tag: v4.14.303~76 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=7e537e668f5f7f6778a8007df51e99bdd25c8cc8;p=thirdparty%2Fkernel%2Fstable-queue.git 4.19-stable patches added patches: docs-fix-the-docs-build-with-sphinx-6.0.patch perf-auxtrace-fix-address-filter-duplicate-symbol-selection.patch s390-percpu-add-read_once-to-arch_this_cpu_to_op_simple.patch --- diff --git a/queue-4.19/docs-fix-the-docs-build-with-sphinx-6.0.patch b/queue-4.19/docs-fix-the-docs-build-with-sphinx-6.0.patch new file mode 100644 index 00000000000..28cbef5caab --- /dev/null +++ b/queue-4.19/docs-fix-the-docs-build-with-sphinx-6.0.patch @@ -0,0 +1,49 @@ +From 0283189e8f3d0917e2ac399688df85211f48447b Mon Sep 17 00:00:00 2001 +From: Jonathan Corbet +Date: Wed, 4 Jan 2023 10:47:39 -0700 +Subject: docs: Fix the docs build with Sphinx 6.0 +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +From: Jonathan Corbet + +commit 0283189e8f3d0917e2ac399688df85211f48447b upstream. + +Sphinx 6.0 removed the execfile_() function, which we use as part of the +configuration process. They *did* warn us... Just open-code the +functionality as is done in Sphinx itself. + +Tested (using SPHINX_CONF, since this code is only executed with an +alternative config file) on various Sphinx versions from 2.5 through 6.0. + +Reported-by: Martin Liška +Cc: stable@vger.kernel.org +Signed-off-by: Jonathan Corbet +Signed-off-by: Greg Kroah-Hartman +--- + Documentation/sphinx/load_config.py | 6 ++++-- + 1 file changed, 4 insertions(+), 2 deletions(-) + +--- a/Documentation/sphinx/load_config.py ++++ b/Documentation/sphinx/load_config.py +@@ -3,7 +3,7 @@ + + import os + import sys +-from sphinx.util.pycompat import execfile_ ++from sphinx.util.osutil import fs_encoding + + # ------------------------------------------------------------------------------ + def loadConfig(namespace): +@@ -25,7 +25,9 @@ def loadConfig(namespace): + sys.stdout.write("load additional sphinx-config: %s\n" % config_file) + config = namespace.copy() + config['__file__'] = config_file +- execfile_(config_file, config) ++ with open(config_file, 'rb') as f: ++ code = compile(f.read(), fs_encoding, 'exec') ++ exec(code, config) + del config['__file__'] + namespace.update(config) + else: diff --git a/queue-4.19/perf-auxtrace-fix-address-filter-duplicate-symbol-selection.patch b/queue-4.19/perf-auxtrace-fix-address-filter-duplicate-symbol-selection.patch new file mode 100644 index 00000000000..016e2f451da --- /dev/null +++ b/queue-4.19/perf-auxtrace-fix-address-filter-duplicate-symbol-selection.patch @@ -0,0 +1,104 @@ +From cf129830ee820f7fc90b98df193cd49d49344d09 Mon Sep 17 00:00:00 2001 +From: Adrian Hunter +Date: Tue, 10 Jan 2023 20:56:59 +0200 +Subject: perf auxtrace: Fix address filter duplicate symbol selection + +From: Adrian Hunter + +commit cf129830ee820f7fc90b98df193cd49d49344d09 upstream. + +When a match has been made to the nth duplicate symbol, return +success not error. + +Example: + + Before: + + $ cat file.c + cat: file.c: No such file or directory + $ cat file1.c + #include + + static void func(void) + { + printf("First func\n"); + } + + void other(void); + + int main() + { + func(); + other(); + return 0; + } + $ cat file2.c + #include + + static void func(void) + { + printf("Second func\n"); + } + + void other(void) + { + func(); + } + + $ gcc -Wall -Wextra -o test file1.c file2.c + $ perf record -e intel_pt//u --filter 'filter func @ ./test' -- ./test + Multiple symbols with name 'func' + #1 0x1149 l func + which is near main + #2 0x1179 l func + which is near other + Disambiguate symbol name by inserting #n after the name e.g. func #2 + Or select a global symbol by inserting #0 or #g or #G + Failed to parse address filter: 'filter func @ ./test' + Filter format is: filter|start|stop|tracestop [/ ] [@] + Where multiple filters are separated by space or comma. + $ perf record -e intel_pt//u --filter 'filter func #2 @ ./test' -- ./test + Failed to parse address filter: 'filter func #2 @ ./test' + Filter format is: filter|start|stop|tracestop [/ ] [@] + Where multiple filters are separated by space or comma. + + After: + + $ perf record -e intel_pt//u --filter 'filter func #2 @ ./test' -- ./test + First func + Second func + [ perf record: Woken up 1 times to write data ] + [ perf record: Captured and wrote 0.016 MB perf.data ] + $ perf script --itrace=b -Ftime,flags,ip,sym,addr --ns + 1231062.526977619: tr strt 0 [unknown] => 558495708179 func + 1231062.526977619: tr end call 558495708188 func => 558495708050 _init + 1231062.526979286: tr strt 0 [unknown] => 55849570818d func + 1231062.526979286: tr end return 55849570818f func => 55849570819d other + +Fixes: 1b36c03e356936d6 ("perf record: Add support for using symbols in address filters") +Reported-by: Dmitrii Dolgov <9erthalion6@gmail.com> +Signed-off-by: Adrian Hunter +Tested-by: Dmitry Dolgov <9erthalion6@gmail.com> +Cc: Adrian Hunter +Cc: Ian Rogers +Cc: Jiri Olsa +Cc: Namhyung Kim +Cc: stable@vger.kernel.org +Link: https://lore.kernel.org/r/20230110185659.15979-1-adrian.hunter@intel.com +Signed-off-by: Arnaldo Carvalho de Melo +Signed-off-by: Greg Kroah-Hartman +--- + tools/perf/util/auxtrace.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +--- a/tools/perf/util/auxtrace.c ++++ b/tools/perf/util/auxtrace.c +@@ -1962,7 +1962,7 @@ static int find_dso_sym(struct dso *dso, + *size = sym->start - *start; + if (idx > 0) { + if (*size) +- return 1; ++ return 0; + } else if (dso_sym_match(sym, sym_name, &cnt, idx)) { + print_duplicate_syms(dso, sym_name); + return -EINVAL; diff --git a/queue-4.19/s390-percpu-add-read_once-to-arch_this_cpu_to_op_simple.patch b/queue-4.19/s390-percpu-add-read_once-to-arch_this_cpu_to_op_simple.patch new file mode 100644 index 00000000000..99c0ce2dd33 --- /dev/null +++ b/queue-4.19/s390-percpu-add-read_once-to-arch_this_cpu_to_op_simple.patch @@ -0,0 +1,32 @@ +From e3f360db08d55a14112bd27454e616a24296a8b0 Mon Sep 17 00:00:00 2001 +From: Heiko Carstens +Date: Mon, 9 Jan 2023 11:51:20 +0100 +Subject: s390/percpu: add READ_ONCE() to arch_this_cpu_to_op_simple() + +From: Heiko Carstens + +commit e3f360db08d55a14112bd27454e616a24296a8b0 upstream. + +Make sure that *ptr__ within arch_this_cpu_to_op_simple() is only +dereferenced once by using READ_ONCE(). Otherwise the compiler could +generate incorrect code. + +Cc: +Reviewed-by: Alexander Gordeev +Signed-off-by: Heiko Carstens +Signed-off-by: Greg Kroah-Hartman +--- + arch/s390/include/asm/percpu.h | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +--- a/arch/s390/include/asm/percpu.h ++++ b/arch/s390/include/asm/percpu.h +@@ -31,7 +31,7 @@ + pcp_op_T__ *ptr__; \ + preempt_disable_notrace(); \ + ptr__ = raw_cpu_ptr(&(pcp)); \ +- prev__ = *ptr__; \ ++ prev__ = READ_ONCE(*ptr__); \ + do { \ + old__ = prev__; \ + new__ = old__ op (val); \ diff --git a/queue-4.19/series b/queue-4.19/series index 553521d4959..616ba7d1c50 100644 --- a/queue-4.19/series +++ b/queue-4.19/series @@ -463,5 +463,8 @@ mbcache-avoid-nesting-of-cache-c_list_lock-under-bit-locks.patch parisc-align-parisc-madv_xxx-constants-with-all-other-architectures.patch driver-core-fix-bus_type.match-error-handling-in-__driver_attach.patch net-sched-disallow-noqueue-for-qdisc-classes.patch +docs-fix-the-docs-build-with-sphinx-6.0.patch +perf-auxtrace-fix-address-filter-duplicate-symbol-selection.patch +s390-percpu-add-read_once-to-arch_this_cpu_to_op_simple.patch net-ulp-prevent-ulp-without-clone-op-from-entering-the-listen-status.patch alsa-pcm-move-rwsem-lock-inside-snd_ctl_elem_read-to-prevent-uaf.patch