Received: by 2002:a05:6358:c692:b0:131:369:b2a3 with SMTP id fe18csp639253rwb; Tue, 25 Jul 2023 23:47:51 -0700 (PDT) X-Google-Smtp-Source: APBJJlGihZAufFRZXVb+QOqx0cnQStnZaXE88ny7EBLgBQYnS59lfxFMsWKI6pgaqYVSgLLG3URg X-Received: by 2002:a05:6358:592a:b0:135:4003:7851 with SMTP id g42-20020a056358592a00b0013540037851mr1153661rwf.19.1690354071227; Tue, 25 Jul 2023 23:47:51 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1690354071; cv=none; d=google.com; s=arc-20160816; b=Uoc1kcVgnOcjXem6OaK39Tu/5fl8pSJwbBPHudGv+1vyAgVVh+aWw/w4ppgSUgcQ8q A35qqOpCW4sBw5UMK1S7POMPFZkxt31Snt82vNZfjngJX/i6GJh8iVPueXttpYoogzll 15OyKXMVMmTqjwjeLYCJSdpcjJZ+Sxan15+EuSCxWgT5vdx5ULxxHqoBIJwMrhcbWnjI Z3K94Wrswx+zc3xOtExyHIF0icosiRWvVcemblf3pjbHctrdyLpfQxAhUxIDuPqAx9pj ypuCthdSPnDEyhjnvXa6obdV6tccqHtZ+cVBlfREJCogy5oXfGKFJBUQvrW7k/Vm0gyU oAhA== 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 :message-id:date:subject:cc:to:from; bh=dGjrOx5pisJrd1ox6INFms3K/xG/byEfdPe87oY1Gls=; fh=zrh5mg94czl8QqGgbq3OtA9r/tqdfzK3MQ+2i2d91ys=; b=tbM0XEEKRayPRYKxhEse20pl3hAp2/BFkhk0fKybY7zuI6Bt0lZvfNFT307FmIcOyB uEgrDDU1iCIoc31Wkg1ibV36YkP0v+82IU4w70dFnGf5zUvzl4ysm0a5ucaCTZoJbzb2 1KoH8d/txVuzLp5PqeXCeTcHXDI9yQVDYnPoUDDSw14eQZ4p0E231W1+ineJZqkYd8WI XEo7CiHkIxXbqe8k6ReYvZXuBjMqp90TVl+oiU5CxqE40v920dsIVAjeSkEepsStlSZk QCzBa029b73/XgGledUH5tvEZaCC18cfVU1k3lEME/aVF+FcKEW61dXpXrEfORP96rsv hghQ== ARC-Authentication-Results: i=1; mx.google.com; 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 l69-20020a638848000000b00563e1deea73si602569pgd.39.2023.07.25.23.47.38; Tue, 25 Jul 2023 23:47:51 -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; 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 S231652AbjGZG3S (ORCPT + 99 others); Wed, 26 Jul 2023 02:29:18 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52682 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231213AbjGZG3R (ORCPT ); Wed, 26 Jul 2023 02:29:17 -0400 Received: from mailgw.kylinos.cn (mailgw.kylinos.cn [124.126.103.232]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id F0F68BF; Tue, 25 Jul 2023 23:29:15 -0700 (PDT) X-UUID: 298248b7ac0046aba6541fdef59d3975-20230726 X-CID-UNFAMILIAR: 1 X-CID-P-RULE: Release_Ham X-CID-O-INFO: VERSION:1.1.28,REQID:31363ec0-5fda-4b34-ba66-addfbed97a15,IP:25, URL:0,TC:0,Content:-5,EDM:0,RT:0,SF:8,FILE:0,BULK:0,RULE:Release_Ham,ACTIO N:release,TS:28 X-CID-INFO: VERSION:1.1.28,REQID:31363ec0-5fda-4b34-ba66-addfbed97a15,IP:25,UR L:0,TC:0,Content:-5,EDM:0,RT:0,SF:8,FILE:0,BULK:0,RULE:Release_HamU,ACTION :release,TS:28 X-CID-META: VersionHash:176cd25,CLOUDID:effeccb3-a467-4aa9-9e04-f584452e3794,B ulkID:23072614290472T5GNHT,BulkQuantity:0,Recheck:0,SF:24|16|19|44|102,TC: nil,Content:0,EDM:-3,IP:-2,URL:0,File:nil,Bulk:nil,QS:nil,BEC:nil,COL:0,OS I:0,OSA:0,AV:0,LES:1,SPR:NO,DKR:0,DKP:0 X-CID-BVR: 0,NGT X-CID-BAS: 0,NGT,0,_ X-CID-FACTOR: TF_CID_SPAM_SNR,TF_CID_SPAM_USA,TF_CID_SPAM_FSD,TF_CID_SPAM_FSI X-UUID: 298248b7ac0046aba6541fdef59d3975-20230726 X-User: zhaochenguang@kylinos.cn Received: from localhost.localdomain [(39.156.73.12)] by mailgw (envelope-from ) (Generic MTA with TLSv1.2 ECDHE-RSA-AES128-GCM-SHA256 128/128) with ESMTP id 1987773905; Wed, 26 Jul 2023 14:29:04 +0800 From: zhaochenguang To: chenhuacai@kernel.org Cc: kernel@xen0n.name, loongarch@lists.linux.dev, linux-kernel@vger.kernel.org, bpf@vger.kernel.org, zhaochenguang@kylinos.cn Subject: [PATCH] LoongArch: eBPF: Restrict bpf_probe_read{, str}() only to archs where they work Date: Wed, 26 Jul 2023 14:29:02 +0800 Message-Id: <20230726062902.566312-1-zhaochenguang@kylinos.cn> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,SPF_HELO_NONE, SPF_PASS,T_SCC_BODY_TEXT_LINE,UNPARSEABLE_RELAY 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 When we run nettrace on LoongArch, there is a problem that ERROR: failed to load kprobe-based eBPF ERROR: failed to load kprobe-based bpf Because ARCH_HAS_NON_OVERLAPPING_ADDRESS_SPACE dose not exist, so we enable it. The patch reference upstream id 0ebeea8ca8a4d1d453ad299aef0507dab04f6e8d. Signed-off-by: zhaochenguang --- arch/loongarch/Kconfig | 1 + 1 file changed, 1 insertion(+) diff --git a/arch/loongarch/Kconfig b/arch/loongarch/Kconfig index 903096bd87f8..4a156875e9cc 100644 --- a/arch/loongarch/Kconfig +++ b/arch/loongarch/Kconfig @@ -11,6 +11,7 @@ config LOONGARCH select ARCH_ENABLE_MEMORY_HOTREMOVE select ARCH_HAS_ACPI_TABLE_UPGRADE if ACPI select ARCH_HAS_PTE_SPECIAL + select ARCH_HAS_NON_OVERLAPPING_ADDRESS_SPACE select ARCH_HAS_TICK_BROADCAST if GENERIC_CLOCKEVENTS_BROADCAST select ARCH_INLINE_READ_LOCK if !PREEMPTION select ARCH_INLINE_READ_LOCK_BH if !PREEMPTION -- 2.25.1