Re: [PATCH 2/2] remote: properly initialize objects in ACL helpers

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, Mar 18, 2024 at 10:00:25AM +0100, Denis V. Lunev wrote:
> On 3/18/24 09:56, Peter Krempa wrote:
> > FYI: Gmail decided that your whole series is spam. I'm not sure whether
> > it's just gmail's spam filter being silly or your mail infra has
> > something wrong, but just so you know.
> > 
> > On Sun, Mar 17, 2024 at 18:08:50 +0100, Denis V. Lunev wrote:
> > > Commit 2ecdf259299813c2c674377e22a0acbce5ccbbb2 is idealogically corrent,
> > > but unfortunately is incomplete. There are other similar objects in the
> > > module which are used also without proper initialization.
> > The commit you mention was justifying the change from stack-allocated to
> > heap allocated in order to decrease the stack frame size, which was too
> > big due to the fact that 'virDomainDef' is too big.
> > 
> > With the other structs that isn't that much of a problem, so I don't
> > think the justification of "Commit 2ecdf259299813 being incomplete" is
> > relevant and thus please add your own justification or adapt what I
> > wrote there as a separate justification, but IMO commit 2ecdf259299813
> > is not incomplete based on what it tried to do.
> Original commit has 2 motivations:
> * reduce stack size
> * properly initialize the object
> 
> Right now we pass half-initialized object into the
> engine. We should either memset() or allocate/free
> the object. I thought that allocation is better as
> we could have object filled with more data inside
> validators.

Yes, stack allocating this struct is gross :-(

With regards,
Daniel
-- 
|: https://berrange.com      -o-    https://www.flickr.com/photos/dberrange :|
|: https://libvirt.org         -o-            https://fstop138.berrange.com :|
|: https://entangle-photo.org    -o-    https://www.instagram.com/dberrange :|
_______________________________________________
Devel mailing list -- devel@xxxxxxxxxxxxxxxxx
To unsubscribe send an email to devel-leave@xxxxxxxxxxxxxxxxx




[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]

  Powered by Linux