qemu with kvm is extremly slow in 2.6.34.1.

Discuss and suggest new grsecurity features

qemu with kvm is extremly slow in 2.6.34.1.

Postby username » Tue Jul 13, 2010 4:15 am

- qemu-kvm 0.12.4
- kernel 2.6.34.1
- grsecurity 2.2.0-2.6.34.1-201007101507
- gentoo hardened from anarchy overlay [1].
- amd64

qemu-kvm is very slow and produces 100% load on one core. I can even see the bios printing single characters. The problem first occured in an ebuild after 2.6.33. 2.6.33-r1 does not work anymore. [2] is the commit from 2.6.33 to 2.6.33-r1. The problem seems to be related to work done between 2.1.14-2.6.33-201003071645 (2.6.33) and 2.1.14-2.6.33.2-201004071936 (2.6.33-r1) or between kernel 2.6.33 and 2.6.33.2 (contained in 2.6.33-r1). The patches of gentoo have not changed between 2.6.33 and 2.6.33-r1.

[1] http://git.overlays.gentoo.org/gitweb/?p=dev/anarchy.git;a=tree;f=sys-kernel/hardened-sources;h=b355c2d5b4498ba992f66d7372662fbe83c224e0;hb=HEAD
[2] http://git.overlays.gentoo.org/gitweb/?p=proj/hardened-dev.git;a=commit;h=9e3c62080f1be0d1615694d9b79e1fb5e233b45a

I hope that helps to find the problem. I do not use UDEREF.
Last edited by username on Fri Jul 16, 2010 9:02 am, edited 1 time in total.
username
 
Posts: 3
Joined: Sun Jul 11, 2010 7:39 am

Re: qemu with kvm is extremly slow in 2.6.34.1.

Postby username » Tue Jul 13, 2010 4:16 am

Sorry for the wrong board. :-(
username
 
Posts: 3
Joined: Sun Jul 11, 2010 7:39 am

Re: qemu with kvm is extremly slow in 2.6.34.1.

Postby PaX Team » Fri Jul 16, 2010 6:05 pm

username wrote:The problem seems to be related to work done between 2.1.14-2.6.33-201003071645 (2.6.33) and 2.1.14-2.6.33.2-201004071936 (2.6.33-r1) or between kernel 2.6.33 and 2.6.33.2 (contained in 2.6.33-r1).
what changed in PaX in that timeframe was the introduction of UDEREF for amd64. did you perhaps enable it? if you did, try booting with pax_nouderef and see if it helps (in general, read its config help, it's not a 'free' feature on amd64, unfortunately).
PaX Team
 
Posts: 2310
Joined: Mon Mar 18, 2002 4:35 pm

Re: qemu with kvm is extremly slow in 2.6.34.1.

Postby konst » Fri Jul 16, 2010 9:43 pm

PaX Team wrote:
username wrote:The problem seems to be related to work done between 2.1.14-2.6.33-201003071645 (2.6.33) and 2.1.14-2.6.33.2-201004071936 (2.6.33-r1) or between kernel 2.6.33 and 2.6.33.2 (contained in 2.6.33-r1).
what changed in PaX in that timeframe was the introduction of UDEREF for amd64. did you perhaps enable it? if you did, try booting with pax_nouderef and see if it helps (in general, read its config help, it's not a 'free' feature on amd64, unfortunately).


Haven't tried it yet but in the help screen it says if you have hardware assisted virtualization there shouldn't be a slowdown.
konst
 
Posts: 21
Joined: Fri Jul 10, 2009 8:23 am

Re: qemu with kvm is extremly slow in 2.6.34.1.

Postby PaX Team » Fri Jul 16, 2010 10:07 pm

konst wrote:Haven't tried it yet but in the help screen it says if you have hardware assisted virtualization there shouldn't be a slowdown.
the help wasn't updated for the amd64 version since it's kinda experimental still, better read the announcement email on the list about what to expect ;).
PaX Team
 
Posts: 2310
Joined: Mon Mar 18, 2002 4:35 pm

Re: qemu with kvm is extremly slow in 2.6.34.1.

Postby username » Sat Jul 17, 2010 7:41 am

As I said before, I do not use UDEREF at all. It is disabled in the kernel configuration. I tried to boot with the kernel parameter, but it did not solve the problem. I don't understand, that nobody else has the same problem. I do not configure PaX or grsec myself. I use the predefined profiles from hardened gentoo. Is there anything else, I need to disable in the kernel configuration?
username
 
Posts: 3
Joined: Sun Jul 11, 2010 7:39 am

Re: qemu with kvm is extremly slow in 2.6.34.1.

Postby PaX Team » Sat Jul 17, 2010 10:30 am

username wrote:As I said before, I do not use UDEREF at all.
oh sorry, i missed it, must be the heat ;).
Is there anything else, I need to disable in the kernel configuration?
yes, do you have KERNEXEC enabled? it enables the common infrastructure used by UDEREF as well and can cause the slowdown.
PaX Team
 
Posts: 2310
Joined: Mon Mar 18, 2002 4:35 pm

Re: qemu with kvm is extremly slow in 2.6.34.1.

Postby Jorge » Thu Sep 22, 2011 4:08 am

oh, i've been searching for the same issue and came across boardreader.com/thread/Hardened_kernel_2_6_38_and_latest_qemu_k_1mboX210.html. Thanks you too, for providing some hints in order to solve the slow speed of qemu+kvm!
Jorge
 
Posts: 3
Joined: Thu Sep 01, 2011 5:21 am

Re: qemu with kvm is extremly slow in 2.6.34.1.

Postby PaX Team » Tue Sep 18, 2012 5:58 am

as of yesterday, this problem should be fixed finally.
PaX Team
 
Posts: 2310
Joined: Mon Mar 18, 2002 4:35 pm


Return to grsecurity development

cron