linux-stable/arch/arm64
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
..
boot arm64: dts: qcom: sm8150: Fix the iommu mask used for PCIe controllers 2023-03-30 12:51:41 +02:00
configs arm64: defconfig: Enable Qualcomm SM6115 / SM4250 GCC and Pinctrl 2022-11-30 17:49:05 +01:00
crypto crypto: arm64/sm4-gcm - Fix possible crash in GCM cryption 2023-03-03 11:56:16 +01:00
hyperv
include arm64: efi: Make efi_rt_lock a raw_spinlock 2023-03-11 13:50:49 +01:00
kernel arm64: compat: Work around uninitialized variable warning 2023-04-13 17:02:41 +02:00
kvm KVM: arm64: Check for kvm_vma_mte_allowed in the critical section 2023-04-06 12:12:47 +02:00
lib Merge branch 'for-next/sysregs' into for-next/core 2022-12-06 11:32:25 +00:00
mm arm64: Reset KASAN tag in copy_highpage with HW tags only 2023-03-10 09:29:47 +01:00
net bpf: Remove prog->active check for bpf_lsm and bpf_iter 2022-10-25 23:11:46 -07:00
tools arm64/sysreg: Fix errors in 32 bit enumeration values 2023-03-10 09:28:06 +01:00
xen
Kbuild
Kconfig arm64: mm: hugetlb: Disable HUGETLB_PAGE_OPTIMIZE_VMEMMAP 2023-03-10 09:29:47 +01:00
Kconfig.debug
Kconfig.platforms arm64: renesas: Drop selecting GPIOLIB and PINCTRL 2022-10-28 14:31:24 +02:00
Makefile Merge branch 'for-next/ftrace' into for-next/core 2022-12-06 11:07:39 +00:00