acrn-kernel/arch
Johannes Berg 4f7dad73df um: time-travel: fix time corruption
[ Upstream commit abe4eaa8618bb36c2b33e9cdde0499296a23448c ]

In 'basic' time-travel mode (without =inf-cpu or =ext), we
still get timer interrupts. These can happen at arbitrary
points in time, i.e. while in timer_read(), which pushes
time forward just a little bit. Then, if we happen to get
the interrupt after calculating the new time to push to,
but before actually finishing that, the interrupt will set
the time to a value that's incompatible with the forward,
and we'll crash because time goes backwards when we do the
forwarding.

Fix this by reading the time_travel_time, calculating the
adjustment, and doing the adjustment all with interrupts
disabled.

Reported-by: Vincent Whitchurch <Vincent.Whitchurch@axis.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Richard Weinberger <richard@nod.at>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2024-02-05 20:12:57 +00:00
..
alpha rtc: Add support for configuring the UIP timeout for RTC reads 2024-01-31 16:17:01 -08:00
arc ARC: fix spare error 2024-01-20 11:50:08 +01:00
arm ARM: dts: imx23/28: Fix the DMA controller node name 2024-02-05 20:12:52 +00:00
arm64 arm64: dts: amlogic: fix format for s4 uart node 2024-02-05 20:12:53 +00:00
csky arch: consolidate arch_irq_work_raise prototypes 2024-02-05 20:12:49 +00:00
hexagon mm/fault: convert remaining simple cases to lock_mm_and_find_vma() 2023-07-01 13:16:25 +02:00
ia64 ia64/cpu: Switch to arch_cpu_finalize_init() 2023-08-08 20:03:46 +02:00
loongarch LoongArch/smp: Call rcutree_report_cpu_starting() earlier 2024-01-31 16:17:03 -08:00
m68k m68k: Fix invalid .section syntax 2023-09-13 09:42:21 +02:00
microblaze mm: always expand the stack with the mmap write lock held 2023-07-01 13:16:25 +02:00
mips mips: Call lose_fpu(0) before initializing fcr31 in mips_set_personality_nan 2024-01-31 16:17:12 -08:00
nios2 mm/fault: convert remaining simple cases to lock_mm_and_find_vma() 2023-07-01 13:16:25 +02:00
openrisc mm: always expand the stack with the mmap write lock held 2023-07-01 13:16:25 +02:00
parisc parisc/firmware: Fix F-extend for PDC addresses 2024-01-31 16:16:59 -08:00
powerpc arch: consolidate arch_irq_work_raise prototypes 2024-02-05 20:12:49 +00:00
riscv arch: consolidate arch_irq_work_raise prototypes 2024-02-05 20:12:49 +00:00
s390 KVM: s390: fix setting of fpc register 2024-02-05 20:12:49 +00:00
sh sh: bios: Revive earlyprintk support 2023-11-20 11:52:07 +01:00
sparc sparc32: fix a braino in fault handling in csum_and_copy_..._user() 2023-11-02 09:35:32 +01:00
um um: time-travel: fix time corruption 2024-02-05 20:12:57 +00:00
x86 arch: consolidate arch_irq_work_raise prototypes 2024-02-05 20:12:49 +00:00
xtensa xtensa: boot/lib: fix function prototypes 2023-10-06 14:56:49 +02:00
.gitignore
Kconfig cpu/SMT: Create topology_smt_thread_allowed() 2024-01-10 17:10:26 +01:00