Setting constant-time mode CPU flag
On Intel chips (Ice Lake and later) and ARM64, a bit needs to be set in a CPU register to enforce constant-time execution. Linux plans to set this bit by default; Xen should do the same. See
https://lore.kernel.org/lkml/[email protected]/T/ for details. I recommend setting the bit unconditionally and ignoring guest attempts to change it.
Signature · 3 lines
Sincerely, Demi Marie Obenour (she/her/hers) Invisible Things Lab
Quoted 6 lines · Demi Marie Obenour
On Intel chips (Ice Lake and later) and ARM64, a bit needs to be set in a CPU register to enforce constant-time execution. Linux plans to set this bit by default; Xen should do the same. See
https://lore.kernel.org/lkml/[email protected]/T/ for details. I recommend setting the bit unconditionally and ignoring guest attempts to change it.
I don't think we ought to set it by default; I can see reasons why kernels may want to set it by default (providing a way to turn it off). In Xen what I think we need is exposure of the bit to be guest-controllable.
Jan
Quoted 10 lines · Jan Beulich
Quoted 6 lines · Demi Marie Obenour
On Intel chips (Ice Lake and later) and ARM64, a bit needs to be set in a CPU register to enforce constant-time execution. Linux plans to set this bit by default; Xen should do the same. See
https://lore.kernel.org/lkml/[email protected]/T/ for details. I recommend setting the bit unconditionally and ignoring guest attempts to change it.I don't think we ought to set it by default; I can see reasons why kernels may want to set it by default (providing a way to turn it off). In Xen what I think we need is exposure of the bit to be guest-controllable.
We absolutely should not have it set by default. It's a substantial overhead for something that is only applicable to code which otherwise crafted to be constant-time.
As for why Xen doesn't enumerate/virtualise it, that's because virtualising MSR_ARCH_CAPS for guests is still not working yet, so the feature can't be enumerated yet even if we did support context switching it.
~Andrew
Hi Demi,
Quoted 3 lines · Demi Marie Obenour
On Intel chips (Ice Lake and later) and ARM64, a bit needs to be set in
This bit would not change anything on Arm currently so nothing is required for now (and nothing has been done in Linux for ARM64).
Thanks a lot for notifying us.
Kind regards
Bertrand
Quoted 9 lines
a CPU register to enforce constant-time execution. Linux plans to set this bit by default; Xen should do the same. See
https://lore.kernel.org/lkml/[email protected]/T/ for details. I recommend setting the bit unconditionally and ignoring guest attempts to change it.Signature · 3 lines
Sincerely, Demi Marie Obenour (she/her/hers) Invisible Things Lab
Quoted 8 lines · Andrew Cooper
Quoted 7 lines · Jan Beulich
Quoted 6 lines · Demi Marie Obenour
On Intel chips (Ice Lake and later) and ARM64, a bit needs to be set in a CPU register to enforce constant-time execution. Linux plans to set this bit by default; Xen should do the same. See
https://lore.kernel.org/lkml/[email protected]/T/ for details. I recommend setting the bit unconditionally and ignoring guest attempts to change it.
Quoted 7 lines
Quoted 3 lines
I don't think we ought to set it by default; I can see reasons why kernels may want to set it by default (providing a way to turn it off). In Xen what I think we need is exposure of the bit to be guest-controllable.
We absolutely should not have it set by default. It's a substantial overhead for something that is only applicable to code which otherwise crafted to be constant-time.
Either Xen needs to set the bit by default, or guests need to both know the bit needs to be set and be able set it. Otherwise code that *is* intended to be constant-time has no way to protect itself.
Quoted 3 lines
As for why Xen doesn't enumerate/virtualise it, that's because virtualising
MSR_ARCH_CAPSfor guests is still not working yet, so the feature can't be enumerated yet even if we did support context switching it.
Intel and ARM64 guarantee that CPUs that do not enumerate this flag behave as if it is set unconditionally. Therefore, Xen’s current behavior on Intel is incorrect and insecure. On ARM64, it appears that the flag is currently a noop, but as this might change in the future, Xen should fix its behavior there too.
Without support for virtualising MSR_ARCH_CAPS, the only secure behavior for Xen on Intel is to unconditionally set the DIT bit. On ARM8.4+, the bit currently appears to be a no-op, but as a precautionary measure, Xen should either set or virtualise it.
Signature · 3 lines
Sincerely, Demi Marie Obenour (she/her/hers) Invisible Things Lab
Quoted 21 lines · Demi Marie Obenour
Quoted 8 lines · Andrew Cooper
Quoted 7 lines · Jan Beulich
Quoted 6 lines · Demi Marie Obenour
On Intel chips (Ice Lake and later) and ARM64, a bit needs to be set in a CPU register to enforce constant-time execution. Linux plans to set this bit by default; Xen should do the same. See
https://lore.kernel.org/lkml/[email protected]/T/ for details. I recommend setting the bit unconditionally and ignoring guest attempts to change it.Quoted 7 lines
Quoted 3 lines
I don't think we ought to set it by default; I can see reasons why kernels may want to set it by default (providing a way to turn it off). In Xen what I think we need is exposure of the bit to be guest-controllable.
We absolutely should not have it set by default. It's a substantial overhead for something that is only applicable to code which otherwise crafted to be constant-time.
Either Xen needs to set the bit by default, or guests need to both know the bit needs to be set and be able set it. Otherwise code that *is* intended to be constant-time has no way to protect itself.
Quoted 6 lines
Quoted 3 lines
As for why Xen doesn't enumerate/virtualise it, that's because virtualising
MSR_ARCH_CAPSfor guests is still not working yet, so the feature can't be enumerated yet even if we did support context switching it.Intel and ARM64 guarantee that CPUs that do not enumerate this flag behave as if it is set unconditionally.
I'm not qualified to talk about the Arm side, but may I ask what you've derived this statement from for Intel? The doc page referenced by the link you did provide (still in context above) specifically further links to a page listing instruction with data operand independent timing. All other instructions, as I conclude, have variable timing unless the bit in ARCH_CAPS enumerates DOITM and then the new MSR bit (of the same name) is set.
Jan
Quoted 29 lines · Jan Beulich
Quoted 21 lines · Demi Marie Obenour
Quoted 8 lines · Andrew Cooper
Quoted 7 lines · Jan Beulich
Quoted 6 lines · Demi Marie Obenour
On Intel chips (Ice Lake and later) and ARM64, a bit needs to be set in a CPU register to enforce constant-time execution. Linux plans to set this bit by default; Xen should do the same. See
https://lore.kernel.org/lkml/[email protected]/T/ for details. I recommend setting the bit unconditionally and ignoring guest attempts to change it.Quoted 7 lines
Quoted 3 lines
I don't think we ought to set it by default; I can see reasons why kernels may want to set it by default (providing a way to turn it off). In Xen what I think we need is exposure of the bit to be guest-controllable.
We absolutely should not have it set by default. It's a substantial overhead for something that is only applicable to code which otherwise crafted to be constant-time.
Either Xen needs to set the bit by default, or guests need to both know the bit needs to be set and be able set it. Otherwise code that *is* intended to be constant-time has no way to protect itself.
Quoted 6 lines
Quoted 3 lines
As for why Xen doesn't enumerate/virtualise it, that's because virtualising
MSR_ARCH_CAPSfor guests is still not working yet, so the feature can't be enumerated yet even if we did support context switching it.Intel and ARM64 guarantee that CPUs that do not enumerate this flag behave as if it is set unconditionally.
Quoted 7 lines
I'm not qualified to talk about the Arm side, but may I ask what you've derived this statement from for Intel? The doc page referenced by the link you did provide (still in context above) specifically further links to a page listing instruction with data operand independent timing. All other instructions, as I conclude, have variable timing unless the bit in
ARCH_CAPSenumerates DOITM and then the new MSR bit (of the same name) is set.
My understanding is that only instructions in the constant-time subset are ever guaranteed to be constant time. On architectures where DOITM is not enumerated, this guarantee is unconditional. On architectures where DOITM is enumerated, this guarantee only holds when DOITM is set. Therefore, it is critical that on CPUs that enumerate DOITM, Xen does one of the following:
- Ensure that all vCPUs enumerate DOITM, and virtualize the DOITM MSR bit for use by guests.
- Set DOITM by default.
Since Xen does not support virtualizing MSR_ARCH_CAPS, vCPUs cannot enumerate DOITM. Therefore, the only secure option is to set DOITM by default, so that guests do not need to be aware of it.
Signature · 3 lines
Sincerely, Demi Marie Obenour (she/her/hers) Invisible Things Lab
Quoted 38 lines · Demi Marie Obenour
Quoted 29 lines · Jan Beulich
Quoted 21 lines · Demi Marie Obenour
Quoted 8 lines · Andrew Cooper
Quoted 7 lines · Jan Beulich
Quoted 6 lines · Demi Marie Obenour
On Intel chips (Ice Lake and later) and ARM64, a bit needs to be set in a CPU register to enforce constant-time execution. Linux plans to set this bit by default; Xen should do the same. See
https://lore.kernel.org/lkml/[email protected]/T/ for details. I recommend setting the bit unconditionally and ignoring guest attempts to change it.Quoted 7 lines
Quoted 3 lines
I don't think we ought to set it by default; I can see reasons why kernels may want to set it by default (providing a way to turn it off). In Xen what I think we need is exposure of the bit to be guest-controllable.
We absolutely should not have it set by default. It's a substantial overhead for something that is only applicable to code which otherwise crafted to be constant-time.
Either Xen needs to set the bit by default, or guests need to both know the bit needs to be set and be able set it. Otherwise code that *is* intended to be constant-time has no way to protect itself.
Quoted 6 lines
Quoted 3 lines
As for why Xen doesn't enumerate/virtualise it, that's because virtualising
MSR_ARCH_CAPSfor guests is still not working yet, so the feature can't be enumerated yet even if we did support context switching it.Intel and ARM64 guarantee that CPUs that do not enumerate this flag behave as if it is set unconditionally.
Quoted 7 lines
I'm not qualified to talk about the Arm side, but may I ask what you've derived this statement from for Intel? The doc page referenced by the link you did provide (still in context above) specifically further links to a page listing instruction with data operand independent timing. All other instructions, as I conclude, have variable timing unless the bit in
ARCH_CAPSenumerates DOITM and then the new MSR bit (of the same name) is set.
Quoted 2 lines
My understanding is that only instructions in the constant-time subset are ever guaranteed to be constant time.
Hmm, yes, I did overlook respective wording in the doc.
Quoted 2 lines
On architectures where DOITM
is not enumerated, this guarantee is unconditional.
I have to admit I'm suspicious of this "guarantee".
Quoted 5 lines
On architectures
where DOITM is enumerated, this guarantee only holds when DOITM is set. Therefore, it is critical that on CPUs that enumerate DOITM, Xen does one of the following:
Quoted 8 lines
- Ensure that all vCPUs enumerate DOITM, and virtualize the DOITM MSR bit for use by guests.
- Set DOITM by default.
Since Xen does not support virtualizing
MSR_ARCH_CAPS, vCPUs cannot enumerate DOITM. Therefore, the only secure option is to set DOITM by default, so that guests do not need to be aware of it.
I can see where you're coming from, but I also agree with Andrew that the resulting loss of performance is a counter-indication to making this the (universal) default. What I could see us doing is make this both Kconfig and command line controllable.
Jan
Quoted 42 lines · Jan Beulich
Quoted 38 lines · Demi Marie Obenour
Quoted 29 lines · Jan Beulich
Quoted 21 lines · Demi Marie Obenour
Quoted 8 lines · Andrew Cooper
Quoted 7 lines · Jan Beulich
Quoted 6 lines · Demi Marie Obenour
On Intel chips (Ice Lake and later) and ARM64, a bit needs to be set in a CPU register to enforce constant-time execution. Linux plans to set this bit by default; Xen should do the same. See
https://lore.kernel.org/lkml/[email protected]/T/ for details. I recommend setting the bit unconditionally and ignoring guest attempts to change it.Quoted 7 lines
Quoted 3 lines
I don't think we ought to set it by default; I can see reasons why kernels may want to set it by default (providing a way to turn it off). In Xen what I think we need is exposure of the bit to be guest-controllable.
We absolutely should not have it set by default. It's a substantial overhead for something that is only applicable to code which otherwise crafted to be constant-time.
Either Xen needs to set the bit by default, or guests need to both know the bit needs to be set and be able set it. Otherwise code that *is* intended to be constant-time has no way to protect itself.
Quoted 6 lines
Quoted 3 lines
As for why Xen doesn't enumerate/virtualise it, that's because virtualising
MSR_ARCH_CAPSfor guests is still not working yet, so the feature can't be enumerated yet even if we did support context switching it.Intel and ARM64 guarantee that CPUs that do not enumerate this flag behave as if it is set unconditionally.
Quoted 7 lines
I'm not qualified to talk about the Arm side, but may I ask what you've derived this statement from for Intel? The doc page referenced by the link you did provide (still in context above) specifically further links to a page listing instruction with data operand independent timing. All other instructions, as I conclude, have variable timing unless the bit in
ARCH_CAPSenumerates DOITM and then the new MSR bit (of the same name) is set.Quoted 2 lines
My understanding is that only instructions in the constant-time subset are ever guaranteed to be constant time.
Quoted 6 lines
Hmm, yes, I did overlook respective wording in the doc.
Quoted 2 lines
On architectures where DOITM
is not enumerated, this guarantee is unconditional.I have to admit I'm suspicious of this "guarantee".
Do you mean that previous CPUs had a vulnerability that has no fix?
Quoted 10 lines
Quoted 10 lines
On architectures
where DOITM is enumerated, this guarantee only holds when DOITM is set. Therefore, it is critical that on CPUs that enumerate DOITM, Xen does one of the following:- Ensure that all vCPUs enumerate DOITM, and virtualize the DOITM MSR bit for use by guests.
- Set DOITM by default.
Quoted 8 lines
Quoted 3 lines
Since Xen does not support virtualizing
MSR_ARCH_CAPS, vCPUs cannot enumerate DOITM. Therefore, the only secure option is to set DOITM by default, so that guests do not need to be aware of it.I can see where you're coming from, but I also agree with Andrew that the resulting loss of performance is a counter-indication to making this the (universal) default. What I could see us doing is make this both
Kconfigand command line controllable.
How large is the loss of performance? Linux seems to be setting the flag unconditionally, so I think my point about guests needing to be able to ensure the flag is set stands. The default can be changed once Xen gets support for virtualizing the bit properly, but until then unconditionally setting DOITM seems to be the only safe option.
Signature · 3 lines
Sincerely, Demi Marie Obenour (she/her/hers) Invisible Things Lab
Quoted 43 lines · Demi Marie Obenour
Quoted 42 lines · Jan Beulich
Quoted 40 lines · Demi Marie Obenour
Quoted 29 lines · Jan Beulich
Quoted 21 lines · Demi Marie Obenour
Quoted 8 lines · Andrew Cooper
Quoted 7 lines · Jan Beulich
Quoted 6 lines · Demi Marie Obenour
On Intel chips (Ice Lake and later) and ARM64, a bit needs to be set in a CPU register to enforce constant-time execution. Linux plans to set this bit by default; Xen should do the same. See
https://lore.kernel.org/lkml/[email protected]/T/ for details. I recommend setting the bit unconditionally and ignoring guest attempts to change it.Quoted 7 lines
Quoted 3 lines
I don't think we ought to set it by default; I can see reasons why kernels may want to set it by default (providing a way to turn it off). In Xen what I think we need is exposure of the bit to be guest-controllable.
We absolutely should not have it set by default. It's a substantial overhead for something that is only applicable to code which otherwise crafted to be constant-time.
Either Xen needs to set the bit by default, or guests need to both know the bit needs to be set and be able set it. Otherwise code that *is* intended to be constant-time has no way to protect itself.
Quoted 6 lines
Quoted 3 lines
As for why Xen doesn't enumerate/virtualise it, that's because virtualising
MSR_ARCH_CAPSfor guests is still not working yet, so the feature can't be enumerated yet even if we did support context switching it.Intel and ARM64 guarantee that CPUs that do not enumerate this flag behave as if it is set unconditionally.
Quoted 7 lines
I'm not qualified to talk about the Arm side, but may I ask what you've derived this statement from for Intel? The doc page referenced by the link you did provide (still in context above) specifically further links to a page listing instruction with data operand independent timing. All other instructions, as I conclude, have variable timing unless the bit in
ARCH_CAPSenumerates DOITM and then the new MSR bit (of the same name) is set.My understanding is that only instructions in the constant-time subset are ever guaranteed to be constant time.
Quoted 8 lines
Quoted 6 lines
Hmm, yes, I did overlook respective wording in the doc.
Quoted 2 lines
On architectures where DOITM
is not enumerated, this guarantee is unconditional.I have to admit I'm suspicious of this "guarantee".
Do you mean that previous CPUs had a vulnerability that has no fix?
I'm not sure I'd call it a vulnerability, but at least if going back far enough in history I think you'll find insns on the list which don't have invariant timing. Like with other documentation on e.g. speculation issues I take it that Intel simply doesn't consider sufficiently old CPUs relevant anymore for such new documents.
Quoted 14 lines
Quoted 14 lines
Quoted 13 lines
On architectures
where DOITM is enumerated, this guarantee only holds when DOITM is set. Therefore, it is critical that on CPUs that enumerate DOITM, Xen does one of the following:- Ensure that all vCPUs enumerate DOITM, and virtualize the DOITM MSR bit for use by guests.
- Set DOITM by default.
Since Xen does not support virtualizing
MSR_ARCH_CAPS, vCPUs cannot enumerate DOITM. Therefore, the only secure option is to set DOITM by default, so that guests do not need to be aware of it.
Quoted 6 lines
Quoted 4 lines
I can see where you're coming from, but I also agree with Andrew that the resulting loss of performance is a counter-indication to making this the (universal) default. What I could see us doing is make this both
Kconfigand command line controllable.How large is the loss of performance?
I have no (practical) way to know.
Jan
Quoted 5 lines
Linux seems to be setting the
flag unconditionally, so I think my point about guests needing to be able to ensure the flag is set stands. The default can be changed once Xen gets support for virtualizing the bit properly, but until then unconditionally setting DOITM seems to be the only safe option.
Quoted 51 lines · Jan Beulich
Quoted 50 lines · Demi Marie Obenour
Quoted 48 lines · Jan Beulich
Quoted 38 lines · Demi Marie Obenour
Quoted 29 lines · Jan Beulich
Quoted 21 lines · Demi Marie Obenour
Quoted 8 lines · Andrew Cooper
Quoted 7 lines · Jan Beulich
Quoted 6 lines · Demi Marie Obenour
On Intel chips (Ice Lake and later) and ARM64, a bit needs to be set in a CPU register to enforce constant-time execution. Linux plans to set this bit by default; Xen should do the same. See
https://lore.kernel.org/lkml/[email protected]/T/ for details. I recommend setting the bit unconditionally and ignoring guest attempts to change it.Quoted 7 lines
Quoted 3 lines
I don't think we ought to set it by default; I can see reasons why kernels may want to set it by default (providing a way to turn it off). In Xen what I think we need is exposure of the bit to be guest-controllable.
We absolutely should not have it set by default. It's a substantial overhead for something that is only applicable to code which otherwise crafted to be constant-time.
Either Xen needs to set the bit by default, or guests need to both know the bit needs to be set and be able set it. Otherwise code that *is* intended to be constant-time has no way to protect itself.
Quoted 6 lines
Quoted 3 lines
As for why Xen doesn't enumerate/virtualise it, that's because virtualising
MSR_ARCH_CAPSfor guests is still not working yet, so the feature can't be enumerated yet even if we did support context switching it.Intel and ARM64 guarantee that CPUs that do not enumerate this flag behave as if it is set unconditionally.
Quoted 7 lines
I'm not qualified to talk about the Arm side, but may I ask what you've derived this statement from for Intel? The doc page referenced by the link you did provide (still in context above) specifically further links to a page listing instruction with data operand independent timing. All other instructions, as I conclude, have variable timing unless the bit in
ARCH_CAPSenumerates DOITM and then the new MSR bit (of the same name) is set.Quoted 2 lines
My understanding is that only instructions in the constant-time subset are ever guaranteed to be constant time.
Hmm, yes, I did overlook respective wording in the doc.
Quoted 2 lines
On architectures where DOITM
is not enumerated, this guarantee is unconditional.I have to admit I'm suspicious of this "guarantee".
Quoted 7 lines
Quoted 1 line
Do you mean that previous CPUs had a vulnerability that has no fix?
I'm not sure I'd call it a vulnerability, but at least if going back far enough in history I think you'll find insns on the list which don't have invariant timing. Like with other documentation on e.g. speculation issues I take it that Intel simply doesn't consider sufficiently old CPUs relevant anymore for such new documents.
Any examples?
Signature · 3 lines
Sincerely, Demi Marie Obenour (she/her/hers) Invisible Things Lab
Quoted 54 lines · Demi Marie Obenour
Quoted 53 lines · Jan Beulich
Quoted 51 lines · Demi Marie Obenour
Quoted 42 lines · Jan Beulich
Quoted 38 lines · Demi Marie Obenour
Quoted 29 lines · Jan Beulich
Quoted 21 lines · Demi Marie Obenour
Quoted 8 lines · Andrew Cooper
Quoted 7 lines · Jan Beulich
Quoted 6 lines · Demi Marie Obenour
On Intel chips (Ice Lake and later) and ARM64, a bit needs to be set in a CPU register to enforce constant-time execution. Linux plans to set this bit by default; Xen should do the same. See
https://lore.kernel.org/lkml/[email protected]/T/ for details. I recommend setting the bit unconditionally and ignoring guest attempts to change it.Quoted 7 lines
Quoted 3 lines
I don't think we ought to set it by default; I can see reasons why kernels may want to set it by default (providing a way to turn it off). In Xen what I think we need is exposure of the bit to be guest-controllable.
We absolutely should not have it set by default. It's a substantial overhead for something that is only applicable to code which otherwise crafted to be constant-time.
Either Xen needs to set the bit by default, or guests need to both know the bit needs to be set and be able set it. Otherwise code that *is* intended to be constant-time has no way to protect itself.
Quoted 6 lines
Quoted 3 lines
As for why Xen doesn't enumerate/virtualise it, that's because virtualising
MSR_ARCH_CAPSfor guests is still not working yet, so the feature can't be enumerated yet even if we did support context switching it.Intel and ARM64 guarantee that CPUs that do not enumerate this flag behave as if it is set unconditionally.
Quoted 7 lines
I'm not qualified to talk about the Arm side, but may I ask what you've derived this statement from for Intel? The doc page referenced by the link you did provide (still in context above) specifically further links to a page listing instruction with data operand independent timing. All other instructions, as I conclude, have variable timing unless the bit in
ARCH_CAPSenumerates DOITM and then the new MSR bit (of the same name) is set.Quoted 2 lines
My understanding is that only instructions in the constant-time subset are ever guaranteed to be constant time.
Quoted 6 lines
Hmm, yes, I did overlook respective wording in the doc.
Quoted 2 lines
On architectures where DOITM
is not enumerated, this guarantee is unconditional.I have to admit I'm suspicious of this "guarantee".
Do you mean that previous CPUs had a vulnerability that has no fix?
Quoted 7 lines
Quoted 5 lines
I'm not sure I'd call it a vulnerability, but at least if going back far enough in history I think you'll find insns on the list which don't have invariant timing. Like with other documentation on e.g. speculation issues I take it that Intel simply doesn't consider sufficiently old CPUs relevant anymore for such new documents.
Any examples?
The one I easily recall in truly ancient, so maybe of only limited
significance: MUL on 486 and older.
Jan
Quoted 61 lines · Jan Beulich
Quoted 60 lines · Demi Marie Obenour
Quoted 58 lines · Jan Beulich
Quoted 43 lines · Demi Marie Obenour
Quoted 42 lines · Jan Beulich
Quoted 40 lines · Demi Marie Obenour
Quoted 29 lines · Jan Beulich
Quoted 21 lines · Demi Marie Obenour
Quoted 8 lines · Andrew Cooper
Quoted 7 lines · Jan Beulich
Quoted 6 lines · Demi Marie Obenour
On Intel chips (Ice Lake and later) and ARM64, a bit needs to be set in a CPU register to enforce constant-time execution. Linux plans to set this bit by default; Xen should do the same. See
https://lore.kernel.org/lkml/[email protected]/T/ for details. I recommend setting the bit unconditionally and ignoring guest attempts to change it.Quoted 7 lines
Quoted 3 lines
I don't think we ought to set it by default; I can see reasons why kernels may want to set it by default (providing a way to turn it off). In Xen what I think we need is exposure of the bit to be guest-controllable.
We absolutely should not have it set by default. It's a substantial overhead for something that is only applicable to code which otherwise crafted to be constant-time.
Either Xen needs to set the bit by default, or guests need to both know the bit needs to be set and be able set it. Otherwise code that *is* intended to be constant-time has no way to protect itself.
Quoted 6 lines
Quoted 3 lines
As for why Xen doesn't enumerate/virtualise it, that's because virtualising
MSR_ARCH_CAPSfor guests is still not working yet, so the feature can't be enumerated yet even if we did support context switching it.Intel and ARM64 guarantee that CPUs that do not enumerate this flag behave as if it is set unconditionally.
Quoted 7 lines
I'm not qualified to talk about the Arm side, but may I ask what you've derived this statement from for Intel? The doc page referenced by the link you did provide (still in context above) specifically further links to a page listing instruction with data operand independent timing. All other instructions, as I conclude, have variable timing unless the bit in
ARCH_CAPSenumerates DOITM and then the new MSR bit (of the same name) is set.My understanding is that only instructions in the constant-time subset are ever guaranteed to be constant time.
Quoted 8 lines
Quoted 6 lines
Hmm, yes, I did overlook respective wording in the doc.
Quoted 2 lines
On architectures where DOITM
is not enumerated, this guarantee is unconditional.I have to admit I'm suspicious of this "guarantee".
Do you mean that previous CPUs had a vulnerability that has no fix?
I'm not sure I'd call it a vulnerability, but at least if going back far enough in history I think you'll find insns on the list which don't have invariant timing. Like with other documentation on e.g. speculation issues I take it that Intel simply doesn't consider sufficiently old CPUs relevant anymore for such new documents.
Quoted 4 lines
Quoted 1 line
Any examples?
The one I easily recall in truly ancient, so maybe of only limited
significance: MUL on 486 and older.
That is of very limited significance indeed.
Signature · 3 lines
Sincerely, Demi Marie Obenour (she/her/hers) Invisible Things Lab