linux-stable/arch/um/kernel
Johannes Berg 0c7478a2da um: time-travel: fix time corruption
[ Upstream commit abe4eaa861 ]

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-23 08:54:50 +01:00
..
skas
Makefile
asm-offsets.c
config.c.in
dyn.lds.S
early_printk.c
exec.c ptrace/um: Replace PT_DTRACE with TIF_SINGLESTEP 2022-06-09 10:22:29 +02:00
exitcode.c
gprof_syms.c
initrd.c
ioport.c
irq.c
kmsg_dump.c
ksyms.c um: rename set_signals() to um_set_signals() 2022-01-27 11:03:44 +01:00
maccess.c
mem.c
physmem.c
process.c um: Fix naming clash between UML and scheduler 2024-02-23 08:54:49 +01:00
ptrace.c ptrace/um: Replace PT_DTRACE with TIF_SINGLESTEP 2022-06-09 10:22:29 +02:00
reboot.c
sigio.c
signal.c ptrace/um: Replace PT_DTRACE with TIF_SINGLESTEP 2022-06-09 10:22:29 +02:00
stacktrace.c
syscall.c
sysrq.c
time.c um: time-travel: fix time corruption 2024-02-23 08:54:50 +01:00
tlb.c
trap.c
um_arch.c um/cpu: Switch to arch_cpu_finalize_init() 2023-08-08 19:58:31 +02:00
umid.c
uml.lds.S
vmlinux.lds.S UML: define RUNTIME_DISCARD_EXIT 2023-03-17 08:49:04 +01:00