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: <20170825120910.56114755@gandalf.local.home>
Date:   Fri, 25 Aug 2017 12:09:10 -0400
From:   Steven Rostedt <rostedt@...dmis.org>
To:     Thomas Gleixner <tglx@...utronix.de>
Cc:     LKML <linux-kernel@...r.kernel.org>,
        Ingo Molnar <mingo@...nel.org>, Peter Anvin <hpa@...or.com>,
        Peter Zijlstra <peterz@...radead.org>,
        Andy Lutomirski <luto@...nel.org>,
        Borislav Petkov <bp@...en8.de>
Subject: Re: [patch 12/41] x86/mce: Remove duplicated tracing interrupt code

On Fri, 25 Aug 2017 12:31:15 +0200
Thomas Gleixner <tglx@...utronix.de> wrote:


> --- a/arch/x86/kernel/cpu/mcheck/mce_amd.c
> +++ b/arch/x86/kernel/cpu/mcheck/mce_amd.c
> @@ -776,24 +776,12 @@ static void __log_error(unsigned int ban
>  	mce_log(&m);
>  }
>  
> -static inline void __smp_deferred_error_interrupt(void)
> -{
> -	inc_irq_stat(irq_deferred_error_count);
> -	deferred_error_int_vector();
> -}
> -
>  asmlinkage __visible void __irq_entry smp_deferred_error_interrupt(void)
>  {
>  	entering_irq();
> -	__smp_deferred_error_interrupt();
> -	exiting_ack_irq();
> -}
> -
> -asmlinkage __visible void __irq_entry smp_trace_deferred_error_interrupt(void)
> -{
> -	entering_irq();
>  	trace_deferred_error_apic_entry(DEFERRED_ERROR_VECTOR);
> -	__smp_deferred_error_interrupt();
> +	inc_irq_stat(irq_deferred_error_count);

Here we do the inc_irq_stat() after the tracepoint (same as the
original).

> +	deferred_error_int_vector();
>  	trace_deferred_error_apic_exit(DEFERRED_ERROR_VECTOR);
>  	exiting_ack_irq();
>  }
> --- a/arch/x86/kernel/cpu/mcheck/therm_throt.c
> +++ b/arch/x86/kernel/cpu/mcheck/therm_throt.c
> @@ -390,26 +390,12 @@ static void unexpected_thermal_interrupt
>  
>  static void (*smp_thermal_vector)(void) = unexpected_thermal_interrupt;
>  
> -static inline void __smp_thermal_interrupt(void)
> -{
> -	inc_irq_stat(irq_thermal_count);
> -	smp_thermal_vector();
> -}
> -
> -asmlinkage __visible void __irq_entry
> -smp_thermal_interrupt(struct pt_regs *regs)
> -{
> -	entering_irq();
> -	__smp_thermal_interrupt();
> -	exiting_ack_irq();
> -}
> -
> -asmlinkage __visible void __irq_entry
> -smp_trace_thermal_interrupt(struct pt_regs *regs)
> +asmlinkage __visible void __irq_entry smp_thermal_interrupt(struct pt_regs *r)
>  {
>  	entering_irq();
> +	inc_irq_stat(irq_thermal_count);
>  	trace_thermal_apic_entry(THERMAL_APIC_VECTOR);

Here we do the inc_irq_stat() after the tracepoint (swapped from the
original). Was that intentional?

> -	__smp_thermal_interrupt();
> +	smp_thermal_vector();
>  	trace_thermal_apic_exit(THERMAL_APIC_VECTOR);
>  	exiting_ack_irq();
>  }
> --- a/arch/x86/kernel/cpu/mcheck/threshold.c
> +++ b/arch/x86/kernel/cpu/mcheck/threshold.c
> @@ -17,24 +17,12 @@ static void default_threshold_interrupt(
>  
>  void (*mce_threshold_vector)(void) = default_threshold_interrupt;
>  
> -static inline void __smp_threshold_interrupt(void)
> -{
> -	inc_irq_stat(irq_threshold_count);
> -	mce_threshold_vector();
> -}
> -
>  asmlinkage __visible void __irq_entry smp_threshold_interrupt(void)
>  {
>  	entering_irq();
> -	__smp_threshold_interrupt();
> -	exiting_ack_irq();
> -}
> -
> -asmlinkage __visible void __irq_entry smp_trace_threshold_interrupt(void)
> -{
> -	entering_irq();
>  	trace_threshold_apic_entry(THRESHOLD_APIC_VECTOR);
> -	__smp_threshold_interrupt();
> +	inc_irq_stat(irq_threshold_count);

Back to inc_irq_stat() after the tracepoint.

-- Steve

> +	mce_threshold_vector();
>  	trace_threshold_apic_exit(THRESHOLD_APIC_VECTOR);
>  	exiting_ack_irq();
>  }
> 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ