Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp2662142rwd; Wed, 17 May 2023 12:37:39 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ5RGq8rYxVLCwVYxZjKJ/WTR6GrGALkyxRCYDMM+3tktv5ZKhEWKFhn/Owlp0ZKZ35+0zrX X-Received: by 2002:a17:90a:d782:b0:253:3d7c:949a with SMTP id z2-20020a17090ad78200b002533d7c949amr667259pju.33.1684352259127; Wed, 17 May 2023 12:37:39 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1684352259; cv=none; d=google.com; s=arc-20160816; b=OpGDYrmnnnbHOHiQgzMHrx8GaDQ0Qyw1UOlsa3RVD3c/ecv1alDy/gaUUAU4QUh1aV FVyCf1qs/Q+nNgtnf8OhCQlhU+PdMGMigSqFoLC6rFRqwnvpWlz2rm5AEzads2ZrgG+M XXANLK90CpqiNPQugElrMAHciIELWpai0aLnfrr5nqR3vOYN6vhDec9H/bN5QdGE7CB+ ze4DP7HK8Rg/yaBTgYC4s5sACPtz/iIx34bcSFgnLIFsC2rPUnCXPwtob2mII8zkiF+u l2mMhI48TSTbKQdFO+DcbaUUb7DcdCvIiM6t4MUvywF+A9830UVzuoobGuOJ54fXoygc 2lrA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:cc:to:subject :message-id:date:from:in-reply-to:references:mime-version :dkim-signature; bh=99WaBRQDUs3kb1dnzIG44mb1K4MZZ93giF8G4LLAmW8=; b=kKd7C/UElqVendM2B6C7axFkffyaUO26YTeKryrNLxyMHQiWuhsNnKdewZwkNrwbZQ AcFAPXiSzEwcMr5DGS1tMgP7fKn9pBq6Rn1Y2f/+68Jx9s8HyQ4d7gH+6sDuifU/L5vm i5Au4kIY4bp/aYDaAEmjAo98LmwGcnWXDDLaWYHG1fZVsvKnYgGvBog1PTq6+qqRG523 OCmURbfEtU642wIBsFbvWgzfbDLJxupGlNJtA8m7Fg69vhtoHiKbb9qE8lmVdJ4AUEZX tb9Lhyfvp7vj/TvMcQhMwPbGsdKhL9A+n2Fpc0X6NA0knhuIHHR349Ku2afN7SeDcumy OQEQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20221208 header.b="dC/JtS+C"; 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 l7-20020a17090b078700b0024b27e48a27si2462025pjz.74.2023.05.17.12.37.24; Wed, 17 May 2023 12:37:39 -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=20221208 header.b="dC/JtS+C"; 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 S230090AbjEQTX2 (ORCPT + 99 others); Wed, 17 May 2023 15:23:28 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41800 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230098AbjEQTXP (ORCPT ); Wed, 17 May 2023 15:23:15 -0400 Received: from mail-qt1-x834.google.com (mail-qt1-x834.google.com [IPv6:2607:f8b0:4864:20::834]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0701430D1 for ; Wed, 17 May 2023 12:23:10 -0700 (PDT) Received: by mail-qt1-x834.google.com with SMTP id d75a77b69052e-3f38824a025so40331cf.0 for ; Wed, 17 May 2023 12:23:09 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20221208; t=1684351389; x=1686943389; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=99WaBRQDUs3kb1dnzIG44mb1K4MZZ93giF8G4LLAmW8=; b=dC/JtS+CXoS3N4aXYIF6cSUebLVzJ7Tb65v5Kqkyjle341mL7a7aSc8Cj33QqRhHOM YkWvISnH+LhJSqB0OWz4QYFc4XCKPoCZGWjsI0eqFCsx4BoxL2c1z7DuOHVGoaE6UR55 iCJoBY9KYYUHL6gLjCMLKhyd0LoDh5fZHTvpJ88bW+jcNBrl1fBZ4D6ooBVpzNELKZw7 0KFLTQmN7Fn4dO3BAYhhDQQYBPjzVz7s2/2FfIvDwK7+cK0GCRIWrCNuB9a7UTlHYQBU BCkYU6X3gMVVhRnc+xjtl7wRsYrhEjA+5S4ch8p4sPJLOlLC1bis4Y8nQdqyZ3wuzUZ5 3DzA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1684351389; x=1686943389; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=99WaBRQDUs3kb1dnzIG44mb1K4MZZ93giF8G4LLAmW8=; b=NOuJyVgbX0KwcF825PbAz4rDRF6k5HMzk3ml1k0y/9INQf6XNs5WZijhHz8wr5Gvuh 4JBM5zy/U/SJYzRjA6OmilH6NYbiAa0R+7YPjPvktgjdYNiANTDlru5BF6fOMeIJLMCP Vi/hmZQZ1ft55pS+Wkx7rm0XRWE4CNCbknSVmvPWc4auJf2eJXnvmFkbPrewCRz0TW9a Ro5j2PBKwHOS3sSnXRqWA5FOEMshHmaR9nS/wHnEJ8tSgOJs2YzGWb1tGezHdxNd3OKS 5GG5gA2trdKp7S8dtwObwjCrA9UwujO/dUfL2zI17InGmjJhVVh7xqC/q+h0i6W0mi8U p97g== X-Gm-Message-State: AC+VfDz7qtDqB+3J/nhsqXYk3qS2LkUKRhkD+5EwjwHpU/m6gcR23seD sLaRlvjOEM0FY8kJv5ey9mtP0NtYEXZsFXXRnxEkUA== X-Received: by 2002:ac8:5789:0:b0:3f3:75c2:7466 with SMTP id v9-20020ac85789000000b003f375c27466mr59103qta.8.1684351389019; Wed, 17 May 2023 12:23:09 -0700 (PDT) MIME-Version: 1.0 References: <20230407215406.768464-1-ndesaulniers@google.com> <168435014337.2056649.7592777028793700479.b4-ty@chromium.org> <202305171215.7C58897@keescook> In-Reply-To: <202305171215.7C58897@keescook> From: Fangrui Song Date: Wed, 17 May 2023 12:22:57 -0700 Message-ID: Subject: Re: [PATCH] ubsan: remove cc-option test for UBSAN_TRAP To: Kees Cook Cc: ndesaulniers@google.com, masahiroy@kernel.org, linux-kbuild@vger.kernel.org, nathan@kernel.org, linux-hardening@vger.kernel.org, jpoimboe@kernel.org, llvm@lists.linux.dev, mbenes@suse.cz, linux-kernel@vger.kernel.org, trix@redhat.com, peterz@infradead.org Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable 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, T_SCC_BODY_TEXT_LINE,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 Wed, May 17, 2023 at 12:16=E2=80=AFPM Kees Cook = wrote: > > On Wed, May 17, 2023 at 12:09:35PM -0700, Fangrui Song wrote: > > On Wed, May 17, 2023 at 12:08=E2=80=AFPM Fangrui Song wrote: > > > > > > On Wed, May 17, 2023 at 12:02=E2=80=AFPM Kees Cook wrote: > > > > > > > > On Fri, 7 Apr 2023 14:54:06 -0700, Nick Desaulniers wrote: > > > > > -fsanitize-undefined-trap-on-error has been supported since GCC 5= .1 and > > > > > Clang 3.2. The minimum supported version of these according to > > > > > Documentation/process/changes.rst is 5.1 and 11.0.0 respectively.= Drop > > > > > this cc-option check. > > > > > > > > > > > > > > > > > > Applied to for-next/hardening, thanks! > > > > > > > > [1/1] ubsan: remove cc-option test for UBSAN_TRAP > > > > https://git.kernel.org/kees/c/08e4044243a6 > > > > > > > > -- > > > > Kees Cook > > > > > > > > > > > > > > For this -fsanitize-undefined-trap-on-error, I think we need a v2 pat= ch that > > > tries -fsanitize-trap=3Dall as well. > > > > Correction: -fsanitize-trap=3Dundefined > > > > > -fsanitize-undefined-trap-on-error has been deprecated in Clang for 8 > > > years, and at some point we will remove the option. > > > > > > GCC implements -fsanitize-trap=3Dall later, but > > > -fsanitize-undefined-trap-on-error is documented as deprecated as > > > well. > > Right now all the compilers support the old way, and I'd rather remove a > cc-option call than add two. :) > > -- > Kees Cook Hmm, this gives Clang developers a disadvantage... Anyone who removes Clang's -fsanitize-undefined-trap-on-error (or give it a warning before removal) will probably face complaints from kernel developers... --=20 =E5=AE=8B=E6=96=B9=E7=9D=BF