mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Yeoreum Yun <yeoreum.yun@arm.com>
To: 1534428646@qq.com
Cc: catalin.marinas@arm.com, will@kernel.org, mark.rutland@arm.com,
	kristina.martsenko@arm.com, liaochang1@huawei.com,
	linux-arm-kernel@lists.infradead.org,
	linux-kernel@vger.kernel.org, stable@vger.kernel.org
Subject: Re: [PATCH] arm64: kprobe: fix an error in single stepping support
Date: Sun, 12 Jan 2025 08:31:07 +0000	[thread overview]
Message-ID: <Z4N9y8XpblDoI5Jp@e129823.arm.com> (raw)
In-Reply-To: <tencent_4B60C577479F735A75E6459B9AEAB3F54A05@qq.com>

Hi Yiren,

> From: "Yiren.Xie" <1534428646@qq.com>
>
> It is obvious a conflict between the code and the comment.
> And verified that with this modification it can read the DAIF status.
>
> Signed-off-by: Yiren.Xie <1534428646@qq.com>
> ---
>  arch/arm64/kernel/probes/decode-insn.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/arch/arm64/kernel/probes/decode-insn.c b/arch/arm64/kernel/probes/decode-insn.c
> index 6438bf62e753..22383eb1c22c 100644
> --- a/arch/arm64/kernel/probes/decode-insn.c
> +++ b/arch/arm64/kernel/probes/decode-insn.c
> @@ -40,7 +40,7 @@ static bool __kprobes aarch64_insn_is_steppable(u32 insn)
>  		 */
>  		if (aarch64_insn_is_mrs(insn))
>  			return aarch64_insn_extract_system_reg(insn)
> -			     != AARCH64_INSN_SPCLREG_DAIF;
> +			     == AARCH64_INSN_SPCLREG_DAIF;
>
>  		/*
>  		 * The HINT instruction is steppable only if it is in whitelist

Nit:
When single-stepped, the DAIF bits are set, in setup_singlesteup(),
Reading a DAIF via mrs instruction isn't correct value as comments
describe.

What is conflict?

Thanks.

  reply	other threads:[~2025-01-12  8:31 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-01-11  9:56 1534428646
2025-01-12  8:31 ` Yeoreum Yun [this message]
2025-01-17  4:00 1534428646
2025-01-17  7:57 ` Yeoreum Yun
2025-02-04 11:31   ` 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=Z4N9y8XpblDoI5Jp@e129823.arm.com \
    --to=yeoreum.yun@arm.com \
    --cc=1534428646@qq.com \
    --cc=catalin.marinas@arm.com \
    --cc=kristina.martsenko@arm.com \
    --cc=liaochang1@huawei.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mark.rutland@arm.com \
    --cc=stable@vger.kernel.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®