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] [day] [month] [year] [list]
Date:   Fri, 22 Sep 2023 18:44:25 +0000
From:   Wei Liu <wei.liu@...nel.org>
To:     Dexuan Cui <decui@...rosoft.com>
Cc:     Olaf Hering <olaf@...fle.de>,
        "linux-hyperv@...r.kernel.org" <linux-hyperv@...r.kernel.org>,
        "linux-arch@...r.kernel.org" <linux-arch@...r.kernel.org>,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
        KY Srinivasan <kys@...rosoft.com>,
        Haiyang Zhang <haiyangz@...rosoft.com>,
        Wei Liu <wei.liu@...nel.org>, Arnd Bergmann <arnd@...db.de>
Subject: Re: [PATCH v1] hyperv: reduce size of ms_hyperv_info

On Tue, Sep 19, 2023 at 06:18:53AM +0000, Dexuan Cui wrote:
> > From: Olaf Hering <olaf@...fle.de>
> > Sent: Monday, September 18, 2023 9:02 AM
> > [...]
> > Use the hole prior shared_gpa_boundary to store the result of get_vtl.
> > This reduces the size by 8 bytes.
> >  [...]
> > --- a/include/asm-generic/mshyperv.h
> > +++ b/include/asm-generic/mshyperv.h
> > @@ -53,8 +53,8 @@ struct ms_hyperv_info {
> >  			u32 reserved_b2 : 20;
> >  		};
> >  	};
> > -	u64 shared_gpa_boundary;
> >  	u8 vtl;
> > +	u64 shared_gpa_boundary;
> >  };
> >  extern struct ms_hyperv_info ms_hyperv;
> >  extern bool hv_nested;
> 
> How about moving the 'vtl' field to an even earlier place:
> 
> --- a/include/asm-generic/mshyperv.h
> +++ b/include/asm-generic/mshyperv.h
> @@ -36,6 +36,9 @@ struct ms_hyperv_info {
>         u32 nested_features;
>         u32 max_vp_index;
>         u32 max_lp_index;
> +
> +       u8 vtl;
> +
>         union {
>                 u32 isolation_config_a;
>                 struct {
> @@ -54,7 +57,6 @@ struct ms_hyperv_info {
>                 };
>         };
>         u64 shared_gpa_boundary;
> -       u8 vtl;
>  };
>  extern struct ms_hyperv_info ms_hyperv;
>  extern bool hv_nested;
> 
> This also reduces the size by 8 bytes, and keeps
> the isolation_config_a/ isolation_config_b/ shared_gpa_boundary
> together, which are related.

Either method works for me.

Will there be a v2 of this patch?

Thanks,
Wei.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ