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=-15.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,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 0BD2AC11F66 for ; Tue, 29 Jun 2021 07:57:09 +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 E99DC61DBC for ; Tue, 29 Jun 2021 07:57:07 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org E99DC61DBC Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=linaro.org 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 EF6E882FC5; Tue, 29 Jun 2021 09:57:05 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (2048-bit key; unprotected) header.d=linaro.org header.i=@linaro.org header.b="lQ0iB+ui"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 9ABA283117; Tue, 29 Jun 2021 09:57:04 +0200 (CEST) Received: from mail-wr1-x430.google.com (mail-wr1-x430.google.com [IPv6:2a00:1450:4864:20::430]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id 425A882EF4 for ; Tue, 29 Jun 2021 09:57:01 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=ilias.apalodimas@linaro.org Received: by mail-wr1-x430.google.com with SMTP id u8so11342605wrq.8 for ; Tue, 29 Jun 2021 00:57:01 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=uB6XbMt4KcIcmugxWJCmFql7N66NXTVwejM8foCloQ8=; b=lQ0iB+uiYQeRND5snFgViIl2lkjRu4+POM1DjNxyrUcsUHNIwmu39MsmuMiW3xim9c nHCqv5DYyNKJ8I4PATMAECVuQjgFNrCL+CDLvjxRTE1sAgxPRL1FmAO2fGhRKN064eoT lM5b3gi/6o13L+C878j51ttoN7UpT24BaOZATeo0auPGZXOpLvQjdC11Dqt1YZsslccU Ih4dYe+EllQv2c7Hm2KZ3wrJIQ/xp/Vb67Jd5xKHS+wqHEdvKWXPfYUZtnY3hd8KFs1U M6kHNSncs83RiuB7UGPvhAGzSrTz8wgpVk3ytmHqDGBjnrS69vgg/KFDAlT/BGONh7I4 vlnw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=uB6XbMt4KcIcmugxWJCmFql7N66NXTVwejM8foCloQ8=; b=m5chqbg6KIOEOHXG5a7diZPTi2qlb4pu7S+yvzI3bEJhNV8kEdHG/Gbs+XDaIe6g0n F56LeO2dDNhXestcrrlb0iOyXrFSOydNDzi/N3VNnwILyRL14gu1+13Yflk2IP67pbwk 2jh5cd8R4DFdWqIe65/EJ7xjCM40rNEu0WdvNRsr1hL4O8VOvQ0w/h6oRhPcxzH59gpQ 39EVQrrUJVMCspCrycZgK4IeQZtgkPvBPjr+vv6flJifcQ907bixZBAhKwlb8R7OKZSr TKu7zhJy2sDCz/D/mTb6Y1c+XVla6FzZJOMuLV9ekPSNf9qF9VzQo3Vza7Z59p0zSKPj 8Oqw== X-Gm-Message-State: AOAM5314lHcvQBtLZggCLBqR8dGhraUC9retA5SCpbZvmCYyxzAGfKAi yNDm4bjnw+9/LA5XQSs/0PJG+w== X-Google-Smtp-Source: ABdhPJxp6xzgkPsSaAcMU0FyDc/LF0FZr+pfnJ/7N01SGZgGd4/krhNo/77oRcK3YgG8vWsAuZCQug== X-Received: by 2002:a5d:43d1:: with SMTP id v17mr18631497wrr.118.1624953420860; Tue, 29 Jun 2021 00:57:00 -0700 (PDT) Received: from enceladus (ppp-94-66-243-100.home.otenet.gr. [94.66.243.100]) by smtp.gmail.com with ESMTPSA id t9sm10170983wrq.92.2021.06.29.00.56.59 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 29 Jun 2021 00:57:00 -0700 (PDT) Date: Tue, 29 Jun 2021 10:56:57 +0300 From: Ilias Apalodimas To: Heinrich Schuchardt Cc: masami.hiramatsu@linaro.org, takahiro.akashi@linaro.org, pbrobinson@redhat.com, richard@hughsie.com, Alexander Graf , u-boot@lists.denx.de Subject: Re: [PATCH] efi_loader: Allow capsule update on-disk without checking OsIndications Message-ID: References: <20210629045552.22372-1-ilias.apalodimas@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: 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 > > + if (IS_ENABLED(CONFIG_EFI_IGNORE_OSINDICATIONS)) [...] > > + return true; > > + > > + size = sizeof(os_indications); > > + ret = efi_get_variable_int(L"OsIndications", &efi_global_variable_guid, > > + NULL, &size, &os_indications, NULL); > > + if (ret == EFI_SUCCESS && > > + (os_indications > > + & EFI_OS_INDICATIONS_FILE_CAPSULE_DELIVERY_SUPPORTED)) > > The bit EFI_OS_INDICATIONS_FILE_CAPSULE_DELIVERY_SUPPORTED must be > cleared in OsIndications after successfully applying the capsule. See > related patch Yea I noticed that as well while I was coding this and meant to sent a patch afterwards. You've already done that,so let me go have a look! > > [PATCH 1/1] efi_loader: fix set_capsule_result() > https://lists.denx.de/pipermail/u-boot/2021-June/453111.html > > Reviewed-by: Heinrich Schuchardt > > > + return true; > > + > > + return false; > > +} > > + > > /** > > * efi_launch_capsule - launch capsules > > * > > @@ -958,20 +985,13 @@ efi_status_t __weak efi_load_capsule_drivers(void) > > */ > > efi_status_t efi_launch_capsules(void) > > { > > - u64 os_indications; > > - efi_uintn_t size; > > struct efi_capsule_header *capsule = NULL; > > u16 **files; > > unsigned int nfiles, index, i; > > u16 variable_name16[12]; > > efi_status_t ret; > > > > - size = sizeof(os_indications); > > - ret = efi_get_variable_int(L"OsIndications", &efi_global_variable_guid, > > - NULL, &size, &os_indications, NULL); > > - if (ret != EFI_SUCCESS || > > - !(os_indications > > - & EFI_OS_INDICATIONS_FILE_CAPSULE_DELIVERY_SUPPORTED)) > > + if (!check_run_capsules()) > > return EFI_SUCCESS; > > > > index = get_last_capsule(); > > >