From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net [23.128.96.19]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 7FD3A7E for ; Tue, 1 Aug 2023 01:19:49 +0000 (UTC) Received: from out-122.mta0.migadu.com (out-122.mta0.migadu.com [IPv6:2001:41d0:1004:224b::7a]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 1BBAA1704 for ; Mon, 31 Jul 2023 18:19:48 -0700 (PDT) Message-ID: DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.dev; s=key1; t=1690852785; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=sp0i1RgQ9gw8x/2U6jrgnozGlEnn3hAGm1IEtakX1jY=; b=TpMeFwVErvdasKSWiFlqtzXZbwnI6y+56xdQZearYbW2j4SPHxNXndh7AMIfmGlJlfH000 Dgy9850anEaxUQ86HKsqWTuMAqcvFFFwgebZgCde3YvZc2uVR/c0NbHyzxAIo6tks7KLmM EvVVyqCMemTjp+MRwjVlj5LHHKftMY0= Date: Mon, 31 Jul 2023 18:19:41 -0700 Precedence: bulk X-Mailing-List: netdev@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Subject: Re: [PATCH bpf] bpf, sockmap: Fix map type error in sock_map_del_link Content-Language: en-US To: Xu Kuohai , John Fastabend Cc: bpf@vger.kernel.org, netdev@vger.kernel.org, Jakub Sitnicki , "David S . Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Daniel Borkmann References: <20230728105649.3978774-1-xukuohai@huaweicloud.com> X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. From: Martin KaFai Lau In-Reply-To: <20230728105649.3978774-1-xukuohai@huaweicloud.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Migadu-Flow: FLOW_OUT X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_BLOCKED, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE,URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net On 7/28/23 3:56 AM, Xu Kuohai wrote: > sock_map_del_link() operates on both SOCKMAP and SOCKHASH, although > both types have member named "progs", the offset of "progs" member in > these two types is different, so "progs" should be accessed with the > real map type. The patch makes sense to me. Can a test be written to trigger it? John, please review.