All of lore.kernel.org
 help / color / mirror / Atom feed
* dcache_lock deadlock due to auditing
@ 2005-04-13 17:36 Serge Hallyn
  2005-04-14 14:30 ` Stephen Smalley
  0 siblings, 1 reply; 11+ messages in thread
From: Serge Hallyn @ 2005-04-13 17:36 UTC (permalink / raw)
  To: selinux

Hi,

a team running some tcp benchmarks on new hardware found a recursive
spinlock(dcache_lock) deadlock.  It seems to always be caused by:

 A process is doing a d_alloc() which does a spin_lock(dcache_lock).
 It is interrupted to receive a packet
 selinux_sock_rcv_skb gets called
 it calls avc_has_perm
 this calls avc_audit
 this calls audit_log_d_path
 this calls d_path which does spin_lock(dcache_lock)

Deferring the actual audit work to the audit subsystem in a manner
similar to what Stephen's recent audit_log_exit() patch did seems one
possible way to solve this problem.  Another might be to determine our
context before the audit_log_d_path( vma->vm_file->f_dentry ), and, if
we can determine that we were called from interrupt, simply print out
the f_dentry->d_name.name itself.

Are there other solutions?

Currently the team is testing Stephen's patch (from march 31) to see
whether it is sufficient.

thanks,
-serge



-- 
Serge Hallyn <serue@us.ibm.com>

--
This message was distributed to subscribers of the selinux mailing list.
If you no longer wish to subscribe, send mail to majordomo@tycho.nsa.gov with
the words "unsubscribe selinux" without quotes as the message.

^ permalink raw reply	[flat|nested] 11+ messages in thread
* RE: dcache_lock deadlock due to auditing
@ 2005-04-14 20:35 Steve G
  2005-04-14 20:47 ` Stephen Smalley
  0 siblings, 1 reply; 11+ messages in thread
From: Steve G @ 2005-04-14 20:35 UTC (permalink / raw)
  To: Daniel H Jones, Stephen Smalley; +Cc: linux-audit, selinux, selinux-dev

>I'm guessing the security context obtained from the SELinux hooks are 
>is represented by a sid. Is this true? 

Yes. This patch is already part of the audit subsystem code and on its way
upstream.

>If that's the case, can it be readily converted to the string representation 
>for display at audit_log_exit time?

The patch does that.

-Steve Grubb


		
__________________________________ 
Do you Yahoo!? 
Yahoo! Small Business - Try our new resources site!
http://smallbusiness.yahoo.com/resources/

--
This message was distributed to subscribers of the selinux mailing list.
If you no longer wish to subscribe, send mail to majordomo@tycho.nsa.gov with
the words "unsubscribe selinux" without quotes as the message.

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

end of thread, other threads:[~2005-04-15 14:38 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-04-13 17:36 dcache_lock deadlock due to auditing Serge Hallyn
2005-04-14 14:30 ` Stephen Smalley
2005-04-14 16:06   ` Karl MacMillan
2005-04-14 16:15     ` Stephen Smalley
2005-04-14 19:09       ` Daniel H Jones
2005-04-14 19:37       ` Karl MacMillan
2005-04-15 13:09       ` serue
2005-04-15 13:28         ` Stephen Smalley
2005-04-15 14:38           ` serue
  -- strict thread matches above, loose matches on Subject: below --
2005-04-14 20:35 Steve G
2005-04-14 20:47 ` Stephen Smalley

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.