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: <20170825154016.2b692126@gandalf.local.home>
Date:   Fri, 25 Aug 2017 15:40:16 -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 14/41] x86/smp: Use static key for reschedule interrupt
 tracing

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


> -__visible void __irq_entry smp_trace_reschedule_interrupt(struct pt_regs *regs)
> -{
> -	/*
> -	 * Need to call irq_enter() before calling the trace point.
> -	 * __smp_reschedule_interrupt() calls irq_enter/exit() too (in
> -	 * scheduler_ipi(). This is OK, since those functions are allowed
> -	 * to nest.
> -	 */
> -	ipi_entering_ack_irq();
> -	trace_reschedule_entry(RESCHEDULE_VECTOR);
> +	if (trace_irqvectors_enabled()) {
> +		/*
> +		 * scheduler_ipi() might call irq_enter() as well, but
> +		 * nested calls are fine.
> +		 */
> +		irq_enter();
> +		trace_reschedule_entry(RESCHEDULE_VECTOR);
> +	}
> +
>  	inc_irq_stat(irq_resched_count);
>  	scheduler_ipi();
> -	trace_reschedule_exit(RESCHEDULE_VECTOR);
> -	exiting_irq();
> +
> +	if (trace_irqvectors_enabled()) {
> +		trace_reschedule_exit(RESCHEDULE_VECTOR);
> +		irq_exit();

This is racy. If the static key gets changed on one and not the other,
we lose the irq_enter/irq_exit match.

-- Steve


> +	}
>  }
>  
>  __visible void __irq_entry smp_call_function_interrupt(struct pt_regs *regs)
> 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ