Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Kernel: Modify TimeManagement::current_time(..) API so it can't fail. #6869

Merged
merged 1 commit into from
May 5, 2021

Conversation

bgianfo
Copy link
Member

@bgianfo bgianfo commented May 5, 2021

The fact that current_time can "fail" makes it's use a bit awkward.
All callers in the Kernel are trusted besides syscalls, so assert
that they never get their, and make sure all current callers perform
validation of the clock_id with TimeManagement::is_valid_clock_id().

I have fuzzed this change locally for a bit to make sure I didn't
miss any obvious regression.

The fact that current_time can "fail" makes it's use a bit awkward.
All callers in the Kernel are trusted besides syscalls, so assert
that they never get their, and make sure all current callers perform
validation of the clock_id with TimeManagement::is_valid_clock_id().

I have fuzzed this change locally for a bit to make sure I didn't
miss any obvious regression.
@linusg
Copy link
Member

linusg commented May 5, 2021

it's use -> its use
that they never get their, - missing word?

@awesomekling awesomekling merged commit 11306d7 into SerenityOS:master May 5, 2021
@bgianfo bgianfo deleted the current-time-shouldnt-fail branch May 6, 2021 19:18
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.

None yet

3 participants