Menu

#1698 drop executable stack flag from hpixml

3.1.0
closed-fixed
nobody
HPI Utils (95)
5
2012-04-20
2012-03-06
Dan Horak
No

The rpmlint tool for checking the rpms against a set of rules found that the hpixml binary is built with the executable stack flag set, because it contains a hand-written assembly code.

"rpmlint -I executable-stack" returns
The binary declares the stack as executable. Executable stack is usually an
error as it is only needed if the code contains GCC trampolines or similar
constructs which uses code on the stack. One common source for needlessly
executable stack cases are object files built from assembler files which don't
define a proper .note.GNU-stack section.

Discussion

  • Anton Pak

    Anton Pak - 2012-03-06

    Well, I wrote that assembly file only to include XML schema into the binary.
    There is no instructions or stack in the assembly file.

     
  • Dan Horak

    Dan Horak - 2012-03-06

    The executable flag is set automagically by gcc/as as I saw some discussions on the web.

     
  • Dan Horak

    Dan Horak - 2012-03-06

    http://sourceware.org/ml/binutils/2003-05/msg00741.html has some info from time when the (non-)executable stack was introduces. Seems that adding
    .section .note.GNU-stack, ""
    to the schema.S file will fix it.

     
  • Dan Horak

    Dan Horak - 2012-03-06

    set non-executable stack flag for schema.S

     
  • Dan Horak

    Dan Horak - 2012-03-06

    see the new attached file for better fix

     
  • Anton Pak

    Anton Pak - 2012-03-06

    Looks good.
    Are you going to commit it into svn trunk?

     
  • Dan Horak

    Dan Horak - 2012-03-06

    I don't think I can commit it, please do it.

     
  • Anton Pak

    Anton Pak - 2012-03-06
    • labels: 584374 --> 636946
     
  • Dan Horak

    Dan Horak - 2012-03-06

    perfect :-)

     
  • Dan Horak

    Dan Horak - 2012-03-06
    • labels: 636946 --> HPI Utils
     
  • Anton Pak

    Anton Pak - 2012-03-06
    • status: open --> closed-fixed
     
  • Anton Pak

    Anton Pak - 2012-04-20
    • milestone: 2040045 --> 3.1.0