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, 3 Feb 2015 11:05:15 +0000
From:	David Vrabel <david.vrabel@...rix.com>
To:	"Luis R. Rodriguez" <mcgrof@...not-panic.com>,
	<david.vrabel@...rix.com>, <konrad.wilk@...cle.com>,
	<boris.ostrovsky@...cle.com>, <xen-devel@...ts.xenproject.org>
CC:	Borislav Petkov <bp@...e.de>, <kvm@...r.kernel.org>,
	"Luis R. Rodriguez" <mcgrof@...e.com>, <x86@...nel.org>,
	<linux-kernel@...r.kernel.org>, <rostedt@...dmis.org>,
	Andy Lutomirski <luto@...capital.net>,
	Ingo Molnar <mingo@...hat.com>,
	Jan Beulich <JBeulich@...e.com>,
	"H. Peter Anvin" <hpa@...or.com>,
	Masami Hiramatsu <masami.hiramatsu.pt@...achi.com>,
	Thomas Gleixner <tglx@...utronix.de>,
	<paulmck@...ux.vnet.ibm.com>
Subject: Re: [Xen-devel] [PATCH v5 1/2] xen: add xen_is_preemptible_hypercall()

On 27/01/15 01:51, Luis R. Rodriguez wrote:
> 
> +#ifndef CONFIG_PREEMPT
> +extern struct { char _entry[32]; } preemptible_hypercall_page[];
> +
> +static inline bool xen_is_preemptible_hypercall(struct pt_regs *regs)
> +{
> +	return !user_mode_vm(regs) &&
> +		regs->ip >= (unsigned long)preemptible_hypercall_page &&
> +		regs->ip < (unsigned long)preemptible_hypercall_page + PAGE_SIZE;

I asked for this test to be optimized.

	return (regs->ip >> PAGE_SHIFT)
            == ((unsigned long)preemptible_hypercall_page >> PAGE_SHIFT)
	    && !user_mode_vm(regs);

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