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, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS 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 7E6C6C48BDF for ; Tue, 15 Jun 2021 16:15:08 +0000 (UTC) Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id C5FBD61585 for ; Tue, 15 Jun 2021 16:15:07 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org C5FBD61585 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=canonical.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id D80398291A; Tue, 15 Jun 2021 18:15:04 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=fail (p=none dis=none) header.from=canonical.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Received: by phobos.denx.de (Postfix, from userid 109) id 5305582917; Tue, 15 Jun 2021 18:15:01 +0200 (CEST) Received: from youngberry.canonical.com (youngberry.canonical.com [91.189.89.112]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id 4F663828A4 for ; Tue, 15 Jun 2021 18:14:58 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=fail (p=none dis=none) header.from=canonical.com Authentication-Results: phobos.denx.de; spf=none smtp.mailfrom=dimitri.ledkov@canonical.com Received: from mail-il1-f200.google.com ([209.85.166.200]) by youngberry.canonical.com with esmtps (TLS1.2) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.93) (envelope-from ) id 1ltBiL-0005QS-LT for u-boot@lists.denx.de; Tue, 15 Jun 2021 16:14:57 +0000 Received: by mail-il1-f200.google.com with SMTP id j9-20020a056e020149b02901ece9afab6bso10570786ilr.10 for ; Tue, 15 Jun 2021 09:14:57 -0700 (PDT) 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=DM/NozLVOWF0PLVgm4Yh6WrYN82Z9A9bmJ9ounIeccQ=; b=EdwhA0X/y9sL2jNcxOerWuhNh2O1P0BtXSWr/1v2MjhB8HidGIC7CbAih4zIRl1N4u lYNuC+Lft1dOL3Q8MBO1GLYDD8nSzubkqPsGPXosw6+aNDTAkrbPzKQ0Rs+g7Lhar8YV GHrB7FilRFNvSu+yJ4uDV65Agq1HGmYG617pr06mmHWIBZLnhsHp1EYZ5DFgLPn1D0sZ 0gbThA9jci+Ks3aJGaY8FjfVIrFl6+PLsd8GrMHW6yzQKCf/1UV29jTHGGsFH+WjW+a0 a+m8cIzrqs7w545iat4zOywVGKB8so4DkRuxu42WhslYQrWV0Ue4I4khv2m8iAjKKa3q eiKQ== X-Gm-Message-State: AOAM530O5uPrjkY2M0AY20HCRM7UyIXziTXQpfPTLlDyD+GL/ySruQ8m IVxuFgTF5jf9rV8umXjLEA1COnr8GgXVaYkNQnTfoS0HxUSKjPjjRt5xuUnZwmu0GI0PlbeXlDP qay+5DmA+LLAOOSTBQx8Ge0r6T9aH7lSKLcNhVvVSCZYkb4Y= X-Received: by 2002:a05:6e02:d51:: with SMTP id h17mr201346ilj.177.1623773696732; Tue, 15 Jun 2021 09:14:56 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyKS5KNzzuYQSXeVKAPw8rPmNIvsrTxdpzYc/O+OekgoSXG5a46YliJ+tX63bcYW/RhyB9jkoU1YkvdU9YuxDM= X-Received: by 2002:a05:6e02:d51:: with SMTP id h17mr201327ilj.177.1623773696456; Tue, 15 Jun 2021 09:14:56 -0700 (PDT) MIME-Version: 1.0 References: <20210421114201.57994-1-xnox@ubuntu.com> In-Reply-To: From: Dimitri John Ledkov Date: Tue, 15 Jun 2021 17:14:20 +0100 Message-ID: Subject: Re: [PATCH] cmd: pxe_utils: sysboot: fix crash if either board or soc are not set. To: Ramon Fried Cc: U-Boot Mailing List Content-Type: text/plain; charset="UTF-8" X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.34 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.103.2 at phobos.denx.de X-Virus-Status: Clean Hi, this patch is still not pulled into master. It still applies cleanly onto master. Can this patch please be pulled in? It fixes a crash of uboot. Without this patch upstream, people who build their own uboot cannot boot stock Ubuntu images. What can I do, for this patch to be applied? On Sat, May 8, 2021 at 7:23 AM Ramon Fried wrote: > > On Wed, Apr 21, 2021 at 5:32 PM Dimitri John Ledkov wrote: > > > > If the environment does not have "soc" or "board" set, and fdtdir > > option is specified in extlinux.conf, the bootloader will crash whilst > > dereferencing a null pointer. Add a guard against null soc or > > board. Fixes a crash of qemu-riscv64_smode configuration, which does > > not have CONFIG_SYS_SOC defined. > > > > Signed-off-by: Dimitri John Ledkov > > --- > > cmd/pxe_utils.c | 8 ++++++++ > > 1 file changed, 8 insertions(+) > > > > diff --git a/cmd/pxe_utils.c b/cmd/pxe_utils.c > > index 71c5af4c25..9a30629e26 100644 > > --- a/cmd/pxe_utils.c > > +++ b/cmd/pxe_utils.c > > @@ -587,6 +587,14 @@ static int label_boot(struct cmd_tbl *cmdtp, struct pxe_label *label) > > f2 = "-"; > > f3 = env_get("board"); > > f4 = ".dtb"; > > + if (!f1) { > > + f1 = ""; > > + f2 = ""; > > + } > > + if (!f3) { > > + f2 = ""; > > + f3 = ""; > > + } > > } > > > > len = strlen(label->fdtdir); > > -- > > 2.27.0 > > > Reviewed-by: Ramon Fried -- Regards, Dimitri.