Re: [PATCH] selftests: do not preserve ownership when installing files with rsync
From: Thomas Gleixner
Date: Mon Jul 20 2026 - 15:01:19 EST
On Wed, Jul 15 2026 at 12:51, Florian Schmaus via wrote:
> From: Florian Schmaus <flo@xxxxxxxxxxxx>
>
> When kselftests are built and installed using "make install" or
> integrated into other build systems (such as Yocto's "devtool
> modify"), the source tree might be owned by a non-root developer user.
>
> Because the installation scripts use "rsync -a", which implies -o and
> -g, the installed test binaries and scripts are explicitly assigned
> the UID/GID of the source tree owner instead of the user running the
> install command. This results in UID leaks into the root filesystem.
>
> Fix this by explicitly adding --no-owner --no-group to all rsync
> invocations across the selftests Makefiles so that the installed files
> are owned by the installing user (typically root).
>
> Signed-off-by: Florian Schmaus <flo@xxxxxxxxxxxx>
Acked-by: Thomas Gleixner <tglx@xxxxxxxxxx>