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 D026CC32772 for ; Thu, 18 Aug 2022 15:24:07 +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-Type: List-Subscribe:List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id: In-Reply-To:MIME-Version:References:Message-ID:Subject:Cc:To:From:Date: Reply-To:Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date :Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=RXHe0ysY74uwi54zxUzo5CMriEQ9SzLsHtRcalQsJFY=; b=FKfPUrBt/GE2qFCauFA2St/bwc cNd134T8lZ6crNR0gMZfnyjYoNg1z+hUXNLcnC4BqmbuBzUxHyXe7zV4BK/uGaCDU02KKk+k6beL2 BoaFU9b1m3f3JOEksdNfmpxtqbAVZWCRxL6hCTKVRxeufzFTw57uw7lxymGxNtmgQcKmK98ST0EM4 e8QlfW/WPGO9atQQr7Xc742/K+rW31rLb335Iu4Vy8uSt6LlUplWSimij1xfdgNznmrid9MporSMJ uA1thIzXCPhKU7kuqpC4gbItY1ROHT7qHid8AOD/fzZTck1a31Nt19vIaJp5aPoS91j4xIlanImy9 qJVQ3xfg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1oOhMG-006a02-3G; Thu, 18 Aug 2022 15:22:56 +0000 Received: from ams.source.kernel.org ([145.40.68.75]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1oOhLG-006ZII-5K for linux-arm-kernel@lists.infradead.org; Thu, 18 Aug 2022 15:21:55 +0000 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id 6886CB821E3; Thu, 18 Aug 2022 15:21:52 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id D187FC433C1; Thu, 18 Aug 2022 15:21:49 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1660836111; bh=RbfJ+mEdG4wzVwa8JQMUl8RdpgjZcQ64gsdJJzHF4FU=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=ckkcqZZE/vqdC2FW/pOHARowG6o/7TOW7yBWXvxz4kgJwsEtJE8XCbhZQvHkHJhfa zOtbPVhcElwJVaXUZ09fks3WexWDmLgXPQikhVOO+eYda/6Ss38i8WF3215nlzTSAn A3mUFu0ZPMTNEYuPKFevKYnD8OV4BLznuiAueYKcPXZpMlFMBOkML55GvoGfG+3L2z n6+RN0l8n3oDzuL0bNyGr5iLAMIY1cV5G6B4tIIFuOgtJcHZ1Zk0/yI+ji4BxIBm+2 dBdRnhHHNFsenB8EYbv80AR54fely1pttGDfMGb0lhqwoERbNCs0gl6OGSkjmB0OpW 6xfdL/5EC/8Og== Date: Thu, 18 Aug 2022 16:21:46 +0100 From: Mark Brown To: D Scott Phillips Cc: linux-arm-kernel@lists.infradead.org, Catalin Marinas , Will Deacon , Darren Hart Subject: Re: Panic when loading modules with CONFIG_ARM64_BTI_KERNEL Message-ID: References: <864jya4eto.fsf@scott-ph-mail.amperecomputing.com> MIME-Version: 1.0 In-Reply-To: <864jya4eto.fsf@scott-ph-mail.amperecomputing.com> X-Cookie: Logic is the chastity belt of the mind! X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220818_082154_393966_688D463A X-CRM114-Status: GOOD ( 17.76 ) 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: , Content-Type: multipart/mixed; boundary="===============5491064761654644204==" Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org --===============5491064761654644204== Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="LzEYJET1m2GaBe+I" Content-Disposition: inline --LzEYJET1m2GaBe+I Content-Type: text/plain; charset=us-ascii Content-Disposition: inline On Wed, Aug 17, 2022 at 04:42:43PM -0700, D Scott Phillips wrote: > In the meantime, should we mark BTI_KERNEL as broken? or any other ideas The clang versions I have to hand appear fine with your userspace test program, it emits a BTI C at the start of func with -O1 so I guess that'd only be for GCC. Ideally we'd be able to detect particular configurations that would trigger this but I don't think we can. > on how to work around code generated without bti instructions like this? > Enable the guard page attribute later? or try to keep init and non-init > allocations close together? Keeping the allocations closer so we don't need veneers would mitigate the issue, though that's not going to be something that we can rely on so it's awkward - we can *try* to keep them closer together but I'm sure someone will always be able to craft a case where we get pushed to using a veneer again. Not enabling BTI for the module until after init has run would mean that we'd have to remap the code while things like interrupt handlers might be running which smells like there'd be problems but I'd need to go and refresh my memory as to what the actual issues are. --LzEYJET1m2GaBe+I Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQEzBAABCgAdFiEEreZoqmdXGLWf4p/qJNaLcl1Uh9AFAmL+WQkACgkQJNaLcl1U h9AlLAf/Rcl8F2eULdikInSp2x87e/BEZFYoI2B83U8spDq7Xhi1eYtCkfula++Z MJYH/cXl2hGMcCrpYtCZBijvRIPQ8V0LMZKgyIVIa3kaP1ZOcyhzv1KvkuAZwDY4 nxRuI61jeEJJ4+htknpphsueO/P6iCLyxuCiMwVAAKJOmNVjF+1QlNVTPsGOCX3v P0cGROpTYw0xtJjhsCGjI+BXWRk0WsIvWmU51loYrwhdnK6RhbekyYB6UJioO4E1 SKbioKRnPyHtcI5yOn1JkH9MYkO+cAy7PXnGVdXOvLh2eqlo9PpfBrau7fCN1khP 8eYuKLunO1Ga9Yo+g4uhuTLULZ4cCg== =xWKG -----END PGP SIGNATURE----- --LzEYJET1m2GaBe+I-- --===============5491064761654644204== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel --===============5491064761654644204==--