public inbox for linux-bluetooth@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH BlueZ] mesh: acceptor: fix endianess issues
@ 2025-05-05 12:43 Christian Eggers
  2025-05-05 12:43 ` [PATCH BlueZ] mesh: agent: add hash calculation of URI Christian Eggers
                   ` (3 more replies)
  0 siblings, 4 replies; 8+ messages in thread
From: Christian Eggers @ 2025-05-05 12:43 UTC (permalink / raw)
  To: linux-bluetooth; +Cc: Christian Eggers

Members of 'struct mesh_net_prov_caps' are in Over-the-Air order and
must be converted to host order first.

Fixes: 838ddc931263 ("mesh: provisionee: Check prov start parameters")
---
 mesh/prov-acceptor.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/mesh/prov-acceptor.c b/mesh/prov-acceptor.c
index 241345bdd1ea..0ea9bb84cf36 100644
--- a/mesh/prov-acceptor.c
+++ b/mesh/prov-acceptor.c
@@ -408,14 +408,14 @@ static bool prov_start_check(struct prov_start *start,
 		break;
 
 	case 2: /* Output OOB */
-		if (!(caps->output_action & (1 << start->auth_action)) ||
+		if (!(L_BE16_TO_CPU(caps->output_action) & (1 << start->auth_action)) ||
 							start->auth_size == 0)
 			return false;
 
 		break;
 
 	case 3: /* Input OOB */
-		if (!(caps->input_action & (1 << start->auth_action)) ||
+		if (!(L_BE16_TO_CPU(caps->input_action) & (1 << start->auth_action)) ||
 							start->auth_size == 0)
 			return false;
 
-- 
2.44.1


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

* [PATCH BlueZ] mesh: agent: add hash calculation of URI
  2025-05-05 12:43 [PATCH BlueZ] mesh: acceptor: fix endianess issues Christian Eggers
@ 2025-05-05 12:43 ` Christian Eggers
  2025-05-05 14:18   ` [BlueZ] " bluez.test.bot
  2025-05-05 12:43 ` [PATCH BlueZ] monitor: remove redundant hexdumps in Mesh Provisioning Christian Eggers
                   ` (2 subsequent siblings)
  3 siblings, 1 reply; 8+ messages in thread
From: Christian Eggers @ 2025-05-05 12:43 UTC (permalink / raw)
  To: linux-bluetooth; +Cc: Christian Eggers

Mesh profile spec, 3.9.2 Unprovisioned Device beacon:
Along with the Unprovisioned Device beacon, the device may also
advertise a separate non-connectable advertising packet with a Uniform
Resource Identifier (URI) data type ...

The remaining implementation of this feature does already exist.
---
 mesh/agent.c | 13 ++++++++++++-
 1 file changed, 12 insertions(+), 1 deletion(-)

diff --git a/mesh/agent.c b/mesh/agent.c
index a1413c0008dc..86f25ac96a11 100644
--- a/mesh/agent.c
+++ b/mesh/agent.c
@@ -16,7 +16,9 @@
 
 #include <ell/ell.h>
 
+#include "mesh/crypto.h"
 #include "mesh/mesh.h"
+#include "mesh/provision.h"
 #include "mesh/error.h"
 #include "mesh/dbus.h"
 #include "mesh/agent.h"
@@ -168,10 +170,19 @@ static bool parse_properties(struct mesh_agent *agent,
 			if (!parse_prov_caps(&agent->caps, &variant))
 				return false;
 		} else if (!strcmp(key, "URI")) {
+			uint8_t salt[16];
+
 			if (!l_dbus_message_iter_get_variant(&variant, "s",
 								&uri_string))
 				return false;
-			/* TODO: compute hash */
+
+			mesh_crypto_s1(uri_string, strlen(uri_string), salt);
+			agent->caps.uri_hash =
+				salt[0] << 24 |
+				salt[1] << 16 |
+				salt[2] <<  8 |
+				salt[3] <<  0;
+			agent->caps.oob_info |= OOB_INFO_URI_HASH;
 		} else if (!strcmp(key, "OutOfBandInfo")) {
 			if (!parse_oob_info(&agent->caps, &variant))
 				return false;
-- 
2.44.1


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

* [PATCH BlueZ] monitor: remove redundant hexdumps in Mesh Provisioning
  2025-05-05 12:43 [PATCH BlueZ] mesh: acceptor: fix endianess issues Christian Eggers
  2025-05-05 12:43 ` [PATCH BlueZ] mesh: agent: add hash calculation of URI Christian Eggers
@ 2025-05-05 12:43 ` Christian Eggers
  2025-05-05 14:16   ` [BlueZ] " bluez.test.bot
  2025-05-05 12:43 ` [PATCH BlueZ] tools/mesh-cfgclient: constify Christian Eggers
  2025-05-05 14:22 ` [BlueZ] mesh: acceptor: fix endianess issues bluez.test.bot
  3 siblings, 1 reply; 8+ messages in thread
From: Christian Eggers @ 2025-05-05 12:43 UTC (permalink / raw)
  To: linux-bluetooth; +Cc: Christian Eggers

Paket data is already dumped in the statement above.

Fixes: ad0cdbc1e943 ("monitor: Add basic decoding for Mesh Provisioning")
---
 monitor/packet.c | 2 --
 1 file changed, 2 deletions(-)

diff --git a/monitor/packet.c b/monitor/packet.c
index ebd095ab9056..e16af112feed 100644
--- a/monitor/packet.c
+++ b/monitor/packet.c
@@ -3689,7 +3689,6 @@ static void print_mesh_prov(const uint8_t *data, uint8_t len)
 		print_field("  TotalLength: %u", get_be16(data + 1));
 		print_field("  FCS: 0x%2.2x", data[3]);
 		print_hex_field("  Data", data + 4, len - 4);
-		packet_hexdump(data + 5, len - 5);
 		break;
 	case 0x01:
 		print_field("  Transaction Acknowledgment (0x01)");
@@ -3703,7 +3702,6 @@ static void print_mesh_prov(const uint8_t *data, uint8_t len)
 			return;
 		}
 		print_hex_field("  Data", data + 1, len - 1);
-		packet_hexdump(data + 2, len - 2);
 		break;
 	case 0x03:
 		print_field("  Provisioning Bearer Control (0x03)");
-- 
2.44.1


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

* [PATCH BlueZ] tools/mesh-cfgclient: constify
  2025-05-05 12:43 [PATCH BlueZ] mesh: acceptor: fix endianess issues Christian Eggers
  2025-05-05 12:43 ` [PATCH BlueZ] mesh: agent: add hash calculation of URI Christian Eggers
  2025-05-05 12:43 ` [PATCH BlueZ] monitor: remove redundant hexdumps in Mesh Provisioning Christian Eggers
@ 2025-05-05 12:43 ` Christian Eggers
  2025-05-05 14:19   ` [BlueZ] " bluez.test.bot
  2025-05-05 14:22 ` [BlueZ] mesh: acceptor: fix endianess issues bluez.test.bot
  3 siblings, 1 reply; 8+ messages in thread
From: Christian Eggers @ 2025-05-05 12:43 UTC (permalink / raw)
  To: linux-bluetooth; +Cc: Christian Eggers

---
 tools/mesh/cfgcli.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tools/mesh/cfgcli.c b/tools/mesh/cfgcli.c
index fb6fa666d2db..8801070ec41e 100644
--- a/tools/mesh/cfgcli.c
+++ b/tools/mesh/cfgcli.c
@@ -66,7 +66,7 @@ static uint32_t rsp_timeout = DEFAULT_TIMEOUT;
 static uint16_t target = UNASSIGNED_ADDRESS;
 static uint32_t parms[8];
 
-static struct cfg_cmd cmds[] = {
+static const struct cfg_cmd cmds[] = {
 	{ OP_APPKEY_ADD, OP_APPKEY_STATUS, "AppKeyAdd" },
 	{ OP_APPKEY_DELETE, OP_APPKEY_STATUS, "AppKeyDelete" },
 	{ OP_APPKEY_GET, OP_APPKEY_LIST, "AppKeyGet" },
-- 
2.44.1


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

* RE: [BlueZ] monitor: remove redundant hexdumps in Mesh Provisioning
  2025-05-05 12:43 ` [PATCH BlueZ] monitor: remove redundant hexdumps in Mesh Provisioning Christian Eggers
@ 2025-05-05 14:16   ` bluez.test.bot
  0 siblings, 0 replies; 8+ messages in thread
From: bluez.test.bot @ 2025-05-05 14:16 UTC (permalink / raw)
  To: linux-bluetooth, ceggers

[-- Attachment #1: Type: text/plain, Size: 1692 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=959621

---Test result---

Test Summary:
CheckPatch                    PENDING   0.33 seconds
GitLint                       PENDING   0.34 seconds
BuildEll                      PASS      20.36 seconds
BluezMake                     PASS      2650.24 seconds
MakeCheck                     PASS      20.75 seconds
MakeDistcheck                 PASS      198.35 seconds
CheckValgrind                 PASS      275.18 seconds
CheckSmatch                   WARNING   302.81 seconds
bluezmakeextell               PASS      128.38 seconds
IncrementalBuild              PENDING   0.35 seconds
ScanBuild                     PASS      912.27 seconds

Details
##############################
Test: CheckPatch - PENDING
Desc: Run checkpatch.pl script
Output:

##############################
Test: GitLint - PENDING
Desc: Run gitlint
Output:

##############################
Test: CheckSmatch - WARNING
Desc: Run smatch tool with source
Output:
monitor/packet.c: note: in included file:monitor/display.h:82:26: warning: Variable length array is used.monitor/packet.c:1876:26: warning: Variable length array is used.monitor/packet.c: note: in included file:monitor/bt.h:3607:52: warning: array of flexible structuresmonitor/bt.h:3595:40: warning: array of flexible structures
##############################
Test: IncrementalBuild - PENDING
Desc: Incremental build with the patches in the series
Output:



---
Regards,
Linux Bluetooth


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

* RE: [BlueZ] mesh: agent: add hash calculation of URI
  2025-05-05 12:43 ` [PATCH BlueZ] mesh: agent: add hash calculation of URI Christian Eggers
@ 2025-05-05 14:18   ` bluez.test.bot
  0 siblings, 0 replies; 8+ messages in thread
From: bluez.test.bot @ 2025-05-05 14:18 UTC (permalink / raw)
  To: linux-bluetooth, ceggers

[-- Attachment #1: Type: text/plain, Size: 1261 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=959620

---Test result---

Test Summary:
CheckPatch                    PENDING   0.23 seconds
GitLint                       PENDING   0.23 seconds
BuildEll                      PASS      20.47 seconds
BluezMake                     PASS      2769.51 seconds
MakeCheck                     PASS      20.88 seconds
MakeDistcheck                 PASS      202.47 seconds
CheckValgrind                 PASS      281.34 seconds
CheckSmatch                   PASS      305.13 seconds
bluezmakeextell               PASS      130.20 seconds
IncrementalBuild              PENDING   0.33 seconds
ScanBuild                     PASS      918.63 seconds

Details
##############################
Test: CheckPatch - PENDING
Desc: Run checkpatch.pl script
Output:

##############################
Test: GitLint - PENDING
Desc: Run gitlint
Output:

##############################
Test: IncrementalBuild - PENDING
Desc: Incremental build with the patches in the series
Output:



---
Regards,
Linux Bluetooth


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

* RE: [BlueZ] tools/mesh-cfgclient: constify
  2025-05-05 12:43 ` [PATCH BlueZ] tools/mesh-cfgclient: constify Christian Eggers
@ 2025-05-05 14:19   ` bluez.test.bot
  0 siblings, 0 replies; 8+ messages in thread
From: bluez.test.bot @ 2025-05-05 14:19 UTC (permalink / raw)
  To: linux-bluetooth, ceggers

[-- Attachment #1: Type: text/plain, Size: 1261 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=959622

---Test result---

Test Summary:
CheckPatch                    PENDING   0.28 seconds
GitLint                       PENDING   0.26 seconds
BuildEll                      PASS      20.78 seconds
BluezMake                     PASS      2776.14 seconds
MakeCheck                     PASS      20.97 seconds
MakeDistcheck                 PASS      203.69 seconds
CheckValgrind                 PASS      284.73 seconds
CheckSmatch                   PASS      306.22 seconds
bluezmakeextell               PASS      128.79 seconds
IncrementalBuild              PENDING   0.25 seconds
ScanBuild                     PASS      903.15 seconds

Details
##############################
Test: CheckPatch - PENDING
Desc: Run checkpatch.pl script
Output:

##############################
Test: GitLint - PENDING
Desc: Run gitlint
Output:

##############################
Test: IncrementalBuild - PENDING
Desc: Incremental build with the patches in the series
Output:



---
Regards,
Linux Bluetooth


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

* RE: [BlueZ] mesh: acceptor: fix endianess issues
  2025-05-05 12:43 [PATCH BlueZ] mesh: acceptor: fix endianess issues Christian Eggers
                   ` (2 preceding siblings ...)
  2025-05-05 12:43 ` [PATCH BlueZ] tools/mesh-cfgclient: constify Christian Eggers
@ 2025-05-05 14:22 ` bluez.test.bot
  3 siblings, 0 replies; 8+ messages in thread
From: bluez.test.bot @ 2025-05-05 14:22 UTC (permalink / raw)
  To: linux-bluetooth, ceggers

[-- Attachment #1: Type: text/plain, Size: 1261 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=959619

---Test result---

Test Summary:
CheckPatch                    PENDING   0.40 seconds
GitLint                       PENDING   0.34 seconds
BuildEll                      PASS      20.94 seconds
BluezMake                     PASS      2934.57 seconds
MakeCheck                     PASS      20.78 seconds
MakeDistcheck                 PASS      206.10 seconds
CheckValgrind                 PASS      283.66 seconds
CheckSmatch                   PASS      313.35 seconds
bluezmakeextell               PASS      131.95 seconds
IncrementalBuild              PENDING   0.39 seconds
ScanBuild                     PASS      956.84 seconds

Details
##############################
Test: CheckPatch - PENDING
Desc: Run checkpatch.pl script
Output:

##############################
Test: GitLint - PENDING
Desc: Run gitlint
Output:

##############################
Test: IncrementalBuild - PENDING
Desc: Incremental build with the patches in the series
Output:



---
Regards,
Linux Bluetooth


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

end of thread, other threads:[~2025-05-05 14:22 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-05-05 12:43 [PATCH BlueZ] mesh: acceptor: fix endianess issues Christian Eggers
2025-05-05 12:43 ` [PATCH BlueZ] mesh: agent: add hash calculation of URI Christian Eggers
2025-05-05 14:18   ` [BlueZ] " bluez.test.bot
2025-05-05 12:43 ` [PATCH BlueZ] monitor: remove redundant hexdumps in Mesh Provisioning Christian Eggers
2025-05-05 14:16   ` [BlueZ] " bluez.test.bot
2025-05-05 12:43 ` [PATCH BlueZ] tools/mesh-cfgclient: constify Christian Eggers
2025-05-05 14:19   ` [BlueZ] " bluez.test.bot
2025-05-05 14:22 ` [BlueZ] mesh: acceptor: fix endianess issues bluez.test.bot

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox