lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Wed, 11 Jul 2018 22:52:53 -0400
From:   Pavel Tatashin <pasha.tatashin@...cle.com>
To:     tglx@...utronix.de
Cc:     LKML <linux-kernel@...r.kernel.org>, pbonzini@...hat.com,
        rkrcmar@...hat.com, peterz@...radead.org, jgross@...e.com,
        Steven Sistare <steven.sistare@...cle.com>,
        Daniel Jordan <daniel.m.jordan@...cle.com>, x86@...nel.org,
        kvm@...r.kernel.org
Subject: Re: [patch 6/7] x86/kvmclock: Move kvmclock vsyscall param and init
 to kvmclock

+#include <asm/hypervisor.h>

Can be removed, because as Paolo, noticed X86_HYPER_KVM check is not needed.

> +static int __init kvm_setup_vsyscall_timeinfo(void)
> +{
> +#ifdef CONFIG_X86_64
> +       u8 flags;
> +
> +       if (!hv_clock || !kvmclock_vsyscall)
> +               return 0;
> +
> +       flags = pvclock_read_flags(&hv_clock[0].pvti);
> +       if (!(flags & PVCLOCK_TSC_STABLE_BIT))
> +               return 1;
> +
> +       pvclock_set_pvti_cpu0_va(hv_clock);
> +       kvm_clock.archdata.vclock_mode = VCLOCK_PVCLOCK;
> +#endif
> +       return 0;
> +}
> +early_initcall(kvm_setup_vsyscall_timeinfo);
> +
....
> -
> -int __init kvm_setup_vsyscall_timeinfo(void)
> -{
> -#ifdef CONFIG_X86_64
> -       u8 flags;
> -
> -       if (!hv_clock)
> -               return 0;
> -
> -       flags = pvclock_read_flags(&hv_clock[0].pvti);
> -       if (!(flags & PVCLOCK_TSC_STABLE_BIT))
> -               return 1;
> -
> -       pvclock_set_pvti_cpu0_va(hv_clock);
> -       kvm_clock.archdata.vclock_mode = VCLOCK_PVCLOCK;
> -#endif
> -       return 0;
> -}

I am not sure what the point of moving this function. The patch would
be much smaller without it.

Reviewed-by: Pavel Tatashin <pasha.tatashin@...cle.com>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ