Received: by 10.223.185.116 with SMTP id b49csp42421wrg; Tue, 20 Feb 2018 15:31:04 -0800 (PST) X-Google-Smtp-Source: AH8x225Bm94T26rmg4JPYvIVrXqJk/2uE9e36SUVZYXQZupEH7e0vCw5MCX4ysdsKu1sgkv+cmMa X-Received: by 10.101.75.140 with SMTP id t12mr1061682pgq.442.1519169464486; Tue, 20 Feb 2018 15:31:04 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1519169464; cv=none; d=google.com; s=arc-20160816; b=mTt2mEa+lPBOSMqzjjup8wrkSLTI5VtUt5Ak3Yr72KMVnYRh1KUo0MIOcN0ysYN6vF ZGfFyFnIoiBFce8qohNFJYoBDMEN/RxT+D8NlYx9T0c+WaaL/ojD3udKlndAWec/30fs v88tWlaNWtpCCrTVY8Iipyh/1XTYoosJ7oD7FBNaMgo76Z+l7mgCkYFOfpu+sFzH4AUE vuc4kDXwerUkfio8zE7cOAQKzAF5GMS07SprsSG81LHZLmoVIoIoFSYVti7KcvdXfycN 8OyHYuMI15X+S+Xyss/MyPXHCTiBVf78khZpGkxetT0K+H5hliMJViwvVKUge81C27CL lgKg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:arc-authentication-results; bh=B+V5kYFS/dRfL4LanX9Jc2jyuhhEQCW/XTRJEwcsjpA=; b=nnlHBwQJuqh/XQgSDIUFK3OCNC5DovweXjxdzi6UXCfx9/oVTE6guhyxNm70K0E+q0 1L0+2Fu7xl2NHwOiL1svqDQJaGQjezsDJjtceyId1XR0EuDqCRInaWCmBN/oKLjYdX1E Eqg297r7QaMCOPk3H7zr14IrxOUn7W7P6b+axK9Civ1v1ArnFV12ZvT3tcYcHYqx4dG8 VBF1+DFoTtCY2wh7ZvDCcIx+myFacMFqR6Q8fY/ufhonN9MAsHGtBTG4xETAn6HLqLlo MPXdg6KeY4sU7Syb67ajfjIROQsidnIbJxj+RH4li2ErMP3VQ5FwwttT2fpzorrnKyv3 oipA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id y92-v6si8279919plb.137.2018.02.20.15.30.49; Tue, 20 Feb 2018 15:31:04 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751994AbeBTXaO (ORCPT + 99 others); Tue, 20 Feb 2018 18:30:14 -0500 Received: from mga12.intel.com ([192.55.52.136]:9028 "EHLO mga12.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751860AbeBTXaN (ORCPT ); Tue, 20 Feb 2018 18:30:13 -0500 X-Amp-Result: UNKNOWN X-Amp-Original-Verdict: FILE UNKNOWN X-Amp-File-Uploaded: False Received: from fmsmga007.fm.intel.com ([10.253.24.52]) by fmsmga106.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 20 Feb 2018 15:30:12 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.46,541,1511856000"; d="scan'208";a="19059857" Received: from agluck-desk.sc.intel.com (HELO agluck-desk) ([10.3.52.160]) by fmsmga007.fm.intel.com with ESMTP; 20 Feb 2018 15:30:12 -0800 Date: Tue, 20 Feb 2018 15:30:09 -0800 From: "Luck, Tony" To: Linus Torvalds Cc: Joe Konno , linux-efi@vger.kernel.org, Linux Kernel Mailing List , Ard Biesheuvel , Matthew Garrett , Jeremy Kerr , Andi Kleen , Matthew Garrett , Peter Jones , Andy Lutomirski , James Bottomley Subject: Re: [PATCH 1/2] fs/efivarfs: restrict inode permissions Message-ID: <20180220233008.55rfm7zw62hrao5p@agluck-desk> References: <20180215182208.35003-1-joe.konno@linux.intel.com> <20180215182208.35003-2-joe.konno@linux.intel.com> <6680a760-eb30-4daf-2dad-a9628f1c15a8@kernel.org> <20180220211849.fqjb6rdmypl6opir@agluck-desk> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: NeoMutt/20170609 (1.8.3) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Feb 20, 2018 at 02:01:51PM -0800, Linus Torvalds wrote: > And just on general principlies, I don't want to see weasel-wordy > commit messages like > > "Reading certain EFI variables trigger SMIs" > > I understand *writing* them causing SMI's due to some flash protection > scheme. What's the reading thing? And why aren't we calling that > garbage out? Too much weasel there. Should say: EFI[1] stinks. Reading any file in /sys/firmware/efi/efivars/ generates 4 (yes FOUR!) SMIs. # rdmsr 0x34 14e2 # cat /sys/firmware/efi/efivars/ConIn-8be4df61-93ca-11d2-aa0d-00e098032b8c > /dev/null # rdmsr 0x34 14e6 -Tony [1] I didn't dig through the Linux code to check whether we manage to get those four SMIs from a single EFI call, or whether we make multiple EFI calls to open/read/close one file. It is possible that we stink a bit too if we are doing more EFI calls than required.