From: Oleg Nesterov <oleg@redhat.com>
To: Dave Hansen <dave.hansen@intel.com>
Cc: Borislav Petkov <bp@alien8.de>,
Dave Hansen <dave.hansen@linux.intel.com>,
Ingo Molnar <mingo@kernel.org>, "H. Peter Anvin" <hpa@zytor.com>,
Peter Zijlstra <peterz@infradead.org>,
Thomas Gleixner <tglx@linutronix.de>,
Jens Axboe <axboe@kernel.dk>,
x86@kernel.org, linux-kernel@vger.kernel.org
Subject: Re: PF_USER_WORKERs and shadow stack
Date: Wed, 13 Aug 2025 21:20:26 +0200 [thread overview]
Message-ID: <20250813192025.GB26754@redhat.com> (raw)
In-Reply-To: <20250813191441.GA26754@redhat.com>
On 08/13, Oleg Nesterov wrote:
>
> On 08/13, Dave Hansen wrote:
> >
> > On 8/13/25 09:28, Oleg Nesterov wrote:
> > > But it seems that if a features_enabled(ARCH_SHSTK_SHSTK) thread creates a
> > > PF_USER_WORKER thread, shstk_alloc_thread_stack() will allocate the shadow
> > > stack for no reason.
> >
> > Is this costing us anything other than some CPU cycles and 160 bytes of
> > memory for a VMA?
>
> Well, I guess no, but I do have another reason for "something-like-this" cleanup.
> I am working on other changes which should eliminate x86_task_fpu(PF_USER_WORKER).
> Hopefully I'll send the patches tomorrow. To remind, see
> https://lore.kernel.org/all/20250812125700.GA11290@redhat.com/
>
> So I'd like to ensure that ssp_active() can't return T in ssp_get().
Sorry for noise, in case I wasn't clear...
I meant, can't return T if target->flags & PF_USER_WORKER
Oleg.
> And... Dave, I understand that it is very easy to criticize someone else's code ;)
> But - if I am right - the current logic doesn't look clean to me. Regardless.
>
> Oleg.
next prev parent reply other threads:[~2025-08-13 19:21 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-08-13 16:28 Oleg Nesterov
2025-08-13 16:41 ` Dave Hansen
2025-08-13 19:14 ` Oleg Nesterov
2025-08-13 19:20 ` Oleg Nesterov [this message]
2025-08-13 19:21 ` Dave Hansen
2025-08-14 10:12 ` Oleg Nesterov
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=20250813192025.GB26754@redhat.com \
--to=oleg@redhat.com \
--cc=axboe@kernel.dk \
--cc=bp@alien8.de \
--cc=dave.hansen@intel.com \
--cc=dave.hansen@linux.intel.com \
--cc=hpa@zytor.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@kernel.org \
--cc=peterz@infradead.org \
--cc=tglx@linutronix.de \
--cc=x86@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
all inboxes | Powered by JetHome®