All of lore.kernel.org
 help / color / mirror / Atom feed
* [Bluez PATCH v2] btmgmt: Fix enable adding irk when turining privacy on
@ 2021-05-04 11:14 Sathish Narasimman
  2021-05-04 11:36 ` [Bluez,v2] " bluez.test.bot
  2021-05-04 17:43 ` [Bluez PATCH v2] " Luiz Augusto von Dentz
  0 siblings, 2 replies; 7+ messages in thread
From: Sathish Narasimman @ 2021-05-04 11:14 UTC (permalink / raw)
  To: linux-bluetooth
  Cc: chethan.tumkur.narayan, ravishankar.srivatsa, Sathish Narasimman

Unable to add the IRK in btmgmt when need to be updated. The option is
enabled now.

Signed-off-by: Sathish Narasimman <sathish.narasimman@intel.com>
---
 tools/btmgmt.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tools/btmgmt.c b/tools/btmgmt.c
index 02fec1dca184..bf3b460d0f04 100644
--- a/tools/btmgmt.c
+++ b/tools/btmgmt.c
@@ -5277,7 +5277,7 @@ static const struct bt_shell_menu main_menu = {
 	cmd_advertising,		"Toggle LE advertising",	},
 	{ "bredr",		"<on/off>",
 		cmd_bredr,		"Toggle BR/EDR support",	},
-	{ "privacy",		"<on/off>",
+	{ "privacy",		"<on/off> [irk]",
 		cmd_privacy,		"Toggle privacy support"	},
 	{ "class",		"<major> <minor>",
 		cmd_class,		"Set device major/minor class"	},
-- 
2.17.1


^ permalink raw reply related	[flat|nested] 7+ messages in thread

* RE: [Bluez,v2] btmgmt: Fix enable adding irk when turining privacy on
  2021-05-04 11:14 [Bluez PATCH v2] btmgmt: Fix enable adding irk when turining privacy on Sathish Narasimman
@ 2021-05-04 11:36 ` bluez.test.bot
  2021-05-13 21:11   ` Luiz Augusto von Dentz
  2021-05-04 17:43 ` [Bluez PATCH v2] " Luiz Augusto von Dentz
  1 sibling, 1 reply; 7+ messages in thread
From: bluez.test.bot @ 2021-05-04 11:36 UTC (permalink / raw)
  To: linux-bluetooth, sathish.narasimman

[-- Attachment #1: Type: text/plain, Size: 2296 bytes --]

This is automated email and please do not reply to this email!

Dear submitter,

Thank you for submitting the patches to the linux bluetooth mailing list.
This is a CI test results with your patch series:
PW Link:https://patchwork.kernel.org/project/bluetooth/list/?series=476815

---Test result---

Test Summary:
CheckPatch                    PASS      0.34 seconds
GitLint                       PASS      0.13 seconds
Prep - Setup ELL              PASS      48.83 seconds
Build - Prep                  PASS      0.11 seconds
Build - Configure             PASS      8.51 seconds
Build - Make                  PASS      208.97 seconds
Make Check                    PASS      9.35 seconds
Make Dist                     PASS      12.80 seconds
Make Dist - Configure         PASS      5.25 seconds
Make Dist - Make              PASS      84.21 seconds
Build w/ext ELL - Configure   PASS      8.62 seconds
Build w/ext ELL - Make        PASS      198.03 seconds

Details
##############################
Test: CheckPatch - PASS
Desc: Run checkpatch.pl script with rule in .checkpatch.conf

##############################
Test: GitLint - PASS
Desc: Run gitlint with rule in .gitlint

##############################
Test: Prep - Setup ELL - PASS
Desc: Clone, build, and install ELL

##############################
Test: Build - Prep - PASS
Desc: Prepare environment for build

##############################
Test: Build - Configure - PASS
Desc: Configure the BlueZ source tree

##############################
Test: Build - Make - PASS
Desc: Build the BlueZ source tree

##############################
Test: Make Check - PASS
Desc: Run 'make check'

##############################
Test: Make Dist - PASS
Desc: Run 'make dist' and build the distribution tarball

##############################
Test: Make Dist - Configure - PASS
Desc: Configure the source from distribution tarball

##############################
Test: Make Dist - Make - PASS
Desc: Build the source from distribution tarball

##############################
Test: Build w/ext ELL - Configure - PASS
Desc: Configure BlueZ source with '--enable-external-ell' configuration

##############################
Test: Build w/ext ELL - Make - PASS
Desc: Build BlueZ source with '--enable-external-ell' configuration



---
Regards,
Linux Bluetooth


^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [Bluez PATCH v2] btmgmt: Fix enable adding irk when turining privacy on
  2021-05-04 11:14 [Bluez PATCH v2] btmgmt: Fix enable adding irk when turining privacy on Sathish Narasimman
  2021-05-04 11:36 ` [Bluez,v2] " bluez.test.bot
@ 2021-05-04 17:43 ` Luiz Augusto von Dentz
  2021-05-07  8:26   ` Marcel Holtmann
  1 sibling, 1 reply; 7+ messages in thread
From: Luiz Augusto von Dentz @ 2021-05-04 17:43 UTC (permalink / raw)
  To: Sathish Narasimman; +Cc: linux-bluetooth, Chethan T N, Srivatsa, Ravishankar

Hi Sathish,

On Tue, May 4, 2021 at 4:09 AM Sathish Narasimman
<sathish.narasimman@intel.com> wrote:
>
> Unable to add the IRK in btmgmt when need to be updated. The option is
> enabled now.
>
> Signed-off-by: Sathish Narasimman <sathish.narasimman@intel.com>
> ---
>  tools/btmgmt.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/tools/btmgmt.c b/tools/btmgmt.c
> index 02fec1dca184..bf3b460d0f04 100644
> --- a/tools/btmgmt.c
> +++ b/tools/btmgmt.c
> @@ -5277,7 +5277,7 @@ static const struct bt_shell_menu main_menu = {
>         cmd_advertising,                "Toggle LE advertising",        },
>         { "bredr",              "<on/off>",
>                 cmd_bredr,              "Toggle BR/EDR support",        },
> -       { "privacy",            "<on/off>",
> +       { "privacy",            "<on/off> [irk]",
>                 cmd_privacy,            "Toggle privacy support"        },

I wonder why you didn't incorporate in the first parameter though
given that things like privacy off [irk] makes no send, or perhaps
have a dedicated command for setting the irk so it would persist
between privacy on/off.

>         { "class",              "<major> <minor>",
>                 cmd_class,              "Set device major/minor class"  },
> --
> 2.17.1
>


-- 
Luiz Augusto von Dentz

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [Bluez PATCH v2] btmgmt: Fix enable adding irk when turining privacy on
  2021-05-04 17:43 ` [Bluez PATCH v2] " Luiz Augusto von Dentz
@ 2021-05-07  8:26   ` Marcel Holtmann
  2021-05-07 22:13     ` Luiz Augusto von Dentz
  0 siblings, 1 reply; 7+ messages in thread
From: Marcel Holtmann @ 2021-05-07  8:26 UTC (permalink / raw)
  To: Luiz Augusto von Dentz
  Cc: Sathish Narasimman, linux-bluetooth, Chethan T N, Srivatsa, Ravishankar

Hi Luiz,

>> Unable to add the IRK in btmgmt when need to be updated. The option is
>> enabled now.
>> 
>> Signed-off-by: Sathish Narasimman <sathish.narasimman@intel.com>
>> ---
>> tools/btmgmt.c | 2 +-
>> 1 file changed, 1 insertion(+), 1 deletion(-)
>> 
>> diff --git a/tools/btmgmt.c b/tools/btmgmt.c
>> index 02fec1dca184..bf3b460d0f04 100644
>> --- a/tools/btmgmt.c
>> +++ b/tools/btmgmt.c
>> @@ -5277,7 +5277,7 @@ static const struct bt_shell_menu main_menu = {
>>        cmd_advertising,                "Toggle LE advertising",        },
>>        { "bredr",              "<on/off>",
>>                cmd_bredr,              "Toggle BR/EDR support",        },
>> -       { "privacy",            "<on/off>",
>> +       { "privacy",            "<on/off> [irk]",
>>                cmd_privacy,            "Toggle privacy support"        },
> 
> I wonder why you didn't incorporate in the first parameter though
> given that things like privacy off [irk] makes no send, or perhaps
> have a dedicated command for setting the irk so it would persist
> between privacy on/off.

that is not how the kernel API works. If you want to enable Privacy, you need to also provide the IRK. We just simplified the tool to use /dev/urandom in case it is not provided.

Regards

Marcel


^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [Bluez PATCH v2] btmgmt: Fix enable adding irk when turining privacy on
  2021-05-07  8:26   ` Marcel Holtmann
@ 2021-05-07 22:13     ` Luiz Augusto von Dentz
  2021-05-13 15:20       ` Marcel Holtmann
  0 siblings, 1 reply; 7+ messages in thread
From: Luiz Augusto von Dentz @ 2021-05-07 22:13 UTC (permalink / raw)
  To: Marcel Holtmann
  Cc: Sathish Narasimman, linux-bluetooth, Chethan T N, Srivatsa, Ravishankar

Hi Marcel,

On Fri, May 7, 2021 at 1:26 AM Marcel Holtmann <marcel@holtmann.org> wrote:
>
> Hi Luiz,
>
> >> Unable to add the IRK in btmgmt when need to be updated. The option is
> >> enabled now.
> >>
> >> Signed-off-by: Sathish Narasimman <sathish.narasimman@intel.com>
> >> ---
> >> tools/btmgmt.c | 2 +-
> >> 1 file changed, 1 insertion(+), 1 deletion(-)
> >>
> >> diff --git a/tools/btmgmt.c b/tools/btmgmt.c
> >> index 02fec1dca184..bf3b460d0f04 100644
> >> --- a/tools/btmgmt.c
> >> +++ b/tools/btmgmt.c
> >> @@ -5277,7 +5277,7 @@ static const struct bt_shell_menu main_menu = {
> >>        cmd_advertising,                "Toggle LE advertising",        },
> >>        { "bredr",              "<on/off>",
> >>                cmd_bredr,              "Toggle BR/EDR support",        },
> >> -       { "privacy",            "<on/off>",
> >> +       { "privacy",            "<on/off> [irk]",
> >>                cmd_privacy,            "Toggle privacy support"        },
> >
> > I wonder why you didn't incorporate in the first parameter though
> > given that things like privacy off [irk] makes no send, or perhaps
> > have a dedicated command for setting the irk so it would persist
> > between privacy on/off.
>
> that is not how the kernel API works. If you want to enable Privacy, you need to also provide the IRK. We just simplified the tool to use /dev/urandom in case it is not provided.

Just to be clear I was suggesting to use a dedicated command for setting an irk:

> irk <value>

That way it is persisted, that way the tool remembers what was the
last set irk in case privacy needs to be toggled for some reason.


-- 
Luiz Augusto von Dentz

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [Bluez PATCH v2] btmgmt: Fix enable adding irk when turining privacy on
  2021-05-07 22:13     ` Luiz Augusto von Dentz
@ 2021-05-13 15:20       ` Marcel Holtmann
  0 siblings, 0 replies; 7+ messages in thread
From: Marcel Holtmann @ 2021-05-13 15:20 UTC (permalink / raw)
  To: Luiz Augusto von Dentz
  Cc: Sathish Narasimman, linux-bluetooth, Chethan T N, Srivatsa, Ravishankar

Hi Luiz,

>>>> Unable to add the IRK in btmgmt when need to be updated. The option is
>>>> enabled now.
>>>> 
>>>> Signed-off-by: Sathish Narasimman <sathish.narasimman@intel.com>
>>>> ---
>>>> tools/btmgmt.c | 2 +-
>>>> 1 file changed, 1 insertion(+), 1 deletion(-)
>>>> 
>>>> diff --git a/tools/btmgmt.c b/tools/btmgmt.c
>>>> index 02fec1dca184..bf3b460d0f04 100644
>>>> --- a/tools/btmgmt.c
>>>> +++ b/tools/btmgmt.c
>>>> @@ -5277,7 +5277,7 @@ static const struct bt_shell_menu main_menu = {
>>>>       cmd_advertising,                "Toggle LE advertising",        },
>>>>       { "bredr",              "<on/off>",
>>>>               cmd_bredr,              "Toggle BR/EDR support",        },
>>>> -       { "privacy",            "<on/off>",
>>>> +       { "privacy",            "<on/off> [irk]",
>>>>               cmd_privacy,            "Toggle privacy support"        },
>>> 
>>> I wonder why you didn't incorporate in the first parameter though
>>> given that things like privacy off [irk] makes no send, or perhaps
>>> have a dedicated command for setting the irk so it would persist
>>> between privacy on/off.
>> 
>> that is not how the kernel API works. If you want to enable Privacy, you need to also provide the IRK. We just simplified the tool to use /dev/urandom in case it is not provided.
> 
> Just to be clear I was suggesting to use a dedicated command for setting an irk:
> 
>> irk <value>
> 
> That way it is persisted, that way the tool remembers what was the
> last set irk in case privacy needs to be toggled for some reason.

but btmgmt has no storage facility. It can’t remember its own name if its life depended on it ;)

Regards

Marcel


^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [Bluez,v2] btmgmt: Fix enable adding irk when turining privacy on
  2021-05-04 11:36 ` [Bluez,v2] " bluez.test.bot
@ 2021-05-13 21:11   ` Luiz Augusto von Dentz
  0 siblings, 0 replies; 7+ messages in thread
From: Luiz Augusto von Dentz @ 2021-05-13 21:11 UTC (permalink / raw)
  To: linux-bluetooth; +Cc: Sathish Narasimman

Hi Sathish,

On Tue, May 4, 2021 at 4:48 AM <bluez.test.bot@gmail.com> wrote:
>
> This is automated email and please do not reply to this email!
>
> Dear submitter,
>
> Thank you for submitting the patches to the linux bluetooth mailing list.
> This is a CI test results with your patch series:
> PW Link:https://patchwork.kernel.org/project/bluetooth/list/?series=476815
>
> ---Test result---
>
> Test Summary:
> CheckPatch                    PASS      0.34 seconds
> GitLint                       PASS      0.13 seconds
> Prep - Setup ELL              PASS      48.83 seconds
> Build - Prep                  PASS      0.11 seconds
> Build - Configure             PASS      8.51 seconds
> Build - Make                  PASS      208.97 seconds
> Make Check                    PASS      9.35 seconds
> Make Dist                     PASS      12.80 seconds
> Make Dist - Configure         PASS      5.25 seconds
> Make Dist - Make              PASS      84.21 seconds
> Build w/ext ELL - Configure   PASS      8.62 seconds
> Build w/ext ELL - Make        PASS      198.03 seconds
>
> Details
> ##############################
> Test: CheckPatch - PASS
> Desc: Run checkpatch.pl script with rule in .checkpatch.conf
>
> ##############################
> Test: GitLint - PASS
> Desc: Run gitlint with rule in .gitlint
>
> ##############################
> Test: Prep - Setup ELL - PASS
> Desc: Clone, build, and install ELL
>
> ##############################
> Test: Build - Prep - PASS
> Desc: Prepare environment for build
>
> ##############################
> Test: Build - Configure - PASS
> Desc: Configure the BlueZ source tree
>
> ##############################
> Test: Build - Make - PASS
> Desc: Build the BlueZ source tree
>
> ##############################
> Test: Make Check - PASS
> Desc: Run 'make check'
>
> ##############################
> Test: Make Dist - PASS
> Desc: Run 'make dist' and build the distribution tarball
>
> ##############################
> Test: Make Dist - Configure - PASS
> Desc: Configure the source from distribution tarball
>
> ##############################
> Test: Make Dist - Make - PASS
> Desc: Build the source from distribution tarball
>
> ##############################
> Test: Build w/ext ELL - Configure - PASS
> Desc: Configure BlueZ source with '--enable-external-ell' configuration
>
> ##############################
> Test: Build w/ext ELL - Make - PASS
> Desc: Build BlueZ source with '--enable-external-ell' configuration
>
>
>
> ---
> Regards,
> Linux Bluetooth

Applied, thanks.

-- 
Luiz Augusto von Dentz

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2021-05-13 21:11 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-05-04 11:14 [Bluez PATCH v2] btmgmt: Fix enable adding irk when turining privacy on Sathish Narasimman
2021-05-04 11:36 ` [Bluez,v2] " bluez.test.bot
2021-05-13 21:11   ` Luiz Augusto von Dentz
2021-05-04 17:43 ` [Bluez PATCH v2] " Luiz Augusto von Dentz
2021-05-07  8:26   ` Marcel Holtmann
2021-05-07 22:13     ` Luiz Augusto von Dentz
2021-05-13 15:20       ` Marcel Holtmann

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.