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 X-Spam-Level: X-Spam-Status: No, score=-15.2 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 4AAA5C6369E for ; Thu, 3 Dec 2020 00:45:50 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id E80AA221F7 for ; Thu, 3 Dec 2020 00:45:49 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727017AbgLCAp3 (ORCPT ); Wed, 2 Dec 2020 19:45:29 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53730 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725885AbgLCAp2 (ORCPT ); Wed, 2 Dec 2020 19:45:28 -0500 Received: from mail-pf1-x444.google.com (mail-pf1-x444.google.com [IPv6:2607:f8b0:4864:20::444]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 3EFB6C0613D6 for ; Wed, 2 Dec 2020 16:44:48 -0800 (PST) Received: by mail-pf1-x444.google.com with SMTP id t7so139321pfh.7 for ; Wed, 02 Dec 2020 16:44:48 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=Awsiky2ci1zA1MBQSVEQaSufyEGxvmxb51uiJPSU/eI=; b=gnDHZ32hE2yYVI6wu4DNBt/GPOkB5Y3vLqrTE5tcGhdFC2UnK0BpuB94OS0nlohfaF DJWFm5skJCkVSN1p5lgEHWnhMaTVvhYypSoT7hClvy8aceAjqW4v5UOyxo46Cpfon+t6 l6zO5r/knnPXUJHRiVf3O8lRK9x5VMDKeYo1A= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=Awsiky2ci1zA1MBQSVEQaSufyEGxvmxb51uiJPSU/eI=; b=F71ubSlHpD7f5OStHdzvTY6DD7N6XxZQT0myS+jg+orcMNCsFkslXmCP+XSI9CR6+0 PLDxiYvoT6L+1DIEaL+zydgzUnSMfmKuSOacDJsHXqZFlWmzZRTVARqLMrhVursjG38o hYJVOWkU2pfyK/ksYF0fIi4EdKsHE97+Bx8KmixucO5PbY6RZStWZ/gwUyXNUfKjqXBt D8Vx6S2Oh3K1F6QAbXqiiHR/nu3/7iZqolKxoUzg0EKLr7116ZGR5cfNrX7iVyBz1ruD TPCB0ab3Z3VcYmnH2W8l6jH0lD15yQcZmLYmyf8tMBhLb/vU/lSJBXERxXUHYPBCIw72 KGbQ== X-Gm-Message-State: AOAM531G6cYd7D9aJm5bCfhNbTPZw39cBf2r5cPeUnScaBlUVmMOHgQd S/xalsfqf+4C2OHPCVTkSAIAWQ== X-Google-Smtp-Source: ABdhPJzE9Hk09mEagFYAepfWDEb1OXqs5tNH6rGVKRk+qJkULDzb9l06smcj/oDbTgIDFGrz6s3goQ== X-Received: by 2002:a62:2a8c:0:b029:197:a56b:8e79 with SMTP id q134-20020a622a8c0000b0290197a56b8e79mr557423pfq.51.1606956287644; Wed, 02 Dec 2020 16:44:47 -0800 (PST) Received: from www.outflux.net (smtp.outflux.net. [198.145.64.163]) by smtp.gmail.com with ESMTPSA id l7sm184758pgi.44.2020.12.02.16.44.46 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 02 Dec 2020 16:44:46 -0800 (PST) From: Kees Cook To: Andrew Morton Cc: Kees Cook , Linus Torvalds , Ard Biesheuvel , Arnd Bergmann , Masahiro Yamada , Michal Marek , Nathan Chancellor , Nick Desaulniers , Marco Elver , Randy Dunlap , Dmitry Vyukov , George Popescu , Herbert Xu , Peter Oberparleiter , Andrey Ryabinin , clang-built-linux@googlegroups.com, linux-kbuild@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH v2 0/7] Clean up UBSAN Makefile Date: Wed, 2 Dec 2020 16:44:30 -0800 Message-Id: <20201203004437.389959-1-keescook@chromium.org> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi, This series attempts to address the issues seen with UBSAN's object-size sanitizer causing problems under GCC. In the process, the Kconfig and Makefile are refactored to do all the cc-option calls in the Kconfig. Additionally start to detangle -Wno-maybe-uninitialized, disable UBSAN_TRAP under COMPILE_TEST for wider build coverage, and expand the libusan tests. Thanks! -Kees v2: - Add reviewed/tested-bys (Nathan Chancellor) - Reorganize -Wno-maybe-uninitialized changes - Split up UBSAN_MISC features and document them - Expand libubsan tests v1: https://lore.kernel.org/lkml/20201002221527.177500-1-keescook@chromium.org/ Kees Cook (7): ubsan: Remove redundant -Wno-maybe-uninitialized ubsan: Move cc-option tests into Kconfig ubsan: Disable object-size sanitizer under GCC ubsan: Disable UBSAN_TRAP for all*config ubsan: Enable for all*config builds ubsan: Remove UBSAN_MISC in favor of individual options ubsan: Expand tests and reporting Documentation/dev-tools/ubsan.rst | 1 + lib/Kconfig.ubsan | 128 +++++++++++++++++++++++++----- lib/test_ubsan.c | 74 +++++++++++++++-- scripts/Makefile.ubsan | 49 ++++-------- 4 files changed, 188 insertions(+), 64 deletions(-) -- 2.25.1