[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <f307b37f-26de-cb8f-e199-f327f2c7f807@intel.com>
Date: Sun, 13 Nov 2022 09:55:00 -0800
From: "Joseph, Jithu" <jithu.joseph@...el.com>
To: Borislav Petkov <bp@...en8.de>
CC: "gregkh@...uxfoundation.org" <gregkh@...uxfoundation.org>,
Thiago Macieira <thiago.macieira@...el.com>,
"Luck, Tony" <tony.luck@...el.com>,
"hdegoede@...hat.com" <hdegoede@...hat.com>,
"markgross@...nel.org" <markgross@...nel.org>,
"tglx@...utronix.de" <tglx@...utronix.de>,
"mingo@...hat.com" <mingo@...hat.com>,
"dave.hansen@...ux.intel.com" <dave.hansen@...ux.intel.com>,
"x86@...nel.org" <x86@...nel.org>, "hpa@...or.com" <hpa@...or.com>,
"Raj, Ashok" <ashok.raj@...el.com>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
"platform-driver-x86@...r.kernel.org"
<platform-driver-x86@...r.kernel.org>,
"patches@...ts.linux.dev" <patches@...ts.linux.dev>,
"Shankar, Ravi V" <ravi.v.shankar@...el.com>,
"Jimenez Gonzalez, Athenas" <athenas.jimenez.gonzalez@...el.com>,
"Mehta, Sohil" <sohil.mehta@...el.com>
Subject: Re: [PATCH v2 12/14] platform/x86/intel/ifs: Add current_batch sysfs
entry
On 11/13/2022 8:58 AM, Borislav Petkov wrote:
> On Sun, Nov 13, 2022 at 08:41:47AM -0800, Joseph, Jithu wrote:
>> Do you think it is better to restrict filename input to confirm
>> to ff-mm-ss-xy.<test> format rather than accepting any string and
>> treating it as a file-name and trying to load it, if it is present ?
>
> Yap, that way you pre-filter filenames. Yeah, the header checks *must*
> absolutely happen too but it would be a simple first test.
>
> Also, you can check for:
>
> ff-mm-ss-X.<test>
>
> where X is a [0-9]+ of arbitrary length and this way won't have the
> artificial 256 limit you have now.
>
Thanks for clarifying
>> (Given that, before loading, We do intel_find_matching_signature(),
>> which validates if the signature/pf entries in header confirms to the
>> machine we are on before loading)
>>
>> We did accepting file-name as input before [1] (except for validating
>> if the filename confirms to ff-mm-ss format)
>
> Yeah, except now you want to do multiple sets of scan files.
The earlier change (which modified reload sysfs file from accepting a file-name instead of 1) was for
allowing multiple test files (i.e no different from what we are doing now)
Then we were told not to specify a filename via sysfs file (apologies for being repetitive)
Jithu
[1] https://lore.kernel.org/lkml/20220710160011.995800-1-jithu.joseph@intel.com/
Powered by blists - more mailing lists