Received: by 2002:a05:6358:11c7:b0:104:8066:f915 with SMTP id i7csp463006rwl; Wed, 5 Apr 2023 03:23:43 -0700 (PDT) X-Google-Smtp-Source: AKy350ZHhrJVG3GW8gXUmDbfTMGs3Q5Pni78o/qjXFmncCI1d34pd+dtmQHUoLTB9DtSRJx0mXeZ X-Received: by 2002:a17:90a:1a17:b0:237:24a8:c5e2 with SMTP id 23-20020a17090a1a1700b0023724a8c5e2mr5935901pjk.40.1680690223182; Wed, 05 Apr 2023 03:23:43 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1680690223; cv=none; d=google.com; s=arc-20160816; b=Z99ODBV6h/yHZdTV5IXXg0gF3+E7H1uO4D6v8sGUBDEiwQ0gJsu0gU4DQrOIM+yq5v avYNOc4hgtCeM/g6Rr1HIKnK8OoHSWTuYfi211x+zXR7bCuC4dF/1d4qe1wyKDS8bxSL X+EKaUieOX0GZHZ5b9TGKnwWMWYlnU6FXfrVAEiWKHgkK4T+fa0P+QkW8MeVLJILKgk5 7jPOKV3G28/E9kOih3+uxTKnfzuYRDHWaoZxBez1cj/XsWFe4FCRThjK0wLlwDP7mQOk C7yBJWSaydgDOybbZoqsQAPZC1wNz5hz58GNSFYtMjOu1DqSDjxpm+wTP9XOna1ZffU2 r4pA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:cc:to:subject :message-id:date:from:in-reply-to:references:mime-version :dkim-signature; bh=p1MUYmk8zdSjtgEKUxzEEtllvWGUjNB5xU2StnoGz/g=; b=fJq/Cy/zx3s6Dzd2Q0dP3iMEuOul4lDNjcErpWxP+Cekn1FONdkC6ucbUJixS4BbEq +3g27QjQnwcW5OUdktR/WKktOIeivmTy8ENJchbhaFvPxMFNzg444avez/yS2brRhxee 3nWWkfgAK25JJTK0gDGMJWfnB5vNRegvu6B2OhLUyxreZuwwk7LUiR+9a4mdaTeuqhU+ tlb2uw6bJ3lcxTW7+nkmsB9T6PxkHRgFQwOYNBaPzuiF6tdJJoH8xxvMqLiFWU+Ycvgq zA2NcjhMtC2QOsg7XcD3nP3I8ZAQSAkIvuEL9tOGiFauUu9HdTajCOtqgmMp+1yXlJE2 hQdA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=aLGxBSg5; 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 gq24-20020a17090b105800b0022c320a4d27si1040814pjb.189.2023.04.05.03.23.30; Wed, 05 Apr 2023 03:23:43 -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=aLGxBSg5; 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 S237250AbjDEKNm (ORCPT + 99 others); Wed, 5 Apr 2023 06:13:42 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59940 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231226AbjDEKNl (ORCPT ); Wed, 5 Apr 2023 06:13:41 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 929AB1737; Wed, 5 Apr 2023 03:13:40 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 259786241E; Wed, 5 Apr 2023 10:13:40 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 485E4C433A0; Wed, 5 Apr 2023 10:13:39 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1680689619; bh=BgubXGAhcAD8xmB3Wb4qFa5qZlD7IhSEYapF4EJB5M4=; h=References:In-Reply-To:From:Date:Subject:To:Cc:From; b=aLGxBSg5Mk09I9qHbAkz1gOv9DDL1JJwef7ejhT1lkzKe7H4Sd7ZytfDo6SKH6J6g RngLBfrJ7rphKUh23sLnrjIwx6D+pLtgGocbt6ChSW91EHf1MkFGXGITGHyYcqHlCm VHv/q1FEQEcHXMV85gTu82gOEzNxKHV5HywfqWE+QLbL1yd8ilkZk29oh7eByFQwKm 1YKCnUyhr7HjB8eQgaDl2i/N8uck+92Eotee8skKFOk4Fw7OH47c/onT2JI0Fj/4Qz Bsnhf1au7/Srj8jX8KTn/K4+HXsn3KHrnGG8wwL3bnY/KPeCEk5GWbVdjjg9Vv9OM7 EjY0P7dfyBUMA== Received: by mail-lf1-f50.google.com with SMTP id j11so45872596lfg.13; Wed, 05 Apr 2023 03:13:39 -0700 (PDT) X-Gm-Message-State: AAQBX9eNUk1e6lQw9qLa9iBQA/qYIHDi1/ALhY6C0yIEU/HoeizPTKbc sW0CYjwX5K3VVn5mbSQ4rWFabh/D5ocuPPEgCRA= X-Received: by 2002:a05:6512:68:b0:4eb:3f68:553f with SMTP id i8-20020a056512006800b004eb3f68553fmr1667233lfo.9.1680689617206; Wed, 05 Apr 2023 03:13:37 -0700 (PDT) MIME-Version: 1.0 References: <20230301085545.2373646-1-chenhuacai@loongson.cn> In-Reply-To: From: Ard Biesheuvel Date: Wed, 5 Apr 2023 12:13:26 +0200 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH] efi/loongarch: Reintroduce efi_relocate_kernel() to relocate kernel To: Huacai Chen Cc: Youling Tang , Huacai Chen , linux-efi@vger.kernel.org, loongarch@lists.linux.dev, Xuefeng Li , Xuerui Wang , linux-kernel@vger.kernel.org, loongson-kernel@lists.loongnix.cn Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, score=-5.2 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI,SPF_HELO_NONE, SPF_PASS autolearn=unavailable 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 On Wed, 5 Apr 2023 at 11:57, Huacai Chen wrote: > > Hi, Ard, > > On Wed, Apr 5, 2023 at 4:20=E2=80=AFPM Ard Biesheuvel w= rote: > > > > On Wed, 5 Apr 2023 at 10:14, Huacai Chen wrote: > > > > > > Hi, Ard, > > > > > > What is the status of this patch now? > > > > > > > I'd still like to understand how zboot is affected. It has > > > > static unsigned long alloc_preferred_address(unsigned long alloc_size) > > { > > #ifdef EFI_KIMG_PREFERRED_ADDRESS > > efi_physical_addr_t efi_addr =3D EFI_KIMG_PREFERRED_ADDRESS; > > > > if (efi_bs_call(allocate_pages, EFI_ALLOCATE_ADDRESS, EFI_LOADE= R_DATA, > > alloc_size / EFI_PAGE_SIZE, &efi_addr) =3D=3D E= FI_SUCCESS) > > return efi_addr; > > #endif > > return ULONG_MAX; > > } > > > > and if I understand you correctly, we never needed this in the first pl= ace? > Technically we don't need this, but I think setting a preferred > address as before may be better (keeping the default behavior the same > as before can avoid some unexpected problem). > OK makes sense I have queued this up now, should appear in -next tomorrow.