[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20241210095517.GAZ1gQBcS2BKA30-GO@fat_crate.local>
Date: Tue, 10 Dec 2024 10:55:17 +0100
From: Borislav Petkov <bp@...en8.de>
To: Avadhut Naik <avadhut.naik@....com>
Cc: linux-edac@...r.kernel.org, linux-kernel@...r.kernel.org,
yazen.ghannam@....com
Subject: Re: [PATCH] EDAC/amd64: Fix possible module load failure on some UMC
usage combinations
On Mon, Dec 09, 2024 at 09:55:10PM +0000, Avadhut Naik wrote:
> Starting Zen4, AMD SOCs have 12 Unified Memory Controllers (UMCs) per
> socket.
>
> When the amd64_edac module is being loaded, these UMCs are traversed to
> determine if they have SdpInit (SdpCtrl[31]) and EccEnabled (UmcCapHi[30])
> bits set and create masks in umc_en_mask and ecc_en_mask respectively.
>
> However, the current data type of these variables is u8. As a result, if
> only the last 4 UMCs (UMC8 - UMC11) of the system have been utilized,
> umc_ecc_enabled() will return false. Consequently, the module may fail to
> load on these systems.
>
> Change the data type of these variables to u16.
No need to explain what the patch does. The "why" is enough.
> Signed-off-by: Avadhut Naik <avadhut.naik@....com>
> ---
> drivers/edac/amd64_edac.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
This looks like it needs a CC:stable and a Fixes: tag, right?
While at it, you can simply make those vars int and be done with it.
Thx.
--
Regards/Gruss,
Boris.
https://people.kernel.org/tglx/notes-about-netiquette
Powered by blists - more mailing lists