Messages in this thread | ![/](/images/icornerl.gif) | | Date | Tue, 11 Nov 2003 10:17:47 -0800 (PST) | From | Linus Torvalds <> | Subject | Re: 2.6 /proc/interrupts fails on systems with many CPUs |
| |
On Tue, 11 Nov 2003, Erik Jacobson wrote: > > I'm looking for suggestions on how to fix this. I came up with one fix > that seems to work OK for ia64. I have attached it to this message. > I'm looking for advice on what should be proposed for the real fix.
This is not the real fix.
Allowing people to use up vmalloc() space by opening the /proc files would be a major DoS attack. Not worth it.
Instead, just make /proc/interrupts use the proper _sequence_ things, so that instead of trying to print out everything in one go, you have the "s_next()" thing to print them out one at a time. The seqfile interfaces will then do the rigth thing with blocking/caching, and you only need a single page.
Al - do we have some good documentation of how to use the seq-file interface?
In the meantime, without documentation, the best place to look is just at other examples. One such example would be the kernel/kallsyms.c case: see how it does s_start/s_show/s_next/s_stop (or /proc/slabinfo, or vmstat, or any number of them).
Linus
- 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/
| ![\](/images/icornerr.gif) |