From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id B0904C43334 for ; Thu, 21 Jul 2022 14:48:57 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229661AbiGUOs4 (ORCPT ); Thu, 21 Jul 2022 10:48:56 -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-Google-Smtp-Source: AGRyM1viW5VSMgPFgPinMrTL+kpk+XpxDY9JqlD86usXfDLVMuZ2ksntxKfHUq/p0uaQkcha+Bst/d+d0seMWLDTQO0= 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" 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