Received: by 2002:a05:6358:d09b:b0:dc:cd0c:909e with SMTP id jc27csp2395455rwb; Fri, 11 Nov 2022 08:44:06 -0800 (PST) X-Google-Smtp-Source: AA0mqf6YM6DTrm7b3a1qagVUZWcVReMN7GFfigEg+66GfUO5CSBXduRFje+3ecBmWjguOJp/Lgeg X-Received: by 2002:a17:906:7fd8:b0:7ad:902c:d1d6 with SMTP id r24-20020a1709067fd800b007ad902cd1d6mr2462089ejs.143.1668185046062; Fri, 11 Nov 2022 08:44:06 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1668185046; cv=none; d=google.com; s=arc-20160816; b=jUP0IoGgWMqTZKkjyvIU7HmbqhzdymiVGw5RJ1Ys0cC0QfTtJmo8WDR2R4yJqQYk9v f31rRn2fpq5wLZWDLn+h86EKTSC8wWP/3dIAoOABB0sBrO/lrc9NrEOmPOEkJLBW7GtV 7T4T9C7uvD3PKvanL24EaoSh3IoKowKVhe66yjk66DRMoy6V/6ne4hgor0gjemu0JqIc P+oeilnTuq4175dHTRiKQp6U4zPyg6nXNMN8s7AxePGDWECc3Hq7G77vde+wdngJkeXm BFSCrHgTxgbbc52AYX4+DdUeCDP2eIC60WFt26OwU09+Y+UP9OvZ0Y5UJZKWOpmP0HAP oMCw== 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:dkim-signature; bh=RQAgICrjFnZQrLGvUgI/C7Q9GLfgPJ4P+LW0OtdT8rs=; b=OGhuYFOXwvfjaQ00eJKlMSFVUMaHOplK9WYMY2KQvcXDOFyfWjUhWFaOmSZBNM1aGw OHcMvX3Qt0MqqZ0Owf0onoWz5Ijj0iWtjDqoAVPI4yK0pLWsKgwYnUoMVttToVAGB8Ip RUxu4KYsRt2jVh+qRAsfeYiHizrg1pL6PbsMmfi87FVETn3BkuJBV2ZABg25TQIjxfZe rMpMvMgGGkHPM972ebKz85JqlNuhE/X5Z++bYOnIhFp3KM7XAXB6jrA3tQQkTuH0sZOY cm8amKEcH5vf9vB4htOr4+0NoP4EFkfQn2kPZUYo8FJ2el2ShnNOmfODpv4GJZpAkw+t 5nzQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@alien8.de header.s=dkim header.b=moouNAFT; 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=alien8.de Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id b10-20020aa7cd0a000000b00461a9ddbda7si2403170edw.90.2022.11.11.08.43.42; Fri, 11 Nov 2022 08:44:06 -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=@alien8.de header.s=dkim header.b=moouNAFT; 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=alien8.de Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233887AbiKKQXy (ORCPT + 91 others); Fri, 11 Nov 2022 11:23:54 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51974 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234215AbiKKQXv (ORCPT ); Fri, 11 Nov 2022 11:23:51 -0500 Received: from mail.skyhub.de (mail.skyhub.de [IPv6:2a01:4f8:190:11c2::b:1457]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id CE79E10FC2; Fri, 11 Nov 2022 08:23:49 -0800 (PST) Received: from zn.tnic (p200300ea9733e727329c23fffea6a903.dip0.t-ipconnect.de [IPv6:2003:ea:9733:e727:329c:23ff:fea6:a903]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.skyhub.de (SuperMail on ZX Spectrum 128k) with ESMTPSA id 69FBD1EC042F; Fri, 11 Nov 2022 17:23:48 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=alien8.de; s=dkim; t=1668183828; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:in-reply-to:in-reply-to: references:references; bh=RQAgICrjFnZQrLGvUgI/C7Q9GLfgPJ4P+LW0OtdT8rs=; b=moouNAFTAV7IcV/mP/nZqLe47DxjlL2ZUaRES6YJT6CZgM57NspuSpLyzVWCPkqJ6rbcKk xY4bYHmZCLalHnrmbMD8dlM6xo8pYJ/OsbcktfAFK7mP9LgQI0vvRWlWMcxxoEg28NyBwv ww4At+bFDSflMdaQCtpe9l4jVRdxDdY= Date: Fri, 11 Nov 2022 17:23:48 +0100 From: Borislav Petkov To: Jithu Joseph Cc: hdegoede@redhat.com, markgross@kernel.org, tglx@linutronix.de, mingo@redhat.com, dave.hansen@linux.intel.com, x86@kernel.org, hpa@zytor.com, gregkh@linuxfoundation.org, ashok.raj@intel.com, tony.luck@intel.com, linux-kernel@vger.kernel.org, platform-driver-x86@vger.kernel.org, patches@lists.linux.dev, ravi.v.shankar@intel.com, thiago.macieira@intel.com, athenas.jimenez.gonzalez@intel.com, sohil.mehta@intel.com Subject: Re: [PATCH v2 09/14] platform/x86/intel/ifs: Use generic microcode headers and functions Message-ID: References: <20221021203413.1220137-1-jithu.joseph@intel.com> <20221107225323.2733518-1-jithu.joseph@intel.com> <20221107225323.2733518-10-jithu.joseph@intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <20221107225323.2733518-10-jithu.joseph@intel.com> X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_NONE,SPF_PASS 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 Mon, Nov 07, 2022 at 02:53:18PM -0800, Jithu Joseph wrote: > static int scan_chunks_sanity_check(struct device *dev) > { > - int metadata_size, curr_pkg, cpu, ret = -ENOMEM; > struct ifs_data *ifsd = ifs_get_data(dev); > + int curr_pkg, cpu, ret = -ENOMEM; > bool *package_authenticated; > struct ifs_work local_work; > - char *test_ptr; > > package_authenticated = kcalloc(topology_max_packages(), sizeof(bool), GFP_KERNEL); > if (!package_authenticated) > return ret; Bah, how big is that thing so that you can't simply do a bitfield on the stack here instead of kcalloc-ing? > @@ -203,67 +174,33 @@ static int scan_chunks_sanity_check(struct device *dev) > return ret; > } > > -static int ifs_sanity_check(struct device *dev, > - const struct microcode_header_intel *mc_header) > +static int ifs_image_sanity_check(struct device *dev, const struct microcode_header_intel *data) Yet another static function - no need for the ifs_ prefix. ... -- Regards/Gruss, Boris. https://people.kernel.org/tglx/notes-about-netiquette