From: Kees Cook <kees@kernel.org>
To: Andrei Vagin <avagin@gmail.com>
Cc: Andrew Morton <akpm@linux-foundation.org>,
Cyrill Gorcunov <gorcunov@gmail.com>,
Mike Rapoport <rppt@kernel.org>,
Alexander Mikhalitsyn <alexander@mihalicyn.com>,
linux-kernel@vger.kernel.org, linux-fsdevel@vger.kernel.org,
linux-mm@kvack.org, criu@lists.linux.dev,
Chen Ridong <chenridong@huawei.com>,
Christian Brauner <brauner@kernel.org>,
David Hildenbrand <david@kernel.org>,
Eric Biederman <ebiederm@xmission.com>,
Lorenzo Stoakes <lorenzo.stoakes@oracle.com>,
Michal Koutny <mkoutny@suse.com>,
Andrei Vagin <avagin@google.com>
Subject: Re: [PATCH 0/4 v4] exec: inherit HWCAPs from the parent process
Date: Mon, 23 Feb 2026 14:28:59 -0800 [thread overview]
Message-ID: <202602231428.CAF9D1B913@keescook> (raw)
In-Reply-To: <CANaxB-wNJWhyM7JUKT3y0Wp73=+8XZRnSkdudxqDwEo2FaJpwQ@mail.gmail.com>
On Mon, Feb 23, 2026 at 10:29:00AM -0800, Andrei Vagin wrote:
> On Tue, Feb 17, 2026 at 10:01 AM Andrei Vagin <avagin@google.com> wrote:
> >
> > This patch series introduces a mechanism to inherit hardware capabilities
> > (AT_HWCAP, AT_HWCAP2, etc.) from a parent process when they have been
> > modified via prctl.
> >
> > To support C/R operations (snapshots, live migration) in heterogeneous
> > clusters, we must ensure that processes utilize CPU features available
> > on all potential target nodes. To solve this, we need to advertise a
> > common feature set across the cluster.
> >
> > Initially, a cgroup-based approach was considered, but it was decided
> > that inheriting HWCAPs from a parent process that has set its own
> > auxiliary vector via prctl is a simpler and more flexible solution.
> >
> > This implementation adds a new mm flag MMF_USER_HWCAP, which is set when the
> > auxiliary vector is modified via prctl(PR_SET_MM_AUXV). When execve() is
> > called, if the current process has MMF_USER_HWCAP set, the HWCAP values are
> > extracted from the current auxiliary vector and inherited by the new process.
> >
> > The first patch fixes AUXV size calculation for ELF_HWCAP3 and ELF_HWCAP4
> > in binfmt_elf_fdpic and updates AT_VECTOR_SIZE_BASE.
> >
> > The second patch implements the core inheritance logic in execve().
> >
> > The third patch adds a selftest to verify that HWCAPs are correctly
> > inherited across execve().
> >
> > v4: minor fixes based on feedback from the previous version.
>
> Kees,
>
> I think it is ready to be merged. Let me know if you have any other
> comments/concerns/questions.
Yeah, I think it's looking good. I'll land this in for-next/execve after
rc2 (a week from now).
Thanks!
--
Kees Cook
next prev parent reply other threads:[~2026-02-23 22:28 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-02-17 18:01 [PATCH 0/4 v4] exec: inherit HWCAPs from the parent process Andrei Vagin
2026-02-17 18:01 ` [PATCH 1/4] binfmt_elf_fdpic: fix AUXV size calculation for ELF_HWCAP3 and ELF_HWCAP4 Andrei Vagin
2026-02-17 18:01 ` [PATCH 2/4] exec: inherit HWCAPs from the parent process Andrei Vagin
2026-03-20 9:15 ` Marek Szyprowski
2026-03-20 18:19 ` Kees Cook
2026-03-20 20:10 ` Andrei Vagin
2026-03-23 18:19 ` Andrei Vagin
2026-02-17 18:01 ` [PATCH 3/4] mm: synchronize saved_auxv access with arg_lock Andrei Vagin
2026-02-17 18:01 ` [PATCH 4/4] selftests/exec: add test for HWCAP inheritance Andrei Vagin
2026-02-23 18:29 ` [PATCH 0/4 v4] exec: inherit HWCAPs from the parent process Andrei Vagin
2026-02-23 22:28 ` Kees Cook [this message]
2026-03-10 18:17 ` Andrei Vagin
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=202602231428.CAF9D1B913@keescook \
--to=kees@kernel.org \
--cc=akpm@linux-foundation.org \
--cc=alexander@mihalicyn.com \
--cc=avagin@gmail.com \
--cc=avagin@google.com \
--cc=brauner@kernel.org \
--cc=chenridong@huawei.com \
--cc=criu@lists.linux.dev \
--cc=david@kernel.org \
--cc=ebiederm@xmission.com \
--cc=gorcunov@gmail.com \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=lorenzo.stoakes@oracle.com \
--cc=mkoutny@suse.com \
--cc=rppt@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.