|
Message-ID: <20180310141422.3a8c451f@heffalump.sk2.org>
Date: Sat, 10 Mar 2018 14:14:22 +0100
From: Stephen Kitt <steve@....org>
To: Bart Van Assche <Bart.VanAssche@....com>
Cc: "jejb@...ux.vnet.ibm.com" <jejb@...ux.vnet.ibm.com>, "hare@...e.com"
<hare@...e.com>, "martin.petersen@...cle.com" <martin.petersen@...cle.com>,
"axboe@...nel.dk" <axboe@...nel.dk>, "linux-scsi@...r.kernel.org"
<linux-scsi@...r.kernel.org>, "linux-kernel@...r.kernel.org"
<linux-kernel@...r.kernel.org>, "linux-block@...r.kernel.org"
<linux-block@...r.kernel.org>, "kernel-hardening@...ts.openwall.com"
<kernel-hardening@...ts.openwall.com>
Subject: Re: [PATCH] device_handler: remove VLAs
Hi Bart,
On Fri, 9 Mar 2018 22:48:10 +0000, Bart Van Assche <Bart.VanAssche@....com>
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.
> >
> > 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.
>
> If COMMAND_SIZE() is evaluated at compile time, do we still need this patch?
The two patches I sent were supposed to be alternative solutions; see
https://marc.info/?l=linux-scsi&m=152063671005295&w=2 for the introduction (I
seem to have messed up the headers, so the mails didn’t end up threaded
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
Content of type "application/pgp-signature" skipped
Powered by blists - more mailing lists
Confused about mailing lists and their use? Read about mailing lists on Wikipedia and check out these guidelines on proper formatting of your messages.