From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received-SPF: Pass (sender SPF authorized) identity=mailfrom; client-ip=2607:f8b0:4001:c06::22c; helo=mail-io0-x22c.google.com; envelope-from=ard.biesheuvel@linaro.org; receiver=edk2-devel@lists.01.org Received: from mail-io0-x22c.google.com (mail-io0-x22c.google.com [IPv6:2607:f8b0:4001:c06::22c]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id D029221CF58B0 for ; Wed, 4 Oct 2017 06:51:04 -0700 (PDT) Received: by mail-io0-x22c.google.com with SMTP id m81so1167575ioi.13 for ; Wed, 04 Oct 2017 06:54:26 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc:content-transfer-encoding; bh=CtT/qqpBDtDYV5SCwsHW3XRyb3rTvc2XDcjz0MH1FfI=; b=ZEGywmfvaWguh4BsfkiupXVyen4z61kmXwK/cL0pyij33tgwp+9V7xPDAcLsqX6obM xznV0uoJdjRP2fA4DZ1mMsqKyHnTE8/Hpvrbz5mCY2QSHLMok+My68EN3eze8Z4g5oyX VWTkC0kjg0gKQI1gDLFHDf0pKXb8Qt2XJ8Tas= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc:content-transfer-encoding; bh=CtT/qqpBDtDYV5SCwsHW3XRyb3rTvc2XDcjz0MH1FfI=; b=ntu09vXN2adZ5LpSUA2sGXX1TzuJ8tTim1B61XJ2KU9M/rduTSFO3UlkG77vpOUsLL 99cvi2UHaRWMkxK9gp62Aa81VQE0dXq1HF72mhrkpE9779InsR9RdWA/eLZyANZvNMgy Qa6uZNCHI6xfC5/3TOqzwfw9DvKl9cZEDY44aZu4owdwMJohnntZP/2+6Q9aUKhjosjY 3JmSDmOkkttvJHw2vcdZcvOogVlJ8t3y3cws9tFOk+yYUexINA/E4Z1mD9mA8lRHOQ/m fvVHETRQlcYUBOn3/nw4190K0P+hyFwKow7nyiIYJJqF4PmFHVOmISnEkUMju9Q3a2oz aftg== X-Gm-Message-State: AMCzsaXDbHOwCo1P7Q2Re3m1+yc7J7pDT3oJyc5mC0a2aGB9QMsAbgaP P3BgRUc8+a2EENi00CFWT1IqZZGk+M/qCjHp2b/0rQ== X-Google-Smtp-Source: AOwi7QDy9JgxlT/WxfF9uur9KBHoh3DzX/byi35Rvd2oLeXcY9p4EoTWohVx9ZSZKmD8Js5Pv2cdQ92G6W+5W4jCGNM= X-Received: by 10.107.142.72 with SMTP id q69mr39451iod.79.1507125265419; Wed, 04 Oct 2017 06:54:25 -0700 (PDT) MIME-Version: 1.0 Received: by 10.107.152.18 with HTTP; Wed, 4 Oct 2017 06:54:24 -0700 (PDT) In-Reply-To: <0C09AFA07DD0434D9E2A0C6AEB0483103B97E44C@shsmsx102.ccr.corp.intel.com> References: <20171003171727.5641-1-ard.biesheuvel@linaro.org> <0C09AFA07DD0434D9E2A0C6AEB0483103B97E276@shsmsx102.ccr.corp.intel.com> <74D8A39837DF1E4DA445A8C0B3885C503A9CE19A@shsmsx102.ccr.corp.intel.com> <0C09AFA07DD0434D9E2A0C6AEB0483103B97E44C@shsmsx102.ccr.corp.intel.com> From: Ard Biesheuvel Date: Wed, 4 Oct 2017 14:54:24 +0100 Message-ID: To: "Zeng, Star" Cc: "Yao, Jiewen" , "Ni, Ruiyu" , "edk2-devel@lists.01.org" , "Dong, Eric" , "leif.lindholm@linaro.org" Subject: Re: [PATCH] MdeModulePkg/UefiBootManagerLib: don't ASSERT on 'BootNext' varname X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 04 Oct 2017 13:51:05 -0000 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On 4 October 2017 at 14:49, Zeng, Star wrote: > Creating Boot000@ with gEfiGlobalVariableGuid can not succeed as it will = be > rejected by MdeModulePkg/Library/VarCheckUefiLib/VarCheckUefiLib.inf that > will check the VariableName against UEFI spec =E2=80=9CTable 13. Global V= ariables=E2=80=9D > if the VendorGuid is gEfiGlobalVariableGuid. > > > > I would suspect there is a bug at other place if the code ends up calling > this function(EfiBootManagerIsValidLoadOptionVariableName) on L"BootNext"= . > That still does not mean you should ASSERT() here. The state of the variable store !=3D the internals of the code, and so it should be considered external input to some extent. ASSERTs are meant to catch programming errors, not errors in the varstore image. > > Ard, > > Is the fix urgent or not for you? > Not really. But fwupdate is shipping as part of many distros, so I guess others may run into it as well. > I may want to wait for Ruiyu=E2=80=99s back to take some look at the deta= il of it. > That is fine. > At the same time, you may help check the code flow in some detail if you > have free time, I think that will be helpful. J > OK.