Re: [PATCH] linux-user/elfload: do not assume MAP_FIXED_NOREPLACE kernel support

2021-03-09 Thread Laurent Vivier
Le 31/01/2021 à 07:19, Vincent Fazio a écrit : > From: Vincent Fazio > > Previously, pgd_find_hole_fallback assumed that if the build host's libc > had MAP_FIXED_NOREPLACE defined that the address returned by mmap would > match the requested address. This is not a safe assumption for Linux > kern

Re: [PATCH] linux-user/elfload: do not assume MAP_FIXED_NOREPLACE kernel support

2021-02-25 Thread Vincent Fazio
On 2/15/21 3:52 AM, Alex Bennée wrote: Vincent Fazio writes: Ahh right so I think this is a case of binaries being built on a different platform than kernel they are running on. In which case the flag would be defined but the underlying kernel fails to identify it. Is this a container lik

Re: [PATCH] linux-user/elfload: do not assume MAP_FIXED_NOREPLACE kernel support

2021-02-15 Thread Alex Bennée
Vincent Fazio writes: > On Sun, Feb 14, 2021 at 6:50 AM Laurent Vivier wrote: >> >> Le 14/02/2021 à 12:24, Alex Bennée a écrit : >> > >> > Vincent Fazio writes: >> > >> >> From: Vincent Fazio >> >> >> >> Previously, pgd_find_hole_fallback assumed that if the build host's libc >> >> had MAP_F

Re: [PATCH] linux-user/elfload: do not assume MAP_FIXED_NOREPLACE kernel support

2021-02-14 Thread Vincent Fazio
On Sun, Feb 14, 2021 at 6:50 AM Laurent Vivier wrote: > > Le 14/02/2021 à 12:24, Alex Bennée a écrit : > > > > Vincent Fazio writes: > > > >> From: Vincent Fazio > >> > >> Previously, pgd_find_hole_fallback assumed that if the build host's libc > >> had MAP_FIXED_NOREPLACE defined that the addre

Re: [PATCH] linux-user/elfload: do not assume MAP_FIXED_NOREPLACE kernel support

2021-02-14 Thread Laurent Vivier
Le 14/02/2021 à 12:24, Alex Bennée a écrit : > > Vincent Fazio writes: > >> From: Vincent Fazio >> >> Previously, pgd_find_hole_fallback assumed that if the build host's libc >> had MAP_FIXED_NOREPLACE defined that the address returned by mmap would >> match the requested address. This is not a

Re: [PATCH] linux-user/elfload: do not assume MAP_FIXED_NOREPLACE kernel support

2021-02-14 Thread Alex Bennée
Vincent Fazio writes: > From: Vincent Fazio > > Previously, pgd_find_hole_fallback assumed that if the build host's libc > had MAP_FIXED_NOREPLACE defined that the address returned by mmap would > match the requested address. This is not a safe assumption for Linux > kernels prior to 4.17 It

Re: [PATCH] linux-user/elfload: do not assume MAP_FIXED_NOREPLACE kernel support

2021-02-13 Thread Laurent Vivier
Le 31/01/2021 à 07:19, Vincent Fazio a écrit : > From: Vincent Fazio > > Previously, pgd_find_hole_fallback assumed that if the build host's libc > had MAP_FIXED_NOREPLACE defined that the address returned by mmap would > match the requested address. This is not a safe assumption for Linux > kern

[PATCH] linux-user/elfload: do not assume MAP_FIXED_NOREPLACE kernel support

2021-01-30 Thread Vincent Fazio
From: Vincent Fazio Previously, pgd_find_hole_fallback assumed that if the build host's libc had MAP_FIXED_NOREPLACE defined that the address returned by mmap would match the requested address. This is not a safe assumption for Linux kernels prior to 4.17 Now, we always compare mmap's resultant