Thread (13 messages) flat view 13 messages, 5 authors, 2014-02-10

Re: [PATCH 1/2] mm/vmalloc: export is_vmalloc_or_module_addr

From: Richard Yao <hidden>
Date: 2014-02-08 23:39:16
Also in: lkml

On Feb 8, 2014, at 5:24 PM, Linus Torvalds [off-list ref] wrote:
On Sat, Feb 8, 2014 at 12:44 PM, Richard Yao [off-list ref] wrote:
quoted
However, is_vmalloc_addr() only applies to the vmalloc region. While all
architectures load kernel modules into virtual memory (to my knowledge),
some architectures do not load them into the vmalloc region.
So?

People shouldn't do IO to module data, so who cares if something is a
module address or not?

The thing is, even module *loading* doesn't do IO to the magic module
addresses - it loads the module data into regular vmalloc space, and
then copies it into the final location separately.

And no module should ever do any IO on random static data (and
certainly not on code).

So there is _zero_ reason for a driver or a filesystem to use
is_vmalloc_or_module_addr(). It's just not a valid question to ask.

If somebody uses module data/code addresses, we're *better* off with a
oops or other nasty behavior than to try to make it "work".

           Linus
I will modify this to use is_vmalloc_addr() and send it back to the appropriate subsystem maintainer(s). Thank-you for taking the time to write that explanation.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help