Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1214022
| From | Tim Chen <tim.c.chen@linux.intel.com> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [PATCH 11/11] x86, fpu: check CPU-provided sizes against struct declarations |
| Date | 2015-08-26 18:20 +0200 |
| Message-ID | <q1LAC-2ow-13@gated-at.bofh.it> (permalink) |
| References | <q1sRk-ky-7@gated-at.bofh.it> <q1sRl-ky-43@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
On Tue, 2015-08-25 at 13:12 -0700, Dave Hansen wrote:
> From: Dave Hansen <dave.hansen@linux.intel.com>
>
> We now have C structures defined for each of the XSAVE state
> components that we support. This patch adds checks during our
> verification pass to ensure that the CPU-provided data
> enumerated in CPUID leaves matches our C structures.
>
> If not, we warn and dump all the XSAVE CPUID leaves.
>
> Note: this *actually* found an inconsistency with the MPX
> 'bndcsr' state. The hardware pads it out differently from
> our C structures. This patch caught it and warned.
>
> Signed-off-by: Dave Hansen <dave.hansen@linux.intel.com>
> Cc: Ingo Molnar <mingo@redhat.com>
> Cc: x86@kernel.org
> Cc: Borislav Petkov <bp@alien8.de>
> Cc: Fenghua Yu <fenghua.yu@intel.com>
> Cc: Tim Chen <tim.c.chen@linux.intel.com>
> Cc: linux-kernel@vger.kernel.org
> ---
>
> b/appendme | 6 +++
> b/arch/x86/include/asm/fpu/types.h | 1
> b/arch/x86/kernel/fpu/xstate.c | 62 +++++++++++++++++++++++++++++++++++--
> 3 files changed, 67 insertions(+), 2 deletions(-)
>
> diff -puN /dev/null appendme
> --- /dev/null 2015-07-13 14:24:11.435656502 -0700
> +++ b/appendme 2015-08-25 12:50:01.857661314 -0700
> @@ -0,0 +1,6 @@
> +Cc: Ingo Molnar <mingo@redhat.com>
> +Cc: x86@kernel.org
> +Cc: Borislav Petkov <bp@alien8.de>
> +Cc: Fenghua Yu <fenghua.yu@intel.com>
> +Cc: Tim Chen <tim.c.chen@linux.intel.com>
> +Cc: linux-kernel@vger.kernel.org
> diff -puN arch/x86/include/asm/fpu/types.h~x86-fpu-check-against-struct-declarations arch/x86/include/asm/fpu/types.h
> --- a/arch/x86/include/asm/fpu/types.h~x86-fpu-check-against-struct-declarations 2015-08-25 12:50:01.853661133 -0700
> +++ b/arch/x86/include/asm/fpu/types.h 2015-08-25 12:50:01.858661359 -0700
> @@ -108,6 +108,7 @@ enum xfeature_nr {
> XFEATURE_NR_OPMASK,
> XFEATURE_NR_ZMM_Hi256,
> XFEATURE_NR_Hi16_ZMM,
> + XFEATURE_NR_PT_UNIMPLEMENTED_SO_FAR,
>
Maybe move this to a separate patch with a bit more
explanation of this XFEATURE?
Tim
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
[PATCH 00/11] x86, fpu: XSAVE cleanups and sanity checks Dave Hansen <dave@sr71.net> - 2015-08-25 22:20 +0200
[PATCH 03/11] x86, fpu: rework XSTATE_* macros to remove magic '2' Dave Hansen <dave@sr71.net> - 2015-08-25 22:20 +0200
[PATCH 11/11] x86, fpu: check CPU-provided sizes against struct declarations Dave Hansen <dave@sr71.net> - 2015-08-25 22:20 +0200
Re: [PATCH 11/11] x86, fpu: check CPU-provided sizes against struct declarations Dave Hansen <dave@sr71.net> - 2015-08-26 18:20 +0200
Re: [PATCH 11/11] x86, fpu: check CPU-provided sizes against struct declarations Tim Chen <tim.c.chen@linux.intel.com> - 2015-08-26 18:20 +0200
[PATCH 06/11] x86, fpu: rework MPX 'xstate' types Dave Hansen <dave@sr71.net> - 2015-08-25 22:20 +0200
[PATCH 02/11] x86, fpu: rename xfeature_bit Dave Hansen <dave@sr71.net> - 2015-08-25 22:20 +0200
Re: [PATCH 02/11] x86, fpu: rename xfeature_bit Borislav Petkov <bp@alien8.de> - 2015-08-26 18:10 +0200
Re: [PATCH 02/11] x86, fpu: rename xfeature_bit Dave Hansen <dave@sr71.net> - 2015-08-26 18:20 +0200
[PATCH 09/11] x86, fpu: correct and check XSAVE xstate size calculations Dave Hansen <dave@sr71.net> - 2015-08-25 22:20 +0200
[PATCH 05/11] x86, fpu: add helper xfeature_nr_enabled() instead of test_bit() Dave Hansen <dave@sr71.net> - 2015-08-25 22:20 +0200
[PATCH 07/11] x86, fpu: rework YMM definition Dave Hansen <dave@sr71.net> - 2015-08-25 22:20 +0200
[PATCH 01/11] x86, fpu: kill LWP support Dave Hansen <dave@sr71.net> - 2015-08-25 22:20 +0200
csiph-web