From: sashiko-bot@kernel.org
To: "Mike Lothian" <mike@fireburn.co.uk>
Cc: dri-devel@lists.freedesktop.org, ojeda@kernel.org
Subject: Re: [RFC PATCH v2 02/10] drm/vino: add the clean-room HDCP 2.2 AKE/LC/SKE handshake
Date: Fri, 03 Jul 2026 03:14:32 +0000 [thread overview]
Message-ID: <20260703031432.722981F000E9@smtp.kernel.org> (raw)
In-Reply-To: <20260703030217.2886-3-mike@fireburn.co.uk>
Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
- [High] The HDCP OUT message builder `body()` omits a mandatory 2-byte padding at the start of the message body, misaligning the header fields and payload by 2 bytes.
--
commit ff0736a0543094c7762c8587ebbe6bbde5a3fe43
Author: Mike Lothian <mike@fireburn.co.uk>
drm/vino: add the clean-room HDCP 2.2 AKE/LC/SKE handshake
This commit introduces a clean-room implementation of the HDCP 2.2 handshake
(AKE/LC/SKE) for the vino driver. It includes cryptographic adapters, protocol
message builders, key derivation routines, and captured plaintext
control-plane skeletons. The implementation builds and parses wire frames
strictly verified against the reference daemon traffic.
> diff --git a/drivers/gpu/drm/vino/ake.rs b/drivers/gpu/drm/vino/ake.rs
> new file mode 100644
> index 0000000000000..38919624cb2f3
> --- /dev/null
> +++ b/drivers/gpu/drm/vino/ake.rs
[ ... ]
> +/// Allocate a body_len-byte zeroed body with the sec 5.1 header filled in
> +/// (sub_size, the 0x0010 marker, hdcp_seq, the 0x30 marker and msg_id).
> +/// The caller writes the payload into body[28..].
> +fn body(body_len: usize, sub_size: u16, hdcp_seq: u32, msg_id: u8) -> Result<KVec<u8>> {
> + let mut b = KVec::from_elem(0u8, body_len, GFP_KERNEL)?;
> + b[0..2].copy_from_slice(&sub_size.to_le_bytes());
> + b[2..4].copy_from_slice(&0x0010u16.to_le_bytes());
> + b[4..8].copy_from_slice(&hdcp_seq.to_le_bytes());
> + b[22..26].copy_from_slice(&0x0000_0030u32.to_le_bytes());
> + b[27] = msg_id;
[Severity: High]
Does this message builder omit a mandatory 2-byte padding at the start of the
payload?
Comparing this against the golden capture (CAP_PLAIN_1080P) in golden.rs, the
48-byte body starts with a 2-byte zero padding at offsets 16-17 (right after
the 16-byte transport header), placing the sub_size at offsets 18-19 (body
offset 2).
By writing sub_size at b[0..2], hdcp_seq at b[4..8], the marker at b[22..26],
and msg_id at b[27], the entire layout appears to be shifted left by 2 bytes
compared to the expected hardware offsets.
Will this misalignment cause the dock to reject the HDCP handshake because
the fields and cryptographic payload are not where the hardware expects them?
> + Ok(b)
> +}
--
Sashiko AI review · https://sashiko.dev/#/patchset/20260703030217.2886-1-mike@fireburn.co.uk?part=2
next prev parent reply other threads:[~2026-07-03 3:14 UTC|newest]
Thread overview: 41+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-06-17 15:12 [RFC PATCH 0/7] drm/vino: DisplayLink DL3 dock driver (RFC, help wanted) Mike Lothian
2026-06-17 15:12 ` [RFC PATCH 1/7] drm/vino: add DisplayLink DL3 dock skeleton and plaintext bring-up Mike Lothian
2026-06-17 15:17 ` Miguel Ojeda
2026-06-17 20:11 ` sashiko-bot
2026-06-18 10:39 ` Julian Braha
2026-06-17 15:12 ` [RFC PATCH 2/7] drm/vino: add the clean-room HDCP 2.2 AKE/LC/SKE Mike Lothian
2026-06-17 16:18 ` Eric Biggers
2026-06-17 20:12 ` sashiko-bot
2026-06-17 15:12 ` [RFC PATCH 3/7] drm/vino: add the AES-CTR/AES-CMAC control-plane seal and arm Mike Lothian
2026-06-17 20:15 ` sashiko-bot
2026-06-17 15:12 ` [RFC PATCH 4/7] drm/vino: add the Vino (RawRl mode-2) framebuffer codec Mike Lothian
2026-06-17 20:13 ` sashiko-bot
2026-06-17 15:12 ` [RFC PATCH 5/7] drm/vino: register a DRM/KMS device and scan out to EP08 Mike Lothian
2026-06-17 20:22 ` sashiko-bot
2026-06-17 15:12 ` [RFC PATCH 6/7] drm/vino: add DDC/CI brightness/contrast, DPMS power and DFU info Mike Lothian
2026-06-17 20:19 ` sashiko-bot
2026-06-17 15:12 ` [RFC PATCH 7/7] drm/vino: add KUnit self-tests for the protocol and crypto paths Mike Lothian
2026-06-17 20:18 ` sashiko-bot
2026-06-17 15:55 ` [RFC PATCH 0/7] drm/vino: DisplayLink DL3 dock driver (RFC, help wanted) Danilo Krummrich
2026-06-17 16:11 ` Mike Lothian
2026-07-03 3:02 ` [RFC PATCH v2 00/10] drm/vino: DisplayLink DL3 dock driver Mike Lothian
2026-07-03 3:02 ` [RFC PATCH v2 01/10] drm/vino: add DisplayLink DL3 dock skeleton and protocol framing Mike Lothian
2026-07-03 3:15 ` sashiko-bot
2026-07-03 3:02 ` [RFC PATCH v2 02/10] drm/vino: add the clean-room HDCP 2.2 AKE/LC/SKE handshake Mike Lothian
2026-07-03 3:14 ` sashiko-bot [this message]
2026-07-03 3:02 ` [RFC PATCH v2 03/10] drm/vino: add the AES-CTR/AES-CMAC control-plane seal and arm sequence Mike Lothian
2026-07-03 3:13 ` sashiko-bot
2026-07-03 3:02 ` [RFC PATCH v2 04/10] drm/vino: add the Vino framebuffer codec Mike Lothian
2026-07-03 3:21 ` sashiko-bot
2026-07-03 3:02 ` [RFC PATCH v2 05/10] drm/vino: add the DRM/KMS sink, built on the safe KMS mode-object layer Mike Lothian
2026-07-03 3:13 ` sashiko-bot
2026-07-03 3:02 ` [RFC PATCH v2 06/10] drm/vino: add the DisplayLink DL3 dock driver Mike Lothian
2026-07-03 3:18 ` sashiko-bot
2026-07-03 3:02 ` [RFC PATCH v2 07/10] drm/vino: wire the hardware cursor plane Mike Lothian
2026-07-03 3:11 ` sashiko-bot
2026-07-03 3:02 ` [RFC PATCH v2 08/10] drm/vino: wire CRTC gamma, plane rotation and DDC/CI monitor controls Mike Lothian
2026-07-03 3:20 ` sashiko-bot
2026-07-03 3:02 ` [RFC PATCH v2 09/10] drm/vino: two heads, 90/270 rotation, damage clips and connector probe Mike Lothian
2026-07-03 3:20 ` sashiko-bot
2026-07-03 3:02 ` [RFC PATCH v2 10/10] drm/vino: hrtimer-driven software vblank Mike Lothian
2026-07-03 3:21 ` sashiko-bot
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=20260703031432.722981F000E9@smtp.kernel.org \
--to=sashiko-bot@kernel.org \
--cc=dri-devel@lists.freedesktop.org \
--cc=mike@fireburn.co.uk \
--cc=ojeda@kernel.org \
--cc=sashiko-reviews@lists.linux.dev \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.