* [PATCH BlueZ 0/1] gatt: remove superfluous extended properties
@ 2021-09-26 17:00 Dagan Martinez
2021-09-26 17:00 ` [PATCH BlueZ 1/1] " Dagan Martinez
0 siblings, 1 reply; 4+ messages in thread
From: Dagan Martinez @ 2021-09-26 17:00 UTC (permalink / raw)
To: linux-bluetooth; +Cc: Dagan Martinez
As discussed on Slack, the BlueZ source contains superfluous
non-standard extended properties with no effect other than the creation
of unnecessary CEPDs with bits set in the "reserved" field. These
extended properties are set when a characteristic has a `secure-*`,
`encrypt-*`, or `encrypt-authenticated-*` flag set.
According to section 3.3.3.1 of the Bluetooth core spec 5.3, the only
valid extended properties are "reliable write", and "writable
auxiliaries."
This patch removes all other extended properties.
Dagan Martinez (1):
gatt: remove superfluous extended properties
src/gatt-database.c | 6 ------
src/shared/att-types.h | 8 --------
2 files changed, 14 deletions(-)
--
2.31.1
^ permalink raw reply [flat|nested] 4+ messages in thread
* [PATCH BlueZ 1/1] gatt: remove superfluous extended properties
2021-09-26 17:00 [PATCH BlueZ 0/1] gatt: remove superfluous extended properties Dagan Martinez
@ 2021-09-26 17:00 ` Dagan Martinez
2021-09-26 17:38 ` bluez.test.bot
0 siblings, 1 reply; 4+ messages in thread
From: Dagan Martinez @ 2021-09-26 17:00 UTC (permalink / raw)
To: linux-bluetooth; +Cc: Dagan Martinez
BlueZ contained superfluous properties that not only did nothing of
value, but needlessly created CEP descriptors for any characteristic
with a secure/encrypted/authenticated flag applied to it.
This actually deviated from the spec(Bluetooth core 5.3, 3.3.3.1) by
setting the reserved bits in the CEPD.
---
src/gatt-database.c | 6 ------
src/shared/att-types.h | 8 --------
2 files changed, 14 deletions(-)
diff --git a/src/gatt-database.c b/src/gatt-database.c
index 99c95f2d6..1f7ce5f02 100644
--- a/src/gatt-database.c
+++ b/src/gatt-database.c
@@ -1656,27 +1656,21 @@ static bool parse_chrc_flags(DBusMessageIter *array, uint8_t *props,
*ext_props |= BT_GATT_CHRC_EXT_PROP_WRITABLE_AUX;
} else if (!strcmp("encrypt-read", flag)) {
*props |= BT_GATT_CHRC_PROP_READ;
- *ext_props |= BT_GATT_CHRC_EXT_PROP_ENC_READ;
*perm |= BT_ATT_PERM_READ | BT_ATT_PERM_READ_ENCRYPT;
} else if (!strcmp("encrypt-write", flag)) {
*props |= BT_GATT_CHRC_PROP_WRITE;
- *ext_props |= BT_GATT_CHRC_EXT_PROP_ENC_WRITE;
*perm |= BT_ATT_PERM_WRITE | BT_ATT_PERM_WRITE_ENCRYPT;
} else if (!strcmp("encrypt-authenticated-read", flag)) {
*props |= BT_GATT_CHRC_PROP_READ;
- *ext_props |= BT_GATT_CHRC_EXT_PROP_AUTH_READ;
*perm |= BT_ATT_PERM_READ | BT_ATT_PERM_READ_AUTHEN;
} else if (!strcmp("encrypt-authenticated-write", flag)) {
*props |= BT_GATT_CHRC_PROP_WRITE;
- *ext_props |= BT_GATT_CHRC_EXT_PROP_AUTH_WRITE;
*perm |= BT_ATT_PERM_WRITE | BT_ATT_PERM_WRITE_AUTHEN;
} else if (!strcmp("secure-read", flag)) {
*props |= BT_GATT_CHRC_PROP_READ;
- *ext_props |= BT_GATT_CHRC_EXT_PROP_AUTH_READ;
*perm |= BT_ATT_PERM_READ | BT_ATT_PERM_READ_SECURE;
} else if (!strcmp("secure-write", flag)) {
*props |= BT_GATT_CHRC_PROP_WRITE;
- *ext_props |= BT_GATT_CHRC_EXT_PROP_AUTH_WRITE;
*perm |= BT_ATT_PERM_WRITE | BT_ATT_PERM_WRITE_SECURE;
} else if (!strcmp("authorize", flag)) {
*req_prep_authorization = true;
diff --git a/src/shared/att-types.h b/src/shared/att-types.h
index 3adc05d9e..a08b24155 100644
--- a/src/shared/att-types.h
+++ b/src/shared/att-types.h
@@ -151,14 +151,6 @@ struct bt_att_pdu_error_rsp {
/* GATT Characteristic Extended Properties Bitfield values */
#define BT_GATT_CHRC_EXT_PROP_RELIABLE_WRITE 0x01
#define BT_GATT_CHRC_EXT_PROP_WRITABLE_AUX 0x02
-#define BT_GATT_CHRC_EXT_PROP_ENC_READ 0x04
-#define BT_GATT_CHRC_EXT_PROP_ENC_WRITE 0x08
-#define BT_GATT_CHRC_EXT_PROP_ENC (BT_GATT_CHRC_EXT_PROP_ENC_READ | \
- BT_GATT_CHRC_EXT_PROP_ENC_WRITE)
-#define BT_GATT_CHRC_EXT_PROP_AUTH_READ 0x10
-#define BT_GATT_CHRC_EXT_PROP_AUTH_WRITE 0x20
-#define BT_GATT_CHRC_EXT_PROP_AUTH (BT_GATT_CHRC_EXT_PROP_AUTH_READ | \
- BT_GATT_CHRC_EXT_PROP_AUTH_WRITE)
/* GATT Characteristic Client Features Bitfield values */
#define BT_GATT_CHRC_CLI_FEAT_ROBUST_CACHING 0x01
--
2.31.1
^ permalink raw reply related [flat|nested] 4+ messages in thread
* RE: gatt: remove superfluous extended properties
2021-09-26 17:00 ` [PATCH BlueZ 1/1] " Dagan Martinez
@ 2021-09-26 17:38 ` bluez.test.bot
2021-09-27 17:45 ` Luiz Augusto von Dentz
0 siblings, 1 reply; 4+ messages in thread
From: bluez.test.bot @ 2021-09-26 17:38 UTC (permalink / raw)
To: linux-bluetooth, martinez.dagan
[-- Attachment #1: Type: text/plain, Size: 884 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=553055
---Test result---
Test Summary:
CheckPatch PASS 0.45 seconds
GitLint PASS 0.29 seconds
Prep - Setup ELL PASS 50.88 seconds
Build - Prep PASS 0.24 seconds
Build - Configure PASS 9.15 seconds
Build - Make PASS 219.00 seconds
Make Check PASS 9.85 seconds
Make Distcheck PASS 256.92 seconds
Build w/ext ELL - Configure PASS 8.96 seconds
Build w/ext ELL - Make PASS 207.23 seconds
---
Regards,
Linux Bluetooth
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: gatt: remove superfluous extended properties
2021-09-26 17:38 ` bluez.test.bot
@ 2021-09-27 17:45 ` Luiz Augusto von Dentz
0 siblings, 0 replies; 4+ messages in thread
From: Luiz Augusto von Dentz @ 2021-09-27 17:45 UTC (permalink / raw)
To: linux-bluetooth; +Cc: martinez.dagan
Hi Dagan,
On Sun, Sep 26, 2021 at 11:00 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=553055
>
> ---Test result---
>
> Test Summary:
> CheckPatch PASS 0.45 seconds
> GitLint PASS 0.29 seconds
> Prep - Setup ELL PASS 50.88 seconds
> Build - Prep PASS 0.24 seconds
> Build - Configure PASS 9.15 seconds
> Build - Make PASS 219.00 seconds
> Make Check PASS 9.85 seconds
> Make Distcheck PASS 256.92 seconds
> Build w/ext ELL - Configure PASS 8.96 seconds
> Build w/ext ELL - Make PASS 207.23 seconds
>
>
>
> ---
> Regards,
> Linux Bluetooth
Applied, thanks.
--
Luiz Augusto von Dentz
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2021-09-27 17:50 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-09-26 17:00 [PATCH BlueZ 0/1] gatt: remove superfluous extended properties Dagan Martinez
2021-09-26 17:00 ` [PATCH BlueZ 1/1] " Dagan Martinez
2021-09-26 17:38 ` bluez.test.bot
2021-09-27 17:45 ` Luiz Augusto von Dentz
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).