From: Himanshu Jha <himanshujha199640@gmail.com>
To: "Gustavo A. R. Silva" <gustavo@embeddedor.com>
Cc: Jonathan Cameron <jic23@kernel.org>,
Hartmut Knaack <knaack.h@gmx.de>,
Lars-Peter Clausen <lars@metafoo.de>,
Peter Meerwald-Stadler <pmeerw@pmeerw.net>,
linux-iio@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] iio: potentiometer: ds1803: remove VLA usage
Date: Tue, 13 Mar 2018 22:29:06 +0530 [thread overview]
Message-ID: <20180313165906.GA11317@himanshu-Vostro-3559> (raw)
In-Reply-To: <be9b8f8d-929f-1c0b-334f-583d1c57460c@embeddedor.com>
On Tue, Mar 13, 2018 at 11:31:19AM -0500, Gustavo A. R. Silva wrote:
>
>
> On 03/13/2018 11:24 AM, Himanshu Jha wrote:
> >Hi Gustavo,
> >
> >On Tue, Mar 13, 2018 at 10:23:43AM -0500, Gustavo A. R. Silva wrote:
> >>In preparation to enabling -Wvla, remove VLA. In this particular
> >>case use macro ARRAY_SIZE so the length of array _result_ can be
> >>computed at preprocessing time.
> >>
> >>The use of stack Variable Length Arrays needs to be avoided, as they
> >>can be a vector for stack exhaustion, which can be both a runtime bug
> >>or a security flaw. Also, in general, as code evolves it is easy to
> >>lose track of how big a VLA can get. Thus, we can end up having runtime
> >>failures that are hard to debug.
> >>
> >>Also, fixed as part of the directive to remove all VLAs from
> >>the kernel: https://lkml.org/lkml/2018/3/7/621
> >>
> >>Signed-off-by: Gustavo A. R. Silva <gustavo@embeddedor.com>
> >>---
> >
> >It is already applied as I had sent the patch few days ago.
> >https://lkml.org/lkml/2018/3/10/164
> >
> >I specifically CC'ed you and Kees to avoid the patch collisions.
> >
>
> I see. Can you please update this spreadsheet:
>
> https://docs.google.com/spreadsheets/d/1OcfyKK8pJ24esYhSEsW4Q2boZE7UTGbYsSEEtFXf7U0/edit
Updated!
Also,
drivers/iio/humidity/hts221_i2c.c:43:2: warning: ISO C90
forbids variable length array ‘send’ [-Wvla]
This was already removed in recent commit when regmap API was used.
"6217792 iio: humidity: hts221: add regmap API support"
For this I added a short note in the *Notes* column.
--
Thanks
Himanshu Jha
next prev parent reply other threads:[~2018-03-13 16:59 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-03-13 15:23 [PATCH] iio: potentiometer: ds1803: remove VLA usage Gustavo A. R. Silva
2018-03-13 16:24 ` Himanshu Jha
2018-03-13 16:31 ` Gustavo A. R. Silva
2018-03-13 16:59 ` Himanshu Jha [this message]
2018-03-13 17:05 ` Gustavo A. R. Silva
2018-03-13 17:07 ` Gustavo A. R. Silva
-- strict thread matches above, loose matches on Subject: below --
2018-03-08 18:45 [PATCH] iio: potentiometer: ds1803: Remove " Himanshu Jha
2018-03-08 19:39 ` Kees Cook
2018-03-09 11:05 ` Himanshu Jha
2018-03-10 15:04 ` Jonathan Cameron
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20180313165906.GA11317@himanshu-Vostro-3559 \
--to=himanshujha199640@gmail.com \
--cc=gustavo@embeddedor.com \
--cc=jic23@kernel.org \
--cc=knaack.h@gmx.de \
--cc=lars@metafoo.de \
--cc=linux-iio@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=pmeerw@pmeerw.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).