On Sunday 30 of January 2005 12:04, Piotr Zięcik wrote:
> Dnia niedziela, 30 stycznia 2005 11:51, Paweł Sikora napisał:
> > nie! nie będziemy dla popsutych programów przewalać wszystkich binarek.
> > jak ktoś chce używać pax-a, to powinien wiedzieć co się z tym wiąże
> > i kilka kłopotliwych bibliotek na serwerze sobie oflaguje odpowiednio
> > albo autorzy je poprawią, bo w większości przypadków wykonywalny stos,
> > to wina źle napisanych wstawek w asm., które z reguły go nie potrzebują.
> > z sytuacji są przynajmniej 3 wyjścia:
> >
> > [1] dodać .section .note.GNU-stack,"",@progbits; .previous
> >     do plików .S które nie wykorzystują wykonywalnego stosu.
> > [2] kompilować te programy przekazując do gcc -Wa,--noexecstack.
> > [3] linkować z flagą -Wl,-z,noexecstack.
> >
> > w ostateczności dla niereformowalnych wyjątków można %post puścić
> > execstack, a nie protezować wszystkie binaria.
>
> 1. Ciężko sobie coś oflagowac, jak Ci nic nie chce działać z mount, rpm i
> ssh włącznie.  Jak dotychczas używałem PaX'a z powodzeniem na wielu
> maszynach i to pierwszy tego rodzaju problem z jakim się spotkałem.
>
> 2. Bardzo chętnie sobie dodam makro, co by mi się to falgowało
> automatycznie biblioteki podczas instalowania rpm'a - tylko niech mi ktoś
> powie jak bo na rpm'owych makrach sie nie znam.
>
> 3. Dla mnie każde rozwiązanie będzie dobrze pod warunkiem że działa -
> chodzi mi tylko o to żeby był jakiś sposób na to by dystrybucyjne binarki
> współpracowały z PaX'em - nawet jeśli będzie to wymagało wstukania
> kilkunastu linijek do /etc/rpm/macros ...

sprawdź to w .rpmmacros

%rpmcflags      %optflags%{debuginfocflags} -pipe -Wa,--noexecstack

readelf -WS libgcrypt.a wykazało, że moduły asm. mpih-*.o
wzbogaciły się o sekcję .note-GNU-stack, więc sprawdź sobie
w chroot-ie, czy będą działać z PaX-em.

-- 
/* Copyright (C) 2003, SCO, Inc. This is valuable Intellectual Property. */

                           #define say(x) lie(x)
--- 0.log	2005-01-30 12:21:43.101866328 +0100
+++ 1.log	2005-01-30 12:35:41.017483792 +0100
@@ -1155,7 +1155,7 @@
   O (extra OS processing required) o (OS specific), p (processor specific)
 
 File: libgcrypt.a(mpih-add1.o)
-There are 7 section headers, starting at offset 0xfc:
+There are 8 section headers, starting at offset 0x10c:
 
 Section Headers:
   [Nr] Name              Type            Addr     Off    Size   ES Flg Lk Inf Al
@@ -1163,16 +1163,17 @@
   [ 1] .text             PROGBITS        00000000 000038 000098 00  AX  0   0  8
   [ 2] .data             PROGBITS        00000000 0000d0 000000 00  WA  0   0  4
   [ 3] .bss              NOBITS          00000000 0000d0 000000 00  WA  0   0  4
-  [ 4] .shstrtab         STRTAB          00000000 0000d0 00002c 00      0   0  1
-  [ 5] .symtab           SYMTAB          00000000 000214 000070 10      6   6  4
-  [ 6] .strtab           STRTAB          00000000 000284 00001a 00      0   0  1
+  [ 4] .note.GNU-stack   PROGBITS        00000000 0000d0 000000 00      0   0  1
+  [ 5] .shstrtab         STRTAB          00000000 0000d0 00003c 00      0   0  1
+  [ 6] .symtab           SYMTAB          00000000 00024c 000080 10      7   7  4
+  [ 7] .strtab           STRTAB          00000000 0002cc 00001a 00      0   0  1
 Key to Flags:
   W (write), A (alloc), X (execute), M (merge), S (strings)
   I (info), L (link order), G (group), x (unknown)
   O (extra OS processing required) o (OS specific), p (processor specific)
 
 File: libgcrypt.a(mpih-sub1.o)
-There are 7 section headers, starting at offset 0xfc:
+There are 8 section headers, starting at offset 0x10c:
 
 Section Headers:
   [Nr] Name              Type            Addr     Off    Size   ES Flg Lk Inf Al
@@ -1180,16 +1181,17 @@
   [ 1] .text             PROGBITS        00000000 000038 000098 00  AX  0   0  8
   [ 2] .data             PROGBITS        00000000 0000d0 000000 00  WA  0   0  4
   [ 3] .bss              NOBITS          00000000 0000d0 000000 00  WA  0   0  4
-  [ 4] .shstrtab         STRTAB          00000000 0000d0 00002c 00      0   0  1
-  [ 5] .symtab           SYMTAB          00000000 000214 000070 10      6   6  4
-  [ 6] .strtab           STRTAB          00000000 000284 00001a 00      0   0  1
+  [ 4] .note.GNU-stack   PROGBITS        00000000 0000d0 000000 00      0   0  1
+  [ 5] .shstrtab         STRTAB          00000000 0000d0 00003c 00      0   0  1
+  [ 6] .symtab           SYMTAB          00000000 00024c 000080 10      7   7  4
+  [ 7] .strtab           STRTAB          00000000 0002cc 00001a 00      0   0  1
 Key to Flags:
   W (write), A (alloc), X (execute), M (merge), S (strings)
   I (info), L (link order), G (group), x (unknown)
   O (extra OS processing required) o (OS specific), p (processor specific)
 
 File: libgcrypt.a(mpih-mul1.o)
-There are 7 section headers, starting at offset 0xa0:
+There are 8 section headers, starting at offset 0xb0:
 
 Section Headers:
   [Nr] Name              Type            Addr     Off    Size   ES Flg Lk Inf Al
@@ -1197,16 +1199,17 @@
   [ 1] .text             PROGBITS        00000000 000038 000039 00  AX  0   0  8
   [ 2] .data             PROGBITS        00000000 000074 000000 00  WA  0   0  4
   [ 3] .bss              NOBITS          00000000 000074 000000 00  WA  0   0  4
-  [ 4] .shstrtab         STRTAB          00000000 000074 00002c 00      0   0  1
-  [ 5] .symtab           SYMTAB          00000000 0001b8 000060 10      6   5  4
-  [ 6] .strtab           STRTAB          00000000 000218 000017 00      0   0  1
+  [ 4] .note.GNU-stack   PROGBITS        00000000 000074 000000 00      0   0  1
+  [ 5] .shstrtab         STRTAB          00000000 000074 00003c 00      0   0  1
+  [ 6] .symtab           SYMTAB          00000000 0001f0 000070 10      7   6  4
+  [ 7] .strtab           STRTAB          00000000 000260 000017 00      0   0  1
 Key to Flags:
   W (write), A (alloc), X (execute), M (merge), S (strings)
   I (info), L (link order), G (group), x (unknown)
   O (extra OS processing required) o (OS specific), p (processor specific)
 
 File: libgcrypt.a(mpih-mul2.o)
-There are 7 section headers, starting at offset 0xa0:
+There are 8 section headers, starting at offset 0xb0:
 
 Section Headers:
   [Nr] Name              Type            Addr     Off    Size   ES Flg Lk Inf Al
@@ -1214,16 +1217,17 @@
   [ 1] .text             PROGBITS        00000000 000038 00003c 00  AX  0   0  8
   [ 2] .data             PROGBITS        00000000 000074 000000 00  WA  0   0  4
   [ 3] .bss              NOBITS          00000000 000074 000000 00  WA  0   0  4
-  [ 4] .shstrtab         STRTAB          00000000 000074 00002c 00      0   0  1
-  [ 5] .symtab           SYMTAB          00000000 0001b8 000060 10      6   5  4
-  [ 6] .strtab           STRTAB          00000000 000218 00001a 00      0   0  1
+  [ 4] .note.GNU-stack   PROGBITS        00000000 000074 000000 00      0   0  1
+  [ 5] .shstrtab         STRTAB          00000000 000074 00003c 00      0   0  1
+  [ 6] .symtab           SYMTAB          00000000 0001f0 000070 10      7   6  4
+  [ 7] .strtab           STRTAB          00000000 000260 00001a 00      0   0  1
 Key to Flags:
   W (write), A (alloc), X (execute), M (merge), S (strings)
   I (info), L (link order), G (group), x (unknown)
   O (extra OS processing required) o (OS specific), p (processor specific)
 
 File: libgcrypt.a(mpih-mul3.o)
-There are 7 section headers, starting at offset 0xa0:
+There are 8 section headers, starting at offset 0xb0:
 
 Section Headers:
   [Nr] Name              Type            Addr     Off    Size   ES Flg Lk Inf Al
@@ -1231,16 +1235,17 @@
   [ 1] .text             PROGBITS        00000000 000038 00003c 00  AX  0   0  8
   [ 2] .data             PROGBITS        00000000 000074 000000 00  WA  0   0  4
   [ 3] .bss              NOBITS          00000000 000074 000000 00  WA  0   0  4
-  [ 4] .shstrtab         STRTAB          00000000 000074 00002c 00      0   0  1
-  [ 5] .symtab           SYMTAB          00000000 0001b8 000060 10      6   5  4
-  [ 6] .strtab           STRTAB          00000000 000218 00001a 00      0   0  1
+  [ 4] .note.GNU-stack   PROGBITS        00000000 000074 000000 00      0   0  1
+  [ 5] .shstrtab         STRTAB          00000000 000074 00003c 00      0   0  1
+  [ 6] .symtab           SYMTAB          00000000 0001f0 000070 10      7   6  4
+  [ 7] .strtab           STRTAB          00000000 000260 00001a 00      0   0  1
 Key to Flags:
   W (write), A (alloc), X (execute), M (merge), S (strings)
   I (info), L (link order), G (group), x (unknown)
   O (extra OS processing required) o (OS specific), p (processor specific)
 
 File: libgcrypt.a(mpih-lshift.o)
-There are 7 section headers, starting at offset 0xbc:
+There are 8 section headers, starting at offset 0xcc:
 
 Section Headers:
   [Nr] Name              Type            Addr     Off    Size   ES Flg Lk Inf Al
@@ -1248,16 +1253,17 @@
   [ 1] .text             PROGBITS        00000000 000038 000057 00  AX  0   0  8
   [ 2] .data             PROGBITS        00000000 000090 000000 00  WA  0   0  4
   [ 3] .bss              NOBITS          00000000 000090 000000 00  WA  0   0  4
-  [ 4] .shstrtab         STRTAB          00000000 000090 00002c 00      0   0  1
-  [ 5] .symtab           SYMTAB          00000000 0001d4 000080 10      6   7  4
-  [ 6] .strtab           STRTAB          00000000 000254 000020 00      0   0  1
+  [ 4] .note.GNU-stack   PROGBITS        00000000 000090 000000 00      0   0  1
+  [ 5] .shstrtab         STRTAB          00000000 000090 00003c 00      0   0  1
+  [ 6] .symtab           SYMTAB          00000000 00020c 000090 10      7   8  4
+  [ 7] .strtab           STRTAB          00000000 00029c 000020 00      0   0  1
 Key to Flags:
   W (write), A (alloc), X (execute), M (merge), S (strings)
   I (info), L (link order), G (group), x (unknown)
   O (extra OS processing required) o (OS specific), p (processor specific)
 
 File: libgcrypt.a(mpih-rshift.o)
-There are 7 section headers, starting at offset 0xbc:
+There are 8 section headers, starting at offset 0xcc:
 
 Section Headers:
   [Nr] Name              Type            Addr     Off    Size   ES Flg Lk Inf Al
@@ -1265,9 +1271,10 @@
   [ 1] .text             PROGBITS        00000000 000038 000057 00  AX  0   0  8
   [ 2] .data             PROGBITS        00000000 000090 000000 00  WA  0   0  4
   [ 3] .bss              NOBITS          00000000 000090 000000 00  WA  0   0  4
-  [ 4] .shstrtab         STRTAB          00000000 000090 00002c 00      0   0  1
-  [ 5] .symtab           SYMTAB          00000000 0001d4 000080 10      6   7  4
-  [ 6] .strtab           STRTAB          00000000 000254 000022 00      0   0  1
+  [ 4] .note.GNU-stack   PROGBITS        00000000 000090 000000 00      0   0  1
+  [ 5] .shstrtab         STRTAB          00000000 000090 00003c 00      0   0  1
+  [ 6] .symtab           SYMTAB          00000000 00020c 000090 10      7   8  4
+  [ 7] .strtab           STRTAB          00000000 00029c 000022 00      0   0  1
 Key to Flags:
   W (write), A (alloc), X (execute), M (merge), S (strings)
   I (info), L (link order), G (group), x (unknown)
_______________________________________________
pld-devel-pl mailing list
[email protected]
http://lists.pld-linux.org/mailman/listinfo/pld-devel-pl

Odpowiedź listem elektroniczym