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=-15.5 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,INCLUDES_CR_TRAILER,INCLUDES_PATCH,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 18914C433DB for ; Mon, 22 Feb 2021 12:28:31 +0000 (UTC) Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id B21EF60C3E for ; Mon, 22 Feb 2021 12:28:30 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org B21EF60C3E Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=kernel.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.20170209; h=Sender:Content-Transfer-Encoding: Content-Type:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References:Message-ID: Subject: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=me/VpMfRCbBVuq8+Z4TvoikXz1C4mhDtEo9Jo4n34yw=; b=ZLgkkD0E/FPLjuphco3yV+XDv S26jLO5EHOBYymwCG/nS8H3uU3c3/7OaBOQgc+rMiFZVG5qPf9PpK5qLjlxajnAXRAkNyDAjbgwPi Aa8BrtLAUC5bdakTz4gljWvMsI4GoBtbgM4/hVw/WAeDRZTBNgaq0mKxSiDLtNShIgh7QDQ+Egx1D HnmksAxdQVZiPo7QEnY8p8nTUJEI84AwrhpArPZUY5mm5SH873lUw4zK7WVG9gsJ35SzoMeHhUQhn 8P4mvo+/LOEA8cnB2VDpit+mJqnB2kIuEGLWFiBUF+ClKNEHz3EtNGOgFk8HbhVmwPDrZQ25p4DJh he+xQrIQg==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1lEAJ0-0004Bl-AA; Mon, 22 Feb 2021 12:27:14 +0000 Received: from mail.kernel.org ([198.145.29.99]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1lEAHh-0003aD-4D for linux-arm-kernel@lists.infradead.org; Mon, 22 Feb 2021 12:25:54 +0000 Received: by mail.kernel.org (Postfix) with ESMTPSA id 772AB64E2F; Mon, 22 Feb 2021 12:25:49 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1613996751; bh=F61yD7TfzwZTNpXdixKLax2iqMRPofRipBni27VX2xM=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=SAl1T7KZJQQwmBaF9he+BHXzMUkMmuxBth+/0xxzpsa6fqv5Oqis3kFS/MtYzCguy ATqJ/v6/dT1POnWGmADkz8WaOI+GwO8I4FMLp6eesSzsBRAfXXgNlB3+tLIStB9WZ4 zBm+XwHVcygvLkB9feyhjgTBUP37E07KQG4Rq24EPDZboITntvu0XhiS9EhUnJyw6G XNkLQz14KNRFQmd4qbeR21szj/IZGbMceiFqH3CZscpl2UBYO86E8kWyDhaHFxtw0W 5vtcegPw5+YMFPEuMJBSCq7+MR2y4WhdulKtm45bkEj5G9rr6dAj9DbiKPbRQekucp Fs1H68Bt2620w== Date: Mon, 22 Feb 2021 12:25:46 +0000 From: Will Deacon To: Pavel Tatashin Subject: Re: [PATCH v3 1/1] arm64: mm: correct the inside linear map range during hotplug check Message-ID: <20210222122545.GA8847@willie-the-truck> References: <20210216150351.129018-1-pasha.tatashin@soleen.com> <20210216150351.129018-2-pasha.tatashin@soleen.com> <20210219191807.GB6683@willie-the-truck> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.10.1 (2018-07-13) X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210222_072553_324937_F3CF5A35 X-CRM114-Status: GOOD ( 22.52 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Michal Hocko , Anshuman Khandual , Catalin Marinas , James Morris , LKML , linux-mm , Tyler Hicks , Linux ARM , Andrew Morton , Logan Gunthorpe , Ard Biesheuvel , Mike Rapoport 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 Fri, Feb 19, 2021 at 02:44:49PM -0500, Pavel Tatashin wrote: > On Fri, Feb 19, 2021 at 2:18 PM Will Deacon wrote: > > > > On Tue, Feb 16, 2021 at 10:03:51AM -0500, Pavel Tatashin wrote: > > > Memory hotplug may fail on systems with CONFIG_RANDOMIZE_BASE because the > > > linear map range is not checked correctly. > > > > > > The start physical address that linear map covers can be actually at the > > > end of the range because of randomization. Check that and if so reduce it > > > to 0. > > > > > > This can be verified on QEMU with setting kaslr-seed to ~0ul: > > > > > > memstart_offset_seed = 0xffff > > > START: __pa(_PAGE_OFFSET(vabits_actual)) = ffff9000c0000000 > > > END: __pa(PAGE_END - 1) = 1000bfffffff > > > > > > Signed-off-by: Pavel Tatashin > > > Fixes: 58284a901b42 ("arm64/mm: Validate hotplug range before creating linear mapping") > > > Tested-by: Tyler Hicks > > > --- > > > arch/arm64/mm/mmu.c | 21 +++++++++++++++++++-- > > > 1 file changed, 19 insertions(+), 2 deletions(-) > > > > I tried to queue this as a fix, but unfortunately it doesn't apply. > > Please can you send a v4 based on the arm64 for-next/fixes branch? > > The previous version, that is not built against linux-next would still > applies against current mainlein/for-next/fixes > > https://lore.kernel.org/lkml/20210215192237.362706-2-pasha.tatashin@soleen.com/ > > I just tried it. I think it would make sense to take v2 fix, so it > could also be backported to stables. Taking that won't help either though, because it will just explode when it meets 'mm' in Linus's tree. So here's what I think we need to do: - I'll apply your v3 at -rc1 - You can send backports based on your -v2 for stable once the v3 has been merged upstream. Sound good? Will _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel