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: <84o7171o9y.fsf@jogness.linutronix.de>
Date: Thu, 19 Dec 2024 20:17:21 +0106
From: John Ogness <john.ogness@...utronix.de>
To: Petr Mladek <pmladek@...e.com>
Cc: "Rob Herring (Arm)" <robh@...nel.org>, Linus Torvalds
 <torvalds@...ux-foundation.org>, Steven Rostedt <rostedt@...dmis.org>,
 Andy Shevchenko <andriy.shevchenko@...ux.intel.com>, Rasmus Villemoes
 <linux@...musvillemoes.dk>, Sergey Senozhatsky <senozhatsky@...omium.org>,
 Jonathan Corbet <corbet@....net>, Saravana Kannan <saravanak@...gle.com>,
 Andrew Morton <akpm@...ux-foundation.org>, Peter Zijlstra
 <peterz@...radead.org>, Thomas Gleixner <tglx@...utronix.de>, Zijun Hu
 <quic_zijuhu@...cinc.com>, linux-doc@...r.kernel.org,
 linux-kernel@...r.kernel.org, devicetree@...r.kernel.org
Subject: Re: lock in vsprintf(): was: Re: [PATCH] of: Add printf '%pOFm' for
 generating modalias

On 2024-12-19, Petr Mladek <pmladek@...e.com> wrote:
> I do not want to revert everything now just because of theoretical
> problems.

What would you revert? This has always been an issue for printk().

> Well, it would be nice to document the lock dependency in
> Documentation/core-api/printk-formats.rst

Yes. If any locking is involved at all, such specifiers should be
documented as not safe in NMI context or within printk_cpu_sync
blocks. Also, it should be checked if all such locks are
raw_spinlock_t. If any other lock type is used, it probably is already
generating a lockdep splat since printk() formats records with local
interrupts off.

Perhaps we should create a kunit that calls printk() for each of the
supported specifiers and see if any lockdep splats appear.

John

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ