Re: Remapping pages mapped to userspace (was: [PATCH 10 of 20] ipath - support for userspace apps using core driver)

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, 17 Mar 2006, Linus Torvalds wrote:
> 
> Anyway, zap_page_range() would do what you want, but it's not exported, 
> and I'm not convinced it's even something we want to export. You can only 
> zap a page range from within the context of the zappee, not from an 
> external module/driver.
> 
> [ Maybe it works if somebody else calls it, maybe it doesn't. I wouldn't 
>   bet on it, and more importantly, I can pretty much _guarantee_ that a 
>   driver will get the "struct mm_struct" reference counting wrong. ]

But vmtruncate or unmap_mapping_range is quite used to operating on
whatever mm's have mapped the file, so should be a safe route.  Except
here it's a device mapped VM_PFNMAP, so there might prove to be some
gotchas.  I'd be happy to make a nopage fault on VM_PFNMAP give SIGBUS,
for sensible behaviour after the "truncate" - but recent history warns
we're liable then to discover some app expecting otherwise ;)

Hugh
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Stuff]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]     [Linux Resources]
  Powered by Linux