Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

uefi: Drop the panic-on-logger-errors feature#1143

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged

Conversation

nicholasbishop
Copy link
Member

This was originally added because of occasional panics when logging quickly on VirtualBox. (Unclear whether this bug is still present, and also as far as I know we haven't observed this behavior on any other UEFI implementations.) The decision was made to panic by default on logger errors, but offer an escape mechanism. However, making this a compile-time choice is not ideal, since most UEFI programs are intended to run on arbitrary UEFI implementations.

We could make it a runtime option instead, but since loggers are usually just informational (i.e. not critical functionality for the application), silently ignoring errors seems like a better choice for most uses.

In the rare case where an application does consider logging critical, they can turn off thelogger helper and implement their own logger.

For prior discussion, see:

Checklist

  • Sensible git history (for example, squash "typo" or "fix" commits). See theRewriting History guide for help.
  • Update the changelog (if necessary)

phip1611 reacted with thumbs up emoji
This was originally added because of occasional panics when logging quickly onVirtualBox. (Unclear whether this bug is still present, and also as far as Iknow we haven't observed this behavior on any other UEFI implementations.) Thedecision was made to panic by default on logger errors, but offer an escapemechanism. However, making this a compile-time choice is not ideal, since mostUEFI programs are intended to run on arbitrary UEFI implementations.We could make it a runtime option instead, but since loggers are usually justinformational (i.e. not critical functionality for the application), silentlyignoring errors seems like a better choice for most uses.In the rare case where an application does consider logging critical, they canturn off the `logger` helper and implement their own logger.For prior discussion, see:*rust-osdev#121*rust-osdev#123
// Ignore all errors. Since we're in the logger implementation we
// can't log the error. We also don't want to panic, since logging
// is generally not critical functionality.
let _ = DecoratedLog::write(
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

nit: We could write it to the serial device and thedebugcon device in that case.

@phip1611phip1611 added this pull request to themerge queueApr 21, 2024
Merged via the queue intorust-osdev:main with commit2e5dea4Apr 21, 2024
@nicholasbishopnicholasbishop deleted the bishop-drop-panic-log branchApril 21, 2024 15:33
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Reviewers

@phip1611phip1611phip1611 approved these changes

Assignees
No one assigned
Labels
None yet
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

2 participants
@nicholasbishop@phip1611

[8]ページ先頭

©2009-2025 Movatter.jp