On Tue, Jan 08, 2019 at 11:25:08AM +0000, Will Deacon wrote:
Hi Richard,
[expanding CC to include others who may be interested in this]
On Fri, Dec 14, 2018 at 04:57:02PM -0600, Richard Henderson wrote:
This seems like a tricky extension to deploy to the operating system.
What is the proposed interface for setting GP on application pages? There are several things that seem plausible to me, and I wondered how far planning has gotten.
I've not seen anything set in stone yet, so I think this is all still up for grabs. Ramana?
An mmap/mprotect flag?
I'm not aware of any precedent for arch-specific mmap/mprotect flags, but it looks like PowerPC adds its own PROT bit for "Strong Access Ordering" so something similar might be do-able for GP on arm64.
However, if we anticipate that pages are either GP or !GP for the lifetime of the mapping, I think your suggestions below relating to encoding this in the ELF make more sense.
IIUC, the plan today is to have both:
* An ELF note so that the kernel can set BTI on text pages in the initial ELF image, if that ELF was built with BTI.
* A PROT_BIT so that mmap() and friends can enable BTI on pages dynamically. That's necessary for JITs and ld.so.
Ramana or Dave should be able to elaborate on the finer details.
Thanks, Mark.