Created attachment 230983 [details] 0001-emulators-rpcs3-set-wxneeded-ELF-flag.patch RPCS3 doesn't support W^X, a "verification error" pops up on launch. Hopefully the osversion check is fine
Created attachment 230984 [details] 0001-emulators-rpcs3-set-wxneeded-ELF-flag.patch v2 err after the pre.mk
I can't reproduce on -CURRENT amd64. If W^X isn't enabled by default then better wait for a generic way to opt out of hardening features. Many emulators cannot handle W^X due to JIT e.g., ppsspp and yuzu-qt5 are also affected. Sometimes such issues can be fixed upstream e.g., ppsspp can enable PlatformIsWXExclusive() like OpenBSD. Originally, ports 49f593b2f77f papered over an upstream bug exposed by ASLR. I just didn't have time to gather enough data and analyze to notify upstream.
Comment on attachment 230984 [details] 0001-emulators-rpcs3-set-wxneeded-ELF-flag.patch v2 wxneeded does exist on FreeBSD 12.3, so OSVERSION check here introduces unnecessary complication just to support what will EOL after 2022-03-31.
A commit in branch main references this bug: URL: https://cgit.FreeBSD.org/ports/commit/?id=0388b176339f5394663840bad25d8cdcfd283611 commit 0388b176339f5394663840bad25d8cdcfd283611 Author: Jan Beich <jbeich@FreeBSD.org> AuthorDate: 2022-04-01 17:22:09 +0000 Commit: Jan Beich <jbeich@FreeBSD.org> CommitDate: 2022-04-01 18:39:29 +0000 emulators/rpcs3: unbreak with kern.elf64.allow_wx=0 $ rpcs3 Verification failed (in file rpcs3/util/vm_native.cpp:192[:3], in function memory_commit) (errno=13=Permission denied) Thread id = 0x814a12000. Killed PR: 261173 Submitted by: Greg V (based on) emulators/rpcs3/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)