Re: [PATCH 06/13 v3] arc: define syscall_get_arch()

2018-11-09 Thread Vineet Gupta
On 11/9/18 3:54 PM, Dmitry V. Levin wrote: > syscall_get_arch() is required to be implemented on all architectures > that use tracehook_report_syscall_entry() in order to extend > the generic ptrace API with PTRACE_GET_SYSCALL_INFO request. > > Signed-off-by: Dmitry V. Levin Acked-by: Vineet Gupt

[PATCH 06/13 v3] arc: define syscall_get_arch()

2018-11-09 Thread Dmitry V. Levin
syscall_get_arch() is required to be implemented on all architectures that use tracehook_report_syscall_entry() in order to extend the generic ptrace API with PTRACE_GET_SYSCALL_INFO request. Signed-off-by: Dmitry V. Levin --- v3: replaced #ifdefs with IS_ENABLED, made LE as default, added BE

Re: [PATCH 02/13 v2] Move EM_ARCOMPACT and EM_ARCV2 to uapi/linux/elf-em.h

2018-11-09 Thread Vineet Gupta
On 11/9/18 3:33 PM, Dmitry V. Levin wrote: > These should never have been defined in the arch tree to begin with, and > now uapi/linux/audit.h header is going to use EM_ARCOMPACT and EM_ARCV2 in > order to define AUDIT_ARCH_ARCOMPACT and AUDIT_ARCH_ARCV2 which are needed > to implement syscall_get_

Re: [PATCH 06/13 v2] arc: define syscall_get_arch()

2018-11-09 Thread Vineet Gupta
On 11/9/18 3:33 PM, Dmitry V. Levin wrote: > syscall_get_arch() is required to be implemented on all architectures > that use tracehook_report_syscall_entry() in order to extend > the generic ptrace API with PTRACE_GET_SYSCALL_INFO request. > > Signed-off-by: Dmitry V. Levin > --- > v2: define AUD

[PATCH 06/13 v2] arc: define syscall_get_arch()

2018-11-09 Thread Dmitry V. Levin
syscall_get_arch() is required to be implemented on all architectures that use tracehook_report_syscall_entry() in order to extend the generic ptrace API with PTRACE_GET_SYSCALL_INFO request. Signed-off-by: Dmitry V. Levin --- v2: define AUDIT_ARCH_ARCOMPACT, AUDIT_ARCH_ARCOMPACTLE, AUDIT_ARCH_AR

[PATCH 02/13 v2] Move EM_ARCOMPACT and EM_ARCV2 to uapi/linux/elf-em.h

2018-11-09 Thread Dmitry V. Levin
These should never have been defined in the arch tree to begin with, and now uapi/linux/audit.h header is going to use EM_ARCOMPACT and EM_ARCV2 in order to define AUDIT_ARCH_ARCOMPACT and AUDIT_ARCH_ARCV2 which are needed to implement syscall_get_arch() which in turn is required to extend the gene

Re: [PATCH 02/13] elf-em.h: add EM_ARC

2018-11-09 Thread Dmitry V. Levin
On Fri, Nov 09, 2018 at 04:41:36PM +, Vineet Gupta wrote: > On 11/8/18 7:15 PM, Dmitry V. Levin wrote: > > The uapi/linux/audit.h header is going to use EM_ARC in order > > to define AUDIT_ARCH_ARC which is needed to implement > > syscall_get_arch() which in turn is required to extend > > the g

Re: [PATCH 06/13] arc: define syscall_get_arch()

2018-11-09 Thread Vineet Gupta
On 11/9/18 11:03 AM, Andy Lutomirski wrote: >> Does ptrace (or user of this API) need a unique value per arch. Otherwise >> instead >> of adding the boilerplate code to all arches, they could simply define >> AUDIT_ARCH >> and common code could return it. Also the EM_xxx are not there in >> inclu

Re: [PATCH 06/13] arc: define syscall_get_arch()

2018-11-09 Thread Andy Lutomirski
> On Nov 9, 2018, at 8:50 AM, Vineet Gupta wrote: > >> On 11/8/18 7:16 PM, Dmitry V. Levin wrote: >> syscall_get_arch() is required to be implemented on all architectures >> that use tracehook_report_syscall_entry() in order to extend >> the generic ptrace API with PTRACE_GET_SYSCALL_INFO reque

Re: [PATCH] ARC: MM: fix UB and kernel resourse leak in do_page_fault

2018-11-09 Thread Vineet Gupta
On 11/7/18 4:12 AM, Eugeniy Paltsev wrote: > Commit 15773ae938d8 ("signal/arc: Use force_sig_fault where > appropriate") adds undefined behaviour and kernel resource leak > to userspace in ARC do_page_fault() implementation. > > This happens because we don't initialize si_code variable after we >

Re: [PATCH 06/13] arc: define syscall_get_arch()

2018-11-09 Thread Vineet Gupta
On 11/8/18 7:16 PM, Dmitry V. Levin wrote: > syscall_get_arch() is required to be implemented on all architectures > that use tracehook_report_syscall_entry() in order to extend > the generic ptrace API with PTRACE_GET_SYSCALL_INFO request. > > Signed-off-by: Dmitry V. Levin > --- > arch/arc/incl

Re: [PATCH 02/13] elf-em.h: add EM_ARC

2018-11-09 Thread Vineet Gupta
On 11/8/18 7:15 PM, Dmitry V. Levin wrote: > The uapi/linux/audit.h header is going to use EM_ARC in order > to define AUDIT_ARCH_ARC which is needed to implement > syscall_get_arch() which in turn is required to extend > the generic ptrace API with PTRACE_GET_SYSCALL_INFO request. > > The value fo

Re: [PATCH 06/13] arc: define syscall_get_arch()

2018-11-09 Thread Andy Lutomirski
On Fri, Nov 9, 2018 at 8:11 AM Alexey Brodkin wrote: > > Hi Andy, > > On Fri, 2018-11-09 at 07:56 -0800, Andy Lutomirski wrote: > > > On Nov 9, 2018, at 7:27 AM, Alexey Brodkin > > > wrote: > > > > > > Hi Andy, > > > > > > > On Fri, 2018-11-09 at 07:17 -0800, Andy Lutomirski wrote: > > > > On Fr

Re: [PATCH 06/13] arc: define syscall_get_arch()

2018-11-09 Thread Alexey Brodkin
Hi Andy, On Fri, 2018-11-09 at 07:56 -0800, Andy Lutomirski wrote: > > On Nov 9, 2018, at 7:27 AM, Alexey Brodkin > > wrote: > > > > Hi Andy, > > > > > On Fri, 2018-11-09 at 07:17 -0800, Andy Lutomirski wrote: > > > On Fri, Nov 9, 2018 at 6:22 AM Alexey Brodkin > > > wrote: > > > > Hi Dmitry,

Re: [PATCH 06/13] arc: define syscall_get_arch()

2018-11-09 Thread Andy Lutomirski
> On Nov 9, 2018, at 7:27 AM, Alexey Brodkin > wrote: > > Hi Andy, > >> On Fri, 2018-11-09 at 07:17 -0800, Andy Lutomirski wrote: >> On Fri, Nov 9, 2018 at 6:22 AM Alexey Brodkin >> wrote: >>> Hi Dmitry, >>> On Fri, 2018-11-09 at 06:16 +0300, Dmitry V. Levin wrote: syscall_get_ar

Re: [PATCH 06/13] arc: define syscall_get_arch()

2018-11-09 Thread Alexey Brodkin
Hi Andy, On Fri, 2018-11-09 at 07:17 -0800, Andy Lutomirski wrote: > On Fri, Nov 9, 2018 at 6:22 AM Alexey Brodkin > wrote: > > Hi Dmitry, > > > > On Fri, 2018-11-09 at 06:16 +0300, Dmitry V. Levin wrote: > > > syscall_get_arch() is required to be implemented on all architectures > > > that use

Re: [PATCH 06/13] arc: define syscall_get_arch()

2018-11-09 Thread Andy Lutomirski
On Fri, Nov 9, 2018 at 6:22 AM Alexey Brodkin wrote: > > Hi Dmitry, > > On Fri, 2018-11-09 at 06:16 +0300, Dmitry V. Levin wrote: > > syscall_get_arch() is required to be implemented on all architectures > > that use tracehook_report_syscall_entry() in order to extend > > the generic ptrace API wi

Re: [PATCH 06/13] arc: define syscall_get_arch()

2018-11-09 Thread Alexey Brodkin
Hi Dmitry, On Fri, 2018-11-09 at 06:16 +0300, Dmitry V. Levin wrote: > syscall_get_arch() is required to be implemented on all architectures > that use tracehook_report_syscall_entry() in order to extend > the generic ptrace API with PTRACE_GET_SYSCALL_INFO request. > > Signed-off-by: Dmitry V. L

Re: [PATCH 02/13] elf-em.h: add EM_ARC

2018-11-09 Thread Alexey Brodkin
Hi Dmitry, On Fri, 2018-11-09 at 06:15 +0300, Dmitry V. Levin wrote: > The uapi/linux/audit.h header is going to use EM_ARC in order > to define AUDIT_ARCH_ARC which is needed to implement > syscall_get_arch() which in turn is required to extend > the generic ptrace API with PTRACE_GET_SYSCALL_INF