Received: by 2002:a05:6358:9144:b0:117:f937:c515 with SMTP id r4csp1423958rwr; Wed, 26 Apr 2023 15:05:08 -0700 (PDT) X-Google-Smtp-Source: AKy350aLMdaw/+yZd4iYMA7Yx0Dx589F5IohZJYKsXpkpZD4V6cEzEOtQRN4A3zMS/9sCKJ9Rg0N X-Received: by 2002:a05:6a21:338c:b0:f0:c858:2d68 with SMTP id yy12-20020a056a21338c00b000f0c8582d68mr31088625pzb.35.1682546708323; Wed, 26 Apr 2023 15:05:08 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1682546708; cv=pass; d=google.com; s=arc-20160816; b=azf34tuuXq/RJf9ppPZB1m1hua0E9AcoGMYTaUuvHkX540goNxVCySB2NHDIpE80wE kbjzPqHEaZDSc8TFb30xqthpVoS1Nu6W4DCvObPzLVTQEbJOuIl2iEarD4A83XDW7ToW AS36A9f7sR32sYmNpKURJPyE1OJXpzKbkewFtxbN/kioVEJFbn+eU3DiR+5hfB6OR1kf wbV+83g0yRsD74kGDhsIzi9Rem+Rvz6l1MSM2cuqayCVel7TNrxIPlGkgSWrDIu4XLNz 2xsiyVIC+bk5LhtbDn+3sN7wHJVl11kjAID8r2i9tms8U15SgGix1wlmR1bsTxJAfetl lXKw== 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:content-language:references:to:subject:user-agent :date:message-id:dkim-signature; bh=loIKsCy2FUJ5gA4qoestcaLVxImydjEisTwtqj/sM+g=; b=q3ELpQx7op2T+3YFtBR0IaeEdnxm2+UHwNlBiKqMHxlDBT3KyaLlsC8mFsJykNOZAP qVxpp5ifDIjbYcSkarGQyEFfFsEQiLRydE2lQAxllhmlu80M5t/f0aC+SlpgvficaYpr nfDyrXuMV56d7rKY9gUHtU197j/1SSfw1RezQhQxR3/rzEtismh8N0jIX9aXmSW9nxLn B4ufuTWHBhCsH7h3oFm142hVVnapm/e0TutPBEAlfLpwHUqWfq23XdBDZuNiwjyHd18E wHiRb9Hb4wZrt+NATpE3hHqFjIJp9B5UCK98kmWbqSKIkUgk2qbPmsChArhyqe/Auib1 6UhQ== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@meta.com header.s=s2048-2021-q4 header.b=dMoN4sGi; arc=pass (i=1 spf=pass spfdomain=meta.com dkim=pass dkdomain=meta.com dmarc=pass fromdomain=meta.com); 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=REJECT dis=NONE) header.from=meta.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id go8-20020a17090b03c800b002373125c085si16997761pjb.141.2023.04.26.15.04.08; Wed, 26 Apr 2023 15:05:08 -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=@meta.com header.s=s2048-2021-q4 header.b=dMoN4sGi; arc=pass (i=1 spf=pass spfdomain=meta.com dkim=pass dkdomain=meta.com dmarc=pass fromdomain=meta.com); 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=REJECT dis=NONE) header.from=meta.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S239378AbjDZVr4 (ORCPT + 99 others); Wed, 26 Apr 2023 17:47:56 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60818 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231915AbjDZVry (ORCPT ); Wed, 26 Apr 2023 17:47:54 -0400 Received: from mx0b-00082601.pphosted.com (mx0b-00082601.pphosted.com [67.231.153.30]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 76253AC; Wed, 26 Apr 2023 14:47:53 -0700 (PDT) Received: from pps.filterd (m0109332.ppops.net [127.0.0.1]) by mx0a-00082601.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 33QLZDrV003707; Wed, 26 Apr 2023 14:47:34 -0700 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=meta.com; h=message-id : date : subject : to : references : from : in-reply-to : content-type : content-transfer-encoding : mime-version; s=s2048-2021-q4; bh=loIKsCy2FUJ5gA4qoestcaLVxImydjEisTwtqj/sM+g=; b=dMoN4sGijtE+pvsMH10uoht1GN4KfzpwF84ecYuE3I/YSdOdqSPwnvXQnqPLDB9eXB3q ErIi//f7/MEiSS0hc1bkQlEUB6tZ+2q+y2mjZOTBO6ucEDBaoleoe3X5TS641gngbmwQ zxvFIXKYXoCMIpnl2wRKexKa4k3JUI/TwIxhON1f9axP1WtXL9tywVgq5CcXYYQCZZeB 6PVqf/FWu7zpwsdNOUbkJb2TX87fvQhNl8DleEhJBFW7g6Yn4cEwoA196BL9oMurBN+e EpA5qb8HybUaeSEa+vV31ADGWDChLavEalP2wxyiKoZfGYBsNr7Ule4WtUbqmBwviHwm nw== Received: from nam02-dm3-obe.outbound.protection.outlook.com (mail-dm3nam02lp2046.outbound.protection.outlook.com [104.47.56.46]) by mx0a-00082601.pphosted.com (PPS) with ESMTPS id 3q7av50gs9-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 26 Apr 2023 14:47:34 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=a9Qb+rkgmEYoXbZvkkE+owsQDDphqDCfO1ChR6iPx8Chr1XtqmBaAJdNefgb+Ev5uXH3CT6CORVjnegOT0G+fe92RUA8qd9GrfalT+ChE0l9+lvDbuSrMRp4y5lX5tXKLaoA6on+MR15iQ03tfoDNEDaCj7L6EbpB+hCnXfeRHv4b9UUeFoK7PKEXxSf5KDfshgJHngfKiNHfuIPPiw7sDe7NWeW+18C8Fe1s8wmdOQKWGl+70HebV9obZhZnN1Rus+o5fQlH7EiOqKm9YSNce2bsNfR65+8kW4Tqu3TfUR3xpWqRVO0Tq+vn2faBbv9H2qRKD6cLkleeIu7W/cFQw== 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=loIKsCy2FUJ5gA4qoestcaLVxImydjEisTwtqj/sM+g=; b=gESHIaTvswmtkCNzZea4T5JPoO0uy4A/lNFBi5fjs+kUkGdwm0tkvPKZPKrssPwH0NBfUBtj8V4FOj+oyoT8jUm2cETxZeC+XkONRMnNUyrXtoN2Or/aIRlQAS/4/X1DWSKfuxqlkYKRL+K/UfzinyOlteVeNfvpwODKeCs0zD7yhnIComQCghKrpkdonyJA8s3ttCJ3/qaVVUQTu2LvInfMW2rnR3EqLKGq1tABBrtCJXwE8qytFLg+izzxQxZ43fFvR2oP1FDdPBLK286oe7A5aFGYvkMNFUbrgsr6QzCsZQu0Jr87DaCtZ4oz3ToTMYzG32276jFmXPkhfO9sFg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=meta.com; dmarc=pass action=none header.from=meta.com; dkim=pass header.d=meta.com; arc=none Received: from SN6PR1501MB2064.namprd15.prod.outlook.com (2603:10b6:805:d::27) by MW5PR15MB5268.namprd15.prod.outlook.com (2603:10b6:303:198::10) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6319.33; Wed, 26 Apr 2023 21:47:32 +0000 Received: from SN6PR1501MB2064.namprd15.prod.outlook.com ([fe80::589f:9230:518:7f53]) by SN6PR1501MB2064.namprd15.prod.outlook.com ([fe80::589f:9230:518:7f53%6]) with mapi id 15.20.6319.033; Wed, 26 Apr 2023 21:47:32 +0000 Message-ID: <07e05c57-feb7-5482-9c07-eb41f976f9fd@meta.com> Date: Wed, 26 Apr 2023 14:47:27 -0700 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:102.0) Gecko/20100101 Thunderbird/102.10.0 Subject: Re: [PATCH v2] libbpf: Improve version handling when attaching uprobe To: Espen Grindhaug , Andrii Nakryiko , Alexei Starovoitov , Daniel Borkmann , Martin KaFai Lau , Song Liu , Yonghong Song , John Fastabend , KP Singh , Stanislav Fomichev , Hao Luo , Jiri Olsa , Mykola Lysenko , Shuah Khan , bpf@vger.kernel.org, linux-kernel@vger.kernel.org, linux-kselftest@vger.kernel.org References: Content-Language: en-US From: Yonghong Song In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-ClientProxiedBy: SJ0PR03CA0100.namprd03.prod.outlook.com (2603:10b6:a03:333::15) To SN6PR1501MB2064.namprd15.prod.outlook.com (2603:10b6:805:d::27) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: SN6PR1501MB2064:EE_|MW5PR15MB5268:EE_ X-MS-Office365-Filtering-Correlation-Id: cc6c0ada-419e-4b99-738a-08db469fd6b0 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: c027AUdu2vNQyhIRV1HT/ywsCfk+1PeM+Sjl+uSVz3dv/+/njfzX/i8lyOnXKm4NIB0gTMZzxbgEPO4K9U1x9Z5yHbVGugWvlWWSbY6yHXHTKX1+eJphxR+Fd2v5KE/kLt60+awvy6A2hsp536YsPGNO0qeZG8ThimYjSlMrGru7/TsAH01C+8nLQgO+lMBQCIDMblEYPEQpIP2kcmvqngcLL7u0dfp3mkMxyB4AMKHQIZI0jlhcIqCgDB6jsx1G3wWituW/8uqWxdLsxPRb42cgy7uP1oDK4H+HDiw54uwVIbIZ2LUBHEiJkeu6wCBG+muGZzYEZLgkSbILenQi9cTHlHvHD3c302rdx4TQYJDqRTUUD/Oq2CJyduqbMp7xJXzzjgMURC/6RXItaOhwotNbjsT1sHo6F/65kk/fUmg+ZvDFWZhFa3BWgHRLBwF7wyJKrwH25MaPaPNuy26A3V787xt1t6CvhjSm6xk1Y8U1j07Itw7SrifGo84341EpcpqbjLWoeHwXfc1IJDoSe6fa4rZmHGHALhzDQivj08n1pQr7t51sC2+QAFpfIXpcsJ3sYljsmwGEW2ZXCXolHM8AFY6qJL1CCL/EtMLB/nOGX97Cj/qDnuik5YkoAJCzhcOqxukU1WQ+V2ejIvdqXPqqyMHhHuPmOPxpESqmVhk= 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:(13230028)(4636009)(39860400002)(366004)(396003)(136003)(346002)(376002)(451199021)(86362001)(186003)(6506007)(6512007)(38100700002)(5660300002)(53546011)(31686004)(2616005)(6486002)(31696002)(6666004)(83380400001)(478600001)(36756003)(110136005)(7416002)(921005)(41300700001)(2906002)(8936002)(8676002)(4744005)(316002)(66476007)(66556008)(66946007)(45980500001)(43740500002);DIR:OUT;SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?B?Yy9XY1VRNEtHbGcvOXJYOXltV2lPM2JPVkJFKytxVVBPRmxFQVkzdlJWamJM?= =?utf-8?B?ODZMdGtsQ0h0cFhMNk5naVhoY1EvWFZtWGV5RldabUhZamtzL1lpSGpMRlR2?= =?utf-8?B?VGF6YU5iRDFCZ3RMdEMzSlpQaXBSWHRQM0RyakJpbkZGZFVjeEhkdG4veFRD?= =?utf-8?B?WGxrV1RIbCthVHVkVENCMHhJN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XJCNTdZQlVq?= =?utf-8?B?d3NzYzlmQm9NdzFhUjd0Q0lQdndUVi9oeVc3NitUKy85RmowZ0IxZmwyb1dx?= =?utf-8?B?c3g5MHhtTXc1U3UwVVlMNlNJNnBkY004U0o2Y29nTWlVQjc4UDRBT2RobWha?= =?utf-8?B?UFlObEpOZmZoR1lVemlUa05FWUhsT2o2azYwUUdzeHA4UFc1VzNPRmZFUFpN?= =?utf-8?B?TlE9PQ==?= X-OriginatorOrg: meta.com X-MS-Exchange-CrossTenant-Network-Message-Id: cc6c0ada-419e-4b99-738a-08db469fd6b0 X-MS-Exchange-CrossTenant-AuthSource: SN6PR1501MB2064.namprd15.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 26 Apr 2023 21:47:32.1487 (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: KkR4q45NeNpthnkxHGS0lNjAG1SD76qSA8nsCtb7ABrLB97vp7xlhfn4BWsmh9GN X-MS-Exchange-Transport-CrossTenantHeadersStamped: MW5PR15MB5268 X-Proofpoint-ORIG-GUID: sOz-I6c_0tspLBeR7QXQFotuqwCtc1_6 X-Proofpoint-GUID: sOz-I6c_0tspLBeR7QXQFotuqwCtc1_6 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-26_10,2023-04-26_03,2023-02-09_01 X-Spam-Status: No, score=-4.2 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,NICE_REPLY_A,RCVD_IN_DNSWL_LOW, RCVD_IN_MSPIKE_H3,RCVD_IN_MSPIKE_WL,SPF_HELO_NONE,SPF_PASS, T_SCC_BODY_TEXT_LINE,URIBL_BLOCKED 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 4/23/23 11:55 AM, Espen Grindhaug wrote: > This change fixes the handling of versions in elf_find_func_offset. > In the previous implementation, we incorrectly assumed that the Could you give more explanation/example in the commit message what does 'incorrectly' mean here? In which situations the current libbpf implementation will not be correct? > version information would be present in the string found in the > string table. > > We now look up the correct version string in the version symbol > table before constructing the full name and then comparing. > > This patch adds support for both name@version and name@@version to > match output of the various elf parsers. > > Signed-off-by: Espen Grindhaug [...]