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: <20201016131112.GJ22589@dhcp22.suse.cz>
Date:   Fri, 16 Oct 2020 15:11:12 +0200
From:   Michal Hocko <mhocko@...e.com>
To:     osalvador@...e.de
Cc:     Shijie Luo <luoshijie1@...wei.com>, akpm@...ux-foundation.org,
        linux-mm@...ck.org, linux-kernel@...r.kernel.org,
        linmiaohe@...wei.com, linfeilong@...wei.com
Subject: Re: [PATCH] mm: fix potential pte_unmap_unlock pte error

On Fri 16-10-20 14:37:08, osalvador@...e.de wrote:
> On 2020-10-16 14:31, Michal Hocko wrote:
> > I do not like the fix though. The code is really confusing. Why should
> > we check for flags in each iteration of the loop when it cannot change?
> > Also why should we take the ptl lock in the first place when the look is
> > broken out immediately?
> 
> About checking the flags:
> 
> https://lore.kernel.org/linux-mm/20190320081643.3c4m5tec5vx653sn@d104.suse.de/#t

This didn't really help. Maybe the code was different back then but
right now the code doesn't make much sense TBH. The only reason to check
inside the loop would be to have a completely unpopulated address range.
Note about MPOL_MF_STRICT is not checked explicitly and I do not see how
it makes any difference.

Anyway this function would benefit from some uncluttering!

-- 
Michal Hocko
SUSE Labs

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ