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 04D50C433FE for ; Mon, 10 Jan 2022 16:25:25 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S237366AbiAJQZY (ORCPT ); Mon, 10 Jan 2022 11:25:24 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33022 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S237337AbiAJQZW (ORCPT ); Mon, 10 Jan 2022 11:25:22 -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 425CCC06173F; Mon, 10 Jan 2022 08:25:22 -0800 (PST) Received: from viro by zeniv-ca.linux.org.uk with local (Exim 4.94.2 #2 (Red Hat Linux)) id 1n6xTx-0013P7-TU; Mon, 10 Jan 2022 16:25:17 +0000 Date: Mon, 10 Jan 2022 16:25:17 +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 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 04:20:03PM +0000, Al Viro wrote: > Geert, do you see any problems with that? The only difference is that > current->ptrace_message would be set to 1 for ptrace stop on entry and > 2 - on leave. Currently m68k just has it 0 all along. > > It is user-visible (the whole point is to let the tracer see which > stop it is - entry or exit one), so somebody using PTRACE_GETEVENTMSG > on syscall stops would start seeing 1 or 2 instead of "0 all along". > That's how it works on all other architectures (including m68k-nommu), > and I doubt that anything in userland will get broken. > > Behaviour of PTRACE_GETEVENTMSG for other stops (fork, etc.) remains > as-is, of course. Actually, the current behaviour is "report what the last PTRACE_GETEVENTMSG has reported, whatever kind of stop that used to be for". So I very much doubt that anything could break there.