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:	Fri, 28 Aug 2015 06:50:32 +0200
From:	Ingo Molnar <mingo@...nel.org>
To:	Dave Hansen <dave@...1.net>
Cc:	dave.hansen@...ux.intel.com, mingo@...hat.com, x86@...nel.org,
	bp@...en8.de, fenghua.yu@...el.com, tim.c.chen@...ux.intel.com,
	linux-kernel@...r.kernel.org,
	Linus Torvalds <torvalds@...ux-foundation.org>
Subject: Re: [PATCH 01/11] x86, fpu: kill LWP support


* Dave Hansen <dave@...1.net> wrote:

> 
> From: Dave Hansen <dave.hansen@...ux.intel.com>
> 
> LightWeight Profiling was evidently an AMD profiling feature that
> we never got around to implementing.  Remove the references to it.
> 
> This patch is a *bit* worrisome becuase it will implicitly cause
> 'struct xregs_state' to shrink.  This effectively removes some
> unused padding that we had in there.  It might expose other bugs.
> 
> Signed-off-by: Dave Hansen <dave.hansen@...ux.intel.com>
> Cc: Ingo Molnar <mingo@...hat.com>
> Cc: x86@...nel.org
> Cc: Borislav Petkov <bp@...en8.de>
> Cc: Fenghua Yu <fenghua.yu@...el.com>
> Cc: Tim Chen <tim.c.chen@...ux.intel.com>
> Cc: linux-kernel@...r.kernel.org
> ---
> 
>  b/arch/x86/include/asm/fpu/types.h |    6 ------
>  1 file changed, 6 deletions(-)
> 
> diff -puN arch/x86/include/asm/fpu/types.h~axe-lwp arch/x86/include/asm/fpu/types.h
> --- a/arch/x86/include/asm/fpu/types.h~axe-lwp	2015-08-27 10:08:01.195617135 -0700
> +++ b/arch/x86/include/asm/fpu/types.h	2015-08-27 10:08:01.198617272 -0700
> @@ -132,11 +132,6 @@ struct ymmh_struct {
>  	u8				ymmh_space[256];
>  };
>  
> -/* We don't support LWP yet: */
> -struct lwp_struct {
> -	u8				reserved[128];
> -};
> -
>  /* Intel MPX support: */
>  struct bndreg {
>  	u64				lower_bound;
> @@ -161,7 +156,6 @@ struct xstate_header {
>  
>  /* New processor state extensions should be added here: */
>  #define XSTATE_RESERVE			(sizeof(struct ymmh_struct) + \
> -					 sizeof(struct lwp_struct)  + \
>  					 sizeof(struct mpx_struct)  )

Btw., now that we allocate all this dynamically and sanity-check that the CPU 
gives us, I'd suggest we remove the XSTATE_RESERVE define altogether, and any 
excess __reserved[] bytes from the xstate header:

struct xregs_state {
        struct fxregs_state             i387;
        struct xstate_header            header;
        u8                              __reserved[XSTATE_RESERVE];
} __attribute__ ((packed, aligned (64)));

any latent bug this might trigger we want to fix.

Thanks,

	Ingo
--
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