smatch devel branch
I have been re-working Smatch to be useful in an AI world. I'm making quite a few changes as quickly as I can. And quick changes mean is an element of roughness.
One thing is that I got rid of the check_list.h file. Now just the having the check_foo.c file in the smatch/ directory is enough. No need to edit anything else. Hopefully, this sort of thing makes it easier to write tons and tons of smaller checks. I really want people to vibe code checks. Harshit and I have messed around with that and it's quite promising.
You can also use AI to filter out false positives and that's quite a nice combination of automatically writing the check, running it and filtering out the false positives.
The other thing is that Smatch just has to get better because the competition is better now. So for example, I've always thought that probably parsing the code twice would help. I held off on doing that because it makes Smatch use twice as much memory and be twice as slow. But now I've made that the only option. I've found other places to speed up the code and my nightly linux-next builds are completing in time now. There are still too many places where Smatch says that functions are "too hairy". Before I switched to two pass processing it was 850 and now it's 3600. So I need to fix that.
I've got lots and lots of ideas and I don't plan to slow down but I'm at a place where the code I have so far is almost working and I've pushed it to the devel branch so people can take a look if they want.
regards,
dan carpenter
Hi Dan,
Using this thread for few questions.
smatch_kernel_irq_context.c is removed in smatch-devel, but in the past we have reports like this: https://lore.kernel.org/all/[email protected]/
Maybe we should track it ?
Thanks,
Harshit
Hi Dan,
Regression Report 2 for smatch-devel.
After commit: 76b24bdbac63 ("smatch_data: move data into smatch_data/project/ git sub repository") we shouldn't rpbably have kernel. prefixes for the files.
but I still see:
../smatch-devel/smatch_data/kernel/kernel.allocation_funcs ../smatch-devel/smatch_data/kernel/kernel.dma_funcs ../smatch-devel/smatch_data/kernel/kernel.frees_argument ../smatch-devel/smatch_data/kernel/kernel.sizeof_param ../smatch-devel/smatch_data/kernel/kernel.unwind_functions
Thanks,
Harshit
Hi Dan,
Regression report 3:
net/rds/connection.c:547 rds_conn_destroy() warn: mixing irq and irqsave
this is not reproducible with smatch-devel.
I think some of these are false positives, but anyway wanted to bring these to your attention.
Thanks,
Harshit
Quoted 10 lines · Harshit Mogalapalli
Hi Dan,
Regression report 3:
net/rds/connection.c:547rds_conn_destroy()warn: mixing irq and irqsavethis is not reproducible with smatch-devel.
I think some of these are false positives, but anyway wanted to bring these to your attention.
Fixed and pushed. Thanks!
Also that rds_conn_destroy() code is nonsense. The warning is valid. :P
I worry there may be other code where I tried to silence the warning and now nothing is printed...
regards,
dan carpenter