Re: [cocci] Searching for system call implementations with SmPL?
Markus Elfring <[email protected]>
| Newsgroups | fr.inria.cocci |
|---|---|
| Message-ID | <[email protected]> |
> But I really want to search all syscalls by the conventional macro names, i.e. search for SYSCALL_DEFINE[0-6]+. How to do that?
My pattern recognition needed a while to take another software design approach into account.
https://gitlab.inria.fr/coccinelle/coccinelle/-/blob/4c9d00ae071800cb447efaffd753f3bb2be28800/docs/manual/cocci_syntax.tex#L480-482
Corresponding SmPL script example:
@display disable braces0@
iterator name SYSCALL_DEFINE0;
@@
*SYSCALL_DEFINE0(...)
{
...
}
Questionable test result (according to the software combination “Coccinelle 1.3.1”):
Markus_Elfring@Sonne:…/Projekte/Linux/next-analyses> /usr/bin/spatch --macro-file-builtins …/Projekte/Coccinelle/Probe/my_empty_header_file.h arch/alpha/kernel/osf_sys.c …/Projekte/Coccinelle/Probe/suggestion_for_Tobias_Deiminger-20251202.cocci
…
[no diff output]
How will the clarification be continued for more desirable software behaviour?
Regards,
Markus