Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.busybox.net/busybox.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/libbb
diff options
context:
space:
mode:
authorLudwig Nussel <ludwig.nussel@suse.de>2022-08-25 13:48:07 +0300
committerDenys Vlasenko <vda.linux@googlemail.com>2022-08-30 18:21:53 +0300
commit526625bc83e63e6e5a3ec5296a1b868e72b3b01e (patch)
tree901528ccb11153fd00c888ad817386a885f72aa2 /libbb
parentdd79e1d4d3b9725e927d1c26e0d3fdb49e29ba9c (diff)
libbb: mark stack in assembly files read-only
Signed-off-by: Ludwig Nussel <ludwig.nussel@suse.de> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Diffstat (limited to 'libbb')
-rw-r--r--libbb/hash_md5_sha256_x86-32_shaNI.S3
-rw-r--r--libbb/hash_md5_sha256_x86-64_shaNI.S3
-rw-r--r--libbb/hash_md5_sha_x86-32_shaNI.S3
-rw-r--r--libbb/hash_md5_sha_x86-64.S3
-rwxr-xr-xlibbb/hash_md5_sha_x86-64.S.sh3
-rw-r--r--libbb/hash_md5_sha_x86-64_shaNI.S3
6 files changed, 18 insertions, 0 deletions
diff --git a/libbb/hash_md5_sha256_x86-32_shaNI.S b/libbb/hash_md5_sha256_x86-32_shaNI.S
index 3905bad9a..a0e4a571a 100644
--- a/libbb/hash_md5_sha256_x86-32_shaNI.S
+++ b/libbb/hash_md5_sha256_x86-32_shaNI.S
@@ -19,6 +19,9 @@
// We do not check SSSE3 in cpuid,
// all SHA-capable CPUs support it as well.
+#ifdef __linux__
+ .section .note.GNU-stack, "", @progbits
+#endif
.section .text.sha256_process_block64_shaNI, "ax", @progbits
.globl sha256_process_block64_shaNI
.hidden sha256_process_block64_shaNI
diff --git a/libbb/hash_md5_sha256_x86-64_shaNI.S b/libbb/hash_md5_sha256_x86-64_shaNI.S
index 082ceafe4..172c2eae2 100644
--- a/libbb/hash_md5_sha256_x86-64_shaNI.S
+++ b/libbb/hash_md5_sha256_x86-64_shaNI.S
@@ -19,6 +19,9 @@
// We do not check SSSE3 in cpuid,
// all SHA-capable CPUs support it as well.
+#ifdef __linux__
+ .section .note.GNU-stack, "", @progbits
+#endif
.section .text.sha256_process_block64_shaNI, "ax", @progbits
.globl sha256_process_block64_shaNI
.hidden sha256_process_block64_shaNI
diff --git a/libbb/hash_md5_sha_x86-32_shaNI.S b/libbb/hash_md5_sha_x86-32_shaNI.S
index 2366b046a..7455a29f0 100644
--- a/libbb/hash_md5_sha_x86-32_shaNI.S
+++ b/libbb/hash_md5_sha_x86-32_shaNI.S
@@ -25,6 +25,9 @@
// We do not check SSSE3/SSE4.1 in cpuid,
// all SHA-capable CPUs support them as well.
+#ifdef __linux__
+ .section .note.GNU-stack, "", @progbits
+#endif
.section .text.sha1_process_block64_shaNI, "ax", @progbits
.globl sha1_process_block64_shaNI
.hidden sha1_process_block64_shaNI
diff --git a/libbb/hash_md5_sha_x86-64.S b/libbb/hash_md5_sha_x86-64.S
index 1d55b91f8..2cdd22015 100644
--- a/libbb/hash_md5_sha_x86-64.S
+++ b/libbb/hash_md5_sha_x86-64.S
@@ -1,6 +1,9 @@
### Generated by hash_md5_sha_x86-64.S.sh ###
#if CONFIG_SHA1_SMALL == 0 && defined(__GNUC__) && defined(__x86_64__)
+#ifdef __linux__
+ .section .note.GNU-stack, "", @progbits
+#endif
.section .text.sha1_process_block64, "ax", @progbits
.globl sha1_process_block64
.hidden sha1_process_block64
diff --git a/libbb/hash_md5_sha_x86-64.S.sh b/libbb/hash_md5_sha_x86-64.S.sh
index 40c979d35..653fe4989 100755
--- a/libbb/hash_md5_sha_x86-64.S.sh
+++ b/libbb/hash_md5_sha_x86-64.S.sh
@@ -127,6 +127,9 @@ echo \
"### Generated by hash_md5_sha_x86-64.S.sh ###
#if CONFIG_SHA1_SMALL == 0 && defined(__GNUC__) && defined(__x86_64__)
+#ifdef __linux__
+ .section .note.GNU-stack, \"\", @progbits
+#endif
.section .text.sha1_process_block64, \"ax\", @progbits
.globl sha1_process_block64
.hidden sha1_process_block64
diff --git a/libbb/hash_md5_sha_x86-64_shaNI.S b/libbb/hash_md5_sha_x86-64_shaNI.S
index 794e97040..2f03e1ce4 100644
--- a/libbb/hash_md5_sha_x86-64_shaNI.S
+++ b/libbb/hash_md5_sha_x86-64_shaNI.S
@@ -25,6 +25,9 @@
// We do not check SSSE3/SSE4.1 in cpuid,
// all SHA-capable CPUs support them as well.
+#ifdef __linux__
+ .section .note.GNU-stack, "", @progbits
+#endif
.section .text.sha1_process_block64_shaNI, "ax", @progbits
.globl sha1_process_block64_shaNI
.hidden sha1_process_block64_shaNI