Linux Getting Extensive x86 Assembly Code Refresh
jones_supa writes: A massive x86 assembly code spring cleaning has been done in a pull request that is to end up in Linux 4.1. The developers have tried testing the code on many different x86 boxes, but there's risk of regression when exposing the code to many more systems in the days and weeks ahead. That being said, the list of improvements is excellent. There are over 100 separate cleanups, restructuring changes, speedups and fixes in the x86 system call, IRQ, trap and other entry code, part of a heroic effort to deobfuscate a decade old spaghetti assembly code and its C code dependencies.
Technical Debt haunts you.
I wonder how much cruft there is in Windows or OSX.
Don't worry, the obfuscation is being replaced by kdbus and its metadata
We live in interesting times these days. With a changeset so big, and involving assembly code that isn't as easy to understand as C code, how can we really be sure that no exploits have been introduced? How extensively have these changes been reviewed to ensure there are no exploits or potential exploits being sneaked in?
Linux has been obsolete since introducing assembly code. Minux touches the hardware in just 100 lines of code and macosx is a micro kernel as well.
It is 2015 and not 1985
http://saveie6.com/
I have a feeling that this is going to mean a *big* hump for everyone who uses real-time Linux. It could be months before we're able to upgrade. Adeos tinkers with that code, and Xenomai works on Adeos patched kernels.
linux is obsolete, but there is nothing better
r u redi to rumble?
does it support low end x86 tablets with efi32 now, like windows has for years, or is that still a no.
wtg guys
> There's a risk of regression when exposing the code to many more systems
The risk of regression is due to refactoring, not due to testing. Ironic, given that the post cites de-obfuscation as a reason for doing this. Or perhaps our submitter just got an MBA and is learning to think and speak in management-ese.
> There are over 100 separate ... speedups
The last time I looked, which was quite a few years ago TBH, the BSDs have, IIRC, less than 100 lines of x86 assembly, in the bootstrap. It's really only there to manage loading at the right address and then jumps into C code. Maybe there's some more bits scattered in other places too, IDK. Bottom line is that there's just not a lot of time spent in code written in assembly.
What the fsck is in the Linux kernel that could be sped up?
Why modify tested working code? What is this other than an excellent opportunity to inject malware into multiple Linux distros?
Does this mean that a bunch of assembly code is going to be replaced? Who is going to code review that? Who can sight read assembly anymore?
It's not a major refresh, only a modest one, and it doesn't really fix the readability issues (which would require a complete rewrite). Linux assembly is a mostly unreadable, badly formatted, macro-happy mess. The assembly in the BSDs is much more elegant and minimalistic.
-Matt
...do you know what the machine is doing with the codes that you type? Abstractions neccessarily lead to assumptions.
Time is what keeps everything from happening all at once.
Ingo Molnár has interesting comments on distributions, basically he wants them more modular.
part of a heroic effort to deobfuscate a decade old spaghetti assembly code
Which is why the 4.1 release should be named as "Tomato Source."
The improved assembly code is what allows the Terminator to be so efficient a killing machine.
I spent 5 years trying to fix an application that was built over the course of a few months
I've seen similar things keep repeating, in many of the places I know
What I do not understand is, why people do that in the first place ...
Wouldn't a total re-write be the right thing to do instead?
were anyone's feelings injured in this kernel?
Are peoples feelings going to be hurt with the assembly changes in 4.1?
Is anyone offended by the words pop/push/mul/div/jmp?
feeligns man, gotta make sure nobody's feelings are hurt.
Is apple powered by scientology?
The best way to make yourself big and brilliant is to take someone elses excellent code that you could never write, go through it and implement their logic in "new" code claiming that their "spaghetti garbage" has now been fixed by you even though you did little more than a lint tool would.
Claiming that the work of others, that you build upon and without which you would be fumbling in the dark, is garbage is bad form.
I'm waiting for Intel to integrate systemd in the next core update.
Never again? Not even emulating 80486 instructions?
Management pressure forces even good developers to produce. Sometimes, against your better judgement, you have to go for the quick fix to meet a deadline (or not exceed a deadline by too much). Or, developers make a proof-of-concept or prototype, and management says "ship that".
Once management has its grubby hands on existing codebase, it ignores the accrued technical debt, poo-poos developers warnings to rewrite some stuff that was thrown together in the heat of battle, and never funds general background cleanup tasking.
Management does not believe in bit-rot.
Building codes generally allow homeowners to install a second layer of asphalt shingles over an existing layer of same. But once you're considering a 3rd layer, building codes generally require the entire roof to be stripped and redone.
Software should be the same way.
Wouldn't a total re-write be the right thing to do instead?
Yes, if you can get the proper requirements. (This does not apply to the current article, since I assume that the requirements for these syscalls, etc. are well described.)
On most business systems, especially one that us written over the course of a few months, the requirements are just as spaghetti as the code, so rewriting the system from scratch might also rewriting the requirements from scratch, which is a monumental task if it already have customers with different configurations.
On a more humorous note, I find it funny that this is today's article on The Daily WTF: Seven Minutes In Heaven
B-llshit. Linux code quality is superior, because so many developers are there cleaning up everything all the time.
"Linux" and "Gaming" don't even belong in the same sentence. You're welcome to keep dreaming, but no amount of it is going to lead you to reality.
because working on UIs is to hard to make easier.
Oooh yay! Lots of new security holes will be introduced to exploit! Do it like openssl.