From mboxrd@z Thu Jan 1 00:00:00 1970 From: John Fastabend Subject: Re: [bpf PATCH] bpf: avoid kcm psock use and tcp_bpf from colliding Date: Thu, 30 Aug 2018 17:24:03 -0700 Message-ID: <14e7eb8a-afcd-4b42-cece-ebd2f4641458@gmail.com> References: <20180830223325.11399.82496.stgit@john-Precision-Tower-5810> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Cc: netdev@vger.kernel.org To: ast@kernel.org, daniel@iogearbox.net Return-path: Received: from mail-it0-f66.google.com ([209.85.214.66]:38671 "EHLO mail-it0-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725772AbeHaE27 (ORCPT ); Fri, 31 Aug 2018 00:28:59 -0400 Received: by mail-it0-f66.google.com with SMTP id p129-v6so5100771ite.3 for ; Thu, 30 Aug 2018 17:24:16 -0700 (PDT) In-Reply-To: <20180830223325.11399.82496.stgit@john-Precision-Tower-5810> Content-Language: en-US Sender: netdev-owner@vger.kernel.org List-ID: On 08/30/2018 03:33 PM, John Fastabend wrote: > Currently we check sk_user_data is non NULL to determine if the sk > exists in a map. However, this is not sufficient to ensure the psock > is not in use by another (non-ULP TCP) user, such as kcm. To avoid > this when adding a sock to a map also verify it is of the correct ULP > type. > > Signed-off-by: John Fastabend > --- I'll send a v2 of this we have one more spot we need to check the psock type in the error path. Thanks, John