r/kernel • • 2d ago

binfmt_pe: PE & ELF Linux Kernel Loader

The concept of Linux running Windows apps is becoming true.
With the use of Reverse-Engineering, Coding, Creativity and of course AI. We managed to be able to get the Linux Kernel running its first Windows Executable NATIVELY.

More information at: https://github.com/EisaWando/Native-Windows-Executables-on-Linux

0 Upvotes

10 comments sorted by

4

u/FloweyTheFlower420 2d ago

why not use wine? why bother putting this in the kernel? I don't see any benefits to adding PE support to the kernel.

1

u/Jolly_Landscape_3038 2d ago

Making the Kernel natively recognizing windows executables and running them on that level gives huge performance boots, as well as supporting games and software that are specific kernel dependent. for example: a game like fc27 wont even boot on linux even while using wine, because the anticheat is made to only accept windows operating systems. And with an idea and concept like this, we can bypass that problem completely and have more people switch to linux and finish MicroSlop's monopoly over operating systems' marker.

5

u/FloweyTheFlower420 2d ago

Making the Kernel natively recognizing windows executables and running them on that level gives huge performance boots

I don't believe this. Prove this to me with benchmarks.

as well as supporting games and software that are specific kernel dependent

Loading PE doesn't get you ABI compatibility nor does it get you a kernel driver interface compatible with windows

for example: a game like fc27 wont even boot on linux even while using wine, because the anticheat is made to only accept windows operating systems.

With your PE loader it won't load either. Loading PE doesn't get you kernel driver ABI compat between windows and linux.

And with an idea and concept like this, we can bypass that problem completely and have more people switch to linux and finish MicroSlop's monopoly over operating systems' marker.

It won't.

3

u/torsten_dev 2d ago edited 2d ago

You'd have to replicate a bunch of the work already done by Wine inside the kernel for marginal benefits. This would also increase the kernel attack surface massively for no reason.

I fail to see how this would get anti cheat to work on an open source user compilable kernel.

0

u/Jolly_Landscape_3038 2d ago

I agree with you, however the plan is to attract as many as software companies to invest in the Linux community. And about the attack surface, you are right about it but having a team with worldwide devs and cyber security experts would really help keeping the project and people safe.
In addition for that, our project wont stand still by itself, it will lean on some other opensourced projects like Wine to translate many functions and features to give a final and working result.

3

u/torsten_dev 2d ago

The worldwide developers and experts use Wine and Linux. They're not looking at some massive out of tree AI slop module.

Having the kernel read the magic PE bytes and hand it to wine to handle is like a 50 line project. Anything more is strictly unnecessary.

0

u/Jolly_Landscape_3038 2d ago

I respect you pov, and ik that things like this aint making sense at first. However when it will be able to open a window, draw pixels or do simple things windows is able to do easily then it would be an interesting concept.

3

u/gmes78 2d ago

Making the Kernel natively recognizing windows executables and running them

binfmt_misc already exists.

and running them on that level gives huge performance boots

No, it doesn't. The kernel doesn't affect how fast userspace code runs.

for example: a game like fc27 wont even boot on linux even while using wine, because the anticheat is made to only accept windows operating systems.

You can't fake TPM attestation results. Even if you did implement the full Windows kernel API, it still would refuse to run.

(And implementing that has nothing to do with writing a PE loader.)

0

u/Thin_Dragonfruit2254 2d ago

This is a very interesting "experiment".. keep on and share the results - I won't be able to assist gc I know nothing about Windows.

Loving the discussion btw.. carry on..

1

u/Jolly_Landscape_3038 1d ago

Appreciate it bro.