mirror of
https://github.com/netbirdio/gvisor.git
synced 2026-05-22 17:12:49 -07:00
Bind mount PCI paths for TPUs as read only.
PiperOrigin-RevId: 552912189
This commit is contained in:
committed by
gVisor bot
parent
8baec93b4c
commit
fa9163e7a0
+1
-1
@@ -176,7 +176,7 @@ func tpuProxyUpdateChroot(chroot string, conf *config.Config) error {
|
||||
if err != nil {
|
||||
return fmt.Errorf("error parsing path %q: %v", sysAccelPath, err)
|
||||
}
|
||||
if err := mountInChroot(chroot, sysPCIDeviceDir, sysPCIDeviceDir, "bind", unix.MS_BIND); err != nil {
|
||||
if err := mountInChroot(chroot, sysPCIDeviceDir, sysPCIDeviceDir, "bind", unix.MS_BIND|unix.MS_RDONLY); err != nil {
|
||||
return fmt.Errorf("error mounting %q in chroot: %v", sysAccelPath, err)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user