[prev in list] [next in list] [prev in thread] [next in thread] 

List:       qubes-devel
Subject:    Re: [qubes-devel] Window information from guests
From:       Radoslaw Szkodzinski <astralstorm () gmail ! com>
Date:       2016-12-16 17:37:51
Message-ID: CAAmECqTR--a32viZutQuXtfrwzPZchfjrWWaSyXGF6FtaXd6aQ () mail ! gmail ! com
[Download RAW message or body]

On 25 Nov 2016 12:27 a.m., <drew.qubes@gmail.com> wrote:



On Thursday, 24 November 2016 15:17:13 UTC+11, Jean-Philippe Ouellet wrote:

> On Wed, Nov 23, 2016 at 11:06 PM,  <drew....@gmail.com> wrote:
> > qubes_gui_daemon contains next to no code and has next to no
> functionality
> > in it.
> 
> I'm sorry, but you are simply mistaken:
> 
> [user@fedora-23-dvm]/tmp% git clone https://github.com/QubesOS/qub
> es-gui-daemon
> Cloning into 'qubes-gui-daemon'...
> remote: Counting objects: 4559, done.
> remote: Compressing objects: 100% (50/50), done.
> remote: Total 4559 (delta 25), reused 0 (delta 0), pack-reused 4507
> Receiving objects: 100% (4559/4559), 1.27 MiB | 0 bytes/s, done.
> Resolving deltas: 100% (2625/2625), done.
> Checking connectivity... done.
> [user@fedora-23-dvm]/tmp% cd qubes-gui-daemon
> [user@fedora-23-dvm]/tmp/qubes-gui-daemon% cloc .
> 53 text files.
> 51 unique files.
> 19 files ignored.
> 
> github.com/AlDanial/cloc v 1.70  T=0.41 s (86.2 files/s, 17638.1 lines/s)
> -------------------------------------------------------------------------------
> 
> Language                     files          blank        comment
> code
> -------------------------------------------------------------------------------
> 
> C                               12            511            626
> 4320
> C/C++ Header                    12            253            457
> 441
> Python                           1             27            123
> 179
> make                             7             27             65
> 101
> XML                              1              0              3
> 13
> YAML                             1              0              1
> 8
> Bourne Shell                     1              1              0
> 2
> -------------------------------------------------------------------------------
> 
> SUM:                            35            819           1275
> 5064
> ------------------------------------------------------------------
> 

Now for my questions (since the code is NOT commented).

Where does it do everything?


Stupid answer would be "in the code". Less silly is in the main event loop.
If is not threaded or asynchronous in any way.

What is it that actually listens?


Libvchan. So, essentially, Linux kernel on a Xen hypercall.

How does it listen?


It opens a Xen event channel to receive new data from the VM. This works
similarly to select syscall on a file.
The data is available in a shared memory buffer managed by Xen gntdev and
evtchn, and finally, the hypervisor.

Note that I haven't checked lately the support for KVM, someone else will
have to speak up.

What protocol does it use?



Custom simple protocol with uncompressed images. Those are relayed from a
composing window manager in the VM.
This part is actually documented.

R. Sz. (not a Qubes dev)

-- 
You received this message because you are subscribed to the Google Groups \
"qubes-devel" group. To unsubscribe from this group and stop receiving emails from \
it, send an email to qubes-devel+unsubscribe@googlegroups.com. To post to this group, \
send email to qubes-devel@googlegroups.com. To view this discussion on the web visit \
https://groups.google.com/d/msgid/qubes-devel/CAAmECqTR--a32viZutQuXtfrwzPZchfjrWWaSyXGF6FtaXd6aQ%40mail.gmail.com.
 For more options, visit https://groups.google.com/d/optout.


[Attachment #3 (text/html)]

<div dir="auto"><br><div class="gmail_extra" dir="auto"><br><div \
class="gmail_quote">On 25 Nov 2016 12:27 a.m.,  &lt;<a \
href="mailto:drew.qubes@gmail.com">drew.qubes@gmail.com</a>&gt; wrote:<br \
type="attribution"><blockquote class="quote" style="margin:0 0 0 .8ex;border-left:1px \
#ccc solid;padding-left:1ex"><div dir="ltr"><div class="quoted-text"><br><br>On \
Thursday, 24 November 2016 15:17:13 UTC+11, Jean-Philippe Ouellet  wrote:</div><div \
class="elided-text"><blockquote class="gmail_quote" \
style="margin:0;margin-left:0.8ex;border-left:1px #ccc solid;padding-left:1ex">On \
Wed, Nov 23, 2016 at 11:06 PM,   &lt;<a rel="nofollow">drew....@gmail.com</a>&gt; \
wrote: <br>&gt; qubes_gui_daemon contains next to no code and has next to no \
functionality <br>&gt; in it.
<br>
<br>I&#39;m sorry, but you are simply mistaken:
<br>
<br>[user@fedora-23-dvm]/tmp% git clone <a \
href="https://github.com/QubesOS/qubes-gui-daemon" rel="nofollow" \
target="_blank">https://github.com/QubesOS/qub<wbr>es-gui-daemon</a> <br>Cloning into \
&#39;qubes-gui-daemon&#39;... <br>remote: Counting objects: 4559, done.
<br>remote: Compressing objects: 100% (50/50), done.
<br>remote: Total 4559 (delta 25), reused 0 (delta 0), pack-reused 4507
<br>Receiving objects: 100% (4559/4559), 1.27 MiB | 0 bytes/s, done.
<br>Resolving deltas: 100% (2625/2625), done.
<br>Checking connectivity... done.
<br>[user@fedora-23-dvm]/tmp% cd qubes-gui-daemon
<br>[user@fedora-23-dvm]/tmp/qubes<wbr>-gui-daemon% cloc .
<br>         53 text files.
<br>         51 unique files.
<br>         19 files ignored.
<br>
<br><a href="http://github.com/AlDanial/cloc" rel="nofollow" \
target="_blank">github.com/AlDanial/cloc</a> v 1.70   T=0.41 s (86.2 files/s, 17638.1 \
lines/s) <br>------------------------------<wbr>------------------------------<wbr>-------------------
 <br>Language                               files               blank            \
comment                code \
<br>------------------------------<wbr>------------------------------<wbr>-------------------
 <br>C                                              12                  511           \
626                4320 <br>C/C++ Header                              12              \
253                  457                  441 <br>Python                              \
1                   27                  123                  179 <br>make             \
7                   27                   65                  101 <br>XML              \
1                     0                     3                   13 <br>YAML           \
1                     0                     1                     8 <br>Bourne Shell  \
1                     1                     0                     2 \
<br>------------------------------<wbr>------------------------------<wbr>-------------------
 <br>SUM:                                          35                  819            \
1275                5064 \
<br>------------------------------<wbr>------------------------------<wbr>------<br></blockquote></div><div><br></div><div>Now \
for my questions (since the code is NOT commented).</div><div><br></div><div>Where \
does it do everything?</div></div></blockquote></div></div><div \
dir="auto"><br></div><div dir="auto">Stupid answer would be &quot;in the code&quot;. \
Less silly is in the main event loop. If is not threaded or asynchronous in any way.  \
</div><div dir="auto"><br></div><div class="gmail_extra" dir="auto"><div \
class="gmail_quote"><blockquote class="quote" style="margin:0 0 0 \
.8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div>What is it that \
actually listens?</div></div></blockquote></div></div><div dir="auto"><br></div><div \
dir="auto">Libvchan. So, essentially, Linux kernel on a Xen hypercall.  </div><div \
dir="auto"><br></div><div class="gmail_extra" dir="auto"><div \
class="gmail_quote"><blockquote class="quote" style="margin:0 0 0 \
.8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div>How does it \
listen?</div></div></blockquote></div></div><div dir="auto"><br></div><div \
dir="auto">It opens a Xen event channel to receive new data from the VM. This works \
similarly to select syscall on a file.  </div><div dir="auto">The data is available \
in a shared memory buffer managed by Xen gntdev and evtchn, and finally, the \
hypervisor.  </div><div dir="auto"><br></div><div dir="auto">Note that I haven&#39;t \
checked lately the support for KVM, someone else will have to speak up.  </div><div \
dir="auto"><br></div><div class="gmail_extra" dir="auto"><div \
class="gmail_quote"><blockquote class="quote" style="margin:0 0 0 \
.8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div>What protocol \
does it use?</div></div></blockquote></div></div><div dir="auto"><br></div><div \
dir="auto"><br></div><div dir="auto">Custom simple protocol with uncompressed images. \
Those are relayed from a composing window manager in the VM.</div><div \
dir="auto">This part is actually documented.</div><div dir="auto"><br></div><div \
dir="auto">R. Sz. (not a Qubes dev)  </div></div>

<p></p>

-- <br />
You received this message because you are subscribed to the Google Groups \
&quot;qubes-devel&quot; group.<br /> To unsubscribe from this group and stop \
receiving emails from it, send an email to <a \
href="mailto:qubes-devel+unsubscribe@googlegroups.com">qubes-devel+unsubscribe@googlegroups.com</a>.<br \
/> To post to this group, send email to <a \
href="mailto:qubes-devel@googlegroups.com">qubes-devel@googlegroups.com</a>.<br /> To \
view this discussion on the web visit <a \
href="https://groups.google.com/d/msgid/qubes-devel/CAAmECqTR--a32viZutQuXtfrwzPZchfjr \
WWaSyXGF6FtaXd6aQ%40mail.gmail.com?utm_medium=email&utm_source=footer">https://groups. \
google.com/d/msgid/qubes-devel/CAAmECqTR--a32viZutQuXtfrwzPZchfjrWWaSyXGF6FtaXd6aQ%40mail.gmail.com</a>.<br \
/> For more options, visit <a \
href="https://groups.google.com/d/optout">https://groups.google.com/d/optout</a>.<br \
/>



[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic