Apply the PG_sensitive flag to audit subsystem
Subsystems (2)
PATCH 3/5 Apply the PG_sensitive flag to audit subsystem
This patch deploys the use of the PG_sensitive page allocator flag within the audit subsystem. It's not necessarily a high profile target for use of this flag, but could be expected to contain potentially sensitive information under some circumstances.
--- kernel/audit.c | 3 +++ 1 file changed, 3 insertions(+)
kernel/audit.c +3 -0
@@ -1061,6 +1061,9 @@ static struct audit_buffer * audit_buffe }spin_unlock_irqrestore (&audit_freelist_lock, flags); +if (!(gfp_mask &GFP_SENSITIVE )) + gfp_mask |=GFP_SENSITIVE ; +if (!ab) { ab =kmalloc (sizeof (*ab), gfp_mask);if (!ab)
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to [email protected]. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"[email protected]"> [email protected] </a>
kernel/audit.c static struct audit_buffer * audit_buffe · line 1066
Quoted 3 lines
kernel/audit.c +3
-0+if (!(gfp_mask &GFP_SENSITIVE )) + gfp_mask |=GFP_SENSITIVE ; +
The condition is unnecessary. Just do the |= in all cases.
Olaf
kernel/audit.c static struct audit_buffer * audit_buffe · line 1065
Quoted 3 lines · Larry H.
kernel/audit.c +2
-0+if (!(gfp_mask &GFP_SENSITIVE )) + gfp_mask |=GFP_SENSITIVE ;
WTF?
Why is this different from just "gfp_mask |= GFP_SENSITIVE;"
Linus
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to [email protected]. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"[email protected]"> [email protected] </a>
Quoted 8 lines · Linus Torvalds
kernel/audit.c static struct audit_buffer * audit_buffe · line 1065
Quoted 3 lines · Larry H.
kernel/audit.c +2
-0+if (!(gfp_mask &GFP_SENSITIVE )) + gfp_mask |=GFP_SENSITIVE ;WTF?
Indeed.
Quoted 1 line
Why is this different from just "
gfp_mask|=GFP_SENSITIVE;"
Blame anal retentiveness at the time of writing that. Surely the test should be ditched. Looking back at that, I honestly think there might be a place to plug the flag (in the caller) instead of doing that. I don't think there are many places to do it, so this particular patch from the set can be ditched and rewritten (if you want to take the selective clearing road...)
Larry
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to [email protected]. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"[email protected]"> [email protected] </a>