All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] gdbsx: prefer privcmd character device
@ 2017-10-31 15:20 Doug Goldstein
  2017-10-31 15:25 ` Wei Liu
  0 siblings, 1 reply; 5+ messages in thread
From: Doug Goldstein @ 2017-10-31 15:20 UTC (permalink / raw)
  To: xen-devel
  Cc: Elena Ufimtseva, Ian Jackson, Doug Goldstein, Wei Liu,
	Stefano Stabellini

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

CC: Elena Ufimtseva <elena.ufimtseva@oracle.com>
CC: Ian Jackson <ian.jackson@eu.citrix.com>
CC: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
CC: Wei Liu <wei.liu2@citrix.com>
Signed-off-by: Doug Goldstein <cardoe@cardoe.com>
---
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(-)

diff --git a/tools/debugger/gdbsx/xg/xg_main.c b/tools/debugger/gdbsx/xg/xg_main.c
index 7ebf91435b..cc640d1d82 100644
--- a/tools/debugger/gdbsx/xg/xg_main.c
+++ b/tools/debugger/gdbsx/xg/xg_main.c
@@ -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
-- 
2.13.6


_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
https://lists.xen.org/xen-devel

^ permalink raw reply related	[flat|nested] 5+ messages in thread

* Re: [PATCH] gdbsx: prefer privcmd character device
  2017-10-31 15:20 [PATCH] gdbsx: prefer privcmd character device Doug Goldstein
@ 2017-10-31 15:25 ` Wei Liu
  2017-10-31 20:58   ` Elena Ufimtseva
  0 siblings, 1 reply; 5+ messages in thread
From: Wei Liu @ 2017-10-31 15:25 UTC (permalink / raw)
  To: Doug Goldstein
  Cc: Elena Ufimtseva, xen-devel, Ian Jackson, Wei Liu, Stefano Stabellini

On Tue, Oct 31, 2017 at 10:20:11AM -0500, Doug Goldstein wrote:
> Prefer using the character device over the proc file if the character
> device exists.
> 
> CC: Elena Ufimtseva <elena.ufimtseva@oracle.com>
> CC: Ian Jackson <ian.jackson@eu.citrix.com>
> CC: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
> CC: Wei Liu <wei.liu2@citrix.com>
> Signed-off-by: Doug Goldstein <cardoe@cardoe.com>
> ---
> 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
Xen-devel@lists.xen.org
https://lists.xen.org/xen-devel

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] gdbsx: prefer privcmd character device
  2017-10-31 15:25 ` Wei Liu
@ 2017-10-31 20:58   ` Elena Ufimtseva
  2017-11-01 10:20     ` [PATCH for-4.10] " Wei Liu
  0 siblings, 1 reply; 5+ messages in thread
From: Elena Ufimtseva @ 2017-10-31 20:58 UTC (permalink / raw)
  To: Wei Liu; +Cc: xen-devel, Doug Goldstein, Ian Jackson, Stefano Stabellini

On Tue, Oct 31, 2017 at 03:25:39PM +0000, Wei Liu wrote:
> On Tue, Oct 31, 2017 at 10:20:11AM -0500, Doug Goldstein wrote:
> > Prefer using the character device over the proc file if the character
> > device exists.
> > 
> > CC: Elena Ufimtseva <elena.ufimtseva@oracle.com>
> > CC: Ian Jackson <ian.jackson@eu.citrix.com>
> > CC: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
> > CC: Wei Liu <wei.liu2@citrix.com>
> > Signed-off-by: Doug Goldstein <cardoe@cardoe.com>
> > ---
> > 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.

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,
Reviewed-by: Elena Ufimtseva <elena.ufimtseva@oracle.com>

Elena

_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
https://lists.xen.org/xen-devel

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH for-4.10] gdbsx: prefer privcmd character device
  2017-10-31 20:58   ` Elena Ufimtseva
@ 2017-11-01 10:20     ` Wei Liu
  2017-11-02 15:16       ` Julien Grall
  0 siblings, 1 reply; 5+ messages in thread
From: Wei Liu @ 2017-11-01 10:20 UTC (permalink / raw)
  To: Elena Ufimtseva
  Cc: Wei Liu, Stefano Stabellini, Ian Jackson, Julien Grall,
	Doug Goldstein, xen-devel

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

On Tue, Oct 31, 2017 at 01:58:07PM -0700, Elena Ufimtseva wrote:
> On Tue, Oct 31, 2017 at 03:25:39PM +0000, Wei Liu wrote:
> > On Tue, Oct 31, 2017 at 10:20:11AM -0500, Doug Goldstein wrote:
> > > Prefer using the character device over the proc file if the character
> > > device exists.
> > > 
> > > CC: Elena Ufimtseva <elena.ufimtseva@oracle.com>
> > > CC: Ian Jackson <ian.jackson@eu.citrix.com>
> > > CC: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
> > > CC: Wei Liu <wei.liu2@citrix.com>
> > > Signed-off-by: Doug Goldstein <cardoe@cardoe.com>
> > > ---
> > > 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.
> 
> 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,
> Reviewed-by: Elena Ufimtseva <elena.ufimtseva@oracle.com>
> 
> Elena

_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
https://lists.xen.org/xen-devel

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH for-4.10] gdbsx: prefer privcmd character device
  2017-11-01 10:20     ` [PATCH for-4.10] " Wei Liu
@ 2017-11-02 15:16       ` Julien Grall
  0 siblings, 0 replies; 5+ messages in thread
From: Julien Grall @ 2017-11-02 15:16 UTC (permalink / raw)
  To: Wei Liu, Elena Ufimtseva
  Cc: xen-devel, Doug Goldstein, Ian Jackson, Stefano Stabellini

Hi Wei,

On 01/11/17 10:20, Wei Liu wrote:
> Cc Julien and change tag. I think this is safe to be applied to 4.10.

I agree.

Release-acked-by: Julien Grall <julien.grall@linaro.org>

Cheers,

> 
> On Tue, Oct 31, 2017 at 01:58:07PM -0700, Elena Ufimtseva wrote:
>> On Tue, Oct 31, 2017 at 03:25:39PM +0000, Wei Liu wrote:
>>> On Tue, Oct 31, 2017 at 10:20:11AM -0500, Doug Goldstein wrote:
>>>> Prefer using the character device over the proc file if the character
>>>> device exists.
>>>>
>>>> CC: Elena Ufimtseva <elena.ufimtseva@oracle.com>
>>>> CC: Ian Jackson <ian.jackson@eu.citrix.com>
>>>> CC: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
>>>> CC: Wei Liu <wei.liu2@citrix.com>
>>>> Signed-off-by: Doug Goldstein <cardoe@cardoe.com>
>>>> ---
>>>> 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.
>>
>> 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,
>> Reviewed-by: Elena Ufimtseva <elena.ufimtseva@oracle.com>
>>
>> Elena

-- 
Julien Grall

_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
https://lists.xen.org/xen-devel

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2017-11-02 15:16 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-10-31 15:20 [PATCH] gdbsx: prefer privcmd character device Doug Goldstein
2017-10-31 15:25 ` Wei Liu
2017-10-31 20:58   ` Elena Ufimtseva
2017-11-01 10:20     ` [PATCH for-4.10] " Wei Liu
2017-11-02 15:16       ` Julien Grall

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.