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: <57D1703E.4070504@intel.com>
Date:   Thu, 8 Sep 2016 07:05:50 -0700
From:   Dave Hansen <dave.hansen@...el.com>
To:     Xiao Guangrong <guangrong.xiao@...ux.intel.com>,
        pbonzini@...hat.com, akpm@...ux-foundation.org, mhocko@...e.com,
        dan.j.williams@...el.com
Cc:     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
Subject: Re: [PATCH] Fix region lost in /proc/self/smaps

On 09/07/2016 08:36 PM, Xiao Guangrong wrote:>> The user will see two
VMAs in their output:
>>
>>     A: 0x1000->0x2000
>>     C: 0x1000->0x3000
>>
>> Will it confuse them to see the same virtual address range twice?  Or is
>> there something preventing that happening that I'm missing?
>>
> 
> You are right. Nothing can prevent it.
> 
> However, it is not easy to handle the case that the new VMA overlays
> with the old VMA
> already got by userspace. I think we have some choices:
> 1: One way is completely skipping the new VMA region as current kernel
> code does but i
>    do not think this is good as the later VMAs will be dropped.
> 
> 2: show the un-overlayed portion of new VMA. In your case, we just show
> the region
>    (0x2000 -> 0x3000), however, it can not work well if the VMA is a new
> created
>    region with different attributions.
> 
> 3: completely show the new VMA as this patch does.
> 
> Which one do you prefer?

I'd be willing to bet that #3 will break *somebody's* tooling.
Addresses going backwards is certainly screwy.  Imagine somebody using
smaps to search for address holes and doing hole_size=0x1000-0x2000.

#1 can lies about there being no mapping in place where there there may
have _always_ been a mapping and is very similar to the bug you were
originally fixing.  I think that throws it out.

#2 is our best bet, I think.  It's unfortunately also the most code.
It's also a bit of a fib because it'll show a mapping that never
actually existed, but I think this is OK.  I'm not sure what the
downside is that you're referring to, though.  Can you explain?

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ