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, 17 Oct 2008 08:55:32 -0700
From:	Jeremy Fitzhardinge <jeremy@...p.org>
To:	Jike Song <albcamus@...il.com>
CC:	hpa@...or.com, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] x86: add missed clobber for 32-bit memmove

Jike Song wrote:
> memmove() is implemented by inline assembly. It calls std at first
> and cld at last, but EFLAGS still should be clobbered.
>   

I think x86 gcc assumes "cc" is always clobbered by asms.  Otherwise 
there'll need to be a lot more "cc" clobbers than this...

    J

> Signed-off-by: Jike Song <albcamus@...il.com>
> ---
>  arch/x86/lib/memcpy_32.c |    2 +-
>  1 files changed, 1 insertions(+), 1 deletions(-)
>
> diff --git a/arch/x86/lib/memcpy_32.c b/arch/x86/lib/memcpy_32.c
> index 5415a9d..99a8240 100644
> --- a/arch/x86/lib/memcpy_32.c
> +++ b/arch/x86/lib/memcpy_32.c
> @@ -36,7 +36,7 @@ void *memmove(void *dest, const void *src, size_t n)
>  			:"0" (n),
>  			 "1" (n-1+src),
>  			 "2" (n-1+dest)
> -			:"memory");
> +			:"cc", "memory");
>  	}
>  	return dest;
>  }
>   

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