# Marek Majkowski

Published articles for Marek Majkowski.

This is one page of public article previews, not the complete archive. Follow Next page to continue. Summaries are not the original full articles.

## Orange FTTH and IPv6 - part two

DevFeed: [Orange FTTH and IPv6 - part two](<https://devfeed.tech/articles/orange-ftth-and-ipv6-part-two-38997.md>)

Original publisher: [Read original article](<https://idea.popcount.org/2023-04-01-orange-ftth-and-ipv6---part-two>)

Author: Marek

Published: 2023-03-31T22:00:00Z

Content type: tutorial

Language: en

Sources: [Marek Majkowski](<https://devfeed.tech/sources/marek-majkowski.md>)

Topics: [Linux](<https://devfeed.tech/topics/linux.md>), [Debian](<https://devfeed.tech/topics/debian.md>)

Tags: [debian](<https://devfeed.tech/tags/debian.md>), [guide](<https://devfeed.tech/tags/guide.md>), [ipv6](<https://devfeed.tech/tags/ipv6.md>), [linux](<https://devfeed.tech/tags/linux.md>), [pppoe](<https://devfeed.tech/tags/pppoe.md>), [router](<https://devfeed.tech/tags/router.md>)

### AI overview

A follow-up guide explains how to configure a custom Linux router for Orange FTTH with both IPv6 and IPv4. It describes why using two PPPoE sessions no longer works and presents the Funbox-compatible approach using an IPv6 PPPoE session and an IPIP DS-Lite tunnel.

### Source excerpt

Orange FTTH and IPv6 - part two Three years ago I published a guide on how to configure a custom Linux router to work with Orange FTTH setup: The most important part was getting IPv6 working, since it wasn't possible with the "Funbox" router supplied by the carrier. This seem to have been fixed. In past when using "Funbox", and when setting the PPPoE username suffix to "/ipv6" to enable IPv6, the suffix was automatically dropped every ~24h, and reverted to IPv4-only.

## Diagnosing VR stutter with an eGPU on a laptop

DevFeed: [Diagnosing VR stutter with an eGPU on a laptop](<https://devfeed.tech/articles/egpu-stutter-from-hell-38996.md>)

Original publisher: [Read original article](<https://idea.popcount.org/2022-09-05-egpu-stutter-from-hell>)

Author: Marek

Published: 2022-09-04T22:00:00Z

Content type: opinion

Language: en

Sources: [Marek Majkowski](<https://devfeed.tech/sources/marek-majkowski.md>)

Topics: [GPU](<https://devfeed.tech/topics/gpu.md>), [Nvidia](<https://devfeed.tech/topics/nvidia.md>), [pcie](<https://devfeed.tech/topics/pcie.md>), [webgpu](<https://devfeed.tech/topics/webgpu.md>), [Windows](<https://devfeed.tech/topics/windows.md>), [debugging](<https://devfeed.tech/topics/debugging.md>)

Tags: [debugging](<https://devfeed.tech/tags/debugging.md>), [gpu](<https://devfeed.tech/tags/gpu.md>), [graphics](<https://devfeed.tech/tags/graphics.md>), [laptop](<https://devfeed.tech/tags/laptop.md>), [nvidia](<https://devfeed.tech/tags/nvidia.md>), [pcie](<https://devfeed.tech/tags/pcie.md>), [performance](<https://devfeed.tech/tags/performance.md>), [thunderbolt](<https://devfeed.tech/tags/thunderbolt.md>), [windows](<https://devfeed.tech/tags/windows.md>)

### AI overview

A laptop-based eGPU setup with an Nvidia 3080 caused severe stuttering in HTC Vive VR games despite the GPU functioning correctly. The article attributes the issue, with uncertainty, to Nvidia Optimus polling the laptop's other graphics hardware and interfering with smooth eGPU rendering.

### Source excerpt

eGPU stutter from hell I was able to put my hands on an HTC Vive VR headset. Sadly, my computers don't have a strong enough GPU for VR. Since I only have laptops I decided to secure an eGPU (external GPU) - a box with PCIe bus, connected over thunderbolt, which can house a proper big graphics card. I got Razer Core X.

## Orange FTTH on a custom router

DevFeed: [Orange FTTH on a custom router](<https://devfeed.tech/articles/orange-ftth-on-a-custom-router-38994.md>)

Original publisher: [Read original article](<https://idea.popcount.org/2020-08-02-orange-ftth-on-a-custom-router>)

Author: Marek

Published: 2020-08-01T22:00:00Z

Content type: tutorial

Language: en

Sources: [Marek Majkowski](<https://devfeed.tech/sources/marek-majkowski.md>)

Topics: [gateway](<https://devfeed.tech/topics/gateway.md>)

Tags: [cgnat](<https://devfeed.tech/tags/cgnat.md>), [debian](<https://devfeed.tech/tags/debian.md>), [dhcp](<https://devfeed.tech/tags/dhcp.md>), [firewall](<https://devfeed.tech/tags/firewall.md>), [ftth](<https://devfeed.tech/tags/ftth.md>), [ipv6](<https://devfeed.tech/tags/ipv6.md>), [router](<https://devfeed.tech/tags/router.md>)

### AI overview

The excerpt gives a Debian 10 configuration for replacing Orange Poland's FunBox 3.0: request an ONT installation and PPPoE credentials, tag internet traffic on VLAN 35, configure PPPoE, firewalling, and dnsmasq for IPv4, then use a separate PPPoE session with the `/ipv6` username suffix and wide-dhcpv6 for delegated IPv6. It contrasts this with Orange's single IPv6 PPPoE session using DS-Lite for IPv4, which the author says has CGNAT, double-NAT, and MTU tradeoffs and does not provide a public IPv4 address. A forum report that two sessions may be blocked after five days is explicitly unconfirmed. The author advises most customers to keep the FunBox, which supports TV and VoIP; the excerpt ends before completing the single-session setup.

### Source excerpt

Orange FTTH on a custom router Here in Poland, Orange has a decent FTTH offer - less than $16 for 300Mbit down, 50Mbit up. People reversed it over the years, most impressively Pierre Kim in 2016: Recently, it has been possible to replace the router the provider gives, called "FunBox 3.0", with a custom one. There are couple of reasons for that: - My understanding it's impossible to get a stable IPv6 on FunBox 3. - FunBox is proprietary and evil.

## Why is there a "V" in SIGSEGV Segmentation Fault?

DevFeed: [Why is there a "V" in SIGSEGV Segmentation Fault?](<https://devfeed.tech/articles/why-is-there-a-v-in-sigsegv-segmentation-fault-38993.md>)

Original publisher: [Read original article](<https://idea.popcount.org/2020-06-18-why-is-there-a-v-in-sigsegv-segmentation-fault>)

Author: Marek

Published: 2020-06-17T22:00:00Z

Content type: article

Language: en

Sources: [Marek Majkowski](<https://devfeed.tech/sources/marek-majkowski.md>)

Topics: [bug](<https://devfeed.tech/topics/bug.md>), [Process](<https://devfeed.tech/topics/process.md>), [Test-driven development](<https://devfeed.tech/topics/tdd.md>)

Tags: [article](<https://devfeed.tech/tags/article.md>), [blog](<https://devfeed.tech/tags/blog.md>), [books](<https://devfeed.tech/tags/books.md>), [bsd](<https://devfeed.tech/tags/bsd.md>), [c](<https://devfeed.tech/tags/c.md>), [clang](<https://devfeed.tech/tags/clang.md>), [cloudflare](<https://devfeed.tech/tags/cloudflare.md>), [code](<https://devfeed.tech/tags/code.md>), [computers](<https://devfeed.tech/tags/computers.md>), [core](<https://devfeed.tech/tags/core.md>), [crash](<https://devfeed.tech/tags/crash.md>), [data](<https://devfeed.tech/tags/data.md>), [documentation](<https://devfeed.tech/tags/documentation.md>), [error](<https://devfeed.tech/tags/error.md>), [file](<https://devfeed.tech/tags/file.md>), [history](<https://devfeed.tech/tags/history.md>), [intel](<https://devfeed.tech/tags/intel.md>), [internals](<https://devfeed.tech/tags/internals.md>), [program](<https://devfeed.tech/tags/program.md>), [signal](<https://devfeed.tech/tags/signal.md>)

### AI overview

SIGSEGV's "V" stands for "Violation," not "Vault." The article traces the name to "segmentation violation": early UNIX documentation called signal 11 SIGSEG, userspace changed it to SIGSEGV by Research V7, and the kernel adopted SIGSEGV later, around 1980. It links the wording to memory segmentation limits and a processor fault later associated with paging. The author also demonstrates catching SIGSEGV on Linux with sigaction and modifying the saved instruction pointer in ucontext to skip a faulting instruction; this is presented as a specific experiment, not a general guarantee that a program cannot crash.

### Source excerpt

Why is there a "V" in SIGSEGV Segmentation Fault? This article is also co-published on Cloudflare blog: Another long night. I was working on my perfect, bug-free program in C, when the predictable thing happened: Oh, well... Maybe I'll be more lucky taking over the world another night. But then it struck me. My program received a SIGSEGV signal and crashed with "Segmentation Fault" message. Where does the "V" come from? Did I read it wrong? Was there a "Segmentation Vault?"?

## Addressing

DevFeed: [Addressing](<https://devfeed.tech/articles/addressing-38990.md>)

Original publisher: [Read original article](<https://idea.popcount.org/2019-12-06-addressing>)

Author: Marek

Published: 2019-12-05T23:00:00Z

Content type: article

Language: en

Sources: [Marek Majkowski](<https://devfeed.tech/sources/marek-majkowski.md>)

Topics: [Domain Name System (DNS)](<https://devfeed.tech/topics/dns-resolution-process.md>), [Internet](<https://devfeed.tech/topics/internet.md>), [CIDR and subnets](<https://devfeed.tech/topics/cidr-and-subnets.md>)

Tags: [articles](<https://devfeed.tech/tags/articles.md>), [connect](<https://devfeed.tech/tags/connect.md>), [created](<https://devfeed.tech/tags/created.md>), [dance](<https://devfeed.tech/tags/dance.md>), [data](<https://devfeed.tech/tags/data.md>), [discuss](<https://devfeed.tech/tags/discuss.md>), [either](<https://devfeed.tech/tags/either.md>), [isn-t](<https://devfeed.tech/tags/isn-t.md>), [linux](<https://devfeed.tech/tags/linux.md>), [need](<https://devfeed.tech/tags/need.md>), [others](<https://devfeed.tech/tags/others.md>), [parameter](<https://devfeed.tech/tags/parameter.md>), [peer](<https://devfeed.tech/tags/peer.md>), [remote](<https://devfeed.tech/tags/remote.md>), [series](<https://devfeed.tech/tags/series.md>), [socket](<https://devfeed.tech/tags/socket.md>), [sockets](<https://devfeed.tech/tags/sockets.md>), [syscall](<https://devfeed.tech/tags/syscall.md>), [take](<https://devfeed.tech/tags/take.md>), [this](<https://devfeed.tech/tags/this.md>)

### AI overview

Socket addresses passed to `bind()` and `connect()` use family-specific structures: `sockaddr_in`, `sockaddr_in6`, or `sockaddr_un`; use `sockaddr_storage` when the family is unknown. For IP text, `inet_pton()` strictly parses standard IPv4 and IPv6 forms, unlike permissive `inet_aton()`, while `inet_ntop()` converts addresses back to text. The article explains IPv6 formatting and cautions that filtering reserved addresses requires considering whole ranges and mapped forms. It describes glibc `getaddrinfo()` resolution through NSS and system configuration, noting that ordering varies by libc and client resolver; Happy Eyeballs interleaves IPv4 and IPv6 attempts with delays and concurrent connections to reduce latency and support dual-stack use. Unix sockets may use filesystem paths, Linux abstract names, autobind names, or no name. Path sockets have filesystem permissions and require care when replacing existing paths; abstract sockets disappear when closed but lack permissions and are Linux-specific. The article is provided as full text.

### Source excerpt

Addressing Articles from this series: - Creating sockets on Linux. - Addressing of AF_INET, AF_INET6 and AF_UNIX sockets. A freshly created socket isn't very useful. We have to tell it to either listen for incoming data, or connect to a remote peer. To achieve anything useful we need to perform a syscall dance, which involves either or or both. Among others, and syscalls take a socket address as a parameter. Before going into these syscalls we must discuss what exactly the address is.

## TCP Puzzles 1-2

DevFeed: [TCP Puzzles 1-2](<https://devfeed.tech/articles/tcp-puzzles-1-2-38988.md>)

Original publisher: [Read original article](<https://idea.popcount.org/2019-09-30-tcp-puzzles-1-2>)

Author: Marek

Published: 2019-09-29T22:00:00Z

Content type: article

Language: en

Sources: [Marek Majkowski](<https://devfeed.tech/sources/marek-majkowski.md>)

Topics: [TCP/IP](<https://devfeed.tech/topics/tcp-ip.md>), [Network](<https://devfeed.tech/topics/network.md>), [Python](<https://devfeed.tech/topics/python.md>)

Tags: [buffer](<https://devfeed.tech/tags/buffer.md>), [client](<https://devfeed.tech/tags/client.md>), [implementation](<https://devfeed.tech/tags/implementation.md>), [linux](<https://devfeed.tech/tags/linux.md>), [networking](<https://devfeed.tech/tags/networking.md>), [poll](<https://devfeed.tech/tags/poll.md>), [puzzles](<https://devfeed.tech/tags/puzzles.md>), [python](<https://devfeed.tech/tags/python.md>), [send](<https://devfeed.tech/tags/send.md>), [server](<https://devfeed.tech/tags/server.md>), [stack](<https://devfeed.tech/tags/stack.md>), [tcp](<https://devfeed.tech/tags/tcp.md>)

### AI overview

The excerpt presents two Linux TCP puzzles without giving their solutions. In the first, a nonblocking sender fills the write buffer by calling `send()` until it blocks, then compares that with sending only while `poll(POLLOUT)` reports readiness. In the second, two loopback connection tests differ only in whether the client or accepted server socket is closed first; the reordered version can hang. The text asks how readiness, close order, TIME-WAIT, `tcp_tw_reuse`, and `tcp_max_tw_buckets` relate. It reports that the latter script's behavior varies with the bucket limit, but does not explain the mechanisms.

### Source excerpt

TCP Puzzles 1-2 Recently I've been spending more time looking into Linux TCP implementation, trying to better understand some corner cases. Here are two TCP puzzles. Using obvious, almost trivial, Python snippets, we can show really important design choices made deep in the networking stack. All we need is a bit of time... and courage to go into the Linux internals! 1. Write buffer vs POLLOUT Imagine a TCP server and a client connected to it. The server has plenty of data available.

## When TCP sockets refuse to die

DevFeed: [When TCP sockets refuse to die](<https://devfeed.tech/articles/when-tcp-sockets-refuse-to-die-38987.md>)

Original publisher: [Read original article](<https://idea.popcount.org/2019-09-20-when-tcp-sockets-refuse-to-die>)

Author: Marek

Published: 2019-09-19T22:00:00Z

Content type: article

Language: en

Sources: [Marek Majkowski](<https://devfeed.tech/sources/marek-majkowski.md>)

Topics: [TCP/IP](<https://devfeed.tech/topics/tcp-ip.md>)

Tags: [cloudflare](<https://devfeed.tech/tags/cloudflare.md>), [sockets](<https://devfeed.tech/tags/sockets.md>), [tcp](<https://devfeed.tech/tags/tcp.md>)

### AI overview

Linux TCP sockets time out differently depending on their state, and enabling SO_KEEPALIVE alone does not reliably bound a connection's lifetime. SYN-SENT and SYN-RECV use configurable retry limits; idle ESTABLISHED sockets need keepalives to detect an unreachable peer, while sockets with unacknowledged data or a zero receive window use retransmission or persist timers and ignore keepalive settings. TCP_USER_TIMEOUT can bound several of these cases, but it changes keepalive behavior: when set too high, it can override TCP_KEEPCNT, so the article recommends setting it slightly below TCP_KEEPIDLE + TCP_KEEPINTVL x TCP_KEEPCNT. For slow transfers, it also recommends checking whether unsent data drains at the desired rate, using TCP_INFO's tcpi_notsent_bytes. The examples are Linux-specific, and the SYN-SENT user-timeout behavior shown on kernel 5.2 appears anomalous.

### Source excerpt

When TCP sockets refuse to die This article was first published on Cloudflare blog: While working on our Spectrum server, we noticed something weird: the TCP sockets which we thought should have been closed were lingering around. We realized we don't really understand when TCP sockets are supposed to time out! In our code, we wanted to make sure we don't hold connections to dead hosts. In our early code we naively thought enabling TCP keepalives would be enough... but it isn't.

## A gentle introduction to Linux Kernel fuzzing

DevFeed: [A gentle introduction to Linux Kernel fuzzing](<https://devfeed.tech/articles/a-gentle-introduction-to-linux-kernel-fuzzing-38986.md>)

Original publisher: [Read original article](<https://idea.popcount.org/2019-07-10-a-gentle-introduction-to-linux-kernel-fuzzing>)

Author: Marek

Published: 2019-07-09T22:00:00Z

Content type: tutorial

Language: en

Sources: [Marek Majkowski](<https://devfeed.tech/sources/marek-majkowski.md>)

Topics: [Fuzzing/Fuzz testing](<https://devfeed.tech/topics/fuzzing.md>), [Linux Kernel](<https://devfeed.tech/topics/linux-kernel.md>), [Instrumentation](<https://devfeed.tech/topics/instrumentation.md>), [Linux](<https://devfeed.tech/topics/linux.md>), [Software Testing](<https://devfeed.tech/topics/software-testing.md>), [Memory Safety](<https://devfeed.tech/topics/memory-safety.md>), [Network](<https://devfeed.tech/topics/network.md>)

Tags: [afl](<https://devfeed.tech/tags/afl.md>), [algorithm](<https://devfeed.tech/tags/algorithm.md>), [article](<https://devfeed.tech/tags/article.md>), [basic](<https://devfeed.tech/tags/basic.md>), [blog](<https://devfeed.tech/tags/blog.md>), [bugs](<https://devfeed.tech/tags/bugs.md>), [c](<https://devfeed.tech/tags/c.md>), [c-plus-plus](<https://devfeed.tech/tags/c-plus-plus.md>), [cloudflare](<https://devfeed.tech/tags/cloudflare.md>), [code-coverage](<https://devfeed.tech/tags/code-coverage.md>), [coverage](<https://devfeed.tech/tags/coverage.md>), [fuzzing](<https://devfeed.tech/tags/fuzzing.md>), [introduction](<https://devfeed.tech/tags/introduction.md>), [kernel](<https://devfeed.tech/tags/kernel.md>), [linux](<https://devfeed.tech/tags/linux.md>), [linux-kernel](<https://devfeed.tech/tags/linux-kernel.md>), [memory](<https://devfeed.tech/tags/memory.md>), [memory-corruption](<https://devfeed.tech/tags/memory-corruption.md>), [testing](<https://devfeed.tech/tags/testing.md>), [trigger](<https://devfeed.tech/tags/trigger.md>)

### AI overview

The article gives a tutorial for fuzzing Linux kernel netlink code with AFL inside a KVM virtual machine. Since AFL normally needs instrumented userspace code, the tutorial builds a shim that reads AFL inputs, sends them through netlink, collects kernel coverage from KCOV, and maps instruction addresses into AFL's shared coverage map. It recommends selectively enabling KCOV for the network code, enabling KASAN to improve memory-corruption detection, and using virtme to run the custom kernel. The example starts with a single "hello world" corpus seed; after a day or two, this basic setup found a netlink neighbor-timer bug. The author contrasts native fuzzing, which can crash the host, and UML, which lacks KASAN, with KVM's isolation. The tutorial omits several implementation details and says the tests are not stable after a crash; better corpus design and tuning could improve results.

### Source excerpt

A gentle introduction to Linux Kernel fuzzing This article was first published on Cloudflare blog: For some time I've wanted to play with coverage-guided fuzzing. Fuzzing is a powerful testing technique where an automated program feeds semi-random inputs to a tested program. The intention is to find such inputs that trigger bugs. Fuzzing is especially useful in finding memory corruption bugs in C or C++ programs.

## mmproxy - creative linux routing hack

DevFeed: [mmproxy - creative linux routing hack](<https://devfeed.tech/articles/mmproxy-creative-linux-routing-hack-38976.md>)

Original publisher: [Read original article](<https://idea.popcount.org/2018-04-17-mmproxy---creative-linux-routing-hack>)

Author: Marek

Published: 2018-04-16T22:00:00Z

Content type: article

Language: en

Sources: [Marek Majkowski](<https://devfeed.tech/sources/marek-majkowski.md>)

Topics: [IP routing](<https://devfeed.tech/topics/ip-routing.md>), [Linux](<https://devfeed.tech/topics/linux.md>), [Network](<https://devfeed.tech/topics/network.md>)

Tags: [2018](<https://devfeed.tech/tags/2018.md>), [article](<https://devfeed.tech/tags/article.md>), [client](<https://devfeed.tech/tags/client.md>), [cloudflare](<https://devfeed.tech/tags/cloudflare.md>), [creative](<https://devfeed.tech/tags/creative.md>), [hack](<https://devfeed.tech/tags/hack.md>), [ip](<https://devfeed.tech/tags/ip.md>), [iptables](<https://devfeed.tech/tags/iptables.md>), [linux](<https://devfeed.tech/tags/linux.md>), [module](<https://devfeed.tech/tags/module.md>), [protocol](<https://devfeed.tech/tags/protocol.md>), [proxy](<https://devfeed.tech/tags/proxy.md>), [routing](<https://devfeed.tech/tags/routing.md>), [simple](<https://devfeed.tech/tags/simple.md>), [spectrum](<https://devfeed.tech/tags/spectrum.md>), [spoof](<https://devfeed.tech/tags/spoof.md>)

### AI overview

The excerpt describes `mmproxy`, a simple Proxy Protocol v1 proxy built using Linux's TPROXY iptables module. It can preserve or locally spoof client IP addresses, and the author says it is useful with Cloudflare Spectrum.

### Source excerpt

mmproxy - creative linux routing hack 17 April 2018 I've published an article on how we abused TPROXY iptables module to build , a simple Proxy Protocol v1 proxy that can "preserve" (or locally spoof) client IP addreses. It's pretty useful together with Cloudflare Spectrum:

## 5 talks in 5 weeks

DevFeed: [5 talks in 5 weeks](<https://devfeed.tech/articles/5-talks-in-5-weeks-38969.md>)

Original publisher: [Read original article](<https://idea.popcount.org/2017-12-22-5-talks-in-5-weeks>)

Author: Marek

Published: 2017-12-21T23:00:00Z

Content type: article

Language: en

Sources: [Marek Majkowski](<https://devfeed.tech/sources/marek-majkowski.md>)

Topics: [Functional programming](<https://devfeed.tech/topics/functional-programming.md>), [Cybercrime](<https://devfeed.tech/topics/cybercrime.md>)

Tags: [api](<https://devfeed.tech/tags/api.md>), [attacks](<https://devfeed.tech/tags/attacks.md>), [cloudflare](<https://devfeed.tech/tags/cloudflare.md>), [ddos](<https://devfeed.tech/tags/ddos.md>), [devops](<https://devfeed.tech/tags/devops.md>), [golang](<https://devfeed.tech/tags/golang.md>), [local](<https://devfeed.tech/tags/local.md>), [pizza](<https://devfeed.tech/tags/pizza.md>), [slides](<https://devfeed.tech/tags/slides.md>), [talks](<https://devfeed.tech/tags/talks.md>), [warsaw](<https://devfeed.tech/tags/warsaw.md>)

### AI overview

The author gave five talks at meetups in Warsaw over several weeks, covering the Service Worker API, how Cloudflare handles large DDoS attacks, a small functional reactive programming engine, Golang, and Cloudbleed. Most meetups received pizza through Cloudflare's sponsorship program. The post says most talks went well and points readers to the slides.

### Source excerpt

5 talks in 5 weeks Over last couple weeks I gave five talks on local meetups in Warsaw. Cloudflare is running a pizza program - for most of the meetups we were able to secure Cloudflare-sponsored pizza! Most of the talks went pretty well, here are the slides.

## Sandboxing landscape

DevFeed: [Sandboxing landscape](<https://devfeed.tech/articles/sandboxing-landscape-38962.md>)

Original publisher: [Read original article](<https://idea.popcount.org/2017-03-28-sandboxing-landscape>)

Author: Marek

Published: 2017-03-27T22:00:00Z

Content type: article

Language: en

Sources: [Marek Majkowski](<https://devfeed.tech/sources/marek-majkowski.md>)

Topics: [native-client](<https://devfeed.tech/topics/native-client.md>), [virtual machines](<https://devfeed.tech/topics/virtual-machines.md>), [Process](<https://devfeed.tech/topics/process.md>)

Tags: [api](<https://devfeed.tech/tags/api.md>), [arm](<https://devfeed.tech/tags/arm.md>), [binaries](<https://devfeed.tech/tags/binaries.md>), [binary-blob](<https://devfeed.tech/tags/binary-blob.md>), [blob](<https://devfeed.tech/tags/blob.md>), [blog](<https://devfeed.tech/tags/blog.md>), [blog-post](<https://devfeed.tech/tags/blog-post.md>), [broker](<https://devfeed.tech/tags/broker.md>), [browser](<https://devfeed.tech/tags/browser.md>), [browsers](<https://devfeed.tech/tags/browsers.md>), [bugs](<https://devfeed.tech/tags/bugs.md>), [c](<https://devfeed.tech/tags/c.md>), [cache](<https://devfeed.tech/tags/cache.md>), [cdn](<https://devfeed.tech/tags/cdn.md>), [chrome](<https://devfeed.tech/tags/chrome.md>), [code](<https://devfeed.tech/tags/code.md>), [customer](<https://devfeed.tech/tags/customer.md>), [edge](<https://devfeed.tech/tags/edge.md>), [sandboxing](<https://devfeed.tech/tags/sandboxing.md>), [servers](<https://devfeed.tech/tags/servers.md>)

### AI overview

The article finds that no reviewed approach satisfies its goal of an audited, lightweight sandbox for large numbers of mutually untrusted tenants. Language runtimes such as Lua and browser JavaScript can host code but lack reliable per-tenant CPU and memory limits; Lua also lacks built-in multi-tenancy. OS process isolation with seccomp is practical, but syscall-number filtering cannot validate arguments. Namespaces can isolate networking at extra setup cost, ptrace enables argument checks but is slow and vulnerable to TOCTOU issues with multithreaded code, and trusted brokers require code designed to use IPC. SFI can reduce reliance on separate processes: NaCl validates specially compiled binaries but is described as one tenant per process and does not restrict reads; VX32 supports multi-tenancy and hard memory boundaries, but is limited to 32-bit address space and was unaudited and immature. The article also notes KVM as a possible direction, without identifying a completed multi-tenant single-process solution.

### Source excerpt

Sandboxing landscape Some time ago I started wondering - would it be possible for a CDN to run customer code on the edge servers? I read and asked around, over time I got acquainted to what is and what is not technically possible. But that didn't bring me closer to an useful answer. Fortunately exploring this subject has been enormous fun. In this blog post I'll describe my findings so far.

## Socket API thoughts

DevFeed: [Socket API thoughts](<https://devfeed.tech/articles/socket-api-thoughts-38960.md>)

Original publisher: [Read original article](<https://idea.popcount.org/2017-02-23-socket-api-thoughts>)

Author: Marek

Published: 2017-02-22T23:00:00Z

Content type: opinion

Language: en

Sources: [Marek Majkowski](<https://devfeed.tech/sources/marek-majkowski.md>)

Topics: [Unix](<https://devfeed.tech/topics/unix.md>), [Process](<https://devfeed.tech/topics/process.md>), [Concurrency](<https://devfeed.tech/topics/concurrency.md>), [IO](<https://devfeed.tech/topics/io.md>), [Streams](<https://devfeed.tech/topics/streams.md>), [Erlang](<https://devfeed.tech/topics/erlang.md>), [Go Language](<https://devfeed.tech/topics/go-language.md>)

Tags: [api](<https://devfeed.tech/tags/api.md>), [erlang](<https://devfeed.tech/tags/erlang.md>), [go](<https://devfeed.tech/tags/go.md>), [processes](<https://devfeed.tech/tags/processes.md>), [stream](<https://devfeed.tech/tags/stream.md>), [unix](<https://devfeed.tech/tags/unix.md>)

### AI overview

The article examines whether Unix processes, file descriptors, and select() were designed around CSP-style communication. It concludes that they were not, while discussing composability limits and buffering-related problems in Unix process and I/O models.

### Source excerpt

Socket API thoughts I/O multiplexing, commentary Some time ago I wrote about a history of syscall. While that piece was a necessary introduction to the followup post, it triggered interesting discussions. It took me a while but I finally realized what is the core question I asked myself. Here it is: Were Unix processes intended to be CSP-style processes? Are file descriptors a CSP-derived "channels"? Is "select()" equivalent to ALT statement? The direct answer is "no". CSP is younger than Unix.

## Epoll is fundamentally broken 1/2

DevFeed: [Epoll is fundamentally broken 1/2](<https://devfeed.tech/articles/epoll-is-fundamentally-broken-1-2-38959.md>)

Original publisher: [Read original article](<https://idea.popcount.org/2017-02-20-epoll-is-fundamentally-broken-12>)

Author: Marek

Published: 2017-02-19T23:00:00Z

Content type: article

Language: en

Sources: [Marek Majkowski](<https://devfeed.tech/sources/marek-majkowski.md>)

Topics: [Linux Kernel](<https://devfeed.tech/topics/linux-kernel.md>), [Concurrency](<https://devfeed.tech/topics/concurrency.md>), [Linux](<https://devfeed.tech/topics/linux.md>), [freebsd](<https://devfeed.tech/topics/freebsd.md>)

Tags: [balancing](<https://devfeed.tech/tags/balancing.md>), [behavior](<https://devfeed.tech/tags/behavior.md>), [comparison](<https://devfeed.tech/tags/comparison.md>), [data-structure](<https://devfeed.tech/tags/data-structure.md>), [defects](<https://devfeed.tech/tags/defects.md>), [design](<https://devfeed.tech/tags/design.md>), [edge](<https://devfeed.tech/tags/edge.md>), [epoll](<https://devfeed.tech/tags/epoll.md>), [epollexclusive](<https://devfeed.tech/tags/epollexclusive.md>), [events](<https://devfeed.tech/tags/events.md>), [io-multiplexing](<https://devfeed.tech/tags/io-multiplexing.md>), [linux](<https://devfeed.tech/tags/linux.md>), [syscall](<https://devfeed.tech/tags/syscall.md>)

### AI overview

The excerpt argues that epoll's original behavior makes multi-threaded load balancing difficult, though newer flags address key cases. For accepting connections, level-triggered waits can wake multiple workers unnecessarily; edge-triggered waits can also cause wasted wakeups or let one worker drain the queue. It presents Linux 4.5+ EPOLLEXCLUSIVE with level-triggered events as the scalable approach. Edge-triggered EPOLLONESHOT with rearming can distribute accepts but adds an epoll_ctl call and allows only one worker to accept at a time. For reads across many sockets, the excerpt says EPOLLONESHOT with manual rearming is needed to keep data delivery to one worker and avoid races. It also advises avoiding shared epoll and registered descriptors, forking, and descriptor operations that can leave registrations problematic. The discussion is limited to the multi-threading and load-balancing issues covered in this installment; the file descriptor versus file description issue is deferred.

### Source excerpt

Epoll is fundamentally broken 1/2 I/O multiplexing part #3 In previous articles we talked about: This time we'll focus on Linux's successor - the I/O multiplexing syscall. Epoll is relatively young. It was created by Davide Libenzi in 2002. For comparison: Windows did IOCP in 1994 and FreeBSD's kqueue was introduced in July 2000. Unfortunately, even though epoll is the youngest in the advanced IO multiplexing family, it's the worse in the bunch.

## Select is fundamentally broken

DevFeed: [Select is fundamentally broken](<https://devfeed.tech/articles/select-is-fundamentally-broken-38958.md>)

Original publisher: [Read original article](<https://idea.popcount.org/2017-01-06-select-is-fundamentally-broken>)

Author: Marek

Published: 2017-01-05T23:00:00Z

Content type: article

Language: en

Sources: [Marek Majkowski](<https://devfeed.tech/sources/marek-majkowski.md>)

Topics: [Kernel](<https://devfeed.tech/topics/kernel.md>), [Linux Kernel](<https://devfeed.tech/topics/linux-kernel.md>), [TCP/IP](<https://devfeed.tech/topics/tcp-ip.md>), [freebsd](<https://devfeed.tech/topics/freebsd.md>)

Tags: [applications](<https://devfeed.tech/tags/applications.md>), [article](<https://devfeed.tech/tags/article.md>), [blog](<https://devfeed.tech/tags/blog.md>), [blog-post](<https://devfeed.tech/tags/blog-post.md>), [book](<https://devfeed.tech/tags/book.md>), [bsd](<https://devfeed.tech/tags/bsd.md>), [but](<https://devfeed.tech/tags/but.md>), [can](<https://devfeed.tech/tags/can.md>), [console](<https://devfeed.tech/tags/console.md>), [design](<https://devfeed.tech/tags/design.md>), [designers](<https://devfeed.tech/tags/designers.md>), [emulation](<https://devfeed.tech/tags/emulation.md>), [found](<https://devfeed.tech/tags/found.md>), [freebsd](<https://devfeed.tech/tags/freebsd.md>), [games](<https://devfeed.tech/tags/games.md>), [good](<https://devfeed.tech/tags/good.md>), [history](<https://devfeed.tech/tags/history.md>), [i](<https://devfeed.tech/tags/i.md>), [i-o](<https://devfeed.tech/tags/i-o.md>), [select](<https://devfeed.tech/tags/select.md>)

### AI overview

The article argues that `select` is heavyweight because each call requires the kernel to inspect descriptors and register or remove callbacks, and that shared sockets can trigger a thundering herd of process wakeups. Its experiments report localhost nonblocking `connect()` taking about 35 ms with 16,000 processes waiting in `select`, and about 1.5 seconds when each process watches 1,020 duplicate descriptors. The author says `epoll` avoids repeated registration through `epoll_ctl`, while Linux's `EPOLLEXCLUSIVE` reduces wakeups in the average case but does not remove the underlying O(N) dispatch cost. The proposed direction is to reconsider the registration model using interfaces such as `kqueue` and Windows IOCP. These are claims and measurements from the supplied article excerpt.

### Source excerpt

Select is fundamentally broken I/O multiplexing part #2 In a previous blog post we discussed a brief history of the syscall. The article concludes that some I/O multiplexing was necessary to do console emulation, games and non-trivial TCP/IP applications. The BSD designers chose the multiplexing model and other Unixes followed. But is the only multiplexing model? A good explanation can be found in the old revision of "The Design and Implementation of the FreeBSD Operating System" book.

## A brief history of select(2)

DevFeed: [A brief history of select(2)](<https://devfeed.tech/articles/a-brief-history-of-select-2-38956.md>)

Original publisher: [Read original article](<https://idea.popcount.org/2016-11-01-a-brief-history-of-select2>)

Author: Marek

Published: 2016-10-31T23:00:00Z

Content type: article

Language: en

Sources: [Marek Majkowski](<https://devfeed.tech/sources/marek-majkowski.md>)

Topics: [async](<https://devfeed.tech/topics/async.md>), [Linux](<https://devfeed.tech/topics/linux.md>), [Process](<https://devfeed.tech/topics/process.md>), [freebsd](<https://devfeed.tech/topics/freebsd.md>), [io\_uring](<https://devfeed.tech/topics/io-uring.md>), [ML model versioning](<https://devfeed.tech/topics/ml-model-versioning.md>)

Tags: [abstractions](<https://devfeed.tech/tags/abstractions.md>), [api](<https://devfeed.tech/tags/api.md>), [api-design](<https://devfeed.tech/tags/api-design.md>), [architecture](<https://devfeed.tech/tags/architecture.md>), [asynchronous](<https://devfeed.tech/tags/asynchronous.md>), [batch-processing](<https://devfeed.tech/tags/batch-processing.md>), [batching](<https://devfeed.tech/tags/batching.md>), [bind](<https://devfeed.tech/tags/bind.md>), [blocking](<https://devfeed.tech/tags/blocking.md>), [bsd](<https://devfeed.tech/tags/bsd.md>), [c](<https://devfeed.tech/tags/c.md>), [channel](<https://devfeed.tech/tags/channel.md>), [communication](<https://devfeed.tech/tags/communication.md>), [history](<https://devfeed.tech/tags/history.md>), [i-o](<https://devfeed.tech/tags/i-o.md>), [linux](<https://devfeed.tech/tags/linux.md>), [multiplexing](<https://devfeed.tech/tags/multiplexing.md>), [select](<https://devfeed.tech/tags/select.md>), [syscall](<https://devfeed.tech/tags/syscall.md>), [unix](<https://devfeed.tech/tags/unix.md>)

### AI overview

The article traces `select(2)` to the need to handle multiple I/O streams in one process. Early Unix programs mostly used blocking I/O, and `cu` relied on two processes to read and write concurrently. With 4.2BSD's sockets and applications such as Blit's virtual terminals, remote login clients, and later `inetd`, that model was insufficient: `select` let a program wait until a descriptor was ready, while nonblocking reads alone could require polling. The article argues that multiplexing arose from practical needs around networking, terminal work, and shared server state, rather than from a Unix design based on CSP-like channels. It also qualifies the history: Rob Pike's update says earlier Blit work used Greg Chessons' `mpx`, and notes that `select` and sockets appeared around the same time but were not necessarily designed as a single system. A later update corrects the claim that nonblocking I/O did not exist before 1983, citing earlier TTY support.

### Source excerpt

A brief history of select(2) I/O multiplexing part #1 Recently I've been thinking about the multiplexing in Linux, namely the syscall. I was curious if is better or worse than the or . I was wondering if there was a benefit in batching calls. But let's step back for a while, before we start a serious discussion we need to get some context. Most importantly - is file descriptor multiplexing an aberration or a gentle extension to the Unix design philosophy's?

## Strange Loop - IP Spoofing

DevFeed: [Strange Loop - IP Spoofing](<https://devfeed.tech/articles/strange-loop-ip-spoofing-38954.md>)

Original publisher: [Read original article](<https://idea.popcount.org/2016-09-20-strange-loop---ip-spoofing>)

Author: Marek

Published: 2016-09-19T22:00:00Z

Content type: article

Language: en

Sources: [Marek Majkowski](<https://devfeed.tech/sources/marek-majkowski.md>)

Topics: [rate-limiting](<https://devfeed.tech/topics/rate-limiting.md>), [IoT botnets](<https://devfeed.tech/topics/iot-botnets.md>)

Tags: [ddos](<https://devfeed.tech/tags/ddos.md>), [ip](<https://devfeed.tech/tags/ip.md>), [spoofing](<https://devfeed.tech/tags/spoofing.md>)

### AI overview

The talk argues that IP spoofing enables large DDoS attacks and makes their origin difficult to trace. Routers can identify the interface carrying attack traffic, but an internet exchange may not reveal which participant sent it, and carriers may lack visibility into which customer originated it. The speaker distinguishes DNS amplification, which can be filtered by dropping unwanted DNS responses, from direct spoofed SYN floods, for which the talk describes Linux firewall filtering with BPF bytecode. Attacks spread across an entire subnet can also defeat BGP nullrouting, leaving networks to absorb and filter the traffic with substantial bandwidth and processing capacity. The proposed improvement is sampled NetFlow data: interface metadata could help exchanges and carriers identify where attacks entered their networks. The talk presents attribution as a first step, not a solution to DDoS itself, and links the expense of absorbing attacks to internet centralization.

### Source excerpt

Strange Loop - IP Spoofing I recently gave a talk at the Strange Loop conference in St Louis. The recording and slides are available, but for easier consumption here's a transcript. Good morning! This is the DDoS talk. It's always hard to speak about DDoS. Many people mean very different things by it. Some say "DDoS" when their Ruby app can't handle more than five concurrent users. But slow Ruby servers are not the subject of this talk.

## Web archeology - itblog

DevFeed: [Web archeology - itblog](<https://devfeed.tech/articles/web-archeology-itblog-38949.md>)

Original publisher: [Read original article](<https://idea.popcount.org/2016-03-11-web-archeology---itblog>)

Author: Marek

Published: 2016-03-10T23:00:00Z

Content type: article

Language: en

Sources: [Marek Majkowski](<https://devfeed.tech/sources/marek-majkowski.md>)

Topics: [Web](<https://devfeed.tech/topics/web.md>)

Tags: [2016](<https://devfeed.tech/tags/2016.md>), [archeology](<https://devfeed.tech/tags/archeology.md>), [blog](<https://devfeed.tech/tags/blog.md>), [blog-posts](<https://devfeed.tech/tags/blog-posts.md>), [network](<https://devfeed.tech/tags/network.md>), [web](<https://devfeed.tech/tags/web.md>)

### AI overview

A former employee of the now-defunct Polish social network Grono.net revisits three posts they published on its blog: one on shortest-path searching, one on 32 versus 64 bits, and one on memoization. The memoization post was the last article published on that blog. The retrospective lists these posts without explaining their technical content.

### Source excerpt

Web archeology - itblog 11 March 2016 Long time ago I spent some time working at now defunct Polish social network - Grono.net. I published a couple of blog posts there. Allow me to performa a bit of web archeology: - Jak działa wyszukiwanie najkrótszych scieżek - 32 czy 64 bity - Memoize cichy przyjaciel programisty which coincidentally was the last article published on that blog.

## Turtles all the way down

DevFeed: [Turtles all the way down](<https://devfeed.tech/articles/turtles-all-the-way-down-38942.md>)

Original publisher: [Read original article](<https://idea.popcount.org/2015-08-16-turtles-all-the-way-down>)

Author: Marek

Published: 2015-08-15T22:00:00Z

Content type: article

Language: en

Sources: [Marek Majkowski](<https://devfeed.tech/sources/marek-majkowski.md>)

Topics: [virtualization](<https://devfeed.tech/topics/virtualization.md>), [virtual machines](<https://devfeed.tech/topics/virtual-machines.md>), [Process](<https://devfeed.tech/topics/process.md>), [Infrastructure as a Service (IaaS)](<https://devfeed.tech/topics/infrastructure-as-a-service-iaas.md>), [native-client](<https://devfeed.tech/topics/native-client.md>)

Tags: [2](<https://devfeed.tech/tags/2.md>), [386](<https://devfeed.tech/tags/386.md>), [8086](<https://devfeed.tech/tags/8086.md>), [allows](<https://devfeed.tech/tags/allows.md>), [also](<https://devfeed.tech/tags/also.md>), [amazon-ec2](<https://devfeed.tech/tags/amazon-ec2.md>), [arduino](<https://devfeed.tech/tags/arduino.md>), [bugs](<https://devfeed.tech/tags/bugs.md>), [cloud](<https://devfeed.tech/tags/cloud.md>), [computer](<https://devfeed.tech/tags/computer.md>), [computing](<https://devfeed.tech/tags/computing.md>), [containers](<https://devfeed.tech/tags/containers.md>), [cpu](<https://devfeed.tech/tags/cpu.md>), [datacenter](<https://devfeed.tech/tags/datacenter.md>), [isolation](<https://devfeed.tech/tags/isolation.md>), [process](<https://devfeed.tech/tags/process.md>), [resource](<https://devfeed.tech/tags/resource.md>), [virtual](<https://devfeed.tech/tags/virtual.md>), [virtual-machines](<https://devfeed.tech/tags/virtual-machines.md>), [virtualization](<https://devfeed.tech/tags/virtualization.md>)

### AI overview

The article argues that virtualization is a broad, increasingly layered form of process and resource isolation, and that shifts in it have reshaped computing. It traces a path from flat-memory systems such as DOS to the 286's MMU (whose multitasking limitations it notes), then the 386's process separation and safe DOS sandboxing, and later CPU-supported operating-system virtualization that helped enable cloud services. It describes Docker and Linux namespaces as lightweight isolation closer to the process level, where containers can be nested with little concern. The takeaway is that multi-tenancy can extend through operating systems, users, processes, containers, and plugins, making emerging isolation technologies worth watching.

### Source excerpt

Turtles all the way down I've realized that "virtualization" is a major driving force in the computer industry. I know, this sounds pretty obvious, but previously I didn't realize just how strong the virtualization force is. By "virtualization" I don't only mean virtual machines. I mean a wider concept of fault isolation, resource isolation, process separation and so on.

## BPF: the forgotten bytecode

DevFeed: [BPF: the forgotten bytecode](<https://devfeed.tech/articles/bpf-the-forgotten-bytecode-38935.md>)

Original publisher: [Read original article](<https://idea.popcount.org/2014-05-21-bpf-the-forgotten-bytecode>)

Author: Marek

Published: 2014-05-20T22:00:00Z

Content type: tutorial

Language: en

Sources: [Marek Majkowski](<https://devfeed.tech/sources/marek-majkowski.md>)

Topics: [Kernel](<https://devfeed.tech/topics/kernel.md>), [Network](<https://devfeed.tech/topics/network.md>), [debugging](<https://devfeed.tech/topics/debugging.md>), [Parser](<https://devfeed.tech/topics/parser.md>), [pretty printing](<https://devfeed.tech/topics/pretty-printing.md>), [systems](<https://devfeed.tech/topics/systems.md>)

Tags: [article](<https://devfeed.tech/tags/article.md>), [blog](<https://devfeed.tech/tags/blog.md>), [debugging](<https://devfeed.tech/tags/debugging.md>), [filter](<https://devfeed.tech/tags/filter.md>), [kernel](<https://devfeed.tech/tags/kernel.md>), [network](<https://devfeed.tech/tags/network.md>), [pretty-printing](<https://devfeed.tech/tags/pretty-printing.md>)

### AI overview

This article explains the history and operation of the Berkeley Packet Filter (BPF), including how tcpdump parses filter expressions into BPF bytecode, attaches the filter to a network interface, and pretty-prints the resulting packets. It also describes kernel-level packet filtering for network debugging.

### Source excerpt

BPF: the forgotten bytecode This article was originally published on the CloudFlare blog: Every once in a while I run into an obscure computer technology that is a hidden gem, which over the years has become mostly forgotten. This is exactly how I feel about the tool and its kernel counterpart the packet filter interface. For example, say you run: For most of us this command is pure magic, almost nobody understands what happens behind the scenes.

## Bind before connect

DevFeed: [Bind before connect](<https://devfeed.tech/articles/bind-before-connect-38934.md>)

Original publisher: [Read original article](<https://idea.popcount.org/2014-04-03-bind-before-connect>)

Author: Marek

Published: 2014-04-02T22:00:00Z

Content type: article

Language: en

Sources: [Marek Majkowski](<https://devfeed.tech/sources/marek-majkowski.md>)

Topics: [Linux Kernel](<https://devfeed.tech/topics/linux-kernel.md>), [ephemeral ports](<https://devfeed.tech/topics/ephemeral-ports.md>), [Kernel](<https://devfeed.tech/topics/kernel.md>)

Tags: [api](<https://devfeed.tech/tags/api.md>), [article](<https://devfeed.tech/tags/article.md>), [automatically](<https://devfeed.tech/tags/automatically.md>), [bind](<https://devfeed.tech/tags/bind.md>), [bsd](<https://devfeed.tech/tags/bsd.md>), [call](<https://devfeed.tech/tags/call.md>), [connect](<https://devfeed.tech/tags/connect.md>), [ephemeral](<https://devfeed.tech/tags/ephemeral.md>), [ip](<https://devfeed.tech/tags/ip.md>), [kernel](<https://devfeed.tech/tags/kernel.md>), [linux](<https://devfeed.tech/tags/linux.md>), [linux-kernel](<https://devfeed.tech/tags/linux-kernel.md>), [number](<https://devfeed.tech/tags/number.md>), [operating-system](<https://devfeed.tech/tags/operating-system.md>), [port](<https://devfeed.tech/tags/port.md>), [range](<https://devfeed.tech/tags/range.md>), [socket](<https://devfeed.tech/tags/socket.md>), [source](<https://devfeed.tech/tags/source.md>), [system](<https://devfeed.tech/tags/system.md>), [tcp](<https://devfeed.tech/tags/tcp.md>)

### AI overview

Linux normally selects an ephemeral source port during `connect()`, allowing the same port to serve connections to different destinations; the excerpt says more than 28,000 simultaneous connections to one destination pair will fail by default. Binding a source IP first changes allocation: without reuse, a port is effectively tied up regardless of destination. Setting `SO_REUSEADDR` permits sharing across nonconflicting connections, including cases involving established or `TIME_WAIT` sockets, but a later `connect()` can still fail with `EADDRNOTAVAIL` if the chosen port conflicts, so retry may be needed. The excerpt recommends expanding the port range and using multiple source IPs for higher connection counts, and warns that `connect()` and bind-before-connect allocations interfere with each other. It distinguishes `SO_REUSEPORT` as primarily for distributing incoming traffic among sockets. These are the article's described Linux behaviors and caveats.

### Source excerpt

Bind before connect A TCP/IP connection is identified by a four element tuple: {source IP, source port, destination IP, destination port}. To establish a TCP/IP connection only a destination IP and port number are needed, the operating system automatically selects source IP and port. This article explains how the Linux kernel does the source port allocation. Ephemeral port range To establish a connection BSD API requires two steps: first you need to create a socket, then call on it.

## Improving 'container/list'

DevFeed: [Improving 'container/list'](<https://devfeed.tech/articles/improving-container-list-38933.md>)

Original publisher: [Read original article](<https://idea.popcount.org/2014-02-28-improving-containerlist>)

Author: Marek

Published: 2014-02-27T23:00:00Z

Content type: article

Language: en

Sources: [Marek Majkowski](<https://devfeed.tech/sources/marek-majkowski.md>)

Topics: [Optimization](<https://devfeed.tech/topics/optimization.md>), [memory pool](<https://devfeed.tech/topics/memory-pool.md>), [Linux](<https://devfeed.tech/topics/linux.md>)

Tags: [cache](<https://devfeed.tech/tags/cache.md>), [container](<https://devfeed.tech/tags/container.md>), [cost](<https://devfeed.tech/tags/cost.md>), [cycles](<https://devfeed.tech/tags/cycles.md>), [data-structure](<https://devfeed.tech/tags/data-structure.md>), [element](<https://devfeed.tech/tags/element.md>), [embedded](<https://devfeed.tech/tags/embedded.md>), [garbage-collection](<https://devfeed.tech/tags/garbage-collection.md>), [gc](<https://devfeed.tech/tags/gc.md>), [go](<https://devfeed.tech/tags/go.md>), [golang](<https://devfeed.tech/tags/golang.md>), [kernel](<https://devfeed.tech/tags/kernel.md>), [linked-list](<https://devfeed.tech/tags/linked-list.md>), [linux-kernel](<https://devfeed.tech/tags/linux-kernel.md>), [list](<https://devfeed.tech/tags/list.md>), [memory](<https://devfeed.tech/tags/memory.md>)

### AI overview

Go's `container/list` allocates a separate element object for each item. The article contrasts this external design, which keeps list bookkeeping out of the item, with an internal design that embeds list fields in each item but makes recovering the item during traversal more complex. It describes using `unsafe` to emulate Linux's `container_of`, then recommends adapting the list implementation to insert a caller-provided embedded element instead. This avoids the extra allocation without `unsafe`, at the cost of each item carrying a full `list.Element` and setting its `Value` to point to itself. In the author's LRU cache comparison, the internal version used fewer heap objects and had lower cumulative GC pause time, though the external version triggered fewer GC cycles. The excerpt gives no numerical results.

### Source excerpt

Improving 'container/list' Golang ships with a linked list1 data structure: . The implementation is great and simple but it suffers an interesting problem: adding a value to a list requires a memory allocation. Let me explain. Broadly speaking a linked list can be implemented in one of two ways: - The list can hold a reference to the item. Let's call that an "external" implementation. The item ("Alice von Wonderland" in our example) doesn't have any knowledge of the list.

## Logging best practices

DevFeed: [Logging best practices](<https://devfeed.tech/articles/logging-best-practices-38932.md>)

Original publisher: [Read original article](<https://idea.popcount.org/2013-12-31-logging-best-practises>)

Author: Marek

Published: 2013-12-30T23:00:00Z

Content type: article

Language: en

Sources: [Marek Majkowski](<https://devfeed.tech/sources/marek-majkowski.md>)

Topics: [Logging](<https://devfeed.tech/topics/logging.md>)

Tags: [best-practices](<https://devfeed.tech/tags/best-practices.md>), [logging](<https://devfeed.tech/tags/logging.md>)

### AI overview

The article recommends designing logging deliberately: separate startup failures, developer debug messages, and user access activity because they serve different purposes. Keep verbosity simple (quiet, default, debug) and debug output readable; excessive logs can overwhelm people and systems. Keep access logs separate from whole-program diagnostics, as web servers do; the Linux example shows iptables activity mixed into dmesg can clutter kernel logs. Rate-limit repetitive events with mechanisms such as Linux's printk_ratelimited, and periodically remove stale or confusing statements and simplify inconsistent levels. The author presents these as recommendations, noting that some event boundaries are difficult to define and that Linux's severity levels can be hard to distinguish.

### Source excerpt

Logging best practices Every serious program has some kind of logging infrastructure. Sometimes it's trivial (); sometimes it's sophisticated and highly configurable. Unfortunately, many programs use logging inconsistently. The logging infrastructure is usually grown organically and not thought through. Many programs repeat the same mistakes with regard to logging. Let's take some time to talk about logging in larger systems.

## How to resolve a million domains

DevFeed: [How to resolve a million domains](<https://devfeed.tech/articles/how-to-resolve-a-million-domains-38931.md>)

Original publisher: [Read original article](<https://idea.popcount.org/2013-11-28-how-to-resolve-a-million-domains>)

Author: Marek

Published: 2013-11-27T23:00:00Z

Content type: article

Language: en

Sources: [Marek Majkowski](<https://devfeed.tech/sources/marek-majkowski.md>)

Topics: [Domain Name System (DNS)](<https://devfeed.tech/topics/dns-resolution-process.md>), [protocols](<https://devfeed.tech/topics/protocols.md>), [rate-limiting](<https://devfeed.tech/topics/rate-limiting.md>)

Tags: [2](<https://devfeed.tech/tags/2.md>), [3](<https://devfeed.tech/tags/3.md>), [alexa](<https://devfeed.tech/tags/alexa.md>), [amazon](<https://devfeed.tech/tags/amazon.md>), [bandwidth](<https://devfeed.tech/tags/bandwidth.md>), [better](<https://devfeed.tech/tags/better.md>), [block](<https://devfeed.tech/tags/block.md>), [blocking](<https://devfeed.tech/tags/blocking.md>), [bookkeeping](<https://devfeed.tech/tags/bookkeeping.md>), [built-in](<https://devfeed.tech/tags/built-in.md>), [cache](<https://devfeed.tech/tags/cache.md>), [challenge](<https://devfeed.tech/tags/challenge.md>), [code](<https://devfeed.tech/tags/code.md>), [daily](<https://devfeed.tech/tags/daily.md>), [data](<https://devfeed.tech/tags/data.md>), [dns](<https://devfeed.tech/tags/dns.md>), [domains](<https://devfeed.tech/tags/domains.md>), [how-to](<https://devfeed.tech/tags/how-to.md>), [time](<https://devfeed.tech/tags/time.md>), [top](<https://devfeed.tech/tags/top.md>)

### AI overview

Resolving a million domains quickly required avoiding per-domain OS resolver calls and their socket overhead. In the author's tests, Go's built-in resolver managed about 5.4 domains per second sequentially and 40 with 100 goroutines, but separate UDP sockets limited concurrency to roughly 1,020 requests. Google's public resolver appeared capped at about 100 requests per second per source IP, while the author's self-run dnscache reached 100% CPU. The final approach queried an existing recursive resolver directly and reused one UDP socket for concurrent requests; a custom Go client reportedly resolved the million-domain list in 25 minutes on a cheap Amazon VPS. These are results from the author's setup, not general benchmarks.

### Source excerpt

How to resolve a million domains Few years ago Alexa started to publish a daily snapshot of top one million domains used on the internet. Using this data I wanted to analyse how the DNS assignments change over time. The plan was simple: - Every day download the Alexa list of top domains. - Every day resolve all the domains. - Do something with the gathered data. - Profit!

## Visualising SipHash

DevFeed: [Visualising SipHash](<https://devfeed.tech/articles/visualising-siphash-38930.md>)

Original publisher: [Read original article](<https://idea.popcount.org/2013-10-09-visualising-siphash>)

Author: Marek

Published: 2013-10-08T22:00:00Z

Content type: article

Language: en

Sources: [Marek Majkowski](<https://devfeed.tech/sources/marek-majkowski.md>)

Topics: [hashing](<https://devfeed.tech/topics/hashing.md>), [sha256](<https://devfeed.tech/topics/sha256.md>), [Image processing](<https://devfeed.tech/topics/image-processing.md>), [pixel](<https://devfeed.tech/topics/pixel.md>)

Tags: [charts](<https://devfeed.tech/tags/charts.md>), [cryptanalysis](<https://devfeed.tech/tags/cryptanalysis.md>), [security](<https://devfeed.tech/tags/security.md>), [siphash](<https://devfeed.tech/tags/siphash.md>)

### AI overview

The article visualizes how SipRound propagates a single-bit input change by comparing outputs across 200,000 random states for each flipped bit. It reports that flipping bit 191 has a fully predictable effect, while three SipRounds make output differences approach 50% per bit and four produce an almost uniformly grey chart with residual patterns. The author says this observation alone does not imply a SipHash security impact: a practical attack on SipHash-2-4 would need to exploit a bias across six rounds. The text provides C code and says the charts can be replicated.

### Source excerpt

Visualising SipHash Siphash is a PRF using a "SipRound" primitive as a building block. The recommended SipHash variant, SipHash-2-4, is running two SipRounds after every message block and four rounds at the end to finalise the hash. SipRound SipRound is a simple construct - it mangles 256 bits of internal state using just a few operations on 64 bit registers: - 4 bit rotations - 2 rotations by 32 bits - 4 xors - 4 additions Here's an equivalent code in C (from csiphash): Differential...

[Next page](<https://devfeed.tech/sources/marek-majkowski.md?cursor=WyIyMDEzLTEwLTA4VDIyOjAwOjAwKzAwOjAwIiwgIjg0MzlkZGY5LWNkOTktNDM0Yy1hZDNiLTA4MjYwMmM3NmE0OSJd>)