Received: by 2002:a05:6358:1087:b0:cb:c9d3:cd90 with SMTP id j7csp1566505rwi; Thu, 27 Oct 2022 18:07:19 -0700 (PDT) X-Google-Smtp-Source: AMsMyM4cEpn0G5GchBV+ukO7bLmNwj6n0afcbTBQfW4OqRvIWRe82GS/MDwSYGLNb6h43FzGjQnC X-Received: by 2002:a17:902:8695:b0:17f:71ed:dac1 with SMTP id g21-20020a170902869500b0017f71eddac1mr52293708plo.127.1666919239592; Thu, 27 Oct 2022 18:07:19 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1666919239; cv=none; d=google.com; s=arc-20160816; b=l/qKSrB9OJWJK/5xSbww1UYqPNj276CbXng4c818DPxQg5rWxI2+zJ9+kuQm997cLV B9sDOvGQZ69rbxxWZfrtMknIB/IKJ6Q+tqZokCTCfLtnUJi2wBh9zadcIp7JWGxqzRuF ECNpifonohalsOd0ltKGA5OkJAfiGOroLsz42s5RYFPxR4KdlIlyoAN3FiphLS0IuGAc /FZL1Sdy1j7FMNc8QhPkDYc9rgV+vGXjz52ODc9Hq+RhKttlHePUsDKzvvdqoYYiNUTr 5spfaJ3/ruhfu3Muw10wZBoioaM5cyYzgGNKZ9qW02E0j3sro9aB4A/4J5VE6FJXNNEk rCTg== 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 :references:in-reply-to:date:subject:cc:to:from:message-id :dkim-signature; bh=8S1EPvOt3DpO5fDz/fB5bXm5o9idewNaR5FZjqAbmOY=; b=Pkdlc3Oj1s70ZXFPDR1DQhwTfEzYTxYwKsSRPZT39s7kKpp/PSqgZn665Cg8XpHn3R NXX4+exOFZ6tEnXIVlszuduiPtM2FB+Unl6hC1d0LOdLQT+KlzPKpsAz/v7zOb0L5TBL 6VkSaq2q8Lruwnk9cNq7KaNYo6dBmTCqo+L4U5NVTVoWwk5QV2abggcPwttKx114QXk8 5CC5YflA1SAh5p48RmK1l+32yaRBiswGFwBGSFK30dv2fdnzz+t1Cpm+YZK27syFFuCa HCjevxhFDpX+f0Oemae7pvLddsys9me5V4niIqPXUjqhBHpyXZaM631fNw1USmpedGI4 RRIA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@foxmail.com header.s=s201512 header.b=vOZ91Fsx; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=foxmail.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id 27-20020a63105b000000b00435135c1d96si3712643pgq.806.2022.10.27.18.07.07; Thu, 27 Oct 2022 18:07:19 -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=@foxmail.com header.s=s201512 header.b=vOZ91Fsx; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=foxmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235563AbiJ1BB5 (ORCPT + 99 others); Thu, 27 Oct 2022 21:01:57 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34374 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234596AbiJ1BB4 (ORCPT ); Thu, 27 Oct 2022 21:01:56 -0400 Received: from out162-62-57-210.mail.qq.com (out162-62-57-210.mail.qq.com [162.62.57.210]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id AB47D68CE9; Thu, 27 Oct 2022 18:01:50 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=foxmail.com; s=s201512; t=1666918907; bh=8S1EPvOt3DpO5fDz/fB5bXm5o9idewNaR5FZjqAbmOY=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=vOZ91FsxQTzEpoPna7nknqY8LrhAwCFP3He97uxnHqjA+6od2WAjbTf54/FRQ5ZAq 3K6GXjAdgtDQu/n7sWPRxje+5yEqme4YDYlPXS/FMd3IkGxPkM553YtLtVvWkrM0Ib xQUQW0FTjyRfJcl2FV6amAvrcOimM6eU8H9b0xVQ= Received: from localhost.localdomain ([39.156.73.13]) by newxmesmtplogicsvrszc2-1.qq.com (NewEsmtp) with SMTP id 6AB683B; Fri, 28 Oct 2022 09:01:42 +0800 X-QQ-mid: xmsmtpt1666918902t35ua7lof Message-ID: X-QQ-XMAILINFO: MaZu5Xhaz90xPHHdCxmOvaFJpbArNwKEAJ6LR9dowB/JF0NU5eertJtSzgpiME M2+SQRq8+dWKfcSx5vdSxBwK3PJoyeKKwzcvGx7s6aCUq66wtz26mTZ25XsXSV6g3t60ykjWs7/K kp64t+M3Hb/HdljWKbQdJLU/6y2TF+Gw4QXE6ot78MhqSDLYI8qDfRjHWsXUG+XDRAnQXkDQU14R KbCyXdZn3TrDl8s8BoTVg5ZpQ0hMQTtegWL6c58pzVn9JPdqmvQSAkncPixVhwzf+8/z1CkNO+ZG hMmHx/iTWDVizlg2KTZok1hEATpKlVxQaGI2UJ+j+xNRQEvuvWRU29lohk+4Gx9FAtwLtEiOr0N3 FZht5mM2mqY7UziSoxnmn/8WUJdMzE8ox8zZTv2fkdZD4NSXSc8LwMhMzJA7I61q2E3GrtwU8x+x Dkycp4esXgZm0EaTfGuEZxfW0CObMKhuLpz20/NaCXWCo2IPGWF0qdO5ziW9Vwpyq9TJKAABLCkX X3ByVa/5G1VpMLN/32g9YdpmYDgXNPx9AdoMsOVwZhDnNFXC+Q9o2GuSSmpo1zFnGkUP47RK2zXk rCAHY8B73jtqgAn6w9BC+vvhQ3zt10i2n0MUHl8ID6bBDcJg7NUiuLdZzJikSjQ+OIieT5lGjh9z hzcxm92xAlHSq56nnp83VIVXud9K3Zyh593muPQiPm3XXS4grl2EpQYLwe6EQgql/xp4sLUldnXj q/kgTzi8nbxk/7/xzobJdnfNToOnxR6YtHiYKO6jNk5KXHiZ1A4BkoxnsM3yT88uFytqPrQRcjfE aJpdsr15G7OGNOLKCdwRiD0bljuF2Ltqynswq80syoIbtcYirHYlLUb4wXsxfFNG5zUb9dN/sfhe 8JorK1UC7rYIJDtn4J2+Cvq20bVst6JZ/ciYvEatQh0dRqjfB/SAdYHZKl8VwBGXXN1za8QD3V8W +fz/JmTtX88Li5X1T9pPN2gwdbpMl6sWEkHF9pr1Dp6JnZ8NFP9RrpKBVreQzD From: Rong Tao To: andrii.nakryiko@gmail.com Cc: andrii@kernel.org, ast@kernel.org, bpf@vger.kernel.org, daniel@iogearbox.net, haoluo@google.com, john.fastabend@gmail.com, jolsa@kernel.org, kpsingh@kernel.org, linux-kernel@vger.kernel.org, martin.lau@linux.dev, rongtao@cestc.cn, rtoax@foxmail.com, sdf@google.com, song@kernel.org, yhs@fb.com Subject: Re: [PATCH] samples/bpf: Fix sockex3: missing BPF prog type Date: Fri, 28 Oct 2022 09:01:42 +0800 X-OQ-MSGID: <20221028010142.101095-1-rtoax@foxmail.com> X-Mailer: git-send-email 2.31.1 In-Reply-To: References: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=3.3 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM, HELO_DYNAMIC_IPADDR,RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H2,RDNS_DYNAMIC, SORTED_RECIPS,SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=3.4.6 X-Spam-Level: *** 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 Thanks for your reply, actually, i tried another method, which can solved this error, recognize "socket/xxx" as "socket". However, it maybe influence other BPF prog or not? What do you think the following patch? --- a/tools/lib/bpf/libbpf.c +++ b/tools/lib/bpf/libbpf.c @@ -8659,7 +8659,7 @@ static bool sec_def_matches(const struct bpf_sec_def *sec_def, const char *sec_n return false; } - return strcmp(sec_name, sec_def->sec) == 0; + return strncmp(sec_name, sec_def->sec, len) == 0; }