Date: Sat, 20 Oct 2018 22:14:30 +0000 (UTC) From: Conrad Meyer <cem@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r339499 - in head: lib/libc/gen sys/crypto/chacha20 Message-ID: <201810202214.w9KMEUrG062102@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: cem Date: Sat Oct 20 22:14:29 2018 New Revision: 339499 URL: https://svnweb.freebsd.org/changeset/base/339499 Log: Embedded chacha: Distinguish via dedicated macro Set embedding expectations via CHACHA_EMBED macro rather than _KERNEL definition. No functional change. Sponsored by: Dell EMC Isilon Modified: head/lib/libc/gen/arc4random.c head/sys/crypto/chacha20/chacha.h Modified: head/lib/libc/gen/arc4random.c ============================================================================== --- head/lib/libc/gen/arc4random.c Sat Oct 20 22:12:53 2018 (r339498) +++ head/lib/libc/gen/arc4random.c Sat Oct 20 22:14:29 2018 (r339499) @@ -41,6 +41,7 @@ __FBSDID("$FreeBSD$"); #include "libc_private.h" #include "un-namespace.h" +#define CHACHA_EMBED #define KEYSTREAM_ONLY #include "chacha.c" Modified: head/sys/crypto/chacha20/chacha.h ============================================================================== --- head/sys/crypto/chacha20/chacha.h Sat Oct 20 22:12:53 2018 (r339498) +++ head/sys/crypto/chacha20/chacha.h Sat Oct 20 22:14:29 2018 (r339499) @@ -20,10 +20,10 @@ Public domain. #define CHACHA_STATELEN (CHACHA_NONCELEN+CHACHA_CTRLEN) #define CHACHA_BLOCKLEN 64 -#ifdef _KERNEL -#define LOCAL -#else +#ifdef CHACHA_EMBED #define LOCAL static +#else +#define LOCAL #endif LOCAL void chacha_keysetup(struct chacha_ctx *x, const u_char *k, u_int kbits);
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201810202214.w9KMEUrG062102>