Project

General

Profile

Actions

Bug #7706

closed

cpuid_pass2 can clobber leaf 7

Added by Robert Mustacchi about 7 years ago. Updated about 7 years ago.

Status:
Closed
Priority:
Normal
Category:
kernel
Start date:
2016-12-29
Due date:
% Done:

100%

Estimated time:
Difficulty:
Medium
Tags:
Gerrit CR:
External Bug:

Description

When we started adding support for CPUID features in leaf 7, we neglected to notice a part of what happens in cpuid_pass2. Importantly, it will re-enumerate all of the standard leaves. Leaf 7 is different from other cpuid leaves, in that it uses %eax to index into it, but then also uses %ecx to suggest a sub leaf to look at.

However, with certain newer systems, we actually have a value in %ecx being enumerated. This means that when we come back around to re-enumerate it in cpuid_pass2, we end up referring to an invalid leaf, which causes us to end up zeroing the entire set. This causes us to end up removing all the features on this leaf.

Actions

Also available in: Atom PDF