arm64: Replace page size panic with warning, add runtime check#12784
Open
copybara-service[bot] wants to merge 1 commit intomasterfrom
Open
arm64: Replace page size panic with warning, add runtime check#12784copybara-service[bot] wants to merge 1 commit intomasterfrom
copybara-service[bot] wants to merge 1 commit intomasterfrom
Conversation
Replace panic with warning in hostarch init() when the host page size does not match the compiled page size on arm64. This applies to both 4K and 64K variants so build tools that import hostarch don't crash. Add a page size check at runsc boot startup to fail on mismatch. Fixes #12717 FUTURE_COPYBARA_INTEGRATE_REVIEW=#12775 from ildar-safarov:arm64-pagesize-warning bf87740 PiperOrigin-RevId: 888910979
| // Make sure the page size is 4K on arm64 platform. | ||
| if size := unix.Getpagesize(); size != PageSize { | ||
| panic("Only 4K page size is supported on arm64!") | ||
| println("WARNING: host page size mismatch - running on non-4K host") |
Member
There was a problem hiding this comment.
Use the internal logging pkg, e.g. https://cs.opensource.google/gvisor/gvisor/+/master:pkg/log/log.go;drc=b5cadeae4f59adff6faf3d68c880f9b7bad93af4;l=213
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.
arm64: Replace page size panic with warning, add runtime check
Replace panic with warning in hostarch init() when the host page size
does not match the compiled page size on arm64. This applies to both
4K and 64K variants so build tools that import hostarch don't crash.
Add a page size check at runsc boot startup to fail on mismatch.
Fixes #12717
FUTURE_COPYBARA_INTEGRATE_REVIEW=#12775 from ildar-safarov:arm64-pagesize-warning bf87740