[lkml]   [2009]   [Jun]   [19]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: [PATCH 16/17] arm: asm/syscall.h (unfinished)
On Fri, Apr 24, 2009 at 05:15:03PM -0700, Roland McGrath wrote:
> The syscall_get_nr() function here is not really right. I don't
> know enough about ARM to finish it correctly. It needs to figure
> out if the blocked user task is really in the kernel for a system
> call and return -1 if not.

That bit is rather hard - we maintain no global state as to whether a
task is in a syscall or not. We also do not maintain a global view
of which syscall number is being executed. The kernel just hasn't
required either of these things before.

> I also did not try to handle all the different ABI variants, which I
> don't really understand.

There are two places that the syscall number comes from: EABI and thumb
both use R7. OABI puts the value in the instruction itself.

In short, I don't know what to do about this either. I don't think
there's a quick and simple answer.

Your implementation of syscall_get_arguments() looks wrong - for OABI
it makes sense because there is no padding in the allocation of registers.
However, for EABI, there is padding, so 64-bit values always come in
using an even+odd register number. Short of maintaining some sort of
table describing the argument placements for every kernel syscall (eww)
I'm not sure how this could be fixed.

Russell King
Linux kernel 2.6 ARM Linux -
maintainer of:

 \ /
  Last update: 2009-06-19 11:35    [W:0.198 / U:0.028 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site