lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20110421000818.GT16484@one.firstfloor.org>
Date:	Thu, 21 Apr 2011 02:08:18 +0200
From:	Andi Kleen <andi@...stfloor.org>
To:	Casey Schaufler <casey@...aufler-ca.com>
Cc:	Andi Kleen <ak@...ux.intel.com>, Andi Kleen <andi@...stfloor.org>,
	jmorris@...ei.org, linux-security-module@...r.kernel.org,
	linux-kernel@...r.kernel.org
Subject: Re: [PATCH] SMACK: Add missing rcu_read_lock/unlock for process capability walk.

> The global list, yes. The task specific list, no. Modifying the local
> list is like any other modification of the cred structure and requires
> the cred be copied.

But you still need to free it eventually right? And that freeing will
need RCU on the reader.

> 
> Moving the lock into smk_access_entry() would introduce a potential
> deadlock in smack_mmap_file. There is a bit of convolution in the
> mmap hook that requires looking at the list in a way that does not
> allow the locking to be embedded where it used to be.

rcu_read_lock() is just a per task counter and nests fine and never deadlocks.

-Andi
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ