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: <20171016153756.GJ9762@quack2.suse.cz>
Date:   Mon, 16 Oct 2017 17:37:56 +0200
From:   Jan Kara <jack@...e.cz>
To:     Ross Zwisler <ross.zwisler@...ux.intel.com>
Cc:     Jan Kara <jack@...e.cz>, linux-fsdevel@...r.kernel.org,
        linux-ext4@...r.kernel.org, linux-xfs@...r.kernel.org,
        Christoph Hellwig <hch@...radead.org>,
        Dan Williams <dan.j.williams@...el.com>,
        Ted Tso <tytso@....edu>,
        "Darrick J. Wong" <darrick.wong@...cle.com>
Subject: Re: [PATCH 12/19] mm: Define MAP_SYNC and VM_SYNC flags

On Fri 13-10-17 13:44:44, Ross Zwisler wrote:
> On Wed, Oct 11, 2017 at 10:05:56PM +0200, Jan Kara wrote:
> > Define new MAP_SYNC flag and corresponding VMA VM_SYNC flag. As the
> > MAP_SYNC flag is not part of LEGACY_MAP_MASK, currently it will be
> > refused by all MAP_SHARED_VALIDATE map attempts and silently ignored for
> > everything else.
> > 
> > Signed-off-by: Jan Kara <jack@...e.cz>
> > ---
> >  arch/xtensa/include/uapi/asm/mman.h | 1 +
> >  fs/proc/task_mmu.c                  | 1 +
> >  include/linux/mm.h                  | 1 +
> >  include/linux/mman.h                | 3 ++-
> >  include/uapi/asm-generic/mman.h     | 1 +
> >  5 files changed, 6 insertions(+), 1 deletion(-)
> > 
> > diff --git a/arch/xtensa/include/uapi/asm/mman.h b/arch/xtensa/include/uapi/asm/mman.h
> > index ec597900eec7..b62a7ce166fb 100644
> > --- a/arch/xtensa/include/uapi/asm/mman.h
> > +++ b/arch/xtensa/include/uapi/asm/mman.h
> > @@ -56,6 +56,7 @@
> >  #define MAP_NONBLOCK	0x20000		/* do not block on IO */
> >  #define MAP_STACK	0x40000		/* give out an address that is best suited for process/thread stacks */
> >  #define MAP_HUGETLB	0x80000		/* create a huge page mapping */
> > +#define MAP_SYNC	0x100000	/* perform synchronous page faults for the mapping */
> 
> Why define MAP_SYNC for this one architecture, but not for the rest that have
> their own arch/*/include/uapi/asm/mman.h?  AFAIK xtensa doesn't support DAX,
> so has no need for MAP_SYNC?

Yeah, good point. I guess I'll just define it in asm-generic (which covers
x86 as well) and just define MAP_SYNC to 0 if not defined in linux/mman.h.
That should make the code compile and make sure userspace gets error if he
tries to use MAP_SYNC somehow on arch without its definition. Attached is a
new version of the patch.

> Other than this one question, this patch looks fine:
> 
> Reviewed-by: Ross Zwisler <ross.zwisler@...ux.intel.com>

Thanks.

								Honza
-- 
Jan Kara <jack@...e.com>
SUSE Labs, CR

View attachment "0001-mm-Define-MAP_SYNC-and-VM_SYNC-flags.patch" of type "text/x-patch" (3500 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ