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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date:	Mon, 6 Jul 2015 10:05:24 +0200
From:	Martin Schwidefsky <schwidefsky@...ibm.com>
To:	Dominik Dingel <dingel@...ux.vnet.ibm.com>
Cc:	Andrew Morton <akpm@...ux-foundation.org>,
	linux-kernel@...r.kernel.org,
	Heiko Carstens <heiko.carstens@...ibm.com>,
	linux390@...ibm.com,
	Christian Borntraeger <borntraeger@...ibm.com>,
	Michael Holzheu <holzheu@...ux.vnet.ibm.com>,
	linux-s390@...r.kernel.org, linux-mm@...ck.org,
	Gerald Schaefer <gerald.schaefer@...ibm.com>
Subject: Re: [PATCH 0/4] s390/mm: Fixup hugepage sw-emulated code removal

On Fri,  3 Jul 2015 14:46:05 +0200
Dominik Dingel <dingel@...ux.vnet.ibm.com> wrote:

> Heiko noticed that the current check for hugepage support on s390 is a little bit to
> harsh as systems which do not support will crash.
> The reason is that pageblock_order can now get negative when we set HPAGE_SHIFT to 0.
> To avoid all this and to avoid opening another can of worms with enabling 
> HUGETLB_PAGE_SIZE_VARIABLE I think it would be best to simply allow architectures to
> define their own hugepages_supported().
> 
> Thanks
>     Dominik
> 
> Dominik Dingel (4):
>   Revert "s390/mm: change HPAGE_SHIFT type to int"
>   Revert "s390/mm: make hugepages_supported a boot time decision"
>   mm: hugetlb: allow hugepages_supported to be architecture specific
>   s390/hugetlb: add hugepages_supported define
> 
>  arch/s390/include/asm/hugetlb.h |  1 +
>  arch/s390/include/asm/page.h    |  8 ++++----
>  arch/s390/kernel/setup.c        |  2 --
>  arch/s390/mm/pgtable.c          |  2 --
>  include/linux/hugetlb.h         | 17 ++++++++---------
>  5 files changed, 13 insertions(+), 17 deletions(-)
 
To have an architecture override for hugepages_supported is imho the
cleaner approach compared to the HPAGE_SHIFT tricks. I would have
preferred to use a __weak function but the #ifndef solution is fine
with me as well.

Acked-by: Martin Schwidefsky <schwidefsky@...ibm.com>

-- 
blue skies,
   Martin.

"Reality continues to ruin my life." - Calvin.

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