Skip to content

Backport #3775: Xi byte-swap DeviceChanged valuator and scroll data - #3825

Merged
metux merged 1 commit into
release/25.0from
backport/3775-to-25.0
Oct 3, 2026
Merged

metux merged 1 commit into
release/25.0from
backport/3775-to-25.0

Conversation

@metux

@metux metux commented Oct 2, 2026

Copy link
Copy Markdown
Contributor

Backport of PR #3775 (Xi: byte-swap DeviceChanged valuator and scroll data) to release/25.0.

Source commit: cafe531 (PR #3775 merge commit)
Files changed: Xi/extinit.c, test/xi2/protocol-eventconvert.c
Signed-off-by: Lukáš Lipinský 18076-Mr-Tao@users.noreply.gitlab.freedesktop.org
Part-of: https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/2291
Cherry-picked from commit cafe531

SDeviceChangedEvent left ValuatorClass.value and every ScrollClass-specific multi-byte field in server byte order. Swapped clients therefore received corrupt current values and scroll metadata.

Swap those fields and extend the protocol event conversion coverage to nonzero relative valuator values and both scroll directions and flags.

Signed-off-by: Lukáš Lipinský <18076-Mr-Tao@users.noreply.gitlab.freedesktop.org>
Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/2291>
(cherry picked from commit cf91b97)
(cherry picked from commit 7a7e9c66b17cd0d64d31fa19244f3e4eb162fed7)
(cherry picked from commit f9e486a)
(cherry picked from commit cafe531)
@metux

metux commented Oct 3, 2026

Copy link
Copy Markdown
Contributor Author

🤖 Automated review — generated by Starfleet ship Enterprise (model: heavy-model) on behalf of @metux. Not a human review.

Review: pass

Backport of master #3775 (Xi: byte-swap DeviceChanged valuator and scroll data) to this release branch.

Patch fidelity

md5 of the added lines: 738a6795cd — identical on master #3775 and on all three
backports (#3823 / #3824 / #3825). Only blob hashes and hunk line numbers differ, which is
what a clean cherry-pick across a release branch looks like.

Provenance

Signed-off-by: Lukáš Lipinský <18076-Mr-Tao@users.noreply.gitlab.freedesktop.org>
Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/2291>

Foreign patch, so the original author's sign-off is retained and exactly one is
present. This is the rule the backport workflow prescribes — and the inverse of what
went wrong on #3801/#3802/#3803, where an additional sign-off of ours was added to a
foreign patch.

Branch-correct paths — the thing that fails mechanically

PR Branch server file test file
#3823 release/25.2 Xext/xinput/extinit.c test/xi2/protocol-eventconvert.c
#3824 release/25.1 Xi/extinit.c test/xi2/protocol-eventconvert.c
#3825 release/25.0 Xi/extinit.c test/xi2/protocol-eventconvert.c

The Xext/<ext>/ → <ext>/ reorg landed after 25.0/25.1 branched, so a mechanical
cherry-pick would fail or create the wrong file on those two branches. Verified per
branch: the file that exists on the branch is the one that changed, and both the server
and the test file are touched on each. Server-only would change nothing observable in
CI; test-only would break the suite.

Rule 2 — backport assessment

Protocol-correctness for byte-swapped clients: a ScrollClass flag in the XI2
DeviceChanged reply was left in server byte order, so a client on the opposite
endianness reads it reversed. No memory-safety or security dimension, so no further
propagation is implied beyond the three release lines already covered.

Rule 3 — driver ABI

No impact. test/xi2/protocol-eventconvert.c is test code; extinit.c is DDX
initialisation reached over the private ABI, not via a struct a driver reads. No
struct layout changes, no _X_EXPORTed symbol added, removed or changed — 0
occurrences in the diff.

Merge

release/* is merged by the maintainer. A bot-review-passed verdict plus green CI
authorises nothing here.

@metux metux added the bot-review-passed Automated bot review found no blocking issues label Oct 3, 2026
@metux

metux commented Oct 3, 2026

Copy link
Copy Markdown
Contributor Author

🤖 Automated review — generated by Starfleet ship Enterprise (model: heavy-model) on behalf of @metux. Not a human review.


Title: "Backport #3775 (Xi: byte-swap DeviceChanged valuator) auf release/25.3, 25.1, 25.0"
Category: active
Kind: task
Status: open
Assigned-To: "Pasteur"
Created-By: "Enterprise"
Created: 2026-10-02T00:00:00Z
Doc-Ref: "—"

Backport-Batch zu Master-PR #3775 auf alle drei Release-Linien.
Sammelbezug: es gibt diese Topic zuerst, die drei PRs hängen sich daran auf —
nicht umgekehrt. Grund: heute früh entstand das Duplikat #3806, weil zwei Schiffe
je ein eigenes Topic für denselben Backport gebaut haben.

Verknüpft mit:

Quelle — gemessen, mit der Falle

Quelle: cafe531
Das ist der mergeCommit. Die Branch-SHA existiert bei rebase-Merge nicht auf
master; cherry-pick sagt dann "bad object".

Sign-off: Originalautor, nicht metux

git-author : Lukáš Lipinský
Signed-off-by : Lukáš Lipinský 18076-Mr-Tao@users.noreply.gitlab.freedesktop.org
Part-of : https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/2291

Fremder Patch → Originalautor, kein eigener Sign-off. Bei #3801/#3802/#3803
wurde genau das initially falsch gemacht.

Pfade — die Datei wandert, der Test nicht

Datei 25.2 25.1 25.0
Server Xi/extinit.c Xi/extinit.c Xi/extinit.c
Test test/xi2/protocol-eventconvert.c dito dito

Auf 25.1/25.0 wird der Cherry-Pick Xi/extinit.c anlegen wollen.
git diff origin/release/<ziel>..HEAD --stat muss genau 2 Dateien zeigen, und
Xi/extinit.c darf nicht auftauchen.

Abnahmekriterium

  1. Ein Dashboard-Topic pro PR (dieses hier ist der Sammelbezug, kein Ersatz dafür).
  2. Jeder PR nennt im PR-Body die Topic-Slug und sein Topic verlinkt zurück.
  3. Beide Dateien müssen je Branch angefasst sein — nur Server ohne Test ändert im CI
    nichts, nur Test ohne Server macht die Suite rot.
  4. Sign-off-Zahl == 1, Autor == Originalautor.
  5. git rev-list --count origin/release/<ziel>..HEAD == 0.
  6. Erst bei Commit + Topic + Verlinkung in beide Richtungen wird ein Haken gesetzt.

Verifikationsbasis pro PR (im Body, nicht im Topic)

  • master source commit : cafe531
  • local origin/master :
  • GitHub branch tip : gh api repos/X11Libre/xserver/git/ref/heads/release/ -q .object.sha
  • foreign commits : git rev-list --count origin/release/..HEAD = 0
  • angefasste Datei : <die, die auf diesem Branch liegt>

Werte vor dem Posten per grep auf 40 Hex-Zeichen gegenprüfen — nicht danach.

Checkliste — 3 PRs, noch keiner existiert

  • release/25.3 — PR offen? ____
  • release/25.1 — PR offen? ____
  • release/25.0 — PR offen? ____

Build-Erwartung, branch-abhaengig

-Dwerror=true. Die dokumentierte Einzelausnahme os/Xtranssock.c:631 gilt auf
25.0 nicht
— die Datei existiert dort nicht, stattdessen gibt es fünf vorbestehende
Fehler in drei Dateien. Bei mehr als der einen Ausnahme: Gegenprobe am ungepatchten
origin/release/<ziel>-Tip im selben Build-Dir.
Identische Fehlermenge heißt
"nicht dein Commit".

Merge

release/* wird nie automatisch gemergt. Review, Kommentar, Label, dann Stopp.

@metux
metux merged commit c94c967 into release/25.0 Oct 3, 2026
@metux
metux deleted the backport/3775-to-25.0 branch October 3, 2026 17:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bot-review-passed Automated bot review found no blocking issues

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant