: Michael Ellerman
Cc: Benjamin Herrenschmidt
Cc: Paul Mackerras
Cc: Oleg Nesterov
Cc: Andy Lutomirski
Cc: Elvira Khabirova
Cc: Eugene Syromyatnikov
Cc: linuxppc-dev@lists.ozlabs.org
Signed-off-by: Dmitry V. Levin
---
This is just a gentle ping, the patch is unchanged.
Notes:
v7: unchanged
.@vger.kernel.org
Cc: sparcli...@vger.kernel.org
Cc: linux...@lists.infradead.org
Cc: linux-xte...@linux-xtensa.org
Cc: linux-a...@vger.kernel.org
Cc: linux-au...@redhat.com
Signed-off-by: Dmitry V. Levin
---
Notes:
v2: unchanged
arch/alpha/include/asm/syscall.h | 2 +-
arch/arc/i
On Mon, Mar 18, 2019 at 10:49:23AM +, Sudeep Holla wrote:
> Now that we have a new hook ptrace_syscall_enter that can be called from
> syscall entry code and it handles PTRACE_SYSEMU in generic code, we
> can do some cleanup using the same in do_syscall_trace_enter.
>
> Cc: Oleg Nesterov
> Cc
On Mon, Mar 18, 2019 at 10:49:21AM +, Sudeep Holla wrote:
> Currently each architecture handles PTRACE_SYSEMU in very similar way.
> It's completely arch independent and can be handled in the code helping
> to consolidate PTRACE_SYSEMU handling.
>
> Let's introduce a hook 'ptrace_syscall_enter
On Mon, Mar 18, 2019 at 10:49:21AM +, Sudeep Holla wrote:
> Currently each architecture handles PTRACE_SYSEMU in very similar way.
> It's completely arch independent and can be handled in the code helping
> to consolidate PTRACE_SYSEMU handling.
>
> Let's introduce a hook 'ptrace_syscall_enter
s_compat with entry_info.arch, use syscall_get_arch().
* Use addr argument of sys_ptrace to get expected size of the struct;
return full size of the struct.
Dmitry V. Levin (6):
nds32: fix asm/syscall.h
hexagon: define syscall_get_error() and syscall_get_return_value()
mips: define sy
: Michael Ellerman
Cc: Elvira Khabirova
Cc: Eugene Syromyatnikov
Cc: Benjamin Herrenschmidt
Cc: Paul Mackerras
Cc: Oleg Nesterov
Cc: Andy Lutomirski
Cc: linuxppc-dev@lists.ozlabs.org
Signed-off-by: Dmitry V. Levin
---
Notes:
v8: unchanged
v7: unchanged
v6: unchanged
v5: initial
ent cases that are never used, simply rewrite it to return the first 6
> arguments of a system call.
>
> This should help out the performance of tracing system calls by ptrace,
> ftrace and perf.
>
> Link: http://lkml.kernel.org/r/20161107213233.754809...@goodmis.org
FWIW, you c
ay, there are no users of syscall_set_arguments(). But we are told that
> there will be soon. But for now, at least make it consistent with
> syscall_get_arguments().
>
> Link: http://lkml.kernel.org/r/20190327222014.ga32...@altlinux.org
FWIW, you can add
Reviewed-by: Dmitry V. Levin
There
uct;
return full size of the struct.
Dmitry V. Levin (6):
nds32: fix asm/syscall.h # waiting for ack since early January
hexagon: define syscall_get_error() and syscall_get_return_value() # waiting
for ack since November
mips: define syscall_get_error() # acked
parisc: define syscall_get
: Michael Ellerman
Cc: Elvira Khabirova
Cc: Eugene Syromyatnikov
Cc: Benjamin Herrenschmidt
Cc: Paul Mackerras
Cc: Oleg Nesterov
Cc: Andy Lutomirski
Cc: linuxppc-dev@lists.ozlabs.org
Signed-off-by: Dmitry V. Levin
---
Michael, this patch is waiting for ACK since early December.
Notes:
v9
e of the struct;
return full size of the struct.
Dmitry V. Levin (6):
nds32: fix asm/syscall.h # acked
hexagon: define syscall_get_error() and syscall_get_return_value() # waiting
for ack since November
mips: define syscall_get_error() # acked
parisc: define syscall_get
: Michael Ellerman
Cc: Elvira Khabirova
Cc: Eugene Syromyatnikov
Cc: Benjamin Herrenschmidt
Cc: Paul Mackerras
Cc: Oleg Nesterov
Cc: Andy Lutomirski
Cc: linuxppc-dev@lists.ozlabs.org
Signed-off-by: Dmitry V. Levin
---
Michael, this patch is waiting for ACK since early December.
Notes:
v10
From: Elvira Khabirova
Arch code should use tracehook_*() helpers as documented
in include/linux/tracehook.h,
ptrace_report_syscall() is not expected to be used outside that file.
Co-authored-by: Dmitry V. Levin
Fixes: 5521eb4bca2d ("powerpc/ptrace: Add support for PTRACE_SYSEMU")
nuxppc-dev@lists.ozlabs.org
Cc: nios2-...@lists.rocketboards.org
Cc: openr...@lists.librecores.org
Cc: sparcli...@vger.kernel.org
Cc: uclinux-h8-de...@lists.sourceforge.jp
Cc: x...@kernel.org
Signed-off-by: Dmitry V. Levin
---
arch/alpha/include/asm/syscall.h | 2 +-
arch/arc/include/asm/syscall.h
Hi Paul,
On Wed, Nov 21, 2018 at 06:40:06PM +, Paul Burton wrote:
> Hi Dmitry,
>
> On Wed, Nov 21, 2018 at 03:44:22AM +0300, Dmitry V. Levin wrote:
> > This argument is required to extend the generic ptrace API
> > with PTRACE_GET_SYSCALL_INFO request: syscall_get_
Cc: linux...@lists.infradead.org
Cc: linux-xte...@linux-xtensa.org
Cc: linuxppc-dev@lists.ozlabs.org
Cc: nios2-...@lists.rocketboards.org
Cc: openr...@lists.librecores.org
Cc: sparcli...@vger.kernel.org
Cc: uclinux-h8-de...@lists.sourceforge.jp
Cc: x...@kernel.org
Signed-off-by: Dmitry V. Levin
---
v2: clean
From: Elvira Khabirova
Arch code should use tracehook_*() helpers, as documented
in include/linux/tracehook.h,
ptrace_report_syscall() is not expected to be used outside that file.
Co-authored-by: Dmitry V. Levin
Fixes: 5521eb4bca2d ("powerpc/ptrace: Add support for PTRACE_SYSEMU")
On Mon, Dec 03, 2018 at 06:18:23AM +0300, Dmitry V. Levin wrote:
> From: Elvira Khabirova
>
> Arch code should use tracehook_*() helpers, as documented
> in include/linux/tracehook.h,
> ptrace_report_syscall() is not expected to be used outside that file.
>
> Co-authore
On Fri, Dec 07, 2018 at 10:12:49PM +1100, Michael Ellerman wrote:
> "Dmitry V. Levin" writes:
> > On Mon, Dec 03, 2018 at 06:18:23AM +0300, Dmitry V. Levin wrote:
> >> From: Elvira Khabirova
> >>
> >> Arch code should use tracehook_*() helpers, a
.
Co-authored-by: Dmitry V. Levin
Fixes: 5521eb4bca2d ("powerpc/ptrace: Add support for PTRACE_SYSEMU")
Cc: Michael Ellerman
Cc: Benjamin Herrenschmidt
Cc: Paul Mackerras
Cc: Oleg Nesterov
Cc: Breno Leitao
Cc: Andy Lutomirski
Cc: Eugene Syromyatnikov
Cc: linuxppc-dev@lists.ozlabs.
On Fri, Dec 07, 2018 at 05:34:10PM +0100, Oleg Nesterov wrote:
> On 12/07, Dmitry V. Levin wrote:
> > On Fri, Dec 07, 2018 at 10:12:49PM +1100, Michael Ellerman wrote:
> >
> > > > Sorry, this patch does not work, please ignore it.
> > >
> > > Hmm OK.
From: Elvira Khabirova
Arch code should use tracehook_*() helpers, as documented
in include/linux/tracehook.h,
ptrace_report_syscall() is not expected to be used outside that file.
Co-authored-by: Dmitry V. Levin
Fixes: 5521eb4bca2d ("powerpc/ptrace: Add support for PTRACE_SYSEMU")
C
: Michael Ellerman
Cc: Benjamin Herrenschmidt
Cc: Paul Mackerras
Cc: Oleg Nesterov
Cc: Andy Lutomirski
Cc: Elvira Khabirova
Cc: Eugene Syromyatnikov
Cc: linuxppc-dev@lists.ozlabs.org
Signed-off-by: Dmitry V. Levin
---
Notes:
This change has been tested with
tools/testing/selftests/ptrace
.
Co-authored-by: Dmitry V. Levin
Fixes: 5521eb4bca2d ("powerpc/ptrace: Add support for PTRACE_SYSEMU")
Cc: Michael Ellerman
Cc: Oleg Nesterov
Cc: Eugene Syromyatnikov
Cc: Benjamin Herrenschmidt
Cc: Paul Mackerras
Cc: Breno Leitao
Cc: Andy Lutomirski
Cc: linuxppc-dev@lists.ozlabs.
.
v2:
* Do not use task->ptrace.
* Replace entry_info.is_compat with entry_info.arch, use syscall_get_arch().
* Use addr argument of sys_ptrace to get expected size of the struct;
return full size of the struct.
Dmitry V. Levin (23):
alpha: define remaining syscall_g
.@vger.kernel.org
Cc: linux...@vger.kernel.org
Cc: sparcli...@vger.kernel.org
Cc: linux...@lists.infradead.org
Cc: linux-xte...@linux-xtensa.org
Cc: linux-a...@vger.kernel.org
Cc: linux-au...@redhat.com
Signed-off-by: Dmitry V. Levin
---
Notes:
v5: fixed asm-generic docs by reverting 1002d94d3
On Mon, Dec 10, 2018 at 02:28:07PM +0100, Oleg Nesterov wrote:
> On 12/07, Dmitry V. Levin wrote:
> >
> > Please make either v5 or v6 edition of this fix, or any similar fix,
> > into v4.20.
>
> IIUC, v5 above means
>
> [PATCH v5 23/25] powerpc/ptrace: rep
: Michael Ellerman
Cc: Benjamin Herrenschmidt
Cc: Paul Mackerras
Cc: Oleg Nesterov
Cc: Andy Lutomirski
Cc: Elvira Khabirova
Cc: Eugene Syromyatnikov
Cc: linuxppc-dev@lists.ozlabs.org
Signed-off-by: Dmitry V. Levin
---
Notes:
v6: unchanged
v5:
This change has been tested with
.
Co-authored-by: Dmitry V. Levin
Fixes: 5521eb4bca2d ("powerpc/ptrace: Add support for PTRACE_SYSEMU")
Signed-off-by: Elvira Khabirova
Signed-off-by: Dmitry V. Levin
[mpe: Take this as a minimal fix for 4.20, we'll rework it later]
Signed-off-by: Michael Ellerman
---
Notes:
return full size of the struct.
Dmitry V. Levin (25):
asm-generic/syscall.h: prepare for inclusion by other files
asm-generic/syscall.h: turn syscall_[gs]et_arguments into wrappers
alpha: define remaining syscall_get_* functions
Move EM_ARCOMPACT and EM_ARCV2 to uapi/linux/elf-em.h
ar
abs.org
Cc: linux-ri...@lists.infradead.org
Cc: linux-s...@vger.kernel.org
Cc: linux...@vger.kernel.org
Cc: sparcli...@vger.kernel.org
Cc: linux...@lists.infradead.org
Cc: linux-xte...@linux-xtensa.org
Cc: linux-a...@vger.kernel.org
Cc: linux-au...@redhat.com
Signed-off-by: Dmitry V. Levin
---
Notes:
v6:
Invoke tracehook_report_syscall_entry once.
Signed-off-by: Dmitry V. Levin
---
arch/powerpc/kernel/ptrace.c | 54 +---
1 file changed, 31 insertions(+), 23 deletions(-)
diff --git a/arch/powerpc/kernel/ptrace.c b/arch/powerpc/kernel/ptrace.c
index 714c3480c52d
On Sun, Jul 07, 2019 at 12:57:35AM +1000, Aleksa Sarai wrote:
[...]
> +/**
> + * Arguments for how openat2(2) should open the target path. If @extra is
> zero,
> + * then openat2(2) is identical to openat(2).
> + *
> + * @flags: O_* flags (unknown flags ignored).
What was the rationale for implem
On Thu, Jul 18, 2019 at 11:29:50PM +0200, Arnd Bergmann wrote:
[...]
> 5. you get the same problem with seccomp and strace that
>clone3() has -- these and others only track the register
>arguments by default.
Just for the record, this is definitely not the case for strace:
it decodes array
Hi,
On Mon, Dec 17, 2018 at 10:20:26PM +1100, Michael Ellerman wrote:
> "Dmitry V. Levin" writes:
> > Invoke tracehook_report_syscall_entry once.
>
> Thanks.
>
> > Signed-off-by: Dmitry V. Levin
> > ---
> > arch/powerpc/kernel/ptrace.c | 54 ++
: Michael Ellerman
Cc: Benjamin Herrenschmidt
Cc: Paul Mackerras
Cc: Oleg Nesterov
Cc: Andy Lutomirski
Cc: Elvira Khabirova
Cc: Eugene Syromyatnikov
Cc: linuxppc-dev@lists.ozlabs.org
Signed-off-by: Dmitry V. Levin
---
Notes:
v7: unchanged
v6: unchanged
v5:
This change has been
et_arch().
* Use addr argument of sys_ptrace to get expected size of the struct;
return full size of the struct.
Dmitry V. Levin (21):
asm-generic/syscall.h: prepare for inclusion by other files
asm-generic/syscall.h: turn syscall_[gs]et_arguments into wrappers
alpha: define remain
dev@lists.ozlabs.org
Cc: linux-ri...@lists.infradead.org
Cc: linux-s...@vger.kernel.org
Cc: linux...@vger.kernel.org
Cc: sparcli...@vger.kernel.org
Cc: linux...@lists.infradead.org
Cc: linux-xte...@linux-xtensa.org
Cc: linux-a...@vger.kernel.org
Cc: linux-au...@redhat.com
Signed-off-by: Dmitry
.@vger.kernel.org
Cc: sparcli...@vger.kernel.org
Cc: linux...@lists.infradead.org
Cc: linux-xte...@linux-xtensa.org
Cc: linux-a...@vger.kernel.org
Cc: linux-au...@redhat.com
Signed-off-by: Dmitry V. Levin
---
arch/alpha/include/asm/syscall.h | 2 +-
arch/arc/include/asm/syscall.h
Hi,
On Thu, Jun 11, 2020 at 06:12:01PM +1000, Nicholas Piggin wrote:
[...]
> - Error handling: The consensus among kernel, glibc, and musl is to move to
> using negative return values in r3 rather than CR0[SO]=1 to indicate error,
> which matches most other architectures, and is closer to a fu
On Wed, May 19, 2021 at 12:50:24PM +1000, Nicholas Piggin wrote:
[...]
> With this patch, I think the ptrace ABI should mostly be fixed. I think
> a problem remains with applications that look at system call return
> registers directly and have powerpc specific error cases. Those probably
> will
On Wed, May 19, 2021 at 08:59:05PM +1000, Nicholas Piggin wrote:
> Excerpts from Dmitry V. Levin's message of May 19, 2021 8:24 pm:
> > On Wed, May 19, 2021 at 12:50:24PM +1000, Nicholas Piggin wrote:
> > [...]
> >> With this patch, I think the ptrace ABI should mostly be fixed. I think
> >> a pro
On Thu, May 20, 2021 at 08:51:53AM +1000, Nicholas Piggin wrote:
> Excerpts from Dmitry V. Levin's message of May 19, 2021 11:26 pm:
> > On Wed, May 19, 2021 at 08:59:05PM +1000, Nicholas Piggin wrote:
> >> Excerpts from Dmitry V. Levin's message of May 19, 2021 8:24 pm:
> >> > On Wed, May 19, 2021
On Wed, May 19, 2021 at 07:48:47PM -0400, Rich Felker wrote:
> On Wed, May 19, 2021 at 06:09:25PM +, Joakim Tjernlund wrote:
[...]
> > W.r.t breaking ABI, isn't that what PowerPC is trying to do with the new
> > syscall I/F?
>
> No, it's a new independent interface.
Unfortunately, being a n
On Thu, May 20, 2021 at 12:45:57PM +1000, Nicholas Piggin wrote:
> Excerpts from Dmitry V. Levin's message of May 20, 2021 11:06 am:
> > On Wed, May 19, 2021 at 07:48:47PM -0400, Rich Felker wrote:
> >> On Wed, May 19, 2021 at 06:09:25PM +, Joakim Tjernlund wrote:
> > [...]
> >> > W.r.t breakin
On Thu, May 20, 2021 at 12:40:36PM +1000, Nicholas Piggin wrote:
[...]
> > Looks like struct pt_regs.trap already contains the information that could
> > be used to tell 'sc' from 'scv': if (pt_regs.trap & ~0xf) == 0x3000, then
> > it's scv. Is my reading of arch/powerpc/include/asm/ptrace.h corre
ocument that pt_regs.trap can be used for this, and fix one in-tree user
> to work with scv 0 syscalls.
>
> Fixes: 7fa95f9adaee ("powerpc/64s: system call support for scv/rfscv
> instructions")
> Reported-by: "Dmitry V. Levin"
> Suggested-by: "Dmitry V. L
and tracing functions.
>
> Fix. tools/testing/selftests/ptrace/get_syscall_info now passes when
> scv is used.
>
> Fixes: 7fa95f9adaee ("powerpc/64s: system call support for scv/rfscv
> instructions")
> Reported-by: "Dmitry V. Levin"
> Signed-off-by: Nichol
On Fri, May 21, 2021 at 05:00:36PM -0300, Matheus Castanho wrote:
> Florian Weimer writes:
> > * Matheus Castanho via Libc-alpha:
> >> From: Nicholas Piggin
> >> Subject: [PATCH 1/1] powerpc: Fix handling of scv return error codes
> >>
> >> When using scv on templated ASM syscalls, current code i
ry_info.is_compat with entry_info.arch, used
syscall_get_arch().
* Used addr argument of sys_ptrace to get expected size of the struct;
return full size of the struct.
Dmitry V. Levin (6):
nds32: fix asm/syscall.h # acked
hexagon: define syscall_get_error() and syscall_get_return_value() # wa
-by: Michael Ellerman
Cc: Elvira Khabirova
Cc: Eugene Syromyatnikov
Cc: Benjamin Herrenschmidt
Cc: Paul Mackerras
Cc: Oleg Nesterov
Cc: Andy Lutomirski
Cc: linuxppc-dev@lists.ozlabs.org
Signed-off-by: Dmitry V. Levin
---
Notes:
v11: added Acked-by from
https://lore.kernel.org/lkml
On Fri, Aug 20, 2021 at 09:39:14AM +, Christophe Leroy wrote:
> Make use of is_32bit_task() and CONFIG_CPU_LITTLE_ENDIAN
> to simplify syscall_get_arch().
>
> Signed-off-by: Christophe Leroy
> ---
> arch/powerpc/include/asm/syscall.h | 15 +--
> 1 file changed, 5 insertions(+), 1
n x32 and mips n32, however, #include seems to be the most
straightforward way to obtain the definition for sigaltstack.ss_size's
type.
Signed-off-by: Dmitry V. Levin
---
include/uapi/asm-generic/signal.h | 3 +++
arch/alpha/include/uapi/asm/signal.h | 3 +++
arch/arm/include/ua
eof(size_t) < sizeof(__kernel_size_t).
Signed-off-by: Dmitry V. Levin
---
v2: create a separate patch for x86,
replace size_t with __kernel_size_t instead of including .
include/uapi/asm-generic/signal.h | 2 +-
arch/alpha/include/uapi/asm/signal.h | 2 +-
arch/arm/include/uapi/asm/sig
#x27;
__kernel_ulong_t __unused4;
/usr/include/asm-generic/msgbuf.h:44:2: error: unknown type name
'__kernel_ulong_t'
__kernel_ulong_t __unused5;
Signed-off-by: Dmitry V. Levin
---
include/uapi/asm-generic/msgbuf.h | 1 +
arch/alpha/include/uapi/asm/msgbuf.h | 2 ++
arch/a
sm/sembuf.h:20:2: error: unknown type name '__kernel_ulong_t'
__kernel_ulong_t __unused3;
/usr/include/asm/sembuf.h:21:2: error: unknown type name '__kernel_ulong_t'
__kernel_ulong_t __unused4;
Signed-off-by: Dmitry V. Levin
---
include/uapi/asm-generic/sembuf.h | 1 +
arch/alph
r/include/asm-generic/shmbuf.h:54:2: error: unknown type name
'__kernel_ulong_t'
__kernel_ulong_t __unused2;
/usr/include/asm-generic/shmbuf.h:55:2: error: unknown type name
'__kernel_ulong_t'
__kernel_ulong_t __unused3;
/usr/include/asm-generic/shmbuf.h:56:2: error: unknown t
han
sizeof(__kernel_size_t), but as the kernel treats shm_segsz field as
__kernel_size_t anyway, UAPI should follow. Thanks to little-endiannes
of x32 and 64-bit alignment of the field following shm_segsz, this
change doesn't break ABI, and the difference doesn't manifest itself
easily.
Sig
On Thu, Mar 02, 2017 at 10:22:18AM -0500, Carlos O'Donell wrote:
> On Wed, Mar 1, 2017 at 11:20 AM, Arnd Bergmann wrote:
> > On Sun, Feb 26, 2017 at 2:01 AM, Dmitry V. Levin wrote:
> >> Include (guarded by #ifndef __KERNEL__) to fix asm/signal.h
> >> usersp
Hi,
There seems to be a regression in v4.16 on ppc compat very similar
to sparc compat regression reported earlier at
https://marc.info/?l=linux-sparc&m=151501500704383 .
The symptoms are exactly the same: the same signal_receive test from
the strace test suite fails with the same diagnostics:
ht
Hi,
On Mon, Apr 09, 2018 at 06:22:53PM +0300, Dmitry V. Levin wrote:
> There seems to be a regression in v4.16 on ppc compat very similar
> to sparc compat regression reported earlier at
> https://marc.info/?l=linux-sparc&m=151501500704383 .
>
> The symptoms are exactly
On Thu, Apr 12, 2018 at 10:58:11AM +0100, Russell King - ARM Linux wrote:
> On Thu, Apr 12, 2018 at 04:34:35AM +0300, Dmitry V. Levin wrote:
> > A similar commit v4.16-rc1~159^2~37
> > ("signal/arm: Document conflicts with SI_USER and SIGFPE") must have
> > introdu
On Thu, Apr 12, 2018 at 01:19:49PM +0100, Russell King - ARM Linux wrote:
> On Thu, Apr 12, 2018 at 02:03:14PM +0300, Dmitry V. Levin wrote:
> > On Thu, Apr 12, 2018 at 10:58:11AM +0100, Russell King - ARM Linux wrote:
> > > On Thu, Apr 12, 2018 at 04:34:35AM +0300, Dmi
On Thu, Apr 12, 2018 at 09:50:26AM -0700, Linus Torvalds wrote:
> Does this attached patch perhaps fix the ARM case?
>
> It just uses FPE_FLTUNK as the default si_code for SIGFPE, which seems
> sane enough. And then gets rid of FPE_FIXME, which should resolve the
> nasty case.
>
> Hmm? Entirely u
.
Signed-off-by: Dmitry V. Levin
---
arch/arc/include/asm/syscall.h| 6 ++
arch/arm/include/asm/syscall.h| 12
arch/arm64/include/asm/syscall.h | 7 +++
arch/hexagon/include/asm/syscall.h| 7 +++
arch/loongarch/include/asm/syscall.h | 7
commits.
This reverts commit 7962c2eddbfe7cce879acb06f9b4f205789e57b7.
Signed-off-by: Dmitry V. Levin
---
arch/nios2/include/asm/syscall.h | 11
arch/openrisc/include/asm/syscall.h | 7 ++
arch/powerpc/include/asm/syscall.h| 10
arch/riscv/include/asm/syscall.h
trace_syscall_info)).
[1] https://lore.kernel.org/all/59505464-c84a-403d-972f-d4b2055ee...@gmail.com/
Dmitry V. Levin (6):
Revert "arch: remove unused function syscall_set_arguments()"
syscall.h: add syscall_set_arguments() on remaining
HAVE_ARCH_TRACEHOOK arches
On Mon, Feb 03, 2025 at 10:29:37AM +0100, Alexander Gordeev wrote:
> On Mon, Feb 03, 2025 at 08:58:49AM +0200, Dmitry V. Levin wrote:
>
> Hi Dmitry,
>
> > PTRACE_SET_SYSCALL_INFO is a generic ptrace API that complements
> > PTRACE_GET_SYSCALL_INFO by letting the p
arguments() invocation in case of syscall number -1
in ptrace_set_syscall_info_entry()
* Split ptrace_syscall_info.reserved into ptrace_syscall_info.reserved
and ptrace_syscall_info.flags
* Use __kernel_ulong_t instead of unsigned long in set_syscall_info test
Dmitry V. Levin (
ned-off-by: Dmitry V. Levin
Tested-by: Charlie Jenkins
Reviewed-by: Charlie Jenkins
Acked-by: Helge Deller # parisc
---
arch/arc/include/asm/syscall.h| 14 +++
arch/arm/include/asm/syscall.h| 13 ++
arch/arm64/include/asm/syscall.h | 13 ++
arch/cs
.
Signed-off-by: Dmitry V. Levin
Tested-by: Charlie Jenkins
Reviewed-by: Charlie Jenkins
Acked-by: Helge Deller # parisc
---
arch/arc/include/asm/syscall.h| 11 +++
arch/arm/include/asm/syscall.h| 24
arch/arm64/include/asm/syscall.h | 16
Hi,
On Wed, Jan 29, 2025 at 11:21:41PM +1000, Nicholas Piggin wrote:
> Hi,
>
> I've been toying with the seccomp vs syscall return value problems, and
> wonder if something like this approach could give us a simpler alternative.
> Basically all the core code uses -errno return value, then we conv
ace_syscall_info.reserved into ptrace_syscall_info.reserved
and ptrace_syscall_info.flags
* Use __kernel_ulong_t instead of unsigned long in set_syscall_info test
v1:
Dmitry V. Levin (7):
mips: fix mips_get_syscall_arg() for o32
hexagon: add syscall_set_return_value()
syscall.h:
.
Signed-off-by: Dmitry V. Levin
Tested-by: Charlie Jenkins
Reviewed-by: Charlie Jenkins
---
arch/arc/include/asm/syscall.h| 11 +++
arch/arm/include/asm/syscall.h| 24
arch/arm64/include/asm/syscall.h | 16
arch/hexagon
ned-off-by: Dmitry V. Levin
Tested-by: Charlie Jenkins
Reviewed-by: Charlie Jenkins
---
arch/arc/include/asm/syscall.h| 14 +++
arch/arm/include/asm/syscall.h| 13 ++
arch/arm64/include/asm/syscall.h | 13 ++
arch/csky/include/asm/syscall.h
On Thu, Jan 30, 2025 at 09:33:03AM +0100, Sven Schnelle wrote:
> "Dmitry V. Levin" writes:
>
> > These functions are going to be needed on all HAVE_ARCH_TRACEHOOK
> > architectures to implement PTRACE_SET_SYSCALL_INFO API.
> >
> > This partially reverts c
On Fri, Jan 10, 2025 at 08:37:46AM +0100, Sven Schnelle wrote:
> "Dmitry V. Levin" writes:
>
> > Similar to syscall_set_arguments() that complements
> > syscall_get_arguments(), introduce syscall_set_nr()
> > that complements syscall_get_nr().
> >
> >
On Mon, Jan 20, 2025 at 02:51:38PM +0100, Christophe Leroy wrote:
> Le 14/01/2025 à 18:04, Dmitry V. Levin a écrit :
> > On Mon, Jan 13, 2025 at 06:34:44PM +0100, Christophe Leroy wrote:
> >> Le 13/01/2025 à 18:10, Dmitry V. Levin a écrit :
> >>> Bring syscall_s
On Thu, Jan 23, 2025 at 08:11:44PM +0100, Eugene Syromyatnikov wrote:
> On Thu, Jan 23, 2025 at 7:28 PM Dmitry V. Levin wrote:
> > Indeed, there is an inconsistency in !trap_is_scv case.
> >
> > In some places such as syscall_get_error() and regs_return_value() the
> >
On Thu, Jan 23, 2025 at 11:07:21PM +0100, Christophe Leroy wrote:
[...]
> To add a bit more to the confusion, a task can be flagged with
> TIF_NOERROR by calling force_successful_syscall_return(), in which case
> even if gpr[3] contains a negative between -MAX_ERRNO and -1 the syscall
> will be
On Fri, Jan 24, 2025 at 04:18:10PM +0100, Alexey Gladkov wrote:
> On Fri, Jan 24, 2025 at 01:43:22AM +0200, Dmitry V. Levin wrote:
> > On Thu, Jan 23, 2025 at 08:28:15PM +0200, Dmitry V. Levin wrote:
> > > On Mon, Jan 20, 2025 at 02:51:38PM +0100, Christophe Leroy wrote:
> >
On Thu, Jan 23, 2025 at 08:28:15PM +0200, Dmitry V. Levin wrote:
> On Mon, Jan 20, 2025 at 02:51:38PM +0100, Christophe Leroy wrote:
> > Le 14/01/2025 à 18:04, Dmitry V. Levin a écrit :
> > > On Mon, Jan 13, 2025 at 06:34:44PM +0100, Christophe Leroy wrote:
> > >> L
On Mon, Jan 20, 2025 at 02:51:38PM +0100, Christophe Leroy wrote:
> Le 14/01/2025 à 18:04, Dmitry V. Levin a écrit :
> > On Mon, Jan 13, 2025 at 06:34:44PM +0100, Christophe Leroy wrote:
> >> Le 13/01/2025 à 18:10, Dmitry V. Levin a écrit :
> >>> Bring syscall_s
On Sat, Jan 25, 2025 at 11:18:06PM +1100, Michael Ellerman wrote:
> Alexey Gladkov writes:
> >
> ...
> > I'm not a powerpc expert but shouldn't be used regs->gpr[3] via a
> > regs_return_value() in system_call_exception() ?
>
> Yes I agree.
>
> > notrace long system_call_exception(struct pt_regs
On Mon, Jan 27, 2025 at 12:36:53PM +0100, Christophe Leroy wrote:
> Le 27/01/2025 à 12:20, Dmitry V. Levin a écrit :
> > On Thu, Jan 23, 2025 at 11:07:21PM +0100, Christophe Leroy wrote:
> > [...]
> >> To add a bit more to the confusion,
> >
> > Looks like th
On Thu, Jan 23, 2025 at 11:07:21PM +0100, Christophe Leroy wrote:
[...]
> To add a bit more to the confusion,
Looks like there is no end to it:
static inline long regs_return_value(struct pt_regs *regs)
{
if (trap_is_scv(regs))
return regs->gpr[3];
if (is_syscall_
On Mon, Jan 27, 2025 at 01:04:27PM +0100, Christophe Leroy wrote:
>
>
> Le 27/01/2025 à 12:44, Dmitry V. Levin a écrit :
> > On Mon, Jan 27, 2025 at 12:36:53PM +0100, Christophe Leroy wrote:
> >> Le 27/01/2025 à 12:20, Dmitry V. Levin a écrit :
> >>> On T
On Sat, Jan 25, 2025 at 11:17:45PM +1100, Michael Ellerman wrote:
> "Dmitry V. Levin" writes:
[...]
> > The only case where I see some intersection is do_seccomp() where the
> > tracer would be able to see -ENOSYS in gpr[3]. However, the seccomp stop
> > is not th
n a separate patch.
Link:
https://www.kernel.org/doc/html/latest/arch/powerpc/syscall64-abi.html#return-value
[1]
Signed-off-by: Dmitry V. Levin
Reviewed-by: Alexey Gladkov
---
arch/powerpc/include/asm/syscall.h | 6 +-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/ar
handling that were introduced as a side effect of the dual
ABI support.
Signed-off-by: Dmitry V. Levin
---
arch/powerpc/kernel/ptrace/ptrace.c | 23 ---
arch/powerpc/kernel/signal.c| 11 +++
arch/powerpc/kernel/syscall.c | 6 +++---
3 files changed, 26
On Tue, Jan 28, 2025 at 03:59:29PM +0100, Christophe Leroy wrote:
> Le 27/01/2025 à 19:13, Dmitry V. Levin a écrit :
> > According to the Power Architecture Linux system call ABI documented in
> > [1], when the syscall is made with the sc instruction, both a value and an
> >
On Tue, Jan 28, 2025 at 07:01:47PM +0100, Christophe Leroy wrote:
> Le 27/01/2025 à 19:14, Dmitry V. Levin a écrit :
> > Since the introduction of SECCOMP_RET_TRACE support, the kernel supports
> > simultaneously both the generic kernel -ERRORCODE return value ABI and
> > t
race_set_syscall_info_entry()
* Split ptrace_syscall_info.reserved into ptrace_syscall_info.reserved
and ptrace_syscall_info.flags
* Use __kernel_ulong_t instead of unsigned long in set_syscall_info test
Dmitry V. Levin (6):
mips: fix mips_get_syscall_arg() for o32
syscall.h: add sysca
.
Signed-off-by: Dmitry V. Levin
Tested-by: Charlie Jenkins
Reviewed-by: Charlie Jenkins
---
arch/arc/include/asm/syscall.h| 11 +++
arch/arm/include/asm/syscall.h| 24
arch/arm64/include/asm/syscall.h | 16
arch/hexagon
Signed-off-by: Dmitry V. Levin
Tested-by: Charlie Jenkins
Reviewed-by: Charlie Jenkins
---
arch/arc/include/asm/syscall.h| 14 +++
arch/arm/include/asm/syscall.h| 13 ++
arch/arm64/include/asm/syscall.h | 13 ++
arch/csky/include/asm/syscall.h
On Tue, Jan 28, 2025 at 04:04:34PM +0100, Christophe Leroy wrote:
> Le 28/01/2025 à 10:16, Dmitry V. Levin a écrit :
> > These functions are going to be needed on all HAVE_ARCH_TRACEHOOK
> > architectures to implement PTRACE_SET_SYSCALL_INFO API.
>
> The
On Tue, Jan 28, 2025 at 04:13:52PM +0100, Christophe Leroy wrote:
> Le 28/01/2025 à 10:16, Dmitry V. Levin a écrit :
> > Similar to syscall_set_arguments() that complements
> > syscall_get_arguments(), introduce syscall_set_nr()
> > that complements syscall_get_nr().
> &g
On Tue, Jan 28, 2025 at 05:00:31PM +0100, Christophe Leroy wrote:
> Le 28/01/2025 à 16:52, Dmitry V. Levin a écrit :
> > On Tue, Jan 28, 2025 at 03:59:29PM +0100, Christophe Leroy wrote:
> >> Le 27/01/2025 à 19:13, Dmitry V. Levin a écrit :
> >>> According to the P
On Tue, Jan 21, 2025 at 05:55:40PM +0530, Madhavan Srinivasan wrote:
> On 1/21/25 4:58 PM, Christophe Leroy wrote:
> > Le 21/01/2025 à 12:13, Madhavan Srinivasan a écrit :
> >> On 1/20/25 10:42 PM, Dmitry V. Levin wrote:
> >>> On Mon, Jan 20, 2025 at 02:51:38PM
1 - 100 of 114 matches
Mail list logo