--- a/fs/exec.c~execve-warn-if-process-starts-with-executable-stack +++ a/fs/exec.c @@ -761,6 +761,11 @@ int setup_arg_pages(struct linux_binprm goto out_unlock; BUG_ON(prev != vma); + if (unlikely(vm_flags & VM_EXEC)) { + pr_warn_once("process '%pD4' started with executable stack\n", + bprm->file); + } + /* Move stack pages down in memory. */ if (stack_shift) { ret = shift_arg_pages(vma, stack_shift);