Received: by 10.223.185.116 with SMTP id b49csp1001810wrg; Sat, 3 Mar 2018 12:41:34 -0800 (PST) X-Google-Smtp-Source: AG47ELvdscwWKf5BxYo6ETNtY3hYhgFpkU7xGrHtUG9mFhO4ZdaTJJVO3uJ4ibMdZLXJ6ruxWJ9U X-Received: by 10.99.117.76 with SMTP id f12mr8265913pgn.410.1520109694196; Sat, 03 Mar 2018 12:41:34 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1520109694; cv=none; d=google.com; s=arc-20160816; b=PeGOurIYYG1Q9O7NmOBraWIfFS3QymFojTeRxQzkNLmpSgjEH3+ncZhpf2phQ+bhBa vlMErlLbKRkDIA9+6S1JOhMy9P0SyW9uFnbOVJox/zIGo1qSiXY7uFeEdN1Kkl25m1Gc FyjubyGTocYSu9Eo81B/NN4ANk/SINSDbd8spQeGBmr6c/diOWz0JJnH8t+VUpyyY3dW taCFKrlFdlUp2HLfp/NeI8A0TSaylvmnOYlR4iqfmy/Z7P4W/LylfZARLY8vPNekYfe2 BB7l7fZ6AbD6BfR1e54OUzsMRZWqA+a+t2/VfF9aOESEjx56+e8A6DWWZnPrT+SH4eFh iQaQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :references:in-reply-to:mime-version:dkim-signature :arc-authentication-results; bh=pKquj6Wbs8vP1uJlDVBAJ1Q/x7MdWMhwunqlvoVVz4I=; b=QXLZnUoLaA1TuOmo8Mc0BBnhlMJNDi+Lh+NPQLc3vmBrsUfvHh+lie9ua/QYs9/TJf cwdap3AB0N9F67g3tVJoezZY22rVPRQxNnf+nwk/2tgRDUPc6n8WJ0Kd2qpA09Ijl+hm Zda6sjEEd9LkD9atw4f0CmUTPRkf40aTmmkVowIxTQwHCQOYIa6389PnjgcssM4yor/B 6UJ7Tm10HiWVDSBFIfXXbciz+yArRM0lOb8QVj3WjvTFkI8Wwom1fQtYCSxOc71QqpHX 2NzlfExiH6vZZOSihU7Gf734569TO6uinytz0kaSZfambyCYqp4wn9IZn80fryLfjYb+ iRsA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=WT+lhxsV; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id v5si7306127pfl.205.2018.03.03.12.41.07; Sat, 03 Mar 2018 12:41:34 -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; dkim=pass header.i=@linaro.org header.s=google header.b=WT+lhxsV; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752318AbeCCUkF (ORCPT + 99 others); Sat, 3 Mar 2018 15:40:05 -0500 Received: from mail-io0-f194.google.com ([209.85.223.194]:35322 "EHLO mail-io0-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752175AbeCCUkD (ORCPT ); Sat, 3 Mar 2018 15:40:03 -0500 Received: by mail-io0-f194.google.com with SMTP id 30so14093714iog.2 for ; Sat, 03 Mar 2018 12:40:03 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=pKquj6Wbs8vP1uJlDVBAJ1Q/x7MdWMhwunqlvoVVz4I=; b=WT+lhxsVx8wqulu1H05MfJPA3QunrQ+etDgRfbNG0WOOZmXRJrcscEVh4Zpywa83QY LwT2+1xGO7DFG1BRLCzlc5Hy3p4h0g63osbD3dfBGDLC38rxQ9GGpMgqziouCJ85pdpv EohdZOSnMriZUN0H1coUA7bQPUVapHele9sos= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=pKquj6Wbs8vP1uJlDVBAJ1Q/x7MdWMhwunqlvoVVz4I=; b=ftasxgRdM29F69k4TpscNGZ6Xq3n50c3m6HGYQUuNuienbZJPOCfKAj0/ic5dzpTjU tiuXTF/l11KiRoHZBxELxvdF94zrTHiFRnb9vGAlMB98pMKh1JiOcIlZ6XtvPnuXsLq6 qw89P53bEwTRNnCMgozu78FE/fBPWWIEhZAxD/xyji8KooFy7w9ZSiCcvhmNZuRpHPvj VHg4Eb0WvsMpDS3vB4jGmydYaSG7aPNlxwvOkZ3k3h/yC3rJn/sDg43vgytXUXrKmm9I k8i8XxD+o1vrBvFiRp/RIlLuBfpLASwjqIQsDsaExYpKme3WhGAtqLNpupo+347oNj4b ZVwg== X-Gm-Message-State: AElRT7FHnLJmxF/y6agL9SbEemQP58iWuR1HZKUmUWtm3lviaZQL3Mul q4THvohObvlkRE4WkSIg26YPGIXH40QgLei+0yrdzA== X-Received: by 10.107.56.69 with SMTP id f66mr10757673ioa.170.1520109603171; Sat, 03 Mar 2018 12:40:03 -0800 (PST) MIME-Version: 1.0 Received: by 10.107.138.209 with HTTP; Sat, 3 Mar 2018 12:40:01 -0800 (PST) In-Reply-To: References: <1516309264-23926-1-git-send-email-sai.praneeth.prakhya@intel.com> <20180126211643.GB6520@codeblueprint.co.uk> From: Ard Biesheuvel Date: Sat, 3 Mar 2018 20:40:01 +0000 Message-ID: Subject: Re: [PATCH V4 0/3] Use mm_struct and switch_mm() instead of manually To: Matt Fleming Cc: Sai Praneeth Prakhya , linux-efi@vger.kernel.org, Linux Kernel Mailing List , "Lee, Chun-Yi" , Borislav Petkov , Tony Luck , Andy Lutomirski , "Michael S. Tsirkin" , Ricardo Neri , Ravi Shankar Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 29 January 2018 at 10:51, Ard Biesheuvel wrote: > On 26 January 2018 at 21:16, Matt Fleming wrote: >> On Thu, 18 Jan, at 01:01:04PM, Sai Praneeth Prakhya wrote: >>> From: Sai Praneeth >>> >>> Presently, in x86, to invoke any efi function like >>> efi_set_virtual_address_map() or any efi_runtime_service() the code path >>> typically involves read_cr3() (save previous pgd), write_cr3() >>> (write efi_pgd) and calling efi function. Likewise after returning from >>> efi function the code path typically involves read_cr3() (save efi_pgd), >>> write_cr3() (write previous pgd). We do this couple of times in efi >>> subsystem of Linux kernel, instead we can use helper function >>> efi_switch_mm() to do this. This improves readability and maintainability. >>> Also, instead of maintaining a separate struct "efi_scratch" to store/restore >>> efi_pgd, we can use mm_struct to do this. >> >> FWIW this series looks OK to me. >> >> Reviewed-by: Matt Fleming > > Thanks Matt > > I know the x86 guys have been rather busy lately, so I will give them > some more time to respond. If there are no objections raised, I will > queue it for v4.17 in a couple of weeks. Queued in linux-efi/next Thanks all.