Re: [PATCH v2] mm, proc: Fix region lost in /proc/self/smaps

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

 



On 09/13/2016 07:59 AM, Oleg Nesterov wrote:
> On 09/12, Michal Hocko wrote:
>> > Considering how this all can be tricky and how partial reads can be
>> > confusing and even misleading I am really wondering whether we
>> > should simply document that only full reads will provide a sensible
>> > results.
> I agree. I don't even understand why this was considered as a bug.
> Obviously, m_stop() which drops mmap_sep should not be called, or
> all the threads should be stopped, if you want to trust the result.

There was a mapping at a given address.  That mapping did not change, it
was not split, its attributes did not change.  But, it didn't show up
when reading smaps.  Folks _actually_ noticed this in a test suite
looking for that address range in smaps.

IOW, we had goofy kernel behavior, and it broke a reasonable test
program.  The test program just used fgets() to read into a fixed-length
buffer, which is a completely normal thing to do.

To get "sensible results", doesn't userspace have to somehow know in
advance how many bytes of data a given VMA will generate in smaps output?
--
To unsubscribe from this list: send the line "unsubscribe kvm" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [KVM ARM]     [KVM ia64]     [KVM ppc]     [Virtualization Tools]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite Questions]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux