[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH 5/5] add setting gs/fsbase

From: Sergey Bugaev
Subject: Re: [PATCH 5/5] add setting gs/fsbase
Date: Thu, 20 Apr 2023 16:08:45 +0300

On Thu, Apr 20, 2023 at 4:01 PM Luca <luca@orpolo.org> wrote:
> There is likely some limitation in the pmap module in gnumach, IIRC it should 
> statically allocate the user L3 page tables as long as the limit is below the 
> first 512GB, but I never really tested it yet.

That sounds plausible, yes, I've seen some sort of TODOs/FIXMEs
referencing L3 page tables while grepping for VM_MAX_USER_ADDRESS. Not
that I have any clue how any of this works.

Please look into this!

> Would it work for you to shrink temporarily the VM space, at least for 
> testing?

Yeah, that's also what I've been thinking to try out next. I'm
somewhat surprised that gcc/ld placed my static executable in the
rather low part of the address space, but here it actually works in
our favor.

Is that actually configurable somewhere (at gcc/binutils build time, I
mean)? I'm thinking we will want to map the lower 4GB of address space
inaccessible like dyld does, and not just one page, to catch pointer
truncation in addition to nullptr dereferences. But that would need
gcc/ld to know to not use low addresses for their needs.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]