]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/commitdiff
5.4-stable patches
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 6 Jan 2022 10:22:21 +0000 (11:22 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 6 Jan 2022 10:22:21 +0000 (11:22 +0100)
added patches:
selftests-x86-fix-warn-in-test_process_vm_readv.patch

queue-5.4/selftests-x86-fix-warn-in-test_process_vm_readv.patch [new file with mode: 0644]
queue-5.4/series

diff --git a/queue-5.4/selftests-x86-fix-warn-in-test_process_vm_readv.patch b/queue-5.4/selftests-x86-fix-warn-in-test_process_vm_readv.patch
new file mode 100644 (file)
index 0000000..e8148b6
--- /dev/null
@@ -0,0 +1,38 @@
+From dd40f44eabe1e122c6852fabb298aac05b083fce Mon Sep 17 00:00:00 2001
+From: Shuah Khan <skhan@linuxfoundation.org>
+Date: Thu, 21 Oct 2021 15:33:33 -0600
+Subject: selftests: x86: fix [-Wstringop-overread] warn in test_process_vm_readv()
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+From: Shuah Khan <skhan@linuxfoundation.org>
+
+commit dd40f44eabe1e122c6852fabb298aac05b083fce upstream.
+
+Fix the following [-Wstringop-overread] by passing in the variable
+instead of the value.
+
+test_vsyscall.c: In function ‘test_process_vm_readv’:
+test_vsyscall.c:500:22: warning: ‘__builtin_memcmp_eq’ specified bound 4096 exceeds source size 0 [-Wstringop-overread]
+  500 |                 if (!memcmp(buf, (const void *)0xffffffffff600000, 4096)) {
+      |                      ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+Signed-off-by: Shuah Khan <skhan@linuxfoundation.org>
+Cc: Naresh Kamboju <naresh.kamboju@linaro.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ tools/testing/selftests/x86/test_vsyscall.c |    2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+--- a/tools/testing/selftests/x86/test_vsyscall.c
++++ b/tools/testing/selftests/x86/test_vsyscall.c
+@@ -480,7 +480,7 @@ static int test_process_vm_readv(void)
+       }
+       if (vsyscall_map_r) {
+-              if (!memcmp(buf, (const void *)0xffffffffff600000, 4096)) {
++              if (!memcmp(buf, remote.iov_base, sizeof(buf))) {
+                       printf("[OK]\tIt worked and read correct data\n");
+               } else {
+                       printf("[FAIL]\tIt worked but returned incorrect data\n");
index 1f43ad862a6c709a623b953af1a89c7dc291ee00..1120c7a4266b4762e2510423e7aa572d82a8cbb5 100644 (file)
@@ -1,2 +1,3 @@
 f2fs-quota-fix-potential-deadlock.patch
 input-touchscreen-fix-backport-of-a02dcde595f7cbd240ccd64de96034ad91cffc40.patch
+selftests-x86-fix-warn-in-test_process_vm_readv.patch