[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20240314162954.GAZfMmAnYQoRjRbRzc@fat_crate.local>
Date: Thu, 14 Mar 2024 17:29:54 +0100
From: Borislav Petkov <bp@...en8.de>
To: Dave Hansen <dave.hansen@...el.com>
Cc: Vignesh Balasubramanian <vigbalas@....com>,
linux-kernel@...r.kernel.org, linux-toolchains@...r.kernel.org,
mpe@...erman.id.au, npiggin@...il.com, christophe.leroy@...roup.eu,
aneesh.kumar@...nel.org, naveen.n.rao@...ux.ibm.com,
ebiederm@...ssion.com, keescook@...omium.org, x86@...nel.org,
linuxppc-dev@...ts.ozlabs.org, linux-mm@...ck.org,
jinisusan.george@....com, matz@...e.de, binutils@...rceware.org,
jhb@...ebsd.org, felix.willgerodt@...el.com
Subject: Re: [PATCH 1/1] x86/elf: Add a new .note section containing
Xfeatures information to x86 core files
On Thu, Mar 14, 2024 at 09:19:15AM -0700, Dave Hansen wrote:
> Are you envisioning an *XSAVE* state component that's not described by
> CPUID?
I want to be prepared. You can imagine some of the short cuts and
corners cutting hw guys would do so I'd want to be prepared there and
not tie this to CPUID.
> Or some _other_ (non-XSAVE) component in a core dump that isn't
> described by CPUID?
Yes, that too.
Since the format of this buffer is so simple and machine-independent, it
can be extended as needed without issues.
> That argument breaks down a bit on the flags though:
>
> xc.xfeat_flags = xstate_flags[i];
>
> Because it comes _directly_ from CPUID with zero filtering:
>
> cpuid_count(XSTATE_CPUID, i, &eax, &ebx, &ecx, &edx);
> ...
> xstate_flags[i] = ecx;
>
> So this layout is quite dependent on what's in x86's CPUID.
Yeah, no, this should not be copying CPUID flags - those flags should be
*translated* to independently defined flags which describe those
buffers.
This is even more important if we change our xstate_flags[] machinery.
This buffer should not use any kernel-internal definitions and
structures but be completely self-describing.
Vignesh, pls fix that.
Thx.
--
Regards/Gruss,
Boris.
https://people.kernel.org/tglx/notes-about-netiquette
Powered by blists - more mailing lists