[Player-dev] Re: [Video-dev] CR-Client: Get rid of need for executable stack.

[Player-dev] Re: [Video-dev] CR-Client: Get rid of need for executable stack.

Greg Wright gwright at real.com
Mon Mar 7 15:16:02 PST 2005


Ryan Gammon wrote:
> Thanks for looking at this, Greg!
> 
> Looks good to me based on Roland's instructions.
> 
> For the Fedora guys, 150Cay is the client branch that will be included 
> with Helix Player 2.0.


While we are at it, here are the rest of the fixes for
the color converter DLLS, please review, this should be the
last of the Helix .so files with the stack marked as
executable.


Index: mmxlines.asm
===================================================================
RCS file: /cvsroot/video/colconverter/mmxlines.asm,v
retrieving revision 1.2
diff -u -w -r1.2 mmxlines.asm
--- mmxlines.asm	9 Jul 2004 18:36:29 -0000	1.2
+++ mmxlines.asm	7 Mar 2005 23:10:58 -0000
@@ -360,6 +360,15 @@
          xor eax, eax
          ret

+%ifdef ELF
+;;
+;; If we do not have this section here then the GNU
+;; tools will believe we need an executable stack and
+;; mark the DLL as such.
+section .note.GNU-stack
+previous
+%endif
+

  ;;; Ident.
  version: db '$(cl13n7c0r3) Copyright 2002 RealNetworks Inc. Revision:1.0 $',0
Index: p2pyuv.asm
===================================================================
RCS file: /cvsroot/video/colconverter/p2pyuv.asm,v
retrieving revision 1.2
diff -u -w -r1.2 p2pyuv.asm
--- p2pyuv.asm	9 Jul 2004 18:36:29 -0000	1.2
+++ p2pyuv.asm	7 Mar 2005 23:10:58 -0000
@@ -544,6 +544,16 @@
          xor eax, eax
          ret

+
+%ifdef ELF
+;;
+;; If we do not have this section here then the GNU
+;; tools will believe we need an executable stack and
+;; mark the DLL as such.
+section .note.GNU-stack
+previous
+%endif
+
  ;;; leave a trace
  version: db '$(gfw) Copyright 2001 RealNetworks Inc. Revision:1.0 $',0

Index: y2touy.asm
===================================================================
RCS file: /cvsroot/video/colconverter/y2touy.asm,v
retrieving revision 1.2
diff -u -w -r1.2 y2touy.asm
--- y2touy.asm	9 Jul 2004 18:36:29 -0000	1.2
+++ y2touy.asm	7 Mar 2005 23:10:58 -0000
@@ -185,8 +185,17 @@
          xor eax, eax
          ret

+%ifdef ELF
+;;
+;; If we do not have this section here then the GNU
+;; tools will believe we need an executable stack and
+;; mark the DLL as such.
+section .note.GNU-stack
+previous
+%endif
+
  ;;; leave a trace
-version: db '$(gfw) Copyright 2001 RealNetworks Inc. Revision:1.0 $',0
+version: db '$(gfw) Helix Revision:1.0 $',0



Index: yuvammx.asm
===================================================================
RCS file: /cvsroot/video/colconverter/yuvammx.asm,v
retrieving revision 1.2
diff -u -w -r1.2 yuvammx.asm
--- yuvammx.asm	9 Jul 2004 18:36:29 -0000	1.2
+++ yuvammx.asm	7 Mar 2005 23:10:58 -0000
@@ -2425,6 +2425,16 @@
      ret


+
+%ifdef ELF
+;;
+;; If we do not have this section here then the GNU
+;; tools will believe we need an executable stack and
+;; mark the DLL as such.
+section .note.GNU-stack
+previous
+%endif
+
  ;_I420andI420toI420_MMX_sub endp
  ;====================================
  ;_TEXT ENDS
Index: i386/elf/mmxlines.o
===================================================================
RCS file: /cvsroot/video/colconverter/i386/elf/mmxlines.o,v
retrieving revision 1.1
diff -u -w -r1.1 mmxlines.o
Binary files /tmp/cvsEd5EZJ and mmxlines.o differ
Index: i386/elf/p2pyuv.o
===================================================================
RCS file: /cvsroot/video/colconverter/i386/elf/p2pyuv.o,v
retrieving revision 1.1
diff -u -w -r1.1 p2pyuv.o
Binary files /tmp/cvsQ7RlMT and p2pyuv.o differ
Index: i386/elf/y2touy.o
===================================================================
RCS file: /cvsroot/video/colconverter/i386/elf/y2touy.o,v
retrieving revision 1.1
diff -u -w -r1.1 y2touy.o
Binary files /tmp/cvs4Asbz3 and y2touy.o differ
Index: i386/elf/yuvammx.o
===================================================================
RCS file: /cvsroot/video/colconverter/i386/elf/yuvammx.o,v
retrieving revision 1.1
diff -u -w -r1.1 yuvammx.o
Binary files /tmp/cvsSyVjrd and yuvammx.o differ



--greg.


> 
> Greg Wright wrote:
> 
>> Modified by: gwright
>> Reviewed by:
>>        Date:
>>     Project: linux player release.
>>
>> Synopsis:
>>
>>     Raw ASM files do not have any marker for the .note.GNU-stack
>>         section. If the GNU tool chain doesn't see this then it must
>>         assume that the .so that the ASM object file is linked into
>>         requires one and marks the whole .so as needing it. Executable
>>         stacks can lead to security problems so we only want them marked
>>         like that if we really need it. This isn't the case with our 
>> video
>>         site.
>>
>> Fix:
>>
>>         Tell the GNU tool chain we don't need an executable stack by
>>         adding in the missing section.
>>
>> Files Modified:
>>
>>         video/sitelib/i386/alphablend.asm
>>         video/sitelib/i386/elf/alphablend.o
>>
>>  Image Size and Heap Use impact:     NONE
>> Platforms and Profiles Affected:     GNU tool chains with full site.
>> Distribution Libraries affected:     NONE
>>
>> Branch:
>>
>>        HEAD & 150Cay.
>>
>>
>>
>> Index: alphablend.asm
>> ===================================================================
>> RCS file: /cvsroot/video/sitelib/i386/alphablend.asm,v
>> retrieving revision 1.2
>> diff -u -w -r1.2 alphablend.asm
>> --- alphablend.asm    9 Jul 2004 18:34:31 -0000    1.2
>> +++ alphablend.asm    7 Mar 2005 22:29:23 -0000
>> @@ -233,9 +234,18 @@
>>
>>          ret                 ; Get out...
>>
>> +%ifdef ELF
>> +;;
>> +;; If we do not have this section here then the GNU
>> +;; tools will believe we need an executable stack and
>> +;; mark the DLL as such.
>> +section .note.GNU-stack
>> +previous
>> +%endif
>> +
>>
>>  ;;; leave a trace
>> -version: db '@(#) $ RealNetworks Revision: .9 $',0
>> +version: db '@(#) $ Helix Revision: 1.0 $',0
>>
>>
>>
>> Index: elf/alphablend.o
>> ===================================================================
>> RCS file: /cvsroot/video/sitelib/i386/elf/alphablend.o,v
>> retrieving revision 1.1
>> diff -u -w -r1.1 alphablend.o
>> Binary files /tmp/cvsSUMT8F and alphablend.o differ
>>
>> _______________________________________________
>> Video-dev mailing list
>> Video-dev at helixcommunity.org
>> http://lists.helixcommunity.org/mailman/listinfo/video-dev
>>
> 
> 



More information about the Player-dev mailing list
 

Site Map   |   Terms of Use   |   Privacy Policy   |   Contact Us

Copyright © 1995-2007 RealNetworks, Inc. All rights reserved. RealNetworks and Helix are trademarks of RealNetworks.
All other trademarks or registered trademarks are the property of their respective holders.