[Bug 239894] security.bsd.stack_guard_page default causes Java to crash
bugzilla-noreply at freebsd.org
bugzilla-noreply at freebsd.org
Fri Aug 16 13:24:12 UTC 2019
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=239894
Kurt Miller <kurt at intricatesoftware.com> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |kurt at intricatesoftware.com
--- Comment #1 from Kurt Miller <kurt at intricatesoftware.com> ---
I'd like to additionally point out the current implementation of kernel placed
guard pages for MAP_STACK has issues that result in three bugs not specifically
related to the jvm:
1) pthread_attr_setguardsize(3) is not working when its size !=
security.bsd.stack_guard_page size.
2) pthread_create(3) will fail if security.bsd.stack_guard_page is set to
number that is greater than pthread_attr_setstacksize(3) size in pages.
3) mprotect(2) of MAP_STACK pages has no effect unless the pages have been
touched previously.
Test programs for #1 and #2 can be found here:
https://github.com/battleblow/openjdk-jdk11u/issues/51#issuecomment-522005954
#3 is demonstrated by test the program pthread_attr_setguardsize_test.c when
security.bsd.stack_guard_page is set to 1. libthr uses mprotect(3) to set its
guard pages and is the reason this test fails.
--
You are receiving this mail because:
You are the assignee for the bug.
More information about the freebsd-bugs
mailing list