How to assess how much stack space kernel function may use?
Hello all I am writing kernel module function that calls for vfs function , so I am not aware how deep kernel stack can grow due to my calls I need to take 512 bytes for some processing, and I know kernel stack is 4K only. My function is also part of calling chain, so I do not know how much stack is used before my function is called. What dara can I get from kernel during compilation and run about stack utiilizaton to help me in estimation ? Lev
On Thu, Aug 16, 2018 at 04:24:33PM +0300, Lev Olshvang wrote:
Hello all
I am writing kernel module function that calls for vfs function , so I am not aware how deep kernel stack can grow due to my calls
I need to take 512 bytes for some processing, and I know kernel stack is 4K only.
Ick don't do that, fix your function to not take so much stack space. That's the correct fix, do't try to "figure out" how much stack is left, it will not be the same for different arches or different paths through the vfs layer. good luck! greg k-h
participants (2)
-
Greg KH -
Lev Olshvang