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] [day] [month] [year] [list]
Date:	Mon, 10 Oct 2011 16:10:28 -0400
From:	Jason Baron <jbaron@...hat.com>
To:	Jeremy Fitzhardinge <jeremy@...p.org>
Cc:	Steven Rostedt <rostedt@...dmis.org>,
	"David S. Miller" <davem@...emloft.net>,
	David Daney <david.daney@...ium.com>,
	Michael Ellerman <michael@...erman.id.au>,
	Jan Glauber <jang@...ux.vnet.ibm.com>,
	the arch/x86 maintainers <x86@...nel.org>,
	Xen Devel <xen-devel@...ts.xensource.com>,
	Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
	Jeremy Fitzhardinge <jeremy.fitzhardinge@...rix.com>
Subject: Re: [PATCH RFC V2 3/5] jump_label: if a key has already been
 initialized, don't nop it out

On Mon, Oct 10, 2011 at 12:58:19PM -0700, Jeremy Fitzhardinge wrote:
> > Hi,
> >
> > I just realized that the early call to jump_label_inc(), isn't being
> > honored with this patch until later when we invoke jump_label_init().
> > That strikes me as being inconsistent. When jump_label_inc() returns we
> > should expect the branch to be updated.
> 
> Why is that?  It looks to me like it will unconditionally update the
> instruction, irrespective of whether _init() has been called?
> 

No. jump_label_init(), sets up key->entries, to point into the jump
table...before that jump_label_update(), doesn't know where the table is
located, and will just return, without doing the update.


> > Thus, I think what probably want is to add a new 'int jump_label_init'
> > flag. If its not set we can call 'jump_label_init()' from
> > jump_label_inc()/dec().
> 
> Hm.  I worry that it may end up calling jump_label_init() in an
> unexpected context, especially since it may well be config-dependent, or
> adding a jump_label_inc() later on starts mysteriously failing.

good point.

> 
> >  And jump_label_init() can avoid initialization
> > if its already set.
> 
> That doesn't seem worthwhile in itself.  I suspect the number of "early"
> jump_label_incs will be very small (or we should look at doing the init
> earlier).
> 
>     J

I have it as 'early_initcall()', but perhaps it should be moved into
init/main.c. I don't think there's any reason it can't be done super
early. So I think this might be the best answer. It will also simplify
your series.

Thanks,

-Jason
--
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