summary refs log tree commit diff
path: root/seccomp
diff options
context:
space:
mode:
authorDaniel Verkamp <dverkamp@chromium.org>2019-11-26 13:02:47 -0800
committerCommit Bot <commit-bot@chromium.org>2019-12-06 09:37:53 +0000
commit92a2c49349404b4ba90941e18e8a828beca52390 (patch)
tree955fe83d8a3b867d184777ae5d611244b5f75136 /seccomp
parent6a8470679503482a9cc794ec55c984f5564cf9f6 (diff)
downloadcrosvm-92a2c49349404b4ba90941e18e8a828beca52390.tar
crosvm-92a2c49349404b4ba90941e18e8a828beca52390.tar.gz
crosvm-92a2c49349404b4ba90941e18e8a828beca52390.tar.bz2
crosvm-92a2c49349404b4ba90941e18e8a828beca52390.tar.lz
crosvm-92a2c49349404b4ba90941e18e8a828beca52390.tar.xz
crosvm-92a2c49349404b4ba90941e18e8a828beca52390.tar.zst
crosvm-92a2c49349404b4ba90941e18e8a828beca52390.zip
sys_util: guest_memory: check u64 to usize conversion
Replace the unchecked conversion with a try_from() rather than just
truncating without warning.  This gives a more useful error message when
a >4GB guest memory size is requested on a 32-bit platform.

BUG=chromium:1028747
TEST=`crosvm run -m $((5 * 1024)) ...` on kevin

Change-Id: Ib1fcf4019eefdc9ee8f93a5307802e6d6d43d01c
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/crosvm/+/1937552
Tested-by: kokoro <noreply+kokoro@google.com>
Commit-Queue: Daniel Verkamp <dverkamp@chromium.org>
Reviewed-by: Stephen Barber <smbarber@chromium.org>
Diffstat (limited to 'seccomp')
0 files changed, 0 insertions, 0 deletions