Well, you can freely access the userland memory (ok, you have to use copy_from_user and such to handle page faults for you) and you have the stack pointer available in the task struct, which you obtain from current. The rest is making sense out of that stack.
That being said, I don't really think you should do this from kernel.
-- Kernelnewbies: Help each other learn about the Linux kernel. Archive: http://mail.nl.linux.org/kernelnewbies/ FAQ: http://kernelnewbies.org/faq/