]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/commitdiff
4.4-stable patches
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 11 Aug 2020 16:28:49 +0000 (18:28 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 11 Aug 2020 16:28:49 +0000 (18:28 +0200)
added patches:
tracepoint-mark-__tracepoint_string-s-__used.patch

queue-4.14/series
queue-4.19/series [new file with mode: 0644]
queue-4.4/series
queue-4.4/tracepoint-mark-__tracepoint_string-s-__used.patch [new file with mode: 0644]
queue-4.9/series
queue-5.4/series [new file with mode: 0644]
queue-5.7/series [new file with mode: 0644]
queue-5.8/series [new file with mode: 0644]

index d13a22fcf23f31b7b3d371cc30fbc20cf9687aa7..306ee165912fd80c8f9e6de35d70a871bcd047e8 100644 (file)
@@ -40,3 +40,4 @@ selftests-net-relax-cpu-affinity-requirement-in-msg_zerocopy-test.patch
 usb-hso-check-for-return-value-in-hso_serial_common_create.patch
 rxrpc-fix-race-between-recvmsg-and-sendmsg-on-immediate-call-failure.patch
 smack-fix-use-after-free-in-smk_write_relabel_self.patch
+tracepoint-mark-__tracepoint_string-s-__used.patch
diff --git a/queue-4.19/series b/queue-4.19/series
new file mode 100644 (file)
index 0000000..1c44f8a
--- /dev/null
@@ -0,0 +1 @@
+tracepoint-mark-__tracepoint_string-s-__used.patch
index ddca82daa7ce07d5b32cbb45046ee1b3328e3b95..4990909cdb4a4a885eb1afa90afcea08c7041343 100644 (file)
@@ -51,3 +51,4 @@ net-lan78xx-replace-bogus-endpoint-lookup.patch
 usb-hso-check-for-return-value-in-hso_serial_common_create.patch
 vxlan-ensure-fdb-dump-is-performed-under-rcu.patch
 smack-fix-use-after-free-in-smk_write_relabel_self.patch
+tracepoint-mark-__tracepoint_string-s-__used.patch
diff --git a/queue-4.4/tracepoint-mark-__tracepoint_string-s-__used.patch b/queue-4.4/tracepoint-mark-__tracepoint_string-s-__used.patch
new file mode 100644 (file)
index 0000000..ce3b1dc
--- /dev/null
@@ -0,0 +1,50 @@
+From f3751ad0116fb6881f2c3c957d66a9327f69cefb Mon Sep 17 00:00:00 2001
+From: Nick Desaulniers <ndesaulniers@google.com>
+Date: Thu, 30 Jul 2020 15:45:54 -0700
+Subject: tracepoint: Mark __tracepoint_string's __used
+
+From: Nick Desaulniers <ndesaulniers@google.com>
+
+commit f3751ad0116fb6881f2c3c957d66a9327f69cefb upstream.
+
+__tracepoint_string's have their string data stored in .rodata, and an
+address to that data stored in the "__tracepoint_str" section. Functions
+that refer to those strings refer to the symbol of the address. Compiler
+optimization can replace those address references with references
+directly to the string data. If the address doesn't appear to have other
+uses, then it appears dead to the compiler and is removed. This can
+break the /tracing/printk_formats sysfs node which iterates the
+addresses stored in the "__tracepoint_str" section.
+
+Like other strings stored in custom sections in this header, mark these
+__used to inform the compiler that there are other non-obvious users of
+the address, so they should still be emitted.
+
+Link: https://lkml.kernel.org/r/20200730224555.2142154-2-ndesaulniers@google.com
+
+Cc: Ingo Molnar <mingo@redhat.com>
+Cc: Miguel Ojeda <miguel.ojeda.sandonis@gmail.com>
+Cc: stable@vger.kernel.org
+Fixes: 102c9323c35a8 ("tracing: Add __tracepoint_string() to export string pointers")
+Reported-by: Tim Murray <timmurray@google.com>
+Reported-by: Simon MacMullen <simonmacm@google.com>
+Suggested-by: Greg Hackmann <ghackmann@google.com>
+Signed-off-by: Nick Desaulniers <ndesaulniers@google.com>
+Signed-off-by: Steven Rostedt (VMware) <rostedt@goodmis.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ include/linux/tracepoint.h |    2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+--- a/include/linux/tracepoint.h
++++ b/include/linux/tracepoint.h
+@@ -328,7 +328,7 @@ extern void syscall_unregfunc(void);
+               static const char *___tp_str __tracepoint_string = str; \
+               ___tp_str;                                              \
+       })
+-#define __tracepoint_string   __attribute__((section("__tracepoint_str")))
++#define __tracepoint_string   __attribute__((section("__tracepoint_str"), used))
+ #else
+ /*
+  * tracepoint_string() is used to save the string address for userspace
index d059cd84d146a39b2ef94a90a00d6f76bdf56c87..625715a2b2fb099d27025d9ba3608e416830528c 100644 (file)
@@ -76,3 +76,4 @@ net-lan78xx-replace-bogus-endpoint-lookup.patch
 revert-vxlan-fix-tos-value-before-xmit.patch
 usb-hso-check-for-return-value-in-hso_serial_common_create.patch
 smack-fix-use-after-free-in-smk_write_relabel_self.patch
+tracepoint-mark-__tracepoint_string-s-__used.patch
diff --git a/queue-5.4/series b/queue-5.4/series
new file mode 100644 (file)
index 0000000..1c44f8a
--- /dev/null
@@ -0,0 +1 @@
+tracepoint-mark-__tracepoint_string-s-__used.patch
diff --git a/queue-5.7/series b/queue-5.7/series
new file mode 100644 (file)
index 0000000..1c44f8a
--- /dev/null
@@ -0,0 +1 @@
+tracepoint-mark-__tracepoint_string-s-__used.patch
diff --git a/queue-5.8/series b/queue-5.8/series
new file mode 100644 (file)
index 0000000..1c44f8a
--- /dev/null
@@ -0,0 +1 @@
+tracepoint-mark-__tracepoint_string-s-__used.patch