Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 13256C433F5 for ; Mon, 10 Jan 2022 20:37:46 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S240127AbiAJUhn (ORCPT ); Mon, 10 Jan 2022 15:37:43 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35606 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S239773AbiAJUhm (ORCPT ); Mon, 10 Jan 2022 15:37:42 -0500 Received: from zeniv-ca.linux.org.uk (zeniv-ca.linux.org.uk [IPv6:2607:5300:60:148a::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 151C2C06173F; Mon, 10 Jan 2022 12:37:42 -0800 (PST) Received: from viro by zeniv-ca.linux.org.uk with local (Exim 4.94.2 #2 (Red Hat Linux)) id 1n71Q8-0015hA-DI; Mon, 10 Jan 2022 20:37:36 +0000 Date: Mon, 10 Jan 2022 20:37:36 +0000 From: Al Viro To: Geert Uytterhoeven Cc: "Eric W. Biederman" , Linux Kernel Mailing List , Linux-Arch , Linus Torvalds , Oleg Nesterov , Kees Cook , Linux API , Michael Schmitz , linux-m68k Subject: Re: [PATCH 08/17] ptrace/m68k: Stop open coding ptrace_report_syscall Message-ID: References: <87r19opkx1.fsf_-_@email.froward.int.ebiederm.org> <20220103213312.9144-8-ebiederm@xmission.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Sender: Al Viro Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Jan 10, 2022 at 06:54:57PM +0100, Geert Uytterhoeven wrote: > In fact Michael did so in "[PATCH v7 1/2] m68k/kernel - wire up > syscall_trace_enter/leave for m68k"[1], but that's still stuck... > > [1] https://lore.kernel.org/r/1624924520-17567-2-git-send-email-schmitzmic@gmail.com/ Looks sane, but I'd split it in two - switch to calling syscall_trace_{enter,leave} and then handling the return values... The former would keep the current behaviour (modulo reporting enter vs. leave via PTRACE_GETEVENTMSG), the latter would allow syscall number change by tracer and/or handling of seccomp/audit/whatnot. For exit+signal work the former would suffice, and IMO it would be a good idea to put that one into a shared branch to be pulled both by seccomp and by signal series. Would reduce the conflicts... Objections?