lkml.org 
[lkml]   [2022]   [Nov]   [11]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
SubjectRe: [PATCH v2 09/14] platform/x86/intel/ifs: Use generic microcode headers and functions
From


On 11/11/2022 8:23 AM, Borislav Petkov wrote:
> On Mon, Nov 07, 2022 at 02:53:18PM -0800, Jithu Joseph wrote:
>> static int scan_chunks_sanity_check(struct device *dev)
>> {
>> - int metadata_size, curr_pkg, cpu, ret = -ENOMEM;
>> struct ifs_data *ifsd = ifs_get_data(dev);
>> + int curr_pkg, cpu, ret = -ENOMEM;
>> bool *package_authenticated;
>> struct ifs_work local_work;
>> - char *test_ptr;
>>
>> package_authenticated = kcalloc(topology_max_packages(), sizeof(bool), GFP_KERNEL);
>> if (!package_authenticated)
>> return ret;
>
> Bah, how big is that thing so that you can't simply do a bitfield on the
> stack here instead of kcalloc-ing?

Will modify it to use individual bits from a u32 to store package authentication status.

>
>> @@ -203,67 +174,33 @@ static int scan_chunks_sanity_check(struct device *dev)
>> return ret;
>> }
>>
>> -static int ifs_sanity_check(struct device *dev,
>> - const struct microcode_header_intel *mc_header)
>> +static int ifs_image_sanity_check(struct device *dev, const struct microcode_header_intel *data)
>
> Yet another static function - no need for the ifs_ prefix.

Noted ... will change


Jithu

\
 
 \ /
  Last update: 2022-11-11 21:42    [W:0.678 / U:0.088 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site