Received: by 2002:a05:6a10:5bc5:0:0:0:0 with SMTP id os5csp3009251pxb; Mon, 1 Nov 2021 06:17:05 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzR++jwum00BH1akgnb3l/riFfwb2jgBHy91cbhqxmgC+UTsgWDYr9eFfU2nTnL1zgT/zWK X-Received: by 2002:a17:907:7d94:: with SMTP id oz20mr12445868ejc.410.1635772625484; Mon, 01 Nov 2021 06:17:05 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1635772625; cv=none; d=google.com; s=arc-20160816; b=FvV0B6oJkN6Ebq1td42cgFvWO0nXiTalBtdS+d68016RSpi2WQkuC8z9k3BiqTEHme MGC12nQ892Jlf85vjCKbjGO7+PCk1CtKyFuekx3kHFrbjfpAYkkGHDXgxeaXMffZM652 K02/oJTZxGpxYi/FzWw8yOFvW0LO/L5THQX7BuUEw4bTIxPNrBf9dOUXtfu2XGkkRnsX M8Xyp0CaRkTRW5O5F52jf2E/LXn0tl1ZWPboXCwcvOemIVrQUQQl0zSsBRmmP91YdcWi jooSUfLLpwvdv1YebShPzPnan2VgAvl1yhY7bRwcLSqdLu1V52XdR6/Dt+v8wpzJTKMY J+tg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date; bh=wDrunDQpu9HOqQ/SCCyzXn/gvSuoYFM4RubY9hKjg1w=; b=ZaSfybwm7x0462FLRvpfq1wK1o9QqVrpDkZPEcsKGpqZVo2dAi+lx3ytvCn+v/+laq 0na+mag/vc+vDxBNTKE/aYQnpGFAsmKcZMUTWwKLY4PH0n91rQMrD3AEDCF8+QvBBRQM LJ0t5O/ivflhIYhkL28lDGcxA9gJuEVLgE4CScRFlIgwb5jBF6g5+nvr1GrMZXFW66Gu FQFymzXBCXm6nQWyMAN9nrixAEkJN43sfJpeVcMkOGNLj4P5N8vX4VN5As9UkOqnPpqG Lh3nwYNh1suVdBiU/WSXws06dHIhgMG6OxA7uEJubB+uFlJI31TBvhUiC8Y0z33uN63l dLrA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id g8si1349432edz.458.2021.11.01.06.16.40; Mon, 01 Nov 2021 06:17:05 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231794AbhKANRR (ORCPT + 99 others); Mon, 1 Nov 2021 09:17:17 -0400 Received: from mga06.intel.com ([134.134.136.31]:60652 "EHLO mga06.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230417AbhKANRQ (ORCPT ); Mon, 1 Nov 2021 09:17:16 -0400 X-IronPort-AV: E=McAfee;i="6200,9189,10154"; a="291848434" X-IronPort-AV: E=Sophos;i="5.87,199,1631602800"; d="scan'208";a="291848434" Received: from orsmga008.jf.intel.com ([10.7.209.65]) by orsmga104.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 01 Nov 2021 06:14:43 -0700 X-IronPort-AV: E=Sophos;i="5.87,199,1631602800"; d="scan'208";a="500034763" Received: from yingze1x-mobl.ccr.corp.intel.com (HELO chenyu5-mobl1) ([10.255.28.120]) by orsmga008-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 01 Nov 2021 06:14:39 -0700 Date: Mon, 1 Nov 2021 21:14:34 +0800 From: Chen Yu To: Andy Shevchenko Cc: linux-acpi@vger.kernel.org, Greg Kroah-Hartman , "Rafael J. Wysocki" , Ard Biesheuvel , Len Brown , Ashok Raj , Mike Rapoport , Aubrey Li , linux-kernel@vger.kernel.org Subject: Re: [PATCH v7 2/4] drivers/acpi: Introduce Platform Firmware Runtime Update device driver Message-ID: <20211101131434.GA32880@chenyu5-mobl1> References: <20211101093320.GA18982@chenyu5-mobl1> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Nov 01, 2021 at 01:21:36PM +0200, Andy Shevchenko wrote: > On Mon, Nov 01, 2021 at 05:33:20PM +0800, Chen Yu wrote: > > On Wed, Oct 27, 2021 at 01:20:33PM +0300, Andy Shevchenko wrote: > > > On Wed, Oct 27, 2021 at 03:07:51PM +0800, Chen Yu wrote: > > ... > > > > > + guid_t *image_type_id = &img_hdr->image_type_id; > > > > > > efi_guid_t ? > > > > > efi_guid_t is a 32-bit aligned guid_t, which is for the case when > > efi_guid_t* arguments are 32-bit aligned. And it is for 32-bit ARM. > > Since this code injection is only for 64-bit, the guid is not required > > to be strictly 32-bit aligned I suppose? > > But the type of that member may not be guid_t. So, I expect not to see guid_t > at all here or as a internal member with the export/import GUID API in place. > > See, for example > d1c6e08e7503 ("libnvdimm/labels: Add uuid helpers") > 8b03aa0e0e5a ("libnvdimm/labels: Add type-guid helpers") I suppose. Do you mean, since the label is not delcared as uuid type, then need to treat the data region as a uuid. But it is actually not a formal 'uuid' type, so uuid_t is not applicable here. And this also applys to the case in this patch? > ... > > > > > + ret = guid_parse(PFRU_UUID, &pfru_dev->uuid); > > > > > + ret = guid_parse(PFRU_CODE_INJ_UUID, &pfru_dev->code_uuid); > > > > > + ret = guid_parse(PFRU_DRV_UPDATE_UUID, &pfru_dev->drv_uuid); > > > > Why do you need to keep zillions of copies of the data which seems > > > is not going to be changed? Three global variables should be enough, > > > no? > > > > > The guid information is embedded in each pfru_dev and only calculated > > once during probe. I thought people try to avoid using global variables > > if possible? > > Use your common sense. You might have a lot of data duplication, > and this data is definitely not something that needs any kind of > serialization / personification / etc. > Ok, I'll switch to global variables in next version. thanks, Chenyu > -- > With Best Regards, > Andy Shevchenko > >