[Spice-devel] [PATCH 08/33] codegen: Remove old ptr32 attribute
Frediano Ziglio
fziglio at redhat.com
Tue Jul 21 02:05:35 PDT 2015
>
> On Wed, Jul 01, 2015 at 06:10:00PM +0100, Frediano Ziglio wrote:
> > This attribute is not use in code.
>
> 'used'
> This was removed in commit 2e8aecc2a56e5b7690d77516e41436b697921b1b I
> think. I'd move this commit before the preceding one as you are removing
> code that you just added. Or did you use these new checks to make sure
> that this is really not used?
>
> Christophe
>
Well, I could easily add this attribute to the list instead.
I think that 64 "pointers" in the network was just a mistake of protocol 1.
They means messages are more than 4gb but they are contained (even on protocol 1) in 4gb as message size is 4 bytes. And supporting more bytes would mean that we should allocate lot of memory as we store entire message in memory. Probably somebody could use these sizes (even 32 bit) to force allocation of huge memory (on both client and servers) causing possibly some DoS.
Frediano
> >
> > Signed-off-by: Frediano Ziglio <fziglio at redhat.com>
> > ---
> > python_modules/ptypes.py | 4 ----
> > 1 file changed, 4 deletions(-)
> >
> > diff --git a/python_modules/ptypes.py b/python_modules/ptypes.py
> > index 3a307ed..f94fd24 100644
> > --- a/python_modules/ptypes.py
> > +++ b/python_modules/ptypes.py
> > @@ -105,8 +105,6 @@ valid_attributes={
> > # for a switch this indicate that on network
> > # will occupy always same size (maximum size required for all members)
> > 'fixedsize',
> > - # use 32 bit pointer
> > - 'ptr32',
> > }
> >
> > attributes_with_arguments={
> > @@ -613,8 +611,6 @@ class Member(Containee):
> > self.container = container
> > self.member_type = self.member_type.resolve()
> > self.member_type.register()
> > - if self.has_attr("ptr32") and self.member_type.is_pointer():
> > - self.member_type.set_ptr_size(4)
> > for i in propagated_attributes:
> > if self.has_attr(i):
> > self.member_type.attributes[i] = self.attributes[i]
> > --
> > 2.1.0
> >
> > _______________________________________________
> > Spice-devel mailing list
> > Spice-devel at lists.freedesktop.org
> > http://lists.freedesktop.org/mailman/listinfo/spice-devel
>
More information about the Spice-devel
mailing list