Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp1234404rwd; Thu, 8 Jun 2023 14:35:43 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ6vSl1ZyNXOS8CJC13ng8WSvHkBLeGDMnq+jUaXbbUsKTh3V7aGUCKFx73p8wUKnFeZeFGK X-Received: by 2002:aa7:88c3:0:b0:64d:5f1d:3d77 with SMTP id k3-20020aa788c3000000b0064d5f1d3d77mr12180702pff.34.1686260143616; Thu, 08 Jun 2023 14:35:43 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1686260143; cv=pass; d=google.com; s=arc-20160816; b=NHBkHn6VLvbZTArd+6KdDbTVpXe+ld3HP9cKSSQnjoL6sFY03xBj1yz0KHQsGXv+XV NKx4SFAcdS45xFa2h6Y0DyGNQlcSpMdbgZ0O4orvlxV1kwsNRmqfprI+6q2qQjMU5XQx vrvcaFGBMsXbSKUY3Mqbsuj/AYIrkHf+hX3bfpmkjTUBEzto/QenuGJaxpGUyOW31x0a 3x0Gf2Zdqvt8X9+6ZXfkf7mjVXONLaY/ZQRHoVygKsc1XOP0zM5K7AzdaWkHveLmuI5c 769X1VwgmnPazm5V3TAJAw24YHWSAwFjenydxVDwywTZeCqebSqHO9g4ek71LysAAl9n 6pLA== 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=4wr8b+paBWEP/y+xRSVouRil5605j63PYXpW58nMnXo=; b=DjrCOs85KLfvwAAPcU9nWZdVEQSPmS2Eiaeu5zGUiU+ZPLJICV2zDJXqPjMTghL1Y1 GErVUlMO6n49r69oYQwuYfoMpjPiOTyQtsiSEZU8W2p+Bw45pStG1AQ6lxrN0VDe8UOS yjTWWMdizpgAhT+oRMBB1yiwQj9glRUeWRgyMNkSw5NGwF3579mZW+RmNSYUKwuUU5Sv hbZAWhOWd+vMNyNcOirPSwJaG1skoE+m4bnqx5LKhpxjGgw4FZLFKaauXk9ZpiYHLYRO URTRUI+/CG0yDmAlinV2icGQ66rBeqFv+WwV4MoE7gaChpWC3w+OC5RFJ+htshYk2ahJ QDRg== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@meta.com header.s=s2048-2021-q4 header.b=h3xa74gD; 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 v135-20020a63618d000000b0053ef5472637si1549110pgb.150.2023.06.08.14.35.30; Thu, 08 Jun 2023 14:35:43 -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=h3xa74gD; 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 S237006AbjFHVNn (ORCPT + 99 others); Thu, 8 Jun 2023 17:13:43 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:32990 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S237008AbjFHVNl (ORCPT ); Thu, 8 Jun 2023 17:13:41 -0400 Received: from mx0b-00082601.pphosted.com (mx0b-00082601.pphosted.com [67.231.153.30]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9F6E12D74; Thu, 8 Jun 2023 14:13:39 -0700 (PDT) Received: from pps.filterd (m0148460.ppops.net [127.0.0.1]) by mx0a-00082601.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 358GmS3G016818; Thu, 8 Jun 2023 14:12:55 -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=4wr8b+paBWEP/y+xRSVouRil5605j63PYXpW58nMnXo=; b=h3xa74gDN3zwnJKeqqzUAnCkULX5QoMGtpDilB8uRxuJw4Pyeni7H8qKE4iJPaWN0yHN o/7APJaw3C5898r+OHcx93E/gWSfmc1DKW8+kV7B4ay9aqwceZVLW+q0isCzEw+9sHNz XasUy97RiAwjBE026QHSwM9WargRqZLFvHSOLhVbhZWB8uNKu/PYT7c2inb/e2aTZa/y KAA4TPQhs7BJXIt8od6yqcwFHrBiujZo+BFKSnxhmwsH4+VIuEb7WEp+TqL9KHQbqMoK bKOOrOWDecGvIshMRWwIyKnUtoaq27vmX8z+tfdSzwvKnsv/nKHZoVsJ5BuIlEQ/AByk NA== Received: from nam11-co1-obe.outbound.protection.outlook.com (mail-co1nam11lp2177.outbound.protection.outlook.com [104.47.56.177]) by mx0a-00082601.pphosted.com (PPS) with ESMTPS id 3r2qbsn1jd-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 08 Jun 2023 14:12:55 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=AK0EyPaWwEr1kKSazmABeMRU7JCAjTnjQXQur2BCj+g6HEQNXb7Afg/O1pegmafVD61z3U4qPDca0YKSLwritZeEhfvpI/ORYP/hA7WLicizgbUnwvrkefq+TdJ68BNxWJEBVHGDq4M9vt4jlt1LDP5HElWHfxmeh0cPWTLEFjYZa2ZRJAjO1BS1m90/l0Os8cJlt8ts+BxeUInrHT7AzEfxFYxZFUWfX56nmCgluPrLnpH/mjth2cL2fxgc8PNNTwYD0BP51k4XXExneUhy1/s6oW3lBKdscdBf/niqL9lUZv276wlY5/f/wBQHGwoQjwdLchGDxFAqvufCDg6jlA== 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=4wr8b+paBWEP/y+xRSVouRil5605j63PYXpW58nMnXo=; b=icWxDL0O+2YunEGziMRtGIDiXAzT0gG/kUNZteu1qW0hIGBpVN2Jn07qJ8HwkS86ZFp+lE9NOflWQciTZ2HPvPgA56GM/tFkJjFewrmZ7iMp3WcXlt4xX++4r/BJLiaViG1BbK4Uo13RkYzrhr8NISH98L2Zz3Br8pDGYkR3ueiPxd+uvplrH+Oc6X/0yABUngtsN83RShoKVwSl5s7/iRMAZG13n5hvS2y86a7CDyMo2G8rHce/O2zxTYa9As0L3d4CFkH6GR6yVnFFNqbJJZTzA3oMVJ5tkSJtDNW6K8CYNv7Dt1x0xgzBp9MdnMaIJfF+24r96v7vp19idXn3ZA== 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 DM4PR15MB5565.namprd15.prod.outlook.com (2603:10b6:8:10e::16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6455.33; Thu, 8 Jun 2023 21:12:52 +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:12:52 +0000 Message-ID: <2fb8c454-1ae7-27cd-a9fa-0d8dda18a900@meta.com> Date: Thu, 8 Jun 2023 14:12:49 -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: Menglong Dong , Alexei Starovoitov 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> <20230607200905.5tbosnupodvydezq@macbook-pro-8.dhcp.thefacebook.com> From: Yonghong Song In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-ClientProxiedBy: SJ0PR03CA0295.namprd03.prod.outlook.com (2603:10b6:a03:39e::30) To SN6PR1501MB2064.namprd15.prod.outlook.com (2603:10b6:805:d::27) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: SN6PR1501MB2064:EE_|DM4PR15MB5565:EE_ X-MS-Office365-Filtering-Correlation-Id: bf545347-1364-490e-c88f-08db68651f1a 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: lEz6Zf7sfOv8mqiQQq+x1KUJJNVIpOUTU9hQQurv443qR9Cmb5gaOyGzDlPKpoAOx07yYwMGCKptNiiFSzCzRkt81Aw+70Xcd8k5TlMHGw5OiJsD5HVgSXDyiCcWqemJ+QndqYm0NaeVVuMJQoduUS1c8pSqvOxeih6zxOFGYMZ+B8G6ypel5qk3VVGiF9zQRhJZNYtdZR8bpqhuZvbwlFw5UIC+bM2m4w1yZBO+HSFgnYuQi1SuW8dRZv29oCAjlJcwp2ssguGsoLNzKiVVDjrIjcdOc4q8rnjzPZ+Kwh9/BHHrlUnta/Y7Rb51qnNwZwd3bZYuCJbOjfxdDF4MuY/l2idIAmrPE264w28XfdM1SxLfts210g9pRf+3Q2ikI0CXiWB74NY4MIi5a2Zny2YSuDbuDsGVgMstUDW/1/DNDq7Zyk/2T6ejc2+dQG22Mv3Z5dxajj7+OTc+gZhcU66lfZ/k8wqeL1OhPTcccRoJhvI8CFHm59zN1pTGViCIawMUmxGzH0edaYsSxTRArOKb4W+G3cqvRLmLYPchLrBuNgAolpNHGLuFH2tgrE8Ksn7qwl/zDI0QoNio0nqVbtvaYIe1iYOa3+ZQuj0oOBSOvFA5aHS5tbeonnES++zETP3DU86rB1xm8F0vv+HASMIbM32WYduQC0YH4rfGLbc= 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)(376002)(396003)(346002)(39860400002)(136003)(366004)(451199021)(7416002)(31686004)(2906002)(41300700001)(8936002)(5660300002)(8676002)(316002)(66556008)(66946007)(4326008)(110136005)(478600001)(66476007)(6666004)(36756003)(6486002)(186003)(53546011)(31696002)(86362001)(2616005)(6512007)(6506007)(38100700002)(21314003)(43740500002)(45980500001);DIR:OUT;SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?B?ZVovZXVka2NzNUl4UzNMaGhXeCtBMkFZL2h0c2Z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lNWVzdlL1p4L0hjVjVPM2t3NHpzZjFOU2tHNndY?= =?utf-8?B?OFlkSFBTZlNDQmJ6KzAreWl3M29pd0szTExFeUxMbW5pYzNzSXM5Sy9xczA2?= =?utf-8?B?ZE9TYzlpekdXYXpzVmRXV3RieUN6WFYyc3hmbDc1YVhKWXVJbTNBYkRNSk1Q?= =?utf-8?B?ZlBlQXhXbFFyRUM1UUlROEUyc2c3STUzVjJQY3BkWThPMXBIQXB1Nk4xQldx?= =?utf-8?B?dmJqSnpkWjJvNXc2Q1pESHpTT1crZTVFZlh0TkkvUXZQSnFuc01QVjlTcm9R?= =?utf-8?B?LzVONGEyZlEwZVh5TjdVRElMMDVjM1VhdUNES09VZnhrU2xIeU1rM3FNdklm?= =?utf-8?B?M2c9PQ==?= X-OriginatorOrg: meta.com X-MS-Exchange-CrossTenant-Network-Message-Id: bf545347-1364-490e-c88f-08db68651f1a 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:12:52.7842 (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: rLFfQIak2TMBwTyaFgi+HnpKzW4Ydf2SwGYKhAfvuxtfxjR+2VzNO7THnu5YFBtl X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM4PR15MB5565 X-Proofpoint-ORIG-GUID: Nge8sMlHz9LD4SY7U6nYejA66eDt3qU9 X-Proofpoint-GUID: Nge8sMlHz9LD4SY7U6nYejA66eDt3qU9 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 8:17 PM, Menglong Dong wrote: > On Thu, Jun 8, 2023 at 4:09 AM Alexei Starovoitov > wrote: >> >> On Wed, Jun 07, 2023 at 08:59:09PM +0800, 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. >>> >>> 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)". >>> >>> 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'. >> >> x86-64 psABI requires stack to be 16-byte aligned when args are passed on the stack. >> I don't see this logic in the patch. > > Yeah, it seems I missed this logic......:) > > I have not figure out the rule of the alignment, but after > observing the behavior of the compiler, the stack seems > should be like this: > > ------ stack frame begin > rbp > > xxx -- this part should be aligned in 16-byte > > ------ end of arguments in stack > xxx > ------ begin of arguments in stack > > So the code should be: > > + if (nr_regs > 6 && (flags & BPF_TRAMP_F_CALL_ORIG)) { > + stack_size = ALIGN(stack_size, 16); > + stack_size += (nr_regs - 6) * 8; > + } > > Am I right? This is the stack_size, you should ensure stack pointer is 16-byte aligned. > > Thanks! > Menglong Dong