summaryrefslogtreecommitdiffhomepage
path: root/pkg/sentry
AgeCommit message (Collapse)Author
2021-09-20Merge release-20210906.0-49-g206d7bb90 (automated)gVisor bot
2021-09-20Internal change.gVisor bot
PiperOrigin-RevId: 397813331
2021-09-19Merge release-20210906.0-46-g89a0011c1 (automated)gVisor bot
2021-09-19Support IPV6_RECVPKTINFO on UDP socketsGhanan Gowripalan
PiperOrigin-RevId: 397631833
2021-09-17Merge release-20210906.0-40-g7dacdbef5 (automated)gVisor bot
2021-09-17Allow rebinding packet socket protocolGhanan Gowripalan
...to change the network protocol a packet socket may receive packets from. This CL is a portion of an originally larger CL that was split with https://github.com/google/gvisor/commit/a8ad692fd36cbaf7f5a6b9af39d601053dbee338 being the dependent CL. That CL (accidentally) included the change in the endpoint's `afterLoad` method to take the required lock when accessing the endpoint's netProto field. That change should have been in this CL. The CL that made the change mentioned in the commit message is cl/396946187. PiperOrigin-RevId: 397412582
2021-09-16Merge release-20210906.0-35-g51b96514c (automated)gVisor bot
2021-09-16Limit most file mmaps to the range of an int64.Jamie Liu
In the general case, files may have offsets between MaxInt64 and MaxUint64; in Linux pgoff is consistently represented by an unsigned long, and in gVisor the offset types in memmap.MappableRange are uint64. However, regular file mmap is constrained to int64 offsets (on 64-bit systems) by mm/mmap.c:file_mmap_size_max() => MAX_LFS_FILESIZE == LLONG_MAX. As a related fix, check for chunkStart overflow in fsutil.HostFileMapper; chunk offsets are uint64s, but as noted above some file types may use uint64 offsets beyond MaxInt64. Reported-by: syzbot+71342a1585aed97ed9f7@syzkaller.appspotmail.com PiperOrigin-RevId: 397136751
2021-09-16Merge release-20210906.0-34-g282a4dd52 (automated)gVisor bot
2021-09-16Merge pull request #6579 from prattmic:runsc_do_profilegVisor bot
PiperOrigin-RevId: 397114051
2021-09-16runsc: add global profile collection flagsMichael Pratt
Add global flags -profile-{block,cpu,heap,mutex} and -trace which enable collection of the specified profile for the entire duration of a container execution. This provides a way to definitively start profiling before that application starts, rather than attempting to race with an out-of-band `runsc debug`. Note that only the main boot process is profiled. This exposed a bug in Task.traceExecEvent: a crash when tracing and -race are enabled. traceExecEvent is called off of the task goroutine, but uses the Task as a context, which is a violation of the Task contract. Switching to the AsyncContext fixes the issue. Fixes #220
2021-09-15Merge release-20210906.0-26-g8b56b6b83 (automated)gVisor bot
2021-09-15Pass address properties in a single structTony Gong
Replaced the current AddAddressWithOptions method with AddAddressWithProperties which passes all address properties in a single AddressProperties type. More properties that need to be configured in the future are expected, so adding a type makes adding them easier. PiperOrigin-RevId: 396930729
2021-09-15Merge release-20210906.0-25-g149ca0096 (automated)gVisor bot
2021-09-15[bind] Return EINVAL for under sized addressGhanan Gowripalan
...and EAFNOSUPPORT for unexpected address family. To comply with Linux. Updates #6021, #6575. PiperOrigin-RevId: 396893590
2021-09-15Merge release-20210906.0-22-g39470428d (automated)gVisor bot
2021-09-14Fix race on msgrcv(MSG_COPY).Rahat Mahmood
Previously, we weren't making a copy when a sysv message queue was receiving a message with the MSG_COPY flag. This flag indicates the message being received should be left in the queue and a copy of the message should be returned to userspace. Without the copy, a racing process can modify the original message while it's being marshalled to user memory. Reported-by: syzbot+cb15e644698b20ff4e17@syzkaller.appspotmail.com PiperOrigin-RevId: 396712856
2021-09-11Merge release-20210830.0-32-g28853599c (automated)gVisor bot
2021-09-10Typo fix.Etienne Perot
PiperOrigin-RevId: 396042572
2021-09-10Merge release-20210830.0-30-g2572af388 (automated)gVisor bot
2021-09-09Remove linux-compat loopback hacks from packet endpointGhanan Gowripalan
Previously, gVisor did not represent loopback devices as an ethernet device as Linux does. To maintain Linux API compatibility for packet sockets, a workaround was used to add an ethernet header if a link header was not already present in the packet buffer delivered to a packet endpoint. However, this workaround is a bug for non-ethernet based interfaces; not all links use an ethernet header (e.g. pure L3/TUN interfaces). As of 3b4bb947517d0d9010120aaa1c3989fd6abf278e, gVisor represents loopback devices as an ethernet-based device so this workaround can now be removed. BUG: https://fxbug.dev/81592 Updates #6530, #6531. PiperOrigin-RevId: 395819151
2021-09-09Merge release-20210830.0-27-g5e9c3a0b9 (automated)gVisor bot
2021-09-07Stub some memory control files.Rahat Mahmood
PiperOrigin-RevId: 395338926
2021-09-04Merge release-20210830.0-23-g775a32112 (automated)gVisor bot
2021-09-03Add //pkg/sentry/seccheck.Jamie Liu
This defines common infrastructure for dynamically-configured security checks, including an example usage in the clone(2) path. PiperOrigin-RevId: 394797270
2021-09-02Merge release-20210823.0-48-g9149b2cef (automated)gVisor bot
2021-09-02unix: avoid taking two endpoint locksAndrei Vagin
If we want to take two endpoint locks, we need to be sure that we always take them in the same order. Accept() locks the listening endpoint to work with acceptedChan and then it calls GetLocalAddress that locks an accepted endpoint. Actually, we can release the listening endpoint lock before calling GetLocalAddress. Reported-by: syzbot+f52bd603f51a4ae91054@syzkaller.appspotmail.com PiperOrigin-RevId: 394553823
2021-09-02Merge release-20210823.0-44-gdfb3273f8 (automated)gVisor bot
2021-09-01Support sending with packet socketsGhanan Gowripalan
...through the loopback interface, only. This change only supports sending on packet sockets through the loopback interface as the loopback interface is the only interface used in packet socket syscall tests - the other link endpoints are not excercised with the existing test infrastructure. Support for sending on packet sockets through the other interfaces will be added as needed. BUG: https://fxbug.dev/81592 PiperOrigin-RevId: 394368899
2021-09-02Merge release-20210823.0-42-gae3bd3201 (automated)gVisor bot
2021-09-01Extract network datagram endpoint common facilitiesGhanan Gowripalan
...from the UDP endpoint. Datagram-based transport endpoints (e.g. UDP, RAW IP) can share a lot of their write path due to the datagram-based nature of these endpoints. Extract the common facilities from UDP so they can be shared with other transport endpoints (in a later change). Test: UDP syscall tests. PiperOrigin-RevId: 394347774
2021-09-01Merge release-20210823.0-40-gb4de26d6b (automated)gVisor bot
2021-09-01Don't use reflection in fpu.alignedBytes.Jamie Liu
reflect.ValueOf takes an interface{}, so when passed a slice the compiler emits a call to runtime.convTslice to heap-allocate a copy of the slice header. PiperOrigin-RevId: 394310052
2021-09-01Merge release-20210823.0-39-g702fe7d60 (automated)gVisor bot
2021-09-01Cache vdso.so's __kernel_rt_sigreturn location.Jamie Liu
PiperOrigin-RevId: 394300607
2021-09-01Merge release-20210823.0-38-g5da4270a8 (automated)gVisor bot
2021-09-01Propagate vfs.MkdirOptions.ForSyntheticMountpoint to overlay copy-up.Jamie Liu
PiperOrigin-RevId: 394296687
2021-09-01Merge release-20210823.0-37-g927ea16dd (automated)gVisor bot
2021-09-01unix: handle a case when a buffer is overflowedAndrei Vagin
Reported-by: syzbot+1aab6800bd14829609b8@syzkaller.appspotmail.com PiperOrigin-RevId: 394279838
2021-08-30Merge release-20210823.0-31-ga247e227b (automated)gVisor bot
2021-08-30Narrow COW-break on thread stacks.Jamie Liu
PiperOrigin-RevId: 393841270
2021-08-30Merge release-20210823.0-30-g574c6542a (automated)gVisor bot
2021-08-30Use specialFileFD handles in specialFileFD.Stat().Jamie Liu
PiperOrigin-RevId: 393831108
2021-08-27Merge release-20210816.0-52-gf7281c6cb (automated)gVisor bot
2021-08-27Fix lock order violations: mm.mappingMu > Task.mu.Nicolas Lacasse
Document this ordering in mm/mm.go. PiperOrigin-RevId: 393413203
2021-08-25Remove quotedev deviceChong Cai
PiperOrigin-RevId: 392982220
2021-08-24Merge release-20210816.0-37-g18beb6770 (automated)gVisor bot
2021-08-24Merge pull request #6438 from gystemd:tcsetpgrp_SIGTTOUgVisor bot
PiperOrigin-RevId: 392774712
2021-08-24Merge release-20210816.0-29-g2c3d7cb07 (automated)gVisor bot
2021-08-23Merge pull request #6491 from avagin:kvm-mem-slot-overlapgVisor bot
PiperOrigin-RevId: 392554743