lkml.org 
[lkml]   [2005]   [Jul]   [23]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: sys_times() return value
Russell King <rmk+lkml@arm.linux.org.uk> wrote:
>
> Guys,
>
> ARM folk have recently pointed out a problem with sys_times().
> When the kernel boots, we set jiffies to -5 minutes. This causes
> sys_times() to return a negative number, which increments through
> zero.
>
> However, some negative numbers are used to return error codes.
> Hence, there's a period of time when sys_times() returns values
> which are indistinguishable from error codes shortly after boot.

What a strange system call.

> This probably only affects 32-bit architectures. However, one
> wonders whether sys_times() needs force_successful_syscall_return().

I'd say so, yes. But lots of architectures seem to have a no-op there.

> Also, it appears that glibc does indeed interpret the return value
> from sys_times in the way I describe above on at least ARM and x86.
> Other architectures may be similarly affected. Hopefully the ARM
> glibc folk will raise a cross-architecture bug in glibc for this.
>

-
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-07-23 07:41    [W:2.500 / U:0.016 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site