login
Login
/
Register
Search
Forums
News
Blogs
Features
Site
Home
»
Mailing list archives
»
linux-kernel
»
2007
»
November
»
8
Re: compat_sys_times() bogus until jiffies >= 0.
view
thread
!MAILaRCHIVE_VOTE_RePLACE
Previous message: [
thread
] [
date
] [
author
]
Next message: [
thread
] [
date
] [
author
]
[view in full thread]
From:
Denys Vlasenko <vda.linux@...>
To: Andrew Morton <akpm@...>
Cc: Paul Mackerras <paulus@...>, <lkml@...>, <linux-kernel@...>, <drepper@...>, <mtk-manpages@...>
Subject:
Re: compat_sys_times() bogus until jiffies >= 0.
Date: Thursday, November 8, 2007 - 3:27 pm
On Thursday 08 November 2007 03:07, Andrew Morton wrote:
quoted text
> > On Thu, 8 Nov 2007 12:53:57 +1100 Paul Mackerras <paulus@samba.org> wrote: > > Andrew Morton writes: > > > > > Given all this stuff, the return value from sys_times() doesn't seem a > > > particularly useful or reliable kernel interface. > > > > I think the best thing would be to ignore any error from copy_to_user > > and always return the number of clock ticks. We should call > > force_successful_syscall_return, and glibc on x86 should be taught not > > to interpret negative values as an error. > > Changing glibc might be hard ;) > > > POSIX doesn't require us to return an EFAULT error if the buf argument > > is bogus. If userspace does supply a bogus buf pointer, then either > > it will dereference it itself and get a segfault, or it won't > > dereference it, in which case it obviously didn't care about the > > values we tried to put there. > > > > If we try to return an error under some circumstances, then there is > > at least one 32-bit value for the number of ticks that will cause > > confusion. We can either change that value (or values) to some other > > value, which seems pretty bogus, or we can just decide not to return > > any errors. The latter seems to me to have no significant downside > > and to be the simplest solution to the problem. > > "the latter" is what my protopatch does isn't it? It wraps at 0x7fffffff. > It appears that glibc treats all of 0x80000000-0xffffffff as an error.
The best solution is to change the kernel to never return an error and to change glibc to never treat return as an error. -- vda -
unsubscribe notice
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/
Previous message: [
thread
] [
date
] [
author
]
Next message: [
thread
] [
date
] [
author
]
Messages in current thread:
compat_sys_times() bogus until jiffies >= 0.
, David Brown
, (Wed Nov 7, 6:47 pm)
Re: compat_sys_times() bogus until jiffies >= 0.
, Andrew Morton
, (Wed Nov 7, 7:28 pm)
Re: compat_sys_times() bogus until jiffies >= 0.
, David Brown
, (Thu Nov 8, 2:00 am)
Re: compat_sys_times() bogus until jiffies >= 0.
, Andrew Morton
, (Wed Nov 7, 8:18 pm)
Re: compat_sys_times() bogus until jiffies >= 0.
, Andreas Schwab
, (Wed Nov 7, 8:54 pm)
Re: compat_sys_times() bogus until jiffies >= 0.
, Andrew Morton
, (Wed Nov 7, 9:17 pm)
Re: compat_sys_times() bogus until jiffies >= 0.
, Paul Mackerras
, (Wed Nov 7, 9:53 pm)
Re: compat_sys_times() bogus until jiffies >= 0.
, Andrew Morton
, (Wed Nov 7, 11:07 pm)
Re: compat_sys_times() bogus until jiffies >= 0.
, Denys Vlasenko
, (Thu Nov 8, 3:27 pm)
Re: compat_sys_times() bogus until jiffies >= 0.
, David Miller
, (Wed Nov 7, 11:13 pm)
Re: compat_sys_times() bogus until jiffies >= 0.
, Paul Mackerras
, (Thu Nov 8, 1:15 am)
Re: compat_sys_times() bogus until jiffies >= 0.
, David Miller
, (Thu Nov 8, 2:24 am)
Re: compat_sys_times() bogus until jiffies >= 0.
, Paul Mackerras
, (Thu Nov 8, 12:59 am)
Re: compat_sys_times() bogus until jiffies >= 0.
, Andrew Morton
, (Thu Nov 8, 1:20 am)
Re: compat_sys_times() bogus until jiffies >= 0.
, David Miller
, (Thu Nov 8, 2:25 am)
Re: compat_sys_times() bogus until jiffies >= 0.
, Andrew Morton
, (Thu Nov 8, 3:09 am)
Re: compat_sys_times() bogus until jiffies >= 0.
, David Miller
, (Thu Nov 8, 3:14 am)
Re: compat_sys_times() bogus until jiffies >= 0.
, Paul Mackerras
, (Thu Nov 8, 4:53 am)
Re: compat_sys_times() bogus until jiffies >= 0.
, Paul Mackerras
, (Thu Nov 8, 1:36 am)
Re: compat_sys_times() bogus until jiffies >= 0.
, Andrew Morton
, (Thu Nov 8, 2:12 am)
Re: compat_sys_times() bogus until jiffies >= 0.
, David Miller
, (Thu Nov 8, 2:22 am)
Re: compat_sys_times() bogus until jiffies >= 0.
, David Miller
, (Wed Nov 7, 10:09 pm)
Re: compat_sys_times() bogus until jiffies >= 0.
, Andreas Schwab
, (Thu Nov 8, 6:20 am)
Re: compat_sys_times() bogus until jiffies >= 0.
, Chris Friesen
, (Thu Nov 8, 10:42 am)
Re: compat_sys_times() bogus until jiffies >= 0.
, Ulrich Drepper
, (Fri Nov 9, 2:20 pm)
Re: compat_sys_times() bogus until jiffies >= 0.
, Michael Kerrisk
, (Thu Dec 20, 7:36 am)
Re: compat_sys_times() bogus until jiffies >= 0.
, David Miller
, (Thu Dec 20, 7:51 am)
Re: compat_sys_times() bogus until jiffies >= 0.
, Andi Kleen
, (Fri Dec 21, 8:42 pm)
Re: compat_sys_times() bogus until jiffies >= 0.
, David Miller
, (Fri Dec 21, 9:41 pm)
Re: compat_sys_times() bogus until jiffies >= 0.
, Andi Kleen
, (Fri Dec 21, 9:49 pm)
Re: compat_sys_times() bogus until jiffies >= 0.
, David Miller
, (Fri Dec 21, 9:45 pm)
Re: compat_sys_times() bogus until jiffies >= 0.
, Andi Kleen
, (Fri Dec 21, 9:53 pm)
Re: compat_sys_times() bogus until jiffies >= 0.
, David Miller
, (Sat Dec 22, 12:36 am)
Re: compat_sys_times() bogus until jiffies >= 0.
, Andi Kleen
, (Sat Dec 22, 8:47 am)
Re: compat_sys_times() bogus until jiffies >= 0.
, Denys Vlasenko
, (Thu Nov 8, 3:25 pm)
Re: compat_sys_times() bogus until jiffies >= 0.
, David Miller
, (Wed Nov 7, 8:50 pm)
Re: compat_sys_times() bogus until jiffies >= 0.
, Andrew Morton
, (Wed Nov 7, 9:13 pm)
Navigation
Create content
Mailing list archives
Recent posts
Popular discussions
linux-kernel
:
Greg KH
[GIT PATCH] driver core patches against 2.6.24
debian developer
Re: Dual-Licensing Linux Kernel with GPL V2 and GPL V3
Vu Pham
Re: [Scst-devel] Integration of SCST in the mainstream Linux kernel
Adrian Bunk
Re: Linux 2.6.21
git
:
linux-netdev
:
Gerrit Renker
[PATCH 15/37] dccp: Set per-connection CCIDs via socket options
Jarek Poplawski
[PATCH] pkt_sched: Destroy gen estimators under rtnl_lock().
Radu Rendec
Endianness problem with u32 classifier hash masks
Benjamin Herrenschmidt
[PATCH 0/11] ibm_newemac: Candidate patches for 2.6.25
openbsd-misc
:
Colocation donated by:
Who's online
There are currently
1 user
and
816 guests
online.
Online users
jraval618
Syndicate