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: <DBBPR08MB4538A3F6A2F63B3AC8223FA6F7629@DBBPR08MB4538.eurprd08.prod.outlook.com>
Date:   Tue, 9 Aug 2022 10:06:01 +0000
From:   Justin He <Justin.He@....com>
To:     "Kani, Toshi" <toshi.kani@....com>, Borislav Petkov <bp@...en8.de>,
        "Rafael J. Wysocki" <rafael@...nel.org>
CC:     Len Brown <lenb@...nel.org>, James Morse <James.Morse@....com>,
        Tony Luck <tony.luck@...el.com>,
        Mauro Carvalho Chehab <mchehab@...nel.org>,
        Robert Richter <rric@...nel.org>,
        Shuai Xue <xueshuai@...ux.alibaba.com>,
        Jarkko Sakkinen <jarkko@...nel.org>,
        ACPI Devel Maling List <linux-acpi@...r.kernel.org>,
        Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
        "open list:EDAC-CORE" <linux-edac@...r.kernel.org>
Subject: 回复: [PATCH] ACPI: APEI: move edac_init ahead of ghes platform drv register

Hi Kani,

> -----邮件原件-----
> 发件人: Kani, Toshi <toshi.kani@....com>
> 发送时间: Tuesday, August 9, 2022 4:40 AM
> 收件人: Borislav Petkov <bp@...en8.de>; Rafael J. Wysocki
> <rafael@...nel.org>
> 抄送: Justin He <Justin.He@....com>; Len Brown <lenb@...nel.org>; James
> Morse <James.Morse@....com>; Tony Luck <tony.luck@...el.com>; Mauro
> Carvalho Chehab <mchehab@...nel.org>; Robert Richter <rric@...nel.org>;
> Shuai Xue <xueshuai@...ux.alibaba.com>; Jarkko Sakkinen
> <jarkko@...nel.org>; ACPI Devel Maling List <linux-acpi@...r.kernel.org>;
> Linux Kernel Mailing List <linux-kernel@...r.kernel.org>; open
> list:EDAC-CORE <linux-edac@...r.kernel.org>
> 主题: RE: [PATCH] ACPI: APEI: move edac_init ahead of ghes platform drv
> register
>
> On Monday, August 8, 2022 12:38 PM, Borislav Petkov wrote:
> > On Mon, Aug 08, 2022 at 08:17:58PM +0200, Rafael J. Wysocki wrote:
> > > This effectively makes EDAC depend on GHES which may not be always
> > > valid AFAICS.
> >
> > Yes, and this has been getting on my nerves since forever.
> >
> > The GHES code which does collect all those errors *forces* the
> > registration of an EDAC module which does only the reporting.
> >
> > Which cannot be any more backwards.
> >
> > What should happen is, GHES inits and starts working on the errors.
> > Then, at some point later, ghes_edac loads and starts reporting
> > whatever it gets. If there's no EDAC module, it doesn't report them.
> > The same way MCA works.
> >
> > That's it.
> >
> > And then ghes_edac can be made a normal module again and we can get
> > rid of this insanity.
>
> The following approach may be considerable:
> - Separate ghes_edac_register() into two functions, e.g., ghes_edac_register()
> and ghes_edac_init().
> - ghes_edac_register() only takes the first if-block with IS_ENABLED() &
> force_load check, and then calls a new function,
> edac_set_owner(mod_name), which simply sets mod_name to
> edac_mc_owner.  This allows ghes_edac_register() to run before edac_init(),
> and sets edac_mc_owner to prevent chipset-specific edac driver to be loaded
> before ghes_edac.
> - ghes_edac_init() first calls edac_get_owner() to match with its mod_name.
> If so, it performs the rest of the original ghes_edac_register() procedure.
> This
> ghes_edac_init() is called from the normal module init path, e.g.,
> module_init().
Thanks for the suggestion, one gap is that under module_init path, how can we pass
 the 2nd parameter of ghes_edac_register (struct device *dev) to the new
* ghes_edac_init()?

IIUC, the parameter of any functions under module_init() path should be void.


--
Cheers,
Justin (Jia He)


IMPORTANT NOTICE: The contents of this email and any attachments are confidential and may also be privileged. If you are not the intended recipient, please notify the sender immediately and do not disclose the contents to any other person, use it for any purpose, or store or copy the information in any medium. Thank you.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ