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 X-Spam-Level: X-Spam-Status: No, score=-10.2 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_SANE_1 autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id C8108C433E0 for ; Wed, 3 Feb 2021 13:16:06 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 78E9964F9B for ; Wed, 3 Feb 2021 13:16:06 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230043AbhBCNPu (ORCPT ); Wed, 3 Feb 2021 08:15:50 -0500 Received: from mail.kernel.org ([198.145.29.99]:57740 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229609AbhBCNPs (ORCPT ); Wed, 3 Feb 2021 08:15:48 -0500 Received: by mail.kernel.org (Postfix) with ESMTPSA id D5BBC64F9A; Wed, 3 Feb 2021 13:15:05 +0000 (UTC) Date: Wed, 3 Feb 2021 13:15:03 +0000 From: Catalin Marinas To: gregkh@linuxfoundation.org Cc: vincenzo.frascino@arm.com, mark.rutland@arm.com, stable@vger.kernel.org, will@kernel.org Subject: Re: FAILED: patch "[PATCH] arm64: Fix kernel address detection of __is_lm_address()" failed to apply to 5.4-stable tree Message-ID: <20210203131501.GB10424@gaia> References: <1612104058247187@kroah.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1612104058247187@kroah.com> User-Agent: Mutt/1.10.1 (2018-07-13) Precedence: bulk List-ID: X-Mailing-List: stable@vger.kernel.org Hi Greg, On Sun, Jan 31, 2021 at 03:40:58PM +0100, Greg Kroah-Hartman wrote: > The patch below does not apply to the 5.4-stable tree. > If someone wants it applied there, or to any other stable or longterm > tree, then please email the backport, including the original git commit > id to . > > thanks, > > greg k-h > > ------------------ original commit in Linus's tree ------------------ > > From 519ea6f1c82fcdc9842908155ae379de47818778 Mon Sep 17 00:00:00 2001 > From: Vincenzo Frascino > Date: Tue, 26 Jan 2021 13:40:56 +0000 > Subject: [PATCH] arm64: Fix kernel address detection of __is_lm_address() > > Currently, the __is_lm_address() check just masks out the top 12 bits > of the address, but if they are 0, it still yields a true result. > This has as a side effect that virt_addr_valid() returns true even for > invalid virtual addresses (e.g. 0x0). > > Fix the detection checking that it's actually a kernel address starting > at PAGE_OFFSET. > > Fixes: 68dd8ef32162 ("arm64: memory: Fix virt_addr_valid() using __is_lm_address()") > Cc: # 5.4.x > Cc: Will Deacon > Suggested-by: Catalin Marinas > Reviewed-by: Catalin Marinas > Acked-by: Mark Rutland > Signed-off-by: Vincenzo Frascino > Link: https://lore.kernel.org/r/20210126134056.45747-1-vincenzo.frascino@arm.com > Signed-off-by: Catalin Marinas I sent you the 5.4 and 5.10 backports of this patch. There is another fix in this area which I'll send to Linus tonight. It should apply cleanly on 5.4 and 5.10. Thanks. -- Catalin