Received: by 10.223.185.111 with SMTP id b44csp1429898wrg; Sat, 10 Mar 2018 05:52:37 -0800 (PST) X-Google-Smtp-Source: AG47ELs0P44Pb64atkQoclMJyKt6DlpnXDHUB+1EEAEuu3f84G8uc63qlN0n8PimRLJIqI7nTkc+ X-Received: by 10.98.71.3 with SMTP id u3mr2046434pfa.219.1520689957018; Sat, 10 Mar 2018 05:52:37 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1520689956; cv=none; d=google.com; s=arc-20160816; b=ffYj3sgGgtjbzWQ2ZxlT1kzH+FwD8hD93LP38KpmoZJLBrzQ5wWeiaIUzqmxsEpr/o XMAN0szYXc41t2Zw3no8EWtJep+7HtNAc8b+Z6TfUDgVK/pRrH5M9eD5VP+h7pnczMsM SOezpPRlo6prtO4DfNe1eyKTE3t8LEoXRmqeicKb5efe+6/xVhWNAovc976DVLk1WET4 5fp07hZuE+BIvfOuOOVnKf1ulCTVV4uA6fZBLekmKBv7GZN1RjNK9y9ktcq4Xjq2C8t7 v2BXWNwY2gj5n2qe/uSGnWdZqqKSOzIAr/T4zrMv1yWAr4BBEYNAan7zJZTpWEo6xjd8 8rQA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:references:in-reply-to :message-id:subject:cc:to:from:date:arc-authentication-results; bh=GfmYGZZ35Pd9DDQAFo/im8+/VNsXm92ArZs4/xtCVRQ=; b=t0CfcL+qtWth6dDbKhyNjTEoScQiiiURgYQ3tS+RTARTvvnCQe3+ctNsl5RQg+d+Aj UjKkZwr2r63+vRgQYE2hJA+lo+1FLlYLe0ACbjRtES0xCayj2UQr28JNOo6otgK1DcFJ C0KVqCgBDgefSAt4B2o1LwWBsppJP3fCNkndbMB2zje5OzOBD/46QONiQGbRny7ESpid pxVhR/FRQOrmMMnIEkNFBJpQJe5N4fxCq7aKnsQihmjweRbq3K/n8/y3Odo3qbxoxWwX UmZV8G2uLfyaEQQMia5BNd8ipcxY+uWThHYCc9AkfjHrViE8HEw2pdYs+fGjRFlD6g7u k4Rw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 66si2735520pfw.112.2018.03.10.05.52.22; Sat, 10 Mar 2018 05:52:36 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933102AbeCJNvV (ORCPT + 99 others); Sat, 10 Mar 2018 08:51:21 -0500 Received: from 14.mo6.mail-out.ovh.net ([46.105.56.113]:56395 "EHLO 14.mo6.mail-out.ovh.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932863AbeCJNvU (ORCPT ); Sat, 10 Mar 2018 08:51:20 -0500 Received: from player729.ha.ovh.net (unknown [10.109.108.32]) by mo6.mail-out.ovh.net (Postfix) with ESMTP id CC54C147333 for ; Sat, 10 Mar 2018 14:14:41 +0100 (CET) Received: from heffalump.sk2.org (gw.sk2.org [88.186.243.14]) (Authenticated sender: steve@sk2.org) by player729.ha.ovh.net (Postfix) with ESMTPSA id CF04D5E0094; Sat, 10 Mar 2018 14:14:29 +0100 (CET) Date: Sat, 10 Mar 2018 14:14:22 +0100 From: Stephen Kitt To: Bart Van Assche Cc: "jejb@linux.vnet.ibm.com" , "hare@suse.com" , "martin.petersen@oracle.com" , "axboe@kernel.dk" , "linux-scsi@vger.kernel.org" , "linux-kernel@vger.kernel.org" , "linux-block@vger.kernel.org" , "kernel-hardening@lists.openwall.com" Subject: Re: [PATCH] device_handler: remove VLAs Message-ID: <20180310141422.3a8c451f@heffalump.sk2.org> In-Reply-To: <1520635688.2907.17.camel@wdc.com> References: <20180309232933.14e39858@heffalump.sk2.org> <20180309223211.20473-1-steve@sk2.org> <1520635688.2907.17.camel@wdc.com> X-Mailer: Claws Mail 3.14.1 (GTK+ 2.24.31; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; boundary="Sig_/RLkA53ioUhv_A3ygWmrpsFY"; protocol="application/pgp-signature" X-Ovh-Tracer-Id: 15726851378016767454 X-VR-SPAMSTATE: OK X-VR-SPAMSCORE: -100 X-VR-SPAMCAUSE: gggruggvucftvghtrhhoucdtuddrgedtfedrkeelgdeghecutefuodetggdotefrodftvfcurfhrohhfihhlvgemucfqggfjpdevjffgvefmvefgnecuuegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmd Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org --Sig_/RLkA53ioUhv_A3ygWmrpsFY Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Hi Bart, On Fri, 9 Mar 2018 22:48:10 +0000, Bart Van Assche wrote: > On Fri, 2018-03-09 at 23:32 +0100, Stephen Kitt wrote: > > In preparation to enabling -Wvla, remove VLAs and replace them with > > fixed-length arrays instead. > >=20 > > scsi_dh_{alua,emc,rdac} use variable-length array declarations to > > store command blocks, with the appropriate size as determined by > > COMMAND_SIZE. This patch replaces these with fixed-sized arrays using > > MAX_COMMAND_SIZE, so that the array size can be determined at compile > > time. =20 >=20 > If COMMAND_SIZE() is evaluated at compile time, do we still need this pat= ch? The two patches I sent were supposed to be alternative solutions; see https://marc.info/?l=3Dlinux-scsi&m=3D152063671005295&w=3D2 for the introdu= ction (I seem to have messed up the headers, so the mails didn=E2=80=99t end up thre= aded properly). The MAX_COMMAND_SIZE approach is nice and simple, but I thought it worth eliminating scsi_command_size_tbl while I was at it... Regards, Stephen --Sig_/RLkA53ioUhv_A3ygWmrpsFY Content-Type: application/pgp-signature Content-Description: OpenPGP digital signature -----BEGIN PGP SIGNATURE----- iQIzBAEBCgAdFiEEnPVX/hPLkMoq7x0ggNMC9Yhtg5wFAlqj2i8ACgkQgNMC9Yht g5zViA/+MF5I+78bIeowASW4WOSYxUhajnvUxXnTaR9TT5cs2jZDKQjie0lVu8wm L2H5dLE+4UWqIEKzSQRyRVhj6Bt3sWYye2hm6/kiDheIq+FXR9pfOOyOgzsvfmt/ bHXiFYKb7TQ6BcapWLNKpCJewaMyAPWhghTdJL3UycPwZIWAo21AhNwWsQ5HWKW0 UV/XOV0Mqvv9LlcWrdFiXPvee9NB4ZT3KVhNlyHpx9M2jO3hEMi2HqXQvhHl8H3L UI6jWKFLzmWGQzXkJ+2GRq/bdvWyqzyKX89mq3Xb+zRcyjd1J/AjUtcUqwkSrBt1 r7RQIQ8XE8zD5TK39BC0OX7hWZd+oBvc+RlLl++hvYSBLJv87Eo9Mu+Fciys7PBJ p7YOldKbIA53DO18gsKVgruhvYNnR1VvbS5DI1rXFFDhM+21tpVXlKwBZEBAo3Kz 4LeOKxTjuzy4OsNkSgjArWX3kBkWurNP7ueKVx6Aw1o6uOkVqqgAbXRuL67yGEL8 CRpiF4ceZ54ZVHzz0oKXBLbZ1qpKgo4RhZ8NQFbqhI473gDbN5EJ7hugFbDde8A4 lLGVoSqzEO/zPe88RUZD2AYsrY7X/yToXF5HTOeIHAebQwvMMh1uKcrEUVhzEfuS RCfd2DupwXnUUACQ4/bhJYtYizlXFeBp6iyMv4xUbmmRu0K4hwg= =TYGA -----END PGP SIGNATURE----- --Sig_/RLkA53ioUhv_A3ygWmrpsFY--