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.3 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS 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 020AFC433DB for ; Tue, 5 Jan 2021 10:29:01 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 7831B22515 for ; Tue, 5 Jan 2021 10:29:00 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 7831B22515 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=kernel.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id DDCDF6B00EE; Tue, 5 Jan 2021 05:28:59 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id D65436B00EF; Tue, 5 Jan 2021 05:28:59 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id C55468D006E; Tue, 5 Jan 2021 05:28:59 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0157.hostedemail.com [216.40.44.157]) by kanga.kvack.org (Postfix) with ESMTP id ABF306B00EE for ; Tue, 5 Jan 2021 05:28:59 -0500 (EST) Received: from smtpin06.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay04.hostedemail.com (Postfix) with ESMTP id 6697A1EE6 for ; Tue, 5 Jan 2021 10:28:59 +0000 (UTC) X-FDA: 77671348398.06.cook66_360a11f274d8 Received: from filter.hostedemail.com (10.5.16.251.rfc1918.com [10.5.16.251]) by smtpin06.hostedemail.com (Postfix) with ESMTP id 3E94F10039EB3 for ; Tue, 5 Jan 2021 10:28:59 +0000 (UTC) X-HE-Tag: cook66_360a11f274d8 X-Filterd-Recvd-Size: 3340 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by imf04.hostedemail.com (Postfix) with ESMTP for ; Tue, 5 Jan 2021 10:28:58 +0000 (UTC) Received: by mail.kernel.org (Postfix) with ESMTPSA id 7E18C225AB for ; Tue, 5 Jan 2021 10:28:57 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1609842537; bh=A6vKGpMe7rFxhLcuZGbkPRPGkwqF7MwlyKoHjUv/UkE=; h=References:In-Reply-To:From:Date:Subject:To:Cc:From; b=HjbJePpa8tdPJWRzl3nVpQ9gErSkqBZf8MJNYHffkM67peH1mlKkqq+E6NVE0W5v5 6LsffeeduCtXWTEEosaZCRkokHIB0T1LbbNhQ39Z1M67bJIeMVgjtAgp4i0yN2ZMFy jmuFJx2euaLGPJpDEHPuGNpzp2gpk6w6AFggomBv150y/e5gVT5GN8CVWdtC1nYKIY mfZs6slO/iMfhbYGM0JG9D5BayBtv770fDRZD7uOjHm2MZ2PrX9bG3wHzufH2VWRFQ niz+XG8MonyDuk9MdbDDLzE2ecXayx3vtEwZVldAlLK9FpmfhZJSDRsV0vN2/WMxkj a3Gfl3mYh7j8Q== Received: by mail-oi1-f172.google.com with SMTP id s75so35499729oih.1 for ; Tue, 05 Jan 2021 02:28:57 -0800 (PST) X-Gm-Message-State: AOAM533XToftCcMOxSrJTv93TRuHsf68Fo+Y7PAfUbmPIZva9aqzCaGr PeVJnPCoRV4c7kFfq8zfdwMoDZKcrMGqE1PBwz8= X-Google-Smtp-Source: ABdhPJyc2UdT2BlNgTAQH1TFvtHr/2774+C7X1WCqCbxZrnleLxowSMhWzobykhUpTmd2yCiO8bo+gIIEHsNk0o4QxQ= X-Received: by 2002:aca:44d:: with SMTP id 74mr2206832oie.4.1609842536679; Tue, 05 Jan 2021 02:28:56 -0800 (PST) MIME-Version: 1.0 References: <20201230154104.522605-1-arnd@kernel.org> <20210104223634.GB2562866@ubuntu-m3-large-x86> In-Reply-To: <20210104223634.GB2562866@ubuntu-m3-large-x86> From: Arnd Bergmann Date: Tue, 5 Jan 2021 11:28:40 +0100 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH] mm/mremap: fix BUILD_BUG_ON() error in get_extent To: Nathan Chancellor Cc: Andrew Morton , Nick Desaulniers , "Kirill A. Shutemov" , Wei Yang , Arnd Bergmann , Vlastimil Babka , Dmitry Safonov <0x7f454c46@gmail.com>, Brian Geffon , Linux-MM , "linux-kernel@vger.kernel.org" , clang-built-linux Content-Type: text/plain; charset="UTF-8" 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 Mon, Jan 4, 2021 at 11:36 PM Nathan Chancellor wrote: > > I am in agreement with Vlastimil, I would rather see the BUILD_BUG() > dropped or converted into BUG() instead of papering over with > __always_inline. I see your point, but I also generally prefer build-time checks over runtime ones wherever possible, and would prefer a way to keep it in a form that allows that, at least if the check is considered useful at all. > For what it's worth, I only see this build failure > with CONFIG_UBSAN_UNSIGNED_OVERFLOW, which you proposed disabling: > > https://lore.kernel.org/lkml/20201230154749.746641-1-arnd@kernel.org/ I'm building more randconfig kernels without this patch but with the __always_inline reverted now, will see if it comes back. If not, let's just drop this patch. Arnd