Message ID | 20230118202355.never.520-kees@kernel.org |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:eb09:0:0:0:0:0 with SMTP id s9csp2547460wrn; Wed, 18 Jan 2023 12:30:19 -0800 (PST) X-Google-Smtp-Source: AMrXdXsCtr342jK3Jv2idCfLF2K3AjWid0DizoFjMq/msLrnAvaZfzz506ER6bg7CoIDfYnbewhc X-Received: by 2002:a05:6a21:3d1b:b0:b8:87aa:e73d with SMTP id bi27-20020a056a213d1b00b000b887aae73dmr14375666pzc.48.1674073813935; Wed, 18 Jan 2023 12:30:13 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1674073813; cv=none; d=google.com; s=arc-20160816; b=eBGrNTLONAkTv3e7ggz/f5/5KlsseU5QoSNRYlQkW7Mz7w3MHIZjCCk9XonPBZgy6y fKBsPhoPA13sWyjFrrC6rRPVO7/cOT3bXFY/KI89m+3oFuTkYxzmmjIJW7i/GDRQVUFB kZWLmxPP+3jqTSO3WVYlaHnOBG2jD8TNyEPScLU2a0JNE5nP5l1PxcRHOnnfHqZX+iBk toF3BFxwFP0ftHEzKtN5pxfvCNJ/UfXdfgVaV4/vMza1COMTyKVRz9zo07nLDKz41NSx Sf9DUCtNK9waigAw0eKY5PJvu7SYipFalkmnHr4KuhgnuF3TG+RNJos956+HqT1REgMS Jppg== 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 :message-id:date:subject:cc:to:from:dkim-signature; bh=M7nQ+g2J8OLWVvtfKxW9hliY4Yc3cv4OwnKnX3U91hE=; b=NPYHgXzX/y4ASipWU0GNRQAgqfLE+4wHI8K3usDnENQSzLE6Fub8PEoD+AfVxMvasf X0OGazSrC7qg4YXHrMjxMeoicgKgeyluN4TzesSFMzW648k8HmEbjczZ0HOubH35o3Qv /DrOmoMJcZJTdVDjL+TWmHOOhhL4BkiGCF3/cFyFD4/YWf8+5iNJLkPfBlYRm6F6d2Uk g6FXVNrLe6TX15Cwza/0Hmk5a00ZadFbcU7D70Jo2Wb4HhsRnpW5yqIYnTcvp46FMjtq HwcT5QT3w4iuEQrKJ6sSQx9d2/OQ0I+xPbnw/x6zKc6qjA8+Sw8LPvx0ALFm7KMzBsp3 OQgA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=MhP7CFPK; 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=NONE sp=NONE dis=NONE) header.from=chromium.org Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id g10-20020a639f0a000000b00486c4b02e6esi35252331pge.188.2023.01.18.12.30.01; Wed, 18 Jan 2023 12:30:13 -0800 (PST) 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=@chromium.org header.s=google header.b=MhP7CFPK; 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=NONE sp=NONE dis=NONE) header.from=chromium.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229968AbjARUYM (ORCPT <rfc822;pfffrao@gmail.com> + 99 others); Wed, 18 Jan 2023 15:24:12 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34048 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229940AbjARUYF (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Wed, 18 Jan 2023 15:24:05 -0500 Received: from mail-pl1-x62c.google.com (mail-pl1-x62c.google.com [IPv6:2607:f8b0:4864:20::62c]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id AA30C5D904 for <linux-kernel@vger.kernel.org>; Wed, 18 Jan 2023 12:24:04 -0800 (PST) Received: by mail-pl1-x62c.google.com with SMTP id g23so186772plq.12 for <linux-kernel@vger.kernel.org>; Wed, 18 Jan 2023 12:24:04 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=M7nQ+g2J8OLWVvtfKxW9hliY4Yc3cv4OwnKnX3U91hE=; b=MhP7CFPKMusVUiw6o4PRowhujO/e8aU5sJEsYfnFGzwkO0eKdjfTpPALqtQqB5Zy6j 4HhX1moUWoFgSiTgqdNnBCZ6fwdpJ4C8Af74LEg3m+WUiFaqrMImOxuHx3uDzpXXalR4 tushRG6S03QNI9iVt8BOoggY9UMF8Cxi+zYGI= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=M7nQ+g2J8OLWVvtfKxW9hliY4Yc3cv4OwnKnX3U91hE=; b=0cCGaGR+o74Jurh08/XntGl4chNuLyQNl/iVzNTm+edtBn78KWjWbdbjtPN6+MlzuZ NLobh3+wVme06DtsTCRLN/nlyaXpmVNjIncsq8oRs/3BgEj0csqqLNiVjoO58/klOo4b 2+YepXczjwwUb6KFrNxznz/IsE7FYOscOV/i0547T5oQDHEwmBImUAfqTnPm9CCvWdqY MvZRNHOreAxVyzAxU4MzkeKUekBFhTAfcYZEykYnoMZAFOf1Rk9SQVvlvOVs8BuLqLAb Ivh67f5gjwPMfheLgVVT58CXobyuBpr+g5HoPDXEvuECUhchsHAUq2JD2wtDLVWPT5/f Hn2g== X-Gm-Message-State: AFqh2kpYWvrfwSKyaMOxJIuOcDW5YtHpMnGDnb/xuCtB2S7ZF9xJH+5a fLAjOHcyz9BBym1IIOjTJbCreg== X-Received: by 2002:a17:903:32d1:b0:188:fc0c:b736 with SMTP id i17-20020a17090332d100b00188fc0cb736mr34331887plr.67.1674073444029; Wed, 18 Jan 2023 12:24:04 -0800 (PST) Received: from www.outflux.net (smtp.outflux.net. [198.145.64.163]) by smtp.gmail.com with ESMTPSA id a10-20020a170902ecca00b001891a17bd93sm23667416plh.43.2023.01.18.12.24.03 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 18 Jan 2023 12:24:03 -0800 (PST) From: Kees Cook <keescook@chromium.org> To: linux-hardening@vger.kernel.org Cc: Kees Cook <keescook@chromium.org>, Palmer Dabbelt <palmer@rivosinc.com>, linux-kernel@vger.kernel.org Subject: [PATCH] gcc-plugins: Reorganize gimple includes for GCC 13 Date: Wed, 18 Jan 2023 12:24:02 -0800 Message-Id: <20230118202355.never.520-kees@kernel.org> X-Mailer: git-send-email 2.34.1 MIME-Version: 1.0 X-Developer-Signature: v=1; a=openpgp-sha256; l=1189; h=from:subject:message-id; bh=vukSS8cdZdqqtgn6apidKMhxtj1t0IFOu1S+KhQ8h60=; b=owEBbQKS/ZANAwAKAYly9N/cbcAmAcsmYgBjyFVhjOBNRZYH+UzANpQMnfOjTUf8wrb94vsB2GjK IDs1+4mJAjMEAAEKAB0WIQSlw/aPIp3WD3I+bhOJcvTf3G3AJgUCY8hVYQAKCRCJcvTf3G3AJmyREA CcSyhCMz+CA+i5K0m3iYOM2pKAQebVxf9SOeiSsHQ9qtRdv7a5z6CkN/4dhLFAdsSWkvEpnms+0XUp h7G4EIyluvBiJiLLXDusha33r5D26q/YU4jyPKPLBpRAnSG9NjYaQzhgZ/D5rdJZHfnFFMsRbNtUM2 fNoIlLb8dPW61nIg5aa3q+OytDBECibjwTGhfTRfKMCXTxSHQACjBshgbDZiFJjq3KQskjX0oaoueB rbnd4ZVAiK7cFr+Tl7mAqFIj0mfZ/GYFGvI7DTuFjSPlvrSCtNARfYN5JWT6jkdQNjkRChzbN7Wk4e t1oo8yy1+5Z4TatJUjAQ+MHPLTkG29N7QDn+tq3EN+PGbPgQxV9n+EgPv1S6oAw4/mNWVSqaautpSu aQTzy443t5hxKSBar1lgdimhQ0ftdCqgY2054yImNbbpTXWNDsJMIvgIlsXHpYUt/IBSqhudau5ey8 vnb073zDoc8LgAQSkN0a3SCjYfPNc7vqt+xoJuZVr5DZs/mpyTIA6STUfj9QJkiVfflaPqdAIaWC3f S2VjdKhhaFXnp24XgMKV43Cz53EiTQ1/EDN91PauJOI5LmHJb7AfX9vrtnmnTC3uFxJKwybVBVMEi8 0wjQFuS1iUmK4YrLAuqcXE/aA2kCRBRASAN/wkM2oNrPucr9pt8HJ4fSszkg== X-Developer-Key: i=keescook@chromium.org; a=openpgp; fpr=A5C3F68F229DD60F723E6E138972F4DFDC6DC026 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, SPF_HELO_NONE,SPF_PASS 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: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1755393623382651873?= X-GMAIL-MSGID: =?utf-8?q?1755393623382651873?= |
Series |
gcc-plugins: Reorganize gimple includes for GCC 13
|
|
Commit Message
Kees Cook
Jan. 18, 2023, 8:24 p.m. UTC
The gimple-iterator.h header must be included before gimple-fold.h
starting with GCC 13. Reorganize gimple headers to work for all GCC
versions.
Reported-by: Palmer Dabbelt <palmer@rivosinc.com>
Link: https://lore.kernel.org/all/20230113173033.4380-1-palmer@rivosinc.com/
Cc: linux-hardening@vger.kernel.org
Signed-off-by: Kees Cook <keescook@chromium.org>
---
scripts/gcc-plugins/gcc-common.h | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
Comments
On Wed, 18 Jan 2023 12:24:02 PST (-0800), keescook@chromium.org wrote: > The gimple-iterator.h header must be included before gimple-fold.h > starting with GCC 13. Reorganize gimple headers to work for all GCC > versions. > > Reported-by: Palmer Dabbelt <palmer@rivosinc.com> > Link: https://lore.kernel.org/all/20230113173033.4380-1-palmer@rivosinc.com/ > Cc: linux-hardening@vger.kernel.org > Signed-off-by: Kees Cook <keescook@chromium.org> > --- > scripts/gcc-plugins/gcc-common.h | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > > diff --git a/scripts/gcc-plugins/gcc-common.h b/scripts/gcc-plugins/gcc-common.h > index 9a1895747b15..84c730da36dd 100644 > --- a/scripts/gcc-plugins/gcc-common.h > +++ b/scripts/gcc-plugins/gcc-common.h > @@ -71,7 +71,9 @@ > #include "varasm.h" > #include "stor-layout.h" > #include "internal-fn.h" > +#include "gimple.h" > #include "gimple-expr.h" > +#include "gimple-iterator.h" > #include "gimple-fold.h" > #include "context.h" > #include "tree-ssa-alias.h" > @@ -85,10 +87,8 @@ > #include "tree-eh.h" > #include "stmt.h" > #include "gimplify.h" > -#include "gimple.h" > #include "tree-phinodes.h" > #include "tree-cfg.h" > -#include "gimple-iterator.h" > #include "gimple-ssa.h" > #include "ssa-iterators.h" Thanks, not sure how I missed it the first round. My testing box is tied up, but I'v egot the same diff lying around somewhere so Acked-by: Palmer Dabbelt <palmer@rivosinc.com> Reviewed-by: Palmer Dabbelt <palmer@rivosinc.com>
diff --git a/scripts/gcc-plugins/gcc-common.h b/scripts/gcc-plugins/gcc-common.h index 9a1895747b15..84c730da36dd 100644 --- a/scripts/gcc-plugins/gcc-common.h +++ b/scripts/gcc-plugins/gcc-common.h @@ -71,7 +71,9 @@ #include "varasm.h" #include "stor-layout.h" #include "internal-fn.h" +#include "gimple.h" #include "gimple-expr.h" +#include "gimple-iterator.h" #include "gimple-fold.h" #include "context.h" #include "tree-ssa-alias.h" @@ -85,10 +87,8 @@ #include "tree-eh.h" #include "stmt.h" #include "gimplify.h" -#include "gimple.h" #include "tree-phinodes.h" #include "tree-cfg.h" -#include "gimple-iterator.h" #include "gimple-ssa.h" #include "ssa-iterators.h"