Received: by 2002:a05:6358:a55:b0:ec:fcf4:3ecf with SMTP id 21csp1638391rwb; Thu, 19 Jan 2023 13:24:03 -0800 (PST) X-Google-Smtp-Source: AMrXdXtFFvI5Zl3sS4FygctTdGY2DImVlq6STu4StetU1X/dvq33pJxeG5N6Chub6aFNaRW2H7mt X-Received: by 2002:a05:6a21:3287:b0:b8:66d3:30aa with SMTP id yt7-20020a056a21328700b000b866d330aamr16535484pzb.50.1674163443495; Thu, 19 Jan 2023 13:24:03 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1674163443; cv=none; d=google.com; s=arc-20160816; b=dxL2oArW9JfzSR5H0XlGyeORmCciEa+9udKUMWl+sQ/JkE12vJrqGd0BxU6MN1EYiX WOE6JVAadNeEA18y3hPJXU76BuhmVY1s1Uy7v1p39Tg4kE8BnIwtcSJ7zFFt4bDBAG0w BLNMi2hhmF4YKm8cDXp0qmbSiaYxE8yyZTWb4OzJ4RVD4GrmhYPUQmBXlM/ApltWW+3P 0D9ir7Z9GSS/lyziC+TpW1kdYu+Q0TzUl6ZfiZysDDMUZl5VrcNi8KE5vURGihj9tfgb r9P5oCXgoMInegqAia+Z4oZ/OA/lP6w2Xc52TeKMfaisestDAz986YA6auHTe3YcB82M edtg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:robot-unsubscribe :robot-id:message-id:mime-version:references:in-reply-to:cc:subject :to:reply-to:sender:from:dkim-signature:dkim-signature:date; bh=xY+SzRBo17JQPxRpIt0Xv07Ckhs+cRTjf+iujupdH3Q=; b=Wuqh7V0QrF4ZUlcY7D6wGiS8ynDeQxoXRWMstDuPecLjMP+epKdbC2Q76TAN4c5b+u VcFx49ZtrvP1I5gnoTu0Jo6qLlvGLIzsOCGYKVoPz1N9HY1usg5zJbGEq8jMmCWppppt 6ybWqc9Cy9hiGKTZ+R9LIWQrZy2ltNEYLfjmhwq/cJsXdre1vvHzOyTKem5+IdpfXj0q tSjJ2tl/y4jxPCIXGg2T0Vm7fnyjfAAbndCI5MUjkzMSZ60tNc9+pxJIhWVoeE5fR0ri NBWjhOsn8GXqTh4ZQW2JG/n5/robtO23ztn5RmQcSVvsYjTyiZBgaLABCy0MAvHwF2a/ OUEA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=JdNClVOV; dkim=neutral (no key) header.i=@linutronix.de header.s=2020e header.b=DB2zZ4Nd; 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=QUARANTINE dis=NONE) header.from=linutronix.de Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id g1-20020a636b01000000b00478d9009c01si41509266pgc.22.2023.01.19.13.23.57; Thu, 19 Jan 2023 13:24:03 -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=@linutronix.de header.s=2020 header.b=JdNClVOV; dkim=neutral (no key) header.i=@linutronix.de header.s=2020e header.b=DB2zZ4Nd; 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=QUARANTINE dis=NONE) header.from=linutronix.de Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230146AbjASVKv (ORCPT + 48 others); Thu, 19 Jan 2023 16:10:51 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58574 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230036AbjASVJi (ORCPT ); Thu, 19 Jan 2023 16:09:38 -0500 Received: from galois.linutronix.de (Galois.linutronix.de [IPv6:2a0a:51c0:0:12e:550::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4E1F130F8; Thu, 19 Jan 2023 13:03:02 -0800 (PST) Date: Thu, 19 Jan 2023 21:02:59 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1674162180; h=from:from:sender:sender:reply-to:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=xY+SzRBo17JQPxRpIt0Xv07Ckhs+cRTjf+iujupdH3Q=; b=JdNClVOVN7juiNVlv1BdgZTUI5ocscMjE1ceI8aFyc+YKF8jOq7DjbbvtORx99zIj6dUgN k4fY1KIX0X9AGuPYkRAu+ow/eLCxtCv92PWFpjSfxXjJ4EE1rUvB5JEv1B6KEvS5nzFmvN me1GUQQHQw8PNId1X/O2X3DQZfP7xiTr1rwv+ePumrIp2uGRTx0+FDvpChl2hxgAC9PmHH 0eciBohNaOSUmzevgHnZn18Ty4uSwZFTCdy1cppopUGTnvDXHkfWshIGM/WHO5ESkqiwNz S9eMAgor8NVg3jz6GKTKCzVncBRnNZQ8g4dBBqVIKCqDJrD1nU1SBUZeUuh9dQ== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1674162180; h=from:from:sender:sender:reply-to:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=xY+SzRBo17JQPxRpIt0Xv07Ckhs+cRTjf+iujupdH3Q=; b=DB2zZ4Nd7aoqpqZ9B0qoCnuTHdNlear3ASzlWBeSKmlLshVJ+HX4gO1MecP+8BpnLSUfAE A3X0t0cHxY4IruCg== From: "tip-bot2 for Gustavo A. R. Silva" Sender: tip-bot2@linutronix.de Reply-to: linux-kernel@vger.kernel.org To: linux-tip-commits@vger.kernel.org Subject: [tip: x86/fpu] x86/fpu: Replace zero-length array in struct xregs_state with flexible-array member Cc: "Gustavo A. R. Silva" , Thomas Gleixner , Kees Cook , x86@kernel.org, linux-kernel@vger.kernel.org In-Reply-To: References: MIME-Version: 1.0 Message-ID: <167416217961.4906.13789346237944390735.tip-bot2@tip-bot2> Robot-ID: Robot-Unsubscribe: Contact to get blacklisted from these emails Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED,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: X-Mailing-List: linux-kernel@vger.kernel.org The following commit has been merged into the x86/fpu branch of tip: Commit-ID: aa81cb9d9723694bb18359adbef7964030758dba Gitweb: https://git.kernel.org/tip/aa81cb9d9723694bb18359adbef7964030758dba Author: Gustavo A. R. Silva AuthorDate: Mon, 09 Jan 2023 19:40:38 -06:00 Committer: Thomas Gleixner CommitterDate: Thu, 19 Jan 2023 21:59:35 +01:00 x86/fpu: Replace zero-length array in struct xregs_state with flexible-array member Zero-length arrays are deprecated [1] and have to be replaced by C99 flexible-array members. This helps with the ongoing efforts to tighten the FORTIFY_SOURCE routines on memcpy() and help to make progress towards globally enabling -fstrict-flex-arrays=3 [2] Signed-off-by: Gustavo A. R. Silva Signed-off-by: Thomas Gleixner Reviewed-by: Kees Cook Link: https://www.kernel.org/doc/html/latest/process/deprecated.html#zero-length-and-one-element-arrays [1] Link: https://gcc.gnu.org/pipermail/gcc-patches/2022-October/602902.html [2] Link: https://github.com/KSPP/linux/issues/78 Link: https://lore.kernel.org/r/Y7zCFpa2XNs/o9YQ@work --- arch/x86/include/asm/fpu/types.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/x86/include/asm/fpu/types.h b/arch/x86/include/asm/fpu/types.h index eb7cd11..7f6d858 100644 --- a/arch/x86/include/asm/fpu/types.h +++ b/arch/x86/include/asm/fpu/types.h @@ -321,7 +321,7 @@ struct xstate_header { struct xregs_state { struct fxregs_state i387; struct xstate_header header; - u8 extended_state_area[0]; + u8 extended_state_area[]; } __attribute__ ((packed, aligned (64))); /*