WSL2-Linux-Kernel/arch/x86/kernel
Boris Ostrovsky 28b92e09e2 x86, vdso, time: Cast tv_nsec to u64 for proper shifting in update_vsyscall()
With tk->wall_to_monotonic.tv_nsec being a 32-bit value on 32-bit
systems, (tk->wall_to_monotonic.tv_nsec << tk->shift) in update_vsyscall()
may lose upper bits or, worse, add them since compiler will do this:
	(u64)(tk->wall_to_monotonic.tv_nsec << tk->shift)
instead of
	((u64)tk->wall_to_monotonic.tv_nsec << tk->shift)

So if, for example, tv_nsec is 0x800000 and shift is 8 we will end up
with 0xffffffff80000000 instead of 0x80000000. And then we are stuck in
the subsequent 'while' loop.

We need an explicit cast.

Signed-off-by: Boris Ostrovsky <boris.ostrovsky@oracle.com>
Link: http://lkml.kernel.org/r/1399648287-15178-1-git-send-email-boris.ostrovsky@oracle.com
Acked-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Cc: <stable@vger.kernel.org> # v3.14
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
2014-05-09 08:45:52 -07:00
..
acpi asmlinkage, x86: Add explicit __visible to arch/x86/* 2014-05-05 16:07:44 -07:00
apic asmlinkage, x86: Add explicit __visible to arch/x86/* 2014-05-05 16:07:44 -07:00
cpu asmlinkage, x86: Add explicit __visible to arch/x86/* 2014-05-05 16:07:44 -07:00
kprobes kprobes/x86: Fix page-fault handling logic 2014-04-17 10:57:02 +02:00
.gitignore
Makefile x86, vdso: Make vsyscall_gtod_data handling x86 generic 2014-03-18 12:51:52 -07:00
alternative.c
amd_gart_64.c
amd_nb.c A bunch of EDAC updates all over the place: 2014-04-01 13:54:00 -07:00
apb_timer.c
aperture_64.c Revert "[PATCH] Insert GART region into resource map" 2014-03-18 14:26:12 -06:00
apm_32.c
asm-offsets.c
asm-offsets_32.c
asm-offsets_64.c
audit_64.c
bootflag.c
check.c
cpuid.c x86, cpuid: Fix CPU hotplug callback registration 2014-03-20 13:43:42 +01:00
crash.c x86, crash: Unify ifdef 2014-03-13 15:32:44 -07:00
crash_dump_32.c
crash_dump_64.c
devicetree.c
doublefault.c
dumpstack.c
dumpstack_32.c Merge branch 'x86-threadinfo-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip 2014-04-01 10:17:18 -07:00
dumpstack_64.c x86: Fix dumpstack_64 irq stack handling 2014-04-02 11:46:50 -07:00
e820.c
early-quirks.c x86/intel: Add quirk to disable HPET for the Baytrail platform 2014-05-08 08:15:34 +02:00
early_printk.c
entry_32.S
entry_64.S
ftrace.c ftrace/x86: BUG when ftrace recovery fails 2014-03-07 10:06:16 -05:00
head.c
head32.c asmlinkage, x86: Add explicit __visible to arch/x86/* 2014-05-05 16:07:44 -07:00
head64.c asmlinkage, x86: Add explicit __visible to arch/x86/* 2014-05-05 16:07:44 -07:00
head_32.S x86: fix compile error due to X86_TRAP_NMI use in asm files 2014-03-07 18:58:40 -08:00
head_64.S x86: fix compile error due to X86_TRAP_NMI use in asm files 2014-03-07 18:58:40 -08:00
hpet.c x86/hpet: Make boot_hpet_disable extern 2014-05-08 08:15:34 +02:00
hw_breakpoint.c
i386_ksyms_32.c
i387.c x86, fpu: Check tsk_used_math() in kernel_fpu_end() for eager FPU 2014-03-11 12:32:52 -07:00
i8237.c
i8253.c
i8259.c
io_delay.c
ioport.c
iosf_mbi.c
irq.c x86/platform/hyperv: Handle VMBUS driver being a module 2014-04-02 09:49:47 +02:00
irq_32.c x86, threadinfo: Redo "x86: Use inline assembler to get sp" 2014-03-10 17:32:01 -07:00
irq_64.c
irq_work.c
irqinit.c
jump_label.c
kdebugfs.c
kgdb.c
ksysfs.c
kvm.c kvm: remove redundant registration of BSP's hv_clock area 2014-02-22 15:53:32 +01:00
kvmclock.c kvm: remove redundant registration of BSP's hv_clock area 2014-02-22 15:53:32 +01:00
ldt.c x86-64, modify_ldt: Ban 16-bit segments on 64-bit kernels 2014-04-11 10:10:09 -07:00
machine_kexec_32.c
machine_kexec_64.c x86, kaslr: export offset in VMCOREINFO ELF notes 2014-02-25 16:57:47 -08:00
mmconf-fam10h_64.c
module.c x86, kaslr: fix module lock ordering problem 2014-03-24 10:18:26 -07:00
mpparse.c
msr.c x86, msr: Fix CPU hotplug callback registration 2014-03-20 13:43:42 +01:00
nmi.c x86/nmi: Push duration printk() to irq context 2014-02-09 13:17:22 +01:00
nmi_selftest.c
paravirt-spinlocks.c
paravirt.c
paravirt_patch_32.c
paravirt_patch_64.c
pci-calgary_64.c x86, calgary: Use 8M TCE table size by default 2014-04-10 19:51:32 -07:00
pci-dma.c x86: dma-mapping: fix GFP_ATOMIC macro usage 2014-02-11 09:40:15 +01:00
pci-iommu_table.c
pci-nommu.c
pci-swiotlb.c
pcspeaker.c
perf_regs.c
preempt.S
probe_roms.c
process.c sched/idle, x86: Remove redundant cpuidle_idle_call() 2014-02-11 09:58:28 +01:00
process_32.c x86: Keep thread_info on thread stack in x86_32 2014-03-06 16:56:55 -08:00
process_64.c asmlinkage, x86: Add explicit __visible to arch/x86/* 2014-05-05 16:07:44 -07:00
ptrace.c x86: Keep thread_info on thread stack in x86_32 2014-03-06 16:56:55 -08:00
pvclock.c
quirks.c x86/amd/numa: Fix northbridge quirk to assign correct NUMA node 2014-03-14 11:05:36 +01:00
reboot.c x86/reboot: Add reboot quirk for Certec BPC600 2014-05-07 11:22:10 +02:00
reboot_fixups_32.c
relocate_kernel_32.S
relocate_kernel_64.S
resource.c
rtc.c
setup.c Merge branch 'x86-nuke-platforms-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip 2014-04-02 13:15:58 -07:00
setup_percpu.c
signal.c
smp.c asmlinkage, x86: Add explicit __visible to arch/x86/* 2014-05-05 16:07:44 -07:00
smpboot.c Merge branch 'x86-threadinfo-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip 2014-04-01 10:17:18 -07:00
stacktrace.c
step.c
sys_x86_64.c
syscall_32.c
syscall_64.c
sysfb.c
sysfb_efi.c
sysfb_simplefb.c
tboot.c
tce_64.c
test_nx.c
test_rodata.c
time.c Merge branch 'irq-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip 2014-04-01 11:22:57 -07:00
tls.c
tls.h
topology.c
trace_clock.c
tracepoint.c
traps.c asmlinkage, x86: Add explicit __visible to arch/x86/* 2014-05-05 16:07:44 -07:00
tsc.c Merge branch 'x86-vdso-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip 2014-04-02 12:26:43 -07:00
tsc_msr.c x86: tsc: Add missing Baytrail frequency to the table 2014-02-19 17:12:24 +01:00
tsc_sync.c
uprobes.c
verify_cpu.S
vm86_32.c
vmlinux.lds.S x86, vdso: Zero-pad the VVAR page 2014-03-18 12:52:44 -07:00
vsmp_64.c asmlinkage, x86: Add explicit __visible to arch/x86/* 2014-05-05 16:07:44 -07:00
vsyscall_64.c CPU hotplug notifiers registration fixes for 3.15-rc1 2014-04-07 14:55:46 -07:00
vsyscall_emu_64.S
vsyscall_gtod.c x86, vdso, time: Cast tv_nsec to u64 for proper shifting in update_vsyscall() 2014-05-09 08:45:52 -07:00
vsyscall_trace.h
x86_init.c
x8664_ksyms_64.c
xsave.c