From mboxrd@z Thu Jan 1 00:00:00 1970 From: Al Viro Subject: Re: [PATCH 04/14] x86: use more conventional access_ok() definition Date: Mon, 14 Feb 2022 20:17:07 +0000 Message-ID: References: <20220214163452.1568807-1-arnd@kernel.org> <20220214163452.1568807-5-arnd@kernel.org> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: 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=Vxgcn7ma0+r7tUtfwEzcwdhvM3ldj5E80LPXTkZJw3k=; b=1+L1RgJJwmRDsY OjmZIjYKU+1pWjD45mWqsrUK5fi+J31woCpf4JINrUQn9CkwQpHswysuvJrBuSzErDzR2oiuTSGPp +8A8Z3fRogj0v1LrsgWflet4AHvdovere8vhd8PO9LeChkRgwaz6CEPUBrPLtMr2MjQ4cClIyZVQu G7pTdrMHrXQXKHjumRi1Y8zm8aZOLNEsv+ElFN1CtAsZWr0q/HNzdzlsHhhDdGE6iPddTd+4L4i/0 eW6hgvHMUxGi/n4k1VUtXAj+NC8eCNevJMaoE7euo5XZtVEcYC7QDSHOdT1gahnUgW2J3TDcdRf1k vtwOvpKk5R6amhm/syNQ==; Content-Disposition: inline In-Reply-To: List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-riscv" Errors-To: linux-riscv-bounces+glpr-linux-riscv=m.gmane-mx.org@lists.infradead.org To: Linus Torvalds Cc: Arnd Bergmann , Christoph Hellwig , 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 On Mon, Feb 14, 2022 at 12:01:05PM -0800, Linus Torvalds wrote: > On Mon, Feb 14, 2022 at 11:46 AM Arnd Bergmann wrote: > > > > As Al pointed out, they turned out to be necessary on sparc64, but the only > > definitions are on sparc64 and x86, so it's possible that they serve a similar > > purpose here, in which case changing the limit from TASK_SIZE to > > TASK_SIZE_MAX is probably wrong as well. > > x86-64 has always(*) used TASK_SIZE_MAX for access_ok(), and the > get_user() assembler implementation does the same. > > I think any __range_not_ok() users that use TASK_SIZE are entirely > historical, and should be just fixed. IIRC, that was mostly userland stack trace collection in perf. I'll try to dig in archives and see what shows up - it's been a while ago...