Re: [PATCH v6 8/8] linux-user: Load pie executables at upper memory

2023-08-02 Thread Helge Deller
On 8/2/23 20:36, Richard Henderson wrote: On 8/1/23 16:27, Helge Deller wrote: +/* where to map binaries? */ +#if HOST_LONG_BITS == 64 && TARGET_ABI_BITS == 64 +# define TASK_UNMAPPED_BASE_PIE 0x55 +# define TASK_UNMAPPED_BASE    0x70 +#elif HOST_LONG_BITS == 64 && TARGET_ABI_BIT

Re: [PATCH v6 8/8] linux-user: Load pie executables at upper memory

2023-08-02 Thread Richard Henderson
On 8/1/23 16:27, Helge Deller wrote: +/* where to map binaries? */ +#if HOST_LONG_BITS == 64 && TARGET_ABI_BITS == 64 +# define TASK_UNMAPPED_BASE_PIE 0x55 +# define TASK_UNMAPPED_BASE0x70 +#elif HOST_LONG_BITS == 64 && TARGET_ABI_BITS == 32 +# define TASK_UNMAPPED_BASE_PIE

Re: [PATCH v6 8/8] linux-user: Load pie executables at upper memory

2023-08-02 Thread Helge Deller
On 8/2/23 11:58, Akihiko Odaki wrote: On 2023/08/02 18:34, Helge Deller wrote: On 8/2/23 10:44, Akihiko Odaki wrote: On 2023/08/02 17:42, Helge Deller wrote: On 8/2/23 09:49, Akihiko Odaki wrote: On 2023/08/02 8:27, Helge Deller wrote: Fix the elf loader to calculate a valid TASK_UNMAPPED_BA

Re: [PATCH v6 8/8] linux-user: Load pie executables at upper memory

2023-08-02 Thread Akihiko Odaki
On 2023/08/02 18:34, Helge Deller wrote: On 8/2/23 10:44, Akihiko Odaki wrote: On 2023/08/02 17:42, Helge Deller wrote: On 8/2/23 09:49, Akihiko Odaki wrote: On 2023/08/02 8:27, Helge Deller wrote: Fix the elf loader to calculate a valid TASK_UNMAPPED_BASE address for all 32-bit architecture

Re: [PATCH v6 8/8] linux-user: Load pie executables at upper memory

2023-08-02 Thread Helge Deller
On 8/2/23 10:44, Akihiko Odaki wrote: On 2023/08/02 17:42, Helge Deller wrote: On 8/2/23 09:49, Akihiko Odaki wrote: On 2023/08/02 8:27, Helge Deller wrote: Fix the elf loader to calculate a valid TASK_UNMAPPED_BASE address for all 32-bit architectures, based on the GUEST_ADDR_MAX constant. A

Re: [PATCH v6 8/8] linux-user: Load pie executables at upper memory

2023-08-02 Thread Akihiko Odaki
On 2023/08/02 17:42, Helge Deller wrote: On 8/2/23 09:49, Akihiko Odaki wrote: On 2023/08/02 8:27, Helge Deller wrote: Fix the elf loader to calculate a valid TASK_UNMAPPED_BASE address for all 32-bit architectures, based on the GUEST_ADDR_MAX constant. Additionally modify the elf loader to l

Re: [PATCH v6 8/8] linux-user: Load pie executables at upper memory

2023-08-02 Thread Helge Deller
On 8/2/23 09:49, Akihiko Odaki wrote: On 2023/08/02 8:27, Helge Deller wrote: Fix the elf loader to calculate a valid TASK_UNMAPPED_BASE address for all 32-bit architectures, based on the GUEST_ADDR_MAX constant. Additionally modify the elf loader to load dynamic pie executables at around: ~ 0x

Re: [PATCH v6 8/8] linux-user: Load pie executables at upper memory

2023-08-02 Thread Akihiko Odaki
On 2023/08/02 8:27, Helge Deller wrote: Fix the elf loader to calculate a valid TASK_UNMAPPED_BASE address for all 32-bit architectures, based on the GUEST_ADDR_MAX constant. Additionally modify the elf loader to load dynamic pie executables at around: ~ 0x55 for 64-bit guest binaries o

[PATCH v6 8/8] linux-user: Load pie executables at upper memory

2023-08-01 Thread Helge Deller
Fix the elf loader to calculate a valid TASK_UNMAPPED_BASE address for all 32-bit architectures, based on the GUEST_ADDR_MAX constant. Additionally modify the elf loader to load dynamic pie executables at around: ~ 0x55 for 64-bit guest binaries on 64-bit host, - 0x0030for 32-bit