Re: [RFC 0/7] eliminate snprintf with overlapping src and dst

2016-03-10 Thread One Thousand Gnomes
On Wed, 9 Mar 2016 12:49:40 -0800 Andrew Morton wrote: > On Tue, 8 Mar 2016 21:40:47 +0100 Rasmus Villemoes > wrote: > > > Doing snprintf(buf, len, "%s...", buf, ...) for appending to a buffer > > currently works, but it is somewhat

Re: [RFC 0/7] eliminate snprintf with overlapping src and dst

2016-03-10 Thread One Thousand Gnomes
On Wed, 9 Mar 2016 12:49:40 -0800 Andrew Morton wrote: > On Tue, 8 Mar 2016 21:40:47 +0100 Rasmus Villemoes > wrote: > > > Doing snprintf(buf, len, "%s...", buf, ...) for appending to a buffer > > currently works, but it is somewhat fragile, and any other overlap > > between source and

Re: [RFC 0/7] eliminate snprintf with overlapping src and dst

2016-03-09 Thread Rasmus Villemoes
On Wed, Mar 09 2016, Andrew Morton wrote: > On Tue, 8 Mar 2016 21:40:47 +0100 Rasmus Villemoes > wrote: > >> Doing snprintf(buf, len, "%s...", buf, ...) for appending to a buffer >> currently works, but it is somewhat fragile, and any other

Re: [RFC 0/7] eliminate snprintf with overlapping src and dst

2016-03-09 Thread Rasmus Villemoes
On Wed, Mar 09 2016, Andrew Morton wrote: > On Tue, 8 Mar 2016 21:40:47 +0100 Rasmus Villemoes > wrote: > >> Doing snprintf(buf, len, "%s...", buf, ...) for appending to a buffer >> currently works, but it is somewhat fragile, and any other overlap >> between source and destination buffers

Re: [RFC 0/7] eliminate snprintf with overlapping src and dst

2016-03-09 Thread Andrew Morton
On Tue, 8 Mar 2016 21:40:47 +0100 Rasmus Villemoes wrote: > Doing snprintf(buf, len, "%s...", buf, ...) for appending to a buffer > currently works, but it is somewhat fragile, and any other overlap > between source and destination buffers would be a definite bug.

Re: [RFC 0/7] eliminate snprintf with overlapping src and dst

2016-03-09 Thread Andrew Morton
On Tue, 8 Mar 2016 21:40:47 +0100 Rasmus Villemoes wrote: > Doing snprintf(buf, len, "%s...", buf, ...) for appending to a buffer > currently works, but it is somewhat fragile, and any other overlap > between source and destination buffers would be a definite bug. This > is an attempt at

Re: [RFC 0/7] eliminate snprintf with overlapping src and dst

2016-03-08 Thread Andy Shevchenko
On Tue, Mar 8, 2016 at 10:40 PM, Rasmus Villemoes wrote: > Doing snprintf(buf, len, "%s...", buf, ...) for appending to a buffer > currently works, but it is somewhat fragile, and any other overlap > between source and destination buffers would be a definite bug. This >

Re: [RFC 0/7] eliminate snprintf with overlapping src and dst

2016-03-08 Thread Andy Shevchenko
On Tue, Mar 8, 2016 at 10:40 PM, Rasmus Villemoes wrote: > Doing snprintf(buf, len, "%s...", buf, ...) for appending to a buffer > currently works, but it is somewhat fragile, and any other overlap > between source and destination buffers would be a definite bug. This > is an attempt at

Re: [RFC 0/7] eliminate snprintf with overlapping src and dst

2016-03-08 Thread Kees Cook
On Tue, Mar 8, 2016 at 12:40 PM, Rasmus Villemoes wrote: > Doing snprintf(buf, len, "%s...", buf, ...) for appending to a buffer > currently works, but it is somewhat fragile, and any other overlap > between source and destination buffers would be a definite bug. This >

Re: [RFC 0/7] eliminate snprintf with overlapping src and dst

2016-03-08 Thread Kees Cook
On Tue, Mar 8, 2016 at 12:40 PM, Rasmus Villemoes wrote: > Doing snprintf(buf, len, "%s...", buf, ...) for appending to a buffer > currently works, but it is somewhat fragile, and any other overlap > between source and destination buffers would be a definite bug. This > is an attempt at

Re: [RFC 0/7] eliminate snprintf with overlapping src and dst

2016-03-08 Thread Kees Cook
On Tue, Mar 8, 2016 at 12:40 PM, Rasmus Villemoes wrote: > Doing snprintf(buf, len, "%s...", buf, ...) for appending to a buffer > currently works, but it is somewhat fragile, and any other overlap > between source and destination buffers would be a definite bug. This >

Re: [RFC 0/7] eliminate snprintf with overlapping src and dst

2016-03-08 Thread Kees Cook
On Tue, Mar 8, 2016 at 12:40 PM, Rasmus Villemoes wrote: > Doing snprintf(buf, len, "%s...", buf, ...) for appending to a buffer > currently works, but it is somewhat fragile, and any other overlap > between source and destination buffers would be a definite bug. This > is an attempt at

[RFC 0/7] eliminate snprintf with overlapping src and dst

2016-03-08 Thread Rasmus Villemoes
Doing snprintf(buf, len, "%s...", buf, ...) for appending to a buffer currently works, but it is somewhat fragile, and any other overlap between source and destination buffers would be a definite bug. This is an attempt at eliminating the relatively few occurences of this pattern in the kernel. I

[RFC 0/7] eliminate snprintf with overlapping src and dst

2016-03-08 Thread Rasmus Villemoes
Doing snprintf(buf, len, "%s...", buf, ...) for appending to a buffer currently works, but it is somewhat fragile, and any other overlap between source and destination buffers would be a definite bug. This is an attempt at eliminating the relatively few occurences of this pattern in the kernel. I