Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp1192873pxu; Wed, 6 Jan 2021 15:20:13 -0800 (PST) X-Google-Smtp-Source: ABdhPJzt7sqzkNk4wS3M0j8ycyiZvMHOmQfTEtXoLb20t7ADOr6HxY3+dX3xiio4e+U6pv/yQb5n X-Received: by 2002:a17:906:9388:: with SMTP id l8mr4441707ejx.22.1609975213505; Wed, 06 Jan 2021 15:20:13 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1609975213; cv=none; d=google.com; s=arc-20160816; b=ipkdHmnQPxDI4vWZnTfXmKtAEpVvnllmp/bxwFlTul4puvHaVt2IbjGaHX7fqOyNHh WRTlr9uLb5YHvO9S+xa9O6ivkZiBnEjk6UdYeYwllDaClhJE3IslcX1Yl/UwEx93anr4 v3ktnQAnyvJwZW0tHyVVVw2x1lUdH2PdW90uf6HIHQeBT4z4i3k2lJc+zPtCWFJefG7p dag50skWUWJSP3iyBfgJL/9xW8M2KJvxr5G7vT7xHdcwHOxGQT9qR0nv/Ac1TnjVBbgT 1nZW1ieWRaifPx/ogugxTntaN5V2ckRbT5bceuoiqqbwm9LTS9VjFgeC8xFHDDsdUcKo th1A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=J3lGr4YZbk3BlMgDSCib4VSawc9GYX81ZHhsXt4/HtQ=; b=veXu2G0pMgUch5tD2+m1dUDXaNYRJBlnid9QnGgYdTBAWd8PfcM8MN3Z6YgRLxtMHI XXdbEJ7c2Raiq+VOEZxGJnsd/bTq8GZ3IKFQbNIXeQuMLM+xZzUDszdED3vbPQHClKyV 7x1NAbeZJ/G3oU+LxNVCOJh9lkgThL6Wc8g6tVAKtiD8Bsh9Cpnlldkve+EpRlcY3iug 3sWthMz6+SdSZ8YQQldJeBfiTo9XGGhm1fgnYhgzIF2zTLvMRY6ljo/jywj1R86SaTEV VuzewZQVliBiZ5V2GCV/2s9BRK7LOUSv0gHUHjVSVfzNRhxbY4QVSBO027eT9Sx6nKsJ zeaQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=j8pUIx85; 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=chromium.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id y35si1482964edy.362.2021.01.06.15.19.50; Wed, 06 Jan 2021 15:20:13 -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=@chromium.org header.s=google header.b=j8pUIx85; 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=chromium.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727314AbhAFXSP (ORCPT + 99 others); Wed, 6 Jan 2021 18:18:15 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54984 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726119AbhAFXSP (ORCPT ); Wed, 6 Jan 2021 18:18:15 -0500 Received: from mail-pg1-x52f.google.com (mail-pg1-x52f.google.com [IPv6:2607:f8b0:4864:20::52f]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 3E561C061757 for ; Wed, 6 Jan 2021 15:17:35 -0800 (PST) Received: by mail-pg1-x52f.google.com with SMTP id p18so3280690pgm.11 for ; Wed, 06 Jan 2021 15:17:35 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=J3lGr4YZbk3BlMgDSCib4VSawc9GYX81ZHhsXt4/HtQ=; b=j8pUIx85KIAbfaHy6fVIzRrFBGjkdjEOxJ6mAw2oQ0m2/uctUcLz8Gdt29lkg5GGFy 4/oje9/GSD2O4DfUWashHtBda9ZLPw4gNmNWEfz35qgoCi/o0KdH+dAwN53yW4zanT7Y Txnjp9QMp50MdqjHxb4CuupTx7tzAh6gLLMwg= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=J3lGr4YZbk3BlMgDSCib4VSawc9GYX81ZHhsXt4/HtQ=; b=NGPnAaXYqqR6vQ/nmpVAp9X6HzZDjXBEIjZ9SUwYf1M91rA5wa9UIRZXbKiCRD1k5T zzwIKUjzEfaDROONKgNQjebDr1v5swuhiWleDzUt4fxPvc0AWIuk88nk+PDgUopei/+8 xc1GFb91rPTfFDvP5qZKJLYscohRX1brenDbo6qtrPOEuY5WLG+oR4Yrzt19y7I0kJnP b07EhRkj+6/bGTCjxh0CZCBZYw8CUrBq7HZkDNY4MHHEAJte4bWSpfAl6c0IJ9ZNSaVX 8V3nZo4QWWjs2OUSNOOjvChk/8qP4B2tyi6Kt9OZPooVaAomxtgXBOuW5XAxrTQ56mp5 S2vg== X-Gm-Message-State: AOAM530/uNeRMKBzBu3k2O3J9g3kmOjhe5ZsNcT3Gp+N3q5BYt5p2oZW qI8AGI79pjdMw3u3Pbw63CgGLA== X-Received: by 2002:a05:6a00:a91:b029:19d:9421:847 with SMTP id b17-20020a056a000a91b029019d94210847mr6307899pfl.72.1609975054844; Wed, 06 Jan 2021 15:17:34 -0800 (PST) Received: from www.outflux.net (smtp.outflux.net. [198.145.64.163]) by smtp.gmail.com with ESMTPSA id q9sm3807528pgb.82.2021.01.06.15.17.33 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 06 Jan 2021 15:17:34 -0800 (PST) Date: Wed, 6 Jan 2021 15:17:33 -0800 From: Kees Cook To: Arnd Bergmann Cc: Arnd Bergmann , Nathan Chancellor , Nick Desaulniers , Andrew Morton , Marco Elver , George Popescu , Stephen Rothwell , "linux-kernel@vger.kernel.org" , clang-built-linux Subject: Re: [PATCH] ubsan: disable unsigned-integer-overflow sanitizer with clang Message-ID: <202101061516.F0EA5F0@keescook> References: <20201230154749.746641-1-arnd@kernel.org> <202101061350.913E1FDF6@keescook> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Jan 06, 2021 at 11:12:18PM +0100, Arnd Bergmann wrote: > 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. I thought COMPILE_TEST does not get set for randconfig? > > 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. Okay, let me know if something needs changing. :) -- Kees Cook