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]
Date:	Wed, 4 May 2016 00:31:12 +0200 (CEST)
From:	Jiri Kosina <jikos@...nel.org>
To:	Josh Poimboeuf <jpoimboe@...hat.com>
cc:	Miroslav Benes <mbenes@...e.cz>, jeyu@...hat.com, pmladek@...e.com,
	jslaby@...e.cz, live-patching@...r.kernel.org,
	linux-kernel@...r.kernel.org, huawei.libin@...wei.com,
	minfei.huang@...oo.com
Subject: Re: [RFC PATCH] livepatch: allow removal of a disabled patch

On Tue, 3 May 2016, Josh Poimboeuf wrote:

> > 1. Do we really need a completion? If I am not missing something
> > kobject_del() always waits for sysfs callers to leave thanks to kernfs
> > active protection.
> 
> What do you mean by "kernfs active protection"?  I see that
> kernfs_remove() gets the kernfs_mutex lock, but I can't find anywhere
> that a write to a sysfs file uses that lock.
> 
> I'm probably missing something...

I don't want to speak on Miroslav's behalf, but I'm pretty sure that what 
he has on mind is per-kernfs_node active refcounting kernfs does (see 
kernfs_node->active, and especially it's usage in __kernfs_remove()).

More specifically, execution of store() and show() sysfs callbacks is 
guaranteed (by kernfs) to happen with that particular attribute's active 
reference held for reading (and that makes it impossible for that 
attribute to vanish prematurely).

-- 
Jiri Kosina
SUSE Labs

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ