Re: AMD64 14.0-CURRENT memory layout changes

From: Paul Floyd <paulf2718_at_gmail.com>
Date: Sun, 16 Oct 2022 18:39:53 UTC

On 10/16/22 17:29, Pau Amma wrote:

> Jumoing in with some quarterly reports I saw pass that may be related to 
> either/both:
> - 
> https://www.freebsd.org/status/report-2022-04-2022-06/#_shared_page_address_randomization (not sure this is about rtld)
> - 
> https://www.freebsd.org/status/report-2021-07-2021-09/#_stack_gap_handling_improvements (this one mentions a switch-off sysctl).

Hi Pau Amma and Mark

Thanks for the info.

I now understand the problem.

Valgrind needs to intercept sysctl(byname) kern.stacktop and return its 
own value. I'm already doing this for kern.usrstack.

Without interception the guest is getting the stacktop of the host. The 
host obviously refuses to let the guest mmap over its own stack, 
resulting in an assert and guest crash.



A+
Paul