Re: [PATCH v3 for-6.0 2/2] tcg: Workaround macOS 11.2 mprotect bug

2021-03-22 Thread Philippe Mathieu-Daudé
On 3/22/21 4:00 PM, Richard Henderson wrote: > On 3/22/21 4:03 AM, Philippe Mathieu-Daudé wrote: >>> -    rc = qemu_mprotect_none(end, page_size); >> >> What about: >> >> #ifdef CONFIG_DARWIN >> >>     /* ... */ >>     (void)rc; >> #else >> >>> -    g_assert(!rc); >> >> #end

Re: [PATCH v3 for-6.0 2/2] tcg: Workaround macOS 11.2 mprotect bug

2021-03-22 Thread Richard Henderson
On 3/22/21 4:03 AM, Philippe Mathieu-Daudé wrote: -rc = qemu_mprotect_none(end, page_size); What about: #ifdef CONFIG_DARWIN /* ... */ (void)rc; #else -g_assert(!rc); #endif What does that buy us, really? It seems like it just clutters the code w

Re: [PATCH v3 for-6.0 2/2] tcg: Workaround macOS 11.2 mprotect bug

2021-03-22 Thread Roman Bolshakov
On Mon, Mar 22, 2021 at 11:03:05AM +0100, Philippe Mathieu-Daudé wrote: > On 3/20/21 5:57 PM, Richard Henderson wrote: > > There's a change in mprotect() behaviour [1] in the latest macOS > > on M1 and it's not yet clear if it's going to be fixed by Apple. > > > > As a short-term fix, ignore failu

Re: [PATCH v3 for-6.0 2/2] tcg: Workaround macOS 11.2 mprotect bug

2021-03-22 Thread Philippe Mathieu-Daudé
On 3/20/21 5:57 PM, Richard Henderson wrote: > There's a change in mprotect() behaviour [1] in the latest macOS > on M1 and it's not yet clear if it's going to be fixed by Apple. > > As a short-term fix, ignore failures setting up the guard pages. > > [1] https://gist.github.com/hikalium/75ae8224

[PATCH v3 for-6.0 2/2] tcg: Workaround macOS 11.2 mprotect bug

2021-03-20 Thread Richard Henderson
There's a change in mprotect() behaviour [1] in the latest macOS on M1 and it's not yet clear if it's going to be fixed by Apple. As a short-term fix, ignore failures setting up the guard pages. [1] https://gist.github.com/hikalium/75ae822466ee4da13cbbe486498a191f Buglink: https://bugs.launchpad