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:	Thu, 8 Nov 2007 20:38:51 -0200
From:	"Glauber de Oliveira Costa" <glommer@...il.com>
To:	"Jeremy Fitzhardinge" <jeremy@...p.org>
Cc:	LKML <linux-kernel@...r.kernel.org>, "Andi Kleen" <ak@...e.de>,
	"Ingo Molnar" <mingo@...e.hu>,
	"Thomas Gleixner" <tglx@...utronix.de>,
	"Zach Amsden" <zach@...are.com>,
	"Jeremy Fitzhardinge" <Jeremy.Fitzhardinge@...rix.com>
Subject: Re: [PATCH RFC 3/7] x86: clean up asm-x86/page*.h

On Nov 8, 2007 6:59 PM, Jeremy Fitzhardinge <jeremy@...p.org> wrote:
> Glauber de Oliveira Costa wrote:
> > On Nov 7, 2007 11:50 PM, Jeremy Fitzhardinge <jeremy@...p.org> wrote:
> >
> >> +#define PAGETABLE_LEVELS       3
> >> +
> >> +typedef u64    pteval_t;
> >> +typedef u64    pmdval_t;
> >> +typedef u64    pudval_t;
> >> +typedef u64    pgdval_t;
> >> +
> >>
> >
> >
> >> -static inline unsigned long long native_pgd_val(pgd_t pgd)
> >> +static inline pgdval_t native_pgd_val(pgd_t pgd)
> >>  {
> >>
> > Maybe these kind of things, the typedef and native_xxx definitions can
> > go into the common header, after we define the PAGETABLE_LEVELS
> > constant?
> > I think the more goes into common headers, the better.
> >
>
> You mean put them in a common header, but conditionally by #if
> PAGETABLE_LEVELS?  I don't think that would be much of an improvement;
> it would just add more #ifs, which adds lines and conceptual
> complexity.  If you go that way, you may as well put everything in one
> header wrapped in #ifs, but personally I don't think that would help.

Not exactly.
for the native_ functions,  there's room for code sharing.
native_pgd_val, and native_pte_val seem to be the same, for at least
pae and x86_64.
As for the typedefs, the same thing can be done. Much like you did in
paravirt.h, just split out between the < 3 and >= 3 levels.

But if it turns out to be just code movement, and I'm wrong in my
supposition that we can turn three variants of the same code into two,
then I agree
with you, let's keep it this way.


-- 
Glauber de Oliveira Costa.
"Free as in Freedom"
http://glommer.net

"The less confident you are, the more serious you have to act."
-
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