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: <20130814095014.GA10849@gmail.com>
Date:	Wed, 14 Aug 2013 11:50:14 +0200
From:	Ingo Molnar <mingo@...nel.org>
To:	Cyrill Gorcunov <gorcunov@...il.com>
Cc:	Andrew Morton <akpm@...ux-foundation.org>,
	"H. Peter Anvin" <hpa@...or.com>,
	Andy Lutomirski <luto@...capital.net>,
	Pavel Emelyanov <xemul@...allels.com>,
	Matt Mackall <mpm@...enic.com>,
	Xiao Guangrong <xiaoguangrong@...ux.vnet.ibm.com>,
	Marcelo Tosatti <mtosatti@...hat.com>,
	KOSAKI Motohiro <kosaki.motohiro@...il.com>,
	Stephen Rothwell <sfr@...b.auug.org.au>,
	Peter Zijlstra <peterz@...radead.org>,
	"Aneesh Kumar K.V" <aneesh.kumar@...ux.vnet.ibm.com>,
	linux-mm@...ck.org, linux-kernel@...r.kernel.org,
	Thomas Gleixner <tglx@...utronix.de>,
	Ingo Molnar <mingo@...e.hu>
Subject: Re: [PATCH -mm] mm: Unify pte_to_pgoff and pgoff_to_pte helpers


* Cyrill Gorcunov <gorcunov@...il.com> wrote:

> On Wed, Aug 14, 2013 at 01:08:56AM -0700, Andrew Morton wrote:
> > > 
> > > > Can it be written in C with types and proper variable names and such
> > > > radical stuff?
> > > 
> > > Could you elaborate? You mean inline helper or macro with type checks?
> > 
> > /*
> >  * description goes here
> >  */
> > static inline pteval_t pte_bfop(pteval_t val, int rightshift, ...)
> > {
> > 	...
> > }
> > 
> > So much better!  We really should only implement code in a macro if it
> > *has* to be done as a macro and I don't think that's the case here?
> 
> Well, I'll have to check if it really doesn't generate additional 
> instructions in generated code, since it's hotpath. I'll ping back once 
> things are done.

An __always_inline should never do that.

Thanks,

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