Re: [PATCH 1/1] scripts: kstack_erase: use relative stackleak plugin path
From: Nicolas Schier
Date: Fri Jul 24 2026 - 16:19:18 EST
On Wed, Jul 22, 2026 at 07:00:43PM +0000, Jaihind Yadav wrote:
>
> Hi Nicolas Schier,
>
> Thanks for the suggestion. I tested the proposed change:
>
> -kstack-erase-cflags-y += -fplugin=$(objtree)/scripts/gcc-plugins/stackleak_plugin.so
> +kstack-erase-cflags-y += -fplugin=scripts/gcc-plugins/stackleak_plugin.so
>
>
> Unfortunately, it does not work for the out-of-tree module builds in
> my environment.
Thanks for checking; and yes I forgot out-of-tree modules. When
building them, Kbuild changes to their respective output directory so my
suggestion had to fail for oot kmods.
[...]
> Given that the proposed relative path breaks out-of-tree module
> builds, could you please take a look at the patch I posted? If the
> approach looks reasonable, I would appreciate your review and
> consideration for merging it.
I am not sure, if we can take your path, as 'readlink --relative-to' is
only available in coreutils/Linux but coreutils are not a documented
requirement for Linux builds (cp. Documentation/process/changes.rst),
thus this would probably kill Linux builds on BSDs and Darwin/MacOS.
But let me think about that a few days; and perhaps someone else comes
up with an idea.
Kind regards,
Nicolas