[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20251114090328.GS278048@noisy.programming.kicks-ass.net>
Date: Fri, 14 Nov 2025 10:03:28 +0100
From: Peter Zijlstra <peterz@...radead.org>
To: Sean Christopherson <seanjc@...gle.com>
Cc: Andy Lutomirski <luto@...nel.org>, Thomas Gleixner <tglx@...utronix.de>,
Ingo Molnar <mingo@...hat.com>, Borislav Petkov <bp@...en8.de>,
Dave Hansen <dave.hansen@...ux.intel.com>, x86@...nel.org,
Xin Li <xin@...or.com>, "H. Peter Anvin" <hpa@...or.com>,
Arnaldo Carvalho de Melo <acme@...nel.org>,
Namhyung Kim <namhyung@...nel.org>,
Paolo Bonzini <pbonzini@...hat.com>,
Josh Poimboeuf <jpoimboe@...nel.org>,
Jarkko Sakkinen <jarkko@...nel.org>,
"Kirill A. Shutemov" <kas@...nel.org>, linux-kernel@...r.kernel.org,
linux-perf-users@...r.kernel.org, kvm@...r.kernel.org,
linux-sgx@...r.kernel.org, linux-coco@...ts.linux.dev,
Kai Huang <kai.huang@...el.com>
Subject: Re: [PATCH 0/4] x86: Restrict KVM-induced symbol exports to KVM
On Wed, Nov 12, 2025 at 09:39:40AM -0800, Sean Christopherson wrote:
> Leverage and extend KVM's macro shenanigans to export symbols for KVM if
> and only if kvm{,-amd,intel}.ko is being built as a module, and only for
> the KVM modules that are being built.
>
> Note, this approach isn't 100% precise, as exports that are only strictly
> necessary for one of KVM's modules will get exported for all KVM modules.
> But I don't see any value in being super precise as it's not like kvm.ko is
> any more trustworthy tha kvm-{amd,intel}.ko (and it's easy to circumvent
> "for module" exports by abusing module names (in out-of-tree code)). And
> maintaining precise exports would likely be a nightmare (as would writing
> the macros to get the exports right).
>
> Patches 1-3 drop superfluous exports that I found while digging around for
> KVM-only exports.
>
> Sean Christopherson (4):
> x86/bugs: Drop unnecessary export of "x86_spec_ctrl_base"
> x86/mtrr: Drop unnecessary export of "mtrr_state"
> x86/mm: Drop unnecessary export of "ptdump_walk_pgd_level_debugfs"
> x86: Restrict KVM-induced symbol exports to KVM modules where
> obvious/possible
Nice!
Acked-by: Peter Zijlstra (Intel) <peterz@...radead.org>
Powered by blists - more mailing lists