Linux Exec Should Be Less Deadlock Prone In Future Kernels
Ongoing work around Linux's exec() code should make it less deadlock prone in future kernel versions.
The current exec functionality within the kernel is "extremely deadlock prone" but Eric Biederman and others have been working to clean up that code and put it in a better state to avoid potential deadlocks. Sent in for the Linux 5.7 kernel was the first part of the exec rework that makes trickier cases easier to spot and the hope is for Linux 5.8 the code to solve exec deadlocks might be ready.
Linus Torvalds pulled the proc/exec changes into the Linux 5.7 kernel but provided feedback that has ignited a lengthy discussion on the topic. Linus noted, "I've pulled it, but I'm not entirely happy about some of it...This code is subtle as h*ll, and we've had bugs in it, and it has a series of tens of patches to fix them. But that also means that the explanations for the patches should take the subtleties into account, and not gloss over them with things like this. Ok, enough about the explanations. The actual _code_ is kind of odd too."
At least in the near-term, however, there might be more frustrations. Stemming from another unmerged patch, Torvalds wrote, "There is no way I would ever take that patch. The amount of confusion in that patch is not acceptable. Randomly unlocking the new lock? That code makes everything worse, it's completely incomprehensible, the locking rules make no sense what-so-ever. I'm seriously starting to feel like I should not have pulled this code, because the future looks _worse_ than what we used to have." Torvalds messages though have been with poise compared to how he would often provide colorful commentary in the past over less than stellar code.
The good news is that due to Torvalds' intervention, more developers are discussing this fragile code hopefully leading to further improvements and ideally seeing the deadlock prone code addressed in time for the Linux 5.8 cycle if not seeing any pressing fixes come sooner.
The current exec functionality within the kernel is "extremely deadlock prone" but Eric Biederman and others have been working to clean up that code and put it in a better state to avoid potential deadlocks. Sent in for the Linux 5.7 kernel was the first part of the exec rework that makes trickier cases easier to spot and the hope is for Linux 5.8 the code to solve exec deadlocks might be ready.
Linus Torvalds pulled the proc/exec changes into the Linux 5.7 kernel but provided feedback that has ignited a lengthy discussion on the topic. Linus noted, "I've pulled it, but I'm not entirely happy about some of it...This code is subtle as h*ll, and we've had bugs in it, and it has a series of tens of patches to fix them. But that also means that the explanations for the patches should take the subtleties into account, and not gloss over them with things like this. Ok, enough about the explanations. The actual _code_ is kind of odd too."
At least in the near-term, however, there might be more frustrations. Stemming from another unmerged patch, Torvalds wrote, "There is no way I would ever take that patch. The amount of confusion in that patch is not acceptable. Randomly unlocking the new lock? That code makes everything worse, it's completely incomprehensible, the locking rules make no sense what-so-ever. I'm seriously starting to feel like I should not have pulled this code, because the future looks _worse_ than what we used to have." Torvalds messages though have been with poise compared to how he would often provide colorful commentary in the past over less than stellar code.
The good news is that due to Torvalds' intervention, more developers are discussing this fragile code hopefully leading to further improvements and ideally seeing the deadlock prone code addressed in time for the Linux 5.8 cycle if not seeing any pressing fixes come sooner.
Add A Comment