public inbox for linux-sgx@vger.kernel.org
 help / color / mirror / Atom feed
From: Peter Zijlstra <peterz@infradead.org>
To: Sean Christopherson <seanjc@google.com>
Cc: Andy Lutomirski <luto@kernel.org>,
	Thomas Gleixner <tglx@linutronix.de>,
	Ingo Molnar <mingo@redhat.com>, Borislav Petkov <bp@alien8.de>,
	Dave Hansen <dave.hansen@linux.intel.com>,
	x86@kernel.org, Xin Li <xin@zytor.com>,
	"H. Peter Anvin" <hpa@zytor.com>,
	Arnaldo Carvalho de Melo <acme@kernel.org>,
	Namhyung Kim <namhyung@kernel.org>,
	Paolo Bonzini <pbonzini@redhat.com>,
	Josh Poimboeuf <jpoimboe@kernel.org>,
	Jarkko Sakkinen <jarkko@kernel.org>,
	"Kirill A. Shutemov" <kas@kernel.org>,
	linux-kernel@vger.kernel.org, linux-perf-users@vger.kernel.org,
	kvm@vger.kernel.org, linux-sgx@vger.kernel.org,
	linux-coco@lists.linux.dev, Kai Huang <kai.huang@intel.com>
Subject: Re: [PATCH 0/4] x86: Restrict KVM-induced symbol exports to KVM
Date: Fri, 14 Nov 2025 10:03:28 +0100	[thread overview]
Message-ID: <20251114090328.GS278048@noisy.programming.kicks-ass.net> (raw)
In-Reply-To: <20251112173944.1380633-1-seanjc@google.com>

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@infradead.org>

      parent reply	other threads:[~2025-11-14  9:03 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-11-12 17:39 [PATCH 0/4] x86: Restrict KVM-induced symbol exports to KVM Sean Christopherson
2025-11-12 17:39 ` [PATCH 1/4] x86/bugs: Drop unnecessary export of "x86_spec_ctrl_base" Sean Christopherson
2025-11-12 17:39 ` [PATCH 2/4] x86/mtrr: Drop unnecessary export of "mtrr_state" Sean Christopherson
2025-11-12 17:39 ` [PATCH 3/4] x86/mm: Drop unnecessary export of "ptdump_walk_pgd_level_debugfs" Sean Christopherson
2025-11-12 17:39 ` [PATCH 4/4] x86: Restrict KVM-induced symbol exports to KVM modules where obvious/possible Sean Christopherson
2025-11-14  9:03 ` Peter Zijlstra [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20251114090328.GS278048@noisy.programming.kicks-ass.net \
    --to=peterz@infradead.org \
    --cc=acme@kernel.org \
    --cc=bp@alien8.de \
    --cc=dave.hansen@linux.intel.com \
    --cc=hpa@zytor.com \
    --cc=jarkko@kernel.org \
    --cc=jpoimboe@kernel.org \
    --cc=kai.huang@intel.com \
    --cc=kas@kernel.org \
    --cc=kvm@vger.kernel.org \
    --cc=linux-coco@lists.linux.dev \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-perf-users@vger.kernel.org \
    --cc=linux-sgx@vger.kernel.org \
    --cc=luto@kernel.org \
    --cc=mingo@redhat.com \
    --cc=namhyung@kernel.org \
    --cc=pbonzini@redhat.com \
    --cc=seanjc@google.com \
    --cc=tglx@linutronix.de \
    --cc=x86@kernel.org \
    --cc=xin@zytor.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox