Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp27286imu; Wed, 7 Nov 2018 12:23:18 -0800 (PST) X-Google-Smtp-Source: AJdET5f/gvVyPUbMakigBRQXdWQ4917eE66pyjLQy4Jwu3TrlkLu3nDi1IWQEk39P3ElSvXh10oG X-Received: by 2002:a63:fe0a:: with SMTP id p10mr1418513pgh.265.1541622198001; Wed, 07 Nov 2018 12:23:18 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1541622197; cv=none; d=google.com; s=arc-20160816; b=i7i5zplKDdPpkboCN+yL2z2Yfp5+zX4UNkztXUEE2r4B5t6hQiho/7VDM13rEmMauc y8EG2DhMh/YDOoF7JMUJ7X2X0hBNLin9mVi4mMkuXhPEIpBebHGjwe6j5SccOAzV7uGS ljRw+rV9BnOUQ0GNZ9U3REGMYffmxoNcvz3dW07Lg83HnuDyHc2B864LeyfH5bX23v7Z JAbGJ5/gT7FBPvKjzLqKMCHYJF0LjCsKyn5CT7KPvq9lIFMurpeguwTN4HmwJwBOtKMM HFF8e+XU9K/Rtu5qeOGZ0ETx6scWo7D/0Xu1w/FqFOsbuZeBgOhlYWvHGp//j8Kqod0s qJ0g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:to:references:message-id :content-transfer-encoding:cc:date:in-reply-to:from:subject :mime-version:dkim-signature; bh=aTSdqSiYp+KdAMuJ0/e9Op27AaHrrLnICcOTCUsBIPw=; b=zZaPxZaTFjjTy5H2SY/rynoho5VSLvvkTSRkpkjwnYBtw2NhMLbumfMkbquUElPfgh OKKDbs/dz0ugoP32k8LHebt8NvquPhFkLFNqTGNrD/+E4Sj4PPAe7L7Rxr/aN8Qd+M7Y iw+3CuvQt+WUyOMFSSK3gyKz0b6UvpgcDewtiG+Cin3xPTOZzIYgz0Lk1HvaRzsGxukq kpLXGDXDKkTuMBm8jn0F4MU+zEzF6I2MYgmBQrN1S7aVxar+0o0335zO5gjtMjPCpitW P0i9lSDaJoSQ3amTkN7bHoGQWEQKI9hkbXk3ItEIVcMuWma0WGRUhp8t1j5NuasL6U3r Y2+A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@amacapital-net.20150623.gappssmtp.com header.s=20150623 header.b=2IrFGC3b; 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 r5-v6si1841699pli.248.2018.11.07.12.23.01; Wed, 07 Nov 2018 12:23:17 -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; dkim=pass header.i=@amacapital-net.20150623.gappssmtp.com header.s=20150623 header.b=2IrFGC3b; 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 S1726944AbeKHFwS (ORCPT + 99 others); Thu, 8 Nov 2018 00:52:18 -0500 Received: from mail-pg1-f194.google.com ([209.85.215.194]:41239 "EHLO mail-pg1-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726524AbeKHFwS (ORCPT ); Thu, 8 Nov 2018 00:52:18 -0500 Received: by mail-pg1-f194.google.com with SMTP id 70so2210193pgh.8 for ; Wed, 07 Nov 2018 12:20:20 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amacapital-net.20150623.gappssmtp.com; s=20150623; h=mime-version:subject:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to; bh=aTSdqSiYp+KdAMuJ0/e9Op27AaHrrLnICcOTCUsBIPw=; b=2IrFGC3bbxEf6URp0PHTh6IhVM/Pr1ruUG3hO05zR9NuQDemmtRDg296DoyCSVZqzZ dx46orFC4FCu94Q3y/aeFwzdeUgirvA7kIugf04dzGN+3L/QzCIDAsk1eWGtrRvDZ39Q VlVW2qvT0k67+/+cRbLgpaOSSWd2x1vaqf7fm2tkLVdG+0nohxqQRX6ETBIo6PcgjyS7 V08LFDnr/fcWsUk06If+/EC+Mp2pbp8TNZmQZKiP932m7RikiGtKRG5/gQOOIbeYpZF2 YOTm8+flkEqAUVaBflWgq7Vozhzk+mAN1Or0hX/Ieb+BVlnVQEr6NTAfeq4N7J5X9nvk SEqA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:subject:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to; bh=aTSdqSiYp+KdAMuJ0/e9Op27AaHrrLnICcOTCUsBIPw=; b=mBd/sKt59cZbuXaDT2WORnpHDjdDa4o/iMGYmJ2t3sSODfQ/EntEytsTcJVE70uNKn MKeoj2fr36xICWW4nQAkchp6HgumN+rusfpulv12FkjPCtf9NRvEb3AtRBfMPO6033zH KExyqL5paOFdLGRW+GSLX3lQp4skITCaDEChva5nrinqXewDeUstVdcixCX1pOeT8fRu b+nx/Sv3ADPqbZldmsAphtmnpEOnJ8rh1luOQee8UV3UdcaEG1xDl9gmwoW5YteeNsJH BjJwy8BsaPk0znkE6JrsTAE0IyxRTKoTgthQWROdMaBfZBUWtiJ1e3+1Dv3VrRY/RVdn K3Ow== X-Gm-Message-State: AGRZ1gKhY1MSU+4hnaL89Gy27LqScF+yGQkRgZUDJ3TRhXGrrHCxTx6F GDbiNsomt86nG/wWIZMkvCgGNA== X-Received: by 2002:a63:6bc1:: with SMTP id g184mr1467614pgc.25.1541622020368; Wed, 07 Nov 2018 12:20:20 -0800 (PST) Received: from ?IPv6:2601:646:c200:7429:6091:ffb6:696b:95fe? ([2601:646:c200:7429:6091:ffb6:696b:95fe]) by smtp.gmail.com with ESMTPSA id 196-v6sm4714617pfc.71.2018.11.07.12.20.19 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 07 Nov 2018 12:20:19 -0800 (PST) Content-Type: text/plain; charset=utf-8 Mime-Version: 1.0 (1.0) Subject: Re: [RFC PATCH] ptrace: add PTRACE_GET_SYSCALL_INFO request From: Andy Lutomirski X-Mailer: iPhone Mail (16A404) In-Reply-To: <20181107164443.GA8726@redhat.com> Date: Wed, 7 Nov 2018 12:20:18 -0800 Cc: Elvira Khabirova , rostedt@goodmis.org, mingo@redhat.com, linux-kernel@vger.kernel.org, ldv@altlinux.org, esyr@redhat.com, luto@kernel.org, strace-devel@lists.strace.io Content-Transfer-Encoding: quoted-printable Message-Id: <35B601B0-4D56-4706-B7A1-C9A522AB2D6F@amacapital.net> References: <20181107042751.3b519062@akathisia> <20181107112100.GA20419@redhat.com> <3BDB914D-12F3-4703-A033-EBE02226EC45@amacapital.net> <20181107164443.GA8726@redhat.com> To: Oleg Nesterov Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org > On Nov 7, 2018, at 8:44 AM, Oleg Nesterov wrote: >=20 >> On 11/07, Andy Lutomirski wrote: >>=20 >>=20 >>>> On Nov 7, 2018, at 3:21 AM, Oleg Nesterov wrote: >>>>=20 >>>> On 11/07, Elvira Khabirova wrote: >>>>=20 >>>> In short, if a 64-bit task performs a syscall through int 0x80, its tra= cer >>>> 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= . >>>=20 >>> Yes, this was discussed many times... >>>=20 >>> So perhaps it makes sense to encode compat/is_enter in ->ptrace_message,= >>> debugger can use PTRACE_GETEVENTMSG to get this info. >>=20 >> As I said before, I strongly object to the use of =E2=80=9Ccompat=E2=80=9D= here. >=20 > Not sure I understand you... I do not like "compat" too, but this patch us= es > is_compat/etc and I agree with any naming. My point is: returning a value to user code that is: 0 if the kernel and tracee are 32-bit 0 if the kernel and tracer are 64-but 1 if the kernel is 64-bit and the tracer is 32-bit ? If the tracer is arm64 ILP32 Is not a good design. And 32-bit builds of strace will not appreciate it. The API should return a value that, at least on a given overall architecture= and preferably globally, indicates the syscall arch. While oddly named, au= dit_arch fits the bill nicely, and we already require it to have the right s= emantics for seccomp support.