Linux bluetooth development
 help / color / mirror / Atom feed
* [PATCH BlueZ v2 0/5] shared: Use util_iov helpers in gatt-db, hog, asha and micp
@ 2026-11-11 20:39 Luiz Augusto von Dentz
  2026-11-11 20:39 ` [PATCH BlueZ v2 1/5] shared/gatt-db: Use util_iov helpers to build and parse values Luiz Augusto von Dentz
                   ` (4 more replies)
  0 siblings, 5 replies; 7+ messages in thread
From: Luiz Augusto von Dentz @ 2026-11-11 20:39 UTC (permalink / raw)
  To: linux-bluetooth

From: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>

This continues the conversion of the GATT code in src/shared to the
util_iov_pull_* and util_iov_push_* helpers, so that the bounds check is
part of the access, now for gatt-db and the HoG, ASHA and MICP profiles.

The conversions are meant to be behavior preserving and are covered by
the existing unit tests (test-gatt, test-hog, test-micp). The existing
code already checked the lengths in the HoG and ASHA readers, so no new
tests were added for them.

The one bug found is in micp: a Mute State notification with no value
made micp_mute_state_notify read a byte past the value. It is fixed, but
there is no test for it since the scripted test-micp client flow does
not deliver a notification to that handler, so it could not be
reproduced.

bap, rap and the remaining profiles will follow in separate series.

v2:
 - gatt-db: don't update the database hash from incomplete input when
   allocating a hash entry fails, keep the current hash and retry the
   update later (review feedback on v1).

Luiz Augusto von Dentz (5):
  shared/gatt-db: Use util_iov helpers to build and parse values
  shared/hog: Use util_iov helpers to parse characteristic values
  shared/asha: Use util_iov helpers to parse characteristic values
  shared/micp: Fix reading Mute State from an empty notification
  shared/micp: Use util_iov_pull_mem instead of a local helper

 src/shared/asha.c    |  52 +++++++----
 src/shared/gatt-db.c | 215 ++++++++++++++++++++++++++-----------------
 src/shared/hog.c     |  62 +++++++------
 src/shared/micp.c    |  28 +++---
 4 files changed, 211 insertions(+), 146 deletions(-)

-- 
2.56.0


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

end of thread, other threads:[~2026-11-12  2:09 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-11-11 20:39 [PATCH BlueZ v2 0/5] shared: Use util_iov helpers in gatt-db, hog, asha and micp Luiz Augusto von Dentz
2026-11-11 20:39 ` [PATCH BlueZ v2 1/5] shared/gatt-db: Use util_iov helpers to build and parse values Luiz Augusto von Dentz
2026-11-12  2:09   ` shared: Use util_iov helpers in gatt-db, hog, asha and micp bluez.test.bot
2026-11-11 20:39 ` [PATCH BlueZ v2 2/5] shared/hog: Use util_iov helpers to parse characteristic values Luiz Augusto von Dentz
2026-11-11 20:39 ` [PATCH BlueZ v2 3/5] shared/asha: " Luiz Augusto von Dentz
2026-11-11 20:39 ` [PATCH BlueZ v2 4/5] shared/micp: Fix reading Mute State from an empty notification Luiz Augusto von Dentz
2026-11-11 20:39 ` [PATCH BlueZ v2 5/5] shared/micp: Use util_iov_pull_mem instead of a local helper 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