From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-1.1 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS, URIBL_BLOCKED autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 80281C54FCF for ; Wed, 25 Mar 2020 17:33:43 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 6086320740 for ; Wed, 25 Mar 2020 17:33:43 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1585157623; bh=pphi18T7D1mIuaACHN5g5DSb3sNXUF78jLFaPNjg/FU=; h=References:In-Reply-To:From:Date:Subject:To:Cc:List-ID:From; b=s6M4LuxIj80bfZlLqGUG+SYoesankwWesViCYjkQIulFxupB9wEtjv28XUp0wQqnH vla8qWj+gavl3eKP73fFyfhRUVJjKvjo088axjanQKGhyJ4xCkCdkjnrs68M5SyX7J HBVzI64uqh5Iaw0jJzCAgfUxC8WxPmMZwxZ8pukU= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727695AbgCYRdn (ORCPT ); Wed, 25 Mar 2020 13:33:43 -0400 Received: from mail.kernel.org ([198.145.29.99]:56832 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727320AbgCYRdm (ORCPT ); Wed, 25 Mar 2020 13:33:42 -0400 Received: from mail-wr1-f44.google.com (mail-wr1-f44.google.com [209.85.221.44]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 45D6B20740 for ; Wed, 25 Mar 2020 17:33:42 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1585157622; bh=pphi18T7D1mIuaACHN5g5DSb3sNXUF78jLFaPNjg/FU=; h=References:In-Reply-To:From:Date:Subject:To:Cc:From; b=dBxFoHbT7V49DRyihWtbg6OjE4jYgotPj5t38WAkupzdLoXGYJfmJmRkOVOpsygqR XTa+WAWpwnwBGsmfzThtCd3Lc4NJWKPUovSvYn4zQ2EaD+es9pehj4wJDmCZjj0cTt 9A3TeXbR83EY5Vxew92p8k/QCBtvnNwdhuhvZZsA= Received: by mail-wr1-f44.google.com with SMTP id u10so4226344wro.7 for ; Wed, 25 Mar 2020 10:33:42 -0700 (PDT) X-Gm-Message-State: ANhLgQ0VHfi8xTUQucTlt8cT4W/w4E/jV2h5Zcf7dTVwLv86C9Qbi1UG 1D2BoruxSoVC2gOXWtsCDwkokVmkOIQk+1sgZ5oLIQ== X-Google-Smtp-Source: ADFU+vtx6OAR/Fi7rV5lGb0rQePCkeCAIrRpEVmnbHA2ofmwgacBNg5WhWV1S2kZoRi85Il2hsnPQskuGYBHW8/OEjM= X-Received: by 2002:a5d:4fcf:: with SMTP id h15mr4548116wrw.262.1585157620715; Wed, 25 Mar 2020 10:33:40 -0700 (PDT) MIME-Version: 1.0 References: <20200312011312.70653-1-qiuxu.zhuo@intel.com> <20200320192527.GA31764@agluck-desk2.amr.corp.intel.com> In-Reply-To: From: Ard Biesheuvel Date: Wed, 25 Mar 2020 18:33:29 +0100 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH v6 0/2] Add capsule-pstore backend support To: "Luck, Tony" Cc: "Zhuo, Qiuxu" , Kees Cook , Matt Fleming , "Gao, Liming" , linux-efi Content-Type: text/plain; charset="UTF-8" Sender: linux-efi-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-efi@vger.kernel.org On Wed, 25 Mar 2020 at 16:52, Ard Biesheuvel wrote: > > On Fri, 20 Mar 2020 at 20:25, Luck, Tony wrote: > > > > On Thu, Mar 19, 2020 at 01:53:38AM -0700, Zhuo, Qiuxu wrote: > > > > From: linux-efi-owner@vger.kernel.org On> Behalf Of Ard Biesheuvel > > > > ... > > > > > The following commit on the tip tree removes the variables 'config_table' from the efi structure. > > > > > > > > > > 9cd437ac0ef4 ("efi/x86: Make fw_vendor, config_table and runtime sysfs nodes x86 specific") > > > > > > > > > > But the external driver "capsule-pstore.ko" needs to access 'config_table' and 'nr_tables' to go through the configuration table to extract crash capsules. > > > > > > > > > > Adding 'config_table' and 'nr_tables' back to the efi structure looks like not a good way. > > > > > Do you have any suggestion on how to export 'config_table' and 'nr_tables' variables for the external driver "capsule-pstore.ko"? > > > > > > > > > > > > > I will get back to you on monday about this. In any case, this will have to wait until v5.8 > > > > > > OK. Thanks! > > > > Would it be acceptable to take the first half of Qiuxu's > > function efi_capsule_table_get() and move it into the > > generic efi code naming it something like: "efi_get_table_by_guid()"? > > Then EXPORT_GPL that function? > > > > That sounds reasonable to me. Actually, I don't think this is necessary. The capsule pstore implementation uses a fixed GUID, which we could simply add to the common_tables[] array so that its address gets recorded when we iterate over the list of config tables.