From: Stuart Henderson Subject: Re: missing endbr64 To: Theo Buehler , ports@openbsd.org Cc: Thomas Frohwein Date: Sun, 25 Feb 2024 18:53:24 +0000 On 2024/02/25 13:01, Stuart Henderson wrote: > On 2024/02/25 12:46, Stuart Henderson wrote: > > I will look at rspamd and luajit later today. > > > > lang/luajit.log > > > ld.lld: warning: lj_vm_unwind_c_eh: missing endbr64 > > > ld.lld: warning: lj_vm_unwind_rethrow: missing endbr64 > > > ld.lld: warning: lj_vm_unwind_ff_eh: missing endbr64 > > > ld.lld: warning: lj_cont_cat: missing endbr64 > > > ld.lld: warning: lj_cont_ra: missing endbr64 > > > ld.lld: warning: lj_cont_nop: missing endbr64 > > > ld.lld: warning: lj_cont_condt: missing endbr64 > > > etc > > ah, actually I think I'll need help with luajit, these look like they > may be encoding luajit bytecode so I'm not sure how to deal with them > or whether they're actually needed at all. > > The trivial "make test" example which just prints a string works on an > IBT machine but there are missing endbr64 in various fuctions with an > sse/x87 name - if there are any lua-knowledgeable people reading that > can show me something that would be likely to use these that I can run > to test, that would be handy. > > (No need to worry about arm64 for lang/luajit, it uses the 2.0 branch > which doesn't support arm64 anyway). > semarie points out that luajit already has USE_NOBTCFI (I missed it because it was low down in the Makefile - personally I try to put things like USE_WXNEEDED or USE_NOBTCFI right up top so they're easily visible), so it uses -z nobtcfi. Building without USE_NOBTCFI I confirm that luajit does crash on an IBT machine. Of the ports using luajit's library, most of them also have USE_NOBTCFI. Only games/luasteam doesn't. (graphics/gimp/snapshot only uses the luajit binary so doesn't need USE_NOBTCFI itself for any luajit-related reason). So games/luasteam needs USE_NOBTCFI and a bump.