From patchwork Fri Sep 2 00:15:49 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: D Scott Phillips X-Patchwork-Id: 12963445 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 A98A0ECAAD2 for ; Fri, 2 Sep 2022 00:17:13 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version: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:In-Reply-To:References: List-Owner; bh=BvyeKUnIEci2oeYEcpvtm80/Q4w8svJiPxpmpXpHJv8=; b=N3lzXZYvEdfrnJ mZq1Tz2grpzX+XZgE0VowDUomuT4Fge7AHG8aDQmK4xGf2XwMD+BeXaoR9MxJDyhmRgJEo6JFqPRq 2e3Hhop/YReyKVeZ8g+exU1BnATS2wqDZ7kMkuTBNblfY6QthYD5H8+6HGNKGtF7HIZvLJ38nBA6f 7IqC4guRsvMdPNRbLqvuMhl4KY4VbehuvHX3eSR5S+uMtxCwRVZq6UYPyOFjj2SQnauKQJEphsz2k QHiaCVTDv6OJBFTuKdKAgviSo0if2mDHxvzsucVpveR+Whkn54puqmaWW0HWTo+5ZMVYIZIvBTz0e VSSYU4bj7AtQhBVXh4tg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1oTuLr-00G5Kx-JX; Fri, 02 Sep 2022 00:16:03 +0000 Received: from mail-dm3nam02on2094.outbound.protection.outlook.com ([40.107.95.94] helo=NAM02-DM3-obe.outbound.protection.outlook.com) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1oTuLo-00G5Jk-CI for linux-arm-kernel@lists.infradead.org; Fri, 02 Sep 2022 00:16:01 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=m/K/lC3Ca2c1WkhvScBW48gBbH11o+25eQxZQrqtiTlUAhOIx3MLQNBCo6YvDUd4iNBYA/WnCKtiey+3pjYPcWH/riV7o6IoopNru+8iKzzjiKDN48Ne6H2GeWUof6jTDFSv+xlWbpwpiH9Uh4r7X+8Fpy96BRBxEeYCyhtCATR7CRQ+qlk9BUYbjkbRuf4IduMNhOaR0OyfS5oTnwjPKhEDPFNP+8MRt5FkLZPY669AqXt8SmVYq04FIwOj/uGUyHbEZWTZ5edT7zTvqXXsZid6r2xPZsW8a2zZ/qNWMFlwttkTFpjENqh3AjGOmCueCu+HSRdZFrJDq1mB9EYpMA== 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=UyW57Jp+zZ/E6T6Hb6z0C+vaBR5lm4kr/qN7cq6Ge1o=; b=KoSnMnEnHYz6yve4+JgkwCyb1ZQ8ggwH1SxK7VAJ4fBdivNL/g7yVEapxgSosVbLRwjZkdjilAF9r2+50FcHN0HrNLmZmul6pNttrnPRCtrjxeeWH+/SBpy6DXX1NEtmbVG6dVO57cJwVlrCVlq64FzlhmoTDzs4Yy8KdRP9uidw0ALsWKpI6AtcNfZlh8B3MCWYv5VxH+8V7GleBwlibWq6RU/hM8/fItwORN0UxFtXOOwpLbsxInSod8cvyPI8NcqoWSti+XQT5zzDNFsEqpJsQQWXx+PxmX6osrBLpTgc9vQKlEGAxf+daljKiOSOQhNsFT32fp858+5gIn13sQ== 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=UyW57Jp+zZ/E6T6Hb6z0C+vaBR5lm4kr/qN7cq6Ge1o=; b=q+AVavn9RodceMTYgSQMZwZzArwBxcX+7xEE2PEtaHHIyzoahvQJwJXQneEYvRdUaoC7sfdtPHtgef46E+YRJRgf4B0Y+3DpYr5dTZ/flmcRbljreEn6sKrrDMuB2jJhY9gYxot3VoOHcYksuccaiYKvitI/zkrTCUPxUONo8dk= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=os.amperecomputing.com; Received: from MWHPR0101MB2893.prod.exchangelabs.com (2603:10b6:301:33::25) by DS7PR01MB7830.prod.exchangelabs.com (2603:10b6:8:7d::13) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5566.21; Fri, 2 Sep 2022 00:15:54 +0000 Received: from MWHPR0101MB2893.prod.exchangelabs.com ([fe80::a82f:4278:a97f:2c29]) by MWHPR0101MB2893.prod.exchangelabs.com ([fe80::a82f:4278:a97f:2c29%4]) with mapi id 15.20.5566.016; Fri, 2 Sep 2022 00:15:54 +0000 From: D Scott Phillips To: Mark Brown , linux-arm-kernel@lists.infradead.org Cc: Catalin Marinas , Will Deacon , patches@amperecomputing.com Subject: [PATCH v3 0/2] Work around missing `bti c` in modules Date: Thu, 1 Sep 2022 17:15:49 -0700 Message-Id: <20220902001551.2349544-1-scott@os.amperecomputing.com> X-Mailer: git-send-email 2.37.2 X-ClientProxiedBy: CH2PR14CA0058.namprd14.prod.outlook.com (2603:10b6:610:56::38) To MWHPR0101MB2893.prod.exchangelabs.com (2603:10b6:301:33::25) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 6a61bafb-9842-4293-6a03-08da8c784cee X-MS-TrafficTypeDiagnostic: DS7PR01MB7830:EE_ X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: eKQLfA4pFAFa45SxFZUaNuvxO1gJjeKIXJHU+vyfuTrGT02CIhPQK2M+/53IBlcCqs3dgvC2jI7WPV6wrqFyn5nZ3kswYcIWcsrDwibxMKZlgm0fc6hiUVZdRfjxTnKnSA0RbH6rFj4Ut4F5raBCkSdl83cuzpo0l3vpEx6Y2TI6WPCJWNLLg3BAe/U3jsqMt97IFx3rZXqdUhTE5LvyC7W9WmB1XmcLhyWjCodqWeGYoB0MuyqaJKjUKZiyXvfPUUNcgyQOABE6dCvpxmM5QERAtaIkkEq4AfzUKqA6cgwhQ4jgKx8EqKCIOKeLnIFjFVNNnhHGhD5wbB/zVKzYs9KCqrCXw9H9v3puqV7XjGt7frpD6iQ9mabC28Y6pIQxcC71YZez0H1V+qvuCEFXqDr2KLgVcLQqXgC/DzbZ+tZcrbVg49AH9x4sq1ytJQrqziHcArS8HCRX4Y/XsA4Ju0Jc3FueFVDsuHtrHhEYopLV9ddn5RKy0GoaGKA1H2O6DvXTLKSmS4mpwMNxJixh9vcoXaR3pheQMGrZIzb+MXdbUIE1h0Ru8M4CQTHFNSwf/Vh+Vh96cxz41OLaAlIK9HHgz0snFFEN7QN7j43rcfbvTg9OulKq2AmJsFjFAQzd1ICm6b3ZzhI+VHiMvUfnUe1k6a8n4yQPKRfBdvCEVK2dmmUZ3CVvmYeXK3M0IdBtPbg/QqbRWi7GoyfcZJpf0mlxe55ST9/WdXZqQf+y4F/bYl6MT5KG0VMjyA93/SgMECb/smtOxf84fQDjs7RGCA== X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:MWHPR0101MB2893.prod.exchangelabs.com;PTR:;CAT:NONE;SFS:(13230016)(4636009)(39850400004)(346002)(136003)(366004)(376002)(396003)(8936002)(66556008)(66476007)(8676002)(5660300002)(2906002)(4326008)(4744005)(66946007)(316002)(54906003)(2616005)(52116002)(478600001)(6512007)(6506007)(41300700001)(107886003)(6666004)(26005)(38350700002)(186003)(6486002)(1076003)(86362001)(83380400001)(38100700002)(81973001);DIR:OUT;SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: wlrnHTUn0KUtk5oUHf5SlTywKncORjbdkdtTgd97bubwMRClRWOIVDUrgru9Elz7ANYFHUT7yFuxkpz3RvruHgOSUEizlysQM5HF9+rwD//f2UCzB91skCzQKBx3wQCZlsaYnJIzwWI6EtVg4+cHNJUnLoWvi+0cH23DM7HqvWIx1Mi+0war6ynBjGxNqAQozzh1WR1eBtydbnvaOUPhuyEOjbSDEh5YAimcWB0P12UqLVec950lqcKXt8nPhAXtf0C8Ta8tD/jJ761/Q3mZd4MeLWZQ7wGTM4lxIjxJO7V2KkzxZWb//WX0yyfWaEvNNHl6UGAxJ6yAraEBv4vw4XK/urdGR6KV/aG5Or9OExMhD0m6WOhmSYHiGgk2E3BQsE0ReErZI0KGx8dpFmAhc4X5H/bu+JRfhaYOdUOrtKNMX/IbefjnhsONcUo6HiowxtGi48fBYFCBZL9R185fP64XrpdMu4USdkAUZMHlteUrmwJxQeOsfM0T74iydjF/z5G8eigCixfdeGBdVuyrM9QkC3YZVMnxBTYDseJS59XiZP6jvCJKngFlRogU+ou1xeAmxDdnvqhbmFvOP4scdN1jTZvUHTYLSjgdZ7U9ln+wNhzVvt+re8xoYLu1UpYGUJIyqZHWuj2jTSH/83pemC5KlinYYML6M0Ev7a6UefOZQ/R7mQd/jDSl17TbPbQ1JF02r8VRGp4ItHko/WXTajaJjiEiMlrJYsSRUyW7nKQtnA+rNbuNlSD0AxqnlntZSj4fYY+6j/ZpUK7pPHkBBKySCrxCCqUH1NMir3ShzpLfr3TP2HCNeLQCdgHfD+KXwo6rOfdOPM3VJhV13++9OiH68oyAyVH2zVBC+7JcuL89+9uG/WCLkbQ2iwPRI//2IoPYvSFigfep0m21mSQGMjqUohN4tAfY5XVMMBwMaDmp+7mD7oXB+Jnl62pjPuhhv+G67S18BFsktO6d6SvukS2z0oo+rvYCVm4f3jptMObBYvb0bnbSIYA1/ouWyW3hnwJo62PYWRJ66i6U79c78IjVVB3CguB9weo6T6UL+t/TDyZkCH6OEH0puOH1bz+EFKGgXawiEFv7fOL/XxibMonFdPiRgnYd9RO8neWbq+lnbAIo5NnavItlpKkHPSxt30ngYTVSRDdraWMtXGxnygoKXatHvgSFpxzkS9No9+BgC4w+vq414JggCd2Jishp9486LkzA/FsAySPY55gz21vTza8oeOkpwgkb0px0WD4qTaC0LArKrR3+h4eeH6IVoz9TYpzHLFpECHvUiUrW0eRBb+5QEpUCwV7kR3SrhYPF2kPOUul+VWyNTYWGE8KvtV5i8KGFWfW4ju8hUUfVGn6D4ouggZ9DH5uc0D0qL+X3W19gARPDByHRgxLzAWmjs/qkdSAlT/k8LRtL99IjlpZNzuAep/udxiW/Jw+itRzKuogANbMHYUfLV+EcE3+Nxctf+0vWlPU7hVYREN812i7jHl4Scz6SKFpchMaSME5kvBmCk5V/STASwPLeLvURD9s2VYE9FFUWzm6Dbg3yK0xEsHaXsQU6DiOiDnJbbFvXkfomlgNFo11EhdUSitTJym9pV+3rFssFQNGoefUWtA== X-OriginatorOrg: os.amperecomputing.com X-MS-Exchange-CrossTenant-Network-Message-Id: 6a61bafb-9842-4293-6a03-08da8c784cee X-MS-Exchange-CrossTenant-AuthSource: MWHPR0101MB2893.prod.exchangelabs.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 02 Sep 2022 00:15:54.4753 (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: yAMIvPlhpsPAlUt5Znqbl4WtuIfn1VMc6qzTYrE6D6gMjFNZ+UYOZrh0Ei8KVPIxtfTOYiSKSctD9Atfw37m3rXrJh2ME/vWZgIo3DyxNDvh0FLLr0vetnyyQuiS6esy X-MS-Exchange-Transport-CrossTenantHeadersStamped: DS7PR01MB7830 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220901_171600_666145_949714D1 X-CRM114-Status: UNSURE ( 9.37 ) X-CRM114-Notice: Please train this message. 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 Changes since v2: - Split the kernel BTI exception behavior change into a separate patch Changes since v1: - Add the gcc bug id into the traps.c comment - Cover the try_module_get with the preempt_disable - Add a CC_HAS_ config for the compiler bug that we'll eventually refine D Scott Phillips (2): arm64: Handle kernel BTI exceptions arm64: Work around missing `bti c` in modules arch/arm64/Kconfig | 3 +++ arch/arm64/kernel/entry-common.c | 12 +++++++++ arch/arm64/kernel/traps.c | 43 ++++++++++++++++++++++++++++++-- 3 files changed, 56 insertions(+), 2 deletions(-)