Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp1162326pxu; Wed, 6 Jan 2021 14:14:46 -0800 (PST) X-Google-Smtp-Source: ABdhPJzZNzgXgjDFAV7BG1Lo0eJ3vx2um9qk8YJujcAazDb1g3TfgW9Z7UFvHcVeamaZ/7rpZzzE X-Received: by 2002:a17:906:76c9:: with SMTP id q9mr4400120ejn.484.1609971286313; Wed, 06 Jan 2021 14:14:46 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1609971286; cv=none; d=google.com; s=arc-20160816; b=bSmsJSVn63IHDM5IarzPrq0oIzEN8sicFRhwh+FiIsmyxiSTDTinucOsHpGZDfwQ7G Ep6BkPtMQGPqjL0W3756D5juvPelAyIqBIEioXUjp5WvGqL6MLcYRZyxSXsP++tCalau 4WcpI+PYp6fdgyLH4Gb0+wSYh61N30wyr95yAKs2H9fad1jEt/7eFgkVH5VJT92uEsLY sM1nzWZHZCAbUvlTG+ztzzq+6b95sSYFD/Ct2l1qVhrGa2QMUgpchVDJhyvBti9sRSKi /9ZyyOUM44dl9bAoBtT+SStpYre8ogh4SH4QShCBSSCuDLH/627K0/g5DRCGdpV6xLkj OV7A== 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=QWosliBCs1ebWSJHT0D37mGGNglgV4wnwbSsNzOeAgM=; b=L7v/eKkj4G9Lk+EL3bA48Gt8JjT+lccWw584jMSeGNGqkV+1LUjSknFJr5HLutW0On WqHAfvxllh7/8ujz7rjxb03H9/EEnbSDjyq0KQlHSnvRlqt5rXLyF3PXnlvShB+tpZJB 8qORIj9PvXyF4YJLZks5Xzs3bGGpGZiaklTv656Ir4UyoKd6LnN/XECLOmwOznZM9obM Y08/tiDX+ANo/qYsh8MC8+dYlJP9/38djd9R2PxZ5ZiJFk1eVIM3CVtz7Sqv3thvNQSM 0UMzZ1w4iwHaGguRygbp2T/z0WYlqqZwdwhWIAIJpOrafIpm/F7m9iTtJwUPpKhLc6Sx OEvQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=j66kdD6v; 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 t20si1450090edw.31.2021.01.06.14.14.23; Wed, 06 Jan 2021 14:14:46 -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=j66kdD6v; 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 S1727673AbhAFWNQ (ORCPT + 99 others); Wed, 6 Jan 2021 17:13:16 -0500 Received: from mail.kernel.org ([198.145.29.99]:42524 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727650AbhAFWNP (ORCPT ); Wed, 6 Jan 2021 17:13:15 -0500 Received: by mail.kernel.org (Postfix) with ESMTPSA id 05C5523142 for ; Wed, 6 Jan 2021 22:12:35 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1609971155; bh=l0h47PrTK+7sbOlxLanv6k+YDQ92GZKtuNEme2MpWjo=; h=References:In-Reply-To:From:Date:Subject:To:Cc:From; b=j66kdD6vBHfHeoYG5y63Qe+W8aNT82nSjXAgjR7Zr25bTa6QdVXLFjqnfUODaWcSK ZONpKYRuLu/k5UXvKJyNdRGmemzonJSfzbyan0cu1AkRnr/ARIOCNzqKPyMhlQyWwd Ne6+vPlWj95/wnsKFynxv313gO1g1CWhtFa06afgzjPhEItmTnTDrm9xcwBI2FoqCr EmRlqz1aZLIKGkTUxdGomrEj6BzMxCjzghm9JJdmpllME+LdQfgkZNcf9xdE2wx1cw n5GGidKteGA/l3h048Rarr2XN/UWg/dmSILIi1SL+UWPHVelP4iOkRZM5KjX6vthqS 6KhzwJ7WoWAYQ== Received: by mail-oo1-f42.google.com with SMTP id s19so1130152oos.2 for ; Wed, 06 Jan 2021 14:12:34 -0800 (PST) X-Gm-Message-State: AOAM533xsid9SKWYTGDBdV4sdIa5xGvxvEYskGiAsNRBZjJuIrX3uCKl 2PqmXLQB5p65gec90FO5PKT9VQiNS96v5hvY8+o= X-Received: by 2002:a4a:9c01:: with SMTP id y1mr4209442ooj.15.1609971154230; Wed, 06 Jan 2021 14:12:34 -0800 (PST) MIME-Version: 1.0 References: <20201230154749.746641-1-arnd@kernel.org> <202101061350.913E1FDF6@keescook> In-Reply-To: <202101061350.913E1FDF6@keescook> From: Arnd Bergmann Date: Wed, 6 Jan 2021 23:12:18 +0100 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH] ubsan: disable unsigned-integer-overflow sanitizer with clang To: Kees Cook Cc: Arnd Bergmann , Nathan Chancellor , Nick Desaulniers , Andrew Morton , Marco Elver , George Popescu , Stephen Rothwell , "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 Wed, Jan 6, 2021 at 10:57 PM Kees Cook wrote: > On Wed, Dec 30, 2020 at 04:47:35PM +0100, Arnd Bergmann wrote: > > diff --git a/lib/Kconfig.ubsan b/lib/Kconfig.ubsan > > index 8b635fd75fe4..e23873282ba7 100644 > > --- a/lib/Kconfig.ubsan > > +++ b/lib/Kconfig.ubsan > > @@ -122,6 +122,8 @@ config UBSAN_SIGNED_OVERFLOW > > > > config UBSAN_UNSIGNED_OVERFLOW > > bool "Perform checking for unsigned arithmetic overflow" > > + # clang hugely expands stack usage with -fsanitize=object-size > > + depends on !CC_IS_CLANG > > depends on $(cc-option,-fsanitize=unsigned-integer-overflow) > > Because of Clang implementation issues (see commit c637693b20da), this is > already "default n" (and not supported under GCC at all). IIUC, setting > this to "depends on !COMPILE_TEST" won't work for randconfigs, yes? Ah, I had not realized this is clang specific. Adding the !COMPILE_TEST dependency would hide it for me, which may be good enough for me. > Is there some better way to mark this as "known to have issues, please > don't include in randconfig?" > > I'd like to keep it around so people can continue to work out the > problems with it, but not have unexpecting folks trip over it. ;) I've reverted that patch locally now and default-enabled for randconfigs. Now that I have an otherwise clean build, this should provide me with a full set of files that produce the warning. If the number is small enough, I could try opening individual github issues. Arnd