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: Martin Velek
Subject: Re: [lwip-users] lwip and MPU (FreeRTOS-MPU)
Date: Thu, 30 Aug 2012 11:33:05 +0200

Hi,

do you mean this situation?

Thread A = tcpip thread - stack protected by MPU, only A and
privileged mode can access it
Thread B = user thread - stack protected by MPU, only B and privileged
mode can access it

Thread A{
 message = wait_for_message_from_A();
 ...
 (dereference)message.pointer_to_somewhere = true; <----- HERE is the
MPU exception
send_message_back_to_A(message);
}

Thread B{
 bool message_OK;
 message.pointer_to_somewhere =  (reference)message_OK;
 send_message_to_B(message)
 message = wait_for_message_status_from_A();
 if(true == message_OK) ....
}
Remark: Probably a more complex structure is referenced, not the bool type.

In that case, there is no answer to your question, if you want to use
the MPU until a new version of lwip is released.

Martin

On Wed, Aug 29, 2012 at 4:50 AM, jblackarty <address@hidden> wrote:
> Hi all,
>
> I've ported lwip to FreeRTOS-MPU (ARM Cortex-M3, GCC) and suddenly
> found that lwip design violates FreeRTOS memory access
> restrictions. The problem is that lwip tcpip thread accesses local
> variable allocated on stack of application thread which uses Netconn
> API. FreeRTOS-MPU protects thread stacks because stack corruption
> (made by other threads) can corrupt freertos kernel data and thus
> cause crash of whole system
> LwIP is most unreliable (because most complex) component in my
> system. Therefore, it's first candidate to have most rectricted access
> rights in my system. Ironically, it happened that I'm forced to give
> it access to application thread stacks and thus make it the only
> component which may cause whole system crash ! And seems like it does
> it already in my tests, but I'm not sure so far because I didn't found
> that it's lwip who does it (it's only a week passed since I started
> debbugging which driving me crazy).
> I have absolutely no idea how to solve it keeping lwip code
> unmodified. What do you think about it ?
>
> Regards,
> Artem Pisarenko
>
>
> _______________________________________________
> lwip-users mailing list
> address@hidden
> https://lists.nongnu.org/mailman/listinfo/lwip-users



reply via email to

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