[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <ec3030fd-d549-99cf-fe47-703b1fbd678d@infradead.org>
Date: Tue, 29 Dec 2020 14:55:23 -0800
From: Randy Dunlap <rdunlap@...radead.org>
To: Matthew Wilcox <willy@...radead.org>
Cc: linux-kernel@...r.kernel.org,
Toralf Förster <toralf.foerster@....de>,
Andrew Morton <akpm@...ux-foundation.org>,
Jens Axboe <axboe@...nel.dk>, linux-mm@...ck.org
Subject: Re: [PATCH -mm] mm: readahead: apply a default readahead size
On 12/29/20 2:23 PM, Matthew Wilcox wrote:
> On Tue, Dec 29, 2020 at 01:26:34PM -0800, Randy Dunlap wrote:
>> UBSAN reports an invalid shift size:
>>
>> mr-fox kernel: UBSAN: shift-out-of-bounds in ./include/linux/log2.h:57:13
>> mr-fox kernel: shift exponent 64 is too large for 64-bit type 'long unsigned int'
>>
>> Original report:
>> https://lore.kernel.org/lkml/c6e5eb81-680f-dd5c-8a81-62041a5ce50c@gmx.de/
>>
>> Follow-up report:
>> https://lore.kernel.org/lkml/0c283ea9-b446-0e40-6dc8-e9585ae171b4@gmx.de/T/#m9b604660925f9e8a544f7453130c31d083c1e5bb
>>
>>
>> Willy suggested that get_init_ra_size() was being called with a size of 0,
>> which would cause this (instead of some Huge value), so add a check in
>> that function for size == 0, and if 0, default it to 32 (pages).
>
> No, this is wrong. 'size' in this case is the size of the read.
> And it's zero. Is this fixed by commit
> 3644e2d2dda78e21edd8f5415b6d7ab03f5f54f3
>
Toralf, can you test with 5.11-rc1 (or later)?
thanks.
--
~Randy
Powered by blists - more mailing lists