lkml.org 
[lkml]   [2018]   [Aug]   [20]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] x86/speculation/l1tf: fix overflow on l1tf_pfn_limit() on 32bit
On Mon, Aug 20, 2018 at 11:58:35AM +0200, Vlastimil Babka wrote:
> On 32bit PAE kernels on 64bit hardware with enough physical bits,
> l1tf_pfn_limit() will overflow unsigned long. This in turn affects
> max_swapfile_size() and can lead to swapon returning -EINVAL. This has been
> observed in a 32bit guest with 42 bits physical address size, where
> max_swapfile_size() overflows exactly to 1 << 32, thus zero, and produces the
> following warning to dmesg:
>
> [ 6.396845] Truncating oversized swap area, only using 0k out of 2047996k
>
> Fix this by using unsigned long long instead.

Looks good.

Acked-by: Andi Kleen <ak@linux.intel.com>

BTW our much worse problems right now are crash reports on several
stable kernels, especially with large pages

I'll dig into this more today, but if you have any hints from testing/fixing
your own backports please share them.

-Andi

\
 
 \ /
  Last update: 2018-08-20 16:21    [W:0.055 / U:0.036 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site