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 Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 80940C43334 for ; Mon, 11 Jul 2022 03:58:39 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229547AbiGKD6h (ORCPT ); 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 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.