public inbox for linux-arm-kernel@lists.infradead.org 
 help / color / mirror / Atom feed
From: james.morse@arm•com (James Morse)
To: linux-arm-kernel@lists•infradead.org
Subject: [PATCH v4] arm64: kernel: Add support for Privileged Access Never
Date: Fri, 24 Jul 2015 16:14:54 +0100	[thread overview]
Message-ID: <55B2566E.2090905@arm.com> (raw)
In-Reply-To: <20150723130752.GC445@arm.com>

On 23/07/15 14:07, Will Deacon wrote:
> Hi James,
> 
> First off, thanks for rebasing this patch.
> 
> On Wed, Jul 22, 2015 at 07:05:54PM +0100, James Morse wrote:
>> 'Privileged Access Never' is a new arm8.1 feature which prevents
>> privileged code from accessing any virtual address where read or write
>> access is also permitted at EL0.
>>
>> This patch enables the PAN feature on all CPUs, and modifies {get,put}_user
>> helpers temporarily to permit access.
>>
>> This will catch kernel bugs where user memory is accessed directly.
>> 'Unprivileged loads and stores' using ldtrb et al are unaffected by PAN.
>>
>> Signed-off-by: James Morse <james.morse@arm•com>
>> Cc: Catalin Marinas <catalin.marinas@arm•com>
>> Cc: Will Deacon <will.deacon@arm•com>
>> ---
>> This version is rebased against the arm64 'devel' branch, somewhere
>> after Suzuki's "arm64: Generalise msr_s/mrs_s operations" patch.
> 
> Now, having spoken with Catalin, we reckon that it's probably best to
> bite the bullet and add the enable parameter to the conditional alternative
> asm macros anyway; it's still fairly early days for 4.3 so we've got time
> to get this right.
> 
> In that light, I've got the following diff against this patch (see below)
> and then another patch on top of that adding the extra parameters.
> 
> Could you take a look please? Sorry for messing you about.

Fine by me ...

If you're able to merge it all together, please do. Otherwise I will try to
find time to send a v5.



James

  reply	other threads:[~2015-07-24 15:14 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-07-21 12:23 [PATCH v3 0/6] arm64: kernel: Add support for Privileged Access Never James Morse
2015-07-21 12:23 ` [PATCH v3 1/6] arm64: kernel: Add cpuid_feature_extract_field() for 4bit sign extension James Morse
2015-07-21 12:32   ` Catalin Marinas
2015-07-21 12:23 ` [PATCH v3 2/6] arm64: kernel: preparatory: Move config_sctlr_el1 James Morse
2015-07-21 12:23 ` [PATCH v3 3/6] arm64: kernel: Add cpufeature 'enable' callback James Morse
2015-07-21 12:23 ` [PATCH v3 4/6] arm64: kernel: Add min_field_value and use '>=' for feature detection James Morse
2015-07-21 12:33   ` Catalin Marinas
2015-07-21 12:23 ` [PATCH v3 5/6] arm64: kernel: Add optional CONFIG_ parameter to ALTERNATIVE() James Morse
2015-07-21 12:23 ` [PATCH v3 6/6] arm64: kernel: Add support for Privileged Access Never James Morse
2015-07-21 12:38   ` Catalin Marinas
2015-07-22 17:01     ` Will Deacon
2015-07-22 18:04       ` James Morse
2015-07-22 18:14         ` Will Deacon
2015-07-23  7:58           ` James Morse
2015-07-22 18:05       ` [PATCH v4] " James Morse
2015-07-23 13:07         ` Will Deacon
2015-07-24 15:14           ` James Morse [this message]
2015-07-24 16:56             ` Will Deacon
2015-07-23 12:00     ` [PATCH v3 6/6] " Will Deacon

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=55B2566E.2090905@arm.com \
    --to=james.morse@arm$(echo .)com \
    --cc=linux-arm-kernel@lists$(echo .)infradead.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html
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