Received: by 2002:a25:23cc:0:0:0:0:0 with SMTP id j195csp559030ybj; Tue, 5 May 2020 03:50:18 -0700 (PDT) X-Google-Smtp-Source: APiQypLNBhC301N7BUFdKauOs8Vjp0XEg/C5xgw8cVJBlm8WiH7NOJqEWM/AfzrgtZfTY3XvhAqV X-Received: by 2002:a17:906:30c3:: with SMTP id b3mr2117522ejb.126.1588675818090; Tue, 05 May 2020 03:50:18 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1588675818; cv=none; d=google.com; s=arc-20160816; b=wWddufo/DMmLhK1IQnmEZ0DE+3POOGlqBwlt2Z6A0zps3nbaUZx3fnYvHWTICqAd0U 173e/IcZ+711dfIl7g7qONTs6MjdEHW4zccu+yMnnlhww6pWI0zr0nWfeGNVuJbQe9w4 RHxQufbm8WJ3lrWc7YvAxNN9gfwZJtu4Z46n80u9qtWp9FmQoYSGRcz5kG2RWWx6nSQo vOTX+me88+fUphLJgzSvOOIfW7TBTahmglKOtTa+PhAI+qoOj4AO5D46xYU8/gPx16lV eou2Wk7YWeLcUt20+WpBpIwvx33q6Plcy1cq9ArMXVfPqxGP21841vnM8+dETd92/9CR 3P7g== 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=SPi060PTcsixbYSoF8d43wUhUVpUw8WQcyFKxpIUR98=; b=isndxgcOm74bszI612gwo4I0z42jcX4O9V7M2haxUpedrAKgsvZ5+Y25WMwcYKtkCw t/NBLSj51nyg4iZdfMYMMft3HOpKR6hyiH1R1fwKx+LWGDE2i5sx/hxlP00ZZWITcwdC aymihDKVg0Z/jiqJ3hDyBC/uMJdEAphL27BYzl5pVibVp9SDyKRu5G4dGC2epbx0XQyj Gu2NVMqmWhUAkJpR5cj4uAsGhxUSB7NELfNGmXf7F3zyiJqUWdc5auSGrX7dmfn8BgHQ BF8+CjCjmOL0adj35xDE6qAtkB/xvup9eKL13oAcxIydAVE5VE8verHmt0disBSZPNfP z3qg== 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 d4si1129623edy.155.2020.05.05.03.49.55; Tue, 05 May 2020 03:50:18 -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 S1728741AbgEEKsL (ORCPT + 99 others); Tue, 5 May 2020 06:48:11 -0400 Received: from verein.lst.de ([213.95.11.211]:34634 "EHLO verein.lst.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728238AbgEEKsL (ORCPT ); Tue, 5 May 2020 06:48:11 -0400 Received: by verein.lst.de (Postfix, from userid 2407) id CCFFE68C4E; Tue, 5 May 2020 12:48:05 +0200 (CEST) Date: Tue, 5 May 2020 12:48:05 +0200 From: Christoph Hellwig To: Jann Horn Cc: Andrew Morton , Linus Torvalds , Christoph Hellwig , linux-kernel@vger.kernel.org, linux-mm@kvack.org, linux-fsdevel@vger.kernel.org, Alexander Viro , "Eric W . Biederman" , Oleg Nesterov , Russell King , linux-arm-kernel@lists.infradead.org, Mark Salter , Aurelien Jacquiot , linux-c6x-dev@linux-c6x.org, Yoshinori Sato , Rich Felker , linux-sh@vger.kernel.org Subject: Re: [PATCH v2 1/5] binfmt_elf_fdpic: Stop using dump_emit() on user pointers on !MMU Message-ID: <20200505104805.GA17400@lst.de> References: <20200429214954.44866-1-jannh@google.com> <20200429214954.44866-2-jannh@google.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20200429214954.44866-2-jannh@google.com> 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 Wed, Apr 29, 2020 at 11:49:50PM +0200, Jann Horn wrote: > dump_emit() is for kernel pointers, and VMAs describe userspace memory. > Let's be tidy here and avoid accessing userspace pointers under KERNEL_DS, > even if it probably doesn't matter much on !MMU systems - especially given > that it looks like we can just use the same get_dump_page() as on MMU if > we move it out of the CONFIG_MMU block. Looks sensible. Did you get a chance to test this with a nommu setup?