All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH RESEND] arch/microblaze: add support for get_user() of size 8 bytes
@ 2019-09-01  3:40 Randy Dunlap
  2019-09-01  6:49 ` Leon Romanovsky
  0 siblings, 1 reply; 3+ messages in thread
From: Randy Dunlap @ 2019-09-01  3:40 UTC (permalink / raw)
  To: LKML, Linus Torvalds
  Cc: Al Viro, Steven J. Magnani, Michal Simek, Jason Gunthorpe,
	Leon Romanovsky, Andrew Morton, Doug Ledford

From: Randy Dunlap <rdunlap@infradead.org>

arch/microblaze/ is missing support for get_user() of size 8 bytes,
so add it by using __copy_from_user().

Fixes these build errors:
   drivers/infiniband/core/uverbs_main.o: In function `ib_uverbs_write':
   drivers/infiniband/core/.tmp_gl_uverbs_main.o:(.text+0x13a4): undefined reference to `__user_bad'
   drivers/android/binder.o: In function `binder_thread_write':
   drivers/android/.tmp_gl_binder.o:(.text+0xda6c): undefined reference to `__user_bad'
   drivers/android/.tmp_gl_binder.o:(.text+0xda98): undefined reference to `__user_bad'
   drivers/android/.tmp_gl_binder.o:(.text+0xdf10): undefined reference to `__user_bad'
   drivers/android/.tmp_gl_binder.o:(.text+0xe498): undefined reference to `__user_bad'
   drivers/android/binder.o:drivers/android/.tmp_gl_binder.o:(.text+0xea78): more undefined references to `__user_bad' follow

'make allmodconfig' now builds successfully for arch/microblaze/.

Fixes: 538722ca3b76 ("microblaze: fix get_user/put_user side-effects")
Reported-by: kbuild test robot <lkp@intel.com>
Signed-off-by: Randy Dunlap <rdunlap@infradead.org>
Cc: Al Viro <viro@zeniv.linux.org.uk>
Cc: Steven J. Magnani <steve@digidescorp.com>
Cc: Michal Simek <monstr@monstr.eu>
Cc: Jason Gunthorpe <jgg@mellanox.com>
Cc: Leon Romanovsky <leonro@mellanox.com>
Cc: Andrew Morton <akpm@linux-foundation.org>
Cc: Doug Ledford <dledford@redhat.com>
Reviewed-by: Leon Romanovsky <leonro@mellanox.com>
---
What is a reasonable path for having this patch merged?
Leon Romanovsky <leonro@mellanox.com> has tested it.
I have sent several emails to Micahl Simek but he seems to have
dropped active maintenance of arch/microblaze/.

 arch/microblaze/include/asm/uaccess.h |    6 ++++++
 1 file changed, 6 insertions(+)

--- lnx-53-rc3.orig/arch/microblaze/include/asm/uaccess.h
+++ lnx-53-rc3/arch/microblaze/include/asm/uaccess.h
@@ -186,6 +186,9 @@ extern long __user_bad(void);
 			__get_user_asm("lw", __gu_addr, __gu_val,	\
 				       __gu_err);			\
 			break;						\
+		case 8:							\
+			__gu_err = __copy_from_user(&__gu_val, __gu_addr, 8);\
+			break;						\
 		default:						\
 			__gu_err = __user_bad();			\
 			break;						\
@@ -212,6 +215,9 @@ extern long __user_bad(void);
 	case 4:								\
 		__get_user_asm("lw", (ptr), __gu_val, __gu_err);	\
 		break;							\
+	case 8:								\
+		__gu_err = __copy_from_user(&__gu_val, ptr, 8);		\
+		break;							\
 	default:							\
 		/* __gu_val = 0; __gu_err = -EINVAL;*/ __gu_err = __user_bad();\
 	}								\


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

* Re: [PATCH RESEND] arch/microblaze: add support for get_user() of size 8 bytes
  2019-09-01  3:40 [PATCH RESEND] arch/microblaze: add support for get_user() of size 8 bytes Randy Dunlap
@ 2019-09-01  6:49 ` Leon Romanovsky
  2019-09-01 14:55   ` Randy Dunlap
  0 siblings, 1 reply; 3+ messages in thread
From: Leon Romanovsky @ 2019-09-01  6:49 UTC (permalink / raw)
  To: Randy Dunlap
  Cc: LKML, Linus Torvalds, Al Viro, Steven J. Magnani, Michal Simek,
	Jason Gunthorpe, Andrew Morton, Doug Ledford

On Sat, Aug 31, 2019 at 08:40:05PM -0700, Randy Dunlap wrote:
> From: Randy Dunlap <rdunlap@infradead.org>
>
> arch/microblaze/ is missing support for get_user() of size 8 bytes,
> so add it by using __copy_from_user().
>
> Fixes these build errors:
>    drivers/infiniband/core/uverbs_main.o: In function `ib_uverbs_write':
>    drivers/infiniband/core/.tmp_gl_uverbs_main.o:(.text+0x13a4): undefined reference to `__user_bad'
>    drivers/android/binder.o: In function `binder_thread_write':
>    drivers/android/.tmp_gl_binder.o:(.text+0xda6c): undefined reference to `__user_bad'
>    drivers/android/.tmp_gl_binder.o:(.text+0xda98): undefined reference to `__user_bad'
>    drivers/android/.tmp_gl_binder.o:(.text+0xdf10): undefined reference to `__user_bad'
>    drivers/android/.tmp_gl_binder.o:(.text+0xe498): undefined reference to `__user_bad'
>    drivers/android/binder.o:drivers/android/.tmp_gl_binder.o:(.text+0xea78): more undefined references to `__user_bad' follow
>
> 'make allmodconfig' now builds successfully for arch/microblaze/.
>
> Fixes: 538722ca3b76 ("microblaze: fix get_user/put_user side-effects")
> Reported-by: kbuild test robot <lkp@intel.com>
> Signed-off-by: Randy Dunlap <rdunlap@infradead.org>
> Cc: Al Viro <viro@zeniv.linux.org.uk>
> Cc: Steven J. Magnani <steve@digidescorp.com>
> Cc: Michal Simek <monstr@monstr.eu>
> Cc: Jason Gunthorpe <jgg@mellanox.com>
> Cc: Leon Romanovsky <leonro@mellanox.com>
> Cc: Andrew Morton <akpm@linux-foundation.org>
> Cc: Doug Ledford <dledford@redhat.com>
> Reviewed-by: Leon Romanovsky <leonro@mellanox.com>
> ---
> What is a reasonable path for having this patch merged?
> Leon Romanovsky <leonro@mellanox.com> has tested it.

I tested it for compilation only, we (RDMA) don't work on
arch/microblaze/ at all and care about kbuild failures only.

Thanks

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

* Re: [PATCH RESEND] arch/microblaze: add support for get_user() of size 8 bytes
  2019-09-01  6:49 ` Leon Romanovsky
@ 2019-09-01 14:55   ` Randy Dunlap
  0 siblings, 0 replies; 3+ messages in thread
From: Randy Dunlap @ 2019-09-01 14:55 UTC (permalink / raw)
  To: Leon Romanovsky
  Cc: LKML, Linus Torvalds, Al Viro, Steven J. Magnani, Michal Simek,
	Jason Gunthorpe, Andrew Morton, Doug Ledford

On 8/31/19 11:49 PM, Leon Romanovsky wrote:
> On Sat, Aug 31, 2019 at 08:40:05PM -0700, Randy Dunlap wrote:
>> From: Randy Dunlap <rdunlap@infradead.org>
>>
>> arch/microblaze/ is missing support for get_user() of size 8 bytes,
>> so add it by using __copy_from_user().
>>
>> Fixes these build errors:
>>    drivers/infiniband/core/uverbs_main.o: In function `ib_uverbs_write':
>>    drivers/infiniband/core/.tmp_gl_uverbs_main.o:(.text+0x13a4): undefined reference to `__user_bad'
>>    drivers/android/binder.o: In function `binder_thread_write':
>>    drivers/android/.tmp_gl_binder.o:(.text+0xda6c): undefined reference to `__user_bad'
>>    drivers/android/.tmp_gl_binder.o:(.text+0xda98): undefined reference to `__user_bad'
>>    drivers/android/.tmp_gl_binder.o:(.text+0xdf10): undefined reference to `__user_bad'
>>    drivers/android/.tmp_gl_binder.o:(.text+0xe498): undefined reference to `__user_bad'
>>    drivers/android/binder.o:drivers/android/.tmp_gl_binder.o:(.text+0xea78): more undefined references to `__user_bad' follow
>>
>> 'make allmodconfig' now builds successfully for arch/microblaze/.
>>
>> Fixes: 538722ca3b76 ("microblaze: fix get_user/put_user side-effects")
>> Reported-by: kbuild test robot <lkp@intel.com>
>> Signed-off-by: Randy Dunlap <rdunlap@infradead.org>
>> Cc: Al Viro <viro@zeniv.linux.org.uk>
>> Cc: Steven J. Magnani <steve@digidescorp.com>
>> Cc: Michal Simek <monstr@monstr.eu>
>> Cc: Jason Gunthorpe <jgg@mellanox.com>
>> Cc: Leon Romanovsky <leonro@mellanox.com>
>> Cc: Andrew Morton <akpm@linux-foundation.org>
>> Cc: Doug Ledford <dledford@redhat.com>
>> Reviewed-by: Leon Romanovsky <leonro@mellanox.com>
>> ---
>> What is a reasonable path for having this patch merged?
>> Leon Romanovsky <leonro@mellanox.com> has tested it.
> 
> I tested it for compilation only, we (RDMA) don't work on
> arch/microblaze/ at all and care about kbuild failures only.

Hi Leon,
Since I modified the patch (about to send v3), I dropped your
Reviewed-by.

Thanks.

-- 
~Randy

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

end of thread, other threads:[~2019-09-01 14:55 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-09-01  3:40 [PATCH RESEND] arch/microblaze: add support for get_user() of size 8 bytes Randy Dunlap
2019-09-01  6:49 ` Leon Romanovsky
2019-09-01 14:55   ` Randy Dunlap

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.