]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
Add annotation to all assembly files to turn off stack-execute bit 2946/head
authorDan Mick <dan.mick@redhat.com>
Sat, 15 Nov 2014 01:59:57 +0000 (17:59 -0800)
committerDan Mick <dan.mick@redhat.com>
Sat, 15 Nov 2014 01:59:57 +0000 (17:59 -0800)
See discussion in http://tracker.ceph.com/issues/10114

Building with these changes allows output from readelf like this:

 $ readelf -lW src/.libs/librados.so.2 | grep GNU_STACK
  GNU_STACK      0x000000 0x0000000000000000 0x0000000000000000 0x000000
0x000000 RW  0x8

(note the absence of 'X' in 'RW')

Fixes: #10114
Signed-off-by: Dan Mick <dan.mick@redhat.com>
23 files changed:
src/common/crc32c_intel_fast_asm.S
src/common/crc32c_intel_fast_zero_asm.S
src/erasure-code/isa/isa-l/erasure_code/ec_multibinary.asm.s
src/erasure-code/isa/isa-l/erasure_code/gf_2vect_dot_prod_avx.asm.s
src/erasure-code/isa/isa-l/erasure_code/gf_2vect_dot_prod_avx2.asm.s
src/erasure-code/isa/isa-l/erasure_code/gf_2vect_dot_prod_sse.asm.s
src/erasure-code/isa/isa-l/erasure_code/gf_3vect_dot_prod_avx.asm.s
src/erasure-code/isa/isa-l/erasure_code/gf_3vect_dot_prod_avx2.asm.s
src/erasure-code/isa/isa-l/erasure_code/gf_3vect_dot_prod_sse.asm.s
src/erasure-code/isa/isa-l/erasure_code/gf_4vect_dot_prod_avx.asm.s
src/erasure-code/isa/isa-l/erasure_code/gf_4vect_dot_prod_avx2.asm.s
src/erasure-code/isa/isa-l/erasure_code/gf_4vect_dot_prod_sse.asm.s
src/erasure-code/isa/isa-l/erasure_code/gf_5vect_dot_prod_avx.asm.s
src/erasure-code/isa/isa-l/erasure_code/gf_5vect_dot_prod_avx2.asm.s
src/erasure-code/isa/isa-l/erasure_code/gf_5vect_dot_prod_sse.asm.s
src/erasure-code/isa/isa-l/erasure_code/gf_6vect_dot_prod_avx.asm.s
src/erasure-code/isa/isa-l/erasure_code/gf_6vect_dot_prod_avx2.asm.s
src/erasure-code/isa/isa-l/erasure_code/gf_6vect_dot_prod_sse.asm.s
src/erasure-code/isa/isa-l/erasure_code/gf_vect_dot_prod_avx.asm.s
src/erasure-code/isa/isa-l/erasure_code/gf_vect_dot_prod_avx2.asm.s
src/erasure-code/isa/isa-l/erasure_code/gf_vect_dot_prod_sse.asm.s
src/erasure-code/isa/isa-l/erasure_code/gf_vect_mul_avx.asm.s
src/erasure-code/isa/isa-l/erasure_code/gf_vect_mul_sse.asm.s

index 4ca5d65032e2902726ee72b5954e4363ae30b9f3..2189684b4c75ed1056a80a222e897a59d6d7d686 100644 (file)
@@ -662,3 +662,5 @@ global %1_slver
 %endmacro
 ;;;       func            core, ver, snum
 slversion crc32_iscsi_00, 00,   02,  0014
+; inform linker that this doesn't require executable stack
+section .note.GNU-stack noalloc noexec nowrite progbits
index b7246f26380d2160b2fc81dfd38054edd532cad5..34b7f4890169fef05b750d956214a9130fd7cc66 100644 (file)
@@ -644,3 +644,5 @@ global %1_slver
 %endmacro
 ;;;       func            core, ver, snum
 slversion crc32_iscsi_zero_00, 00,   02,  0014
+; inform linker that this doesn't require executable stack
+section .note.GNU-stack noalloc noexec nowrite progbits
index b5655096544a0abd972a506b1ffef3dd2057a03b..54f7301181e7c741692408495e49eca1ea5628f6 100644 (file)
@@ -264,3 +264,5 @@ global %1_slver
 slversion ec_encode_data,      00,   02,  0133
 slversion gf_vect_mul,         00,   02,  0134
 slversion gf_vect_dot_prod,    00,   01,  0138
+; inform linker that this doesn't require executable stack
+section .note.GNU-stack noalloc noexec nowrite progbits
index 7f8b34b79a430bbeaf751ff6b5a3b74c0c2bf493..db8064a39718a14e9d587bac94abd403507a37fb 100644 (file)
@@ -232,3 +232,5 @@ global %1_slver
 %endmacro
 ;;;       func                  core, ver, snum
 slversion gf_2vect_dot_prod_avx, 02,  03,  0191
+; inform linker that this doesn't require executable stack
+section .note.GNU-stack noalloc noexec nowrite progbits
index ce9275fbb31ecab470b046c3ec2c9c806338c22b..5d75d8109050b5907ee19c71bb85022c05df7b57 100644 (file)
@@ -244,3 +244,5 @@ global %1_slver
 %endmacro
 ;;;       func                   core, ver, snum
 slversion gf_2vect_dot_prod_avx2, 04,  03,  0196
+; inform linker that this doesn't require executable stack
+section .note.GNU-stack noalloc noexec nowrite progbits
index 2520f9f73ff93e249bb97c311d9b5e0cb8f3a550..4f324aecc437f751be09e1b0351d616dbf49d5a4 100644 (file)
@@ -234,3 +234,5 @@ global %1_slver
 %endmacro
 ;;;       func                  core, ver, snum
 slversion gf_2vect_dot_prod_sse, 00,  02,  0062
+; inform linker that this doesn't require executable stack
+section .note.GNU-stack noalloc noexec nowrite progbits
index 3c821605aabc5e6e4812820fbc7e20308bf90efa..6935cb19347bc5ff7554f2e14ac84c2167ea2e6d 100644 (file)
@@ -255,4 +255,6 @@ global %1_slver
        db 0x%3, 0x%2
 %endmacro
 ;;;       func                  core, ver, snum
+; inform linker that this doesn't require executable stack
+section .note.GNU-stack noalloc noexec nowrite progbits
 slversion gf_3vect_dot_prod_avx, 02,  03,  0192
index bff6e755eb0c3c93cfa70b316db79630103e1c9c..4ad01531712fdf0e82a4a3700189e0e1922caf98 100644 (file)
@@ -269,3 +269,5 @@ global %1_slver
 %endmacro
 ;;;       func                   core, ver, snum
 slversion gf_3vect_dot_prod_avx2, 04,  03,  0197
+; inform linker that this doesn't require executable stack
+section .note.GNU-stack noalloc noexec nowrite progbits
index 0436c11d2b33300d031bb78eff2564c1994c56c9..925fd3414d6249fca00333f6a4e1a6b3c180eeae 100644 (file)
@@ -257,3 +257,5 @@ global %1_slver
 %endmacro
 ;;;       func                  core, ver, snum
 slversion gf_3vect_dot_prod_sse, 00,  03,  0063
+; inform linker that this doesn't require executable stack
+section .note.GNU-stack noalloc noexec nowrite progbits
index c621d321cc68ae351e51778eead53a8ece2bcee4..6197f017007d5b98a6614d775b0e2cd6396796b2 100644 (file)
@@ -294,3 +294,5 @@ global %1_slver
 %endmacro
 ;;;       func                  core, ver, snum
 slversion gf_4vect_dot_prod_avx, 00,  02,  0064
+; inform linker that this doesn't require executable stack
+section .note.GNU-stack noalloc noexec nowrite progbits
index 3f29c7601c437b753107fdf9efd0331e1e0b1003..e4267e201f285898bf9b6e6fabb409fce9fcd2f6 100644 (file)
@@ -303,3 +303,5 @@ global %1_slver
 %endmacro
 ;;;       func                   core, ver, snum
 slversion gf_4vect_dot_prod_avx2, 04,  03,  0064
+; inform linker that this doesn't require executable stack
+section .note.GNU-stack noalloc noexec nowrite progbits
index 3626e42c33c1fd70c4f0217f1b0e0a824008f91c..920a8da71c87c85a72802051375d413d9298105a 100644 (file)
@@ -294,3 +294,5 @@ global %1_slver
 %endmacro
 ;;;       func                  core, ver, snum
 slversion gf_4vect_dot_prod_sse, 00,  03,  0064
+; inform linker that this doesn't require executable stack
+section .note.GNU-stack noalloc noexec nowrite progbits
index 8855a2fc8e02ee13c0c904dd02318611a9944a15..a5625659713187709555aff50d905e30e05e8a14 100644 (file)
@@ -309,3 +309,5 @@ global %1_slver
 %endmacro
 ;;;       func                  core, ver, snum
 slversion gf_5vect_dot_prod_avx, 02,  03,  0194
+; inform linker that this doesn't require executable stack
+section .note.GNU-stack noalloc noexec nowrite progbits
index e932053e2dbda36cdc24c4ecf898ecd07b908c43..7f25c1622bb28d135988e71ec892cea9730df8d9 100644 (file)
@@ -321,3 +321,5 @@ global %1_slver
 %endmacro
 ;;;       func                  core, ver, snum
 slversion gf_5vect_dot_prod_avx2, 04,  03,  0199
+; inform linker that this doesn't require executable stack
+section .note.GNU-stack noalloc noexec nowrite progbits
index b33bab0cc32192dff7c38b83cfaecdf0db42a43c..003ad2614241016fe92b3362582e8b76505ff26e 100644 (file)
@@ -309,4 +309,6 @@ global %1_slver
        db 0x%3, 0x%2
 %endmacro
 ;;;       func                  core, ver, snum
+; inform linker that this doesn't require executable stack
+section .note.GNU-stack noalloc noexec nowrite progbits
 slversion gf_5vect_dot_prod_sse, 00,  03,  0065
index 4e03e8e83ddb8c88e85549279d48ab3bdc5f0f0e..28ca861357a3be50440c28be9e5147a8e1999646 100644 (file)
@@ -321,3 +321,5 @@ global %1_slver
 %endmacro
 ;;;       func                  core, ver, snum
 slversion gf_6vect_dot_prod_avx, 02,  03,  0195
+; inform linker that this doesn't require executable stack
+section .note.GNU-stack noalloc noexec nowrite progbits
index 7826fb271ea37dbc8c3ab842400c1ff65889738f..a957c9ecc0c86d063a6ece40e78f91ece8ac671d 100644 (file)
@@ -332,3 +332,5 @@ global %1_slver
 %endmacro
 ;;;       func                   core, ver, snum
 slversion gf_6vect_dot_prod_avx2, 04,  03,  019a
+; inform linker that this doesn't require executable stack
+section .note.GNU-stack noalloc noexec nowrite progbits
index 23ef3d9e03216e701130d6c5bc601cfb100f0ff2..4910ddd703a234acabf34d3182d57f731edb46ce 100644 (file)
@@ -321,3 +321,5 @@ global %1_slver
 %endmacro
 ;;;       func                  core, ver, snum
 slversion gf_6vect_dot_prod_sse, 00,  03,  0066
+; inform linker that this doesn't require executable stack
+section .note.GNU-stack noalloc noexec nowrite progbits
index ddc3042943ba95b53644a8b4688e27305fd2b7d1..593a731883f0a0788c978a9233ab3fa087931e6e 100644 (file)
@@ -196,3 +196,7 @@ global %1_slver
 %endmacro
 ;;;       func                 core, ver, snum
 slversion gf_vect_dot_prod_avx, 02,  03,  0061
+; inform linker that this doesn't require executable stack
+section .note.GNU-stack noalloc noexec nowrite progbits
+; inform linker that this doesn't require executable stack
+section .note.GNU-stack noalloc noexec nowrite progbits
index 7eebd2792906d441817d39141beaaf51d62d0e24..f5f928748cd1d465774ba2cefe1ded9c4808090b 100644 (file)
@@ -201,3 +201,5 @@ global %1_slver
 %endmacro
 ;;;       func                  core, ver, snum
 slversion gf_vect_dot_prod_avx2, 04,  03,  0190
+; inform linker that this doesn't require executable stack
+section .note.GNU-stack noalloc noexec nowrite progbits
index fd51ee52cfccd483bfde41920ba49e7b24dbee8f..2e13c186673a79e571bc2be6deb426ea3f4b7845 100644 (file)
@@ -193,3 +193,5 @@ global %1_slver
 %endmacro
 ;;;       func                 core, ver, snum
 slversion gf_vect_dot_prod_sse, 00,  03,  0060
+; inform linker that this doesn't require executable stack
+section .note.GNU-stack noalloc noexec nowrite progbits
index b60a6ebf2c24bfc345c8c676d8a5ff1848e62874..0536ed7950aaefcf7fee6b8d5c23cff11a84ed4f 100644 (file)
@@ -170,3 +170,5 @@ global %1_slver
 %endmacro
 ;;;       func             core, ver, snum
 slversion gf_vect_mul_avx, 01,   02,  0036
+; inform linker that this doesn't require executable stack
+section .note.GNU-stack noalloc noexec nowrite progbits
index 3d5fb9405a02467631f92d5b9f182c992cef4fc2..c6d7d5869679795106aa3f6c45302f1b129700ce 100644 (file)
@@ -176,3 +176,5 @@ global %1_slver
 %endmacro
 ;;;       func        core, ver, snum
 slversion gf_vect_mul_sse, 00,   02,  0034
+; inform linker that this doesn't require executable stack
+section .note.GNU-stack noalloc noexec nowrite progbits