Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp14474209pxu; Tue, 5 Jan 2021 02:31:49 -0800 (PST) X-Google-Smtp-Source: ABdhPJwUqqWnrsuvvRi1P8qmZ8pb5XzLAcQJUlEaEsaaDBlTlTEMvD67ezUnqnBov24RPeFAwQzQ X-Received: by 2002:a50:b944:: with SMTP id m62mr74391275ede.182.1609842709455; Tue, 05 Jan 2021 02:31:49 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1609842709; cv=none; d=google.com; s=arc-20160816; b=pW8sNxrdrFxen+v25wkTQIVBTIFA4rHtCVZzvXuiKOIrmigCrdgOi9j96VWpNhnr+J Os+DTLjtyyY0bPvRytWzN/1YAA0GP8we1gZ6gmWT19vbcuUT6bW4WeA7PIU+w1Sxj/8x K3AvsenI3ZTD29fks3XteQBbZJgqDSrZa3Ba5ADdh7EnmecFYPU1eUgREXUSDq2clV8y +Bc3SbUfRaYoS1l3DvB0gdKAkOmDDZDR12SNQ4Z//WtfmUlczhVCcGeW/o3LSN6vaA/w IAEd1WZD6VGW73VZJ8UhmxLqIP4bmcP1fpdaHRccaLRVh5I2sk7gnJsPlv2zniJt5QHI /d0Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=MVZBu5hJ3yXRP/76P3rg8VVhjrji6NrKbXn1bWzPh98=; b=g12j2g0GdrwOAVOzdtG6y4SXLO6YYqsLojE2Ldy/qGLlXijfUwHweZxfEd9wDlxE0I samth5G9OckY83SFArdyUR0uwK+lQekJW9bubB106xMqzYxonr1GANHn8Tyqj60Kl8Bq 8xOpuJdzT3zCva2SWddiDaxps0/a+N7/qfN3rjR3L6ZnVtgZB5piYot+ztnkx2s13Fm6 D3fk56wxkJoIBN/0ikR9YjchmCC8XB3xIm9m0Ta2ad1iMz+AXpFAZiFT61FTlLkcpTLJ zJoOAHyUEFNfA9bNvRBR6hfTqCLvEKNPmg2un2FTCAtUp8yrH1MAT3cP7tWPxuX1xllC 5Ebg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=HjbJePpa; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id e22si36574598edu.45.2021.01.05.02.31.26; Tue, 05 Jan 2021 02:31:49 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=HjbJePpa; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728591AbhAEK3i (ORCPT + 99 others); Tue, 5 Jan 2021 05:29:38 -0500 Received: from mail.kernel.org ([198.145.29.99]:60496 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728168AbhAEK3i (ORCPT ); Tue, 5 Jan 2021 05:29:38 -0500 Received: by mail.kernel.org (Postfix) with ESMTPSA id 7AAFA2255F 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-f170.google.com with SMTP id 15so35508395oix.8 for ; Tue, 05 Jan 2021 02:28:57 -0800 (PST) X-Gm-Message-State: AOAM533VzR/5dfA5KZwFcnPtKXRPVU/1jOKicBq84dM0VvffOLrlg5m6 XHfrHbqbdPQcOgtDzbEnRTX1RHlbWkJ7eodUMMo= 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" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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