Re: Linux + Clang + execstack

2018-09-19 Thread Magnus Ihse Bursie
On 2018-09-19 02:01, Martin Buchholz wrote: Unfortunately, my gmail marked Arthur's emails to this thread as spam, with ensuing confusion. I retargeted this fix to the new bug 8209817: stack is executable when building with Clang on Linux http://cr.openjdk.java.net/~martin/webrevs/jdk/noexecsta

Re: Linux + Clang + execstack

2018-09-18 Thread Martin Buchholz
Unfortunately, my gmail marked Arthur's emails to this thread as spam, with ensuing confusion. I retargeted this fix to the new bug 8209817: stack is executable when building with Clang on Linux http://cr.openjdk.java.net/~martin/webrevs/jdk/noexecstack/ https://bugs.openjdk.java.net/browse/JDK-8

Re: Linux + Clang + execstack

2018-09-13 Thread Magnus Ihse Bursie
We're not entirely happy either. A much higher interface might look like TRY_ADD_LINKER_FLAGS -z noexecstack Agreed. I'm working towards a solution like that. which would add -Wl,-z,noexecstack to LDFLAGS when appropriate hmmm ... I only just noticed that both gcc and clang accept simp

Re: Linux + Clang + execstack

2018-09-13 Thread Martin Buchholz
On Thu, Sep 13, 2018 at 12:48 PM, Magnus Ihse Bursie wrote: >> >> http://cr.openjdk.java.net/~martin/webrevs/jdk/noexecstack/noexecstack.patch > > I'm not entirely happy, but it'll have to do. The problem here is that the > underlying structure of the flags handling is still not good so this > pr

Re: Linux + Clang + execstack

2018-09-13 Thread Magnus Ihse Bursie
On 2018-09-12 18:35, Martin Buchholz wrote: On Wed, Sep 12, 2018 at 4:01 AM, Magnus Ihse Bursie wrote: On 2018-09-05 20:59, Martin Buchholz wrote: So ... Magnus, are you happy with the current state of the proposed patch? I'm sorry Martin, but I can't figure out what the current state is. I t

Re: Linux + Clang + execstack

2018-09-12 Thread Martin Buchholz
On Wed, Sep 12, 2018 at 4:01 AM, Magnus Ihse Bursie wrote: > On 2018-09-05 20:59, Martin Buchholz wrote: > > So ... Magnus, are you happy with the current state of the proposed patch? > > I'm sorry Martin, but I can't figure out what the current state is. I tried > backtracking the discussion but

Re: Linux + Clang + execstack

2018-09-12 Thread Magnus Ihse Bursie
On 2018-09-05 20:59, Martin Buchholz wrote: So ... Magnus, are you happy with the current state of the proposed patch? I'm sorry Martin, but I can't figure out what the current state is. I tried backtracking the discussion but failed. :( Can you please repost the currently proposed patch?

Re: Linux + Clang + execstack

2018-09-05 Thread Martin Buchholz
So ... Magnus, are you happy with the current state of the proposed patch? On Tue, Sep 4, 2018 at 11:50 PM, Magnus Ihse Bursie < magnus.ihse.bur...@oracle.com> wrote: > > For the gcc toolchain this can not be the case: > # Minimum supported linker versions, empty means unspecified > TOOLCHAIN_MIN

Re: Linux + Clang + execstack

2018-09-04 Thread Magnus Ihse Bursie
On 2018-09-05 04:06, Martin Buchholz wrote: Here's Arthur's patch: 8205457: gcc and clang should use the same ld flags http://cr.openjdk.java.net/~martin/webrevs/jdk/noexecstack/ https://bugs.openjdk.java.net/browse/JDK-8205457 T

Re: Linux + Clang + execstack

2018-09-04 Thread Magnus Ihse Bursie
On 2018-09-05 01:01, Martin Buchholz wrote: I think we can all agree that passing flags to the linker to ensure non-executable stack is the right thing to do. But there's a question whether *also* adding something to our assembly language source files will be worth doing.  Neither mechanism is

Re: Linux + Clang + execstack

2018-09-04 Thread Mikael Vidstedt
> On Sep 4, 2018, at 7:06 PM, Martin Buchholz wrote: > > Here's Arthur's patch: > > 8205457: gcc and clang should use the same ld flags > http://cr.openjdk.java.net/~martin/webrevs/jdk/noexecstack/ > https://bugs.openjdk.java.net/browse/JDK-8205457 > > This applies -Wl,-z,noexecstack uniform

Re: Linux + Clang + execstack

2018-09-04 Thread Martin Buchholz
Here's Arthur's patch: 8205457: gcc and clang should use the same ld flags http://cr.openjdk.java.net/~martin/webrevs/jdk/noexecstack/ https://bugs.openjdk.java.net/browse/JDK-8205457 This applies -Wl,-z,noexecstack uniformly to all linker invocations where applicable. TODO: All ld flags on Linu

Re: Linux + Clang + execstack

2018-09-04 Thread Martin Buchholz
I think we can all agree that passing flags to the linker to ensure non-executable stack is the right thing to do. But there's a question whether *also* adding something to our assembly language source files will be worth doing. Neither mechanism is sure to work. For the linker flag, we need to

Re: Linux + Clang + execstack

2018-08-21 Thread Arthur Eubanks
Adding the linker flag sounds good. Opened JDK-8209817. webrev coming soon. On Tue, Aug 21, 2018 at 4:14 AM Magnus Ihse Bursie < magnus.ihse.bur...@oracle.com> wrote: > On 2018-08-21 02:03, David Holmes wrote: > > On 21/08/2018 9:39 AM, Arthur Eubanks wrote: > >> On Mon, Aug 20, 2018 at 4:18 PM

Re: Linux + Clang + execstack

2018-08-21 Thread Magnus Ihse Bursie
On 2018-08-21 02:03, David Holmes wrote: On 21/08/2018 9:39 AM, Arthur Eubanks wrote: On Mon, Aug 20, 2018 at 4:18 PM David Holmes > wrote:     Hi Arthur,     cc'ing build-dev as this is currently a build issue.     On 21/08/2018 3:11 AM, Arthur Eubanks wrote:

Re: Linux + Clang + execstack

2018-08-20 Thread David Holmes
On 21/08/2018 4:29 PM, Mikael Vidstedt wrote: On Aug 20, 2018, at 5:03 PM, David Holmes > wrote: On 21/08/2018 9:39 AM, Arthur Eubanks wrote: On Mon, Aug 20, 2018 at 4:18 PM David Holmes > wrote:   

Re: Linux + Clang + execstack

2018-08-20 Thread Mikael Vidstedt
> On Aug 20, 2018, at 5:03 PM, David Holmes wrote: > > On 21/08/2018 9:39 AM, Arthur Eubanks wrote: >> On Mon, Aug 20, 2018 at 4:18 PM David Holmes > > wrote: >>Hi Arthur, >>cc'ing build-dev as this is currently a build issue. >>On 21/08/2018 3:11 AM

Re: Linux + Clang + execstack

2018-08-20 Thread David Holmes
On 21/08/2018 9:39 AM, Arthur Eubanks wrote: On Mon, Aug 20, 2018 at 4:18 PM David Holmes > wrote: Hi Arthur, cc'ing build-dev as this is currently a build issue. On 21/08/2018 3:11 AM, Arthur Eubanks wrote: > Hi, > > At Google we're t

Re: Linux + Clang + execstack

2018-08-20 Thread David Holmes
Hi Arthur, cc'ing build-dev as this is currently a build issue. On 21/08/2018 3:11 AM, Arthur Eubanks wrote: Hi, At Google we're trying to build hotspot on Linux with clang. One thing that happens is that the resulting libjvm.so is stack executable. When running hotspot we get warnings about t