Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp3835700imu; Mon, 10 Dec 2018 08:33:18 -0800 (PST) X-Google-Smtp-Source: AFSGD/VuiBi3BySQp3ggm8wYh4VHdduI3n/Zm63+7KlME3wgwVDdtUBgBFgDBvQf2Qn3gZbIVEh2 X-Received: by 2002:a17:902:9006:: with SMTP id a6mr12558014plp.334.1544459598401; Mon, 10 Dec 2018 08:33:18 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1544459598; cv=none; d=google.com; s=arc-20160816; b=CCcx+skCC7/keb9r/SLbxGgxKBbsoIdH25tap4qiDOpNWcO7m5lej27NuQnCE/p853 gNgPYkNLLv4cN+lmvilMrYMxyUm7dM+geoKuzJJEZhRLdaGe3gXILTPcbvr5J4QCK+x+ HwLNliYp9/qDa76AxhkEmrfEbPuGkCQ1nnw2FMZJSECu6cILBh8VJ0LKNkoPjm//K3OK wgDHnpBRHmYf0kciqd3Gy/BMdvPAWKcBOd5WyZwpATNKEOjtcJb5ykNJmm+KuR3GYy7R NKPIzqMjAPF3jadI8p1tM0M4l2has6NGxG6Kf5yqUaYSSOJGJLsjeq0p7ish5iWtQJ92 M1BQ== 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:message-id:subject:cc:to:from:date; bh=tiakJduLS9PqPeujC1tbFGbO41bcIgtJYpVhAGYViBw=; b=01/zqrKjH569P5aKg7w/TNw4j/CdoelhVWLSPw7xoDqroupyl4g9/I8om8jB9VGEwm ULxhpubby4qdVw76Y/hVQmAqge9sR/pzkbejTFHmHsdnWXUHy42BrJ70R/Jks62y/SuM lx1QO6fbboFsAo1MSMM/3Msnaif8q4/+BWUI5QaLzlVCGT2Vptz/PyxE0w6A3sq3h93R REHPtHxIJ6kPAx4o/aWQWJB3dQWn1Y/r9HhUgjH534KdMGZ2ID054aQOYUM0VaMb2vcu IHE13L3EerTZQEVcO4A/wSTh6kI1m2JPDbYEZJYoXvP5CVienn59Y+Tv41pBDyEJU8d3 fLJg== 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 m3si10061247plt.394.2018.12.10.08.33.03; Mon, 10 Dec 2018 08:33:18 -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 S1727444AbeLJQVg (ORCPT + 99 others); Mon, 10 Dec 2018 11:21:36 -0500 Received: from vmicros1.altlinux.org ([194.107.17.57]:36222 "EHLO vmicros1.altlinux.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726392AbeLJQVf (ORCPT ); Mon, 10 Dec 2018 11:21:35 -0500 Received: from mua.local.altlinux.org (mua.local.altlinux.org [192.168.1.14]) by vmicros1.altlinux.org (Postfix) with ESMTP id 5FBDC72CC66; Mon, 10 Dec 2018 19:21:32 +0300 (MSK) Received: by mua.local.altlinux.org (Postfix, from userid 508) id 50DDE7CF2BB; Mon, 10 Dec 2018 19:21:32 +0300 (MSK) Date: Mon, 10 Dec 2018 19:21:32 +0300 From: "Dmitry V. Levin" To: Oleg Nesterov Cc: Andy Lutomirski , Elvira Khabirova , Eugene Syromyatnikov , Kees Cook , Jann Horn , linux-api@vger.kernel.org, strace-devel@lists.strace.io, linux-kernel@vger.kernel.org Subject: Re: [PATCH v5 24/25] ptrace: add PTRACE_GET_SYSCALL_INFO request Message-ID: <20181210162131.GG14149@altlinux.org> References: <20181210042352.GA6092@altlinux.org> <20181210043126.GX6131@altlinux.org> <20181210141107.GB4177@redhat.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="uQr8t48UFsdbeI+V" Content-Disposition: inline In-Reply-To: <20181210141107.GB4177@redhat.com> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org --uQr8t48UFsdbeI+V Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Mon, Dec 10, 2018 at 03:11:07PM +0100, Oleg Nesterov wrote: > On 12/10, Dmitry V. Levin wrote: > > > > +struct ptrace_syscall_info { > > + __u8 op; /* PTRACE_SYSCALL_INFO_* */ > > + __u8 __pad0[3]; > > + __u32 arch; > > + __u64 instruction_pointer; > > + __u64 stack_pointer; > > + __u64 frame_pointer; > > + union { > > + struct { > > + __u64 nr; > > + __u64 args[6]; > > + } entry; > > + struct { > > + __s64 rval; > > + __u8 is_error; > > + __u8 __pad1[7]; > > + } exit; > > + struct { > > + __u64 nr; > > + __u64 args[6]; > > + __u32 ret_data; > > + __u8 __pad2[4]; > > + } seccomp; > > + }; > > +}; >=20 > Could you explain why ptrace_syscall_info needs __pad{0,1,2} ? I simply c= an't > understand why... I suppose the idea behind the use of these pads was to make the structure arch-independent. I don't think we really need to keep it exactly the same on all architectures - the only practical requirement is to avoid any compat issues, but I don't mind keeping the structure arch-independent. --=20 ldv --uQr8t48UFsdbeI+V Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIcBAEBCAAGBQJcDpKLAAoJEAVFT+BVnCUIQyQQAJcBexpZkT3KJAUbsDkRfHtd gkDtUKrgIj6BpEzYUbIn6I8dXNIqyFMJGSh4lMWnhFbDXeHIQ91fNUoH5q/MifC7 PfbzH6ibiOTzflv/1/oTKLJ1RhzITuIlQQb6Xd/3BV+WEhPDs77tNJtPpgIlv+oK z3Xa/mw3f0RXSAYpuvtCG1IiwWJMoy5YjpLBAWnldCxVH/jeiPU5xoSYl1DKo6Y+ YeNiM/mCEbaYzDWmAPiE5Mntarj3uT2g4XTLnuIFJo38z8jYp3QZwToMcYBFK0zx i6NbYJ6oaiuUSCZMSM3X8NP2EsmmhVRi+3wc8WnzjqYbLqXa4f47aHunO/S17Bog /8N5RexkAUM86J3Ho+SMZT3cDFi398vxb2f5gFN6DIPt4GLQYZaefJTc2hWvI7x4 xIm7+27/kSIURbcyVs7g/BtxjApz7kcY5ed3Uh5p2Z9HIxW4/TYiyRhh4P8oRddA WEWTJaohjwF/QO3VJg7RbzTn2OsCTAX8KfzsEKTxsIIsNWeG+wHm1SSUsmvq+1ep bDWVq09gvMogfl+U1qdpPhMlyXf5oTAZ9C64ZsUQZGtq0P8PG5M0a3VlT3fhktNV yCGY93i50BA/fN8aBdMo+oyj8UIP1tZpuY0Lm6QjcNw8lPdBipEDCEi0+cPFwAmc djVNelGXhg9dLjWz5UgP =2aij -----END PGP SIGNATURE----- --uQr8t48UFsdbeI+V--