Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp6148475rwd; Wed, 24 May 2023 11:21:59 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ5NbFtNp8r5iTFGHkZQa1ePcS8cMylD73LIVSQlU1tTo/C+/k4U33DP7iHaqyHpIq4LiN/S X-Received: by 2002:a05:6a20:549c:b0:10e:786c:821e with SMTP id i28-20020a056a20549c00b0010e786c821emr1738472pzk.25.1684952519362; Wed, 24 May 2023 11:21:59 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1684952519; cv=pass; d=google.com; s=arc-20160816; b=LJdeGTkRdyT8wABuzW0ddnHxQWRxR9xRQx2SWfrSG/j1b4YQWBKnd39tFus6adUAe8 SM9A6E47SsDwPIqdtSCk3TnKyrECKtjZL6FDFDkapPb+ek6gTNW5uaKBqAnc+wUfSz6P j1yKxQSGDNyEAguYxHLgESaHzIYkRagEkTp/JUapKjzAX0T/ZzUl+3YXYThZjy7Hiw9V hgGY7b0+z68cTDcT+iukMAft4MyH3kaiaKsCuCytHxV6pRnmact9df48KOg4lox7EDGO +ljHBCV8/QPbEPgR41Toi6hOc3NcrBcmmBBsDSHS/v4HnI8If7s8a3eW/hqJs5gtFvxn KkQA== 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=ozvlsrdUFxVL7msJ2TVeuqMFas0UtKC4evxtnlAdSA0=; b=eGeZm0GcFd67LAfuooLK7+S7AzsEXPu5kraglux4esIOwnq5dQeuVkY5udwVUjcITX pSnIw2KXJLLH72Mamd02ZF3o4wGUevzAQRVZfNpJQhDXgpUtStaP/H3sXNtMb7bYkilg BWU0PiNDuZ50c2vIxnmkyUpeGJDYyI06ecoyhIeVv64betECwRkC+fOE+xup3pgb4qLZ Mqkvcy/HpfaerEzgvOzQJSYC9AlpaGZLltPvMFrV1kYj5DDSR52VzxBERnaRd4adk9lv fAzABW1QkRr/hg6n/eiLS6yUgGUbT5lzVKFqlIQ7ZozV7OpSvJ77C+kBBXZavuI6jqvP rcaQ== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@meta.com header.s=s2048-2021-q4 header.b=HRzEiu00; 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 b2-20020a637142000000b005346c49e06csi3695804pgn.834.2023.05.24.11.21.44; Wed, 24 May 2023 11:21:59 -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=HRzEiu00; 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 S236830AbjEXSNR (ORCPT + 99 others); Wed, 24 May 2023 14:13:17 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46988 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236112AbjEXSNQ (ORCPT ); Wed, 24 May 2023 14:13:16 -0400 Received: from mx0a-00082601.pphosted.com (mx0b-00082601.pphosted.com [67.231.153.30]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C5D5DB6; Wed, 24 May 2023 11:13:14 -0700 (PDT) Received: from pps.filterd (m0089730.ppops.net [127.0.0.1]) by m0089730.ppops.net (8.17.1.19/8.17.1.19) with ESMTP id 34OH4xje026238; Wed, 24 May 2023 11:12:53 -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=ozvlsrdUFxVL7msJ2TVeuqMFas0UtKC4evxtnlAdSA0=; b=HRzEiu00hPadvkt72OFUExKP1R4U3bJ/wD01bXLn22YZw38bB2p0HJWsWMoVjd9JOlSL mph1necEa/MomX5zSIdFjvnkSoNx0V1NPnEQVF9wz6No0UZ7A0mRGf0lYW+gfxMFn0/B GKSASnff07HHuxGAb4ZxKSQ19rYHH44YbmvvBhrE/d3Jby+JA/cQekoa3O9CgEYwomi3 7Cf9YNv4jF9JnhQMTQpF5T65uh5qZJRD0/jvaTshMylRsSE4GxVYkkmg3LmVVnfAZ3mM cVrDVY+N0z0yVRr5P+QCpQr6pjXUuOqtx3W+UMWwl0faiCPGldC65u0G1KrXqyGyLSmf Og== Received: from nam10-bn7-obe.outbound.protection.outlook.com (mail-bn7nam10lp2103.outbound.protection.outlook.com [104.47.70.103]) by m0089730.ppops.net (PPS) with ESMTPS id 3qs564f6a7-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 24 May 2023 11:12:53 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=nWpJUdDibzvSt09mRp/ZICjcQdR62xw1YcOpxbp4s86rTM3nhe03wO+Fm7fH1Fg/wQ6nTTIk6FIDiuAhfNQcC3y/gWg7/P45R/4XsQ6qOJBvqL34n42ghOUYSD/fRVzCpVe1hgvmif/J44zw+oNwXmhj2Ur9QPuOYNE+qsi96HvFEWmDobKxlFTLAJbCKpbfHhuX/23AMuZFV/pLr/vA6al1gXzB5djCY4BzOF7c4x+hm4iihtTII2nrPVUwXG7CcMK19O36/meVapsWNcIxrUfU85Pg8myr+kkaj/mtTm2JKOKsHe0eWPtBJVq+jmSZyoyaONnWXNXgomxT+sZcdg== 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=ozvlsrdUFxVL7msJ2TVeuqMFas0UtKC4evxtnlAdSA0=; b=Wk0TjCD9d1b0ki1DwkXKP2CqiKuQ2zQ84VFX6WJaIg9tlC5KgQftMwOsIYTZtuyVXwsQ9Gyn48NxDoWnufybqILleS3CcicTWFg5sIHHndVUSnZSdvtBaVGsotYOLEWqG8FyfbVpxCMPweFYdnWBnAsSoLv3GkJ5C+IEMUrcfJBITpXbWDDdsjYxQo2p2s8iTR1h/3bzkizJCSy3PHD9O0X3Dex5ydDMeZYCzaWJ5CeDMvy489pbdJikUWGYyqCHTANQnAXVG7bwj4MKswf5SFFXuHn794GIObOG+hqrBrvVWX9v5e0Q1lQEIKZMSalIJgL3Fy/eh9pGpsWJmMN0Og== 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 SA0PR15MB3824.namprd15.prod.outlook.com (2603:10b6:806:91::12) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6411.28; Wed, 24 May 2023 18:12:51 +0000 Received: from SN6PR1501MB2064.namprd15.prod.outlook.com ([fe80::589f:9230:518:7f53]) by SN6PR1501MB2064.namprd15.prod.outlook.com ([fe80::589f:9230:518:7f53%7]) with mapi id 15.20.6411.028; Wed, 24 May 2023 18:12:51 +0000 Message-ID: Date: Wed, 24 May 2023 11:12:47 -0700 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:102.0) Gecko/20100101 Thunderbird/102.11.0 Subject: Re: [PATCH 1/2] [v2] bpf: hide unused bpf_patch_call_args Content-Language: en-US To: Arnd Bergmann , Arnd Bergmann , Alexei Starovoitov , Daniel Borkmann , Andrii Nakryiko Cc: John Fastabend , Martin KaFai Lau , Song Liu , Yonghong Song , KP Singh , Stanislav Fomichev , Hao Luo , Jiri Olsa , "Jason A . Donenfeld" , bpf@vger.kernel.org, linux-kernel@vger.kernel.org References: <20230523194930.2116181-1-arnd@kernel.org> From: Yonghong Song In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-ClientProxiedBy: BY3PR05CA0004.namprd05.prod.outlook.com (2603:10b6:a03:254::9) To SN6PR1501MB2064.namprd15.prod.outlook.com (2603:10b6:805:d::27) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: SN6PR1501MB2064:EE_|SA0PR15MB3824:EE_ X-MS-Office365-Filtering-Correlation-Id: f2839dd7-ade2-466c-03e6-08db5c827cef 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: Svao23unqxIQMjGGI8mB8iQRYlVyLTKsMTpeHlXNWpxWUQi2JH0SiK7LHVxDojgvpkcBmKd7ugKnoOcF6u7tIB4YBqHCSOTRGoyNDdLmngFKp7TLYt4aSLvXimFfdqteH2EPZpYNAXFwZUOteKpnUTzI01MLqngJqzUuBhroLb8x5i4yro1FF3ozTY/Ken5Suv225dt6rjbJsgvDdgkPj5ZPPNofZVgCXBF/q8AjQb2qEsD3dmSFFEVgIlfYtYahBvngCbrlDMrTM/w88UPAGUFSwZjC3Gxr9h4iTLlrg9OyD9AQA5uKPaxnFm8O8JzreUrqpMiOrKwd78gc7EXwdaJkEJ6fdV3mZbCBDGCATiVQTIjGvh5k0+JInTCnj5Fy+0cw3DoMOFYSIb9LLO8kbTXBSuavtOu0IOCtCa0+FF5fI3ksUJuKaygIpwGMu1Z07FK756qL33eY3ovozhZ+NtzzvcVOntVR30F83NAA+LFXWhETmJ5Z2v/tUHIJ2jp3dWADgW9Hm0ZbhJSgq/uHua+j7BFYTHO5Xi8wV6SkVh2TRS4Ec9mxLQPtpY/tCPxAJ93pLEoc5R8nTtbPvNUYUPyGiSk7HwSlLlxiwEO5R/QM/rgoNo0QQOzUWsSckQi5J63e+S/x7eY7QpwWyP3sxA== 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)(396003)(136003)(366004)(346002)(376002)(451199021)(53546011)(316002)(186003)(6506007)(86362001)(31696002)(6512007)(2906002)(6666004)(6486002)(8676002)(8936002)(7416002)(36756003)(5660300002)(41300700001)(478600001)(54906003)(110136005)(31686004)(38100700002)(2616005)(66476007)(4326008)(66556008)(66946007)(83380400001)(45980500001)(43740500002);DIR:OUT;SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?B?enltMXorc0lBTlJlK2xpblJsWFRGR2Z6S01QR2NVRkpBWWI1T3c4MnhVYitL?= =?utf-8?B?SDRHSUxWL3JCalpIOTFBMnhDa1orMFBCMVA3dUM3QjYxRis4ZHJtMFFOdzhN?= =?utf-8?B?ZFNkK1ZDc25UMm9JRXhQZEVWSjh0bW1CMTNHcTZXcjEvVXVhaFhIYXE5anhG?= =?utf-8?B?QWhrS2UwY1JOQm05NUJJUm9QTEx6QmxyYzc0akJocDdrMGpLeVdGZTRiMFdV?=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b0VMZ1dobVVhcERu?= =?utf-8?B?TCtpTUdLdW5Ba0tuMk1YeThVMnZIT2tsb0t0cStIL05rdG05Ui9kbXhDZyt0?= =?utf-8?B?TkwwbzFrdlRZelBQRWVsVjlZZGZFVm5Xb2xjUEZYZGk2N3IwaXNROHE1bkwx?= =?utf-8?B?c0E9PQ==?= X-OriginatorOrg: meta.com X-MS-Exchange-CrossTenant-Network-Message-Id: f2839dd7-ade2-466c-03e6-08db5c827cef X-MS-Exchange-CrossTenant-AuthSource: SN6PR1501MB2064.namprd15.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 24 May 2023 18:12:51.6570 (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: 29zDZLndHFNYNc2kH/hC76kpmvG2Qm5gYs8ZX8Ksy1HDvYiYLLqVgsW/yWq4oXcd X-MS-Exchange-Transport-CrossTenantHeadersStamped: SA0PR15MB3824 X-Proofpoint-ORIG-GUID: PObXq0I6aaOKgOCS0-xKr4Bjq_aokTD9 X-Proofpoint-GUID: PObXq0I6aaOKgOCS0-xKr4Bjq_aokTD9 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-05-24_13,2023-05-24_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 5/24/23 6:23 AM, Arnd Bergmann wrote: > On Wed, May 24, 2023, at 05:05, Yonghong Song wrote: >> On 5/23/23 12:43 PM, Arnd Bergmann wrote: >>> From: Arnd Bergmann >>> >>> This function has no callers and no declaration when CONFIG_BPF_JIT_ALWAYS_ON >>> is enabled: >>> >>> kernel/bpf/core.c:2075:6: error: no previous prototype for 'bpf_patch_call_args' [-Werror=missing-prototypes] >> >> If CONFIG_BPF_JIT_ALWAYS_ON is enabled, the definition of >> bpf_patch_call_args should be invisible. Maybe I missed something. >> Could you list *ALL& bpf related config options in your setup >> so people can reproduce you above error messages? > > Sorry, my mistake. I've reworded the changelog now to fix this: > > | This function is only used when CONFIG_BPF_JIT_ALWAYS_ON is disabled, > | but CONFIG_BPF_SYSCALL is enabled. When both are turned off, the > | prototype is missing but the unused function is still compiled, > | as seen from this W=1 warning: > | > | kernel/bpf/core.c:2075:6: error: no previous prototype for 'bpf_patch_call_args' [-Werror=missing-prototypes] > | > | Add a matching #ifdef for the definition to leave it out. > > If this makes sense now, I'll send out a v3. Yes, the above new commit message sounds good to me. Thanks. > > Arnd