Received: by 2002:a05:6a10:1d13:0:0:0:0 with SMTP id pp19csp308203pxb; Wed, 18 Aug 2021 02:58:10 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwWtnsEBntga1bGZM6g/W9h9ZgmzZ4QCJhlIUByV1Yeq7FkpHGC1SrpaKDDRTwsZSmFc2x2 X-Received: by 2002:a6b:ba02:: with SMTP id k2mr6517624iof.164.1629280690100; Wed, 18 Aug 2021 02:58:10 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1629280690; cv=none; d=google.com; s=arc-20160816; b=Be3jSPbn/wAEqTUkv6VtnVZU7QYl7XvJj5fhE5wZETh6Oqv2FdA6iLQ/57+IMShGrN BgdJR2riZ5xHAEJgCYx7cV8QVti8AOvvBsYlWagX0fPziC2FIsoseFZ0RnStzxbsQXMo iF3RhRDNSzgYZv9/cZMQ/QaOirNtan72KpDpTjjrwWKsRk4qopS+wbIU6H5ca5EuSzkJ erZFMGIwOXa3w7ouZqR4XySXm5hPKGolFTxILEXnT7iucj6i72GGKDRAAze/Zg1tkBUR 5I2LS9dQO7c0OWGUL7MFEhXCxwKaUbbxMhHU2OKZcE/wR/wguCBB8s/yZ26NzucDUSN9 dlpA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date; bh=tdqnRTpMP5CO+/suUqj16fRJbiiCPlbq0Hq3ovARHtM=; b=q7ycO91N19TFg04yXmnDkgR+upUavqJSyxQhOxW3um6dGNHoOfoOLRyJwH8Kxlgtff jsjMyBWF1k8kZtBD5BAi0/gxuSgCjeGEnQKl8jcZIWLId7dxtej+qygyEd5E6PAuCgv3 5BsrPmhXAXbmULatJ+m1LSmqu65wv6WdgTpG8r8quHLOLd5ibwsgCujqrsJ/MA25TFac VXvQYDjpr+s0f66ypt/Jhkfoz+2mDHqSQNX8tnh3O0Br8NYnOmUUbHWpUVJJjnrO3zf0 G4QWsadmiynPVGvdToLkNp0ZHnxKjUIc3y2YxWR9q7RgJkfUNi6Sc21b5wIAdy4VAb1V jeXQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-crypto-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-crypto-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id s21si4886933jar.42.2021.08.18.02.57.49; Wed, 18 Aug 2021 02:58:10 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-crypto-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-crypto-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-crypto-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232954AbhHRJ6Q (ORCPT + 99 others); Wed, 18 Aug 2021 05:58:16 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42940 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231910AbhHRJ6Q (ORCPT ); Wed, 18 Aug 2021 05:58:16 -0400 Received: from metis.ext.pengutronix.de (metis.ext.pengutronix.de [IPv6:2001:67c:670:201:290:27ff:fe1d:cc33]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 92A39C061764 for ; Wed, 18 Aug 2021 02:57:41 -0700 (PDT) Received: from gallifrey.ext.pengutronix.de ([2001:67c:670:201:5054:ff:fe8d:eefb] helo=bjornoya.blackshift.org) by metis.ext.pengutronix.de with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1mGIJV-0003Ak-CF; Wed, 18 Aug 2021 11:56:49 +0200 Received: from pengutronix.de (unknown [IPv6:2a02:810a:8940:aa0:ed04:8488:5061:54d4]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-384) server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) (Authenticated sender: mkl-all@blackshift.org) by smtp.blackshift.org (Postfix) with ESMTPSA id 08E5E669A16; Wed, 18 Aug 2021 09:56:36 +0000 (UTC) Date: Wed, 18 Aug 2021 11:56:35 +0200 From: Marc Kleine-Budde To: Kees Cook Cc: linux-kernel@vger.kernel.org, "Gustavo A. R. Silva" , Arnd Bergmann , Ayush Sawal , Vinay Kumar Yadav , Rohit Maheshwari , Herbert Xu , "David S. Miller" , Kalle Valo , Jakub Kicinski , Stanislaw Gruszka , Luca Coelho , "James E.J. Bottomley" , "Martin K. Petersen" , Alexei Starovoitov , Daniel Borkmann , Andrii Nakryiko , Martin KaFai Lau , Song Liu , Yonghong Song , John Fastabend , KP Singh , Johannes Berg , Mordechay Goodstein , Lee Jones , Wolfgang Grandegger , Arunachalam Santhanam , Vincent Mailhol , Mikulas Patocka , linux-crypto@vger.kernel.org, ath10k@lists.infradead.org, linux-wireless@vger.kernel.org, netdev@vger.kernel.org, linux-scsi@vger.kernel.org, linux-can@vger.kernel.org, bpf@vger.kernel.org, clang-built-linux@googlegroups.com, linux-hardening@vger.kernel.org Subject: Re: [PATCH 2/5] treewide: Replace open-coded flex arrays in unions Message-ID: <20210818095635.tm42ctkm6aydjr6g@pengutronix.de> References: <20210818081118.1667663-1-keescook@chromium.org> <20210818081118.1667663-3-keescook@chromium.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="h4irlmrxob7c5btq" Content-Disposition: inline In-Reply-To: <20210818081118.1667663-3-keescook@chromium.org> X-SA-Exim-Connect-IP: 2001:67c:670:201:5054:ff:fe8d:eefb X-SA-Exim-Mail-From: mkl@pengutronix.de X-SA-Exim-Scanned: No (on metis.ext.pengutronix.de); SAEximRunCond expanded to false X-PTX-Original-Recipient: linux-crypto@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-crypto@vger.kernel.org --h4irlmrxob7c5btq Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On 18.08.2021 01:11:15, Kees Cook wrote: > diff --git a/drivers/net/can/usb/etas_es58x/es581_4.h b/drivers/net/can/u= sb/etas_es58x/es581_4.h > index 4bc60a6df697..8657145dc2a9 100644 > --- a/drivers/net/can/usb/etas_es58x/es581_4.h > +++ b/drivers/net/can/usb/etas_es58x/es581_4.h > @@ -192,7 +192,7 @@ struct es581_4_urb_cmd { > struct es581_4_rx_cmd_ret rx_cmd_ret; > __le64 timestamp; > u8 rx_cmd_ret_u8; > - u8 raw_msg[0]; > + flex_array(u8 raw_msg); > } __packed; > =20 > __le16 reserved_for_crc16_do_not_use; > diff --git a/drivers/net/can/usb/etas_es58x/es58x_fd.h b/drivers/net/can/= usb/etas_es58x/es58x_fd.h > index ee18a87e40c0..3053e0958132 100644 > --- a/drivers/net/can/usb/etas_es58x/es58x_fd.h > +++ b/drivers/net/can/usb/etas_es58x/es58x_fd.h > @@ -228,7 +228,7 @@ struct es58x_fd_urb_cmd { > struct es58x_fd_tx_ack_msg tx_ack_msg; > __le64 timestamp; > __le32 rx_cmd_ret_le32; > - u8 raw_msg[0]; > + flex_array(u8 raw_msg[]); > } __packed; This doesn't look consistent, what's preferred? u8 raw_msg[0]; -> flex_array(u8 raw_msg); - or- -> flex_array(u8 raw_msg[]); regards, Marc --=20 Pengutronix e.K. | Marc Kleine-Budde | Embedded Linux | https://www.pengutronix.de | Vertretung West/Dortmund | Phone: +49-231-2826-924 | Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 | --h4irlmrxob7c5btq Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQEzBAABCgAdFiEEK3kIWJt9yTYMP3ehqclaivrt76kFAmEc2VEACgkQqclaivrt 76kXUQf/cn+R4mRgon+iBBoNOjSG6Xpa5C1kWsnyfyJAQq9geHgAtcyoTTot+9QH bjo6l3vIxXSY85B6NbV+TQFuedtSpFYkRQJgWzMG/eIuwHZ7Buuf8uK5C5MESqwm PJDEl2lZpKA7MtM2gMtvmhElNsv1Nr4FqMEOmCHs5LeQQ8ddsbJ0Ab7X7ffQ4SRu UgMoqqUUFxReCmF+pmoxDC5uHBbovnw/hYPulDH6AN7jj8ml9/lPLuJKfBnyYGI5 jYTHTlc4+VnN6a7NJ7V9DhTCncLaFjXVFFxoQBWYgpetIV/eWwu2WwrrYhyrvEK0 cORmz7LG97TWWd3NSNNy9j7XKs0y+Q== =UYoj -----END PGP SIGNATURE----- --h4irlmrxob7c5btq--