Conversation
00006e4 to
00002f9
Compare
CI pipeline: - commit-hygiene: SHA-1 prefix, subject format, AI trailer rejection - lint: clang-format, trailing newlines, banned func, cppcheck, shfmt - unit-tests: test-game and test-coro - build: kernel module and xo-user compile check - integration-tests: insmod, device I/O, game completion, kernel health, clean unload with dmesg diagnosis - Add explicit permissions (contents: read) to enforce least-privilege on GITHUB_TOKEN. This fixes kxo_state_store: sscanf into temporaries and use WRITE_ONCE for attr_obj.end to pair with lockless READ_ONCE in kxo_shutting_down. Return -EINVAL from kxo_state_store when sscanf cannot parse all three fields, instead of silently succeeding.
In fixed_log, the divisor (v + (1U << FIXED_SCALE_BITS)) is computed in 32-bit arithmetic. When v = 0xFFFF0000 (n_total=65535, so n_total<<16), the addition overflows to zero, triggering a kernel Oops (divide error) inside the kxod workqueue via ai_one_work_func -> play_agent_move -> mcts. This crashes the kworker, leaves the module refcount elevated, and makes rmmod hang forever, which is CI timeout seen in integration-tests job. Cast v to u64 before the addition so denominator is computed in 64-bit and cannot wrap to zero.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This introduce a CI pipeline: