Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp1246355rwd; Thu, 8 Jun 2023 14:52:49 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ4Cj7XCU2UXT9dNZH0/+aqkdQfSQ5v5rHZKUvs8S4Cn75C2BzDuC7BERv+XkYlq9+kyFoVL X-Received: by 2002:a05:6a20:8f29:b0:117:a86:6c7a with SMTP id b41-20020a056a208f2900b001170a866c7amr5520299pzk.12.1686261168976; Thu, 08 Jun 2023 14:52:48 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1686261168; cv=pass; d=google.com; s=arc-20160816; b=uUI8rJhvDwaYnzxsrfPmALd+66DMz8UpRHrv35ZFQ0MSFxulzzbce+S0TLAIAUOxdI iVtB1fWqn+D7kkI9hk/1eP23/P+7V1kznMBALPqiCCYsPMQpuI1Y5oOVNqiPa7eir3km 7Mn61q/n/wliKGwaSNAKwJStAmb/mY4SKyp6n3NgIQhdFL+hAtZfq/kyYqtcH/Nzv8lS dLkPPRf5Y3eIeuqpOV2BBIVGsLU1/VNFNFmyboFHDbyZb1Mjqg995eAx+Chrqga+amPS 9iTl1e/8qQTzjqB6Ryap6g8Ub+8WTd2mN4wfKGy9VVOTbO815DFFODuATZSvsW+K7Fc1 EJPQ== 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=n63nSmaJuUIoK1z2sPRQ4AfXZLgi0W4CcBjJZp2U1xk=; b=B4AKsHITcG+6TMrJEVcTPe5vnmLEQ7X6FJcIoGNzgMSsqwy/g0p+0Iz+r4a40rdnb/ wW+CJWjglKpa+r0B+ViFjWcfhSt2w+X1OVnppLoyERuIYx5QQhkC2Trr/pE+WMt6BMn9 memiMPNqGhvm41mNuKuQTFzOnuhGunDiq3r0bKOMxGae5jDQT+gE/necY9hTQ/liRQtc Q4KBdI8XB87jvE3eJ8OCrz9H4xsP16RdFhlv6/TPZEE2ys9mVWldqL157MSWksfGl/Qi +xe/Hz0mI6DYdFlV3dBJ8KYXStNaCea4p/CJXyC6yJ+0PNv8PY9CAufnLgdCixd3gHGg hB/A== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@meta.com header.s=s2048-2021-q4 header.b=SGyiU3ky; 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 c5-20020a6566c5000000b0053fb7968569si1561456pgw.429.2023.06.08.14.52.36; Thu, 08 Jun 2023 14:52:48 -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=SGyiU3ky; 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 S235243AbjFHVH6 (ORCPT + 99 others); Thu, 8 Jun 2023 17:07:58 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58090 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232085AbjFHVH5 (ORCPT ); Thu, 8 Jun 2023 17:07:57 -0400 Received: from mx0a-00082601.pphosted.com (mx0b-00082601.pphosted.com [67.231.153.30]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 1B71F2D42; Thu, 8 Jun 2023 14:07:55 -0700 (PDT) Received: from pps.filterd (m0001303.ppops.net [127.0.0.1]) by m0001303.ppops.net (8.17.1.19/8.17.1.19) with ESMTP id 358Gmvaa020704; Thu, 8 Jun 2023 14:07:11 -0700 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=meta.com; h=message-id : date : subject : to : cc : references : from : in-reply-to : content-type : content-transfer-encoding : mime-version; s=s2048-2021-q4; bh=n63nSmaJuUIoK1z2sPRQ4AfXZLgi0W4CcBjJZp2U1xk=; b=SGyiU3kyk73AlxxlhOo8+ommK54fye8xSPI2cQeJ+CnU+/txGJaPhnb71JELAaeDUT0v gl0Ck4adRxqe5mJ+9ioncAVVzQIx+84JuCTEshBemeDE2ZwWNEYHm6+aHGVpk2nVKfCd SVj35SEwiPy7yBDiIQyxoFGLzyjBNbLeqwOlLlY7rOQRwPO9o/CHRyX43hvIA2Sx14tX HfbP4nJ7nd1lAqgxjLZ7rO3laMiSjSy0zEakjZCwqbXPPGK7QMGzIyO7BYhDq90aGcQo 6mLYJRzcfuKZYkn+KV8pmEskOJ+I8iTd+vMTIS6GWwb/Cr7H5zS81a9mtVWbaPinLFx3 YQ== Received: from nam11-bn8-obe.outbound.protection.outlook.com (mail-bn8nam11lp2169.outbound.protection.outlook.com [104.47.58.169]) by m0001303.ppops.net (PPS) with ESMTPS id 3r34d0yaqr-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 08 Jun 2023 14:07:11 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=ahBET+gjuCryrG72W7denPT0LUI8KM0C9UnjHKBBdOQZ0Y3zLsyQBbKMGqbEcpNUGyln3QwLhYmakYPacc2/hSylirD9u2zXq58miUDF3E5zdCwgFWBVkCrYLybnd+zkNAqV/BFo1sJE3tW0Kln4kZyJbZh+v4hRDhyWxPtPHRb/4FzrdWpo6mpz7N5d38HE0iRQ2P1ApozEP3gd84l7BogpxV2z0zVftUiJoYgpNlHxW18jpjflpGeckwM3DxN3rdHV14L52Y5Pslhql7O7q1Mh4Xu9WDnhikSDiSJbaSBGGBCFDZlAjasDcUCsJ8GM5UdSmRzwz7bqcIPbbUUrrw== 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=n63nSmaJuUIoK1z2sPRQ4AfXZLgi0W4CcBjJZp2U1xk=; b=hQ/mb9RFn/R4sozFZCo/FU1LqvzcSitqkbTJMcdv+f3wMk7iJgbL80cFCwlBL4x9txz1adj5Lg0R6l0D++YjIcaGc++hA37/5xIqWxejC8M5maLrAD1gusatb7wEcPj2PW14Oe6OMHlUFWcJZnEYTkp/c5iuR4/v1U2fwRjWLq+gUkcpf8qls6SyRoYOXFkbxbvQR+lqT886bTPM6y/CrxxTcp4XCu2g9WUNVThnnQeoowDM4JLdNgv/JhYpbD45KguU5ocqSWSFchAKFBUxSqO/z0BUKC8KUWs0TaciI8bsgfPlBIc3b80PlThoPmg8o53A4o9HaeRMAy5ZIDJJNQ== 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 SJ2PR15MB5647.namprd15.prod.outlook.com (2603:10b6:a03:4d1::16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6455.36; Thu, 8 Jun 2023 21:07:09 +0000 Received: from SN6PR1501MB2064.namprd15.prod.outlook.com ([fe80::bf7d:a453:b8d9:cf0]) by SN6PR1501MB2064.namprd15.prod.outlook.com ([fe80::bf7d:a453:b8d9:cf0%6]) with mapi id 15.20.6455.030; Thu, 8 Jun 2023 21:07:08 +0000 Message-ID: <4ca27e23-b027-0e39-495b-2ba3376342cc@meta.com> Date: Thu, 8 Jun 2023 14:07:05 -0700 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:102.0) Gecko/20100101 Thunderbird/102.11.2 Subject: Re: [PATCH bpf-next v3 1/3] bpf, x86: allow function arguments up to 12 for TRACING Content-Language: en-US To: menglong8.dong@gmail.com, alexei.starovoitov@gmail.com Cc: davem@davemloft.net, dsahern@kernel.org, ast@kernel.org, daniel@iogearbox.net, andrii@kernel.org, martin.lau@linux.dev, song@kernel.org, yhs@fb.com, john.fastabend@gmail.com, kpsingh@kernel.org, sdf@google.com, x86@kernel.org, imagedong@tencent.com, benbjiang@tencent.com, netdev@vger.kernel.org, bpf@vger.kernel.org, linux-kernel@vger.kernel.org, linux-kselftest@vger.kernel.org References: <20230607125911.145345-1-imagedong@tencent.com> <20230607125911.145345-2-imagedong@tencent.com> From: Yonghong Song In-Reply-To: <20230607125911.145345-2-imagedong@tencent.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-ClientProxiedBy: SJ0PR13CA0086.namprd13.prod.outlook.com (2603:10b6:a03:2c4::31) To SN6PR1501MB2064.namprd15.prod.outlook.com (2603:10b6:805:d::27) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: SN6PR1501MB2064:EE_|SJ2PR15MB5647:EE_ X-MS-Office365-Filtering-Correlation-Id: d781b75c-4733-41f5-6d3b-08db6864520a 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: mhbHtT4SHGVbjeG9+peYTt0TTV7rEqv9lHgRArqxTHCNuMGnRpyIPIj8pLZbY4oERhHtcDW36KooCZGu6rjWd7cmwVh+9nCZ6sVgqlq6XnqwABaaY3GcXbK7cFhg0FVcwMhXZ248/Thh1233YT62SI8seMFlw13pPGw0YKBT7BCsrkhyo+X7l02T+g7pQDBLBTXAfc0iqEHAZv/o6bpEIbjiMzu09bdk2refV2xC72OUKPvks7lJOea5H2BiXN6qaLcWzoDvkEAbKuuSkdpAU+OfYsPef2AkHu/yN+R5NIPoV3Uuj1mCnrvuBPPmDR4AzMISidoRARNBCiTJ0Gm61Pl6R7SstRaH6Wp01DeH/MadvDNhkMrxmj9uq5LB6bhvrAPN91gR6eiDunBQmanBjm0bjWVbWUog+po5yIGN3xIxAffY6KlC1umesiT4aLlN027tGrVUZgMG7eCGl7GxooBpOprGeowfGbn1z2VIMbOD8/czEp4iO35W1hRAwJ8wXgeE9uU0OAgdLp2apoZm8VvxEJrA0BrE2/kEV5g76aGqn+2dS+GBk5rmFwP0PY+s89/V6mCchOIT7rGCUQcKmRSEROxGKZ+7EwBHCz5kRXdhPa0gfYY4j2wHLm4rOsC4jW6lKAr/FXTMKHh1sEgdhw== 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)(366004)(136003)(376002)(346002)(396003)(39860400002)(451199021)(31686004)(6512007)(6506007)(41300700001)(5660300002)(186003)(53546011)(36756003)(7416002)(4326008)(66476007)(66556008)(6666004)(66946007)(8936002)(83380400001)(8676002)(2616005)(478600001)(2906002)(86362001)(31696002)(6486002)(316002)(38100700002)(43740500002)(45980500001);DIR:OUT;SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?B?UG12aUVrWGNFL3FCYllTRGVqSVhiZytIRUJxRE95NE9IRzlGd1NQ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xSEI2ZVBMMU1MQjJkVWJkWVVWeHo3OVdDWXZqUGxmeTV3?= =?utf-8?B?azVwcWxWVk1FSlIyYXR5bTRhNDljSXEzckhEb1JQQzdYanFlNjNVem5HcnJW?= =?utf-8?B?ZjFYbHRsUVhHbkZ4VHFvWjl3U3VuaHVUR2pFU0xYK3JsWFRGRHM3bW84UUM2?= =?utf-8?B?MG9sZ1IrQWx2SU9kSDVJZVg0NVI4UE9vb3IvYVpMdFVHbFNQb2FwT0pjMURW?= =?utf-8?B?Q00xUURJZGh6YjFhU2RNb3FydThFS3FBQ2ZjbHljbFpBejZiNE9OOVdnK1dY?= =?utf-8?B?T0hRV21yL3VIQW9YaVA4ZEJqdWhFSy83YjFWT0pCeWt3K2QzRVQ2SWdHc2ty?= =?utf-8?B?MFE9PQ==?= X-OriginatorOrg: meta.com X-MS-Exchange-CrossTenant-Network-Message-Id: d781b75c-4733-41f5-6d3b-08db6864520a X-MS-Exchange-CrossTenant-AuthSource: SN6PR1501MB2064.namprd15.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 08 Jun 2023 21:07:08.9294 (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: qSWejcwrRj5TwA/CTWfDHqTWtaVG4UtUrNfnze6Y307H5qyX45TW/kPN2oc6P7QA X-MS-Exchange-Transport-CrossTenantHeadersStamped: SJ2PR15MB5647 X-Proofpoint-GUID: 2JpqSjwo74rTcOOZSe2HqLP4KWF56roJ X-Proofpoint-ORIG-GUID: 2JpqSjwo74rTcOOZSe2HqLP4KWF56roJ X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.254,Aquarius:18.0.957,Hydra:6.0.573,FMLib:17.11.176.26 definitions=2023-06-08_16,2023-06-08_01,2023-05-22_02 X-Spam-Status: No, score=-2.9 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 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 6/7/23 5:59 AM, menglong8.dong@gmail.com wrote: > From: Menglong Dong > > For now, the BPF program of type BPF_PROG_TYPE_TRACING can only be used > on the kernel functions whose arguments count less than 6. This is not > friendly at all, as too many functions have arguments count more than 6. Since you already have some statistics, maybe listed in the commit message. > > Therefore, let's enhance it by increasing the function arguments count > allowed in arch_prepare_bpf_trampoline(), for now, only x86_64. > > For the case that we don't need to call origin function, which means > without BPF_TRAMP_F_CALL_ORIG, we need only copy the function arguments > that stored in the frame of the caller to current frame. The arguments > of arg6-argN are stored in "$rbp + 0x18", we need copy them to > "$rbp - regs_off + (6 * 8)". Maybe I missed something, could you explain why it is '$rbp + 0x18'? In the current upstream code, we have /* Generated trampoline stack layout: * * RBP + 8 [ return address ] * RBP + 0 [ RBP ] * * RBP - 8 [ return value ] BPF_TRAMP_F_CALL_ORIG or * BPF_TRAMP_F_RET_FENTRY_RET flags * * [ reg_argN ] always * [ ... ] * RBP - regs_off [ reg_arg1 ] program's ctx pointer * * RBP - nregs_off [ regs count ] always * * RBP - ip_off [ traced function ] BPF_TRAMP_F_IP_ARG flag * * RBP - run_ctx_off [ bpf_tramp_run_ctx ] */ Next on-stack argument will be RBP + 16, right? > > For the case with BPF_TRAMP_F_CALL_ORIG, we need prepare the arguments > in stack before call origin function, which means we need alloc extra > "8 * (arg_count - 6)" memory in the top of the stack. Note, there should > not be any data be pushed to the stack before call the origin function. > Then, we have to store rbx with 'mov' instead of 'push'. > > We use EMIT3_off32() or EMIT4() for "lea" and "sub". The range of the > imm in "lea" and "sub" is [-128, 127] if EMIT4() is used. Therefore, > we use EMIT3_off32() instead if the imm out of the range. > > It works well for the FENTRY and FEXIT, I'm not sure if there are other > complicated cases. MODIFY_RETURN is also impacted by this patch. > > Reviewed-by: Jiang Biao > Signed-off-by: Menglong Dong [...]