From mboxrd@z Thu Jan 1 00:00:00 1970 From: Arnd Bergmann Subject: Re: [PATCH V9 14/21] csky: User access Date: Wed, 17 Oct 2018 17:37:38 +0200 Message-ID: References: <1c0d8cddcdf15e5f397b3e42b76461e97d6e34ad.1539655732.git.ren_guo@c-sky.com> Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Return-path: In-Reply-To: <1c0d8cddcdf15e5f397b3e42b76461e97d6e34ad.1539655732.git.ren_guo@c-sky.com> Sender: linux-kernel-owner@vger.kernel.org To: Guo Ren Cc: Andrew Morton , Daniel Lezcano , David Miller , gregkh , Christoph Hellwig , Marc Zyngier , Mark Rutland , Peter Zijlstra , Rob Herring , Thomas Gleixner , Linux Kernel Mailing List , linux-arch , DTML , Rob Herring , c-sky_gcc_upstream@c-sky.com List-Id: devicetree@vger.kernel.org On Tue, Oct 16, 2018 at 5:05 AM Guo Ren wrote: > > The patch adds "user access from kernel" codes. > > Signed-off-by: Guo Ren > Cc: Arnd Bergmann > --- > arch/csky/include/asm/uaccess.h | 416 ++++++++++++++++++++++++++++++++++++++++ > arch/csky/lib/usercopy.c | 262 +++++++++++++++++++++++++ > 2 files changed, 678 insertions(+) > create mode 100644 arch/csky/include/asm/uaccess.h > create mode 100644 arch/csky/lib/usercopy.c Reviewed-by: Arnd Bergmann The 64-bit __put_user() is usually what everyone gets wrong, but your version seems fine. Also the access_ok() checks and the copy_to_user() result value all look correct. Arnd