[Bug ld/29411] ld warning on SPARC: LOAD segment with RWX permissions

2022-07-26 Thread cvs-commit at gcc dot gnu.org
https://sourceware.org/bugzilla/show_bug.cgi?id=29411

--- Comment #1 from cvs-commit at gcc dot gnu.org  ---
The master branch has been updated by Nick Clifton :

https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=91896b4d6a7d312e850094eaaa5b965a9e3dc39b

commit 91896b4d6a7d312e850094eaaa5b965a9e3dc39b
Author: Nick Clifton 
Date:   Tue Jul 26 14:25:33 2022 +0100

Stop the linker from complaining about RWX segments in sparc-solaris
targets.

PR 29411
* configure.tgt (ac_default_ld_warn_rwx_segments): Disable for
sparc-solaris configurations.

-- 
You are receiving this mail because:
You are on the CC list for the bug.


[Bug ld/29411] ld warning on SPARC: LOAD segment with RWX permissions

2022-07-26 Thread nickc at redhat dot com
https://sourceware.org/bugzilla/show_bug.cgi?id=29411

Nick Clifton  changed:

   What|Removed |Added

 Resolution|--- |FIXED
 CC||nickc at redhat dot com
 Status|NEW |RESOLVED

--- Comment #2 from Nick Clifton  ---
Hi Rainer,

  The warning is intended to alter users to the fact that a segment has been
created with all three permission flags set - something that is very tempting
to attackers looking to inject code into a binary.

  Disabling the warning for specific target configurations is possible however.
 There is a section of code at the start of ld/configure.tgt to do this.  

  I have gone ahead and added the sparc-solaris targets to the list of targets
for which the warning should be supressed by default.  (It can still be enabled
via a command line option, if the user so desires).

Cheers
  Nick

-- 
You are receiving this mail because:
You are on the CC list for the bug.


[Bug ld/29411] ld warning on SPARC: LOAD segment with RWX permissions

2022-07-26 Thread ro at CeBiTec dot Uni-Bielefeld.DE
https://sourceware.org/bugzilla/show_bug.cgi?id=29411

--- Comment #4 from Rainer Orth  ---
> --- Comment #2 from Nick Clifton  ---
> Hi Rainer,
>
>   The warning is intended to alter users to the fact that a segment has been
> created with all three permission flags set - something that is very tempting
> to attackers looking to inject code into a binary.
>
>   Disabling the warning for specific target configurations is possible 
> however.
>  There is a section of code at the start of ld/configure.tgt to do this.  
>
>   I have gone ahead and added the sparc-solaris targets to the list of targets
> for which the warning should be supressed by default.  (It can still be 
> enabled
> via a command line option, if the user so desires).

I missed this, although I saw the initial discussion about this warning
fly by.  However, this is not a Solaris/SPARC-only issue: I first saw it
on Linux/sparc64.  Given the SPARC and SPARC V9 psABIs, I guess it
affects at least all SPARC/ELF targets (if not SPARC in general).

Thanks.
Rainer

-- 
You are receiving this mail because:
You are on the CC list for the bug.


[Bug ld/29411] ld warning on SPARC: LOAD segment with RWX permissions

2022-07-26 Thread cvs-commit at gcc dot gnu.org
https://sourceware.org/bugzilla/show_bug.cgi?id=29411

--- Comment #3 from cvs-commit at gcc dot gnu.org  ---
The binutils-2_39-branch branch has been updated by Nick Clifton
:

https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=41b6fc466ce51f094c53b60f767cd000c41d4c2d

commit 41b6fc466ce51f094c53b60f767cd000c41d4c2d
Author: Nick Clifton 
Date:   Tue Jul 26 14:31:13 2022 +0100

Stop the linker from complaining about RWX segments on sparc-solaris
targets.

PR 29411
* configure.tgt (ac_default_ld_warn_rwx_segments): Disable for
sparc-solaris configurations.

-- 
You are receiving this mail because:
You are on the CC list for the bug.


[Bug ld/29411] ld warning on SPARC: LOAD segment with RWX permissions

2022-07-26 Thread nickc at redhat dot com
https://sourceware.org/bugzilla/show_bug.cgi?id=29411

Nick Clifton  changed:

   What|Removed |Added

 Resolution|FIXED   |---
 Status|RESOLVED|REOPENED

--- Comment #5 from Nick Clifton  ---
(In reply to Rainer Orth from comment #4)

> I missed this, although I saw the initial discussion about this warning
> fly by.  However, this is not a Solaris/SPARC-only issue: I first saw it
> on Linux/sparc64.  Given the SPARC and SPARC V9 psABIs, I guess it
> affects at least all SPARC/ELF targets (if not SPARC in general).

Ah - I missed this.  Would you mind applying a small patch on top of mine then,
that tweaks the regexp for sparc targets ?  (I am just a little bit swamped at
the moment.  I have come back from PTO to find 19,756 emails waiting for me...)

-- 
You are receiving this mail because:
You are on the CC list for the bug.


[Bug ld/29411] ld warning on SPARC: LOAD segment with RWX permissions

2022-07-26 Thread ro at CeBiTec dot Uni-Bielefeld.DE
https://sourceware.org/bugzilla/show_bug.cgi?id=29411

--- Comment #6 from Rainer Orth  ---
> --- Comment #5 from Nick Clifton  ---
> (In reply to Rainer Orth from comment #4)
>
>> I missed this, although I saw the initial discussion about this warning
>> fly by.  However, this is not a Solaris/SPARC-only issue: I first saw it
>> on Linux/sparc64.  Given the SPARC and SPARC V9 psABIs, I guess it
>> affects at least all SPARC/ELF targets (if not SPARC in general).
>
> Ah - I missed this.  Would you mind applying a small patch on top of mine 
> then,
> that tweaks the regexp for sparc targets ?  (I am just a little bit swamped at
> the moment.  I have come back from PTO to find 19,756 emails waiting for 
> me...)

Sure.  I'll check if we want this for all SPARC targets or restrict to
some subset (ELF) somehow.

-- 
You are receiving this mail because:
You are on the CC list for the bug.


[Bug ld/29411] ld warning on SPARC: LOAD segment with RWX permissions

2022-07-28 Thread ro at CeBiTec dot Uni-Bielefeld.DE
https://sourceware.org/bugzilla/show_bug.cgi?id=29411

--- Comment #7 from Rainer Orth  ---
> --- Comment #6 from Rainer Orth  ---
>> --- Comment #5 from Nick Clifton  ---
>> (In reply to Rainer Orth from comment #4)
>>
>>> I missed this, although I saw the initial discussion about this warning
>>> fly by.  However, this is not a Solaris/SPARC-only issue: I first saw it
>>> on Linux/sparc64.  Given the SPARC and SPARC V9 psABIs, I guess it
>>> affects at least all SPARC/ELF targets (if not SPARC in general).
>>
>> Ah - I missed this.  Would you mind applying a small patch on top of mine 
>> then,
>> that tweaks the regexp for sparc targets ?  (I am just a little bit swamped 
>> at
>> the moment.  I have come back from PTO to find 19,756 emails waiting for 
>> me...)
>
> Sure.  I'll check if we want this for all SPARC targets or restrict to
> some subset (ELF) somehow.

Patch posted: https://sourceware.org/pipermail/binutils/2022-July/122057.html

-- 
You are receiving this mail because:
You are on the CC list for the bug.


[Bug ld/29411] ld warning on SPARC: LOAD segment with RWX permissions

2022-07-29 Thread cvs-commit at gcc dot gnu.org
https://sourceware.org/bugzilla/show_bug.cgi?id=29411

--- Comment #8 from cvs-commit at gcc dot gnu.org  ---
The binutils-2_39-branch branch has been updated by Rainer Orth
:

https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=4b596a7719bfa1bcb8781f59faba66a20c4ab2da

commit 4b596a7719bfa1bcb8781f59faba66a20c4ab2da
Author: Rainer Orth 
Date:   Fri Jul 29 09:04:59 2022 +0200

ld: Extend ac_default_ld_warn_rwx_segments to all SPARC targets [PR29411]

As discussed in PR ld/29411, the ld warning

[...] has a LOAD segment with RWX permissions

needs to be disabled on all SPARC targets, not just Solaris/SPARC: the
.plt section is required to be RWX by the 32-bit SPARC ELF psABI and the
64-bit SPARC Compliance Definition 2.4.1.  Given that ld only supports
SPARC ELF targets, this patch implements this.

Tested on sparc64-unknown-linux-gnu and sparc-sun-solaris2.11.

2022-07-28  Rainer Orth  

ld:
PR ld/29411
* configure.tgt (ac_default_ld_warn_rwx_segments): Extend to all
sparc targets.  Expand comment.

-- 
You are receiving this mail because:
You are on the CC list for the bug.


[Bug ld/29411] ld warning on SPARC: LOAD segment with RWX permissions

2022-07-29 Thread cvs-commit at gcc dot gnu.org
https://sourceware.org/bugzilla/show_bug.cgi?id=29411

--- Comment #9 from cvs-commit at gcc dot gnu.org  ---
The master branch has been updated by Rainer Orth :

https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=b80b72c06c29d257b60b4002bd9d6c40dec94ec9

commit b80b72c06c29d257b60b4002bd9d6c40dec94ec9
Author: Rainer Orth 
Date:   Fri Jul 29 09:06:40 2022 +0200

ld: Extend ac_default_ld_warn_rwx_segments to all SPARC targets [PR29411]

As discussed in PR ld/29411, the ld warning

[...] has a LOAD segment with RWX permissions

needs to be disabled on all SPARC targets, not just Solaris/SPARC: the
.plt section is required to be RWX by the 32-bit SPARC ELF psABI and the
64-bit SPARC Compliance Definition 2.4.1.  Given that ld only supports
SPARC ELF targets, this patch implements this.

Tested on sparc64-unknown-linux-gnu and sparc-sun-solaris2.11.

2022-07-28  Rainer Orth  

ld:
PR ld/29411
* configure.tgt (ac_default_ld_warn_rwx_segments): Extend to all
sparc targets.  Expand comment.

-- 
You are receiving this mail because:
You are on the CC list for the bug.


[Bug ld/29411] ld warning on SPARC: LOAD segment with RWX permissions

2022-07-29 Thread ro at gcc dot gnu.org
https://sourceware.org/bugzilla/show_bug.cgi?id=29411

Rainer Orth  changed:

   What|Removed |Added

 Resolution|--- |FIXED
URL||https://sourceware.org/pipe
   ||rmail/binutils/2022-July/12
   ||2057.html
   Target Milestone|--- |2.39
   Assignee|unassigned at sourceware dot org   |ro at gcc dot gnu.org
 Status|REOPENED|RESOLVED

--- Comment #10 from Rainer Orth  ---
Fully fixed for binutils 2.39.

-- 
You are receiving this mail because:
You are on the CC list for the bug.


[Bug ld/29411] ld warning on SPARC: LOAD segment with RWX permissions

2022-09-16 Thread glaubitz at physik dot fu-berlin.de
https://sourceware.org/bugzilla/show_bug.cgi?id=29411

John Paul Adrian Glaubitz  changed:

   What|Removed |Added

 CC||glaubitz at physik dot 
fu-berlin.d
   ||e

-- 
You are receiving this mail because:
You are on the CC list for the bug.


[Bug ld/29411] ld warning on SPARC: LOAD segment with RWX permissions

2023-07-30 Thread sam at gentoo dot org
https://sourceware.org/bugzilla/show_bug.cgi?id=29411

Sam James  changed:

   What|Removed |Added

 CC||sam at gentoo dot org

-- 
You are receiving this mail because:
You are on the CC list for the bug.