Re: [PATCH 01/12] rdmacg: Replace strncmp with str_has_prefix

2019-09-01 Thread Chuhong Yuan
On Fri, Aug 30, 2019 at 7:52 AM Kees Cook wrote: > > On Tue, Jul 30, 2019 at 02:39:40PM +0800, Chuhong Yuan wrote: > > I think with the help of Coccinelle script, all strncmp(str, const, len) > > can be replaced and these problems will be eliminated. :) > > Hi! Just pinging this thread again. Any

Re: [PATCH 01/12] rdmacg: Replace strncmp with str_has_prefix

2019-08-29 Thread Kees Cook
On Tue, Jul 30, 2019 at 02:39:40PM +0800, Chuhong Yuan wrote: > I think with the help of Coccinelle script, all strncmp(str, const, len) > can be replaced and these problems will be eliminated. :) Hi! Just pinging this thread again. Any progress on this conversion? Thanks! -- Kees Cook

Re: [PATCH 01/12] rdmacg: Replace strncmp with str_has_prefix

2019-08-02 Thread Michael Ellerman
Chuhong Yuan writes: > Chuhong Yuan 于2019年7月30日周二 下午2:39写道: >> Kees Cook 于2019年7月30日周二 下午12:26写道: >> > On Mon, Jul 29, 2019 at 11:13:46PM +0800, Chuhong Yuan wrote: >> > > strncmp(str, const, len) is error-prone. >> > > We had better use newly introduced >> > > str_has_prefix() instead of it. >>

Re: [PATCH 01/12] rdmacg: Replace strncmp with str_has_prefix

2019-07-30 Thread Steven Rostedt
On Tue, 30 Jul 2019 00:03:28 -0700 Joe Perches wrote: > I believe I'm still in favor of global conversion of > strstarts to str_has_prefix. > So am I. -- Steve

Re: [PATCH 01/12] rdmacg: Replace strncmp with str_has_prefix

2019-07-30 Thread Chuhong Yuan
Chuhong Yuan 于2019年7月30日周二 下午2:39写道: > > Kees Cook 于2019年7月30日周二 下午12:26写道: > > > > On Mon, Jul 29, 2019 at 11:13:46PM +0800, Chuhong Yuan wrote: > > > strncmp(str, const, len) is error-prone. > > > We had better use newly introduced > > > str_has_prefix() instead of it. > > > > Wait, stop. :) Af

Re: [PATCH 01/12] rdmacg: Replace strncmp with str_has_prefix

2019-07-30 Thread Joe Perches
On Tue, 2019-07-30 at 14:39 +0800, Chuhong Yuan wrote: > Kees Cook 于2019年7月30日周二 下午12:26写道: > > On Mon, Jul 29, 2019 at 11:13:46PM +0800, Chuhong Yuan wrote: > > > strncmp(str, const, len) is error-prone. > > > We had better use newly introduced > > > str_has_prefix() instead of it. > > > > Wait,

Re: [PATCH 01/12] rdmacg: Replace strncmp with str_has_prefix

2019-07-29 Thread Chuhong Yuan
Kees Cook 于2019年7月30日周二 下午12:26写道: > > On Mon, Jul 29, 2019 at 11:13:46PM +0800, Chuhong Yuan wrote: > > strncmp(str, const, len) is error-prone. > > We had better use newly introduced > > str_has_prefix() instead of it. > > Wait, stop. :) After Laura called my attention to your conversion series,

Re: [PATCH 01/12] rdmacg: Replace strncmp with str_has_prefix

2019-07-29 Thread Kees Cook
On Mon, Jul 29, 2019 at 11:13:46PM +0800, Chuhong Yuan wrote: > strncmp(str, const, len) is error-prone. > We had better use newly introduced > str_has_prefix() instead of it. Wait, stop. :) After Laura called my attention to your conversion series, mpe pointed out that str_has_prefix() is almost

[PATCH 01/12] rdmacg: Replace strncmp with str_has_prefix

2019-07-29 Thread Chuhong Yuan
strncmp(str, const, len) is error-prone. We had better use newly introduced str_has_prefix() instead of it. Signed-off-by: Chuhong Yuan --- kernel/cgroup/rdma.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/kernel/cgroup/rdma.c b/kernel/cgroup/rdma.c index ae042c347c64..fd1