Skip to contentSkip to conversation

mm/shadow: fix declaration of fetch_type_names

PATCH In review Roger Pau Monne 4 participants 6 messages Oct 17, 2017

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 mm/shadow: fix declaration of fetch_type_names

fetch_type_names usage is guarded by SHADOW_DEBUG_PROPAGATE in SHADOW_DEBUG, fix the declaration so it's also guarded by SHADOW_DEBUG_PROPAGATE instead of DEBUG_TRACE_DUMP.

---
Cc: Tim Deegan <[email protected]>
Cc: George Dunlap <[email protected]>
Cc: Jan Beulich <[email protected]>
Cc: Andrew Cooper <[email protected]>
Cc: Julien Grall <[email protected]>
---
IMHO, this is a simple compile-time fix, so it should be accepted for 4.10. Any breaking caused by this commit will be spotted at compile time.

---
 xen/arch/x86/mm/shadow/multi.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
xen/arch/x86/mm/shadow/multi.c +1 -1
index d540af11d7..9156382056 100644
@@ -77,7 +77,7 @@ typedef enum {
 
 extern const char *const fetch_type_names[];
 
-#if defined(DEBUG_TRACE_DUMP) && CONFIG_PAGING_LEVELS == GUEST_PAGING_LEVELS
+#if SHADOW_DEBUG_PROPAGATE && CONFIG_PAGING_LEVELS == GUEST_PAGING_LEVELS
 const char *const fetch_type_names[] = {
     [ft_prefetch]     = "prefetch",
     [ft_demand_read]  = "demand read",
Signature · 7 lines
2.13.5 (Apple Git-94)


_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xen.org/xen-devel
#1 lore raw

Fix Julien Grall address, sorry.

Quoted 35 lines · Roger Pau Monne

fetch_type_names usage is guarded by SHADOW_DEBUG_PROPAGATE in SHADOW_DEBUG, fix the declaration so it's also guarded by SHADOW_DEBUG_PROPAGATE instead of DEBUG_TRACE_DUMP.

---
Cc: Tim Deegan <[email protected]>
Cc: George Dunlap <[email protected]>
Cc: Jan Beulich <[email protected]>
Cc: Andrew Cooper <[email protected]>
Cc: Julien Grall <[email protected]>
---
IMHO, this is a simple compile-time fix, so it should be accepted for 4.10. Any breaking caused by this commit will be spotted at compile time.

---
 xen/arch/x86/mm/shadow/multi.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
xen/arch/x86/mm/shadow/multi.c +1 -1
index d540af11d7..9156382056 100644
@@ -77,7 +77,7 @@ typedef enum {
 
 extern const char *const fetch_type_names[];
 
-#if defined(DEBUG_TRACE_DUMP) && CONFIG_PAGING_LEVELS == GUEST_PAGING_LEVELS
+#if SHADOW_DEBUG_PROPAGATE && CONFIG_PAGING_LEVELS == GUEST_PAGING_LEVELS
 const char *const fetch_type_names[] = {
     [ft_prefetch]     = "prefetch",
     [ft_demand_read]  = "demand read",
Signature · 1 line
2.13.5 (Apple Git-94)

_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xen.org/xen-devel

Acked-by on v1 1/1
#2 lore raw
In reply to Roger Pau Monne
Quoted 5 lines · Roger Pau Monne

fetch_type_names usage is guarded by SHADOW_DEBUG_PROPAGATE in SHADOW_DEBUG, fix the declaration so it's also guarded by SHADOW_DEBUG_PROPAGATE instead of DEBUG_TRACE_DUMP.

Possibly worth noting that this is exposed by Clang when building with UBSAN ?

Either way, thanks for getting to the bottom of this issue.  (It's been on my TODO list to figure out for a rather long time.)

this should go into 4.10.

Quoted 19 lines

---
Cc: Tim Deegan <[email protected]>
Cc: George Dunlap <[email protected]>
Cc: Jan Beulich <[email protected]>
Cc: Andrew Cooper <[email protected]>
Cc: Julien Grall <[email protected]>
---
IMHO, this is a simple compile-time fix, so it should be accepted for 4.10. Any breaking caused by this commit will be spotted at compile time.

---
 xen/arch/x86/mm/shadow/multi.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
xen/arch/x86/mm/shadow/multi.c +0 -0
index d540af11d7..9156382056 100644

xen/arch/x86/mm/shadow/multi.c typedef enum { · line 83

Quoted 8 lines
xen/arch/x86/mm/shadow/multi.c +1 -1
@@ -77,7 +77,7 @@ typedef enum {
 
 extern const char *const fetch_type_names[];
 
-#if defined(DEBUG_TRACE_DUMP) && CONFIG_PAGING_LEVELS == GUEST_PAGING_LEVELS
+#if SHADOW_DEBUG_PROPAGATE && CONFIG_PAGING_LEVELS == GUEST_PAGING_LEVELS
 const char *const fetch_type_names[] = {
     [ft_prefetch]     = "prefetch",
     [ft_demand_read]  = "demand read",

_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xen.org/xen-devel

#3 lore raw
Quoted 9 lines · Andrew Cooper
Quoted 5 lines · Roger Pau Monne

fetch_type_names usage is guarded by SHADOW_DEBUG_PROPAGATE in SHADOW_DEBUG, fix the declaration so it's also guarded by SHADOW_DEBUG_PROPAGATE instead of DEBUG_TRACE_DUMP.

Possibly worth noting that this is exposed by Clang when building with UBSAN ?

Yes, I hope this can be done upon commit if there are no further changes required. I would add:

"Noted while building with clang and ubsan enabled"

Thanks, Roger.

_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xen.org/xen-devel

#4 lore raw
In reply to Andrew Cooper

Hi,

Quoted 7 lines · Andrew Cooper
Quoted 5 lines · Roger Pau Monne

fetch_type_names usage is guarded by SHADOW_DEBUG_PROPAGATE in SHADOW_DEBUG, fix the declaration so it's also guarded by SHADOW_DEBUG_PROPAGATE instead of DEBUG_TRACE_DUMP.

Quoted 8 lines

Possibly worth noting that this is exposed by Clang when building with UBSAN ?

Either way, thanks for getting to the bottom of this issue.  (It's been on my TODO list to figure out for a rather long time.)

this should go into 4.10.

Cheers,

Quoted 35 lines
Quoted 20 lines

---
Cc: Tim Deegan <[email protected]>
Cc: George Dunlap <[email protected]>
Cc: Jan Beulich <[email protected]>
Cc: Andrew Cooper <[email protected]>
Cc: Julien Grall <[email protected]>
---
IMHO, this is a simple compile-time fix, so it should be accepted for 4.10. Any breaking caused by this commit will be spotted at compile time.

---
  xen/arch/x86/mm/shadow/multi.c | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)
xen/arch/x86/mm/shadow/multi.c +0 -0
index d540af11d7..9156382056 100644

xen/arch/x86/mm/shadow/multi.c typedef enum { · line 83

Quoted 8 lines
xen/arch/x86/mm/shadow/multi.c +1 -1
@@ -77,7 +77,7 @@ typedef enum {
 
  extern const char *const fetch_type_names[];
 
-#if defined(DEBUG_TRACE_DUMP) && CONFIG_PAGING_LEVELS == GUEST_PAGING_LEVELS
+#if SHADOW_DEBUG_PROPAGATE && CONFIG_PAGING_LEVELS == GUEST_PAGING_LEVELS
  const char *const fetch_type_names[] = {
      [ft_prefetch]     = "prefetch",
      [ft_demand_read]  = "demand read",

_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xen.org/xen-devel

Signature · 6 lines
Julien Grall

_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xen.org/xen-devel
Acked-by on v1 1/1
#5 lore raw
In reply to Roger Pau Monne
Quoted 5 lines · Roger Pau Monne

fetch_type_names usage is guarded by SHADOW_DEBUG_PROPAGATE in SHADOW_DEBUG, fix the declaration so it's also guarded by SHADOW_DEBUG_PROPAGATE instead of DEBUG_TRACE_DUMP.

_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xen.org/xen-devel