* [PATCH] sh: fix syscall tracing
@ 2020-09-03 5:48 Rich Felker
2020-09-03 8:13 ` John Paul Adrian Glaubitz
2020-09-03 10:14 ` John Paul Adrian Glaubitz
0 siblings, 2 replies; 12+ messages in thread
From: Rich Felker @ 2020-09-03 5:48 UTC (permalink / raw)
To: linux-sh
Cc: John Paul Adrian Glaubitz, Michael Karcher, linux-kernel, Yoshinori Sato
Addition of SECCOMP_FILTER exposed a longstanding bug in
do_syscall_trace_enter, whereby r0 (the 5th argument register) was
mistakenly used where r3 (syscall_nr) was intended. By overwriting r0
rather than r3 with -1 when attempting to block a syscall, the
existing code would instead have caused the syscall to execute with an
argument clobbered.
Commit 0bb605c2c7f2b4b3 then introduced skipping of the syscall when
do_syscall_trace_enter returns -1, so that the return value set by
seccomp filters would not be clobbered by -ENOSYS. This eliminated the
clobbering of the 5th argument register, but instead caused syscalls
made with a 5th argument of -1 to be misinterpreted as a request by
do_syscall_trace_enter to suppress the syscall.
Fixes: 0bb605c2c7f2b4b3 ("sh: Add SECCOMP_FILTER")
Fixes: ab99c733ae73cce3 ("sh: Make syscall tracer use tracehook notifiers, add TIF_NOTIFY_RESUME.")
Signed-off-by: Rich Felker <dalias@libc.org>
---
arch/sh/kernel/entry-common.S | 1 -
arch/sh/kernel/ptrace_32.c | 15 +++++----------
2 files changed, 5 insertions(+), 11 deletions(-)
diff --git a/arch/sh/kernel/entry-common.S b/arch/sh/kernel/entry-common.S
index ad963104d22d..91ab2607a1ff 100644
--- a/arch/sh/kernel/entry-common.S
+++ b/arch/sh/kernel/entry-common.S
@@ -370,7 +370,6 @@ syscall_trace_entry:
nop
cmp/eq #-1, r0
bt syscall_exit
- mov.l r0, @(OFF_R0,r15) ! Save return value
! Reload R0-R4 from kernel stack, where the
! parent may have modified them using
! ptrace(POKEUSR). (Note that R0-R2 are
diff --git a/arch/sh/kernel/ptrace_32.c b/arch/sh/kernel/ptrace_32.c
index b05bf92f9c32..5281685f6ad1 100644
--- a/arch/sh/kernel/ptrace_32.c
+++ b/arch/sh/kernel/ptrace_32.c
@@ -455,16 +455,11 @@ long arch_ptrace(struct task_struct *child, long request,
asmlinkage long do_syscall_trace_enter(struct pt_regs *regs)
{
- long ret = 0;
-
if (test_thread_flag(TIF_SYSCALL_TRACE) &&
- tracehook_report_syscall_entry(regs))
- /*
- * Tracing decided this syscall should not happen.
- * We'll return a bogus call number to get an ENOSYS
- * error, but leave the original number in regs->regs[0].
- */
- ret = -1L;
+ tracehook_report_syscall_entry(regs)) {
+ regs->regs[0] = -ENOSYS;
+ return -1;
+ }
if (secure_computing() = -1)
return -1;
@@ -475,7 +470,7 @@ asmlinkage long do_syscall_trace_enter(struct pt_regs *regs)
audit_syscall_entry(regs->regs[3], regs->regs[4], regs->regs[5],
regs->regs[6], regs->regs[7]);
- return ret ?: regs->regs[0];
+ return 0;
}
asmlinkage void do_syscall_trace_leave(struct pt_regs *regs)
--
2.21.0
^ permalink raw reply related [flat|nested] 12+ messages in thread
* Re: [PATCH] sh: fix syscall tracing
2020-09-03 5:48 [PATCH] sh: fix syscall tracing Rich Felker
@ 2020-09-03 8:13 ` John Paul Adrian Glaubitz
2020-09-03 10:14 ` John Paul Adrian Glaubitz
1 sibling, 0 replies; 12+ messages in thread
From: John Paul Adrian Glaubitz @ 2020-09-03 8:13 UTC (permalink / raw)
To: Rich Felker, linux-sh; +Cc: Michael Karcher, linux-kernel, Yoshinori Sato
Hi Rich!
On 9/3/20 7:48 AM, Rich Felker wrote:
> Addition of SECCOMP_FILTER exposed a longstanding bug in
> do_syscall_trace_enter, whereby r0 (the 5th argument register) was
> mistakenly used where r3 (syscall_nr) was intended. By overwriting r0
> rather than r3 with -1 when attempting to block a syscall, the
> existing code would instead have caused the syscall to execute with an
> argument clobbered.
>
> Commit 0bb605c2c7f2b4b3 then introduced skipping of the syscall when
> do_syscall_trace_enter returns -1, so that the return value set by
> seccomp filters would not be clobbered by -ENOSYS. This eliminated the
> clobbering of the 5th argument register, but instead caused syscalls
> made with a 5th argument of -1 to be misinterpreted as a request by
> do_syscall_trace_enter to suppress the syscall.
>
> Fixes: 0bb605c2c7f2b4b3 ("sh: Add SECCOMP_FILTER")
> Fixes: ab99c733ae73cce3 ("sh: Make syscall tracer use tracehook notifiers, add TIF_NOTIFY_RESUME.")
> Signed-off-by: Rich Felker <dalias@libc.org>
I'm testing this patch now with a rebased kernel and a rebased libseccomp with my
patch for SuperH support on top.
I'll report back later.
Adrian
--
.''`. John Paul Adrian Glaubitz
: :' : Debian Developer - glaubitz@debian.org
`. `' Freie Universitaet Berlin - glaubitz@physik.fu-berlin.de
`- GPG: 62FF 8A75 84E0 2956 9546 0006 7426 3B37 F5B5 F913
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [PATCH] sh: fix syscall tracing
2020-09-03 5:48 [PATCH] sh: fix syscall tracing Rich Felker
2020-09-03 8:13 ` John Paul Adrian Glaubitz
@ 2020-09-03 10:14 ` John Paul Adrian Glaubitz
2020-09-03 16:16 ` Rich Felker
1 sibling, 1 reply; 12+ messages in thread
From: John Paul Adrian Glaubitz @ 2020-09-03 10:14 UTC (permalink / raw)
To: Rich Felker, linux-sh; +Cc: Michael Karcher, linux-kernel, Yoshinori Sato
[-- Attachment #1: Type: text/plain, Size: 3341 bytes --]
Hi Rich!
On 9/3/20 7:48 AM, Rich Felker wrote:
> Addition of SECCOMP_FILTER exposed a longstanding bug in
> do_syscall_trace_enter, whereby r0 (the 5th argument register) was
> mistakenly used where r3 (syscall_nr) was intended. By overwriting r0
> rather than r3 with -1 when attempting to block a syscall, the
> existing code would instead have caused the syscall to execute with an
> argument clobbered.
>
> Commit 0bb605c2c7f2b4b3 then introduced skipping of the syscall when
> do_syscall_trace_enter returns -1, so that the return value set by
> seccomp filters would not be clobbered by -ENOSYS. This eliminated the
> clobbering of the 5th argument register, but instead caused syscalls
> made with a 5th argument of -1 to be misinterpreted as a request by
> do_syscall_trace_enter to suppress the syscall.
>
> Fixes: 0bb605c2c7f2b4b3 ("sh: Add SECCOMP_FILTER")
> Fixes: ab99c733ae73cce3 ("sh: Make syscall tracer use tracehook notifiers, add TIF_NOTIFY_RESUME.")
> Signed-off-by: Rich Felker <dalias@libc.org>
> ---
> arch/sh/kernel/entry-common.S | 1 -
> arch/sh/kernel/ptrace_32.c | 15 +++++----------
> 2 files changed, 5 insertions(+), 11 deletions(-)
>
> diff --git a/arch/sh/kernel/entry-common.S b/arch/sh/kernel/entry-common.S
> index ad963104d22d..91ab2607a1ff 100644
> --- a/arch/sh/kernel/entry-common.S
> +++ b/arch/sh/kernel/entry-common.S
> @@ -370,7 +370,6 @@ syscall_trace_entry:
> nop
> cmp/eq #-1, r0
> bt syscall_exit
> - mov.l r0, @(OFF_R0,r15) ! Save return value
> ! Reload R0-R4 from kernel stack, where the
> ! parent may have modified them using
> ! ptrace(POKEUSR). (Note that R0-R2 are
> diff --git a/arch/sh/kernel/ptrace_32.c b/arch/sh/kernel/ptrace_32.c
> index b05bf92f9c32..5281685f6ad1 100644
> --- a/arch/sh/kernel/ptrace_32.c
> +++ b/arch/sh/kernel/ptrace_32.c
> @@ -455,16 +455,11 @@ long arch_ptrace(struct task_struct *child, long request,
>
> asmlinkage long do_syscall_trace_enter(struct pt_regs *regs)
> {
> - long ret = 0;
> -
> if (test_thread_flag(TIF_SYSCALL_TRACE) &&
> - tracehook_report_syscall_entry(regs))
> - /*
> - * Tracing decided this syscall should not happen.
> - * We'll return a bogus call number to get an ENOSYS
> - * error, but leave the original number in regs->regs[0].
> - */
> - ret = -1L;
> + tracehook_report_syscall_entry(regs)) {
> + regs->regs[0] = -ENOSYS;
> + return -1;
> + }
>
> if (secure_computing() == -1)
> return -1;
> @@ -475,7 +470,7 @@ asmlinkage long do_syscall_trace_enter(struct pt_regs *regs)
> audit_syscall_entry(regs->regs[3], regs->regs[4], regs->regs[5],
> regs->regs[6], regs->regs[7]);
>
> - return ret ?: regs->regs[0];
> + return 0;
> }
>
> asmlinkage void do_syscall_trace_leave(struct pt_regs *regs)
>
I can confirm that this patch fixes both strace for me and does not break libseccomp,
I have run the libseccomp testsuite with my patch for SuperH support applied on top
of a rebased libseccomp with the 32-bit fixes. Attaching the testsuite log.
Tested-by: John Paul Adrian Glaubitz <glaubitz@physik.fu-berlin.de>
--
.''`. John Paul Adrian Glaubitz
: :' : Debian Developer - glaubitz@debian.org
`. `' Freie Universitaet Berlin - glaubitz@physik.fu-berlin.de
`- GPG: 62FF 8A75 84E0 2956 9546 0006 7426 3B37 F5B5 F913
[-- Attachment #2: seccomp-live-test.log --]
[-- Type: text/x-log, Size: 7171 bytes --]
=============== Thu 03 Sep 2020 11:57:57 AM CEST ===============
Regression Test Report ("regression -T live")
batch name: 01-sim-allow
test mode: c
test type: bpf-sim
test mode: c
test type: bpf-sim-fuzz
test mode: c
test type: bpf-valgrind
batch name: 02-sim-basic
test mode: c
test type: bpf-sim
test mode: c
test type: bpf-sim-fuzz
test mode: c
test type: bpf-valgrind
batch name: 03-sim-basic_chains
test mode: c
test type: bpf-sim
test mode: c
test type: bpf-sim-fuzz
test mode: c
test type: bpf-valgrind
batch name: 04-sim-multilevel_chains
test mode: c
test type: bpf-sim
test mode: c
test type: bpf-sim-fuzz
test mode: c
test type: bpf-valgrind
batch name: 05-sim-long_jumps
test mode: c
test type: bpf-sim
test mode: c
test type: bpf-sim-fuzz
test mode: c
test type: bpf-valgrind
batch name: 06-sim-actions
test mode: c
test type: bpf-sim
test mode: c
test type: bpf-sim-fuzz
test mode: c
test type: bpf-valgrind
batch name: 07-sim-db_bug_looping
test mode: c
test type: bpf-sim
test mode: c
test type: bpf-sim-fuzz
test mode: c
test type: bpf-valgrind
batch name: 08-sim-subtree_checks
test mode: c
test type: bpf-sim
test mode: c
test type: bpf-sim-fuzz
test mode: c
test type: bpf-valgrind
batch name: 09-sim-syscall_priority_pre
test mode: c
test type: bpf-sim
test mode: c
test type: bpf-sim-fuzz
test mode: c
test type: bpf-valgrind
batch name: 10-sim-syscall_priority_post
test mode: c
test type: bpf-sim
test mode: c
test type: bpf-sim-fuzz
test mode: c
test type: bpf-valgrind
batch name: 11-basic-basic_errors
test mode: c
test type: basic
batch name: 12-sim-basic_masked_ops
test mode: c
test type: bpf-sim
test mode: c
test type: bpf-sim-fuzz
test mode: c
test type: bpf-valgrind
batch name: 13-basic-attrs
test mode: c
test type: basic
batch name: 14-sim-reset
test mode: c
test type: bpf-sim
test mode: c
test type: bpf-sim-fuzz
test mode: c
test type: bpf-valgrind
batch name: 15-basic-resolver
test mode: c
test type: basic
batch name: 16-sim-arch_basic
test mode: c
test type: bpf-sim
test mode: c
test type: bpf-valgrind
batch name: 17-sim-arch_merge
test mode: c
test type: bpf-sim
test mode: c
test type: bpf-valgrind
batch name: 18-sim-basic_allowlist
test mode: c
test type: bpf-sim
test mode: c
test type: bpf-sim-fuzz
test mode: c
test type: bpf-valgrind
batch name: 19-sim-missing_syscalls
test mode: c
test type: bpf-sim
test mode: c
test type: bpf-valgrind
batch name: 20-live-basic_die
test mode: c
test type: live
Test 20-live-basic_die%%001-00001 result: SUCCESS
Test 20-live-basic_die%%002-00001 result: SUCCESS
Test 20-live-basic_die%%003-00001 result: SUCCESS
batch name: 21-live-basic_allow
test mode: c
test type: live
Test 21-live-basic_allow%%001-00001 result: SUCCESS
batch name: 22-sim-basic_chains_array
test mode: c
test type: bpf-sim
test mode: c
test type: bpf-sim-fuzz
test mode: c
test type: bpf-valgrind
batch name: 23-sim-arch_all_le_basic
test mode: c
test type: bpf-sim
test mode: c
test type: bpf-valgrind
batch name: 24-live-arg_allow
test mode: c
test type: live
Test 24-live-arg_allow%%001-00001 result: SUCCESS
batch name: 25-sim-multilevel_chains_adv
test mode: c
test type: bpf-sim
test mode: c
test type: bpf-sim-fuzz
test mode: c
test type: bpf-valgrind
batch name: 26-sim-arch_all_be_basic
test mode: c
test type: bpf-sim
test mode: c
test type: bpf-valgrind
batch name: 27-sim-bpf_blk_state
test mode: c
test type: bpf-sim
test mode: c
test type: bpf-sim-fuzz
test mode: c
test type: bpf-valgrind
batch name: 28-sim-arch_x86
test mode: c
test type: bpf-sim
test mode: c
test type: bpf-valgrind
batch name: 29-sim-pseudo_syscall
test mode: c
test type: bpf-sim
test mode: c
test type: bpf-valgrind
batch name: 30-sim-socket_syscalls
test mode: c
test type: bpf-sim
test mode: c
test type: bpf-valgrind
batch name: 31-basic-version_check
test mode: c
test type: basic
batch name: 32-live-tsync_allow
test mode: c
test type: live
Test 32-live-tsync_allow%%001-00001 result: SUCCESS
batch name: 33-sim-socket_syscalls_be
test mode: c
test type: bpf-sim
test mode: c
test type: bpf-valgrind
batch name: 34-sim-basic_denylist
test mode: c
test type: bpf-sim
test mode: c
test type: bpf-sim-fuzz
test mode: c
test type: bpf-valgrind
batch name: 35-sim-negative_one
test mode: c
test type: bpf-sim
test mode: c
test type: bpf-valgrind
batch name: 36-sim-ipc_syscalls
test mode: c
test type: bpf-sim
test mode: c
test type: bpf-valgrind
batch name: 37-sim-ipc_syscalls_be
test mode: c
test type: bpf-sim
test mode: c
test type: bpf-valgrind
batch name: 38-basic-pfc_coverage
test mode: c
test type: basic
batch name: 39-basic-api_level
test mode: c
test type: basic
batch name: 40-sim-log
test mode: c
test type: bpf-sim
test mode: c
test type: bpf-sim-fuzz
test mode: c
test type: bpf-valgrind
batch name: 41-sim-syscall_priority_arch
test mode: c
test type: bpf-sim
test mode: c
test type: bpf-valgrind
batch name: 42-sim-adv_chains
test mode: c
test type: bpf-sim
test mode: c
test type: bpf-sim-fuzz
test mode: c
test type: bpf-valgrind
batch name: 43-sim-a2_order
test mode: c
test type: bpf-sim
test mode: c
test type: bpf-valgrind
batch name: 44-live-a2_order
test mode: c
test type: live
Test 44-live-a2_order%%001-00001 result: SUCCESS
batch name: 45-sim-chain_code_coverage
test mode: c
test type: bpf-sim
batch name: 46-sim-kill_process
test mode: c
test type: bpf-sim
batch name: 47-live-kill_process
test mode: c
test type: live
Test 47-live-kill_process%%001-00001 result: SUCCESS
batch name: 48-sim-32b_args
test mode: c
test type: bpf-sim
test mode: c
test type: bpf-sim-fuzz
test mode: c
test type: bpf-valgrind
batch name: 49-sim-64b_comparisons
test mode: c
test type: bpf-sim
test mode: c
test type: bpf-valgrind
batch name: 50-sim-hash_collision
test mode: c
test type: bpf-sim
batch name: 51-live-user_notification
test mode: c
test type: live
Test 51-live-user_notification%%001-00001 result: SUCCESS
batch name: 52-basic-load
test mode: c
test type: basic
batch name: 53-sim-binary_tree
test mode: c
test type: bpf-sim
test mode: c
test type: bpf-valgrind
batch name: 54-live-binary_tree
test mode: c
test type: live
Test 54-live-binary_tree%%001-00001 result: SUCCESS
batch name: 55-basic-pfc_binary_tree
test mode: c
test type: basic
batch name: 56-basic-iterate_syscalls
test mode: c
test type: basic
batch name: 57-basic-rawsysrc
test mode: c
test type: basic
batch name: 58-live-tsync_notify
test mode: c
test type: live
Test 58-live-tsync_notify%%001-00001 result: SUCCESS
Regression Test Summary
tests run: 11
tests skipped: 0
tests passed: 11
tests failed: 0
tests errored: 0
============================================================
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [PATCH] sh: fix syscall tracing
2020-09-03 10:14 ` John Paul Adrian Glaubitz
@ 2020-09-03 16:16 ` Rich Felker
2020-09-07 9:52 ` John Paul Adrian Glaubitz
0 siblings, 1 reply; 12+ messages in thread
From: Rich Felker @ 2020-09-03 16:16 UTC (permalink / raw)
To: John Paul Adrian Glaubitz
Cc: linux-sh, Michael Karcher, linux-kernel, Yoshinori Sato
On Thu, Sep 03, 2020 at 12:14:43PM +0200, John Paul Adrian Glaubitz wrote:
> Hi Rich!
>
> On 9/3/20 7:48 AM, Rich Felker wrote:
> > Addition of SECCOMP_FILTER exposed a longstanding bug in
> > do_syscall_trace_enter, whereby r0 (the 5th argument register) was
> > mistakenly used where r3 (syscall_nr) was intended. By overwriting r0
> > rather than r3 with -1 when attempting to block a syscall, the
> > existing code would instead have caused the syscall to execute with an
> > argument clobbered.
> >
> > Commit 0bb605c2c7f2b4b3 then introduced skipping of the syscall when
> > do_syscall_trace_enter returns -1, so that the return value set by
> > seccomp filters would not be clobbered by -ENOSYS. This eliminated the
> > clobbering of the 5th argument register, but instead caused syscalls
> > made with a 5th argument of -1 to be misinterpreted as a request by
> > do_syscall_trace_enter to suppress the syscall.
> >
> > Fixes: 0bb605c2c7f2b4b3 ("sh: Add SECCOMP_FILTER")
> > Fixes: ab99c733ae73cce3 ("sh: Make syscall tracer use tracehook notifiers, add TIF_NOTIFY_RESUME.")
> > Signed-off-by: Rich Felker <dalias@libc.org>
> > ---
> > arch/sh/kernel/entry-common.S | 1 -
> > arch/sh/kernel/ptrace_32.c | 15 +++++----------
> > 2 files changed, 5 insertions(+), 11 deletions(-)
> >
> > diff --git a/arch/sh/kernel/entry-common.S b/arch/sh/kernel/entry-common.S
> > index ad963104d22d..91ab2607a1ff 100644
> > --- a/arch/sh/kernel/entry-common.S
> > +++ b/arch/sh/kernel/entry-common.S
> > @@ -370,7 +370,6 @@ syscall_trace_entry:
> > nop
> > cmp/eq #-1, r0
> > bt syscall_exit
> > - mov.l r0, @(OFF_R0,r15) ! Save return value
> > ! Reload R0-R4 from kernel stack, where the
> > ! parent may have modified them using
> > ! ptrace(POKEUSR). (Note that R0-R2 are
> > diff --git a/arch/sh/kernel/ptrace_32.c b/arch/sh/kernel/ptrace_32.c
> > index b05bf92f9c32..5281685f6ad1 100644
> > --- a/arch/sh/kernel/ptrace_32.c
> > +++ b/arch/sh/kernel/ptrace_32.c
> > @@ -455,16 +455,11 @@ long arch_ptrace(struct task_struct *child, long request,
> >
> > asmlinkage long do_syscall_trace_enter(struct pt_regs *regs)
> > {
> > - long ret = 0;
> > -
> > if (test_thread_flag(TIF_SYSCALL_TRACE) &&
> > - tracehook_report_syscall_entry(regs))
> > - /*
> > - * Tracing decided this syscall should not happen.
> > - * We'll return a bogus call number to get an ENOSYS
> > - * error, but leave the original number in regs->regs[0].
> > - */
> > - ret = -1L;
> > + tracehook_report_syscall_entry(regs)) {
> > + regs->regs[0] = -ENOSYS;
> > + return -1;
> > + }
> >
> > if (secure_computing() = -1)
> > return -1;
> > @@ -475,7 +470,7 @@ asmlinkage long do_syscall_trace_enter(struct pt_regs *regs)
> > audit_syscall_entry(regs->regs[3], regs->regs[4], regs->regs[5],
> > regs->regs[6], regs->regs[7]);
> >
> > - return ret ?: regs->regs[0];
> > + return 0;
> > }
> >
> > asmlinkage void do_syscall_trace_leave(struct pt_regs *regs)
> >
>
> I can confirm that this patch fixes both strace for me and does not break libseccomp,
> I have run the libseccomp testsuite with my patch for SuperH support applied on top
> of a rebased libseccomp with the 32-bit fixes. Attaching the testsuite log.
>
> Tested-by: John Paul Adrian Glaubitz <glaubitz@physik.fu-berlin.de>
Great! Thanks!
Rich
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [PATCH] sh: fix syscall tracing
2020-09-03 16:16 ` Rich Felker
@ 2020-09-07 9:52 ` John Paul Adrian Glaubitz
2020-09-07 17:44 ` Rich Felker
0 siblings, 1 reply; 12+ messages in thread
From: John Paul Adrian Glaubitz @ 2020-09-07 9:52 UTC (permalink / raw)
To: Rich Felker; +Cc: linux-sh, Michael Karcher, linux-kernel, Yoshinori Sato
Hi Rich!
On 9/3/20 6:16 PM, Rich Felker wrote:
>> I can confirm that this patch fixes both strace for me and does not break libseccomp,
>> I have run the libseccomp testsuite with my patch for SuperH support applied on top
>> of a rebased libseccomp with the 32-bit fixes. Attaching the testsuite log.
>>
>> Tested-by: John Paul Adrian Glaubitz <glaubitz@physik.fu-berlin.de>
>
> Great! Thanks!
Can we still get this merged as a hotfix for 5.9?
Adrian
--
.''`. John Paul Adrian Glaubitz
: :' : Debian Developer - glaubitz@debian.org
`. `' Freie Universitaet Berlin - glaubitz@physik.fu-berlin.de
`- GPG: 62FF 8A75 84E0 2956 9546 0006 7426 3B37 F5B5 F913
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [PATCH] sh: fix syscall tracing
2020-09-07 9:52 ` John Paul Adrian Glaubitz
@ 2020-09-07 17:44 ` Rich Felker
2020-09-10 9:55 ` John Paul Adrian Glaubitz
0 siblings, 1 reply; 12+ messages in thread
From: Rich Felker @ 2020-09-07 17:44 UTC (permalink / raw)
To: John Paul Adrian Glaubitz
Cc: linux-sh, Michael Karcher, linux-kernel, Yoshinori Sato
On Mon, Sep 07, 2020 at 11:52:20AM +0200, John Paul Adrian Glaubitz wrote:
> Hi Rich!
>
> On 9/3/20 6:16 PM, Rich Felker wrote:
> >> I can confirm that this patch fixes both strace for me and does not break libseccomp,
> >> I have run the libseccomp testsuite with my patch for SuperH support applied on top
> >> of a rebased libseccomp with the 32-bit fixes. Attaching the testsuite log.
> >>
> >> Tested-by: John Paul Adrian Glaubitz <glaubitz@physik.fu-berlin.de>
> >
> > Great! Thanks!
>
> Can we still get this merged as a hotfix for 5.9?
Yes, fixes for regressions in the same release cycle are in-scope (the
whole point of having -rc's). I have at least one other fix that needs
to go in too and was just giving it a little time to make sure
everything's ok now and that there are no more.
Rich
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [PATCH] sh: fix syscall tracing
2020-09-07 17:44 ` Rich Felker
@ 2020-09-10 9:55 ` John Paul Adrian Glaubitz
2020-09-10 10:54 ` Rob Landley
0 siblings, 1 reply; 12+ messages in thread
From: John Paul Adrian Glaubitz @ 2020-09-10 9:55 UTC (permalink / raw)
To: Rich Felker; +Cc: linux-sh, Michael Karcher, linux-kernel, Yoshinori Sato
Hi Rich!
On 9/7/20 7:44 PM, Rich Felker wrote:
>> Can we still get this merged as a hotfix for 5.9?
>
> Yes, fixes for regressions in the same release cycle are in-scope (the
> whole point of having -rc's). I have at least one other fix that needs
> to go in too and was just giving it a little time to make sure
> everything's ok now and that there are no more.
Let me know if there is anything else left for testing.
Adrian
--
.''`. John Paul Adrian Glaubitz
: :' : Debian Developer - glaubitz@debian.org
`. `' Freie Universitaet Berlin - glaubitz@physik.fu-berlin.de
`- GPG: 62FF 8A75 84E0 2956 9546 0006 7426 3B37 F5B5 F913
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [PATCH] sh: fix syscall tracing
2020-09-10 9:55 ` John Paul Adrian Glaubitz
@ 2020-09-10 10:54 ` Rob Landley
2020-09-10 13:37 ` Rich Felker
0 siblings, 1 reply; 12+ messages in thread
From: Rob Landley @ 2020-09-10 10:54 UTC (permalink / raw)
To: John Paul Adrian Glaubitz, Rich Felker
Cc: linux-sh, Michael Karcher, linux-kernel, Yoshinori Sato
On 9/10/20 4:55 AM, John Paul Adrian Glaubitz wrote:
> Hi Rich!
>
> On 9/7/20 7:44 PM, Rich Felker wrote:
>>> Can we still get this merged as a hotfix for 5.9?
>>
>> Yes, fixes for regressions in the same release cycle are in-scope (the
>> whole point of having -rc's). I have at least one other fix that needs
>> to go in too and was just giving it a little time to make sure
>> everything's ok now and that there are no more.
>
> Let me know if there is anything else left for testing.
Could you also merge the fix the build break, ala:
> The vmlinux image is a current vanilla Linux kernel using an initramfs filesystem:
>
> make ARCH=sh CROSS_COMPILE=sh2eb-linux-muslfdpic- j2_defconfig vmlinux
>
> And trying to do that in current git dies with:
>
> CC init/version.o
> In file included from ./include/linux/spinlock.h:318,
> from ./arch/sh/include/asm/smp.h:11,
> from ./include/linux/smp.h:82,
> from ./include/linux/lockdep.h:14,
> from ./include/linux/rcupdate.h:29,
> from ./include/linux/rculist.h:11,
> from ./include/linux/pid.h:5,
> from ./include/linux/sched.h:14,
> from ./include/linux/utsname.h:6,
> from init/version.c:14:
> ./include/linux/spinlock_api_smp.h: In function '__raw_spin_trylock':
> ./include/linux/spinlock_api_smp.h:90:3: error: implicit declaration of function
> 'spin_acquire'; did you mean 'xchg_acquire'? [-Werror=implicit-function-declaration]
> 90 | spin_acquire(&lock->dep_map, 0, 1, _RET_IP_);
> | ^~~~~~~~~~~~
> | xchg_acquire
> ./include/linux/spinlock_api_smp.h:90:21: error: 'raw_spinlock_t' {aka 'struct
> raw_spinlock'} has no member named 'dep_map'
> 90 | spin_acquire(&lock->dep_map, 0, 1, _RET_IP_);
> | ^~
>
> And so on and so forth for pages. I bisected it to:
>
> commit 0cd39f4600ed4de859383018eb10f0f724900e1b
> Author: Peter Zijlstra <peterz@infradead.org>
> Date: Thu Aug 6 14:35:11 2020 +0200
>
> locking/seqlock, headers: Untangle the spaghetti monster
Which I reported to Rich on the 2nd and he had me test a one line patch fixing
it (adding an extra #include) on the 3rd, but I just did a fresh pull and the
j2_defconfig build still broke a week later.
Rob
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [PATCH] sh: fix syscall tracing
2020-09-10 10:54 ` Rob Landley
@ 2020-09-10 13:37 ` Rich Felker
2020-09-15 10:35 ` John Paul Adrian Glaubitz
0 siblings, 1 reply; 12+ messages in thread
From: Rich Felker @ 2020-09-10 13:37 UTC (permalink / raw)
To: Rob Landley
Cc: John Paul Adrian Glaubitz, linux-sh, Michael Karcher,
linux-kernel, Yoshinori Sato
On Thu, Sep 10, 2020 at 06:02:05AM -0500, Rob Landley wrote:
> On 9/10/20 4:55 AM, John Paul Adrian Glaubitz wrote:
> > Hi Rich!
> >
> > On 9/7/20 7:44 PM, Rich Felker wrote:
> >>> Can we still get this merged as a hotfix for 5.9?
> >>
> >> Yes, fixes for regressions in the same release cycle are in-scope (the
> >> whole point of having -rc's). I have at least one other fix that needs
> >> to go in too and was just giving it a little time to make sure
> >> everything's ok now and that there are no more.
> >
> > Let me know if there is anything else left for testing.
>
> Could you also merge the fix the build break, ala:
>
> > The vmlinux image is a current vanilla Linux kernel using an initramfs filesystem:
> >
> > make ARCH=sh CROSS_COMPILE=sh2eb-linux-muslfdpic- j2_defconfig vmlinux
> >
> > And trying to do that in current git dies with:
> >
> > CC init/version.o
> > In file included from ./include/linux/spinlock.h:318,
> > from ./arch/sh/include/asm/smp.h:11,
> > from ./include/linux/smp.h:82,
> > from ./include/linux/lockdep.h:14,
> > from ./include/linux/rcupdate.h:29,
> > from ./include/linux/rculist.h:11,
> > from ./include/linux/pid.h:5,
> > from ./include/linux/sched.h:14,
> > from ./include/linux/utsname.h:6,
> > from init/version.c:14:
> > ./include/linux/spinlock_api_smp.h: In function '__raw_spin_trylock':
> > ./include/linux/spinlock_api_smp.h:90:3: error: implicit declaration of function
> > 'spin_acquire'; did you mean 'xchg_acquire'? [-Werror=implicit-function-declaration]
> > 90 | spin_acquire(&lock->dep_map, 0, 1, _RET_IP_);
> > | ^~~~~~~~~~~~
> > | xchg_acquire
> > ./include/linux/spinlock_api_smp.h:90:21: error: 'raw_spinlock_t' {aka 'struct
> > raw_spinlock'} has no member named 'dep_map'
> > 90 | spin_acquire(&lock->dep_map, 0, 1, _RET_IP_);
> > | ^~
> >
> > And so on and so forth for pages. I bisected it to:
> >
> > commit 0cd39f4600ed4de859383018eb10f0f724900e1b
> > Author: Peter Zijlstra <peterz@infradead.org>
> > Date: Thu Aug 6 14:35:11 2020 +0200
> >
> > locking/seqlock, headers: Untangle the spaghetti monster
>
> Which I reported to Rich on the 2nd and he had me test a one line patch fixing
> it (adding an extra #include) on the 3rd, but I just did a fresh pull and the
> j2_defconfig build still broke a week later.
Yes, that's presently the other regression fix I have queued for the
second pull request.
Rich
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [PATCH] sh: fix syscall tracing
2020-09-10 13:37 ` Rich Felker
@ 2020-09-15 10:35 ` John Paul Adrian Glaubitz
2020-09-16 0:28 ` Rich Felker
0 siblings, 1 reply; 12+ messages in thread
From: John Paul Adrian Glaubitz @ 2020-09-15 10:35 UTC (permalink / raw)
To: Rich Felker, Rob Landley
Cc: linux-sh, Michael Karcher, linux-kernel, Yoshinori Sato
Hi Rich!
On 9/10/20 3:37 PM, Rich Felker wrote:
>> Which I reported to Rich on the 2nd and he had me test a one line patch fixing
>> it (adding an extra #include) on the 3rd, but I just did a fresh pull and the
>> j2_defconfig build still broke a week later.
>
> Yes, that's presently the other regression fix I have queued for the
> second pull request.
Any news on this? Seems like Linus just tagged -rc5 this week.
Adrian
--
.''`. John Paul Adrian Glaubitz
: :' : Debian Developer - glaubitz@debian.org
`. `' Freie Universitaet Berlin - glaubitz@physik.fu-berlin.de
`- GPG: 62FF 8A75 84E0 2956 9546 0006 7426 3B37 F5B5 F913
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [PATCH] sh: fix syscall tracing
2020-09-15 10:35 ` John Paul Adrian Glaubitz
@ 2020-09-16 0:28 ` Rich Felker
2020-09-18 19:29 ` Rich Felker
0 siblings, 1 reply; 12+ messages in thread
From: Rich Felker @ 2020-09-16 0:28 UTC (permalink / raw)
To: John Paul Adrian Glaubitz
Cc: Rob Landley, linux-sh, Michael Karcher, linux-kernel, Yoshinori Sato
On Tue, Sep 15, 2020 at 12:35:28PM +0200, John Paul Adrian Glaubitz wrote:
> Hi Rich!
>
> On 9/10/20 3:37 PM, Rich Felker wrote:
> >> Which I reported to Rich on the 2nd and he had me test a one line patch fixing
> >> it (adding an extra #include) on the 3rd, but I just did a fresh pull and the
> >> j2_defconfig build still broke a week later.
> >
> > Yes, that's presently the other regression fix I have queued for the
> > second pull request.
>
> Any news on this? Seems like Linus just tagged -rc5 this week.
I rebased against -rc5 and pushed for-next a couple days ago. It
doesn't look like there are any problems so I'll proceed with the PR.
Rich
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [PATCH] sh: fix syscall tracing
2020-09-16 0:28 ` Rich Felker
@ 2020-09-18 19:29 ` Rich Felker
0 siblings, 0 replies; 12+ messages in thread
From: Rich Felker @ 2020-09-18 19:29 UTC (permalink / raw)
To: John Paul Adrian Glaubitz
Cc: Rob Landley, linux-sh, Michael Karcher, linux-kernel, Yoshinori Sato
On Tue, Sep 15, 2020 at 08:28:45PM -0400, Rich Felker wrote:
> On Tue, Sep 15, 2020 at 12:35:28PM +0200, John Paul Adrian Glaubitz wrote:
> > Hi Rich!
> >
> > On 9/10/20 3:37 PM, Rich Felker wrote:
> > >> Which I reported to Rich on the 2nd and he had me test a one line patch fixing
> > >> it (adding an extra #include) on the 3rd, but I just did a fresh pull and the
> > >> j2_defconfig build still broke a week later.
> > >
> > > Yes, that's presently the other regression fix I have queued for the
> > > second pull request.
> >
> > Any news on this? Seems like Linus just tagged -rc5 this week.
>
> I rebased against -rc5 and pushed for-next a couple days ago. It
> doesn't look like there are any problems so I'll proceed with the PR.
It's now been merged.
^ permalink raw reply [flat|nested] 12+ messages in thread
end of thread, other threads:[~2020-09-18 19:29 UTC | newest]
Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-09-03 5:48 [PATCH] sh: fix syscall tracing Rich Felker
2020-09-03 8:13 ` John Paul Adrian Glaubitz
2020-09-03 10:14 ` John Paul Adrian Glaubitz
2020-09-03 16:16 ` Rich Felker
2020-09-07 9:52 ` John Paul Adrian Glaubitz
2020-09-07 17:44 ` Rich Felker
2020-09-10 9:55 ` John Paul Adrian Glaubitz
2020-09-10 10:54 ` Rob Landley
2020-09-10 13:37 ` Rich Felker
2020-09-15 10:35 ` John Paul Adrian Glaubitz
2020-09-16 0:28 ` Rich Felker
2020-09-18 19:29 ` Rich Felker
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).