Date: Sat, 12 Feb 2022 22:58:32 GMT From: "David E. O'Brien" <obrien@FreeBSD.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org Subject: git: 064aaaffaca0 - stable/12 - Embedded chacha: Distinguish via dedicated macro Message-ID: <202202122258.21CMwWbJ037832@gitrepo.freebsd.org>
next in thread | raw e-mail | index | archive | help
The branch stable/12 has been updated by obrien: URL: https://cgit.FreeBSD.org/src/commit/?id=064aaaffaca07951ca7bd7b4d9b6f5d38a69854b commit 064aaaffaca07951ca7bd7b4d9b6f5d38a69854b Author: Conrad Meyer <cem@FreeBSD.org> AuthorDate: 2018-10-20 22:14:29 +0000 Commit: David E. O'Brien <obrien@FreeBSD.org> CommitDate: 2022-02-12 22:27:33 +0000 Embedded chacha: Distinguish via dedicated macro Set embedding expectations via CHACHA_EMBED macro rather than _KERNEL definition. No functional change. (cherry picked from commit 243e09430a07b393a8114c1caa3a65c0e993d645) --- lib/libc/gen/arc4random.c | 1 + sys/crypto/chacha20/chacha.h | 6 +++--- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/lib/libc/gen/arc4random.c b/lib/libc/gen/arc4random.c index 3a884fa8ace4..86e16e3aa857 100644 --- a/lib/libc/gen/arc4random.c +++ b/lib/libc/gen/arc4random.c @@ -41,6 +41,7 @@ __FBSDID("$FreeBSD$"); #include "libc_private.h" #include "un-namespace.h" +#define CHACHA_EMBED #define KEYSTREAM_ONLY #include "chacha.c" diff --git a/sys/crypto/chacha20/chacha.h b/sys/crypto/chacha20/chacha.h index d150093c6f93..73548331cc85 100644 --- a/sys/crypto/chacha20/chacha.h +++ b/sys/crypto/chacha20/chacha.h @@ -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?202202122258.21CMwWbJ037832>