Live data from Hacker News

We improved the performance of a userspace TCP stack in Go

coder.com

131–133 of 133 posts

Re: We improved the performance of a userspace TCP stack in Go

#131
post #66

Earlier quoted context omitted.

You can have multiple layers of security boundary on most of the customer-exposed surface area, and avoid more risky surface areas in the kernel. Portable is a bit of a weird word here because for many of us with gray beards the word means architectures, kernels and systems, but I think in this context it tends to more mean "can run just as easily on my macbook as in a cloud container", but in practice the software i…

> You can have multiple layers of security boundary on most of the customer-exposed surface area, and avoid more risky surface areas in the kernel. I fail to see what "risky surface areas" in the kernel you're avoiding. You have more packets going through the kernel network stack(since you're wrapping a TCP connecting in a UDP connection that goes through the kernel) than just using the TCP stack in the kernel. Are y…

> I fail to see what "risky surface areas" in the kernel you're avoiding. You have more packets going through the kernel network stack(since you're wrapping a TCP connecting in a UDP connection that goes through the kernel) than just using the TCP stack in the kernel. Are you saying that the TCP stack in the kernel cannot be trusted, but a userspace kernel you maintain can(that's a bit ridiculous...)

There's a constant stream of bugs in kernel network and IO interfaces, many of which require direct local interaction for exploitation, and aren't remotely attackable. Don't assume, spend a few hours and have a read through some.

> Any POSIX C code that listens on non-privileged ports will run on machines with the correct glibc version(and you can statically compile the glibc or not need it like go does). This includes linux and macOS(and if you're using a library that's on multiple OSes you get even more support without having to implement TCP in userspace).

That doesn't get anywhere near the use case here which is: run third party user supplied code unmodified.

> I don't think you understand. You're still at the mercy of the kernel for security patches to the UDP stack, you're just now also having to maintain a TCP stack in parallel.

The surface is not "UDP" and "TCP", this view is a huge distortion. As I suggested above, have a read through some of the relevant bugs over the last two years, and consider their implications in the relevant use case: running unmodified third party user code on a system.

> Wouldn't an alternative approach just be to use cross-platform libraries and non-privileged ports?

No, again, that doesn't meet the use case: run unmodified third party user code on the system.

> You just said the opposite... how can more things requiring security fixes be a bad thing, while you arbitrarily want more layers between you and the most security tested code for networking available to you.

Your characterization of Linux further suggests the exercise above would be a great experience.

Re: We improved the performance of a userspace TCP stack in Go

#132

Earlier quoted context omitted.

VMs are free and can be run by any semi-competent developer wanting to host a test server on their development machine. Postgres and Redis can use non-privileged ports, so I don't understand why this would matter.

"Just use a VM" instead of running a Unix command that drives a UDP socket is... a take.

imo a bit milder of a take than "just maintain a second TCP stack instead of hosting on a non-privileged port".

Also are we just ignoring that you pretended VMs were expensive to run? Most of your responses sound devoid of a lot of fundamental computer knowledge(networking and otherwise).

Re: We improved the performance of a userspace TCP stack in Go

#133

Earlier quoted context omitted.

Doesn't this program need to bind a UDP port on your machine? If policies prevent you binding ports I don't see how you'd be able to use this software...

I have no idea what you're talking about. We're talking about essentially fictitious IP addresses on synthetic machines. I think everyone's talking past each other here.

I don't really think people are talking past eachother, I think we're all trying to understand the point of this, and the article(and marketing on the website) doesn't make it clear at all.

Some potential options for "what is it for" come up, and others bring up reasons why they don't make sense.

It seems this is a solution to a very specific problem that nobody seems to have, which is why when people are trying to figure out what problem it solves they're coming up with 10 better solutions.

Post reply on HN