[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20170324140936.45gjbfdjyyag5cce@hirez.programming.kicks-ass.net>
Date: Fri, 24 Mar 2017 15:09:36 +0100
From: Peter Zijlstra <peterz@...radead.org>
To: Dmitry Vyukov <dvyukov@...gle.com>
Cc: "H. Peter Anvin" <hpa@...or.com>, Michael Davidson <md@...gle.com>,
Alexander Potapenko <glider@...gle.com>,
Michal Marek <mmarek@...e.com>,
Thomas Gleixner <tglx@...utronix.de>,
Ingo Molnar <mingo@...hat.com>,
Herbert Xu <herbert@...dor.apana.org.au>,
"David S. Miller" <davem@...emloft.net>,
Shaohua Li <shli@...nel.org>,
Matthias Kaehlcke <mka@...omium.org>,
"x86@...nel.org" <x86@...nel.org>,
"open list:KERNEL BUILD + fi..." <linux-kbuild@...r.kernel.org>,
LKML <linux-kernel@...r.kernel.org>,
linux-crypto@...r.kernel.org, linux-raid@...r.kernel.org
Subject: Re: [PATCH 6/7] md/raid10, LLVM: get rid of variable length array
On Fri, Mar 24, 2017 at 02:47:15PM +0100, Dmitry Vyukov wrote:
> > Seriously, you should have taken the hack the first time that this
> > needs to be fixed. Just because this is a fairly uncommon construct
> > in the kernel doesn't mean it is not in userspace.
>
> There is a reason why it is fairly uncommon in kernel.
So first off; its not entirely clear that the code as it exists it
correct. From a cursory reading of it and surrounding code, there is no
actual upper limit on the variable. If I were stupid enough to make a
raid with 64 devices I'd get a huge on-stack structure.
Since you're touching it; you should check these things.
And secondly, refactor the code to not look like dog vomit. You can do
more than the absolute minimal patch to make it compile, I'm sure.
Powered by blists - more mailing lists