Received: by 2002:a05:7412:37c9:b0:e2:908c:2ebd with SMTP id jz9csp1321279rdb; Wed, 20 Sep 2023 06:12:23 -0700 (PDT) X-Google-Smtp-Source: AGHT+IG23PldoyAcUAlzHNZA6IczaWzN5847pI1H1sfAMQvK4CO3Mm/XJqgRPnqTWJGq3bctcRRF X-Received: by 2002:a05:6a00:acc:b0:68e:2f6e:b4c0 with SMTP id c12-20020a056a000acc00b0068e2f6eb4c0mr2613979pfl.28.1695215542909; Wed, 20 Sep 2023 06:12:22 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1695215542; cv=none; d=google.com; s=arc-20160816; b=LcVmOkopJSgNex36LicUtLfCKljX20I6ghwmGdccOw+yVovNpYJn61iFBtAcpJSBaU BilnZ4PfyF58bWdse0h3YPEIbfH+4AENkpAUer1ZOFDVEibex0sDLtaWW3L/Ux9J6Jb1 03pOzXz7fmbBOkS4IDHpuFgLzafdcVSNdziOhog7fdDbLgRhGLSqp9owC6H17R/H0taU JfH1fqIp+0AotyfKQK8Liv0t48nyBP57CaCxIkFH3tk3oBPi9RNHFAmH7d83am8vx2hQ DEHMhfKOcRuAPgJVjO9xZXa1WRMZcdtXcX9TO8etWye2phpOTKOeQwFLs1gZa4vFnAOQ S+Iw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=xTSOZAm3X2XeNHpLVvNgrQnj2qhFP+/MhGkStJamEwo=; fh=rJ7lfds6cC8zRsysjG+SZLhqojTJDPbfwIcFL16FtBY=; b=V5A6tpEJ+mZRNXz8Vl0N84araV+Z8jKDk1ITM60FBrk08tfghbJxqMsBiam7lXJOUH 6mXYLf8XMWUrE4nyjzgUK9skga5TxnOu0morXOyXli24p4Jy9fa6EEYc978Iux7KTgzG ZBeayioZDL2l3ZFyXQR1HdEOOGxA8Rn1yamDqMJBPZBEaU+/ttcfS7zuVwF7yrkBkcHu YQD4Hp/kChQ1y+hnB0wGLIsTcKUYSZWSzjyAvnQLlnORKWvTpIf/r8ZIGNHEiCNDJuMZ YZy8F/xDOEg5GFFC5I9boc5vuSPQtJJLCeskBYkIh2Vju/kp1TT1dScRw7MEmn066kYS /sqg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=vFKSnM5E; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:8 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from fry.vger.email (fry.vger.email. [2620:137:e000::3:8]) by mx.google.com with ESMTPS id bv5-20020a056a00414500b0068ff3927553si11489796pfb.35.2023.09.20.06.12.18 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 20 Sep 2023 06:12:22 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:8 as permitted sender) client-ip=2620:137:e000::3:8; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=vFKSnM5E; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:8 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by fry.vger.email (Postfix) with ESMTP id 57DD0834A983; Wed, 20 Sep 2023 05:44:19 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at fry.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236285AbjITMoN (ORCPT + 99 others); Wed, 20 Sep 2023 08:44:13 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43092 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236196AbjITMoJ (ORCPT ); Wed, 20 Sep 2023 08:44:09 -0400 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 3043DC9; Wed, 20 Sep 2023 05:44:02 -0700 (PDT) Received: by smtp.kernel.org (Postfix) with ESMTPSA id E92C9C433C7; Wed, 20 Sep 2023 12:44:00 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1695213841; bh=gOKur9zUz6+c5LnaTDY10PlwXsB3Y4TfCJ5DJMqIXUc=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=vFKSnM5E4LAnQwhEcFQQyX03qyNIowVVCL96c3kV30iDpyuHHQPoIICL9NAtscXxE bkHHp7Y22+wtCSKwue6U1w/KFXl65b6zpdum68xiiehjpOhNMMC+OkgeW4b5KrILAq 0kaBx8YlP02UX2rZDDjpgB2qG0599wPpHsZUj4PWTERSDh39VtfmQPqFGItOCJpKkF J1pN/4vLaJ1JMGcu5RlUYlqQD6N3p/Kaoplns5yD6jGAK55LHWk1f2xy0Zd6ZdkPDH LZEOep01jbDc1LUseG3WZfSXnJPHIVHNqBasl8aCxDZUcpAyzD5GX++WoIxaliCXY2 YssPEmAuAIEdQ== Date: Wed, 20 Sep 2023 05:48:09 -0700 From: Bjorn Andersson To: Sricharan Ramabadhran Cc: mani@kernel.org, davem@davemloft.net, edumazet@google.com, kuba@kernel.org, pabeni@redhat.com, linux-arm-msm@vger.kernel.org, linux-kernel@vger.kernel.org, netdev@vger.kernel.org, quic_viswanat@quicinc.com, quic_clew@quicinc.com, horms@kernel.org Subject: Re: [PATCH V2 net-next 1/2] net: qrtr: Prevent stale ports from sending Message-ID: References: <20230920053317.2165867-1-quic_srichara@quicinc.com> <20230920053317.2165867-2-quic_srichara@quicinc.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20230920053317.2165867-2-quic_srichara@quicinc.com> X-Spam-Status: No, score=-1.2 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on fry.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (fry.vger.email [0.0.0.0]); Wed, 20 Sep 2023 05:44:19 -0700 (PDT) On Wed, Sep 20, 2023 at 11:03:16AM +0530, Sricharan Ramabadhran wrote: > From: Chris Lew > > If some client tries to initialize a QRTR socket during QRTR > init, the socket will become stale after the ns(namespace server) > binds to the QRTR control port. The client should close and reopen > the QRTR socket once ENETRESET is posted to the stale socket. > > There is a possibility that a client tries to send to the NS before > processing the ENETRESET. In the case of a NEW_SERVER control message, > the control message will reach the NS and be forwarded to the firmware. > The client will then process the ENETRESET closing and re-opening the > socket which triggers a DEL_SERVER and then a second NEW_SERVER. > This scenario will give an unnecessary disconnect to the clients on the > firmware who were able to initialize on the first NEW_SERVER. > > This was seen when qrtr-ns was a separate application, but there is > still a potential gap between AF_QIPCRTR socket register and when > qrtr_ns_init binds to the socket where this issue can still occur. > > Signed-off-by: Chris Lew > Signed-off-by: Vignesh Viswanathan > Signed-off-by: Sricharan Ramabadhran Reviewed-by: Bjorn Andersson Regards, Bjorn