uksm icon indicating copy to clipboard operation
uksm copied to clipboard

Merging uksm upstream?

Open Harvie opened this issue 5 years ago • 16 comments

Hello, can we expect this to be merged upstream? are there some reasons why this might not be included?

Harvie avatar Mar 31 '19 19:03 Harvie

I have no plans. I think it would be a lot of work and this concept introduce security risks. That would open kernel for new vulnerabilities.

dolohow avatar Apr 01 '19 09:04 dolohow

I think it would be a lot of work

But it would be work that leads somewhere. Just maintaining these patches outside of kernel tree is also lot of work, but it's only useful in the short run. All similar projects that maintain kernel patches outside upstream eventualy get tired and cease to maintain their codebase...

That would open kernel for new vulnerabilities.

Well. That might be true. I don't fully understand how this side-chanel atack vector on samepage merging is supposed to work. But there are two concerns:

1.) Kernel already contains KSM, which probably suffers from the same problem (eg. attacking one Qemu VM from another) and nobody seems to complain...

2.) I think this is OK as long as it's disabled by default and users are warned about the risks they can face if they're going to enable it.

Harvie avatar Apr 01 '19 12:04 Harvie

I'll try to do that, but

  1. I am not the initial creator of those patches.
  2. I have limited time to adjust the code to fit upstream needs. and I'll probably fail with this effort, but at least I'll try

dolohow avatar Apr 25 '19 17:04 dolohow

If you put upstream feedback here, then we (community) could help with some issues together

Szpadel avatar Apr 25 '19 18:04 Szpadel

@Szpadel Thanks for kind words :)

dolohow avatar Apr 25 '19 18:04 dolohow

I will post those patches in the next merge window as they are and let's see what developers will say.

dolohow avatar Sep 25 '19 21:09 dolohow

We know that current patch is unacceptable for merge from previous attempt. We should send the patch as is at any time since during merge window there will be no time to review it.

demfloro avatar Sep 26 '19 06:09 demfloro

So there was an attempt, let me check...

dolohow avatar Sep 26 '19 08:09 dolohow

Looks like a bit of a work... i will try to do some coding, but can't promise anything since I am very short with time :(

dolohow avatar Sep 30 '19 15:09 dolohow

5.4 got some fixes to zram race conditions, maybe those issues are resolved now

https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=f7daefe4231e57381d92c2e2ad905a899c28e402

Szpadel avatar Nov 15 '19 21:11 Szpadel

Any progress on this?

soredake avatar Aug 03 '21 14:08 soredake

I would love to see that integrated into the main kernel, it would benefit so many systems. Is there any status updates on that?

Evengard avatar Sep 24 '21 01:09 Evengard

On a side note, there are threads for this on Proxmox website as well: https://forum.proxmox.com/threads/can-you-please-add-uksm-into-kernel.32778/ https://bugzilla.proxmox.com/show_bug.cgi?id=3637

Harvie avatar Sep 24 '21 07:09 Harvie

@dolohow

soredake avatar Nov 19 '21 16:11 soredake

The problem with merging this upstream is that there's no-one who really understands the code to maintain it. IIRC, @dolohow stepped up to update the old patches, but did not write them, nor has a complete understanding of how the code works.
While updating the code manually would not be necessary anymore, without anyone capable of fixing bugs or making improvements, merging upstream would just leave it unmaintained in-kernel, with all the issues that come with that.
Not only would this be difficult to get approved to merge, its value would also be debatable.
Without a maintainer stepping up with understanding of the code I don't see this getting merged upstream.

SharkWipf avatar Nov 19 '21 16:11 SharkWipf

Thank you guys for working on this. I'm grateful to the original authors as well. The kernel coding is a bit of black art for me.... yet this code works for me.

AGenchev avatar Dec 09 '21 01:12 AGenchev