All of lore.kernel.org
 help / color / mirror / Atom feed
From: Christoph Hellwig <hch-jcswGhMUV9g@public.gmane.org>
To: Dan Williams <dan.j.williams-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
Cc: linux-mm-Bw31MaZKKs3YtjvyW6yDsg@public.gmane.org,
	jack-AlSwsSmVLrQ@public.gmane.org,
	linux-nvdimm-hn68Rpc1hR1g9hUCZPvPmw@public.gmane.org,
	David Airlie <airlied-cv59FeDIM0c@public.gmane.org>,
	linux-api-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	Takashi Iwai <tiwai-IBi9RG/b67k@public.gmane.org>,
	dri-devel-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org,
	Julia Lawall <julia.lawall-L2FTfq7BK8M@public.gmane.org>,
	luto-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org,
	Daniel Vetter
	<daniel.vetter-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>,
	akpm-de/tnXTf+JLsfHDXvbKv3WD2FQJk+8+b@public.gmane.org,
	torvalds-de/tnXTf+JLsfHDXvbKv3WD2FQJk+8+b@public.gmane.org,
	hch-jcswGhMUV9g@public.gmane.org
Subject: Re: [PATCH 1/2] vfs: add flags parameter to ->mmap() in 'struct file_operations'
Date: Thu, 31 Aug 2017 12:02:01 +0200	[thread overview]
Message-ID: <20170831100201.GC21443@lst.de> (raw)
In-Reply-To: <150413450036.5923.13851061508172314879.stgit-p8uTFz9XbKj2zm6wflaqv1nYeNYlB/vhral2JQCrhuEAvxtiuMwx3w@public.gmane.org>

> -static int ecryptfs_mmap(struct file *file, struct vm_area_struct *vma)
> +static int ecryptfs_mmap(struct file *file, struct vm_area_struct *vma,
> +			 unsigned long map_flags)
>  {
>  	struct file *lower_file = ecryptfs_file_to_lower(file);
>  	/*
> @@ -179,7 +180,7 @@ static int ecryptfs_mmap(struct file *file, struct vm_area_struct *vma)
>  	 */
>  	if (!lower_file->f_op->mmap)
>  		return -ENODEV;
> -	return generic_file_mmap(file, vma);
> +	return generic_file_mmap(file, vma, 0);

Shouldn't ecryptfs pass on the flags?  Same for coda_file_mmap and
shm_mmap.

> -static inline int call_mmap(struct file *file, struct vm_area_struct *vma)
> +static inline int call_mmap(struct file *file, struct vm_area_struct *vma,
> +			    unsigned long flags)
>  {
> -	return file->f_op->mmap(file, vma);
> +	return file->f_op->mmap(file, vma, flags);
>  }

It would be great to kill this pointless wrapper while we're at it.

WARNING: multiple messages have this Message-ID (diff)
From: Christoph Hellwig <hch@lst.de>
To: Dan Williams <dan.j.williams@intel.com>
Cc: Julia Lawall <julia.lawall@lip6.fr>,
	jack@suse.cz, linux-nvdimm@lists.01.org,
	David Airlie <airlied@linux.ie>,
	linux-api@vger.kernel.org, Takashi Iwai <tiwai@suse.com>,
	dri-devel@lists.freedesktop.org, linux-mm@kvack.org,
	luto@kernel.org, Daniel Vetter <daniel.vetter@intel.com>,
	akpm@linux-foundation.org, torvalds@linux-foundation.org,
	hch@lst.de
Subject: Re: [PATCH 1/2] vfs: add flags parameter to ->mmap() in 'struct file_operations'
Date: Thu, 31 Aug 2017 12:02:01 +0200	[thread overview]
Message-ID: <20170831100201.GC21443@lst.de> (raw)
In-Reply-To: <150413450036.5923.13851061508172314879.stgit@dwillia2-desk3.amr.corp.intel.com>

> -static int ecryptfs_mmap(struct file *file, struct vm_area_struct *vma)
> +static int ecryptfs_mmap(struct file *file, struct vm_area_struct *vma,
> +			 unsigned long map_flags)
>  {
>  	struct file *lower_file = ecryptfs_file_to_lower(file);
>  	/*
> @@ -179,7 +180,7 @@ static int ecryptfs_mmap(struct file *file, struct vm_area_struct *vma)
>  	 */
>  	if (!lower_file->f_op->mmap)
>  		return -ENODEV;
> -	return generic_file_mmap(file, vma);
> +	return generic_file_mmap(file, vma, 0);

Shouldn't ecryptfs pass on the flags?  Same for coda_file_mmap and
shm_mmap.

> -static inline int call_mmap(struct file *file, struct vm_area_struct *vma)
> +static inline int call_mmap(struct file *file, struct vm_area_struct *vma,
> +			    unsigned long flags)
>  {
> -	return file->f_op->mmap(file, vma);
> +	return file->f_op->mmap(file, vma, flags);
>  }

It would be great to kill this pointless wrapper while we're at it.
_______________________________________________
Linux-nvdimm mailing list
Linux-nvdimm@lists.01.org
https://lists.01.org/mailman/listinfo/linux-nvdimm

WARNING: multiple messages have this Message-ID (diff)
From: Christoph Hellwig <hch@lst.de>
To: Dan Williams <dan.j.williams@intel.com>
Cc: linux-mm@kvack.org, jack@suse.cz, linux-nvdimm@lists.01.org,
	David Airlie <airlied@linux.ie>,
	linux-api@vger.kernel.org, Takashi Iwai <tiwai@suse.com>,
	dri-devel@lists.freedesktop.org,
	Julia Lawall <julia.lawall@lip6.fr>,
	luto@kernel.org, Daniel Vetter <daniel.vetter@intel.com>,
	akpm@linux-foundation.org, torvalds@linux-foundation.org,
	hch@lst.de
Subject: Re: [PATCH 1/2] vfs: add flags parameter to ->mmap() in 'struct file_operations'
Date: Thu, 31 Aug 2017 12:02:01 +0200	[thread overview]
Message-ID: <20170831100201.GC21443@lst.de> (raw)
In-Reply-To: <150413450036.5923.13851061508172314879.stgit@dwillia2-desk3.amr.corp.intel.com>

> -static int ecryptfs_mmap(struct file *file, struct vm_area_struct *vma)
> +static int ecryptfs_mmap(struct file *file, struct vm_area_struct *vma,
> +			 unsigned long map_flags)
>  {
>  	struct file *lower_file = ecryptfs_file_to_lower(file);
>  	/*
> @@ -179,7 +180,7 @@ static int ecryptfs_mmap(struct file *file, struct vm_area_struct *vma)
>  	 */
>  	if (!lower_file->f_op->mmap)
>  		return -ENODEV;
> -	return generic_file_mmap(file, vma);
> +	return generic_file_mmap(file, vma, 0);

Shouldn't ecryptfs pass on the flags?  Same for coda_file_mmap and
shm_mmap.

> -static inline int call_mmap(struct file *file, struct vm_area_struct *vma)
> +static inline int call_mmap(struct file *file, struct vm_area_struct *vma,
> +			    unsigned long flags)
>  {
> -	return file->f_op->mmap(file, vma);
> +	return file->f_op->mmap(file, vma, flags);
>  }

It would be great to kill this pointless wrapper while we're at it.

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>

  parent reply	other threads:[~2017-08-31 10:02 UTC|newest]

Thread overview: 29+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-08-30 23:08 [PATCH 0/2] MAP_VALIDATE and mmap flags validation Dan Williams
2017-08-30 23:08 ` Dan Williams
2017-08-30 23:08 ` Dan Williams
     [not found] ` <150413449482.5923.1348069619036923853.stgit-p8uTFz9XbKj2zm6wflaqv1nYeNYlB/vhral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
2017-08-30 23:08   ` [PATCH 1/2] vfs: add flags parameter to ->mmap() in 'struct file_operations' Dan Williams
2017-08-30 23:08     ` Dan Williams
2017-08-30 23:08     ` Dan Williams
     [not found]     ` <150413450036.5923.13851061508172314879.stgit-p8uTFz9XbKj2zm6wflaqv1nYeNYlB/vhral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
2017-08-31 10:02       ` Christoph Hellwig [this message]
2017-08-31 10:02         ` Christoph Hellwig
2017-08-31 10:02         ` Christoph Hellwig
2017-09-01  0:54         ` Dan Williams
2017-08-30 23:08   ` [PATCH 2/2] mm: introduce MAP_VALIDATE, a mechanism for for safely defining new mmap flags Dan Williams
2017-08-30 23:08     ` Dan Williams
2017-08-30 23:08     ` Dan Williams
2017-08-31 10:03     ` Christoph Hellwig
2017-08-31 10:03       ` Christoph Hellwig
     [not found]       ` <20170831100359.GD21443-jcswGhMUV9g@public.gmane.org>
2017-09-01  1:01         ` Dan Williams
2017-09-01  1:01           ` Dan Williams
     [not found]           ` <CAPcyv4jvTB4Aiei1-fGybyJNopXQy9zADpnFcuRNdZCS4Mf1QQ-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2017-09-01  1:27             ` Linus Torvalds
2017-09-01  1:27               ` Linus Torvalds
     [not found]               ` <CA+55aFwsfUj1f41w8hqt9LN3-ajmJ=2AB1Nb6ZzwHgE1OKxGOw-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2017-09-01  1:40                 ` Dan Williams
2017-09-01  1:40                   ` Dan Williams
2017-09-01  1:40                   ` Dan Williams
2017-09-01  7:34                 ` Christoph Hellwig
2017-09-01  7:34                   ` Christoph Hellwig
2017-08-31 16:49     ` Linus Torvalds
2017-08-31 16:49       ` Linus Torvalds
     [not found]       ` <CA+55aFzo4oV87tVjEzx+cHVxfihm=31+fWtsdWow3AmfsdzJJw-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2017-08-31 21:31         ` Dan Williams
2017-08-31 21:31           ` Dan Williams
2017-08-31 21:31           ` Dan Williams

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20170831100201.GC21443@lst.de \
    --to=hch-jcswghmuv9g@public.gmane.org \
    --cc=airlied-cv59FeDIM0c@public.gmane.org \
    --cc=akpm-de/tnXTf+JLsfHDXvbKv3WD2FQJk+8+b@public.gmane.org \
    --cc=dan.j.williams-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org \
    --cc=daniel.vetter-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org \
    --cc=dri-devel-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org \
    --cc=jack-AlSwsSmVLrQ@public.gmane.org \
    --cc=julia.lawall-L2FTfq7BK8M@public.gmane.org \
    --cc=linux-api-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=linux-mm-Bw31MaZKKs3YtjvyW6yDsg@public.gmane.org \
    --cc=linux-nvdimm-hn68Rpc1hR1g9hUCZPvPmw@public.gmane.org \
    --cc=luto-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org \
    --cc=tiwai-IBi9RG/b67k@public.gmane.org \
    --cc=torvalds-de/tnXTf+JLsfHDXvbKv3WD2FQJk+8+b@public.gmane.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.