You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The intent of the affected code is to mmap() with a hint address above 1<<47 in
order to notify Linux that we can accept, and want, mappings above this
address. Using ring0.PhysicalAddressBits for this purpose is incorrect for two
reasons:
- Some machines can have 57 virtual address bits (i.e. support 5-level paging)
but fewer than 47 physical address bits.
- When cgo is enabled, the physical address space is artificially limited to 40
bits:
https://github.com/google/gvisor/blob/1941bc68e20da25c6cb29330399f122cb3ecfa5a/pkg/sentry/platform/kvm/machine_cgo.go#L30
Also hoist computation of suggestedAddr, which is loop-invariant, out of the
loop.
PiperOrigin-RevId: 800506920
0 commit comments