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, 20 May 2014 13:10:16 +0100
From:	David Vrabel <david.vrabel@...rix.com>
To:	Daniel Kiper <daniel.kiper@...cle.com>
CC:	<linux-efi@...r.kernel.org>, <linux-kernel@...r.kernel.org>,
	<x86@...nel.org>, <xen-devel@...ts.xenproject.org>,
	<boris.ostrovsky@...cle.com>, <eshelton@...ox.com>,
	<hpa@...or.com>, <ian.campbell@...rix.com>, <jbeulich@...e.com>,
	<jeremy@...p.org>, <konrad.wilk@...cle.com>,
	<matt.fleming@...el.com>, <mingo@...hat.com>,
	<mjg59@...f.ucam.org>, <stefano.stabellini@...citrix.com>,
	<tglx@...utronix.de>
Subject: Re: [PATCH v4 3/5] xen: Put EFI machinery in place

On 20/05/14 12:29, Daniel Kiper wrote:
> 
>>> +	if (!xen_initial_domain() || HYPERVISOR_dom0_op(&op))
>>> +		return NULL;
>>
>> 	if (!xen_initial_domain())
>> 		return NULL;
>>
>> 	if (HYPERVISOR_dom0_op(&op) < 0)
>> 		return NULL;
> 
> What is wrong with my if?

Style.  The function returns -ve on error not a boolean success/fail.

>>> +
>>> +	/* Here we know that Xen runs on EFI platform. */
>>> +
>>> +	efi = efi_xen;
>>> +
>>> +	op.cmd = XENPF_firmware_info;
>>> +	op.u.firmware_info.type = XEN_FW_EFI_INFO;
>>> +	op.u.firmware_info.index = XEN_FW_EFI_VENDOR;
>>> +	info->vendor.bufsz = sizeof(vendor);
>>> +	set_xen_guest_handle(info->vendor.name, vendor);
>>> +
>>> +	if (!HYPERVISOR_dom0_op(&op)) {
>>
>> if (HYPERVISOR_dom0_op(&op) == 0)
> 
> Ditto?

Again, style.

David
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ