Received: by 2002:a05:6358:53a8:b0:117:f937:c515 with SMTP id z40csp763095rwe; Fri, 14 Apr 2023 09:22:57 -0700 (PDT) X-Google-Smtp-Source: AKy350bd/KVf0h0LrNEA2+6x/U2mD9Kj7WmKArMRYVJ4xWsrwOF52hOVD69JZGFAViTe2PJxIuSB X-Received: by 2002:a05:6a00:99e:b0:63b:3e:cbee with SMTP id u30-20020a056a00099e00b0063b003ecbeemr10159612pfg.32.1681489377249; Fri, 14 Apr 2023 09:22:57 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1681489377; cv=none; d=google.com; s=arc-20160816; b=ZQlBuI+Awyb9GHFt0CmNee781sqwlP3tJVAybo623wimzck/cOb40gKdyvrABKjr5L 8kECTC17J277Mw8IXGq7a+nxXGIeH4+C14G7dh8J671uOsruWhttO/WUuilnpvsTZc2U Ca6rPZ5nnr16SA1DrWApw6o9OW1aV2LuPe4PN1yvdNCgHYpdBVkUg4NwLSYK2Rst5eW4 OSqBv1/+VRHaueNrgz252UjRyXA5swvvkMZ9MlIcOn8o8V7vz3fFC6kiOYFmEomNoppP v90ZCHB+QkVGCr3mZNeWGOn6jk5D+UWicX2zZ99uxwDIwl+4yaTlZtw63ZLw68A9jle7 jM6A== 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=RpAjtv77c3dRhMWtwrys0GqqNyVgx8vpDE89fectelk=; b=le2Tk5QN6DIczM932dhMwzS2jYQ3b4NWRLjwpVtuHMwisaUojwqF38JHxtdpKbSos6 1fcr8h1SIJQZDyWlFfWuq/szoSPM6TBVU5aLNOxS+JWzI1xETOMVbGjHGbvPGbtzGRUL g0auQSPh4PYuCpKK7S8Zi5Vr57QkmhrarRmlzIhxS4QOXpusBxJ5pbyU1s/UsaGknDg9 pIk1UZB392O2ffmsmBvFfKVJqwUoUWLo4MDCIKnRz/7wABa7Adkcef/iTQBTtYv5PBa9 qyXAREBiR0ohUg2gJEXVbGwBotjKN+ZYRccQK17ZkCE1AzAevT0jI54hfRlYXms4HwLH qP/Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ibm.com header.s=pp1 header.b=HJHZQclP; 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=REJECT sp=NONE dis=NONE) header.from=ibm.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id p189-20020a625bc6000000b0063b6adf2a16si1607648pfb.112.2023.04.14.09.22.45; Fri, 14 Apr 2023 09:22:57 -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=@ibm.com header.s=pp1 header.b=HJHZQclP; 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=REJECT sp=NONE dis=NONE) header.from=ibm.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229793AbjDNQQR (ORCPT + 99 others); Fri, 14 Apr 2023 12:16:17 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58768 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229446AbjDNQQQ (ORCPT ); Fri, 14 Apr 2023 12:16:16 -0400 Received: from mx0a-001b2d01.pphosted.com (mx0a-001b2d01.pphosted.com [148.163.156.1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 104D3903A; Fri, 14 Apr 2023 09:16:14 -0700 (PDT) Received: from pps.filterd (m0098404.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 33EFDGa9000385; Fri, 14 Apr 2023 16:15:47 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ibm.com; h=date : from : to : cc : subject : message-id : references : mime-version : content-type : content-transfer-encoding : in-reply-to; s=pp1; bh=RpAjtv77c3dRhMWtwrys0GqqNyVgx8vpDE89fectelk=; b=HJHZQclP6Z3x2k4AE6TMpOc3p3WyV+QmZvnv1rR68o4I5xxlT2cZ/+CdHTW5SCrxwzu5 o4f5Va/KhvAAsirsIKFqt41Av6XUl5gx4DEyIDL4Sbj62BEkfsPysdR3LbYYiS7tPN3g Ez20moBGhPVQiKVWtLqkdmP4HKhuQnQ7PANuszxmKnF4HzNJT2H8Kt24PPc4p3Cw5DWY t5qw4LsHgdOgxDRsxtkfOx6gqrSzDK4JQ0s7sctTfDNipxz7RNzDusr80xh4ZsNJJk1w ys2R9uVz4uKzkzLHYhPjhzZSCQ1g+IJne6H4kFc6FkOVXRFdFKuopyd3Tmi/rhEKEZGw Cw== Received: from pps.reinject (localhost [127.0.0.1]) by mx0a-001b2d01.pphosted.com (PPS) with ESMTPS id 3py999tfkh-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Fri, 14 Apr 2023 16:15:47 +0000 Received: from m0098404.ppops.net (m0098404.ppops.net [127.0.0.1]) by pps.reinject (8.17.1.5/8.17.1.5) with ESMTP id 33EFEWAB009783; Fri, 14 Apr 2023 16:15:46 GMT Received: from ppma04ams.nl.ibm.com (63.31.33a9.ip4.static.sl-reverse.com [169.51.49.99]) by mx0a-001b2d01.pphosted.com (PPS) with ESMTPS id 3py999tfj7-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Fri, 14 Apr 2023 16:15:46 +0000 Received: from pps.filterd (ppma04ams.nl.ibm.com [127.0.0.1]) by ppma04ams.nl.ibm.com (8.17.1.19/8.17.1.19) with ESMTP id 33E3dPhX018750; Fri, 14 Apr 2023 16:15:43 GMT Received: from smtprelay02.fra02v.mail.ibm.com ([9.218.2.226]) by ppma04ams.nl.ibm.com (PPS) with ESMTPS id 3pu0m1btbw-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Fri, 14 Apr 2023 16:15:43 +0000 Received: from smtpav02.fra02v.mail.ibm.com (smtpav02.fra02v.mail.ibm.com [10.20.54.101]) by smtprelay02.fra02v.mail.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 33EGFfnU30998922 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Fri, 14 Apr 2023 16:15:41 GMT Received: from smtpav02.fra02v.mail.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 1D94820043; Fri, 14 Apr 2023 16:15:41 +0000 (GMT) Received: from smtpav02.fra02v.mail.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 3949E20040; Fri, 14 Apr 2023 16:15:40 +0000 (GMT) Received: from heavy (unknown [9.171.89.218]) by smtpav02.fra02v.mail.ibm.com (Postfix) with ESMTPS; Fri, 14 Apr 2023 16:15:40 +0000 (GMT) Date: Fri, 14 Apr 2023 18:15:38 +0200 From: Ilya Leoshkevich To: Andrea Righi , 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-TM-AS-GCONF: 00 X-Proofpoint-ORIG-GUID: UqRBtxknN6WEuZnVDVXRbt06hx3mQ1k9 X-Proofpoint-GUID: CeKvyijkGrCWLD_t0crn5f_K5gZ88OdP X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.254,Aquarius:18.0.942,Hydra:6.0.573,FMLib:17.11.170.22 definitions=2023-04-14_08,2023-04-14_01,2023-02-09_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 mlxscore=0 suspectscore=0 lowpriorityscore=0 bulkscore=0 priorityscore=1501 impostorscore=0 mlxlogscore=999 malwarescore=0 adultscore=0 clxscore=1011 spamscore=0 phishscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2303200000 definitions=main-2304140141 X-Spam-Status: No, score=-2.0 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_EF,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 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. Best regards, Ilya