Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1724097 > unrolled thread
| Started by | Borislav Petkov <bp@alien8.de> |
|---|---|
| First post | 2017-08-31 13:00 +0200 |
| Last post | 2017-08-31 19:00 +0200 |
| Articles | 3 — 2 participants |
Back to article view | Back to linux.kernel
This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by
below is the oldest one visible, not the original post.
Re: [PATCH v4 3/5] ghes_edac: add platform check to enable ghes_edac Borislav Petkov <bp@alien8.de> - 2017-08-31 13:00 +0200
Re: [PATCH v4 3/5] ghes_edac: add platform check to enable ghes_edac "Kani, Toshimitsu" <toshi.kani@hpe.com> - 2017-08-31 18:20 +0200
Re: [PATCH v4 3/5] ghes_edac: add platform check to enable ghes_edac Borislav Petkov <bp@alien8.de> - 2017-08-31 19:00 +0200
| From | Borislav Petkov <bp@alien8.de> |
|---|---|
| Date | 2017-08-31 13:00 +0200 |
| Subject | Re: [PATCH v4 3/5] ghes_edac: add platform check to enable ghes_edac |
| Message-ID | <ukvmy-4Aq-1@gated-at.bofh.it> |
On Wed, Aug 23, 2017 at 04:54:45PM -0600, Toshi Kani wrote:
> The ghes_edac driver was introduced in 2013 [1], but it has not
> been enabled by any distro yet. This driver obtains error info
> from firmware interfaces, which are not properly implemented on
> many platforms, as the driver always emits the messages below:
>
> This EDAC driver relies on BIOS to enumerate memory and get error reports.
> Unfortunately, not all BIOSes reflect the memory layout correctly
> So, the end result of using this driver varies from vendor to vendor
> If you find incorrect reports, please contact your hardware vendor
> to correct its BIOS.
>
> To get out from this situation, add a platform check to selectively
> enable the driver on the platforms that are known to have proper
> firmware implementation. Platform vendors can add their platforms
> to the list when they support ghes_edac.
>
> "ghes_edac.force_load=1" skips this platform check.
>
> [1]: https://lwn.net/Articles/538438/
> Signed-off-by: Toshi Kani <toshi.kani@hpe.com>
> Cc: Borislav Petkov <bp@alien8.de>
> Cc: Mauro Carvalho Chehab <mchehab@kernel.org>
> Cc: Tony Luck <tony.luck@intel.com>
> ---
> drivers/edac/ghes_edac.c | 29 ++++++++++++++++++++++++-----
> 1 file changed, 24 insertions(+), 5 deletions(-)
>
> diff --git a/drivers/edac/ghes_edac.c b/drivers/edac/ghes_edac.c
> index 8d904df..0030a09 100644
> --- a/drivers/edac/ghes_edac.c
> +++ b/drivers/edac/ghes_edac.c
> @@ -38,6 +38,10 @@ static struct ghes_edac_pvt *ghes_pvt;
> */
> static DEFINE_SPINLOCK(ghes_lock);
>
> +/* Set 1 to skip the platform check */
> +static bool __read_mostly ghes_edac_force_load;
It is static - "force_load" as a bool name is enough.
> +module_param_named(force_load, ghes_edac_force_load, bool, 0);
ERROR: Use 4 digit octal (0777) not decimal permissions
#53: FILE: drivers/edac/ghes_edac.c:43:
+module_param_named(force_load, ghes_edac_force_load, bool, 0);
This last param is @perm: visibility in sysfs. Why not visible in sysfs?
> +
> /* Memory Device - Type 17 of SMBIOS spec */
> struct memdev_dmi_entry {
> u8 type;
> @@ -415,6 +419,15 @@ void ghes_edac_report_mem_error(struct ghes *ghes, int sev,
> spin_unlock_irqrestore(&ghes_lock, flags);
> }
>
> +/*
> + * Known systems that are safe to enable this module.
> + * "ghes_edac.force_load=1" skips this check if necessary.
Put this second sentence over the parameter definition.
--
Regards/Gruss,
Boris.
Good mailing practices for 400: avoid top-posting and trim the reply.
[toc] | [next] | [standalone]
| From | "Kani, Toshimitsu" <toshi.kani@hpe.com> |
|---|---|
| Date | 2017-08-31 18:20 +0200 |
| Message-ID | <ukAmd-7Ri-5@gated-at.bofh.it> |
| In reply to | #1724097 |
On Thu, 2017-08-31 at 12:56 +0200, Borislav Petkov wrote:
> On Wed, Aug 23, 2017 at 04:54:45PM -0600, Toshi Kani wrote:
:
> > ---
> > drivers/edac/ghes_edac.c | 29 ++++++++++++++++++++++++-----
> > 1 file changed, 24 insertions(+), 5 deletions(-)
> >
> > diff --git a/drivers/edac/ghes_edac.c b/drivers/edac/ghes_edac.c
> > index 8d904df..0030a09 100644
> > --- a/drivers/edac/ghes_edac.c
> > +++ b/drivers/edac/ghes_edac.c
> > @@ -38,6 +38,10 @@ static struct ghes_edac_pvt *ghes_pvt;
> > */
> > static DEFINE_SPINLOCK(ghes_lock);
> >
> > +/* Set 1 to skip the platform check */
> > +static bool __read_mostly ghes_edac_force_load;
>
> It is static - "force_load" as a bool name is enough.
Will do.
> > +module_param_named(force_load, ghes_edac_force_load, bool, 0);
>
> ERROR: Use 4 digit octal (0777) not decimal permissions
> #53: FILE: drivers/edac/ghes_edac.c:43:
> +module_param_named(force_load, ghes_edac_force_load, bool, 0);
>
> This last param is @perm: visibility in sysfs. Why not visible in
> sysfs?
I followed in the footsteps of 'ghes_disable', which is also a kernel
boot option and uses 0.
> > +
> > /* Memory Device - Type 17 of SMBIOS spec */
> > struct memdev_dmi_entry {
> > u8 type;
> > @@ -415,6 +419,15 @@ void ghes_edac_report_mem_error(struct ghes
> > *ghes, int sev,
> > spin_unlock_irqrestore(&ghes_lock, flags);
> > }
> >
> > +/*
> > + * Known systems that are safe to enable this module.
> > + * "ghes_edac.force_load=1" skips this check if necessary.
>
> Put this second sentence over the parameter definition.
Will do.
Thanks,
-Toshi
[toc] | [prev] | [next] | [standalone]
| From | Borislav Petkov <bp@alien8.de> |
|---|---|
| Date | 2017-08-31 19:00 +0200 |
| Message-ID | <ukAYW-85f-15@gated-at.bofh.it> |
| In reply to | #1724389 |
On Thu, Aug 31, 2017 at 04:17:07PM +0000, Kani, Toshimitsu wrote:
> I followed in the footsteps of 'ghes_disable', which is also a kernel
> boot option and uses 0.
Ok, ghes_disable comment says that using module_param() is easier.
ghes_edac is not a module but then __setup() is for "really core code".
Documentation/admin-guide/kernel-parameters.rst also talks about
core_param() but that's #ifndef MODULE. So module_param() it is.
--
Regards/Gruss,
Boris.
Good mailing practices for 400: avoid top-posting and trim the reply.
[toc] | [prev] | [standalone]
Back to top | Article view | linux.kernel
csiph-web