Date: Fri, 3 Feb 2017 15:13:36 -0700 (MST) From: Warren Block <wblock@wonkity.com> To: "Ngie Cooper (yaneurabeya)" <yaneurabeya@gmail.com> Cc: Warren Block <wblock@FreeBSD.org>, src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r313169 - head/tools/build/options Message-ID: <alpine.BSF.2.20.1702031506540.71009@wonkity.com> In-Reply-To: <F5432A62-6B10-4297-9182-32F0DDB4B467@gmail.com> References: <201702031909.v13J9kGN035880@repo.freebsd.org> <F5432A62-6B10-4297-9182-32F0DDB4B467@gmail.com>
next in thread | previous in thread | raw e-mail | index | archive | help
On Fri, 3 Feb 2017, Ngie Cooper (yaneurabeya) wrote: > >> On Feb 3, 2017, at 11:09, Warren Block <wblock@FreeBSD.org> wrote: >> >> Author: wblock (doc committer) >> Date: Fri Feb 3 19:09:46 2017 >> New Revision: 313169 >> URL: https://svnweb.freebsd.org/changeset/base/313169 >> >> Log: >> Clarify some option descriptions, add a line of text to makeman to >> add the slightest hint of a shade of a clue of what it does. >> >> Sponsored by: iXsystems >> >> Modified: >> head/tools/build/options/WITHOUT_BLACKLIST >> head/tools/build/options/WITHOUT_CLANG_BOOTSTRAP >> head/tools/build/options/WITHOUT_CROSS_COMPILER >> head/tools/build/options/WITHOUT_DIALOG >> head/tools/build/options/WITHOUT_DMAGENT >> head/tools/build/options/WITHOUT_DOCCOMPRESS >> head/tools/build/options/WITHOUT_GPL_DTC >> head/tools/build/options/WITHOUT_INSTALLLIB >> head/tools/build/options/WITHOUT_KERBEROS >> head/tools/build/options/WITH_CCACHE_BUILD >> head/tools/build/options/WITH_DIRDEPS_BUILD >> head/tools/build/options/WITH_INSTALL_AS_USER >> head/tools/build/options/WITH_META_MODE >> head/tools/build/options/WITH_STAGING_MAN >> head/tools/build/options/makeman > > I’m ok with the overall change, but next time, could changes to makeman be committed separately from the WITH* options to make it easier to MFC? Also, speaking of MFCing the change, will this ever be MFCed? Sorry, was not planning on MFCing the makeman change, although it wouldn't hurt. From owner-svn-src-all@freebsd.org Fri Feb 3 22:26:21 2017 Return-Path: <owner-svn-src-all@freebsd.org> Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id AF00CCCF24E; Fri, 3 Feb 2017 22:26:21 +0000 (UTC) (envelope-from gnn@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 6E92EE01; Fri, 3 Feb 2017 22:26:21 +0000 (UTC) (envelope-from gnn@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v13MQKjC018115; Fri, 3 Feb 2017 22:26:20 GMT (envelope-from gnn@FreeBSD.org) Received: (from gnn@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v13MQKHG018109; Fri, 3 Feb 2017 22:26:20 GMT (envelope-from gnn@FreeBSD.org) Message-Id: <201702032226.v13MQKHG018109@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gnn set sender to gnn@FreeBSD.org using -f From: "George V. Neville-Neil" <gnn@FreeBSD.org> Date: Fri, 3 Feb 2017 22:26:20 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r313176 - in head/sys: cddl/contrib/opensolaris/uts/common/dtrace cddl/contrib/opensolaris/uts/common/sys modules/dtrace/dtrace modules/dtrace/fasttrap modules/dtrace/systrace X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" <svn-src-all.freebsd.org> List-Unsubscribe: <https://lists.freebsd.org/mailman/options/svn-src-all>, <mailto:svn-src-all-request@freebsd.org?subject=unsubscribe> List-Archive: <http://lists.freebsd.org/pipermail/svn-src-all/> List-Post: <mailto:svn-src-all@freebsd.org> List-Help: <mailto:svn-src-all-request@freebsd.org?subject=help> List-Subscribe: <https://lists.freebsd.org/mailman/listinfo/svn-src-all>, <mailto:svn-src-all-request@freebsd.org?subject=subscribe> X-List-Received-Date: Fri, 03 Feb 2017 22:26:21 -0000 Author: gnn Date: Fri Feb 3 22:26:19 2017 New Revision: 313176 URL: https://svnweb.freebsd.org/changeset/base/313176 Log: Replace the implementation of DTrace's RAND subroutine for generating low-quality random numbers with a modern implementation (xoroshiro128+) that is capable of generating better quality randomness without compromising performance. Submitted by: Graeme Jenkinson Reviewed by: markj MFC after: 2 weeks Sponsored by: DARPA, AFRL Differential Revision: https://reviews.freebsd.org/D9051 Modified: head/sys/cddl/contrib/opensolaris/uts/common/dtrace/dtrace.c head/sys/cddl/contrib/opensolaris/uts/common/sys/dtrace_impl.h head/sys/modules/dtrace/dtrace/Makefile head/sys/modules/dtrace/fasttrap/Makefile head/sys/modules/dtrace/systrace/Makefile Modified: head/sys/cddl/contrib/opensolaris/uts/common/dtrace/dtrace.c ============================================================================== --- head/sys/cddl/contrib/opensolaris/uts/common/dtrace/dtrace.c Fri Feb 3 21:37:27 2017 (r313175) +++ head/sys/cddl/contrib/opensolaris/uts/common/dtrace/dtrace.c Fri Feb 3 22:26:19 2017 (r313176) @@ -124,6 +124,7 @@ #include <sys/lock.h> #include <sys/mutex.h> #include <sys/ptrace.h> +#include <sys/random.h> #include <sys/rwlock.h> #include <sys/sx.h> #include <sys/sysctl.h> @@ -136,6 +137,8 @@ #include "dtrace_debug.c" #endif +#include "dtrace_xoroshiro128_plus.h" + /* * DTrace Tunable Variables * @@ -298,7 +301,6 @@ static kmutex_t dtrace_meta_lock; /* me #define vuprintf vprintf #define ttoproc(_a) ((_a)->td_proc) #define crgetzoneid(_a) 0 -#define NCPU MAXCPU #define SNOCD 0 #define CPU_ON_INTR(_a) 0 @@ -4236,7 +4238,8 @@ dtrace_dif_subr(uint_t subr, uint_t rd, switch (subr) { case DIF_SUBR_RAND: - regs[rd] = (dtrace_gethrtime() * 2416 + 374441) % 1771875; + regs[rd] = dtrace_xoroshiro128_plus_next( + state->dts_rstate[curcpu]); break; #ifdef illumos @@ -14495,6 +14498,7 @@ dtrace_state_create(struct cdev *dev, st dtrace_state_t *state; dtrace_optval_t *opt; int bufsize = NCPU * sizeof (dtrace_buffer_t), i; + int cpu_it; ASSERT(MUTEX_HELD(&dtrace_lock)); ASSERT(MUTEX_HELD(&cpu_lock)); @@ -14550,6 +14554,21 @@ dtrace_state_create(struct cdev *dev, st state->dts_buffer = kmem_zalloc(bufsize, KM_SLEEP); state->dts_aggbuffer = kmem_zalloc(bufsize, KM_SLEEP); + /* + * Allocate and initialise the per-process per-CPU random state. + * SI_SUB_RANDOM < SI_SUB_DTRACE_ANON therefore entropy device is + * assumed to be seeded at this point (if from Fortuna seed file). + */ + (void) read_random(&state->dts_rstate[0], 2 * sizeof(uint64_t)); + for (cpu_it = 1; cpu_it < NCPU; cpu_it++) { + /* + * Each CPU is assigned a 2^64 period, non-overlapping + * subsequence. + */ + dtrace_xoroshiro128_plus_jump(state->dts_rstate[cpu_it-1], + state->dts_rstate[cpu_it]); + } + #ifdef illumos state->dts_cleaner = CYCLIC_NONE; state->dts_deadman = CYCLIC_NONE; Modified: head/sys/cddl/contrib/opensolaris/uts/common/sys/dtrace_impl.h ============================================================================== --- head/sys/cddl/contrib/opensolaris/uts/common/sys/dtrace_impl.h Fri Feb 3 21:37:27 2017 (r313175) +++ head/sys/cddl/contrib/opensolaris/uts/common/sys/dtrace_impl.h Fri Feb 3 22:26:19 2017 (r313176) @@ -50,6 +50,7 @@ extern "C" { */ #include <sys/dtrace.h> + #ifndef illumos #ifdef __sparcv9 typedef uint32_t pc_t; @@ -65,6 +66,10 @@ typedef u_long greg_t; #define DTRACE_MAXPROPLEN 128 #define DTRACE_DYNVAR_CHUNKSIZE 256 +#ifdef __FreeBSD__ +#define NCPU MAXCPU +#endif /* __FreeBSD__ */ + struct dtrace_probe; struct dtrace_ecb; struct dtrace_predicate; @@ -1169,6 +1174,7 @@ struct dtrace_state { dtrace_cred_t dts_cred; /* credentials */ size_t dts_nretained; /* number of retained enabs */ int dts_getf; /* number of getf() calls */ + uint64_t dts_rstate[NCPU][2]; /* per-CPU random state */ }; struct dtrace_provider { Modified: head/sys/modules/dtrace/dtrace/Makefile ============================================================================== --- head/sys/modules/dtrace/dtrace/Makefile Fri Feb 3 21:37:27 2017 (r313175) +++ head/sys/modules/dtrace/dtrace/Makefile Fri Feb 3 22:26:19 2017 (r313176) @@ -12,6 +12,7 @@ ARCHDIR= ${MACHINE_CPUARCH} KMOD= dtrace SRCS= dtrace.c \ + dtrace_xoroshiro128_plus.c \ dtrace_asm.S \ dtrace_subr.c @@ -42,6 +43,7 @@ CFLAGS+= -I${SYSDIR}/cddl/compat/opensol -I${SYSDIR}/cddl/dev/dtrace \ -I${SYSDIR}/cddl/dev/dtrace/${ARCHDIR} \ -I${SYSDIR}/cddl/contrib/opensolaris/uts/common \ + -I${SYSDIR}/cddl/contrib/opensolaris/uts/common/dtrace \ -I${SYSDIR}/cddl/contrib/opensolaris/common/util \ -I${SYSDIR} -DDIS_MEM Modified: head/sys/modules/dtrace/fasttrap/Makefile ============================================================================== --- head/sys/modules/dtrace/fasttrap/Makefile Fri Feb 3 21:37:27 2017 (r313175) +++ head/sys/modules/dtrace/fasttrap/Makefile Fri Feb 3 22:26:19 2017 (r313176) @@ -10,6 +10,7 @@ SRCS+= vnode_if.h CFLAGS+= -I${SYSDIR}/cddl/compat/opensolaris \ -I${SYSDIR}/cddl/contrib/opensolaris/uts/common \ + -I${SYSDIR}/cddl/contrib/opensolaris/uts/common/dtrace \ -I${SYSDIR} .if ${MACHINE_CPUARCH} == "amd64" || ${MACHINE_CPUARCH} == "i386" Modified: head/sys/modules/dtrace/systrace/Makefile ============================================================================== --- head/sys/modules/dtrace/systrace/Makefile Fri Feb 3 21:37:27 2017 (r313175) +++ head/sys/modules/dtrace/systrace/Makefile Fri Feb 3 22:26:19 2017 (r313176) @@ -10,6 +10,7 @@ SRCS+= vnode_if.h CFLAGS+= -I${SYSDIR}/cddl/compat/opensolaris \ -I${SYSDIR}/cddl/contrib/opensolaris/uts/common \ + -I${SYSDIR}/cddl/contrib/opensolaris/uts/common/dtrace \ -I${SYSDIR} .include <bsd.kmod.mk>
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?alpine.BSF.2.20.1702031506540.71009>