Re: [PATCH v1 2/2] kselftest: vm: add tests for memory-deny-write-execute

From: Mark Brown
Date: Wed Nov 09 2022 - 08:34:09 EST


On Tue, Nov 08, 2022 at 05:33:03PM +0000, Joey Gouly wrote:
> On Fri, Oct 28, 2022 at 06:03:18PM +0100, Mark Brown wrote:
> > On Wed, Oct 26, 2022 at 04:04:57PM +0100, Joey Gouly wrote:

> > > +#ifdef __aarch64__
> > > +#define PROT_BTI 0x10 /* BTI guarded page */
> > > +#endif

> > We should get this from the kernel headers shouldn't we? We generally
> > rely on things getting pulled in from there rather than locally
> > defining.

> I believe the mman.h included is from the toolchain, not the kernel's uapi headers.
> The toolchain I was using didn't have PROT_BTI defined in its mman.h

I'd expect that whatever we're doing in the build process ought to be
overriding the default headers provided by the toolchain, that's kind of
the point here...

Attachment: signature.asc
Description: PGP signature