[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <8434i1z53d.fsf@jogness.linutronix.de>
Date: Thu, 02 Jan 2025 15:08:30 +0106
From: John Ogness <john.ogness@...utronix.de>
To: Petr Mladek <pmladek@...e.com>, Rob Herring <robh@...nel.org>
Cc: 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 2025-01-02, Petr Mladek <pmladek@...e.com> wrote:
> On Mon 2024-12-30 14:26:43, Rob Herring wrote:
>> On Thu, Dec 19, 2024 at 08:17:21PM +0106, John Ogness wrote:
>> > 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.
>>
>> For the folks that don't read documentation, should we bail out on
>> in_nmi() for these as well?
>
> I like this idea.
Perhaps also include a check using the upcoming
is_printk_cpu_sync_owner() [0] as well.
John Ogness
[0] https://git.kernel.org/pub/scm/linux/kernel/git/printk/linux.git/commit/?h=for-6.14-cpu_sync-fixup&id=0161e2d6950fe66cf6ac1c10d945bae971f33667
Powered by blists - more mailing lists