RFR: 8134396: Check upper limit of flags setting numbers of stack protection pages.

gerard ziemski gerard.ziemski at oracle.com
Wed Aug 26 15:01:57 UTC 2015


hi Goetz,

I don't have the webrev ready yet, but I will make sure to include you when I post it.


cheers

On 08/26/2015 09:25 AM, Lindenmaier, Goetz wrote:
> Hi Gerald,
>
> yes, sure, I can wait.
> Do you have a webrev on review?  If so I could test whether it resolves the
> issue.
>
> Best regards,
>    Goetz.
>
> -----Original Message-----
> From: gerard ziemski [mailto:gerard.ziemski at oracle.com]
> Sent: Mittwoch, 26. August 2015 16:22
> To: Lindenmaier, Goetz; hotspot-runtime-dev at openjdk.java.net
> Subject: Re: RFR: 8134396: Check upper limit of flags setting numbers of stack protection pages.
>
> hi Goetz,
>
> I have an upcoming patch that addresses stack pages and all the other runtime flags that have their ranges/constraints
> unimplemented. Could you withdraw your change for the moment and give me a chance to get my (large) commit in and then
> we can verify that your concerns are met please?
>
>
> cheers
>
> On 08/25/2015 07:35 AM, Lindenmaier, Goetz wrote:
>> Hi,
>>
>> I detected a problem with the values of the flags setting the numbers of stack protection pages.
>> TestOptionsWithRanges shows that illegal values for red and yellow pages are possible.
>>
>> In JavaThread::create_stack_guard_pages(),
>> setting StackRedPages=92233720368547753 and StackYellowPages=1 yields
>>
>> len = (92233720368547753 + 1) * os::vm_page_size()
>>       = 0x8000000000000000 * os::vm_page_size()
>>       = 0
>>
>> Thus not protecting any pages of the stack.
>>
>> The check in os::init_2() succeeds, as there the Shadow pages are considered, too, so that the overflowed value is > 0.
>>
>> On linux, the VM stops with the misleading message
>> "OpenJDK 64-Bit Server VM warning: Attempt to allocate stack guard pages failed."
>> On aix, we get assertions and SIGSEGVs.
>>
>> This fix implements a ConstraintFunc for the three flags involved, checking that no overflow
>> can happen. This is a very nice new feature!
>> http://cr.openjdk.java.net/~goetz/webrevs/8134396-StGPg/webrev.01/
>>
>> Please review this change.  I please need a sponsor.
>>
>> Alternatively, one could set a smaller upper limit in the range.  This limit would have to be small
>> enough to fulfill the property for any page size possible on 32 bit systems.
>>
>> Best regards,
>>     Goetz.
>>
>>
>>
>
>


More information about the hotspot-runtime-dev mailing list