Skip to content

Commit 1e54768

Browse files
committed
x86/tlb: Drop the _GPL from the cpu_tlbstate export
The recent changes for PTI touch cpu_tlbstate from various tlb_flush inlines. cpu_tlbstate is exported as GPL symbol, so this causes a regression when building out of tree drivers for certain graphics cards. Aside of that the export was wrong since it was introduced as it should have been EXPORT_PER_CPU_SYMBOL_GPL(). Use the correct PER_CPU export and drop the _GPL to restore the previous state which allows users to utilize the cards they payed for. As always I'm really thrilled to make this kind of change to support the #friends (or however the hot hashtag of today is spelled) from that closet sauce graphics corp. Fixes: 1e02ce4 ("x86: Store a per-cpu shadow copy of CR4") Fixes: 6fd166a ("x86/mm: Use/Fix PCID to optimize user/kernel switches") Reported-by: Kees Cook <[email protected]> Signed-off-by: Thomas Gleixner <[email protected]> Cc: Greg Kroah-Hartman <[email protected]> Cc: Peter Zijlstra <[email protected]> Cc: Andy Lutomirski <[email protected]> Cc: [email protected]
1 parent 42f3bdc commit 1e54768

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

arch/x86/mm/init.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -870,7 +870,7 @@ __visible DEFINE_PER_CPU_SHARED_ALIGNED(struct tlb_state, cpu_tlbstate) = {
870870
.next_asid = 1,
871871
.cr4 = ~0UL, /* fail hard if we screw up cr4 shadow initialization */
872872
};
873-
EXPORT_SYMBOL_GPL(cpu_tlbstate);
873+
EXPORT_PER_CPU_SYMBOL(cpu_tlbstate);
874874

875875
void update_cache_mode_entry(unsigned entry, enum page_cache_mode cache)
876876
{

0 commit comments

Comments
 (0)