Posts
27
Following
268
Followers
286
Open source hacker, Linux kernel developer, and creator of the drgn debugger. Chicano πŸ‡²πŸ‡½. Likes punk rock.

Thorsten Leemhuis (acct. 1/4)

Linus removed from mainline, it thus will be gone as of 6.18:

https://git.kernel.org/torvalds/c/f2c61db29f277b9c80de92102fc532cc247495cd

""bcachefs was marked 'externally maintained' in 6.17 but the code remained to make the transition smoother.

It's now a DKMS module, making the in-kernel code stale, so remove it to avoid any version confusion.""

284 files changed, 0 insertions, 117483 deletions

3
7
0
Edited 19 days ago
In 2023, I walked [1] on the France route of Camino de Santiago from Burgos to Santiago de Compostela (~500 km) to prepare (walk on days, work on slides and code on nights) for DAMON talk [2] at OSSummit Europe. This year, I walked it again from Saint Jean Pied de Port to Burgos to complete the route, and further from Burgos to Carrion de los condes (~322 km) to prepare for Kangjeros [3] and Kernel Recipes [4]. Now I’m ready to attend talks and made a first draft [5] of my Kernel Recipes talk slides. Switching from a pilgrim to a conference attendee and heading to Kangrejos now. Looking forward to meeting people on Kangrejos and Kernel Recipes!

[1] https://social.kernel.org/notice/AZrKdcNdDyaDwkShou
[2] https://static.sched.com/hosted_files/osseu2023/92/damo_ossummit_eu_2023.pdf
[3] https://kangrejos.com/
[4] https://kernel-recipes.org/en/2025/schedule/overcoming-observer-effects-in-memory-management-with-damon/
[5] https://github.com/damonitor/talks/blob/master/2025/kernel_recipes/damon_kernel_recipes2025.pdf

#kangjeros #kernelrecipes #caminodesantiago
0
2
6
@llvm have you seen ioctl(PROCMAP_QUERY)? https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=ed5d583a88a9207b866c14ba834984c6f3c51d23. It was added recently, in 6.11, but this will hopefully suck less going forward.
0
0
2

New ELF specification for public review

https://lwn.net/Articles/1036569/

0
3
0
@vbabka thanks, that's super helpful! I'm embarrassed that I didn't see that comment. And that explains why /proc/slabinfo was giving me a different answer.
0
0
2
@vbabka I have a quick question that came up while I was adding a new drgn helper to count the number of allocated objects in a slab cache. Let me know if I should ask on the ML instead.

What is the purpose of the slab->frozen flag, and why do frozen slabs have slab->inuse == slab->objects?
2
0
1
I skimmed through the history of the Linux kernel swap cache code today, and it was fun seeing how it scaled up throughout the years.

Originally, a single struct address_space served as the swap cache for every swap file.

In 2013, Shaohua Li split it up into a separate address_space per swap file: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=33806f06da654092182410d974b6d3c5396ea3eb.

In 2017, Ying Huang split it further into a separate address_space for each 64MB chunk of each swap file: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=4b3ef9daa4fc0bba742a79faecb17fdaaead083b. That's how it's been sharded ever since.
1
0
3

BjΓΆrkus "No time_t to Die" Dorkus

You hear that Mr. Kernighan? ... That is the
sound of inevitability... It is the sound
of improvement...
It's time, Mr. Kernighan....

6
2
1
@ljs lol how embarrassing, they totally fell for the "technical argument" smokescreen. It's stupid to defend the technical points of Kent's replies in that thread, because the technical aspect was never the point.

And yet the "non-technical" aspects are just as important to Linux's technical excellence. I can't remember where I read that Linux's true innovation wasn't its design, but rather its development model, but it's true. Linux isn't defined by a single, great technical decision. Instead, it's great because it's constantly evolving through collaboration. Jeopardizing that is a much bigger deal than any single feature.
0
0
2
@vbabka wow, I didn't know that about m68k. From what I can tell, the rb_node is aligned so that they can tag the parent pointer with the node color, which is just one bit. If that's true, then additional alignment shouldn't be necessary even on m68k, but who knows what else might be relying on the explicit alignment.
1
0
2

Richard Weinberger

Edited 1 month ago
  • Step 1: While debugging a kernel issue, you want the return value of a function at startup.

  • Step 2: Instead of just adding a printk() and recompiling, you try tracing like the cool kids.

  • Step 3: Since 2023, the function graph tracer can show return values. You add to the kernel command line and reboot: ftrace=function_graph ftrace_filter=interesting_fn trace_options=funcgraph-retval

  • Step 4: The trace shows no return value. You find that ARM return value capture exists only for AArch64, not ARM32.

  • Step 5: You add a printk() and rebuild.

2
8
14
struct rb_node in the kernel has this pointless alignment attribute: __attribute__((aligned(sizeof(long)))).

It always makes me laugh because it was added in 2006 (https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=e977145aeaad23d443686f2a2d5b32800d1607c5) for an obscure architecture that the kernel dropped support for in 2018 (https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=c690eddc2f3b44b24520f4a77cc3a4c9bde7d571).
2
1
3

Christian Brauner 🦊🐺

Edited 1 month ago
kernel drama
Show content
3
9
2

Jonathan Corbet

For a while now, the kernel's configuration and build systems have been an area of concern for me. Almost nobody truly understands those complex subsystems, which were handled by a single maintainer.

That maintainer, Masahiro Yamada, has just stepped down after eight years on the job:

https://web.git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=8d6841d5cb20

Happily, Nathan Chancellor and Nicolas Schier have agreed to pick up the build system. The configuration system, instead, is now unmaintained. That ... seems less than optimal.

Thanks to Masahiro for doing this work all these years, and to Nathan and Nicolas for stepping up!
4
22
51
@sj recently started using drgn to add more DAMON selftests, which is a super interesting use case that I didn't envision: https://lore.kernel.org/all/20250628160428.53115-1-sj@kernel.org/. It has already found a real bug! https://lore.kernel.org/all/20250719181932.72944-1-sj@kernel.org/
0
3
6
@hipsterelectron you can put the process in its own mount namespace and mount a FUSE filesystem in that namespace.
1
0
1
@jann huh, do you know why the kernel asks for only 8 byte alignment?
1
0
0
@pervognsen @dougall yeah, exactly (although you might already be aware of the long-deprecated uselib syscall: https://man7.org/linux/man-pages/man2/uselib.2.html)
0
0
1
@pervognsen @dougall on Linux, there is a "debugger rendezvous" structure named r_debug which the debugger finds via an entry in the dynamic section. r_debug has a member, r_brk, which is a code address that is hit whenever a shared object is loaded/unloaded. The debugger can set a breakpoint there if it wants to be notified of those events and inspect other members in r_debug for details.

It's very Unix "worse is better" (which makes sense since I think it originated in System V and came to Linux via glibc).
1
0
3
The next Linux Kernel Debugging Tools Monthly Meeting is tomorrow, Wednesday, May 28th at 11:30 AM Pacific time. As usual, see the agenda on the linux-debuggers mailing list: https://lore.kernel.org/linux-debuggers/aDYy37NBkt7mdaJY@telecaster/T/#u and let me know if you want an invite.
0
2
2
Show older