Received: by 2002:a05:6a10:1287:0:0:0:0 with SMTP id d7csp4701973pxv; Tue, 27 Jul 2021 14:12:08 -0700 (PDT) X-Google-Smtp-Source: ABdhPJx8g009FZTI2knkmfyB0nTFyNAhWk6tkUL5d8JFAFDJkmtvt+9Dfeo5D+kW6tBRxUgEh8Kd X-Received: by 2002:a05:6402:220d:: with SMTP id cq13mr2657501edb.318.1627420328456; Tue, 27 Jul 2021 14:12:08 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1627420328; cv=none; d=google.com; s=arc-20160816; b=DRD/HYsBYdanzoS7RTbPrGV2xWG2inSRxot7RFIm3j6YWbg7brZq9//6x3icloHqD2 P9Q0rrxsscI+SoJrdL500F9AFkHG1xvf+WlJW0yIWTgSAXM7Wit4UzimkBv42QNmmF7v EgHHgtiVsfDM5mWqcMVUu+H+jHsNY4fsbMof94ew2nAunNkujlYLvwmDymALFSb96CPw WuS0HPY97Go6aOsNq954PRMvJV1uZTCuxJZRI/9gfs7ylq4dJYaltvbeJE0lYKkX2fL0 1j3UChXO6xbHQEjgf6w98nfDLXS3HUf0/bHIv642DWhNt1H5Do2ZJwp0pOHw7svh6lOj 0oUw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=3614TVaw9LF0d4ZTPxFRYVM1NwtwuaIqOAakzdvkIfc=; b=ym8joXJgXe9LyoRu0tFobpZULttP3+H981EsaJKqqpW8hDRdtahmvFCK/GqDZLglp6 6eu91Aaf5ScMsLn/mg0dBLnpku3zg2vDvCY2wHZxNKX6lcGmPcqN+ova+3tYf1OIR1d8 XOYs8YR38cR0EEZESxCAA/lLLk0dcvfaFpyrt958Ac36NV/pXGSb2HZguKJv7os0Dq2+ vlS/C9hb4bfSlFroAW1xFT7AwhQxL/ff5ODs7PA5pmclu1COsqne3v7/5ppMbN0TQ615 ME7IdiOLl9/ln0UqiwqlYMFU1xy2lHW9mrT2pQ4Wg+iqOaXqSeG6CUrAyNXeHVbQmA2n X1kw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=clV0Gq5o; spf=pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id o11si3869986ejy.447.2021.07.27.14.11.45; Tue, 27 Jul 2021 14:12:08 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=clV0Gq5o; spf=pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232779AbhG0VIi (ORCPT + 99 others); Tue, 27 Jul 2021 17:08:38 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55874 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233736AbhG0VH4 (ORCPT ); Tue, 27 Jul 2021 17:07:56 -0400 Received: from mail-pj1-x1029.google.com (mail-pj1-x1029.google.com [IPv6:2607:f8b0:4864:20::1029]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B52F0C0611A1 for ; Tue, 27 Jul 2021 14:07:04 -0700 (PDT) Received: by mail-pj1-x1029.google.com with SMTP id mz5-20020a17090b3785b0290176ecf64922so6655101pjb.3 for ; Tue, 27 Jul 2021 14:07:04 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=3614TVaw9LF0d4ZTPxFRYVM1NwtwuaIqOAakzdvkIfc=; b=clV0Gq5oIj0iMf/0TjNaHBfl9gFowEEPRY6F12E4uHkupoBZLOBAOjcr6hanGqNJ/D Ou+0N0Rgv9rhpZQ75K6fWWlwQIAJeQwEbGM40/xLoMchxBkeod+sf82FLeOvb290o5QL mySzWEkrdI1XTTrAkdIJlo6oyBUo3Ktd4nSiw= 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:in-reply-to :references:mime-version:content-transfer-encoding; bh=3614TVaw9LF0d4ZTPxFRYVM1NwtwuaIqOAakzdvkIfc=; b=BX+eB8ip0v2u22j2kQSFHB30OEI4P36HAbv1HBK1RJsGD3/Rne73QTtmiH6gDCihkv x9JwbA5noMHMCKYSsywWlKeb8qGFC6Qbl/YpztvbGznruB9pHcMbUYYIavYy6IpnMX/e hvLRFf4AXsq5RPk1v/XzeWhqt0DRwEonoUC39mla4QToAPJRZkQtCr/mRt8WuItW9i3e IZiyQoxG31FJJwRis2W2JJCTplmE+iGRvE4XODw1dlV/J3QbL67UQScZJ5sI8Ky+qIH1 mD1Fv6yyzg261/BZ73aUJEO1Czri5uMBB/KxCkq8oVmCINDBAfF6LaIvvqYnrtvK7fnD s70w== X-Gm-Message-State: AOAM533kopJkuY/y4sV4C+Mc+icnx4fC+C1IdOO7wCt29q4tXhXHwXZu Pgmr/V+tX+ytOMnjLN7UXXDQmg== X-Received: by 2002:aa7:9086:0:b029:39b:6377:17c1 with SMTP id i6-20020aa790860000b029039b637717c1mr9604180pfa.11.1627420024334; Tue, 27 Jul 2021 14:07:04 -0700 (PDT) Received: from www.outflux.net (smtp.outflux.net. [198.145.64.163]) by smtp.gmail.com with ESMTPSA id b13sm4545729pfl.49.2021.07.27.14.06.57 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 27 Jul 2021 14:07:02 -0700 (PDT) From: Kees Cook To: linux-hardening@vger.kernel.org Cc: Kees Cook , "Gustavo A . R . Silva" , Keith Packard , Greg Kroah-Hartman , Andrew Morton , linux-kernel@vger.kernel.org, linux-wireless@vger.kernel.org, netdev@vger.kernel.org, dri-devel@lists.freedesktop.org, linux-staging@lists.linux.dev, linux-block@vger.kernel.org, linux-kbuild@vger.kernel.org, clang-built-linux@googlegroups.com Subject: [PATCH 61/64] Makefile: Enable -Warray-bounds Date: Tue, 27 Jul 2021 13:58:52 -0700 Message-Id: <20210727205855.411487-62-keescook@chromium.org> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20210727205855.411487-1-keescook@chromium.org> References: <20210727205855.411487-1-keescook@chromium.org> MIME-Version: 1.0 X-Developer-Signature: v=1; a=openpgp-sha256; l=1002; h=from:subject; bh=iIOagZzyF2xdp8n7enwD6qkgQ1o9k/a7rFZX1PVnmxg=; b=owEBbQKS/ZANAwAKAYly9N/cbcAmAcsmYgBhAHOOq3GxY9uHkpfXPpohPWhLzKrRlLl+w0yr5nG9 o51n+4eJAjMEAAEKAB0WIQSlw/aPIp3WD3I+bhOJcvTf3G3AJgUCYQBzjgAKCRCJcvTf3G3AJhXFD/ 9eNQSeUQPuzmwtU/NaiBjngkDUoTXVXv6KDOoXdN0EeDJr9dzNsPU4RUC2Yb7oNKtodqx9qr3F53BT txNpJNl/VSlLBo4MV0T1xF/z3OZoiHCgrhEK6jQQWkJ8g9DbwYCORPaM3KmjKoReDaEVCdUqLLgRLI bgnGYGgyZ8hwan3FbBKFMQwKRDx8sMPqQJUlxpC/0p1LlB5klJYif9tuDWpKW1liKmjqsack/xN7n0 V/cjUuTEEPcy51sw8cSiGkQYLx3KXX0nBtDSFN2xWj3EOY9Bm2RgpOqUqsPFAyinaCqQ43AtocYK4G EWC3c+pF5KODB9bWmzxaiWfcbQnr/qmuRE0npmKCThCFAdIG0L/zSn17BagAoxn/bfs7o1XTo9UQ6L K2E4D3ANbhN9AYyDSrP3MqqguYb7FfMwTv2zQNOLIoHqk90Ys/REfQ6FbJ9b4n+s+hlR2hs9IoQ0+Y 3LfKCSZCrYfZ2rhefZPYVzbWfzbM2+wTL1DtshJ1M+gKFcPfZ663TaMLREqy9r9mTtgswUne36LhxD ZfCNhpXpDpbsenQfUmuciUrsKoatyitqkdd4dOEVsAVIZ7jI+dZ2TTRu6UgVdfpiRIdWgIUBmXNdyf QZyNNzVnUyr2dpmTN5/GnRpfSS+N/XiRxODtkuSEXrfjk1fZDATTwSfL3kKA== X-Developer-Key: i=keescook@chromium.org; a=openpgp; fpr=A5C3F68F229DD60F723E6E138972F4DFDC6DC026 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org With the recent fixes for flexible arrays and expanded FORTIFY_SOURCE coverage, it is now possible to enable -Warray-bounds. Since both GCC and Clang include -Warray-bounds in -Wall, we just need to stop disabling it. Co-developed-by: Gustavo A. R. Silva Signed-off-by: Gustavo A. R. Silva Signed-off-by: Kees Cook --- Makefile | 1 - 1 file changed, 1 deletion(-) diff --git a/Makefile b/Makefile index 6f781a199624..77d01ba3d4e1 100644 --- a/Makefile +++ b/Makefile @@ -1089,7 +1089,6 @@ KBUILD_CFLAGS += $(call cc-disable-warning, stringop-truncation) # We'll want to enable this eventually, but it's not going away for 5.7 at least KBUILD_CFLAGS += $(call cc-disable-warning, zero-length-bounds) -KBUILD_CFLAGS += $(call cc-disable-warning, array-bounds) KBUILD_CFLAGS += $(call cc-disable-warning, stringop-overflow) # Another good warning that we'll want to enable eventually -- 2.30.2