-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
#1233 - Add unlikely() to error checking conditions #1408
Open
ggracechoi
wants to merge
4
commits into
unikraft:staging
Choose a base branch
from
ggracechoi:staging
base: staging
Could not load branches
Branch not found: {{ refName }}
Could not load tags
Nothing to show
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Conversation
This file contains 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
github-actions
bot
added
arch/arm
arch/arm64
arch/x86_64
area/arch
Unikraft Architecture
area/docs
Documentation
area/lib
Internal Unikraft Microlibrary
area/plat
Unikraft Patform
area/support
Support scripts, tools, services.
lang/c
Issues or PRs to do with C/C++
lib/9pfs
9p client
lib/posix-process
Information about system parameters
lib/posix-sysinfo
lib/uk9p
lib/ukallocbbuddy
lib/ukblkdev
lib/ukcpio
ukcpio: CPIO archive extraction
lib/uklibparam
lib/ukmpi
labels
May 4, 2024
github-actions
bot
added
lib/vfscore
VFS Core Interface
plat/common
Common to all platforms
plat/driver
plat/driver/tap
plat/kvm
Unikraft for KVM
plat/xen
Unikraft for Xen
labels
May 4, 2024
Add LIBVFSCORE_INITRD_OPT_MKMP for "mkmp" mount option in lib/vfscore/automount.c, instead of just the string "mkmp." Signed-off-by: Grace Choi <gracechoi@utexas.edu> Signed-off-by: Pranjal Rai <pranjalrai@utexas.edu>
Commit 4d97341 ("lib/ukvmem/arch: Do not print error message if demand paging disabled") introduced a build error and a warning by copy-pasting the change from x86 to Arm. This is incorrect as the trap context from Arm does not have the `error_code` but the `esr` field instead. Fix this by using using the corect field and correct string format. Signed-off-by: Sergiu Moga <sergiu@unikraft.io> Reviewed-by: Stefan Jumarea <stefanjumarea02@gmail.com> Approved-by: Razvan Deaconescu <razvand@unikraft.io> GitHub-Closes: unikraft#1388
Add the unlikely() macro to consistently check for unlikely error situations. Signed-off-by: Grace Choi <gracechoi@utexas.edu> Signed-off-by: Pranjal Rai <pranjalrai@utexas.edu>
razvand
requested review from
Mihnea27,
StefanJum and
mariasfiraiala
and removed request for
a team
May 21, 2024 20:28
StefanJum
requested changes
May 22, 2024
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@ggracechoi please rebase the pr and only leave the relevant commit in (the one adding error checking)
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
arch/arm
arch/arm64
arch/x86_64
area/arch
Unikraft Architecture
area/docs
Documentation
area/lib
Internal Unikraft Microlibrary
area/plat
Unikraft Patform
area/support
Support scripts, tools, services.
lang/c
Issues or PRs to do with C/C++
lib/posix-process
Information about system parameters
lib/posix-sysinfo
lib/uk9p
lib/ukallocbbuddy
lib/ukblkdev
lib/ukcpio
ukcpio: CPIO archive extraction
lib/uklibparam
lib/ukmpi
lib/uknetdev
lib/ukring
lib/uksglist
lib/vfscore
VFS Core Interface
lib/9pfs
9p client
plat/common
Common to all platforms
plat/driver/tap
plat/driver
plat/kvm
Unikraft for KVM
plat/xen
Unikraft for Xen
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.
Prerequisite checklist
checkpatch.uk
on your commit series before opening this PR;Base target
x86_64
or N/A]kvm
,xen
or N/A]app-python3
or N/A]Additional configuration
N/A
Description of changes
We wrapped all error conditions that end the current function / flow with the unlikely() macro. Our only concern is we were not able to test our changes because our terminals could not recognize "sh" while following these guidelines.