Received: by 2002:a25:1506:0:0:0:0:0 with SMTP id 6csp913275ybv; Thu, 20 Feb 2020 09:28:01 -0800 (PST) X-Google-Smtp-Source: APXvYqwnjkS7I4xRA5cIHLbQsaAeiPiIZvr6jsBbueWgCOM1ri2ZdEXQeSClmmC1S19TEofcSESd X-Received: by 2002:aca:3857:: with SMTP id f84mr2732459oia.150.1582219681726; Thu, 20 Feb 2020 09:28:01 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1582219681; cv=none; d=google.com; s=arc-20160816; b=tz1WkfYmFtxM9aoHJ8p73xllsONh84KD6wItTgQeP9kIW1GVFfW/owfTsiXiGFA1cY E7PE/cTl9lT8/1efWEr+EwXj+Icg0bFcIQYYKBjrTpk560G6UarX8E4TJ7XaRarX5WMq pvfBc7xF9xePPTwx9pQFVGBGed47rjmxRuSeCaE7DoGMzrNDsJhx50e7ajeU1PB0KCzH BFpgksOROuBHG/hmNPBiCrxsS+TKFikmd1m/Xurq2OHBs3L7wMYFyhKTCFROmiFo8Kmf AxcZrvuYrimbigTAT3a80FuZ3NC283ytx28q9HQ0Jz3dc/sS8qb9UdB9xTzIs6iTDH9E IDiQ== 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-transfer-encoding:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=rd9V9UVot8QU4dxlhd2hiItv4T8JnKu0tmvJU9d76Mc=; b=UcUz2vsCsqsVsRschWge4cYeJliAklS55JiUn/Qib8RVTBpVq8aSzvij4izF5syOXm 4XINiax+mFMh6HhlL6XPMumjPuGX2RzuOKTfWCPu9MF9L7LWzgq9PEXYHxiS9B7GUMOF pseonNPYNYhI0pZW13DSr9Plj7xzRxiVxNpinPBb34W1Ha6N+t40noQJDUaGkV0Rx0TV gtsBzIdPiM5tUc7B2t7rL5dyShCs1Iba7Bbk8bKd/tyRzvmdd5dFMT1ePSoYcjVtd6oW m7ofG5Ek0NGzU2xriU6ha3qsmEZhoLjLjLeKvT7mVCZWKii4Kcu5bj9uGt6rb3mhNaBs P/8g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b="DVJVOjF/"; 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=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id s22si2929801oij.35.2020.02.20.09.27.49; Thu, 20 Feb 2020 09:28:01 -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=@gmail.com header.s=20161025 header.b="DVJVOjF/"; 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=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728978AbgBTR0T (ORCPT + 99 others); Thu, 20 Feb 2020 12:26:19 -0500 Received: from mail-pl1-f196.google.com ([209.85.214.196]:46991 "EHLO mail-pl1-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728386AbgBTR0R (ORCPT ); Thu, 20 Feb 2020 12:26:17 -0500 Received: by mail-pl1-f196.google.com with SMTP id y8so1789999pll.13; Thu, 20 Feb 2020 09:26:17 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:content-transfer-encoding:in-reply-to :user-agent; bh=rd9V9UVot8QU4dxlhd2hiItv4T8JnKu0tmvJU9d76Mc=; b=DVJVOjF/NpMyaCti9AT2IcWEgTOh97ItS+8v/GkN/axFHO6cpdKDcNjVaIYzNsuW4d pWVzXr8VWbeXYsSazvJEpGEylMBOahWyJ4WkjtDLIB2j7HIy6OgrIKmpVWyWmhsWa/y1 6UCKir+Oze+XMJ6f94yZ3zOWO86YlzTcvXmwK5CyBXMR4Pt2nNef7jVpLkvk/xLN5FRO EiHyf9bVz8GkJ7LlFTTAUxMHwqGZMPls8OY2nXQ9iWn4OUMD145nBXumjibd4qk3sJGK UgPkVby+Eqk8+08do88I0FqUrgGwFmu047iGhPxL4qKsTQxYoVkh3PfaTwgGuq3TA/sN 4Y1g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:content-transfer-encoding :in-reply-to:user-agent; bh=rd9V9UVot8QU4dxlhd2hiItv4T8JnKu0tmvJU9d76Mc=; b=qC9plWDVAz+9o5T2Usn6Bv+YB4TEdvT16ihDnZp3QTTZGTBfy22JBDzWm5DwSO5xmF BV2qnhmJxPdFMZW/ZjGavHEBcPMFok07FJ5obn209XJ7MglBFl0UyN2/7kuiMEGXyMu6 uPkHqOKaXisS37ZqWwtpegUVkJ6RyFbiWDaa4sN96djKFU7jOCKL4jNNXYWJZ9wcTeut ZeET4qtoH5GYvs3lMa+brrmQR22hQ5zsMyqgCaMCG2fDkB65uel0W5jJrS+6c78Ugnvd Tr2tS+St6eZ9pkDqQ2BU92i042XKqdikYsmQAlTc6+VshdYGVLJWO48zxXafgDsLCpFA axGQ== X-Gm-Message-State: APjAAAVf2+ND9h3krY5n2rdzqZs9QkeWQqlgt5OR4d3oPvHQjCho0lze 0J4h6f+xkJZ8Uiipl1cwJSM= X-Received: by 2002:a17:902:fe13:: with SMTP id g19mr32897315plj.216.1582219576802; Thu, 20 Feb 2020 09:26:16 -0800 (PST) Received: from ast-mbp ([2620:10d:c090:500::5:f03d]) by smtp.gmail.com with ESMTPSA id c3sm177528pfj.159.2020.02.20.09.26.14 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 20 Feb 2020 09:26:15 -0800 (PST) Date: Thu, 20 Feb 2020 09:26:13 -0800 From: Alexei Starovoitov To: "Bird, Tim" Cc: Jesper Dangaard Brouer , shuah , Daniel =?utf-8?B?RMOtYXo=?= , Andrii Nakryiko , Andrii Nakryiko , "netdev@vger.kernel.org" , BPF-dev-list , Daniel Borkmann , David Miller , LKML , Greg Kroah-Hartman , Anders Roxell , Toke =?utf-8?Q?H=C3=B8iland-J=C3=B8rgensen?= , "open list:KERNEL SELFTEST FRAMEWORK" Subject: Re: Kernel 5.5.4 build fail for BPF-selftests with latest LLVM Message-ID: <20200220172612.7aqmiwrnizgsukvm@ast-mbp> References: <20200219180348.40393e28@carbon> <20200219192854.6b05b807@carbon> <20200219210609.20a097fb@carbon> <20200220002748.kpwvlz5xfmjm5fd5@ast-mbp> <4a26e6c6-500e-7b92-1e26-16e1e0233889@kernel.org> <20200220173740.7a3f9ad7@carbon> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: User-Agent: NeoMutt/20180223 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Feb 20, 2020 at 05:02:25PM +0000, Bird, Tim wrote: > > > > -----Original Message----- > > From: Jesper Dangaard Brouer > > > > On Wed, 19 Feb 2020 17:47:23 -0700 > > shuah wrote: > > > > > On 2/19/20 5:27 PM, Alexei Starovoitov wrote: > > > > On Wed, Feb 19, 2020 at 03:59:41PM -0600, Daniel D?az wrote: > > > >>> > > > >>> When I download a specific kernel release, how can I know what LLVM > > > >>> git-hash or version I need (to use BPF-selftests)? > > > > > > > > as discussed we're going to add documentation-like file that will > > > > list required commits in tools. > > > > This will be enforced for future llvm/pahole commits. > > > > > > > >>> Do you think it is reasonable to require end-users to compile their own > > > >>> bleeding edge version of LLVM, to use BPF-selftests? > > > > > > > > absolutely. > > Is it just the BPF-selftests that require the bleeding edge version of LLVM, > or do BPF features themselves need the latest LLVM. If the latter, then this > is quite worrisome, and I fear the BPF developers are getting ahead of themselves. > We don't usually have a kernel dependency on the latest compiler version (some > recent security fixes are an anomaly). In fact deprecating support for older compiler > versions has been quite slow and methodical over the years. > > It's quite dangerous to be baking stuff into the kernel that depends on features > from compilers that haven't even made it to release yet. > > I'm sorry, but I'm coming into the middle of this thread. Can you please explain > what the features are in the latest LLVM that are required for BPF-selftests? Above is correct. bpf kernel features do depend on the latest pahole and llvm features that did not make it into a release. That was the case for many years now and still the case. The first commit 8 years ago relied on something that can generate those instructions. For many years llvm was the only compiler that could generate them. Right now there is GCC backend as well. New features (like new instructions) depend on the compiler. selftests/bpf are not testing kernel's bpf features. They are testing the whole bpf ecosystem. They test llvm, pahole, libbpf, bpftool, and kernel together. Hence it's a requirement to install the latest pahole and llvm. When I'm talking about selftests/bpf I'm talking about all the tests in that directory combined. There are several unit tests scattered across repos. The unit tests for llvm bpf backend are inside llvm repo. selftests/bpf/test_verifier and test_maps are unit tests for the verifier and for maps. They are llvm independent. They test a combination of kernel and libbpf only. But majority of the selftests/bpf are done via test_progs which are the whole ecosystem tests.