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: <87frsh33xp.fsf@jogness.linutronix.de>
Date: Wed, 10 Jul 2024 13:08:42 +0206
From: John Ogness <john.ogness@...utronix.de>
To: Daniel Vetter <daniel.vetter@...ll.ch>, DRI Development
 <dri-devel@...ts.freedesktop.org>, LKML <linux-kernel@...r.kernel.org>
Cc: Intel Graphics Development <intel-gfx@...ts.freedesktop.org>, Daniel
 Vetter <daniel.vetter@...ll.ch>,
 syzbot+6cebc1af246fe020a2f0@...kaller.appspotmail.com, Daniel Vetter
 <daniel.vetter@...el.com>, stable@...r.kernel.org, Kent Overstreet
 <kent.overstreet@...ux.dev>, Brian Foster <bfoster@...hat.com>,
 linux-bcachefs@...r.kernel.org, Petr Mladek <pmladek@...e.com>, Steven
 Rostedt <rostedt@...dmis.org>, Sergey Senozhatsky
 <senozhatsky@...omium.org>
Subject: Re: [PATCH 2/2] bcachefs: only console_trylock in
 bch2_print_string_as_lines

On 2024-07-10, Daniel Vetter <daniel.vetter@...ll.ch> wrote:
> console_lock is the outermost subsystem lock for a lot of subsystems,
> which means get/put_user must nest within. Which means it cannot be
> acquired somewhere deeply nested in other locks, and most definitely
> not while holding fs locks potentially needed to resolve faults.
>
> console_trylock is the best we can do here.
>
> Including printk folks since even trylock feels realyl iffy here to
> me.

Using the console lock here at all is wrong. The console lock does not
prevent other CPUs from calling printk() and inserting lines in between.

There is no way to guarantee a contiguous ringbuffer block using
multiple printk() calls.

The console_lock usage should be removed.

John Ogness

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ