Received: by 2002:a05:6358:1087:b0:cb:c9d3:cd90 with SMTP id j7csp2938581rwi; Fri, 21 Oct 2022 09:30:56 -0700 (PDT) X-Google-Smtp-Source: AMsMyM5CQNGtgjljAASCnkgDkeIbpHGGoBErp/HNvu7DxCK4KQzfNzpv1XdianuDuWxeBSOGCulO X-Received: by 2002:a05:6402:28a1:b0:458:81c0:a379 with SMTP id eg33-20020a05640228a100b0045881c0a379mr18203589edb.388.1666369856337; Fri, 21 Oct 2022 09:30:56 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1666369856; cv=none; d=google.com; s=arc-20160816; b=wgBpQm/sjl/9hXTG/heNk/Y0JnWaDmzZ/Pa5jhxvAzpxNOUgjfnOWp7owuK4N104S5 1zIPhYVwJXDs5k+IoLV6Slt5PsCkXh7M1DnHSXye5d0cKOenyWiSAfKJY28HHudW9OdJ daAWdMDBCQZPsJXeuSfvZSHd0eGsP/aRZRS21u4SQZnWTK+DrRVvLloVvyLjf+Kgq0ET cl83TkAZDeoCfTGHlONrwAPK1ZcqxJJ9qOOn5jDaNOy3gpPvtmiPVkWzzLDlfCmHViqY DKc0tP0qRkqKlsjQevj17XNuR8rQCU59c9rnYp+AqtxVOunFCF7vxKvyBrNSPe0GT/z7 p0rQ== 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=osvnA1VVG8lOO7CofSEE3U1qKE+FmJzIhRV7z1btuj4=; b=odbyVKcSLyxG3Fc8lamcMHDYQ6+9gfF+5Fc0xuQBx4QaVlpwih3wKNrMi5q+FS36my W1nxC5pnVIBmWJR4x5JARYeQHyVXab4V0JLw1hS3lzZ4FYZrhZ2A0p73sDw774vaoRQx 54dlPnJm71zNJycj7faLKMK7A7FubzSXsyX515fupCXGKjPu/tzwg/lUXXcYnLfirMsD YB2z1xF/pDEwfNCh+Dqe/5a9xc88tu7pibUemPGaZnde01FbuQFotateyUj8Pp0wF1mU Z/5slcLEfsIJaSZCGRP1Ho4m2csQLgsNkUwwxBjPfPjxm5sI/E47kCnDJ33wUv6CXjuJ S1fA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@alien8.de header.s=dkim header.b=kTrJPiFS; spf=pass (google.com: domain of linux-crypto-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-crypto-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 d1-20020a05640208c100b0045d088f4b79si18056435edz.258.2022.10.21.09.30.20; Fri, 21 Oct 2022 09:30:56 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-crypto-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=kTrJPiFS; spf=pass (google.com: domain of linux-crypto-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-crypto-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 S230258AbiJUQT7 (ORCPT + 99 others); Fri, 21 Oct 2022 12:19:59 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55310 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230436AbiJUQTy (ORCPT ); Fri, 21 Oct 2022 12:19:54 -0400 Received: from mail.skyhub.de (mail.skyhub.de [IPv6:2a01:4f8:190:11c2::b:1457]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D557D4456E; Fri, 21 Oct 2022 09:19:36 -0700 (PDT) Received: from zn.tnic (p200300ea9733e769329c23fffea6a903.dip0.t-ipconnect.de [IPv6:2003:ea:9733:e769: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 0CC6D1EC0731; Fri, 21 Oct 2022 18:19:34 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=alien8.de; s=dkim; t=1666369174; 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=osvnA1VVG8lOO7CofSEE3U1qKE+FmJzIhRV7z1btuj4=; b=kTrJPiFSirvT8QAitnYEpzpcdMbtcXA5yOQxTep7XgZPzoZ7lttGRZVygRLbYsnaOD+LzU /RhEgA3iGecU55zSIGnw2ZiO8DllFm7LXz29lmQH3D3HkNrqJcr2lCuQHbKV8uRxNlwMvW ITkPMYEdCWAcH8rJMRHThhLuixBO9Z8= Date: Fri, 21 Oct 2022 18:19:29 +0200 From: Borislav Petkov To: Maxim Levitsky Cc: linux-kernel@vger.kernel.org, kvm@vger.kernel.org, Pawan Gupta , Ingo Molnar , Josh Poimboeuf , Namhyung Kim , Tony Luck , Paolo Bonzini , "H. Peter Anvin" , Arnaldo Carvalho de Melo , Thomas Gleixner , Alexander Shishkin , Tim Chen , "David S. Miller" , Dave Hansen , "Chang S. Bae" , Jane Malalane , Kees Cook , Kan Liang , Peter Zijlstra , "maintainer:X86 ARCHITECTURE (32-BIT AND 64-BIT)" , Herbert Xu , Jiri Olsa , Mark Rutland , linux-perf-users@vger.kernel.org, "open list:CRYPTO API" Subject: Re: [PATCH v2 2/5] x86/cpuid: refactor setup_clear_cpu_cap()/clear_cpu_cap() Message-ID: References: <20220718141123.136106-1-mlevitsk@redhat.com> <20220718141123.136106-3-mlevitsk@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <20220718141123.136106-3-mlevitsk@redhat.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, URIBL_BLOCKED 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-crypto@vger.kernel.org On Mon, Jul 18, 2022 at 05:11:20PM +0300, Maxim Levitsky wrote: > Currently setup_clear_cpu_cap passes NULL 'struct cpuinfo_x86*' > to clear_cpu_cap to indicate that capability should be cleared from boot_cpu_data. > > Later that is used in clear_feature to do recursive call to > clear_cpu_cap together with clearing the feature bit from 'cpu_caps_cleared' > > Remove that code and just call the do_clear_cpu_cap on boot_cpu_data directly > from the setup_clear_cpu_cap. > > The only functional change this introduces is that now calling clear_cpu_cap > explicitly on boot_cpu_data also sets the bits in cpu_caps_cleared, > which is the only thing that makes sense anyway. > > All callers of both functions were checked for this and fixed. Change looks ok. What I can't grok is this sentence: what was checked and fixed where? What does need fixing and why? Thx. -- Regards/Gruss, Boris. https://people.kernel.org/tglx/notes-about-netiquette