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: <20180629072507.lroaj34gxl2d5bze@pathway.suse.cz>
Date:   Fri, 29 Jun 2018 09:25:07 +0200
From:   Petr Mladek <pmladek@...e.com>
To:     Sergey Senozhatsky <sergey.senozhatsky.work@...il.com>
Cc:     Steven Rostedt <rostedt@...dmis.org>,
        Sergey Senozhatsky <sergey.senozhatsky@...il.com>,
        Peter Zijlstra <peterz@...radead.org>,
        Tetsuo Handa <penguin-kernel@...ove.SAKURA.ne.jp>,
        linux-kernel@...r.kernel.org, stable@...r.kernel.org
Subject: Re: [PATCH v2 3/3] printk/nmi: Prevent deadlock when accessing the
 main log buffer in NMI

On Fri 2018-06-29 10:47:03, Sergey Senozhatsky wrote:
> On (06/28/18 11:41), Petr Mladek wrote:
> > > 
> > > A side note: This nesting also handles recursive printk-s for us.
> > > 
> > > NMI:
> > > 	printk_nmi_enter
> > > 	ftrace_dump
> > > 	 printk_nmi_direct_enter
> > > 	  vprintk_func
> > > 	   spin_lock(logbuf_lock)
> > > 	    vprintk_store
> > > 	     vsprintf
> > > 	      WARN_ON
> > > 	       vprintk_func
> > > 	        vprintk_nmi
> > 
> > Uff, it seems that the current design is "good" at lest from some
> > points of view.
> 
> yep yep
> 
> > > > +		len = vprintk_store(0, LOGLEVEL_DEFAULT, NULL, 0, fmt, args);
> > > > +		raw_spin_unlock(&logbuf_lock);
> > > > +		defer_console();
> > > > +		return len;
> > > > +	}
> > > 
> > > So, maybe, something a bit better than defer_console().
> > 
> > I am not super happy with the name either. But wakeup_console(),
> > schedule_console(), or queue_console() looked confusing.
> 
> Hmm. defer_console() makes me think that we are dealing with that
> fbcon=nodefer and deferred console takeover thing here.
> 
> 
> So I summon Mr. Rostedt!
> 
> Does schedule_console_output() look bad?
> What about defer_console_output()?

I am fine with both. I slightly prefer defer_console_output()
because I have "schedule" associated with deadlocks in this
code path (context) ;-)

Best Regards,
Petr

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ