android_kernel_motorola_sm6375/arch
Repository files (latest commit first)
Filename Latest commit message Latest commit date
Ammar Faizi ea8b2ecc92 x86/delay: Fix the wrong asm constraint in delay_loop()
[ Upstream commit b86eb74098a92afd789da02699b4b0dd3f73b889 ]

The asm constraint does not reflect the fact that the asm statement can
modify the value of the local variable loops. Which it does.

Specifying the wrong constraint may lead to undefined behavior, it may
clobber random stuff (e.g. local variable, important temporary value in
regs, etc.). This is especially dangerous when the compiler decides to
inline the function and since it doesn't know that the value gets
modified, it might decide to use it from a register directly without
reloading it.

Change the constraint to "+a" to denote that the first argument is an
input and an output argument.

  [ bp: Fix typo, massage commit message. ]

Fixes: e01b70ef3e ("x86: fix bug in arch/i386/lib/delay.c file, delay_loop function")
Signed-off-by: Ammar Faizi <[email protected]>
Signed-off-by: Borislav Petkov <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Sasha Levin <[email protected]>
2022-06-14 18:11:31 +02:00
..
alpha
arc ARC: entry: fix syscall_trace_exit argument 2022-04-27 13:50:49 +02:00
arm ARM: hisi: Add missing of_node_put after of_find_compatible_node 2022-06-14 18:11:30 +02:00
arm64 arm64: compat: Do not treat syscall number as ESR_ELx for a bad syscall 2022-06-14 18:11:26 +02:00
c6x
csky perf: Protect perf_guest_cbs with RCU 2022-01-20 09:19:18 +01:00
h8300
hexagon hexagon: export raw I/O routines for modules 2021-11-26 10:47:21 +01:00
ia64 ia64: ensure proper NUMA distance and possible map initialization 2022-03-08 19:07:48 +01:00
m68k
microblaze uaccess: fix nios2 and microblaze get_user_8() 2022-04-15 14:18:08 +02:00
mips MIPS: lantiq: check the return value of kzalloc() 2022-05-25 09:14:32 +02:00
nds32 nds32: fix access_ok() checks in get/put_user 2022-03-28 08:46:48 +02:00
nios2 uaccess: fix nios2 and microblaze get_user_8() 2022-04-15 14:18:08 +02:00
openrisc openrisc: start CPU timer early in boot 2022-06-14 18:11:28 +02:00
parisc parisc: Merge model and model name into one line in /proc/cpuinfo 2022-05-12 12:23:40 +02:00
powerpc powerpc/iommu: Add missing of_node_put in iommu_init_early_dart 2022-06-14 18:11:31 +02:00
riscv riscv module: remove (NOLOAD) 2022-04-15 14:18:31 +02:00
s390 s390/preempt: disable __preempt_count_add() optimization for PROFILE_ALL_BRANCHES 2022-06-14 18:11:27 +02:00
sh sh: define __BIG_ENDIAN for math-emu 2021-11-26 10:47:17 +01:00
sparc
um ptrace/um: Replace PT_DTRACE with TIF_SINGLESTEP 2022-06-14 18:11:24 +02:00
unicore32
x86 x86/delay: Fix the wrong asm constraint in delay_loop() 2022-06-14 18:11:31 +02:00
xtensa ptrace/xtensa: Replace PT_SINGLESTEP with TIF_SINGLESTEP 2022-06-14 18:11:24 +02:00
.gitignore
Kconfig