On 04/02/2014 01:13 PM, John Stultz wrote: > On 04/02/2014 12:47 PM, Johannes Weiner wrote: > >> It's really nothing but a use-after-free bug that has consequences for >> no-one but the faulty application. The thing that IS new is that even >> a read is enough to corrupt your data in this case. >> >> MADV_REVIVE could return 0 if all pages in the specified range were >> present, -Esomething if otherwise. That would be semantically sound >> even if userspace messes up. > So its semantically more of just a combined mincore+dirty operation.. > and nothing more? > > What are other folks thinking about this? Although I don't particularly > like it, I probably could go along with Johannes' approach, forgoing > SIGBUS for zero-fill and adapting the semantics that are in my mind a > bit stranger. This would allow for ashmem-like style behavior w/ the > additional write-clears-volatile-state and read-clears-purged-state > constraints (which I don't think would be problematic for Android, but > am not totally sure). > > But I do worry that these semantics are easier for kernel-mm-developers > to grasp, but are much much harder for application developers to > understand. So I don't feel like we've gotten enough feedback for consensus here. Thus, to at least address other issues pointed out at LSF-MM, I'm going to shortly send out a v13 of the patchset which keeps with the previous approach instead of adopting Johannes' suggested approach here. If folks do prefer Johannes' approach, please speak up as I'm willing to give it a whirl, despite my concerns about the subtle semantics. thanks -john -- To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to majordomo@xxxxxxxxx. For more info on Linux MM, see: http://www.linux-mm.org/ . Don't email: <a href=mailto:"dont@xxxxxxxxx"> email@xxxxxxxxx </a>