[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-Id: <169928282917.16503.10982051973529578442.git-patchwork-notify@kernel.org>
Date: Mon, 06 Nov 2023 15:00:29 +0000
From: patchwork-bot+linux-riscv@...nel.org
To: Haorong Lu <ancientmodern4@...il.com>
Cc: linux-riscv@...ts.infradead.org, paul.walmsley@...ive.com,
palmer@...belt.com, aou@...s.berkeley.edu,
conor.dooley@...rochip.com, andy.chiu@...ive.com, heiko@...ech.de,
guoren@...nel.org, viro@...iv.linux.org.uk,
mathis.salmen@...sal.de, abrestic@...osinc.com,
greentime.hu@...ive.com, vincent.chen@...ive.com,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH] riscv: signal: handle syscall restart before get_signal
Hello:
This patch was applied to riscv/linux.git (for-next)
by Palmer Dabbelt <palmer@...osinc.com>:
On Thu, 3 Aug 2023 15:44:54 -0700 you wrote:
> In the current riscv implementation, blocking syscalls like read() may
> not correctly restart after being interrupted by ptrace. This problem
> arises when the syscall restart process in arch_do_signal_or_restart()
> is bypassed due to changes to the regs->cause register, such as an
> ebreak instruction.
>
> Steps to reproduce:
> 1. Interrupt the tracee process with PTRACE_SEIZE & PTRACE_INTERRUPT.
> 2. Backup original registers and instruction at new_pc.
> 3. Change pc to new_pc, and inject an instruction (like ebreak) to this
> address.
> 4. Resume with PTRACE_CONT and wait for the process to stop again after
> executing ebreak.
> 5. Restore original registers and instructions, and detach from the
> tracee process.
> 6. Now the read() syscall in tracee will return -1 with errno set to
> ERESTARTSYS.
>
> [...]
Here is the summary with links:
- riscv: signal: handle syscall restart before get_signal
https://git.kernel.org/riscv/c/ce4f78f1b53d
You are awesome, thank you!
--
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html
Powered by blists - more mailing lists