Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp161986imu; Thu, 8 Nov 2018 06:34:31 -0800 (PST) X-Google-Smtp-Source: AJdET5cFQRS+boRVybOi7F0UWj56eZ8hUa6IzJCVp/gHQk+bhwBlPMTpUOJWdwgL97I8yGtclILE X-Received: by 2002:a63:ff16:: with SMTP id k22mr3980994pgi.244.1541687671151; Thu, 08 Nov 2018 06:34:31 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1541687671; cv=none; d=google.com; s=arc-20160816; b=SJGdddyA0t76wLzM8Glqvhq9Bt6MCATV2YrCTD66hH+69y4JPDK8odAfRYVSoZaAJk PgaYFRcwwUNqx8YWhccyZSV0J97+7efB1DumEc3mfqT6RF+5e84T6MwSmAl7EGLFzOes m+YAXfLdcDFSV4hdLbA379Tv8swmcv3cwpb0hCnrofe275cUa8fxy0lnJcXVVhZfQK1a D0AsVFDDij+iZj9m9QVOeyOsLCGawaBPPWQnNqT054L0Uvlo5Uv8/Q6u+sPIsT4nCmAq LP+IYxs16/4oma9crnCgDTohmiyA4XmVnL4caCWMCqgDAWre3CfpFNmSKPUX0ffU7yvs aY2w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date; bh=+z3ctnJnCXzbOPa2DSK0FcOiKDZwtxbXXEPbVQS0lUg=; b=ZR2K7BJp7MRN7+7/pDarlEY0NZFNAFFbuhQpv3z2uLbgYasvDoHQazLS3rSi6Ola7P OjnOswS9QfqarcXf3rMM2kJeuZTbhF4G9WEJWRxonz9g9ofyWFJaYyIFcvQJgtShkI/x /Wh0pvMM2NOc/83I6M/LE0w49HDemUrQ+Zi7XnYTQPXQfzYVKheaDhZX2SxKx3MTnlYl K9d8O9986FJV2kmr+WLzXHTevVRXL1xYwwQBPjE+e+YIyEM1A5NmfmAMLr2GZbiDeQio gu2tri7E3mxgEbtZ6F4fkODtix03wKF03uCTMAE1NaOuFoJMLLMa4mTrXQqY9CPiRrgA qsew== 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id m1-v6si2575212plb.303.2018.11.08.06.34.15; Thu, 08 Nov 2018 06:34:31 -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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726827AbeKIAJf (ORCPT + 99 others); Thu, 8 Nov 2018 19:09:35 -0500 Received: from mx1.redhat.com ([209.132.183.28]:49856 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726359AbeKIAJe (ORCPT ); Thu, 8 Nov 2018 19:09:34 -0500 Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 391B93154852; Thu, 8 Nov 2018 14:33:49 +0000 (UTC) Received: from dhcp-27-174.brq.redhat.com (unknown [10.43.17.31]) by smtp.corp.redhat.com (Postfix) with SMTP id EAE75662FF; Thu, 8 Nov 2018 14:33:43 +0000 (UTC) Received: by dhcp-27-174.brq.redhat.com (nbSMTP-1.00) for uid 1000 oleg@redhat.com; Thu, 8 Nov 2018 15:33:48 +0100 (CET) Date: Thu, 8 Nov 2018 15:33:43 +0100 From: Oleg Nesterov To: Andy Lutomirski 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 Subject: Re: [RFC PATCH] ptrace: add PTRACE_GET_SYSCALL_INFO request Message-ID: <20181108143342.GC9939@redhat.com> References: <20181107042751.3b519062@akathisia> <20181107112100.GA20419@redhat.com> <3BDB914D-12F3-4703-A033-EBE02226EC45@amacapital.net> <20181107164443.GA8726@redhat.com> <35B601B0-4D56-4706-B7A1-C9A522AB2D6F@amacapital.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <35B601B0-4D56-4706-B7A1-C9A522AB2D6F@amacapital.net> User-Agent: Mutt/1.5.24 (2015-08-30) X-Scanned-By: MIMEDefang 2.79 on 10.5.11.12 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.41]); Thu, 08 Nov 2018 14:33:49 +0000 (UTC) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 11/07, Andy Lutomirski wrote: > > > On Nov 7, 2018, at 8:44 AM, Oleg Nesterov wrote: > > > > Not sure I understand you... I do not like "compat" too, but this patch uses > > 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. Sure, I agree. > While oddly named, audit_arch fits the bill nicely, and we already > require it to have the right semantics for seccomp support. Again, I agree, and I even mentioned PTRACE_EVENT_SECCOMP. This reminds me about in_ia32_syscall/TS_COMPAT problems... The 1st one is get_nr_restart_syscall, I'll try to re-send the fix tomorrow. Another problem is in_compat_syscall() in get_unmapped_area() paths, it can return the addr > TASK_SIZE for uprobed 32-bit task. There was something else but I forgot... Oleg.