All the mail mirrored from lore.kernel.org
 help / color / mirror / Atom feed
* Re: [Qemu-devel] [PATCH v4 1/4] linux-user/aarch64: Reset btype for syscalls and signals
@ 2019-04-29 15:59     ` Peter Maydell
  0 siblings, 0 replies; 14+ messages in thread
From: Peter Maydell @ 2019-04-29 15:59 UTC (permalink / raw
  To: Richard Henderson; +Cc: QEMU Developers, Alex Bennée, Ramana Radhakrishnan

On Sat, 30 Mar 2019 at 00:59, Richard Henderson
<richard.henderson@linaro.org> wrote:
>
> The value of btype for syscalls is CONSTRAINED UNPREDICTABLE,
> so we need to make sure that the value is 0 before clone,
> fork, or syscall return.
>
> The value of btype for signals is defined, but it does not make
> sense for a SIGILL handler to enter with the btype set as for
> the indirect branch that caused the SIGILL.
>
> Signed-off-by: Richard Henderson <richard.henderson@linaro.org>

Reviewed-by: Peter Maydell <peter.maydell@linaro.org>

thanks
-- PMM

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

* Re: [Qemu-devel] [PATCH v4 1/4] linux-user/aarch64: Reset btype for syscalls and signals
@ 2019-04-29 15:59     ` Peter Maydell
  0 siblings, 0 replies; 14+ messages in thread
From: Peter Maydell @ 2019-04-29 15:59 UTC (permalink / raw
  To: Richard Henderson; +Cc: Alex Bennée, QEMU Developers, Ramana Radhakrishnan

On Sat, 30 Mar 2019 at 00:59, Richard Henderson
<richard.henderson@linaro.org> wrote:
>
> The value of btype for syscalls is CONSTRAINED UNPREDICTABLE,
> so we need to make sure that the value is 0 before clone,
> fork, or syscall return.
>
> The value of btype for signals is defined, but it does not make
> sense for a SIGILL handler to enter with the btype set as for
> the indirect branch that caused the SIGILL.
>
> Signed-off-by: Richard Henderson <richard.henderson@linaro.org>

Reviewed-by: Peter Maydell <peter.maydell@linaro.org>

thanks
-- PMM


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

* Re: [Qemu-devel] [PATCH v4 3/4] linux-user: Parse NT_GNU_PROPERTY_TYPE_0 notes
@ 2019-04-29 16:17     ` Peter Maydell
  0 siblings, 0 replies; 14+ messages in thread
From: Peter Maydell @ 2019-04-29 16:17 UTC (permalink / raw
  To: Richard Henderson; +Cc: QEMU Developers, Alex Bennée, Ramana Radhakrishnan

On Sat, 30 Mar 2019 at 00:59, Richard Henderson
<richard.henderson@linaro.org> wrote:
>
> For aarch64, this includes the GNU_PROPERTY_AARCH64_FEATURE_1_BTI bit,
> which indicates that the image should be mapped with guarded pages.
>
> Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
> ---
>  linux-user/elfload.c | 79 ++++++++++++++++++++++++++++++++++++++------
>  1 file changed, 68 insertions(+), 11 deletions(-)
>
> diff --git a/linux-user/elfload.c b/linux-user/elfload.c
> index c1a26021f8..12ee96e5d4 100644
> --- a/linux-user/elfload.c
> +++ b/linux-user/elfload.c
> @@ -116,6 +116,10 @@ typedef abi_uint        target_gid_t;
>  #endif
>  typedef abi_int         target_pid_t;
>
> +
> +#define TARGET_NT_GNU_PROPERTY_TYPE_0  5
> +
> +
>  #ifdef TARGET_I386
>
>  #define ELF_PLATFORM get_elf_platform()
> @@ -543,6 +547,10 @@ static const char *get_elf_platform(void)
>  # define ELF_PLATFORM    "aarch64"
>  #endif
>
> +#define TARGET_GNU_PROPERTY_AARCH64_FEATURE_1_AND  0xc0000000
> +#define TARGET_GNU_PROPERTY_AARCH64_FEATURE_1_BTI  (1u << 0)
> +#define TARGET_GNU_PROPERTY_AARCH64_FEATURE_1_PAC  (1u << 1)
> +
>  static inline void init_thread(struct target_pt_regs *regs,
>                                 struct image_info *infop)
>  {
> @@ -2252,7 +2260,7 @@ static void load_elf_image(const char *image_name, int image_fd,
>      struct elfhdr *ehdr = (struct elfhdr *)bprm_buf;
>      struct elf_phdr *phdr;
>      abi_ulong load_addr, load_bias, loaddr, hiaddr, error;
> -    int i, retval;
> +    int i, retval, prot_exec = PROT_EXEC;
>      const char *errmsg;
>
>      /* First of all, some simple consistency checks */
> @@ -2287,17 +2295,66 @@ static void load_elf_image(const char *image_name, int image_fd,
>      loaddr = -1, hiaddr = 0;
>      info->alignment = 0;
>      for (i = 0; i < ehdr->e_phnum; ++i) {
> -        if (phdr[i].p_type == PT_LOAD) {
> -            abi_ulong a = phdr[i].p_vaddr - phdr[i].p_offset;
> -            if (a < loaddr) {
> -                loaddr = a;
> +        struct elf_phdr *eppnt = phdr + i;
> +
> +        switch (eppnt->p_type) {
> +        case PT_LOAD:
> +            {

I think you have an extra layer of indent here that we usually
don't do for switch statement cases.


> +#ifdef BSWAP_NEEDED
> +                for (i = 0; i < ARRAY_SIZE(note); ++i) {
> +                    bswap32s(note + i);
> +                }
> +#endif
> +#ifdef HOST_WORDS_BIGENDIAN
> +                gnu0 = 'G' << 24 | 'N' << 16 | 'U' << 8;
> +#else
> +                gnu0 = 'G' | 'N' << 8 | 'U' << 16;
> +#endif

#define GNU0_MAGIC const_le32('G' | 'N' << 8 | 'U' << 16)

and then you can avoid the #ifdef HOST_WORDS_BIGENDIAN?

> +
> +                if (note[0] != 4 ||     /* namesz */
> +                    note[1] < 12 ||     /* descsz -- may include padding */
> +                    note[2] != TARGET_NT_GNU_PROPERTY_TYPE_0 ||  /* type */
> +                    note[3] != gnu0) {  /* name */
> +                    break;
> +                }
> +#ifdef TARGET_AARCH64
> +                if (note[4] == TARGET_GNU_PROPERTY_AARCH64_FEATURE_1_AND &&
> +                    note[5] == 4 &&
> +                    (note[6] & TARGET_GNU_PROPERTY_AARCH64_FEATURE_1_BTI)) {
> +                    prot_exec |= TARGET_PROT_BTI;
> +                }
> +#endif
>              }
> -            ++info->nsegs;
> -            info->alignment |= phdr[i].p_align;
> +            break;
>          }
>      }
>
> @@ -2359,7 +2416,7 @@ static void load_elf_image(const char *image_name, int image_fd,
>
>              if (eppnt->p_flags & PF_R) elf_prot =  PROT_READ;
>              if (eppnt->p_flags & PF_W) elf_prot |= PROT_WRITE;
> -            if (eppnt->p_flags & PF_X) elf_prot |= PROT_EXEC;
> +            if (eppnt->p_flags & PF_X) elf_prot |= prot_exec;
>
>              vaddr = load_bias + eppnt->p_vaddr;
>              vaddr_po = TARGET_ELF_PAGEOFFSET(vaddr);
> --
> 2.17.1

Otherwise
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>

thanks
-- PMM

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

* Re: [Qemu-devel] [PATCH v4 3/4] linux-user: Parse NT_GNU_PROPERTY_TYPE_0 notes
@ 2019-04-29 16:17     ` Peter Maydell
  0 siblings, 0 replies; 14+ messages in thread
From: Peter Maydell @ 2019-04-29 16:17 UTC (permalink / raw
  To: Richard Henderson; +Cc: Alex Bennée, QEMU Developers, Ramana Radhakrishnan

On Sat, 30 Mar 2019 at 00:59, Richard Henderson
<richard.henderson@linaro.org> wrote:
>
> For aarch64, this includes the GNU_PROPERTY_AARCH64_FEATURE_1_BTI bit,
> which indicates that the image should be mapped with guarded pages.
>
> Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
> ---
>  linux-user/elfload.c | 79 ++++++++++++++++++++++++++++++++++++++------
>  1 file changed, 68 insertions(+), 11 deletions(-)
>
> diff --git a/linux-user/elfload.c b/linux-user/elfload.c
> index c1a26021f8..12ee96e5d4 100644
> --- a/linux-user/elfload.c
> +++ b/linux-user/elfload.c
> @@ -116,6 +116,10 @@ typedef abi_uint        target_gid_t;
>  #endif
>  typedef abi_int         target_pid_t;
>
> +
> +#define TARGET_NT_GNU_PROPERTY_TYPE_0  5
> +
> +
>  #ifdef TARGET_I386
>
>  #define ELF_PLATFORM get_elf_platform()
> @@ -543,6 +547,10 @@ static const char *get_elf_platform(void)
>  # define ELF_PLATFORM    "aarch64"
>  #endif
>
> +#define TARGET_GNU_PROPERTY_AARCH64_FEATURE_1_AND  0xc0000000
> +#define TARGET_GNU_PROPERTY_AARCH64_FEATURE_1_BTI  (1u << 0)
> +#define TARGET_GNU_PROPERTY_AARCH64_FEATURE_1_PAC  (1u << 1)
> +
>  static inline void init_thread(struct target_pt_regs *regs,
>                                 struct image_info *infop)
>  {
> @@ -2252,7 +2260,7 @@ static void load_elf_image(const char *image_name, int image_fd,
>      struct elfhdr *ehdr = (struct elfhdr *)bprm_buf;
>      struct elf_phdr *phdr;
>      abi_ulong load_addr, load_bias, loaddr, hiaddr, error;
> -    int i, retval;
> +    int i, retval, prot_exec = PROT_EXEC;
>      const char *errmsg;
>
>      /* First of all, some simple consistency checks */
> @@ -2287,17 +2295,66 @@ static void load_elf_image(const char *image_name, int image_fd,
>      loaddr = -1, hiaddr = 0;
>      info->alignment = 0;
>      for (i = 0; i < ehdr->e_phnum; ++i) {
> -        if (phdr[i].p_type == PT_LOAD) {
> -            abi_ulong a = phdr[i].p_vaddr - phdr[i].p_offset;
> -            if (a < loaddr) {
> -                loaddr = a;
> +        struct elf_phdr *eppnt = phdr + i;
> +
> +        switch (eppnt->p_type) {
> +        case PT_LOAD:
> +            {

I think you have an extra layer of indent here that we usually
don't do for switch statement cases.


> +#ifdef BSWAP_NEEDED
> +                for (i = 0; i < ARRAY_SIZE(note); ++i) {
> +                    bswap32s(note + i);
> +                }
> +#endif
> +#ifdef HOST_WORDS_BIGENDIAN
> +                gnu0 = 'G' << 24 | 'N' << 16 | 'U' << 8;
> +#else
> +                gnu0 = 'G' | 'N' << 8 | 'U' << 16;
> +#endif

#define GNU0_MAGIC const_le32('G' | 'N' << 8 | 'U' << 16)

and then you can avoid the #ifdef HOST_WORDS_BIGENDIAN?

> +
> +                if (note[0] != 4 ||     /* namesz */
> +                    note[1] < 12 ||     /* descsz -- may include padding */
> +                    note[2] != TARGET_NT_GNU_PROPERTY_TYPE_0 ||  /* type */
> +                    note[3] != gnu0) {  /* name */
> +                    break;
> +                }
> +#ifdef TARGET_AARCH64
> +                if (note[4] == TARGET_GNU_PROPERTY_AARCH64_FEATURE_1_AND &&
> +                    note[5] == 4 &&
> +                    (note[6] & TARGET_GNU_PROPERTY_AARCH64_FEATURE_1_BTI)) {
> +                    prot_exec |= TARGET_PROT_BTI;
> +                }
> +#endif
>              }
> -            ++info->nsegs;
> -            info->alignment |= phdr[i].p_align;
> +            break;
>          }
>      }
>
> @@ -2359,7 +2416,7 @@ static void load_elf_image(const char *image_name, int image_fd,
>
>              if (eppnt->p_flags & PF_R) elf_prot =  PROT_READ;
>              if (eppnt->p_flags & PF_W) elf_prot |= PROT_WRITE;
> -            if (eppnt->p_flags & PF_X) elf_prot |= PROT_EXEC;
> +            if (eppnt->p_flags & PF_X) elf_prot |= prot_exec;
>
>              vaddr = load_bias + eppnt->p_vaddr;
>              vaddr_po = TARGET_ELF_PAGEOFFSET(vaddr);
> --
> 2.17.1

Otherwise
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>

thanks
-- PMM


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

* Re: [Qemu-devel] [PATCH v4 2/4] linux-user: Set PAGE_TARGET_1 for TARGET_PROT_BTI
@ 2019-04-29 16:21     ` Peter Maydell
  0 siblings, 0 replies; 14+ messages in thread
From: Peter Maydell @ 2019-04-29 16:21 UTC (permalink / raw
  To: Richard Henderson; +Cc: QEMU Developers, Alex Bennée, Ramana Radhakrishnan

On Sat, 30 Mar 2019 at 00:59, Richard Henderson
<richard.henderson@linaro.org> wrote:
>
> There is agreement that there will be a mmap/mprotect bit,
> although no word yet on the value or the name.   Invent a
> name to make forward progress.
>
> The PAGE_TARGET_1 bit, is qemu internal, and allows the
> target something to query from the guest page tables.
>
> Signed-off-by: Richard Henderson <richard.henderson@linaro.org>

This looks ok code-wise, but we'd need to hide it behind
a defaults-to-off x-something property if we wanted to
commit it before the kernel ABI is fixed.

Do we also need to handle this in mprotect() ?

thanks
-- PMM

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

* Re: [Qemu-devel] [PATCH v4 2/4] linux-user: Set PAGE_TARGET_1 for TARGET_PROT_BTI
@ 2019-04-29 16:21     ` Peter Maydell
  0 siblings, 0 replies; 14+ messages in thread
From: Peter Maydell @ 2019-04-29 16:21 UTC (permalink / raw
  To: Richard Henderson; +Cc: Alex Bennée, QEMU Developers, Ramana Radhakrishnan

On Sat, 30 Mar 2019 at 00:59, Richard Henderson
<richard.henderson@linaro.org> wrote:
>
> There is agreement that there will be a mmap/mprotect bit,
> although no word yet on the value or the name.   Invent a
> name to make forward progress.
>
> The PAGE_TARGET_1 bit, is qemu internal, and allows the
> target something to query from the guest page tables.
>
> Signed-off-by: Richard Henderson <richard.henderson@linaro.org>

This looks ok code-wise, but we'd need to hide it behind
a defaults-to-off x-something property if we wanted to
commit it before the kernel ABI is fixed.

Do we also need to handle this in mprotect() ?

thanks
-- PMM


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

* Re: [Qemu-devel] [PATCH v4 2/4] linux-user: Set PAGE_TARGET_1 for TARGET_PROT_BTI
@ 2019-04-29 20:12       ` Richard Henderson
  0 siblings, 0 replies; 14+ messages in thread
From: Richard Henderson @ 2019-04-29 20:12 UTC (permalink / raw
  To: Peter Maydell; +Cc: QEMU Developers, Alex Bennée, Ramana Radhakrishnan

On 4/29/19 9:21 AM, Peter Maydell wrote:
> This looks ok code-wise, but we'd need to hide it behind
> a defaults-to-off x-something property if we wanted to
> commit it before the kernel ABI is fixed.

I'm not intending to change the user-level abi, only the
internal abi within qemu, for handling of the elf notes.

You think this should be done differently, so that there's
zero possibility of a user-level setting the relevant bit?

> Do we also need to handle this in mprotect() ?

Not until there's a kernel abi.


r~

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

* Re: [Qemu-devel] [PATCH v4 2/4] linux-user: Set PAGE_TARGET_1 for TARGET_PROT_BTI
@ 2019-04-29 20:12       ` Richard Henderson
  0 siblings, 0 replies; 14+ messages in thread
From: Richard Henderson @ 2019-04-29 20:12 UTC (permalink / raw
  To: Peter Maydell; +Cc: Alex Bennée, QEMU Developers, Ramana Radhakrishnan

On 4/29/19 9:21 AM, Peter Maydell wrote:
> This looks ok code-wise, but we'd need to hide it behind
> a defaults-to-off x-something property if we wanted to
> commit it before the kernel ABI is fixed.

I'm not intending to change the user-level abi, only the
internal abi within qemu, for handling of the elf notes.

You think this should be done differently, so that there's
zero possibility of a user-level setting the relevant bit?

> Do we also need to handle this in mprotect() ?

Not until there's a kernel abi.


r~


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

* Re: [Qemu-devel] [PATCH v4 3/4] linux-user: Parse NT_GNU_PROPERTY_TYPE_0 notes
@ 2019-04-29 20:18       ` Richard Henderson
  0 siblings, 0 replies; 14+ messages in thread
From: Richard Henderson @ 2019-04-29 20:18 UTC (permalink / raw
  To: Peter Maydell; +Cc: QEMU Developers, Alex Bennée, Ramana Radhakrishnan

On 4/29/19 9:17 AM, Peter Maydell wrote:
>> +        struct elf_phdr *eppnt = phdr + i;
>> +
>> +        switch (eppnt->p_type) {
>> +        case PT_LOAD:
>> +            {
> 
> I think you have an extra layer of indent here that we usually
> don't do for switch statement cases.

No, that indent is exactly right for a compound statement
not associated with an if/while/whatnot.

> #define GNU0_MAGIC const_le32('G' | 'N' << 8 | 'U' << 16)
> 
> and then you can avoid the #ifdef HOST_WORDS_BIGENDIAN?

Sure.


r~

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

* Re: [Qemu-devel] [PATCH v4 3/4] linux-user: Parse NT_GNU_PROPERTY_TYPE_0 notes
@ 2019-04-29 20:18       ` Richard Henderson
  0 siblings, 0 replies; 14+ messages in thread
From: Richard Henderson @ 2019-04-29 20:18 UTC (permalink / raw
  To: Peter Maydell; +Cc: Alex Bennée, QEMU Developers, Ramana Radhakrishnan

On 4/29/19 9:17 AM, Peter Maydell wrote:
>> +        struct elf_phdr *eppnt = phdr + i;
>> +
>> +        switch (eppnt->p_type) {
>> +        case PT_LOAD:
>> +            {
> 
> I think you have an extra layer of indent here that we usually
> don't do for switch statement cases.

No, that indent is exactly right for a compound statement
not associated with an if/while/whatnot.

> #define GNU0_MAGIC const_le32('G' | 'N' << 8 | 'U' << 16)
> 
> and then you can avoid the #ifdef HOST_WORDS_BIGENDIAN?

Sure.


r~


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

* Re: [Qemu-devel] [PATCH v4 2/4] linux-user: Set PAGE_TARGET_1 for TARGET_PROT_BTI
@ 2019-04-30 10:40         ` Peter Maydell
  0 siblings, 0 replies; 14+ messages in thread
From: Peter Maydell @ 2019-04-30 10:40 UTC (permalink / raw
  To: Richard Henderson; +Cc: QEMU Developers, Alex Bennée, Ramana Radhakrishnan

On Mon, 29 Apr 2019 at 21:13, Richard Henderson
<richard.henderson@linaro.org> wrote:
>
> On 4/29/19 9:21 AM, Peter Maydell wrote:
> > This looks ok code-wise, but we'd need to hide it behind
> > a defaults-to-off x-something property if we wanted to
> > commit it before the kernel ABI is fixed.
>
> I'm not intending to change the user-level abi, only the
> internal abi within qemu, for handling of the elf notes.

You're changing target_mmap(), which is used by the
guest mmap syscall, though, right?

> You think this should be done differently, so that there's
> zero possibility of a user-level setting the relevant bit?

I think that we shouldn't allow guest binaries written
to the ad-hoc TARGET_PROT_BTI ABI to work without an
explicit x-something command line argument to QEMU, to
indicate that the user knows they're doing something
odd and that these binaries won't always continue to work
in future QEMU versions.

thanks
-- PMM

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

* Re: [Qemu-devel] [PATCH v4 2/4] linux-user: Set PAGE_TARGET_1 for TARGET_PROT_BTI
@ 2019-04-30 10:40         ` Peter Maydell
  0 siblings, 0 replies; 14+ messages in thread
From: Peter Maydell @ 2019-04-30 10:40 UTC (permalink / raw
  To: Richard Henderson; +Cc: Alex Bennée, QEMU Developers, Ramana Radhakrishnan

On Mon, 29 Apr 2019 at 21:13, Richard Henderson
<richard.henderson@linaro.org> wrote:
>
> On 4/29/19 9:21 AM, Peter Maydell wrote:
> > This looks ok code-wise, but we'd need to hide it behind
> > a defaults-to-off x-something property if we wanted to
> > commit it before the kernel ABI is fixed.
>
> I'm not intending to change the user-level abi, only the
> internal abi within qemu, for handling of the elf notes.

You're changing target_mmap(), which is used by the
guest mmap syscall, though, right?

> You think this should be done differently, so that there's
> zero possibility of a user-level setting the relevant bit?

I think that we shouldn't allow guest binaries written
to the ad-hoc TARGET_PROT_BTI ABI to work without an
explicit x-something command line argument to QEMU, to
indicate that the user knows they're doing something
odd and that these binaries won't always continue to work
in future QEMU versions.

thanks
-- PMM


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

* Re: [Qemu-devel] [PATCH v4 2/4] linux-user: Set PAGE_TARGET_1 for TARGET_PROT_BTI
@ 2019-04-30 15:25           ` Richard Henderson
  0 siblings, 0 replies; 14+ messages in thread
From: Richard Henderson @ 2019-04-30 15:25 UTC (permalink / raw
  To: Peter Maydell; +Cc: QEMU Developers, Alex Bennée, Ramana Radhakrishnan

On 4/30/19 3:40 AM, Peter Maydell wrote:
> On Mon, 29 Apr 2019 at 21:13, Richard Henderson
> <richard.henderson@linaro.org> wrote:
>>
>> On 4/29/19 9:21 AM, Peter Maydell wrote:
>>> This looks ok code-wise, but we'd need to hide it behind
>>> a defaults-to-off x-something property if we wanted to
>>> commit it before the kernel ABI is fixed.
>>
>> I'm not intending to change the user-level abi, only the
>> internal abi within qemu, for handling of the elf notes.
> 
> You're changing target_mmap(), which is used by the
> guest mmap syscall, though, right?

Yes, but it's also used by elfload.c to map the executable.

> I think that we shouldn't allow guest binaries written
> to the ad-hoc TARGET_PROT_BTI ABI to work without an
> explicit x-something command line argument to QEMU...

The guest binary is not written to an ad-hoc abi.

It is written to the finalized ELF note abi, which
I am trying to implement with a *private* QEMU abi.


r~

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

* Re: [Qemu-devel] [PATCH v4 2/4] linux-user: Set PAGE_TARGET_1 for TARGET_PROT_BTI
@ 2019-04-30 15:25           ` Richard Henderson
  0 siblings, 0 replies; 14+ messages in thread
From: Richard Henderson @ 2019-04-30 15:25 UTC (permalink / raw
  To: Peter Maydell; +Cc: Alex Bennée, QEMU Developers, Ramana Radhakrishnan

On 4/30/19 3:40 AM, Peter Maydell wrote:
> On Mon, 29 Apr 2019 at 21:13, Richard Henderson
> <richard.henderson@linaro.org> wrote:
>>
>> On 4/29/19 9:21 AM, Peter Maydell wrote:
>>> This looks ok code-wise, but we'd need to hide it behind
>>> a defaults-to-off x-something property if we wanted to
>>> commit it before the kernel ABI is fixed.
>>
>> I'm not intending to change the user-level abi, only the
>> internal abi within qemu, for handling of the elf notes.
> 
> You're changing target_mmap(), which is used by the
> guest mmap syscall, though, right?

Yes, but it's also used by elfload.c to map the executable.

> I think that we shouldn't allow guest binaries written
> to the ad-hoc TARGET_PROT_BTI ABI to work without an
> explicit x-something command line argument to QEMU...

The guest binary is not written to an ad-hoc abi.

It is written to the finalized ELF note abi, which
I am trying to implement with a *private* QEMU abi.


r~


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

end of thread, other threads:[~2019-04-30 15:26 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <20190330005900.17282-1-richard.henderson@linaro.org>
     [not found] ` <20190330005900.17282-2-richard.henderson@linaro.org>
2019-04-29 15:59   ` [Qemu-devel] [PATCH v4 1/4] linux-user/aarch64: Reset btype for syscalls and signals Peter Maydell
2019-04-29 15:59     ` Peter Maydell
     [not found] ` <20190330005900.17282-4-richard.henderson@linaro.org>
2019-04-29 16:17   ` [Qemu-devel] [PATCH v4 3/4] linux-user: Parse NT_GNU_PROPERTY_TYPE_0 notes Peter Maydell
2019-04-29 16:17     ` Peter Maydell
2019-04-29 20:18     ` Richard Henderson
2019-04-29 20:18       ` Richard Henderson
     [not found] ` <20190330005900.17282-3-richard.henderson@linaro.org>
2019-04-29 16:21   ` [Qemu-devel] [PATCH v4 2/4] linux-user: Set PAGE_TARGET_1 for TARGET_PROT_BTI Peter Maydell
2019-04-29 16:21     ` Peter Maydell
2019-04-29 20:12     ` Richard Henderson
2019-04-29 20:12       ` Richard Henderson
2019-04-30 10:40       ` Peter Maydell
2019-04-30 10:40         ` Peter Maydell
2019-04-30 15:25         ` Richard Henderson
2019-04-30 15:25           ` Richard Henderson

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.