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, 9 Mar 2022 09:36:50 +0800
From:   Wanpeng Li <kernellwp@...il.com>
To:     Paolo Bonzini <pbonzini@...hat.com>
Cc:     LKML <linux-kernel@...r.kernel.org>, kvm <kvm@...r.kernel.org>,
        Sean Christopherson <seanjc@...gle.com>,
        Vitaly Kuznetsov <vkuznets@...hat.com>,
        Wanpeng Li <wanpengli@...cent.com>,
        Jim Mattson <jmattson@...gle.com>,
        Joerg Roedel <joro@...tes.org>
Subject: Re: [PATCH] x86/kvm: Don't waste kvmclock memory if there is nopv parameter

On Tue, 8 Mar 2022 at 20:13, Paolo Bonzini <pbonzini@...hat.com> wrote:
>
> On 3/8/22 09:18, Wanpeng Li wrote:
> > From: Wanpeng Li <wanpengli@...cent.com>
> >
> > When the "nopv" command line parameter is used, it should not waste
> > memory for kvmclock.
> >
> > Signed-off-by: Wanpeng Li <wanpengli@...cent.com>
> > ---
> >   arch/x86/kernel/kvmclock.c | 2 +-
> >   1 file changed, 1 insertion(+), 1 deletion(-)
> >
> > diff --git a/arch/x86/kernel/kvmclock.c b/arch/x86/kernel/kvmclock.c
> > index c5caa73..16333ba 100644
> > --- a/arch/x86/kernel/kvmclock.c
> > +++ b/arch/x86/kernel/kvmclock.c
> > @@ -239,7 +239,7 @@ static void __init kvmclock_init_mem(void)
> >
> >   static int __init kvm_setup_vsyscall_timeinfo(void)
> >   {
> > -     if (!kvm_para_available() || !kvmclock)
> > +     if (!kvm_para_available() || !kvmclock || nopv)
> >               return 0;
> >
> >       kvmclock_init_mem();
>
> Perhaps instead !kvm_para_available() && nopv should clear the kvmclock
> variable?

Do you mean if (!kvm_para_available() && nopv) return 0? I
misunderstand why they are the same. :)

    Wanpeng

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ