From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751430AbbJGH24 (ORCPT ); Wed, 7 Oct 2015 03:28:56 -0400 Received: from mail-wi0-f175.google.com ([209.85.212.175]:35134 "EHLO mail-wi0-f175.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750986AbbJGH2z (ORCPT ); Wed, 7 Oct 2015 03:28:55 -0400 Date: Wed, 7 Oct 2015 09:28:51 +0200 From: Ingo Molnar To: Chris Metcalf Cc: Linus Torvalds , Alexey Dobriyan , Linux Kernel Mailing List Subject: Re: [PATCH] strscpy: zero any trailing garbage bytes in the destination Message-ID: <20151007072851.GA8537@gmail.com> References: <1444150034-31729-1-git-send-email-cmetcalf@ezchip.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1444150034-31729-1-git-send-email-cmetcalf@ezchip.com> User-Agent: Mutt/1.5.23 (2014-03-12) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org * 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. > > Signed-off-by: Chris Metcalf > --- > Ingo, can you test this change in your Fedora+strlcpy boot test? > I think it's correct but the more testing the better, particularly > if we're about to add the support for strlcpy to use it. Yeah, booted it on a couple of systems and everything seems to be fine: Tested-by: Ingo Molnar Thanks, Ingo