From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751065AbeCIK5v (ORCPT ); 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 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 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.