[PATCH] riscv: cfi: add generated vdso files to make clean

Anirudh Srinivasan posted 1 patch 5 days, 9 hours ago
arch/riscv/kernel/vdso_cfi/Makefile | 2 ++
1 file changed, 2 insertions(+)
[PATCH] riscv: cfi: add generated vdso files to make clean
Posted by Anirudh Srinivasan 5 days, 9 hours ago
The vdso files that are copied over from arch/riscv/kernel/vdso do not
get cleaned up when make clean is run. Add a clean-files target to the
makefile so that these files get cleaned up properly.

Signed-off-by: Anirudh Srinivasan <asrinivasan@oss.tenstorrent.com>
---
 arch/riscv/kernel/vdso_cfi/Makefile | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/arch/riscv/kernel/vdso_cfi/Makefile b/arch/riscv/kernel/vdso_cfi/Makefile
index 10292498b7657..906023fb5c27c 100644
--- a/arch/riscv/kernel/vdso_cfi/Makefile
+++ b/arch/riscv/kernel/vdso_cfi/Makefile
@@ -20,6 +20,8 @@ $(vdso_S_objects): $(obj)/%.S: $(src)/%.S
 $(vdso_c_objects): $(obj)/%.c: $(src)/%.c
 	$(Q)cp $< $@
 
+clean-files := $(notdir $(vdso_c_sources)) $(notdir $(vdso_S_sources))
+
 # Include the main VDSO Makefile which contains all the build rules and sources
 # The VDSO_CFI_BUILD variable will be passed to it to enable CFI compilation
 include $(src)/Makefile

---
base-commit: 254f49634ee16a731174d2ae34bc50bd5f45e731
change-id: 20260516-vdso_cfi_makefile-d59006f9d00d

Best regards,
--  
Anirudh Srinivasan <asrinivasan@oss.tenstorrent.com>
Re: [PATCH] riscv: cfi: add generated vdso files to make clean
Posted by Ron Economos 5 days, 6 hours ago
On 5/19/26 08:55, Anirudh Srinivasan wrote:
> The vdso files that are copied over from arch/riscv/kernel/vdso do not
> get cleaned up when make clean is run. Add a clean-files target to the
> makefile so that these files get cleaned up properly.
>
> Signed-off-by: Anirudh Srinivasan <asrinivasan@oss.tenstorrent.com>
> ---
>   arch/riscv/kernel/vdso_cfi/Makefile | 2 ++
>   1 file changed, 2 insertions(+)
>
> diff --git a/arch/riscv/kernel/vdso_cfi/Makefile b/arch/riscv/kernel/vdso_cfi/Makefile
> index 10292498b7657..906023fb5c27c 100644
> --- a/arch/riscv/kernel/vdso_cfi/Makefile
> +++ b/arch/riscv/kernel/vdso_cfi/Makefile
> @@ -20,6 +20,8 @@ $(vdso_S_objects): $(obj)/%.S: $(src)/%.S
>   $(vdso_c_objects): $(obj)/%.c: $(src)/%.c
>   	$(Q)cp $< $@
>   
> +clean-files := $(notdir $(vdso_c_sources)) $(notdir $(vdso_S_sources))
> +
>   # Include the main VDSO Makefile which contains all the build rules and sources
>   # The VDSO_CFI_BUILD variable will be passed to it to enable CFI compilation
>   include $(src)/Makefile
>
> ---
> base-commit: 254f49634ee16a731174d2ae34bc50bd5f45e731
> change-id: 20260516-vdso_cfi_makefile-d59006f9d00d
>
> Best regards,
> --
> Anirudh Srinivasan <asrinivasan@oss.tenstorrent.com>
>
>
> _______________________________________________
> linux-riscv mailing list
> linux-riscv@lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/linux-riscv

Already merged in Linux v7.1-rc1 commit 382cf7b75b05ee28b9ac2a27b6b8c7c4eb8910dc
Re: [PATCH] riscv: cfi: add generated vdso files to make clean
Posted by Anirudh Srinivasan 5 days, 8 hours ago
On Tue, May 19, 2026 at 10:56 AM Anirudh Srinivasan
<asrinivasan@oss.tenstorrent.com> wrote:
>
> The vdso files that are copied over from arch/riscv/kernel/vdso do not
> get cleaned up when make clean is run. Add a clean-files target to the
> makefile so that these files get cleaned up properly.
>
> Signed-off-by: Anirudh Srinivasan <asrinivasan@oss.tenstorrent.com>
> ---
>  arch/riscv/kernel/vdso_cfi/Makefile | 2 ++
>  1 file changed, 2 insertions(+)
>
> diff --git a/arch/riscv/kernel/vdso_cfi/Makefile b/arch/riscv/kernel/vdso_cfi/Makefile
> index 10292498b7657..906023fb5c27c 100644
> --- a/arch/riscv/kernel/vdso_cfi/Makefile
> +++ b/arch/riscv/kernel/vdso_cfi/Makefile
> @@ -20,6 +20,8 @@ $(vdso_S_objects): $(obj)/%.S: $(src)/%.S
>  $(vdso_c_objects): $(obj)/%.c: $(src)/%.c
>         $(Q)cp $< $@
>
> +clean-files := $(notdir $(vdso_c_sources)) $(notdir $(vdso_S_sources))
> +
>  # Include the main VDSO Makefile which contains all the build rules and sources
>  # The VDSO_CFI_BUILD variable will be passed to it to enable CFI compilation
>  include $(src)/Makefile
>
> ---
> base-commit: 254f49634ee16a731174d2ae34bc50bd5f45e731
> change-id: 20260516-vdso_cfi_makefile-d59006f9d00d

Apologies, seems like a fix for this already landed in 7.1-rc1. I was
building off a tree from 7.0 and encountered this issue.

>
> Best regards,
> --
> Anirudh Srinivasan <asrinivasan@oss.tenstorrent.com>
>