From: Anshuman Khandual <anshuman.khandual@arm.com>
To: Ard Biesheuvel <ardb@kernel.org>, linux-arm-kernel@lists.infradead.org
Cc: maz@kernel.org, catalin.marinas@arm.com, will@kernel.org,
mark.rutland@arm.com, qperret@google.com,
kernel-team@android.com
Subject: Re: [PATCH v2 2/3] arm64: mm: use XN table mapping attributes for the linear region
Date: Tue, 9 Mar 2021 11:22:22 +0530 [thread overview]
Message-ID: <6439069f-4ac1-970f-794f-fa24edceb76f@arm.com> (raw)
In-Reply-To: <20210308181535.16230-3-ardb@kernel.org>
On 3/8/21 11:45 PM, Ard Biesheuvel wrote:
> The way the arm64 kernel virtual address space is constructed guarantees
> that swapper PGD entries are never shared between the linear region on
> the one hand, and the vmalloc region on the other, which is where all
> kernel text, module text and BPF text mappings reside.
>
> This means that mappings in the linear region (which never require
> executable permissions) never share any table entries at any level with
> mappings that do require executable permissions, and so we can set the
> table-level PXN attributes for all table entries that are created while
> setting up mappings in the linear region. Since swapper's PGD level page
> table is mapped r/o itself, this adds another layer of robustness to the
> way the kernel manages its own page tables. While at it, set the UXN
> attribute as well for all kernel mappings created at boot.
What happens when FEAT_HPDS is implemented and also being enabled ? Would
there be any adverse affect here or at least break the assumption that the
linear mapping page table entries are safer than before ? Hence, it might
be still better to check FEAT_HPDS feature enablement here, even it it is
not being used right now.
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
next prev parent reply other threads:[~2021-03-09 5:53 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-03-08 18:15 [PATCH v2 0/3] arm64: use hierarchical XN permissions for all page tables Ard Biesheuvel
2021-03-08 18:15 ` [PATCH v2 1/3] arm64: mm: add missing P4D definitions and use them consistently Ard Biesheuvel
2021-03-09 4:56 ` Anshuman Khandual
2021-03-08 18:15 ` [PATCH v2 2/3] arm64: mm: use XN table mapping attributes for the linear region Ard Biesheuvel
2021-03-09 5:09 ` Anshuman Khandual
2021-03-09 12:36 ` Ard Biesheuvel
2021-03-10 6:48 ` Anshuman Khandual
2021-03-09 5:52 ` Anshuman Khandual [this message]
2021-03-08 18:15 ` [PATCH v2 3/3] arm64: mm: use XN table mapping attributes for user/kernel mappings Ard Biesheuvel
2021-03-09 5:40 ` Anshuman Khandual
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=6439069f-4ac1-970f-794f-fa24edceb76f@arm.com \
--to=anshuman.khandual@arm.com \
--cc=ardb@kernel.org \
--cc=catalin.marinas@arm.com \
--cc=kernel-team@android.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=mark.rutland@arm.com \
--cc=maz@kernel.org \
--cc=qperret@google.com \
--cc=will@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).