Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp542631imu; Thu, 22 Nov 2018 01:28:05 -0800 (PST) X-Google-Smtp-Source: AJdET5ftvvGYOGiO/JCCfIomDwPo7zU1ZPFfT6bLW951wWCHGd/Jmp1ml7yPs5qzqNt7o375EayP X-Received: by 2002:a62:113:: with SMTP id 19mr10456496pfb.176.1542878884965; Thu, 22 Nov 2018 01:28:04 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1542878884; cv=none; d=google.com; s=arc-20160816; b=cqcrdQDTdWNBECLbHJbjXjP8/U8qH1XRaQPdXpUEfFCljDBUHqGn3X2+YSVSjxfNTg rMpgmiYTNu2gDB7ylpMAupsjd/FG4Hnyykw4MgXavsd3G8iwXKnsA2wXdSffiUpWAjCf KRB6Xj+ImHAaNfRVWbVeD9zqlzx1xTaTSb33PSRqnerWg1ijkQaptKU46Rj7Jb8BN0gY CJc2mItlHIrm0bl1LVBMzWi4LfWhDPe4lqYHDqjjVDbHG567zUbQf9eMbAUPrJNiMQQM raR8CE5+756y3Zao4w2p0Tdj8FLn9HCVZbQaM9FSib6siZFciRzlne1ElTvSEjf0BnbB Anog== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=whJmdOueria5aVoya5BK3nuwL5nohoNvP1NtLnc8CcU=; b=ZUm5QZCgXJvuNf+22XpGD3TblHEAs/zqSy//0LyMnE6papjsZT6VrNX3VBoVIwjX9V RxjNrYtQRgwNrDWSJdCXcFSvtZdGPhsPXjT5WAO9UVeF9o9zIW8m8Remf30yAAVqBaSZ j03Vcy0+VXHy5qfbAjTHCmqE/UOCETHKneMaoiRSWXtNcTBWXX2JcoaSdSD6UKM6adBk 4TT+y0QGV2TUYbfYdnhQRzMpFoxwVCv3U/osZmId8J+/UFw5CrTo7JiwF2Zpy/F7GR/R BQei6+DpazWSPlKf0EMAE5pq5BrDlLuhVO6DGnJs1wyhTK5jJEzG5WvAyEeIbSS44vHt X0eA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=wLrVmaNg; 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=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id v190si9767060pfv.8.2018.11.22.01.27.48; Thu, 22 Nov 2018 01:28:04 -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=@kernel.org header.s=default header.b=wLrVmaNg; 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=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2390332AbeKVJdj (ORCPT + 99 others); Thu, 22 Nov 2018 04:33:39 -0500 Received: from mail.kernel.org ([198.145.29.99]:60998 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2390220AbeKVJdi (ORCPT ); Thu, 22 Nov 2018 04:33:38 -0500 Received: from mail-wm1-f47.google.com (mail-wm1-f47.google.com [209.85.128.47]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 3C5D420C01 for ; Wed, 21 Nov 2018 22:57:11 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1542841031; bh=rMSKPt/SYVaxJeKa+ZPcsP7P6nUdKAtiiF7JStebEOQ=; h=References:In-Reply-To:From:Date:Subject:To:Cc:From; b=wLrVmaNgiMfk1A9utYCp2clvnZmNOAfZzQDl8cqhirefuf+xlIq3gnpSTJ58pONRe DYvoDJC3JNWPRHmS4sv8NTMMTFt8N3wJxwVVP/CzLWsupucI7Reghwlkq/q7cAj2co emWa6rbYT3AixR7TbXiTvXd8QMd2t8Yz2BpYK1FI= Received: by mail-wm1-f47.google.com with SMTP id r11-v6so7076297wmb.2 for ; Wed, 21 Nov 2018 14:57:11 -0800 (PST) X-Gm-Message-State: AA+aEWbfnVXCRgeBa2SjGxFTx4FtjITkO9mw2fo4PYpPmNNl8lFqM9i+ V6eEAQ04EBtnbg5sAhYKKVOfp5U0SYcToqFiEqPh1A== X-Received: by 2002:a1c:b1d5:: with SMTP id a204mr7045722wmf.32.1542841029636; Wed, 21 Nov 2018 14:57:09 -0800 (PST) MIME-Version: 1.0 References: <20181121165806.07da7c98@akathisia> In-Reply-To: <20181121165806.07da7c98@akathisia> From: Andy Lutomirski Date: Wed, 21 Nov 2018 14:56:57 -0800 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [RFC PATCH v2] ptrace: add PTRACE_GET_SYSCALL_INFO request To: Elvira Khabirova , Kees Cook , Sasha Levin , Linux API , Jann Horn Cc: Oleg Nesterov , Steven Rostedt , Ingo Molnar , LKML , "Dmitry V. Levin" , Eugene Syromiatnikov , Andrew Lutomirski , strace-devel@lists.strace.io Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Please cc linux-api@vger.kernel.org for future versions. On Wed, Nov 21, 2018 at 7:58 AM Elvira Khabirova wrote: > > struct ptrace_syscall_info { > __u8 op; /* 0 for entry, 1 for exit */ Can you add proper defines, like: #define PTRACE_SYSCALL_ENTRY 0 #define PTRACE_SYSCALL_EXIT 1 #define PTRACE_SYSCALL_SECCOMP 2 and make seccomp work from the start? I'd rather we don't merge an implementation that doesn't work for seccomp and then have to rework it later. > __u8 __pad0[7]; > union { > struct { > __s32 nr; __u64 please. Syscall numbers are, as a practical matter, 64 bits. Admittedly, the actual effects of setting the high bits are unclear, and seccomp has issues with it, but let's not perpetuate the problem. > __u32 arch; > __u64 instruction_pointer; > __u64 args[6]; > } entry_info; > struct { > __s64 rval; > __u8 is_error; > __u8 __pad1[7]; > } exit_info; > }; > }; Should seccomp events use entry_info or should they just literally supply seccomp_data?