Received: by 10.223.185.111 with SMTP id b44csp162038wrg; Fri, 9 Mar 2018 02:59:00 -0800 (PST) X-Google-Smtp-Source: AG47ELvrhcVoRPcWwk8Z3XIMancdbbHZET07Lzcsj05C1hj37jMX/TXlFuAMffOAMX6MvZwcovkH X-Received: by 2002:a17:902:ac1:: with SMTP id 59-v6mr27207721plp.228.1520593140396; Fri, 09 Mar 2018 02:59:00 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1520593140; cv=none; d=google.com; s=arc-20160816; b=iyHhi//Wj7FPeugGyfcOPNro/CABdkH787VuD8SGrniXnxfFkhu4YIZpPQRtp2ejK2 Kt2xLnOpqDx3ASx5qZOAocLPC/dvrj4hFf6a9PFP3lshmRuE99z/CcNmt3tOjIo8ZLRv pdU+8cn7YFVhWhc5xvG9O+bncjqTzG2kVXzHZhdmaoeQ2wWjBmQJXKPlajRa3KnbiTX+ 1SZrY8uW1dcszLejbLzxFl0+ykd9gtUsenoD3LBKzOBI4o5+g8255wBOwZ0C7kD98IR+ 9ij//+RdhonGQJNcwHjkGPLAHYQfjEdgENgYQETOtfrw6zl4BEcYYMM0XHq9iEbY8NOu fRaA== 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=7gEGmBHSGR796xtSZ9OOgGQKFRIB4S3IRaxXzbEMq4k=; b=iqtT0iDrdQ9YZEn4LouVU7te/DvbPSlgULnwc9yJ290OEQL52eHdkQyD3/mnHlk3jH HmjURtHtDvf6nby1cTuBY5kdWEbu/XYRbjZkOBJziGizaCTjt+bLMwMo6dRh873uOIwo KZcZ3RA4Gjv0+ZSIDmUes3rcxq4HntxQk1SXedLR+525eZBiXVQLGJVfEP2XsykvjDeT jDkU2iNaD8lA4qtxXu3ZBKIlVgcd/Nce3brUlIviMzAphZEodsZT7wh74x6BnLn9DsPX KHpsnLj6tXrjsLMuwmHfrvJ2JAiV9hMk5PQ/TLSXTXceQo3JqkH+GcYeXHWbvmdB6lCy 0jtw== 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 127si558288pgd.561.2018.03.09.02.58.45; Fri, 09 Mar 2018 02:59:00 -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 S1751058AbeCIK5v (ORCPT + 99 others); Fri, 9 Mar 2018 05:57:51 -0500 Received: from mail.skyhub.de ([5.9.137.197]:51832 "EHLO mail.skyhub.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750912AbeCIK5u (ORCPT ); Fri, 9 Mar 2018 05:57:50 -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 fkD2wAh43Hjm; Fri, 9 Mar 2018 11:57:48 +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 6EEB21EC0136; Fri, 9 Mar 2018 11:57:48 +0100 (CET) Date: Fri, 9 Mar 2018 11:57:35 +0100 From: Borislav Petkov To: "Luck, Tony" Cc: "Prakhya, Sai Praneeth" , "linux-efi@vger.kernel.org" , "linux-kernel@vger.kernel.org" , Chun-Yi Lee , 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: <20180309105735.GB10753@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> <3908561D78D1C84285E8C5FCA982C28F7B392450@ORSMSX110.amr.corp.intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <3908561D78D1C84285E8C5FCA982C28F7B392450@ORSMSX110.amr.corp.intel.com> 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 Thu, Mar 08, 2018 at 05:05:44PM +0000, Luck, Tony wrote: > > "Hence, pstore calls efi_runtime_services() without using efi_rts_wq" - > > that doesn't sound like optimal design to me. I would try to shove them > > all through the workqueue - not have exceptions. > > But pstore is trying to save the last gasp dying words from a kernel that > has paniced. There isn't any guarantee that work queue will run. I think > it is reasonable to have some special case to make sure that we do save > the information. But perhaps that special case should be to have pstore > call directly into the guts of the EFI code and not worry about all these > fancy switches of "mm" etc. I guess... > This is true for the machine check logging case too, but the mitigation is > that the details of the error persist in the machine check banks across the > reset ... so all is not lost if the work queue isn't run here. Well, I'm still hoping to have this wonderful and reliable logging facility one day where we can dump bytes into a persistent-across-reboots buffer and analyze them later. And yap, in that case, I don't mind if the code simply bypasses all the dancing in the OS and writes those bytes. Even switching pagetables would be too much for that case - just fire'n'forget writing from ring 0. -- Regards/Gruss, Boris. Good mailing practices for 400: avoid top-posting and trim the reply.