Re: [Cocci] Confused by regex usage

2019-01-16 Thread Julia Lawall
On Wed, 16 Jan 2019, Kees Cook wrote: > Hi, > > I have this .cocci: > > /// Unchecked use of snprintf() return values can lead to bugs, especially > /// when returned or used to increment a buffer position. This is because > /// snprintf() can return how much it WOULD have written, had it not

[Cocci] Confused by regex usage

2019-01-16 Thread Kees Cook
Hi, I have this .cocci: /// Unchecked use of snprintf() return values can lead to bugs, especially /// when returned or used to increment a buffer position. This is because /// snprintf() can return how much it WOULD have written, had it not run out /// of space. Instead, use scnprintf() which

Re: [Cocci] [PATCH] standard.h: Add Z_SYSCALL_HANDLER macro

2019-01-16 Thread Himanshu Jha
On Thu, Jan 17, 2019 at 02:34:55AM +0530, Himanshu Jha wrote: > This patch allows coccinelle to parse the Z_SYSCALL_HANDLER > macro for transformation. > > Cc: Patrik Flykt > Cc: Flavio Ceolin > Signed-off-by: Himanshu Jha > --- Please drop this patch Julia. I misunderstood what you

[Cocci] [PATCH] standard.h: Add Z_SYSCALL_HANDLER macro

2019-01-16 Thread Himanshu Jha
This patch allows coccinelle to parse the Z_SYSCALL_HANDLER macro for transformation. Cc: Patrik Flykt Cc: Flavio Ceolin Signed-off-by: Himanshu Jha --- Results: himanshu@himanshu-Vostro-3559:~/zephyr$ cat test.cocci; spatch --sp-file test.cocci drivers/dma/dma_handlers.c @r@ identifier fn