Received: by 10.223.185.111 with SMTP id b44csp176923wrg; Fri, 9 Mar 2018 03:13:17 -0800 (PST) X-Google-Smtp-Source: AG47ELvniYByC2YlQps/6/X+mGr/rDzPmfmOZEUmgWAJ1sjgkcTS0bAkdFASjvpa/KmuNFtUtay6 X-Received: by 2002:a17:902:d682:: with SMTP id v2-v6mr27170493ply.348.1520593997459; Fri, 09 Mar 2018 03:13:17 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1520593997; cv=none; d=google.com; s=arc-20160816; b=GZckRhKS1PHcKxHk5F9OSptVeJWTdyDB62C1oZivIECz9Au0UkQmHB3wUKAn9vZWG4 AdduD7M7oxsiRXac1z4sBeHQras5rzkKC2lI6R13QHW9b39fGQFqdmPQAcJXvbMmyAQd JH3HJ/6MCKyOKxMGrhS0yaUyzuO4EqwnJroD/5JiD/s4SEQTIogtK+LLiSd18CsY+bki Ad7TQ2/73P0R/8BHDr0avpB0VX5HI58SS/7h/6AgFbZmS2GozReljzDdRhjXo1ithMHS 205Vy9uBFs8RpnUp9mA5MTRNE8q6yJk4+o3YCpIgmAVJtV0wWbkVmolS4Wq4fyOHdGO8 TOPQ== 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=WsPSjl4MizUw8yY/bjbHotIVi933TGfY+sYzcJXPfa8=; b=bV5HBh6jU37iabBpe2Baki5LxHn99s5yGl32xtNkCo1jbs/FFK1KXo066UId/pGU7l wZ/WrZb1jGBFPF214RWNQhmCkE27frHEwBELUz901nu9qJXxfvRAwrtqkuo1XIwPgHgf I15Js9zMs5saBFF925zgXZiFC4R2oMBsAUoy9/bOPoKPmlON3OjDICizjXCNjkDwNKdY DK2ZxcE8QTq3bo6DfibT/ap4M6fDbMP/gnImIbBLeSsdwzQjzmIcO4FmNGgkcqMxH3nc le+vpdnWMIPxWj5io3uKjHIc063zJSTOsZ0jn9RxGzJW9bmnrb24Lg25gb135tIkyG6I vgLQ== 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 e190si692144pfe.203.2018.03.09.03.13.02; Fri, 09 Mar 2018 03:13:17 -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 S1751145AbeCILMN (ORCPT + 99 others); Fri, 9 Mar 2018 06:12:13 -0500 Received: from mail.skyhub.de ([5.9.137.197]:52298 "EHLO mail.skyhub.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750966AbeCILMM (ORCPT ); Fri, 9 Mar 2018 06:12:12 -0500 X-Virus-Scanned: Nedap ESD1 at mail.skyhub.de Received: from mail.skyhub.de ([127.0.0.1]) by localhost (blast.alien8.de [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id tsHqW8TGqWvg; Fri, 9 Mar 2018 12:12:10 +0100 (CET) Received: from pd.tnic (p200300EC2BC8ED00596C69A920A9793D.dip0.t-ipconnect.de [IPv6:2003:ec:2bc8:ed00:596c:69a9:20a9:793d]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.skyhub.de (SuperMail on ZX Spectrum 128k) with ESMTPSA id 8FA221EC0136; Fri, 9 Mar 2018 12:12:10 +0100 (CET) Date: Fri, 9 Mar 2018 12:11:57 +0100 From: Borislav Petkov To: "Prakhya, Sai Praneeth" Cc: "linux-efi@vger.kernel.org" , "linux-kernel@vger.kernel.org" , Chun-Yi Lee , "Luck, Tony" , Will Deacon , "Hansen, Dave" , Mark Rutland , Bhupesh Sharma , "Neri, Ricardo" , "Shankar, Ravi V" , Matt Fleming , "Zijlstra, Peter" , Ard Biesheuvel , "Williams, Dan J" Subject: Re: [PATCH V2 2/3] efi: Introduce efi_rts_workqueue and some infrastructure to invoke all efi_runtime_services() Message-ID: <20180309111157.GC10753@pd.tnic> References: <1520292190-5027-1-git-send-email-sai.praneeth.prakhya@intel.com> <1520292190-5027-3-git-send-email-sai.praneeth.prakhya@intel.com> <20180307121047.GG23662@pd.tnic> <20180308140830.GE21166@pd.tnic> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.9.3 (2018-01-21) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Mar 09, 2018 at 02:37:59AM +0000, Prakhya, Sai Praneeth wrote: > But, I guess, we have some downsides with this design: > 1. We are doing this to have "no exceptions to use efi_rts_wq", but we will be making > the common case complicated. i.e. When a user requests to write some efi variable, So if the pstore use case is so important and special, I think we should make the EFI path as fast as possible as getting that data to the pstore is a priority. > Alternatively, instead of playing around with in_atomic(), we could have wrapper > functions like efi_write_var_non_wq() which will only be used by pstore. This function > will not use efi_rts_wq and directly invoke efi_runtime_service. Just an attempt to > make the code not look messy. I guess. If the write-to-pstore case is such a critical one, I guess the exception is justified. > That's true! AFAIK, we don't have any issues handling NMI while in efi_pgd. > We might have issues only when, we are already in efi_pgd, NMI comes along Can you trigger this? Or is it something hypothetical? > and NMI handler tries to touch the regions that are not mapped in efi_pgd If it is not hypothetical, the NMI handler should learn to look at CR3 first and return if CR3 has the efi pgd. -- Regards/Gruss, Boris. Good mailing practices for 400: avoid top-posting and trim the reply.