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] [thread-next>] [day] [month] [year] [list]
Date:	Tue, 10 Jul 2007 18:01:18 +1000
From:	Rusty Russell <rusty@...tcorp.com.au>
To:	Avi Kivity <avi@...ranet.com>
Cc:	Ingo Molnar <mingo@...e.hu>, kvm-devel@...ts.sourceforge.net,
	linux-kernel@...r.kernel.org
Subject: Re: [kvm-devel] [PATCH][RFC] kvm-scheduler integration

On Tue, 2007-07-10 at 10:19 +0300, Avi Kivity wrote:
> Rusty Russell wrote:
> > Exactly, if we have two at the same time, they need to know about each
> > other.  Providing infrastructure which lets them avoid thinking about it
> > is the wrong direction.
> >   
> 
> With a kvm-specific hook, they can't stop on each other (there can only 
> be one).
> With a list, they don't stomp on each other.
> With a struct preempt_ops but no list, as you propose, they can and will 
> stomp on each other.

I'm not talking about the actual overwriting of someone else's hook.
I'm talking about semantic conflicts involving the actual CPU state.

If I'm lazily restoring some CPU state because I know I don't use it,
and you're lazily restoring some CPU state because you don't use it, we
need to make sure that state doesn't intersect: ie. we need to be aware
of each other.  Only providing a single hook per task forces the second
user to think about it (maybe that lazy state saving needs to be
extracted into common code).

> I guess I can put it in arch specific code, but that means both i386 and 
> x86_64.
> 
> Once we have another user we can try to generalize it.

The problem is that the arch hooks are in the wrong place: 

> > Which brings us to the question: why do you want interrupts enabled?
> 
> The sched in hook (vcpu_load) sometimes needs to issue an IPI in order 
> to flush the VT registers from another cpu into memory.

OK, I'll have to go away and read the code for this.

BTW, I have no problem with #ifdef KVM-style code in arch-specifics.
It's kernel/sched.c which is jarring...

Thanks,
Rusty.

-
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