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]
Message-ID: <20191025094125.GA23240@rkaganb.sw.ru>
Date:   Fri, 25 Oct 2019 09:41:28 +0000
From:   Roman Kagan <rkagan@...tuozzo.com>
To:     Thomas Gleixner <tglx@...utronix.de>
CC:     Vitaly Kuznetsov <vkuznets@...hat.com>,
        "linux-hyperv@...r.kernel.org" <linux-hyperv@...r.kernel.org>,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
        "x86@...nel.org" <x86@...nel.org>,
        "K. Y. Srinivasan" <kys@...rosoft.com>,
        Haiyang Zhang <haiyangz@...rosoft.com>,
        Stephen Hemminger <sthemmin@...rosoft.com>,
        Sasha Levin <sashal@...nel.org>,
        Ingo Molnar <mingo@...hat.com>, Borislav Petkov <bp@...en8.de>,
        "H. Peter Anvin" <hpa@...or.com>,
        Michael Kelley <mikelley@...rosoft.com>
Subject: Re: [PATCH] x86/hyper-v: micro-optimize send_ipi_one case

On Fri, Oct 25, 2019 at 12:38:05AM +0200, Thomas Gleixner wrote:
> On Thu, 24 Oct 2019, Roman Kagan wrote:
> > > +
> > > +	if (cpu >= 64)
> > > +		goto do_ex_hypercall;
> > > +
> > > +	ret = hv_do_fast_hypercall16(HVCALL_SEND_IPI, vector,
> > > +				     BIT_ULL(hv_cpu_number_to_vp_number(cpu)));
> > > +	return ((ret == 0) ? true : false);
> > 
> > D'oh.  Isn't "return ret == 0;" or just "return ret;" good enough?
> 
>    'return ret == 0' != 'return ret'
> 
> !ret perhaps :)

Sure.  Time to vacuum my keyboard ;)

Thanks,
Roman.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ