Received: by 2002:ac2:464d:0:0:0:0:0 with SMTP id s13csp3594966lfo; Mon, 23 May 2022 08:48:55 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxBabvnJwuPVlHmfrh8oa54cnsT+50/r2kiCbIl0iFh4ibDj3FHYIhpvh4TUoWkQsD8NKAU X-Received: by 2002:a17:902:b703:b0:15e:ea16:2c6e with SMTP id d3-20020a170902b70300b0015eea162c6emr23485445pls.100.1653320935449; Mon, 23 May 2022 08:48:55 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1653320935; cv=pass; d=google.com; s=arc-20160816; b=pJwSGVcMhVGBJmWeZA5clOKdePsOZZzQI1far7/DNXZxU7IpKmxoT2RqRxBI9Wpfnf kwUQzS2Ory+ACKlUcrbarmVv4+chJ/OkL9SSFP+PjiofbnQM5Yqo6iu8RUAZ+sAh9vXw inoFNTBFxkv7bEHxe3dB03Fo5Ga/0aNOfVNrxS3XMecnvULCnKjw3065Hvv/IbpcTKFa 9zHarwUCQ2VxxLhpVQVf0cIJEVR6PgkBItBRbeHqqBku+Ghf7vgvpYPl2/O07SNa8835 KbMcZ9TE7MxKUZds81xmrkSnZD2U/faC1HNELrCetASJ6nPUUaj06axiOCWae+s0KVKN TlvA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:content-transfer-encoding :in-reply-to:from:references:cc:to:content-language:subject :user-agent:date:message-id:dkim-signature; bh=AHLZqqGzPIH+OlVYAxUgu65XV/eEWGXNNKIhUan9wMU=; b=zmZH/n6D3ypk3+t04Ac32qNw3BBRUg+FFURUogLfwSDrZhK5ZKvYtmNtlGXKxESnfP //Vcd/eJV69M2aN04uBfcMHN5Eo6eXf6iiDS75pIFRiclzTiCu0z/uFuQPqAMbicUQC5 yVjJG6ivzsx2M5iHLWujyVFvtXt3U5hbk+0QQ+QqH2jUKFxYaLP4JrCm4IImB7+yGiYv y6REvHhVmMG4fWlw1ouBkI+EyNdPR5s2NuvsWQPCEaU+0/CyApcVcaEvwC3Ok4Z67UNY tH31SvBH8gveZF2Wp6SDr1knTUb4KpwRv2DTckMQjr10ebcCFN+8THSKDz0IfrM7chW4 AU7g== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@fb.com header.s=facebook header.b=ZBBFa8rb; arc=pass (i=1 spf=pass spfdomain=fb.com dkim=pass dkdomain=fb.com dmarc=pass fromdomain=fb.com); spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=fb.com Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [2620:137:e000::1:18]) by mx.google.com with ESMTPS id s19-20020a056a0008d300b005189da52427si5535646pfu.345.2022.05.23.08.48.55 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 23 May 2022 08:48:55 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) client-ip=2620:137:e000::1:18; Authentication-Results: mx.google.com; dkim=pass header.i=@fb.com header.s=facebook header.b=ZBBFa8rb; arc=pass (i=1 spf=pass spfdomain=fb.com dkim=pass dkdomain=fb.com dmarc=pass fromdomain=fb.com); spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=fb.com Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id ED8D6186F2; Mon, 23 May 2022 08:46:57 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S238105AbiEWPpz (ORCPT + 99 others); Mon, 23 May 2022 11:45:55 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58940 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234711AbiEWPpx (ORCPT ); Mon, 23 May 2022 11:45:53 -0400 Received: from mx0a-00082601.pphosted.com (mx0a-00082601.pphosted.com [67.231.145.42]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 6D067583A2; Mon, 23 May 2022 08:45:52 -0700 (PDT) Received: from pps.filterd (m0109334.ppops.net [127.0.0.1]) by mx0a-00082601.pphosted.com (8.17.1.5/8.17.1.5) with ESMTP id 24N3sGC3021060; Mon, 23 May 2022 08:45:30 -0700 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=fb.com; h=message-id : date : subject : to : cc : references : from : in-reply-to : content-type : content-transfer-encoding : mime-version; s=facebook; bh=AHLZqqGzPIH+OlVYAxUgu65XV/eEWGXNNKIhUan9wMU=; b=ZBBFa8rbeo0FbkWrNzQSC/+S32AsG8Vo2TpFIs+X0NhTWF/CtrHT35F9hOMEtkfalZFD 7GFk9R0ouucHQ6XvVW/Bqseyoztei2b8hVkE8fUNORfDuB8zNG0b+hpG3kWWkwhAgazB crHgam7G0iNHt5zl2/etFYeZa1QC3wQlZYw= Received: from nam10-dm6-obe.outbound.protection.outlook.com (mail-dm6nam10lp2103.outbound.protection.outlook.com [104.47.58.103]) by mx0a-00082601.pphosted.com (PPS) with ESMTPS id 3g6yd39bew-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Mon, 23 May 2022 08:45:30 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=E6dC/dYcH+nLSpUS+6ClH36WQtLeNYo+v7mZ4+ZaRrP0zCq/L+JJyff6R70v8uYXYoZAEWa9JOaWwKLLFs1t3yFKvRA0TEGi2TTFLlUiGU3BUHYWZbyrgynXi3/iGNfvmNEN/jHq9JpOzsF50GSTl+12PoJ+UiPrXNBf/rpAJYF/fSE3/lEnDSWLZJidl2q9VGQORhwFwl/IWnzvKCDLeGs2CKzCaMV8fbMFId74x9tYJsuO49PENZLcb2J6954nM8pl0Lk0iRhuLHxjtiUEgZLdVu5Zak0HCNKTTzRG/9jfRC5wE7K52E9yt9lKv8eQd3IjkAEwlo1LyI8gP0sjIw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=AHLZqqGzPIH+OlVYAxUgu65XV/eEWGXNNKIhUan9wMU=; b=GsSppuTUMu5UWge2+AeqUA5YPigRTD7Zv0B8PmWqjtgP9sjIJZuxpcqPS5Akatk43cOxI3Puk8znUJ1oY1NtB3ucn4P5y5iRTiq0SJtXgvtcuCEHSIHaybyWJZtrz2kq3j4KkCO2RVd5Vgz3NfyiuIAusa4fCb7zno+BXUprXoX5VkOvwgrPPuff1cGugmyWQFyCqfZn84AhpQmmxnuMhJj4fZC1pcFTsCkjoH0keGbr9HvPHgsbFWAFbf8gerca35UxqT2uXiQB0DncYm5yU7mS7sEouPma3m5YEFGN2DqjoSRQsgRTwjd9738yrpWM8Air05ckCJZVJ5e2D26HsQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=fb.com; dmarc=pass action=none header.from=fb.com; dkim=pass header.d=fb.com; arc=none Received: from SN6PR1501MB2064.namprd15.prod.outlook.com (2603:10b6:805:d::27) by CY4PR15MB1718.namprd15.prod.outlook.com (2603:10b6:910:22::21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5273.23; Mon, 23 May 2022 15:45:28 +0000 Received: from SN6PR1501MB2064.namprd15.prod.outlook.com ([fe80::5811:4996:bbfd:3c53]) by SN6PR1501MB2064.namprd15.prod.outlook.com ([fe80::5811:4996:bbfd:3c53%7]) with mapi id 15.20.5273.023; Mon, 23 May 2022 15:45:28 +0000 Message-ID: <6b766a00-58a7-8bde-59a6-5e634ed5ff62@fb.com> Date: Mon, 23 May 2022 08:45:24 -0700 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:91.0) Gecko/20100101 Thunderbird/91.9.0 Subject: Re: [PATCH v2] libbpf: Fix determine_ptr_size() guessing Content-Language: en-US To: Douglas RAILLARD , bpf@vger.kernel.org Cc: beata.michalska@arm.com, Alexei Starovoitov , Daniel Borkmann , Andrii Nakryiko , Martin KaFai Lau , Song Liu , John Fastabend , KP Singh , Nathan Chancellor , Nick Desaulniers , Tom Rix , netdev@vger.kernel.org, linux-kernel@vger.kernel.org, llvm@lists.linux.dev References: <20220523102955.43844-1-douglas.raillard@arm.com> From: Yonghong Song In-Reply-To: <20220523102955.43844-1-douglas.raillard@arm.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-ClientProxiedBy: MW4PR04CA0181.namprd04.prod.outlook.com (2603:10b6:303:86::6) To SN6PR1501MB2064.namprd15.prod.outlook.com (2603:10b6:805:d::27) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 4f3e3e85-b7bd-4dc4-b871-08da3cd342a6 X-MS-TrafficTypeDiagnostic: CY4PR15MB1718:EE_ X-Microsoft-Antispam-PRVS: X-FB-Source: Internal X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: ziqvFT3CTicEw52lMU7MO9RdmK1s6xLnWWqFwde4nHtxhLEjhC09cZMd2fcC37DHFHbJemgludGU7nw0H/88n+KS7TtfWrq3ZBovK93wjmJFwELiwGIhlbBv+6Ffy3myq7DbbZq0I6aQkornAt3RxwZDppB0qK5mUsDjyws1fVTWbPrf1+URt0DAOSYr7XYcffZordjVPJTW3E/vASiUgACAC0gCw+qz3i4nYp5+HambjCzksM4BUsK3XmZtqAPznTVTs5dRCnNQl4kvoorteuE60swcfChS0Os5mIEBADb9BpG/NKATYMOf1uc0A6c2JhTD6DGybiOonNhKHTZefD773tXy1lUA0iQNWNpe/3/stCLgXBwFxuRZVaNF/xjowLh9WTEY6K5cG6C8jxSB2GmyZXiurl4yW10mguERRzOQdZVE9LYYZN43rYtSnt2sVrVUxGdcvEdgSJRMCuMgAjA0UI9PYyCeWONIR7WV7uXTDHVieXH5wO6SBpJfa90oLqcyFr57iKXLFdU6NKbI2ewg9PF0acPEPOMKug4KV1JruRF4G5B7AkKzz1Gno8Ung/8yxMJLR5NKX0mO32xxAHFSGhhDaaHd5lZYqy1y/K58dBjyccFiFfDiUZZBO+lmTSQehlqelKlp/QKMsDso4fzcytItupj8+hCmGfwp65QuRB6vA+/9CIp5HDxet3SBE2uYwl499mhVG/xgKgO+I5y+gBUrM9UsKgcVXr5cqcnoSJtlh3xaReShbN+A17hA X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:SN6PR1501MB2064.namprd15.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230001)(4636009)(366004)(6512007)(6486002)(508600001)(31686004)(4744005)(36756003)(5660300002)(7416002)(2906002)(6506007)(8936002)(53546011)(6666004)(52116002)(54906003)(4326008)(8676002)(38100700002)(316002)(186003)(66946007)(66556008)(66476007)(31696002)(86362001)(2616005)(45980500001)(43740500002);DIR:OUT;SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?B?dGlmbGl2K3BJTHlkTGpnRjQrc3h2TEQvUUc4ZDNZVmdTMnRZYWxobHUrUERj?= =?utf-8?B?VTVaakhyYy9wVG5sUGRPdG1GSDZqMDM2VGR4SzJ4dlJNdituamdybmk3WDB4?= =?utf-8?B?alloUy9HTFlEc1dBTGk1Si9NQVRwckE5NUV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NmY2ZHJ5?= =?utf-8?B?VmZrQ3lsUzBLUFhCRnoxZU5aUHhYOXMwWUFpR2hMOG0yS3hzRjNPeW5wYXBB?= =?utf-8?B?Y0tOMDUrV3JadExRL05PYTZRUThtL3Nyek1CWksvMXpCQ1hSMlA3RUhGbGVM?= =?utf-8?B?YTJuNEtkUWNZU2xnQXRkRHdzTG0wb0R4SGNFQXVOWUhqcTEwS2NTemk2STlF?= =?utf-8?B?Q1JBVDRYUHQ5ejNjektlVmJqcE5ReGtXWk9TNU1tbHBkQkU1TnM3U3dUd1Va?= =?utf-8?B?R1prWjNORHU2ZUR0MG5jUU13WFlsVVpwOXdjbHRYSVJ0QTRYKzkzQTcySlZi?= =?utf-8?B?eFJYaVI3UjVadDZ3WW5Odlgyd1YwU1FUTWpydjQ4aVVFelRIbVFqWjQ2dlp5?= =?utf-8?B?MG8rNGxiaFF4cDFLTjR2UGo2WXJwUC9PZElNRDhwR1lOYVU5TjdmVUx4dUR5?= =?utf-8?Q?EJlTbRlEvktjvVyY=3D?= X-OriginatorOrg: fb.com X-MS-Exchange-CrossTenant-Network-Message-Id: 4f3e3e85-b7bd-4dc4-b871-08da3cd342a6 X-MS-Exchange-CrossTenant-AuthSource: SN6PR1501MB2064.namprd15.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 23 May 2022 15:45:28.3615 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 8ae927fe-1255-47a7-a2af-5f3a069daaa2 X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: NO8sm+Hj2cWCmWzwSVFSlA4iEpoR9cmIgz+VKGJNVDZz0Pmvi5msSiboGtnj7ujz X-MS-Exchange-Transport-CrossTenantHeadersStamped: CY4PR15MB1718 X-Proofpoint-GUID: OBN7fbs7AUGz7HT8ve5IsINVOgCyaGP3 X-Proofpoint-ORIG-GUID: OBN7fbs7AUGz7HT8ve5IsINVOgCyaGP3 X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.205,Aquarius:18.0.874,Hydra:6.0.486,FMLib:17.11.64.514 definitions=2022-05-23_06,2022-05-23_01,2022-02-23_01 X-Spam-Status: No, score=-5.9 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,NICE_REPLY_A,RDNS_NONE,SPF_HELO_NONE, T_SCC_BODY_TEXT_LINE 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 5/23/22 3:29 AM, Douglas RAILLARD wrote: > From: Douglas Raillard > > One strategy employed by libbpf to guess the pointer size is by finding > the size of "unsigned long" type. This is achieved by looking for a type > of with the expected name and checking its size. > > Unfortunately, the C syntax is friendlier to humans than to computers > as there is some variety in how such a type can be named. Specifically, > gcc and clang do not use the same name in debug info. > > Lookup all the names for such a type so that libbpf can hope to find the > information it wants. > > Signed-off-by: Douglas Raillard Acked-by: Yonghong Song