Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp3422671imu; Wed, 7 Nov 2018 10:05:11 -0800 (PST) X-Google-Smtp-Source: AJdET5c5jq5qqBWW7j3hfsgUbuFkQv5PqqBg8/WEhfVc9bjIK1Cq7TbB416BeVnK1gd9zPveQtLX X-Received: by 2002:a17:902:f097:: with SMTP id go23mr1171129plb.328.1541613911772; Wed, 07 Nov 2018 10:05:11 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1541613911; cv=none; d=google.com; s=arc-20160816; b=uxC7RdMbIgRcvDgTsZAAcmjVOt0+QWeIRevPjpY3oV6Rf0KSgq27ofelAD6N2jO4QI CoHfN9eyZaPfW7SRiC0/D4K81ChGc6nZTH3iszmayTtkoIb6zGf3BKcE6kHggZ3Fj/qK uK/kK1f7I1AVU1P87sd+5tgD1zgXdBpPwrw4BNskrH1zyAWEsjWu/U/WEmk3lwili6U/ cu8t9K4mDctee5Heg45xRyfoFxQPzOPwN9jxVZC8GLHoe1U2VDPeMD+5ycLSRCgADmat iweomqjG8yOTqTF8Ol6E8pWhotbNtlgCaAkjK5hKCzkHyPOT1aiXbHmcljMspBvzh9le Apuw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:in-reply-to:content-disposition :mime-version:references:mail-followup-to:message-id:subject:cc:to :from:date; bh=6GulyvsoL3CZ2f4iWpWtifFCe3aPw+IrwmaqCw3SM+Q=; b=C21XSaM6cFKC7xFCQxHUUcBbME4CD3zp2tWCYqeuKkuCEC0s2A908Ljq96xagbj+CK FaVzKJmAo/z+XWC0y7o5L0E9QvH+RxiLjd6sJ85YNFiuRPKKYUD8gPy5ROZ3ffinHNyo nXWx4mbKkx03e6OZo3zaE1dOVGRfehjwV9xYAaXaQLntSLPv5Bwc8lGcdJ1eL5YZMvvs +G9SSb37tgSRYhIPVTKJ710KmW8toZerPUYqqlgwMnkYoLL7L6Rai0V2sMpG6YTsFO8N 3mMiYKxa5DhHHcQi5hPqUl8ckq0XvMHZmTSfxTp5cEztHi2I4yWcPorIiB//hFeLjVg1 ZiOQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id s82-v6si1314363pfk.197.2018.11.07.10.04.56; Wed, 07 Nov 2018 10:05:11 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731344AbeKHBnr (ORCPT + 99 others); Wed, 7 Nov 2018 20:43:47 -0500 Received: from vmicros1.altlinux.org ([194.107.17.57]:39936 "EHLO vmicros1.altlinux.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727561AbeKHBnq (ORCPT ); Wed, 7 Nov 2018 20:43:46 -0500 Received: from mua.local.altlinux.org (mua.local.altlinux.org [192.168.1.14]) by vmicros1.altlinux.org (Postfix) with ESMTP id C1DAC72CA56; Wed, 7 Nov 2018 19:12:44 +0300 (MSK) Received: by mua.local.altlinux.org (Postfix, from userid 508) id B418F7CC774; Wed, 7 Nov 2018 19:12:44 +0300 (MSK) Date: Wed, 7 Nov 2018 19:12:44 +0300 From: "Dmitry V. Levin" To: Oleg Nesterov Cc: Elvira Khabirova , Steven Rostedt , Ingo Molnar , Andy Lutomirski , Eugene Syromyatnikov , linux-kernel@vger.kernel.org, strace-devel@lists.strace.io Subject: Re: [RFC PATCH] ptrace: add PTRACE_GET_SYSCALL_INFO request Message-ID: <20181107161244.GA27809@altlinux.org> Mail-Followup-To: Oleg Nesterov , Elvira Khabirova , Steven Rostedt , Ingo Molnar , Andy Lutomirski , Eugene Syromyatnikov , linux-kernel@vger.kernel.org, strace-devel@lists.strace.io References: <20181107042751.3b519062@akathisia> <20181107112100.GA20419@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20181107112100.GA20419@redhat.com> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Nov 07, 2018 at 12:21:01PM +0100, Oleg Nesterov wrote: > On 11/07, Elvira Khabirova wrote: > > > > In short, if a 64-bit task performs a syscall through int 0x80, its tracer > > has no reliable means to find out that the syscall was, in fact, > > a compat syscall, and misidentifies it. > > * Syscall-enter-stop and syscall-exit-stop look the same for the tracer. > > Yes, this was discussed many times... > > So perhaps it makes sense to encode compat/is_enter in ->ptrace_message, > debugger can use PTRACE_GETEVENTMSG to get this info. This would mean for the debugger an extra syscall invocation for each syscall stop. When strace doesn't have to fetch memory, it invokes three syscalls per syscall stop (wait4, PTRACE_GETREGSET, and PTRACE_SYSCALL). We definitely want to avoid adding PTRACE_GETEVENTMSG on top of that. -- ldv