Received: by 2002:ac0:a5a6:0:0:0:0:0 with SMTP id m35-v6csp998816imm; Wed, 22 Aug 2018 16:58:57 -0700 (PDT) X-Google-Smtp-Source: AA+uWPwq9eqV3Rqr0D50GdzcGYpPlpEEkSKI8Xkmne2lAc9ZmqDcL4dXFrrYX6riSEIkY+BiVgLt X-Received: by 2002:a17:902:b58b:: with SMTP id a11-v6mr55712583pls.34.1534982337479; Wed, 22 Aug 2018 16:58:57 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1534982337; cv=none; d=google.com; s=arc-20160816; b=I00jXNWWE/4MJEWSuA+opsZn6oQYXJcxHmLxudumFnYhwd7JkGocTZXSHG/WvkZFXz 9muUT86RsAhJmRMFZNYjW1dhEwQW0IiuCwwBtRZClQiMfzT8vi2IAEQffJA+rKZmD4mV 0Tq8KrRUkPeSGLn8LGxbsiBGTLB4CNfMyHb9eyzhZsfTvqadLFJqj1AT0h9deIKuwG7q 5L0Cc/2gtMti9MRHB/TpXJk1QOY0eGJwFDkgyzjIH9qmh4DCkXly1GEOJbpRuYFeTv+t sfutHAMX4eTPvsNnq3IqUB8AahKyFgeaC6wGxOZERCbdFyN7kO1/X4Wd/J1tFUvgMTY1 rlyA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:arc-authentication-results; bh=nT9EIUSs1cNTDGpiqArHz/yplgknx4Jqk2GZQnuG7eU=; b=CI1PZnOWdoYuSnS8B7/UjAkfBNaqPCU6Zscc9Dh1hrfB0O/31ydbc/TPYKKdkiTrqX gZrLdayyZ7+QN9qp4Y5JgQ4cDvuGDUerAdqEwPRczO9tRpC2fZxJ+pHmHhZCiVTMg4dw FxQuQrSaPW11cY/Lar5mhm/4cNu5z+8OOGBCkvb0ri8z3v9k+eaUJ5mgAXxCwyK73mKK 3RVp8pW3Xfpi1AnviMQlawHXdOM3YL2FyfhFXhe9gQ0DCoC64zlHgnVMf8XwTeZsqV8n 2P3hjXOedzd1IF/PvKsKZNWls/eQnLw4QWCgYsqynKPFPzLC+oIsPQM9g2ZSLYkD66Hu zQmg== 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 n14-v6si2870413pgg.216.2018.08.22.16.58.42; Wed, 22 Aug 2018 16:58:57 -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 S1727365AbeHWDYg (ORCPT + 99 others); Wed, 22 Aug 2018 23:24:36 -0400 Received: from nautica.notk.org ([91.121.71.147]:33552 "EHLO nautica.notk.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726809AbeHWDYf (ORCPT ); Wed, 22 Aug 2018 23:24:35 -0400 Received: by nautica.notk.org (Postfix, from userid 1001) id D5276C009; Thu, 23 Aug 2018 01:57:37 +0200 (CEST) Date: Thu, 23 Aug 2018 01:57:22 +0200 From: Dominique Martinet To: Nick Desaulniers Cc: joe@perches.com, Masahiro Yamada , Kees Cook , Linus Torvalds , Jonathan Corbet , Arnd Bergmann , dwmw@amazon.co.uk, LKML , Thomas Gleixner , Will Deacon , Geert Uytterhoeven , Ingo Molnar , Andrew Morton Subject: Re: [PATCH] compiler-gcc: get back Clang build Message-ID: <20180822235722.GA27485@nautica> References: <1534834088-15835-1-git-send-email-yamada.masahiro@socionext.com> <20180821123832.GA19034@nautica> <20180822041646.GA21716@nautica> <78396ba82562326f4b3a395a63e3e8dc38d608b2.camel@perches.com> <20180822043230.GA26654@nautica> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.21 (2010-09-15) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Nick Desaulniers wrote on Wed, Aug 22, 2018: > I'm currently testing a fix in > https://github.com/ClangBuiltLinux/linux/commit/1f89ae7622c26b8131f42f3a362d6ef41b88a595, > can you please share with me your steps to test/verify that the patch > fixes the issue for eBPF? I'll go talk to a co-worker who know more > about eBPF, but I've not yet done anything with it. Thanks for the link. The simplest way to test with bcc for me would probably be to fetch the example from their repo itself[1], whether you install bcc through your distro or compile it yourself. There are dozens of example programs in the tools/ directory of which you can just run any, if will try to compile the program embedded wihtin the example at runtime with clang. [1] https://github.com/iovisor/bcc (I just noticed fedora provides a bcc-tools package which provides these tools directly, so if you're lucky you can just install that and run examples in /usr/share/bcc/tools) In particular I get a couple of errors with your patch, I think it boils down to this one: ----- In file included from :3: In file included from /virtual/include/bcc/helpers.h:23: In file included from /lib/modules/4.18.0+/build/include/linux/log2.h:16: In file included from /lib/modules/4.18.0+/build/include/linux/bitops.h:18: In file included from /lib/modules/4.18.0+/build/arch/x86/include/asm/bitops.h:16: /lib/modules/4.18.0+/build/include/linux/compiler.h:217:3: error: expected expression barrier(); ^ /lib/modules/4.18.0+/build/include/linux/compiler-clang.h:43:20: note: expanded from macro 'barrier' #define barrier() (__asm__ __volatile__("" : : : "memory")) ^ ----- And removing the parenthesis around the expression seems to work, they weren't here in the compiler-gcc.h file in the previous version? There might be other defines the simple examples I ran do not use but from a quick glance it doesn't look like it, thank you for the split work! -- Dominique Martinet