Re: [PATCHSET] kernfs, cgroup: make kernfs_path*() and cgroup_path*() behave in strlcpy() style

2016-08-10 Thread Tejun Heo
On Tue, Aug 09, 2016 at 10:18:19AM +0200, Greg KH wrote: > On Tue, Aug 09, 2016 at 01:23:20AM -0400, Tejun Heo wrote: > > kernfs path formatting functions always return the length of full path > > but the content of the output buffer is undefined when the length is > > longer than the provided

Re: [PATCHSET] kernfs, cgroup: make kernfs_path*() and cgroup_path*() behave in strlcpy() style

2016-08-10 Thread Tejun Heo
On Tue, Aug 09, 2016 at 10:18:19AM +0200, Greg KH wrote: > On Tue, Aug 09, 2016 at 01:23:20AM -0400, Tejun Heo wrote: > > kernfs path formatting functions always return the length of full path > > but the content of the output buffer is undefined when the length is > > longer than the provided

Re: [PATCHSET] kernfs, cgroup: make kernfs_path*() and cgroup_path*() behave in strlcpy() style

2016-08-09 Thread Greg KH
On Tue, Aug 09, 2016 at 01:23:20AM -0400, Tejun Heo wrote: > kernfs path formatting functions always return the length of full path > but the content of the output buffer is undefined when the length is > longer than the provided buffer. Most cgroup path formatting > functions return the start of

Re: [PATCHSET] kernfs, cgroup: make kernfs_path*() and cgroup_path*() behave in strlcpy() style

2016-08-09 Thread Greg KH
On Tue, Aug 09, 2016 at 01:23:20AM -0400, Tejun Heo wrote: > kernfs path formatting functions always return the length of full path > but the content of the output buffer is undefined when the length is > longer than the provided buffer. Most cgroup path formatting > functions return the start of

[PATCHSET] kernfs, cgroup: make kernfs_path*() and cgroup_path*() behave in strlcpy() style

2016-08-08 Thread Tejun Heo
kernfs path formatting functions always return the length of full path but the content of the output buffer is undefined when the length is longer than the provided buffer. Most cgroup path formatting functions return the start of the output or NULL on errors including overflow. These

[PATCHSET] kernfs, cgroup: make kernfs_path*() and cgroup_path*() behave in strlcpy() style

2016-08-08 Thread Tejun Heo
kernfs path formatting functions always return the length of full path but the content of the output buffer is undefined when the length is longer than the provided buffer. Most cgroup path formatting functions return the start of the output or NULL on errors including overflow. These