On Mon, Jun 23, 2025 at 08:31:45PM +0200, Mark Kettenis wrote:
> > Date: Mon, 23 Jun 2025 18:25:17 +0200
> > From: Moritz Buhl <[email protected]>
> >
> > Dear bugs@,
> >
> > for about two weeks I am having trouble running x11/alacritty on
> > my Apple MacBook Air M2 from 2022.
> > I suspect there is a missing BTI instruction in libmesas jit.
>
> Yup!
>
> So the big question is whether it is the Mesa update or the LLVM
> update that broke it. The LLVM update was committed 12 days ago, so
> "about two weeks" could mean it is or it isn't :(.
Mesa still has the local change to add and call
extern "C" void
lp_set_module_branch_protection(LLVMModuleRef MRef)
{
/* Enable standard (bti+pac-ret) branch protection */
llvm::Module *M = llvm::unwrap(MRef);
M->addModuleFlag(llvm::Module::Override, "branch-target-enforcement", 1);
M->addModuleFlag(llvm::Module::Override, "sign-return-address", 1);
}
I don't have a machine with BTI.