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]
Message-ID: <CAOY=C6HZ23iitPSP1LroxArWFyhYHMb1VNy4k2SND9C2gt-AGg@mail.gmail.com>
Date:	Wed, 21 Dec 2011 13:03:35 +0100
From:	Stijn Devriendt <highguy@...il.com>
To:	Peter Zijlstra <peterz@...radead.org>
Cc:	Greg KH <greg@...ah.com>, "Theodore Ts'o" <tytso@....edu>,
	Linus Torvalds <torvalds@...ux-foundation.org>,
	Alan Cox <alan@...rguk.ukuu.org.uk>,
	linux-kernel <linux-kernel@...r.kernel.org>,
	Ingo Molnar <mingo@...e.hu>
Subject: Re: printk() vs tty_io

On Tue, Dec 13, 2011 at 8:33 PM, Peter Zijlstra <peterz@...radead.org> wrote:
> Hi tty folks,
>
> I've been poking at reducing the constraints on printk(), like make it
> work under rq->lock etc..
>
> Aside from a fwd port of the patch that abuses the console_sem.lock:
> https://lkml.org/lkml/2011/6/9/298 and a few other not so very pretty
> patches, I ran into the following lockdep splat (using a not so very
> pretty lockdep early_printk() patch):
>
> watchdog/0/10 is trying to acquire lock:
>  ((console_sem).lock){-.-...}, at:
> but task is already holding lock:
>  (&rt_rq->rt_runtime_lock){-.-...}, at:
> which lock already depends on the new lock.
>
> the existing dependency chain (in reverse order) is:
>
> -> #5 (&rt_rq->rt_runtime_lock){-.-...}:
> -> #4 (&rq->lock){-.-.-.}:
> -> #3 (&p->pi_lock){-.-.-.}:
> -> #2 (&tty->write_wait){-.-...}:
> -> #1 (&port_lock_key){-.-...}:
> -> #0 ((console_sem).lock){-.-...}:
>
> It turns out that writing to a console does wakeups due to tty_io.c.
>
> My question is basically, is there a feasible way around doing these
> wakeups from the console::write() path? Everything I thought of was
> really quite horrible... and very likely would break stuff since I'm not
> that well versed in the whole tty thing.
>

Would it be possible to solve the problem by allowing wake-ups from
inside the rq->lock? After all your hard work moving most of the wakeup
work out of the ttwu() code and the ttwu-queuing for cross-cpu wakeups
I believe that allowing wakeups from inside the rq->lock could be doable.

Regards,
Stijn
--
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