Received: by 2002:a25:868d:0:0:0:0:0 with SMTP id z13csp3241631ybk; Mon, 18 May 2020 22:52:44 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyplRU82RNx68lYA8SVJ9aR8NDvP8Wtp2MTGn9gkU4tNdM5SaM2V6/GOIPRZv2mHt3DjEHZ X-Received: by 2002:a17:906:dbc9:: with SMTP id yc9mr17821854ejb.157.1589867563842; Mon, 18 May 2020 22:52:43 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1589867563; cv=none; d=google.com; s=arc-20160816; b=InF9rq3+k5x8GE4gV2YYTd90K3ABv8IRXZtmNrelefhLqUKKRX/De3GFZQxmKIYE5y B4U/1zFo/OP98FT3GnstY9IqY0fd0gWhbSJsrkVsqeP8BQMv5gKE+GCU4TUwCiFeAS8H /ufFP4BHKLdXOJZ2wfqGAZL+aEDX02+wv0uGofFh2y/rcGYWkGL1b1aTeaXtIE8gJ+ro UWFVHAXTrbA2idTmOm+JsXtjNm0/7o3eP47l0BY4+6EoqDrGadyWocCqAoh/WSpJZS0E kp8khYhTNuBICtqpW9EBFU5swFK59XJoiKVrkVooKiVUhnvk0mhzAEwWNzhZmsl8WAfh a2GA== 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=5AD0CaSxtiXTEzH/0Rwz9kKCf2FDUb8mMN5fyHux/Ww=; b=huIYfvdzgVZ3n6kW+rPBzQiRkeSUutV4Sk2SxW2F26PxtHZkBuCUImLkPmJSkvPpOJ tWWgp5rOEPbPqefUp+8JsSftFr9kJE9dzMaKHvvev1jT/+pHl5fezpdWE1gWMBIWNsTJ 6vpn7UV5FvbAQEZFPQH4qTk9lbHBaNU569DPJ+BKXl5U448ug7KWckV7s+Q6JAsRpxja HBHBxTrHMB8qE4XYwpiV2jtKeMl9KSHQf2A34AHXcByv6cQbOxPabVK1BQnkCKaiO22W VeJZJ2uLWqngfCXzixnaCXGglONW3nnP8ZIPYw4U4L1zKlW5dC03584yP/jocxOcOqAB NguA== 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 k13si1248593edv.394.2020.05.18.22.52.22; Mon, 18 May 2020 22:52:43 -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 S1728866AbgESFuU (ORCPT + 99 others); Tue, 19 May 2020 01:50:20 -0400 Received: from verein.lst.de ([213.95.11.211]:42358 "EHLO verein.lst.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728285AbgESFuN (ORCPT ); Tue, 19 May 2020 01:50:13 -0400 Received: by verein.lst.de (Postfix, from userid 2407) id B2C5568B02; Tue, 19 May 2020 07:50:09 +0200 (CEST) Date: Tue, 19 May 2020 07:50:09 +0200 From: Christoph Hellwig To: Daniel Borkmann Cc: Christoph Hellwig , x86@kernel.org, Alexei Starovoitov , Masami Hiramatsu , Linus Torvalds , Andrew Morton , linux-parisc@vger.kernel.org, linux-um@lists.infradead.org, netdev@vger.kernel.org, bpf@vger.kernel.org, linux-mm@kvack.org, linux-kernel@vger.kernel.org Subject: Re: clean up and streamline probe_kernel_* and friends v2 Message-ID: <20200519055009.GB23853@lst.de> References: <20200513160038.2482415-1-hch@lst.de> <10c58b09-5ece-e49f-a7c8-2aa6dfd22fb4@iogearbox.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <10c58b09-5ece-e49f-a7c8-2aa6dfd22fb4@iogearbox.net> 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 Thu, May 14, 2020 at 01:04:38AM +0200, Daniel Borkmann wrote: > Aside from comments on list, the series looks reasonable to me. For BPF > the bpf_probe_read() helper would be slightly penalized for probing user > memory given we now test on copy_from_kernel_nofault() first and if that > fails only then fall back to copy_from_user_nofault(), but it seems > small enough that it shouldn't matter too much and aside from that we have > the newer bpf_probe_read_kernel() and bpf_probe_read_user() anyway that > BPF progs should use instead, so I think it's okay. > > For patch 14 and patch 15, do you roughly know the performance gain with > the new probe_kernel_read_loop() + arch_kernel_read() approach? I don't think there should be any measurable difference in performance for typical use cases. We'll save the stac/clac pair, but that's it. The real eason is to avoid that stac/clac pair that opens up a window for explots, and as a significant enabler for killing of set_fs based address limit overrides entirely.