Received: by 2002:a25:8b12:0:0:0:0:0 with SMTP id i18csp747613ybl; Fri, 23 Aug 2019 07:49:09 -0700 (PDT) X-Google-Smtp-Source: APXvYqxD6uQwnWvzYRnTKG43q8nxiZ6o3LHKnkAqCYCKAMSqh7b63MyOSTY2NxT4ExSuPkzXEhI8 X-Received: by 2002:a17:902:54d:: with SMTP id 71mr5143000plf.140.1566571749305; Fri, 23 Aug 2019 07:49:09 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1566571749; cv=none; d=google.com; s=arc-20160816; b=YdmLq6/DdehW3tRqVEdrGoWvtQHg+tJdPSOXh+2vEzNZuzHa5yANA2GIKvfFWCFZEM T/6KR4ZQMWjJROuHbItI5R9WCC1/CcgBqMrbM2BDQ96F+N5gZGAxWldScU1RZ0CXe4V2 S0wuPkQCquPlk15h2ha9kGcRUAPUVSbnzYN3D7EnU3ord0U9vyS/edkuIF2wWyJD0If8 SlMzonsPMqk0POovu/A3GCTZkRhX0fOPV6E9e/xeQ1Y5EGEw3B0/tgBi8vxOvGaDeeWe hF19RIiYnFig98cn2TaRKSFUgBC8lLa/r4pK5azEMRfeC5NYLF44bfHNw+YaFFb35pzw m8Bw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:content-transfer-encoding :content-disposition:mime-version:message-id:subject:cc:to:from:date :dkim-signature; bh=sigJYFk+Q8pR1o6eZ0D86keNFXFBPNuofqZlri3Zfmk=; b=vzIMZLlqTfICm92EJVKD87Na3b3WhOD/InjV0bmYhpyyfUk+DCywBAx8CoUwxMd2fm 4fjZcKzTQ95AKBKS1O2OL7y+aMHjzOJX2PYNsqMumaUWpyvhy3HMV1SI3zrDqDfQFE5S b5LICNa5/IGY4z3lAWjzspuNI3EAZgVXaeJaB7DKcGA8HeC2g8yFCdRF/7EQQIe+7Wp5 au2PRSAbUCmKrEMTYNVysKhLCj0mCS/hgW2S5Woikp+Yhebqi67NTYN/7FuSA9yCYJdw Q5jLnJJ3Uk1gz7hj5j4ih34LwxXMoKRi53U7oG9xux55XnxCch5s+D+68XNgrg0Y1Ecx MmTg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=MMyLRLW7; 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=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id x5si2712571pln.274.2019.08.23.07.48.54; Fri, 23 Aug 2019 07:49:09 -0700 (PDT) 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=@gmail.com header.s=20161025 header.b=MMyLRLW7; 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=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2403882AbfHVV61 (ORCPT + 99 others); Thu, 22 Aug 2019 17:58:27 -0400 Received: from mail-pl1-f196.google.com ([209.85.214.196]:44054 "EHLO mail-pl1-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1732386AbfHVV61 (ORCPT ); Thu, 22 Aug 2019 17:58:27 -0400 Received: by mail-pl1-f196.google.com with SMTP id t14so4223135plr.11; Thu, 22 Aug 2019 14:58:26 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=date:from:to:cc:subject:message-id:mime-version:content-disposition :content-transfer-encoding:user-agent; bh=sigJYFk+Q8pR1o6eZ0D86keNFXFBPNuofqZlri3Zfmk=; b=MMyLRLW7rKWEn3A5ln1ByMZuj2c1D9cAVkujgr3g9HJK/+goKhOkHiBBAbFXHZyyCL qypLXtTaT1HUEKAmyox5mrE+54FqTQL5F1nr4E/7bGZsmnAw1iVxbuDw44Euy6ftXuYg ve3X0EkKXzJmeUTVIoQVSQpRT1MuEysJo9slO9brBZThml+dcqCq+5nPw75j8YlSboHV jwhVSXxF+7n5G4/WnfxCbv9pBTXgBbJr5rNJ929dgdB1omA2AVpOjffXZZNpR8+I3Ah5 z6rKEDC86duu91bjUzI2+zwFIvGeXQSZ0hKnLaiLjTAhTGPa2SD42RSbNdqxSBwKVpOI JKVg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:mime-version :content-disposition:content-transfer-encoding:user-agent; bh=sigJYFk+Q8pR1o6eZ0D86keNFXFBPNuofqZlri3Zfmk=; b=o74IgHzptI7qdRi6HDUJ/WSHz+1bLXXouvmIlciVmdeuHH3DwVw6TE5buVOVF0uOG5 PCmrw5sqhJct5g1zOPqmO+h9v7ngvvoK5JbtGLIFup1N/hOKC4aLk5kxEDMR3P8gQARe ZAOdV6u237PnM2aewzTQcUbZIQFykmgHK9yDh3XYSC7rqbPwbblwgmsXRbtvD6gduY4A 5pK6w2zhxlYHxY2Ak54LK2d/1kTzxuQMQ8XO/fyez2+EjWre/j0eiKlCA9DX1J0mHFqr qSZIXjRQ8mJ0mU/9dAew6cwVwxT5r5l5wZPgfu4bjmkj/1oltIMFXsNy310jQvNgWpf2 51ZQ== X-Gm-Message-State: APjAAAV4BYf5YAbkxW4Kwu1KC8I7tUYhyGXFF1y5q8SSB0tJjroGsQLX VCDeOHTTQJSObM6uQcFonp8= X-Received: by 2002:a17:902:fe14:: with SMTP id g20mr1022404plj.54.1566511106363; Thu, 22 Aug 2019 14:58:26 -0700 (PDT) Received: from ip-172-31-44-144.us-west-2.compute.internal (ec2-54-213-13-77.us-west-2.compute.amazonaws.com. [54.213.13.77]) by smtp.gmail.com with ESMTPSA id t23sm387068pfl.154.2019.08.22.14.58.25 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Thu, 22 Aug 2019 14:58:25 -0700 (PDT) Date: Thu, 22 Aug 2019 21:58:23 +0000 From: Alakesh Haloi To: Kees Cook , Andy Lutomirski , Will Drewry , Shuah Khan , Alexei Starovoitov , Daniel Borkmann , Martin KaFai Lau , Song Liu , Yonghong Song Cc: linux-kselftest@vger.kernel.org, netdev@vger.kernel.org, bpf@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH] seccomp: fix compilation errors in seccomp-bpf kselftest Message-ID: <20190822215823.GA11292@ip-172-31-44-144.us-west-2.compute.internal> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit User-Agent: Mutt/1.9.4 (2018-02-28) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Without this patch we see following error while building and kselftest for secccomp_bpf fails. seccomp_bpf.c:1787:20: error: ‘PTRACE_EVENTMSG_SYSCALL_ENTRY’ undeclared (first use in this function); seccomp_bpf.c:1788:6: error: ‘PTRACE_EVENTMSG_SYSCALL_EXIT’ undeclared (first use in this function); Signed-off-by: Alakesh Haloi --- tools/testing/selftests/seccomp/seccomp_bpf.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/tools/testing/selftests/seccomp/seccomp_bpf.c b/tools/testing/selftests/seccomp/seccomp_bpf.c index 6ef7f16c4cf5..2e619760fc3e 100644 --- a/tools/testing/selftests/seccomp/seccomp_bpf.c +++ b/tools/testing/selftests/seccomp/seccomp_bpf.c @@ -1353,6 +1353,14 @@ TEST_F(precedence, log_is_fifth_in_any_order) #define PTRACE_EVENT_SECCOMP 7 #endif +#ifndef PTRACE_EVENTMSG_SYSCALL_ENTRY +#define PTRACE_EVENTMSG_SYSCALL_ENTRY 1 +#endif + +#ifndef PTRACE_EVENTMSG_SYSCALL_EXIT +#define PTRACE_EVENTMSG_SYSCALL_EXIT 2 +#endif + #define IS_SECCOMP_EVENT(status) ((status >> 16) == PTRACE_EVENT_SECCOMP) bool tracer_running; void tracer_stop(int sig) -- 2.17.1