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:   Thu, 27 Jul 2017 11:37:09 -0400
From:   Boris Ostrovsky <boris.ostrovsky@...cle.com>
To:     Juergen Gross <jgross@...e.com>, linux-kernel@...r.kernel.org,
        xen-devel@...ts.xenproject.org
Subject: Re: [PATCH] xen: cleanup xen.h

On 07/27/2017 11:11 AM, Juergen Gross wrote:
> The macros for testing domain types are more complicated then they
> need to. Simplify them.
>
> Signed-off-by: Juergen Gross <jgross@...e.com>
> ---
>  include/xen/xen.h | 20 +++++++++-----------
>  1 file changed, 9 insertions(+), 11 deletions(-)
>
> diff --git a/include/xen/xen.h b/include/xen/xen.h
> index 6e8b7fc79801..28c59ca529d7 100644
> --- a/include/xen/xen.h
> +++ b/include/xen/xen.h
> @@ -13,11 +13,16 @@ extern enum xen_domain_type xen_domain_type;
>  #define xen_domain_type		XEN_NATIVE
>  #endif
>  
> +#ifdef CONFIG_XEN_PVH
> +extern bool xen_pvh;
> +#else
> +#define xen_pvh			0
> +#endif
> +
>  #define xen_domain()		(xen_domain_type != XEN_NATIVE)
> -#define xen_pv_domain()		(xen_domain() &&			\
> -				 xen_domain_type == XEN_PV_DOMAIN)
> -#define xen_hvm_domain()	(xen_domain() &&			\
> -				 xen_domain_type == XEN_HVM_DOMAIN)
> +#define xen_pv_domain()		(xen_domain_type == XEN_PV_DOMAIN)

Stray tab.

> +#define xen_hvm_domain()	(xen_domain_type == XEN_HVM_DOMAIN)
> +#define xen_pvh_domain()	(xen_pvh)

Not sure we need parentheses here.

Either way


Reviewed-by: Boris Ostrovsky <boris.ostrovsky@...cle.com>


>  
>  #ifdef CONFIG_XEN_DOM0
>  #include <xen/interface/xen.h>
> @@ -29,11 +34,4 @@ extern enum xen_domain_type xen_domain_type;
>  #define xen_initial_domain()	(0)
>  #endif	/* CONFIG_XEN_DOM0 */
>  
> -#ifdef CONFIG_XEN_PVH
> -extern bool xen_pvh;
> -#define xen_pvh_domain()	(xen_hvm_domain() && xen_pvh)
> -#else
> -#define xen_pvh_domain()	(0)
> -#endif
> -
>  #endif	/* _XEN_XEN_H */

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ