Received: by 2002:a25:6193:0:0:0:0:0 with SMTP id v141csp1369509ybb; Sat, 4 Apr 2020 02:31:49 -0700 (PDT) X-Google-Smtp-Source: APiQypKcOQn6m2w3Kkk0oB1VHHM8VyJp8O2k/JtoodZMYuf4fv5VKrg6zELtfX7BDy+XZL76DfYJ X-Received: by 2002:a05:6830:1da4:: with SMTP id z4mr9766173oti.5.1585992709784; Sat, 04 Apr 2020 02:31:49 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1585992709; cv=none; d=google.com; s=arc-20160816; b=miQi4hiT/0+qnOuS7eM8yNNA2TB2M/ljYtJDLN7jpWZnplzl3JA5VNVzMBYM9Hj02x eaRM6M+O8HTAJq3bpoVocsbelmVyj9aT/aDW5/R0zB6UbnKN32P9JS1yFOE37FCKJi2c Q+L1A4IfrUo13dgLWZlJov5RHwSt2D2Qj06a8pJ+IyWI7J+Q0lifUX7JVppS+BLOj4Ya jdom5UvC2au1PGfMaGxQsdh+teBIkm3WsBxxcbzf3fIuCovdWmj1Z5ozFr913u/7+PtT wr4NBFr/qXuMuK/MBFJPRtervIHlb4ICNvDXrzIyp1u2wD3xmDk4KQ+EDYCShat1VL8G mcCw== 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=/sDN8Ke+Cehsh/uN1t2+mll/fQTwL9ufE0PBzrXJbro=; b=vQwlMwWQ+MB/rFxbVzqbjE5U8Xs3d0AIHdodN2B/oQdgHAzGQhlwiwUae8Sd/q9rto my9DibLRXPTuHao+M+Zc6nmz3/LLIPLTzEhW0vzZe2Dwr2vfpKn9edYbMsNkLR1ijLtf PS9PlE74oNRKIyqAMqMro1GuQh0HKQxjVZVME0ZTymGa17XyK7HXgEbD8u8LBlwcbcwc z7uTVxNKmzkEKu78hwpKa7HVObnruovGVW/kcFQOyoflbPni2K5xS88VWwl4mVo2SER9 YstGr3zwpOxLeHpu90hrINRyLwB+OJH1ydOnIb0p2DKWIDFqXDeDbn7lInzYZba1k4J9 6+fw== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@infradead.org header.s=bombadil.20170209 header.b=ahXGCGsM; 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 m2si3359165ote.221.2020.04.04.02.31.29; Sat, 04 Apr 2020 02:31:49 -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=ahXGCGsM; 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 S1725995AbgDDJbM (ORCPT + 99 others); Sat, 4 Apr 2020 05:31:12 -0400 Received: from bombadil.infradead.org ([198.137.202.133]:35608 "EHLO bombadil.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725730AbgDDJbL (ORCPT ); Sat, 4 Apr 2020 05:31:11 -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=/sDN8Ke+Cehsh/uN1t2+mll/fQTwL9ufE0PBzrXJbro=; b=ahXGCGsMXZQzecuCtzf8J2uad5 sfhM9qNpndi3bI74K9jw4SfNQHuqEUqm76nFD/bMqYr6yApbaGuyXi/P4EMozK0GsrsWakKZjc3rg Ma5MgwE2gZ+QAEVMn23iXAN6yt1lmAo3Sy9lgdy16bBoYCi4XzKOmxEdz7BbDZ7Xewbh80xlCzw8E WjwFdX0zwGhXzL8YDl2fGli5ZwANa5/0R1MYO4yhRUe1z8fsguag0+JsyqFCw2dEdzMkm4YjOjHtA BxPfUN8Puo93lnOv7uiuz6s1f4O0PtPaJvuqoUHzaE26mqy266MqwT9lNkKT6VS/4lE2BkECjrOVg Towf/Tqw==; Received: from hch by bombadil.infradead.org with local (Exim 4.92.3 #3 (Red Hat Linux)) id 1jKf8r-0005GZ-EB; Sat, 04 Apr 2020 09:31:05 +0000 Date: Sat, 4 Apr 2020 02:31:05 -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: <20200404093105.GA445@infradead.org> References: <20200403133533.GA3424@infradead.org> <5ddc8c04-279d-9a14-eaa7-755467902ead@iogearbox.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <5ddc8c04-279d-9a14-eaa7-755467902ead@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 Fri, Apr 03, 2020 at 04:20:24PM +0200, Daniel Borkmann wrote: > With crazy old functions I presume you mean the old bpf_probe_read() > which is mapped to BPF_FUNC_probe_read helper or something else entirely? I couldn't care less about bpf, this is about the kernel API. What I mean is that your new probe_kernel_read_strict and strncpy_from_unsafe_strict helpers are good and useful. But for this to actually make sense we need to get rid of the non-strict versions, and we also need to get rid of some of the weak alias magic.