From: Rik van Riel <riel@surriel.com>
To: Brian Witte <brianwitte@mailfence.com>, Kees Cook <kees@kernel.org>
Cc: Alexander Viro <viro@zeniv.linux.org.uk>,
Christian Brauner <brauner@kernel.org>, Jan Kara <jack@suse.cz>,
Lorenzo Stoakes <ljs@kernel.org>, Jann Horn <jannh@google.com>,
Helge Deller <deller@gmx.de>,
Justin Stitt <justinstitt@google.com>,
Daniel Micay <danielmicay@gmail.com>,
Shuah Khan <shuah@kernel.org>,
linux-fsdevel@vger.kernel.org, linux-mm@kvack.org,
linux-hardening@vger.kernel.org,
linux-kselftest@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH 2/2] selftests/exec: test the argument block's in-page offset
Date: Tue, 01 Dec 2026 20:48:50 -0500 [thread overview]
Message-ID: <04f31f21e9fe537a1c0ef9c637186fec803b2b2c.camel@surriel.com> (raw)
In-Reply-To: <20261023015345.1594514-3-brianwitte@mailfence.com>
On Fri, 2026-10-23 at 03:54 +0200, Brian Witte wrote:
> Exec a helper, argblock-report, 64 times per case. Each case checks
> that
> the in-page offset of argv[0] varies exactly when the stack top
> chosen
> by the ELF loader does:
> - under ADDR_NO_RANDOMIZE: fixed;
> - by default: random;
> - a set-user-ID copy under ADDR_NO_RANDOMIZE: random;
> - that copy on a nosuid mount, under no_new_privs, or in a new user
> namespace where its owner has no mapping: fixed.
>
> The tests use the kselftest harness. The fixture keeps the copy in a
> private temporary directory and removes it on teardown. The copy is
> owned by the caller, so no privilege is needed.
Given that the kernel does not seem to have any
selftest for address randomization yet, I think
it may make more sense to replace this very
specific test with something that tests more of
address randomization.
The execed helper could also test that its
executable got mapped at randomized offsets,
and for the argument block we could check
that both the page, and the in-page offset
are randomized.
Can you re-send the series with this test
replaced with a generic address randomization
test?
Also, if someone runs all tests on a kernel
without address randomization enabled, should
the test return an error, or should it just
skip?
--
All Rights Reversed.
prev parent reply other threads:[~2026-12-02 1:49 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-10-23 1:54 [PATCH 0/2] exec: randomize " Brian Witte
2026-10-23 1:54 ` [PATCH 1/2] exec: randomize the argument block's offset within its page Brian Witte
2026-12-02 1:42 ` Rik van Riel
2026-10-23 1:54 ` [PATCH 2/2] selftests/exec: test the argument block's in-page offset Brian Witte
2026-12-02 1:48 ` Rik van Riel [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=04f31f21e9fe537a1c0ef9c637186fec803b2b2c.camel@surriel.com \
--to=riel@surriel.com \
--cc=brauner@kernel.org \
--cc=brianwitte@mailfence.com \
--cc=danielmicay@gmail.com \
--cc=deller@gmx.de \
--cc=jack@suse.cz \
--cc=jannh@google.com \
--cc=justinstitt@google.com \
--cc=kees@kernel.org \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-hardening@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-kselftest@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=ljs@kernel.org \
--cc=shuah@kernel.org \
--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
all inboxes | Powered by JetHome®