Received: by 2002:a25:ab43:0:0:0:0:0 with SMTP id u61csp682313ybi; Fri, 21 Jun 2019 06:28:07 -0700 (PDT) X-Google-Smtp-Source: APXvYqybUNLzy7R7VohOB3yctcVbEWm/tyFmb4Lp3KvmEqT/H8EVVxjThLODCSmtuuPG17tS2AvW X-Received: by 2002:a17:90a:25c8:: with SMTP id k66mr6690701pje.129.1561123687615; Fri, 21 Jun 2019 06:28:07 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1561123687; cv=none; d=google.com; s=arc-20160816; b=1K66qCQglIh1iQhUqSjbK/W/5+wKvUOLMFM1VNAcAVnizmBwi4kDhfY4lgfWNi1+tt BWTWPR+FZ6j8wGS2foAWseo7vV5Az3PEew7KxKyG780nBga6ETvi0epZRQlmtEJJFAZx qhHZDEa0WbVrL5ePkyylLCf4RP7Wm2uUxkVbCEAaN0UG2mQmq9YlDUNHwRGcUkkaowB9 Sm6TSZghiw8mOJ1kavXFGgGsL6hq7HCtLGTyFp9MPKqGO6V180stkjfzvzG0j+GMDjyS W8oxcix7dtQidnmAsGkGDdJ/dlWHxY2K4idehZD7wlph5yemk/n0td7LQZpK6dw4061d 6YiA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:to:references:message-id :content-transfer-encoding:cc:date:in-reply-to:from:subject :mime-version; bh=KHHsYwo9XzB/WAYcPWTtyLqs7i1GNpDAe+eab5MNPjc=; b=douSM/a+xGVLD9pfwU81Mmk+YqSEoev7fShlqjeTnIgAcUZNs5/zQsuRmsY3Poujru yRsFG5AsK0+M0r7rvTIQGAxKMv14YKYjcD7VeP56rb3Jlj3F7ObMC+l5iJK20TYiVwKT bADwKf7diBWQY7Z5Cd5pNLR+/aZTRmqTsvxPTBtmbukhKSY0FfMUZ9ZvXGUh72mHf1v1 ugYkKfLhPsN4md2UhznMxv4DddGV7PZEWWkAmIQr4zqrAUOtzp2T3Kn1xILtVl+kcIIN mp8unR749owsq7rST2h2/m7syXwgAbEEgC4oH9ycZM99tydD88E0tWPe4IYZBoLZDvsR Ry0Q== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-wireless-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id c8si2657316pfn.208.2019.06.21.06.27.41; Fri, 21 Jun 2019 06:28:07 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-wireless-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-wireless-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726018AbfFUN1a convert rfc822-to-8bit (ORCPT + 99 others); Fri, 21 Jun 2019 09:27:30 -0400 Received: from coyote.holtmann.net ([212.227.132.17]:36460 "EHLO mail.holtmann.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725975AbfFUN1a (ORCPT ); Fri, 21 Jun 2019 09:27:30 -0400 Received: from marcel-macbook.fritz.box (p4FEFC3D2.dip0.t-ipconnect.de [79.239.195.210]) by mail.holtmann.org (Postfix) with ESMTPSA id E9BD1CF169; Fri, 21 Jun 2019 15:35:55 +0200 (CEST) Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (Mac OS X Mail 12.4 \(3445.104.11\)) Subject: Re: [PATCH v2 2/3] nl80211: Limit certain commands to interface owner From: Marcel Holtmann In-Reply-To: <11852f40-67e5-9122-7d82-077bdd0b014a@broadcom.com> Date: Fri, 21 Jun 2019 15:27:27 +0200 Cc: Denis Kenzior , Johannes Berg , linux-wireless@vger.kernel.org Content-Transfer-Encoding: 8BIT Message-Id: References: <20190620220749.10071-1-denkenz@gmail.com> <20190620220749.10071-2-denkenz@gmail.com> <11852f40-67e5-9122-7d82-077bdd0b014a@broadcom.com> To: Arend Van Spriel X-Mailer: Apple Mail (2.3445.104.11) Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org Hi Arend, >> If the wdev object has been created (via NEW_INTERFACE) with >> SOCKET_OWNER attribute set, then limit certain commands only to the >> process that created that wdev. >> This can be used to make sure no other process on the system interferes >> by sending unwanted scans, action frames or any other funny business. > > The flag is a good addition opposed to having handlers deal with it. However, earlier motivation for SOCKET_OWNER use was about netlink multicast being unreliable, which I can agree to. However, avoiding "funny business" is a different thing. Our testing infrastructure is doing all kind of funny business. Guess we will need to refrain from using any user-space wireless tools that use the SOCKET_OWNER attribute, but how do we know? Somehow I suspect iwd is one to avoid ;-) I have yet to give iwd a spin, but this SOCKET_OWNER strategy kept me from it. Maybe iwd could have a developer option which disables the use of the SOCKET_OWNER attribute. when running iwd, we expect reproducible behavior. Meaning we need to ensure that nobody else is messing with our interfaces behind our back. A testing infrastructure that does that is really no good in the first place since you yourself are introducing unclean behavior. When testing with iwd, we are testing the D-Bus API of iwd and you can at the same time take PCAP traces with iwmon. If we are able to store trace-cmd information also in the same PCAP file, we can extend iwmon to do exactly that. So far iwmon allows you to grab the netlink communication and the PAE communication which means you can easily analyze what was happening without having ask nl80211. If you require extra debug information or triggers, then this has to happen via a D-Bus debug interfaces. However I see no benefit of not using SOCKET_OWNER. As I said above, if the testing uses different options than the real environment, what good is the testing. Regards Marcel