Received: by 2002:a05:6358:53a8:b0:117:f937:c515 with SMTP id z40csp111070rwe; Thu, 13 Apr 2023 23:17:03 -0700 (PDT) X-Google-Smtp-Source: AKy350aXDBpsR5R4A1Hiely3lGT3oTeLPG5qOJdM0R4aYa5qqw+2IX+TGc6RFS3+fIB2xXHv8DyM X-Received: by 2002:a17:90b:48a:b0:246:a599:1ccd with SMTP id bh10-20020a17090b048a00b00246a5991ccdmr4581424pjb.16.1681453023700; Thu, 13 Apr 2023 23:17:03 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1681453023; cv=none; d=google.com; s=arc-20160816; b=XOqFM7r8Mhn9CZnyxaBMr/rNiESIsqrq8zhhW2H7CpiEbfAZfuNcEbk9oof+n9DUlz L95RN/Cg19ZRSvskTYnoRnx5aQEWlQPoFm7x6OWAYiMpMFzrgUUdwpJ953TUgVys0ysW G+3b2ubwXIcE1TgYQ/l1TTcw4jY99uYlHSeDDYWdUq2q/WeR+7TAHt29cZMTPLb3tWVZ 6cBUS9jZvSQf8znJt32BU9r6YY9Zp78cIcV6OnhZDmFDY0yqHLT8QgUyXn05ZWXpSTNg CYoRIv5MuZH5hplPNQ3VAHHHQMh/3nTfjVL5osUcbZBm/UFnB8yjl99968nztMo+LiqR gdmA== 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=4x1ielA7OU/wWOjnJ79+3XpTDh/ue6rRtFlaiIdzFqA=; b=SVngk5Rx/KtUf136Iys0R0pI8oOFu03eUZ7LFEtFEWj2isx8GtWbGyC3b76J8nD1zU iVOg7ht3P7DqP+w4d9IcwzGCcyldLtT3y7yXgP5I7yMyQx3yjUAhEGIIgQl5ywDMjBp0 cX5DuzMLE9LC66yeqiBz/qlOqRmITQHlC3c51WAXXvQkOKpVeLH7zIXKmxX5y460mWFW vRijvqKt2qS+mBQQs9l0QquRQk2REaeRVMqvaRTsmGzORVTLNxeFXGen3f9ThjFCk4Vb hXyrG09bnbMMO1WtVIUUpeUgE6eDq9OxHS85pBoJhhLLCQ6DVGpZt4E7p3vS6t1EDips 9Yyg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@canonical.com header.s=20210705 header.b="JDwuh2/L"; 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 k3-20020a17090a39c300b00233f3034302si6327281pjf.46.2023.04.13.23.16.50; Thu, 13 Apr 2023 23:17:03 -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="JDwuh2/L"; 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 S230054AbjDNGPR (ORCPT + 99 others); Fri, 14 Apr 2023 02:15:17 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47778 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230056AbjDNGPP (ORCPT ); Fri, 14 Apr 2023 02:15:15 -0400 Received: from smtp-relay-internal-0.canonical.com (smtp-relay-internal-0.canonical.com [185.125.188.122]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 144C25271 for ; Thu, 13 Apr 2023 23:15:14 -0700 (PDT) Received: from mail-wm1-f70.google.com (mail-wm1-f70.google.com [209.85.128.70]) (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-0.canonical.com (Postfix) with ESMTPS id A33B23F447 for ; Fri, 14 Apr 2023 06:15:09 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=canonical.com; s=20210705; t=1681452909; bh=4x1ielA7OU/wWOjnJ79+3XpTDh/ue6rRtFlaiIdzFqA=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:In-Reply-To; b=JDwuh2/Lfz1Jwh+sCxY4uiruBUrTtDijWoPVS4AW/NC5YCPwJiojL8eqriGtg4Mxm Uq/BKTre6AbPF9dDCPktc0hevj7kQ6Mhw5OHi4MHAaqZPxJfzw+pWw7EVoOX7wS2vJ kw8TMF85TTzG7fu7Ffx6T14HwmjUijh6ib9/DnBP2jdg1JTVHR558+etFN6u7YL88O aUxTEVf09T10s3FnJ/7OQR8O38l5dOLCKYZ4wjeyRUALqQFZWWs3eFPXBTR9oDjyHz rH2ongiXhLFmJz+cXESXkDz7LlJp/HlyeaunLiVL8WvQzsamoGyzhvzvQG2zXJdEF5 ClQV+vpBYhcVg== Received: by mail-wm1-f70.google.com with SMTP id w16-20020a05600c475000b003f082eecdcaso6676960wmo.6 for ; Thu, 13 Apr 2023 23:15:09 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1681452905; x=1684044905; 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=4x1ielA7OU/wWOjnJ79+3XpTDh/ue6rRtFlaiIdzFqA=; b=YwRT5xaIj/JqcLkHTbbCyt8ZU1Oc+kMTAjEGT0igtrMldPQOlNhWMst0MG2E4dSFev 0DcXuruD+T9zhBLup+hnY5pCUUAVGJyI4HSmIulIIhUG+zs7p4XZj3q+Iupvi5qyHG0k nPeyvRL1gcwhmk07bdPygLGbnj7yMrAj+kMbqWV8OMiGjtYH1qZm6EsEEROXAnwmma4h P5qqor4ggtDf0EluLYP3jN0VUPAYql7muVF/pQ4uHwgxY5f91JDsj3JKwboMS4U9yCiz 19RWCqLt5007umNZW68Kn7XYg5FJ1AtPjwtKKKtu8ktCpNv4ZmVX+AunUwRED6X1Thq/ kfWQ== X-Gm-Message-State: AAQBX9coUWsgAS7+moQwNMLcisPRoyc2zRW03m5yR8VumOhV0VMmXN/i yg5ugEfGt2gDSOsGvQSQ6KaLo4Wy8lJRNqCRhGvqb31SMm9ZgoYWD6QDff9uodtEPWbIuYQxBFr ZwpEeQhXdqPPniyEFXRa9iV2sjluAsRcwoX/qWpiVDA== X-Received: by 2002:a5d:4949:0:b0:2ef:b977:ee3a with SMTP id r9-20020a5d4949000000b002efb977ee3amr3214594wrs.34.1681452904876; Thu, 13 Apr 2023 23:15:04 -0700 (PDT) X-Received: by 2002:a5d:4949:0:b0:2ef:b977:ee3a with SMTP id r9-20020a5d4949000000b002efb977ee3amr3214570wrs.34.1681452904560; Thu, 13 Apr 2023 23:15:04 -0700 (PDT) Received: from localhost (uk.sesame.canonical.com. [185.125.190.60]) by smtp.gmail.com with ESMTPSA id x17-20020a5d4911000000b002e55cc69169sm2794289wrq.38.2023.04.13.23.15.04 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 13 Apr 2023 23:15:04 -0700 (PDT) Date: Fri, 14 Apr 2023 08:15:03 +0200 From: Andrea Righi To: Alexei Starovoitov Cc: 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 autolearn=unavailable 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 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