[8u] RFR(S) 8187045: [linux] Not all libraries in the VM are linked with -z,noexecstack

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

[8u] RFR(S) 8187045: [linux] Not all libraries in the VM are linked with -z,noexecstack

david buck
Hi!

May I please get a review of my backport of this small change:

bug report:
https://bugs.openjdk.java.net/browse/JDK-8187045

JDK 10 review thread:
http://mail.openjdk.java.net/pipermail/build-dev/2017-September/019723.html

JDK 10 changeset:
http://hg.openjdk.java.net/jdk10/master/rev/8b5ed0358b3a

webrevs of JDK 8 backport for review:
http://cr.openjdk.java.net/~dbuck/8187045/

As there have been significant changes (refactoring) to the build files between JDK 8 and JDK 10, I had to modify the change slightly. For each of the two source trees modified, hotspot and root, I tried to follow the preexisting style as much as possible. So for hotspot (really just libjsig.so and the SA agent), I introduced a new variable, LDFLAGS_NO_EXEC_STACK to the make files. (Note that libjvm.so was already built with noexecstack before this fix). However, for the forest root changes, I directly added the needed option to LDFLAGS_JDK. Ultimately these are merely syntax differences, the actual change in resulting builds is exactly the same as in JDK 10.

The test case only required very minor modification (test library refactoring, minor change to how ElfFile::specifies_noexecstack is called).

I have manually confirmed, on arm64 (an impacted platform), that the the included test case now passes after this fix. JPRT hotspot testset run and passed.

Cheers,
-Buck
Reply | Threaded
Open this post in threaded view
|

Re: [8u] RFR(S) 8187045: [linux] Not all libraries in the VM are linked with -z,noexecstack

David Holmes
That all looks reasonable to me.

Thanks,
David H.

On 12/01/2018 3:24 PM, David Buck wrote:

> Hi!
>
> May I please get a review of my backport of this small change:
>
> bug report:
> https://bugs.openjdk.java.net/browse/JDK-8187045
>
> JDK 10 review thread:
> http://mail.openjdk.java.net/pipermail/build-dev/2017-September/019723.html
>
> JDK 10 changeset:
> http://hg.openjdk.java.net/jdk10/master/rev/8b5ed0358b3a
>
> webrevs of JDK 8 backport for review:
> http://cr.openjdk.java.net/~dbuck/8187045/
>
> As there have been significant changes (refactoring) to the build files between JDK 8 and JDK 10, I had to modify the change slightly. For each of the two source trees modified, hotspot and root, I tried to follow the preexisting style as much as possible. So for hotspot (really just libjsig.so and the SA agent), I introduced a new variable, LDFLAGS_NO_EXEC_STACK to the make files. (Note that libjvm.so was already built with noexecstack before this fix). However, for the forest root changes, I directly added the needed option to LDFLAGS_JDK. Ultimately these are merely syntax differences, the actual change in resulting builds is exactly the same as in JDK 10.
>
> The test case only required very minor modification (test library refactoring, minor change to how ElfFile::specifies_noexecstack is called).
>
> I have manually confirmed, on arm64 (an impacted platform), that the the included test case now passes after this fix. JPRT hotspot testset run and passed.
>
> Cheers,
> -Buck
>
Reply | Threaded
Open this post in threaded view
|

Re: [8u] RFR(S) 8187045: [linux] Not all libraries in the VM are linked with -z,noexecstack

Erik Joelsson
In reply to this post by david buck
Looks good to me.

/Erik


On 2018-01-11 21:24, David Buck wrote:

> Hi!
>
> May I please get a review of my backport of this small change:
>
> bug report:
> https://bugs.openjdk.java.net/browse/JDK-8187045
>
> JDK 10 review thread:
> http://mail.openjdk.java.net/pipermail/build-dev/2017-September/019723.html
>
> JDK 10 changeset:
> http://hg.openjdk.java.net/jdk10/master/rev/8b5ed0358b3a
>
> webrevs of JDK 8 backport for review:
> http://cr.openjdk.java.net/~dbuck/8187045/
>
> As there have been significant changes (refactoring) to the build files between JDK 8 and JDK 10, I had to modify the change slightly. For each of the two source trees modified, hotspot and root, I tried to follow the preexisting style as much as possible. So for hotspot (really just libjsig.so and the SA agent), I introduced a new variable, LDFLAGS_NO_EXEC_STACK to the make files. (Note that libjvm.so was already built with noexecstack before this fix). However, for the forest root changes, I directly added the needed option to LDFLAGS_JDK. Ultimately these are merely syntax differences, the actual change in resulting builds is exactly the same as in JDK 10.
>
> The test case only required very minor modification (test library refactoring, minor change to how ElfFile::specifies_noexecstack is called).
>
> I have manually confirmed, on arm64 (an impacted platform), that the the included test case now passes after this fix. JPRT hotspot testset run and passed.
>
> Cheers,
> -Buck