Re: [Cocci] [PATCH] coccicheck: add a test for repeat copy_from_user

2017-01-10 Thread Vaishali Thakkar
On Wednesday 11 January 2017 07:40 AM, Pengfei Wang wrote: 在 2017年1月11日,上午1:46,Vaishali Thakkar > 写道: On Tuesday 10 January 2017 02:32 PM, Pengfei Wang wrote: 在 2017年1月10日,下午4:40,Vaishali Thakkar

Re: [Cocci] [PATCH] coccicheck: add a test for repeat copy_from_user

2017-01-10 Thread Julia Lawall
I looked at the get_user part of the original script. It looks like most of the complexity is to deal with the possibility of the src location being expressed in two different ways between the two calls. Even if this happens in practice only for get_user, it would seem that it could happen for

Re: [Cocci] [RFC] coccicheck: add a test for repeat memory fetches

2017-01-10 Thread Vaishali Thakkar
On Wednesday 11 January 2017 05:34 AM, Kees Cook wrote: On Tue, Jan 10, 2017 at 1:14 PM, Julia Lawall wrote: OK, I have the impression that what you are looking for is the following, that currently does not seem to work well. Still maybe it gives an idea. The basic

Re: [Cocci] [RFC] coccicheck: add a test for repeat memory fetches

2017-01-10 Thread Kees Cook
On Tue, Jan 10, 2017 at 1:14 PM, Julia Lawall wrote: > OK, I have the impression that what you are looking for is the following, > that currently does not seem to work well. Still maybe it gives an idea. > > The basic pattern is the following sequence: > > 1. copy_from_user

Re: [Cocci] [RFC] coccicheck: add a test for repeat memory fetches

2017-01-10 Thread Julia Lawall
OK, I have the impression that what you are looking for is the following, that currently does not seem to work well. Still maybe it gives an idea. The basic pattern is the following sequence: 1. copy_from_user 2. test on a field of the copied value 3. another copy_from_user 4. a use of the same

Re: [Cocci] [RFC] coccicheck: add a test for repeat memory fetches

2017-01-10 Thread Kees Cook
On Tue, Jan 10, 2017 at 11:30 AM, Julia Lawall wrote: > > > On Tue, 10 Jan 2017, Kees Cook wrote: > >> On Tue, Jan 10, 2017 at 10:28 AM, Julia Lawall wrote: >> >> +./drivers/net/ethernet/chelsio/cxgb3/cxgb3_main.c:2159 >> >>

Re: [Cocci] [RFC] coccicheck: add a test for repeat memory fetches

2017-01-10 Thread Kees Cook
On Tue, Jan 10, 2017 at 11:23 AM, Kees Cook wrote: > On Tue, Jan 10, 2017 at 10:28 AM, Julia Lawall wrote: >>> +./drivers/net/ethernet/chelsio/cxgb3/cxgb3_main.c:2159 >>> +./drivers/net/ethernet/chelsio/cxgb3/cxgb3_main.c:2257 >>>

Re: [Cocci] [RFC] coccicheck: add a test for repeat memory fetches

2017-01-10 Thread Kees Cook
On Tue, Jan 10, 2017 at 10:28 AM, Julia Lawall wrote: >> +./drivers/net/ethernet/chelsio/cxgb3/cxgb3_main.c:2159 >> +./drivers/net/ethernet/chelsio/cxgb3/cxgb3_main.c:2257 >> +./drivers/net/ethernet/chelsio/cxgb3/cxgb3_main.c:2302 >>

Re: [Cocci] [PATCH] coccicheck: add a test for repeat copy_from_user

2017-01-10 Thread Kees Cook
On Tue, Jan 10, 2017 at 12:40 AM, Vaishali Thakkar wrote: > On Tuesday 10 January 2017 01:51 PM, Pengfei Wang wrote: >> >> >>> 在 2017年1月10日,上午1:05,Vaishali Thakkar 写道: >>> >>> On Tuesday 27 December 2016 11:51 PM, Julia Lawall wrote:

Re: [Cocci] [PATCH] coccicheck: add a test for repeat copy_from_user

2017-01-10 Thread Kees Cook
On Tue, Jan 10, 2017 at 12:21 AM, Pengfei Wang wrote: > > 在 2017年1月10日,上午1:05,Vaishali Thakkar 写道: > > On Tuesday 27 December 2016 11:51 PM, Julia Lawall wrote: > > I totally dropped the ball on this. Many thanks to Vaishali for >

Re: [Cocci] [RFC] coccicheck: add a test for repeat memory fetches

2017-01-10 Thread Julia Lawall
> +./drivers/net/ethernet/chelsio/cxgb3/cxgb3_main.c:2159 > +./drivers/net/ethernet/chelsio/cxgb3/cxgb3_main.c:2257 > +./drivers/net/ethernet/chelsio/cxgb3/cxgb3_main.c:2302 > +./drivers/net/ethernet/chelsio/cxgb3/cxgb3_main.c:2342 > +./drivers/net/ethernet/chelsio/cxgb3/cxgb3_main.c:2365 >

Re: [Cocci] [PATCH] coccicheck: add a test for repeat copy_from_user

2017-01-10 Thread Vaishali Thakkar
On Tuesday 10 January 2017 02:32 PM, Pengfei Wang wrote: 在 2017年1月10日,下午4:40,Vaishali Thakkar 写道: On Tuesday 10 January 2017 01:51 PM, Pengfei Wang wrote: 在 2017年1月10日,上午1:05,Vaishali Thakkar 写道: On Tuesday 27 December 2016 11:51

Re: [Cocci] [PATCH] coccicheck: add a test for repeat copy_from_user

2017-01-10 Thread Pengfei Wang
> 在 2017年1月10日,下午4:40,Vaishali Thakkar 写道: > > On Tuesday 10 January 2017 01:51 PM, Pengfei Wang wrote: >> >>> 在 2017年1月10日,上午1:05,Vaishali Thakkar 写道: >>> >>> On Tuesday 27 December 2016 11:51 PM, Julia Lawall wrote: I totally

Re: [Cocci] [RFC] coccicheck: add a test for repeat memory fetches

2017-01-10 Thread Pengfei Wang
> 在 2017年1月10日,下午2:06,Julia Lawall 写道: > > > > On Mon, 9 Jan 2017, Kees Cook wrote: > >> Okay, this adds a few tests, for people to examine. >> >> reusercopy-cook.cocci: >> My original test, with recent updates from Julia. >> >> reusercopy-wang.cocci: >> This is

Re: [Cocci] [PATCH] coccicheck: add a test for repeat copy_from_user

2017-01-10 Thread Pengfei Wang
> 在 2017年1月10日,上午1:05,Vaishali Thakkar 写道: > > On Tuesday 27 December 2016 11:51 PM, Julia Lawall wrote: >> I totally dropped the ball on this. Many thanks to Vaishali for >> resurrecting it. >> >> Some changes are suggested below. >> >> On Tue, 26 Apr 2016, Kees

Re: [Cocci] [RFC] coccicheck: add a test for repeat memory fetches

2017-01-10 Thread Vaishali Thakkar
On Tue, Jan 10, 2017 at 1:31 PM, Julia Lawall wrote: > > > On Tue, 10 Jan 2017, Pengfei Wang wrote: > >> >> > 在 2017年1月10日,下午2:06,Julia Lawall 写道: >> > >> > >> > >> > On Mon, 9 Jan 2017, Kees Cook wrote: >> > >> >> Okay, this adds a few tests, for