All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v2] linux-user: Add AT_EXECFN auxval
@ 2020-03-02 19:31 Lirong Yuan
  2020-03-03  7:50 ` Laurent Vivier
  2020-03-03  9:40 ` Laurent Vivier
  0 siblings, 2 replies; 4+ messages in thread
From: Lirong Yuan @ 2020-03-02 19:31 UTC (permalink / raw)
  To: qemu-devel, laurent; +Cc: qemu-trivial, scw, jkz, Lirong Yuan, Riku Voipio

This change adds the support for AT_EXECFN auxval.

Signed-off-by: Lirong Yuan <yuanzi@google.com>
---
Changelog since v1:
- remove implementation for AT_EXECFD auxval.

 linux-user/elfload.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/linux-user/elfload.c b/linux-user/elfload.c
index db748c5877..8198be0446 100644
--- a/linux-user/elfload.c
+++ b/linux-user/elfload.c
@@ -1573,7 +1573,7 @@ struct exec
                                  ~(abi_ulong)(TARGET_ELF_EXEC_PAGESIZE-1))
 #define TARGET_ELF_PAGEOFFSET(_v) ((_v) & (TARGET_ELF_EXEC_PAGESIZE-1))
 
-#define DLINFO_ITEMS 15
+#define DLINFO_ITEMS 16
 
 static inline void memcpy_fromfs(void * to, const void * from, unsigned long n)
 {
@@ -2037,6 +2037,7 @@ static abi_ulong create_elf_tables(abi_ulong p, int argc, int envc,
     NEW_AUX_ENT(AT_CLKTCK, (abi_ulong) sysconf(_SC_CLK_TCK));
     NEW_AUX_ENT(AT_RANDOM, (abi_ulong) u_rand_bytes);
     NEW_AUX_ENT(AT_SECURE, (abi_ulong) qemu_getauxval(AT_SECURE));
+    NEW_AUX_ENT(AT_EXECFN, info->file_string);
 
 #ifdef ELF_HWCAP2
     NEW_AUX_ENT(AT_HWCAP2, (abi_ulong) ELF_HWCAP2);
-- 
2.25.0.265.gbab2e86ba0-goog



^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH v2] linux-user: Add AT_EXECFN auxval
  2020-03-02 19:31 [PATCH v2] linux-user: Add AT_EXECFN auxval Lirong Yuan
@ 2020-03-03  7:50 ` Laurent Vivier
  2020-03-03  9:40 ` Laurent Vivier
  1 sibling, 0 replies; 4+ messages in thread
From: Laurent Vivier @ 2020-03-03  7:50 UTC (permalink / raw)
  To: Lirong Yuan, qemu-devel; +Cc: qemu-trivial, jkz, Riku Voipio, scw

Le 02/03/2020 à 20:31, Lirong Yuan a écrit :
> This change adds the support for AT_EXECFN auxval.
> 
> Signed-off-by: Lirong Yuan <yuanzi@google.com>
> ---
> Changelog since v1:
> - remove implementation for AT_EXECFD auxval.
> 
>  linux-user/elfload.c | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/linux-user/elfload.c b/linux-user/elfload.c
> index db748c5877..8198be0446 100644
> --- a/linux-user/elfload.c
> +++ b/linux-user/elfload.c
> @@ -1573,7 +1573,7 @@ struct exec
>                                   ~(abi_ulong)(TARGET_ELF_EXEC_PAGESIZE-1))
>  #define TARGET_ELF_PAGEOFFSET(_v) ((_v) & (TARGET_ELF_EXEC_PAGESIZE-1))
>  
> -#define DLINFO_ITEMS 15
> +#define DLINFO_ITEMS 16
>  
>  static inline void memcpy_fromfs(void * to, const void * from, unsigned long n)
>  {
> @@ -2037,6 +2037,7 @@ static abi_ulong create_elf_tables(abi_ulong p, int argc, int envc,
>      NEW_AUX_ENT(AT_CLKTCK, (abi_ulong) sysconf(_SC_CLK_TCK));
>      NEW_AUX_ENT(AT_RANDOM, (abi_ulong) u_rand_bytes);
>      NEW_AUX_ENT(AT_SECURE, (abi_ulong) qemu_getauxval(AT_SECURE));
> +    NEW_AUX_ENT(AT_EXECFN, info->file_string);
>  
>  #ifdef ELF_HWCAP2
>      NEW_AUX_ENT(AT_HWCAP2, (abi_ulong) ELF_HWCAP2);
> 

Reviewed-by: Laurent Vivier <laurent@vivier.eu>


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH v2] linux-user: Add AT_EXECFN auxval
  2020-03-02 19:31 [PATCH v2] linux-user: Add AT_EXECFN auxval Lirong Yuan
  2020-03-03  7:50 ` Laurent Vivier
@ 2020-03-03  9:40 ` Laurent Vivier
  2020-03-03 23:29   ` Lirong Yuan
  1 sibling, 1 reply; 4+ messages in thread
From: Laurent Vivier @ 2020-03-03  9:40 UTC (permalink / raw)
  To: Lirong Yuan, qemu-devel; +Cc: qemu-trivial, jkz, Riku Voipio, scw

Le 02/03/2020 à 20:31, Lirong Yuan a écrit :
> This change adds the support for AT_EXECFN auxval.
> 
> Signed-off-by: Lirong Yuan <yuanzi@google.com>
> ---
> Changelog since v1:
> - remove implementation for AT_EXECFD auxval.
> 
>  linux-user/elfload.c | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/linux-user/elfload.c b/linux-user/elfload.c
> index db748c5877..8198be0446 100644
> --- a/linux-user/elfload.c
> +++ b/linux-user/elfload.c
> @@ -1573,7 +1573,7 @@ struct exec
>                                   ~(abi_ulong)(TARGET_ELF_EXEC_PAGESIZE-1))
>  #define TARGET_ELF_PAGEOFFSET(_v) ((_v) & (TARGET_ELF_EXEC_PAGESIZE-1))
>  
> -#define DLINFO_ITEMS 15
> +#define DLINFO_ITEMS 16
>  
>  static inline void memcpy_fromfs(void * to, const void * from, unsigned long n)
>  {
> @@ -2037,6 +2037,7 @@ static abi_ulong create_elf_tables(abi_ulong p, int argc, int envc,
>      NEW_AUX_ENT(AT_CLKTCK, (abi_ulong) sysconf(_SC_CLK_TCK));
>      NEW_AUX_ENT(AT_RANDOM, (abi_ulong) u_rand_bytes);
>      NEW_AUX_ENT(AT_SECURE, (abi_ulong) qemu_getauxval(AT_SECURE));
> +    NEW_AUX_ENT(AT_EXECFN, info->file_string);
>  
>  #ifdef ELF_HWCAP2
>      NEW_AUX_ENT(AT_HWCAP2, (abi_ulong) ELF_HWCAP2);
> 

Applied to my linux-user branch.

Thanks,
Laurent


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH v2] linux-user: Add AT_EXECFN auxval
  2020-03-03  9:40 ` Laurent Vivier
@ 2020-03-03 23:29   ` Lirong Yuan
  0 siblings, 0 replies; 4+ messages in thread
From: Lirong Yuan @ 2020-03-03 23:29 UTC (permalink / raw)
  To: Laurent Vivier
  Cc: qemu-devel, qemu-trivial, Shu-Chun Weng, Josh Kunz, Riku Voipio

On Tue, Mar 3, 2020 at 1:40 AM Laurent Vivier <laurent@vivier.eu> wrote:
>
> Le 02/03/2020 à 20:31, Lirong Yuan a écrit :
> > This change adds the support for AT_EXECFN auxval.
> >
> > Signed-off-by: Lirong Yuan <yuanzi@google.com>
> > ---
> > Changelog since v1:
> > - remove implementation for AT_EXECFD auxval.
> >
> >  linux-user/elfload.c | 3 ++-
> >  1 file changed, 2 insertions(+), 1 deletion(-)
> >
> > diff --git a/linux-user/elfload.c b/linux-user/elfload.c
> > index db748c5877..8198be0446 100644
> > --- a/linux-user/elfload.c
> > +++ b/linux-user/elfload.c
> > @@ -1573,7 +1573,7 @@ struct exec
> >                                   ~(abi_ulong)(TARGET_ELF_EXEC_PAGESIZE-1))
> >  #define TARGET_ELF_PAGEOFFSET(_v) ((_v) & (TARGET_ELF_EXEC_PAGESIZE-1))
> >
> > -#define DLINFO_ITEMS 15
> > +#define DLINFO_ITEMS 16
> >
> >  static inline void memcpy_fromfs(void * to, const void * from, unsigned long n)
> >  {
> > @@ -2037,6 +2037,7 @@ static abi_ulong create_elf_tables(abi_ulong p, int argc, int envc,
> >      NEW_AUX_ENT(AT_CLKTCK, (abi_ulong) sysconf(_SC_CLK_TCK));
> >      NEW_AUX_ENT(AT_RANDOM, (abi_ulong) u_rand_bytes);
> >      NEW_AUX_ENT(AT_SECURE, (abi_ulong) qemu_getauxval(AT_SECURE));
> > +    NEW_AUX_ENT(AT_EXECFN, info->file_string);
> >
> >  #ifdef ELF_HWCAP2
> >      NEW_AUX_ENT(AT_HWCAP2, (abi_ulong) ELF_HWCAP2);
> >
>
> Applied to my linux-user branch.
>
> Thanks,
> Laurent

Awesome, thanks for the review! :)

Regards,
Lirong


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2020-03-03 23:30 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-03-02 19:31 [PATCH v2] linux-user: Add AT_EXECFN auxval Lirong Yuan
2020-03-03  7:50 ` Laurent Vivier
2020-03-03  9:40 ` Laurent Vivier
2020-03-03 23:29   ` Lirong Yuan

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.