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/
- References:
- Re: [PATCH 10 of 20] ipath - support for userspace apps using core driver
- From: Roland Dreier <[email protected]>
- Re: [PATCH 10 of 20] ipath - support for userspace apps using core driver
- From: "Bryan O'Sullivan" <[email protected]>
- Re: [PATCH 10 of 20] ipath - support for userspace apps using core driver
- From: Roland Dreier <[email protected]>
- Re: [PATCH 10 of 20] ipath - support for userspace apps using core driver
- From: "Bryan O'Sullivan" <[email protected]>
- Re: [PATCH 10 of 20] ipath - support for userspace apps using core driver
- From: Andrew Morton <[email protected]>
- Re: [PATCH 10 of 20] ipath - support for userspace apps using core driver
- From: "Bryan O'Sullivan" <[email protected]>
- Re: [PATCH 10 of 20] ipath - support for userspace apps using core driver
- From: Roland Dreier <[email protected]>
- Re: [PATCH 10 of 20] ipath - support for userspace apps using core driver
- From: "Bryan O'Sullivan" <[email protected]>
- Re: [PATCH 10 of 20] ipath - support for userspace apps using core driver
- From: Roland Dreier <[email protected]>
- Re: [PATCH 10 of 20] ipath - support for userspace apps using core driver
- From: "Bryan O'Sullivan" <[email protected]>
- Re: [PATCH 10 of 20] ipath - support for userspace apps using core driver
- From: Andrew Morton <[email protected]>
- Re: [PATCH 10 of 20] ipath - support for userspace apps using core driver
- From: "Bryan O'Sullivan" <[email protected]>
- Re: [PATCH 10 of 20] ipath - support for userspace apps using core driver
- From: Andrew Morton <[email protected]>
- Re: [PATCH 10 of 20] ipath - support for userspace apps using core driver
- From: Hugh Dickins <[email protected]>
- Remapping pages mapped to userspace (was: [PATCH 10 of 20] ipath - support for userspace apps using core driver)
- From: Roland Dreier <[email protected]>
- Re: Remapping pages mapped to userspace (was: [PATCH 10 of 20] ipath - support for userspace apps using core driver)
- From: Hugh Dickins <[email protected]>
- Re: Remapping pages mapped to userspace (was: [PATCH 10 of 20] ipath - support for userspace apps using core driver)
- From: "Bryan O'Sullivan" <[email protected]>
- Re: Remapping pages mapped to userspace (was: [PATCH 10 of 20] ipath - support for userspace apps using core driver)
- From: Linus Torvalds <[email protected]>
- Re: [PATCH 10 of 20] ipath - support for userspace apps using core driver
- Prev by Date: Re: [PATCH 001/001] PCI: PCI quirk for Asus A8V and A8V Deluxe motherboards
- Next by Date: Re: [Xen-devel] [RFC] VMI for Xen?
- Previous by thread: Re: Remapping pages mapped to userspace (was: [PATCH 10 of 20] ipath - support for userspace apps using core driver)
- Next by thread: Re: Remapping pages mapped to userspace
- Index(es):