Skip to content

LATX: Scope KZT compatibility fallback by library group - #398

Merged
LaurenIsACoder merged 1 commit into
lat-opensource:masterfrom
LaurenIsACoder:lauren/kzt-family-compatibility
Aug 14, 2026
Merged

LATX: Scope KZT compatibility fallback by library group#398
LaurenIsACoder merged 1 commit into
lat-opensource:masterfrom
LaurenIsACoder:lauren/kzt-family-compatibility

Conversation

@LaurenIsACoder

Copy link
Copy Markdown
Contributor

Problem

KZT compatibility fallback was process-wide. When an application search path contained a private x86_64 library matching any wrapped SONAME, CheckEnableKZT() disabled the global KZT mode. The same global fallback was also hard-coded for GTK3 and libXt dependencies.

This made one library conflict disable unrelated KZT library groups. It also left execution-time KZT hooks controlled only by the process-level mode, even when no library group remained usable.

Change

  • Preserve the configured library-group mask and maintain a separate effective mask after compatibility checks.
  • Disable only the conflicting library group and prune groups that depend on it.
  • Gate translation, bridge, signal, address-validation, relocation, and callback paths on both the process-level KZT mode and the effective group mask.
  • Match private libraries at the .so boundary and verify that candidates are x86_64 ELF files.
  • Remove the GTK3/libXt name-specific process-wide fallback while retaining the existing Chrome compatibility gate as an explicit all-group rejection.

Validation

  • git diff --check origin/master...HEAD
  • scripts/checkpatch.pl --no-tree reports 0 errors
  • Focused host-side compilation and checks for group pruning and the execution-time KZT predicate

The normal LoongArch product build and integration tests have not yet been run.

Compatibility checks previously disabled the process-wide KZT option when an application path contained a private guest library matching any wrapped SONAME. This also disabled unrelated library families, while wrapper-selection logs could still describe the configured groups rather than the execution-time result.

Keep the configured mask as the requested state and prune incompatible families only from a separate effective mask. Derive the execution-time KZT predicate from the process-level 0/1/2 mode and the effective mask, then use it consistently for translation, bridge, signal, address-validation, relocation, and callback paths. Configuration, direct-exec, and Wine deferral continue to manage the process-level mode.

Match private guest libraries at the .so boundary and confirm each candidate is an x86_64 ELF. Remove the undocumented GTK3/libXt name gate; retain the existing Chrome process gate as an explicit all-family rejection.

Signed-off-by: Hanlu Li <heuleehanlu@gmail.com>
@LaurenIsACoder
LaurenIsACoder marked this pull request as ready for review August 14, 2026 07:53
@xiangzhai

Copy link
Copy Markdown
Contributor

Loongnix Desktop ABI 1.0 gtkperf-for-gtk3开启LATX_KZT_LIBS=cairo符合预期。

@LaurenIsACoder
LaurenIsACoder merged commit 0af3391 into lat-opensource:master Aug 14, 2026
20 checks passed
@LaurenIsACoder
LaurenIsACoder deleted the lauren/kzt-family-compatibility branch August 14, 2026 09:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants