xcb: list & padding

Peter Harris pharris2 at rocketsoftware.com
Thu Aug 15 14:28:23 UTC 2024


>> https://gitlab.freedesktop.org/xorg/lib/libxcb/-/merge_requests/14 changes it so that lists always require explicit padding (and therefore allows unpadded lists). This MR is stalled. With a little review, I think it can be merged.
>
> oh, it's laying around there for 3 years now, nobody seems to care :(
> (needs rebase, btw)

Rebased.

> Do you think this would help for GetKbdByName() ?
> This one is a bit tricky: it has a bunch of variable-length fields
> (CARD8 size plus payload), and is _not_ padded.

Probably, since it deletes all the automatic pad insertion (except the
mandatory alignment pad at the very end). Feel free to try it out.

Note that new requests have been added to xcbproto since I wrote this patch,
and I haven't audited them to see if any expect automatic padding.

>> As long as you're looking at xkb, see also https://gitlab.freedesktop.org/xorg/proto/xcbproto/-/merge_requests/39
>
> Maybe split it into several pieces ?

Feel free to pick it up and run with it. Personally, I don't have the energy to
split it up, and I definitely don't have the energy (or the knowledge, if I'm
honest) to do the ABI bump or the necessary libxcb code generator fixes. That
MR is provided as-is, where-is, you get to keep all the broken bits. :-)

> Then we could check on per-case basis which ones are practically
> breaking (not just theoretically, because nobody uses those funcs)

Debian Codesearch is amazing, but it only searches what's in Debian.
Unfortunately, there's no way to really know what people are using in-house (or
wherever).

> Another idea is adding *new* calls (with same opcode) - I don't think
> that having the same opcode use multiple times should be really a major
> problem.

If you mean in libxcb, that is a good idea. Feel free to pick it up and run
with it.

If you mean in xcbproto, that's a bad idea. Wireshark (and etc) need exactly
one definition for each opcode.

Peter Harris
================================
Rocket Software, Inc. and subsidiaries ■ 77 Fourth Avenue, Waltham MA 02451 ■ Main Office Toll Free Number: +1 855.577.4323
Contact Customer Support: https://my.rocketsoftware.com/RocketCommunity/RCEmailSupport
Unsubscribe from Marketing Messages/Manage Your Subscription Preferences - http://www.rocketsoftware.com/manage-your-email-preferences
Privacy Policy - http://www.rocketsoftware.com/company/legal/privacy-policy
================================

This communication and any attachments may contain confidential information of Rocket Software, Inc. All unauthorized use, disclosure or distribution is prohibited. If you are not the intended recipient, please notify Rocket Software immediately and destroy all copies of this communication. Thank you.


More information about the xorg-devel mailing list