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]
Message-ID: <20130314150112.GD11636@dhcp22.suse.cz>
Date:	Thu, 14 Mar 2013 16:01:12 +0100
From:	Michal Hocko <mhocko@...e.cz>
To:	Gerald Schaefer <gerald.schaefer@...ibm.com>
Cc:	Andrew Morton <akpm@...ux-foundation.org>,
	Mel Gorman <mgorman@...e.de>, Hugh Dickins <hughd@...gle.com>,
	Hillf Danton <dhillf@...il.com>,
	Tony Luck <tony.luck@...el.com>,
	Fenghua Yu <fenghua.yu@...el.com>,
	Ralf Baechle <ralf@...ux-mips.org>,
	Benjamin Herrenschmidt <benh@...nel.crashing.org>,
	Paul Mackerras <paulus@...ba.org>,
	Paul Mundt <lethal@...ux-sh.org>,
	"David S. Miller" <davem@...emloft.net>,
	Chris Metcalf <cmetcalf@...era.com>,
	Thomas Gleixner <tglx@...utronix.de>,
	Ingo Molnar <mingo@...hat.com>,
	"H. Peter Anvin" <hpa@...or.com>, linux-kernel@...r.kernel.org,
	linux-arch@...r.kernel.org, linux-mm@...ck.org,
	Martin Schwidefsky <schwidefsky@...ibm.com>,
	Heiko Carstens <heiko.carstens@...ibm.com>
Subject: Re: [PATCH 1/1] mm/hugetlb: add more arch-defined huge_pte_xxx
 functions

On Thu 14-03-13 15:11:09, Gerald Schaefer wrote:
> On Thu, 14 Mar 2013 14:14:04 +0100
> Michal Hocko <mhocko@...e.cz> wrote:
> 
> > On Tue 12-03-13 19:48:26, Gerald Schaefer wrote:
> > > Commit abf09bed3c "s390/mm: implement software dirty bits" introduced
> > > another difference in the pte layout vs. the pmd layout on s390,
> > > thoroughly breaking the s390 support for hugetlbfs. This requires
> > > replacing some more pte_xxx functions in mm/hugetlbfs.c with a
> > > huge_pte_xxx version.
> > > 
> > > This patch introduces those huge_pte_xxx functions and their
> > > implementation on all architectures supporting hugetlbfs. This change
> > > will be a no-op for all architectures other than s390.
> > > 
> > > Signed-off-by: Gerald Schaefer <gerald.schaefer@...ibm.com>
> > > ---
> > >  arch/ia64/include/asm/hugetlb.h    | 36 ++++++++++++++++++++++++
> > >  arch/mips/include/asm/hugetlb.h    | 36 ++++++++++++++++++++++++
> > >  arch/powerpc/include/asm/hugetlb.h | 36 ++++++++++++++++++++++++
> > >  arch/s390/include/asm/hugetlb.h    | 56 +++++++++++++++++++++++++++++++++++++-
> > >  arch/s390/include/asm/pgtable.h    | 20 --------------
> > >  arch/s390/mm/hugetlbpage.c         |  2 +-
> > >  arch/sh/include/asm/hugetlb.h      | 36 ++++++++++++++++++++++++
> > >  arch/sparc/include/asm/hugetlb.h   | 36 ++++++++++++++++++++++++
> > >  arch/tile/include/asm/hugetlb.h    | 36 ++++++++++++++++++++++++
> > >  arch/x86/include/asm/hugetlb.h     | 36 ++++++++++++++++++++++++
> > >  mm/hugetlb.c                       | 23 ++++++++--------
> > >  11 files changed, 320 insertions(+), 33 deletions(-)
> > 
> > Ouch, this adds a lot of code that is almost same for all archs except
> > for some. Can we just make one common definition and define only those
> > that differ, please?
> > [...]
> 
> Ok, seems like I misinterpreted the ugliness of HAVE_ARCH_xxx vs. code
> duplication. Paul Mundt also suggested going for an asm-generic/hugetlb.h
> approach. I'll send a new patch soon.

Oh, I have missed that answer so sorry for duplication. Anyway, having
asm-generic and HAVE_ARCH_xxx sounds much better to me for this case as
the duplication is really big.

Thanks
-- 
Michal Hocko
SUSE Labs
--
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