lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <57D6C332.4000409@intel.com>
Date:   Mon, 12 Sep 2016 08:01:06 -0700
From:   Dave Hansen <dave.hansen@...el.com>
To:     Michal Hocko <mhocko@...nel.org>,
        Xiao Guangrong <guangrong.xiao@...ux.intel.com>
Cc:     pbonzini@...hat.com, akpm@...ux-foundation.org,
        dan.j.williams@...el.com, gleb@...nel.org, mtosatti@...hat.com,
        kvm@...r.kernel.org, linux-kernel@...r.kernel.org,
        stefanha@...hat.com, yuhuang@...hat.com, linux-mm@...ck.org,
        ross.zwisler@...ux.intel.com, Oleg Nesterov <oleg@...hat.com>
Subject: Re: [PATCH v2] mm, proc: Fix region lost in /proc/self/smaps

On 09/12/2016 05:54 AM, Michal Hocko wrote:
>> > In order to fix this bug, we make 'file->version' indicate the end address
>> > of current VMA
> Doesn't this open doors to another weird cases. Say B would be partially
> unmapped (tail of the VMA would get unmapped and reused for a new VMA.

In the end, this interface isn't about VMAs.  It's about addresses, and
we need to make sure that the _addresses_ coming out of it are sane.  In
the case that a VMA was partially unmapped, it doesn't make sense to
show the "new" VMA because we already had some output covering the
address of the "new" VMA from the old one.

> I am not sure we provide any guarantee when there are more read
> syscalls. Hmm, even with a single read() we can get inconsistent results
> from different threads without any user space synchronization.

Yeah, very true.  But, I think we _can_ at least provide the following
guarantees (among others):
1. addresses don't go backwards
2. If there is something at a given vaddr during the entirety of the
   life of the smaps walk, we will produce some output for it.

> So in other words isn't this fixing a bug by introducing a slightly
> different one while we are not really guaranteeing anything strong here?

Well, the (original) bug here _is_ pretty crummy.  It's not printing a
VMA, and that VMA was never touched.  It's just collateral damage from
the previous guy who got destroyed.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ