public inbox for smatch@vger.kernel.org
 help / color / mirror / Atom feed
* alloc_page leaks tracing
@ 2022-03-08 17:28 Oleg Drokin
  2022-03-10  9:42 ` Dan Carpenter
  0 siblings, 1 reply; 5+ messages in thread
From: Oleg Drokin @ 2022-03-08 17:28 UTC (permalink / raw)
  To: smatch

Hello!

   I am wondering why alloc_page and friends are not considering an allocation function?
   Found a bit of code where there was an obvious alloc_page leak that was not caught that is caught if I change alloc_page to kmalloc.

   And while trying to put the support into smatch I suddenly found the structure changed so much from the previous time I looked at it it’s very non-obvious how to add it.

   I tried adding hooks in check_free_strict.c, check_frees_argument.c, check_leaks.c, smatch_constraints_required.c, smatch_fresh_alloc.c, smatch_parse_call_math.c
  and tried to insert it alongside kmalloc in smatch_scripts/gen_allocation_list.sh and I still cannot make
   it work in the actual kernel code even though a modified testcase from validation/sm_memory.c works.


   Any hint?

   Thanks.

Bye,
   Oleg

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2022-03-25  6:50 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-03-08 17:28 alloc_page leaks tracing Oleg Drokin
2022-03-10  9:42 ` Dan Carpenter
     [not found]   ` <82B7079C-AD17-4E5E-A245-71E9ED53E5A3@linuxhacker.ru>
2022-03-11 21:12     ` Dan Carpenter
2022-03-22  8:05       ` Dan Carpenter
2022-03-25  6:48         ` Dan Carpenter

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox