login
Login
/
Register
Search
Search this site:
Forums
News
Blogs
Features
Site
Home
»
Mailing list archives
»
linux-kernel
»
2007
»
November
»
8
Re: compat_sys_times() bogus until jiffies >= 0.
view
thread
Previous message: [
thread
] [
date
] [
author
]
Next message: [
thread
] [
date
] [
author
]
[view in full thread]
From: Denys Vlasenko
Subject:
Re: compat_sys_times() bogus until jiffies >= 0.
Date: Thursday, November 8, 2007 - 12: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, 3:47 pm)
Re: compat_sys_times() bogus until jiffies >= 0.
, Andrew Morton
, (Wed Nov 7, 4:28 pm)
Re: compat_sys_times() bogus until jiffies >= 0.
, Andrew Morton
, (Wed Nov 7, 5:18 pm)
Re: compat_sys_times() bogus until jiffies >= 0.
, David Miller
, (Wed Nov 7, 5:50 pm)
Re: compat_sys_times() bogus until jiffies >= 0.
, Andreas Schwab
, (Wed Nov 7, 5:54 pm)
Re: compat_sys_times() bogus until jiffies >= 0.
, Andrew Morton
, (Wed Nov 7, 6:13 pm)
Re: compat_sys_times() bogus until jiffies >= 0.
, Andrew Morton
, (Wed Nov 7, 6:17 pm)
Re: compat_sys_times() bogus until jiffies >= 0.
, Paul Mackerras
, (Wed Nov 7, 6:53 pm)
Re: compat_sys_times() bogus until jiffies >= 0.
, David Miller
, (Wed Nov 7, 7:09 pm)
Re: compat_sys_times() bogus until jiffies >= 0.
, Andrew Morton
, (Wed Nov 7, 8:07 pm)
Re: compat_sys_times() bogus until jiffies >= 0.
, David Miller
, (Wed Nov 7, 8:13 pm)
Re: compat_sys_times() bogus until jiffies >= 0.
, Paul Mackerras
, (Wed Nov 7, 9:59 pm)
Re: compat_sys_times() bogus until jiffies >= 0.
, Paul Mackerras
, (Wed Nov 7, 10:15 pm)
Re: compat_sys_times() bogus until jiffies >= 0.
, Andrew Morton
, (Wed Nov 7, 10:20 pm)
Re: compat_sys_times() bogus until jiffies >= 0.
, Paul Mackerras
, (Wed Nov 7, 10:36 pm)
Re: compat_sys_times() bogus until jiffies >= 0.
, David Brown
, (Wed Nov 7, 11:00 pm)
Re: compat_sys_times() bogus until jiffies >= 0.
, Andrew Morton
, (Wed Nov 7, 11:12 pm)
Re: compat_sys_times() bogus until jiffies >= 0.
, David Miller
, (Wed Nov 7, 11:22 pm)
Re: compat_sys_times() bogus until jiffies >= 0.
, David Miller
, (Wed Nov 7, 11:24 pm)
Re: compat_sys_times() bogus until jiffies >= 0.
, David Miller
, (Wed Nov 7, 11:25 pm)
Re: compat_sys_times() bogus until jiffies >= 0.
, Andrew Morton
, (Thu Nov 8, 12:09 am)
Re: compat_sys_times() bogus until jiffies >= 0.
, David Miller
, (Thu Nov 8, 12:14 am)
Re: compat_sys_times() bogus until jiffies >= 0.
, Paul Mackerras
, (Thu Nov 8, 1:53 am)
Re: compat_sys_times() bogus until jiffies >= 0.
, Andreas Schwab
, (Thu Nov 8, 3:20 am)
Re: compat_sys_times() bogus until jiffies >= 0.
, Chris Friesen
, (Thu Nov 8, 7:42 am)
Re: compat_sys_times() bogus until jiffies >= 0.
, Denys Vlasenko
, (Thu Nov 8, 12:25 pm)
Re: compat_sys_times() bogus until jiffies >= 0.
, Denys Vlasenko
, (Thu Nov 8, 12:27 pm)
Re: compat_sys_times() bogus until jiffies >= 0.
, Ulrich Drepper
, (Fri Nov 9, 11:20 am)
Re: compat_sys_times() bogus until jiffies >= 0.
, Michael Kerrisk
, (Thu Dec 20, 4:36 am)
Re: compat_sys_times() bogus until jiffies >= 0.
, David Miller
, (Thu Dec 20, 4:51 am)
Re: compat_sys_times() bogus until jiffies >= 0.
, Andi Kleen
, (Fri Dec 21, 5:42 pm)
Re: compat_sys_times() bogus until jiffies >= 0.
, David Miller
, (Fri Dec 21, 6:41 pm)
Re: compat_sys_times() bogus until jiffies >= 0.
, Andi Kleen
, (Fri Dec 21, 6:49 pm)
Re: compat_sys_times() bogus until jiffies >= 0.
, Andi Kleen
, (Fri Dec 21, 6:53 pm)
Re: compat_sys_times() bogus until jiffies >= 0.
, David Miller
, (Fri Dec 21, 9:36 pm)
Re: compat_sys_times() bogus until jiffies >= 0.
, Andi Kleen
, (Sat Dec 22, 5:47 am)
Navigation
Create content
Mailing list archives
Recent posts
Popular discussions
linux-kernel
:
Rafael J. Wysocki
[Bug #16136] Linux 2.6.34 causes system lockup on Compaq Presario 2200 Laptop
Joerg Roedel
Re: [patch] dma-debug: off by one issue
Tetsuo Handa
Re: [AppArmor #7 0/13] AppArmor security module
Pekka Enberg
Re: BUG in free_block (tainted)
Jakub Narebski
Re: [PATCH] gitweb: Fix shortlog only showing HEAD revision.
git
:
Christian Stimming
git-gui: Fix broken revert confirmation.
Johannes Schindelin
Re: [PATCH 2/2] git-svn: support fetch with autocrlf on
Mark Burton
Re: [PATCH] builtin-branch: highlight current remote branches with an asterisk
Junio C Hamano
Re: git-svnimport
Junio C Hamano
Re: [PATCH 6/6] Teach core object handling functions about gitlinks
linux-netdev
:
Nick Piggin
Re: Kernel WARNING: at net/core/dev.c:1330 __netif_schedule+0x2c/0x98()
Daniel Lezcano
getsockopt(TCP_DEFER_ACCEPT) value change
David Miller
Re: 2.6.27.18: bnx2/tg3: BUG: "scheduling while atomic" trying to ifenslave a seco...
Amit Kumar Salecha
[PATCH NEXT 10/10] qlcnic: add cksum flag
Patrick McHardy
Re: [PATCH RESEND 1/3] netfilter: xtables: inclusion of xt_condition
git-commits-head
:
Linux Kernel Mailing List
ath9k_htc: Allocate URBs properly
Linux Kernel Mailing List
ath9k: Added get_survey callback in order to get channel noise
Linux Kernel Mailing List
ALSA: snd-usb-caiaq: Do not expose hardware input mode 0 of A4DJ
Linux Kernel Mailing List
cpumask: make irq_set_affinity() take a const struct cpumask
Linux Kernel Mailing List
V4L/DVB (9041): Add support YUAN High-Tech STK7700D (1164:1f08)
openbsd-misc
:
Conor
Re: RFID Reader
Josh Grosse
ssh/sshd challenge-response seems to have stopped working in -current
Stuart Henderson
Re: SquidGuard problem
Henning Brauer
Re: 3ware hardware raid support?
Ryan McBride
Re: Packets Per Second Limit?
Colocation donated by:
Syndicate