- Remove noop VFS stubs. The VFS does that on a NULL pointer anyways.
- Fix timer handler prototype to be correct
- Comment ugly SMP race I didn't fix.
Signed-off-by: Andi Kleen <redacted>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
- Remove noop VFS stubs. The VFS does that on a NULL pointer anyways.
- Fix timer handler prototype to be correct
- Comment ugly SMP race I didn't fix.
Signed-off-by: Andi Kleen <redacted>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Applied to net-next-2.6
I'm hoping someone takes care of the SMP race. I think the timers
need all reference counting similar to other network objects to
handle this cleanly.
It might be a good idea to mark it BROKEN_ON_SMP in the meantime.
-Andi
--
ak@linux.intel.com
- Remove noop VFS stubs. The VFS does that on a NULL pointer anyways.
- Fix timer handler prototype to be correct
- Comment ugly SMP race I didn't fix.
Signed-off-by: Andi Kleen <redacted>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Applied to net-next-2.6
I'm hoping someone takes care of the SMP race. I think the timers
need all reference counting similar to other network objects to
handle this cleanly.
Yes I already have some idea without refcounting, checking how much time is left
if it is more as some treshhold (maybe 2 or 10 jiffies) delete the timer,
if not mark it for deletion only and delete it during the run function without
triggering the device. In the race case it would trigger the device too but
this is not critical.
Another easier implementation could mark it only, without trying to delete
it imediately. But in this case unneeded timers would hang around (on big busy PBX
boxes this can be some 100) for some time.
What do you think ?
It might be a good idea to mark it BROKEN_ON_SMP in the meantime.
No really needed, normally the timers deleted long time before running out
or never so it should never see such a race, maybe if the application is
aborted and cleanup all timers this could happen but also this should be no
normal case, since usually you do not kill a PBX if any connections are
active.
Yes it could be used to do some deny on service kind of attack, so it should
be fixed at all.
--
Karsten Keil
SuSE Labs
ISDN and VOIP development
SUSE LINUX Products GmbH, Maxfeldstr.5 90409 Nuernberg, GF: Markus Rex, HRB 16746 (AG Nuernberg)
But this also shows that mISDN is kinda stuck in a different century.
Doing __module_get(THIS_MODULE) at the end of ->open is utterly racy,
it really needs to set a owner field in file_operations and rip this
cruft out.
Btw, can anyone explain WTF this timerdev module is doing? It's not
using any functionality from the rest of mISDN, it's not exporting
any functionality to it either but just provides a really awkward way
to expose dumb timers to userspace. What does it provide that the
normal timer syscalls can't provide?
From: Christoph Hellwig <hch@infradead.org> Date: 2008-09-23 11:49:47
On Tue, Sep 23, 2008 at 08:34:07AM +0200, Karsten Keil wrote:
No really needed, normally the timers deleted long time before running out
or never so it should never see such a race, maybe if the application is
aborted and cleanup all timers this could happen but also this should be no
normal case, since usually you do not kill a PBX if any connections are
active.
Yes it could be used to do some deny on service kind of attack, so it should
be fixed at all.
All these timers are completely user controller and non-prviliegued. So
this _is_ a serious issue. In fact I think we should just rip out this
whole module, it's a really useless duplicate timer interface.
Gotta love merging unreviewed code.
But this also shows that mISDN is kinda stuck in a different century.
Doing __module_get(THIS_MODULE) at the end of ->open is utterly racy,
it really needs to set a owner field in file_operations and rip this
cruft out.
Btw, can anyone explain WTF this timerdev module is doing? It's not
using any functionality from the rest of mISDN, it's not exporting
any functionality to it either but just provides a really awkward way
to expose dumb timers to userspace. What does it provide that the
normal timer syscalls can't provide?
This version only makes the programing of upper ISDN layers easier,
you only need to watch /dev/mISDNtimer together with the sockets in one
select call.
The next version will have a option to synchronise the timer with
the ISDN hardware clock which would avoid additional jitter if you need to
bridge channels in software.
--
Karsten Keil
SuSE Labs
ISDN and VOIP development
SUSE LINUX Products GmbH, Maxfeldstr.5 90409 Nuernberg, GF: Markus Rex, HRB 16746 (AG Nuernberg)
This is wrong. no llseek means we use default_llseek, which is
different from returning -ESPIPE.
so.. this?
Hmm actually on double checking it's really needed, sorry.
Yes, unfortunately the only way it's cleared currently is through using
nonseekable_open, but I've started preparing a war plan to sort this whole
mess out.
This is wrong. no llseek means we use default_llseek, which is
different from returning -ESPIPE.
so.. this?
Hmm actually on double checking it's really needed, sorry.
Yes, unfortunately the only way it's cleared currently is through using
nonseekable_open, but I've started preparing a war plan to sort this whole
mess out.
Yes it would be much more logical if FMODE_SEEK was cleared on character devices
by default. That is what I assumed with the original patch.
-Andi
--
ak@linux.intel.com
From: Christoph Hellwig <hch@infradead.org> Date: 2008-09-23 16:48:05
On Tue, Sep 23, 2008 at 06:46:52PM +0200, Andi Kleen wrote:
quoted
Yes, unfortunately the only way it's cleared currently is through using
nonseekable_open, but I've started preparing a war plan to sort this whole
mess out.
Yes it would be much more logical if FMODE_SEEK was cleared on character devices
by default. That is what I assumed with the original patch.
Actually I'd prefer to not have by default at all. While all
filesystems should support seeking they also can easily set a .llseek
instead of the current horrible default. llseek is the only file
operation with a default (and a really bad one), and I'd prefer it not
to have for consistency.
But this also shows that mISDN is kinda stuck in a different century.
Doing __module_get(THIS_MODULE) at the end of ->open is utterly racy,
it really needs to set a owner field in file_operations and rip this
cruft out.
Btw, can anyone explain WTF this timerdev module is doing? It's not
using any functionality from the rest of mISDN, it's not exporting
any functionality to it either but just provides a really awkward way
to expose dumb timers to userspace. What does it provide that the
normal timer syscalls can't provide?
This version only makes the programing of upper ISDN layers easier,
you only need to watch /dev/mISDNtimer together with the sockets in one
select call.
sys_timerfd_create() can do this?
The next version will have a option to synchronise the timer with
the ISDN hardware clock which would avoid additional jitter if you need to
bridge channels in software.
hrm. If that's really really useful and actually works then I guess it
might then be justifiable.
From: David Miller <davem@davemloft.net> Date: 2008-10-13 04:00:55
From: Andrew Morton <akpm@linux-foundation.org>
Date: Sun, 12 Oct 2008 19:11:13 -0700
quoted
On Sun, 12 Oct 2008 07:05:10 -0400 Christoph Hellwig [off-list ref] wrote:
The bogus version which removes ->llseek just got into Linus' tree..
Well I still have this queued:
From: Andrew Morton <akpm@linux-foundation.org>
Cc: Andi Kleen <redacted>
Cc: Karsten Keil <redacted>
Cc: Christoph Hellwig <hch@lst.de>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Andrew, want me to such this into my net-2.6 tree?
From: Andrew Morton <akpm@linux-foundation.org> Date: 2008-10-13 11:56:54
On Sun, 12 Oct 2008 21:00:31 -0700 (PDT) David Miller [off-list ref] wrote:
From: Andrew Morton <akpm@linux-foundation.org>
Date: Sun, 12 Oct 2008 19:11:13 -0700
quoted
quoted
On Sun, 12 Oct 2008 07:05:10 -0400 Christoph Hellwig [off-list ref] wrote:
The bogus version which removes ->llseek just got into Linus' tree..
Well I still have this queued:
From: Andrew Morton <akpm@linux-foundation.org>
Cc: Andi Kleen <redacted>
Cc: Karsten Keil <redacted>
Cc: Christoph Hellwig <hch@lst.de>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Andrew, want me to such this into my net-2.6 tree?
yes please. I'll send it over with a slight changelog.