sure it's possible, it's even trivial. boot with clearcpuid=156
-
-
Replying to @whitequark @CopperheadOS
It fundamentally needs to be possible, because an OS that doesn't support it (at context switch) has to be able to prevent userspace from using it.
1 reply 0 retweets 0 likes -
Replying to @RichFelker @whitequark
It needs to be able to communicate that it's unavailable so that userspace doesn't try to use it. It's good if it's possible to make it trap instead of doing anything (needed for this use case to be sane) but it's communicating it that matters for making userspace not break.
1 reply 0 retweets 0 likes -
Replying to @CopperheadOS @whitequark
Both are needed. If you can't make it trap, processes that shouldn't be able to communicate can use it as malicious covert channel.
1 reply 0 retweets 1 like -
Replying to @RichFelker @CopperheadOS
now that I look at it, clearcpuid only seems to affect /proc/cpuinfo, cpuid(1) still shows AVX as enabled... weird.
1 reply 0 retweets 0 likes -
Replying to @whitequark @RichFelker
Maybe noxsave works properly since it seems like it must for the reason
@RichFelker pointed out.2 replies 0 retweets 0 likes -
Replying to @CopperheadOS @RichFelker
I've rebooted with noxsave and AVX is still present in cpuid outputs (and I confirmed that the kernel uses fxsave via dmesg). weird.
1 reply 0 retweets 0 likes -
Replying to @whitequark @RichFelker
It traps if it's actually used though, right?
1 reply 0 retweets 0 likes -
-
ah yes, I figured it out. kernel never does cpuid emulation, only kvm can do that. and xsave has a bit in CR4.
1 reply 0 retweets 0 likes
I thought there was a MSR to mask cpuid..?
-
-
Replying to @RichFelker @CopperheadOS
I don't think Linux has any code that uses it.
0 replies 0 retweets 0 likesThanks. Twitter will use this to make your timeline better. UndoUndo
-
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.