lwip-users
[Top][All Lists]
Advanced

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

Re: [lwip-users] lwip and MPU (FreeRTOS-MPU)


From: jblackarty
Subject: Re: [lwip-users] lwip and MPU (FreeRTOS-MPU)
Date: Thu, 30 Aug 2012 09:50:00 +0700

> Question: is it important for your application thread and the tcpip thread
> to be in different protected memory regions? is it possible for that
> memory to be accessed by both threads?

As I said already, I did it so. I've placed application thread stack
in separate memory region and added this region to user
memory regions of tcpip thread with read/write access. Thanks to this,
I was able to run my tcpip-enabled application.

Is it important to avoid this in my application ?
Immediately after I found this problem, I thought: "Shit ! It brokes comletely 
my
application security design ! How can I solve it ? Hmm...". A week
later (with red eyes): "Shit ! Shit ! Shit ! I can't solve it !.. Ok,
I'm forced to give lwip extra rights and hope that lwip will be stable
and never crash my system." I did it and run tcpecho example
application. I've started "ping -t <board_ip> -l 5000" (5000 exceeds
receive buffers sizes) and opened tcp connection with putty
and started to paste-send prepared string of 1400 bytes length from
clipboard very quickly. After a minute my application has crashed. Once
more week later: my eyes are extra red, application crashes even under
normal conditions... Please, note that I didn't even talk about such
details like that there are chaos is going in whole global
memory shared between tasks, and network-enabled part of my
application is not adequate anymore. To hell with it. But it crashes
protected kernel ! Nothing can crash kernel, provided that tasks are
run in user-mode and each task has no access to other tasks threads.
LwIP thread is the only thread which violates this...
So yes, it's very important !




reply via email to

[Prev in Thread] Current Thread [Next in Thread]