* [PATCH BlueZ 01/15] mesh: crypto: remove dead function declaration
@ 2025-07-08 12:59 Christian Eggers
2025-07-08 12:59 ` [PATCH BlueZ 02/15] mesh: crypto: remove unused function parameter Christian Eggers
` (17 more replies)
0 siblings, 18 replies; 21+ messages in thread
From: Christian Eggers @ 2025-07-08 12:59 UTC (permalink / raw)
To: linux-bluetooth; +Cc: Christian Eggers
The implementation of mesh_aes_ecb_one() has been removed in commit
dfed4839463f ("mesh: Convert crypto to use ELL wrappers").
---
mesh/crypto.h | 2 --
1 file changed, 2 deletions(-)
diff --git a/mesh/crypto.h b/mesh/crypto.h
index 55789886eb0e..3d85785f174c 100644
--- a/mesh/crypto.h
+++ b/mesh/crypto.h
@@ -22,8 +22,6 @@ bool mesh_crypto_aes_ccm_decrypt(const uint8_t nonce[13], const uint8_t key[16],
const void *enc_msg, uint16_t enc_msg_len,
void *out_msg,
void *out_mic, size_t mic_size);
-bool mesh_aes_ecb_one(const uint8_t key[16],
- const uint8_t plaintext[16], uint8_t encrypted[16]);
bool mesh_crypto_nkik(const uint8_t network_key[16], uint8_t identity_key[16]);
bool mesh_crypto_nkbk(const uint8_t network_key[16], uint8_t beacon_key[16]);
bool mesh_crypto_nkpk(const uint8_t network_key[16], uint8_t private_key[16]);
--
2.43.0
^ permalink raw reply related [flat|nested] 21+ messages in thread
* [PATCH BlueZ 02/15] mesh: crypto: remove unused function parameter
2025-07-08 12:59 [PATCH BlueZ 01/15] mesh: crypto: remove dead function declaration Christian Eggers
@ 2025-07-08 12:59 ` Christian Eggers
2025-07-08 12:59 ` [PATCH BlueZ 03/15] mesh: friend: remove dead function declarations Christian Eggers
` (16 subsequent siblings)
17 siblings, 0 replies; 21+ messages in thread
From: Christian Eggers @ 2025-07-08 12:59 UTC (permalink / raw)
To: linux-bluetooth; +Cc: Christian Eggers
The 'relay' parameter isn't used by mesh_crypto_packet_build().
---
mesh/crypto.c | 2 +-
mesh/crypto.h | 2 +-
mesh/net.c | 10 +++++-----
unit/test-mesh-crypto.c | 15 +++++----------
4 files changed, 12 insertions(+), 17 deletions(-)
diff --git a/mesh/crypto.c b/mesh/crypto.c
index ab44baee3427..136e6953578f 100644
--- a/mesh/crypto.c
+++ b/mesh/crypto.c
@@ -527,7 +527,7 @@ bool mesh_crypto_packet_build(bool ctl, uint8_t ttl,
uint16_t src, uint16_t dst,
uint8_t opcode,
bool segmented, uint8_t key_aid,
- bool szmic, bool relay, uint16_t seqZero,
+ bool szmic, uint16_t seqZero,
uint8_t segO, uint8_t segN,
const uint8_t *payload, uint8_t payload_len,
uint8_t *packet, uint8_t *packet_len)
diff --git a/mesh/crypto.h b/mesh/crypto.h
index 3d85785f174c..5e4d1d229c19 100644
--- a/mesh/crypto.h
+++ b/mesh/crypto.h
@@ -63,7 +63,7 @@ bool mesh_crypto_packet_build(bool ctl, uint8_t ttl,
uint16_t src, uint16_t dst,
uint8_t opcode,
bool segmented, uint8_t key_aid,
- bool szmic, bool relay, uint16_t seqZero,
+ bool szmic, uint16_t seqZero,
uint8_t segO, uint8_t segN,
const uint8_t *payload, uint8_t payload_len,
uint8_t *packet, uint8_t *packet_len);
diff --git a/mesh/net.c b/mesh/net.c
index a49df531c933..cbdfd9d299d5 100644
--- a/mesh/net.c
+++ b/mesh/net.c
@@ -3168,7 +3168,7 @@ static bool send_seg(struct mesh_net *net, uint8_t cnt, uint16_t interval,
/* TODO: Are we RXing on an LPN's behalf? Then set RLY bit */
if (!mesh_crypto_packet_build(false, msg->ttl, seq_num, msg->src,
msg->remote, 0, msg->segmented,
- msg->key_aid, msg->szmic, false,
+ msg->key_aid, msg->szmic,
msg->seqZero, segO, segN,
msg->buf + seg_off, seg_len,
packet + 1, &packet_len)) {
@@ -3224,7 +3224,7 @@ void mesh_net_send_seg(struct mesh_net *net, uint32_t net_key_id,
l_debug("segO: %d", segO);
if (!mesh_crypto_packet_build(false, ttl, seq, src, dst, 0,
- segmented, key_aid, szmic, false,
+ segmented, key_aid, szmic,
seqZero, segO, segN, seg, seg_len,
packet + 1, &packet_len)) {
l_error("Failed to build packet");
@@ -3379,7 +3379,7 @@ void mesh_net_ack_send(struct mesh_net *net, uint32_t net_key_id,
/* Not Segmented, no Key ID associated, no segO or segN */
if (!mesh_crypto_packet_build(true, ttl, seq, src, dst,
NET_OP_SEG_ACKNOWLEDGE, false, 0, false,
- rly, seqZero, 0, 0, data + 1, 6,
+ seqZero, 0, 0, data + 1, 6,
pkt + 1, &pkt_len))
return;
@@ -3465,8 +3465,8 @@ void mesh_net_transport_send(struct mesh_net *net, uint32_t net_key_id,
}
if (!mesh_crypto_packet_build(true, ttl, seq, src, dst, msg[0],
- false, 0, false, false, 0, 0, 0, msg + 1,
- msg_len - 1, pkt + 1, &pkt_len))
+ false, 0, false, 0, 0, 0, msg + 1, msg_len - 1,
+ pkt + 1, &pkt_len))
return;
if (!net_key_encrypt(net_key_id, iv_index, pkt + 1, pkt_len)) {
diff --git a/unit/test-mesh-crypto.c b/unit/test-mesh-crypto.c
index 39632d9734f2..81f0724fe540 100644
--- a/unit/test-mesh-crypto.c
+++ b/unit/test-mesh-crypto.c
@@ -846,8 +846,7 @@ static void check_encrypt_segment(const struct mesh_crypto_test *keys,
keys->net_src, keys->net_dst,
keys->opcode,
keys->segmented, key_aid,
- keys->szmic, keys->relay, keys->seqZero,
- seg, seg_max,
+ keys->szmic, keys->seqZero, seg, seg_max,
enc_msg, len,
packet, &packet_len);
} else {
@@ -856,8 +855,7 @@ static void check_encrypt_segment(const struct mesh_crypto_test *keys,
keys->net_src, keys->net_dst,
keys->opcode,
keys->segmented, key_aid,
- keys->szmic, keys->relay, keys->seqZero,
- seg, seg_max,
+ keys->szmic, keys->seqZero, seg, seg_max,
enc_msg, len,
packet, &packet_len);
}
@@ -1163,8 +1161,7 @@ static void check_encrypt(const struct mesh_crypto_test *keys)
keys->net_src, keys->net_dst,
keys->opcode,
keys->segmented, key_aid,
- keys->szmic, keys->relay, keys->seqZero,
- i, seg_max,
+ keys->szmic, keys->seqZero, i, seg_max,
enc_msg + 1, seg_len,
packet, &packet_len);
} else {
@@ -1174,8 +1171,7 @@ static void check_encrypt(const struct mesh_crypto_test *keys)
keys->net_src, keys->net_dst,
keys->opcode,
keys->segmented, key_aid,
- keys->szmic, keys->relay, seqZero,
- i, seg_max,
+ keys->szmic, seqZero, i, seg_max,
enc_msg + (i * 12), seg_len,
packet, &packet_len);
}
@@ -1732,8 +1728,7 @@ static void check_decrypt(const struct mesh_crypto_test *keys)
keys->net_dst, net_op,
keys->segmented,
keys->key_aid | (keys->akf ? KEY_ID_AKF : 0),
- keys->szmic, keys->relay, seqZero,
- i, seg_max,
+ keys->szmic, seqZero, i, seg_max,
payload + hdr_len, payload_len - hdr_len,
packet, &pkt_len);
verify_data("TransportData", 9, keys->trans_pkt[i], packet + 9,
--
2.43.0
^ permalink raw reply related [flat|nested] 21+ messages in thread
* [PATCH BlueZ 03/15] mesh: friend: remove dead function declarations
2025-07-08 12:59 [PATCH BlueZ 01/15] mesh: crypto: remove dead function declaration Christian Eggers
2025-07-08 12:59 ` [PATCH BlueZ 02/15] mesh: crypto: remove unused function parameter Christian Eggers
@ 2025-07-08 12:59 ` Christian Eggers
2025-07-08 12:59 ` [PATCH BlueZ 04/15] mesh: mesh-config: remove dead function prototype Christian Eggers
` (15 subsequent siblings)
17 siblings, 0 replies; 21+ messages in thread
From: Christian Eggers @ 2025-07-08 12:59 UTC (permalink / raw)
To: linux-bluetooth; +Cc: Christian Eggers
The implementations for these functions have been removed in commit
f246d31a7752 ("mesh: Friendship clean-up and rewrite").
---
mesh/friend.h | 16 ----------------
1 file changed, 16 deletions(-)
diff --git a/mesh/friend.h b/mesh/friend.h
index ba60534266bd..644ad1b9b42f 100644
--- a/mesh/friend.h
+++ b/mesh/friend.h
@@ -31,19 +31,3 @@ void friend_sub_add(struct mesh_net *net, struct mesh_friend *frnd,
const uint8_t *pkt, uint8_t len);
void friend_sub_del(struct mesh_net *net, struct mesh_friend *frnd,
const uint8_t *pkt, uint8_t len);
-void mesh_friend_relay_init(struct mesh_net *net, uint16_t addr);
-
-/* Low-Power-Node role */
-void frnd_sub_add(struct mesh_net *net, uint32_t parms[7]);
-void frnd_sub_del(struct mesh_net *net, uint32_t parms[7]);
-void frnd_poll(struct mesh_net *net, bool retry);
-void frnd_clear(struct mesh_net *net);
-void frnd_ack_poll(struct mesh_net *net);
-void frnd_poll_cancel(struct mesh_net *net);
-void frnd_request_friend(struct mesh_net *net, uint8_t cache,
- uint8_t offer_delay, uint8_t delay, uint32_t timeout);
-void frnd_offer(struct mesh_net *net, uint16_t src, uint8_t window,
- uint8_t cache, uint8_t sub_list_size,
- int8_t r_rssi, int8_t l_rssi, uint16_t fn_cnt);
-void frnd_key_refresh(struct mesh_net *net, uint8_t phase);
-uint32_t frnd_get_key(struct mesh_net *net);
--
2.43.0
^ permalink raw reply related [flat|nested] 21+ messages in thread
* [PATCH BlueZ 04/15] mesh: mesh-config: remove dead function prototype
2025-07-08 12:59 [PATCH BlueZ 01/15] mesh: crypto: remove dead function declaration Christian Eggers
2025-07-08 12:59 ` [PATCH BlueZ 02/15] mesh: crypto: remove unused function parameter Christian Eggers
2025-07-08 12:59 ` [PATCH BlueZ 03/15] mesh: friend: remove dead function declarations Christian Eggers
@ 2025-07-08 12:59 ` Christian Eggers
2025-07-08 12:59 ` [PATCH BlueZ 05/15] mesh: mesh-io-mgmt: Fix NULL pointer dereference Christian Eggers
` (14 subsequent siblings)
17 siblings, 0 replies; 21+ messages in thread
From: Christian Eggers @ 2025-07-08 12:59 UTC (permalink / raw)
To: linux-bluetooth; +Cc: Christian Eggers
mesh_config_write_address() has been added in commit 78668a02d6c4
("mesh: Change mesh_db prefix to mesh_config"), but an implementation
has never existed.
---
mesh/mesh-config.h | 1 -
1 file changed, 1 deletion(-)
diff --git a/mesh/mesh-config.h b/mesh/mesh-config.h
index b320116fa8dc..ea5993346111 100644
--- a/mesh/mesh-config.h
+++ b/mesh/mesh-config.h
@@ -186,7 +186,6 @@ bool mesh_config_net_key_update(struct mesh_config *cfg, uint16_t idx,
bool mesh_config_net_key_del(struct mesh_config *cfg, uint16_t net_idx);
bool mesh_config_net_key_set_phase(struct mesh_config *cfg, uint16_t idx,
uint8_t phase);
-bool mesh_config_write_address(struct mesh_config *cfg, uint16_t address);
bool mesh_config_write_iv_index(struct mesh_config *cfg, uint32_t idx,
bool update);
bool mesh_config_update_company_id(struct mesh_config *cfg, uint16_t cid);
--
2.43.0
^ permalink raw reply related [flat|nested] 21+ messages in thread
* [PATCH BlueZ 05/15] mesh: mesh-io-mgmt: Fix NULL pointer dereference
2025-07-08 12:59 [PATCH BlueZ 01/15] mesh: crypto: remove dead function declaration Christian Eggers
` (2 preceding siblings ...)
2025-07-08 12:59 ` [PATCH BlueZ 04/15] mesh: mesh-config: remove dead function prototype Christian Eggers
@ 2025-07-08 12:59 ` Christian Eggers
2025-07-08 12:59 ` [PATCH BlueZ 06/15] mesh: model: remove dead function prototype Christian Eggers
` (13 subsequent siblings)
17 siblings, 0 replies; 21+ messages in thread
From: Christian Eggers @ 2025-07-08 12:59 UTC (permalink / raw)
To: linux-bluetooth; +Cc: Christian Eggers
Don't try to dereference 'pvt' if it's NULL.
---
mesh/mesh-io-mgmt.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/mesh/mesh-io-mgmt.c b/mesh/mesh-io-mgmt.c
index f33f64124bd1..0d32859794d5 100644
--- a/mesh/mesh-io-mgmt.c
+++ b/mesh/mesh-io-mgmt.c
@@ -138,9 +138,10 @@ static void filter_timeout(struct l_timeout *timeout, void *user_data)
filter = l_queue_peek_tail(pvt->dup_filters);
}
+ pvt->dup_timeout = NULL;
+
done:
l_timeout_remove(timeout);
- pvt->dup_timeout = NULL;
}
/* Ignore consecutive duplicate advertisements within timeout period */
--
2.43.0
^ permalink raw reply related [flat|nested] 21+ messages in thread
* [PATCH BlueZ 06/15] mesh: model: remove dead function prototype
2025-07-08 12:59 [PATCH BlueZ 01/15] mesh: crypto: remove dead function declaration Christian Eggers
` (3 preceding siblings ...)
2025-07-08 12:59 ` [PATCH BlueZ 05/15] mesh: mesh-io-mgmt: Fix NULL pointer dereference Christian Eggers
@ 2025-07-08 12:59 ` Christian Eggers
2025-07-08 12:59 ` [PATCH BlueZ 07/15] mesh: net: remove unused stuff Christian Eggers
` (12 subsequent siblings)
17 siblings, 0 replies; 21+ messages in thread
From: Christian Eggers @ 2025-07-08 12:59 UTC (permalink / raw)
To: linux-bluetooth; +Cc: Christian Eggers
mesh_model_cfg_blk() has been added in commit 6fbc4c83e134 ("mesh:
Header files for mesh access layer and utilities"), but an
implementation has never existed.
---
mesh/model.h | 1 -
1 file changed, 1 deletion(-)
diff --git a/mesh/model.h b/mesh/model.h
index 8df4f205f2cc..6e36ee4c6332 100644
--- a/mesh/model.h
+++ b/mesh/model.h
@@ -101,7 +101,6 @@ int mesh_model_virt_sub_ovrt(struct mesh_node *node, uint16_t ele_addr,
uint16_t *addr);
int mesh_model_sub_get(struct mesh_node *node, uint16_t ele_addr, uint32_t id,
uint8_t *buf, uint16_t buf_size, uint16_t *size);
-uint16_t mesh_model_cfg_blk(uint8_t *pkt);
bool mesh_model_send(struct mesh_node *node, uint16_t src, uint16_t dst,
uint16_t app_idx, uint16_t net_idx, uint8_t ttl,
bool segmented, uint16_t len, const void *data);
--
2.43.0
^ permalink raw reply related [flat|nested] 21+ messages in thread
* [PATCH BlueZ 07/15] mesh: net: remove unused stuff
2025-07-08 12:59 [PATCH BlueZ 01/15] mesh: crypto: remove dead function declaration Christian Eggers
` (4 preceding siblings ...)
2025-07-08 12:59 ` [PATCH BlueZ 06/15] mesh: model: remove dead function prototype Christian Eggers
@ 2025-07-08 12:59 ` Christian Eggers
2025-07-08 12:59 ` [PATCH BlueZ 08/15] mesh: net: update comment Christian Eggers
` (11 subsequent siblings)
17 siblings, 0 replies; 21+ messages in thread
From: Christian Eggers @ 2025-07-08 12:59 UTC (permalink / raw)
To: linux-bluetooth; +Cc: Christian Eggers
'struct mesh_key_set', 'mesh_status_func_t' and 'struct net_decode'
aren't used anywhere.
---
mesh/net.c | 11 -----------
mesh/net.h | 9 ---------
2 files changed, 20 deletions(-)
diff --git a/mesh/net.c b/mesh/net.c
index cbdfd9d299d5..2e10aadcec19 100644
--- a/mesh/net.c
+++ b/mesh/net.c
@@ -182,17 +182,6 @@ struct mesh_destination {
uint16_t ref_cnt;
};
-struct net_decode {
- struct mesh_net *net;
- struct mesh_friend *frnd;
- struct mesh_key_set *key_set;
- uint8_t *packet;
- uint32_t iv_index;
- uint8_t size;
- uint8_t nid;
- bool proxy;
-};
-
struct net_queue_data {
struct mesh_io_recv_info *info;
struct mesh_net *net;
diff --git a/mesh/net.h b/mesh/net.h
index 8a3b4038b6de..62b8f5896089 100644
--- a/mesh/net.h
+++ b/mesh/net.h
@@ -143,13 +143,6 @@ struct mesh_net_heartbeat_pub {
uint8_t ttl;
};
-struct mesh_key_set {
- bool frnd;
- uint8_t nid;
- uint8_t enc_key[16];
- uint8_t privacy_key[16];
-};
-
struct friend_neg {
int8_t rssi;
bool clearing;
@@ -219,8 +212,6 @@ struct mesh_friend_msg {
} u;
};
-typedef void (*mesh_status_func_t)(void *user_data, bool result);
-
struct mesh_net *mesh_net_new(struct mesh_node *node);
void mesh_net_free(void *net);
void mesh_net_cleanup(void);
--
2.43.0
^ permalink raw reply related [flat|nested] 21+ messages in thread
* [PATCH BlueZ 08/15] mesh: net: update comment
2025-07-08 12:59 [PATCH BlueZ 01/15] mesh: crypto: remove dead function declaration Christian Eggers
` (5 preceding siblings ...)
2025-07-08 12:59 ` [PATCH BlueZ 07/15] mesh: net: remove unused stuff Christian Eggers
@ 2025-07-08 12:59 ` Christian Eggers
2025-07-08 12:59 ` [PATCH BlueZ 09/15] mesh: net: remove obsolete struct net_key Christian Eggers
` (10 subsequent siblings)
17 siblings, 0 replies; 21+ messages in thread
From: Christian Eggers @ 2025-07-08 12:59 UTC (permalink / raw)
To: linux-bluetooth; +Cc: Christian Eggers
term 'master credentials' has been replaced by 'flooding credentials' in
commit 09f87c80f1d5 ("mesh: Inclusive language changes")
---
mesh/net.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/mesh/net.c b/mesh/net.c
index 2e10aadcec19..b61cb8cc41ac 100644
--- a/mesh/net.c
+++ b/mesh/net.c
@@ -2494,7 +2494,7 @@ static void net_rx(void *net_ptr, void *user_data)
if (relay_advice > data->relay_advice) {
/*
* If packet was encrypted with friendship credentials,
- * relay it using master credentials
+ * relay it using flooding credentials
*/
if (frnd && !mesh_net_get_key(net, false, net_idx, &net_key_id))
return;
--
2.43.0
^ permalink raw reply related [flat|nested] 21+ messages in thread
* [PATCH BlueZ 09/15] mesh: net: remove obsolete struct net_key
2025-07-08 12:59 [PATCH BlueZ 01/15] mesh: crypto: remove dead function declaration Christian Eggers
` (6 preceding siblings ...)
2025-07-08 12:59 ` [PATCH BlueZ 08/15] mesh: net: update comment Christian Eggers
@ 2025-07-08 12:59 ` Christian Eggers
2025-07-08 12:59 ` [PATCH BlueZ 10/15] mesh: net-keys: introduce BEACON_LEN_SNB, BEACON_LEN_MPB, BEACON_LEN_MAX Christian Eggers
` (9 subsequent siblings)
17 siblings, 0 replies; 21+ messages in thread
From: Christian Eggers @ 2025-07-08 12:59 UTC (permalink / raw)
To: linux-bluetooth; +Cc: Christian Eggers
'struct net_key' has been introduced in commmit 37ebf9eb0bf9 ("mesh:
Upper and Lower mesh transport") and became superseded in commit
994932b740c7 ("mesh: Refactor friend.c and net.c for central key DB").
---
mesh/net.c | 8 --------
1 file changed, 8 deletions(-)
diff --git a/mesh/net.c b/mesh/net.c
index b61cb8cc41ac..54283d9ba265 100644
--- a/mesh/net.c
+++ b/mesh/net.c
@@ -74,14 +74,6 @@ enum _iv_upd_state {
IV_UPD_NORMAL_HOLD,
};
-struct net_key {
- struct mesh_key_set key_set;
- unsigned int beacon_id;
- uint8_t key[16];
- uint8_t beacon_key[16];
- uint8_t network_id[8];
-};
-
struct mesh_subnet {
struct mesh_net *net;
uint16_t idx;
--
2.43.0
^ permalink raw reply related [flat|nested] 21+ messages in thread
* [PATCH BlueZ 10/15] mesh: net-keys: introduce BEACON_LEN_SNB, BEACON_LEN_MPB, BEACON_LEN_MAX
2025-07-08 12:59 [PATCH BlueZ 01/15] mesh: crypto: remove dead function declaration Christian Eggers
` (7 preceding siblings ...)
2025-07-08 12:59 ` [PATCH BlueZ 09/15] mesh: net: remove obsolete struct net_key Christian Eggers
@ 2025-07-08 12:59 ` Christian Eggers
2025-07-08 12:59 ` [PATCH BlueZ 11/15] mesh: net-keys: remove dead function prototype Christian Eggers
` (8 subsequent siblings)
17 siblings, 0 replies; 21+ messages in thread
From: Christian Eggers @ 2025-07-08 12:59 UTC (permalink / raw)
To: linux-bluetooth; +Cc: Christian Eggers
Lets introduce symbolic names before spreading these magic numbers over
more locations.
---
mesh/net-keys.c | 18 +++++++++---------
mesh/net-keys.h | 3 +++
2 files changed, 12 insertions(+), 9 deletions(-)
diff --git a/mesh/net-keys.c b/mesh/net-keys.c
index 42d498ce0ede..a10f93ccb03e 100644
--- a/mesh/net-keys.c
+++ b/mesh/net-keys.c
@@ -30,7 +30,7 @@
#define BEACON_CACHE_MAX 10
struct beacon_rx {
- uint8_t data[28];
+ uint8_t data[BEACON_LEN_MAX];
uint32_t id;
uint32_t ivi;
bool kr;
@@ -458,10 +458,10 @@ uint32_t net_key_beacon(const uint8_t *data, uint16_t len, uint32_t *ivi,
uint32_t b_id, b_ivi;
bool b_ivu, b_kr;
- if (data[1] == BEACON_TYPE_SNB && len != 23)
+ if (data[1] == BEACON_TYPE_SNB && len != BEACON_LEN_SNB)
return 0;
- if (data[1] == BEACON_TYPE_MPB && len != 28)
+ if (data[1] == BEACON_TYPE_MPB && len != BEACON_LEN_MPB)
return 0;
beacon = l_queue_remove_if(beacons, match_beacon, data + 1);
@@ -527,7 +527,7 @@ static void send_network_beacon(struct net_key *key)
net_key_beacon_refresh(key->id, key->ivi, key->kr,
key->ivu, true);
- mesh_io_send(NULL, &info, key->mpb, 28);
+ mesh_io_send(NULL, &info, key->mpb, BEACON_LEN_MPB);
}
if (key->snb_enables) {
@@ -536,7 +536,7 @@ static void send_network_beacon(struct net_key *key)
key->ivu, true);
}
- mesh_io_send(NULL, &info, key->snb, 23);
+ mesh_io_send(NULL, &info, key->snb, BEACON_LEN_SNB);
}
}
@@ -636,12 +636,12 @@ bool net_key_beacon_refresh(uint32_t id, uint32_t ivi, bool kr, bool ivu,
return false;
if (key->snb_enables && !key->snb) {
- key->snb = l_new(uint8_t, 23);
+ key->snb = l_new(uint8_t, BEACON_LEN_SNB);
refresh = true;
}
if (key->mpb_enables && !key->mpb) {
- key->mpb = l_new(uint8_t, 28);
+ key->mpb = l_new(uint8_t, BEACON_LEN_MPB);
refresh = true;
}
@@ -655,14 +655,14 @@ bool net_key_beacon_refresh(uint32_t id, uint32_t ivi, bool kr, bool ivu,
if (!mpb_compose(key, ivi, kr, ivu))
return false;
- print_packet("Set MPB to", key->mpb, 28);
+ print_packet("Set MPB to", key->mpb, BEACON_LEN_MPB);
}
if (key->snb) {
if (!snb_compose(key, ivi, kr, ivu))
return false;
- print_packet("Set SNB to", key->snb, 23);
+ print_packet("Set SNB to", key->snb, BEACON_LEN_SNB);
}
l_debug("Set Beacon: IVI: %8.8x, IVU: %d, KR: %d", ivi, ivu, kr);
diff --git a/mesh/net-keys.h b/mesh/net-keys.h
index e73812481ddb..61340dbfd804 100644
--- a/mesh/net-keys.h
+++ b/mesh/net-keys.h
@@ -10,6 +10,9 @@
#define BEACON_TYPE_SNB 0x01
#define BEACON_TYPE_MPB 0x02
+#define BEACON_LEN_SNB 23
+#define BEACON_LEN_MPB 28
+#define BEACON_LEN_MAX BEACON_LEN_MPB
#define KEY_REFRESH 0x01
#define IV_INDEX_UPDATE 0x02
#define NET_MPB_REFRESH_DEFAULT 60
--
2.43.0
^ permalink raw reply related [flat|nested] 21+ messages in thread
* [PATCH BlueZ 11/15] mesh: net-keys: remove dead function prototype
2025-07-08 12:59 [PATCH BlueZ 01/15] mesh: crypto: remove dead function declaration Christian Eggers
` (8 preceding siblings ...)
2025-07-08 12:59 ` [PATCH BlueZ 10/15] mesh: net-keys: introduce BEACON_LEN_SNB, BEACON_LEN_MPB, BEACON_LEN_MAX Christian Eggers
@ 2025-07-08 12:59 ` Christian Eggers
2025-07-08 12:59 ` [PATCH BlueZ 12/15] mesh: node: " Christian Eggers
` (7 subsequent siblings)
17 siblings, 0 replies; 21+ messages in thread
From: Christian Eggers @ 2025-07-08 12:59 UTC (permalink / raw)
To: linux-bluetooth; +Cc: Christian Eggers
net_key_snb_compose() has been made static (and renamed) in commit
5ba57cf85140 ("mesh: Add Tx/Rx support of Mesh Private Beacons").
---
mesh/net-keys.h | 2 --
1 file changed, 2 deletions(-)
diff --git a/mesh/net-keys.h b/mesh/net-keys.h
index 61340dbfd804..49e01132cbf2 100644
--- a/mesh/net-keys.h
+++ b/mesh/net-keys.h
@@ -32,8 +32,6 @@ uint32_t net_key_beacon(const uint8_t *data, uint16_t len, uint32_t *ivi,
bool *ivu, bool *kr);
bool net_key_snb_check(uint32_t id, uint32_t iv_index, bool kr, bool ivu,
uint64_t cmac);
-bool net_key_snb_compose(uint32_t id, uint32_t iv_index, bool kr, bool ivu,
- uint8_t *snb);
void net_key_beacon_seen(uint32_t id);
bool net_key_beacon_refresh(uint32_t id, uint32_t iv_index, bool kr, bool ivu,
bool force);
--
2.43.0
^ permalink raw reply related [flat|nested] 21+ messages in thread
* [PATCH BlueZ 12/15] mesh: node: remove dead function prototype
2025-07-08 12:59 [PATCH BlueZ 01/15] mesh: crypto: remove dead function declaration Christian Eggers
` (9 preceding siblings ...)
2025-07-08 12:59 ` [PATCH BlueZ 11/15] mesh: net-keys: remove dead function prototype Christian Eggers
@ 2025-07-08 12:59 ` Christian Eggers
2025-07-08 12:59 ` [PATCH BlueZ 13/15] mesh: prov: cleanup header Christian Eggers
` (6 subsequent siblings)
17 siblings, 0 replies; 21+ messages in thread
From: Christian Eggers @ 2025-07-08 12:59 UTC (permalink / raw)
To: linux-bluetooth; +Cc: Christian Eggers
node_init_from_storage() has been made static (and renamed) in commit
7cafe5fd7cc8 ("mesh: Manage node config directory in mesh-config").
---
mesh/node.h | 2 --
1 file changed, 2 deletions(-)
diff --git a/mesh/node.h b/mesh/node.h
index 136173c8cee1..92dff2256dcf 100644
--- a/mesh/node.h
+++ b/mesh/node.h
@@ -51,8 +51,6 @@ int node_get_element_idx(struct mesh_node *node, uint16_t ele_addr);
struct l_queue *node_get_element_models(struct mesh_node *node,
uint8_t ele_idx);
uint16_t node_get_crpl(struct mesh_node *node);
-bool node_init_from_storage(struct mesh_node *node, const uint8_t uuid[16],
- struct mesh_config_node *db_node);
const uint8_t *node_get_comp(struct mesh_node *node, uint8_t page_num,
uint16_t *len);
bool node_replace_comp(struct mesh_node *node, uint8_t retire, uint8_t with);
--
2.43.0
^ permalink raw reply related [flat|nested] 21+ messages in thread
* [PATCH BlueZ 13/15] mesh: prov: cleanup header
2025-07-08 12:59 [PATCH BlueZ 01/15] mesh: crypto: remove dead function declaration Christian Eggers
` (10 preceding siblings ...)
2025-07-08 12:59 ` [PATCH BlueZ 12/15] mesh: node: " Christian Eggers
@ 2025-07-08 12:59 ` Christian Eggers
2025-07-08 12:59 ` [PATCH BlueZ 14/15] mesh: remove unneeded casts to bool Christian Eggers
` (5 subsequent siblings)
17 siblings, 0 replies; 21+ messages in thread
From: Christian Eggers @ 2025-07-08 12:59 UTC (permalink / raw)
To: linux-bluetooth; +Cc: Christian Eggers
Most stuff in this file isn't been used.
---
mesh/prov.h | 116 ----------------------------------------------------
1 file changed, 116 deletions(-)
diff --git a/mesh/prov.h b/mesh/prov.h
index e86668fe40b8..c944663fa229 100644
--- a/mesh/prov.h
+++ b/mesh/prov.h
@@ -12,39 +12,11 @@
#define __packed __attribute__((packed))
#endif
-struct mesh_net;
-struct mesh_dev;
-
-enum mesh_trans {
- MESH_TRANS_IDLE,
- MESH_TRANS_TX,
- MESH_TRANS_RX,
-};
-
-enum mesh_bearer {
- MESH_BEARER_IDLE,
- MESH_BEARER_ADV,
-};
-
-enum mesh_prov_mode {
- MESH_PROV_MODE_NONE,
- MESH_PROV_MODE_INITIATOR,
- MESH_PROV_MODE_GATT_ACCEPTOR,
- MESH_PROV_MODE_ADV_ACCEPTOR,
- MESH_PROV_MODE_GATT_CLIENT,
- MESH_PROV_MODE_MESH_SERVER,
- MESH_PROV_MODE_MESH_CLIENT,
- MESH_PROV_MODE_MESH_GATT_CLIENT,
-};
-
-struct mesh_prov;
-
typedef void (*prov_trans_tx_t)(void *tx_data, const void *data, uint16_t len);
typedef void (*mesh_prov_open_func_t)(void *user_data, prov_trans_tx_t trans_tx,
void *trans_data, uint8_t trans_type);
typedef void (*mesh_prov_close_func_t)(void *user_data, uint8_t reason);
-typedef void (*mesh_prov_send_func_t)(bool success, struct mesh_prov *prov);
typedef void (*mesh_prov_ack_func_t)(void *user_data, uint8_t msg_num);
typedef void (*mesh_prov_receive_func_t)(void *user_data, const void *data,
uint16_t size);
@@ -118,91 +90,3 @@ struct conf_input {
uint8_t prv_pub_key[64];
uint8_t dev_pub_key[64];
} __packed;
-
-struct mesh_prov {
- int ref_count;
- struct mesh_dev *dev;
- struct mesh_net *net;
- enum mesh_prov_mode mode;
- enum mesh_trans trans;
- enum mesh_bearer bearer;
- uint8_t uuid[16];
- uint8_t caps[12];
-
- uint32_t conn_id;
- uint16_t net_idx;
- uint16_t remote;
- uint16_t addr;
- uint16_t expected_len;
- uint16_t packet_len;
- uint8_t local_msg_num;
- uint8_t peer_msg_num;
- uint8_t last_peer_msg_num;
- uint8_t got_segs;
- uint8_t expected_segs;
- uint8_t expected_fcs;
- uint8_t packet_buf[80];
- uint8_t peer_buf[80];
- struct timeval tx_start;
- struct l_timeout *tx_timeout;
-
- /* Provisioning credentials and crypto material */
- struct conf_input conf_inputs;
- uint8_t dev_key[16];
- uint8_t conf_salt[16];
- uint8_t s_key[16];
- uint8_t s_nonce[13];
- uint8_t conf_key[16];
- uint8_t conf[16];
- uint8_t r_conf[16];
- uint8_t rand_auth[32];
- uint8_t prov_salt[16];
- uint8_t secret[32];
- uint8_t r_public[64];
- uint8_t l_public[64];
- /* End Provisioning credentials and crypto material */
-
- mesh_prov_open_func_t open_callback;
- mesh_prov_close_func_t close_callback;
- mesh_prov_receive_func_t receive_callback;
- void *receive_data;
- mesh_prov_send_func_t send_callback;
- void *send_data;
-};
-
-struct mesh_prov *mesh_prov_new(struct mesh_net *net, uint16_t remote);
-
-struct mesh_prov *mesh_prov_ref(struct mesh_prov *prov);
-void mesh_prov_unref(struct mesh_prov *prov);
-
-bool mesh_prov_gatt_client(struct mesh_prov *prov, struct mesh_dev *dev,
- uint8_t uuid[16],
- mesh_prov_open_func_t open_callback,
- mesh_prov_close_func_t close_callback,
- mesh_prov_receive_func_t recv_callback,
- void *user_data);
-
-bool mesh_prov_listen(struct mesh_net *net, uint8_t uuid[16], uint8_t caps[12],
- mesh_prov_open_func_t open_callback,
- mesh_prov_close_func_t close_callback,
- mesh_prov_receive_func_t recv_callback,
- void *user_data);
-
-bool mesh_prov_connect(struct mesh_prov *prov, struct mesh_dev *dev,
- uint16_t net_idx, uint8_t uuid[16],
- mesh_prov_open_func_t open_callback,
- mesh_prov_close_func_t close_callback,
- mesh_prov_receive_func_t recv_callback,
- void *user_data);
-
-unsigned int mesh_prov_send(struct mesh_prov *prov,
- const void *data, uint16_t size,
- mesh_prov_send_func_t send_callback,
- void *user_data);
-bool mesh_prov_cancel(struct mesh_prov *prov, unsigned int id);
-
-bool mesh_prov_close(struct mesh_prov *prov, uint8_t reason);
-void mesh_prov_set_addr(struct mesh_prov *prov, uint16_t addr);
-uint16_t mesh_prov_get_addr(struct mesh_prov *prov);
-void mesh_prov_set_idx(struct mesh_prov *prov, uint16_t net_idx);
-uint16_t mesh_prov_get_idx(struct mesh_prov *prov);
--
2.43.0
^ permalink raw reply related [flat|nested] 21+ messages in thread
* [PATCH BlueZ 14/15] mesh: remove unneeded casts to bool
2025-07-08 12:59 [PATCH BlueZ 01/15] mesh: crypto: remove dead function declaration Christian Eggers
` (11 preceding siblings ...)
2025-07-08 12:59 ` [PATCH BlueZ 13/15] mesh: prov: cleanup header Christian Eggers
@ 2025-07-08 12:59 ` Christian Eggers
2025-07-08 12:59 ` [PATCH BlueZ 15/15] mesh: use '0x1' rathen than 'true' for bit operations Christian Eggers
` (4 subsequent siblings)
17 siblings, 0 replies; 21+ messages in thread
From: Christian Eggers @ 2025-07-08 12:59 UTC (permalink / raw)
To: linux-bluetooth; +Cc: Christian Eggers
The result of these expression is already of type 'bool'.
---
mesh/crypto.c | 2 +-
mesh/friend.c | 2 +-
mesh/mesh-io-mgmt.c | 2 +-
mesh/mesh-io-unit.c | 2 +-
mesh/net.c | 8 ++++----
5 files changed, 8 insertions(+), 8 deletions(-)
diff --git a/mesh/crypto.c b/mesh/crypto.c
index 136e6953578f..a9d670485da5 100644
--- a/mesh/crypto.c
+++ b/mesh/crypto.c
@@ -67,7 +67,7 @@ static bool aes_cmac_one(const uint8_t key[16], const void *msg,
if (result) {
ssize_t len = l_checksum_get_digest(checksum, res, 16);
- result = !!(len == 16);
+ result = (len == 16);
}
l_checksum_free(checksum);
diff --git a/mesh/friend.c b/mesh/friend.c
index 6aacf6338f24..1c60705e046c 100644
--- a/mesh/friend.c
+++ b/mesh/friend.c
@@ -521,7 +521,7 @@ void friend_poll(struct mesh_net *net, uint16_t src, bool seq,
frnd->u.active.seq = seq;
frnd->u.active.last = !seq;
- md = !!(l_queue_length(frnd->pkt_cache) > 1);
+ md = (l_queue_length(frnd->pkt_cache) > 1);
if (pkt->ctl) {
/* Make sure we don't change the bit-sense of MD,
diff --git a/mesh/mesh-io-mgmt.c b/mesh/mesh-io-mgmt.c
index 0d32859794d5..4ca7ff93c863 100644
--- a/mesh/mesh-io-mgmt.c
+++ b/mesh/mesh-io-mgmt.c
@@ -581,7 +581,7 @@ static void tx_to(struct l_timeout *timeout, void *user_data)
count = 1;
}
- tx->delete = !!(count == 1);
+ tx->delete = (count == 1);
send_pkt(pvt, tx, ms);
diff --git a/mesh/mesh-io-unit.c b/mesh/mesh-io-unit.c
index 4fd72bf8480d..936f5a9514c5 100644
--- a/mesh/mesh-io-unit.c
+++ b/mesh/mesh-io-unit.c
@@ -341,7 +341,7 @@ static void tx_to(struct l_timeout *timeout, void *user_data)
count = 1;
}
- tx->delete = !!(count == 1);
+ tx->delete = (count == 1);
send_pkt(pvt, tx, ms);
diff --git a/mesh/net.c b/mesh/net.c
index 54283d9ba265..e8e3e271cf59 100644
--- a/mesh/net.c
+++ b/mesh/net.c
@@ -606,7 +606,7 @@ static void refresh_beacon(void *a, void *b)
struct mesh_net *net = b;
net_key_beacon_refresh(subnet->net_key_tx, net->iv_index,
- !!(subnet->kr_phase == KEY_REFRESH_PHASE_TWO), net->iv_update,
+ subnet->kr_phase == KEY_REFRESH_PHASE_TWO, net->iv_update,
false);
}
@@ -2809,7 +2809,7 @@ static void process_beacon(void *net_ptr, void *user_data)
/* Get IVU and KR boolean bits from beacon */
ivu = beacon_data->ivu;
kr = beacon_data->kr;
- local_kr = !!(subnet->kr_phase == KEY_REFRESH_PHASE_TWO);
+ local_kr = (subnet->kr_phase == KEY_REFRESH_PHASE_TWO);
/* We have officially *seen* this beacon now */
beacon_data->processed = true;
@@ -2831,7 +2831,7 @@ static void process_beacon(void *net_ptr, void *user_data)
if (updated)
net_key_beacon_refresh(beacon_data->net_key_id,
net->iv_index,
- !!(subnet->kr_phase == KEY_REFRESH_PHASE_TWO),
+ subnet->kr_phase == KEY_REFRESH_PHASE_TWO,
net->iv_update, false);
}
}
@@ -2974,7 +2974,7 @@ bool mesh_net_set_key(struct mesh_net *net, uint16_t idx, const uint8_t *key,
subnet->kr_phase = phase;
net_key_beacon_refresh(subnet->net_key_tx, net->iv_index,
- !!(subnet->kr_phase == KEY_REFRESH_PHASE_TWO), net->iv_update,
+ subnet->kr_phase == KEY_REFRESH_PHASE_TWO, net->iv_update,
false);
--
2.43.0
^ permalink raw reply related [flat|nested] 21+ messages in thread
* [PATCH BlueZ 15/15] mesh: use '0x1' rathen than 'true' for bit operations
2025-07-08 12:59 [PATCH BlueZ 01/15] mesh: crypto: remove dead function declaration Christian Eggers
` (12 preceding siblings ...)
2025-07-08 12:59 ` [PATCH BlueZ 14/15] mesh: remove unneeded casts to bool Christian Eggers
@ 2025-07-08 12:59 ` Christian Eggers
2025-07-08 14:21 ` [BlueZ,01/15] mesh: crypto: remove dead function declaration bluez.test.bot
` (3 subsequent siblings)
17 siblings, 0 replies; 21+ messages in thread
From: Christian Eggers @ 2025-07-08 12:59 UTC (permalink / raw)
To: linux-bluetooth; +Cc: Christian Eggers
Although 'true' expands to 1, it feels more natural using '0x1' (or '1')
when performing masking or bit shifting operations.
---
mesh/crypto.c | 6 +++---
mesh/net.c | 4 ++--
mesh/net.h | 4 ++--
3 files changed, 7 insertions(+), 7 deletions(-)
diff --git a/mesh/crypto.c b/mesh/crypto.c
index a9d670485da5..31001d283a04 100644
--- a/mesh/crypto.c
+++ b/mesh/crypto.c
@@ -640,7 +640,7 @@ bool mesh_crypto_packet_parse(const uint8_t *packet, uint8_t packet_len,
hdr = l_get_be32(packet + 9);
- is_segmented = !!((hdr >> SEG_HDR_SHIFT) & true);
+ is_segmented = !!((hdr >> SEG_HDR_SHIFT) & 0x1);
if (segmented)
*segmented = is_segmented;
@@ -655,7 +655,7 @@ bool mesh_crypto_packet_parse(const uint8_t *packet, uint8_t packet_len,
if (this_dst && this_opcode == NET_OP_SEG_ACKNOWLEDGE) {
if (relay)
- *relay = !!((hdr >> RELAY_HDR_SHIFT) & true);
+ *relay = !!((hdr >> RELAY_HDR_SHIFT) & 0x1);
if (seqZero)
*seqZero = (hdr >> SEQ_ZERO_HDR_SHIFT) &
@@ -682,7 +682,7 @@ bool mesh_crypto_packet_parse(const uint8_t *packet, uint8_t packet_len,
if (is_segmented) {
if (szmic)
- *szmic = !!((hdr >> SZMIC_HDR_SHIFT) & true);
+ *szmic = !!((hdr >> SZMIC_HDR_SHIFT) & 0x1);
if (seqZero)
*seqZero = (hdr >> SEQ_ZERO_HDR_SHIFT) &
diff --git a/mesh/net.c b/mesh/net.c
index e8e3e271cf59..895b79e60db2 100644
--- a/mesh/net.c
+++ b/mesh/net.c
@@ -3184,9 +3184,9 @@ void mesh_net_send_seg(struct mesh_net *net, uint32_t net_key_id,
{
uint8_t packet[30];
uint8_t packet_len;
- bool segmented = !!((hdr >> SEG_HDR_SHIFT) & true);
+ bool segmented = !!((hdr >> SEG_HDR_SHIFT) & 0x1);
uint8_t key_aid = (hdr >> KEY_HDR_SHIFT) & KEY_ID_MASK;
- bool szmic = !!((hdr >> SZMIC_HDR_SHIFT) & true);
+ bool szmic = !!((hdr >> SZMIC_HDR_SHIFT) & 0x1);
uint16_t seqZero = (hdr >> SEQ_ZERO_HDR_SHIFT) & SEQ_ZERO_MASK;
uint8_t segO = (hdr >> SEGO_HDR_SHIFT) & SEG_MASK;
uint8_t segN = (hdr >> SEGN_HDR_SHIFT) & SEG_MASK;
diff --git a/mesh/net.h b/mesh/net.h
index 62b8f5896089..5200beb2fada 100644
--- a/mesh/net.h
+++ b/mesh/net.h
@@ -65,9 +65,9 @@ struct mesh_node;
/* Mask of Hdr bits which must be constant over entire incoming SAR message */
/* (SEG || AKF || AID || SZMIC || SeqZero || SegN) */
-#define HDR_KEY_MASK ((true << SEG_HDR_SHIFT) | \
+#define HDR_KEY_MASK ((0x1 << SEG_HDR_SHIFT) | \
(KEY_ID_MASK << KEY_HDR_SHIFT) | \
- (true << SZMIC_HDR_SHIFT) | \
+ (0x1 << SZMIC_HDR_SHIFT) | \
(SEQ_ZERO_MASK << SEQ_ZERO_HDR_SHIFT) | \
(SEG_MASK << SEGN_HDR_SHIFT))
--
2.43.0
^ permalink raw reply related [flat|nested] 21+ messages in thread
* RE: [BlueZ,01/15] mesh: crypto: remove dead function declaration
2025-07-08 12:59 [PATCH BlueZ 01/15] mesh: crypto: remove dead function declaration Christian Eggers
` (13 preceding siblings ...)
2025-07-08 12:59 ` [PATCH BlueZ 15/15] mesh: use '0x1' rathen than 'true' for bit operations Christian Eggers
@ 2025-07-08 14:21 ` bluez.test.bot
2025-07-08 14:59 ` [PATCH BlueZ 01/15] " Luiz Augusto von Dentz
` (2 subsequent siblings)
17 siblings, 0 replies; 21+ messages in thread
From: bluez.test.bot @ 2025-07-08 14:21 UTC (permalink / raw)
To: linux-bluetooth, ceggers
[-- Attachment #1: Type: text/plain, Size: 1430 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=980052
---Test result---
Test Summary:
CheckPatch PENDING 0.46 seconds
GitLint PENDING 0.37 seconds
BuildEll PASS 20.75 seconds
BluezMake PASS 2714.98 seconds
MakeCheck PASS 20.33 seconds
MakeDistcheck PASS 186.42 seconds
CheckValgrind PASS 236.01 seconds
CheckSmatch WARNING 307.45 seconds
bluezmakeextell PASS 128.36 seconds
IncrementalBuild PENDING 0.45 seconds
ScanBuild PASS 922.86 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:
mesh/mesh-io-mgmt.c:525:67: warning: Variable length array is used.
##############################
Test: IncrementalBuild - PENDING
Desc: Incremental build with the patches in the series
Output:
---
Regards,
Linux Bluetooth
^ permalink raw reply [flat|nested] 21+ messages in thread
* Re: [PATCH BlueZ 01/15] mesh: crypto: remove dead function declaration
2025-07-08 12:59 [PATCH BlueZ 01/15] mesh: crypto: remove dead function declaration Christian Eggers
` (14 preceding siblings ...)
2025-07-08 14:21 ` [BlueZ,01/15] mesh: crypto: remove dead function declaration bluez.test.bot
@ 2025-07-08 14:59 ` Luiz Augusto von Dentz
2025-07-08 15:07 ` Christian Eggers
2025-07-08 19:30 ` patchwork-bot+bluetooth
2025-07-15 14:30 ` patchwork-bot+bluetooth
17 siblings, 1 reply; 21+ messages in thread
From: Luiz Augusto von Dentz @ 2025-07-08 14:59 UTC (permalink / raw)
To: Christian Eggers; +Cc: linux-bluetooth
Hi Christian,
On Tue, Jul 8, 2025 at 9:15 AM Christian Eggers <ceggers@arri.de> wrote:
>
> The implementation of mesh_aes_ecb_one() has been removed in commit
> dfed4839463f ("mesh: Convert crypto to use ELL wrappers").
> ---
> mesh/crypto.h | 2 --
> 1 file changed, 2 deletions(-)
>
> diff --git a/mesh/crypto.h b/mesh/crypto.h
> index 55789886eb0e..3d85785f174c 100644
> --- a/mesh/crypto.h
> +++ b/mesh/crypto.h
> @@ -22,8 +22,6 @@ bool mesh_crypto_aes_ccm_decrypt(const uint8_t nonce[13], const uint8_t key[16],
> const void *enc_msg, uint16_t enc_msg_len,
> void *out_msg,
> void *out_mic, size_t mic_size);
> -bool mesh_aes_ecb_one(const uint8_t key[16],
> - const uint8_t plaintext[16], uint8_t encrypted[16]);
> bool mesh_crypto_nkik(const uint8_t network_key[16], uint8_t identity_key[16]);
> bool mesh_crypto_nkbk(const uint8_t network_key[16], uint8_t beacon_key[16]);
> bool mesh_crypto_nkpk(const uint8_t network_key[16], uint8_t private_key[16]);
> --
> 2.43.0
Is this set just a cleanup, no logical changes were made? In that case
I can probably go ahead and push it myself, otherwise I may ask Brian
to step in to review.
>
--
Luiz Augusto von Dentz
^ permalink raw reply [flat|nested] 21+ messages in thread
* Re: [PATCH BlueZ 01/15] mesh: crypto: remove dead function declaration
2025-07-08 14:59 ` [PATCH BlueZ 01/15] " Luiz Augusto von Dentz
@ 2025-07-08 15:07 ` Christian Eggers
0 siblings, 0 replies; 21+ messages in thread
From: Christian Eggers @ 2025-07-08 15:07 UTC (permalink / raw)
To: Luiz Augusto von Dentz; +Cc: linux-bluetooth
Hi Luiz,
On Tuesday, 8 July 2025, 16:59:20 CEST, Luiz Augusto von Dentz wrote:
> Hi Christian,
>
> On Tue, Jul 8, 2025 at 9:15 AM Christian Eggers <ceggers@arri.de> wrote:
> >
> > The implementation of mesh_aes_ecb_one() has been removed in commit
> > dfed4839463f ("mesh: Convert crypto to use ELL wrappers").
> > ---
> > mesh/crypto.h | 2 --
> > 1 file changed, 2 deletions(-)
> >
> > diff --git a/mesh/crypto.h b/mesh/crypto.h
> > index 55789886eb0e..3d85785f174c 100644
> > --- a/mesh/crypto.h
> > +++ b/mesh/crypto.h
> > @@ -22,8 +22,6 @@ bool mesh_crypto_aes_ccm_decrypt(const uint8_t nonce[13], const uint8_t key[16],
> > const void *enc_msg, uint16_t enc_msg_len,
> > void *out_msg,
> > void *out_mic, size_t mic_size);
> > -bool mesh_aes_ecb_one(const uint8_t key[16],
> > - const uint8_t plaintext[16], uint8_t encrypted[16]);
> > bool mesh_crypto_nkik(const uint8_t network_key[16], uint8_t identity_key[16]);
> > bool mesh_crypto_nkbk(const uint8_t network_key[16], uint8_t beacon_key[16]);
> > bool mesh_crypto_nkpk(const uint8_t network_key[16], uint8_t private_key[16]);
> > --
> > 2.43.0
>
> Is this set just a cleanup, no logical changes were made? In that case
> I can probably go ahead and push it myself, otherwise I may ask Brian
> to step in to review.
sorry for not adding a cover letter.
Most of the patches only cleanup obsolete function prototypes or unused structs.
Patch #5 fixes a NULL pointer dereference (I think it's trivial), whilst
patch #10 replaces some magic number by preprocessor definitions.
Patches #14 + #15 try to improve readability.
I considered CC'ing Brian, but I decided using this limited time for more
important stuff (I hope he can do the initial review of my MESH-GATT RFC
this week).
regards,
Christian
>
> >
>
>
>
^ permalink raw reply [flat|nested] 21+ messages in thread
* Re: [PATCH BlueZ 01/15] mesh: crypto: remove dead function declaration
2025-07-08 12:59 [PATCH BlueZ 01/15] mesh: crypto: remove dead function declaration Christian Eggers
` (15 preceding siblings ...)
2025-07-08 14:59 ` [PATCH BlueZ 01/15] " Luiz Augusto von Dentz
@ 2025-07-08 19:30 ` patchwork-bot+bluetooth
2025-07-08 19:45 ` Luiz Augusto von Dentz
2025-07-15 14:30 ` patchwork-bot+bluetooth
17 siblings, 1 reply; 21+ messages in thread
From: patchwork-bot+bluetooth @ 2025-07-08 19:30 UTC (permalink / raw)
To: Christian Eggers; +Cc: linux-bluetooth
Hello:
This series was applied to bluetooth/bluez.git (master)
by Luiz Augusto von Dentz <luiz.von.dentz@intel.com>:
On Tue, 8 Jul 2025 14:59:33 +0200 you wrote:
> The implementation of mesh_aes_ecb_one() has been removed in commit
> dfed4839463f ("mesh: Convert crypto to use ELL wrappers").
> ---
> mesh/crypto.h | 2 --
> 1 file changed, 2 deletions(-)
Here is the summary with links:
- [BlueZ,01/15] mesh: crypto: remove dead function declaration
https://git.kernel.org/pub/scm/bluetooth/bluez.git/?id=441f0539a1f8
- [BlueZ,02/15] mesh: crypto: remove unused function parameter
https://git.kernel.org/pub/scm/bluetooth/bluez.git/?id=e1b2647179c5
- [BlueZ,03/15] mesh: friend: remove dead function declarations
https://git.kernel.org/pub/scm/bluetooth/bluez.git/?id=2d012a2f629c
- [BlueZ,04/15] mesh: mesh-config: remove dead function prototype
https://git.kernel.org/pub/scm/bluetooth/bluez.git/?id=797b330b9ff5
- [BlueZ,05/15] mesh: mesh-io-mgmt: Fix NULL pointer dereference
https://git.kernel.org/pub/scm/bluetooth/bluez.git/?id=806aa9de2b42
- [BlueZ,06/15] mesh: model: remove dead function prototype
https://git.kernel.org/pub/scm/bluetooth/bluez.git/?id=d40ed08f446e
- [BlueZ,07/15] mesh: net: remove unused stuff
(no matching commit)
- [BlueZ,08/15] mesh: net: update comment
(no matching commit)
- [BlueZ,09/15] mesh: net: remove obsolete struct net_key
https://git.kernel.org/pub/scm/bluetooth/bluez.git/?id=2d9afa114507
- [BlueZ,10/15] mesh: net-keys: introduce BEACON_LEN_SNB, BEACON_LEN_MPB, BEACON_LEN_MAX
https://git.kernel.org/pub/scm/bluetooth/bluez.git/?id=0cb00fce1b3e
- [BlueZ,11/15] mesh: net-keys: remove dead function prototype
https://git.kernel.org/pub/scm/bluetooth/bluez.git/?id=41b4b531beb8
- [BlueZ,12/15] mesh: node: remove dead function prototype
https://git.kernel.org/pub/scm/bluetooth/bluez.git/?id=6ef0f297235d
- [BlueZ,13/15] mesh: prov: cleanup header
https://git.kernel.org/pub/scm/bluetooth/bluez.git/?id=e29506315cc8
- [BlueZ,14/15] mesh: remove unneeded casts to bool
https://git.kernel.org/pub/scm/bluetooth/bluez.git/?id=4e5a3a80a842
- [BlueZ,15/15] mesh: use '0x1' rathen than 'true' for bit operations
https://git.kernel.org/pub/scm/bluetooth/bluez.git/?id=a3824b4aac0e
You are awesome, thank you!
--
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html
^ permalink raw reply [flat|nested] 21+ messages in thread
* Re: [PATCH BlueZ 01/15] mesh: crypto: remove dead function declaration
2025-07-08 19:30 ` patchwork-bot+bluetooth
@ 2025-07-08 19:45 ` Luiz Augusto von Dentz
0 siblings, 0 replies; 21+ messages in thread
From: Luiz Augusto von Dentz @ 2025-07-08 19:45 UTC (permalink / raw)
To: patchwork-bot+bluetooth; +Cc: Christian Eggers, linux-bluetooth
Hi Christian,
On Tue, Jul 8, 2025 at 3:43 PM <patchwork-bot+bluetooth@kernel.org> wrote:
>
> Hello:
>
> This series was applied to bluetooth/bluez.git (master)
> by Luiz Augusto von Dentz <luiz.von.dentz@intel.com>:
>
> On Tue, 8 Jul 2025 14:59:33 +0200 you wrote:
> > The implementation of mesh_aes_ecb_one() has been removed in commit
> > dfed4839463f ("mesh: Convert crypto to use ELL wrappers").
> > ---
> > mesh/crypto.h | 2 --
> > 1 file changed, 2 deletions(-)
>
> Here is the summary with links:
> - [BlueZ,01/15] mesh: crypto: remove dead function declaration
> https://git.kernel.org/pub/scm/bluetooth/bluez.git/?id=441f0539a1f8
> - [BlueZ,02/15] mesh: crypto: remove unused function parameter
> https://git.kernel.org/pub/scm/bluetooth/bluez.git/?id=e1b2647179c5
> - [BlueZ,03/15] mesh: friend: remove dead function declarations
> https://git.kernel.org/pub/scm/bluetooth/bluez.git/?id=2d012a2f629c
> - [BlueZ,04/15] mesh: mesh-config: remove dead function prototype
> https://git.kernel.org/pub/scm/bluetooth/bluez.git/?id=797b330b9ff5
> - [BlueZ,05/15] mesh: mesh-io-mgmt: Fix NULL pointer dereference
> https://git.kernel.org/pub/scm/bluetooth/bluez.git/?id=806aa9de2b42
> - [BlueZ,06/15] mesh: model: remove dead function prototype
> https://git.kernel.org/pub/scm/bluetooth/bluez.git/?id=d40ed08f446e
> - [BlueZ,07/15] mesh: net: remove unused stuff
> (no matching commit)
> - [BlueZ,08/15] mesh: net: update comment
> (no matching commit)
Had to skip the 2 above since they didn't build for me.
> - [BlueZ,09/15] mesh: net: remove obsolete struct net_key
> https://git.kernel.org/pub/scm/bluetooth/bluez.git/?id=2d9afa114507
> - [BlueZ,10/15] mesh: net-keys: introduce BEACON_LEN_SNB, BEACON_LEN_MPB, BEACON_LEN_MAX
> https://git.kernel.org/pub/scm/bluetooth/bluez.git/?id=0cb00fce1b3e
> - [BlueZ,11/15] mesh: net-keys: remove dead function prototype
> https://git.kernel.org/pub/scm/bluetooth/bluez.git/?id=41b4b531beb8
> - [BlueZ,12/15] mesh: node: remove dead function prototype
> https://git.kernel.org/pub/scm/bluetooth/bluez.git/?id=6ef0f297235d
> - [BlueZ,13/15] mesh: prov: cleanup header
> https://git.kernel.org/pub/scm/bluetooth/bluez.git/?id=e29506315cc8
> - [BlueZ,14/15] mesh: remove unneeded casts to bool
> https://git.kernel.org/pub/scm/bluetooth/bluez.git/?id=4e5a3a80a842
> - [BlueZ,15/15] mesh: use '0x1' rathen than 'true' for bit operations
> https://git.kernel.org/pub/scm/bluetooth/bluez.git/?id=a3824b4aac0e
>
> You are awesome, thank you!
> --
> Deet-doot-dot, I am a bot.
> https://korg.docs.kernel.org/patchwork/pwbot.html
>
>
>
--
Luiz Augusto von Dentz
^ permalink raw reply [flat|nested] 21+ messages in thread
* Re: [PATCH BlueZ 01/15] mesh: crypto: remove dead function declaration
2025-07-08 12:59 [PATCH BlueZ 01/15] mesh: crypto: remove dead function declaration Christian Eggers
` (16 preceding siblings ...)
2025-07-08 19:30 ` patchwork-bot+bluetooth
@ 2025-07-15 14:30 ` patchwork-bot+bluetooth
17 siblings, 0 replies; 21+ messages in thread
From: patchwork-bot+bluetooth @ 2025-07-15 14:30 UTC (permalink / raw)
To: Christian Eggers; +Cc: linux-bluetooth
Hello:
This series was applied to bluetooth/bluez.git (master)
by Luiz Augusto von Dentz <luiz.von.dentz@intel.com>:
On Tue, 8 Jul 2025 14:59:33 +0200 you wrote:
> The implementation of mesh_aes_ecb_one() has been removed in commit
> dfed4839463f ("mesh: Convert crypto to use ELL wrappers").
> ---
> mesh/crypto.h | 2 --
> 1 file changed, 2 deletions(-)
Here is the summary with links:
- [BlueZ,01/15] mesh: crypto: remove dead function declaration
(no matching commit)
- [BlueZ,02/15] mesh: crypto: remove unused function parameter
(no matching commit)
- [BlueZ,03/15] mesh: friend: remove dead function declarations
(no matching commit)
- [BlueZ,04/15] mesh: mesh-config: remove dead function prototype
(no matching commit)
- [BlueZ,05/15] mesh: mesh-io-mgmt: Fix NULL pointer dereference
(no matching commit)
- [BlueZ,06/15] mesh: model: remove dead function prototype
(no matching commit)
- [BlueZ,07/15] mesh: net: remove unused stuff
https://git.kernel.org/pub/scm/bluetooth/bluez.git/?id=0e586df2d0ae
- [BlueZ,08/15] mesh: net: update comment
https://git.kernel.org/pub/scm/bluetooth/bluez.git/?id=cb4b20c71fd3
- [BlueZ,09/15] mesh: net: remove obsolete struct net_key
(no matching commit)
- [BlueZ,10/15] mesh: net-keys: introduce BEACON_LEN_SNB, BEACON_LEN_MPB, BEACON_LEN_MAX
(no matching commit)
- [BlueZ,11/15] mesh: net-keys: remove dead function prototype
(no matching commit)
- [BlueZ,12/15] mesh: node: remove dead function prototype
(no matching commit)
- [BlueZ,13/15] mesh: prov: cleanup header
(no matching commit)
- [BlueZ,14/15] mesh: remove unneeded casts to bool
(no matching commit)
- [BlueZ,15/15] mesh: use '0x1' rathen than 'true' for bit operations
(no matching commit)
You are awesome, thank you!
--
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html
^ permalink raw reply [flat|nested] 21+ messages in thread
end of thread, other threads:[~2025-07-15 14:29 UTC | newest]
Thread overview: 21+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-07-08 12:59 [PATCH BlueZ 01/15] mesh: crypto: remove dead function declaration Christian Eggers
2025-07-08 12:59 ` [PATCH BlueZ 02/15] mesh: crypto: remove unused function parameter Christian Eggers
2025-07-08 12:59 ` [PATCH BlueZ 03/15] mesh: friend: remove dead function declarations Christian Eggers
2025-07-08 12:59 ` [PATCH BlueZ 04/15] mesh: mesh-config: remove dead function prototype Christian Eggers
2025-07-08 12:59 ` [PATCH BlueZ 05/15] mesh: mesh-io-mgmt: Fix NULL pointer dereference Christian Eggers
2025-07-08 12:59 ` [PATCH BlueZ 06/15] mesh: model: remove dead function prototype Christian Eggers
2025-07-08 12:59 ` [PATCH BlueZ 07/15] mesh: net: remove unused stuff Christian Eggers
2025-07-08 12:59 ` [PATCH BlueZ 08/15] mesh: net: update comment Christian Eggers
2025-07-08 12:59 ` [PATCH BlueZ 09/15] mesh: net: remove obsolete struct net_key Christian Eggers
2025-07-08 12:59 ` [PATCH BlueZ 10/15] mesh: net-keys: introduce BEACON_LEN_SNB, BEACON_LEN_MPB, BEACON_LEN_MAX Christian Eggers
2025-07-08 12:59 ` [PATCH BlueZ 11/15] mesh: net-keys: remove dead function prototype Christian Eggers
2025-07-08 12:59 ` [PATCH BlueZ 12/15] mesh: node: " Christian Eggers
2025-07-08 12:59 ` [PATCH BlueZ 13/15] mesh: prov: cleanup header Christian Eggers
2025-07-08 12:59 ` [PATCH BlueZ 14/15] mesh: remove unneeded casts to bool Christian Eggers
2025-07-08 12:59 ` [PATCH BlueZ 15/15] mesh: use '0x1' rathen than 'true' for bit operations Christian Eggers
2025-07-08 14:21 ` [BlueZ,01/15] mesh: crypto: remove dead function declaration bluez.test.bot
2025-07-08 14:59 ` [PATCH BlueZ 01/15] " Luiz Augusto von Dentz
2025-07-08 15:07 ` Christian Eggers
2025-07-08 19:30 ` patchwork-bot+bluetooth
2025-07-08 19:45 ` Luiz Augusto von Dentz
2025-07-15 14:30 ` patchwork-bot+bluetooth
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox