All of lore.kernel.org
 help / color / mirror / Atom feed
From: Will Deacon <will@kernel.org>
To: Masami Hiramatsu <mhiramat@kernel.org>,
	Catalin Marinas <catalin.marinas@arm.com>,
	Jisheng Zhang <Jisheng.Zhang@synaptics.com>
Cc: kernel-team@android.com, Will Deacon <will@kernel.org>,
	linux-arm-kernel@lists.infradead.org,
	linux-kernel@vger.kernel.org, Liao Chang <liaochang1@huawei.com>
Subject: Re: [PATCH] arm64: kprobes: Restore local irqflag if kprobes is cancelled
Date: Tue, 13 Apr 2021 18:49:22 +0100	[thread overview]
Message-ID: <161830261625.3702418.8292373763983690459.b4-ty@kernel.org> (raw)
In-Reply-To: <20210412174101.6bfb0594@xhacker.debian>

On Mon, 12 Apr 2021 17:41:01 +0800, Jisheng Zhang wrote:
> If instruction being single stepped caused a page fault, the kprobes
> is cancelled to let the page fault handler continue as a normal page
> fault. But the local irqflags are disabled so cpu will restore pstate
> with DAIF masked. After pagefault is serviced, the kprobes is
> triggerred again, we overwrite the saved_irqflag by calling
> kprobes_save_local_irqflag(). NOTE, DAIF is masked in this new saved
> irqflag. After kprobes is serviced, the cpu pstate is retored with
> DAIF masked.
> 
> [...]

Applied to arm64 (for-next/fixes), thanks!

[1/1] arm64: kprobes: Restore local irqflag if kprobes is cancelled
      https://git.kernel.org/arm64/c/738fa58ee132

Cheers,
-- 
Will

https://fixes.arm64.dev
https://next.arm64.dev
https://will.arm64.dev

WARNING: multiple messages have this Message-ID (diff)
From: Will Deacon <will@kernel.org>
To: Masami Hiramatsu <mhiramat@kernel.org>,
	Catalin Marinas <catalin.marinas@arm.com>,
	Jisheng Zhang <Jisheng.Zhang@synaptics.com>
Cc: kernel-team@android.com, Will Deacon <will@kernel.org>,
	linux-arm-kernel@lists.infradead.org,
	linux-kernel@vger.kernel.org, Liao Chang <liaochang1@huawei.com>
Subject: Re: [PATCH] arm64: kprobes: Restore local irqflag if kprobes is cancelled
Date: Tue, 13 Apr 2021 18:49:22 +0100	[thread overview]
Message-ID: <161830261625.3702418.8292373763983690459.b4-ty@kernel.org> (raw)
In-Reply-To: <20210412174101.6bfb0594@xhacker.debian>

On Mon, 12 Apr 2021 17:41:01 +0800, Jisheng Zhang wrote:
> If instruction being single stepped caused a page fault, the kprobes
> is cancelled to let the page fault handler continue as a normal page
> fault. But the local irqflags are disabled so cpu will restore pstate
> with DAIF masked. After pagefault is serviced, the kprobes is
> triggerred again, we overwrite the saved_irqflag by calling
> kprobes_save_local_irqflag(). NOTE, DAIF is masked in this new saved
> irqflag. After kprobes is serviced, the cpu pstate is retored with
> DAIF masked.
> 
> [...]

Applied to arm64 (for-next/fixes), thanks!

[1/1] arm64: kprobes: Restore local irqflag if kprobes is cancelled
      https://git.kernel.org/arm64/c/738fa58ee132

Cheers,
-- 
Will

https://fixes.arm64.dev
https://next.arm64.dev
https://will.arm64.dev

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

  parent reply	other threads:[~2021-04-13 17:49 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-04-12  9:41 [PATCH] arm64: kprobes: Restore local irqflag if kprobes is cancelled Jisheng Zhang
2021-04-12  9:41 ` Jisheng Zhang
2021-04-12 13:11 ` Masami Hiramatsu
2021-04-12 13:11   ` Masami Hiramatsu
2021-04-12 14:46   ` Masami Hiramatsu
2021-04-12 14:46     ` Masami Hiramatsu
2021-04-13 17:49 ` Will Deacon [this message]
2021-04-13 17:49   ` 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=161830261625.3702418.8292373763983690459.b4-ty@kernel.org \
    --to=will@kernel.org \
    --cc=Jisheng.Zhang@synaptics.com \
    --cc=catalin.marinas@arm.com \
    --cc=kernel-team@android.com \
    --cc=liaochang1@huawei.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mhiramat@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.