Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp3224imu; Thu, 8 Nov 2018 12:50:14 -0800 (PST) X-Google-Smtp-Source: AJdET5cDj3NvnQFsysDips5UmoUtyoYv8QSxXdN0tdhXPNJ6rxKOE18KMDnd025ox+poUyq3r+Yq X-Received: by 2002:a62:2ec3:: with SMTP id u186-v6mr6066157pfu.189.1541710214857; Thu, 08 Nov 2018 12:50:14 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1541710214; cv=none; d=google.com; s=arc-20160816; b=AaQRj9s3HJ1W+inh7Oqs3H8pLK6q3EMg4duVg/ZeYht74OkSSmvRb4a9yC0hGVBgg+ A/v1alhMJQm00T4FqTKFQ8YmWKGVOliWOM95iKXehQcN2HQZL8GqrchKBJFyRmdWAhkQ +kSidqzHH9ixdznXV2502znYCQnWpcvbn6O5oWNshwEHFyGeVE5IFzkqpGSAhfKDVbqM /y2BHL/gt6/uBuOcpeC0oBszXuwKGV54yARMaQbuqip4it/X+dc7wTfnTj6StT3ksB+k ml57tbLBiIO1zs/qe/6ZIDDGPdiaqwMgZ79o1BEiE4LrU69WkKUKLTog53dTaC3cQKQx JT+A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:date:cc:to:from:subject:message-id; bh=rALZlhYpTn9Nl9o6+0HisKPyJpjsTDto2EcH8R2riOY=; b=Jkdu4gZPGp5rUnMCdRb+/5Or1cNcs4F37+fkr+tuFNF/cQi8wFisebd1yZ7Os88bpL IOfy+9B4RtHYO/3OaSpvYalATwWQ8CRpAnkjAm/MQbPH9xFtBzwYm7G5/gJZYywssFin vNLmaQ9EhxARW6eqsnDIPKler5PEq4tfn2s54XwGvUM6IlZ67R+xNlx3kaPWUMRqBr8x qLb9Rlmi8rA0EkTPNIZNnz4Fhnnkl5HRTj6SPtob8HzN26wKeg3ThpVJdpyU8kZUFfSU CGjw3dDL3aF5IAAqjyx5hyLIQCTyp/NPr25+yKp17yo3PQrxlbLOLpw6FebFG4IkgWO5 cLXA== 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 97-v6si5395604plb.403.2018.11.08.12.49.52; Thu, 08 Nov 2018 12:50:14 -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 S1727316AbeKIG0N (ORCPT + 99 others); Fri, 9 Nov 2018 01:26:13 -0500 Received: from mout.gmx.net ([212.227.17.20]:40853 "EHLO mout.gmx.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725882AbeKIG0N (ORCPT ); Fri, 9 Nov 2018 01:26:13 -0500 Received: from dhcp-41-57.bos.redhat.com ([66.187.233.206]) by mail.gmx.com (mrgmx101 [212.227.17.174]) with ESMTPSA (Nemesis) id 0MCxfb-1gCqjq0CjD-009j64; Thu, 08 Nov 2018 21:48:41 +0100 Message-ID: <1541710117.12945.3.camel@gmx.us> Subject: Re: [PATCH] efi: permit calling efi_mem_reserve_persistent from atomic context From: Qian Cai To: Ard Biesheuvel , linux-efi@vger.kernel.org Cc: linux-arm-kernel@lists.infradead.org, linux-mm@kvack.org, linux-kernel@vger.kernel.org, marc.zyngier@arm.com, will.deacon@arm.com Date: Thu, 08 Nov 2018 15:48:37 -0500 In-Reply-To: <20181108180511.30239-1-ard.biesheuvel@linaro.org> References: <20181108180511.30239-1-ard.biesheuvel@linaro.org> Content-Type: text/plain; charset="UTF-8" X-Mailer: Evolution 3.22.6 (3.22.6-10.el7) Mime-Version: 1.0 Content-Transfer-Encoding: 7bit X-Provags-ID: V03:K1:sr6VZ7qbDoJ2AdeKbKLrFYcoKiJouBM9InoiVlNox5/nUwkL7om taCpf2Jb8pmsUgPYLb9yqgQBsq7rTFoEB0FPNpPOxf8DOJTEPj7YH7Un6bos+F65el/DGzj 3l187puWW25oshIUHN8ImM2yrDYpxAAORO1KfiTlKcIibAu5uu45vCIJ1EKtSRtpw7rQ9Jf 78thHQVlyLLv2CsNQSFwg== X-Spam-Flag: NO X-UI-Out-Filterresults: notjunk:1;V01:K0:lC74UsjpE4A=:rFgNm/19xpgNkFhRL7zTq4 iFogGwo5j8uPghuj0EHriyyEUbv76cMzN2VYswepoIn6emtPl7ASGmI/IDtY8T3m+xLywPnWD XEqQxOIOB5bF7Li0XvXzO+X9idToftEn+rAfALK+Y1uNbi09YEJFu+pJmBja6DyFMD5gZa6kQ +6feZ0T2gPs4FgJNSe/RXSqN3glXvRtNDAyZFlT8GaZyR1X4NM4OvmHtgMP2vlalNDEs3g5sF UqLxn87tiLVw5CvaEJeO2dZQYlnZ2UylxVRvv5G+///oh/O/Zbqz6w7xkOWtUC2OZ4dd1iKDO G0n+XvYh5AQF6i7uCkJrhuPmsCKUfAZg5L8nM1ClBsuLxqqK69v3AjPmKRx/+MXM5hVj6gA17 s7a2mspVlM13/TFDGdL5Og+liJzXVWlSXYZ1j6M7EzSlQdaacFpKESAzIb/jkyt4LlvEPKDlt ziQ/vcmRmW0wF6otxIjxk7guNAA8ymxe7VIZB3iwSNTb7iptGA/I2OAelqZ5ZLTrnAmKZxMG9 INWrNUVIy/KtUfY8IxE88mgJUF4fGp4FxeVjnShmqAWCCHm9IBhD2uTH/X43g+HpPLSSVTPrg UbN9b6yJSyMFVqkfvCdAyydexEL2wuz/iPDvhMufAdA8TNFS3z1/x+tOePc6WMUTBFEN1lGVG K+P5HbUIbe08BvsvSs6ZVTTHaMVwpnFIRArCIq2eDVR+GPExbCUH1xIte46abT/KWqGojQ90o rK6JWVKrBP5KzBbaQFl6lv+xW8pvOWxhUYKG2ZCind2htlZn99b9ZDIfznLgCuctEclDAWMz1 qXKjqnRLrd2wmHR/fOAerd8Ew+yKFnM+gvdz4eminyUk2/98xvph3eaFKKlGRJ+yJlavRJGpY fzMapUBLhq5ppPxBwp4OckBC75boBC341VloYMKzDMn4ld7Us/SkmXKbIzDbY1 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, 2018-11-08 at 19:05 +0100, Ard Biesheuvel wrote: > Currently, efi_mem_reserve_persistent() may not be called from atomic > context, since both the kmalloc() call and the memremap() call may > sleep. > > The kmalloc() call is easy enough to fix, but the memremap() call > needs to be moved into an init hook since we cannot control the > memory allocation behavior of memremap() at the call site. > > Signed-off-by: Ard Biesheuvel Tested-by: Qian Cai