* You might need vmalloc_sync_all() @ 2007-05-01 4:26 Andi Kleen 2007-05-01 7:44 ` Russell King 0 siblings, 1 reply; 4+ messages in thread From: Andi Kleen @ 2007-05-01 4:26 UTC (permalink / raw) To: linux-arch Since someone mentioned again. Right now only x86 implements vmalloc_sync_all(). But iff: - Your module mappings might require a page fault calling C code in kernel - You got a pagefault notifier at the beginning of the page fault handler you risk a endless pagefault recursion with modular pagefault notifiers. vmalloc_sync_all should sync all the available mappings on notifier register so that the C pf handler is not called for module faults. Apparently at least ARM has this problem. If the kernel module fault is only assembler code without notifier (e.g. to reload a TLB) it is probably not needed. -Andi ^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: You might need vmalloc_sync_all() 2007-05-01 4:26 You might need vmalloc_sync_all() Andi Kleen @ 2007-05-01 7:44 ` Russell King 2007-05-01 11:37 ` Andi Kleen 0 siblings, 1 reply; 4+ messages in thread From: Russell King @ 2007-05-01 7:44 UTC (permalink / raw) To: Andi Kleen; +Cc: linux-arch On Tue, May 01, 2007 at 06:26:55AM +0200, Andi Kleen wrote: > > Since someone mentioned again. > > Right now only x86 implements vmalloc_sync_all(). But iff: > > - Your module mappings might require a page fault calling C > code in kernel Yes, just like x86. > - You got a pagefault notifier at the beginning of the page fault > handler What's this? > Apparently at least ARM has this problem. Is there a bug report? -- Russell King Linux kernel 2.6 ARM Linux - http://www.arm.linux.org.uk/ maintainer of: ^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: You might need vmalloc_sync_all() 2007-05-01 7:44 ` Russell King @ 2007-05-01 11:37 ` Andi Kleen 2007-05-01 19:20 ` Russell King 0 siblings, 1 reply; 4+ messages in thread From: Andi Kleen @ 2007-05-01 11:37 UTC (permalink / raw) To: Andi Kleen, linux-arch > What's this? Hmm, when I look now at your source I don't see one either. Maybe the reporter had a strangely patched kernel. Anyways, point stands -- for on demand module mappings you likely want vmalloc_sync_all to avoid nested faults. If you think you can handle the nested faults safely then ignore it @) > > > Apparently at least ARM has this problem. > > Is there a bug report? Forwarded it. -Andi ^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: You might need vmalloc_sync_all() 2007-05-01 11:37 ` Andi Kleen @ 2007-05-01 19:20 ` Russell King 0 siblings, 0 replies; 4+ messages in thread From: Russell King @ 2007-05-01 19:20 UTC (permalink / raw) To: linux-arch On Tue, May 01, 2007 at 01:37:33PM +0200, Andi Kleen wrote: > > What's this? > > Hmm, when I look now at your source I don't see one either. Maybe > the reporter had a strangely patched kernel. > > Anyways, point stands -- for on demand module mappings you likely > want vmalloc_sync_all to avoid nested faults. If you think you > can handle the nested faults safely then ignore it @) > > > > > > Apparently at least ARM has this problem. > > > > Is there a bug report? > > Forwarded it. For the record here, Andi forwarded the report about kprobes on ARM causing recursive page faults. In essence, my opinion is that the kprobes hook is probably incorrectly placed - probably far too early in the data exception processing. Since the data exception path is used for all sorts of things (missing page table entries, permission, ECC errors, hardware errors, alignment faults, etc) putting a call designed to intercept page faults early will pick up all this other noise. If it's placed in the same way as i386 then there shouldn't be an issue. Since I haven't seen the code which adds this hook to ARM, I can only speculate at the time being. So I feel that until the hook comes up as a candidate for merging, there's no point in fixing a problem in mainline which doesn't yet exist there. -- Russell King Linux kernel 2.6 ARM Linux - http://www.arm.linux.org.uk/ maintainer of: ^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2007-05-01 19:20 UTC | newest] Thread overview: 4+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2007-05-01 4:26 You might need vmalloc_sync_all() Andi Kleen 2007-05-01 7:44 ` Russell King 2007-05-01 11:37 ` Andi Kleen 2007-05-01 19:20 ` Russell King
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for NNTP newsgroup(s).