[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <ZhVXtv7CX7CGm3R6@alpha.franken.de>
Date: Tue, 9 Apr 2024 16:59:02 +0200
From: Thomas Bogendoerfer <tsbogend@...ha.franken.de>
To: Jiaxun Yang <jiaxun.yang@...goat.com>
Cc: Oleg Nesterov <oleg@...hat.com>, linux-mips@...r.kernel.org,
linux-kernel@...r.kernel.org, Xi Ruoyao <xry111@...111.site>
Subject: Re: [PATCH] MIPS: scall: Save thread_info.syscall unconditionally on
entry
On Thu, Mar 28, 2024 at 02:27:56PM +0000, Jiaxun Yang wrote:
> thread_info.syscall is used by syscall_get_nr to supply syscall nr
> over a thread stack frame.
>
> Previously, thread_info.syscall is only saved at syscall_trace_enter
> when syscall tracing is enabled. However rest of the kernel code do
> expect syscall_get_nr to be available without syscall tracing. The
> previous design breaks collect_syscall.
>
> Move saving process to syscall entry to fix it.
>
> Reported-by: Xi Ruoyao <xry111@...111.site>
> Link: https://github.com/util-linux/util-linux/issues/2867
> Signed-off-by: Jiaxun Yang <jiaxun.yang@...goat.com>
> ---
> arch/mips/include/asm/ptrace.h | 2 +-
> arch/mips/kernel/asm-offsets.c | 1 +
> arch/mips/kernel/ptrace.c | 15 ++++++---------
> arch/mips/kernel/scall32-o32.S | 23 +++++++++++++----------
> arch/mips/kernel/scall64-n32.S | 3 ++-
> arch/mips/kernel/scall64-n64.S | 3 ++-
> arch/mips/kernel/scall64-o32.S | 33 +++++++++++++++++----------------
> 7 files changed, 42 insertions(+), 38 deletions(-)
applied to mips-fixes.
Thomas.
--
Crap can work. Given enough thrust pigs will fly, but it's not necessarily a
good idea. [ RFC1925, 2.3 ]
Powered by blists - more mailing lists