Received: by 2002:a25:8b12:0:0:0:0:0 with SMTP id i18csp3226795ybl; Sun, 1 Sep 2019 08:48:30 -0700 (PDT) X-Google-Smtp-Source: APXvYqxB3h78y7+h0sBUYwLpMtxZoBj/WfYbxVNCLCsigMTTAJ/zAakg9zLOosEB+xC5eRWa7qpS X-Received: by 2002:a63:6097:: with SMTP id u145mr19646420pgb.227.1567352910621; Sun, 01 Sep 2019 08:48:30 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1567352910; cv=none; d=google.com; s=arc-20160816; b=SE/79nV1YiETkBf3abkRlZbVolQuwvQq20Gyx3jOlC5nCk6dcED29UvHBXA9WN9kDf JGexzXNZo4iL7LQAcEw3TjJz/S1Tn+gKbV+7pPGX9a4KPdUOkVcDUICPAudsTCO9iyTx iFt7D4zYlXHXDmuvvM4uaR57X6Hjiz0S7P4i3Fh1CAlj2M0F5ROuClTOfxq7wF3UbSTr YvxcXXeP8nv+3O6wd9hfcC9oj8d9UyiCFsr68kRDSG+frxRbXBo7Y9LyaE78I0JePvXP Jkggl55wtECx0p6qiFYsr2vrvlSZpdrUWiaWS3rXU2MXVc+/vwpsyyQV/cxLeaAq37yN WnwA== 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:subject :from:cc:to:dkim-signature; bh=gzNIRsi5fka2Azb8Q+JkTPje+EpM76dSKkMbcgP2DRM=; b=Q/Wa3iXeQ7ltFkvEpb807DMjcS6oEKmX9ljYR7myHPHAyaJFod2igye/dWtm0vOWw3 tCq408jwWjKr7lxEWl/0/PB8Rr9ZnnHgnLGTAVMq94rcdWeHjfr1Es1U37DGslF/RSt3 KTkSPn4/EyBb+BoJ2+gPMcsY39y+ndzs7fVkv2+0h5QJkZ4eYHaqnwH5TUPRELZDZ2bj RCanyrZjlW1RhqSotWuQgUSkpU+Z8ndldHmChKh1CgbyajRHc1dL1/euz4sZ0lCTqLkr 4oEbE/At53LXCeAoIVtcVEGLQFmMvUZT7VozrbbXSZCLMn1bBDVnXaWrx7eIGu20zwQI Od9A== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@infradead.org header.s=bombadil.20170209 header.b=GtQvOCyi; 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 a23si9282585pgg.131.2019.09.01.08.48.13; Sun, 01 Sep 2019 08:48:30 -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=GtQvOCyi; 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 S1729013AbfIAOz5 (ORCPT + 99 others); Sun, 1 Sep 2019 10:55:57 -0400 Received: from bombadil.infradead.org ([198.137.202.133]:44530 "EHLO bombadil.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728889AbfIAOz5 (ORCPT ); Sun, 1 Sep 2019 10:55:57 -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:Subject:From:Cc: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=gzNIRsi5fka2Azb8Q+JkTPje+EpM76dSKkMbcgP2DRM=; b=GtQvOCyiqI9ncx8WA+gscqpaV 6+HxDMCzqt8RUbMnmRuI9svYZahqhzyw5axFB+hmlwgkipmkc59kmpMnd7odTmWAi2r6OflrO18kW VHDWMj4edvA5Iam1hXVeGxM/YIpmpfzkgTNEWOfEVpYsdBMN+EgGg8SL4HP35BaB5z5EvPHCMmr/a 4x20e0qcJjmFrIccm4AGV5+qtweNCEsZwlZpcEXDtkXbHDGRJTRuUmQVw7R83dIpGIPU5u37AgiOv DiuZsV0M3LEWnHxY/JFhEygOMG2Xks8HCOmfoFDNPeftjlc0rry3Kp3ak6RvhPwlbSg7nybMJdxBK Fnn3GasaA==; Received: from [2601:1c0:6200:6e8::4f71] by bombadil.infradead.org with esmtpsa (Exim 4.92 #3 (Red Hat Linux)) id 1i4RGk-0007vy-I9; Sun, 01 Sep 2019 14:55:54 +0000 To: LKML , Linus Torvalds Cc: Al Viro , "Steven J. Magnani" , Michal Simek , Jason Gunthorpe , Leon Romanovsky , Doug Ledford , Andrew Morton From: Randy Dunlap Subject: [PATCH v3] arch/microblaze: add support for get_user() of size 8 bytes Message-ID: <5a3e440f-4ec5-65d7-b2a4-c57fec0df973@infradead.org> Date: Sun, 1 Sep 2019 07:55:53 -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 --- v3: fix return value in error case (comments from Linus). What is a reasonable path for having this patch merged? 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 | 10 ++++++++++ 1 file changed, 10 insertions(+) --- lnx-53-rc6.orig/arch/microblaze/include/asm/uaccess.h +++ lnx-53-rc6/arch/microblaze/include/asm/uaccess.h @@ -186,6 +186,11 @@ 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);\ + if (__gu_err) /* bytes remaining */ \ + __gu_err = -EFAULT; \ + break; \ default: \ __gu_err = __user_bad(); \ break; \ @@ -212,6 +217,11 @@ 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); \ + if (__gu_err) /* bytes remaining */ \ + __gu_err = -EFAULT; \ + break; \ default: \ /* __gu_val = 0; __gu_err = -EINVAL;*/ __gu_err = __user_bad();\ } \