News for hackers. Stuff that matters.
Re:How io_uring and eBPF Will Revolutionize Programming in L... by zests on Thursday November 26, 2020 @04:05PM (#25223521)
I am impressed with the level of linux knowledge in this thread. How do people become linux kernel hackers? Most of the developers I know (including myself) use linux but have very little awareness beyond application level programming.
Re:How io_uring and eBPF Will Revolutionize Programming in L... by the8472 on Thursday November 26, 2020 @05:20PM (#25223943)
You don't necessarily have to be a kernel hacker to be familiar with many of the features that the kernel provides. Just doing application debugging often requires to dig deeper until you hit some kernel balrogs.

Container problems? Namespaces, Cgroups, ...

Network problems? Netfilter, tc, lots of sysctl knobs, tcp algorithms (cue 1287947th thread on nagle/delayed acks/cork)

Slow disk IO? Now you need to read up on syscalls and maybe find more efficient uses. Copy_file_range doesn't work as expected? Suddenly you're reading kernel release notes or source code.

Re:How io_uring and eBPF Will Revolutionize Programming in L... by marcosdumay on Thursday November 26, 2020 @04:13PM (#25223571)
> How do people become linux kernel hackers?

Honestly, by hacking it.

There's a famous book about Linux internals that I don't remember the name (but has "Linux" and "internals" on it). But I have never seen anybody doing it by reading a book (despite how excellent it can be). You just go change what you want or read the submodule you are interested in understanding, and use the book, site or whatever when you have a problem.

Re:How io_uring and eBPF Will Revolutionize Programming in L... by asicsp on Thursday November 26, 2020 @10:24PM (#25225314)
>There's a famous book about Linux internals that I don't remember the name (but has "Linux" and "internals" on it)

this one? https://0xax.gitbooks.io/linux-insides/content/index.html

though it says insides instead of internals

Re:How io_uring and eBPF Will Revolutionize Programming in L... by marcosdumay on Friday November 27, 2020 @06:08AM (#25227635)
Yes, this one. Thanks.
Re:How io_uring and eBPF Will Revolutionize Programming in L... by bigyikes on Thursday November 26, 2020 @04:38PM (#25223702)
I have never run into a problem that I thought needed to be solved in the kernel. What kinds of things have you wanted to change?
Re:How io_uring and eBPF Will Revolutionize Programming in L... by marcosdumay on Thursday November 26, 2020 @05:04PM (#25223849)
The first time I went into it was to write a driver for a device in my undergrad. After that I've changed a driver here or there (never anything worth merging), and needed the documentation of the sound systems.

It's not an easy thing, by any means. Just locating where you have to touch on the source tree is a problem that will lead you to plenty of books or sites. But don't try reading those before you have a problem to solve, you will lose time and drown in information.

(By the way, I am assuming you know how syscalls work. If you don't, go study that before you start anything.)

Re:How io_uring and eBPF Will Revolutionize Programming in L... by bloaf on Thursday November 26, 2020 @07:36PM (#25224593)
I learned 90% of the things I know about operating systems by solving problems I myself caused.
Re:How io_uring and eBPF Will Revolutionize Programming in L... by sdlion on Thursday November 26, 2020 @06:47PM (#25224381)
Once I found myself reading about device module programming since the common USB-Serial device module (I forgot its name, cdc something) wasn't properly working for a Chinese multiserial port chip inside a GSM cluster modem (one USB device to multiple serial ports).

I was attempting to hack away a simple example but I found the USB-Serial (more) generic driver intended for "test only" and... it just worked.

Another reason for reading about IO calls, schedulers, etc? That "I'm still writing data into your USB flash drive even when the GUI says it finished 5 minutes ago" that I hate so much.

Re:How io_uring and eBPF Will Revolutionize Programming in L... by the_only_law on Thursday November 26, 2020 @04:59PM (#25223819)
Conversely every problem I’ve run into in a kernel that I could potentially solve requires me to be an expert in 1-3 things outside of the kernel.
Re:How io_uring and eBPF Will Revolutionize Programming in L... by sebcat on Friday November 27, 2020 @03:45AM (#25226675)
Apart from Linux hw support for things at work, I implemented a fairly simple pseudo-device for establishing TCP connections from a process in capability mode on FreeBSD. The device driver has support for a denylist to disallow connections to specific IP ranges. It has multiple syscalls wrapped into one ioctl, and sockets opened from the device always had TCP_NODELAY, O_CLOEXEC and SOCK_NONBLOCK set. Worked pretty well for its intended use case.

https://github.com/sebcat/yans/blob/master/drivers/freebsd/t... https://github.com/sebcat/yans/blob/master/drivers/freebsd/t...

Re:How io_uring and eBPF Will Revolutionize Programming in L... by cgh on Thursday November 26, 2020 @06:30PM (#25224312)
In my case, which is probably typical, there was a bug in a device driver for some obscure thing we were using where I worked. So I had to dive into the world of kernel modules and fix it. I think a lot of kernel knowledge and development is commercially-driven, in this sense.
Re:How io_uring and eBPF Will Revolutionize Programming in L... by alfiedotwtf on Friday November 27, 2020 @12:03AM (#25225676)
I think you were thinking “Linux Core Kernel” by Scott Maxwell. And yes, it’s an awesome book that’s copied the style of a same type of book that annotates the SVR4 kernel
Re:How io_uring and eBPF Will Revolutionize Programming in L... by 01100011 on Thursday November 26, 2020 @06:16PM (#25224251)
For the most part, it's just software. If you have the time and the interest, you can learn it like anything else. At some level, it requires an awareness of how the hardware works(page tables/MMUs/IOMMUs, interrupts, SMP, NUMA, etc).

I don't mean to downplay the investment, but if you're already an experienced software engineer you can get into it if it interests you. There is a different mindset among systems software programmers though. Reliability comes first, performance and functionality come second. It's a world away from hacking python scripts that only need to run once to perform their function.

Re:How io_uring and eBPF Will Revolutionize Programming in L... by gpanders on Thursday November 26, 2020 @06:17PM (#25224254)
I learned a TON about the Linux kernel through writing custom device drivers for FPGAs. Granted most of my experience is in the driver area and not in any of the subsystems, but even still I have a much better grasp of how the kernel operates now (and even more importantly, I know how to navigate it and how to find relevant documentation).
Re:How io_uring and eBPF Will Revolutionize Programming in L... by amboar on Friday November 27, 2020 @01:44AM (#25226093)
As others have said, hacking it, certainly. But if you're not up for that and would like something more passive, read LWN.net (and possibly subscribe!)
Re:How io_uring and eBPF Will Revolutionize Programming in L... by yobert on Friday November 27, 2020 @01:59PM (#25231599)
I learned a lot by trying to make Go talk to ALSA without using any existing C interfaces. Just happy exploration goes a long ways!
Re:How io_uring and eBPF Will Revolutionize Programming in L... by dboreham on Thursday November 26, 2020 @06:54PM (#25224399)
UTSL