Received: by 2002:a05:6358:d09b:b0:dc:cd0c:909e with SMTP id jc27csp4601103rwb; Tue, 8 Nov 2022 20:39:39 -0800 (PST) X-Google-Smtp-Source: AMsMyM6bVhLaU2VjUErN01zq2f4NjnXtoeYNYfmmnCh+IkqabcYXIK3PKzemd7bwutRq7rUenZFK X-Received: by 2002:a17:907:1c88:b0:7ad:8f76:699e with SMTP id nb8-20020a1709071c8800b007ad8f76699emr54715544ejc.114.1667968779472; Tue, 08 Nov 2022 20:39:39 -0800 (PST) Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id h11-20020a170906854b00b0078decbc3fe4si10840080ejy.274.2022.11.08.20.39.16; Tue, 08 Nov 2022 20:39:39 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=FA10wR0y; arc=fail (signature failed); spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230202AbiKIDaR (ORCPT + 93 others); Tue, 8 Nov 2022 22:30:17 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47982 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230122AbiKIDaJ (ORCPT ); Tue, 8 Nov 2022 22:30:09 -0500 Received: from mga07.intel.com (mga07.intel.com [134.134.136.100]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 111B76426; Tue, 8 Nov 2022 19:30:08 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1667964608; x=1699500608; h=message-id:date:subject:to:cc:references:from: in-reply-to:content-transfer-encoding:mime-version; bh=D6TNx5JqwIPfZpPtoewVMNIJvtcnqHk/4Iqgn6hrJKM=; b=FA10wR0ygdssRVvBSPwt5CybVBjdBfuVoUeYlT/sAgWXR93vPyJUc0WL h/bMIeg2XxuHVVw3ee38AMOwOpPZFUNOVp3uwmpVNcn5EbBjsTYUFdamD oWe4DGoHAaBuCLAZnFhrFOlueUNuzYl9ys6ohPtDP7379ZMhVEmxrEPRg gf1KIBpaputC5aoCKBtedIeEoizg1jT5LiEvTQ7H0oo5tB6sstx5loTqG v5o4fWTVUJzA1vHSnLuomD2Wybl3iHCBUefBYO7DtUbld0gxEY2N6k6F4 ETTABysjiY6r9TsBnl0BzSnz91Pe5knI3kCnW0hgeDbFk6xJ8sMKrQKRC Q==; X-IronPort-AV: E=McAfee;i="6500,9779,10525"; a="375150950" X-IronPort-AV: E=Sophos;i="5.96,149,1665471600"; d="scan'208";a="375150950" Received: from fmsmga008.fm.intel.com ([10.253.24.58]) by orsmga105.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 08 Nov 2022 19:30:07 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6500,9779,10525"; a="700183035" X-IronPort-AV: E=Sophos;i="5.96,149,1665471600"; d="scan'208";a="700183035" Received: from orsmsx601.amr.corp.intel.com ([10.22.229.14]) by fmsmga008.fm.intel.com with ESMTP; 08 Nov 2022 19:30:06 -0800 Received: from orsmsx610.amr.corp.intel.com (10.22.229.23) by ORSMSX601.amr.corp.intel.com (10.22.229.14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.31; Tue, 8 Nov 2022 19:30:06 -0800 Received: from orsmsx611.amr.corp.intel.com (10.22.229.24) by ORSMSX610.amr.corp.intel.com (10.22.229.23) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.31; Tue, 8 Nov 2022 19:30:05 -0800 Received: from orsedg603.ED.cps.intel.com (10.7.248.4) by orsmsx611.amr.corp.intel.com (10.22.229.24) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.31 via Frontend Transport; Tue, 8 Nov 2022 19:30:05 -0800 Received: from NAM11-BN8-obe.outbound.protection.outlook.com (104.47.58.169) by edgegateway.intel.com (134.134.137.100) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2375.31; Tue, 8 Nov 2022 19:30:05 -0800 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=lg93nRCa8rzH/4NwLRxkzv6bUcu6eQGKq1NZy8ZFu9C6m552rINOJBCtNHlvvmi8k5Heh7Dp3+VlSJOr8uoKuBT+a/FlivsnPa8A/G49N8PDW7sJOBr32zHUrXDW4SLIg6pB5DaKHmFsxBd77vZqDXJIzY2dlrJaVT1x6HredPN66fpKRz8STw6lc9wMJSqKiAOxNjdOL+9rOw9Tp7L4J+4GzB6RraLDFzNdMn2uXNAvXb6sfsyA4YYwfx3FgCX8DPO7BUAVWxpQRLIHTFerMEYeWtRrfLgZNxiUyi7BASshyS9fBH9pr1Vpv74InYyVWkpZCYQMQOINm/9TIKVh7g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=LwVnci62ZbDyEzRNydsubKZOTNBJ59gRkVfAghTfm6s=; b=KvWoKcZZtwIINBe6AyHZkQWwPtGWznDdmZXFAZBNvnuez2FlFKj3e1LergZNK5vs1JhvmzOaxheH0CRVDh0SNMY9jqo9T1gs53LCfyJ0ZejBgJKM/HnHlJhwXG2Knk/fP4HmXSBzxoJmqQxTSK5z548Vgs4YTWs0aW3uMG5fmARqpXFnj/4LbyVxNutYygX7I+SVxdwOVvJCgEvvvCdI/sCTzC/CbtCYK4H4cA67PPxZ2KPL6Ls0HUlSpmVc3T1lEZwowwRJ1GG7KZxSNLJ39GW+XCwJL2h0c9FfJl0lWwkgrlLSLwQ3qMB0dEJJk33rFZlJ4ZZL0S36FnZzIk3I/g== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=intel.com; dmarc=pass action=none header.from=intel.com; dkim=pass header.d=intel.com; arc=none Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=intel.com; Received: from BYAPR11MB3320.namprd11.prod.outlook.com (2603:10b6:a03:18::25) by DM4PR11MB6528.namprd11.prod.outlook.com (2603:10b6:8:8f::14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5791.27; Wed, 9 Nov 2022 03:29:57 +0000 Received: from BYAPR11MB3320.namprd11.prod.outlook.com ([fe80::e475:190a:6680:232]) by BYAPR11MB3320.namprd11.prod.outlook.com ([fe80::e475:190a:6680:232%7]) with mapi id 15.20.5791.027; Wed, 9 Nov 2022 03:29:57 +0000 Message-ID: <1af04fc9-3207-d9aa-4464-cdb14b983997@intel.com> Date: Tue, 8 Nov 2022 19:29:56 -0800 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:91.0) Gecko/20100101 Thunderbird/91.13.1 Subject: Re: [PATCH v2 09/14] platform/x86/intel/ifs: Use generic microcode headers and functions Content-Language: en-US To: Jithu Joseph , , CC: , , , , , , , , , , , , , , References: <20221021203413.1220137-1-jithu.joseph@intel.com> <20221107225323.2733518-1-jithu.joseph@intel.com> <20221107225323.2733518-10-jithu.joseph@intel.com> From: Sohil Mehta In-Reply-To: <20221107225323.2733518-10-jithu.joseph@intel.com> Content-Type: text/plain; charset="UTF-8"; format=flowed Content-Transfer-Encoding: 8bit X-ClientProxiedBy: SJ0PR05CA0013.namprd05.prod.outlook.com (2603:10b6:a03:33b::18) To BYAPR11MB3320.namprd11.prod.outlook.com (2603:10b6:a03:18::25) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: BYAPR11MB3320:EE_|DM4PR11MB6528:EE_ X-MS-Office365-Filtering-Correlation-Id: 24c12404-8a27-4dd0-0929-08dac202ad15 X-LD-Processed: 46c98d88-e344-4ed4-8496-4ed7712e255d,ExtAddr X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: Hp5kO8TiXRu9Z2O/l3196WgYrYIHsONNi8ury6KQ5edhanZUWcbkYkRHB7zU39hlYspC3MRlW90ydFyktCfrBfLATYNykIUdCNhRwVLLh6y4OjYOs8G2wa/dlckLbnQF4WjRYgIccqfAIbifZ6uwgWCcVXrBJUi5gm4nLNRSdYh8N7yT6fJKLK0IlG9mHuymPWjoePNt6kSHfFn7zgdzBGnhZnVeWIpktbnmzxNdABI4wJHckQP0K5ahClRVW3IOJnGEGmliK62k3swWiiVE5oyW9dMFWSstF7YSHrVpeeXV0LZ84SgLJrpYS3ii/4bG1CwNnDRdqkEYblSbDmZVXltB30vaA+MnyrJcRE8jXipWgQQ5dHgbqOEicGV0E6G+BSWYfJldkIP1FZCqc1djJ5UvCX4RSwTFOhCqAp/eiMQpgyrNVzJCfc1Ga/Z8OwgcyAula5/F8KnphXEAySOoYrKYMrhy6vcy9RZ+fDBMZNp9NP72lMqLQLfL7KaNaCWh/OYZmfXO2MUXzp7qx7DTV5WRlZQPbHjY7VHVNsmgpQ7fUpjkP9Wh3GlFpLvTMeXFKhDyRlizeVLVE7QkpS9cvrXla6zI1epMzOCLFzuU+4qm08eTnT4kfEKrMbH733tmc8/B7oTi214bAttRyKzaA1T7ev+pGmuZJOIYyK0sJPXXjm0BI0Tw7IClo3EJQtpOfMbqAr+LHBNRMaR4ybOLwAHgIFgG4nw2LgpnOqwdE1woKVOa+oUmBXXh95uPwKjIYV3ujd1wOjb7k06hZJ/05OANwC7mlf9SV/BwupHIrQTc8qD5QDIWTlV1kDfN2yT8YyNYjS6ggC5qhfQfX+Urjw== X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:BYAPR11MB3320.namprd11.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230022)(376002)(396003)(366004)(136003)(346002)(39860400002)(451199015)(6512007)(26005)(6506007)(53546011)(2616005)(2906002)(186003)(6486002)(478600001)(82960400001)(38100700002)(41300700001)(8936002)(31696002)(5660300002)(7416002)(44832011)(86362001)(316002)(66556008)(4326008)(66476007)(8676002)(66946007)(36756003)(31686004)(41533002)(45980500001)(43740500002);DIR:OUT;SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?B?bGZhMHhuTzRjTW40a3VQb0txUHFsL3FnakQ3aGd4dytnTVFxYkpyZTU5R21M?= =?utf-8?B?QWhiK011UndGdXkwS2xnZFdRR09lYWtlN1ZXa2sraVdjc2ExN0U2TkZWK0pI?= =?utf-8?B?NCtSZWY1aFlCbi9WeGozUjltdXVkZllrZzQ5WVhtZFRQbC9sMmdzaDVJMHhM?= =?utf-8?B?eVFHTUcwRmk0Wm5KQlhlMUtGU3BaRHVreVFGbmhJUU5Yc0NBNStKMjJ5WjRQ?= =?utf-8?B?QmNYZFB3TldSU25Hbi9TWXlMUHR5MmZEMXFacUVwSFhPVElXaEczR2lXbGhC?= =?utf-8?B?NGNPbjFaZmprY0RKN29QQm8vcGx5M0VmYjd2VFZ5b21TSUx6amw5M0N1TEVp?= =?utf-8?B?WitPL3ptZThBZjVNS0ZkNGJnV21keDAyeFh0Ly9vU2JvVGl0QUUvN0lkWElk?= =?utf-8?B?ZWNqbks3S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-MS-Exchange-CrossTenant-AuthSource: BYAPR11MB3320.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 09 Nov 2022 03:29:57.7937 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 46c98d88-e344-4ed4-8496-4ed7712e255d X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: Yww7Gx/Rm08tUT1ddkpA4Sd8lFMhEV90MMlMqTVLhNbOF4FxdyE4UWKwelH1Qo5cDWIrhIMsnT6YInHljKa+Yw== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM4PR11MB6528 X-OriginatorOrg: intel.com X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,NICE_REPLY_A, RCVD_IN_DNSWL_MED,SPF_HELO_NONE,SPF_NONE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 11/7/2022 2:53 PM, Jithu Joseph wrote: > Existing implementation (broken) of IFS used a header format (for IFS > test images) which was very similar to microcode format, but didn’t > accommodate extended signatures. This meant same IFS test image had to > be duplicated for different steppings and the validation code in the > driver was only looking at the primary header parameters. Going forward > IFS test image headers has been tweaked to become fully compatible with > microcode format. > > Newer IFS test image headers will use microcode_header_intel->hdrver = 2, > so as to distinguish it from microcode images and older IFS test images. > > In light of the above, use struct microcode_header_intel directly in > IFS driver instead of duplicating into a separate ifs_header structure. > Further use existing microcode_sanity_check() and find_matching_signature() > directly instead of implementing separate ones within the driver. > > More IFS specific checks will be added subsequently. > > Reviewed-by: Tony Luck > Signed-off-by: Jithu Joseph Reviewed-by: Sohil Mehta