Received: by 2002:a05:6a10:1d13:0:0:0:0 with SMTP id pp19csp1499531pxb; Fri, 27 Aug 2021 10:10:25 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwKv+iM2ZXlbGx2jE7eToJ/iJSaqZKR9moMSZZQUIEIrlu2v0cPR/PSrbaqOn1WLhZ7pbGB X-Received: by 2002:a05:6602:26cb:: with SMTP id g11mr8388066ioo.110.1630084224548; Fri, 27 Aug 2021 10:10:24 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1630084224; cv=none; d=google.com; s=arc-20160816; b=JlHv16UZ2rVuoYNMjskICygSmtj4YzPwZ1RTcTxKdJikeJBaZL9HZlrk5SfTA5QO11 S+ndEAk7nYfwns+wbN6r0qDYAaTJV6SGwdocZFMXhwHixXMiWcWXyE3LlG8YWdqzIY6y DdCITESlPnBgL3sn1XSVybcxUE9d7m3kringfDd8cCMD9wgqmusXotapuNCpdyVPwySD xR8qz3Pr9/qYTGLIyupOesEap6l13Qssyy8PGb4xoKWdfIB84o3xVKFAL4nt7XmRbtMT MD12ya1X2if0lTOilCTcKKVs3+mvBbAg3BjOJ/ddfABmf2SyWUNYakU3QKhAIwm+D9hI 8lNg== 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=v0aM+h9yUmtF3WfK30nlRXtzeR59sFOcjSclsF5J6jo=; b=lnF60IM4SmI6R75qXnw95SHY4SJh7IlsZfWUOf8YIwcmmZthmdfUz/PMr/HfE4G30E jKAH1GrPJIvZXeuNHc/RwkoZzfoKDHlxkHQJ86lLEkAY3F0OtDO1lEez0uqZlQFoY1pZ 1IKlXPjwWRq/A6koPFZq5vdAn1bMsikGG/bqgodcbDDjokI7Donx1Tz7jtkpZH52gwOQ KzuCdLxjqW60xzei5Myz16fbr7nNB9KRf2LbM0vUTsCZxeQe6daIH6QMOuUPmRQwwLjQ XdnbX4pZtx27PPzNiTsphcjqVNwjfxnsUqyItBry7IJ81j5G7Xkp9wtf7ZQIoYLYpmXx +c2A== 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 l18si6417628ilc.72.2021.08.27.10.09.58; Fri, 27 Aug 2021 10:10:24 -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 S233608AbhH0RKn (ORCPT + 99 others); Fri, 27 Aug 2021 13:10:43 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57782 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231325AbhH0RKm (ORCPT ); Fri, 27 Aug 2021 13:10:42 -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 7D278C061757 for ; Fri, 27 Aug 2021 10:09:53 -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 1mJfLX-00064y-Ny; Fri, 27 Aug 2021 19:08:51 +0200 Received: from pengutronix.de (2a03-f580-87bc-d400-4ac6-d86b-e43f-77c5.ip6.dokom21.de [IPv6:2a03:f580:87bc:d400:4ac6:d86b:e43f:77c5]) (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 A327F670F04; Fri, 27 Aug 2021 17:08:38 +0000 (UTC) Date: Fri, 27 Aug 2021 19:08:37 +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, Rasmus Villemoes , Keith Packard , Dan Williams , Daniel Vetter , clang-built-linux@googlegroups.com, linux-hardening@vger.kernel.org Subject: Re: [PATCH v2 2/5] treewide: Replace open-coded flex arrays in unions Message-ID: <20210827170837.mu4hql5bev2f5x2o@pengutronix.de> References: <20210826050458.1540622-1-keescook@chromium.org> <20210826050458.1540622-3-keescook@chromium.org> <20210826062452.jekmoo43f4xu5jxk@pengutronix.de> <202108270906.7C85982525@keescook> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="gkkaemaf4slct3pn" Content-Disposition: inline In-Reply-To: <202108270906.7C85982525@keescook> 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 --gkkaemaf4slct3pn Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On 27.08.2021 09:08:19, Kees Cook wrote: > > BTW: Is there opportunity for conversion, too? > >=20 > > | drivers/net/can/peak_canfd/peak_pciefd_main.c:146:32: warning: array = of flexible structures >=20 > Oh, hrmpf. This isn't a sane use of flex arrays: >=20 > struct __packed pucan_rx_msg { > ... > __le32 can_id; > u8 d[]; > }; >=20 > struct pciefd_rx_dma { > __le32 irq_status; > __le32 sys_time_low; > __le32 sys_time_high; > struct pucan_rx_msg msg[]; > } __packed __aligned(4); >=20 > I think that needs to be handled separately. How are you building to get > that warning, by the way? I haven't seen that in my builds... If compiling with C=3D1, sparse will complain about this. 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 | --gkkaemaf4slct3pn Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQEzBAABCgAdFiEEK3kIWJt9yTYMP3ehqclaivrt76kFAmEpHBEACgkQqclaivrt 76nZyQf/cQC8nVICmegw2Xx7F4e9MRmYJPNlM4CBOw9lsPVBDSn9GON+JkvMIfWI gzsHT/fSQfAerrBnUGqaLqbI/HjEa1cgkevLmMY6SnSYZN1tYmiYUhhirVAUN07C QchAwrLEtdk4fwE/PMvjCcsmw1BrM85bW5B9h/Ug5xhhZZGJu+0I1DSR9s4ERi1M SGHegQvm8xGiPYDiYOOmXX75G9X4rtVGcpNWj9Iu9hscU0F2exWZz5wB1cZQSK4s Ka+x3qrkGo4rP+qNov0TlUZEwY3YSmZWx4slMWhR53Shdzpo7H3aylw8JLIra1/i YPgsmxiUEP6P9DiHmH2O5IVgUsy9kg== =L8Rq -----END PGP SIGNATURE----- --gkkaemaf4slct3pn--