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: <20061121073938.GI8055@kernel.dk>
Date:	Tue, 21 Nov 2006 08:39:39 +0100
From:	Jens Axboe <jens.axboe@...cle.com>
To:	Alan Stern <stern@...land.harvard.edu>
Cc:	"Paul E. McKenney" <paulmck@...ibm.com>,
	Oleg Nesterov <oleg@...sign.ru>,
	Kernel development list <linux-kernel@...r.kernel.org>
Subject: Re: [patch] cpufreq: mark cpufreq_tsc() as core_initcall_sync

On Mon, Nov 20 2006, Alan Stern wrote:
> On Mon, 20 Nov 2006, Jens Axboe wrote:
> 
> > > > Must we introduce memory allocations in srcu_read_lock()? It makes it
> > > > much harder and nastier for me to use. I'd much prefer a failing
> > > > init_srcu(), seems like a much better API.
> > > 
> > > Paul agrees with you that allocation failures in init_srcu() should be 
> > > passed back to the caller, and I certainly don't mind doing so.
> > > 
> > > However we can't remove the memory allocation in srcu_read_lock().  That
> > > was the point which started this whole thread: the per-cpu allocation
> > > cannot be done statically, and some users of a static SRCU structure can't
> > > easily call init_srcu() early enough.
> > > 
> > > Once the allocation succeeds, the overhead in srcu_read_lock() is minimal.
> > 
> > It's not about the overhead, it's about a potentially problematic
> > allocation.
> 
> I'm not sure what you mean by "problematic allocation".  If you
> successfully call init_srcu_struct then the allocation will be taken care
> of.  Later calls to srcu_read_lock won't experience any slowdowns or
> problems.

That requires init_srcu_struct() to return the error. If it does that,
I'm fine with it.

> Does this answer your objection?  If not, can you explain in more detail 
> what other features you would like?

It does, if the allocation failure in init_srcu_struct() is signalled.

-- 
Jens Axboe

-
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