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: <20180515103927.1be0cafa@gandalf.local.home>
Date:   Tue, 15 May 2018 10:39:27 -0400
From:   Steven Rostedt <rostedt@...dmis.org>
To:     Sergey Senozhatsky <sergey.senozhatsky.work@...il.com>
Cc:     Dmitry Vyukov <dvyukov@...gle.com>,
        Tetsuo Handa <penguin-kernel@...ove.sakura.ne.jp>,
        Petr Mladek <pmladek@...e.com>,
        Sergey Senozhatsky <sergey.senozhatsky@...il.com>,
        syzkaller <syzkaller@...glegroups.com>,
        Fengguang Wu <fengguang.wu@...el.com>,
        LKML <linux-kernel@...r.kernel.org>
Subject: Re: printk feature for syzbot?

On Tue, 15 May 2018 14:20:42 +0900
Sergey Senozhatsky <sergey.senozhatsky.work@...il.com> wrote:

> > And no, NMI handlers do not nest. Yes, we deal with nested NMIs, but in
> > those cases, we just set a bit as a latch, and return, and when the
> > first NMI is complete, it checks that bit and if it is set, it executes
> > another NMI handler.  
> 
> Good to know!
> I thought that NMI can nest in some weird cases, like a breakpoint from
> NMI. This must be super tricky, given that nested NMI will corrupt the
> stack of the previous NMI, etc. Anyway.

Well, they do kinda nest, but we work hard not to let them do anything
when they do. You can read all about it here:

https://lwn.net/Articles/484932/

> 
> > > Well, hm. __irq_enter() does preempt_count_add(HARDIRQ_OFFSET) and
> > > __irq_exit() does preempt_count_sub(HARDIRQ_OFFSET). So, technically,
> > > you can store
> > > 
> > > 	preempt_count() & HARDIRQ_MASK
> > > 	preempt_count() & SOFTIRQ_MASK
> > > 	preempt_count() & NMI_MASK
> > >  
> [..]
> > I handle nesting of different contexts in the ftrace ring buffer using
> > the preempt count. See trace_recursive_lock/unlock() in
> > kernel/trace/ring_buffer.c.  
> 
> Thanks. So you are also checking the preempt_count().
>

Yes I am.

-- Steve

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ