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: <20140513194906.GE8760@pd.tnic>
Date:	Tue, 13 May 2014 21:49:06 +0200
From:	Borislav Petkov <bp@...en8.de>
To:	Tomasz Nowicki <tomasz.nowicki@...aro.org>
Cc:	rjw@...ysocki.net, lenb@...nel.org, tony.luck@...el.com,
	bp@...e.de, m.chehab@...sung.com, linux-edac@...r.kernel.org,
	x86@...nel.org, linux-acpi@...r.kernel.org,
	linux-kernel@...r.kernel.org, linaro-acpi@...ts.linaro.org
Subject: Re: [PATCH 5/7] acpi, apei, ghes: Attach NMI init/deinit functions
 while CONFIG_ACPI_APEI_NMI is enabled.

On Wed, Apr 09, 2014 at 05:14:33PM +0200, Tomasz Nowicki wrote:
> Thanks to more generic way of init/deinit error notification, we can
> register NMI related calls in runtime. It happens before walking through
> GHES entries, so probe function will treat NMI as supported.

And we do this special handling which could confuse people because... ?

> Signed-off-by: Tomasz Nowicki <tomasz.nowicki@...aro.org>
> ---
>  drivers/acpi/apei/ghes.c |   21 ++++++++++++++++-----
>  1 file changed, 16 insertions(+), 5 deletions(-)
> 
> diff --git a/drivers/acpi/apei/ghes.c b/drivers/acpi/apei/ghes.c
> index 7a0d66e..aaf8db3 100644
> --- a/drivers/acpi/apei/ghes.c
> +++ b/drivers/acpi/apei/ghes.c
> @@ -906,7 +906,6 @@ static void ghes_estatus_pool_shrink(unsigned long len)
>  {
>  	ghes_estatus_pool_size_request -= PAGE_ALIGN(len);
>  }
> -#endif
>  
>  static int ghes_notify_init_nmi(struct ghes *ghes)
>  {
> @@ -941,6 +940,20 @@ static void ghes_notify_remove_nmi(struct ghes *ghes)
>  	ghes_estatus_pool_shrink(len);
>  }
>  
> +static void ghes_init_nmi(void)
> +{
> +	init_irq_work(&ghes_proc_irq_work, ghes_proc_in_irq);
> +	ghes_notify_tab[ACPI_HEST_NOTIFY_NMI].init_call = ghes_notify_init_nmi;
> +	ghes_notify_tab[ACPI_HEST_NOTIFY_NMI].remove_call = ghes_notify_remove_nmi;
> +
> +}
> +#else
> +inline static void ghes_init_nmi(void)
> +{
> +
> +}
> +#endif

WARNING: storage class should be at the beginning of the declaration
#51: FILE: drivers/acpi/apei/ghes.c:951:
+inline static void ghes_init_nmi(void)

ERROR: inline keyword should sit between storage class and type
#51: FILE: drivers/acpi/apei/ghes.c:951:
+inline static void ghes_init_nmi(void)

i.e..

static inline void ...

> +
>  static int ghes_notify_init_polled(struct ghes *ghes)
>  {
>  	ghes->timer.function = ghes_poll_func;
> @@ -1018,9 +1031,7 @@ static struct ghes_notify_setup
>  		[ACPI_HEST_NOTIFY_SCI]      = {"SCI",
>  					       ghes_notify_init_sci,
>  					       ghes_notify_remove_sci},
> -		[ACPI_HEST_NOTIFY_NMI]      = {"NMI",
> -					       ghes_notify_init_nmi,
> -					       ghes_notify_remove_nmi},
> +		[ACPI_HEST_NOTIFY_NMI]      = {"NMI", NULL, NULL},
>  		[ACPI_HEST_NOTIFY_CMCI]     = {"CMCI", NULL, NULL},
>  		[ACPI_HEST_NOTIFY_MCE]      = {"MCE", NULL, NULL},
>  };
> @@ -1141,7 +1152,7 @@ static int __init ghes_init(void)
>  		return -EINVAL;
>  	}
>  
> -	init_irq_work(&ghes_proc_irq_work, ghes_proc_in_irq);
> +	ghes_init_nmi();
>  
>  	rc = ghes_ioremap_init();
>  	if (rc)
> -- 
> 1.7.9.5
> 
> 

-- 
Regards/Gruss,
    Boris.

Sent from a fat crate under my desk. Formatting is fine.
--
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ