LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Kernel (https://www.linuxquestions.org/questions/linux-kernel-70/)
-   -   Are invariants on the kernel data structures documented? (https://www.linuxquestions.org/questions/linux-kernel-70/are-invariants-on-the-kernel-data-structures-documented-4175501791/)

ramzi.kahil 04-15-2014 06:43 AM

Are invariants on the kernel data structures documented?
 
I want to program a kind of a security module as an example, and I want later to prove that my code is enforcing the invariants on a specific data structure (e.g., those in /include/linux/list.h). But I'm not sure what the invariants are. So, are the invariants documented anywhere?

smallpond 04-16-2014 03:23 PM

Code:

cd Documentation
find . -name '*.txt' -exec grep -H 'assert[^a-z]' \{} \;

nope

ramzi.kahil 04-16-2014 03:31 PM

I don't get it. Just because the word 'assert' does not appear you are concluding that the invariants are not documented?

smallpond 04-16-2014 04:02 PM

How and where would you document them?

ramzi.kahil 04-16-2014 04:48 PM

Well, I'm quite certain that other word that 'assert' can be used. It is indeed a good point but, realying only on this, the conclusion that no invariants are documented is a bit far fetched in my opinion. Anyway thanks for the info, I appreciate it.


All times are GMT -5. The time now is 03:01 AM.