This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

How to do stack check on ARMv8 based on linux?

I am developing Android on ARMv8(4 * A53) platform. Our Kernel is 3.14, 64 bit compiled. Because our memory is not large enough, so we tried to reduce THREAD_SIZE from 16KB to 8KB in order to save memory. Usually our system can boot to launcher successfully with 8KB config. But random kernel panic will happen if we connected ether-net and playing APPs for online video playback. From the crash stack we found that task stack is corrupted(stack base/limit is not satisfy 8KB limit). It's hard to find out which function's operation caused panic. So I wonder to know is there any method that I can try to check stack usage of linux kernel based on ARMv8? Any Kernel config or small patch that can check each stack pointer during function calls?

Hope to get your response quickly.

  • Hi,

    Have you check enabling CC_STACKPROTECTOR config ?

    CC_STACKPROTECTOR_REGULAR or CC_STACKPROTECTOR_STRONG based on your needs.

    Also please post such Linux related queries on LKML to get fast and may be multiple responses.

    Regards,

    Sudeep