android_kernel_sony_sdm845/arch
Repository files (latest commit first)
Filename Latest commit message Latest commit date
Ammar Faizi 55bd0545d2 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 <ammarfaizi2@gnuweeb.org>
Signed-off-by: Borislav Petkov <bp@suse.de>
Link: https://lore.kernel.org/r/20220329104705.65256-2-ammarfaizi2@gnuweeb.org
Signed-off-by: Sasha Levin <sashal@kernel.org>
2022-06-14 16:52:31 +02:00
..
alpha alpha: Declare virt_to_phys and virt_to_bus parameter as pointer to volatile 2021-10-06 10:23:40 +02:00
arc ARC: entry: fix syscall_trace_exit argument 2022-04-27 13:14:11 +02:00
arm ARM: hisi: Add missing of_node_put after of_find_compatible_node 2022-06-14 16:52:30 +02:00
arm64 arm64: module: remove (NOLOAD) from linker script 2022-04-20 09:06:44 +02:00
avr32
blackfin
c6x
cris
frv futex: Remove duplicated code and fix undefined behaviour 2018-05-19 10:27:00 +02:00
h8300 h8300: fix PREEMPTION build, TI_PRE_COUNT undefined 2021-02-23 13:59:16 +01:00
hexagon hexagon: export raw I/O routines for modules 2021-11-26 11:48:42 +01:00
ia64 hugetlbfs: flush TLBs correctly after huge_pmd_unshare 2021-12-08 08:45:03 +01:00
m32r
m68k m68k: set a default value for MEMORY_RESERVE 2021-11-26 11:48:38 +01:00
metag
microblaze microblaze: Prevent the overflow of the start 2020-02-28 15:42:42 +01:00
mips MIPS: lantiq: check the return value of kzalloc() 2022-05-25 08:39:48 +02:00
mn10300 mn10300/misalignment: Use SIGSEGV SEGV_MAPERR to report a failed user copy 2018-02-17 13:21:20 +01:00
nios2 nios2: Make NIOS2_DTB_SOURCE_BOOL depend on !COMPILE_TEST 2021-11-02 17:39:23 +01:00
openrisc openrisc: start CPU timer early in boot 2022-06-14 16:52:29 +02:00
parisc parisc: Merge model and model name into one line in /proc/cpuinfo 2022-05-12 12:14:56 +02:00
powerpc powerpc/xics: fix refcount leak in icp_opal_init() 2022-06-14 16:52:30 +02:00
s390 s390/hypfs: include z/VM guests with access control group set 2022-02-08 18:15:26 +01:00
score
sh gup: document and work around "COW can break either way" issue 2022-01-27 08:47:42 +01:00
sparc gup: document and work around "COW can break either way" issue 2022-01-27 08:47:42 +01:00
tile locking/x86: Remove the unused atomic_inc_short() methd 2020-01-12 11:24:19 +01:00
um um: registers: Rename function names to avoid conflicts and build problems 2022-01-27 08:47:38 +01:00
unicore32
x86 x86/delay: Fix the wrong asm constraint in delay_loop() 2022-06-14 16:52:31 +02:00
xtensa ptrace/xtensa: Replace PT_SINGLESTEP with TIF_SINGLESTEP 2022-06-14 16:52:28 +02:00
.gitignore
Kconfig cpu/hotplug: Provide knobs to control SMT 2018-08-15 18:14:46 +02:00