All of lore.kernel.org
 help / color / mirror / Atom feed
From: Vladimir Isaev <vladimir.isaev@syntacore.com>
To: Alexandre Ghiti <alexghiti@rivosinc.com>,
	Roman Artemev <roman.artemev@syntacore.com>,
	Guo Ren <guoren@kernel.org>,
	Paul Walmsley <paul.walmsley@sifive.com>,
	Palmer Dabbelt <palmer@dabbelt.com>,
	Albert Ou <aou@eecs.berkeley.edu>,
	<linux-riscv@lists.infradead.org>, <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] riscv: Check that vdso does not contain any dynamic relocations
Date: Thu, 28 Mar 2024 10:32:06 +0300	[thread overview]
Message-ID: <352f8101-01c3-45b9-9d53-ef0021cc6f46@syntacore.com> (raw)
In-Reply-To: <20240326113831.283025-1-alexghiti@rivosinc.com>

Hi Alexandre,

26.03.2024 14:38, Alexandre Ghiti wrote:
> 
> Like other architectures, use the common cmd_vdso_check to make sure of
> that.
> 
> Signed-off-by: Alexandre Ghiti <alexghiti@rivosinc.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 9b517fe1b8a8..dd4877f25928 100644
> --- a/arch/riscv/kernel/vdso/Makefile
> +++ b/arch/riscv/kernel/vdso/Makefile
> @@ -49,7 +49,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
> 
> @@ -69,7 +69,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 $@.tmp && \
> +quiet_cmd_vdsold_and_check = VDSOLD  $@
> +      cmd_vdsold_and_check = $(LD) $(ld_flags) -T $(filter-out FORCE,$^) -o $@.tmp && \
>                     $(OBJCOPY) $(patsubst %, -G __vdso_%, $(vdso-syms)) $@.tmp $@ && \
> -                   rm $@.tmp
> +                   rm $@.tmp && \
> +                   $(cmd_vdso_check)

For some reason I thought that this check is in the common vdso code and just missed hwprobe relocation...

Tested-by: Vladimir Isaev <vladimir.isaev@syntacore.com>

> --
> 2.39.2
> 

Thank you,
Vladimir Isaev

_______________________________________________
linux-riscv mailing list
linux-riscv@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-riscv

WARNING: multiple messages have this Message-ID (diff)
From: Vladimir Isaev <vladimir.isaev@syntacore.com>
To: Alexandre Ghiti <alexghiti@rivosinc.com>,
	Roman Artemev <roman.artemev@syntacore.com>,
	Guo Ren <guoren@kernel.org>,
	Paul Walmsley <paul.walmsley@sifive.com>,
	Palmer Dabbelt <palmer@dabbelt.com>,
	Albert Ou <aou@eecs.berkeley.edu>,
	<linux-riscv@lists.infradead.org>, <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] riscv: Check that vdso does not contain any dynamic relocations
Date: Thu, 28 Mar 2024 10:32:06 +0300	[thread overview]
Message-ID: <352f8101-01c3-45b9-9d53-ef0021cc6f46@syntacore.com> (raw)
In-Reply-To: <20240326113831.283025-1-alexghiti@rivosinc.com>

Hi Alexandre,

26.03.2024 14:38, Alexandre Ghiti wrote:
> 
> Like other architectures, use the common cmd_vdso_check to make sure of
> that.
> 
> Signed-off-by: Alexandre Ghiti <alexghiti@rivosinc.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 9b517fe1b8a8..dd4877f25928 100644
> --- a/arch/riscv/kernel/vdso/Makefile
> +++ b/arch/riscv/kernel/vdso/Makefile
> @@ -49,7 +49,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
> 
> @@ -69,7 +69,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 $@.tmp && \
> +quiet_cmd_vdsold_and_check = VDSOLD  $@
> +      cmd_vdsold_and_check = $(LD) $(ld_flags) -T $(filter-out FORCE,$^) -o $@.tmp && \
>                     $(OBJCOPY) $(patsubst %, -G __vdso_%, $(vdso-syms)) $@.tmp $@ && \
> -                   rm $@.tmp
> +                   rm $@.tmp && \
> +                   $(cmd_vdso_check)

For some reason I thought that this check is in the common vdso code and just missed hwprobe relocation...

Tested-by: Vladimir Isaev <vladimir.isaev@syntacore.com>

> --
> 2.39.2
> 

Thank you,
Vladimir Isaev

  reply	other threads:[~2024-03-28  7:32 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-03-26 11:38 [PATCH] riscv: Check that vdso does not contain any dynamic relocations Alexandre Ghiti
2024-03-26 11:38 ` Alexandre Ghiti
2024-03-28  7:32 ` Vladimir Isaev [this message]
2024-03-28  7:32   ` Vladimir Isaev

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=352f8101-01c3-45b9-9d53-ef0021cc6f46@syntacore.com \
    --to=vladimir.isaev@syntacore.com \
    --cc=alexghiti@rivosinc.com \
    --cc=aou@eecs.berkeley.edu \
    --cc=guoren@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-riscv@lists.infradead.org \
    --cc=palmer@dabbelt.com \
    --cc=paul.walmsley@sifive.com \
    --cc=roman.artemev@syntacore.com \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.