From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id B442EC05027 for ; Wed, 1 Feb 2023 17:19:13 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232045AbjBARTM (ORCPT ); Wed, 1 Feb 2023 12:19:12 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44788 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232041AbjBARTK (ORCPT ); Wed, 1 Feb 2023 12:19:10 -0500 Received: from mx0a-00069f02.pphosted.com (mx0a-00069f02.pphosted.com [205.220.165.32]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 90AEC5598 for ; Wed, 1 Feb 2023 09:19:09 -0800 (PST) Received: from pps.filterd (m0246617.ppops.net [127.0.0.1]) by mx0b-00069f02.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 311FYjnj027015; Wed, 1 Feb 2023 17:18:42 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=subject : to : cc : references : from : message-id : date : in-reply-to : content-type : content-transfer-encoding : mime-version; s=corp-2022-7-12; bh=0gcrF/z6sDEueSNLECPMFcjY/4WcrZ+8194WyC+pH5s=; b=actLBB1b0nMcQk9vpN5XXE1/yBTqCbQ0afr3f8C6/2I6MF7cKuO24OVYR2rumlGVzI1d RuVm+6C0VP9PAQCoJ5vIZl17vqz+oIozQecchyBejPplWFUfmrvJIJIvsVDSn0mO76vK T5SLHx/NYrOV8FngWFSaX6z9+7c15iTeJoOf/RgHd5S2PcltMmLJBfuwiAf7DUuMKeRD 09ygxKBODEvoSaN6irxvxKvggJlJKs27k9plwHbGwdLXFx2vdH77ovrbCZoqgibuPpNk IP/3xHu2qwT5Tw7/cQU4eb5TN3tMBNSkGUZa1ksiNrA5jnPgaXnMmDLOwtirFaS+GDjK Eg== Received: from iadpaimrmta03.imrmtpd1.prodappiadaev1.oraclevcn.com (iadpaimrmta03.appoci.oracle.com [130.35.103.27]) by mx0b-00069f02.pphosted.com (PPS) with ESMTPS id 3nfkd1s9xr-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Wed, 01 Feb 2023 17:18:41 +0000 Received: from pps.filterd (iadpaimrmta03.imrmtpd1.prodappiadaev1.oraclevcn.com [127.0.0.1]) by iadpaimrmta03.imrmtpd1.prodappiadaev1.oraclevcn.com (8.17.1.5/8.17.1.5) with ESMTP id 311GU8i8031835; Wed, 1 Feb 2023 17:18:40 GMT Received: from nam11-dm6-obe.outbound.protection.outlook.com (mail-dm6nam11lp2177.outbound.protection.outlook.com [104.47.57.177]) by iadpaimrmta03.imrmtpd1.prodappiadaev1.oraclevcn.com (PPS) with ESMTPS id 3nct5ecd8t-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Wed, 01 Feb 2023 17:18:40 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=RX0rmrwOM0ZYQLGO9o3SYR8hVJaFM7w3wYLwo+b7qANTv30If2Wrx8WU8gglu+vknTxGMfBXEis7rWnA1oH+zNg0hj7iRk4fVIc0UrtZyb8oafBezq/8nFFMeYgscuja+T0wJk6EiMRZgqtscXtO52PdwOayAWVlXfBEX+8lFRu7MXDkVecwwwATF1NSvfgJ0IPlidp5CjHWllLtH+j0fZaRP7NW2v3CjpEbvSCxAM1IE2N6Rt5PTNmRadjS74UtdI3pbmKuw3CAPgk0y+WV+QJDDFce+6GSalhVDtUURMIIfiqygiE98QuaXu6z6lpZcOQ86vgoFT4gbXXZ8QdVvA== 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=0gcrF/z6sDEueSNLECPMFcjY/4WcrZ+8194WyC+pH5s=; b=J5EwNJZMzKnRRGXtOqrg7utlEj55y/QtMh4TWDiSfQaRWUyiesfP/kGCeS4i7xdJqbAyiRJ22hFe4lDjjo3Q2MGKh14IsiWSzn8F9WGwNIFAn+q+s9slP2YWJHUFQO1rRqcoZ0yOMwzNoVqcyfwdjww6jkaslMv+GkwPIE8sDxxhVycmjwHSjG3hPHvdx4/0QF5QHClEnnJeVgbzLL1E/8BCLoV3+r1BUurqKo5t8ZEIkMCzMHI9fKZhCC3wORgfAtyHe6vI3/+1xAnQIvPr1pTARza01D2dfB5mjeE4xuKCBMeUUx9/Zi0YyN5qH9NRJRbCZON6yPZ8uKuExd/euw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=oracle.com; dmarc=pass action=none header.from=oracle.com; dkim=pass header.d=oracle.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.onmicrosoft.com; s=selector2-oracle-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=0gcrF/z6sDEueSNLECPMFcjY/4WcrZ+8194WyC+pH5s=; b=ZLpZ94/g650NOEMI3EeySombWBk2YNT5bzOZUdHGHBfSwiMhob1oZiRy0t3wrxS5plYqViBJcUBRAJKwGS4kIoWqtnC/USF9aWqarvkjelTFeAR2Qo1w4HveWkEOCi6Aka4X/oFWtxKtpiB223T8DuKfbIPvyonzHP45ZMZ+EKU= Received: from BLAPR10MB5267.namprd10.prod.outlook.com (2603:10b6:208:30e::22) by PH7PR10MB5700.namprd10.prod.outlook.com (2603:10b6:510:125::6) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6064.21; Wed, 1 Feb 2023 17:18:37 +0000 Received: from BLAPR10MB5267.namprd10.prod.outlook.com ([fe80::d952:73ee:eb09:e05e]) by BLAPR10MB5267.namprd10.prod.outlook.com ([fe80::d952:73ee:eb09:e05e%7]) with mapi id 15.20.6064.025; Wed, 1 Feb 2023 17:18:37 +0000 Subject: Re: [PATCH v2 dwarves 1/5] dwarves: help dwarf loader spot functions with optimized-out parameters To: Arnaldo Carvalho de Melo , Alexei Starovoitov Cc: David Vernet , Yonghong Song , Alexei Starovoitov , Jiri Olsa , Eddy Z , sinquersw@gmail.com, Timo Beckers , Daniel Borkmann , Andrii Nakryiko , Song Liu , John Fastabend , KP Singh , Stanislav Fomichev , Hao Luo , Martin KaFai Lau , bpf References: <9c330c78-e668-fa4c-e0ab-52aa445ccc00@oracle.com> From: Alan Maguire Message-ID: Date: Wed, 1 Feb 2023 17:18:29 +0000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.4.3 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit X-ClientProxiedBy: LO4P123CA0096.GBRP123.PROD.OUTLOOK.COM (2603:10a6:600:191::11) To BLAPR10MB5267.namprd10.prod.outlook.com (2603:10b6:208:30e::22) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: BLAPR10MB5267:EE_|PH7PR10MB5700:EE_ X-MS-Office365-Filtering-Correlation-Id: 2f3957bc-4ef6-4ddd-1e6f-08db04785ae6 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: TrthGmA10Dh+7guZu+SdoQ4vmMYmhQeTqfPLnbSdIYJ4y/CGB+BdTXF0jnlQm1FmrqIb+NIGxJUlUlp3GVp+9tB+10njfroX7dU8SC9QWBYYS3JQfCowbBLzz8VLcZIIqjnaO6Z2uPGy+5FnFVppwqUDjXb/FQU6EQlU8iVnynqu0z2ZIohXii7TCapFZZlWVbTkrLdCyynaWayeLtuHaRmkq+dBBlWsgqPnUJMPEyrFt2P911lnDWdFsy4paqJaWBeAIp+BcuwuJkICIYN+AvpFP66thPOfJtOIJzEFzICSVOiCBSGE6+HIfG9meu2g2zsSZo+ou/3fSZqgPk9yt9j/DhasVrqJBmrKbV9CYz2Sg35hk5YWgFF2DepNquyZsEWFQO2LP+U808Hsu99Ay2wEKTBa99Hfy1/6blo6OcrBwsa1YW5+G2AEn84UYFffH9VBWc7eEExmnlXqZItH0gQqHnYXMGn4DA/LEeQtIbmvv+nv2Il8fQfINS4PfEvfU08ThD3iYkAe57dXOcndfBOQ3BzCuS30fG792x8gNn0w0vVcZaj75eE69UjUabDnudU69oziCVgdS2OOmo1pKpz9RrdXMeQeogYKYr1S6Kcg/+gGUJTmjuO9ZcgFbfOXr/yR//eiNWhlFknpV6M3RFOuWIl85WTysrk8wF3Y02bBrcJyRlaLnKNDoNYoV7D9w+XGXs7aA41p/WDKGH5B/P6FHn6CfyvJrIYln9siBORpot1VwAHqUODzxCpnSZiGgdCqaA+MLd/NhL/6dDXwgg== X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:BLAPR10MB5267.namprd10.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230025)(39860400002)(366004)(376002)(396003)(346002)(136003)(451199018)(83380400001)(86362001)(31696002)(36756003)(38100700002)(44832011)(2906002)(41300700001)(8936002)(110136005)(54906003)(5660300002)(7416002)(31686004)(316002)(8676002)(66946007)(66556008)(6486002)(66476007)(966005)(478600001)(4326008)(6512007)(6666004)(186003)(6506007)(53546011)(2616005)(45980500001)(43740500002);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?B?eGp0NExIR1RRR1JqQy9j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EFmV1BmT2RCOThlZUZtbzdybi8yalBlNGhkR1dD?= =?utf-8?Q?30Gd6t1qYW2GUW51mFqqz/rZ8kFURM9hBn?= X-OriginatorOrg: oracle.com X-MS-Exchange-CrossTenant-Network-Message-Id: 2f3957bc-4ef6-4ddd-1e6f-08db04785ae6 X-MS-Exchange-CrossTenant-AuthSource: BLAPR10MB5267.namprd10.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 01 Feb 2023 17:18:37.2861 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 4e2c6054-71cb-48f1-bd6c-3a9705aca71b X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: shE7AYkQ82ok12Txf7TLBSk2Vq2gcYwaxD6EeLtYS8AY5Xhry7rf601jhtb7JmRRUFverfMmeJl5uUD/ScpyoA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: PH7PR10MB5700 X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.219,Aquarius:18.0.930,Hydra:6.0.562,FMLib:17.11.122.1 definitions=2023-02-01_04,2023-01-31_01,2022-06-22_01 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 bulkscore=0 malwarescore=0 suspectscore=0 adultscore=0 mlxscore=0 phishscore=0 mlxlogscore=999 spamscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2212070000 definitions=main-2302010148 X-Proofpoint-GUID: iKQXjbOsbn5PGALZy7TzVXdohmn7tNst X-Proofpoint-ORIG-GUID: iKQXjbOsbn5PGALZy7TzVXdohmn7tNst Precedence: bulk List-ID: X-Mailing-List: bpf@vger.kernel.org On 01/02/2023 17:01, Arnaldo Carvalho de Melo wrote: > Em Wed, Feb 01, 2023 at 08:49:07AM -0800, Alexei Starovoitov escreveu: >> On Wed, Feb 1, 2023 at 7:19 AM David Vernet wrote: >>> >>> On Wed, Feb 01, 2023 at 12:02:07PM -0300, Arnaldo Carvalho de Melo wrote: >>>> Em Wed, Feb 01, 2023 at 01:59:30PM +0000, Alan Maguire escreveu: >>>>> On 01/02/2023 03:02, David Vernet wrote: >>>>>> On Tue, Jan 31, 2023 at 04:14:13PM -0800, Alexei Starovoitov wrote: >>>>>>> On Tue, Jan 31, 2023 at 3:59 PM David Vernet wrote: >>>>>>>> >>>>>>>> On Tue, Jan 31, 2023 at 11:45:29PM +0000, Alan Maguire wrote: >>>>>>>>> On 31/01/2023 18:16, Alexei Starovoitov wrote: >>>>>>>>>> On Tue, Jan 31, 2023 at 9:43 AM Alexei Starovoitov >>>>>>>>>> wrote: >>>>>>>>>>> >>>>>>>>>>> On Tue, Jan 31, 2023 at 4:14 AM Alan Maguire wrote: >>>>>>>>>>>> >>>>>>>>>>>> On 31/01/2023 01:04, Arnaldo Carvalho de Melo wrote: >>>>>>>>>>>>> Em Mon, Jan 30, 2023 at 09:25:17PM -0300, Arnaldo Carvalho de Melo escreveu: >>>>>>>>>>>>>> Em Mon, Jan 30, 2023 at 10:37:56PM +0000, Alan Maguire escreveu: >>>>>>>>>>>>>>> On 30/01/2023 20:23, Arnaldo Carvalho de Melo wrote: >>>>>>>>>>>>>>>> Em Mon, Jan 30, 2023 at 05:10:51PM -0300, Arnaldo Carvalho de Melo escreveu: >>>>>>>>>>>>>>>>> +++ b/dwarves.h >>>>>>>>>>>>>>>>> @@ -262,6 +262,7 @@ struct cu { >>>>>>>>>>>>>>>>> uint8_t has_addr_info:1; >>>>>>>>>>>>>>>>> uint8_t uses_global_strings:1; >>>>>>>>>>>>>>>>> uint8_t little_endian:1; >>>>>>>>>>>>>>>>> + uint8_t nr_register_params; >>>>>>>>>>>>>>>>> uint16_t language; >>>>>>>>>>>>>>>>> unsigned long nr_inline_expansions; >>>>>>>>>>>>>>>>> size_t size_inline_expansions; >>>>>>>>>>>>>>>> >>>>>>>>>>>>>> >>>>>>>>>>>>>>> Thanks for this, never thought of cross-builds to be honest! >>>>>>>>>>>>>> >>>>>>>>>>>>>>> Tested just now on x86_64 and aarch64 at my end, just ran >>>>>>>>>>>>>>> into one small thing on one system; turns out EM_RISCV isn't >>>>>>>>>>>>>>> defined if using a very old elf.h; below works around this >>>>>>>>>>>>>>> (dwarves otherwise builds fine on this system). >>>>>>>>>>>>>> >>>>>>>>>>>>>> Ok, will add it and will test with containers for older distros too. >>>>>>>>>>>>> >>>>>>>>>>>>> Its on the 'next' branch, so that it gets tested in the libbpf github >>>>>>>>>>>>> repo at: >>>>>>>>>>>>> >>>>>>>>>>>>> https://github.com/libbpf/libbpf/actions/workflows/pahole.yml >>>>>>>>>>>>> >>>>>>>>>>>>> It failed yesterday and today due to problems with the installation of >>>>>>>>>>>>> llvm, probably tomorrow it'll be back working as I saw some >>>>>>>>>>>>> notifications floating by. >>>>>>>>>>>>> >>>>>>>>>>>>> I added the conditional EM_RISCV definition as well as removed the dup >>>>>>>>>>>>> iterator that Jiri noticed. >>>>>>>>>>>>> >>>>>>>>>>>> >>>>>>>>>>>> Thanks again Arnaldo! I've hit an issue with this series in >>>>>>>>>>>> BTF encoding of kfuncs; specifically we see some kfuncs missing >>>>>>>>>>>> from the BTF representation, and as a result: >>>>>>>>>>>> >>>>>>>>>>>> WARN: resolve_btfids: unresolved symbol bpf_xdp_metadata_rx_hash >>>>>>>>>>>> WARN: resolve_btfids: unresolved symbol bpf_task_kptr_get >>>>>>>>>>>> WARN: resolve_btfids: unresolved symbol bpf_ct_change_status >>>>>>>>>>>> >>>>>>>>>>>> Not sure why I didn't notice this previously. >>>>>>>>>>>> >>>>>>>>>>>> The problem is the DWARF - and therefore BTF - generated for a function like >>>>>>>>>>>> >>>>>>>>>>>> int bpf_xdp_metadata_rx_hash(const struct xdp_md *ctx, u32 *hash) >>>>>>>>>>>> { >>>>>>>>>>>> return -EOPNOTSUPP; >>>>>>>>>>>> } >>>>>>>>>>>> >>>>>>>>>>>> looks like this: >>>>>>>>>>>> >>>>>>>>>>>> <8af83a2> DW_AT_external : 1 >>>>>>>>>>>> <8af83a2> DW_AT_name : (indirect string, offset: 0x358bdc): bpf_xdp_metadata_rx_hash >>>>>>>>>>>> <8af83a6> DW_AT_decl_file : 5 >>>>>>>>>>>> <8af83a7> DW_AT_decl_line : 737 >>>>>>>>>>>> <8af83a9> DW_AT_decl_column : 5 >>>>>>>>>>>> <8af83aa> DW_AT_prototyped : 1 >>>>>>>>>>>> <8af83aa> DW_AT_type : <0x8ad8547> >>>>>>>>>>>> <8af83ae> DW_AT_sibling : <0x8af83cd> >>>>>>>>>>>> <2><8af83b2>: Abbrev Number: 38 (DW_TAG_formal_parameter) >>>>>>>>>>>> <8af83b3> DW_AT_name : ctx >>>>>>>>>>>> <8af83b7> DW_AT_decl_file : 5 >>>>>>>>>>>> <8af83b8> DW_AT_decl_line : 737 >>>>>>>>>>>> <8af83ba> DW_AT_decl_column : 51 >>>>>>>>>>>> <8af83bb> DW_AT_type : <0x8af421d> >>>>>>>>>>>> <2><8af83bf>: Abbrev Number: 35 (DW_TAG_formal_parameter) >>>>>>>>>>>> <8af83c0> DW_AT_name : (indirect string, offset: 0x27f6a2): hash >>>>>>>>>>>> <8af83c4> DW_AT_decl_file : 5 >>>>>>>>>>>> <8af83c5> DW_AT_decl_line : 737 >>>>>>>>>>>> <8af83c7> DW_AT_decl_column : 61 >>>>>>>>>>>> <8af83c8> DW_AT_type : <0x8adc424> >>>>>>>>>>>> >>>>>>>>>>>> ...and because there are no further abstract origin references >>>>>>>>>>>> with location information either, we classify it as lacking >>>>>>>>>>>> locations for (some of) the parameters, and as a result >>>>>>>>>>>> we skip BTF encoding. We can work around that by doing this: >>>>>>>>>>>> >>>>>>>>>>>> __attribute__ ((optimize("O0"))) int bpf_xdp_metadata_rx_hash(const struct xdp_md *ctx, u32 *hash) >>>>>>>>>>> >>>>>>>>>>> replied in the other thread. This attr is broken and discouraged by gcc. >>>>>>>>>>> >>>>>>>>>>> For kfuncs where aregs are unused, please try __used and __may_unused >>>>>>>>>>> applied to arguments. >>>>>>>>>>> If that won't work, please add barrier_var(arg) to the body of kfunc >>>>>>>>>>> the way we do in selftests. >>>>>>>>>> >>>>>>>>>> There is also >>>>>>>>>> # define __visible __attribute__((__externally_visible__)) >>>>>>>>>> that probably fits the best here. >>>>>>>>>> >>>>>>>>> >>>>>>>>> testing thus for seems to show that for x86_64, David's series >>>>>>>>> (using __used noinline in the BPF_KFUNC() wrapper and extended >>>>>>>>> to cover recently-arrived kfuncs like cpumask) is sufficient >>>>>>>>> to avoid resolve_btfids warnings. >>>>>>>> >>>>>>>> Nice. Alexei -- lmk how you want to proceed. I think using the >>>>>>>> __bpf_kfunc macro in the short term (with __used and noinline) is >>>>>>>> probably the least controversial way to unblock this, but am open to >>>>>>>> other suggestions. >>>>>>> >>>>>>> Sounds good to me, but sounds like __used and noinline are not >>>>>>> enough to address the issues on aarch64? >>>>>> >>>>>> Indeed, we'll have to make sure that's also addressed. Alan -- did you >>>>>> try Alexei's suggestion to use __weak? Does that fix the issue for >>>>>> aarch64? I'm still confused as to why it's only complaining for a small >>>>>> subset of kfuncs, which include those that have external linkage. >>>>>> >>>>> >>>>> I finally got to the bottom of the aarch64 issues; there was a 1-line bug >>>>> in the changes I made to the DWARF handling code which leads to BTF generation; >>>>> it was excluding a bunch of functions incorrectly, marking them as optimized out. >>>>> The fix is: >>>>> >>>>> diff --git a/dwarf_loader.c b/dwarf_loader.c >>>>> index dba2d37..8364e17 100644 >>>>> --- a/dwarf_loader.c >>>>> +++ b/dwarf_loader.c >>>>> @@ -1074,7 +1074,7 @@ static struct parameter *parameter__new(Dwarf_Die *die, struct cu *cu, >>>>> Dwarf_Op *expr = loc.expr; >>>>> >>>>> switch (expr->atom) { >>>>> - case DW_OP_reg1 ... DW_OP_reg31: >>>>> + case DW_OP_reg0 ... DW_OP_reg31: >>>>> case DW_OP_breg0 ... DW_OP_breg31: >>>>> break; >>>>> default: >>>>> >>>>> ..and because reg0 is the first parameter for aarch64, we were >>>>> incorrectly landing in the "default:" of the switch statement >>>>> and marking a bunch of functions as optimized out >>>>> because we thought the first argument was. Sorry about this, >>>>> and thanks for all the suggestions! >>> >>> Great, so inline and __used with __bpf_kfunc sounds like the way forward >>> in the short term. Arnaldo / Alexei -- how do you want to resolve the >>> dependency here? Going through bpf-next is probably a good idea so that >>> we get proper CI coverage, and any kfuncs added to bpf-next after this >>> can use the macro. Does that work for you? >> >> It feels fixed pahole should be done under some flag >> otherwise when people update the pahole the existing and older >> kernels might stop building with warns: >> WARN: resolve_btfids: unresolved symbol bpf_xdp_metadata_rx_hash >> WARN: resolve_btfids: unresolved symbol bpf_task_kptr_get >> ... >> Good point, something like --skip_inconsistent_proto Skip functions that have multiple inconsistent function prototypes sharing the same name, or have optimized-out parameters. ? Implementation needs a bit of thought though because we're not really doing the same thing that we were before. Previously we were adding the first instance of a function in the CU we came across. Probably safest to resurrect that behaviour for the legacy non-skip-inconsistent-proto case I think. The final patch handling inconsistent function prototypes will need to be reworked a bit to support this, since we tossed this approach and used saving/merging multiple instances in the tree instead. Once I've built bpf trees I'll have a go at getting this working. >> Arnaldo, could you check what warns do you see with this fixed pahole >> in bpf tree ? > > Sure. > I can collect this for x86_64/aarch64 too; might take a few hours before I have the results. >> If there are only few warns then we can manually add __used noinline >> to these places, push to bpf tree and push to stable. >> >> Then in bpf-next we can clean up everything with __bpf_kfunc. >