[lkml]   [2008]   [Sep]   [15]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
> user_stack_pointer() is apparently a requirement, too. 

Ah, yes! I'd forgotten about user_stack_pointer() and instruction_pointer().
Those never got properly documented either.

> Although given that you already have a task_struct pointer the only place
> you currently use it (lib/syscall.c), it makes more sense to use
> KSTK_ESP/KSTK_EIP which is provided by almost everyone already.

Almost? It must be everyone, right?
It's used unconditionally in fs/proc/array.c (the only use).

I hadn't noticed these before. They aren't commented anywhere.
I've got to say, too, these are truly dismal names!

Also, I've just noticed that x86-64's user_stack_pointer() is wrong for the
case when a fast-path 64-bit syscall is in progress. To get it right, it
needs a bit from the struct thread_info, so a call that takes task_struct
instead of (or in addition to) pt_regs is certainly right.

These are defined in asm/processor.h, as macros. It would be better if
they could be inlines, but they really can't because asm/processor.h is
before struct task_struct is defined, etc. I wonder if we could move these
to another header where they can be clean inlines. I'd sure like to change
those names while we're at it.



 \ /
  Last update: 2008-09-15 22:41    [W:0.056 / U:5.156 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site