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

From: Julia Lawall
Date: Tue Jan 10 2017 - 13:31:29 EST


> +./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
> +./drivers/net/ethernet/chelsio/cxgb3/cxgb3_main.c:2406
> +./drivers/net/ethernet/chelsio/cxgb3/cxgb3_main.c:2439
> +./drivers/net/ethernet/chelsio/cxgb3/cxgb3_main.c:2491

Do you want the above results? They have the form:

if (copy_from_user(&t, useraddr, sizeof(t)))

My reasoning was that there could be no problem here, because the size is
the size of the destination structure. It doesn't depend on user level data.

julia