On 5/8/19 2:07 PM, Jan Beulich wrote: > Dynamically allocated CPU mask objects may be smaller than cpumask_t, so > copying has to be restricted to the actual allocation size. This is > particulary important since the function doesn't bail early when tracing > is not active, so even production builds would be affected by potential > misbehavior here. > > Take the opportunity and also > - use initializers instead of assignment + memset(), > - constify the cpumask_t input pointer, > - u32 -> uint32_t. > > Signed-off-by: Jan Beulich <jbeul...@suse.com> > --- > v2: New. > --- > TBD: I wonder whether the function shouldn't gain an early tb_init_done > check, like many other trace_*() have.
Yeah, avoiding these memcopies when tracing is not enabled seems like a good thing. Either way: Acked-by: George Dunlap <george.dun...@citrix.com> > > George, despite your general request to be copied on entire series > rather than individual patches, I thought it would be better to copy > you on just this one (for its tracing aspect), as the patch here is > independent of the rest of the series, but at least one later patch > depends on the parameter constification done here. Yes, I think in this case this was the easiest thing for me. Thanks. :-) -George _______________________________________________ Xen-devel mailing list Xen-devel@lists.xenproject.org https://lists.xenproject.org/mailman/listinfo/xen-devel