linux-integrity.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* sleep in selinux_audit_rule_init
@ 2019-05-22 11:49 Janne Karhunen
  2019-05-22 12:20 ` Stephen Smalley
  0 siblings, 1 reply; 15+ messages in thread
From: Janne Karhunen @ 2019-05-22 11:49 UTC (permalink / raw)
  To: Mimi Zohar, paul; +Cc: linux-integrity, linux-security-module

Hi,

I managed to hit a following BUG, looks like ima can call
selinux_audit_rule_init that can sleep in rcu critical section in
ima_match_policy():

__might_sleep
kmem_cache_alloc_trace
selinux_audit_rule_init <<< kzalloc (.. GFP_KERNEL)
security_audit_rule_init
ima_match_policy <<< list_for_each_entry_rcu
ima_get_action
process_measurement
ima_file_check
path_openat
do_filp_open
..

I guess this is the ima_match_rules() calling ima_lsm_update_rules()
when it concludes that the selinux policy may have been reloaded.

The easy way for me to fix my own butt in this regard is to change the
selinux allocation not to wait, but Paul would you be OK with such
change? The alternative looks like a pretty big change in the ima?


--
Janne

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

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

Thread overview: 15+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-05-22 11:49 sleep in selinux_audit_rule_init Janne Karhunen
2019-05-22 12:20 ` Stephen Smalley
2019-05-22 12:41   ` Stephen Smalley
2019-05-22 13:00     ` Mimi Zohar
2019-05-22 13:16       ` Stephen Smalley
2019-05-22 13:57         ` Mimi Zohar
2019-05-22 15:10           ` Casey Schaufler
2019-05-22 15:27           ` Stephen Smalley
2019-05-30 10:39             ` Janne Karhunen
2019-05-30 12:07               ` Stephen Smalley
2019-05-30 12:29                 ` Paul Moore
2019-05-30 13:27                 ` Janne Karhunen
2019-05-30 14:17                   ` Stephen Smalley
2019-05-31 11:22                     ` Janne Karhunen
2019-05-22 12:47   ` Janne Karhunen

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).