lkml.org 
[lkml]   [2003]   [Jun]   [15]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: force_successful_syscall_return() buggy?
Russell King writes:

> #define force_successful_syscall_return() \
> do { \
> ia64_task_regs(current)->r8 = 0; \
> } while (0)
>
> I don't know what happens on these architectures, but I have a suspicion
> that there is a case which the above will fail, maybe with dramatic
> consequences.

On PPC, I am going to use a bit in the thread_info flags field to
indicate that the current syscall should not return an error. The
syscall entry and exit paths already look at the thread_info flags
(testing the syscall trace bit, among others) so it's convenient to
have the "no error" flag there too. The flag bit gets cleared on
syscall entry, set by force_successful_syscall_return() and tested on
syscall exit. The only restriction is that kernel code should not do
a system call between where it calls force_successful_syscall_return
and where it returns from the syscall. But I don't believe we ever do
recursive system calls anyway, so that should be fine.

Regards,
Paul.
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 13:36    [W:0.039 / U:0.940 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site