[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Dangerous use of alloca
From: |
Justus Winter |
Subject: |
Re: Dangerous use of alloca |
Date: |
Tue, 15 Mar 2016 16:01:59 +0100 |
User-agent: |
alot/0.3.8.dev |
Quoting Agustina Arzille (2016-03-15 15:44:13)
> > Good catch. However, alloca is dangerous even if used correctly, and
> > is best be avoided. Would you be so kind to prepare a patch to that
> > end?
> >
> > Thanks,
> > Justus
>
> Sure. I will cook up a patch when I get home. Right now, the
> alternatives
> to using alloca that I can think of are either:
> 1) A global buffer with a fixed size, or
> 2) 'kalloc' and friends.
>
> Obviously, (2) would be the preferred option, but I'm not sure if it's
> completely available during bootstrap. What do you guys think?
The bootscript parser creates userspace tasks. At that point the
kernel is fully initialized, feel free to use kalloc.