From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id EA864C433F5 for ; Tue, 15 Feb 2022 10:26:03 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References: Message-ID:Subject:Cc:To:From:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=+xWONCOYqnES8BAOVZTf1EIoIWmQAfL75tTnScOjggU=; b=kTZz85gnS7YSFj VSxLri9p7dKleuF0DNVGiNnWvfylDotDuwmnQKohx1kEqwEHSL6KqDp+nPvjVb6Brr8P2arYERZ+u mgncqMyCG+JrJK5DpABc7d+dM49yS4GgR19kr54LddTyeFFNtRFDe02GGIwpSYQTqA4XSH3mDJWQZ 3ZS9ZrIFpz8km3b868gKOMjwRHPwIK88qYNde2xx89HwIi6N0t2zHg6f2LfSnfsJ/U+Y/FPo2bQ0j 6NW8xuLw1TaBk40HrNjNwKPbuBtfRmtKGzMuEq+l6jSMayobAJZ/l+SyNj6WhH8i0AdaeAHiAX7xu fDIBVZiTSiuI7JvEbEDw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1nJv1x-002Iww-0E; Tue, 15 Feb 2022 10:25:57 +0000 Received: from ams.source.kernel.org ([2604:1380:4601:e00::1]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1nJv1r-002ItJ-LB; Tue, 15 Feb 2022 10:25:54 +0000 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id B2AB4B8180A; Tue, 15 Feb 2022 10:25:49 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id E87FEC340EB; Tue, 15 Feb 2022 10:25:46 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1644920748; bh=ff3JsyoyvYlhG8jzgNCTPV8IRM6/qaYw6mQrNFy9F74=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=Idtvq2yMUPVIjRWGD6CbxsSP8vfjonXBjhqjw0KPeSxq9WG+eJI9q3VMhGdj4sPiw td4MlzEZussptBdaheJ5yjhE4vnfocIKiMf6Eye4k3uvvU7zndbY9d/28Z7fJPAVjQ V+ay13tyZYzyUl7pHGRP2ddUQDwCe4rTDO0IODfo= Date: Tue, 15 Feb 2022 11:25:44 +0100 From: Greg KH To: Arnd Bergmann Cc: Christoph Hellwig , Linus Torvalds , Christoph Hellwig , linux-arch , Linux-MM , Linux API , Arnd Bergmann , Linux Kernel Mailing List , Mark Rutland , Rich Felker , linux-ia64@vger.kernel.org, Linux-sh list , Peter Zijlstra , Max Filippov , Guo Ren , sparclinux , "open list:QUALCOMM HEXAGON..." , linux-riscv , Will Deacon , Ard Biesheuvel , linux-s390 , Brian Cain , Helge Deller , the arch/x86 maintainers , Russell King - ARM Linux , linux-csky@vger.kernel.org, Ingo Molnar , Geert Uytterhoeven , "open list:SYNOPSYS ARC ARCHITECTURE" , "open list:TENSILICA XTENSA PORT (xtensa)" , Heiko Carstens , alpha , linux-um , linux-m68k , Openrisc , Greentime Hu , Stafford Horne , Linux ARM , Michal Simek , Thomas Bogendoerfer , Parisc List , Nick Hu , "open list:BROADCOM NVRAM DRIVER" , "# 3.4.x" , Dinh Nguyen , "Eric W . Biederman" , Richard Weinberger , Andrew Morton , linuxppc-dev , David Miller Subject: Re: [PATCH 03/14] nds32: fix access_ok() checks in get/put_user Message-ID: References: <20220214163452.1568807-1-arnd@kernel.org> <20220214163452.1568807-4-arnd@kernel.org> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220215_022552_005847_A2D957FC X-CRM114-Status: GOOD ( 24.86 ) X-BeenThere: linux-riscv@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-riscv" Errors-To: linux-riscv-bounces+linux-riscv=archiver.kernel.org@lists.infradead.org On Tue, Feb 15, 2022 at 10:18:15AM +0100, Arnd Bergmann wrote: > On Mon, Feb 14, 2022 at 6:01 PM Christoph Hellwig wrote: > > > > On Mon, Feb 14, 2022 at 05:34:41PM +0100, Arnd Bergmann wrote: > > > From: Arnd Bergmann > > > > > > The get_user()/put_user() functions are meant to check for > > > access_ok(), while the __get_user()/__put_user() functions > > > don't. > > > > > > This broke in 4.19 for nds32, when it gained an extraneous > > > check in __get_user(), but lost the check it needs in > > > __put_user(). > > > > Can we follow the lead of MIPS (which this was originally copied > > from I think) and kill the pointless __get/put_user_check wrapper > > that just obsfucate the code? > > I had another look, but I think that would be a bigger change than > I want to have in a fix for stable backports, as nds32 also uses > the _check versions in __{get,put}_user_error. Don't worry about stable backports first, get it correct and merged and then worry about them if you really have to. If someone cares about nds32 for stable kernels, they can do the backport work :) thanks, greg k-h _______________________________________________ linux-riscv mailing list linux-riscv@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-riscv