[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20201220212320.GA15600@casper.infradead.org>
Date: Sun, 20 Dec 2020 21:23:20 +0000
From: Matthew Wilcox <willy@...radead.org>
To: Randy Dunlap <rdunlap@...radead.org>
Cc: linux-kernel@...r.kernel.org, Jens Axboe <axboe@...nel.dk>,
Andrew Morton <akpm@...ux-foundation.org>,
Toralf Förster <toralf.foerster@....de>,
linux-mm@...ck.org
Subject: Re: [RFC PATCH 1/2] log2: handle LARGE input to
__roundup_pow_of_two()
On Sun, Dec 20, 2020 at 01:10:37PM -0800, Randy Dunlap wrote:
> UBSAN detected a 64-bit shift in log2.h:__roundup_pow_of_two():
> UBSAN: shift-out-of-bounds in ./include/linux/log2.h:57:13
> shift exponent 64 is too large for 64-bit type 'long unsigned int'
>
> This is during a call from mm/readahead.c:ondemand_readahead(),
> get_init_ra_size(), where the 'size' parameter must have been
> extremely large (or "negative").
Actually, I think it was zero, which is the real bug that should be fixed.
Powered by blists - more mailing lists