Having the kernel stack is limited to 4K, how can I know how many of this 4K was used before mu function X() is called ?
I need to extract 512 bytes of some data from storage using vfs_getxattr(). I can call for kmalloc or just use buffer on stack. But how can assess whether I can safely do this or not ? What was the stack utilization till my function was called, how much space is left? And while I may take a diff of SP and Stack segment register to know stack utilization to the current moment ( I wonder whether if there are some kernel macro exist?) I do knot know how to calculate future consumption of stack memory down the vfs call chain. Regards, Lev _______________________________________________ Linux-il mailing list Linux-il@cs.huji.ac.il http://mailman.cs.huji.ac.il/mailman/listinfo/linux-il