Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1240788

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

From Chris Metcalf <cmetcalf@ezchip.com>
Newsgroups linux.kernel
Subject Re: [PATCH] strscpy: zero any trailing garbage bytes in the destination
Date 2015-10-06 19:40 +0200
Message-ID <qgEnw-4wt-25@gated-at.bofh.it> (permalink)
References <qgDUv-3Yw-33@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


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@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Back to linux.kernel | Previous | Next | Find similar | Unroll thread


Thread

Re: [PATCH] strscpy: zero any trailing garbage bytes in the  destination Chris Metcalf <cmetcalf@ezchip.com> - 2015-10-06 19:40 +0200

csiph-web