From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.1 required=3.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,NICE_REPLY_A, SPF_HELO_NONE,SPF_PASS,USER_AGENT_SANE_1 autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 1B920C433DB for ; Tue, 29 Dec 2020 22:55:35 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 7AEA620867 for ; Tue, 29 Dec 2020 22:55:34 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 7AEA620867 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=infradead.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id A9B178D006D; Tue, 29 Dec 2020 17:55:33 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id A7A608D006A; Tue, 29 Dec 2020 17:55:33 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 9AF5B8D006D; Tue, 29 Dec 2020 17:55:33 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0002.hostedemail.com [216.40.44.2]) by kanga.kvack.org (Postfix) with ESMTP id 899D58D006A for ; Tue, 29 Dec 2020 17:55:33 -0500 (EST) Received: from smtpin08.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay03.hostedemail.com (Postfix) with ESMTP id 472DA8249980 for ; Tue, 29 Dec 2020 22:55:33 +0000 (UTC) X-FDA: 77647828146.08.nerve21_1906b14274a0 Received: from filter.hostedemail.com (10.5.16.251.rfc1918.com [10.5.16.251]) by smtpin08.hostedemail.com (Postfix) with ESMTP id 277DA1819E76B for ; Tue, 29 Dec 2020 22:55:33 +0000 (UTC) X-HE-Tag: nerve21_1906b14274a0 X-Filterd-Recvd-Size: 2913 Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) by imf13.hostedemail.com (Postfix) with ESMTP for ; Tue, 29 Dec 2020 22:55:32 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=merlin.20170209; h=Content-Transfer-Encoding:Content-Type: In-Reply-To:MIME-Version:Date:Message-ID:From:References:Cc:To:Subject:Sender :Reply-To:Content-ID:Content-Description; bh=f+I1LAcrnF7P65uDZQXvWz0UkdO1KBhlZ7poyZtMoZo=; b=etrwlRRw/aXgjwHjIFVxie64ON pYUPeTlAmY8UFf2dp3n3SQLSdIMYANSjSkBhJQtUtzcz95EGB2VH2uPhM//G8jObFRJHoB5n3EcK9 WjACR+EMORE7sFn9rk+8sxw7twupDn34DBdQzjfAKzs9f/dUlCYoief1KPOB58Xz+CaJPlxpEcvIc ZYZplPADW4jF2O8lnXFRWeNxYyMAm7O93t11KpmYNcEIus2XBLR3hhmhypFd+sxbqiGu5i0wbkcH5 bjUmd9bHRppqqslQBz0q//GSbvRq7uYoTiBWo1NQ1S1Lxrtiwd5zOywATEb2rBNJiAQG5A8Qmi8pL r2alw1CA==; Received: from [2601:1c0:6280:3f0::2c43] by merlin.infradead.org with esmtpsa (Exim 4.92.3 #3 (Red Hat Linux)) id 1kuNto-0001j6-At; Tue, 29 Dec 2020 22:55:28 +0000 Subject: Re: [PATCH -mm] mm: readahead: apply a default readahead size To: Matthew Wilcox Cc: linux-kernel@vger.kernel.org, =?UTF-8?Q?Toralf_F=c3=b6rster?= , Andrew Morton , Jens Axboe , linux-mm@kvack.org References: <20201229212634.31307-1-rdunlap@infradead.org> <20201229222311.GD28221@casper.infradead.org> From: Randy Dunlap Message-ID: Date: Tue, 29 Dec 2020 14:55:23 -0800 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.4.0 MIME-Version: 1.0 In-Reply-To: <20201229222311.GD28221@casper.infradead.org> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: 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