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
| ||
|
Date: Mon, 24 Feb 2014 11:08:11 -0800 From: "H. Peter Anvin" <hpa@...or.com> To: Vivek Goyal <vgoyal@...hat.com>, linux-kernel@...r.kernel.org, kexec@...ts.infradead.org CC: ebiederm@...ssion.com, mjg59@...f.ucam.org, greg@...ah.com, jkosina@...e.cz Subject: Re: [PATCH 07/11] kexec: Create a relocatable object called purgatory On 01/27/2014 10:57 AM, Vivek Goyal wrote: > + > +/** > + * memcpy - Copy one area of memory to another > + * @dest: Where to copy to > + * @src: Where to copy from > + * @count: The size of the area. > + */ > +static void *memcpy(void *dest, const void *src, unsigned long count) > +{ > + char *tmp = dest; > + const char *s = src; > + > + while (count--) > + *tmp++ = *s++; > + return dest; > +} > + > +static int memcmp(const void *cs, const void *ct, size_t count) > +{ > + const unsigned char *su1, *su2; > + int res = 0; > + > + for (su1 = cs, su2 = ct; 0 < count; ++su1, ++su2, count--) > + if ((res = *su1 - *su2) != 0) > + break; > + return res; > +} > + <bikeshed> There multiple implementations of memcpy(), memcmp() and memset() in this patchset, and they make my eyes want to bleed (especially memcmp()). Can we centralize there, and perhaps even share code with the stuff in arch/x86/boot already? </bikeshed> -hpa -- 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