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 9E66AC3DA49 for ; Tue, 23 Jul 2024 13:16:43 +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:In-Reply-To: Content-Transfer-Encoding:Content-Type: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=71vUgGEoSVACd3I3O5TngaOdq86JpPnfVW318qR+XkQ=; b=Q4LutQHfj6FEjNQWy0+l/FFaxQ /yIDrft/v97+RfclyY+n4MlsE1UY9U5tIuMlawLV2cI76qGZ+y5VG8SJagAsZtdiSjeD8kkWAYhQv 3dTaWzsKDhvPsfKdzo/mBTVfPgex8a83F+37m0LBQdPUDzz0C+M696ppIXAdief0zvvOGPxvuYJs6 t+F869jI/zqV23OS95y6Day1ne13P1+6OB0l6pq9frM6cLVbJG1ZC1otoz55LEFzQG33KflZCdLs4 vIHqeKco93oW/x08qUAxFQxCcl1pd+wfzCEgl0Lqa+CXb2Dm5cFBYHgSqbi44xGa62h9gE2xiMUpR BORWTsow==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1sWFNV-0000000CUZ7-1FKO; Tue, 23 Jul 2024 13:16:29 +0000 Received: from sin.source.kernel.org ([2604:1380:40e1:4800::1]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1sWFN6-0000000CUOs-0lUh for linux-arm-kernel@lists.infradead.org; Tue, 23 Jul 2024 13:16:07 +0000 Received: from smtp.kernel.org (transwarp.subspace.kernel.org [100.75.92.58]) by sin.source.kernel.org (Postfix) with ESMTP id 03076CE0E93; Tue, 23 Jul 2024 13:16:01 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id D79D7C4AF09; Tue, 23 Jul 2024 13:15:58 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1721740559; bh=CJ6odlK7baI24/AOmmEydF07fAZOeER+tUXYTE2d5IE=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=GtSOOpj99vAwrjlrrQ4YGxaCDLOisq7eaaYyXZmuZX4mAT+u9PIDrpQTVAuxAJuV2 1aUHsSpRiv0GW7NUW3LzJ9lVSNHGV423QOD9O89GnsfeDyVlZI6QdL2zNbj4L1Oj7H KX3R/L+AySRY2qbuCmco2Pxb18kXUyP+GWYqpMLE= Date: Tue, 23 Jul 2024 15:15:56 +0200 From: Greg KH To: Masahiro Yamada Cc: John Stultz , patches@armlinux.org.uk, linux-kernel@vger.kernel.org, Russell King , Ard Biesheuvel , linux-arm-kernel@lists.infradead.org, stable@vger.kernel.org, Neill Kapron Subject: Re: [PATCH] ARM: fix get_user() broken with veneer Message-ID: <2024072348-perfectly-duct-e0aa@gregkh> References: <20230926160903.62924-1-masahiroy@kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240723_061604_552206_4985AE11 X-CRM114-Status: GOOD ( 19.54 ) 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 On Fri, Jul 19, 2024 at 12:04:39PM +0900, Masahiro Yamada wrote: > On Fri, Jul 19, 2024 at 2:10 AM John Stultz wrote: > > > > On Tue, Sep 26, 2023 at 9:09 AM Masahiro Yamada wrote: > > > > > > The 32-bit ARM kernel stops working if the kernel grows to the point > > > where veneers for __get_user_* are created. > > > > > > AAPCS32 [1] states, "Register r12 (IP) may be used by a linker as a > > > scratch register between a routine and any subroutine it calls. It > > > can also be used within a routine to hold intermediate values between > > > subroutine calls." > > > > > > However, bl instructions buried within the inline asm are unpredictable > > > for compilers; hence, "ip" must be added to the clobber list. > > > > > > This becomes critical when veneers for __get_user_* are created because > > > veneers use the ip register since commit 02e541db0540 ("ARM: 8323/1: > > > force linker to use PIC veneers"). > > > > > > [1]: https://github.com/ARM-software/abi-aa/blob/2023Q1/aapcs32/aapcs32.rst > > > > > > Signed-off-by: Masahiro Yamada > > > Reviewed-by: Ard Biesheuvel > > > > + stable@vger.kernel.org > > It seems like this (commit 24d3ba0a7b44c1617c27f5045eecc4f34752ab03 > > upstream) would be a good candidate for -stable? > > > Yes. > > This one should be back-ported. Thanks. Now queued up, thanks. greg k-h