Conversation
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.
Since it was recently found that the IBM PC ELKS v0.9.0 images contain the wrong binary for Nano-X, a version increment to v0.9.1 will have to be made soon and new images produced. Since another wait-oriented kernel reparenting bug was also fixed recently in #2639, I thought to include a few other important kernel fixes recently found by @Vutshi's exploration into AI tools.
This PR fixes the
wait4syscall issue found by @Vutshi's ChatGPT Plus and Claude kernel audit in #2646. The primary issue was thatwait4would wait rather than return -ECHILD when a process ID passed that was not a child of the calling process.This fix includes my modified code from Claude's proposed fix, as it was much less messy than that proposed by ChatGPT Plus.
Claude also pointed out another issue which is that in the case of the parent only having stopped or zombie children which do not match the passed PID, an extra sleep/wakeup cycle is performed. This inefficiency will be handled at a later time, and there is no regression test yet built for it.
The regression tests used to verify correctness, provided by ChatGPT and Claude, are also add here in elkscmd/test/syscall/. These are not yet compiled and distributed on images, but will be after more regression tests are seen. Both tests initially showed failure and now show success.