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 6565FC433EF for ; Tue, 15 Feb 2022 00:38:17 +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=f56giMDDc5+AVAQkXFTBDd/yN/OzoKKN48EX/DbGy6g=; b=FI3MVPw0CzYKIw MRRmAOioMyED2MtHzzFKyNqoB2K+c14deqsA8ozqgQNHoHZ1qSlydLgzQpe6Vs02RGvwYE23V5XqU crr727epecW0KSDQtPO44FZhi+rCOwl8bg3hy0MFBe1zZJf4SHlVi77u/A3YexGXAtv02yLMs0rEV 1d0nlQvVPKPV7ni1dq1zluSkhESkE/jmM4fT3BYxz5nLLiNp2oO8BwSf7YziDa/mRXyOEKbsU6cXN W5gZ8yKGAVPWQ7Swu7UIYqO0MrXasHABOEokCY3XXHjOyJjs8YOZzmCY2IV8t/uKi17b+V1kPT0ex eIR127m7MBioOArDbZOg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1nJlr7-00HNhM-Qk; Tue, 15 Feb 2022 00:38:09 +0000 Received: from zeniv-ca.linux.org.uk ([2607:5300:60:148a::1]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1nJlr4-00HNgd-F3; Tue, 15 Feb 2022 00:38:07 +0000 Received: from viro by zeniv-ca.linux.org.uk with local (Exim 4.94.2 #2 (Red Hat Linux)) id 1nJlqf-001pf0-Dy; Tue, 15 Feb 2022 00:37:41 +0000 Date: Tue, 15 Feb 2022 00:37:41 +0000 From: Al Viro To: Arnd Bergmann Cc: Linus Torvalds , Christoph Hellwig , linux-arch@vger.kernel.org, linux-mm@kvack.org, linux-api@vger.kernel.org, arnd@arndb.de, linux-kernel@vger.kernel.org, linux@armlinux.org.uk, will@kernel.org, guoren@kernel.org, bcain@codeaurora.org, geert@linux-m68k.org, monstr@monstr.eu, tsbogend@alpha.franken.de, nickhu@andestech.com, green.hu@gmail.com, dinguyen@kernel.org, shorne@gmail.com, deller@gmx.de, mpe@ellerman.id.au, peterz@infradead.org, mingo@redhat.com, mark.rutland@arm.com, hca@linux.ibm.com, dalias@libc.org, davem@davemloft.net, richard@nod.at, x86@kernel.org, jcmvbkbc@gmail.com, ebiederm@xmission.com, akpm@linux-foundation.org, ardb@kernel.org, linux-alpha@vger.kernel.org, linux-snps-arc@lists.infradead.org, linux-arm-kernel@lists.infradead.org, linux-csky@vger.kernel.org, linux-hexagon@vger.kernel.org, linux-ia64@vger.kernel.org, linux-m68k@lists.linux-m68k.org, linux-mips@vger.kernel.org, openrisc@lists.librecores.org, linux-parisc@vger.kernel.org, linuxppc-dev@lists.ozlabs.org, linux-riscv@lists.infradead.org, linux-s390@vger.kernel.org, linux-sh@vger.kernel.org, sparclinux@vger.kernel.org, linux-um@lists.infradead.org, linux-xtensa@linux-xtensa.org Subject: Re: [PATCH 09/14] m68k: drop custom __access_ok() Message-ID: References: <20220214163452.1568807-1-arnd@kernel.org> <20220214163452.1568807-10-arnd@kernel.org> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20220214163452.1568807-10-arnd@kernel.org> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220214_163806_514436_0467345B X-CRM114-Status: GOOD ( 18.23 ) 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 Mon, Feb 14, 2022 at 05:34:47PM +0100, Arnd Bergmann wrote: > From: Arnd Bergmann > > While most m68k platforms use separate address spaces for user > and kernel space, at least coldfire does not, and the other > ones have a TASK_SIZE that is less than the entire 4GB address > range. > > Using the generic implementation of __access_ok() stops coldfire > user space from trivially accessing kernel memory, and is probably > the right thing elsewhere for consistency as well. Perhaps simply wrap that sucker into #ifdef CONFIG_CPU_HAS_ADDRESS_SPACES (and trim the comment down to "coldfire and 68000 will pick generic variant")? > Signed-off-by: Arnd Bergmann > --- > arch/m68k/include/asm/uaccess.h | 13 ------------- > 1 file changed, 13 deletions(-) > > diff --git a/arch/m68k/include/asm/uaccess.h b/arch/m68k/include/asm/uaccess.h > index d6bb5720365a..64914872a5c9 100644 > --- a/arch/m68k/include/asm/uaccess.h > +++ b/arch/m68k/include/asm/uaccess.h > @@ -10,19 +10,6 @@ > #include > #include > #include > - > -/* We let the MMU do all checking */ > -static inline int __access_ok(const void __user *addr, > - unsigned long size) > -{ > - /* > - * XXX: for !CONFIG_CPU_HAS_ADDRESS_SPACES this really needs to check > - * for TASK_SIZE! > - * Removing this helper is probably sufficient. > - */ > - return 1; > -} > -#define __access_ok __access_ok > #include > > /* > -- > 2.29.2 > _______________________________________________ linux-riscv mailing list linux-riscv@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-riscv