Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp3721678imu; Mon, 10 Dec 2018 06:53:36 -0800 (PST) X-Google-Smtp-Source: AFSGD/Xy7Ab9METb8fVTRBKeUwShXCZpPF4cChpYmlPpEb5obV7hrzVvRrc8aPX3JYd1HU8TRwMc X-Received: by 2002:a62:3006:: with SMTP id w6mr12785272pfw.258.1544453616267; Mon, 10 Dec 2018 06:53:36 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1544453616; cv=none; d=google.com; s=arc-20160816; b=WPxmiPR4u04iKI9tuRvcba30GmVwSwuzjdI5aaz/XrEZnSB0KGxtkNh26lvoju7ttC FSca2fKSLas0/2PoSktzHudv+EgfqY1llC9y/vIDAuPeOYVuX2AJXGkF8ixyUTQi1Hji cyk3vFsxi0NkGWBVY68RQkqgmqkJ7P0q+LEKkU4yw6BRpeJ4CI+rc+ORtPh+dJzj1GG9 Tg2Bm/H7dHXJp+Jk5BPn+8mvtSS4777DFQOOKIanI07UJ84jlhg5NgVtONSZIMQMHOe2 EOxTElbgzesaN0ctZmxTeH9VPCo7isNsaQFXevdLA2VV8o0jI0pE77Oph92g3ghJRUlN Rc4A== 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=RrXPbJjc2gU1sJhN6sp/zeQx5Lh0UGrsEOGc+LvmplQ=; b=bde26RzU2oLgKn+7b5h0llhBN9jC7QeJpBQUi/RjSFv17JthNDVbEZc+oIpD5I9Xli 4sBDi3gcBYucmgX3q3+8p8C1UiDpfNHAEbk9oFGjFycBOiNKOVIiYywYeqgMykL518JO LphUDrQToZgx5kALUnCLwQMRqEYjxlVk+eXeVFgSZ6oefl7F4enDIS6I0de87cT9LUN2 YqRNRD2ZF2bkwuB0FPGkDSXLXDjt/pxt0pZFIHZTSiXL2YdfXxSUrlxd7Uf2hUkzrlYq YisiHTR2k0lSoFJ/6t5Jn59k8Tt9NTf8cxv9ybkDU7MD8yfbclQLVHKDq+p6ZbfXq1DA SiCQ== 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 p3si9759907pgi.0.2018.12.10.06.53.20; Mon, 10 Dec 2018 06:53:36 -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 S1727745AbeLJOLL (ORCPT + 99 others); Mon, 10 Dec 2018 09:11:11 -0500 Received: from mx1.redhat.com ([209.132.183.28]:56703 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727197AbeLJOLL (ORCPT ); Mon, 10 Dec 2018 09:11:11 -0500 Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 9529D307D866; Mon, 10 Dec 2018 14:11:10 +0000 (UTC) Received: from dhcp-27-174.brq.redhat.com (unknown [10.43.17.131]) by smtp.corp.redhat.com (Postfix) with SMTP id 807ED600D6; Mon, 10 Dec 2018 14:11:08 +0000 (UTC) Received: by dhcp-27-174.brq.redhat.com (nbSMTP-1.00) for uid 1000 oleg@redhat.com; Mon, 10 Dec 2018 15:11:10 +0100 (CET) Date: Mon, 10 Dec 2018 15:11:07 +0100 From: Oleg Nesterov To: "Dmitry V. Levin" 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: <20181210141107.GB4177@redhat.com> References: <20181210042352.GA6092@altlinux.org> <20181210043126.GX6131@altlinux.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20181210043126.GX6131@altlinux.org> User-Agent: Mutt/1.5.24 (2015-08-30) X-Scanned-By: MIMEDefang 2.79 on 10.5.11.11 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.48]); Mon, 10 Dec 2018 14:11:10 +0000 (UTC) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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; > + }; > +}; Could you explain why ptrace_syscall_info needs __pad{0,1,2} ? I simply can't understand why... Otherwise the patch looks good to me. I am not going to discuss the API and data layout, I am fine with anything which suits user-space needs. I think the patch is technically correct, feel free to add Reviewed-by: Oleg Nesterov