Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752972AbdIGXdq (ORCPT ); Thu, 7 Sep 2017 19:33:46 -0400 Received: from mail-it0-f47.google.com ([209.85.214.47]:36847 "EHLO mail-it0-f47.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750800AbdIGXdp (ORCPT ); Thu, 7 Sep 2017 19:33:45 -0400 X-Google-Smtp-Source: AOwi7QBT+cEKEx9w5im48ua382MvZ4/0IW3r1qjsccnddZYAkVU/ioIlQxI9LldQazFmnvTevoUtuKFN6NGqyR+KvtY= MIME-Version: 1.0 In-Reply-To: <20170907212739.72s3lbgoerumgxdj@ubuntu-hedt> References: <20170907212739.72s3lbgoerumgxdj@ubuntu-hedt> From: Kees Cook Date: Thu, 7 Sep 2017 16:33:44 -0700 X-Google-Sender-Auth: Vnss4SX7cVCav95A9zFRwe0T3NU Message-ID: Subject: Re: seccomp selftest fails to build with glibc 2.26 To: Seth Forshee Cc: LKML Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1529 Lines: 48 On Thu, Sep 7, 2017 at 2:27 PM, Seth Forshee wrote: > Hi Kees, > > I'm seeing build failures with your seccomp selftest when using glibc > 2.26. The first are related to changing macro names from __have_sig*_t > to __sig*_t_defined. But after defining those there are more conflicting > definitions. I was able to get it to build with the changes below, > however it's ugly so I'm hesitant to suggest that it's a fix (and I > haven't tested with older glibc either). > > The full build output is a little lengthy, so I've pasted it at > http://pastebin.ubuntu.com/25486192/ rather than including it inline. Thanks for the details! I took a different route for the solution (basically, we can drop the hack for glibc not having support for SIGSYS in its siginfo_t), and sent a separate email with the patch. -Kees > > Thanks, > Seth > > > diff --git a/tools/testing/selftests/seccomp/seccomp_bpf.c b/tools/testing/selftests/seccomp/seccomp_bpf.c > index 03f1fa49..d234a3e5 100644 > --- a/tools/testing/selftests/seccomp/seccomp_bpf.c > +++ b/tools/testing/selftests/seccomp/seccomp_bpf.c > @@ -11,6 +11,13 @@ > #define __have_sigval_t 1 > #define __have_sigevent_t 1 > > +/* These fix errors with glibc 2.26 */ > +#define __siginfo_t_defined 1 > +#define __sigval_t_defined 1 > +#define __sigevent_t_defined 1 > +#define _BITS_SIGINFO_CONSTS_H 1 > +#define _BITS_SIGEVENT_CONSTS_H 1 > + > #include > #include > #include -- Kees Cook Pixel Security