diff options
| author | Ard Biesheuvel <ardb@kernel.org> | 2026-05-29 17:02:04 +0200 |
|---|---|---|
| committer | Will Deacon <will@kernel.org> | 2026-06-02 16:29:16 +0100 |
| commit | 0aae825f1ed7ce3eedfadc54684aa86bbbe188b0 (patch) | |
| tree | e45bc42a316730a2a3d91dc1e8d73d1ccdeade17 /scripts/Makefile.thinlto | |
| parent | 99bad3e992e26addd2a7d779cfbe42c048abd808 (diff) | |
mm: Make empty_zero_page[] const
The empty zero page is used to back any kernel or user space mapping
that is supposed to remain cleared, and so the page itself is never
supposed to be modified.
So mark it as const, which moves it into .rodata rather than .bss: on
most architectures, this ensures that both the kernel's mapping of it
and any aliases that are accessible via the kernel direct (linear) map
are mapped read-only, and cannot be used (inadvertently or maliciously)
to corrupt the contents of the zero page.
Reviewed-by: Mike Rapoport (Microsoft) <rppt@kernel.org>
Reviewed-by: Kevin Brodsky <kevin.brodsky@arm.com>
Acked-by: David Hildenbrand (Arm) <david@kernel.org>
Reviewed-by: Jann Horn <jannh@google.com>
Reviewed-by: Feng Tang <feng.tang@linux.alibaba.com>
Signed-off-by: Ard Biesheuvel <ardb@kernel.org>
Signed-off-by: Will Deacon <will@kernel.org>
Diffstat (limited to 'scripts/Makefile.thinlto')
0 files changed, 0 insertions, 0 deletions
