From mboxrd@z Thu Jan 1 00:00:00 1970 From: Guenter Roeck Subject: Re: [PATCH v2 1/5] fs: rework getname_kernel to handle up to PATH_MAX sized filenames Date: Thu, 22 Jan 2015 08:56:50 -0800 Message-ID: <54C12BD2.7040705@roeck-us.net> References: <20150122045303.1347.98054.stgit@localhost> <20150122045956.1347.11508.stgit@localhost> <20150122155316.GH18752@madcap2.tricolour.ca> Mime-Version: 1.0 Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit Cc: linux-fsdevel@vger.kernel.org, linux-audit@redhat.com, sd@queasysnail.net, linux-kernel@vger.kernel.org, viro@zeniv.linux.org.uk To: Richard Guy Briggs , Paul Moore Return-path: In-Reply-To: <20150122155316.GH18752@madcap2.tricolour.ca> Sender: linux-kernel-owner@vger.kernel.org List-Id: linux-fsdevel.vger.kernel.org On 01/22/2015 07:53 AM, Richard Guy Briggs wrote: > On 15/01/21, Paul Moore wrote: >> In preparation for expanded use in the kernel, make getname_kernel() >> more useful by allowing it to handle any legal filename length. >> >> Thanks to Guenter Roeck for his suggestion to substitute memcpy() for >> strlcpy(). >> >> CC: linux@roeck-us.net >> CC: viro@zeniv.linux.org.uk >> CC: linux-fsdevel@vger.kernel.org >> Signed-off-by: Paul Moore > > Noted memcpy() difference (I assume to avoid races). > It is more efficient to use memcpy if the string length is known. Guenter