Received: by 2002:a25:e74b:0:0:0:0:0 with SMTP id e72csp1859635ybh; Mon, 20 Jul 2020 08:55:20 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxk9lwDS9Y6lu8C5HHdjf7yGRn3nM7gawhwYJ2IYy+10p+qmXnYdz7oPOwg2JYDqukMWVRa X-Received: by 2002:a17:906:46cd:: with SMTP id k13mr20948297ejs.312.1595260519982; Mon, 20 Jul 2020 08:55:19 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1595260519; cv=none; d=google.com; s=arc-20160816; b=kuY7i+/uvS/WIuGLjhtum6E/6FBRsLayuy74XMrNlmcLzNU+U0CcI1h/9jRgM4Rsdk H+wR8un2e6bVyqntIclcx8MwrMsOzh+Bc5ZWFLu0OXe+1poDTbpYeNuey12jGVdJYWfn jhSFo6LMFk80I5Koou+omS/eQJ/pNEffRsJvL8WwgHN1wwKNT8/ChJQpb3NtgVzGFd6O /ABNTCVQOdOGBHWXdhN5EzVjXz4wTvC6NNWQtI97IXKm+GU5GJYEXuEkerfz/r81fevp mu3kXVyxlS2yHKX50KS6ZL6P4EbiByDDtiF04D7+W2rDsK2Wzzn0S8Xpkk86oC+hy2uo LN+Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date; bh=K3HPEh20zVmrGKiXar9HZ16KvEtCevayWmyQjTGhddc=; b=N+zu4yMscwrFMqEVQlMaMqc5lMcmL/ZhK1NhqDLkMe1g7L5wV2qgjwAId4SWhia/qW BQgcAP9i+r02yMrQkjzsC6jEwwg3UF11CTwpW3Tt+/2zKdVjLU4nD9sfhAdyvDv0cOCi wiW8yGhEbOns6NjYnTDWE/kGYhBtgMpLIuDpH37A93cCnIBTEWWAD2v3c7N/dQOiOP+m 7KH1wN3RcmcdXH9u1RJSgmz8M/tYtacqovglDaMmus2kA7n8btPJgn9SQ9wUOFQwV/vA eIJB1hsnbiNASqNEj2ppxQKTS3M69JRRSXAaMRrm4VLaS6BBJ5Pg8rjTyhE8KNVEcy7c 9WBA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id n10si10734450ejb.539.2020.07.20.08.54.57; Mon, 20 Jul 2020 08:55:19 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731398AbgGTPyz (ORCPT + 99 others); Mon, 20 Jul 2020 11:54:55 -0400 Received: from verein.lst.de ([213.95.11.211]:47608 "EHLO verein.lst.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1731607AbgGTPyt (ORCPT ); Mon, 20 Jul 2020 11:54:49 -0400 Received: by verein.lst.de (Postfix, from userid 2407) id 4782D68AFE; Mon, 20 Jul 2020 17:54:43 +0200 (CEST) Date: Mon, 20 Jul 2020 17:54:41 +0200 From: Christoph Hellwig To: Nick Hu , Greentime Hu , Vincent Chen , Paul Walmsley , Palmer Dabbelt , Andrew Morton , Linus Torvalds Cc: linux-arch@vger.kernel.org, linux-riscv@lists.infradead.org, linux-kernel@vger.kernel.org Subject: [PATCH 0/6] arm: don't call addr_limit_user_check for nommu Message-ID: <20200720155441.GA13067@lst.de> References: <20200714105505.935079-1-hch@lst.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20200714105505.935079-1-hch@lst.de> User-Agent: Mutt/1.5.17 (2007-11-01) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On arm nommu kernel use the same constant for USER_DS and KERNEL_DS, and seqment_eq always returns false. With the current check in addr_limit_user_check that works by accident, but when replacing seqment_eq with uaccess_kerne it will fail. Just remove the not needed check entirely. Signed-off-by: Christoph Hellwig Reported-by: Guenter Roeck --- Andrew: this should preferably go before the other patches in this series. arch/arm/kernel/signal.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/arch/arm/kernel/signal.c b/arch/arm/kernel/signal.c index ab2568996ddb0c..c9dc912b83f012 100644 --- a/arch/arm/kernel/signal.c +++ b/arch/arm/kernel/signal.c @@ -713,7 +713,9 @@ struct page *get_signal_page(void) /* Defer to generic check */ asmlinkage void addr_limit_check_failed(void) { +#ifdef CONFIG_MMU addr_limit_user_check(); +#endif } #ifdef CONFIG_DEBUG_RSEQ -- 2.27.0