Received: by 2002:a25:6193:0:0:0:0:0 with SMTP id v141csp3473268ybb; Mon, 6 Apr 2020 09:35:02 -0700 (PDT) X-Google-Smtp-Source: APiQypK62pygMsWleZxJF4PBO3pcROHDFfjZsZZaoSsRvEdf5sriG2QW/3TcBQ/cVjeygykZjBbw X-Received: by 2002:a4a:355d:: with SMTP id w29mr2477074oog.41.1586190902569; Mon, 06 Apr 2020 09:35:02 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1586190902; cv=none; d=google.com; s=arc-20160816; b=1Fc2OtDeJHejtk8px26b7JtC8ZH7JjyAgYat0JSTp6GnW7Gn1Xp4yFGUycCRPpa7vj tqBjVN6mOAszbyklBeJy2WK/WdOU83LnnCRtZJGZXMUCSfoZBjwYywzv7R/DcfSZSRSN 2nTStgE4tVXD5mgP/TNd9LK2jLiMWrwKrKnjxOdshh/t8YTjsUhvqwGkaR1HAQ+q9AsT BVXfou+j7rSabSQ0H/nfWMd6/fPp0px+fkJBzfhcfU0CEvG2qc2d3nmRU8BWoZ+frPpE JjuHmS7dzAO4BmwETx8hw1SjjdX/Hy4Nw31JeWutXBDKUrIOjcW5ba/6xk7H//YNMNoO XySQ== 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=CwE8fDJylXbpIs+p6/wPqgazgdRc/Wvl8fRPpwb67UY=; b=LncYcZcsbcQzkYQqJdbtG75VqxHA4vEUj8r8KDFj+7R5qJUjr0DH2eQTZz0SvLd/zs ZgGQVwrxwnGkNN9z7ivWgU+/jOAe8+ndA2RuJJbSf75HbHtvWGhLT3m+kX3rHSuKZUe2 2nyEo8F3qyxsX/GYN53YtKwcQiGVXe74aVpwG89wP10yx+lqSoHYbev1DRiloTcDI7p+ i1FpMXfzGnaLybqOzEcA1rdoA+QYgq1qRxvuR6xc3bI2y/hwIMBbMVSwWqWBnqxv4poU Hbc0C+Bcr0gBywIsrEel/at+rw4jk2lDEZQzrXiCTKi86re87rqpX6mQsgFjlm+2ihpi gRxQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-bluetooth-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-bluetooth-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 i21si19824otc.183.2020.04.06.09.34.33; Mon, 06 Apr 2020 09:35:02 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-bluetooth-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-bluetooth-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-bluetooth-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729163AbgDFQeK convert rfc822-to-8bit (ORCPT + 99 others); Mon, 6 Apr 2020 12:34:10 -0400 Received: from coyote.holtmann.net ([212.227.132.17]:42636 "EHLO mail.holtmann.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728789AbgDFQeK (ORCPT ); Mon, 6 Apr 2020 12:34:10 -0400 Received: from marcel-macbook.fritz.box (p4FEFC5A7.dip0.t-ipconnect.de [79.239.197.167]) by mail.holtmann.org (Postfix) with ESMTPSA id 0841FCECC8; Mon, 6 Apr 2020 18:43:43 +0200 (CEST) Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (Mac OS X Mail 13.4 \(3608.80.23.2.2\)) Subject: Re: [PATCH 0/7] LE LL Priavcy support enabled From: Marcel Holtmann In-Reply-To: Date: Mon, 6 Apr 2020 18:34:06 +0200 Cc: Sathish Narasimman , Bluez mailing list , Chethan T N , Sathish Narsimman Content-Transfer-Encoding: 8BIT Message-Id: References: <20200312100754.3445-1-sathish.narasimman@intel.com> To: Abhishek Pandit-Subedi X-Mailer: Apple Mail (2.3608.80.23.2.2) Sender: linux-bluetooth-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-bluetooth@vger.kernel.org Hi Abhishek, > Looking through the patches in this series, it looks like you are > adding the IRK for all connected devices and I'm not sure that's the > best method. > The resolv list seems to be useful in the same way as the le > whitelist: to filter incoming advertisements for devices we care > about. > > Thus, to simplify your design, could we not do the same thing as the > le whitelist: > * Update the resolv list anytime passive/background scan is being enabled > * Only keep entries in the resolv list that are part of the > pend_le_conn or pend_le_report lists > > Then, you would only need to update the resolv list in > hci_req_add_le_passive_scan and any IRK changes would just disable > passive scan, remove IRKs if existing and re-enable passive scan > (which would add it back with the new one). so I have been looking at this again and yes, we should just put IRKs in the resolving list for devices that we also put in the whitelist. And we only use the whitelist for background scanning. This means I would only focus on enabling background scanning. For everything else, we can just let the host do the resolving. Enable passive scanning -> Enable resolving list if privacy device in whitelist -> Set Scan Parameters -> Set Scan Enable Disable passive scanning -> Set Scan Disable -> Disable resolving list if enabled And when updating the whitelist, also add update the resolving list with needed entries for the whitelist. This means if the privacy enabled device goes into the whitelist, add the IRK to the resolving list. Remove all no longer needed IRKs. Regards Marcel