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] [day] [month] [year] [list]
Date:	Sat, 22 Aug 2015 15:55:02 +0200
From:	Ingo Molnar <mingo@...nel.org>
To:	Andy Lutomirski <luto@...capital.net>
Cc:	Steven Rostedt <rostedt@...dmis.org>,
	Andy Lutomirski <luto@...nel.org>, X86 ML <x86@...nel.org>,
	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
	Brian Gerst <brgerst@...il.com>, Willy Tarreau <w@....eu>,
	Borislav Petkov <bp@...en8.de>,
	Thomas Gleixner <tglx@...utronix.de>,
	Peter Zijlstra <peterz@...radead.org>,
	Linus Torvalds <torvalds@...ux-foundation.org>
Subject: Re: [PATCH 1/3] x86/entry/64: Refactor IRQ stacks and make then
 NMI-safe


* Andy Lutomirski <luto@...capital.net> wrote:

> On Wed, Aug 5, 2015 at 11:27 AM, Steven Rostedt <rostedt@...dmis.org> wrote:
> > On Wed, 5 Aug 2015 11:24:54 -0700
> > Andy Lutomirski <luto@...capital.net> wrote:
> >
> >> On Wed, Aug 5, 2015 at 1:59 AM, Ingo Molnar <mingo@...nel.org> wrote:
> >> >
> >> > * Andy Lutomirski <luto@...nel.org> wrote:
> >> >
> >> >> --- a/arch/x86/kernel/process_64.c
> >> >> +++ b/arch/x86/kernel/process_64.c
> >> >> @@ -280,6 +280,10 @@ __switch_to(struct task_struct *prev_p, struct task_struct *next_p)
> >> >>       unsigned fsindex, gsindex;
> >> >>       fpu_switch_t fpu_switch;
> >> >>
> >> >> +#ifdef CONFIG_DEBUG_ENTRY
> >> >> +     WARN_ON(this_cpu_read(irq_count));
> >> >> +#endif
> >> >
> >> > Please introduce a less noisy (to the eyes) version of this, something like:
> >> >
> >> >         WARN_ON_DEBUG_ENTRY(this_cpu_read(irq_count));
> >> >
> >> > or so, similar to WARN_ON_FPU().
> >>
> >> I can do that (or "DEBUG_ENTRY_WARN_ON"?  we seem to be inconsistent
> >> about ordering).
> >>
> >> Or would if (IS_ENABLED(CONFIG_DEBUG_ENTRY)) WARN_ON(...) be better?
> >>
> >
> > Does WARN_ON(IS_ENABLED(CONFIG_DEBUG_ENTRY) && this_cpu_read(irq_count))
> > work?
> 
> I'd be okay with it.  Ingo?

Yeah, that one is more compact than the #ifdef variant.

Thanks,

	Ingo
--
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