Received: by 2002:a6b:fb09:0:0:0:0:0 with SMTP id h9csp767302iog; Wed, 29 Jun 2022 09:45:55 -0700 (PDT) X-Google-Smtp-Source: AGRyM1uj2Vl9Ew/I9xvKdgKeMGDQ3iqGiM2V1CtjPJzLDCez9VSGj5b2drW2m2uMrTOAS6ul7mUP X-Received: by 2002:a65:6499:0:b0:3fc:dcaa:ad62 with SMTP id e25-20020a656499000000b003fcdcaaad62mr3575464pgv.63.1656521155562; Wed, 29 Jun 2022 09:45:55 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1656521155; cv=none; d=google.com; s=arc-20160816; b=qlJodUOV7bhPXUrcZUB9JeU4FgdlqB0zwzm5tImx8Lg7orux6WZyvcQ0W6TyNFjhLv QPcJbaqtYIZyiMhm2/eFZtOaEYRXYSJc1e2VZSZee79lKEOZuEpIak9tCqYNQ1GRvHSM 1vjkT88srKg9B6uiPEP93NfUiXqdjtjHExziPdk/g+axDynSu+EsaoXXPRaRCioapcaL eC02C+rVlgAQvZbmzvxqM0C8aHnVY1rzCgMkOizkyaIWxPvkOz8jd6yrmewmawh/KPh3 +z57ziW5T2ikDFAZoNSO3VNlJhw86ga40Sg+gA492RZZI/5FEyAkdewYWJ+NLW4Lfqnv L7UQ== 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=VM2GKMkxNPNYEXWY96+9yjtojvqeBKz4f1MzUqFZ9xs=; b=hbQWF+1D51gdrCZI//KO803z7T/RzaBRSaED1nfqe3Hvt5y6TigrSba/KI1K1PYnSZ IrJno4Yyppfl5n/q0aThJmsg3XA/KnVb8rzsJ3vpJhdbh1F6NoiI49TlhWzVO8h0N56+ 6IVpBFacZNigt92Z1TMI0+eLFjOjAB4qQsNvu84DMpl1Y9AonkDgvWbuMs8/I2MrXTl1 WVRBwdE+CMVD9Cl+iJNqcsgYsbcRN9nBjsRzVlCkCl2+qqZXc9jUaUjIcxiGzQ9KxkUl 5SQhsi755nKqrcu0PhkvN9uTaYxhqoclP/J/derYwnGMNS71Jc37CxkpdrT/NHV0kZeb bbSg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b="cp7/KFmR"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 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 out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id y16-20020a63e250000000b0040ca441db06si22104080pgj.124.2022.06.29.09.45.41; Wed, 29 Jun 2022 09:45:55 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b="cp7/KFmR"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 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 S229952AbiF2QeE (ORCPT + 99 others); Wed, 29 Jun 2022 12:34:04 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46242 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229640AbiF2QeE (ORCPT ); Wed, 29 Jun 2022 12:34:04 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 70CD52126B for ; Wed, 29 Jun 2022 09:34:03 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 0B35B61CD7 for ; Wed, 29 Jun 2022 16:34:03 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 0E9F8C34114; Wed, 29 Jun 2022 16:34:02 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1656520442; bh=edcI2vq8ccjkKH8WWYEdsMPx4T6G7LxZy5g/HfP1Iug=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=cp7/KFmRiQN89tgZlzc+ug9JGoAqdjDruVFxhte62BzFWPhVd9Cep0TItji/M9MMa XLLQrscLpqm4i4TgKvmVvY+w/I0TnFP4OXUOcAvqAd/5Px9BnN/2WQsrETKesidyYh S8iYV7xoKLAajUm4Y/9wImlSeZZkrf9+5UyvH7eDN8rCmZf+Hd0Eq5EquL6LDQbS3p eZuq8TAN50HHn9MsBvqPsdcfdWyTxM/HADGHLLN60yUj1xU81EwPfLAo0y7cwmUqFP 2F7Tj5DAJMQ97U58LjQmiHn+crjviQezUdSGQNYs3QnnPAmKw+pV8Sf/IFDe10GgNk w1IkYi02syKSQ== Date: Wed, 29 Jun 2022 09:34:00 -0700 From: Josh Poimboeuf To: Linus Torvalds Cc: Josh Poimboeuf , Nick Desaulniers , Sudip Mukherjee , Nathan Chancellor , Kees Cook , Linux Kernel Mailing List , clang-built-linux , Peter Zijlstra Subject: Re: mainline build failure due to 281d0c962752 ("fortify: Add Clang support") Message-ID: <20220629163400.cgeqmuu45zsyxtwq@treble> References: <20220628224255.w4lmzalkx3qejuyg@treble> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: X-Spam-Status: No, score=-7.5 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Jun 29, 2022 at 09:08:20AM -0700, Linus Torvalds wrote: > On Tue, Jun 28, 2022 at 3:43 PM Josh Poimboeuf wrote: > > > > So, something like this: > > No, clang should just be fixed. > > These UBSAN reports should usually be WARN_ON_ONCE. > > It's all the same issues we've had before: causing a panic will just > kill the machine, and gets us fewer reports. > > Now, UBSAN is something that presumably normal people don't actually > run on real hardware, so it's probably less of a deal than some. But > hey, maybe somebody wants to actually run an UBSAN kernel on a real > load with a full accelerated graphical UI and real drivers: a panic > may end up killing the kernel, and there you sit, with a dead machine > and no idea what went wrong. > > So the whole "panic if UBSAN reports something" is COMPLETE GARBAGE. > It actually makes the whole point of running UBSAN go away. You *lose* > coverage. > > So please don't make the kernel worse because clang got something like > this wrong. > > Just fix clang. > > And fix your mindset. Yeah, good point. All the other UBSAN handlers (other than builtin unreachable) try to recover. There's nothing special about divrem overflow which requires it to be fatal. So clang needs to stop assuming the divrem overflow handler is noreturn. -- Josh