Received: by 2002:a25:6193:0:0:0:0:0 with SMTP id v141csp529709ybb; Fri, 3 Apr 2020 07:21:14 -0700 (PDT) X-Google-Smtp-Source: APiQypIgdQ7nBfJMtbgQduOSK8uA8juWhagZ6SXzFzeb536FX0R2nHULPKJeP050rowEO4eNq51o X-Received: by 2002:a05:6830:1d95:: with SMTP id y21mr6778957oti.180.1585923674069; Fri, 03 Apr 2020 07:21:14 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1585923674; cv=none; d=google.com; s=arc-20160816; b=OC1y4AXg4Taztfm5/QV8xzuRYkEV7kCZZSeeqisRCBMmUlJm2NKWI7xGT92rJXLwMj 1V7g5VnnT2fCBRycCdBISTUavtAjjxM9jyCYyxVZPbaJs+7AmYdeyL9GTm8+cA75zQJ5 KKA/wwdcTwULGMoJVYDslD5G3idV/bwVefq35ORTIwzoXy02qsaZOd32v/CX97O+jSD7 7V/e/3kWnUJMezKxOQxwpJD14H32MU8rlFB2LsEChjki5cb8OrNRxJSQghDKTTHFXIlI f+8ZjNVr2dggOju/rebtfcNI3AFTtlW/XLIP7ug0b9iybNa4/Pz70lJRVoPBQwxHZMrc C2Ew== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject; bh=uwqoW5ivlLP5CZWxqEjK+UaRJRhFhRfTlUThatVge9o=; b=Noi/adf+NZAm48NE32vBE9EFb1Mx7hqGUQUeqTDSrylKZgBkGJHonW6GdpjfTBMuNP OIZgzdr1hO8vK/lBC3EOp86+xVnuLCBVqSVakbYCas637QgE+EIUdURZ4h0V4Wf7UFam YlYBYrEnIuxduKNSH+11Cvc9bZoq2gl35ZyYlM+UfZqyTSEE3g6fDOkLff/3LJmJLfKk ycxIjCVUdgtMvaPHghC6FusFG3jgyZjXRiAQUnKcsxmLS5nN1+Xama6QOnla75xCwcC6 RwM6yqVoJBF1W2QabY2VG+7gjl45I7OnFjv8VPKBU+R0ahBdHkNBtKrKtLcizZjxz8Ld M89g== ARC-Authentication-Results: i=1; mx.google.com; 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 t8si3636505ood.64.2020.04.03.07.21.00; Fri, 03 Apr 2020 07:21:14 -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; 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 S2390965AbgDCOUb (ORCPT + 99 others); Fri, 3 Apr 2020 10:20:31 -0400 Received: from www62.your-server.de ([213.133.104.62]:40646 "EHLO www62.your-server.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727927AbgDCOUa (ORCPT ); Fri, 3 Apr 2020 10:20:30 -0400 Received: from sslproxy01.your-server.de ([78.46.139.224]) by www62.your-server.de with esmtpsa (TLSv1.2:DHE-RSA-AES256-GCM-SHA384:256) (Exim 4.89_1) (envelope-from ) id 1jKNBJ-0007Yy-8S; Fri, 03 Apr 2020 16:20:25 +0200 Received: from [178.195.186.98] (helo=pc-9.home) by sslproxy01.your-server.de with esmtpsa (TLSv1.3:TLS_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1jKNBI-000EqM-Uq; Fri, 03 Apr 2020 16:20:24 +0200 Subject: Re: Question on "uaccess: Add strict non-pagefault kernel-space read function" To: Christoph Hellwig Cc: Alexei Starovoitov , Linus Torvalds , Masami Hiramatsu , x86@kernel.org, linux-kernel@vger.kernel.org, bpf@vger.kernel.org, bgregg@netflix.com References: <20200403133533.GA3424@infradead.org> From: Daniel Borkmann Message-ID: <5ddc8c04-279d-9a14-eaa7-755467902ead@iogearbox.net> Date: Fri, 3 Apr 2020 16:20:24 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.7.2 MIME-Version: 1.0 In-Reply-To: <20200403133533.GA3424@infradead.org> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-Authenticated-Sender: daniel@iogearbox.net X-Virus-Scanned: Clear (ClamAV 0.102.2/25770/Thu Apr 2 14:58:54 2020) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Christoph, On 4/3/20 3:35 PM, Christoph Hellwig wrote: [...] > I just stumbled over your above commit, and it really confuses me. > > Not the newly added functions, which seems perfectly sane, but why you > left the crazy old functions in place instead of investing a little > bit of extra effort to clean the existing mess up and switch everyone > to the sane new variants? 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? For the former, basically my main concern was that these would otherwise break existing tools like bcc/bpftrace/.. unfortunately until they are not converted over yet to _strict variants. At least on x86, they would still rely on the broken semantic to probe kernel and user memory with probe_read where it 'happens to work', but not on other archs where the address space is not shared. But once these are fixed, I would love to deprecate these in one way or another. The warning in 00c42373d397 ("x86-64: add warning for non-canonical user access address dereferences") should be a good incentive to switch since people have been hitting it in production as the non-canonical space is sometimes used in user space to tag pointers, for example. Thanks, Daniel