Re: [PATCH] arch: blackfin: kernel: memory overflow, 'namebuf' length need be more than 256

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 05/29/2013 07:30 PM, Geert Uytterhoeven wrote:
>>  void show_regs(struct pt_regs *fp)
>> >  {
>> > -       char buf[150];
>> > +       char buf[512];
> This will increase stack usage a lot. And this function calls decode_address(),
> which allocates another buffer on the stack.
> 

Can it have a risk to cause the related stack used up ? (excuse me, I
don't know the system or thread stack size of blackfin).

If so, we really need save some byes (e.g. buf[300] ...), at least. But
I'm not sure whether it still has the risk too.


> However, as this is in debug code which is (never?) called concurrently, both
> buffers can be made static?
> 

trap_c() may call show_regs(), and can multiple traps occur at the same
time ?

It seems it can (but I am not quite sure): for trap_c() only use stack
variables, and "cpu = raw_smp_processor_id()".



Thanks.
-- 
Chen Gang

Asianux Corporation
--
To unsubscribe from this list: send the line "unsubscribe linux-arch" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux Kernel]     [Kernel Newbies]     [x86 Platform Driver]     [Netdev]     [Linux Wireless]     [Netfilter]     [Bugtraq]     [Linux Filesystems]     [Yosemite Discussion]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Device Mapper]

  Powered by Linux