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

Re: [Xen-devel] [PATCH v3 10/12] livepatch: Handle arbitrary size names with the list operation



On Tue, Sep 17, 2019 at 08:55:22AM +0000, Wieczorkiewicz, Pawel wrote:
> 
> 
> > On 17. Sep 2019, at 10:48, Jan Beulich <jbeulich@xxxxxxxx> wrote:
> > 
> > On 17.09.2019 10:40,  Wieczorkiewicz, Pawel  wrote:
> >> 
> >> 
> >> On 17. Sep 2019, at 10:27, Jan Beulich 
> >> <jbeulich@xxxxxxxx<mailto:jbeulich@xxxxxxxx>> wrote:
> >> 
> >> On 16.09.2019 12:59, Pawel Wieczorkiewicz wrote:
> >> @@ -951,11 +952,13 @@ struct xen_sysctl_livepatch_list {
> >>                                               amount of payloads and 
> >> version.
> >>                                               OUT: How many payloads left. 
> >> */
> >>    uint32_t pad;                           /* IN: Must be zero. */
> >> +    uint64_t name_total_size;               /* OUT: Total size of all 
> >> transfer names */
> >> 
> >> Why uint64_t and not uint32_t? You don't expect this to grow
> >> beyond 4GiB, do you?
> >> 
> >> I don’t, but uint32_t is not really compatible with size_t.
> >> And I was thought to always use size_t compatible types for sizes.
> > 
> > That's a fair point, but I think we use 32-bit sizes elsewhere
> > as well, when crossing the 4GiB boundary would seem entirely
> > unexpected.
> > 
> > But what's worse here - you shouldn't use plain uint64_t in
> > sysctl.h (and domctl.h) anyway. If anything, you ought to use
> > uint64_aligned_t. (Going through the file I notice a few other
> > bad instances have crept in.)
> > 
> 
> I see. Noted, thanks for letting me know.
> 
> >> Anyway, I do not mind changing this to whatever type you prefer.
> > 
> > Well, preference - if anyone's - would be the livepatch maintainers'
> > one here.
> > 
> 
> Waiting for the maintainers' wise judgment then :-).

32-bit please. Thx
> 
> > Also - can you please see about adjusting your reply style? In plain
> > text mode it's impossible to tell context from your responses.
> 
> Oh, sorry about that. I tweaked my settings.
> Please let me know if it does not get better.
> 
> > 
> > Jan
> 
> Best Regards,
> Pawel Wieczorkiewicz
> 
> 
> 
> 
> 
> 
> Amazon Development Center Germany GmbH
> Krausenstr. 38
> 10117 Berlin
> Geschaeftsfuehrung: Christian Schlaeger, Ralf Herbrich
> Eingetragen am Amtsgericht Charlottenburg unter HRB 149173 B
> Sitz: Berlin
> Ust-ID: DE 289 237 879
> 
> 

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxxx
https://lists.xenproject.org/mailman/listinfo/xen-devel

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.