From mboxrd@z Thu Jan 1 00:00:00 1970 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 EA59DC25B79 for ; Thu, 16 May 2024 09:27:02 +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:In-Reply-To:MIME-Version:References: Message-ID:Subject:Cc:To:From:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=KJV1tnGDULSQ7o2sojHJ1HrDhE3cm5+yNbb0uAdWDQI=; b=SkvfHMK4T7JAa+ wD1vC+JKFitA/YhUquASjA7hXKYhx4xrlwQl5WG1UlTqLVBQOp5RReK7l6x9gph8bnrLTaIrHJdA4 gVbDhdYM7tXizth3H+S0OpNsv8P8NNKchk43fG4ZeCZS6PrvrPPfhnmirQdP7VycHltqw/IVgdvzU 0LKFJm0EEf3BkrNVsKnaXwmtR6UHue3QsplLELs7RcWdbR8aAfQCLBz5WPI32ZbuSEQ5d7UxOPXhh QUhgI+mKXTVDDKf/U+VYNMFdpmOZZylFXEgGfwJP8cNhblepMgW66mcNm3HpTZmIDyWVwRO5P4D47 FPcu/ScGyKrt7/onfIVA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1s7XNu-00000004JTR-0rwe; Thu, 16 May 2024 09:26:46 +0000 Received: from pandora.armlinux.org.uk ([2001:4d48:ad52:32c8:5054:ff:fe00:142]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1s7XNr-00000004JSk-1nVp for linux-arm-kernel@lists.infradead.org; Thu, 16 May 2024 09:26:45 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=armlinux.org.uk; s=pandora-2019; h=Sender:In-Reply-To:Content-Type: 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-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=iwpgZMChDlDGQdY1FB4R79GudyxC2zX+GHB1AHWt+x0=; b=sJMIatAA6Q8YnBM8RwJOXcawHi Oa84a1T/KY4GRYolF2EfyYijV9SpHEV0JXnnptXTzDfZGDEbdhb0NQKCwlz4IMVrTa+zHKmZeDCTo uInjU7fVgoyL1kEvqLxuHBO2W8QtLa6cFjO1sCw7HNvSRD7O5R3DrDZqzkjW6fCzE0VJcr1ESzPll Kvp+t7jQZ5cM80S9u6sqbsWtJwBzRMk+pPrT6yea14hNKYqxy2aUyhwxiuL1+vjKS35w2YGMvMruI pxjldPHD65Aa5A3UB3U7H6QF6y0vMks2CmxBpAzT/2SchUu8DUJRcWjq3ZXmplCuAVl73jr+lkG5b 04LbZfHA==; Received: from shell.armlinux.org.uk ([fd8f:7570:feb6:1:5054:ff:fe00:4ec]:37340) by pandora.armlinux.org.uk with esmtpsa (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1s7XNb-0004e6-1E; Thu, 16 May 2024 10:26:27 +0100 Received: from linux by shell.armlinux.org.uk with local (Exim 4.94.2) (envelope-from ) id 1s7XNZ-0000Vh-Q7; Thu, 16 May 2024 10:26:25 +0100 Date: Thu, 16 May 2024 10:26:25 +0100 From: "Russell King (Oracle)" To: Florian Fainelli Cc: Geert Uytterhoeven , Linus Walleij , Catalin Marinas , Kees Cook , Ard Biesheuvel , Arnd Bergmann , Stefan Wahren , linux-arm-kernel@lists.infradead.org, linux-renesas-soc@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] ARM: Fix userspace enter on LPAE with CC_OPTIMIZE_FOR_SIZE=y Message-ID: References: <200d273a83906a68a1c4a9298c415980737be811.1715781469.git.geert+renesas@glider.be> <8ef97b5d-2053-4051-b2da-6c2887c7b394@broadcom.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <8ef97b5d-2053-4051-b2da-6c2887c7b394@broadcom.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240516_022643_492809_505DC6A2 X-CRM114-Status: GOOD ( 14.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: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Wed, May 15, 2024 at 12:46:38PM -0700, Florian Fainelli wrote: > On 5/15/24 07:02, Geert Uytterhoeven wrote: > > Booting an LPAE-enabled kernel built with CONFIG_CC_OPTIMIZE_FOR_SIZE=y > > fails when starting userspace: > > > > Kernel panic - not syncing: Attempted to kill init! exitcode=0x00000004 > > CPU: 1 PID: 1 Comm: init Tainted: G W N 6.9.0-rc1-koelsch-00004-g7af5b901e847 #1930 > > Hardware name: Generic R-Car Gen2 (Flattened Device Tree) > > Call trace: > > unwind_backtrace from show_stack+0x10/0x14 > > show_stack from dump_stack_lvl+0x78/0xa8 > > dump_stack_lvl from panic+0x118/0x398 > > panic from do_exit+0x1ec/0x938 > > do_exit from sys_exit_group+0x0/0x10 > > ---[ end Kernel panic - not syncing: Attempted to kill init! exitcode=0x00000004 ]--- > > > > Add the missing memory clobber to cpu_set_ttbcr(), as suggested by > > Russell King. > > > > Force inlining of uaccess_save_and_enable(), as suggested by Ard > > Biesheuvel. > > > > The latter fixes booting on Koelsch. > > > > Fixes: 7af5b901e84743c6 ("ARM: 9358/2: Implement PAN for LPAE by TTBR0 page table walks disablement") > > Closes: https://lore.kernel.org/r/CAMuHMdWTAJcZ9BReWNhpmsgkOzQxLNb5OhNYxzxv6D5TSh2fwQ@mail.gmail.com/ > > Signed-off-by: Geert Uytterhoeven > > Tested-by: Florian Fainelli This should be in linux-next now, if not by tomorrow - it was pushed out yesterday. -- RMK's Patch system: https://www.armlinux.org.uk/developer/patches/ FTTP is here! 80Mbps down 10Mbps up. Decent connectivity at last! _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel