From patchwork Tue Nov 26 08:56:44 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Huang Shijie X-Patchwork-Id: 13885586 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 513C8D3B7CA for ; Tue, 26 Nov 2024 09:00:44 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:MIME-Version:Content-Type: Content-Transfer-Encoding:References:In-Reply-To:Message-Id:Date:Subject:Cc: To:From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=ZQYXYpxGwXH28WSftPPcH/f3ITFo8NHJ0iu0TsGaP2M=; b=EahfTRb1EADHS7wBZdRI6oO9NA iXBZdLCc8bcidfV3QV4QBZeRLnR7AAeg4kC/AHXe8Lmy/B1Pm1s6N2YDGCsVxEha8BMk2YOVXBXC4 B+BhNw4OCF8sIxtmmzOiT0nHu8FSVZ+XhTGkaQzB6Sjf23tS/pekQNZUwQI/1Gb3nRAar2mDQazix tJMNt564dZrQSHEkl5R2znsTAkKb0DJN8ELbxVYc2k8xi+x1o/VICssXEbTdnkN7WI1RENxnHOB0U r24HTEYbUu2NXVr66CQXGSr8QT1rElz4/arq51FgDxzbSAT9gmVkbnUPYRos37G2KTALQQ7sTw/aK JwtEjOTw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.98 #2 (Red Hat Linux)) id 1tFrQs-0000000A1oL-0KA2; Tue, 26 Nov 2024 09:00:30 +0000 Received: from mail-mw2nam12on20731.outbound.protection.outlook.com ([2a01:111:f403:200a::731] helo=NAM12-MW2-obe.outbound.protection.outlook.com) by bombadil.infradead.org with esmtps (Exim 4.98 #2 (Red Hat Linux)) id 1tFrOR-0000000A1E2-2UNx for linux-arm-kernel@lists.infradead.org; Tue, 26 Nov 2024 08:58:00 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=BfnNLWayYTMTBKVT2NlkP36XsiIqnsAZ30BGWIRwAZ7S3VadS+3/TdieEh5x4vCNC5PcMrDjUwUT8wignKVItoP+WvdFyAdtxMPoUPbxOleFv48O/hA/j8yabtQLLkd84zJ5EAax8+06ZMUYpq/7cfwuyYQ+PNJO0e48r1qzMr/s0RngBYSilPOBewNsLbN55p8OJaKGgovyWJfsv55A2mnXaRuAdbReXOLCId7NI5r86GxAIwF4bgiSHKMnFC59yC1LH0WVMuqbNgzomwx6pRNbu/kMR2/SR0NG6eagtMEGnhMuvJYlF6QR3QaOQL6CO3rnCU1ULfFP1MxJK5j1Dg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; 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=ZQYXYpxGwXH28WSftPPcH/f3ITFo8NHJ0iu0TsGaP2M=; b=t+JBFskvC/lNhZeir+16Rgzv05oFr4BC5G395lgSDktKDjmlPT2hVH4q0UGSceIebL+ej2cvtSMN2FBIla3eBcMI/P0U7VA1VAajpr1VFeYml09vLOVXkRbHmMvQrLvZfZHYl6DIEgd1eevlciUYQmxoMgWkGXIhctBVgPwWGYws5l7bvWIdQMVuXb2ykBiD4C5oS37LIdKJFvSMJugw7wfpuz0FotAOzDF9Z0Z2b0OLN2jJH/QyD3KXNjAa5C9qexmP0p4tmW8CbE9OkK8WyOodjSMEX9WTp7Yi7msvLcJWg24ELwNAEhGOwpjFElOncPaEFeUdfgiRcnhYDkZzBw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=os.amperecomputing.com; dmarc=pass action=none header.from=os.amperecomputing.com; dkim=pass header.d=os.amperecomputing.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=os.amperecomputing.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=ZQYXYpxGwXH28WSftPPcH/f3ITFo8NHJ0iu0TsGaP2M=; b=X3OiqyA04xfk4nJW0Uh/Bf59EJP1p3coOQqYt5O5FQXQj8tAIHt4J6xUUbRRnX1ofQ7bTZKMeDOaG8c1VYMkou9wFPO/4Z7V6BuUS+/8MKS/tLLB/7giVo3qcRmRZrr+utd0Fl1v8/f6CsXWL9RU/CWtIq7P0mFMZCcJdYNYCrw= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=os.amperecomputing.com; Received: from PH0PR01MB7975.prod.exchangelabs.com (2603:10b6:510:26d::15) by DS1PR01MB8869.prod.exchangelabs.com (2603:10b6:8:222::22) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8207.12; Tue, 26 Nov 2024 08:57:56 +0000 Received: from PH0PR01MB7975.prod.exchangelabs.com ([fe80::6926:a627:118e:8050]) by PH0PR01MB7975.prod.exchangelabs.com ([fe80::6926:a627:118e:8050%4]) with mapi id 15.20.8207.010; Tue, 26 Nov 2024 08:57:56 +0000 From: Huang Shijie To: catalin.marinas@arm.com, will@kernel.org Cc: patches@amperecomputing.com, paulmck@kernel.org, akpm@linux-foundation.org, thuth@redhat.com, rostedt@goodmis.org, xiongwei.song@windriver.com, ardb@kernel.org, steven.price@arm.com, suzuki.poulose@arm.com, mark.rutland@arm.com, linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, cl@os.amperecomputing.com, Huang Shijie Subject: [PATCH v2 1/4] arm64: make rodata=on behaviour be the original rodata=full Date: Tue, 26 Nov 2024 16:56:44 +0800 Message-Id: <20241126085647.4993-2-shijie@os.amperecomputing.com> X-Mailer: git-send-email 2.40.1 In-Reply-To: <20241126085647.4993-1-shijie@os.amperecomputing.com> References: <20241126085647.4993-1-shijie@os.amperecomputing.com> X-ClientProxiedBy: SI2PR01CA0004.apcprd01.prod.exchangelabs.com (2603:1096:4:191::22) To PH0PR01MB7975.prod.exchangelabs.com (2603:10b6:510:26d::15) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: PH0PR01MB7975:EE_|DS1PR01MB8869:EE_ X-MS-Office365-Filtering-Correlation-Id: 9f530de2-2152-44cb-0541-08dd0df86b4e X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|1800799024|366016|376014|7416014|52116014|38350700014; X-Microsoft-Antispam-Message-Info: HUhUpnZ9KjceK9On/wr6sAjPQ4oYy+sMaKj0GbrZF3HRxBy+zAv2yQZrTQE+NgUNpO9HLRBILQuaTb+sgWROMiavfZfI9lGhaOhZSpIQkY5ziT/5sKT0L1bgjxVGUNSrvyCdFtAQgXkgG+F2omuS+sqIKLHKmTfMd+lM8tYwHmAcOmGqF2NxYvFeoDCs/u2WTNg0SWQUr0mC0Sx1cDq6CeUOF9yOUuapQtSiHBmDzy+Yt6SMzAfF/CJuro4omUJFqH8hhLDEHgkZjRQq4R2AfRAZKdPibHVJXgCd05G6RKJRKBQ4xl9nS1429PwvwfxAyPatTXSB6KhkKcykNtR6usWeo/SresqV51gQFURxw1Kxmum+yb3VBvDT+puiRK2RsOgw+g6pB2VRZBzoF/153MOUTKUQJm6T70h5cHdP6r2x4v0xbngtsS/o3h9nQnnbifOr3tJeH7r2WnZsiSa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FS:(13230040)(1800799024)(366016)(376014)(7416014)(52116014)(38350700014);DIR:OUT;SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: /2IypKrH6kwfn/JhiP6RX7rwEMLiW6sNH8AyKIqxTTPohbLNnoR5ErYp2LWcbolLF8DCX/Dls4o9AfnKLYacRIE+sqa3gyJv1SKTlnohZ/Kh44K20/DG+PYyabSsYOhmdrj9FN2X8y7ssFiCBFrmpY7H+A3A2RMfsK8kUFhVvaCFsXV/6L80Dc+9RoWdSdtwywvaYNKnHvmJJyJBDS+LCfkv1v6iksZ8/yL/WzYn6Wj02x6igQgIxk3xk7k406yfEcukdVTKUKRmHIhU9zVpcFd6iwU/1hiVmwUHDvM7fkJmql9CSqbn6Hxs+q8gGGHdPzXf8m0+uZ9t9wufTf443BiwM63FS3QlEWdyhDOhGl/L+3rSKCSLdGNYXDP86Zd6dm3c49qahDsUE6W7cQBFXKNhKdBY29zDNlUg4ZT7LLuzZn1mgFeh3u9TDNxwIx+MfVDYG5e9K4o29IEH3VWDSt5TIqyyOIAZ/7W55GiJXdMEM35d71Fs0cR4LeLAQJuKjm3KVKcgK1c3PZWMHVqZ10adrU1D49S3gdumyihcTU7GNZ96At92QlAyoBD2llcK0Owe5QcumquGAJS8lscl8UcB85AnQLI87LAwAmsWWOaxTWWe5pDOUEsyIs97DII0J99i6bz8HVnua7730YRIvQanMRsWLRANmRlR2rw3cpJ0AMuAmI2k/xTO+Vd7vTFKEdKSZr5Z31bVr9IHQ/izfIa0QOR7hGvJpLfPI9BDd9P8j4u1DGDTEPv0ImArO4IMUsoFr2ZRJHMGJ2KABm9IPJC/kTkEfKyw82UPgQ1wyNzBWHbm3fTdu+4p7ooxz867w09W4p0efO4suHc3RMfha39sztSijBlQJhyyEVvQ0kmd0IWxCKl7EwYyC3rbfSJcmtlfORR5LeJXsWMSCyl3vaI83HAwDsOVWbx7rEuhfWjrK3utt6jgef/RDzNZIcCmihxxuHsjqzYkUm9IzNwKczveOOETnaGge3J2f/HKMQSC0jtBX2TxKhXT+A74plQCNw/oh0/eUMxxwaCN6BThM3+if50urekS/UUKP4e4BxCFYvfL0yzSS6D/8356J/ZLK9k/z9+xbLK4H7rNdaqVYoQ1na2EBLVCPyz1S+CHdVQbItUq2ORPkm7LjnQhfRsX8zBcPKKzOlJzQ985UXKHqN1m5ZQXFfNjPXSt+eeGyNcPrBbjj/AaX+gy27mimcLuzJKygQ98f29lpWjhOeZaHmhaiJaI9JSe6zA9MbDtFcoeYKJwULWV8XXujbG2NrYeTZcPSzON10Mf7FYZtGKqPRwxGK+1QB6vjqdn4jz4o6+DXtgrvcSHk73f+BVvE9npT4xn++Ej2KF1P/yBIuwNwKa60gcyKD8nSijb0odPYDIZdoFEmRp7lmnMZ9Dbmir2CntoElIF97ox3fNAIpCTnprVozkJjwmnJF83Zh3OWa687RKMlwD5cBXBsbPqKncOYMo9VVUkWfopjEQ3r2n2efn5UvxHC9yk6NnQGP8+H4UcU6Ka90DYIK9Yo2g6Xda/BXhssrdmK8VVglpfVzCAdu+n0OISg3sY0i8f+YRtFmmcPxmK8gNTJMTmq6iQAMlu0ydxN+A5PO8RY7g+kgNBQidbt4wtZi572p1kIZ/zQYc= X-OriginatorOrg: os.amperecomputing.com X-MS-Exchange-CrossTenant-Network-Message-Id: 9f530de2-2152-44cb-0541-08dd0df86b4e X-MS-Exchange-CrossTenant-AuthSource: PH0PR01MB7975.prod.exchangelabs.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 26 Nov 2024 08:57:56.4053 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 3bc2b170-fd94-476d-b0ce-4229bdc904a7 X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: f/WF5DA/ez2H/lUFhBsEqgaVa8QcLyG7xoS2dYXeeuJTRTx5idS0FlLPS0YSzqaCCPtozX+fmrwOcmZkIi87dacYyigg/fNQRLtsHBLW+P3493pNWHP5RkBVGhtOi+PO X-MS-Exchange-Transport-CrossTenantHeadersStamped: DS1PR01MB8869 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20241126_005759_631875_7DFD57C0 X-CRM114-Status: GOOD ( 11.24 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Make rodata=on behaviour be the original rodata=full. After this patch, the rodata=on will be the default, and the arm64 kernel behaviour will follow the Documentation/admin-guide/kernel-parameters.txt: rodata= [KNL,EARLY] on Mark read-only kernel memory as read-only (default). Signed-off-by: Huang Shijie --- arch/arm64/include/asm/setup.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/arch/arm64/include/asm/setup.h b/arch/arm64/include/asm/setup.h index ba269a7a3201..5ded3bd11476 100644 --- a/arch/arm64/include/asm/setup.h +++ b/arch/arm64/include/asm/setup.h @@ -21,7 +21,7 @@ static inline bool arch_parse_debug_rodata(char *arg) if (!arg) return false; - if (!strcmp(arg, "full")) { + if (!strcmp(arg, "on")) { rodata_enabled = rodata_full = true; return true; } @@ -31,7 +31,7 @@ static inline bool arch_parse_debug_rodata(char *arg) return true; } - if (!strcmp(arg, "on")) { + if (!strcmp(arg, "full")) { rodata_enabled = true; rodata_full = false; return true; From patchwork Tue Nov 26 08:56:45 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Huang Shijie X-Patchwork-Id: 13885587 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 7324DD3B7CA for ; Tue, 26 Nov 2024 09:01:47 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:MIME-Version:Content-Type: Content-Transfer-Encoding:References:In-Reply-To:Message-Id:Date:Subject:Cc: To:From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=u5AzrKavhO1VpmrpbaXWmJbotll9Vr7JY23qALOx3Jg=; b=nwUXpQZj2SNga0L683j3nWGtny j/8Thc0IIb1vXqHuSygoz4LjOCIolUqaj3XVGshWMwuHDk9YKuEoEF+Id4wDH7EwcDClde+ETg7pt jRvC8RVcQfEI6msbvD/kfWJFAgDie4CX7nE3QV/n1huBbok4E9J0SaogH7/QC4Fzwb0ezg+y8kQkA to4sZSg6hoSzKu83spwPcIcxZGYIcInMix46NIQX1+LGneA/96lWkAexE1wb2tHxL1jZYWMSEd1BD ARTI8X2SnGARo+eGhzRV22mnLdTIhyDLkaP9ca0mnYKi2rpAVQIxFEb75sFPuPJ737suGBkr4hQa5 2KkTS/dA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.98 #2 (Red Hat Linux)) id 1tFrRn-0000000A20R-30Q2; Tue, 26 Nov 2024 09:01:27 +0000 Received: from mail-dm6nam12on20729.outbound.protection.outlook.com ([2a01:111:f403:2417::729] helo=NAM12-DM6-obe.outbound.protection.outlook.com) by bombadil.infradead.org with esmtps (Exim 4.98 #2 (Red Hat Linux)) id 1tFrOX-0000000A1Fw-2caq for linux-arm-kernel@lists.infradead.org; Tue, 26 Nov 2024 08:58:06 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=afQBNRtCKKzCyML+D/a72nU3HQNmnsidMWPAT2aJ5MH2FRZeqnn09VNqhCNJzGGOGCZmLckWISLFg6I828xcRlwiEgojlNDTuZMd4NGCVuNoiStUzaXn+uQV6vaT6guM/xDfc2dVQKYj1Ik4UCyEui4aW903ERE3IXpO9KGct+XCVHzTsBn4o5Njf7tHnaRTuKsFMJ8+odF0NrapqLHLdmCrvnqXjg4agSkrlOkGzbHnn+0zHmtnQzD/SSS6vX4mMu3Bc1zkL+HUfVpqKoHDAHy2sR+uAmqACBeQOroAb6lZLpiFa51bo3tbPVNGfdRPABcbrFvx8oaUno2GL6nO9g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; 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=u5AzrKavhO1VpmrpbaXWmJbotll9Vr7JY23qALOx3Jg=; b=TRRlQ2naupmM+VhYRbeQ7XRg8ZUoeCgUDHsMGdDXkC1x9vYBJFYEPUh2llPlBTfx62SBNV77TCMA4kAL0p/Xd5gyG4wuBJnMyRWluaKJo7wa75nPobtOcZ3uVQm7phhj+zMXfAehq4VCmnFw3Fmi0uP3E3AdmlT3GsZGeI0pDjpzlI3qIG6MNyPs5/sGKqnGnJTTXj9TB3ThfrZ0QqJkirqxnYyM5+YPpIsVJP1Xc/iDhYknoU7lm/19Hbynhs8V8ZcZMfXetAp9sKOR5k7A/sAuilejJqf528mn7UkRUnl4Z8xrcOEJVwu/Rm4Pn5tZnmuXE87IV6TpJNyUokZ2CQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=os.amperecomputing.com; dmarc=pass action=none header.from=os.amperecomputing.com; dkim=pass header.d=os.amperecomputing.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=os.amperecomputing.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=u5AzrKavhO1VpmrpbaXWmJbotll9Vr7JY23qALOx3Jg=; b=M8YlM5yyMOeG+CutSkVibMQORJyBZXAacqGTj/C/X/MFTmn5KN+NboyzIbKKJaEmUh89ftNzbdr8k/8VhbpINM1nM8wzbhXzZPK2RGEUU4zt8AilTiRXFoedZMb94dqh7HrSG1XFiZdFnfljXM4KW7t6iZRTCOImM2wIxEPmzPY= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=os.amperecomputing.com; Received: from PH0PR01MB7975.prod.exchangelabs.com (2603:10b6:510:26d::15) by DS1PR01MB8869.prod.exchangelabs.com (2603:10b6:8:222::22) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8207.12; Tue, 26 Nov 2024 08:58:01 +0000 Received: from PH0PR01MB7975.prod.exchangelabs.com ([fe80::6926:a627:118e:8050]) by PH0PR01MB7975.prod.exchangelabs.com ([fe80::6926:a627:118e:8050%4]) with mapi id 15.20.8207.010; Tue, 26 Nov 2024 08:58:01 +0000 From: Huang Shijie To: catalin.marinas@arm.com, will@kernel.org Cc: patches@amperecomputing.com, paulmck@kernel.org, akpm@linux-foundation.org, thuth@redhat.com, rostedt@goodmis.org, xiongwei.song@windriver.com, ardb@kernel.org, steven.price@arm.com, suzuki.poulose@arm.com, mark.rutland@arm.com, linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, cl@os.amperecomputing.com, Huang Shijie Subject: [PATCH v2 2/4] arm64: remove CONFIG_RODATA_FULL_DEFAULT_ENABLED Date: Tue, 26 Nov 2024 16:56:45 +0800 Message-Id: <20241126085647.4993-3-shijie@os.amperecomputing.com> X-Mailer: git-send-email 2.40.1 In-Reply-To: <20241126085647.4993-1-shijie@os.amperecomputing.com> References: <20241126085647.4993-1-shijie@os.amperecomputing.com> X-ClientProxiedBy: SI2PR01CA0004.apcprd01.prod.exchangelabs.com (2603:1096:4:191::22) To PH0PR01MB7975.prod.exchangelabs.com (2603:10b6:510:26d::15) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: PH0PR01MB7975:EE_|DS1PR01MB8869:EE_ X-MS-Office365-Filtering-Correlation-Id: b5801606-b654-49b5-a25b-08dd0df86e8f X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|1800799024|366016|376014|7416014|52116014|38350700014; X-Microsoft-Antispam-Message-Info: en/PWbQI1+HUIQcv41++sJZkN17nJFTRBoiLRq9C6LClyHlv4C4+woSq/1sUMRHfQ22Mfw9KtO42sSgLEqaUFhBmvBLFqs7rQyooF6orQ1Ed57RSesOE5cin2LfPqBC328lLUuBDfjc2e/MuWi1pIU5urwzc2q2TpjcNp7b3agN8Sief/CxYvF8RRJdmJ9gDSbxUI6ncQVv3/JuNOF9+Tn+tHpqMMaly5oOLjref5lK15z3S0hqyr2HPW67Xpk6w29qQs53qWxrRpIlT1nxTlGN4B+nTIpcEsGm6dQ0x7uNoQRq5r5hr55PC4zXyX+d89Xd/C6z2+S+0hvJZ1aL2Ued0y3dNlcgBHWiIavMcYPXpE9gmQBFnC2ccvGDW4gCLddFGdaKWog+ynqkKMwTihQ3/gdoxygifLTV7gJ/rqHMt5Dh4FchKZjotgE6gIKiwXYJtCThqh0xpof9YYmLZzTLpwYlMQfYDMtgS64JaM8CV9Qvd/kMMzwAoViVgWmsAd3ICm0viCitGAYvldVjsPfE0dFDqLUZ9AdTPdwBwKBeBMPDNt3+HW3KHi3AXhu/uHRGs2JEIiA75ePrgb4yJbFJ45/wfSc2bkTZESuhAX5CTY2yUcWM73h1R9dvOsSrgnY+WLGU9+F31y2aEpR9LYrdfKjaCkvX5yja0dGoa+UsnqyCuNn+DQandH4oAyrRonQBjPH9bu8Tw05h2Sk64eNdWvOCoVnIVBq+0T1B1NSL6onIgtg0y2Jgj2Vt9FLMbWR+kZpbMWKlJRLBG7NIwsPZqFuLik1idcB2OC8x7kJQSz8Skibc+AEqkBEGWeuStcHxygyQNnlZLlWRlOSG+aDnvF6VGShvRIhYYb0cCl267Vt7roCq9IvmIsSpKMSqEqmneBhhBnR/GMO3dcizQIKrYDzONyyLf9UzwqkeX2dMjqiXCfdnaVSRLcQzXQjjugEUcgMgWwKHoUNXqjclNaxcAA9BrASjT0299HuG+j48/sVbZjvLZbejY2PeL0E8dQdud8yt9nnPrdew830Gc+AV7ayaoFcA/0G49Wz2gV+8mhUdMXJfF0vbF5T34h3m9W45tsQXvnxWBL7j7uMY91Xh6kv6dWsMyHEREyFDztpMslvW4g05GI/mbuC8W9VvwczAsSiUtLCXCJs9YShB+CQhbghV42KCEPy/O7SBH6EoexYEmU6afLDLATwFJtTuKRXz5VnLFQRngKtWWlpRJM0Pyqc5y+8DHTb7z1sF042s4kfifvsEALS2yZF3feOSJiT4D+XdQK74o+UdLKk1NblEjeBZjLnybylU+cIFtIngVBqta/n9YAr/HBbx888V6AdYGB5PGDGIweXTCG0imqvNkV8cEjw4MD8JOiVMBmcQ68UnnnNn4yYCyaK2MlSi2ISaIBS/cWFIEVgMtUF7x+g== X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:PH0PR01MB7975.prod.exchangelabs.com;PTR:;CAT:NONE;SFS:(13230040)(1800799024)(366016)(376014)(7416014)(52116014)(38350700014);DIR:OUT;SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: 5sEy4zFiD3/Ll4YdixyqGnGwcxJz+cqjZDT9S+eSYCwujkQ0KqiHr/aG4J6aXyljtFni5qltWO9piOEDbAkkNH/b5vGpbS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Ehubpxql0s0LdKJ0NpFUQ/Sm05h9MGT2ZKzmYEWCHFJAX+Lu7lICv3m80Up3XrGPLH+tLzViCCKKSU3j476b+X/OvMbN3oABAx3rIpI/xI7mSAyRnsryeng35JQOdAgEmPp5I9gp1S649ABpIITwec3Nklwh/PpPPKMDr0IAVbFf9dyB+1kQdw6pe5s+VV7kB+iGmHCbnXg9SMM1gECqPXwZM3PKbcI5PsXiqKuiYp7BNvDwc9j0+bPne/yeA3OhHeVxgtmodFBc8EGWtLVJah9afzslZZOcdaBhNLjSbc0g17iB3Lt16e2ZKiNVnTvTDVFgpkQHfC7iX61VcrX1gGRvFTxx7Eo7HBAspNpPycX8jCbkvUGpU22USV44cIewb+NF/9GV8CyBImex5IUFGn0Anfg9wdG03eXGfupUhIrurrjwH6y/KMwR4Oni8XQl/5y+keK1Nl2xWmL3g= X-OriginatorOrg: os.amperecomputing.com X-MS-Exchange-CrossTenant-Network-Message-Id: b5801606-b654-49b5-a25b-08dd0df86e8f X-MS-Exchange-CrossTenant-AuthSource: PH0PR01MB7975.prod.exchangelabs.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 26 Nov 2024 08:58:01.8308 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 3bc2b170-fd94-476d-b0ce-4229bdc904a7 X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: N6EMpArw2NA4A16hqRLfkyX4K2FGC1E9/ioIZmKInd31Sw5u7IfuqEtXG+Lh0sZk2VKapXKaV3zmRDvTN7LZrAkAOE53nCq1SUa9HohxRpqsqzkaqeOe6KGede/aEvCd X-MS-Exchange-Transport-CrossTenantHeadersStamped: DS1PR01MB8869 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20241126_005805_662939_65CCCDB2 X-CRM114-Status: GOOD ( 11.66 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org The default kernel is rodata=on which means CONFIG_RODATA_FULL_DEFAULT_ENABLED is always enabled by default. So we can remove CONFIG_RODATA_FULL_DEFAULT_ENABLED now. Signed-off-by: Huang Shijie --- arch/arm64/Kconfig | 14 -------------- arch/arm64/mm/pageattr.c | 2 +- 2 files changed, 1 insertion(+), 15 deletions(-) diff --git a/arch/arm64/Kconfig b/arch/arm64/Kconfig index 4316b1fe8bf8..a9ca305a31d8 100644 --- a/arch/arm64/Kconfig +++ b/arch/arm64/Kconfig @@ -1653,20 +1653,6 @@ config MITIGATE_SPECTRE_BRANCH_HISTORY When taking an exception from user-space, a sequence of branches or a firmware call overwrites the branch history. -config RODATA_FULL_DEFAULT_ENABLED - bool "Apply r/o permissions of VM areas also to their linear aliases" - default y - help - Apply read-only attributes of VM areas to the linear alias of - the backing pages as well. This prevents code or read-only data - from being modified (inadvertently or intentionally) via another - mapping of the same memory page. This additional enhancement can - be turned off at runtime by passing rodata=[off|on] (and turned on - with rodata=full if this option is set to 'n') - - This requires the linear region to be mapped down to pages, - which may adversely affect performance in some cases. - config ARM64_SW_TTBR0_PAN bool "Emulate Privileged Access Never using TTBR0_EL1 switching" depends on !KCSAN diff --git a/arch/arm64/mm/pageattr.c b/arch/arm64/mm/pageattr.c index 39fd1f7ff02a..6eef08d8451e 100644 --- a/arch/arm64/mm/pageattr.c +++ b/arch/arm64/mm/pageattr.c @@ -20,7 +20,7 @@ struct page_change_data { pgprot_t clear_mask; }; -bool rodata_full __ro_after_init = IS_ENABLED(CONFIG_RODATA_FULL_DEFAULT_ENABLED); +bool rodata_full __ro_after_init = true; bool can_set_direct_map(void) { From patchwork Tue Nov 26 08:56:46 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Huang Shijie X-Patchwork-Id: 13885588 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 1EE61D3B7CA for ; Tue, 26 Nov 2024 09:02:45 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:MIME-Version:Content-Type: Content-Transfer-Encoding:References:In-Reply-To:Message-Id:Date:Subject:Cc: To:From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=KpjpmnTwu+M/9cfXmJeLGgllmPeWVSxYr07gRU47qW0=; b=jHpGSovv6XQP0o6Sx25dN6jcFn kYFoU69IuAJqohcF56y9qTl+BRKwaNEogqsGqnK8YxsZWUkhmiuoTpuEzAtxJMvrRcEHx4qh0F1io 8Bqo1oAzbpf4wfhpKg5W5zjpexJUv1X/bSzP06R93yAodtBjN631mKEUmrelT1OKQmkq+tYfQo1os 4wDsE0Q9ZJjYBodnU62vwRu8L0J3jd2GEy2FtKL44uA2LJJZ+KlixP7S/NUkuB1LpFaU4moVazyZK QUYLpFMIsDOv4eESnwshqFvC3ecgNkqbXiRtGnI390q3jwMR2wfpanxHMF5V2ovT3X20OGIV4+Ne3 HjTkzgdQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.98 #2 (Red Hat Linux)) id 1tFrSk-0000000A27z-1Q28; Tue, 26 Nov 2024 09:02:26 +0000 Received: from mail-westcentralusazlp170100000.outbound.protection.outlook.com ([2a01:111:f403:c112::] helo=CY4PR05CU001.outbound.protection.outlook.com) by bombadil.infradead.org with esmtps (Exim 4.98 #2 (Red Hat Linux)) id 1tFrOe-0000000A1IG-375i for linux-arm-kernel@lists.infradead.org; Tue, 26 Nov 2024 08:58:13 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=DLIB9o2MobmfUdDf1wFno8QU2qszPjoUe0Gz2RsuUt9Y7eC5hb+qJNZVIcAXACKxT+nLbJwusobBDrz6DjJ9sK1SlO9S1EUmc3ot1/T4kIrWbxJ+yM4R1MYMR8046KpX3+rl7GXDtvryNqJT2rXbjj10PkSLmYCUH9H8Klpzro1V5NDkOAUzGr8fkMkSHisxfAFMAs/9HgNByrlKKh9ELttTS6unKFZqYFBhJJ6er2TCnZOIZI5HYrETNL6X47rWkQKuETnmGgqK5clxYUrEhf2btElpTr65VTsRJl23qLawoIAcDOUl3j7/jNj7MbqlxLNVV2Z/XkAOXSAT+YQNpA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; 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=KpjpmnTwu+M/9cfXmJeLGgllmPeWVSxYr07gRU47qW0=; b=GZMyoqC3jwkpg/e/9TzXQIH4uFgteyw/2AIiZe94E/uFQkpWLTGAOUCGZvBl0PhQpaGM9P6Awb2AQKL8d8V2focG6u/ytgVqASwWOKdBWR0MMsGhbyMIqJrqP/dw/uzC0O4rpScf9suEIAXnFCbq17Ku32qw6FAbpTvS0YGZ6YCAREvESM+Wf3Tnd2o8F4dUId5VvE0vh5lIBj0y5uCS16kiX67KjBPJ1tdouZRGQFDLzyBQRlyznc8lvt3PEZSHYMWuyjZ9GJL3e1jsCcJ4LgujHtKdLPL8SvUhaDdkQX8AEZX4Z0Sq2MTnJ6yg4GQrIta9TniyDgzp3Wq7iWzdSQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=os.amperecomputing.com; dmarc=pass action=none header.from=os.amperecomputing.com; dkim=pass header.d=os.amperecomputing.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=os.amperecomputing.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=KpjpmnTwu+M/9cfXmJeLGgllmPeWVSxYr07gRU47qW0=; b=u6LStWG9Qohl4ivwLwgg4pWWyVB8I+aoB2dgb2QTo7noDnFgP7wi2FgOaQVxO9Fn+bk24MEZgk5eW7PiMCL4BA10c9/Ijtsud5yyitYdYokmUj9s9HDtIRl774n41BMKoSB5mKi3AMrPycm6MPTDhOHkE796MjRykulq78h+YgY= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=os.amperecomputing.com; Received: from PH0PR01MB7975.prod.exchangelabs.com (2603:10b6:510:26d::15) by DS7PR01MB7688.prod.exchangelabs.com (2603:10b6:8:7b::15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8207.11; Tue, 26 Nov 2024 08:58:07 +0000 Received: from PH0PR01MB7975.prod.exchangelabs.com ([fe80::6926:a627:118e:8050]) by PH0PR01MB7975.prod.exchangelabs.com ([fe80::6926:a627:118e:8050%4]) with mapi id 15.20.8207.010; Tue, 26 Nov 2024 08:58:07 +0000 From: Huang Shijie To: catalin.marinas@arm.com, will@kernel.org Cc: patches@amperecomputing.com, paulmck@kernel.org, akpm@linux-foundation.org, thuth@redhat.com, rostedt@goodmis.org, xiongwei.song@windriver.com, ardb@kernel.org, steven.price@arm.com, suzuki.poulose@arm.com, mark.rutland@arm.com, linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, cl@os.amperecomputing.com, Huang Shijie Subject: [PATCH v2 3/4] arm64: introduce rodata=noalias Date: Tue, 26 Nov 2024 16:56:46 +0800 Message-Id: <20241126085647.4993-4-shijie@os.amperecomputing.com> X-Mailer: git-send-email 2.40.1 In-Reply-To: <20241126085647.4993-1-shijie@os.amperecomputing.com> References: <20241126085647.4993-1-shijie@os.amperecomputing.com> X-ClientProxiedBy: SI2PR01CA0004.apcprd01.prod.exchangelabs.com (2603:1096:4:191::22) To PH0PR01MB7975.prod.exchangelabs.com (2603:10b6:510:26d::15) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: PH0PR01MB7975:EE_|DS7PR01MB7688:EE_ X-MS-Office365-Filtering-Correlation-Id: 5aa7ff68-7d43-4994-aef4-08dd0df871d2 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|52116014|7416014|376014|1800799024|366016|38350700014; X-Microsoft-Antispam-Message-Info: TEFKcpOHtg5z5zefOYJTlvAR0QnjID3Rue1zZ7fE/h8D7H3B3aLPPSdOzKE9QITpfmPqQq/XW4CGmj5D234iK1AKEzt0RP8P46fRUKi9/W0snP2WlubaxaESxx463rM+Z72XKsCStYw/etG1+cdGj2e9wRDgt7Z57lhFpkiIi+FtmMTBa96a1hPKW6MS8iARiOJGBXPzwC55P3i+KfVb89Nz5ocGSSIrtf6Dafdqx65feITpeGisikZEypt7X5Vc+nH684NnOEHWz61nVkiDW0A1eL0vjqnE6DUt1AXthe8YKKw0fbZpHKfZH9Dz2h9NodvDUaGcDuXM+ZWMp10OIw+sKFf5CF5i6MsRpxXM50t4BR3KN5y3cRWG8NI7i2KX9jejNNrVi0kCcGf/0a7acrynKQFryQIZVdEfdS2vhIip4yK7VfNbHAjo07ei/lpl1PBzGPI9WYBv7a2A66g0oQ2kZyQB4oKcXR7JW97sE+DSkIlRYPJQjFurM/luwTBAGsGzdrJsQYAQrkJcjiFFNfbwQGW7n4XImItF/zNrlMc/fA2wy7+pCfX6vMpjAvbBlnCiRArhZDj4hWk5eBJZLk7PUW15A9rdOj1pbMvj6EezIVS6okTwR3kGYQukjDpB4n1wSLQuxtylWz7pTDPJdXlW5X8BDYfPdEbSNQrNbtXplhokWHXmxhySNWPOvrdRkL7RCv9zcH/pUSdlCyTx3aDApRRW827qSdt/AdI5UgAfl39onIa29LmbPPHw7AEb9CvLLG1NF4zSSz+RGmnmVxlbaINPzc8hmoVlHCpxkopo8Zf2DVsCSacStqxcyElo2dsmGplUZD+sStOpJbkTIolSGkwTKN43K6fOSAfTGb4CWDiV6SO4Ag+5YIB+Cz1k/hRNk2v6yOHIL8sJmO863/UzkpuK/aVWNt7vXlE8rY2DqfRHDAwtl+rEa4XxJi1lNx1LZyi0yApj4XFmASqsuUF328oTjrDPwoxv3EhGl/mNZtwb/Kt07Mc5R+rko1MExcSGAx9U/e3kHQY11DpIKEno+BFWemOl4UWSD68A2jtWPkzcauf9c4jwLltdOW258jq2UKKHx3Sg99bvOlF1VtI4CE5MnqKhFhUibTnMBLqucS5Vbj2/fsCelxN7polFoAzKMfiYcdW+9PCgmI+VSTOwEQC3SJbplJBePcL45hXE7PgDw3P5e9oZdO4iisKqSVHOeknayUJd+eZvy+g0GWK82vlMzf0ar11jjGzStUyoz82ptbqdN4xs96OpPI9dBmT/IG0UaS5QT+Kz5LxKOlNrtA4fYPjywTN93jssIXdQIPTOxQKadgi+Zq+zlvkHofZ+XdnITsO+L6qMNiw5PK71fPXvMgYFOk2GJ93h82Vv72UGaF6NpIt+hgq9IdiThNes+EAH1VZ3XmANv4GSnA== X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:PH0PR01MB7975.prod.exchangelabs.com;PTR:;CAT:NONE;SFS:(13230040)(52116014)(7416014)(376014)(1800799024)(366016)(38350700014);DIR:OUT;SFP:1102; X-MS-Exchange-AntiSpam-Mess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hEnJYTqCwG+5UDX9zXQ3S7n1M8w9UwH2SnaPOvq49X2a22JTv452rcZ5BCCnAxxjFvj1VPM3/SCqfKKLDrsZUp41LaA4/stR36cpST1tHjOdZ2PlBE0jf0V4CskYkdpXhGHVH7GdjwsqldZYshpHDicKCnkK522d9261U9EV0HYAlTWaNyZUwX/wm+Er3Bai+sU+wr900Y56UWztE7OrNZOsNDNrq/66OcM60BohaNbqavANZclerS9uQYCOvqEZMoH80FMXfsFw7yoSogMfvy5uAw6UHyUjA8T1i1ZkW26qeY2lhKmh5yPdFt1zeLArgxwZNFRiTegXnYy+AyMVn4N1+gKuOJ1hsiJg8y5SWaQFmgjQOzC2z+goYJrt+jLYdOznlSOhjtVWniNn4RSWQsJOWbunaTsvwPHRjrNNB+ogG3BXBzYB/Gfzu+j7xNO6BV3DZmV6VJ143bh0wOr04BKYaMmnLSG11I23vNe0w8xoMnLDNDcIxd+6jnGO0FUrild5C/kh6kNSBDVYZiv9+qwsD1g68fN3bMcE40QFULuvuLD1Dg+KbFzKO9hiDCCTLQQiXA8bcr0+VbAhwnI= X-OriginatorOrg: os.amperecomputing.com X-MS-Exchange-CrossTenant-Network-Message-Id: 5aa7ff68-7d43-4994-aef4-08dd0df871d2 X-MS-Exchange-CrossTenant-AuthSource: PH0PR01MB7975.prod.exchangelabs.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 26 Nov 2024 08:58:07.3034 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 3bc2b170-fd94-476d-b0ce-4229bdc904a7 X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: 5hwbCM6zqsWfqAXWnAMWjLaolP1eKV2A4T3/7vnLnYF87TO1sZxK3BI00zkG1XEDGlS46TIg4ZltML2K6cNMLk5/p40djHXAxLrnrLIBJMQd+33RRTLjpdjSyiSdqgBE X-MS-Exchange-Transport-CrossTenantHeadersStamped: DS7PR01MB7688 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20241126_005812_778190_146DBBA0 X-CRM114-Status: GOOD ( 11.50 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org The rodata=noalias is the original rodata=on. The rodata=noalias can provide us more block mappings and contiguous hits to map the linear region which minimize the TLB footprint. And the linear aliases of pages belonging to read-only mappings in vmalloc region are also marked as read-only. Also update kernel-parameters.txt for it: change "full" to "noalias" Signed-off-by: Huang Shijie --- Documentation/admin-guide/kernel-parameters.txt | 2 +- arch/arm64/include/asm/setup.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Documentation/admin-guide/kernel-parameters.txt b/Documentation/admin-guide/kernel-parameters.txt index dc663c0ca670..54b4df42e631 100644 --- a/Documentation/admin-guide/kernel-parameters.txt +++ b/Documentation/admin-guide/kernel-parameters.txt @@ -5894,7 +5894,7 @@ rodata= [KNL,EARLY] on Mark read-only kernel memory as read-only (default). off Leave read-only kernel memory writable for debugging. - full Mark read-only kernel memory and aliases as read-only + noalias Use more block mappings,may have better performance. [arm64] rockchip.usb_uart diff --git a/arch/arm64/include/asm/setup.h b/arch/arm64/include/asm/setup.h index 5ded3bd11476..3d96dde4d214 100644 --- a/arch/arm64/include/asm/setup.h +++ b/arch/arm64/include/asm/setup.h @@ -31,7 +31,7 @@ static inline bool arch_parse_debug_rodata(char *arg) return true; } - if (!strcmp(arg, "full")) { + if (!strcmp(arg, "noalias")) { rodata_enabled = true; rodata_full = false; return true; From patchwork Tue Nov 26 08:56:47 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Huang Shijie X-Patchwork-Id: 13885589 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 87D77D3B7C1 for ; Tue, 26 Nov 2024 09:03:35 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:MIME-Version:Content-Type: Content-Transfer-Encoding:References:In-Reply-To:Message-Id:Date:Subject:Cc: To:From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=anvbA8pUE1p7xSgy/be9SEgroL0t9VAi66YsNkMnzvw=; b=tig0Dmr48HWFPJZGvOw/UmCoox V4JhBqSUmI0FUbl4LwxolFZBJwAE9ATw/Wiq9lbYF8BnjpKxjjcQ3zNrMIpnRfEvF3Ap3C3OZjukd 5k9vXJ+q+uPqeVJySiiwCfUomC81fc+SjY5f0Bmv7H/9Q6cS5vhdn/iqsreyuJXvO4/opkPhNXvoc Y5X38tRs3Pji+LmdpfrbcvFfYPmmepy7YDiItyBsP6t++apGYAz1vrL/hcrBpqW5GDspoDUCeE+ht Q7++UnBJnnXbUL8ME7cReul2sfX0V/nv3lnZZ4ZceYK5y4C15JHUzfJvSEQbufhOz5Nj1R4thnijI g2NZnhPQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.98 #2 (Red Hat Linux)) id 1tFrTf-0000000A2E4-3tH1; Tue, 26 Nov 2024 09:03:23 +0000 Received: from mail-westcentralusazlp170130007.outbound.protection.outlook.com ([2a01:111:f403:c112::7] helo=CY3PR05CU001.outbound.protection.outlook.com) by bombadil.infradead.org with esmtps (Exim 4.98 #2 (Red Hat Linux)) id 1tFrOj-0000000A1JM-0UdG for linux-arm-kernel@lists.infradead.org; Tue, 26 Nov 2024 08:58:18 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=ZgaQEJ9GjcJYSizu07vk36aWXIpEdSaQyFBpxx4X/T8xwoUI41jzBLyWVd9UZvItyfr+8BOIgInhG9RXTpvh/c0oatLC67xSmUIeY2lolgsC/BVhWR6tkL0xN1s2Hl08Dc57t9wYRcUeAnaXOMmHHYj+XQy3Q9lrzo9f4zwUeqS9Y8J/tL5s6nEQw1ix5KjlwxIf2iG89Ix+xicgp9NXpXnUEcEIrIAYwVRlifrctiL6rUh0LE7JdgtIC7V5wgThNn1wxMwxKtNdbFek2WcyCbJFCzzpmKA91FHzvRQ/3Fd/Vt60x1uYlyzzCzXCr5TEVzAhEKL8xpV897mq4m3u0g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; 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=anvbA8pUE1p7xSgy/be9SEgroL0t9VAi66YsNkMnzvw=; b=RGJoaBl1eZNUMePPcne8u00bF/kgyJPSU2WzMOZqKaXqWCcrvUHSrWRs7qloCjDJ/btg2wM9pb/w+KKBfH7VsbuyFmsQWe7ZLLS5W01KpAAhYpHLmSiHFkfeknOgCIHPF795yby9moDmw3LJWTwT/EldXU32U25jlV5ybpkmrsG1RW6XMHvlVT9JRhxohuybTaRrv7tFDUaj0Sl8SQ+BHHSMDH11MSK1jUHrDuMV1DvPmPq63sQWNb8kGpe1fdSakTAF8yos/ha3UzMnCW6t2EbGa5jIgZayOIJGk3KFwgILJlBQWWTNSKu+rY/uqAajCg149ZZZ3tIoISJA/sibSg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=os.amperecomputing.com; dmarc=pass action=none header.from=os.amperecomputing.com; dkim=pass header.d=os.amperecomputing.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=os.amperecomputing.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=anvbA8pUE1p7xSgy/be9SEgroL0t9VAi66YsNkMnzvw=; b=UkVKl0cHGUk8bT93UWHpTFse8cw86tf1Mwy60JipR0yGag1Ujm4N+ZogZMyRCYHz63PC9hNIKly30k8sU0hoUTKnhZq4DSDlu+7HmMxRLgHHUqraSpfyi/KpzZCjNEJVtgBkYnkHbj8xAHsbSYhaNhKRqMBJVR7RmH6WqEjQc0w= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=os.amperecomputing.com; Received: from PH0PR01MB7975.prod.exchangelabs.com (2603:10b6:510:26d::15) by DS7PR01MB7688.prod.exchangelabs.com (2603:10b6:8:7b::15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8207.11; Tue, 26 Nov 2024 08:58:12 +0000 Received: from PH0PR01MB7975.prod.exchangelabs.com ([fe80::6926:a627:118e:8050]) by PH0PR01MB7975.prod.exchangelabs.com ([fe80::6926:a627:118e:8050%4]) with mapi id 15.20.8207.010; Tue, 26 Nov 2024 08:58:12 +0000 From: Huang Shijie To: catalin.marinas@arm.com, will@kernel.org Cc: patches@amperecomputing.com, paulmck@kernel.org, akpm@linux-foundation.org, thuth@redhat.com, rostedt@goodmis.org, xiongwei.song@windriver.com, ardb@kernel.org, steven.price@arm.com, suzuki.poulose@arm.com, mark.rutland@arm.com, linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, cl@os.amperecomputing.com, Huang Shijie Subject: [PATCH v2 4/4] arm64: add a new document for the fine-tuning tips Date: Tue, 26 Nov 2024 16:56:47 +0800 Message-Id: <20241126085647.4993-5-shijie@os.amperecomputing.com> X-Mailer: git-send-email 2.40.1 In-Reply-To: <20241126085647.4993-1-shijie@os.amperecomputing.com> References: <20241126085647.4993-1-shijie@os.amperecomputing.com> X-ClientProxiedBy: SI2PR01CA0004.apcprd01.prod.exchangelabs.com (2603:1096:4:191::22) To PH0PR01MB7975.prod.exchangelabs.com (2603:10b6:510:26d::15) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: PH0PR01MB7975:EE_|DS7PR01MB7688:EE_ X-MS-Office365-Filtering-Correlation-Id: 13f164e3-dd5e-4a3c-16e5-08dd0df87511 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|52116014|7416014|376014|1800799024|366016|38350700014; X-Microsoft-Antispam-Message-Info: 0oMZmdlx9rI/20PHrsGoZoTWMdolMCREMBVBohRr2iTmr6wcry3fPsWa+50WqdqwiG8QaL0dAUCxHb9mWqdQJ1WxUd9kylJVubXNA7lqyenUwqtQ2sNVoc4pYOCrKBAWZbZlPQ64KBJxngzBK3wKEVZK6pum/4L5AIig75eI6uKTJPuDaUGUn6ZHxLjapb1svKfxmdroro2BpuQ1u434Z6Be+ZCn472ecNoZU//rjEFOCHjp9G4X3tt59guVX8P+ZybuNpf2ImEIwT0eHnbqz/SdjSt/MfzBg2pwuyrNpyR+mHjnumFCMZB/cS35qfaqutznHmLP0s8BalaxvlHJt90MvMFy6kL1W8QJysU4gMvjaXNmiqTXgn3MPcXRml1zt1wdMaWNuMK6OoODsHYkPAAya7OyrlUR7zWx2R+c/J8VU3MuR/JfVCiN/7Lm61Ri2jcJc+kaU37mMi0NX0fsnokDxmBZf4n13oCAi3pX17xpJYFzqKTSM6A0EacrKTv5QgWaNJqQchHluGRGncInMktP7lQVMpbhh0hcn5kWN+KVCib51VgU1yjOkc2uGRECtQG1z8z9k/AXOFsbeNkrZwTI0/OZAvilOnuSwdWOtuA015xG5oTBh+34x+NxT0q4IcBBfKEgD0+9S22Xj2jDkEYBeOUKheSH7zoEvsUJFxYvs3+cS+w6+/XREa8oxl5jyfrPoBPxArQxlv56CvNr1z974zw2UwyOFu5aBK59KL4fHU2wX2+Jj6iHqK3p/WY3hwgjCQE2y79oTwnJgt3Aw3bxUyvIIaB9MjLS9peMlt6iqDD42pUtkpdaHx/D/OzBSba76rW7Irp4ysMCUkzDbl3b+qaEzLTTrQsWk0LNmnLB3vBrlTs/D+8CQhI4i0gmh+9OY7P2fVAhSVgxvDvz61hJai2syedH3VUJ23ST0+YTMDcHrYQEUVQsR5rMhIw+6ec9+Tn8KEkavHdabWbFX45KDKXg7Ki7xcwTAfhApbHFXd/o3kSaKowXoOA3t2aZAx9fqUCKnjIRDId+kl0Wdxy4H5otZAG4cFo8QG9tTF76361WnfCT+wzuf7P/z4z1MHT2kVdjRt+nKhzL2oSORsgMosnGgd9aScyX1Vz3puYmreEftq3QWUYRU3hFHyCiZCiNUaYWTMeryvOKtUYYZDbSZXVtvwdUlI6ifPxPnWnGLiiIxZ+bMTbSVGLlxTOb7sjk7X92Ax/luDXlE73dDSskJnlNMj9FVhuZqgBZD7doiEtuMjo7q1PR2Y0hc4TZbHOPYMHCOxq3Ug/OG9YVtEaDchYY0fyi+BwhkgSLp+WfH+CWCjwRUrLu+G6o+fdckLfWtCDI2v9MFJt4BFCdmtC1IuetvgfpSA9D8VGJlvpxpzfleP1KSqjMsitX9dgcDN0Up28PUT4XFHoBg9KrJg== X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:PH0PR01MB7975.prod.exchangelabs.com;PTR:;CAT:NONE;SFS:(13230040)(52116014)(7416014)(376014)(1800799024)(366016)(38350700014);DIR:OUT;SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-M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QYY8IMtfQadrG5MI+Phj4INPUYtN8qIDX2+hFXTpS/D4XFrPaQKwljq7JM1DFivH8GFCMF3H0pUntIbo7OuRbUl76lTsNfaBZrdt4GJSRdVAfLMZUj+gOr28hwvGvFpu3XBmhJlVNHaRm8tu7vNbMAm6sO+xofuGUceCf7hNmTUKbgq2JkPd5TwGAFH751kGeGmHim2PTQiOzyq9Y1JDs4cxXxo0r+gcJtvWKrKP830cGJPIv7LHMu0J4tCYMzsqk46Ejw9y6vvIvS9qJTviepAEpKTSF2S+FSwwwkq+oPFMWp11shOqgBaa1G+urm8ayek8zc62F9dqduhxD0NufmhFHkI+RsoiiZED3YnFg8PCIcmyrmi6RK9DLLRaNoQXvz8a0Mm0zdFeTgdFVpaQ0WUZKdl0IbYNJ1rX3CQB92dr2UMhVOekJtnsGJ5IJ4WtQ9WEyGqDHHPjMaZuNJgKw85l1vcrJddM7EvgI2TzUMsdDHpU4l99/DkDVr8vwNK+UAllx4tTAaikRrv2bKdel9yHaRd/OSd72Johg7/WePzX+ecY55IejWduqNL04fzhwfqKMROlo3gWxR6CNHc= X-OriginatorOrg: os.amperecomputing.com X-MS-Exchange-CrossTenant-Network-Message-Id: 13f164e3-dd5e-4a3c-16e5-08dd0df87511 X-MS-Exchange-CrossTenant-AuthSource: PH0PR01MB7975.prod.exchangelabs.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 26 Nov 2024 08:58:12.7303 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 3bc2b170-fd94-476d-b0ce-4229bdc904a7 X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: 9kAVMsKC6i0eJAL5OSqdGegzAYtmOk5SWofRz8N5h8Cv5EHSSaRfowshiTIf6EuYQ1uAKImv/EW9MPSTYrtOE23pmz0S2sjiG97VKGshxdbTKpNp9N/uKIcjGF389aNY X-MS-Exchange-Transport-CrossTenantHeadersStamped: DS7PR01MB7688 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20241126_005817_152953_2100A2F6 X-CRM114-Status: GOOD ( 12.95 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Put some fine-tuning tips in this file: 1.) rodata=noalias 2.) slab_strict_numa 3.) CONFIG_SCHED_CLUSTER We can add more tips in future. Signed-off-by: Huang Shijie --- Documentation/arch/arm64/fine-tuning-tips.rst | 23 +++++++++++++++++++ Documentation/arch/arm64/index.rst | 1 + 2 files changed, 24 insertions(+) create mode 100644 Documentation/arch/arm64/fine-tuning-tips.rst diff --git a/Documentation/arch/arm64/fine-tuning-tips.rst b/Documentation/arch/arm64/fine-tuning-tips.rst new file mode 100644 index 000000000000..70ef1cef92fb --- /dev/null +++ b/Documentation/arch/arm64/fine-tuning-tips.rst @@ -0,0 +1,23 @@ +.. SPDX-License-Identifier: GPL-2.0 + +================ +fine-tuning tips +================ + +This file contains some fine-tuning tips for arm64 machines. +These tips do not gurantee that you can get better performance, +but you can try them with your workload. + +rodata=noalias +---------------- +It can provide us more block mappings and contiguous hits +to map the linear region which minimizes the TLB footprint. + +slab_strict_numa +---------------- +In NUMA, it will provide the local memory allocation by SLUB. + +CONFIG_SCHED_CLUSTER +---------------- +Some arm64 machines have cpu core cluster, enable it may +helps you get better performance. diff --git a/Documentation/arch/arm64/index.rst b/Documentation/arch/arm64/index.rst index 6a012c98bdcd..36d1ef09bd71 100644 --- a/Documentation/arch/arm64/index.rst +++ b/Documentation/arch/arm64/index.rst @@ -16,6 +16,7 @@ ARM64 Architecture cpu-feature-registers cpu-hotplug elf_hwcaps + fine-tuning-tips gcs hugetlbpage kdump