From: Greg Kroah-Hartman Date: Thu, 6 Jan 2022 10:22:50 +0000 (+0100) Subject: 5.15-stable patches X-Git-Tag: v4.4.299~51 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=c48e8b35625539ea0d02ed3f697e63ea75867f4c;p=thirdparty%2Fkernel%2Fstable-queue.git 5.15-stable patches added patches: selftests-x86-fix-warn-in-test_process_vm_readv.patch --- diff --git a/queue-5.15/selftests-x86-fix-warn-in-test_process_vm_readv.patch b/queue-5.15/selftests-x86-fix-warn-in-test_process_vm_readv.patch new file mode 100644 index 00000000000..03b06cfeca0 --- /dev/null +++ b/queue-5.15/selftests-x86-fix-warn-in-test_process_vm_readv.patch @@ -0,0 +1,38 @@ +From dd40f44eabe1e122c6852fabb298aac05b083fce Mon Sep 17 00:00:00 2001 +From: Shuah Khan +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 + +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 +Cc: Naresh Kamboju +Signed-off-by: Greg Kroah-Hartman +--- + 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 +@@ -497,7 +497,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"); diff --git a/queue-5.15/series b/queue-5.15/series index 7fc268c9807..13648679246 100644 --- a/queue-5.15/series +++ b/queue-5.15/series @@ -1 +1,2 @@ fscache_cookie_enabled-check-cookie-is-valid-before-accessing-it.patch +selftests-x86-fix-warn-in-test_process_vm_readv.patch