From patchwork Fri May 17 04:28:34 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kris Van Hees X-Patchwork-Id: 13666621 Received: from mx0b-00069f02.pphosted.com (mx0b-00069f02.pphosted.com [205.220.177.32]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 4E85410A13; Fri, 17 May 2024 04:29:58 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=205.220.177.32 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715920202; cv=fail; b=DHOaeJ/t/77x8JlwLLRo4fHbx1BHo40armQ82vx2wfiXuWH4rBaz3TWl9EhzsJquaQRhBTxClLcb+ShqY6cpMwoJV0eGs6yw55l9X33bta8O7ThW5Dw4Vde1GL6WxoifKRwv23pdGA85V97mzYEeWTnTihEl1L2M4+1lZyvO0TU= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715920202; c=relaxed/simple; bh=zhbQW+LxXPbTcLdn9hPTHHSjQcl4AlU135ddDCpB1cE=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: Content-Type:MIME-Version; b=AZm3PAuvVKjDr+ePhJqGECKMFL3ldQ70W4V3K2RqstFfpETmMDS3KJF+bVPMG3TGhjz1yCwnma/wnrE76e72qYvnzIcfgi6oWPdRCj0bC/RhPSxNqjTj/2V38qu1qzVTZ4n7MpM1Pn5Cyjh9l7WmcecEbWv3xgIeSl5akj/4N6c= ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=oracle.com; spf=pass smtp.mailfrom=oracle.com; dkim=pass (2048-bit key) header.d=oracle.com header.i=@oracle.com header.b=BFnF4wCO; dkim=pass (1024-bit key) header.d=oracle.onmicrosoft.com header.i=@oracle.onmicrosoft.com header.b=gQUapfV9; arc=fail smtp.client-ip=205.220.177.32 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=oracle.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=oracle.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=oracle.com header.i=@oracle.com header.b="BFnF4wCO"; dkim=pass (1024-bit key) header.d=oracle.onmicrosoft.com header.i=@oracle.onmicrosoft.com header.b="gQUapfV9" Received: from pps.filterd (m0246632.ppops.net [127.0.0.1]) by mx0b-00069f02.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 44H4TSZG014527; Fri, 17 May 2024 04:29:51 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=from : to : cc : subject : date : message-id : in-reply-to : references : content-transfer-encoding : content-type : mime-version; s=corp-2023-11-20; bh=QJRG+KC/9BUbjtkDUFMm/o8JJ/Thq20RyMzWK1Di0BE=; b=BFnF4wCOMCLP+Gwx5MtrwtmGaI/s6ghCt70PFNGtmxXeDc/mEflBE+9XUIJO8Z0EY7+9 +ut4Gm3ZtbbFuMmLa+ono4Zz4cmcEnKBFRtIAHwtCytYcUMq9AM++6wp8uK9X9JpVKda SFzzDg31EZThSlH9oLA/3ncDExBp32xsemnnV4zzppOevLO2ZCONS0eqXjZt/CCGwqi7 Ft2N8FpQRCxUBBq8079+zgLk5fGMHP4kr9u3ZdwEfPO2eEygsyrdbyFLWFqqdYe04Wve mFCCP7XFPeh+X3xRtQEt4CmiBeeTIdL8EO6qpLSgmjYB4xhxg3uc4obuKW/Z9dxGdj11 pw== Received: from iadpaimrmta01.imrmtpd1.prodappiadaev1.oraclevcn.com (iadpaimrmta01.appoci.oracle.com [130.35.100.223]) by mx0b-00069f02.pphosted.com (PPS) with ESMTPS id 3y3tx38qpm-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Fri, 17 May 2024 04:29:51 +0000 Received: from pps.filterd (iadpaimrmta01.imrmtpd1.prodappiadaev1.oraclevcn.com [127.0.0.1]) by iadpaimrmta01.imrmtpd1.prodappiadaev1.oraclevcn.com (8.17.1.19/8.17.1.19) with ESMTP id 44H3V5YB019247; Fri, 17 May 2024 04:29:50 GMT Received: from nam10-dm6-obe.outbound.protection.outlook.com (mail-dm6nam10lp2100.outbound.protection.outlook.com [104.47.58.100]) by iadpaimrmta01.imrmtpd1.prodappiadaev1.oraclevcn.com (PPS) with ESMTPS id 3y3r88n89f-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Fri, 17 May 2024 04:29:50 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=C+YimvkMr7iv2R8jNO8OKsDmVRoDhJLzd3un6C1QwrwcWFDkCT+1dqt3PPIUNRR6RDqHyp3gB4UhiQQ1Ml32C3fbs5XD2Y/X7edh8xoeI+qjYX+UT2ynbKWV2wbmRDufYBCmsuwugAzGKxEdoz/1UJC5v4gcQOu/eJJyiUsHbaVRKlAmKPSfETRVVktxzuQXiUYmwqXF7FsBW4skTB2BsnS5ClEfbSB7pN3Fm+zOMpY5VjQJXvZuKPpLuIbATdQvo8rZ5nPbLWWosRKhSnhOrDBdxdFrnLaRuElTg96jqAb5Hh8teErCC5Ftfp/DaW7n1OuGOCcaNE0DfknMnhlfXA== 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=QJRG+KC/9BUbjtkDUFMm/o8JJ/Thq20RyMzWK1Di0BE=; b=XPafMlaSpy55FdayH0E7QNlB5fHIM6gzR/nlGN854UYkmEThzcpatXfb4AbHor6KHEA9c43ay8L8QmB+yUGUGE92KYqDkxSYDgFyibopUfPchmVE8dx7a0WwheuCA8REyLsm0pp+QsONlyFCGbBcVI62l6v5hWMv3r9U/uVIfDOLIYM8G7hb3wEcsFq8+MdLCD7ywxDpAa/me2XOBABYOJNgHDCzTZJWbwpn/pcWzO4X3ux598OfRgy6t/S7pdvb50D2tJjyVZkSzHqsG6hN69cs7Q5ljYj+XjZS4GXkC5fvPxdAkO/giqw6ZplgzlWF/h9tA6DU1QHdh9G/SaQTXA== 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=QJRG+KC/9BUbjtkDUFMm/o8JJ/Thq20RyMzWK1Di0BE=; b=gQUapfV9PHhoRo4hUpIuFA2rMofWCezw/uHOQombh+9VXQEGdc7H5+HDbJ4AMOqwKVy90XjIZTTEOZ9GJfAsc/N1FVeW9wSrLOLRkKfKIx8ViCoD9mG/8aeLN27HcpaQ8mOr01Pvc5JUNB08oWPKaZLdcet7or7bQBuwT9kDC4c= Received: from SN7PR10MB6287.namprd10.prod.outlook.com (2603:10b6:806:26d::14) by LV3PR10MB7746.namprd10.prod.outlook.com (2603:10b6:408:1bb::8) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7587.28; Fri, 17 May 2024 04:29:49 +0000 Received: from SN7PR10MB6287.namprd10.prod.outlook.com ([fe80::6c60:5db4:7058:1440]) by SN7PR10MB6287.namprd10.prod.outlook.com ([fe80::6c60:5db4:7058:1440%6]) with mapi id 15.20.7587.026; Fri, 17 May 2024 04:29:49 +0000 From: Kris Van Hees To: linux-kernel@vger.kernel.org, linux-kbuild@vger.kernel.org, linux-modules@vger.kernel.org, linux-trace-kernel@vger.kernel.org Cc: Kris Van Hees , Masahiro Yamada , Steven Rostedt , Luis Chamberlain , Masami Hiramatsu , Nick Desaulniers , Jiri Olsa , Elena Zannoni Subject: [PATCH v3 1/6] kbuild: add mod(name,file)_flags to assembler flags for module objects Date: Fri, 17 May 2024 00:28:34 -0400 Message-ID: <20240517042839.544650-2-kris.van.hees@oracle.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240517042839.544650-1-kris.van.hees@oracle.com> References: <20240517042839.544650-1-kris.van.hees@oracle.com> X-ClientProxiedBy: MN2PR14CA0004.namprd14.prod.outlook.com (2603:10b6:208:23e::9) To SN7PR10MB6287.namprd10.prod.outlook.com (2603:10b6:806:26d::14) Precedence: bulk X-Mailing-List: linux-modules@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: SN7PR10MB6287:EE_|LV3PR10MB7746:EE_ X-MS-Office365-Filtering-Correlation-Id: cd543ebc-361a-4edc-c278-08dc7629fce9 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230031|366007|376005|7416005|1800799015; X-Microsoft-Antispam-Message-Info: r47Bfgb1mpR2OlpNw50mXcWBRpsiMjZVcKLQXKDi7KIosl1pe3DTM2DVln/US65dwBkw2mgbu9e02XXzqxsAWZMsK9Qh8ohXSe2ZohOtWHgwfcgisVdnocDeLfRgxDSvrJGWpON/dxUFpeQTKvswFwfZQUP4/gtSlXSqxHnWfTgWKSUgQbRTw60n7dTvTwDvfKwKksjNQwFoZ06doLjJPWkacguc5taEek7wb82t5BzB+8QnjBgxCXWdtmuKfu5oCidkIUQ2+ZM7e3RcWTgTwwQiiqJ18oP0dub2dIVy4m33ibQOArrOZlPGcDrN3e1byc1+QmMa8qDSiJf1QGbD52dAWDwtaR7W/kd4K7UmRY/AipjMP8e3IDha2dxw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wpcWyjj9WqmkFdDqtoTsYjJTlPFLuCkg+DTVdDSkimF5JsUkKFAC+qw6lJ27bEvI5hsZ6nvcQV8XH/pkvQ83pfC1h2lv30oBZsr99A8GchgkAVsu8RSihUF5vglbYcPsTpJ7JOP7Xyfb1eWFxsAYse6rcfLzGexuZly0EMklN7x+OrfefiA0nJGWF5Fc1+SaYeDv4nue4QranHIzk5ccr2QmBzr+KKKjAAs4lLbdP88TxRKm8RxhClkZd2d6UM= X-OriginatorOrg: oracle.com X-MS-Exchange-CrossTenant-Network-Message-Id: cd543ebc-361a-4edc-c278-08dc7629fce9 X-MS-Exchange-CrossTenant-AuthSource: SN7PR10MB6287.namprd10.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 17 May 2024 04:29:48.9358 (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: kviaSzCD+UdhEauziaHY8bc75Su2WO+Jyr9Z6U3+ZEiVxrbTMTOnEBcD+2fVPbTys8ukb9DNK8PxfBja6LAe1BxYNaZKIhfaZ6vNZ3HHVlI= X-MS-Exchange-Transport-CrossTenantHeadersStamped: LV3PR10MB7746 X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1039,Hydra:6.0.650,FMLib:17.11.176.26 definitions=2024-05-16_07,2024-05-15_01,2023-05-22_02 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 adultscore=0 bulkscore=0 mlxlogscore=808 spamscore=0 suspectscore=0 mlxscore=0 malwarescore=0 phishscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2405010000 definitions=main-2405170034 X-Proofpoint-GUID: uldlBBVoi5tK_xyHURXYXVKUsbNLhixy X-Proofpoint-ORIG-GUID: uldlBBVoi5tK_xyHURXYXVKUsbNLhixy Module objects compiled from C source can be identified by the presence of -DKBUILD_MODFILE and -DKBUILD_MODNAME on their compile command lines. However, module objects from assembler source do not have this defines. Add $(modfile_flags) to modkern_aflags (similar to modkern_cflahs), and add $(modname_flags) to a_flags (similar to c_flags). Signed-off-by: Kris Van Hees --- scripts/Makefile.lib | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/Makefile.lib b/scripts/Makefile.lib index 3179747cbd2cc..a2524ffd046f4 100644 --- a/scripts/Makefile.lib +++ b/scripts/Makefile.lib @@ -234,7 +234,7 @@ modkern_rustflags = \ modkern_aflags = $(if $(part-of-module), \ $(KBUILD_AFLAGS_MODULE) $(AFLAGS_MODULE), \ - $(KBUILD_AFLAGS_KERNEL) $(AFLAGS_KERNEL)) + $(KBUILD_AFLAGS_KERNEL) $(AFLAGS_KERNEL) $(modfile_flags)) c_flags = -Wp,-MMD,$(depfile) $(NOSTDINC_FLAGS) $(LINUXINCLUDE) \ -include $(srctree)/include/linux/compiler_types.h \ @@ -244,7 +244,7 @@ c_flags = -Wp,-MMD,$(depfile) $(NOSTDINC_FLAGS) $(LINUXINCLUDE) \ rust_flags = $(_rust_flags) $(modkern_rustflags) @$(objtree)/include/generated/rustc_cfg a_flags = -Wp,-MMD,$(depfile) $(NOSTDINC_FLAGS) $(LINUXINCLUDE) \ - $(_a_flags) $(modkern_aflags) + $(_a_flags) $(modkern_aflags) $(modname_flags) cpp_flags = -Wp,-MMD,$(depfile) $(NOSTDINC_FLAGS) $(LINUXINCLUDE) \ $(_cpp_flags) From patchwork Fri May 17 04:28:35 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kris Van Hees X-Patchwork-Id: 13666622 Received: from mx0a-00069f02.pphosted.com (mx0a-00069f02.pphosted.com [205.220.165.32]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id D8B28387; Fri, 17 May 2024 04:30:34 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=205.220.165.32 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715920236; cv=fail; b=NAulgZJZI8EDPoFhNj1ryuu3pCBRdUUdDqJmi5dn+9htxTkG6Nu0X5nKuxS9P+//VeCazQLwkfzzGEfUrTrCjCqrpc2TJR79NEDTPzyIJ/kd1WlB0YlDMhJt82bGXMPZL7Ok9CFzrRAzBQinwMujI03qj7AXf3tRnt/N6GFJXxg= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715920236; c=relaxed/simple; bh=AJPLxIgTQN5MeH34haX3Bwm+ESrZC371/+OYntIkwrE=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: Content-Type:MIME-Version; b=d3nCc+iOXa28PsMtZLTi0B1moF4PrNZN17DF+0hfwiYN/18rUrDIiM16zFevlNZEufnHQu3oBfH3YBumcUFh6Of9qEwso1J738y4GkbLRjKvTK0oejk5AqGX3bLSoLgGn5I1WVPIlrTXcU85yu5PWLvfOtwtfw6J0LUS1k3oRPQ= ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=oracle.com; spf=pass smtp.mailfrom=oracle.com; dkim=pass (2048-bit key) header.d=oracle.com header.i=@oracle.com header.b=DdAceTl4; dkim=pass (1024-bit key) header.d=oracle.onmicrosoft.com header.i=@oracle.onmicrosoft.com header.b=zcsu+jEm; arc=fail smtp.client-ip=205.220.165.32 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=oracle.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=oracle.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=oracle.com header.i=@oracle.com header.b="DdAceTl4"; dkim=pass (1024-bit key) header.d=oracle.onmicrosoft.com header.i=@oracle.onmicrosoft.com header.b="zcsu+jEm" Received: from pps.filterd (m0246627.ppops.net [127.0.0.1]) by mx0b-00069f02.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 44H4TcMq030559; Fri, 17 May 2024 04:30:27 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=from : to : cc : subject : date : message-id : in-reply-to : references : content-transfer-encoding : content-type : mime-version; s=corp-2023-11-20; bh=yTfNWkHczGxqHgBXFduxFRIOW5/085LatbuwWZD6VyI=; b=DdAceTl4hnDaE0RPUk9C91IgjSJS/6D7NKn9RpYMjIY+ICxjDgEPZjsrfISKwo2UXGuG mX40dPHb7YKVpW7aHGW2uP+1Ssxz1or8ktmqP/QULiGlaenoRqp8H+mOs6jQPsXFm9vT ATO+APnmGI6RUtqxNSmsyJpTXCqpxd5u7PimaWgX7Ag3CJfVhVfoK7vErgJFWr88XHw5 TrwDCqUZYmIwg6UsglZ/ooqiLgEWyUba+JY1rUis47J3U73WCSCPF+4GkkK8UyOrrVCE NF1nvN8mwGvLY36rVj33M2FPrM/hVBivZlFeuuExpYarX+RRwp3jENwNNIbZRYHj0GMb DQ== Received: from iadpaimrmta02.imrmtpd1.prodappiadaev1.oraclevcn.com (iadpaimrmta02.appoci.oracle.com [147.154.18.20]) by mx0b-00069f02.pphosted.com (PPS) with ESMTPS id 3y3t4ry2vp-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Fri, 17 May 2024 04:30:26 +0000 Received: from pps.filterd (iadpaimrmta02.imrmtpd1.prodappiadaev1.oraclevcn.com [127.0.0.1]) by iadpaimrmta02.imrmtpd1.prodappiadaev1.oraclevcn.com (8.17.1.19/8.17.1.19) with ESMTP id 44H11bLr005992; Fri, 17 May 2024 04:30:25 GMT Received: from nam11-bn8-obe.outbound.protection.outlook.com (mail-bn8nam11lp2173.outbound.protection.outlook.com [104.47.58.173]) by iadpaimrmta02.imrmtpd1.prodappiadaev1.oraclevcn.com (PPS) with ESMTPS id 3y1y4b3nf5-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Fri, 17 May 2024 04:30:25 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=JMaLy+cUlPHk1UVMH0y7Wlr4a6GlImjh6GoFbXYzI0CbjqhcEo0uGdFy4hXXQZgbrydckwWX/yCwsvo5REFwteNSw1vkBN0lO55Y9pBGoFWZmf87HlI5YpAWBdCj6A9B9iHoKSHpyqlrI55aRvp9Jvwfo5I77Nqyc0lv2aQqpX+lu+s6CR+Yi+4hjRD1RwJeBOXAPvsjfDHNdDLRzh3qsjCILAKle12J5z4H75+cjf4yr6Pfm7V84H8P9owyAsua+KQsE8wbvFVckvbZoyqd5O4DzPEsZPqb/95TLZ779zybr+z9K4qpAJ7ceRj4H2BfH7ew6TtXh10j/R8Yl2Rc5Q== 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=yTfNWkHczGxqHgBXFduxFRIOW5/085LatbuwWZD6VyI=; b=Wqr2XPC+fw5rRpSpv57JvjiISNqa00tgrbsC+zFaxSMlTdmSLRwHgtNmkffsrJoFBdsjOqOGTVKRo2+FY9j3XyP0wg9OT4+CT9PpzIQqh2j6rnMU2LvoBrvYByUOVqonK2PM6+UGNO8TuDDKi2jj1075nCBdhwliNGczd9SFrVGIiSoapFQzCfMAOLhRG1GUu7Z5RYV1shdm/Rpa5oIBHSy09IwhrFnWzBTURb5JolS5dBHWFj+lDfkEh5aMlhClQVq9WngkOOinFclwlLkhlTBJn4QESEadUxSqMK65Wak5jILFwdm0IPLAPhEdyALMbD428DJtZSRC8ZbRjkFjcg== 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=yTfNWkHczGxqHgBXFduxFRIOW5/085LatbuwWZD6VyI=; b=zcsu+jEm9ObOWH5/TZPbV4X36+y9AKDkKueYpAwm3Ywav3rfE1nNQNlLq8OsFrJbRKUiygJDvrS5+vmi7tD9r6seTBeMjWQh5WdPfHtfYl3XhUSe8MXn28L01NL7i/U12O2PbJQN+CW/iDUgPfZLk0hkdDLhLuKSHg+DLRQOWcE= Received: from SN7PR10MB6287.namprd10.prod.outlook.com (2603:10b6:806:26d::14) by LV3PR10MB7746.namprd10.prod.outlook.com (2603:10b6:408:1bb::8) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7587.28; Fri, 17 May 2024 04:30:23 +0000 Received: from SN7PR10MB6287.namprd10.prod.outlook.com ([fe80::6c60:5db4:7058:1440]) by SN7PR10MB6287.namprd10.prod.outlook.com ([fe80::6c60:5db4:7058:1440%6]) with mapi id 15.20.7587.026; Fri, 17 May 2024 04:30:23 +0000 From: Kris Van Hees To: linux-kernel@vger.kernel.org, linux-kbuild@vger.kernel.org, linux-modules@vger.kernel.org, linux-trace-kernel@vger.kernel.org Cc: Kris Van Hees , Nick Alcock , Alan Maguire , Masahiro Yamada , Steven Rostedt , Luis Chamberlain , Masami Hiramatsu , Nick Desaulniers , Jiri Olsa , Elena Zannoni Subject: [PATCH v3 2/6] trace: add CONFIG_BUILTIN_MODULE_RANGES option Date: Fri, 17 May 2024 00:28:35 -0400 Message-ID: <20240517042839.544650-3-kris.van.hees@oracle.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240517042839.544650-1-kris.van.hees@oracle.com> References: <20240517042839.544650-1-kris.van.hees@oracle.com> X-ClientProxiedBy: BL0PR0102CA0050.prod.exchangelabs.com (2603:10b6:208:25::27) To SN7PR10MB6287.namprd10.prod.outlook.com (2603:10b6:806:26d::14) Precedence: bulk X-Mailing-List: linux-modules@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: SN7PR10MB6287:EE_|LV3PR10MB7746:EE_ X-MS-Office365-Filtering-Correlation-Id: 3cbd9ec9-026f-4ec3-403e-08dc762a119c X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230031|366007|376005|7416005|1800799015; X-Microsoft-Antispam-Message-Info: lrDQuP8mXZFOk4Al60ART/Izdcd6RpqmP+q/LOQu7fNnKjdFsVQ7kw4gQSwmXCLtHnDBfJFahgkEt50nh31vsqHH4JBWoqVyCgvC4/BRlckoPp8CFKkQhW+DtuP9zMjVkuNvU9Rvt/B2v1KiWcGSk3diFdJKgKyXidjGBWirGdtSCwkijbkEi6HUYmXZBn04rclPahrl1s/zDssWCrQIZBe7Ucrpeudz70o5YI7f+Y6MECGBRHhatpYv/476mDHkbCziiqdWSSN8nJFk0j2xzK0La7kVVBRlPdwfa6/1bxq+/GDaTO4Drk0bUHRN5c2uMsQXJVD5e/16pl76u0lfPZiaxbpVzXnqCA46zoSlboOJ0m54eRFaGMfcsJMvvy4GeGSVkyemj+rZHCcPa8PLroxDyFhrzfRhmhZVLQIt/ryZ5Ew5pxD/KvxSg/VPQHcV02KPbVOOTXDs/6c7CeV6P3iHwym0jBs4N6RK0cU5arkDot2Br1o3W075qhTVr3OO9DcVm8JaEYrmyKpB/q0jIGeVR91tQqXXGreJdGNwCr5G/HlwR7GnogSH4XrRooRKWcWmg0yUVYebdcjJhs6JIeqsXaC7Db01vqfzjG85bo/nfYIklb6PvXH/7o6TfLVvIp4mTNqgHdBIhcM6beahAIKyTfgsL2BKf6WPZQj53HBKV0+gvUGrQ2ypoA5YI+jpw+RWf4FBRieY2Id0v/u6JhUpS7P2PINqwnmR5CfW8beLFIgwo3sNPsAUxWkbqnb1fyybn3KKNZ1chhTEb+i3EKUqd9GzKtghZNWoJ8BbCHzFywXVEkvIVSZehpSfWQyherwz+uu/XyDHc+4KFxuwX1k8mLSQEMJ9k2hsPmqegFxwDd1BRCRf3sJ+Io+FqmUrib5FcIhLP9ozHLs8Mp4rRZuiXPVUzVYVAJrpdyXaTSCxDcTvJ4woB9afVvLwQPsfsFBd1r7sufJlUtTKrM9mU1+tzSB0lCcEEEPcSxulYvu6tt3E2M8OJN+aP6j2x68IbiZo7R7uHNd1lTSCUO8/jnBrGFY/CtWB4tIaUbo+CF0QfTalbh/WJ+hRy5QudDKmFpBi8LDs27JqCqY5CB25Uy4rKaohY4HrpCgGAGLmc37//PHpUGMFcd7Z2T+AwiO3Pia/OIlNDxW+NvBaOuqm6IBg5k565nSKtRNg8dTQpfgzSeH+zZCYmhPkau6iLCxuaQEYiyerft66gWNpu67wIJFWovt6xHM9h5X7NyFYyLoke2FAgDamGvrVzK/oXNobsUFJApUA5oh5AAJ6ISShbQ== X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:SN7PR10MB6287.namprd10.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230031)(366007)(376005)(7416005)(1800799015);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: kIr+dVCcJKa+kAMm2SCX6xCOKSYXKpCErLcK7cDsBYAdK76jPONkHELuONxrjiMv9gqWHZkquPXQV1ucFphRx92Bcf09hYLv656py/ouiHV06onVRBATac1tkMjzs4gjDrF8sJsKwzpbLT3AkLfup9b80aOao5E9gqbTq0+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Rg= X-OriginatorOrg: oracle.com X-MS-Exchange-CrossTenant-Network-Message-Id: 3cbd9ec9-026f-4ec3-403e-08dc762a119c X-MS-Exchange-CrossTenant-AuthSource: SN7PR10MB6287.namprd10.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 17 May 2024 04:30:23.6757 (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: rAMy7swim3f583B/lokng5rFUfXewN6E/fYJEnztQXg7rZfVa0qWzwLijFezvcuEQvyLr9hQxE0hJfLc67ZwIr3RZ4FuKwE0UngbKT0mGZs= X-MS-Exchange-Transport-CrossTenantHeadersStamped: LV3PR10MB7746 X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1039,Hydra:6.0.650,FMLib:17.11.176.26 definitions=2024-05-16_07,2024-05-15_01,2023-05-22_02 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 bulkscore=0 adultscore=0 mlxlogscore=999 phishscore=0 malwarescore=0 suspectscore=0 mlxscore=0 spamscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2405010000 definitions=main-2405170034 X-Proofpoint-GUID: HmUfaMK9M5JhP--qprZtob6iZDw3Pn0X X-Proofpoint-ORIG-GUID: HmUfaMK9M5JhP--qprZtob6iZDw3Pn0X The CONFIG_BUILTIN_MODULE_RANGES option controls whether offset range data is generated for kernel modules that are built into the kernel image. Signed-off-by: Kris Van Hees Reviewed-by: Nick Alcock Reviewed-by: Alan Maguire --- Changes since v2: - Add explicit dependency on FTRACE for CONFIG_BUILTIN_MODULE_RANGES --- kernel/trace/Kconfig | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/kernel/trace/Kconfig b/kernel/trace/Kconfig index 47345bf1d4a9f..d0c82b4b3a61e 100644 --- a/kernel/trace/Kconfig +++ b/kernel/trace/Kconfig @@ -188,6 +188,24 @@ menuconfig FTRACE if FTRACE +config BUILTIN_MODULE_RANGES + bool "Generate address range information for builtin modules" + depends on FTRACE + select VMLINUX_MAP + help + When modules are built into the kernel, there will be no module name + associated with its symbols in /proc/kallsyms. Tracers may want to + identify symbols by module name and symbol name regardless of whether + the module is configured as loadable or not. + + This option generates modules.builtin.ranges in the build tree with + offset ranges (per ELF section) for the module(s) they belong to. + It also records an anchor symbol to determine the load address of the + section. + + It is fully compatible with CONFIG_RANDOMIZE_BASE and similar late- + address-modification options. + config BOOTTIME_TRACING bool "Boot-time Tracing support" depends on TRACING From patchwork Fri May 17 04:28:36 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kris Van Hees X-Patchwork-Id: 13666631 Received: from mx0b-00069f02.pphosted.com (mx0b-00069f02.pphosted.com [205.220.177.32]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 06A3210A09; Fri, 17 May 2024 04:31:07 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=205.220.177.32 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715920270; cv=fail; b=stQV7sVB7bhxfObjoBTCUd6So4J+HztF3FYG+pU3y6KOw3xFmPQDqgYBGhJpr7X5F2hO2khLBz+/48oYpnsmlv44ia+sA2ZYhVPja4w5xu3wQ5wjoHwTzY4AeCuxWvWGdQto8RuRKJYTfkW8rlt35Ja1hITNmP2UwIiIkvif+BU= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715920270; c=relaxed/simple; bh=PF8KAMO12xORTEuVE3LCCb7LyEcfTXXyrOAlcdV+uQM=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: Content-Type:MIME-Version; b=hObr4KwllACAGK7Apdf/Vmp6ef2odjeQmSkcKABdI87IN3B3KfbliLa44hlf0gRlrfnqd6kuvkD7OlVE5+p98WblZF38Ns+tvZfNTH1UbuUM3Bo7ZqDOEZrCNDuGRdZkOyItDnH5OYee6tvwyVBBlXQoUPfQE6doGAtn7OFPIx8= ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=oracle.com; spf=pass smtp.mailfrom=oracle.com; dkim=pass (2048-bit key) header.d=oracle.com header.i=@oracle.com header.b=dz2FNP67; dkim=pass (1024-bit key) header.d=oracle.onmicrosoft.com header.i=@oracle.onmicrosoft.com header.b=S/bqWw9l; arc=fail smtp.client-ip=205.220.177.32 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=oracle.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=oracle.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=oracle.com header.i=@oracle.com header.b="dz2FNP67"; dkim=pass (1024-bit key) header.d=oracle.onmicrosoft.com header.i=@oracle.onmicrosoft.com header.b="S/bqWw9l" Received: from pps.filterd (m0246632.ppops.net [127.0.0.1]) by mx0b-00069f02.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 44H4TCsN014422; Fri, 17 May 2024 04:31:01 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=from : to : cc : subject : date : message-id : in-reply-to : references : content-transfer-encoding : content-type : mime-version; s=corp-2023-11-20; bh=ib3MDikKq3DvNAhkylOqy77h+bPn//m0TTLuq4bDFi8=; b=dz2FNP67fgdZWO+kk+LjxDtiqA071ekh5sSqSO/SxjppqXBdowNAMbyL/u5DqC/zRLV3 DMQegNzpXrhsoHKfe5LMR5UQC8Y+UVXONQsRQZ37kQuL53Va4N/b3k9YgEglIc6MkOfr JHcg+RCcLyPJHPPg7IXsw3WIoMGP2EChZK7qIaNsPAMexJrZhxBK8YVQWnquo1jXeCXq ZApFR3X4DSkuGpi1+BQrrDBKMAsos1WDSE7JIaRfrmwBXMojq05oxmHkyoNdOb5ps3BV 1FJyN+/Etuxg4HDgv+sb12bMNv2FWG00QYQEWqA9xCVJfEDM4rvJ2Jg0rdXQ1IAnLPlY kA== Received: from iadpaimrmta01.imrmtpd1.prodappiadaev1.oraclevcn.com (iadpaimrmta01.appoci.oracle.com [130.35.100.223]) by mx0b-00069f02.pphosted.com (PPS) with ESMTPS id 3y3tx38qrb-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Fri, 17 May 2024 04:31:01 +0000 Received: from pps.filterd (iadpaimrmta01.imrmtpd1.prodappiadaev1.oraclevcn.com [127.0.0.1]) by iadpaimrmta01.imrmtpd1.prodappiadaev1.oraclevcn.com (8.17.1.19/8.17.1.19) with ESMTP id 44H4GYR6019138; Fri, 17 May 2024 04:31:00 GMT Received: from nam10-dm6-obe.outbound.protection.outlook.com (mail-dm6nam10lp2101.outbound.protection.outlook.com [104.47.58.101]) by iadpaimrmta01.imrmtpd1.prodappiadaev1.oraclevcn.com (PPS) with ESMTPS id 3y3r88n9sh-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Fri, 17 May 2024 04:31:00 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Ri/NBIk49izLQ2xNrxm1gIK3YGXeXAOWFXH6UvK/AMpVP0zJvAK3sR0qF02xjvGh7olR9ZyNIxUuvIwAtcM0l4/m/UqiI/mz46oyFTaiFbyDYGm5QcLxg2sKlUzTXIOXOZy6nfT20Yld3zON/fNq1qC7Xx3pJ9EkVPNYIFlCjsvXC5UktaARojOpUKx0DLOy/PvX5Y1hCV/pNK0FBoCDVhFN/1g7q4ECPQN7ugyN+wYj2Gj0zVrMEY0lISXjssZBw25vQHXazJqKsMYpIsEYPawW1av7qnuT/Rl/AwU5Ez/rvR3J3AL0HUmfO1XBF3hgij0/8oqG7Y322WaW8GRxJw== 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=ib3MDikKq3DvNAhkylOqy77h+bPn//m0TTLuq4bDFi8=; b=G151v8xwz/HTdfxudf2zjjS6D6hhlSR+AtstsQ2A7/Xxnx6SqX0bW32MK1qyfAY8LsRJSsxVg9XYb22ub8ivY5mQ4RDXBbMbsZFwwKuY2pxizRNDrni+y08xpFZeNhW2kmXjCmunFpGbuSlB0IPKU3lbnkLRXP+71yuWjPYPjC0HO9gormU9q7dmAxhtqJ8jy07S3dwlHYOHt2kWlRd+avdj7hh3zSLchkcB2MSMwLrBFabZs8yp/YwcSPc8XvOKyko77Sq3jUn+kB15CIsGjk3wntdNHqDO/oyV7lpVXqL82f6LTQPWxcXIPMIXB0iwtr/8nwrwXnWe7KHYwZYzWA== 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=ib3MDikKq3DvNAhkylOqy77h+bPn//m0TTLuq4bDFi8=; b=S/bqWw9lgqStmTDfgw66ssQDP2rEpPAb5I8cR4q6g6Yms8VSmOQnebfzm7ASebD2caPFFn6efROdpPp2C6yr/wilZZAN5AseHHzyR7GaPhDuRfiZcA6e+mwkPAB0gG1N+vW9WXWE2mqC9gx1MEbHKbKCS3J5Mb2aqw2TimxmOwc= Received: from SN7PR10MB6287.namprd10.prod.outlook.com (2603:10b6:806:26d::14) by LV3PR10MB7746.namprd10.prod.outlook.com (2603:10b6:408:1bb::8) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7587.28; Fri, 17 May 2024 04:30:58 +0000 Received: from SN7PR10MB6287.namprd10.prod.outlook.com ([fe80::6c60:5db4:7058:1440]) by SN7PR10MB6287.namprd10.prod.outlook.com ([fe80::6c60:5db4:7058:1440%6]) with mapi id 15.20.7587.026; Fri, 17 May 2024 04:30:58 +0000 From: Kris Van Hees To: linux-kernel@vger.kernel.org, linux-kbuild@vger.kernel.org, linux-modules@vger.kernel.org, linux-trace-kernel@vger.kernel.org Cc: Kris Van Hees , Nick Alcock , Masahiro Yamada , Steven Rostedt , Luis Chamberlain , Masami Hiramatsu , Nick Desaulniers , Jiri Olsa , Elena Zannoni Subject: [PATCH v3 3/6] kbuild: generate a linker map for vmlinux.o Date: Fri, 17 May 2024 00:28:36 -0400 Message-ID: <20240517042839.544650-4-kris.van.hees@oracle.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240517042839.544650-1-kris.van.hees@oracle.com> References: <20240517042839.544650-1-kris.van.hees@oracle.com> X-ClientProxiedBy: MN2PR15CA0034.namprd15.prod.outlook.com (2603:10b6:208:1b4::47) To SN7PR10MB6287.namprd10.prod.outlook.com (2603:10b6:806:26d::14) Precedence: bulk X-Mailing-List: linux-modules@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: SN7PR10MB6287:EE_|LV3PR10MB7746:EE_ X-MS-Office365-Filtering-Correlation-Id: 45f78322-3578-43d5-dea8-08dc762a2631 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230031|366007|376005|7416005|1800799015; X-Microsoft-Antispam-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WNDyWFd4WUDvvI2Fp2msXI5NFKaF+Der+USrt9CHg9WYnZhCYuz7giud5z4fPCYFnmogc/IlJ0cepYMBQNOCfqcnw6wJ7bNVlsiuJt81V1GgxPGsvaqcOH4QF1S+5Mk6hBoFysHMW6cgU0EPYJqeuRjej4Wd1dnfZdkiCj4hUlCTZ3bFgw4fh5CHv8RJbg8eygO0Oc+hnjdQQB8lY04Grikzcbg== X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:SN7PR10MB6287.namprd10.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230031)(366007)(376005)(7416005)(1800799015);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: GvRpr/0Rhdz08ysNZjteCEglfeIqY0vIlDG+mw+K0PPAKujgjVazGMOePU01EppaKlGmT58KWcTgHLkq1wXfQKkH8lRgVcXMxlt12k8WgtxCPPjus89yjpgC/jd7b1w/BUlBrnin0jspmofbWD+hqLCpKv95ehinscKglHFWIH3rtWNM4pHrDEJ0Q9sNRCN9ZaYTQSx35VvskOXDEGejN6KF+h5OO3UKmk3PE2qmX8YZR5mi9TAjnB7R8Vge01HbsLq34u5vhJSi8W8/bkiBSsfmgzvGO2od5a5dPAz9G6DymXstELz7xMkwq5cRBCBtOPsx93IW5bFnuxAEG0E2plHcVbKxhI28g+h/kJA9Q0wNcgyCDuqPSme/KYr5z5ByaTLPNI2LYoF/82n1Gdq16Aa6ID4Lwmbb+xu4cZkOhW47ZkFgapYCj54pWS25+qyIZGmscumvuwqq8tRDPJxsIp0Df0Zpk3BpDpOtIpJhxnqiBUQXQC3vQQ28Whn1ac4n89Lb8rfz29QwIbZBOYiJY4aFBt4ck5AVrqMt+favPN7F2u+u1sGtZQFitoZE2bSaM7vItqpN3seZLpYcGFDLhNlHWjo8LR2dbvdmb1snfv4cIuSXbmZEwPerLkv+vUbZpte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hheH5EGUjuAAo068Nrr0KDJDyWrveXy22X8M1gDAFfQv7TkNzontF9PBybrFyx3ovb58VRXSmJVxk8+PMcYJwIJETKuy+Jk/zx5SftVVeMfbs0kt+loA1YokFqay9YPHyA3F97CN3qeDQuKAreNTfNJB7l6pU4L1YTUqA0AAn/RFhIgmqazvPWx5w9BmVzElrn7IQHCV4ItsRqM/pZUkhd1LVBvJpJ6Vu+XlBaOX5bIagTEYVX4mwRI+flkdUy27b8GCEa7QNGpjqKPSbsvIpEpCbs+1cNK1h5Wgc0sFin1zbLQsuBD+FvDRzg8Zy/H13ARs90TdcHH5IihZLUTZANDviZQ4Rp9Vj2TVhZDU0bo1m22MCCbQOwigPxPPigR2cAPS4wvGk5i9S6bxxuxHyicgi8yQZE3cqEmsYWWhVD2Xa7p8inLpjVoAcfZy97RlaVxTKMiOXrvGsplNgkD0OmB/9o4MfeczA3DwxlYImS3U/t4IXpldw4Lpo7uMXJbboqMfPPC5wnuxs6K2yXzQYZJh9a4zpjWPgx2zBCgFHcTy1NioJgTpiNpRGBt7PCOuNwU4foJ52JKHG8= X-OriginatorOrg: oracle.com X-MS-Exchange-CrossTenant-Network-Message-Id: 45f78322-3578-43d5-dea8-08dc762a2631 X-MS-Exchange-CrossTenant-AuthSource: SN7PR10MB6287.namprd10.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 17 May 2024 04:30:58.2683 (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: EZvydVS3onoWyhsdnMtH/GvpnmX4/RjXZLIV6549tS41z6yEL8/mu8Xwmy+GTx5h2FG0yOreFaR/N9ZDSJf5w6vAOqrhGONxcwh50QDSwFA= X-MS-Exchange-Transport-CrossTenantHeadersStamped: LV3PR10MB7746 X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1039,Hydra:6.0.650,FMLib:17.11.176.26 definitions=2024-05-16_07,2024-05-15_01,2023-05-22_02 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 adultscore=0 bulkscore=0 mlxlogscore=999 spamscore=0 suspectscore=0 mlxscore=0 malwarescore=0 phishscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2405010000 definitions=main-2405170034 X-Proofpoint-GUID: 2_zLRI6okwyv6_Q1R-6TpbOPDgc6dKq9 X-Proofpoint-ORIG-GUID: 2_zLRI6okwyv6_Q1R-6TpbOPDgc6dKq9 When CONFIG_BUILTIN_MODULE_RANGES is set, a linker map for vmlinux.o needs to be generated. The generation of offset range data for builtin modules depends on that linker map to know what offsets in an ELF section belong to an object file for a particular builtin module. Signed-off-by: Kris Van Hees Reviewed-by: Nick Alcock --- scripts/Makefile.vmlinux_o | 3 +++ 1 file changed, 3 insertions(+) diff --git a/scripts/Makefile.vmlinux_o b/scripts/Makefile.vmlinux_o index 6de297916ce68..252505505e0e3 100644 --- a/scripts/Makefile.vmlinux_o +++ b/scripts/Makefile.vmlinux_o @@ -45,9 +45,12 @@ objtool-args = $(vmlinux-objtool-args-y) --link # Link of vmlinux.o used for section mismatch analysis # --------------------------------------------------------------------------- +vmlinux-o-ld-args-$(CONFIG_BUILTIN_MODULE_RANGES) += -Map=$@.map + quiet_cmd_ld_vmlinux.o = LD $@ cmd_ld_vmlinux.o = \ $(LD) ${KBUILD_LDFLAGS} -r -o $@ \ + $(vmlinux-o-ld-args-y) \ $(addprefix -T , $(initcalls-lds)) \ --whole-archive vmlinux.a --no-whole-archive \ --start-group $(KBUILD_VMLINUX_LIBS) --end-group \ From patchwork Fri May 17 04:28:37 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kris Van Hees X-Patchwork-Id: 13666632 Received: from mx0b-00069f02.pphosted.com (mx0b-00069f02.pphosted.com [205.220.177.32]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id DDFD9D530; Fri, 17 May 2024 04:31:42 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=205.220.177.32 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715920304; cv=fail; b=GTOgdM6N8aVpqPkJ/I4fG/+8mSVmXwd0hO010j4ggbHdwoFHoisTM1WmLrwzJIhjEnSfYtziVkJNET4ASEIbeuCE8/aMWezcH2N5MIWC5i+0XzSmq9BNdTePelaAxYSe3IKQUnkSE9GSyHV+S+kprMd//bKz2R/u1PfU+jqQRgE= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715920304; c=relaxed/simple; bh=zd1Jj73+0L5LhyfOZ40Hm7yXxpoZnLiFDN4aZFUeHRQ=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: Content-Type:MIME-Version; b=clMt9oUEZ/tNW1AgcV+rzCAv1aFeQ0/rfx/7iLfKCpxXWBsk8RvKOZy3aixZjA1kfGGcHWfHOufRbQdJ8GmMqgAPsOBTKQqrSAnev+Dfc7expwpTYBUZk4usAFlDPDswLMcRVSZLXDazjAB3bKTojm+rY7IToUH9Mo3qU5mxI8U= ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=oracle.com; spf=pass smtp.mailfrom=oracle.com; dkim=pass (2048-bit key) header.d=oracle.com header.i=@oracle.com header.b=cvWzopBR; dkim=pass (1024-bit key) header.d=oracle.onmicrosoft.com header.i=@oracle.onmicrosoft.com header.b=j1dokUhS; arc=fail smtp.client-ip=205.220.177.32 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=oracle.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=oracle.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=oracle.com header.i=@oracle.com header.b="cvWzopBR"; dkim=pass (1024-bit key) header.d=oracle.onmicrosoft.com header.i=@oracle.onmicrosoft.com header.b="j1dokUhS" Received: from pps.filterd (m0246632.ppops.net [127.0.0.1]) by mx0b-00069f02.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 44H4TaM0014675; Fri, 17 May 2024 04:31:37 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=from : to : cc : subject : date : message-id : in-reply-to : references : content-transfer-encoding : content-type : mime-version; s=corp-2023-11-20; bh=DNl1vEJx13ntuQpr8C+NTtHQZxWM96vK+iRdeSdDl00=; b=cvWzopBRIzOXOygZLoAUA7FFRo12Jm8YTa2rBfHhKKHbFM7z3ZDooXJuyaN/IO8dwv5h 0qJx18TbxfS8toJ+Ek7MUhcYt92CFRG6shPb1qtYOamoZR+aRJRKjhTm1irlejgCrfK7 KovGl1CDyolejWCAvFCa/MRTEZd14/m9A7fUTbBddEulgZLtZMCZgoBbGVtyNqQNHGr6 +Vl8XZxKqw8pn7vRoYxcWQuyb3+KRnUwo7vggZc7BGLZQZ80uLZ685bJULqlAoRFN0yP rc2hpPAVcNwim3OaxXPm2JT1FgDFV02eIbODDjecf6Z8s+L4ghQ8+VI9FVWbgJxvplzu XQ== Received: from phxpaimrmta01.imrmtpd1.prodappphxaev1.oraclevcn.com (phxpaimrmta01.appoci.oracle.com [138.1.114.2]) by mx0b-00069f02.pphosted.com (PPS) with ESMTPS id 3y3tx38qss-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Fri, 17 May 2024 04:31:36 +0000 Received: from pps.filterd (phxpaimrmta01.imrmtpd1.prodappphxaev1.oraclevcn.com [127.0.0.1]) by phxpaimrmta01.imrmtpd1.prodappphxaev1.oraclevcn.com (8.17.1.19/8.17.1.19) with ESMTP id 44H3mTB1038406; Fri, 17 May 2024 04:31:35 GMT Received: from nam11-bn8-obe.outbound.protection.outlook.com (mail-bn8nam11lp2169.outbound.protection.outlook.com [104.47.58.169]) by phxpaimrmta01.imrmtpd1.prodappphxaev1.oraclevcn.com (PPS) with ESMTPS id 3y24q0uxrn-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Fri, 17 May 2024 04:31:35 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=iuZDWJscbYcVjBhxiFl4P/6hHCPTg0Fpz4y7LpiEPoa8tBrGOFALq0Fx2CmKbjQ2JePr/qzrd5h5/4VKqbp/Uf7tPjT0/OkriWqxyhhdVIFc2QFLtqV3vE+2tN2pedPNRxZ+geTTb68oPs/ADfn9OgSDldB9h53G59rDEf8AILJbaI9QBciivqGS9fPjw52RVYyFbNzt2qWR4/EophEzk2km/ZFM1n7WY4nihuj8ULCcMw9F0svhPhE0q6v9qwPXwspTS2/kskoyEL4s7NHyj5dyODv8G75nvO7UgYWBdCIj4nHZaNBui/Bjaqo6f5WCdsNZ+NGMnZqSLrcXOZSDSw== 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=DNl1vEJx13ntuQpr8C+NTtHQZxWM96vK+iRdeSdDl00=; b=JjZ6KK2hagPe3rGRlDXiHfdgEgixqvgCvl2LExsvZC2s68zEkmoS7b19IUOLDFFYSbcYmvwqjpIvfv9dMNtgVbOEOfdczqXr6EHp4vNLIlefSLd1gLphzdctE+wZ1fowHYgQ9ArNr4IL0PzRPTcb5oDhrS8FitrQeYh130eeeoI5TSG3Qs1nyjP4JkpcXKDQV0s2+iwoBm3O7+0VBNkup9eIy0I7+H4mnN4MXralhxKdqadQV3ivdk3iBruu2g+DeVCBNT3MAMMIKYXK2B8KGHUkpCXbIbWSMC22M19tEvQ6f58kpHhJ4v7ZvocPszZ6YXuaWxB+RU94bz8XOCHovQ== 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=DNl1vEJx13ntuQpr8C+NTtHQZxWM96vK+iRdeSdDl00=; b=j1dokUhS835NeQNF7kAV/g3bq+pW/gFR8oJhcc4IqVl4fdV9AwNFsVA46HurgaUgwAcy5JGUyXCGMnzEgtmFPGY6rUF1NGGK/RE4Hcotaem14CWP3qtig0DmZMIfCsAaDVYSuHkkIna09hCgffnLl313C9BQ+kg6jtdeDVUIcL0= Received: from SN7PR10MB6287.namprd10.prod.outlook.com (2603:10b6:806:26d::14) by LV3PR10MB7746.namprd10.prod.outlook.com (2603:10b6:408:1bb::8) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7587.28; Fri, 17 May 2024 04:31:32 +0000 Received: from SN7PR10MB6287.namprd10.prod.outlook.com ([fe80::6c60:5db4:7058:1440]) by SN7PR10MB6287.namprd10.prod.outlook.com ([fe80::6c60:5db4:7058:1440%6]) with mapi id 15.20.7587.026; Fri, 17 May 2024 04:31:32 +0000 From: Kris Van Hees To: linux-kernel@vger.kernel.org, linux-kbuild@vger.kernel.org, linux-modules@vger.kernel.org, linux-trace-kernel@vger.kernel.org Cc: Kris Van Hees , Nick Alcock , Masahiro Yamada , Steven Rostedt , Luis Chamberlain , Masami Hiramatsu , Nick Desaulniers , Jiri Olsa , Elena Zannoni Subject: [PATCH v3 4/6] module: script to generate offset ranges for builtin modules Date: Fri, 17 May 2024 00:28:37 -0400 Message-ID: <20240517042839.544650-5-kris.van.hees@oracle.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240517042839.544650-1-kris.van.hees@oracle.com> References: <20240517042839.544650-1-kris.van.hees@oracle.com> X-ClientProxiedBy: BL1P223CA0018.NAMP223.PROD.OUTLOOK.COM (2603:10b6:208:2c4::23) To SN7PR10MB6287.namprd10.prod.outlook.com (2603:10b6:806:26d::14) Precedence: bulk X-Mailing-List: linux-modules@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: SN7PR10MB6287:EE_|LV3PR10MB7746:EE_ X-MS-Office365-Filtering-Correlation-Id: 5cfb4e77-b952-423b-e7f3-08dc762a3aa8 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230031|366007|376005|7416005|1800799015; X-Microsoft-Antispam-Message-Info: aTsSyYl44rtS2rR6xpPnAf/1EyDQDQ+AUexU5G20KhN0MGCMABlDAkiH9KZyeWBAPA2Vbg/86lEW5qt13anBLMoGb+ikj1QyXPvc1ZTjsveC32VKTeBEom1AsmwJFkzKGiec34pgA+8OmmBDLCQZDJM0LwO9APv2DRuuUJpcTJ5kqqkR6aqcxEyRxTJXAUctYkMLbG1e762++RCKAIoUPvamCjVVnsgdYSmK7JYJW1n2HFAx2hMUQ2srQmiax+weEtgNucRPLwrka+1Od91enX42C7wE/3mzTm+BRimaxK+2QsckmKMs64F5D2gnhv5d9JQMHXsbAeD6jK/2rQk60PFRSJjZGIW9SL3GiboOg8XCbzJBvN7Ib5qMenF/nXwfWck9E1OnlMmiK8FWkwjdd4alTUTJ0xjG/D8YU0ByOkUk4245xrk137hfovjrIaN+2SjUnLQ81Rc9K4mOnkEWxqyu9d0Ve0bTLTdEYoQrJFuvm8ixtSLyuGfYoKxW+cCmJgie4da0TQkjzmXQPSznzNOBvQPAlQU0KRuou/u0iG8fC3MXzeYqoS7LAOKsJP0v5strufrnQVnmHi/G4i2KllZCaSahZICRg4QZ+LsbhYU75Hrj2oxEdgVO2q4007Uq24jH9cZTalddI9JV3lxRAzHv74dDOTEmFfpipsp3Hz06lJaWKvodURf8+Iy0/31Mst1hpt3+Ez1g0LQ5FfUWZshm3tWXND1bhHYnNEe5oEQJfr7ci+xQ/raOKlG0mCutv9X4itXJtbFELHZ5QgcrDSwdsh8oWtJ/iweaQ3KIUZTdefeMipAmwOMfgHYJ4IHme4vA1jmlyQlxW0B3K8HLWALzylPwRK3+slXChLuS+MMQt278lks2kZLHSK+8Y+hLd9kAHVjdA3wP6/zhQRsY74+W20gOnJ7vcLoRXV+HsocL3bn1+6zJ39ySKyJBh/yNr4O5x4eFgD72SVoBNxFvJohvUYXxvx8bgRA3rlzZx8R8I7/RjwEVBFxmV4E9MDs5uO3BWb4OhduOSYU33zvYVRuaFfL8RF0MaeF/B1ViBxq2M4fyFPc8enyxs81Ir9XuHE4DXWnvuuac5dTMc6TPqOon2CDbI4GDwQL2sRxfWsU75rq5T5Wf0M9aavnkX/Ii3kEBGnScTihnjbnQo60LY15DC1An0+oXJes+p7m5R17XGz+XcwQgLPNOQ/joZP/8cWpXOs7gdV5+h2dkhPk2zPI1C05xE/pY9e/xFNCEznjUWkxMSzKrpaojArMPUmPIabuNvFNGqYsZ6NdTyf7CuQ== X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:SN7PR10MB6287.namprd10.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230031)(366007)(376005)(7416005)(1800799015);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: pb7aq8qXvyi2HIpZBqIZRdi8IEt17RB7G9slyErJyGp5nZPJp0LQe3V9jfqpDBP1yXQMzSnma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8yF4GwvSihQdOifKNF8Bh13+Fdtwt5Gi1/N8CU5Qo4ANeXsqabr/V8jwYOKQj5xaIcdQmVAuU9knUDNVc= X-OriginatorOrg: oracle.com X-MS-Exchange-CrossTenant-Network-Message-Id: 5cfb4e77-b952-423b-e7f3-08dc762a3aa8 X-MS-Exchange-CrossTenant-AuthSource: SN7PR10MB6287.namprd10.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 17 May 2024 04:31:32.5274 (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: qpR0V/yJ6GlbscD1K9gtXhy+JoaEuR43zkGYG3T4HDL9hkotvC2meOpTxuGoNKtwttp88NvzmhdaS72DCWN8oJhhMUr0EyemRSTqyDdivHw= X-MS-Exchange-Transport-CrossTenantHeadersStamped: LV3PR10MB7746 X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1039,Hydra:6.0.650,FMLib:17.11.176.26 definitions=2024-05-16_07,2024-05-15_01,2023-05-22_02 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 bulkscore=0 adultscore=0 mlxscore=0 spamscore=0 phishscore=0 suspectscore=0 mlxlogscore=999 malwarescore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2405010000 definitions=main-2405170034 X-Proofpoint-GUID: r4rvrFwzsdDhByXKNDZ5IEbuXpnN3sHv X-Proofpoint-ORIG-GUID: r4rvrFwzsdDhByXKNDZ5IEbuXpnN3sHv The offset range data for builtin modules is generated using: - modules.builtin.modinfo: associates object files with module names - vmlinux.map: provides load order of sections and offset of first member per section - vmlinux.o.map: provides offset of object file content per section - .*.cmd: build cmd file with KBUILD_MODFILE and KBUILD_MODNAME The generated data will look like: .text 00000000-00000000 = _text .text 0000baf0-0000cb10 amd_uncore .text 0009bd10-0009c8e0 iosf_mbi ... .text 008e6660-008e9630 snd_soc_wcd_mbhc .text 008e9630-008ea610 snd_soc_wcd9335 snd_soc_wcd934x snd_soc_wcd938x .text 008ea610-008ea780 snd_soc_wcd9335 ... .data 00000000-00000000 = _sdata .data 0000f020-0000f680 amd_uncore For each ELF section, it lists the offset of the first symbol. This can be used to determine the base address of the section at runtime. Next, it lists (in strict ascending order) offset ranges in that section that cover the symbols of one or more builtin modules. Multiple ranges can apply to a single module, and ranges can be shared between modules. Signed-off-by: Kris Van Hees Reviewed-by: Nick Alcock --- Changes since v2: - 1st arg to generate_builtin_ranges.awk is now modules.builtin.modinfo - Switched from using modules.builtin.objs to parsing .*.cmd files - Parse data from .*.cmd in generate_builtin_ranges.awk --- scripts/generate_builtin_ranges.awk | 232 ++++++++++++++++++++++++++++ 1 file changed, 232 insertions(+) create mode 100755 scripts/generate_builtin_ranges.awk diff --git a/scripts/generate_builtin_ranges.awk b/scripts/generate_builtin_ranges.awk new file mode 100755 index 0000000000000..6975a9c7266d9 --- /dev/null +++ b/scripts/generate_builtin_ranges.awk @@ -0,0 +1,232 @@ +#!/usr/bin/gawk -f +# SPDX-License-Identifier: GPL-2.0 +# generate_builtin_ranges.awk: Generate address range data for builtin modules +# Written by Kris Van Hees +# +# Usage: generate_builtin_ranges.awk modules.builtin.modinfo vmlinux.map \ +# vmlinux.o.map > modules.builtin.ranges +# + +BEGIN { + # modules.builtin.modinfo uses \0 as record separator + # All other files use \n. + RS = "[\n\0]"; +} + +# Return the module name(s) (if any) associated with the given object. +# +# If we have seen this object before, return information from the cache. +# Otherwise, retrieve it from the corresponding .cmd file. +# +function get_module_info(fn, mod, obj, mfn, s) { + if (fn in omod) + return omod[fn]; + + if (match(fn, /\/[^/]+$/) == 0) + return ""; + + obj = fn; + mod = ""; + mfn = ""; + fn = substr(fn, 1, RSTART) "." substr(fn, RSTART + 1) ".cmd"; + if (getline s 0) { + mod = substr(s, RSTART + 17, RLENGTH - 17); + gsub(/['"]/, "", mod); + gsub(/:/, " ", mod); + } + + if (match(s, /DKBUILD_MODFILE=[^ ]+/) > 0) { + mfn = substr(s, RSTART + 17, RLENGTH - 17); + gsub(/['"]/, "", mfn); + gsub(/:/, " ", mfn); + } + } + close(fn); + +# tmp = $0; +# $0 = s; +# print mod " " mfn " " obj " " $NF; +# $0 = tmp; + + # A single module (common case) also reflects objects that are not part + # of a module. Some of those objects have names that are also a module + # name (e.g. core). We check the associated module file name, and if + # they do not match, the object is not part of a module. + if (mod !~ / /) { + if (!(mod in mods)) + return ""; + if (mods[mod] != mfn) + return ""; + } + + # At this point, mod is a single (valid) module name, or a list of + # module names (that do not need validation). + omod[obj] = mod; + close(fn); + + return mod; +} + +FNR == 1 { + FC++; +} + +# (1-old) Build a mapping to associate object files with built-in module names. +# +# The first file argument is used as input (modules.builtin.objs). +# +FC == 1 && old_behaviour { + sub(/:/, ""); + mod = $1; + sub(/([^/]*\/)+/, "", mod); + sub(/\.o$/, "", mod); + gsub(/-/, "_", mod); + + if (NF > 1) { + for (i = 2; i <= NF; i++) { + if ($i in mods) + mods[$i] = mods[$i] " " mod; + else + mods[$i] = mod; + } + } else + mods[$1] = mod; + + next; +} + +# (1) Build a lookup map of built-in module names. +# +# The first file argument is used as input (modules.builtin.modinfo). +# +# We are interested in lines that follow the format +# .file= +# and use them to record +# +FC == 1 && /^[^\.]+.file=/ { + gsub(/[\.=]/, " "); +# print $1 " -> " $3; + mods[$1] = $3; + next; +} + +# (2) Determine the load address for each section. +# +# The second file argument is used as input (vmlinux.map). +# +# Since some AWK implementations cannot handle large integers, we strip of the +# first 4 hex digits from the address. This is safe because the kernel space +# is not large enough for addresses to extend into those digits. +# +FC == 2 && /^\./ && NF > 2 { + if (type) + delete sect_addend[type]; + + if ($1 ~ /percpu/) + next; + + raw_addr = $2; + addr_prefix = "^" substr($2, 1, 6); + sub(addr_prefix, "0x", $2); + base = strtonum($2); + type = $1; + anchor = 0; + sect_base[type] = base; + + next; +} + +!type { + next; +} + +# (3) We need to determine the base address of the section so that ranges can +# be expressed based on offsets from the base address. This accommodates the +# kernel sections getting loaded at different addresses than what is recorded +# in vmlinux.map. +# +# At runtime, we will need to determine the base address of each section we are +# interested in. We do that by recording the offset of the first symbol in the +# section. Once we know the address of this symbol in the running kernel, we +# can calculate the base address of the section. +# +# If possible, we use an explicit anchor symbol (sym = .) listed at the base +# address (offset 0). +# +# If there is no such symbol, we record the first symbol in the section along +# with its offset. +# +# We also determine the offset of the first member in the section in case the +# final linking inserts some content between the start of the section and the +# first member. I.e. in that case, vmlinux.map will list the first member at +# a non-zero offset whereas vmlinux.o.map will list it at offset 0. We record +# the addend so we can apply it when processing vmlinux.o.map (next). +# +FC == 2 && !anchor && raw_addr == $1 && $3 == "=" && $4 == "." { + anchor = sprintf("%s %08x-%08x = %s", type, 0, 0, $2); + sect_anchor[type] = anchor; + + next; +} + +FC == 2 && !anchor && $1 ~ /^0x/ && $2 !~ /^0x/ && NF <= 4 { + sub(addr_prefix, "0x", $1); + addr = strtonum($1) - base; + anchor = sprintf("%s %08x-%08x = %s", type, addr, addr, $2); + sect_anchor[type] = anchor; + + next; +} + +FC == 2 && base && /^ \./ && $1 == type && NF == 4 { + sub(addr_prefix, "0x", $2); + addr = strtonum($2); + sect_addend[type] = addr - base; + + if (anchor) { + base = 0; + type = 0; + } + + next; +} + +# (4) Collect offset ranges (relative to the section base address) for built-in +# modules. +# +FC == 3 && /^ \./ && NF == 4 && $3 != "0x0" { + type = $1; + if (!(type in sect_addend)) + next; + + sub(addr_prefix, "0x", $2); + addr = strtonum($2) + sect_addend[type]; + + mod = get_module_info($4); +# printf "[%s, %08x] %s [%s] %08x\n", mod_name, mod_start, $4, mod, addr; + if (mod == mod_name) + next; + + if (mod_name) { + idx = mod_start + sect_base[type] + sect_addend[type]; + entries[idx] = sprintf("%s %08x-%08x %s", type, mod_start, addr, mod_name); + count[type]++; + } +# if (mod == "") +# printf "ENTRY WITHOUT MOD - MODULE MAY END AT %08x\n", addr + + mod_name = mod; + mod_start = addr; +} + +END { + for (type in count) { + if (type in sect_anchor) + entries[sect_base[type]] = sect_anchor[type]; + } + + n = asorti(entries, indices); + for (i = 1; i <= n; i++) + print entries[indices[i]]; +} From patchwork Fri May 17 04:28:38 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kris Van Hees X-Patchwork-Id: 13666633 Received: from mx0a-00069f02.pphosted.com (mx0a-00069f02.pphosted.com [205.220.165.32]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id D066910A09; Fri, 17 May 2024 04:32:15 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=205.220.165.32 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715920337; cv=fail; b=SCvKp1x3kquHR0PUutZpUN9W3HPTrqHezjkaDJ9gTCsqrnRX01mVHjKQl/4kKzhUckBx997eBilcSQCZEjurSSdeEzYx7blTrAzsx69XUFxuETeZ+vsJP9BvbTnAIDPM0BigdPL+kKXNm41De67thoxAivoZQUjetr41XXzuhMI= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715920337; c=relaxed/simple; bh=0mrgoX/ecMRptMm/3JqLAketUUWrCeS15wfajbw4X6A=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: Content-Type:MIME-Version; b=GwXRSZcjfikjkwTOGu2sYKrfs8lpCpieCV0QCjAkC0hUCDdgaeGYa8XyZL0mvmYt+3uS0FEK7WzjK4cq7w51FD0jzb3/Yb3oxrNrZJmDcln2l3LLUnajHNqdHzvU9h6aO6NEZl2Po8Cat/FlkaMu1GwegwA8/5plY3FJcvlLDRo= ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=oracle.com; spf=pass smtp.mailfrom=oracle.com; dkim=pass (2048-bit key) header.d=oracle.com header.i=@oracle.com header.b=ChuqsNFE; dkim=pass (1024-bit key) header.d=oracle.onmicrosoft.com header.i=@oracle.onmicrosoft.com header.b=iK1gz32p; arc=fail smtp.client-ip=205.220.165.32 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=oracle.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=oracle.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=oracle.com header.i=@oracle.com header.b="ChuqsNFE"; dkim=pass (1024-bit key) header.d=oracle.onmicrosoft.com header.i=@oracle.onmicrosoft.com header.b="iK1gz32p" 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 44H4V6jj004385; Fri, 17 May 2024 04:32:10 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=from : to : cc : subject : date : message-id : in-reply-to : references : content-transfer-encoding : content-type : mime-version; s=corp-2023-11-20; bh=NhSF3Zh4E9nkCkMk11/kegI7L0J93Md1E83v3afjuOs=; b=ChuqsNFESA5ZNLnT+WF4JmBv5XtnpaDkJXawYqphAsoLUi6fAZ2tsIQmCRpZRiygDaSx 3Mjnh+5Ppf2N6umYzrsHmdFhmvEssJ2dsliYFs74Vjl/LSHhLAwATlr5ejkTBs8eWmh/ 5DIhkh4sM6OF3v6t3g8bXZks9cM3New4eSQUbDA9V1pBuNkfbUxxtP39UUE83Y+J9qGN A+14sBr5q4kL4wDpGuNjcwBk1THR0Zz1mBrRddH0zehpafS1+QGtEXxwWczRpQYnuRkl e9elB1AhdNw11ZSBCI16MqnTctJ843DiSycjMGMYS2nHogdzEsfhs0Qk1C6edNvib/Bv nQ== Received: from phxpaimrmta03.imrmtpd1.prodappphxaev1.oraclevcn.com (phxpaimrmta03.appoci.oracle.com [138.1.37.129]) by mx0b-00069f02.pphosted.com (PPS) with ESMTPS id 3y3srry79u-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Fri, 17 May 2024 04:32:09 +0000 Received: from pps.filterd (phxpaimrmta03.imrmtpd1.prodappphxaev1.oraclevcn.com [127.0.0.1]) by phxpaimrmta03.imrmtpd1.prodappphxaev1.oraclevcn.com (8.17.1.19/8.17.1.19) with ESMTP id 44H3uUJx018819; Fri, 17 May 2024 04:32:09 GMT Received: from nam11-bn8-obe.outbound.protection.outlook.com (mail-bn8nam11lp2173.outbound.protection.outlook.com [104.47.58.173]) by phxpaimrmta03.imrmtpd1.prodappphxaev1.oraclevcn.com (PPS) with ESMTPS id 3y1y4bfq5q-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Fri, 17 May 2024 04:32:09 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=EG1smhnb1GXgGW0j2WL1MEh0yGb4l9uEbuE0X5PHuj+Z4TdG8tQXbytMrYA236Xtl0r6UZTkKXtMU5y1wxiJBidVRMPKgNckb8s6fsv2X5TQSPvMAf7fYMAOWR8NlVJUn+B4Wc8BQuSrs0+a6L+lbSle+euqIsVbKnR8RrTp5tJQOHh1jLOp/0HgvdHVgafv5iA8zaspxM0xWrvDlJsW8H8nOq16z59JecMEcS8W0Pn4cVqiKQT0kUl94Y5ZmFI1+PL4l680WClAEYczB93V9hO/yoyC4RqUAFgmkk1IqWnzT2Ink1cCwID3AuL7TkLB3jUcLD9Lt3ChaMfuEi4K6Q== 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=NhSF3Zh4E9nkCkMk11/kegI7L0J93Md1E83v3afjuOs=; b=ZfWtaGwKo2Hg/Je10MKqZtkUyg9ARvfwq7IVL7gku9Y1PE+eOgX0SqhrxpC2VxW2gLmXmoKuByQ1G6p9EdTv/reauIXHZv8cL3G6MOi1rdcPhQV0BY2F8GmvW+n/S23bpoPDDre02WVw1A0XFQDX5eBjz6BNpHIB/OBOff5Hi7up5MaGh7vTrgwosIpgYLw//lTNRXFxmXYeXbK0+0der7WjUtlurUg5lgkhlZ6hX/PejPRJlX1sFA55sxmtzMou3omYgTgeZZ8FcJx7+DrGpAFsUdb/SiaR4T3gpHg+zsWKzjfwoVLcPy7kh2VispeZCLmg3D4EOKXOWei9/qOxQw== 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=NhSF3Zh4E9nkCkMk11/kegI7L0J93Md1E83v3afjuOs=; b=iK1gz32prqq0cDk8a6y/f3ScoN1ZKBn6iURDGn9hxLctC9069DtPl0xQ4wGJhOWD8cIq7ReO+kaE2/notMbvvkv8opyy2zw+Abx73vH7VsPKqjjjfT2/tk+KQWb3WA7mP7WGQsFI+OXiZogDGCcKJfFYiwBLRaJ1uFgDGoxUdcg= Received: from SN7PR10MB6287.namprd10.prod.outlook.com (2603:10b6:806:26d::14) by LV3PR10MB7746.namprd10.prod.outlook.com (2603:10b6:408:1bb::8) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7587.28; Fri, 17 May 2024 04:32:07 +0000 Received: from SN7PR10MB6287.namprd10.prod.outlook.com ([fe80::6c60:5db4:7058:1440]) by SN7PR10MB6287.namprd10.prod.outlook.com ([fe80::6c60:5db4:7058:1440%6]) with mapi id 15.20.7587.026; Fri, 17 May 2024 04:32:06 +0000 From: Kris Van Hees To: linux-kernel@vger.kernel.org, linux-kbuild@vger.kernel.org, linux-modules@vger.kernel.org, linux-trace-kernel@vger.kernel.org Cc: Kris Van Hees , Nick Alcock , Masahiro Yamada , Steven Rostedt , Luis Chamberlain , Masami Hiramatsu , Nick Desaulniers , Jiri Olsa , Elena Zannoni Subject: [PATCH v3 5/6] kbuild: generate modules.builtin.ranges when linking the kernel Date: Fri, 17 May 2024 00:28:38 -0400 Message-ID: <20240517042839.544650-6-kris.van.hees@oracle.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240517042839.544650-1-kris.van.hees@oracle.com> References: <20240517042839.544650-1-kris.van.hees@oracle.com> X-ClientProxiedBy: BL0PR05CA0012.namprd05.prod.outlook.com (2603:10b6:208:91::22) To SN7PR10MB6287.namprd10.prod.outlook.com (2603:10b6:806:26d::14) Precedence: bulk X-Mailing-List: linux-modules@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: SN7PR10MB6287:EE_|LV3PR10MB7746:EE_ X-MS-Office365-Filtering-Correlation-Id: 217835b8-c8a2-4e26-93af-08dc762a4f21 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230031|366007|376005|7416005|1800799015; X-Microsoft-Antispam-Message-Info: sBGhfNuIAAfLBua8e+feA393JKL8IHBEx9hB4Lx1OvWZOzCBLmjMsh3iLAlx4mJtTIke8U9NOVhQeEDB5rJIUAYv+69FZle8YSsQ78RRJAnVlTulhOpdzdgPy80VIksmCZM/kNGxUncOC/PlaoA/MaiLykqbhCcMtpbnkel5xZK7ehfkArZP9QM23CWHxB4JRkmKFbKua16j638g3Az9z/nhCflG0aIINpEJNpOG5KuZ7JbHB/4rC30F/y5dP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RY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:SN7PR10MB6287.namprd10.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230031)(366007)(376005)(7416005)(1800799015);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: IbdQnHmogaMrLVaqBfy+18tdISq6yfRHEqs9PQjRd5DmlQMc+H9w0HtTF7FUljetoVdCHH/2xwOnRX3DlEKuPRUx6IsnQL1M07bDXY2zWWXxN1jw72FIzq5NlJ1DBnQG/0482+XtxwkC0127IFC3ZaapCurg04f2+mnkJd0qydG7iE4x5I1JVYWFsoJjrte4A1jn7G0tpWlDTJW5xBKwo/CfddVcY59asBLUf9mSFvDanNz7GHumDPHNGdBnBcgtAoaxVoAtnKQIkq4k4hLQpxA07Wn+sz0tHLr+m3JJYVlOK2xnGSWP8dp4/CxpxKTjisu4+aWYqwI9TmmoEeflYs46HguSZ4LYEFFLLgz30cy5oCVpH6zKgeKEZBQjPwsZhGaaIXnwebcFrtdXxGU1R1KHbMAXRg1TkVLnWG7BvUsUbhiinvkHj9NQcIkdX0AHsWbuCEp7kJIw9jqeUWqGcBXA2+FuYky7o5OnSlZhnG591+zpsXBpu+OwwajUa4k19bjH7005FwZqLq9wcKN4SHm/DaeMwqrspQUS2qNqLv2R/38Y2eO2fTT+inO525pwiicnb3OuWmNIqpkzl+zOQTNhqFfy8EoJYj9pI06mV7oaiZkKcya1nTRDnyUBFD+AMXVeNKotWY/vwfFcMkdDfTX9/SzqLwOLn9e51TlbK26zy96CVaG0Q3kI4Lu4A0iD2xYxZ/x6b2zW3D6DRmU0XoR3UPRKkf8gUNwX+4Vw8oZHauBy7TAFNGr6mRczmesDBywhFpjh8mfF+ficKFjkzIX9Gd5NQCwtypYDszuj9EITxzrY2J4SZUv3Gw/1mNvmOcdXFqAuEjjLutewQ4gnqXsa7Z98VFGlC7u0/zyNv9naWCN+NVeprfcu3KcGiXE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2swAhFUnD2B34m9DgHK4oSrl4Sy+FF6gCYXboB7cowEbX3g+UA/hvb4vNvsB2who+75YDrKXzEfZlWs+7WAs3LrL9LNApD38SBCY/f9TF4/DKBLg5Gr4bkRorm5G4sY19wI++KVQgZiPx2ojfqeXJU57CoP4YBCTXWxjSRxDaPIdrlsGATMKPXoeuvOGZIU3wXK1RD3BtMD6ZyL5vbtEgExpnNgR6bezIP156RHIxLJaVzLF1WlJIacVkHkK550K4ZuCNENUtFZp59GPbWVx9EqiyvxaovHONipp313pU2OVifKUcaVyVUUG4wKGJ/HSPcLdOJZM5yQYm2YiYATAkSo= X-OriginatorOrg: oracle.com X-MS-Exchange-CrossTenant-Network-Message-Id: 217835b8-c8a2-4e26-93af-08dc762a4f21 X-MS-Exchange-CrossTenant-AuthSource: SN7PR10MB6287.namprd10.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 17 May 2024 04:32:06.8873 (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: Uju9xsSffIzBGqd2QOstq9D5IO4/JY/P/wACHZcjJBjlbdZGRnVkgmpnpaVERkcP3z9N5nXJODrNXbUITWs+AVhB5WYalDrrS56kIvgOYlE= X-MS-Exchange-Transport-CrossTenantHeadersStamped: LV3PR10MB7746 X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1039,Hydra:6.0.650,FMLib:17.11.176.26 definitions=2024-05-16_07,2024-05-15_01,2023-05-22_02 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 mlxscore=0 mlxlogscore=999 adultscore=0 bulkscore=0 phishscore=0 suspectscore=0 spamscore=0 malwarescore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2405010000 definitions=main-2405170034 X-Proofpoint-ORIG-GUID: -1gHYEWlKQzcp8SiYAN83oHzN0dtzxz6 X-Proofpoint-GUID: -1gHYEWlKQzcp8SiYAN83oHzN0dtzxz6 Signed-off-by: Kris Van Hees Reviewed-by: Nick Alcock --- Changes since v2: - 1st arg to generate_builtin_ranges.awk is now modules.builtin.modinfo - Use $(real-prereqs) rather than $(filter-out ...) --- scripts/Makefile.vmlinux | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/scripts/Makefile.vmlinux b/scripts/Makefile.vmlinux index c9f3e03124d7f..afe8287e8dda0 100644 --- a/scripts/Makefile.vmlinux +++ b/scripts/Makefile.vmlinux @@ -36,6 +36,22 @@ targets += vmlinux vmlinux: scripts/link-vmlinux.sh vmlinux.o $(KBUILD_LDS) FORCE +$(call if_changed_dep,link_vmlinux) +# module.builtin.ranges +# --------------------------------------------------------------------------- +ifdef CONFIG_BUILTIN_MODULE_RANGES +__default: modules.builtin.ranges + +quiet_cmd_modules_builtin_ranges = GEN $@ + cmd_modules_builtin_ranges = \ + $(srctree)/scripts/generate_builtin_ranges.awk $(real-prereqs) > $@ + +vmlinux.map: vmlinux + +targets += modules.builtin.ranges +modules.builtin.ranges: modules.builtin.modinfo vmlinux.map vmlinux.o.map FORCE + $(call if_changed,modules_builtin_ranges) +endif + # Add FORCE to the prequisites of a target to force it to be always rebuilt. # --------------------------------------------------------------------------- From patchwork Fri May 17 04:28:39 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kris Van Hees X-Patchwork-Id: 13666634 Received: from mx0a-00069f02.pphosted.com (mx0a-00069f02.pphosted.com [205.220.165.32]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 1A6F3DDB3; Fri, 17 May 2024 04:32:51 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=205.220.165.32 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715920376; cv=fail; b=ShuTB2Fy+6NdxkwF73ZglHaTEj0iEFR9Q9HEZGBbTYGxEONXrNw/vxFmatkLBMTofa7j4lMk4kEGSxu1v+I8X6dASvqhf/N6XfJ7muiapyHPxMexP9aYUMFVUavKktIBopcdVPbhoonHqgqaHSrbi4aNCv4LdmeRSlv6G+7eUnk= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715920376; c=relaxed/simple; bh=RSoQbeXOQ4VMtzIOo3uukA2lu0WJpM1jTZ9o7ZHlZco=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: Content-Type:MIME-Version; b=fRCE6aCLXIFzcXSZWyXBXnsYgyls/0lIwvcQ1acYI50f5jfdPwWT2Bik0KgBd8AljcWO9LATj1dkO/iLoaSGrdc7mne+YWwsQLKTIuyLobqqvPPZxrMq2suqLKWqC3QpjYlCc7iIA4ebJElweVhKxmWFAGJs7MqkpS/D2vMydUA= ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=oracle.com; spf=pass smtp.mailfrom=oracle.com; dkim=pass (2048-bit key) header.d=oracle.com header.i=@oracle.com header.b=e1s+xsKE; dkim=pass (1024-bit key) header.d=oracle.onmicrosoft.com header.i=@oracle.onmicrosoft.com header.b=MdPQdAP0; arc=fail smtp.client-ip=205.220.165.32 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=oracle.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=oracle.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=oracle.com header.i=@oracle.com header.b="e1s+xsKE"; dkim=pass (1024-bit key) header.d=oracle.onmicrosoft.com header.i=@oracle.onmicrosoft.com header.b="MdPQdAP0" Received: from pps.filterd (m0333521.ppops.net [127.0.0.1]) by mx0b-00069f02.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 44H4U2WE007250; Fri, 17 May 2024 04:32:44 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=from : to : cc : subject : date : message-id : in-reply-to : references : content-transfer-encoding : content-type : mime-version; s=corp-2023-11-20; bh=yn9L6GPjWsxbiOfVlHpDFsyZY3PXsd7EUaFTdzfwZ4A=; b=e1s+xsKEYrt8uMD4q61sNPZD9AlWeBqEF4fJAzt0LVoJMBq3+/iGL01Y4YhYnxe4pdMn leLosoaoQzxiUn1bLG0znnZGYi6++gyfoqeoHBmSuX1YeT8PjTpUGiIXb+8fghk6iCuc /NzBCE8WsEWKU/Bruq66UhcgI9RokBf+gYVuKYgjigCMzcCUZ0346C/yqLMScMPEhHtK RXnR5D7Re6Nado1m4npr+wlWCW3HyghBL6JDO2RJ9H58GvBDdsj/siDuOaPKAexH7Tlt h2jd2v+pdy5HiN8OyniEsaV951fiAxUFembZgEjYU2uIst40o5gGHwbygZfPSCExKtNB DQ== Received: from phxpaimrmta02.imrmtpd1.prodappphxaev1.oraclevcn.com (phxpaimrmta02.appoci.oracle.com [147.154.114.232]) by mx0b-00069f02.pphosted.com (PPS) with ESMTPS id 3y3txc71s7-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Fri, 17 May 2024 04:32:44 +0000 Received: from pps.filterd (phxpaimrmta02.imrmtpd1.prodappphxaev1.oraclevcn.com [127.0.0.1]) by phxpaimrmta02.imrmtpd1.prodappphxaev1.oraclevcn.com (8.17.1.19/8.17.1.19) with ESMTP id 44H269gF001205; Fri, 17 May 2024 04:32:43 GMT Received: from nam11-bn8-obe.outbound.protection.outlook.com (mail-bn8nam11lp2170.outbound.protection.outlook.com [104.47.58.170]) by phxpaimrmta02.imrmtpd1.prodappphxaev1.oraclevcn.com (PPS) with ESMTPS id 3y4fsudr68-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Fri, 17 May 2024 04:32:43 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=GOFY1EB4KA27rt9O3/tVdM1RWMWJlqPq49jmxGyAETBS6xsYz4uYEratpAJUoUyjhtU0NtylBTzihdDqDX8xAvdbZYNyPHyQDFZH+jC5zv7izMG3H7r+JkPc8ePIF/iD2sDzZWUHvd1D0tZzqaVt69ufg3q6DLpTW7Vv4eWtXmc1g4Ak3mfuFFqgd3PSyr0FowFoESfPIaPqNwjJ6Fd4AQkzoQrPj9o3VmkltFS9Lvbc+WZi9a7E4xUImu/PVWd9IWNzw6Lk7m/VskHDfPgHL9e5BzsQObCrtw2M02xtes07Vga1vY/PZ9kr7qO9R0Gx0zGA5MnMcU91J1BniCa+aw== 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=yn9L6GPjWsxbiOfVlHpDFsyZY3PXsd7EUaFTdzfwZ4A=; b=KdaPKmHp99/FuHTzqVCsQzEMMw6x2Jg51jUkoawnEKqF6l/y1yPIRgPnOWHdQqlD2Ng6kRh5MGjl3IzCsUtgUgziqlnjAeAuW8lLDvhPi7zeenf7Z093PQ0YnIBLTiFyBpgBkmq4kixmBKAixTr3uhRWTE3hPnDgN8PNPzyuPIyQOsetkD4bjJazmho2pDvJID+XLQVe4QIYwWWhvyO1h4uYohQDKzaXQHMDlpapURbXB/jtqX2j45RK7VYhWs0DXASQ7mj1dPVBzL1CEl0SqZ/pMWGrUshfAgdFxa7Ep9PfyYrRwbM6v+jZHIWeb3+54EUhit+cbLZNJUXoruWvGA== 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=yn9L6GPjWsxbiOfVlHpDFsyZY3PXsd7EUaFTdzfwZ4A=; b=MdPQdAP0/B13xliQn+UYr+r8G4pj+PZA0nPwx0L2CI89k+javVkc/1lEBt4P6XcetTNJCBnHOy+A4TFw1HqOI2ARRWclJzozN0/PbwnUoDtg5ied6g35kQMHca+SqnvSxnNBLeehnCtSQgLf+TWWC+rlyQfhNkRFl56J2G4c4W4= Received: from SN7PR10MB6287.namprd10.prod.outlook.com (2603:10b6:806:26d::14) by LV3PR10MB7746.namprd10.prod.outlook.com (2603:10b6:408:1bb::8) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7587.28; Fri, 17 May 2024 04:32:41 +0000 Received: from SN7PR10MB6287.namprd10.prod.outlook.com ([fe80::6c60:5db4:7058:1440]) by SN7PR10MB6287.namprd10.prod.outlook.com ([fe80::6c60:5db4:7058:1440%6]) with mapi id 15.20.7587.026; Fri, 17 May 2024 04:32:41 +0000 From: Kris Van Hees To: linux-kernel@vger.kernel.org, linux-kbuild@vger.kernel.org, linux-modules@vger.kernel.org, linux-trace-kernel@vger.kernel.org Cc: Kris Van Hees , Nick Alcock , Masahiro Yamada , Steven Rostedt , Luis Chamberlain , Masami Hiramatsu , Nick Desaulniers , Jiri Olsa , Elena Zannoni Subject: [PATCH v3 6/6] module: add install target for modules.builtin.ranges Date: Fri, 17 May 2024 00:28:39 -0400 Message-ID: <20240517042839.544650-7-kris.van.hees@oracle.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240517042839.544650-1-kris.van.hees@oracle.com> References: <20240517042839.544650-1-kris.van.hees@oracle.com> X-ClientProxiedBy: MN2PR01CA0013.prod.exchangelabs.com (2603:10b6:208:10c::26) To SN7PR10MB6287.namprd10.prod.outlook.com (2603:10b6:806:26d::14) Precedence: bulk X-Mailing-List: linux-modules@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: SN7PR10MB6287:EE_|LV3PR10MB7746:EE_ X-MS-Office365-Filtering-Correlation-Id: a4fdb8cb-66e5-4f04-de38-08dc762a63b1 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230031|366007|376005|7416005|1800799015; X-Microsoft-Antispam-Message-Info: 7L3bjdL7tFaMcirl93shJRATkOTGDUwt0Z/AzHCP1kJ97oz91m/glL7w1bOQBblyN09WrfgwDtwJVZIuN2Roi1eX59xVo4fCZJ3wgbK3vlzuX/As57eyw1oM1Z4Qp/pSrnPGCeKta3Fg8iNfzo8uebtfF5+v3bzU8wslU3B6xwtVs6plFPFpQFVFGAPUeL6fvcdXr7NUGoHZeflWjkJ3Qb+lH83py6tGQftIQaL2nEifUgHP+j/d5QRBbeeqlarYQzCuvWDFgQrgHncRj6ywscB/c7lCcPi3Vqzh/BUbhSZMhKrB2RCL/fTPUCDIEm2PPfGLvY4WdvFft21JQPu1cXgojVd6keqQoQvyxOw3J2xkAJL36V3gCvKLmExYMOR0h+wQbkHUzUEbHLIbMkeE6jP19DSttFCAEqTbI+maVkfrLR9jT5VMz6930gZQOEsTZc8rPPW0PsxNx3m+NwFu3TZvMvOB3m3DE5xh7ANQiivAfM/bosHGQoO36ZWi1Zxpmcj96n1JaC2wBaxN/X0VgbKtmlhqH/sakyUltHn6mVasSN+ldBr7ydMT4E98DfpwUEYFzWnFUwIJjkQIGwZ0dxAW4w86KCQbWScG3FPVNLUAUA1ht7GFcyGMwOH9vhOQ8ja42ror9b+MR+XYh0kun+CxLBNWXllegezP6YVQiI9FYUvQK/rMualeDJ4Eo1nXtQ5qpAB2mbuP19lZEB2Anu/9tU9wwkUgdxJrYhDE5h3ivsT4Rjs4+CWkQOs9s+EiJoE5JjRnho+zN6THRGZZsIbjXpG7A+btzSZyVTHtjXi0jKc72wGboEuPCLr/IDfWutvhd15MuAm36csZ9cBbfkahpW8B68BoNltslG0SaT05wrycbW3+pGsz6CLDa5c6n/OFAqBYcTDZ+AMwscmjPp+vV7GuVaCY4441G65qiGEnOsL+Jv6Tf/kFSL/1Gy3IQRfm5l+UnOVFVpu3w7ApXzQP0Hatya/7O5Nav/HMkUcjxr1MsrgLfsC2T+mrnjeHYpdfEXKxZOd4QO8EoYOB4HExLdyv3fdzVIVuhtp0rk0xcZ0PXKZspcN5VOhxMu0OQWSuWVq9LOC3brqBWtmcZqNu/+tHtM65GNxvIRhOA+DBstG9GwqUZ0o1qK4iTYj4LacURnY2onbYvZ/Qhhzz9NWDKyU4jsk7WnJlwpcg2Twe8w4GpudzzS8MDhRE3dYraxUc81cKUAzzI8MEL6wn5FcR86CupN7Jary5OCqHkFjeGPElwndIpmT0iOlToXrSsvRRHYVKRtG8rlQxvVZ5fw== X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:SN7PR10MB6287.namprd10.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230031)(366007)(376005)(7416005)(1800799015);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: z4Vc9Cus3+ia47VRWN5C3tG8RuNZu6GBVuRSUNDjIgbBTRabPNkvE9tJQe+eRLoWEJarWUsw69ClpTPsZw0m5wBdqicNz1WVlTF/Xun3Iqa1SzOi9Kby6R48EhkzwMTbX44Jbe5XbJs3EmuTwAqiibeOB7+i7mLCX80VEAuJj3HoY0CKBcGmBKh725DYvpHLVIAAN1uKdAjO5B0PgD5JbPOI3bSuRw47mUfL+WKiqG5oWYuwpBeTj+1IA+uid77LzVH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m+U9M3slIjit5pyd/hiQS1ASx1gE34tCLebSCr/1cEP5AXOE5lXEa1ebtDzmmAkQrJf5Qs4Y9SSOPgo8GQsGn9DwU7ZF+QKuA7zXLCBqQ83p6N5iljRKTVJZgHjETH9X1gfGZOviIFXHjmYwVCbImY946jgCycNHMh5wyaMQPMQ6OQzU2/bw9RY/Pna8cGqPTn4XTNOJwXYzVRed91DW+E/dUmDSXMLwSqcp0xPEyVpdCaD4itN8aDQo0aE4ORt9ojT5d1Y2g+aV56YPbC7+O/Q== X-MS-Exchange-AntiSpam-ExternalHop-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-ExternalHop-MessageData-0: 0tscfQ/4YQyBKxnAX27GoihDPhva2SRItTn12QExxY5jei6K8SrRYKQK7itetKyJl/bDKvaae3nyomlzmjeoQfsQeQqMAwPduMUdRJ1PzCnyGCWBu3FIbJuJ/F85h5sEd1cO4RpRK2uFCLSrvZygTko02sQI0YylIOpDY28CJoNCFFIvLtWZ7PC8SjF06DtIGZDBpSQuFsRYS/ztenRPzJ6HaB3VdMIs/gOy1aMouybbmkZr6MuLBXIXOBZ2uLSnSycu+4xBArW8UY/RZKoAMJCEo1nAxGmRGSCkqZOeX6xTkRYzmdiB6kck83bNSHGASScRo3NofgJuJHZe8v6z5eYYdmbRq0GoM/igceFV8FlPBFrK8PKLdL6pYz9UxLDXFoQHm3LMFf/tXKYRIEVzLzRqQEBX9vbJr8rMLLf+u5TVKLUZbYgT4lmQQNL+TARLPtYX6z9YRaKKtywLL72eraHliY4DWlLmlK+hMfyIs1DEEQPsf1z3lk4gV3QnigUXqxbqbtHvE4QVUzY9pM1ZsNlzu/NIuymco/9i33x1O7wAMv8blOiNSYvquzrrewcLhvQwA5mLUfCl/WPI31eUOyqLp+I/69PASwgO908TYI4= X-OriginatorOrg: oracle.com X-MS-Exchange-CrossTenant-Network-Message-Id: a4fdb8cb-66e5-4f04-de38-08dc762a63b1 X-MS-Exchange-CrossTenant-AuthSource: SN7PR10MB6287.namprd10.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 17 May 2024 04:32:41.3711 (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: YLGVdYnrpsZeATwTMSI+tvNFBICVhQ7H/LFt0K3U3SNginE0yVV91/sV0qZ4kiCGXhV8xK385nKiocSbdhneHCAiclUmmGiCF7z4Eu3nVKk= X-MS-Exchange-Transport-CrossTenantHeadersStamped: LV3PR10MB7746 X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1039,Hydra:6.0.650,FMLib:17.11.176.26 definitions=2024-05-16_07,2024-05-15_01,2023-05-22_02 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 suspectscore=0 mlxlogscore=999 mlxscore=0 spamscore=0 bulkscore=0 phishscore=0 malwarescore=0 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2405010000 definitions=main-2405170034 X-Proofpoint-GUID: -C4Q__ThmRctru9jqpePB4W5S7CYIAQY X-Proofpoint-ORIG-GUID: -C4Q__ThmRctru9jqpePB4W5S7CYIAQY When CONFIG_BUILTIN_MODULE_RANGES is enabled, the modules.builtin.ranges file should be installed in the module install location. Signed-off-by: Kris Van Hees Reviewed-by: Nick Alcock --- Changes since v2: - Include modules.builtin.ranges in modules install target --- scripts/Makefile.modinst | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/scripts/Makefile.modinst b/scripts/Makefile.modinst index 0afd75472679f..f5160ddd74239 100644 --- a/scripts/Makefile.modinst +++ b/scripts/Makefile.modinst @@ -30,10 +30,10 @@ $(MODLIB)/modules.order: modules.order FORCE quiet_cmd_install_modorder = INSTALL $@ cmd_install_modorder = sed 's:^\(.*\)\.o$$:kernel/\1.ko:' $< > $@ -# Install modules.builtin(.modinfo) even when CONFIG_MODULES is disabled. -install-y += $(addprefix $(MODLIB)/, modules.builtin modules.builtin.modinfo) +# Install modules.builtin(.modinfo,.ranges) even when CONFIG_MODULES is disabled. +install-y += $(addprefix $(MODLIB)/, modules.builtin modules.builtin.modinfo modules.builtin.ranges) -$(addprefix $(MODLIB)/, modules.builtin modules.builtin.modinfo): $(MODLIB)/%: % FORCE +$(addprefix $(MODLIB)/, modules.builtin modules.builtin.modinfo modules.builtin.ranges): $(MODLIB)/%: % FORCE $(call cmd,install) endif