Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1758663AbcDHQC5 (ORCPT ); Fri, 8 Apr 2016 12:02:57 -0400 Received: from mail-oi0-f44.google.com ([209.85.218.44]:33905 "EHLO mail-oi0-f44.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752855AbcDHQCz (ORCPT ); Fri, 8 Apr 2016 12:02:55 -0400 MIME-Version: 1.0 In-Reply-To: References: <1459801598-12757-1-git-send-email-martin@martinbrandenburg.com> <1459801598-12757-2-git-send-email-martin@martinbrandenburg.com> Date: Fri, 8 Apr 2016 19:02:54 +0300 Message-ID: Subject: Re: [PATCH 2/3] orangefs: strncpy -> strlcpy From: Andy Shevchenko To: Martin Brandenburg Cc: Mike Marshall , "linux-kernel@vger.kernel.org" , Linux FS Devel Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1224 Lines: 35 On Fri, Apr 8, 2016 at 6:34 PM, wrote: >> On Thu, Apr 7, 2016 at 2:39 PM, Andy Shevchenko >> wrote: >> > On Mon, Apr 4, 2016 at 11:26 PM, Martin Brandenburg wrote: >> >> From: Martin Brandenburg >> >> >> >> Almost everywhere we use strncpy we should use strlcpy. This affects >> >> path names (d_name mostly), symlink targets, and server names. >> >> >> >> Leave debugfs code as is for now, though it could use a review as well. >> >> >> > >> > |Why not strscpy() as most robust one? > > Mostly because I hadn't heard about strscpy. It was nice story how he applied it to the tree. >> It looks like strscpy went in last October... there are >> no users of it yet. I was just about to send in a pull request >> that includes Martin's strncpy->strlcpy patch when I saw >> Andy's comment. >> >> Linus said when he pulled strscpy: > After looking over strscpy I don't see a compelling > reason not to go ahead and use it while we're fixing up > this code. I recommend to mention that this is a fix explicitly in the commit message, currently it sounds like a meaningless patch of trainee. -- With Best Regards, Andy Shevchenko