Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp3478796ybl; Mon, 27 Jan 2020 04:57:00 -0800 (PST) X-Google-Smtp-Source: APXvYqyAfTNB69oYU6eBEuZ94Ehp87QHEiw+f6mIF+aqia8BRv4HAvjXq/0coKgKUdBjYUMk4Qil X-Received: by 2002:aca:1903:: with SMTP id l3mr7420322oii.16.1580129820415; Mon, 27 Jan 2020 04:57:00 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1580129820; cv=none; d=google.com; s=arc-20160816; b=T88P312DoCb1QsM0zc+ku44M+rrp+fDLNncMD+yS4/YtLkgi6HxLb20LTKgioTBDFc 8AGWnAnvyivJ4azziEFSuWdWPPMVouUk1mWZvc2+LR4RLQbmg8J8r/DFidJLvqeik1ci KU+vBt8zOjzRFrzd5N8JzSR/CWHdc+G3h5BSNbzmmi/oBMd/0ikhWcyOAQn1IfFCAEQU if+c+Kt5MUyPmnak9Y9CAS12dquOCYHZDZ2XNaExZwX2Qe1mC+h8YO186wFvPStX0bVt v3yaAFeKrHoTyGttdU+LfPXH8zSlhOzZQ4vInsbcdBfYn9MUmd6dWnw9SsSgbdlx8Cya wdXg== 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 :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject; bh=ct9EXffNhYV79DpOZoHIW3hhaZNQ6+18s75dI4RnA0Q=; b=KRroCc3gIVVwRZ97k95KZdVBgND+ChWDc+iwEfnXzCKT1U4/8T/hhzfDre4CI++Y+r bRgTxca9oCczCJYZzlgMLT2ZO/PKj/SPHDydlYqAVsR4lipiVWyJH+nii6UUo6CSWYwv OEHOgF8nzf1IwcqyS4guVn19q5zDRxs3TaKE+T/Ahq9N7cG5nwLYiUN3XE5dtA21Zdnr i27eiaaBFV0k/hOd3RusiRh+2Bi2iLbf7YsTp0Su2PYxiZZ5NS6rxtos2e3BQ9YM5RGJ ajJLet6nUZOxd1M8YucWZAVWNX3GHGDnWHkvkGY+Cb5fUTEMa72oynsBjcE0lA6SxH+L gm4Q== 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 d23si3325178oij.270.2020.01.27.04.56.49; Mon, 27 Jan 2020 04:57:00 -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; 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 S1730235AbgA0LhH (ORCPT + 99 others); Mon, 27 Jan 2020 06:37:07 -0500 Received: from www62.your-server.de ([213.133.104.62]:50590 "EHLO www62.your-server.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725990AbgA0LhH (ORCPT ); Mon, 27 Jan 2020 06:37:07 -0500 Received: from sslproxy06.your-server.de ([78.46.172.3]) by www62.your-server.de with esmtpsa (TLSv1.2:DHE-RSA-AES256-GCM-SHA384:256) (Exim 4.89_1) (envelope-from ) id 1iw2H7-0000Fy-9E; Mon, 27 Jan 2020 12:09:49 +0100 Received: from [2001:1620:665:0:5795:5b0a:e5d5:5944] (helo=linux-3.fritz.box) by sslproxy06.your-server.de with esmtpsa (TLSv1.3:TLS_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1iw2H6-00054j-PT; Mon, 27 Jan 2020 12:09:48 +0100 Subject: Re: [PATCH] selftests/bpf: Elide a check for LLVM versions that can't compile it To: =?UTF-8?Q?Toke_H=c3=b8iland-J=c3=b8rgensen?= , Palmer Dabbelt , linux-kselftest@vger.kernel.org, netdev@vger.kernel.org, bpf@vger.kernel.org Cc: shuah@kernel.org, ast@kernel.org, kafai@fb.com, songliubraving@fb.com, yhs@fb.com, andriin@fb.com, john.fastabend@gmail.com, linux-kernel@vger.kernel.org, clang-built-linux@googlegroups.com, kernel-team@android.com, Jesper Dangaard Brouer References: <20200124180839.185837-1-palmerdabbelt@google.com> <87ftg4fvmo.fsf@toke.dk> From: Daniel Borkmann Message-ID: Date: Mon, 27 Jan 2020 12:09:47 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.7.2 MIME-Version: 1.0 In-Reply-To: <87ftg4fvmo.fsf@toke.dk> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 8bit X-Authenticated-Sender: daniel@iogearbox.net X-Virus-Scanned: Clear (ClamAV 0.101.4/25707/Sun Jan 26 12:40:28 2020) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 1/24/20 9:27 PM, Toke Høiland-Jørgensen wrote: > Palmer Dabbelt writes: > >> The current stable LLVM BPF backend fails to compile the BPF selftests >> due to a compiler bug. The bug has been fixed in trunk, but that fix >> hasn't landed in the binary packages I'm using yet (Fedora arm64). >> Without this workaround the tests don't compile for me. >> >> This patch triggers a preprocessor warning on LLVM versions that >> definitely have the bug. The test may be conservative (ie, I'm not sure >> if 9.1 will have the fix), but it should at least make the current set >> of stable releases work together. >> >> See https://reviews.llvm.org/D69438 for more information on the fix. I >> obtained the workaround from >> https://lore.kernel.org/linux-kselftest/aed8eda7-df20-069b-ea14-f06628984566@gmail.com/T/ >> >> Fixes: 20a9ad2e7136 ("selftests/bpf: add CO-RE relocs array tests") >> Signed-off-by: Palmer Dabbelt > > Having to depend on the latest trunk llvm to compile the selftests is > definitely unfortunate. I believe there are some tests that won't work > at all without trunk llvm (the fentry/fexit stuff comes to mind; > although I'm not sure if they'll fail to compile, just fail to run?). > Could we extend this type of checking to any such case? Yeah, Palmer, are you saying that with this fix you're able to run through all of the BPF test suite on bpf-next with clang/llvm 9.0? So far policy has been that tests run always on latest trunk to also cover llvm changes in BPF backend to make sure there are no regressions there. OT: perhaps we should have a 'make deps' target in BPF selftests to make it easier for developers to spin up a latest test env to run selftests in.