Received: by 2002:a25:8b12:0:0:0:0:0 with SMTP id i18csp2659646ybl; Sat, 31 Aug 2019 20:42:32 -0700 (PDT) X-Google-Smtp-Source: APXvYqyBKG1QazPa9r5k44phYFzJsBxPa5WkCN6cs5eDmXcRwXEeI9M1bIqg4cbgVCHlArKFeb8P X-Received: by 2002:a17:90a:36ae:: with SMTP id t43mr926906pjb.7.1567309351956; Sat, 31 Aug 2019 20:42:31 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1567309351; cv=none; d=google.com; s=arc-20160816; b=gWCJhuMnBq96UbimyeZywKLILbOtCMO20/8GXMaKVvFNr+akijYZSBBJikvQi36Mxq b2ieHtD+sLhEDpFrcTGuw8ZytT8yWvnDSnpb2qN2J4CghF1uAgWEU7otFGDVwXo1cv0u 3LfuolvQyytN3QGE8w2rcFf2Fx5skunUVg5YhHlCmSPmt6eyJhYToa4TFmLoERkKy/De v9y2JuKMl5zOkr9Lx9KdJlYRqk8JH/04fBVBNr/v8qErUMXEPqTKJP/5SMvn8+2EuRYD zNl/DLePyndGbENXZom9qVTlAm1Ko+LPJHm6eF0v3vBkcrZMp9w3m0slMnHbYHDXXJxW +luA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:mime-version:user-agent:date:message-id:cc:subject :from:to:dkim-signature; bh=oCApBRnlYw3+yzwJ3ybINzbSrgzbb2xvvxZOpSTpA3Y=; b=ixNSEv5TA+KmDAonxyJ3+tdXk+GB/ivoqD505DiRrVJkqapCTLlT2bypB+QGKymFt1 GupEsvUcRaDyyKRBq6Soyw8ETjduaFrOozZHtOdYgDIZqyGfWoz7USNghRfhJHfhGIeR 6z936waSJHnhHZ8MoJNMm9WBvTqdgCwC8nb3SKwxUB0Qtwh1F7y4l388AZWtbumzui9E noxeNKZOFajYe4QeeaO3IaNI2xIiQJ8uxI2kSws4jBB0iWuBbKDrjU61WdcWvzs0P+Zn yc5AsHT0ir1t9g6ByYUWUY/RP6b0BkwZxtOvyxMIodxtM9JvJsH7qB25p1WBpOHKSpkK 2w0A== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@infradead.org header.s=bombadil.20170209 header.b=rqcNBBOf; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id r23si6393091pfc.286.2019.08.31.20.42.16; Sat, 31 Aug 2019 20:42:31 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=fail header.i=@infradead.org header.s=bombadil.20170209 header.b=rqcNBBOf; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728653AbfIADkP (ORCPT + 99 others); Sat, 31 Aug 2019 23:40:15 -0400 Received: from bombadil.infradead.org ([198.137.202.133]:59396 "EHLO bombadil.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728575AbfIADkP (ORCPT ); Sat, 31 Aug 2019 23:40:15 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20170209; h=Content-Transfer-Encoding: Content-Type:MIME-Version:Date:Message-ID:Cc:Subject:From:To:Sender:Reply-To: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References:List-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=oCApBRnlYw3+yzwJ3ybINzbSrgzbb2xvvxZOpSTpA3Y=; b=rqcNBBOfFzF+E7Y+wWWsElfz9 fvDGc+2uMkExl6hJkVMjVNoM5pLCx3z+aIcax2YveZjqMYkhDrkr1RsbJt4wf6T6P3xKPW1ergL0i 7+Q9IHtu+jkBQlL/6m12sLueL3InXD410YD8kZ8TwJshJGr8MqIpJWNZxQOk2SSLji/Ruh5Oydenr IN/3GqTOlqYWlb9BPzYV1nqnZElq0OjAeRy9LyCGdmv0amr2deM+R5js9VKTwkFQ4TqM5eK83UBop YMxWZEB6kYE1ArxUvL+diFBEwN0mUoqv5WQzixRP6vLVqD6LUQQtfgBV4YdvuYH6fNIhsioH+OzhI LC1dkrDQw==; Received: from [2601:1c0:6200:6e8::4f71] by bombadil.infradead.org with esmtpsa (Exim 4.92 #3 (Red Hat Linux)) id 1i4Gil-0003pM-P5; Sun, 01 Sep 2019 03:40:07 +0000 To: LKML , Linus Torvalds From: Randy Dunlap Subject: [PATCH RESEND] arch/microblaze: add support for get_user() of size 8 bytes Cc: Al Viro , "Steven J. Magnani" , Michal Simek , Jason Gunthorpe , Leon Romanovsky , Andrew Morton , Doug Ledford Message-ID: <99f83474-3e71-4325-ddff-cf23a172b984@infradead.org> Date: Sat, 31 Aug 2019 20:40:05 -0700 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.8.0 MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Randy Dunlap 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 Signed-off-by: Randy Dunlap Cc: Al Viro Cc: Steven J. Magnani Cc: Michal Simek Cc: Jason Gunthorpe Cc: Leon Romanovsky Cc: Andrew Morton Cc: Doug Ledford Reviewed-by: Leon Romanovsky --- What is a reasonable path for having this patch merged? Leon Romanovsky 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();\ } \