[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAJF2gTRPk_1b8gLQn4cmNT62Cdo2sKpXHB7vK2wDo74-NgZSPg@mail.gmail.com>
Date: Wed, 10 Jul 2024 09:24:30 +0800
From: Guo Ren <guoren@...nel.org>
To: Alexandre Ghiti <alexghiti@...osinc.com>
Cc: Vladimir Isaev <vladimir.isaev@...tacore.com>,
Roman Artemev <roman.artemev@...tacore.com>, Paul Walmsley <paul.walmsley@...ive.com>,
Palmer Dabbelt <palmer@...belt.com>, Albert Ou <aou@...s.berkeley.edu>,
linux-riscv@...ts.infradead.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH v2 2/2] riscv: Check that vdso does not contain any
dynamic relocations
On Fri, Jul 5, 2024 at 2:11 PM Alexandre Ghiti <alexghiti@...osinc.com> wrote:
>
> Like other architectures, use the common cmd_vdso_check to make sure of
> that.
>
> Signed-off-by: Alexandre Ghiti <alexghiti@...osinc.com>
> ---
> arch/riscv/kernel/vdso/Makefile | 9 +++++----
> 1 file changed, 5 insertions(+), 4 deletions(-)
>
> diff --git a/arch/riscv/kernel/vdso/Makefile b/arch/riscv/kernel/vdso/Makefile
> index c7e40bf36371..b5c73084e554 100644
> --- a/arch/riscv/kernel/vdso/Makefile
> +++ b/arch/riscv/kernel/vdso/Makefile
> @@ -45,7 +45,7 @@ $(obj)/vdso.o: $(obj)/vdso.so
>
> # link rule for the .so file, .lds has to be first
> $(obj)/vdso.so.dbg: $(obj)/vdso.lds $(obj-vdso) FORCE
> - $(call if_changed,vdsold)
> + $(call if_changed,vdsold_and_check)
> LDFLAGS_vdso.so.dbg = -shared -S -soname=linux-vdso.so.1 \
> --build-id=sha1 --hash-style=both --eh-frame-hdr
>
> @@ -65,7 +65,8 @@ include/generated/vdso-offsets.h: $(obj)/vdso.so.dbg FORCE
> # actual build commands
> # The DSO images are built using a special linker script
> # Make sure only to export the intended __vdso_xxx symbol offsets.
> -quiet_cmd_vdsold = VDSOLD $@
> - cmd_vdsold = $(LD) $(ld_flags) -T $(filter-out FORCE,$^) -o $@...p && \
> +quiet_cmd_vdsold_and_check = VDSOLD $@
> + cmd_vdsold_and_check = $(LD) $(ld_flags) -T $(filter-out FORCE,$^) -o $@...p && \
> $(OBJCOPY) $(patsubst %, -G __vdso_%, $(vdso-syms)) $@...p $@ && \
> - rm $@...p
> + rm $@...p && \
> + $(cmd_vdso_check)
This check is helpful for future development on riscv vdso. LGTM!
Reviewed-by: Guo Ren <guoren@...nel.org>
> --
> 2.39.2
>
--
Best Regards
Guo Ren
Powered by blists - more mailing lists