Received: by 2002:a05:6a10:1d13:0:0:0:0 with SMTP id pp19csp122503pxb; Wed, 25 Aug 2021 22:09:02 -0700 (PDT) X-Google-Smtp-Source: ABdhPJx3y6Og9Sawv1QRdVM0FtZwx69XJtLsuEk58r687rSyProsgyj0oE0hoJPSVS4PJG5R5h11 X-Received: by 2002:a17:906:3159:: with SMTP id e25mr2266061eje.549.1629954542078; Wed, 25 Aug 2021 22:09:02 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1629954542; cv=none; d=google.com; s=arc-20160816; b=A2DJG6vVHlfwMiW99h72m8a/kVQdbcrGNw1O4c4YUn1QhFDv6KBVWulR1Y3YEqm8sm twbl0vrFVoGcaLOsXJLRSasrpdtqU3+J3I5/8/VOG3SgcLJ+Df+uon1qUP7sgdh0EiIB G4Hv7OIygaetIuu6uUOIo5mAndnQ6eOok5Qcin0G+lRM/BMbRwGqKco+XNMPSde3BHGM HNzCtScO1x8EdeOibP+R+r88z+gjI+E5pPQPoc3yxCON8lrPop+ow6ypBhBfWE24EPbt rx/0ELVKGvQvn/9ylJrbVk940OhychP+5gsuw4mZSqOa+j3yfoK/vyLjLoyaj3or92Kg 3F4A== 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=H+ke82JqnNzuF+ETLARNzezEA9Zqm2D4YO8akYC5ijQ=; b=frBbTasZtX3S/Aclj1Nor7qMo3Kd0sswKb9FBDVbPYovC9JI3/dWa7fW+rp6nk9nwa bIG8SWJVZMl7MAI1BDDEsF+zs2Tsg6hD1891Ds6B6WzaiDy3dH0rdE3eF9u5LwLO4KPz ttQ1eV0O7Ueh4vP+xyEzvuFkehWHXyMMmtrpgBfL4ltB66zg0WYSGEeISqFjba2Fyz3m 4pOp5lm4fZDFiL13I6NdTS3A/QnAHpDj5UQJQGd7/5VmEV4AR9AsF3/Gud4KcAWDFMIn JDWbSQ639lmjU+Ex2R/BUYAXqP7ZLVQzcqP5VYKmk7wEFHgHbNxuLP0c7PDWDJiO0ag6 Cc8w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=TXfA89Aw; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-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 g25si1989742edy.593.2021.08.25.22.08.38; Wed, 25 Aug 2021 22:09:02 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-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=TXfA89Aw; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-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 S238589AbhHZFFv (ORCPT + 99 others); Thu, 26 Aug 2021 01:05:51 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42816 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S238025AbhHZFFs (ORCPT ); Thu, 26 Aug 2021 01:05:48 -0400 Received: from mail-pg1-x52c.google.com (mail-pg1-x52c.google.com [IPv6:2607:f8b0:4864:20::52c]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 358F6C061796 for ; Wed, 25 Aug 2021 22:05:02 -0700 (PDT) Received: by mail-pg1-x52c.google.com with SMTP id t1so2081184pgv.3 for ; Wed, 25 Aug 2021 22:05:02 -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=H+ke82JqnNzuF+ETLARNzezEA9Zqm2D4YO8akYC5ijQ=; b=TXfA89AwrHNBCE0emeWk24ecxJ5IcsflSZCiMHER4Vz/S6r2VxQGH+ZyLfhNaiGz2X 8hn6ZM+WaZgk8lsalj+53TMWoYSZihHlWGdPZZQ2Lk7u4nLLuXnHnUhhUYlLqCs+ltCD YCETgE3Vuy9QfKCuisQgOQr6bNjw6Az3WpSOo= 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=H+ke82JqnNzuF+ETLARNzezEA9Zqm2D4YO8akYC5ijQ=; b=Cw5HkqW/8EVPtga5bl065AfNXAx7DVqfz7M1KM0HMVPW0UxRrirVv6N360ng0P834T pfUyVEzPB2PyAFaabKSiSbCAqQN69rT07sUnVq6+3iaK1M6sRqTqo8umXtBsFAxZ+mZ0 ghFudu50kZ/4ZMJi43hvB2Emi4orEISwEI+wzZp3G1cBRbwbUoZHNbrNd1Y6hePQWeJc ihe850BVJ8FrXvZqeFbbIc13olmAd0QM/BBs1HfNgBbCmUWUajjWHTZiGLu5nFKkPB8g d4T6/4KraUPHTBZAySDT/Bo5mV0U1lbIVTnzGv0/O7zd/YxaK7cHBY3S283bOgqXWxFP 555A== X-Gm-Message-State: AOAM531RqbaRJHXdu/XWlCS9gcTE6xyXZF64uLzJWkD0ZeIyK43gS05D orHnVhKX2iexQi24JdaCXwM25A== X-Received: by 2002:a63:c158:: with SMTP id p24mr1726458pgi.336.1629954301691; Wed, 25 Aug 2021 22:05:01 -0700 (PDT) Received: from www.outflux.net (smtp.outflux.net. [198.145.64.163]) by smtp.gmail.com with ESMTPSA id d18sm1812151pgk.24.2021.08.25.22.05.00 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 25 Aug 2021 22:05:00 -0700 (PDT) From: Kees Cook To: linux-kernel@vger.kernel.org Cc: Kees Cook , Arnd Bergmann , Masahiro Yamada , linux-kbuild@vger.kernel.org, "Gustavo A . R . Silva" , Rasmus Villemoes , Keith Packard , Dan Williams , Daniel Vetter , clang-built-linux@googlegroups.com, linux-hardening@vger.kernel.org Subject: [PATCH v2 4/5] Makefile: Enable -Warray-bounds Date: Wed, 25 Aug 2021 22:04:57 -0700 Message-Id: <20210826050458.1540622-5-keescook@chromium.org> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20210826050458.1540622-1-keescook@chromium.org> References: <20210826050458.1540622-1-keescook@chromium.org> MIME-Version: 1.0 X-Developer-Signature: v=1; a=openpgp-sha256; l=1113; h=from:subject; bh=oefMcHZzjrqvoOMjUB7suXN8EJKiDU2oIYgtW+uUBtg=; b=owEBbQKS/ZANAwAKAYly9N/cbcAmAcsmYgBhJyD5aFIio04DmLvoRaIim4FnyDX46vN/W1R6TAc9 7X8LHOKJAjMEAAEKAB0WIQSlw/aPIp3WD3I+bhOJcvTf3G3AJgUCYScg+QAKCRCJcvTf3G3AJnbVD/ 99uKUWved0lEF54nU1F7qKRM+Mv7siWIawdByX70YCMH1LpDZs6ja7HAHyb5nY0zJbQwGopcJsFn11 yntizr+UNLRhKE+CI5hmHijdbpaXrvNxCaSJF+DAkyEjqlmlAHSm1FWzX2ffYiEMhJTdPUebBpDVYr xwj4co1+92cPTQZg9VaD5UN55j9gc46QTYRsyvBl2jxtW8DPSVTWy7vaCya9Bn4TY5evml2nwFt3p+ sf7fn9Y1rf8xHpOEa+gNVbFst4tZ3KV9UupkpsSLi7+VLwDm9g2fwhma1aWdrtuO3q7iBbKEs3Y2Qq ans0Np+r32K3v5Pm7PYx8VDN9zn0LvK9Oc4Gsm6blZyPCqulPENZid0NeFXBICff4z2MgWn+UR4fyJ EqSn/aDYwWG6PjKkkfVr4NZr/olZHzwEhpaqReNAWzV01WUSmo+cmq3LIR7SslJXMiPM9F33KwApfq guhvH6SLi67EfhowGkIyFpDil1Keh+khqje+ZsIJgTqAhiBF72scXtqvP73hNT6w3M5x46LZyRLDbN TjvGaYP/k4JRtFdZYCxLFFVDov+8nlgA09DuTuePiFy68KyvBo1pZPZSNJejo1N5DSu5ll3PmckN+A IwAMOP/e2UwotUVUgDM95mAQA/ypXqzU/BhSxY9MkQfLOT5IAjW2i5ByugJw== X-Developer-Key: i=keescook@chromium.org; a=openpgp; fpr=A5C3F68F229DD60F723E6E138972F4DFDC6DC026 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@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. Cc: Arnd Bergmann Cc: Masahiro Yamada Cc: linux-kbuild@vger.kernel.org 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 e4f5895badb5..8e7e73a642e2 100644 --- a/Makefile +++ b/Makefile @@ -995,7 +995,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