From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from pandora.armlinux.org.uk (pandora.armlinux.org.uk [78.32.30.218]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id DF8EC3E9C16 for ; Fri, 26 Jun 2026 09:45:22 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=78.32.30.218 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1782467124; cv=none; b=oJR7ckk+oJURKUOTya767b0VaaX+QOLI6j80s4M+AUk/ahnMVFeLIeotWJLTlrhn7Ccu/N45YXoQoEDCkS9st/aRot/cfFUN8svXb4tRXQDAgv6KbGqnW7oeY0nTtnHj5sq2jdNPkPnKY2b0kOh9i2NEftc7+NYEv/0pNpGGFLo= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1782467124; c=relaxed/simple; bh=P1VHjTxNtXzn0ajP8uWCwWN1RiG9zxqeTnAhGfQ3ZEU=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=MWywVsc1YTanc8try0CzpdI8pqxIyuMgo391/mQUg3SSOdQ16PXKKOCOERSlhC5yVoIFwMFWxH+iU+ITSLQKs4adHyN/qOtHyJudth/JnoiLBOPJr5PBojpAfZNxskg848SYl7SiIOTkbTieiU+7YPYrNwbBnnk/tekYTSoZPkw= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=armlinux.org.uk; spf=none smtp.mailfrom=armlinux.org.uk; dkim=pass (2048-bit key) header.d=armlinux.org.uk header.i=@armlinux.org.uk header.b=oQ2aIW1y; arc=none smtp.client-ip=78.32.30.218 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=armlinux.org.uk Authentication-Results: smtp.subspace.kernel.org; spf=none smtp.mailfrom=armlinux.org.uk Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=armlinux.org.uk header.i=@armlinux.org.uk header.b="oQ2aIW1y" 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=sAYBBi0QEhk5OpIMBq4Dd5BhpTCI5r4B2fec2bzU9qM=; b=oQ2aIW1yH1MJkA7rRBoT3Ow+Vd jd0G5na/NK4V/OY44T7Vu/+I9JNCLpDcmJal+RA14opnUIgM5Oi3xSMEvR2WFDZ8r9+uz3MVE2qsV hBb25FPb3FOA2CkcmrQG68bqxY+vDDof/+GIpbKgRAP3H3fVusgftQ9F9FND9vIRmcppwKV2kOygM N9vY1YjZ2Qrq0RojKk443gjL1PYUsjg9Up+tXx0qc5Ee6cw4Y965Vm44gKrZ3T7RHmlnE39d1iHkw bpf2D1LIUSBohpYRNZEoDOetTYfebY3CyHlasg0hIGy12ClFymu36rN3vxWu4S0ke+KcP5xWSVo/n Jc0zIhQA==; Received: from shell.armlinux.org.uk ([fd8f:7570:feb6:1:5054:ff:fe00:4ec]:47770) by pandora.armlinux.org.uk with esmtpsa (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.98.2) (envelope-from ) id 1wd37f-0000000024l-3xqp; Fri, 26 Jun 2026 10:45:20 +0100 Received: from linux by shell.armlinux.org.uk with local (Exim 4.98.2) (envelope-from ) id 1wd37e-000000002wX-3Qyh; Fri, 26 Jun 2026 10:45:18 +0100 Date: Fri, 26 Jun 2026 10:45:18 +0100 From: Russell King To: Qi Xi Cc: Andrew Morton , linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, Yuanbin Xie , Nanyong Sun Subject: Re: [PATCH v3 2/2] ARM: mm: protect show_pte() in do_DataAbort() fallback path Message-ID: References: <20260626073048.3595106-1-xiqi2@huawei.com> <20260626073048.3595106-3-xiqi2@huawei.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20260626073048.3595106-3-xiqi2@huawei.com> Sender: "Russell King,,," On Fri, Jun 26, 2026 at 03:30:48PM +0800, Qi Xi wrote: > The do_DataAbort() fallback path handles FSR types not serviced by > do_page_fault() (fsr_info entries with fn=do_bad). This path also > calls show_pte() without holding mmap_read_lock, exposing it to > the same use-after-free issue. > > Since do_DataAbort() is an exception entry point that can be reached > from contexts where sleeping is not allowed, use mmap_read_trylock(). > If the lock cannot be acquired, the page table dump is skipped. > > Fixes: 1da177e4c3f4 ("Linux-2.6.12-rc2") > Suggested-by: Yuanbin Xie > Signed-off-by: Qi Xi Same reason as patch 1. We can't take locks. -- RMK's Patch system: https://www.armlinux.org.uk/developer/patches/ FTTP is here! 80Mbps down 10Mbps up. Decent connectivity at last!