On Mon, 20 Apr 2009, Chris Friesen wrote: > Linus Torvalds wrote: > > On Thu, 16 Apr 2009, Chris Friesen wrote: > > > I'm okay with that. The problem causes some backwards compatibility > > > problems > > > with existing apps that get confused by the large "offset" number. The > > > fix is > > > going to cause problems too, but in a different way. > > > > > > We'll work around it. > > > > If you have actual apps that care, that's a different issue. Yes, that's what I told Chris too. But asked for more info, suspecting his app was already broken. > > > > We do try to bend over backwards on ABI issues if it really is noticeable > > for applications. Now, in this case, if you can just fix your app to not > > care (because it really was badly written in the first place to even > > notice), then that is the _much_ superior solution. > > Yep, we can fix the app to ignore that field for anonymous mappings. > > > Although I don't really even see what we can sanely do except for the 0 > > case. We could put the virtual address in there instead of zero (I forget > > what old kernels used to do - whatever magic value the anonymous mappings > > got, it wasn't really designed as an important value in its own right, it > > was designed to trigger the "we can merge these vma's" logic. > > For anonymous mappings, the older kernels put the starting address of the VMA > (from the point of view of the app) as the offset. Until the recent change, > new kernels still did this for most VMAs, but the stack offset was a 64-bit > value with no obvious relation to the VMA start address. No, what they put there was something that in most cases matched the starting address of the VMA; but try moving that VMA with mremap (and an old /proc/<pid>/maps!) and you'll see that the "offset" remained unchanged even when the starting address of the VMA was changed. (The offset remaining constant so that rmap can locate the VMA's pages and unmap them, despite their being mapped at different virtual addresses in parent and child after a move in one of them.) ... so I think your app was indeed already broken, wasn't it? It's also unclear why you'd want to use the offset field for the starting address of the VMA, when /proc/<pid>/maps already shows the starting address of the VMA. I think you've more to tell us! Hugh _______________________________________________ linux-pm mailing list linux-pm@xxxxxxxxxxxxxxxxxxxxxxxxxx https://lists.linux-foundation.org/mailman/listinfo/linux-pm