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:	Wed, 8 Aug 2007 11:38:21 +0200
From:	Andi Kleen <ak@...e.de>
To:	Glauber de Oliveira Costa <gcosta@...hat.com>
Cc:	linux-kernel@...r.kernel.org, akpm@...ux-foundation.org,
	rusty@...tcorp.com.au, mingo@...e.hu, chrisw@...s-sol.org,
	jeremy@...p.org, avi@...ranet.com, anthony@...emonkey.ws,
	virtualization@...ts.linux-foundation.org, lguest@...abs.org,
	Steven Rostedt <rostedt@...dmis.org>
Subject: Re: [PATCH 18/25] [PATCH] turn priviled operations into macros in entry.S


> +#define SYSRETQ						\
> +			movq	%gs:pda_oldrsp,%rsp;	\
> +			swapgs;				\
> +			sysretq;

When the macro does more than sysret it should have a different
name


>   */
>  	.globl int_ret_from_sys_call
>  int_ret_from_sys_call:
> -	cli
> +	DISABLE_INTERRUPTS(CLBR_ANY)

ANY? There are certainly some registers alive at this point like rax

>  retint_restore_args:
> -	cli
> +	DISABLE_INTERRUPTS(CLBR_ANY)

Similar.


>  	/*
>  	 * The iretq could re-enable interrupts:
>  	 */
> @@ -566,10 +587,14 @@ retint_restore_args:
>  restore_args:
>  	RESTORE_ARGS 0,8,0
>  iret_label:
> -	iretq
> +#ifdef CONFIG_PARAVIRT
> +	INTERRUPT_RETURN
> +ENTRY(native_iret)

ENTRY adds alignment. Why do you need that export anyways? 

> +#endif
> +1:	iretq
>
>  	.section __ex_table,"a"
> -	.quad iret_label,bad_iret
> +	.quad 1b, bad_iret

iret_label seems more expressive to me than 1

> +	ENABLE_INTERRUPTS(CLBR_NONE)

In many of the CLBR_NONEs there are actually some registers free;
but it might be safer to keep it this way. But if some client can get 
significantly better code with one or two free registers it might 
be worthwhile to investigate.

> -	swapgs
> +	SWAPGS_NOSTACK

There's still stack here

>  paranoid_restore\trace:
>  	RESTORE_ALL 8
> -	iretq
> +	INTERRUPT_RETURN

I suspect Xen will need much more changes anyways because of its
ring 3 guest. Are these changes sufficient for lguest?

-Andi

-
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