From patchwork Thu Oct 19 21:23:50 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alexander Graf X-Patchwork-Id: 116441 Delivered-To: patch@linaro.org Received: by 10.140.22.164 with SMTP id 33csp953828qgn; Thu, 19 Oct 2017 14:23:58 -0700 (PDT) X-Google-Smtp-Source: ABhQp+TCdAJlnjuj0hupcoqOd5PoCRLit52fHH/entC3ScJHOy2nCisR+lnnw68cOMqMjUPHY5Ep X-Received: by 10.80.170.46 with SMTP id o43mr3974905edc.40.1508448238575; Thu, 19 Oct 2017 14:23:58 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1508448238; cv=none; d=google.com; s=arc-20160816; b=E1waDrxU25hyfwr0li90RW+/yVQL4tKFLtEdQFEbPhlea7+ymFyKyi5QxDK4kLKSgF qEbVtDj93ZCTEGOTFnfkE4FZoXRmhJ/KdL8CXza/lc3ro0rknMb+Md0qevKixp1AI0Ed 0CW+YUJ9XCpB+tkq8BPm4awzCmK0CljLQhJHA51RaQs83CFPs8l1zxMbLnI0ryM4ZP6z a6SstjZIHjSJ35nYz52QsdCl+ifsSs4j+ovtBCarCl/o0O84JUJYE9Z/IEfrzW7S+nfV 6+DNXmf89Z8WN4KN/hjqWFXUUNeu+xlXalPhM07VazBGrb3cS1ObGvyuizDnbbAtePyw pJsg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:content-transfer-encoding:mime-version :list-subscribe:list-help:list-post:list-archive:list-unsubscribe :list-id:precedence:subject:cc:message-id:date:to:from :arc-authentication-results; bh=KSFQTbqQebTxQ0DI/cf3Kv8oeb4AX49/J8xFf+2lgTQ=; b=FDhUm/prT1XIrq2hjuyWJeVFS5Fi1yxf/FhfGkL6YtfbogNRL5i6Pg2DW/fBwiQMu9 Nsl3XoAwHYOcvy9j58l23a5impH3rmsx0xYfr61nd0Gmil2aFsxh/Dm7dFUAL3mWib6p cQUMjprtiwegEovMZDPycgGPUsjh2AXgDiUGvFoW/2KfwcCQlv3N6NhDuFsxScD7xvaU BwYwGqqtt9LIyqqVijbzhyVtw3Sq8c5FmziZHIDFyPBA4f1k2TUukGmHN7Qzw1uTQl3f 6WfTGvdN22vda1tnW7EPSopCtutf4hcou5TAZBp8GbnOeUGWNgeXnc7t3c47SLLRnXaC zK9Q== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of u-boot-bounces@lists.denx.de designates 81.169.180.215 as permitted sender) smtp.mailfrom=u-boot-bounces@lists.denx.de Return-Path: Received: from lists.denx.de (dione.denx.de. [81.169.180.215]) by mx.google.com with ESMTP id k18si1774873eda.24.2017.10.19.14.23.58; Thu, 19 Oct 2017 14:23:58 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of u-boot-bounces@lists.denx.de designates 81.169.180.215 as permitted sender) client-ip=81.169.180.215; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of u-boot-bounces@lists.denx.de designates 81.169.180.215 as permitted sender) smtp.mailfrom=u-boot-bounces@lists.denx.de Received: by lists.denx.de (Postfix, from userid 105) id 12BF0C21F8A; Thu, 19 Oct 2017 21:23:56 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on lists.denx.de X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=none autolearn=unavailable autolearn_force=no version=3.4.0 Received: from lists.denx.de (localhost [IPv6:::1]) by lists.denx.de (Postfix) with ESMTP id DD3DFC21DF3; Thu, 19 Oct 2017 21:23:53 +0000 (UTC) Received: by lists.denx.de (Postfix, from userid 105) id 4621EC21DF3; Thu, 19 Oct 2017 21:23:52 +0000 (UTC) Received: from mx2.suse.de (mx2.suse.de [195.135.220.15]) by lists.denx.de (Postfix) with ESMTPS id DF7B8C21C60 for ; Thu, 19 Oct 2017 21:23:51 +0000 (UTC) X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (charybdis-ext.suse.de [195.135.220.254]) by mx2.suse.de (Postfix) with ESMTP id 8D4DCABDC; Thu, 19 Oct 2017 21:23:51 +0000 (UTC) From: Alexander Graf To: u-boot@lists.denx.de Date: Thu, 19 Oct 2017 23:23:50 +0200 Message-Id: <20171019212350.73194-1-agraf@suse.de> X-Mailer: git-send-email 2.12.3 Cc: xypron.glpk@gmx.de Subject: [U-Boot] [PATCH] efi_loader: Disable env_save() call on boot X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.18 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" With the introduction of EFI variable support, we also wanted to persist these EFI variables. However, the way it was implemented we ended up persisting all U-Boot environment variables on every EFI boot. That could potentially lead to unexpected side effects because variables that were not supposed to be written to persisted env get written. It also means we may end up writing the environment more often than we should. For this release, let's just disable EFI variable persistence and instead implement it properly for the next one. Reported-by: Heinrich Schuchardt Fixes: ad644e7c182 ("efi_loader: efi variable support") Signed-off-by: Alexander Graf Acked-by: Rob Clark Reviewed-by: Heinrich Schuchardt --- lib/efi_loader/efi_boottime.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/lib/efi_loader/efi_boottime.c b/lib/efi_loader/efi_boottime.c index f627340de4..743b84864f 100644 --- a/lib/efi_loader/efi_boottime.c +++ b/lib/efi_loader/efi_boottime.c @@ -1439,10 +1439,7 @@ static efi_status_t EFIAPI efi_exit_boot_services(void *image_handle, /* Make sure that notification functions are not called anymore */ efi_tpl = TPL_HIGH_LEVEL; -#if defined(CONFIG_CMD_SAVEENV) && !defined(CONFIG_ENV_IS_NOWHERE) - /* save any EFI variables that have been written: */ - env_save(); -#endif + /* XXX Should persist EFI variables here */ board_quiesce_devices();