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, 13 Apr 2017 05:46:33 -0700
From:   Matthew Wilcox <willy@...radead.org>
To:     "Aneesh Kumar K.V" <aneesh.kumar@...ux.vnet.ibm.com>
Cc:     akpm@...ux-foundation.org, mhocko@...e.com, ak@...ux.intel.com,
        mtk.manpages@...il.com, linux-mm@...ck.org,
        linux-kernel@...r.kernel.org, Davidlohr Bueso <dbueso@...e.de>,
        khandual@...ux.vnet.ibm.com
Subject: Re: [PATCH] mm,hugetlb: compute page_size_log properly

On Thu, Apr 13, 2017 at 11:32:09AM +0530, Aneesh Kumar K.V wrote:
> > +#define SHM_HUGE_SHIFT	26
> > +#define SHM_HUGE_MASK	0x3f
> > +#define SHM_HUGE_2MB	(21 << SHM_HUGE_SHIFT)
> > +#define SHM_HUGE_8MB	(23 << SHM_HUGE_SHIFT)
> > +#define SHM_HUGE_1GB	(30 << SHM_HUGE_SHIFT)
> > +#define SHM_HUGE_16GB	(34 << SHM_HUGE_SHIFT)
> 
> This should be in arch/uapi like MAP_HUGE_2M ? That will let arch add
> #defines based on the hugepae size supported by them.

Well, what do we want to happen if source code contains SHM_HUGE_2MB?
Do we want it to fail to compile on ppc, or do we want it to request 2MB
pages and get ... hmm, looks like it fails at runtime (size_to_hstate
ends up returning NULL).  So, yeah, looks like a compile-time failure
would be better.

But speaking of MAP_HUGE_, the only definitions so far are in arch/x86.
Are you going to add the ppc versions?

Also, which header file?  I'm reluctant to add a new header, but
asm/shmbuf.h doesn't seem like a great place to put it.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ