[prev in list] [next in list] [prev in thread] [next in thread] 

List:       xvid-devel
Subject:    [XviD-devel] NX-Stack Patch (AMD64)
From:       Sebastian Siewior <xvid () Chamillionaire ! trickip ! net>
Date:       2006-01-15 0:01:33
Message-ID: 20060115000133.GB2917 () Chamillionaire ! breakpoint ! cc
[Download RAW message or body]

Hello,

please find attached a patch (one line) against xvidcore-1.1.0 that will
make libxvidcore.so.4.1' stack non-executable. Files with executable
stacks make trouble on pax-enabled systems.

This is how it should be

 scanelf -e libxvidcore.so.4.1 
 TYPE   STK/REL/PTL FILE 
ET_DYN RW- --- RW- libxvidcore.so.4.1 

This is how it is without:

 scanelf -e libxvidcore.so.4.1 
 TYPE   STK/REL/PTL FILE 
ET_DYN RWX --- RW- libxvidcore.so.4.1 


-- 
Regards
Sebastian Siewior

["nx_patch.diff" (text/plain)]

diff -urN xvidcore-1.1.0-org/src/dct/x86_64_asm/fdct_mmx_skal.asm \
                xvidcore-1.1.0/src/dct/x86_64_asm/fdct_mmx_skal.asm
--- xvidcore-1.1.0-org/src/dct/x86_64_asm/fdct_mmx_skal.asm	2005-12-30 \
                15:34:57.000000000 +0100
+++ xvidcore-1.1.0/src/dct/x86_64_asm/fdct_mmx_skal.asm	2006-01-15 00:29:12.747581880 \
+0100 @@ -461,3 +461,6 @@
 ;-----------------------------------------------------------------------------
 
 MAKE_FDCT_FUNC fdct_skal_x86_64, fMTX_MULT_XMM
+
+section ".note.GNU-stack" noalloc noexec nowrite progbits
+
diff -urN xvidcore-1.1.0-org/src/dct/x86_64_asm/idct_mmx.asm \
                xvidcore-1.1.0/src/dct/x86_64_asm/idct_mmx.asm
--- xvidcore-1.1.0-org/src/dct/x86_64_asm/idct_mmx.asm	2005-12-30 15:34:57.000000000 \
                +0100
+++ xvidcore-1.1.0/src/dct/x86_64_asm/idct_mmx.asm	2006-01-15 00:29:12.747581880 \
+0100 @@ -523,3 +523,6 @@
     ret
 .endfunc
 
+
+section ".note.GNU-stack" noalloc noexec nowrite progbits
+
diff -urN xvidcore-1.1.0-org/src/image/x86_64_asm/interpolate8x8_mmx.asm \
                xvidcore-1.1.0/src/image/x86_64_asm/interpolate8x8_mmx.asm
--- xvidcore-1.1.0-org/src/image/x86_64_asm/interpolate8x8_mmx.asm	2005-12-30 \
                15:34:57.000000000 +0100
+++ xvidcore-1.1.0/src/image/x86_64_asm/interpolate8x8_mmx.asm	2006-01-15 \
00:29:12.747581880 +0100 @@ -706,4 +706,6 @@
 
   pop rbx
   ret
-.endfunc
\ No newline at end of file
+.endfunc
+section ".note.GNU-stack" noalloc noexec nowrite progbits
+
diff -urN xvidcore-1.1.0-org/src/image/x86_64_asm/interpolate8x8_xmm.asm \
                xvidcore-1.1.0/src/image/x86_64_asm/interpolate8x8_xmm.asm
--- xvidcore-1.1.0-org/src/image/x86_64_asm/interpolate8x8_xmm.asm	2005-12-30 \
                15:34:57.000000000 +0100
+++ xvidcore-1.1.0/src/image/x86_64_asm/interpolate8x8_xmm.asm	2006-01-15 \
00:29:12.747581880 +0100 @@ -704,3 +704,6 @@
 
   EPILOG
 .endfunc
+
+section ".note.GNU-stack" noalloc noexec nowrite progbits
+
diff -urN xvidcore-1.1.0-org/src/image/x86_64_asm/qpel_mmx.asm \
                xvidcore-1.1.0/src/image/x86_64_asm/qpel_mmx.asm
--- xvidcore-1.1.0-org/src/image/x86_64_asm/qpel_mmx.asm	2005-12-30 \
                15:34:57.000000000 +0100
+++ xvidcore-1.1.0/src/image/x86_64_asm/qpel_mmx.asm	2006-01-15 00:29:12.747581880 \
+0100 @@ -1152,3 +1152,6 @@
 .endfunc
 
 ;//////////////////////////////////////////////////////////////////////
+
+section ".note.GNU-stack" noalloc noexec nowrite progbits
+
diff -urN xvidcore-1.1.0-org/src/motion/x86_64_asm/sad_mmx.asm \
                xvidcore-1.1.0/src/motion/x86_64_asm/sad_mmx.asm
--- xvidcore-1.1.0-org/src/motion/x86_64_asm/sad_mmx.asm	2005-12-30 \
                15:34:58.000000000 +0100
+++ xvidcore-1.1.0/src/motion/x86_64_asm/sad_mmx.asm	2006-01-15 00:29:12.747581880 \
+0100 @@ -162,4 +162,6 @@
 
   ;; All done
   ret
-.endfunc
\ No newline at end of file
+.endfunc
+section ".note.GNU-stack" noalloc noexec nowrite progbits
+
diff -urN xvidcore-1.1.0-org/src/motion/x86_64_asm/sad_xmm.asm \
                xvidcore-1.1.0/src/motion/x86_64_asm/sad_xmm.asm
--- xvidcore-1.1.0-org/src/motion/x86_64_asm/sad_xmm.asm	2005-12-30 \
                15:34:58.000000000 +0100
+++ xvidcore-1.1.0/src/motion/x86_64_asm/sad_xmm.asm	2006-01-15 00:29:12.747581880 \
+0100 @@ -439,4 +439,6 @@
   movd eax, mm7
   pop rbx
   ret
-.endfunc
\ No newline at end of file
+.endfunc
+section ".note.GNU-stack" noalloc noexec nowrite progbits
+
diff -urN xvidcore-1.1.0-org/src/quant/x86_64_asm/quantize_h263_mmx.asm \
                xvidcore-1.1.0/src/quant/x86_64_asm/quantize_h263_mmx.asm
--- xvidcore-1.1.0-org/src/quant/x86_64_asm/quantize_h263_mmx.asm	2005-12-30 \
                15:34:58.000000000 +0100
+++ xvidcore-1.1.0/src/quant/x86_64_asm/quantize_h263_mmx.asm	2006-01-15 \
00:29:12.747581880 +0100 @@ -505,3 +505,6 @@
   xor rax, rax
   ret
 .endfunc
+
+section ".note.GNU-stack" noalloc noexec nowrite progbits
+
diff -urN xvidcore-1.1.0-org/src/quant/x86_64_asm/quantize_mpeg_xmm.asm \
                xvidcore-1.1.0/src/quant/x86_64_asm/quantize_mpeg_xmm.asm
--- xvidcore-1.1.0-org/src/quant/x86_64_asm/quantize_mpeg_xmm.asm	2005-12-30 \
                15:34:58.000000000 +0100
+++ xvidcore-1.1.0/src/quant/x86_64_asm/quantize_mpeg_xmm.asm	2006-01-15 \
00:29:12.747581880 +0100 @@ -807,4 +807,6 @@
 
   xor rax, rax
   ret
-.endfunc
\ No newline at end of file
+.endfunc
+section ".note.GNU-stack" noalloc noexec nowrite progbits
+
diff -urN xvidcore-1.1.0-org/src/utils/x86_64_asm/cpuid.asm \
                xvidcore-1.1.0/src/utils/x86_64_asm/cpuid.asm
--- xvidcore-1.1.0-org/src/utils/x86_64_asm/cpuid.asm	2005-12-30 15:34:58.000000000 \
                +0100
+++ xvidcore-1.1.0/src/utils/x86_64_asm/cpuid.asm	2006-01-15 00:29:12.747581880 +0100
@@ -216,3 +216,6 @@
 .endfunc
 
 
+
+section ".note.GNU-stack" noalloc noexec nowrite progbits
+
diff -urN xvidcore-1.1.0-org/src/utils/x86_64_asm/interlacing_mmx.asm \
                xvidcore-1.1.0/src/utils/x86_64_asm/interlacing_mmx.asm
--- xvidcore-1.1.0-org/src/utils/x86_64_asm/interlacing_mmx.asm	2005-12-30 \
                15:34:58.000000000 +0100
+++ xvidcore-1.1.0/src/utils/x86_64_asm/interlacing_mmx.asm	2006-01-15 \
00:29:12.747581880 +0100 @@ -212,3 +212,6 @@
   ret
 .endfunc
 
+
+section ".note.GNU-stack" noalloc noexec nowrite progbits
+
diff -urN xvidcore-1.1.0-org/src/utils/x86_64_asm/mem_transfer_mmx.asm \
                xvidcore-1.1.0/src/utils/x86_64_asm/mem_transfer_mmx.asm
--- xvidcore-1.1.0-org/src/utils/x86_64_asm/mem_transfer_mmx.asm	2005-12-30 \
                15:34:58.000000000 +0100
+++ xvidcore-1.1.0/src/utils/x86_64_asm/mem_transfer_mmx.asm	2006-01-15 \
00:29:12.747581880 +0100 @@ -434,3 +434,6 @@
   COPY_8_TO_8
   ret
 .endfunc
+
+section ".note.GNU-stack" noalloc noexec nowrite progbits
+



[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic