From: catalin.marinas@arm.com (Catalin Marinas)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH v3 6/6] arm64: kernel: Add support for Privileged Access Never
Date: Tue, 21 Jul 2015 13:38:31 +0100 [thread overview]
Message-ID: <20150721123830.GD25887@localhost> (raw)
In-Reply-To: <1437481411-1595-7-git-send-email-james.morse@arm.com>
On Tue, Jul 21, 2015 at 01:23:31PM +0100, James Morse wrote:
> diff --git a/arch/arm64/mm/fault.c b/arch/arm64/mm/fault.c
> index 94d98cd1aad8..149a36ea9673 100644
> --- a/arch/arm64/mm/fault.c
> +++ b/arch/arm64/mm/fault.c
> @@ -30,9 +30,11 @@
> #include <linux/highmem.h>
> #include <linux/perf_event.h>
>
> +#include <asm/cpufeature.h>
> #include <asm/exception.h>
> #include <asm/debug-monitors.h>
> #include <asm/esr.h>
> +#include <asm/sysreg.h>
> #include <asm/system_misc.h>
> #include <asm/pgtable.h>
> #include <asm/tlbflush.h>
> @@ -147,6 +149,13 @@ static void do_bad_area(unsigned long addr, unsigned int esr, struct pt_regs *re
> __do_kernel_fault(mm, addr, esr, regs);
> }
>
> +static bool pan_enabled(struct pt_regs *regs)
> +{
> + if (IS_ENABLED(CONFIG_ARM64_PAN))
> + return ((regs->pstate & PSR_PAN_BIT) != 0);
Nitpick: no brackets needed for return.
Otherwise the patch looks fine to me:
Reviewed-by: Catalin Marinas <catalin.marinas@arm.com>
next prev parent reply other threads:[~2015-07-21 12:38 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 [this message]
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
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=20150721123830.GD25887@localhost \
--to=catalin.marinas@arm.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).