Skip to content

Exploit btd_service's userdata pointer

Mikel Astiz linux-bluetooth 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v0 Latest6 patches 1 replyIn review

Patches in v0 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/6network: Remove duplicated searchprofiles/network/connection.c+0 -40 replies
2/6network: Fix missing NULL check for given UUIDprofiles/network/connection.c+4 -10 replies
3/6network: Remove find_connection()profiles/network/connection.c+10 -210 replies
4/6deviceinfo: Use btd_service userdata pointerprofiles/deviceinfo/deviceinfo.c+6 -400 replies
5/6scanparam: Use btd_service userdata pointerprofiles/scanparam/scan.c+6 -300 replies
6/6input: Use btd_service userdata pointerprofiles/input/device.c+10 -270 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v0 yet.

Read the v0 thread

Cover letter [PATCH BlueZ v0 0/6] Exploit btd_service's userdata pointer

From: Mikel Astiz <[email protected]>

With the adoption of btd_service, profile implementations can benefit from the provided userdata pointer which can replace the previously necessary lists to associate services with custom private types.

The proposed change not only removes boilerplate code but also data redundancy, presumably making the codebase more robust.

This patchset addresses the first examples which looked like more obvious to refactor. Note that some of the profiles were not tested due to lack of hardware.

Patch 2/6 fixes an issue that I came across during this work.

Mikel Astiz (6):
network: Remove duplicated search
network: Fix missing NULL check for given UUID
network: Remove find_connection()
deviceinfo: Use btd_service userdata pointer
scanparam: Use btd_service userdata pointer
input: Use btd_service userdata pointer

 profiles/deviceinfo/deviceinfo.c | 46 ++++++----------------------------------
 profiles/input/device.c          | 37 +++++++++-----------------------
 profiles/network/connection.c    | 38 ++++++++++++---------------------
 profiles/scanparam/scan.c        | 36 ++++++-------------------------
 4 files changed, 35 insertions(+), 122 deletions(-)
Signature · 1 line
1.8.1.4