Received: by 2002:a05:6358:c692:b0:131:369:b2a3 with SMTP id fe18csp1274256rwb; Wed, 26 Jul 2023 09:59:06 -0700 (PDT) X-Google-Smtp-Source: APBJJlHdDKhGFG6kzjvWqxb7DnZgkrl+8m5NIFZyPs5YJE61ksj5UqCGbUtZ3+EQkSawwdsoRgJh X-Received: by 2002:a05:6402:54a:b0:522:38cb:d8cb with SMTP id i10-20020a056402054a00b0052238cbd8cbmr1938186edx.20.1690390745820; Wed, 26 Jul 2023 09:59:05 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1690390745; cv=none; d=google.com; s=arc-20160816; b=ULm8hm0aEw3NoTxJmilGbDrtUdjj3zxUOqWXy0nwGppONCOCXc+UqJCf2c7fRsYhQ9 nV4iv2adDVSng29pWJ+KVxeAEweRUZbPie3157CM8UwdRE6Cw1n0dQKqkA/IP2uS2GJW TFwbQa9Ql58G1ld6pwl7B0pI7NsdbT7/aeLDyZ1fBCcu62RzsStyR0ROLRXmY7qeo818 fH+nwh2Ca0AJh+3pzo/GAYLRd2FlcCi5SWbMoKdRtj3PnTOdbyV2QTe0KetoTWqRX67t Amrdw3HCyh2s3xrhEi1iZCkqdbhKwRvjGr+wOQ4IIuQyQy00l2xarhSL/+A2z4b4fhVc 2sAQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=4JszCXsk5Nllzh7cjgqgN+vQL9hp34oqXTsS5QsqB04=; fh=8yFwv2Cczl8jFn/LRPipVZTtkahE3jc1OyvcxzeW4/4=; b=OlJxrXtHzw4mYIEhmtqKowXX/+KocRPf149iIdv57GuSgsz92zjK4CijYqL+ioFKk/ nmObs6TF8wjSOK/Bnbpy5AXBM0s8F3UJQF7XuDLtkK812muv3WwHwENgrb7br8LIEoR7 OR/AwxKiBaf0AntCKcEar9wpvmNZcgLCh7RE9/sI4XR4sysBnxjtnBQnBUI3xVQGV8k8 26Uc144TAAev5w6z+5kf5iDBQniO6aWptRD3tBdo3gVNQQakh00QHv93R78apgf7kCSg MzwN8sCrgce3UNIePS1y4EQ2aqxUWXSuCbRr3gjhhbglm+WzToHGcwS5I+ErDug67pBT ucnA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=WVe0wYl0; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id x2-20020aa7dac2000000b005224f599180si2456321eds.363.2023.07.26.09.58.39; Wed, 26 Jul 2023 09:59:05 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=WVe0wYl0; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229985AbjGZQiV (ORCPT + 99 others); Wed, 26 Jul 2023 12:38:21 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54848 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229810AbjGZQiU (ORCPT ); Wed, 26 Jul 2023 12:38:20 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7A57B2118 for ; Wed, 26 Jul 2023 09:38:19 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 1067461BD2 for ; Wed, 26 Jul 2023 16:38:19 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 9CF0CC433C8; Wed, 26 Jul 2023 16:38:14 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1690389498; bh=JIDm8LyfxJE7RRvIDFBtu2mHaYm7IVhXvOfm9XgAH7o=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=WVe0wYl0pfbTfi8Yk37HxVES1kUaLlRdVU18c+4qLYdbqDo0CkkW2g7EcfDSgzYPJ NA5avCass45oAveyV92sZS2dnLsCv9hYu2IOOxxERW6z5ffcDTqHWvqAeDNiO/w8o0 2SEA6Xny8d1OJ9Bl8vFkUAxs9OSQjY2Huro5SATt91BAgNMvoY/b5Mfj+XsJWSNoTc UgE9m9/vfyW+G6CLZ1gO9WTA+yUUMyq0wyPKF7DpzWQ531qwanBBLIJlomoPdBhRuV LH4X32oE8eZxhEog8xelaNnyovVs45f739gtIVMaSsCEQupavG1K3g2SGwAzTXp3Al myPgA/ueGseJw== Date: Wed, 26 Jul 2023 17:38:12 +0100 From: Conor Dooley To: Petr Tesarik Cc: Paul Walmsley , Palmer Dabbelt , Albert Ou , Conor Dooley , Li Huafei , Liao Chang , Masahiro Yamada , Kees Cook , Andrew Morton , Heiko Stuebner , Ricardo Ribalda , Alyssa Ross , Li Zhengyu , "open list:RISC-V ARCHITECTURE" , kexec@lists.infradead.org, open list , Torsten Duwe , Roberto Sassu , petr@tesarici.cz Subject: Re: [PATCH v2 3/3] riscv/kexec: load initrd high in available memory Message-ID: <20230726-busily-marsupial-504e9ff2d873@spud> References: <67c8eb9eea25717c2c8208d9bfbfaa39e6e2a1c6.1690365011.git.petr.tesarik.ext@huawei.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="4IjUavm2DX17Tscu" Content-Disposition: inline In-Reply-To: <67c8eb9eea25717c2c8208d9bfbfaa39e6e2a1c6.1690365011.git.petr.tesarik.ext@huawei.com> X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org --4IjUavm2DX17Tscu Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Wed, Jul 26, 2023 at 11:54:01AM +0200, Petr Tesarik wrote: > From: Torsten Duwe >=20 > When initrd is loaded low, the secondary kernel fails like this: >=20 > INITRD: 0xdc581000+0x00eef000 overlaps in-use memory region >=20 > This initrd load address corresponds to the _end symbol, but the > reservation is aligned on PMD_SIZE, as explained by a comment in > setup_bootmem(). >=20 > It is technically possible to align the initrd load address accordingly, > leaving a hole between the end of kernel and the initrd, but it is much > simpler to allocate the initrd top-down. >=20 > Fixes: 838b3e28488f ("RISC-V: Load purgatory in kexec_file") > Signed-off-by: Torsten Duwe > Signed-off-by: Petr Tesarik > Cc: stable@vger.kernel.org Trying to align it might be worthwhile, but the simple fix makes sense for now & w.r.t backporting. Reviewed-by: Conor Dooley Thanks, Conor. --4IjUavm2DX17Tscu Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iHUEABYIAB0WIQRh246EGq/8RLhDjO14tDGHoIJi0gUCZMFL9AAKCRB4tDGHoIJi 0kQrAQDAjVabAm/0oUxhkPidOB7m+J9yy16ms3S4tX5CRjFpMgEAwbU91VszeYbg yTGfUV46zID+fbBShPEqsNSCrR3Qlgs= =yUks -----END PGP SIGNATURE----- --4IjUavm2DX17Tscu--