Received: by 2002:ad5:4acb:0:0:0:0:0 with SMTP id n11csp2966518imw; Sun, 10 Jul 2022 21:14:16 -0700 (PDT) X-Google-Smtp-Source: AGRyM1u3XFFpYpbRf/+vMcNFJ7gvdu/xRXL4f11wXzSbSyJ8r64gfVrTFOoMD4Wh4tjYDWkLHx7s X-Received: by 2002:a05:6a00:1954:b0:525:7db8:ee28 with SMTP id s20-20020a056a00195400b005257db8ee28mr16037608pfk.29.1657512856742; Sun, 10 Jul 2022 21:14:16 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1657512856; cv=none; d=google.com; s=arc-20160816; b=xJjG+kLRjq1YVOkUD1G2MNDpNYd/NdU9KUd2/LnN1fov9ipi2QoNc7GraH3ZdS2RBT bbsRrS8xDSUeNXXEjUmsle8GTXf5bZ/YPobzSeLq8oTqjmqeaMBCBOuTP6hwz3yqkisC W7J6HatjaxkOUV+s5bxz+jE5iMwrAOzpQH5v6HrF5Xih4qNPDPRCziIGhqdog1DnNTFJ UbiAmnUh8WgpyooqAeMvwuYgSvLi7dNv0Sd8FIVpBQZkYoCjReT0rkWPOIX89Czjdcjv T0PcFabko1pv3gZHlm+ynd4FVfvQP5S9gewfL5y5EyTQcb232K7pY5bRAFX/4B1RAcKg 3RxQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=UI65JIxER2tdKqXX5LgQnx9rno5hEDFoEXbwkKGLcHY=; b=RzzSopefzeIQavtsZCrWk7cflNErDfgzPtXYo+4wua4ppXvUXMibEGPeft7Q6UcLF/ QiMr4dukwZN7/ygkjKLt2vMN4zbmG9Jq1J14g3ESqbJ8A9eB7OX7z1WcPJWY8i8B2koR KCA37OBL1HNoh+h57CepEPBN3nRzWkPLLM5vrFw4HOcpX4idrXfI8wpKCJuf8yva9PbU GgFuMNZtofWHF9z4Qd/74QXgaZhaKDrk4jakymzh0spvPt9X/cBeYTb185Na5If5sRTA pmZfeKd5g+OWNtGQqGnrhJb1Tuj6RicFKNV24fCusFgGE0WLreO2R/CXE8ZEfEIpkxJk S9Lg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@infradead.org header.s=bombadil.20210309 header.b=hpKH2kp8; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id r25-20020a635d19000000b0040dfaf77438si10079022pgb.559.2022.07.10.21.14.05; Sun, 10 Jul 2022 21:14:16 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@infradead.org header.s=bombadil.20210309 header.b=hpKH2kp8; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229544AbiGKD6h (ORCPT + 99 others); Sun, 10 Jul 2022 23:58:37 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49670 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229450AbiGKD6e (ORCPT ); Sun, 10 Jul 2022 23:58:34 -0400 Received: from bombadil.infradead.org (bombadil.infradead.org [IPv6:2607:7c80:54:3::133]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7C24ACFE; Sun, 10 Jul 2022 20:58:33 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20210309; 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=UI65JIxER2tdKqXX5LgQnx9rno5hEDFoEXbwkKGLcHY=; b=hpKH2kp8JCl9vOIpuuK4KJbi8C wH87kj29tzhnOJPZstNcwSDnYNphWdbRNeC6q6aK9wQUCoKk7eZ7Yic+AtFlppVyVQv151sSmIkRf dylieWAGpxwAOgkxfaLtE8CCRNxzSvYQFV/tmuxN1gxR/cZ6vWssEG1CbyZOduDxn0K80ITf/YRzv Qx4H7oJe07brUh5RHBPfPLdtjtAc8WT7BmX40bA+Au+E87Xibp6h+drk8L2Rgr7rvQCtWZ7w3iH1R urCexhWHnOKg7HHIaniJwieV6VeQ+Adjy+JX1HWPZdCuISjr3ZyLNJ1w3iOC0jVqAO2u6O5VUe0ZW rheRZhCg==; Received: from hch by bombadil.infradead.org with local (Exim 4.94.2 #2 (Red Hat Linux)) id 1oAkYr-00Flmi-Tu; Mon, 11 Jul 2022 03:58:17 +0000 Date: Sun, 10 Jul 2022 20:58:17 -0700 From: Christoph Hellwig To: Yixun Lan Cc: Christoph Hellwig , Yonghong Song , Andrii Nakryiko , Alan Maguire , Palmer Dabbelt , linux-riscv@lists.infradead.org, Paul Walmsley , Albert Ou , Alexei Starovoitov , Daniel Borkmann , Andrii Nakryiko , Martin KaFai Lau , Song Liu , John Fastabend , KP Singh , open list , Networking , bpf Subject: Re: [PATCH] RISC-V/bpf: Enable bpf_probe_read{, str}() Message-ID: References: <20220703130924.57240-1-dlan@gentoo.org> <712c8fac-6784-2acd-66ca-d1fd393aef23@fb.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-SRS-Rewrite: SMTP reverse-path rewritten from by bombadil.infradead.org. See http://www.infradead.org/rpr.html X-Spam-Status: No, score=-2.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_LOW,SPF_HELO_NONE, SPF_NONE,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sat, Jul 09, 2022 at 04:48:05PM +0800, Yixun Lan wrote: > never mind, I think the logic is quite clear, we can do something in bcc: > > 1) adopt new _{kernel,user} interface whenever possible, this will > work fine for all arch with new kernel versions > > 2) for old kernel versions which lack the _{kernel,user} support, > fall back to old bpf_probe_read(), but take care of the Archs which > have overlaping address space - like s390, and just error out for it Yes, that is the right thing to do.