Re: arm64 BTI for devel/gmp

2023-04-23 Thread Theo de Raadt
Mark Kettenis wrote: > So as far as I can tell, only arm64 has the -mmark-bti-property > option. On x86 there is a include file that, when included, > emits the "right" .note.gnu.property based on preprocessor macros that > get set based on the compiler options. As far as I can tell, this > i

Re: arm64 BTI for devel/gmp

2023-04-22 Thread Christian Weisgerber
Mark Kettenis: > Here the assembly gets generated by M4 macros. There is macro for > generating CPU-specific function prologues. So provide one for arm64 > that adds the required BTI instruction. ok naddy@ Did you run a "make test" on a machine that enforces BTI? Because I don't think we want

Re: arm64 BTI for devel/gmp

2023-04-22 Thread Theo de Raadt
> The downside of this > approach is that it requires modifications to every x86 assembly file. What happens if I don't do that to an asm file included in the linux plex client???

Re: arm64 BTI for devel/gmp

2023-04-22 Thread Mark Kettenis
> From: "Theo de Raadt" > Date: Fri, 21 Apr 2023 07:54:39 -0600 > > +.if ${MACHINE_ARCH:Maarch64} > +CONFIGURE_ENV+= ASMFLAGS=-mmark-bti-property > +.endif > > For some of these diffs, it might help to consider amd64 (and i386?) at > the same time. Or, all architectures. In theory this type of

Re: arm64 BTI for devel/gmp

2023-04-21 Thread Theo de Raadt
+.if ${MACHINE_ARCH:Maarch64} +CONFIGURE_ENV+= ASMFLAGS=-mmark-bti-property +.endif For some of these diffs, it might help to consider amd64 (and i386?) at the same time. Or, all architectures. In theory this type of thing will eventually show up on some other architectures. The ELF tag doesn't

arm64 BTI for devel/gmp

2023-04-20 Thread Mark Kettenis
Here the assembly gets generated by M4 macros. There is macro for generating CPU-specific function prologues. So provide one for arm64 that adds the required BTI instruction. ok? Index: devel/gmp/Makefile === RCS file: /cvs/ports/