Remove executable flag from GNU_STACK section

Putting stack marking into every assembly files is required to indicate
that the stack does not need to be executable.
Executable flag on stack conflicts with some security measures, Systemd
MemoryDenyWriteExecute=yes for example.
This commit is contained in:
ko-zu committed 2021-11-13 22:58:33 +09:00
1 parent ddae153947
commit c67e07f34e
1 file changed
+7
+7
View File
@@ -1,5 +1,12 @@
#if !defined(HUF_DISABLE_ASM) && defined(__x86_64__)
/* Stack marking
* ref: https://wiki.gentoo.org/wiki/Hardened/GNU_stack_quickstart
*/
#if defined(__linux__) && defined(__ELF__)
.section .note.GNU-stack,"",%progbits
#endif
/* Calling convention:
*
* %rdi contains the first argument: HUF_DecompressAsmArgs*.