gvisor/pkg/sentry/platform/kvm
Nicolas Lacasse 6cc9b311af platform: Pass device fd into platform constructor.
We were previously openining the platform device (i.e. /dev/kvm) inside the
platfrom constructor (i.e. kvm.New).  This requires that we have RW access to
the platform device when constructing the platform.

However, now that the runsc sandbox process runs as user "nobody", it is not
able to open the platform device.

This CL changes the kvm constructor to take the platform device FD, rather than
opening the device file itself. The device file is opened outside of the
sandbox and passed to the sandbox process.

PiperOrigin-RevId: 212505804
Change-Id: I427e1d9de5eb84c84f19d513356e1bb148a52910
2018-09-11 13:09:46 -07:00
..
testutil stateify: support explicit annotation mode; convert refs and stack packages. 2018-07-27 10:17:21 -07:00
BUILD stateify: support explicit annotation mode; convert refs and stack packages. 2018-07-27 10:17:21 -07:00
address_space.go Add separate Recycle method for allocator. 2018-08-22 14:16:04 -07:00
allocator.go Add separate Recycle method for allocator. 2018-08-22 14:16:04 -07:00
bluepill.go Check in gVisor. 2018-04-28 01:44:26 -04:00
bluepill_amd64.go Restore FS on resume. 2018-05-30 17:37:51 -07:00
bluepill_amd64.s Check in gVisor. 2018-04-28 01:44:26 -04:00
bluepill_amd64_unsafe.go Check in gVisor. 2018-04-28 01:44:26 -04:00
bluepill_fault.go Add allocator abstraction for page tables. 2018-06-06 21:48:24 -07:00
bluepill_unsafe.go Fix KVM EFAULT handling. 2018-05-15 22:44:40 -07:00
context.go Change ring0 & page tables arguments to structs. 2018-05-30 15:14:44 -07:00
host_map.go Simplify KVM host map handling. 2018-05-14 20:45:41 -07:00
kvm.go platform: Pass device fd into platform constructor. 2018-09-11 13:09:46 -07:00
kvm_amd64.go Check in gVisor. 2018-04-28 01:44:26 -04:00
kvm_amd64_unsafe.go Split PCID implementation from page tables. 2018-06-06 22:52:55 -07:00
kvm_const.go Fix KVM EFAULT handling. 2018-05-15 22:44:40 -07:00
kvm_test.go platform: Pass device fd into platform constructor. 2018-09-11 13:09:46 -07:00
machine.go Add CPUID faulting for ptrace and KVM. 2018-07-16 22:02:58 -07:00
machine_amd64.go Add CPUID faulting for ptrace and KVM. 2018-07-16 22:02:58 -07:00
machine_amd64_unsafe.go Make KVM more scalable by removing CPU cap. 2018-06-19 17:00:30 -07:00
machine_unsafe.go Add allocator abstraction for page tables. 2018-06-06 21:48:24 -07:00
physical_map.go Add allocator abstraction for page tables. 2018-06-06 21:48:24 -07:00
virtual_map.go Check in gVisor. 2018-04-28 01:44:26 -04:00
virtual_map_test.go Deflake kvm_test. 2018-06-13 13:05:33 -07:00