integrity: Linux Integrity Module(LIM)
Quoted 22 lines · Christoph Hellwig
Quoted 21 lines · Mimi Zohar
+/*
+ * Integrity API calls:
+ *
+ * @collect_measurement:
+ * Collect template specific measurement data.
+ * @data contains template specific data used for collecting the
+ * measurement.
+ * Return 0 if operation was successful.
+ *
+ * @appraise_measurement:
+ * Appraise the integrity of the template specific measurement data.
+ * @data contains template specific data used for appraising the
+ * measurement.
+ * Return 0 if operation was successful.
+ *
+ * @store_measurement:
+ * Store the template specific data.
+ * @data contains template specific data used for storing the
+ * measurement.
+ *
+ * @store_template:
Quoted 8 lines
Quoted 8 lines
+ * Store the entry containing the template specific data.
+ * @data contains template name, data length, and data.
+ *
+ * @must_measure:
+ * Measurement decision based on an integrity policy.
+ * @data contains template specific data used for making policy
+ * decision.
+ * Return 0 if operation was successful.
This comment isn't right - return 0 if a measurement must be taken, no?
Quoted 8 lines
Quoted 5 lines
+ *
+ * @display_template:
+ * Display template specific data.
+ *
+ */Can you explain what all this template stuff is about? The only method of these ever called is
display_template,
I'm not sure what you mean here - must_measure for instance is used (in patch 3) in the integrity hooks (i.e. file_mmap) to decide whether or not the object (action target) must be measured.
Quoted 2 lines
and that seems to be better
implented directly as a securityfs file, without the indirection.
That comment doesn't make sense to me (unless you're saying to punt on the generic integrity infrastructure and hook all of the IMA code straight into the kernel) so I suspect I'm misreading something.
-serge
Quoted 6 lines · Serge E. Hallyn
Quoted 2 lines
Can you explain what all this template stuff is about? The only method of these ever called is
display_template,I'm not sure what you mean here -
must_measurefor instance is used (in patch 3) in the integrity hooks (i.e.file_mmap) to decide whether or not the object (action target) must be measured.
ima_must_measure (or the other implementation bits) are called a lot. But never through the indirection I quoted.
Quoted 7 lines
Quoted 2 lines
and that seems to be better
implented directly as a securityfs file, without the indirection.That comment doesn't make sense to me (unless you're saying to punt on the generic integrity infrastructure and hook all of the IMA code straight into the kernel) so I suspect I'm misreading something.
ima_measurements_show alaways calls ima_template_show, and both are implemented inside the ima module. There's absolutely no point for the indirection here.