linux-stable/arch
Ard Biesheuvel 46bcc8c57e arm64: compat: Work around uninitialized variable warning
[ Upstream commit 32d8599968 ]

Dan reports that smatch complains about a potential uninitialized
variable being used in the compat alignment fixup code.

The logic is not wrong per se, but we do end up using an uninitialized
variable if reading the instruction that triggered the alignment fault
from user space faults, even if the fault ensures that the uninitialized
value doesn't propagate any further.

Given that we just give up and return 1 if any fault occurs when reading
the instruction, let's get rid of the 'success handling' pattern that
captures the fault in a variable and aborts later, and instead, just
return 1 immediately if any of the get_user() calls result in an
exception.

Fixes: 3fc24ef32d ("arm64: compat: Implement misalignment fixups for multiword loads")
Reported-by: kernel test robot <lkp@intel.com>
Reported-by: Dan Carpenter <error27@gmail.com>
Link: https://lore.kernel.org/r/202304021214.gekJ8yRc-lkp@intel.com/
Signed-off-by: Ard Biesheuvel <ardb@kernel.org>
Link: https://lore.kernel.org/r/20230404103625.2386382-1-ardb@kernel.org
Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2023-04-13 17:02:41 +02:00
..
alpha alpha: fix R_ALPHA_LITERAL reloc for large modules 2023-03-17 08:58:02 +01:00
arc MM patches for 6.2-rc1. 2022-12-13 19:29:45 -08:00
arm ARM: dts: imx6sl: tolino-shine2hd: fix usbotg1 pinctrl 2023-03-30 12:50:51 +02:00
arm64 arm64: compat: Work around uninitialized variable warning 2023-04-13 17:02:41 +02:00
csky arch/csky patches for 6.2-rc1 2022-12-19 07:51:30 -06:00
hexagon MM patches for 6.2-rc1. 2022-12-13 19:29:45 -08:00
ia64 ia64: fix build error due to switch case label appearing next to declaration 2023-01-31 16:44:08 -08:00
loongarch LoongArch: Only call get_timer_irq() once in constant_clockevent_init() 2023-03-22 13:37:56 +01:00
m68k m68k: Only force 030 bus error if PC not in exception table 2023-03-30 12:51:28 +02:00
microblaze MM patches for 6.2-rc1. 2022-12-13 19:29:45 -08:00
mips mips: bmips: BCM6358: disable RAC flush for TP1 2023-04-06 12:12:31 +02:00
nios2 MM patches for 6.2-rc1. 2022-12-13 19:29:45 -08:00
openrisc MM patches for 6.2-rc1. 2022-12-13 19:29:45 -08:00
parisc parisc: Wire up PTRACE_GETREGS/PTRACE_SETREGS for compat case 2023-02-01 21:42:37 +01:00
powerpc powerpc/64s: Fix __pte_needs_flush() false positive warning 2023-04-06 12:12:44 +02:00
riscv riscv/kvm: Fix VM hang in case of timer delta being zero. 2023-04-06 12:12:31 +02:00
s390 KVM: s390: pv: fix external interruption loop not always detected 2023-04-13 17:02:36 +02:00
sh sh: sanitize the flags on sigreturn 2023-03-30 12:51:31 +02:00
sparc sparc: allow PM configs for sparc32 COMPILE_TEST 2023-03-10 09:28:44 +01:00
um UML: define RUNTIME_DISCARD_EXIT 2023-03-17 08:58:03 +01:00
x86 x86/PVH: avoid 32-bit build warning when obtaining VGA console info 2023-04-06 12:12:48 +02:00
xtensa xtensa: fix KASAN report for show_stack 2023-04-06 12:12:45 +02:00
.gitignore
Kconfig arm64 fixes for -rc1 2022-12-16 13:46:41 -06:00