Re: [PATCH v2] KVM: x86: Enforce use of EXPORT_SYMBOL_FOR_KVM_INTERNAL
From: Sean Christopherson
Date: Mon Jan 12 2026 - 12:40:26 EST
On Fri, 21 Nov 2025 11:05:14 -0800, Sean Christopherson wrote:
> Add a (gnarly) inline "script" in the Makefile to fail the build if there
> is EXPORT_SYMBOL_GPL or EXPORT_SYMBOL usage in virt/kvm or arch/x86/kvm
> beyond the known-good/expected exports for other modules. Remembering to
> use EXPORT_SYMBOL_FOR_KVM_INTERNAL is surprisingly difficult, and hoping
> to detect "bad" exports via code review is not a robust long-term strategy.
>
> Jump through a pile of hoops to coerce make into printing a human-friendly
> error message, with the offending files+lines cleanly separated.
>
> [...]
Applied to kvm-x86 misc, thanks!
[1/1] KVM: x86: Enforce use of EXPORT_SYMBOL_FOR_KVM_INTERNAL
https://github.com/kvm-x86/linux/commit/fc4d3a6558af
--
https://github.com/kvm-x86/linux/tree/next