xen: Fix incorrect taint constant
PATCH 1/1 xen: Fix incorrect taint constant
Insecure the word being looked for here. Especially given the nature of the sole caller, and the (correct) comment next to it.
I've left the taint constant as 'U' as it's a rather more user-visible.
---
CC: Jan Beulich <[email protected]>
CC: Roger Pau Monné <[email protected]>
CC: Wei Liu <[email protected]>
CC: Stefano Stabellini <[email protected]>
CC: Julien Grall <[email protected]>
CC: Volodymyr Babchuk <[email protected]>
CC: Bertrand Marquis <[email protected]>
I'm happy to change 'U' to 'I' if we think that no-one is going to be impacted by it. I just wasn't sure.
--- xen/arch/arm/cpuerrata.c | 2 +- xen/common/kernel.c | 2 +- xen/include/xen/lib.h | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-)
xen/arch/arm/cpuerrata.c +1 -1
@@ -695,7 +695,7 @@ void __init enable_errata_workarounds(void) "**** Only trusted guests should be used. ****\n");/* Taint the machine has being insecure */ - add_taint(TAINT_MACHINE_UNSECURE); + add_taint(TAINT_MACHINE_INSECURE); }#endif }
xen/common/kernel.c +1 -1
@@ -354,7 +354,7 @@ char *print_tainted(char *str)if ( tainted ) { snprintf(str, TAINT_STRING_MAX_LEN, "Tainted: %c%c%c%c%c%c", - tainted & TAINT_MACHINE_UNSECURE ? 'U' : ' ', + tainted & TAINT_MACHINE_INSECURE ? 'U' : ' ', tainted & TAINT_MACHINE_CHECK ? 'M' : ' ', tainted & TAINT_SYNC_CONSOLE ? 'C' : ' ', tainted & TAINT_ERROR_INJECT ? 'E' : ' ',
xen/include/xen/lib.h +1 -1
@@ -201,7 +201,7 @@ uint64_t muldiv64(uint64_t a, uint32_t b, uint32_t c);#define TAINT_MACHINE_CHECK (1u << 1)#define TAINT_ERROR_INJECT (1u << 2)#define TAINT_HVM_FEP (1u << 3) -#define TAINT_MACHINE_UNSECURE (1u << 4) +#define TAINT_MACHINE_INSECURE (1u << 4)#define TAINT_CPU_OUT_OF_SPEC (1u << 5)extern unsigned int tainted;#define TAINT_STRING_MAX_LEN 20
base-commit: 67fdffef9246c82cecd8db28838ed09e79e2528a
Signature · 1 line
2.30.2
Quoted 1 line · Andrew Cooper
Insecure the word being looked for here. Especially given the nature of the
Nit: Missing "is"?
Quoted 6 lines
sole caller, and the (correct) comment next to it.
I've left the taint constant as 'U' as it's a rather more user-visible.
Fixes 82c0d3d491cc ("xen: Add an unsecure Taint type")Signed-off-by Andrew Cooper <[email protected]>
Quoted 2 lines
I'm happy to change 'U' to 'I' if we think that no-one is going to be impacted by it. I just wasn't sure.
I agree with what you have done, i.e. leaving it as is.
Jan
Quoted 3 lines · Jan Beulich
Quoted 1 line · Andrew Cooper
Insecure the word being looked for here. Especially given the nature of the
Nit: Missing "is"?
Oops yes.
Quoted 8 lines
Quoted 7 lines
sole caller, and the (correct) comment next to it.
I've left the taint constant as 'U' as it's a rather more user-visible.
Fixes 82c0d3d491cc ("xen: Add an unsecure Taint type")Signed-off-by Andrew Cooper <[email protected]>Acked-by Jan Beulich <[email protected]>
Thanks, although I've got one extra hunk to add having just done the other half of the taint work.
xen/common/kernel.c +0 -0
@@ -344,7 +344,7 @@ unsigned int tainted;
* 'E' - An error (e.g. a machine check exceptions) has been injected. * 'H' - HVM forced emulation prefix is permitted.
* 'M' - Machine had a machine check experience.
- * 'U' - Platform is unsecure (usually due to an errata on the platform).
+ * 'U' - Platform is insecure (usually due to an errata on the platform). * 'S' - Out of spec CPU (One core has a feature incompatible with others).
*
* The string is overwritten by the next call to print_taint().
Quoted 3 lines
Quoted 2 lines
I'm happy to change 'U' to 'I' if we think that no-one is going to be impacted by it. I just wasn't sure.
I agree with what you have done, i.e. leaving it as is.
Yeah, I assumed that was going to be the preferred route.
~Andrew
Quoted 30 lines · Andrew Cooper
Quoted 3 lines · Jan Beulich
Quoted 1 line · Andrew Cooper
Insecure the word being looked for here. Especially given the nature of the
Nit: Missing "is"?
Oops yes.
Quoted 8 lines
Quoted 7 lines
sole caller, and the (correct) comment next to it.
I've left the taint constant as 'U' as it's a rather more user-visible.
Fixes 82c0d3d491cc ("xen: Add an unsecure Taint type")Signed-off-by Andrew Cooper <[email protected]>Acked-by Jan Beulich <[email protected]>Thanks, although I've got one extra hunk to add having just done the other half of the taint work.
xen/common/kernel.c +1
-1@@ -344,7 +344,7 @@ unsigned int tainted; * 'E' - An error (e.g. a machine check exceptions) has been injected. * 'H' - HVM forced emulation prefix is permitted. * 'M' - Machine had a machine check experience. - * 'U' - Platform is unsecure (usually due to an errata on the platform). + * 'U' - Platform is insecure (usually due to an errata on the platform). * 'S' - Out of spec CPU (One core has a feature incompatible with
Quoted 3 lines
others).
*
* The string is overwritten by the next call toprint_taint().
My ack (quite obviously) stands with this further adjustment.
Jan
Hi Andrew,
Quoted 4 lines · Andrew Cooper
Insecure the word being looked for here. Especially given the nature of the sole caller, and the (correct) comment next to it.
Good finding.
Quoted 2 lines
I've left the taint constant as 'U' as it's a rather more user-visible.
I would vote to change the U in I here as it will make it more coherent with the doc after your added fix for it.
Quoted 12 lines
Fixes 82c0d3d491cc ("xen: Add an unsecure Taint type")Signed-off-by Andrew Cooper <[email protected]>---
CC: Jan Beulich <[email protected]>
CC: Roger Pau Monné <[email protected]>
CC: Wei Liu <[email protected]>
CC: Stefano Stabellini <[email protected]>
CC: Julien Grall <[email protected]>
CC: Volodymyr Babchuk <[email protected]>
CC: Bertrand Marquis <[email protected]>
Quoted 2 lines
I'm happy to change 'U' to 'I' if we think that no-one is going to be impacted by it. I just wasn't sure.
Here i do not think many will be impacted so I would rather make this coherent.
Cheers
Bertrand
Quoted 50 lines
---
xen/arch/arm/cpuerrata.c | 2 +- xen/common/kernel.c | 2 +- xen/include/xen/lib.h | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-)xen/arch/arm/cpuerrata.c +1
-1@@ -695,7 +695,7 @@ void __init enable_errata_workarounds(void) "**** Only trusted guests should be used. ****\n");/* Taint the machine has being insecure */ - add_taint(TAINT_MACHINE_UNSECURE); + add_taint(TAINT_MACHINE_INSECURE); }#endif }xen/common/kernel.c +1
-1@@ -354,7 +354,7 @@ char *print_tainted(char *str)if ( tainted ) { snprintf(str, TAINT_STRING_MAX_LEN, "Tainted: %c%c%c%c%c%c", - tainted & TAINT_MACHINE_UNSECURE ? 'U' : ' ', + tainted & TAINT_MACHINE_INSECURE ? 'U' : ' ', tainted & TAINT_MACHINE_CHECK ? 'M' : ' ', tainted & TAINT_SYNC_CONSOLE ? 'C' : ' ', tainted & TAINT_ERROR_INJECT ? 'E' : ' ',xen/include/xen/lib.h +1
-1@@ -201,7 +201,7 @@ uint64_t muldiv64(uint64_t a, uint32_t b, uint32_t c);#define TAINT_MACHINE_CHECK (1u << 1)#define TAINT_ERROR_INJECT (1u << 2)#define TAINT_HVM_FEP (1u << 3) -#define TAINT_MACHINE_UNSECURE (1u << 4) +#define TAINT_MACHINE_INSECURE (1u << 4)#define TAINT_CPU_OUT_OF_SPEC (1u << 5)extern unsigned int tainted;#define TAINT_STRING_MAX_LEN 20base-commit:
67fdffef9246c82cecd8db28838ed09e79e2528aSignature · 1 line
2.30.2
Quoted 23 lines · Bertrand Marquis
Hi Andrew,
Quoted 4 lines · Andrew Cooper
Insecure the word being looked for here. Especially given the nature of the sole caller, and the (correct) comment next to it.
Good finding.
Quoted 1 line
I've left the taint constant as 'U' as it's a rather more user-visible.
I would vote to change the U in I here as it will make it more coherent with the doc after your added fix for it.
Quoted 11 lines
Fixes 82c0d3d491cc ("xen: Add an unsecure Taint type")Signed-off-by Andrew Cooper <[email protected]>---
CC: Jan Beulich <[email protected]>
CC: Roger Pau Monné <[email protected]>
CC: Wei Liu <[email protected]>
CC: Stefano Stabellini <[email protected]>
CC: Julien Grall <[email protected]>
CC: Volodymyr Babchuk <[email protected]>
CC: Bertrand Marquis <[email protected]>
Quoted 3 lines
Quoted 2 lines
I'm happy to change 'U' to 'I' if we think that no-one is going to be impacted by it. I just wasn't sure.
Here i do not think many will be impacted so I would rather make this coherent.
Ok. I'll submit a v2 with everything adjusted.
~Andrew