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: <20190425093712.GA11375@jagdpanzerIV>
Date:   Thu, 25 Apr 2019 18:37:12 +0900
From:   Sergey Senozhatsky <sergey.senozhatsky.work@...il.com>
To:     Sergey Senozhatsky <sergey.senozhatsky.work@...il.com>
Cc:     Petr Mladek <pmladek@...e.com>,
        Steven Rostedt <rostedt@...dmis.org>,
        Andrew Morton <akpm@...ux-foundation.org>,
        linux-kernel@...r.kernel.org,
        Sergey Senozhatsky <sergey.senozhatsky@...il.com>
Subject: Re: [RFC][PATCH 1/2] printk: lock console_sem before we unregister
 boot consoles

On (04/25/19 16:56), Sergey Senozhatsky wrote:
> > Great idea!
> > 
> > It would deserve a separate patch that moves the pr_info()
> > and removes the invalid comment.
> > 
> > Actually, the pr_info() would deserve a comment explaining
> > why it should be called before console_unlock().
> 
> Good. So I think I'll drop patch #1 from the series, add
> two more patches - invalid comment + pr_info() - and rework
> locking in patch #3 (this should take care of a race which
> patch #1 was intended to fix).

D'oh, I can't drop patch #1, we still need to factor out
__unregister_console(). Calling unregister_console(bcon)
under console_sem will deadlock us. So I'll just end up
having __registed_console() and __unregister_console(),
both should be called under console_sem:

register_console()
{
	console_lock()
	__register_console()
	{
		...
		for_each_console(bcon)
			if (bcon->flags & CON_BOOT)
				__unregister_console(bcon);
	}
	console_unlock()
}

	-ss

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ