From: Peter Zijlstra <peterz@infradead.org>
To: Kees Cook <keescook@chromium.org>
Cc: Josh Triplett <josh@joshtriplett.org>,
Eric Biederman <ebiederm@xmission.com>,
Alexander Viro <viro@zeniv.linux.org.uk>,
linux-mm@kvack.org, linux-fsdevel@vger.kernel.org,
linux-kernel@vger.kernel.org, Mel Gorman <mgorman@suse.de>
Subject: Re: [PATCH] fs/exec.c: Add fast path for ENOENT on PATH search before allocating mm
Date: Mon, 19 Sep 2022 16:34:40 +0200 [thread overview]
Message-ID: <Yyh+AFYJJwvx3iun@hirez.programming.kicks-ass.net> (raw)
In-Reply-To: <202209161637.9EDAF6B18@keescook>
On Fri, Sep 16, 2022 at 05:11:18PM -0700, Kees Cook wrote:
> The interaction with sched_exec() should be no worse (the file is opened
> before it in either case), but in reading that function, it talks about
> taking the opportunity to move the process to another CPU (IIUC) since,
> paraphrasing, "it is at its lowest memory/cache size." But I wonder if
> there is an existing accidental pessimistic result in that the process
> stack has already been allocated. I am only passingly familiar with how
> tasks get moved around under NUMA -- is the scheduler going to move
> this process onto a different NUMA node and now it will be forced to
> have the userspace process stack on one node and the program text and
> heap on another? Or is that totally lost in the noise?
Probably noise; text is going to be a crap-shoot anyway due to DSOs only
having a single copy in the page-cache. And the stack will be relatively
small at this point and also, numa-balance can migrate those pages
around if they matter.
> More specifically, I was wondering if processes would benefit from having
> sched_exec() moved before the mm creation?
Can't hurt I think.
next prev parent reply other threads:[~2022-09-19 14:34 UTC|newest]
Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-09-16 13:41 Josh Triplett
2022-09-16 14:38 ` Kees Cook
2022-09-16 20:13 ` Josh Triplett
2022-09-17 0:11 ` Kees Cook
2022-09-17 0:50 ` Josh Triplett
2022-09-19 20:02 ` Kees Cook
2022-10-01 16:01 ` Josh Triplett
2022-09-19 14:34 ` Peter Zijlstra [this message]
2022-09-22 7:27 ` [fs/exec.c] 0a276ae2d2: BUG:workqueue_lockup-pool kernel test robot
2023-11-07 20:30 ` [PATCH] fs/exec.c: Add fast path for ENOENT on PATH search before allocating mm Kees Cook
2023-11-07 20:51 ` Mateusz Guzik
2023-11-07 21:23 ` Mateusz Guzik
2023-11-07 22:50 ` Kees Cook
2023-11-07 23:08 ` Mateusz Guzik
2023-11-07 23:39 ` Kees Cook
2023-11-08 0:03 ` Mateusz Guzik
2023-11-08 19:25 ` Kees Cook
2023-11-08 19:31 ` Kees Cook
2023-11-08 19:35 ` Mateusz Guzik
2023-11-09 0:17 ` Eric W. Biederman
2023-11-09 12:21 ` Mateusz Guzik
2023-11-10 5:26 ` Eric W. Biederman
2023-11-07 20:37 ` Kees Cook
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=Yyh+AFYJJwvx3iun@hirez.programming.kicks-ass.net \
--to=peterz@infradead.org \
--cc=ebiederm@xmission.com \
--cc=josh@joshtriplett.org \
--cc=keescook@chromium.org \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=mgorman@suse.de \
--cc=viro@zeniv.linux.org.uk \
/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