Skip to contentSkip to conversation

gdbsx: prefer privcmd character device

PATCH In review Doug Goldstein 4 participants 5 messages Oct 31, 2017 – Nov 2, 2017

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 gdbsx: prefer privcmd character device

Prefer using the character device over the proc file if the character device exists.

CC Elena Ufimtseva <[email protected]>
CC Ian Jackson <[email protected]>
CC Stefano Stabellini <[email protected]>
CC Wei Liu <[email protected]>

---
So this was originally submitted with 9c89dc95201 and 7d418eab3b6 and was rejected since the goal was to convert gdbsx to use libxc but that hasn't happened. /dev/xen/privcmd should be preferred and this change makes that happen. It would be nice if we landed this with the plan to convert gdbsx happening when it happens.

---
 tools/debugger/gdbsx/xg/xg_main.c | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)
tools/debugger/gdbsx/xg/xg_main.c +5 -3
index 7ebf91435b..cc640d1d82 100644
@@ -126,9 +126,11 @@ xg_init()
     int flags, saved_errno;
 
     XGTRC("E\n");
-    if ((_dom0_fd=open("/proc/xen/privcmd", O_RDWR)) == -1) {
-        perror("Failed to open /proc/xen/privcmd\n");
-        return -1;
+    if ((_dom0_fd=open("/dev/xen/privcmd", O_RDWR)) == -1) {
+        if ((_dom0_fd=open("/proc/xen/privcmd", O_RDWR)) == -1) {
+            perror("Failed to open /dev/xen/privcmd or /proc/xen/privcmd\n");
+            return -1;
+        }
     }
     /* Although we return the file handle as the 'xc handle' the API
      * does not specify / guarentee that this integer is in fact
Signature · 7 lines
2.13.6


_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xen.org/xen-devel
#1 lore raw
Quoted 8 lines · Doug Goldstein

Prefer using the character device over the proc file if the character device exists.

CC Elena Ufimtseva <[email protected]>
CC Ian Jackson <[email protected]>
CC Stefano Stabellini <[email protected]>
CC Wei Liu <[email protected]>
Quoted 6 lines

---
So this was originally submitted with 9c89dc95201 and 7d418eab3b6 and was rejected since the goal was to convert gdbsx to use libxc but that hasn't happened. /dev/xen/privcmd should be preferred and this change makes that happen. It would be nice if we landed this with the plan to convert gdbsx happening when it happens.

Oh well... I think this is fine.

Elena has the final verdict.

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

Reviewed-by
#2 lore raw
Quoted 16 lines · Wei Liu
Quoted 8 lines · Doug Goldstein

Prefer using the character device over the proc file if the character device exists.

CC Elena Ufimtseva <[email protected]>
CC Ian Jackson <[email protected]>
CC Stefano Stabellini <[email protected]>
CC Wei Liu <[email protected]>
Quoted 6 lines

---
So this was originally submitted with 9c89dc95201 and 7d418eab3b6 and was rejected since the goal was to convert gdbsx to use libxc but that hasn't happened. /dev/xen/privcmd should be preferred and this change makes that happen. It would be nice if we landed this with the plan to convert gdbsx happening when it happens.

Quoted 3 lines

Oh well... I think this is fine.

Elena has the final verdict.

I think this is fine.
I will look into the conversion and relevant discussions if I find them and see what can be done.

Thanks!

Meanwhile,

Elena

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

#3 lore raw

Cc Julien and change tag. I think this is safe to be applied to 4.10.

Quoted 25 lines · Elena Ufimtseva
Quoted 16 lines · Wei Liu
Quoted 8 lines · Doug Goldstein

Prefer using the character device over the proc file if the character device exists.

CC Elena Ufimtseva <[email protected]>
CC Ian Jackson <[email protected]>
CC Stefano Stabellini <[email protected]>
CC Wei Liu <[email protected]>
Quoted 6 lines

---
So this was originally submitted with 9c89dc95201 and 7d418eab3b6 and was rejected since the goal was to convert gdbsx to use libxc but that hasn't happened. /dev/xen/privcmd should be preferred and this change makes that happen. It would be nice if we landed this with the plan to convert gdbsx happening when it happens.

Quoted 3 lines

Oh well... I think this is fine.

Elena has the final verdict.

I think this is fine.
I will look into the conversion and relevant discussions if I find them and see what can be done.

Quoted 6 lines

Thanks!

Meanwhile,

Elena

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

#4 lore raw

Hi Wei,

Quoted 1 line · Wei Liu

Cc Julien and change tag. I think this is safe to be applied to 4.10.

I agree.

Cheers,

Quoted 33 lines · Elena Ufimtseva
Quoted 31 lines · Wei Liu
Quoted 16 lines · Doug Goldstein
Quoted 8 lines

Prefer using the character device over the proc file if the character device exists.

CC Elena Ufimtseva <[email protected]>
CC Ian Jackson <[email protected]>
CC Stefano Stabellini <[email protected]>
CC Wei Liu <[email protected]>
Quoted 6 lines

---
So this was originally submitted with 9c89dc95201 and 7d418eab3b6 and was rejected since the goal was to convert gdbsx to use libxc but that hasn't happened. /dev/xen/privcmd should be preferred and this change makes that happen. It would be nice if we landed this with the plan to convert gdbsx happening when it happens.

Quoted 3 lines

Oh well... I think this is fine.

Elena has the final verdict.

I think this is fine.
I will look into the conversion and relevant discussions if I find them and see what can be done.

Thanks!

Meanwhile,

Elena

Signature · 6 lines
Julien Grall

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