Received: by 2002:a05:6a10:5bc5:0:0:0:0 with SMTP id os5csp2906808pxb; Mon, 1 Nov 2021 04:23:15 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwexdl1Re7baO7qMHkBYfAULwJYXIReRt/2i+ORSAXpFohQk2KHSxllZdE+9RXz4VV9M+c0 X-Received: by 2002:a92:2903:: with SMTP id l3mr12521907ilg.35.1635765795236; Mon, 01 Nov 2021 04:23:15 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1635765795; cv=none; d=google.com; s=arc-20160816; b=m1V5x28/+/I2XYb1FSH1LlPIKjkJctA0LQuArM2TK5YoX/wK+Y2GSWleZ0vh52IA4c 4+mw2haPGeXQB5WZi1zFrAj4g0wXaXSqjnpFNcrmdnSftF06NviTNDrvfhWc+/QbFzBk kbcWQffxdB3YnnG5skl+yzmts2xL2Wr4xIHMRRMddzaeJeBSL3+MN2koLbZKEkezP6uF knqpyLu58ma9ahlyIPb1P019ARTflMLFpyItqHphbUL3Ft70LNHfMWO2L1M9+vOr+olZ l1qZYjDbkQCqLpErBCTf9aAG8OC1HZDgerni1kSRTWKpI2polNsQsG/CuyMTsjEeI6yD 4low== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:organization:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date; bh=cCKr1+voRKQEUkWmbYRmcCxyTA9Om4LWAXKvdC4cCWU=; b=tWEy8uIX0Pv01IaOO2zQKhTL2ua9gp8t2I/Fhj90GiVeQim2pB60cANlNeIeBIt6PD HoTGFk60Fou/Nsjx2MuJFLu3YqARLs4i4xrKa54fcF/NR6asqvPpxs2NUhCDY+VYgREb RoJCVYM87wfsQKIFHcKWxFbxRrDZiVtun69zuwgnjZ/Le2t5QVHe7DYUUpAuIVhYppwN 9y9KGHtmV2xK6QfVjlOtfaRyQCta3J1ilp4wWpHKf3LWiXpY4ausYJJbEflmkws2TZjm LUNcgO2nvsjmcgM7fC2JlEWKX8dbi1Ax1OyeERZ/gLbDNOCbLYasaTrLgrMiW2s9jQJh Ni8Q== 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 f15si10096586ilu.96.2021.11.01.04.22.59; Mon, 01 Nov 2021 04:23:15 -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 S232001AbhKALYa (ORCPT + 99 others); Mon, 1 Nov 2021 07:24:30 -0400 Received: from mga12.intel.com ([192.55.52.136]:37074 "EHLO mga12.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231866AbhKALY3 (ORCPT ); Mon, 1 Nov 2021 07:24:29 -0400 X-IronPort-AV: E=McAfee;i="6200,9189,10154"; a="211049399" X-IronPort-AV: E=Sophos;i="5.87,199,1631602800"; d="scan'208";a="211049399" Received: from orsmga003.jf.intel.com ([10.7.209.27]) by fmsmga106.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 01 Nov 2021 04:21:56 -0700 X-IronPort-AV: E=Sophos;i="5.87,199,1631602800"; d="scan'208";a="449230986" Received: from smile.fi.intel.com ([10.237.72.184]) by orsmga003-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 01 Nov 2021 04:21:53 -0700 Received: from andy by smile.fi.intel.com with local (Exim 4.95) (envelope-from ) id 1mhVNg-002e9V-R3; Mon, 01 Nov 2021 13:21:36 +0200 Date: Mon, 1 Nov 2021 13:21:36 +0200 From: Andy Shevchenko To: Chen Yu 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: References: <20211101093320.GA18982@chenyu5-mobl1> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20211101093320.GA18982@chenyu5-mobl1> Organization: Intel Finland Oy - BIC 0357606-4 - Westendinkatu 7, 02160 Espoo Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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") ... > > > + 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. -- With Best Regards, Andy Shevchenko