Re: [PATCH] strscpy: zero any trailing garbage bytes in the destination

From: Chris Metcalf
Date: Tue Oct 06 2015 - 13:34:49 EST


On 10/06/2015 12:47 PM, Chris Metcalf wrote:
It's possible that the destination can be shadowed in userspace
(as, for example, the perf buffers are now). So we should take
care not to leak data that could be inspected by userspace.

Oops, we need to ensure platforms all have zero_bytemask()
before we can do this. It's pretty trivial in general, but not all
platforms have it now. I'll post a patch to fix this as needed,
which should be taken before this patch to avoid git bisect
failures.

I'll also see about fixing some skew in platforms that are
either newer than the patch (h8300) or added word-at-a-time.h
since the original patch (powerpc, tile).

--
Chris Metcalf, EZChip Semiconductor
http://www.ezchip.com

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/