Readit News logoReadit News
onetimeuse92304 · 2 years ago
Now we need to have a linux driver that lets run Windows after kernel panic and we can switch between them without reboot, just like we wanted 20 years ago...
RulerOf · 2 years ago
I had that working very briefly for a short period of time circa 2010.

Linux -> kexec grub -> NTLDR

Windows -> Winkexec[1] grub -> linux kernel

It was extremely fiddly, and the majority of hardware I threw it at really didn't like complying with what I was trying to do, in spite of the fact that it ought to work, at least on paper.

1: https://github.com/stump/winkexec

bhdlr · 2 years ago
Been using Linux as my daily driver for 5 years and have never seen a Kernel panic, so there's probably no drive to do it :P
onetimeuse92304 · 2 years ago
I have been using Linux since 1999. I have seen lots of kernel panics. But recently much less, unfortunately replaced by more problems in platform and userspace.

I know Linux works more reliably for some people and less reliably for some others. It probably has much to do what you do with it. What kind of hardware you are running it on, do you just install it and use it as it is or you are the kind of person like me who likes to change everything to his liking.

I also tend to not like to reinstall my machines. For about 15 years my daily driver was a single Debian unstable installation which was continuously updated until I faced too much problems and had to completely replace it. I would have fixed it all but I just did not have the time and I needed it working.

fps_doug · 2 years ago
I've worked and developed on Linux, for Linux, for 10+ years, I've seen my fair share of panics, especially using the bleeding edge releases. Most (not all!) of them were my own making though. :>
juggertao · 2 years ago
That means you're not doing anything interesting with it :P
tmtvl · 2 years ago
I've been using GNU/Linux exclusively since 2012 and while I've seen fewer kernel panics than blue screens, I have seen some. Usually due to the Intel graphics driver (of all things). I don't recall ever having one caused by AMDGPU, but that may just be a lucky coincidence. But every OS has problems, my favourite one was OSX Yosemite hard rebooting whenever I ran a Xubuntu VM on VirtualBox.
bdhcuidbebe · 2 years ago
its called kvm and is just 2 years shy of turning 20
weinzierl · 2 years ago
Nah, it's call loadlin and so old that no one seems to remember its birth.
Deforest7551 · 2 years ago
MenhirMike · 2 years ago
Somewhat related, there was a Laptop that could quick switch between Windows and Linux by abusing ACPI Sleep Support and rewiring the return vectors for the wake-up: https://www.youtube.com/watch?v=q5M0TwnkWUM (technical explanation starts at around 48:10)

It's all kinds of "I don't approve of the idea, but I tip my hat to the engineer that came up with it for sheer ingenuity."

bmacho · 2 years ago
tl;dw: It reserves half the RAM only to keep a sleeping windows/linux there.

Deleted Comment

Retr0id · 2 years ago
> While this driver is more or less just a funny joke about Windows and Linux, it does bring up the possibility of doing more with the same bug check callback feature. It's not clear what you can and can't do, but if it's possible to run an emulator after crashing, then surely it's possible to do other things, too. That's all assuming Microsoft doesn't revisit this feature of Windows and concludes it's just a bit too easy to exploit.

Anyone else getting ChatGPT vibes from this conclusion?

hhh · 2 years ago
No, but I can see why you’re seeing it. The “It’s not clear”, “While this”, and similar are common starts in GPT3/4 replies. There’s enough stuff in the later half of the sentences that don’t feel GPT-y to me.
globular-toast · 2 years ago
Where do you think ChatGPT learnt it from? I can see people having to get ChatGPT to write stuff for them to make sure what they wrote didn't accidentally look like what ChatGPT would have written. Then the weird feedback loops start...
robertlagrant · 2 years ago
They might've started with GPT and edited.
bil7 · 2 years ago
Not enough "it's important to consider"
litenboll · 2 years ago
Or "Ultimately, ..."
joe_guy · 2 years ago
What a strange conclusion for the author to reach.

What they're doing requires you to have code execution in the kernel. You're not just over the walls at that point, you've beheaded the king.

Deleted Comment

molticrystal · 2 years ago
> it does bring up the possibility of doing more with the same bug check callback feature.

Personally I would just want a power off that does not make me guess if will cause the raid volumes to need to rebuild.

But since we are in the realm of possibilities and wishlists, Magic SysRq commands for the windows kernel would rank fairly high. [0]

[0] https://www.kernel.org/doc/html/latest/admin-guide/sysrq.htm...

pjc50 · 2 years ago
Not really an exploit if you have to have Test Mode turned on. https://learn.microsoft.com/en-us/windows-hardware/drivers/i...
skrebbel · 2 years ago
Nobody says it’s an exploit
fluoridation · 2 years ago
The hack is not how the driver is loaded, the hack is how the driver abuses the bug check callback pointer.
FooBarBizBazz · 2 years ago
Once upon a time, there was a more serious effort at running Linux in a Windows device driver. It was called coLinux:

http://www.colinux.org/

You could run the Cygwin X server on the Windows side, and run X clients on the Linux side. It worked, and it was fast.

I think it required a lot of work whenever a new Linux kernel came out to put the appropriate "yield" code in, so probably maintenance was abandoned?

The last update on the homepage is a decade old. I wonder if it still works? It's all been made obsolete though by WSL, I reckon.

planede · 2 years ago
It was basically the same idea as WSL1, i.e. running the Linux kernel (or equivalent) in Windows userspace.

It actually worked decently when I tried it back then.

Aaron2222 · 2 years ago
WSL1 implemented Linux syscalls inside the NT kernel (not in userspace).
bitwize · 2 years ago
Drat, I was hoping for a chainload of the Linux kernel. A sort of "here's a quarter, kid, go get yourself a real operating system" option.
lightedman · 2 years ago
"It would seem that either it wasn't possible to run a full Linux distro, or it was simply too much of a hassle to get it to work"

If it could get that far, getting an older DSL distro or similar is probably not that far behind, honestly. Using a BSoD as an environment bootstrap mechanism is hilariously jank, but I've seen worse in my hacking days.