Skip to contentSkip to conversation

Grant Tables & mm.c

DISCUSSION Mark Williamson 1 participant 1 message Jul 6, 2007 1 message not in the archive

lore
Share & tools
lore
#1 lore raw
In reply to a message not in the archive
Quoted 4 lines

" Linux tends to zap userspace page mappings quite cheerfully unless you do something to stop it, could this be your problem?"

What does this mean exactly??

Linux "zaps" mappings when it removes them from pagetables. Really this corresponds to zeroing a pte corresponding to that mapping.

Unless you do something to stop the Linux mm system from treating the grant table mappins like "normal" RAM, it will eventually want to simply zero them. This will break for grant mappings, since it is not a permitted means of unmapping granted memory.

Quoted 1 line

Any way i can prevent it from happening?

It depends on what you're trying to do...

Have you looked at the userspace grantables driver in our Linux tree? This provides a device for mapping granted memory safely into userspace, handling cleanup correctly. Even if that's not directly useful, maybe you can find some code in there that'll help you.

Cheers,
Mark

Signature · 4 lines
Dave: Just a question. What use is a unicyle with no seat?  And no pedals!
Mark: To answer a question with a question: What use is a skateboard?
Dave: Skateboards have wheels.
Mark: My wheel has a wheel!