Received: by 2002:a25:1506:0:0:0:0:0 with SMTP id 6csp535690ybv; Wed, 19 Feb 2020 04:32:04 -0800 (PST) X-Google-Smtp-Source: APXvYqwbvp0tojukkPM2nmG6gWDsYjU4bDC+iKYV3b8/UqoPhNb4THYUWOgOcek9gClxq3OjfR9s X-Received: by 2002:aca:1c0d:: with SMTP id c13mr4225568oic.44.1582115524773; Wed, 19 Feb 2020 04:32:04 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1582115524; cv=none; d=google.com; s=arc-20160816; b=YpOY3KjpjOr5seBUxSMY+Z5zr0D5cfr0rZCSktLQ68tftSlIqaAuzHAceuhW3IluBx W+p7SZfLgJ2gRmb+zcMXQiyCAmWygxHIkrvVf1c63JpP6aMupD+3bH7cCe3WitEAvBdT Acl5CcfNIGnDsr2EzED2hjQJr/UTBEDTNIZBPkmkA4tPDIptoObkPR2qn/GNJeHf2iUM JJmKBcsrcr0rhVb4gFzFSg0t3XdxBbWKxc/7io8vQ7SdPuhPu1BwzaJbcYaOLEdymWXW uIPd4Vj2WWl0ZZS8WZS0h1litrjdkDFO42FExg73wrawh1sQkpnW/+33sLfuqpmc+5iA OA9g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :message-id:subject:cc:to:from:date:dkim-signature; bh=FlQCARZ1FbwRbU2uJuzeHmBQSyIgJVmrLI3UOgbvB+8=; b=LG1c16nn+oDMlONu3AFqPwHfhGvO8qQLwp4k8kt8gTrpytuMNIcx9c0uh5bHLFb18v f9ya92jNVixnAL+a3rPmXnsj1k8meeBU7uvw7XdCOgVFedL8WQ2HbsL5UdNBPI+Q6P6j Yl9gddnDFpEKbFNnE695ZdXPtpsP5Ao3QjUNyGOgLwX2v04JCYcenEbMihK2dBcngLdz K6Nxi1VtGRyzQB9v3QiBEE1oQc3jeNf4MUH6hl/b8JHG5ZwraGKbU49IPxy4uUlRB1f2 peHXHb/kLCOIjpLeH3A+img8TGia6nHud/hG8HuJ7DeAK/D9VPuhD0zuvhcYAL13jhg3 TIwA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=QDp5sC3r; 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=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id p7si1075501ota.299.2020.02.19.04.31.51; Wed, 19 Feb 2020 04:32:04 -0800 (PST) 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=@redhat.com header.s=mimecast20190719 header.b=QDp5sC3r; 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=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727469AbgBSMab (ORCPT + 99 others); Wed, 19 Feb 2020 07:30:31 -0500 Received: from us-smtp-delivery-1.mimecast.com ([205.139.110.120]:21558 "EHLO us-smtp-1.mimecast.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726491AbgBSMab (ORCPT ); Wed, 19 Feb 2020 07:30:31 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1582115430; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=FlQCARZ1FbwRbU2uJuzeHmBQSyIgJVmrLI3UOgbvB+8=; b=QDp5sC3rmNx8RQcPsOP68t+WeC9RkcsbljuXBTgMGWK55HNWSP5IkUoEL9PZaNObq/N6rE mfvj//PZk7hKtNTjnocwQLFQajk12Bnun5uOySwxYUm5OrrJCt/8YHT9PC0Xwr+1xAyGHd djNGH3gYWbULIxbQJQXKjrtsegL6irY= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-208-Q4_uj_NHPDK7p6ZkD_KXvA-1; Wed, 19 Feb 2020 07:30:24 -0500 X-MC-Unique: Q4_uj_NHPDK7p6ZkD_KXvA-1 Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id DB191107ACCC; Wed, 19 Feb 2020 12:30:22 +0000 (UTC) Received: from carbon (ovpn-200-26.brq.redhat.com [10.40.200.26]) by smtp.corp.redhat.com (Postfix) with ESMTP id 4B7E819E9C; Wed, 19 Feb 2020 12:30:13 +0000 (UTC) Date: Wed, 19 Feb 2020 13:30:12 +0100 From: Jesper Dangaard Brouer To: Andrii Nakryiko Cc: brouer@redhat.com, Andrii Nakryiko , "netdev@vger.kernel.org" , BPF-dev-list , Alexei Starovoitov , Daniel Borkmann , David Miller , LKML , Greg Kroah-Hartman , Anders Roxell , Toke =?UTF-8?B?SMO4aWxhbmQtSsO4cmdlbnNlbg==?= Subject: Kernel 5.5.4 build fail for BPF-selftests with latest LLVM Message-ID: <20200219133012.7cb6ac9e@carbon> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Scanned-By: MIMEDefang 2.79 on 10.5.11.11 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Andrii, Downloaded tarball for kernel release 5.5.4, and I cannot compile tools/testing/selftests/bpf/ with latest LLVM release version 9. Looking closer at the build error messages, I can see that this is caused by using LLVM features that (I assume) will be avail in release 10. I find it very strange that we can release a kernel that have build dependencies on a unreleased version of LLVM. I'm willing to help out, such that we can do either version or feature detection, to either skip compiling specific test programs or at least give users a proper warning of they are using a too "old" LLVM version. I love the new LLVM BTF features, but we cannot break users/CI-systems that wants to run the BPF-selftests. -- Best regards, Jesper Dangaard Brouer MSc.CS, Principal Kernel Engineer at Red Hat LinkedIn: http://www.linkedin.com/in/brouer http://releases.llvm.org/download.html Compile error message: unknown builtin '__builtin_preserve_field_info' Full: make -C /home/jbrouer/build/linux-5.5.4/tools/lib/bpf OUTPUT=/home/jbrouer/build/linux-5.5.4/tools/testing/selftests/bpf/ make[1]: Entering directory '/home/jbrouer/build/linux-5.5.4/tools/lib/bpf' make[1]: Leaving directory '/home/jbrouer/build/linux-5.5.4/tools/lib/bpf' (clang -I. -I/home/jbrouer/build/linux-5.5.4/tools/testing/selftests/bpf -g -D__TARGET_ARCH_x86 -mlittle-endian -I. -I./include/uapi -I/home/jbrouer/build/linux-5.5.4/tools/include/uapi -I/home/jbrouer/build/linux-5.5.4/tools/lib/bpf -I/home/jbrouer/build/linux-5.5.4/tools/testing/selftests/usr/include -idirafter /usr/local/include -idirafter /usr/lib64/clang/9.0.0/include -idirafter /usr/include -Wno-compare-distinct-pointer-types -O2 -target bpf -emit-llvm -c progs/test_core_reloc_bitfields_probed.c -o - || echo "BPF obj compilation failed") | llc -mattr=dwarfris -march=bpf -mcpu=probe -mattr=+alu32 -filetype=obj -o /home/jbrouer/build/linux-5.5.4/tools/testing/selftests/bpf/test_core_reloc_bitfields_probed.o progs/test_core_reloc_bitfields_probed.c:47:13: error: use of unknown builtin '__builtin_preserve_field_info' [-Wimplicit-function-declaration] out->ub1 = BPF_CORE_READ_BITFIELD_PROBED(in, ub1); ^ /home/jbrouer/build/linux-5.5.4/tools/lib/bpf/bpf_core_read.h:52:2: note: expanded from macro 'BPF_CORE_READ_BITFIELD_PROBED' __CORE_BITFIELD_PROBE_READ(&val, s, field); \ ^ /home/jbrouer/build/linux-5.5.4/tools/lib/bpf/bpf_core_read.h:28:10: note: expanded from macro '__CORE_BITFIELD_PROBE_READ' __CORE_RELO(src, fld, BYTE_SIZE), \ ^ /home/jbrouer/build/linux-5.5.4/tools/lib/bpf/bpf_core_read.h:23:2: note: expanded from macro '__CORE_RELO' __builtin_preserve_field_info((src)->field, BPF_FIELD_##info) ^ progs/test_core_reloc_bitfields_probed.c:48:13: error: use of unknown builtin '__builtin_preserve_field_info' [-Wimplicit-function-declaration] out->ub2 = BPF_CORE_READ_BITFIELD_PROBED(in, ub2); ^ /home/jbrouer/build/linux-5.5.4/tools/lib/bpf/bpf_core_read.h:52:2: note: expanded from macro 'BPF_CORE_READ_BITFIELD_PROBED' __CORE_BITFIELD_PROBE_READ(&val, s, field); \ ^ /home/jbrouer/build/linux-5.5.4/tools/lib/bpf/bpf_core_read.h:28:10: note: expanded from macro '__CORE_BITFIELD_PROBE_READ' __CORE_RELO(src, fld, BYTE_SIZE), \ ^ /home/jbrouer/build/linux-5.5.4/tools/lib/bpf/bpf_core_read.h:23:2: note: expanded from macro '__CORE_RELO' __builtin_preserve_field_info((src)->field, BPF_FIELD_##info) ^ progs/test_core_reloc_bitfields_probed.c:49:13: error: use of unknown builtin '__builtin_preserve_field_info' [-Wimplicit-function-declaration] out->ub7 = BPF_CORE_READ_BITFIELD_PROBED(in, ub7); ^ /home/jbrouer/build/linux-5.5.4/tools/lib/bpf/bpf_core_read.h:52:2: note: expanded from macro 'BPF_CORE_READ_BITFIELD_PROBED' __CORE_BITFIELD_PROBE_READ(&val, s, field); \ ^ /home/jbrouer/build/linux-5.5.4/tools/lib/bpf/bpf_core_read.h:28:10: note: expanded from macro '__CORE_BITFIELD_PROBE_READ' __CORE_RELO(src, fld, BYTE_SIZE), \ ^ /home/jbrouer/build/linux-5.5.4/tools/lib/bpf/bpf_core_read.h:23:2: note: expanded from macro '__CORE_RELO' __builtin_preserve_field_info((src)->field, BPF_FIELD_##info) ^ progs/test_core_reloc_bitfields_probed.c:50:13: error: use of unknown builtin '__builtin_preserve_field_info' [-Wimplicit-function-declaration] out->sb4 = BPF_CORE_READ_BITFIELD_PROBED(in, sb4); ^ /home/jbrouer/build/linux-5.5.4/tools/lib/bpf/bpf_core_read.h:52:2: note: expanded from macro 'BPF_CORE_READ_BITFIELD_PROBED' __CORE_BITFIELD_PROBE_READ(&val, s, field); \ ^ /home/jbrouer/build/linux-5.5.4/tools/lib/bpf/bpf_core_read.h:28:10: note: expanded from macro '__CORE_BITFIELD_PROBE_READ' __CORE_RELO(src, fld, BYTE_SIZE), \ ^ /home/jbrouer/build/linux-5.5.4/tools/lib/bpf/bpf_core_read.h:23:2: note: expanded from macro '__CORE_RELO' __builtin_preserve_field_info((src)->field, BPF_FIELD_##info) ^ progs/test_core_reloc_bitfields_probed.c:51:14: error: use of unknown builtin '__builtin_preserve_field_info' [-Wimplicit-function-declaration] out->sb20 = BPF_CORE_READ_BITFIELD_PROBED(in, sb20); ^ /home/jbrouer/build/linux-5.5.4/tools/lib/bpf/bpf_core_read.h:52:2: note: expanded from macro 'BPF_CORE_READ_BITFIELD_PROBED' __CORE_BITFIELD_PROBE_READ(&val, s, field); \ ^ /home/jbrouer/build/linux-5.5.4/tools/lib/bpf/bpf_core_read.h:28:10: note: expanded from macro '__CORE_BITFIELD_PROBE_READ' __CORE_RELO(src, fld, BYTE_SIZE), \ ^ /home/jbrouer/build/linux-5.5.4/tools/lib/bpf/bpf_core_read.h:23:2: note: expanded from macro '__CORE_RELO' __builtin_preserve_field_info((src)->field, BPF_FIELD_##info) ^ progs/test_core_reloc_bitfields_probed.c:52:13: error: use of unknown builtin '__builtin_preserve_field_info' [-Wimplicit-function-declaration] out->u32 = BPF_CORE_READ_BITFIELD_PROBED(in, u32); ^ /home/jbrouer/build/linux-5.5.4/tools/lib/bpf/bpf_core_read.h:52:2: note: expanded from macro 'BPF_CORE_READ_BITFIELD_PROBED' __CORE_BITFIELD_PROBE_READ(&val, s, field); \ ^ /home/jbrouer/build/linux-5.5.4/tools/lib/bpf/bpf_core_read.h:28:10: note: expanded from macro '__CORE_BITFIELD_PROBE_READ' __CORE_RELO(src, fld, BYTE_SIZE), \ ^ /home/jbrouer/build/linux-5.5.4/tools/lib/bpf/bpf_core_read.h:23:2: note: expanded from macro '__CORE_RELO' __builtin_preserve_field_info((src)->field, BPF_FIELD_##info) ^ progs/test_core_reloc_bitfields_probed.c:53:13: error: use of unknown builtin '__builtin_preserve_field_info' [-Wimplicit-function-declaration] out->s32 = BPF_CORE_READ_BITFIELD_PROBED(in, s32); ^ /home/jbrouer/build/linux-5.5.4/tools/lib/bpf/bpf_core_read.h:52:2: note: expanded from macro 'BPF_CORE_READ_BITFIELD_PROBED' __CORE_BITFIELD_PROBE_READ(&val, s, field); \ ^ /home/jbrouer/build/linux-5.5.4/tools/lib/bpf/bpf_core_read.h:28:10: note: expanded from macro '__CORE_BITFIELD_PROBE_READ' __CORE_RELO(src, fld, BYTE_SIZE), \ ^ /home/jbrouer/build/linux-5.5.4/tools/lib/bpf/bpf_core_read.h:23:2: note: expanded from macro '__CORE_RELO' __builtin_preserve_field_info((src)->field, BPF_FIELD_##info) ^ 7 errors generated. llc: error: llc: :1:1: error: expected top-level entity BPF obj compilation failed ^ make: *** [Makefile:281: /home/jbrouer/build/linux-5.5.4/tools/testing/selftests/bpf/test_core_reloc_bitfields_probed.o] Error 1