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=-13.8 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED 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 B142CC433E0 for ; Fri, 19 Feb 2021 19:47:28 +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 33D0F64EAF for ; Fri, 19 Feb 2021 19:47:28 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 33D0F64EAF Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=soleen.com 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:To:Subject:Message-ID:Date:From:In-Reply-To: References:MIME-Version:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=/gaImOSrfV5nQqb4hGSgt9r9tz3w3AehJUh8L80JHCU=; b=D1/MUO5w97RCl7XI5/rEk1q03 nD6fAevT3y7hHOd/5BdQzNn4voNR2MPgSknZOeicuTjYW97GzSXtvFMRB+bt6sxoNambNNm3uVxSb JXdRhn4R9WxuSbnCYgtO70jIBjtkkD1xtRvaeM9NQ8zszUriuElRCfu61LFOg3sT1pHOJph4yciTE I9bDNdN3XTi0Ym8nFAUYW/n6CzAlOIhb5yZU2unyuyy6FxzUbAvJ246tRIEZzja5mWpH0GIEqNihw Qp00IRh89H4lLi2C6+TUdhNlFo04hxPxKMi8OAbPbYv1V+Z9fyih6rq4ttn2JOxuo5x6v380lgWbk Kzd4UVtJQ==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1lDBiW-0008DS-Af; Fri, 19 Feb 2021 19:45:32 +0000 Received: from mail-ej1-x62f.google.com ([2a00:1450:4864:20::62f]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1lDBiT-0008Cj-N0 for linux-arm-kernel@lists.infradead.org; Fri, 19 Feb 2021 19:45:30 +0000 Received: by mail-ej1-x62f.google.com with SMTP id w1so15551415ejf.11 for ; Fri, 19 Feb 2021 11:45:26 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=soleen.com; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=vNXss2R439WReA4A5p2aVRtiZkryvFn/KdsgQqDMpz8=; b=UGIej+Y90hr2tcZqfj6uEvrLTS/vpeYC4x6P6hOI08vsf67gC7FUzKWPuALawpLvpp xILpSNf7Fa7PznY65dx4RgT+lcZ9uYWVmi2F+3BzLXGTQll34qJuz2eO3SmJVggG6Oac 7gKtbRoKe8f2THu394yw8nGyphMxvKZ17E+ls4lXCx196oqtxWg/9kORGlRigJ6R2IYz wViSQurw95LjF3LgzXzKB8AzBt7nM2airi2EnEgSgTdsxzeiEYal1ATQVY+Nf4co7xZz Ict8+c2QOzuhIbDE+aqQbhuXZUKY6D1H2L3wu3VDuvWYIVDdDrzXl2lCJ2abrm2OItnC Tvng== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=vNXss2R439WReA4A5p2aVRtiZkryvFn/KdsgQqDMpz8=; b=a+MSt07FI/yKPpPbI5Ir4UCqpPG7F6vscxuwlKDLRloBcxVWYHJZItKPP9sY5f5CtP rGHWJMQrbdmWYmo+p6k3knXAUnNDEva9enTw4RaynqaXHmlA0r4i6euMyRglZx3Zgf+a HJWzMnV5Wjvbfwf0FtC/Cw2EjKf/DTKev/ldUsHBj4Ik+SCXPcxZ6ITTZ+Ael7x72FvQ a0c+xH3LN/TfRJRN1jm/XPOggJFgn8VszJFaJMW7JS2hWcnc4XoOjNClWeFPb2cpP4Ry wlx8441nLxAlR02GDoLmbEvsqRxOra3g7zO8hzyqwCqicqUV+JUrjzD2AA+qNHjAe1sO S4bg== X-Gm-Message-State: AOAM530FCRXlzfDZpCYDZhcKZp7bspCLB4Pge5rzDVEnvG+vbRuJVdxp zhAHpVlLzO/uP92JbJ4NxRFyMw2DJeCCna026i9Avw== X-Google-Smtp-Source: ABdhPJzz9ma1y8TEtYg/cIfXA1568VmifuPk++cNwcZ4+5SidEFivtvGtejnx/f3t9SmxhagutwJzw6f6GWzr3bBolQ= X-Received: by 2002:a17:906:17d5:: with SMTP id u21mr10394249eje.541.1613763924973; Fri, 19 Feb 2021 11:45:24 -0800 (PST) MIME-Version: 1.0 References: <20210216150351.129018-1-pasha.tatashin@soleen.com> <20210216150351.129018-2-pasha.tatashin@soleen.com> <20210219191807.GB6683@willie-the-truck> In-Reply-To: <20210219191807.GB6683@willie-the-truck> From: Pavel Tatashin Date: Fri, 19 Feb 2021 14:44:49 -0500 Message-ID: Subject: Re: [PATCH v3 1/1] arm64: mm: correct the inside linear map range during hotplug check To: Will Deacon X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210219_144529_801911_9D106CA3 X-CRM114-Status: GOOD ( 20.60 ) 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 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? Hi Will, 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. Thank you, Pasha _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel