From: Petr Mladek <pmladek@suse.com>
To: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
Cc: "Thomas Weißschuh" <thomas.weissschuh@linutronix.de>,
"Andrew Morton" <akpm@linux-foundation.org>,
"Steven Rostedt" <rostedt@goodmis.org>,
"Andy Shevchenko" <andriy.shevchenko@linux.intel.com>,
"Rasmus Villemoes" <linux@rasmusvillemoes.dk>,
"Sergey Senozhatsky" <senozhatsky@chromium.org>,
"Peter Zijlstra" <peterz@infradead.org>,
"Ingo Molnar" <mingo@redhat.com>, "Will Deacon" <will@kernel.org>,
"Boqun Feng" <boqun@kernel.org>,
"Waiman Long" <longman@redhat.com>,
"Clark Williams" <clrkwllms@kernel.org>,
"Kees Cook" <kees@kernel.org>,
linux-kernel@vger.kernel.org, linux-rt-devel@lists.linux.dev
Subject: Re: [PATCH v4 5/5] lib/vsprintf: Validate spinlock context during restricted pointer formatting
Date: Mon, 29 Jun 2026 14:06:17 +0200 [thread overview]
Message-ID: <akJfuer6-_Kd_HCY@pathway.suse.cz> (raw)
In-Reply-To: <20260626170658.0bqzsB-1@linutronix.de>
On Fri 2026-06-26 19:06:58, Sebastian Andrzej Siewior wrote:
> On 2026-06-26 18:06:09 [+0200], Petr Mladek wrote:
> > > Interesting, does the spin_lock_irqsave() even allow sleeping under RT?
> > >
> > > I mean, does spin_lock_irqsave() violate the raw_spin_lock
> > > vs. spin_lock nesting rules?
> >
> > Ignore the silly question, please. Sure, even spin_lock_irqsafe()
> > is a sleeping lock in RT.
> >
> > That said, I am not sure how to effectively pretend the right
> > context to lockdep. It looks a bit ugly to disable interrupts
> > around all the code which is guarded only by a fake lock_map.
>
> That splat is from !RT and here it wouldn't happen if interrupts were
> disabled.
> On RT that interrupt (softirq) would not interrupt as such. So it is not
> possible due to how softirqs are processed.
>
> My idea is to remove that thing so we don't have to annotate it.
> The reason behind it: There is no added benefit from my point of view.
> I can't think of reason to return real kernel pointers via proc/ sysfs
> to the user which depend on a security policy. The %p will return a
> value which can be compared against other values and check if it is the
> same or not. The root user or dev can either disable this hashing
> behaviour or use %px while debugging. I haven't figured a reason why
> this is important.
>
> If you have something, I am all yours. If not, I poke networking next
> week and try to remove this entirely.
I am all for removing the restricted pointers stuff. IMHO, it has been
obsoleted by the generic hashing but it has never been officially
mentioned anywhere.
I hope that networking guys would take it.
Best Regards,
Petr
prev parent reply other threads:[~2026-06-29 12:06 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-06-08 14:21 [PATCH v4 0/5] " Thomas Weißschuh
2026-06-08 14:21 ` [PATCH v4 1/5] locking/lockdep: Add a helper to validate the locking context without a lock Thomas Weißschuh
2026-06-08 14:21 ` [PATCH v4 2/5] locking/lockdep: Add a guard for lock_map_acquire() Thomas Weißschuh
2026-06-08 14:21 ` [PATCH v4 3/5] lib/vsprintf: Use in_task() for restricted pointer context check Thomas Weißschuh
2026-06-08 14:21 ` [PATCH v4 4/5] lib/vsprintf: Always check interrupt context restrictions Thomas Weißschuh
2026-06-08 14:21 ` [PATCH v4 5/5] lib/vsprintf: Validate spinlock context during restricted pointer formatting Thomas Weißschuh
2026-06-11 10:09 ` Thomas Weißschuh
2026-06-16 9:14 ` Petr Mladek
2026-06-25 14:51 ` Sebastian Andrzej Siewior
2026-06-26 15:53 ` Petr Mladek
2026-06-26 16:06 ` Petr Mladek
2026-06-26 17:06 ` Sebastian Andrzej Siewior
2026-06-29 12:06 ` Petr Mladek [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=akJfuer6-_Kd_HCY@pathway.suse.cz \
--to=pmladek@suse.com \
--cc=akpm@linux-foundation.org \
--cc=andriy.shevchenko@linux.intel.com \
--cc=bigeasy@linutronix.de \
--cc=boqun@kernel.org \
--cc=clrkwllms@kernel.org \
--cc=kees@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-rt-devel@lists.linux.dev \
--cc=linux@rasmusvillemoes.dk \
--cc=longman@redhat.com \
--cc=mingo@redhat.com \
--cc=peterz@infradead.org \
--cc=rostedt@goodmis.org \
--cc=senozhatsky@chromium.org \
--cc=thomas.weissschuh@linutronix.de \
--cc=will@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Powered by JetHome