Skip to content
Snippets Groups Projects
Forked from The Tor Project / Core / Tor
Source project has a limited visibility.
  • Micah Elizabeth Scott's avatar
    95e8ffa9
    hashx: Fix compiled hash function on NetBSD · 95e8ffa9
    Micah Elizabeth Scott authored
    NetBSD includes the idea of a 'maximum protection' per-region,
    and an mprotect which exceeds the max protection will be denied.
    
    If we explicitly ask for a maximum which includes execute permission, we
    can successfully swap our code buffer's permissions between read-write
    and read-execute when each hash program is compiled.
    
    With this patch, the crypto/hashx tests pass on NetBSD 9.
    This addresses bug #40844
    95e8ffa9
    History
    hashx: Fix compiled hash function on NetBSD
    Micah Elizabeth Scott authored
    NetBSD includes the idea of a 'maximum protection' per-region,
    and an mprotect which exceeds the max protection will be denied.
    
    If we explicitly ask for a maximum which includes execute permission, we
    can successfully swap our code buffer's permissions between read-write
    and read-execute when each hash program is compiled.
    
    With this patch, the crypto/hashx tests pass on NetBSD 9.
    This addresses bug #40844