Received: by 2002:a05:6358:53a8:b0:117:f937:c515 with SMTP id z40csp773819rwe; Fri, 14 Apr 2023 09:31:07 -0700 (PDT) X-Google-Smtp-Source: AKy350YKfuuPEx5TCXcLyhZ+h1eWEs+CWea5zkjQHnkWtzOX8Xaj9LPe7JtAapc+s3ez6fTU+W9Y X-Received: by 2002:a05:6a20:cb5c:b0:cb:af96:ace7 with SMTP id hd28-20020a056a20cb5c00b000cbaf96ace7mr5561494pzb.46.1681489866737; Fri, 14 Apr 2023 09:31:06 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1681489866; cv=none; d=google.com; s=arc-20160816; b=WkeahWyKag6URA2FbYGrZEcORfPJkVZcUEGEMRjZ1iwwREmP23vmifF87ChGR2iCaJ DCEiSSCeMn0BfmzPDFsvmr516c2kTDwYYkXduPAaXif7Z+CLu24NdZqGpzAJL4mdXW5+ 2Vi0HpQi1j5ZDpASCfwmNnRESOQx12OZlIQSa1BxiBDWyNzmUx1bAwQsv1J545m2HX72 5iaUz8Eep0LaLiiKmn61cvAQbY5hFknwfXcvdpL85qNhWqfTFxCa1ZtT4+hD7oi+S9gd DAWx6EP/kZyVAJWvv98S5Jbi6Mf0KvwknzXFlgonZLWo3rQyZGg24qQC+Wq2djxyZ3Wb BrbA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-transfer-encoding :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=wpNANq/ilARy9t0/XyiBw7GR8Agt/QoZqRUEJ1Ibgks=; b=Fdlc+Kvy4cIdVcu2GxTOyfIP/pI5P/CCXoiDNjGmwou3F1hEdZZomM7Cfo4OKKeIzO okuOBUKLOB1x+/Fbp+uA6TUXAOhbXGxf/aXLpPkjVopkItQtmmSxSUclqx9YQd6qYama 1+ReIB0Sji9BmxJWdIjF6AWeQUi//3zqjHmOMyQWIQ3a7DwaaVoDnp5Ms+Zr0p0rSfY0 N+bpzmkVVaeKWX/eJ4260EgCAtSs3ZcxEtZFr3TsyKtGEcXpPBhiuSQqnpvntBgrFFnE sCx0hiTQBp36QLbCwziq14iZrabOqWrKCOn3aBHA98m0MF/fdTuoxr9EUcjmQnmFb5xH qlhw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@canonical.com header.s=20210705 header.b=tnz4E6YM; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=canonical.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id m17-20020a656a11000000b0050f74bf6b3asi5676082pgu.700.2023.04.14.09.30.51; Fri, 14 Apr 2023 09:31:06 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@canonical.com header.s=20210705 header.b=tnz4E6YM; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=canonical.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229874AbjDNQ2h (ORCPT + 99 others); Fri, 14 Apr 2023 12:28:37 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36038 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229826AbjDNQ2c (ORCPT ); Fri, 14 Apr 2023 12:28:32 -0400 Received: from smtp-relay-internal-1.canonical.com (smtp-relay-internal-1.canonical.com [185.125.188.123]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id F03DCAD3C for ; Fri, 14 Apr 2023 09:28:30 -0700 (PDT) Received: from mail-ed1-f72.google.com (mail-ed1-f72.google.com [209.85.208.72]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by smtp-relay-internal-1.canonical.com (Postfix) with ESMTPS id 507AE3F46A for ; Fri, 14 Apr 2023 16:28:27 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=canonical.com; s=20210705; t=1681489707; bh=wpNANq/ilARy9t0/XyiBw7GR8Agt/QoZqRUEJ1Ibgks=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:In-Reply-To; b=tnz4E6YMpVSniUVt0R9McYBT94ELiDlQIO0ILVmFpTp/zwbFZtoN4aWepf5SKhHrP rCDERBD6dY0jEoVyRfI1gRnagFTn1ayrCtqRgUrqolaKUwybWOf4feKhH3sbeQkDac 8ebQ2PU3tb13nt2Ty7aT/7St1XnFlP7D2Psl03osItrOyx5GY32Z8Aa9JCFDgZbtTV OOSUYCtzaFMfvVF82Bm7nZW1/6HwjnIfBjR+e6qMngF2ReOtEwbFZeMKoP7l6d+5am KXFDGh+X0/sgdpbPB21AVkUdDMqq+iyCmBmPS3awFMGlE5Pu2e8bjMUehX/yFYBuHw EBoc+7MUrRjwg== Received: by mail-ed1-f72.google.com with SMTP id 4fb4d7f45d1cf-5067227e973so1015346a12.0 for ; Fri, 14 Apr 2023 09:28:27 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1681489705; x=1684081705; h=in-reply-to:content-transfer-encoding:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=wpNANq/ilARy9t0/XyiBw7GR8Agt/QoZqRUEJ1Ibgks=; b=UxKuZlHhHFyHJNex5PhZl5lpLc3j/jjkRHD7JkBqtksWFxu5IL8YPLMTWndGBU7k4I MyKmwzoMW3WGp8VOXer1PSbOsiOBYZyFj0SGkjiag8fXyH0hIn5LNkBLa14lTYJ2OO/J LkjB5dbNdaa9XwZGDLnARSa+1rSvRyi4yOXHsEp2aIJHBLyYVfE80kNmLLTHe5m5o3Ns tTaJsSXOjFw3yxNYQAih8oTSrYS/942HoBSyQT6EpvYo9X20TfMY+pwlNtTrQCec2lzR wDAHmWwCWViJYOUIEzSfMNYWJA5WeDEH3wtXIq6fInfvtu+97ef9bdCBzZV67Q8TOVN8 lwkA== X-Gm-Message-State: AAQBX9f2wHhl2calQMB5h/XSg8w/Oa4NIXPS4Zya6GbETUY9U9TC6xGw Fe92Cr7VbM7MEpFbfZXIMfVzHftZlHTykYQdUjpMqEeVlNLkwaHqmfgPXyTTwtvjkX3RdCbQJOW 0lzPs6MbV51FJqFzYedgzQS9dtriNFz2Pncm/Fwy2KA== X-Received: by 2002:aa7:c954:0:b0:505:513f:3d2d with SMTP id h20-20020aa7c954000000b00505513f3d2dmr7043313edt.40.1681489705619; Fri, 14 Apr 2023 09:28:25 -0700 (PDT) X-Received: by 2002:aa7:c954:0:b0:505:513f:3d2d with SMTP id h20-20020aa7c954000000b00505513f3d2dmr7043286edt.40.1681489705339; Fri, 14 Apr 2023 09:28:25 -0700 (PDT) Received: from localhost (uk.sesame.canonical.com. [185.125.190.60]) by smtp.gmail.com with ESMTPSA id q10-20020a056402032a00b004bd1fe2cc02sm2281873edw.16.2023.04.14.09.28.24 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 14 Apr 2023 09:28:25 -0700 (PDT) Date: Fri, 14 Apr 2023 18:28:24 +0200 From: Andrea Righi To: Ilya Leoshkevich Cc: Alexei Starovoitov , Alexei Starovoitov , Daniel Borkmann , Andrii Nakryiko , Martin KaFai Lau , Song Liu , Yonghong Song , John Fastabend , KP Singh , Hao Luo , Jiri Olsa , Mykola Lysenko , Shuah Khan , Nathan Chancellor , Nick Desaulniers , Tom Rix , Paolo Pisati , bpf , "open list:KERNEL SELFTEST FRAMEWORK" , clang-built-linux , LKML Subject: Re: [PATCH] selftests/bpf: ignore pointer types check with clang Message-ID: References: <20230412095912.188453-1-andrea.righi@canonical.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Apr 14, 2023 at 06:15:38PM +0200, Ilya Leoshkevich wrote: > On Fri, Apr 14, 2023 at 08:15:03AM +0200, Andrea Righi wrote: > > On Thu, Apr 13, 2023 at 09:56:00PM -0700, Alexei Starovoitov wrote: > > > On Wed, Apr 12, 2023 at 2:59 AM Andrea Righi wrote: > > > > > > > > Building bpf selftests with clang can trigger errors like the following: > > > > > > > > CLNG-BPF [test_maps] bpf_iter_netlink.bpf.o > > > > progs/bpf_iter_netlink.c:32:4: error: incompatible pointer types assigning to 'struct sock *' from 'struct sock___17 *' [-Werror,-Wincompatible-pointer-types] > > > > s = &nlk->sk; > > > > ^ ~~~~~~~~ > > > > 1 error generated. > > > > > > I cannot reproduce this and BPF CI doesn't complain about it either. > > > What kind of clang do you use? > > > Some special version and build flags? > > > > I'm using Ubuntu clang version 15.0.7 (Ubuntu 23.04), no special build > > flag (unless Ubuntu enables some different default flags, but it > > shouldn't be the case... I'll double check). > > > > -Andrea > > Hi, > > FWIW, I see similar errors when I don't use recent pahole. I'm using pahole v1.24. -Andrea