OSDN Git Service

FROMLIST: MIPS: Add noexec=on|off kernel parameter
authorMiodrag Dinic <miodrag.dinic@mips.com>
Tue, 9 Jan 2018 11:57:16 +0000 (12:57 +0100)
committerGreg Kroah-Hartman <gregkh@google.com>
Mon, 5 Feb 2018 16:58:37 +0000 (08:58 -0800)
commitd4d732cfa4afe151563662e7ec9ef99e08ebd5a3
treefb94ee00bf55bf4216f73e3f72ebb796edcf9940
parent5bf8bba0f178a4687035494a3ab995548df2e792
FROMLIST: MIPS: Add noexec=on|off kernel parameter

Add a new kernel parameter to override the default behavior related to
the decision whether to indicate stack as non-executable or executable
(regardless of PT_GNU_STACK entry or CPU RIXI support) in function
mips_elf_read_implies_exec().

Allowed values:

noexec=on: force indicating non-exec stack & heap
noexec=off: force indicating executable stack & heap

If this parameter is omitted, kernel behavior remains the same as it
was before this patch is applied.

This functionality is convenient during debugging and is especially
useful for Android development where indication of non-executable
stack is required.

NOTE: Using noexec=on on a system without CPU XI support is not
recommended since there is no actual HW support that provide
non-executable stack and heap. Use only for debugging purposes and
not in a production environment.

Signed-off-by: Miodrag Dinic <miodrag.dinic@mips.com>
Signed-off-by: Aleksandar Markovic <aleksandar.markovic@mips.com>
(cherry picked from: https://patchwork.linux-mips.org/patch/18218/)
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
Documentation/kernel-parameters.txt
arch/mips/kernel/elf.c