Received: by 2002:a25:6193:0:0:0:0:0 with SMTP id v141csp4190846ybb; Tue, 7 Apr 2020 02:34:45 -0700 (PDT) X-Google-Smtp-Source: APiQypLRvKsoa18sh4P/RC6oQzg46v336YoMQkE+pKM8pHd/3tVpTQpI2CQmDqnR4NRtXSR16FFq X-Received: by 2002:a9d:264a:: with SMTP id a68mr794785otb.176.1586252085352; Tue, 07 Apr 2020 02:34:45 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1586252085; cv=none; d=google.com; s=arc-20160816; b=XaaCEdJycOIrAiYOGoBGjh6D5mc5cUYhKoAHkj8ndJuXtU+AykSeY9iqWAO4cdBm4k Wtkz9+B2CGIgsRGq4inMvtBTqjGBU0mbKEMkBQ2nKog+wxyTeD8ajzvIcwpmY7P0uLmq C/sH6VB05xTmB5oLYOXPSG2mF6dO0Id8F3LpR2RCQLrc6cxM7IoAJbp113Qf07r3hhPw yKF2a9nTe+bIRCsXwCDU2JRAeCGCfSZte/FO58Vdq+37a0dNfYmuOKebCevvEL5Q74G0 lTmzMTgXCkDBpWBb2mblsR6NE9j4hcJmN/wyAeQm+ZjLLZfev+agGR5WyWQijP5uzaHJ DBvA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :dkim-signature; bh=ALLpFhoRwFcaZVxVwmpORwXzqCLllgkOW88XxNP1czw=; b=Q1gf8db53fG8nYFZ1Nq+oKoZzXPvHXlGxhTWlhkVnrtMXjhdWNBR6cODJefllgfR4N SpnIVmRCaoU1HdBuLYh8VEqwGpAU7Pm7BmAmgZOe99G+cFnWe0kuf87BVHEHRfZHPbUA 3ZPfkkpjAP6nLTqeMRrfA/PgZ6iH+DhxFYSHmuKccejCjzCpF41AxMQkDmG+4RV5VFIK TOEL78J/qYSEex0YHLGIanDB5sNiZUXnlCio7W0+YayyKAD0scCar1kifdbpfOkuEakk LjUBFogTucrHCVHtrRRkm5vuO3GXBL1qiLF6GrGHpE9RKHyXtXBJWjNyeqk+BpDS8874 rr7Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@infradead.org header.s=bombadil.20170209 header.b=cXqt2Apb; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id l6si1088058otn.219.2020.04.07.02.34.33; Tue, 07 Apr 2020 02:34:45 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=fail header.i=@infradead.org header.s=bombadil.20170209 header.b=cXqt2Apb; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728100AbgDGJd7 (ORCPT + 99 others); Tue, 7 Apr 2020 05:33:59 -0400 Received: from bombadil.infradead.org ([198.137.202.133]:42344 "EHLO bombadil.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726716AbgDGJd6 (ORCPT ); Tue, 7 Apr 2020 05:33:58 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20170209; h=In-Reply-To:Content-Type:MIME-Version :References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description; bh=ALLpFhoRwFcaZVxVwmpORwXzqCLllgkOW88XxNP1czw=; b=cXqt2Apb0IYUWCtEG/qZtDMcnU GDRnm2aNxxGoLxkuAR2tr8mHb6Rbt51JplL2wsHcw0XXes/p9vuKk2dRBjziu0pj+AMLXBIVXd5MB gvV51G/O02Ml2mfOfroshmH9vvT7b25V5u29s96NWMaLGhnQ3eRcS49vwwXdNV7XAE1sQ6TTUm338 r+cGgmsDwefFnOAQBzqSeJN/mQh9Y7/rvYUJ2/a5zxNSS+8KqyAQ55Tz9rvkDZQAS6eOCTxFKzMz0 EHTPlUb/iGsSM621kD101DfYjXLrGVEVLN5aOlUfGqxkJf7cU2Lpm3CWVfvPvyK+JQrjpvISps5WE 4y29vzZQ==; Received: from hch by bombadil.infradead.org with local (Exim 4.92.3 #3 (Red Hat Linux)) id 1jLkcH-0006yf-F2; Tue, 07 Apr 2020 09:33:57 +0000 Date: Tue, 7 Apr 2020 02:33:57 -0700 From: Christoph Hellwig To: Daniel Borkmann Cc: Christoph Hellwig , Alexei Starovoitov , Linus Torvalds , Masami Hiramatsu , x86@kernel.org, linux-kernel@vger.kernel.org, bpf@vger.kernel.org, bgregg@netflix.com Subject: Re: Question on "uaccess: Add strict non-pagefault kernel-space read function" Message-ID: <20200407093357.GA24309@infradead.org> References: <20200403133533.GA3424@infradead.org> <5ddc8c04-279d-9a14-eaa7-755467902ead@iogearbox.net> <20200404093105.GA445@infradead.org> <2adc77e1-e84d-f303-fd88-133ec950c33f@iogearbox.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <2adc77e1-e84d-f303-fd88-133ec950c33f@iogearbox.net> X-SRS-Rewrite: SMTP reverse-path rewritten from by bombadil.infradead.org. See http://www.infradead.org/rpr.html Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Apr 07, 2020 at 11:03:23AM +0200, Daniel Borkmann wrote: > > ... where archs with non-overlapping user and kernel address range would > only end up having to implementing kernel_range_ok() check. Or, instead of > a generic kernel_range_ok() this could perhaps be more probing-specific as > in probe_kernel_range_ok() where this would then also cover the special > cases we seem to have in parisc and um. Then, this would allow to get rid > of all the __weak aliasing as well which may just be confusing. I could look > into coming up with something along these lines. Thoughts? FYI, this is what I cooked up a few days ago: http://git.infradead.org/users/hch/misc.git/shortlog/refs/heads/maccess-fixups Still misses the final work to switch probe_kernel_read to be the strict version. Any good naming suggestion for the non-strict one?