Project

General

Profile

Actions

Bug #7706

closed

cpuid_pass2 can clobber leaf 7

Added by Robert Mustacchi almost 7 years ago. Updated almost 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 #1

Updated by Electric Monk almost 7 years ago

  • Status changed from New to Closed

git commit b8692e0c2f0c23ce751c0af9c1efb4391bfd00f2

commit  b8692e0c2f0c23ce751c0af9c1efb4391bfd00f2
Author: Robert Mustacchi <rm@joyent.com>
Date:   2017-01-04T01:28:10.000Z

    7706 cpuid_pass2 can clobber leaf 7
    Reviewed by: Jerry Jelinek <jerry.jelinek@joyent.com>
    Reviewed by: Toomas Soome <tsoome@me.com>
    Approved by: Richard Lowe <richlowe@richlowe.net>

Actions

Also available in: Atom PDF