RESOLVED FIXED 241386
Set protections on MAP_ALIGNED platforms too for WTF::OSAllocator::tryReserveUncommittedAligned
https://bugs.webkit.org/show_bug.cgi?id=241386
Summary Set protections on MAP_ALIGNED platforms too for WTF::OSAllocator::tryReserve...
Leonardo Taccari
Reported 2022-06-07 15:37:39 PDT
Since 247105@main when tryReserveUncommittedAligned() on Unix-like platforms that supports MAP_ALIGNED (except macOS and Linux) pages are initially mmap-ed via PROT_NONE but then the protections are never readjusted. At least in NetBSD running jsc, e.g. via `jsc -e 0', it ends up in a SIGSEGV.
Attachments
REGRESSION(247105@main): Set protections on MAP_ALIGNED platforms too (1.71 KB, patch)
2022-06-07 15:39 PDT, Leonardo Taccari
no flags
Leonardo Taccari
Comment 1 2022-06-07 15:39:13 PDT
Created attachment 460075 [details] REGRESSION(247105@main): Set protections on MAP_ALIGNED platforms too Since the introduction of tryReserveUncommittedAligned() on platforms that have MAP_ALIGNED via 247105@main, reserved pages via that function never had the protections adjusted and will likely ends up in SIGSEGV.
Leonardo Taccari
Comment 2 2022-06-07 15:43:59 PDT
After this patch and https://bugs.webkit.org/show_bug.cgi?id=241386 is applied jsc should build and runs on NetBSD too without any further patches.
Leonardo Taccari
Comment 3 2022-06-07 15:44:45 PDT
Comment on attachment 460075 [details] REGRESSION(247105@main): Set protections on MAP_ALIGNED platforms too Mark it as ready for review.
Yusuke Suzuki
Comment 4 2022-06-08 08:02:22 PDT
@Leonardo Also I recommend joining WebKit slack from https://webkit.org/getting-started/ And joining #jsc / #reviews channel. There are JSC reviewers you can ask for reviews :)
Leonardo Taccari
Comment 5 2022-06-08 08:17:15 PDT
Great suggestion! I'm there too now! :) Thank you very much Yusuke!
Yusuke Suzuki
Comment 6 2022-06-08 08:42:49 PDT
Comment on attachment 460075 [details] REGRESSION(247105@main): Set protections on MAP_ALIGNED platforms too r=me
EWS
Comment 7 2022-06-08 09:31:30 PDT
Committed r295382 (251390@main): <https://commits.webkit.org/251390@main> All reviewed patches have been landed. Closing bug and clearing flags on attachment 460075 [details].
Radar WebKit Bug Importer
Comment 8 2022-06-08 09:32:13 PDT
Note You need to log in before you can comment on or make changes to this bug.