]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/commitdiff
5.4-stable patches
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 19 Nov 2021 13:38:05 +0000 (14:38 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 19 Nov 2021 13:38:05 +0000 (14:38 +0100)
added patches:
arm64-vdso32-suppress-error-message-for-make-mrproper.patch
parisc-entry-fix-trace-test-in-syscall-exit-path.patch

queue-5.4/arm64-vdso32-suppress-error-message-for-make-mrproper.patch [new file with mode: 0644]
queue-5.4/parisc-entry-fix-trace-test-in-syscall-exit-path.patch [new file with mode: 0644]
queue-5.4/series

diff --git a/queue-5.4/arm64-vdso32-suppress-error-message-for-make-mrproper.patch b/queue-5.4/arm64-vdso32-suppress-error-message-for-make-mrproper.patch
new file mode 100644 (file)
index 0000000..f844ef4
--- /dev/null
@@ -0,0 +1,48 @@
+From 14831fad73f5ac30ac61760487d95a538e6ab3cb Mon Sep 17 00:00:00 2001
+From: Nick Desaulniers <ndesaulniers@google.com>
+Date: Tue, 19 Oct 2021 15:36:45 -0700
+Subject: arm64: vdso32: suppress error message for 'make mrproper'
+
+From: Nick Desaulniers <ndesaulniers@google.com>
+
+commit 14831fad73f5ac30ac61760487d95a538e6ab3cb upstream.
+
+When running the following command without arm-linux-gnueabi-gcc in
+one's $PATH, the following warning is observed:
+
+$ ARCH=arm64 CROSS_COMPILE_COMPAT=arm-linux-gnueabi- make -j72 LLVM=1 mrproper
+make[1]: arm-linux-gnueabi-gcc: No such file or directory
+
+This is because KCONFIG is not run for mrproper, so CONFIG_CC_IS_CLANG
+is not set, and we end up eagerly evaluating various variables that try
+to invoke CC_COMPAT.
+
+This is a similar problem to what was observed in
+commit dc960bfeedb0 ("h8300: suppress error messages for 'make clean'")
+
+Reported-by: Lucas Henneman <henneman@google.com>
+Suggested-by: Masahiro Yamada <masahiroy@kernel.org>
+Signed-off-by: Nick Desaulniers <ndesaulniers@google.com>
+Reviewed-by: Vincenzo Frascino <vincenzo.frascino@arm.com>
+Reviewed-by: Nathan Chancellor <nathan@kernel.org>
+Tested-by: Nathan Chancellor <nathan@kernel.org>
+Link: https://lore.kernel.org/r/20211019223646.1146945-4-ndesaulniers@google.com
+Signed-off-by: Will Deacon <will@kernel.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ arch/arm64/kernel/vdso32/Makefile |    3 ++-
+ 1 file changed, 2 insertions(+), 1 deletion(-)
+
+--- a/arch/arm64/kernel/vdso32/Makefile
++++ b/arch/arm64/kernel/vdso32/Makefile
+@@ -32,7 +32,8 @@ cc32-as-instr = $(call try-run,\
+ # As a result we set our own flags here.
+ # KBUILD_CPPFLAGS and NOSTDINC_FLAGS from top-level Makefile
+-VDSO_CPPFLAGS := -D__KERNEL__ -nostdinc -isystem $(shell $(CC_COMPAT) -print-file-name=include)
++VDSO_CPPFLAGS := -D__KERNEL__ -nostdinc
++VDSO_CPPFLAGS += -isystem $(shell $(CC_COMPAT) -print-file-name=include)
+ VDSO_CPPFLAGS += $(LINUXINCLUDE)
+ # Common C and assembly flags
diff --git a/queue-5.4/parisc-entry-fix-trace-test-in-syscall-exit-path.patch b/queue-5.4/parisc-entry-fix-trace-test-in-syscall-exit-path.patch
new file mode 100644 (file)
index 0000000..8c2d2dc
--- /dev/null
@@ -0,0 +1,42 @@
+From 3ec18fc7831e7d79e2d536dd1f3bc0d3ba425e8a Mon Sep 17 00:00:00 2001
+From: Sven Schnelle <svens@stackframe.org>
+Date: Sat, 13 Nov 2021 20:41:17 +0100
+Subject: parisc/entry: fix trace test in syscall exit path
+
+From: Sven Schnelle <svens@stackframe.org>
+
+commit 3ec18fc7831e7d79e2d536dd1f3bc0d3ba425e8a upstream.
+
+commit 8779e05ba8aa ("parisc: Fix ptrace check on syscall return")
+fixed testing of TI_FLAGS. This uncovered a bug in the test mask.
+syscall_restore_rfi is only used when the kernel needs to exit to
+usespace with single or block stepping and the recovery counter
+enabled. The test however used _TIF_SYSCALL_TRACE_MASK, which
+includes a lot of bits that shouldn't be tested here.
+
+Fix this by using TIF_SINGLESTEP and TIF_BLOCKSTEP directly.
+
+I encountered this bug by enabling syscall tracepoints. Both in qemu and
+on real hardware. As soon as i enabled the tracepoint (sys_exit_read,
+but i guess it doesn't really matter which one), i got random page
+faults in userspace almost immediately.
+
+Signed-off-by: Sven Schnelle <svens@stackframe.org>
+Signed-off-by: Helge Deller <deller@gmx.de>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ arch/parisc/kernel/entry.S |    2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+--- a/arch/parisc/kernel/entry.S
++++ b/arch/parisc/kernel/entry.S
+@@ -1842,7 +1842,7 @@ syscall_restore:
+       /* Are we being ptraced? */
+       LDREG   TI_FLAGS-THREAD_SZ_ALGN-FRAME_SIZE(%r30),%r19
+-      ldi     _TIF_SYSCALL_TRACE_MASK,%r2
++      ldi     _TIF_SINGLESTEP|_TIF_BLOCKSTEP,%r2
+       and,COND(=)     %r19,%r2,%r0
+       b,n     syscall_restore_rfi
index 66d6c9ab6e47ac67c0cf5bb6a54c1cad7781903f..9c2fc32c7e603aab542fb02d7b8993c77108f93b 100644 (file)
@@ -4,3 +4,5 @@ mips-fix-assembly-error-from-mipsr2-code-used-within-mips_isa_arch_level.patch
 ext4-fix-lazy-initialization-next-schedule-time-computation-in-more-granular-unit.patch
 scsi-ufs-fix-tm-request-when-non-fatal-error-happens.patch
 fortify-explicitly-disable-clang-support.patch
+arm64-vdso32-suppress-error-message-for-make-mrproper.patch
+parisc-entry-fix-trace-test-in-syscall-exit-path.patch