Messages in this thread | | | Date | Thu, 4 Jun 2020 19:28:25 +0200 (CEST) | From | Julia Lawall <> | Subject | Re: [PATCH] coccinelle: api: add kzfree script |
| |
> After all it seems reasonable to me to add forall and memset_explicit rather > than handle all these false positives. Something like this for v2? > > @r depends on !patch && !(file in "lib/test_kasan.c") && !(file in "mm/slab_common.c") forall@ > expression *E; > position p; > @@ > > * \(memset\|memset_explicit\)(E, 0, ...); > ... when != E > * kfree(E)@p; > > Do I need to add "when strict" with forall or it's already enabled in this case? > Do I need to enable forall for pathing "-/+"?
forall seems entirely reasonable. You don't need it in the -/+ case. I would put when strict in both cases.
julia
| |