Received: by 2002:a05:6358:9144:b0:117:f937:c515 with SMTP id r4csp2543508rwr; Fri, 28 Apr 2023 11:53:01 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ5ccNqj//h10oW36nRoAeu9ZUt6Yl7Iu2YIU4G+c8ZwbHbiVMMX9hQxsCF6ATCAQUuQAvyb X-Received: by 2002:a17:902:d2d1:b0:1a6:d9a6:a9b4 with SMTP id n17-20020a170902d2d100b001a6d9a6a9b4mr8162034plc.3.1682707980660; Fri, 28 Apr 2023 11:53:00 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1682707980; cv=none; d=google.com; s=arc-20160816; b=YB1DcLRWMp9d0xjOJsSfPdUKS/J2fl6qWf9gfEUEbIbrBNPeLfTTfFjwsgd0oSsPKO G/NqoWQsklsWxZEYRRHza7RL7W3QI/3StbBFreb5r4E91qIXVBjDQUPScOU4Bx5231c1 tbqjgDI8RYvJ55l9XMF0kfOdwdhZNHHgrTpzsoNCoddmZV9asq5V20wl86niElo8bxKW mBNHXQHXbRnOov6g8vsJA/Onntw1te8lXUb4vYBX2Wk0cge621/8tb2AbNhldVIYEMU/ BvuzzradwYw0nACwM7POhtuAIVYeNEIh17+mqDzpXZqt1ZGVM6JmWXSE+XSsFCe+T1Mw 7dew== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:from:subject:message-id:mime-version:date :dkim-signature; bh=6QMZhDexxfLA2RQm0j2+ddKdXUKAWu/zoiDOxn4nNp0=; b=bE9B0x3ttrtMoxvVTfAYa9mKj1KvMwNxdhtuWsuVsM5/pMJFy4bTkZNkNaeTnBF2XR Vb2/riTaNovGgUrPHnHlzghuXZ4HOYdmPlCMGPTYccM3MqTOC1MXeSlpETsUFHi2yNI6 py/hA5xuPGbDivEKLrOLXiq0KxxKmje6856lDFHtioBySa8HI7lFqzWI4BYTn7mtWN52 soDOfzpgq3/k4VOWuk8WpiAFHxD7X3s+XAiyLXDJk2AsQuppOgP54s1xTFRDN0hl+2JI mSkdBGe0f01VVkRvPNzqL2/IYza5FmKS55RbAq17V8xhJ1j5U5QCDg5+qImi13tfTePL 0I+g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20221208 header.b=eGuGclpc; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id l12-20020a170903120c00b0019ca1961bc1si23345424plh.108.2023.04.28.11.52.45; Fri, 28 Apr 2023 11:53:00 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@google.com header.s=20221208 header.b=eGuGclpc; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1346436AbjD1S2q (ORCPT + 99 others); Fri, 28 Apr 2023 14:28:46 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54158 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229780AbjD1S2o (ORCPT ); Fri, 28 Apr 2023 14:28:44 -0400 Received: from mail-yb1-xb49.google.com (mail-yb1-xb49.google.com [IPv6:2607:f8b0:4864:20::b49]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 6B782E5 for ; Fri, 28 Apr 2023 11:28:43 -0700 (PDT) Received: by mail-yb1-xb49.google.com with SMTP id 3f1490d57ef6-b96ee51ee20so14438276.3 for ; Fri, 28 Apr 2023 11:28:43 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20221208; t=1682706522; x=1685298522; h=cc:to:from:subject:message-id:mime-version:date:from:to:cc:subject :date:message-id:reply-to; bh=6QMZhDexxfLA2RQm0j2+ddKdXUKAWu/zoiDOxn4nNp0=; b=eGuGclpc9YdkQ55iylhcpFpKDIDB1qtK+qNyaGX+Zrug29FfoCVq1V4jOJjTnEFQvC YYmyGGwqYf/O/NMyOjjDNnMSa32sEzYlpgPM16T9wInkHaSj42BRPPDeaUXuYkRyLT5f rFGnGA77a2skM9iKQPI4F0+0ZVnGdY2/oJMD7HBscHhC/XzNOERZ9WIWIiuBlu7NNV3L i8KDtNOzE/V2ddHpOC5BSL4qvkxMDF+P/Oea+7d4d+iX9nLr8TsjMU08fTVRPaxnnHQg Hs4hEx4TVEnJmvPHVn7uSXXsScegWDkY7Gpx1iHfRKbDuKVOSMecmZTlJtUUHYGz1kAK e7aA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1682706522; x=1685298522; h=cc:to:from:subject:message-id:mime-version:date:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=6QMZhDexxfLA2RQm0j2+ddKdXUKAWu/zoiDOxn4nNp0=; b=cIbwcHp0DjDm6wGbuMOTOUOHA3M4/EkdEMLmHF+wVv5s2OLPHbepVVfFa3mDZRQs9e pKnrK+U9pytpGTbcti8r0hPVZ8TawxYdhTvHyuHQsZDTQGJntW/iPlbhZb+99hcAJxQS FaG4APM/8xNYH4g5BZ2OWpwrPCu852KDM85Jxm2luCp14Y0S/brkIJnSdcwbGJJyBqjh FhY3KCelN0HfN+6vRtIaKWeTW2ASOpHUIE5W3Hu886O0/UfObm3pbIZTphwXFIHGREbo AicXIzD3sefYA2Asg+xb3hnLnhZpysCJZY0V7LBiUfOnqfZoStK1kgJ/YFCFiHF+fb8K 3vXg== X-Gm-Message-State: AC+VfDyHWAqBj8bDlLpf7Te1RjnlYWr6A3P3YgqZpFEjblWH+Bnt43Hf eVvcfJGQ0Wemr95OivECQAymbJUQ25cIMbSTWHk= X-Received: from ndesaulniers-desktop.svl.corp.google.com ([2620:15c:2d1:203:7fbc:5712:e6b1:f733]) (user=ndesaulniers job=sendgmr) by 2002:a25:c04b:0:b0:b8f:4696:8fa1 with SMTP id c72-20020a25c04b000000b00b8f46968fa1mr3494622ybf.10.1682706522647; Fri, 28 Apr 2023 11:28:42 -0700 (PDT) Date: Fri, 28 Apr 2023 11:28:17 -0700 Mime-Version: 1.0 X-B4-Tracking: v=1; b=H4sIAEAQTGQC/1WNzQ6DIBCEX8XsuTSKxJ+e+h6NB8BVSSqYxVAbw 7sXvDVz+mYmMyd4JIMeHsUJhMF442wCfitAL9LOyMyYGHjJ61LwjsnPwXRbT0KN2PZaQGoq6ZE pklYvubtKvyPlYCOczHHNv4bEi/G7o+/1Fqrs/g+HiiVNoi951yjZ8Ofs3PzGu3YrDDHGH5o7+ 2OwAAAA X-Developer-Key: i=ndesaulniers@google.com; a=ed25519; pk=UIrHvErwpgNbhCkRZAYSX0CFd/XFEwqX3D0xqtqjNug= X-Developer-Signature: v=1; a=ed25519-sha256; t=1682706521; l=2902; i=ndesaulniers@google.com; s=20220923; h=from:subject:message-id; bh=dTA9ynq73YQ/e9h+i1pEgv2IYWGxww8jCupOBbep0Wk=; b=5emz5BsCicOnQUdl7fVcK6+ZNZyTu3YFpE7YTmPGddTU7ZbUO8M6Hke1drny3VKssnBapXLq7qqK bSVTFj/TAKr79xqt9rrUkE94aToiU0IpJJor4JUFOMxTLyp7YaGL X-Mailer: b4 0.12.2 Message-ID: <20230428-awx-v2-1-b197ffa16edc@google.com> Subject: [PATCH v2] arm64: kernel: remove SHF_WRITE|SHF_EXECINSTR from .idmap.text From: ndesaulniers@google.com To: Catalin Marinas , Will Deacon Cc: linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, Mark Rutland , Ard Biesheuvel , Fangrui Song , Greg Thelen , Nick Desaulniers Content-Type: text/plain; charset="utf-8" X-Spam-Status: No, score=-9.6 required=5.0 tests=BAYES_00,DKIMWL_WL_MED, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE,USER_IN_DEF_DKIM_WL autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org commit d54170812ef1 ("arm64: fix .idmap.text assertion for large kernels") modified some of the section assembler directives that declare .idmap.text to be SHF_ALLOC instead of SHF_ALLOC|SHF_WRITE|SHF_EXECINSTR. This patch fixes up the remaining stragglers that were left behind. Add Fixes tag so that this doesn't precede related change in stable. Fixes: d54170812ef1 ("arm64: fix .idmap.text assertion for large kernels") Reported-by: Greg Thelen Reviewed-by: Ard Biesheuvel Signed-off-by: Nick Desaulniers --- Changes in v2: - Drop irrelevant paragraph. - Pick up Ard's RB tag. - Link to v1: https://lore.kernel.org/r/20230428-awx-v1-1-1f490286ba62@google.com --- arch/arm64/kernel/cpu-reset.S | 2 +- arch/arm64/kernel/sleep.S | 2 +- arch/arm64/mm/proc.S | 6 +++--- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/arch/arm64/kernel/cpu-reset.S b/arch/arm64/kernel/cpu-reset.S index 6b752fe89745..c87445dde674 100644 --- a/arch/arm64/kernel/cpu-reset.S +++ b/arch/arm64/kernel/cpu-reset.S @@ -14,7 +14,7 @@ #include .text -.pushsection .idmap.text, "awx" +.pushsection .idmap.text, "a" /* * cpu_soft_restart(el2_switch, entry, arg0, arg1, arg2) diff --git a/arch/arm64/kernel/sleep.S b/arch/arm64/kernel/sleep.S index 2ae7cff1953a..2aa5129d8253 100644 --- a/arch/arm64/kernel/sleep.S +++ b/arch/arm64/kernel/sleep.S @@ -97,7 +97,7 @@ SYM_FUNC_START(__cpu_suspend_enter) ret SYM_FUNC_END(__cpu_suspend_enter) - .pushsection ".idmap.text", "awx" + .pushsection ".idmap.text", "a" SYM_CODE_START(cpu_resume) mov x0, xzr bl init_kernel_el diff --git a/arch/arm64/mm/proc.S b/arch/arm64/mm/proc.S index 91410f488090..c2cb437821ca 100644 --- a/arch/arm64/mm/proc.S +++ b/arch/arm64/mm/proc.S @@ -167,7 +167,7 @@ alternative_else_nop_endif SYM_FUNC_END(cpu_do_resume) #endif - .pushsection ".idmap.text", "awx" + .pushsection ".idmap.text", "a" .macro __idmap_cpu_set_reserved_ttbr1, tmp1, tmp2 adrp \tmp1, reserved_pg_dir @@ -201,7 +201,7 @@ SYM_FUNC_END(idmap_cpu_replace_ttbr1) #define KPTI_NG_PTE_FLAGS (PTE_ATTRINDX(MT_NORMAL) | SWAPPER_PTE_FLAGS) - .pushsection ".idmap.text", "awx" + .pushsection ".idmap.text", "a" .macro kpti_mk_tbl_ng, type, num_entries add end_\type\()p, cur_\type\()p, #\num_entries * 8 @@ -400,7 +400,7 @@ SYM_FUNC_END(idmap_kpti_install_ng_mappings) * Output: * Return in x0 the value of the SCTLR_EL1 register. */ - .pushsection ".idmap.text", "awx" + .pushsection ".idmap.text", "a" SYM_FUNC_START(__cpu_setup) tlbi vmalle1 // Invalidate local TLB dsb nsh --- base-commit: 22b8cc3e78f5448b4c5df00303817a9137cd663f change-id: 20230428-awx-c73f4bde79c4 Best regards, -- Nick Desaulniers