linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] tee: fix compiler warning in tee_shm_register()
@ 2022-08-22  8:28 Jens Wiklander
  2022-08-22  8:39 ` Sumit Garg
  0 siblings, 1 reply; 3+ messages in thread
From: Jens Wiklander @ 2022-08-22  8:28 UTC (permalink / raw)
  To: linux-kernel, op-tee
  Cc: Sumit Garg, Jerome Forissier, Jens Wiklander, kernel test robot

Include <linux/uaccess.h> to avoid the warning:
   drivers/tee/tee_shm.c: In function 'tee_shm_register':
>> drivers/tee/tee_shm.c:242:14: error: implicit declaration of function 'access_ok' [-Werror=implicit-function-declaration]
     242 |         if (!access_ok((void __user *)addr, length))
         |              ^~~~~~~~~
   cc1: some warnings being treated as errors

Fixes: 573ae4f13f63 ("tee: add overflow check in register_shm_helper()")
Reported-by: kernel test robot <lkp@intel.com>
Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org>
---
 drivers/tee/tee_shm.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/tee/tee_shm.c b/drivers/tee/tee_shm.c
index 1175f3a46859..27295bda3e0b 100644
--- a/drivers/tee/tee_shm.c
+++ b/drivers/tee/tee_shm.c
@@ -9,6 +9,7 @@
 #include <linux/sched.h>
 #include <linux/slab.h>
 #include <linux/tee_drv.h>
+#include <linux/uaccess.h>
 #include <linux/uio.h>
 #include "tee_private.h"
 
-- 
2.31.1


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

* Re: [PATCH] tee: fix compiler warning in tee_shm_register()
  2022-08-22  8:28 [PATCH] tee: fix compiler warning in tee_shm_register() Jens Wiklander
@ 2022-08-22  8:39 ` Sumit Garg
  2022-08-25  8:43   ` Jens Wiklander
  0 siblings, 1 reply; 3+ messages in thread
From: Sumit Garg @ 2022-08-22  8:39 UTC (permalink / raw)
  To: Jens Wiklander; +Cc: linux-kernel, op-tee, Jerome Forissier, kernel test robot

On Mon, 22 Aug 2022 at 13:58, Jens Wiklander <jens.wiklander@linaro.org> wrote:
>
> Include <linux/uaccess.h> to avoid the warning:
>    drivers/tee/tee_shm.c: In function 'tee_shm_register':
> >> drivers/tee/tee_shm.c:242:14: error: implicit declaration of function 'access_ok' [-Werror=implicit-function-declaration]
>      242 |         if (!access_ok((void __user *)addr, length))
>          |              ^~~~~~~~~
>    cc1: some warnings being treated as errors
>
> Fixes: 573ae4f13f63 ("tee: add overflow check in register_shm_helper()")
> Reported-by: kernel test robot <lkp@intel.com>
> Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org>
> ---
>  drivers/tee/tee_shm.c | 1 +
>  1 file changed, 1 insertion(+)
>

Reviewed-by: Sumit Garg <sumit.garg@linaro.org>

-Sumit

> diff --git a/drivers/tee/tee_shm.c b/drivers/tee/tee_shm.c
> index 1175f3a46859..27295bda3e0b 100644
> --- a/drivers/tee/tee_shm.c
> +++ b/drivers/tee/tee_shm.c
> @@ -9,6 +9,7 @@
>  #include <linux/sched.h>
>  #include <linux/slab.h>
>  #include <linux/tee_drv.h>
> +#include <linux/uaccess.h>
>  #include <linux/uio.h>
>  #include "tee_private.h"
>
> --
> 2.31.1
>

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

* Re: [PATCH] tee: fix compiler warning in tee_shm_register()
  2022-08-22  8:39 ` Sumit Garg
@ 2022-08-25  8:43   ` Jens Wiklander
  0 siblings, 0 replies; 3+ messages in thread
From: Jens Wiklander @ 2022-08-25  8:43 UTC (permalink / raw)
  To: Sumit Garg; +Cc: linux-kernel, op-tee, Jerome Forissier, kernel test robot

On Mon, Aug 22, 2022 at 10:39 AM Sumit Garg <sumit.garg@linaro.org> wrote:
>
> On Mon, 22 Aug 2022 at 13:58, Jens Wiklander <jens.wiklander@linaro.org> wrote:
> >
> > Include <linux/uaccess.h> to avoid the warning:
> >    drivers/tee/tee_shm.c: In function 'tee_shm_register':
> > >> drivers/tee/tee_shm.c:242:14: error: implicit declaration of function 'access_ok' [-Werror=implicit-function-declaration]
> >      242 |         if (!access_ok((void __user *)addr, length))
> >          |              ^~~~~~~~~
> >    cc1: some warnings being treated as errors
> >
> > Fixes: 573ae4f13f63 ("tee: add overflow check in register_shm_helper()")
> > Reported-by: kernel test robot <lkp@intel.com>
> > Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org>
> > ---
> >  drivers/tee/tee_shm.c | 1 +
> >  1 file changed, 1 insertion(+)
> >
>
> Reviewed-by: Sumit Garg <sumit.garg@linaro.org>

Thanks, I'm picking this up now.

Cheers,
Jens

>
> -Sumit
>
> > diff --git a/drivers/tee/tee_shm.c b/drivers/tee/tee_shm.c
> > index 1175f3a46859..27295bda3e0b 100644
> > --- a/drivers/tee/tee_shm.c
> > +++ b/drivers/tee/tee_shm.c
> > @@ -9,6 +9,7 @@
> >  #include <linux/sched.h>
> >  #include <linux/slab.h>
> >  #include <linux/tee_drv.h>
> > +#include <linux/uaccess.h>
> >  #include <linux/uio.h>
> >  #include "tee_private.h"
> >
> > --
> > 2.31.1
> >

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

end of thread, other threads:[~2022-08-25  8:44 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-08-22  8:28 [PATCH] tee: fix compiler warning in tee_shm_register() Jens Wiklander
2022-08-22  8:39 ` Sumit Garg
2022-08-25  8:43   ` Jens Wiklander

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).