[RFC 1/7] drm/amdkfd: avoid fragile and inefficient snprintf use

2016-03-14 Thread Rasmus Villemoes
On Mon, Mar 14 2016, Oded Gabbay wrote: > On Tue, Mar 8, 2016 at 10:40 PM, Rasmus Villemoes > wrote: >> Passing overlapping source and destination buffers to snprintf >> formally has undefined behaviour and is rather fragile. While the > > I saw there were some different opinions on this. > Have

[RFC 1/7] drm/amdkfd: avoid fragile and inefficient snprintf use

2016-03-14 Thread Oded Gabbay
On Tue, Mar 8, 2016 at 10:40 PM, Rasmus Villemoes wrote: > Passing overlapping source and destination buffers to snprintf > formally has undefined behaviour and is rather fragile. While the > rather special case of passing the output buffer as the argument > corresponding to a leading "%s" in the

[RFC 1/7] drm/amdkfd: avoid fragile and inefficient snprintf use

2016-03-08 Thread Rasmus Villemoes
Passing overlapping source and destination buffers to snprintf formally has undefined behaviour and is rather fragile. While the rather special case of passing the output buffer as the argument corresponding to a leading "%s" in the format string currently works with the kernel's printf implementat