diff options
author | Ard Biesheuvel <[email protected]> | 2017-03-09 21:52:01 +0100 |
---|---|---|
committer | Catalin Marinas <[email protected]> | 2017-03-23 13:54:19 +0000 |
commit | 5ea5306c3235a157f06040c59730b1133115ed26 (patch) | |
tree | 5bc46cf0c5ff286e1a0c8c02ef3f5da9a27efda7 /net/unix/sysctl_net_unix.c | |
parent | aa8c09be7a6f58e1b0dd19413d872fffdb054677 (diff) |
arm64: alternatives: apply boot time fixups via the linear mapping
One important rule of thumb when desiging a secure software system is
that memory should never be writable and executable at the same time.
We mostly adhere to this rule in the kernel, except at boot time, when
regions may be mapped RWX until after we are done applying alternatives
or making other one-off changes.
For the alternative patching, we can improve the situation by applying
the fixups via the linear mapping, which is never mapped with executable
permissions. So map the linear alias of .text with RW- permissions
initially, and remove the write permissions as soon as alternative
patching has completed.
Reviewed-by: Laura Abbott <[email protected]>
Reviewed-by: Mark Rutland <[email protected]>
Tested-by: Mark Rutland <[email protected]>
Signed-off-by: Ard Biesheuvel <[email protected]>
Signed-off-by: Catalin Marinas <[email protected]>
Diffstat (limited to 'net/unix/sysctl_net_unix.c')
0 files changed, 0 insertions, 0 deletions