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:	Mon, 6 Oct 2008 22:16:50 +0200
From:	Heiko Carstens <heiko.carstens@...ibm.com>
To:	Rusty Russell <rusty@...tcorp.com.au>
Cc:	jens.axboe@...cle.com, schwidefsky@...ibm.com,
	linux-kernel@...r.kernel.org
Subject: Re: [PATCH/RFC 0/4] Add stop_machine_get/put_threads to
	stop_machine infrastructrue.

On Mon, Oct 06, 2008 at 02:42:40PM +1000, Rusty Russell wrote:
> On Friday 03 October 2008 20:56:32 you wrote:
> > However we need to be able to do that without allocating any memory.
> 
> Nice work Heiko!
> 
> See free_module(), which calls stop_machine and, well, just hopes it works.  
> So we've needed this for a while.

Ah, good. At least there is one other user then :)

> > Patch 1 is a stop_machine bugfix and is independent of the rest
> Hmm, do you actually need this?  It was a whim (and clearly a dumb one).  I'm 
> tempted to change it to:
> 
> 	err = smdata->fn(smdata->data);
> 	if (err)
> 		smdata->fnret = err;

That looks much better than the cmpxchg loop I came up with. All we need to
know is that 'something' went wrong. Any return code != 0 should be enough.

> > Patch 2 introduces the new proposed interface
> 
> Could we just encapsulate the threads etc. into a "struct stopmachine" which 
> is returned from stop_machine_prepare(), then implement everything in terms 
> of that?

You mean that we put the pointers to the threads, the cpu mask, etc. in this
structure, instead of wasting bss size?
That would be just a kmalloc call in __stop_machine_get_threads().
Or do you think of something different?

Anyway, I'm going to send a hopefully better patch tommorrow.
--
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