From: Luiz Augusto von Dentz <luiz.dentz@gmail.com>
To: linux-bluetooth@vger.kernel.org
Subject: [PATCH BlueZ v2 0/5] shared: Use util_iov helpers in gatt-db, hog, asha and micp
Date: Wed, 11 Nov 2026 15:39:44 -0500 [thread overview]
Message-ID: <20261111203949.3874673-1-luiz.dentz@gmail.com> (raw)
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
next reply other threads:[~2026-11-11 20:39 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-11 20:39 Luiz Augusto von Dentz [this message]
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
2026-11-12 17:50 ` [PATCH BlueZ v2 0/5] shared: Use util_iov helpers in gatt-db, hog, asha and micp patchwork-bot+bluetooth
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20261111203949.3874673-1-luiz.dentz@gmail.com \
--to=luiz.dentz@gmail.com \
--cc=linux-bluetooth@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox