From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-1.0 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 00BD0C282DA for ; Wed, 17 Apr 2019 23:20:01 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id C63F9217FA for ; Wed, 17 Apr 2019 23:20:00 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2387567AbfDQXTy (ORCPT ); Wed, 17 Apr 2019 19:19:54 -0400 Received: from Galois.linutronix.de ([146.0.238.70]:59769 "EHLO Galois.linutronix.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728268AbfDQXTy (ORCPT ); Wed, 17 Apr 2019 19:19:54 -0400 Received: from pd9ef12d2.dip0.t-ipconnect.de ([217.239.18.210] helo=nanos) by Galois.linutronix.de with esmtpsa (TLS1.2:DHE_RSA_AES_256_CBC_SHA256:256) (Exim 4.80) (envelope-from ) id 1hGtqA-0008NA-5g; Thu, 18 Apr 2019 01:19:42 +0200 Date: Thu, 18 Apr 2019 01:19:41 +0200 (CEST) From: Thomas Gleixner To: Fenghua Yu cc: Ingo Molnar , Borislav Petkov , H Peter Anvin , Paolo Bonzini , Dave Hansen , Ashok Raj , Peter Zijlstra , Ravi V Shankar , Xiaoyao Li , Christopherson Sean J , Kalle Valo , Michael Chan , linux-kernel , x86 , kvm@vger.kernel.org, netdev@vger.kernel.org, linux-wireless@vger.kernel.org Subject: Re: [PATCH v7 18/21] x86/clearcpuid: Support feature flag string in kernel option clearcpuid In-Reply-To: <1555536851-17462-19-git-send-email-fenghua.yu@intel.com> Message-ID: References: <1555536851-17462-1-git-send-email-fenghua.yu@intel.com> <1555536851-17462-19-git-send-email-fenghua.yu@intel.com> User-Agent: Alpine 2.21 (DEB 202 2017-01-01) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII X-Linutronix-Spam-Score: -1.0 X-Linutronix-Spam-Level: - X-Linutronix-Spam-Status: No , -1.0 points, 5.0 required, ALL_TRUSTED=-1,SHORTCIRCUIT=-0.0001 Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org On Wed, 17 Apr 2019, Fenghua Yu wrote: > The kernel option clearcpuid currently only takes feature bit which > can be changed from kernel to kernel. > > Extend clearcpuid to use cap flag string, which is defined in > x86_cap_flags[] and won't be changed from kernel to kernel. > And user can easily get the cap flag string from /proc/cpuinfo. If your machine dies because init triggers #AC then please explain how that easily can be read from /proc/cpuinfo and how the sysadmin can figure out what the heck he needs to write on the kernel command line. The whole 'clearcpuid' thing should have never been merged. It's a pure testing/debugging thing. And no, we are not going to proliferate it and extend it for dubious value. Quite the contrary, we should simply rip it out. Add a simple 'noac' or whatever command line option, which is documented proper and can easily be mapped to a #AC crash during boot. Thanks, tglx