Received: by 2002:ac0:da4c:0:0:0:0:0 with SMTP id a12csp639030imi; Thu, 21 Jul 2022 08:06:53 -0700 (PDT) X-Google-Smtp-Source: AGRyM1u1TCmcqbTmlgfOBsjvT8QXf6H/iKdiD9QOsB3xhfjAFUeauZURdhBNu5Oo6OqHxE1nzbwH X-Received: by 2002:a05:6402:3707:b0:437:61f9:57a9 with SMTP id ek7-20020a056402370700b0043761f957a9mr47380891edb.1.1658416013063; Thu, 21 Jul 2022 08:06:53 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1658416013; cv=none; d=google.com; s=arc-20160816; b=qrN0xRKs+TOe0nIo6gp9kDajD9mWtSNWeL3nL+1LrYGRIfMz6SPhkYNVwD1kWciTre dMDIt8EALZgTQMnZlozrUGItC+gm3MNRr9zOAJozS3ac2TGDkOgS4bsoe3tVB652cQO5 zgNuzarMz6PLRzLBx+AMOPckwM5iDmHw5IlchzlxftxPDu79P4BIwVryXQvHsK+Qh/w+ qbxWalKqdhkVZ991M2B2HgazDeoy38kE5NFc+74cXJVGPznam7cul4IhJUJDkrh8+0ni +yGbVH5zAOpd6b4dzh3UnMPU7HR+VsG5XQHHqt2gSXLZEuYd3O+icDmSEEsu/h0vBmi+ 4zcQ== 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=b6hct8xCrE6CB9ftodiKvDlwTR0gdrnA5ClwcliBbPY=; b=DCMYBQBbItNwXWd7h4YCLgEbgBEUkM0gqqF/r0One61uTRtNJq0Dc8/i5Am7lDtsqq yeyLERDzrDLF/jIgvRuUZcySDZ0SYJeqRwNLmx4bLBJIYJi9uxdpK62oxb22pDAX9EVB WphFqy8xnxGVVa+fpBXuAtt/JKWP0auz3I02VCJMcunlEi7MOKhTfuI90QpRFOViDIyQ eLhiOZelFMjIyRppj7drRYTi3eGma1fnagN8KS9WZrJVIhC4Ns6EVzQrQWmnq8vuMdL1 P2WZyF30DBoeRGp67BKE52pkazzcVgVMFwyvzGPr6rZv5Oj057yf7+zEwshenW/94wEd GkaQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20210112 header.b=JMubbrBv; 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=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id t24-20020aa7db18000000b0043add012c5dsi2176055eds.507.2022.07.21.08.06.28; Thu, 21 Jul 2022 08:06:53 -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=@google.com header.s=20210112 header.b=JMubbrBv; 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=REJECT sp=REJECT dis=NONE) header.from=google.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229540AbiGUOsz (ORCPT + 99 others); Thu, 21 Jul 2022 10:48:55 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34342 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229379AbiGUOsy (ORCPT ); Thu, 21 Jul 2022 10:48:54 -0400 Received: from mail-lf1-x131.google.com (mail-lf1-x131.google.com [IPv6:2a00:1450:4864:20::131]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 877EF66AFE for ; Thu, 21 Jul 2022 07:48:53 -0700 (PDT) Received: by mail-lf1-x131.google.com with SMTP id u19so3235313lfs.0 for ; Thu, 21 Jul 2022 07:48:53 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20210112; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=b6hct8xCrE6CB9ftodiKvDlwTR0gdrnA5ClwcliBbPY=; b=JMubbrBv1Nd+8w6FEi5or5LUmjlC2ld6RSrBV9zeh4LiULoqJiy9EVpd3jtEFtwJCi PZHnxwTZ1skg3P7ZHuFqsRPmgQuZUhh5qDWu0VuZ/qPk4BjGMeThmvjpzJLjrSpIK2Cm EKrTCSJ7od43H4++62FeYEuZDqMh+oH31imbnETjgycNPi0hBVSySmdfM+XljybFGRBM Z1lu2fA4faSic32ei6AxwHfu2kATgh69lgbGfQy6YffNkFLmFlWU+qpcfDGFmoZEE0Ha fpSY4lN7hB544+d/F4GCctLNlY12yUCNT9vWbPbeYvBd0NBzY3dVsAVs5dgzZrBjtciR pBHA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=b6hct8xCrE6CB9ftodiKvDlwTR0gdrnA5ClwcliBbPY=; b=H9QBFyGYL21cislOjdxf3idD+H5zVZ7j6sqFHn5YaaTIWfSUvhFzaZ5zPIVW2rzA49 8GUtU6rsXNlY8M2dFhCm/NlGhjL8ZZi+AgxLkTwKf3jCkFYGv1mBGIPp9N0nNVs1sEA6 rFHfGmHlDI9djTKJ2iV0J0/0xd1xy1j6Uylux0v531SKv6SuM0VNLkI0y7c5SHkjYv22 v2uR2kh84VKf5YuwERgEIyZb4YyusMPZQyZfjsJkdD1mXlbUEgShlGTy36bVnrPUF8VM Fr4Na2AplLoSNiIZINTw09w3fmRsBPDP0ZPgKFgplV9cRY3Y08A5qb9aJfOHvjxP/I5U 0D4A== X-Gm-Message-State: AJIora+tGN13cg69pOdEjOt1YZ7d7Ru+SzRygUWLNZKvFj5QkfkzGW2x wxsscPGrZefMuN2/yslTFr9lT/KIEYnlzUX27MNb3g== X-Received: by 2002:ac2:4f03:0:b0:48a:6061:bd8e with SMTP id k3-20020ac24f03000000b0048a6061bd8emr3942194lfr.647.1658414931709; Thu, 21 Jul 2022 07:48:51 -0700 (PDT) MIME-Version: 1.0 References: <20220714205646.4023495-1-ndesaulniers@google.com> In-Reply-To: From: Nick Desaulniers Date: Thu, 21 Jul 2022 07:48:39 -0700 Message-ID: Subject: Re: [PATCH] ubsan: disable UBSAN_DIV_ZERO for clang To: Linus Torvalds Cc: Kees Cook , Sudip Mukherjee , Nathan Chancellor , Tom Rix , Marco Elver , Andrew Morton , Josh Poimboeuf , "Peter Zijlstra (Intel)" , Linux Kernel Mailing List , clang-built-linux Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-17.6 required=5.0 tests=BAYES_00,DKIMWL_WL_MED, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF, ENV_AND_HDR_SPF_MATCH,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS, USER_IN_DEF_DKIM_WL,USER_IN_DEF_SPF_WL 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 Sat, Jul 16, 2022 at 10:34 AM Linus Torvalds wrote: > > I decided to make a non-kernel test-case so that clang people can look > at it without having to worry about any kernel code issues or the > details of the SMAP rules, and it really shows how clang generates > horribly pointless and wrong code. Perfect, thank you. I was having a hard time reducing this one. > > I'm not sure what the right thing to do is to get this sorted out, but > I created an "issue" on github for this: > > https://github.com/llvm/llvm-project/issues/56568 > > in the hope that this can get fixed. Because it's very clearly a clang > misfeature, where clang basically generates insane code that violates > the rules we try to enforce with objdump. > > Nick / Nathan / clang-built-linux people - if there are other better > ways than that github issue thing to make people aware of this, that > would be lovely, and please forward that issue to the right people. Perfect, thank you. LLVM moved from bugzilla to github for issue tracking last year. It's best to file issues there, or in our issue tracker (also github) which is more specific to issues pertaining to the kernel: https://github.com/ClangBuiltLinux/linux/issues You can cc Nathan or myself in bugreports via mentioning @nathanchance and @nickdesaulniers explicitly, or just forward us the link and we can subscribe. Putting out some other fires/regressions at the moment; it looks like Yuanfang has already started chewing on your bug report. If they get stuck, I'll dive in once these regressions are sorted. Should be an optimization opportunity regardless of UBSAN when we know only certain bits are set. -- Thanks, ~Nick Desaulniers