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:   Tue, 25 Sep 2018 15:11:43 +0800
From:   Yi Sun <yi.y.sun@...ux.intel.com>
To:     "Michael Kelley (EOSG)" <Michael.H.Kelley@...rosoft.com>
Cc:     "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
        "x86@...nel.org" <x86@...nel.org>,
        "tglx@...utronix.de" <tglx@...utronix.de>,
        "chao.p.peng@...el.com" <chao.p.peng@...el.com>,
        "chao.gao@...el.com" <chao.gao@...el.com>,
        "isaku.yamahata@...el.com" <isaku.yamahata@...el.com>,
        Tianyu Lan <Tianyu.Lan@...rosoft.com>,
        KY Srinivasan <kys@...rosoft.com>,
        Haiyang Zhang <haiyangz@...rosoft.com>,
        Stephen Hemminger <sthemmin@...rosoft.com>
Subject: Re: [PATCH v2 2/2] locking/pvqspinlock, hv: Enable PV qspinlock for
 Hyper-V

On 18-09-21 17:02:54, Michael Kelley (EOSG) wrote:
> From: Yi Sun <yi.y.sun@...ux.intel.com> Sent: Friday, September 21, 2018 12:25 AM
> > +
> > +#define pr_fmt(fmt) "hv: " fmt
> 
> Other Hyper-V messages use "Hyper-V: " as the prefix, not "hv: ".  Take
> a quick look at 'dmesg' output for reference.
> 
Will modify this. Thanks!

> > +
> > +#include <linux/kernel_stat.h>
> > +#include <linux/spinlock.h>
> > +#include <linux/debugfs.h>
> > +#include <linux/log2.h>
> > +#include <linux/gfp.h>
> 
> Some of these #includes look like they might be leftovers from
> some other code.  Please check and see whether kernel_stat.h,
> debugsfs.h, log2.h, and gfp.h are actually needed.
> 
Sure, I will check them.

> > +static void hv_qlock_wait(u8 *byte, u8 val)
> > +{
> > +	unsigned long msr_val;
> > +
> > +	if (READ_ONCE(*byte) != val)
> > +		return;
> > +
> > +	/*
> > +	 * Read HV_X64_MSR_GUEST_IDLE MSR can trigger the guest's
> > +	 * transition to the idle power state which can be exited
> > +	 * by an IPI even if IF flag is disabled.
> > +	 */
> > +	if (ms_hyperv.features & HV_X64_MSR_GUEST_IDLE_AVAILABLE)
> 
> I can't see a case where this test is actually needed.  hv_qlock_wait()
> can only get called if the flag is set when hv_init_spinlocks() is run, and
> the flag value doesn't change after it is set.
> 
Yes, it is redundant. Will remove it.

> > +		rdmsrl(HV_X64_MSR_GUEST_IDLE, msr_val);
> > +}
> 
> Michael

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ