Received: by 10.223.185.116 with SMTP id b49csp6353571wrg; Thu, 8 Mar 2018 06:10:15 -0800 (PST) X-Google-Smtp-Source: AG47ELsiuASuZMQcLsXhcd/eBwjM3udEfcJu2RKFF2JX+FvJK6h3GY2JJQRXvYZd2M9QhHhq8P5v X-Received: by 10.99.51.74 with SMTP id z71mr20906157pgz.272.1520518215168; Thu, 08 Mar 2018 06:10:15 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1520518215; cv=none; d=google.com; s=arc-20160816; b=K2OY5m10x3a2BE+zbRn/a8MWlGMQm16UdN8DvQIoUhk+Eec6LZJ3wa2T5NwKsP5LIa fKn0v6hrXL2360/83Gr/n4I4Sq+u+0YVsBVblVNWgx/EPgAj7LQ2uikZh5Vb4bijENbU oI6sIEYrbSV0PDiaHXrvDkzBnbNzmULJQj/IOO2GlGJ12hc/R1R6Wi/YKKkH1Pt6t5cs 4/UChtuRD2iqSTJk3wzoLUFkSqn2vJpVeQ20RaYEiEGkY0B5kZGLh3xU1b8B7w2ODVqd YLwIjVv0avlMoHMwox7+wCnh87zsA6pDD1MbFTdYAAVNqjxvf64wUjf7JenIcscllUTx kjzA== 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=nUZfzk2rQutg68jG/h4Q0WSIby2yZa8ZzWIDuxpf7cg=; b=paO4Au8CUWo6pxRHtlLXqgpUMGQkYhXv8u0eSZfvvngUMp/2gYVLyLZqvbrvfs17KF RXfpVogfXvoYUAZf6JDNW8fYRelXD32RtDMouclXzWEplXBRf/TTs4/deIK8EhZ0933B OPkilGh44HesCu4NcUJ2lbtaxjfvzv8vifwCsZg3LNDEZD1eXqrdC5uNhqsq04+2/iXp 7ENRYIBzuNBQUvUOQ25uJLfd+Cm4TTQf1mAJmEhMdIwdSWPqhHvTw2JHEY9NGSk13pyR TrHuwno3rU8F25bVJwkVVkMXBbetD9QyxC2Tw/k8yGMJBqBJPXlMfyBcGPfT7VW1U9Np e72Q== 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 m2si13164781pgt.56.2018.03.08.06.10.00; Thu, 08 Mar 2018 06:10:15 -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 S1755949AbeCHOIq (ORCPT + 99 others); Thu, 8 Mar 2018 09:08:46 -0500 Received: from mail.skyhub.de ([5.9.137.197]:34942 "EHLO mail.skyhub.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755027AbeCHOIo (ORCPT ); Thu, 8 Mar 2018 09:08:44 -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 DxTgAUrfMF_h; Thu, 8 Mar 2018 15:08:43 +0100 (CET) Received: from pd.tnic (p200300EC2BCABE00714350A890E11291.dip0.t-ipconnect.de [IPv6:2003:ec:2bca:be00:7143:50a8:90e1:1291]) (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 55AE81EC00FF; Thu, 8 Mar 2018 15:08:43 +0100 (CET) Date: Thu, 8 Mar 2018 15:08:31 +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: <20180308140830.GE21166@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> 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 Thu, Mar 08, 2018 at 05:31:03AM +0000, Prakhya, Sai Praneeth wrote: > Another warning by checkpatch is "use of in_atomic() in drivers code" I'm assuming it warns because you're touching files in drivers/ but the efi fun is not really a driver... But looking at patch 3, that thing looks like a real mess. Some of the things - pstore, it seems - do stuff in atomic context and yet you want to do efi stuff in a workqueue which doesn't stomach atomic context to begin with. So if you wanna do workqueue, you should make sure all efi stuff gets delayed to process context and queued properly. For example, we log MCEs from atomic context by putting them on a lockless buffer and then kicking irq_work to queue the work when we return to process context. Can you do something like that? "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. Then this: > A potential issue could be, for instance, an NMI interrupt (like perf) > trying to profile some user data while in efi_pgd. I can't understand. How did we handle this until now and why is it a problem all of a sudden? Because I don't recall being unable to run perf while efi runtime services are happening. -- Regards/Gruss, Boris. Good mailing practices for 400: avoid top-posting and trim the reply.