cocci.inria.fr archive mirror
 help / color / mirror / Atom feed
* [Cocci] field access scoping / check who accesses certain struct members ?
@ 2019-11-20 19:50 Enrico Weigelt, metux IT consult
  2019-11-20 20:44 ` Julia Lawall
  0 siblings, 1 reply; 3+ messages in thread
From: Enrico Weigelt, metux IT consult @ 2019-11-20 19:50 UTC (permalink / raw)
  To: Coccinelle

Hi folks,


is there a way to scan for code lines that access certain struct
members ?

Rationale:

In the kernel, we have lots of struct fields (eg. in struct device)
which are supposed to be only accessed by certain subsystems.
I'd like to add some checks for that by scanning for all sites that
access certain struct members and filter out those files that are
allowed to do so. This should print out all sites which do those
unallowed direct access w/o going through the appropriate helpers.


--mtx

---
Enrico Weigelt, metux IT consult
Free software and Linux embedded engineering
info@metux.net -- +49-151-27565287
_______________________________________________
Cocci mailing list
Cocci@systeme.lip6.fr
https://systeme.lip6.fr/mailman/listinfo/cocci

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

end of thread, other threads:[~2019-11-21 16:05 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-11-20 19:50 [Cocci] field access scoping / check who accesses certain struct members ? Enrico Weigelt, metux IT consult
2019-11-20 20:44 ` Julia Lawall
2019-11-21 16:04   ` Markus Elfring

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).