From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.3 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,USER_AGENT_SANE_1 autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 6B129C433DF for ; Tue, 19 May 2020 05:50:14 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 345E120709 for ; Tue, 19 May 2020 05:50:14 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 345E120709 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=lst.de Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id BEFF1900003; Tue, 19 May 2020 01:50:13 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id BA076900002; Tue, 19 May 2020 01:50:13 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id AB5D3900003; Tue, 19 May 2020 01:50:13 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0155.hostedemail.com [216.40.44.155]) by kanga.kvack.org (Postfix) with ESMTP id 923D7900002 for ; Tue, 19 May 2020 01:50:13 -0400 (EDT) Received: from smtpin28.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay01.hostedemail.com (Postfix) with ESMTP id 4DBA9180AD81A for ; Tue, 19 May 2020 05:50:13 +0000 (UTC) X-FDA: 76832393106.28.verse68_3c13a408e8714 X-HE-Tag: verse68_3c13a408e8714 X-Filterd-Recvd-Size: 2255 Received: from verein.lst.de (verein.lst.de [213.95.11.211]) by imf20.hostedemail.com (Postfix) with ESMTP for ; Tue, 19 May 2020 05:50:12 +0000 (UTC) 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) X-Bogosity: Ham, tests=bogofilter, spamicity=0.000012, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: 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.