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: <20250407132415.GCZ_PR_82FKBcsIuGr@fat_crate.local>
Date: Mon, 7 Apr 2025 15:24:15 +0200
From: Borislav Petkov <bp@...en8.de>
To: Yazen Ghannam <yazen.ghannam@....com>
Cc: Naveen Krishna Chatradhi <naveenkrishna.chatradhi@....com>,
	Muralidhara M K <muralidhara.mk@....com>,
	linux-edac@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH 2/2] RAS/AMD/{ATL,FMPM}: Get masked address

On Tue, Apr 01, 2025 at 08:49:01PM +0000, Yazen Ghannam wrote:
> +u64 amd_atl_masked_addr(u64 addr)
> +{
> +	/*
> +	 * Row retirement is done on MI300 systems, and some bits are 'don't care'
> +	 * for comparing addresses with unique physical rows.
> +	 * This includes all column bits and the row[13] bit.
> +	 */
> +	if (df_cfg.rev == DF4p5 && df_cfg.flags.heterogeneous)
> +		return addr & ~(MI300_UMC_MCA_ROW13 | MI300_UMC_MCA_COL);
> +
> +	return addr;
> +}
> +EXPORT_SYMBOL_GPL(amd_atl_masked_addr);

Uff, an exported silly helper.

Make that static inline and stick into a header so that compiler can inline
and optimize.

And that header should be drivers/ras/amd/atl/internal.h

Also, the helper should be called "atl_mask_address()" or so as all our
functions have verbs in imperative tone.

> diff --git a/include/linux/ras.h b/include/linux/ras.h
> index a64182bc72ad..e822275bed6a 100644
> --- a/include/linux/ras.h
> +++ b/include/linux/ras.h

Internal helpers go into the internal header, not here.

Thx.

-- 
Regards/Gruss,
    Boris.

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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ