[V10,0/3] Accept and Handle the case when a structure including a FAM nested in another structure
Message ID | 20230620152246.311493-1-qing.zhao@oracle.com |
---|---|
Headers |
Return-Path: <gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:994d:0:b0:3d9:f83d:47d9 with SMTP id k13csp3745449vqr; Tue, 20 Jun 2023 08:24:20 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ4JYXMLhAK+Mmn/S0GVzmR38bZJE/2VtrSCWVWRrkzDy+2XHgEnrnZJTU17RYqm5w93MmBu X-Received: by 2002:a05:6402:6d8:b0:514:9e2c:90c6 with SMTP id n24-20020a05640206d800b005149e2c90c6mr8533721edy.38.1687274660210; Tue, 20 Jun 2023 08:24:20 -0700 (PDT) Received: from sourceware.org (server2.sourceware.org. [2620:52:3:1:0:246e:9693:128c]) by mx.google.com with ESMTPS id l12-20020aa7c30c000000b0051497b4a7f1si1224392edq.531.2023.06.20.08.24.19 for <ouuuleilei@gmail.com> (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 20 Jun 2023 08:24:20 -0700 (PDT) Received-SPF: pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 2620:52:3:1:0:246e:9693:128c as permitted sender) client-ip=2620:52:3:1:0:246e:9693:128c; Authentication-Results: mx.google.com; dkim=pass header.i=@gcc.gnu.org header.s=default header.b=XoeJf73K; arc=fail (signature failed); spf=pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 2620:52:3:1:0:246e:9693:128c as permitted sender) smtp.mailfrom="gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=gnu.org Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 33DB5385663C for <ouuuleilei@gmail.com>; Tue, 20 Jun 2023 15:23:44 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 33DB5385663C DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1687274624; bh=CGVaGPYpIxLieyZM2ZXMKKjHwdfB+PdLQOKRz+gf3BY=; h=To:Cc:Subject:Date:List-Id:List-Unsubscribe:List-Archive: List-Post:List-Help:List-Subscribe:From:Reply-To:From; b=XoeJf73KHzLt0sb8g2KpS4trbPVU1t1/Ky+/B6k8eabuBjwPpBRvW8s7wwZG6XGU2 oN9zVPDpQFj0nRD8kbeus1cVBUTWuP30UxTnaV/vKj7BJqBKqlldSs5elunTJjb//B ME5T+8BJUrMcNMAlZpGUjSYUGUBnED0BH5cLjCZQ= X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from mx0a-00069f02.pphosted.com (mx0a-00069f02.pphosted.com [205.220.165.32]) by sourceware.org (Postfix) with ESMTPS id CD65C3858421 for <gcc-patches@gcc.gnu.org>; Tue, 20 Jun 2023 15:22:56 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org CD65C3858421 Received: from pps.filterd (m0246627.ppops.net [127.0.0.1]) by mx0b-00069f02.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 35KBmcR3001245; Tue, 20 Jun 2023 15:22:53 GMT Received: from iadpaimrmta02.imrmtpd1.prodappiadaev1.oraclevcn.com (iadpaimrmta02.appoci.oracle.com [147.154.18.20]) by mx0b-00069f02.pphosted.com (PPS) with ESMTPS id 3r93e1d2h0-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 20 Jun 2023 15:22:53 +0000 Received: from pps.filterd (iadpaimrmta02.imrmtpd1.prodappiadaev1.oraclevcn.com [127.0.0.1]) by iadpaimrmta02.imrmtpd1.prodappiadaev1.oraclevcn.com (8.17.1.19/8.17.1.19) with ESMTP id 35KEISdR029543; Tue, 20 Jun 2023 15:22:52 GMT Received: from nam02-sn1-obe.outbound.protection.outlook.com (mail-sn1nam02lp2046.outbound.protection.outlook.com [104.47.57.46]) by iadpaimrmta02.imrmtpd1.prodappiadaev1.oraclevcn.com (PPS) with ESMTPS id 3r939arm9d-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 20 Jun 2023 15:22:52 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=GQxhU63tezfe2AWmA8rlYrJdC2vfwNLEZOs7Zg9U5XXYrrwnB2q9/wEJCb//bg7V0/u9xND9xmCogXOkT5qMWhutL8RNl9dAACYlsGJ3V8gx9JyuAqDN/rcxbhBCZIC4CxqjRuxhO1SJe5a7M19VMS9Bw0blR/I88kPd4gV0DZ576AWIcNgBAdFnvjhq8bm3u+N1TqQNdSP6dwblvM8bkDrIzL1u6hgkuMYPs9RdZtBrdFBTb9IGmPttQwGVAp7UnLG3haOWbAiG8aiikLEXDkN95dHp6YIOXPYFVhJrNoCQXhChoZHu0A0jFRXcTNZ8ZJgRk3RETSSGqPXUzmVRSQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=CGVaGPYpIxLieyZM2ZXMKKjHwdfB+PdLQOKRz+gf3BY=; b=C8Scy8PioVQluM7mgc5ng0CpA8sGiM97KOWOZkjACqlVpyCsNhCfCBXdMtNTBdssVkMRoDa+Ofgp5xY/9L382fblhrS+2gP0ZPNS5qPtpqLaLTybdhlYDveJqJyLfsIyv2HZ8aAHPVKsbdC5Rb1HbVLyLzyA+13EQwMfulA/snzVTXvKRO88zYWNu19Wow3rh7dZe6KT3RFPVuNN6QdhTC/7+zYE/vl7CtnLFuX3PBA3Blee/rr9ho6NTQIC8/Rg7H8qZ2syA+RkWU3uI+X9NgGQCNkBLQUVR72W5KPP32VBHXIWAdNj+HSCquOwsBp4y5d6gbuYrALLy68KDSPPSA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=oracle.com; dmarc=pass action=none header.from=oracle.com; dkim=pass header.d=oracle.com; arc=none Received: from CH2PR10MB4344.namprd10.prod.outlook.com (2603:10b6:610:af::19) by CO1PR10MB4435.namprd10.prod.outlook.com (2603:10b6:303:6c::17) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6500.35; Tue, 20 Jun 2023 15:22:50 +0000 Received: from CH2PR10MB4344.namprd10.prod.outlook.com ([fe80::8d90:607a:f94c:5323]) by CH2PR10MB4344.namprd10.prod.outlook.com ([fe80::8d90:607a:f94c:5323%3]) with mapi id 15.20.6521.020; Tue, 20 Jun 2023 15:22:50 +0000 To: qing.zhao@oracle.com, joseph@codesourcery.com, richard.guenther@gmail.com, jakub@redhat.com, gcc-patches@gcc.gnu.org Cc: keescook@chromium.org, siddhesh@gotplt.org, uecker@tugraz.at Subject: [V10][PATCH 0/3] Accept and Handle the case when a structure including a FAM nested in another structure Date: Tue, 20 Jun 2023 15:22:43 +0000 Message-Id: <20230620152246.311493-1-qing.zhao@oracle.com> X-Mailer: git-send-email 2.31.1 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-ClientProxiedBy: SA1P222CA0007.NAMP222.PROD.OUTLOOK.COM (2603:10b6:806:22c::22) To CH2PR10MB4344.namprd10.prod.outlook.com (2603:10b6:610:af::19) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: CH2PR10MB4344:EE_|CO1PR10MB4435:EE_ X-MS-Office365-Filtering-Correlation-Id: a9b18878-65c2-4682-627d-08db71a23571 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: ckC4OhnFNv4FBeuiozlDZ+L1/iwJbdTTiNrO6X/TnallWkBGmzA62FUBkAdwUr7g6x8lf57//nZeDb/eX07TFX2FEMj+z9VbAc4onYvQj+68hFJGZfWQVNEmribNVCZ5kus+DDck9P7VVp4rrbsb7f0hGTNEGsQuVLRckFYimn0wqPI8ruwcUUO6AuBFKK3aqKy93KMRYFyK7r8dwPGlZfQcq/f5v3RBdiQhz/08w5Qi1bGn0YUILoJXS/pnF2knc4G4FHJPwJMYcdO64gJcIgWWO3WuRWXcdpHemKiPQRIoY3futLHE/5Kc9DGfMkRMbZY5vmuG9djkbd9xIo8FM5IEQLQe6K6DWAeLhSGrCgdgQVmVhIrmRKEt+yz5yraMnuv+RTMPLettHgTvrQt62dShI97Me9TXMuyQuXxouxPQ/NyZiHygPG8GR5EROKbk4Nya5vLmZTNWBf964t4ASGj7e1DmFBn9Txn6TsP1DCwSP/a3Pf2LXuDj9oCsVR2TdNRvUFN49Drx0id2qHOVfzV0kxFBCS9AxkK9IRGDV8bQ5aeBGG+Hk3UhJNB9Gmra X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:CH2PR10MB4344.namprd10.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230028)(136003)(396003)(39860400002)(366004)(376002)(346002)(451199021)(38100700002)(83380400001)(66946007)(66476007)(66556008)(8676002)(41300700001)(8936002)(2616005)(316002)(186003)(4326008)(6512007)(26005)(6506007)(1076003)(6486002)(6666004)(478600001)(44832011)(5660300002)(2906002)(36756003)(86362001); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: tHKWIBeqg8SXFJtZ8LSDLjFpMK3KerMjlXHOsB3BmfiRgsHOb4ZjjDGP3b8oyZaYKBnDqdvY7Ey/yQzIiFiomn0/0h3J02KqlYDMxfaD3YMLtK10QwScL3BNxnX4MN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YE4K68T/C+Vb+Wu9zMj5G48lXhzagH4HBFgmclsLdp8njC/689cty1WIc4dYaJbdjsvdRgEefihztYlUMWIEaiX7JKKlL+As5y5HgCZIF+LlwuPl+lJokObBMJGgGDvI0qH0oJmaj6oegIOo9v2wQg9MpM+6E6OeE7whQX1KdP2qnLfTJm5fPzXUVXpjpwYJSAOA6FxmCXeXm2bm3I9Xam0o91eNiFLkyoC7KnIGU94bWEosgLXo12qaMjMZIlSERh/3rooBQwvkcgwfkbiLpXrTiysLQFoQi9OzTA65m9PeEGkW34ZjQnx8ghtdjGvbrxiajjOY9snvR6S6EsotaDqZv1W+xG5f7EyhhQUE3V8l0tvf12rzI5Km X-OriginatorOrg: oracle.com X-MS-Exchange-CrossTenant-Network-Message-Id: a9b18878-65c2-4682-627d-08db71a23571 X-MS-Exchange-CrossTenant-AuthSource: CH2PR10MB4344.namprd10.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 20 Jun 2023 15:22:49.9617 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 4e2c6054-71cb-48f1-bd6c-3a9705aca71b X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: FFXPizwe+jwFDkbNvlmwh+5GhJRvPcco+seL33VThoClR3KBOTHVzgN1xjqIfLL3/HhQulBqXR8jw9nx+zxvhg== X-MS-Exchange-Transport-CrossTenantHeadersStamped: CO1PR10MB4435 X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.254,Aquarius:18.0.957,Hydra:6.0.591,FMLib:17.11.176.26 definitions=2023-06-20_10,2023-06-16_01,2023-05-22_02 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 bulkscore=0 malwarescore=0 mlxlogscore=999 suspectscore=0 spamscore=0 adultscore=0 phishscore=0 mlxscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2305260000 definitions=main-2306200138 X-Proofpoint-GUID: dCE-35P736uf1u9M8IFc9dgghPJoB29c X-Proofpoint-ORIG-GUID: dCE-35P736uf1u9M8IFc9dgghPJoB29c X-Spam-Status: No, score=-5.4 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, RCVD_IN_DNSWL_LOW, RCVD_IN_MSPIKE_H5, RCVD_IN_MSPIKE_WL, SPF_HELO_NONE, SPF_NONE, TXREP, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org X-BeenThere: gcc-patches@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-patches mailing list <gcc-patches.gcc.gnu.org> List-Unsubscribe: <https://gcc.gnu.org/mailman/options/gcc-patches>, <mailto:gcc-patches-request@gcc.gnu.org?subject=unsubscribe> List-Archive: <https://gcc.gnu.org/pipermail/gcc-patches/> List-Post: <mailto:gcc-patches@gcc.gnu.org> List-Help: <mailto:gcc-patches-request@gcc.gnu.org?subject=help> List-Subscribe: <https://gcc.gnu.org/mailman/listinfo/gcc-patches>, <mailto:gcc-patches-request@gcc.gnu.org?subject=subscribe> From: Qing Zhao via Gcc-patches <gcc-patches@gcc.gnu.org> Reply-To: Qing Zhao <qing.zhao@oracle.com> Errors-To: gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org Sender: "Gcc-patches" <gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org> X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1769235714081498206?= X-GMAIL-MSGID: =?utf-8?q?1769235714081498206?= |
Series |
Accept and Handle the case when a structure including a FAM nested in another structure
|
|
Message
Qing Zhao
June 20, 2023, 3:22 p.m. UTC
This is the 10th version of the patch, which rebased on the latest trunk. This is an important patch needed by Linux Kernel security project. compared to the 9th patch, the ONLY change is: I split the 1st patch into the following two patches: patch 1/3: Introduce IR bit TYPE_INCLUDES_FLEXARRAY for the GCC extension [PR77650] patch 3/3: Use TYPE_INCLUDES_FLEXARRAY in __builtin_object_size[PR101832] so, in patch 1/3 includes all the FE changes, changes in Middle-end to support the FE changes. patch 3/3 only includes the change in gcc/tree-object-size.cc and the testing case to support PR101832. Now, there are 3 patches: patch 1/3: Introduce IR bit TYPE_INCLUDES_FLEXARRAY for the GCC extension [PR77650] patch 2/3: Update documentation to clarify a GCC extension [PR77650] patch 3/3: Use TYPE_INCLUDES_FLEXARRAY in __builtin_object_size[PR101832] among the above, the patch 1/3 and the patch 2/3 have been reviewed and approved. the patch 3/3 is a very simple change to use the new bit TYPE_INCLUDES_FLEXARRAY in __builtin_object_size. I have bootstrapped and regression-tested on both aarch64 and x86. no issues. I will commit the patch 1/3 and 2/3 tomorrow since they have been approved already. for the patch 3/3, I will wait for several days, if there is no objection or new comments, I will commit it the end of this week. Please let me know if you have comments and suggestions. thanks. Qing Qing Zhao (3): Introduce IR bit TYPE_INCLUDES_FLEXARRAY for the GCC extension [PR77650] Update documentation to clarify a GCC extension [PR77650] Use TYPE_INCLUDES_FLEXARRAY in __builtin_object_size [PR101832]