Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 16 Aug 2019 13:24:11 +0000
From:      bugzilla-noreply@freebsd.org
To:        bugs@FreeBSD.org
Subject:   [Bug 239894] security.bsd.stack_guard_page default causes Java to crash
Message-ID:  <bug-239894-227-TYcnYkJTTS@https.bugs.freebsd.org/bugzilla/>
In-Reply-To: <bug-239894-227@https.bugs.freebsd.org/bugzilla/>

index | next in thread | previous in thread | raw e-mail

https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=239894

Kurt Miller <kurt@intricatesoftware.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |kurt@intricatesoftware.com

--- Comment #1 from Kurt Miller <kurt@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.

help

Want to link to this message? Use this
URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bug-239894-227-TYcnYkJTTS>