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: <20190524214304.enntpu4tvzpyxzfe@ca-dmjordan1.us.oracle.com>
Date:   Fri, 24 May 2019 17:43:04 -0400
From:   Daniel Jordan <daniel.m.jordan@...cle.com>
To:     "Potyra, Stefan" <Stefan.Potyra@...ktrobit.com>
Cc:     "linux-mm@...ck.org" <linux-mm@...ck.org>,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
        "Jordan, Tobias" <Tobias.Jordan@...ktrobit.com>,
        akpm@...ux-foundation.org, vbabka@...e.cz, mhocko@...e.com,
        kirill.shutemov@...ux.intel.com, linux-api@...r.kernel.org
Subject: Re: [PATCH] mm: mlockall error for flag MCL_ONFAULT

[ Adding linux-api and some of the people who were involved in the
MCL_ONFAULT/mlock2/etc discussions.  Author of the Fixes patch appears to
have moved on. ]

On Wed, May 22, 2019 at 11:23:37AM +0000, Potyra, Stefan wrote:
> If mlockall() is called with only MCL_ONFAULT as flag,
> it removes any previously applied lockings and does
> nothing else.

The change looks reasonable.  Hard to imagine any application relies on it, and
they really shouldn't be if they are.  Debian codesearch turned up only a few
cases where stress-ng was doing this for unknown reasons[1] and this change
isn't gonna break those.  In this case I think changing the syscall's behavior
is justified.  

> This behavior is counter-intuitive and doesn't match the
> Linux man page.

I'd quote it for the changelog:

  For mlockall():

  EINVAL Unknown  flags were specified or MCL_ONFAULT was specified with‐
         out either MCL_FUTURE or MCL_CURRENT.

With that you can add

Reviewed-by: Daniel Jordan <daniel.m.jordan@...cle.com>

[1] https://sources.debian.org/src/stress-ng/0.09.50-1/stress-mlock.c/?hl=203#L203

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ