Received: by 2002:a05:6358:1087:b0:cb:c9d3:cd90 with SMTP id j7csp2744553rwi; Fri, 28 Oct 2022 10:38:43 -0700 (PDT) X-Google-Smtp-Source: AMsMyM6dnk6AQRKbzMYme6lJnqQ4QfAiYR0M50STonq3ZxHTweEgvbt7JpqzHBbP5DVQ8HH5H6fz X-Received: by 2002:a17:907:2c72:b0:7a5:47da:5893 with SMTP id ib18-20020a1709072c7200b007a547da5893mr428421ejc.612.1666978723136; Fri, 28 Oct 2022 10:38:43 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1666978723; cv=pass; d=google.com; s=arc-20160816; b=SKqj5RsOcwz0digL1LLLhf0w0I31Ae2/ckt6N0JOhv6TLEphBiPhDsSZ9W/Jb1P5UA KMeKZoGEGFCglDR/anhwfqS44U/QoBAdOhFEXVHZREM4FV46mOXFN58j1EJM0eBelMPu 6yx2D/wtbtWxtUZoRFpZOcCsEUO1SaOiO8vVHmAlJvSWr3hDY8DsY8bX2uz2c3qb6PC1 DVSWSVc0hDeFFFRXY7tYSip/o1J2lHthQucW/T1/CJYvQ54/GQCEsfxrsIM9twCbcS0g x/q1Zd6f4JhOjlO3F0IfAt0MOHIKN9uBorAIAXe6wzpnFe7tbzDrsavbvA/yWk0Kp+yC 0WMg== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:content-transfer-encoding :in-reply-to:from:references:cc:to:content-language:subject :user-agent:date:message-id:dkim-signature; bh=UyBR4zRnDT9rtt+UQq7No9myDSgh0r3XINeBR7acMSs=; b=GSDZVjP0dPBrivDKoYVIZnElufu3YJ2/jfBWd0YzcAzzg9vucFUzapfNPFTdHWyF42 FKcYyKLvWgHnB5y08Br61Oerj6eYZIiptpSuwFljHL1zKHt5sDiRDx0o05fRYAE0PQcG Ze2CnS4pmSPlLOu3F4LNzarEdTHMRw9ekjXCrtLrlTlkWmudsciSqZZWrChMJf0P5quQ sWJr7l6QH9onM3ocL789zXfS5tHTeAXSwWQn5jX7FbtuJ93dovejQTRZH8n2NFkV0sZC klJnkLGOy6LBsaW4BEAX0c2Z9qCdcIPsKlCKygNtDqFiYo/TxImKh+OQ8/+4N3nqoz8q Flxw== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@amd.com header.s=selector1 header.b=UN5FusP9; arc=pass (i=1 spf=pass spfdomain=amd.com dkim=pass dkdomain=amd.com dmarc=pass fromdomain=amd.com); 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=QUARANTINE sp=QUARANTINE dis=NONE) header.from=amd.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id l19-20020a170906a41300b0078277d265bcsi3945040ejz.204.2022.10.28.10.38.17; Fri, 28 Oct 2022 10:38:43 -0700 (PDT) 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=@amd.com header.s=selector1 header.b=UN5FusP9; arc=pass (i=1 spf=pass spfdomain=amd.com dkim=pass dkdomain=amd.com dmarc=pass fromdomain=amd.com); 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=QUARANTINE sp=QUARANTINE dis=NONE) header.from=amd.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229929AbiJ1Rd2 (ORCPT + 99 others); Fri, 28 Oct 2022 13:33:28 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59580 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229919AbiJ1Rd1 (ORCPT ); Fri, 28 Oct 2022 13:33:27 -0400 Received: from NAM12-DM6-obe.outbound.protection.outlook.com (mail-dm6nam12on2086.outbound.protection.outlook.com [40.107.243.86]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 6FD545F21A; Fri, 28 Oct 2022 10:33:25 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Ptp4F/aeX+FjX1jR6P9qEnLnUa6v7TKWJxnreTvS/ZIXybnePbFFp2Vse4JF9kuh/C3zL7sbcorZLWm7+xAXUjfuERaPvc3iXUXN8Aqh7u/LcJKa/cvke3bLhCby58di7teJfMmRwysL6KwR7LmceRQwoiOhnGq9xQP58PcQLLj4jnA0f7spWYklzVIZZFzbYcxomGtdovvHbkTUwA/O8lrq3RltaDIQrPuvWP+F1gsGC/rsEF5wE1XFFQDcs1JVSOBe27VcVmAbCXq6zeOZRbx7UVofYj/IaRjsRV5NAiCBkpT7amxsmDA6TzLf/nc59ddfdjYHKW2GRoPHOgRGVw== 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=UyBR4zRnDT9rtt+UQq7No9myDSgh0r3XINeBR7acMSs=; b=fRgC2MHa+Xq/CGR1P9bbd2MJx7mE32x1+VtiyYDzxc8irl2yy/rrBDBXccXihsBtaPGgN1rq1bBrlGil4uPDU4l0q6dyybRgVx8QQZzihkFcc4qtyMC2TPbdbeiKrg3C1p9bfga4sR1vmpHqT2d9uubF3fWnEDwh45dnoVjlhVL19AtgUe29UgEUuHCwq4AAtgV0Gmoo2UW3XzSOcrB8DZoNVVF3InAuQS8o7OA1eCc2JpczSMd88JSOpRLAmU5NU7Eke1Qz5uL7cIjgqX2dMjcgUMrQ0Z8tnBiKW3Sk9EYgB/hZRDs+XiPmyfNQL0jia5VNWXS+UjR1Yd1KbvsmvQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=amd.com; dmarc=pass action=none header.from=amd.com; dkim=pass header.d=amd.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amd.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=UyBR4zRnDT9rtt+UQq7No9myDSgh0r3XINeBR7acMSs=; b=UN5FusP9I7Ge5lqlOAWHu9sqJkHr7VJQ4X+5E2S0jcd3pbLP5ajctlZ9KOGYXwBs03m4nPsjQXOdKZFVYFgYJgn7ljHw7iICH3eyKl7oFC/urI6cD/tHja5nkzvLlmHA1LpJU69Qai6KUbb61R7HEmStdnN0Wvo9KLgnBIq3RiM= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=amd.com; Received: from BN8PR12MB3587.namprd12.prod.outlook.com (2603:10b6:408:43::13) by PH7PR12MB6785.namprd12.prod.outlook.com (2603:10b6:510:1ab::19) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5746.21; Fri, 28 Oct 2022 17:33:23 +0000 Received: from BN8PR12MB3587.namprd12.prod.outlook.com ([fe80::a350:f29a:f287:7279]) by BN8PR12MB3587.namprd12.prod.outlook.com ([fe80::a350:f29a:f287:7279%4]) with mapi id 15.20.5746.023; Fri, 28 Oct 2022 17:33:23 +0000 Message-ID: <1052fba8-11ac-cec8-92e7-b994266c6970@amd.com> Date: Fri, 28 Oct 2022 19:33:17 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.2.2 Subject: Re: [PATCH] [next] drm/amdgpu: Replace one-element array with flexible-array member Content-Language: en-US To: Kees Cook Cc: Paulo Miguel Almeida , Alex Deucher , "Pan, Xinhui" , David Airlie , Daniel Vetter , Hans de Goede , Grigory Vasilyev , Claudio Suarez , Slark Xiao , Rongguang Wei , amd-gfx@lists.freedesktop.org, dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org, linux-hardening@vger.kernel.org References: <04e37ee1-53b0-97ab-d6d7-a39edfbdc2ea@amd.com> <202210280855.9DF8E4D72@keescook> From: =?UTF-8?Q?Christian_K=c3=b6nig?= In-Reply-To: <202210280855.9DF8E4D72@keescook> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-ClientProxiedBy: FR3P281CA0120.DEUP281.PROD.OUTLOOK.COM (2603:10a6:d10:a3::18) To BN8PR12MB3587.namprd12.prod.outlook.com (2603:10b6:408:43::13) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: BN8PR12MB3587:EE_|PH7PR12MB6785:EE_ X-MS-Office365-Filtering-Correlation-Id: 0f425dba-0860-45fb-7434-08dab90a833f X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: OjIuNDcpGMo/6/uQ8Nr6JLaT8eHeGOIb7JIANzfk70FnjOSQl3jIoqifk92X7SqSfJYVTd13fwp1ojRXd361DLmCyVqt0XGxmgwoGy04D+lA0OP+JwKCTWe6ZVIRbuYSTv/J2NChgenDCwCy5vyOkje/EN/FqNHwzui7o58txJJ5SYg6DTt0Jv1zggaOQc8bKNJLCybfbbIIVWEbtGN35/Xz3ifMDO1pZ/sw9cxri0w50leHDwSJ1KXG1ocJrSavObc6SPtjgxaBgDqENtZZOjBM/rY5aOYD8syQv0+Hz89/ydvR7AezXMAvLQkoU0IZmm3eABMfIpPgAeUEqgIM9+G5a2qPyEovkmStiat17t9G7Ykdgp63I9SgqFrAZbq4U6yxzaQyKxVUJWugZNtH7WorWm+2X3ER0edZUdkwwCNMIbpq4DsE/xyLkD9oIa3rV4Ecvjm4Qsp4fnFvTNEOec+ClCxAYKEWtqaTY3a5yECDqhbAH+swxkRdtTsAhU+L8VMtcbE+Cl1ayG9V6th3e12usYsIlwQ0T5YQ1SKn3GcsLVT1fVb8Gm0H6vFK+uekfYu+Nc8L1KoL3bsiWM68hy+N6pxFZOWlI8nlanvjGct5TC46aHXhLKLYUp1IEzDV7mxIiIHRFvDZ/T7axUU9hy7tk3Yh566Flb06uQ8RjJa3DEk8CshrlgMmvMMKKxOqfGkt9ER8DBypM/nVnwOf9aHMTbumRQiDLKhY4ldPsFNgG+a2L/to/nyVHvj0AjiKOEu7OX4UNm+sw7Mzep6dCRKdVcaLD2qz7sTWY0Qxk3yin6atICHxxdEKZCOdnEoiy9817Ef6KhJvacUcvmn4jvWPDDqto9rWoFB6C/WNN8fLfejFf0SHAPa9b/lCf1+5 X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:BN8PR12MB3587.namprd12.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230022)(4636009)(366004)(39860400002)(376002)(396003)(346002)(136003)(451199015)(316002)(31686004)(6506007)(8936002)(86362001)(2906002)(2616005)(36756003)(83380400001)(31696002)(66556008)(8676002)(6916009)(966005)(66476007)(45080400002)(6486002)(66946007)(7416002)(186003)(41300700001)(6666004)(54906003)(4326008)(6512007)(5660300002)(478600001)(38100700002)(45980500001)(43740500002);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?B?TkJVZU92WGZKVE8rcVdIVHNvbndzSzlmZFJOWHVvam1kTjltTThWZWQvbUdj?= =?utf-8?B?TUs4SnRkbkFuKzJTQ1VaZitxU3VZZ1ZDWXkvSEtxb2R6TjNDdTBmM0prZ0ZW?= =?utf-8?B?YWFuYmVrOUtZTXVYdEhqelhqSzZqOGl3bDc1Q3VqRGJBYWM0cWFPK095a2pR?= =?utf-8?B?dlREbHYrZ2hKcm9HTldKNkRjTWhqSHdoN2JjOUpVd1B1dncyeDU4enNJRkJH?= =?utf-8?B?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WmZUaVJFdk51R2RQNHREZVZPT1g5cS91?= =?utf-8?B?VVBqb2EvVVFhdGdmU3VNQjhQSmhpdFl5akpKcnFpeG9uYlpHQmxhcVd0ck5s?= =?utf-8?B?aTJ1cE80U3Y1azZXNHpBUjYrb09hemtuVmgzcnZvYnhiKzk0Tkxkc3huUjRY?= =?utf-8?Q?qvvNadxVeKvNs9WQ7UAUvM7XsrVZews1Y+cJ+SUz5ymn?= X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-Network-Message-Id: 0f425dba-0860-45fb-7434-08dab90a833f X-MS-Exchange-CrossTenant-AuthSource: BN8PR12MB3587.namprd12.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 28 Oct 2022 17:33:23.1006 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 3dd8961f-e488-4e60-8e11-a82d994e183d X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: vgEMU8F7auCOwYZTN+MO7078u+8VJ1fRH/eXGrZUiFKpDnTWM9gg8Cz0GnnVuI0E X-MS-Exchange-Transport-CrossTenantHeadersStamped: PH7PR12MB6785 X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,NICE_REPLY_A,RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2,SPF_HELO_PASS,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: X-Mailing-List: linux-kernel@vger.kernel.org Am 28.10.22 um 18:36 schrieb Kees Cook: > On Fri, Oct 28, 2022 at 09:18:39AM +0200, Christian König wrote: >> Am 28.10.22 um 07:10 schrieb Paulo Miguel Almeida: >>> One-element arrays are deprecated, and we are replacing them with >>> flexible array members instead. So, replace one-element array with >>> flexible-array member in struct _ATOM_FAKE_EDID_PATCH_RECORD and >>> refactor the rest of the code accordingly. >>> >>> This helps with the ongoing efforts to tighten the FORTIFY_SOURCE >>> routines on memcpy() and help us make progress towards globally >>> enabling -fstrict-flex-arrays=3 [1]. >>> >>> Link: https://nam11.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2FKSPP%2Flinux%2Fissues%2F79&data=05%7C01%7Cchristian.koenig%40amd.com%7C600d3657cbe441ae969d08dab9028c1c%7C3dd8961fe4884e608e11a82d994e183d%7C0%7C0%7C638025717852262567%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=h78kYVA3ee9fDDwD5XGNgYJuUAZtBitVpk2354cOLO4%3D&reserved=0 >>> Link: https://nam11.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2FKSPP%2Flinux%2Fissues%2F238&data=05%7C01%7Cchristian.koenig%40amd.com%7C600d3657cbe441ae969d08dab9028c1c%7C3dd8961fe4884e608e11a82d994e183d%7C0%7C0%7C638025717852262567%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=k1k7LwxIxIw5c9QM3gM2pA9DVGF4Kz20IJWs5tY4xzE%3D&reserved=0 >>> Link: https://nam11.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgcc.gnu.org%2Fbugzilla%2Fshow_bug.cgi%3Fid%3D101836&data=05%7C01%7Cchristian.koenig%40amd.com%7C600d3657cbe441ae969d08dab9028c1c%7C3dd8961fe4884e608e11a82d994e183d%7C0%7C0%7C638025717852262567%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=LJB4Rs1xOE82UpLbqtZOgPgi7OmvR02T9fikpKamdiY%3D&reserved=0 [1] >> I'm not sure if that's a good idea. We had multiple attempts to refactor >> this now and it always caused a regression. >> >> Additional to that the header in question came from our BIOS team and isn't >> following Linux styles in general. >> >> Alex what do you think? > Fake flexible arrays (i.e. 1-element arrays) are deprecated in Linux[1] > (and, frankly, deprecated in C since 1999 and even well before then given > the 0-sized extension that was added in GCC), so we can't continue to > bring them into kernel sources. Their use breaks both compile-time and > run-time bounds checking efforts, etc. I'm perfectly aware of that. The issue is that we have tried to fix this multiple times now and reverted back to the original behavior because some user with a 10-15 year old hardware complained that it broke his system. We can't really test every hw generation of the last 15 years for regressions. > All that said, converting away from them can be tricky, and I think such > conversions need to explicitly show how they were checked for binary > differences[2]. Oh, that's a great idea! Yes, if this can be guaranteed then the change is obviously perfectly ok. Thanks, Christian. > > Paulo, can you please check for deltas and report your findings in the > commit log? Note that add struct_size() use in the same patch may result > in binary differences, so for more complex cases, you may want to split > the 1-element conversion from the struct_size() conversions. > > -Kees > > [1] https://nam11.safelinks.protection.outlook.com/?url=https%3A%2F%2Fdocs.kernel.org%2Fprocess%2Fdeprecated.html%23zero-length-and-one-element-arrays&data=05%7C01%7Cchristian.koenig%40amd.com%7C600d3657cbe441ae969d08dab9028c1c%7C3dd8961fe4884e608e11a82d994e183d%7C0%7C0%7C638025717852262567%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=6v1qt3zMrSTFDgnF9TO3aurqvG1fPjH2grRu47e2tEA%3D&reserved=0 > [2] https://nam11.safelinks.protection.outlook.com/?url=https%3A%2F%2Foutflux.net%2Fblog%2Farchives%2F2022%2F06%2F24%2Ffinding-binary-differences%2F&data=05%7C01%7Cchristian.koenig%40amd.com%7C600d3657cbe441ae969d08dab9028c1c%7C3dd8961fe4884e608e11a82d994e183d%7C0%7C0%7C638025717852262567%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=g3yCIXBAD0OJwK5EdxRfJVeSBevbA1WOeyFM%2BiZC%2F%2FM%3D&reserved=0 >