Received: by 2002:a05:6a10:9848:0:0:0:0 with SMTP id x8csp60259pxf; Wed, 17 Mar 2021 15:23:28 -0700 (PDT) X-Google-Smtp-Source: ABdhPJx4KFbufIUYwuwfj48iyrZ/1J3W3pANucg36hYFlvaakFaTDUOktpGut4PtYy3cwDHAfJNM X-Received: by 2002:a17:906:a106:: with SMTP id t6mr38195124ejy.63.1616019808144; Wed, 17 Mar 2021 15:23:28 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1616019808; cv=none; d=google.com; s=arc-20160816; b=QjYOIAu1mNw7trdLC/qQwzoWw9cPy2R7ZprGLyUeSt1fAkG7P6LaUGjoVfACbEE0Kx qt2QmRdguVIT4rFDeZNTzowltxm1B4odaLAIc4v4Vd/EUWkv5ouZqrQR3J7WEbQ2A6Ye AiHVJtB0P0LYGcLidtk8fSuFz1YI0/fHoZf69Z82wwkRWplspBPsCXG0jH8rAkiVNopE wtaPbp608MaZd93dhBCJq0LWp4skYYVLkfG1kBpp3k5ZatuBvXzgXvS33PIpMtwemxwo rOKshdVfKpeyKxUzz77fSgV3q0jQOZp0mORKCc5h2gQ9B+RNyrLdCR8DQkA8+aZhqRUS n+WQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:content-language :in-reply-to:mime-version:user-agent:date:message-id:from:references :cc:to:subject; bh=QCHhOhpBBXx29AnN4c+2Bo4tfd6W+O19nuah9upDpvk=; b=xyjhl9nyfmZ2vch7YyPQ9Q8+elwE1/Mx1L80Mz+U4wCuX0UH+Qqm/8XugOFZ7+EtLt PSiz4t63e0jE910Tz7IPnny7C4PYSYAtrbJhjQHPF47M3XcEEW4WlwoUlhUljeFenTdd chX2wlWBlvW4WxJ9wls5Nc6MInl+WQsTbiYoK9hI573zRJIcrz3IDKVQn/o+rx+SwVQf rSnJ3BOcR7mQDeIgoT7IMRQG0ktcFHGro2oY9+7HbGyMZP2pEgZb7EfWSPxCpZB928O8 7Y/COJtcpEouBeAfAkVBqxsVg0/FPoC3uGU1Q5Rzp7mabFI4CunWNFzzIxt5sppeCWQ7 z8+A== 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 ay21si109144ejb.527.2021.03.17.15.23.05; Wed, 17 Mar 2021 15:23:28 -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 S230145AbhCQWTT (ORCPT + 99 others); Wed, 17 Mar 2021 18:19:19 -0400 Received: from www62.your-server.de ([213.133.104.62]:54944 "EHLO www62.your-server.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230041AbhCQWSv (ORCPT ); Wed, 17 Mar 2021 18:18:51 -0400 Received: from sslproxy06.your-server.de ([78.46.172.3]) by www62.your-server.de with esmtpsa (TLSv1.3:TLS_AES_256_GCM_SHA384:256) (Exim 4.92.3) (envelope-from ) id 1lMeV7-0004K4-8v; Wed, 17 Mar 2021 23:18:49 +0100 Received: from [85.7.101.30] (helo=pc-9.home) by sslproxy06.your-server.de with esmtpsa (TLSv1.3:TLS_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1lMeV7-000Rtu-2k; Wed, 17 Mar 2021 23:18:49 +0100 Subject: Re: [PATCH] MIPS/bpf: Enable bpf_probe_read{, str}() on MIPS again To: Tiezhu Yang , Thomas Bogendoerfer Cc: linux-mips@vger.kernel.org, bpf@vger.kernel.org, linux-kernel@vger.kernel.org, Xuefeng Li References: <1615965307-6926-1-git-send-email-yangtiezhu@loongson.cn> From: Daniel Borkmann Message-ID: <6b239565-8fbb-d183-6a4d-13fc90af3e27@iogearbox.net> Date: Wed, 17 Mar 2021 23:18:48 +0100 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: <1615965307-6926-1-git-send-email-yangtiezhu@loongson.cn> 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.4/26111/Wed Mar 17 12:08:39 2021) Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 3/17/21 8:15 AM, Tiezhu Yang wrote: > After commit 0ebeea8ca8a4 ("bpf: Restrict bpf_probe_read{, str}() only to > archs where they work"), bpf_probe_read{, str}() functions were not longer > available on MIPS, so there exists some errors when running bpf program: > > root@linux:/home/loongson/bcc# python examples/tracing/task_switch.py > bpf: Failed to load program: Invalid argument > [...] > 11: (85) call bpf_probe_read#4 > unknown func bpf_probe_read#4 > [...] > Exception: Failed to load BPF program count_sched: Invalid argument > > So select ARCH_HAS_NON_OVERLAPPING_ADDRESS_SPACE in arch/mips/Kconfig, > otherwise the bpf old helper bpf_probe_read() will not be available. > > This is similar with the commit d195b1d1d1196 ("powerpc/bpf: Enable > bpf_probe_read{, str}() on powerpc again"). > > Fixes: 0ebeea8ca8a4 ("bpf: Restrict bpf_probe_read{, str}() only to archs where they work") > Signed-off-by: Tiezhu Yang Thomas, I presume you pick this up via mips tree (with typos fixed)? Or do you want us to route the fix via bpf with your ACK? (I'm fine either way.) Thanks, Daniel