Re: [Spice-devel] [PATCH 1/2] Ensure that plugins cannot bypass version check

2018-04-24 Thread Christophe de Dinechin
> On 24 Apr 2018, at 18:21, Christophe Fergeau wrote: > > On Tue, Apr 24, 2018 at 05:01:33PM +0200, Christophe de Dinechin wrote: >> But we still have the capability to reject a plugin (in a well >> defined, non-crashing way) for other reasons. >> [...] >> To summarize,

Re: [Spice-devel] [PATCH 1/2] Ensure that plugins cannot bypass version check

2018-04-24 Thread Christophe Fergeau
On Tue, Apr 24, 2018 at 05:01:33PM +0200, Christophe de Dinechin wrote: > But we still have the capability to reject a plugin (in a well > defined, non-crashing way) for other reasons. > [...] > To summarize, the purpose of the compatibility check is to guarantee > well-defined behavior on the

Re: [Spice-devel] [PATCH 1/2] Ensure that plugins cannot bypass version check

2018-04-24 Thread Christophe de Dinechin
> On 28 Mar 2018, at 17:20, Christophe Fergeau wrote: > > On Wed, Mar 28, 2018 at 11:10:36AM +0200, Christophe de Dinechin wrote: >> >> >>> On 26 Mar 2018, at 19:06, Christophe Fergeau wrote: >>> >>> On Fri, Mar 23, 2018 at 01:05:23PM +0100,

Re: [Spice-devel] [PATCH 1/2] Ensure that plugins cannot bypass version check

2018-04-24 Thread Christophe de Dinechin
> On 20 Apr 2018, at 12:51, Christophe Fergeau wrote: > > On Fri, Apr 20, 2018 at 10:10:17AM +0200, Christophe de Dinechin wrote: >> There is no easy way to test if a method is there. There is, however, >> an easy way to test if a C entry point is there in a shared

Re: [Spice-devel] [PATCH 1/2] Ensure that plugins cannot bypass version check

2018-04-20 Thread Christophe Fergeau
On Fri, Apr 20, 2018 at 10:10:17AM +0200, Christophe de Dinechin wrote: > There is no easy way to test if a method is there. There is, however, > an easy way to test if a C entry point is there in a shared library. > This is the difference between your scenario and mine. In mine, I can >

Re: [Spice-devel] [PATCH 1/2] Ensure that plugins cannot bypass version check

2018-04-20 Thread Christophe de Dinechin
> On 18 Apr 2018, at 17:04, Christophe Fergeau wrote: > > On Tue, Apr 17, 2018 at 06:39:05PM +0200, Christophe de Dinechin wrote: >> When does this kind of scenario happen? Imagine we added support for >> loading/unloading plugins. Version 13 adds a new interface to unload

Re: [Spice-devel] [PATCH 1/2] Ensure that plugins cannot bypass version check

2018-04-18 Thread Christophe Fergeau
On Tue, Apr 17, 2018 at 06:39:05PM +0200, Christophe de Dinechin wrote: > When does this kind of scenario happen? Imagine we added support for > loading/unloading plugins. Version 13 adds a new interface to unload > plugins, and a new “unloadable plugin” entry point. Therefore, > starting with

Re: [Spice-devel] [PATCH 1/2] Ensure that plugins cannot bypass version check

2018-04-18 Thread Christophe de Dinechin
> On 17 Apr 2018, at 20:11, Frediano Ziglio wrote: > >>> >>> On 17 Apr 2018, at 16:12, Frediano Ziglio wrote: >>> From: Christophe de Dinechin This change addresses three issues related to plugin version

Re: [Spice-devel] [PATCH 1/2] Ensure that plugins cannot bypass version check

2018-04-18 Thread Lukáš Hrázký
On Tue, 2018-04-17 at 10:12 -0400, Frediano Ziglio wrote: > > > > From: Christophe de Dinechin > > > > This change addresses three issues related to plugin version checking: > > > > 1. It is possible for plugins to bypass version checking or do it wrong > >(as a matter

Re: [Spice-devel] [PATCH 1/2] Ensure that plugins cannot bypass version check

2018-04-17 Thread Frediano Ziglio
> > > On 17 Apr 2018, at 16:12, Frediano Ziglio wrote: > > > >> > >> From: Christophe de Dinechin > >> > >> This change addresses three issues related to plugin version checking: > >> > >> 1. It is possible for plugins to bypass version checking or

Re: [Spice-devel] [PATCH 1/2] Ensure that plugins cannot bypass version check

2018-04-17 Thread Christophe de Dinechin
> On 17 Apr 2018, at 16:12, Frediano Ziglio wrote: > >> >> From: Christophe de Dinechin >> >> This change addresses three issues related to plugin version checking: >> >> 1. It is possible for plugins to bypass version checking or do it wrong >>

Re: [Spice-devel] [PATCH 1/2] Ensure that plugins cannot bypass version check

2018-04-17 Thread Frediano Ziglio
> > From: Christophe de Dinechin > > This change addresses three issues related to plugin version checking: > > 1. It is possible for plugins to bypass version checking or do it wrong >(as a matter of fact, the mjpeg fallback sets a bad example) > > 2. The current

Re: [Spice-devel] [PATCH 1/2] Ensure that plugins cannot bypass version check

2018-04-05 Thread Christophe Fergeau
On Fri, Mar 23, 2018 at 01:05:23PM +0100, Christophe de Dinechin wrote: > 3. Major.minor numbering scheme > > The major.minor numbering scheme initially selected makes it harder > to fixes cases where an incompatibility was detected after release. I'm still of the opinion that we should break

Re: [Spice-devel] [PATCH 1/2] Ensure that plugins cannot bypass version check

2018-03-29 Thread Christophe Fergeau
On Thu, Mar 29, 2018 at 10:36:06AM +0200, Christophe de Dinechin wrote: > > > > On 29 Mar 2018, at 10:05, Christophe Fergeau wrote: > > > > On Wed, Mar 28, 2018 at 05:54:21PM +0200, Christophe de Dinechin wrote: > >>> With that said, I find the current "ODR" portion of the

Re: [Spice-devel] [PATCH 1/2] Ensure that plugins cannot bypass version check

2018-03-29 Thread Christophe de Dinechin
> On 29 Mar 2018, at 10:05, Christophe Fergeau wrote: > > On Wed, Mar 28, 2018 at 05:54:21PM +0200, Christophe de Dinechin wrote: >>> With that said, I find the current "ODR" portion of the commit log >>> misleading, it's easy to get the impression that after this change,

Re: [Spice-devel] [PATCH 1/2] Ensure that plugins cannot bypass version check

2018-03-29 Thread Christophe Fergeau
On Wed, Mar 28, 2018 at 05:54:21PM +0200, Christophe de Dinechin wrote: > > With that said, I find the current "ODR" portion of the commit log > > misleading, it's easy to get the impression that after this change, we > > won't have any ODR problem anymore (this is what I initially thought!). > >

Re: [Spice-devel] [PATCH 1/2] Ensure that plugins cannot bypass version check

2018-03-28 Thread Christophe de Dinechin
> On 28 Mar 2018, at 17:20, Christophe Fergeau wrote: > > On Wed, Mar 28, 2018 at 11:10:36AM +0200, Christophe de Dinechin wrote: >> >> >>> On 26 Mar 2018, at 19:06, Christophe Fergeau wrote: >>> >>> On Fri, Mar 23, 2018 at 01:05:23PM +0100,

Re: [Spice-devel] [PATCH 1/2] Ensure that plugins cannot bypass version check

2018-03-28 Thread Christophe Fergeau
On Wed, Mar 28, 2018 at 11:10:36AM +0200, Christophe de Dinechin wrote: > > > > On 26 Mar 2018, at 19:06, Christophe Fergeau wrote: > > > > On Fri, Mar 23, 2018 at 01:05:23PM +0100, Christophe de Dinechin wrote: > >> 2. ODR-related problems > >> > >> The C++ One

Re: [Spice-devel] [PATCH 1/2] Ensure that plugins cannot bypass version check

2018-03-28 Thread Christophe de Dinechin
> On 26 Mar 2018, at 19:06, Christophe Fergeau wrote: > > On Fri, Mar 23, 2018 at 01:05:23PM +0100, Christophe de Dinechin wrote: >> 2. ODR-related problems >> >> The C++ One Definition Rule (ODR) states that all translation units >> must see the same definitions. In the

Re: [Spice-devel] [PATCH 1/2] Ensure that plugins cannot bypass version check

2018-03-26 Thread Christophe Fergeau
On Fri, Mar 23, 2018 at 01:05:23PM +0100, Christophe de Dinechin wrote: > 2. ODR-related problems > > The C++ One Definition Rule (ODR) states that all translation units > must see the same definitions. In the current code, when we call > Agent::PluginVersionIsCompatible from the plugin, it is an

Re: [Spice-devel] [PATCH 1/2] Ensure that plugins cannot bypass version check

2018-03-26 Thread Lukáš Hrázký
On Mon, 2018-03-26 at 16:57 +0200, Christophe de Dinechin wrote: > > On 23 Mar 2018, at 14:53, Lukáš Hrázký wrote: > > > > On Fri, 2018-03-23 at 13:05 +0100, Christophe de Dinechin wrote: > > > From: Christophe de Dinechin > > > > > > This change

Re: [Spice-devel] [PATCH 1/2] Ensure that plugins cannot bypass version check

2018-03-26 Thread Christophe de Dinechin
> On 23 Mar 2018, at 16:49, Frediano Ziglio wrote: > >> >> From: Christophe de Dinechin >> >> This change addresses three issues related to plugin version checking: >> >> 1. It is possible for plugins to bypass version checking or do it wrong >>

Re: [Spice-devel] [PATCH 1/2] Ensure that plugins cannot bypass version check

2018-03-26 Thread Christophe de Dinechin
> On 23 Mar 2018, at 14:53, Lukáš Hrázký wrote: > > On Fri, 2018-03-23 at 13:05 +0100, Christophe de Dinechin wrote: >> From: Christophe de Dinechin >> >> This change addresses three issues related to plugin version checking: >> >> 1. It is possible

Re: [Spice-devel] [PATCH 1/2] Ensure that plugins cannot bypass version check

2018-03-23 Thread Lukáš Hrázký
On Fri, 2018-03-23 at 11:50 -0400, Frediano Ziglio wrote: > > > > On Fri, 2018-03-23 at 13:05 +0100, Christophe de Dinechin wrote: > > > From: Christophe de Dinechin > > > > > > This change addresses three issues related to plugin version checking: > > > > > > 1. It is

Re: [Spice-devel] [PATCH 1/2] Ensure that plugins cannot bypass version check

2018-03-23 Thread Frediano Ziglio
> > On Fri, 2018-03-23 at 13:05 +0100, Christophe de Dinechin wrote: > > From: Christophe de Dinechin > > > > This change addresses three issues related to plugin version checking: > > > > 1. It is possible for plugins to bypass version checking or do it wrong > >(as a

Re: [Spice-devel] [PATCH 1/2] Ensure that plugins cannot bypass version check

2018-03-23 Thread Frediano Ziglio
> > From: Christophe de Dinechin > > This change addresses three issues related to plugin version checking: > > 1. It is possible for plugins to bypass version checking or do it wrong >(as a matter of fact, the mjpeg fallback sets a bad example) > > 2. The current

Re: [Spice-devel] [PATCH 1/2] Ensure that plugins cannot bypass version check

2018-03-23 Thread Lukáš Hrázký
On Fri, 2018-03-23 at 13:05 +0100, Christophe de Dinechin wrote: > From: Christophe de Dinechin > > This change addresses three issues related to plugin version checking: > > 1. It is possible for plugins to bypass version checking or do it wrong >(as a matter of fact,

[Spice-devel] [PATCH 1/2] Ensure that plugins cannot bypass version check

2018-03-23 Thread Christophe de Dinechin
From: Christophe de Dinechin This change addresses three issues related to plugin version checking: 1. It is possible for plugins to bypass version checking or do it wrong (as a matter of fact, the mjpeg fallback sets a bad example) 2. The current plugin version check