profile
viewpoint
Tamir Duberstein tamird @google New York, NY

cockroachdb/cockroach 17799

CockroachDB - the open source, cloud-native SQL database.

lib/pq 5664

Pure Go Postgres driver for database/sql

grpc/grpc-web 3840

gRPC for Web Clients

mperham/connection_pool 1207

Generic connection pooling for Ruby

jawspeak/ruby-docx-templater 139

A Ruby library to template Microsoft Word .docx files. Generates new Word .docx files based on a template file. Does templating entirely in memory.

tamird/cockroach 6

A Scalable, Geo-Replicated, Transactional Datastore

tamird/CS212 5

Udacity CS212 April 2012 Exam Solutions

tamird/pcap 1

Rust language pcap library

push eventtamird/rust-tuf

Kevin Wells

commit sha b971a4ccf1851a60ec696365356c45805c1dd3cb

Split read/write half of Repository trait A TUF client has no need to store metadata in a remote repository, and some repository implementations cannot implement the store_* methods, so this change splits defines the Repository trait to be a supertrait of RepositoryProvider (the read half) and RepositoryStorage (the write half). Other than requiring clients to import additional traits, this change should not change any existing functionality.

view details

Kevin Wells

commit sha c58e38972a0d3d9eee24543e55987c99903ad549

Unimplement RepositoryStorage for HttpRepository

view details

Kevin Wells

commit sha d37c57bb1ff7f3600ac1cc80f59e4e94340385f1

Split SafeReader into separate types Since the Repository traits can be implemented outside this crate, it is not safe to assume that those implementations will verify the maximum length or hash of metadata/targets before succeeding a fetch request. In preparation to move the length check and hash verification into the tuf client, this change splits the SafeReader into 2 types: * EnforceMinimumBitrate enforces a minimum transfer rate, currently utilized by only the http repository implementation * SafeReader, which retains the logic to enforce a maximum file size and hash value. This change also defines an extension trait on AsyncRead to easily wrap an AsyncRead in these types. A future change will move hash and length enforcement out of the Repository implementations.

view details

Kevin Wells

commit sha 2fd6f11b08a477c1aeb27fd9975f23f94c11036c

Metadata trait methods preserve original bytes The current definition the fetch_metadata and store_metadata repository trait methods require the repository trait implementations to parse the metadata, and the SignedMetadata structs and DataInterchange traits cannot provide a guarantee that parsing and re-serializing metadata will produce byte-for-byte identical metadata. This behavior is an issue for TUF as during the metadata update workflow, clients fetch metadata from a remote repository and store it in the local repository for later use. However, for metadata referenced by snapshot, the hash of the data must match in order to use the local version. This change: * modifies the fetch_metadata and store_metadata trait methods to interact with AsyncRead instead of SignedMetadata so that the original unparsed bytes can be stored as-is in the local repository as long as the metadata is determined to be valid. * defines the RawSignedMetadata type, which is a simple wrapper around raw bytes and contains type information identifying its inner Metadata type and serialization format. * introduces a new type to wrap an instance of the Repository traits and provide an API surface that can store the raw metadata and fetch both raw and parsed metadata to simplify interacting with the now less ergonomic trait methods. * moves the metadata max length checks and hash checks out of the repository trait implementations and into the RepositoryClient, ensuring invalid metadata provided by external RepositoryProviders will not be trusted (for metadata that is is hash-checked).

view details

Kevin Wells

commit sha a8b3608f02e090ef3dcfd9f45cac535c6c68a601

Allow Client builders to accept Repository values This change modifies the local/remote parameters for Client's constructors to be `impl Into<Repository<R, D>>`, which both preserves the existing behavior where implementations of RepositoryProvider and/or RepositoryStorage are accepted and allows callers to provide a Repository directly. As long as one of the parameters is a Repository instance, there won't be a need to turbofish or annotate the Client type to include the DataInterchange parameter.

view details

Kevin Wells

commit sha ecb305e46ab3f60a605a667c2e88cf3a95533a51

Add some tests for the Repository type

view details

Kevin Wells

commit sha 51b100d12d61d2577ba5563ce7aa697d8375fc25

Merge branch 'develop' of github.com:heartsucker/rust-tuf into repo-split

view details

Kevin Wells

commit sha 21d5466e5cf5a277f1a5e3184323bf0a29c8c3db

Re-add D type param to Repository traits

view details

Kevin Wells

commit sha 34d812943af00c1e78150ddffdd939be0720f1fb

Remove Repository from public interface

view details

Kevin Wells

commit sha 6a70696085b8343aacf316848f1d47e2363e43b8

with_trusted_root_keys uses metadata root version

view details

Kevin Wells

commit sha c5d53b80cda48cea5855aa3cb3c8972133a52834

Add bug number

view details

Kevin Wells

commit sha 3aa93c9be47476c6512709c990c77b4209c5c80c

Merge branch 'develop' into repo-split

view details

Kevin Wells

commit sha 7a087c6f41b815beda962922ab440d8c09314143

Remove extension from EphemeralRepository storage Now that it is generic on D again, it doesn't need to support storing more than one format of metadata.

view details

Kevin Wells

commit sha ab5b5ce12328e517ae2f54ad408e651bb574f8d7

Cleanup trait constraints Got a bit overzealous with Sync.

view details

Kevin Wells

commit sha 91946cad62dc8be42b60c9d40a1bef9aaf512971

Remove Repository From conversion

view details

Kevin Wells

commit sha f7f706d86a83185e1f61c33e5e9d30c11f5d2cf3

Merge branch 'develop' into repo-split

view details

Kevin Wells

commit sha c56a89c54f61108835b766b74a718d5b5c9efdb7

Merge branch 'develop' into repo-split

view details

Erick Tryzelaar

commit sha daa946152278a2655e871acb4861eb21277f369d

Merge pull request #274 from wellsie1116/repo-split Split repository traits, Preserve metadata hashes

view details

Kevin Wells

commit sha c696b6a9520b69fdea70ba8e111153dc42686f3f

Remove unused signatures from tuf::Tuf

view details

Erick Tryzelaar

commit sha da8e00230da06b4a077ff57a9f524a2fb96b2d7d

Merge pull request #281 from wellsie1116/unused-signatures Remove unused signatures from tuf::Tuf

view details

push time in 4 days

push eventtamird/rust-tuf

Kevin Wells

commit sha fcf70196db1ec502609163963f33878408677805

Verify top-level delegated targets signatures The previous implementation did not consider delegated roles from the top-level "targets" role when looking for keys to verify the delegated targets with, which would result in delegated targets being accepted by Tuf without signature verification.

view details

Kevin Wells

commit sha 414342a7059b8e08438ef255c4a501fbe777358c

Split SafeReader into separate types Since the Repository traits can be implemented outside this crate, it is not safe to assume that those implementations will verify the maximum length or hash of metadata/targets before succeeding a fetch request. In preparation to move the length check and hash verification into the tuf client, this change splits the SafeReader into 2 types: * EnforceMinimumBitrate enforces a minimum transfer rate, currently utilized by only the http repository implementation * SafeReader, which retains the logic to enforce a maximum file size and hash value. This change also defines an extension trait on AsyncRead to easily wrap an AsyncRead in these types. A future change will move hash and length enforcement out of the Repository implementations.

view details

Erick Tryzelaar

commit sha 7dd5753e3b6d6bceaaef3e29aac3b7927f416fac

Merge pull request #276 from wellsie1116/split-safe-reader Split SafeReader into separate types

view details

Kevin Wells

commit sha 483bc904b7c6448b45c0de2ba8f2fcf44690d3a9

Add tests for EnforceMinimumBitrate

view details

Erick Tryzelaar

commit sha 57dc57d7a1e15c1983c6043da58207e1f8f293ed

Merge pull request #277 from wellsie1116/split-safe-reader Add tests for EnforceMinimumBitrate

view details

Kevin Wells

commit sha 960c3cd6ec126537ff9dc1f9aae3149168673162

Add invalid delegations tests

view details

Kevin Wells

commit sha 14a72a7b2fdb6fbdfe7407fa12bedc23090c2347

Provide update_delegations parent role So it can verify that the provided delegations are valid from the point of view of the parent. This avoids the need to check more than 1 signature in update_delegations.

view details

Kevin Wells

commit sha 29625222d6efb7e23d8e55f271ff848eb31584a2

Derive Error implementation Replace the manual implementation of std::error::Error for Error with the thiserror::Error derive macro. Other than the error strings containing more information, no observable changes expected.

view details

Erick Tryzelaar

commit sha 09c24d43cd1b76af23fad44233a85de7bedea4ee

Merge pull request #275 from wellsie1116/delegations-fix Verify top-level delegated targets signatures

view details

heartsucker

commit sha d7ee9c4ffc7f40cc773604641d27db12df813f1f

Merge pull request #280 from wellsie1116/error Derive Error implementation

view details

Tamir Duberstein

commit sha ccc9d6ae9798a08927dc9b242e5702f010134238

update to hyper 0.13.2 and http 0.2 Change-Id: I033e7d8976bdc502f22c45bfe065cd97d95870a9

view details

push time in 9 days

pull request commentcockroachdb/cockroach

lint: rename roachlint to roachvet, fold std vet into it, run roachvet on every PR

This is neat! Looking at the current state of these utilities in CRDB and at https://github.com/dominikh/go-tools/blob/master/cmd/staticcheck/staticcheck.go, it seems like most of staticcheck (all but unused) can also be folded into roachvet, potentially reducing some more duplicated work.

Finally, the comments here still refer to megacheck, which I gather is long dead.

ajwerner

comment created time in 14 days

starteddominikh/go-tools

started time in 14 days

issue commentgoogle/netstack

tcpip/seqnum/LessThan has a math calculation bug.

Can this issue be closed?

fanpei91

comment created time in 14 days

issue commentgoogle/netstack

tcp.handshake.synSentState() may have logical problems

@hbhasker should this be migrated to the gvisor repo?

fanpei91

comment created time in 14 days

issue commentgoogle/netstack

arm and windows support for fdbased link endpoint

This is all working now, I think. Can this be closed?

Archieeeeee

comment created time in 14 days

push eventtamird/rust-tuf

Kevin Wells

commit sha 0d380e3c29554740649292b897fd1d5c0f9fab95

Move Repository implementations This change moves the various repository implementations into their own private modules and re-exports their types. No functional changes expected.

view details

Kevin Wells

commit sha a7c83f0e0aa30f0c1d057233f6250bfe5af9b5d3

Dedup logic to create a digest::Context

view details

Erick Tryzelaar

commit sha a3c00831f6e1aee68d5aefe535204ba14c2b5abb

Merge pull request #273 from wellsie1116/move-repo-types Move Repository implementations to their own modules

view details

Tamir Duberstein

commit sha c51c1ec96d5af93068a603170311be69448f6571

update to hyper 0.13 and http 0.2 Change-Id: I033e7d8976bdc502f22c45bfe065cd97d95870a9

view details

push time in 17 days

push eventtamird/rust-tuf

Tamir Duberstein

commit sha db19f0916791ffa8bf02deaab9ff6d63ed153520

update to hyper 0.13 and http 0.2 Change-Id: I033e7d8976bdc502f22c45bfe065cd97d95870a9

view details

push time in 20 days

PR opened http-rs/surf

Remove default dependency on native-client

As a side effect, this allows surf to compile without default features.

NOTE: the above is not currently true because doctests depend on native-client and middleware-logger. Any suggestions on how to plumb a feature requirement into doctests?

+31 -15

0 comment

3 changed files

pr created time in 22 days

create barnchtamird/surf

branch : remove-native-client-default

created branch time in 22 days

fork tamird/surf

Surf the web – HTTP client framework

https://docs.rs/surf

fork in 22 days

push eventtamird/rust-tuf

Tamir Duberstein

commit sha a467c76caa5143e046c112bc275c44444446a739

update to hyper 0.13 and http 0.2 Change-Id: I033e7d8976bdc502f22c45bfe065cd97d95870a9

view details

push time in 22 days

push eventtamird/rust-tuf

Tamir Duberstein

commit sha 108a32dd7e0590e6ab6b5d90f44fcb4c8327aec9

update to hyper 0.13 and http 0.2 Change-Id: I033e7d8976bdc502f22c45bfe065cd97d95870a9

view details

push time in 22 days

PR opened heartsucker/rust-tuf

update to hyper 0.13 and http 0.2

@erickt

+6 -9

0 comment

2 changed files

pr created time in 23 days

push eventtamird/rust-tuf

Tamir Duberstein

commit sha 54f0d47451907c8252b2f57777d4fc64c92600db

update to hyper 0.13 and http 0.2

view details

push time in 23 days

create barnchtamird/rust-tuf

branch : hyper-0.13

created branch time in 23 days

issue closedhyperium/hyper

tokio dependency is no longer optional in 0.13.x

Dependency on h2 was added in https://github.com/hyperium/hyper/commit/c119097fd072db51751b100fa186b6f64785954d, and since h2 depends on tokio non-optionally, hyper now does too.

We'd like to upgrade hyper to 0.13.x in fuchsia, but we'd like to avoid importing tokio.

closed time in 23 days

tamird

issue commenthyperium/hyper

tokio dependency is no longer optional in 0.13.x

Understood, thanks.

tamird

comment created time in 23 days

fork tamird/rust-tuf

Rust implementation of The Update Framework (TUF)

https://crates.io/crates/tuf

fork in 23 days

fork tamird/hyper

An HTTP library for Rust

https://hyper.rs

fork in 23 days

issue commenthyperium/hyper

tokio dependency is no longer optional in 0.13.x

Maybe you mean to say that it doesn't link in the runtime, but it result in us having to vendor the code. Is that what you meant?

tamird

comment created time in 23 days

issue commenthyperium/hyper

tokio dependency is no longer optional in 0.13.x

I see that, but when I upgrade to hyper 0.13.1 I do see the tokio runtime get pulled in.

Here's the (relevant part of the) output of cargo tree.

├── hyper v0.13.1
│   ├── bytes v0.5.4
│   ├── futures-channel v0.3.1 (*)
│   ├── futures-core v0.3.1 (*)
│   ├── futures-util v0.3.1 (*)
│   ├── h2 v0.2.1
│   │   ├── bytes v0.5.4 (*)
│   │   ├── fnv v1.0.6 (*)
│   │   ├── futures-core v0.3.1 (*)
│   │   ├── futures-sink v0.3.1 (*)
│   │   ├── futures-util v0.3.1 (*)
│   │   ├── http v0.2.0
│   │   │   ├── bytes v0.5.4 (*)
│   │   │   ├── fnv v1.0.6 (*)
│   │   │   └── itoa v0.4.3 (*)
│   │   ├── indexmap v1.0.2
│   │   ├── log v0.4.8 (*)
│   │   ├── slab v0.4.2 (*)
│   │   ├── tokio v0.2.11
tamird

comment created time in 23 days

IssuesEvent

issue commentgoogle/gvisor

Implement silly window syndrome prevention on receive side

Quoting @hbhasker from another thread in which this problem was still seen:

This is most likely due to an implementation issue in netstack.go. netstack.go caches a readView and today the tcp/endpoint.go is not aware of how much data is held in the readView but not yet delivered to the user. This leads to a disconnect and can sometimes result in a situation where the read() was served out of the readView.
majek

comment created time in a month

PR opened esnet/iperf

include iperf_util.h in main.c

73b02f9 implemented daemon(3) for systems that don't have it, but the function prototype was never included in main.c where it is referenced.

@bmah888

+2 -1

0 comment

1 changed file

pr created time in a month

push eventtamird/iperf

Tamir Duberstein

commit sha e297bc4d43419fc95baaa54d05999c14df307c40

include iperf_util.h in main.c 73b02f9 implemented `daemon(3)` for systems that don't have it, but the function prototype was never included in `main.c` where it is referenced.

view details

push time in a month

fork tamird/iperf

iperf3: A TCP, UDP, and SCTP network bandwidth measurement tool

fork in a month

issue closedgoogle/gvisor

Netstack silly-window-syndrome mitigation is too restrictive

Good morning!

I'm running tuntap interface inside runsc-sandbox namespace, and slirp4netns (a userspace network stack) on the host side. Therefore all networking goes:

  • from gvisor
  • into tuntap
  • then into host slirp4netns process
  • and out of the host kernel

Setting this up is not that hard, take a look at the prepared OCI-gvisor reproducer script: https://gist.github.com/majek/bede99c29bd49060a20128ccf720af21

This setup doesn't work well in --network=sandbox mode. In --network=host mode, though, it's totally fine. For testing I'm running a simple http server on the host side, on host loopback.

In --network=host mode downloading large asset works fine:

[*] running curl
Serving HTTP on 0.0.0.0 port 8080 ...
127.0.0.1 - - [16/Dec/2019 09:26:24] "GET /file.bin HTTP/1.1" 200 -
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100 1024M  100 1024M    0     0  84.3M      0  0:00:12  0:00:12 --:--:-- 98.3M

Notice curl on --network=host, going over slirp4netns reports ~100MiB/s. Good.

Now, when we switch to netstack --network=sandbox the performance drops off the cliff:

[*] running curl
127.0.0.1 - - [16/Dec/2019 09:26:57] "GET /file.bin HTTP/1.1" 200 -
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100 16.0M  100 16.0M    0     0  1534k      0  0:00:10  0:00:10 --:--:--  334k

With speed reaching up to meager 330KiB/s. The framework is consuming no cpu. I suspect some congestion control issues or maybe just a transmitssion timeout bug in netstack.

When debugging this, I tried:

  • playing with mtu (in the test case we are using GSO)
  • playing with fdbased.PacketMMap
  • avoiding slirp4netns and using linux net stack (the problem doesn't occur)
  • avoiding netstack and using --network=host (the problem doesn't occur)

Passing "--keepalive-time 1" to curl does somehow alleviate the problem - I get ~5MiB/s rate.

I suspect the problem is that for some reason netstack gets stuck when talking to slirp implementation. As far as I can tell, slirp is behaving well, politely waiting for new packets with epoll.

The netstack though, I think gets stuck in the particular case of fast-speed connectivity with slirp. This seem to be confirmed by the fact that slowing down slirp (by stracing it) makes the problem disappear. Cheers to the heisenbugs.

Please let me know how to debug this issue, and how to handle netstack performance / transmission problems.

closed time in a month

majek

issue commentgoogle/gvisor

Netstack silly-window-syndrome mitigation is too restrictive

Fixed by #1534.

majek

comment created time in a month

issue commentgoogle/gvisor

tcpip.Address: IPv4 and IPv6 "ANY" are indistinguishable

That likely not going to be enough in all cases - you still can't tell if tcpip.Address("") is a v4 or a v6.

I would personally like to see tcpip.Address finally stop being a string and instead be either:

type Address struct {
  data [header.IPv6AddressSize]byte
  v6 bool
}

or

type Address struct {
  data [16]byte
  length uint8
}
tamird

comment created time in a month

issue openedgoogle/gvisor

tcpip.Address: IPv4 and IPv6 "ANY" are indistinguishable

Both IPv4 and IPv6 "ANY" are modeled by the empty string, which means it is impossible to tell from outside of the package tcpip's interfaces if such "ANY" addresses are IPv4 or IPv6.

This is a generalization of #1495.

created time in a month

issue commentgoogle/gvisor

tcpip.Payloader is a reimplementation of io.Reader

The readerPayload was added only 4 months ago. The trend seems to be going in the opposite direction.

https://github.com/google/gvisor/commit/7c6ab6a219f37a1d4c18ced4a602458fcf363f85#diff-82479556143e8dc38884a4daa6bc79e1R508

tamird

comment created time in a month

starteddtolnay/cxx

started time in a month

issue commentgoogle/gvisor

tcpip.Payloader is a reimplementation of io.Reader

Understood - and yet there exists a Payloader implementation that wraps an io.Reader, thus fully negating this benefit.

https://github.com/google/gvisor/blob/51f3ab85e024fcd74c49d273ce5202a207577d31/pkg/sentry/socket/netstack/netstack.go#L544-L583

tamird

comment created time in a month

issue openedgoogle/gvisor

tcpip.Payloader is a reimplementation of io.Reader

https://godoc.org/gvisor.dev/gvisor/pkg/tcpip#Payloader is roughly the same as io.Reader. We should remove that type in favor of io.Reader, which is more general and better composes with the standard library.

cc @stijlist @iangudger

created time in a month

issue commentgoogle/gvisor

netstack shouldn't respond to packets with invalid source IP addresses

A much more recent document on this attack is https://tools.ietf.org/html/rfc4987.

eyalsoha

comment created time in a month

issue commentgoogle/gvisor

netstack shouldn't respond to packets with invalid source IP addresses

The network-layer source and destination addresses are parsed here: https://github.com/google/gvisor/blob/83ab47e87badd8b46f784739903361d9f824fa2c/pkg/tcpip/stack/nic.go#L820. That's probably where we should handle this case.

eyalsoha

comment created time in a month

issue closednewren/git-filter-repo

incorrect results when filtering non-master branch

git clone https://github.com/google/gvisor -b go
cd gvisor
ls -la pkg/ilist

total 20K
drwxr-x---  2 tamird primarygroup 4.0K Oct  3 15:07 .
drwxr-x--- 38 tamird primarygroup 4.0K Oct  3 15:07 ..
-rwxr-x---  1 tamird primarygroup  819 Oct  3 15:07 ilist_state_autogen.go
-rwxr-x---  1 tamird primarygroup 4.5K Oct  3 15:07 interface_list.go

~/src/git-filter-repo/git-filter-repo --path pkg/ilist
ls -la pkg/ilist

total 40K
drwxr-x--- 2 tamird primarygroup 4.0K Oct  3 15:06 .
drwxr-x--- 3 tamird primarygroup 4.0K Oct  3 15:06 ..
-rw-r----- 1 tamird primarygroup 1.2K Oct  3 15:06 BUILD
-rwxr-x--- 1 tamird primarygroup  819 Oct  3 15:06 ilist_state_autogen.go
-rwxr-x--- 1 tamird primarygroup 4.5K Oct  3 15:06 interface_list.go
-rw-r----- 1 tamird primarygroup 5.1K Oct  3 15:06 list.go
-rw-r----- 1 tamird primarygroup 4.4K Oct  3 15:06 list_test.go

Somehow, git-filter-repo brought those files back from the dead. Note that those files exist on the master branch.

closed time in 2 months

tamird

issue commentnewren/git-filter-repo

incorrect results when filtering non-master branch

Looks good to me!

tamird

comment created time in 2 months

issue openedgoogle/gvisor

dual stack: getsockname after sendto(AF_INET, ...) returns ::1 instead of ::ffff:0:0:0:0

int fd = socket(AF_INET6, SOCK_DGRAM, 0);
struct sockaddr_in addr = {};
addr.sin_family = AF_INET;
addr.sin_addr.s_addr = htonl(INADDR_LOOPBACK);
addr.sin_port = 1337;
const char foo[] = "foo";
sendto(fd, &foo, sizeof(foo), 0, (sockaddr*)&addr, sizeof(addr));
struct sockaddr_in6 addr6 = {};
socklen_t addrlen = sizeof(addr6);
getsockname(fd, (sockaddr*)&addr6, &addrlen);
// addr6 is ::1 instead of ::ffff:0:0:0:0

This is caused by https://github.com/google/gvisor/blob/1f384ac42b9ee8b52000dc2bff79d975853519ed/pkg/sentry/socket/netstack/netstack.go#L2029-L2036 not being able to tell the difference between a socket bound to the v4 unspecified address and a socket bound to the v6 unspecified address.

created time in 2 months

issue openedgoogle/gvisor

dual stack: sendto(AF_INET, ...) fails after connect(AF_INET, ...)

int fd = socket(AF_INET6, SOCK_DGRAM, 0);
struct sockaddr_in addr = {};
addr.sin_family = AF_INET;
addr.sin_addr.s_addr = htonl(INADDR_LOOPBACK);
addr.sin_port = 1337;
connect(fd, (sockaddr*)&addr, sizeof(addr)); // succeeds
const char foo[] = "foo";
sendto(fd, &foo, sizeof(foo), 0, (sockaddr*)&addr, sizeof(addr)); // fails with EINVAL

This is caused by https://github.com/google/gvisor/blob/796f53c0befc21570b185811e26b74e71950dfc3/pkg/tcpip/transport/udp/endpoint.go#L867-L869; the connect call binds the socket to a local IPv6 address (of length 16), but the address being sent to is an AF_INET address (of length 4).

This works on Linux.

created time in 2 months

issue closedgoogle/gvisor

Calling Connect() after binding to ANY should update the bound-to address

When bound to ANY and then calling connect, the bound-to address needs to be updated to a local interface's one. Currently it stays at ANY.

closed time in 2 months

ckuiper

issue commentgoogle/gvisor

Calling Connect() after binding to ANY should update the bound-to address

@avagin fixed this in cf7f27c16793eaa41743e96488dad2ddfd1f5d59.

ckuiper

comment created time in 2 months

issue commentnewren/git-filter-repo

incorrect results when filtering non-master branch

Here's a self-contained reproduction script (note --force is needed because I'm downloading git-filter-repo into the target repository).

$ git clone https://github.com/google/gvisor -b go && cd gvisor && \
  echo before && ls && \
  curl -sfSLO https://raw.githubusercontent.com/newren/git-filter-repo/master/git-filter-repo && \
  python3 git-filter-repo --path AUTHORS --force && \
  echo after && ls
Cloning into 'gvisor'...
remote: Enumerating objects: 169, done.
remote: Counting objects: 100% (169/169), done.
remote: Compressing objects: 100% (158/158), done.
remote: Total 35908 (delta 68), reused 102 (delta 11), pack-reused 35739
Receiving objects: 100% (35908/35908), 15.26 MiB | 33.24 MiB/s, done.
Resolving deltas: 100% (26852/26852), done.
before
total 88K
drwxr-x---  5 tamird primarygroup 4.0K Dec 12 14:32 .
drwxr-xr-x 16 tamird primarygroup  40K Dec 12 14:32 ..
-rw-r-----  1 tamird primarygroup  365 Dec 12 14:32 AUTHORS
drwxr-x---  8 tamird primarygroup 4.0K Dec 12 14:32 .git
-rw-r-----  1 tamird primarygroup  838 Dec 12 14:32 go.mod
-rw-r-----  1 tamird primarygroup 2.0K Dec 12 14:32 go.sum
-rw-r-----  1 tamird primarygroup  12K Dec 12 14:32 LICENSE
drwxr-x--- 40 tamird primarygroup 4.0K Dec 12 14:32 pkg
-rw-r-----  1 tamird primarygroup  175 Dec 12 14:32 README.md
drwxr-x--- 10 tamird primarygroup 4.0K Dec 12 14:32 runsc
Parsed 2738 commits
New history written in 0.39 seconds; now repacking/cleaning...
Repacking your repo and cleaning out old unneeded objects
HEAD is now at 42bafc62 Merge release-20190806.1-356-gfe2e076 (automated)
Enumerating objects: 533, done.
Counting objects: 100% (533/533), done.
Delta compression using up to 72 threads
Compressing objects: 100% (365/365), done.
Writing objects: 100% (533/533), done.
Total 533 (delta 152), reused 375 (delta 138), pack-reused 0
Completely finished after 0.79 seconds.
after
total 232K
drwxr-x---  6 tamird primarygroup 4.0K Dec 12 14:32 .
drwxr-xr-x 16 tamird primarygroup  40K Dec 12 14:32 ..
-rw-r-----  1 tamird primarygroup  365 Dec 12 14:32 AUTHORS
drwxr-x--- 10 tamird primarygroup 4.0K Dec 12 14:32 .git
-rw-r-----  1 tamird primarygroup 155K Dec 12 14:32 git-filter-repo
-rw-r-----  1 tamird primarygroup  822 Dec 12 14:32 go.mod
drwxr-x--- 34 tamird primarygroup 4.0K Dec 12 14:32 pkg
-rw-r-----  1 tamird primarygroup  177 Dec 12 14:32 README.md
drwxr-x---  8 tamird primarygroup 4.0K Dec 12 14:32 runsc
drwxr-x---  3 tamird primarygroup 4.0K Dec 12 14:32 third_party

tamird

comment created time in 2 months

issue commentnewren/git-filter-repo

incorrect results when filtering non-master branch

@newren I can confirm @akuntsch's report - this is still an issue.

Can you please reopen this ticket?

tamird

comment created time in 2 months

delete branch tamird/gvisor

delete branch : syscall-test-fuchsia-compat

delete time in 4 months

delete branch tamird/gvisor

delete branch : master

delete time in 4 months

issue commentgoogle/gvisor

Add support for IP_TOS and IPV6_TCLASS socket options for UDP and TCP endpoints.

Fixed by bfa0bb24dd73072b3ccfe302afa89d1b5d46b927.

iyermi

comment created time in 4 months

push eventtamird/gvisor

Bhasker Hariharan

commit sha 244ade101d4b2189d2d1fee98dd2c18a16408a8f

Add TCP checksum verification. PiperOrigin-RevId: 242704699 Change-Id: I87db368ca343b3b4bf4f969b17d3aa4ce2f8bd4f

view details

Andrei Vagin

commit sha 968ea4035f06c01c6c38fcf60080bf427ffe3a3e

runsc: set UID and GID if gofer is executed in a new user namespace Otherwise, we will not have capabilities in the user namespace. And this patch adds the noexec option for mounts. https://github.com/google/gvisor/issues/145 PiperOrigin-RevId: 242706519 Change-Id: I1b78b77d6969bd18038c71616e8eb7111b71207c

view details

Li Qiang

commit sha 7d3cb59ad8d7905c6da3db8e019d3ca4db18f4ee

syscalls: sendfile: limit the count to MAX_RW_COUNT From sendfile spec and also the linux kernel code, we should limit the count arg to 'MAX_RW_COUNT'. This patch export 'MAX_RW_COUNT' in kernel pkg and use it in the implementation of sendfile syscall. Signed-off-by: Li Qiang <pangpei.lq@antfin.com> Change-Id: I1086fec0685587116984555abd22b07ac233fbd2 PiperOrigin-RevId: 242745831

view details

Michael Pratt

commit sha 32bf906ef6e4544b3805339f1a63a226b3805221

Match multi-word State From a recent test failure: "State:\tD (disk sleep)\n" "disk sleep" does not match \w+. We need to allow spaces. PiperOrigin-RevId: 242762469 Change-Id: Ic8d05a16669412a72c1e76b498373e5b22fe64c4

view details

Shiva Prasanth

commit sha 81849f83fcf73ea88b3a0d65932ecbc85f51a638

Fixed /proc/cpuinfo permissions This also applies these permissions to other static proc files. Change-Id: I4167e585fed49ad271aa4e1f1260babb3239a73d PiperOrigin-RevId: 242898575

view details

Nicolas Lacasse

commit sha b582c9cd678604c2e093b50ee502b22ce5ed0bf9

Start saving MountSource.DirentCache. DirentCache is already a savable type, and it ensures that it is empty at the point of Save. There is no reason not to save it along with the MountSource. This did uncover an issue where not all MountSources were properly flushed before Save. If a mount point has an open file and is then unmounted, we save the MountSource without flushing it first. This CL also fixes that by flushing all MountSources for all open FDs on Save. PiperOrigin-RevId: 242906637 Change-Id: I3acd9d52b6ce6b8c989f835a408016cb3e67018f

view details

Kevin Krakauer

commit sha a3fd2ed76c6e87856a319d993ff5f52a233634ed

Allow threads with CAP_SYS_RESOURCE to raise hard rlimits. PiperOrigin-RevId: 242919489 Change-Id: Ie3267b3bcd8a54b54bc16a6556369a19e843376f

view details

Yong He

commit sha 8f48b61a991691c96121a023a809193aa9b72668

DATA RACE in fs.(*Dirent).fullName add renameMu.Lock when oldParent == newParent in order to avoid data race in following report: WARNING: DATA RACE Read at 0x00c000ba2160 by goroutine 405: gvisor.googlesource.com/gvisor/pkg/sentry/fs.(*Dirent).fullName() pkg/sentry/fs/dirent.go:246 +0x6c gvisor.googlesource.com/gvisor/pkg/sentry/fs.(*Dirent).FullName() pkg/sentry/fs/dirent.go:356 +0x8b gvisor.googlesource.com/gvisor/pkg/sentry/kernel.(*FDMap).String() pkg/sentry/kernel/fd_map.go:135 +0x1e0 fmt.(*pp).handleMethods() GOROOT/src/fmt/print.go:603 +0x404 fmt.(*pp).printArg() GOROOT/src/fmt/print.go:686 +0x255 fmt.(*pp).doPrintf() GOROOT/src/fmt/print.go:1003 +0x33f fmt.Fprintf() GOROOT/src/fmt/print.go:188 +0x7f gvisor.googlesource.com/gvisor/pkg/log.(*Writer).Emit() pkg/log/log.go:121 +0x89 gvisor.googlesource.com/gvisor/pkg/log.GoogleEmitter.Emit() pkg/log/glog.go:162 +0x1acc gvisor.googlesource.com/gvisor/pkg/log.(*GoogleEmitter).Emit() <autogenerated>:1 +0xe1 gvisor.googlesource.com/gvisor/pkg/log.(*BasicLogger).Debugf() pkg/log/log.go:177 +0x111 gvisor.googlesource.com/gvisor/pkg/log.Debugf() pkg/log/log.go:235 +0x66 gvisor.googlesource.com/gvisor/pkg/sentry/kernel.(*Task).Debugf() pkg/sentry/kernel/task_log.go:48 +0xfe gvisor.googlesource.com/gvisor/pkg/sentry/kernel.(*Task).DebugDumpState() pkg/sentry/kernel/task_log.go:66 +0x11f gvisor.googlesource.com/gvisor/pkg/sentry/kernel.(*runApp).execute() pkg/sentry/kernel/task_run.go:272 +0xc80 gvisor.googlesource.com/gvisor/pkg/sentry/kernel.(*Task).run() pkg/sentry/kernel/task_run.go:91 +0x24b Previous write at 0x00c000ba2160 by goroutine 423: gvisor.googlesource.com/gvisor/pkg/sentry/fs.Rename() pkg/sentry/fs/dirent.go:1628 +0x61f gvisor.googlesource.com/gvisor/pkg/sentry/syscalls/linux.renameAt.func1.1() pkg/sentry/syscalls/linux/sys_file.go:1864 +0x1f8 gvisor.googlesource.com/gvisor/pkg/sentry/syscalls/linux.fileOpAt( gvisor.googlesource.com/g/linux/sys_file.go:51 +0x20f gvisor.googlesource.com/gvisor/pkg/sentry/syscalls/linux.renameAt.func1() pkg/sentry/syscalls/linux/sys_file.go:1852 +0x218 gvisor.googlesource.com/gvisor/pkg/sentry/syscalls/linux.fileOpAt() pkg/sentry/syscalls/linux/sys_file.go:51 +0x20f gvisor.googlesource.com/gvisor/pkg/sentry/syscalls/linux.renameAt() pkg/sentry/syscalls/linux/sys_file.go:1840 +0x180 gvisor.googlesource.com/gvisor/pkg/sentry/syscalls/linux.Rename() pkg/sentry/syscalls/linux/sys_file.go:1873 +0x60 gvisor.googlesource.com/gvisor/pkg/sentry/kernel.(*Task).executeSyscall() pkg/sentry/kernel/task_syscall.go:165 +0x17a gvisor.googlesource.com/gvisor/pkg/sentry/kernel.(*Task).doSyscallInvoke() pkg/sentry/kernel/task_syscall.go:283 +0xb4 gvisor.googlesource.com/gvisor/pkg/sentry/kernel.(*Task).doSyscallEnter() pkg/sentry/kernel/task_syscall.go:244 +0x10c gvisor.googlesource.com/gvisor/pkg/sentry/kernel.(*Task).doSyscall() pkg/sentry/kernel/task_syscall.go:219 +0x1e3 gvisor.googlesource.com/gvisor/pkg/sentry/kernel.(*runApp).execute() pkg/sentry/kernel/task_run.go:215 +0x15a9 gvisor.googlesource.com/gvisor/pkg/sentry/kernel.(*Task).run() pkg/sentry/kernel/task_run.go:91 +0x24b Reported-by: syzbot+e1babbf756fab380dfff@syzkaller.appspotmail.com Change-Id: Icd2620bb3ea28b817bf0672d454a22b9d8ee189a PiperOrigin-RevId: 242938741

view details

Kevin Krakauer

commit sha add842ef192dbcba913da6fd2bfa177027869244

rlimits test: don't exceed nr_open. Even superuser cannot raise RLIMIT_NOFILE above /proc/sys/fs/nr_open, so start the test by lowering the limits before raising. Change-Id: Ied6021c64178a6cb9098088a1a3384db523a226f PiperOrigin-RevId: 242965249

view details

Nicolas Lacasse

commit sha bc983faf02d547242701407a83ce4303a06b93da

Fix uses of RootFromContext. RootFromContext can return a dirent with reference taken, or nil. We must call DecRef if (and only if) a real dirent is returned. PiperOrigin-RevId: 242965515 Change-Id: Ie2b7b4cb19ee09b6ccf788b71f3fd7efcdf35a11

view details

Michael Pratt

commit sha d1a70dfb8648f0d3443361de8749a7e9f3b9eb18

Internal change PiperOrigin-RevId: 242978508 Change-Id: I0ea59ac5ba1dd499e87c53f2e24709371048679b

view details

Jamie Liu

commit sha 94e7809eb310228832dfb7e3f5a6320aedf23e35

Use open fids when fstat()ing gofer files. PiperOrigin-RevId: 243018347 Change-Id: I1e5b80607c1df0747482abea61db7fcf24536d37

view details

Adin Scannell

commit sha 0eaa6eece05829f52786c56cffc2ffcab3ae9070

README: add build badge Change-Id: Ie6b73ac729c8c85b1229e09da5b113be9780fa95 PiperOrigin-RevId: 243131814

view details

Adin Scannell

commit sha 8cbb88073717fc12ef35b408325acf49fef2f281

CONTRIBUTING: add style guide pointer Change-Id: I93a78a6b2bb2eaa69046c6cfecee2e4cfcf20e44 PiperOrigin-RevId: 243140359

view details

Michael Pratt

commit sha 6884784fe759001681070c8dc037508edd0344f2

Format FDs in strace logs Normal files display their path in the current mount namespace: I0410 10:57:54.964196 216336 x:0] [ 1] ls X read(0x3 /proc/filesystems, 0x55cee3bdb2c0 "nodev\t9p\nnodev\tdevpts \nnodev\tdevtmpfs\nnodev\tproc\nnodev\tramdiskfs\nnodev\tsysfs\nnodev\ttmpfs\n", 0x1000) = 0x58 (24.462?s) AT_FDCWD includes the CWD: I0411 12:58:48.278427 1526 x:0] [ 1] stat_test E newfstatat(AT_FDCWD /home/prattmic, 0x55ea719b564e /proc/self, 0x7ef5cefc2be8, 0x0) Sockets (and other non-vfs files) display an inode number (like /proc/PID/fd): I0410 10:54:38.909123 207684 x:0] [ 1] nc E bind(0x3 socket:[1], 0x55b5a1652040 {Family: AF_INET, Addr: , Port: 8080}, 0x10) I also fixed a few syscall args that should be Path. PiperOrigin-RevId: 243169025 Change-Id: Ic7dda6a82ae27062fe2a4a371557acfd6a21fa2a

view details

Fabricio Voznika

commit sha b7f20b88f85e8e936fe3df0ddcab3970591c84f4

Add 'runsc do' command It provides an easy way to run commands to quickly test gVisor. By default it maps the host root as the container root with a writable overlay on top (so the host root is not modified). Example: sudo runsc do ls -lh --color sudo runsc do ~/src/test/my-test.sh PiperOrigin-RevId: 243178711 Change-Id: I05f3d6ce253fe4b5f1362f4a07b5387f6ddb5dd9

view details

Lantao Liu

commit sha 45aff724d07ee5b1235b8844742a85b62d758b72

Fix gvisor-containerd-shim download in the test. The file layout in the bucket is changed a little bit recently to support both v1 shim and v2 shim. PiperOrigin-RevId: 243682904 Change-Id: Ic1373c6dc088ef41f829e7ce3ea3762e1e2b0292

view details

Fabricio Voznika

commit sha 6b36c97264e08f9486d49f90842b69c2a7a34cdc

Return error from fdbased.New RELNOTES: n/a PiperOrigin-RevId: 244031742 Change-Id: Id0cdb73194018fb5979e67b58510ead19b5a2b81

view details

Googler

commit sha 638bbf399fa6f7c1a2bab1eee6286368af7b7c0f

Internal change. PiperOrigin-RevId: 244036529 Change-Id: I280f9632a65d2e40d844e0d5ec3a101d808434ee

view details

Michael Pratt

commit sha d7c6a8e46952328a726282a15d522c1d0394c7f8

Convert poll/select to operate more directly on linux.PollFD Current, doPoll copies the user struct pollfd array into a []syscalls.PollFD, which contains internal kdefs.FD and waiter.EventMask types. While these are currently binary-compatible with the Linux versions, we generally discourage copying directly to internal types (someone may inadvertantly change kdefs.FD to uint64). Instead, copy directly to a []linux.PollFD, which will certainly be binary compatible. Most of syscalls/polling.go is included directly into syscalls/linux/sys_poll.go, as it can then operate directly on linux.PollFD. The additional syscalls.PollFD type is providing little value. I've also added explicit conversion functions for waiter.EventMask, which creates the possibility of a different binary format. PiperOrigin-RevId: 244042947 Change-Id: I24e5b642002a32b3afb95a9dcb80d4acd1288abf

view details

push time in 4 months

issue commentnewren/git-filter-repo

incorrect results when filtering non-master branch

Any luck digging into this?

tamird

comment created time in 4 months

issue openedrust-lang/rust

feature request: test binaries should support repeating runs

The ability to repeat tests in-process is useful when attempting to reproduce flaky test failures. Go's testing package has the -count flag (https://golang.org/cmd/go/#hdr-Testing_flags), googletest has --gtest_repeat (https://github.com/google/googletest/blob/master/googletest/docs/advanced.md#repeating-the-tests), but rust doesn't seem to have anything.

In a limited test, I ran a test binary 100 times with a filter that excluded all test cases, and that took over 15 seconds. It'd be nice to avoid that overhead.

cc @tmandry

created time in 4 months

pull request commentflutter/engine

[flutter_runner] Make sure that SocketBase::ListInterfaces works

Can we run this test in the appropriate context such that a call to Initialize isn't necessary? Because that was the bug here.

iskakaushik

comment created time in 4 months

create barnchtamird/gvisor

branch : go-netstack

created branch time in 5 months

issue openednewren/git-filter-repo

incorrect results when filtering non-master branch

git clone https://github.com/google/gvisor -b go
cd gvisor
ls -la pkg/ilist

total 20K
drwxr-x---  2 tamird primarygroup 4.0K Oct  3 15:07 .
drwxr-x--- 38 tamird primarygroup 4.0K Oct  3 15:07 ..
-rwxr-x---  1 tamird primarygroup  819 Oct  3 15:07 ilist_state_autogen.go
-rwxr-x---  1 tamird primarygroup 4.5K Oct  3 15:07 interface_list.go

~/src/git-filter-repo/git-filter-repo --paths-from-file pkg/ilist
ls -la pkg/ilist

total 40K
drwxr-x--- 2 tamird primarygroup 4.0K Oct  3 15:06 .
drwxr-x--- 3 tamird primarygroup 4.0K Oct  3 15:06 ..
-rw-r----- 1 tamird primarygroup 1.2K Oct  3 15:06 BUILD
-rwxr-x--- 1 tamird primarygroup  819 Oct  3 15:06 ilist_state_autogen.go
-rwxr-x--- 1 tamird primarygroup 4.5K Oct  3 15:06 interface_list.go
-rw-r----- 1 tamird primarygroup 5.1K Oct  3 15:06 list.go
-rw-r----- 1 tamird primarygroup 4.4K Oct  3 15:06 list_test.go

Somehow, git-filter-repo brought those files back from the dead. Note that those files exist on the master branch.

created time in 5 months

issue openedrust-lang-nursery/net2-rs

support TCP_KEEP{CNT,INTVL} on Linux

The support for keepalive is pretty limited right now. I'm looking to write a test that wants to trigger connection closure in response to unacked timeouts, and without being able to set these, it's impossible for that test to complete in a reasonable amount of time.

created time in 5 months

issue openedgoogle/gvisor

ARP timeout during connect() returns different error code that on linux.

This test describes the problem:

TEST(ExternalNetworkTest, ConnectToRoutableNonexistentINET) {
  int fd;
  ASSERT_GE(fd = socket(AF_INET, SOCK_STREAM, 0), 0) << strerror(errno);

  struct sockaddr_in addr = {};
  addr.sin_family = AF_INET;
  // Connect to a routable address to a non-existing remote. This triggers ARP resolution which is
  // expected to fail.
  addr.sin_addr.s_addr = htonl(0xd0e0a0d);
  addr.sin_port = htons(1337);

  EXPECT_EQ(connect(fd, reinterpret_cast<struct sockaddr*>(&addr), sizeof(addr)), -1);
#if defined(__linux__)
  EXPECT_EQ(errno, ETIMEDOUT) << strerror(errno);
#else
  EXPECT_EQ(errno, EHOSTDOWN) << strerror(errno);
#endif

  EXPECT_EQ(close(fd), 0) << strerror(errno);
}

@hbhasker cc @iyermi

created time in 5 months

pull request commentflutter/engine

[fuchsia] add fuchsia.netstack.Netstack

Can someone merge this? Or give me a commit bit so that I can merge it?

tamird

comment created time in 5 months

PR opened flutter/engine

[fuchsia] add fuchsia.netstack.Netstack

Needed in preparation for https://dart-review.googlesource.com/c/sdk/+/117620.

Test: git grep -l -E '(socket.Provider|NameLookup)' |
xargs grep -L fuchsia.netstack.Netstack

@chinmaygarde @zanderso

+16 -8

0 comment

8 changed files

pr created time in 5 months

create barnchtamird/engine

branch : add-netstack

created branch time in 5 months

fork tamird/engine

The Flutter engine

https://flutter.dev

fork in 5 months

more