From: mlangsdo@redhat.com (Mark Langsdorf)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 1/4] arm64: capabilities: add nopti command line argument
Date: Thu, 31 May 2018 08:45:38 -0500 [thread overview]
Message-ID: <9d83b00a-f23c-e3e7-ab4a-598995d21f0c@redhat.com> (raw)
In-Reply-To: <2b1b39e3-38ab-848a-a1d3-d23db85b0e14@arm.com>
On 05/30/2018 03:59 AM, Suzuki K Poulose wrote:
>
>
> Hi Mark,
>
> On 24/05/18 20:09, Mark Langsdorf wrote:
>> The x86 kernel and the documentation use 'nopti' as the kernel command
>> line argument to disable kernel page table isolation, so add nopti to
>> the arm64 kernel for compatibility.
>>
>> Signed-off-by: Mark Langsdorf <mlangsdo@redhat.com>
>> ---
>> ? Documentation/admin-guide/kernel-parameters.txt |? 6 +++---
>> ? arch/arm64/kernel/cpufeature.c????????????????? | 11 ++++++++++-
>> ? 2 files changed, 13 insertions(+), 4 deletions(-)
>>
>> diff --git a/Documentation/admin-guide/kernel-parameters.txt
>> b/Documentation/admin-guide/kernel-parameters.txt
>> index f2040d4..a987725 100644
>> --- a/Documentation/admin-guide/kernel-parameters.txt
>> +++ b/Documentation/admin-guide/kernel-parameters.txt
>> @@ -3342,8 +3342,8 @@
>> ????? pt.??????? [PARIDE]
>> ????????????? See Documentation/blockdev/paride.txt.
>> -??? pti=??????? [X86_64] Control Page Table Isolation of user and
>> -??????????? kernel address spaces.? Disabling this feature
>> +??? pti=??????? [X86_64, ARM64] Control Page Table Isolation of user
>> +??????????? and kernel address spaces.? Disabling this feature
>> ????????????? removes hardening, but improves performance of
>> ????????????? system calls and interrupts.
>
> ...
>
>> @@ -3354,7 +3354,7 @@
>> ????????????? Not specifying this option is equivalent to pti=auto.
>> -??? nopti??????? [X86_64]
>> +??? nopti??????? [X86_64, ARM64]
>> ????????????? Equivalent to pti=off
>> ????? pty.legacy_count=
>> diff --git a/arch/arm64/kernel/cpufeature.c
>> b/arch/arm64/kernel/cpufeature.c
>> index 9d1b06d..7c5d8712 100644
>> --- a/arch/arm64/kernel/cpufeature.c
>> +++ b/arch/arm64/kernel/cpufeature.c
>> @@ -934,10 +934,19 @@ static int __init parse_kpti(char *str)
>> ????? if (ret)
>> ????????? return ret;
>> -??? __kpti_forced = enabled ? 1 : -1;
>> +??? if (!__kpti_forced)
>> +??????? __kpti_forced = enabled ? 1 : -1;
>> ????? return 0;
>> ? }
>> ? __setup("kpti=", parse_kpti);
>
> The arm64 kernel parameter is named "kpti", while the Documentation
> update above says "pti". We may want to keep both in sync here.
Good point. I think I will add a new kpti entry for ARM64 in
kernel-parameters. Then the docs match the code, instead of trying to
match the code to the docs.
--Mark Langsdorf
next prev parent reply other threads:[~2018-05-31 13:45 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-05-24 19:09 [PATCH 0/4] arm64: align KPTI interface with x86 Mark Langsdorf
2018-05-24 19:09 ` [PATCH 1/4] arm64: capabilities: add nopti command line argument Mark Langsdorf
2018-05-30 8:59 ` Suzuki K Poulose
2018-05-31 13:45 ` Mark Langsdorf [this message]
2018-05-24 19:09 ` [PATCH 2/4] arm64: kdebugfs: create arm64 debugfs directory Mark Langsdorf
2018-05-24 19:09 ` [PATCH 3/4] arm64: cpufeature: add debugfs interface for KPTI Mark Langsdorf
2018-05-24 19:09 ` [PATCH 4/4] arm64: cpufeature: always log KPTI setting on boot Mark Langsdorf
2018-05-29 21:12 ` Laura Abbott
2018-05-29 21:26 ` [PATCH 0/4] arm64: align KPTI interface with x86 Laura Abbott
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=9d83b00a-f23c-e3e7-ab4a-598995d21f0c@redhat.com \
--to=mlangsdo@redhat.com \
--cc=linux-arm-kernel@lists.infradead.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).