lkml.org 
[lkml]   [2024]   [Nov]   [27]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Date
SubjectRe: [GIT PULL] execve updates for v6.13-rc1 (take 2)
On Wed, 27 Nov 2024 at 16:53, Kees Cook <kees@kernel.org> wrote:
>
> On a related note, what do you think of using execveat's "pathname"
> argument as "comm" if AT_EMPTY_PATH is set? That'll give process
> launchers control over comm (which is what they want), and we can keep
> the dentry name fallback as proposed too?

That's not actually how AT_EMPTY_PATH works.

Yes, it's how AT_EMPTY_PATH *should* work, but despite the name,
AT_EMPTYH_PATH does not mean "path is empty".

It means "path *may* be empty - but if path isn't empty, it's a regular path".

IOW, what is going on is that POSIX required that an empty path be an
error. And AT_EMPTY_PATH is basically a "don't error out on an empty
path" flag, not a "path *is* empty" flag.

So if pathname exists and isn't empty, AT_EMPTY_PATH does nothing.

Linus

\
 
 \ /
  Last update: 2024-11-28 03:00    [from the cache]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and my Meterkast|Read the blog