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:	Fri, 18 Sep 2015 08:57:05 -0500
From:	Josh Poimboeuf <jpoimboe@...hat.com>
To:	Chris J Arges <chris.j.arges@...onical.com>
Cc:	x86@...nel.org, tglx@...utronix.de, mingo@...hat.com,
	hpa@...or.com, live-patching@...r.kernel.org,
	linux-kernel@...r.kernel.org, mmarek@...e.cz, peterz@...radead.org,
	luto@...nel.org, bp@...en8.de, torvalds@...ux-foundation.org,
	andi@...stfloor.org, palves@...hat.com, namhyung@...il.com,
	bernd@...rovitsch.priv.at, akpm@...ux-foundation.org,
	konrad.wilk@...cle.com, boris.ostrovsky@...cle.com,
	david.vrabel@...rix.com, jeremy@...p.org, chrisw@...s-sol.org,
	akataria@...are.com, rusty@...tcorp.com.au,
	herbert@...dor.apana.org.au, davem@...emloft.net, pavel@....cz,
	rjw@...ysocki.net, len.brown@...el.com, matt.fleming@...el.com,
	David Hildenbrand <dahi@...ux.vnet.ibm.com>,
	"Michael S. Tsirkin" <mst@...hat.com>
Subject: Re: [PATCH 1/3] x86/uaccess: Add stack frame output operand in
 get_user inline asm

On Thu, Sep 17, 2015 at 05:14:35PM -0500, Chris J Arges wrote:
> Numerous 'call without frame pointer save/setup' warnings are introduced by
> stacktool because of functions using the get_user macro. Bad stack traces could
> occur due to lack of or misplacement of stack frame setup code.
> 
> This patch forces a stack frame to be created before the inline asm code if
> CONFIG_FRAME_POINTER is enabled by listing the stack pointer as an output
> operand for the get_user inline assembly statement.
> 
> Signed-off-by: Chris J Arges <chris.j.arges@...onical.com>

Reviewed-by: Josh Poimboeuf <jpoimboe@...hat.com>

> ---
>  arch/x86/include/asm/uaccess.h | 5 +++--
>  1 file changed, 3 insertions(+), 2 deletions(-)
> 
> diff --git a/arch/x86/include/asm/uaccess.h b/arch/x86/include/asm/uaccess.h
> index a8df874..55b8db5 100644
> --- a/arch/x86/include/asm/uaccess.h
> +++ b/arch/x86/include/asm/uaccess.h
> @@ -176,10 +176,11 @@ __typeof__(__builtin_choose_expr(sizeof(x) > sizeof(0UL), 0ULL, 0UL))
>  ({									\
>  	int __ret_gu;							\
>  	register __inttype(*(ptr)) __val_gu asm("%"_ASM_DX);		\
> +	register void *__sp asm(_ASM_SP);				\
>  	__chk_user_ptr(ptr);						\
>  	might_fault();							\
> -	asm volatile("call __get_user_%P3"				\
> -		     : "=a" (__ret_gu), "=r" (__val_gu)			\
> +	asm volatile("call __get_user_%P4"				\
> +		     : "=a" (__ret_gu), "=r" (__val_gu), "+r" (__sp)	\
>  		     : "0" (ptr), "i" (sizeof(*(ptr))));		\
>  	(x) = (__force __typeof__(*(ptr))) __val_gu;			\
>  	__ret_gu;							\
> -- 
> 1.9.1
> 
--
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