From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail.alien8.de (mail.alien8.de [65.109.113.108]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 51E132F5A13 for ; Mon, 23 Mar 2026 19:31:03 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=65.109.113.108 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1774294269; cv=none; b=YQW98KRkRqsHXvLms9E2Lx9DuPFFPRBN8NQAxZxACnbxWVuTEGkJWlcIO71Ug1cutECK9rHEqrlCjjYH6twT0/tv2Zoxoe47aYtUljV2y1FTI0YqYfdgsiIXQ0M16nbldkdIL6SMBvgeb8bRJs6Xxwe+QKAEItiuNYrtg9S1mFE= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1774294269; c=relaxed/simple; bh=Q9EH23h/5rkXJUs36bg41pTHHnJOwRDhhFFT6Tac9t0=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=jSMvAevdrvSB+Bg4JH4+zaLktOVFloGuNckdYluYxVfSTItkb7Ck29FXwJHUjKQ8Un86kIUryDdkqivza8jki/Cm4RGpk76HgJzwIclhop2G3IPrmAN5BCFOya2prxYXfG7rKwOepVnWLZtZV0NNznc8HtkU+9BHpWYVnp1M2EU= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=alien8.de; spf=pass smtp.mailfrom=alien8.de; dkim=pass (4096-bit key) header.d=alien8.de header.i=@alien8.de header.b=eeGMjDVi; arc=none smtp.client-ip=65.109.113.108 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=alien8.de Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=alien8.de Authentication-Results: smtp.subspace.kernel.org; dkim=pass (4096-bit key) header.d=alien8.de header.i=@alien8.de header.b="eeGMjDVi" Received: from localhost (localhost.localdomain [127.0.0.1]) by mail.alien8.de (SuperMail on ZX Spectrum 128k) with ESMTP id BD05040E0031; Mon, 23 Mar 2026 19:31:00 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at mail.alien8.de Authentication-Results: mail.alien8.de (amavisd-new); dkim=pass (4096-bit key) header.d=alien8.de Received: from mail.alien8.de ([127.0.0.1]) by localhost (mail.alien8.de [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id pD3fLepHg69e; Mon, 23 Mar 2026 19:30:57 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=alien8.de; s=alien8; t=1774294257; bh=9I8Fzqgo1JxyiqGjGxhNl0nN6GuPDJmzXJBzov9IJ84=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=eeGMjDVigfkVqvkiLt/BMoxkYGXh2mtXukWfFrdA6K8iceGT9eotC7na8UPPAAU+a jRth1dt8zIaI5i/w288XYBkN5DALd07cUdMcBKFMZo+jdlSsSIu0Hw3LpJGlJkA48y kDUGZ3nkT2grOzcwHGyDw6RugX2vUfm30lP9rLtED8rBE71UVSHzYASLJDjs6P/lqz AkrPxsSPM3Tz3b+RhVcEH0K84jluLSwf+mgcoNVNZu81+RmxHA+RGXXsGf6wztfIYO vKnx8PywACHFs4L0L/bE0if1aQX4RaoGZX1rngkkSfTCA/6ja10w9fgEnMMa0UTefH Mb6AB6VoAWkFKKHVgxfeKJDfP3tgm6uabv9aK+OD3AiZkLqCedIdqHcP2ovEL02g/D rOd7+piLjA5YPtq+Wz7gEnXBIVrIcAFJLlH4C9fobi7AOfJrAzlbyIoLBQ40USiP68 w7kqLQt0L30yjNwXgfegkcZJ2FDB9Sqx6oAZu11iyKslqMvi7dLCEZv89LkfBMSdcR 7T7PZcLo53efgMMr2yogKubwM6RrJ+1A3dTIB8ZPdGS++KrixuwUCL33wsjWTO4AVT P3X94lJwBCEA0jtI3pWQ148xB91Yb4+CyCbDcCi1reCEiU3b+AS938AG+tCFTTf0ml PWrbBWjgqx/agXkUAcHd87as= Received: from zn.tnic (p5de8e020.dip0.t-ipconnect.de [93.232.224.32]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature ECDSA (P-256) server-digest SHA256) (No client certificate requested) by mail.alien8.de (SuperMail on ZX Spectrum 128k) with UTF8SMTPSA id 4951740E019D; Mon, 23 Mar 2026 19:30:39 +0000 (UTC) Date: Mon, 23 Mar 2026 20:30:33 +0100 From: Borislav Petkov To: "H. Peter Anvin" Cc: Maciej Wieczor-Retman , tglx@kernel.org, peterz@infradead.org, xin@zytor.com, maciej.wieczor-retman@intel.com, babu.moger@amd.com, chang.seok.bae@intel.com, sohil.mehta@intel.com, dave.hansen@linux.intel.com, jpoimboe@kernel.org, elena.reshetova@intel.com, pawan.kumar.gupta@linux.intel.com, ak@linux.intel.com, darwi@linutronix.de, mingo@redhat.com, x86@kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH v11 4/4] x86/cpu: Clear feature bits whose dependencies were cleared Message-ID: <20260323193033.GEacGU2dZaNuZ6MgWM@fat_crate.local> References: <20260323163557.GHacFr7VbKIADqonuX@fat_crate.local> <20260323175902.GBacF_ZnWQJJWdOZJT@fat_crate.local> <55af4420-e230-4f14-a2d3-608f2bc5a412@zytor.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <55af4420-e230-4f14-a2d3-608f2bc5a412@zytor.com> On Mon, Mar 23, 2026 at 11:57:45AM -0700, H. Peter Anvin wrote: > I do have to say that using awk for these things, especially being restricted > to POSIX awk, is really awful as it really is pushing the limits of that tool. > String processing in C is most definitely no fun either -- the single biggest > shortcoming of what is otherwise one of my favorite languages -- but it > *would* also be possible to refactor cpuid-deps.c so that it can be compiled > in user space and linked with a C tool that would replace cpufeaturesmask.awk, > mkcapflags.sh, and boot/mkcpustr.c. > > This seemed to me to be a bit excessive in terms of churn and complexity, but > perhaps this is what you are looking for? I was actually suggesting we handle the dependent features in apply_forced_caps() and keep that all in one place. As to the whole glue handling deps, feature flags, names, yadda yadda, yap, I agree, it ain't easy and I need to grep each time where the generated files are and go stare at them. So I really like the idea of replacing it all with a C tool which you can massage in luserspace and replace all that other gunk and we won't depend on the awk flavor or shell script or whatnot but keep everything in a single C program and a header. I don't know whether that would work and how ugly it would become - we need to try it I guess - but the idea ure sounds enticing... Maybe something for a future todo. :-) -- Regards/Gruss, Boris. https://people.kernel.org/tglx/notes-about-netiquette