From patchwork Tue May 23 01:34:41 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Gustavo A. R. Silva" X-Patchwork-Id: 13251346 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 2B58FC7EE26 for ; Tue, 23 May 2023 01:33:54 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232030AbjEWBdx (ORCPT ); Mon, 22 May 2023 21:33:53 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49780 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229555AbjEWBdw (ORCPT ); Mon, 22 May 2023 21:33:52 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 649B58E; Mon, 22 May 2023 18:33:51 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 0154662339; Tue, 23 May 2023 01:33:51 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 9A284C433EF; Tue, 23 May 2023 01:33:48 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1684805630; bh=VLQAZ0ni90Kw6iE14tA7Ei4jvKZaqtf32yr37fGDBu4=; h=Date:From:To:Cc:Subject:From; b=psNKhCSf1o9RfAcrMtHIcPoveO8TCKajkd0vKDcMLyD6rQh5PC7oobvqhSyGR0gZ3 0xXNkUft/oNmxPALM1nbNaL/j+5nr5G8P+gRm2bbAC475hPgpX0Q5V8zyvOekpvKkJ rN2b69IWsBAKlzrTFVUt8hTcvd26vOYrM2llEnX0egB/Xi+rAxA6SdgxGTYb5+hwS7 IgmnpL90KU8te4ur38R0wFHWWtOqAs3Nj9+5JvFwemYEBrvoscmoB6qRtVMB7MTasb Yf0MwlpFaG3TLe6o11vHtW22acjcBZET8JoojGGZuIk+qXUnMgbdXCn+nZKEcrA0Qx URdn/s/tTGpxA== Date: Mon, 22 May 2023 19:34:41 -0600 From: "Gustavo A. R. Silva" To: Eric Farman , Matthew Rosato , Halil Pasic , Vineeth Vijayan , Peter Oberparleiter , Heiko Carstens , Vasily Gorbik , Alexander Gordeev , Christian Borntraeger , Sven Schnelle Cc: linux-s390@vger.kernel.org, kvm@vger.kernel.org, linux-kernel@vger.kernel.org, "Gustavo A. R. Silva" , linux-hardening@vger.kernel.org Subject: [PATCH 0/2][next] vfio/ccw: Replace one-element array with flexible-array member Message-ID: MIME-Version: 1.0 Content-Disposition: inline Precedence: bulk List-ID: X-Mailing-List: linux-hardening@vger.kernel.org Hi! This small series aims to replace a one-element array with a flexible-array member in struct vfio_ccw_parent. 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://github.com/KSPP/linux/issues/79 Link: https://github.com/KSPP/linux/issues/160 Link: https://github.com/KSPP/linux/issues/297 Link: https://gcc.gnu.org/pipermail/gcc-patches/2022-October/602902.html [1] Gustavo A. R. Silva (2): vfio/ccw: Replace one-element array with flexible-array member vfio/ccw: Use struct_size() helper drivers/s390/cio/vfio_ccw_drv.c | 2 +- drivers/s390/cio/vfio_ccw_private.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) Reviewed-by: Matthew Rosato