From: David Miller <davem@davemloft.net>
To: paulus@samba.org
Cc: akpm@linux-foundation.org, linux-kernel@vger.kernel.org,
Joakim.Tjernlund@transmode.se
Subject: Re: [PATCH] Allow times and time system calls to return small negative values
Date: Wed, 03 Dec 2008 21:23:13 -0800 (PST) [thread overview]
Message-ID: <20081203.212313.74138057.davem@davemloft.net> (raw)
In-Reply-To: <18743.25968.602602.875295@drongo.ozlabs.ibm.com>
From: Paul Mackerras <paulus@samba.org>
Date: Thu, 4 Dec 2008 16:06:56 +1100
> At the moment, the times() system call will appear to fail for a
> period shortly after boot, while the value it want to return is
> between -4095 and -1. The same thing will also happen for the time()
> system call on 32-bit platforms some time in 2106 or so.
>
> On some platforms, such as x86, this is unavoidable because of the
> system call ABI, but other platforms such as powerpc have a separate
> error indication from the return value, so system calls can in fact
> return small negative values without indicating an error. On those
> platforms, force_successful_syscall_return() provides a way to
> indicate that the system call return value should not be treated as an
> error even if it is in the range which would normally be taken as a
> negative error number.
>
> This adds a force_successful_syscall_return() call to the time() and
> times() system calls plus their 32-bit compat versions, so that they
> don't erroneously indicate an error on those platforms whose system
> call ABI has a separate error indication. This will not affect
> anything on other platforms.
>
> Joakim Tjernlund added the fix for time() and the compat versions of
> time() and times(), after I did the fix for times().
>
> Signed-off-by: Joakim Tjernlund <Joakim.Tjernlund@transmode.se>
> Signed-off-by: Paul Mackerras <paulus@samba.org>
Acked-by: David S. Miller <davem@davemloft.net>
next prev parent reply other threads:[~2008-12-04 5:23 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-12-04 5:06 Paul Mackerras
2008-12-04 5:23 ` David Miller [this message]
2008-12-04 7:57 ` Ingo Molnar
2008-12-04 10:49 ` Paul Mackerras
2008-12-04 15:40 ` Ingo Molnar
2008-12-04 16:01 ` [PATCH] Allow times and time system calls to return smallnegative values Joakim Tjernlund
2008-12-04 17:03 ` [PATCH] Allow times and time system calls to return small negative values David Miller
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20081203.212313.74138057.davem@davemloft.net \
--to=davem@davemloft.net \
--cc=Joakim.Tjernlund@transmode.se \
--cc=akpm@linux-foundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=paulus@samba.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Powered by JetHome