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] [day] [month] [year] [list]
Date:   Thu, 16 Mar 2023 20:16:29 +0100
From:   Nils Hartmann <nils1hartmann@...il.com>
To:     David Hildenbrand <david@...hat.com>
Cc:     linux-mm@...ck.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] Using MAP_SHARE_VALIDATE in mmap without fd

On Thu, Mar 16, 2023 at 04:28:21PM +0100, David Hildenbrand wrote:
> On 10.03.23 18:16, Nils Hartmann wrote:
> > Hey,
> > When used without a file pointer, EINVAL is returned. Is there a reason for this?
>
> You mean, using it with shared anonymous memory? (MAP_SHARED|MAP_ANON)
> I assume you mean "file descriptor" not "file pointer".

Yup thats what I meant.

> The only reason MAP_SHARED_VALIDATE was introduced was due to MAP_SYNC, only
> required for DAX. DAX does not apply to shared anonymous memory.

Yeah I heard about it being introduced with MAP_SYNC.
But since the manpage from mmap specifically says:
'MAP_SHARED_VALIDATE provides the same behaviour as MAP_SHARED',
I didn't think it would make a difference

> I guess nobody cared/cares.
> Question is if we want to update the implementation (there has to be a good
> reason IMHO) or simply update the man page, stating that MAP_SHARED_VALIDATE
> is not supported for MAP_ANON.

The only reason I can come up with, is naming consistency.
But it's really a non-issue und updating the man page is definitly
the saner option.

> --
> Thanks,
>
> David / dhildenb
>

Best Regards,

Nils

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ