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]
Date:	Thu, 28 Jul 2016 21:42:17 -0700 (PDT)
From:	David Miller <davem@...emloft.net>
To:	mike.kravetz@...cle.com
Cc:	linux-kernel@...r.kernel.org, sparclinux@...r.kernel.org,
	akpm@...ux-foundation.org, kirill.shutemov@...ux.intel.com,
	nitin.m.gupta@...cle.com
Subject: Re: [PATCH] sparc64 mm: Fix base TSB sizing when hugetlb pages are
 used

From: Mike Kravetz <mike.kravetz@...cle.com>
Date: Fri, 15 Jul 2016 13:08:42 -0700

> do_sparc64_fault() calculates both the base and huge page RSS sizes and
> uses this information in calls to tsb_grow().  The calculation for base
> page TSB size is not correct if the task uses hugetlb pages.  hugetlb
> pages are not accounted for in RSS, therefore the call to get_mm_rss(mm)
> does not include hugetlb pages.  However, the number of pages based on
> huge_pte_count (which does include hugetlb pages) is subtracted from
> this value.  This will result in an artificially small and often negative
> RSS calculation.  The base TSB size is then often set to max_tsb_size
> as the passed RSS is unsigned, so a negative value looks really big.
> 
> THP pages are also accounted for in huge_pte_count, and THP pages are
> accounted for in RSS so the calculation in do_sparc64_fault() is correct
> if a task only uses THP pages.
> 
> A single huge_pte_count is not sufficient for TSB sizing if both hugetlb
> and THP pages can be used.  Instead of a single counter, use two:  one
> for hugetlb and one for THP.
> 
> Signed-off-by: Mike Kravetz <mike.kravetz@...cle.com>

Great catch, applied and queued up for -stable.

Thanks.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ