Re: [PATCH] [v3] warn on performance-impacting configs aka. TAINT_PERFORMANCE
From: Linus Torvalds <torvalds@linux-foundation.org>
Date: 2014-08-24 22:13:51
From: Linus Torvalds <torvalds@linux-foundation.org>
Date: 2014-08-24 22:13:51
On Aug 24, 2014 1:41 PM, "Dave Hansen" [off-list ref] wrote:
Let's say there is 1 "buf_left" and I attempt a 100-byte snprintf(). Won't snprintf() return 1, and buf_written will then equal buf_len?
No. snprintf() returns turn number of bytes it *would* write, if i it
wasn't truncated. That's so that people can reallocate a buffer of
sufficient size and just try again.
Linus