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>] [day] [month] [year] [list]
Date:	Wed, 16 Mar 2011 11:06:20 -0400
From:	Steven Rostedt <rostedt@...dmis.org>
To:	Ralf Baechle <ralf@...ux-mips.org>
Cc:	Jason Baron <jbaron@...hat.com>, ddaney@...iumnetworks.com,
	LKML <linux-kernel@...r.kernel.org>,
	"H. Peter Anvin" <hpa@...or.com>,
	Frederic Weisbecker <fweisbec@...il.com>,
	Ingo Molnar <mingo@...e.hu>,
	"David S. Miller" <davem@...emloft.net>,
	Mathieu Desnoyers <mathieu.desnoyers@...icios.com>
Subject: Re: jump label: mips alignment required?

On Wed, 2011-03-16 at 15:57 +0100, Ralf Baechle wrote:
> On Mon, Mar 14, 2011 at 11:02:20AM -0400, Jason Baron wrote:
> 
> > (off-list)

Added LKML back, as well as others. There was really no reason to take
this off list.

> 
> Adding Steve Rosted again.
> 
> > After last weeks discussion, I'm going to be re-posting the jump label
> > series. I'm adding the following to the x86 code. If you want to add
> > something similar for mips, I can include it in my posting (as coming
> > from you).
> > 
> > thanks,
> > 
> > -Jason
> > 
> > diff --git a/arch/x86/include/asm/jump_label.h b/arch/x86/include/asm/jump_label.h
> > index f217cee..a32b18c 100644
> > --- a/arch/x86/include/asm/jump_label.h
> > +++ b/arch/x86/include/asm/jump_label.h
> > @@ -16,6 +16,7 @@ static __always_inline bool arch_static_branch(struct jump_label_key *key)
> >  	asm goto("1:"
> >  		JUMP_LABEL_INITIAL_NOP
> >  		".pushsection __jump_table,  \"aw\" \n\t"
> > +		_ASM_ALIGN "\n\t"
> >  		_ASM_PTR "1b, %l[l_yes], %c0 \n\t"
> >  		".popsection \n\t"
> >  		: :  "i" (key) : : l_yes);
> 
> I don't think we'll need something like this on MIPS.  Gas is smart enough to
> set the __jump_table's section automatically to 64-bit if _ASM_PTR is emitting
> 64-bit pointers.  So no alignment magic needed nor do I think x86 would need this
> to work correct on both i386 and x86_64.

Yeah, I still have strong doubts that the linker would add holes into a
word aligned section. Such a linker IMNSHO would be broken. Why waste
space?

OK, Jason, I think it's fine if you repost the patches. You can keep the
alignment in x86_64 just to be paranoid^Wsafe.

-- Steve


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