* [Qemu-devel] [PATCH v2] linux-user: Add AT_SECURE auxval
@ 2018-01-11 18:37 Marco A L Barbosa
2018-01-11 18:43 ` Marco A L Barbosa
` (2 more replies)
0 siblings, 3 replies; 6+ messages in thread
From: Marco A L Barbosa @ 2018-01-11 18:37 UTC (permalink / raw)
To: qemu-trivial, qemu-devel
---
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 20f3d8c2c3..32a47674e6 100644
--- a/linux-user/elfload.c
+++ b/linux-user/elfload.c
@@ -1354,7 +1354,7 @@ struct exec
~(abi_ulong)(TARGET_ELF_EXEC_PAGESIZE-1))
#define TARGET_ELF_PAGEOFFSET(_v) ((_v) & (TARGET_ELF_EXEC_PAGESIZE-1))
-#define DLINFO_ITEMS 14
+#define DLINFO_ITEMS 15
static inline void memcpy_fromfs(void * to, const void * from, unsigned long n)
{
@@ -1786,6 +1786,7 @@ static abi_ulong create_elf_tables(abi_ulong p, int argc, int envc,
NEW_AUX_ENT(AT_HWCAP, (abi_ulong) ELF_HWCAP);
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));
#ifdef ELF_HWCAP2
NEW_AUX_ENT(AT_HWCAP2, (abi_ulong) ELF_HWCAP2);
--
2.11.0
^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [Qemu-devel] [PATCH v2] linux-user: Add AT_SECURE auxval
2018-01-11 18:37 [Qemu-devel] [PATCH v2] linux-user: Add AT_SECURE auxval Marco A L Barbosa
@ 2018-01-11 18:43 ` Marco A L Barbosa
2018-01-11 18:52 ` Peter Maydell
2018-01-11 19:38 ` Laurent Vivier
2 siblings, 0 replies; 6+ messages in thread
From: Marco A L Barbosa @ 2018-01-11 18:43 UTC (permalink / raw)
To: qemu-trivial, qemu-devel
For some reason send-email didn't include my comments, sorry.
Following the Peter Maydell advice we just pass through the host AT_SECURE.
This fixes https://bugs.launchpad.net/qemu/+bug/1738771
Version 1 for reference:
https://lists.gnu.org/archive/html/qemu-devel/2017-10/msg03667.html
https://lists.gnu.org/archive/html/qemu-devel/2018-01/msg01298.html
On Thu, Jan 11, 2018 at 4:37 PM, Marco A L Barbosa <malbarbo@gmail.com>
wrote:
> ---
> 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 20f3d8c2c3..32a47674e6 100644
> --- a/linux-user/elfload.c
> +++ b/linux-user/elfload.c
> @@ -1354,7 +1354,7 @@ struct exec
> ~(abi_ulong)(TARGET_ELF_EXEC_
> PAGESIZE-1))
> #define TARGET_ELF_PAGEOFFSET(_v) ((_v) & (TARGET_ELF_EXEC_PAGESIZE-1))
>
> -#define DLINFO_ITEMS 14
> +#define DLINFO_ITEMS 15
>
> static inline void memcpy_fromfs(void * to, const void * from, unsigned
> long n)
> {
> @@ -1786,6 +1786,7 @@ static abi_ulong create_elf_tables(abi_ulong p, int
> argc, int envc,
> NEW_AUX_ENT(AT_HWCAP, (abi_ulong) ELF_HWCAP);
> 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));
>
> #ifdef ELF_HWCAP2
> NEW_AUX_ENT(AT_HWCAP2, (abi_ulong) ELF_HWCAP2);
> --
> 2.11.0
>
>
--
Marco A L Barbosa
http://malbarbo.pro.br
--
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [Qemu-devel] [PATCH v2] linux-user: Add AT_SECURE auxval
2018-01-11 18:37 [Qemu-devel] [PATCH v2] linux-user: Add AT_SECURE auxval Marco A L Barbosa
2018-01-11 18:43 ` Marco A L Barbosa
@ 2018-01-11 18:52 ` Peter Maydell
2018-01-11 18:56 ` Marco A L Barbosa
2018-01-11 19:38 ` Laurent Vivier
2 siblings, 1 reply; 6+ messages in thread
From: Peter Maydell @ 2018-01-11 18:52 UTC (permalink / raw)
To: Marco A L Barbosa
Cc: QEMU Trivial, QEMU Developers, Riku Voipio, Laurent Vivier
On 11 January 2018 at 18:37, Marco A L Barbosa <malbarbo@gmail.com> wrote:
> ---
> linux-user/elfload.c | 3 ++-
> 1 file changed, 2 insertions(+), 1 deletion(-)
This is missing your Signed-off-by: line, which we need to be
able to accept the patch.
(I've also cc'd the linux-user maintainers.)
> diff --git a/linux-user/elfload.c b/linux-user/elfload.c
> index 20f3d8c2c3..32a47674e6 100644
> --- a/linux-user/elfload.c
> +++ b/linux-user/elfload.c
> @@ -1354,7 +1354,7 @@ struct exec
> ~(abi_ulong)(TARGET_ELF_EXEC_PAGESIZE-1))
> #define TARGET_ELF_PAGEOFFSET(_v) ((_v) & (TARGET_ELF_EXEC_PAGESIZE-1))
>
> -#define DLINFO_ITEMS 14
> +#define DLINFO_ITEMS 15
>
> static inline void memcpy_fromfs(void * to, const void * from, unsigned long n)
> {
> @@ -1786,6 +1786,7 @@ static abi_ulong create_elf_tables(abi_ulong p, int argc, int envc,
> NEW_AUX_ENT(AT_HWCAP, (abi_ulong) ELF_HWCAP);
> 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));
>
> #ifdef ELF_HWCAP2
> NEW_AUX_ENT(AT_HWCAP2, (abi_ulong) ELF_HWCAP2);
> --
For the content, Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
thanks
-- PMM
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [Qemu-devel] [PATCH v2] linux-user: Add AT_SECURE auxval
2018-01-11 18:52 ` Peter Maydell
@ 2018-01-11 18:56 ` Marco A L Barbosa
2018-01-19 16:37 ` Laurent Vivier
0 siblings, 1 reply; 6+ messages in thread
From: Marco A L Barbosa @ 2018-01-11 18:56 UTC (permalink / raw)
To: Peter Maydell; +Cc: QEMU Trivial, QEMU Developers, Riku Voipio, Laurent Vivier
Thanks Peter,
Signed-off-by: Marco A L Barbosa <malbarbo@gmail.com>
On Thu, Jan 11, 2018 at 4:52 PM, Peter Maydell <peter.maydell@linaro.org>
wrote:
> On 11 January 2018 at 18:37, Marco A L Barbosa <malbarbo@gmail.com> wrote:
> > ---
> > linux-user/elfload.c | 3 ++-
> > 1 file changed, 2 insertions(+), 1 deletion(-)
>
> This is missing your Signed-off-by: line, which we need to be
> able to accept the patch.
>
> (I've also cc'd the linux-user maintainers.)
>
> > diff --git a/linux-user/elfload.c b/linux-user/elfload.c
> > index 20f3d8c2c3..32a47674e6 100644
> > --- a/linux-user/elfload.c
> > +++ b/linux-user/elfload.c
> > @@ -1354,7 +1354,7 @@ struct exec
> > ~(abi_ulong)(TARGET_ELF_EXEC_
> PAGESIZE-1))
> > #define TARGET_ELF_PAGEOFFSET(_v) ((_v) & (TARGET_ELF_EXEC_PAGESIZE-1))
> >
> > -#define DLINFO_ITEMS 14
> > +#define DLINFO_ITEMS 15
> >
> > static inline void memcpy_fromfs(void * to, const void * from, unsigned
> long n)
> > {
> > @@ -1786,6 +1786,7 @@ static abi_ulong create_elf_tables(abi_ulong p,
> int argc, int envc,
> > NEW_AUX_ENT(AT_HWCAP, (abi_ulong) ELF_HWCAP);
> > 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));
> >
> > #ifdef ELF_HWCAP2
> > NEW_AUX_ENT(AT_HWCAP2, (abi_ulong) ELF_HWCAP2);
> > --
>
> For the content, Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
>
> thanks
> -- PMM
>
--
Marco A L Barbosa
http://malbarbo.pro.br
--
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [Qemu-devel] [PATCH v2] linux-user: Add AT_SECURE auxval
2018-01-11 18:37 [Qemu-devel] [PATCH v2] linux-user: Add AT_SECURE auxval Marco A L Barbosa
2018-01-11 18:43 ` Marco A L Barbosa
2018-01-11 18:52 ` Peter Maydell
@ 2018-01-11 19:38 ` Laurent Vivier
2 siblings, 0 replies; 6+ messages in thread
From: Laurent Vivier @ 2018-01-11 19:38 UTC (permalink / raw)
To: Marco A L Barbosa, qemu-trivial, qemu-devel
Le 11/01/2018 à 19:37, Marco A L Barbosa a écrit :
> ---
> 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 20f3d8c2c3..32a47674e6 100644
> --- a/linux-user/elfload.c
> +++ b/linux-user/elfload.c
> @@ -1354,7 +1354,7 @@ struct exec
> ~(abi_ulong)(TARGET_ELF_EXEC_PAGESIZE-1))
> #define TARGET_ELF_PAGEOFFSET(_v) ((_v) & (TARGET_ELF_EXEC_PAGESIZE-1))
>
> -#define DLINFO_ITEMS 14
> +#define DLINFO_ITEMS 15
>
> static inline void memcpy_fromfs(void * to, const void * from, unsigned long n)
> {
> @@ -1786,6 +1786,7 @@ static abi_ulong create_elf_tables(abi_ulong p, int argc, int envc,
> NEW_AUX_ENT(AT_HWCAP, (abi_ulong) ELF_HWCAP);
> 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));
>
> #ifdef ELF_HWCAP2
> NEW_AUX_ENT(AT_HWCAP2, (abi_ulong) ELF_HWCAP2);
>
after adding the comment and the S-o-b of v1:
Reviewed-by: Laurent Vivier <laurent@vivier.eu>
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [Qemu-devel] [PATCH v2] linux-user: Add AT_SECURE auxval
2018-01-11 18:56 ` Marco A L Barbosa
@ 2018-01-19 16:37 ` Laurent Vivier
0 siblings, 0 replies; 6+ messages in thread
From: Laurent Vivier @ 2018-01-19 16:37 UTC (permalink / raw)
To: Marco A L Barbosa, Peter Maydell
Cc: QEMU Trivial, Riku Voipio, QEMU Developers
Le 11/01/2018 à 19:56, Marco A L Barbosa a écrit :
> Thanks Peter,
>
> Signed-off-by: Marco A L Barbosa <malbarbo@gmail.com>
With this S-o-b, applied to my linux-user branch.
Thanks,
Laurent
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2018-01-19 16:37 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-01-11 18:37 [Qemu-devel] [PATCH v2] linux-user: Add AT_SECURE auxval Marco A L Barbosa
2018-01-11 18:43 ` Marco A L Barbosa
2018-01-11 18:52 ` Peter Maydell
2018-01-11 18:56 ` Marco A L Barbosa
2018-01-19 16:37 ` Laurent Vivier
2018-01-11 19:38 ` Laurent Vivier
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).