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: <20090423060917.GF13896@one.firstfloor.org>
Date:	Thu, 23 Apr 2009 08:09:17 +0200
From:	Andi Kleen <andi@...stfloor.org>
To:	Joe Damato <ice799@...il.com>
Cc:	Andi Kleen <andi@...stfloor.org>, Ingo Molnar <mingo@...e.hu>,
	Jeff Garzik <jeff@...zik.org>,
	Linus Torvalds <torvalds@...ux-foundation.org>,
	LKML <linux-kernel@...r.kernel.org>,
	Thomas Gleixner <tglx@...utronix.de>,
	Ingo Molnar <mingo@...hat.com>,
	"H. Peter Anvin" <hpa@...or.com>, x86@...nel.org
Subject: Re: [PATCH] X86-32: Let gcc decide whether to inline memcpy was Re: New x86 warning

> > It's a very attractive patch because it removes a lot of code:
> 
> I think this patch is great. Perhaps this would be a good time to also
> clean out memset for x86_32? (If needed, I can start a new email

Yes looks reasonable. You can add

Reviewed-by: Andi Kleen <ak@...ux.intel.com>

if you fix the comment below.

In fact it should be synced to do the same as on 64bit which already
does all that and was originally written for gcc 3.1/3.2 ...

-Andi
> +void *__memset(void *s, char c, size_t count)
> +{
> +	int d0, d1;
> +	asm volatile("rep\n\t"
> +		     "stosb"
> +		     : "=&c" (d0), "=&D" (d1)
> +		     : "a" (c), "1" (s), "0" (count)
> +		     : "memory");
> +	return s;
> +}
> +EXPORT_SYMBOL(__memset);

I suspect _memset is not needed anymore, just memset() alone
should be enough. So remove the wrapper below.

> +
>  void *memset(void *s, int c, size_t count)
>  {
>  	return __memset(s, c, count);
> -- 
> 1.6.2
> 

-- 
ak@...ux.intel.com -- Speaking for myself only.
--
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