All of lore.kernel.org
 help / color / mirror / Atom feed
From: Mark Rutland <mark.rutland@arm.com>
To: Mark Brown <broonie@kernel.org>
Cc: Catalin Marinas <catalin.marinas@arm.com>,
	Will Deacon <will@kernel.org>,
	linux-arm-kernel@lists.infradead.org
Subject: Re: [PATCH v4 4/4] arm64: insn: Report PAC and BTI instructions as skippable
Date: Mon, 4 May 2020 14:43:33 +0100	[thread overview]
Message-ID: <20200504134333.GD73375@C02TD0UTHF1T.local> (raw)
In-Reply-To: <20200504131326.18290-5-broonie@kernel.org>

On Mon, May 04, 2020 at 02:13:26PM +0100, Mark Brown wrote:
> The PAC and BTI instructions can be safely skipped so report them as
> such, allowing them to be probed.
> 
> Signed-off-by: Mark Brown <broonie@kernel.org>
> Acked-by: Catalin Marinas <catalin.marinas@arm.com>

These all look safe to step in a XOL area, so:

Acked-by: Mark Rutland <mark.rutland@arm.com>

> ---
>  arch/arm64/kernel/insn.c | 17 +++++++++++++++++
>  1 file changed, 17 insertions(+)
> 
> diff --git a/arch/arm64/kernel/insn.c b/arch/arm64/kernel/insn.c
> index 15c3f0643e3b..6439af794ec4 100644
> --- a/arch/arm64/kernel/insn.c
> +++ b/arch/arm64/kernel/insn.c
> @@ -57,6 +57,23 @@ bool __kprobes aarch64_insn_is_steppable_hint(u32 insn)
>  		return false;
>  
>  	switch (insn & 0xFE0) {
> +	case AARCH64_INSN_HINT_XPACLRI:
> +	case AARCH64_INSN_HINT_PACIA_1716:
> +	case AARCH64_INSN_HINT_PACIB_1716:
> +	case AARCH64_INSN_HINT_AUTIA_1716:
> +	case AARCH64_INSN_HINT_AUTIB_1716:
> +	case AARCH64_INSN_HINT_PACIAZ:
> +	case AARCH64_INSN_HINT_PACIASP:
> +	case AARCH64_INSN_HINT_PACIBZ:
> +	case AARCH64_INSN_HINT_PACIBSP:
> +	case AARCH64_INSN_HINT_AUTIAZ:
> +	case AARCH64_INSN_HINT_AUTIASP:
> +	case AARCH64_INSN_HINT_AUTIBZ:
> +	case AARCH64_INSN_HINT_AUTIBSP:
> +	case AARCH64_INSN_HINT_BTI:
> +	case AARCH64_INSN_HINT_BTIC:
> +	case AARCH64_INSN_HINT_BTIJ:
> +	case AARCH64_INSN_HINT_BTIJC:

Just to check -- do we set the GP flag when creating/mapping the XOL
area? If that's PAGE_KERNEL_EXEC, presumably we do.

Mark.

>  	case AARCH64_INSN_HINT_NOP:
>  		return true;
>  	default:
> -- 
> 2.20.1
> 

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

  reply	other threads:[~2020-05-04 13:43 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-05-04 13:13 [PATCH v4 0/4] arm64: Make NOP handling a whitelist Mark Brown
2020-05-04 13:13 ` [PATCH v4 1/4] arm64: insn: Add constants for new HINT instruction decode Mark Brown
2020-05-04 14:05   ` Mark Rutland
2020-05-04 13:13 ` [PATCH v4 2/4] arm64: insn: Provide a better name for aarch64_insn_is_nop() Mark Brown
2020-05-04 13:40   ` Mark Rutland
2020-05-04 13:13 ` [PATCH v4 3/4] arm64: insn: Don't assume unrecognized HINTs are skippable Mark Brown
2020-05-04 13:44   ` Mark Rutland
2020-05-04 13:13 ` [PATCH v4 4/4] arm64: insn: Report PAC and BTI instructions as skippable Mark Brown
2020-05-04 13:43   ` Mark Rutland [this message]
2020-05-04 15:33 ` [PATCH v4 0/4] arm64: Make NOP handling a whitelist 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=20200504134333.GD73375@C02TD0UTHF1T.local \
    --to=mark.rutland@arm.com \
    --cc=broonie@kernel.org \
    --cc=catalin.marinas@arm.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.