lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date:	Thu, 13 Jan 2011 15:06:36 +0200
From:	Avi Kivity <avi@...hat.com>
To:	Jan Kiszka <jan.kiszka@...mens.com>
CC:	"Kirill A. Shutemov" <kirill@...temov.name>,
	Christoph Lameter <cl@...ux.com>,
	Marcelo Tosatti <mtosatti@...hat.com>,
	Thomas Gleixner <tglx@...utronix.de>,
	Ingo Molnar <mingo@...hat.com>,
	"H. Peter Anvin" <hpa@...or.com>, x86@...nel.org,
	kvm@...r.kernel.org, linux-kernel@...r.kernel.org,
	Pekka Enberg <penberg@...helsinki.fi>
Subject: Re: BUG: sleeping function called from invalid context at mm/slub.c:793

On 01/13/2011 02:59 PM, Jan Kiszka wrote:
> >  @@ -5351,6 +5351,9 @@ int kvm_arch_vcpu_ioctl_run(struct kvm_vcpu *vcpu, struct kvm_run *kvm_run)
> >   	int r;
> >   	sigset_t sigsaved;
> >
> >  +	if (!tsk_used_math(current)&&  init_fpu(current))
> >  +		return -ENOMEM;
> >  +
>
> Could become a rainy day for the kvm-kmod maintainer:
>
> For compat support on kernels without init_fpu exported yet, can I
> trigger the same result by simply issuing an FPU instruction here so
> that do_device_not_available will perform the allocation? Not really
> nice, but it doesn't appear to me like there is any code path that would
> complain about in-kernel FPU usage (provided we don't need math
> emulation - which is quite likely).

That's a pessimization, since it forces the fpu to be switched.  If both 
qemu and the guest don't use the fpu, we can run a guest with some other 
task's fpu loaded.

Oh, but if it's after the check for !tsk_used_math(), it only triggers 
once, so that's okay.  I guess something like mov %%xmm0, %%xmm0 should 
do nicely.

-- 
error compiling committee.c: too many arguments to function

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ