linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Kees Cook <keescook@chromium.org>
To: Seth Forshee <seth.forshee@canonical.com>
Cc: LKML <linux-kernel@vger.kernel.org>
Subject: Re: seccomp selftest fails to build with glibc 2.26
Date: Thu, 7 Sep 2017 16:33:44 -0700	[thread overview]
Message-ID: <CAGXu5jLFDLqRif4+Kg9m4gQT1LaEy2h1Ms+Nd_eSV2Kp4+PgUA@mail.gmail.com> (raw)
In-Reply-To: <20170907212739.72s3lbgoerumgxdj@ubuntu-hedt>

On Thu, Sep 7, 2017 at 2:27 PM, Seth Forshee <seth.forshee@canonical.com> 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 <errno.h>
>  #include <linux/filter.h>
>  #include <sys/prctl.h>



-- 
Kees Cook
Pixel Security

      reply	other threads:[~2017-09-07 23:33 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-09-07 21:27 seccomp selftest fails to build with glibc 2.26 Seth Forshee
2017-09-07 23:33 ` Kees Cook [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CAGXu5jLFDLqRif4+Kg9m4gQT1LaEy2h1Ms+Nd_eSV2Kp4+PgUA@mail.gmail.com \
    --to=keescook@chromium.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=seth.forshee@canonical.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).