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 <l...@altlinux.org>
---
include/uapi/asm-generic/signal.h | 3 +++
arch/alpha/include/uapi/asm/signal.h | 3 +++
arch/arm/include
) < sizeof(__kernel_size_t).
Signed-off-by: Dmitry V. Levin <l...@altlinux.org>
---
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
'
__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 <l...@altlinux.org>
---
include/uapi/asm-generic/sembuf.h | 1 +
arch/alpha/include/uapi/asm/sembuf.h | 2 ++
arch/avr32/includ
: error: unknown type name
'__kernel_ulong_t'
__kernel_ulong_t __unused3;
/usr/include/asm-generic/shmbuf.h:56:2: error: unknown type name
'__kernel_ulong_t'
__kernel_ulong_t __unused4;
Signed-off-by: Dmitry V. Levin <l...@altlinux.org>
---
include/uapi/asm-generic/shmbuf.h | 1 +
arch
'__kernel_ulong_t'
__kernel_ulong_t __unused5;
Signed-off-by: Dmitry V. Levin <l...@altlinux.org>
---
include/uapi/asm-generic/msgbuf.h | 1 +
arch/alpha/include/uapi/asm/msgbuf.h | 2 ++
arch/avr32/include/uapi/asm/msgbuf.h | 2 ++
arch/frv/include/uapi/asm/msgbuf.h | 2 ++
(__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.
Signed-off-by: Dmitry V
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 <a...@arndb.de> wrote:
> > On Sun, Feb 26, 2017 at 2:01 AM, Dmitry V. Levin <l...@altlinux.org> wrote:
> >> Include (guarded by #ifndef __KERNEL__) to f
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=151501500704383 .
The symptoms are exactly the same: the same signal_receive test from
the strace test suite fails with the same diagnostics:
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
> > intr
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
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=151501500704383 .
>
> The symptoms are exactly the
ch().
* 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 remaining s
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
: 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
eturn 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
arc: de
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
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 ++
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:
.
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
---
Not
: 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
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 O
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
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
: 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_get_*
.@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/ptra
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: syscal
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
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
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")
.@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
today, 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
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
: 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: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
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
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
>
pat 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 syscall
: 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
truct;
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_erro
: 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
: 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
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_erro
at 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() # waiting
for ack
-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 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
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
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
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
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
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
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
gt; Document 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
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
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,
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
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(+),
65 matches
Mail list logo