Skip to contentSkip to conversation

x86/tboot: adjust Kconfig default

PATCH In review Jan Beulich 2 participants 7 messages Mar 3, 2022

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 x86/tboot: adjust Kconfig default

We shouldn't include unsupported code by default, with not even a means for its building to be disabled. Convert the dependency from merely affecting the prompt's visibility to a real one.

---
We could of course go further and make the default also account for DEBUG, as is done elsewhere.

xen/arch/x86/Kconfig +4 -3
@@ -193,14 +193,15 @@ config HVM_FEP
 	  If unsure, say N.
 
 config TBOOT
-	bool "Xen tboot support (UNSUPPORTED)" if UNSUPPORTED
-	default y if !PV_SHIM_EXCLUSIVE
+	bool "Xen tboot support (UNSUPPORTED)"
+	depends on UNSUPPORTED
+	default !PV_SHIM_EXCLUSIVE
 	select CRYPTO
 	---help---
 	  Allows support for Trusted Boot using the Intel(R) Trusted Execution
 	  Technology (TXT)
 
-	  If unsure, say Y.
+	  If unsure, stay with the default.
 
 choice
 	prompt "Alignment of Xen image"
Reviewed-by on v1 1/1
#1 lore raw
Quoted 8 lines · Jan Beulich

We shouldn't include unsupported code by default, with not even a means for its building to be disabled. Convert the dependency from merely affecting the prompt's visibility to a real one.

---
We could of course go further and make the default also account for DEBUG, as is done elsewhere.

As in you would like to adjust the default based on whether DEBUG is on or not? I guess my question is what motivation is there to adjust this selection if DEBUG is enabled or disabled?

Quoted 12 lines
xen/arch/x86/Kconfig +3 -2
@@ -193,14 +193,15 @@ config HVM_FEP
  	  If unsure, say N.
 
  config TBOOT
-	bool "Xen tboot support (UNSUPPORTED)" if UNSUPPORTED
-	default y if !PV_SHIM_EXCLUSIVE
+	bool "Xen tboot support (UNSUPPORTED)"
+	depends on UNSUPPORTED
+	default !PV_SHIM_EXCLUSIVE

xen/arch/x86/Kconfig config HVM_FEP · line 207

Quoted 10 lines
xen/arch/x86/Kconfig +1 -1
  	select CRYPTO
  	---help---
  	  Allows support for Trusted Boot using the Intel(R) Trusted Execution
  	  Technology (TXT)
 
-	  If unsure, say Y.
+	  If unsure, stay with the default.
 
  choice
  	prompt "Alignment of Xen image"

Outside of the debug question, I think the proposed change is good.

#2 lore raw

Jan,

FYI, I just noticed that Lukasz old intel email was used for this patch. I assume your tree just hasn't picked up the patch with his new email address. Copying him now so he can see your patch.

v/r,
dps

Quoted 35 lines · Daniel P. Smith
Quoted 8 lines · Jan Beulich

We shouldn't include unsupported code by default, with not even a means for its building to be disabled. Convert the dependency from merely affecting the prompt's visibility to a real one.

---
We could of course go further and make the default also account for DEBUG, as is done elsewhere.

As in you would like to adjust the default based on whether DEBUG is on or not? I guess my question is what motivation is there to adjust this selection if DEBUG is enabled or disabled?

Quoted 10 lines
xen/arch/x86/Kconfig +0 -0
@@ -193,14 +193,15 @@ config HVM_FEP

        If unsure, say N.
  config TBOOT
-    bool "Xen tboot support (UNSUPPORTED)" if UNSUPPORTED -    default y if !PV_SHIM_EXCLUSIVE
+    bool "Xen tboot support (UNSUPPORTED)"
+    depends on UNSUPPORTED
+    default !PV_SHIM_EXCLUSIVE

Quoted 9 lines

      select CRYPTO
      ---help---
        Allows support for Trusted Boot using the Intel(R) Trusted Execution Technology (TXT)
-      If unsure, say Y.
+      If unsure, stay with the default.
  choice
      prompt "Alignment of Xen image"

Outside of the debug question, I think the proposed change is good.

#3 lore raw
In reply to Daniel P. Smith
Quoted 5 lines · Daniel P. Smith
Quoted 4 lines · Jan Beulich

We shouldn't include unsupported code by default, with not even a means for its building to be disabled. Convert the dependency from merely affecting the prompt's visibility to a real one.

Quoted 8 lines
Quoted 4 lines

---
We could of course go further and make the default also account for DEBUG, as is done elsewhere.

As in you would like to adjust the default based on whether DEBUG is on or not? I guess my question is what motivation is there to adjust this selection if DEBUG is enabled or disabled?

This is to have functionality enabled unless overridden in debug builds.

Quoted 19 lines
Quoted 19 lines
xen/arch/x86/Kconfig +4 -3
@@ -193,14 +193,15 @@ config HVM_FEP
  	  If unsure, say N.
 
  config TBOOT
-	bool "Xen tboot support (UNSUPPORTED)" if UNSUPPORTED
-	default y if !PV_SHIM_EXCLUSIVE
+	bool "Xen tboot support (UNSUPPORTED)"
+	depends on UNSUPPORTED
+	default !PV_SHIM_EXCLUSIVE
  	select CRYPTO
  	---help---
  	  Allows support for Trusted Boot using the Intel(R) Trusted Execution
  	  Technology (TXT)
 
-	  If unsure, say Y.
+	  If unsure, stay with the default.
 
Quoted 7 lines

xen/arch/x86/Kconfig config HVM_FEP · line 207

Quoted 3 lines
xen/arch/x86/Kconfig +0 -0
  choice
  	prompt "Alignment of Xen image"

Outside of the debug question, I think the proposed change is good.

Thanks. I guess there's an 'o' missing though in the email address?

Jan

#4 lore raw
Quoted 11 lines · Jan Beulich
Quoted 10 lines · Daniel P. Smith
Quoted 8 lines · Jan Beulich

We shouldn't include unsupported code by default, with not even a means for its building to be disabled. Convert the dependency from merely affecting the prompt's visibility to a real one.

---
We could of course go further and make the default also account for DEBUG, as is done elsewhere.

Quoted 5 lines
Quoted 3 lines

As in you would like to adjust the default based on whether DEBUG is on or not? I guess my question is what motivation is there to adjust this selection if DEBUG is enabled or disabled?

This is to have functionality enabled unless overridden in debug builds.

Maybe I am misunderstanding you. If I am wanting to debug either TXT or a configuration with TXT on and I adjust my config to turn on debug, then I would have to go turn TXT back on. Is that correct? If that is the correct understanding, honestly that concerns me because if that is being done for other config options, it would create the situation where turning on debug to track down an issue would result in a different configuration than the one I was experiencing the issue.

Quoted 25 lines
Quoted 25 lines
Quoted 12 lines
xen/arch/x86/Kconfig +3 -2
@@ -193,14 +193,15 @@ config HVM_FEP
   	  If unsure, say N.
 
   config TBOOT
-	bool "Xen tboot support (UNSUPPORTED)" if UNSUPPORTED
-	default y if !PV_SHIM_EXCLUSIVE
+	bool "Xen tboot support (UNSUPPORTED)"
+	depends on UNSUPPORTED
+	default !PV_SHIM_EXCLUSIVE

xen/arch/x86/Kconfig config HVM_FEP · line 207

Quoted 10 lines
xen/arch/x86/Kconfig +1 -1
   	select CRYPTO
   	---help---
   	  Allows support for Trusted Boot using the Intel(R) Trusted Execution
   	  Technology (TXT)
 
-	  If unsure, say Y.
+	  If unsure, stay with the default.
 
   choice
   	prompt "Alignment of Xen image"

Outside of the debug question, I think the proposed change is good.

Quoted 3 lines
Quoted 1 line

Thanks. I guess there's an 'o' missing though in the email address?

Apologies for that, correct I missed the 'o' as I was typing it out.

v/r,
dps

#5 lore raw
Quoted 19 lines · Daniel P. Smith
Quoted 11 lines · Jan Beulich
Quoted 10 lines · Daniel P. Smith
Quoted 8 lines · Jan Beulich

We shouldn't include unsupported code by default, with not even a means for its building to be disabled. Convert the dependency from merely affecting the prompt's visibility to a real one.

---
We could of course go further and make the default also account for DEBUG, as is done elsewhere.

Quoted 5 lines
Quoted 3 lines

As in you would like to adjust the default based on whether DEBUG is on or not? I guess my question is what motivation is there to adjust this selection if DEBUG is enabled or disabled?

This is to have functionality enabled unless overridden in debug builds.

Quoted 7 lines

Maybe I am misunderstanding you. If I am wanting to debug either TXT or a configuration with TXT on and I adjust my config to turn on debug, then I would have to go turn TXT back on. Is that correct? If that is the correct understanding, honestly that concerns me because if that is being done for other config options, it would create the situation where turning on debug to track down an issue would result in a different configuration than the one I was experiencing the issue.

In the scenario that you describe (aiui), the default setting wouldn't make a difference: If you alter an existing .config by turning on DEBUG, the .config's existing TBOOT setting wouldn't change. Defaults matter only for items which have no values recorded yet. Plus - I'm suggesting to turn the option _on_ by default when DEBUG=y, not off.

Jan

#6 lore raw
Quoted 28 lines · Jan Beulich
Quoted 19 lines · Daniel P. Smith
Quoted 11 lines · Jan Beulich
Quoted 10 lines · Daniel P. Smith
Quoted 8 lines · Jan Beulich

We shouldn't include unsupported code by default, with not even a means for its building to be disabled. Convert the dependency from merely affecting the prompt's visibility to a real one.

---
We could of course go further and make the default also account for DEBUG, as is done elsewhere.

Quoted 5 lines
Quoted 3 lines

As in you would like to adjust the default based on whether DEBUG is on or not? I guess my question is what motivation is there to adjust this selection if DEBUG is enabled or disabled?

This is to have functionality enabled unless overridden in debug builds.

Quoted 7 lines

Maybe I am misunderstanding you. If I am wanting to debug either TXT or a configuration with TXT on and I adjust my config to turn on debug, then I would have to go turn TXT back on. Is that correct? If that is the correct understanding, honestly that concerns me because if that is being done for other config options, it would create the situation where turning on debug to track down an issue would result in a different configuration than the one I was experiencing the issue.

Quoted 5 lines

In the scenario that you describe (aiui), the default setting wouldn't make a difference: If you alter an existing .config by turning on DEBUG, the .config's existing TBOOT setting wouldn't change. Defaults matter only for items which have no values recorded yet. Plus - I'm suggesting to turn the option _on_ by default when DEBUG=y, not off.

Okay, I am following now. Apologies for taking so long. I think that would be fine as TXT/tboot should be benign if enabled but tboot is not used to start Xen.

v/r,
dps