From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from out-187.mta0.migadu.com (out-187.mta0.migadu.com [91.218.175.187]) (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 969CB215F5A for ; Tue, 5 Nov 2024 23:19:47 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=91.218.175.187 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1730848789; cv=none; b=ak82CYaCTr0/2vJvYU6iGqIkMmAyuH2wQHFiWJKRWc7XLN321YeyyvLFxKIsLA9nvKs1Mr60X4UpzaFC33kJSARpRVC0c7TKzw9h4EHO1LXVoqpLL4Y0/4ujSvyBWwdbVZzLZyCllmuR+n4KTZjOw0EawgyX3lpWQ8XmYqcDtfc= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1730848789; c=relaxed/simple; bh=UvUw+nZkfgvHZSnMi5K26kkqZH/MltB2oTM9Z1ipxac=; h=Message-ID:Date:MIME-Version:Subject:From:To:Cc:References: In-Reply-To:Content-Type; b=ceCwEzDN8PiotVm9vesTs6tyGLqIPiorGZAqM+HJwyKnFeUiEZ9HGnJ9uhgluPfISKnQ6Go/Ijzb+HkjZh7zQmVlsRWmk5SOhdFx1N8Z3FuzJEV8btLWDbDcwKvFgvEVbX3DVV2qxQlb8p3jk9zk+RgE01Ax6SEkSyHO6i8L/ug= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.dev; spf=pass smtp.mailfrom=linux.dev; dkim=pass (1024-bit key) header.d=linux.dev header.i=@linux.dev header.b=Nfz5DoZ0; arc=none smtp.client-ip=91.218.175.187 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.dev Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linux.dev Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linux.dev header.i=@linux.dev header.b="Nfz5DoZ0" Message-ID: <60dee6f7-e423-4644-839e-95231beca854@linux.dev> DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.dev; s=key1; t=1730848785; 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=eRnij9lJmJVg04bILk0ZhJO+jQ1/NVNxQUlXArvHXHE=; b=Nfz5DoZ0duS7M7k1j3WdMs7FT2UxPsPd9w+HdTnVrm8of9UN3ql1hKTlQZOVwzB0lRU8gq N1ypW2yPKjU5orpZx5JsOP+F0bIHpuXilHs56t9kV4TaWpmNrKvHO5EGX8LcFugKyu+8Wc LmeWnvH+zdQ2cfPLT4DPxijK53ccopk= Date: Tue, 5 Nov 2024 15:19:39 -0800 Precedence: bulk X-Mailing-List: netdev@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Subject: Re: [PATCH v2 bpf] bpf: Add sk_is_inet and IS_ICSK check in tls_sw_has_ctx_tx/rx X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. From: Martin KaFai Lau To: zijianzhang@bytedance.com Cc: bpf@vger.kernel.org, borisp@nvidia.com, john.fastabend@gmail.com, kuba@kernel.org, davem@davemloft.net, edumazet@google.com, pabeni@redhat.com, horms@kernel.org, daniel@iogearbox.net, ast@kernel.org, stfomichev@gmail.com, netdev@vger.kernel.org References: <20241030161855.149784-1-zijianzhang@bytedance.com> Content-Language: en-US In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Migadu-Flow: FLOW_OUT On 11/5/24 3:01 PM, Martin KaFai Lau wrote: > On 10/30/24 9:18 AM, zijianzhang@bytedance.com wrote: >> From: Zijian Zhang >> >> As the introduction of the support for vsock and unix sockets in sockmap, >> tls_sw_has_ctx_tx/rx cannot presume the socket passed in must be IS_ICSK. >> vsock and af_unix sockets have vsock_sock and unix_sock instead of >> inet_connection_sock. For these sockets, tls_get_ctx may return an invalid >> pointer and cause page fault in function tls_sw_ctx_rx. > >> Fixes: 0608c69c9a80 ("bpf: sk_msg, sock{map|hash} redirect through ULP") >> Fixes: e91de6afa81c ("bpf: Fix running sk_skb program types with ktls") > > Please tag the correct commit that introduced the bug. These SHAs are before the > vsock and unix sock support was added. I just read the v1. Please also keep the "Acked-by: Stanislav Fomichev ".