Received: by 2002:a25:c593:0:0:0:0:0 with SMTP id v141csp892249ybe; Thu, 19 Sep 2019 05:36:24 -0700 (PDT) X-Google-Smtp-Source: APXvYqyCjXfVp2H9AikVnxNx9LEEbHxbdaXxYjtAbr6PMTKz7XW7iiHjMAp9qLL1QFn0r1+e8uqC X-Received: by 2002:a17:906:d8c8:: with SMTP id re8mr14091448ejb.130.1568896583905; Thu, 19 Sep 2019 05:36:23 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1568896583; cv=none; d=google.com; s=arc-20160816; b=yZWE71ZVqJYOoHbMMVvRE0qgZPuP/8o7GhO3PY9i2hkm30/yS+UP7fTKlsHGj63Zma gzso277ZT71AXCC7iUGomrd87V4dyVI3C1RR6QxzczhnlbO5DK8lPqzw3GgSyLuBkBlM rNrdjPA3HAktDDqooOY+9l9WBVH3EY9EzqaZeJzWHMNUVje4nE0IRI9+uZQL3wcQ+mSU Ptteb56v1CTDS1fHNYpOlCCWPLsaIj4tQpirHSiBmsdN+LN4yeErBhtwXRWNIFFuxGIE ZxPOf9A6oxlzTvCLcChW1JUxJRPertn2m54vJ+tyTMmeUwySajlDbc6p0Ub7iM8EdNQH 1MMA== 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-transfer-encoding :content-disposition:mime-version:references:message-id:subject:cc :to:from:date; bh=QEWzqJMiqugCXfrd6i39e0X45QoAzCm6v5sQDgMwq5I=; b=iCyNRTXUD7LX9VRbrleVm5FJYBtwYYSeG+Oao4Lxd5XSFKb6hFAVhIwBQVohNatIdp X03ZYvNYwse4b7v2e7WXn/OXmhst9xfLdYJu9MiSPJqgNpw7YwKjApbIQ6r1NCnAPMvO RWNlvp4qtQgNIUTO+rLrqz3p0yLNwQPdyKGx4KvlrabtmL1nSJg+gx7IsEn9gnWQ8Rts Hm9R4ngEJ6Zwxp4/ceShCJnVN3S/AbswOZTk3i9HUzpVc4mZQWcrKIVHLMswHpknAk/Q 7Sl7YpPH9S96SfYG6h5g4qATNrrITd3YK6kegk4ANjQyvPOwnc1xtH9hyxBNMQlq4ny9 S2Tw== 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 g50si4887811edb.47.2019.09.19.05.36.00; Thu, 19 Sep 2019 05:36:23 -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; 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 S2388242AbfISKmz (ORCPT + 99 others); Thu, 19 Sep 2019 06:42:55 -0400 Received: from vmicros1.altlinux.org ([194.107.17.57]:43728 "EHLO vmicros1.altlinux.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2387520AbfISKmy (ORCPT ); Thu, 19 Sep 2019 06:42:54 -0400 Received: from mua.local.altlinux.org (mua.local.altlinux.org [192.168.1.14]) by vmicros1.altlinux.org (Postfix) with ESMTP id DA8F072CCAE; Thu, 19 Sep 2019 13:42:51 +0300 (MSK) Received: by mua.local.altlinux.org (Postfix, from userid 508) id CC39F7CCB47; Thu, 19 Sep 2019 13:42:51 +0300 (MSK) Date: Thu, 19 Sep 2019 13:42:51 +0300 From: "Dmitry V. Levin" To: Kees Cook Cc: Tyler Hicks , Christian Brauner , luto@amacapital.net, jannh@google.com, wad@chromium.org, shuah@kernel.org, ast@kernel.org, daniel@iogearbox.net, kafai@fb.com, songliubraving@fb.com, yhs@fb.com, linux-kernel@vger.kernel.org, linux-kselftest@vger.kernel.org, netdev@vger.kernel.org, bpf@vger.kernel.org, Tycho Andersen , stable@vger.kernel.org Subject: Re: [PATCH 2/4] seccomp: add two missing ptrace ifdefines Message-ID: <20190919104251.GA16834@altlinux.org> References: <20190918084833.9369-1-christian.brauner@ubuntu.com> <20190918084833.9369-3-christian.brauner@ubuntu.com> <20190918091512.GA5088@elm> <201909181031.1EE73B4@keescook> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <201909181031.1EE73B4@keescook> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Sep 18, 2019 at 10:33:09AM -0700, Kees Cook wrote: > On Wed, Sep 18, 2019 at 11:15:12AM +0200, Tyler Hicks wrote: > > On 2019-09-18 10:48:31, Christian Brauner wrote: > > > Add tw missing ptrace ifdefines to avoid compilation errors on systems > > > that do not provide PTRACE_EVENTMSG_SYSCALL_ENTRY or > > > PTRACE_EVENTMSG_SYSCALL_EXIT or: > > > > > > gcc -Wl,-no-as-needed -Wall seccomp_bpf.c -lpthread -o seccomp_bpf > > > In file included from seccomp_bpf.c:52:0: > > > seccomp_bpf.c: In function ‘tracer_ptrace’: > > > seccomp_bpf.c:1792:20: error: ‘PTRACE_EVENTMSG_SYSCALL_ENTRY’ undeclared (first use in this function); did you mean ‘PTRACE_EVENT_CLONE’? > > > EXPECT_EQ(entry ? PTRACE_EVENTMSG_SYSCALL_ENTRY > > > ^ > > > ../kselftest_harness.h:608:13: note: in definition of macro ‘__EXPECT’ > > > __typeof__(_expected) __exp = (_expected); \ > > > ^~~~~~~~~ > > > seccomp_bpf.c:1792:2: note: in expansion of macro ‘EXPECT_EQ’ > > > EXPECT_EQ(entry ? PTRACE_EVENTMSG_SYSCALL_ENTRY > > > ^~~~~~~~~ > > > seccomp_bpf.c:1792:20: note: each undeclared identifier is reported only once for each function it appears in > > > EXPECT_EQ(entry ? PTRACE_EVENTMSG_SYSCALL_ENTRY > > > ^ > > > ../kselftest_harness.h:608:13: note: in definition of macro ‘__EXPECT’ > > > __typeof__(_expected) __exp = (_expected); \ > > > ^~~~~~~~~ > > > seccomp_bpf.c:1792:2: note: in expansion of macro ‘EXPECT_EQ’ > > > EXPECT_EQ(entry ? PTRACE_EVENTMSG_SYSCALL_ENTRY > > > ^~~~~~~~~ > > > seccomp_bpf.c:1793:6: error: ‘PTRACE_EVENTMSG_SYSCALL_EXIT’ undeclared (first use in this function); did you mean ‘PTRACE_EVENTMSG_SYSCALL_ENTRY’? > > > : PTRACE_EVENTMSG_SYSCALL_EXIT, msg); > > > ^ > > > ../kselftest_harness.h:608:13: note: in definition of macro ‘__EXPECT’ > > > __typeof__(_expected) __exp = (_expected); \ > > > ^~~~~~~~~ > > > seccomp_bpf.c:1792:2: note: in expansion of macro ‘EXPECT_EQ’ > > > EXPECT_EQ(entry ? PTRACE_EVENTMSG_SYSCALL_ENTRY > > > ^~~~~~~~~ > > > > > > Fixes: 6a21cc50f0c7 ("seccomp: add a return code to trap to userspace") > > > > I think this Fixes line is incorrect and should be changed to: > > > > Fixes: 201766a20e30 ("ptrace: add PTRACE_GET_SYSCALL_INFO request") > > > > With that changed, > > > > Reviewed-by: Tyler Hicks > > This is actually fixed in -next already (and, yes, with the Fixes line > Tyler has mentioned): > > https://git.kernel.org/pub/scm/linux/kernel/git/shuah/linux-kselftest.git/commit/?h=next&id=69b2d3c5924273a0ae968d3818210fc57a1b9d07 Excuse me, does it mean that you expect each selftest to be self-hosted? I was (and still is) under impression that selftests should be built with headers installed from the tree. Is it the case, or is it not? -- ldv