Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp4620267pxj; Wed, 12 May 2021 09:23:18 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxijXFD2Aalpyt/sIUpimzDnLTL0lqmm11kToULLQ+ZK9Oe+loXD0Y4mKr7JNCCRLGEEM1l X-Received: by 2002:a2e:9116:: with SMTP id m22mr29187751ljg.176.1620836597997; Wed, 12 May 2021 09:23:17 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1620836597; cv=none; d=google.com; s=arc-20160816; b=CFYWpMhZBijSRnE1/EbzJtbsP1gpXvZq1XA6P2mFcu0G19uBjciq+FQaN+0s7JQlI+ i3hmHGENZq/NGxyMrSVezR5cBQScyTE+krVIUS3obR5+V4UQ1V89M/0mqgzlclJVGhR0 xgfzS0FVZinB936CNidfjXJzg5uCd7IdxMc+n1uav2/28GfnTz1Pa/e6EUaCNo/ZlCwn IBX/FKbsYsCgAt+7siPnbBib1zP7QnEbpAYNhJNU+YaDcgJgOpZ24bME4t5xv8lZkyXw k/r+P9Qg3HfLIRTlcANW1go2hXB8QS/fs0eZ/Y42y+GxaApYJrjPDEs2koiJLNzLA6Xr GB1A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=fAeMjigX5Gc4TmhXHOgfn8p27gJdaMrprJgbCJJyR+0=; b=e6coVCa1K1UYAaNJzz1IDqEQIEQ0inWcWmKwWano/v8GDScLtJmV9OSrtMeXI0Ujao 8I0oyzgnPyiswXOSNlUmDdWI7LqqFovHTsVXmOnCMFOqtYmID4cbX1T8WrdqNpCAjth8 qu+e5UQA563mZFetwVMnuWdJT7TgrnhYo3eG9jvf+yZYCCG3z4ZqetTGTeLw2ruCLzdU cO19Rbgz1NGZpaLxwfQmXHrM9pQ8gN0DDf/JdwwZWPmWgv1SHIcxAH5MRq7ng0xXknGl yYXHsmhANZKKILqFRODpm4V6z1E+msW0Ftrec5nKI9jIdd2e7nZU0xOvRqh0TNrfRKN7 6p/Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=QqM2lZkr; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id x42si384028lfa.187.2021.05.12.09.22.47; Wed, 12 May 2021 09:23:17 -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; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=QqM2lZkr; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S240494AbhELQSK (ORCPT + 99 others); Wed, 12 May 2021 12:18:10 -0400 Received: from mail.kernel.org ([198.145.29.99]:49218 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235083AbhELPfR (ORCPT ); Wed, 12 May 2021 11:35:17 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 83DF561C3D; Wed, 12 May 2021 15:17:50 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1620832671; bh=Glof5O4sA2+vKJ1MWao+oo/rpjKVQSRsL/EHOjHIhQ8=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=QqM2lZkrobjXkrKQd5O+k6ZO95lU5ZBRgumvJUbGtEoRkKFzgV6qlyeqRljg+5yGx oo3t441oXXhyso7B1AQs5pvfXXcbr8objQ+U6BjmhwwNq7Je2gI554/IQTDGi+nhus Cg+I0gAiRLRlvfXcqK8E/OiqfV4SjO9HUP3P4IHI= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Tiezhu Yang , Thomas Bogendoerfer , Sasha Levin Subject: [PATCH 5.10 376/530] MIPS/bpf: Enable bpf_probe_read{, str}() on MIPS again Date: Wed, 12 May 2021 16:48:06 +0200 Message-Id: <20210512144832.135720733@linuxfoundation.org> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20210512144819.664462530@linuxfoundation.org> References: <20210512144819.664462530@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Tiezhu Yang [ Upstream commit 66633abd0642f1e89d26e15f36fb13d3a1c535ff ] After commit 0ebeea8ca8a4 ("bpf: Restrict bpf_probe_read{, str}() only to archs where they work"), bpf_probe_read{, str}() functions were no longer available on MIPS, so there exist 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 ARCH_HAS_NON_OVERLAPPING_ADDRESS_SPACE should be restricted to archs with non-overlapping address ranges, but they can overlap in EVA mode on MIPS, so select ARCH_HAS_NON_OVERLAPPING_ADDRESS_SPACE if !EVA in arch/mips/Kconfig, otherwise the bpf old helper bpf_probe_read() will not be available. This is similar with the commit d195b1d1d119 ("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 Signed-off-by: Thomas Bogendoerfer Signed-off-by: Sasha Levin --- arch/mips/Kconfig | 1 + 1 file changed, 1 insertion(+) diff --git a/arch/mips/Kconfig b/arch/mips/Kconfig index 2000bb2b0220..1917ccd39256 100644 --- a/arch/mips/Kconfig +++ b/arch/mips/Kconfig @@ -6,6 +6,7 @@ config MIPS select ARCH_BINFMT_ELF_STATE if MIPS_FP_SUPPORT select ARCH_HAS_FORTIFY_SOURCE select ARCH_HAS_KCOV + select ARCH_HAS_NON_OVERLAPPING_ADDRESS_SPACE if !EVA select ARCH_HAS_PTE_SPECIAL if !(32BIT && CPU_HAS_RIXI) select ARCH_HAS_TICK_BROADCAST if GENERIC_CLOCKEVENTS_BROADCAST select ARCH_HAS_UBSAN_SANITIZE_ALL -- 2.30.2