lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <b1007e63-6c86-4e24-aab6-b0a08acaf7ef@amd.com>
Date: Wed, 14 Feb 2024 09:57:44 -0500
From: Yazen Ghannam <yazen.ghannam@....com>
To: Borislav Petkov <bp@...en8.de>
Cc: yazen.ghannam@....com, tony.luck@...el.com, linux-edac@...r.kernel.org,
 linux-kernel@...r.kernel.org, avadhut.naik@....com, john.allen@....com,
 muralidhara.mk@....com, naveenkrishna.chatradhi@....com,
 sathyapriya.k@....com
Subject: Re: [PATCH 2/2] RAS: Introduce the FRU Memory Poison Manager

On 2/14/2024 6:10 AM, Borislav Petkov wrote:
> On Tue, Feb 13, 2024 at 09:35:16PM -0600, Yazen Ghannam wrote:
>> +static void init_fpd(struct cper_fru_poison_desc *fpd,  struct mce *m)
>> +{
>> +	memset(fpd, 0, sizeof(struct cper_fru_poison_desc));
>> +
>> +	fpd->timestamp	= m->time;
>> +	fpd->hw_id_type = FPD_HW_ID_TYPE_MCA_IPID;
>> +	fpd->hw_id	= m->ipid;
>> +	fpd->addr_type	= FPD_ADDR_TYPE_MCA_ADDR;
>> +	fpd->addr	= m->addr;
>> +}
> 
> Get rid of that one:
> 
> diff --git a/drivers/ras/amd/fmpm.c b/drivers/ras/amd/fmpm.c
> index f8799beddcc4..090b60d269e7 100644
> --- a/drivers/ras/amd/fmpm.c
> +++ b/drivers/ras/amd/fmpm.c
> @@ -221,17 +221,6 @@ static int update_record_on_storage(struct fru_rec *rec)
>   	return ret;
>   }
>   
> -static void init_fpd(struct cper_fru_poison_desc *fpd,  struct mce *m)
> -{
> -	memset(fpd, 0, sizeof(struct cper_fru_poison_desc));
> -
> -	fpd->timestamp	= m->time;
> -	fpd->hw_id_type = FPD_HW_ID_TYPE_MCA_IPID;
> -	fpd->hw_id	= m->ipid;
> -	fpd->addr_type	= FPD_ADDR_TYPE_MCA_ADDR;
> -	fpd->addr	= m->addr;
> -}
> -
>   static bool has_valid_entries(struct fru_rec *rec)
>   {
>   	if (!(rec->fmp.validation_bits & FMP_VALID_LIST_ENTRIES))
> @@ -288,7 +277,13 @@ static void update_fru_record(struct fru_rec *rec, struct mce *m)
>   
>   	mutex_lock(&fmpm_update_mutex);
>   
> -	init_fpd(&fpd, m);
> +	memset(&fpd, 0, sizeof(struct cper_fru_poison_desc));
> +
> +	fpd.timestamp	= m->time;
> +	fpd.hw_id_type = FPD_HW_ID_TYPE_MCA_IPID;
> +	fpd.hw_id	= m->ipid;
> +	fpd.addr_type	= FPD_ADDR_TYPE_MCA_ADDR;
> +	fpd.addr	= m->addr;
>   
>   	/* This is the first entry, so just save it. */
>   	if (!has_valid_entries(rec))
> 

Okay.

Thanks,
Yazen

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ