From: Will Deacon <will.deacon@arm.com>
To: Marcin Nowakowski <marcin.nowakowski@imgtec.com>
Cc: linux-api@vger.kernel.org, linux-kernel@vger.kernel.org,
rostedt@goodmis.org, luto@amacapital.net,
Ingo Molnar <mingo@redhat.com>,
Catalin Marinas <catalin.marinas@arm.com>,
linux-arm-kernel@lists.infradead.org
Subject: Re: [PATCH v3 07/11] arm64/tracing: fix compat syscall handling
Date: Wed, 12 Oct 2016 11:04:04 +0100 [thread overview]
Message-ID: <20161012100404.GD32032@arm.com> (raw)
In-Reply-To: <fed0151c-ebfd-18d2-939c-21e315dc7584@imgtec.com>
On Wed, Oct 12, 2016 at 09:07:03AM +0200, Marcin Nowakowski wrote:
> On 11.10.2016 15:36, Will Deacon wrote:
> >On Tue, Oct 11, 2016 at 12:42:52PM +0200, Marcin Nowakowski wrote:
> >>diff --git a/arch/arm64/include/asm/unistd.h b/arch/arm64/include/asm/unistd.h
> >>index e78ac26..276d049 100644
> >>--- a/arch/arm64/include/asm/unistd.h
> >>+++ b/arch/arm64/include/asm/unistd.h
> >>@@ -45,6 +45,7 @@
> >> #define __ARM_NR_compat_set_tls (__ARM_NR_COMPAT_BASE+5)
> >>
> >> #define __NR_compat_syscalls 394
> >>+#define NR_compat_syscalls (__NR_compat_syscalls)
> >
> >We may as well just define NR_compat_syscalls instead of
> >__NR_compat_syscalls and move the handful of users over.
>
> I had tried to minimise the amount of arch-specific changes here -
> especially those that are not directly related to the proposed syscall
> handling change. But I agree having these 2 #defines is a bit unnecessary
There's only three users of __NR_compat_syscalls, so I think you can
move them over.
> >>diff --git a/arch/arm64/kernel/ftrace.c b/arch/arm64/kernel/ftrace.c
> >>index 40ad08a..75d010f 100644
> >>--- a/arch/arm64/kernel/ftrace.c
> >>+++ b/arch/arm64/kernel/ftrace.c
> >>@@ -176,4 +176,20 @@ int ftrace_disable_ftrace_graph_caller(void)
> >> return ftrace_modify_graph_caller(false);
> >> }
> >> #endif /* CONFIG_DYNAMIC_FTRACE */
> >>+
> >> #endif /* CONFIG_FUNCTION_GRAPH_TRACER */
> >>+
> >>+#if (defined CONFIG_FTRACE_SYSCALLS) && (defined CONFIG_COMPAT)
> >>+
> >>+extern const void *sys_call_table[];
> >>+extern const void *compat_sys_call_table[];
> >>+
> >>+unsigned long __init arch_syscall_addr(int nr, bool compat)
> >>+{
> >>+ if (compat)
> >>+ return (unsigned long)compat_sys_call_table[nr];
> >>+
> >>+ return (unsigned long)sys_call_table[nr];
> >>+}
> >
> >Do we care about the compat private syscalls (from base 0x0f0000)? We
> >need to make sure that we exhibit the same behaviour as a native
> >32-bit ARM machine.
> >
> >Will
>
> Tracing of such syscalls has been disabled for a long time (see
> http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=086ba77a6db0).
> Apart from using non-contiguous numbers, they are not defined using standard
> SYSCALL macros, so they do not have any metadata generated either.
> My suggestion is that if you wanted those to be included in the trace then
> it should be done separately from these changes.
Fine by me -- I just wanted to make sure our compat behaviour matched
the behaviour of native arch/arm/. It sounds like it does, so no need to
change anything here.
Acked-by: Will Deacon <will.deacon@arm.com>
Will
WARNING: multiple messages have this Message-ID (diff)
From: will.deacon@arm.com (Will Deacon)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH v3 07/11] arm64/tracing: fix compat syscall handling
Date: Wed, 12 Oct 2016 11:04:04 +0100 [thread overview]
Message-ID: <20161012100404.GD32032@arm.com> (raw)
In-Reply-To: <fed0151c-ebfd-18d2-939c-21e315dc7584@imgtec.com>
On Wed, Oct 12, 2016 at 09:07:03AM +0200, Marcin Nowakowski wrote:
> On 11.10.2016 15:36, Will Deacon wrote:
> >On Tue, Oct 11, 2016 at 12:42:52PM +0200, Marcin Nowakowski wrote:
> >>diff --git a/arch/arm64/include/asm/unistd.h b/arch/arm64/include/asm/unistd.h
> >>index e78ac26..276d049 100644
> >>--- a/arch/arm64/include/asm/unistd.h
> >>+++ b/arch/arm64/include/asm/unistd.h
> >>@@ -45,6 +45,7 @@
> >> #define __ARM_NR_compat_set_tls (__ARM_NR_COMPAT_BASE+5)
> >>
> >> #define __NR_compat_syscalls 394
> >>+#define NR_compat_syscalls (__NR_compat_syscalls)
> >
> >We may as well just define NR_compat_syscalls instead of
> >__NR_compat_syscalls and move the handful of users over.
>
> I had tried to minimise the amount of arch-specific changes here -
> especially those that are not directly related to the proposed syscall
> handling change. But I agree having these 2 #defines is a bit unnecessary
There's only three users of __NR_compat_syscalls, so I think you can
move them over.
> >>diff --git a/arch/arm64/kernel/ftrace.c b/arch/arm64/kernel/ftrace.c
> >>index 40ad08a..75d010f 100644
> >>--- a/arch/arm64/kernel/ftrace.c
> >>+++ b/arch/arm64/kernel/ftrace.c
> >>@@ -176,4 +176,20 @@ int ftrace_disable_ftrace_graph_caller(void)
> >> return ftrace_modify_graph_caller(false);
> >> }
> >> #endif /* CONFIG_DYNAMIC_FTRACE */
> >>+
> >> #endif /* CONFIG_FUNCTION_GRAPH_TRACER */
> >>+
> >>+#if (defined CONFIG_FTRACE_SYSCALLS) && (defined CONFIG_COMPAT)
> >>+
> >>+extern const void *sys_call_table[];
> >>+extern const void *compat_sys_call_table[];
> >>+
> >>+unsigned long __init arch_syscall_addr(int nr, bool compat)
> >>+{
> >>+ if (compat)
> >>+ return (unsigned long)compat_sys_call_table[nr];
> >>+
> >>+ return (unsigned long)sys_call_table[nr];
> >>+}
> >
> >Do we care about the compat private syscalls (from base 0x0f0000)? We
> >need to make sure that we exhibit the same behaviour as a native
> >32-bit ARM machine.
> >
> >Will
>
> Tracing of such syscalls has been disabled for a long time (see
> http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=086ba77a6db0).
> Apart from using non-contiguous numbers, they are not defined using standard
> SYSCALL macros, so they do not have any metadata generated either.
> My suggestion is that if you wanted those to be included in the trace then
> it should be done separately from these changes.
Fine by me -- I just wanted to make sure our compat behaviour matched
the behaviour of native arch/arm/. It sounds like it does, so no need to
change anything here.
Acked-by: Will Deacon <will.deacon@arm.com>
Will
WARNING: multiple messages have this Message-ID (diff)
From: Will Deacon <will.deacon@arm.com>
To: Marcin Nowakowski <marcin.nowakowski@imgtec.com>
Cc: linux-kernel@vger.kernel.org, linux-api@vger.kernel.org,
rostedt@goodmis.org, luto@amacapital.net,
Ingo Molnar <mingo@redhat.com>,
Catalin Marinas <catalin.marinas@arm.com>,
linux-arm-kernel@lists.infradead.org
Subject: Re: [PATCH v3 07/11] arm64/tracing: fix compat syscall handling
Date: Wed, 12 Oct 2016 11:04:04 +0100 [thread overview]
Message-ID: <20161012100404.GD32032@arm.com> (raw)
In-Reply-To: <fed0151c-ebfd-18d2-939c-21e315dc7584@imgtec.com>
On Wed, Oct 12, 2016 at 09:07:03AM +0200, Marcin Nowakowski wrote:
> On 11.10.2016 15:36, Will Deacon wrote:
> >On Tue, Oct 11, 2016 at 12:42:52PM +0200, Marcin Nowakowski wrote:
> >>diff --git a/arch/arm64/include/asm/unistd.h b/arch/arm64/include/asm/unistd.h
> >>index e78ac26..276d049 100644
> >>--- a/arch/arm64/include/asm/unistd.h
> >>+++ b/arch/arm64/include/asm/unistd.h
> >>@@ -45,6 +45,7 @@
> >> #define __ARM_NR_compat_set_tls (__ARM_NR_COMPAT_BASE+5)
> >>
> >> #define __NR_compat_syscalls 394
> >>+#define NR_compat_syscalls (__NR_compat_syscalls)
> >
> >We may as well just define NR_compat_syscalls instead of
> >__NR_compat_syscalls and move the handful of users over.
>
> I had tried to minimise the amount of arch-specific changes here -
> especially those that are not directly related to the proposed syscall
> handling change. But I agree having these 2 #defines is a bit unnecessary
There's only three users of __NR_compat_syscalls, so I think you can
move them over.
> >>diff --git a/arch/arm64/kernel/ftrace.c b/arch/arm64/kernel/ftrace.c
> >>index 40ad08a..75d010f 100644
> >>--- a/arch/arm64/kernel/ftrace.c
> >>+++ b/arch/arm64/kernel/ftrace.c
> >>@@ -176,4 +176,20 @@ int ftrace_disable_ftrace_graph_caller(void)
> >> return ftrace_modify_graph_caller(false);
> >> }
> >> #endif /* CONFIG_DYNAMIC_FTRACE */
> >>+
> >> #endif /* CONFIG_FUNCTION_GRAPH_TRACER */
> >>+
> >>+#if (defined CONFIG_FTRACE_SYSCALLS) && (defined CONFIG_COMPAT)
> >>+
> >>+extern const void *sys_call_table[];
> >>+extern const void *compat_sys_call_table[];
> >>+
> >>+unsigned long __init arch_syscall_addr(int nr, bool compat)
> >>+{
> >>+ if (compat)
> >>+ return (unsigned long)compat_sys_call_table[nr];
> >>+
> >>+ return (unsigned long)sys_call_table[nr];
> >>+}
> >
> >Do we care about the compat private syscalls (from base 0x0f0000)? We
> >need to make sure that we exhibit the same behaviour as a native
> >32-bit ARM machine.
> >
> >Will
>
> Tracing of such syscalls has been disabled for a long time (see
> http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=086ba77a6db0).
> Apart from using non-contiguous numbers, they are not defined using standard
> SYSCALL macros, so they do not have any metadata generated either.
> My suggestion is that if you wanted those to be included in the trace then
> it should be done separately from these changes.
Fine by me -- I just wanted to make sure our compat behaviour matched
the behaviour of native arch/arm/. It sounds like it does, so no need to
change anything here.
Acked-by: Will Deacon <will.deacon@arm.com>
Will
next prev parent reply other threads:[~2016-10-12 10:04 UTC|newest]
Thread overview: 50+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-10-11 10:42 [PATCH v3 00/11] syscall/tracing: compat syscall support Marcin Nowakowski
2016-10-11 10:42 ` Marcin Nowakowski
2016-10-11 10:42 ` [PATCH v3 01/11] tracing/syscalls: remove syscall_nr from syscall metadata Marcin Nowakowski
2016-10-11 10:42 ` Marcin Nowakowski
2016-10-11 10:42 ` [PATCH v3 02/11] tracing/syscalls: add handling for compat tasks Marcin Nowakowski
2016-10-11 10:42 ` Marcin Nowakowski
2016-10-11 10:42 ` [PATCH v3 03/11] tracing/syscalls: add compat syscall metadata Marcin Nowakowski
2016-10-11 10:42 ` Marcin Nowakowski
[not found] ` <1476182576-15247-4-git-send-email-marcin.nowakowski-1AXoQHu6uovQT0dZR+AlfA@public.gmane.org>
2016-10-12 8:50 ` Michael Ellerman
2016-10-12 8:50 ` Michael Ellerman
[not found] ` <8737k254tc.fsf-W0DJWXSxmBNbyGPkN3NxC2scP1bn1w/D@public.gmane.org>
2016-10-12 13:09 ` Marcin Nowakowski
2016-10-12 13:09 ` Marcin Nowakowski
2016-10-13 9:33 ` Michael Ellerman
2016-10-13 9:33 ` Michael Ellerman
2016-10-11 10:42 ` [PATCH v3 04/11] syscall/tracing: allow arch to override syscall_get_nr for ftrace Marcin Nowakowski
2016-10-11 10:42 ` Marcin Nowakowski
2016-10-11 10:42 ` [PATCH v3 05/11] x86/tracing: fix compat syscall handling Marcin Nowakowski
2016-10-11 10:42 ` Marcin Nowakowski
[not found] ` <1476182576-15247-6-git-send-email-marcin.nowakowski-1AXoQHu6uovQT0dZR+AlfA@public.gmane.org>
2016-10-12 13:53 ` Thomas Gleixner
2016-10-12 13:53 ` Thomas Gleixner
2016-10-13 6:32 ` Marcin Nowakowski
2016-10-13 6:32 ` Marcin Nowakowski
2016-10-11 10:42 ` [PATCH v3 06/11] s390/tracing: " Marcin Nowakowski
2016-10-11 10:42 ` Marcin Nowakowski
2016-10-11 10:42 ` [PATCH v3 07/11] arm64/tracing: " Marcin Nowakowski
2016-10-11 10:42 ` Marcin Nowakowski
2016-10-11 10:42 ` Marcin Nowakowski
2016-10-11 13:36 ` Will Deacon
2016-10-11 13:36 ` Will Deacon
2016-10-11 13:36 ` Will Deacon
[not found] ` <20161011133623.GE9532-5wv7dgnIgG8@public.gmane.org>
2016-10-12 7:07 ` Marcin Nowakowski
2016-10-12 7:07 ` Marcin Nowakowski
2016-10-12 7:07 ` Marcin Nowakowski
2016-10-12 10:04 ` Will Deacon [this message]
2016-10-12 10:04 ` Will Deacon
2016-10-12 10:04 ` Will Deacon
2016-10-11 10:42 ` [PATCH v3 08/11] powerpc/tracing: " Marcin Nowakowski
2016-10-11 10:42 ` Marcin Nowakowski
[not found] ` <1476182576-15247-9-git-send-email-marcin.nowakowski-1AXoQHu6uovQT0dZR+AlfA@public.gmane.org>
2016-10-12 9:59 ` Michael Ellerman
2016-10-12 9:59 ` Michael Ellerman
2016-10-12 13:10 ` Marcin Nowakowski
2016-10-12 13:10 ` Marcin Nowakowski
2016-10-11 10:42 ` [PATCH v3 09/11] tile/tracing: " Marcin Nowakowski
2016-10-11 10:42 ` Marcin Nowakowski
2016-10-11 10:42 ` [PATCH v3 10/11] sparc/tracing: " Marcin Nowakowski
2016-10-11 10:42 ` Marcin Nowakowski
2016-10-11 10:42 ` Marcin Nowakowski
[not found] ` <1476182576-15247-1-git-send-email-marcin.nowakowski-1AXoQHu6uovQT0dZR+AlfA@public.gmane.org>
2016-10-11 10:42 ` [PATCH v3 11/11] parisc/tracing: " Marcin Nowakowski
2016-10-11 10:42 ` Marcin Nowakowski
2016-10-11 10:42 ` Marcin Nowakowski
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20161012100404.GD32032@arm.com \
--to=will.deacon@arm.com \
--cc=catalin.marinas@arm.com \
--cc=linux-api@vger.kernel.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=luto@amacapital.net \
--cc=marcin.nowakowski@imgtec.com \
--cc=mingo@redhat.com \
--cc=rostedt@goodmis.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.