Re: [PATCH v2 12/14] platform/x86/intel/ifs: Add current_batch sysfs entry

From: Borislav Petkov
Date: Sun Nov 13 2022 - 17:59:30 EST


On Sun, Nov 13, 2022 at 01:40:56PM -0800, Thiago Macieira wrote:
> On Sunday, 13 November 2022 07:58:52 PST Borislav Petkov wrote:
> > * simply try *all* files in a directory
>
> By the way, we don't want that.
>
> It's possible that different steppings of the same generation will have the
> same test scan files, with the extended signature informing that they are valid
> for this stepping too (see find_matching_signature())), because these files are
> going to be pretty big, in the order of a hundred MB each. That means we will
> either see symlinked or hardlinked files in the directory.
>
> If you blindly try them all, you're going to spend twice or three times as
> long as necessary to complete the scan. With the timeout in question for at
> least Sapphire Rapids, we're talking about a difference measured in hours.

You either have files which are valid and which will get run on the CPU
or those which will fail the header check. The header check happens in
msecs.

So I have no clue what "hours" you're talking about here.

--
Regards/Gruss,
Boris.

https://people.kernel.org/tglx/notes-about-netiquette