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]
Date:   Tue, 15 Jun 2021 12:00:09 -0400
From:   Yazen Ghannam <yazen.ghannam@....com>
To:     Borislav Petkov <bp@...en8.de>
Cc:     "Luck, Tony" <tony.luck@...el.com>,
        Smita Koralahalli <Smita.KoralahalliChannabasappa@....com>,
        "x86@...nel.org" <x86@...nel.org>,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
        "linux-edac@...r.kernel.org" <linux-edac@...r.kernel.org>,
        Mauro Carvalho Chehab <mchehab@...nel.org>,
        James Morse <james.morse@....com>,
        Robert Richter <rric@...nel.org>
Subject: Re: [PATCH] EDAC/mce_amd: Reduce unnecessary spew in dmesg if SMCA
 feature bit is not exposed

On Tue, Jun 15, 2021 at 05:18:50PM +0200, Borislav Petkov wrote:
> On Tue, Jun 15, 2021 at 11:08:46AM -0400, Yazen Ghannam wrote:
> > How about adding the the SMCA feature to the amd64_cpuids[] table in
> > amd64_edac.c?
> > 
> > We can use X86_MATCH_VENDOR_FEATURE to match on AMD (and Hygon) systems
> > with SMCA. And we can remove the X86_MATCH_VENDOR_FAM entries for
> > families 17h-19h.
> 
> Sure. That'll alleviate the need to add new families which support SMCA
> too.
> 
> > I'm assuming the issue is that amd64_edac_mod is autoloading due to the
> > family-based device table, and this will load edac_mce_amd as a
> > dependency.
> 
> Is it?
> 
> We have
> 
> early_initcall(mce_amd_init);
> 
> in mce_amd.c which attempts to load this thing unconditionally.
>

I think edac_mce_amd is usually built as a module by distro configs, so
early_initcall() would be replaced by module_init(). But the default
option is built-in, so you're right about the early_initcall().

Also, you bring up a good point. We can't say to people "don't load the
module" if it's builtin. And I don't think it's fair to say "don't
build-in the module" if the default is "y".

So I think we can downgrade this warning to a debug message, if the
module stays builtin. And/or we change the default config option to
module, and we make sure the module only autoloads in the proper cases.

What do you think?

Thanks,
Yazen

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ