Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp1203144pxu; Wed, 6 Jan 2021 15:43:05 -0800 (PST) X-Google-Smtp-Source: ABdhPJwwfCr1kDIuV6yBRrckz/t9cxJibMx3F8i7GDFTtVItIhVv/VrdriXyLLfaxVEK30+UjVTM X-Received: by 2002:a17:906:6c94:: with SMTP id s20mr4499363ejr.0.1609976585408; Wed, 06 Jan 2021 15:43:05 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1609976585; cv=none; d=google.com; s=arc-20160816; b=cpACp/BeUkWluMEx/ncc1+HXRT6d5hlYj9VS+o+7dkI/05vkNbfqZvskR1k2ZtF0Aa HBsEcdtk1FW0KqOgo7+Bpd9mUUeTKv4qMhaTyQtq09YPTeiJ0OTr074lAjmsF21PBOm3 dNHObwJ5LmQYoAw7hD3iFFCskvgSveQqhBBbsS57XvJ2oqMRj0DVFnqIbl33viu6pufK 49dqVHL6uj+hRhyo5ucqguMHx5NpUGcAOSgHwpwvmI0CccMVi+ABJO1sjoS7xk3zUzu6 X8KuogRElG528IdyQbwLowiCOTi6G5qhckNELlStvdgBtS4dbLzDDkIACsadUaNHSmFE dfbQ== 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=nsOv/x1xN18a//dBn2Ouyy2QaSImAvu3oD/rp9xzaQU=; b=z1W0yZiEJon/YVUoK63nnpFH/rN/1sQZvh7cH0KhKZB0IvTU32u+EbOkH3+8U+wlsK TjNuA+uborqZnBDF9sb156lialK4TReJmVI9JHIM9Qv2rBAC6apmeopH6UxJlgFx9Cqy v8FehUui5DzO2Bp2HTEpdy/nRPZagsxsSnFVtVrqkIpsPd7w/WlZWkWoUCHyDANGA5rG /7Rt9vMYDfqeSqgMTsCJ4Lc04CFUa6ZOMyKoT9qrpphtZQjAdFpnukZP1D/n9HtwxPcu hB5KHrFHkB5yk7dIcyXpz2bQJEu5F1iHIRhiUNmr5Aq1QQFMbAaLDjIlIq1xwN5G/X84 QxJw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=UAMnwaB6; 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 n27si1426952ejc.673.2021.01.06.15.42.41; Wed, 06 Jan 2021 15:43:05 -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=UAMnwaB6; 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 S1727461AbhAFXlV (ORCPT + 99 others); Wed, 6 Jan 2021 18:41:21 -0500 Received: from mail.kernel.org ([198.145.29.99]:51246 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726918AbhAFXlU (ORCPT ); Wed, 6 Jan 2021 18:41:20 -0500 Received: by mail.kernel.org (Postfix) with ESMTPSA id 2757C2333B for ; Wed, 6 Jan 2021 23:40:40 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1609976440; bh=XOiJj+aIAGnC0jZGbQLlZOvHWe5wTw0/+J5P7xkZwX0=; h=References:In-Reply-To:From:Date:Subject:To:Cc:From; b=UAMnwaB6o+JwXiwksrAmeW979rrIGuvZgv+5DUP5gzQwPWBpt8/WmlXeImtv4P/Zn +wlNalsHsflksplnLfUtlC3uo2dFupvhMLuhMVVNl3byrutCcg0UyeNYb7N1PdDbm/ o7b2Od2QDID6R5fkpvCox+7xF6MGW/eFZrQ9GcSVs/r+9fUny0yLTkqiYNqxbZ+ABt oItasfWLRftcA1wbuEhwXXinW7gOssFfRkKZf9+MmKCFb1kN/ENuDm7pSACYg6nMgq fg2ejhm+VrxtAZ/wjk5x3ClI7K07KYsnQCWNgyHVk69Z7ueOkzSoOxhw3EHHvlmrJV tP71J9gU69k4g== Received: by mail-oo1-f45.google.com with SMTP id j21so1162470oou.11 for ; Wed, 06 Jan 2021 15:40:40 -0800 (PST) X-Gm-Message-State: AOAM531sfxOQ48t9hO8p/LQTvmL1PsEb+SYulZkAQCAKjvtQWkTlih5R Eibe6GwVgTESHbkx77CRMgPbCwuLqHx3LoPBkSA= X-Received: by 2002:a4a:9c01:: with SMTP id y1mr4394668ooj.15.1609976439445; Wed, 06 Jan 2021 15:40:39 -0800 (PST) MIME-Version: 1.0 References: <20201230154749.746641-1-arnd@kernel.org> <202101061350.913E1FDF6@keescook> <202101061516.F0EA5F0@keescook> In-Reply-To: <202101061516.F0EA5F0@keescook> From: Arnd Bergmann Date: Thu, 7 Jan 2021 00:40:23 +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 Thu, Jan 7, 2021 at 12:17 AM Kees Cook wrote: > > 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? It does on my kernel, though I never submitted that patch ;-) Arnd