Received: by 2002:a05:6358:c692:b0:131:369:b2a3 with SMTP id fe18csp5470398rwb; Tue, 1 Aug 2023 03:11:51 -0700 (PDT) X-Google-Smtp-Source: APBJJlEp1u6eXZhJeTU+DY7NG472QE9wbp+1dQUlUD307HnS45sLbMeSJHbdZVW/IIicly5wywot X-Received: by 2002:aa7:9a8c:0:b0:686:5f73:4eac with SMTP id x12-20020aa79a8c000000b006865f734eacmr13318888pfi.13.1690884711138; Tue, 01 Aug 2023 03:11:51 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1690884711; cv=none; d=google.com; s=arc-20160816; b=L3FJtDcXuC8ynY5g9fbdd+7VlcCEZNad5RO3Pez+P2SYP7bxOHEVeAkFaAEE0U7Y7a man0ev8QelcM5S4DeVayeDsL3YcYX2lt80rxRgHW9+pijsfbl7bxbrQ63BImVzBB2fON XqaO+3UpVHQYebFKopUhjf24hlr9ih4SC0AHPILhTvHY7iBQfbcdrUsyt2t52qTglwsT nR53t7QXmCeI5OVjsAIFGPXwHm4M2BUHBT0P6efyaYjkfjFHxfYxLL1To+xBTprKXCZs eiMEludGcoDcLWGJolom2UD31V6qBePlPNHonZlakRzyHiMayMVkuuXZweUhewcj2sUV oh2g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:references :cc:to:from:content-language:subject:user-agent:mime-version:date :message-id; bh=9FDNyLL+ikf3BpxFT41XdR9oLX0hJk/dOHafoRmRSWM=; fh=/DyDVJQh5Q9MIyosYa7yl8jwaYzQVN4a5XqCgCr6kR8=; b=k44wtZY7nfW6nUm3z5bUKgP78R635ZI+mdBQdaG/7Of8bEgn2JR/a6oAlsPnfUUJn5 BjmXnnyRq6Dq7KLvZX177ku/b2EJ/Yy92zEVEKgG9NkWel6xiGaoOAxw+LkoFNAnp9wE Xcmj0KjZNgJC7QsNZYVbYkehHJa2VQWA5nuGRD0fMUdFN+w6mfKF57e2Y3H3LhNARRcu JK2Pw+FKKfeWAkqSAML719TmSvP6/RFyb9KviyA6XMPntVyxcyiGci6VlC6ACGqyFiXs AxcN+cYBVJo97U8T+Bdpoji08YeIwsKURa+Ot4eJnX9ks4FEmoh+NzDi17lsPnJsAbJg HLTQ== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id i7-20020a6561a7000000b0055ba8970e7dsi8656024pgv.677.2023.08.01.03.11.38; Tue, 01 Aug 2023 03:11:51 -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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232346AbjHAJ36 (ORCPT + 99 others); Tue, 1 Aug 2023 05:29:58 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57330 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232990AbjHAJ3l (ORCPT ); Tue, 1 Aug 2023 05:29:41 -0400 Received: from frasgout12.his.huawei.com (unknown [14.137.139.154]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5AB3F2128 for ; Tue, 1 Aug 2023 02:28:23 -0700 (PDT) Received: from mail02.huawei.com (unknown [172.18.147.228]) by frasgout12.his.huawei.com (SkyGuard) with ESMTP id 4RFTvx2Tm4z9xFbF for ; Tue, 1 Aug 2023 17:14:53 +0800 (CST) Received: from [10.81.220.249] (unknown [10.81.220.249]) by APP1 (Coremail) with SMTP id LxC2BwC3abkK0Mhkbs4ZAA--.15467S2; Tue, 01 Aug 2023 10:27:51 +0100 (CET) Message-ID: Date: Tue, 1 Aug 2023 11:27:35 +0200 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH v2 0/3] RISC-V: Fix a few kexec_file_load(2) failures Content-Language: en-US From: Petr Tesarik To: 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 Cc: Torsten Duwe , Roberto Sassu , petr@tesarici.cz References: In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-CM-TRANSID: LxC2BwC3abkK0Mhkbs4ZAA--.15467S2 X-Coremail-Antispam: 1UD129KBjvJXoW7ury7CFyUKw1fWF1ktF45GFg_yoW8Jw4rpr WfC3ZrG348G3409r1xtw1Du34fGa17Cw15Jr4qvw1rAr1YvrW5AF1Igw40yFyDGryI93s0 qryFgr98Zw1kArDanT9S1TB71UUUUUUqnTZGkaVYY2UrUUUUjbIjqfuFe4nvWSU5nxnvy2 9KBjDU0xBIdaVrnRJUUUkK14x267AKxVW5JVWrJwAFc2x0x2IEx4CE42xK8VAvwI8IcIk0 rVWrJVCq3wAFIxvE14AKwVWUJVWUGwA2ocxC64kIII0Yj41l84x0c7CEw4AK67xGY2AK02 1l84ACjcxK6xIIjxv20xvE14v26r1j6r1xM28EF7xvwVC0I7IYx2IY6xkF7I0E14v26r4j 6F4UM28EF7xvwVC2z280aVAFwI0_Gr0_Cr1l84ACjcxK6I8E87Iv6xkF7I0E14v26F4UJV W0owAS0I0E0xvYzxvE52x082IY62kv0487Mc02F40EFcxC0VAKzVAqx4xG6I80ewAv7VC0 I7IYx2IY67AKxVWUJVWUGwAv7VC2z280aVAFwI0_Jr0_Gr1lOx8S6xCaFVCjc4AY6r1j6r 4UM4x0Y48IcVAKI48JM4x0x7Aq67IIx4CEVc8vx2IErcIFxwACI402YVCY1x02628vn2kI c2xKxwCF04k20xvY0x0EwIxGrwCFx2IqxVCFs4IE7xkEbVWUJVW8JwC20s026c02F40E14 v26r1j6r18MI8I3I0E7480Y4vE14v26r106r1rMI8E67AF67kF1VAFwI0_GFv_WrylIxkG c2Ij64vIr41lIxAIcVC0I7IYx2IY67AKxVWUJVWUCwCI42IY6xIIjxv20xvEc7CjxVAFwI 0_Gr0_Cr1lIxAIcVCF04k26cxKx2IYs7xG6rW3Jr0E3s1lIxAIcVC2z280aVAFwI0_Gr0_ Cr1lIxAIcVC2z280aVCY1x0267AKxVWxJr0_GcJvcSsGvfC2KfnxnUUI43ZEXa7VUbQVy7 UUUUU== X-CM-SenderInfo: hshw23xhvd2x3n6k3tpzhluzxrxghudrp/ X-CFilter-Loop: Reflected X-Spam-Status: No, score=-0.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_BLOCKED,RCVD_IN_MSPIKE_BL,RCVD_IN_MSPIKE_L3,RDNS_DYNAMIC, SPF_HELO_NONE,SPF_NONE,T_SCC_BODY_TEXT_LINE,URIBL_BLOCKED autolearn=no 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 Hi, On 7/26/2023 11:53 AM, Petr Tesarik wrote: > From: Petr Tesarik > > The kexec_file_load(2) syscall does not work at least in some kernel > builds. For details see the relevant section in this blog post: > > https://sigillatum.tesarici.cz/2023-07-21-state-of-riscv64-kdump.html > > This patch series handles an additional relocation types, removes the need > to implement a Global Offset Table (GOT) for the purgatory and fixes the > placement of initrd. It seems there are no objections, but what is the plan here? Take it into 6.5 as a fix, or let it go through for-next? Petr T > Changelog > ========= > > Changes from v1: > - Replace memcmp() with a for loop. > - Drop handling of 16-bit add/subtract relocations. They were used only > by alternatives in strcmp(), which was referenced only by string.o. > - Add the initrd placement fix. > > Petr Tesarik (1): > riscv/purgatory: do not link with string.o and its dependencies > > Torsten Duwe (2): > riscv/kexec: handle R_RISCV_CALL_PLT relocation type > riscv/kexec: load initrd high in available memory > > arch/riscv/kernel/elf_kexec.c | 3 ++- > arch/riscv/purgatory/Makefile | 26 +------------------------- > arch/riscv/purgatory/purgatory.c | 6 ++++-- > 3 files changed, 7 insertions(+), 28 deletions(-) >