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]
Message-ID: <54C0F335.6030403@citrix.com>
Date:	Thu, 22 Jan 2015 12:55:17 +0000
From:	David Vrabel <david.vrabel@...rix.com>
To:	Andy Lutomirski <luto@...capital.net>,
	"Luis R. Rodriguez" <mcgrof@...not-panic.com>
CC:	kvm list <kvm@...r.kernel.org>,
	"Luis R. Rodriguez" <mcgrof@...e.com>, X86 ML <x86@...nel.org>,
	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
	Steven Rostedt <rostedt@...dmis.org>,
	Ingo Molnar <mingo@...hat.com>,
	David Vrabel <david.vrabel@...rix.com>,
	Jan Beulich <JBeulich@...e.com>,
	"H. Peter Anvin" <hpa@...or.com>,
	Masami Hiramatsu <masami.hiramatsu.pt@...achi.com>,
	"xen-devel@...ts.xenproject.org" <xen-devel@...ts.xenproject.org>,
	Boris Ostrovsky <boris.ostrovsky@...cle.com>,
	Borislav Petkov <bp@...e.de>,
	Thomas Gleixner <tglx@...utronix.de>
Subject: Re: [Xen-devel] [RFC v3 2/2] x86/xen: allow privcmd hypercalls to
 be preempted

On 22/01/15 03:18, Andy Lutomirski wrote:
>> --- a/drivers/xen/events/events_base.c
>> +++ b/drivers/xen/events/events_base.c
>> @@ -32,6 +32,8 @@
>>  #include <linux/slab.h>
>>  #include <linux/irqnr.h>
>>  #include <linux/pci.h>
>> +#include <linux/sched.h>
>> +#include <linux/kprobes.h>
>>
>>  #ifdef CONFIG_X86
>>  #include <asm/desc.h>
>> @@ -1243,6 +1245,17 @@ void xen_evtchn_do_upcall(struct pt_regs *regs)
>>         set_irq_regs(old_regs);
>>  }
>>
>> +notrace void xen_end_upcall(struct pt_regs *regs)
>> +{
>> +       if (!xen_is_preemptible_hypercall(regs) ||
>> +           __this_cpu_read(xed_nesting_count))
>> +               return;
> 
> What's xed_nesting_count?

It used to prevent nested upcalls when a hypercall called from an upcall
triggers another upcall.

There's no way a such a nested hypercall can be preemptible so the check
cfor xed_nesting_count an be removed from here.

David
--
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