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: <20161107181906.n72wt4zxufqmvrdu@pd.tnic>
Date:   Mon, 7 Nov 2016 19:19:06 +0100
From:   Borislav Petkov <bp@...en8.de>
To:     Thomas Gleixner <tglx@...utronix.de>
Cc:     Sebastian Andrzej Siewior <bigeasy@...utronix.de>,
        linux-kernel@...r.kernel.org, rt@...utronix.de,
        Tony Luck <tony.luck@...el.com>, linux-edac@...r.kernel.org,
        x86@...nel.org
Subject: Re: [PATCH 21/25] x86/mcheck: Split threshold_cpu_callback into two
 callbacks

On Mon, Nov 07, 2016 at 06:26:17PM +0100, Sebastian Andrzej Siewior wrote:
> Subject: x86/mcheck: Split threshold_cpu_callback into two callbacks
> From: Sebastian Andrzej Siewior <bigeasy@...utronix.de>
> Date: Tue, 25 Oct 2016 18:04:25 +0200
> 
> The threshold_cpu_callback callbacks looks like one of the notifier and
> its arguments are almost the same. Split this out and have one ONLINE
> and one DEAD callback. This will come handy later once the main code
> gets changed to use the callback mechanism.
> Also, handle threshold_cpu_callback_online() return value so we don't
> continue if the function fails.
> 
> Boris Petkov removed the callback pointer and replaced it with proper
> functions.
> 
> Cc: Tony Luck <tony.luck@...el.com>
> Cc: Borislav Petkov <bp@...en8.de>
> Cc: linux-edac@...r.kernel.org
> Cc: x86@...nel.org
> Signed-off-by: Sebastian Andrzej Siewior <bigeasy@...utronix.de>
> Signed-off-by: Thomas Gleixner <tglx@...utronix.de>
> --- a/arch/x86/include/asm/mce.h
> +++ b/arch/x86/include/asm/mce.h
> @@ -293,9 +293,7 @@ void do_machine_check(struct pt_regs *,
>  /*
>   * Threshold handler
>   */
> -
>  extern void (*mce_threshold_vector)(void);
> -extern void (*threshold_cpu_callback)(unsigned long action, unsigned int cpu);
>  
>  /* Deferred error interrupt handler */
>  extern void (*deferred_error_int_vector)(void);
> @@ -377,7 +375,12 @@ struct smca_bank_info {
>  };
>  
>  extern struct smca_bank_info smca_banks[MAX_NR_BANKS];
> +extern int mce_threshold_create_device(unsigned int cpu);
> +extern int mce_threshold_remove_device(unsigned int cpu);
> +#else
>  
> +static inline int mce_threshold_create_device(unsigned int cpu) { return 0; };
> +static inline int mce_threshold_remove_device(unsigned int cpu) { return 0; };
>  #endif
>  
>  #endif /* _ASM_X86_MCE_H */

Right, just a heads-up for tip guys: this second hunk will cause a merge
conflict with the other RAS changes:

Applying patch 21-x86-mcheck-split_threshold_cpu_callback_into_two_callbacks.patch
patching file arch/x86/include/asm/mce.h
Hunk #1 succeeded at 292 (offset -1 lines).
Hunk #2 FAILED at 375.
1 out of 2 hunks FAILED -- saving rejects to file arch/x86/include/asm/mce.h.rej

The fixup is easy though as it is only a contextual conflict due to
renaming of smca_bank_info to smca_bank:

Index: b/arch/x86/include/asm/mce.h
===================================================================
--- a/arch/x86/include/asm/mce.h        2016-11-07 19:12:14.309920731 +0100
+++ b/arch/x86/include/asm/mce.h        2016-11-07 19:13:47.521922219 +0100
@@ -292,9 +292,7 @@ void do_machine_check(struct pt_regs *,
 /*
  * Threshold handler
  */
-
 extern void (*mce_threshold_vector)(void);
-extern void (*threshold_cpu_callback)(unsigned long action, unsigned int cpu);
 
 /* Deferred error interrupt handler */
 extern void (*deferred_error_int_vector)(void);
@@ -372,6 +370,11 @@ struct smca_bank {
 extern struct smca_bank smca_banks[MAX_NR_BANKS];
 
 extern const char *smca_get_long_name(enum smca_bank_types t);
+extern int mce_threshold_create_device(unsigned int cpu);
+extern int mce_threshold_remove_device(unsigned int cpu);
+#else
+static inline int mce_threshold_create_device(unsigned int cpu) { return 0; };
+static inline int mce_threshold_remove_device(unsigned int cpu) { return 0; };
 #endif
 
 #endif /* _ASM_X86_MCE_H */
---

Thanks!

-- 
Regards/Gruss,
    Boris.

Good mailing practices for 400: avoid top-posting and trim the reply.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ