Skip to content

NetBSD portability fixes for HashX and Equi-X

Micah Elizabeth Scott requested to merge beth/tor:hashx-netbsd into main

This patch stack addresses both #40843 (closed) and #40844 (closed).

Tested on NetBSD 9.3 on a x86_64 VM. Compiles and passes unit tests, configured with --enable-gpl -enable-fatal-warnings. I tried ASAN also (--enable-fragile-hardening) but that's broken for apparently separate reasons.

The compile issue (#40843 (closed)) was caused by a feature we aren't even using (huge pages), so this stack fixes the specific problem but also disables that feature.

The runtime issue (#40844 (closed)) is due to an additional security feature on NetBSD that records a 'maximum' protection level per-mmap, which usually doesn't include an execute bit. This causes the hashx compiler to fail. At runtime usually this would just mean Proof of Work is extra slow, but the unit tests verify our compiler works on platforms where it should.

Merge request reports