public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] VMCI: Avoid extra check for access_ok()
@ 2020-05-05 20:18 Souptick Joarder
  2020-06-24  1:41 ` Souptick Joarder
  0 siblings, 1 reply; 3+ messages in thread
From: Souptick Joarder @ 2020-05-05 20:18 UTC (permalink / raw)
  To: arnd, gregkh, jgg, hubcap, daniel.vetter, dvhart, sgarzare, tglx,
	ira.weiny
  Cc: linux-kernel, Souptick Joarder

get_user_pages_fast() is already having a check for the same. This
double check can be removed.

Signed-off-by: Souptick Joarder <jrdr.linux@gmail.com>
---
 drivers/misc/vmw_vmci/vmci_host.c | 2 --
 1 file changed, 2 deletions(-)

diff --git a/drivers/misc/vmw_vmci/vmci_host.c b/drivers/misc/vmw_vmci/vmci_host.c
index ce16d6b..2d8328d9 100644
--- a/drivers/misc/vmw_vmci/vmci_host.c
+++ b/drivers/misc/vmw_vmci/vmci_host.c
@@ -233,8 +233,6 @@ static int vmci_host_setup_notify(struct vmci_ctx *context,
 	 * about the size.
 	 */
 	BUILD_BUG_ON(sizeof(bool) != sizeof(u8));
-	if (!access_ok((void __user *)uva, sizeof(u8)))
-		return VMCI_ERROR_GENERIC;
 
 	/*
 	 * Lock physical page backing a given user VA.
-- 
1.9.1


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] VMCI: Avoid extra check for access_ok()
  2020-05-05 20:18 [PATCH] VMCI: Avoid extra check for access_ok() Souptick Joarder
@ 2020-06-24  1:41 ` Souptick Joarder
  2020-06-24  9:10   ` Greg KH
  0 siblings, 1 reply; 3+ messages in thread
From: Souptick Joarder @ 2020-06-24  1:41 UTC (permalink / raw)
  To: Arnd Bergmann, Greg KH, Jason Gunthorpe, Mike Marshall,
	Daniel Vetter, dvhart, sgarzare, Thomas Gleixner, Ira Weiny
  Cc: linux-kernel

Hi Greg,

On Wed, May 6, 2020 at 1:40 AM Souptick Joarder <jrdr.linux@gmail.com> wrote:
>
> get_user_pages_fast() is already having a check for the same. This
> double check can be removed.
>
> Signed-off-by: Souptick Joarder <jrdr.linux@gmail.com>

Does this need to be marked as stable ?

> ---
>  drivers/misc/vmw_vmci/vmci_host.c | 2 --
>  1 file changed, 2 deletions(-)
>
> diff --git a/drivers/misc/vmw_vmci/vmci_host.c b/drivers/misc/vmw_vmci/vmci_host.c
> index ce16d6b..2d8328d9 100644
> --- a/drivers/misc/vmw_vmci/vmci_host.c
> +++ b/drivers/misc/vmw_vmci/vmci_host.c
> @@ -233,8 +233,6 @@ static int vmci_host_setup_notify(struct vmci_ctx *context,
>          * about the size.
>          */
>         BUILD_BUG_ON(sizeof(bool) != sizeof(u8));
> -       if (!access_ok((void __user *)uva, sizeof(u8)))
> -               return VMCI_ERROR_GENERIC;
>
>         /*
>          * Lock physical page backing a given user VA.
> --
> 1.9.1
>

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] VMCI: Avoid extra check for access_ok()
  2020-06-24  1:41 ` Souptick Joarder
@ 2020-06-24  9:10   ` Greg KH
  0 siblings, 0 replies; 3+ messages in thread
From: Greg KH @ 2020-06-24  9:10 UTC (permalink / raw)
  To: Souptick Joarder
  Cc: Arnd Bergmann, Jason Gunthorpe, Mike Marshall, Daniel Vetter,
	dvhart, sgarzare, Thomas Gleixner, Ira Weiny, linux-kernel

On Wed, Jun 24, 2020 at 07:11:54AM +0530, Souptick Joarder wrote:
> Hi Greg,
> 
> On Wed, May 6, 2020 at 1:40 AM Souptick Joarder <jrdr.linux@gmail.com> wrote:
> >
> > get_user_pages_fast() is already having a check for the same. This
> > double check can be removed.
> >
> > Signed-off-by: Souptick Joarder <jrdr.linux@gmail.com>
> 
> Does this need to be marked as stable ?

You tell me, why would it?  Does it meet the requirements for stable
kernels?  If so, which one?

thanks,
greg k-h

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2020-06-24  9:10 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-05-05 20:18 [PATCH] VMCI: Avoid extra check for access_ok() Souptick Joarder
2020-06-24  1:41 ` Souptick Joarder
2020-06-24  9:10   ` Greg KH

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox