From owner-svn-src-head@freebsd.org Sun Dec 31 00:31:16 2017 Return-Path: Delivered-To: svn-src-head@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 1090AEB5094; Sun, 31 Dec 2017 00:31:16 +0000 (UTC) (envelope-from mjg@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 CF88A750EE; Sun, 31 Dec 2017 00:31:15 +0000 (UTC) (envelope-from mjg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id vBV0VE5v020401; Sun, 31 Dec 2017 00:31:14 GMT (envelope-from mjg@FreeBSD.org) Received: (from mjg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id vBV0VEjE020400; Sun, 31 Dec 2017 00:31:14 GMT (envelope-from mjg@FreeBSD.org) Message-Id: <201712310031.vBV0VEjE020400@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mjg set sender to mjg@FreeBSD.org using -f From: Mateusz Guzik Date: Sun, 31 Dec 2017 00:31:14 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r327393 - head/sys/kern X-SVN-Group: head X-SVN-Commit-Author: mjg X-SVN-Commit-Paths: head/sys/kern X-SVN-Commit-Revision: 327393 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 31 Dec 2017 00:31:16 -0000 Author: mjg Date: Sun Dec 31 00:31:14 2017 New Revision: 327393 URL: https://svnweb.freebsd.org/changeset/base/327393 Log: rwlock: tidy up __rw_runlock_hard similarly to r325921 Modified: head/sys/kern/kern_rwlock.c Modified: head/sys/kern/kern_rwlock.c ============================================================================== --- head/sys/kern/kern_rwlock.c Sat Dec 30 22:01:17 2017 (r327392) +++ head/sys/kern/kern_rwlock.c Sun Dec 31 00:31:14 2017 (r327393) @@ -755,7 +755,7 @@ __rw_runlock_hard(struct rwlock *rw, struct thread *td LOCK_FILE_LINE_ARG_DEF) { struct turnstile *ts; - uintptr_t x, queue; + uintptr_t setv, queue; if (SCHEDULER_STOPPED()) return; @@ -795,14 +795,14 @@ retry_ts: * acquired a read lock, so drop the turnstile lock and * restart. */ - x = RW_UNLOCKED; + setv = RW_UNLOCKED; + queue = TS_SHARED_QUEUE; if (v & RW_LOCK_WRITE_WAITERS) { queue = TS_EXCLUSIVE_QUEUE; - x |= (v & RW_LOCK_READ_WAITERS); - } else - queue = TS_SHARED_QUEUE; + setv |= (v & RW_LOCK_READ_WAITERS); + } v |= RW_READERS_LOCK(1); - if (!atomic_fcmpset_rel_ptr(&rw->rw_lock, &v, x)) + if (!atomic_fcmpset_rel_ptr(&rw->rw_lock, &v, setv)) goto retry_ts; if (LOCK_LOG_TEST(&rw->lock_object, 0)) CTR2(KTR_LOCK, "%s: %p last succeeded with waiters", From owner-svn-src-head@freebsd.org Sun Dec 31 00:33:29 2017 Return-Path: Delivered-To: svn-src-head@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 6ACABEB5311; Sun, 31 Dec 2017 00:33:29 +0000 (UTC) (envelope-from mjg@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 3438575564; Sun, 31 Dec 2017 00:33:29 +0000 (UTC) (envelope-from mjg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id vBV0XS83021985; Sun, 31 Dec 2017 00:33:28 GMT (envelope-from mjg@FreeBSD.org) Received: (from mjg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id vBV0XS7Y021984; Sun, 31 Dec 2017 00:33:28 GMT (envelope-from mjg@FreeBSD.org) Message-Id: <201712310033.vBV0XS7Y021984@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mjg set sender to mjg@FreeBSD.org using -f From: Mateusz Guzik Date: Sun, 31 Dec 2017 00:33:28 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r327394 - head/sys/kern X-SVN-Group: head X-SVN-Commit-Author: mjg X-SVN-Commit-Paths: head/sys/kern X-SVN-Commit-Revision: 327394 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 31 Dec 2017 00:33:29 -0000 Author: mjg Date: Sun Dec 31 00:33:28 2017 New Revision: 327394 URL: https://svnweb.freebsd.org/changeset/base/327394 Log: mtx: pre-read the lock value in thread_lock_flags_ Since this function is effectively slow path, if we get here the lock is most likely already taken in which case it is cheaper to not blindly attempt the atomic op. While here move hwpmc probe out of the loop to match other primitives. Modified: head/sys/kern/kern_mutex.c Modified: head/sys/kern/kern_mutex.c ============================================================================== --- head/sys/kern/kern_mutex.c Sun Dec 31 00:31:14 2017 (r327393) +++ head/sys/kern/kern_mutex.c Sun Dec 31 00:33:28 2017 (r327394) @@ -899,6 +899,10 @@ thread_lock_flags_(struct thread *td, int opts, const lock_delay_arg_init(&lda, &mtx_spin_delay); +#ifdef HWPMC_HOOKS + PMC_SOFT_CALL( , , lock, failed); +#endif + #ifdef LOCK_PROFILING doing_lockprof = 1; #elif defined(KDTRACE_HOOKS) @@ -908,22 +912,20 @@ thread_lock_flags_(struct thread *td, int opts, const #endif for (;;) { retry: - v = MTX_UNOWNED; spinlock_enter(); m = td->td_lock; thread_lock_validate(m, opts, file, line); + v = MTX_READ_VALUE(m); for (;;) { - if (_mtx_obtain_lock_fetch(m, &v, tid)) - break; - if (v == MTX_UNOWNED) + if (v == MTX_UNOWNED) { + if (_mtx_obtain_lock_fetch(m, &v, tid)) + break; continue; + } if (v == tid) { m->mtx_recurse++; break; } -#ifdef HWPMC_HOOKS - PMC_SOFT_CALL( , , lock, failed); -#endif lock_profile_obtain_lock_failed(&m->lock_object, &contested, &waittime); /* Give interrupts a chance while we spin. */ From owner-svn-src-head@freebsd.org Sun Dec 31 00:34:31 2017 Return-Path: Delivered-To: svn-src-head@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 53C75EB547A; Sun, 31 Dec 2017 00:34:31 +0000 (UTC) (envelope-from mjg@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 1362F75754; Sun, 31 Dec 2017 00:34:30 +0000 (UTC) (envelope-from mjg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id vBV0YULA022060; Sun, 31 Dec 2017 00:34:30 GMT (envelope-from mjg@FreeBSD.org) Received: (from mjg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id vBV0YUvp022059; Sun, 31 Dec 2017 00:34:30 GMT (envelope-from mjg@FreeBSD.org) Message-Id: <201712310034.vBV0YUvp022059@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mjg set sender to mjg@FreeBSD.org using -f From: Mateusz Guzik Date: Sun, 31 Dec 2017 00:34:30 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r327395 - head/sys/kern X-SVN-Group: head X-SVN-Commit-Author: mjg X-SVN-Commit-Paths: head/sys/kern X-SVN-Commit-Revision: 327395 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 31 Dec 2017 00:34:31 -0000 Author: mjg Date: Sun Dec 31 00:34:29 2017 New Revision: 327395 URL: https://svnweb.freebsd.org/changeset/base/327395 Log: mtx: deduplicate indefinite wait check in spinlocks and thread lock Modified: head/sys/kern/kern_mutex.c Modified: head/sys/kern/kern_mutex.c ============================================================================== --- head/sys/kern/kern_mutex.c Sun Dec 31 00:33:28 2017 (r327394) +++ head/sys/kern/kern_mutex.c Sun Dec 31 00:34:29 2017 (r327395) @@ -170,6 +170,8 @@ LOCK_DELAY_SYSINIT_DEFAULT(mtx_spin_delay); struct mtx blocked_lock; struct mtx __exclusive_cache_line Giant; +static void _mtx_lock_indefinite_check(struct mtx *, struct lock_delay_arg *); + void assert_mtx(const struct lock_object *lock, int what) { @@ -674,25 +676,6 @@ __mtx_lock_sleep(volatile uintptr_t *c, uintptr_t v) #endif } -static void -_mtx_lock_spin_failed(struct mtx *m) -{ - struct thread *td; - - td = mtx_owner(m); - - /* If the mutex is unlocked, try again. */ - if (td == NULL) - return; - - printf( "spin lock %p (%s) held by %p (tid %d) too long\n", - m, m->lock_object.lo_name, td, td->td_tid); -#ifdef WITNESS - witness_display_spinlock(&m->lock_object, td, printf); -#endif - panic("spin lock held too long"); -} - #ifdef SMP /* * _mtx_lock_spin_cookie: the tougher part of acquiring an MTX_SPIN lock. @@ -764,16 +747,10 @@ _mtx_lock_spin_cookie(volatile uintptr_t *c, uintptr_t /* Give interrupts a chance while we spin. */ spinlock_exit(); do { - if (lda.spin_cnt < 10000000) { + if (__predict_true(lda.spin_cnt < 10000000)) { lock_delay(&lda); } else { - lda.spin_cnt++; - if (lda.spin_cnt < 60000000 || kdb_active || - panicstr != NULL) - DELAY(1); - else - _mtx_lock_spin_failed(m); - cpu_spinwait(); + _mtx_lock_indefinite_check(m, &lda); } v = MTX_READ_VALUE(m); } while (v != MTX_UNOWNED); @@ -931,16 +908,10 @@ retry: /* Give interrupts a chance while we spin. */ spinlock_exit(); do { - if (lda.spin_cnt < 10000000) { + if (__predict_true(lda.spin_cnt < 10000000)) { lock_delay(&lda); } else { - lda.spin_cnt++; - if (lda.spin_cnt < 60000000 || - kdb_active || panicstr != NULL) - DELAY(1); - else - _mtx_lock_spin_failed(m); - cpu_spinwait(); + _mtx_lock_indefinite_check(m, &lda); } if (m != td->td_lock) goto retry; @@ -1229,6 +1200,31 @@ mutex_init(void) mtx_init(&proc0.p_profmtx, "pprofl", NULL, MTX_SPIN); mtx_init(&devmtx, "cdev", NULL, MTX_DEF); mtx_lock(&Giant); +} + +static void __noinline +_mtx_lock_indefinite_check(struct mtx *m, struct lock_delay_arg *ldap) +{ + struct thread *td; + + ldap->spin_cnt++; + if (ldap->spin_cnt < 60000000 || kdb_active || panicstr != NULL) + DELAY(1); + else { + td = mtx_owner(m); + + /* If the mutex is unlocked, try again. */ + if (td == NULL) + return; + + printf( "spin lock %p (%s) held by %p (tid %d) too long\n", + m, m->lock_object.lo_name, td, td->td_tid); +#ifdef WITNESS + witness_display_spinlock(&m->lock_object, td, printf); +#endif + panic("spin lock held too long"); + } + cpu_spinwait(); } #ifdef DDB From owner-svn-src-head@freebsd.org Sun Dec 31 00:35:13 2017 Return-Path: Delivered-To: svn-src-head@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 56523EB55B1; Sun, 31 Dec 2017 00:35:13 +0000 (UTC) (envelope-from eadler@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 20BE8759C5; Sun, 31 Dec 2017 00:35:13 +0000 (UTC) (envelope-from eadler@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id vBV0ZCY6022132; Sun, 31 Dec 2017 00:35:12 GMT (envelope-from eadler@FreeBSD.org) Received: (from eadler@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id vBV0ZCpY022131; Sun, 31 Dec 2017 00:35:12 GMT (envelope-from eadler@FreeBSD.org) Message-Id: <201712310035.vBV0ZCpY022131@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: eadler set sender to eadler@FreeBSD.org using -f From: Eitan Adler Date: Sun, 31 Dec 2017 00:35:12 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r327396 - head/usr.bin/man X-SVN-Group: head X-SVN-Commit-Author: eadler X-SVN-Commit-Paths: head/usr.bin/man X-SVN-Commit-Revision: 327396 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 31 Dec 2017 00:35:13 -0000 Author: eadler Date: Sun Dec 31 00:35:11 2017 New Revision: 327396 URL: https://svnweb.freebsd.org/changeset/base/327396 Log: man(1): document exit code man(1) uses standard exit codes, document that. PR: 223517 Reported by: wosch MFC after: 1 week Modified: head/usr.bin/man/man.1 Modified: head/usr.bin/man/man.1 ============================================================================== --- head/usr.bin/man/man.1 Sun Dec 31 00:34:29 2017 (r327395) +++ head/usr.bin/man/man.1 Sun Dec 31 00:35:11 2017 (r327396) @@ -355,6 +355,8 @@ System configuration file. .It Pa /usr/local/etc/man.d/*.conf Local configuration files. .El +.Sh EXIT STATUS +.Ex -std .Sh SEE ALSO .Xr apropos 1 , .Xr intro 1 , From owner-svn-src-head@freebsd.org Sun Dec 31 00:37:52 2017 Return-Path: Delivered-To: svn-src-head@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 25951EB57A9; Sun, 31 Dec 2017 00:37:52 +0000 (UTC) (envelope-from mjg@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 F11BE75B97; Sun, 31 Dec 2017 00:37:51 +0000 (UTC) (envelope-from mjg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id vBV0bpSS022265; Sun, 31 Dec 2017 00:37:51 GMT (envelope-from mjg@FreeBSD.org) Received: (from mjg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id vBV0bpGV022264; Sun, 31 Dec 2017 00:37:51 GMT (envelope-from mjg@FreeBSD.org) Message-Id: <201712310037.vBV0bpGV022264@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mjg set sender to mjg@FreeBSD.org using -f From: Mateusz Guzik Date: Sun, 31 Dec 2017 00:37:51 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r327397 - head/sys/kern X-SVN-Group: head X-SVN-Commit-Author: mjg X-SVN-Commit-Paths: head/sys/kern X-SVN-Commit-Revision: 327397 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 31 Dec 2017 00:37:52 -0000 Author: mjg Date: Sun Dec 31 00:37:50 2017 New Revision: 327397 URL: https://svnweb.freebsd.org/changeset/base/327397 Log: sx: read the SX_NOADAPTIVE flag and Giant ownership only once These used to be read multiple times when waiting for the lock the become free, which had the potential to issue completely avoidable traffic. Modified: head/sys/kern/kern_sx.c Modified: head/sys/kern/kern_sx.c ============================================================================== --- head/sys/kern/kern_sx.c Sun Dec 31 00:35:11 2017 (r327396) +++ head/sys/kern/kern_sx.c Sun Dec 31 00:37:50 2017 (r327397) @@ -91,7 +91,7 @@ PMC_SOFT_DECLARE( , , lock, failed); WITNESS_SAVE_DECL(Giant) \ #define GIANT_SAVE(work) do { \ - if (mtx_owned(&Giant)) { \ + if (__predict_false(mtx_owned(&Giant))) { \ work++; \ WITNESS_SAVE(&Giant.lock_object, Giant); \ while (mtx_owned(&Giant)) { \ @@ -533,6 +533,7 @@ _sx_xlock_hard(struct sx *sx, uintptr_t x, int opts LO #ifdef ADAPTIVE_SX volatile struct thread *owner; u_int i, n, spintries = 0; + bool adaptive; #endif #ifdef LOCK_PROFILING uint64_t waittime = 0; @@ -581,6 +582,10 @@ _sx_xlock_hard(struct sx *sx, uintptr_t x, int opts LO CTR5(KTR_LOCK, "%s: %s contested (lock=%p) at %s:%d", __func__, sx->lock_object.lo_name, (void *)sx->sx_lock, file, line); +#ifdef ADAPTIVE_SX + adaptive = ((sx->lock_object.lo_flags & SX_NOADAPTIVE) != 0); +#endif + #ifdef HWPMC_HOOKS PMC_SOFT_CALL( , , lock, failed); #endif @@ -597,6 +602,9 @@ _sx_xlock_hard(struct sx *sx, uintptr_t x, int opts LO state = x; } #endif +#ifndef INVARIANTS + GIANT_SAVE(extra_work); +#endif for (;;) { if (x == SX_LOCK_UNLOCKED) { @@ -604,67 +612,68 @@ _sx_xlock_hard(struct sx *sx, uintptr_t x, int opts LO break; continue; } +#ifdef INVARIANTS + GIANT_SAVE(extra_work); +#endif #ifdef KDTRACE_HOOKS lda.spin_cnt++; #endif #ifdef ADAPTIVE_SX + if (__predict_false(!adaptive)) + goto sleepq; /* * If the lock is write locked and the owner is * running on another CPU, spin until the owner stops * running or the state of the lock changes. */ - if ((sx->lock_object.lo_flags & SX_NOADAPTIVE) == 0) { - if ((x & SX_LOCK_SHARED) == 0) { - owner = lv_sx_owner(x); - if (TD_IS_RUNNING(owner)) { - if (LOCK_LOG_TEST(&sx->lock_object, 0)) - CTR3(KTR_LOCK, - "%s: spinning on %p held by %p", - __func__, sx, owner); - KTR_STATE1(KTR_SCHED, "thread", - sched_tdname(curthread), "spinning", - "lockname:\"%s\"", - sx->lock_object.lo_name); - GIANT_SAVE(extra_work); - do { - lock_delay(&lda); - x = SX_READ_VALUE(sx); - owner = lv_sx_owner(x); - } while (owner != NULL && - TD_IS_RUNNING(owner)); - KTR_STATE0(KTR_SCHED, "thread", - sched_tdname(curthread), "running"); - continue; - } - } else if (SX_SHARERS(x) && spintries < asx_retries) { + if ((x & SX_LOCK_SHARED) == 0) { + owner = lv_sx_owner(x); + if (TD_IS_RUNNING(owner)) { + if (LOCK_LOG_TEST(&sx->lock_object, 0)) + CTR3(KTR_LOCK, + "%s: spinning on %p held by %p", + __func__, sx, owner); KTR_STATE1(KTR_SCHED, "thread", sched_tdname(curthread), "spinning", - "lockname:\"%s\"", sx->lock_object.lo_name); - GIANT_SAVE(extra_work); - spintries++; - for (i = 0; i < asx_loops; i += n) { - if (LOCK_LOG_TEST(&sx->lock_object, 0)) - CTR4(KTR_LOCK, - "%s: shared spinning on %p with %u and %u", - __func__, sx, spintries, i); - n = SX_SHARERS(x); - lock_delay_spin(n); + "lockname:\"%s\"", + sx->lock_object.lo_name); + do { + lock_delay(&lda); x = SX_READ_VALUE(sx); - if ((x & SX_LOCK_SHARED) == 0 || - SX_SHARERS(x) == 0) - break; - } -#ifdef KDTRACE_HOOKS - lda.spin_cnt += i; -#endif + owner = lv_sx_owner(x); + } while (owner != NULL && + TD_IS_RUNNING(owner)); KTR_STATE0(KTR_SCHED, "thread", sched_tdname(curthread), "running"); - if (i != asx_loops) - continue; + continue; } + } else if (SX_SHARERS(x) && spintries < asx_retries) { + KTR_STATE1(KTR_SCHED, "thread", + sched_tdname(curthread), "spinning", + "lockname:\"%s\"", sx->lock_object.lo_name); + spintries++; + for (i = 0; i < asx_loops; i += n) { + if (LOCK_LOG_TEST(&sx->lock_object, 0)) + CTR4(KTR_LOCK, + "%s: shared spinning on %p with %u and %u", + __func__, sx, spintries, i); + n = SX_SHARERS(x); + lock_delay_spin(n); + x = SX_READ_VALUE(sx); + if ((x & SX_LOCK_SHARED) == 0 || + SX_SHARERS(x) == 0) + break; + } +#ifdef KDTRACE_HOOKS + lda.spin_cnt += i; +#endif + KTR_STATE0(KTR_SCHED, "thread", + sched_tdname(curthread), "running"); + if (i != asx_loops) + continue; } #endif - +sleepq: sleepq_lock(&sx->lock_object); x = SX_READ_VALUE(sx); retry_sleepq: @@ -686,8 +695,7 @@ retry_sleepq: * chain lock. If so, drop the sleep queue lock and try * again. */ - if (!(x & SX_LOCK_SHARED) && - (sx->lock_object.lo_flags & SX_NOADAPTIVE) == 0) { + if (!(x & SX_LOCK_SHARED) && adaptive) { owner = (struct thread *)SX_OWNER(x); if (TD_IS_RUNNING(owner)) { sleepq_release(&sx->lock_object); @@ -742,7 +750,6 @@ retry_sleepq: #ifdef KDTRACE_HOOKS sleep_time -= lockstat_nsecs(&sx->lock_object); #endif - GIANT_SAVE(extra_work); sleepq_add(&sx->lock_object, NULL, sx->lock_object.lo_name, SLEEPQ_SX | ((opts & SX_INTERRUPTIBLE) ? SLEEPQ_INTERRUPTIBLE : 0), SQ_EXCLUSIVE_QUEUE); @@ -892,6 +899,7 @@ _sx_slock_hard(struct sx *sx, int opts, uintptr_t x LO GIANT_DECLARE; #ifdef ADAPTIVE_SX volatile struct thread *owner; + bool adaptive; #endif #ifdef LOCK_PROFILING uint64_t waittime = 0; @@ -920,6 +928,10 @@ _sx_slock_hard(struct sx *sx, int opts, uintptr_t x LO lock_delay_arg_init(&lda, NULL); #endif +#ifdef ADAPTIVE_SX + adaptive = ((sx->lock_object.lo_flags & SX_NOADAPTIVE) != 0); +#endif + #ifdef HWPMC_HOOKS PMC_SOFT_CALL( , , lock, failed); #endif @@ -936,6 +948,9 @@ _sx_slock_hard(struct sx *sx, int opts, uintptr_t x LO state = x; } #endif +#ifndef INVARIANTS + GIANT_SAVE(extra_work); +#endif /* * As with rwlocks, we don't make any attempt to try to block @@ -944,39 +959,42 @@ _sx_slock_hard(struct sx *sx, int opts, uintptr_t x LO for (;;) { if (__sx_slock_try(sx, &x LOCK_FILE_LINE_ARG)) break; +#ifdef INVARIANTS + GIANT_SAVE(extra_work); +#endif #ifdef KDTRACE_HOOKS lda.spin_cnt++; #endif #ifdef ADAPTIVE_SX + if (__predict_false(!adaptive)) + goto sleepq; /* * If the owner is running on another CPU, spin until * the owner stops running or the state of the lock * changes. */ - if ((sx->lock_object.lo_flags & SX_NOADAPTIVE) == 0) { - owner = lv_sx_owner(x); - if (TD_IS_RUNNING(owner)) { - if (LOCK_LOG_TEST(&sx->lock_object, 0)) - CTR3(KTR_LOCK, - "%s: spinning on %p held by %p", - __func__, sx, owner); - KTR_STATE1(KTR_SCHED, "thread", - sched_tdname(curthread), "spinning", - "lockname:\"%s\"", sx->lock_object.lo_name); - GIANT_SAVE(extra_work); - do { - lock_delay(&lda); - x = SX_READ_VALUE(sx); - owner = lv_sx_owner(x); - } while (owner != NULL && TD_IS_RUNNING(owner)); - KTR_STATE0(KTR_SCHED, "thread", - sched_tdname(curthread), "running"); - continue; - } + owner = lv_sx_owner(x); + if (TD_IS_RUNNING(owner)) { + if (LOCK_LOG_TEST(&sx->lock_object, 0)) + CTR3(KTR_LOCK, + "%s: spinning on %p held by %p", + __func__, sx, owner); + KTR_STATE1(KTR_SCHED, "thread", + sched_tdname(curthread), "spinning", + "lockname:\"%s\"", sx->lock_object.lo_name); + do { + lock_delay(&lda); + x = SX_READ_VALUE(sx); + owner = lv_sx_owner(x); + } while (owner != NULL && TD_IS_RUNNING(owner)); + KTR_STATE0(KTR_SCHED, "thread", + sched_tdname(curthread), "running"); + continue; } #endif +sleepq: /* * Some other thread already has an exclusive lock, so * start the process of blocking. @@ -999,8 +1017,7 @@ retry_sleepq: * the owner stops running or the state of the lock * changes. */ - if (!(x & SX_LOCK_SHARED) && - (sx->lock_object.lo_flags & SX_NOADAPTIVE) == 0) { + if (!(x & SX_LOCK_SHARED) && adaptive) { owner = (struct thread *)SX_OWNER(x); if (TD_IS_RUNNING(owner)) { sleepq_release(&sx->lock_object); @@ -1035,7 +1052,6 @@ retry_sleepq: #ifdef KDTRACE_HOOKS sleep_time -= lockstat_nsecs(&sx->lock_object); #endif - GIANT_SAVE(extra_work); sleepq_add(&sx->lock_object, NULL, sx->lock_object.lo_name, SLEEPQ_SX | ((opts & SX_INTERRUPTIBLE) ? SLEEPQ_INTERRUPTIBLE : 0), SQ_SHARED_QUEUE); From owner-svn-src-head@freebsd.org Sun Dec 31 00:46:43 2017 Return-Path: Delivered-To: svn-src-head@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 27D6AEB5FE2; Sun, 31 Dec 2017 00:46:43 +0000 (UTC) (envelope-from eadler@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 E39E77647E; Sun, 31 Dec 2017 00:46:42 +0000 (UTC) (envelope-from eadler@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id vBV0kfYR026476; Sun, 31 Dec 2017 00:46:41 GMT (envelope-from eadler@FreeBSD.org) Received: (from eadler@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id vBV0kfSh026475; Sun, 31 Dec 2017 00:46:41 GMT (envelope-from eadler@FreeBSD.org) Message-Id: <201712310046.vBV0kfSh026475@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: eadler set sender to eadler@FreeBSD.org using -f From: Eitan Adler Date: Sun, 31 Dec 2017 00:46:41 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r327398 - head/lib/libc/gen X-SVN-Group: head X-SVN-Commit-Author: eadler X-SVN-Commit-Paths: head/lib/libc/gen X-SVN-Commit-Revision: 327398 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 31 Dec 2017 00:46:43 -0000 Author: eadler Date: Sun Dec 31 00:46:41 2017 New Revision: 327398 URL: https://svnweb.freebsd.org/changeset/base/327398 Log: isgreater(3): correct description of isunordered macro PR: 211376 Submitted by: Duane MFC After: 1 week Modified: head/lib/libc/gen/isgreater.3 Modified: head/lib/libc/gen/isgreater.3 ============================================================================== --- head/lib/libc/gen/isgreater.3 Sun Dec 31 00:37:50 2017 (r327397) +++ head/lib/libc/gen/isgreater.3 Sun Dec 31 00:46:41 2017 (r327398) @@ -75,9 +75,9 @@ macro takes arguments .Fa x and .Fa y -and returns non-zero if and only if neither +and returns non-zero if and only if any of .Fa x -nor +or .Fa y are NaNs. For any pair of floating-point values, one From owner-svn-src-head@freebsd.org Sun Dec 31 00:47:06 2017 Return-Path: Delivered-To: svn-src-head@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 3DADCEB6096; Sun, 31 Dec 2017 00:47:06 +0000 (UTC) (envelope-from mjg@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 E6FDE765E7; Sun, 31 Dec 2017 00:47:05 +0000 (UTC) (envelope-from mjg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id vBV0l45a026550; Sun, 31 Dec 2017 00:47:04 GMT (envelope-from mjg@FreeBSD.org) Received: (from mjg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id vBV0l4Jj026548; Sun, 31 Dec 2017 00:47:04 GMT (envelope-from mjg@FreeBSD.org) Message-Id: <201712310047.vBV0l4Jj026548@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mjg set sender to mjg@FreeBSD.org using -f From: Mateusz Guzik Date: Sun, 31 Dec 2017 00:47:04 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r327399 - head/sys/kern X-SVN-Group: head X-SVN-Commit-Author: mjg X-SVN-Commit-Paths: head/sys/kern X-SVN-Commit-Revision: 327399 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 31 Dec 2017 00:47:06 -0000 Author: mjg Date: Sun Dec 31 00:47:04 2017 New Revision: 327399 URL: https://svnweb.freebsd.org/changeset/base/327399 Log: locks: re-check the reason to go to sleep after locking sleepq/turnstile In both rw and sx locks we always go to sleep if the lock owner is not running. We do spin for some time if the lock is read-locked. However, if we decide to go to sleep due to the lock owner being off cpu and after sleepq/turnstile gets acquired the lock is read-locked, we should fallback to the aforementioned wait. Modified: head/sys/kern/kern_rwlock.c head/sys/kern/kern_sx.c Modified: head/sys/kern/kern_rwlock.c ============================================================================== --- head/sys/kern/kern_rwlock.c Sun Dec 31 00:46:41 2017 (r327398) +++ head/sys/kern/kern_rwlock.c Sun Dec 31 00:47:04 2017 (r327399) @@ -872,6 +872,7 @@ __rw_wlock_hard(volatile uintptr_t *c, uintptr_t v LOC #ifdef ADAPTIVE_RWLOCKS int spintries = 0; int i, n; + int sleep_reason = 0; #endif uintptr_t x; #ifdef LOCK_PROFILING @@ -952,6 +953,7 @@ __rw_wlock_hard(volatile uintptr_t *c, uintptr_t v LOC * running on another CPU, spin until the owner stops * running or the state of the lock changes. */ + sleep_reason = 1; owner = lv_rw_wowner(v); if (!(v & RW_LOCK_READ) && TD_IS_RUNNING(owner)) { if (LOCK_LOG_TEST(&rw->lock_object, 0)) @@ -995,6 +997,7 @@ __rw_wlock_hard(volatile uintptr_t *c, uintptr_t v LOC #endif if (i != rowner_loops) continue; + sleep_reason = 2; } #endif ts = turnstile_trywait(&rw->lock_object); @@ -1015,6 +1018,9 @@ retry_ts: turnstile_cancel(ts); continue; } + } else if (RW_READERS(v) > 0 && sleep_reason == 1) { + turnstile_cancel(ts); + continue; } #endif /* Modified: head/sys/kern/kern_sx.c ============================================================================== --- head/sys/kern/kern_sx.c Sun Dec 31 00:46:41 2017 (r327398) +++ head/sys/kern/kern_sx.c Sun Dec 31 00:47:04 2017 (r327399) @@ -534,6 +534,7 @@ _sx_xlock_hard(struct sx *sx, uintptr_t x, int opts LO volatile struct thread *owner; u_int i, n, spintries = 0; bool adaptive; + int sleep_reason = 0; #endif #ifdef LOCK_PROFILING uint64_t waittime = 0; @@ -647,6 +648,7 @@ _sx_xlock_hard(struct sx *sx, uintptr_t x, int opts LO sched_tdname(curthread), "running"); continue; } + sleep_reason = 1; } else if (SX_SHARERS(x) && spintries < asx_retries) { KTR_STATE1(KTR_SCHED, "thread", sched_tdname(curthread), "spinning", @@ -671,6 +673,7 @@ _sx_xlock_hard(struct sx *sx, uintptr_t x, int opts LO sched_tdname(curthread), "running"); if (i != asx_loops) continue; + sleep_reason = 2; } #endif sleepq: @@ -695,9 +698,14 @@ retry_sleepq: * chain lock. If so, drop the sleep queue lock and try * again. */ - if (!(x & SX_LOCK_SHARED) && adaptive) { - owner = (struct thread *)SX_OWNER(x); - if (TD_IS_RUNNING(owner)) { + if (adaptive) { + if (!(x & SX_LOCK_SHARED)) { + owner = (struct thread *)SX_OWNER(x); + if (TD_IS_RUNNING(owner)) { + sleepq_release(&sx->lock_object); + continue; + } + } else if (SX_SHARERS(x) > 0 && sleep_reason == 1) { sleepq_release(&sx->lock_object); continue; } From owner-svn-src-head@freebsd.org Sun Dec 31 00:55:02 2017 Return-Path: Delivered-To: svn-src-head@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 267B3EB66A7; Sun, 31 Dec 2017 00:55:02 +0000 (UTC) (envelope-from eadler@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 E4F4E76CC7; Sun, 31 Dec 2017 00:55:01 +0000 (UTC) (envelope-from eadler@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id vBV0t0ED030940; Sun, 31 Dec 2017 00:55:00 GMT (envelope-from eadler@FreeBSD.org) Received: (from eadler@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id vBV0t0ZR030939; Sun, 31 Dec 2017 00:55:00 GMT (envelope-from eadler@FreeBSD.org) Message-Id: <201712310055.vBV0t0ZR030939@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: eadler set sender to eadler@FreeBSD.org using -f From: Eitan Adler Date: Sun, 31 Dec 2017 00:55:00 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r327400 - head/lib/msun/man X-SVN-Group: head X-SVN-Commit-Author: eadler X-SVN-Commit-Paths: head/lib/msun/man X-SVN-Commit-Revision: 327400 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 31 Dec 2017 00:55:02 -0000 Author: eadler Date: Sun Dec 31 00:55:00 2017 New Revision: 327400 URL: https://svnweb.freebsd.org/changeset/base/327400 Log: cacos(3): correct spelling of 'I' In some cases we had 'i' instead of 'I'. PR: 195517 Submitted by: stephen Modified: head/lib/msun/man/cacos.3 Modified: head/lib/msun/man/cacos.3 ============================================================================== --- head/lib/msun/man/cacos.3 Sun Dec 31 00:47:04 2017 (r327399) +++ head/lib/msun/man/cacos.3 Sun Dec 31 00:55:00 2017 (r327400) @@ -136,9 +136,9 @@ corresponding ranges for the return values, adopted by .It Sy Function Ta Sy Branch Cut(s) Ta Sy Range .It cacos Ta (-\*(If, -1) \*(Un (1, \*(If) Ta [0, \*(Pi] .It casin Ta (-\*(If, -1) \*(Un (1, \*(If) Ta [-\*(Pi/2, \*(Pi/2] -.It catan Ta (-\*(If*I, -i) \*(Un (I, \*(If*I) Ta [-\*(Pi/2, \*(Pi/2] +.It catan Ta (-\*(If*I, -I) \*(Un (I, \*(If*I) Ta [-\*(Pi/2, \*(Pi/2] .It cacosh Ta (-\*(If, 1) Ta [-\*(Pi*I, \*(Pi*I] -.It casinh Ta (-\*(If*I, -i) \*(Un (I, \*(If*I) Ta [-\*(Pi/2*I, \*(Pi/2*I] +.It casinh Ta (-\*(If*I, -I) \*(Un (I, \*(If*I) Ta [-\*(Pi/2*I, \*(Pi/2*I] .It catanh Ta (-\*(If, -1) \*(Un (1, \*(If) Ta [-\*(Pi/2*I, \*(Pi/2*I] .El .Sh SEE ALSO From owner-svn-src-head@freebsd.org Sun Dec 31 01:59:58 2017 Return-Path: Delivered-To: svn-src-head@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 1669EEB9E94; Sun, 31 Dec 2017 01:59:58 +0000 (UTC) (envelope-from mjg@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 D4E8979F74; Sun, 31 Dec 2017 01:59:57 +0000 (UTC) (envelope-from mjg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id vBV1xu8R056585; Sun, 31 Dec 2017 01:59:56 GMT (envelope-from mjg@FreeBSD.org) Received: (from mjg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id vBV1xuFM056584; Sun, 31 Dec 2017 01:59:56 GMT (envelope-from mjg@FreeBSD.org) Message-Id: <201712310159.vBV1xuFM056584@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mjg set sender to mjg@FreeBSD.org using -f From: Mateusz Guzik Date: Sun, 31 Dec 2017 01:59:56 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r327401 - head/sys/kern X-SVN-Group: head X-SVN-Commit-Author: mjg X-SVN-Commit-Paths: head/sys/kern X-SVN-Commit-Revision: 327401 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 31 Dec 2017 01:59:58 -0000 Author: mjg Date: Sun Dec 31 01:59:56 2017 New Revision: 327401 URL: https://svnweb.freebsd.org/changeset/base/327401 Log: sx: fix up non-smp compilation after r327397 Modified: head/sys/kern/kern_sx.c Modified: head/sys/kern/kern_sx.c ============================================================================== --- head/sys/kern/kern_sx.c Sun Dec 31 00:55:00 2017 (r327400) +++ head/sys/kern/kern_sx.c Sun Dec 31 01:59:56 2017 (r327401) @@ -675,8 +675,8 @@ _sx_xlock_hard(struct sx *sx, uintptr_t x, int opts LO continue; sleep_reason = 2; } -#endif sleepq: +#endif sleepq_lock(&sx->lock_object); x = SX_READ_VALUE(sx); retry_sleepq: @@ -1000,9 +1000,9 @@ _sx_slock_hard(struct sx *sx, int opts, uintptr_t x LO sched_tdname(curthread), "running"); continue; } +sleepq: #endif -sleepq: /* * Some other thread already has an exclusive lock, so * start the process of blocking. From owner-svn-src-head@freebsd.org Sun Dec 31 03:34:02 2017 Return-Path: Delivered-To: svn-src-head@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 435FDE8649A; Sun, 31 Dec 2017 03:34:02 +0000 (UTC) (envelope-from pfg@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 030A57E596; Sun, 31 Dec 2017 03:34:01 +0000 (UTC) (envelope-from pfg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id vBV3Y1mv099169; Sun, 31 Dec 2017 03:34:01 GMT (envelope-from pfg@FreeBSD.org) Received: (from pfg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id vBV3Y1jH099167; Sun, 31 Dec 2017 03:34:01 GMT (envelope-from pfg@FreeBSD.org) Message-Id: <201712310334.vBV3Y1jH099167@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: pfg set sender to pfg@FreeBSD.org using -f From: "Pedro F. Giffuni" Date: Sun, 31 Dec 2017 03:34:00 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r327408 - head/sys/kern X-SVN-Group: head X-SVN-Commit-Author: pfg X-SVN-Commit-Paths: head/sys/kern X-SVN-Commit-Revision: 327408 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 31 Dec 2017 03:34:02 -0000 Author: pfg Date: Sun Dec 31 03:34:00 2017 New Revision: 327408 URL: https://svnweb.freebsd.org/changeset/base/327408 Log: sysv_{ipc|shm}: update the NetBSD VCS tags to match nearer our files. Both files originated in NetBSD: sysv_ipc.c CVS 1.9: Most of their changes don't apply to us as we already have similar changes. This is a better reference for future merges. sysv_shm.c CVS 1.39: Most of their changes don't apply to our code but interestingly this revision merged our changes and is a better point for reference. Move the VCS tags to the position recommended in our committers guide (section 8), No functional change. Modified: head/sys/kern/sysv_ipc.c head/sys/kern/sysv_shm.c Modified: head/sys/kern/sysv_ipc.c ============================================================================== --- head/sys/kern/sysv_ipc.c Sun Dec 31 03:17:28 2017 (r327407) +++ head/sys/kern/sysv_ipc.c Sun Dec 31 03:34:00 2017 (r327408) @@ -1,4 +1,3 @@ -/* $NetBSD: sysv_ipc.c,v 1.7 1994/06/29 06:33:11 cgd Exp $ */ /*- * SPDX-License-Identifier: BSD-4-Clause * @@ -33,6 +32,8 @@ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * $NetBSD: sysv_ipc.c,v 1.9 1995/06/02 19:04:22 mycroft Exp $ */ #include Modified: head/sys/kern/sysv_shm.c ============================================================================== --- head/sys/kern/sysv_shm.c Sun Dec 31 03:17:28 2017 (r327407) +++ head/sys/kern/sysv_shm.c Sun Dec 31 03:34:00 2017 (r327408) @@ -1,4 +1,3 @@ -/* $NetBSD: sysv_shm.c,v 1.23 1994/07/04 23:25:12 glass Exp $ */ /*- * SPDX-License-Identifier: BSD-4-Clause AND BSD-2-Clause-FreeBSD * @@ -29,6 +28,8 @@ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * $NetBSD: sysv_shm.c,v 1.39 1997/10/07 10:02:03 drochner Exp $ */ /*- * Copyright (c) 2003-2005 McAfee, Inc. From owner-svn-src-head@freebsd.org Sun Dec 31 04:01:48 2017 Return-Path: Delivered-To: svn-src-head@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 52D26E89070; Sun, 31 Dec 2017 04:01:48 +0000 (UTC) (envelope-from alc@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 21B9C7F76F; Sun, 31 Dec 2017 04:01:48 +0000 (UTC) (envelope-from alc@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id vBV41lJt009965; Sun, 31 Dec 2017 04:01:47 GMT (envelope-from alc@FreeBSD.org) Received: (from alc@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id vBV41llZ009964; Sun, 31 Dec 2017 04:01:47 GMT (envelope-from alc@FreeBSD.org) Message-Id: <201712310401.vBV41llZ009964@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: alc set sender to alc@FreeBSD.org using -f From: Alan Cox Date: Sun, 31 Dec 2017 04:01:47 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r327410 - head/sys/vm X-SVN-Group: head X-SVN-Commit-Author: alc X-SVN-Commit-Paths: head/sys/vm X-SVN-Commit-Revision: 327410 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 31 Dec 2017 04:01:48 -0000 Author: alc Date: Sun Dec 31 04:01:47 2017 New Revision: 327410 URL: https://svnweb.freebsd.org/changeset/base/327410 Log: Previously, swap_pager_copy() freed swap blocks one at at time, via swp_pager_meta_ctl(), with no opportunity to recognize freeing of consecutive blocks and free fewer block ranges. To open that opportunity, this change removes the SWM_FREE option from swp_pager_meta_ctl(), and compels the caller to do the freeing when a valid block address is returned. In swap_pager_copy(), these frees are aggregated, so that a sequence of them can be done at one time. The only other caller to swp_pager_meta_ctl() that passed SWM_FREE, swp_pager_unswapped(), is also modified to handle its single free explicitly. Submitted by: Doug Moore Reviewed by: kib (an earlier version) MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D13290 Modified: head/sys/vm/swap_pager.c Modified: head/sys/vm/swap_pager.c ============================================================================== --- head/sys/vm/swap_pager.c Sun Dec 31 03:35:34 2017 (r327409) +++ head/sys/vm/swap_pager.c Sun Dec 31 04:01:47 2017 (r327410) @@ -311,8 +311,7 @@ swap_release_by_cred(vm_ooffset_t decr, struct ucred * racct_sub_cred(cred, RACCT_SWAP, decr); } -#define SWM_FREE 0x02 /* free, period */ -#define SWM_POP 0x04 /* pop out */ +#define SWM_POP 0x01 /* pop out */ static int swap_pager_full = 2; /* swap space exhaustion (task killing) */ static int swap_pager_almost_full = 1; /* swap space exhaustion (w/hysteresis)*/ @@ -911,6 +910,7 @@ swap_pager_copy(vm_object_t srcobject, vm_object_t dst vm_pindex_t offset, int destroysource) { vm_pindex_t i; + daddr_t dstaddr, first_free, num_free, srcaddr; VM_OBJECT_ASSERT_WLOCKED(srcobject); VM_OBJECT_ASSERT_WLOCKED(dstobject); @@ -935,53 +935,44 @@ swap_pager_copy(vm_object_t srcobject, vm_object_t dst } /* - * transfer source to destination. + * Transfer source to destination. */ + first_free = SWAPBLK_NONE; + num_free = 0; for (i = 0; i < dstobject->size; ++i) { - daddr_t dstaddr; - - /* - * Locate (without changing) the swapblk on the destination, - * unless it is invalid in which case free it silently, or - * if the destination is a resident page, in which case the - * source is thrown away. - */ + srcaddr = swp_pager_meta_ctl(srcobject, i + offset, SWM_POP); + if (srcaddr == SWAPBLK_NONE) + continue; dstaddr = swp_pager_meta_ctl(dstobject, i, 0); - if (dstaddr == SWAPBLK_NONE) { /* * Destination has no swapblk and is not resident, * copy source. + * + * swp_pager_meta_build() can sleep. */ - daddr_t srcaddr; - - srcaddr = swp_pager_meta_ctl( - srcobject, - i + offset, - SWM_POP - ); - - if (srcaddr != SWAPBLK_NONE) { - /* - * swp_pager_meta_build() can sleep. - */ - vm_object_pip_add(srcobject, 1); - VM_OBJECT_WUNLOCK(srcobject); - vm_object_pip_add(dstobject, 1); - swp_pager_meta_build(dstobject, i, srcaddr); - vm_object_pip_wakeup(dstobject); - VM_OBJECT_WLOCK(srcobject); - vm_object_pip_wakeup(srcobject); - } + vm_object_pip_add(srcobject, 1); + VM_OBJECT_WUNLOCK(srcobject); + vm_object_pip_add(dstobject, 1); + swp_pager_meta_build(dstobject, i, srcaddr); + vm_object_pip_wakeup(dstobject); + VM_OBJECT_WLOCK(srcobject); + vm_object_pip_wakeup(srcobject); } else { /* * Destination has valid swapblk or it is represented * by a resident page. We destroy the sourceblock. */ - - swp_pager_meta_ctl(srcobject, i + offset, SWM_FREE); + if (first_free + num_free == srcaddr) + num_free++; + else { + swp_pager_freeswapspace(first_free, num_free); + first_free = srcaddr; + num_free = 1; + } } } + swp_pager_freeswapspace(first_free, num_free); /* * Free left over swap blocks in source. @@ -1082,8 +1073,11 @@ swap_pager_haspage(vm_object_t object, vm_pindex_t pin static void swap_pager_unswapped(vm_page_t m) { + daddr_t srcaddr; - swp_pager_meta_ctl(m->object, m->pindex, SWM_FREE); + srcaddr = swp_pager_meta_ctl(m->object, m->pindex, SWM_POP); + if (srcaddr != SWAPBLK_NONE) + swp_pager_freeswapspace(srcaddr, 1); } /* @@ -1999,21 +1993,17 @@ swp_pager_meta_free_all(vm_object_t object) } /* - * SWP_PAGER_METACTL() - misc control of swap and vm_page_t meta data. + * SWP_PAGER_METACTL() - misc control of swap meta data. * - * This routine is capable of looking up, popping, or freeing - * swapblk assignments in the swap meta data or in the vm_page_t. - * The routine typically returns the swapblk being looked-up, or popped, - * or SWAPBLK_NONE if the block was freed, or SWAPBLK_NONE if the block - * was invalid. This routine will automatically free any invalid - * meta-data swapblks. + * This routine is capable of looking up, or removing swapblk + * assignments in the swap meta data. It returns the swapblk being + * looked-up, popped, or SWAPBLK_NONE if the block was invalid. * * When acting on a busy resident page and paging is in progress, we * have to wait until paging is complete but otherwise can act on the * busy page. * - * SWM_FREE remove and free swap block from metadata - * SWM_POP remove from meta data but do not free.. pop it out + * SWM_POP remove from meta data but do not free it */ static daddr_t swp_pager_meta_ctl(vm_object_t object, vm_pindex_t pindex, int flags) @@ -2021,7 +2011,7 @@ swp_pager_meta_ctl(vm_object_t object, vm_pindex_t pin struct swblk *sb; daddr_t r1; - if ((flags & (SWM_FREE | SWM_POP)) != 0) + if ((flags & SWM_POP) != 0) VM_OBJECT_ASSERT_WLOCKED(object); else VM_OBJECT_ASSERT_LOCKED(object); @@ -2040,17 +2030,13 @@ swp_pager_meta_ctl(vm_object_t object, vm_pindex_t pin r1 = sb->d[pindex % SWAP_META_PAGES]; if (r1 == SWAPBLK_NONE) return (SWAPBLK_NONE); - if ((flags & (SWM_FREE | SWM_POP)) != 0) { + if ((flags & SWM_POP) != 0) { sb->d[pindex % SWAP_META_PAGES] = SWAPBLK_NONE; if (swp_pager_swblk_empty(sb, 0, SWAP_META_PAGES)) { SWAP_PCTRIE_REMOVE(&object->un_pager.swp.swp_blks, rounddown(pindex, SWAP_META_PAGES)); uma_zfree(swblk_zone, sb); } - } - if ((flags & SWM_FREE) != 0) { - swp_pager_freeswapspace(r1, 1); - r1 = SWAPBLK_NONE; } return (r1); } From owner-svn-src-head@freebsd.org Sun Dec 31 02:31:02 2017 Return-Path: Delivered-To: svn-src-head@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 EB7F1E82575; Sun, 31 Dec 2017 02:31:02 +0000 (UTC) (envelope-from mjg@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 B8DB57B81C; Sun, 31 Dec 2017 02:31:02 +0000 (UTC) (envelope-from mjg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id vBV2V1rf069224; Sun, 31 Dec 2017 02:31:01 GMT (envelope-from mjg@FreeBSD.org) Received: (from mjg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id vBV2V1Jr069222; Sun, 31 Dec 2017 02:31:01 GMT (envelope-from mjg@FreeBSD.org) Message-Id: <201712310231.vBV2V1Jr069222@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mjg set sender to mjg@FreeBSD.org using -f From: Mateusz Guzik Date: Sun, 31 Dec 2017 02:31:01 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r327402 - head/sys/kern X-SVN-Group: head X-SVN-Commit-Author: mjg X-SVN-Commit-Paths: head/sys/kern X-SVN-Commit-Revision: 327402 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 31 Dec 2017 02:31:03 -0000 Author: mjg Date: Sun Dec 31 02:31:01 2017 New Revision: 327402 URL: https://svnweb.freebsd.org/changeset/base/327402 Log: locks: adjust loop limit check when waiting for readers The check was for the exact value, but since the counter started being incremented by the number of readers it could have jumped over. Modified: head/sys/kern/kern_rwlock.c head/sys/kern/kern_sx.c Modified: head/sys/kern/kern_rwlock.c ============================================================================== --- head/sys/kern/kern_rwlock.c Sun Dec 31 01:59:56 2017 (r327401) +++ head/sys/kern/kern_rwlock.c Sun Dec 31 02:31:01 2017 (r327402) @@ -516,7 +516,7 @@ __rw_rlock_hard(struct rwlock *rw, struct thread *td, #endif KTR_STATE0(KTR_SCHED, "thread", sched_tdname(curthread), "running"); - if (i != rowner_loops) + if (i < rowner_loops) continue; } #endif @@ -995,7 +995,7 @@ __rw_wlock_hard(volatile uintptr_t *c, uintptr_t v LOC #ifdef KDTRACE_HOOKS lda.spin_cnt += rowner_loops - i; #endif - if (i != rowner_loops) + if (i < rowner_loops) continue; sleep_reason = 2; } Modified: head/sys/kern/kern_sx.c ============================================================================== --- head/sys/kern/kern_sx.c Sun Dec 31 01:59:56 2017 (r327401) +++ head/sys/kern/kern_sx.c Sun Dec 31 02:31:01 2017 (r327402) @@ -671,7 +671,7 @@ _sx_xlock_hard(struct sx *sx, uintptr_t x, int opts LO #endif KTR_STATE0(KTR_SCHED, "thread", sched_tdname(curthread), "running"); - if (i != asx_loops) + if (i < asx_loops) continue; sleep_reason = 2; } From owner-svn-src-head@freebsd.org Sun Dec 31 05:22:28 2017 Return-Path: Delivered-To: svn-src-head@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 C2031EA1B84; Sun, 31 Dec 2017 05:22:28 +0000 (UTC) (envelope-from kevans@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 42D67337F; Sun, 31 Dec 2017 05:22:28 +0000 (UTC) (envelope-from kevans@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id vBV5MRPQ046175; Sun, 31 Dec 2017 05:22:27 GMT (envelope-from kevans@FreeBSD.org) Received: (from kevans@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id vBV5MQfs046172; Sun, 31 Dec 2017 05:22:26 GMT (envelope-from kevans@FreeBSD.org) Message-Id: <201712310522.vBV5MQfs046172@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kevans set sender to kevans@FreeBSD.org using -f From: Kyle Evans Date: Sun, 31 Dec 2017 05:22:26 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r327416 - head/stand/fdt X-SVN-Group: head X-SVN-Commit-Author: kevans X-SVN-Commit-Paths: head/stand/fdt X-SVN-Commit-Revision: 327416 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 31 Dec 2017 05:22:28 -0000 Author: kevans Date: Sun Dec 31 05:22:26 2017 New Revision: 327416 URL: https://svnweb.freebsd.org/changeset/base/327416 Log: stand/fdt: Make fdt_overlay_apply signature-compatible with libfdt libfdt will assume a writable fdt overlay blob has been passed in, so make ours compatible to allow easier review when we try to drop libfdt into place. overlay from the calling context is writable, making it safe to simply rip out everything related to copying the overlay blob in fdt_overlay_apply. I note here that we still have problems: fdt_overlay_apply, both our version and libfdt's, may fail and have already clobbered the base fdt to some extent. Future work will make sure we don't apply a potentially bogus fdt, instead discarding the base fdt if we had an error. Reviewed by: gonzo Differential Revision: https://reviews.freebsd.org/D13695 Modified: head/stand/fdt/fdt_loader_cmd.c head/stand/fdt/fdt_overlay.c head/stand/fdt/fdt_overlay.h Modified: head/stand/fdt/fdt_loader_cmd.c ============================================================================== --- head/stand/fdt/fdt_loader_cmd.c Sun Dec 31 05:16:23 2017 (r327415) +++ head/stand/fdt/fdt_loader_cmd.c Sun Dec 31 05:22:26 2017 (r327416) @@ -386,7 +386,8 @@ fdt_apply_overlays() for (fp = file_findfile(NULL, "dtbo"); fp != NULL; fp = fp->f_next) { printf("applying DTB overlay '%s'\n", fp->f_name); COPYOUT(fp->f_addr, overlay, fp->f_size); - fdt_overlay_apply(new_fdtp, overlay, fp->f_size); + /* Both overlay and new_fdtp may be modified in place */ + fdt_overlay_apply(new_fdtp, overlay); } free(fdtp); Modified: head/stand/fdt/fdt_overlay.c ============================================================================== --- head/stand/fdt/fdt_overlay.c Sun Dec 31 05:16:23 2017 (r327415) +++ head/stand/fdt/fdt_overlay.c Sun Dec 31 05:22:26 2017 (r327416) @@ -409,41 +409,23 @@ fdt_overlay_apply_fragments(void *main_fdtp, void *ove } int -fdt_overlay_apply(void *main_fdtp, void *overlay_fdtp, size_t overlay_length) +fdt_overlay_apply(void *main_fdtp, void *overlay_fdtp) { - void *overlay_copy; - int rv; - rv = 0; - - /* We modify overlay in-place, so we need writable copy */ - overlay_copy = malloc(overlay_length); - if (overlay_copy == NULL) { - printf("failed to allocate memory for overlay copy\n"); + if (fdt_overlay_do_fixups(main_fdtp, overlay_fdtp) < 0) { + printf("failed to perform fixups in overlay\n"); return (-1); } - memcpy(overlay_copy, overlay_fdtp, overlay_length); - - if (fdt_overlay_do_fixups(main_fdtp, overlay_copy) < 0) { - printf("failed to perform fixups in overlay\n"); - rv = -1; - goto out; - } - - if (fdt_overlay_do_local_fixups(main_fdtp, overlay_copy) < 0) { + if (fdt_overlay_do_local_fixups(main_fdtp, overlay_fdtp) < 0) { printf("failed to perform local fixups in overlay\n"); - rv = -1; - goto out; + return (-1); } - if (fdt_overlay_apply_fragments(main_fdtp, overlay_copy) < 0) { + if (fdt_overlay_apply_fragments(main_fdtp, overlay_fdtp) < 0) { printf("failed to apply fragments\n"); - rv = -1; + return (-1); } -out: - free(overlay_copy); - - return (rv); + return (0); } Modified: head/stand/fdt/fdt_overlay.h ============================================================================== --- head/stand/fdt/fdt_overlay.h Sun Dec 31 05:16:23 2017 (r327415) +++ head/stand/fdt/fdt_overlay.h Sun Dec 31 05:22:26 2017 (r327416) @@ -29,6 +29,6 @@ #ifndef FDT_OVERLAY_H #define FDT_OVERLAY_H -int fdt_overlay_apply(void *main_fdtp, void *overlay_fdtp, size_t overlay_length); +int fdt_overlay_apply(void *main_fdtp, void *overlay_fdtp); #endif /* FDT_OVERLAY_H */ From owner-svn-src-head@freebsd.org Sun Dec 31 05:38:20 2017 Return-Path: Delivered-To: svn-src-head@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 86D8BEA2C9E; Sun, 31 Dec 2017 05:38:20 +0000 (UTC) (envelope-from nwhitehorn@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 514903E72; Sun, 31 Dec 2017 05:38:20 +0000 (UTC) (envelope-from nwhitehorn@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id vBV5cJ13050365; Sun, 31 Dec 2017 05:38:19 GMT (envelope-from nwhitehorn@FreeBSD.org) Received: (from nwhitehorn@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id vBV5cJRr050364; Sun, 31 Dec 2017 05:38:19 GMT (envelope-from nwhitehorn@FreeBSD.org) Message-Id: <201712310538.vBV5cJRr050364@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: nwhitehorn set sender to nwhitehorn@FreeBSD.org using -f From: Nathan Whitehorn Date: Sun, 31 Dec 2017 05:38:19 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r327417 - head/sys/powerpc/aim X-SVN-Group: head X-SVN-Commit-Author: nwhitehorn X-SVN-Commit-Paths: head/sys/powerpc/aim X-SVN-Commit-Revision: 327417 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 31 Dec 2017 05:38:20 -0000 Author: nwhitehorn Date: Sun Dec 31 05:38:19 2017 New Revision: 327417 URL: https://svnweb.freebsd.org/changeset/base/327417 Log: Make sure the first instruction of the low-memory spinloop is in the cacheline being invalidated. MFC after: 1 month Modified: head/sys/powerpc/aim/locore64.S Modified: head/sys/powerpc/aim/locore64.S ============================================================================== --- head/sys/powerpc/aim/locore64.S Sun Dec 31 05:22:26 2017 (r327416) +++ head/sys/powerpc/aim/locore64.S Sun Dec 31 05:38:19 2017 (r327417) @@ -85,8 +85,9 @@ ap_kexec_start: /* At 0x60 past start, copied to 0x60 sync icbi 0,%r0 isync - ba 0x78 /* Absolute branch to next inst */ + ba 0x80 /* Absolute branch to next inst */ +. = kbootentry + 0x80 /* Aligned to cache line */ 1: or 31,31,31 /* yield */ sync lwz %r1,0x40(0) /* Spin on ap_kexec_spin_sem */ From owner-svn-src-head@freebsd.org Sun Dec 31 03:13:46 2017 Return-Path: Delivered-To: svn-src-head@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 D6FC1E84F90; Sun, 31 Dec 2017 03:13:46 +0000 (UTC) (envelope-from nwhitehorn@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 A33F07D67A; Sun, 31 Dec 2017 03:13:46 +0000 (UTC) (envelope-from nwhitehorn@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id vBV3Dj1d090893; Sun, 31 Dec 2017 03:13:45 GMT (envelope-from nwhitehorn@FreeBSD.org) Received: (from nwhitehorn@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id vBV3DjMo090892; Sun, 31 Dec 2017 03:13:45 GMT (envelope-from nwhitehorn@FreeBSD.org) Message-Id: <201712310313.vBV3DjMo090892@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: nwhitehorn set sender to nwhitehorn@FreeBSD.org using -f From: Nathan Whitehorn Date: Sun, 31 Dec 2017 03:13:45 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r327405 - head/usr.sbin/bsdinstall/partedit X-SVN-Group: head X-SVN-Commit-Author: nwhitehorn X-SVN-Commit-Paths: head/usr.sbin/bsdinstall/partedit X-SVN-Commit-Revision: 327405 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 31 Dec 2017 03:13:46 -0000 Author: nwhitehorn Date: Sun Dec 31 03:13:45 2017 New Revision: 327405 URL: https://svnweb.freebsd.org/changeset/base/327405 Log: Teach bsdinstall partedit/sade how to format FAT partitions on GPT, which have the partition type code "ms-basic-data". MFC after: 2 weeks Modified: head/usr.sbin/bsdinstall/partedit/gpart_ops.c Modified: head/usr.sbin/bsdinstall/partedit/gpart_ops.c ============================================================================== --- head/usr.sbin/bsdinstall/partedit/gpart_ops.c Sun Dec 31 03:06:29 2017 (r327404) +++ head/usr.sbin/bsdinstall/partedit/gpart_ops.c Sun Dec 31 03:13:45 2017 (r327405) @@ -167,7 +167,8 @@ newfs_command(const char *fstype, char *command, int u else if (strcmp(items[i].name, "atime") == 0) strcat(command, "-O atime=off "); } - } else if (strcmp(fstype, "fat32") == 0 || strcmp(fstype, "efi") == 0) { + } else if (strcmp(fstype, "fat32") == 0 || strcmp(fstype, "efi") == 0 || + strcmp(fstype, "ms-basic-data") == 0) { int i; DIALOG_LISTITEM items[] = { {"FAT32", "FAT Type 32", @@ -747,7 +748,8 @@ set_default_part_metadata(const char *name, const char /* Get VFS from text after freebsd-, if possible */ if (strncmp("freebsd-", type, 8) == 0) md->fstab->fs_vfstype = strdup(&type[8]); - else if (strcmp("fat32", type) == 0 || strcmp("efi", type) == 0) + else if (strcmp("fat32", type) == 0 || strcmp("efi", type) == 0 + || strcmp("ms-basic-data", type) == 0) md->fstab->fs_vfstype = strdup("msdosfs"); else md->fstab->fs_vfstype = strdup(type); /* Guess */ From owner-svn-src-head@freebsd.org Sun Dec 31 06:10:08 2017 Return-Path: Delivered-To: svn-src-head@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 7A6DCEA5116; Sun, 31 Dec 2017 06:10:08 +0000 (UTC) (envelope-from nwhitehorn@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 442676472E; Sun, 31 Dec 2017 06:10:08 +0000 (UTC) (envelope-from nwhitehorn@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id vBV6A7Tg062882; Sun, 31 Dec 2017 06:10:07 GMT (envelope-from nwhitehorn@FreeBSD.org) Received: (from nwhitehorn@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id vBV6A7cn062881; Sun, 31 Dec 2017 06:10:07 GMT (envelope-from nwhitehorn@FreeBSD.org) Message-Id: <201712310610.vBV6A7cn062881@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: nwhitehorn set sender to nwhitehorn@FreeBSD.org using -f From: Nathan Whitehorn Date: Sun, 31 Dec 2017 06:10:07 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r327418 - head/sys/powerpc/ps3 X-SVN-Group: head X-SVN-Commit-Author: nwhitehorn X-SVN-Commit-Paths: head/sys/powerpc/ps3 X-SVN-Commit-Revision: 327418 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 31 Dec 2017 06:10:08 -0000 Author: nwhitehorn Date: Sun Dec 31 06:10:07 2017 New Revision: 327418 URL: https://svnweb.freebsd.org/changeset/base/327418 Log: Use data from the boot loader to pick the appropriate output graphics mode instead of hard-coding a default. This information is passed implicitly by the PS3 firmware and can be relied upon. Also adjust the default mode, if somehow firmware doesn't pass one, to 1920x1080 from 720x480 since it is 2017. MFC after: 2 weeks Modified: head/sys/powerpc/ps3/ps3_syscons.c Modified: head/sys/powerpc/ps3/ps3_syscons.c ============================================================================== --- head/sys/powerpc/ps3/ps3_syscons.c Sun Dec 31 05:38:19 2017 (r327417) +++ head/sys/powerpc/ps3/ps3_syscons.c Sun Dec 31 06:10:07 2017 (r327418) @@ -159,16 +159,62 @@ static int ps3fb_init(struct vt_device *vd) { struct ps3fb_softc *sc; + char linux_video_mode[24]; + int linux_video_mode_num = 0; /* Init softc */ vd->vd_softc = sc = &ps3fb_softc; - /* XXX: get from HV repository */ sc->fb_info.fb_depth = 32; - sc->fb_info.fb_height = 480; - sc->fb_info.fb_width = 720; + sc->fb_info.fb_height = 1080; + sc->fb_info.fb_width = 1920; + + /* See if the bootloader has passed a graphics mode to use */ + bzero(linux_video_mode, sizeof(linux_video_mode)); + TUNABLE_STR_FETCH("video", linux_video_mode, sizeof(linux_video_mode)); + sscanf(linux_video_mode, "ps3fb:mode:%d", &linux_video_mode_num); + + switch (linux_video_mode_num) { + case 1: + case 2: + sc->fb_info.fb_height = 480; + sc->fb_info.fb_width = 720; + break; + case 3: + case 8: + sc->fb_info.fb_height = 720; + sc->fb_info.fb_width = 1280; + break; + case 4: + case 5: + case 9: + case 10: + sc->fb_info.fb_height = 1080; + sc->fb_info.fb_width = 1920; + break; + case 6: + case 7: + sc->fb_info.fb_height = 576; + sc->fb_info.fb_width = 720; + break; + case 11: + sc->fb_info.fb_height = 768; + sc->fb_info.fb_width = 1024; + break; + case 12: + sc->fb_info.fb_height = 1024; + sc->fb_info.fb_width = 1280; + break; + case 13: + sc->fb_info.fb_height = 1200; + sc->fb_info.fb_width = 1920; + break; + } + + /* Allow explicitly-specified values for us to override everything */ TUNABLE_INT_FETCH("hw.ps3fb.height", &sc->fb_info.fb_height); TUNABLE_INT_FETCH("hw.ps3fb.width", &sc->fb_info.fb_width); + sc->fb_info.fb_stride = sc->fb_info.fb_width*4; sc->fb_info.fb_size = sc->fb_info.fb_height * sc->fb_info.fb_stride; sc->fb_info.fb_bpp = sc->fb_info.fb_stride / sc->fb_info.fb_width * 8; From owner-svn-src-head@freebsd.org Sun Dec 31 06:44:16 2017 Return-Path: Delivered-To: svn-src-head@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 AD69BEA6325; Sun, 31 Dec 2017 06:44:16 +0000 (UTC) (envelope-from kevans@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 84C9B6587F; Sun, 31 Dec 2017 06:44:16 +0000 (UTC) (envelope-from kevans@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id vBV6iFBj079640; Sun, 31 Dec 2017 06:44:15 GMT (envelope-from kevans@FreeBSD.org) Received: (from kevans@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id vBV6iFqC079639; Sun, 31 Dec 2017 06:44:15 GMT (envelope-from kevans@FreeBSD.org) Message-Id: <201712310644.vBV6iFqC079639@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kevans set sender to kevans@FreeBSD.org using -f From: Kyle Evans Date: Sun, 31 Dec 2017 06:44:15 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r327419 - head/sys/arm/allwinner X-SVN-Group: head X-SVN-Commit-Author: kevans X-SVN-Commit-Paths: head/sys/arm/allwinner X-SVN-Commit-Revision: 327419 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 31 Dec 2017 06:44:16 -0000 Author: kevans Date: Sun Dec 31 06:44:15 2017 New Revision: 327419 URL: https://svnweb.freebsd.org/changeset/base/327419 Log: aw_sid: rewrite compat-string configuration to be more flexible This will allow easiser support in the future for boards that have thermal data and different offsets for root key/efuse data. Modified: head/sys/arm/allwinner/aw_sid.c Modified: head/sys/arm/allwinner/aw_sid.c ============================================================================== --- head/sys/arm/allwinner/aw_sid.c Sun Dec 31 06:10:07 2017 (r327418) +++ head/sys/arm/allwinner/aw_sid.c Sun Dec 31 06:44:15 2017 (r327419) @@ -52,28 +52,36 @@ __FBSDID("$FreeBSD$"); #define SID_THERMAL_CALIB0 (SID_SRAM + 0x34) #define SID_THERMAL_CALIB1 (SID_SRAM + 0x38) -#define A10_ROOT_KEY_OFF 0x0 -#define A83T_ROOT_KEY_OFF SID_SRAM - #define ROOT_KEY_SIZE 4 -enum sid_type { - A10_SID = 1, - A20_SID, - A83T_SID, +struct aw_sid_conf { + bus_size_t rootkey_offset; + bool has_thermal; }; +static const struct aw_sid_conf a10_conf = { + .rootkey_offset = 0, +}; + +static const struct aw_sid_conf a20_conf = { + .rootkey_offset = 0, +}; + +static const struct aw_sid_conf a83t_conf = { + .rootkey_offset = SID_SRAM, + .has_thermal = true, +}; + static struct ofw_compat_data compat_data[] = { - { "allwinner,sun4i-a10-sid", A10_SID}, - { "allwinner,sun7i-a20-sid", A20_SID}, - { "allwinner,sun8i-a83t-sid", A83T_SID}, + { "allwinner,sun4i-a10-sid", (uintptr_t)&a10_conf}, + { "allwinner,sun7i-a20-sid", (uintptr_t)&a20_conf}, + { "allwinner,sun8i-a83t-sid", (uintptr_t)&a83t_conf}, { NULL, 0 } }; struct aw_sid_softc { struct resource *res; - int type; - bus_size_t root_key_off; + struct aw_sid_conf *sid_conf; }; static struct aw_sid_softc *aw_sid_sc; @@ -118,17 +126,8 @@ aw_sid_attach(device_t dev) } aw_sid_sc = sc; + sc->sid_conf = (struct aw_sid_conf *)ofw_bus_search_compatible(dev, compat_data)->ocd_data; - sc->type = ofw_bus_search_compatible(dev, compat_data)->ocd_data; - switch (sc->type) { - case A83T_SID: - sc->root_key_off = A83T_ROOT_KEY_OFF; - break; - default: - sc->root_key_off = A10_ROOT_KEY_OFF; - break; - } - SYSCTL_ADD_PROC(device_get_sysctl_ctx(dev), SYSCTL_CHILDREN(device_get_sysctl_tree(dev)), OID_AUTO, "rootkey", @@ -146,7 +145,7 @@ aw_sid_read_tscalib(uint32_t *calib0, uint32_t *calib1 sc = aw_sid_sc; if (sc == NULL) return (ENXIO); - if (sc->type != A83T_SID) + if (!sc->sid_conf->has_thermal) return (ENXIO); *calib0 = RD4(sc, SID_THERMAL_CALIB0); @@ -160,14 +159,15 @@ aw_sid_get_rootkey(u_char *out) { struct aw_sid_softc *sc; int i; + bus_size_t root_key_off; u_int tmp; sc = aw_sid_sc; if (sc == NULL) return (ENXIO); - + root_key_off = aw_sid_sc->sid_conf->rootkey_offset; for (i = 0; i < ROOT_KEY_SIZE ; i++) { - tmp = RD4(aw_sid_sc, aw_sid_sc->root_key_off + (i * 4)); + tmp = RD4(aw_sid_sc, root_key_off + (i * 4)); be32enc(&out[i * 4], tmp); } From owner-svn-src-head@freebsd.org Sun Dec 31 06:58:59 2017 Return-Path: Delivered-To: svn-src-head@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 70630EA6C34; Sun, 31 Dec 2017 06:58:59 +0000 (UTC) (envelope-from eadler@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 3B0B366011; Sun, 31 Dec 2017 06:58:59 +0000 (UTC) (envelope-from eadler@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id vBV6ww9Z084382; Sun, 31 Dec 2017 06:58:58 GMT (envelope-from eadler@FreeBSD.org) Received: (from eadler@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id vBV6wwYe084381; Sun, 31 Dec 2017 06:58:58 GMT (envelope-from eadler@FreeBSD.org) Message-Id: <201712310658.vBV6wwYe084381@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: eadler set sender to eadler@FreeBSD.org using -f From: Eitan Adler Date: Sun, 31 Dec 2017 06:58:58 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r327420 - head/share/skel X-SVN-Group: head X-SVN-Commit-Author: eadler X-SVN-Commit-Paths: head/share/skel X-SVN-Commit-Revision: 327420 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 31 Dec 2017 06:58:59 -0000 Author: eadler Date: Sun Dec 31 06:58:58 2017 New Revision: 327420 URL: https://svnweb.freebsd.org/changeset/base/327420 Log: skel: Quote PAGER in dot.shrc PR: 181853 Submitted by: pl@catslair.org MFC After: 1 week Modified: head/share/skel/dot.shrc Modified: head/share/skel/dot.shrc ============================================================================== --- head/share/skel/dot.shrc Sun Dec 31 06:44:15 2017 (r327419) +++ head/share/skel/dot.shrc Sun Dec 31 06:58:58 2017 (r327420) @@ -21,7 +21,7 @@ # some useful aliases alias h='fc -l' alias j=jobs -alias m=$PAGER +alias m="$PAGER" alias ll='ls -laFo' alias l='ls -l' alias g='egrep -i' From owner-svn-src-head@freebsd.org Sun Dec 31 07:25:57 2017 Return-Path: Delivered-To: svn-src-head@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 665B2EA7B7F; Sun, 31 Dec 2017 07:25:57 +0000 (UTC) (envelope-from eadler@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 3097E66BE6; Sun, 31 Dec 2017 07:25:57 +0000 (UTC) (envelope-from eadler@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id vBV7PuZ0096547; Sun, 31 Dec 2017 07:25:56 GMT (envelope-from eadler@FreeBSD.org) Received: (from eadler@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id vBV7Puas096545; Sun, 31 Dec 2017 07:25:56 GMT (envelope-from eadler@FreeBSD.org) Message-Id: <201712310725.vBV7Puas096545@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: eadler set sender to eadler@FreeBSD.org using -f From: Eitan Adler Date: Sun, 31 Dec 2017 07:25:56 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r327421 - in head: . etc/mtree X-SVN-Group: head X-SVN-Commit-Author: eadler X-SVN-Commit-Paths: in head: . etc/mtree X-SVN-Commit-Revision: 327421 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 31 Dec 2017 07:25:57 -0000 Author: eadler Date: Sun Dec 31 07:25:55 2017 New Revision: 327421 URL: https://svnweb.freebsd.org/changeset/base/327421 Log: mtree: remove /etc/skel We use /usr/share/skel instead of /etc/skel. The existence of /etc/skel has confused people. PR: 46062 (submitted 2002-12-07) PR: 218897 Submitted by: carl@slackerbsd.org Submitted by: asv@inhio.net Modified: head/ObsoleteFiles.inc head/etc/mtree/BSD.root.dist Modified: head/ObsoleteFiles.inc ============================================================================== --- head/ObsoleteFiles.inc Sun Dec 31 06:58:58 2017 (r327420) +++ head/ObsoleteFiles.inc Sun Dec 31 07:25:55 2017 (r327421) @@ -38,6 +38,8 @@ # xargs -n1 | sort | uniq -d; # done +# 20171230: Remove /etc/skel from mtree +OLD_DIRS=/etc/skel # 20171208: Remove basename_r(3) OLD_FILES+=usr/share/man/man3/basename_r.3.gz # 20171204: Move fdformat man page from volume 1 to volume 8. Modified: head/etc/mtree/BSD.root.dist ============================================================================== --- head/etc/mtree/BSD.root.dist Sun Dec 31 06:58:58 2017 (r327420) +++ head/etc/mtree/BSD.root.dist Sun Dec 31 07:25:55 2017 (r327421) @@ -70,8 +70,6 @@ .. security .. - skel - .. ssh .. ssl From owner-svn-src-head@freebsd.org Sun Dec 31 07:26:25 2017 Return-Path: Delivered-To: svn-src-head@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 BE942EA7C45; Sun, 31 Dec 2017 07:26:25 +0000 (UTC) (envelope-from eadler@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 8896166DC2; Sun, 31 Dec 2017 07:26:25 +0000 (UTC) (envelope-from eadler@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id vBV7QOVN096666; Sun, 31 Dec 2017 07:26:24 GMT (envelope-from eadler@FreeBSD.org) Received: (from eadler@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id vBV7QOWa096665; Sun, 31 Dec 2017 07:26:24 GMT (envelope-from eadler@FreeBSD.org) Message-Id: <201712310726.vBV7QOWa096665@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: eadler set sender to eadler@FreeBSD.org using -f From: Eitan Adler Date: Sun, 31 Dec 2017 07:26:24 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r327422 - head X-SVN-Group: head X-SVN-Commit-Author: eadler X-SVN-Commit-Paths: head X-SVN-Commit-Revision: 327422 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 31 Dec 2017 07:26:25 -0000 Author: eadler Date: Sun Dec 31 07:26:24 2017 New Revision: 327422 URL: https://svnweb.freebsd.org/changeset/base/327422 Log: s/=/+= Modified: head/ObsoleteFiles.inc Modified: head/ObsoleteFiles.inc ============================================================================== --- head/ObsoleteFiles.inc Sun Dec 31 07:25:55 2017 (r327421) +++ head/ObsoleteFiles.inc Sun Dec 31 07:26:24 2017 (r327422) @@ -39,7 +39,7 @@ # done # 20171230: Remove /etc/skel from mtree -OLD_DIRS=/etc/skel +OLD_DIRS+=/etc/skel # 20171208: Remove basename_r(3) OLD_FILES+=usr/share/man/man3/basename_r.3.gz # 20171204: Move fdformat man page from volume 1 to volume 8. From owner-svn-src-head@freebsd.org Sun Dec 31 09:21:02 2017 Return-Path: Delivered-To: svn-src-head@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 8A878EAC541; Sun, 31 Dec 2017 09:21:02 +0000 (UTC) (envelope-from cperciva@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 623CB6A626; Sun, 31 Dec 2017 09:21:02 +0000 (UTC) (envelope-from cperciva@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id vBV9L1gE042421; Sun, 31 Dec 2017 09:21:01 GMT (envelope-from cperciva@FreeBSD.org) Received: (from cperciva@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id vBV9L133042419; Sun, 31 Dec 2017 09:21:01 GMT (envelope-from cperciva@FreeBSD.org) Message-Id: <201712310921.vBV9L133042419@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: cperciva set sender to cperciva@FreeBSD.org using -f From: Colin Percival Date: Sun, 31 Dec 2017 09:21:01 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r327423 - in head/sys: kern sys X-SVN-Group: head X-SVN-Commit-Author: cperciva X-SVN-Commit-Paths: in head/sys: kern sys X-SVN-Commit-Revision: 327423 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 31 Dec 2017 09:21:02 -0000 Author: cperciva Date: Sun Dec 31 09:21:01 2017 New Revision: 327423 URL: https://svnweb.freebsd.org/changeset/base/327423 Log: Code for recording timestamps of events, especially function entries/exits. This is a very primitive system, intended for use in measuring performance during the early system boot, before more sophisticated tools like DTrace or infrastructure like kernel memory allocation and mutexes are available. Because this code records pointers to strings rather than copying strings (in order to keep the memory usage more manageable), if a kernel module is unloaded after logging an event, Bad Things can happen. Users are advised to not do that. Since cycle counts from the early kernel boot are used as an initial entropy source, publishing this information to userland could result in inadequate entropy being kept private to the kernel RNG. Users are advised to not enable this on systems with untrusted users. Discussed on: freebsd-current Added: head/sys/kern/kern_tslog.c (contents, props changed) head/sys/sys/tslog.h (contents, props changed) Added: head/sys/kern/kern_tslog.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/kern/kern_tslog.c Sun Dec 31 09:21:01 2017 (r327423) @@ -0,0 +1,118 @@ +/*- + * Copyright (c) 2017 Colin Percival + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + */ + +#include +__FBSDID("$FreeBSD$"); + +#include +#include +#include +#include +#include + +#include +#include + +#ifndef TSLOGSIZE +#define TSLOGSIZE 262144 +#endif + +static volatile long nrecs = 0; +static struct timestamp { + void * td; + int type; + const char * f; + const char * s; + uint64_t tsc; +} timestamps[TSLOGSIZE]; + +void +tslog(void * td, int type, const char * f, const char * s) +{ + uint64_t tsc = get_cyclecount(); + long pos; + + /* Grab a slot. */ + pos = atomic_fetchadd_long(&nrecs, 1); + + /* Store record. */ + if (pos < nitems(timestamps)) { + timestamps[pos].td = td; + timestamps[pos].type = type; + timestamps[pos].f = f; + timestamps[pos].s = s; + timestamps[pos].tsc = tsc; + } +} + +static int +sysctl_debug_tslog(SYSCTL_HANDLER_ARGS) +{ + int error; + struct sbuf *sb; + size_t i, limit; + + /* + * This code can race against the code in tslog() which stores + * records: Theoretically we could end up reading a record after + * its slots have been reserved but before it has been written. + * Since this code takes orders of magnitude longer to run than + * tslog() takes to write a record, it is highly unlikely that + * anyone will ever experience this race. + */ + sb = sbuf_new_for_sysctl(NULL, NULL, 1024, req); + limit = MIN(nrecs, nitems(timestamps)); + for (i = 0; i < limit; i++) { + sbuf_printf(sb, "%p", timestamps[i].td); + sbuf_printf(sb, " %llu", + (unsigned long long)timestamps[i].tsc); + switch (timestamps[i].type) { + case TS_ENTER: + sbuf_printf(sb, " ENTER"); + break; + case TS_EXIT: + sbuf_printf(sb, " EXIT"); + break; + case TS_THREAD: + sbuf_printf(sb, " THREAD"); + break; + case TS_EVENT: + sbuf_printf(sb, " EVENT"); + break; + } + sbuf_printf(sb, " %s", timestamps[i].f ? timestamps[i].f : "(null)"); + if (timestamps[i].s) + sbuf_printf(sb, " %s\n", timestamps[i].s); + else + sbuf_printf(sb, "\n"); + } + error = sbuf_finish(sb); + sbuf_delete(sb); + return (error); +} + +SYSCTL_PROC(_debug, OID_AUTO, tslog, CTLTYPE_STRING|CTLFLAG_RD|CTLFLAG_MPSAFE, + 0, 0, sysctl_debug_tslog, "", "Dump recorded event timestamps"); Added: head/sys/sys/tslog.h ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/sys/tslog.h Sun Dec 31 09:21:01 2017 (r327423) @@ -0,0 +1,60 @@ +/*- + * Copyright (c) 2017 Colin Percival + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * $FreeBSD$ + */ + +#ifndef _TSLOG_H_ +#define _TSLOG_H_ + +#include +#include + +#define TS_ENTER 0 +#define TS_EXIT 1 +#define TS_THREAD 2 +#define TS_EVENT 3 + +#define TSENTER() TSRAW(curthread, TS_ENTER, __func__, NULL) +#define TSENTER2(x) TSRAW(curthread, TS_ENTER, __func__, x) +#define TSEXIT() TSRAW(curthread, TS_EXIT, __func__, NULL) +#define TSEXIT2(x) TSRAW(curthread, TS_EXIT, __func__, x) +#define TSTHREAD(td, x) TSRAW(td, TS_THREAD, x, NULL) +#define TSEVENT(x) TSRAW(curthread, TS_EVENT, x, NULL) +#define TSEVENT2(x, y) TSRAW(curthread, TS_EVENT, x, y) +#define TSLINE() TSEVENT2(__FILE__, __XSTRING(__LINE__)) +#define TSWAIT(x) TSEVENT2("WAIT", x); +#define TSUNWAIT(x) TSEVENT2("UNWAIT", x); +#define TSHOLD(x) TSEVENT2("HOLD", x); +#define TSRELEASE(x) TSEVENT2("RELEASE", x); + +#ifdef TSLOG +#define TSRAW(a, b, c, d) tslog(a, b, c, d) +void tslog(void *, int, const char *, const char *); +#else +#define TSRAW(a, b, c, d) /* Timestamp logging disabled */ +#endif + +#endif /* _TSLOG_H_ */ From owner-svn-src-head@freebsd.org Sun Dec 31 09:21:36 2017 Return-Path: Delivered-To: svn-src-head@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 401E9EAC5D4; Sun, 31 Dec 2017 09:21:36 +0000 (UTC) (envelope-from cperciva@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 0AB3F6A8DB; Sun, 31 Dec 2017 09:21:35 +0000 (UTC) (envelope-from cperciva@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id vBV9LZUH045427; Sun, 31 Dec 2017 09:21:35 GMT (envelope-from cperciva@FreeBSD.org) Received: (from cperciva@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id vBV9LYYp045424; Sun, 31 Dec 2017 09:21:34 GMT (envelope-from cperciva@FreeBSD.org) Message-Id: <201712310921.vBV9LYYp045424@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: cperciva set sender to cperciva@FreeBSD.org using -f From: Colin Percival Date: Sun, 31 Dec 2017 09:21:34 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r327424 - head/sys/conf X-SVN-Group: head X-SVN-Commit-Author: cperciva X-SVN-Commit-Paths: head/sys/conf X-SVN-Commit-Revision: 327424 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 31 Dec 2017 09:21:36 -0000 Author: cperciva Date: Sun Dec 31 09:21:34 2017 New Revision: 327424 URL: https://svnweb.freebsd.org/changeset/base/327424 Log: Connect kern_tslog.c to the build and add TSLOG / TSLOGSIZE kernel options. These are intended for debugging purposes and should not be added to "generic" kernel configurations since they result in a nontrivial amount of memory being set aside for this purpose, can break if kernel modules are unloaded, and can potentially leak a dangerous amount of information about timestamps used as a source of kernel entropy. Modified: head/sys/conf/NOTES head/sys/conf/files head/sys/conf/options Modified: head/sys/conf/NOTES ============================================================================== --- head/sys/conf/NOTES Sun Dec 31 09:21:01 2017 (r327423) +++ head/sys/conf/NOTES Sun Dec 31 09:21:34 2017 (r327424) @@ -590,6 +590,20 @@ options STACK # options NUM_CORE_FILES=5 +# +# The TSLOG option enables timestamped logging of events, especially +# function entries/exits, in order to track the time spent by the kernel. +# In particular, this is useful when investigating the early boot process, +# before it is possible to use more sophisticated tools like DTrace. +# The TSLOGSIZE option controls the size of the (preallocated, fixed +# length) buffer used for storing these events (default: 262144 records). +# +# For security reasons the TSLOG option should not be enabled on systems +# used in production. +# +options TSLOG +options TSLOGSIZE=262144 + ##################################################################### # PERFORMANCE MONITORING OPTIONS Modified: head/sys/conf/files ============================================================================== --- head/sys/conf/files Sun Dec 31 09:21:01 2017 (r327423) +++ head/sys/conf/files Sun Dec 31 09:21:34 2017 (r327424) @@ -3802,6 +3802,7 @@ kern/kern_thr.c standard kern/kern_thread.c standard kern/kern_time.c standard kern/kern_timeout.c standard +kern/kern_tslog.c optional tslog kern/kern_umtx.c standard kern/kern_uuid.c standard kern/kern_xxx.c standard Modified: head/sys/conf/options ============================================================================== --- head/sys/conf/options Sun Dec 31 09:21:01 2017 (r327423) +++ head/sys/conf/options Sun Dec 31 09:21:34 2017 (r327424) @@ -67,6 +67,8 @@ EARLY_PRINTF opt_global.h TEXTDUMP_PREFERRED opt_ddb.h TEXTDUMP_VERBOSE opt_ddb.h NUM_CORE_FILES opt_global.h +TSLOG opt_global.h +TSLOGSIZE opt_global.h # Miscellaneous options. ALQ From owner-svn-src-head@freebsd.org Sun Dec 31 09:22:08 2017 Return-Path: Delivered-To: svn-src-head@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 7C31DEAC761; Sun, 31 Dec 2017 09:22:08 +0000 (UTC) (envelope-from cperciva@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 465D46AA81; Sun, 31 Dec 2017 09:22:08 +0000 (UTC) (envelope-from cperciva@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id vBV9M7dq045508; Sun, 31 Dec 2017 09:22:07 GMT (envelope-from cperciva@FreeBSD.org) Received: (from cperciva@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id vBV9M7Zd045507; Sun, 31 Dec 2017 09:22:07 GMT (envelope-from cperciva@FreeBSD.org) Message-Id: <201712310922.vBV9M7Zd045507@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: cperciva set sender to cperciva@FreeBSD.org using -f From: Colin Percival Date: Sun, 31 Dec 2017 09:22:07 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r327425 - head/sys/amd64/amd64 X-SVN-Group: head X-SVN-Commit-Author: cperciva X-SVN-Commit-Paths: head/sys/amd64/amd64 X-SVN-Commit-Revision: 327425 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 31 Dec 2017 09:22:08 -0000 Author: cperciva Date: Sun Dec 31 09:22:07 2017 New Revision: 327425 URL: https://svnweb.freebsd.org/changeset/base/327425 Log: Use the TSLOG framework to record entry/exit timestamps for hammer_time. The entry must be logged "manually" using TSRAW rather than TSENTER since PCPU data structures have not yet been initialized and thus curthread cannot be accessed; &thread0 is what will become curthread later in hammer_time. Other MD initialization code should be similarly instrumented in order to gain visibility into the time spent before entering mi_startup; this will require some care and testing from people with access to such hardware. Modified: head/sys/amd64/amd64/machdep.c Modified: head/sys/amd64/amd64/machdep.c ============================================================================== --- head/sys/amd64/amd64/machdep.c Sun Dec 31 09:21:34 2017 (r327424) +++ head/sys/amd64/amd64/machdep.c Sun Dec 31 09:22:07 2017 (r327425) @@ -1525,6 +1525,8 @@ hammer_time(u_int64_t modulep, u_int64_t physfree) size_t kstack0_sz; int late_console; + TSRAW(&thread0, TS_ENTER, __func__, NULL); + /* * This may be done better later if it gets more high level * components in it. If so just link td->td_proc here. @@ -1773,6 +1775,8 @@ hammer_time(u_int64_t modulep, u_int64_t physfree) x86_init_fdt(); #endif thread0.td_critnest = 0; + + TSEXIT(); /* Location of kernel stack for locore */ return ((u_int64_t)thread0.td_pcb); From owner-svn-src-head@freebsd.org Sun Dec 31 09:22:33 2017 Return-Path: Delivered-To: svn-src-head@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 4362DEAC7F7; Sun, 31 Dec 2017 09:22:33 +0000 (UTC) (envelope-from cperciva@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 E79456ACFD; Sun, 31 Dec 2017 09:22:32 +0000 (UTC) (envelope-from cperciva@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id vBV9MVrE046594; Sun, 31 Dec 2017 09:22:31 GMT (envelope-from cperciva@FreeBSD.org) Received: (from cperciva@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id vBV9MVs4046592; Sun, 31 Dec 2017 09:22:31 GMT (envelope-from cperciva@FreeBSD.org) Message-Id: <201712310922.vBV9MVs4046592@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: cperciva set sender to cperciva@FreeBSD.org using -f From: Colin Percival Date: Sun, 31 Dec 2017 09:22:31 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r327426 - head/sys/kern X-SVN-Group: head X-SVN-Commit-Author: cperciva X-SVN-Commit-Paths: head/sys/kern X-SVN-Commit-Revision: 327426 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 31 Dec 2017 09:22:33 -0000 Author: cperciva Date: Sun Dec 31 09:22:31 2017 New Revision: 327426 URL: https://svnweb.freebsd.org/changeset/base/327426 Log: Use the TSLOG framework to record entry/exit timestamps for machine independent functions with important roles in the early boot process: mi_startup (with the "exit" recorded when it becomes swapper), start_init (with the "exit" recorded when the thread is about to "return" into the newly created init process), vfs_mountroot, and vfs_mountroot_wait. Modified: head/sys/kern/init_main.c head/sys/kern/vfs_mountroot.c Modified: head/sys/kern/init_main.c ============================================================================== --- head/sys/kern/init_main.c Sun Dec 31 09:22:07 2017 (r327425) +++ head/sys/kern/init_main.c Sun Dec 31 09:22:31 2017 (r327426) @@ -220,6 +220,8 @@ mi_startup(void) int verbose; #endif + TSENTER(); + if (boothowto & RB_VERBOSE) bootverbose++; @@ -313,6 +315,8 @@ restart: } } + TSEXIT(); /* Here so we don't overlap with start_init. */ + mtx_assert(&Giant, MA_OWNED | MA_NOTRECURSED); mtx_unlock(&Giant); @@ -706,6 +710,8 @@ start_init(void *dummy) GIANT_REQUIRED; + TSENTER(); /* Here so we don't overlap with mi_startup. */ + td = curthread; p = td->td_proc; @@ -799,6 +805,7 @@ start_init(void *dummy) */ if ((error = sys_execve(td, &args)) == EJUSTRETURN) { mtx_unlock(&Giant); + TSEXIT(); return; } if (error != ENOENT) Modified: head/sys/kern/vfs_mountroot.c ============================================================================== --- head/sys/kern/vfs_mountroot.c Sun Dec 31 09:22:07 2017 (r327425) +++ head/sys/kern/vfs_mountroot.c Sun Dec 31 09:22:31 2017 (r327426) @@ -938,6 +938,8 @@ vfs_mountroot_wait(void) struct timeval lastfail; int curfail; + TSENTER(); + curfail = 0; while (1) { DROP_GIANT(); @@ -957,6 +959,8 @@ vfs_mountroot_wait(void) msleep(&root_holds, &root_holds_mtx, PZERO | PDROP, "roothold", hz); } + + TSEXIT(); } static int @@ -1013,6 +1017,8 @@ vfs_mountroot(void) struct thread *td; time_t timebase; int error; + + TSENTER(); td = curthread; @@ -1062,6 +1068,8 @@ vfs_mountroot(void) mtx_unlock(&root_holds_mtx); EVENTHANDLER_INVOKE(mountroot); + + TSEXIT(); } static struct mntarg * From owner-svn-src-head@freebsd.org Sun Dec 31 09:23:04 2017 Return-Path: Delivered-To: svn-src-head@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 2B8E7EAC8CA; Sun, 31 Dec 2017 09:23:04 +0000 (UTC) (envelope-from cperciva@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 E9FF66AE87; Sun, 31 Dec 2017 09:23:03 +0000 (UTC) (envelope-from cperciva@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id vBV9N2ZJ046657; Sun, 31 Dec 2017 09:23:02 GMT (envelope-from cperciva@FreeBSD.org) Received: (from cperciva@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id vBV9N2eG046656; Sun, 31 Dec 2017 09:23:02 GMT (envelope-from cperciva@FreeBSD.org) Message-Id: <201712310923.vBV9N2eG046656@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: cperciva set sender to cperciva@FreeBSD.org using -f From: Colin Percival Date: Sun, 31 Dec 2017 09:23:02 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r327427 - head/sys/sys X-SVN-Group: head X-SVN-Commit-Author: cperciva X-SVN-Commit-Paths: head/sys/sys X-SVN-Commit-Revision: 327427 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 31 Dec 2017 09:23:04 -0000 Author: cperciva Date: Sun Dec 31 09:23:02 2017 New Revision: 327427 URL: https://svnweb.freebsd.org/changeset/base/327427 Log: Use the TSLOG framework to record SYSINIT entry/exit timestamps. Modified: head/sys/sys/kernel.h Modified: head/sys/sys/kernel.h ============================================================================== --- head/sys/sys/kernel.h Sun Dec 31 09:22:31 2017 (r327426) +++ head/sys/sys/kernel.h Sun Dec 31 09:23:02 2017 (r327427) @@ -54,6 +54,9 @@ /* for intrhook below */ #include +/* for timestamping SYSINITs; other files may assume this is included here */ +#include + /* Global variables for the kernel. */ /* 1.1 */ @@ -229,14 +232,44 @@ struct sysinit { * correct warnings when -Wcast-qual is used. * */ +#ifdef TSLOG +struct sysinit_tslog { + sysinit_cfunc_t func; + const void * data; + const char * name; +}; +static inline void +sysinit_tslog_shim(const void * data) +{ + const struct sysinit_tslog * x = data; + + TSRAW(curthread, TS_ENTER, "SYSINIT", x->name); + (x->func)(x->data); + TSRAW(curthread, TS_EXIT, "SYSINIT", x->name); +} #define C_SYSINIT(uniquifier, subsystem, order, func, ident) \ + static struct sysinit_tslog uniquifier ## _sys_init_tslog = { \ + func, \ + (ident), \ + #uniquifier \ + }; \ static struct sysinit uniquifier ## _sys_init = { \ subsystem, \ order, \ + sysinit_tslog_shim, \ + &uniquifier ## _sys_init_tslog \ + }; \ + DATA_SET(sysinit_set,uniquifier ## _sys_init) +#else +#define C_SYSINIT(uniquifier, subsystem, order, func, ident) \ + static struct sysinit uniquifier ## _sys_init = { \ + subsystem, \ + order, \ func, \ (ident) \ }; \ DATA_SET(sysinit_set,uniquifier ## _sys_init) +#endif #define SYSINIT(uniquifier, subsystem, order, func, ident) \ C_SYSINIT(uniquifier, subsystem, order, \ From owner-svn-src-head@freebsd.org Sun Dec 31 09:23:20 2017 Return-Path: Delivered-To: svn-src-head@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 C64A3EAC92A; Sun, 31 Dec 2017 09:23:20 +0000 (UTC) (envelope-from cperciva@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 9E3EA6AFDB; Sun, 31 Dec 2017 09:23:20 +0000 (UTC) (envelope-from cperciva@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id vBV9NJ8t046713; Sun, 31 Dec 2017 09:23:19 GMT (envelope-from cperciva@FreeBSD.org) Received: (from cperciva@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id vBV9NJln046710; Sun, 31 Dec 2017 09:23:19 GMT (envelope-from cperciva@FreeBSD.org) Message-Id: <201712310923.vBV9NJln046710@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: cperciva set sender to cperciva@FreeBSD.org using -f From: Colin Percival Date: Sun, 31 Dec 2017 09:23:19 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r327428 - in head/sys: kern tools X-SVN-Group: head X-SVN-Commit-Author: cperciva X-SVN-Commit-Paths: in head/sys: kern tools X-SVN-Commit-Revision: 327428 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 31 Dec 2017 09:23:20 -0000 Author: cperciva Date: Sun Dec 31 09:23:19 2017 New Revision: 327428 URL: https://svnweb.freebsd.org/changeset/base/327428 Log: Teach makeobjops.awk to accept PROLOG and EPILOG blocks before METHOD and STATICMETHOD declarations; that code will be inserted into the dispatch function before and after the method call. Use this functionality and the TSLOG framework to record DEVICE_ATTACH and DEVICE_PROBE entry/exit timestamps. Modified: head/sys/kern/device_if.m head/sys/tools/makeobjops.awk Modified: head/sys/kern/device_if.m ============================================================================== --- head/sys/kern/device_if.m Sun Dec 31 09:23:02 2017 (r327427) +++ head/sys/kern/device_if.m Sun Dec 31 09:23:19 2017 (r327428) @@ -39,6 +39,11 @@ */ INTERFACE device; +# Needed for timestamping device probe/attach calls +HEADER { + #include +} + # # Default implementations of some methods. # @@ -142,6 +147,12 @@ CODE { * be returned to indicate the type of error * @see DEVICE_ATTACH(), pci_get_vendor(), pci_get_device() */ +PROLOG { + TSENTER2(device_get_name(dev)); +} +EPILOG { + TSEXIT2(device_get_name(dev)); +} METHOD int probe { device_t dev; }; @@ -199,6 +210,12 @@ STATICMETHOD void identify { * be returned to indicate the type of error * @see DEVICE_PROBE() */ +PROLOG { + TSENTER2(device_get_name(dev)); +} +EPILOG { + TSEXIT2(device_get_name(dev)); +} METHOD int attach { device_t dev; }; Modified: head/sys/tools/makeobjops.awk ============================================================================== --- head/sys/tools/makeobjops.awk Sun Dec 31 09:23:02 2017 (r327427) +++ head/sys/tools/makeobjops.awk Sun Dec 31 09:23:19 2017 (r327428) @@ -326,11 +326,19 @@ function handle_method (static, doc) } printh("{"); printh("\tkobjop_t _m;"); + if (ret != "void") + printh("\t" ret " rc;"); if (!static) firstvar = "((kobj_t)" firstvar ")"; + if (prolog != "") + printh(prolog); printh("\tKOBJOPLOOKUP(" firstvar "->ops," mname ");"); - retrn = (ret != "void") ? "return " : ""; - printh("\t" retrn "((" mname "_t *) _m)(" varname_list ");"); + rceq = (ret != "void") ? "rc = " : ""; + printh("\t" rceq "((" mname "_t *) _m)(" varname_list ");"); + if (epilog != "") + printh(epilog); + if (ret != "void") + printh("\treturn (rc);"); printh("}\n"); } @@ -440,6 +448,8 @@ for (file_i = 0; file_i < num_files; file_i++) { lineno = 0; error = 0; # to signal clean up and gerror setting lastdoc = ""; + prolog = ""; + epilog = ""; while (!error && (getline < src) > 0) { lineno++; @@ -473,10 +483,18 @@ for (file_i = 0; file_i < num_files; file_i++) { else if (/^METHOD/) { handle_method(0, lastdoc); lastdoc = ""; + prolog = ""; + epilog = ""; } else if (/^STATICMETHOD/) { handle_method(1, lastdoc); lastdoc = ""; - } else { + prolog = ""; + epilog = ""; + } else if (/^PROLOG[ ]*{$/) + prolog = handle_code(); + else if (/^EPILOG[ ]*{$/) + epilog = handle_code(); + else { debug($0); warnsrc("Invalid line encountered"); error = 1; From owner-svn-src-head@freebsd.org Sun Dec 31 09:23:37 2017 Return-Path: Delivered-To: svn-src-head@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 177BBEAC9C3; Sun, 31 Dec 2017 09:23:37 +0000 (UTC) (envelope-from cperciva@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 D4BF66B142; Sun, 31 Dec 2017 09:23:36 +0000 (UTC) (envelope-from cperciva@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id vBV9NZb4046888; Sun, 31 Dec 2017 09:23:35 GMT (envelope-from cperciva@FreeBSD.org) Received: (from cperciva@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id vBV9NZRV046887; Sun, 31 Dec 2017 09:23:35 GMT (envelope-from cperciva@FreeBSD.org) Message-Id: <201712310923.vBV9NZRV046887@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: cperciva set sender to cperciva@FreeBSD.org using -f From: Colin Percival Date: Sun, 31 Dec 2017 09:23:35 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r327429 - head/sys/sys X-SVN-Group: head X-SVN-Commit-Author: cperciva X-SVN-Commit-Paths: head/sys/sys X-SVN-Commit-Revision: 327429 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 31 Dec 2017 09:23:37 -0000 Author: cperciva Date: Sun Dec 31 09:23:35 2017 New Revision: 327429 URL: https://svnweb.freebsd.org/changeset/base/327429 Log: Use the TSLOG framework to record entry/exit timestamps for VFS_MOUNT calls. Modified: head/sys/sys/mount.h Modified: head/sys/sys/mount.h ============================================================================== --- head/sys/sys/mount.h Sun Dec 31 09:23:19 2017 (r327428) +++ head/sys/sys/mount.h Sun Dec 31 09:23:35 2017 (r327429) @@ -40,6 +40,7 @@ #ifdef _KERNEL #include #include +#include #include #include #endif @@ -708,9 +709,11 @@ vfs_statfs_t __vfs_statfs; #define VFS_MOUNT(MP) ({ \ int _rc; \ \ + TSRAW(curthread, TS_ENTER, "VFS_MOUNT", (MP)->mnt_vfc->vfc_name);\ VFS_PROLOGUE(MP); \ _rc = (*(MP)->mnt_op->vfs_mount)(MP); \ VFS_EPILOGUE(MP); \ + TSRAW(curthread, TS_EXIT, "VFS_MOUNT", (MP)->mnt_vfc->vfc_name);\ _rc; }) #define VFS_UNMOUNT(MP, FORCE) ({ \ From owner-svn-src-head@freebsd.org Sun Dec 31 09:23:54 2017 Return-Path: Delivered-To: svn-src-head@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 0F213EACA49; Sun, 31 Dec 2017 09:23:54 +0000 (UTC) (envelope-from cperciva@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 DA0ED6B345; Sun, 31 Dec 2017 09:23:53 +0000 (UTC) (envelope-from cperciva@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id vBV9NrGd046944; Sun, 31 Dec 2017 09:23:53 GMT (envelope-from cperciva@FreeBSD.org) Received: (from cperciva@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id vBV9Nqlf046941; Sun, 31 Dec 2017 09:23:52 GMT (envelope-from cperciva@FreeBSD.org) Message-Id: <201712310923.vBV9Nqlf046941@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: cperciva set sender to cperciva@FreeBSD.org using -f From: Colin Percival Date: Sun, 31 Dec 2017 09:23:52 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r327430 - in head/sys: geom kern X-SVN-Group: head X-SVN-Commit-Author: cperciva X-SVN-Commit-Paths: in head/sys: geom kern X-SVN-Commit-Revision: 327430 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 31 Dec 2017 09:23:54 -0000 Author: cperciva Date: Sun Dec 31 09:23:52 2017 New Revision: 327430 URL: https://svnweb.freebsd.org/changeset/base/327430 Log: Instrument "boot holds" for the benefit of the TSLOG framework. These are places where the "main thread" of the booting kernel (either the thread which later becomes swapper or the thread which later becomes init) has to stop and wait for action to take place in another thread before continuing. There are currently three such holds: 1. The intr_config_hooks SYSINIT waits for hooks registered via the config_intrhook_establish function; this allows (typically) devices which need interrupts enabled to complete their initialization to do so before root is mounted. 2. The g_waitidle function waits for the GEOM event queue to be empty; this ensures that all of the disks which have been attached have been tasted before we attempt to mount root. 3. The vfs_mountroot_wait function (in addition to calling g_waitidle) waits for holds registered via root_mount_hold; among other things, this is used by the USB subsystem to ensure that we don't fail to mount root if it's located on a USB disk which takes a while to probe. Modified: head/sys/geom/geom_event.c head/sys/kern/subr_autoconf.c head/sys/kern/vfs_mountroot.c Modified: head/sys/geom/geom_event.c ============================================================================== --- head/sys/geom/geom_event.c Sun Dec 31 09:23:35 2017 (r327429) +++ head/sys/geom/geom_event.c Sun Dec 31 09:23:52 2017 (r327430) @@ -87,9 +87,11 @@ g_waitidle(void) g_topology_assert_not(); mtx_lock(&g_eventlock); + TSWAIT("GEOM events"); while (!TAILQ_EMPTY(&g_events)) msleep(&g_pending_events, &g_eventlock, PPAUSE, "g_waitidle", hz/5); + TSUNWAIT("GEOM events"); mtx_unlock(&g_eventlock); curthread->td_pflags &= ~TDP_GEOM; } @@ -266,6 +268,7 @@ one_event(void) ep->func(ep->arg, 0); g_topology_assert(); mtx_lock(&g_eventlock); + TSRELEASE("GEOM events"); TAILQ_REMOVE(&g_events, ep, events); ep->flag &= ~EV_INPROGRESS; if (ep->flag & EV_WAKEUP) { @@ -324,6 +327,7 @@ g_cancel_event(void *ref) break; if (ep->ref[n] != ref) continue; + TSRELEASE("GEOM events"); TAILQ_REMOVE(&g_events, ep, events); ep->func(ep->arg, EV_CANCEL); mtx_assert(&g_eventlock, MA_OWNED); @@ -367,6 +371,7 @@ g_post_event_x(g_event_t *func, void *arg, int flag, i ep->func = func; ep->arg = arg; mtx_lock(&g_eventlock); + TSHOLD("GEOM events"); TAILQ_INSERT_TAIL(&g_events, ep, events); mtx_unlock(&g_eventlock); wakeup(&g_wait_event); Modified: head/sys/kern/subr_autoconf.c ============================================================================== --- head/sys/kern/subr_autoconf.c Sun Dec 31 09:23:35 2017 (r327429) +++ head/sys/kern/subr_autoconf.c Sun Dec 31 09:23:52 2017 (r327430) @@ -155,6 +155,7 @@ boot_run_interrupt_driven_config_hooks(void *dummy) run_interrupt_driven_config_hooks(); /* Block boot processing until all hooks are disestablished. */ + TSWAIT("config hooks"); mtx_lock(&intr_config_hook_lock); warned = 0; while (!TAILQ_EMPTY(&intr_config_hook_list)) { @@ -168,6 +169,7 @@ boot_run_interrupt_driven_config_hooks(void *dummy) } } mtx_unlock(&intr_config_hook_lock); + TSUNWAIT("config hooks"); } SYSINIT(intr_config_hooks, SI_SUB_INT_CONFIG_HOOKS, SI_ORDER_FIRST, @@ -183,6 +185,7 @@ config_intrhook_establish(struct intr_config_hook *hoo { struct intr_config_hook *hook_entry; + TSHOLD("config hooks"); mtx_lock(&intr_config_hook_lock); TAILQ_FOREACH(hook_entry, &intr_config_hook_list, ich_links) if (hook_entry == hook) @@ -239,6 +242,7 @@ config_intrhook_disestablish(struct intr_config_hook * if (next_to_notify == hook) next_to_notify = TAILQ_NEXT(hook, ich_links); TAILQ_REMOVE(&intr_config_hook_list, hook, ich_links); + TSRELEASE("config hooks"); /* Wakeup anyone watching the list */ wakeup(&intr_config_hook_list); Modified: head/sys/kern/vfs_mountroot.c ============================================================================== --- head/sys/kern/vfs_mountroot.c Sun Dec 31 09:23:35 2017 (r327429) +++ head/sys/kern/vfs_mountroot.c Sun Dec 31 09:23:52 2017 (r327430) @@ -176,6 +176,7 @@ root_mount_hold(const char *identifier) h = malloc(sizeof *h, M_DEVBUF, M_ZERO | M_WAITOK); h->who = identifier; mtx_lock(&root_holds_mtx); + TSHOLD("root mount"); LIST_INSERT_HEAD(&root_holds, h, list); mtx_unlock(&root_holds_mtx); return (h); @@ -190,6 +191,7 @@ root_mount_rel(struct root_hold_token *h) mtx_lock(&root_holds_mtx); LIST_REMOVE(h, list); + TSRELEASE("root mount"); wakeup(&root_holds); mtx_unlock(&root_holds_mtx); free(h, M_DEVBUF); @@ -956,8 +958,10 @@ vfs_mountroot_wait(void) printf(" %s", h->who); printf("\n"); } + TSWAIT("root mount"); msleep(&root_holds, &root_holds_mtx, PZERO | PDROP, "roothold", hz); + TSUNWAIT("root mount"); } TSEXIT(); From owner-svn-src-head@freebsd.org Sun Dec 31 09:24:12 2017 Return-Path: Delivered-To: svn-src-head@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 C67ABEACAD5; Sun, 31 Dec 2017 09:24:12 +0000 (UTC) (envelope-from cperciva@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 8F12E6B4A0; Sun, 31 Dec 2017 09:24:12 +0000 (UTC) (envelope-from cperciva@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id vBV9OB3n047001; Sun, 31 Dec 2017 09:24:11 GMT (envelope-from cperciva@FreeBSD.org) Received: (from cperciva@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id vBV9OBWA047000; Sun, 31 Dec 2017 09:24:11 GMT (envelope-from cperciva@FreeBSD.org) Message-Id: <201712310924.vBV9OBWA047000@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: cperciva set sender to cperciva@FreeBSD.org using -f From: Colin Percival Date: Sun, 31 Dec 2017 09:24:11 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r327431 - head/sys/kern X-SVN-Group: head X-SVN-Commit-Author: cperciva X-SVN-Commit-Paths: head/sys/kern X-SVN-Commit-Revision: 327431 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 31 Dec 2017 09:24:12 -0000 Author: cperciva Date: Sun Dec 31 09:24:11 2017 New Revision: 327431 URL: https://svnweb.freebsd.org/changeset/base/327431 Log: Instrument thread creations for the the benefit of the TSLOG framework. This assists in tracking time spent while the boot is being "held" waiting for something to happen. Modified: head/sys/kern/kern_kthread.c Modified: head/sys/kern/kern_kthread.c ============================================================================== --- head/sys/kern/kern_kthread.c Sun Dec 31 09:23:52 2017 (r327430) +++ head/sys/kern/kern_kthread.c Sun Dec 31 09:24:11 2017 (r327431) @@ -44,6 +44,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include @@ -124,6 +125,7 @@ kproc_create(void (*func)(void *), void *arg, #ifdef KTR sched_clear_tdname(td); #endif + TSTHREAD(td, td->td_name); /* call the processes' main()... */ cpu_fork_kthread_handler(td, func, arg); @@ -282,6 +284,8 @@ kthread_add(void (*func)(void *), void *arg, struct pr va_start(ap, fmt); vsnprintf(newtd->td_name, sizeof(newtd->td_name), fmt, ap); va_end(ap); + + TSTHREAD(newtd, newtd->td_name); newtd->td_proc = p; /* needed for cpu_copy_thread */ /* might be further optimized for kthread */ From owner-svn-src-head@freebsd.org Sun Dec 31 09:24:44 2017 Return-Path: Delivered-To: svn-src-head@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 A7949EACB60; Sun, 31 Dec 2017 09:24:44 +0000 (UTC) (envelope-from cperciva@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 585096B618; Sun, 31 Dec 2017 09:24:44 +0000 (UTC) (envelope-from cperciva@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id vBV9Ohbk047080; Sun, 31 Dec 2017 09:24:43 GMT (envelope-from cperciva@FreeBSD.org) Received: (from cperciva@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id vBV9OfmJ047059; Sun, 31 Dec 2017 09:24:41 GMT (envelope-from cperciva@FreeBSD.org) Message-Id: <201712310924.vBV9OfmJ047059@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: cperciva set sender to cperciva@FreeBSD.org using -f From: Colin Percival Date: Sun, 31 Dec 2017 09:24:41 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r327432 - in head/sys: arm/amlogic/aml8726 arm/arm arm/at91 arm/cavium/cns11xx arm/lpc arm/mv arm/ralink arm/xscale/i8134x arm/xscale/ixp425 arm/xscale/pxa kern mips/ingenic mips/mips m... X-SVN-Group: head X-SVN-Commit-Author: cperciva X-SVN-Commit-Paths: in head/sys: arm/amlogic/aml8726 arm/arm arm/at91 arm/cavium/cns11xx arm/lpc arm/mv arm/ralink arm/xscale/i8134x arm/xscale/ixp425 arm/xscale/pxa kern mips/ingenic mips/mips mips/nlm mips/rmi powerpc/... X-SVN-Commit-Revision: 327432 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 31 Dec 2017 09:24:44 -0000 Author: cperciva Date: Sun Dec 31 09:24:41 2017 New Revision: 327432 URL: https://svnweb.freebsd.org/changeset/base/327432 Log: Use the TSLOG framework to record entry/exit timestamps for DELAY and _vprintf; these functions are called in many places and can contribute meaningfully to the total time spent booting. Modified: head/sys/arm/amlogic/aml8726/aml8726_timer.c head/sys/arm/arm/generic_timer.c head/sys/arm/arm/machdep.c head/sys/arm/arm/mpcore_timer.c head/sys/arm/at91/at91_machdep.c head/sys/arm/cavium/cns11xx/timer.c head/sys/arm/lpc/lpc_timer.c head/sys/arm/mv/timer.c head/sys/arm/ralink/rt1310_timer.c head/sys/arm/xscale/i8134x/i80321_timer.c head/sys/arm/xscale/ixp425/ixp425_timer.c head/sys/arm/xscale/pxa/pxa_timer.c head/sys/kern/subr_prf.c head/sys/mips/ingenic/jz4780_timer.c head/sys/mips/mips/tick.c head/sys/mips/nlm/tick.c head/sys/mips/rmi/tick.c head/sys/powerpc/powerpc/clock.c head/sys/riscv/riscv/timer.c head/sys/sparc64/sparc64/clock.c head/sys/x86/x86/delay.c Modified: head/sys/arm/amlogic/aml8726/aml8726_timer.c ============================================================================== --- head/sys/arm/amlogic/aml8726/aml8726_timer.c Sun Dec 31 09:24:11 2017 (r327431) +++ head/sys/arm/amlogic/aml8726/aml8726_timer.c Sun Dec 31 09:24:41 2017 (r327432) @@ -347,6 +347,7 @@ DELAY(int usec) } return; } + TSENTER(); /* * Some of the other timers in the source tree do this calculation as: @@ -391,4 +392,5 @@ DELAY(int usec) previous = now; remaining -= delta; } + TSEXIT(); } Modified: head/sys/arm/arm/generic_timer.c ============================================================================== --- head/sys/arm/arm/generic_timer.c Sun Dec 31 09:24:11 2017 (r327431) +++ head/sys/arm/arm/generic_timer.c Sun Dec 31 09:24:41 2017 (r327432) @@ -526,6 +526,7 @@ DELAY(int usec) { int32_t counts; + TSENTER(); /* * Check the timers are setup, if not just * use a for loop for the meantime @@ -540,6 +541,7 @@ DELAY(int usec) cpufunc_nullop(); } else arm_tmr_do_delay(usec, arm_tmr_sc); + TSEXIT(); } #endif Modified: head/sys/arm/arm/machdep.c ============================================================================== --- head/sys/arm/arm/machdep.c Sun Dec 31 09:24:11 2017 (r327431) +++ head/sys/arm/arm/machdep.c Sun Dec 31 09:24:41 2017 (r327432) @@ -347,7 +347,9 @@ void DELAY(int usec) { + TSENTER(); delay_impl(usec, delay_arg); + TSEXIT(); } #endif Modified: head/sys/arm/arm/mpcore_timer.c ============================================================================== --- head/sys/arm/arm/mpcore_timer.c Sun Dec 31 09:24:11 2017 (r327431) +++ head/sys/arm/arm/mpcore_timer.c Sun Dec 31 09:24:41 2017 (r327432) @@ -547,6 +547,7 @@ DELAY(int usec) struct arm_tmr_softc *sc; int32_t counts; + TSENTER(); /* Check the timers are setup, if not just use a for loop for the meantime */ if (arm_tmr_tc == NULL || arm_tmr_timecount.tc_frequency == 0) { for (; usec > 0; usec--) @@ -558,5 +559,6 @@ DELAY(int usec) sc = arm_tmr_tc->tc_priv; arm_tmr_delay(usec, sc); } + TSEXIT(); } #endif Modified: head/sys/arm/at91/at91_machdep.c ============================================================================== --- head/sys/arm/at91/at91_machdep.c Sun Dec 31 09:24:11 2017 (r327431) +++ head/sys/arm/at91/at91_machdep.c Sun Dec 31 09:24:41 2017 (r327432) @@ -672,8 +672,10 @@ void DELAY(int n) { + TSENTER(); if (soc_info.soc_data) soc_info.soc_data->soc_delay(n); + TSEXIT(); } void Modified: head/sys/arm/cavium/cns11xx/timer.c ============================================================================== --- head/sys/arm/cavium/cns11xx/timer.c Sun Dec 31 09:24:11 2017 (r327431) +++ head/sys/arm/cavium/cns11xx/timer.c Sun Dec 31 09:24:41 2017 (r327432) @@ -122,6 +122,7 @@ DELAY(int usec) ; return; } + TSENTER(); val = read_timer_counter_noint(); nticks = (((APB_clock / 1000) * usec) / 1000) + 100; @@ -135,7 +136,7 @@ DELAY(int usec) val = val_temp; } - + TSEXIT(); } /* Modified: head/sys/arm/lpc/lpc_timer.c ============================================================================== --- head/sys/arm/lpc/lpc_timer.c Sun Dec 31 09:24:11 2017 (r327431) +++ head/sys/arm/lpc/lpc_timer.c Sun Dec 31 09:24:41 2017 (r327432) @@ -292,6 +292,7 @@ DELAY(int usec) ; return; } + TSENTER(); first = lpc_get_timecount(&lpc_timecounter); while (val > 0) { @@ -304,4 +305,5 @@ DELAY(int usec) val -= (last - first); first = last; } + TSEXIT(); } Modified: head/sys/arm/mv/timer.c ============================================================================== --- head/sys/arm/mv/timer.c Sun Dec 31 09:24:11 2017 (r327431) +++ head/sys/arm/mv/timer.c Sun Dec 31 09:24:41 2017 (r327432) @@ -272,6 +272,7 @@ DELAY(int usec) __asm __volatile("nop" ::: "memory"); return; } + TSENTER(); val = mv_get_timer(1); nticks = ((MV_CLOCK_SRC / 1000000 + 1) * usec); @@ -285,6 +286,7 @@ DELAY(int usec) val = val_temp; } + TSEXIT(); } static uint32_t Modified: head/sys/arm/ralink/rt1310_timer.c ============================================================================== --- head/sys/arm/ralink/rt1310_timer.c Sun Dec 31 09:24:11 2017 (r327431) +++ head/sys/arm/ralink/rt1310_timer.c Sun Dec 31 09:24:41 2017 (r327432) @@ -326,6 +326,7 @@ DELAY(int usec) ; return; } + TSENTER(); first = rt1310_get_timecount(&rt1310_timecounter); while (val > 0) { @@ -338,4 +339,5 @@ DELAY(int usec) val -= (last - first); first = last; } + TSEXIT(); } Modified: head/sys/arm/xscale/i8134x/i80321_timer.c ============================================================================== --- head/sys/arm/xscale/i8134x/i80321_timer.c Sun Dec 31 09:24:11 2017 (r327431) +++ head/sys/arm/xscale/i8134x/i80321_timer.c Sun Dec 31 09:24:41 2017 (r327432) @@ -428,6 +428,7 @@ DELAY(int n) { uint32_t cur, last, delta, usecs; + TSENTER(); /* * This works by polling the timer and counting the * number of microseconds that go by. @@ -451,6 +452,7 @@ DELAY(int n) delta %= COUNTS_PER_USEC; } } + TSEXIT(); } /* Modified: head/sys/arm/xscale/ixp425/ixp425_timer.c ============================================================================== --- head/sys/arm/xscale/ixp425/ixp425_timer.c Sun Dec 31 09:24:11 2017 (r327431) +++ head/sys/arm/xscale/ixp425/ixp425_timer.c Sun Dec 31 09:24:41 2017 (r327432) @@ -213,6 +213,7 @@ DELAY(int n) if (n == 0) return; + TSENTER(); /* * Clamp the timeout at a maximum value (about 32 seconds with @@ -233,6 +234,7 @@ DELAY(int n) usecs -= (int)(last - first); first = last; } + TSEXIT(); } /* Modified: head/sys/arm/xscale/pxa/pxa_timer.c ============================================================================== --- head/sys/arm/xscale/pxa/pxa_timer.c Sun Dec 31 09:24:11 2017 (r327431) +++ head/sys/arm/xscale/pxa/pxa_timer.c Sun Dec 31 09:24:41 2017 (r327432) @@ -214,10 +214,12 @@ DELAY(int usec) ; return; } + TSENTER(); val = pxa_timer_get_oscr(); val += (PXA_TIMER_FREQUENCY * usec) / 1000000; while (pxa_timer_get_oscr() <= val); + TSEXIT(); } uint32_t Modified: head/sys/kern/subr_prf.c ============================================================================== --- head/sys/kern/subr_prf.c Sun Dec 31 09:24:11 2017 (r327431) +++ head/sys/kern/subr_prf.c Sun Dec 31 09:24:41 2017 (r327432) @@ -276,6 +276,7 @@ _vprintf(int level, int flags, const char *fmt, va_lis char bufr[PRINTF_BUFR_SIZE]; #endif + TSENTER(); pca.tty = NULL; pca.pri = level; pca.flags = flags; @@ -303,6 +304,7 @@ _vprintf(int level, int flags, const char *fmt, va_lis } #endif + TSEXIT(); return (retval); } Modified: head/sys/mips/ingenic/jz4780_timer.c ============================================================================== --- head/sys/mips/ingenic/jz4780_timer.c Sun Dec 31 09:24:11 2017 (r327431) +++ head/sys/mips/ingenic/jz4780_timer.c Sun Dec 31 09:24:41 2017 (r327432) @@ -283,6 +283,7 @@ DELAY(int usec) } return; } + TSENTER(); /* * Some of the other timers in the source tree do this calculation as: @@ -327,6 +328,7 @@ DELAY(int usec) previous = now; remaining -= delta; } + TSEXIT(); } void Modified: head/sys/mips/mips/tick.c ============================================================================== --- head/sys/mips/mips/tick.c Sun Dec 31 09:24:11 2017 (r327431) +++ head/sys/mips/mips/tick.c Sun Dec 31 09:24:41 2017 (r327432) @@ -197,6 +197,7 @@ DELAY(int n) { uint32_t cur, last, delta, usecs; + TSENTER(); /* * This works by polling the timer and counting the number of * microseconds that go by. @@ -220,6 +221,7 @@ DELAY(int n) delta %= cycles_per_usec; } } + TSEXIT(); } static int Modified: head/sys/mips/nlm/tick.c ============================================================================== --- head/sys/mips/nlm/tick.c Sun Dec 31 09:24:11 2017 (r327431) +++ head/sys/mips/nlm/tick.c Sun Dec 31 09:24:41 2017 (r327432) @@ -198,6 +198,7 @@ DELAY(int n) { uint32_t cur, last, delta, usecs; + TSENTER(); /* * This works by polling the timer and counting the number of * microseconds that go by. @@ -221,6 +222,7 @@ DELAY(int n) delta %= cycles_per_usec; } } + TSEXIT(); } static int Modified: head/sys/mips/rmi/tick.c ============================================================================== --- head/sys/mips/rmi/tick.c Sun Dec 31 09:24:11 2017 (r327431) +++ head/sys/mips/rmi/tick.c Sun Dec 31 09:24:41 2017 (r327432) @@ -195,6 +195,7 @@ DELAY(int n) { uint32_t cur, last, delta, usecs; + TSENTER(); /* * This works by polling the timer and counting the number of * microseconds that go by. @@ -218,6 +219,7 @@ DELAY(int n) delta %= cycles_per_usec; } } + TSEXIT(); } static int Modified: head/sys/powerpc/powerpc/clock.c ============================================================================== --- head/sys/powerpc/powerpc/clock.c Sun Dec 31 09:24:11 2017 (r327431) +++ head/sys/powerpc/powerpc/clock.c Sun Dec 31 09:24:41 2017 (r327432) @@ -305,9 +305,11 @@ DELAY(int n) { u_quad_t tb, ttb; + TSENTER(); tb = mftb(); ttb = tb + howmany(n * 1000, ns_per_tick); while (tb < ttb) tb = mftb(); + TSEXIT(); } Modified: head/sys/riscv/riscv/timer.c ============================================================================== --- head/sys/riscv/riscv/timer.c Sun Dec 31 09:24:11 2017 (r327431) +++ head/sys/riscv/riscv/timer.c Sun Dec 31 09:24:41 2017 (r327432) @@ -261,6 +261,7 @@ DELAY(int usec) cpufunc_nullop(); return; } + TSENTER(); /* Get the number of times to count */ counts_per_usec = ((riscv_timer_timecount.tc_frequency / 1000000) + 1); @@ -283,4 +284,5 @@ DELAY(int usec) counts -= (int64_t)(last - first); first = last; } + TSEXIT(); } Modified: head/sys/sparc64/sparc64/clock.c ============================================================================== --- head/sys/sparc64/sparc64/clock.c Sun Dec 31 09:24:11 2017 (r327431) +++ head/sys/sparc64/sparc64/clock.c Sun Dec 31 09:24:41 2017 (r327432) @@ -45,6 +45,7 @@ DELAY(int usec) if (usec < 0) return; + TSENTER(); /* * We avoid being migrated to another CPU with a possibly @@ -57,5 +58,6 @@ DELAY(int usec) cpu_spinwait(); sched_unpin(); + TSEXIT(); } Modified: head/sys/x86/x86/delay.c ============================================================================== --- head/sys/x86/x86/delay.c Sun Dec 31 09:24:11 2017 (r327431) +++ head/sys/x86/x86/delay.c Sun Dec 31 09:24:41 2017 (r327432) @@ -101,8 +101,12 @@ void DELAY(int n) { - if (delay_tc(n)) + TSENTER(); + if (delay_tc(n)) { + TSEXIT(); return; + } init_ops.early_delay(n); + TSEXIT(); } From owner-svn-src-head@freebsd.org Sun Dec 31 10:01:33 2017 Return-Path: Delivered-To: svn-src-head@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 2B52BEAE061; Sun, 31 Dec 2017 10:01:33 +0000 (UTC) (envelope-from kp@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 CD99F6C96F; Sun, 31 Dec 2017 10:01:32 +0000 (UTC) (envelope-from kp@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id vBVA1V7B060731; Sun, 31 Dec 2017 10:01:31 GMT (envelope-from kp@FreeBSD.org) Received: (from kp@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id vBVA1V2c060728; Sun, 31 Dec 2017 10:01:31 GMT (envelope-from kp@FreeBSD.org) Message-Id: <201712311001.vBVA1V2c060728@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kp set sender to kp@FreeBSD.org using -f From: Kristof Provost Date: Sun, 31 Dec 2017 10:01:31 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r327433 - in head/sys: net netpfil/pf X-SVN-Group: head X-SVN-Commit-Author: kp X-SVN-Commit-Paths: in head/sys: net netpfil/pf X-SVN-Commit-Revision: 327433 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 31 Dec 2017 10:01:33 -0000 Author: kp Date: Sun Dec 31 10:01:31 2017 New Revision: 327433 URL: https://svnweb.freebsd.org/changeset/base/327433 Log: pf: Clean all fragments on shutdown When pf is unloaded, or a vnet jail using pf is stopped we need to ensure we clean up all fragments, not just the expired ones. Modified: head/sys/net/pfvar.h head/sys/netpfil/pf/pf.c head/sys/netpfil/pf/pf_norm.c Modified: head/sys/net/pfvar.h ============================================================================== --- head/sys/net/pfvar.h Sun Dec 31 09:24:41 2017 (r327432) +++ head/sys/net/pfvar.h Sun Dec 31 10:01:31 2017 (r327433) @@ -1619,6 +1619,7 @@ int pf_normalize_tcp_stateful(struct mbuf *, int, stru u_int32_t pf_state_expires(const struct pf_state *); void pf_purge_expired_fragments(void); +void pf_purge_fragments(uint32_t); int pf_routable(struct pf_addr *addr, sa_family_t af, struct pfi_kif *, int); int pf_socket_lookup(int, struct pf_pdesc *, struct mbuf *); Modified: head/sys/netpfil/pf/pf.c ============================================================================== --- head/sys/netpfil/pf/pf.c Sun Dec 31 09:24:41 2017 (r327432) +++ head/sys/netpfil/pf/pf.c Sun Dec 31 10:01:31 2017 (r327433) @@ -1498,7 +1498,7 @@ pf_unload_vnet_purge(void) * Now purge everything. */ pf_purge_expired_states(0, pf_hashmask); - pf_purge_expired_fragments(); + pf_purge_fragments(UINT_MAX); pf_purge_expired_src_nodes(); /* Modified: head/sys/netpfil/pf/pf_norm.c ============================================================================== --- head/sys/netpfil/pf/pf_norm.c Sun Dec 31 09:24:41 2017 (r327432) +++ head/sys/netpfil/pf/pf_norm.c Sun Dec 31 10:01:31 2017 (r327433) @@ -219,9 +219,16 @@ pf_frag_compare(struct pf_fragment *a, struct pf_fragm void pf_purge_expired_fragments(void) { + u_int32_t expire = time_uptime - + V_pf_default_rule.timeout[PFTM_FRAG]; + + pf_purge_fragments(expire); +} + +void +pf_purge_fragments(uint32_t expire) +{ struct pf_fragment *frag; - u_int32_t expire = time_uptime - - V_pf_default_rule.timeout[PFTM_FRAG]; PF_FRAG_LOCK(); while ((frag = TAILQ_LAST(&V_pf_fragqueue, pf_fragqueue)) != NULL) { From owner-svn-src-head@freebsd.org Sun Dec 31 10:10:56 2017 Return-Path: Delivered-To: svn-src-head@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 1A96DEAE685; Sun, 31 Dec 2017 10:10:56 +0000 (UTC) (envelope-from srs0=ljra=d3=freebsd.org=kp@codepro.be) Received: from venus.codepro.be (venus.codepro.be [IPv6:2a01:4f8:162:1127::2]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "*.codepro.be", Issuer "Gandi Standard SSL CA 2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id DC2456CDC8; Sun, 31 Dec 2017 10:10:55 +0000 (UTC) (envelope-from srs0=ljra=d3=freebsd.org=kp@codepro.be) Received: from [169.254.51.136] (unknown [78.154.106.146]) (Authenticated sender: kp) by venus.codepro.be (Postfix) with ESMTPSA id BC0174137E; Sun, 31 Dec 2017 11:10:52 +0100 (CET) From: "Kristof Provost" To: "Warner Losh" Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r327270 - head/sbin/pfctl Date: Sun, 31 Dec 2017 10:10:51 +0000 X-Mailer: MailMate (2.0BETAr6102) Message-ID: In-Reply-To: <201712280533.vBS5XsBA024471@repo.freebsd.org> References: <201712280533.vBS5XsBA024471@repo.freebsd.org> MIME-Version: 1.0 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 31 Dec 2017 10:10:56 -0000 On 28 Dec 2017, at 5:33, Warner Losh wrote: > Author: imp > Date: Thu Dec 28 05:33:54 2017 > New Revision: 327270 > URL: https://svnweb.freebsd.org/changeset/base/327270 > > Log: > Free path before returnig. > > CID: 977827 > Thanks! Kristof From owner-svn-src-head@freebsd.org Sun Dec 31 11:20:46 2017 Return-Path: Delivered-To: svn-src-head@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 5DACEEB0DC1; Sun, 31 Dec 2017 11:20:46 +0000 (UTC) (envelope-from freebsd@pdx.rh.CN85.dnsmgr.net) Received: from pdx.rh.CN85.dnsmgr.net (br1.CN84in.dnsmgr.net [69.59.192.140]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id EDCD16F2D6; Sun, 31 Dec 2017 11:20:45 +0000 (UTC) (envelope-from freebsd@pdx.rh.CN85.dnsmgr.net) Received: from pdx.rh.CN85.dnsmgr.net (localhost [127.0.0.1]) by pdx.rh.CN85.dnsmgr.net (8.13.3/8.13.3) with ESMTP id vBVBKi13081027; Sun, 31 Dec 2017 03:20:44 -0800 (PST) (envelope-from freebsd@pdx.rh.CN85.dnsmgr.net) Received: (from freebsd@localhost) by pdx.rh.CN85.dnsmgr.net (8.13.3/8.13.3/Submit) id vBVBKiWQ081026; Sun, 31 Dec 2017 03:20:44 -0800 (PST) (envelope-from freebsd) From: "Rodney W. Grimes" Message-Id: <201712311120.vBVBKiWQ081026@pdx.rh.CN85.dnsmgr.net> Subject: Re: svn commit: r327422 - head In-Reply-To: <201712310726.vBV7QOWa096665@repo.freebsd.org> To: Eitan Adler Date: Sun, 31 Dec 2017 03:20:44 -0800 (PST) CC: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Reply-To: rgrimes@freebsd.org X-Mailer: ELM [version 2.4ME+ PL121h (25)] MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=US-ASCII X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 31 Dec 2017 11:20:46 -0000 [ Charset UTF-8 unsupported, converting... ] > Author: eadler > Date: Sun Dec 31 07:26:24 2017 > New Revision: 327422 > URL: https://svnweb.freebsd.org/changeset/base/327422 > > Log: > s/=/+= Edit commands are poor commit messages, would of been better to say something like: Correct addition of /etc/skel to OLD_DIRS by not overwritting variable with assignment (= vs +=) > > Modified: > head/ObsoleteFiles.inc > > Modified: head/ObsoleteFiles.inc > ============================================================================== > --- head/ObsoleteFiles.inc Sun Dec 31 07:25:55 2017 (r327421) > +++ head/ObsoleteFiles.inc Sun Dec 31 07:26:24 2017 (r327422) > @@ -39,7 +39,7 @@ > # done > > # 20171230: Remove /etc/skel from mtree > -OLD_DIRS=/etc/skel > +OLD_DIRS+=/etc/skel > # 20171208: Remove basename_r(3) > OLD_FILES+=usr/share/man/man3/basename_r.3.gz > # 20171204: Move fdformat man page from volume 1 to volume 8. > > -- Rod Grimes rgrimes@freebsd.org From owner-svn-src-head@freebsd.org Sun Dec 31 16:18:14 2017 Return-Path: Delivered-To: svn-src-head@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 55606E82D5A; Sun, 31 Dec 2017 16:18:14 +0000 (UTC) (envelope-from kp@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 2019B78858; Sun, 31 Dec 2017 16:18:14 +0000 (UTC) (envelope-from kp@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id vBVGIDlG019234; Sun, 31 Dec 2017 16:18:13 GMT (envelope-from kp@FreeBSD.org) Received: (from kp@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id vBVGIDb8019233; Sun, 31 Dec 2017 16:18:13 GMT (envelope-from kp@FreeBSD.org) Message-Id: <201712311618.vBVGIDb8019233@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kp set sender to kp@FreeBSD.org using -f From: Kristof Provost Date: Sun, 31 Dec 2017 16:18:13 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r327434 - head/sys/netpfil/pf X-SVN-Group: head X-SVN-Commit-Author: kp X-SVN-Commit-Paths: head/sys/netpfil/pf X-SVN-Commit-Revision: 327434 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 31 Dec 2017 16:18:14 -0000 Author: kp Date: Sun Dec 31 16:18:13 2017 New Revision: 327434 URL: https://svnweb.freebsd.org/changeset/base/327434 Log: pf: Allow the module to be unloaded pf can now be safely unloaded. Most of this code is exercised on vnet jail shutdown. Don't block unloading. Modified: head/sys/netpfil/pf/pf_ioctl.c Modified: head/sys/netpfil/pf/pf_ioctl.c ============================================================================== --- head/sys/netpfil/pf/pf_ioctl.c Sun Dec 31 10:01:31 2017 (r327433) +++ head/sys/netpfil/pf/pf_ioctl.c Sun Dec 31 16:18:13 2017 (r327434) @@ -3833,12 +3833,6 @@ pf_modevent(module_t mod, int type, void *data) case MOD_LOAD: error = pf_load(); break; - case MOD_QUIESCE: - /* - * Module should not be unloaded due to race conditions. - */ - error = EBUSY; - break; case MOD_UNLOAD: /* Handled in SYSUNINIT(pf_unload) to ensure it's done after * the vnet_pf_uninit()s */ From owner-svn-src-head@freebsd.org Sun Dec 31 16:48:06 2017 Return-Path: Delivered-To: svn-src-head@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 49D74E8618F; Sun, 31 Dec 2017 16:48:06 +0000 (UTC) (envelope-from bz@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 14A1979A5B; Sun, 31 Dec 2017 16:48:06 +0000 (UTC) (envelope-from bz@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id vBVGm5fI032229; Sun, 31 Dec 2017 16:48:05 GMT (envelope-from bz@FreeBSD.org) Received: (from bz@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id vBVGm5Ao032227; Sun, 31 Dec 2017 16:48:05 GMT (envelope-from bz@FreeBSD.org) Message-Id: <201712311648.vBVGm5Ao032227@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bz set sender to bz@FreeBSD.org using -f From: "Bjoern A. Zeeb" Date: Sun, 31 Dec 2017 16:48:05 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r327435 - in head: . sys/sys X-SVN-Group: head X-SVN-Commit-Author: bz X-SVN-Commit-Paths: in head: . sys/sys X-SVN-Commit-Revision: 327435 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 31 Dec 2017 16:48:06 -0000 Author: bz Date: Sun Dec 31 16:48:04 2017 New Revision: 327435 URL: https://svnweb.freebsd.org/changeset/base/327435 Log: Happy New Year 2018 my friends! Modified: head/COPYRIGHT head/sys/sys/copyright.h Modified: head/COPYRIGHT ============================================================================== --- head/COPYRIGHT Sun Dec 31 16:18:13 2017 (r327434) +++ head/COPYRIGHT Sun Dec 31 16:48:04 2017 (r327435) @@ -4,7 +4,7 @@ The compilation of software known as FreeBSD is distributed under the following terms: -Copyright (c) 1992-2017 The FreeBSD Project. All rights reserved. +Copyright (c) 1992-2018 The FreeBSD Project. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions Modified: head/sys/sys/copyright.h ============================================================================== --- head/sys/sys/copyright.h Sun Dec 31 16:18:13 2017 (r327434) +++ head/sys/sys/copyright.h Sun Dec 31 16:48:04 2017 (r327435) @@ -1,7 +1,7 @@ /*- * SPDX-License-Identifier: BSD-2-Clause-FreeBSD * - * Copyright (C) 1992-2017 The FreeBSD Project. All rights reserved. + * Copyright (C) 1992-2018 The FreeBSD Project. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -36,7 +36,7 @@ /* FreeBSD */ #define COPYRIGHT_FreeBSD \ - "Copyright (c) 1992-2017 The FreeBSD Project.\n" + "Copyright (c) 1992-2018 The FreeBSD Project.\n" /* Foundation */ #define TRADEMARK_Foundation \ From owner-svn-src-head@freebsd.org Sun Dec 31 17:08:00 2017 Return-Path: Delivered-To: svn-src-head@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 B1EAFE8748F; Sun, 31 Dec 2017 17:08:00 +0000 (UTC) (envelope-from kib@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 7A93C7A6B7; Sun, 31 Dec 2017 17:08:00 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id vBVH7xHG040459; Sun, 31 Dec 2017 17:07:59 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id vBVH7xss040458; Sun, 31 Dec 2017 17:07:59 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201712311707.vBVH7xss040458@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Sun, 31 Dec 2017 17:07:59 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r327437 - head/sys/amd64/amd64 X-SVN-Group: head X-SVN-Commit-Author: kib X-SVN-Commit-Paths: head/sys/amd64/amd64 X-SVN-Commit-Revision: 327437 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 31 Dec 2017 17:08:00 -0000 Author: kib Date: Sun Dec 31 17:07:59 2017 New Revision: 327437 URL: https://svnweb.freebsd.org/changeset/base/327437 Log: Remove MP SAFE marks and stray register name in comments. Sponsored by: The FreeBSD Foundation MFC after: 3 days Modified: head/sys/amd64/amd64/support.S Modified: head/sys/amd64/amd64/support.S ============================================================================== --- head/sys/amd64/amd64/support.S Sun Dec 31 16:52:29 2017 (r327436) +++ head/sys/amd64/amd64/support.S Sun Dec 31 17:07:59 2017 (r327437) @@ -238,7 +238,7 @@ END(fillw) */ /* - * copyout(from_kernel, to_user, len) - MP SAFE + * copyout(from_kernel, to_user, len) * %rdi, %rsi, %rdx */ ENTRY(copyout) @@ -301,7 +301,7 @@ copyout_fault: END(copyout) /* - * copyin(from_user, to_kernel, len) - MP SAFE + * copyin(from_user, to_kernel, len) * %rdi, %rsi, %rdx */ ENTRY(copyin) @@ -518,7 +518,7 @@ fusufault: /* * Store a 64-bit word, a 32-bit word, a 16-bit word, or an 8-bit byte to - * user memory. All these functions are MPSAFE. + * user memory. * addr = %rdi, value = %rsi */ ALTENTRY(suword64) @@ -593,7 +593,7 @@ ENTRY(subyte) END(subyte) /* - * copyinstr(from, to, maxlen, int *lencopied) - MP SAFE + * copyinstr(from, to, maxlen, int *lencopied) * %rdi, %rsi, %rdx, %rcx * * copy a string from 'from' to 'to', stop when a 0 character is reached. @@ -664,7 +664,7 @@ cpystrflt_x: END(copyinstr) /* - * copystr(from, to, maxlen, int *lencopied) - MP SAFE + * copystr(from, to, maxlen, int *lencopied) * %rdi, %rsi, %rdx, %rcx */ ENTRY(copystr) @@ -704,7 +704,6 @@ END(copystr) /* * Handling of special amd64 registers and descriptor tables etc - * %rdi */ /* void lgdt(struct region_descriptor *rdp); */ ENTRY(lgdt) From owner-svn-src-head@freebsd.org Sun Dec 31 17:11:14 2017 Return-Path: Delivered-To: svn-src-head@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 03BE7E87805; Sun, 31 Dec 2017 17:11:14 +0000 (UTC) (envelope-from bryanv@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 C2E217A8E0; Sun, 31 Dec 2017 17:11:13 +0000 (UTC) (envelope-from bryanv@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id vBVHBCt4043498; Sun, 31 Dec 2017 17:11:12 GMT (envelope-from bryanv@FreeBSD.org) Received: (from bryanv@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id vBVHBCi6043497; Sun, 31 Dec 2017 17:11:12 GMT (envelope-from bryanv@FreeBSD.org) Message-Id: <201712311711.vBVHBCi6043497@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bryanv set sender to bryanv@FreeBSD.org using -f From: Bryan Venteicher Date: Sun, 31 Dec 2017 17:11:12 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r327438 - head/etc X-SVN-Group: head X-SVN-Commit-Author: bryanv X-SVN-Commit-Paths: head/etc X-SVN-Commit-Revision: 327438 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 31 Dec 2017 17:11:14 -0000 Author: bryanv Date: Sun Dec 31 17:11:12 2017 New Revision: 327438 URL: https://svnweb.freebsd.org/changeset/base/327438 Log: Add VXLAN (RFC 7348) port PR: 202316 Submitted by: olgeni@ MFC after: 2 weeks Modified: head/etc/services Modified: head/etc/services ============================================================================== --- head/etc/services Sun Dec 31 17:07:59 2017 (r327437) +++ head/etc/services Sun Dec 31 17:11:12 2017 (r327438) @@ -2291,6 +2291,7 @@ ipfix 4739/udp #IP Flow Info Export ipfixs 4740/sctp #ipfix protocol over DTLS ipfixs 4740/tcp #ipfix protocol over TLS ipfixs 4740/udp #ipfix protocol over DTLS +vxlan 4789/udp #Virtual eXtensible Local Area Network (VXLAN) commplex-main 5000/tcp commplex-main 5000/udp commplex-link 5001/tcp From owner-svn-src-head@freebsd.org Sun Dec 31 18:53:14 2017 Return-Path: Delivered-To: svn-src-head@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 B5732EA1754; Sun, 31 Dec 2017 18:53:14 +0000 (UTC) (envelope-from ian@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 8F6AC7E8AF; Sun, 31 Dec 2017 18:53:14 +0000 (UTC) (envelope-from ian@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id vBVIrDNJ086692; Sun, 31 Dec 2017 18:53:13 GMT (envelope-from ian@FreeBSD.org) Received: (from ian@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id vBVIrDFQ086690; Sun, 31 Dec 2017 18:53:13 GMT (envelope-from ian@FreeBSD.org) Message-Id: <201712311853.vBVIrDFQ086690@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ian set sender to ian@FreeBSD.org using -f From: Ian Lepore Date: Sun, 31 Dec 2017 18:53:13 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r327439 - in head: . share/man/man7 X-SVN-Group: head X-SVN-Commit-Author: ian X-SVN-Commit-Paths: in head: . share/man/man7 X-SVN-Commit-Revision: 327439 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 31 Dec 2017 18:53:14 -0000 Author: ian Date: Sun Dec 31 18:53:13 2017 New Revision: 327439 URL: https://svnweb.freebsd.org/changeset/base/327439 Log: Allow use of .WAIT in the LOCAL_DIRS and LOCAL_LIB_DIRS lists. A comment in Makefile.inc1 has long stated that LOCAL_DIRS are built last, after the base system. Incremental improvements in parallel building over the years have led to LOCAL_DIRS being built in parallel with base system directories. This change allows the .WAIT directive to appear in LOCAL_DIRS and LOCAL_LIB_DIRS lists to give the user some control over parallel building of local additions. Differential Revision: https://reviews.freebsd.org/D13622 Modified: head/Makefile.inc1 head/share/man/man7/build.7 Modified: head/Makefile.inc1 ============================================================================== --- head/Makefile.inc1 Sun Dec 31 17:11:12 2017 (r327438) +++ head/Makefile.inc1 Sun Dec 31 18:53:13 2017 (r327439) @@ -262,10 +262,11 @@ SUBDIR+= tests SUBDIR+=contrib/ofed .endif -# Local directories are last, since it is nice to at least get the base -# system rebuilt before you do them. +# Local directories are built in parallel with the base system directories. +# Users may insert a .WAIT directive at the beginning or elsewhere within +# the LOCAL_DIRS and LOCAL_LIB_DIRS lists as needed. .for _DIR in ${LOCAL_DIRS} -.if exists(${.CURDIR}/${_DIR}/Makefile) +.if ${_DIR} == ".WAIT" || exists(${.CURDIR}/${_DIR}/Makefile) SUBDIR+= ${_DIR} .endif .endfor @@ -276,7 +277,7 @@ SUBDIR+= ${_DIR} _REDUNDANT_LIB_DIRS+= ${LOCAL_LIB_DIRS:M${_DIR}*} .endfor .for _DIR in ${LOCAL_LIB_DIRS} -.if empty(_REDUNDANT_LIB_DIRS:M${_DIR}) && exists(${.CURDIR}/${_DIR}/Makefile) +.if ${_DIR} == ".WAIT" || (empty(_REDUNDANT_LIB_DIRS:M${_DIR}) && exists(${.CURDIR}/${_DIR}/Makefile)) SUBDIR+= ${_DIR} .endif .endfor @@ -2445,7 +2446,7 @@ _generic_libs= ${_cddl_lib} gnu/lib ${_kerberos5_lib} _generic_libs+= sbin/ipf/libipf .endif .for _DIR in ${LOCAL_LIB_DIRS} -.if exists(${.CURDIR}/${_DIR}/Makefile) && empty(_generic_libs:M${_DIR}) +.if ${_DIR} == ".WAIT" || (empty(_generic_libs:M${_DIR}) && exists(${.CURDIR}/${_DIR}/Makefile)) _generic_libs+= ${_DIR} .endif .endfor Modified: head/share/man/man7/build.7 ============================================================================== --- head/share/man/man7/build.7 Sun Dec 31 17:11:12 2017 (r327438) +++ head/share/man/man7/build.7 Sun Dec 31 18:53:13 2017 (r327439) @@ -24,7 +24,7 @@ .\" .\" $FreeBSD$ .\" -.Dd November 3, 2017 +.Dd December 24, 2017 .Dt BUILD 7 .Os .Sh NAME @@ -509,6 +509,15 @@ If set, this variable supplies a list of additional di the root of the source tree to build as part of the .Cm everything target. +The directories are built in parallel with each other, +and with the base system directories. +Insert a +.Va .WAIT +directive at the beginning of the +.Va LOCAL_DIRS +list to ensure all base system directories are built first. +.Va .WAIT +may also be used as needed elsewhere within the list. .It Va LOCAL_ITOOLS If set, this variable supplies a list of additional tools that are used by the .Cm installworld @@ -520,6 +529,15 @@ If set, this variable supplies a list of additional di the root of the source tree to build as part of the .Cm libraries target. +The directories are built in parallel with each other, +and with the base system libraries. +Insert a +.Va .WAIT +directive at the beginning of the +.Va LOCAL_DIRS +list to ensure all base system libraries are built first. +.Va .WAIT +may also be used as needed elsewhere within the list. .It Va LOCAL_MTREE If set, this variable supplies a list of additional mtrees relative to the root of the source tree to use as part of the From owner-svn-src-head@freebsd.org Sun Dec 31 19:24:14 2017 Return-Path: Delivered-To: svn-src-head@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 EC9CCEA30CF; Sun, 31 Dec 2017 19:24:14 +0000 (UTC) (envelope-from jilles@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 B8D4C7FCA0; Sun, 31 Dec 2017 19:24:14 +0000 (UTC) (envelope-from jilles@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id vBVJODcQ099880; Sun, 31 Dec 2017 19:24:13 GMT (envelope-from jilles@FreeBSD.org) Received: (from jilles@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id vBVJODIc099878; Sun, 31 Dec 2017 19:24:13 GMT (envelope-from jilles@FreeBSD.org) Message-Id: <201712311924.vBVJODIc099878@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jilles set sender to jilles@FreeBSD.org using -f From: Jilles Tjoelker Date: Sun, 31 Dec 2017 19:24:13 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r327440 - in head: etc/mtree usr.bin/find X-SVN-Group: head X-SVN-Commit-Author: jilles X-SVN-Commit-Paths: in head: etc/mtree usr.bin/find X-SVN-Commit-Revision: 327440 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 31 Dec 2017 19:24:15 -0000 Author: jilles Date: Sun Dec 31 19:24:13 2017 New Revision: 327440 URL: https://svnweb.freebsd.org/changeset/base/327440 Log: find: Link tests to the build Modified: head/etc/mtree/BSD.tests.dist head/usr.bin/find/Makefile Modified: head/etc/mtree/BSD.tests.dist ============================================================================== --- head/etc/mtree/BSD.tests.dist Sun Dec 31 18:53:13 2017 (r327439) +++ head/etc/mtree/BSD.tests.dist Sun Dec 31 19:24:13 2017 (r327440) @@ -664,6 +664,8 @@ .. file2c .. + find + .. fold .. getconf Modified: head/usr.bin/find/Makefile ============================================================================== --- head/usr.bin/find/Makefile Sun Dec 31 18:53:13 2017 (r327439) +++ head/usr.bin/find/Makefile Sun Dec 31 19:24:13 2017 (r327440) @@ -1,6 +1,8 @@ # @(#)Makefile 8.1 (Berkeley) 6/6/93 # $FreeBSD$ +.include + PROG= find SRCS= find.c function.c ls.c main.c misc.c operator.c option.c \ getdate.y @@ -8,7 +10,7 @@ YFLAGS= NO_WMISSING_VARIABLE_DECLARATIONS= -#HAS_TESTS= -#SUBDIR.${MK_TESTS}+= tests +HAS_TESTS= +SUBDIR.${MK_TESTS}+= tests .include From owner-svn-src-head@freebsd.org Sun Dec 31 20:08:17 2017 Return-Path: Delivered-To: svn-src-head@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 D65E8EA4FBD; Sun, 31 Dec 2017 20:08:17 +0000 (UTC) (envelope-from nwhitehorn@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 A2B0D17CA; Sun, 31 Dec 2017 20:08:17 +0000 (UTC) (envelope-from nwhitehorn@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id vBVK8G7b017305; Sun, 31 Dec 2017 20:08:16 GMT (envelope-from nwhitehorn@FreeBSD.org) Received: (from nwhitehorn@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id vBVK8G4c017304; Sun, 31 Dec 2017 20:08:16 GMT (envelope-from nwhitehorn@FreeBSD.org) Message-Id: <201712312008.vBVK8G4c017304@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: nwhitehorn set sender to nwhitehorn@FreeBSD.org using -f From: Nathan Whitehorn Date: Sun, 31 Dec 2017 20:08:16 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r327441 - head/sys/powerpc/powerpc X-SVN-Group: head X-SVN-Commit-Author: nwhitehorn X-SVN-Commit-Paths: head/sys/powerpc/powerpc X-SVN-Commit-Revision: 327441 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 31 Dec 2017 20:08:17 -0000 Author: nwhitehorn Date: Sun Dec 31 20:08:16 2017 New Revision: 327441 URL: https://svnweb.freebsd.org/changeset/base/327441 Log: Provide relative, as well as absolute, addresses in trap panic panics. This makes it easier to cross-correlate them with instruction listings without worrying about where the kernel was relocated to. MFC after: 1 week Modified: head/sys/powerpc/powerpc/trap.c Modified: head/sys/powerpc/powerpc/trap.c ============================================================================== --- head/sys/powerpc/powerpc/trap.c Sun Dec 31 19:24:13 2017 (r327440) +++ head/sys/powerpc/powerpc/trap.c Sun Dec 31 20:08:16 2017 (r327441) @@ -97,6 +97,8 @@ static int handle_user_slb_spill(pmap_t pm, vm_offset_ extern int n_slbs; #endif +extern vm_offset_t __startkernel; + #ifdef KDB int db_trap_glue(struct trapframe *); /* Called from trap_subr.S */ #endif @@ -123,6 +125,7 @@ static struct powerpc_exception powerpc_exceptions[] = { EXC_EXI, "external interrupt" }, { EXC_ALI, "alignment" }, { EXC_PGM, "program" }, + { EXC_HEA, "hypervisor emulation assistance" }, { EXC_FPU, "floating-point unavailable" }, { EXC_APU, "auxiliary proc unavailable" }, { EXC_DECR, "decrementer" }, @@ -484,9 +487,11 @@ printtrap(u_int vector, struct trapframe *frame, int i printf(" esr = 0x%b\n", (int)frame->cpu.booke.esr, ESR_BITMASK); #endif - printf(" srr0 = 0x%" PRIxPTR "\n", frame->srr0); + printf(" srr0 = 0x%" PRIxPTR " (0x%" PRIxPTR ")\n", + frame->srr0, frame->srr0 - (__startkernel - KERNBASE)); printf(" srr1 = 0x%lx\n", (u_long)frame->srr1); - printf(" lr = 0x%" PRIxPTR "\n", frame->lr); + printf(" lr = 0x%" PRIxPTR " (0x%" PRIxPTR ")\n", + frame->lr, frame->lr - (__startkernel - KERNBASE)); printf(" curthread = %p\n", curthread); if (curthread != NULL) printf(" pid = %d, comm = %s\n", From owner-svn-src-head@freebsd.org Sun Dec 31 20:10:09 2017 Return-Path: Delivered-To: svn-src-head@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 BB5FFEA5150; Sun, 31 Dec 2017 20:10:09 +0000 (UTC) (envelope-from nwhitehorn@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 845901982; Sun, 31 Dec 2017 20:10:09 +0000 (UTC) (envelope-from nwhitehorn@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id vBVKA859017428; Sun, 31 Dec 2017 20:10:08 GMT (envelope-from nwhitehorn@FreeBSD.org) Received: (from nwhitehorn@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id vBVKA8Cd017427; Sun, 31 Dec 2017 20:10:08 GMT (envelope-from nwhitehorn@FreeBSD.org) Message-Id: <201712312010.vBVKA8Cd017427@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: nwhitehorn set sender to nwhitehorn@FreeBSD.org using -f From: Nathan Whitehorn Date: Sun, 31 Dec 2017 20:10:08 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r327442 - head/sys/powerpc/powerpc X-SVN-Group: head X-SVN-Commit-Author: nwhitehorn X-SVN-Commit-Paths: head/sys/powerpc/powerpc X-SVN-Commit-Revision: 327442 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 31 Dec 2017 20:10:09 -0000 Author: nwhitehorn Date: Sun Dec 31 20:10:08 2017 New Revision: 327442 URL: https://svnweb.freebsd.org/changeset/base/327442 Log: Make newer binutils happy by using a bl-type branch instead of b, which displeases it for some reason. LR is not relevant in this code, so just do what it wants. Modified: head/sys/powerpc/powerpc/swtch64.S Modified: head/sys/powerpc/powerpc/swtch64.S ============================================================================== --- head/sys/powerpc/powerpc/swtch64.S Sun Dec 31 20:08:16 2017 (r327441) +++ head/sys/powerpc/powerpc/swtch64.S Sun Dec 31 20:10:08 2017 (r327442) @@ -280,5 +280,5 @@ ENTRY_NOPROF(fork_trampoline) trapframe to simulate FRAME_SETUP does when allocating space for a frame pointer/saved LR */ - b trapexit + bl trapexit nop From owner-svn-src-head@freebsd.org Sun Dec 31 20:20:57 2017 Return-Path: Delivered-To: svn-src-head@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 2038FEA5A9B; Sun, 31 Dec 2017 20:20:57 +0000 (UTC) (envelope-from nwhitehorn@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 DE8DB21B9; Sun, 31 Dec 2017 20:20:56 +0000 (UTC) (envelope-from nwhitehorn@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id vBVKKt4F022072; Sun, 31 Dec 2017 20:20:55 GMT (envelope-from nwhitehorn@FreeBSD.org) Received: (from nwhitehorn@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id vBVKKtQd022071; Sun, 31 Dec 2017 20:20:55 GMT (envelope-from nwhitehorn@FreeBSD.org) Message-Id: <201712312020.vBVKKtQd022071@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: nwhitehorn set sender to nwhitehorn@FreeBSD.org using -f From: Nathan Whitehorn Date: Sun, 31 Dec 2017 20:20:55 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r327443 - head/sys/powerpc/powerpc X-SVN-Group: head X-SVN-Commit-Author: nwhitehorn X-SVN-Commit-Paths: head/sys/powerpc/powerpc X-SVN-Commit-Revision: 327443 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 31 Dec 2017 20:20:57 -0000 Author: nwhitehorn Date: Sun Dec 31 20:20:55 2017 New Revision: 327443 URL: https://svnweb.freebsd.org/changeset/base/327443 Log: Fix 32-bit build. Modified: head/sys/powerpc/powerpc/trap.c Modified: head/sys/powerpc/powerpc/trap.c ============================================================================== --- head/sys/powerpc/powerpc/trap.c Sun Dec 31 20:10:08 2017 (r327442) +++ head/sys/powerpc/powerpc/trap.c Sun Dec 31 20:20:55 2017 (r327443) @@ -488,10 +488,10 @@ printtrap(u_int vector, struct trapframe *frame, int i (int)frame->cpu.booke.esr, ESR_BITMASK); #endif printf(" srr0 = 0x%" PRIxPTR " (0x%" PRIxPTR ")\n", - frame->srr0, frame->srr0 - (__startkernel - KERNBASE)); + frame->srr0, frame->srr0 - (register_t)(__startkernel - KERNBASE)); printf(" srr1 = 0x%lx\n", (u_long)frame->srr1); printf(" lr = 0x%" PRIxPTR " (0x%" PRIxPTR ")\n", - frame->lr, frame->lr - (__startkernel - KERNBASE)); + frame->lr, frame->lr - (register_t)(__startkernel - KERNBASE)); printf(" curthread = %p\n", curthread); if (curthread != NULL) printf(" pid = %d, comm = %s\n", From owner-svn-src-head@freebsd.org Sun Dec 31 20:21:08 2017 Return-Path: Delivered-To: svn-src-head@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 4AB48EA5AE0; Sun, 31 Dec 2017 20:21:08 +0000 (UTC) (envelope-from gonzo@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 9406222D4; Sun, 31 Dec 2017 20:21:07 +0000 (UTC) (envelope-from gonzo@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id vBVKL67k024986; Sun, 31 Dec 2017 20:21:06 GMT (envelope-from gonzo@FreeBSD.org) Received: (from gonzo@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id vBVKL5RY024984; Sun, 31 Dec 2017 20:21:05 GMT (envelope-from gonzo@FreeBSD.org) Message-Id: <201712312021.vBVKL5RY024984@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gonzo set sender to gonzo@FreeBSD.org using -f From: Oleksandr Tymoshenko Date: Sun, 31 Dec 2017 20:21:05 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r327444 - in head: share/man/man4 sys/dev/vt/colors X-SVN-Group: head X-SVN-Commit-Author: gonzo X-SVN-Commit-Paths: in head: share/man/man4 sys/dev/vt/colors X-SVN-Commit-Revision: 327444 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 31 Dec 2017 20:21:08 -0000 Author: gonzo Date: Sun Dec 31 20:21:05 2017 New Revision: 327444 URL: https://svnweb.freebsd.org/changeset/base/327444 Log: vt(4): add support for configurable console palette Introduce new set of loader tunables kern.vt.color.N.rgb, where N is a number from 0 to 15. The value is either comma-separated list decimal numbers ranging from 0 to 255 that represent values of red, green, and blue components respectively (i.e. "128,128,128") or 6-digit hex triplet commonly used to represent colors in HTML or xterm settings (i.e. #808080) Each tunable overrides one of the 16 hardcoded palette codes and can be set in loader.conf(5) Reviewed by: bcr(docs), jilles, manu, ray MFC after: 2 weeks Differential Revision: https://reviews.freebsd.org/D13645 Modified: head/share/man/man4/vt.4 head/sys/dev/vt/colors/vt_termcolors.c Modified: head/share/man/man4/vt.4 ============================================================================== --- head/share/man/man4/vt.4 Sun Dec 31 20:20:55 2017 (r327443) +++ head/share/man/man4/vt.4 Sun Dec 31 20:21:05 2017 (r327444) @@ -24,7 +24,7 @@ .\" .\" $FreeBSD$ .\" -.Dd July 19, 2016 +.Dd December 28, 2017 .Dt "VT" 4 .Os .Sh NAME @@ -45,6 +45,7 @@ In .Xr loader.conf 5 : .Cd hw.vga.textmode=1 .Cd kern.vty=vt +.Cd kern.vt.color..rgb="" .Cd kern.vt.fb.default_mode="x" .Cd kern.vt.fb.modes.="x" .Pp @@ -206,6 +207,16 @@ The kernel uses .Nm when this value is not set. +.It Va kern.vt.color. Ns Ar colornum Ns Va .rgb +Set this value to override default palette entry for color +.Pa colornum +which should be in a range from 0 to 15 inclusive. +The value should be either a comma-separated triplet of +red, green, and blue values in a range from 0 to 255 or +HTML-like hex triplet. +See +.Sx EXAMPLES +below. .It Va kern.vt.fb.default_mode Set this value to a graphic mode to override the default mode picked by the .Nm @@ -310,6 +321,11 @@ The connector name was found in .Dl info: [drm] Connector LVDS-1: get mode from tunables: .Dl info: [drm] - kern.vt.fb.modes.LVDS-1 .Dl info: [drm] - kern.vt.fb.default_mode +.Pp +To set black and white colors of console palette +.Pp +.Dl kern.vt.color.0.rgb="10,10,10" +.Dl kern.vt.color.15.rgb="#f0f0f0" .Sh SEE ALSO .Xr kbdcontrol 1 , .Xr login 1 , Modified: head/sys/dev/vt/colors/vt_termcolors.c ============================================================================== --- head/sys/dev/vt/colors/vt_termcolors.c Sun Dec 31 20:20:55 2017 (r327443) +++ head/sys/dev/vt/colors/vt_termcolors.c Sun Dec 31 20:21:05 2017 (r327444) @@ -33,14 +33,18 @@ __FBSDID("$FreeBSD$"); #include +#include +#include #include -static const struct { +#define NCOLORS 16 + +static struct { unsigned char r; /* Red percentage value. */ unsigned char g; /* Green percentage value. */ unsigned char b; /* Blue percentage value. */ -} color_def[16] = { +} color_def[NCOLORS] = { {0, 0, 0}, /* black */ {50, 0, 0}, /* dark red */ {0, 50, 0}, /* dark green */ @@ -65,19 +69,112 @@ static const struct { * - blue and red are swapped (1 <-> 4) * - yellow ad cyan are swapped (3 <-> 6) */ -static const int cons_to_vga_colors[16] = { +static const int cons_to_vga_colors[NCOLORS] = { 0, 4, 2, 6, 1, 5, 3, 7, 0, 4, 2, 6, 1, 5, 3, 7 }; +static int +vt_parse_rgb_triplet(const char *rgb, unsigned char *r, + unsigned char *g, unsigned char *b) +{ + unsigned long v; + const char *ptr; + char *endptr; + + ptr = rgb; + + /* Handle #rrggbb case */ + if (*ptr == '#') { + if (strlen(ptr) != 7) + return (-1); + v = strtoul(ptr + 1, &endptr, 16); + if (*endptr != '\0') + return (-1); + + *r = (v >> 16) & 0xff; + *g = (v >> 8) & 0xff; + *b = v & 0xff; + + return (0); + } + + /* "r, g, b" case */ + v = strtoul(ptr, &endptr, 10); + if (ptr == endptr) + return (-1); + if (v > 255) + return (-1); + *r = v & 0xff; + ptr = endptr; + + /* skip separator */ + while (*ptr == ',' || *ptr == ' ') + ptr++; + + v = strtoul(ptr, &endptr, 10); + if (ptr == endptr) + return (-1); + if (v > 255) + return (-1); + *g = v & 0xff; + ptr = endptr; + + /* skip separator */ + while (*ptr == ',' || *ptr == ' ') + ptr++; + + v = strtoul(ptr, &endptr, 10); + if (ptr == endptr) + return (-1); + if (v > 255) + return (-1); + *b = v & 0xff; + ptr = endptr; + + /* skip trailing spaces */ + while (*ptr == ' ') + ptr++; + + /* unexpected characters at the end of the string */ + if (*ptr != 0) + return (-1); + + return (0); +} + +static void +vt_palette_init() +{ + int i; + char rgb[32]; + char tunable[32]; + unsigned char r, g, b; + + for (i = 0; i < NCOLORS; i++) { + snprintf(tunable, sizeof(tunable), + "kern.vt.color.%d.rgb", i); + if (TUNABLE_STR_FETCH(tunable, rgb, sizeof(rgb))) { + if (vt_parse_rgb_triplet(rgb, strlen(rgb), &r, &g, &b) == 0) { + /* convert to percentages */ + color_def[i].r = r*100/255; + color_def[i].g = g*100/255; + color_def[i].b = b*100/255; + } + } + } +} + int vt_generate_cons_palette(uint32_t *palette, int format, uint32_t rmax, int roffset, uint32_t gmax, int goffset, uint32_t bmax, int boffset) { int i; + vt_palette_init(); + #define CF(_f, _i) ((_f ## max * color_def[(_i)]._f / 100) << _f ## offset) - for (i = 0; i < 16; i++) { + for (i = 0; i < NCOLORS; i++) { switch (format) { case COLOR_FORMAT_VGA: palette[i] = cons_to_vga_colors[i]; From owner-svn-src-head@freebsd.org Sun Dec 31 20:23:40 2017 Return-Path: Delivered-To: svn-src-head@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 D78B3EA5CB9; Sun, 31 Dec 2017 20:23:40 +0000 (UTC) (envelope-from nwhitehorn@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 AF73727BF; Sun, 31 Dec 2017 20:23:40 +0000 (UTC) (envelope-from nwhitehorn@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id vBVKNdEO025899; Sun, 31 Dec 2017 20:23:39 GMT (envelope-from nwhitehorn@FreeBSD.org) Received: (from nwhitehorn@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id vBVKNdOQ025895; Sun, 31 Dec 2017 20:23:39 GMT (envelope-from nwhitehorn@FreeBSD.org) Message-Id: <201712312023.vBVKNdOQ025895@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: nwhitehorn set sender to nwhitehorn@FreeBSD.org using -f From: Nathan Whitehorn Date: Sun, 31 Dec 2017 20:23:39 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r327445 - in head/sys/powerpc: include powerpc X-SVN-Group: head X-SVN-Commit-Author: nwhitehorn X-SVN-Commit-Paths: in head/sys/powerpc: include powerpc X-SVN-Commit-Revision: 327445 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 31 Dec 2017 20:23:40 -0000 Author: nwhitehorn Date: Sun Dec 31 20:23:39 2017 New Revision: 327445 URL: https://svnweb.freebsd.org/changeset/base/327445 Log: Remove PIR from PCPU data. It has an implementation-defined meaning that is of limited utility outside of platform-specific code and can vary at runtime when running as a hypervisor guest, so does not even have the virtue of being a static identifier. Reviewed by: jhibbits Modified: head/sys/powerpc/include/pcpu.h head/sys/powerpc/powerpc/db_interface.c head/sys/powerpc/powerpc/machdep.c head/sys/powerpc/powerpc/mp_machdep.c Modified: head/sys/powerpc/include/pcpu.h ============================================================================== --- head/sys/powerpc/include/pcpu.h Sun Dec 31 20:21:05 2017 (r327444) +++ head/sys/powerpc/include/pcpu.h Sun Dec 31 20:23:39 2017 (r327445) @@ -46,7 +46,6 @@ struct pvo_entry; struct thread *pc_fputhread; /* current fpu user */ \ struct thread *pc_vecthread; /* current vec user */ \ uintptr_t pc_hwref; \ - uint32_t pc_pir; \ int pc_bsp; \ volatile int pc_awake; \ uint32_t pc_ipimask; \ Modified: head/sys/powerpc/powerpc/db_interface.c ============================================================================== --- head/sys/powerpc/powerpc/db_interface.c Sun Dec 31 20:21:05 2017 (r327444) +++ head/sys/powerpc/powerpc/db_interface.c Sun Dec 31 20:23:39 2017 (r327445) @@ -91,5 +91,4 @@ db_show_mdpcpu(struct pcpu *pc) db_printf("PPC: hwref = %#zx\n", pc->pc_hwref); db_printf("PPC: ipimask = %#x\n", pc->pc_ipimask); - db_printf("PPC: pir = %#x\n", pc->pc_pir); } Modified: head/sys/powerpc/powerpc/machdep.c ============================================================================== --- head/sys/powerpc/powerpc/machdep.c Sun Dec 31 20:21:05 2017 (r327444) +++ head/sys/powerpc/powerpc/machdep.c Sun Dec 31 20:23:39 2017 (r327445) @@ -368,7 +368,6 @@ powerpc_init(vm_offset_t fdt, vm_offset_t toc, vm_offs thread0.td_oncpu = bsp.cr_cpuid; pc->pc_cpuid = bsp.cr_cpuid; pc->pc_hwref = bsp.cr_hwref; - pc->pc_pir = mfspr(SPR_PIR); __asm __volatile("mtsprg 0, %0" :: "r"(pc)); /* Modified: head/sys/powerpc/powerpc/mp_machdep.c ============================================================================== --- head/sys/powerpc/powerpc/mp_machdep.c Sun Dec 31 20:21:05 2017 (r327444) +++ head/sys/powerpc/powerpc/mp_machdep.c Sun Dec 31 20:23:39 2017 (r327445) @@ -74,8 +74,6 @@ void machdep_ap_bootstrap(void) { - /* Set PIR */ - PCPU_SET(pir, mfspr(SPR_PIR)); PCPU_SET(awake, 1); __asm __volatile("msync; isync"); @@ -224,13 +222,13 @@ cpu_mp_unleash(void *dummy) DELAY(1000); } else { - PCPU_SET(pir, mfspr(SPR_PIR)); pc->pc_awake = 1; } if (pc->pc_awake) { if (bootverbose) - printf("Adding CPU %d, pir=%x, awake=%x\n", - pc->pc_cpuid, pc->pc_pir, pc->pc_awake); + printf("Adding CPU %d, hwref=%jx, awake=%x\n", + pc->pc_cpuid, (uintmax_t)pc->pc_hwref, + pc->pc_awake); smp_cpus++; } else CPU_SET(pc->pc_cpuid, &stopped_cpus); From owner-svn-src-head@freebsd.org Sun Dec 31 20:30:53 2017 Return-Path: Delivered-To: svn-src-head@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 11BD2EA60DE; Sun, 31 Dec 2017 20:30:53 +0000 (UTC) (envelope-from ian@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 CFC642B52; Sun, 31 Dec 2017 20:30:52 +0000 (UTC) (envelope-from ian@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id vBVKUp21026182; Sun, 31 Dec 2017 20:30:51 GMT (envelope-from ian@FreeBSD.org) Received: (from ian@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id vBVKUp47026181; Sun, 31 Dec 2017 20:30:51 GMT (envelope-from ian@FreeBSD.org) Message-Id: <201712312030.vBVKUp47026181@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ian set sender to ian@FreeBSD.org using -f From: Ian Lepore Date: Sun, 31 Dec 2017 20:30:51 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r327446 - head/sys/sparc64/sparc64 X-SVN-Group: head X-SVN-Commit-Author: ian X-SVN-Commit-Paths: head/sys/sparc64/sparc64 X-SVN-Commit-Revision: 327446 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 31 Dec 2017 20:30:53 -0000 Author: ian Date: Sun Dec 31 20:30:51 2017 New Revision: 327446 URL: https://svnweb.freebsd.org/changeset/base/327446 Log: Chase r327432... sparc64 clock.c now needs to include sys/tslog.h Discussed with: cperciva Modified: head/sys/sparc64/sparc64/clock.c Modified: head/sys/sparc64/sparc64/clock.c ============================================================================== --- head/sys/sparc64/sparc64/clock.c Sun Dec 31 20:23:39 2017 (r327445) +++ head/sys/sparc64/sparc64/clock.c Sun Dec 31 20:30:51 2017 (r327446) @@ -34,6 +34,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include From owner-svn-src-head@freebsd.org Sun Dec 31 21:00:22 2017 Return-Path: Delivered-To: svn-src-head@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 EC4FFEA729A; Sun, 31 Dec 2017 21:00:22 +0000 (UTC) (envelope-from cperciva@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 B41F53914; Sun, 31 Dec 2017 21:00:22 +0000 (UTC) (envelope-from cperciva@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id vBVL0LaS038784; Sun, 31 Dec 2017 21:00:21 GMT (envelope-from cperciva@FreeBSD.org) Received: (from cperciva@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id vBVL0L0a038783; Sun, 31 Dec 2017 21:00:21 GMT (envelope-from cperciva@FreeBSD.org) Message-Id: <201712312100.vBVL0L0a038783@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: cperciva set sender to cperciva@FreeBSD.org using -f From: Colin Percival Date: Sun, 31 Dec 2017 21:00:21 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r327447 - head/sys/sys X-SVN-Group: head X-SVN-Commit-Author: cperciva X-SVN-Commit-Paths: head/sys/sys X-SVN-Commit-Revision: 327447 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 31 Dec 2017 21:00:23 -0000 Author: cperciva Date: Sun Dec 31 21:00:21 2017 New Revision: 327447 URL: https://svnweb.freebsd.org/changeset/base/327447 Log: Wrap includes in sys/tslog.h with #ifdef TSLOG. This is necessary because some non-kernel code #defines _KERNEL and then includes kernel headers; as a result, it was getting conflicting versions of curthread and curproc. Non-kernel code should probably refrain from defining _KERNEL, but for now hiding these indirect inclusions fixes the build. Reported by: Michael Butler, Herbert J. Skuhra Modified: head/sys/sys/tslog.h Modified: head/sys/sys/tslog.h ============================================================================== --- head/sys/sys/tslog.h Sun Dec 31 20:30:51 2017 (r327446) +++ head/sys/sys/tslog.h Sun Dec 31 21:00:21 2017 (r327447) @@ -29,8 +29,10 @@ #ifndef _TSLOG_H_ #define _TSLOG_H_ +#ifdef TSLOG #include #include +#endif #define TS_ENTER 0 #define TS_EXIT 1 From owner-svn-src-head@freebsd.org Sun Dec 31 21:23:15 2017 Return-Path: Delivered-To: svn-src-head@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 CBE10EA819C; Sun, 31 Dec 2017 21:23:15 +0000 (UTC) (envelope-from bryanv@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 95E1763CE8; Sun, 31 Dec 2017 21:23:15 +0000 (UTC) (envelope-from bryanv@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id vBVLNEmj051112; Sun, 31 Dec 2017 21:23:14 GMT (envelope-from bryanv@FreeBSD.org) Received: (from bryanv@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id vBVLNELr051111; Sun, 31 Dec 2017 21:23:14 GMT (envelope-from bryanv@FreeBSD.org) Message-Id: <201712312123.vBVLNELr051111@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bryanv set sender to bryanv@FreeBSD.org using -f From: Bryan Venteicher Date: Sun, 31 Dec 2017 21:23:14 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r327448 - head/share/man/man4 X-SVN-Group: head X-SVN-Commit-Author: bryanv X-SVN-Commit-Paths: head/share/man/man4 X-SVN-Commit-Revision: 327448 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 31 Dec 2017 21:23:15 -0000 Author: bryanv Date: Sun Dec 31 21:23:14 2017 New Revision: 327448 URL: https://svnweb.freebsd.org/changeset/base/327448 Log: Add rc.conf vxlan example PR: 206288 Submitted by: james@lodge.me.uk MFC after: 2 weeks Modified: head/share/man/man4/vxlan.4 Modified: head/share/man/man4/vxlan.4 ============================================================================== --- head/share/man/man4/vxlan.4 Sun Dec 31 21:00:21 2017 (r327447) +++ head/share/man/man4/vxlan.4 Sun Dec 31 21:23:14 2017 (r327448) @@ -24,7 +24,7 @@ .\" .\" $FreeBSD$ .\" -.Dd December 16, 2014 +.Dd December 31, 2017 .Dt VXLAN 4 .Os .Sh NAME @@ -214,10 +214,21 @@ Once created, the .Nm interface can be configured with .Xr ifconfig 8 . +.Ed +.Pp +The following when placed in the file +.Pa /etc/rc.conf +will cause a vxlan interface called +.Dq Li vxlan0 +to be created, and will configure the interface in unicast mode. +.Bd -literal -offset indent +cloned_interfaces="vxlan0" +create_args_vxlan0="vxlanid 108 vxlanlocal 192.168.100.1 vxlanremote 192.168.100.2" .Sh SEE ALSO .Xr inet 4 , .Xr inet6 4 , .Xr vlan 4 , +.Xr rc.conf 5 , .Xr ifconfig 8 , .Xr sysctl 8 .Rs From owner-svn-src-head@freebsd.org Sun Dec 31 21:29:22 2017 Return-Path: Delivered-To: svn-src-head@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 0516DEA8454; Sun, 31 Dec 2017 21:29:22 +0000 (UTC) (envelope-from gonzo@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 C34E463F46; Sun, 31 Dec 2017 21:29:21 +0000 (UTC) (envelope-from gonzo@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id vBVLTKuQ051387; Sun, 31 Dec 2017 21:29:20 GMT (envelope-from gonzo@FreeBSD.org) Received: (from gonzo@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id vBVLTKGZ051386; Sun, 31 Dec 2017 21:29:20 GMT (envelope-from gonzo@FreeBSD.org) Message-Id: <201712312129.vBVLTKGZ051386@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gonzo set sender to gonzo@FreeBSD.org using -f From: Oleksandr Tymoshenko Date: Sun, 31 Dec 2017 21:29:20 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r327449 - head/sys/dev/vt/colors X-SVN-Group: head X-SVN-Commit-Author: gonzo X-SVN-Commit-Paths: head/sys/dev/vt/colors X-SVN-Commit-Revision: 327449 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 31 Dec 2017 21:29:22 -0000 Author: gonzo Date: Sun Dec 31 21:29:20 2017 New Revision: 327449 URL: https://svnweb.freebsd.org/changeset/base/327449 Log: Unbreak build broken by r327444 During review iterations function signature has changed in definition but not in actual call. Fix call to match the definition. Reported by: Herbert J. Skuhra Pointyhat to: gonzo MFC after: 2 weeks Modified: head/sys/dev/vt/colors/vt_termcolors.c Modified: head/sys/dev/vt/colors/vt_termcolors.c ============================================================================== --- head/sys/dev/vt/colors/vt_termcolors.c Sun Dec 31 21:23:14 2017 (r327448) +++ head/sys/dev/vt/colors/vt_termcolors.c Sun Dec 31 21:29:20 2017 (r327449) @@ -155,7 +155,7 @@ vt_palette_init() snprintf(tunable, sizeof(tunable), "kern.vt.color.%d.rgb", i); if (TUNABLE_STR_FETCH(tunable, rgb, sizeof(rgb))) { - if (vt_parse_rgb_triplet(rgb, strlen(rgb), &r, &g, &b) == 0) { + if (vt_parse_rgb_triplet(rgb, &r, &g, &b) == 0) { /* convert to percentages */ color_def[i].r = r*100/255; color_def[i].g = g*100/255; From owner-svn-src-head@freebsd.org Sun Dec 31 21:36:44 2017 Return-Path: Delivered-To: svn-src-head@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 2A60FEA89EB; Sun, 31 Dec 2017 21:36:44 +0000 (UTC) (envelope-from alc@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 E7205644F2; Sun, 31 Dec 2017 21:36:43 +0000 (UTC) (envelope-from alc@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id vBVLagPI055313; Sun, 31 Dec 2017 21:36:42 GMT (envelope-from alc@FreeBSD.org) Received: (from alc@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id vBVLagVG055312; Sun, 31 Dec 2017 21:36:42 GMT (envelope-from alc@FreeBSD.org) Message-Id: <201712312136.vBVLagVG055312@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: alc set sender to alc@FreeBSD.org using -f From: Alan Cox Date: Sun, 31 Dec 2017 21:36:42 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r327450 - head/sys/vm X-SVN-Group: head X-SVN-Commit-Author: alc X-SVN-Commit-Paths: head/sys/vm X-SVN-Commit-Revision: 327450 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 31 Dec 2017 21:36:44 -0000 Author: alc Date: Sun Dec 31 21:36:42 2017 New Revision: 327450 URL: https://svnweb.freebsd.org/changeset/base/327450 Log: The variable "minslptime" is pointless and always has been, ever since its introduction in r83366. (At that time, this code appeared in vm/vm_glue.c, because vm/vm_swapout.c did not exist.) When the FOREACH_THREAD loop completes, we know that the sleep time for every thread is above whichever threshold is being applied. Reviewed by: kib X-MFC with: r327354 Modified: head/sys/vm/vm_swapout.c Modified: head/sys/vm/vm_swapout.c ============================================================================== --- head/sys/vm/vm_swapout.c Sun Dec 31 21:29:20 2017 (r327449) +++ head/sys/vm/vm_swapout.c Sun Dec 31 21:36:42 2017 (r327450) @@ -729,10 +729,9 @@ swapout_procs(int action) { struct proc *p; struct thread *td; - int minslptime, slptime; + int slptime; bool didswap; - minslptime = 100000; didswap = false; retry: sx_slock(&allproc_lock); @@ -831,8 +830,6 @@ retry: goto nextproc; } - if (minslptime > slptime) - minslptime = slptime; thread_unlock(td); } @@ -841,15 +838,11 @@ retry: * or if this process is idle and the system is * configured to swap proactively, swap it out. */ - if ((action & VM_SWAP_NORMAL) != 0 || - ((action & VM_SWAP_IDLE) != 0 && - minslptime > swap_idle_threshold2)) { - _PRELE(p); - if (swapout(p) == 0) - didswap = true; - PROC_UNLOCK(p); - goto retry; - } + _PRELE(p); + if (swapout(p) == 0) + didswap = true; + PROC_UNLOCK(p); + goto retry; } nextproc: PROC_UNLOCK(p); From owner-svn-src-head@freebsd.org Sun Dec 31 22:01:38 2017 Return-Path: Delivered-To: svn-src-head@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 12D3DEA97CC; Sun, 31 Dec 2017 22:01:38 +0000 (UTC) (envelope-from eadler@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 DEAB9650E7; Sun, 31 Dec 2017 22:01:37 +0000 (UTC) (envelope-from eadler@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id vBVM1aGJ064367; Sun, 31 Dec 2017 22:01:36 GMT (envelope-from eadler@FreeBSD.org) Received: (from eadler@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id vBVM1aUW064353; Sun, 31 Dec 2017 22:01:36 GMT (envelope-from eadler@FreeBSD.org) Message-Id: <201712312201.vBVM1aUW064353@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: eadler set sender to eadler@FreeBSD.org using -f From: Eitan Adler Date: Sun, 31 Dec 2017 22:01:36 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r327451 - head/usr.sbin/newsyslog X-SVN-Group: head X-SVN-Commit-Author: eadler X-SVN-Commit-Paths: head/usr.sbin/newsyslog X-SVN-Commit-Revision: 327451 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 31 Dec 2017 22:01:38 -0000 Author: eadler Date: Sun Dec 31 22:01:36 2017 New Revision: 327451 URL: https://svnweb.freebsd.org/changeset/base/327451 Log: newsyslog: implement 'p' flag Implement the 'p' flag for newsyslog from NetBSD. This flag results in the first log file for a given file to not be compressed. While here, don't change file attributes during a no-op run PR: 162798 Submitted by: heas@shrubbery.net MFC After: 1 month Modified: head/usr.sbin/newsyslog/newsyslog.c head/usr.sbin/newsyslog/newsyslog.conf.5 Modified: head/usr.sbin/newsyslog/newsyslog.c ============================================================================== --- head/usr.sbin/newsyslog/newsyslog.c Sun Dec 31 21:36:42 2017 (r327450) +++ head/usr.sbin/newsyslog/newsyslog.c Sun Dec 31 22:01:36 2017 (r327451) @@ -132,6 +132,7 @@ __FBSDID("$FreeBSD$"); #define CE_CREATE 0x0100 /* Create the log file if it does not exist. */ #define CE_NODUMP 0x0200 /* Set 'nodump' on newly created log file. */ #define CE_PID2CMD 0x0400 /* Replace PID file with a shell command.*/ +#define CE_PLAIN0 0x0800 /* Do not compress zero'th history file */ #define CE_RFC5424 0x0800 /* Use RFC5424 format rotation message */ @@ -1316,6 +1317,9 @@ no_trimat: case 'n': working->flags |= CE_NOSIGNAL; break; + case 'p': + working->flags |= CE_PLAIN0; + break; case 'r': working->flags |= CE_PID2CMD; break; @@ -1341,7 +1345,6 @@ no_trimat: break; case 'f': /* Used by OpenBSD for "CE_FOLLOW" */ case 'm': /* Used by OpenBSD for "CE_MONITOR" */ - case 'p': /* Used by NetBSD for "CE_PLAIN0" */ default: errx(1, "illegal flag in config file -- %c", *q); @@ -1846,8 +1849,18 @@ do_rotate(const struct conf_entry *ent) else { /* XXX - Ought to be checking for failure! */ (void)rename(zfile1, zfile2); + change_attrs(zfile2, ent); + if (ent->compress && !strlen(logfile_suffix)) { + /* compress old rotation */ + struct zipwork_entry zwork; + + memset(&zwork, 0, sizeof(zwork)); + zwork.zw_conf = ent; + zwork.zw_fsize = sizefile(zfile2); + strcpy(zwork.zw_fname, zfile2); + do_zipwork(&zwork); + } } - change_attrs(zfile2, ent); } if (ent->numlogs > 0) { @@ -1896,12 +1909,15 @@ do_rotate(const struct conf_entry *ent) if (ent->pid_cmd_file != NULL) swork = save_sigwork(ent); if (ent->numlogs > 0 && ent->compress > COMPRESS_NONE) { - /* - * The zipwork_entry will include a pointer to this - * conf_entry, so the conf_entry should not be freed. - */ - free_or_keep = KEEP_ENT; - save_zipwork(ent, swork, ent->fsize, file1); + if (!(ent->flags & CE_PLAIN0) || + strcmp(&file1[strlen(file1) - 2], ".0") != 0) { + /* + * The zipwork_entry will include a pointer to this + * conf_entry, so the conf_entry should not be freed. + */ + free_or_keep = KEEP_ENT; + save_zipwork(ent, swork, ent->fsize, file1); + } } return (free_or_keep); Modified: head/usr.sbin/newsyslog/newsyslog.conf.5 ============================================================================== --- head/usr.sbin/newsyslog/newsyslog.conf.5 Sun Dec 31 21:36:42 2017 (r327450) +++ head/usr.sbin/newsyslog/newsyslog.conf.5 Sun Dec 31 22:01:36 2017 (r327451) @@ -21,7 +21,7 @@ .\" the suitability of this software for any purpose. It is .\" provided "as is" without express or implied warranty. .\" -.Dd May 19, 2017 +.Dd Dec 31, 2017 .Dt NEWSYSLOG.CONF 5 .Os .Sh NAME @@ -312,6 +312,8 @@ log file using .It Cm N indicates that there is no process which needs to be signaled when this log file is rotated. +.It Cm p +indicates that the zero-th rotated file should not be compressed. .It Cm R if this flag is set the .Xr newsyslog 8 From owner-svn-src-head@freebsd.org Sun Dec 31 22:35:34 2017 Return-Path: Delivered-To: svn-src-head@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 228B9EAB059; Sun, 31 Dec 2017 22:35:34 +0000 (UTC) (envelope-from kevans@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 E0F0367393; Sun, 31 Dec 2017 22:35:33 +0000 (UTC) (envelope-from kevans@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id vBVMZXla082043; Sun, 31 Dec 2017 22:35:33 GMT (envelope-from kevans@FreeBSD.org) Received: (from kevans@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id vBVMZXmr082042; Sun, 31 Dec 2017 22:35:33 GMT (envelope-from kevans@FreeBSD.org) Message-Id: <201712312235.vBVMZXmr082042@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kevans set sender to kevans@FreeBSD.org using -f From: Kyle Evans Date: Sun, 31 Dec 2017 22:35:33 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r327452 - head/sys/arm/allwinner X-SVN-Group: head X-SVN-Commit-Author: kevans X-SVN-Commit-Paths: head/sys/arm/allwinner X-SVN-Commit-Revision: 327452 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 31 Dec 2017 22:35:34 -0000 Author: kevans Date: Sun Dec 31 22:35:32 2017 New Revision: 327452 URL: https://svnweb.freebsd.org/changeset/base/327452 Log: aw_sid: Add support for a64 Newer Allwinner SoCs have nearly identical SID controllers with efuse space starting at 0x200 into their register space and thermal data available at 0x234, making all of these fairly trivial additions. The h3 will be added at a later time after some testing, due to a silicon bug that causes the rootkey (at least) to be read incorrectly unless first read via the control register. Modified: head/sys/arm/allwinner/aw_sid.c Modified: head/sys/arm/allwinner/aw_sid.c ============================================================================== --- head/sys/arm/allwinner/aw_sid.c Sun Dec 31 22:01:36 2017 (r327451) +++ head/sys/arm/allwinner/aw_sid.c Sun Dec 31 22:35:32 2017 (r327452) @@ -67,6 +67,11 @@ static const struct aw_sid_conf a20_conf = { .rootkey_offset = 0, }; +static const struct aw_sid_conf a64_conf = { + .rootkey_offset = SID_SRAM, + .has_thermal = true, +}; + static const struct aw_sid_conf a83t_conf = { .rootkey_offset = SID_SRAM, .has_thermal = true, @@ -75,6 +80,7 @@ static const struct aw_sid_conf a83t_conf = { static struct ofw_compat_data compat_data[] = { { "allwinner,sun4i-a10-sid", (uintptr_t)&a10_conf}, { "allwinner,sun7i-a20-sid", (uintptr_t)&a20_conf}, + { "allwinner,sun50i-a64-sid", (uintptr_t)&a64_conf}, { "allwinner,sun8i-a83t-sid", (uintptr_t)&a83t_conf}, { NULL, 0 } }; From owner-svn-src-head@freebsd.org Sun Dec 31 22:43:26 2017 Return-Path: Delivered-To: svn-src-head@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 673A2EAB62F; Sun, 31 Dec 2017 22:43:26 +0000 (UTC) (envelope-from ian@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 315C767B30; Sun, 31 Dec 2017 22:43:26 +0000 (UTC) (envelope-from ian@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id vBVMhPZX086153; Sun, 31 Dec 2017 22:43:25 GMT (envelope-from ian@FreeBSD.org) Received: (from ian@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id vBVMhPtS086151; Sun, 31 Dec 2017 22:43:25 GMT (envelope-from ian@FreeBSD.org) Message-Id: <201712312243.vBVMhPtS086151@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ian set sender to ian@FreeBSD.org using -f From: Ian Lepore Date: Sun, 31 Dec 2017 22:43:25 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r327453 - in head: stand/libsa sys/sys X-SVN-Group: head X-SVN-Commit-Author: ian X-SVN-Commit-Paths: in head: stand/libsa sys/sys X-SVN-Commit-Revision: 327453 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 31 Dec 2017 22:43:26 -0000 Author: ian Date: Sun Dec 31 22:43:24 2017 New Revision: 327453 URL: https://svnweb.freebsd.org/changeset/base/327453 Log: Add a validbcd() routine that uses the bcd2bin_data[] array and returns a bool indicating whether the input value represents a valid BCD byte. The existing bcd2bin() routine will KASSERT if asked to convert a bad value, but sometimes the kernel has to handle BCD data from untrusted sources, so this will provide a mechanism to validate data before attempting conversion. This would be have easier/cleaner if the bcd2bin_data[] array contained an out-of-range value (such as 0xff) in the infill locations that aren't valid, but it's a global symbol that might be referenced by out-of-tree code relying on the current scheme, so I'm leaving that alone. Modified: head/stand/libsa/stand.h head/sys/sys/libkern.h Modified: head/stand/libsa/stand.h ============================================================================== --- head/stand/libsa/stand.h Sun Dec 31 22:35:32 2017 (r327452) +++ head/stand/libsa/stand.h Sun Dec 31 22:43:24 2017 (r327453) @@ -354,6 +354,7 @@ extern char const hex2ascii_data[]; #define bcd2bin(bcd) (bcd2bin_data[bcd]) #define bin2bcd(bin) (bin2bcd_data[bin]) #define hex2ascii(hex) (hex2ascii_data[hex]) +#define validbcd(bcd) (bcd == 0 || (bcd > 0 && bcd <= 0x99 && bcd2bin_data[bcd] != 0)) /* min/max (undocumented) */ static __inline int imax(int a, int b) { return (a > b ? a : b); } Modified: head/sys/sys/libkern.h ============================================================================== --- head/sys/sys/libkern.h Sun Dec 31 22:35:32 2017 (r327452) +++ head/sys/sys/libkern.h Sun Dec 31 22:43:24 2017 (r327453) @@ -82,6 +82,13 @@ hex2ascii(int hex) return (hex2ascii_data[hex]); } +static inline bool +validbcd(int bcd) +{ + + return (bcd == 0 || (bcd > 0 && bcd <= 0x99 && bcd2bin_data[bcd] != 0)); +} + static __inline int imax(int a, int b) { return (a > b ? a : b); } static __inline int imin(int a, int b) { return (a < b ? a : b); } static __inline long lmax(long a, long b) { return (a > b ? a : b); } From owner-svn-src-head@freebsd.org Sun Dec 31 23:40:07 2017 Return-Path: Delivered-To: svn-src-head@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 AD132EAD399; Sun, 31 Dec 2017 23:40:07 +0000 (UTC) (envelope-from gonzo@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 77D6C691EA; Sun, 31 Dec 2017 23:40:07 +0000 (UTC) (envelope-from gonzo@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id vBVNe6YO007052; Sun, 31 Dec 2017 23:40:06 GMT (envelope-from gonzo@FreeBSD.org) Received: (from gonzo@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id vBVNe6a8007051; Sun, 31 Dec 2017 23:40:06 GMT (envelope-from gonzo@FreeBSD.org) Message-Id: <201712312340.vBVNe6a8007051@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gonzo set sender to gonzo@FreeBSD.org using -f From: Oleksandr Tymoshenko Date: Sun, 31 Dec 2017 23:40:06 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r327454 - head/sys/dev/vt/colors X-SVN-Group: head X-SVN-Commit-Author: gonzo X-SVN-Commit-Paths: head/sys/dev/vt/colors X-SVN-Commit-Revision: 327454 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 31 Dec 2017 23:40:07 -0000 Author: gonzo Date: Sun Dec 31 23:40:06 2017 New Revision: 327454 URL: https://svnweb.freebsd.org/changeset/base/327454 Log: Fix GCC build broken by r32744 Indicate in function declaration that vt_palette_init does not take any arguments Modified: head/sys/dev/vt/colors/vt_termcolors.c Modified: head/sys/dev/vt/colors/vt_termcolors.c ============================================================================== --- head/sys/dev/vt/colors/vt_termcolors.c Sun Dec 31 22:43:24 2017 (r327453) +++ head/sys/dev/vt/colors/vt_termcolors.c Sun Dec 31 23:40:06 2017 (r327454) @@ -144,7 +144,7 @@ vt_parse_rgb_triplet(const char *rgb, unsigned char *r } static void -vt_palette_init() +vt_palette_init(void) { int i; char rgb[32]; From owner-svn-src-head@freebsd.org Mon Jan 1 00:20:36 2018 Return-Path: Delivered-To: svn-src-head@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 D6EBDEAF027; Mon, 1 Jan 2018 00:20:36 +0000 (UTC) (envelope-from eadler@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 AEA8F6A9B6; Mon, 1 Jan 2018 00:20:36 +0000 (UTC) (envelope-from eadler@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w010KZPK023974; Mon, 1 Jan 2018 00:20:35 GMT (envelope-from eadler@FreeBSD.org) Received: (from eadler@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w010KZae023973; Mon, 1 Jan 2018 00:20:35 GMT (envelope-from eadler@FreeBSD.org) Message-Id: <201801010020.w010KZae023973@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: eadler set sender to eadler@FreeBSD.org using -f From: Eitan Adler Date: Mon, 1 Jan 2018 00:20:35 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r327455 - head/share/man/man9 X-SVN-Group: head X-SVN-Commit-Author: eadler X-SVN-Commit-Paths: head/share/man/man9 X-SVN-Commit-Revision: 327455 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 01 Jan 2018 00:20:36 -0000 Author: eadler Date: Mon Jan 1 00:20:35 2018 New Revision: 327455 URL: https://svnweb.freebsd.org/changeset/base/327455 Log: ieee80211(9): update man page This copies changes from NetBSD into FreeBSD's man page. I compared the proposed changes against FreeBSD headers and modified them to match. PR: 214602 Submitted by: fehmi noyan isi Modified: head/share/man/man9/ieee80211.9 Modified: head/share/man/man9/ieee80211.9 ============================================================================== --- head/share/man/man9/ieee80211.9 Sun Dec 31 23:40:06 2017 (r327454) +++ head/share/man/man9/ieee80211.9 Mon Jan 1 00:20:35 2018 (r327455) @@ -1,4 +1,6 @@ .\" +.\" Copyright (c) 2004 Bruce M. Simpson +.\" Copyright (c) 2004 Darron Broad .\" Copyright (c) 2009 Sam Leffler, Errno Consulting .\" All rights reserved. .\" @@ -25,7 +27,7 @@ .\" .\" $FreeBSD$ .\" -.Dd April 28, 2010 +.Dd December 31, 2017 .Dt IEEE80211 9 .Os .Sh NAME @@ -34,9 +36,31 @@ .Sh SYNOPSIS .In net80211/ieee80211_var.h .Ft void -.Fn ieee80211_ifattach "struct ieee80211com *ic" "const uint8_t macaddr[IEEE80211_ADDR_LEN]" +.Fn ieee80211_ifattach "struct ieee80211com *ic" .Ft void .Fn ieee80211_ifdetach "struct ieee80211com *ic" +.Ft int +.Fn ieee80211_mhz2ieee "u_int freq" "u_int flags" +.Ft int +.Fn ieee80211_chan2ieee "struct ieee80211com *ic" "const struct ieee80211_channel *c" +.Ft u_int +.Fn ieee80211_ieee2mhz "u_int chan" "u_int flags" +.Ft int +.Fn ieee80211_media_change "struct ifnet *ifp" +.Ft void +.Fn ieee80211_media_status "struct ifnet *ifp" "struct ifmediareq *imr" +.Ft int +.Fn ieee80211_setmode "struct ieee80211com *ic" "enum ieee80211_phymode mode" +.Ft enum ieee80211_phymode +.Fo ieee80211_chan2mode +.Fa "const struct ieee80211_channel *chan" +.Fc +.Ft int +.Fo ieee80211_rate2media +.Fa "struct ieee80211com *ic" "int rate" "enum ieee80211_phymode mode" +.Fc +.Ft int +.Fn ieee80211_media2rate "int mword" .Sh DESCRIPTION IEEE 802.11 device drivers are written to use the infrastructure provided by the @@ -89,6 +113,112 @@ The virtual radio interface defined by the layer means that drivers must be structured to follow specific rules. Drivers that support only a single interface at any time must still follow these rules. +.Pp +Most of these functions require that attachment to the stack is performed +before calling. +.Pp +.\" +The +.Fn ieee80211_ifattach +function attaches the wireless network interface +.Fa ic +to the 802.11 network stack layer. +This function must be called before using any of the +.Nm +functions which need to store driver state across invocations. +.Pp +.\" +The +.Fn ieee80211_ifdetach +function frees any +.Nm +structures associated with the driver, and performs Ethernet and BPF +detachment on behalf of the caller. +.Pp +.\" +The +.Fn ieee80211_mhz2ieee +utility function converts the frequency +.Fa freq +(specified in MHz) to an IEEE 802.11 channel number. +The +.Fa flags +argument is a hint which specifies whether the frequency is in +the 2GHz ISM band +.Pq Vt IEEE80211_CHAN_2GHZ +or the 5GHz band +.Pq Vt IEEE80211_CHAN_5GHZ ; +appropriate clipping of the result is then performed. +.Pp +.\" +The +.Fn ieee80211_chan2ieee +function converts the channel specified in +.Fa *c +to an IEEE channel number for the driver +.Fa ic . +If the conversion would be invalid, an error message is printed to the +system console. +This function REQUIRES that the driver is hooked up to the +.Nm +subsystem. +.Pp +.\" +The +.Fn ieee80211_ieee2mhz +utility function converts the IEEE channel number +.Ft chan +to a frequency (in MHz). +The +.Fa flags +argument is a hint which specifies whether the frequency is in +the 2GHz ISM band +.Pq Vt IEEE80211_CHAN_2GHZ +or the 5GHz band +.Pq Vt IEEE80211_CHAN_5GHZ ; +appropriate clipping of the result is then performed. +.Pp +.\" +The +.Fn ieee80211_media_status +and +.Fn ieee80211_media_change +functions are device-independent handlers for +.Vt ifmedia +commands and are not intended to be called directly. +.Pp +.\" +The +.Fn ieee80211_setmode +function is called from within the 802.11 stack to change the mode +of the driver's PHY; it is not intended to be called directly. +.Pp +.\" +The +.Fn ieee80211_chan2mode +function returns the PHY mode required for use with the channel +.Fa chan . +This is typically used when selecting a rate set, to be advertised in +beacons, for example. +.Pp +.\" +The +.Fn ieee80211_rate2media +function converts the bit rate +.Fa rate +(measured in units of 0.5Mbps) to an +.Vt ifmedia +sub-type, for the device +.Fa ic +running in PHY mode +.Fa mode . +The +.Fn ieee80211_media2rate +performs the reverse of this conversion, returning the bit rate (in 0.5Mbps +units) corresponding to an +.Vt ifmedia +sub-type. +. .Sh DATA STRUCTURES The virtual radio architecture splits state between a single per-device .Vt ieee80211com @@ -566,3 +696,23 @@ Device supports Reduced Inter Frame Spacing (RIFS). .Xr ieee80211_vap 9 , .Xr ifnet 9 , .Xr malloc 9 +.Sh HISTORY +The +.Nm +series of functions first appeared in +.Nx 1.5 , +and were later ported to +.Fx 4.6 . +This man page was updated with the information from +.Nx +.Nm +man page. +.Sh AUTHORS +.An -nosplit +The original +.Nx +.Nm +man page was written by +.An Bruce M. Simpson Aq Mt bms@FreeBSD.org +and +.An Darron Broad Aq Mt darron@kewl.org . From owner-svn-src-head@freebsd.org Mon Jan 1 03:33:03 2018 Return-Path: Delivered-To: svn-src-head@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 0670CEB55A8; Mon, 1 Jan 2018 03:33:03 +0000 (UTC) (envelope-from nwhitehorn@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 C45106FC7A; Mon, 1 Jan 2018 03:33:02 +0000 (UTC) (envelope-from nwhitehorn@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w013X1Gi007507; Mon, 1 Jan 2018 03:33:01 GMT (envelope-from nwhitehorn@FreeBSD.org) Received: (from nwhitehorn@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w013X1HG007506; Mon, 1 Jan 2018 03:33:01 GMT (envelope-from nwhitehorn@FreeBSD.org) Message-Id: <201801010333.w013X1HG007506@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: nwhitehorn set sender to nwhitehorn@FreeBSD.org using -f From: Nathan Whitehorn Date: Mon, 1 Jan 2018 03:33:01 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r327456 - head/release/powerpc X-SVN-Group: head X-SVN-Commit-Author: nwhitehorn X-SVN-Commit-Paths: head/release/powerpc X-SVN-Commit-Revision: 327456 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 01 Jan 2018 03:33:03 -0000 Author: nwhitehorn Date: Mon Jan 1 03:33:01 2018 New Revision: 327456 URL: https://svnweb.freebsd.org/changeset/base/327456 Log: After removal of loader.ps3, change petitboot configuration in release media to directly kexec the kernel. Unlike the old loader.ps3 code, this also works on PowerNV systems, which also use petitboot. MFC after: 1 month Modified: head/release/powerpc/mkisoimages.sh Modified: head/release/powerpc/mkisoimages.sh ============================================================================== --- head/release/powerpc/mkisoimages.sh Mon Jan 1 00:20:35 2018 (r327455) +++ head/release/powerpc/mkisoimages.sh Mon Jan 1 03:33:01 2018 (r327456) @@ -23,20 +23,38 @@ # extra-bits-dir, if provided, contains additional files to be merged # into base-bits-dir as part of making the image. + if [ "$1" = "-b" ]; then + bootable=1 + shift +else + bootable="" +fi + +if [ $# -lt 3 ]; then + echo "Usage: $0 [-b] image-label image-name base-bits-dir [extra-bits-dir]" + exit 1 +fi + +LABEL=`echo "$1" | tr '[:lower:]' '[:upper:]'`; shift +NAME="$1"; shift + +if [ -n "$bootable" ]; then + echo "Building bootable disc" + # Apple boot code uudecode -o /tmp/hfs-boot-block.bz2 "`dirname "$0"`/hfs-boot.bz2.uu" bzip2 -d /tmp/hfs-boot-block.bz2 OFFSET=$(hd /tmp/hfs-boot-block | grep 'Loader START' | cut -f 1 -d ' ') OFFSET=0x$(echo 0x$OFFSET | awk '{printf("%x\n",$1/512);}') - dd if="$4/boot/loader" of=/tmp/hfs-boot-block seek=$OFFSET conv=notrunc + dd if="$1/boot/loader" of=/tmp/hfs-boot-block seek=$OFFSET conv=notrunc bootable="-o bootimage=macppc;/tmp/hfs-boot-block -o no-emul-boot" # pSeries/PAPR boot code - mkdir -p "$4/ppc/chrp" - cp "$4/boot/loader" "$4/ppc/chrp" - cat > "$4/ppc/bootinfo.txt" << EOF + mkdir -p "$1/ppc/chrp" + cp "$1/boot/loader" "$1/ppc/chrp" + cat > "$1/ppc/bootinfo.txt" << EOF FreeBSD Install FreeBSD @@ -45,21 +63,9 @@ if [ "$1" = "-b" ]; then EOF bootable="$bootable -o chrp-boot" - # Playstation 3 boot code - echo "FreeBSD Install='/boot/loader.ps3'" > "$4/etc/kboot.conf" - - shift -else - bootable="" + # Petitboot config for PS3/PowerNV + echo FreeBSD Install=\'/boot/kernel/kernel vfs.root.mountfrom=cd9660:/dev/iso9660/$LABEL\' > "$1/etc/kboot.conf" fi - -if [ $# -lt 3 ]; then - echo "Usage: $0 [-b] image-label image-name base-bits-dir [extra-bits-dir]" - exit 1 -fi - -LABEL=`echo "$1" | tr '[:lower:]' '[:upper:]'`; shift -NAME="$1"; shift publisher="The FreeBSD Project. https://www.FreeBSD.org/" echo "/dev/iso9660/$LABEL / cd9660 ro 0 0" > "$1/etc/fstab" From owner-svn-src-head@freebsd.org Mon Jan 1 04:06:25 2018 Return-Path: Delivered-To: svn-src-head@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 EAAE7EB66E5; Mon, 1 Jan 2018 04:06:25 +0000 (UTC) (envelope-from imp@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 B330170A35; Mon, 1 Jan 2018 04:06:25 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w0146O8R020094; Mon, 1 Jan 2018 04:06:24 GMT (envelope-from imp@FreeBSD.org) Received: (from imp@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w0146OWM020093; Mon, 1 Jan 2018 04:06:24 GMT (envelope-from imp@FreeBSD.org) Message-Id: <201801010406.w0146OWM020093@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: imp set sender to imp@FreeBSD.org using -f From: Warner Losh Date: Mon, 1 Jan 2018 04:06:24 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r327457 - in head/sys/mips: conf rt305x X-SVN-Group: head X-SVN-Commit-Author: imp X-SVN-Commit-Paths: in head/sys/mips: conf rt305x X-SVN-Commit-Revision: 327457 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 01 Jan 2018 04:06:26 -0000 Author: imp Date: Mon Jan 1 04:06:24 2018 New Revision: 327457 URL: https://svnweb.freebsd.org/changeset/base/327457 Log: Remove sys/mips/rt305x. It's been replaced by sys/mips/mediatek. OK'd by: Stanislav Galabov (who did both) Discussed on: mips@ Deleted: head/sys/mips/conf/MT7620 head/sys/mips/conf/RT305X head/sys/mips/conf/RT5350 head/sys/mips/rt305x/files.rt305x head/sys/mips/rt305x/obio.c head/sys/mips/rt305x/obiovar.h head/sys/mips/rt305x/rt305x_dotg.c head/sys/mips/rt305x/rt305x_ehci.c head/sys/mips/rt305x/rt305x_gpio.c head/sys/mips/rt305x/rt305x_gpio.h head/sys/mips/rt305x/rt305x_gpiovar.h head/sys/mips/rt305x/rt305x_ic.c head/sys/mips/rt305x/rt305x_icvar.h head/sys/mips/rt305x/rt305x_machdep.c head/sys/mips/rt305x/rt305x_ohci.c head/sys/mips/rt305x/rt305x_pci.c head/sys/mips/rt305x/rt305x_pcireg.h head/sys/mips/rt305x/rt305x_spi.c head/sys/mips/rt305x/rt305x_sysctl.c head/sys/mips/rt305x/rt305x_sysctlvar.h head/sys/mips/rt305x/rt305xreg.h head/sys/mips/rt305x/rt_swreg.h head/sys/mips/rt305x/std.rt305x head/sys/mips/rt305x/uart_bus_rt305x.c head/sys/mips/rt305x/uart_cpu_rt305x.c head/sys/mips/rt305x/uart_dev_rt305x.c head/sys/mips/rt305x/uart_dev_rt305x.h From owner-svn-src-head@freebsd.org Mon Jan 1 04:10:26 2018 Return-Path: Delivered-To: svn-src-head@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 CE66BEB68C6; Mon, 1 Jan 2018 04:10:26 +0000 (UTC) (envelope-from imp@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 98C5B70BF9; Mon, 1 Jan 2018 04:10:26 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w014APMl020297; Mon, 1 Jan 2018 04:10:25 GMT (envelope-from imp@FreeBSD.org) Received: (from imp@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w014APEb020296; Mon, 1 Jan 2018 04:10:25 GMT (envelope-from imp@FreeBSD.org) Message-Id: <201801010410.w014APEb020296@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: imp set sender to imp@FreeBSD.org using -f From: Warner Losh Date: Mon, 1 Jan 2018 04:10:25 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r327458 - in head/sys/mips: alchemy conf X-SVN-Group: head X-SVN-Commit-Author: imp X-SVN-Commit-Paths: in head/sys/mips: alchemy conf X-SVN-Commit-Revision: 327458 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 01 Jan 2018 04:10:26 -0000 Author: imp Date: Mon Jan 1 04:10:25 2018 New Revision: 327458 URL: https://svnweb.freebsd.org/changeset/base/327458 Log: Remove sys/mips/alchemy. It was still-born when I committed it and it never got better. It never worked on real hardware and is still mostly stubs after 8 years when I added it. It has had no real update in that time apart from API churn. It was added just so it didn't get lost in the project/mips merge, but maybe it should have been lost as nothing has come of it. It is time to give up the ghost on this one. Approved by: me, shooting my own dog Discussed on: mips@ Deleted: head/sys/mips/alchemy/alchemy_machdep.c head/sys/mips/alchemy/aureg.h head/sys/mips/alchemy/files.alchemy head/sys/mips/alchemy/obio.c head/sys/mips/alchemy/std.alchemy head/sys/mips/alchemy/uart_bus_alchemy.c head/sys/mips/alchemy/uart_cpu_alchemy.c head/sys/mips/conf/ALCHEMY From owner-svn-src-head@freebsd.org Mon Jan 1 04:10:32 2018 Return-Path: Delivered-To: svn-src-head@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 7A40EEB68EE; Mon, 1 Jan 2018 04:10:32 +0000 (UTC) (envelope-from imp@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 4240870C2F; Mon, 1 Jan 2018 04:10:32 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w014AVKJ020349; Mon, 1 Jan 2018 04:10:31 GMT (envelope-from imp@FreeBSD.org) Received: (from imp@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w014AVWf020348; Mon, 1 Jan 2018 04:10:31 GMT (envelope-from imp@FreeBSD.org) Message-Id: <201801010410.w014AVWf020348@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: imp set sender to imp@FreeBSD.org using -f From: Warner Losh Date: Mon, 1 Jan 2018 04:10:31 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r327459 - in head/sys/mips: adm5120 conf X-SVN-Group: head X-SVN-Commit-Author: imp X-SVN-Commit-Paths: in head/sys/mips: adm5120 conf X-SVN-Commit-Revision: 327459 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 01 Jan 2018 04:10:32 -0000 Author: imp Date: Mon Jan 1 04:10:31 2018 New Revision: 327459 URL: https://svnweb.freebsd.org/changeset/base/327459 Log: Retire old ADM 5120 port. It never grew much beyond the original port. It came into the tree with the project/mips merge 8 years ago. At the time, it was hard to find a board with enough RAM to run. Now FreeBSD requires at least 2x the RAM it did then. No changes have happened to this port apart from API churn and license tagging since then. It ran OK at the time it was committed, but no sightings in the wild have happened since shortly after it was committed. https://www.linux-mips.org/wiki/Adm5120_devices lists a bunch of boards that were available 5 years ago (but are no longer available). The beefiest one had only 64MB of RAM which is too small. The Mirktik RB1xx never had more than 32MB. Also remove confusing QEMU config file that never ever worked in QEMU for mips. MALTA is used for that. Another of my past mistakes, false starts that never amounted to anything. Discussed on: mips@ (with some dissent) Deleted: head/sys/mips/adm5120/adm5120_machdep.c head/sys/mips/adm5120/adm5120reg.h head/sys/mips/adm5120/admpci.c head/sys/mips/adm5120/console.c head/sys/mips/adm5120/files.adm5120 head/sys/mips/adm5120/if_admsw.c head/sys/mips/adm5120/if_admswreg.h head/sys/mips/adm5120/if_admswvar.h head/sys/mips/adm5120/obio.c head/sys/mips/adm5120/obiovar.h head/sys/mips/adm5120/std.adm5120 head/sys/mips/adm5120/uart_bus_adm5120.c head/sys/mips/adm5120/uart_cpu_adm5120.c head/sys/mips/adm5120/uart_dev_adm5120.c head/sys/mips/adm5120/uart_dev_adm5120.h head/sys/mips/conf/ADM5120 head/sys/mips/conf/QEMU From owner-svn-src-head@freebsd.org Mon Jan 1 04:10:39 2018 Return-Path: Delivered-To: svn-src-head@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 2DD37EB691C; Mon, 1 Jan 2018 04:10:39 +0000 (UTC) (envelope-from imp@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 601CC70D37; Mon, 1 Jan 2018 04:10:38 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w014AaMK021164; Mon, 1 Jan 2018 04:10:36 GMT (envelope-from imp@FreeBSD.org) Received: (from imp@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w014AaU9021163; Mon, 1 Jan 2018 04:10:36 GMT (envelope-from imp@FreeBSD.org) Message-Id: <201801010410.w014AaU9021163@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: imp set sender to imp@FreeBSD.org using -f From: Warner Losh Date: Mon, 1 Jan 2018 04:10:36 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r327460 - in head/sys/mips: conf idt X-SVN-Group: head X-SVN-Commit-Author: imp X-SVN-Commit-Paths: in head/sys/mips: conf idt X-SVN-Commit-Revision: 327460 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 01 Jan 2018 04:10:39 -0000 Author: imp Date: Mon Jan 1 04:10:36 2018 New Revision: 327460 URL: https://svnweb.freebsd.org/changeset/base/327460 Log: Remove support for IDT. Only the RouterBoard RB533 used this chip, and it's at least 5 years out of production. I couldn't find a used one on ebay and other secondary markets just now, nor when I tried 4 years ago. It dates from the initial project/mips2 merge 8 years ago, and hasn't been updated since. Discussed on: mips@ (with some dissent) Deleted: head/sys/mips/conf/IDT head/sys/mips/idt/files.idt head/sys/mips/idt/idt_machdep.c head/sys/mips/idt/idtpci.c head/sys/mips/idt/idtreg.h head/sys/mips/idt/if_kr.c head/sys/mips/idt/if_krreg.h head/sys/mips/idt/obio.c head/sys/mips/idt/obiovar.h head/sys/mips/idt/std.idt head/sys/mips/idt/uart_bus_rc32434.c head/sys/mips/idt/uart_cpu_rc32434.c From owner-svn-src-head@freebsd.org Mon Jan 1 05:13:04 2018 Return-Path: Delivered-To: svn-src-head@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 BCEF8E85130; Mon, 1 Jan 2018 05:13:04 +0000 (UTC) (envelope-from imp@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 687B17D96F; Mon, 1 Jan 2018 05:13:04 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w015D3o9048778; Mon, 1 Jan 2018 05:13:03 GMT (envelope-from imp@FreeBSD.org) Received: (from imp@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w015D3wJ048777; Mon, 1 Jan 2018 05:13:03 GMT (envelope-from imp@FreeBSD.org) Message-Id: <201801010513.w015D3wJ048777@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: imp set sender to imp@FreeBSD.org using -f From: Warner Losh Date: Mon, 1 Jan 2018 05:13:03 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r327461 - in head/sys/mips: conf rmi X-SVN-Group: head X-SVN-Commit-Author: imp X-SVN-Commit-Paths: in head/sys/mips: conf rmi X-SVN-Commit-Revision: 327461 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 01 Jan 2018 05:13:04 -0000 Author: imp Date: Mon Jan 1 05:13:03 2018 New Revision: 327461 URL: https://svnweb.freebsd.org/changeset/base/327461 Log: Remove sys/mips/rmi. It's been unmaintained since 2011. This hardware is now unobtanium. It's only had API changes in the last 7 years, and is responsible for a very large number of them. In addition, there's a lot of code that reimplements base FreeBSD functionality, diminishing the chances it still works. Without hardware to teset it on, or prospects of obtaining such hardware and without vendor support, it's time to move on. Suggested by: kan@ in mips@ retirement discussion Deleted: head/sys/mips/conf/XLR head/sys/mips/conf/XLR64 head/sys/mips/conf/XLRN32 head/sys/mips/rmi/ From owner-svn-src-head@freebsd.org Mon Jan 1 05:18:29 2018 Return-Path: Delivered-To: svn-src-head@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 7EAD8E88D84; Mon, 1 Jan 2018 05:18:29 +0000 (UTC) (envelope-from imp@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 464127F3E2; Mon, 1 Jan 2018 05:18:29 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w015IS2l049010; Mon, 1 Jan 2018 05:18:28 GMT (envelope-from imp@FreeBSD.org) Received: (from imp@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w015IScZ049009; Mon, 1 Jan 2018 05:18:28 GMT (envelope-from imp@FreeBSD.org) Message-Id: <201801010518.w015IScZ049009@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: imp set sender to imp@FreeBSD.org using -f From: Warner Losh Date: Mon, 1 Jan 2018 05:18:28 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r327462 - in head/sys/mips: adm5120 alchemy idt rt305x X-SVN-Group: head X-SVN-Commit-Author: imp X-SVN-Commit-Paths: in head/sys/mips: adm5120 alchemy idt rt305x X-SVN-Commit-Revision: 327462 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 01 Jan 2018 05:18:29 -0000 Author: imp Date: Mon Jan 1 05:18:28 2018 New Revision: 327462 URL: https://svnweb.freebsd.org/changeset/base/327462 Log: Remove empty directories... silly git svn w/o --rmdir. Deleted: head/sys/mips/adm5120/ head/sys/mips/alchemy/ head/sys/mips/idt/ head/sys/mips/rt305x/ From owner-svn-src-head@freebsd.org Mon Jan 1 08:01:27 2018 Return-Path: Delivered-To: svn-src-head@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 7E1BFEB85C0; Mon, 1 Jan 2018 08:01:27 +0000 (UTC) (envelope-from delphij@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 46D0B3CA0; Mon, 1 Jan 2018 08:01:27 +0000 (UTC) (envelope-from delphij@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w0181QYU016088; Mon, 1 Jan 2018 08:01:26 GMT (envelope-from delphij@FreeBSD.org) Received: (from delphij@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w0181QN6016087; Mon, 1 Jan 2018 08:01:26 GMT (envelope-from delphij@FreeBSD.org) Message-Id: <201801010801.w0181QN6016087@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: delphij set sender to delphij@FreeBSD.org using -f From: Xin LI Date: Mon, 1 Jan 2018 08:01:26 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r327463 - head/lib/libc/gen X-SVN-Group: head X-SVN-Commit-Author: delphij X-SVN-Commit-Paths: head/lib/libc/gen X-SVN-Commit-Revision: 327463 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 01 Jan 2018 08:01:27 -0000 Author: delphij Date: Mon Jan 1 08:01:26 2018 New Revision: 327463 URL: https://svnweb.freebsd.org/changeset/base/327463 Log: Remove unused includes. Modified: head/lib/libc/gen/pw_scan.c Modified: head/lib/libc/gen/pw_scan.c ============================================================================== --- head/lib/libc/gen/pw_scan.c Mon Jan 1 05:18:28 2018 (r327462) +++ head/lib/libc/gen/pw_scan.c Mon Jan 1 08:01:26 2018 (r327463) @@ -44,9 +44,7 @@ __FBSDID("$FreeBSD$"); #include #include -#include #include -#include #include #include #include From owner-svn-src-head@freebsd.org Mon Jan 1 09:41:20 2018 Return-Path: Delivered-To: svn-src-head@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 69148E8A68E; Mon, 1 Jan 2018 09:41:20 +0000 (UTC) (envelope-from delphij@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 408F766352; Mon, 1 Jan 2018 09:41:20 +0000 (UTC) (envelope-from delphij@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w019fJGf058107; Mon, 1 Jan 2018 09:41:19 GMT (envelope-from delphij@FreeBSD.org) Received: (from delphij@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w019fIWb058098; Mon, 1 Jan 2018 09:41:18 GMT (envelope-from delphij@FreeBSD.org) Message-Id: <201801010941.w019fIWb058098@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: delphij set sender to delphij@FreeBSD.org using -f From: Xin LI Date: Mon, 1 Jan 2018 09:41:18 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r327464 - in head/usr.sbin/rpcbind: . tests X-SVN-Group: head X-SVN-Commit-Author: delphij X-SVN-Commit-Paths: in head/usr.sbin/rpcbind: . tests X-SVN-Commit-Revision: 327464 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 01 Jan 2018 09:41:20 -0000 Author: delphij Date: Mon Jan 1 09:41:18 2018 New Revision: 327464 URL: https://svnweb.freebsd.org/changeset/base/327464 Log: Remove unused includes. Modified: head/usr.sbin/rpcbind/check_bound.c head/usr.sbin/rpcbind/rpcb_stat.c head/usr.sbin/rpcbind/rpcb_svc.c head/usr.sbin/rpcbind/rpcb_svc_4.c head/usr.sbin/rpcbind/rpcb_svc_com.c head/usr.sbin/rpcbind/rpcbind.c head/usr.sbin/rpcbind/security.c head/usr.sbin/rpcbind/tests/addrmerge_test.c head/usr.sbin/rpcbind/util.c Modified: head/usr.sbin/rpcbind/check_bound.c ============================================================================== --- head/usr.sbin/rpcbind/check_bound.c Mon Jan 1 08:01:26 2018 (r327463) +++ head/usr.sbin/rpcbind/check_bound.c Mon Jan 1 09:41:18 2018 (r327464) @@ -53,7 +53,6 @@ static char sccsid[] = "@(#)check_bound.c 1.11 89/04/2 #include #include #include -#include #include #include #include Modified: head/usr.sbin/rpcbind/rpcb_stat.c ============================================================================== --- head/usr.sbin/rpcbind/rpcb_stat.c Mon Jan 1 08:01:26 2018 (r327463) +++ head/usr.sbin/rpcbind/rpcb_stat.c Mon Jan 1 09:41:18 2018 (r327464) @@ -40,7 +40,6 @@ * Copyright (c) 1990 by Sun Microsystems, Inc. */ -#include #include #include #include Modified: head/usr.sbin/rpcbind/rpcb_svc.c ============================================================================== --- head/usr.sbin/rpcbind/rpcb_svc.c Mon Jan 1 08:01:26 2018 (r327463) +++ head/usr.sbin/rpcbind/rpcb_svc.c Mon Jan 1 09:41:18 2018 (r327464) @@ -47,8 +47,6 @@ #include #include #include -#include -#include #include #include Modified: head/usr.sbin/rpcbind/rpcb_svc_4.c ============================================================================== --- head/usr.sbin/rpcbind/rpcb_svc_4.c Mon Jan 1 08:01:26 2018 (r327463) +++ head/usr.sbin/rpcbind/rpcb_svc_4.c Mon Jan 1 09:41:18 2018 (r327464) @@ -48,9 +48,7 @@ #include #include #include -#include #include -#include #include #include #include "rpcbind.h" Modified: head/usr.sbin/rpcbind/rpcb_svc_com.c ============================================================================== --- head/usr.sbin/rpcbind/rpcb_svc_com.c Mon Jan 1 08:01:26 2018 (r327463) +++ head/usr.sbin/rpcbind/rpcb_svc_com.c Mon Jan 1 09:41:18 2018 (r327464) @@ -53,7 +53,6 @@ #include #include #include -#include #include #ifdef PORTMAP #include Modified: head/usr.sbin/rpcbind/rpcbind.c ============================================================================== --- head/usr.sbin/rpcbind/rpcbind.c Mon Jan 1 08:01:26 2018 (r327463) +++ head/usr.sbin/rpcbind/rpcbind.c Mon Jan 1 09:41:18 2018 (r327464) @@ -71,7 +71,6 @@ static char sccsid[] = "@(#)rpcbind.c 1.35 89/04/21 Co #include #include #include -#include #include #include #include Modified: head/usr.sbin/rpcbind/security.c ============================================================================== --- head/usr.sbin/rpcbind/security.c Mon Jan 1 08:01:26 2018 (r327463) +++ head/usr.sbin/rpcbind/security.c Mon Jan 1 09:41:18 2018 (r327464) @@ -9,12 +9,9 @@ #include #include #include -#include #include -#include #include #include -#include #include #include Modified: head/usr.sbin/rpcbind/tests/addrmerge_test.c ============================================================================== --- head/usr.sbin/rpcbind/tests/addrmerge_test.c Mon Jan 1 08:01:26 2018 (r327463) +++ head/usr.sbin/rpcbind/tests/addrmerge_test.c Mon Jan 1 09:41:18 2018 (r327464) @@ -40,7 +40,6 @@ #include #include -#include #include Modified: head/usr.sbin/rpcbind/util.c ============================================================================== --- head/usr.sbin/rpcbind/util.c Mon Jan 1 08:01:26 2018 (r327463) +++ head/usr.sbin/rpcbind/util.c Mon Jan 1 09:41:18 2018 (r327464) @@ -42,10 +42,8 @@ #include #include #include -#include #include #include -#include #include #include #include From owner-svn-src-head@freebsd.org Mon Jan 1 18:55:14 2018 Return-Path: Delivered-To: svn-src-head@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 E3D39EB7698; Mon, 1 Jan 2018 18:55:14 +0000 (UTC) (envelope-from imp@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 AE02377DC3; Mon, 1 Jan 2018 18:55:14 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w01ItDfS093035; Mon, 1 Jan 2018 18:55:13 GMT (envelope-from imp@FreeBSD.org) Received: (from imp@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w01ItDg7093034; Mon, 1 Jan 2018 18:55:13 GMT (envelope-from imp@FreeBSD.org) Message-Id: <201801011855.w01ItDg7093034@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: imp set sender to imp@FreeBSD.org using -f From: Warner Losh Date: Mon, 1 Jan 2018 18:55:13 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r327465 - head/share/man/man3 X-SVN-Group: head X-SVN-Commit-Author: imp X-SVN-Commit-Paths: head/share/man/man3 X-SVN-Commit-Revision: 327465 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 01 Jan 2018 18:55:15 -0000 Author: imp Date: Mon Jan 1 18:55:13 2018 New Revision: 327465 URL: https://svnweb.freebsd.org/changeset/base/327465 Log: assert(3) appeared first in the 7th Edition Unix, not the 6th, at least according to the extant distributions preserved at tuhs.org. Obtained from: http://www.tuhs.org/cgi-bin/utree.pl?file=V7/usr/include/assert.h Modified: head/share/man/man3/assert.3 Modified: head/share/man/man3/assert.3 ============================================================================== --- head/share/man/man3/assert.3 Mon Jan 1 09:41:18 2018 (r327464) +++ head/share/man/man3/assert.3 Mon Jan 1 18:55:13 2018 (r327465) @@ -87,4 +87,4 @@ macro conforms to An .Nm macro appeared in -.At v6 . +.At v7 . From owner-svn-src-head@freebsd.org Mon Jan 1 18:59:12 2018 Return-Path: Delivered-To: svn-src-head@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 F261AEB788F; Mon, 1 Jan 2018 18:59:12 +0000 (UTC) (envelope-from imp@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 BCC4D78130; Mon, 1 Jan 2018 18:59:12 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w01IxBT6093205; Mon, 1 Jan 2018 18:59:11 GMT (envelope-from imp@FreeBSD.org) Received: (from imp@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w01IxBCZ093204; Mon, 1 Jan 2018 18:59:11 GMT (envelope-from imp@FreeBSD.org) Message-Id: <201801011859.w01IxBCZ093204@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: imp set sender to imp@FreeBSD.org using -f From: Warner Losh Date: Mon, 1 Jan 2018 18:59:11 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r327466 - head/share/man/man3 X-SVN-Group: head X-SVN-Commit-Author: imp X-SVN-Commit-Paths: head/share/man/man3 X-SVN-Commit-Revision: 327466 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 01 Jan 2018 18:59:13 -0000 Author: imp Date: Mon Jan 1 18:59:11 2018 New Revision: 327466 URL: https://svnweb.freebsd.org/changeset/base/327466 Log: Add note that assert.h may be included multiple times with and without NDEBUG defined. Modified: head/share/man/man3/assert.3 Modified: head/share/man/man3/assert.3 ============================================================================== --- head/share/man/man3/assert.3 Mon Jan 1 18:55:13 2018 (r327465) +++ head/share/man/man3/assert.3 Mon Jan 1 18:59:11 2018 (r327466) @@ -28,7 +28,7 @@ .\" @(#)assert.3 8.1 (Berkeley) 6/9/93 .\" $FreeBSD$ .\" -.Dd January 26, 1999 +.Dd January 1, 2018 .Dt ASSERT 3 .Os .Sh NAME @@ -68,6 +68,14 @@ as a macro .Xr cc 1 option .Fl D Ns Dv NDEBUG ) . +Unlike most other include files, +.In assert.h +may be included multiple times. +Each time whether or not +.Dv NDEBUG +is defined determines the behavior of assert from that point forward +in the compilation unit until the end of file or another include of +.In assert.h . .Sh EXAMPLES The assertion: .Pp From owner-svn-src-head@freebsd.org Mon Jan 1 19:04:42 2018 Return-Path: Delivered-To: svn-src-head@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 5776EEB7C71; Mon, 1 Jan 2018 19:04:42 +0000 (UTC) (envelope-from imp@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 21552785BE; Mon, 1 Jan 2018 19:04:42 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w01J4ftL097071; Mon, 1 Jan 2018 19:04:41 GMT (envelope-from imp@FreeBSD.org) Received: (from imp@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w01J4fUs097070; Mon, 1 Jan 2018 19:04:41 GMT (envelope-from imp@FreeBSD.org) Message-Id: <201801011904.w01J4fUs097070@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: imp set sender to imp@FreeBSD.org using -f From: Warner Losh Date: Mon, 1 Jan 2018 19:04:41 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r327467 - head/share/man/man3 X-SVN-Group: head X-SVN-Commit-Author: imp X-SVN-Commit-Paths: head/share/man/man3 X-SVN-Commit-Revision: 327467 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 01 Jan 2018 19:04:42 -0000 Author: imp Date: Mon Jan 1 19:04:40 2018 New Revision: 327467 URL: https://svnweb.freebsd.org/changeset/base/327467 Log: Be less verbose and more precise. Modified: head/share/man/man3/assert.3 Modified: head/share/man/man3/assert.3 ============================================================================== --- head/share/man/man3/assert.3 Mon Jan 1 18:59:11 2018 (r327466) +++ head/share/man/man3/assert.3 Mon Jan 1 19:04:40 2018 (r327467) @@ -74,7 +74,7 @@ may be included multiple times. Each time whether or not .Dv NDEBUG is defined determines the behavior of assert from that point forward -in the compilation unit until the end of file or another include of +until the end of the unit or another include of .In assert.h . .Sh EXAMPLES The assertion: From owner-svn-src-head@freebsd.org Mon Jan 1 19:27:34 2018 Return-Path: Delivered-To: svn-src-head@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 A1425EB8BBB; Mon, 1 Jan 2018 19:27:34 +0000 (UTC) (envelope-from kib@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 6C0B079208; Mon, 1 Jan 2018 19:27:34 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w01JRXrQ005676; Mon, 1 Jan 2018 19:27:33 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w01JRXxp005675; Mon, 1 Jan 2018 19:27:33 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201801011927.w01JRXxp005675@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Mon, 1 Jan 2018 19:27:33 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r327468 - head/sys/vm X-SVN-Group: head X-SVN-Commit-Author: kib X-SVN-Commit-Paths: head/sys/vm X-SVN-Commit-Revision: 327468 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 01 Jan 2018 19:27:34 -0000 Author: kib Date: Mon Jan 1 19:27:33 2018 New Revision: 327468 URL: https://svnweb.freebsd.org/changeset/base/327468 Log: Do not let vm_daemon run unbounded. On a load where single anonymous object consumes almost all memory on the large system, swapout code executes the iteration over the corresponding object page queue for long time, owning the map and object locks. This blocks pagedaemon which tries to lock the object, and blocks other threads in the process in vm_fault() waiting for the map lock. Handle the issue by terminating the deactivation loop if we executed too long and by yielding at the top level in vm_daemon. Reported by: peterj, pho Reviewed by: alc Tested by: pho (as part of the larger patch) Sponsored by: The FreeBSD Foundation MFC after: 1 week Differential revision: https://reviews.freebsd.org/D13671 Modified: head/sys/vm/vm_swapout.c Modified: head/sys/vm/vm_swapout.c ============================================================================== --- head/sys/vm/vm_swapout.c Mon Jan 1 19:04:40 2018 (r327467) +++ head/sys/vm/vm_swapout.c Mon Jan 1 19:27:33 2018 (r327468) @@ -203,6 +203,8 @@ vm_swapout_object_deactivate_pages(pmap_t pmap, vm_obj TAILQ_FOREACH(p, &object->memq, listq) { if (pmap_resident_count(pmap) <= desired) goto unlock_return; + if (should_yield()) + goto unlock_return; if (vm_page_busied(p)) continue; VM_CNT_INC(v_pdpages); @@ -516,8 +518,10 @@ again: PRELE(p); } sx_sunlock(&allproc_lock); - if (tryagain != 0 && attempts <= 10) + if (tryagain != 0 && attempts <= 10) { + maybe_yield(); goto again; + } } } From owner-svn-src-head@freebsd.org Mon Jan 1 19:34:20 2018 Return-Path: Delivered-To: svn-src-head@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 9D54DEB9137; Mon, 1 Jan 2018 19:34:20 +0000 (UTC) (envelope-from kib@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 67F5A7997D; Mon, 1 Jan 2018 19:34:20 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w01JYJI5009792; Mon, 1 Jan 2018 19:34:19 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w01JYJG9009791; Mon, 1 Jan 2018 19:34:19 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201801011934.w01JYJG9009791@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Mon, 1 Jan 2018 19:34:19 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r327469 - head/sys/x86/include X-SVN-Group: head X-SVN-Commit-Author: kib X-SVN-Commit-Paths: head/sys/x86/include X-SVN-Commit-Revision: 327469 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 01 Jan 2018 19:34:20 -0000 Author: kib Date: Mon Jan 1 19:34:19 2018 New Revision: 327469 URL: https://svnweb.freebsd.org/changeset/base/327469 Log: Add CR4.SMAP control bit. Sponsored by: The FreeBSD Foundation MFC after: 3 days Modified: head/sys/x86/include/specialreg.h Modified: head/sys/x86/include/specialreg.h ============================================================================== --- head/sys/x86/include/specialreg.h Mon Jan 1 19:27:33 2018 (r327468) +++ head/sys/x86/include/specialreg.h Mon Jan 1 19:34:19 2018 (r327469) @@ -76,6 +76,7 @@ #define CR4_PCIDE 0x00020000 /* Enable Context ID */ #define CR4_XSAVE 0x00040000 /* XSETBV/XGETBV */ #define CR4_SMEP 0x00100000 /* Supervisor-Mode Execution Prevention */ +#define CR4_SMAP 0x00200000 /* Supervisor-Mode Access Prevention */ /* * Bits in AMD64 special registers. EFER is 64 bits wide. From owner-svn-src-head@freebsd.org Mon Jan 1 20:47:04 2018 Return-Path: Delivered-To: svn-src-head@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 A9E23EBBFAC; Mon, 1 Jan 2018 20:47:04 +0000 (UTC) (envelope-from kib@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 71B267D020; Mon, 1 Jan 2018 20:47:04 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w01Kl3hm040167; Mon, 1 Jan 2018 20:47:03 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w01Kl3Kq040165; Mon, 1 Jan 2018 20:47:03 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201801012047.w01Kl3Kq040165@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Mon, 1 Jan 2018 20:47:03 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r327472 - in head/sys: amd64/amd64 i386/i386 X-SVN-Group: head X-SVN-Commit-Author: kib X-SVN-Commit-Paths: in head/sys: amd64/amd64 i386/i386 X-SVN-Commit-Revision: 327472 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 01 Jan 2018 20:47:04 -0000 Author: kib Date: Mon Jan 1 20:47:03 2018 New Revision: 327472 URL: https://svnweb.freebsd.org/changeset/base/327472 Log: Avoid re-check of usermode condition. It does not change anything in the behavior of trap_pfault(), while eliminating obfuscation of jumping to the code which checks for the condition reversed of the goto cause. Also avoid force initialize the rv variable, since it is now only accessed after storing vm_fault() return value. Reviewed by: alc Sponsored by: The FreeBSD Foundation MFC after: 1 week Differential revision: https://reviews.freebsd.org/D13725 Modified: head/sys/amd64/amd64/trap.c head/sys/i386/i386/trap.c Modified: head/sys/amd64/amd64/trap.c ============================================================================== --- head/sys/amd64/amd64/trap.c Mon Jan 1 20:39:12 2018 (r327471) +++ head/sys/amd64/amd64/trap.c Mon Jan 1 20:47:03 2018 (r327472) @@ -608,7 +608,6 @@ trap_pfault(struct trapframe *frame, int usermode) td = curthread; p = td->td_proc; eva = frame->tf_addr; - rv = 0; if (__predict_false((td->td_pflags & TDP_NOFAULTING) != 0)) { /* @@ -660,7 +659,7 @@ trap_pfault(struct trapframe *frame, int usermode) * Don't allow user-mode faults in kernel address space. */ if (usermode) - goto nogo; + return (SIGSEGV); map = kernel_map; } else { @@ -715,7 +714,6 @@ trap_pfault(struct trapframe *frame, int usermode) #endif return (0); } -nogo: if (!usermode) { if (td->td_intr_nesting_level == 0 && curpcb->pcb_onfault != NULL) { Modified: head/sys/i386/i386/trap.c ============================================================================== --- head/sys/i386/i386/trap.c Mon Jan 1 20:39:12 2018 (r327471) +++ head/sys/i386/i386/trap.c Mon Jan 1 20:47:03 2018 (r327472) @@ -744,7 +744,6 @@ trap_pfault(struct trapframe *frame, int usermode, vm_ td = curthread; p = td->td_proc; - rv = 0; if (__predict_false((td->td_pflags & TDP_NOFAULTING) != 0)) { /* @@ -805,7 +804,7 @@ trap_pfault(struct trapframe *frame, int usermode, vm_ return (-2); #endif if (usermode) - goto nogo; + return (SIGSEGV); map = kernel_map; } else { @@ -862,7 +861,6 @@ trap_pfault(struct trapframe *frame, int usermode, vm_ #endif return (0); } -nogo: if (!usermode) { if (td->td_intr_nesting_level == 0 && curpcb->pcb_onfault != NULL) { From owner-svn-src-head@freebsd.org Mon Jan 1 21:25:02 2018 Return-Path: Delivered-To: svn-src-head@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 8600EE81F48; Mon, 1 Jan 2018 21:25:02 +0000 (UTC) (envelope-from antoine@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 501847F31E; Mon, 1 Jan 2018 21:25:02 +0000 (UTC) (envelope-from antoine@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w01LP1pv058473; Mon, 1 Jan 2018 21:25:01 GMT (envelope-from antoine@FreeBSD.org) Received: (from antoine@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w01LP18T058472; Mon, 1 Jan 2018 21:25:01 GMT (envelope-from antoine@FreeBSD.org) Message-Id: <201801012125.w01LP18T058472@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: antoine set sender to antoine@FreeBSD.org using -f From: Antoine Brodin Date: Mon, 1 Jan 2018 21:25:01 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r327473 - head/sys/kern X-SVN-Group: head X-SVN-Commit-Author: antoine X-SVN-Commit-Paths: head/sys/kern X-SVN-Commit-Revision: 327473 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 01 Jan 2018 21:25:02 -0000 Author: antoine Date: Mon Jan 1 21:25:01 2018 New Revision: 327473 URL: https://svnweb.freebsd.org/changeset/base/327473 Log: sysctl_kern_proc_args: do not take the fast path if p_args is NULL In this case it falls back to reading ps_strings Modified: head/sys/kern/kern_proc.c Modified: head/sys/kern/kern_proc.c ============================================================================== --- head/sys/kern/kern_proc.c Mon Jan 1 20:47:03 2018 (r327472) +++ head/sys/kern/kern_proc.c Mon Jan 1 21:25:01 2018 (r327473) @@ -1920,11 +1920,9 @@ sysctl_kern_proc_args(SYSCTL_HANDLER_ARGS) * is nobody to modify pargs, thus we can just read. */ p = curproc; - if (pid == p->p_pid && p->p_numthreads == 1 && req->newptr == NULL) { - if ((pa = p->p_args) != NULL) - error = SYSCTL_OUT(req, pa->ar_args, pa->ar_length); - return (error); - } + if (pid == p->p_pid && p->p_numthreads == 1 && req->newptr == NULL && + (pa = p->p_args) != NULL) + return (SYSCTL_OUT(req, pa->ar_args, pa->ar_length)); flags = PGET_CANSEE; if (req->newptr != NULL) From owner-svn-src-head@freebsd.org Mon Jan 1 22:10:22 2018 Return-Path: Delivered-To: svn-src-head@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 91183E8637B; Mon, 1 Jan 2018 22:10:22 +0000 (UTC) (envelope-from eadler@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 5AB1680A5A; Mon, 1 Jan 2018 22:10:22 +0000 (UTC) (envelope-from eadler@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w01MALex075085; Mon, 1 Jan 2018 22:10:21 GMT (envelope-from eadler@FreeBSD.org) Received: (from eadler@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w01MALrB075084; Mon, 1 Jan 2018 22:10:21 GMT (envelope-from eadler@FreeBSD.org) Message-Id: <201801012210.w01MALrB075084@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: eadler set sender to eadler@FreeBSD.org using -f From: Eitan Adler Date: Mon, 1 Jan 2018 22:10:21 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r327474 - head/usr.sbin/bsdinstall/scripts X-SVN-Group: head X-SVN-Commit-Author: eadler X-SVN-Commit-Paths: head/usr.sbin/bsdinstall/scripts X-SVN-Commit-Revision: 327474 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 01 Jan 2018 22:10:22 -0000 Author: eadler Date: Mon Jan 1 22:10:21 2018 New Revision: 327474 URL: https://svnweb.freebsd.org/changeset/base/327474 Log: bsdinstall: inform users that typing will not be visible Some users, especially those that are new, might be confused when passwd does not echo anything. Inform users that the password will not be visible. PR: 196113 Submitted by: Byron Grobe Modified: head/usr.sbin/bsdinstall/scripts/rootpass Modified: head/usr.sbin/bsdinstall/scripts/rootpass ============================================================================== --- head/usr.sbin/bsdinstall/scripts/rootpass Mon Jan 1 21:25:01 2018 (r327473) +++ head/usr.sbin/bsdinstall/scripts/rootpass Mon Jan 1 22:10:21 2018 (r327474) @@ -32,5 +32,6 @@ echo "========================" echo echo "Please select a password for the system management account (root):" +echo "Typed characters will not be visible." chroot $BSDINSTALL_CHROOT passwd root 2>&1 From owner-svn-src-head@freebsd.org Mon Jan 1 22:31:54 2018 Return-Path: Delivered-To: svn-src-head@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 4CDE9E8756C; Mon, 1 Jan 2018 22:31:54 +0000 (UTC) (envelope-from jilles@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 2474118E8; Mon, 1 Jan 2018 22:31:54 +0000 (UTC) (envelope-from jilles@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w01MVrJ3084400; Mon, 1 Jan 2018 22:31:53 GMT (envelope-from jilles@FreeBSD.org) Received: (from jilles@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w01MVrs5084398; Mon, 1 Jan 2018 22:31:53 GMT (envelope-from jilles@FreeBSD.org) Message-Id: <201801012231.w01MVrs5084398@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jilles set sender to jilles@FreeBSD.org using -f From: Jilles Tjoelker Date: Mon, 1 Jan 2018 22:31:53 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r327475 - head/bin/sh X-SVN-Group: head X-SVN-Commit-Author: jilles X-SVN-Commit-Paths: head/bin/sh X-SVN-Commit-Revision: 327475 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 01 Jan 2018 22:31:54 -0000 Author: jilles Date: Mon Jan 1 22:31:52 2018 New Revision: 327475 URL: https://svnweb.freebsd.org/changeset/base/327475 Log: sh: Move various structs from jobs.h to jobs.c These implementation details of jobs.c need not be exposed. Modified: head/bin/sh/jobs.c head/bin/sh/jobs.h Modified: head/bin/sh/jobs.c ============================================================================== --- head/bin/sh/jobs.c Mon Jan 1 22:10:21 2018 (r327474) +++ head/bin/sh/jobs.c Mon Jan 1 22:31:52 2018 (r327475) @@ -75,6 +75,42 @@ __FBSDID("$FreeBSD$"); #include "builtins.h" +/* + * A job structure contains information about a job. A job is either a + * single process or a set of processes contained in a pipeline. In the + * latter case, pidlist will be non-NULL, and will point to a -1 terminated + * array of pids. + */ + +struct procstat { + pid_t pid; /* process id */ + int status; /* status flags (defined above) */ + char *cmd; /* text of command being run */ +}; + + +/* states */ +#define JOBSTOPPED 1 /* all procs are stopped */ +#define JOBDONE 2 /* all procs are completed */ + + +struct job { + struct procstat ps0; /* status of process */ + struct procstat *ps; /* status or processes when more than one */ + short nprocs; /* number of processes */ + pid_t pgrp; /* process group of this job */ + char state; /* true if job is finished */ + char used; /* true if this entry is in used */ + char changed; /* true if status has changed */ + char foreground; /* true if running in the foreground */ + char remembered; /* true if $! referenced */ +#if JOBS + char jobctl; /* job running under job control */ + struct job *next; /* job used after this one */ +#endif +}; + + static struct job *jobtab; /* array of jobs */ static int njobs; /* size of array */ static pid_t backgndpid = -1; /* pid of last background process */ Modified: head/bin/sh/jobs.h ============================================================================== --- head/bin/sh/jobs.h Mon Jan 1 22:10:21 2018 (r327474) +++ head/bin/sh/jobs.h Mon Jan 1 22:31:52 2018 (r327475) @@ -40,40 +40,7 @@ #include /* for sig_atomic_t */ -/* - * A job structure contains information about a job. A job is either a - * single process or a set of processes contained in a pipeline. In the - * latter case, pidlist will be non-NULL, and will point to a -1 terminated - * array of pids. - */ - -struct procstat { - pid_t pid; /* process id */ - int status; /* status flags (defined above) */ - char *cmd; /* text of command being run */ -}; - - -/* states */ -#define JOBSTOPPED 1 /* all procs are stopped */ -#define JOBDONE 2 /* all procs are completed */ - - -struct job { - struct procstat ps0; /* status of process */ - struct procstat *ps; /* status or processes when more than one */ - short nprocs; /* number of processes */ - pid_t pgrp; /* process group of this job */ - char state; /* true if job is finished */ - char used; /* true if this entry is in used */ - char changed; /* true if status has changed */ - char foreground; /* true if running in the foreground */ - char remembered; /* true if $! referenced */ -#if JOBS - char jobctl; /* job running under job control */ - struct job *next; /* job used after this one */ -#endif -}; +struct job; enum { SHOWJOBS_DEFAULT, /* job number, status, command */ From owner-svn-src-head@freebsd.org Mon Jan 1 22:33:59 2018 Return-Path: Delivered-To: svn-src-head@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 25C50E876D0; Mon, 1 Jan 2018 22:33:59 +0000 (UTC) (envelope-from eadler@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 F1CFA1ADC; Mon, 1 Jan 2018 22:33:58 +0000 (UTC) (envelope-from eadler@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w01MXwxa087384; Mon, 1 Jan 2018 22:33:58 GMT (envelope-from eadler@FreeBSD.org) Received: (from eadler@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w01MXvXw087382; Mon, 1 Jan 2018 22:33:57 GMT (envelope-from eadler@FreeBSD.org) Message-Id: <201801012233.w01MXvXw087382@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: eadler set sender to eadler@FreeBSD.org using -f From: Eitan Adler Date: Mon, 1 Jan 2018 22:33:57 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r327476 - head/sbin/shutdown X-SVN-Group: head X-SVN-Commit-Author: eadler X-SVN-Commit-Paths: head/sbin/shutdown X-SVN-Commit-Revision: 327476 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 01 Jan 2018 22:33:59 -0000 Author: eadler Date: Mon Jan 1 22:33:57 2018 New Revision: 327476 URL: https://svnweb.freebsd.org/changeset/base/327476 Log: shutdown: Assume absolute time is in the future The original bug describes it best: When an absolute time is specified to shutdown, the program's behavior depends on whether that time has passed during the current calendar day. POLA would suggest that for shutdown, whose time argument is always supposed to be in the future, absolute times specified without a specific date should refer to the next occurrence of that time, rather than erroring out if that time has already passed during the current day. PR: 32411 Submitted by: wollman@khavrinen.lcs.mit.edu Submitted on: 2001-11-30 20:30:01 UTC Reviewed by: asmodai (at time of bug submission) Modified: head/sbin/shutdown/shutdown.8 head/sbin/shutdown/shutdown.c Modified: head/sbin/shutdown/shutdown.8 ============================================================================== --- head/sbin/shutdown/shutdown.8 Mon Jan 1 22:31:52 2018 (r327475) +++ head/sbin/shutdown/shutdown.8 Mon Jan 1 22:33:57 2018 (r327476) @@ -28,7 +28,7 @@ .\" @(#)shutdown.8 8.2 (Berkeley) 4/27/95 .\" $FreeBSD$ .\" -.Dd October 23, 2017 +.Dd January 1, 2018 .Dt SHUTDOWN 8 .Os .Sh NAME @@ -138,6 +138,14 @@ suffix: .Dq Li min . .Dq Li h , .Dq Li hour . +.Pp +If an absolute time is specified, but not a date, +and that time today has already passed, +.Nm +will assume that the same time tomorrow was meant. +(If a complete date is specified which has already passed, +.Nm +will print an error and exit without shutting the system down.) .It Ar warning-message Any other arguments comprise the warning message that is broadcast to users currently logged into the system. Modified: head/sbin/shutdown/shutdown.c ============================================================================== --- head/sbin/shutdown/shutdown.c Mon Jan 1 22:31:52 2018 (r327475) +++ head/sbin/shutdown/shutdown.c Mon Jan 1 22:33:57 2018 (r327476) @@ -431,7 +431,7 @@ getoffset(char *timearg) struct tm *lt; char *p; time_t now; - int this_year; + int this_year, maybe_today; char *timeunit; (void)time(&now); @@ -503,6 +503,7 @@ getoffset(char *timearg) badtime(); /* FALLTHROUGH */ case 6: + maybe_today = 0; lt->tm_mday = ATOI2(timearg); if (lt->tm_mday < 1 || lt->tm_mday > 31) badtime(); @@ -517,8 +518,23 @@ getoffset(char *timearg) lt->tm_sec = 0; if ((shuttime = mktime(lt)) == -1) badtime(); - if ((offset = shuttime - now) < 0) - errx(1, "that time is already past."); + + if ((offset = shuttime - now) < 0) { + if (!maybe_today) + errx(1, "that time is already past."); + + /* + * If the user only gave a time, assume that + * any time earlier than the current time + * was intended to be that time tomorrow. + */ + lt->tm_mday++; + if ((shuttime = mktime(lt)) == -1) + badtime(); + if ((offset = shuttime - now) < 0) { + errx(1, "tomorrow is before today?"); + } + } break; default: badtime(); From owner-svn-src-head@freebsd.org Mon Jan 1 22:40:40 2018 Return-Path: Delivered-To: svn-src-head@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 1285CE87B62 for ; Mon, 1 Jan 2018 22:40:40 +0000 (UTC) (envelope-from ian@freebsd.org) Received: from outbound1b.ore.mailhop.org (outbound1b.ore.mailhop.org [54.200.247.200]) (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 EB1AE1E79 for ; Mon, 1 Jan 2018 22:40:39 +0000 (UTC) (envelope-from ian@freebsd.org) X-MHO-User: bcd6abae-ef44-11e7-8486-0934409070aa X-Report-Abuse-To: https://support.duocircle.com/support/solutions/articles/5000540958-duocircle-standard-smtp-abuse-information X-Originating-IP: 73.78.92.27 X-Mail-Handler: DuoCircle Outbound SMTP Received: from ilsoft.org (unknown [73.78.92.27]) by outbound1.ore.mailhop.org (Halon) with ESMTPSA id bcd6abae-ef44-11e7-8486-0934409070aa; Mon, 01 Jan 2018 22:40:16 +0000 (UTC) Received: from rev (rev [172.22.42.240]) by ilsoft.org (8.15.2/8.15.2) with ESMTP id w01MeURK011136; Mon, 1 Jan 2018 15:40:30 -0700 (MST) (envelope-from ian@freebsd.org) Message-ID: <1514846430.12000.44.camel@freebsd.org> Subject: Re: svn commit: r327476 - head/sbin/shutdown From: Ian Lepore To: Eitan Adler , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Date: Mon, 01 Jan 2018 15:40:30 -0700 In-Reply-To: <201801012233.w01MXvXw087382@repo.freebsd.org> References: <201801012233.w01MXvXw087382@repo.freebsd.org> Content-Type: text/plain; charset="ISO-8859-1" X-Mailer: Evolution 3.18.5.1 FreeBSD GNOME Team Port Mime-Version: 1.0 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 01 Jan 2018 22:40:40 -0000 On Mon, 2018-01-01 at 22:33 +0000, Eitan Adler wrote: > Author: eadler > Date: Mon Jan  1 22:33:57 2018 > New Revision: 327476 > URL: https://svnweb.freebsd.org/changeset/base/327476 > > Log: >   shutdown: Assume absolute time is in the future > [...] > Modified: head/sbin/shutdown/shutdown.c > ============================================================================== > --- head/sbin/shutdown/shutdown.c Mon Jan  1 22:31:52 2018 (r327475) > +++ head/sbin/shutdown/shutdown.c Mon Jan  1 22:33:57 2018 (r327476) > @@ -431,7 +431,7 @@ getoffset(char *timearg) >   struct tm *lt; >   char *p; >   time_t now; > - int this_year; > + int this_year, maybe_today; >   char *timeunit; >   >   (void)time(&now); > @@ -503,6 +503,7 @@ getoffset(char *timearg) >   badtime(); >   /* FALLTHROUGH */ >   case 6: > + maybe_today = 0; >   lt->tm_mday = ATOI2(timearg); >   if (lt->tm_mday < 1 || lt->tm_mday > 31) >   badtime(); > @@ -517,8 +518,23 @@ getoffset(char *timearg) >   lt->tm_sec = 0; >   if ((shuttime = mktime(lt)) == -1) >   badtime(); > - if ((offset = shuttime - now) < 0) > - errx(1, "that time is already past."); > + > + if ((offset = shuttime - now) < 0) { > + if (!maybe_today) > + errx(1, "that time is already past."); > + > + /* > +  * If the user only gave a time, assume that > +  * any time earlier than the current time > +  * was intended to be that time tomorrow. > +  */ > + lt->tm_mday++; > + if ((shuttime = mktime(lt)) == -1) > + badtime(); > + if ((offset = shuttime - now) < 0) { > + errx(1, "tomorrow is before today?"); > + } > + } >   break; >   default: >   badtime(); > Where does maybe_today ever get set to non-zero? -- Ian From owner-svn-src-head@freebsd.org Mon Jan 1 22:54:20 2018 Return-Path: Delivered-To: svn-src-head@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 074DCE89774; Mon, 1 Jan 2018 22:54:20 +0000 (UTC) (envelope-from jilles@stack.nl) Received: from mailout.stack.nl (mailout05.stack.nl [131.155.140.202]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "*.stack.nl", Issuer "COMODO RSA Domain Validation Secure Server CA" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id B880827D8; Mon, 1 Jan 2018 22:54:18 +0000 (UTC) (envelope-from jilles@stack.nl) Received: from toad2.stack.nl (toad2.stack.nl [IPv6:2001:610:1108:5010::161]) by mailout.stack.nl (Postfix) with ESMTP id 0A3EA35; Mon, 1 Jan 2018 23:54:09 +0100 (CET) Received: by toad2.stack.nl (Postfix, from userid 1677) id F2544892CC; Mon, 1 Jan 2018 23:54:08 +0100 (CET) Date: Mon, 1 Jan 2018 23:54:08 +0100 From: Jilles Tjoelker To: Antoine Brodin Cc: Mateusz Guzik , David Chisnall , src-committers , svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r325726 - head/sys/kern Message-ID: <20180101225408.GA78160@stack.nl> References: <201711112239.vABMdXS2053880@repo.freebsd.org> <20171228162525.GA32705@stack.nl> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20171228162525.GA32705@stack.nl> User-Agent: Mutt/1.8.0 (2017-02-23) X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 01 Jan 2018 22:54:20 -0000 On Thu, Dec 28, 2017 at 05:25:25PM +0100, Jilles Tjoelker wrote: > On Thu, Dec 28, 2017 at 12:40:31PM +0000, Antoine Brodin wrote: > > On Sat, Nov 11, 2017 at 10:39 PM, Mateusz Guzik wrote: > > > Author: mjg > > > Date: Sat Nov 11 22:39:33 2017 > > > New Revision: 325726 > > > URL: https://svnweb.freebsd.org/changeset/base/325726 > > > Log: > > > Avoid locking and refing in sysctl_kern_proc_args if possible. > > > Turns out the sysctl is called a lot e.g. by pkg-static. > > > Modified: > > > head/sys/kern/kern_proc.c > > There is a regression after this commit: x11-toolkits/gnustep-gui no > > longer builds. > > You can find a failure log at > > http://pb2.nyi.freebsd.org/data/111i386-default-PR224618/2017-12-28_12h28m51s/logs/errors/gnustep-gui-0.25.1_3.log > > The failure seems to be from lang/gnustep-base: > > /* get the argument vectors */ > > vectors = kvm_getargv(kptr, proc_ptr, 0); > It looks like the new fast path only works properly if p->p_args is not > NULL. If p->p_args is NULL, this usually means that the arguments are > longer than ps_arg_cache_limit and must be retrieved from (pageable) > process memory and not wired p->p_args->ar_args. It is possible to > duplicate that piece of code as well but that is probably not worth it. I created a review that fixes the problem, but I am not completely sure that it preserves the original intent of the optimization: https://reviews.freebsd.org/D13729 -- Jilles Tjoelker From owner-svn-src-head@freebsd.org Mon Jan 1 23:05:17 2018 Return-Path: Delivered-To: svn-src-head@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 DD0F1E89FE7 for ; Mon, 1 Jan 2018 23:05:17 +0000 (UTC) (envelope-from lists@eitanadler.com) Received: from mail-yb0-x22b.google.com (mail-yb0-x22b.google.com [IPv6:2607:f8b0:4002:c09::22b]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 930A02F18 for ; Mon, 1 Jan 2018 23:05:17 +0000 (UTC) (envelope-from lists@eitanadler.com) Received: by mail-yb0-x22b.google.com with SMTP id f201so6201938ybg.6 for ; Mon, 01 Jan 2018 15:05:17 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=eitanadler.com; s=0xdeadbeef; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to:cc; bh=aDMRSEmxdr8Bj6mMh0fb14D/Bay01YZngOSCQ6YBtvg=; b=m9wMLd+KEfwpRcU+c/V+E8zyOZQ2eQwhSbDBsJRuoKattWTgPbaiugOkbSWIxp4kCd gCGwTKRiFKx0+WwnSf+czs12xxwxQykdaFq6gKR0k/jPisBl2IkooK26dA7lA3n1TvEf QsxSzL6uTh5kEXKibGXwJVUkXCRkPrUcq42hE= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd-org.20150623.gappssmtp.com; s=20150623; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to:cc; bh=aDMRSEmxdr8Bj6mMh0fb14D/Bay01YZngOSCQ6YBtvg=; b=0P86y3RPPaL2O4CJKr6mFM1Ci43free64KQ7zzQeEjwIiLP/d4A/NckuJey2W0/W3T JEiqGqPYz7b33Xp4Gj045XRbkfnRYA+mVnQHajfggBV0FttdeAaZj5Dw9qXej7aW8utO Va86U0xlq9wkNA1QyrXj8fpn6Bt13DAn0Ec8O4xR4GQcswG+eMEVII/fGv49LHGHSb1X 2kLxy6+V3JtZseMWQlRYShQrZPtewRjWgFndt8LAxXLyg4RKjAaDPRDtmz7eD26fEwry NV9llsXv3mweD+75SbrcUxS8caKVvbFQ2+YcNIcvGenEbGnHIu1FIVWJJhDG3Rwx/Ern 6ZhA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:sender:in-reply-to:references:from :date:message-id:subject:to:cc; bh=aDMRSEmxdr8Bj6mMh0fb14D/Bay01YZngOSCQ6YBtvg=; b=FeI4xPvIrYla13em5vy2Kx8ki5LeyzF7hoD4yD+1RnueMhnjRMHyM89eMRLXz1GZ9o 7isIus8HGzlWSYRZla/lOwZneY2a5MM4zP0HhY8+OsaxDlDLv1NOTUNyBm941mFKgKbg RNiHvcdl1VTdTksVT9zKuFPGN5CtCryFoFJOSX9T88yq8EGxwAavF9ZD5jAYZsrWZMz9 0sKb3RSEL0BNAa1mcQdnEtwnIqWt5E/SanWk30RfUojoNTXaaWcRINhkcbff6KrWWL+b jcjpXbHrQa6scZt49ictpKbolXYkAtWU6Odr+fCnpcGR8yB71W7gSHrm6JM2Ph3fkhQ8 RxXA== X-Gm-Message-State: AKGB3mI1nJ4SUDUxRDWRFX1cWAqP73c7VsMrpfDz5qKaTLqFMLJag6rT 9ctOUEJ0gvvtJQYHSSe8qbI/FX9g5qPrzRBqa+LYXg== X-Google-Smtp-Source: ACJfBot+hPPpzgY5uexrg1WhtXS0UcW9TH4zTv2+OKKfTtWYCl/spGg1aeSCg4UMufxw9ZLahQCRV9LkXJLd+YymFh8= X-Received: by 10.37.210.216 with SMTP id j207mr24073907ybg.517.1514847916762; Mon, 01 Jan 2018 15:05:16 -0800 (PST) MIME-Version: 1.0 Sender: lists@eitanadler.com Received: by 10.37.217.21 with HTTP; Mon, 1 Jan 2018 15:05:16 -0800 (PST) In-Reply-To: <1514846430.12000.44.camel@freebsd.org> References: <201801012233.w01MXvXw087382@repo.freebsd.org> <1514846430.12000.44.camel@freebsd.org> From: Eitan Adler Date: Mon, 1 Jan 2018 15:05:16 -0800 X-Google-Sender-Auth: O-3yNZWon1b2bkUaRcAf1FC88yM Message-ID: Subject: Re: svn commit: r327476 - head/sbin/shutdown To: Ian Lepore Cc: "src-committers@freebsd.org" , "svn-src-all@freebsd.org" , "svn-src-head@freebsd.org" Content-Type: text/plain; charset="UTF-8" X-Content-Filtered-By: Mailman/MimeDel 2.1.25 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 01 Jan 2018 23:05:18 -0000 On Monday, 1 January 2018, Ian Lepore wrote: > On Mon, 2018-01-01 at 22:33 +0000, Eitan Adler wrote: > > Author: eadler > > Date: Mon Jan 1 22:33:57 2018 > > New Revision: 327476 > > URL: https://svnweb.freebsd.org/changeset/base/327476 > > > > Log: > > shutdown: Assume absolute time is in the future > > > [...] > > Modified: head/sbin/shutdown/shutdown.c > > ============================================================ > ================== > > --- head/sbin/shutdown/shutdown.c Mon Jan 1 22:31:52 2018 > (r327475) > > +++ head/sbin/shutdown/shutdown.c Mon Jan 1 22:33:57 2018 > (r327476) > > @@ -431,7 +431,7 @@ getoffset(char *timearg) > > struct tm *lt; > > char *p; > > time_t now; > > - int this_year; > > + int this_year, maybe_today; > > char *timeunit; > > > > (void)time(&now); > > @@ -503,6 +503,7 @@ getoffset(char *timearg) > > badtime(); > > /* FALLTHROUGH */ > > case 6: > > + maybe_today = 0; > > lt->tm_mday = ATOI2(timearg); > > if (lt->tm_mday < 1 || lt->tm_mday > 31) > > badtime(); > > @@ -517,8 +518,23 @@ getoffset(char *timearg) > > lt->tm_sec = 0; > > if ((shuttime = mktime(lt)) == -1) > > badtime(); > > - if ((offset = shuttime - now) < 0) > > - errx(1, "that time is already past."); > > + > > + if ((offset = shuttime - now) < 0) { > > + if (!maybe_today) > > + errx(1, "that time is already past."); > > + > > + /* > > + * If the user only gave a time, assume that > > + * any time earlier than the current time > > + * was intended to be that time tomorrow. > > + */ > > + lt->tm_mday++; > > + if ((shuttime = mktime(lt)) == -1) > > + badtime(); > > + if ((offset = shuttime - now) < 0) { > > + errx(1, "tomorrow is before today?"); > > + } > > + } > > break; > > default: > > badtime(); > > > > Where does maybe_today ever get set to non-zero? Baah. This is what happens when my build/test and commit box are not the same. Will fix later when I get back home. > > -- Ian > -- Sent from my Turing Machine From owner-svn-src-head@freebsd.org Mon Jan 1 23:22:21 2018 Return-Path: Delivered-To: svn-src-head@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 455A8E8AB9F; Mon, 1 Jan 2018 23:22:21 +0000 (UTC) (envelope-from freebsd@pdx.rh.CN85.dnsmgr.net) Received: from pdx.rh.CN85.dnsmgr.net (br1.CN84in.dnsmgr.net [69.59.192.140]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id A2EFA3737; Mon, 1 Jan 2018 23:22:20 +0000 (UTC) (envelope-from freebsd@pdx.rh.CN85.dnsmgr.net) Received: from pdx.rh.CN85.dnsmgr.net (localhost [127.0.0.1]) by pdx.rh.CN85.dnsmgr.net (8.13.3/8.13.3) with ESMTP id w01NMJgD088581; Mon, 1 Jan 2018 15:22:19 -0800 (PST) (envelope-from freebsd@pdx.rh.CN85.dnsmgr.net) Received: (from freebsd@localhost) by pdx.rh.CN85.dnsmgr.net (8.13.3/8.13.3/Submit) id w01NMJtw088580; Mon, 1 Jan 2018 15:22:19 -0800 (PST) (envelope-from freebsd) From: "Rodney W. Grimes" Message-Id: <201801012322.w01NMJtw088580@pdx.rh.CN85.dnsmgr.net> Subject: Re: svn commit: r327476 - head/sbin/shutdown In-Reply-To: To: Eitan Adler Date: Mon, 1 Jan 2018 15:22:19 -0800 (PST) CC: Ian Lepore , "src-committers@freebsd.org" , "svn-src-all@freebsd.org" , "svn-src-head@freebsd.org" Reply-To: rgrimes@freebsd.org X-Mailer: ELM [version 2.4ME+ PL121h (25)] MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=US-ASCII X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 01 Jan 2018 23:22:21 -0000 [ Charset UTF-8 unsupported, converting... ] > On Monday, 1 January 2018, Ian Lepore wrote: > > > On Mon, 2018-01-01 at 22:33 +0000, Eitan Adler wrote: > > > Author: eadler > > > Date: Mon Jan 1 22:33:57 2018 > > > New Revision: 327476 > > > URL: https://svnweb.freebsd.org/changeset/base/327476 > > > > > > Log: > > > shutdown: Assume absolute time is in the future > > > > > [...] > > > Modified: head/sbin/shutdown/shutdown.c > > > ============================================================ > > ================== > > > --- head/sbin/shutdown/shutdown.c Mon Jan 1 22:31:52 2018 > > (r327475) > > > +++ head/sbin/shutdown/shutdown.c Mon Jan 1 22:33:57 2018 > > (r327476) > > > @@ -431,7 +431,7 @@ getoffset(char *timearg) > > > struct tm *lt; > > > char *p; > > > time_t now; > > > - int this_year; > > > + int this_year, maybe_today; Please sort in alpha order here too, since your gona have to commit anyway. int maybe_today, this_year; > > > char *timeunit; > > > > > > (void)time(&now); > > > @@ -503,6 +503,7 @@ getoffset(char *timearg) > > > badtime(); > > > /* FALLTHROUGH */ > > > case 6: > > > + maybe_today = 0; > > > lt->tm_mday = ATOI2(timearg); > > > if (lt->tm_mday < 1 || lt->tm_mday > 31) > > > badtime(); > > > @@ -517,8 +518,23 @@ getoffset(char *timearg) > > > lt->tm_sec = 0; > > > if ((shuttime = mktime(lt)) == -1) > > > badtime(); > > > - if ((offset = shuttime - now) < 0) > > > - errx(1, "that time is already past."); > > > + > > > + if ((offset = shuttime - now) < 0) { > > > + if (!maybe_today) > > > + errx(1, "that time is already past."); > > > + > > > + /* > > > + * If the user only gave a time, assume that > > > + * any time earlier than the current time > > > + * was intended to be that time tomorrow. > > > + */ > > > + lt->tm_mday++; > > > + if ((shuttime = mktime(lt)) == -1) > > > + badtime(); > > > + if ((offset = shuttime - now) < 0) { > > > + errx(1, "tomorrow is before today?"); > > > + } > > > + } > > > break; > > > default: > > > badtime(); > > > > > > > Where does maybe_today ever get set to non-zero? > > > Baah. This is what happens when my build/test and commit box are not the > same. Will fix later when I get back home. > > > > > -- Ian > > > > > -- > Sent from my Turing Machine -- Rod Grimes rgrimes@freebsd.org From owner-svn-src-head@freebsd.org Tue Jan 2 00:07:30 2018 Return-Path: Delivered-To: svn-src-head@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 C41A0EA417A; Tue, 2 Jan 2018 00:07:30 +0000 (UTC) (envelope-from adrian@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 8CB44645BE; Tue, 2 Jan 2018 00:07:30 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w0207TiA025393; Tue, 2 Jan 2018 00:07:29 GMT (envelope-from adrian@FreeBSD.org) Received: (from adrian@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w0207Sn8025379; Tue, 2 Jan 2018 00:07:28 GMT (envelope-from adrian@FreeBSD.org) Message-Id: <201801020007.w0207Sn8025379@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: adrian set sender to adrian@FreeBSD.org using -f From: Adrian Chadd Date: Tue, 2 Jan 2018 00:07:28 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r327479 - in head/sys/dev: ath bwn iwi iwm iwn mwl otus ral rtwn usb/wlan wpi X-SVN-Group: head X-SVN-Commit-Author: adrian X-SVN-Commit-Paths: in head/sys/dev: ath bwn iwi iwm iwn mwl otus ral rtwn usb/wlan wpi X-SVN-Commit-Revision: 327479 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 02 Jan 2018 00:07:30 -0000 Author: adrian Date: Tue Jan 2 00:07:28 2018 New Revision: 327479 URL: https://svnweb.freebsd.org/changeset/base/327479 Log: [net80211] convert all of the WME use over to a temporary copy of WME info. This removes the direct WME info access in the ieee80211com struct and instead provides a method of fetching the data. Right now it's a no-op but eventually it'll turn into a per-VAP method for drivers that support it (eg iwn, iwm, upcoming ath10k work) as things like p2p support require this kind of behaviour. Tested: * ath(4), STA and AP mode TODO: * yes, this is slightly stack size-y, but it is an important first step to get drivers migrated over to a sensible WME API. A lot of per-phy things need to be converted to per-VAP before P2P, 11ac firmware, etc stuff shows up. Modified: head/sys/dev/ath/if_ath_beacon.c head/sys/dev/ath/if_ath_tx.c head/sys/dev/bwn/if_bwn.c head/sys/dev/iwi/if_iwi.c head/sys/dev/iwm/if_iwm.c head/sys/dev/iwn/if_iwn.c head/sys/dev/mwl/if_mwl.c head/sys/dev/otus/if_otus.c head/sys/dev/ral/rt2661.c head/sys/dev/ral/rt2860.c head/sys/dev/rtwn/if_rtwn.c head/sys/dev/usb/wlan/if_rum.c head/sys/dev/usb/wlan/if_run.c head/sys/dev/wpi/if_wpi.c Modified: head/sys/dev/ath/if_ath_beacon.c ============================================================================== --- head/sys/dev/ath/if_ath_beacon.c Tue Jan 2 00:02:36 2018 (r327478) +++ head/sys/dev/ath/if_ath_beacon.c Tue Jan 2 00:07:28 2018 (r327479) @@ -150,8 +150,12 @@ ath_beaconq_config(struct ath_softc *sc) qi.tqi_cwmin = ATH_BEACON_CWMIN_DEFAULT; qi.tqi_cwmax = ATH_BEACON_CWMAX_DEFAULT; } else { - struct wmeParams *wmep = - &ic->ic_wme.wme_chanParams.cap_wmeParams[WME_AC_BE]; + struct chanAccParams chp; + struct wmeParams *wmep; + + ieee80211_wme_ic_getparams(ic, &chp); + wmep = &chp.cap_wmeParams[WME_AC_BE]; + /* * Adhoc mode; important thing is to use 2x cwmin. */ Modified: head/sys/dev/ath/if_ath_tx.c ============================================================================== --- head/sys/dev/ath/if_ath_tx.c Tue Jan 2 00:02:36 2018 (r327478) +++ head/sys/dev/ath/if_ath_tx.c Tue Jan 2 00:07:28 2018 (r327479) @@ -1554,7 +1554,6 @@ ath_tx_normal_setup(struct ath_softc *sc, struct ieee8 { struct ieee80211vap *vap = ni->ni_vap; struct ieee80211com *ic = &sc->sc_ic; - const struct chanAccParams *cap = &ic->ic_wme.wme_chanParams; int error, iswep, ismcast, isfrag, ismrr; int keyix, hdrlen, pktlen, try0 = 0; u_int8_t rix = 0, txrate = 0; @@ -1697,7 +1696,11 @@ ath_tx_normal_setup(struct ath_softc *sc, struct ieee8 ismrr = 1; bf->bf_state.bfs_doratelookup = 1; } - if (cap->cap_wmeParams[pri].wmep_noackPolicy) + + /* + * Check whether to set NOACK for this WME category or not. + */ + if (ieee80211_wme_vap_ac_is_noack(vap, pri)) flags |= HAL_TXDESC_NOACK; break; default: Modified: head/sys/dev/bwn/if_bwn.c ============================================================================== --- head/sys/dev/bwn/if_bwn.c Tue Jan 2 00:02:36 2018 (r327478) +++ head/sys/dev/bwn/if_bwn.c Tue Jan 2 00:07:28 2018 (r327479) @@ -1755,15 +1755,18 @@ bwn_wme_update(struct ieee80211com *ic) { struct bwn_softc *sc = ic->ic_softc; struct bwn_mac *mac = sc->sc_curmac; + struct chanAccParams chp; struct wmeParams *wmep; int i; + ieee80211_wme_ic_getparams(ic, &chp); + BWN_LOCK(sc); mac = sc->sc_curmac; if (mac != NULL && mac->mac_status >= BWN_MAC_STATUS_INITED) { bwn_mac_suspend(mac); for (i = 0; i < N(sc->sc_wmeParams); i++) { - wmep = &ic->ic_wme.wme_chanParams.cap_wmeParams[i]; + wmep = &chp.cap_wmeParams[i]; bwn_wme_loadparams(mac, wmep, bwn_wme_shm_offsets[i]); } bwn_mac_enable(mac); Modified: head/sys/dev/iwi/if_iwi.c ============================================================================== --- head/sys/dev/iwi/if_iwi.c Tue Jan 2 00:02:36 2018 (r327478) +++ head/sys/dev/iwi/if_iwi.c Tue Jan 2 00:07:28 2018 (r327479) @@ -1050,12 +1050,15 @@ static int iwi_wme_setparams(struct iwi_softc *sc) { struct ieee80211com *ic = &sc->sc_ic; + struct chanAccParams chp; const struct wmeParams *wmep; int ac; + ieee80211_wme_ic_getparams(ic, &chp); + for (ac = 0; ac < WME_NUM_AC; ac++) { /* set WME values for current operating mode */ - wmep = &ic->ic_wme.wme_chanParams.cap_wmeParams[ac]; + wmep = &chp.cap_wmeParams[ac]; sc->wme[0].aifsn[ac] = wmep->wmep_aifsn; sc->wme[0].cwmin[ac] = IWI_EXP2(wmep->wmep_logcwmin); sc->wme[0].cwmax[ac] = IWI_EXP2(wmep->wmep_logcwmax); @@ -1771,11 +1774,9 @@ iwi_tx_start(struct iwi_softc *sc, struct mbuf *m0, st int ac) { struct ieee80211vap *vap = ni->ni_vap; - struct ieee80211com *ic = ni->ni_ic; struct iwi_node *in = (struct iwi_node *)ni; const struct ieee80211_frame *wh; struct ieee80211_key *k; - const struct chanAccParams *cap; struct iwi_tx_ring *txq = &sc->txq[ac]; struct iwi_tx_data *data; struct iwi_tx_desc *desc; @@ -1797,8 +1798,7 @@ iwi_tx_start(struct iwi_softc *sc, struct mbuf *m0, st flags |= IWI_DATA_FLAG_SHPREAMBLE; if (IEEE80211_QOS_HAS_SEQ(wh)) { xflags |= IWI_DATA_XFLAG_QOS; - cap = &ic->ic_wme.wme_chanParams; - if (!cap->cap_wmeParams[ac].wmep_noackPolicy) + if (ieee80211_wme_vap_ac_is_noack(vap, ac)) flags &= ~IWI_DATA_FLAG_NEED_ACK; } Modified: head/sys/dev/iwm/if_iwm.c ============================================================================== --- head/sys/dev/iwm/if_iwm.c Tue Jan 2 00:02:36 2018 (r327478) +++ head/sys/dev/iwm/if_iwm.c Tue Jan 2 00:07:28 2018 (r327479) @@ -6041,6 +6041,7 @@ iwm_wme_update(struct ieee80211com *ic) { #define IWM_EXP2(x) ((1 << (x)) - 1) /* CWmin = 2^ECWmin - 1 */ struct iwm_softc *sc = ic->ic_softc; + struct chanAccParams chp; struct ieee80211vap *vap = TAILQ_FIRST(&ic->ic_vaps); struct iwm_vap *ivp = IWM_VAP(vap); struct iwm_node *in; @@ -6050,9 +6051,11 @@ iwm_wme_update(struct ieee80211com *ic) if (vap == NULL) return (0); + ieee80211_wme_ic_getparams(ic, &chp); + IEEE80211_LOCK(ic); for (aci = 0; aci < WME_NUM_AC; aci++) - tmp[aci] = ic->ic_wme.wme_chanParams.cap_wmeParams[aci]; + tmp[aci] = chp.cap_wmeParams[aci]; IEEE80211_UNLOCK(ic); IWM_LOCK(sc); Modified: head/sys/dev/iwn/if_iwn.c ============================================================================== --- head/sys/dev/iwn/if_iwn.c Tue Jan 2 00:02:36 2018 (r327478) +++ head/sys/dev/iwn/if_iwn.c Tue Jan 2 00:07:28 2018 (r327479) @@ -5301,17 +5301,19 @@ iwn_updateedca(struct ieee80211com *ic) #define IWN_EXP2(x) ((1 << (x)) - 1) /* CWmin = 2^ECWmin - 1 */ struct iwn_softc *sc = ic->ic_softc; struct iwn_edca_params cmd; + struct chanAccParams chp; int aci; DPRINTF(sc, IWN_DEBUG_TRACE, "->%s begin\n", __func__); + ieee80211_wme_ic_getparams(ic, &chp); + memset(&cmd, 0, sizeof cmd); cmd.flags = htole32(IWN_EDCA_UPDATE); IEEE80211_LOCK(ic); for (aci = 0; aci < WME_NUM_AC; aci++) { - const struct wmeParams *ac = - &ic->ic_wme.wme_chanParams.cap_wmeParams[aci]; + const struct wmeParams *ac = &chp.cap_wmeParams[aci]; cmd.ac[aci].aifsn = ac->wmep_aifsn; cmd.ac[aci].cwmin = htole16(IWN_EXP2(ac->wmep_logcwmin)); cmd.ac[aci].cwmax = htole16(IWN_EXP2(ac->wmep_logcwmax)); Modified: head/sys/dev/mwl/if_mwl.c ============================================================================== --- head/sys/dev/mwl/if_mwl.c Tue Jan 2 00:02:36 2018 (r327478) +++ head/sys/dev/mwl/if_mwl.c Tue Jan 2 00:07:28 2018 (r327479) @@ -2893,10 +2893,14 @@ mwl_txq_update(struct mwl_softc *sc, int ac) { #define MWL_EXPONENT_TO_VALUE(v) ((1<sc_ic; + struct chanAccParams chp; struct mwl_txq *txq = sc->sc_ac2q[ac]; - struct wmeParams *wmep = &ic->ic_wme.wme_chanParams.cap_wmeParams[ac]; + struct wmeParams *wmep; struct mwl_hal *mh = sc->sc_mh; int aifs, cwmin, cwmax, txoplim; + + ieee80211_wme_ic_getparams(ic, &chp); + wmep = &chp.cap_wmeParams[ac]; aifs = wmep->wmep_aifsn; /* XXX in sta mode need to pass log values for cwmin/max */ Modified: head/sys/dev/otus/if_otus.c ============================================================================== --- head/sys/dev/otus/if_otus.c Tue Jan 2 00:02:36 2018 (r327478) +++ head/sys/dev/otus/if_otus.c Tue Jan 2 00:07:28 2018 (r327479) @@ -2392,12 +2392,15 @@ otus_updateedca_locked(struct otus_softc *sc) { #define EXP2(val) ((1 << (val)) - 1) #define AIFS(val) ((val) * 9 + 10) + struct chanAccParams chp; struct ieee80211com *ic = &sc->sc_ic; const struct wmeParams *edca; + ieee80211_wme_ic_getparams(ic, &chp); + OTUS_LOCK_ASSERT(sc); - edca = ic->ic_wme.wme_chanParams.cap_wmeParams; + edca = chp.cap_wmeParams; /* Set CWmin/CWmax values. */ otus_write(sc, AR_MAC_REG_AC0_CW, Modified: head/sys/dev/ral/rt2661.c ============================================================================== --- head/sys/dev/ral/rt2661.c Tue Jan 2 00:02:36 2018 (r327478) +++ head/sys/dev/ral/rt2661.c Tue Jan 2 00:07:28 2018 (r327479) @@ -1437,7 +1437,6 @@ rt2661_tx_data(struct rt2661_softc *sc, struct mbuf *m struct ieee80211_frame *wh; const struct ieee80211_txparam *tp = ni->ni_txparms; struct ieee80211_key *k; - const struct chanAccParams *cap; struct mbuf *mnew; bus_dma_segment_t segs[RT2661_MAX_SCATTER]; uint16_t dur; @@ -1458,10 +1457,8 @@ rt2661_tx_data(struct rt2661_softc *sc, struct mbuf *m } rate &= IEEE80211_RATE_VAL; - if (wh->i_fc[0] & IEEE80211_FC0_SUBTYPE_QOS) { - cap = &ic->ic_wme.wme_chanParams; - noack = cap->cap_wmeParams[ac].wmep_noackPolicy; - } + if (wh->i_fc[0] & IEEE80211_FC0_SUBTYPE_QOS) + noack = !! ieee80211_wme_vap_ac_is_noack(vap, ac); if (wh->i_fc[1] & IEEE80211_FC1_PROTECTED) { k = ieee80211_crypto_encap(ni, m0); @@ -2045,9 +2042,12 @@ static int rt2661_wme_update(struct ieee80211com *ic) { struct rt2661_softc *sc = ic->ic_softc; + struct chanAccParams chp; const struct wmeParams *wmep; - wmep = ic->ic_wme.wme_chanParams.cap_wmeParams; + ieee80211_wme_ic_getparams(ic, &chp); + + wmep = chp.cap_wmeParams; /* XXX: not sure about shifts. */ /* XXX: the reference driver plays with AC_VI settings too. */ Modified: head/sys/dev/ral/rt2860.c ============================================================================== --- head/sys/dev/ral/rt2860.c Tue Jan 2 00:02:36 2018 (r327478) +++ head/sys/dev/ral/rt2860.c Tue Jan 2 00:07:28 2018 (r327479) @@ -3115,10 +3115,13 @@ static int rt2860_updateedca(struct ieee80211com *ic) { struct rt2860_softc *sc = ic->ic_softc; + struct chanAccParams chp; const struct wmeParams *wmep; int aci; - wmep = ic->ic_wme.wme_chanParams.cap_wmeParams; + ieee80211_wme_ic_getparams(ic, &chp); + + wmep = chp.cap_wmeParams; /* update MAC TX configuration registers */ for (aci = 0; aci < WME_NUM_AC; aci++) { Modified: head/sys/dev/rtwn/if_rtwn.c ============================================================================== --- head/sys/dev/rtwn/if_rtwn.c Tue Jan 2 00:02:36 2018 (r327478) +++ head/sys/dev/rtwn/if_rtwn.c Tue Jan 2 00:07:28 2018 (r327479) @@ -1574,17 +1574,19 @@ rtwn_set_channel(struct ieee80211com *ic) static int rtwn_wme_update(struct ieee80211com *ic) { + struct chanAccParams chp; struct ieee80211_channel *c = ic->ic_curchan; struct rtwn_softc *sc = ic->ic_softc; struct wmeParams *wmep = sc->cap_wmeParams; uint8_t aifs, acm, slottime; int ac; + ieee80211_wme_ic_getparams(ic, &chp); + /* Prevent possible races. */ IEEE80211_LOCK(ic); /* XXX */ RTWN_LOCK(sc); - memcpy(wmep, ic->ic_wme.wme_chanParams.cap_wmeParams, - sizeof(sc->cap_wmeParams)); + memcpy(wmep, chp.cap_wmeParams, sizeof(sc->cap_wmeParams)); RTWN_UNLOCK(sc); IEEE80211_UNLOCK(ic); Modified: head/sys/dev/usb/wlan/if_rum.c ============================================================================== --- head/sys/dev/usb/wlan/if_rum.c Tue Jan 2 00:02:36 2018 (r327478) +++ head/sys/dev/usb/wlan/if_rum.c Tue Jan 2 00:07:28 2018 (r327479) @@ -2301,10 +2301,13 @@ rum_update_slot(struct ieee80211com *ic) static int rum_wme_update(struct ieee80211com *ic) { - const struct wmeParams *chanp = - ic->ic_wme.wme_chanParams.cap_wmeParams; + struct chanAccParams chp; + const struct wmeParams *chanp; struct rum_softc *sc = ic->ic_softc; int error = 0; + + ieee80211_wme_ic_getparams(ic, &chp); + chanp = chp.cap_wmeParams; RUM_LOCK(sc); error = rum_write(sc, RT2573_AIFSN_CSR, Modified: head/sys/dev/usb/wlan/if_run.c ============================================================================== --- head/sys/dev/usb/wlan/if_run.c Tue Jan 2 00:02:36 2018 (r327478) +++ head/sys/dev/usb/wlan/if_run.c Tue Jan 2 00:07:28 2018 (r327479) @@ -2217,10 +2217,13 @@ run_newstate(struct ieee80211vap *vap, enum ieee80211_ static int run_wme_update(struct ieee80211com *ic) { + struct chanAccParams chp; struct run_softc *sc = ic->ic_softc; - const struct wmeParams *ac = - ic->ic_wme.wme_chanParams.cap_wmeParams; + const struct wmeParams *ac; int aci, error = 0; + + ieee80211_wme_ic_getparams(ic, &chp); + ac = chp.cap_wmeParams; /* update MAC TX configuration registers */ RUN_LOCK(sc); Modified: head/sys/dev/wpi/if_wpi.c ============================================================================== --- head/sys/dev/wpi/if_wpi.c Tue Jan 2 00:02:36 2018 (r327478) +++ head/sys/dev/wpi/if_wpi.c Tue Jan 2 00:07:28 2018 (r327479) @@ -3521,16 +3521,18 @@ wpi_updateedca(struct ieee80211com *ic) { #define WPI_EXP2(x) ((1 << (x)) - 1) /* CWmin = 2^ECWmin - 1 */ struct wpi_softc *sc = ic->ic_softc; + struct chanAccParams chp; struct wpi_edca_params cmd; int aci, error; + ieee80211_wme_ic_getparams(ic, &chp); + DPRINTF(sc, WPI_DEBUG_TRACE, TRACE_STR_BEGIN, __func__); memset(&cmd, 0, sizeof cmd); cmd.flags = htole32(WPI_EDCA_UPDATE); for (aci = 0; aci < WME_NUM_AC; aci++) { - const struct wmeParams *ac = - &ic->ic_wme.wme_chanParams.cap_wmeParams[aci]; + const struct wmeParams *ac = &chp.cap_wmeParams[aci]; cmd.ac[aci].aifsn = ac->wmep_aifsn; cmd.ac[aci].cwmin = htole16(WPI_EXP2(ac->wmep_logcwmin)); cmd.ac[aci].cwmax = htole16(WPI_EXP2(ac->wmep_logcwmax)); From owner-svn-src-head@freebsd.org Tue Jan 2 00:48:20 2018 Return-Path: Delivered-To: svn-src-head@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 ECF3CEA5CEB; Tue, 2 Jan 2018 00:48:20 +0000 (UTC) (envelope-from cem@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 ACB7465A8C; Tue, 2 Jan 2018 00:48:20 +0000 (UTC) (envelope-from cem@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w020mJPj042324; Tue, 2 Jan 2018 00:48:19 GMT (envelope-from cem@FreeBSD.org) Received: (from cem@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w020mJZ7042321; Tue, 2 Jan 2018 00:48:19 GMT (envelope-from cem@FreeBSD.org) Message-Id: <201801020048.w020mJZ7042321@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: cem set sender to cem@FreeBSD.org using -f From: Conrad Meyer Date: Tue, 2 Jan 2018 00:48:19 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r327482 - head/usr.sbin/rpcbind X-SVN-Group: head X-SVN-Commit-Author: cem X-SVN-Commit-Paths: head/usr.sbin/rpcbind X-SVN-Commit-Revision: 327482 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 02 Jan 2018 00:48:21 -0000 Author: cem Date: Tue Jan 2 00:48:19 2018 New Revision: 327482 URL: https://svnweb.freebsd.org/changeset/base/327482 Log: rpcbind: Do not use signal-unsafe functions in SIGTERM handler syslog(3), routines used in write_warmstart(), and exit(3) are all signal-unsafe. Instead, set a signal-safe flag and check the flag in the rpcbind main loop to shutdown safely. PR: 224503 Reviewed by: kib, markj Sponsored by: Dell EMC Isilon Differential Revision: https://reviews.freebsd.org/D13728 Modified: head/usr.sbin/rpcbind/rpcb_svc_com.c head/usr.sbin/rpcbind/rpcbind.c head/usr.sbin/rpcbind/rpcbind.h Modified: head/usr.sbin/rpcbind/rpcb_svc_com.c ============================================================================== --- head/usr.sbin/rpcbind/rpcb_svc_com.c Tue Jan 2 00:14:46 2018 (r327481) +++ head/usr.sbin/rpcbind/rpcb_svc_com.c Tue Jan 2 00:48:19 2018 (r327482) @@ -1136,6 +1136,16 @@ my_svc_run(void) * that it was set by the signal handlers (or any * other outside event) and not caused by poll(). */ + if (doterminate != 0) { + close(rpcbindlockfd); +#ifdef WARMSTART + syslog(LOG_ERR, + "rpcbind terminating on signal %d. Restart with \"rpcbind -w\"", + (int)doterminate); + write_warmstart(); /* Dump yourself */ +#endif + exit(2); + } case 0: cleanfds = svc_fdset; __svc_clean_idle(&cleanfds, 30, FALSE); Modified: head/usr.sbin/rpcbind/rpcbind.c ============================================================================== --- head/usr.sbin/rpcbind/rpcbind.c Tue Jan 2 00:14:46 2018 (r327481) +++ head/usr.sbin/rpcbind/rpcbind.c Tue Jan 2 00:48:19 2018 (r327482) @@ -79,7 +79,9 @@ static char sccsid[] = "@(#)rpcbind.c 1.35 89/04/21 Co /* Global variables */ int debugging = 0; /* Tell me what's going on */ int doabort = 0; /* When debugging, do an abort on errors */ +volatile sig_atomic_t doterminate = 0; /* Terminal signal received */ rpcblist_ptr list_rbl; /* A list of version 3/4 rpcbind services */ +int rpcbindlockfd; /* who to suid to if -s is given */ #define RUN_AS "daemon" @@ -99,7 +101,6 @@ static struct sockaddr **bound_sa; static int ipv6_only = 0; static int nhosts = 0; static int on = 1; -static int rpcbindlockfd; #ifdef WARMSTART /* Local Variable */ @@ -758,16 +759,10 @@ rbllist_add(rpcprog_t prog, rpcvers_t vers, struct net * Catch the signal and die */ static void -terminate(int signum __unused) +terminate(int signum) { - close(rpcbindlockfd); -#ifdef WARMSTART - syslog(LOG_ERR, - "rpcbind terminating on signal %d. Restart with \"rpcbind -w\"", - signum); - write_warmstart(); /* Dump yourself */ -#endif - exit(2); + + doterminate = signum; } void Modified: head/usr.sbin/rpcbind/rpcbind.h ============================================================================== --- head/usr.sbin/rpcbind/rpcbind.h Tue Jan 2 00:14:46 2018 (r327481) +++ head/usr.sbin/rpcbind/rpcbind.h Tue Jan 2 00:48:19 2018 (r327482) @@ -44,6 +44,8 @@ #ifndef rpcbind_h #define rpcbind_h +#include + #ifdef PORTMAP #include #endif @@ -68,6 +70,7 @@ struct r_rmtcall_args { extern int debugging; extern int doabort; +extern volatile sig_atomic_t doterminate; #ifdef LIBWRAP extern int libwrap; #endif @@ -75,6 +78,7 @@ extern int verboselog; extern int insecure; extern int oldstyle_local; extern rpcblist_ptr list_rbl; /* A list of version 3 & 4 rpcbind services */ +extern int rpcbindlockfd; #ifdef PORTMAP extern struct pmaplist *list_pml; /* A list of version 2 rpcbind services */ From owner-svn-src-head@freebsd.org Tue Jan 2 01:48:12 2018 Return-Path: Delivered-To: svn-src-head@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 D7D87EA8A93; Tue, 2 Jan 2018 01:48:12 +0000 (UTC) (envelope-from cem@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 A262F67F38; Tue, 2 Jan 2018 01:48:12 +0000 (UTC) (envelope-from cem@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w021mBbB067853; Tue, 2 Jan 2018 01:48:11 GMT (envelope-from cem@FreeBSD.org) Received: (from cem@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w021mBdi067852; Tue, 2 Jan 2018 01:48:11 GMT (envelope-from cem@FreeBSD.org) Message-Id: <201801020148.w021mBdi067852@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: cem set sender to cem@FreeBSD.org using -f From: Conrad Meyer Date: Tue, 2 Jan 2018 01:48:11 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r327483 - head/usr.sbin/rpcbind X-SVN-Group: head X-SVN-Commit-Author: cem X-SVN-Commit-Paths: head/usr.sbin/rpcbind X-SVN-Commit-Revision: 327483 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 02 Jan 2018 01:48:12 -0000 Author: cem Date: Tue Jan 2 01:48:11 2018 New Revision: 327483 URL: https://svnweb.freebsd.org/changeset/base/327483 Log: rpcbind: Fix build Add missed unistd.h include. Not sure where it was lost; I believe it compiled before I submitted the change. PR: 224503 Reported by: Cy Schubert Sponsored by: Dell EMC Isilon Modified: head/usr.sbin/rpcbind/rpcb_svc_com.c Modified: head/usr.sbin/rpcbind/rpcb_svc_com.c ============================================================================== --- head/usr.sbin/rpcbind/rpcb_svc_com.c Tue Jan 2 00:48:19 2018 (r327482) +++ head/usr.sbin/rpcbind/rpcb_svc_com.c Tue Jan 2 01:48:11 2018 (r327483) @@ -54,13 +54,14 @@ #include #include #include +#include +#include +#include #ifdef PORTMAP #include #include #include #endif /* PORTMAP */ -#include -#include #include "rpcbind.h" From owner-svn-src-head@freebsd.org Tue Jan 2 03:56:43 2018 Return-Path: Delivered-To: svn-src-head@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 474FCEAF1E2; Tue, 2 Jan 2018 03:56:43 +0000 (UTC) (envelope-from julian@freebsd.org) Received: from vps1.elischer.org (vps1.elischer.org [204.109.63.16]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "vps1.elischer.org", Issuer "CA Cert Signing Authority" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 633326C958; Tue, 2 Jan 2018 03:56:42 +0000 (UTC) (envelope-from julian@freebsd.org) Received: from Julian-MBP3.local (203-206-51-137.dyn.iinet.net.au [203.206.51.137] (may be forged)) (authenticated bits=0) by vps1.elischer.org (8.15.2/8.15.2) with ESMTPSA id w023ubYG027745 (version=TLSv1.2 cipher=DHE-RSA-AES128-SHA bits=128 verify=NO); Mon, 1 Jan 2018 19:56:40 -0800 (PST) (envelope-from julian@freebsd.org) Subject: Re: svn commit: r327447 - head/sys/sys To: Colin Percival , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org References: <201712312100.vBVL0L0a038783@repo.freebsd.org> From: Julian Elischer Message-ID: Date: Tue, 2 Jan 2018 11:56:31 +0800 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.12; rv:52.0) Gecko/20100101 Thunderbird/52.5.0 MIME-Version: 1.0 In-Reply-To: <201712312100.vBVL0L0a038783@repo.freebsd.org> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit Content-Language: en-US X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 02 Jan 2018 03:56:43 -0000 On 1/1/18 5:00 am, Colin Percival wrote: > Author: cperciva > Date: Sun Dec 31 21:00:21 2017 > New Revision: 327447 > URL: https://svnweb.freebsd.org/changeset/base/327447 > > Log: > Wrap includes in sys/tslog.h with #ifdef TSLOG. > > This is necessary because some non-kernel code #defines _KERNEL and then > includes kernel headers; as a result, it was getting conflicting versions > of curthread and curproc. Non-kernel code should probably refrain from > defining _KERNEL, but for now hiding these indirect inclusions fixes the > build. this is a recurring issue. Program that want to look into the internals of files such as mount.h and define _KERNEL to allow themselves to do so.  It eventualy leads to all sorts of confusion and pollution. Maybe we should make a policy on how to do this. At $JOB I had to hack it to define a #ifdef _NOTREALLYKERNEL to split out parts we really wanted, but it would be better to have specific ones for various specific 'rule breakers'.. e.g. #if defined( _KERNEL ) || defined (WANT_TO_LOOK_AT_something) kdump seems ot do the right thing with: kdump/kdump.c:#define _WANT_KERNEL_ERRNO errno.h:#if defined(_KERNEL) || defined(_WANT_KERNEL_ERRNO) > > Reported by: Michael Butler, Herbert J. Skuhra > > Modified: > head/sys/sys/tslog.h > > Modified: head/sys/sys/tslog.h > ============================================================================== > --- head/sys/sys/tslog.h Sun Dec 31 20:30:51 2017 (r327446) > +++ head/sys/sys/tslog.h Sun Dec 31 21:00:21 2017 (r327447) > @@ -29,8 +29,10 @@ > #ifndef _TSLOG_H_ > #define _TSLOG_H_ > > +#ifdef TSLOG > #include > #include > +#endif > > #define TS_ENTER 0 > #define TS_EXIT 1 > > From owner-svn-src-head@freebsd.org Tue Jan 2 03:59:48 2018 Return-Path: Delivered-To: svn-src-head@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 5E9DCEAF49C; Tue, 2 Jan 2018 03:59:48 +0000 (UTC) (envelope-from nwhitehorn@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 28A536CBBD; Tue, 2 Jan 2018 03:59:48 +0000 (UTC) (envelope-from nwhitehorn@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w023xlQE022750; Tue, 2 Jan 2018 03:59:47 GMT (envelope-from nwhitehorn@FreeBSD.org) Received: (from nwhitehorn@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w023xlZL022749; Tue, 2 Jan 2018 03:59:47 GMT (envelope-from nwhitehorn@FreeBSD.org) Message-Id: <201801020359.w023xlZL022749@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: nwhitehorn set sender to nwhitehorn@FreeBSD.org using -f From: Nathan Whitehorn Date: Tue, 2 Jan 2018 03:59:47 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r327484 - head/sys/powerpc/ps3 X-SVN-Group: head X-SVN-Commit-Author: nwhitehorn X-SVN-Commit-Paths: head/sys/powerpc/ps3 X-SVN-Commit-Revision: 327484 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 02 Jan 2018 03:59:48 -0000 Author: nwhitehorn Date: Tue Jan 2 03:59:46 2018 New Revision: 327484 URL: https://svnweb.freebsd.org/changeset/base/327484 Log: Fix reversed endianness that crept in at some point. Blue is now blue instead of pink. MFC after: 3 days Modified: head/sys/powerpc/ps3/ps3_syscons.c Modified: head/sys/powerpc/ps3/ps3_syscons.c ============================================================================== --- head/sys/powerpc/ps3/ps3_syscons.c Tue Jan 2 01:48:11 2018 (r327483) +++ head/sys/powerpc/ps3/ps3_syscons.c Tue Jan 2 03:59:46 2018 (r327484) @@ -229,7 +229,7 @@ ps3fb_init(struct vt_device *vd) /* 32-bit VGA palette */ vt_generate_cons_palette(sc->fb_info.fb_cmap, COLOR_FORMAT_RGB, - 255, 0, 255, 8, 255, 16); + 255, 16, 255, 8, 255, 0); /* Set correct graphics context */ lv1_gpu_context_attribute(sc->sc_fbcontext, From owner-svn-src-head@freebsd.org Tue Jan 2 04:35:58 2018 Return-Path: Delivered-To: svn-src-head@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 07DE5EB0E59; Tue, 2 Jan 2018 04:35:58 +0000 (UTC) (envelope-from jeff@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 CF4E26DD75; Tue, 2 Jan 2018 04:35:57 +0000 (UTC) (envelope-from jeff@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w024Zu0V039040; Tue, 2 Jan 2018 04:35:56 GMT (envelope-from jeff@FreeBSD.org) Received: (from jeff@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w024ZuCW039035; Tue, 2 Jan 2018 04:35:56 GMT (envelope-from jeff@FreeBSD.org) Message-Id: <201801020435.w024ZuCW039035@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jeff set sender to jeff@FreeBSD.org using -f From: Jeff Roberson Date: Tue, 2 Jan 2018 04:35:56 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r327485 - in head/sys: cddl/compat/opensolaris/sys cddl/contrib/opensolaris/uts/common/fs/zfs vm X-SVN-Group: head X-SVN-Commit-Author: jeff X-SVN-Commit-Paths: in head/sys: cddl/compat/opensolaris/sys cddl/contrib/opensolaris/uts/common/fs/zfs vm X-SVN-Commit-Revision: 327485 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 02 Jan 2018 04:35:58 -0000 Author: jeff Date: Tue Jan 2 04:35:56 2018 New Revision: 327485 URL: https://svnweb.freebsd.org/changeset/base/327485 Log: Fix arc after r326347 broke various memory limit queries. Use UMA features rather than kmem arena size to determine available memory. Initialize the UMA limit to LONG_MAX to avoid spurious wakeups on boot before the real limit is set. PR: 224330 (partial), 224080 Reviewed by: markj, avg Sponsored by: Netflix / Dell EMC Isilon Differential Revision: https://reviews.freebsd.org/D13494 Modified: head/sys/cddl/compat/opensolaris/sys/kmem.h head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/arc.c head/sys/vm/uma.h head/sys/vm/uma_core.c head/sys/vm/uma_int.h Modified: head/sys/cddl/compat/opensolaris/sys/kmem.h ============================================================================== --- head/sys/cddl/compat/opensolaris/sys/kmem.h Tue Jan 2 03:59:46 2018 (r327484) +++ head/sys/cddl/compat/opensolaris/sys/kmem.h Tue Jan 2 04:35:56 2018 (r327485) @@ -80,7 +80,8 @@ void *calloc(size_t n, size_t s); #define freemem vm_cnt.v_free_count #define minfree vm_cnt.v_free_min -#define heap_arena kmem_arena +#define heap_arena kernel_arena +#define zio_arena NULL #define kmem_alloc(size, kmflags) zfs_kmem_alloc((size), (kmflags)) #define kmem_zalloc(size, kmflags) zfs_kmem_alloc((size), (kmflags) | M_ZERO) #define kmem_free(buf, size) zfs_kmem_free((buf), (size)) Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/arc.c ============================================================================== --- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/arc.c Tue Jan 2 03:59:46 2018 (r327484) +++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/arc.c Tue Jan 2 04:35:56 2018 (r327485) @@ -4207,7 +4207,6 @@ typedef enum free_memory_reason_t { FMR_PAGES_PP_MAXIMUM, FMR_HEAP_ARENA, FMR_ZIO_ARENA, - FMR_ZIO_FRAG, } free_memory_reason_t; int64_t last_free_memory; @@ -4302,15 +4301,11 @@ arc_available_memory(void) * heap is allocated. (Or, in the calculation, if less than 1/4th is * free) */ - n = (int64_t)vmem_size(heap_arena, VMEM_FREE) - - (vmem_size(heap_arena, VMEM_FREE | VMEM_ALLOC) >> 2); + n = uma_avail() - (long)(uma_limit() / 4); if (n < lowest) { lowest = n; r = FMR_HEAP_ARENA; } -#define zio_arena NULL -#else -#define zio_arena heap_arena #endif /* @@ -4331,20 +4326,6 @@ arc_available_memory(void) } } - /* - * Above limits know nothing about real level of KVA fragmentation. - * Start aggressive reclamation if too little sequential KVA left. - */ - if (lowest > 0) { - n = (vmem_size(heap_arena, VMEM_MAXFREE) < SPA_MAXBLOCKSIZE) ? - -((int64_t)vmem_size(heap_arena, VMEM_ALLOC) >> 4) : - INT64_MAX; - if (n < lowest) { - lowest = n; - r = FMR_ZIO_FRAG; - } - } - #else /* _KERNEL */ /* Every 100 calls, free a small amount */ if (spa_get_random(100) == 0) @@ -6110,8 +6091,7 @@ arc_memory_throttle(uint64_t reserve, uint64_t txg) static uint64_t last_txg = 0; #if defined(__i386) || !defined(UMA_MD_SMALL_ALLOC) - available_memory = - MIN(available_memory, ptob(vmem_size(heap_arena, VMEM_FREE))); + available_memory = MIN(available_memory, uma_avail()); #endif if (freemem > (uint64_t)physmem * arc_lotsfree_percent / 100) @@ -6492,8 +6472,12 @@ arc_init(void) * Metadata is stored in the kernel's heap. Don't let us * use more than half the heap for the ARC. */ +#ifdef __FreeBSD__ + arc_meta_limit = MIN(arc_meta_limit, uma_limit() / 2); +#else arc_meta_limit = MIN(arc_meta_limit, vmem_size(heap_arena, VMEM_ALLOC | VMEM_FREE) / 2); +#endif #endif /* Allow the tunable to override if it is reasonable */ Modified: head/sys/vm/uma.h ============================================================================== --- head/sys/vm/uma.h Tue Jan 2 03:59:46 2018 (r327484) +++ head/sys/vm/uma.h Tue Jan 2 04:35:56 2018 (r327485) @@ -698,4 +698,12 @@ struct uma_percpu_stat { void uma_reclaim_wakeup(void); void uma_reclaim_worker(void *); +unsigned long uma_limit(void); + +/* Return the amount of memory managed by UMA. */ +unsigned long uma_size(void); + +/* Return the amount of memory remaining. May be negative. */ +long uma_avail(void); + #endif /* _VM_UMA_H_ */ Modified: head/sys/vm/uma_core.c ============================================================================== --- head/sys/vm/uma_core.c Tue Jan 2 03:59:46 2018 (r327484) +++ head/sys/vm/uma_core.c Tue Jan 2 04:35:56 2018 (r327485) @@ -62,6 +62,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include #include @@ -148,7 +149,7 @@ static struct mtx uma_boot_pages_mtx; static struct sx uma_drain_lock; /* kmem soft limit. */ -static unsigned long uma_kmem_limit; +static unsigned long uma_kmem_limit = LONG_MAX; static volatile unsigned long uma_kmem_total; /* Is the VM done starting up? */ @@ -3265,7 +3266,14 @@ unsigned long uma_size(void) { - return uma_kmem_total; + return (uma_kmem_total); +} + +long +uma_avail(void) +{ + + return (uma_kmem_limit - uma_kmem_total); } void Modified: head/sys/vm/uma_int.h ============================================================================== --- head/sys/vm/uma_int.h Tue Jan 2 03:59:46 2018 (r327484) +++ head/sys/vm/uma_int.h Tue Jan 2 04:35:56 2018 (r327485) @@ -428,10 +428,6 @@ void uma_small_free(void *mem, vm_size_t size, uint8_t /* Set a global soft limit on UMA managed memory. */ void uma_set_limit(unsigned long limit); -unsigned long uma_limit(void); - -/* Return the amount of memory managed by UMA. */ -unsigned long uma_size(void); #endif /* _KERNEL */ #endif /* VM_UMA_INT_H */ From owner-svn-src-head@freebsd.org Tue Jan 2 05:22:55 2018 Return-Path: Delivered-To: svn-src-head@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 93219EB32AD; Tue, 2 Jan 2018 05:22:55 +0000 (UTC) (envelope-from nwhitehorn@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 5CC996F611; Tue, 2 Jan 2018 05:22:55 +0000 (UTC) (envelope-from nwhitehorn@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w025Msnr059641; Tue, 2 Jan 2018 05:22:54 GMT (envelope-from nwhitehorn@FreeBSD.org) Received: (from nwhitehorn@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w025MsV2059640; Tue, 2 Jan 2018 05:22:54 GMT (envelope-from nwhitehorn@FreeBSD.org) Message-Id: <201801020522.w025MsV2059640@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: nwhitehorn set sender to nwhitehorn@FreeBSD.org using -f From: Nathan Whitehorn Date: Tue, 2 Jan 2018 05:22:54 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r327486 - head/usr.sbin/bsdinstall/distextract X-SVN-Group: head X-SVN-Commit-Author: nwhitehorn X-SVN-Commit-Paths: head/usr.sbin/bsdinstall/distextract X-SVN-Commit-Revision: 327486 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 02 Jan 2018 05:22:55 -0000 Author: nwhitehorn Date: Tue Jan 2 05:22:54 2018 New Revision: 327486 URL: https://svnweb.freebsd.org/changeset/base/327486 Log: Skip errors from being unable to set modification and creation times. If one of the directories in the filesystem hierarchy is a FAT mountpoint, settings its times will fail, which would cause installation to abort. Instead, make this a best-effort thing. Handling this error is a hack and a better internal scheme for handling this should be added to libarchive. Modified: head/usr.sbin/bsdinstall/distextract/distextract.c Modified: head/usr.sbin/bsdinstall/distextract/distextract.c ============================================================================== --- head/usr.sbin/bsdinstall/distextract/distextract.c Tue Jan 2 04:35:56 2018 (r327485) +++ head/usr.sbin/bsdinstall/distextract/distextract.c Tue Jan 2 05:22:54 2018 (r327486) @@ -310,7 +310,15 @@ extract_files(struct dpv_file_node *file, int out __un archive = NULL; file->status = DPV_STATUS_DONE; return (100); - } else if (retval != ARCHIVE_OK) { + } else if (retval != ARCHIVE_OK && + !(retval == ARCHIVE_WARN && + strcmp(archive_error_string(archive), "Can't restore time") == 0)) { + /* + * Print any warning/error messages except inability to set + * ctime/mtime, which is not fatal, or even interesting, + * for our purposes. Would be nice if this were a libarchive + * option. + */ snprintf(errormsg, sizeof(errormsg), "Error while extracting %s: %s\n", file->name, archive_error_string(archive)); From owner-svn-src-head@freebsd.org Tue Jan 2 05:27:26 2018 Return-Path: Delivered-To: svn-src-head@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 2C75EEB36A9; Tue, 2 Jan 2018 05:27:26 +0000 (UTC) (envelope-from nwhitehorn@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 021A66F87B; Tue, 2 Jan 2018 05:27:25 +0000 (UTC) (envelope-from nwhitehorn@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w025RP68059829; Tue, 2 Jan 2018 05:27:25 GMT (envelope-from nwhitehorn@FreeBSD.org) Received: (from nwhitehorn@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w025ROai059824; Tue, 2 Jan 2018 05:27:24 GMT (envelope-from nwhitehorn@FreeBSD.org) Message-Id: <201801020527.w025ROai059824@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: nwhitehorn set sender to nwhitehorn@FreeBSD.org using -f From: Nathan Whitehorn Date: Tue, 2 Jan 2018 05:27:24 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r327487 - in head/usr.sbin/bsdinstall: partedit scripts X-SVN-Group: head X-SVN-Commit-Author: nwhitehorn X-SVN-Commit-Paths: in head/usr.sbin/bsdinstall: partedit scripts X-SVN-Commit-Revision: 327487 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 02 Jan 2018 05:27:26 -0000 Author: nwhitehorn Date: Tue Jan 2 05:27:24 2018 New Revision: 327487 URL: https://svnweb.freebsd.org/changeset/base/327487 Log: Add installer support for PS3 and PowerNV systems, also laying the foundation for invoking efibootmgr as part of new-style EFI booting on x86. On PS3 and PowerNV, which are booted using Linux kexec from petitboot rather than by loader(8), install the kernel and the rest of /boot to a FAT partition and set up the appropriate petitboot configuration file there. The new bootconfig installer stage can do platform-dependent modifications more complex than partition layout and installation of boot blocks and can be used to (as here) set up some special configuration files, run efibootmgr, or boot0cfg. MFC after: 1 month Added: head/usr.sbin/bsdinstall/scripts/bootconfig (contents, props changed) Modified: head/usr.sbin/bsdinstall/partedit/partedit_powerpc.c head/usr.sbin/bsdinstall/scripts/Makefile head/usr.sbin/bsdinstall/scripts/auto head/usr.sbin/bsdinstall/scripts/script Modified: head/usr.sbin/bsdinstall/partedit/partedit_powerpc.c ============================================================================== --- head/usr.sbin/bsdinstall/partedit/partedit_powerpc.c Tue Jan 2 05:22:54 2018 (r327486) +++ head/usr.sbin/bsdinstall/partedit/partedit_powerpc.c Tue Jan 2 05:27:24 2018 (r327487) @@ -44,10 +44,10 @@ default_scheme(void) { if (strcmp(platform, "powermac") == 0) return ("APM"); - if (strcmp(platform, "chrp") == 0) + if (strcmp(platform, "chrp") == 0 || strcmp(platform, "ps3") == 0) return ("MBR"); - /* Pick GPT (bootable on PS3) as a generic default */ + /* Pick GPT as a generic default */ return ("GPT"); } @@ -59,9 +59,9 @@ is_scheme_bootable(const char *part_type) { if (strcmp(platform, "powermac") == 0 && strcmp(part_type, "APM") == 0) return (1); - if (strcmp(platform, "ps3") == 0 && strcmp(part_type, "GPT") == 0) + if (strcmp(platform, "powernv") == 0 && strcmp(part_type, "GPT") == 0) return (1); - if (strcmp(platform, "chrp") == 0 && + if ((strcmp(platform, "chrp") == 0 || strcmp(platform, "ps3") == 0) && (strcmp(part_type, "MBR") == 0 || strcmp(part_type, "BSD") == 0 || strcmp(part_type, "GPT") == 0)) return (1); @@ -79,20 +79,26 @@ is_fs_bootable(const char *part_type, const char *fs) } size_t -bootpart_size(const char *part_type) { +bootpart_size(const char *part_type) +{ size_t platlen = sizeof(platform); if (strlen(platform) == 0) sysctlbyname("hw.platform", platform, &platlen, NULL, -1); - if (strcmp(part_type, "APM") == 0 || strcmp(part_type, "MBR") == 0) + if (strcmp(part_type, "APM") == 0) return (800*1024); - if (strcmp(platform, "chrp") == 0 && strcmp(part_type, "GPT") == 0) + if (strcmp(part_type, "BSD") == 0) /* Nothing for nested */ + return (0); + if (strcmp(platform, "chrp") == 0) return (800*1024); + if (strcmp(platform, "ps3") == 0 || strcmp(platform, "powernv") == 0) + return (512*1024*1024); return (0); } const char * -bootpart_type(const char *scheme, const char **mountpoint) { +bootpart_type(const char *scheme, const char **mountpoint) +{ size_t platlen = sizeof(platform); if (strlen(platform) == 0) sysctlbyname("hw.platform", platform, &platlen, NULL, -1); @@ -101,6 +107,13 @@ bootpart_type(const char *scheme, const char **mountpo return ("prep-boot"); if (strcmp(platform, "powermac") == 0) return ("apple-boot"); + if (strcmp(platform, "powernv") == 0 || strcmp(platform, "ps3") == 0) { + *mountpoint = "/boot"; + if (strcmp(scheme, "GPT") == 0) + return ("ms-basic-data"); + else if (strcmp(scheme, "MBR") == 0) + return ("fat32"); + } return ("freebsd-boot"); } @@ -118,8 +131,7 @@ partcode_path(const char *part_type, const char *fs_ty if (strcmp(part_type, "APM") == 0) return ("/boot/boot1.hfs"); - if (strcmp(part_type, "MBR") == 0 || - (strcmp(platform, "chrp") == 0 && strcmp(part_type, "GPT") == 0)) + if (strcmp(platform, "chrp") == 0) return ("/boot/boot1.elf"); return (NULL); } Modified: head/usr.sbin/bsdinstall/scripts/Makefile ============================================================================== --- head/usr.sbin/bsdinstall/scripts/Makefile Tue Jan 2 05:22:54 2018 (r327486) +++ head/usr.sbin/bsdinstall/scripts/Makefile Tue Jan 2 05:27:24 2018 (r327487) @@ -1,8 +1,9 @@ # $FreeBSD$ -SCRIPTS= auto adduser checksum config docsinstall entropy hardening hostname jail \ - keymap mirrorselect mount netconfig netconfig_ipv4 netconfig_ipv6 \ - rootpass script services time umount wlanconfig zfsboot +SCRIPTS= auto adduser bootconfig checksum config docsinstall entropy hardening \ + hostname jail keymap mirrorselect mount netconfig netconfig_ipv4 \ + netconfig_ipv6 rootpass script services time umount wlanconfig \ + zfsboot BINDIR= ${LIBEXECDIR}/bsdinstall MAN= Modified: head/usr.sbin/bsdinstall/scripts/auto ============================================================================== --- head/usr.sbin/bsdinstall/scripts/auto Tue Jan 2 05:22:54 2018 (r327486) +++ head/usr.sbin/bsdinstall/scripts/auto Tue Jan 2 05:27:24 2018 (r327487) @@ -377,6 +377,10 @@ fi bsdinstall checksum || error "Distribution checksum failed" bsdinstall distextract || error "Distribution extract failed" + +# Set up boot loader +bsdinstall bootconfig || error "Failed to configure bootloader" + bsdinstall rootpass || error "Could not set root password" trap true SIGINT # This section is optional Added: head/usr.sbin/bsdinstall/scripts/bootconfig ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/usr.sbin/bsdinstall/scripts/bootconfig Tue Jan 2 05:27:24 2018 (r327487) @@ -0,0 +1,40 @@ +#!/bin/sh +#- +# Copyright (c) 2017 Nathan Whitehorn +# All rights reserved. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions +# are met: +# 1. Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# 2. Redistributions in binary form must reproduce the above copyright +# notice, this list of conditions and the following disclaimer in the +# documentation and/or other materials provided with the distribution. +# +# THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND +# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +# ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE +# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +# OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +# HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +# OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +# SUCH DAMAGE. +# +# $FreeBSD$ + +if [ `uname -m` == powerpc ]; then + platform=`sysctl -n hw.platform` + if [ "$platform" == ps3 -o "$platform" == powernv ]; then + rootpart=$(awk '{ if($2 == "/") printf("%s:%s\n", $3, $1); }' $PATH_FSTAB) + mkdir -p $BSDINSTALL_CHROOT/boot/etc/ + echo FreeBSD=\'/kernel/kernel vfs.root.mountfrom=${rootpart}\' > $BSDINSTALL_CHROOT/boot/etc/kboot.conf + fi +fi + +# For new-style EFI booting, add code here +# Add boot0cfg for MBR BIOS booting? + Modified: head/usr.sbin/bsdinstall/scripts/script ============================================================================== --- head/usr.sbin/bsdinstall/scripts/script Tue Jan 2 05:22:54 2018 (r327486) +++ head/usr.sbin/bsdinstall/scripts/script Tue Jan 2 05:27:24 2018 (r327487) @@ -116,8 +116,15 @@ fi bsdinstall checksum for set in $DISTRIBUTIONS; do f_dprintf "Extracting $BSDINSTALL_DISTDIR/$set" + # XXX: this will fail if any mountpoints are FAT, due to inability to + # set ctime/mtime on the root of FAT partitions. tar has no option to + # ignore this. We probably need to switch back to distextract here + # to properly support EFI. tar -xf "$BSDINSTALL_DISTDIR/$set" -C $BSDINSTALL_CHROOT done + +# Configure bootloader if needed +bsdinstall bootconfig # Finalize install bsdinstall config From owner-svn-src-head@freebsd.org Tue Jan 2 09:02:43 2018 Return-Path: Delivered-To: svn-src-head@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 9C660EBC402; Tue, 2 Jan 2018 09:02:43 +0000 (UTC) (envelope-from eadler@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 66A2A76750; Tue, 2 Jan 2018 09:02:43 +0000 (UTC) (envelope-from eadler@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w0292g2d051542; Tue, 2 Jan 2018 09:02:42 GMT (envelope-from eadler@FreeBSD.org) Received: (from eadler@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w0292gHK051541; Tue, 2 Jan 2018 09:02:42 GMT (envelope-from eadler@FreeBSD.org) Message-Id: <201801020902.w0292gHK051541@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: eadler set sender to eadler@FreeBSD.org using -f From: Eitan Adler Date: Tue, 2 Jan 2018 09:02:42 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r327488 - head/sbin/shutdown X-SVN-Group: head X-SVN-Commit-Author: eadler X-SVN-Commit-Paths: head/sbin/shutdown X-SVN-Commit-Revision: 327488 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 02 Jan 2018 09:02:43 -0000 Author: eadler Date: Tue Jan 2 09:02:42 2018 New Revision: 327488 URL: https://svnweb.freebsd.org/changeset/base/327488 Log: shutdown: Fix r327476 by adding init Initialize maybe_today. While here sort. PR: 32411 Additionally reported by: rgrimes, ian Modified: head/sbin/shutdown/shutdown.c Modified: head/sbin/shutdown/shutdown.c ============================================================================== --- head/sbin/shutdown/shutdown.c Tue Jan 2 05:27:24 2018 (r327487) +++ head/sbin/shutdown/shutdown.c Tue Jan 2 09:02:42 2018 (r327488) @@ -431,7 +431,7 @@ getoffset(char *timearg) struct tm *lt; char *p; time_t now; - int this_year, maybe_today; + int maybe_today, this_year; char *timeunit; (void)time(&now); @@ -482,6 +482,7 @@ getoffset(char *timearg) unsetenv("TZ"); /* OUR timezone */ lt = localtime(&now); /* current time val */ + maybe_today = 1; switch(strlen(timearg)) { case 10: From owner-svn-src-head@freebsd.org Tue Jan 2 09:03:54 2018 Return-Path: Delivered-To: svn-src-head@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 9B3E3EBC4D1 for ; Tue, 2 Jan 2018 09:03:54 +0000 (UTC) (envelope-from lists@eitanadler.com) Received: from mail-yb0-x232.google.com (mail-yb0-x232.google.com [IPv6:2607:f8b0:4002:c09::232]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4D866768D5 for ; Tue, 2 Jan 2018 09:03:54 +0000 (UTC) (envelope-from lists@eitanadler.com) Received: by mail-yb0-x232.google.com with SMTP id j7so26267032ybl.3 for ; Tue, 02 Jan 2018 01:03:54 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=eitanadler.com; s=0xdeadbeef; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to:cc; bh=FdpkXucGSLcQ1tenNSuClTEWooVq5mmev1UsfS4ltHc=; b=b/hv3iJjRu2qwkSWTvKS9ShCj9fQfiFg+sd+O1HhKXoQskH8vVrqO0GJbPpjOlfJgv vT38rOeQqGeON2V4lQi6rhgxz7VICMWcyOeqkeczbfU/Ei7TOm/oZHKtZV76FkGAzOBC APa8PIQl96d4zpBP+jgZXAuO6ljL0QUq4t3sw= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd-org.20150623.gappssmtp.com; s=20150623; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to:cc; bh=FdpkXucGSLcQ1tenNSuClTEWooVq5mmev1UsfS4ltHc=; b=tbypr6pKeCKyWLXkgpMxP1lst/kcAeSIx1GQioSfRSojJhp7UdKytNdsiHUqVLDwty hWBK9qkjHLKMizgYSug2o/STt4hoa+XMM1AeA1mmmE3SG3VOMseX2iFvt+vtMbsZGezM xrh9H9+8q/N+JA9J1geJu7KGKyVGKtUEKsyJjEqueFo0ucu5gxtxh7aBzlMimPkr0Mcl WlUxygfNvgEwb2hAtpKeBVJhWMgtkO+jaTFrU566tg0iym5GF7HN88VUGiOhb/Mbpvkt onjEQxvxApHKvbEfxygjhyZF/qHVWaWEsjftcpFmgSgKH6VBgAicJpXmn/EUxUkwOofS FkzQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:sender:in-reply-to:references:from :date:message-id:subject:to:cc; bh=FdpkXucGSLcQ1tenNSuClTEWooVq5mmev1UsfS4ltHc=; b=HpgUlqbtbaNitp3D5SpWCfNLm1VqTGjAgOJtGozdblltQ7Ai5VQHxa77qQ8gpO3Ucl KTYIKpKZBtUbIUfom8LT/sT+Ao8ssmTY40glC9vSERregXjAHyBNPZhlhrwk1T4myxbr jaBzKENMCve2hGqGx2cSCnCHGlZnF/jR0f8unL1qJlpuvkY2Sb2v1jk/qEbGbar2ABGK 1DRSvnBCeMWxp2p85ovXX2gSFnBEd3OThVNfyb1rzTr05vnBUysCwP7Lkf+8hG7J5X+0 lL8Oo2BkKvhaiUDrD5RZGdeKcniaHhNNGoK85+uWh2gjVLBcyuQ9r1NsgYmXR0/UKjA1 yKvA== X-Gm-Message-State: AKGB3mKCCKaFtjPxCQ1TuR2mrA3wiFsuQt90gDG82vFgYdZknqf96jhE o91h1vYtWfBnL5jim5898ai8y2rQ7xKGigzX92K0BA== X-Google-Smtp-Source: ACJfBouHEIZqBDnbO+RJUnhW1b60BaraXK5BGlDa+s+S5wljnkOMp7fY4wlEXIzcdyJftNAlWbUKKUe4lBSoqA+4vXk= X-Received: by 10.37.73.194 with SMTP id w185mr16309619yba.170.1514883833385; Tue, 02 Jan 2018 01:03:53 -0800 (PST) MIME-Version: 1.0 Sender: lists@eitanadler.com Received: by 10.37.217.21 with HTTP; Tue, 2 Jan 2018 01:03:22 -0800 (PST) In-Reply-To: <201801012322.w01NMJtw088580@pdx.rh.CN85.dnsmgr.net> References: <201801012322.w01NMJtw088580@pdx.rh.CN85.dnsmgr.net> From: Eitan Adler Date: Tue, 2 Jan 2018 01:03:22 -0800 X-Google-Sender-Auth: kmFs5FpshVtxdd8RsG0a1cyIm8w Message-ID: Subject: Re: svn commit: r327476 - head/sbin/shutdown To: rgrimes@freebsd.org Cc: Ian Lepore , "src-committers@freebsd.org" , "svn-src-all@freebsd.org" , "svn-src-head@freebsd.org" Content-Type: text/plain; charset="UTF-8" X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 02 Jan 2018 09:03:54 -0000 On 1 January 2018 at 15:22, Rodney W. Grimes wrote: >> >> Baah. This is what happens when my build/test and commit box are not the >> same. Will fix later when I get back home. Done. One of these days I will actually perfect my edit-test-commit cycle and make fewer mistakes :'( -- Eitan Adler Source, Ports, Doc committer Bugmeister, Ports Security teams From owner-svn-src-head@freebsd.org Tue Jan 2 14:07:56 2018 Return-Path: Delivered-To: svn-src-head@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 CE7F6EA7491; Tue, 2 Jan 2018 14:07:56 +0000 (UTC) (envelope-from emaste@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 925E780441; Tue, 2 Jan 2018 14:07:56 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w02E7tIE077774; Tue, 2 Jan 2018 14:07:55 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w02E7tOp077773; Tue, 2 Jan 2018 14:07:55 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <201801021407.w02E7tOp077773@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Tue, 2 Jan 2018 14:07:55 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r327489 - head/contrib/elftoolchain/elfcopy X-SVN-Group: head X-SVN-Commit-Author: emaste X-SVN-Commit-Paths: head/contrib/elftoolchain/elfcopy X-SVN-Commit-Revision: 327489 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 02 Jan 2018 14:07:56 -0000 Author: emaste Date: Tue Jan 2 14:07:55 2018 New Revision: 327489 URL: https://svnweb.freebsd.org/changeset/base/327489 Log: elfcopy: copy raw (untranslated) contents to binary output Previously elfcopy used elf_getdata to obtain data from ELF sections being copied to binary output, but elf_getdata returns data that has been translated - that is, data is in host byte order. When the host and target differ in endianness (e.g., converting a big-endian MIPS ELF object to binary on an x86 host) this resulted in byte-swapped data in certain sections such as .dynamic. Instead use elf_rawdata to keep data in the original, target endianness. Reported by: Hiroki Mori , Bill Yuan MFC after: 1 week Sponsored by: The FreeBSD Foundation Modified: head/contrib/elftoolchain/elfcopy/binary.c Modified: head/contrib/elftoolchain/elfcopy/binary.c ============================================================================== --- head/contrib/elftoolchain/elfcopy/binary.c Tue Jan 2 09:02:42 2018 (r327488) +++ head/contrib/elftoolchain/elfcopy/binary.c Tue Jan 2 14:07:55 2018 (r327489) @@ -101,10 +101,10 @@ create_binary(int ifd, int ofd) sh.sh_size == 0) continue; (void) elf_errno(); - if ((d = elf_getdata(scn, NULL)) == NULL) { + if ((d = elf_rawdata(scn, NULL)) == NULL) { elferr = elf_errno(); if (elferr != 0) - warnx("elf_getdata failed: %s", elf_errmsg(-1)); + warnx("elf_rawdata failed: %s", elf_errmsg(-1)); continue; } if (d->d_buf == NULL || d->d_size == 0) From owner-svn-src-head@freebsd.org Tue Jan 2 14:54:55 2018 Return-Path: Delivered-To: svn-src-head@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 AC25CEA9667; Tue, 2 Jan 2018 14:54:55 +0000 (UTC) (envelope-from kevans@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 861B52AF9; Tue, 2 Jan 2018 14:54:55 +0000 (UTC) (envelope-from kevans@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w02Ess8S099454; Tue, 2 Jan 2018 14:54:54 GMT (envelope-from kevans@FreeBSD.org) Received: (from kevans@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w02Ess5q099452; Tue, 2 Jan 2018 14:54:54 GMT (envelope-from kevans@FreeBSD.org) Message-Id: <201801021454.w02Ess5q099452@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kevans set sender to kevans@FreeBSD.org using -f From: Kyle Evans Date: Tue, 2 Jan 2018 14:54:54 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r327490 - head/share/man/man4 X-SVN-Group: head X-SVN-Commit-Author: kevans X-SVN-Commit-Paths: head/share/man/man4 X-SVN-Commit-Revision: 327490 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 02 Jan 2018 14:54:55 -0000 Author: kevans Date: Tue Jan 2 14:54:54 2018 New Revision: 327490 URL: https://svnweb.freebsd.org/changeset/base/327490 Log: aw_sid: Add man page for this driver Reviewed by: manu, bjk (both earlier version), brueffer (manpages) Differential Revision: https://reviews.freebsd.org/D13720 Added: head/share/man/man4/aw_sid.4 (contents, props changed) Modified: head/share/man/man4/Makefile Modified: head/share/man/man4/Makefile ============================================================================== --- head/share/man/man4/Makefile Tue Jan 2 14:07:55 2018 (r327489) +++ head/share/man/man4/Makefile Tue Jan 2 14:54:54 2018 (r327490) @@ -73,6 +73,7 @@ MAN= aac.4 \ ${_aw_gpio.4} \ ${_aw_mmc.4} \ ${_aw_rtc.4} \ + ${_aw_sid.4} \ axe.4 \ axge.4 \ bce.4 \ @@ -763,6 +764,7 @@ _armv8crypto.4= armv8crypto.4 _aw_gpio.4= aw_gpio.4 _aw_mmc.4= aw_mmc.4 _aw_rtc.4= aw_rtc.4 +_aw_sid.4= aw_sid.4 .endif .if ${MACHINE_CPUARCH} == "amd64" || ${MACHINE_CPUARCH} == "i386" Added: head/share/man/man4/aw_sid.4 ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/share/man/man4/aw_sid.4 Tue Jan 2 14:54:54 2018 (r327490) @@ -0,0 +1,74 @@ +.\"- +.\" Copyright (c) 2018 Kyle Evans +.\" All rights reserved. +.\" +.\" Redistribution and use in source and binary forms, with or without +.\" modification, are permitted provided that the following conditions +.\" are met: +.\" 1. Redistributions of source code must retain the above copyright +.\" notice, this list of conditions and the following disclaimer. +.\" 2. Redistributions in binary form must reproduce the above copyright +.\" notice, this list of conditions and the following disclaimer in the +.\" documentation and/or other materials provided with the distribution. +.\" +.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND +.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE +.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +.\" SUCH DAMAGE. +.\" +.\" $FreeBSD$ +.\" +.Dd January 2, 2018 +.Dt AW_SID 4 +.Os +.Sh NAME +.Nm aw_sid +.Nd driver for the SID controller in Allwinner SoC +.Sh DESCRIPTION +The +.Nm +device driver provides support for the Allwinner SID (Security ID) controller. +This controller provides root security keys that may be used as either a device +unique ID or to generate a MAC address. +.Sh HARDWARE +The +.Nm +driver supports the SID controller with one of the following compatible +strings: +.Pp +.Bl -bullet -compact +.It +allwinner,sun4i-a10-sid +.It +allwinner,sun7i-a20-sid +.It +allwinner,sun50i-a64-sid +.It +allwinner,sun8i-a83t-sid +.El +.Sh SYSCTL VARIABLES +The following read-only variables are available via +.Xr sysctl 8 : +.Bl -tag -width indent +.It Va dev.aw_sid.rootkey +Root security key for this device. +.El +.Sh HISTORY +The +.Nm +device driver first appeared in +.Fx 11.0 . +.Sh AUTHORS +The +.Nm +device driver was written by +.An Jared McNeill Aq Mt jmcneill@invisible.ca . +This manual page was written by +.An Kyle Evans Aq Mt kevans@FreeBSD.org . From owner-svn-src-head@freebsd.org Tue Jan 2 15:29:09 2018 Return-Path: Delivered-To: svn-src-head@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 92378EAAE22; Tue, 2 Jan 2018 15:29:09 +0000 (UTC) (envelope-from freebsd@pdx.rh.CN85.dnsmgr.net) Received: from pdx.rh.CN85.dnsmgr.net (br1.CN84in.dnsmgr.net [69.59.192.140]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id F0083633E4; Tue, 2 Jan 2018 15:29:08 +0000 (UTC) (envelope-from freebsd@pdx.rh.CN85.dnsmgr.net) Received: from pdx.rh.CN85.dnsmgr.net (localhost [127.0.0.1]) by pdx.rh.CN85.dnsmgr.net (8.13.3/8.13.3) with ESMTP id w02FT5kF091778; Tue, 2 Jan 2018 07:29:05 -0800 (PST) (envelope-from freebsd@pdx.rh.CN85.dnsmgr.net) Received: (from freebsd@localhost) by pdx.rh.CN85.dnsmgr.net (8.13.3/8.13.3/Submit) id w02FT557091777; Tue, 2 Jan 2018 07:29:05 -0800 (PST) (envelope-from freebsd) From: "Rodney W. Grimes" Message-Id: <201801021529.w02FT557091777@pdx.rh.CN85.dnsmgr.net> Subject: Re: svn commit: r327476 - head/sbin/shutdown In-Reply-To: To: Eitan Adler Date: Tue, 2 Jan 2018 07:29:05 -0800 (PST) CC: rgrimes@freebsd.org, Ian Lepore , "src-committers@freebsd.org" , "svn-src-all@freebsd.org" , "svn-src-head@freebsd.org" Reply-To: rgrimes@freebsd.org X-Mailer: ELM [version 2.4ME+ PL121h (25)] MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=US-ASCII X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 02 Jan 2018 15:29:09 -0000 [ Charset UTF-8 unsupported, converting... ] > On 1 January 2018 at 15:22, Rodney W. Grimes > wrote: > >> > >> Baah. This is what happens when my build/test and commit box are not the > >> same. Will fix later when I get back home. > > Done. One of these days I will actually perfect my edit-test-commit > cycle and make fewer mistakes :'( Thank you, it is a long and steep learning curve, some of us are still on it! -- Rod Grimes rgrimes@freebsd.org From owner-svn-src-head@freebsd.org Tue Jan 2 16:50:59 2018 Return-Path: Delivered-To: svn-src-head@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 0474EEAEA6E; Tue, 2 Jan 2018 16:50:59 +0000 (UTC) (envelope-from bapt@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 CF59A68C6A; Tue, 2 Jan 2018 16:50:58 +0000 (UTC) (envelope-from bapt@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w02GovIr052195; Tue, 2 Jan 2018 16:50:57 GMT (envelope-from bapt@FreeBSD.org) Received: (from bapt@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w02GovpW052192; Tue, 2 Jan 2018 16:50:57 GMT (envelope-from bapt@FreeBSD.org) Message-Id: <201801021650.w02GovpW052192@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bapt set sender to bapt@FreeBSD.org using -f From: Baptiste Daroussin Date: Tue, 2 Jan 2018 16:50:57 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r327494 - head/usr.sbin/mailwrapper X-SVN-Group: head X-SVN-Commit-Author: bapt X-SVN-Commit-Paths: head/usr.sbin/mailwrapper X-SVN-Commit-Revision: 327494 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 02 Jan 2018 16:50:59 -0000 Author: bapt Date: Tue Jan 2 16:50:57 2018 New Revision: 327494 URL: https://svnweb.freebsd.org/changeset/base/327494 Log: Revert r326844 There has been some fallout from the change. The change itself was not valueable enough to spend time investigating the corner cases, let's just back it out. Reported by: flo Modified: head/usr.sbin/mailwrapper/Makefile head/usr.sbin/mailwrapper/Makefile.depend head/usr.sbin/mailwrapper/mailwrapper.c Modified: head/usr.sbin/mailwrapper/Makefile ============================================================================== --- head/usr.sbin/mailwrapper/Makefile Tue Jan 2 16:19:41 2018 (r327493) +++ head/usr.sbin/mailwrapper/Makefile Tue Jan 2 16:50:57 2018 (r327494) @@ -5,6 +5,8 @@ .if ${MK_MAILWRAPPER} != "no" PROG= mailwrapper MAN= mailwrapper.8 + +LIBADD= util .endif .if ${MK_MAILWRAPPER} != "no" || ${MK_SENDMAIL} != "no" Modified: head/usr.sbin/mailwrapper/Makefile.depend ============================================================================== --- head/usr.sbin/mailwrapper/Makefile.depend Tue Jan 2 16:19:41 2018 (r327493) +++ head/usr.sbin/mailwrapper/Makefile.depend Tue Jan 2 16:50:57 2018 (r327494) @@ -7,7 +7,8 @@ DIRDEPS = \ include/xlocale \ lib/${CSU_DIR} \ lib/libc \ - lib/libcompiler_rt + lib/libcompiler_rt \ + lib/libutil \ .include Modified: head/usr.sbin/mailwrapper/mailwrapper.c ============================================================================== --- head/usr.sbin/mailwrapper/mailwrapper.c Tue Jan 2 16:19:41 2018 (r327493) +++ head/usr.sbin/mailwrapper/mailwrapper.c Tue Jan 2 16:50:57 2018 (r327494) @@ -44,6 +44,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include @@ -88,17 +89,14 @@ int main(int argc, char *argv[], char *envp[]) { FILE *config; - char *line, *cp, *from, *to, *ap, *walk; + char *line, *cp, *from, *to, *ap; const char *progname; char localmailerconf[MAXPATHLEN]; const char *mailerconf; - size_t linecap = 0, lineno = 0; - ssize_t linelen; + size_t len, lineno = 0; int i; struct arglist al; - line = NULL; - /* change __progname to mailwrapper so we get sensible error messages */ progname = getprogname(); setprogname("mailwrapper"); @@ -125,16 +123,12 @@ main(int argc, char *argv[], char *envp[]) } for (;;) { - if ((linelen = getline(&line, &linecap, config)) <= 0) { - if (feof(config)) { + if ((line = fparseln(config, &len, &lineno, NULL, 0)) == NULL) { + if (feof(config)) errx(EX_CONFIG, "no mapping in %s", mailerconf); - } err(EX_CONFIG, "cannot parse line %lu", (u_long)lineno); } - lineno++; - walk = line; - /* strip comments */ - strsep(&walk, "#"); + #define WS " \t\n" cp = line; From owner-svn-src-head@freebsd.org Tue Jan 2 17:25:14 2018 Return-Path: Delivered-To: svn-src-head@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 8FA8FEAFF9E; Tue, 2 Jan 2018 17:25:14 +0000 (UTC) (envelope-from cem@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 676DD69EA0; Tue, 2 Jan 2018 17:25:14 +0000 (UTC) (envelope-from cem@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w02HPDEB068480; Tue, 2 Jan 2018 17:25:13 GMT (envelope-from cem@FreeBSD.org) Received: (from cem@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w02HPDaj068477; Tue, 2 Jan 2018 17:25:13 GMT (envelope-from cem@FreeBSD.org) Message-Id: <201801021725.w02HPDaj068477@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: cem set sender to cem@FreeBSD.org using -f From: Conrad Meyer Date: Tue, 2 Jan 2018 17:25:13 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r327495 - head/usr.sbin/rpcbind X-SVN-Group: head X-SVN-Commit-Author: cem X-SVN-Commit-Paths: head/usr.sbin/rpcbind X-SVN-Commit-Revision: 327495 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 02 Jan 2018 17:25:14 -0000 Author: cem Date: Tue Jan 2 17:25:13 2018 New Revision: 327495 URL: https://svnweb.freebsd.org/changeset/base/327495 Log: rpcbind: Fix race in signal termination If a signal was delivered while the main thread was not in poll(2) and after check was performed, we could reenter poll and never detect termination. Fix this with the pipefd trick. (This race was introduced very recently, in r327482.) PR: 224503 Reported by: kib Reviewed by: kib, markj Sponsored by: Dell EMC Isilon Modified: head/usr.sbin/rpcbind/rpcb_svc_com.c head/usr.sbin/rpcbind/rpcbind.c head/usr.sbin/rpcbind/rpcbind.h Modified: head/usr.sbin/rpcbind/rpcb_svc_com.c ============================================================================== --- head/usr.sbin/rpcbind/rpcb_svc_com.c Tue Jan 2 16:50:57 2018 (r327494) +++ head/usr.sbin/rpcbind/rpcb_svc_com.c Tue Jan 2 17:25:13 2018 (r327495) @@ -1101,7 +1101,7 @@ void my_svc_run(void) { size_t nfds; - struct pollfd pollfds[FD_SETSIZE]; + struct pollfd pollfds[FD_SETSIZE + 1]; int poll_ret, check_ret; int n; #ifdef SVC_RUN_DEBUG @@ -1112,6 +1112,9 @@ my_svc_run(void) for (;;) { p = pollfds; + p->fd = terminate_rfd; + p->events = MASKVAL; + p++; for (n = 0; n <= svc_maxfd; n++) { if (FD_ISSET(n, &svc_fdset)) { p->fd = n; @@ -1130,23 +1133,26 @@ my_svc_run(void) fprintf(stderr, ">\n"); } #endif - switch (poll_ret = poll(pollfds, nfds, 30 * 1000)) { + poll_ret = poll(pollfds, nfds, 30 * 1000); + + if (doterminate != 0) { + close(rpcbindlockfd); +#ifdef WARMSTART + syslog(LOG_ERR, + "rpcbind terminating on signal %d. Restart with \"rpcbind -w\"", + (int)doterminate); + write_warmstart(); /* Dump yourself */ +#endif + exit(2); + } + + switch (poll_ret) { case -1: /* * We ignore all errors, continuing with the assumption * that it was set by the signal handlers (or any * other outside event) and not caused by poll(). */ - if (doterminate != 0) { - close(rpcbindlockfd); -#ifdef WARMSTART - syslog(LOG_ERR, - "rpcbind terminating on signal %d. Restart with \"rpcbind -w\"", - (int)doterminate); - write_warmstart(); /* Dump yourself */ -#endif - exit(2); - } case 0: cleanfds = svc_fdset; __svc_clean_idle(&cleanfds, 30, FALSE); Modified: head/usr.sbin/rpcbind/rpcbind.c ============================================================================== --- head/usr.sbin/rpcbind/rpcbind.c Tue Jan 2 16:50:57 2018 (r327494) +++ head/usr.sbin/rpcbind/rpcbind.c Tue Jan 2 17:25:13 2018 (r327495) @@ -79,6 +79,7 @@ static char sccsid[] = "@(#)rpcbind.c 1.35 89/04/21 Co /* Global variables */ int debugging = 0; /* Tell me what's going on */ int doabort = 0; /* When debugging, do an abort on errors */ +int terminate_rfd; /* Pipefd to wake on signal */ volatile sig_atomic_t doterminate = 0; /* Terminal signal received */ rpcblist_ptr list_rbl; /* A list of version 3/4 rpcbind services */ int rpcbindlockfd; @@ -101,6 +102,7 @@ static struct sockaddr **bound_sa; static int ipv6_only = 0; static int nhosts = 0; static int on = 1; +static int terminate_wfd; #ifdef WARMSTART /* Local Variable */ @@ -133,6 +135,7 @@ main(int argc, char *argv[]) void *nc_handle; /* Net config handle */ struct rlimit rl; int maxrec = RPC_MAXDATASIZE; + int error, fds[2]; parseargs(argc, argv); @@ -192,6 +195,16 @@ main(int argc, char *argv[]) } endnetconfig(nc_handle); + /* + * Allocate pipe fd to wake main thread from signal handler in non-racy + * way. + */ + error = pipe(fds); + if (error != 0) + err(1, "pipe failed"); + terminate_rfd = fds[0]; + terminate_wfd = fds[1]; + /* catch the usual termination signals for graceful exit */ (void) signal(SIGCHLD, reap); (void) signal(SIGINT, terminate); @@ -761,8 +774,13 @@ rbllist_add(rpcprog_t prog, rpcvers_t vers, struct net static void terminate(int signum) { + char c = '\0'; + ssize_t wr; doterminate = signum; + wr = write(terminate_wfd, &c, 1); + if (wr < 1) + _exit(2); } void Modified: head/usr.sbin/rpcbind/rpcbind.h ============================================================================== --- head/usr.sbin/rpcbind/rpcbind.h Tue Jan 2 16:50:57 2018 (r327494) +++ head/usr.sbin/rpcbind/rpcbind.h Tue Jan 2 17:25:13 2018 (r327495) @@ -70,6 +70,7 @@ struct r_rmtcall_args { extern int debugging; extern int doabort; +extern int terminate_rfd; extern volatile sig_atomic_t doterminate; #ifdef LIBWRAP extern int libwrap; From owner-svn-src-head@freebsd.org Tue Jan 2 17:28:36 2018 Return-Path: Delivered-To: svn-src-head@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 0D2E0EB0157; Tue, 2 Jan 2018 17:28:36 +0000 (UTC) (envelope-from cse.cem@gmail.com) Received: from mail-it0-f45.google.com (mail-it0-f45.google.com [209.85.214.45]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id D2CDB6A099; Tue, 2 Jan 2018 17:28:35 +0000 (UTC) (envelope-from cse.cem@gmail.com) Received: by mail-it0-f45.google.com with SMTP id 68so40088881ite.4; Tue, 02 Jan 2018 09:28:35 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:reply-to:in-reply-to:references :from:date:message-id:subject:to:cc; bh=xlEhkcFPdOK1L/wJ9ZD5ohmEe9nixmf2OgLzWq6g46A=; b=grHgSKO+yWGj/y4AYATRPNX+Uk65eANEssRkB+3odBghqAf0HENKlsmos8K2QEUFk3 6DxLmpj3vwj225+c+B3FyjoBc6lED/gcpDUdvmCxs5OiNJVBPOV4F54St6YHac8/K46g Wd12WWeCjNkb4qdaOunFbgxK2pKVcS+bDJSzhnu6F+arOwJ35DJ4J9g7ir/w3T6RspyP yEltxW7gvWfimIOJPUA0svQL33Gof/xG7S2lJhloVcqKkxXA5xb7PwHWKogtn6jJicRE 4pNB/gATu443ccwfQj1N/ymz76OUVy/CP6oLcNwb+J0ZWVzGtukDoH/DsNS/XwNiAqRm M9Aw== X-Gm-Message-State: AKGB3mJaxRfGHH5IVEBBMDdOQDoopcZaUX9p/mF7LW27WC1tGunus0eg wAfIBjQgLgf5reiEvD3qL3LYbDMc X-Google-Smtp-Source: ACJfBosPAkqXM5jTUn+O5UHsi+aQzFaODVqgwyVHEm1/zwh2MjjRBHZPG8STG/jvjA/jbk3/4Oo1dg== X-Received: by 10.36.69.4 with SMTP id y4mr62024516ita.75.1514914109537; Tue, 02 Jan 2018 09:28:29 -0800 (PST) Received: from mail-it0-f43.google.com (mail-it0-f43.google.com. [209.85.214.43]) by smtp.gmail.com with ESMTPSA id b74sm16772024itd.19.2018.01.02.09.28.29 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 02 Jan 2018 09:28:29 -0800 (PST) Received: by mail-it0-f43.google.com with SMTP id b5so39431148itc.3; Tue, 02 Jan 2018 09:28:29 -0800 (PST) X-Received: by 10.36.228.68 with SMTP id o65mr62182948ith.128.1514914109083; Tue, 02 Jan 2018 09:28:29 -0800 (PST) MIME-Version: 1.0 Reply-To: cem@freebsd.org Received: by 10.2.15.193 with HTTP; Tue, 2 Jan 2018 09:28:28 -0800 (PST) In-Reply-To: <201801021725.w02HPDaj068477@repo.freebsd.org> References: <201801021725.w02HPDaj068477@repo.freebsd.org> From: Conrad Meyer Date: Tue, 2 Jan 2018 09:28:28 -0800 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: svn commit: r327495 - head/usr.sbin/rpcbind To: svn-src-head@freebsd.org Cc: src-committers , svn-src-all@freebsd.org Content-Type: text/plain; charset="UTF-8" X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 02 Jan 2018 17:28:36 -0000 On Tue, Jan 2, 2018 at 9:25 AM, Conrad Meyer wrote: > Author: cem > Date: Tue Jan 2 17:25:13 2018 > New Revision: 327495 > URL: https://svnweb.freebsd.org/changeset/base/327495 > > Log: > rpcbind: Fix race in signal termination > > If a signal was delivered while the main thread was not in poll(2) and after > check was performed, we could reenter poll and never detect termination. Fix > this with the pipefd trick. (This race was introduced very recently, in > r327482.) > > PR: 224503 > Reported by: kib > Reviewed by: kib, markj > Sponsored by: Dell EMC Isilon I forgot: Differential Revision: https://reviews.freebsd.org/D13732 Thanks, Conrad From owner-svn-src-head@freebsd.org Tue Jan 2 18:11:55 2018 Return-Path: Delivered-To: svn-src-head@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 5A895EB1B6F; Tue, 2 Jan 2018 18:11:55 +0000 (UTC) (envelope-from markj@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 1C2396B7D7; Tue, 2 Jan 2018 18:11:55 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w02IBs0I086806; Tue, 2 Jan 2018 18:11:54 GMT (envelope-from markj@FreeBSD.org) Received: (from markj@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w02IBsNk086805; Tue, 2 Jan 2018 18:11:54 GMT (envelope-from markj@FreeBSD.org) Message-Id: <201801021811.w02IBsNk086805@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: markj set sender to markj@FreeBSD.org using -f From: Mark Johnston Date: Tue, 2 Jan 2018 18:11:54 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r327496 - head/sys/geom/mirror X-SVN-Group: head X-SVN-Commit-Author: markj X-SVN-Commit-Paths: head/sys/geom/mirror X-SVN-Commit-Revision: 327496 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 02 Jan 2018 18:11:55 -0000 Author: markj Date: Tue Jan 2 18:11:54 2018 New Revision: 327496 URL: https://svnweb.freebsd.org/changeset/base/327496 Log: Fix some I/O ordering issues in gmirror. - BIO_FLUSH requests were dispatched to the disks directly from g_mirror_start() rather than going through the mirror's I/O request queue, so they could have been reordered with preceding writes. Address this by processing such requests from the queue, avoiding direct dispatch. - Handling for collisions with synchronization requests was too fine-grained and could cause reordering of writes. In particular, BIO_ORDERED was not being honoured. Address this by effectively freezing the request queue any time a collision with a synchronization request occurs. The queue is unfrozen once the collision with the first frozen request is over. - The above-mentioned collision handling allowed reads to jump ahead of writes to the same offset. Address this by freezing all request types when a collision occurs, not just BIO_WRITEs and BIO_DELETEs. Also add some more fail points for use in testing error handling. Reviewed by: imp MFC after: 3 weeks Sponsored by: Dell EMC Isilon Differential Revision: https://reviews.freebsd.org/D13559 Modified: head/sys/geom/mirror/g_mirror.c Modified: head/sys/geom/mirror/g_mirror.c ============================================================================== --- head/sys/geom/mirror/g_mirror.c Tue Jan 2 17:25:13 2018 (r327495) +++ head/sys/geom/mirror/g_mirror.c Tue Jan 2 18:11:54 2018 (r327496) @@ -111,7 +111,8 @@ static void g_mirror_update_device(struct g_mirror_sof static void g_mirror_dumpconf(struct sbuf *sb, const char *indent, struct g_geom *gp, struct g_consumer *cp, struct g_provider *pp); static void g_mirror_sync_stop(struct g_mirror_disk *disk, int type); -static void g_mirror_register_request(struct bio *bp); +static void g_mirror_register_request(struct g_mirror_softc *sc, + struct bio *bp); static void g_mirror_sync_release(struct g_mirror_softc *sc); @@ -892,27 +893,6 @@ g_mirror_unidle(struct g_mirror_softc *sc) } static void -g_mirror_flush_done(struct bio *bp) -{ - struct g_mirror_softc *sc; - struct bio *pbp; - - pbp = bp->bio_parent; - sc = pbp->bio_to->private; - mtx_lock(&sc->sc_done_mtx); - if (pbp->bio_error == 0) - pbp->bio_error = bp->bio_error; - pbp->bio_completed += bp->bio_completed; - pbp->bio_inbed++; - if (pbp->bio_children == pbp->bio_inbed) { - mtx_unlock(&sc->sc_done_mtx); - g_io_deliver(pbp, pbp->bio_error); - } else - mtx_unlock(&sc->sc_done_mtx); - g_destroy_bio(bp); -} - -static void g_mirror_done(struct bio *bp) { struct g_mirror_softc *sc; @@ -926,32 +906,76 @@ g_mirror_done(struct bio *bp) } static void -g_mirror_regular_request(struct bio *bp) +g_mirror_regular_request_error(struct g_mirror_softc *sc, struct bio *bp) { - struct g_mirror_softc *sc; struct g_mirror_disk *disk; + + disk = bp->bio_from->private; + + if (bp->bio_cmd == BIO_FLUSH && bp->bio_error == EOPNOTSUPP) + return; + if (disk == NULL) + return; + + if ((disk->d_flags & G_MIRROR_DISK_FLAG_BROKEN) == 0) { + disk->d_flags |= G_MIRROR_DISK_FLAG_BROKEN; + G_MIRROR_LOGREQ(0, bp, "Request failed (error=%d).", + bp->bio_error); + } else { + G_MIRROR_LOGREQ(1, bp, "Request failed (error=%d).", + bp->bio_error); + } + if (g_mirror_disconnect_on_failure && + g_mirror_ndisks(sc, G_MIRROR_DISK_STATE_ACTIVE) > 1) { + if (bp->bio_error == ENXIO && + bp->bio_cmd == BIO_READ) + sc->sc_bump_id |= G_MIRROR_BUMP_SYNCID; + else if (bp->bio_error == ENXIO) + sc->sc_bump_id |= G_MIRROR_BUMP_SYNCID_NOW; + else + sc->sc_bump_id |= G_MIRROR_BUMP_GENID; + g_mirror_event_send(disk, G_MIRROR_DISK_STATE_DISCONNECTED, + G_MIRROR_EVENT_DONTWAIT); + } +} + +static void +g_mirror_regular_request(struct g_mirror_softc *sc, struct bio *bp) +{ struct bio *pbp; g_topology_assert_not(); + KASSERT(sc->sc_provider == bp->bio_parent->bio_to, + ("regular request %p with unexpected origin", bp)); pbp = bp->bio_parent; - sc = pbp->bio_to->private; bp->bio_from->index--; if (bp->bio_cmd == BIO_WRITE || bp->bio_cmd == BIO_DELETE) sc->sc_writes--; - disk = bp->bio_from->private; - if (disk == NULL) { + if (bp->bio_from->private == NULL) { g_topology_lock(); g_mirror_kill_consumer(sc, bp->bio_from); g_topology_unlock(); } - if (bp->bio_cmd == BIO_READ) + switch (bp->bio_cmd) { + case BIO_READ: KFAIL_POINT_ERROR(DEBUG_FP, g_mirror_regular_request_read, bp->bio_error); - else if (bp->bio_cmd == BIO_WRITE) + break; + case BIO_WRITE: KFAIL_POINT_ERROR(DEBUG_FP, g_mirror_regular_request_write, bp->bio_error); + break; + case BIO_DELETE: + KFAIL_POINT_ERROR(DEBUG_FP, g_mirror_regular_request_delete, + bp->bio_error); + break; + case BIO_FLUSH: + KFAIL_POINT_ERROR(DEBUG_FP, g_mirror_regular_request_flush, + bp->bio_error); + break; + } pbp->bio_inbed++; KASSERT(pbp->bio_inbed <= pbp->bio_children, @@ -975,35 +999,11 @@ g_mirror_regular_request(struct bio *bp) } else if (bp->bio_error != 0) { if (pbp->bio_error == 0) pbp->bio_error = bp->bio_error; - if (disk != NULL) { - if ((disk->d_flags & G_MIRROR_DISK_FLAG_BROKEN) == 0) { - disk->d_flags |= G_MIRROR_DISK_FLAG_BROKEN; - G_MIRROR_LOGREQ(0, bp, - "Request failed (error=%d).", - bp->bio_error); - } else { - G_MIRROR_LOGREQ(1, bp, - "Request failed (error=%d).", - bp->bio_error); - } - if (g_mirror_disconnect_on_failure && - g_mirror_ndisks(sc, G_MIRROR_DISK_STATE_ACTIVE) > 1) - { - if (bp->bio_error == ENXIO && - bp->bio_cmd == BIO_READ) - sc->sc_bump_id |= G_MIRROR_BUMP_SYNCID; - else if (bp->bio_error == ENXIO) - sc->sc_bump_id |= G_MIRROR_BUMP_SYNCID_NOW; - else - sc->sc_bump_id |= G_MIRROR_BUMP_GENID; - g_mirror_event_send(disk, - G_MIRROR_DISK_STATE_DISCONNECTED, - G_MIRROR_EVENT_DONTWAIT); - } - } + g_mirror_regular_request_error(sc, bp); switch (pbp->bio_cmd) { case BIO_DELETE: case BIO_WRITE: + case BIO_FLUSH: pbp->bio_inbed--; pbp->bio_children--; break; @@ -1028,6 +1028,7 @@ g_mirror_regular_request(struct bio *bp) break; case BIO_DELETE: case BIO_WRITE: + case BIO_FLUSH: if (pbp->bio_children == 0) { /* * All requests failed. @@ -1040,9 +1041,11 @@ g_mirror_regular_request(struct bio *bp) pbp->bio_error = 0; pbp->bio_completed = pbp->bio_length; } - TAILQ_REMOVE(&sc->sc_inflight, pbp, bio_queue); - /* Release delayed sync requests if possible. */ - g_mirror_sync_release(sc); + if (pbp->bio_cmd == BIO_WRITE || pbp->bio_cmd == BIO_DELETE) { + TAILQ_REMOVE(&sc->sc_inflight, pbp, bio_queue); + /* Release delayed sync requests if possible. */ + g_mirror_sync_release(sc); + } g_io_deliver(pbp, pbp->bio_error); break; default: @@ -1115,47 +1118,6 @@ g_mirror_kernel_dump(struct bio *bp) } static void -g_mirror_flush(struct g_mirror_softc *sc, struct bio *bp) -{ - struct bio_queue queue; - struct g_mirror_disk *disk; - struct g_consumer *cp; - struct bio *cbp; - - TAILQ_INIT(&queue); - LIST_FOREACH(disk, &sc->sc_disks, d_next) { - if (disk->d_state != G_MIRROR_DISK_STATE_ACTIVE) - continue; - cbp = g_clone_bio(bp); - if (cbp == NULL) { - while ((cbp = TAILQ_FIRST(&queue)) != NULL) { - TAILQ_REMOVE(&queue, cbp, bio_queue); - g_destroy_bio(cbp); - } - if (bp->bio_error == 0) - bp->bio_error = ENOMEM; - g_io_deliver(bp, bp->bio_error); - return; - } - TAILQ_INSERT_TAIL(&queue, cbp, bio_queue); - cbp->bio_done = g_mirror_flush_done; - cbp->bio_caller1 = disk; - cbp->bio_to = disk->d_consumer->provider; - } - while ((cbp = TAILQ_FIRST(&queue)) != NULL) { - TAILQ_REMOVE(&queue, cbp, bio_queue); - G_MIRROR_LOGREQ(3, cbp, "Sending request."); - disk = cbp->bio_caller1; - cbp->bio_caller1 = NULL; - cp = disk->d_consumer; - KASSERT(cp->acr >= 1 && cp->acw >= 1 && cp->ace >= 1, - ("Consumer %s not opened (r%dw%de%d).", cp->provider->name, - cp->acr, cp->acw, cp->ace)); - g_io_request(cbp, disk->d_consumer); - } -} - -static void g_mirror_start(struct bio *bp) { struct g_mirror_softc *sc; @@ -1174,10 +1136,8 @@ g_mirror_start(struct bio *bp) case BIO_READ: case BIO_WRITE: case BIO_DELETE: - break; case BIO_FLUSH: - g_mirror_flush(sc, bp); - return; + break; case BIO_GETATTR: if (!strcmp(bp->bio_attribute, "GEOM::candelete")) { g_mirror_candelete(bp); @@ -1259,14 +1219,14 @@ g_mirror_regular_collision(struct g_mirror_softc *sc, } /* - * Puts request onto delayed queue. + * Puts regular request onto delayed queue. */ static void g_mirror_regular_delay(struct g_mirror_softc *sc, struct bio *bp) { G_MIRROR_LOGREQ(2, bp, "Delaying request."); - TAILQ_INSERT_HEAD(&sc->sc_regular_delayed, bp, bio_queue); + TAILQ_INSERT_TAIL(&sc->sc_regular_delayed, bp, bio_queue); } /* @@ -1281,23 +1241,23 @@ g_mirror_sync_delay(struct g_mirror_softc *sc, struct } /* - * Releases delayed regular requests which don't collide anymore with sync - * requests. + * Requeue delayed regular requests. */ static void g_mirror_regular_release(struct g_mirror_softc *sc) { - struct bio *bp, *bp2; + struct bio *bp; - TAILQ_FOREACH_SAFE(bp, &sc->sc_regular_delayed, bio_queue, bp2) { - if (g_mirror_sync_collision(sc, bp)) - continue; - TAILQ_REMOVE(&sc->sc_regular_delayed, bp, bio_queue); - G_MIRROR_LOGREQ(2, bp, "Releasing delayed request (%p).", bp); - mtx_lock(&sc->sc_queue_mtx); - TAILQ_INSERT_HEAD(&sc->sc_queue, bp, bio_queue); - mtx_unlock(&sc->sc_queue_mtx); - } + if ((bp = TAILQ_FIRST(&sc->sc_regular_delayed)) == NULL) + return; + if (g_mirror_sync_collision(sc, bp)) + return; + + G_MIRROR_DEBUG(2, "Requeuing regular requests after collision."); + mtx_lock(&sc->sc_queue_mtx); + TAILQ_CONCAT(&sc->sc_regular_delayed, &sc->sc_queue, bio_queue); + TAILQ_SWAP(&sc->sc_regular_delayed, &sc->sc_queue, bio, bio_queue); + mtx_unlock(&sc->sc_queue_mtx); } /* @@ -1345,14 +1305,17 @@ g_mirror_sync_request_free(struct g_mirror_disk *disk, * send. */ static void -g_mirror_sync_request(struct bio *bp) +g_mirror_sync_request(struct g_mirror_softc *sc, struct bio *bp) { - struct g_mirror_softc *sc; struct g_mirror_disk *disk; struct g_mirror_disk_sync *sync; + KASSERT((bp->bio_cmd == BIO_READ && + bp->bio_from->geom == sc->sc_sync.ds_geom) || + (bp->bio_cmd == BIO_WRITE && bp->bio_from->geom == sc->sc_geom), + ("Sync BIO %p with unexpected origin", bp)); + bp->bio_from->index--; - sc = bp->bio_from->geom->softc; disk = bp->bio_from->private; if (disk == NULL) { sx_xunlock(&sc->sc_lock); /* Avoid recursion on sc_lock. */ @@ -1457,7 +1420,7 @@ g_mirror_sync_request(struct bio *bp) else g_io_request(bp, sync->ds_consumer); - /* Release delayed requests if possible. */ + /* Requeue delayed requests if possible. */ g_mirror_regular_release(sc); /* Find the smallest offset */ @@ -1685,11 +1648,26 @@ g_mirror_request_split(struct g_mirror_softc *sc, stru } static void -g_mirror_register_request(struct bio *bp) +g_mirror_register_request(struct g_mirror_softc *sc, struct bio *bp) { - struct g_mirror_softc *sc; + struct bio_queue queue; + struct bio *cbp; + struct g_consumer *cp; + struct g_mirror_disk *disk; - sc = bp->bio_to->private; + sx_assert(&sc->sc_lock, SA_XLOCKED); + + /* + * To avoid ordering issues, if a write is deferred because of a + * collision with a sync request, all I/O is deferred until that + * write is initiated. + */ + if (bp->bio_from->geom != sc->sc_sync.ds_geom && + !TAILQ_EMPTY(&sc->sc_regular_delayed)) { + g_mirror_regular_delay(sc, bp); + return; + } + switch (bp->bio_cmd) { case BIO_READ: switch (sc->sc_balance) { @@ -1709,13 +1687,6 @@ g_mirror_register_request(struct bio *bp) return; case BIO_WRITE: case BIO_DELETE: - { - struct bio_queue queue; - struct g_mirror_disk *disk; - struct g_mirror_disk_sync *sync; - struct g_consumer *cp; - struct bio *cbp; - /* * Delay the request if it is colliding with a synchronization * request. @@ -1744,12 +1715,11 @@ g_mirror_register_request(struct bio *bp) */ TAILQ_INIT(&queue); LIST_FOREACH(disk, &sc->sc_disks, d_next) { - sync = &disk->d_sync; switch (disk->d_state) { case G_MIRROR_DISK_STATE_ACTIVE: break; case G_MIRROR_DISK_STATE_SYNCHRONIZING: - if (bp->bio_offset >= sync->ds_offset) + if (bp->bio_offset >= disk->d_sync.ds_offset) continue; break; default: @@ -1779,6 +1749,8 @@ g_mirror_register_request(struct bio *bp) cp->provider->name, cp->acr, cp->acw, cp->ace)); } if (TAILQ_EMPTY(&queue)) { + KASSERT(bp->bio_cmd == BIO_DELETE, + ("No consumers for regular request %p", bp)); g_io_deliver(bp, EOPNOTSUPP); return; } @@ -1797,7 +1769,42 @@ g_mirror_register_request(struct bio *bp) */ TAILQ_INSERT_TAIL(&sc->sc_inflight, bp, bio_queue); return; - } + case BIO_FLUSH: + TAILQ_INIT(&queue); + LIST_FOREACH(disk, &sc->sc_disks, d_next) { + if (disk->d_state != G_MIRROR_DISK_STATE_ACTIVE) + continue; + cbp = g_clone_bio(bp); + if (cbp == NULL) { + while ((cbp = TAILQ_FIRST(&queue)) != NULL) { + TAILQ_REMOVE(&queue, cbp, bio_queue); + g_destroy_bio(cbp); + } + if (bp->bio_error == 0) + bp->bio_error = ENOMEM; + g_io_deliver(bp, bp->bio_error); + return; + } + TAILQ_INSERT_TAIL(&queue, cbp, bio_queue); + cbp->bio_done = g_mirror_done; + cbp->bio_caller1 = disk; + cbp->bio_to = disk->d_consumer->provider; + } + KASSERT(!TAILQ_EMPTY(&queue), + ("No consumers for regular request %p", bp)); + while ((cbp = TAILQ_FIRST(&queue)) != NULL) { + G_MIRROR_LOGREQ(3, cbp, "Sending request."); + TAILQ_REMOVE(&queue, cbp, bio_queue); + disk = cbp->bio_caller1; + cbp->bio_caller1 = NULL; + cp = disk->d_consumer; + KASSERT(cp->acr >= 1 && cp->acw >= 1 && cp->ace >= 1, + ("Consumer %s not opened (r%dw%de%d).", cp->provider->name, + cp->acr, cp->acw, cp->ace)); + cp->index++; + g_io_request(cbp, cp); + } + break; default: KASSERT(1 == 0, ("Invalid command here: %u (device=%s)", bp->bio_cmd, sc->sc_name)); @@ -1928,15 +1935,16 @@ g_mirror_worker(void *arg) G_MIRROR_DEBUG(5, "%s: I'm here 1.", __func__); continue; } + /* * Check if we can mark array as CLEAN and if we can't take * how much seconds should we wait. */ timeout = g_mirror_idle(sc, -1); + /* - * Now I/O requests. + * Handle I/O requests. */ - /* Get first request from the queue. */ mtx_lock(&sc->sc_queue_mtx); bp = TAILQ_FIRST(&sc->sc_queue); if (bp != NULL) @@ -1969,19 +1977,33 @@ g_mirror_worker(void *arg) if (bp->bio_from->geom == sc->sc_sync.ds_geom && (bp->bio_cflags & G_MIRROR_BIO_FLAG_SYNC) != 0) { - g_mirror_sync_request(bp); /* READ */ + /* + * Handle completion of the first half (the read) of a + * block synchronization operation. + */ + g_mirror_sync_request(sc, bp); } else if (bp->bio_to != sc->sc_provider) { if ((bp->bio_cflags & G_MIRROR_BIO_FLAG_REGULAR) != 0) - g_mirror_regular_request(bp); + /* + * Handle completion of a regular I/O request. + */ + g_mirror_regular_request(sc, bp); else if ((bp->bio_cflags & G_MIRROR_BIO_FLAG_SYNC) != 0) - g_mirror_sync_request(bp); /* WRITE */ + /* + * Handle completion of the second half (the + * write) of a block synchronization operation. + */ + g_mirror_sync_request(sc, bp); else { KASSERT(0, ("Invalid request cflags=0x%hx to=%s.", bp->bio_cflags, bp->bio_to->name)); } } else { - g_mirror_register_request(bp); + /* + * Initiate an I/O request. + */ + g_mirror_register_request(sc, bp); } G_MIRROR_DEBUG(5, "%s: I'm here 9.", __func__); } From owner-svn-src-head@freebsd.org Tue Jan 2 18:14:49 2018 Return-Path: Delivered-To: svn-src-head@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 D745EEB1CEF; Tue, 2 Jan 2018 18:14:49 +0000 (UTC) (envelope-from markjdb@gmail.com) Received: from mail-qk0-x22e.google.com (mail-qk0-x22e.google.com [IPv6:2607:f8b0:400d:c09::22e]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 8EC246BA08; Tue, 2 Jan 2018 18:14:49 +0000 (UTC) (envelope-from markjdb@gmail.com) Received: by mail-qk0-x22e.google.com with SMTP id 143so47678960qki.2; Tue, 02 Jan 2018 10:14:49 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:date:from:to:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=tvHq6MpSGt51o7Q8hXBxM/W9iQi7tQYoKg9bTWtI0T4=; b=OCkqBk2Y2kRP1HAgTdogxtp7gORsMJ0rCtBZ/YqHwkgZzxI0eTE23Oa5skuqlbwQXI Z5R7bHX7DEZFWgGDFaBL4RreVbgnnGxeRdJ9lnXJFGivOISm8WL0Vm+iNQUZi/hapbnb oRI6R+l69mhZbfdFTmgpn51lkTfvu5pYKvojeRl09VPwKapmBi6SqVmZiR+u3SWrQX30 MBJJa1yOWa6HPRJmbqaDH8UU1DORJS/MlbkvASYahIMoeCeoaVbz55nwQH0HYjNi4SHj vvzxziQ+piubODC24Tp2Zgxn/Ke76A5uuUe+DBnTeUptHJcIGv0LbRJ3MYY5nNm8FIwa VchA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:date:from:to:subject:message-id :references:mime-version:content-disposition:in-reply-to:user-agent; bh=tvHq6MpSGt51o7Q8hXBxM/W9iQi7tQYoKg9bTWtI0T4=; b=qtnid4IpzwW4Vl4WDmgQ3gab+qU2g+6J6m5VVdGWKwbqHMN1p+Ketd5yFDLgYmz9r9 dflnM2AGXS3vqDzR3zE0KKf4Nzc2uhy958NAzmff8LxcfoikAR/cz88L9MT5eZ5RFFi/ acOih8fouN+48JvmKYN7owVcrnmMr0bjWbQRGqTkx0ZcvV/9An/UG21bY5GFCTGbnxM2 XB52vnJXgvNU09b8GfIw2zhEw5WprLNMEmekkAMLcUSY4iAY/wrP62McD1mmqHLR9Wi7 JQPkZI4sNUiShTaRYaQbDGh+gCRaKQV692T21bnG5lAjkOfXNnhVAh5NXhq9VBjteTdI Nntg== X-Gm-Message-State: AKGB3mIKv9efdGp3TwzrI6h3SP8xBPAjcKCrBRy+M6znSZ4BfPKDzgD6 VUyT5P8mK+3KHDrpZZQWlfiDzg== X-Google-Smtp-Source: ACJfBosf8m6wucjnq1gGVwdmH1XyxZqEcixwF7/Cc2C0+VtIi1VBWU07B1HL4aABz+HrUQ2KrEQQHA== X-Received: by 10.55.26.195 with SMTP id l64mr60287817qkh.40.1514916887840; Tue, 02 Jan 2018 10:14:47 -0800 (PST) Received: from raichu (toroon0560w-lp140-01-69-159-38-159.dsl.bell.ca. [69.159.38.159]) by smtp.gmail.com with ESMTPSA id p8sm29490082qtj.70.2018.01.02.10.14.46 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 02 Jan 2018 10:14:46 -0800 (PST) Sender: Mark Johnston Date: Tue, 2 Jan 2018 13:14:41 -0500 From: Mark Johnston To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r327496 - head/sys/geom/mirror Message-ID: <20180102181441.GA28551@raichu> References: <201801021811.w02IBsNk086805@repo.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <201801021811.w02IBsNk086805@repo.freebsd.org> User-Agent: Mutt/1.9.2 (2017-12-15) X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 02 Jan 2018 18:14:49 -0000 On Tue, Jan 02, 2018 at 06:11:54PM +0000, Mark Johnston wrote: > Author: markj > Date: Tue Jan 2 18:11:54 2018 > New Revision: 327496 > URL: https://svnweb.freebsd.org/changeset/base/327496 > > Log: > Fix some I/O ordering issues in gmirror. > > ... > > Reviewed by: imp > MFC after: 3 weeks > Sponsored by: Dell EMC Isilon > Differential Revision: https://reviews.freebsd.org/D13559 Sorry, I forgot to add: Tested by: pho From owner-svn-src-head@freebsd.org Tue Jan 2 18:29:46 2018 Return-Path: Delivered-To: svn-src-head@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 6EC60EB26D7; Tue, 2 Jan 2018 18:29:46 +0000 (UTC) (envelope-from emaste@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 38ADD6C3F9; Tue, 2 Jan 2018 18:29:46 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w02ITj54093713; Tue, 2 Jan 2018 18:29:45 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w02ITjPt093712; Tue, 2 Jan 2018 18:29:45 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <201801021829.w02ITjPt093712@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Tue, 2 Jan 2018 18:29:45 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r327497 - head/sys/dev/hpt27xx X-SVN-Group: head X-SVN-Commit-Author: emaste X-SVN-Commit-Paths: head/sys/dev/hpt27xx X-SVN-Commit-Revision: 327497 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 02 Jan 2018 18:29:46 -0000 Author: emaste Date: Tue Jan 2 18:29:44 2018 New Revision: 327497 URL: https://svnweb.freebsd.org/changeset/base/327497 Log: hpt27xx: plug info leak in hpt_ioctl The hpt27xx ioctl handler allocates a buffer without M_ZERO and calls hpt_do_ioctl(), which might not overwrite the entire buffer. Also zero bytesReturned in case it is not written by hpt_do_ioctl(). The hpt27xx device has permissions only for root so this is not urgent, and the fix can be MFCd and considered for a future EN. Reported by: Ilja van Sprundel Submitted by: Domagoj Stolfa (M_ZERO) Reviewed by: jhb, kib MFC after: 3 days Security: info leak in root-only ioctl Sponsored by: The FreeBSD Foundation Modified: head/sys/dev/hpt27xx/hpt27xx_osm_bsd.c Modified: head/sys/dev/hpt27xx/hpt27xx_osm_bsd.c ============================================================================== --- head/sys/dev/hpt27xx/hpt27xx_osm_bsd.c Tue Jan 2 18:11:54 2018 (r327496) +++ head/sys/dev/hpt27xx/hpt27xx_osm_bsd.c Tue Jan 2 18:29:44 2018 (r327497) @@ -1404,7 +1404,7 @@ static int hpt_ioctl(struct cdev *dev, u_long cmd, cad { PHPT_IOCTL_PARAM piop=(PHPT_IOCTL_PARAM)data; IOCTL_ARG ioctl_args; - HPT_U32 bytesReturned; + HPT_U32 bytesReturned = 0; switch (cmd){ case HPT_DO_IOCONTROL: @@ -1434,7 +1434,7 @@ static int hpt_ioctl(struct cdev *dev, u_long cmd, cad } if (ioctl_args.nOutBufferSize) { - ioctl_args.lpOutBuffer = malloc(ioctl_args.nOutBufferSize, M_DEVBUF, M_WAITOK); + ioctl_args.lpOutBuffer = malloc(ioctl_args.nOutBufferSize, M_DEVBUF, M_WAITOK | M_ZERO); if (!ioctl_args.lpOutBuffer) goto invalid; } From owner-svn-src-head@freebsd.org Tue Jan 2 18:31:34 2018 Return-Path: Delivered-To: svn-src-head@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 55CD3EB27FD; Tue, 2 Jan 2018 18:31:34 +0000 (UTC) (envelope-from emaste@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 079FB6C759; Tue, 2 Jan 2018 18:31:33 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w02IVXit095291; Tue, 2 Jan 2018 18:31:33 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w02IVXYM095289; Tue, 2 Jan 2018 18:31:33 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <201801021831.w02IVXYM095289@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Tue, 2 Jan 2018 18:31:33 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r327498 - in head/sys/dev: hptnr hptrr X-SVN-Group: head X-SVN-Commit-Author: emaste X-SVN-Commit-Paths: in head/sys/dev: hptnr hptrr X-SVN-Commit-Revision: 327498 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 02 Jan 2018 18:31:34 -0000 Author: emaste Date: Tue Jan 2 18:31:32 2018 New Revision: 327498 URL: https://svnweb.freebsd.org/changeset/base/327498 Log: hpt{nr,rr}: plug info leak in hpt_ioctl The hpt{nr,rr} ioctl handler allocates a buffer without M_ZERO and calls hpt_do_ioctl(), which might not overwrite the entire buffer. Also zero bytesReturned in case it is not written by hpt_do_ioctl(). The hpt27{nr,rr} device has permissions only for root so this is not urgent, and the fix can be MFCd and considered for a future EN. The same issue was reported in the hpt27xx driver by Ilja Van Sprundel. Reviewed by: jhb, kib MFC after: 3 days Sponsored by: The FreeBSD Foundation Modified: head/sys/dev/hptnr/hptnr_osm_bsd.c head/sys/dev/hptrr/hptrr_osm_bsd.c Modified: head/sys/dev/hptnr/hptnr_osm_bsd.c ============================================================================== --- head/sys/dev/hptnr/hptnr_osm_bsd.c Tue Jan 2 18:29:44 2018 (r327497) +++ head/sys/dev/hptnr/hptnr_osm_bsd.c Tue Jan 2 18:31:32 2018 (r327498) @@ -1586,7 +1586,7 @@ static int hpt_ioctl(struct cdev *dev, u_long cmd, cad { PHPT_IOCTL_PARAM piop=(PHPT_IOCTL_PARAM)data; IOCTL_ARG ioctl_args; - HPT_U32 bytesReturned; + HPT_U32 bytesReturned = 0; switch (cmd){ case HPT_DO_IOCONTROL: @@ -1616,7 +1616,7 @@ static int hpt_ioctl(struct cdev *dev, u_long cmd, cad } if (ioctl_args.nOutBufferSize) { - ioctl_args.lpOutBuffer = malloc(ioctl_args.nOutBufferSize, M_DEVBUF, M_WAITOK); + ioctl_args.lpOutBuffer = malloc(ioctl_args.nOutBufferSize, M_DEVBUF, M_WAITOK | M_ZERO); if (!ioctl_args.lpOutBuffer) goto invalid; } Modified: head/sys/dev/hptrr/hptrr_osm_bsd.c ============================================================================== --- head/sys/dev/hptrr/hptrr_osm_bsd.c Tue Jan 2 18:29:44 2018 (r327497) +++ head/sys/dev/hptrr/hptrr_osm_bsd.c Tue Jan 2 18:31:32 2018 (r327498) @@ -1233,7 +1233,7 @@ static int hpt_ioctl(struct cdev *dev, u_long cmd, cad { PHPT_IOCTL_PARAM piop=(PHPT_IOCTL_PARAM)data; IOCTL_ARG ioctl_args; - HPT_U32 bytesReturned; + HPT_U32 bytesReturned = 0; switch (cmd){ case HPT_DO_IOCONTROL: @@ -1263,7 +1263,7 @@ static int hpt_ioctl(struct cdev *dev, u_long cmd, cad } if (ioctl_args.nOutBufferSize) { - ioctl_args.lpOutBuffer = malloc(ioctl_args.nOutBufferSize, M_DEVBUF, M_WAITOK); + ioctl_args.lpOutBuffer = malloc(ioctl_args.nOutBufferSize, M_DEVBUF, M_WAITOK | M_ZERO); if (!ioctl_args.lpOutBuffer) goto invalid; } From owner-svn-src-head@freebsd.org Tue Jan 2 19:17:57 2018 Return-Path: Delivered-To: svn-src-head@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 11DC9EB4617; Tue, 2 Jan 2018 19:17:57 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from mail.baldwin.cx (bigwig.baldwin.cx [IPv6:2001:470:1f11:75::1]) (using TLSv1 with cipher DHE-RSA-CAMELLIA256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id E3D886E322; Tue, 2 Jan 2018 19:17:56 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from ralph.baldwin.cx (astound-66-234-202-155.ca.astound.net [66.234.202.155]) by mail.baldwin.cx (Postfix) with ESMTPSA id 8C32310AC13; Tue, 2 Jan 2018 14:17:55 -0500 (EST) From: John Baldwin To: Julian Elischer Cc: Colin Percival , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r327447 - head/sys/sys Date: Tue, 02 Jan 2018 09:56:09 -0800 Message-ID: <8492136.94UhKCrmBg@ralph.baldwin.cx> User-Agent: KMail/4.14.10 (FreeBSD/11.1-STABLE; KDE/4.14.30; amd64; ; ) In-Reply-To: References: <201712312100.vBVL0L0a038783@repo.freebsd.org> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.4.3 (mail.baldwin.cx); Tue, 02 Jan 2018 14:17:55 -0500 (EST) X-Virus-Scanned: clamav-milter 0.99.2 at mail.baldwin.cx X-Virus-Status: Clean X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 02 Jan 2018 19:17:57 -0000 On Tuesday, January 02, 2018 11:56:31 AM Julian Elischer wrote: > On 1/1/18 5:00 am, Colin Percival wrote: > > Author: cperciva > > Date: Sun Dec 31 21:00:21 2017 > > New Revision: 327447 > > URL: https://svnweb.freebsd.org/changeset/base/327447 > > > > Log: > > Wrap includes in sys/tslog.h with #ifdef TSLOG. > > > > This is necessary because some non-kernel code #defines _KERNEL and then > > includes kernel headers; as a result, it was getting conflicting versions > > of curthread and curproc. Non-kernel code should probably refrain from > > defining _KERNEL, but for now hiding these indirect inclusions fixes the > > build. > > this is a recurring issue. Program that want to look into the > internals of files such as mount.h > and define _KERNEL to allow themselves to do so. It eventualy leads > to all sorts of confusion and pollution. > Maybe we should make a policy on how to do this. At $JOB I had to hack > it to define a > #ifdef _NOTREALLYKERNEL to split out parts we really wanted, but it > would be better to have specific ones for > various specific 'rule breakers'.. > e.g. > #if defined( _KERNEL ) || defined (WANT_TO_LOOK_AT_something) > > kdump seems ot do the right thing with: > > kdump/kdump.c:#define _WANT_KERNEL_ERRNO > errno.h:#if defined(_KERNEL) || defined(_WANT_KERNEL_ERRNO) The past few years we have been using _WANT_FOO when new things need to be exposed and that is our current pattern. However, that doesn't fix existing code for old things. -- John Baldwin From owner-svn-src-head@freebsd.org Tue Jan 2 19:29:32 2018 Return-Path: Delivered-To: svn-src-head@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 2EC71EB4CCA; Tue, 2 Jan 2018 19:29:32 +0000 (UTC) (envelope-from emaste@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 ED6D86E9DF; Tue, 2 Jan 2018 19:29:31 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w02JTVZK018834; Tue, 2 Jan 2018 19:29:31 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w02JTV1C018833; Tue, 2 Jan 2018 19:29:31 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <201801021929.w02JTV1C018833@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Tue, 2 Jan 2018 19:29:31 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r327499 - head/sys/dev/ath X-SVN-Group: head X-SVN-Commit-Author: emaste X-SVN-Commit-Paths: head/sys/dev/ath X-SVN-Commit-Revision: 327499 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 02 Jan 2018 19:29:32 -0000 Author: emaste Date: Tue Jan 2 19:29:30 2018 New Revision: 327499 URL: https://svnweb.freebsd.org/changeset/base/327499 Log: ath: fix memory disclosure from ath_btcoex_ioctl The ath_btcoex_ioctl handler allocated a buffer without M_ZERO and returned it to userland without writing to it. The device has permissions only for root so this is not urgent, and the fix can be MFCd and considered for a future EN. Reported by: Ilja van Sprundel Submitted by: Domagoj Stolfa Reviewed by: adrian MFC after: 1 week Modified: head/sys/dev/ath/if_ath_btcoex.c Modified: head/sys/dev/ath/if_ath_btcoex.c ============================================================================== --- head/sys/dev/ath/if_ath_btcoex.c Tue Jan 2 18:31:32 2018 (r327498) +++ head/sys/dev/ath/if_ath_btcoex.c Tue Jan 2 19:29:30 2018 (r327499) @@ -459,7 +459,7 @@ ath_btcoex_ioctl(struct ath_softc *sc, struct ath_diag * pointer for us to use below in reclaiming the buffer; * may want to be more defensive. */ - outdata = malloc(outsize, M_TEMP, M_NOWAIT); + outdata = malloc(outsize, M_TEMP, M_NOWAIT | M_ZERO); if (outdata == NULL) { error = ENOMEM; goto bad; @@ -468,6 +468,7 @@ ath_btcoex_ioctl(struct ath_softc *sc, struct ath_diag switch (id) { default: error = EINVAL; + goto bad; } if (outsize < ad->ad_out_size) ad->ad_out_size = outsize; From owner-svn-src-head@freebsd.org Tue Jan 2 19:34:24 2018 Return-Path: Delivered-To: svn-src-head@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 BCCF1EB4FC5; Tue, 2 Jan 2018 19:34:24 +0000 (UTC) (envelope-from emaste@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 8740A6EE5C; Tue, 2 Jan 2018 19:34:24 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w02JYNQ4022700; Tue, 2 Jan 2018 19:34:23 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w02JYNAY022698; Tue, 2 Jan 2018 19:34:23 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <201801021934.w02JYNAY022698@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Tue, 2 Jan 2018 19:34:23 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r327500 - head/sys/dev/ath X-SVN-Group: head X-SVN-Commit-Author: emaste X-SVN-Commit-Paths: head/sys/dev/ath X-SVN-Commit-Revision: 327500 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 02 Jan 2018 19:34:24 -0000 Author: emaste Date: Tue Jan 2 19:34:23 2018 New Revision: 327500 URL: https://svnweb.freebsd.org/changeset/base/327500 Log: ath: fix possible memory disclosures in ioctl handlers Apply the fix from r327499 to additional ioctl handlers. Reported by: Ilja van Sprundel MFC after: 1 week MFC with: r327499 Sponsored by: The FreeBSD Foundation Modified: head/sys/dev/ath/if_ath_lna_div.c head/sys/dev/ath/if_ath_spectral.c Modified: head/sys/dev/ath/if_ath_lna_div.c ============================================================================== --- head/sys/dev/ath/if_ath_lna_div.c Tue Jan 2 19:29:30 2018 (r327499) +++ head/sys/dev/ath/if_ath_lna_div.c Tue Jan 2 19:34:23 2018 (r327500) @@ -189,7 +189,7 @@ ath_lna_div_ioctl(struct ath_softc *sc, struct ath_dia * pointer for us to use below in reclaiming the buffer; * may want to be more defensive. */ - outdata = malloc(outsize, M_TEMP, M_NOWAIT); + outdata = malloc(outsize, M_TEMP, M_NOWAIT | M_ZERO); if (outdata == NULL) { error = ENOMEM; goto bad; @@ -198,6 +198,7 @@ ath_lna_div_ioctl(struct ath_softc *sc, struct ath_dia switch (id) { default: error = EINVAL; + goto bad; } if (outsize < ad->ad_out_size) ad->ad_out_size = outsize; Modified: head/sys/dev/ath/if_ath_spectral.c ============================================================================== --- head/sys/dev/ath/if_ath_spectral.c Tue Jan 2 19:29:30 2018 (r327499) +++ head/sys/dev/ath/if_ath_spectral.c Tue Jan 2 19:34:23 2018 (r327500) @@ -219,7 +219,7 @@ ath_ioctl_spectral(struct ath_softc *sc, struct ath_di * pointer for us to use below in reclaiming the buffer; * may want to be more defensive. */ - outdata = malloc(outsize, M_TEMP, M_NOWAIT); + outdata = malloc(outsize, M_TEMP, M_NOWAIT | M_ZERO); if (outdata == NULL) { error = ENOMEM; goto bad; @@ -282,6 +282,7 @@ ath_ioctl_spectral(struct ath_softc *sc, struct ath_di break; default: error = EINVAL; + goto bad; } if (outsize < ad->ad_out_size) ad->ad_out_size = outsize; From owner-svn-src-head@freebsd.org Tue Jan 2 20:58:06 2018 Return-Path: Delivered-To: svn-src-head@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 586ACEB9140; Tue, 2 Jan 2018 20:58:06 +0000 (UTC) (envelope-from gonzo@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 2589D730A2; Tue, 2 Jan 2018 20:58:06 +0000 (UTC) (envelope-from gonzo@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w02Kw5iY058206; Tue, 2 Jan 2018 20:58:05 GMT (envelope-from gonzo@FreeBSD.org) Received: (from gonzo@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w02Kw5Qc058205; Tue, 2 Jan 2018 20:58:05 GMT (envelope-from gonzo@FreeBSD.org) Message-Id: <201801022058.w02Kw5Qc058205@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gonzo set sender to gonzo@FreeBSD.org using -f From: Oleksandr Tymoshenko Date: Tue, 2 Jan 2018 20:58:05 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r327502 - head/sys/dev/nctgpio X-SVN-Group: head X-SVN-Commit-Author: gonzo X-SVN-Commit-Paths: head/sys/dev/nctgpio X-SVN-Commit-Revision: 327502 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 02 Jan 2018 20:58:06 -0000 Author: gonzo Date: Tue Jan 2 20:58:05 2018 New Revision: 327502 URL: https://svnweb.freebsd.org/changeset/base/327502 Log: nctgpio: add new device id for the GPIO chip in PCEngines APU3 PR: 224512 Submitted by: mike@sentex.net MFC after: 2 weeks Modified: head/sys/dev/nctgpio/nctgpio.c Modified: head/sys/dev/nctgpio/nctgpio.c ============================================================================== --- head/sys/dev/nctgpio/nctgpio.c Tue Jan 2 20:22:31 2018 (r327501) +++ head/sys/dev/nctgpio/nctgpio.c Tue Jan 2 20:58:05 2018 (r327502) @@ -140,6 +140,10 @@ struct nuvoton_vendor_device_id { .chip_id = 0xc452, .descr = "Nuvoton NCT5104D (PC-Engines APU)", }, + { + .chip_id = 0xc453, + .descr = "Nuvoton NCT5104D (PC-Engines APU3)", + }, }; static void From owner-svn-src-head@freebsd.org Tue Jan 2 21:31:55 2018 Return-Path: Delivered-To: svn-src-head@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 B604DEBAAFE; Tue, 2 Jan 2018 21:31:55 +0000 (UTC) (envelope-from emaste@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 835E0747F2; Tue, 2 Jan 2018 21:31:55 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w02LVs1Y071111; Tue, 2 Jan 2018 21:31:54 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w02LVsYX071109; Tue, 2 Jan 2018 21:31:54 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <201801022131.w02LVsYX071109@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Tue, 2 Jan 2018 21:31:54 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r327503 - head/usr.sbin/kldxref X-SVN-Group: head X-SVN-Commit-Author: emaste X-SVN-Commit-Paths: head/usr.sbin/kldxref X-SVN-Commit-Revision: 327503 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 02 Jan 2018 21:31:55 -0000 Author: emaste Date: Tue Jan 2 21:31:54 2018 New Revision: 327503 URL: https://svnweb.freebsd.org/changeset/base/327503 Log: kldxref: correct function names in warning messages Sponsored by: The FreeBSD Foundation Modified: head/usr.sbin/kldxref/ef.c head/usr.sbin/kldxref/ef_obj.c Modified: head/usr.sbin/kldxref/ef.c ============================================================================== --- head/usr.sbin/kldxref/ef.c Tue Jan 2 20:58:05 2018 (r327502) +++ head/usr.sbin/kldxref/ef.c Tue Jan 2 21:31:54 2018 (r327503) @@ -475,7 +475,7 @@ ef_seg_read_rel(elf_file_t ef, Elf_Off offset, size_t if (ofs == 0) { if (ef->ef_verbose) - warnx("ef_seg_read(%s): zero offset (%lx:%ld)", + warnx("ef_seg_read_rel(%s): zero offset (%lx:%ld)", ef->ef_name, (long)offset, ofs); return EFAULT; } Modified: head/usr.sbin/kldxref/ef_obj.c ============================================================================== --- head/usr.sbin/kldxref/ef_obj.c Tue Jan 2 20:58:05 2018 (r327502) +++ head/usr.sbin/kldxref/ef_obj.c Tue Jan 2 21:31:54 2018 (r327503) @@ -227,7 +227,7 @@ ef_obj_seg_read(elf_file_t ef, Elf_Off offset, size_t if (offset + len > ef->size) { if (ef->ef_verbose) - warnx("ef_seg_read_rel(%s): bad offset/len (%lx:%ld)", + warnx("ef_obj_seg_read(%s): bad offset/len (%lx:%ld)", ef->ef_name, (long)offset, (long)len); return (EFAULT); } @@ -246,7 +246,7 @@ ef_obj_seg_read_rel(elf_file_t ef, Elf_Off offset, siz if (offset + len > ef->size) { if (ef->ef_verbose) - warnx("ef_seg_read_rel(%s): bad offset/len (%lx:%ld)", + warnx("ef_obj_seg_read_rel(%s): bad offset/len (%lx:%ld)", ef->ef_name, (long)offset, (long)len); return (EFAULT); } From owner-svn-src-head@freebsd.org Wed Jan 3 00:56:32 2018 Return-Path: Delivered-To: svn-src-head@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 D61FDE874F1; Wed, 3 Jan 2018 00:56:32 +0000 (UTC) (envelope-from karels@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 6F0487BA2B; Wed, 3 Jan 2018 00:56:32 +0000 (UTC) (envelope-from karels@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w030uVJX059103; Wed, 3 Jan 2018 00:56:31 GMT (envelope-from karels@FreeBSD.org) Received: (from karels@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w030uUYJ059097; Wed, 3 Jan 2018 00:56:30 GMT (envelope-from karels@FreeBSD.org) Message-Id: <201801030056.w030uUYJ059097@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: karels set sender to karels@FreeBSD.org using -f From: Mike Karels Date: Wed, 3 Jan 2018 00:56:30 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r327505 - in head: share/man/man4 sys/conf sys/dev/watchdog sys/kern sys/sys X-SVN-Group: head X-SVN-Commit-Author: karels X-SVN-Commit-Paths: in head: share/man/man4 sys/conf sys/dev/watchdog sys/kern sys/sys X-SVN-Commit-Revision: 327505 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 03 Jan 2018 00:56:33 -0000 Author: karels Date: Wed Jan 3 00:56:30 2018 New Revision: 327505 URL: https://svnweb.freebsd.org/changeset/base/327505 Log: make SW_WATCHDOG dynamic Enable the hardclock-based watchdog previously conditional on the SW_WATCHDOG option whenever hardware watchdogs are not found, and watchdogd attempts to enable the watchdog. The SW_WATCHDOG option still causes the sofware watchdog to be enabled even if there is a hardware watchdog. This does not change the other software-based watchdog enabled by the --softtimeout option to watchdogd. Note that the code to reprime the watchdog during kernel core dumps is no longer conditional on SW_WATCHDOG. I think this was previously a bug. Reviewed by: imp alfred bjk MFC after: 1 week Relnotes: yes Differential Revision: https://reviews.freebsd.org/D13713 Modified: head/share/man/man4/watchdog.4 head/sys/conf/NOTES head/sys/dev/watchdog/watchdog.c head/sys/kern/kern_clock.c head/sys/kern/kern_dump.c head/sys/sys/watchdog.h Modified: head/share/man/man4/watchdog.4 ============================================================================== --- head/share/man/man4/watchdog.4 Tue Jan 2 23:52:26 2018 (r327504) +++ head/share/man/man4/watchdog.4 Wed Jan 3 00:56:30 2018 (r327505) @@ -25,7 +25,7 @@ .\" .\" $FreeBSD$ .\" -.Dd December 21, 2009 +.Dd January 2, 2018 .Dt WATCHDOG 4 .Os .Sh NAME @@ -40,8 +40,11 @@ facility is used for controlling hardware and software .Pp The device .Pa /dev/fido -responds to a single +supports several optional .Xr ioctl 2 +calls for configuration, and +responds to a single operational +.Xr ioctl call, .Dv WDIOCPATPAT . It takes a single argument which represents a timeout value specified as a @@ -60,12 +63,16 @@ indicates that the will be kept from timing out from the kernel. .Pp The +.Dv WDIOCPATPAT .Xr ioctl 2 call will return success if just one of the available .Xr watchdog 9 implementations supports setting the timeout to the specified timeout. This means that at least one watchdog is armed. +By default, this will be a hardware watchdog if one is present, but if +no hardware watchdog is able to process the request, a default software +watchdog is enabled. If the call fails, for instance if none of .Xr watchdog 9 @@ -77,8 +84,53 @@ To disable the watchdogs pass If disarming the watchdog(s) failed an error is returned. The watchdog might still be armed! +.Pp +The optional configuration +.Xr ioctl +commands are listed here, along with the type of the parameter used. +Examples of their use can be found in +.Xr watchdogd 8 . +.Bl -tag -width "WDIOC_SETSOFTTIMEOUTACT int " +.It Dv WDIOC_SETTIMEOUT Fa int +set/reset the timer +.It Dv WDIOC_GETTIMEOUT Fa int +get total timeout +.It Dv WDIOC_GETTIMELEFT Fa int +get time left +.It Dv WDIOC_GETPRETIMEOUT Fa int +get the pre-timeout +.It Dv WDIOC_SETPRETIMEOUT Fa int +set the pre-timeout +.It Dv WDIOC_SETPRETIMEOUTACT Fa int +Set the action when a pre-timeout occurs (see +.Li WD_SOFT_* +below). +.It Dv WDIOC_SETSOFT Fa int +Use an internal software watchdog instead of hardware. +There is also an external software watchdog, which is used by default +if no hardware watchdog was attached. +.It Dv WDIOC_SETSOFTTIMEOUTACT Fa int +Set the action whan a soft timeout occurs. +.El +.Pp +The actions that may be specified for the pre-timeout or the internal software +watchdog are listed here. +Multiple actions can be specified by ORing values together. +.Bl -tag -width WD_SOFT_PRINT +.It Dv WD_SOFT_PANIC +panic +.It Dv WD_SOFT_DDB +enter debugger +.It Dv WD_SOFT_LOG +log(9) +.It Dv WD_SOFT_PRINT +printf(9) +.El .Sh RETURN VALUES -The ioctl returns zero on success and non-zero on failure. +The +.Dv WDIOCPATPAT +.Xr ioctl +returns zero on success and non-zero on failure. .Bl -tag -width Er .It Bq Er EOPNOTSUPP No watchdog present in the kernel or @@ -89,6 +141,10 @@ Watchdog could not be disabled (timeout value of 0). .It Bq Er EINVAL Invalid flag combination passed. .El +.Pp +The configuration +.Xr ioctl +operations return zero on success and non-zero on failure. .Sh EXAMPLES .Bd -literal -offset indent #include @@ -122,8 +178,10 @@ Enables a watchdog to recover from a potentially freez .Pp .Dl "options SW_WATCHDOG" .Pp -in your kernel config adds a software watchdog in the kernel, dropping to KDB -or panic-ing when firing. +in your kernel config forces a software watchdog in the kernel +to be configured even if a hardware watchdog is configured, +dropping to KDB or panicking when firing, depending +on the KDB and KDB_UNATTENDED kernel configuration options. .Sh SEE ALSO .Xr watchdogd 8 , .Xr watchdog 9 Modified: head/sys/conf/NOTES ============================================================================== --- head/sys/conf/NOTES Tue Jan 2 23:52:26 2018 (r327504) +++ head/sys/conf/NOTES Wed Jan 3 00:56:30 2018 (r327505) @@ -2609,7 +2609,9 @@ options BOOTP_WIRED_TO=fxp0 # Use interface fxp0 for options BOOTP_BLOCKSIZE=8192 # Override NFS block size # -# Add software watchdog routines. +# Enable software watchdog routines, even if hardware watchdog is present. +# By default, software watchdog timer is enabled only if no hardware watchdog +# is present. # options SW_WATCHDOG Modified: head/sys/dev/watchdog/watchdog.c ============================================================================== --- head/sys/dev/watchdog/watchdog.c Tue Jan 2 23:52:26 2018 (r327504) +++ head/sys/dev/watchdog/watchdog.c Wed Jan 3 00:56:30 2018 (r327505) @@ -78,6 +78,9 @@ SYSCTL_UINT(_hw_watchdog, OID_AUTO, wd_last_u_secs, CT static int wd_lastpat_valid = 0; static time_t wd_lastpat = 0; /* when the watchdog was last patted */ +/* Hook for external software watchdog to register for use if needed */ +void (*wdog_software_attach)(void); + static void pow2ns_to_ts(int pow2ns, struct timespec *ts) { @@ -120,6 +123,7 @@ int wdog_kern_pat(u_int utim) { int error; + static int first = 1; if ((utim & WD_LASTVAL) != 0 && (utim & WD_INTERVAL) > 0) return (EINVAL); @@ -161,6 +165,17 @@ wdog_kern_pat(u_int utim) } else { EVENTHANDLER_INVOKE(watchdog_list, utim, &error); } + /* + * If we no hardware watchdog responded, we have not tried to + * attach an external software watchdog, and one is available, + * attach it now and retry. + */ + if (error == EOPNOTSUPP && first && *wdog_software_attach != NULL) { + (*wdog_software_attach)(); + EVENTHANDLER_INVOKE(watchdog_list, utim, &error); + } + first = 0; + wd_set_pretimeout(wd_pretimeout, true); /* * If we were able to arm/strobe the watchdog, then Modified: head/sys/kern/kern_clock.c ============================================================================== --- head/sys/kern/kern_clock.c Tue Jan 2 23:52:26 2018 (r327504) +++ head/sys/kern/kern_clock.c Wed Jan 3 00:56:30 2018 (r327505) @@ -335,15 +335,19 @@ read_cpu_time(long *cp_time) } } -#ifdef SW_WATCHDOG #include static int watchdog_ticks; static int watchdog_enabled; static void watchdog_fire(void); static void watchdog_config(void *, u_int, int *); -#endif /* SW_WATCHDOG */ +static void +watchdog_attach(void) +{ + EVENTHANDLER_REGISTER(watchdog_list, watchdog_config, NULL, 0); +} + /* * Clock handling routines. * @@ -410,8 +414,14 @@ initclocks(void *dummy) if (profhz == 0) profhz = i; psratio = profhz / i; + #ifdef SW_WATCHDOG - EVENTHANDLER_REGISTER(watchdog_list, watchdog_config, NULL, 0); + /* Enable hardclock watchdog now, even if a hardware watchdog exists. */ + watchdog_attach(); +#else + /* Volunteer to run a software watchdog. */ + if (wdog_software_attach == NULL) + wdog_software_attach = watchdog_attach; #endif } @@ -482,10 +492,8 @@ hardclock(int usermode, uintfptr_t pc) #ifdef DEVICE_POLLING hardclock_device_poll(); /* this is very short and quick */ #endif /* DEVICE_POLLING */ -#ifdef SW_WATCHDOG if (watchdog_enabled > 0 && --watchdog_ticks <= 0) watchdog_fire(); -#endif /* SW_WATCHDOG */ } void @@ -496,9 +504,7 @@ hardclock_cnt(int cnt, int usermode) struct proc *p = td->td_proc; int *t = DPCPU_PTR(pcputicks); int flags, global, newticks; -#ifdef SW_WATCHDOG int i; -#endif /* SW_WATCHDOG */ /* * Update per-CPU and possibly global ticks values. @@ -558,13 +564,11 @@ hardclock_cnt(int cnt, int usermode) atomic_store_rel_int(&devpoll_run, 0); } #endif /* DEVICE_POLLING */ -#ifdef SW_WATCHDOG if (watchdog_enabled > 0) { i = atomic_fetchadd_int(&watchdog_ticks, -newticks); if (i > 0 && i <= newticks) watchdog_fire(); } -#endif /* SW_WATCHDOG */ } if (curcpu == CPU_FIRST()) cpu_tick_calibration(); @@ -841,8 +845,6 @@ SYSCTL_PROC(_kern, KERN_CLOCKRATE, clockrate, 0, 0, sysctl_kern_clockrate, "S,clockinfo", "Rate and period of various kernel clocks"); -#ifdef SW_WATCHDOG - static void watchdog_config(void *unused __unused, u_int cmd, int *error) { @@ -891,5 +893,3 @@ watchdog_fire(void) panic("watchdog timeout"); #endif } - -#endif /* SW_WATCHDOG */ Modified: head/sys/kern/kern_dump.c ============================================================================== --- head/sys/kern/kern_dump.c Tue Jan 2 23:52:26 2018 (r327504) +++ head/sys/kern/kern_dump.c Wed Jan 3 00:56:30 2018 (r327505) @@ -27,8 +27,6 @@ #include __FBSDID("$FreeBSD$"); -#include "opt_watchdog.h" - #include #include #include @@ -36,9 +34,7 @@ __FBSDID("$FreeBSD$"); #include #include #include -#ifdef SW_WATCHDOG #include -#endif #include #include #include @@ -205,9 +201,7 @@ dumpsys_cb_dumpdata(struct dump_pa *mdp, int seqnr, vo } dumpsys_map_chunk(pa, chunk, &va); -#ifdef SW_WATCHDOG wdog_kern_pat(WD_LASTVAL); -#endif error = dump_append(di, va, 0, sz); dumpsys_unmap_chunk(pa, chunk, va); Modified: head/sys/sys/watchdog.h ============================================================================== --- head/sys/sys/watchdog.h Tue Jan 2 23:52:26 2018 (r327504) +++ head/sys/sys/watchdog.h Wed Jan 3 00:56:30 2018 (r327505) @@ -112,6 +112,14 @@ EVENTHANDLER_DECLARE(watchdog_list, watchdog_fn); u_int wdog_kern_last_timeout(void); int wdog_kern_pat(u_int utim); + +/* + * The following function pointer is used to attach a software watchdog + * if no hardware watchdog has been attached, and if the software module + * has initialized the function pointer. + */ + +extern void (*wdog_software_attach)(void); #endif #endif /* _SYS_WATCHDOG_H */ From owner-svn-src-head@freebsd.org Wed Jan 3 03:46:29 2018 Return-Path: Delivered-To: svn-src-head@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 B37E2EA8593; Wed, 3 Jan 2018 03:46:29 +0000 (UTC) (envelope-from eadler@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 8D58880FA0; Wed, 3 Jan 2018 03:46:29 +0000 (UTC) (envelope-from eadler@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w033kS3i031003; Wed, 3 Jan 2018 03:46:28 GMT (envelope-from eadler@FreeBSD.org) Received: (from eadler@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w033kSHu031002; Wed, 3 Jan 2018 03:46:28 GMT (envelope-from eadler@FreeBSD.org) Message-Id: <201801030346.w033kSHu031002@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: eadler set sender to eadler@FreeBSD.org using -f From: Eitan Adler Date: Wed, 3 Jan 2018 03:46:28 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r327510 - head/share/misc X-SVN-Group: head X-SVN-Commit-Author: eadler X-SVN-Commit-Paths: head/share/misc X-SVN-Commit-Revision: 327510 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 03 Jan 2018 03:46:29 -0000 Author: eadler Date: Wed Jan 3 03:46:28 2018 New Revision: 327510 URL: https://svnweb.freebsd.org/changeset/base/327510 Log: bsd-family-tree: revert r327333 bsd-family-tree should only contain projects that have had actual releases. Requested by: core Modified: head/share/misc/bsd-family-tree Modified: head/share/misc/bsd-family-tree ============================================================================== --- head/share/misc/bsd-family-tree Wed Jan 3 01:47:34 2018 (r327509) +++ head/share/misc/bsd-family-tree Wed Jan 3 03:46:28 2018 (r327510) @@ -355,28 +355,22 @@ FreeBSD 5.2 | | | | 11.0 | 10.12 | | NetBSD 7.0.2 | | | | | | | | | | | | | | | *- NetBSD 7.1 | | - | | | macOS | | | DragonFly 4.8.0 - | | | 10.13 | | OpenBSD 6.1 | - | FreeBSD | | | | | DragonFly 5.0.0 - | 11.1 FreeBSD | | | | | - | | 10.4 | | | OpenBSD 6.2 DragonFly 5.0.1 - | | | v | | | | - | | | | | | DragonFly 5.0.2 - | | | | | | | - | | FreeBSD | NetBSD 7.1.1 | | - | | 10-stable | | | - | FreeBSD \ | | | - | 11-stable \ | | | - | / `| | | | - | HardenedBSD | | | | - | 11-stable HardenedBSD | | | - | 10-stable | | | - | | | | - | | | | - | | | | -FreeBSD 12 -current NetBSD -current OpenBSD -current DragonFly -current - | | | | - v v v v + | | | | | | | | + | | | | | | | | + | | | macOS | | | DragonFly 4.8.0 + | | | 10.13 | | OpenBSD 6.1 | + | FreeBSD | | | | | DragonFly 5.0.0 + | 11.1 FreeBSD | | | | | + | | 10.4 | | | OpenBSD 6.2 DragonFly 5.0.1 + | | | | | | | + | | | | NetBSD 7.1.1 | DragonFly 5.0.2 + | | | | | | | + | | | | v | | + | v | | | | + | | | | | +FreeBSD 12 -current | NetBSD -current OpenBSD -current DragonFly -current + | | | | | + v v v v v Time ---------------- From owner-svn-src-head@freebsd.org Wed Jan 3 06:22:41 2018 Return-Path: Delivered-To: svn-src-head@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 E0515EAF6A7; Wed, 3 Jan 2018 06:22:41 +0000 (UTC) (envelope-from oshogbo@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 AAA3C6666B; Wed, 3 Jan 2018 06:22:41 +0000 (UTC) (envelope-from oshogbo@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w036Meuh097398; Wed, 3 Jan 2018 06:22:40 GMT (envelope-from oshogbo@FreeBSD.org) Received: (from oshogbo@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w036Mexv097397; Wed, 3 Jan 2018 06:22:40 GMT (envelope-from oshogbo@FreeBSD.org) Message-Id: <201801030622.w036Mexv097397@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: oshogbo set sender to oshogbo@FreeBSD.org using -f From: Mariusz Zaborski Date: Wed, 3 Jan 2018 06:22:40 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r327511 - head/lib/libcasper/libcasper X-SVN-Group: head X-SVN-Commit-Author: oshogbo X-SVN-Commit-Paths: head/lib/libcasper/libcasper X-SVN-Commit-Revision: 327511 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 03 Jan 2018 06:22:42 -0000 Author: oshogbo Date: Wed Jan 3 06:22:40 2018 New Revision: 327511 URL: https://svnweb.freebsd.org/changeset/base/327511 Log: Document services which we have in libcasper. Reviewed by: bcr@ Differential Revision: https://reviews.freebsd.org/D13734 Modified: head/lib/libcasper/libcasper/libcasper.3 Modified: head/lib/libcasper/libcasper/libcasper.3 ============================================================================== --- head/lib/libcasper/libcasper/libcasper.3 Wed Jan 3 03:46:28 2018 (r327510) +++ head/lib/libcasper/libcasper/libcasper.3 Wed Jan 3 06:22:40 2018 (r327511) @@ -27,7 +27,7 @@ .\" .\" $FreeBSD$ .\" -.Dd October 29, 2017 +.Dd January 2, 2018 .Dt LIBCASPER 3 .Os .Sh NAME @@ -190,6 +190,29 @@ obtained via the .Fn cap_init function. The function returns capability that provides access to opened service. +Casper supports the following services in the base system: +.Bl -tag -width "system.random" -compact -offset indent +.Pp +.It system.dns +provides DNS libc compatible API +.It system.grp +provides +.Xr getgrent 3 +compatible API +.It system.pwd +provides +.Xr getpwent 3 +compatible API +.It system.random +allows to obtain entropy from /dev/random +.It system.sysctl +provides +.Xr sysctlbyname 3 +compatible API +.It system.syslog +provides +.Xr syslog 3 +compatible API .Sh RETURN VALUES The .Fn cap_clone , From owner-svn-src-head@freebsd.org Wed Jan 3 06:41:41 2018 Return-Path: Delivered-To: svn-src-head@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 5C573EB00F0; Wed, 3 Jan 2018 06:41:41 +0000 (UTC) (envelope-from karels@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 26F6166EBA; Wed, 3 Jan 2018 06:41:41 +0000 (UTC) (envelope-from karels@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w036feXh005538; Wed, 3 Jan 2018 06:41:40 GMT (envelope-from karels@FreeBSD.org) Received: (from karels@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w036fe2D005537; Wed, 3 Jan 2018 06:41:40 GMT (envelope-from karels@FreeBSD.org) Message-Id: <201801030641.w036fe2D005537@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: karels set sender to karels@FreeBSD.org using -f From: Mike Karels Date: Wed, 3 Jan 2018 06:41:40 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r327512 - head X-SVN-Group: head X-SVN-Commit-Author: karels X-SVN-Commit-Paths: head X-SVN-Commit-Revision: 327512 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 03 Jan 2018 06:41:41 -0000 Author: karels Date: Wed Jan 3 06:41:39 2018 New Revision: 327512 URL: https://svnweb.freebsd.org/changeset/base/327512 Log: Add info about SW_WATCHDOG change to be dynamic in the common case. Modified: head/UPDATING Modified: head/UPDATING ============================================================================== --- head/UPDATING Wed Jan 3 06:22:40 2018 (r327511) +++ head/UPDATING Wed Jan 3 06:41:39 2018 (r327512) @@ -51,6 +51,12 @@ NOTE TO PEOPLE WHO THINK THAT FreeBSD 12.x IS SLOW: ****************************** SPECIAL WARNING: ****************************** +20180102: + The SW_WATCHDOG option is no longer necessary to enable the + hardclock-based software watchdog if no hardware watchdog is + configured. As before, SW_WATCHDOG will cause the software + watchdog to be enabled even if a hardware watchdog is configured. + 20171215: r326887 fixes the issue described in the 20171214 UPDATING entry. r326888 flips the switch back to building GELI support always. From owner-svn-src-head@freebsd.org Wed Jan 3 07:43:05 2018 Return-Path: Delivered-To: svn-src-head@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 8A940EB2222; Wed, 3 Jan 2018 07:43:05 +0000 (UTC) (envelope-from oshogbo@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 468CD68849; Wed, 3 Jan 2018 07:43:05 +0000 (UTC) (envelope-from oshogbo@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w037h4UC030524; Wed, 3 Jan 2018 07:43:04 GMT (envelope-from oshogbo@FreeBSD.org) Received: (from oshogbo@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w037h4Lq030523; Wed, 3 Jan 2018 07:43:04 GMT (envelope-from oshogbo@FreeBSD.org) Message-Id: <201801030743.w037h4Lq030523@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: oshogbo set sender to oshogbo@FreeBSD.org using -f From: Mariusz Zaborski Date: Wed, 3 Jan 2018 07:43:04 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r327513 - head/usr.bin/kdump X-SVN-Group: head X-SVN-Commit-Author: oshogbo X-SVN-Commit-Paths: head/usr.bin/kdump X-SVN-Commit-Revision: 327513 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 03 Jan 2018 07:43:05 -0000 Author: oshogbo Date: Wed Jan 3 07:43:04 2018 New Revision: 327513 URL: https://svnweb.freebsd.org/changeset/base/327513 Log: NLS data and tz can be cached using caspicum helpers. Using them we simplifies and unifies sandboxed code. Modified: head/usr.bin/kdump/kdump.c Modified: head/usr.bin/kdump/kdump.c ============================================================================== --- head/usr.bin/kdump/kdump.c Wed Jan 3 06:41:39 2018 (r327512) +++ head/usr.bin/kdump/kdump.c Wed Jan 3 07:43:04 2018 (r327513) @@ -175,34 +175,7 @@ static TAILQ_HEAD(trace_procs, proc_info) trace_procs; #ifdef WITH_CASPER static cap_channel_t *cappwd, *capgrp; -#endif -static void -strerror_init(void) -{ - - /* - * Cache NLS data before entering capability mode. - * XXXPJD: There should be strerror_init() and strsignal_init() in libc. - */ - (void)catopen("libc", NL_CAT_LOCALE); -} - -static void -localtime_init(void) -{ - time_t ltime; - - /* - * Allow localtime(3) to cache /etc/localtime content before entering - * capability mode. - * XXXPJD: There should be localtime_init() in libc. - */ - (void)time(<ime); - (void)localtime(<ime); -} - -#ifdef WITH_CASPER static int cappwdgrp_setup(cap_channel_t **cappwdp, cap_channel_t **capgrpp) { @@ -450,8 +423,9 @@ main(int argc, char *argv[]) if (!freopen(tracefile, "r", stdin)) err(1, "%s", tracefile); - strerror_init(); - localtime_init(); + caph_cache_catpages(); + caph_cache_tzdata(); + #ifdef WITH_CASPER if (resolv != 0) { if (cappwdgrp_setup(&cappwd, &capgrp) < 0) { From owner-svn-src-head@freebsd.org Wed Jan 3 09:08:33 2018 Return-Path: Delivered-To: svn-src-head@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 8A6A4EB5387; Wed, 3 Jan 2018 09:08:33 +0000 (UTC) (envelope-from eadler@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 4E2306AE16; Wed, 3 Jan 2018 09:08:33 +0000 (UTC) (envelope-from eadler@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w0398Wpf063604; Wed, 3 Jan 2018 09:08:32 GMT (envelope-from eadler@FreeBSD.org) Received: (from eadler@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w0398WKP063603; Wed, 3 Jan 2018 09:08:32 GMT (envelope-from eadler@FreeBSD.org) Message-Id: <201801030908.w0398WKP063603@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: eadler set sender to eadler@FreeBSD.org using -f From: Eitan Adler Date: Wed, 3 Jan 2018 09:08:32 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r327514 - head/usr.bin/morse X-SVN-Group: head X-SVN-Commit-Author: eadler X-SVN-Commit-Paths: head/usr.bin/morse X-SVN-Commit-Revision: 327514 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 03 Jan 2018 09:08:33 -0000 Author: eadler Date: Wed Jan 3 09:08:32 2018 New Revision: 327514 URL: https://svnweb.freebsd.org/changeset/base/327514 Log: morse(6): add a few missing characters - add ñ, ', and _ - remove lint support - add missing header for ioctl Modified: head/usr.bin/morse/morse.c Modified: head/usr.bin/morse/morse.c ============================================================================== --- head/usr.bin/morse/morse.c Wed Jan 3 07:43:04 2018 (r327513) +++ head/usr.bin/morse/morse.c Wed Jan 3 09:08:32 2018 (r327514) @@ -32,21 +32,18 @@ * */ -#ifndef lint static const char copyright[] = "@(#) Copyright (c) 1988, 1993\n\ The Regents of the University of California. All rights reserved.\n"; -#endif /* not lint */ -#ifndef lint #if 0 static char sccsid[] = "@(#)morse.c 8.1 (Berkeley) 5/31/93"; #endif static const char rcsid[] = "$FreeBSD$"; -#endif /* not lint */ #include +#include #include #include @@ -132,6 +129,8 @@ static const struct morsetab mtab[] = { {'$', "...-..-"}, {'+', ".-.-."}, /* AR */ {'@', ".--.-."}, /* AC */ + {'_', "..--.-"}, + {'\'', ".----."}, /* prosigns without already assigned values */ @@ -156,6 +155,7 @@ static const struct morsetab iso8859_1tab[] = { {'\350', "..-.."}, /* è */ {'\351', "..-.."}, /* é */ {'\352', "-..-."}, /* ê */ + {'\361', "--.--"}, /* n */ {'\366', "---."}, /* ö */ {'\374', "..--"}, /* ü */ From owner-svn-src-head@freebsd.org Wed Jan 3 09:34:01 2018 Return-Path: Delivered-To: svn-src-head@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 0267BEB6283; Wed, 3 Jan 2018 09:34:01 +0000 (UTC) (envelope-from phk@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 C0DF66BC90; Wed, 3 Jan 2018 09:34:00 +0000 (UTC) (envelope-from phk@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w039Xxx0076039; Wed, 3 Jan 2018 09:33:59 GMT (envelope-from phk@FreeBSD.org) Received: (from phk@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w039Xx7B076038; Wed, 3 Jan 2018 09:33:59 GMT (envelope-from phk@FreeBSD.org) Message-Id: <201801030933.w039Xx7B076038@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: phk set sender to phk@FreeBSD.org using -f From: Poul-Henning Kamp Date: Wed, 3 Jan 2018 09:33:59 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r327515 - head/sys/sys X-SVN-Group: head X-SVN-Commit-Author: phk X-SVN-Commit-Paths: head/sys/sys X-SVN-Commit-Revision: 327515 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 03 Jan 2018 09:34:01 -0000 Author: phk Date: Wed Jan 3 09:33:59 2018 New Revision: 327515 URL: https://svnweb.freebsd.org/changeset/base/327515 Log: Eliminate a paranthesis which is both unneeded and causing trouble. Modified: head/sys/sys/_stdarg.h Modified: head/sys/sys/_stdarg.h ============================================================================== --- head/sys/sys/_stdarg.h Wed Jan 3 09:08:32 2018 (r327514) +++ head/sys/sys/_stdarg.h Wed Jan 3 09:33:59 2018 (r327515) @@ -61,7 +61,7 @@ #if __ISO_C_VISIBLE >= 1999 #define va_copy(dst, src) ((dst) = (src)) #endif - #define va_arg(ap, type) (*(((type)*)(((ap) += sizeof(type)) - sizeof(type)))) + #define va_arg(ap, type) (*((type*)(((ap) += sizeof(type)) - sizeof(type)))) #define va_end(ap) ((void)0) #endif From owner-svn-src-head@freebsd.org Wed Jan 3 11:23:48 2018 Return-Path: Delivered-To: svn-src-head@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 D54ADEBA6C2; Wed, 3 Jan 2018 11:23:48 +0000 (UTC) (envelope-from kib@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 A20796FF46; Wed, 3 Jan 2018 11:23:48 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w03BNlas022543; Wed, 3 Jan 2018 11:23:47 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w03BNlZA022542; Wed, 3 Jan 2018 11:23:47 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201801031123.w03BNlZA022542@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Wed, 3 Jan 2018 11:23:47 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r327517 - head/sys/x86/x86 X-SVN-Group: head X-SVN-Commit-Author: kib X-SVN-Commit-Paths: head/sys/x86/x86 X-SVN-Commit-Revision: 327517 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 03 Jan 2018 11:23:48 -0000 Author: kib Date: Wed Jan 3 11:23:47 2018 New Revision: 327517 URL: https://svnweb.freebsd.org/changeset/base/327517 Log: Use the new SDM-approved way to serialize x2APIC MSR writes. SDM editions 64 and below stated that it is enough to use MFENCe or LFENCE to serialize x2APIC register writes. New edition 65 requires either full serialization instruction or MFENCE;LFENCE sequence. Use the later, FreeBSD needs serialization to ensure that writes done before IPI request are visible to the target IPI CPU. Sponsored by: The FreeBSD Foundation MFC after: 1 week Modified: head/sys/x86/x86/local_apic.c Modified: head/sys/x86/x86/local_apic.c ============================================================================== --- head/sys/x86/x86/local_apic.c Wed Jan 3 11:03:44 2018 (r327516) +++ head/sys/x86/x86/local_apic.c Wed Jan 3 11:23:47 2018 (r327517) @@ -217,6 +217,7 @@ lapic_write32(enum LAPIC_REGISTERS reg, uint32_t val) if (x2apic_mode) { mfence(); + lfence(); wrmsr(MSR_APIC_000 + reg, val); } else { *(volatile uint32_t *)(lapic_map + reg * LAPIC_MEM_MUL) = val; From owner-svn-src-head@freebsd.org Wed Jan 3 17:04:14 2018 Return-Path: Delivered-To: svn-src-head@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 F16F5EA5500; Wed, 3 Jan 2018 17:04:14 +0000 (UTC) (envelope-from eadler@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 BB5F37C86B; Wed, 3 Jan 2018 17:04:14 +0000 (UTC) (envelope-from eadler@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w03H4DSd070081; Wed, 3 Jan 2018 17:04:13 GMT (envelope-from eadler@FreeBSD.org) Received: (from eadler@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w03H4DkU070079; Wed, 3 Jan 2018 17:04:13 GMT (envelope-from eadler@FreeBSD.org) Message-Id: <201801031704.w03H4DkU070079@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: eadler set sender to eadler@FreeBSD.org using -f From: Eitan Adler Date: Wed, 3 Jan 2018 17:04:13 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r327521 - head/usr.bin/morse X-SVN-Group: head X-SVN-Commit-Author: eadler X-SVN-Commit-Paths: head/usr.bin/morse X-SVN-Commit-Revision: 327521 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 03 Jan 2018 17:04:15 -0000 Author: eadler Date: Wed Jan 3 17:04:13 2018 New Revision: 327521 URL: https://svnweb.freebsd.org/changeset/base/327521 Log: morse(6): fix two typod Modified: head/usr.bin/morse/morse.6 head/usr.bin/morse/morse.c Modified: head/usr.bin/morse/morse.6 ============================================================================== --- head/usr.bin/morse/morse.6 Wed Jan 3 16:16:20 2018 (r327520) +++ head/usr.bin/morse/morse.6 Wed Jan 3 17:04:13 2018 (r327521) @@ -85,7 +85,7 @@ Similar to .Fl p , but use the RTS line of .Ar device -(which must by a TTY device) +(which must be a TTY device) in order to emit the morse code. .It Fl e Echo each character before it is sent, used together with either Modified: head/usr.bin/morse/morse.c ============================================================================== --- head/usr.bin/morse/morse.c Wed Jan 3 16:16:20 2018 (r327520) +++ head/usr.bin/morse/morse.c Wed Jan 3 17:04:13 2018 (r327521) @@ -155,7 +155,7 @@ static const struct morsetab iso8859_1tab[] = { {'\350', "..-.."}, /* è */ {'\351', "..-.."}, /* é */ {'\352', "-..-."}, /* ê */ - {'\361', "--.--"}, /* n */ + {'\361', "--.--"}, /* ñ */ {'\366', "---."}, /* ö */ {'\374', "..--"}, /* ü */ From owner-svn-src-head@freebsd.org Wed Jan 3 17:28:02 2018 Return-Path: Delivered-To: svn-src-head@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 C0DBBEA650B; Wed, 3 Jan 2018 17:28:02 +0000 (UTC) (envelope-from trasz@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 8BA1E7D5FE; Wed, 3 Jan 2018 17:28:02 +0000 (UTC) (envelope-from trasz@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w03HS1aV078772; Wed, 3 Jan 2018 17:28:01 GMT (envelope-from trasz@FreeBSD.org) Received: (from trasz@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w03HS1Uh078771; Wed, 3 Jan 2018 17:28:01 GMT (envelope-from trasz@FreeBSD.org) Message-Id: <201801031728.w03HS1Uh078771@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: trasz set sender to trasz@FreeBSD.org using -f From: Edward Tomasz Napierala Date: Wed, 3 Jan 2018 17:28:01 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r327522 - head/usr.sbin/usbconfig X-SVN-Group: head X-SVN-Commit-Author: trasz X-SVN-Commit-Paths: head/usr.sbin/usbconfig X-SVN-Commit-Revision: 327522 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 03 Jan 2018 17:28:02 -0000 Author: trasz Date: Wed Jan 3 17:28:01 2018 New Revision: 327522 URL: https://svnweb.freebsd.org/changeset/base/327522 Log: Fix warnings from "mandoc -Tlint -Wwarning". Reported by: Yuri Pankov MFC after: 2 weeks Sponsored by: The FreeBSD Foundation Modified: head/usr.sbin/usbconfig/usbconfig.8 Modified: head/usr.sbin/usbconfig/usbconfig.8 ============================================================================== --- head/usr.sbin/usbconfig/usbconfig.8 Wed Jan 3 17:04:13 2018 (r327521) +++ head/usr.sbin/usbconfig/usbconfig.8 Wed Jan 3 17:28:01 2018 (r327522) @@ -144,7 +144,6 @@ See for more information. .El .Sh EXAMPLES -.Pp Show information about the device on USB bus 1 at address 2: .Pp .Dl usbconfig -d ugen1.2 dump_info @@ -172,7 +171,6 @@ Program the device on USB bus 1 at address 2 to suspen .Dl usbconfig -d ugen1.2 power_off .Dl usbconfig -d ugen1.2 power_save .Dl usbconfig -d ugen1.2 power_on -.Pp .Sh SEE ALSO .Xr usb 4 , .Xr usb_quirk 4 , From owner-svn-src-head@freebsd.org Wed Jan 3 17:35:39 2018 Return-Path: Delivered-To: svn-src-head@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 F3200EA69C4; Wed, 3 Jan 2018 17:35:39 +0000 (UTC) (envelope-from jhb@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 BD3F57DB99; Wed, 3 Jan 2018 17:35:39 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w03HZcTC082842; Wed, 3 Jan 2018 17:35:38 GMT (envelope-from jhb@FreeBSD.org) Received: (from jhb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w03HZcFL082840; Wed, 3 Jan 2018 17:35:38 GMT (envelope-from jhb@FreeBSD.org) Message-Id: <201801031735.w03HZcFL082840@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jhb set sender to jhb@FreeBSD.org using -f From: John Baldwin Date: Wed, 3 Jan 2018 17:35:38 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r327523 - in head/stand/mips/beri: boot2 loader X-SVN-Group: head X-SVN-Commit-Author: jhb X-SVN-Commit-Paths: in head/stand/mips/beri: boot2 loader X-SVN-Commit-Revision: 327523 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 03 Jan 2018 17:35:40 -0000 Author: jhb Date: Wed Jan 3 17:35:38 2018 New Revision: 327523 URL: https://svnweb.freebsd.org/changeset/base/327523 Log: Don't clobber system LDFLAGS for beri boot loaders. Prior to r325114, bsd.init.mk was included after assignments to CFLAGS and LDFLAGS in these Makefiles. After r325114, bare assignments (= rather than +=) lost system-assigned default values that are needed when compiling with an external toolchain. CFLAGS in both Makefiles already uses +=. This commit changes LDFLAGS to use +=. While here, depend on the LDFLAGS update in the parent Makefile.inc to set -nostdlib. Sponsored by: DARPA / AFRL Modified: head/stand/mips/beri/boot2/Makefile head/stand/mips/beri/loader/Makefile Modified: head/stand/mips/beri/boot2/Makefile ============================================================================== --- head/stand/mips/beri/boot2/Makefile Wed Jan 3 17:28:01 2018 (r327522) +++ head/stand/mips/beri/boot2/Makefile Wed Jan 3 17:35:38 2018 (r327523) @@ -53,8 +53,7 @@ CFLAGS+= -I${LDRSRC} \ -fno-pic -mno-abicalls \ -g -LDFLAGS= -nostdlib \ - -static \ +LDFLAGS+= -static \ -Wl,-N \ -G0 \ -L${.CURDIR} Modified: head/stand/mips/beri/loader/Makefile ============================================================================== --- head/stand/mips/beri/loader/Makefile Wed Jan 3 17:28:01 2018 (r327522) +++ head/stand/mips/beri/loader/Makefile Wed Jan 3 17:35:38 2018 (r327523) @@ -85,8 +85,7 @@ CFLAGS+= -G0 \ -mno-abicalls \ -g -LDFLAGS= -nostdlib \ - -static \ +LDFLAGS+= -static \ -T ${.CURDIR}/loader.ldscript \ -L${.CURDIR} \ -e __start From owner-svn-src-head@freebsd.org Wed Jan 3 17:40:53 2018 Return-Path: Delivered-To: svn-src-head@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 2D000EA6E20; Wed, 3 Jan 2018 17:40:53 +0000 (UTC) (envelope-from jhb@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 04AFC7E0D4; Wed, 3 Jan 2018 17:40:52 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w03HeqCA083059; Wed, 3 Jan 2018 17:40:52 GMT (envelope-from jhb@FreeBSD.org) Received: (from jhb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w03Hepri083057; Wed, 3 Jan 2018 17:40:51 GMT (envelope-from jhb@FreeBSD.org) Message-Id: <201801031740.w03Hepri083057@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jhb set sender to jhb@FreeBSD.org using -f From: John Baldwin Date: Wed, 3 Jan 2018 17:40:51 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r327524 - in head/stand/mips/beri: common loader X-SVN-Group: head X-SVN-Commit-Author: jhb X-SVN-Commit-Paths: in head/stand/mips/beri: common loader X-SVN-Commit-Revision: 327524 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 03 Jan 2018 17:40:53 -0000 Author: jhb Date: Wed Jan 3 17:40:51 2018 New Revision: 327524 URL: https://svnweb.freebsd.org/changeset/base/327524 Log: Use 'extern uint8_t' instead of 'extern void' for external symbols. The beri boot loaders depend on symbols defined in linker scripts or assembly files. The boot loaders do not care about the type of these symbols but just want to extract a pointer to them. Older versions of GCC permitted external symbols to be declared of type 'void' and then '&foo' generated a void pointer to the memory at the symbol's address. However, void objects are not valid C and newer versions of GCC error if these are used. Instead, declare these symbols as being bytes (or an array of bytes in the cheri_sdcard_vaddr case). Sponsored by: DARPA / AFRL Modified: head/stand/mips/beri/common/sdcard.c head/stand/mips/beri/loader/main.c Modified: head/stand/mips/beri/common/sdcard.c ============================================================================== --- head/stand/mips/beri/common/sdcard.c Wed Jan 3 17:35:38 2018 (r327523) +++ head/stand/mips/beri/common/sdcard.c Wed Jan 3 17:40:51 2018 (r327524) @@ -109,10 +109,10 @@ ALTERA_SDCARD_RR1_COMMANDCRCFAILED | ALTERA_SDCARD_RR1_ADDRESSMISALIGNED |\ ALTERA_SDCARD_RR1_ADDRBLOCKRANGE) -extern void __cheri_sdcard_vaddr__; +extern uint8_t __cheri_sdcard_vaddr__[]; #define ALTERA_SDCARD_PTR(type, offset) \ - (volatile type *)((uint8_t *)&__cheri_sdcard_vaddr__ + (offset)) + (volatile type *)(&__cheri_sdcard_vaddr__[(offset)]) static __inline uint16_t altera_sdcard_read_uint16(u_int offset) Modified: head/stand/mips/beri/loader/main.c ============================================================================== --- head/stand/mips/beri/loader/main.c Wed Jan 3 17:35:38 2018 (r327523) +++ head/stand/mips/beri/loader/main.c Wed Jan 3 17:40:51 2018 (r327524) @@ -78,8 +78,8 @@ struct console *consoles[] = { NULL }; -extern void __bss_start, __bss_end; -extern void __heap_start, __heap_end; +extern uint8_t __bss_start, __bss_end; +extern uint8_t __heap_start, __heap_end; static int __elfN(exec)(struct preloaded_file *fp) @@ -108,14 +108,14 @@ main(int argc, char *argv[], char *envv[], struct boot struct devsw **dp; /* NB: Must be sure to bzero() before using any globals. */ - bzero(&__bss_start, (uintptr_t)&__bss_end - (uintptr_t)&__bss_start); + bzero(&__bss_start, &__bss_end - &__bss_start); boot2_argc = argc; boot2_argv = argv; boot2_envv = envv; boot2_bootinfo = *bootinfop; /* Copy rather than by reference. */ - setheap((void *)&__heap_start, (void *)&__heap_end); + setheap(&__heap_start, &__heap_end); /* * Pick up console settings from boot2; probe console. From owner-svn-src-head@freebsd.org Wed Jan 3 18:19:48 2018 Return-Path: Delivered-To: svn-src-head@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 780D8EA8616; Wed, 3 Jan 2018 18:19:48 +0000 (UTC) (envelope-from markj@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 3F9A47F84C; Wed, 3 Jan 2018 18:19:48 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w03IJl6K099455; Wed, 3 Jan 2018 18:19:47 GMT (envelope-from markj@FreeBSD.org) Received: (from markj@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w03IJlRs099453; Wed, 3 Jan 2018 18:19:47 GMT (envelope-from markj@FreeBSD.org) Message-Id: <201801031819.w03IJlRs099453@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: markj set sender to markj@FreeBSD.org using -f From: Mark Johnston Date: Wed, 3 Jan 2018 18:19:47 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r327525 - head/sys/ufs/ufs X-SVN-Group: head X-SVN-Commit-Author: markj X-SVN-Commit-Paths: head/sys/ufs/ufs X-SVN-Commit-Revision: 327525 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 03 Jan 2018 18:19:48 -0000 Author: markj Date: Wed Jan 3 18:19:47 2018 New Revision: 327525 URL: https://svnweb.freebsd.org/changeset/base/327525 Log: Add missing newlines to a couple of error messages. Keep error messages on a single line so that they're easier to grep for. Reported by: pho MFC after: 1 week Modified: head/sys/ufs/ufs/ufs_lookup.c head/sys/ufs/ufs/ufs_vnops.c Modified: head/sys/ufs/ufs/ufs_lookup.c ============================================================================== --- head/sys/ufs/ufs/ufs_lookup.c Wed Jan 3 17:40:51 2018 (r327524) +++ head/sys/ufs/ufs/ufs_lookup.c Wed Jan 3 18:19:47 2018 (r327525) @@ -1126,8 +1126,9 @@ ufs_direnter(dvp, tvp, dirp, cnp, newdirbp, isrename) error = UFS_TRUNCATE(dvp, (off_t)dp->i_endoff, IO_NORMAL | (DOINGASYNC(dvp) ? 0 : IO_SYNC), cr); if (error != 0) - vn_printf(dvp, "ufs_direnter: failed to truncate " - "err %d", error); + vn_printf(dvp, + "ufs_direnter: failed to truncate, error %d\n", + error); #ifdef UFS_DIRHASH if (error == 0 && dp->i_dirhash != NULL) ufsdirhash_dirtrunc(dp, dp->i_endoff); Modified: head/sys/ufs/ufs/ufs_vnops.c ============================================================================== --- head/sys/ufs/ufs/ufs_vnops.c Wed Jan 3 17:40:51 2018 (r327524) +++ head/sys/ufs/ufs/ufs_vnops.c Wed Jan 3 18:19:47 2018 (r327525) @@ -1545,8 +1545,9 @@ unlockout: error = UFS_TRUNCATE(tdvp, endoff, IO_NORMAL | (DOINGASYNC(tdvp) ? 0 : IO_SYNC), tcnp->cn_cred); if (error != 0) - vn_printf(tdvp, "ufs_rename: failed to truncate " - "err %d", error); + vn_printf(tdvp, + "ufs_rename: failed to truncate, error %d\n", + error); #ifdef UFS_DIRHASH else if (tdp->i_dirhash != NULL) ufsdirhash_dirtrunc(tdp, endoff); From owner-svn-src-head@freebsd.org Wed Jan 3 18:43:58 2018 Return-Path: Delivered-To: svn-src-head@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 1801FEA943A; Wed, 3 Jan 2018 18:43:58 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2610:1c1:1:6074::16:84]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "freefall.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id DB03C80802; Wed, 3 Jan 2018 18:43:57 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from mail.xzibition.com (unknown [127.0.1.132]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by freefall.freebsd.org (Postfix) with ESMTPS id E51A19C03; Wed, 3 Jan 2018 18:43:56 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from mail.xzibition.com (localhost [172.31.3.2]) by mail.xzibition.com (Postfix) with ESMTP id E29A653C2; Wed, 3 Jan 2018 18:43:55 +0000 (UTC) X-Virus-Scanned: amavisd-new at mail.xzibition.com Received: from mail.xzibition.com ([172.31.3.2]) by mail.xzibition.com (mail.xzibition.com [172.31.3.2]) (amavisd-new, port 10026) with LMTP id d2q54CAsuldO; Wed, 3 Jan 2018 18:43:52 +0000 (UTC) Subject: Re: svn commit: r327523 - in head/stand/mips/beri: boot2 loader DKIM-Filter: OpenDKIM Filter v2.9.2 mail.xzibition.com 9556053BD To: John Baldwin , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org References: <201801031735.w03HZcFL082840@repo.freebsd.org> From: Bryan Drewery Openpgp: id=F9173CB2C3AAEA7A5C8A1F0935D771BB6E4697CF; url=http://www.shatow.net/bryan/bryan2.asc Organization: FreeBSD Message-ID: Date: Wed, 3 Jan 2018 10:43:54 -0800 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:52.0) Gecko/20100101 Thunderbird/52.5.2 MIME-Version: 1.0 In-Reply-To: <201801031735.w03HZcFL082840@repo.freebsd.org> Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="9QFbdP79QaMRBzkLnEpFPK0UZxWj9iFRD" X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 03 Jan 2018 18:43:58 -0000 This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --9QFbdP79QaMRBzkLnEpFPK0UZxWj9iFRD Content-Type: multipart/mixed; boundary="kDsDxgNUvCdjCitpP16g67rCdkFoE9hCl"; protected-headers="v1" From: Bryan Drewery To: John Baldwin , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Message-ID: Subject: Re: svn commit: r327523 - in head/stand/mips/beri: boot2 loader References: <201801031735.w03HZcFL082840@repo.freebsd.org> In-Reply-To: <201801031735.w03HZcFL082840@repo.freebsd.org> --kDsDxgNUvCdjCitpP16g67rCdkFoE9hCl Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: quoted-printable On 1/3/2018 9:35 AM, John Baldwin wrote: > Author: jhb > Date: Wed Jan 3 17:35:38 2018 > New Revision: 327523 > URL: https://svnweb.freebsd.org/changeset/base/327523 >=20 > Log: > Don't clobber system LDFLAGS for beri boot loaders. > =20 > Prior to r325114, bsd.init.mk was included after assignments to CFLAG= S and > LDFLAGS in these Makefiles. After r325114, bare assignments (=3D rat= her than > +=3D) lost system-assigned default values that are needed when compil= ing with > an external toolchain. CFLAGS in both Makefiles already uses +=3D. = This > commit changes LDFLAGS to use +=3D. While here, depend on the LDFLAG= S update > in the parent Makefile.inc to set -nostdlib. > =20 Hmm, I'm not sure it is even right for these files to be including bsd.init.mk. It says at the top: # The include file includes , # ../Makefile.inc and ; this is used at the # top of all files that actually "build something". There's a bunch of other files doing this as well. The biggest problem here is that including bsd.init.mk is like including bsd.prog.mk first and then putting the rest of the Makefile after it. It changes a lot of assumptions in share/mk files. And this particular file still includes bsd.prog.mk, so things really could go wrong. I speak of things like dependency handling and beforebuild handling. I think it's more likely these files just need src.opts.mk. > Sponsored by: DARPA / AFRL >=20 > Modified: > head/stand/mips/beri/boot2/Makefile > head/stand/mips/beri/loader/Makefile >=20 > Modified: head/stand/mips/beri/boot2/Makefile > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D > --- head/stand/mips/beri/boot2/Makefile Wed Jan 3 17:28:01 2018 (r3275= 22) > +++ head/stand/mips/beri/boot2/Makefile Wed Jan 3 17:35:38 2018 (r3275= 23) > @@ -53,8 +53,7 @@ CFLAGS+=3D -I${LDRSRC} \ > -fno-pic -mno-abicalls \ > -g > =20 > -LDFLAGS=3D -nostdlib \ > - -static \ > +LDFLAGS+=3D -static \ > -Wl,-N \ > -G0 \ > -L${.CURDIR} >=20 > Modified: head/stand/mips/beri/loader/Makefile > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D > --- head/stand/mips/beri/loader/Makefile Wed Jan 3 17:28:01 2018 (r327= 522) > +++ head/stand/mips/beri/loader/Makefile Wed Jan 3 17:35:38 2018 (r327= 523) > @@ -85,8 +85,7 @@ CFLAGS+=3D -G0 \ > -mno-abicalls \ > -g > =20 > -LDFLAGS=3D -nostdlib \ > - -static \ > +LDFLAGS+=3D -static \ > -T ${.CURDIR}/loader.ldscript \ > -L${.CURDIR} \ > -e __start >=20 --=20 Regards, Bryan Drewery --kDsDxgNUvCdjCitpP16g67rCdkFoE9hCl-- --9QFbdP79QaMRBzkLnEpFPK0UZxWj9iFRD Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQEcBAEBAgAGBQJaTSRqAAoJEDXXcbtuRpfPvLYH/iARgeKrcFRyUWjnWOvnqT1c ZnpnUxKatCtDVDMC+khhtHhUjvb+kFC07JjMMCaebd33quxF/ohKIQKv8varCVw9 Cy7FEERbiqwBhCeEDokbooRgIW26vbYzCKCt3d1gpdP76CamJqA8Sm6x6K9+qQ9S udZ39AAAAv5IrIbVAUjro7h4y5JK+DuL2CCxv6O2HpLBHs7JTxchPdI24iaEHMy3 L1mZAtq29s4JlgQXFM1qnOhtLyEcTP8KrtSdJUxUdr7edtd1AMBkFNamFf30Hc/2 ka5M+mqErI/V9RwMIYEoRVaizCGJJAVnFHmHpUw1yZ7GN4ynIY19JLpEhNITyXs= =iEAA -----END PGP SIGNATURE----- --9QFbdP79QaMRBzkLnEpFPK0UZxWj9iFRD-- From owner-svn-src-head@freebsd.org Wed Jan 3 19:22:12 2018 Return-Path: Delivered-To: svn-src-head@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 47691EAB287; Wed, 3 Jan 2018 19:22:12 +0000 (UTC) (envelope-from emaste@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 039BC2710; Wed, 3 Jan 2018 19:22:11 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w03JMBk0028336; Wed, 3 Jan 2018 19:22:11 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w03JMAtN028334; Wed, 3 Jan 2018 19:22:10 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <201801031922.w03JMAtN028334@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Wed, 3 Jan 2018 19:22:10 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r327526 - in head/sys: dev/ath tools X-SVN-Group: head X-SVN-Commit-Author: emaste X-SVN-Commit-Paths: in head/sys: dev/ath tools X-SVN-Commit-Revision: 327526 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 03 Jan 2018 19:22:12 -0000 Author: emaste Date: Wed Jan 3 19:22:10 2018 New Revision: 327526 URL: https://svnweb.freebsd.org/changeset/base/327526 Log: embed_mfs: correctly test grep return value Reported by: br MFC with: r326992 Sponsored by: The FreeBSD Foundation Modified: head/sys/dev/ath/if_ath_ioctl.c head/sys/tools/embed_mfs.sh Modified: head/sys/dev/ath/if_ath_ioctl.c ============================================================================== --- head/sys/dev/ath/if_ath_ioctl.c Wed Jan 3 18:19:47 2018 (r327525) +++ head/sys/dev/ath/if_ath_ioctl.c Wed Jan 3 19:22:10 2018 (r327526) @@ -197,7 +197,7 @@ ath_ioctl_diag(struct ath_softc *sc, struct ath_diag * * pointer for us to use below in reclaiming the buffer; * may want to be more defensive. */ - outdata = malloc(outsize, M_TEMP, M_NOWAIT); + outdata = malloc(outsize, M_TEMP, M_NOWAIT | M_ZERO); if (outdata == NULL) { error = ENOMEM; goto bad; Modified: head/sys/tools/embed_mfs.sh ============================================================================== --- head/sys/tools/embed_mfs.sh Wed Jan 3 18:19:47 2018 (r327525) +++ head/sys/tools/embed_mfs.sh Wed Jan 3 19:22:10 2018 (r327526) @@ -49,7 +49,7 @@ mfs_size=`stat -f '%z' $2 2> /dev/null` err_no_mfs="Can't locate mfs section within " -if [ `file -b $1 | grep -q '^ELF ..-bit .SB executable'` ]; then +if file -b $1 | grep -q '^ELF ..-bit .SB executable'; then sec_info=`elfdump -c $1 2> /dev/null | grep -A 5 -E "sh_name: oldmfs$"` # If we can't find the mfs section within the given kernel - bail. From owner-svn-src-head@freebsd.org Wed Jan 3 19:24:23 2018 Return-Path: Delivered-To: svn-src-head@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 3664EEAB538; Wed, 3 Jan 2018 19:24:23 +0000 (UTC) (envelope-from emaste@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 A91032A8D; Wed, 3 Jan 2018 19:24:22 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w03JOLtu029221; Wed, 3 Jan 2018 19:24:21 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w03JOL2w029220; Wed, 3 Jan 2018 19:24:21 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <201801031924.w03JOL2w029220@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Wed, 3 Jan 2018 19:24:21 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r327527 - head/sys/dev/ath X-SVN-Group: head X-SVN-Commit-Author: emaste X-SVN-Commit-Paths: head/sys/dev/ath X-SVN-Commit-Revision: 327527 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 03 Jan 2018 19:24:23 -0000 Author: emaste Date: Wed Jan 3 19:24:21 2018 New Revision: 327527 URL: https://svnweb.freebsd.org/changeset/base/327527 Log: ath: revert accidental change committed with r327526 It will be recommitted with the correct commit message. Modified: head/sys/dev/ath/if_ath_ioctl.c Modified: head/sys/dev/ath/if_ath_ioctl.c ============================================================================== --- head/sys/dev/ath/if_ath_ioctl.c Wed Jan 3 19:22:10 2018 (r327526) +++ head/sys/dev/ath/if_ath_ioctl.c Wed Jan 3 19:24:21 2018 (r327527) @@ -197,7 +197,7 @@ ath_ioctl_diag(struct ath_softc *sc, struct ath_diag * * pointer for us to use below in reclaiming the buffer; * may want to be more defensive. */ - outdata = malloc(outsize, M_TEMP, M_NOWAIT | M_ZERO); + outdata = malloc(outsize, M_TEMP, M_NOWAIT); if (outdata == NULL) { error = ENOMEM; goto bad; From owner-svn-src-head@freebsd.org Wed Jan 3 19:24:59 2018 Return-Path: Delivered-To: svn-src-head@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 3A941EAB623; Wed, 3 Jan 2018 19:24:59 +0000 (UTC) (envelope-from np@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 0B13F2C11; Wed, 3 Jan 2018 19:24:58 +0000 (UTC) (envelope-from np@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w03JOwLP029279; Wed, 3 Jan 2018 19:24:58 GMT (envelope-from np@FreeBSD.org) Received: (from np@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w03JOvM9029277; Wed, 3 Jan 2018 19:24:57 GMT (envelope-from np@FreeBSD.org) Message-Id: <201801031924.w03JOvM9029277@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: np set sender to np@FreeBSD.org using -f From: Navdeep Parhar Date: Wed, 3 Jan 2018 19:24:57 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r327528 - in head: share/man/man4 sys/dev/cxgbe X-SVN-Group: head X-SVN-Commit-Author: np X-SVN-Commit-Paths: in head: share/man/man4 sys/dev/cxgbe X-SVN-Commit-Revision: 327528 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 03 Jan 2018 19:24:59 -0000 Author: np Date: Wed Jan 3 19:24:57 2018 New Revision: 327528 URL: https://svnweb.freebsd.org/changeset/base/327528 Log: cxgbe(4): Add a knob to enable/disable PCIe relaxed ordering. Disable it by default when running on Intel CPUs. This is a crude fix for the performance issues alluded to in these Linux commits: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=87e09cdec4dae08acdb4aa49beb793c19d73e73e https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=a99b646afa8a02571ea298bedca6592d818229cd MFC after: 1 week Sponsored by: Chelsio Communications Modified: head/share/man/man4/cxgbe.4 head/sys/dev/cxgbe/t4_main.c Modified: head/share/man/man4/cxgbe.4 ============================================================================== --- head/share/man/man4/cxgbe.4 Wed Jan 3 19:24:21 2018 (r327527) +++ head/share/man/man4/cxgbe.4 Wed Jan 3 19:24:57 2018 (r327528) @@ -243,6 +243,13 @@ Permitted interrupt types. Bit 0 represents INTx (line interrupts), bit 1 MSI, and bit 2 MSI-X. The default is 7 (all allowed). The driver selects the best possible type out of the allowed types. +.It Va hw.cxgbe.pcie_relaxed_ordering +PCIe Relaxed Ordering. +-1 indicates the driver should determine whether to enable or disable PCIe RO. +0 disables PCIe RO. +1 enables PCIe RO. +2 indicates the driver should not modify the PCIe RO setting. +The default is -1. .It Va hw.cxgbe.fw_install 0 prohibits the driver from installing a firmware on the card. 1 allows the driver to install a new firmware if internal driver Modified: head/sys/dev/cxgbe/t4_main.c ============================================================================== --- head/sys/dev/cxgbe/t4_main.c Wed Jan 3 19:24:21 2018 (r327527) +++ head/sys/dev/cxgbe/t4_main.c Wed Jan 3 19:24:57 2018 (r327528) @@ -63,6 +63,8 @@ __FBSDID("$FreeBSD$"); #include #endif #if defined(__i386__) || defined(__amd64__) +#include +#include #include #include #endif @@ -454,7 +456,17 @@ TUNABLE_INT("hw.cxl.write_combine", &t5_write_combine) static int t4_num_vis = 1; TUNABLE_INT("hw.cxgbe.num_vis", &t4_num_vis); +/* + * PCIe Relaxed Ordering. + * -1: driver should figure out a good value. + * 0: disable RO. + * 1: enable RO. + * 2: leave RO alone. + */ +static int pcie_relaxed_ordering = -1; +TUNABLE_INT("hw.cxgbe.pcie_relaxed_ordering", &pcie_relaxed_ordering); + /* Functions used by VIs to obtain unique MAC addresses for each VI. */ static int vi_mac_funcs[] = { FW_VI_FUNC_ETH, @@ -856,10 +868,16 @@ t4_attach(device_t dev) pci_set_max_read_req(dev, 4096); v = pci_read_config(dev, i + PCIER_DEVICE_CTL, 2); - v |= PCIEM_CTL_RELAXED_ORD_ENABLE; - pci_write_config(dev, i + PCIER_DEVICE_CTL, v, 2); - sc->params.pci.mps = 128 << ((v & PCIEM_CTL_MAX_PAYLOAD) >> 5); + if (pcie_relaxed_ordering == 0 && + (v | PCIEM_CTL_RELAXED_ORD_ENABLE) != 0) { + v &= ~PCIEM_CTL_RELAXED_ORD_ENABLE; + pci_write_config(dev, i + PCIER_DEVICE_CTL, v, 2); + } else if (pcie_relaxed_ordering == 1 && + (v & PCIEM_CTL_RELAXED_ORD_ENABLE) == 0) { + v |= PCIEM_CTL_RELAXED_ORD_ENABLE; + pci_write_config(dev, i + PCIER_DEVICE_CTL, v, 2); + } } sc->sge_gts_reg = MYPF_REG(A_SGE_PF_GTS); @@ -9961,6 +9979,14 @@ tweak_tunables(void) if (t4_num_vis > nitems(vi_mac_funcs)) { t4_num_vis = nitems(vi_mac_funcs); printf("cxgbe: number of VIs limited to %d\n", t4_num_vis); + } + + if (pcie_relaxed_ordering < 0 || pcie_relaxed_ordering > 2) { + pcie_relaxed_ordering = 1; +#if defined(__i386__) || defined(__amd64__) + if (cpu_vendor_id == CPU_VENDOR_INTEL) + pcie_relaxed_ordering = 0; +#endif } } From owner-svn-src-head@freebsd.org Wed Jan 3 19:28:14 2018 Return-Path: Delivered-To: svn-src-head@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 C461CEAB9C1; Wed, 3 Jan 2018 19:28:14 +0000 (UTC) (envelope-from emaste@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 5DC262F40; Wed, 3 Jan 2018 19:28:14 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w03JSDWn029436; Wed, 3 Jan 2018 19:28:13 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w03JSDYL029435; Wed, 3 Jan 2018 19:28:13 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <201801031928.w03JSDYL029435@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Wed, 3 Jan 2018 19:28:13 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r327529 - head/sys/dev/ath X-SVN-Group: head X-SVN-Commit-Author: emaste X-SVN-Commit-Paths: head/sys/dev/ath X-SVN-Commit-Revision: 327529 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 03 Jan 2018 19:28:14 -0000 Author: emaste Date: Wed Jan 3 19:28:13 2018 New Revision: 327529 URL: https://svnweb.freebsd.org/changeset/base/327529 Log: ath: fix possible memory disclosure in ioctl handler Submitted by: Domagoj Stolfa MFC after: 1 week Modified: head/sys/dev/ath/if_ath_ioctl.c Modified: head/sys/dev/ath/if_ath_ioctl.c ============================================================================== --- head/sys/dev/ath/if_ath_ioctl.c Wed Jan 3 19:24:57 2018 (r327528) +++ head/sys/dev/ath/if_ath_ioctl.c Wed Jan 3 19:28:13 2018 (r327529) @@ -197,7 +197,7 @@ ath_ioctl_diag(struct ath_softc *sc, struct ath_diag * * pointer for us to use below in reclaiming the buffer; * may want to be more defensive. */ - outdata = malloc(outsize, M_TEMP, M_NOWAIT); + outdata = malloc(outsize, M_TEMP, M_NOWAIT | M_ZERO); if (outdata == NULL) { error = ENOMEM; goto bad; From owner-svn-src-head@freebsd.org Wed Jan 3 20:20:37 2018 Return-Path: Delivered-To: svn-src-head@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 0A179EAD798 for ; Wed, 3 Jan 2018 20:20:37 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: from mail-io0-x233.google.com (mail-io0-x233.google.com [IPv6:2607:f8b0:4001:c06::233]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id BF87F6435B for ; Wed, 3 Jan 2018 20:20:36 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: by mail-io0-x233.google.com with SMTP id 87so3326642ior.5 for ; Wed, 03 Jan 2018 12:20:36 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bsdimp-com.20150623.gappssmtp.com; s=20150623; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to:cc; bh=JiaLgBzg2ANEHo95qJq0njTmtnsNam3rr50WCSvPs0A=; b=KBAkzTyri08ZAJUFHXuac12I5dpPRWz4ijkIGKuDX7Zf7EVWwPHN6R+Ozc11i6W2Td hTHhM41Lpi46+0cdxJqIdnGWkZbo+eLtHxon+xkqU0BT6oMjy6tEzgvgVFqN2Y3ZnXGg 4r8Beej4jrsqRzoTde9Ec8YKzJcY5jkLB6F8BfCE8NyAvNZz7fVTbbLjZN70mwYMnsOd QCz8sI5N6hsALtaoQxNvsY7TnzOdRLzyETi+wFOmpwAYPnMA0cOyPArVtkKnSATjvepl ClTgx0OgICZf0ZrqPkIUANItzyp62BzzYUK9ttwzV8zRhocYCz2Mbozd/xddYz2pe0Mh XiNA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:sender:in-reply-to:references:from :date:message-id:subject:to:cc; bh=JiaLgBzg2ANEHo95qJq0njTmtnsNam3rr50WCSvPs0A=; b=U/SmDk++yp0X/Jfn1EVM8oqsn+F5O/b6QMqlDkYHJPcGegl1qEPXCgZQWcUc8SYu8b kGvPbU+zhb+uESTfae7cB/KfHfHuQiav4bDAIl+EB0W6ykbWNsap0Pkkukx/VmxmHZo0 /DSLK9RBj5G+//z44pzzAq/eONNmq5mBOvavi5IaNnoUF0hCCjcr0dLkXCO9pp+mavWk /N0C1xTZTYl+5lMqvlk9bu3UkWhktjVHWHhJ55trHrDlb1S10kCU0FttKHP3D4Cj7/ha onf+bZQ6i3R5vGgV9GibojkHmSgdXaTvVw91osvJn+PMDhU231TinSzqxG0lfDr5glK/ GU4A== X-Gm-Message-State: AKGB3mJs6yMElIMNucwMVD66HU3LmzJ8nxD88pVq4HY311KrRD/Sh4VB zhJuFiHCHIGNCeMRSeNsaNzD43DU+a3LkgMUtmBsNg== X-Google-Smtp-Source: ACJfBoupcf/bAk/ywTXc922yib+SVCVivei/RV5tMbuf3LVjiDYAhzuYu5x+1WGZ32C/M8uGW+Ad3iZwU1su7OaW2MY= X-Received: by 10.107.13.67 with SMTP id 64mr2913560ion.301.1515010835852; Wed, 03 Jan 2018 12:20:35 -0800 (PST) MIME-Version: 1.0 Sender: wlosh@bsdimp.com Received: by 10.79.108.204 with HTTP; Wed, 3 Jan 2018 12:20:35 -0800 (PST) X-Originating-IP: [50.235.217.130] Received: by 10.79.108.204 with HTTP; Wed, 3 Jan 2018 12:20:35 -0800 (PST) In-Reply-To: References: <201801031735.w03HZcFL082840@repo.freebsd.org> From: Warner Losh Date: Wed, 3 Jan 2018 13:20:35 -0700 X-Google-Sender-Auth: KnttN7usQFwxSapU9ojCjnkIThA Message-ID: Subject: Re: svn commit: r327523 - in head/stand/mips/beri: boot2 loader To: Bryan Drewery Cc: John Baldwin , src-committers , svn-src-all@freebsd.org, svn-src-head@freebsd.org Content-Type: text/plain; charset="UTF-8" X-Content-Filtered-By: Mailman/MimeDel 2.1.25 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 03 Jan 2018 20:20:37 -0000 On Jan 3, 2018 11:44 AM, "Bryan Drewery" wrote: On 1/3/2018 9:35 AM, John Baldwin wrote: > Author: jhb > Date: Wed Jan 3 17:35:38 2018 > New Revision: 327523 > URL: https://svnweb.freebsd.org/changeset/base/327523 > > Log: > Don't clobber system LDFLAGS for beri boot loaders. > > Prior to r325114, bsd.init.mk was included after assignments to CFLAGS and > LDFLAGS in these Makefiles. After r325114, bare assignments (= rather than > +=) lost system-assigned default values that are needed when compiling with > an external toolchain. CFLAGS in both Makefiles already uses +=. This > commit changes LDFLAGS to use +=. While here, depend on the LDFLAGS update > in the parent Makefile.inc to set -nostdlib. > Hmm, I'm not sure it is even right for these files to be including bsd.init.mk It is the right thing. It says at the top: # The include file includes , # ../Makefile.inc and ; this is used at the # top of all files that actually "build something". There's a bunch of other files doing this as well. The biggest problem here is that including bsd.init.mk is like including bsd.prog.mk first and then putting the rest of the Makefile after it. It changes a lot of assumptions in share/mk files. And this particular file still includes bsd.prog.mk, so things really could go wrong. I speak of things like dependency handling and beforebuild handling. I think it's more likely these files just need src.opts.mk. No. They depend on Makefile.inc stuff being done and this was the easiest way to do that in dozens of files. Warner > Sponsored by: DARPA / AFRL > > Modified: > head/stand/mips/beri/boot2/Makefile > head/stand/mips/beri/loader/Makefile > > Modified: head/stand/mips/beri/boot2/Makefile > ============================================================ ================== > --- head/stand/mips/beri/boot2/Makefile Wed Jan 3 17:28:01 2018 (r327522) > +++ head/stand/mips/beri/boot2/Makefile Wed Jan 3 17:35:38 2018 (r327523) > @@ -53,8 +53,7 @@ CFLAGS+= -I${LDRSRC} \ > -fno-pic -mno-abicalls \ > -g > > -LDFLAGS= -nostdlib \ > - -static \ > +LDFLAGS+= -static \ > -Wl,-N \ > -G0 \ > -L${.CURDIR} > > Modified: head/stand/mips/beri/loader/Makefile > ============================================================ ================== > --- head/stand/mips/beri/loader/Makefile Wed Jan 3 17:28:01 2018 (r327522) > +++ head/stand/mips/beri/loader/Makefile Wed Jan 3 17:35:38 2018 (r327523) > @@ -85,8 +85,7 @@ CFLAGS+= -G0 \ > -mno-abicalls \ > -g > > -LDFLAGS= -nostdlib \ > - -static \ > +LDFLAGS+= -static \ > -T ${.CURDIR}/loader.ldscript \ > -L${.CURDIR} \ > -e __start > -- Regards, Bryan Drewery From owner-svn-src-head@freebsd.org Wed Jan 3 20:20:44 2018 Return-Path: Delivered-To: svn-src-head@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 ABFD3EAD7CB; Wed, 3 Jan 2018 20:20:44 +0000 (UTC) (envelope-from andreast@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 6905F643B6; Wed, 3 Jan 2018 20:20:44 +0000 (UTC) (envelope-from andreast@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w03KKhWU050607; Wed, 3 Jan 2018 20:20:43 GMT (envelope-from andreast@FreeBSD.org) Received: (from andreast@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w03KKh2B050605; Wed, 3 Jan 2018 20:20:43 GMT (envelope-from andreast@FreeBSD.org) Message-Id: <201801032020.w03KKh2B050605@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: andreast set sender to andreast@FreeBSD.org using -f From: Andreas Tobler Date: Wed, 3 Jan 2018 20:20:43 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r327530 - in head/sys/powerpc: include powerpc X-SVN-Group: head X-SVN-Commit-Author: andreast X-SVN-Commit-Paths: in head/sys/powerpc: include powerpc X-SVN-Commit-Revision: 327530 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 03 Jan 2018 20:20:44 -0000 Author: andreast Date: Wed Jan 3 20:20:43 2018 New Revision: 327530 URL: https://svnweb.freebsd.org/changeset/base/327530 Log: The recent bump of MAXDSIZ made 32-bit binary execution on 64-bit powerpc fail. The data segement was too big. Add a fix-up function like on ia32 for MAXDSIZ. While here, bring also the MAXSSIZ closer to amd64 and add an equal fix-up function for MAXSSIZ. Reviewed by: jhibbits@ Obtained from: jhibbits@ Differential Revision: https://reviews.freebsd.org/D13753 Modified: head/sys/powerpc/include/vmparam.h head/sys/powerpc/powerpc/elf32_machdep.c Modified: head/sys/powerpc/include/vmparam.h ============================================================================== --- head/sys/powerpc/include/vmparam.h Wed Jan 3 19:28:13 2018 (r327529) +++ head/sys/powerpc/include/vmparam.h Wed Jan 3 20:20:43 2018 (r327530) @@ -60,7 +60,11 @@ #endif #ifndef MAXSSIZ +#ifdef __powerpc64__ +#define MAXSSIZ (512*1024*1024) /* max stack size */ +#else #define MAXSSIZ (64*1024*1024) /* max stack size */ +#endif #endif #ifdef AIM Modified: head/sys/powerpc/powerpc/elf32_machdep.c ============================================================================== --- head/sys/powerpc/powerpc/elf32_machdep.c Wed Jan 3 19:28:13 2018 (r327529) +++ head/sys/powerpc/powerpc/elf32_machdep.c Wed Jan 3 20:20:43 2018 (r327530) @@ -42,6 +42,7 @@ #include #include #include +#include #include #include #include @@ -60,6 +61,18 @@ #include extern const char *freebsd32_syscallnames[]; +static void ppc32_fixlimit(struct rlimit *rl, int which); + +static SYSCTL_NODE(_compat, OID_AUTO, ppc32, CTLFLAG_RW, 0, "32-bit mode"); + +#define PPC32_MAXDSIZ (1024*1024*1024) +static u_long ppc32_maxdsiz = PPC32_MAXDSIZ; +SYSCTL_ULONG(_compat_ppc32, OID_AUTO, maxdsiz, CTLFLAG_RWTUN, &ppc32_maxdsiz, + 0, ""); +#define PPC32_MAXSSIZ (64*1024*1024) +u_long ppc32_maxssiz = PPC32_MAXSSIZ; +SYSCTL_ULONG(_compat_ppc32, OID_AUTO, maxssiz, CTLFLAG_RWTUN, &ppc32_maxssiz, + 0, ""); #endif struct sysentvec elf32_freebsd_sysvec = { @@ -91,6 +104,7 @@ struct sysentvec elf32_freebsd_sysvec = { .sv_copyout_strings = freebsd32_copyout_strings, .sv_setregs = ppc32_setregs, .sv_syscallnames = freebsd32_syscallnames, + .sv_fixlimit = ppc32_fixlimit, #else .sv_maxuser = VM_MAXUSER_ADDRESS, .sv_usrstack = USRSTACK, @@ -98,8 +112,8 @@ struct sysentvec elf32_freebsd_sysvec = { .sv_copyout_strings = exec_copyout_strings, .sv_setregs = exec_setregs, .sv_syscallnames = syscallnames, -#endif .sv_fixlimit = NULL, +#endif .sv_maxssiz = NULL, .sv_flags = SV_ABI_FREEBSD | SV_ILP32 | SV_SHP, .sv_set_syscall_retval = cpu_set_syscall_retval, @@ -319,5 +333,30 @@ elf_cpu_unload_file(linker_file_t lf __unused) { return (0); +} +#endif + +#ifdef __powerpc64__ +static void +ppc32_fixlimit(struct rlimit *rl, int which) +{ + switch (which) { + case RLIMIT_DATA: + if (ppc32_maxdsiz != 0) { + if (rl->rlim_cur > ppc32_maxdsiz) + rl->rlim_cur = ppc32_maxdsiz; + if (rl->rlim_max > ppc32_maxdsiz) + rl->rlim_max = ppc32_maxdsiz; + } + break; + case RLIMIT_STACK: + if (ppc32_maxssiz != 0) { + if (rl->rlim_cur > ppc32_maxssiz) + rl->rlim_cur = ppc32_maxssiz; + if (rl->rlim_max > ppc32_maxssiz) + rl->rlim_max = ppc32_maxssiz; + } + break; + } } #endif From owner-svn-src-head@freebsd.org Wed Jan 3 22:17:31 2018 Return-Path: Delivered-To: svn-src-head@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 990D4EB24BB; Wed, 3 Jan 2018 22:17:31 +0000 (UTC) (envelope-from brooks@spindle.one-eyed-alien.net) Received: from spindle.one-eyed-alien.net (spindle.one-eyed-alien.net [199.48.129.229]) (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 7201869276; Wed, 3 Jan 2018 22:17:31 +0000 (UTC) (envelope-from brooks@spindle.one-eyed-alien.net) Received: by spindle.one-eyed-alien.net (Postfix, from userid 3001) id 2A0D35A9F15; Wed, 3 Jan 2018 22:09:42 +0000 (UTC) Date: Wed, 3 Jan 2018 22:09:42 +0000 From: Brooks Davis To: "Pedro F. Giffuni" Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r327086 - head/sys/dev/lmc Message-ID: <20180103220942.GC95035@spindle.one-eyed-alien.net> References: <201712221715.vBMHF27m046894@repo.freebsd.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="GID0FwUMdk1T2AWN" Content-Disposition: inline In-Reply-To: <201712221715.vBMHF27m046894@repo.freebsd.org> User-Agent: Mutt/1.9.1 (2017-09-22) X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 03 Jan 2018 22:17:31 -0000 --GID0FwUMdk1T2AWN Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Fri, Dec 22, 2017 at 05:15:02PM +0000, Pedro F. Giffuni wrote: > Author: pfg > Date: Fri Dec 22 17:15:02 2017 > New Revision: 327086 > URL: https://svnweb.freebsd.org/changeset/base/327086 >=20 > Log: > SPDX: Reverse License ID tags from the lmc driver. > =20 > While the BSD-2-Clause license is there, the GPLv2 is also present. > I am unsure of the implications of having both licenses as they are her= e. > =20 > I'll just leave it untagged and open for interpretation. Deleting lmc(4) is probably the appropriate fix. You can buy the things on e-bay, but they look to be 32-bit PCI devices and it seems unlikely they are in use on systems that will run FreeBSD 12. I've updated the wiki with a note to this effect. -- Brooks --GID0FwUMdk1T2AWN Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQEcBAEBAgAGBQJaTVSlAAoJEKzQXbSebgfAiVIH/0Z9ybcZCmY9RZTqiZjgBiRP /HtCKYJtQjRFLEMy2fU3jCUDNz6Ds/Yj/ft+B3ihb93bAWSO9qjte/PbsLfWuVAt GVTPXwCii4u1rFxDtXpAtF6ZUDezNqTescXO+nKmeS9CaH/MAIaPkJIBPB9PjIfN j2QNZ/48WrRidG1HfaR/uDpuh9QezLnYiaiU7+cKoOSKcrj/LYZoeZ4fo7bIhSyH ApYLsDfjHTGcWQXg8Hvk+D2y35XWSI3mU9OiVhorRXeTjfP8r5XgsHmfA3mKuoF4 UIeVG5uBJfOI5AsZfaZ+qrgLP/zJghSfK9HJvrvjAK3n4SuZJ0iWr+uGNRib1R4= =pJ2j -----END PGP SIGNATURE----- --GID0FwUMdk1T2AWN-- From owner-svn-src-head@freebsd.org Wed Jan 3 23:03:21 2018 Return-Path: Delivered-To: svn-src-head@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 C2938EB43A6 for ; Wed, 3 Jan 2018 23:03:21 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: from mail-io0-x231.google.com (mail-io0-x231.google.com [IPv6:2607:f8b0:4001:c06::231]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 824136AFC2 for ; Wed, 3 Jan 2018 23:03:21 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: by mail-io0-x231.google.com with SMTP id t63so329671iod.0 for ; Wed, 03 Jan 2018 15:03:21 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bsdimp-com.20150623.gappssmtp.com; s=20150623; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to:cc; bh=SyuCjrKiMulriLA5gmeazj+JtGqAHi8lUxaDt89HHY8=; b=lPrhs2HRbzFLUzZwYd8wIGwxjQqVux1m4TbE1pBywiy4CPmAoHG+Me7TRReL4Qdqxz 095Sk2C8S5kaVLtPnj+4D7vl51sELEd6VD6fjOl3fkJUZjujCwCW8z64P8JId9uxU5EH rdXlv45ALCTOVXVZJC5u2Z3xYzbAE5Rh2gOZcKkEvBp2mj97p2pQsV6rkdVGwvSqE76T gPCPdyT5wYNLnZ8lay7tf1mqDs0MZGN1n9XAluVRTc0o2zOmh4p2DHYQ9sGIPl6LoLb1 +rfIbuUM4Dh3X37l8WmMrOBGh7LZ/mbaqzcC01YI8uLUyK0mGGlFm8qaWgop7lVqyn69 lsJg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:sender:in-reply-to:references:from :date:message-id:subject:to:cc; bh=SyuCjrKiMulriLA5gmeazj+JtGqAHi8lUxaDt89HHY8=; b=dAJLOwoqWQOxyIo3pHhi/C98Xc2FeGGQCwShx82CY2FmfVyWY5RaZ6shEd8QZSB7El VD2dVo2dLI9QsFpFKah/iVOn9B6W0j6fWJ48ijyyXpGELrKoR5fkg/DrxrPj/1U513VT VxD1sIY1A+jjpqnerDCM7/3Fi6yrJRzgDcI7Z5GANF/RZa1b8dOdSpgp8jkyhLHPR/ef 3rpbQIqbhHn7a+NRp2yAqQ4V98o/T7YS85ptdqaAIObYjqmwLej7oNBy65TW/lY3dR2k 5UCifu5odhE8+n4l5GRhcjAaL5J/4v+bmLtQr5n2b0cty7fgGweQ3oEbEGkV/Qf1pVzs C2tQ== X-Gm-Message-State: AKGB3mI9TPp5my4gBxtQaPsWI6QXpm3HxrBrpZekXb+cPFOK/J11gTtH JgLt+BXgmXRHPnaBGsBlP4KMLzy0a9Bh63Q870vLjQ== X-Google-Smtp-Source: ACJfBovq2IhsMoLJYyli8BwLExZUJTV3QKB0p7vbk2oKPWh7xb2IuzaOcC+fZe8GR6bmUUqtDI3+Dp4NFvUuGAFmVPE= X-Received: by 10.107.174.159 with SMTP id n31mr3035952ioo.136.1515020600557; Wed, 03 Jan 2018 15:03:20 -0800 (PST) MIME-Version: 1.0 Sender: wlosh@bsdimp.com Received: by 10.79.108.204 with HTTP; Wed, 3 Jan 2018 15:03:19 -0800 (PST) X-Originating-IP: [2603:300b:6:5100:a858:68e8:b27a:8855] Received: by 10.79.108.204 with HTTP; Wed, 3 Jan 2018 15:03:19 -0800 (PST) In-Reply-To: References: <201712221715.vBMHF27m046894@repo.freebsd.org> <20180103220942.GC95035@spindle.one-eyed-alien.net> From: Warner Losh Date: Wed, 3 Jan 2018 16:03:19 -0700 X-Google-Sender-Auth: R72LS3hr8vUPmzT0oInQSjeWKJY Message-ID: Subject: Re: svn commit: r327086 - head/sys/dev/lmc To: Brooks Davis Cc: Pedro Giffuni , src-committers , svn-src-all@freebsd.org, svn-src-head@freebsd.org Content-Type: text/plain; charset="UTF-8" X-Content-Filtered-By: Mailman/MimeDel 2.1.25 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 03 Jan 2018 23:03:21 -0000 On Jan 3, 2018 3:17 PM, "Brooks Davis" wrote: On Fri, Dec 22, 2017 at 05:15:02PM +0000, Pedro F. Giffuni wrote: > Author: pfg > Date: Fri Dec 22 17:15:02 2017 > New Revision: 327086 > URL: https://svnweb.freebsd.org/changeset/base/327086 > > Log: > SPDX: Reverse License ID tags from the lmc driver. > > While the BSD-2-Clause license is there, the GPLv2 is also present. > I am unsure of the implications of having both licenses as they are here. > > I'll just leave it untagged and open for interpretation. Deleting lmc(4) is probably the appropriate fix. You can buy the things on e-bay, but they look to be 32-bit PCI devices and it seems unlikely they are in use on systems that will run FreeBSD 12. I've updated the wiki with a note to this effect. Which wiki? I'd like to formalize things a little. Inc is for very old interconnect to telco... So maybe that's safe to delete. Warner From owner-svn-src-head@freebsd.org Wed Jan 3 23:41:58 2018 Return-Path: Delivered-To: svn-src-head@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 53444EB59F4 for ; Wed, 3 Jan 2018 23:41:58 +0000 (UTC) (envelope-from pfg@FreeBSD.org) Received: from sonic302-18.consmr.mail.bf2.yahoo.com (sonic302-18.consmr.mail.bf2.yahoo.com [74.6.135.57]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 15C816C4D9 for ; Wed, 3 Jan 2018 23:41:57 +0000 (UTC) (envelope-from pfg@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1515022911; bh=afV4RRVOLoEad/RmMg9x/phFKiEDpeOV91DGefLOEno=; h=Subject:To:Cc:References:From:Date:In-Reply-To:From:Subject; b=uIj9sM7MXO3l7AFSsqOHTyNNuC7hrUGve/xrA4khFGEzT9N0Y8F35+UY+04oHzm1ri2Kt+mPZyzIyr00OfiocqaHqcIxcHVWW5O+/jeCu1neqswqqdUn23qzRs6y7cVnuCgqluCTZYxEKuJ/rCCDka1I/SgGruyV428z+5fNH5pAD7QecZj4ferKNTEG8BvgV7ngalEJXi+YpAkfMnCbRf9B2DJVfKWK/zlUIsDVY+ZXKmy7PmUlrJjhuDj4Fq0DAtXxxE4E2nwW4wT8BgROQA4i6/a7aHB0foTK9yDEH945zN6M2skSzHXXUrZpKYJaiUjh+gMp3Uo0JhKglB4Gkw== X-YMail-OSG: rGiNXwwVM1lte9q9dksXQzceyx0u2tQfldAh.CJWRx5xBJbfpEb5.IuR183iiTa 4x6WG89Ad23CA5x1PNi_7O622KoqzE_qXx9KkZIShzqYTyyEhI8ZhEqAe1Q7gxAQ5adVlCJoaDYV FW79YbKtIA8ObU6dR9_lELX0V4IHRikb6S__hIG7rsm1p3LAwRmz_8SYCK694JhZ4Q4YulSM6RGZ pbKspbxK_.BEPH2pXXaZ88e.9tf.s5x_iro5Nx3jZJ6lj7R.mxrScZlayXg_bsJdMKr4JO.Q4f80 Kx_WJlsPRN4b0249vAWjXCIP6i4rcJuZoMUg2fkbGutXonRUzihPogInhtaSTMIHzWYPVrY73zm9 jIM.gHnFOR4WW4z0c9tGJc_.NmpXPhgXGLwqoa1MqsRYHZhAU2YYvOgvuflLsNiSBCtmuZStsDS1 _qv_FRnJwS805.2CjniNnHBNR77q0QjJB6WWwsRIfpxA0LhhvNNu17V24DTIwjjOrsanrye9j Received: from sonic.gate.mail.ne1.yahoo.com by sonic302.consmr.mail.bf2.yahoo.com with HTTP; Wed, 3 Jan 2018 23:41:51 +0000 Received: from smtp108.rhel.mail.bf1.yahoo.com (EHLO [192.168.0.6]) ([98.139.231.46]) by smtp414.mail.bf1.yahoo.com (JAMES SMTP Server ) with ESMTPA ID 8fce68a5add612dc4115245dc1fd6278; Wed, 03 Jan 2018 23:41:48 +0000 (UTC) Subject: Re: svn commit: r327086 - head/sys/dev/lmc To: Warner Losh , Brooks Davis Cc: src-committers , svn-src-all@freebsd.org, svn-src-head@freebsd.org References: <201712221715.vBMHF27m046894@repo.freebsd.org> <20180103220942.GC95035@spindle.one-eyed-alien.net> From: Pedro Giffuni Organization: FreeBSD Project Message-ID: <02a7407a-0445-e503-9279-e893f53f8ef0@FreeBSD.org> Date: Wed, 3 Jan 2018 18:41:46 -0500 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:52.0) Gecko/20100101 Thunderbird/52.5.2 MIME-Version: 1.0 In-Reply-To: Content-Language: en-US Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit X-Content-Filtered-By: Mailman/MimeDel 2.1.25 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 03 Jan 2018 23:41:58 -0000 On 03/01/2018 18:03, Warner Losh wrote: > > > On Jan 3, 2018 3:17 PM, "Brooks Davis" > wrote: > > On Fri, Dec 22, 2017 at 05:15:02PM +0000, Pedro F. Giffuni wrote: > > Author: pfg > > Date: Fri Dec 22 17:15:02 2017 > > New Revision: 327086 > > URL: https://svnweb.freebsd.org/changeset/base/327086 > > > > > Log: > >   SPDX: Reverse License ID tags from the lmc driver. > > > >   While the BSD-2-Clause license is there, the GPLv2 is also > present. > >   I am unsure of the implications of having both licenses as > they are here. > > > >   I'll just leave it untagged and open for interpretation. > > Deleting lmc(4) is probably the appropriate fix.  You can buy the > things > on e-bay, but they look to be 32-bit PCI devices and it seems unlikely > they are in use on systems that will run FreeBSD 12.  I've updated the > wiki with a note to this effect. > > > Which wiki? > https://wiki.freebsd.org/GPLinBase > I'd like to formalize things a little. > Either the license is very naively stated or the device should have been added in the contrib/gnu branches. I suspect the former but my attempts to contact the author were unsuccessful so it is probably better to just drop it. > Inc is for very old interconnect to telco... So maybe that's safe to > delete. > > Warner > > Pedro. From owner-svn-src-head@freebsd.org Thu Jan 4 03:16:33 2018 Return-Path: Delivered-To: svn-src-head@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 61B59E80365; Thu, 4 Jan 2018 03:16:33 +0000 (UTC) (envelope-from alc@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 29479769F0; Thu, 4 Jan 2018 03:16:33 +0000 (UTC) (envelope-from alc@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w043GWJo026066; Thu, 4 Jan 2018 03:16:32 GMT (envelope-from alc@FreeBSD.org) Received: (from alc@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w043GWZo026065; Thu, 4 Jan 2018 03:16:32 GMT (envelope-from alc@FreeBSD.org) Message-Id: <201801040316.w043GWZo026065@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: alc set sender to alc@FreeBSD.org using -f From: Alan Cox Date: Thu, 4 Jan 2018 03:16:32 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r327538 - head/sys/vm X-SVN-Group: head X-SVN-Commit-Author: alc X-SVN-Commit-Paths: head/sys/vm X-SVN-Commit-Revision: 327538 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 04 Jan 2018 03:16:33 -0000 Author: alc Date: Thu Jan 4 03:16:32 2018 New Revision: 327538 URL: https://svnweb.freebsd.org/changeset/base/327538 Log: Once we have decided to swap out a process, don't delay the laundering of its per-thread kernel stack pages by making them pass through the inactive queue first. Instead, immediately place them in the laundry so that they might be cleaned and made available for reclamation sooner. Reviewed by: kib, markj MFC after: 1 week Modified: head/sys/vm/vm_swapout.c Modified: head/sys/vm/vm_swapout.c ============================================================================== --- head/sys/vm/vm_swapout.c Thu Jan 4 01:21:24 2018 (r327537) +++ head/sys/vm/vm_swapout.c Thu Jan 4 03:16:32 2018 (r327538) @@ -546,7 +546,7 @@ vm_thread_swapout(struct thread *td) panic("vm_thread_swapout: kstack already missing?"); vm_page_dirty(m); vm_page_lock(m); - vm_page_unwire(m, PQ_INACTIVE); + vm_page_unwire(m, PQ_LAUNDRY); vm_page_unlock(m); } VM_OBJECT_WUNLOCK(ksobj); From owner-svn-src-head@freebsd.org Thu Jan 4 04:04:30 2018 Return-Path: Delivered-To: svn-src-head@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 D7D5EE81DAE; Thu, 4 Jan 2018 04:04:30 +0000 (UTC) (envelope-from oshogbo@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 A210F78346; Thu, 4 Jan 2018 04:04:30 +0000 (UTC) (envelope-from oshogbo@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w0444Tgk046637; Thu, 4 Jan 2018 04:04:29 GMT (envelope-from oshogbo@FreeBSD.org) Received: (from oshogbo@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w0444T4r046636; Thu, 4 Jan 2018 04:04:29 GMT (envelope-from oshogbo@FreeBSD.org) Message-Id: <201801040404.w0444T4r046636@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: oshogbo set sender to oshogbo@FreeBSD.org using -f From: Mariusz Zaborski Date: Thu, 4 Jan 2018 04:04:29 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r327539 - head/lib/libcasper/libcasper X-SVN-Group: head X-SVN-Commit-Author: oshogbo X-SVN-Commit-Paths: head/lib/libcasper/libcasper X-SVN-Commit-Revision: 327539 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 04 Jan 2018 04:04:30 -0000 Author: oshogbo Date: Thu Jan 4 04:04:29 2018 New Revision: 327539 URL: https://svnweb.freebsd.org/changeset/base/327539 Log: Add missing macro in man page. Reported by: brueffer@ Modified: head/lib/libcasper/libcasper/libcasper.3 Modified: head/lib/libcasper/libcasper/libcasper.3 ============================================================================== --- head/lib/libcasper/libcasper/libcasper.3 Thu Jan 4 03:16:32 2018 (r327538) +++ head/lib/libcasper/libcasper/libcasper.3 Thu Jan 4 04:04:29 2018 (r327539) @@ -27,7 +27,7 @@ .\" .\" $FreeBSD$ .\" -.Dd January 2, 2018 +.Dd January 3, 2018 .Dt LIBCASPER 3 .Os .Sh NAME @@ -204,7 +204,8 @@ provides .Xr getpwent 3 compatible API .It system.random -allows to obtain entropy from /dev/random +allows to obtain entropy from +.Pa /dev/random .It system.sysctl provides .Xr sysctlbyname 3 From owner-svn-src-head@freebsd.org Thu Jan 4 04:11:41 2018 Return-Path: Delivered-To: svn-src-head@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 EF524E8519C; Thu, 4 Jan 2018 04:11:41 +0000 (UTC) (envelope-from cy@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 BA0BB78777; Thu, 4 Jan 2018 04:11:41 +0000 (UTC) (envelope-from cy@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w044BeNl048561; Thu, 4 Jan 2018 04:11:40 GMT (envelope-from cy@FreeBSD.org) Received: (from cy@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w044BeYx048560; Thu, 4 Jan 2018 04:11:40 GMT (envelope-from cy@FreeBSD.org) Message-Id: <201801040411.w044BeYx048560@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: cy set sender to cy@FreeBSD.org using -f From: Cy Schubert Date: Thu, 4 Jan 2018 04:11:40 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r327540 - head/sys/contrib/ipfilter/netinet X-SVN-Group: head X-SVN-Commit-Author: cy X-SVN-Commit-Paths: head/sys/contrib/ipfilter/netinet X-SVN-Commit-Revision: 327540 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 04 Jan 2018 04:11:42 -0000 Author: cy Date: Thu Jan 4 04:11:40 2018 New Revision: 327540 URL: https://svnweb.freebsd.org/changeset/base/327540 Log: Correct function name in description block. MFC after: 3 days Modified: head/sys/contrib/ipfilter/netinet/ip_state.c Modified: head/sys/contrib/ipfilter/netinet/ip_state.c ============================================================================== --- head/sys/contrib/ipfilter/netinet/ip_state.c Thu Jan 4 04:04:29 2018 (r327539) +++ head/sys/contrib/ipfilter/netinet/ip_state.c Thu Jan 4 04:11:40 2018 (r327540) @@ -483,7 +483,7 @@ ipf_state_soft_fini(softc, arg) /* ------------------------------------------------------------------------ */ -/* Function: ipf_state_set_lock */ +/* Function: ipf_state_setlock */ /* Returns: Nil */ /* Parameters: arg(I) - pointer to local context to use */ /* tmp(I) - new value for lock */ From owner-svn-src-head@freebsd.org Thu Jan 4 08:07:34 2018 Return-Path: Delivered-To: svn-src-head@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 69DC0EA617F; Thu, 4 Jan 2018 08:07:34 +0000 (UTC) (envelope-from phk@critter.freebsd.dk) Received: from phk.freebsd.dk (phk.freebsd.dk [130.225.244.222]) by mx1.freebsd.org (Postfix) with ESMTP id 2AE217EB76; Thu, 4 Jan 2018 08:07:33 +0000 (UTC) (envelope-from phk@critter.freebsd.dk) Received: from critter.freebsd.dk (unknown [192.168.55.3]) by phk.freebsd.dk (Postfix) with ESMTP id 0B281273A0; Thu, 4 Jan 2018 08:07:30 +0000 (UTC) Received: from critter.freebsd.dk (localhost [127.0.0.1]) by critter.freebsd.dk (8.15.2/8.15.2) with ESMTPS id w0487FbZ061609 (version=TLSv1.2 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Thu, 4 Jan 2018 08:07:15 GMT (envelope-from phk@critter.freebsd.dk) Received: (from phk@localhost) by critter.freebsd.dk (8.15.2/8.15.2/Submit) id w0487E4Y061608; Thu, 4 Jan 2018 08:07:15 GMT (envelope-from phk) To: Warner Losh cc: Brooks Davis , Pedro Giffuni , src-committers , svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r327086 - head/sys/dev/lmc In-reply-to: From: "Poul-Henning Kamp" References: <201712221715.vBMHF27m046894@repo.freebsd.org> <20180103220942.GC95035@spindle.one-eyed-alien.net> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <61606.1515053234.1@critter.freebsd.dk> Content-Transfer-Encoding: quoted-printable Date: Thu, 04 Jan 2018 08:07:14 +0000 Message-ID: <61607.1515053234@critter.freebsd.dk> X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 04 Jan 2018 08:07:34 -0000 -------- In message , Warner Losh writes: >Deleting lmc(4) is probably the appropriate fix. >Inc is for very old interconnect to telco... So maybe that's safe to dele= te. As the guy who put lmc(4) in the tree I concur. -- = Poul-Henning Kamp | UNIX since Zilog Zeus 3.20 phk@FreeBSD.ORG | TCP/IP since RFC 956 FreeBSD committer | BSD since 4.3-tahoe = Never attribute to malice what can adequately be explained by incompetence= . From owner-svn-src-head@freebsd.org Thu Jan 4 08:23:25 2018 Return-Path: Delivered-To: svn-src-head@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 3AFBBEA6961; Thu, 4 Jan 2018 08:23:25 +0000 (UTC) (envelope-from oshogbo@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 01E5C7F5F3; Thu, 4 Jan 2018 08:23:24 +0000 (UTC) (envelope-from oshogbo@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w048NOvP054305; Thu, 4 Jan 2018 08:23:24 GMT (envelope-from oshogbo@FreeBSD.org) Received: (from oshogbo@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w048NOT5054304; Thu, 4 Jan 2018 08:23:24 GMT (envelope-from oshogbo@FreeBSD.org) Message-Id: <201801040823.w048NOT5054304@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: oshogbo set sender to oshogbo@FreeBSD.org using -f From: Mariusz Zaborski Date: Thu, 4 Jan 2018 08:23:24 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r327541 - head/lib/libcasper/libcasper X-SVN-Group: head X-SVN-Commit-Author: oshogbo X-SVN-Commit-Paths: head/lib/libcasper/libcasper X-SVN-Commit-Revision: 327541 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 04 Jan 2018 08:23:25 -0000 Author: oshogbo Date: Thu Jan 4 08:23:23 2018 New Revision: 327541 URL: https://svnweb.freebsd.org/changeset/base/327541 Log: cap_unwrap should return a descriptor but also free the structure. Modified: head/lib/libcasper/libcasper/libcasper.h Modified: head/lib/libcasper/libcasper/libcasper.h ============================================================================== --- head/lib/libcasper/libcasper/libcasper.h Thu Jan 4 04:11:40 2018 (r327540) +++ head/lib/libcasper/libcasper/libcasper.h Thu Jan 4 08:23:23 2018 (r327541) @@ -122,7 +122,15 @@ cap_wrap(int sock) #ifdef WITH_CASPER int cap_unwrap(cap_channel_t *chan); #else -#define cap_unwrap(chan) (chan->cch_fd) +static inline int +cap_unwrap(cap_channel_t *chan) +{ + int fd; + + fd = chan->cch_fd; + free(chan); + return (fd); +} #endif /* From owner-svn-src-head@freebsd.org Thu Jan 4 09:46:55 2018 Return-Path: Delivered-To: svn-src-head@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 6F56EEA86AE; Thu, 4 Jan 2018 09:46:55 +0000 (UTC) (envelope-from se@freebsd.org) Received: from mailout05.t-online.de (mailout05.t-online.de [194.25.134.82]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mailout00.t-online.de", Issuer "TeleSec ServerPass DE-2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 2F4041EDA; Thu, 4 Jan 2018 09:46:54 +0000 (UTC) (envelope-from se@freebsd.org) Received: from fwd34.aul.t-online.de (fwd34.aul.t-online.de [172.20.26.145]) by mailout05.t-online.de (Postfix) with SMTP id 4420C422B6D4; Thu, 4 Jan 2018 10:40:37 +0100 (CET) Received: from Stefans-MBP-LAN.fritz.box (Z2g4FEZJrhKAfYtq6wsHfkQPh-BQndcRvHt8nq8raNhiRRwBYMEASy0PrNyh-g1gI1@[87.151.215.62]) by fwd34.t-online.de with (TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384 encrypted) esmtp id 1eX20h-0G86sK0; Thu, 4 Jan 2018 10:40:27 +0100 Subject: Re: svn commit: r327086 - head/sys/dev/lmc To: Pedro Giffuni , Warner Losh , Brooks Davis Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers References: <201712221715.vBMHF27m046894@repo.freebsd.org> <20180103220942.GC95035@spindle.one-eyed-alien.net> <02a7407a-0445-e503-9279-e893f53f8ef0@FreeBSD.org> From: Stefan Esser Message-ID: <3f4a7247-e711-c65a-d973-c929ac8726db@freebsd.org> Date: Thu, 4 Jan 2018 10:40:26 +0100 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.13; rv:52.0) Gecko/20100101 Thunderbird/52.5.2 MIME-Version: 1.0 In-Reply-To: <02a7407a-0445-e503-9279-e893f53f8ef0@FreeBSD.org> Content-Type: text/plain; charset=windows-1252 Content-Language: en-US Content-Transfer-Encoding: 7bit X-ID: Z2g4FEZJrhKAfYtq6wsHfkQPh-BQndcRvHt8nq8raNhiRRwBYMEASy0PrNyh-g1gI1 X-TOI-MSGID: 32456c88-54c2-4f3c-8ad3-ca0294802836 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 04 Jan 2018 09:46:55 -0000 Am 04.01.18 um 00:41 schrieb Pedro Giffuni: > Either the license is very naively stated or the device should have been added > in the contrib/gnu branches. This appears to be one of the dual-licensed drivers, that are the result of some BSD driver having been ported to Linux with the original copyright left intact. In the case of lmc, a comment states, that it was originally derived from the "de" driver (DEC Ethernet) by Matt Thomas, although it appears to have been rewritten from scratch (with the BSD copyright notice retained). The same happened to the ncr 53c810 driver which was ported to Linux and then back-ported to FreeBSD as with extensions developed under Linux to better support later generations of the controller chip. > I suspect the former but my attempts to contact the author were unsuccessful > so it is probably better to just drop it. > >> Inc is for very old interconnect to telco... So maybe that's safe to delete. It appears to be a strange beast that uses the Ethernet chip to generate a bit stream which is then converted to HDLC. Not sure whether these were used for Frame Relay or to connect to the British X.25 JANET, a few decades ago. Perhaps also to connect to SS7 signaling networks? Regards, STefan From owner-svn-src-head@freebsd.org Thu Jan 4 10:00:47 2018 Return-Path: Delivered-To: svn-src-head@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 80A11EA8938; Thu, 4 Jan 2018 10:00:47 +0000 (UTC) (envelope-from phk@critter.freebsd.dk) Received: from phk.freebsd.dk (phk.freebsd.dk [130.225.244.222]) by mx1.freebsd.org (Postfix) with ESMTP id 3DEE226B5; Thu, 4 Jan 2018 10:00:46 +0000 (UTC) (envelope-from phk@critter.freebsd.dk) Received: from critter.freebsd.dk (unknown [192.168.55.3]) by phk.freebsd.dk (Postfix) with ESMTP id 5D160273A9; Thu, 4 Jan 2018 10:00:45 +0000 (UTC) Received: from critter.freebsd.dk (localhost [127.0.0.1]) by critter.freebsd.dk (8.15.2/8.15.2) with ESMTPS id w04A0iat062260 (version=TLSv1.2 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Thu, 4 Jan 2018 10:00:44 GMT (envelope-from phk@critter.freebsd.dk) Received: (from phk@localhost) by critter.freebsd.dk (8.15.2/8.15.2/Submit) id w04A0h7t062259; Thu, 4 Jan 2018 10:00:43 GMT (envelope-from phk) To: Stefan Esser cc: Pedro Giffuni , Warner Losh , Brooks Davis , svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers Subject: Re: svn commit: r327086 - head/sys/dev/lmc In-reply-to: <3f4a7247-e711-c65a-d973-c929ac8726db@freebsd.org> From: "Poul-Henning Kamp" References: <201712221715.vBMHF27m046894@repo.freebsd.org> <20180103220942.GC95035@spindle.one-eyed-alien.net> <02a7407a-0445-e503-9279-e893f53f8ef0@FreeBSD.org> <3f4a7247-e711-c65a-d973-c929ac8726db@freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <62257.1515060043.1@critter.freebsd.dk> Content-Transfer-Encoding: quoted-printable Date: Thu, 04 Jan 2018 10:00:43 +0000 Message-ID: <62258.1515060043@critter.freebsd.dk> X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 04 Jan 2018 10:00:47 -0000 -------- In message <3f4a7247-e711-c65a-d973-c929ac8726db@freebsd.org>, Stefan Esse= r writes: >Am 04.01.18 um 00:41 schrieb Pedro Giffuni: >It appears to be a strange beast that uses the Ethernet chip to generate = a >bit stream which is then converted to HDLC. Not sure whether these were u= sed >for Frame Relay or to connect to the British X.25 JANET, a few decades ag= o. >Perhaps also to connect to SS7 signaling networks? They were actually pretty versatile, we used them both for "blank" E1 and Nx64 scenarios, and I know they were used for Frame Relay several places in US. I don't think they could do SS7 or ISDN like the MUSYCC chip could. But nobody uses T1/E1/T3/E3 lines any more for anything... -- = Poul-Henning Kamp | UNIX since Zilog Zeus 3.20 phk@FreeBSD.ORG | TCP/IP since RFC 956 FreeBSD committer | BSD since 4.3-tahoe = Never attribute to malice what can adequately be explained by incompetence= . From owner-svn-src-head@freebsd.org Thu Jan 4 16:15:18 2018 Return-Path: Delivered-To: svn-src-head@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 99A12EC06D7 for ; Thu, 4 Jan 2018 16:15:18 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: from mail-io0-x230.google.com (mail-io0-x230.google.com [IPv6:2607:f8b0:4001:c06::230]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 5A98870F5C for ; Thu, 4 Jan 2018 16:15:18 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: by mail-io0-x230.google.com with SMTP id t63so2737630iod.0 for ; Thu, 04 Jan 2018 08:15:18 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bsdimp-com.20150623.gappssmtp.com; s=20150623; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to:cc; bh=148GjDDJhcQ2EB7PimGzJeRmM77PDtstbkwvnl2dLhw=; b=KL/6JpfPPAEyIXcciRFVbi5G+2EX97ASpRxYbkKeEpA0hqPsgPfEF5kWGDB3TB1z/U 82XMg0ekDEhOnR+/yf2NBawuqjK/bTtJZcOpMFnFwla+kymjexdWe1GUN0lb/eu15V6D CXMmzh4LRCyG99n4edJhT7f6rw4gfyjo5yjSaYzXGpXMO4c6CeApYm6yxPOe5FIwWRd1 kAcflYmQEyIUvDRIahYXfWSycm/bww1F84nuRgTauEbGuHLhUguf/odGBddsGP6NKFfP 2Y2u6SmqbX73rbCuHKX4MAMiuWVprc7eCmtQoRTKOKl8b0mhuEELglsygrG4ZQyUfbsd kedg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:sender:in-reply-to:references:from :date:message-id:subject:to:cc; bh=148GjDDJhcQ2EB7PimGzJeRmM77PDtstbkwvnl2dLhw=; b=J049CaWcJHbTVh0p0EjIDDldEXK8Tym11+PRA/t2nn8EJ+YnXBASVAz6M9H+wQKu8Z kjK/+k1ONlqrDKdxgZRVNFKrVicA6II4zglSvbmtZi/AcLC//Ut/15VT5JbU1cV0/OaD FCJ+KR4hirgCNPfo1EOxEVtgoYMiWVfILO6ob0B6bZZlMTESitndjHBdL7vvXvUcSeCW 1LgIrtdGEAip0apc4CFvdv8xCueyOgXsXeZtOWvfy43zWAYGhK8pLpypzOxQEZhBXCEO z5s/YwCmn6Ygb2HkVIgCtxjGlqlhrAcs2OSfvYmr7/0HT2lKyQMopi6ebieGkAb6+fdM tidw== X-Gm-Message-State: AKGB3mJMHlAFDMXcI/8NyB0U+92EIp8pEzceMINi3mTdQMoJqlS5dY0c uc7jqSbhUrEwbK0x43D9LJqR4FIW0zwnchhmhRC/LQ== X-Google-Smtp-Source: ACJfBov/IJh5gCrHL3fJCtQAkSHTja6ird0wUf2fgxgeleWp16QliRpG71+2706dBz2pHKQhPFvKNGmj2jWHJScLYwc= X-Received: by 10.107.180.151 with SMTP id d145mr78609iof.136.1515082517534; Thu, 04 Jan 2018 08:15:17 -0800 (PST) MIME-Version: 1.0 Sender: wlosh@bsdimp.com Received: by 10.79.108.204 with HTTP; Thu, 4 Jan 2018 08:15:16 -0800 (PST) X-Originating-IP: [2603:300b:6:5100:1052:acc7:f9de:2b6d] In-Reply-To: <02a7407a-0445-e503-9279-e893f53f8ef0@FreeBSD.org> References: <201712221715.vBMHF27m046894@repo.freebsd.org> <20180103220942.GC95035@spindle.one-eyed-alien.net> <02a7407a-0445-e503-9279-e893f53f8ef0@FreeBSD.org> From: Warner Losh Date: Thu, 4 Jan 2018 09:15:16 -0700 X-Google-Sender-Auth: y14AO215ECgMyIrbGDRfrLEOxZg Message-ID: Subject: Re: svn commit: r327086 - head/sys/dev/lmc To: Pedro Giffuni Cc: Brooks Davis , src-committers , svn-src-all@freebsd.org, svn-src-head@freebsd.org Content-Type: text/plain; charset="UTF-8" X-Content-Filtered-By: Mailman/MimeDel 2.1.25 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 04 Jan 2018 16:15:18 -0000 On Wed, Jan 3, 2018 at 4:41 PM, Pedro Giffuni wrote: > > > On 03/01/2018 18:03, Warner Losh wrote: > > > > On Jan 3, 2018 3:17 PM, "Brooks Davis" wrote: > > On Fri, Dec 22, 2017 at 05:15:02PM +0000, Pedro F. Giffuni wrote: > > Author: pfg > > Date: Fri Dec 22 17:15:02 2017 > > New Revision: 327086 > > URL: https://svnweb.freebsd.org/changeset/base/327086 > > > > Log: > > SPDX: Reverse License ID tags from the lmc driver. > > > > While the BSD-2-Clause license is there, the GPLv2 is also present. > > I am unsure of the implications of having both licenses as they are > here. > > > > I'll just leave it untagged and open for interpretation. > > Deleting lmc(4) is probably the appropriate fix. You can buy the things > on e-bay, but they look to be 32-bit PCI devices and it seems unlikely > they are in use on systems that will run FreeBSD 12. I've updated the > wiki with a note to this effect. > > > Which wiki? > > > https://wiki.freebsd.org/GPLinBase > Ah, I was talking about deprecation, which we're really bad at communicating. The ad-hoc methods we've used aren't so easy for users to follow. I'll send a followup on that in a new thread. Warner > > I'd like to formalize things a little. > > > Either the license is very naively stated or the device should have been > added in the contrib/gnu branches. > I suspect the former but my attempts to contact the author were > unsuccessful so it is probably better to just drop it. > From owner-svn-src-head@freebsd.org Thu Jan 4 17:58:49 2018 Return-Path: Delivered-To: svn-src-head@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 77B73EA9E3C; Thu, 4 Jan 2018 17:58:49 +0000 (UTC) (envelope-from junovitch@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 41F1476664; Thu, 4 Jan 2018 17:58:49 +0000 (UTC) (envelope-from junovitch@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w04HwmH5093362; Thu, 4 Jan 2018 17:58:48 GMT (envelope-from junovitch@FreeBSD.org) Received: (from junovitch@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w04Hwmv1093361; Thu, 4 Jan 2018 17:58:48 GMT (envelope-from junovitch@FreeBSD.org) Message-Id: <201801041758.w04Hwmv1093361@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: junovitch set sender to junovitch@FreeBSD.org using -f From: Jason Unovitch Date: Thu, 4 Jan 2018 17:58:48 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r327554 - head/share/misc X-SVN-Group: head X-SVN-Commit-Author: junovitch X-SVN-Commit-Paths: head/share/misc X-SVN-Commit-Revision: 327554 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 04 Jan 2018 17:58:49 -0000 Author: junovitch (ports committer) Date: Thu Jan 4 17:58:48 2018 New Revision: 327554 URL: https://svnweb.freebsd.org/changeset/base/327554 Log: Remove myself from ports-secteam I will be moving on to other life commitments this year and will not have the time to support contributions as a ports committer, if able, until life settles at the end of the year. Discussed with: portmgr Modified: head/share/misc/organization.dot Modified: head/share/misc/organization.dot ============================================================================== --- head/share/misc/organization.dot Thu Jan 4 16:19:56 2018 (r327553) +++ head/share/misc/organization.dot Thu Jan 4 17:58:48 2018 (r327554) @@ -34,7 +34,7 @@ portmgr [label="Port Management Team\nportmgr@FreeBSD. portmgrsecretary [label="Port Management Team Secretary\nportmgr-secretary@FreeBSD.org\nrene"] re [label="Primary Release Engineering Team\nre@FreeBSD.org\ngjb, kib,\nbdrewery, blackend,\nrgrimes, delphij,\nhrs, glebius,\nmarius, rwatson"] secteam [label="Security Team\nsecteam@FreeBSD.org\ndelphij,\ndes, gavin, gjb,\nglebius, remko"] -portssecteam [label="Ports Security Team\nports-secteam@FreeBSD.org\ndelphij, amdmi3, eadler, feld, jgh, junovitch, rea, sbz, simon, swills, zi"] +portssecteam [label="Ports Security Team\nports-secteam@FreeBSD.org\ndelphij, amdmi3, eadler, feld, jgh, rea, sbz, simon, swills, zi"] secteamsecretary [label="Security Team Secretary\nsecteam-secretary@FreeBSD.org\nremko"] securityofficer [label="Security Officer Team\nsecurity-officer@FreeBSD.org\ndelphij, des,\ngavin, gjb,\nglebius, remko"] srccommitters [label="Src Committers\nsrc-committers@FreeBSD.org"] From owner-svn-src-head@freebsd.org Thu Jan 4 18:14:59 2018 Return-Path: Delivered-To: svn-src-head@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 BA8B5EAB06C; Thu, 4 Jan 2018 18:14:59 +0000 (UTC) (envelope-from kib@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 91DDB77126; Thu, 4 Jan 2018 18:14:59 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w04IEw89001610; Thu, 4 Jan 2018 18:14:58 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w04IEwWa001609; Thu, 4 Jan 2018 18:14:58 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201801041814.w04IEwWa001609@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Thu, 4 Jan 2018 18:14:58 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r327555 - head/sys/vm X-SVN-Group: head X-SVN-Commit-Author: kib X-SVN-Commit-Paths: head/sys/vm X-SVN-Commit-Revision: 327555 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 04 Jan 2018 18:14:59 -0000 Author: kib Date: Thu Jan 4 18:14:58 2018 New Revision: 327555 URL: https://svnweb.freebsd.org/changeset/base/327555 Log: Restructure swapout tests after vm map locking was removed. Consolidate the regions covered by the process lock. Combine similar conditions tests into one, e.g. all process flags can be test with one logical operation. Add check for in-exec state, since p_vmspace is dererenced. Remove labels and goto by explicitly tracking state. Update comments. Reviewed by: alc, markj (previous version) Tested by: pho (previous version) Sponsored by: The FreeBSD Foundation MFC after: 2 weeks Differential revision: https://reviews.freebsd.org/D13693 Modified: head/sys/vm/vm_swapout.c Modified: head/sys/vm/vm_swapout.c ============================================================================== --- head/sys/vm/vm_swapout.c Thu Jan 4 17:58:48 2018 (r327554) +++ head/sys/vm/vm_swapout.c Thu Jan 4 18:14:58 2018 (r327555) @@ -734,126 +734,73 @@ swapout_procs(int action) struct proc *p; struct thread *td; int slptime; - bool didswap; + bool didswap, doswap; + MPASS((action & (VM_SWAP_NORMAL | VM_SWAP_IDLE)) != 0); + didswap = false; -retry: sx_slock(&allproc_lock); FOREACH_PROC_IN_SYSTEM(p) { - PROC_LOCK(p); /* - * Watch out for a process in - * creation. It may have no - * address space or lock yet. + * Filter out not yet fully constructed processes. Do + * not swap out held processes. Avoid processes which + * are system, exiting, execing, traced, already swapped + * out or are in the process of being swapped in or out. */ - if (p->p_state == PRS_NEW) { + PROC_LOCK(p); + if (p->p_state != PRS_NORMAL || p->p_lock != 0 || (p->p_flag & + (P_SYSTEM | P_WEXIT | P_INEXEC | P_STOPPED_SINGLE | + P_TRACED | P_SWAPPINGOUT | P_SWAPPINGIN | P_INMEM)) != + P_INMEM) { PROC_UNLOCK(p); continue; } + /* - * An aio daemon switches its - * address space while running. - * Perform a quick check whether - * a process has P_SYSTEM. - * Filter out exiting processes. + * Further consideration of this process for swap out + * requires iterating over its threads. We release + * allproc_lock here so that process creation and + * destruction are not blocked while we iterate. + * + * To later reacquire allproc_lock and resume + * iteration over the allproc list, we will first have + * to release the lock on the process. We place a + * hold on the process so that it remains in the + * allproc list while it is unlocked. */ - if ((p->p_flag & (P_SYSTEM | P_WEXIT)) != 0) { - PROC_UNLOCK(p); - continue; - } _PHOLD_LITE(p); - PROC_UNLOCK(p); sx_sunlock(&allproc_lock); - PROC_LOCK(p); - if (p->p_lock != 1 || (p->p_flag & (P_STOPPED_SINGLE | - P_TRACED | P_SYSTEM)) != 0) - goto nextproc; - /* - * Only aiod changes vmspace. However, it will be - * skipped because of the if statement above checking - * for P_SYSTEM. + * Do not swapout a realtime process. + * Guarantee swap_idle_threshold1 time in memory. + * If the system is under memory stress, or if we are + * swapping idle processes >= swap_idle_threshold2, + * then swap the process out. */ - if ((p->p_flag & (P_INMEM | P_SWAPPINGOUT | P_SWAPPINGIN)) != - P_INMEM) - goto nextproc; - - switch (p->p_state) { - default: - /* - * Don't swap out processes in any sort - * of 'special' state. - */ - break; - - case PRS_NORMAL: - /* - * do not swapout a realtime process - * Check all the thread groups.. - */ - FOREACH_THREAD_IN_PROC(p, td) { - thread_lock(td); - if (PRI_IS_REALTIME(td->td_pri_class)) { - thread_unlock(td); - goto nextproc; - } - slptime = (ticks - td->td_slptick) / hz; - /* - * Guarantee swap_idle_threshold1 - * time in memory. - */ - if (slptime < swap_idle_threshold1) { - thread_unlock(td); - goto nextproc; - } - - /* - * Do not swapout a process if it is - * waiting on a critical event of some - * kind or there is a thread whose - * pageable memory may be accessed. - * - * This could be refined to support - * swapping out a thread. - */ - if (!thread_safetoswapout(td)) { - thread_unlock(td); - goto nextproc; - } - /* - * If the system is under memory stress, - * or if we are swapping - * idle processes >= swap_idle_threshold2, - * then swap the process out. - */ - if ((action & VM_SWAP_NORMAL) == 0 && - ((action & VM_SWAP_IDLE) == 0 || - slptime < swap_idle_threshold2)) { - thread_unlock(td); - goto nextproc; - } - - thread_unlock(td); - } - - /* - * If the pageout daemon didn't free enough pages, - * or if this process is idle and the system is - * configured to swap proactively, swap it out. - */ - _PRELE(p); - if (swapout(p) == 0) - didswap = true; - PROC_UNLOCK(p); - goto retry; + doswap = true; + FOREACH_THREAD_IN_PROC(p, td) { + thread_lock(td); + slptime = (ticks - td->td_slptick) / hz; + if (PRI_IS_REALTIME(td->td_pri_class) || + slptime < swap_idle_threshold1 || + !thread_safetoswapout(td) || + ((action & VM_SWAP_NORMAL) == 0 && + slptime < swap_idle_threshold2)) + doswap = false; + thread_unlock(td); + if (!doswap) + break; } -nextproc: + if (doswap && swapout(p) == 0) + didswap = true; + PROC_UNLOCK(p); sx_slock(&allproc_lock); PRELE(p); } sx_sunlock(&allproc_lock); + /* * If we swapped something out, and another process needed memory, * then wakeup the sched process. From owner-svn-src-head@freebsd.org Thu Jan 4 19:47:02 2018 Return-Path: Delivered-To: svn-src-head@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 7687CEB1AE0; Thu, 4 Jan 2018 19:47:02 +0000 (UTC) (envelope-from landonf@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 3FF517C42A; Thu, 4 Jan 2018 19:47:02 +0000 (UTC) (envelope-from landonf@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w04Jl1V2040681; Thu, 4 Jan 2018 19:47:01 GMT (envelope-from landonf@FreeBSD.org) Received: (from landonf@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w04Jl1e5040680; Thu, 4 Jan 2018 19:47:01 GMT (envelope-from landonf@FreeBSD.org) Message-Id: <201801041947.w04Jl1e5040680@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: landonf set sender to landonf@FreeBSD.org using -f From: "Landon J. Fuller" Date: Thu, 4 Jan 2018 19:47:01 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r327558 - head/sys/dev/bhnd/cores/pmu X-SVN-Group: head X-SVN-Commit-Author: landonf X-SVN-Commit-Paths: head/sys/dev/bhnd/cores/pmu X-SVN-Commit-Revision: 327558 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 04 Jan 2018 19:47:02 -0000 Author: landonf Date: Thu Jan 4 19:47:01 2018 New Revision: 327558 URL: https://svnweb.freebsd.org/changeset/base/327558 Log: bhnd(4): Add missing BCM4312 backplane clock speed entry. The default 80MHz clock speed returned by bhnd_pmu_si_clock() was already correct; this just prevents the "No backplane clock specified" warning printf from being emitted when querying backplane clock speed. Sponsored by: The FreeBSD Foundation Modified: head/sys/dev/bhnd/cores/pmu/bhnd_pmu_subr.c Modified: head/sys/dev/bhnd/cores/pmu/bhnd_pmu_subr.c ============================================================================== --- head/sys/dev/bhnd/cores/pmu/bhnd_pmu_subr.c Thu Jan 4 19:43:42 2018 (r327557) +++ head/sys/dev/bhnd/cores/pmu/bhnd_pmu_subr.c Thu Jan 4 19:47:01 2018 (r327558) @@ -2394,6 +2394,7 @@ bhnd_pmu_si_clock(struct bhnd_pmu_query *sc) clock = bhnd_pmu1_cpuclk0(sc); break; + case BHND_CHIPID_BCM4312: case BHND_CHIPID_BCM4313: /* 80MHz backplane clock */ clock = 80000 * 1000; From owner-svn-src-head@freebsd.org Thu Jan 4 20:05:48 2018 Return-Path: Delivered-To: svn-src-head@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 B627FEB2E62; Thu, 4 Jan 2018 20:05:48 +0000 (UTC) (envelope-from smh@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 835497D493; Thu, 4 Jan 2018 20:05:48 +0000 (UTC) (envelope-from smh@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w04K5lY3049413; Thu, 4 Jan 2018 20:05:47 GMT (envelope-from smh@FreeBSD.org) Received: (from smh@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w04K5liB049411; Thu, 4 Jan 2018 20:05:47 GMT (envelope-from smh@FreeBSD.org) Message-Id: <201801042005.w04K5liB049411@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: smh set sender to smh@FreeBSD.org using -f From: Steven Hartland Date: Thu, 4 Jan 2018 20:05:47 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r327559 - in head: . sys/net X-SVN-Group: head X-SVN-Commit-Author: smh X-SVN-Commit-Paths: in head: . sys/net X-SVN-Commit-Revision: 327559 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 04 Jan 2018 20:05:48 -0000 Author: smh Date: Thu Jan 4 20:05:47 2018 New Revision: 327559 URL: https://svnweb.freebsd.org/changeset/base/327559 Log: Disabled the use of flowid for lagg by default Disabled the use of RSS hash from the network card aka flowid for lagg(4) interfaces by default as it's currently incompatible with the lacp and loadbalance protocols. The incompatibility is due to the fact that the flowid isn't know for the first packet of a new outbound stream which can result in the hash calculation method changing and hence a stream being incorrectly split across multiple interfaces during normal operation. This can be re-enabled by setting the following in loader.conf: net.link.lagg.default_use_flowid="1" Discussed with: kmacy Sponsored by: Multiplay Modified: head/UPDATING head/sys/net/if_lagg.c Modified: head/UPDATING ============================================================================== --- head/UPDATING Thu Jan 4 19:47:01 2018 (r327558) +++ head/UPDATING Thu Jan 4 20:05:47 2018 (r327559) @@ -51,6 +51,14 @@ NOTE TO PEOPLE WHO THINK THAT FreeBSD 12.x IS SLOW: ****************************** SPECIAL WARNING: ****************************** +20180104: + The use of RSS hash from the network card aka flowid has been + disabled by default for lagg(4) as it's currently incompatible with + the lacp and loadbalance protocols. + + This can be re-enabled by setting the following in loader.conf: + net.link.lagg.default_use_flowid="1" + 20180102: The SW_WATCHDOG option is no longer necessary to enable the hardclock-based software watchdog if no hardware watchdog is Modified: head/sys/net/if_lagg.c ============================================================================== --- head/sys/net/if_lagg.c Thu Jan 4 19:47:01 2018 (r327558) +++ head/sys/net/if_lagg.c Thu Jan 4 20:05:47 2018 (r327559) @@ -244,7 +244,7 @@ SYSCTL_INT(_net_link_lagg, OID_AUTO, failover_rx_all, "Accept input from any interface in a failover lagg"); /* Default value for using flowid */ -static VNET_DEFINE(int, def_use_flowid) = 1; +static VNET_DEFINE(int, def_use_flowid) = 0; #define V_def_use_flowid VNET(def_use_flowid) SYSCTL_INT(_net_link_lagg, OID_AUTO, default_use_flowid, CTLFLAG_RWTUN, &VNET_NAME(def_use_flowid), 0, From owner-svn-src-head@freebsd.org Thu Jan 4 20:16:41 2018 Return-Path: Delivered-To: svn-src-head@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 85A9DEB3D68; Thu, 4 Jan 2018 20:16:41 +0000 (UTC) (envelope-from lidl@pix.net) Received: from hydra.pix.net (hydra.pix.net [IPv6:2001:470:e254:10::4]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mail.pix.net", Issuer "Pix.Com Technologies LLC CA" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 8F3F17EF3E; Thu, 4 Jan 2018 20:16:40 +0000 (UTC) (envelope-from lidl@pix.net) Received: from torb.pix.net ([IPv6:2001:470:e254:11:146e:bd77:a3bd:67b7]) (authenticated bits=0) by hydra.pix.net (8.15.2/8.15.2) with ESMTPA id w04KGNag084945; Thu, 4 Jan 2018 15:16:30 -0500 (EST) (envelope-from lidl@pix.net) X-Authentication-Warning: hydra.pix.net: Host [IPv6:2001:470:e254:11:146e:bd77:a3bd:67b7] claimed to be torb.pix.net Subject: Re: svn commit: r327086 - head/sys/dev/lmc To: Poul-Henning Kamp , Stefan Esser Cc: Pedro Giffuni , Warner Losh , Brooks Davis , svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers References: <201712221715.vBMHF27m046894@repo.freebsd.org> <20180103220942.GC95035@spindle.one-eyed-alien.net> <02a7407a-0445-e503-9279-e893f53f8ef0@FreeBSD.org> <3f4a7247-e711-c65a-d973-c929ac8726db@freebsd.org> <62258.1515060043@critter.freebsd.dk> From: Kurt Lidl Message-ID: Date: Thu, 4 Jan 2018 15:16:23 -0500 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.12; rv:52.0) Gecko/20100101 Thunderbird/52.5.2 MIME-Version: 1.0 In-Reply-To: <62258.1515060043@critter.freebsd.dk> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 04 Jan 2018 20:16:41 -0000 On 1/4/18 5:00 AM, Poul-Henning Kamp wrote: > -------- > In message <3f4a7247-e711-c65a-d973-c929ac8726db@freebsd.org>, Stefan Esser writes: >> Am 04.01.18 um 00:41 schrieb Pedro Giffuni: > >> It appears to be a strange beast that uses the Ethernet chip to generate a >> bit stream which is then converted to HDLC. Not sure whether these were used >> for Frame Relay or to connect to the British X.25 JANET, a few decades ago. >> Perhaps also to connect to SS7 signaling networks? > > They were actually pretty versatile, we used them both for "blank" > E1 and Nx64 scenarios, and I know they were used for Frame Relay > several places in US. > > I don't think they could do SS7 or ISDN like the MUSYCC chip could. > > But nobody uses T1/E1/T3/E3 lines any more for anything... There's thousands upon thousands of customers that attach to networks via T1 lines, running Frame-Relay to this day. Granted, ADSL has captured the consumer market, but NxT1 is still popular in the business world. (And pretty much all the T1s in the world are actually delivered over 2Mmbps SDSL, which is then turned into the 1.544 mbps T1 interface, but that's not really germane to this...) As for the lmc product itself, and that driver- David Boggs, when working at DEC-WRL (Dec's Western Research Lab) realized that the Ethernet controller that ran the "de" Ethernet chips could be easily plumbed into an FPGA and used as the front-end controller for the framer for the serial line. In 1999 I worked with David Boggs to modernize this driver (or more precisely, the "sbe" version of it), so it had SMP locking for FreeBSD and BSD/OS. Dave is really easy to work with, and we were able to make the driver deal with Frame Relay, in addition to the "Cisco HDLC" (aka chdlc) framing. I don't think we attempted to get the synch PPP stuff working, as I only had access to a T1 line with FR signaling on it. T1 is just an electrical standard for interface, you can do all sorts of different signaling and protocols over that interface. I still have this hardware (but not in use), as well as a pair of the HSSI boards (54mbps, suitable for use with a T3 circuit). If you just want someone to test it, I can probably lash together two machines with these cards as the interconnect. -Kurt From owner-svn-src-head@freebsd.org Thu Jan 4 20:50:47 2018 Return-Path: Delivered-To: svn-src-head@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 1C137EB62AE; Thu, 4 Jan 2018 20:50:47 +0000 (UTC) (envelope-from eugen@grosbein.net) Received: from hz.grosbein.net (hz.grosbein.net [78.47.246.247]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "hz.grosbein.net", Issuer "hz.grosbein.net" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id A66E380922; Thu, 4 Jan 2018 20:50:46 +0000 (UTC) (envelope-from eugen@grosbein.net) Received: from eg.sd.rdtc.ru (root@eg.sd.rdtc.ru [62.231.161.221] (may be forged)) by hz.grosbein.net (8.15.2/8.15.2) with ESMTPS id w04KoWWk031576 (version=TLSv1.2 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 4 Jan 2018 21:50:33 +0100 (CET) (envelope-from eugen@grosbein.net) X-Envelope-From: eugen@grosbein.net X-Envelope-To: smh@FreeBSD.org Received: from [10.58.0.4] (dadv@[10.58.0.4]) by eg.sd.rdtc.ru (8.15.2/8.15.2) with ESMTPS id w04KoSLP047087 (version=TLSv1.2 cipher=DHE-RSA-AES128-SHA bits=128 verify=NOT); Fri, 5 Jan 2018 03:50:28 +0700 (+07) (envelope-from eugen@grosbein.net) Subject: Re: svn commit: r327559 - in head: . sys/net To: Steven Hartland , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org References: <201801042005.w04K5liB049411@repo.freebsd.org> From: Eugene Grosbein Message-ID: <5A4E9397.9000308@grosbein.net> Date: Fri, 5 Jan 2018 03:50:31 +0700 User-Agent: Mozilla/5.0 (Windows NT 6.3; WOW64; rv:38.0) Gecko/20100101 Thunderbird/38.7.2 MIME-Version: 1.0 In-Reply-To: <201801042005.w04K5liB049411@repo.freebsd.org> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=2.2 required=5.0 tests=BAYES_00, LOCAL_FROM, RDNS_NONE autolearn=no autolearn_force=no version=3.4.1 X-Spam-Report: * -2.3 BAYES_00 BODY: Bayes spam probability is 0 to 1% * [score: 0.0000] * 2.6 LOCAL_FROM From my domains * 1.9 RDNS_NONE Delivered to internal network by a host with no rDNS X-Spam-Level: ** X-Spam-Checker-Version: SpamAssassin 3.4.1 (2015-04-28) on hz.grosbein.net X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 04 Jan 2018 20:50:47 -0000 05.01.2018 3:05, Steven Hartland wrote: > Author: smh > Date: Thu Jan 4 20:05:47 2018 > New Revision: 327559 > URL: https://svnweb.freebsd.org/changeset/base/327559 > > Log: > Disabled the use of flowid for lagg by default > > Disabled the use of RSS hash from the network card aka flowid for > lagg(4) interfaces by default as it's currently incompatible with > the lacp and loadbalance protocols. > > The incompatibility is due to the fact that the flowid isn't know > for the first packet of a new outbound stream which can result in > the hash calculation method changing and hence a stream being > incorrectly split across multiple interfaces during normal > operation. > > This can be re-enabled by setting the following in loader.conf: > net.link.lagg.default_use_flowid="1" > > Discussed with: kmacy > Sponsored by: Multiplay RSS by definition has meaning to received stream. What is "outbound" stream in this context, why can the hash calculatiom method change and what exactly does it mean "a stream being incorrectly split"? Defaults should not be changed so easily just because they are not optimal for some specific case. Each lagg has its own setting for flowid usage and why one cannot just use "ifconfig lagg0 -use_flowid" for such cases? From owner-svn-src-head@freebsd.org Thu Jan 4 21:52:32 2018 Return-Path: Delivered-To: svn-src-head@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 A0CFFEBA18B for ; Thu, 4 Jan 2018 21:52:32 +0000 (UTC) (envelope-from steven@multiplay.co.uk) Received: from mail-wm0-x22c.google.com (mail-wm0-x22c.google.com [IPv6:2a00:1450:400c:c09::22c]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 2E16238FC for ; Thu, 4 Jan 2018 21:52:32 +0000 (UTC) (envelope-from steven@multiplay.co.uk) Received: by mail-wm0-x22c.google.com with SMTP id f140so5821166wmd.2 for ; Thu, 04 Jan 2018 13:52:32 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=multiplay-co-uk.20150623.gappssmtp.com; s=20150623; h=from:subject:to:references:message-id:date:user-agent:mime-version :in-reply-to:content-language; bh=10cIvXIyYLVP/Vb8E7JslgkG0CR1qFsjGIPdWSvJVDU=; b=Wj/eUGmGwIGUNMfdp+zE6cgqtc21vCwrf3KYTlOs6jJDdvr//3Yy8lY5jOyQXo1i57 iC3t/3EepXpBQWurX+4ZH88gpQG4xlDFW+mt4VmHpERAJasbCCs3ejuFr6W6rs59OFdg yBa+NF/1kNFHWIM02Te0XE5npc0ONEqbfLT7ZSWMAXGEUaZyemYV030GfNK2tzXbGDdr /Qant0FX7RHd/MsN2SUD6u9a3NrN4QRZ8TAgoq6hnO33XGGyMoewlQ4jWTGkjmMm0R62 pX4UE/oSKnZIqEn5wvMG+OPIyXZ2ue/5ghDSOlNgeOuhGAwmCJnuu9vhqsSFK9lO8SjK T9Mw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:subject:to:references:message-id:date :user-agent:mime-version:in-reply-to:content-language; bh=10cIvXIyYLVP/Vb8E7JslgkG0CR1qFsjGIPdWSvJVDU=; b=Zz38iMDmV1pnp9wLekenp2XOo/nucB0s++44qbhC0NaQfb41sTs1jl6+i/pjwBVIVU +RXjoC+xdLLn3c8Zvp6PNqw6DsvUYKFs727m4OtVQh28mmBGGUUm08cXtNBApD/L5xqP O9KroY7Z4bsABBUBOlKfbecWaiyjBp3K28awKTD9IOst3QBiCFXlXOTNHPSfwwTt6s5o 7pm4R0Ay0etYHw/Vu6QFH0hE86TdN7Nlge5ro3uv5jKoa6Zhi7frx2YPnGYt+Oxbnb3A qYWy6ip6flQ+dTucDWTV7y+o7d3k69E3G8hfN8ifoE8wiEvgrqBskNToajfAYQPlED9p i5DQ== X-Gm-Message-State: AKGB3mLjbWDApE6bx5RK6Y2ylCNUgAVnJMGXio4qSxo+lIgPhx6ol3eF gzXDnLHgpGHIUx7Z6KREiLOjezSYQng= X-Google-Smtp-Source: ACJfBovEFrj7XwVKhYqNzFataJTdZh7IridUtuUpk4Y8kQNLuQ0OocMRY2AHVB8s6WC+Jzqn76PAmQ== X-Received: by 10.80.231.145 with SMTP id b17mr1264052edn.190.1515102750335; Thu, 04 Jan 2018 13:52:30 -0800 (PST) Received: from [10.10.1.111] ([185.97.61.1]) by smtp.gmail.com with ESMTPSA id o42sm2694890edo.91.2018.01.04.13.52.29 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 04 Jan 2018 13:52:29 -0800 (PST) From: Steven Hartland X-Google-Original-From: Steven Hartland Subject: Re: svn commit: r327559 - in head: . sys/net To: Eugene Grosbein , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org References: <201801042005.w04K5liB049411@repo.freebsd.org> <5A4E9397.9000308@grosbein.net> Message-ID: Date: Thu, 4 Jan 2018 21:52:30 +0000 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:52.0) Gecko/20100101 Thunderbird/52.5.2 MIME-Version: 1.0 In-Reply-To: <5A4E9397.9000308@grosbein.net> Content-Language: en-US Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit X-Content-Filtered-By: Mailman/MimeDel 2.1.25 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 04 Jan 2018 21:52:32 -0000 On 04/01/2018 20:50, Eugene Grosbein wrote: > 05.01.2018 3:05, Steven Hartland wrote: > >> Author: smh >> Date: Thu Jan 4 20:05:47 2018 >> New Revision: 327559 >> URL: https://svnweb.freebsd.org/changeset/base/327559 >> >> Log: >> Disabled the use of flowid for lagg by default >> >> Disabled the use of RSS hash from the network card aka flowid for >> lagg(4) interfaces by default as it's currently incompatible with >> the lacp and loadbalance protocols. >> >> The incompatibility is due to the fact that the flowid isn't know >> for the first packet of a new outbound stream which can result in >> the hash calculation method changing and hence a stream being >> incorrectly split across multiple interfaces during normal >> operation. >> >> This can be re-enabled by setting the following in loader.conf: >> net.link.lagg.default_use_flowid="1" >> >> Discussed with: kmacy >> Sponsored by: Multiplay > RSS by definition has meaning to received stream. What is "outbound" stream > in this context, why can the hash calculatiom method change and what exactly > does it mean "a stream being incorrectly split"? Yes RSS is indeed a received stream but that is used by lagg for lacp and loadbalance protocols to decide which port of the lagg to "send" the packet out of. As the flowid is not known when a new "output" stream is instigated the current code falls back to manual hash calculation to determine which port to send the initial packet from. Once a response is received a tx then uses the flowid. This change of hash calculation method can result in the initial packet being sent from a different port than the rest of the stream; this is what I meant by "incorrectly split". See the following: https://github.com/freebsd/freebsd/blob/master/sys/net/if_lagg.c#L2066 https://github.com/freebsd/freebsd/blob/master/sys/net/ieee8023ad_lacp.c#L846 > Defaults should not be changed so easily just because they are not optimal > for some specific case. Each lagg has its own setting for flowid usage > and why one cannot just use "ifconfig lagg0 -use_flowid" for such cases? > Yes we're already using -use_flowid to mitigate the problem, but the defaults should never result in broken behavior hence the change, at least for now. For reference I did look at keeping the default of 1 but only using that for protocols which weren't effected by the issue, and introducing a 2 to force those that are, but as its defined as acting on creation and we always create lagg interfaces as failover and then amend them that wasn't possible without making more invasive changes.     Regards     Steve From owner-svn-src-head@freebsd.org Thu Jan 4 21:57:38 2018 Return-Path: Delivered-To: svn-src-head@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 E5060EBA694; Thu, 4 Jan 2018 21:57:38 +0000 (UTC) (envelope-from ed@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 AC06D3C25; Thu, 4 Jan 2018 21:57:38 +0000 (UTC) (envelope-from ed@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w04LvboN099231; Thu, 4 Jan 2018 21:57:37 GMT (envelope-from ed@FreeBSD.org) Received: (from ed@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w04LvbIb099227; Thu, 4 Jan 2018 21:57:37 GMT (envelope-from ed@FreeBSD.org) Message-Id: <201801042157.w04LvbIb099227@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ed set sender to ed@FreeBSD.org using -f From: Ed Schouten Date: Thu, 4 Jan 2018 21:57:37 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r327560 - in head/sys/compat: cloudabi cloudabi32 cloudabi64 X-SVN-Group: head X-SVN-Commit-Author: ed X-SVN-Commit-Paths: in head/sys/compat: cloudabi cloudabi32 cloudabi64 X-SVN-Commit-Revision: 327560 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 04 Jan 2018 21:57:39 -0000 Author: ed Date: Thu Jan 4 21:57:37 2018 New Revision: 327560 URL: https://svnweb.freebsd.org/changeset/base/327560 Log: Allow timed waits with relative timeouts on locks and condvars. Even though pthreads doesn't support this, there are various alternative APIs that use this. For example, uv_cond_timedwait() accepts a relative timeout. So does Rust's std::sync::Condvar::wait_timeout(). Though I personally think that relative timeouts are bad (due to imprecision for repeated operations), it does seem that people want this. Extend the existing futex functions to keep track of whether an absolute timeout is used in a boolean flag. MFC after: 1 month Modified: head/sys/compat/cloudabi/cloudabi_futex.c head/sys/compat/cloudabi/cloudabi_util.h head/sys/compat/cloudabi32/cloudabi32_poll.c head/sys/compat/cloudabi64/cloudabi64_poll.c Modified: head/sys/compat/cloudabi/cloudabi_futex.c ============================================================================== --- head/sys/compat/cloudabi/cloudabi_futex.c Thu Jan 4 20:05:47 2018 (r327559) +++ head/sys/compat/cloudabi/cloudabi_futex.c Thu Jan 4 21:57:37 2018 (r327560) @@ -197,7 +197,7 @@ static void futex_queue_requeue(struct futex_queue *, unsigned int); static int futex_queue_sleep(struct futex_queue *, struct futex_lock *, struct futex_waiter *, struct thread *, cloudabi_clockid_t, - cloudabi_timestamp_t, cloudabi_timestamp_t); + cloudabi_timestamp_t, cloudabi_timestamp_t, bool); static cloudabi_tid_t futex_queue_tid_best(const struct futex_queue *); static void futex_queue_wake_up_all(struct futex_queue *); static void futex_queue_wake_up_best(struct futex_queue *); @@ -427,7 +427,7 @@ futex_lock_lookup_locked(struct futex_address *fa) static int futex_lock_rdlock(struct futex_lock *fl, struct thread *td, cloudabi_lock_t *lock, cloudabi_clockid_t clock_id, - cloudabi_timestamp_t timeout, cloudabi_timestamp_t precision) + cloudabi_timestamp_t timeout, cloudabi_timestamp_t precision, bool abstime) { struct futex_waiter fw; int error; @@ -438,7 +438,7 @@ futex_lock_rdlock(struct futex_lock *fl, struct thread KASSERT(fl->fl_owner != LOCK_UNMANAGED, ("Attempted to sleep on an unmanaged lock")); error = futex_queue_sleep(&fl->fl_readers, fl, &fw, td, - clock_id, timeout, precision); + clock_id, timeout, precision, abstime); KASSERT((error == 0) == fw.fw_locked, ("Should have locked write lock on success")); KASSERT(futex_queue_count(&fw.fw_donated) == 0, @@ -707,7 +707,7 @@ futex_lock_wake_up_next(struct futex_lock *fl, cloudab static int futex_lock_wrlock(struct futex_lock *fl, struct thread *td, cloudabi_lock_t *lock, cloudabi_clockid_t clock_id, - cloudabi_timestamp_t timeout, cloudabi_timestamp_t precision, + cloudabi_timestamp_t timeout, cloudabi_timestamp_t precision, bool abstime, struct futex_queue *donated) { struct futex_waiter fw; @@ -735,7 +735,7 @@ futex_lock_wrlock(struct futex_lock *fl, struct thread KASSERT(fl->fl_owner != LOCK_UNMANAGED, ("Attempted to sleep on an unmanaged lock")); error = futex_queue_sleep(&fl->fl_writers, fl, &fw, td, - clock_id, timeout, precision); + clock_id, timeout, precision, abstime); KASSERT((error == 0) == fw.fw_locked, ("Should have locked write lock on success")); KASSERT(futex_queue_count(&fw.fw_donated) == 0, @@ -789,16 +789,18 @@ futex_queue_convert_timestamp_relative(cloudabi_timest static int futex_queue_convert_timestamp(struct thread *td, cloudabi_clockid_t clock_id, cloudabi_timestamp_t timeout, cloudabi_timestamp_t precision, - sbintime_t *sbttimeout, sbintime_t *sbtprecision) + sbintime_t *sbttimeout, sbintime_t *sbtprecision, bool abstime) { cloudabi_timestamp_t now; int error; - /* Make the time relative. */ - error = cloudabi_clock_time_get(td, clock_id, &now); - if (error != 0) - return (error); - timeout = timeout < now ? 0 : timeout - now; + if (abstime) { + /* Make the time relative. */ + error = cloudabi_clock_time_get(td, clock_id, &now); + if (error != 0) + return (error); + timeout = timeout < now ? 0 : timeout - now; + } *sbttimeout = futex_queue_convert_timestamp_relative(timeout); *sbtprecision = futex_queue_convert_timestamp_relative(precision); @@ -808,7 +810,7 @@ futex_queue_convert_timestamp(struct thread *td, cloud static int futex_queue_sleep(struct futex_queue *fq, struct futex_lock *fl, struct futex_waiter *fw, struct thread *td, cloudabi_clockid_t clock_id, - cloudabi_timestamp_t timeout, cloudabi_timestamp_t precision) + cloudabi_timestamp_t timeout, cloudabi_timestamp_t precision, bool abstime) { sbintime_t sbttimeout, sbtprecision; int error; @@ -821,7 +823,7 @@ futex_queue_sleep(struct futex_queue *fq, struct futex if (timeout != UINT64_MAX) { /* Convert timeout duration. */ error = futex_queue_convert_timestamp(td, clock_id, timeout, - precision, &sbttimeout, &sbtprecision); + precision, &sbttimeout, &sbtprecision, abstime); if (error != 0) return (error); } @@ -976,7 +978,7 @@ int cloudabi_futex_condvar_wait(struct thread *td, cloudabi_condvar_t *condvar, cloudabi_scope_t condvar_scope, cloudabi_lock_t *lock, cloudabi_scope_t lock_scope, cloudabi_clockid_t clock_id, - cloudabi_timestamp_t timeout, cloudabi_timestamp_t precision) + cloudabi_timestamp_t timeout, cloudabi_timestamp_t precision, bool abstime) { struct futex_condvar *fc; struct futex_lock *fl; @@ -1012,7 +1014,7 @@ cloudabi_futex_condvar_wait(struct thread *td, cloudab /* Go to sleep. */ ++fc->fc_waitcount; error = futex_queue_sleep(&fc->fc_waiters, fc->fc_lock, &fw, td, - clock_id, timeout, precision); + clock_id, timeout, precision, abstime); if (fw.fw_locked) { /* Waited and got the lock assigned to us. */ KASSERT(futex_queue_count(&fw.fw_donated) == 0, @@ -1031,7 +1033,8 @@ cloudabi_futex_condvar_wait(struct thread *td, cloudab * responsible for reacquiring the userspace lock. */ error2 = futex_lock_wrlock(fl, td, lock, - CLOUDABI_CLOCK_MONOTONIC, UINT64_MAX, 0, &fw.fw_donated); + CLOUDABI_CLOCK_MONOTONIC, UINT64_MAX, 0, abstime, + &fw.fw_donated); if (error2 != 0) error = error2; } else { @@ -1048,7 +1051,7 @@ cloudabi_futex_condvar_wait(struct thread *td, cloudab int cloudabi_futex_lock_rdlock(struct thread *td, cloudabi_lock_t *lock, cloudabi_scope_t scope, cloudabi_clockid_t clock_id, - cloudabi_timestamp_t timeout, cloudabi_timestamp_t precision) + cloudabi_timestamp_t timeout, cloudabi_timestamp_t precision, bool abstime) { struct futex_lock *fl; int error; @@ -1059,7 +1062,7 @@ cloudabi_futex_lock_rdlock(struct thread *td, cloudabi return (error); error = futex_lock_rdlock(fl, td, lock, clock_id, timeout, - precision); + precision, abstime); futex_lock_release(fl); return (error); } @@ -1067,7 +1070,7 @@ cloudabi_futex_lock_rdlock(struct thread *td, cloudabi int cloudabi_futex_lock_wrlock(struct thread *td, cloudabi_lock_t *lock, cloudabi_scope_t scope, cloudabi_clockid_t clock_id, - cloudabi_timestamp_t timeout, cloudabi_timestamp_t precision) + cloudabi_timestamp_t timeout, cloudabi_timestamp_t precision, bool abstime) { struct futex_lock *fl; struct futex_queue fq; @@ -1080,7 +1083,7 @@ cloudabi_futex_lock_wrlock(struct thread *td, cloudabi futex_queue_init(&fq); error = futex_lock_wrlock(fl, td, lock, clock_id, timeout, - precision, &fq); + precision, abstime, &fq); futex_lock_release(fl); return (error); } Modified: head/sys/compat/cloudabi/cloudabi_util.h ============================================================================== --- head/sys/compat/cloudabi/cloudabi_util.h Thu Jan 4 20:05:47 2018 (r327559) +++ head/sys/compat/cloudabi/cloudabi_util.h Thu Jan 4 21:57:37 2018 (r327560) @@ -65,13 +65,13 @@ int cloudabi_convert_timespec(const struct timespec *, */ int cloudabi_futex_condvar_wait(struct thread *, cloudabi_condvar_t *, cloudabi_scope_t, cloudabi_lock_t *, cloudabi_scope_t, cloudabi_clockid_t, - cloudabi_timestamp_t, cloudabi_timestamp_t); + cloudabi_timestamp_t, cloudabi_timestamp_t, bool); int cloudabi_futex_lock_rdlock(struct thread *, cloudabi_lock_t *, cloudabi_scope_t, cloudabi_clockid_t, cloudabi_timestamp_t, - cloudabi_timestamp_t); + cloudabi_timestamp_t, bool); int cloudabi_futex_lock_wrlock(struct thread *, cloudabi_lock_t *, cloudabi_scope_t, cloudabi_clockid_t, cloudabi_timestamp_t, - cloudabi_timestamp_t); + cloudabi_timestamp_t, bool); /* Socket operations. */ int cloudabi_sock_recv(struct thread *, cloudabi_fd_t, struct iovec *, size_t, Modified: head/sys/compat/cloudabi32/cloudabi32_poll.c ============================================================================== --- head/sys/compat/cloudabi32/cloudabi32_poll.c Thu Jan 4 20:05:47 2018 (r327559) +++ head/sys/compat/cloudabi32/cloudabi32_poll.c Thu Jan 4 21:57:37 2018 (r327560) @@ -243,7 +243,7 @@ cloudabi32_sys_poll(struct thread *td, struct cloudabi sub.condvar.condvar_scope, TO_PTR(sub.condvar.lock), sub.condvar.lock_scope, - CLOUDABI_CLOCK_MONOTONIC, UINT64_MAX, 0)); + CLOUDABI_CLOCK_MONOTONIC, UINT64_MAX, 0, true)); td->td_retval[0] = 1; return (copyout(&ev, uap->out, sizeof(ev))); } else if (sub.type == CLOUDABI_EVENTTYPE_LOCK_RDLOCK) { @@ -252,7 +252,7 @@ cloudabi32_sys_poll(struct thread *td, struct cloudabi cloudabi_futex_lock_rdlock( td, TO_PTR(sub.lock.lock), sub.lock.lock_scope, CLOUDABI_CLOCK_MONOTONIC, - UINT64_MAX, 0)); + UINT64_MAX, 0, true)); td->td_retval[0] = 1; return (copyout(&ev, uap->out, sizeof(ev))); } else if (sub.type == CLOUDABI_EVENTTYPE_LOCK_WRLOCK) { @@ -261,7 +261,7 @@ cloudabi32_sys_poll(struct thread *td, struct cloudabi cloudabi_futex_lock_wrlock( td, TO_PTR(sub.lock.lock), sub.lock.lock_scope, CLOUDABI_CLOCK_MONOTONIC, - UINT64_MAX, 0)); + UINT64_MAX, 0, true)); td->td_retval[0] = 1; return (copyout(&ev, uap->out, sizeof(ev))); } @@ -278,15 +278,16 @@ cloudabi32_sys_poll(struct thread *td, struct cloudabi ev[1].userdata = sub[1].userdata; ev[1].type = sub[1].type; if (sub[0].type == CLOUDABI_EVENTTYPE_CONDVAR && - sub[1].type == CLOUDABI_EVENTTYPE_CLOCK && - sub[1].clock.flags == CLOUDABI_SUBSCRIPTION_CLOCK_ABSTIME) { + sub[1].type == CLOUDABI_EVENTTYPE_CLOCK) { /* Wait for a condition variable with timeout. */ error = cloudabi_futex_condvar_wait( td, TO_PTR(sub[0].condvar.condvar), sub[0].condvar.condvar_scope, TO_PTR(sub[0].condvar.lock), sub[0].condvar.lock_scope, sub[1].clock.clock_id, - sub[1].clock.timeout, sub[1].clock.precision); + sub[1].clock.timeout, sub[1].clock.precision, + (sub[1].clock.flags & + CLOUDABI_SUBSCRIPTION_CLOCK_ABSTIME) != 0); if (error == ETIMEDOUT) { td->td_retval[0] = 1; return (copyout(&ev[1], uap->out, @@ -297,13 +298,14 @@ cloudabi32_sys_poll(struct thread *td, struct cloudabi td->td_retval[0] = 1; return (copyout(&ev[0], uap->out, sizeof(ev[0]))); } else if (sub[0].type == CLOUDABI_EVENTTYPE_LOCK_RDLOCK && - sub[1].type == CLOUDABI_EVENTTYPE_CLOCK && - sub[1].clock.flags == CLOUDABI_SUBSCRIPTION_CLOCK_ABSTIME) { + sub[1].type == CLOUDABI_EVENTTYPE_CLOCK) { /* Acquire a read lock with a timeout. */ error = cloudabi_futex_lock_rdlock( td, TO_PTR(sub[0].lock.lock), sub[0].lock.lock_scope, sub[1].clock.clock_id, - sub[1].clock.timeout, sub[1].clock.precision); + sub[1].clock.timeout, sub[1].clock.precision, + (sub[1].clock.flags & + CLOUDABI_SUBSCRIPTION_CLOCK_ABSTIME) != 0); if (error == ETIMEDOUT) { td->td_retval[0] = 1; return (copyout(&ev[1], uap->out, @@ -314,13 +316,14 @@ cloudabi32_sys_poll(struct thread *td, struct cloudabi td->td_retval[0] = 1; return (copyout(&ev[0], uap->out, sizeof(ev[0]))); } else if (sub[0].type == CLOUDABI_EVENTTYPE_LOCK_WRLOCK && - sub[1].type == CLOUDABI_EVENTTYPE_CLOCK && - sub[1].clock.flags == CLOUDABI_SUBSCRIPTION_CLOCK_ABSTIME) { + sub[1].type == CLOUDABI_EVENTTYPE_CLOCK) { /* Acquire a write lock with a timeout. */ error = cloudabi_futex_lock_wrlock( td, TO_PTR(sub[0].lock.lock), sub[0].lock.lock_scope, sub[1].clock.clock_id, - sub[1].clock.timeout, sub[1].clock.precision); + sub[1].clock.timeout, sub[1].clock.precision, + (sub[1].clock.flags & + CLOUDABI_SUBSCRIPTION_CLOCK_ABSTIME) != 0); if (error == ETIMEDOUT) { td->td_retval[0] = 1; return (copyout(&ev[1], uap->out, Modified: head/sys/compat/cloudabi64/cloudabi64_poll.c ============================================================================== --- head/sys/compat/cloudabi64/cloudabi64_poll.c Thu Jan 4 20:05:47 2018 (r327559) +++ head/sys/compat/cloudabi64/cloudabi64_poll.c Thu Jan 4 21:57:37 2018 (r327560) @@ -243,7 +243,7 @@ cloudabi64_sys_poll(struct thread *td, struct cloudabi sub.condvar.condvar_scope, TO_PTR(sub.condvar.lock), sub.condvar.lock_scope, - CLOUDABI_CLOCK_MONOTONIC, UINT64_MAX, 0)); + CLOUDABI_CLOCK_MONOTONIC, UINT64_MAX, 0, true)); td->td_retval[0] = 1; return (copyout(&ev, uap->out, sizeof(ev))); } else if (sub.type == CLOUDABI_EVENTTYPE_LOCK_RDLOCK) { @@ -252,7 +252,7 @@ cloudabi64_sys_poll(struct thread *td, struct cloudabi cloudabi_futex_lock_rdlock( td, TO_PTR(sub.lock.lock), sub.lock.lock_scope, CLOUDABI_CLOCK_MONOTONIC, - UINT64_MAX, 0)); + UINT64_MAX, 0, true)); td->td_retval[0] = 1; return (copyout(&ev, uap->out, sizeof(ev))); } else if (sub.type == CLOUDABI_EVENTTYPE_LOCK_WRLOCK) { @@ -261,7 +261,7 @@ cloudabi64_sys_poll(struct thread *td, struct cloudabi cloudabi_futex_lock_wrlock( td, TO_PTR(sub.lock.lock), sub.lock.lock_scope, CLOUDABI_CLOCK_MONOTONIC, - UINT64_MAX, 0)); + UINT64_MAX, 0, true)); td->td_retval[0] = 1; return (copyout(&ev, uap->out, sizeof(ev))); } @@ -278,15 +278,16 @@ cloudabi64_sys_poll(struct thread *td, struct cloudabi ev[1].userdata = sub[1].userdata; ev[1].type = sub[1].type; if (sub[0].type == CLOUDABI_EVENTTYPE_CONDVAR && - sub[1].type == CLOUDABI_EVENTTYPE_CLOCK && - sub[1].clock.flags == CLOUDABI_SUBSCRIPTION_CLOCK_ABSTIME) { + sub[1].type == CLOUDABI_EVENTTYPE_CLOCK) { /* Wait for a condition variable with timeout. */ error = cloudabi_futex_condvar_wait( td, TO_PTR(sub[0].condvar.condvar), sub[0].condvar.condvar_scope, TO_PTR(sub[0].condvar.lock), sub[0].condvar.lock_scope, sub[1].clock.clock_id, - sub[1].clock.timeout, sub[1].clock.precision); + sub[1].clock.timeout, sub[1].clock.precision, + (sub[1].clock.flags & + CLOUDABI_SUBSCRIPTION_CLOCK_ABSTIME) != 0); if (error == ETIMEDOUT) { td->td_retval[0] = 1; return (copyout(&ev[1], uap->out, @@ -297,13 +298,14 @@ cloudabi64_sys_poll(struct thread *td, struct cloudabi td->td_retval[0] = 1; return (copyout(&ev[0], uap->out, sizeof(ev[0]))); } else if (sub[0].type == CLOUDABI_EVENTTYPE_LOCK_RDLOCK && - sub[1].type == CLOUDABI_EVENTTYPE_CLOCK && - sub[1].clock.flags == CLOUDABI_SUBSCRIPTION_CLOCK_ABSTIME) { + sub[1].type == CLOUDABI_EVENTTYPE_CLOCK) { /* Acquire a read lock with a timeout. */ error = cloudabi_futex_lock_rdlock( td, TO_PTR(sub[0].lock.lock), sub[0].lock.lock_scope, sub[1].clock.clock_id, - sub[1].clock.timeout, sub[1].clock.precision); + sub[1].clock.timeout, sub[1].clock.precision, + (sub[1].clock.flags & + CLOUDABI_SUBSCRIPTION_CLOCK_ABSTIME) != 0); if (error == ETIMEDOUT) { td->td_retval[0] = 1; return (copyout(&ev[1], uap->out, @@ -314,13 +316,14 @@ cloudabi64_sys_poll(struct thread *td, struct cloudabi td->td_retval[0] = 1; return (copyout(&ev[0], uap->out, sizeof(ev[0]))); } else if (sub[0].type == CLOUDABI_EVENTTYPE_LOCK_WRLOCK && - sub[1].type == CLOUDABI_EVENTTYPE_CLOCK && - sub[1].clock.flags == CLOUDABI_SUBSCRIPTION_CLOCK_ABSTIME) { + sub[1].type == CLOUDABI_EVENTTYPE_CLOCK) { /* Acquire a write lock with a timeout. */ error = cloudabi_futex_lock_wrlock( td, TO_PTR(sub[0].lock.lock), sub[0].lock.lock_scope, sub[1].clock.clock_id, - sub[1].clock.timeout, sub[1].clock.precision); + sub[1].clock.timeout, sub[1].clock.precision, + (sub[1].clock.flags & + CLOUDABI_SUBSCRIPTION_CLOCK_ABSTIME) != 0); if (error == ETIMEDOUT) { td->td_retval[0] = 1; return (copyout(&ev[1], uap->out, From owner-svn-src-head@freebsd.org Thu Jan 4 21:59:35 2018 Return-Path: Delivered-To: svn-src-head@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 D75ECEBA852; Thu, 4 Jan 2018 21:59:35 +0000 (UTC) (envelope-from jhb@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 A1E343F2E; Thu, 4 Jan 2018 21:59:35 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w04LxY2t099339; Thu, 4 Jan 2018 21:59:34 GMT (envelope-from jhb@FreeBSD.org) Received: (from jhb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w04LxYfW099338; Thu, 4 Jan 2018 21:59:34 GMT (envelope-from jhb@FreeBSD.org) Message-Id: <201801042159.w04LxYfW099338@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jhb set sender to jhb@FreeBSD.org using -f From: John Baldwin Date: Thu, 4 Jan 2018 21:59:34 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r327561 - head/sys/kern X-SVN-Group: head X-SVN-Commit-Author: jhb X-SVN-Commit-Paths: head/sys/kern X-SVN-Commit-Revision: 327561 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 04 Jan 2018 21:59:35 -0000 Author: jhb Date: Thu Jan 4 21:59:34 2018 New Revision: 327561 URL: https://svnweb.freebsd.org/changeset/base/327561 Log: Report offset relative to the backing object for kinfo_vmentry structures. For the pathname reported in kinfo_vmentry structures (kve_path), the sysctl handlers walk the object chain to find the bottom-most VM object. This permits a COW mapping of a file with dirty pages to report the pathname of the originally mapped file. Do the same for the object offset (kve_offset) computing a cumulative offset during the same object walk so that the reported offset is relative to the reported pathname. Note that ptrace(PT_VM_ENTRY) already returns a cumulative offset rather than the raw offset of the VM map entry. Note also that this does not affect procstat -v output (even structured output) since that output does not include the kve_offset field. Reviewed by: kib MFC after: 2 weeks Sponsored by: DARPA / AFRL Differential Revision: https://reviews.freebsd.org/D13767 Modified: head/sys/kern/kern_proc.c Modified: head/sys/kern/kern_proc.c ============================================================================== --- head/sys/kern/kern_proc.c Thu Jan 4 21:57:37 2018 (r327560) +++ head/sys/kern/kern_proc.c Thu Jan 4 21:59:34 2018 (r327561) @@ -2159,8 +2159,10 @@ sysctl_kern_proc_ovmmap(SYSCTL_HANDLER_ARGS) } for (lobj = tobj = obj; tobj; tobj = tobj->backing_object) { - if (tobj != obj) + if (tobj != obj) { VM_OBJECT_RLOCK(tobj); + kve->kve_offset += tobj->backing_object_offset; + } if (lobj != obj) VM_OBJECT_RUNLOCK(lobj); lobj = tobj; @@ -2168,7 +2170,7 @@ sysctl_kern_proc_ovmmap(SYSCTL_HANDLER_ARGS) kve->kve_start = (void*)entry->start; kve->kve_end = (void*)entry->end; - kve->kve_offset = (off_t)entry->offset; + kve->kve_offset += (off_t)entry->offset; if (entry->protection & VM_PROT_READ) kve->kve_protection |= KVME_PROT_READ; @@ -2389,6 +2391,7 @@ kern_proc_vmmap_out(struct proc *p, struct sbuf *sb, s for (tobj = obj; tobj != NULL; tobj = tobj->backing_object) { VM_OBJECT_RLOCK(tobj); + kve->kve_offset += tobj->backing_object_offset; lobj = tobj; } if (obj->backing_object == NULL) @@ -2409,7 +2412,7 @@ kern_proc_vmmap_out(struct proc *p, struct sbuf *sb, s kve->kve_start = entry->start; kve->kve_end = entry->end; - kve->kve_offset = entry->offset; + kve->kve_offset += entry->offset; if (entry->protection & VM_PROT_READ) kve->kve_protection |= KVME_PROT_READ; From owner-svn-src-head@freebsd.org Thu Jan 4 22:08:00 2018 Return-Path: Delivered-To: svn-src-head@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 769ACEBB1FD; Thu, 4 Jan 2018 22:08:00 +0000 (UTC) (envelope-from jhb@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 3CFC66391A; Thu, 4 Jan 2018 22:08:00 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w04M7xta003537; Thu, 4 Jan 2018 22:07:59 GMT (envelope-from jhb@FreeBSD.org) Received: (from jhb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w04M7xnC003536; Thu, 4 Jan 2018 22:07:59 GMT (envelope-from jhb@FreeBSD.org) Message-Id: <201801042207.w04M7xnC003536@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jhb set sender to jhb@FreeBSD.org using -f From: John Baldwin Date: Thu, 4 Jan 2018 22:07:59 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r327562 - head/sys/kern X-SVN-Group: head X-SVN-Commit-Author: jhb X-SVN-Commit-Paths: head/sys/kern X-SVN-Commit-Revision: 327562 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 04 Jan 2018 22:08:00 -0000 Author: jhb Date: Thu Jan 4 22:07:58 2018 New Revision: 327562 URL: https://svnweb.freebsd.org/changeset/base/327562 Log: Always use atomic_fetchadd() when updating per-user accounting values. This avoids re-reading a variable after it has been updated via an atomic op. It is just a cosmetic cleanup as the read value was only used to control a diagnostic printf that should rarely occur (if ever). Reviewed by: kib Differential Revision: https://reviews.freebsd.org/D13768 Modified: head/sys/kern/kern_resource.c Modified: head/sys/kern/kern_resource.c ============================================================================== --- head/sys/kern/kern_resource.c Thu Jan 4 21:59:34 2018 (r327561) +++ head/sys/kern/kern_resource.c Thu Jan 4 22:07:58 2018 (r327562) @@ -1384,18 +1384,17 @@ ui_racct_foreach(void (*callback)(struct racct *racct, static inline int chglimit(struct uidinfo *uip, long *limit, int diff, rlim_t max, const char *name) { + long new; /* Don't allow them to exceed max, but allow subtraction. */ + new = atomic_fetchadd_long(limit, (long)diff) + diff; if (diff > 0 && max != 0) { - if (atomic_fetchadd_long(limit, (long)diff) + diff > max) { + if (new < 0 || new > max) { atomic_subtract_long(limit, (long)diff); return (0); } - } else { - atomic_add_long(limit, (long)diff); - if (*limit < 0) - printf("negative %s for uid = %d\n", name, uip->ui_uid); - } + } else if (new < 0) + printf("negative %s for uid = %d\n", name, uip->ui_uid); return (1); } From owner-svn-src-head@freebsd.org Thu Jan 4 22:37:16 2018 Return-Path: Delivered-To: svn-src-head@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 A76EFEBCC01; Thu, 4 Jan 2018 22:37:16 +0000 (UTC) (envelope-from kevans@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 7D5E264AA8; Thu, 4 Jan 2018 22:37:16 +0000 (UTC) (envelope-from kevans@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w04MbFbl015971; Thu, 4 Jan 2018 22:37:15 GMT (envelope-from kevans@FreeBSD.org) Received: (from kevans@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w04MbFVR015965; Thu, 4 Jan 2018 22:37:15 GMT (envelope-from kevans@FreeBSD.org) Message-Id: <201801042237.w04MbFVR015965@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kevans set sender to kevans@FreeBSD.org using -f From: Kyle Evans Date: Thu, 4 Jan 2018 22:37:15 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r327563 - in head/sys: arm/allwinner arm/conf arm64/conf conf X-SVN-Group: head X-SVN-Commit-Author: kevans X-SVN-Commit-Paths: in head/sys: arm/allwinner arm/conf arm64/conf conf X-SVN-Commit-Revision: 327563 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 04 Jan 2018 22:37:16 -0000 Author: kevans Date: Thu Jan 4 22:37:15 2018 New Revision: 327563 URL: https://svnweb.freebsd.org/changeset/base/327563 Log: if_awg: Use syscon prop if it exists The emac bindings that are landing in Linux 4.15 specify a syscon property on the emac node that point to /soc/syscon. Use this property if it's specified, but maintain backwards compatibility with the old method. The older method is still used for boards that we get .dtb from u-boot, such as pine64, that did not yet have stable emac bindings. Tested on: Banana Pi-M3 (a83t) Tested on: Pine64 (a64) Reviewed by: manu Differential Revision: https://reviews.freebsd.org/D13296 Modified: head/sys/arm/allwinner/files.allwinner head/sys/arm/allwinner/if_awg.c head/sys/arm/conf/GENERIC head/sys/arm64/conf/GENERIC head/sys/conf/files.arm64 Modified: head/sys/arm/allwinner/files.allwinner ============================================================================== --- head/sys/arm/allwinner/files.allwinner Thu Jan 4 22:07:58 2018 (r327562) +++ head/sys/arm/allwinner/files.allwinner Thu Jan 4 22:37:15 2018 (r327563) @@ -20,7 +20,7 @@ arm/allwinner/aw_usbphy.c optional ehci | ohci arm/allwinner/aw_wdog.c standard arm/allwinner/axp209.c optional axp209 arm/allwinner/axp81x.c optional axp81x -arm/allwinner/if_awg.c optional awg +arm/allwinner/if_awg.c optional awg ext_resources syscon arm/allwinner/if_emac.c optional emac arm/allwinner/sunxi_dma_if.m standard dev/iicbus/twsi/a10_twsi.c optional twsi Modified: head/sys/arm/allwinner/if_awg.c ============================================================================== --- head/sys/arm/allwinner/if_awg.c Thu Jan 4 22:07:58 2018 (r327562) +++ head/sys/arm/allwinner/if_awg.c Thu Jan 4 22:37:15 2018 (r327563) @@ -69,7 +69,9 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include +#include "syscon_if.h" #include "miibus_if.h" #include "gpio_if.h" @@ -105,6 +107,7 @@ __FBSDID("$FreeBSD$"); #define RX_BATCH_DEFAULT 64 /* syscon EMAC clock register */ +#define EMAC_CLK_REG 0x30 #define EMAC_CLK_EPHY_ADDR (0x1f << 20) /* H3 */ #define EMAC_CLK_EPHY_ADDR_SHIFT 20 #define EMAC_CLK_EPHY_LED_POL (1 << 17) /* H3 */ @@ -203,6 +206,7 @@ struct awg_softc { int link; int if_flags; enum awg_type type; + struct syscon *syscon; struct awg_txring tx; struct awg_rxring rx; @@ -217,6 +221,9 @@ static struct resource_spec awg_spec[] = { static void awg_txeof(struct awg_softc *sc); +static uint32_t syscon_read_emac_clk_reg(device_t dev); +static void syscon_write_emac_clk_reg(device_t dev, uint32_t val); + static int awg_miibus_readreg(device_t dev, int phy, int reg) { @@ -1153,6 +1160,32 @@ awg_ioctl(if_t ifp, u_long cmd, caddr_t data) return (error); } +static uint32_t +syscon_read_emac_clk_reg(device_t dev) +{ + struct awg_softc *sc; + + sc = device_get_softc(dev); + if (sc->syscon != NULL) + return (SYSCON_READ_4(sc->syscon, EMAC_CLK_REG)); + else if (sc->res[_RES_SYSCON] != NULL) + return (bus_read_4(sc->res[_RES_SYSCON], 0)); + + return (0); +} + +static void +syscon_write_emac_clk_reg(device_t dev, uint32_t val) +{ + struct awg_softc *sc; + + sc = device_get_softc(dev); + if (sc->syscon != NULL) + SYSCON_WRITE_4(sc->syscon, EMAC_CLK_REG, val); + else if (sc->res[_RES_SYSCON] != NULL) + bus_write_4(sc->res[_RES_SYSCON], 0, val); +} + static int awg_setup_phy(device_t dev) { @@ -1163,19 +1196,31 @@ awg_setup_phy(device_t dev) phandle_t node; uint32_t reg, tx_delay, rx_delay; int error; + bool use_syscon; sc = device_get_softc(dev); node = ofw_bus_get_node(dev); + use_syscon = false; if (OF_getprop_alloc(node, "phy-mode", 1, (void **)&phy_type) == 0) return (0); + if (sc->syscon != NULL || sc->res[_RES_SYSCON] != NULL) + use_syscon = true; + if (bootverbose) device_printf(dev, "PHY type: %s, conf mode: %s\n", phy_type, - sc->res[_RES_SYSCON] != NULL ? "reg" : "clk"); + use_syscon ? "reg" : "clk"); - if (sc->res[_RES_SYSCON] != NULL) { - reg = bus_read_4(sc->res[_RES_SYSCON], 0); + if (use_syscon) { + /* + * Abstract away writing to syscon for devices like the pine64. + * For the pine64, we get dtb from U-Boot and it still uses the + * legacy setup of specifying syscon register in emac node + * rather than as its own node and using an xref in emac. + * These abstractions can go away once U-Boot dts is up-to-date. + */ + reg = syscon_read_emac_clk_reg(dev); reg &= ~(EMAC_CLK_PIT | EMAC_CLK_SRC | EMAC_CLK_RMII_EN); if (strncmp(phy_type, "rgmii", 5) == 0) reg |= EMAC_CLK_PIT_RGMII | EMAC_CLK_SRC_RGMII; @@ -1215,7 +1260,7 @@ awg_setup_phy(device_t dev) if (bootverbose) device_printf(dev, "EMAC clock: 0x%08x\n", reg); - bus_write_4(sc->res[_RES_SYSCON], 0, reg); + syscon_write_emac_clk_reg(dev, reg); } else { if (strncmp(phy_type, "rgmii", 5) == 0) tx_parent_name = "emac_int_tx"; @@ -1263,6 +1308,7 @@ static int awg_setup_extres(device_t dev) { struct awg_softc *sc; + phandle_t node; hwreset_t rst_ahb, rst_ephy; clk_t clk_ahb, clk_ephy; regulator_t reg; @@ -1273,6 +1319,7 @@ awg_setup_extres(device_t dev) rst_ahb = rst_ephy = NULL; clk_ahb = clk_ephy = NULL; reg = NULL; + node = ofw_bus_get_node(dev); /* Get AHB clock and reset resources */ error = hwreset_get_by_ofw_name(dev, 0, "ahb", &rst_ahb); @@ -1289,7 +1336,13 @@ awg_setup_extres(device_t dev) } if (clk_get_by_ofw_name(dev, 0, "ephy", &clk_ephy) != 0) clk_ephy = NULL; - + + if (OF_hasprop(node, "syscon") && syscon_get_by_ofw_property(dev, node, + "syscon", &sc->syscon) != 0) { + device_printf(dev, "cannot get syscon driver handle\n"); + goto fail; + } + /* Configure PHY for MII or RGMII mode */ if (awg_setup_phy(dev) != 0) goto fail; Modified: head/sys/arm/conf/GENERIC ============================================================================== --- head/sys/arm/conf/GENERIC Thu Jan 4 22:07:58 2018 (r327562) +++ head/sys/arm/conf/GENERIC Thu Jan 4 22:37:15 2018 (r327563) @@ -69,6 +69,7 @@ device clk device phy device hwreset device regulator +device syscon # CPU frequency control device cpufreq Modified: head/sys/arm64/conf/GENERIC ============================================================================== --- head/sys/arm64/conf/GENERIC Thu Jan 4 22:07:58 2018 (r327562) +++ head/sys/arm64/conf/GENERIC Thu Jan 4 22:37:15 2018 (r327563) @@ -235,6 +235,7 @@ device clk device phy device hwreset device regulator +device syscon # The `bpf' device enables the Berkeley Packet Filter. # Be aware of the administrative consequences of enabling this! Modified: head/sys/conf/files.arm64 ============================================================================== --- head/sys/conf/files.arm64 Thu Jan 4 22:07:58 2018 (r327562) +++ head/sys/conf/files.arm64 Thu Jan 4 22:37:15 2018 (r327563) @@ -59,7 +59,7 @@ arm/allwinner/clkng/ccu_a64.c optional aw_ccu fdt arm/allwinner/clkng/ccu_h3.c optional aw_ccu fdt arm/allwinner/clkng/ccu_sun8i_r.c optional aw_ccu fdt -arm/allwinner/if_awg.c optional awg fdt +arm/allwinner/if_awg.c optional awg ext_resources syscon fdt arm/annapurna/alpine/alpine_ccu.c optional al_ccu fdt arm/annapurna/alpine/alpine_nb_service.c optional al_nb_service fdt arm/annapurna/alpine/alpine_pci.c optional al_pci fdt From owner-svn-src-head@freebsd.org Thu Jan 4 22:42:17 2018 Return-Path: Delivered-To: svn-src-head@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 C1775EBD1A1; Thu, 4 Jan 2018 22:42:17 +0000 (UTC) (envelope-from hiren@strugglingcoder.info) Received: from mail.strugglingcoder.info (strugglingcoder.info [104.236.146.68]) by mx1.freebsd.org (Postfix) with ESMTP id 9EA0B6510A; Thu, 4 Jan 2018 22:42:17 +0000 (UTC) (envelope-from hiren@strugglingcoder.info) Received: from localhost (unknown [10.1.1.3]) (Authenticated sender: hiren@strugglingcoder.info) by mail.strugglingcoder.info (Postfix) with ESMTPA id 70E3C179A6; Thu, 4 Jan 2018 14:42:14 -0800 (PST) Date: Thu, 4 Jan 2018 14:42:14 -0800 From: hiren panchasara To: Steven Hartland Cc: Eugene Grosbein , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r327559 - in head: . sys/net Message-ID: <20180104224214.GD18879@strugglingcoder.info> References: <201801042005.w04K5liB049411@repo.freebsd.org> <5A4E9397.9000308@grosbein.net> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="zaRBsRFn0XYhEU69" Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.23 (2014-03-12) X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 04 Jan 2018 22:42:17 -0000 --zaRBsRFn0XYhEU69 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On 01/04/18 at 09:52P, Steven Hartland wrote: > On 04/01/2018 20:50, Eugene Grosbein wrote: > > 05.01.2018 3:05, Steven Hartland wrote: > > > >> Author: smh > >> Date: Thu Jan 4 20:05:47 2018 > >> New Revision: 327559 > >> URL: https://svnweb.freebsd.org/changeset/base/327559 > >> > >> Log: > >> Disabled the use of flowid for lagg by default > >> =20 > >> Disabled the use of RSS hash from the network card aka flowid for > >> lagg(4) interfaces by default as it's currently incompatible with > >> the lacp and loadbalance protocols. > >> =20 > >> The incompatibility is due to the fact that the flowid isn't know > >> for the first packet of a new outbound stream which can result in > >> the hash calculation method changing and hence a stream being > >> incorrectly split across multiple interfaces during normal > >> operation. > >> =20 > >> This can be re-enabled by setting the following in loader.conf: > >> net.link.lagg.default_use_flowid=3D"1" > >> =20 > >> Discussed with: kmacy > >> Sponsored by: Multiplay > > RSS by definition has meaning to received stream. What is "outbound" st= ream > > in this context, why can the hash calculatiom method change and what ex= actly > > does it mean "a stream being incorrectly split"? > Yes RSS is indeed a received stream but that is used by lagg for lacp=20 > and loadbalance protocols to decide which port of the lagg to "send" the= =20 > packet out of. As the flowid is not known when a new "output" stream is= =20 > instigated the current code falls back to manual hash calculation to=20 > determine which port to send the initial packet from. Once a response is= =20 > received a tx then uses the flowid. This change of hash calculation=20 > method can result in the initial packet being sent from a different port= =20 > than the rest of the stream; this is what I meant by "incorrectly split". For my understanding, is this just an issue for the first packet when we originate the flow? Once we have a response and if flowid is there, we'd use it, right? OR am I missing something?=20 And with this change, we'd always go and do manual calculation even when we have a valid flowid (i.e. we didn't initiate a connection)? Thanks, Hiren >=20 > See the following: > https://github.com/freebsd/freebsd/blob/master/sys/net/if_lagg.c#L2066 > https://github.com/freebsd/freebsd/blob/master/sys/net/ieee8023ad_lacp.c#= L846 >=20 > > Defaults should not be changed so easily just because they are not opti= mal > > for some specific case. Each lagg has its own setting for flowid usage > > and why one cannot just use "ifconfig lagg0 -use_flowid" for such cases? > > > Yes we're already using -use_flowid to mitigate the problem, but the=20 > defaults should never result in broken behavior hence the change, at=20 > least for now. >=20 > For reference I did look at keeping the default of 1 but only using that= =20 > for protocols which weren't effected by the issue, and introducing a 2=20 > to force those that are, but as its defined as acting on creation and we= =20 > always create lagg interfaces as failover and then amend them that=20 > wasn't possible without making more invasive changes. >=20 > ??? Regards > ??? Steve --zaRBsRFn0XYhEU69 Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQF8BAABCgBmBQJaTq3DXxSAAAAAAC4AKGlzc3Vlci1mcHJAbm90YXRpb25zLm9w ZW5wZ3AuZmlmdGhob3JzZW1hbi5uZXRBNEUyMEZBMUQ4Nzg4RjNGMTdFNjZGMDI4 QjkyNTBFMTU2M0VERkU1AAoJEIuSUOFWPt/lO7IIAIttys/MHCicyyy/Ioi6f9Xa tWlZldwa/x4pR6pjt+/k79edyjagzDWPnNUlPL449iY8HIqk62/y3AEZasge5SGs XlIn9I3zadhMXDOp4zDmv2MIFbQJEEc2FmkqOziddFZP1rrLFIQhivlE5wvoGQkj MIQCzwByT/QlKbDCXt5PiMwk6OTzxbU/oMHCcIAN/uHomfiafZ+iWOFsjnGqm0MH NGG8u8os9Cl5IlvYfENod7RSi1abkkAjrBtTlvF+Ke6dycP37lOnNPy7ALvatFlb LSoQzfE+YDAsoCOyS5i8j581sQLuJZKCX4OVVrYVL0+j/Tjq2KNXZop5BQ8beqY= =Irfa -----END PGP SIGNATURE----- --zaRBsRFn0XYhEU69-- From owner-svn-src-head@freebsd.org Thu Jan 4 22:59:25 2018 Return-Path: Delivered-To: svn-src-head@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 5CDE4EBE258; Thu, 4 Jan 2018 22:59:25 +0000 (UTC) (envelope-from jilles@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 25F5565A83; Thu, 4 Jan 2018 22:59:25 +0000 (UTC) (envelope-from jilles@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w04MxOKN024384; Thu, 4 Jan 2018 22:59:24 GMT (envelope-from jilles@FreeBSD.org) Received: (from jilles@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w04MxONi024383; Thu, 4 Jan 2018 22:59:24 GMT (envelope-from jilles@FreeBSD.org) Message-Id: <201801042259.w04MxONi024383@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jilles set sender to jilles@FreeBSD.org using -f From: Jilles Tjoelker Date: Thu, 4 Jan 2018 22:59:24 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r327565 - head/usr.bin/find/tests X-SVN-Group: head X-SVN-Commit-Author: jilles X-SVN-Commit-Paths: head/usr.bin/find/tests X-SVN-Commit-Revision: 327565 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 04 Jan 2018 22:59:25 -0000 Author: jilles Date: Thu Jan 4 22:59:24 2018 New Revision: 327565 URL: https://svnweb.freebsd.org/changeset/base/327565 Log: find: Speed up tests by using touch -d instead of sleep for timestamps I have verified that the tests still detect the absence of the r327362 fix. Modified: head/usr.bin/find/tests/find_test.sh Modified: head/usr.bin/find/tests/find_test.sh ============================================================================== --- head/usr.bin/find/tests/find_test.sh Thu Jan 4 22:38:01 2018 (r327564) +++ head/usr.bin/find/tests/find_test.sh Thu Jan 4 22:59:24 2018 (r327565) @@ -36,10 +36,9 @@ find_newer_link_body() { atf_check -s exit:0 mkdir test atf_check -s exit:0 ln -s file1 test/link - atf_check -s exit:0 sleep 1.1 - atf_check -s exit:0 touch test/file2 - atf_check -s exit:0 sleep 1.1 - atf_check -s exit:0 touch test/file1 + atf_check -s exit:0 touch -d 2017-12-31T10:00:00Z -h test/link + atf_check -s exit:0 touch -d 2017-12-31T11:00:00Z test/file2 + atf_check -s exit:0 touch -d 2017-12-31T12:00:00Z test/file1 # find(1) should evaluate 'link' as a symlink rather than its target # (with -P / without -L flags). Since link was created first, the From owner-svn-src-head@freebsd.org Thu Jan 4 23:07:52 2018 Return-Path: Delivered-To: svn-src-head@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 9214CEBEB32; Thu, 4 Jan 2018 23:07:52 +0000 (UTC) (envelope-from nwhitehorn@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 69D7C6613E; Thu, 4 Jan 2018 23:07:52 +0000 (UTC) (envelope-from nwhitehorn@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w04N7p3G028574; Thu, 4 Jan 2018 23:07:51 GMT (envelope-from nwhitehorn@FreeBSD.org) Received: (from nwhitehorn@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w04N7pK2028573; Thu, 4 Jan 2018 23:07:51 GMT (envelope-from nwhitehorn@FreeBSD.org) Message-Id: <201801042307.w04N7pK2028573@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: nwhitehorn set sender to nwhitehorn@FreeBSD.org using -f From: Nathan Whitehorn Date: Thu, 4 Jan 2018 23:07:51 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r327566 - head/sys/powerpc/pseries X-SVN-Group: head X-SVN-Commit-Author: nwhitehorn X-SVN-Commit-Paths: head/sys/powerpc/pseries X-SVN-Commit-Revision: 327566 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 04 Jan 2018 23:07:52 -0000 Author: nwhitehorn Date: Thu Jan 4 23:07:51 2018 New Revision: 327566 URL: https://svnweb.freebsd.org/changeset/base/327566 Log: Revert r327360, which can cause boot problems on high-CPU-count (>60) POWER8 and POWER9 systems, pending further analysis. PR: 224841 Modified: head/sys/powerpc/pseries/platform_chrp.c Modified: head/sys/powerpc/pseries/platform_chrp.c ============================================================================== --- head/sys/powerpc/pseries/platform_chrp.c Thu Jan 4 22:59:24 2018 (r327565) +++ head/sys/powerpc/pseries/platform_chrp.c Thu Jan 4 23:07:51 2018 (r327566) @@ -114,8 +114,6 @@ static platform_def_t chrp_platform = { PLATFORM_DEF(chrp_platform); -#define BSP_MUST_BE_CPU_ZERO - static int chrp_probe(platform_t plat) { @@ -281,31 +279,13 @@ chrp_real_maxaddr(platform_t plat) static u_long chrp_timebase_freq(platform_t plat, struct cpuref *cpuref) { - char buf[8]; - phandle_t cpu, dev, root; - int res; + phandle_t phandle; int32_t ticks = -1; - root = OF_peer(0); + phandle = cpuref->cr_hwref; - dev = OF_child(root); - while (dev != 0) { - res = OF_getprop(dev, "name", buf, sizeof(buf)); - if (res > 0 && strcmp(buf, "cpus") == 0) - break; - dev = OF_peer(dev); - } + OF_getencprop(phandle, "timebase-frequency", &ticks, sizeof(ticks)); - for (cpu = OF_child(dev); cpu != 0; cpu = OF_peer(cpu)) { - res = OF_getprop(cpu, "device_type", buf, sizeof(buf)); - if (res > 0 && strcmp(buf, "cpu") == 0) - break; - } - if (cpu == 0) - return (512000000); - - OF_getencprop(cpu, "timebase-frequency", &ticks, sizeof(ticks)); - if (ticks <= 0) panic("Unable to determine timebase frequency!"); @@ -313,11 +293,11 @@ chrp_timebase_freq(platform_t plat, struct cpuref *cpu } static int -chrp_cpuref_for_server(struct cpuref *cpuref, int cpu_n, int server) +chrp_smp_first_cpu(platform_t plat, struct cpuref *cpuref) { char buf[8]; phandle_t cpu, dev, root; - int res, cpuid, i, j; + int res, cpuid; root = OF_peer(0); @@ -338,84 +318,71 @@ chrp_cpuref_for_server(struct cpuref *cpuref, int cpu_ return (ENOENT); } - i = 0; - for (cpu = OF_child(dev); cpu != 0; cpu = OF_peer(cpu)) { - res = OF_getprop(cpu, "device_type", buf, sizeof(buf)); - if (res <= 0 || strcmp(buf, "cpu") != 0) - continue; + cpu = OF_child(dev); - res = OF_getproplen(cpu, "ibm,ppc-interrupt-server#s"); - if (res > 0) { - cell_t interrupt_servers[res/sizeof(cell_t)]; - OF_getencprop(cpu, "ibm,ppc-interrupt-server#s", - interrupt_servers, res); - for (j = 0; j < res/sizeof(cell_t); j++) { - cpuid = interrupt_servers[j]; - if (server != -1 && cpuid == server) - break; - if (cpu_n != -1 && cpu_n == i) - break; - i++; - } - - if (j != res/sizeof(cell_t)) - break; - } else { - res = OF_getencprop(cpu, "reg", &cpuid, sizeof(cpuid)); - if (res <= 0) - cpuid = 0; - if (server != -1 && cpuid == server) - break; - if (cpu_n != -1 && cpu_n == i) - break; - i++; - } + while (cpu != 0) { + res = OF_getprop(cpu, "device_type", buf, sizeof(buf)); + if (res > 0 && strcmp(buf, "cpu") == 0) + break; + cpu = OF_peer(cpu); } - if (cpu == 0) return (ENOENT); - cpuref->cr_hwref = cpuid; - cpuref->cr_cpuid = i; + cpuref->cr_hwref = cpu; + res = OF_getencprop(cpu, "ibm,ppc-interrupt-server#s", &cpuid, + sizeof(cpuid)); + if (res <= 0) + res = OF_getencprop(cpu, "reg", &cpuid, sizeof(cpuid)); + if (res <= 0) + cpuid = 0; + cpuref->cr_cpuid = cpuid; return (0); } static int -chrp_smp_first_cpu(platform_t plat, struct cpuref *cpuref) -{ -#ifdef BSP_MUST_BE_CPU_ZERO - return (chrp_smp_get_bsp(plat, cpuref)); -#else - return (chrp_cpuref_for_server(cpuref, 0, -1)); -#endif -} - -static int chrp_smp_next_cpu(platform_t plat, struct cpuref *cpuref) { -#ifdef BSP_MUST_BE_CPU_ZERO - int bsp, ncpus, err; - struct cpuref scratch; + char buf[8]; + phandle_t cpu; + int i, res, cpuid; - chrp_smp_get_bsp(plat, &scratch); - chrp_cpuref_for_server(&scratch, -1, scratch.cr_hwref); - bsp = scratch.cr_cpuid; + /* Check for whether it should be the next thread */ + res = OF_getproplen(cpuref->cr_hwref, "ibm,ppc-interrupt-server#s"); + if (res > 0) { + cell_t interrupt_servers[res/sizeof(cell_t)]; + OF_getencprop(cpuref->cr_hwref, "ibm,ppc-interrupt-server#s", + interrupt_servers, res); + for (i = 0; i < res/sizeof(cell_t) - 1; i++) { + if (interrupt_servers[i] == cpuref->cr_cpuid) { + cpuref->cr_cpuid = interrupt_servers[i+1]; + return (0); + } + } + } - for (ncpus = bsp; chrp_cpuref_for_server(&scratch, ncpus, -1) != - ENOENT; ncpus++) {} - if (cpuref->cr_cpuid + 1 == ncpus) + /* Next CPU core/package */ + cpu = OF_peer(cpuref->cr_hwref); + while (cpu != 0) { + res = OF_getprop(cpu, "device_type", buf, sizeof(buf)); + if (res > 0 && strcmp(buf, "cpu") == 0) + break; + cpu = OF_peer(cpu); + } + if (cpu == 0) return (ENOENT); - err = chrp_cpuref_for_server(cpuref, - (cpuref->cr_cpuid + bsp + 1) % ncpus, -1); - if (cpuref->cr_cpuid >= bsp) - cpuref->cr_cpuid -= bsp; - else - cpuref->cr_cpuid = ncpus - (bsp - cpuref->cr_cpuid); - return (err); -#else - return (chrp_cpuref_for_server(cpuref, cpuref->cr_cpuid+1, -1)); -#endif + + cpuref->cr_hwref = cpu; + res = OF_getencprop(cpu, "ibm,ppc-interrupt-server#s", &cpuid, + sizeof(cpuid)); + if (res <= 0) + res = OF_getencprop(cpu, "reg", &cpuid, sizeof(cpuid)); + if (res <= 0) + cpuid = 0; + cpuref->cr_cpuid = cpuid; + + return (0); } static int @@ -436,17 +403,14 @@ chrp_smp_get_bsp(platform_t plat, struct cpuref *cpure bsp = OF_instance_to_package(inst); /* Pick the primary thread. Can it be any other? */ + cpuref->cr_hwref = bsp; res = OF_getencprop(bsp, "ibm,ppc-interrupt-server#s", &cpuid, sizeof(cpuid)); if (res <= 0) res = OF_getencprop(bsp, "reg", &cpuid, sizeof(cpuid)); if (res <= 0) cpuid = 0; - - chrp_cpuref_for_server(cpuref, -1, cpuid); -#ifdef BSP_MUST_BE_CPU_ZERO cpuref->cr_cpuid = cpuid; -#endif return (0); } @@ -474,7 +438,7 @@ chrp_smp_start_cpu(platform_t plat, struct pcpu *pc) ap_pcpu = pc; powerpc_sync(); - result = rtas_call_method(start_cpu, 3, 1, pc->pc_hwref, EXC_RST, pc, + result = rtas_call_method(start_cpu, 3, 1, pc->pc_cpuid, EXC_RST, pc, &err); if (result < 0 || err != 0) { printf("RTAS error (%d/%d): unable to start AP %d\n", @@ -492,62 +456,39 @@ chrp_smp_start_cpu(platform_t plat, struct pcpu *pc) static struct cpu_group * chrp_smp_topo(platform_t plat) { - char buf[8]; - phandle_t cpu, dev, root; - int res, nthreads; + struct pcpu *pc, *last_pc; + int i, ncores, ncpus; - root = OF_peer(0); - - dev = OF_child(root); - while (dev != 0) { - res = OF_getprop(dev, "name", buf, sizeof(buf)); - if (res > 0 && strcmp(buf, "cpus") == 0) - break; - dev = OF_peer(dev); - } - - nthreads = 1; - for (cpu = OF_child(dev); cpu != 0; cpu = OF_peer(cpu)) { - res = OF_getprop(cpu, "device_type", buf, sizeof(buf)); - if (res <= 0 || strcmp(buf, "cpu") != 0) + ncores = ncpus = 0; + last_pc = NULL; + for (i = 0; i <= mp_maxid; i++) { + pc = pcpu_find(i); + if (pc == NULL) continue; - - res = OF_getproplen(cpu, "ibm,ppc-interrupt-server#s"); - - if (res >= 0) - nthreads = res / sizeof(cell_t); - else - nthreads = 1; - break; + if (last_pc == NULL || pc->pc_hwref != last_pc->pc_hwref) + ncores++; + last_pc = pc; + ncpus++; } - if (mp_ncpus % nthreads != 0) { + if (ncpus % ncores != 0) { printf("WARNING: Irregular SMP topology. Performance may be " - "suboptimal (%d threads, %d on first core)\n", - mp_ncpus, nthreads); + "suboptimal (%d CPUS, %d cores)\n", ncpus, ncores); return (smp_topo_none()); } /* Don't do anything fancier for non-threaded SMP */ - if (nthreads == 1) + if (ncpus == ncores) return (smp_topo_none()); - return (smp_topo_1level(CG_SHARE_L1, nthreads, CG_FLAG_SMT)); + return (smp_topo_1level(CG_SHARE_L1, ncpus / ncores, CG_FLAG_SMT)); } #endif static void chrp_reset(platform_t platform) { - cell_t token, status; - - if (rtas_exists()) { - token = rtas_token_lookup("system-reboot"); - if (token != -1) - rtas_call_method(token, 0, 1, &status); - } else { - OF_reboot(); - } + OF_reboot(); } #ifdef __powerpc64__ From owner-svn-src-head@freebsd.org Thu Jan 4 23:37:03 2018 Return-Path: Delivered-To: svn-src-head@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 67786EC05E3 for ; Thu, 4 Jan 2018 23:37:03 +0000 (UTC) (envelope-from steven@multiplay.co.uk) Received: from mail-wm0-x234.google.com (mail-wm0-x234.google.com [IPv6:2a00:1450:400c:c09::234]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id E900467588 for ; Thu, 4 Jan 2018 23:37:02 +0000 (UTC) (envelope-from steven@multiplay.co.uk) Received: by mail-wm0-x234.google.com with SMTP id i11so6142518wmf.4 for ; Thu, 04 Jan 2018 15:37:02 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=multiplay-co-uk.20150623.gappssmtp.com; s=20150623; h=subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language; bh=3Y9cX4fbwMD5MAot46jll7a1shZUSTNQe+jFE3rqEA0=; b=RhczLdZVK6c0dJVOZ2cw6LrGIYNvyDDXIbm8lmrMmD9Qq1sOn6csRzV9UieqahmbF1 FbdoW8T2PaNogcIP6x03SZu84SmIfvnFFkn8Zgx+KCJZxmt8Rjt1Y/bdESYzjPL32LVK uA9qRMVMBRIqdZAB/8k8kYO49dba3VaLy/w61mnoecqkepBE6BdD8JkZpkHur8G6hRcV qlt48CS+8Qzaycc0AjSJIgHnSaUjKX/eDYWCHdRHD+jisjlDpgK3ZtsJmDXjx/4RA223 dyFLUHXZMkKSy2MDR1ObLYURvPbU/i+cl3R8oQTx6Lvpqcotw5A6DEMLGEWdNfh98+Mo oJmA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language; bh=3Y9cX4fbwMD5MAot46jll7a1shZUSTNQe+jFE3rqEA0=; b=NsRUceNS+40s+CPXauLa4txbjKItpiM780y87xhktWvKul27nGOwCdZUOF3LHj4kNC IvtQTBqKATS6N3tOQCVxfc4x0W/BmCed3JnckBGEGPjhlxvCMXr0LaOkWfsOscZlwm3R 9knemkbD5WAB3ZVZ6pTupclbJNFkDENqW5+JL98Xtx5E3HoeiIAwUc7bD2swnfU/OvLH HSge5rCgKoDRxo698xSGlk/Voi7QF2M2YSqgzkljiOJCqKntmcMVu2fX2kfNcg9Mi4xt NHPm0aM8yF33c/Pwv7HJWhK8wlfdskG+PBWFKvjbF/pWs2j98Cp3aPNbTcdE0zE1CDKs r3Cg== X-Gm-Message-State: AKGB3mI6BoIkfL/shLo4SHdqnjdHVkV2PY6cEidWiCnnGUcbnF1C1G8J jr0z5IS2qCOpd8ZSt7QNoQleDaJ1gkQ= X-Google-Smtp-Source: ACJfBouhpcyFG51BbPeplzGFlq4p8Y6DRtSo0KjEa2vOmdPLZCd1LNrkZ7vgBo95npIDp73NoWiOew== X-Received: by 10.28.15.201 with SMTP id 192mr843627wmp.88.1515109020832; Thu, 04 Jan 2018 15:37:00 -0800 (PST) Received: from [10.10.1.111] ([185.97.61.1]) by smtp.gmail.com with ESMTPSA id 67sm5947674wmq.38.2018.01.04.15.36.59 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 04 Jan 2018 15:36:59 -0800 (PST) Subject: Re: svn commit: r327559 - in head: . sys/net To: hiren panchasara Cc: Eugene Grosbein , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org References: <201801042005.w04K5liB049411@repo.freebsd.org> <5A4E9397.9000308@grosbein.net> <20180104224214.GD18879@strugglingcoder.info> From: Steven Hartland Message-ID: <63c3c450-aeaf-bdd5-5e16-414146c9bb3a@multiplay.co.uk> Date: Thu, 4 Jan 2018 23:37:00 +0000 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:52.0) Gecko/20100101 Thunderbird/52.5.2 MIME-Version: 1.0 In-Reply-To: <20180104224214.GD18879@strugglingcoder.info> Content-Language: en-US Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 8bit X-Content-Filtered-By: Mailman/MimeDel 2.1.25 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 04 Jan 2018 23:37:03 -0000 On 04/01/2018 22:42, hiren panchasara wrote: > On 01/04/18 at 09:52P, Steven Hartland wrote: >> On 04/01/2018 20:50, Eugene Grosbein wrote: >>> 05.01.2018 3:05, Steven Hartland wrote: >>> >>>> Author: smh >>>> Date: Thu Jan 4 20:05:47 2018 >>>> New Revision: 327559 >>>> URL: https://svnweb.freebsd.org/changeset/base/327559 >>>> >>>> Log: >>>> Disabled the use of flowid for lagg by default >>>> >>>> Disabled the use of RSS hash from the network card aka flowid for >>>> lagg(4) interfaces by default as it's currently incompatible with >>>> the lacp and loadbalance protocols. >>>> >>>> The incompatibility is due to the fact that the flowid isn't know >>>> for the first packet of a new outbound stream which can result in >>>> the hash calculation method changing and hence a stream being >>>> incorrectly split across multiple interfaces during normal >>>> operation. >>>> >>>> This can be re-enabled by setting the following in loader.conf: >>>> net.link.lagg.default_use_flowid="1" >>>> >>>> Discussed with: kmacy >>>> Sponsored by: Multiplay >>> RSS by definition has meaning to received stream. What is "outbound" stream >>> in this context, why can the hash calculatiom method change and what exactly >>> does it mean "a stream being incorrectly split"? >> Yes RSS is indeed a received stream but that is used by lagg for lacp >> and loadbalance protocols to decide which port of the lagg to "send" the >> packet out of. As the flowid is not known when a new "output" stream is >> instigated the current code falls back to manual hash calculation to >> determine which port to send the initial packet from. Once a response is >> received a tx then uses the flowid. This change of hash calculation >> method can result in the initial packet being sent from a different port >> than the rest of the stream; this is what I meant by "incorrectly split". > For my understanding, is this just an issue for the first packet when we > originate the flow? Once we have a response and if flowid is there, we'd > use it, right? OR am I missing something? Initially yes, but that can cause a whole cascading set of problems. If the source machine sends from two different ports then flow can traverse across the network using different paths and hence arrive at the destination on different ports too, causing the corresponding  issue on the other side. > And with this change, we'd always go and do manual calculation even when > we have a valid flowid (i.e. we didn't initiate a connection)? Correct, but there's potentially no easy way to correctly determine what the flowid and hence hash should be in this case, likely impossible if the lagg consists of different interface types. In addition if the hardware hash doesn't match the requested one as per laggproto then additional issues could also be triggered. Our TCP stack seems fragile during setup to out of order packets which this multipath behavior causes, we've seen this on our loadbalancers which is what triggered the investigation. The concrete result is many aborted TCP connections, over 300k ~2% on the machine I'm looking at. I hope there's some improvements that can be made, for example if we can determine the stream was instigated remotely then flowid would always be valid hence we can use it assuming it matches the requested spec or if we can make it clear to the user that laggproto is not the one they requested, I'm open to ideas?     Regards     Steve From owner-svn-src-head@freebsd.org Fri Jan 5 01:46:42 2018 Return-Path: Delivered-To: svn-src-head@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 9B859EA4F8A; Fri, 5 Jan 2018 01:46:42 +0000 (UTC) (envelope-from kevans@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 666226C660; Fri, 5 Jan 2018 01:46:42 +0000 (UTC) (envelope-from kevans@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w051kfhG095605; Fri, 5 Jan 2018 01:46:41 GMT (envelope-from kevans@FreeBSD.org) Received: (from kevans@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w051kfUa095604; Fri, 5 Jan 2018 01:46:41 GMT (envelope-from kevans@FreeBSD.org) Message-Id: <201801050146.w051kfUa095604@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kevans set sender to kevans@FreeBSD.org using -f From: Kyle Evans Date: Fri, 5 Jan 2018 01:46:41 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r327567 - head/usr.bin/hexdump X-SVN-Group: head X-SVN-Commit-Author: kevans X-SVN-Commit-Paths: head/usr.bin/hexdump X-SVN-Commit-Revision: 327567 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 05 Jan 2018 01:46:42 -0000 Author: kevans Date: Fri Jan 5 01:46:41 2018 New Revision: 327567 URL: https://svnweb.freebsd.org/changeset/base/327567 Log: hexdump(1): Speed up -s flag on devices Using the -s flag on devices is extraordinarily slow due to using fseek(3) a little too conservatively. Address this by using fseek on character/block devices as well, falling back to getchar(3) only if we fail to seek or we're operating on tape drives, where fseek may succeed while not actually being supported. PR: 86485 Submitted by: arundel (originally; modified since then) Reviewed by: cem Differential Revision: https://reviews.freebsd.org/D10939 Modified: head/usr.bin/hexdump/display.c Modified: head/usr.bin/hexdump/display.c ============================================================================== --- head/usr.bin/hexdump/display.c Thu Jan 4 23:07:51 2018 (r327566) +++ head/usr.bin/hexdump/display.c Fri Jan 5 01:46:41 2018 (r327567) @@ -39,6 +39,8 @@ __FBSDID("$FreeBSD$"); #include #include +#include +#include #include #include @@ -57,6 +59,7 @@ static off_t address; /* address/offset in stream */ static off_t eaddress; /* end address */ static void print(PR *, u_char *); +static void noseek(void); void display(void) @@ -386,7 +389,7 @@ next(char **argv) void doskip(const char *fname, int statok) { - int cnt; + int type; struct stat sb; if (statok) { @@ -398,16 +401,37 @@ doskip(const char *fname, int statok) return; } } - if (statok && S_ISREG(sb.st_mode)) { - if (fseeko(stdin, skip, SEEK_SET)) + if (!statok || S_ISFIFO(sb.st_mode) || S_ISSOCK(sb.st_mode)) { + noseek(); + return; + } + if (S_ISCHR(sb.st_mode) || S_ISBLK(sb.st_mode)) { + if (ioctl(fileno(stdin), FIODTYPE, &type)) err(1, "%s", fname); - address += skip; - skip = 0; - } else { - for (cnt = 0; cnt < skip; ++cnt) - if (getchar() == EOF) - break; - address += cnt; - skip -= cnt; + /* + * Most tape drives don't support seeking, + * yet fseek() would succeed. + */ + if (type & D_TAPE) { + noseek(); + return; + } } + if (fseeko(stdin, skip, SEEK_SET)) { + noseek(); + return; + } + address += skip; + skip = 0; +} + +static void +noseek(void) +{ + int count; + for (count = 0; count < skip; ++count) + if (getchar() == EOF) + break; + address += count; + skip -= count; } From owner-svn-src-head@freebsd.org Fri Jan 5 02:01:35 2018 Return-Path: Delivered-To: svn-src-head@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 5D499EA6326; Fri, 5 Jan 2018 02:01:35 +0000 (UTC) (envelope-from eugen@grosbein.net) Received: from hz.grosbein.net (hz.grosbein.net [78.47.246.247]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "hz.grosbein.net", Issuer "hz.grosbein.net" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id DC4E26D44B; Fri, 5 Jan 2018 02:01:33 +0000 (UTC) (envelope-from eugen@grosbein.net) Received: from eg.sd.rdtc.ru (root@eg.sd.rdtc.ru [62.231.161.221] (may be forged)) by hz.grosbein.net (8.15.2/8.15.2) with ESMTPS id w0521IDK033588 (version=TLSv1.2 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Fri, 5 Jan 2018 03:01:19 +0100 (CET) (envelope-from eugen@grosbein.net) X-Envelope-From: eugen@grosbein.net X-Envelope-To: steven@multiplay.co.uk Received: from [10.58.0.4] ([10.58.0.4]) by eg.sd.rdtc.ru (8.15.2/8.15.2) with ESMTPS id w05217c1035327 (version=TLSv1.2 cipher=DHE-RSA-AES128-SHA bits=128 verify=NOT); Fri, 5 Jan 2018 09:01:07 +0700 (+07) (envelope-from eugen@grosbein.net) Subject: Re: svn commit: r327559 - in head: . sys/net To: Steven Hartland , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org References: <201801042005.w04K5liB049411@repo.freebsd.org> <5A4E9397.9000308@grosbein.net> From: Eugene Grosbein Message-ID: <5A4EDC62.50508@grosbein.net> Date: Fri, 5 Jan 2018 09:01:06 +0700 User-Agent: Mozilla/5.0 (Windows NT 6.3; WOW64; rv:38.0) Gecko/20100101 Thunderbird/38.7.2 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=2.2 required=5.0 tests=BAYES_00, LOCAL_FROM, RDNS_NONE autolearn=no autolearn_force=no version=3.4.1 X-Spam-Report: * -2.3 BAYES_00 BODY: Bayes spam probability is 0 to 1% * [score: 0.0000] * 2.6 LOCAL_FROM From my domains * 1.9 RDNS_NONE Delivered to internal network by a host with no rDNS X-Spam-Level: ** X-Spam-Checker-Version: SpamAssassin 3.4.1 (2015-04-28) on hz.grosbein.net X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 05 Jan 2018 02:01:35 -0000 05.01.2018 4:52, Steven Hartland wrote: >> RSS by definition has meaning to received stream. What is "outbound" stream >> in this context, why can the hash calculatiom method change and what exactly >> does it mean "a stream being incorrectly split"? > Yes RSS is indeed a received stream but that is used by lagg for lacp and loadbalance protocols > to decide which port of the lagg to "send" the packet out of. > As the flowid is not known when a new "output" stream is instigated the current code > falls back to manual hash calculation to determine which port to send the initial packet from. > Once a response is received a tx then uses the flowid. > This change of hash calculation method can result in the initial packet being sent > from a different port than the rest of the stream; this is what I meant by "incorrectly split". > > See the following: > https://github.com/freebsd/freebsd/blob/master/sys/net/if_lagg.c#L2066 > https://github.com/freebsd/freebsd/blob/master/sys/net/ieee8023ad_lacp.c#L846 I still do not get what is "output stream" for you. If you are talking on forwarding (routing) transit packets at IP layer, they all have flowid from the beginning and first packet does not differ from others at all. If you are talking on locally originated (not transit) data streem from local TCP socket being sent in response to corresponding incoming TCP segments, then these outgoing packets should have their own fixed flow id by default in case of LACP and thhis flow id should not depend on (possibly ever changing) flow id of incoming TCP segments. If you insist that flow id of outgoing packets does depend on ever changing incoming packet's flow id, then this is the bug that should be fixed and not lagg's defaults. From owner-svn-src-head@freebsd.org Fri Jan 5 02:09:54 2018 Return-Path: Delivered-To: svn-src-head@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 D1BDDEA6A63; Fri, 5 Jan 2018 02:09:54 +0000 (UTC) (envelope-from eugen@grosbein.net) Received: from hz.grosbein.net (hz.grosbein.net [78.47.246.247]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "hz.grosbein.net", Issuer "hz.grosbein.net" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4AB1F6D9C0; Fri, 5 Jan 2018 02:09:53 +0000 (UTC) (envelope-from eugen@grosbein.net) Received: from eg.sd.rdtc.ru (root@eg.sd.rdtc.ru [62.231.161.221] (may be forged)) by hz.grosbein.net (8.15.2/8.15.2) with ESMTPS id w0529kkp033746 (version=TLSv1.2 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Fri, 5 Jan 2018 03:09:46 +0100 (CET) (envelope-from eugen@grosbein.net) X-Envelope-From: eugen@grosbein.net X-Envelope-To: steven@multiplay.co.uk Received: from [10.58.0.4] ([10.58.0.4]) by eg.sd.rdtc.ru (8.15.2/8.15.2) with ESMTPS id w0529gQu037782 (version=TLSv1.2 cipher=DHE-RSA-AES128-SHA bits=128 verify=NOT); Fri, 5 Jan 2018 09:09:42 +0700 (+07) (envelope-from eugen@grosbein.net) Subject: Re: svn commit: r327559 - in head: . sys/net To: Steven Hartland , hiren panchasara References: <201801042005.w04K5liB049411@repo.freebsd.org> <5A4E9397.9000308@grosbein.net> <20180104224214.GD18879@strugglingcoder.info> <63c3c450-aeaf-bdd5-5e16-414146c9bb3a@multiplay.co.uk> Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org From: Eugene Grosbein Message-ID: <5A4EDE65.1010201@grosbein.net> Date: Fri, 5 Jan 2018 09:09:41 +0700 User-Agent: Mozilla/5.0 (Windows NT 6.3; WOW64; rv:38.0) Gecko/20100101 Thunderbird/38.7.2 MIME-Version: 1.0 In-Reply-To: <63c3c450-aeaf-bdd5-5e16-414146c9bb3a@multiplay.co.uk> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=2.2 required=5.0 tests=BAYES_00, LOCAL_FROM, RDNS_NONE autolearn=no autolearn_force=no version=3.4.1 X-Spam-Report: * -2.3 BAYES_00 BODY: Bayes spam probability is 0 to 1% * [score: 0.0000] * 2.6 LOCAL_FROM From my domains * 1.9 RDNS_NONE Delivered to internal network by a host with no rDNS X-Spam-Level: ** X-Spam-Checker-Version: SpamAssassin 3.4.1 (2015-04-28) on hz.grosbein.net X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 05 Jan 2018 02:09:54 -0000 05.01.2018 6:37, Steven Hartland wrote: > Our TCP stack seems fragile during setup to out of order packets > which this multipath behavior causes, we've seen this on our loadbalancers > which is what triggered the investigation. The concrete result is many aborted TCP connections, > over 300k ~2% on the machine I'm looking at. This is another problem that needs to be fixed in general and not hidden under the carpet. Meantime, practical problems you see can be solved locally with any settings you like. > I hope there's some improvements that can be made, for example if we can determine > the stream was instigated remotely then flowid would always be valid hence we can use it assuming it > matches the requested spec or if we can make it clear to the user that laggproto is not the one they requested, I'm open to ideas? We just need to clear flow id from incoming TCP segments and always generate new flow id for responses keeping old flow id for IP forwarding case. Please back out your change to not degrade IP forwarding performance. From owner-svn-src-head@freebsd.org Fri Jan 5 02:55:24 2018 Return-Path: Delivered-To: svn-src-head@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 41C84EA9D10; Fri, 5 Jan 2018 02:55:24 +0000 (UTC) (envelope-from adrian.chadd@gmail.com) Received: from mail-wm0-x22c.google.com (mail-wm0-x22c.google.com [IPv6:2a00:1450:400c:c09::22c]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id C81826FDB6; Fri, 5 Jan 2018 02:55:23 +0000 (UTC) (envelope-from adrian.chadd@gmail.com) Received: by mail-wm0-x22c.google.com with SMTP id b76so95488wmg.1; Thu, 04 Jan 2018 18:55:23 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=NeOBSvadnbFzqsm4VZz2k4qtsxgG9LwdusuVhtqb7u8=; b=JhnmHjfo42iihOM5vIXU22C8r2OfpAWmQ3tzXvltlp3DCXok3hOeSkL6GfCCUPMtAt 2XCKzQIsii177xdDJ2Nv4l5CMr4sA88b4QOrQOx83/1ISpW9qXVx+UQyQxUTyW4w0XlU mZAGiGIVIGZ7+b6vFwtq59sjbwJ8X4M5GjXns+Oca+EhnXzwIGfOrKpiVW00LsgXgJRM xg7itzBKaSyxPcLSQPngZ+6plTrfBo0xLo8vgQFaLvlmFjlIW7AsZ5NgeF+Bj19Wo0KA 5GxzkH0KWuEMFBHqQ76KupMQTxFweGOCJ5z0UbIa5ZZsqWL0l4qLJQzBOJ6TZ2tx0bBh qVXw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=NeOBSvadnbFzqsm4VZz2k4qtsxgG9LwdusuVhtqb7u8=; b=uf+E6ew7zFjHatlJI+Lf2TLTgVn+SkHzW2aRqt4PUoXoByQr+s2j5XpmuvOUxmVf5g blOa5a8YmN7hig9umtM//x8fv4K6as86SZIJCek//P2F6tQ9nA6MGK8OFlTydjMq8rhs fCjAWD+95cHFnWvu6ZpdWHf86bQ4AS7+BYqB/vAVOE3nnM+DtjctO9VcO0nkZDyWVcpG 0flWjHauXX/gvS0os4KksF0XyEpI8nVYovkmuf6bVN6j178fl1LmbDzbt2yubEWpJraM dRO8DLHIACXl2PzBqmJiX+iODcPnjguB+Fw30Ih+b+dCsIWpo6feB3yHQ/B6RCIiET2l 43pA== X-Gm-Message-State: AKGB3mIcy5baSmN5rCVa89eADO65qrgxmAk2v2/8DP6EUYaosc+/sWce Abv47zdPDprJrlyzQeWq6X62zodeTAMMXE1vaJ7TWg== X-Google-Smtp-Source: ACJfBovls25K4zAi7HLVsm/oPyqRygUh8i5CpaO5WHyVQIOau5WIuW4HnlHRQ4FtPzeXgkRUghcvjB2Voq72qtzfcIE= X-Received: by 10.28.55.74 with SMTP id e71mr1102673wma.50.1515120922254; Thu, 04 Jan 2018 18:55:22 -0800 (PST) MIME-Version: 1.0 Received: by 10.28.213.11 with HTTP; Thu, 4 Jan 2018 18:55:20 -0800 (PST) In-Reply-To: <63c3c450-aeaf-bdd5-5e16-414146c9bb3a@multiplay.co.uk> References: <201801042005.w04K5liB049411@repo.freebsd.org> <5A4E9397.9000308@grosbein.net> <20180104224214.GD18879@strugglingcoder.info> <63c3c450-aeaf-bdd5-5e16-414146c9bb3a@multiplay.co.uk> From: Adrian Chadd Date: Thu, 4 Jan 2018 18:55:20 -0800 Message-ID: Subject: Re: svn commit: r327559 - in head: . sys/net To: Steven Hartland Cc: hiren panchasara , Eugene Grosbein , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Content-Type: text/plain; charset="UTF-8" X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 05 Jan 2018 02:55:24 -0000 does it also happen when you actually enable RSS in the kernel? Since like I went through a whole lot of pain to assign a flowid at connection setup time. -a On 4 January 2018 at 15:37, Steven Hartland wrote: > > > On 04/01/2018 22:42, hiren panchasara wrote: > > On 01/04/18 at 09:52P, Steven Hartland wrote: > > On 04/01/2018 20:50, Eugene Grosbein wrote: > > 05.01.2018 3:05, Steven Hartland wrote: > > Author: smh > Date: Thu Jan 4 20:05:47 2018 > New Revision: 327559 > URL: https://svnweb.freebsd.org/changeset/base/327559 > > Log: > Disabled the use of flowid for lagg by default > > Disabled the use of RSS hash from the network card aka flowid for > lagg(4) interfaces by default as it's currently incompatible with > the lacp and loadbalance protocols. > > The incompatibility is due to the fact that the flowid isn't know > for the first packet of a new outbound stream which can result in > the hash calculation method changing and hence a stream being > incorrectly split across multiple interfaces during normal > operation. > > This can be re-enabled by setting the following in loader.conf: > net.link.lagg.default_use_flowid="1" > > Discussed with: kmacy > Sponsored by: Multiplay > > RSS by definition has meaning to received stream. What is "outbound" stream > in this context, why can the hash calculatiom method change and what exactly > does it mean "a stream being incorrectly split"? > > Yes RSS is indeed a received stream but that is used by lagg for lacp > and loadbalance protocols to decide which port of the lagg to "send" the > packet out of. As the flowid is not known when a new "output" stream is > instigated the current code falls back to manual hash calculation to > determine which port to send the initial packet from. Once a response is > received a tx then uses the flowid. This change of hash calculation > method can result in the initial packet being sent from a different port > than the rest of the stream; this is what I meant by "incorrectly split". > > For my understanding, is this just an issue for the first packet when we > originate the flow? Once we have a response and if flowid is there, we'd > use it, right? OR am I missing something? > > Initially yes, but that can cause a whole cascading set of problems. If the > source machine sends from two different ports then flow can traverse across > the network using different paths and hence arrive at the destination on > different ports too, causing the corresponding issue on the other side. > > And with this change, we'd always go and do manual calculation even when > we have a valid flowid (i.e. we didn't initiate a connection)? > > Correct, but there's potentially no easy way to correctly determine what the > flowid and hence hash should be in this case, likely impossible if the lagg > consists of different interface types. > > In addition if the hardware hash doesn't match the requested one as per > laggproto then additional issues could also be triggered. > > Our TCP stack seems fragile during setup to out of order packets which this > multipath behavior causes, we've seen this on our loadbalancers which is > what triggered the investigation. The concrete result is many aborted TCP > connections, over 300k ~2% on the machine I'm looking at. > > I hope there's some improvements that can be made, for example if we can > determine the stream was instigated remotely then flowid would always be > valid hence we can use it assuming it matches the requested spec or if we > can make it clear to the user that laggproto is not the one they requested, > I'm open to ideas? > > Regards > Steve > From owner-svn-src-head@freebsd.org Fri Jan 5 05:02:11 2018 Return-Path: Delivered-To: svn-src-head@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 4EC09EB19CC; Fri, 5 Jan 2018 05:02:11 +0000 (UTC) (envelope-from imp@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 1926F756D3; Fri, 5 Jan 2018 05:02:11 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w0552Aa8080615; Fri, 5 Jan 2018 05:02:10 GMT (envelope-from imp@FreeBSD.org) Received: (from imp@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w0552AFL080614; Fri, 5 Jan 2018 05:02:10 GMT (envelope-from imp@FreeBSD.org) Message-Id: <201801050502.w0552AFL080614@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: imp set sender to imp@FreeBSD.org using -f From: Warner Losh Date: Fri, 5 Jan 2018 05:02:10 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r327569 - head/usr.sbin/devmatch X-SVN-Group: head X-SVN-Commit-Author: imp X-SVN-Commit-Paths: head/usr.sbin/devmatch X-SVN-Commit-Revision: 327569 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 05 Jan 2018 05:02:11 -0000 Author: imp Date: Fri Jan 5 05:02:09 2018 New Revision: 327569 URL: https://svnweb.freebsd.org/changeset/base/327569 Log: Fix cut and paste error from devinfo.8 origin of this file Noticed by: kevans@ Modified: head/usr.sbin/devmatch/devmatch.8 Modified: head/usr.sbin/devmatch/devmatch.8 ============================================================================== --- head/usr.sbin/devmatch/devmatch.8 Fri Jan 5 02:15:05 2018 (r327568) +++ head/usr.sbin/devmatch/devmatch.8 Fri Jan 5 05:02:09 2018 (r327569) @@ -29,7 +29,7 @@ .Dt DEVMATCH 8 .Os .Sh NAME -.Nm devinfo +.Nm devmatch .Nd print information about unattached devices .Sh SYNOPSIS .Nm From owner-svn-src-head@freebsd.org Fri Jan 5 05:34:16 2018 Return-Path: Delivered-To: svn-src-head@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 5906BEB37EC; Fri, 5 Jan 2018 05:34:16 +0000 (UTC) (envelope-from imp@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 1FD78769F8; Fri, 5 Jan 2018 05:34:16 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w055YF4n093404; Fri, 5 Jan 2018 05:34:15 GMT (envelope-from imp@FreeBSD.org) Received: (from imp@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w055YFQx093403; Fri, 5 Jan 2018 05:34:15 GMT (envelope-from imp@FreeBSD.org) Message-Id: <201801050534.w055YFQx093403@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: imp set sender to imp@FreeBSD.org using -f From: Warner Losh Date: Fri, 5 Jan 2018 05:34:15 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r327570 - head/sbin/newfs_msdos X-SVN-Group: head X-SVN-Commit-Author: imp X-SVN-Commit-Paths: head/sbin/newfs_msdos X-SVN-Commit-Revision: 327570 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 05 Jan 2018 05:34:16 -0000 Author: imp Date: Fri Jan 5 05:34:14 2018 New Revision: 327570 URL: https://svnweb.freebsd.org/changeset/base/327570 Log: Only call close if fd and fd1 are not -1. CID: 1384018, 1384017 Modified: head/sbin/newfs_msdos/mkfs_msdos.c Modified: head/sbin/newfs_msdos/mkfs_msdos.c ============================================================================== --- head/sbin/newfs_msdos/mkfs_msdos.c Fri Jan 5 05:02:09 2018 (r327569) +++ head/sbin/newfs_msdos/mkfs_msdos.c Fri Jan 5 05:34:14 2018 (r327570) @@ -717,8 +717,10 @@ mkfs_msdos(const char *fname, const char *dtype, const rv = 0; done: free(img); - close(fd); - close(fd1); + if (fd != -1) + close(fd); + if (fd1 != -1) + close(fd1); return rv; } From owner-svn-src-head@freebsd.org Fri Jan 5 05:34:25 2018 Return-Path: Delivered-To: svn-src-head@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 487D2EB3838; Fri, 5 Jan 2018 05:34:25 +0000 (UTC) (envelope-from imp@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 CAFDB76A0F; Fri, 5 Jan 2018 05:34:21 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w055YKQa093456; Fri, 5 Jan 2018 05:34:20 GMT (envelope-from imp@FreeBSD.org) Received: (from imp@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w055YKEo093455; Fri, 5 Jan 2018 05:34:20 GMT (envelope-from imp@FreeBSD.org) Message-Id: <201801050534.w055YKEo093455@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: imp set sender to imp@FreeBSD.org using -f From: Warner Losh Date: Fri, 5 Jan 2018 05:34:20 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r327571 - head/usr.sbin/fwcontrol X-SVN-Group: head X-SVN-Commit-Author: imp X-SVN-Commit-Paths: head/usr.sbin/fwcontrol X-SVN-Commit-Revision: 327571 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 05 Jan 2018 05:34:25 -0000 Author: imp Date: Fri Jan 5 05:34:20 2018 New Revision: 327571 URL: https://svnweb.freebsd.org/changeset/base/327571 Log: Don't close fd twice. This line should have been deleted in r327279. CID: 1384015 Modified: head/usr.sbin/fwcontrol/fwdv.c Modified: head/usr.sbin/fwcontrol/fwdv.c ============================================================================== --- head/usr.sbin/fwcontrol/fwdv.c Fri Jan 5 05:34:14 2018 (r327570) +++ head/usr.sbin/fwcontrol/fwdv.c Fri Jan 5 05:34:20 2018 (r327571) @@ -409,7 +409,6 @@ again: err(1, "write failed"); } } - close(fd); fprintf(stderr, "\n"); send_end: gettimeofday(&end, NULL); From owner-svn-src-head@freebsd.org Fri Jan 5 07:09:10 2018 Return-Path: Delivered-To: svn-src-head@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 CB7DFEB8579; Fri, 5 Jan 2018 07:09:10 +0000 (UTC) (envelope-from imp@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 95C6B79DDD; Fri, 5 Jan 2018 07:09:10 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w05799m2031103; Fri, 5 Jan 2018 07:09:09 GMT (envelope-from imp@FreeBSD.org) Received: (from imp@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w05799A7031102; Fri, 5 Jan 2018 07:09:09 GMT (envelope-from imp@FreeBSD.org) Message-Id: <201801050709.w05799A7031102@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: imp set sender to imp@FreeBSD.org using -f From: Warner Losh Date: Fri, 5 Jan 2018 07:09:09 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r327572 - head/usr.sbin/efibootmgr X-SVN-Group: head X-SVN-Commit-Author: imp X-SVN-Commit-Paths: head/usr.sbin/efibootmgr X-SVN-Commit-Revision: 327572 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 05 Jan 2018 07:09:10 -0000 Author: imp Date: Fri Jan 5 07:09:09 2018 New Revision: 327572 URL: https://svnweb.freebsd.org/changeset/base/327572 Log: Ensure that we have a description string. When unspecified, default to "". Sponsored by: Netflix Modified: head/usr.sbin/efibootmgr/efibootmgr.c Modified: head/usr.sbin/efibootmgr/efibootmgr.c ============================================================================== --- head/usr.sbin/efibootmgr/efibootmgr.c Fri Jan 5 05:34:20 2018 (r327571) +++ head/usr.sbin/efibootmgr/efibootmgr.c Fri Jan 5 07:09:09 2018 (r327572) @@ -591,12 +591,7 @@ create_loadopt(uint8_t *buf, size_t bufmax, uint32_t a /* * Compute the length to make sure the passed in buffer is long enough. */ - if (description) - utf8_to_ucs2(description, &bbuf, &desc_len); - else { - desc_len = 0; - bbuf = NULL; - } + utf8_to_ucs2(description, &bbuf, &desc_len); len = sizeof(uint32_t) + sizeof(uint16_t) + desc_len + dp_size + optional_data_size; if (len > bufmax) { free(bbuf); @@ -636,6 +631,8 @@ make_boot_var(const char *label, const char *loader, c char *bootvar = NULL; int ret; + assert(label != NULL); + bootvar = make_next_boot_var_name(); if (bootvar == NULL) err(1, "bootvar creation"); @@ -755,7 +752,7 @@ print_loadopt_str(uint8_t *data, size_t datalen) } static char * -get_descr(uint8_t* data) +get_descr(uint8_t *data) { uint8_t *pos = data; efi_char *desc; @@ -861,8 +858,8 @@ main(int argc, char *argv[]) /* * side effect, adds to boot order, but not yet active. */ - make_boot_var(opts.label, opts.loader, opts.kernel, opts.env, - opts.dry_run); + make_boot_var(opts.label ? opts.label : "", + opts.loader, opts.kernel, opts.env, opts.dry_run); else if (opts.set_active || opts.set_inactive ) handle_activity(opts.bootnum, opts.set_active); else if (opts.order != NULL) From owner-svn-src-head@freebsd.org Fri Jan 5 07:09:21 2018 Return-Path: Delivered-To: svn-src-head@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 91E94EB85BD; Fri, 5 Jan 2018 07:09:21 +0000 (UTC) (envelope-from imp@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 EA19779EA9; Fri, 5 Jan 2018 07:09:20 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w0579JeL031157; Fri, 5 Jan 2018 07:09:19 GMT (envelope-from imp@FreeBSD.org) Received: (from imp@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w0579JCn031156; Fri, 5 Jan 2018 07:09:19 GMT (envelope-from imp@FreeBSD.org) Message-Id: <201801050709.w0579JCn031156@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: imp set sender to imp@FreeBSD.org using -f From: Warner Losh Date: Fri, 5 Jan 2018 07:09:19 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r327573 - head/usr.sbin/efibootmgr X-SVN-Group: head X-SVN-Commit-Author: imp X-SVN-Commit-Paths: head/usr.sbin/efibootmgr X-SVN-Commit-Revision: 327573 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 05 Jan 2018 07:09:22 -0000 Author: imp Date: Fri Jan 5 07:09:19 2018 New Revision: 327573 URL: https://svnweb.freebsd.org/changeset/base/327573 Log: Free options before setting them. This will prevent us from leaking memory when we have multiple copies of the same option from being specified. Sponsored by: Netflix Modified: head/usr.sbin/efibootmgr/efibootmgr.c Modified: head/usr.sbin/efibootmgr/efibootmgr.c ============================================================================== --- head/usr.sbin/efibootmgr/efibootmgr.c Fri Jan 5 07:09:09 2018 (r327572) +++ head/usr.sbin/efibootmgr/efibootmgr.c Fri Jan 5 07:09:19 2018 (r327573) @@ -217,6 +217,7 @@ parse_args(int argc, char *argv[]) opts.dry_run = true; break; case 'e': + free(opts.env); opts.env = strdup(optarg); break; case 'h': @@ -224,12 +225,15 @@ parse_args(int argc, char *argv[]) errx(1, "%s", USAGE); break; case 'k': + free(opts.kernel); opts.kernel = strdup(optarg); break; case 'L': + free(opts.label); opts.label = strdup(optarg); break; case 'l': + free(opts.loader); opts.loader = strdup(optarg); opts.loader = mangle_loader(opts.loader); break; @@ -244,6 +248,7 @@ parse_args(int argc, char *argv[]) opts.once = true; break; case 'o': + free(opts.order); opts.order = strdup(optarg); break; case 'T': From owner-svn-src-head@freebsd.org Fri Jan 5 07:09:26 2018 Return-Path: Delivered-To: svn-src-head@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 6A751EB85F7; Fri, 5 Jan 2018 07:09:26 +0000 (UTC) (envelope-from imp@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 325AC79F30; Fri, 5 Jan 2018 07:09:26 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w0579PnX031212; Fri, 5 Jan 2018 07:09:25 GMT (envelope-from imp@FreeBSD.org) Received: (from imp@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w0579Pu2031210; Fri, 5 Jan 2018 07:09:25 GMT (envelope-from imp@FreeBSD.org) Message-Id: <201801050709.w0579Pu2031210@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: imp set sender to imp@FreeBSD.org using -f From: Warner Losh Date: Fri, 5 Jan 2018 07:09:25 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r327574 - in head: lib/libefivar usr.sbin/efidp X-SVN-Group: head X-SVN-Commit-Author: imp X-SVN-Commit-Paths: in head: lib/libefivar usr.sbin/efidp X-SVN-Commit-Revision: 327574 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 05 Jan 2018 07:09:26 -0000 Author: imp Date: Fri Jan 5 07:09:24 2018 New Revision: 327574 URL: https://svnweb.freebsd.org/changeset/base/327574 Log: Set dp to NULL when we free it, and tree a NULL dp as an error condition. This should prevent a double free. In addition, prevent a leak by freeing dp each loop and when we're done. CID: 1383577 Sponsored by: Netflix Modified: head/lib/libefivar/efivar-dp-xlate.c head/usr.sbin/efidp/efidp.c Modified: head/lib/libefivar/efivar-dp-xlate.c ============================================================================== --- head/lib/libefivar/efivar-dp-xlate.c Fri Jan 5 07:09:19 2018 (r327573) +++ head/lib/libefivar/efivar-dp-xlate.c Fri Jan 5 07:09:24 2018 (r327574) @@ -663,6 +663,7 @@ errout: free(rp); if (rv != 0) { free(*dp); + *dp = NULL; } return (rv); } Modified: head/usr.sbin/efidp/efidp.c ============================================================================== --- head/usr.sbin/efidp/efidp.c Fri Jan 5 07:09:19 2018 (r327573) +++ head/usr.sbin/efidp/efidp.c Fri Jan 5 07:09:24 2018 (r327574) @@ -143,10 +143,13 @@ unix_to_efi(void) char *walker; int rv; + dp = NULL; while (fgets(buffer, sizeof(buffer), stdin)) { walker= trim(buffer); + free(dp); + dp = NULL; rv = efivar_unix_path_to_device_path(walker, &dp); - if (rv != 0) { + if (rv != 0 || dp == NULL) { errno = rv; warn("Can't convert '%s' to efi", walker); continue; @@ -158,6 +161,7 @@ unix_to_efi(void) } printf("%s\n", efi); } + free(dp); } static void From owner-svn-src-head@freebsd.org Fri Jan 5 07:09:32 2018 Return-Path: Delivered-To: svn-src-head@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 3A479EB8646; Fri, 5 Jan 2018 07:09:32 +0000 (UTC) (envelope-from imp@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 F238E79FCB; Fri, 5 Jan 2018 07:09:30 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w0579TMB031267; Fri, 5 Jan 2018 07:09:29 GMT (envelope-from imp@FreeBSD.org) Received: (from imp@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w0579TYD031266; Fri, 5 Jan 2018 07:09:29 GMT (envelope-from imp@FreeBSD.org) Message-Id: <201801050709.w0579TYD031266@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: imp set sender to imp@FreeBSD.org using -f From: Warner Losh Date: Fri, 5 Jan 2018 07:09:29 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r327575 - head/lib/libefivar X-SVN-Group: head X-SVN-Commit-Author: imp X-SVN-Commit-Paths: head/lib/libefivar X-SVN-Commit-Revision: 327575 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 05 Jan 2018 07:09:32 -0000 Author: imp Date: Fri Jan 5 07:09:29 2018 New Revision: 327575 URL: https://svnweb.freebsd.org/changeset/base/327575 Log: Need to convert '/' back to '\' when creating a path. Ideally, this would be filesystem type dependent, but that's difficult to accomplish and it's unclear how the UEFI firmware will cope. Be conservative and make boot loaders cope instead. Sponsored by: Netflix Modified: head/lib/libefivar/efivar-dp-xlate.c Modified: head/lib/libefivar/efivar-dp-xlate.c ============================================================================== --- head/lib/libefivar/efivar-dp-xlate.c Fri Jan 5 07:09:24 2018 (r327574) +++ head/lib/libefivar/efivar-dp-xlate.c Fri Jan 5 07:09:29 2018 (r327575) @@ -527,12 +527,17 @@ find_geom_efimedia(struct gmesh *mesh, const char *dev static int build_dp(const char *efimedia, const char *relpath, efidp *dp) { - char *fp, *dptxt = NULL; + char *fp, *dptxt = NULL, *cp, *rp; int rv = 0; efidp out = NULL; size_t len; - fp = path_to_file_dp(relpath); + rp = strdup(relpath); + for (cp = rp; *cp; cp++) + if (*cp == '/') + *cp = '\\'; + fp = path_to_file_dp(rp); + free(rp); if (fp == NULL) { rv = ENOMEM; goto errout; From owner-svn-src-head@freebsd.org Fri Jan 5 07:09:41 2018 Return-Path: Delivered-To: svn-src-head@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 8D286EB86A8; Fri, 5 Jan 2018 07:09:41 +0000 (UTC) (envelope-from imp@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 5DC657A11E; Fri, 5 Jan 2018 07:09:41 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w0579e4h031324; Fri, 5 Jan 2018 07:09:40 GMT (envelope-from imp@FreeBSD.org) Received: (from imp@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w0579eGa031321; Fri, 5 Jan 2018 07:09:40 GMT (envelope-from imp@FreeBSD.org) Message-Id: <201801050709.w0579eGa031321@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: imp set sender to imp@FreeBSD.org using -f From: Warner Losh Date: Fri, 5 Jan 2018 07:09:40 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r327576 - head/usr.sbin/dumpcis X-SVN-Group: head X-SVN-Commit-Author: imp X-SVN-Commit-Paths: head/usr.sbin/dumpcis X-SVN-Commit-Revision: 327576 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 05 Jan 2018 07:09:41 -0000 Author: imp Date: Fri Jan 5 07:09:40 2018 New Revision: 327576 URL: https://svnweb.freebsd.org/changeset/base/327576 Log: Add a number of sanity checks to the data that we're handling from the CIS. Coverity has tagged it as tainted. While this data is more trusted than your average data, we still need to do some basic validation on it. Check ioctl return value to ensure we switch memory targets between common and attribute as well as the lseek. CID: 1210464, 1006640, 1006868, 1007292, 1009091, 1009822, 1009824 Modified: head/usr.sbin/dumpcis/printcis.c head/usr.sbin/dumpcis/readcis.c head/usr.sbin/dumpcis/readcis.h Modified: head/usr.sbin/dumpcis/printcis.c ============================================================================== --- head/usr.sbin/dumpcis/printcis.c Fri Jan 5 07:09:29 2018 (r327575) +++ head/usr.sbin/dumpcis/printcis.c Fri Jan 5 07:09:40 2018 (r327576) @@ -26,10 +26,8 @@ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -#ifndef lint -static const char rcsid[] = - "$FreeBSD$"; -#endif /* not lint */ +#include +__FBSDID("$FreeBSD$"); /* * Code cleanup, bug-fix and extension @@ -183,8 +181,7 @@ static void dump_config_map(struct tuple *tp) { u_char *p = tp->data, x; - int rlen, mlen = 0; - int i; + unsigned int rlen, mlen = 0, i; rlen = (p[0] & 3) + 1; if (tp->code == CIS_CONF_MAP) Modified: head/usr.sbin/dumpcis/readcis.c ============================================================================== --- head/usr.sbin/dumpcis/readcis.c Fri Jan 5 07:09:29 2018 (r327575) +++ head/usr.sbin/dumpcis/readcis.c Fri Jan 5 07:09:40 2018 (r327576) @@ -26,16 +26,15 @@ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -#ifndef lint -static const char rcsid[] = - "$FreeBSD$"; -#endif /* not lint */ +#include +__FBSDID("$FreeBSD$"); /* * Code cleanup, bug-fix and extension * by Tatsumi Hosokawa */ +#include #include #include #include @@ -52,42 +51,44 @@ static struct tuple_list *read_tuples(int); static struct tuple *find_tuple_in_list(struct tuple_list *, unsigned char); static struct tuple_info *get_tuple_info(unsigned char); +#define LENGTH_ANY 255 + static struct tuple_info tuple_info[] = { {"Null tuple", CIS_NULL, 0}, - {"Common memory descriptor", CIS_MEM_COMMON, 255}, - {"Long link to next chain for CardBus", CIS_LONGLINK_CB, 255}, - {"Indirect access", CIS_INDIRECT, 255}, - {"Configuration map for CardBus", CIS_CONF_MAP_CB, 255}, - {"Configuration entry for CardBus", CIS_CONFIG_CB, 255}, - {"Long link to next chain for MFC", CIS_LONGLINK_MFC, 255}, + {"Common memory descriptor", CIS_MEM_COMMON, LENGTH_ANY}, + {"Long link to next chain for CardBus", CIS_LONGLINK_CB, LENGTH_ANY}, + {"Indirect access", CIS_INDIRECT, LENGTH_ANY}, + {"Configuration map for CardBus", CIS_CONF_MAP_CB, LENGTH_ANY}, + {"Configuration entry for CardBus", CIS_CONFIG_CB, LENGTH_ANY}, + {"Long link to next chain for MFC", CIS_LONGLINK_MFC, LENGTH_ANY}, {"Base address register for CardBus", CIS_BAR, 6}, {"Checksum", CIS_CHECKSUM, 5}, {"Long link to attribute memory", CIS_LONGLINK_A, 4}, {"Long link to common memory", CIS_LONGLINK_C, 4}, {"Link target", CIS_LINKTARGET, 3}, {"No link", CIS_NOLINK, 0}, - {"Version 1 info", CIS_INFO_V1, 255}, - {"Alternate language string", CIS_ALTSTR, 255}, - {"Attribute memory descriptor", CIS_MEM_ATTR, 255}, - {"JEDEC descr for common memory", CIS_JEDEC_C, 255}, - {"JEDEC descr for attribute memory", CIS_JEDEC_A, 255}, - {"Configuration map", CIS_CONF_MAP, 255}, - {"Configuration entry", CIS_CONFIG, 255}, - {"Other conditions for common memory", CIS_DEVICE_OC, 255}, - {"Other conditions for attribute memory", CIS_DEVICE_OA, 255}, - {"Geometry info for common memory", CIS_DEVICEGEO, 255}, - {"Geometry info for attribute memory", CIS_DEVICEGEO_A, 255}, + {"Version 1 info", CIS_INFO_V1, LENGTH_ANY}, + {"Alternate language string", CIS_ALTSTR, LENGTH_ANY}, + {"Attribute memory descriptor", CIS_MEM_ATTR, LENGTH_ANY}, + {"JEDEC descr for common memory", CIS_JEDEC_C, LENGTH_ANY}, + {"JEDEC descr for attribute memory", CIS_JEDEC_A, LENGTH_ANY}, + {"Configuration map", CIS_CONF_MAP, LENGTH_ANY}, + {"Configuration entry", CIS_CONFIG, LENGTH_ANY}, + {"Other conditions for common memory", CIS_DEVICE_OC, LENGTH_ANY}, + {"Other conditions for attribute memory", CIS_DEVICE_OA, LENGTH_ANY}, + {"Geometry info for common memory", CIS_DEVICEGEO, LENGTH_ANY}, + {"Geometry info for attribute memory", CIS_DEVICEGEO_A, LENGTH_ANY}, {"Manufacturer ID", CIS_MANUF_ID, 4}, {"Functional ID", CIS_FUNC_ID, 2}, - {"Functional EXT", CIS_FUNC_EXT, 255}, + {"Functional EXT", CIS_FUNC_EXT, LENGTH_ANY}, {"Software interleave", CIS_SW_INTERLV, 2}, - {"Version 2 Info", CIS_VERS_2, 255}, - {"Data format", CIS_FORMAT, 255}, + {"Version 2 Info", CIS_VERS_2, LENGTH_ANY}, + {"Data format", CIS_FORMAT, LENGTH_ANY}, {"Geometry", CIS_GEOMETRY, 4}, {"Byte order", CIS_BYTEORDER, 2}, {"Card init date", CIS_DATE, 4}, {"Battery replacement", CIS_BATTERY, 4}, - {"Organization", CIS_ORG, 255}, + {"Organization", CIS_ORG, LENGTH_ANY}, {"Terminator", CIS_END, 0}, {0, 0, 0} }; @@ -99,10 +100,9 @@ xmalloc(int sz) sz = (sz + 7) & ~7; p = malloc(sz); - if (p) - bzero(p, sz); - else + if (p == NULL) errx(1, "malloc"); + bzero(p, sz); return (p); } @@ -205,39 +205,40 @@ read_tuples(int fd) do { flag = MDF_ATTR; tp = find_tuple_in_list(last_tl, CIS_LONGLINK_A); - if (tp == 0) { + if (tp == NULL) { flag = 0; tp = find_tuple_in_list(last_tl, CIS_LONGLINK_C); } - if (tp && tp->length == 4) { - offs = tpl32(tp->data); + + if (tp == NULL || tp->length != 4) + break; + + offs = (uint32_t)tpl32(tp->data); #ifdef DEBUG - printf("Checking long link at %zd (%s memory)\n", - offs, flag ? "Attribute" : "Common"); + printf("Checking long link at %zd (%s memory)\n", + offs, flag ? "Attribute" : "Common"); #endif - /* If a link was found, read the tuple list from it. */ - if (ck_linktarget(fd, offs, flag)) { - tl = read_one_tuplelist(fd, flag, offs); - last_tl->next = tl; - last_tl = tl; - } - } else - tl = 0; + /* + * If a link was found, it looks sane read the tuple list from it. + */ + if (offs > 0 && offs < 32 * 1024 && ck_linktarget(fd, offs, flag)) { + tl = read_one_tuplelist(fd, flag, offs); + last_tl->next = tl; + last_tl = tl; + } } while (tl); /* - * If the primary list had no NOLINK tuple, and no LINKTARGET, - * then try to read a tuple list at common memory (offset 0). + * If the primary list had no NOLINK tuple, and no LINKTARGET, then try + * to read a tuple list at common memory (offset 0). */ if (find_tuple_in_list(tlist, CIS_NOLINK) == 0 && find_tuple_in_list(tlist, CIS_LINKTARGET) == 0 && ck_linktarget(fd, (off_t) 0, 0)) { - offs = 0; #ifdef DEBUG - printf("Reading long link at %zd (%s memory)\n", - offs, flag ? "Attribute" : "Common"); + printf("Reading long link at 0 (Common memory)\n"); #endif - tlist->next = read_one_tuplelist(fd, 0, offs); + tlist->next = read_one_tuplelist(fd, 0, 0); } return (tlist); } @@ -261,13 +262,15 @@ read_one_tuplelist(int fd, int flags, off_t offs) tl = xmalloc(sizeof(*tl)); tl->offs = offs; tl->flags = flags & MDF_ATTR; - ioctl(fd, PIOCRWFLAG, &flags); - lseek(fd, offs, SEEK_SET); + if (ioctl(fd, PIOCRWFLAG, &flags) < 0) + err(1, "Setting flag to rad %s memory failed", + flags ? "attribute" : "common"); + if (lseek(fd, offs, SEEK_SET) < 0) + err(1, "Unable to seek to memory offset %ju", + (uintmax_t)offs); do { - if (read(fd, &code, 1) != 1) { - warn("CIS code read"); - break; - } + if (read(fd, &code, 1) != 1) + errx(1, "CIS code read"); total++; if (code == CIS_NULL) continue; @@ -276,42 +279,50 @@ read_one_tuplelist(int fd, int flags, off_t offs) if (code == CIS_END) length = 0; else { - if (read(fd, &length, 1) != 1) { - warn("CIS len read"); - break; - } + if (read(fd, &length, 1) != 1) + errx(1, "CIS len read"); total++; } - tp->length = length; #ifdef DEBUG printf("Tuple code = 0x%x, len = %d\n", code, length); #endif + + /* + * A length of 255 is invalid, all others are valid. Treat a + * length of 255 as the end of the list. Some cards don't have a + * CIS_END at the end. These work on other systems because the + * end of the CIS eventually sees an area that's not decoded and + * read back as 0xff. + */ if (length == 0xFF) { - length = tp->length = 0; + length = 0; code = CIS_END; } - if (length != 0) { - total += length; - tp->data = xmalloc(length); - if (read(fd, tp->data, length) != length) { - warn("CIS read"); - break; - } - } + assert(length < 0xff); /* * Check the tuple, and ignore it if it isn't in the table * or the length is illegal. */ tinfo = get_tuple_info(code); - if (tinfo != NULL && (tinfo->length != 255 && tinfo->length > length)) { + if (tinfo == NULL || (tinfo->length != LENGTH_ANY && tinfo->length > length)) { printf("code %s (%d) ignored\n", tuple_name(code), code); - tp->code = CIS_NULL; + continue; } - if (tl->tuples == NULL) - tl->tuples = tp; - else + tp->length = length; + if (length != 0) { + total += length; + tp->data = xmalloc(length); + if (read(fd, tp->data, length) != length) + errx(1, "Can't read CIS data"); + } + + if (last_tp != NULL) last_tp->next = tp; + if (tl->tuples == NULL) { + tl->tuples = tp; + tp->next = NULL; + } last_tp = tp; } while (code != CIS_END && total < 1024); return (tl); @@ -325,8 +336,12 @@ ck_linktarget(int fd, off_t offs, int flag) { char blk[5]; - ioctl(fd, PIOCRWFLAG, &flag); - lseek(fd, offs, SEEK_SET); + if (ioctl(fd, PIOCRWFLAG, &flags) < 0) + err(1, "Setting flag to rad %s memory failed", + flags ? "attribute" : "common"); + if (lseek(fd, offs, SEEK_SET) < 0) + err(1, "Unable to seek to memory offset %ju", + (uintmax_t)offs); if (read(fd, blk, 5) != 5) return (0); if (blk[0] == CIS_LINKTARGET && Modified: head/usr.sbin/dumpcis/readcis.h ============================================================================== --- head/usr.sbin/dumpcis/readcis.h Fri Jan 5 07:09:29 2018 (r327575) +++ head/usr.sbin/dumpcis/readcis.h Fri Jan 5 07:09:40 2018 (r327576) @@ -31,7 +31,7 @@ struct tuple { struct tuple *next; unsigned char code; - int length; + unsigned char length; unsigned char *data; }; From owner-svn-src-head@freebsd.org Fri Jan 5 07:14:40 2018 Return-Path: Delivered-To: svn-src-head@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 77999EB8B5D; Fri, 5 Jan 2018 07:14:40 +0000 (UTC) (envelope-from eadler@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 41C6C7A787; Fri, 5 Jan 2018 07:14:40 +0000 (UTC) (envelope-from eadler@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w057Ed49035402; Fri, 5 Jan 2018 07:14:39 GMT (envelope-from eadler@FreeBSD.org) Received: (from eadler@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w057Edeb035401; Fri, 5 Jan 2018 07:14:39 GMT (envelope-from eadler@FreeBSD.org) Message-Id: <201801050714.w057Edeb035401@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: eadler set sender to eadler@FreeBSD.org using -f From: Eitan Adler Date: Fri, 5 Jan 2018 07:14:39 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r327577 - head/sys/cam/ata X-SVN-Group: head X-SVN-Commit-Author: eadler X-SVN-Commit-Paths: head/sys/cam/ata X-SVN-Commit-Revision: 327577 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 05 Jan 2018 07:14:40 -0000 Author: eadler Date: Fri Jan 5 07:14:39 2018 New Revision: 327577 URL: https://svnweb.freebsd.org/changeset/base/327577 Log: cam/da: QUIRK: Add 4K quirks for WD Red and Black MHDDs PR: 188685 Submitted by: Jeremy Chadwick Reported by: Martin Birgmeier Modified: head/sys/cam/ata/ata_da.c Modified: head/sys/cam/ata/ata_da.c ============================================================================== --- head/sys/cam/ata/ata_da.c Fri Jan 5 07:09:40 2018 (r327576) +++ head/sys/cam/ata/ata_da.c Fri Jan 5 07:14:39 2018 (r327577) @@ -363,7 +363,12 @@ static struct ada_quirk_entry ada_quirk_table[] = }, { /* WDC Caviar Black Advanced Format (4k) drives */ - { T_DIRECT, SIP_MEDIA_FIXED, "*", "WDC WD??????EX*", "*" }, + { T_DIRECT, SIP_MEDIA_FIXED, "*", "WDC WD????AZEX*", "*" }, + /*quirks*/ADA_Q_4K + }, + { + /* WDC Caviar Black Advanced Format (4k) drives */ + { T_DIRECT, SIP_MEDIA_FIXED, "*", "WDC WD????FZEX*", "*" }, /*quirks*/ADA_Q_4K }, { From owner-svn-src-head@freebsd.org Fri Jan 5 07:24:44 2018 Return-Path: Delivered-To: svn-src-head@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 D8628EB935C; Fri, 5 Jan 2018 07:24:44 +0000 (UTC) (envelope-from eadler@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 9FD8A7AE62; Fri, 5 Jan 2018 07:24:44 +0000 (UTC) (envelope-from eadler@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w057OhQ9039712; Fri, 5 Jan 2018 07:24:43 GMT (envelope-from eadler@FreeBSD.org) Received: (from eadler@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w057OhX6039711; Fri, 5 Jan 2018 07:24:43 GMT (envelope-from eadler@FreeBSD.org) Message-Id: <201801050724.w057OhX6039711@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: eadler set sender to eadler@FreeBSD.org using -f From: Eitan Adler Date: Fri, 5 Jan 2018 07:24:43 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r327578 - head/usr.bin/units X-SVN-Group: head X-SVN-Commit-Author: eadler X-SVN-Commit-Paths: head/usr.bin/units X-SVN-Commit-Revision: 327578 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 05 Jan 2018 07:24:44 -0000 Author: eadler Date: Fri Jan 5 07:24:43 2018 New Revision: 327578 URL: https://svnweb.freebsd.org/changeset/base/327578 Log: units(1): add missing ':' for two short arguments PR: 209850 MFC After: 3 days Modified: head/usr.bin/units/units.c Modified: head/usr.bin/units/units.c ============================================================================== --- head/usr.bin/units/units.c Fri Jan 5 07:14:39 2018 (r327577) +++ head/usr.bin/units/units.c Fri Jan 5 07:24:43 2018 (r327578) @@ -763,7 +763,7 @@ main(int argc, char **argv) history_file = NULL; outputformat = numfmt; quit = false; - while ((optchar = getopt_long(argc, argv, "+ehf:oqtvHUV", longopts, NULL)) != -1) { + while ((optchar = getopt_long(argc, argv, "+ehf:o:qtvH:UV", longopts, NULL)) != -1) { switch (optchar) { case 'e': outputformat = "%6e"; From owner-svn-src-head@freebsd.org Fri Jan 5 07:28:50 2018 Return-Path: Delivered-To: svn-src-head@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 0E830EB9613; Fri, 5 Jan 2018 07:28:50 +0000 (UTC) (envelope-from imp@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 CC8007B048; Fri, 5 Jan 2018 07:28:49 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w057SmTZ039889; Fri, 5 Jan 2018 07:28:48 GMT (envelope-from imp@FreeBSD.org) Received: (from imp@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w057SmFe039888; Fri, 5 Jan 2018 07:28:48 GMT (envelope-from imp@FreeBSD.org) Message-Id: <201801050728.w057SmFe039888@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: imp set sender to imp@FreeBSD.org using -f From: Warner Losh Date: Fri, 5 Jan 2018 07:28:48 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r327579 - head/usr.sbin/fdcontrol X-SVN-Group: head X-SVN-Commit-Author: imp X-SVN-Commit-Paths: head/usr.sbin/fdcontrol X-SVN-Commit-Revision: 327579 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 05 Jan 2018 07:28:50 -0000 Author: imp Date: Fri Jan 5 07:28:48 2018 New Revision: 327579 URL: https://svnweb.freebsd.org/changeset/base/327579 Log: Tag 'a' case as one we're intentionally falling through to the 'F' case. CID: 1008176 Modified: head/usr.sbin/fdcontrol/fdcontrol.c Modified: head/usr.sbin/fdcontrol/fdcontrol.c ============================================================================== --- head/usr.sbin/fdcontrol/fdcontrol.c Fri Jan 5 07:24:43 2018 (r327578) +++ head/usr.sbin/fdcontrol/fdcontrol.c Fri Jan 5 07:28:48 2018 (r327579) @@ -82,6 +82,7 @@ main(int argc, char **argv) case 'a': autofmt = 1; + /*FALLTHROUGH*/ case 'F': showfmt = 1; show = 0; From owner-svn-src-head@freebsd.org Fri Jan 5 07:29:00 2018 Return-Path: Delivered-To: svn-src-head@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 57E3DEB966A; Fri, 5 Jan 2018 07:29:00 +0000 (UTC) (envelope-from imp@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 897627B106; Fri, 5 Jan 2018 07:28:59 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w057Sw0j039944; Fri, 5 Jan 2018 07:28:58 GMT (envelope-from imp@FreeBSD.org) Received: (from imp@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w057SwuP039943; Fri, 5 Jan 2018 07:28:58 GMT (envelope-from imp@FreeBSD.org) Message-Id: <201801050728.w057SwuP039943@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: imp set sender to imp@FreeBSD.org using -f From: Warner Losh Date: Fri, 5 Jan 2018 07:28:58 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r327580 - head/usr.sbin/ifmcstat X-SVN-Group: head X-SVN-Commit-Author: imp X-SVN-Commit-Paths: head/usr.sbin/ifmcstat X-SVN-Commit-Revision: 327580 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 05 Jan 2018 07:29:00 -0000 Author: imp Date: Fri Jan 5 07:28:58 2018 New Revision: 327580 URL: https://svnweb.freebsd.org/changeset/base/327580 Log: bits is never null when we call ot. Add an assert to that effect and remove test for NULL. CID: 270774 Modified: head/usr.sbin/ifmcstat/printb.c Modified: head/usr.sbin/ifmcstat/printb.c ============================================================================== --- head/usr.sbin/ifmcstat/printb.c Fri Jan 5 07:28:48 2018 (r327579) +++ head/usr.sbin/ifmcstat/printb.c Fri Jan 5 07:28:58 2018 (r327580) @@ -32,6 +32,7 @@ #include __FBSDID("$FreeBSD$"); +#include #include /* @@ -43,7 +44,8 @@ printb(const char *s, unsigned int v, const char *bits int i, any = 0; char c; - if (bits && *bits == 8) + assert(bits != NULL); + if (*bits == 8) printf("%s=%o", s, v); else printf("%s=%x", s, v); From owner-svn-src-head@freebsd.org Fri Jan 5 07:29:04 2018 Return-Path: Delivered-To: svn-src-head@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 439A1EB96A6; Fri, 5 Jan 2018 07:29:04 +0000 (UTC) (envelope-from imp@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 0DF7F7B194; Fri, 5 Jan 2018 07:29:03 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w057T3Qr040002; Fri, 5 Jan 2018 07:29:03 GMT (envelope-from imp@FreeBSD.org) Received: (from imp@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w057T3DF040000; Fri, 5 Jan 2018 07:29:03 GMT (envelope-from imp@FreeBSD.org) Message-Id: <201801050729.w057T3DF040000@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: imp set sender to imp@FreeBSD.org using -f From: Warner Losh Date: Fri, 5 Jan 2018 07:29:03 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r327581 - head/usr.sbin/pciconf X-SVN-Group: head X-SVN-Commit-Author: imp X-SVN-Commit-Paths: head/usr.sbin/pciconf X-SVN-Commit-Revision: 327581 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 05 Jan 2018 07:29:04 -0000 Author: imp Date: Fri Jan 5 07:29:02 2018 New Revision: 327581 URL: https://svnweb.freebsd.org/changeset/base/327581 Log: Remove dead code (comma is either 0 or 1 for sure, no need to test). Close /dev/pci when we're done with it. CID: 1007450, 1007449, 1008615, 1008614 Modified: head/usr.sbin/pciconf/cap.c head/usr.sbin/pciconf/pciconf.c Modified: head/usr.sbin/pciconf/cap.c ============================================================================== --- head/usr.sbin/pciconf/cap.c Fri Jan 5 07:28:58 2018 (r327580) +++ head/usr.sbin/pciconf/cap.c Fri Jan 5 07:29:02 2018 (r327581) @@ -161,7 +161,7 @@ cap_pcix(int fd, struct pci_conf *p, uint8_t ptr) printf("supports"); comma = 0; if (status & PCIXM_STATUS_133CAP) { - printf("%s 133MHz", comma ? "," : ""); + printf(" 133MHz"); comma = 1; } if (status & PCIXM_STATUS_266CAP) { @@ -351,10 +351,8 @@ cap_vendor(int fd, struct pci_conf *p, uint8_t ptr) printf("%s SATA RAID-0/1/10", comma ? "," : ""); comma = 1; } - if (fvec & (1 << 3)) { - printf("%s SATA AHCI", comma ? "," : ""); - comma = 1; - } + if (fvec & (1 << 3)) + printf(", SATA AHCI"); } } } Modified: head/usr.sbin/pciconf/pciconf.c ============================================================================== --- head/usr.sbin/pciconf/pciconf.c Fri Jan 5 07:28:58 2018 (r327580) +++ head/usr.sbin/pciconf/pciconf.c Fri Jan 5 07:29:02 2018 (r327581) @@ -1005,6 +1005,7 @@ writeit(const char *name, const char *reg, const char if (ioctl(fd, PCIOCWRITE, &pi) < 0) err(1, "ioctl(PCIOCWRITE)"); + close(fd); } static void @@ -1024,4 +1025,5 @@ chkattached(const char *name) exitstatus = pi.pi_data ? 0 : 2; /* exit(2), if NOT attached */ printf("%s: %s%s\n", name, pi.pi_data == 0 ? "not " : "", "attached"); + close(fd); } From owner-svn-src-head@freebsd.org Fri Jan 5 08:29:33 2018 Return-Path: Delivered-To: svn-src-head@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 E2C58EBCD18; Fri, 5 Jan 2018 08:29:33 +0000 (UTC) (envelope-from lwhsu@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 AD63E7D871; Fri, 5 Jan 2018 08:29:33 +0000 (UTC) (envelope-from lwhsu@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w058TWhP064363; Fri, 5 Jan 2018 08:29:32 GMT (envelope-from lwhsu@FreeBSD.org) Received: (from lwhsu@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w058TWru064362; Fri, 5 Jan 2018 08:29:32 GMT (envelope-from lwhsu@FreeBSD.org) Message-Id: <201801050829.w058TWru064362@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: lwhsu set sender to lwhsu@FreeBSD.org using -f From: Li-Wen Hsu Date: Fri, 5 Jan 2018 08:29:32 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r327582 - head/usr.sbin/dumpcis X-SVN-Group: head X-SVN-Commit-Author: lwhsu X-SVN-Commit-Paths: head/usr.sbin/dumpcis X-SVN-Commit-Revision: 327582 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 05 Jan 2018 08:29:34 -0000 Author: lwhsu (ports committer) Date: Fri Jan 5 08:29:32 2018 New Revision: 327582 URL: https://svnweb.freebsd.org/changeset/base/327582 Log: Fix typo & build Approved by: kevlo Modified: head/usr.sbin/dumpcis/readcis.c Modified: head/usr.sbin/dumpcis/readcis.c ============================================================================== --- head/usr.sbin/dumpcis/readcis.c Fri Jan 5 07:29:02 2018 (r327581) +++ head/usr.sbin/dumpcis/readcis.c Fri Jan 5 08:29:32 2018 (r327582) @@ -336,9 +336,9 @@ ck_linktarget(int fd, off_t offs, int flag) { char blk[5]; - if (ioctl(fd, PIOCRWFLAG, &flags) < 0) + if (ioctl(fd, PIOCRWFLAG, &flag) < 0) err(1, "Setting flag to rad %s memory failed", - flags ? "attribute" : "common"); + flag ? "attribute" : "common"); if (lseek(fd, offs, SEEK_SET) < 0) err(1, "Unable to seek to memory offset %ju", (uintmax_t)offs); From owner-svn-src-head@freebsd.org Fri Jan 5 09:26:35 2018 Return-Path: Delivered-To: svn-src-head@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 F3B8CEBFB2A for ; Fri, 5 Jan 2018 09:26:34 +0000 (UTC) (envelope-from steven@multiplay.co.uk) Received: from mail-lf0-x231.google.com (mail-lf0-x231.google.com [IPv6:2a00:1450:4010:c07::231]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 6980D7F806 for ; Fri, 5 Jan 2018 09:26:34 +0000 (UTC) (envelope-from steven@multiplay.co.uk) Received: by mail-lf0-x231.google.com with SMTP id c19so4497041lfg.3 for ; Fri, 05 Jan 2018 01:26:34 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=multiplay-co-uk.20150623.gappssmtp.com; s=20150623; h=subject:to:references:from:message-id:date:user-agent:mime-version :in-reply-to:content-language; bh=rmDe4Edit1j8FiZRrXvGO+jSiJqrtlXJI3/LUYwtXiY=; b=oSIcP7F8s+lJ97n0X2H3apIZmQif9tBqMzdAeHp7k8w9rodHCaEuFw+X+TG2eHnPn0 c+C8CzjBGJWzf0Tp89tLiJ7JYexXhGr+9p2/a0zbi2f66teIieeR3HXficj6qws38I5c 4KbqnxEfCe8L+2b1hk2xtrORAnynIOg6u4w9Bk3nexlB4lcvpJssjqFiQBw6BzkbGkcl uAzsj5/NO+EY3EpyQqQbX79PoUp4Kv/1hA4xW0OzZYqjGyjpGIngYA9YIjb+Y5iIa/38 RcdWYl8NWpBORJt2BI0+F0qrbCSuaIl8qeXkJBCFfsyH0ippig8+sXUhf6Decz+nCGEL Hy6g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language; bh=rmDe4Edit1j8FiZRrXvGO+jSiJqrtlXJI3/LUYwtXiY=; b=gg47nbtMLERwkMBGzaofAt5NC/P6WzXatySyeDqQXG45lDJ9Bahs/Ui+HoE0dFN3vI NxW9BPF5xZMJbzQ9SFo5ggTuJoqJEsbk4v5BBQU2/6gEIlpn7T2xV4aJWPxdUselooxg 7701gB5wtkV30YVMh8sB9esWQr8HvMViMlt4poYp/oxqQA8phmf1xLsDCGbvVsG/MCZ5 M74QNK+G2BgA25OuNe6Rr5B0YdHlcIRgkgm3QaYT1rkwcX3/kYWQ1vQocLJIx3Bhx5cT bpf3dornnXCraQKYvaRrulEH+nt3a0s9bh7RPtFztcp64JesCx1bpoR8Vwy3T9FJkXi0 hx1Q== X-Gm-Message-State: AKGB3mKA7gjln3HBbTZUqmWc8cpJuDPsI98mW4lTnIcxlRQ2L4TFv6Xr Yx1LZsUUtjrWfvr3zST2T0oRfipsV7w= X-Google-Smtp-Source: ACJfBouABwWi7reGlvSMC8whSoiNrFr59WhvsQFuFwYKXQiAbZ6wwwe41ZaRFERckRlf8ftRQIgfQQ== X-Received: by 10.46.86.211 with SMTP id k80mr1402377lje.89.1515144392032; Fri, 05 Jan 2018 01:26:32 -0800 (PST) Received: from [10.10.1.111] ([185.97.61.1]) by smtp.gmail.com with ESMTPSA id f4sm948177lfl.17.2018.01.05.01.26.30 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 05 Jan 2018 01:26:30 -0800 (PST) Subject: Re: svn commit: r327559 - in head: . sys/net To: Eugene Grosbein , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org References: <201801042005.w04K5liB049411@repo.freebsd.org> <5A4E9397.9000308@grosbein.net> <5A4EDC62.50508@grosbein.net> From: Steven Hartland Message-ID: Date: Fri, 5 Jan 2018 09:26:31 +0000 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:52.0) Gecko/20100101 Thunderbird/52.5.2 MIME-Version: 1.0 In-Reply-To: <5A4EDC62.50508@grosbein.net> Content-Language: en-US Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit X-Content-Filtered-By: Mailman/MimeDel 2.1.25 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 05 Jan 2018 09:26:35 -0000 On 05/01/2018 02:01, Eugene Grosbein wrote: > 05.01.2018 4:52, Steven Hartland wrote: > >>> RSS by definition has meaning to received stream. What is "outbound" stream >>> in this context, why can the hash calculatiom method change and what exactly >>> does it mean "a stream being incorrectly split"? >> Yes RSS is indeed a received stream but that is used by lagg for lacp and loadbalance protocols >> to decide which port of the lagg to "send" the packet out of. >> As the flowid is not known when a new "output" stream is instigated the current code >> falls back to manual hash calculation to determine which port to send the initial packet from. >> Once a response is received a tx then uses the flowid. >> This change of hash calculation method can result in the initial packet being sent >> from a different port than the rest of the stream; this is what I meant by "incorrectly split". >> >> See the following: >> https://github.com/freebsd/freebsd/blob/master/sys/net/if_lagg.c#L2066 >> https://github.com/freebsd/freebsd/blob/master/sys/net/ieee8023ad_lacp.c#L846 > I still do not get what is "output stream" for you. > > If you are talking on forwarding (routing) transit packets at IP layer, > they all have flowid from the beginning and first packet does not differ from others at all. At the simplest level its a tcp stream that is started from the host. So given we have hostA (src) and hostB (dest), the output stream is one started by hostA with a destination of hostB where hostA is configured with lagg. In this case with use_flowid we've confirmed we get the following (the interfaces used vary per flow of cause): hostA - SYN (ix0)       -> hostB # Manual hash calculated hostB - SYN,ACK (ix0)   -> hostA# flowid used hostA - ACK (ix1)       -> hostB # flowid used hostA - Data(ix1)       -> hostB # flowid used hostB - ACK (ix0)       -> hostA # flowid used ... Here hostA and hostB both had lagg0 comprising of ix0 and ix1. I believe your referring to packets flowing through the physical interface, if so then this is too late as for LACP the flowid would need to be per-calculated for the first packet in order to make the decision on which port to send it on. Unless I'm missing something, this is a chicken and egg situation. > If you are talking on locally originated (not transit) data streem from local TCP socket > being sent in response to corresponding incoming TCP segments, then these outgoing > packets should have their own fixed flow id by default in case of LACP > and thhis flow id should not depend on (possibly ever changing) flow id of incoming TCP segments. Nope in this case we have all the information needed, but I don't believe we can't tell that's the case. > If you insist that flow id of outgoing packets does depend on ever changing incoming packet's flow id, > then this is the bug that should be fixed and not lagg's defaults. As detailed above once the session is established then the flowid remains fixed.     Regards     Steve From owner-svn-src-head@freebsd.org Fri Jan 5 09:31:43 2018 Return-Path: Delivered-To: svn-src-head@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 6AE3EEC0043; Fri, 5 Jan 2018 09:31:43 +0000 (UTC) (envelope-from oshogbo@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 33B957FD8F; Fri, 5 Jan 2018 09:31:43 +0000 (UTC) (envelope-from oshogbo@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w059Vg8Y090394; Fri, 5 Jan 2018 09:31:42 GMT (envelope-from oshogbo@FreeBSD.org) Received: (from oshogbo@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w059Vflj090390; Fri, 5 Jan 2018 09:31:41 GMT (envelope-from oshogbo@FreeBSD.org) Message-Id: <201801050931.w059Vflj090390@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: oshogbo set sender to oshogbo@FreeBSD.org using -f From: Mariusz Zaborski Date: Fri, 5 Jan 2018 09:31:41 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r327583 - in head/lib/libcasper/services: cap_dns/tests cap_grp/tests cap_pwd/tests cap_sysctl/tests X-SVN-Group: head X-SVN-Commit-Author: oshogbo X-SVN-Commit-Paths: in head/lib/libcasper/services: cap_dns/tests cap_grp/tests cap_pwd/tests cap_sysctl/tests X-SVN-Commit-Revision: 327583 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 05 Jan 2018 09:31:43 -0000 Author: oshogbo Date: Fri Jan 5 09:31:41 2018 New Revision: 327583 URL: https://svnweb.freebsd.org/changeset/base/327583 Log: Build service tests with Casper support. Modified: head/lib/libcasper/services/cap_dns/tests/Makefile head/lib/libcasper/services/cap_grp/tests/Makefile head/lib/libcasper/services/cap_pwd/tests/Makefile head/lib/libcasper/services/cap_sysctl/tests/Makefile Modified: head/lib/libcasper/services/cap_dns/tests/Makefile ============================================================================== --- head/lib/libcasper/services/cap_dns/tests/Makefile Fri Jan 5 08:29:32 2018 (r327582) +++ head/lib/libcasper/services/cap_dns/tests/Makefile Fri Jan 5 09:31:41 2018 (r327583) @@ -7,6 +7,7 @@ TAP_TESTS_C= dns_test .if ${MK_CASPER} != "no" LIBADD+= casper LIBADD+= cap_dns +CFLAGS+=-DWITH_CASPER .endif LIBADD+= nv Modified: head/lib/libcasper/services/cap_grp/tests/Makefile ============================================================================== --- head/lib/libcasper/services/cap_grp/tests/Makefile Fri Jan 5 08:29:32 2018 (r327582) +++ head/lib/libcasper/services/cap_grp/tests/Makefile Fri Jan 5 09:31:41 2018 (r327583) @@ -7,6 +7,7 @@ TAP_TESTS_C= grp_test .if ${MK_CASPER} != "no" LIBADD+= casper LIBADD+= cap_grp +CFLAGS+=-DWITH_CASPER .endif LIBADD+= nv Modified: head/lib/libcasper/services/cap_pwd/tests/Makefile ============================================================================== --- head/lib/libcasper/services/cap_pwd/tests/Makefile Fri Jan 5 08:29:32 2018 (r327582) +++ head/lib/libcasper/services/cap_pwd/tests/Makefile Fri Jan 5 09:31:41 2018 (r327583) @@ -7,6 +7,7 @@ TAP_TESTS_C= pwd_test .if ${MK_CASPER} != "no" LIBADD+= casper LIBADD+= cap_pwd +CFLAGS+=-DWITH_CASPER .endif LIBADD+= nv Modified: head/lib/libcasper/services/cap_sysctl/tests/Makefile ============================================================================== --- head/lib/libcasper/services/cap_sysctl/tests/Makefile Fri Jan 5 08:29:32 2018 (r327582) +++ head/lib/libcasper/services/cap_sysctl/tests/Makefile Fri Jan 5 09:31:41 2018 (r327583) @@ -7,6 +7,7 @@ TAP_TESTS_C= sysctl_test .if ${MK_CASPER} != "no" LIBADD+= casper LIBADD+= cap_sysctl +CFLAGS+=-DWITH_CASPER .endif LIBADD+= nv From owner-svn-src-head@freebsd.org Fri Jan 5 09:34:30 2018 Return-Path: Delivered-To: svn-src-head@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 4FB89EC0247 for ; Fri, 5 Jan 2018 09:34:30 +0000 (UTC) (envelope-from steven@multiplay.co.uk) Received: from mail-wm0-x229.google.com (mail-wm0-x229.google.com [IPv6:2a00:1450:400c:c09::229]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id CF3D080126 for ; Fri, 5 Jan 2018 09:34:29 +0000 (UTC) (envelope-from steven@multiplay.co.uk) Received: by mail-wm0-x229.google.com with SMTP id 9so1285192wme.4 for ; Fri, 05 Jan 2018 01:34:29 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=multiplay-co-uk.20150623.gappssmtp.com; s=20150623; h=subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language; bh=by3a9B9WJ1DtuWHXPHBJknuwH1a6dKb3i8wqHZi8dB4=; b=cusSvwDZa+luuNSgxLNNfZxRTgZpzn9cCCMTv/mU62CIjo/CPzR6BOu8Zu5QyoPO0q VBu1DVUzQ307BbMknOyA0qx00seyn7hrnvHN1zwV6gfvVyJMym/w5s3Fm0L7W5rDQ4Uu 2J1RVqlPtDy1++M/M4pcsrKaXSsH9hTV9idp4Yx/fcq61Hi+iwyyAKnf5pcpVSJTJ+01 F3oZTb6NL/2NJXznU4zNEKIF50Y3U/oCrhOy0kzQNJSlSa2fQPNlM0SGnXYIiFCkPDb+ Cv6Fw3jqLID5hw80FvWOZoFpV+ij5/ZUvaQ6oYW69TzRa1xrRdaeujb4ggzlgzUDMIfc v3lA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language; bh=by3a9B9WJ1DtuWHXPHBJknuwH1a6dKb3i8wqHZi8dB4=; b=TVLjaLvcHVtew6PX1QOKGkYPdGLSSwnaz/H2Duv4Huh7pGRJT78uo1e2u3o36ZdYqe gOfT82YTBwvkSc4HwufH6rGjV8JP8mn7qFpXSqxqdbnpptFHTpQY9DyecMPYN1UNyuPl gKP/HUaXWfdwOg09a2lil5QUPUPEi2w49mm7Ek26JejXA8GPNJsrtAsbTeaH2iHMgefx YGWCtRm1TYXieK5C1Me30ELmbfvNrKlCbD85/yrUIYCVLe1Et1R7jXdZPJpC/Mw66gsz 8BFUQKmKXQWlvGR7jiAdb2ktrxE6jo3Cd28/jCp9kw2V6JJJRaiZV3T8wm2WiehxjNQO VXig== X-Gm-Message-State: AKGB3mJaiunRqjzr9ouqDog225BZBomLIGBueAxXxYDEWtb82BxauHfU z5pLn1BlkPPPEJ13G0GMpLCHDN92wwk= X-Google-Smtp-Source: ACJfBotM/fhnixqS/kM0n1vTDVjhVglYaqOb7t/cc3+7qQfB3/VpA41P5KWn5Nx4MFzQWgfbN7uilA== X-Received: by 10.80.136.2 with SMTP id b2mr3314101edb.239.1515144867610; Fri, 05 Jan 2018 01:34:27 -0800 (PST) Received: from [10.10.1.111] ([185.97.61.1]) by smtp.gmail.com with ESMTPSA id v20sm3319969edm.10.2018.01.05.01.34.26 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 05 Jan 2018 01:34:26 -0800 (PST) Subject: Re: svn commit: r327559 - in head: . sys/net To: Eugene Grosbein , hiren panchasara Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org References: <201801042005.w04K5liB049411@repo.freebsd.org> <5A4E9397.9000308@grosbein.net> <20180104224214.GD18879@strugglingcoder.info> <63c3c450-aeaf-bdd5-5e16-414146c9bb3a@multiplay.co.uk> <5A4EDE65.1010201@grosbein.net> From: Steven Hartland Message-ID: <688c4d08-3dac-545f-1bed-b21270a03eca@multiplay.co.uk> Date: Fri, 5 Jan 2018 09:34:27 +0000 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:52.0) Gecko/20100101 Thunderbird/52.5.2 MIME-Version: 1.0 In-Reply-To: <5A4EDE65.1010201@grosbein.net> Content-Language: en-US Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 8bit X-Content-Filtered-By: Mailman/MimeDel 2.1.25 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 05 Jan 2018 09:34:30 -0000 On 05/01/2018 02:09, Eugene Grosbein wrote: > 05.01.2018 6:37, Steven Hartland wrote: > >> Our TCP stack seems fragile during setup to out of order packets >> which this multipath behavior causes, we've seen this on our loadbalancers >> which is what triggered the investigation. The concrete result is many aborted TCP connections, >> over 300k ~2% on the machine I'm looking at. > This is another problem that needs to be fixed in general and not hidden under the carpet. > Meantime, practical problems you see can be solved locally with any settings you like. While it may seem like it, there's not denying that the problem is caused by fact that the packets for a single flow arrive on two different interfaces in normal (none failure) workflow, which contravenes 802.3ad which states: 43.2.4 Frame Distributor … This standard does not mandate any particular distribution algorithm(s); however, any distribution algorithm shall ensure that, when frames are received by a Frame Collector as specified in 43.2.3, the algorithm shall not cause a) Mis-ordering of frames that are part of any given conversation, or b) Duplication of frames. The above requirement to maintain frame ordering is met by *ensuring that all frames that compose a given conversation are transmitted on a single link in the order* that they are generated by the MAC Client; hence, this requirement does not involve the addition (or modification) of any information to the MAC frame, nor any buffering or processing on the part of the corresponding Frame Collector in order to re-order frames. > >> I hope there's some improvements that can be made, for example if we can determine >> the stream was instigated remotely then flowid would always be valid hence we can use it assuming it >> matches the requested spec or if we can make it clear to the user that laggproto is not the one they requested, I'm open to ideas? > We just need to clear flow id from incoming TCP segments and always generate new flow id for responses > keeping old flow id for IP forwarding case. Please back out your change to not degrade IP forwarding performance. Sorry I don't follow you. You seem to be inferring that we can easily generate a flowid without involving the sending hardware; I can't see how that is possible as that's chicken and egg i.e. you can't get the HW interface to generate the flowid without sending a packet and you can't send a packet until you have a the flowid to decide which interface to send it from.     Regards     Steve From owner-svn-src-head@freebsd.org Fri Jan 5 09:41:24 2018 Return-Path: Delivered-To: svn-src-head@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 63813EC0892; Fri, 5 Jan 2018 09:41:24 +0000 (UTC) (envelope-from hiren@strugglingcoder.info) Received: from mail.strugglingcoder.info (strugglingcoder.info [104.236.146.68]) by mx1.freebsd.org (Postfix) with ESMTP id 43D4F806B2; Fri, 5 Jan 2018 09:41:23 +0000 (UTC) (envelope-from hiren@strugglingcoder.info) Received: from localhost (unknown [10.1.1.3]) (Authenticated sender: hiren@strugglingcoder.info) by mail.strugglingcoder.info (Postfix) with ESMTPA id 7273817E35; Fri, 5 Jan 2018 01:41:26 -0800 (PST) Date: Fri, 5 Jan 2018 01:41:26 -0800 From: hiren panchasara To: Steven Hartland Cc: Eugene Grosbein , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r327559 - in head: . sys/net Message-ID: <20180105094126.GE18879@strugglingcoder.info> References: <201801042005.w04K5liB049411@repo.freebsd.org> <5A4E9397.9000308@grosbein.net> <20180104224214.GD18879@strugglingcoder.info> <63c3c450-aeaf-bdd5-5e16-414146c9bb3a@multiplay.co.uk> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="XStn23h1fwudRqtG" Content-Disposition: inline In-Reply-To: <63c3c450-aeaf-bdd5-5e16-414146c9bb3a@multiplay.co.uk> User-Agent: Mutt/1.5.23 (2014-03-12) X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 05 Jan 2018 09:41:24 -0000 --XStn23h1fwudRqtG Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On 01/04/18 at 11:37P, Steven Hartland wrote: >=20 >=20 > On 04/01/2018 22:42, hiren panchasara wrote: > > On 01/04/18 at 09:52P, Steven Hartland wrote: > >> On 04/01/2018 20:50, Eugene Grosbein wrote: > >>> 05.01.2018 3:05, Steven Hartland wrote: > >>> > >>>> Author: smh > >>>> Date: Thu Jan 4 20:05:47 2018 > >>>> New Revision: 327559 > >>>> URL: https://svnweb.freebsd.org/changeset/base/327559 > >>>> > >>>> Log: > >>>> Disabled the use of flowid for lagg by default > >>>> =20 > >>>> Disabled the use of RSS hash from the network card aka flowid for > >>>> lagg(4) interfaces by default as it's currently incompatible with > >>>> the lacp and loadbalance protocols. > >>>> =20 > >>>> The incompatibility is due to the fact that the flowid isn't know > >>>> for the first packet of a new outbound stream which can result in > >>>> the hash calculation method changing and hence a stream being > >>>> incorrectly split across multiple interfaces during normal > >>>> operation. > >>>> =20 > >>>> This can be re-enabled by setting the following in loader.conf: > >>>> net.link.lagg.default_use_flowid=3D"1" > >>>> =20 > >>>> Discussed with: kmacy > >>>> Sponsored by: Multiplay > >>> RSS by definition has meaning to received stream. What is "outbound" = stream > >>> in this context, why can the hash calculatiom method change and what = exactly > >>> does it mean "a stream being incorrectly split"? > >> Yes RSS is indeed a received stream but that is used by lagg for lacp > >> and loadbalance protocols to decide which port of the lagg to "send" t= he > >> packet out of. As the flowid is not known when a new "output" stream is > >> instigated the current code falls back to manual hash calculation to > >> determine which port to send the initial packet from. Once a response = is > >> received a tx then uses the flowid. This change of hash calculation > >> method can result in the initial packet being sent from a different po= rt > >> than the rest of the stream; this is what I meant by "incorrectly spli= t". > > For my understanding, is this just an issue for the first packet when we > > originate the flow? Once we have a response and if flowid is there, we'd > > use it, right? OR am I missing something? > Initially yes, but that can cause a whole cascading set of problems. If= =20 > the source machine sends from two different ports then flow can traverse= =20 > across the network using different paths and hence arrive at the=20 > destination on different ports too, causing the corresponding? issue on= =20 > the other side. > > And with this change, we'd always go and do manual calculation even when > > we have a valid flowid (i.e. we didn't initiate a connection)? > Correct, but there's potentially no easy way to correctly determine what= =20 > the flowid and hence hash should be in this case, likely impossible if=20 > the lagg consists of different interface types. >=20 > In addition if the hardware hash doesn't match the requested one as per= =20 > laggproto then additional issues could also be triggered. >=20 > Our TCP stack seems fragile during setup to out of order packets which=20 > this multipath behavior causes, we've seen this on our loadbalancers=20 > which is what triggered the investigation. The concrete result is many=20 > aborted TCP connections, over 300k ~2% on the machine I'm looking at. >=20 > I hope there's some improvements that can be made, for example if we can= =20 > determine the stream was instigated remotely then flowid would always be= =20 > valid hence we can use it assuming it matches the requested spec or if=20 > we can make it clear to the user that laggproto is not the one they=20 > requested, I'm open to ideas? IIRC, with 'RSS' in kernconf, most NIC drivers and stack should do the right thing. Look at drivers and also conn startup code in TCP as I recall it doing the flowid mapping correctly when stream originated from the other side and had flowid assigned to it by the NIC. I am mostly concerned about the overhead of manual calculation but my knowledge is a bit rusty right now and lagg has always been special so please try this out and see. Thank you. Hiren --XStn23h1fwudRqtG Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQF8BAABCgBmBQJaT0hDXxSAAAAAAC4AKGlzc3Vlci1mcHJAbm90YXRpb25zLm9w ZW5wZ3AuZmlmdGhob3JzZW1hbi5uZXRBNEUyMEZBMUQ4Nzg4RjNGMTdFNjZGMDI4 QjkyNTBFMTU2M0VERkU1AAoJEIuSUOFWPt/lefcH/i4+CVA9iz+JvTFG+PpmSbXu k7zV65InItMtcSDrv+rse5CRKs7Aew7wblNYd0PB8qzCUD2esNEv4pvdGDf9SLqF a7i8ErkzexdpBI82YoFr/3DeaCaSnik/DazVDRDnlLrGtx02QeK0Ls4sS1ZxTqXU HU6N6vU95O55uzZ2q325TB6hR+5Y465ZNfAG74s/mIgrT3M1jooXLrGURvIX7JgN H1CM7Ladxq1CvC42q+eDHwWdnn+JGPffKkNfXltf3NYLxBh0OoRAvn6eGpsuQteh A9yjJgaBL002CvsbDwx0D5wmkE7WHpW7QYcf33N69t+Zv7iMVB/B1Ckx8kHm6ho= =oGtE -----END PGP SIGNATURE----- --XStn23h1fwudRqtG-- From owner-svn-src-head@freebsd.org Fri Jan 5 09:44:28 2018 Return-Path: Delivered-To: svn-src-head@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 1F660EC0AAB for ; Fri, 5 Jan 2018 09:44:28 +0000 (UTC) (envelope-from steven@multiplay.co.uk) Received: from mail-wr0-x229.google.com (mail-wr0-x229.google.com [IPv6:2a00:1450:400c:c0c::229]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 9E86C8092E for ; Fri, 5 Jan 2018 09:44:27 +0000 (UTC) (envelope-from steven@multiplay.co.uk) Received: by mail-wr0-x229.google.com with SMTP id s13so1451146wra.10 for ; Fri, 05 Jan 2018 01:44:27 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=multiplay-co-uk.20150623.gappssmtp.com; s=20150623; h=subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language; bh=4qNXjTrJAhuAoFJQq8RJI4GSnA6eFBe1dn0FxXF4fBY=; b=EFxBUG22EgWbpfunoWo/NZ4n9A3Hjrf+h3db8nyj8Mhc+l9/+MjF0CS4URNqiUA4Y0 GJneEB46bSxJyJm0n5K0PcjKby78omvckcRjRlqeaqcdeLmHnR1FSK3Og2ewmS66KX3r GquRZGQ7lTchhtdZeZPKQNGESYVB9AvYpYnPpk93GYkPh3re1SdcR2TadagUhObik0QQ Bvmw2+TFV/X2gnxsf3j4/KEKFSlh3i10vLaa5YIeqhjr7/8hnRO3cuQE3gHSZ3BhRI3p qxLvAlSgk8XmAbS1KXMNUsXMPnh2GN0+8rAyriKKVN3Vwq26LhIUCQgOnDcETg6iqv/8 IRSw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language; bh=4qNXjTrJAhuAoFJQq8RJI4GSnA6eFBe1dn0FxXF4fBY=; b=mH5cZjN2GMaBM4VFUlVoU5XBsQaPLVcwzBc0hS+77O/3nEbeJE2pmi+Ky9m5WiyaTV JE3ch3UUvJ7DgMKfcbrPDtt1Kpx8qJnVEYawmMzqeKEfxUp071W0/wZMQuzNYK97XoFi CLNLgiK1UVzUqybYE79z0TvF3WrVWEFu8YWTEUCyPfZMB4SchzZ1xAuqdUp1jGlJaZic Mg+m5vJJfgbSRzZOdpIe5xVi19wD73V+l7FgfwYn/sfq1AX6DDkNuM+iLOqbF5grlEle jaGsCKNh6449i8qoD8jv5uvKczi0n6iIHW0VeTNOic8l24qvL0AQMAUXbXuZF6wA3xcX c1nw== X-Gm-Message-State: AKGB3mI2fFbUEZKxA/XdxG1S5FZtwiGOV4CJ1SCv3Y75nzlplNELLPCi TkYqlr5r3Igx04+99z60bPmhcLgQJIE= X-Google-Smtp-Source: ACJfBosC96rEHd9AM20SPgIl1pTuzsUKvscPuHx67M804dhThvBIyS9aW6QyD1ZHUn+vknHtZipVMw== X-Received: by 10.223.188.78 with SMTP id a14mr2403847wrh.267.1515145465518; Fri, 05 Jan 2018 01:44:25 -0800 (PST) Received: from [10.10.1.111] ([185.97.61.1]) by smtp.gmail.com with ESMTPSA id q3sm260869wre.28.2018.01.05.01.44.24 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 05 Jan 2018 01:44:24 -0800 (PST) Subject: Re: svn commit: r327559 - in head: . sys/net To: Adrian Chadd Cc: hiren panchasara , Eugene Grosbein , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org References: <201801042005.w04K5liB049411@repo.freebsd.org> <5A4E9397.9000308@grosbein.net> <20180104224214.GD18879@strugglingcoder.info> <63c3c450-aeaf-bdd5-5e16-414146c9bb3a@multiplay.co.uk> From: Steven Hartland Message-ID: <4b7b011a-9fe3-f0ec-04a0-c201a2cfcfda@multiplay.co.uk> Date: Fri, 5 Jan 2018 09:44:25 +0000 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:52.0) Gecko/20100101 Thunderbird/52.5.2 MIME-Version: 1.0 In-Reply-To: Content-Language: en-US Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit X-Content-Filtered-By: Mailman/MimeDel 2.1.25 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 05 Jan 2018 09:44:28 -0000 I found https://wiki.freebsd.org/NetworkRSS but I couldn't see any options mentioned, is there a sysctl or kernel option for that Adrian? For reference our current test is on a production LB running 11.0-RELEASE. We're in the process of updating our HEAD box for additional testing. On 05/01/2018 02:55, Adrian Chadd wrote: > does it also happen when you actually enable RSS in the kernel? Since > like I went through a whole lot of pain to assign a flowid at > connection setup time. > > > > -a > > > On 4 January 2018 at 15:37, Steven Hartland wrote: >> >> On 04/01/2018 22:42, hiren panchasara wrote: >> >> On 01/04/18 at 09:52P, Steven Hartland wrote: >> >> On 04/01/2018 20:50, Eugene Grosbein wrote: >> >> 05.01.2018 3:05, Steven Hartland wrote: >> >> Author: smh >> Date: Thu Jan 4 20:05:47 2018 >> New Revision: 327559 >> URL: https://svnweb.freebsd.org/changeset/base/327559 >> >> Log: >> Disabled the use of flowid for lagg by default >> >> Disabled the use of RSS hash from the network card aka flowid for >> lagg(4) interfaces by default as it's currently incompatible with >> the lacp and loadbalance protocols. >> >> The incompatibility is due to the fact that the flowid isn't know >> for the first packet of a new outbound stream which can result in >> the hash calculation method changing and hence a stream being >> incorrectly split across multiple interfaces during normal >> operation. >> >> This can be re-enabled by setting the following in loader.conf: >> net.link.lagg.default_use_flowid="1" >> >> Discussed with: kmacy >> Sponsored by: Multiplay >> >> RSS by definition has meaning to received stream. What is "outbound" stream >> in this context, why can the hash calculatiom method change and what exactly >> does it mean "a stream being incorrectly split"? >> >> Yes RSS is indeed a received stream but that is used by lagg for lacp >> and loadbalance protocols to decide which port of the lagg to "send" the >> packet out of. As the flowid is not known when a new "output" stream is >> instigated the current code falls back to manual hash calculation to >> determine which port to send the initial packet from. Once a response is >> received a tx then uses the flowid. This change of hash calculation >> method can result in the initial packet being sent from a different port >> than the rest of the stream; this is what I meant by "incorrectly split". >> >> For my understanding, is this just an issue for the first packet when we >> originate the flow? Once we have a response and if flowid is there, we'd >> use it, right? OR am I missing something? >> >> Initially yes, but that can cause a whole cascading set of problems. If the >> source machine sends from two different ports then flow can traverse across >> the network using different paths and hence arrive at the destination on >> different ports too, causing the corresponding issue on the other side. >> >> And with this change, we'd always go and do manual calculation even when >> we have a valid flowid (i.e. we didn't initiate a connection)? >> >> Correct, but there's potentially no easy way to correctly determine what the >> flowid and hence hash should be in this case, likely impossible if the lagg >> consists of different interface types. >> >> In addition if the hardware hash doesn't match the requested one as per >> laggproto then additional issues could also be triggered. >> >> Our TCP stack seems fragile during setup to out of order packets which this >> multipath behavior causes, we've seen this on our loadbalancers which is >> what triggered the investigation. The concrete result is many aborted TCP >> connections, over 300k ~2% on the machine I'm looking at. >> >> I hope there's some improvements that can be made, for example if we can >> determine the stream was instigated remotely then flowid would always be >> valid hence we can use it assuming it matches the requested spec or if we >> can make it clear to the user that laggproto is not the one they requested, >> I'm open to ideas? >> >> Regards >> Steve >> From owner-svn-src-head@freebsd.org Fri Jan 5 10:04:04 2018 Return-Path: Delivered-To: svn-src-head@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 3753EEC1951; Fri, 5 Jan 2018 10:04:04 +0000 (UTC) (envelope-from fsu@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 DBF9E13A2; Fri, 5 Jan 2018 10:04:03 +0000 (UTC) (envelope-from fsu@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w05A43AB005936; Fri, 5 Jan 2018 10:04:03 GMT (envelope-from fsu@FreeBSD.org) Received: (from fsu@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w05A411w005924; Fri, 5 Jan 2018 10:04:01 GMT (envelope-from fsu@FreeBSD.org) Message-Id: <201801051004.w05A411w005924@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: fsu set sender to fsu@FreeBSD.org using -f From: Fedor Uporov Date: Fri, 5 Jan 2018 10:04:01 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r327584 - head/sys/fs/ext2fs X-SVN-Group: head X-SVN-Commit-Author: fsu X-SVN-Commit-Paths: head/sys/fs/ext2fs X-SVN-Commit-Revision: 327584 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 05 Jan 2018 10:04:04 -0000 Author: fsu Date: Fri Jan 5 10:04:01 2018 New Revision: 327584 URL: https://svnweb.freebsd.org/changeset/base/327584 Log: Add 64bit feature support. Reviewed by: kevlo, pfg (mentor) Approved by: pfg (mentor) MFC after: 6 months Differential Revision: https://reviews.freebsd.org/D11530 Modified: head/sys/fs/ext2fs/ext2_alloc.c head/sys/fs/ext2fs/ext2_balloc.c head/sys/fs/ext2fs/ext2_csum.c head/sys/fs/ext2fs/ext2_extents.c head/sys/fs/ext2fs/ext2_extents.h head/sys/fs/ext2fs/ext2_extern.h head/sys/fs/ext2fs/ext2_hash.c head/sys/fs/ext2fs/ext2_subr.c head/sys/fs/ext2fs/ext2_vfsops.c head/sys/fs/ext2fs/ext2_vnops.c head/sys/fs/ext2fs/ext2fs.h head/sys/fs/ext2fs/fs.h Modified: head/sys/fs/ext2fs/ext2_alloc.c ============================================================================== --- head/sys/fs/ext2fs/ext2_alloc.c Fri Jan 5 09:31:41 2018 (r327583) +++ head/sys/fs/ext2fs/ext2_alloc.c Fri Jan 5 10:04:01 2018 (r327584) @@ -103,12 +103,12 @@ ext2_alloc(struct inode *ip, daddr_t lbn, e4fs_daddr_t if (cred == NOCRED) panic("ext2_alloc: missing credential"); #endif /* INVARIANTS */ - if (size == fs->e2fs_bsize && fs->e2fs->e2fs_fbcount == 0) + if (size == fs->e2fs_bsize && fs->e2fs_fbcount == 0) goto nospace; if (cred->cr_uid != 0 && - fs->e2fs->e2fs_fbcount < fs->e2fs->e2fs_rbcount) + fs->e2fs_fbcount < fs->e2fs_rbcount) goto nospace; - if (bpref >= fs->e2fs->e2fs_bcount) + if (bpref >= fs->e2fs_bcount) bpref = 0; if (bpref == 0) cg = ino_to_cg(fs, ip->i_number); @@ -455,6 +455,96 @@ noinodes: } /* + * 64-bit compatible getters and setters for struct ext2_gd from ext2fs.h + */ +static uint64_t +e2fs_gd_get_b_bitmap(struct ext2_gd *gd) +{ + + return (((uint64_t)(gd->ext4bgd_b_bitmap_hi) << 32) | + gd->ext2bgd_b_bitmap); +} + +static uint64_t +e2fs_gd_get_i_bitmap(struct ext2_gd *gd) +{ + + return (((uint64_t)(gd->ext4bgd_i_bitmap_hi) << 32) | + gd->ext2bgd_i_bitmap); +} + +uint64_t +e2fs_gd_get_i_tables(struct ext2_gd *gd) +{ + + return (((uint64_t)(gd->ext4bgd_i_tables_hi) << 32) | + gd->ext2bgd_i_tables); +} + +static uint32_t +e2fs_gd_get_nbfree(struct ext2_gd *gd) +{ + + return (((uint32_t)(gd->ext4bgd_nbfree_hi) << 16) | + gd->ext2bgd_nbfree); +} + +static void +e2fs_gd_set_nbfree(struct ext2_gd *gd, uint32_t val) +{ + + gd->ext2bgd_nbfree = val & 0xffff; + gd->ext4bgd_nbfree_hi = val >> 16; +} + +static uint32_t +e2fs_gd_get_nifree(struct ext2_gd *gd) +{ + + return (((uint32_t)(gd->ext4bgd_nifree_hi) << 16) | + gd->ext2bgd_nifree); +} + +static void +e2fs_gd_set_nifree(struct ext2_gd *gd, uint32_t val) +{ + + gd->ext2bgd_nifree = val & 0xffff; + gd->ext4bgd_nifree_hi = val >> 16; +} + +uint32_t +e2fs_gd_get_ndirs(struct ext2_gd *gd) +{ + + return (((uint32_t)(gd->ext4bgd_ndirs_hi) << 16) | + gd->ext2bgd_ndirs); +} + +static void +e2fs_gd_set_ndirs(struct ext2_gd *gd, uint32_t val) +{ + + gd->ext2bgd_ndirs = val & 0xffff; + gd->ext4bgd_ndirs_hi = val >> 16; +} + +static uint32_t +e2fs_gd_get_i_unused(struct ext2_gd *gd) +{ + return (((uint32_t)(gd->ext4bgd_i_unused_hi) << 16) | + gd->ext4bgd_i_unused); +} + +static void +e2fs_gd_set_i_unused(struct ext2_gd *gd, uint32_t val) +{ + + gd->ext4bgd_i_unused = val & 0xffff; + gd->ext4bgd_i_unused_hi = val >> 16; +} + +/* * Find a cylinder to place a directory. * * The policy implemented by this algorithm is to allocate a @@ -473,8 +563,9 @@ ext2_dirpref(struct inode *pip) { struct m_ext2fs *fs; int cg, prefcg, cgsize; - u_int avgifree, avgbfree, avgndir, curdirsize; - u_int minifree, minbfree, maxndir; + uint64_t avgbfree, minbfree; + u_int avgifree, avgndir, curdirsize; + u_int minifree, maxndir; u_int mincg, minndir; u_int dirsize, maxcontigdirs; @@ -482,7 +573,7 @@ ext2_dirpref(struct inode *pip) fs = pip->i_e2fs; avgifree = fs->e2fs->e2fs_ficount / fs->e2fs_gcount; - avgbfree = fs->e2fs->e2fs_fbcount / fs->e2fs_gcount; + avgbfree = fs->e2fs_fbcount / fs->e2fs_gcount; avgndir = fs->e2fs_total_dir / fs->e2fs_gcount; /* @@ -494,18 +585,18 @@ ext2_dirpref(struct inode *pip) mincg = prefcg; minndir = fs->e2fs_ipg; for (cg = prefcg; cg < fs->e2fs_gcount; cg++) - if (fs->e2fs_gd[cg].ext2bgd_ndirs < minndir && - fs->e2fs_gd[cg].ext2bgd_nifree >= avgifree && - fs->e2fs_gd[cg].ext2bgd_nbfree >= avgbfree) { + if (e2fs_gd_get_ndirs(&fs->e2fs_gd[cg]) < minndir && + e2fs_gd_get_nifree(&fs->e2fs_gd[cg]) >= avgifree && + e2fs_gd_get_nbfree(&fs->e2fs_gd[cg]) >= avgbfree) { mincg = cg; - minndir = fs->e2fs_gd[cg].ext2bgd_ndirs; + minndir = e2fs_gd_get_ndirs(&fs->e2fs_gd[cg]); } for (cg = 0; cg < prefcg; cg++) - if (fs->e2fs_gd[cg].ext2bgd_ndirs < minndir && - fs->e2fs_gd[cg].ext2bgd_nifree >= avgifree && - fs->e2fs_gd[cg].ext2bgd_nbfree >= avgbfree) { + if (e2fs_gd_get_ndirs(&fs->e2fs_gd[cg]) < minndir && + e2fs_gd_get_nifree(&fs->e2fs_gd[cg]) >= avgifree && + e2fs_gd_get_nbfree(&fs->e2fs_gd[cg]) >= avgbfree) { mincg = cg; - minndir = fs->e2fs_gd[cg].ext2bgd_ndirs; + minndir = e2fs_gd_get_ndirs(&fs->e2fs_gd[cg]); } return (mincg); } @@ -537,16 +628,16 @@ ext2_dirpref(struct inode *pip) */ prefcg = ino_to_cg(fs, pip->i_number); for (cg = prefcg; cg < fs->e2fs_gcount; cg++) - if (fs->e2fs_gd[cg].ext2bgd_ndirs < maxndir && - fs->e2fs_gd[cg].ext2bgd_nifree >= minifree && - fs->e2fs_gd[cg].ext2bgd_nbfree >= minbfree) { + if (e2fs_gd_get_ndirs(&fs->e2fs_gd[cg]) < maxndir && + e2fs_gd_get_nifree(&fs->e2fs_gd[cg]) >= minifree && + e2fs_gd_get_nbfree(&fs->e2fs_gd[cg]) >= minbfree) { if (fs->e2fs_contigdirs[cg] < maxcontigdirs) return (cg); } for (cg = 0; cg < prefcg; cg++) - if (fs->e2fs_gd[cg].ext2bgd_ndirs < maxndir && - fs->e2fs_gd[cg].ext2bgd_nifree >= minifree && - fs->e2fs_gd[cg].ext2bgd_nbfree >= minbfree) { + if (e2fs_gd_get_ndirs(&fs->e2fs_gd[cg]) < maxndir && + e2fs_gd_get_nifree(&fs->e2fs_gd[cg]) >= minifree && + e2fs_gd_get_nbfree(&fs->e2fs_gd[cg]) >= minbfree) { if (fs->e2fs_contigdirs[cg] < maxcontigdirs) return (cg); } @@ -554,10 +645,10 @@ ext2_dirpref(struct inode *pip) * This is a backstop when we have deficit in space. */ for (cg = prefcg; cg < fs->e2fs_gcount; cg++) - if (fs->e2fs_gd[cg].ext2bgd_nifree >= avgifree) + if (e2fs_gd_get_nifree(&fs->e2fs_gd[cg]) >= avgifree) return (cg); for (cg = 0; cg < prefcg; cg++) - if (fs->e2fs_gd[cg].ext2bgd_nifree >= avgifree) + if (e2fs_gd_get_nifree(&fs->e2fs_gd[cg]) >= avgifree) break; return (cg); } @@ -709,19 +800,6 @@ ext2_num_base_meta_blocks(struct m_ext2fs *fs, int cg) return (num); } -static int -ext2_get_cg_number(struct m_ext2fs *fs, daddr_t blk) -{ - int cg; - - if (fs->e2fs->e2fs_bpg == fs->e2fs_bsize * 8) - cg = (blk - fs->e2fs->e2fs_first_dblock) / (fs->e2fs_bsize * 8); - else - cg = blk - fs->e2fs->e2fs_first_dblock; - - return (cg); -} - static void ext2_mark_bitmap_end(int start_bit, int end_bit, char *bitmap) { @@ -740,10 +818,9 @@ static int ext2_cg_block_bitmap_init(struct m_ext2fs *fs, int cg, struct buf *bp) { int bit, bit_max, inodes_per_block; - uint32_t start, tmp; + uint64_t start, tmp; - if (!EXT2_HAS_RO_COMPAT_FEATURE(fs, EXT2F_ROCOMPAT_GDT_CSUM) || - !(fs->e2fs_gd[cg].ext4bgd_flags & EXT2_BG_BLOCK_UNINIT)) + if (!(fs->e2fs_gd[cg].ext4bgd_flags & EXT2_BG_BLOCK_UNINIT)) return (0); memset(bp->b_data, 0, fs->e2fs_bsize); @@ -755,25 +832,25 @@ ext2_cg_block_bitmap_init(struct m_ext2fs *fs, int cg, for (bit = 0; bit < bit_max; bit++) setbit(bp->b_data, bit); - start = cg * fs->e2fs->e2fs_bpg + fs->e2fs->e2fs_first_dblock; + start = (uint64_t)cg * fs->e2fs->e2fs_bpg + fs->e2fs->e2fs_first_dblock; - /* Set bits for block and inode bitmaps, and inode table */ - tmp = fs->e2fs_gd[cg].ext2bgd_b_bitmap; + /* Set bits for block and inode bitmaps, and inode table. */ + tmp = e2fs_gd_get_b_bitmap(&fs->e2fs_gd[cg]); if (!EXT2_HAS_INCOMPAT_FEATURE(fs, EXT2F_INCOMPAT_FLEX_BG) || - tmp == ext2_get_cg_number(fs, cg)) + cg == dtogd(fs, tmp)) setbit(bp->b_data, tmp - start); - tmp = fs->e2fs_gd[cg].ext2bgd_i_bitmap; + tmp = e2fs_gd_get_i_bitmap(&fs->e2fs_gd[cg]); if (!EXT2_HAS_INCOMPAT_FEATURE(fs, EXT2F_INCOMPAT_FLEX_BG) || - tmp == ext2_get_cg_number(fs, cg)) + cg == dtogd(fs, tmp)) setbit(bp->b_data, tmp - start); - tmp = fs->e2fs_gd[cg].ext2bgd_i_tables; + tmp = e2fs_gd_get_i_tables(&fs->e2fs_gd[cg]); inodes_per_block = fs->e2fs_bsize/EXT2_INODE_SIZE(fs); - while( tmp < fs->e2fs_gd[cg].ext2bgd_i_tables + + while( tmp < e2fs_gd_get_i_tables(&fs->e2fs_gd[cg]) + fs->e2fs->e2fs_ipg / inodes_per_block ) { if (!EXT2_HAS_INCOMPAT_FEATURE(fs, EXT2F_INCOMPAT_FLEX_BG) || - tmp == ext2_get_cg_number(fs, cg)) + cg == dtogd(fs, tmp)) setbit(bp->b_data, tmp - start); tmp++; } @@ -810,11 +887,11 @@ ext2_alloccg(struct inode *ip, int cg, daddr_t bpref, /* XXX ondisk32 */ fs = ip->i_e2fs; ump = ip->i_ump; - if (fs->e2fs_gd[cg].ext2bgd_nbfree == 0) + if (e2fs_gd_get_nbfree(&fs->e2fs_gd[cg]) == 0) return (0); EXT2_UNLOCK(ump); error = bread(ip->i_devvp, fsbtodb(fs, - fs->e2fs_gd[cg].ext2bgd_b_bitmap), + e2fs_gd_get_b_bitmap(&fs->e2fs_gd[cg])), (int)fs->e2fs_bsize, NOCRED, &bp); if (error) { brelse(bp); @@ -829,7 +906,7 @@ ext2_alloccg(struct inode *ip, int cg, daddr_t bpref, return (0); } } - if (fs->e2fs_gd[cg].ext2bgd_nbfree == 0) { + if (e2fs_gd_get_nbfree(&fs->e2fs_gd[cg]) == 0) { /* * Another thread allocated the last block in this * group while we were waiting for the buffer. @@ -926,12 +1003,13 @@ gotit: setbit(bbp, bno); EXT2_LOCK(ump); ext2_clusteracct(fs, bbp, cg, bno, -1); - fs->e2fs->e2fs_fbcount--; - fs->e2fs_gd[cg].ext2bgd_nbfree--; + fs->e2fs_fbcount--; + e2fs_gd_set_nbfree(&fs->e2fs_gd[cg], + e2fs_gd_get_nbfree(&fs->e2fs_gd[cg]) - 1); fs->e2fs_fmod = 1; EXT2_UNLOCK(ump); bdwrite(bp); - return (cg * fs->e2fs->e2fs_fpg + fs->e2fs->e2fs_first_dblock + bno); + return (((uint64_t)cg) * fs->e2fs->e2fs_fpg + fs->e2fs->e2fs_first_dblock + bno); } /* @@ -956,7 +1034,7 @@ ext2_clusteralloc(struct inode *ip, int cg, daddr_t bp EXT2_UNLOCK(ump); error = bread(ip->i_devvp, - fsbtodb(fs, fs->e2fs_gd[cg].ext2bgd_b_bitmap), + fsbtodb(fs, e2fs_gd_get_b_bitmap(&fs->e2fs_gd[cg])), (int)fs->e2fs_bsize, NOCRED, &bp); if (error) goto fail_lock; @@ -1026,8 +1104,9 @@ ext2_clusteralloc(struct inode *ip, int cg, daddr_t bp for (i = 0; i < len; i += fs->e2fs_fpb) { setbit(bbp, bno + i); ext2_clusteracct(fs, bbp, cg, bno + i, -1); - fs->e2fs->e2fs_fbcount--; - fs->e2fs_gd[cg].ext2bgd_nbfree--; + fs->e2fs_fbcount--; + e2fs_gd_set_nbfree(&fs->e2fs_gd[cg], + e2fs_gd_get_nbfree(&fs->e2fs_gd[cg]) - 1); } fs->e2fs_fmod = 1; EXT2_UNLOCK(ump); @@ -1058,12 +1137,12 @@ ext2_zero_inode_table(struct inode *ip, int cg) fs->e2fs_bsize; used_blks = howmany(fs->e2fs->e2fs_ipg - - fs->e2fs_gd[cg].ext4bgd_i_unused, + e2fs_gd_get_i_unused(&fs->e2fs_gd[cg]), fs->e2fs_bsize / EXT2_INODE_SIZE(fs)); for (i = 0; i < all_blks - used_blks; i++) { bp = getblk(ip->i_devvp, fsbtodb(fs, - fs->e2fs_gd[cg].ext2bgd_i_tables + used_blks + i), + e2fs_gd_get_i_tables(&fs->e2fs_gd[cg]) + used_blks + i), fs->e2fs_bsize, 0, 0, 0); if (!bp) return (EIO); @@ -1097,11 +1176,11 @@ ext2_nodealloccg(struct inode *ip, int cg, daddr_t ipr ipref = 0; fs = ip->i_e2fs; ump = ip->i_ump; - if (fs->e2fs_gd[cg].ext2bgd_nifree == 0) + if (e2fs_gd_get_nifree(&fs->e2fs_gd[cg]) == 0) return (0); EXT2_UNLOCK(ump); error = bread(ip->i_devvp, fsbtodb(fs, - fs->e2fs_gd[cg].ext2bgd_i_bitmap), + e2fs_gd_get_i_bitmap(&fs->e2fs_gd[cg])), (int)fs->e2fs_bsize, NOCRED, &bp); if (error) { brelse(bp); @@ -1120,7 +1199,7 @@ ext2_nodealloccg(struct inode *ip, int cg, daddr_t ipr return (0); } } - if (fs->e2fs_gd[cg].ext2bgd_nifree == 0) { + if (e2fs_gd_get_nifree(&fs->e2fs_gd[cg]) == 0) { /* * Another thread allocated the last i-node in this * group while we were waiting for the buffer. @@ -1153,18 +1232,21 @@ ext2_nodealloccg(struct inode *ip, int cg, daddr_t ipr gotit: setbit(ibp, ipref); EXT2_LOCK(ump); - fs->e2fs_gd[cg].ext2bgd_nifree--; + e2fs_gd_set_nifree(&fs->e2fs_gd[cg], + e2fs_gd_get_nifree(&fs->e2fs_gd[cg]) - 1); if (EXT2_HAS_RO_COMPAT_FEATURE(fs, EXT2F_ROCOMPAT_GDT_CSUM)) - fs->e2fs_gd[cg].ext4bgd_i_unused--; + e2fs_gd_set_i_unused(&fs->e2fs_gd[cg], + e2fs_gd_get_i_unused(&fs->e2fs_gd[cg]) - 1); fs->e2fs->e2fs_ficount--; fs->e2fs_fmod = 1; if ((mode & IFMT) == IFDIR) { - fs->e2fs_gd[cg].ext2bgd_ndirs++; + e2fs_gd_set_ndirs(&fs->e2fs_gd[cg], + e2fs_gd_get_ndirs(&fs->e2fs_gd[cg]) + 1); fs->e2fs_total_dir++; } EXT2_UNLOCK(ump); bdwrite(bp); - return (cg * fs->e2fs->e2fs_ipg + ipref + 1); + return ((uint64_t)cg * fs->e2fs_ipg + ipref + 1); } /* @@ -1183,14 +1265,14 @@ ext2_blkfree(struct inode *ip, e4fs_daddr_t bno, long fs = ip->i_e2fs; ump = ip->i_ump; cg = dtog(fs, bno); - if (bno >= fs->e2fs->e2fs_bcount) { + if (bno >= fs->e2fs_bcount) { printf("bad block %lld, ino %ju\n", (long long)bno, (uintmax_t)ip->i_number); ext2_fserr(fs, ip->i_uid, "bad block"); return; } error = bread(ip->i_devvp, - fsbtodb(fs, fs->e2fs_gd[cg].ext2bgd_b_bitmap), + fsbtodb(fs, e2fs_gd_get_b_bitmap(&fs->e2fs_gd[cg])), (int)fs->e2fs_bsize, NOCRED, &bp); if (error) { brelse(bp); @@ -1206,8 +1288,9 @@ ext2_blkfree(struct inode *ip, e4fs_daddr_t bno, long clrbit(bbp, bno); EXT2_LOCK(ump); ext2_clusteracct(fs, bbp, cg, bno, 1); - fs->e2fs->e2fs_fbcount++; - fs->e2fs_gd[cg].ext2bgd_nbfree++; + fs->e2fs_fbcount++; + e2fs_gd_set_nbfree(&fs->e2fs_gd[cg], + e2fs_gd_get_nbfree(&fs->e2fs_gd[cg]) + 1); fs->e2fs_fmod = 1; EXT2_UNLOCK(ump); bdwrite(bp); @@ -1236,7 +1319,7 @@ ext2_vfree(struct vnode *pvp, ino_t ino, int mode) cg = ino_to_cg(fs, ino); error = bread(pip->i_devvp, - fsbtodb(fs, fs->e2fs_gd[cg].ext2bgd_i_bitmap), + fsbtodb(fs, e2fs_gd_get_i_bitmap(&fs->e2fs_gd[cg])), (int)fs->e2fs_bsize, NOCRED, &bp); if (error) { brelse(bp); @@ -1253,11 +1336,14 @@ ext2_vfree(struct vnode *pvp, ino_t ino, int mode) clrbit(ibp, ino); EXT2_LOCK(ump); fs->e2fs->e2fs_ficount++; - fs->e2fs_gd[cg].ext2bgd_nifree++; + e2fs_gd_set_nifree(&fs->e2fs_gd[cg], + e2fs_gd_get_nifree(&fs->e2fs_gd[cg]) + 1); if (EXT2_HAS_RO_COMPAT_FEATURE(fs, EXT2F_ROCOMPAT_GDT_CSUM)) - fs->e2fs_gd[cg].ext4bgd_i_unused++; + e2fs_gd_set_i_unused(&fs->e2fs_gd[cg], + e2fs_gd_get_i_unused(&fs->e2fs_gd[cg]) + 1); if ((mode & IFMT) == IFDIR) { - fs->e2fs_gd[cg].ext2bgd_ndirs--; + e2fs_gd_set_ndirs(&fs->e2fs_gd[cg], + e2fs_gd_get_ndirs(&fs->e2fs_gd[cg]) - 1); fs->e2fs_total_dir--; } fs->e2fs_fmod = 1; Modified: head/sys/fs/ext2fs/ext2_balloc.c ============================================================================== --- head/sys/fs/ext2fs/ext2_balloc.c Fri Jan 5 09:31:41 2018 (r327583) +++ head/sys/fs/ext2fs/ext2_balloc.c Fri Jan 5 10:04:01 2018 (r327584) @@ -42,6 +42,7 @@ #include #include #include +#include #include #include #include @@ -60,13 +61,13 @@ ext2_ext_balloc(struct inode *ip, uint32_t lbn, int si struct m_ext2fs *fs; struct buf *bp = NULL; struct vnode *vp = ITOV(ip); - uint32_t nb; + daddr_t newblk; int osize, nsize, blks, error, allocated; fs = ip->i_e2fs; blks = howmany(size, fs->e2fs_bsize); - error = ext4_ext_get_blocks(ip, lbn, blks, cred, NULL, &allocated, &nb); + error = ext4_ext_get_blocks(ip, lbn, blks, cred, NULL, &allocated, &newblk); if (error) return (error); @@ -80,7 +81,7 @@ ext2_ext_balloc(struct inode *ip, uint32_t lbn, int si if(!bp) return (EIO); - bp->b_blkno = fsbtodb(fs, nb); + bp->b_blkno = fsbtodb(fs, newblk); if (flags & BA_CLRBUF) vfs_bio_clrbuf(bp); } else { @@ -91,7 +92,7 @@ ext2_ext_balloc(struct inode *ip, uint32_t lbn, int si brelse(bp); return (error); } - bp->b_blkno = fsbtodb(fs, nb); + bp->b_blkno = fsbtodb(fs, newblk); *bpp = bp; return (0); } @@ -101,21 +102,15 @@ ext2_ext_balloc(struct inode *ip, uint32_t lbn, int si */ osize = fragroundup(fs, blkoff(fs, ip->i_size)); nsize = fragroundup(fs, size); - if (nsize <= osize) { + if (nsize <= osize) error = bread(vp, lbn, osize, NOCRED, &bp); - if (error) { - brelse(bp); - return (error); - } - bp->b_blkno = fsbtodb(fs, nb); - } else { + else error = bread(vp, lbn, fs->e2fs_bsize, NOCRED, &bp); - if (error) { - brelse(bp); - return (error); - } - bp->b_blkno = fsbtodb(fs, nb); + if (error) { + brelse(bp); + return (error); } + bp->b_blkno = fsbtodb(fs, newblk); } *bpp = bp; @@ -218,6 +213,12 @@ ext2_balloc(struct inode *ip, e2fs_lbn_t lbn, int size nsize, cred, &newb); if (error) return (error); + /* + * If the newly allocated block exceeds 32-bit limit, + * we can not use it in file block maps. + */ + if (newb > UINT_MAX) + return (EFBIG); bp = getblk(vp, lbn, nsize, 0, 0, 0); bp->b_blkno = fsbtodb(fs, newb); if (flags & BA_CLRBUF) @@ -250,6 +251,8 @@ ext2_balloc(struct inode *ip, e2fs_lbn_t lbn, int size if ((error = ext2_alloc(ip, lbn, pref, fs->e2fs_bsize, cred, &newb))) return (error); + if (newb > UINT_MAX) + return (EFBIG); nb = newb; bp = getblk(vp, indirs[1].in_lbn, fs->e2fs_bsize, 0, 0, 0); bp->b_blkno = fsbtodb(fs, newb); @@ -293,6 +296,8 @@ ext2_balloc(struct inode *ip, e2fs_lbn_t lbn, int size brelse(bp); return (error); } + if (newb > UINT_MAX) + return (EFBIG); nb = newb; nbp = getblk(vp, indirs[i].in_lbn, fs->e2fs_bsize, 0, 0, 0); nbp->b_blkno = fsbtodb(fs, nb); @@ -332,6 +337,8 @@ ext2_balloc(struct inode *ip, e2fs_lbn_t lbn, int size brelse(bp); return (error); } + if (newb > UINT_MAX) + return (EFBIG); nb = newb; nbp = getblk(vp, lbn, fs->e2fs_bsize, 0, 0, 0); nbp->b_blkno = fsbtodb(fs, nb); Modified: head/sys/fs/ext2fs/ext2_csum.c ============================================================================== --- head/sys/fs/ext2fs/ext2_csum.c Fri Jan 5 09:31:41 2018 (r327583) +++ head/sys/fs/ext2fs/ext2_csum.c Fri Jan 5 10:04:01 2018 (r327584) @@ -110,7 +110,7 @@ ext2_gd_csum(struct m_ext2fs *fs, uint32_t block_group if (EXT2_HAS_INCOMPAT_FEATURE(fs, EXT2F_INCOMPAT_64BIT) && offset < fs->e2fs->e3fs_desc_size) crc = ext2_crc16(crc, (uint8_t *)gd + offset, - fs->e2fs->e3fs_desc_size - offset); + fs->e2fs->e3fs_desc_size - offset); return (crc); } Modified: head/sys/fs/ext2fs/ext2_extents.c ============================================================================== --- head/sys/fs/ext2fs/ext2_extents.c Fri Jan 5 09:31:41 2018 (r327583) +++ head/sys/fs/ext2fs/ext2_extents.c Fri Jan 5 10:04:01 2018 (r327584) @@ -1188,7 +1188,7 @@ ext4_new_blocks(struct inode *ip, daddr_t lbn, e4fs_da int ext4_ext_get_blocks(struct inode *ip, e4fs_daddr_t iblk, unsigned long max_blocks, struct ucred *cred, struct buf **bpp, - int *pallocated, uint32_t *nb) + int *pallocated, daddr_t *nb) { struct m_ext2fs *fs; struct buf *bp = NULL; Modified: head/sys/fs/ext2fs/ext2_extents.h ============================================================================== --- head/sys/fs/ext2fs/ext2_extents.h Fri Jan 5 09:31:41 2018 (r327583) +++ head/sys/fs/ext2fs/ext2_extents.h Fri Jan 5 10:04:01 2018 (r327584) @@ -120,7 +120,8 @@ void ext4_ext_path_free(struct ext4_extent_path *path) int ext4_ext_remove_space(struct inode *ip, off_t length, int flags, struct ucred *cred, struct thread *td); int ext4_ext_get_blocks(struct inode *ip, int64_t iblock, - unsigned long max_blocks, struct ucred *cred, struct buf **bpp, int *allocate, uint32_t *); + unsigned long max_blocks, struct ucred *cred, struct buf **bpp, + int *allocate, daddr_t *); #ifdef EXT2FS_DEBUG void ext4_ext_print_extent_tree_status(struct inode * ip); #endif Modified: head/sys/fs/ext2fs/ext2_extern.h ============================================================================== --- head/sys/fs/ext2fs/ext2_extern.h Fri Jan 5 09:31:41 2018 (r327583) +++ head/sys/fs/ext2fs/ext2_extern.h Fri Jan 5 10:04:01 2018 (r327584) @@ -102,6 +102,8 @@ int ext2_htree_lookup(struct inode *, const char *, in int *, doff_t *, doff_t *, doff_t *, struct ext2fs_searchslot *); int ext2_search_dirblock(struct inode *, void *, int *, const char *, int, int *, doff_t *, doff_t *, doff_t *, struct ext2fs_searchslot *); +uint32_t e2fs_gd_get_ndirs(struct ext2_gd *gd); +uint64_t e2fs_gd_get_i_tables(struct ext2_gd *gd); int ext2_gd_csum_verify(struct m_ext2fs *fs, struct cdev *dev); void ext2_gd_csum_set(struct m_ext2fs *fs); Modified: head/sys/fs/ext2fs/ext2_hash.c ============================================================================== --- head/sys/fs/ext2fs/ext2_hash.c Fri Jan 5 09:31:41 2018 (r327583) +++ head/sys/fs/ext2fs/ext2_hash.c Fri Jan 5 10:04:01 2018 (r327584) @@ -60,6 +60,7 @@ #include #include +#include #include #include #include Modified: head/sys/fs/ext2fs/ext2_subr.c ============================================================================== --- head/sys/fs/ext2fs/ext2_subr.c Fri Jan 5 09:31:41 2018 (r327583) +++ head/sys/fs/ext2fs/ext2_subr.c Fri Jan 5 10:04:01 2018 (r327584) @@ -49,8 +49,8 @@ #include #include -#include #include +#include #include #include #include Modified: head/sys/fs/ext2fs/ext2_vfsops.c ============================================================================== --- head/sys/fs/ext2fs/ext2_vfsops.c Fri Jan 5 09:31:41 2018 (r327583) +++ head/sys/fs/ext2fs/ext2_vfsops.c Fri Jan 5 10:04:01 2018 (r327584) @@ -326,12 +326,20 @@ static int compute_sb_data(struct vnode *devvp, struct ext2fs *es, struct m_ext2fs *fs) { - int db_count, error; - int i; + int g_count = 0, error; + int i, j; int logic_sb_block = 1; /* XXX for now */ struct buf *bp; - uint32_t e2fs_descpb; + uint32_t e2fs_descpb, e2fs_gdbcount_alloc; + fs->e2fs_bcount = es->e2fs_bcount; + fs->e2fs_rbcount = es->e2fs_rbcount; + fs->e2fs_fbcount = es->e2fs_fbcount; + if (EXT2_HAS_INCOMPAT_FEATURE(fs, EXT2F_INCOMPAT_64BIT)) { + fs->e2fs_bcount |= (uint64_t)(es->e4fs_bcount_hi) << 32; + fs->e2fs_rbcount |= (uint64_t)(es->e4fs_rbcount_hi) << 32; + fs->e2fs_fbcount |= (uint64_t)(es->e4fs_fbcount_hi) << 32; + } fs->e2fs_bshift = EXT2_MIN_BLOCK_LOG_SIZE + es->e2fs_log_bsize; fs->e2fs_bsize = 1U << fs->e2fs_bshift; fs->e2fs_fsbtodb = es->e2fs_log_bsize + 1; @@ -375,13 +383,19 @@ compute_sb_data(struct vnode *devvp, struct ext2fs *es fs->e2fs_ipb = fs->e2fs_bsize / EXT2_INODE_SIZE(fs); fs->e2fs_itpg = fs->e2fs_ipg / fs->e2fs_ipb; /* s_resuid / s_resgid ? */ - fs->e2fs_gcount = howmany(es->e2fs_bcount - es->e2fs_first_dblock, + fs->e2fs_gcount = howmany(fs->e2fs_bcount - es->e2fs_first_dblock, EXT2_BLOCKS_PER_GROUP(fs)); - e2fs_descpb = fs->e2fs_bsize / sizeof(struct ext2_gd); - db_count = howmany(fs->e2fs_gcount, e2fs_descpb); - fs->e2fs_gdbcount = db_count; - fs->e2fs_gd = malloc(db_count * fs->e2fs_bsize, - M_EXT2MNT, M_WAITOK); + if (EXT2_HAS_INCOMPAT_FEATURE(fs, EXT2F_INCOMPAT_64BIT)) { + e2fs_descpb = fs->e2fs_bsize / sizeof(struct ext2_gd); + e2fs_gdbcount_alloc = howmany(fs->e2fs_gcount, e2fs_descpb); + } else { + e2fs_descpb = fs->e2fs_bsize / E2FS_REV0_GD_SIZE; + e2fs_gdbcount_alloc = howmany(fs->e2fs_gcount, + fs->e2fs_bsize / sizeof(struct ext2_gd)); + } + fs->e2fs_gdbcount = howmany(fs->e2fs_gcount, e2fs_descpb); + fs->e2fs_gd = malloc(e2fs_gdbcount_alloc * fs->e2fs_bsize, + M_EXT2MNT, M_WAITOK | M_ZERO); fs->e2fs_contigdirs = malloc(fs->e2fs_gcount * sizeof(*fs->e2fs_contigdirs), M_EXT2MNT, M_WAITOK | M_ZERO); @@ -392,7 +406,7 @@ compute_sb_data(struct vnode *devvp, struct ext2fs *es */ if (fs->e2fs_bsize > SBSIZE) logic_sb_block = 0; - for (i = 0; i < db_count; i++) { + for (i = 0; i < fs->e2fs_gdbcount; i++) { error = bread(devvp, fsbtodb(fs, logic_sb_block + i + 1), fs->e2fs_bsize, NOCRED, &bp); @@ -402,10 +416,17 @@ compute_sb_data(struct vnode *devvp, struct ext2fs *es brelse(bp); return (error); } - e2fs_cgload((struct ext2_gd *)bp->b_data, - &fs->e2fs_gd[ - i * fs->e2fs_bsize / sizeof(struct ext2_gd)], - fs->e2fs_bsize); + if (EXT2_HAS_INCOMPAT_FEATURE(fs, EXT2F_INCOMPAT_64BIT)) { + memcpy(&fs->e2fs_gd[ + i * fs->e2fs_bsize / sizeof(struct ext2_gd)], + bp->b_data, fs->e2fs_bsize); + } else { + for (j = 0; j < e2fs_descpb && + g_count < fs->e2fs_gcount; j++, g_count++) + memcpy(&fs->e2fs_gd[g_count], + bp->b_data + j * E2FS_REV0_GD_SIZE, + E2FS_REV0_GD_SIZE); + } brelse(bp); bp = NULL; } @@ -823,9 +844,9 @@ ext2_statfs(struct mount *mp, struct statfs *sbp) sbp->f_bsize = EXT2_FRAG_SIZE(fs); sbp->f_iosize = EXT2_BLOCK_SIZE(fs); - sbp->f_blocks = fs->e2fs->e2fs_bcount - overhead; - sbp->f_bfree = fs->e2fs->e2fs_fbcount; - sbp->f_bavail = sbp->f_bfree - fs->e2fs->e2fs_rbcount; + sbp->f_blocks = fs->e2fs_bcount - overhead; + sbp->f_bfree = fs->e2fs_fbcount; + sbp->f_bavail = sbp->f_bfree - fs->e2fs_rbcount; sbp->f_files = fs->e2fs->e2fs_icount; sbp->f_ffree = fs->e2fs->e2fs_ficount; return (0); @@ -1069,6 +1090,15 @@ ext2_sbupdate(struct ext2mount *mp, int waitfor) struct buf *bp; int error = 0; + es->e2fs_bcount = fs->e2fs_bcount & 0xffffffff; + es->e2fs_rbcount = fs->e2fs_rbcount & 0xffffffff; + es->e2fs_fbcount = fs->e2fs_fbcount & 0xffffffff; + if (EXT2_HAS_INCOMPAT_FEATURE(fs, EXT2F_INCOMPAT_64BIT)) { + es->e4fs_bcount_hi = fs->e2fs_bcount >> 32; + es->e4fs_rbcount_hi = fs->e2fs_rbcount >> 32; + es->e4fs_fbcount_hi = fs->e2fs_fbcount >> 32; + } + bp = getblk(mp->um_devvp, SBLOCK, SBSIZE, 0, 0, 0); bcopy((caddr_t)es, bp->b_data, (u_int)sizeof(struct ext2fs)); if (waitfor == MNT_WAIT) @@ -1088,7 +1118,7 @@ ext2_cgupdate(struct ext2mount *mp, int waitfor) { struct m_ext2fs *fs = mp->um_e2fs; struct buf *bp; - int i, error = 0, allerror = 0; + int i, j, g_count = 0, error = 0, allerror = 0; allerror = ext2_sbupdate(mp, waitfor); @@ -1100,9 +1130,16 @@ ext2_cgupdate(struct ext2mount *mp, int waitfor) bp = getblk(mp->um_devvp, fsbtodb(fs, fs->e2fs->e2fs_first_dblock + 1 /* superblock */ + i), fs->e2fs_bsize, 0, 0, 0); - e2fs_cgsave(&fs->e2fs_gd[ - i * fs->e2fs_bsize / sizeof(struct ext2_gd)], - (struct ext2_gd *)bp->b_data, fs->e2fs_bsize); + if (EXT2_HAS_INCOMPAT_FEATURE(fs, EXT2F_INCOMPAT_64BIT)) { + memcpy(bp->b_data, &fs->e2fs_gd[ + i * fs->e2fs_bsize / sizeof(struct ext2_gd)], + fs->e2fs_bsize); + } else { + for (j = 0; j < fs->e2fs_bsize / E2FS_REV0_GD_SIZE && + g_count < fs->e2fs_gcount; j++, g_count++) + memcpy(bp->b_data + j * E2FS_REV0_GD_SIZE, + &fs->e2fs_gd[g_count], E2FS_REV0_GD_SIZE); + } if (waitfor == MNT_WAIT) error = bwrite(bp); else Modified: head/sys/fs/ext2fs/ext2_vnops.c ============================================================================== --- head/sys/fs/ext2fs/ext2_vnops.c Fri Jan 5 09:31:41 2018 (r327583) +++ head/sys/fs/ext2fs/ext2_vnops.c Fri Jan 5 10:04:01 2018 (r327584) @@ -84,8 +84,8 @@ #include #include #include -#include #include +#include #include #include #include Modified: head/sys/fs/ext2fs/ext2fs.h ============================================================================== --- head/sys/fs/ext2fs/ext2fs.h Fri Jan 5 09:31:41 2018 (r327583) +++ head/sys/fs/ext2fs/ext2fs.h Fri Jan 5 10:04:01 2018 (r327584) @@ -156,6 +156,9 @@ struct m_ext2fs { char e2fs_fsmnt[MAXMNTLEN];/* name mounted on */ char e2fs_ronly; /* mounted read-only flag */ char e2fs_fmod; /* super block modified flag */ + uint64_t e2fs_bcount; /* blocks count */ + uint64_t e2fs_rbcount; /* reserved blocks count */ + uint64_t e2fs_fbcount; /* free blocks count */ uint32_t e2fs_bsize; /* Block size */ uint32_t e2fs_bshift; /* calc of logical block no */ uint32_t e2fs_bpg; /* Number of blocks per group */ @@ -323,7 +326,8 @@ static const struct ext2_feature incompat[] = { EXT2F_ROCOMPAT_DIR_NLINK | \ EXT2F_ROCOMPAT_HUGE_FILE | \ EXT2F_ROCOMPAT_EXTRA_ISIZE) -#define EXT2F_INCOMPAT_SUPP EXT2F_INCOMPAT_FTYPE +#define EXT2F_INCOMPAT_SUPP (EXT2F_INCOMPAT_FTYPE | \ + EXT2F_INCOMPAT_64BIT) #define EXT4F_RO_INCOMPAT_SUPP (EXT2F_INCOMPAT_EXTENTS | \ EXT2F_INCOMPAT_RECOVER | \ EXT2F_INCOMPAT_FLEX_BG | \ @@ -375,14 +379,20 @@ struct ext2_gd { uint16_t ext4bgd_i_bmap_csum; /* inode bitmap checksum */ uint16_t ext4bgd_i_unused; /* unused inode count */ uint16_t ext4bgd_csum; /* group descriptor checksum */ + uint32_t ext4bgd_b_bitmap_hi; /* high bits of blocks bitmap block */ + uint32_t ext4bgd_i_bitmap_hi; /* high bits of inodes bitmap block */ + uint32_t ext4bgd_i_tables_hi; /* high bits of inodes table block */ + uint16_t ext4bgd_nbfree_hi; /* high bits of number of free blocks */ + uint16_t ext4bgd_nifree_hi; /* high bits of number of free inodes */ + uint16_t ext4bgd_ndirs_hi; /* high bits of number of directories */ + uint16_t ext4bgd_i_unused_hi; /* high bits of unused inode count */ + uint32_t ext4bgd_x_bitmap_hi; /* high bits of snapshot exclusion */ + uint16_t ext4bgd_b_bmap_csum_hi;/* high bits of block bitmap checksum */ + uint16_t ext4bgd_i_bmap_csum_hi;/* high bits of inode bitmap checksum */ + uint32_t ext4bgd_reserved; }; -/* EXT2FS metadata is stored in little-endian byte order. These macros - * help reading it. - */ - -#define e2fs_cgload(old, new, size) memcpy((new), (old), (size)); -#define e2fs_cgsave(old, new, size) memcpy((new), (old), (size)); +#define E2FS_REV0_GD_SIZE (sizeof(struct ext2_gd) / 2) /* * Macro-instructions used to manage several block sizes Modified: head/sys/fs/ext2fs/fs.h ============================================================================== --- head/sys/fs/ext2fs/fs.h Fri Jan 5 09:31:41 2018 (r327583) +++ head/sys/fs/ext2fs/fs.h Fri Jan 5 10:04:01 2018 (r327584) @@ -108,7 +108,7 @@ /* get block containing inode from its number x */ #define ino_to_fsba(fs, x) \ - ((fs)->e2fs_gd[ino_to_cg((fs), (x))].ext2bgd_i_tables + \ + (e2fs_gd_get_i_tables(&(fs)->e2fs_gd[ino_to_cg((fs), (x))]) + \ (((x) - 1) % (fs)->e2fs->e2fs_ipg) / (fs)->e2fs_ipb) /* get offset for inode in block */ From owner-svn-src-head@freebsd.org Fri Jan 5 13:37:04 2018 Return-Path: Delivered-To: svn-src-head@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 BC301EA99FD; Fri, 5 Jan 2018 13:37:04 +0000 (UTC) (envelope-from eugen@grosbein.net) Received: from hz.grosbein.net (hz.grosbein.net [78.47.246.247]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "hz.grosbein.net", Issuer "hz.grosbein.net" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4AFEF693E1; Fri, 5 Jan 2018 13:37:03 +0000 (UTC) (envelope-from eugen@grosbein.net) Received: from eg.sd.rdtc.ru (root@eg.sd.rdtc.ru [62.231.161.221] (may be forged)) by hz.grosbein.net (8.15.2/8.15.2) with ESMTPS id w05DauRk038316 (version=TLSv1.2 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Fri, 5 Jan 2018 14:36:56 +0100 (CET) (envelope-from eugen@grosbein.net) X-Envelope-From: eugen@grosbein.net X-Envelope-To: slw@zxy.spb.ru Received: from [10.58.0.4] ([10.58.0.4]) by eg.sd.rdtc.ru (8.15.2/8.15.2) with ESMTPS id w05DaqmR052554 (version=TLSv1.2 cipher=DHE-RSA-AES128-SHA bits=128 verify=NOT); Fri, 5 Jan 2018 20:36:52 +0700 (+07) (envelope-from eugen@grosbein.net) Subject: Re: svn commit: r327559 - in head: . sys/net To: Slawa Olhovchenkov References: <201801042005.w04K5liB049411@repo.freebsd.org> <5A4E9397.9000308@grosbein.net> <20180105131105.GB5368@zxy.spb.ru> Cc: Steven Hartland , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org From: Eugene Grosbein Message-ID: <5A4F7F70.5050106@grosbein.net> Date: Fri, 5 Jan 2018 20:36:48 +0700 User-Agent: Mozilla/5.0 (Windows NT 6.3; WOW64; rv:38.0) Gecko/20100101 Thunderbird/38.7.2 MIME-Version: 1.0 In-Reply-To: <20180105131105.GB5368@zxy.spb.ru> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=2.2 required=5.0 tests=BAYES_00, LOCAL_FROM, RDNS_NONE autolearn=no autolearn_force=no version=3.4.1 X-Spam-Report: * -2.3 BAYES_00 BODY: Bayes spam probability is 0 to 1% * [score: 0.0000] * 2.6 LOCAL_FROM From my domains * 1.9 RDNS_NONE Delivered to internal network by a host with no rDNS X-Spam-Level: ** X-Spam-Checker-Version: SpamAssassin 3.4.1 (2015-04-28) on hz.grosbein.net X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 05 Jan 2018 13:37:04 -0000 05.01.2018 20:11, Slawa Olhovchenkov wrote: > Irrelevant to RSS and etc. flowid distribution in lacp case work very > bad. This is good and must be MFC (IMHO). It may work bad depending on NIC and/or traffic type. It works just fine in common case of IP forwarding for packets with TCP/UDP inside. It can be easily disabled locally for specific cases when it does not work. From owner-svn-src-head@freebsd.org Fri Jan 5 13:41:44 2018 Return-Path: Delivered-To: svn-src-head@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 6EE1FEA9F38; Fri, 5 Jan 2018 13:41:44 +0000 (UTC) (envelope-from eugen@grosbein.net) Received: from hz.grosbein.net (hz.grosbein.net [78.47.246.247]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "hz.grosbein.net", Issuer "hz.grosbein.net" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id D76F669870; Fri, 5 Jan 2018 13:41:43 +0000 (UTC) (envelope-from eugen@grosbein.net) Received: from eg.sd.rdtc.ru (root@eg.sd.rdtc.ru [62.231.161.221] (may be forged)) by hz.grosbein.net (8.15.2/8.15.2) with ESMTPS id w05DfZ87038348 (version=TLSv1.2 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Fri, 5 Jan 2018 14:41:36 +0100 (CET) (envelope-from eugen@grosbein.net) X-Envelope-From: eugen@grosbein.net X-Envelope-To: steven@multiplay.co.uk Received: from [10.58.0.4] ([10.58.0.4]) by eg.sd.rdtc.ru (8.15.2/8.15.2) with ESMTPS id w05DfWOK053856 (version=TLSv1.2 cipher=DHE-RSA-AES128-SHA bits=128 verify=NOT); Fri, 5 Jan 2018 20:41:32 +0700 (+07) (envelope-from eugen@grosbein.net) Subject: Re: svn commit: r327559 - in head: . sys/net To: Steven Hartland , hiren panchasara References: <201801042005.w04K5liB049411@repo.freebsd.org> <5A4E9397.9000308@grosbein.net> <20180104224214.GD18879@strugglingcoder.info> <63c3c450-aeaf-bdd5-5e16-414146c9bb3a@multiplay.co.uk> <5A4EDE65.1010201@grosbein.net> <688c4d08-3dac-545f-1bed-b21270a03eca@multiplay.co.uk> Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org From: Eugene Grosbein Message-ID: <5A4F8088.2030700@grosbein.net> Date: Fri, 5 Jan 2018 20:41:28 +0700 User-Agent: Mozilla/5.0 (Windows NT 6.3; WOW64; rv:38.0) Gecko/20100101 Thunderbird/38.7.2 MIME-Version: 1.0 In-Reply-To: <688c4d08-3dac-545f-1bed-b21270a03eca@multiplay.co.uk> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=2.2 required=5.0 tests=BAYES_00, LOCAL_FROM, RDNS_NONE autolearn=no autolearn_force=no version=3.4.1 X-Spam-Report: * -2.3 BAYES_00 BODY: Bayes spam probability is 0 to 1% * [score: 0.0000] * 2.6 LOCAL_FROM From my domains * 1.9 RDNS_NONE Delivered to internal network by a host with no rDNS X-Spam-Level: ** X-Spam-Checker-Version: SpamAssassin 3.4.1 (2015-04-28) on hz.grosbein.net X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 05 Jan 2018 13:41:44 -0000 05.01.2018 16:34, Steven Hartland wrote: >>> I hope there's some improvements that can be made, for example if we can determine >>> the stream was instigated remotely then flowid would always be valid hence we can use it assuming it >>> matches the requested spec or if we can make it clear to the user that laggproto is not the one they requested, I'm open to ideas? >> We just need to clear flow id from incoming TCP segments and always generate new flow id for responses >> keeping old flow id for IP forwarding case. Please back out your change to not degrade IP forwarding performance. > Sorry I don't follow you. You seem to be inferring that we can easily generate a flowid without involving the sending hardware RSS has nothing to do with sending hardware. It's operating system's job to choose outgoing port, not hardware's job. > I can't see how that is possible as that's chicken and egg i.e. you can't get the HW interface > to generate the flowid without sending a packet and you can't send a packet > until you have a the flowid to decide which interface to send it from. Outgoing packet flow does not and should not depend on incoming flow, they are independent things in case of LACP. There is no "chicken and egg" problem at all. From owner-svn-src-head@freebsd.org Fri Jan 5 13:49:32 2018 Return-Path: Delivered-To: svn-src-head@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 8112CEAA54F; Fri, 5 Jan 2018 13:49:32 +0000 (UTC) (envelope-from eugen@grosbein.net) Received: from hz.grosbein.net (hz.grosbein.net [78.47.246.247]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "hz.grosbein.net", Issuer "hz.grosbein.net" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 2380369C0C; Fri, 5 Jan 2018 13:49:31 +0000 (UTC) (envelope-from eugen@grosbein.net) Received: from eg.sd.rdtc.ru (root@eg.sd.rdtc.ru [62.231.161.221] (may be forged)) by hz.grosbein.net (8.15.2/8.15.2) with ESMTPS id w05DnIZc038388 (version=TLSv1.2 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Fri, 5 Jan 2018 14:49:19 +0100 (CET) (envelope-from eugen@grosbein.net) X-Envelope-From: eugen@grosbein.net X-Envelope-To: steven@multiplay.co.uk Received: from [10.58.0.4] ([10.58.0.4]) by eg.sd.rdtc.ru (8.15.2/8.15.2) with ESMTPS id w05Dn4kN055927 (version=TLSv1.2 cipher=DHE-RSA-AES128-SHA bits=128 verify=NOT); Fri, 5 Jan 2018 20:49:04 +0700 (+07) (envelope-from eugen@grosbein.net) Subject: Re: svn commit: r327559 - in head: . sys/net To: Steven Hartland , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org References: <201801042005.w04K5liB049411@repo.freebsd.org> <5A4E9397.9000308@grosbein.net> <5A4EDC62.50508@grosbein.net> From: Eugene Grosbein Message-ID: <5A4F824C.1060405@grosbein.net> Date: Fri, 5 Jan 2018 20:49:00 +0700 User-Agent: Mozilla/5.0 (Windows NT 6.3; WOW64; rv:38.0) Gecko/20100101 Thunderbird/38.7.2 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=2.2 required=5.0 tests=BAYES_00, LOCAL_FROM, RDNS_NONE autolearn=no autolearn_force=no version=3.4.1 X-Spam-Report: * -2.3 BAYES_00 BODY: Bayes spam probability is 0 to 1% * [score: 0.0000] * 2.6 LOCAL_FROM From my domains * 1.9 RDNS_NONE Delivered to internal network by a host with no rDNS X-Spam-Level: ** X-Spam-Checker-Version: SpamAssassin 3.4.1 (2015-04-28) on hz.grosbein.net X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 05 Jan 2018 13:49:32 -0000 05.01.2018 16:26, Steven Hartland пишет: > > On 05/01/2018 02:01, Eugene Grosbein wrote: >> 05.01.2018 4:52, Steven Hartland wrote: >> >>>> RSS by definition has meaning to received stream. What is "outbound" stream >>>> in this context, why can the hash calculatiom method change and what exactly >>>> does it mean "a stream being incorrectly split"? >>> Yes RSS is indeed a received stream but that is used by lagg for lacp and loadbalance protocols >>> to decide which port of the lagg to "send" the packet out of. >>> As the flowid is not known when a new "output" stream is instigated the current code >>> falls back to manual hash calculation to determine which port to send the initial packet from. >>> Once a response is received a tx then uses the flowid. >>> This change of hash calculation method can result in the initial packet being sent >>> from a different port than the rest of the stream; this is what I meant by "incorrectly split". >>> >>> See the following: >>> https://github.com/freebsd/freebsd/blob/master/sys/net/if_lagg.c#L2066 >>> https://github.com/freebsd/freebsd/blob/master/sys/net/ieee8023ad_lacp.c#L846 >> I still do not get what is "output stream" for you. >> >> If you are talking on forwarding (routing) transit packets at IP layer, >> they all have flowid from the beginning and first packet does not differ from others at all. > At the simplest level its a tcp stream that is started from the host. So given we have hostA (src) and hostB (dest), the output stream is one started by hostA with a destination of hostB where hostA is configured with lagg. > > In this case with use_flowid we've confirmed we get the following (the interfaces used vary per flow of cause): > hostA - SYN (ix0) -> hostB # Manual hash calculated > hostB - SYN,ACK (ix0) -> hostA# flowid used > hostA - ACK (ix1) -> hostB # flowid used > hostA - Data(ix1) -> hostB # flowid used > hostB - ACK (ix0) -> hostA # flowid used > ... > > Here hostA and hostB both had lagg0 comprising of ix0 and ix1. It should be: hostA - SYN (ix0) -> hostB # Manual hash (1) calculated hostB - SYN,ACK (ix0) -> hostA# hardware flowid (2) received hostA - ACK (ix1) -> hostB # Manual hash (1) calculated hostA - Data(ix1) -> hostB # hardware flowid (2 or 3) received hostB - ACK (ix0) -> hostA # Manual hash (1) calculated That is, there is no guarantee of persistance of flowid of incoming packets as they can be received with distinct ports of lagg being distinct hardware computing flowid differently. Some ports may not support RSS at all. We should not use incoming hardware flowid for anything by default in case of TCP. >> If you are talking on locally originated (not transit) data streem from local TCP socket >> being sent in response to corresponding incoming TCP segments, then these outgoing >> packets should have their own fixed flow id by default in case of LACP >> and thhis flow id should not depend on (possibly ever changing) flow id of incoming TCP segments. > Nope in this case we have all the information needed, but I don't believe we can't tell that's the case. >> If you insist that flow id of outgoing packets does depend on ever changing incoming packet's flow id, >> then this is the bug that should be fixed and not lagg's defaults. > As detailed above once the session is established then the flowid remains fixed. Why do you mix flowid of incoming stream with flowid of outgoing stream? From owner-svn-src-head@freebsd.org Fri Jan 5 13:54:11 2018 Return-Path: Delivered-To: svn-src-head@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 46130EAA9AA; Fri, 5 Jan 2018 13:54:11 +0000 (UTC) (envelope-from slw@zxy.spb.ru) Received: from zxy.spb.ru (zxy.spb.ru [195.70.199.98]) (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 045F26A0B9; Fri, 5 Jan 2018 13:54:11 +0000 (UTC) (envelope-from slw@zxy.spb.ru) Received: from slw by zxy.spb.ru with local (Exim 4.86 (FreeBSD)) (envelope-from ) id 1eXRm6-000LQ3-3D; Fri, 05 Jan 2018 16:11:06 +0300 Date: Fri, 5 Jan 2018 16:11:06 +0300 From: Slawa Olhovchenkov To: Eugene Grosbein Cc: Steven Hartland , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r327559 - in head: . sys/net Message-ID: <20180105131105.GB5368@zxy.spb.ru> References: <201801042005.w04K5liB049411@repo.freebsd.org> <5A4E9397.9000308@grosbein.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <5A4E9397.9000308@grosbein.net> User-Agent: Mutt/1.5.24 (2015-08-30) X-SA-Exim-Connect-IP: X-SA-Exim-Mail-From: slw@zxy.spb.ru X-SA-Exim-Scanned: No (on zxy.spb.ru); SAEximRunCond expanded to false X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 05 Jan 2018 13:54:11 -0000 On Fri, Jan 05, 2018 at 03:50:31AM +0700, Eugene Grosbein wrote: > 05.01.2018 3:05, Steven Hartland wrote: > > > Author: smh > > Date: Thu Jan 4 20:05:47 2018 > > New Revision: 327559 > > URL: https://svnweb.freebsd.org/changeset/base/327559 > > > > Log: > > Disabled the use of flowid for lagg by default > > > > Disabled the use of RSS hash from the network card aka flowid for > > lagg(4) interfaces by default as it's currently incompatible with > > the lacp and loadbalance protocols. > > > > The incompatibility is due to the fact that the flowid isn't know > > for the first packet of a new outbound stream which can result in > > the hash calculation method changing and hence a stream being > > incorrectly split across multiple interfaces during normal > > operation. > > > > This can be re-enabled by setting the following in loader.conf: > > net.link.lagg.default_use_flowid="1" > > > > Discussed with: kmacy > > Sponsored by: Multiplay > > RSS by definition has meaning to received stream. What is "outbound" stream > in this context, why can the hash calculatiom method change and what exactly > does it mean "a stream being incorrectly split"? > > Defaults should not be changed so easily just because they are not optimal > for some specific case. Each lagg has its own setting for flowid usage > and why one cannot just use "ifconfig lagg0 -use_flowid" for such cases? Irrelevant to RSS and etc. flowid distribution in lacp case work very bad. This is good and must be MFC (IMHO). From owner-svn-src-head@freebsd.org Fri Jan 5 14:38:29 2018 Return-Path: Delivered-To: svn-src-head@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 BDC2BEACB48; Fri, 5 Jan 2018 14:38:29 +0000 (UTC) (envelope-from slw@zxy.spb.ru) Received: from zxy.spb.ru (zxy.spb.ru [195.70.199.98]) (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 7C9A96B8AE; Fri, 5 Jan 2018 14:38:29 +0000 (UTC) (envelope-from slw@zxy.spb.ru) Received: from slw by zxy.spb.ru with local (Exim 4.86 (FreeBSD)) (envelope-from ) id 1eXT8b-000M0K-5h; Fri, 05 Jan 2018 17:38:25 +0300 Date: Fri, 5 Jan 2018 17:38:25 +0300 From: Slawa Olhovchenkov To: Eugene Grosbein Cc: Steven Hartland , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r327559 - in head: . sys/net Message-ID: <20180105143825.GL19373@zxy.spb.ru> References: <201801042005.w04K5liB049411@repo.freebsd.org> <5A4E9397.9000308@grosbein.net> <20180105131105.GB5368@zxy.spb.ru> <5A4F7F70.5050106@grosbein.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <5A4F7F70.5050106@grosbein.net> User-Agent: Mutt/1.5.24 (2015-08-30) X-SA-Exim-Connect-IP: X-SA-Exim-Mail-From: slw@zxy.spb.ru X-SA-Exim-Scanned: No (on zxy.spb.ru); SAEximRunCond expanded to false X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 05 Jan 2018 14:38:29 -0000 On Fri, Jan 05, 2018 at 08:36:48PM +0700, Eugene Grosbein wrote: > 05.01.2018 20:11, Slawa Olhovchenkov wrote: > > > Irrelevant to RSS and etc. flowid distribution in lacp case work very > > bad. This is good and must be MFC (IMHO). > > It may work bad depending on NIC and/or traffic type. > It works just fine in common case of IP forwarding for packets with TCP/UDP inside. > > It can be easily disabled locally for specific cases when it does not work. > Packet distrubuting on network equipment (lacp case) w/ enabled flowid cause uneven queue distributing. Yes, this is may be disabled locally, but diagnostic this root cause need uncommon skills. From owner-svn-src-head@freebsd.org Fri Jan 5 15:13:08 2018 Return-Path: Delivered-To: svn-src-head@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 EF7CBEAE95B for ; Fri, 5 Jan 2018 15:13:08 +0000 (UTC) (envelope-from steven@multiplay.co.uk) Received: from mail-wm0-x22e.google.com (mail-wm0-x22e.google.com [IPv6:2a00:1450:400c:c09::22e]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 7A40C6D3E8 for ; Fri, 5 Jan 2018 15:13:08 +0000 (UTC) (envelope-from steven@multiplay.co.uk) Received: by mail-wm0-x22e.google.com with SMTP id g75so3048189wme.0 for ; Fri, 05 Jan 2018 07:13:08 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=multiplay-co-uk.20150623.gappssmtp.com; s=20150623; h=subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language; bh=yOuDU7y+SRs6ekJyJB2nYX/g6bESQQaAuP9v/3448dA=; b=Fb/KPxOeRd7BP0xOJJqfW25VG3DK1BGMLRvnjRk0ZunGXiAlkdJzZbkXdLso32mLUO FjKqIhttVCr4h2UV4l4J+wn0Hc52hK7iwlEJGVzlF0bq/KQsd2Ka7dP7HWdx7bifZy5O apIeBwSpTyJ86f9cc/BUubsM42kGgkOpfclbFXdsY9SgRgVGolNP26AMobyk7N8DBf2k 8IDx73DL4D17lmPXOI6Q7QJZ38e8g2WE+MrKDqdkclU6/YxSPa3TtpR1S7KSY6Skq99b TOF3mkTFVd0SUWDKX9xThBcsLDm4Nu+/WTSg71C39WQJShsRsjHfkAHtJzOzQPmT5/Jx FDcQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language; bh=yOuDU7y+SRs6ekJyJB2nYX/g6bESQQaAuP9v/3448dA=; b=ABA9iroirhRt8bJsXrRxoUpZuilh2KnNyCp5iU/NApsotG7E56buOO8+UAy+YhS2el JkJVrEPL/jroB7biSAMrTVDxHDw3OBFTS6Dd6htntbfDonm2aaq5/fzu2NMtBCT3Iu7i R0pVLGJ0Vmbk6MxPsJBrrmvBp3EPavX9YGCFICgH02Hfihuq+f95qRjp15hNb3s/QQ1v WjkOiCJnfIQVkNZPkZag5w5bJ5CBTuoKhtzAIpuh3Kp1GVL2TjUCIdMc3ErM+lRGURW8 oJNXmRchCQOZeRYbuSJnaM+OyyTMYSgebj4B8gSydLkBKa4HuFFbebpxdXj/fB7s064o vBjQ== X-Gm-Message-State: AKGB3mLaDcBwzJvmK8CLJMkAHYikgsc6HHiKTSj7kykpshzqUwtl8SGx BK5bduQp8eqJLwnGtP5HjyOrEm+0ZCk= X-Google-Smtp-Source: ACJfBovlw5Hk4BGm0gXTwP5rBCnCSyO//rGFhXYos+qMFAs0r47xJIhQNS25M055WYZa/w1zOqmoCA== X-Received: by 10.28.147.81 with SMTP id v78mr2378271wmd.118.1515165186266; Fri, 05 Jan 2018 07:13:06 -0800 (PST) Received: from [10.10.1.111] ([185.97.61.1]) by smtp.gmail.com with ESMTPSA id w133sm3764971wmg.9.2018.01.05.07.13.04 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 05 Jan 2018 07:13:05 -0800 (PST) Subject: Re: svn commit: r327559 - in head: . sys/net To: Eugene Grosbein , hiren panchasara Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org References: <201801042005.w04K5liB049411@repo.freebsd.org> <5A4E9397.9000308@grosbein.net> <20180104224214.GD18879@strugglingcoder.info> <63c3c450-aeaf-bdd5-5e16-414146c9bb3a@multiplay.co.uk> <5A4EDE65.1010201@grosbein.net> <688c4d08-3dac-545f-1bed-b21270a03eca@multiplay.co.uk> <5A4F8088.2030700@grosbein.net> From: Steven Hartland Message-ID: <89bfbd34-62c9-3c9f-308e-0053617e63ce@multiplay.co.uk> Date: Fri, 5 Jan 2018 15:13:06 +0000 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:52.0) Gecko/20100101 Thunderbird/52.5.2 MIME-Version: 1.0 In-Reply-To: <5A4F8088.2030700@grosbein.net> Content-Language: en-US Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit X-Content-Filtered-By: Mailman/MimeDel 2.1.25 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 05 Jan 2018 15:13:09 -0000 On 05/01/2018 13:41, Eugene Grosbein wrote: > 05.01.2018 16:34, Steven Hartland wrote: > >>>> I hope there's some improvements that can be made, for example if we can determine >>>> the stream was instigated remotely then flowid would always be valid hence we can use it assuming it >>>> matches the requested spec or if we can make it clear to the user that laggproto is not the one they requested, I'm open to ideas? >>> We just need to clear flow id from incoming TCP segments and always generate new flow id for responses >>> keeping old flow id for IP forwarding case. Please back out your change to not degrade IP forwarding performance. >> Sorry I don't follow you. You seem to be inferring that we can easily generate a flowid without involving the sending hardware > RSS has nothing to do with sending hardware. It's operating system's job to choose outgoing port, not hardware's job. The OS is deciding which outgoing, however its using the hash based on the flowid to do so, which is only valid after the first rx hence the problem; as this results in the hash calculation being different for the first packet. > >> I can't see how that is possible as that's chicken and egg i.e. you can't get the HW interface >> to generate the flowid without sending a packet and you can't send a packet >> until you have a the flowid to decide which interface to send it from. > Outgoing packet flow does not and should not depend on incoming flow, > they are independent things in case of LACP. There is no "chicken and egg" problem at all. > But this is how it works ATM, it uses the flowid which is only valid after the first rx. From owner-svn-src-head@freebsd.org Fri Jan 5 15:42:04 2018 Return-Path: Delivered-To: svn-src-head@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 4650DEB01A6 for ; Fri, 5 Jan 2018 15:42:04 +0000 (UTC) (envelope-from steven@multiplay.co.uk) Received: from mail-wm0-x235.google.com (mail-wm0-x235.google.com [IPv6:2a00:1450:400c:c09::235]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id C6CBA6E7E0 for ; Fri, 5 Jan 2018 15:42:03 +0000 (UTC) (envelope-from steven@multiplay.co.uk) Received: by mail-wm0-x235.google.com with SMTP id f140so3180114wmd.2 for ; Fri, 05 Jan 2018 07:42:03 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=multiplay-co-uk.20150623.gappssmtp.com; s=20150623; h=subject:to:references:from:message-id:date:user-agent:mime-version :in-reply-to:content-language; bh=rWaA0HvonxHzf3TmqYc2xGFqaRi9I03ZLfRDpX5DolU=; b=RiqbTkEpXytsa0rCfIqe5q+8GQdiaqyiU6muzgjU+Sx7oIc9cVQ4OrgBUuBvrVntcT u+di/CZ5rQd4ewkcC0uNuKwg4S+N9OAe/PflaGhtWFvTALzcc/1NCrihhoEDrO0X4Nih TQ0lhntMr55hQNwnRKRAxIUMyq2Q1FhUn1ZjTZId36mkN9inILDiw8SEXfC9gTBoF1FP DGd8yNXz6kMK8+ztLNsV+tZINm+2O1R6Js3HFR1jlvT8RZp7Mv7aSn7rTYUEyL7loPdw 7MoV6b9TEW8j2Kq0uIMgl+rh9ylYn4wtt2LaNT/ORcGv5K3xqotxV/4PzFzoVjiDt545 QYWQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language; bh=rWaA0HvonxHzf3TmqYc2xGFqaRi9I03ZLfRDpX5DolU=; b=WJkuPP1Z2G2rmxxvKeePfYYZ2Ps/ykZIFEwecsqehSR5AQqIrfjjiD5SkI/iYg3aOd bRuMA3BOzHQuppRCtX1ZHTub07QA1v3HFZsqE+Vp4I4YtAlGAIY89LjSiNWRjulFdmH+ nFy4VG70aBtUg6RMO+FlNpZvRbF9ggK0X73Uo9eW9HmnAIdwwYl0SQKSyMYmxWNrdam4 cHxtiib8J4VmdJQt1kMTD3zKsyaBHdYeYcrpkbd3mspfjShKXXRVBzfa0kLj7ost+dtm b2v9M2hulb/DtbDqnHUcLjZKHZssL+VUBFbqZ8UyIwqVQn5t/LzrPEXl9e+Rc6GWzJcr 9XvQ== X-Gm-Message-State: AKGB3mJRnYEa2k4NJZ4n4hX/kf6R4P/gpQgndaiG2zG8nJ6biUEL2R3J Tcy/iLElVbosF7PjxYzLVNNt6lN+nTE= X-Google-Smtp-Source: ACJfBouBu5mg3x3U/3VXTKXvAhaQyKfjIlOP5ctZQ4zMjsErtFHFuVBj+FMIEOyAXhn/leVB6od07w== X-Received: by 10.80.206.11 with SMTP id y11mr4774219edi.137.1515166921738; Fri, 05 Jan 2018 07:42:01 -0800 (PST) Received: from [10.10.1.111] ([185.97.61.1]) by smtp.gmail.com with ESMTPSA id a52sm4323015eda.92.2018.01.05.07.41.59 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 05 Jan 2018 07:42:00 -0800 (PST) Subject: Re: svn commit: r327559 - in head: . sys/net To: Eugene Grosbein , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org References: <201801042005.w04K5liB049411@repo.freebsd.org> <5A4E9397.9000308@grosbein.net> <5A4EDC62.50508@grosbein.net> <5A4F824C.1060405@grosbein.net> From: Steven Hartland Message-ID: <97d173fb-4f47-609d-8319-07282a283473@multiplay.co.uk> Date: Fri, 5 Jan 2018 15:42:01 +0000 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:52.0) Gecko/20100101 Thunderbird/52.5.2 MIME-Version: 1.0 In-Reply-To: <5A4F824C.1060405@grosbein.net> Content-Language: en-US Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit X-Content-Filtered-By: Mailman/MimeDel 2.1.25 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 05 Jan 2018 15:42:04 -0000 On 05/01/2018 13:49, Eugene Grosbein wrote: > 05.01.2018 16:26, Steven Hartland пишет: >> On 05/01/2018 02:01, Eugene Grosbein wrote: >>> 05.01.2018 4:52, Steven Hartland wrote: >>> >>>>> RSS by definition has meaning to received stream. What is "outbound" stream >>>>> in this context, why can the hash calculatiom method change and what exactly >>>>> does it mean "a stream being incorrectly split"? >>>> Yes RSS is indeed a received stream but that is used by lagg for lacp and loadbalance protocols >>>> to decide which port of the lagg to "send" the packet out of. >>>> As the flowid is not known when a new "output" stream is instigated the current code >>>> falls back to manual hash calculation to determine which port to send the initial packet from. >>>> Once a response is received a tx then uses the flowid. >>>> This change of hash calculation method can result in the initial packet being sent >>>> from a different port than the rest of the stream; this is what I meant by "incorrectly split". >>>> >>>> See the following: >>>> https://github.com/freebsd/freebsd/blob/master/sys/net/if_lagg.c#L2066 >>>> https://github.com/freebsd/freebsd/blob/master/sys/net/ieee8023ad_lacp.c#L846 >>> I still do not get what is "output stream" for you. >>> >>> If you are talking on forwarding (routing) transit packets at IP layer, >>> they all have flowid from the beginning and first packet does not differ from others at all. >> At the simplest level its a tcp stream that is started from the host. So given we have hostA (src) and hostB (dest), the output stream is one started by hostA with a destination of hostB where hostA is configured with lagg. >> >> In this case with use_flowid we've confirmed we get the following (the interfaces used vary per flow of cause): >> hostA - SYN (ix0) -> hostB # Manual hash calculated >> hostB - SYN,ACK (ix0) -> hostA# flowid used >> hostA - ACK (ix1) -> hostB # flowid used >> hostA - Data(ix1) -> hostB # flowid used >> hostB - ACK (ix0) -> hostA # flowid used >> ... >> >> Here hostA and hostB both had lagg0 comprising of ix0 and ix1. > It should be: > > hostA - SYN (ix0) -> hostB # Manual hash (1) calculated > hostB - SYN,ACK (ix0) -> hostA# hardware flowid (2) received > hostA - ACK (ix1) -> hostB # Manual hash (1) calculated > hostA - Data(ix1) -> hostB # hardware flowid (2 or 3) received > hostB - ACK (ix0) -> hostA # Manual hash (1) calculated > > That is, there is no guarantee of persistance of flowid of incoming packets > as they can be received with distinct ports of lagg being distinct hardware > computing flowid differently. Some ports may not support RSS at all. > We should not use incoming hardware flowid for anything by default in case of TCP. I don't believe your statement about persistence of flowid due to the use of variant ports is correct as LACP states that packets from the same flow "should" under normal conditions (no failure) be received on the same port. In the case where the HW doesn't support RSS, then flowid should either always be unset or be set by OS to consistent value hence that should function as expected. That said I don't disagree that all hostA -> hostB should use Manual hash, as I can't see anyway to use to HW hash, however the ports in your example are wrong, all hostA -> hostB should be sent from the same ixY and all hostB -> hostA should be sent from the same ixZ (under normal circumstances) of course. >>> If you are talking on locally originated (not transit) data streem from local TCP socket >>> being sent in response to corresponding incoming TCP segments, then these outgoing >>> packets should have their own fixed flow id by default in case of LACP >>> and thhis flow id should not depend on (possibly ever changing) flow id of incoming TCP segments. >> Nope in this case we have all the information needed, but I don't believe we can't tell that's the case. >>> If you insist that flow id of outgoing packets does depend on ever changing incoming packet's flow id, >>> then this is the bug that should be fixed and not lagg's defaults. >> As detailed above once the session is established then the flowid remains fixed. > Why do you mix flowid of incoming stream with flowid of outgoing stream? > I expect this was done so we don't have the overhead of calculating a packet hash for every outgoing packet i.e. its an optimization, however I believe this is only possible for the destination host which always has a valid flowid, and not for the source host. My current thinking is that flowid shouldn't be used for either LACP or loadbalance protocols as doing so will almost certainly lead to unexpected behavior (the stated lagghash may not be valid).     Regards     Steve From owner-svn-src-head@freebsd.org Fri Jan 5 15:44:31 2018 Return-Path: Delivered-To: svn-src-head@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 3ADBCEB03BB for ; Fri, 5 Jan 2018 15:44:31 +0000 (UTC) (envelope-from steven@multiplay.co.uk) Received: from mail-wm0-x231.google.com (mail-wm0-x231.google.com [IPv6:2a00:1450:400c:c09::231]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id BB15E6EAF8 for ; Fri, 5 Jan 2018 15:44:30 +0000 (UTC) (envelope-from steven@multiplay.co.uk) Received: by mail-wm0-x231.google.com with SMTP id t8so3167771wmc.3 for ; Fri, 05 Jan 2018 07:44:30 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=multiplay-co-uk.20150623.gappssmtp.com; s=20150623; h=from:subject:to:cc:references:message-id:date:user-agent :mime-version:in-reply-to:content-language; bh=LYcrYvBOL7uj7m3PoRrM++s/0LjtsijV5k54ohyfRtQ=; b=mIqynImXgFZsl20ZnMEtCCCebogy7aD1NrYN0M0Yk5ctVEaPwQaUm5tMCp7qqPdL+O HU5TGCgRXB86OQAEVbuYOcRzROXVQW4RKIAf3lF6v0A0b+7/KO8VdQnfC9eOsUcZD3H7 M7EaOQXuyIBDd1zwjtf1yfr7dEhO2kaKG7hHohH9T4QfozxVNCZ6QGNBrO8MFSfHXf18 OsgDBVridY96z7KtTl/F/fd3I4DgqOMZOfL8nW/mkOcnaKBJYtcgnUXmZNesA6hGvK7x 8usa4k4kfR+yEHRy1tx8DPw4t7A6dNJHwI8YQhrrsTxaUNT9Fmb9txb7P6ol84IdLjxL DErQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:subject:to:cc:references:message-id:date :user-agent:mime-version:in-reply-to:content-language; bh=LYcrYvBOL7uj7m3PoRrM++s/0LjtsijV5k54ohyfRtQ=; b=tNNXXclDBgmQgSQloJZtSZhKqOXm/aJsDNM2X2iFCHL0kEHpIFYeFD18ZJIK8p2JcM sf4t8XBB7QnFhRZUDfEhsg0Xpog0orQEiOsHhbNSUUCLjlqO3nItwn20mn9tpfCvhC7x iMRmk1NXEKtdPWOHzzAvgf5YViXC9W4NFRm3TOgdwZQdbpc8W0klWaz99xi4FQfm9x5K hA4Xk7iGS6DkUTf3z0DsrSO+lqs0mZA9piiSj5CyllRPDOjHomFrC+nHZzD3CvoFVShf a15Krm7HdR3X8Wh1lCen0XFeejTZAJSgKBiWLQ5Dt0agExD8hcqhUKQXBrXZSppxbqVP PIeQ== X-Gm-Message-State: AKGB3mI9//pIVPxhl73rSv30ePb7t43XeuBra52HvRZ6eMHPzJK/fns9 gkt46j+M48fVYaWa/lkE1NRrGSiFVJg= X-Google-Smtp-Source: ACJfBovpnCvL78KyQD5JofVCED9PyK6fn7qfOs+X/HwEsP02UHhtI3B0LL/lT1a9Hlef1Jw53TIfKA== X-Received: by 10.80.213.206 with SMTP id g14mr4621458edj.103.1515167068619; Fri, 05 Jan 2018 07:44:28 -0800 (PST) Received: from [10.10.1.111] ([185.97.61.1]) by smtp.gmail.com with ESMTPSA id e25sm4168056edc.64.2018.01.05.07.44.27 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 05 Jan 2018 07:44:27 -0800 (PST) From: Steven Hartland X-Google-Original-From: Steven Hartland Subject: Re: svn commit: r327559 - in head: . sys/net To: Slawa Olhovchenkov , Eugene Grosbein Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org References: <201801042005.w04K5liB049411@repo.freebsd.org> <5A4E9397.9000308@grosbein.net> <20180105131105.GB5368@zxy.spb.ru> <5A4F7F70.5050106@grosbein.net> <20180105143825.GL19373@zxy.spb.ru> Message-ID: <5fb3fad0-4c2c-bddc-36c6-2ae88e8b38e6@freebsd.org> Date: Fri, 5 Jan 2018 15:44:29 +0000 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:52.0) Gecko/20100101 Thunderbird/52.5.2 MIME-Version: 1.0 In-Reply-To: <20180105143825.GL19373@zxy.spb.ru> Content-Language: en-US Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit X-Content-Filtered-By: Mailman/MimeDel 2.1.25 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 05 Jan 2018 15:44:31 -0000 On 05/01/2018 14:38, Slawa Olhovchenkov wrote: > On Fri, Jan 05, 2018 at 08:36:48PM +0700, Eugene Grosbein wrote: > >> 05.01.2018 20:11, Slawa Olhovchenkov wrote: >> >>> Irrelevant to RSS and etc. flowid distribution in lacp case work very >>> bad. This is good and must be MFC (IMHO). >> It may work bad depending on NIC and/or traffic type. >> It works just fine in common case of IP forwarding for packets with TCP/UDP inside. >> >> It can be easily disabled locally for specific cases when it does not work. >> > Packet distrubuting on network equipment (lacp case) w/ enabled flowid cause > uneven queue distributing. Yes, this is may be disabled locally, but > diagnostic this root cause need uncommon skills. > Indeed, the same for packet ordering issue, it took a good amount of effort here from multiple parties to determine the there was a bug in FreeBSD LACP implementation due to the use of flowid, which is why I opted to disable it by default.     Regards     Steve From owner-svn-src-head@freebsd.org Fri Jan 5 16:11:36 2018 Return-Path: Delivered-To: svn-src-head@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 DBB41EB1F30 for ; Fri, 5 Jan 2018 16:11:36 +0000 (UTC) (envelope-from steven@multiplay.co.uk) Received: from mail-wm0-x236.google.com (mail-wm0-x236.google.com [IPv6:2a00:1450:400c:c09::236]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 67EBF701D2 for ; Fri, 5 Jan 2018 16:11:36 +0000 (UTC) (envelope-from steven@multiplay.co.uk) Received: by mail-wm0-x236.google.com with SMTP id 9so3308386wme.4 for ; Fri, 05 Jan 2018 08:11:36 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=multiplay-co-uk.20150623.gappssmtp.com; s=20150623; h=subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language; bh=NBIMcssRnMOA9GRWEd0BWuKeDNtuecZHJu0DYgjvis0=; b=MoDLuPVZpu9kJPyVyu57sN8YKDisK8zfk7/eaoZqOonyNhNe0kFTC8i+WXqPs9UWCe bJkUtS6W9buc06UA4Gma+Ps/mZEnCXl3hjIz2K/M2YTiY+0/VIlRiEOR0mQzap9oEq3S z9q+GHHTZII+kCClm9BpcVmV2xhR52vdURuCzHg6t+ionxole4VHWP6V+yL2E5YQUE0O JcPDUbHZa95JXmHYNRlq7xMePFh0fKcZy24vifU38gDF1jMV1JHsJkvwDSUyMds7Eq4a Fjd9BI2BkCPPJKW548LdKlI2ggUGO9gi3nZRAf9Qmmv0Q1n7mNWmexLzreZE42v8Nr9w EUzA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language; bh=NBIMcssRnMOA9GRWEd0BWuKeDNtuecZHJu0DYgjvis0=; b=Z1sFaaVN50qf+5KzbItWRsN4q7QVAdZ9devOwyVzJFqstKqrDXwXukMSgZqURoPbi/ v5wNqOqJL0J2NhlA9e+Vu9aNO5B8yOKMxEsN628BqgJa2oWGlPo17ZwD0mpiLMEtGVpL Stq8MbQ4JATM7ZvjAtRFUakzrKmegyJM8nXdT9RjBZi8eOtICjo59xsPb2dV4yC8v1/P 8M3TtA57I+AfIdsmgKloTgeN8iQW+7YY/MwfGwY89ympDH7su1BhQf1h15HU3eW2eqVO EI5c9nuojggglTGiTZ/WxyAr46EaYOp8m9PQFfbGK89eQkaJ45y1xNcqf9XXt51UCWsP 088g== X-Gm-Message-State: AKGB3mI07vpVLUYgHbN6PHQ6MZymQDfy2OszOv8j+Ov0dkh03hLMAji+ ++KAnY7WUZdoee+fJeikIJQV55gxdHc= X-Google-Smtp-Source: ACJfBotzuh6GnKSWwHYfDICNzSbpNsDLl4Gk5m57h6pTQxCV5HYt2CddGTNDt2bKKIEe59+zxP9P8g== X-Received: by 10.80.167.101 with SMTP id h92mr4747198edc.202.1515168694110; Fri, 05 Jan 2018 08:11:34 -0800 (PST) Received: from [10.10.1.111] ([185.97.61.1]) by smtp.gmail.com with ESMTPSA id 4sm3751735edf.81.2018.01.05.08.11.32 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 05 Jan 2018 08:11:32 -0800 (PST) Subject: Re: svn commit: r327559 - in head: . sys/net To: hiren panchasara Cc: Eugene Grosbein , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org References: <201801042005.w04K5liB049411@repo.freebsd.org> <5A4E9397.9000308@grosbein.net> <20180104224214.GD18879@strugglingcoder.info> <63c3c450-aeaf-bdd5-5e16-414146c9bb3a@multiplay.co.uk> <20180105094126.GE18879@strugglingcoder.info> From: Steven Hartland Message-ID: <1854b421-3c09-c040-ba86-738b9c621eae@multiplay.co.uk> Date: Fri, 5 Jan 2018 16:11:34 +0000 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:52.0) Gecko/20100101 Thunderbird/52.5.2 MIME-Version: 1.0 In-Reply-To: <20180105094126.GE18879@strugglingcoder.info> Content-Language: en-US Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 8bit X-Content-Filtered-By: Mailman/MimeDel 2.1.25 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 05 Jan 2018 16:11:37 -0000 On 05/01/2018 09:41, hiren panchasara wrote: > IIRC, with 'RSS' in kernconf, most NIC drivers and stack should do the > right thing. Look at drivers and also conn startup code in TCP as I > recall it doing the flowid mapping correctly when stream originated from > the other side and had flowid assigned to it by the NIC. > > I am mostly concerned about the overhead of manual calculation but my > knowledge is a bit rusty right now and lagg has always been special so > please try this out and see. > I've not been able to find any such option: head:src> grep -ri rss sys/amd64/conf/ head:src> Any other ideas on where it might be or is it just the default on HEAD? That said the more I think / talk about this the more I believe manual calculation is the right option for LACP. The reason I believe this is: * When configuring LACP in a network knowing the hash method is important, so using an unknown "flowid" based hash could produce unexpected results. * There's no easy way (possibly no way at all) to determine the flowid from the HW for the first packet of a new outbound connection * Having the hash algorithm vary for inbound and outbound connections increases the chance of unexpected results. * LCAP combines NIC's of even speed, however they can be different HW so there's no guarantee that the partaking ports use the same flowid calculation, again increasing the chance of a problem. So as mentioned in a previous reply the more I think about the more believe flowid can't be successfully used as a hash source for LACP or loadbalance. What do others think, am I missing something?     Regards     Steve From owner-svn-src-head@freebsd.org Fri Jan 5 16:59:47 2018 Return-Path: Delivered-To: svn-src-head@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 34CB2EB42D9; Fri, 5 Jan 2018 16:59:47 +0000 (UTC) (envelope-from eugen@grosbein.net) Received: from hz.grosbein.net (hz.grosbein.net [78.47.246.247]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "hz.grosbein.net", Issuer "hz.grosbein.net" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id B9CF272203; Fri, 5 Jan 2018 16:59:46 +0000 (UTC) (envelope-from eugen@grosbein.net) Received: from eg.sd.rdtc.ru (root@eg.sd.rdtc.ru [62.231.161.221] (may be forged)) by hz.grosbein.net (8.15.2/8.15.2) with ESMTPS id w05GxcgX039619 (version=TLSv1.2 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Fri, 5 Jan 2018 17:59:39 +0100 (CET) (envelope-from eugen@grosbein.net) X-Envelope-From: eugen@grosbein.net X-Envelope-To: slw@zxy.spb.ru Received: from [10.58.0.4] ([10.58.0.4]) by eg.sd.rdtc.ru (8.15.2/8.15.2) with ESMTPS id w05GxYrO009378 (version=TLSv1.2 cipher=DHE-RSA-AES128-SHA bits=128 verify=NOT); Fri, 5 Jan 2018 23:59:34 +0700 (+07) (envelope-from eugen@grosbein.net) Subject: Re: svn commit: r327559 - in head: . sys/net To: Slawa Olhovchenkov References: <201801042005.w04K5liB049411@repo.freebsd.org> <5A4E9397.9000308@grosbein.net> <20180105131105.GB5368@zxy.spb.ru> <5A4F7F70.5050106@grosbein.net> <20180105143825.GL19373@zxy.spb.ru> Cc: Steven Hartland , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org From: Eugene Grosbein Message-ID: <5A4FAEF2.8000802@grosbein.net> Date: Fri, 5 Jan 2018 23:59:30 +0700 User-Agent: Mozilla/5.0 (Windows NT 6.3; WOW64; rv:38.0) Gecko/20100101 Thunderbird/38.7.2 MIME-Version: 1.0 In-Reply-To: <20180105143825.GL19373@zxy.spb.ru> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=2.2 required=5.0 tests=BAYES_00, LOCAL_FROM, RDNS_NONE autolearn=no autolearn_force=no version=3.4.1 X-Spam-Report: * -2.3 BAYES_00 BODY: Bayes spam probability is 0 to 1% * [score: 0.0000] * 2.6 LOCAL_FROM From my domains * 1.9 RDNS_NONE Delivered to internal network by a host with no rDNS X-Spam-Level: ** X-Spam-Checker-Version: SpamAssassin 3.4.1 (2015-04-28) on hz.grosbein.net X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 05 Jan 2018 16:59:47 -0000 05.01.2018 21:38, Slawa Olhovchenkov wrote: >>> Irrelevant to RSS and etc. flowid distribution in lacp case work very >>> bad. This is good and must be MFC (IMHO). >> >> It may work bad depending on NIC and/or traffic type. >> It works just fine in common case of IP forwarding for packets with TCP/UDP inside. >> >> It can be easily disabled locally for specific cases when it does not work. > > Packet distrubuting on network equipment (lacp case) w/ enabled flowid cause > uneven queue distributing. Once again: this heavily depends on local environment and this is not true for many cases. From owner-svn-src-head@freebsd.org Fri Jan 5 17:02:44 2018 Return-Path: Delivered-To: svn-src-head@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 C84BAEB45E0; Fri, 5 Jan 2018 17:02:44 +0000 (UTC) (envelope-from eugen@grosbein.net) Received: from hz.grosbein.net (hz.grosbein.net [78.47.246.247]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "hz.grosbein.net", Issuer "hz.grosbein.net" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 7191072645; Fri, 5 Jan 2018 17:02:44 +0000 (UTC) (envelope-from eugen@grosbein.net) Received: from eg.sd.rdtc.ru (root@eg.sd.rdtc.ru [62.231.161.221] (may be forged)) by hz.grosbein.net (8.15.2/8.15.2) with ESMTPS id w05H2aU0039664 (version=TLSv1.2 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Fri, 5 Jan 2018 18:02:37 +0100 (CET) (envelope-from eugen@grosbein.net) X-Envelope-From: eugen@grosbein.net X-Envelope-To: steven@multiplay.co.uk Received: from [10.58.0.4] ([10.58.0.4]) by eg.sd.rdtc.ru (8.15.2/8.15.2) with ESMTPS id w05H2TFV010231 (version=TLSv1.2 cipher=DHE-RSA-AES128-SHA bits=128 verify=NOT); Sat, 6 Jan 2018 00:02:29 +0700 (+07) (envelope-from eugen@grosbein.net) Subject: Re: svn commit: r327559 - in head: . sys/net To: Steven Hartland , hiren panchasara References: <201801042005.w04K5liB049411@repo.freebsd.org> <5A4E9397.9000308@grosbein.net> <20180104224214.GD18879@strugglingcoder.info> <63c3c450-aeaf-bdd5-5e16-414146c9bb3a@multiplay.co.uk> <5A4EDE65.1010201@grosbein.net> <688c4d08-3dac-545f-1bed-b21270a03eca@multiplay.co.uk> <5A4F8088.2030700@grosbein.net> <89bfbd34-62c9-3c9f-308e-0053617e63ce@multiplay.co.uk> Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org From: Eugene Grosbein Message-ID: <5A4FAFA1.2020006@grosbein.net> Date: Sat, 6 Jan 2018 00:02:25 +0700 User-Agent: Mozilla/5.0 (Windows NT 6.3; WOW64; rv:38.0) Gecko/20100101 Thunderbird/38.7.2 MIME-Version: 1.0 In-Reply-To: <89bfbd34-62c9-3c9f-308e-0053617e63ce@multiplay.co.uk> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=2.2 required=5.0 tests=BAYES_00, LOCAL_FROM, RDNS_NONE autolearn=no autolearn_force=no version=3.4.1 X-Spam-Report: * -2.3 BAYES_00 BODY: Bayes spam probability is 0 to 1% * [score: 0.0000] * 2.6 LOCAL_FROM From my domains * 1.9 RDNS_NONE Delivered to internal network by a host with no rDNS X-Spam-Level: ** X-Spam-Checker-Version: SpamAssassin 3.4.1 (2015-04-28) on hz.grosbein.net X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 05 Jan 2018 17:02:44 -0000 05.01.2018 22:13, Steven Hartland wrote: >>>>> I hope there's some improvements that can be made, for example if we can determine >>>>> the stream was instigated remotely then flowid would always be valid hence we can use it assuming it >>>>> matches the requested spec or if we can make it clear to the user that laggproto is not the one they requested, I'm open to ideas? >>>> We just need to clear flow id from incoming TCP segments and always generate new flow id for responses >>>> keeping old flow id for IP forwarding case. Please back out your change to not degrade IP forwarding performance. >>> Sorry I don't follow you. You seem to be inferring that we can easily generate a flowid without involving the sending hardware >> RSS has nothing to do with sending hardware. It's operating system's job to choose outgoing port, not hardware's job. > The OS is deciding which outgoing, however its using the hash based on the flowid to do so It should use flowid for transit forwarding IP packet only. It should not use flowid from incoming TCP segment. >>> I can't see how that is possible as that's chicken and egg i.e. you can't get the HW interface >>> to generate the flowid without sending a packet and you can't send a packet >>> until you have a the flowid to decide which interface to send it from. >> Outgoing packet flow does not and should not depend on incoming flow, >> they are independent things in case of LACP. There is no "chicken and egg" problem at all. >> > But this is how it works ATM, it uses the flowid which is only valid after the first rx. Then this is a bug that should be fixed to solve your problem, instead of change of lagg defaults that degrades IP forwarding performance. From owner-svn-src-head@freebsd.org Fri Jan 5 17:07:15 2018 Return-Path: Delivered-To: svn-src-head@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 7A41DEB488A; Fri, 5 Jan 2018 17:07:15 +0000 (UTC) (envelope-from eugen@grosbein.net) Received: from hz.grosbein.net (hz.grosbein.net [78.47.246.247]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "hz.grosbein.net", Issuer "hz.grosbein.net" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 086C472912; Fri, 5 Jan 2018 17:07:14 +0000 (UTC) (envelope-from eugen@grosbein.net) Received: from eg.sd.rdtc.ru (root@eg.sd.rdtc.ru [62.231.161.221] (may be forged)) by hz.grosbein.net (8.15.2/8.15.2) with ESMTPS id w05H7665039699 (version=TLSv1.2 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Fri, 5 Jan 2018 18:07:06 +0100 (CET) (envelope-from eugen@grosbein.net) X-Envelope-From: eugen@grosbein.net X-Envelope-To: steven@multiplay.co.uk Received: from [10.58.0.4] ([10.58.0.4]) by eg.sd.rdtc.ru (8.15.2/8.15.2) with ESMTPS id w05H72cs011523 (version=TLSv1.2 cipher=DHE-RSA-AES128-SHA bits=128 verify=NOT); Sat, 6 Jan 2018 00:07:02 +0700 (+07) (envelope-from eugen@grosbein.net) Subject: Re: svn commit: r327559 - in head: . sys/net To: Steven Hartland , hiren panchasara References: <201801042005.w04K5liB049411@repo.freebsd.org> <5A4E9397.9000308@grosbein.net> <20180104224214.GD18879@strugglingcoder.info> <63c3c450-aeaf-bdd5-5e16-414146c9bb3a@multiplay.co.uk> <20180105094126.GE18879@strugglingcoder.info> <1854b421-3c09-c040-ba86-738b9c621eae@multiplay.co.uk> Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org From: Eugene Grosbein Message-ID: <5A4FB0B2.5070108@grosbein.net> Date: Sat, 6 Jan 2018 00:06:58 +0700 User-Agent: Mozilla/5.0 (Windows NT 6.3; WOW64; rv:38.0) Gecko/20100101 Thunderbird/38.7.2 MIME-Version: 1.0 In-Reply-To: <1854b421-3c09-c040-ba86-738b9c621eae@multiplay.co.uk> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=2.2 required=5.0 tests=BAYES_00, LOCAL_FROM, RDNS_NONE autolearn=no autolearn_force=no version=3.4.1 X-Spam-Report: * -2.3 BAYES_00 BODY: Bayes spam probability is 0 to 1% * [score: 0.0000] * 2.6 LOCAL_FROM From my domains * 1.9 RDNS_NONE Delivered to internal network by a host with no rDNS X-Spam-Level: ** X-Spam-Checker-Version: SpamAssassin 3.4.1 (2015-04-28) on hz.grosbein.net X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 05 Jan 2018 17:07:15 -0000 05.01.2018 23:11, Steven Hartland wrote: > What do others think, am I missing something? You still consider only TCP case missing IP forwarning case when all IP packets are transit coming from lagg0 and going out via lagg1. IP forwarding case benefits from pre-computed RSS flowid since 8.0-RELEASE and your change breaks it. From owner-svn-src-head@freebsd.org Fri Jan 5 17:12:31 2018 Return-Path: Delivered-To: svn-src-head@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 79885EB4D70 for ; Fri, 5 Jan 2018 17:12:31 +0000 (UTC) (envelope-from steven@multiplay.co.uk) Received: from mail-wm0-x22c.google.com (mail-wm0-x22c.google.com [IPv6:2a00:1450:400c:c09::22c]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id E430572F64 for ; Fri, 5 Jan 2018 17:12:30 +0000 (UTC) (envelope-from steven@multiplay.co.uk) Received: by mail-wm0-x22c.google.com with SMTP id n138so3642993wmg.2 for ; Fri, 05 Jan 2018 09:12:30 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=multiplay-co-uk.20150623.gappssmtp.com; s=20150623; h=subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language; bh=ZclY+lbpktAs46L7e5pCLkaPYoRijpevZXKVCh3YdMc=; b=rEMOLN7+uGvBms+1vyuSC+tWE4xatif2LLkYf7iHpvZidRoPP45hkuDKPwj5y9BM6E WEMJJsMf0i4ESZ9xLG4l9yNzeNnxDvj82AtyCdk0AEVvN3ILYqxJEvu4M1LVYsdTUZrI +r8n+2LVJkmPQU1cp3XDz0H7JmAslGAbxWA8vnDImRE9g7IqLirHspRjK8olE35MXG1f JP2xwhlWHdnHNxLLFLLQFi0K0mwppvqZrq11r1lp5j/VbafmVUGytmRavcku+2RKrjyq c6+PuTbdKy0KV8Q/yBVh277pvdds1Pc9wqJvBVYhxDl7ma00APF8GZAMV2wyHL2/vFgo jnMQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language; bh=ZclY+lbpktAs46L7e5pCLkaPYoRijpevZXKVCh3YdMc=; b=Hcdm9Qaq8+fvEoQKo+wwewp4+Hbo83eHFw6I+ELeuS+hYAQGFZPZDQN3I6kYuhJGDw nnbn5S3GfkV44frv0Ol09CejNwQ42+DvaJlxJr+uAKv4bwljolOy2T3Y2DFF4LnDHPgI ExS5d5zPnd76hUknlADdw7ft9dfJ2jefoZiD/uYBDnTkmzuiajyApeyFiFEbzzXRq7TP /uMLtVuNnsYbFXd8tEo+hbKTKdsjRb19QILtir62wt15/Vy3CuIILwWONs5QPg+DuZzU yzuwxDW60eFZVITslxP7OjhNly3t1KG22ogycAo5mFgz+Cuydv75v7BKL+Um0GbZ3N7t M4TA== X-Gm-Message-State: AKGB3mJGX5Gp5n6EJusl03S3XN8Eo2c3JdVM5WqBe2yKfvNIBlqL03qV 8puh9FBAtwtF+4wIZOjIyrYhGYw5b8Y= X-Google-Smtp-Source: ACJfBotVIgxDxPsor6v+27wLbj8nxZwEtFHa3wHSg6J1BG0jmiQyQ7AzaeKi9sbu9spNJOp0CF5dpA== X-Received: by 10.80.170.200 with SMTP id r8mr5004763edc.230.1515172348874; Fri, 05 Jan 2018 09:12:28 -0800 (PST) Received: from [10.10.1.111] ([185.97.61.1]) by smtp.gmail.com with ESMTPSA id g61sm4036118edd.48.2018.01.05.09.12.27 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 05 Jan 2018 09:12:27 -0800 (PST) Subject: Re: svn commit: r327559 - in head: . sys/net To: Eugene Grosbein , hiren panchasara Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org References: <201801042005.w04K5liB049411@repo.freebsd.org> <5A4E9397.9000308@grosbein.net> <20180104224214.GD18879@strugglingcoder.info> <63c3c450-aeaf-bdd5-5e16-414146c9bb3a@multiplay.co.uk> <5A4EDE65.1010201@grosbein.net> <688c4d08-3dac-545f-1bed-b21270a03eca@multiplay.co.uk> <5A4F8088.2030700@grosbein.net> <89bfbd34-62c9-3c9f-308e-0053617e63ce@multiplay.co.uk> <5A4FAFA1.2020006@grosbein.net> From: Steven Hartland Message-ID: Date: Fri, 5 Jan 2018 17:12:29 +0000 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:52.0) Gecko/20100101 Thunderbird/52.5.2 MIME-Version: 1.0 In-Reply-To: <5A4FAFA1.2020006@grosbein.net> Content-Language: en-US Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 8bit X-Content-Filtered-By: Mailman/MimeDel 2.1.25 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 05 Jan 2018 17:12:31 -0000 On 05/01/2018 17:02, Eugene Grosbein wrote: > 05.01.2018 22:13, Steven Hartland wrote: > >>>>>> I hope there's some improvements that can be made, for example if we can determine >>>>>> the stream was instigated remotely then flowid would always be valid hence we can use it assuming it >>>>>> matches the requested spec or if we can make it clear to the user that laggproto is not the one they requested, I'm open to ideas? >>>>> We just need to clear flow id from incoming TCP segments and always generate new flow id for responses >>>>> keeping old flow id for IP forwarding case. Please back out your change to not degrade IP forwarding performance. >>>> Sorry I don't follow you. You seem to be inferring that we can easily generate a flowid without involving the sending hardware >>> RSS has nothing to do with sending hardware. It's operating system's job to choose outgoing port, not hardware's job. >> The OS is deciding which outgoing, however its using the hash based on the flowid to do so > It should use flowid for transit forwarding IP packet only. It should not use flowid from incoming TCP segment. Not sure I follow your meaning, LACP has nothing to do with incoming TCP, its balancing and hence hashing is performed on outbound (tx) traffic only. > >>>> I can't see how that is possible as that's chicken and egg i.e. you can't get the HW interface >>>> to generate the flowid without sending a packet and you can't send a packet >>>> until you have a the flowid to decide which interface to send it from. >>> Outgoing packet flow does not and should not depend on incoming flow, >>> they are independent things in case of LACP. There is no "chicken and egg" problem at all. >>> >> But this is how it works ATM, it uses the flowid which is only valid after the first rx. > Then this is a bug that should be fixed to solve your problem, > instead of change of lagg defaults that degrades IP forwarding performance. > You seem to be confusing IP forwarding with choice of port in the lagg interface? Once lagg (lacp in this case) has chosen the port then the stack continues as it always has, if this means using flowid to balance queues then that's fine. This change only changes the hash calculation which is used to determine the port that's used.     Regards     Steve From owner-svn-src-head@freebsd.org Fri Jan 5 17:16:54 2018 Return-Path: Delivered-To: svn-src-head@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 C89B3EB5035; Fri, 5 Jan 2018 17:16:54 +0000 (UTC) (envelope-from eugen@grosbein.net) Received: from hz.grosbein.net (hz.grosbein.net [78.47.246.247]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "hz.grosbein.net", Issuer "hz.grosbein.net" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 53DD473181; Fri, 5 Jan 2018 17:16:53 +0000 (UTC) (envelope-from eugen@grosbein.net) Received: from eg.sd.rdtc.ru (root@eg.sd.rdtc.ru [62.231.161.221] (may be forged)) by hz.grosbein.net (8.15.2/8.15.2) with ESMTPS id w05HGVXg039778 (version=TLSv1.2 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Fri, 5 Jan 2018 18:16:32 +0100 (CET) (envelope-from eugen@grosbein.net) X-Envelope-From: eugen@grosbein.net X-Envelope-To: steven@multiplay.co.uk Received: from [10.58.0.4] ([10.58.0.4]) by eg.sd.rdtc.ru (8.15.2/8.15.2) with ESMTPS id w05HGKpK014139 (version=TLSv1.2 cipher=DHE-RSA-AES128-SHA bits=128 verify=NOT); Sat, 6 Jan 2018 00:16:20 +0700 (+07) (envelope-from eugen@grosbein.net) Subject: Re: svn commit: r327559 - in head: . sys/net To: Steven Hartland , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org References: <201801042005.w04K5liB049411@repo.freebsd.org> <5A4E9397.9000308@grosbein.net> <5A4EDC62.50508@grosbein.net> <5A4F824C.1060405@grosbein.net> <97d173fb-4f47-609d-8319-07282a283473@multiplay.co.uk> From: Eugene Grosbein Message-ID: <5A4FB2E0.4010603@grosbein.net> Date: Sat, 6 Jan 2018 00:16:16 +0700 User-Agent: Mozilla/5.0 (Windows NT 6.3; WOW64; rv:38.0) Gecko/20100101 Thunderbird/38.7.2 MIME-Version: 1.0 In-Reply-To: <97d173fb-4f47-609d-8319-07282a283473@multiplay.co.uk> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=2.2 required=5.0 tests=BAYES_00, LOCAL_FROM, RDNS_NONE autolearn=no autolearn_force=no version=3.4.1 X-Spam-Report: * -2.3 BAYES_00 BODY: Bayes spam probability is 0 to 1% * [score: 0.0000] * 2.6 LOCAL_FROM From my domains * 1.9 RDNS_NONE Delivered to internal network by a host with no rDNS X-Spam-Level: ** X-Spam-Checker-Version: SpamAssassin 3.4.1 (2015-04-28) on hz.grosbein.net X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 05 Jan 2018 17:16:54 -0000 05.01.2018 22:42, Steven Hartland wrote: >>>>>> RSS by definition has meaning to received stream. What is "outbound" stream >>>>>> in this context, why can the hash calculatiom method change and what exactly >>>>>> does it mean "a stream being incorrectly split"? >>>>> Yes RSS is indeed a received stream but that is used by lagg for lacp and loadbalance protocols >>>>> to decide which port of the lagg to "send" the packet out of. >>>>> As the flowid is not known when a new "output" stream is instigated the current code >>>>> falls back to manual hash calculation to determine which port to send the initial packet from. >>>>> Once a response is received a tx then uses the flowid. >>>>> This change of hash calculation method can result in the initial packet being sent >>>>> from a different port than the rest of the stream; this is what I meant by "incorrectly split". >>>>> >>>>> See the following: >>>>> https://github.com/freebsd/freebsd/blob/master/sys/net/if_lagg.c#L2066 >>>>> https://github.com/freebsd/freebsd/blob/master/sys/net/ieee8023ad_lacp.c#L846 >>>> I still do not get what is "output stream" for you. >>>> >>>> If you are talking on forwarding (routing) transit packets at IP layer, >>>> they all have flowid from the beginning and first packet does not differ from others at all. >>> At the simplest level its a tcp stream that is started from the host. So given we have hostA (src) and hostB (dest), the output stream is one started by hostA with a destination of hostB where hostA is configured with lagg. >>> >>> In this case with use_flowid we've confirmed we get the following (the interfaces used vary per flow of cause): >>> hostA - SYN (ix0) -> hostB # Manual hash calculated >>> hostB - SYN,ACK (ix0) -> hostA# flowid used >>> hostA - ACK (ix1) -> hostB # flowid used >>> hostA - Data(ix1) -> hostB # flowid used >>> hostB - ACK (ix0) -> hostA # flowid used >>> ... >>> >>> Here hostA and hostB both had lagg0 comprising of ix0 and ix1. >> It should be: >> >> hostA - SYN (ix0) -> hostB # Manual hash (1) calculated >> hostB - SYN,ACK (ix0) -> hostA# hardware flowid (2) received >> hostA - ACK (ix1) -> hostB # Manual hash (1) calculated >> hostA - Data(ix1) -> hostB # hardware flowid (2 or 3) received >> hostB - ACK (ix0) -> hostA # Manual hash (1) calculated Hmm, yes, here I was mistaken. hostA - SYN (ix0) -> hostB # Manual hash (1) calculated hostB - SYN,ACK (ix0) -> hostA # hardware flowid (2) received hostA - ACK (ix1) -> hostB # Manual hash (1) calculated hostA - Data(ix1) -> hostB # Manual hash (1) calculated hostB - ACK (ix0) -> hostA # hardware flowid (2 or 3) received >> That is, there is no guarantee of persistance of flowid of incoming packets >> as they can be received with distinct ports of lagg being distinct hardware >> computing flowid differently. Some ports may not support RSS at all. >> We should not use incoming hardware flowid for anything by default in case of TCP. > I don't believe your statement about persistence of flowid due to the use of variant ports is correct > as LACP states that packets from the same flow "should" under normal conditions (no failure) be received on the same port. It still does not guarantee that and you miss opportunity of network failures that can easily change flowid of incoming packets. > In the case where the HW doesn't support RSS, then flowid should either always be unset or be set by OS to consistent value hence that should function as expected. > > That said I don't disagree that all hostA -> hostB should use Manual hash, as I can't see anyway to use to HW hash, > however the ports in your example are wrong Yes, I stand corrected (just copied your example and adjusted it incompletly). >> Why do you mix flowid of incoming stream with flowid of outgoing stream? >> > I expect this was done so we don't have the overhead of calculating a packet hash for every outgoing packet > i.e. its an optimization, however I believe this is only possible for the destination host which always > has a valid flowid, and not for the source host. How do you know that flowid of incoming packet is preserved on outgoing path? It should not. From owner-svn-src-head@freebsd.org Fri Jan 5 17:28:29 2018 Return-Path: Delivered-To: svn-src-head@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 4AEC6EB588A; Fri, 5 Jan 2018 17:28:29 +0000 (UTC) (envelope-from matt.joras@gmail.com) Received: from mail-wm0-f44.google.com (mail-wm0-f44.google.com [74.125.82.44]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id D8DC773A8D; Fri, 5 Jan 2018 17:28:28 +0000 (UTC) (envelope-from matt.joras@gmail.com) Received: by mail-wm0-f44.google.com with SMTP id 9so3707625wme.4; Fri, 05 Jan 2018 09:28:28 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=TMn+VD9hm9Ofe7Bn9uJaad5PjjKUHdjYVNOkWs9mT/w=; b=h48ojFAc0AKtGnVPKid3sNeCbLmyfnrQ8dCKDuTp4xihDouDfC7VBxl/EwBGPrGmIc hTyZow4QOQl0RO3BEXCioRyp8HwT/CDoYU8jLQDbKBDtkEZMxXgAJg277L18AfWZak0r Ko9OVVDxOYKgEHU8Ne1DM/BFECTeq+RGRWueuuXtbd0/uhDgB7ngB8OB2yt0ToqmbF7b LwSiF0MtkSDc9sg8QaXwkSvo8BdUo9KQqZ8tflNduBWOIRf4vn80NMh89Oz3nCVzetJh APjRZSjoEmZ42rzkAW21mAcA8ze8rgloZ6W1HkzE590vstyjJptSS48xSMM/oaeCTLQW UWrw== X-Gm-Message-State: AKGB3mK0AkaDJVRR6K0DFA5OJ8RZb6o4uYXAX+J5y7U/wT8Hf8M0jTVn dyBWfh8l8EtAO1E7qoey1Nidw2DL X-Google-Smtp-Source: ACJfBovG1bmh5HhpIouQfR3WZg8wJCcSsuV1uXdFoGXOwwJN2BqIbLSz+5Ye/GZSDkHHo9+Q/30rVQ== X-Received: by 10.80.245.220 with SMTP id x28mr5078157edm.160.1515173300417; Fri, 05 Jan 2018 09:28:20 -0800 (PST) Received: from mail-wr0-f179.google.com (mail-wr0-f179.google.com. [209.85.128.179]) by smtp.gmail.com with ESMTPSA id b30sm4926227ede.53.2018.01.05.09.28.19 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 05 Jan 2018 09:28:19 -0800 (PST) Received: by mail-wr0-f179.google.com with SMTP id l19so4928723wrc.2; Fri, 05 Jan 2018 09:28:19 -0800 (PST) X-Received: by 10.223.173.147 with SMTP id w19mr3556684wrc.214.1515173299344; Fri, 05 Jan 2018 09:28:19 -0800 (PST) MIME-Version: 1.0 Received: by 10.223.160.170 with HTTP; Fri, 5 Jan 2018 09:28:18 -0800 (PST) In-Reply-To: <97d173fb-4f47-609d-8319-07282a283473@multiplay.co.uk> References: <201801042005.w04K5liB049411@repo.freebsd.org> <5A4E9397.9000308@grosbein.net> <5A4EDC62.50508@grosbein.net> <5A4F824C.1060405@grosbein.net> <97d173fb-4f47-609d-8319-07282a283473@multiplay.co.uk> From: Matt Joras Date: Fri, 5 Jan 2018 09:28:18 -0800 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: svn commit: r327559 - in head: . sys/net To: Steven Hartland Cc: Eugene Grosbein , src-committers , svn-src-all@freebsd.org, svn-src-head@freebsd.org Content-Type: text/plain; charset="UTF-8" X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 05 Jan 2018 17:28:29 -0000 On Fri, Jan 5, 2018 at 7:42 AM, Steven Hartland wrote: > My current thinking is that flowid shouldn't be used for either LACP or > loadbalance protocols as doing so will almost certainly lead to unexpected > behavior (the stated lagghash may not be valid). > > Regards > Steve > For what it's worth, this was the conclusion I came to, and at Isilon we've made the same change being discussed here. For the case of drivers that end up using a queue index for the flowid, you end up with pathological behavior on the lagg; the flowid ends up getting right shifted by (default) 16. So in the case of e.g. two bxe(4) interfaces with 4 queues, you always end up choosing the interface in the lagg at index 0. This was enough to make us completely disable it. Customers started noticing when they upgraded from the BSD7-based release (which predates flowid) to the BSD10-based release. It is my impression that this sort of situation is probably more common in FreeBSD, especially since some drivers only set the flowid to an RSS hash when RSS is defined, otherwise defaulting to a queue index. Matt From owner-svn-src-head@freebsd.org Fri Jan 5 17:28:52 2018 Return-Path: Delivered-To: svn-src-head@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 9B482EB58FA; Fri, 5 Jan 2018 17:28:52 +0000 (UTC) (envelope-from eugen@grosbein.net) Received: from hz.grosbein.net (hz.grosbein.net [78.47.246.247]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "hz.grosbein.net", Issuer "hz.grosbein.net" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 0F7E173BDC; Fri, 5 Jan 2018 17:28:51 +0000 (UTC) (envelope-from eugen@grosbein.net) Received: from eg.sd.rdtc.ru (root@eg.sd.rdtc.ru [62.231.161.221] (may be forged)) by hz.grosbein.net (8.15.2/8.15.2) with ESMTPS id w05HShk0039854 (version=TLSv1.2 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Fri, 5 Jan 2018 18:28:44 +0100 (CET) (envelope-from eugen@grosbein.net) X-Envelope-From: eugen@grosbein.net X-Envelope-To: steven@multiplay.co.uk Received: from [10.58.0.4] ([10.58.0.4]) by eg.sd.rdtc.ru (8.15.2/8.15.2) with ESMTPS id w05HSaAR017633 (version=TLSv1.2 cipher=DHE-RSA-AES128-SHA bits=128 verify=NOT); Sat, 6 Jan 2018 00:28:36 +0700 (+07) (envelope-from eugen@grosbein.net) Subject: Re: svn commit: r327559 - in head: . sys/net To: Steven Hartland , hiren panchasara References: <201801042005.w04K5liB049411@repo.freebsd.org> <5A4E9397.9000308@grosbein.net> <20180104224214.GD18879@strugglingcoder.info> <63c3c450-aeaf-bdd5-5e16-414146c9bb3a@multiplay.co.uk> <5A4EDE65.1010201@grosbein.net> <688c4d08-3dac-545f-1bed-b21270a03eca@multiplay.co.uk> <5A4F8088.2030700@grosbein.net> <89bfbd34-62c9-3c9f-308e-0053617e63ce@multiplay.co.uk> <5A4FAFA1.2020006@grosbein.net> Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org From: Eugene Grosbein Message-ID: <5A4FB5BF.8040107@grosbein.net> Date: Sat, 6 Jan 2018 00:28:31 +0700 User-Agent: Mozilla/5.0 (Windows NT 6.3; WOW64; rv:38.0) Gecko/20100101 Thunderbird/38.7.2 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=2.2 required=5.0 tests=BAYES_00, LOCAL_FROM, RDNS_NONE autolearn=no autolearn_force=no version=3.4.1 X-Spam-Report: * -2.3 BAYES_00 BODY: Bayes spam probability is 0 to 1% * [score: 0.0000] * 2.6 LOCAL_FROM From my domains * 1.9 RDNS_NONE Delivered to internal network by a host with no rDNS X-Spam-Level: ** X-Spam-Checker-Version: SpamAssassin 3.4.1 (2015-04-28) on hz.grosbein.net X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 05 Jan 2018 17:28:52 -0000 06.01.2018 0:12, Steven Hartland wrote: >>>>>>> I hope there's some improvements that can be made, for example if we can determine >>>>>>> the stream was instigated remotely then flowid would always be valid hence we can use it assuming it >>>>>>> matches the requested spec or if we can make it clear to the user that laggproto is not the one they requested, I'm open to ideas? >>>>>> We just need to clear flow id from incoming TCP segments and always generate new flow id for responses >>>>>> keeping old flow id for IP forwarding case. Please back out your change to not degrade IP forwarding performance. >>>>> Sorry I don't follow you. You seem to be inferring that we can easily generate a flowid without involving the sending hardware >>>> RSS has nothing to do with sending hardware. It's operating system's job to choose outgoing port, not hardware's job. >>> The OS is deciding which outgoing, however its using the hash based on the flowid to do so >> It should use flowid for transit forwarding IP packet only. It should not use flowid from incoming TCP segment. > Not sure I follow your meaning, LACP has nothing to do with incoming TCP, its balancing and hence hashing is performed on outbound (tx) traffic only. You stated that incoming TCP's flowid has influence for outbound responses. It should not. >>>>> I can't see how that is possible as that's chicken and egg i.e. you can't get the HW interface >>>>> to generate the flowid without sending a packet and you can't send a packet >>>>> until you have a the flowid to decide which interface to send it from. >>>> Outgoing packet flow does not and should not depend on incoming flow, >>>> they are independent things in case of LACP. There is no "chicken and egg" problem at all. >>>> >>> But this is how it works ATM, it uses the flowid which is only valid after the first rx. >> Then this is a bug that should be fixed to solve your problem, >> instead of change of lagg defaults that degrades IP forwarding performance. > You seem to be confusing IP forwarding with choice of port in the lagg interface? Choice of outgoing port is performed in case of IP forwarding too. Performance of IP forwarding degrades with your change, that's why I ask you to backout it. From owner-svn-src-head@freebsd.org Fri Jan 5 17:29:49 2018 Return-Path: Delivered-To: svn-src-head@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 AF2EBEB5A29; Fri, 5 Jan 2018 17:29:49 +0000 (UTC) (envelope-from slw@zxy.spb.ru) Received: from zxy.spb.ru (zxy.spb.ru [195.70.199.98]) (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 7189173DB3; Fri, 5 Jan 2018 17:29:49 +0000 (UTC) (envelope-from slw@zxy.spb.ru) Received: from slw by zxy.spb.ru with local (Exim 4.86 (FreeBSD)) (envelope-from ) id 1eXVoP-000Nah-SP; Fri, 05 Jan 2018 20:29:45 +0300 Date: Fri, 5 Jan 2018 20:29:45 +0300 From: Slawa Olhovchenkov To: Eugene Grosbein Cc: svn-src-head@freebsd.org, Steven Hartland , src-committers@freebsd.org, svn-src-all@freebsd.org Subject: Re: svn commit: r327559 - in head: . sys/net Message-ID: <20180105172945.GC5368@zxy.spb.ru> References: <201801042005.w04K5liB049411@repo.freebsd.org> <5A4E9397.9000308@grosbein.net> <20180105131105.GB5368@zxy.spb.ru> <5A4F7F70.5050106@grosbein.net> <20180105143825.GL19373@zxy.spb.ru> <5A4FAEF2.8000802@grosbein.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <5A4FAEF2.8000802@grosbein.net> User-Agent: Mutt/1.5.24 (2015-08-30) X-SA-Exim-Connect-IP: X-SA-Exim-Mail-From: slw@zxy.spb.ru X-SA-Exim-Scanned: No (on zxy.spb.ru); SAEximRunCond expanded to false X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 05 Jan 2018 17:29:49 -0000 On Fri, Jan 05, 2018 at 11:59:30PM +0700, Eugene Grosbein wrote: > 05.01.2018 21:38, Slawa Olhovchenkov wrote: > > >>> Irrelevant to RSS and etc. flowid distribution in lacp case work very > >>> bad. This is good and must be MFC (IMHO). > >> > >> It may work bad depending on NIC and/or traffic type. > >> It works just fine in common case of IP forwarding for packets with TCP/UDP inside. > >> > >> It can be easily disabled locally for specific cases when it does not work. > > > > Packet distrubuting on network equipment (lacp case) w/ enabled flowid cause > > uneven queue distributing. > > Once again: this heavily depends on local environment and this is not true for many cases. For any case resolving cavears need uncommon skills. It's true. Don't using flowid from hardware need negligible CPU power. Safe is disable flowid bDefault disable flowid is safe way w/o performace penalty. From owner-svn-src-head@freebsd.org Fri Jan 5 17:33:01 2018 Return-Path: Delivered-To: svn-src-head@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 277CAEB5DB9; Fri, 5 Jan 2018 17:33:01 +0000 (UTC) (envelope-from eugen@grosbein.net) Received: from hz.grosbein.net (hz.grosbein.net [78.47.246.247]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "hz.grosbein.net", Issuer "hz.grosbein.net" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id A5034741FE; Fri, 5 Jan 2018 17:33:00 +0000 (UTC) (envelope-from eugen@grosbein.net) Received: from eg.sd.rdtc.ru (root@eg.sd.rdtc.ru [62.231.161.221] (may be forged)) by hz.grosbein.net (8.15.2/8.15.2) with ESMTPS id w05HWpLg039903 (version=TLSv1.2 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Fri, 5 Jan 2018 18:32:52 +0100 (CET) (envelope-from eugen@grosbein.net) X-Envelope-From: eugen@grosbein.net X-Envelope-To: mjoras@freebsd.org Received: from [10.58.0.4] ([10.58.0.4]) by eg.sd.rdtc.ru (8.15.2/8.15.2) with ESMTPS id w05HWmkM018901 (version=TLSv1.2 cipher=DHE-RSA-AES128-SHA bits=128 verify=NOT); Sat, 6 Jan 2018 00:32:48 +0700 (+07) (envelope-from eugen@grosbein.net) Subject: Re: svn commit: r327559 - in head: . sys/net To: Matt Joras , Steven Hartland References: <201801042005.w04K5liB049411@repo.freebsd.org> <5A4E9397.9000308@grosbein.net> <5A4EDC62.50508@grosbein.net> <5A4F824C.1060405@grosbein.net> <97d173fb-4f47-609d-8319-07282a283473@multiplay.co.uk> Cc: src-committers , svn-src-all@freebsd.org, svn-src-head@freebsd.org From: Eugene Grosbein Message-ID: <5A4FB6BC.6090506@grosbein.net> Date: Sat, 6 Jan 2018 00:32:44 +0700 User-Agent: Mozilla/5.0 (Windows NT 6.3; WOW64; rv:38.0) Gecko/20100101 Thunderbird/38.7.2 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=2.2 required=5.0 tests=BAYES_00, LOCAL_FROM, RDNS_NONE autolearn=no autolearn_force=no version=3.4.1 X-Spam-Report: * -2.3 BAYES_00 BODY: Bayes spam probability is 0 to 1% * [score: 0.0000] * 2.6 LOCAL_FROM From my domains * 1.9 RDNS_NONE Delivered to internal network by a host with no rDNS X-Spam-Level: ** X-Spam-Checker-Version: SpamAssassin 3.4.1 (2015-04-28) on hz.grosbein.net X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 05 Jan 2018 17:33:01 -0000 06.01.2018 0:28, Matt Joras wrote: > For what it's worth, this was the conclusion I came to, and at Isilon > we've made the same change being discussed here. For the case of > drivers that end up using a queue index for the flowid, you end up > with pathological behavior on the lagg; the flowid ends up getting > right shifted by (default) 16. So in the case of e.g. two bxe(4) > interfaces with 4 queues, you always end up choosing the interface in > the lagg at index 0. Not all drivers have this bug. These are drivers that needs to be fixed to not shift by 16, not lagg. From owner-svn-src-head@freebsd.org Fri Jan 5 17:38:43 2018 Return-Path: Delivered-To: svn-src-head@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 0FCA6EB60E7 for ; Fri, 5 Jan 2018 17:38:43 +0000 (UTC) (envelope-from steven@multiplay.co.uk) Received: from mail-wm0-x22b.google.com (mail-wm0-x22b.google.com [IPv6:2a00:1450:400c:c09::22b]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 8F9A374514 for ; Fri, 5 Jan 2018 17:38:42 +0000 (UTC) (envelope-from steven@multiplay.co.uk) Received: by mail-wm0-x22b.google.com with SMTP id i11so3791764wmf.4 for ; Fri, 05 Jan 2018 09:38:42 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=multiplay-co-uk.20150623.gappssmtp.com; s=20150623; h=subject:to:references:from:message-id:date:user-agent:mime-version :in-reply-to:content-language; bh=mXbSfU4JzPIfZQXL8I5iOBEBkj6jpQiQaU5i2UzkFxs=; b=FaG5up3FDmmH0/bvA6lMkH8g4M8KbSaIbAiPFkdum4G1GFZe3zhC4DF6HtnbTpPgzB /pdCqajpr82NJdQgDHUu0V7QL1bOdRNCIiEKmjgJOfdtAi+yUA8fb9tCI1X2Ke+G2yZJ 3BxyZGYDwHmK678X9cgDG7kj81/ujBYXovXCckPV8Z9l0fuZ/C5jX1Q28iRn/J6M6wJw JFQuZUSVbAW3gUEY+vwyfdjGZLxLdTRoy2JH/LiLlJ/Hfgtn/pj+S7ViKQ1OIc87++x3 v7MAgPTZMP+gSE78wH7hYSarufSsshJLP/MZutufA/GTbDqIwfXkPWyBHskgHKVTRQFe Qq7Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language; bh=mXbSfU4JzPIfZQXL8I5iOBEBkj6jpQiQaU5i2UzkFxs=; b=T/qFOHIHQpnvghgjtHtewmCKg5lwLTP73jaQxH/BL/XbABxRFEZetGlfvEfauLAesm z86mjcvKC5zIOPoKPHfDXzQdbzNkDuIPcEvs9s+Ix3FQWRmnYMNiNWhG6FCze0uZmRse ah/3N/JuN0a0KBA1kc5xdzjjjd9le2uNhYiFp3uqZ9PAQ1M7ZnY8vwZYLM3qXgtLtI+6 dereaDgAEnMiWX4N3JV/E+OS6uIi3yFT3t4RH38Vz5Sv3u+WYni4nqiVSYIgZ2pUoEry tZjzcmEc9V4vTr0fKacSzjqMfBsozGLmNByGQHRKFZ03cXtIe774KQRbN0r3baNXUc56 wcIw== X-Gm-Message-State: AKGB3mK/NgTth5Lw+OQ7Tc7/iyUaELZqHBbEkun1tmp6r3pKOcY/urZG kISDybuwym7pJqn5HQWpbOwJ9m1EdJU= X-Google-Smtp-Source: ACJfBovq2v7TIbwiFy52FYgjiemScpYYGJfKyqDkydAwfGwvnhRE4RefUTSorgBlSRUdaZqDZfDJfQ== X-Received: by 10.80.134.37 with SMTP id o34mr5173727edo.37.1515173920424; Fri, 05 Jan 2018 09:38:40 -0800 (PST) Received: from [10.10.1.111] ([185.97.61.1]) by smtp.gmail.com with ESMTPSA id e46sm4760128edb.93.2018.01.05.09.38.39 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 05 Jan 2018 09:38:39 -0800 (PST) Subject: Re: svn commit: r327559 - in head: . sys/net To: Eugene Grosbein , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org References: <201801042005.w04K5liB049411@repo.freebsd.org> <5A4E9397.9000308@grosbein.net> <5A4EDC62.50508@grosbein.net> <5A4F824C.1060405@grosbein.net> <97d173fb-4f47-609d-8319-07282a283473@multiplay.co.uk> <5A4FB2E0.4010603@grosbein.net> From: Steven Hartland Message-ID: <4e72bc1d-e535-d3e2-eba3-3d9bd575ba4f@multiplay.co.uk> Date: Fri, 5 Jan 2018 17:38:40 +0000 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:52.0) Gecko/20100101 Thunderbird/52.5.2 MIME-Version: 1.0 In-Reply-To: <5A4FB2E0.4010603@grosbein.net> Content-Language: en-US Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit X-Content-Filtered-By: Mailman/MimeDel 2.1.25 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 05 Jan 2018 17:38:43 -0000 On 05/01/2018 17:16, Eugene Grosbein wrote: > >>> That is, there is no guarantee of persistance of flowid of incoming packets >>> as they can be received with distinct ports of lagg being distinct hardware >>> computing flowid differently. Some ports may not support RSS at all. >>> We should not use incoming hardware flowid for anything by default in case of TCP. >> I don't believe your statement about persistence of flowid due to the use of variant ports is correct >> as LACP states that packets from the same flow "should" under normal conditions (no failure) be received on the same port. > It still does not guarantee that and you miss opportunity of network failures that can easily change flowid of incoming packets. Correct, but that's not the normal behavior so the chances of seeing any impact of out of order packets is very small. > >> In the case where the HW doesn't support RSS, then flowid should either always be unset or be set by OS to consistent value hence that should function as expected. >> >> That said I don't disagree that all hostA -> hostB should use Manual hash, as I can't see anyway to use to HW hash, >> however the ports in your example are wrong > Yes, I stand corrected (just copied your example and adjusted it incompletly). > >>> Why do you mix flowid of incoming stream with flowid of outgoing stream? >>> >> I expect this was done so we don't have the overhead of calculating a packet hash for every outgoing packet >> i.e. its an optimization, however I believe this is only possible for the destination host which always >> has a valid flowid, and not for the source host. > How do you know that flowid of incoming packet is preserved on outgoing path? It should not. https://github.com/freebsd/freebsd/blob/master/sys/netinet/ip_output.c#L234     Regards     Steve From owner-svn-src-head@freebsd.org Fri Jan 5 17:46:01 2018 Return-Path: Delivered-To: svn-src-head@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 AA90AEB65F7; Fri, 5 Jan 2018 17:46:01 +0000 (UTC) (envelope-from matt.joras@gmail.com) Received: from mail-wm0-f51.google.com (mail-wm0-f51.google.com [74.125.82.51]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4254474BE1; Fri, 5 Jan 2018 17:46:00 +0000 (UTC) (envelope-from matt.joras@gmail.com) Received: by mail-wm0-f51.google.com with SMTP id g130so7308600wme.0; Fri, 05 Jan 2018 09:46:00 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=VBaZN1zZukBaqI8JtPzcAuRatvJsMnrTtymFy7YE5xw=; b=ZogbTJcmhF+DmkHTIMC72Y1/3BYq+iqvK7COVzYVNwCkN4gP7oWSQzYBj4Oi+9n5Tg lWnJCg6Dfct/ZNjGwGh6m5Kypu8OuvWH/DKGG9yj99r/4MKRb6K64eUl7BEBLZIx4RFZ Oq05NKqfglni0CAikpvAi3IRAfrHBbxoPg+NAN2Pz3exO63x92xuo4I858O6XThWwzhd gRQGiV6zPVcrHVziiD00zm9UfAOgyqyVQJzPxnoplknyZmf1CD5x36sh9YZ6fhQaHo/W 7kUNkC8fIqb6rvUR5npKGnciCrZKhT/br9ROPdIxvxEo34PgpG9tadlwjNE8yTf3CnNt GHaA== X-Gm-Message-State: AKGB3mIfmyxtwWCrbHeouh73JydP6fPgXYgmBu7nV0TL6F/igBTqMnN2 x9aHutndnJO8SyB53ezI6JbjnBTH X-Google-Smtp-Source: ACJfBou19D+2ZxmiVtxfclRhWLs1kynM9HtRcsPnKlY3QUQOyIV8srxoWvBp0tdJzMcY5q75SCfhGg== X-Received: by 10.80.192.11 with SMTP id r11mr5152528edb.184.1515173956535; Fri, 05 Jan 2018 09:39:16 -0800 (PST) Received: from mail-wm0-f41.google.com (mail-wm0-f41.google.com. [74.125.82.41]) by smtp.gmail.com with ESMTPSA id q55sm4167468eda.43.2018.01.05.09.39.16 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 05 Jan 2018 09:39:16 -0800 (PST) Received: by mail-wm0-f41.google.com with SMTP id a79so3801952wma.0; Fri, 05 Jan 2018 09:39:16 -0800 (PST) X-Received: by 10.28.7.144 with SMTP id 138mr2618795wmh.128.1515173956048; Fri, 05 Jan 2018 09:39:16 -0800 (PST) MIME-Version: 1.0 Received: by 10.223.160.170 with HTTP; Fri, 5 Jan 2018 09:39:15 -0800 (PST) In-Reply-To: <5A4FB6BC.6090506@grosbein.net> References: <201801042005.w04K5liB049411@repo.freebsd.org> <5A4E9397.9000308@grosbein.net> <5A4EDC62.50508@grosbein.net> <5A4F824C.1060405@grosbein.net> <97d173fb-4f47-609d-8319-07282a283473@multiplay.co.uk> <5A4FB6BC.6090506@grosbein.net> From: Matt Joras Date: Fri, 5 Jan 2018 09:39:15 -0800 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: svn commit: r327559 - in head: . sys/net To: Eugene Grosbein Cc: Steven Hartland , src-committers , svn-src-all@freebsd.org, svn-src-head@freebsd.org Content-Type: text/plain; charset="UTF-8" X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 05 Jan 2018 17:46:01 -0000 On Fri, Jan 5, 2018 at 9:32 AM, Eugene Grosbein wrote: > 06.01.2018 0:28, Matt Joras wrote: > >> For what it's worth, this was the conclusion I came to, and at Isilon >> we've made the same change being discussed here. For the case of >> drivers that end up using a queue index for the flowid, you end up >> with pathological behavior on the lagg; the flowid ends up getting >> right shifted by (default) 16. So in the case of e.g. two bxe(4) >> interfaces with 4 queues, you always end up choosing the interface in >> the lagg at index 0. > > Not all drivers have this bug. These are drivers that needs to be fixed to not shift by 16, not lagg. > I don't follow. It is if_lagg that does the shifting. For loadbalance it is done directly in lagg_snd_tag_alloc, and for LACP it is done in a separate fucntion, lacp_select_tx_port_by_hash. For both it shifts the flowid by the flowid_shift set on the lagg sc, which defaults to 16. You could make the argument that we should fix every driver that sets a queue index to instead use an RSS hash, but that seems like more work than simply disabling the use of flowid in if_lagg by default. For cases where this has an appreciable impact on forwarding performance the sysctl can be flipped back. That seems more reasonable to me than making laggs effectively useless for anyone using any one of a random set of drivers that set the flowid to a queue index (grep for "flowid =" and you can see which drivers do this). Matt From owner-svn-src-head@freebsd.org Fri Jan 5 17:46:03 2018 Return-Path: Delivered-To: svn-src-head@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 6D95FEB65FB; Fri, 5 Jan 2018 17:46:03 +0000 (UTC) (envelope-from freebsd@pdx.rh.CN85.dnsmgr.net) Received: from pdx.rh.CN85.dnsmgr.net (br1.CN84in.dnsmgr.net [69.59.192.140]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id BABEE74BE2; Fri, 5 Jan 2018 17:46:02 +0000 (UTC) (envelope-from freebsd@pdx.rh.CN85.dnsmgr.net) Received: from pdx.rh.CN85.dnsmgr.net (localhost [127.0.0.1]) by pdx.rh.CN85.dnsmgr.net (8.13.3/8.13.3) with ESMTP id w05HjsNm007405; Fri, 5 Jan 2018 09:45:54 -0800 (PST) (envelope-from freebsd@pdx.rh.CN85.dnsmgr.net) Received: (from freebsd@localhost) by pdx.rh.CN85.dnsmgr.net (8.13.3/8.13.3/Submit) id w05Hjs1q007404; Fri, 5 Jan 2018 09:45:54 -0800 (PST) (envelope-from freebsd) From: "Rodney W. Grimes" Message-Id: <201801051745.w05Hjs1q007404@pdx.rh.CN85.dnsmgr.net> Subject: Re: svn commit: r327577 - head/sys/cam/ata In-Reply-To: <201801050714.w057Edeb035401@repo.freebsd.org> To: Eitan Adler Date: Fri, 5 Jan 2018 09:45:54 -0800 (PST) CC: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Reply-To: rgrimes@freebsd.org X-Mailer: ELM [version 2.4ME+ PL121h (25)] MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=US-ASCII X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 05 Jan 2018 17:46:03 -0000 > Author: eadler > Date: Fri Jan 5 07:14:39 2018 > New Revision: 327577 > URL: https://svnweb.freebsd.org/changeset/base/327577 > > Log: > cam/da: QUIRK: Add 4K quirks for WD Red and Black MHDDs > > PR: 188685 > Submitted by: Jeremy Chadwick > Reported by: Martin Birgmeier Any plans to MFC? to 10 and 11? > Modified: > head/sys/cam/ata/ata_da.c > > Modified: head/sys/cam/ata/ata_da.c > ============================================================================== > --- head/sys/cam/ata/ata_da.c Fri Jan 5 07:09:40 2018 (r327576) > +++ head/sys/cam/ata/ata_da.c Fri Jan 5 07:14:39 2018 (r327577) > @@ -363,7 +363,12 @@ static struct ada_quirk_entry ada_quirk_table[] = > }, > { > /* WDC Caviar Black Advanced Format (4k) drives */ > - { T_DIRECT, SIP_MEDIA_FIXED, "*", "WDC WD??????EX*", "*" }, > + { T_DIRECT, SIP_MEDIA_FIXED, "*", "WDC WD????AZEX*", "*" }, > + /*quirks*/ADA_Q_4K > + }, > + { > + /* WDC Caviar Black Advanced Format (4k) drives */ > + { T_DIRECT, SIP_MEDIA_FIXED, "*", "WDC WD????FZEX*", "*" }, > /*quirks*/ADA_Q_4K > }, > { > > -- Rod Grimes rgrimes@freebsd.org From owner-svn-src-head@freebsd.org Fri Jan 5 17:46:19 2018 Return-Path: Delivered-To: svn-src-head@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 3C338EB666A; Fri, 5 Jan 2018 17:46:19 +0000 (UTC) (envelope-from eugen@grosbein.net) Received: from hz.grosbein.net (hz.grosbein.net [78.47.246.247]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "hz.grosbein.net", Issuer "hz.grosbein.net" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id D60F174D62; Fri, 5 Jan 2018 17:46:13 +0000 (UTC) (envelope-from eugen@grosbein.net) Received: from eg.sd.rdtc.ru (root@eg.sd.rdtc.ru [62.231.161.221] (may be forged)) by hz.grosbein.net (8.15.2/8.15.2) with ESMTPS id w05Hk7m5040030 (version=TLSv1.2 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Fri, 5 Jan 2018 18:46:08 +0100 (CET) (envelope-from eugen@grosbein.net) X-Envelope-From: eugen@grosbein.net X-Envelope-To: steven@multiplay.co.uk Received: from [10.58.0.4] ([10.58.0.4]) by eg.sd.rdtc.ru (8.15.2/8.15.2) with ESMTPS id w05HjuBT022620 (version=TLSv1.2 cipher=DHE-RSA-AES128-SHA bits=128 verify=NOT); Sat, 6 Jan 2018 00:45:56 +0700 (+07) (envelope-from eugen@grosbein.net) Subject: Re: svn commit: r327559 - in head: . sys/net To: Steven Hartland , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org References: <201801042005.w04K5liB049411@repo.freebsd.org> <5A4E9397.9000308@grosbein.net> <5A4EDC62.50508@grosbein.net> <5A4F824C.1060405@grosbein.net> <97d173fb-4f47-609d-8319-07282a283473@multiplay.co.uk> <5A4FB2E0.4010603@grosbein.net> <4e72bc1d-e535-d3e2-eba3-3d9bd575ba4f@multiplay.co.uk> From: Eugene Grosbein Message-ID: <5A4FB9D0.9070700@grosbein.net> Date: Sat, 6 Jan 2018 00:45:52 +0700 User-Agent: Mozilla/5.0 (Windows NT 6.3; WOW64; rv:38.0) Gecko/20100101 Thunderbird/38.7.2 MIME-Version: 1.0 In-Reply-To: <4e72bc1d-e535-d3e2-eba3-3d9bd575ba4f@multiplay.co.uk> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=2.2 required=5.0 tests=BAYES_00, LOCAL_FROM, RDNS_NONE autolearn=no autolearn_force=no version=3.4.1 X-Spam-Report: * -2.3 BAYES_00 BODY: Bayes spam probability is 0 to 1% * [score: 0.0000] * 2.6 LOCAL_FROM From my domains * 1.9 RDNS_NONE Delivered to internal network by a host with no rDNS X-Spam-Level: ** X-Spam-Checker-Version: SpamAssassin 3.4.1 (2015-04-28) on hz.grosbein.net X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 05 Jan 2018 17:46:20 -0000 06.01.2018 0:38, Steven Hartland wrote: >> How do you know that flowid of incoming packet is preserved on outgoing path? It should not. > https://github.com/freebsd/freebsd/blob/master/sys/netinet/ip_output.c#L234 This is a bug then. It should keep previously computed flowid value (for outgoing TCP SYN) and not override it with inp->inp_flowid. From owner-svn-src-head@freebsd.org Fri Jan 5 18:03:55 2018 Return-Path: Delivered-To: svn-src-head@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 75506EB745B for ; Fri, 5 Jan 2018 18:03:55 +0000 (UTC) (envelope-from steven@multiplay.co.uk) Received: from mail-wm0-x232.google.com (mail-wm0-x232.google.com [IPv6:2a00:1450:400c:c09::232]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 009AC758F4 for ; Fri, 5 Jan 2018 18:03:55 +0000 (UTC) (envelope-from steven@multiplay.co.uk) Received: by mail-wm0-x232.google.com with SMTP id a79so3925697wma.0 for ; Fri, 05 Jan 2018 10:03:54 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=multiplay-co-uk.20150623.gappssmtp.com; s=20150623; h=subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language; bh=aE3q1XdywvaG2+ckibxZh2Hm4Nccj2mSJkBndLT8qCI=; b=APqEvZqzUPNZyO1Cw0Khfe4cfdXQw0eovwHsdPsvkOtTDegGOlLoat8Fm7WQF5eUyt Tkwlh5sJ4Rt0Ex9BF5Lmmsswxt8ANcPTsoDUt0fI+rXRcvJKWHXI8ye7VgGxE+ZFhOf9 n6n/JDadNeTC5PvjYFtOwcI9A7CS7JBgmiAD7dIjS4ogsR/QN6TmCbMqiSZ1tAiGLhLt mCCB4rfp6jY364JYaD4/2WPRMNd7F9YVOcM/v1mvsk2OUPJ/UVyKE0C80Le+L+6Bc1Fn ygHg0cbqd4onDmq3TgZM31wpsEaTyz8r2I5boDlg/R9VDd/U+mRZuWUPCyq/2MwnO9i+ kUlg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language; bh=aE3q1XdywvaG2+ckibxZh2Hm4Nccj2mSJkBndLT8qCI=; b=dPi3yUYwHLqypgLxBuzP9fl7Vh7ZFkvOzavXr+hraJdUIn6M3zXySA3ekzHJgz+ktW Zhn7VZyh5qAv/EYfv4swRUXRv/XChDS2PV1urwibh5jpsPjtr6kfgpKsiJ6nmN2/hhgT BEHPJVhM61P31rPbwdCunbMzWBP6FjWerI/JZq8LMTAqwvEDc1UrOYMxDw9YQIgvmEVr A30rdQHIj7ZOBVi1tEwXucFdXAB2tJWM0/62LM5vCKgKXZN/CY3p/qWYBhrQZdbZJeAd VCe1D+OjQc2Qx0DJilqqs5moDrA9BWeyCscDikqhzPbmwt+7CPKMU+W41eFOpz/eGpR+ 9l4w== X-Gm-Message-State: AKGB3mI6opS+dX20M2sbkV4EHYKmZxOCejfER548DgaP3U3MbDlFTJHy I8xqJ9raH93jPtn5r//G50oOpPprFXk= X-Google-Smtp-Source: ACJfBouF7c/BroBKdOscenw4yrftRoDbDg8K2fu3LKzcM5z0bx0+z/bNZzX1xb24AiTHspAI0237xw== X-Received: by 10.80.225.195 with SMTP id m3mr5329762edl.222.1515175432983; Fri, 05 Jan 2018 10:03:52 -0800 (PST) Received: from [10.10.1.111] ([185.97.61.1]) by smtp.gmail.com with ESMTPSA id y1sm4250290edl.39.2018.01.05.10.03.51 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 05 Jan 2018 10:03:52 -0800 (PST) Subject: Re: svn commit: r327559 - in head: . sys/net To: Eugene Grosbein , hiren panchasara Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org References: <201801042005.w04K5liB049411@repo.freebsd.org> <5A4E9397.9000308@grosbein.net> <20180104224214.GD18879@strugglingcoder.info> <63c3c450-aeaf-bdd5-5e16-414146c9bb3a@multiplay.co.uk> <20180105094126.GE18879@strugglingcoder.info> <1854b421-3c09-c040-ba86-738b9c621eae@multiplay.co.uk> <5A4FB0B2.5070108@grosbein.net> From: Steven Hartland Message-ID: <4a3927f8-1ea8-36be-2fbd-e0ddc31563df@multiplay.co.uk> Date: Fri, 5 Jan 2018 18:03:53 +0000 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:52.0) Gecko/20100101 Thunderbird/52.5.2 MIME-Version: 1.0 In-Reply-To: <5A4FB0B2.5070108@grosbein.net> Content-Language: en-US Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 8bit X-Content-Filtered-By: Mailman/MimeDel 2.1.25 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 05 Jan 2018 18:03:55 -0000 On 05/01/2018 17:06, Eugene Grosbein wrote: > 05.01.2018 23:11, Steven Hartland wrote: > >> What do others think, am I missing something? > You still consider only TCP case missing IP forwarning case when all IP packets > are transit coming from lagg0 and going out via lagg1. Just going out via a laggX > > IP forwarding case benefits from pre-computed RSS flowid since 8.0-RELEASE > and your change breaks it. Is there a way to determine if the mbuf is a forwarded mbuf of not? I know I've said it before but just to be totally clear, changing the default was done to prevent broken behavior, if you're not concerned about the issue or you know you're not effected you can enable use_flowid to restore the original behavior. This doesn't have to be the final fix, if there are improvements that can be made to make the default more intelligent for example and use flowid if its known to be good then that can be looked into. In the mean time the new "default" will prevent others from configuring lagg(4) with LACP or loadbalance and ending up with problems; yes this may mean that IP forwarding in HEAD will use manual hashing hence will perform a little worse for now but that's the lesser of two evils.     Regards     Steve From owner-svn-src-head@freebsd.org Fri Jan 5 18:20:37 2018 Return-Path: Delivered-To: svn-src-head@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 77615EB7E38; Fri, 5 Jan 2018 18:20:37 +0000 (UTC) (envelope-from eugen@grosbein.net) Received: from hz.grosbein.net (hz.grosbein.net [78.47.246.247]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "hz.grosbein.net", Issuer "hz.grosbein.net" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 090D87628C; Fri, 5 Jan 2018 18:20:36 +0000 (UTC) (envelope-from eugen@grosbein.net) Received: from eg.sd.rdtc.ru (root@eg.sd.rdtc.ru [62.231.161.221] (may be forged)) by hz.grosbein.net (8.15.2/8.15.2) with ESMTPS id w05IKSqn040262 (version=TLSv1.2 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Fri, 5 Jan 2018 19:20:29 +0100 (CET) (envelope-from eugen@grosbein.net) X-Envelope-From: eugen@grosbein.net X-Envelope-To: mjoras@freebsd.org Received: from [10.58.0.4] ([10.58.0.4]) by eg.sd.rdtc.ru (8.15.2/8.15.2) with ESMTPS id w05IKOHV032644 (version=TLSv1.2 cipher=DHE-RSA-AES128-SHA bits=128 verify=NOT); Sat, 6 Jan 2018 01:20:24 +0700 (+07) (envelope-from eugen@grosbein.net) Subject: Re: svn commit: r327559 - in head: . sys/net To: Matt Joras References: <201801042005.w04K5liB049411@repo.freebsd.org> <5A4E9397.9000308@grosbein.net> <5A4EDC62.50508@grosbein.net> <5A4F824C.1060405@grosbein.net> <97d173fb-4f47-609d-8319-07282a283473@multiplay.co.uk> <5A4FB6BC.6090506@grosbein.net> Cc: Steven Hartland , src-committers , svn-src-all@freebsd.org, svn-src-head@freebsd.org, scottl@freebsd.org From: Eugene Grosbein Message-ID: <5A4FC1E4.9060301@grosbein.net> Date: Sat, 6 Jan 2018 01:20:20 +0700 User-Agent: Mozilla/5.0 (Windows NT 6.3; WOW64; rv:38.0) Gecko/20100101 Thunderbird/38.7.2 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=2.2 required=5.0 tests=BAYES_00, LOCAL_FROM, RDNS_NONE autolearn=no autolearn_force=no version=3.4.1 X-Spam-Report: * -2.3 BAYES_00 BODY: Bayes spam probability is 0 to 1% * [score: 0.0000] * 2.6 LOCAL_FROM From my domains * 1.9 RDNS_NONE Delivered to internal network by a host with no rDNS X-Spam-Level: ** X-Spam-Checker-Version: SpamAssassin 3.4.1 (2015-04-28) on hz.grosbein.net X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 05 Jan 2018 18:20:37 -0000 CC'ng scottl@ as author of the change in question. 06.01.2018 0:39, Matt Joras wrote: >>> For what it's worth, this was the conclusion I came to, and at Isilon >>> we've made the same change being discussed here. For the case of >>> drivers that end up using a queue index for the flowid, you end up >>> with pathological behavior on the lagg; the flowid ends up getting >>> right shifted by (default) 16. So in the case of e.g. two bxe(4) >>> interfaces with 4 queues, you always end up choosing the interface in >>> the lagg at index 0. Then why does if_lagg shifts 16 bits by default? Is seems senseless. This was introduced with r260070 by scottl: > Multi-queue NIC drivers and multi-port lagg tend to use the same lower > bits of the flowid as each other, resulting in a poor distribution of > packets among queues in certain cases. Work around this by adding a > set of sysctls for controlling a bit-shift on the flowid when doing > multi-port aggrigation in lagg and lacp. By default, lagg/lacp will > now use bits 16 and higher instead of 0 and higher. > > Reviewed by: max > Obtained from: Netflix > MFC after: 3 days This commit message does not point to an example of NIC driver that would set non-zero bits 16 and higher for flowid so that shift result would be non-zero. Do we really have such a driver? Anyway, this lagg's default seems to be very driver-centric. For example, Intel driver family also do not use such high bits for flowid just like mentioned bxe(4). We should change flowid_shift default to 0 for if_lagg(4), shouldn't we? From owner-svn-src-head@freebsd.org Fri Jan 5 18:24:21 2018 Return-Path: Delivered-To: svn-src-head@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 7D15AEB839F; Fri, 5 Jan 2018 18:24:21 +0000 (UTC) (envelope-from eugen@grosbein.net) Received: from hz.grosbein.net (hz.grosbein.net [78.47.246.247]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "hz.grosbein.net", Issuer "hz.grosbein.net" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id C73867691E; Fri, 5 Jan 2018 18:24:15 +0000 (UTC) (envelope-from eugen@grosbein.net) Received: from eg.sd.rdtc.ru (root@eg.sd.rdtc.ru [62.231.161.221] (may be forged)) by hz.grosbein.net (8.15.2/8.15.2) with ESMTPS id w05IO63t040290 (version=TLSv1.2 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Fri, 5 Jan 2018 19:24:07 +0100 (CET) (envelope-from eugen@grosbein.net) X-Envelope-From: eugen@grosbein.net X-Envelope-To: steven@multiplay.co.uk Received: from [10.58.0.4] ([10.58.0.4]) by eg.sd.rdtc.ru (8.15.2/8.15.2) with ESMTPS id w05IO2CP033688 (version=TLSv1.2 cipher=DHE-RSA-AES128-SHA bits=128 verify=NOT); Sat, 6 Jan 2018 01:24:03 +0700 (+07) (envelope-from eugen@grosbein.net) Subject: Re: svn commit: r327559 - in head: . sys/net To: Steven Hartland , hiren panchasara References: <201801042005.w04K5liB049411@repo.freebsd.org> <5A4E9397.9000308@grosbein.net> <20180104224214.GD18879@strugglingcoder.info> <63c3c450-aeaf-bdd5-5e16-414146c9bb3a@multiplay.co.uk> <20180105094126.GE18879@strugglingcoder.info> <1854b421-3c09-c040-ba86-738b9c621eae@multiplay.co.uk> <5A4FB0B2.5070108@grosbein.net> <4a3927f8-1ea8-36be-2fbd-e0ddc31563df@multiplay.co.uk> Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org From: Eugene Grosbein Message-ID: <5A4FC2BE.6010506@grosbein.net> Date: Sat, 6 Jan 2018 01:23:58 +0700 User-Agent: Mozilla/5.0 (Windows NT 6.3; WOW64; rv:38.0) Gecko/20100101 Thunderbird/38.7.2 MIME-Version: 1.0 In-Reply-To: <4a3927f8-1ea8-36be-2fbd-e0ddc31563df@multiplay.co.uk> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=2.2 required=5.0 tests=BAYES_00, LOCAL_FROM, RDNS_NONE autolearn=no autolearn_force=no version=3.4.1 X-Spam-Report: * -2.3 BAYES_00 BODY: Bayes spam probability is 0 to 1% * [score: 0.0000] * 2.6 LOCAL_FROM From my domains * 1.9 RDNS_NONE Delivered to internal network by a host with no rDNS X-Spam-Level: ** X-Spam-Checker-Version: SpamAssassin 3.4.1 (2015-04-28) on hz.grosbein.net X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 05 Jan 2018 18:24:22 -0000 06.01.2018 1:03, Steven Hartland wrote: > Is there a way to determine if the mbuf is a forwarded mbuf of not? Yes: m->m_pkthdr.rcvif is defined in case of forwarding. It is NULL for locally originated packets. From owner-svn-src-head@freebsd.org Fri Jan 5 18:32:47 2018 Return-Path: Delivered-To: svn-src-head@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 9B3F8EB8A54; Fri, 5 Jan 2018 18:32:47 +0000 (UTC) (envelope-from jhb@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 6717E76F44; Fri, 5 Jan 2018 18:32:47 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w05IWk39021948; Fri, 5 Jan 2018 18:32:46 GMT (envelope-from jhb@FreeBSD.org) Received: (from jhb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w05IWkef021947; Fri, 5 Jan 2018 18:32:46 GMT (envelope-from jhb@FreeBSD.org) Message-Id: <201801051832.w05IWkef021947@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jhb set sender to jhb@FreeBSD.org using -f From: John Baldwin Date: Fri, 5 Jan 2018 18:32:46 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r327591 - head/sys/fs/procfs X-SVN-Group: head X-SVN-Commit-Author: jhb X-SVN-Commit-Paths: head/sys/fs/procfs X-SVN-Commit-Revision: 327591 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 05 Jan 2018 18:32:47 -0000 Author: jhb Date: Fri Jan 5 18:32:46 2018 New Revision: 327591 URL: https://svnweb.freebsd.org/changeset/base/327591 Log: Correct comment. procfs_doprocfile implements 'file', not 'self'. Modified: head/sys/fs/procfs/procfs.c Modified: head/sys/fs/procfs/procfs.c ============================================================================== --- head/sys/fs/procfs/procfs.c Fri Jan 5 17:23:17 2018 (r327590) +++ head/sys/fs/procfs/procfs.c Fri Jan 5 18:32:46 2018 (r327591) @@ -64,7 +64,7 @@ #include /* - * Filler function for proc/pid/self + * Filler function for proc/pid/file */ int procfs_doprocfile(PFS_FILL_ARGS) From owner-svn-src-head@freebsd.org Fri Jan 5 19:15:25 2018 Return-Path: Delivered-To: svn-src-head@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 A0A3BEBABC0; Fri, 5 Jan 2018 19:15:25 +0000 (UTC) (envelope-from avg@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 6DAC578DE0; Fri, 5 Jan 2018 19:15:25 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w05JFOug038852; Fri, 5 Jan 2018 19:15:24 GMT (envelope-from avg@FreeBSD.org) Received: (from avg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w05JFOFW038851; Fri, 5 Jan 2018 19:15:24 GMT (envelope-from avg@FreeBSD.org) Message-Id: <201801051915.w05JFOFW038851@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: avg set sender to avg@FreeBSD.org using -f From: Andriy Gapon Date: Fri, 5 Jan 2018 19:15:24 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r327593 - head/sys/amd64/vmm/amd X-SVN-Group: head X-SVN-Commit-Author: avg X-SVN-Commit-Paths: head/sys/amd64/vmm/amd X-SVN-Commit-Revision: 327593 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 05 Jan 2018 19:15:25 -0000 Author: avg Date: Fri Jan 5 19:15:24 2018 New Revision: 327593 URL: https://svnweb.freebsd.org/changeset/base/327593 Log: Fix a couple of comments in AMD Virtual Machine Control Block structure MFC after: 1 week Modified: head/sys/amd64/vmm/amd/vmcb.h Modified: head/sys/amd64/vmm/amd/vmcb.h ============================================================================== --- head/sys/amd64/vmm/amd/vmcb.h Fri Jan 5 19:12:36 2018 (r327592) +++ head/sys/amd64/vmm/amd/vmcb.h Fri Jan 5 19:15:24 2018 (r327593) @@ -246,8 +246,8 @@ struct vmcb_ctrl { uint8_t :3; uint8_t v_intr_masking:1; /* Guest and host sharing of RFLAGS. */ uint8_t :7; - uint8_t v_intr_vector; /* 0x65: Vector for virtual interrupt. */ - uint8_t pad3[3]; /* Bit64-40 Reserved. */ + uint8_t v_intr_vector; /* 0x64: Vector for virtual interrupt. */ + uint8_t pad3[3]; /* 0x65-0x67 Reserved. */ uint64_t intr_shadow:1; /* 0x68: Interrupt shadow, section15.2.1 APM2 */ uint64_t :63; uint64_t exitcode; /* 0x70, Exitcode */ From owner-svn-src-head@freebsd.org Fri Jan 5 19:20:45 2018 Return-Path: Delivered-To: svn-src-head@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 025CFEBB105; Fri, 5 Jan 2018 19:20:45 +0000 (UTC) (envelope-from nparhar@gmail.com) Received: from mail-pf0-x234.google.com (mail-pf0-x234.google.com [IPv6:2607:f8b0:400e:c00::234]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id C29B47931D; Fri, 5 Jan 2018 19:20:44 +0000 (UTC) (envelope-from nparhar@gmail.com) Received: by mail-pf0-x234.google.com with SMTP id v26so2553167pfl.7; Fri, 05 Jan 2018 11:20:44 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=x3N8KrHrPxGSorvUnmQ1SaCBptnLR65rU93+zoeb4Lw=; b=jNlEm95VZTIgaXEdW2/MtuLu/yOD4n2jiSefgxIIQ+8sixYfcnSYa9QghNQWUPv2V6 30otiITB4kW07WzzNMU/5ulk9XtKOJ+CRl+hEbCE7ozlZDYWyDTo0VahUS97icKOsvDl G6G+l07UFJPvT46+08lJZUzV/XE7xqc5XRgU/uOnFHTWXP0owEmnNSuA3C8yv3h4yyKO hFUzIoMvLK9EXY/cuYrqSQety6fd2zrfJit81EQpNNsuDSuNkHt92GTMPmbkvKndkPVT 9LQUZbA9OdfRdpoy+6sT0cwsxV2o12Mapjr2BISbrwpuQOfsLn8Eqdh3mHV8sXwo57uz PnyQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=x3N8KrHrPxGSorvUnmQ1SaCBptnLR65rU93+zoeb4Lw=; b=rQnJQomhdLhHHlDEDustpBbYc8JY1gEjXJl4+t0kcJUs0vb7EMiTO0BV0QLLnDM2j+ LvyLid3A7qOQx7UORiKMNEGNmkZzTD1tmRfYBzvoWD5OhPgMOyCXxIq2y7jxBrtTIP6E 60eQyTixhfV0/Kv4urSlXnTuqFLzdNWlbKDowxbM4xQuNnfcqDLwJq8L0JTIjH1OFY+6 S2eDZM7ODDLwmrqJfGQjNPbc3Ev2vQUYElHL7IM62ytYPYDsy68BeTu1yiU83e63EEeX qLynlTUfvjzMq6FlMLMNn0CYcarDqNZEMh/vrMe/ykmypS+ym/Y+87NHwQM5uybI5Uvt z0Xw== X-Gm-Message-State: AKGB3mKSLLNFafLJsX8X5rpsScJUESZ6CNpAV684GlhP8ClRAilEGxsP N0KJRcikjZ8gMHh3nxW0zJfs0kJgaeroxxHt9x0= X-Google-Smtp-Source: ACJfBov7jg+nsWCxi12C62w8/m6PGcmGJG3CYHjhe5dChHOngoHVKuMF4AF+IMKEoCSPTBcRZqDwPBROMANdKPY8VCs= X-Received: by 10.99.54.143 with SMTP id d137mr3360040pga.160.1515180044142; Fri, 05 Jan 2018 11:20:44 -0800 (PST) MIME-Version: 1.0 Received: by 10.100.151.174 with HTTP; Fri, 5 Jan 2018 11:20:43 -0800 (PST) In-Reply-To: <5A4FC2BE.6010506@grosbein.net> References: <201801042005.w04K5liB049411@repo.freebsd.org> <5A4E9397.9000308@grosbein.net> <20180104224214.GD18879@strugglingcoder.info> <63c3c450-aeaf-bdd5-5e16-414146c9bb3a@multiplay.co.uk> <20180105094126.GE18879@strugglingcoder.info> <1854b421-3c09-c040-ba86-738b9c621eae@multiplay.co.uk> <5A4FB0B2.5070108@grosbein.net> <4a3927f8-1ea8-36be-2fbd-e0ddc31563df@multiplay.co.uk> <5A4FC2BE.6010506@grosbein.net> From: Navdeep Parhar Date: Fri, 5 Jan 2018 11:20:43 -0800 Message-ID: Subject: Re: svn commit: r327559 - in head: . sys/net To: Eugene Grosbein Cc: Steven Hartland , hiren panchasara , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Content-Type: text/plain; charset="UTF-8" X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 05 Jan 2018 19:20:45 -0000 On Fri, Jan 5, 2018 at 10:23 AM, Eugene Grosbein wrote: > 06.01.2018 1:03, Steven Hartland wrote: > >> Is there a way to determine if the mbuf is a forwarded mbuf of not? > > Yes: m->m_pkthdr.rcvif is defined in case of forwarding. > It is NULL for locally originated packets. > Can't rely on this any more: 150 union { 151 struct m_snd_tag *snd_tag; /* send tag, if any */ 152 struct ifnet *rcvif; /* rcv interface */ 153 }; Regards, Navdeep From owner-svn-src-head@freebsd.org Fri Jan 5 19:43:56 2018 Return-Path: Delivered-To: svn-src-head@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 44DD6EBC75F; Fri, 5 Jan 2018 19:43:56 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from mail.baldwin.cx (bigwig.baldwin.cx [96.47.65.170]) (using TLSv1 with cipher DHE-RSA-CAMELLIA256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 215F37A9D7; Fri, 5 Jan 2018 19:43:55 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from ralph.baldwin.cx (astound-66-234-202-155.ca.astound.net [66.234.202.155]) by mail.baldwin.cx (Postfix) with ESMTPSA id C625D10AFBF; Fri, 5 Jan 2018 14:43:53 -0500 (EST) From: John Baldwin To: src-committers@freebsd.org Cc: svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r327561 - head/sys/kern Date: Thu, 04 Jan 2018 16:11:41 -0800 Message-ID: <1649262.tCGsAUtXnD@ralph.baldwin.cx> User-Agent: KMail/4.14.10 (FreeBSD/11.1-STABLE; KDE/4.14.30; amd64; ; ) In-Reply-To: <201801042159.w04LxYfW099338@repo.freebsd.org> References: <201801042159.w04LxYfW099338@repo.freebsd.org> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.4.3 (mail.baldwin.cx); Fri, 05 Jan 2018 14:43:53 -0500 (EST) X-Virus-Scanned: clamav-milter 0.99.2 at mail.baldwin.cx X-Virus-Status: Clean X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 05 Jan 2018 19:43:56 -0000 On Thursday, January 04, 2018 09:59:34 PM John Baldwin wrote: > Author: jhb > Date: Thu Jan 4 21:59:34 2018 > New Revision: 327561 > URL: https://svnweb.freebsd.org/changeset/base/327561 > > Log: > Report offset relative to the backing object for kinfo_vmentry structures. > > For the pathname reported in kinfo_vmentry structures (kve_path), the > sysctl handlers walk the object chain to find the bottom-most VM object. > This permits a COW mapping of a file with dirty pages to report the > pathname of the originally mapped file. Do the same for the object > offset (kve_offset) computing a cumulative offset during the same object > walk so that the reported offset is relative to the reported pathname. > > Note that ptrace(PT_VM_ENTRY) already returns a cumulative offset > rather than the raw offset of the VM map entry. > > Note also that this does not affect procstat -v output (even structured > output) since that output does not include the kve_offset field. In particular, this does affect the output of 'info proc mappings' in a set of GDB patches currently under review. Before: (gdb) info proc mappings process 34399 Mapped address spaces: Start Addr End Addr Size Offset Flags File 0x400000 0x408000 0x8000 0x0 r-x C--- /bin/ls 0x607000 0x609000 0x2000 0x0 rw- ---- 0x800607000 0x800628000 0x21000 0x0 r-x C--- /libexec/ld-elf.so.1 0x800628000 0x800630000 0x8000 0x0 rw- ---- 0x800631000 0x800652000 0x21000 0x0 rw- ---- 0x800827000 0x800828000 0x1000 0x0 rw- C--- /libexec/ld-elf.so.1 0x800828000 0x800829000 0x1000 0x0 rw- ---- 0x800829000 0x800845000 0x1c000 0x0 r-x CN-- /lib/libxo.so.0 0x800845000 0x800a45000 0x200000 0x1c000 --- CN-- 0x800a45000 0x800a46000 0x1000 0x0 rw- C--- /lib/libxo.so.0 After: (gdb) info proc mappings process 822 Mapped address spaces: Start Addr End Addr Size Offset Flags File 0x400000 0x408000 0x8000 0x0 r-x C--- /bin/ls 0x607000 0x608000 0x1000 0x0 rw- ---- 0x800607000 0x800629000 0x22000 0x0 r-x C--- /libexec/ld-elf.so.1 0x800629000 0x800649000 0x20000 0x0 rw- ---- 0x800649000 0x80064a000 0x1000 0x0 r-- ---- 0x80064a000 0x800653000 0x9000 0x0 rw- ---- 0x800829000 0x80082b000 0x2000 0x0 rw- ---- 0x80082b000 0x800847000 0x1c000 0x0 r-x CN-- /lib/libxo.so.0 0x800847000 0x800a47000 0x200000 0x1c000 --- CN-- 0x800a47000 0x800a48000 0x1000 0x1c000 rw- C--- /lib/libxo.so.0 -- John Baldwin From owner-svn-src-head@freebsd.org Fri Jan 5 20:08:10 2018 Return-Path: Delivered-To: svn-src-head@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 6A229EBDB06; Fri, 5 Jan 2018 20:08:10 +0000 (UTC) (envelope-from eugen@grosbein.net) Received: from hz.grosbein.net (hz.grosbein.net [78.47.246.247]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "hz.grosbein.net", Issuer "hz.grosbein.net" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id D292B7BBAB; Fri, 5 Jan 2018 20:08:09 +0000 (UTC) (envelope-from eugen@grosbein.net) Received: from eg.sd.rdtc.ru (root@eg.sd.rdtc.ru [62.231.161.221] (may be forged)) by hz.grosbein.net (8.15.2/8.15.2) with ESMTPS id w05K841s041008 (version=TLSv1.2 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Fri, 5 Jan 2018 21:08:04 +0100 (CET) (envelope-from eugen@grosbein.net) X-Envelope-From: eugen@grosbein.net X-Envelope-To: nparhar@gmail.com Received: from [10.58.0.4] (dadv@[10.58.0.4]) by eg.sd.rdtc.ru (8.15.2/8.15.2) with ESMTPS id w05K7q75063660 (version=TLSv1.2 cipher=DHE-RSA-AES128-SHA bits=128 verify=NOT); Sat, 6 Jan 2018 03:07:53 +0700 (+07) (envelope-from eugen@grosbein.net) Subject: Re: svn commit: r327559 - in head: . sys/net To: Navdeep Parhar References: <201801042005.w04K5liB049411@repo.freebsd.org> <5A4E9397.9000308@grosbein.net> <20180104224214.GD18879@strugglingcoder.info> <63c3c450-aeaf-bdd5-5e16-414146c9bb3a@multiplay.co.uk> <20180105094126.GE18879@strugglingcoder.info> <1854b421-3c09-c040-ba86-738b9c621eae@multiplay.co.uk> <5A4FB0B2.5070108@grosbein.net> <4a3927f8-1ea8-36be-2fbd-e0ddc31563df@multiplay.co.uk> <5A4FC2BE.6010506@grosbein.net> Cc: Steven Hartland , hiren panchasara , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org From: Eugene Grosbein Message-ID: <5A4FDB19.6020402@grosbein.net> Date: Sat, 6 Jan 2018 03:07:53 +0700 User-Agent: Mozilla/5.0 (Windows NT 6.3; WOW64; rv:38.0) Gecko/20100101 Thunderbird/38.7.2 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=2.2 required=5.0 tests=BAYES_00, LOCAL_FROM, RDNS_NONE, T_DATE_IN_FUTURE_96_Q autolearn=no autolearn_force=no version=3.4.1 X-Spam-Report: * 0.0 T_DATE_IN_FUTURE_96_Q Date: is 4 days to 4 months after Received: * date * -2.3 BAYES_00 BODY: Bayes spam probability is 0 to 1% * [score: 0.0000] * 2.6 LOCAL_FROM From my domains * 1.9 RDNS_NONE Delivered to internal network by a host with no rDNS X-Spam-Level: ** X-Spam-Checker-Version: SpamAssassin 3.4.1 (2015-04-28) on hz.grosbein.net X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 05 Jan 2018 20:08:10 -0000 06.01.2018 2:20, Navdeep Parhar пишет: > On Fri, Jan 5, 2018 at 10:23 AM, Eugene Grosbein wrote: >> 06.01.2018 1:03, Steven Hartland wrote: >> >>> Is there a way to determine if the mbuf is a forwarded mbuf of not? >> >> Yes: m->m_pkthdr.rcvif is defined in case of forwarding. >> It is NULL for locally originated packets. >> > > Can't rely on this any more: > > 150 union { > 151 struct m_snd_tag *snd_tag; /* send tag, if any */ > 152 struct ifnet *rcvif; /* rcv interface */ > 153 }; Really? That's very bad as some parts of kernel do rely in this. For example, ipfw's iface_match() function is called with m->m_pkthdr.rcvif as first argument and check it for NULL to match "via/recv/xmit ifname" rule options. From owner-svn-src-head@freebsd.org Fri Jan 5 20:21:47 2018 Return-Path: Delivered-To: svn-src-head@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 6BBA0EBE7C7; Fri, 5 Jan 2018 20:21:47 +0000 (UTC) (envelope-from glebius@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 391977C726; Fri, 5 Jan 2018 20:21:47 +0000 (UTC) (envelope-from glebius@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w05KLkdk067950; Fri, 5 Jan 2018 20:21:46 GMT (envelope-from glebius@FreeBSD.org) Received: (from glebius@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w05KLkF6067949; Fri, 5 Jan 2018 20:21:46 GMT (envelope-from glebius@FreeBSD.org) Message-Id: <201801052021.w05KLkF6067949@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: glebius set sender to glebius@FreeBSD.org using -f From: Gleb Smirnoff Date: Fri, 5 Jan 2018 20:21:46 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r327596 - head/sys/kern X-SVN-Group: head X-SVN-Commit-Author: glebius X-SVN-Commit-Paths: head/sys/kern X-SVN-Commit-Revision: 327596 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 05 Jan 2018 20:21:47 -0000 Author: glebius Date: Fri Jan 5 20:21:46 2018 New Revision: 327596 URL: https://svnweb.freebsd.org/changeset/base/327596 Log: In sendfile_iodone() both pru_abort and sorele need to be executed with proper VNET context set. Reported by: sbruno MFC after: 2 weeks Modified: head/sys/kern/kern_sendfile.c Modified: head/sys/kern/kern_sendfile.c ============================================================================== --- head/sys/kern/kern_sendfile.c Fri Jan 5 19:28:13 2018 (r327595) +++ head/sys/kern/kern_sendfile.c Fri Jan 5 20:21:46 2018 (r327596) @@ -273,6 +273,7 @@ sendfile_iodone(void *arg, vm_page_t *pg, int count, i if (!refcount_release(&sfio->nios)) return; + CURVNET_SET(so->so_vnet); if (sfio->error) { struct mbuf *m; @@ -293,15 +294,13 @@ sendfile_iodone(void *arg, vm_page_t *pg, int count, i m = sfio->m; for (int i = 0; i < sfio->npages; i++) m = m_free(m); - } else { - CURVNET_SET(so->so_vnet); + } else (void )(so->so_proto->pr_usrreqs->pru_ready)(so, sfio->m, sfio->npages); - CURVNET_RESTORE(); - } SOCK_LOCK(so); sorele(so); + CURVNET_RESTORE(); free(sfio, M_TEMP); } From owner-svn-src-head@freebsd.org Fri Jan 5 21:01:11 2018 Return-Path: Delivered-To: svn-src-head@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 81B8AEC05F6 for ; Fri, 5 Jan 2018 21:01:11 +0000 (UTC) (envelope-from steven@multiplay.co.uk) Received: from mail-wm0-x22d.google.com (mail-wm0-x22d.google.com [IPv6:2a00:1450:400c:c09::22d]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 0C82C7E39A for ; Fri, 5 Jan 2018 21:01:11 +0000 (UTC) (envelope-from steven@multiplay.co.uk) Received: by mail-wm0-x22d.google.com with SMTP id a79so4658236wma.0 for ; Fri, 05 Jan 2018 13:01:10 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=multiplay-co-uk.20150623.gappssmtp.com; s=20150623; h=from:subject:to:cc:references:message-id:date:user-agent :mime-version:in-reply-to:content-language; bh=bSI5yhqw+EP0Vk9ilPPK/niRexyAe4eOwCk+9dxTgyM=; b=F+OXOKZRT6tmWn5AZVGRNmFFTNyTIAnDI59hqGkGfe70nLZGxVvLgsAjn2zMJLOMaE Q7KZIFiSlAI52fjBUznCHCwoZlGrxA5sH/J0/P3dC6S594UdO3K+EjRFubXGLYNhzBCV tIRUxsieSbIClfnVH7l7I6l2tGbq1NvbhfJoAzziECYLFYk9WLg2YrmF8sEjLjDFcLUo Lc3nYF5H8HKAE8A/8yqwMb+h9nK/eqZaPyC7VUgSP6UgeR+u33aMzALiihYZNKMedvqa MnPuaHoQUOw8h3QgY1I+Kb9pLmI8Ly/1BeSlvdUEb43a8GvPNccsTjyRIJPYE8dD2iB/ BKfQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:subject:to:cc:references:message-id:date :user-agent:mime-version:in-reply-to:content-language; bh=bSI5yhqw+EP0Vk9ilPPK/niRexyAe4eOwCk+9dxTgyM=; b=ghw9DCh0Tkq+wSYmSj+471nhRGnzlsla99QiHbu7iOV/VWrsqJY2TiZ8qtXE28ymxZ M27ao3NEZchHIZbe69DDRcuNYpXd16ciGgJObLxhOujQFqce02qc7K5ELhxtMVVcZ7qF zhPjLY0Jki1bFyVRDaGKkYm/0O85wLK7tUHt1kjHOQaNrLUzdNa1RxKop29er/DYRoNr N1FEYlh+wVsFya8WkdfO/VBOgWonnz5MxDgEhpAg01zduRJ3+yENa25vm7slxdxZYHxe pcXUoT9KpwMejUjTGSgFT7yFBW8Od81K/jF5YrEB+25DE43a6EET5sVkhVRCgW9ZB6o3 yM2g== X-Gm-Message-State: AKGB3mIHfDtzZLAYX8RXTSALpFZgj6DMSQ+Qk1HjpSpfreVBCF94O6bn lHeMwM6iI5IzelD0WBX5RzWGdYwk7IQ= X-Google-Smtp-Source: ACJfBosFkbsNW57fFlshbbSQkqqGwcNtj7CeJaWKFqi4ZUbKU5OJVF6QHd/lAxLraXkWoTLii3neLQ== X-Received: by 10.80.240.10 with SMTP id r10mr5808583edl.91.1515186068887; Fri, 05 Jan 2018 13:01:08 -0800 (PST) Received: from [10.10.1.111] ([185.97.61.1]) by smtp.gmail.com with ESMTPSA id j27sm5466316eda.59.2018.01.05.13.01.07 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 05 Jan 2018 13:01:07 -0800 (PST) From: Steven Hartland Subject: Re: svn commit: r327559 - in head: . sys/net To: Matt Joras , Eugene Grosbein Cc: src-committers , svn-src-all@freebsd.org, svn-src-head@freebsd.org References: <201801042005.w04K5liB049411@repo.freebsd.org> <5A4E9397.9000308@grosbein.net> <5A4EDC62.50508@grosbein.net> <5A4F824C.1060405@grosbein.net> <97d173fb-4f47-609d-8319-07282a283473@multiplay.co.uk> <5A4FB6BC.6090506@grosbein.net> Message-ID: Date: Fri, 5 Jan 2018 21:01:09 +0000 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:52.0) Gecko/20100101 Thunderbird/52.5.2 MIME-Version: 1.0 In-Reply-To: Content-Language: en-US Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit X-Content-Filtered-By: Mailman/MimeDel 2.1.25 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 05 Jan 2018 21:01:11 -0000 On 05/01/2018 17:39, Matt Joras wrote: > On Fri, Jan 5, 2018 at 9:32 AM, Eugene Grosbein wrote: >> 06.01.2018 0:28, Matt Joras wrote: >> >>> For what it's worth, this was the conclusion I came to, and at Isilon >>> we've made the same change being discussed here. For the case of >>> drivers that end up using a queue index for the flowid, you end up >>> with pathological behavior on the lagg; the flowid ends up getting >>> right shifted by (default) 16. So in the case of e.g. two bxe(4) >>> interfaces with 4 queues, you always end up choosing the interface in >>> the lagg at index 0. >> Not all drivers have this bug. These are drivers that needs to be fixed to not shift by 16, not lagg. >> > I don't follow. It is if_lagg that does the shifting. For loadbalance > it is done directly in lagg_snd_tag_alloc, and for LACP it is done in > a separate fucntion, lacp_select_tx_port_by_hash. For both it shifts > the flowid by the flowid_shift set on the lagg sc, which defaults to > 16. For reference lacp_select_tx_port is the normal method, lacp_select_tx_port_by_hash is only used if RATELIMIT is enabled. They both do the same shift though, so ... > You could make the argument that we should fix every driver that sets > a queue index to instead use an RSS hash, but that seems like more > work than simply disabling the use of flowid in if_lagg by default. > For cases where this has an appreciable impact on forwarding > performance the sysctl can be flipped back. That seems more reasonable > to me than making laggs effectively useless for anyone using any one > of a random set of drivers that set the flowid to a queue index (grep > for "flowid =" and you can see which drivers do this). > > Matt From owner-svn-src-head@freebsd.org Fri Jan 5 21:06:22 2018 Return-Path: Delivered-To: svn-src-head@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 1C13CEC0ADF; Fri, 5 Jan 2018 21:06:22 +0000 (UTC) (envelope-from kib@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 AB7537E772; Fri, 5 Jan 2018 21:06:21 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w05L6KKA085739; Fri, 5 Jan 2018 21:06:20 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w05L6KjA085731; Fri, 5 Jan 2018 21:06:20 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201801052106.w05L6KjA085731@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Fri, 5 Jan 2018 21:06:20 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r327597 - in head: sys/amd64/amd64 sys/dev/cpuctl sys/sys sys/x86/include sys/x86/x86 usr.sbin/cpucontrol X-SVN-Group: head X-SVN-Commit-Author: kib X-SVN-Commit-Paths: in head: sys/amd64/amd64 sys/dev/cpuctl sys/sys sys/x86/include sys/x86/x86 usr.sbin/cpucontrol X-SVN-Commit-Revision: 327597 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 05 Jan 2018 21:06:22 -0000 Author: kib Date: Fri Jan 5 21:06:19 2018 New Revision: 327597 URL: https://svnweb.freebsd.org/changeset/base/327597 Log: Make it possible to re-evaluate cpu_features. Add cpuctl(4) ioctl CPUCTL_EVAL_CPU_FEATURES which forces re-read of cpu_features, cpu_features2, cpu_stdext_features, and std_stdext_features2. The intent is to allow the kernel to see the changes in the CPU features after micocode update. Of course, the update is not atomic across variables and not synchronized with readers. See the man page warning as well. Reviewed by: imp (previous version), jilles Sponsored by: The FreeBSD Foundation MFC after: 1 week Differential revision: https://reviews.freebsd.org/D13770 Modified: head/sys/amd64/amd64/machdep.c head/sys/dev/cpuctl/cpuctl.c head/sys/sys/cpuctl.h head/sys/x86/include/x86_var.h head/sys/x86/x86/identcpu.c head/usr.sbin/cpucontrol/cpucontrol.8 head/usr.sbin/cpucontrol/cpucontrol.c Modified: head/sys/amd64/amd64/machdep.c ============================================================================== --- head/sys/amd64/amd64/machdep.c Fri Jan 5 20:21:46 2018 (r327596) +++ head/sys/amd64/amd64/machdep.c Fri Jan 5 21:06:19 2018 (r327597) @@ -1535,7 +1535,7 @@ hammer_time(u_int64_t modulep, u_int64_t physfree) kmdp = init_ops.parse_preload_data(modulep); - identify_cpu(); + identify_cpu1(); identify_hypervisor(); /* Init basic tunables, hz etc */ Modified: head/sys/dev/cpuctl/cpuctl.c ============================================================================== --- head/sys/dev/cpuctl/cpuctl.c Fri Jan 5 20:21:46 2018 (r327596) +++ head/sys/dev/cpuctl/cpuctl.c Fri Jan 5 21:06:19 2018 (r327597) @@ -73,6 +73,7 @@ static int cpuctl_do_cpuid(int cpu, cpuctl_cpuid_args_ struct thread *td); static int cpuctl_do_cpuid_count(int cpu, cpuctl_cpuid_count_args_t *data, struct thread *td); +static int cpuctl_do_eval_cpu_features(int cpu, struct thread *td); static int cpuctl_do_update(int cpu, cpuctl_update_args_t *data, struct thread *td); static int update_intel(int cpu, cpuctl_update_args_t *args, @@ -159,7 +160,8 @@ cpuctl_ioctl(struct cdev *dev, u_long cmd, caddr_t dat } /* Require write flag for "write" requests. */ if ((cmd == CPUCTL_MSRCBIT || cmd == CPUCTL_MSRSBIT || - cmd == CPUCTL_UPDATE || cmd == CPUCTL_WRMSR) && + cmd == CPUCTL_UPDATE || cmd == CPUCTL_WRMSR || + cmd == CPUCTL_EVAL_CPU_FEATURES) && (flags & FWRITE) == 0) return (EPERM); switch (cmd) { @@ -187,6 +189,9 @@ cpuctl_ioctl(struct cdev *dev, u_long cmd, caddr_t dat ret = cpuctl_do_cpuid_count(cpu, (cpuctl_cpuid_count_args_t *)data, td); break; + case CPUCTL_EVAL_CPU_FEATURES: + ret = cpuctl_do_eval_cpu_features(cpu, td); + break; default: ret = EINVAL; break; @@ -503,6 +508,29 @@ fail: free(ptr, M_CPUCTL); return (ret); } + +static int +cpuctl_do_eval_cpu_features(int cpu, struct thread *td) +{ + int is_bound = 0; + int oldcpu; + + KASSERT(cpu >= 0 && cpu <= mp_maxid, + ("[cpuctl,%d]: bad cpu number %d", __LINE__, cpu)); + +#ifdef __i386__ + if (cpu_id == 0) + return (ENODEV); +#endif + oldcpu = td->td_oncpu; + is_bound = cpu_sched_is_bound(td); + set_cpu(cpu, td); + identify_cpu1(); + identify_cpu2(); + restore_cpu(oldcpu, is_bound, td); + return (0); +} + int cpuctl_open(struct cdev *dev, int flags, int fmt __unused, struct thread *td) Modified: head/sys/sys/cpuctl.h ============================================================================== --- head/sys/sys/cpuctl.h Fri Jan 5 20:21:46 2018 (r327596) +++ head/sys/sys/cpuctl.h Fri Jan 5 21:06:19 2018 (r327597) @@ -59,5 +59,6 @@ typedef struct { #define CPUCTL_MSRSBIT _IOWR('c', 5, cpuctl_msr_args_t) #define CPUCTL_MSRCBIT _IOWR('c', 6, cpuctl_msr_args_t) #define CPUCTL_CPUID_COUNT _IOWR('c', 7, cpuctl_cpuid_count_args_t) +#define CPUCTL_EVAL_CPU_FEATURES _IO('c', 8) #endif /* _CPUCTL_H_ */ Modified: head/sys/x86/include/x86_var.h ============================================================================== --- head/sys/x86/include/x86_var.h Fri Jan 5 20:21:46 2018 (r327596) +++ head/sys/x86/include/x86_var.h Fri Jan 5 21:06:19 2018 (r327597) @@ -119,7 +119,8 @@ void cpu_setregs(void); void dump_add_page(vm_paddr_t); void dump_drop_page(vm_paddr_t); void finishidentcpu(void); -void identify_cpu(void); +void identify_cpu1(void); +void identify_cpu2(void); void identify_hypervisor(void); void initializecpu(void); void initializecpucache(void); Modified: head/sys/x86/x86/identcpu.c ============================================================================== --- head/sys/x86/x86/identcpu.c Fri Jan 5 20:21:46 2018 (r327596) +++ head/sys/x86/x86/identcpu.c Fri Jan 5 21:06:19 2018 (r327597) @@ -1385,9 +1385,8 @@ fix_cpuid(void) return (false); } -#ifdef __amd64__ void -identify_cpu(void) +identify_cpu1(void) { u_int regs[4]; @@ -1404,15 +1403,37 @@ identify_cpu(void) cpu_feature = regs[3]; cpu_feature2 = regs[2]; } -#endif +void +identify_cpu2(void) +{ + u_int regs[4], cpu_stdext_disable; + + if (cpu_high >= 7) { + cpuid_count(7, 0, regs); + cpu_stdext_feature = regs[1]; + + /* + * Some hypervisors failed to filter out unsupported + * extended features. Allow to disable the + * extensions, activation of which requires setting a + * bit in CR4, and which VM monitors do not support. + */ + cpu_stdext_disable = 0; + TUNABLE_INT_FETCH("hw.cpu_stdext_disable", &cpu_stdext_disable); + cpu_stdext_feature &= ~cpu_stdext_disable; + + cpu_stdext_feature2 = regs[2]; + } +} + /* * Final stage of CPU identification. */ void finishidentcpu(void) { - u_int regs[4], cpu_stdext_disable; + u_int regs[4]; #ifdef __i386__ u_char ccr3; #endif @@ -1431,22 +1452,7 @@ finishidentcpu(void) cpu_mon_max_size = regs[1] & CPUID5_MON_MAX_SIZE; } - if (cpu_high >= 7) { - cpuid_count(7, 0, regs); - cpu_stdext_feature = regs[1]; - - /* - * Some hypervisors failed to filter out unsupported - * extended features. Allow to disable the - * extensions, activation of which requires setting a - * bit in CR4, and which VM monitors do not support. - */ - cpu_stdext_disable = 0; - TUNABLE_INT_FETCH("hw.cpu_stdext_disable", &cpu_stdext_disable); - cpu_stdext_feature &= ~cpu_stdext_disable; - - cpu_stdext_feature2 = regs[2]; - } + identify_cpu2(); #ifdef __i386__ if (cpu_high > 0 && Modified: head/usr.sbin/cpucontrol/cpucontrol.8 ============================================================================== --- head/usr.sbin/cpucontrol/cpucontrol.8 Fri Jan 5 20:21:46 2018 (r327596) +++ head/usr.sbin/cpucontrol/cpucontrol.8 Fri Jan 5 21:06:19 2018 (r327597) @@ -24,7 +24,7 @@ .\" .\" $FreeBSD$ .\" -.Dd September 30, 2017 +.Dd January 5, 2018 .Dt CPUCONTROL 8 .Os .Sh NAME @@ -34,46 +34,51 @@ device .Sh SYNOPSIS .Nm +.Bk .Op Fl v .Fl m Ar msr -.Bk .Ar device .Ek +.Bk .Nm .Op Fl v .Fl m Ar msr Ns = Ns Ar value -.Bk .Ar device .Ek +.Bk .Nm .Op Fl v .Fl m Ar msr Ns &= Ns Ar mask -.Bk .Ar device .Ek +.Bk .Nm .Op Fl v .Fl m Ar msr Ns |= Ns Ar mask -.Bk .Ar device .Ek +.Bk .Nm .Op Fl v .Fl i Ar level -.Bk .Ar device .Ek +.Bk .Nm .Op Fl v .Fl i Ar level,level_type -.Bk .Ar device .Ek +.Bk .Nm .Op Fl vn .Op Fl d Ar datadir .Fl u +.Ar device +.Ek .Bk +.Nm +.Fl e .Ar device .Ek .Sh DESCRIPTION @@ -136,6 +141,20 @@ The .Nm utility will walk through the configured data directories and apply all firmware updates available for this CPU. +.It Fl e +Re-evaluate the kernel flags indicating the present CPU features. +This command is typically executed after a firmware update was applied +which changes information reported by the +.Dv CPUID +instruction. +.Pp +.Bf -symbolic +Only execute the +.Fl e +command after the microcode update was applied to all CPUs in the system. +The kernel does not operate correctly if the features of processors are +not identical. +.Ef .It Fl v Increase the verbosity level. .It Fl h Modified: head/usr.sbin/cpucontrol/cpucontrol.c ============================================================================== --- head/usr.sbin/cpucontrol/cpucontrol.c Fri Jan 5 20:21:46 2018 (r327596) +++ head/usr.sbin/cpucontrol/cpucontrol.c Fri Jan 5 21:06:19 2018 (r327597) @@ -63,6 +63,7 @@ int verbosity_level = 0; #define FLAG_M 0x02 #define FLAG_U 0x04 #define FLAG_N 0x08 +#define FLAG_E 0x10 #define OP_INVAL 0x00 #define OP_READ 0x01 @@ -117,7 +118,7 @@ usage(void) if (name == NULL) name = "cpuctl"; fprintf(stderr, "Usage: %s [-vh] [-d datadir] [-m msr[=value] | " - "-i level | -i level,level_type | -u] device\n", name); + "-i level | -i level,level_type | -e | -u] device\n", name); exit(EX_USAGE); } @@ -341,6 +342,25 @@ do_msr(const char *cmdarg, const char *dev) } static int +do_eval_cpu_features(const char *dev) +{ + int fd, error; + + assert(dev != NULL); + + fd = open(dev, O_RDWR); + if (fd < 0) { + WARN(0, "error opening %s for writing", dev); + return (1); + } + error = ioctl(fd, CPUCTL_EVAL_CPU_FEATURES, NULL); + if (error < 0) + WARN(0, "ioctl(%s, CPUCTL_EVAL_CPU_FEATURES)", dev); + close(fd); + return (error); +} + +static int do_update(const char *dev) { int fd; @@ -430,11 +450,14 @@ main(int argc, char *argv[]) error = 0; cmdarg = ""; /* To keep gcc3 happy. */ - while ((c = getopt(argc, argv, "d:hi:m:nuv")) != -1) { + while ((c = getopt(argc, argv, "d:ehi:m:nuv")) != -1) { switch (c) { case 'd': datadir_add(optarg); break; + case 'e': + flags |= FLAG_E; + break; case 'i': flags |= FLAG_I; cmdarg = optarg; @@ -468,22 +491,25 @@ main(int argc, char *argv[]) if ((flags & FLAG_N) == 0) datadir_add(DEFAULT_DATADIR); dev = argv[0]; - c = flags & (FLAG_I | FLAG_M | FLAG_U); + c = flags & (FLAG_E | FLAG_I | FLAG_M | FLAG_U); switch (c) { - case FLAG_I: - if (strstr(cmdarg, ",") != NULL) - error = do_cpuid_count(cmdarg, dev); - else - error = do_cpuid(cmdarg, dev); - break; - case FLAG_M: - error = do_msr(cmdarg, dev); - break; - case FLAG_U: - error = do_update(dev); - break; - default: - usage(); /* Only one command can be selected. */ + case FLAG_I: + if (strstr(cmdarg, ",") != NULL) + error = do_cpuid_count(cmdarg, dev); + else + error = do_cpuid(cmdarg, dev); + break; + case FLAG_M: + error = do_msr(cmdarg, dev); + break; + case FLAG_U: + error = do_update(dev); + break; + case FLAG_E: + error = do_eval_cpu_features(dev); + break; + default: + usage(); /* Only one command can be selected. */ } SLIST_FREE(&datadirs, next, free); return (error == 0 ? 0 : 1); From owner-svn-src-head@freebsd.org Fri Jan 5 22:26:25 2018 Return-Path: Delivered-To: svn-src-head@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 2BD92EC4D18; Fri, 5 Jan 2018 22:26:25 +0000 (UTC) (envelope-from jhb@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 C758929ED; Fri, 5 Jan 2018 22:26:24 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w05MQNhZ019618; Fri, 5 Jan 2018 22:26:23 GMT (envelope-from jhb@FreeBSD.org) Received: (from jhb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w05MQNdl019617; Fri, 5 Jan 2018 22:26:23 GMT (envelope-from jhb@FreeBSD.org) Message-Id: <201801052226.w05MQNdl019617@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jhb set sender to jhb@FreeBSD.org using -f From: John Baldwin Date: Fri, 5 Jan 2018 22:26:23 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r327598 - head/sys/sys X-SVN-Group: head X-SVN-Commit-Author: jhb X-SVN-Commit-Paths: head/sys/sys X-SVN-Commit-Revision: 327598 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 05 Jan 2018 22:26:25 -0000 Author: jhb Date: Fri Jan 5 22:26:23 2018 New Revision: 327598 URL: https://svnweb.freebsd.org/changeset/base/327598 Log: Remove LINK_MAX. After recent changes to change filesystems to use filesystem-specific limits, LINK_MAX is no longer used in the base system. Applications should in theory be able to cope with a lack of LINK_MAX by using pathconf(). PR: 224628 (exp-run) Approved by: imp, kib Sponsored by: Chelsio Communications Differential Revision: https://reviews.freebsd.org/D13658 Modified: head/sys/sys/syslimits.h Modified: head/sys/sys/syslimits.h ============================================================================== --- head/sys/sys/syslimits.h Fri Jan 5 21:06:19 2018 (r327597) +++ head/sys/sys/syslimits.h Fri Jan 5 22:26:23 2018 (r327598) @@ -52,7 +52,6 @@ #ifndef CHILD_MAX #define CHILD_MAX 40 /* max simultaneous processes */ #endif -#define LINK_MAX 32767 /* max file link count */ #define MAX_CANON 255 /* max bytes in term canon input line */ #define MAX_INPUT 255 /* max bytes in terminal input */ #define NAME_MAX 255 /* max bytes in a file name */ From owner-svn-src-head@freebsd.org Fri Jan 5 23:21:56 2018 Return-Path: Delivered-To: svn-src-head@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 5E5BEEA6443; Fri, 5 Jan 2018 23:21:56 +0000 (UTC) (envelope-from jkim@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 B5FA8650D4; Fri, 5 Jan 2018 23:21:55 +0000 (UTC) (envelope-from jkim@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w05NLs3L041099; Fri, 5 Jan 2018 23:21:54 GMT (envelope-from jkim@FreeBSD.org) Received: (from jkim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w05NLm7F041033; Fri, 5 Jan 2018 23:21:48 GMT (envelope-from jkim@FreeBSD.org) Message-Id: <201801052321.w05NLm7F041033@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jkim set sender to jkim@FreeBSD.org using -f From: Jung-uk Kim Date: Fri, 5 Jan 2018 23:21:48 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r327605 - in head/sys/contrib/dev/acpica: . common compiler components/debugger components/disassembler components/dispatcher components/events components/executer components/hardware c... X-SVN-Group: head X-SVN-Commit-Author: jkim X-SVN-Commit-Paths: in head/sys/contrib/dev/acpica: . common compiler components/debugger components/disassembler components/dispatcher components/events components/executer components/hardware components/namespace compo... X-SVN-Commit-Revision: 327605 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 05 Jan 2018 23:21:56 -0000 Author: jkim Date: Fri Jan 5 23:21:47 2018 New Revision: 327605 URL: https://svnweb.freebsd.org/changeset/base/327605 Log: Merge ACPICA 20180105. Added: head/sys/contrib/dev/acpica/include/actbinfo.h - copied unchanged from r327603, vendor-sys/acpica/dist/source/include/actbinfo.h Modified: head/sys/contrib/dev/acpica/changes.txt head/sys/contrib/dev/acpica/common/acfileio.c head/sys/contrib/dev/acpica/common/acgetline.c head/sys/contrib/dev/acpica/common/adfile.c head/sys/contrib/dev/acpica/common/adisasm.c head/sys/contrib/dev/acpica/common/adwalk.c head/sys/contrib/dev/acpica/common/ahids.c head/sys/contrib/dev/acpica/common/ahpredef.c head/sys/contrib/dev/acpica/common/ahtable.c head/sys/contrib/dev/acpica/common/ahuuids.c head/sys/contrib/dev/acpica/common/cmfsize.c head/sys/contrib/dev/acpica/common/dmextern.c head/sys/contrib/dev/acpica/common/dmrestag.c head/sys/contrib/dev/acpica/common/dmswitch.c head/sys/contrib/dev/acpica/common/dmtable.c head/sys/contrib/dev/acpica/common/dmtables.c head/sys/contrib/dev/acpica/common/dmtbdump.c head/sys/contrib/dev/acpica/common/dmtbinfo.c head/sys/contrib/dev/acpica/common/getopt.c head/sys/contrib/dev/acpica/compiler/aslallocate.c head/sys/contrib/dev/acpica/compiler/aslanalyze.c head/sys/contrib/dev/acpica/compiler/aslascii.c head/sys/contrib/dev/acpica/compiler/aslbtypes.c head/sys/contrib/dev/acpica/compiler/aslcache.c head/sys/contrib/dev/acpica/compiler/aslcodegen.c head/sys/contrib/dev/acpica/compiler/aslcompile.c head/sys/contrib/dev/acpica/compiler/aslcompiler.h head/sys/contrib/dev/acpica/compiler/aslcompiler.l head/sys/contrib/dev/acpica/compiler/aslcstyle.y head/sys/contrib/dev/acpica/compiler/asldebug.c head/sys/contrib/dev/acpica/compiler/asldefine.h head/sys/contrib/dev/acpica/compiler/aslerror.c head/sys/contrib/dev/acpica/compiler/aslexternal.c head/sys/contrib/dev/acpica/compiler/aslfileio.c head/sys/contrib/dev/acpica/compiler/aslfiles.c head/sys/contrib/dev/acpica/compiler/aslfold.c head/sys/contrib/dev/acpica/compiler/aslglobal.h head/sys/contrib/dev/acpica/compiler/aslhelp.c head/sys/contrib/dev/acpica/compiler/aslhelpers.y head/sys/contrib/dev/acpica/compiler/aslhex.c head/sys/contrib/dev/acpica/compiler/aslkeywords.y head/sys/contrib/dev/acpica/compiler/asllength.c head/sys/contrib/dev/acpica/compiler/asllisting.c head/sys/contrib/dev/acpica/compiler/asllistsup.c head/sys/contrib/dev/acpica/compiler/aslload.c head/sys/contrib/dev/acpica/compiler/asllookup.c head/sys/contrib/dev/acpica/compiler/aslmain.c head/sys/contrib/dev/acpica/compiler/aslmap.c head/sys/contrib/dev/acpica/compiler/aslmapenter.c head/sys/contrib/dev/acpica/compiler/aslmapoutput.c head/sys/contrib/dev/acpica/compiler/aslmaputils.c head/sys/contrib/dev/acpica/compiler/aslmessages.c head/sys/contrib/dev/acpica/compiler/aslmessages.h head/sys/contrib/dev/acpica/compiler/aslmethod.c head/sys/contrib/dev/acpica/compiler/aslnamesp.c head/sys/contrib/dev/acpica/compiler/asloffset.c head/sys/contrib/dev/acpica/compiler/aslopcodes.c head/sys/contrib/dev/acpica/compiler/asloperands.c head/sys/contrib/dev/acpica/compiler/aslopt.c head/sys/contrib/dev/acpica/compiler/asloptions.c head/sys/contrib/dev/acpica/compiler/aslparseop.c head/sys/contrib/dev/acpica/compiler/aslparser.y head/sys/contrib/dev/acpica/compiler/aslpld.c head/sys/contrib/dev/acpica/compiler/aslpredef.c head/sys/contrib/dev/acpica/compiler/aslprepkg.c head/sys/contrib/dev/acpica/compiler/aslprimaries.y head/sys/contrib/dev/acpica/compiler/aslprintf.c head/sys/contrib/dev/acpica/compiler/aslprune.c head/sys/contrib/dev/acpica/compiler/aslresource.c head/sys/contrib/dev/acpica/compiler/aslresources.y head/sys/contrib/dev/acpica/compiler/aslrestype1.c head/sys/contrib/dev/acpica/compiler/aslrestype1i.c head/sys/contrib/dev/acpica/compiler/aslrestype2.c head/sys/contrib/dev/acpica/compiler/aslrestype2d.c head/sys/contrib/dev/acpica/compiler/aslrestype2e.c head/sys/contrib/dev/acpica/compiler/aslrestype2q.c head/sys/contrib/dev/acpica/compiler/aslrestype2s.c head/sys/contrib/dev/acpica/compiler/aslrestype2w.c head/sys/contrib/dev/acpica/compiler/aslrules.y head/sys/contrib/dev/acpica/compiler/aslstartup.c head/sys/contrib/dev/acpica/compiler/aslstubs.c head/sys/contrib/dev/acpica/compiler/aslsupport.l head/sys/contrib/dev/acpica/compiler/aslsupport.y head/sys/contrib/dev/acpica/compiler/asltokens.y head/sys/contrib/dev/acpica/compiler/asltransform.c head/sys/contrib/dev/acpica/compiler/asltree.c head/sys/contrib/dev/acpica/compiler/asltypes.h head/sys/contrib/dev/acpica/compiler/asltypes.y head/sys/contrib/dev/acpica/compiler/aslutils.c head/sys/contrib/dev/acpica/compiler/asluuid.c head/sys/contrib/dev/acpica/compiler/aslwalks.c head/sys/contrib/dev/acpica/compiler/aslxref.c head/sys/contrib/dev/acpica/compiler/aslxrefout.c head/sys/contrib/dev/acpica/compiler/cvcompiler.c head/sys/contrib/dev/acpica/compiler/cvdisasm.c head/sys/contrib/dev/acpica/compiler/cvparser.c head/sys/contrib/dev/acpica/compiler/dtcompile.c head/sys/contrib/dev/acpica/compiler/dtcompiler.h head/sys/contrib/dev/acpica/compiler/dtexpress.c head/sys/contrib/dev/acpica/compiler/dtfield.c head/sys/contrib/dev/acpica/compiler/dtio.c head/sys/contrib/dev/acpica/compiler/dtparser.l head/sys/contrib/dev/acpica/compiler/dtparser.y head/sys/contrib/dev/acpica/compiler/dtsubtable.c head/sys/contrib/dev/acpica/compiler/dttable.c head/sys/contrib/dev/acpica/compiler/dttable1.c head/sys/contrib/dev/acpica/compiler/dttable2.c head/sys/contrib/dev/acpica/compiler/dttemplate.c head/sys/contrib/dev/acpica/compiler/dttemplate.h head/sys/contrib/dev/acpica/compiler/dtutils.c head/sys/contrib/dev/acpica/compiler/preprocess.h head/sys/contrib/dev/acpica/compiler/prexpress.c head/sys/contrib/dev/acpica/compiler/prmacros.c head/sys/contrib/dev/acpica/compiler/prparser.l head/sys/contrib/dev/acpica/compiler/prparser.y head/sys/contrib/dev/acpica/compiler/prscan.c head/sys/contrib/dev/acpica/compiler/prutils.c head/sys/contrib/dev/acpica/components/debugger/dbcmds.c head/sys/contrib/dev/acpica/components/debugger/dbconvert.c head/sys/contrib/dev/acpica/components/debugger/dbdisply.c head/sys/contrib/dev/acpica/components/debugger/dbexec.c head/sys/contrib/dev/acpica/components/debugger/dbfileio.c head/sys/contrib/dev/acpica/components/debugger/dbhistry.c head/sys/contrib/dev/acpica/components/debugger/dbinput.c head/sys/contrib/dev/acpica/components/debugger/dbmethod.c head/sys/contrib/dev/acpica/components/debugger/dbnames.c head/sys/contrib/dev/acpica/components/debugger/dbobject.c head/sys/contrib/dev/acpica/components/debugger/dbstats.c head/sys/contrib/dev/acpica/components/debugger/dbtest.c head/sys/contrib/dev/acpica/components/debugger/dbutils.c head/sys/contrib/dev/acpica/components/debugger/dbxface.c head/sys/contrib/dev/acpica/components/disassembler/dmbuffer.c head/sys/contrib/dev/acpica/components/disassembler/dmcstyle.c head/sys/contrib/dev/acpica/components/disassembler/dmdeferred.c head/sys/contrib/dev/acpica/components/disassembler/dmnames.c head/sys/contrib/dev/acpica/components/disassembler/dmopcode.c head/sys/contrib/dev/acpica/components/disassembler/dmresrc.c head/sys/contrib/dev/acpica/components/disassembler/dmresrcl.c head/sys/contrib/dev/acpica/components/disassembler/dmresrcl2.c head/sys/contrib/dev/acpica/components/disassembler/dmresrcs.c head/sys/contrib/dev/acpica/components/disassembler/dmutils.c head/sys/contrib/dev/acpica/components/disassembler/dmwalk.c head/sys/contrib/dev/acpica/components/dispatcher/dsargs.c head/sys/contrib/dev/acpica/components/dispatcher/dscontrol.c head/sys/contrib/dev/acpica/components/dispatcher/dsdebug.c head/sys/contrib/dev/acpica/components/dispatcher/dsfield.c head/sys/contrib/dev/acpica/components/dispatcher/dsinit.c head/sys/contrib/dev/acpica/components/dispatcher/dsmethod.c head/sys/contrib/dev/acpica/components/dispatcher/dsmthdat.c head/sys/contrib/dev/acpica/components/dispatcher/dsobject.c head/sys/contrib/dev/acpica/components/dispatcher/dsopcode.c head/sys/contrib/dev/acpica/components/dispatcher/dspkginit.c head/sys/contrib/dev/acpica/components/dispatcher/dsutils.c head/sys/contrib/dev/acpica/components/dispatcher/dswexec.c head/sys/contrib/dev/acpica/components/dispatcher/dswload.c head/sys/contrib/dev/acpica/components/dispatcher/dswload2.c head/sys/contrib/dev/acpica/components/dispatcher/dswscope.c head/sys/contrib/dev/acpica/components/dispatcher/dswstate.c head/sys/contrib/dev/acpica/components/events/evevent.c head/sys/contrib/dev/acpica/components/events/evglock.c head/sys/contrib/dev/acpica/components/events/evgpe.c head/sys/contrib/dev/acpica/components/events/evgpeblk.c head/sys/contrib/dev/acpica/components/events/evgpeinit.c head/sys/contrib/dev/acpica/components/events/evgpeutil.c head/sys/contrib/dev/acpica/components/events/evhandler.c head/sys/contrib/dev/acpica/components/events/evmisc.c head/sys/contrib/dev/acpica/components/events/evregion.c head/sys/contrib/dev/acpica/components/events/evrgnini.c head/sys/contrib/dev/acpica/components/events/evsci.c head/sys/contrib/dev/acpica/components/events/evxface.c head/sys/contrib/dev/acpica/components/events/evxfevnt.c head/sys/contrib/dev/acpica/components/events/evxfgpe.c head/sys/contrib/dev/acpica/components/events/evxfregn.c head/sys/contrib/dev/acpica/components/executer/exconcat.c head/sys/contrib/dev/acpica/components/executer/exconfig.c head/sys/contrib/dev/acpica/components/executer/exconvrt.c head/sys/contrib/dev/acpica/components/executer/excreate.c head/sys/contrib/dev/acpica/components/executer/exdebug.c head/sys/contrib/dev/acpica/components/executer/exdump.c head/sys/contrib/dev/acpica/components/executer/exfield.c head/sys/contrib/dev/acpica/components/executer/exfldio.c head/sys/contrib/dev/acpica/components/executer/exmisc.c head/sys/contrib/dev/acpica/components/executer/exmutex.c head/sys/contrib/dev/acpica/components/executer/exnames.c head/sys/contrib/dev/acpica/components/executer/exoparg1.c head/sys/contrib/dev/acpica/components/executer/exoparg2.c head/sys/contrib/dev/acpica/components/executer/exoparg3.c head/sys/contrib/dev/acpica/components/executer/exoparg6.c head/sys/contrib/dev/acpica/components/executer/exprep.c head/sys/contrib/dev/acpica/components/executer/exregion.c head/sys/contrib/dev/acpica/components/executer/exresnte.c head/sys/contrib/dev/acpica/components/executer/exresolv.c head/sys/contrib/dev/acpica/components/executer/exresop.c head/sys/contrib/dev/acpica/components/executer/exstore.c head/sys/contrib/dev/acpica/components/executer/exstoren.c head/sys/contrib/dev/acpica/components/executer/exstorob.c head/sys/contrib/dev/acpica/components/executer/exsystem.c head/sys/contrib/dev/acpica/components/executer/extrace.c head/sys/contrib/dev/acpica/components/executer/exutils.c head/sys/contrib/dev/acpica/components/hardware/hwacpi.c head/sys/contrib/dev/acpica/components/hardware/hwesleep.c head/sys/contrib/dev/acpica/components/hardware/hwgpe.c head/sys/contrib/dev/acpica/components/hardware/hwpci.c head/sys/contrib/dev/acpica/components/hardware/hwregs.c head/sys/contrib/dev/acpica/components/hardware/hwsleep.c head/sys/contrib/dev/acpica/components/hardware/hwtimer.c head/sys/contrib/dev/acpica/components/hardware/hwvalid.c head/sys/contrib/dev/acpica/components/hardware/hwxface.c head/sys/contrib/dev/acpica/components/hardware/hwxfsleep.c head/sys/contrib/dev/acpica/components/namespace/nsaccess.c head/sys/contrib/dev/acpica/components/namespace/nsalloc.c head/sys/contrib/dev/acpica/components/namespace/nsarguments.c head/sys/contrib/dev/acpica/components/namespace/nsconvert.c head/sys/contrib/dev/acpica/components/namespace/nsdump.c head/sys/contrib/dev/acpica/components/namespace/nsdumpdv.c head/sys/contrib/dev/acpica/components/namespace/nseval.c head/sys/contrib/dev/acpica/components/namespace/nsinit.c head/sys/contrib/dev/acpica/components/namespace/nsload.c head/sys/contrib/dev/acpica/components/namespace/nsnames.c head/sys/contrib/dev/acpica/components/namespace/nsobject.c head/sys/contrib/dev/acpica/components/namespace/nsparse.c head/sys/contrib/dev/acpica/components/namespace/nspredef.c head/sys/contrib/dev/acpica/components/namespace/nsprepkg.c head/sys/contrib/dev/acpica/components/namespace/nsrepair.c head/sys/contrib/dev/acpica/components/namespace/nsrepair2.c head/sys/contrib/dev/acpica/components/namespace/nssearch.c head/sys/contrib/dev/acpica/components/namespace/nsutils.c head/sys/contrib/dev/acpica/components/namespace/nswalk.c head/sys/contrib/dev/acpica/components/namespace/nsxfeval.c head/sys/contrib/dev/acpica/components/namespace/nsxfname.c head/sys/contrib/dev/acpica/components/namespace/nsxfobj.c head/sys/contrib/dev/acpica/components/parser/psargs.c head/sys/contrib/dev/acpica/components/parser/psloop.c head/sys/contrib/dev/acpica/components/parser/psobject.c head/sys/contrib/dev/acpica/components/parser/psopcode.c head/sys/contrib/dev/acpica/components/parser/psopinfo.c head/sys/contrib/dev/acpica/components/parser/psparse.c head/sys/contrib/dev/acpica/components/parser/psscope.c head/sys/contrib/dev/acpica/components/parser/pstree.c head/sys/contrib/dev/acpica/components/parser/psutils.c head/sys/contrib/dev/acpica/components/parser/pswalk.c head/sys/contrib/dev/acpica/components/parser/psxface.c head/sys/contrib/dev/acpica/components/resources/rsaddr.c head/sys/contrib/dev/acpica/components/resources/rscalc.c head/sys/contrib/dev/acpica/components/resources/rscreate.c head/sys/contrib/dev/acpica/components/resources/rsdump.c head/sys/contrib/dev/acpica/components/resources/rsdumpinfo.c head/sys/contrib/dev/acpica/components/resources/rsinfo.c head/sys/contrib/dev/acpica/components/resources/rsio.c head/sys/contrib/dev/acpica/components/resources/rsirq.c head/sys/contrib/dev/acpica/components/resources/rslist.c head/sys/contrib/dev/acpica/components/resources/rsmemory.c head/sys/contrib/dev/acpica/components/resources/rsmisc.c head/sys/contrib/dev/acpica/components/resources/rsserial.c head/sys/contrib/dev/acpica/components/resources/rsutils.c head/sys/contrib/dev/acpica/components/resources/rsxface.c head/sys/contrib/dev/acpica/components/tables/tbdata.c head/sys/contrib/dev/acpica/components/tables/tbfadt.c head/sys/contrib/dev/acpica/components/tables/tbfind.c head/sys/contrib/dev/acpica/components/tables/tbinstal.c head/sys/contrib/dev/acpica/components/tables/tbprint.c head/sys/contrib/dev/acpica/components/tables/tbutils.c head/sys/contrib/dev/acpica/components/tables/tbxface.c head/sys/contrib/dev/acpica/components/tables/tbxfload.c head/sys/contrib/dev/acpica/components/tables/tbxfroot.c head/sys/contrib/dev/acpica/components/utilities/utaddress.c head/sys/contrib/dev/acpica/components/utilities/utalloc.c head/sys/contrib/dev/acpica/components/utilities/utascii.c head/sys/contrib/dev/acpica/components/utilities/utbuffer.c head/sys/contrib/dev/acpica/components/utilities/utcache.c head/sys/contrib/dev/acpica/components/utilities/utcopy.c head/sys/contrib/dev/acpica/components/utilities/utdebug.c head/sys/contrib/dev/acpica/components/utilities/utdecode.c head/sys/contrib/dev/acpica/components/utilities/utdelete.c head/sys/contrib/dev/acpica/components/utilities/uterror.c head/sys/contrib/dev/acpica/components/utilities/uteval.c head/sys/contrib/dev/acpica/components/utilities/utexcep.c head/sys/contrib/dev/acpica/components/utilities/utglobal.c head/sys/contrib/dev/acpica/components/utilities/uthex.c head/sys/contrib/dev/acpica/components/utilities/utids.c head/sys/contrib/dev/acpica/components/utilities/utinit.c head/sys/contrib/dev/acpica/components/utilities/utlock.c head/sys/contrib/dev/acpica/components/utilities/utmath.c head/sys/contrib/dev/acpica/components/utilities/utmisc.c head/sys/contrib/dev/acpica/components/utilities/utmutex.c head/sys/contrib/dev/acpica/components/utilities/utnonansi.c head/sys/contrib/dev/acpica/components/utilities/utobject.c head/sys/contrib/dev/acpica/components/utilities/utosi.c head/sys/contrib/dev/acpica/components/utilities/utownerid.c head/sys/contrib/dev/acpica/components/utilities/utpredef.c head/sys/contrib/dev/acpica/components/utilities/utresdecode.c head/sys/contrib/dev/acpica/components/utilities/utresrc.c head/sys/contrib/dev/acpica/components/utilities/utstate.c head/sys/contrib/dev/acpica/components/utilities/utstring.c head/sys/contrib/dev/acpica/components/utilities/utstrsuppt.c head/sys/contrib/dev/acpica/components/utilities/utstrtoul64.c head/sys/contrib/dev/acpica/components/utilities/uttrack.c head/sys/contrib/dev/acpica/components/utilities/utuuid.c head/sys/contrib/dev/acpica/components/utilities/utxface.c head/sys/contrib/dev/acpica/components/utilities/utxferror.c head/sys/contrib/dev/acpica/components/utilities/utxfinit.c head/sys/contrib/dev/acpica/components/utilities/utxfmutex.c head/sys/contrib/dev/acpica/include/acapps.h head/sys/contrib/dev/acpica/include/acbuffer.h head/sys/contrib/dev/acpica/include/acclib.h head/sys/contrib/dev/acpica/include/accommon.h head/sys/contrib/dev/acpica/include/acconfig.h head/sys/contrib/dev/acpica/include/acconvert.h head/sys/contrib/dev/acpica/include/acdebug.h head/sys/contrib/dev/acpica/include/acdisasm.h head/sys/contrib/dev/acpica/include/acdispat.h head/sys/contrib/dev/acpica/include/acevents.h head/sys/contrib/dev/acpica/include/acexcep.h head/sys/contrib/dev/acpica/include/acglobal.h head/sys/contrib/dev/acpica/include/achware.h head/sys/contrib/dev/acpica/include/acinterp.h head/sys/contrib/dev/acpica/include/aclocal.h head/sys/contrib/dev/acpica/include/acmacros.h head/sys/contrib/dev/acpica/include/acnames.h head/sys/contrib/dev/acpica/include/acnamesp.h head/sys/contrib/dev/acpica/include/acobject.h head/sys/contrib/dev/acpica/include/acopcode.h head/sys/contrib/dev/acpica/include/acoutput.h head/sys/contrib/dev/acpica/include/acparser.h head/sys/contrib/dev/acpica/include/acpi.h head/sys/contrib/dev/acpica/include/acpiosxf.h head/sys/contrib/dev/acpica/include/acpixf.h head/sys/contrib/dev/acpica/include/acpredef.h head/sys/contrib/dev/acpica/include/acresrc.h head/sys/contrib/dev/acpica/include/acrestyp.h head/sys/contrib/dev/acpica/include/acstruct.h head/sys/contrib/dev/acpica/include/actables.h head/sys/contrib/dev/acpica/include/actbl.h head/sys/contrib/dev/acpica/include/actbl1.h head/sys/contrib/dev/acpica/include/actbl2.h head/sys/contrib/dev/acpica/include/actbl3.h head/sys/contrib/dev/acpica/include/actypes.h head/sys/contrib/dev/acpica/include/acutils.h head/sys/contrib/dev/acpica/include/acuuid.h head/sys/contrib/dev/acpica/include/amlcode.h head/sys/contrib/dev/acpica/include/amlresrc.h head/sys/contrib/dev/acpica/include/platform/acenv.h head/sys/contrib/dev/acpica/include/platform/acenvex.h head/sys/contrib/dev/acpica/include/platform/acfreebsd.h head/sys/contrib/dev/acpica/include/platform/acgcc.h head/sys/contrib/dev/acpica/include/platform/acgccex.h head/sys/contrib/dev/acpica/os_specific/service_layers/osunixxf.c Directory Properties: head/sys/contrib/dev/acpica/ (props changed) Modified: head/sys/contrib/dev/acpica/changes.txt ============================================================================== --- head/sys/contrib/dev/acpica/changes.txt Fri Jan 5 23:04:13 2018 (r327604) +++ head/sys/contrib/dev/acpica/changes.txt Fri Jan 5 23:21:47 2018 (r327605) @@ -1,4 +1,37 @@ ---------------------------------------- +05 January 2018. Summary of changes for version 20180105: + + +1) ACPICA kernel-resident subsystem: + +Updated all copyrights to 2018. This affects all source code modules. + +Fixed a possible build error caused by an unresolved reference to the +AcpiUtSafeStrncpy function. + +Removed NULL pointer arithmetic in the various pointer manipulation +macros. All "(void *) NULL" constructs are converted to "(void *) 0". +This eliminates warnings/errors in newer C compilers. Jung-uk Kim. + +Added support for A32 ABI compilation, which uses the ILP32 model. Anuj +Mittal. + + +2) iASL Compiler/Disassembler and Tools: + +ASLTS: Updated all copyrights to 2018. + +Tools: Updated all signon copyrights to 2018. + +AcpiXtract: Fixed a regression related to ACPI table signatures where the +signature was truncated to 3 characters (instead of 4). + +AcpiExec: Restore the original terminal mode after the use of the -v and +-vd options. + +ASLTS: Deployed the iASL __METHOD__ macro across the test suite. + +---------------------------------------- 14 December 2017. Summary of changes for version 20171214: Modified: head/sys/contrib/dev/acpica/common/acfileio.c ============================================================================== --- head/sys/contrib/dev/acpica/common/acfileio.c Fri Jan 5 23:04:13 2018 (r327604) +++ head/sys/contrib/dev/acpica/common/acfileio.c Fri Jan 5 23:21:47 2018 (r327605) @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2017, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2018, Intel Corp. * All rights reserved. * * 2. License Modified: head/sys/contrib/dev/acpica/common/acgetline.c ============================================================================== --- head/sys/contrib/dev/acpica/common/acgetline.c Fri Jan 5 23:04:13 2018 (r327604) +++ head/sys/contrib/dev/acpica/common/acgetline.c Fri Jan 5 23:21:47 2018 (r327605) @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2017, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2018, Intel Corp. * All rights reserved. * * 2. License Modified: head/sys/contrib/dev/acpica/common/adfile.c ============================================================================== --- head/sys/contrib/dev/acpica/common/adfile.c Fri Jan 5 23:04:13 2018 (r327604) +++ head/sys/contrib/dev/acpica/common/adfile.c Fri Jan 5 23:21:47 2018 (r327605) @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2017, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2018, Intel Corp. * All rights reserved. * * 2. License Modified: head/sys/contrib/dev/acpica/common/adisasm.c ============================================================================== --- head/sys/contrib/dev/acpica/common/adisasm.c Fri Jan 5 23:04:13 2018 (r327604) +++ head/sys/contrib/dev/acpica/common/adisasm.c Fri Jan 5 23:21:47 2018 (r327605) @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2017, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2018, Intel Corp. * All rights reserved. * * 2. License Modified: head/sys/contrib/dev/acpica/common/adwalk.c ============================================================================== --- head/sys/contrib/dev/acpica/common/adwalk.c Fri Jan 5 23:04:13 2018 (r327604) +++ head/sys/contrib/dev/acpica/common/adwalk.c Fri Jan 5 23:21:47 2018 (r327605) @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2017, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2018, Intel Corp. * All rights reserved. * * 2. License Modified: head/sys/contrib/dev/acpica/common/ahids.c ============================================================================== --- head/sys/contrib/dev/acpica/common/ahids.c Fri Jan 5 23:04:13 2018 (r327604) +++ head/sys/contrib/dev/acpica/common/ahids.c Fri Jan 5 23:21:47 2018 (r327605) @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2017, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2018, Intel Corp. * All rights reserved. * * 2. License Modified: head/sys/contrib/dev/acpica/common/ahpredef.c ============================================================================== --- head/sys/contrib/dev/acpica/common/ahpredef.c Fri Jan 5 23:04:13 2018 (r327604) +++ head/sys/contrib/dev/acpica/common/ahpredef.c Fri Jan 5 23:21:47 2018 (r327605) @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2017, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2018, Intel Corp. * All rights reserved. * * 2. License Modified: head/sys/contrib/dev/acpica/common/ahtable.c ============================================================================== --- head/sys/contrib/dev/acpica/common/ahtable.c Fri Jan 5 23:04:13 2018 (r327604) +++ head/sys/contrib/dev/acpica/common/ahtable.c Fri Jan 5 23:21:47 2018 (r327605) @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2017, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2018, Intel Corp. * All rights reserved. * * 2. License Modified: head/sys/contrib/dev/acpica/common/ahuuids.c ============================================================================== --- head/sys/contrib/dev/acpica/common/ahuuids.c Fri Jan 5 23:04:13 2018 (r327604) +++ head/sys/contrib/dev/acpica/common/ahuuids.c Fri Jan 5 23:21:47 2018 (r327605) @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2017, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2018, Intel Corp. * All rights reserved. * * 2. License Modified: head/sys/contrib/dev/acpica/common/cmfsize.c ============================================================================== --- head/sys/contrib/dev/acpica/common/cmfsize.c Fri Jan 5 23:04:13 2018 (r327604) +++ head/sys/contrib/dev/acpica/common/cmfsize.c Fri Jan 5 23:21:47 2018 (r327605) @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2017, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2018, Intel Corp. * All rights reserved. * * 2. License Modified: head/sys/contrib/dev/acpica/common/dmextern.c ============================================================================== --- head/sys/contrib/dev/acpica/common/dmextern.c Fri Jan 5 23:04:13 2018 (r327604) +++ head/sys/contrib/dev/acpica/common/dmextern.c Fri Jan 5 23:21:47 2018 (r327605) @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2017, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2018, Intel Corp. * All rights reserved. * * 2. License Modified: head/sys/contrib/dev/acpica/common/dmrestag.c ============================================================================== --- head/sys/contrib/dev/acpica/common/dmrestag.c Fri Jan 5 23:04:13 2018 (r327604) +++ head/sys/contrib/dev/acpica/common/dmrestag.c Fri Jan 5 23:21:47 2018 (r327605) @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2017, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2018, Intel Corp. * All rights reserved. * * 2. License Modified: head/sys/contrib/dev/acpica/common/dmswitch.c ============================================================================== --- head/sys/contrib/dev/acpica/common/dmswitch.c Fri Jan 5 23:04:13 2018 (r327604) +++ head/sys/contrib/dev/acpica/common/dmswitch.c Fri Jan 5 23:21:47 2018 (r327605) @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2017, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2018, Intel Corp. * All rights reserved. * * 2. License Modified: head/sys/contrib/dev/acpica/common/dmtable.c ============================================================================== --- head/sys/contrib/dev/acpica/common/dmtable.c Fri Jan 5 23:04:13 2018 (r327604) +++ head/sys/contrib/dev/acpica/common/dmtable.c Fri Jan 5 23:21:47 2018 (r327605) @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2017, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2018, Intel Corp. * All rights reserved. * * 2. License Modified: head/sys/contrib/dev/acpica/common/dmtables.c ============================================================================== --- head/sys/contrib/dev/acpica/common/dmtables.c Fri Jan 5 23:04:13 2018 (r327604) +++ head/sys/contrib/dev/acpica/common/dmtables.c Fri Jan 5 23:21:47 2018 (r327605) @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2017, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2018, Intel Corp. * All rights reserved. * * 2. License Modified: head/sys/contrib/dev/acpica/common/dmtbdump.c ============================================================================== --- head/sys/contrib/dev/acpica/common/dmtbdump.c Fri Jan 5 23:04:13 2018 (r327604) +++ head/sys/contrib/dev/acpica/common/dmtbdump.c Fri Jan 5 23:21:47 2018 (r327605) @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2017, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2018, Intel Corp. * All rights reserved. * * 2. License Modified: head/sys/contrib/dev/acpica/common/dmtbinfo.c ============================================================================== --- head/sys/contrib/dev/acpica/common/dmtbinfo.c Fri Jan 5 23:04:13 2018 (r327604) +++ head/sys/contrib/dev/acpica/common/dmtbinfo.c Fri Jan 5 23:21:47 2018 (r327605) @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2017, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2018, Intel Corp. * All rights reserved. * * 2. License @@ -152,6 +152,7 @@ #include #include #include +#include "actbinfo.h" /* This module used for application-level code only */ @@ -182,268 +183,6 @@ * - Add length and implementation cases in dmtable.c (disassembler) * - Add type and length cases in dtutils.c (DT compiler) */ - -/* - * Macros used to generate offsets to specific table fields - */ -#define ACPI_FACS_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_TABLE_FACS,f) -#define ACPI_GAS_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_GENERIC_ADDRESS,f) -#define ACPI_HDR_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_TABLE_HEADER,f) -#define ACPI_RSDP_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_TABLE_RSDP,f) -#define ACPI_BERT_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_TABLE_BERT,f) -#define ACPI_BGRT_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_TABLE_BGRT,f) -#define ACPI_BOOT_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_TABLE_BOOT,f) -#define ACPI_CPEP_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_TABLE_CPEP,f) -#define ACPI_DBG2_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_TABLE_DBG2,f) -#define ACPI_DBGP_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_TABLE_DBGP,f) -#define ACPI_DMAR_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_TABLE_DMAR,f) -#define ACPI_DRTM_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_TABLE_DRTM,f) -#define ACPI_ECDT_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_TABLE_ECDT,f) -#define ACPI_EINJ_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_TABLE_EINJ,f) -#define ACPI_ERST_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_TABLE_ERST,f) -#define ACPI_GTDT_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_TABLE_GTDT,f) -#define ACPI_HEST_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_TABLE_HEST,f) -#define ACPI_HPET_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_TABLE_HPET,f) -#define ACPI_HMAT_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_TABLE_HMAT,f) -#define ACPI_IORT_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_TABLE_IORT,f) -#define ACPI_IVRS_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_TABLE_IVRS,f) -#define ACPI_MADT_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_TABLE_MADT,f) -#define ACPI_MCFG_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_TABLE_MCFG,f) -#define ACPI_MCHI_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_TABLE_MCHI,f) -#define ACPI_MPST_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_TABLE_MPST,f) -#define ACPI_MSCT_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_TABLE_MSCT,f) -#define ACPI_NFIT_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_TABLE_NFIT,f) -#define ACPI_PCCT_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_TABLE_PCCT,f) -#define ACPI_PDTT_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_TABLE_PDTT,f) -#define ACPI_PMTT_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_TABLE_PMTT,f) -#define ACPI_RASF_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_TABLE_RASF,f) -#define ACPI_S3PT_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_TABLE_S3PT,f) -#define ACPI_SBST_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_TABLE_SBST,f) -#define ACPI_SDEI_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_TABLE_SDEI,f) -#define ACPI_SDEV_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_TABLE_SDEV,f) -#define ACPI_SLIT_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_TABLE_SLIT,f) -#define ACPI_SPCR_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_TABLE_SPCR,f) -#define ACPI_SPMI_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_TABLE_SPMI,f) -#define ACPI_SRAT_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_TABLE_SRAT,f) -#define ACPI_STAO_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_TABLE_STAO,f) -#define ACPI_TCPA_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_TABLE_TCPA_HDR,f) -#define ACPI_TPM2_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_TABLE_TPM2,f) -#define ACPI_UEFI_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_TABLE_UEFI,f) -#define ACPI_WAET_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_TABLE_WAET,f) -#define ACPI_WDAT_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_TABLE_WDAT,f) -#define ACPI_WDDT_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_TABLE_WDDT,f) -#define ACPI_WDRT_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_TABLE_WDRT,f) -#define ACPI_WPBT_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_TABLE_WPBT,f) -#define ACPI_WSMT_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_TABLE_WSMT,f) -#define ACPI_XENV_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_TABLE_XENV,f) - -/* Subtables */ - -#define ACPI_ASF0_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_ASF_INFO,f) -#define ACPI_ASF1_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_ASF_ALERT,f) -#define ACPI_ASF1a_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_ASF_ALERT_DATA,f) -#define ACPI_ASF2_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_ASF_REMOTE,f) -#define ACPI_ASF2a_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_ASF_CONTROL_DATA,f) -#define ACPI_ASF3_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_ASF_RMCP,f) -#define ACPI_ASF4_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_ASF_ADDRESS,f) -#define ACPI_CPEP0_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_CPEP_POLLING,f) -#define ACPI_CSRT0_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_CSRT_GROUP,f) -#define ACPI_CSRT1_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_CSRT_SHARED_INFO,f) -#define ACPI_CSRT2_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_CSRT_DESCRIPTOR,f) -#define ACPI_DBG20_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_DBG2_DEVICE,f) -#define ACPI_DMARS_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_DMAR_DEVICE_SCOPE,f) -#define ACPI_DMAR0_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_DMAR_HARDWARE_UNIT,f) -#define ACPI_DMAR1_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_DMAR_RESERVED_MEMORY,f) -#define ACPI_DMAR2_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_DMAR_ATSR,f) -#define ACPI_DMAR3_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_DMAR_RHSA,f) -#define ACPI_DMAR4_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_DMAR_ANDD,f) -#define ACPI_DRTM0_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_DRTM_VTABLE_LIST,f) -#define ACPI_DRTM1_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_DRTM_RESOURCE_LIST,f) -#define ACPI_DRTM1a_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_DRTM_RESOURCE,f) -#define ACPI_DRTM2_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_DRTM_DPS_ID,f) -#define ACPI_EINJ0_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_WHEA_HEADER,f) -#define ACPI_ERST0_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_WHEA_HEADER,f) -#define ACPI_FPDTH_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_FPDT_HEADER,f) -#define ACPI_FPDT0_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_FPDT_BOOT_POINTER,f) -#define ACPI_FPDT1_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_FPDT_S3PT_POINTER,f) -#define ACPI_GTDT0_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_GTDT_TIMER_BLOCK,f) -#define ACPI_GTDT0a_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_GTDT_TIMER_ENTRY,f) -#define ACPI_GTDT1_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_GTDT_WATCHDOG,f) -#define ACPI_GTDTH_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_GTDT_HEADER,f) -#define ACPI_HEST0_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_HEST_IA_MACHINE_CHECK,f) -#define ACPI_HEST1_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_HEST_IA_CORRECTED,f) -#define ACPI_HEST2_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_HEST_IA_NMI,f) -#define ACPI_HEST6_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_HEST_AER_ROOT,f) -#define ACPI_HEST7_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_HEST_AER,f) -#define ACPI_HEST8_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_HEST_AER_BRIDGE,f) -#define ACPI_HEST9_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_HEST_GENERIC,f) -#define ACPI_HEST10_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_HEST_GENERIC_V2,f) -#define ACPI_HEST11_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_HEST_IA_DEFERRED_CHECK,f) -#define ACPI_HESTN_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_HEST_NOTIFY,f) -#define ACPI_HESTB_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_HEST_IA_ERROR_BANK,f) -#define ACPI_HMAT0_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_HMAT_ADDRESS_RANGE,f) -#define ACPI_HMAT1_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_HMAT_LOCALITY,f) -#define ACPI_HMAT2_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_HMAT_CACHE,f) -#define ACPI_HMATH_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_HMAT_STRUCTURE,f) -#define ACPI_IORT0_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_IORT_ITS_GROUP,f) -#define ACPI_IORT1_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_IORT_NAMED_COMPONENT,f) -#define ACPI_IORT2_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_IORT_ROOT_COMPLEX,f) -#define ACPI_IORT3_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_IORT_SMMU,f) -#define ACPI_IORT3A_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_IORT_SMMU_GSI,f) -#define ACPI_IORT4_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_IORT_SMMU_V3,f) -#define ACPI_IORTA_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_IORT_MEMORY_ACCESS,f) -#define ACPI_IORTH_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_IORT_NODE,f) -#define ACPI_IORTM_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_IORT_ID_MAPPING,f) -#define ACPI_IVRSH_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_IVRS_HEADER,f) -#define ACPI_IVRS0_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_IVRS_HARDWARE,f) -#define ACPI_IVRS1_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_IVRS_MEMORY,f) -#define ACPI_IVRSD_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_IVRS_DE_HEADER,f) -#define ACPI_IVRS8A_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_IVRS_DEVICE8A,f) -#define ACPI_IVRS8B_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_IVRS_DEVICE8B,f) -#define ACPI_IVRS8C_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_IVRS_DEVICE8C,f) -#define ACPI_LPITH_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_LPIT_HEADER,f) -#define ACPI_LPIT0_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_LPIT_NATIVE,f) -#define ACPI_MADT0_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_MADT_LOCAL_APIC,f) -#define ACPI_MADT1_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_MADT_IO_APIC,f) -#define ACPI_MADT2_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_MADT_INTERRUPT_OVERRIDE,f) -#define ACPI_MADT3_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_MADT_NMI_SOURCE,f) -#define ACPI_MADT4_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_MADT_LOCAL_APIC_NMI,f) -#define ACPI_MADT5_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_MADT_LOCAL_APIC_OVERRIDE,f) -#define ACPI_MADT6_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_MADT_IO_SAPIC,f) -#define ACPI_MADT7_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_MADT_LOCAL_SAPIC,f) -#define ACPI_MADT8_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_MADT_INTERRUPT_SOURCE,f) -#define ACPI_MADT9_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_MADT_LOCAL_X2APIC,f) -#define ACPI_MADT10_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_MADT_LOCAL_X2APIC_NMI,f) -#define ACPI_MADT11_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_MADT_GENERIC_INTERRUPT,f) -#define ACPI_MADT12_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_MADT_GENERIC_DISTRIBUTOR,f) -#define ACPI_MADT13_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_MADT_GENERIC_MSI_FRAME,f) -#define ACPI_MADT14_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_MADT_GENERIC_REDISTRIBUTOR,f) -#define ACPI_MADT15_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_MADT_GENERIC_TRANSLATOR,f) -#define ACPI_MADTH_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_SUBTABLE_HEADER,f) -#define ACPI_MCFG0_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_MCFG_ALLOCATION,f) -#define ACPI_MPST0_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_MPST_POWER_NODE,f) -#define ACPI_MPST0A_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_MPST_POWER_STATE,f) -#define ACPI_MPST0B_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_MPST_COMPONENT,f) -#define ACPI_MPST1_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_MPST_DATA_HDR,f) -#define ACPI_MPST2_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_MPST_POWER_DATA,f) -#define ACPI_MSCT0_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_MSCT_PROXIMITY,f) -#define ACPI_MTMR0_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_MTMR_ENTRY,f) -#define ACPI_NFITH_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_NFIT_HEADER,f) -#define ACPI_NFIT0_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_NFIT_SYSTEM_ADDRESS,f) -#define ACPI_NFIT1_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_NFIT_MEMORY_MAP,f) -#define ACPI_NFIT2_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_NFIT_INTERLEAVE,f) -#define ACPI_NFIT3_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_NFIT_SMBIOS,f) -#define ACPI_NFIT4_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_NFIT_CONTROL_REGION,f) -#define ACPI_NFIT5_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_NFIT_DATA_REGION,f) -#define ACPI_NFIT6_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_NFIT_FLUSH_ADDRESS,f) -#define ACPI_NFIT7_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_NFIT_CAPABILITIES,f) -#define ACPI_PCCT0_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_PCCT_SUBSPACE,f) -#define ACPI_PCCT1_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_PCCT_HW_REDUCED,f) -#define ACPI_PCCT2_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_PCCT_HW_REDUCED_TYPE2,f) -#define ACPI_PCCT3_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_PCCT_EXT_PCC_MASTER,f) -#define ACPI_PCCT4_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_PCCT_EXT_PCC_SLAVE,f) -#define ACPI_PDTT0_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_PDTT_CHANNEL,f) -#define ACPI_PMTT0_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_PMTT_SOCKET,f) -#define ACPI_PMTT1_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_PMTT_CONTROLLER,f) -#define ACPI_PMTT1A_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_PMTT_DOMAIN,f) -#define ACPI_PMTT2_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_PMTT_PHYSICAL_COMPONENT,f) -#define ACPI_PMTTH_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_PMTT_HEADER,f) -#define ACPI_PPTTH_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_SUBTABLE_HEADER,f) -#define ACPI_PPTT0_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_PPTT_PROCESSOR,f) -#define ACPI_PPTT1_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_PPTT_CACHE,f) -#define ACPI_PPTT2_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_PPTT_ID,f) -#define ACPI_S3PTH_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_FPDT_HEADER,f) -#define ACPI_S3PT0_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_S3PT_RESUME,f) -#define ACPI_S3PT1_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_S3PT_SUSPEND,f) -#define ACPI_SDEVH_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_SDEV_HEADER,f) -#define ACPI_SDEV0_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_SDEV_NAMESPACE,f) -#define ACPI_SDEV1_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_SDEV_PCIE,f) -#define ACPI_SDEV1A_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_SDEV_PCIE_PATH,f) -#define ACPI_SLIC_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_TABLE_SLIC,f) -#define ACPI_SRATH_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_SUBTABLE_HEADER,f) -#define ACPI_SRAT0_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_SRAT_CPU_AFFINITY,f) -#define ACPI_SRAT1_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_SRAT_MEM_AFFINITY,f) -#define ACPI_SRAT2_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_SRAT_X2APIC_CPU_AFFINITY,f) -#define ACPI_SRAT3_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_SRAT_GICC_AFFINITY,f) -#define ACPI_SRAT4_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_SRAT_GIC_ITS_AFFINITY,f) -#define ACPI_TCPA_CLIENT_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_TABLE_TCPA_CLIENT,f) -#define ACPI_TCPA_SERVER_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_TABLE_TCPA_SERVER,f) -#define ACPI_TPM2A_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_TPM2_TRAILER,f) -#define ACPI_TPM211_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_TPM2_ARM_SMC,f) -#define ACPI_VRTC0_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_VRTC_ENTRY,f) -#define ACPI_WDAT0_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_WDAT_ENTRY,f) - -/* - * Simplify access to flag fields by breaking them up into bytes - */ -#define ACPI_FLAG_OFFSET(d,f,o) (UINT16) (ACPI_OFFSET (d,f) + o) - -/* Flags */ - -#define ACPI_BGRT_FLAG_OFFSET(f,o) ACPI_FLAG_OFFSET (ACPI_TABLE_BGRT,f,o) -#define ACPI_DRTM_FLAG_OFFSET(f,o) ACPI_FLAG_OFFSET (ACPI_TABLE_DRTM,f,o) -#define ACPI_DRTM1a_FLAG_OFFSET(f,o) ACPI_FLAG_OFFSET (ACPI_DRTM_RESOURCE,f,o) -#define ACPI_FADT_FLAG_OFFSET(f,o) ACPI_FLAG_OFFSET (ACPI_TABLE_FADT,f,o) -#define ACPI_FACS_FLAG_OFFSET(f,o) ACPI_FLAG_OFFSET (ACPI_TABLE_FACS,f,o) -#define ACPI_HPET_FLAG_OFFSET(f,o) ACPI_FLAG_OFFSET (ACPI_TABLE_HPET,f,o) -#define ACPI_PPTT0_FLAG_OFFSET(f,o) ACPI_FLAG_OFFSET (ACPI_PPTT_PROCESSOR,f,o) -#define ACPI_PPTT1_FLAG_OFFSET(f,o) ACPI_FLAG_OFFSET (ACPI_PPTT_CACHE,f,o) -#define ACPI_SRAT0_FLAG_OFFSET(f,o) ACPI_FLAG_OFFSET (ACPI_SRAT_CPU_AFFINITY,f,o) -#define ACPI_SRAT1_FLAG_OFFSET(f,o) ACPI_FLAG_OFFSET (ACPI_SRAT_MEM_AFFINITY,f,o) -#define ACPI_SRAT2_FLAG_OFFSET(f,o) ACPI_FLAG_OFFSET (ACPI_SRAT_X2APIC_CPU_AFFINITY,f,o) -#define ACPI_SRAT3_FLAG_OFFSET(f,o) ACPI_FLAG_OFFSET (ACPI_SRAT_GICC_AFFINITY,f,o) -#define ACPI_GTDT_FLAG_OFFSET(f,o) ACPI_FLAG_OFFSET (ACPI_TABLE_GTDT,f,o) -#define ACPI_GTDT0a_FLAG_OFFSET(f,o) ACPI_FLAG_OFFSET (ACPI_GTDT_TIMER_ENTRY,f,o) -#define ACPI_GTDT1_FLAG_OFFSET(f,o) ACPI_FLAG_OFFSET (ACPI_GTDT_WATCHDOG,f,o) -#define ACPI_HMAT0_FLAG_OFFSET(f,o) ACPI_FLAG_OFFSET (ACPI_HMAT_ADDRESS_RANGE,f,o) -#define ACPI_HMAT1_FLAG_OFFSET(f,o) ACPI_FLAG_OFFSET (ACPI_HMAT_LOCALITY,f,o) -#define ACPI_HMAT2_FLAG_OFFSET(f,o) ACPI_FLAG_OFFSET (ACPI_HMAT_CACHE,f,o) -#define ACPI_IORT3_FLAG_OFFSET(f,o) ACPI_FLAG_OFFSET (ACPI_IORT_SMMU,f,o) -#define ACPI_IORT3a_FLAG_OFFSET(f,o) ACPI_FLAG_OFFSET (ACPI_IORT_SMMU_GSI,f,o) -#define ACPI_IORT4_FLAG_OFFSET(f,o) ACPI_FLAG_OFFSET (ACPI_IORT_SMMU_V3,f,o) -#define ACPI_IORTA_FLAG_OFFSET(f,o) ACPI_FLAG_OFFSET (ACPI_IORT_MEMORY_ACCESS,f,o) -#define ACPI_IORTM_FLAG_OFFSET(f,o) ACPI_FLAG_OFFSET (ACPI_IORT_ID_MAPPING,f,o) -#define ACPI_LPITH_FLAG_OFFSET(f,o) ACPI_FLAG_OFFSET (ACPI_LPIT_HEADER,f,o) -#define ACPI_MADT_FLAG_OFFSET(f,o) ACPI_FLAG_OFFSET (ACPI_TABLE_MADT,f,o) -#define ACPI_MADT0_FLAG_OFFSET(f,o) ACPI_FLAG_OFFSET (ACPI_MADT_LOCAL_APIC,f,o) -#define ACPI_MADT2_FLAG_OFFSET(f,o) ACPI_FLAG_OFFSET (ACPI_MADT_INTERRUPT_OVERRIDE,f,o) -#define ACPI_MADT3_FLAG_OFFSET(f,o) ACPI_FLAG_OFFSET (ACPI_MADT_NMI_SOURCE,f,o) -#define ACPI_MADT4_FLAG_OFFSET(f,o) ACPI_FLAG_OFFSET (ACPI_MADT_LOCAL_APIC_NMI,f,o) -#define ACPI_MADT7_FLAG_OFFSET(f,o) ACPI_FLAG_OFFSET (ACPI_MADT_LOCAL_SAPIC,f,o) -#define ACPI_MADT8_FLAG_OFFSET(f,o) ACPI_FLAG_OFFSET (ACPI_MADT_INTERRUPT_SOURCE,f,o) -#define ACPI_MADT9_FLAG_OFFSET(f,o) ACPI_FLAG_OFFSET (ACPI_MADT_LOCAL_X2APIC,f,o) -#define ACPI_MADT10_FLAG_OFFSET(f,o) ACPI_FLAG_OFFSET (ACPI_MADT_LOCAL_X2APIC_NMI,f,o) -#define ACPI_MADT11_FLAG_OFFSET(f,o) ACPI_FLAG_OFFSET (ACPI_MADT_GENERIC_INTERRUPT,f,o) -#define ACPI_MADT13_FLAG_OFFSET(f,o) ACPI_FLAG_OFFSET (ACPI_MADT_GENERIC_MSI_FRAME,f,o) -#define ACPI_MPST0_FLAG_OFFSET(f,o) ACPI_FLAG_OFFSET (ACPI_MPST_POWER_NODE,f,o) -#define ACPI_MPST2_FLAG_OFFSET(f,o) ACPI_FLAG_OFFSET (ACPI_MPST_POWER_DATA,f,o) -#define ACPI_NFIT0_FLAG_OFFSET(f,o) ACPI_FLAG_OFFSET (ACPI_NFIT_SYSTEM_ADDRESS,f,o) -#define ACPI_NFIT1_FLAG_OFFSET(f,o) ACPI_FLAG_OFFSET (ACPI_NFIT_MEMORY_MAP,f,o) -#define ACPI_NFIT4_FLAG_OFFSET(f,o) ACPI_FLAG_OFFSET (ACPI_NFIT_CONTROL_REGION,f,o) -#define ACPI_NFIT7_FLAG_OFFSET(f,o) ACPI_FLAG_OFFSET (ACPI_NFIT_CAPABILITIES,f,o) -#define ACPI_PCCT_FLAG_OFFSET(f,o) ACPI_FLAG_OFFSET (ACPI_TABLE_PCCT,f,o) -#define ACPI_PCCT1_FLAG_OFFSET(f,o) ACPI_FLAG_OFFSET (ACPI_PCCT_HW_REDUCED,f,o) -#define ACPI_PCCT2_FLAG_OFFSET(f,o) ACPI_FLAG_OFFSET (ACPI_PCCT_HW_REDUCED_TYPE2,f,o) -#define ACPI_PCCT3_FLAG_OFFSET(f,o) ACPI_FLAG_OFFSET (ACPI_PCCT_EXT_PCC_MASTER,f,o) -#define ACPI_PCCT4_FLAG_OFFSET(f,o) ACPI_FLAG_OFFSET (ACPI_PCCT_EXT_PCC_SLAVE,f,o) -#define ACPI_PDTT0_FLAG_OFFSET(f,o) ACPI_FLAG_OFFSET (ACPI_PDTT_CHANNEL,f,o) -#define ACPI_PMTTH_FLAG_OFFSET(f,o) ACPI_FLAG_OFFSET (ACPI_PMTT_HEADER,f,o) -#define ACPI_SDEVH_FLAG_OFFSET(f,o) ACPI_FLAG_OFFSET (ACPI_SDEV_HEADER,f,o) -#define ACPI_WDDT_FLAG_OFFSET(f,o) ACPI_FLAG_OFFSET (ACPI_TABLE_WDDT,f,o) -#define ACPI_WSMT_FLAG_OFFSET(f,o) ACPI_FLAG_OFFSET (ACPI_TABLE_WSMT,f,o) -#define ACPI_EINJ0_FLAG_OFFSET(f,o) ACPI_FLAG_OFFSET (ACPI_WHEA_HEADER,f,o) -#define ACPI_ERST0_FLAG_OFFSET(f,o) ACPI_FLAG_OFFSET (ACPI_WHEA_HEADER,f,o) -#define ACPI_HEST0_FLAG_OFFSET(f,o) ACPI_FLAG_OFFSET (ACPI_HEST_IA_MACHINE_CHECK,f,o) -#define ACPI_HEST1_FLAG_OFFSET(f,o) ACPI_FLAG_OFFSET (ACPI_HEST_IA_CORRECTED,f,o) -#define ACPI_HEST6_FLAG_OFFSET(f,o) ACPI_FLAG_OFFSET (ACPI_HEST_AER_ROOT,f,o) -#define ACPI_HEST11_FLAG_OFFSET(f,o) ACPI_FLAG_OFFSET (ACPI_HEST_IA_DEFERRED_CHECK,f,o) - -/* - * Required terminator for all tables below - */ -#define ACPI_DMT_TERMINATOR {ACPI_DMT_EXIT, 0, NULL, 0} -#define ACPI_DMT_NEW_LINE {ACPI_DMT_EXTRA_TEXT, 0, "\n", 0} - /* * ACPI Table Information, used to dump formatted ACPI tables Modified: head/sys/contrib/dev/acpica/common/getopt.c ============================================================================== --- head/sys/contrib/dev/acpica/common/getopt.c Fri Jan 5 23:04:13 2018 (r327604) +++ head/sys/contrib/dev/acpica/common/getopt.c Fri Jan 5 23:21:47 2018 (r327605) @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2017, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2018, Intel Corp. * All rights reserved. * * 2. License Modified: head/sys/contrib/dev/acpica/compiler/aslallocate.c ============================================================================== --- head/sys/contrib/dev/acpica/compiler/aslallocate.c Fri Jan 5 23:04:13 2018 (r327604) +++ head/sys/contrib/dev/acpica/compiler/aslallocate.c Fri Jan 5 23:21:47 2018 (r327605) @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2017, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2018, Intel Corp. * All rights reserved. * * 2. License Modified: head/sys/contrib/dev/acpica/compiler/aslanalyze.c ============================================================================== --- head/sys/contrib/dev/acpica/compiler/aslanalyze.c Fri Jan 5 23:04:13 2018 (r327604) +++ head/sys/contrib/dev/acpica/compiler/aslanalyze.c Fri Jan 5 23:21:47 2018 (r327605) @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2017, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2018, Intel Corp. * All rights reserved. * * 2. License Modified: head/sys/contrib/dev/acpica/compiler/aslascii.c ============================================================================== --- head/sys/contrib/dev/acpica/compiler/aslascii.c Fri Jan 5 23:04:13 2018 (r327604) +++ head/sys/contrib/dev/acpica/compiler/aslascii.c Fri Jan 5 23:21:47 2018 (r327605) @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2017, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2018, Intel Corp. * All rights reserved. * * 2. License Modified: head/sys/contrib/dev/acpica/compiler/aslbtypes.c ============================================================================== --- head/sys/contrib/dev/acpica/compiler/aslbtypes.c Fri Jan 5 23:04:13 2018 (r327604) +++ head/sys/contrib/dev/acpica/compiler/aslbtypes.c Fri Jan 5 23:21:47 2018 (r327605) @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2017, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2018, Intel Corp. * All rights reserved. * * 2. License Modified: head/sys/contrib/dev/acpica/compiler/aslcache.c ============================================================================== --- head/sys/contrib/dev/acpica/compiler/aslcache.c Fri Jan 5 23:04:13 2018 (r327604) +++ head/sys/contrib/dev/acpica/compiler/aslcache.c Fri Jan 5 23:21:47 2018 (r327605) @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2017, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2018, Intel Corp. * All rights reserved. * * 2. License Modified: head/sys/contrib/dev/acpica/compiler/aslcodegen.c ============================================================================== --- head/sys/contrib/dev/acpica/compiler/aslcodegen.c Fri Jan 5 23:04:13 2018 (r327604) +++ head/sys/contrib/dev/acpica/compiler/aslcodegen.c Fri Jan 5 23:21:47 2018 (r327605) @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2017, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2018, Intel Corp. * All rights reserved. * * 2. License Modified: head/sys/contrib/dev/acpica/compiler/aslcompile.c ============================================================================== --- head/sys/contrib/dev/acpica/compiler/aslcompile.c Fri Jan 5 23:04:13 2018 (r327604) +++ head/sys/contrib/dev/acpica/compiler/aslcompile.c Fri Jan 5 23:21:47 2018 (r327605) @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2017, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2018, Intel Corp. * All rights reserved. * * 2. License Modified: head/sys/contrib/dev/acpica/compiler/aslcompiler.h ============================================================================== --- head/sys/contrib/dev/acpica/compiler/aslcompiler.h Fri Jan 5 23:04:13 2018 (r327604) +++ head/sys/contrib/dev/acpica/compiler/aslcompiler.h Fri Jan 5 23:21:47 2018 (r327605) @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2017, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2018, Intel Corp. * All rights reserved. * * 2. License Modified: head/sys/contrib/dev/acpica/compiler/aslcompiler.l ============================================================================== --- head/sys/contrib/dev/acpica/compiler/aslcompiler.l Fri Jan 5 23:04:13 2018 (r327604) +++ head/sys/contrib/dev/acpica/compiler/aslcompiler.l Fri Jan 5 23:21:47 2018 (r327605) @@ -9,7 +9,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2017, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2018, Intel Corp. * All rights reserved. * * 2. License Modified: head/sys/contrib/dev/acpica/compiler/aslcstyle.y ============================================================================== --- head/sys/contrib/dev/acpica/compiler/aslcstyle.y Fri Jan 5 23:04:13 2018 (r327604) +++ head/sys/contrib/dev/acpica/compiler/aslcstyle.y Fri Jan 5 23:21:47 2018 (r327605) @@ -9,7 +9,7 @@ NoEcho(' * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2017, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2018, Intel Corp. * All rights reserved. * * 2. License Modified: head/sys/contrib/dev/acpica/compiler/asldebug.c ============================================================================== --- head/sys/contrib/dev/acpica/compiler/asldebug.c Fri Jan 5 23:04:13 2018 (r327604) +++ head/sys/contrib/dev/acpica/compiler/asldebug.c Fri Jan 5 23:21:47 2018 (r327605) @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2017, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2018, Intel Corp. * All rights reserved. * * 2. License Modified: head/sys/contrib/dev/acpica/compiler/asldefine.h ============================================================================== --- head/sys/contrib/dev/acpica/compiler/asldefine.h Fri Jan 5 23:04:13 2018 (r327604) +++ head/sys/contrib/dev/acpica/compiler/asldefine.h Fri Jan 5 23:21:47 2018 (r327605) @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2017, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2018, Intel Corp. * All rights reserved. * * 2. License Modified: head/sys/contrib/dev/acpica/compiler/aslerror.c ============================================================================== --- head/sys/contrib/dev/acpica/compiler/aslerror.c Fri Jan 5 23:04:13 2018 (r327604) +++ head/sys/contrib/dev/acpica/compiler/aslerror.c Fri Jan 5 23:21:47 2018 (r327605) @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2017, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2018, Intel Corp. * All rights reserved. * * 2. License Modified: head/sys/contrib/dev/acpica/compiler/aslexternal.c ============================================================================== --- head/sys/contrib/dev/acpica/compiler/aslexternal.c Fri Jan 5 23:04:13 2018 (r327604) +++ head/sys/contrib/dev/acpica/compiler/aslexternal.c Fri Jan 5 23:21:47 2018 (r327605) @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2017, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2018, Intel Corp. * All rights reserved. * * 2. License Modified: head/sys/contrib/dev/acpica/compiler/aslfileio.c ============================================================================== --- head/sys/contrib/dev/acpica/compiler/aslfileio.c Fri Jan 5 23:04:13 2018 (r327604) +++ head/sys/contrib/dev/acpica/compiler/aslfileio.c Fri Jan 5 23:21:47 2018 (r327605) @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2017, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2018, Intel Corp. * All rights reserved. * * 2. License Modified: head/sys/contrib/dev/acpica/compiler/aslfiles.c ============================================================================== --- head/sys/contrib/dev/acpica/compiler/aslfiles.c Fri Jan 5 23:04:13 2018 (r327604) +++ head/sys/contrib/dev/acpica/compiler/aslfiles.c Fri Jan 5 23:21:47 2018 (r327605) @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2017, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2018, Intel Corp. * All rights reserved. * * 2. License Modified: head/sys/contrib/dev/acpica/compiler/aslfold.c ============================================================================== --- head/sys/contrib/dev/acpica/compiler/aslfold.c Fri Jan 5 23:04:13 2018 (r327604) +++ head/sys/contrib/dev/acpica/compiler/aslfold.c Fri Jan 5 23:21:47 2018 (r327605) @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2017, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2018, Intel Corp. * All rights reserved. * * 2. License Modified: head/sys/contrib/dev/acpica/compiler/aslglobal.h ============================================================================== --- head/sys/contrib/dev/acpica/compiler/aslglobal.h Fri Jan 5 23:04:13 2018 (r327604) +++ head/sys/contrib/dev/acpica/compiler/aslglobal.h Fri Jan 5 23:21:47 2018 (r327605) @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2017, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2018, Intel Corp. * All rights reserved. * * 2. License Modified: head/sys/contrib/dev/acpica/compiler/aslhelp.c ============================================================================== --- head/sys/contrib/dev/acpica/compiler/aslhelp.c Fri Jan 5 23:04:13 2018 (r327604) +++ head/sys/contrib/dev/acpica/compiler/aslhelp.c Fri Jan 5 23:21:47 2018 (r327605) @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2017, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2018, Intel Corp. * All rights reserved. * * 2. License Modified: head/sys/contrib/dev/acpica/compiler/aslhelpers.y ============================================================================== --- head/sys/contrib/dev/acpica/compiler/aslhelpers.y Fri Jan 5 23:04:13 2018 (r327604) +++ head/sys/contrib/dev/acpica/compiler/aslhelpers.y Fri Jan 5 23:21:47 2018 (r327605) @@ -9,7 +9,7 @@ NoEcho(' * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2017, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2018, Intel Corp. * All rights reserved. * * 2. License Modified: head/sys/contrib/dev/acpica/compiler/aslhex.c ============================================================================== --- head/sys/contrib/dev/acpica/compiler/aslhex.c Fri Jan 5 23:04:13 2018 (r327604) +++ head/sys/contrib/dev/acpica/compiler/aslhex.c Fri Jan 5 23:21:47 2018 (r327605) @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2017, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2018, Intel Corp. * All rights reserved. * * 2. License Modified: head/sys/contrib/dev/acpica/compiler/aslkeywords.y ============================================================================== --- head/sys/contrib/dev/acpica/compiler/aslkeywords.y Fri Jan 5 23:04:13 2018 (r327604) +++ head/sys/contrib/dev/acpica/compiler/aslkeywords.y Fri Jan 5 23:21:47 2018 (r327605) @@ -9,7 +9,7 @@ NoEcho(' * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2017, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2018, Intel Corp. * All rights reserved. * * 2. License Modified: head/sys/contrib/dev/acpica/compiler/asllength.c ============================================================================== --- head/sys/contrib/dev/acpica/compiler/asllength.c Fri Jan 5 23:04:13 2018 (r327604) +++ head/sys/contrib/dev/acpica/compiler/asllength.c Fri Jan 5 23:21:47 2018 (r327605) @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2017, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2018, Intel Corp. * All rights reserved. * * 2. License Modified: head/sys/contrib/dev/acpica/compiler/asllisting.c ============================================================================== --- head/sys/contrib/dev/acpica/compiler/asllisting.c Fri Jan 5 23:04:13 2018 (r327604) +++ head/sys/contrib/dev/acpica/compiler/asllisting.c Fri Jan 5 23:21:47 2018 (r327605) @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2017, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2018, Intel Corp. * All rights reserved. * * 2. License Modified: head/sys/contrib/dev/acpica/compiler/asllistsup.c ============================================================================== --- head/sys/contrib/dev/acpica/compiler/asllistsup.c Fri Jan 5 23:04:13 2018 (r327604) +++ head/sys/contrib/dev/acpica/compiler/asllistsup.c Fri Jan 5 23:21:47 2018 (r327605) @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2017, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2018, Intel Corp. * All rights reserved. * * 2. License Modified: head/sys/contrib/dev/acpica/compiler/aslload.c ============================================================================== --- head/sys/contrib/dev/acpica/compiler/aslload.c Fri Jan 5 23:04:13 2018 (r327604) +++ head/sys/contrib/dev/acpica/compiler/aslload.c Fri Jan 5 23:21:47 2018 (r327605) @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2017, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2018, Intel Corp. * All rights reserved. * * 2. License Modified: head/sys/contrib/dev/acpica/compiler/asllookup.c ============================================================================== --- head/sys/contrib/dev/acpica/compiler/asllookup.c Fri Jan 5 23:04:13 2018 (r327604) +++ head/sys/contrib/dev/acpica/compiler/asllookup.c Fri Jan 5 23:21:47 2018 (r327605) @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2017, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2018, Intel Corp. * All rights reserved. * * 2. License Modified: head/sys/contrib/dev/acpica/compiler/aslmain.c ============================================================================== --- head/sys/contrib/dev/acpica/compiler/aslmain.c Fri Jan 5 23:04:13 2018 (r327604) +++ head/sys/contrib/dev/acpica/compiler/aslmain.c Fri Jan 5 23:21:47 2018 (r327605) @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2017, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2018, Intel Corp. * All rights reserved. * * 2. License Modified: head/sys/contrib/dev/acpica/compiler/aslmap.c ============================================================================== --- head/sys/contrib/dev/acpica/compiler/aslmap.c Fri Jan 5 23:04:13 2018 (r327604) +++ head/sys/contrib/dev/acpica/compiler/aslmap.c Fri Jan 5 23:21:47 2018 (r327605) @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2017, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2018, Intel Corp. * All rights reserved. * * 2. License Modified: head/sys/contrib/dev/acpica/compiler/aslmapenter.c ============================================================================== --- head/sys/contrib/dev/acpica/compiler/aslmapenter.c Fri Jan 5 23:04:13 2018 (r327604) +++ head/sys/contrib/dev/acpica/compiler/aslmapenter.c Fri Jan 5 23:21:47 2018 (r327605) @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2017, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2018, Intel Corp. * All rights reserved. * * 2. License Modified: head/sys/contrib/dev/acpica/compiler/aslmapoutput.c ============================================================================== --- head/sys/contrib/dev/acpica/compiler/aslmapoutput.c Fri Jan 5 23:04:13 2018 (r327604) +++ head/sys/contrib/dev/acpica/compiler/aslmapoutput.c Fri Jan 5 23:21:47 2018 (r327605) @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2017, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2018, Intel Corp. * All rights reserved. * * 2. License Modified: head/sys/contrib/dev/acpica/compiler/aslmaputils.c ============================================================================== --- head/sys/contrib/dev/acpica/compiler/aslmaputils.c Fri Jan 5 23:04:13 2018 (r327604) +++ head/sys/contrib/dev/acpica/compiler/aslmaputils.c Fri Jan 5 23:21:47 2018 (r327605) @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2017, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2018, Intel Corp. * All rights reserved. * * 2. License Modified: head/sys/contrib/dev/acpica/compiler/aslmessages.c ============================================================================== --- head/sys/contrib/dev/acpica/compiler/aslmessages.c Fri Jan 5 23:04:13 2018 (r327604) +++ head/sys/contrib/dev/acpica/compiler/aslmessages.c Fri Jan 5 23:21:47 2018 (r327605) @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2017, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2018, Intel Corp. * All rights reserved. * * 2. License Modified: head/sys/contrib/dev/acpica/compiler/aslmessages.h ============================================================================== --- head/sys/contrib/dev/acpica/compiler/aslmessages.h Fri Jan 5 23:04:13 2018 (r327604) +++ head/sys/contrib/dev/acpica/compiler/aslmessages.h Fri Jan 5 23:21:47 2018 (r327605) @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2017, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2018, Intel Corp. * All rights reserved. * * 2. License Modified: head/sys/contrib/dev/acpica/compiler/aslmethod.c ============================================================================== --- head/sys/contrib/dev/acpica/compiler/aslmethod.c Fri Jan 5 23:04:13 2018 (r327604) +++ head/sys/contrib/dev/acpica/compiler/aslmethod.c Fri Jan 5 23:21:47 2018 (r327605) @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2017, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2018, Intel Corp. * All rights reserved. * * 2. License Modified: head/sys/contrib/dev/acpica/compiler/aslnamesp.c ============================================================================== --- head/sys/contrib/dev/acpica/compiler/aslnamesp.c Fri Jan 5 23:04:13 2018 (r327604) +++ head/sys/contrib/dev/acpica/compiler/aslnamesp.c Fri Jan 5 23:21:47 2018 (r327605) @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2017, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2018, Intel Corp. * All rights reserved. * * 2. License Modified: head/sys/contrib/dev/acpica/compiler/asloffset.c ============================================================================== --- head/sys/contrib/dev/acpica/compiler/asloffset.c Fri Jan 5 23:04:13 2018 (r327604) +++ head/sys/contrib/dev/acpica/compiler/asloffset.c Fri Jan 5 23:21:47 2018 (r327605) @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2017, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2018, Intel Corp. * All rights reserved. * * 2. License Modified: head/sys/contrib/dev/acpica/compiler/aslopcodes.c ============================================================================== --- head/sys/contrib/dev/acpica/compiler/aslopcodes.c Fri Jan 5 23:04:13 2018 (r327604) +++ head/sys/contrib/dev/acpica/compiler/aslopcodes.c Fri Jan 5 23:21:47 2018 (r327605) @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2017, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2018, Intel Corp. * All rights reserved. * * 2. License Modified: head/sys/contrib/dev/acpica/compiler/asloperands.c ============================================================================== --- head/sys/contrib/dev/acpica/compiler/asloperands.c Fri Jan 5 23:04:13 2018 (r327604) +++ head/sys/contrib/dev/acpica/compiler/asloperands.c Fri Jan 5 23:21:47 2018 (r327605) @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2017, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2018, Intel Corp. * All rights reserved. * * 2. License Modified: head/sys/contrib/dev/acpica/compiler/aslopt.c ============================================================================== --- head/sys/contrib/dev/acpica/compiler/aslopt.c Fri Jan 5 23:04:13 2018 (r327604) +++ head/sys/contrib/dev/acpica/compiler/aslopt.c Fri Jan 5 23:21:47 2018 (r327605) @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2017, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2018, Intel Corp. * All rights reserved. * * 2. License Modified: head/sys/contrib/dev/acpica/compiler/asloptions.c ============================================================================== --- head/sys/contrib/dev/acpica/compiler/asloptions.c Fri Jan 5 23:04:13 2018 (r327604) +++ head/sys/contrib/dev/acpica/compiler/asloptions.c Fri Jan 5 23:21:47 2018 (r327605) @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2017, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2018, Intel Corp. * All rights reserved. * * 2. License Modified: head/sys/contrib/dev/acpica/compiler/aslparseop.c ============================================================================== --- head/sys/contrib/dev/acpica/compiler/aslparseop.c Fri Jan 5 23:04:13 2018 (r327604) +++ head/sys/contrib/dev/acpica/compiler/aslparseop.c Fri Jan 5 23:21:47 2018 (r327605) @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2017, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2018, Intel Corp. * All rights reserved. * * 2. License Modified: head/sys/contrib/dev/acpica/compiler/aslparser.y ============================================================================== --- head/sys/contrib/dev/acpica/compiler/aslparser.y Fri Jan 5 23:04:13 2018 (r327604) +++ head/sys/contrib/dev/acpica/compiler/aslparser.y Fri Jan 5 23:21:47 2018 (r327605) @@ -9,7 +9,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2017, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2018, Intel Corp. * All rights reserved. * * 2. License Modified: head/sys/contrib/dev/acpica/compiler/aslpld.c ============================================================================== --- head/sys/contrib/dev/acpica/compiler/aslpld.c Fri Jan 5 23:04:13 2018 (r327604) +++ head/sys/contrib/dev/acpica/compiler/aslpld.c Fri Jan 5 23:21:47 2018 (r327605) @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2017, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2018, Intel Corp. * All rights reserved. * * 2. License Modified: head/sys/contrib/dev/acpica/compiler/aslpredef.c ============================================================================== --- head/sys/contrib/dev/acpica/compiler/aslpredef.c Fri Jan 5 23:04:13 2018 (r327604) *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-head@freebsd.org Fri Jan 5 23:30:06 2018 Return-Path: Delivered-To: svn-src-head@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 85381EA6C40; Fri, 5 Jan 2018 23:30:06 +0000 (UTC) (envelope-from scottl@samsco.org) Received: from out2-smtp.messagingengine.com (out2-smtp.messagingengine.com [66.111.4.26]) (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 4906665705; Fri, 5 Jan 2018 23:30:05 +0000 (UTC) (envelope-from scottl@samsco.org) Received: from compute6.internal (compute6.nyi.internal [10.202.2.46]) by mailout.nyi.internal (Postfix) with ESMTP id 7F63121F7D; Fri, 5 Jan 2018 18:30:04 -0500 (EST) Received: from frontend2 ([10.202.2.161]) by compute6.internal (MEProxy); Fri, 05 Jan 2018 18:30:04 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=samsco.org; h=cc :content-transfer-encoding:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to:x-me-sender :x-me-sender:x-sasl-enc; s=fm2; bh=NYvNEetVYIXvZxcxJhCY/6HK1yIF1 S+0Yi3ujabkLyc=; b=F1xbOgeKhwL1woJWSltPKHiJSQllreZU+gTgctjH++GYH FSkwqe0IzX6ev61M5z6n7/KPmKq8diaPwdzpMz/CTp5VmhyE0LxNCIO2Tl0a2b7r gJWp6dBNkbN3GjWHcdwGeowyjrSFgeovuWktuf0VJVAcm2FUxy0SeWrS16p3DDme B8iLIgMdo+XcBf6G+ApOPfE0/5ufY2Mssb2CLj6bVLYedkzjZygf+PphPH9fKJcS CQYkLlZ2vVDkrkmr1KwYPKvdGIG/maOACsANKXjm5PVhq8m7nHbawkfiXU81FdA5 BBHRBX1KHWrrS/pMyw1QbNr25h0GNHg3Hb0kKbgvg== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:content-type :date:from:in-reply-to:message-id:mime-version:references :subject:to:x-me-sender:x-me-sender:x-sasl-enc; s=fm1; bh=NYvNEe tVYIXvZxcxJhCY/6HK1yIF1S+0Yi3ujabkLyc=; b=YZu9sSjHDqxEWrMXHZEHD5 Df1QOtHVGp9qM2BlUAKn4JN5NUdqBF4bb8hZM8ZrCGSlFjdHKmd0CXPmohs3l/HK Y7tLxFKeq8In6MzJxEkK//8H59kpt6VGMFgyBnDgz4rkXyFlhFPOQmEzBVQSe/aS tvCP0TCB3fORMN9RlzuQ3uHkjCrfry4aGzGYQWhwH+Oq0YaaV7U5fM5n1/YtjfJ7 MFgsa6UTcb+MWKjukfstMFR4jGw3DnGSf5Fu4Vbk4/izTHLmlkA4dVs7b2ie4sQD ecHs4bqqTE8+nGfCud39sjzQCPToKoWu3SPFLbjOR+3tPicHspTtPkxUN5SUjvKA == X-ME-Sender: Received: from [192.168.0.106] (unknown [161.97.249.191]) by mail.messagingengine.com (Postfix) with ESMTPA id AF98524599; Fri, 5 Jan 2018 18:30:03 -0500 (EST) Content-Type: text/plain; charset=utf-8 Mime-Version: 1.0 (Mac OS X Mail 11.1 \(3445.4.7\)) Subject: Re: svn commit: r327559 - in head: . sys/net From: Scott Long In-Reply-To: <5A4FC1E4.9060301@grosbein.net> Date: Fri, 5 Jan 2018 16:30:00 -0700 Cc: Matt Joras , Steven Hartland , src-committers , svn-src-all@freebsd.org, svn-src-head@freebsd.org, scottl@freebsd.org Content-Transfer-Encoding: quoted-printable Message-Id: References: <201801042005.w04K5liB049411@repo.freebsd.org> <5A4E9397.9000308@grosbein.net> <5A4EDC62.50508@grosbein.net> <5A4F824C.1060405@grosbein.net> <97d173fb-4f47-609d-8319-07282a283473@multiplay.co.uk> <5A4FB6BC.6090506@grosbein.net> <5A4FC1E4.9060301@grosbein.net> To: Eugene Grosbein X-Mailer: Apple Mail (2.3445.4.7) X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 05 Jan 2018 23:30:06 -0000 > On Jan 5, 2018, at 11:20 AM, Eugene Grosbein = wrote: >=20 > CC'ng scottl@ as author of the change in question. >=20 > 06.01.2018 0:39, Matt Joras wrote: >=20 >>>> For what it's worth, this was the conclusion I came to, and at = Isilon >>>> we've made the same change being discussed here. For the case of >>>> drivers that end up using a queue index for the flowid, you end up >>>> with pathological behavior on the lagg; the flowid ends up getting >>>> right shifted by (default) 16. So in the case of e.g. two bxe(4) >>>> interfaces with 4 queues, you always end up choosing the interface = in >>>> the lagg at index 0. >=20 > Then why does if_lagg shifts 16 bits by default? Is seems senseless. > This was introduced with r260070 by scottl: >=20 At the time, we were using cxgbe interfaces which inserted a reasonable = RSS hash into the flowid field. The shift was done to expose different bits = to the index/modulo scheme used by the LACP module vs the cxgbe module. In hindsight, I should not have set a default value of 16, I should have = left it at zero so that default behavior would be preserved. >> Multi-queue NIC drivers and multi-port lagg tend to use the same = lower >> bits of the flowid as each other, resulting in a poor distribution of >> packets among queues in certain cases. Work around this by adding a >> set of sysctls for controlling a bit-shift on the flowid when doing >> multi-port aggrigation in lagg and lacp. By default, lagg/lacp will >> now use bits 16 and higher instead of 0 and higher. >>=20 >> Reviewed by: max >> Obtained from: Netflix >> MFC after: 3 days >=20 > This commit message does not point to an example of NIC driver that = would set > non-zero bits 16 and higher for flowid so that shift result would be = non-zero. > Do we really have such a driver? >=20 Yes. > Anyway, this lagg's default seems to be very driver-centric. >=20 > For example, Intel driver family also do not use such high bits for = flowid > just like mentioned bxe(4). >=20 scottl@moe:~/svn/head/sys/dev % grep -r iri_flowid * bnxt/bnxt_txrx.c: ri->iri_flowid =3D = le32toh(rcp->rss_hash); bnxt/bnxt_txrx.c: ri->iri_flowid =3D = le32toh(tpas->low.rss_hash); e1000/em_txrx.c: ri->iri_flowid =3D = le32toh(rxd->wb.lower.hi_dword.rss); e1000/igb_txrx.c: ri->iri_flowid =3D ixgbe/ix_txrx.c: ri->iri_flowid =3D = le32toh(rxd->wb.lower.hi_dword.rss); The number of drivers that set m_pkhhdr.flowid directly to an RSS hash = looks to be: cxgb cxgbe mlx4 mlx5 qlnx qlxgbe qlxge vmxnet3 Maybe the hardware doesn=E2=80=99t do a great job with generating a = useful RSS hash, but that=E2=80=99s tangential to this conversation. > We should change flowid_shift default to 0 for if_lagg(4), shouldn't = we? >=20 In the short term, yes. What I see is that it=E2=80=99s too expensive = to do a hash calculation on every TX packet in LACP (for anything resembling line rate), and = flowid is unreliable when a connection is initiated without an RX packet triggering it. I = don=E2=80=99t understand the consequences of the TX initiation problem well enough to offer a = solution. For the problem of flowid being used inconsistently by drivers (i.e. not = populating all 32 bits or using a weak RSS), that=E2=80=99s really a driver problem. What I=E2=80=99d recommend is that the LACP code check for = M_HASHTYPE_NONE and M_HASHTYPE_OPAQUE and calculate a new hash if either are set = (effectively ignoring the flowid). It=E2=80=99s then up to the drivers to set the = correct hash type that corresponds with what they=E2=80=99re putting into the flowid field. An = opaque type would mean that the value is useful to the driver but should not be considered = useful anywhere else. You=E2=80=99ll get more correct and less surprising = behavior from that, at the penalty of every TX packet requiring a hash calculation for = hardware/drivers that are crummy. Scott From owner-svn-src-head@freebsd.org Fri Jan 5 23:50:51 2018 Return-Path: Delivered-To: svn-src-head@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 8B025EA7F06; Fri, 5 Jan 2018 23:50:51 +0000 (UTC) (envelope-from sbruno@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 51C87667F0; Fri, 5 Jan 2018 23:50:51 +0000 (UTC) (envelope-from sbruno@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w05Nookc053748; Fri, 5 Jan 2018 23:50:50 GMT (envelope-from sbruno@FreeBSD.org) Received: (from sbruno@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w05NooUN053747; Fri, 5 Jan 2018 23:50:50 GMT (envelope-from sbruno@FreeBSD.org) Message-Id: <201801052350.w05NooUN053747@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: sbruno set sender to sbruno@FreeBSD.org using -f From: Sean Bruno Date: Fri, 5 Jan 2018 23:50:50 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r327606 - head/stand/i386/libi386 X-SVN-Group: head X-SVN-Commit-Author: sbruno X-SVN-Commit-Paths: head/stand/i386/libi386 X-SVN-Commit-Revision: 327606 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 05 Jan 2018 23:50:51 -0000 Author: sbruno Date: Fri Jan 5 23:50:50 2018 New Revision: 327606 URL: https://svnweb.freebsd.org/changeset/base/327606 Log: Handle misconfigured/nonexistent pcidev for comconsole instead of BTX panic. PR: 203319 Reviewed by: imp jhb MFC after: 2 weeks Sponsored by: Limelight Networks Differential Revision: https://reviews.freebsd.org/D13776 Modified: head/stand/i386/libi386/comconsole.c Modified: head/stand/i386/libi386/comconsole.c ============================================================================== --- head/stand/i386/libi386/comconsole.c Fri Jan 5 23:21:47 2018 (r327605) +++ head/stand/i386/libi386/comconsole.c Fri Jan 5 23:50:50 2018 (r327606) @@ -267,6 +267,16 @@ comc_pcidev_handle(uint32_t locator) printf("Cannot read bar at 0x%x\n", locator); return (CMD_ERROR); } + + /* + * biospci_read_config() sets port == 0xffffffff if the pcidev + * isn't found on the bus. Check for 0xffffffff and return to not + * panic in BTX. + */ + if (port == 0xffffffff) { + printf("Cannot find specified pcidev\n"); + return (CMD_ERROR); + } if (!PCI_BAR_IO(port)) { printf("Memory bar at 0x%x\n", locator); return (CMD_ERROR); From owner-svn-src-head@freebsd.org Sat Jan 6 00:39:30 2018 Return-Path: Delivered-To: svn-src-head@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 F10D2EAA505 for ; Sat, 6 Jan 2018 00:39:30 +0000 (UTC) (envelope-from steven@multiplay.co.uk) Received: from mail-wr0-x230.google.com (mail-wr0-x230.google.com [IPv6:2a00:1450:400c:c0c::230]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 7FF0E681A5 for ; Sat, 6 Jan 2018 00:39:30 +0000 (UTC) (envelope-from steven@multiplay.co.uk) Received: by mail-wr0-x230.google.com with SMTP id l19so5675324wrc.2 for ; Fri, 05 Jan 2018 16:39:30 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=multiplay-co-uk.20150623.gappssmtp.com; s=20150623; h=subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language; bh=9CCXSkBOjc9SmfDyIjg1vSC6i8YB/H2fntJ3hkcEFao=; b=KuydzEDtYPrOJ4WiQ4bTk9L60Nxt6wQg2F7RKiYIXVAClD/z2TtsNQKbBuPp1NG6Tk 7sLqobCemdr/e/ABMHwWd4imHjGlV6fKBplqApaHBIvq56kQBas0xHMtU9XOZPiR/ydb SRKsb8xhHS/NJpZ15WD8TIymepqgyYTNeJyop2ZFT60i9ymO1IEAPWhYX/iRZGgzvEAw ydvMSn8e4xPSxZeScapZwObu49w9/roS/x06yVhHUxHQxU3T5S/TFUWfjCSkWH7zw6C3 QoesFcAIaAlexvEL1FohJ9IYldEBsUBuDTCJZT0qIzJEUSmUBq8IgZhoxPOsI2Y++jI+ pq3w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language; bh=9CCXSkBOjc9SmfDyIjg1vSC6i8YB/H2fntJ3hkcEFao=; b=EQSJ+ePj0CylL4KpCL02vlJK3uzwm8gZpnjA/uW4yFmqqN4LTLqzi2FLi2+L9YtLZC pT2J5Q+/S1w8sexIfsaNq/GXDClFXgqgy6XQ/vE43KZ/6OdpMUSiRAJDe/nMty/PY3E7 A9G1SriJysNoTDgRYFuCbzqmQgJeJNqOaSXGI6Vd7yG4Uwa35FkPvOD5zxIskC3IUi3K jvHM/noVqW5G24YyA4SsO/uiINZk4tKUBhnQOUR6f5FjFLa7brdPM651i5qaXlpPJIvC 0IQl2/IS2ai+1qH1V9AOkCOznkrm8fcYSLDaX8/lloOPnYUGZ8VVyvY6/EXkrezdl+Qy Zx8A== X-Gm-Message-State: AKGB3mIDmJGsiEgDmM8kldGMXQ32wEVVdhSz9mPqtfyWzLyNNVhz0bWH yfmlh+qvO2AHO+wTEOiHapVHEg== X-Google-Smtp-Source: ACJfBotdQ45x/D1AqXcoP6W6WJHDBz4pQ8s13Kcp+3IXpgaON8Ht75SEwzP9vKibKeNVosCxRizHBQ== X-Received: by 10.223.153.15 with SMTP id x15mr272860wrb.189.1515199168448; Fri, 05 Jan 2018 16:39:28 -0800 (PST) Received: from [10.10.1.111] ([185.97.61.1]) by smtp.gmail.com with ESMTPSA id v10sm6156105wra.15.2018.01.05.16.39.26 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 05 Jan 2018 16:39:27 -0800 (PST) Subject: Re: svn commit: r327559 - in head: . sys/net To: Scott Long , Eugene Grosbein Cc: Matt Joras , src-committers , svn-src-all@freebsd.org, svn-src-head@freebsd.org, scottl@freebsd.org References: <201801042005.w04K5liB049411@repo.freebsd.org> <5A4E9397.9000308@grosbein.net> <5A4EDC62.50508@grosbein.net> <5A4F824C.1060405@grosbein.net> <97d173fb-4f47-609d-8319-07282a283473@multiplay.co.uk> <5A4FB6BC.6090506@grosbein.net> <5A4FC1E4.9060301@grosbein.net> From: Steven Hartland Message-ID: <8e86a984-b9f8-1f45-f4f6-61b4470afae1@multiplay.co.uk> Date: Sat, 6 Jan 2018 00:39:28 +0000 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:52.0) Gecko/20100101 Thunderbird/52.5.2 MIME-Version: 1.0 In-Reply-To: Content-Language: en-US Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit X-Content-Filtered-By: Mailman/MimeDel 2.1.25 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 06 Jan 2018 00:39:31 -0000 On 05/01/2018 23:30, Scott Long wrote: > >> On Jan 5, 2018, at 11:20 AM, Eugene Grosbein wrote: >> >> CC'ng scottl@ as author of the change in question. >> >> 06.01.2018 0:39, Matt Joras wrote: >> >>>>> For what it's worth, this was the conclusion I came to, and at Isilon >>>>> we've made the same change being discussed here. For the case of >>>>> drivers that end up using a queue index for the flowid, you end up >>>>> with pathological behavior on the lagg; the flowid ends up getting >>>>> right shifted by (default) 16. So in the case of e.g. two bxe(4) >>>>> interfaces with 4 queues, you always end up choosing the interface in >>>>> the lagg at index 0. >> Then why does if_lagg shifts 16 bits by default? Is seems senseless. >> This was introduced with r260070 by scottl: >> > At the time, we were using cxgbe interfaces which inserted a reasonable RSS > hash into the flowid field. The shift was done to expose different bits to the > index/modulo scheme used by the LACP module vs the cxgbe module. In > hindsight, I should not have set a default value of 16, I should have left it at > zero so that default behavior would be preserved. > >>> Multi-queue NIC drivers and multi-port lagg tend to use the same lower >>> bits of the flowid as each other, resulting in a poor distribution of >>> packets among queues in certain cases. Work around this by adding a >>> set of sysctls for controlling a bit-shift on the flowid when doing >>> multi-port aggrigation in lagg and lacp. By default, lagg/lacp will >>> now use bits 16 and higher instead of 0 and higher. >>> >>> Reviewed by: max >>> Obtained from: Netflix >>> MFC after: 3 days >> This commit message does not point to an example of NIC driver that would set >> non-zero bits 16 and higher for flowid so that shift result would be non-zero. >> Do we really have such a driver? >> > Yes. > >> Anyway, this lagg's default seems to be very driver-centric. >> >> For example, Intel driver family also do not use such high bits for flowid >> just like mentioned bxe(4). >> > scottl@moe:~/svn/head/sys/dev % grep -r iri_flowid * > bnxt/bnxt_txrx.c: ri->iri_flowid = le32toh(rcp->rss_hash); > bnxt/bnxt_txrx.c: ri->iri_flowid = le32toh(tpas->low.rss_hash); > e1000/em_txrx.c: ri->iri_flowid = le32toh(rxd->wb.lower.hi_dword.rss); > e1000/igb_txrx.c: ri->iri_flowid = > ixgbe/ix_txrx.c: ri->iri_flowid = le32toh(rxd->wb.lower.hi_dword.rss); > > The number of drivers that set m_pkhhdr.flowid directly to an RSS hash looks > to be: > > cxgb > cxgbe > mlx4 > mlx5 > qlnx > qlxgbe > qlxge > vmxnet3 > > Maybe the hardware doesn’t do a great job with generating a useful RSS hash, > but that’s tangential to this conversation. > >> We should change flowid_shift default to 0 for if_lagg(4), shouldn't we? >> > In the short term, yes. What I see is that it’s too expensive to do a hash calculation > on every TX packet in LACP (for anything resembling line rate), and flowid is unreliable > when a connection is initiated without an RX packet triggering it. I don’t understand > the consequences of the TX initiation problem well enough to offer a solution. For the > problem of flowid being used inconsistently by drivers (i.e. not populating all 32 bits > or using a weak RSS), that’s really a driver problem. > > What I’d recommend is that the LACP code check for M_HASHTYPE_NONE and > M_HASHTYPE_OPAQUE and calculate a new hash if either are set (effectively > ignoring the flowid). It’s then up to the drivers to set the correct hash type that > corresponds with what they’re putting into the flowid field. An opaque type would > mean that the value is useful to the driver but should not be considered useful > anywhere else. You’ll get more correct and less surprising behavior from that, at > the penalty of every TX packet requiring a hash calculation for hardware/drivers > that are crummy. Mixing the hash methods causes problems with out of order packets even just for the first packet, and using a hash which is not what's configured by lagghash is confusing at best so that could be fixed to say "flowid" if that's whats going to happen or perhaps update it to the hash type that flowid represents if that's possible. LACP already checks for M_HASHTYPE_NONE if use_flowid is enabled and manually calculates a hash, which is what leads the the first packet port selection inconsistency. It's not clear what all the implications of the first packet port inconsistency is, it will likely be dependent a large number of factors including network hardware, layout and dest host + config., but when we've seen this in the 3 and 4 packet of a stream it leads to the destination sending RST, dropping the stream on the floor for 2% of all streams on our test box with 2 x ixgbe interfaces. Questions: 1. Is it possible to determine the hash method used by the HW and use that for all first packets? 2. Is it possible to significantly improve the performance the CPU hashing? 3. Is it possible to tell from the mbuf that its part of a connection instigated from the current host?     Regards     Steve From owner-svn-src-head@freebsd.org Sat Jan 6 03:41:36 2018 Return-Path: Delivered-To: svn-src-head@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 6ED2FEB61C8; Sat, 6 Jan 2018 03:41:36 +0000 (UTC) (envelope-from jkim@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4898F701A2; Sat, 6 Jan 2018 03:41:36 +0000 (UTC) (envelope-from jkim@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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 7BFBAA0AF; Sat, 6 Jan 2018 03:41:35 +0000 (UTC) (envelope-from jkim@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w063fZMI054260; Sat, 6 Jan 2018 03:41:35 GMT (envelope-from jkim@FreeBSD.org) Received: (from jkim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w063fZ2k054258; Sat, 6 Jan 2018 03:41:35 GMT (envelope-from jkim@FreeBSD.org) Message-Id: <201801060341.w063fZ2k054258@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jkim set sender to jkim@FreeBSD.org using -f From: Jung-uk Kim Date: Sat, 6 Jan 2018 03:41:35 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r327607 - in head/sys/contrib/dev/acpica: . common X-SVN-Group: head X-SVN-Commit-Author: jkim X-SVN-Commit-Paths: in head/sys/contrib/dev/acpica: . common X-SVN-Commit-Revision: 327607 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 06 Jan 2018 03:41:36 -0000 Author: jkim Date: Sat Jan 6 03:41:35 2018 New Revision: 327607 URL: https://svnweb.freebsd.org/changeset/base/327607 Log: Fix a header inclusion missed in the previous commit. Reported by: Michael Butler (imb at protected-networks dot net) Modified: head/sys/contrib/dev/acpica/acpica_prep.sh head/sys/contrib/dev/acpica/common/dmtbinfo.c Modified: head/sys/contrib/dev/acpica/acpica_prep.sh ============================================================================== --- head/sys/contrib/dev/acpica/acpica_prep.sh Fri Jan 5 23:50:50 2018 (r327606) +++ head/sys/contrib/dev/acpica/acpica_prep.sh Sat Jan 6 03:41:35 2018 (r327607) @@ -31,10 +31,10 @@ src_headers="acapps.h acbuffer.h acclib.h accommon.h a acexcep.h acglobal.h achware.h acinterp.h aclocal.h acmacros.h \ acnames.h acnamesp.h acobject.h acopcode.h acoutput.h \ acparser.h acpi.h acpiosxf.h acpixf.h acpredef.h acresrc.h \ - acrestyp.h acstruct.h actables.h actbl.h actbl1.h actbl2.h \ - actbl3.h actypes.h acutils.h acuuid.h amlcode.h amlresrc.h \ - platform/acenv.h platform/acenvex.h platform/acfreebsd.h \ - platform/acgcc.h" + acrestyp.h acstruct.h actables.h actbinfo.h actbl.h actbl1.h \ + actbl2.h actbl3.h actypes.h acutils.h acuuid.h amlcode.h \ + amlresrc.h platform/acenv.h platform/acenvex.h \ + platform/acfreebsd.h platform/acgcc.h" comp_headers="aslcompiler.h asldefine.h aslglobal.h aslmessages.h \ aslsupport.l asltypes.h dtcompiler.h dttemplate.h preprocess.h" platform_headers="acfreebsd.h acgcc.h" Modified: head/sys/contrib/dev/acpica/common/dmtbinfo.c ============================================================================== --- head/sys/contrib/dev/acpica/common/dmtbinfo.c Fri Jan 5 23:50:50 2018 (r327606) +++ head/sys/contrib/dev/acpica/common/dmtbinfo.c Sat Jan 6 03:41:35 2018 (r327607) @@ -152,7 +152,7 @@ #include #include #include -#include "actbinfo.h" +#include /* This module used for application-level code only */ From owner-svn-src-head@freebsd.org Sat Jan 6 06:00:41 2018 Return-Path: Delivered-To: svn-src-head@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 A34B0EC01FA; Sat, 6 Jan 2018 06:00:41 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 7FA58768EF; Sat, 6 Jan 2018 06:00:41 +0000 (UTC) (envelope-from imp@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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id A9946B7BF; Sat, 6 Jan 2018 06:00:40 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w0660ebE013528; Sat, 6 Jan 2018 06:00:40 GMT (envelope-from imp@FreeBSD.org) Received: (from imp@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w0660eBF013527; Sat, 6 Jan 2018 06:00:40 GMT (envelope-from imp@FreeBSD.org) Message-Id: <201801060600.w0660eBF013527@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: imp set sender to imp@FreeBSD.org using -f From: Warner Losh Date: Sat, 6 Jan 2018 06:00:40 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r327611 - head/usr.sbin/efibootmgr X-SVN-Group: head X-SVN-Commit-Author: imp X-SVN-Commit-Paths: head/usr.sbin/efibootmgr X-SVN-Commit-Revision: 327611 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 06 Jan 2018 06:00:41 -0000 Author: imp Date: Sat Jan 6 06:00:40 2018 New Revision: 327611 URL: https://svnweb.freebsd.org/changeset/base/327611 Log: There's no need / benefit from deleting the variable before we set it. Sponsored by: Netflix Modified: head/usr.sbin/efibootmgr/efibootmgr.c Modified: head/usr.sbin/efibootmgr/efibootmgr.c ============================================================================== --- head/usr.sbin/efibootmgr/efibootmgr.c Sat Jan 6 06:00:34 2018 (r327610) +++ head/usr.sbin/efibootmgr/efibootmgr.c Sat Jan 6 06:00:40 2018 (r327611) @@ -164,7 +164,6 @@ static int set_bootvar(const char *name, uint8_t *data, size_t size) { - efi_del_variable(EFI_GLOBAL_GUID, name); return efi_set_variable(EFI_GLOBAL_GUID, name, data, size, COMMON_ATTRS); } From owner-svn-src-head@freebsd.org Sat Jan 6 06:00:47 2018 Return-Path: Delivered-To: svn-src-head@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 47E68EC0214; Sat, 6 Jan 2018 06:00:47 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 0514E76A69; Sat, 6 Jan 2018 06:00:47 +0000 (UTC) (envelope-from imp@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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 2DD36B7C9; Sat, 6 Jan 2018 06:00:46 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w0660kG1015157; Sat, 6 Jan 2018 06:00:46 GMT (envelope-from imp@FreeBSD.org) Received: (from imp@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w0660j2d014536; Sat, 6 Jan 2018 06:00:45 GMT (envelope-from imp@FreeBSD.org) Message-Id: <201801060600.w0660j2d014536@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: imp set sender to imp@FreeBSD.org using -f From: Warner Losh Date: Sat, 6 Jan 2018 06:00:45 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r327612 - in head/stand/i386: libfirewire libi386 X-SVN-Group: head X-SVN-Commit-Author: imp X-SVN-Commit-Paths: in head/stand/i386: libfirewire libi386 X-SVN-Commit-Revision: 327612 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 06 Jan 2018 06:00:47 -0000 Author: imp Date: Sat Jan 6 06:00:45 2018 New Revision: 327612 URL: https://svnweb.freebsd.org/changeset/base/327612 Log: Invent new #defines for the biospci_{read,write}_config function to specify the width and use them everywhere. Sponsored by: Netflix Modified: head/stand/i386/libfirewire/firewire.c head/stand/i386/libi386/biospci.c head/stand/i386/libi386/comconsole.c head/stand/i386/libi386/libi386.h Modified: head/stand/i386/libfirewire/firewire.c ============================================================================== --- head/stand/i386/libfirewire/firewire.c Sat Jan 6 06:00:40 2018 (r327611) +++ head/stand/i386/libfirewire/firewire.c Sat Jan 6 06:00:45 2018 (r327612) @@ -108,11 +108,11 @@ fw_probe(int index, struct fwohci_softc *sc) biospci_write_config(sc->locator, 0x4 /* command */, 0x6 /* enable bus master and memory mapped I/O */, - 1 /* word */); + BIOSPCI_16BITS); - biospci_read_config(sc->locator, 0x00 /*devid*/, 2 /*dword*/, + biospci_read_config(sc->locator, 0x00 /*devid*/, BIOSPCI_32BITS, &sc->devid); - biospci_read_config(sc->locator, 0x10 /*base_addr*/, 2 /*dword*/, + biospci_read_config(sc->locator, 0x10 /*base_addr*/, BIOSPCI_32BITS, &sc->base_addr); sc->handle = (uint32_t)PTOV(sc->base_addr); Modified: head/stand/i386/libi386/biospci.c ============================================================================== --- head/stand/i386/libi386/biospci.c Sat Jan 6 06:00:40 2018 (r327611) +++ head/stand/i386/libi386/biospci.c Sat Jan 6 06:00:45 2018 (r327612) @@ -285,7 +285,7 @@ biospci_enumerate(void) break; /* Read the device identifier from the nominated device */ - err = biospci_read_config(locator, 0, 2, &devid); + err = biospci_read_config(locator, 0, BIOSPCI_32BITS, &devid); if (err != 0) break; Modified: head/stand/i386/libi386/comconsole.c ============================================================================== --- head/stand/i386/libi386/comconsole.c Sat Jan 6 06:00:40 2018 (r327611) +++ head/stand/i386/libi386/comconsole.c Sat Jan 6 06:00:45 2018 (r327612) @@ -263,7 +263,7 @@ comc_pcidev_handle(uint32_t locator) uint32_t port; if (biospci_read_config(locator & 0xffff, - (locator & 0xff0000) >> 16, 2, &port) == -1) { + (locator & 0xff0000) >> 16, BIOSPCI_32BITS, &port) == -1) { printf("Cannot read bar at 0x%x\n", locator); return (CMD_ERROR); } Modified: head/stand/i386/libi386/libi386.h ============================================================================== --- head/stand/i386/libi386/libi386.h Sat Jan 6 06:00:40 2018 (r327611) +++ head/stand/i386/libi386/libi386.h Sat Jan 6 06:00:45 2018 (r327612) @@ -135,6 +135,13 @@ extern vm_offset_t memtop_copyin; /* memtop less heap extern uint32_t high_heap_size; /* extended memory region available */ extern vm_offset_t high_heap_base; /* for use as the heap */ +/* + * Values for width parameter to biospci_{read,write}_config + */ +#define BIOSPCI_8BITS 0 +#define BIOSPCI_16BITS 1 +#define BIOSPCI_32BITS 2 + void biospci_detect(void); int biospci_find_devclass(uint32_t class, int index, uint32_t *locator); int biospci_read_config(uint32_t locator, int offset, int width, uint32_t *val); From owner-svn-src-head@freebsd.org Sat Jan 6 06:00:36 2018 Return-Path: Delivered-To: svn-src-head@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 485B0EC01ED; Sat, 6 Jan 2018 06:00:36 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 22C4D768DA; Sat, 6 Jan 2018 06:00:36 +0000 (UTC) (envelope-from imp@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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4DA3BB7B9; Sat, 6 Jan 2018 06:00:35 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w0660Z8H013477; Sat, 6 Jan 2018 06:00:35 GMT (envelope-from imp@FreeBSD.org) Received: (from imp@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w0660ZkK013476; Sat, 6 Jan 2018 06:00:35 GMT (envelope-from imp@FreeBSD.org) Message-Id: <201801060600.w0660ZkK013476@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: imp set sender to imp@FreeBSD.org using -f From: Warner Losh Date: Sat, 6 Jan 2018 06:00:35 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r327610 - head/usr.sbin/efibootmgr X-SVN-Group: head X-SVN-Commit-Author: imp X-SVN-Commit-Paths: head/usr.sbin/efibootmgr X-SVN-Commit-Revision: 327610 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 06 Jan 2018 06:00:36 -0000 Author: imp Date: Sat Jan 6 06:00:34 2018 New Revision: 327610 URL: https://svnweb.freebsd.org/changeset/base/327610 Log: Fix usage strings. -d and -p were removed before this was committed to FreeBSD, but the strings weren't updated. Sponsored by: Netflix Modified: head/usr.sbin/efibootmgr/efibootmgr.c Modified: head/usr.sbin/efibootmgr/efibootmgr.c ============================================================================== --- head/usr.sbin/efibootmgr/efibootmgr.c Sat Jan 6 05:00:36 2018 (r327609) +++ head/usr.sbin/efibootmgr/efibootmgr.c Sat Jan 6 06:00:34 2018 (r327610) @@ -171,11 +171,11 @@ set_bootvar(const char *name, uint8_t *data, size_t si #define USAGE \ - " [-aAnNB Bootvar] [-t timeout] [-T] [-o bootorder] [-O] [--verbose] [--help] \n \ - [-c -d device -p partition -l loader [-L label] [--dry-run]]" + " [-aAnNB Bootvar] [-t timeout] [-T] [-o bootorder] [-O] [--verbose] [--help] \n\ + [-c -l loader [-k kernel ] [-L label] [--dry-run]]" #define CREATE_USAGE \ - " efibootmgr -c -d device -p partition -loader loader [-L label ] [--dry-run]" + " efibootmgr -c -l loader [-k kernel] [-L label] [--dry-run]" #define ORDER_USAGE \ " efibootmgr -o bootvarnum1,bootvarnum2,..." #define TIMEOUT_USAGE \ From owner-svn-src-head@freebsd.org Sat Jan 6 07:02:25 2018 Return-Path: Delivered-To: svn-src-head@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 BEA55EC490B; Sat, 6 Jan 2018 07:02:25 +0000 (UTC) (envelope-from eadler@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 998FC7950D; Sat, 6 Jan 2018 07:02:25 +0000 (UTC) (envelope-from eadler@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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id EBA51C380; Sat, 6 Jan 2018 07:02:24 +0000 (UTC) (envelope-from eadler@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w0672OYk042507; Sat, 6 Jan 2018 07:02:24 GMT (envelope-from eadler@FreeBSD.org) Received: (from eadler@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w0672Osg042505; Sat, 6 Jan 2018 07:02:24 GMT (envelope-from eadler@FreeBSD.org) Message-Id: <201801060702.w0672Osg042505@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: eadler set sender to eadler@FreeBSD.org using -f From: Eitan Adler Date: Sat, 6 Jan 2018 07:02:24 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r327614 - head/usr.bin/morse X-SVN-Group: head X-SVN-Commit-Author: eadler X-SVN-Commit-Paths: head/usr.bin/morse X-SVN-Commit-Revision: 327614 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 06 Jan 2018 07:02:25 -0000 Author: eadler Date: Sat Jan 6 07:02:24 2018 New Revision: 327614 URL: https://svnweb.freebsd.org/changeset/base/327614 Log: morse(6): implement support for decoding morse code - Use `-r` for "reverse" mode and to match DragonFlyBSD. - Move defines around to clear up logic - use `errx` instead of `fprintf` and `exit` PR: 35109 Submitted By: philipp.mergenthaler@stud.uni-karlsruhe.de Submitted on: 2002-02-19 Reviewed by: kevans Modified: head/usr.bin/morse/morse.6 head/usr.bin/morse/morse.c Modified: head/usr.bin/morse/morse.6 ============================================================================== --- head/usr.bin/morse/morse.6 Sat Jan 6 06:34:49 2018 (r327613) +++ head/usr.bin/morse/morse.6 Sat Jan 6 07:02:24 2018 (r327614) @@ -92,6 +92,11 @@ Echo each character before it is sent, used together w .Fl p or .Fl d . +.It Fl D +Decode morse output consisting of dots and dashes (as generated by using +the +.Fl s +option). .El .Pp The Modified: head/usr.bin/morse/morse.c ============================================================================== --- head/usr.bin/morse/morse.c Sat Jan 6 06:34:49 2018 (r327613) +++ head/usr.bin/morse/morse.c Sat Jan 6 07:02:24 2018 (r327614) @@ -46,6 +46,7 @@ static const char rcsid[] = #include #include +#include #include #include #include @@ -59,6 +60,9 @@ static const char rcsid[] = /* Always use the speaker, let the open fail if -p is selected */ #define SPEAKER "/dev/speaker" +#define WHITESPACE " \t\n" +#define DELIMITERS " \t" + #ifdef SPEAKER #include #endif @@ -267,14 +271,11 @@ static const struct morsetab koi8rtab[] = { }; static void show(const char *), play(const char *), morse(char); +static void decode (char *), fdecode(FILE *); static void ttyout(const char *); static void sighandler(int); -#define GETOPTOPTS "c:d:ef:lsw:" -#define USAGE \ -"usage: morse [-els] [-d device] [-w speed] [-c speed] [-f frequency] [string ...]\n" - -static int pflag, lflag, sflag, eflag; +static int pflag, lflag, rflag, sflag, eflag; static int wpm = 20; /* effective words per minute */ static int cpm; /* effective words per minute between * characters */ @@ -293,11 +294,14 @@ static int olflags; #ifdef SPEAKER static tone_t sound; -#undef GETOPTOPTS -#define GETOPTOPTS "c:d:ef:lpsw:" -#undef USAGE +#define GETOPTOPTS "c:d:ef:lprsw:" #define USAGE \ -"usage: morse [-elps] [-d device] [-w speed] [-c speed] [-f frequency] [string ...]\n" +"usage: morse [-elprs] [-d device] [-w speed] [-c speed] [-f frequency] [string ...]\n" +#else +#define GETOPTOPTS "c:d:ef:lrsw:" +#define USAGE \ +"usage: morse [-elrs] [-d device] [-w speed] [-c speed] [-f frequency] [string ...]\n" + #endif static const struct morsetab *hightab; @@ -331,6 +335,9 @@ main(int argc, char **argv) pflag = 1; break; #endif + case 'r': + rflag = 1; + break; case 's': sflag = 1; break; @@ -339,42 +346,36 @@ main(int argc, char **argv) break; case '?': default: - fputs(USAGE, stderr); - exit(1); + errx(1, USAGE); } - if (sflag && lflag) { - fputs("morse: only one of -l and -s allowed\n", stderr); - exit(1); + if ((sflag && lflag) || (sflag && rflag) || (lflag && rflag)) { + errx(1, "morse: only one of -l, -s, and -r allowed\n"); } if ((pflag || device) && (sflag || lflag)) { - fputs("morse: only one of -p, -d and -l, -s allowed\n", stderr); - exit(1); + errx(1, "morse: only one of -p, -d and -l, -s allowed\n"); } - if (cpm == 0) + if (cpm == 0) { cpm = wpm; + } if ((pflag || device) && ((wpm < 1) || (wpm > 60) || (cpm < 1) || (cpm > 60))) { - fputs("morse: insane speed\n", stderr); - exit(1); + errx(1, "morse: insane speed\n"); } - if ((pflag || device) && (freq == 0)) + if ((pflag || device) && (freq == 0)) { freq = FREQUENCY; - + } #ifdef SPEAKER if (pflag) { if ((spkr = open(SPEAKER, O_WRONLY, 0)) == -1) { - perror(SPEAKER); - exit(1); + err(1, SPEAKER); } } else #endif if (device) { if ((line = open(device, O_WRONLY | O_NONBLOCK)) == -1) { - perror("open tty line"); - exit(1); + err(1, "open tty line"); } if (tcgetattr(line, &otty) == -1) { - perror("tcgetattr() failed"); - exit(1); + err(1, "tcgetattr() failed"); } ntty = otty; ntty.c_cflag |= CLOCAL; @@ -419,9 +420,29 @@ main(int argc, char **argv) hightab = iso8859_7tab; } - if (lflag) + if (lflag) { printf("m"); - if (*argv) { + } + if (rflag) { + if (*argv) { + do { + p = strtok(*argv, DELIMITERS); + if (p == NULL) { + decode(*argv); + } + else { + while (p) { + decode(p); + p = strtok(NULL, DELIMITERS); + } + } + } while (*++argv); + putchar('\n'); + } else { + fdecode(stdin); + } + } + else if (*argv) { do { for (p = *argv; *p; ++p) { if (eflag) @@ -518,15 +539,13 @@ play(const char *s) } if (sound.duration) { if (ioctl(spkr, SPKRTONE, &sound) == -1) { - perror("ioctl play"); - exit(1); + err(1, "ioctl play"); } } sound.frequency = 0; sound.duration = dot_clock; if (ioctl(spkr, SPKRTONE, &sound) == -1) { - perror("ioctl rest"); - exit(1); + err(1, "ioctl rest"); } } sound.frequency = 0; @@ -575,6 +594,68 @@ ttyout(const char *s) } duration = cdot_clock * CHAR_SPACE * 10000; usleep(duration); +} + +void +fdecode(FILE *stream) +{ + char *n, *p, *s; + char buf[BUFSIZ]; + + s = buf; + while (fgets(s, BUFSIZ - (s - buf), stdin)) { + p = buf; + + while (*p && isblank(*p)) { + p++; + } + while (*p && isspace(*p)) { + p++; + putchar (' '); + } + while (*p) { + n = strpbrk(p, WHITESPACE); + if (n == NULL) { + /* The token was interrupted at the end + * of the buffer. Shift it to the begin + * of the buffer. + */ + for (s = buf; *p; *s++ = *p++) + ; + } else { + *n = '\0'; + n++; + decode(p); + p = n; + } + } + } + putchar('\n'); +} + +void +decode(char *p) +{ + char c; + const struct morsetab *m; + + c = ' '; + for (m = mtab; m != NULL && m->inchar != '\0'; m++) { + if (strcmp(m->morse, p) == 0) { + c = m->inchar; + break; + } + } + + if (c == ' ') + for (m = hightab; m != NULL && m->inchar != '\0'; m++) { + if (strcmp(m->morse, p) == 0) { + c = m->inchar; + break; + } + } + + putchar(c); } static void From owner-svn-src-head@freebsd.org Sat Jan 6 07:05:10 2018 Return-Path: Delivered-To: svn-src-head@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 47945EC4B24 for ; Sat, 6 Jan 2018 07:05:10 +0000 (UTC) (envelope-from lists@eitanadler.com) Received: from mail-yb0-x230.google.com (mail-yb0-x230.google.com [IPv6:2607:f8b0:4002:c09::230]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 00E9E797FB for ; Sat, 6 Jan 2018 07:05:09 +0000 (UTC) (envelope-from lists@eitanadler.com) Received: by mail-yb0-x230.google.com with SMTP id u17so223829ybm.6 for ; Fri, 05 Jan 2018 23:05:09 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=eitanadler.com; s=0xdeadbeef; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to; bh=xAORx7Vs3Ocx+LfBX2yns12Zz+s/BzeutBEOpaIpUWA=; b=NYMMrOqQMTGQ0OhIRh0t7VrERL/W6aWGMjpUKUBy5N+ku0ENAq24LLGDU4muBaA5ig 2dzwKurQxpc6EDVxcZot2l2rgvTqkoPOrKXJeMq1WLhPtsADxV100ec0E8PQQ+SmBXqv yEUPMGlgmPU7l0jTeycwc6eabGOpsGIrhpm5w= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd-org.20150623.gappssmtp.com; s=20150623; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to; bh=xAORx7Vs3Ocx+LfBX2yns12Zz+s/BzeutBEOpaIpUWA=; b=k61vDKVTVPkFmou5KlHlXacK8gS2rLZk4XQBjuY322cTIDwW8jStukzia2CoheZ56n pMC0F0xLB2Ue7yiEsGsdyD05mbYVwx3LKVSrr6XgPKCABzh9Sg0t4G8u8FbQpODIDh9z /0rXKEAB5n6nr6QgccCov3DfJ8gKqtZlLNZVRIw8x7Wcr6aBCdRatlabN2UDVtvy5xju mJBZkTsbn8nCC9Vs3ziLc03cb+Hz4uz1q7ZmeBxb6Sh/W0zMIz9znwQUg+VzpaMgY3z+ 7yiMScYUp1aAFvcrABNs40pr7c662q0CK97VJvUtrnKT4p9v+wio4n9Jqkm48IWJ8nZI wZOg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:sender:in-reply-to:references:from :date:message-id:subject:to; bh=xAORx7Vs3Ocx+LfBX2yns12Zz+s/BzeutBEOpaIpUWA=; b=qWqERmNdTwpCpptn3Jkq2LsAo5I05G8zWLcFrAd871sVS296lUotD+0PhY2bwykwiN 8h/R51Mz3H3w8Vw5A9xjjis4Zpf/I/m21o51PAawuErvCunfaUB5aFslyGLT+51sVpr7 MaauMkz9dYhiqGJUu9QlqpBHVIdG2VvwiTD3HryISMcbO9mywLk49D1FgMirHfrIN2jG BBHs346yvI8v5RCOEBUClsOmJsM3ovWXfMFIgdYSbrS11cOCzBqQtAAQfF4djI7lBPZO mS0P3rlen3/IxqIcb7Nr2iXurBP4U3AaCPXROy2lKqNIB3WBrF9mYLyx64+W5IFCsOFA zcLA== X-Gm-Message-State: AKGB3mIbHSRGaKR7vR8Vo71ByySCXViiVclJDCsg2uM6KDClc/+UWpt8 vAopdzkVG9HWj7l7lHDDOv0cw6JWfl+7X8c7ol8rtA== X-Google-Smtp-Source: ACJfBos2WMww7MldNRMmrZkk/oWlwhpPl94BKtV4vJIDlMHvcwCoKIpCLhv/DnHkvdnmkWL4Y+VTKKa8PKMfW8P2GUE= X-Received: by 10.37.38.202 with SMTP id m193mr212577ybm.97.1515222308717; Fri, 05 Jan 2018 23:05:08 -0800 (PST) MIME-Version: 1.0 Sender: lists@eitanadler.com Received: by 10.37.217.21 with HTTP; Fri, 5 Jan 2018 23:04:38 -0800 (PST) In-Reply-To: <201801060702.w0672Osg042505@repo.freebsd.org> References: <201801060702.w0672Osg042505@repo.freebsd.org> From: Eitan Adler Date: Fri, 5 Jan 2018 23:04:38 -0800 X-Google-Sender-Auth: 9IXU_a_qrpmwiuV4qznuj3XAMhY Message-ID: Subject: Re: svn commit: r327614 - head/usr.bin/morse To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Content-Type: text/plain; charset="UTF-8" X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 06 Jan 2018 07:05:10 -0000 On 5 January 2018 at 23:02, Eitan Adler wrote: > Author: eadler > Date: Sat Jan 6 07:02:24 2018 > New Revision: 327614 > URL: https://svnweb.freebsd.org/changeset/base/327614 > > Log: > morse(6): implement support for decoding morse code > > - Use `-r` for "reverse" mode and to match DragonFlyBSD. > - Move defines around to clear up logic > - use `errx` instead of `fprintf` and `exit` > > PR: 35109 > Submitted By: philipp.mergenthaler@stud.uni-karlsruhe.de > Submitted on: 2002-02-19 > Reviewed by: kevans Differential Revision: https://reviews.freebsd.org/D13757 -- Eitan Adler Source, Ports, Doc committer Bugmeister, Ports Security teams From owner-svn-src-head@freebsd.org Sat Jan 6 07:48:18 2018 Return-Path: Delivered-To: svn-src-head@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 96EE2EC669E; Sat, 6 Jan 2018 07:48:18 +0000 (UTC) (envelope-from eadler@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 726127AE06; Sat, 6 Jan 2018 07:48:18 +0000 (UTC) (envelope-from eadler@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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id B3473F8C6; Sat, 6 Jan 2018 07:48:17 +0000 (UTC) (envelope-from eadler@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w067mHp3059226; Sat, 6 Jan 2018 07:48:17 GMT (envelope-from eadler@FreeBSD.org) Received: (from eadler@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w067mH17059225; Sat, 6 Jan 2018 07:48:17 GMT (envelope-from eadler@FreeBSD.org) Message-Id: <201801060748.w067mH17059225@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: eadler set sender to eadler@FreeBSD.org using -f From: Eitan Adler Date: Sat, 6 Jan 2018 07:48:17 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r327615 - head/usr.bin/morse X-SVN-Group: head X-SVN-Commit-Author: eadler X-SVN-Commit-Paths: head/usr.bin/morse X-SVN-Commit-Revision: 327615 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 06 Jan 2018 07:48:18 -0000 Author: eadler Date: Sat Jan 6 07:48:17 2018 New Revision: 327615 URL: https://svnweb.freebsd.org/changeset/base/327615 Log: morse(6): minor nits - Use copyright comment header - Make it easier to compile on !FreeBSD - Diff reduction against DragonFlyBSD Modified: head/usr.bin/morse/morse.c Modified: head/usr.bin/morse/morse.c ============================================================================== --- head/usr.bin/morse/morse.c Sat Jan 6 07:02:24 2018 (r327614) +++ head/usr.bin/morse/morse.c Sat Jan 6 07:48:17 2018 (r327615) @@ -1,4 +1,4 @@ -/* +/*- * Copyright (c) 1988, 1993 * The Regents of the University of California. All rights reserved. * @@ -57,8 +57,10 @@ static const char rcsid[] = #include #include +#ifdef __FreeBSD__ /* Always use the speaker, let the open fail if -p is selected */ #define SPEAKER "/dev/speaker" +#endif #define WHITESPACE " \t\n" #define DELIMITERS " \t" @@ -307,7 +309,7 @@ static tone_t sound; static const struct morsetab *hightab; int -main(int argc, char **argv) +main(int argc, char *argv[]) { int ch, lflags; char *p, *codeset; From owner-svn-src-head@freebsd.org Sat Jan 6 09:48:05 2018 Return-Path: Delivered-To: svn-src-head@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 D195AEA5AC5; Sat, 6 Jan 2018 09:48:05 +0000 (UTC) (envelope-from lwhsu@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id ACD527F190; Sat, 6 Jan 2018 09:48:05 +0000 (UTC) (envelope-from lwhsu@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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id DDFA910B84; Sat, 6 Jan 2018 09:48:04 +0000 (UTC) (envelope-from lwhsu@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w069m4LM058365; Sat, 6 Jan 2018 09:48:04 GMT (envelope-from lwhsu@FreeBSD.org) Received: (from lwhsu@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w069m4Rb058364; Sat, 6 Jan 2018 09:48:04 GMT (envelope-from lwhsu@FreeBSD.org) Message-Id: <201801060948.w069m4Rb058364@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: lwhsu set sender to lwhsu@FreeBSD.org using -f From: Li-Wen Hsu Date: Sat, 6 Jan 2018 09:48:04 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r327616 - head/usr.bin/morse X-SVN-Group: head X-SVN-Commit-Author: lwhsu X-SVN-Commit-Paths: head/usr.bin/morse X-SVN-Commit-Revision: 327616 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 06 Jan 2018 09:48:05 -0000 Author: lwhsu (ports committer) Date: Sat Jan 6 09:48:04 2018 New Revision: 327616 URL: https://svnweb.freebsd.org/changeset/base/327616 Log: Unbreak build after r327614 Approved by: mjg (on IRC) Differential Revision: https://reviews.freebsd.org/D13782 Modified: head/usr.bin/morse/morse.c Modified: head/usr.bin/morse/morse.c ============================================================================== --- head/usr.bin/morse/morse.c Sat Jan 6 07:48:17 2018 (r327615) +++ head/usr.bin/morse/morse.c Sat Jan 6 09:48:04 2018 (r327616) @@ -605,7 +605,7 @@ fdecode(FILE *stream) char buf[BUFSIZ]; s = buf; - while (fgets(s, BUFSIZ - (s - buf), stdin)) { + while (fgets(s, BUFSIZ - (s - buf), stream)) { p = buf; while (*p && isblank(*p)) { From owner-svn-src-head@freebsd.org Sat Jan 6 12:34:05 2018 Return-Path: Delivered-To: svn-src-head@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 27CBFEB7639; Sat, 6 Jan 2018 12:34:05 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 035086BF1E; Sat, 6 Jan 2018 12:34:05 +0000 (UTC) (envelope-from imp@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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4465A12778; Sat, 6 Jan 2018 12:34:04 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w06CY4J0029143; Sat, 6 Jan 2018 12:34:04 GMT (envelope-from imp@FreeBSD.org) Received: (from imp@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w06CY4D8029142; Sat, 6 Jan 2018 12:34:04 GMT (envelope-from imp@FreeBSD.org) Message-Id: <201801061234.w06CY4D8029142@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: imp set sender to imp@FreeBSD.org using -f From: Warner Losh Date: Sat, 6 Jan 2018 12:34:04 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r327617 - head/usr.sbin/diskinfo X-SVN-Group: head X-SVN-Commit-Author: imp X-SVN-Commit-Paths: head/usr.sbin/diskinfo X-SVN-Commit-Revision: 327617 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 06 Jan 2018 12:34:05 -0000 Author: imp Date: Sat Jan 6 12:34:03 2018 New Revision: 327617 URL: https://svnweb.freebsd.org/changeset/base/327617 Log: Sanity check media size and sector counts to ensure that we don't produce negative sector numbers in the testing algorithm. CID: 1198994 Modified: head/usr.sbin/diskinfo/diskinfo.c Modified: head/usr.sbin/diskinfo/diskinfo.c ============================================================================== --- head/usr.sbin/diskinfo/diskinfo.c Sat Jan 6 09:48:04 2018 (r327616) +++ head/usr.sbin/diskinfo/diskinfo.c Sat Jan 6 12:34:03 2018 (r327617) @@ -407,9 +407,14 @@ speeddisk(int fd, off_t mediasize, u_int sectorsize) int bulk, i; off_t b0, b1, sectorcount, step; + /* + * Drives smaller than 1MB produce negative sector numbers, + * as do 2048 or fewer sectors. + */ sectorcount = mediasize / sectorsize; - if (sectorcount <= 0) - return; /* Can't test devices with no sectors */ + if (mediasize < 1024 * 1024 || sectorcount < 2048) + return; + step = 1ULL << (flsll(sectorcount / (4 * 200)) - 1); if (step > 16384) From owner-svn-src-head@freebsd.org Sat Jan 6 12:46:00 2018 Return-Path: Delivered-To: svn-src-head@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 8C06AEB7D5C; Sat, 6 Jan 2018 12:46:00 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 65DA56C501; Sat, 6 Jan 2018 12:46:00 +0000 (UTC) (envelope-from imp@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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 90A4B12920; Sat, 6 Jan 2018 12:45:59 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w06CjxNc033496; Sat, 6 Jan 2018 12:45:59 GMT (envelope-from imp@FreeBSD.org) Received: (from imp@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w06Cjxmx033495; Sat, 6 Jan 2018 12:45:59 GMT (envelope-from imp@FreeBSD.org) Message-Id: <201801061245.w06Cjxmx033495@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: imp set sender to imp@FreeBSD.org using -f From: Warner Losh Date: Sat, 6 Jan 2018 12:45:59 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r327618 - head/bin/cat X-SVN-Group: head X-SVN-Commit-Author: imp X-SVN-Commit-Paths: head/bin/cat X-SVN-Commit-Revision: 327618 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 06 Jan 2018 12:46:00 -0000 Author: imp Date: Sat Jan 6 12:45:59 2018 New Revision: 327618 URL: https://svnweb.freebsd.org/changeset/base/327618 Log: Sanity check sysconf return value to ensure it's positive before we use it. Use proper cast to convert long to size_t (instead of blksize_t) to preclude sign extension issues. CID: 1193754 Modified: head/bin/cat/cat.c Modified: head/bin/cat/cat.c ============================================================================== --- head/bin/cat/cat.c Sat Jan 6 12:34:03 2018 (r327617) +++ head/bin/cat/cat.c Sat Jan 6 12:45:59 2018 (r327618) @@ -300,6 +300,7 @@ ilseq: static void raw_cat(int rfd) { + long pagesize; int off, wfd; ssize_t nr, nw; static size_t bsize; @@ -316,9 +317,12 @@ raw_cat(int rfd) bsize = MIN(BUFSIZE_MAX, MAXPHYS * 8); else bsize = BUFSIZE_SMALL; - } else - bsize = MAX(sbuf.st_blksize, - (blksize_t)sysconf(_SC_PAGESIZE)); + } else { + bsize = sbuf.st_blksize; + pagesize = sysconf(_SC_PAGESIZE); + if (pagesize > 0) + bsize = MAX(bsize, (size_t)pagesize); + } if ((buf = malloc(bsize)) == NULL) err(1, "malloc() failure of IO buffer"); } From owner-svn-src-head@freebsd.org Sat Jan 6 12:46:05 2018 Return-Path: Delivered-To: svn-src-head@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 EFE9EEB7D8E; Sat, 6 Jan 2018 12:46:05 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id C00BE6C51D; Sat, 6 Jan 2018 12:46:05 +0000 (UTC) (envelope-from imp@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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id E09DB12921; Sat, 6 Jan 2018 12:46:04 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w06Ck4f1033554; Sat, 6 Jan 2018 12:46:04 GMT (envelope-from imp@FreeBSD.org) Received: (from imp@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w06Ck4H9033553; Sat, 6 Jan 2018 12:46:04 GMT (envelope-from imp@FreeBSD.org) Message-Id: <201801061246.w06Ck4H9033553@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: imp set sender to imp@FreeBSD.org using -f From: Warner Losh Date: Sat, 6 Jan 2018 12:46:04 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r327619 - head/lib/libc/net X-SVN-Group: head X-SVN-Commit-Author: imp X-SVN-Commit-Paths: head/lib/libc/net X-SVN-Commit-Revision: 327619 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 06 Jan 2018 12:46:06 -0000 Author: imp Date: Sat Jan 6 12:46:04 2018 New Revision: 327619 URL: https://svnweb.freebsd.org/changeset/base/327619 Log: The source strings are from the password database which guarantees that the data going into it is sane. Out of an abundance of caution, limit the string copies to prevent an overflow. CID: 1019035 Modified: head/lib/libc/net/rcmd.c Modified: head/lib/libc/net/rcmd.c ============================================================================== --- head/lib/libc/net/rcmd.c Sat Jan 6 12:45:59 2018 (r327618) +++ head/lib/libc/net/rcmd.c Sat Jan 6 12:46:04 2018 (r327619) @@ -457,8 +457,8 @@ again: first = 0; if ((pwd = getpwnam(luser)) == NULL) return (-1); - (void)strcpy(pbuf, pwd->pw_dir); - (void)strcat(pbuf, "/.rhosts"); + (void)strlcpy(pbuf, pwd->pw_dir, sizeof(pbuf)); + (void)strlcat(pbuf, "/.rhosts", sizeof(pbuf)); /* * Change effective uid while opening .rhosts. If root and From owner-svn-src-head@freebsd.org Sat Jan 6 13:20:23 2018 Return-Path: Delivered-To: svn-src-head@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 78492EB8F9F for ; Sat, 6 Jan 2018 13:20:23 +0000 (UTC) (envelope-from lists@eitanadler.com) Received: from mail-yb0-x234.google.com (mail-yb0-x234.google.com [IPv6:2607:f8b0:4002:c09::234]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4A6306D449 for ; Sat, 6 Jan 2018 13:20:23 +0000 (UTC) (envelope-from lists@eitanadler.com) Received: by mail-yb0-x234.google.com with SMTP id 5so2879953ybp.4 for ; Sat, 06 Jan 2018 05:20:23 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=eitanadler.com; s=0xdeadbeef; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc:content-transfer-encoding; bh=42Aj7diKWRc9agWLoYsPjXH+UeP2THbDkMapbdsmKIQ=; b=Y+1US67DH8aHz/s4FayVm0MAFJ/hPIvMXzt0O+xAThi88M7wvYJ1Q+uxnjYOvkMGWB BXFFDE9Fa48mVGXynXNoJXogehRZmGfK96utRaLFd3JLfXuX9ZvequnfvCDgucVT/Krx NZKCsaexK2oWDBUYFOiRPjPmq0cnRIk5EcXu4= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc:content-transfer-encoding; bh=42Aj7diKWRc9agWLoYsPjXH+UeP2THbDkMapbdsmKIQ=; b=Ox9mBrmfxL/2b1VH/mYKfTbEYFq2EZtmIZP8a1fy2v2wXqgi+mACAMpWdzHKrpmQrB 5oCxDEBGXHGtGXVSjMmNw8rfK+bFfxCVm1Eg9TSWBSHgXLhOFEVjEx4I1kE/Dz5Qjg9H 6KVQ00G5FhKUoGXSL8l7BdJvp62GCygoXus95S9Wnz6TMmme9bEvKew25niZgcOH1Eou oXEBK7ayKbG3GJXf93cHsP7QxS1p9GAYo29eJG/0nNDGP052p23ZIooDSBWX4FrpYgEe +6N8ty7i7CZwmiCxgixh8/FfrYLpgeLF2PpItDdVvwAhtLMquwRjUqxPYbsHNrU9kCGY fDIg== X-Gm-Message-State: AKGB3mI5+Q7/RRKdZT8ZBYxtqkkM8ws0jHuvjTbro4H19kqm+n0fUlvl OjYWsllx5EIj9meXPpxyRpo9ifLTzyEU2kummoNSYQ== X-Google-Smtp-Source: ACJfBouqq2J9jwZ0+4yKbDzi0rJLLZ4LOBMFLnyquBw8R+0YGyS4IKvkHOONSoqjONJkBKgrzjdCxu7/c7DdD7r8AKY= X-Received: by 10.37.92.196 with SMTP id q187mr5949595ybb.18.1515244821998; Sat, 06 Jan 2018 05:20:21 -0800 (PST) MIME-Version: 1.0 Received: by 10.37.217.21 with HTTP; Sat, 6 Jan 2018 05:19:51 -0800 (PST) In-Reply-To: <201801060948.w069m4Rb058364@repo.freebsd.org> References: <201801060948.w069m4Rb058364@repo.freebsd.org> From: Eitan Adler Date: Sat, 6 Jan 2018 05:19:51 -0800 Message-ID: Subject: Re: svn commit: r327616 - head/usr.bin/morse To: Li-Wen Hsu Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 06 Jan 2018 13:20:23 -0000 On 6 January 2018 at 01:48, Li-Wen Hsu wrote: > Author: lwhsu (ports committer) > Date: Sat Jan 6 09:48:04 2018 > New Revision: 327616 > URL: https://svnweb.freebsd.org/changeset/base/327616 > > Log: > Unbreak build after r327614 Why is testing with "make obj; make" in the morse directory insufficient? =E2=88=B4make obj; make rm -f .depend echo morse.full: /usr/lib/libc.a >> .depend cc -O2 -pipe -g -MD -MF.depend.morse.o -MTmorse.o -std=3Dgnu99 -fstack-protector-strong -Wsystem-headers -Werror -Wall -Wno-format-y2k -W -Wno-unused-parameter -Wstrict-prototypes -Wmissing-prototypes -Wpointer-arith -Wreturn-type -Wcast-qual -Wwrite-strings -Wswitch -Wshadow -Wunused-parameter -Wcast-align -Wchar-subscripts -Winline -Wnested-externs -Wredundant-decls -Wold-style-definition -Wno-pointer-sign -Wmissing-variable-declarations -Wthread-safety -Wno-empty-body -Wno-string-plus-int -Wno-unused-const-variable -Qunused-arguments -c morse.c -o morse.o cc -O2 -pipe -g -std=3Dgnu99 -fstack-protector-strong -Wsystem-headers -Werror -Wall -Wno-format-y2k -W -Wno-unused-parameter -Wstrict-prototypes -Wmissing-prototypes -Wpointer-arith -Wreturn-type -Wcast-qual -Wwrite-strings -Wswitch -Wshadow -Wunused-parameter -Wcast-align -Wchar-subscripts -Winline -Wnested-externs -Wredundant-decls -Wold-style-definition -Wno-pointer-sign -Wmissing-variable-declarations -Wthread-safety -Wno-empty-body -Wno-string-plus-int -Wno-unused-const-variable -Qunused-arguments -o morse.full morse.o objcopy --only-keep-debug morse.full morse.debug objcopy --strip-debug --add-gnu-debuglink=3Dmorse.debug morse.full morse gzip -cn morse.6 > morse.6.gz --=20 Eitan Adler From owner-svn-src-head@freebsd.org Sat Jan 6 13:23:34 2018 Return-Path: Delivered-To: svn-src-head@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 24842EB92E8; Sat, 6 Jan 2018 13:23:34 +0000 (UTC) (envelope-from tuexen@freebsd.org) Received: from drew.franken.de (drew.ipv6.franken.de [IPv6:2001:638:a02:a001:20e:cff:fe4a:feaa]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "*.franken.de", Issuer "COMODO RSA Domain Validation Secure Server CA" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id C7A046D8F9; Sat, 6 Jan 2018 13:23:33 +0000 (UTC) (envelope-from tuexen@freebsd.org) Received: from [IPv6:2003:cd:6beb:2600:a470:65d3:e324:200f] (p200300CD6BEB2600A47065D3E324200F.dip0.t-ipconnect.de [IPv6:2003:cd:6beb:2600:a470:65d3:e324:200f]) (Authenticated sender: macmic) by mail-n.franken.de (Postfix) with ESMTPSA id 45999721E282E; Sat, 6 Jan 2018 14:23:28 +0100 (CET) Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (Mac OS X Mail 11.2 \(3445.5.20\)) Subject: Re: svn commit: r327563 - in head/sys: arm/allwinner arm/conf arm64/conf conf From: Michael Tuexen In-Reply-To: <201801042237.w04MbFVR015965@repo.freebsd.org> Date: Sat, 6 Jan 2018 14:23:25 +0100 Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org, "freebsd-arm@freebsd.org" Content-Transfer-Encoding: quoted-printable Message-Id: <6F912304-B760-4DA2-AB74-C2C934026FC1@freebsd.org> References: <201801042237.w04MbFVR015965@repo.freebsd.org> To: Kyle Evans X-Mailer: Apple Mail (2.3445.5.20) X-Spam-Status: No, score=-2.9 required=5.0 tests=ALL_TRUSTED,BAYES_00 autolearn=disabled version=3.4.1 X-Spam-Checker-Version: SpamAssassin 3.4.1 (2015-04-28) on mail-n.franken.de X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 06 Jan 2018 13:23:34 -0000 > On 4. Jan 2018, at 23:37, Kyle Evans wrote: >=20 > Author: kevans > Date: Thu Jan 4 22:37:15 2018 > New Revision: 327563 > URL: https://svnweb.freebsd.org/changeset/base/327563 >=20 > Log: > if_awg: Use syscon prop if it exists >=20 > The emac bindings that are landing in Linux 4.15 specify a syscon = property > on the emac node that point to /soc/syscon. Use this property if it's > specified, but maintain backwards compatibility with the old method. >=20 > The older method is still used for boards that we get .dtb from = u-boot, such > as pine64, that did not yet have stable emac bindings. >=20 > Tested on: Banana Pi-M3 (a83t) > Tested on: Pine64 (a64) > Reviewed by: manu > Differential Revision: https://reviews.freebsd.org/D13296 This breaks booting on a RPi3. Please note that it is not only = panic'ing, but there are multiple errors before that. >> FreeBSD EFI boot block Loader path: /boot/loader.efi Initializing modules: UFS Probing 3 block devices.....* done UFS found 1 partition Consoles: EFI console =20 Command line arguments: loader.efi Image base: 0x39ab8008 EFI version: 2.05 EFI Firmware: Das U-boot (rev 0.00) FreeBSD/arm64 EFI loader, Revision 1.1 (Wed Dec 6 19:13:14 CET 2017 root@bsd18.fh-muenster.de) EFI boot environment Loading /boot/defaults/loader.conf /boot/kernel/kernel text=3D0x7f3b28 data=3D0xaac80+0x3a106d = syms=3D[0x8+0x10e870+0x8+0x101345] /boot/entropy size=3D0x1000 /boot/kernel/geom_label.ko text=3D0x2a80 text=3D0x2710 = data=3D0x10118+0xfeec syms=3D[0x8+0x1548+0x8+0xef2] Hit [Enter] to boot immediately, or any other key for command prompt. Booting [/boot/kernel/kernel]... =20 Using DTB provided by EFI at 0x8004000. KDB: debugger backends: ddb KDB: current backend: ddb Copyright (c) 1992-2018 The FreeBSD Project. Copyright (c) 1979, 1980, 1983, 1986, 1988, 1989, 1991, 1992, 1993, 1994 The Regents of the University of California. All rights = reserved. FreeBSD is a registered trademark of The FreeBSD Foundation. FreeBSD 12.0-CURRENT #21 r327563M: Sat Jan 6 14:16:20 CET 2018 = tuexen@bsd10.fh-muenster.de:/usr/home/tuexen/head/sys/arm64/compile/TCP = arm64 FreeBSD clang version 5.0.1 (branches/release_50 319231) (based on LLVM = 5.0.1) VT: init without driver. sysctl_warn_reuse: can't re-use a leaf (kern.features.geom_label)! module_register: cannot register g_label from kernel; already loaded = from geom_label.ko Module g_label failed to register: 17 Starting CPU 1 (1) Starting CPU 2 (2) Starting CPU 3 (3) FreeBSD/SMP: Multiprocessor System Detected: 4 CPUs random: unblocking device. module_register_init: MOD_LOAD (efirt, 0xffff0000000cb414, 0) error 12 random: entropy device external interface kbd0 at kbdmux0 ofwbus0: simplebus0: on ofwbus0 ofw_clkbus0: on ofwbus0 clk_fixed0: on ofw_clkbus0 clk_fixed1: on ofw_clkbus0 regfix0: on ofwbus0 regfix1: on ofwbus0 syscon_generic0: mem 0x40000000-0x400000ff on simplebus0 psci0: on ofwbus0 local_intc0: mem 0x40000000-0x400000ff on = simplebus0 local_intc0: could not allocate memory resource device_attach: local_intc0 attach returned 6 intc0: mem 0x7e00b200-0x7e00b3ff irq 16 = on simplebus0 local_intc0: mem 0x40000000-0x400000ff on = simplebus0 local_intc0: could not allocate memory resource device_attach: local_intc0 attach returned 6 local_intc0: mem 0x40000000-0x400000ff on = simplebus0 local_intc0: could not allocate memory resource device_attach: local_intc0 attach returned 6 local_intc0: mem 0x40000000-0x400000ff on = simplebus0 local_intc0: could not allocate memory resource device_attach: local_intc0 attach returned 6 generic_timer0: irq 47,48,49,50 on simplebus0 generic_timer0: could not allocate resources device_attach: generic_timer0 attach returned 6 bcm_dma0: mem 0x7e007000-0x7e007eff irq = 0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15 on simplebus0 bcmwd0: mem 0x7e100000-0x7e100027 on simplebus0 bcmrng0: mem 0x7e104000-0x7e10400f on simplebus0 device_attach: bcmrng0 attach returned 6 mbox0: mem 0x7e00b880-0x7e00b8bf irq 17 on = simplebus0 gpio0: mem 0x7e200000-0x7e2000b3 irq = 18,19 on simplebus0 gpiobus0: on gpio0 gpioc0: on gpio0 uart0: mem 0x7e201000-0x7e201fff irq 20 on = simplebus0 uart0: console (115200,n,8,1) spi0: mem 0x7e204000-0x7e204fff irq 21 on = simplebus0 spibus0: on spi0 spibus0: at cs 0 mode 0 spibus0: at cs 1 mode 0 iichb0: mem 0x7e804000-0x7e804fff irq 32 = on simplebus0 bcm283x_dwcotg0: mem = 0x7e980000-0x7e98ffff,0x7e006000-0x7e006fff irq 38,39 on simplebus0 usbus0 on bcm283x_dwcotg0 sdhci_bcm0: mem 0x7e300000-0x7e3000ff = irq 42 on simplebus0 mmc0: on sdhci_bcm0 fb0: on simplebus0 fbd0 on fb0 VT: initialize with new VT driver "fb". fb0: 656x416(656x416@0,0) 24bpp fb0: fbswap: 1, pitch 1968, base 0x3db33000, screen_size 818688 local_intc0: mem 0x40000000-0x400000ff on = simplebus0 local_intc0: could not allocate memory resource device_attach: local_intc0 attach returned 6 pmu0: irq 46 on simplebus0 pmu0: could not allocate resources device_attach: pmu0 attach returned 6 generic_timer0: irq 47,48,49,50 on simplebus0 generic_timer0: could not allocate resources device_attach: generic_timer0 attach returned 6 gpioled0: on ofwbus0 gpioled0: failed to map pin gpioled0: failed to map pin cpulist0: on ofwbus0 cpu0: on cpulist0 bcm2835_cpufreq0: on cpu0 cpu1: on cpulist0 cpu2: on cpulist0 cpu3: on cpulist0 cryptosoft0: panic: No usable event timer found! cpuid =3D 0 time =3D 1 KDB: stack backtrace: db_trace_self() at db_trace_self_wrapper+0x28 pc =3D 0xffff00000062b308 lr =3D 0xffff000000086b78 sp =3D 0xffff0000000107c0 fp =3D 0xffff0000000109d0 db_trace_self_wrapper() at vpanic+0x184 pc =3D 0xffff000000086b78 lr =3D 0xffff0000003258a4 sp =3D 0xffff0000000109e0 fp =3D 0xffff000000010a60 vpanic() at panic+0x44 pc =3D 0xffff0000003258a4 lr =3D 0xffff00000032571c sp =3D 0xffff000000010a70 fp =3D 0xffff000000010af0 panic() at cpu_initclocks_bsp+0x410 pc =3D 0xffff00000032571c lr =3D 0xffff00000066a6ec sp =3D 0xffff000000010b00 fp =3D 0xffff000000010b50 cpu_initclocks_bsp() at initclocks+0x28 pc =3D 0xffff00000066a6ec lr =3D 0xffff0000002c4b9c sp =3D 0xffff000000010b60 fp =3D 0xffff000000010b60 initclocks() at mi_startup+0xc8 pc =3D 0xffff0000002c4b9c lr =3D 0xffff0000002c148c sp =3D 0xffff000000010b70 fp =3D 0xffff000000010bb0 mi_startup() at virtdone+0x54 pc =3D 0xffff0000002c148c lr =3D 0xffff000000001084 sp =3D 0xffff000000010bc0 fp =3D 0x0000000000000000 KDB: enter: panic [ thread pid 0 tid 100000 ] Stopped at 0 db>=20 Revision 327562 boots fine: Using DTB provided by EFI at 0x8004000. KDB: debugger backends: ddb KDB: current backend: ddb Copyright (c) 1992-2018 The FreeBSD Project. Copyright (c) 1979, 1980, 1983, 1986, 1988, 1989, 1991, 1992, 1993, 1994 The Regents of the University of California. All rights = reserved. FreeBSD is a registered trademark of The FreeBSD Foundation. FreeBSD 12.0-CURRENT #19 r327562M: Sat Jan 6 14:00:01 CET 2018 = tuexen@bsd10.fh-muenster.de:/usr/home/tuexen/head/sys/arm64/compile/TCP = arm64 FreeBSD clang version 5.0.1 (branches/release_50 319231) (based on LLVM = 5.0.1) VT: init without driver. sysctl_warn_reuse: can't re-use a leaf (kern.features.geom_label)! module_register: cannot register g_label from kernel; already loaded = from geom_label.ko Module g_label failed to register: 17 Starting CPU 1 (1) Starting CPU 2 (2) Starting CPU 3 (3) FreeBSD/SMP: Multiprocessor System Detected: 4 CPUs random: unblocking device. module_register_init: MOD_LOAD (efirt, 0xffff0000000cb414, 0) error 12 random: entropy device external interface kbd0 at kbdmux0 ofwbus0: simplebus0: on ofwbus0 ofw_clkbus0: on ofwbus0 clk_fixed0: on ofw_clkbus0 clk_fixed1: on ofw_clkbus0 regfix0: on ofwbus0 regfix1: on ofwbus0 psci0: on ofwbus0 local_intc0: mem 0x40000000-0x400000ff on = simplebus0 intc0: mem 0x7e00b200-0x7e00b3ff irq 16 = on simplebus0 generic_timer0: irq 47,48,49,50 on simplebus0 Timecounter "ARM MPCore Timecounter" frequency 19200000 Hz quality 1000 Event timer "ARM MPCore Eventtimer" frequency 19200000 Hz quality 1000 bcm_dma0: mem 0x7e007000-0x7e007eff irq = 0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15 on simplebus0 bcmwd0: mem 0x7e100000-0x7e100027 on simplebus0 bcmrng0: mem 0x7e104000-0x7e10400f on simplebus0 device_attach: bcmrng0 attach returned 6 mbox0: mem 0x7e00b880-0x7e00b8bf irq 17 on = simplebus0 gpio0: mem 0x7e200000-0x7e2000b3 irq = 18,19 on simplebus0 gpiobus0: on gpio0 gpioc0: on gpio0 uart0: mem 0x7e201000-0x7e201fff irq 20 on = simplebus0 uart0: console (115200,n,8,1) spi0: mem 0x7e204000-0x7e204fff irq 21 on = simplebus0 spibus0: on spi0 spibus0: at cs 0 mode 0 spibus0: at cs 1 mode 0 iichb0: mem 0x7e804000-0x7e804fff irq 32 = on simplebus0 bcm283x_dwcotg0: mem = 0x7e980000-0x7e98ffff,0x7e006000-0x7e006fff irq 38,39 on simplebus0 usbus0 on bcm283x_dwcotg0 sdhci_bcm0: mem 0x7e300000-0x7e3000ff = irq 42 on simplebus0 mmc0: on sdhci_bcm0 fb0: on simplebus0 fbd0 on fb0 VT: initialize with new VT driver "fb". fb0: 656x416(656x416@0,0) 24bpp fb0: fbswap: 1, pitch 1968, base 0x3db33000, screen_size 818688 pmu0: irq 46 on simplebus0 gpioled0: on ofwbus0 gpioled0: failed to map pin gpioled0: failed to map pin cpulist0: on ofwbus0 cpu0: on cpulist0 bcm2835_cpufreq0: on cpu0 cpu1: on cpulist0 cpu2: on cpulist0 cpu3: on cpulist0 cryptosoft0: Timecounters tick every 1.000 msec ipfw2 (+ipv6) initialized, divert loadable, nat loadable, default to = accept, logging disabled iicbus0: on iichb0 iic0: on iicbus0 The GEOM class LABEL is already loaded. usbus0: 480Mbps High Speed USB v2.0 ugen0.1: at usbus0 uhub0: on usbus0 mmcsd0: 64GB at mmc0 = 41.6MHz/4bit/65535-block bcm2835_cpufreq0: ARM 600MHz, Core 250MHz, SDRAM 400MHz, Turbo OFF Release APs CPU 0: ARM Cortex-A53 r0p4 affinity: 0 Instruction Set Attributes 0 =3D Instruction Set Attributes 1 =3D <> Processor Features 0 =3D Processor Features 1 =3D <0> Memory Model Features 0 =3D <4k Granule,64k = Granule,MixedEndian,S/NS Mem,16bit ASID,1TB PA> Memory Model Features 1 =3D <> Memory Model Features 2 =3D <32b CCIDX,48b VA> Debug Features 0 =3D <2 CTX Breakpoints,4 Watchpoints,6 = Breakpoints,PMUv3,Debug v8> Debug Features 1 =3D <0> Auxiliary Features 0 =3D <0> Auxiliary Features 1 =3D <0> CPU 1: ARM Cortex-A53 r0p4 affinity: 1 CPU 2: ARM Cortex-A53 r0p4 affinity: 2 CPU 3: ARM Cortex-A53 r0p4 affinity: 3 Trying to mount root from ufs:/dev/mmcsd0s2a [rw,noatime]... Warning: no time-of-day clock registered, system time will not be set = accurately uhub0: 1 port with 1 removable, self powered sysctl: net.inet.sctp.udp_tunneling_port=3D9899 at line 11: Can't assign = requested address Setting hostuuid: 30303030-3030-3030-3138-303365396335. Setting hostid: 0xede1b97d. No suitable dump device was found. Starting file system checks: /dev/mmcsd0s2a: FILE SYSTEM CLEAN; SKIPPING CHECKS /dev/mmcsd0s2a: clean, 12823920 free (74496 frags, 1593678 blocks, 0.5% = fragmentation) ugen0.2: at usbus0 uhub1 on uhub0 uhub1: = on usbus0 uhub1: MTT enabled Mounting local filesystems:. ELF ldconfig path: /lib /usr/lib /usr/lib/compat /usr/local/lib = /usr/local/lib/perl5/5.24/mach/CORE uhub1: 5 ports with 4 removable, self powered Setting hostname: bsd10.fh-muenster.de. Setting up harvesting: = [UMA],[FS_ATIME],SWI,INTERRUPT,NET_NG,NET_ETHER,NET_TUN,MOUSE,KEYBOARD,ATT= ACH,CACHED Feeding entropy: . ugen0.3: at usbus0 smsc0 on uhub1 smsc0: on usbus0 smsc0: chip 0xec00, rev. 0002 miibus0: on smsc0 smscphy0: PHY 1 on miibus0 smscphy0: 10baseT, 10baseT-FDX, 100baseTX, 100baseTX-FDX, auto ue0: on smsc0 ue0: Ethernet address: b8:27:eb:03:e9:c5 Starting Network: lo0. lo0: flags=3D8049 metric 0 mtu 16384 options=3D600003 inet6 ::1 prefixlen 128=20 inet6 fe80::1%lo0 prefixlen 64 scopeid 0x1=20 inet 127.0.0.1 netmask 0xff000000=20 groups: lo=20 nd6 options=3D21 Starting devd. ue0: link state changed to UP smsc0: chip 0xec00, rev. 0002 ue0: link state changed to DOWN ue0: link state changed to UP Starting Network: ue0. ue0: flags=3D8843 metric 0 mtu = 1500 options=3D80009 ether b8:27:eb:03:e9:c5 inet 212.201.121.100 netmask 0xffffffe0 broadcast = 212.201.121.127=20 inet6 fe80::ba27:ebff:fe03:e9c5%ue0 prefixlen 64 scopeid 0x2=20 inet6 2a02:c6a0:4015:10::100 prefixlen 64=20 media: Ethernet autoselect (100baseTX ) status: active nd6 options=3D21 add net default: gateway 212.201.121.97 add host 127.0.0.1: gateway lo0 fib 0: route already in table add net default: gateway 212.201.121.97 fib 0: route already in table add host ::1: gateway lo0 fib 0: route already in table add net fe80::: gateway ::1 add net ff02::: gateway ::1 add net ::ffff:0.0.0.0: gateway ::1 add net ::0.0.0.0: gateway ::1 add net default: gateway fe80::a236:9fff:fe80:e9de%ue0 Creating and/or trimming log files. Starting syslogd. Setting date via ntp. 6 Jan 14:20:41 ntpdate[526]: step time server 204.9.54.119 offset = 84.882792 sec Clearing /tmp (X related). Updating motd:. Mounting late filesystems:. Starting thttpd. Configuring vt: blanktime. Performing sanity check on sshd configuration. Starting sshd. Starting cron. Starting background file system checks in 60 seconds. Sat Jan 6 14:20:42 CET 2018 FreeBSD/arm64 (bsd10.fh-muenster.de) (ttyu0) login:=20 The kernel config being used is: include GENERIC-NODEBUG ident TCP =20 makeoptions WITH_EXTRA_TCP_STACKS=3D1 options TCP_RFC7413 options IPFIREWALL options IPFIREWALL_VERBOSE options IPFIREWALL_VERBOSE_LIMIT=3D5 options IPFIREWALL_DEFAULT_TO_ACCEPT nooptions COMPAT_FREEBSD32 Best regards Michael From owner-svn-src-head@freebsd.org Sat Jan 6 13:31:38 2018 Return-Path: Delivered-To: svn-src-head@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 A2E99EB97F6 for ; Sat, 6 Jan 2018 13:31:38 +0000 (UTC) (envelope-from lists@eitanadler.com) Received: from mail-yb0-x234.google.com (mail-yb0-x234.google.com [IPv6:2607:f8b0:4002:c09::234]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 5B1266DD52 for ; Sat, 6 Jan 2018 13:31:38 +0000 (UTC) (envelope-from lists@eitanadler.com) Received: by mail-yb0-x234.google.com with SMTP id s10so2885718ybl.7 for ; Sat, 06 Jan 2018 05:31:38 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=eitanadler.com; s=0xdeadbeef; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to:cc; bh=hpizk7azGXxdIZ6m6mMnY1j7EyLRoGYPq35XI3v2lU8=; b=ipWsTele/zspcGa3GqRk8PGe3AKRehSzg111AiB2FlU2tANbecmt475+bDLNcTLfGi +6FtBL9wIttdQgLudQ/Hx/L1+Xaun2Rol6PnJOVwekUVxP4IE0ANBrvSBHiURS2TdT3i V7pygjvfAn/JX8iY6/PraeJv5Y0n1xD2amoQU= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd-org.20150623.gappssmtp.com; s=20150623; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to:cc; bh=hpizk7azGXxdIZ6m6mMnY1j7EyLRoGYPq35XI3v2lU8=; b=bWTEyt1N63aXy+ALtHE6yn+u7/LwtJXOKxP6ZhYHe9XVO5SfukSGeKdrRWRlo/C5XN 6LqcCh7yFH2l07GFB3dsNg2SbsnLC95gbiNv6o3Nv9zNTmnhrajlmb6Z9RiD0RFn355G pmJ5gG638Ro+ZBx3PynLLjdkKxuxcBWZKeUWKda96LUYTwDLysvSwWVMDrbKZ7UMmGwE 0Q8nzZBcH6f9x5YKR2o5R66f0t8wlktOUPObi//mNtk8azR7p9QuUXSeLPaxcjpC3mU6 vPbGASjszYF63GPAOjbpAsmgHtwciYsysTtFjDeHWzc0taeSoRVtUhH+L4FYwAhzFUdh CU3A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:sender:in-reply-to:references:from :date:message-id:subject:to:cc; bh=hpizk7azGXxdIZ6m6mMnY1j7EyLRoGYPq35XI3v2lU8=; b=qZ7aTU+JfCo6BH9txLCXZekyFoLf6rKOmLleeLy2uJBmb8WF7JC4RBqcaSQXUKd+OA 0HBxAKtviITGh4Vrjpb4ZA1lIUQ+lfZcd4vvgKtSaaP5oFqU+jMJ/3ZkCf6viXYfGrrW hqo8EqBag0uz4DhT5owfwJ1AapPT7/jz0bhwC64bbOTt2HqDvmUAK4qycX8ZrfiJRf19 QF7yWbpMgvC6Sr8YneSw70ZNrP9YqcmQbh2s1zfn5mQJdGlBLs9C0HDW+M+9+m2lx2Eh eiaF50P/3aNg7w747yD07Ff0sO4ek71asvpgG35L9eUmclSVYdFdCKujX8SobObx11Ur sM9A== X-Gm-Message-State: AKGB3mIZ7y55P919+KFPYu+Z9axgCMpiOvazYrpm5e1zAjF3BUDgLHhK xa6fXlLLImeht79yL6Ovunob/a8Pt90moyrDMcffKw== X-Google-Smtp-Source: ACJfBotj2eSZQx2bgkK0FkB45QMC2Xyb/iKBP3t6OaiCo/OwXxF5ZFuXxYBFxYem8DTPI14GybP/8nyUEKW2AtBfCes= X-Received: by 10.37.38.202 with SMTP id m193mr923955ybm.97.1515245497366; Sat, 06 Jan 2018 05:31:37 -0800 (PST) MIME-Version: 1.0 Sender: lists@eitanadler.com Received: by 10.37.217.21 with HTTP; Sat, 6 Jan 2018 05:31:06 -0800 (PST) In-Reply-To: <201801051745.w05Hjs1q007404@pdx.rh.CN85.dnsmgr.net> References: <201801050714.w057Edeb035401@repo.freebsd.org> <201801051745.w05Hjs1q007404@pdx.rh.CN85.dnsmgr.net> From: Eitan Adler Date: Sat, 6 Jan 2018 05:31:06 -0800 X-Google-Sender-Auth: PnRq0lJvDPSQTNtJvHEZch_XqIk Message-ID: Subject: Re: svn commit: r327577 - head/sys/cam/ata To: rgrimes@freebsd.org Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Content-Type: text/plain; charset="UTF-8" X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 06 Jan 2018 13:31:38 -0000 On 5 January 2018 at 09:45, Rodney W. Grimes wrote: >> Author: eadler >> Date: Fri Jan 5 07:14:39 2018 >> New Revision: 327577 >> URL: https://svnweb.freebsd.org/changeset/base/327577 >> >> Log: >> cam/da: QUIRK: Add 4K quirks for WD Red and Black MHDDs > > >> >> PR: 188685 >> Submitted by: Jeremy Chadwick >> Reported by: Martin Birgmeier > > Any plans to MFC? to 10 and 11? Not 10. I might MFC to 11, but someone reported that this may not be the perfect fix. I need to read through that email first. -- Eitan Adler Source, Ports, Doc committer Bugmeister, Ports Security teams From owner-svn-src-head@freebsd.org Sat Jan 6 13:33:21 2018 Return-Path: Delivered-To: svn-src-head@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 CBBF5EB9A52 for ; Sat, 6 Jan 2018 13:33:21 +0000 (UTC) (envelope-from shawn.webb@hardenedbsd.org) Received: from mail-lf0-x234.google.com (mail-lf0-x234.google.com [IPv6:2a00:1450:4010:c07::234]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4795E6E057 for ; Sat, 6 Jan 2018 13:33:21 +0000 (UTC) (envelope-from shawn.webb@hardenedbsd.org) Received: by mail-lf0-x234.google.com with SMTP id h140so7812658lfg.1 for ; Sat, 06 Jan 2018 05:33:21 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=hardenedbsd-org.20150623.gappssmtp.com; s=20150623; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=3TRt1nsSafs1A4qxswVPDJa/feO9ne2GTOlaSsFE9kc=; b=o+Dgc/RIklweKy17Fxg4OvUsl9ZYtiwpxvxn419QcZSMjDjw9+HQhwmjAAqF6J0AYb YWs0i05S922ghAeUiS5VwsrvJD6tfYKK4bKUrl7FXT2eZmk3HtVxtwW30M4OHgrys1mP GHlMNCpn/TBmvivsf2Gno1TPsDBXaWoW74Yw2gIC+qfPx2+rytYkH512oufXcVUuFbmE xxkGoOz7947v8EZJDyyahfPq+H7yOKPMtCLWL5R7Ln+aV1a1AtM0CMflz0Cfy98ZTUS4 PViXhqEM+9q5+g+ltQa4qEaw02WXRphuPVgzcCH+5G2GKpSivAQkje099F+i3c5mQpcj KUJQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=3TRt1nsSafs1A4qxswVPDJa/feO9ne2GTOlaSsFE9kc=; b=creuBC/M/KwK4wSsobVVt4vW0qWpxTOp+wvDdF2c2bGp1uy3pkeRlmkTFxDLhsHZmm +/I3PYtV5sWbwdF6Ws8rjpYiDNHQU9WWyP2nqujs6XkmpCNhv0OQ1YM3DsAkCfZNj6YJ TIm7nORFg493BYpY0X8n6h86umGW/WxAgMZgAkVjJZV0snkwj5B6SHU9gUYLnVVAYdRK +B6qneebt6d4Y4GZlp7bVfFpU2y2hSmL+7blAUnPmUsTfpRxJ/L8zh9oScwCmaIhq6SV gdgTDUSwdA1pn/+nYye1xp/oq4ynT4tgAgDrvB2CRtSm23sE1XEFFiv6KoyvzLF7YUYd g3sw== X-Gm-Message-State: AKGB3mK2GB6+paliZLh23UuwmftrvWq7GgciIq36CpMpKh1Bs1F2KxGk qZ+5yxjLVxDOZOR7LU0VUFL9gA== X-Google-Smtp-Source: ACJfBovdPf3bSCbxv9m68wx018zpyBOoym6fmtr/Z36DNHe4F/0CK3uDxhr4c8dptWlW/Wg3PVAP4A== X-Received: by 10.46.17.130 with SMTP id 2mr3883216ljr.44.1515245598827; Sat, 06 Jan 2018 05:33:18 -0800 (PST) Received: from mutt-hbsd (tor-relay.zwiebeltoralf.de. [5.9.158.75]) by smtp.gmail.com with ESMTPSA id a64sm1434091lfa.0.2018.01.06.05.33.16 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Sat, 06 Jan 2018 05:33:18 -0800 (PST) Date: Sat, 6 Jan 2018 08:33:07 -0500 From: Shawn Webb To: Eitan Adler Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r327614 - head/usr.bin/morse Message-ID: <20180106133307.snzk6kmtqmnq4h2v@mutt-hbsd> References: <201801060702.w0672Osg042505@repo.freebsd.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="riwp2pwaxi7beekk" Content-Disposition: inline In-Reply-To: <201801060702.w0672Osg042505@repo.freebsd.org> X-Operating-System: FreeBSD mutt-hbsd 12.0-CURRENT FreeBSD 12.0-CURRENT X-PGP-Key: http://pgp.mit.edu/pks/lookup?op=vindex&search=0x6A84658F52456EEE User-Agent: NeoMutt/20171208 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 06 Jan 2018 13:33:21 -0000 --riwp2pwaxi7beekk Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Sat, Jan 06, 2018 at 07:02:24AM +0000, Eitan Adler wrote: > Author: eadler > Date: Sat Jan 6 07:02:24 2018 > New Revision: 327614 > URL: https://svnweb.freebsd.org/changeset/base/327614 >=20 > Log: > morse(6): implement support for decoding morse code > =20 > - Use `-r` for "reverse" mode and to match DragonFlyBSD. > - Move defines around to clear up logic > - use `errx` instead of `fprintf` and `exit` > =20 > PR: 35109 > Submitted By: philipp.mergenthaler@stud.uni-karlsruhe.de > Submitted on: 2002-02-19 > Reviewed by: kevans >=20 > [snip] > > +void > +fdecode(FILE *stream) Hey Eitan, This broke the arm64 build: https://jenkins.hardenedbsd.org/jenkins/job/HardenedBSD-CURRENT-arm64/159/c= onsole Thanks, --=20 Shawn Webb Cofounder and Security Engineer HardenedBSD Tor-ified Signal: +1 443-546-8752 GPG Key ID: 0x6A84658F52456EEE GPG Key Fingerprint: 2ABA B6BD EF6A F486 BE89 3D9E 6A84 658F 5245 6EEE --riwp2pwaxi7beekk Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAEBCAAdFiEEKrq2ve9q9Ia+iT2eaoRlj1JFbu4FAlpQ0BAACgkQaoRlj1JF bu60ZA//VKR2T1h6LjIxg8nn+eSI1lnYBs37qPOvG54B4JmfqhM4SPJDJDye2Zva J1KTtH9GhNIUWK0YIaqrz17XbeNmVZcTw0+YuSvK/IbEaXylMeBAX/5UgPYiSlnE 38mACOHMNcjUsJ9mqQIBOvMErgSRuwoNGIkC7i2O+SXyWamI8BlOqnWzUMNR1jws EejCz6dRge7Vll44ITR/ujwMJ9i0GFEwDJv+KjdLtQ/Bns2C6yuaW+WxC5L3jBi0 nEF/qRvEJ/8EzP/I9q3T1qd2UKu69oKMr/lEzkduGruYyYsMc3epV8dL6v77epi+ 0SMwCGj6LIUQV9wOMSden7ssGgqTZ7pOr8AeGDp8Qx3s4iiyM7xUuONW2k/kyla2 9oP6nCTP0c1kYRLpuQ045nQOVgfyuVTO+FSVCiZVBxMfYY2dAQNloKINoWaUl+6m gfY/jjkjhbZsXn0PtJP3QoCLJYSOl70Yo4nQkYV6ky3bZfPhRhql6Lji7H0iO2CP M8IqSzBf/wtf5f7Oqx/uTNcapWk9YemKZU+Q6AYokQl4AjIs/b39Y/DCtR5Vr4cM OPYxBISXWVmfT5AN+h0b65+yRC6Jj4DGXOMeX4PeotUoOKYoa/tGkfu0uGTPrKs+ pZv+8lsdy7Uv7ZsEIgCrNEcOnv1+Znss+iAzMNiUGNV+oUIUIt4= =YXv3 -----END PGP SIGNATURE----- --riwp2pwaxi7beekk-- From owner-svn-src-head@freebsd.org Sat Jan 6 13:34:54 2018 Return-Path: Delivered-To: svn-src-head@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 41B9CEB9B6E for ; Sat, 6 Jan 2018 13:34:54 +0000 (UTC) (envelope-from shawn.webb@hardenedbsd.org) Received: from mail-lf0-x22a.google.com (mail-lf0-x22a.google.com [IPv6:2a00:1450:4010:c07::22a]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id B49D56E1D4 for ; Sat, 6 Jan 2018 13:34:53 +0000 (UTC) (envelope-from shawn.webb@hardenedbsd.org) Received: by mail-lf0-x22a.google.com with SMTP id h137so7811960lfe.8 for ; Sat, 06 Jan 2018 05:34:53 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=hardenedbsd-org.20150623.gappssmtp.com; s=20150623; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=uqVU1hzSdiDIyf9Xcfzt8/QpZaZEeGWs96hH+UNG5/o=; b=tZV2DxFPd0bzsPAX+RD33isW1dX81LXy1XJ6XDpujfWY4Sn2YPuDjmsw1vXiL5r9un v2WlEI1unfpFzfaE40jJQ1zbIYESyqSu9vOjn/0RJ/VXo/oRvH1wzQptMgGcU5Y6rfuf 15wXamoG4wgJqBweNZP5EwPw2THaEl21p9Fs7vqqKV7clWknSJdOY5u6rICIyG0SoIcC A+gxk0Nl1COk2gI/sfifxI2lUvsIcuTvbBz0Umg9ZU1H32A83e5PEmp6ciJpHd6/8bJc Dr3pa6agJQ5+mIgUwv7zWuoBD+rWyrqC0Ix+XmkB9v8vA3IVsqcfSRjcTJlSItcZOS/K nTyQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=uqVU1hzSdiDIyf9Xcfzt8/QpZaZEeGWs96hH+UNG5/o=; b=SdjvJvMDUc3bnT5STHRywdI7WJ62TRt1aiX7S7s2ACUb/RGH0H8zLyBIgTszOCNBFL C+C6Fm6CFhb15xDMtauoaF7zDTttMtf6PEbzJYuuHcq2ASRQB4N6ANdliBPN3bMDAlNh 0hYIja2ZUuKUi931BHT9EtlF/CCxAoGfy0Z3pFBq2vJakdH7iUBSxsfzDhEawMYazG+E TUN3rlxSFqr5nl3iRT3tk3yqCy7C5VHVI6Cefxz1meZOwLoQqugMevyaRbjJQOJHd8Yj e95nzc2652PjuNVTWKPnbcnBuNpRFSi4UOtKOQRdQS9J4EHLnPSFvQCtoezL4L6GQJsD UMFw== X-Gm-Message-State: AKwxytcEFapeB3YyArf+DR7OD9WsVqKyrehrArhwiUWmOJz3PBSzdP9Q T98BTc6S7O2DQa8J67Npn6bApA== X-Google-Smtp-Source: ACJfBovbKc2gRPt4tAAdCM0m2m3HkVf/QZ94t6uKF1pX5wH8ZlvoEoL8U7Vo6V1vBzhpQzYsiRSfVA== X-Received: by 10.25.78.25 with SMTP id c25mr3069679lfb.98.1515245691655; Sat, 06 Jan 2018 05:34:51 -0800 (PST) Received: from mutt-hbsd (tor-relay.zwiebeltoralf.de. [5.9.158.75]) by smtp.gmail.com with ESMTPSA id q11sm1428828lje.87.2018.01.06.05.34.49 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Sat, 06 Jan 2018 05:34:50 -0800 (PST) Date: Sat, 6 Jan 2018 08:34:40 -0500 From: Shawn Webb To: Eitan Adler Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r327614 - head/usr.bin/morse Message-ID: <20180106133440.lvtuw4axzz2fldl4@mutt-hbsd> References: <201801060702.w0672Osg042505@repo.freebsd.org> <20180106133307.snzk6kmtqmnq4h2v@mutt-hbsd> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="y3uwih37wyydxnug" Content-Disposition: inline In-Reply-To: <20180106133307.snzk6kmtqmnq4h2v@mutt-hbsd> X-Operating-System: FreeBSD mutt-hbsd 12.0-CURRENT FreeBSD 12.0-CURRENT X-PGP-Key: http://pgp.mit.edu/pks/lookup?op=vindex&search=0x6A84658F52456EEE User-Agent: NeoMutt/20171208 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 06 Jan 2018 13:34:54 -0000 --y3uwih37wyydxnug Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Sat, Jan 06, 2018 at 08:33:07AM -0500, Shawn Webb wrote: > On Sat, Jan 06, 2018 at 07:02:24AM +0000, Eitan Adler wrote: > > Author: eadler > > Date: Sat Jan 6 07:02:24 2018 > > New Revision: 327614 > > URL: https://svnweb.freebsd.org/changeset/base/327614 > >=20 > > Log: > > morse(6): implement support for decoding morse code > > =20 > > - Use `-r` for "reverse" mode and to match DragonFlyBSD. > > - Move defines around to clear up logic > > - use `errx` instead of `fprintf` and `exit` > > =20 > > PR: 35109 > > Submitted By: philipp.mergenthaler@stud.uni-karlsruhe.de > > Submitted on: 2002-02-19 > > Reviewed by: kevans > >=20 > > [snip] > > > > +void > > +fdecode(FILE *stream) >=20 > Hey Eitan, >=20 > This broke the arm64 build: >=20 > https://jenkins.hardenedbsd.org/jenkins/job/HardenedBSD-CURRENT-arm64/159= /console Catching up on email, I see it's fixed in r327616. --=20 Shawn Webb Cofounder and Security Engineer HardenedBSD Tor-ified Signal: +1 443-546-8752 GPG Key ID: 0x6A84658F52456EEE GPG Key Fingerprint: 2ABA B6BD EF6A F486 BE89 3D9E 6A84 658F 5245 6EEE --y3uwih37wyydxnug Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAEBCAAdFiEEKrq2ve9q9Ia+iT2eaoRlj1JFbu4FAlpQ0G8ACgkQaoRlj1JF bu4ctw/9GBHIQkVDf9fa/OuKQ4lEK4zaKx0LWGCQ4OK+OQVyIkY2B3i21ImTqurU kfbOygRvSiW3w4afewxIDx8fZVu2XyqkIygKl6g77D6UPm5RE4JTJE8U/ug0kGJP dooOqu6Wv/E74kyMM9YlrAeQPd64jN/aVpXuNXe160PIWLyrptbJZfECXaM6S2aV kyDG3t8GFmA9bdn/B8u1SlhhlGZvYXAyzES0Q9pilNsY/itJVaVzokAEhHamcFdX +QnxHWvP9G3vgZ5Gxi6NC5LtqDooyvKNXoJZr0IHG8HvbqwhhrOmLMPo3tm9Rr+P uP4IvECWhTFcQ3l6KKYkPeLhBdn3J9VAb1fQlEop2D+DrOa7OGPvU9vgY++nMrdm MTCKYFTvC03WK8DrOK7DyZL7xcEXhcC/qpaV/gen7UKBL+zZLqtgE2IwSeM74Hd0 bCyrfTm5+70aQLqlJw2ZQz91W+EBvpcvDPb4rSv/DuBhVj4r/qV9MEJGe1J8eGEw XjUvAqn7L+caPbQz9iYNesoEhqlQ11l2DTWomgmrTgQA7fgwsUFkjwvIg8/PRc1Q Gjlx+Kd+wZQR8T2XnTU6LGSDADr/R3L9wkrydKWxY+hMeVt9cEhhMlaLBZ6UPrNy FhLhlq9hoqk/T0pTD37DuTe5PWgqvWe95NDlmrn54eIBCer8iQ0= =Fq/L -----END PGP SIGNATURE----- --y3uwih37wyydxnug-- From owner-svn-src-head@freebsd.org Sat Jan 6 14:21:33 2018 Return-Path: Delivered-To: svn-src-head@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 605AAEBBB8B; Sat, 6 Jan 2018 14:21:33 +0000 (UTC) (envelope-from kevans@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 3BBB1710C4; Sat, 6 Jan 2018 14:21:33 +0000 (UTC) (envelope-from kevans@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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 7CDB1138F8; Sat, 6 Jan 2018 14:21:32 +0000 (UTC) (envelope-from kevans@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w06ELW31075730; Sat, 6 Jan 2018 14:21:32 GMT (envelope-from kevans@FreeBSD.org) Received: (from kevans@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w06ELWBg075729; Sat, 6 Jan 2018 14:21:32 GMT (envelope-from kevans@FreeBSD.org) Message-Id: <201801061421.w06ELWBg075729@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kevans set sender to kevans@FreeBSD.org using -f From: Kyle Evans Date: Sat, 6 Jan 2018 14:21:32 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r327621 - head/sys/dev/extres/syscon X-SVN-Group: head X-SVN-Commit-Author: kevans X-SVN-Commit-Paths: head/sys/dev/extres/syscon X-SVN-Commit-Revision: 327621 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 06 Jan 2018 14:21:33 -0000 Author: kevans Date: Sat Jan 6 14:21:32 2018 New Revision: 327621 URL: https://svnweb.freebsd.org/changeset/base/327621 Log: Move syscon_generic to attach much later It still needs to be before if_awg at least in order to be available for other operations, but it should not be attaching before interrupt controllers at the very least. This should make errors involving syscon register space colliding with other devices a little more innocent, but these conflicts should really be tracked down and resolved. One such conflict is with the Raspberry Pi 3 local interrupt controller, noticed by tuexen@ Reported by: tuexen Modified: head/sys/dev/extres/syscon/syscon_generic.c Modified: head/sys/dev/extres/syscon/syscon_generic.c ============================================================================== --- head/sys/dev/extres/syscon/syscon_generic.c Sat Jan 6 13:19:36 2018 (r327620) +++ head/sys/dev/extres/syscon/syscon_generic.c Sat Jan 6 14:21:32 2018 (r327621) @@ -207,5 +207,5 @@ DEFINE_CLASS_0(syscon_generic, syscon_generic_driver, sizeof(struct syscon_generic_softc)); static devclass_t syscon_generic_devclass; EARLY_DRIVER_MODULE(syscon_generic, simplebus, syscon_generic_driver, - syscon_generic_devclass, 0, 0, BUS_PASS_BUS + BUS_PASS_ORDER_LATE); + syscon_generic_devclass, 0, 0, BUS_PASS_DEFAULT + BUS_PASS_ORDER_FIRST); MODULE_VERSION(syscon_generic, 1); From owner-svn-src-head@freebsd.org Sat Jan 6 14:24:57 2018 Return-Path: Delivered-To: svn-src-head@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 E4CC7EBBD8A; Sat, 6 Jan 2018 14:24:57 +0000 (UTC) (envelope-from byond.lenox@gmail.com) Received: from mail-io0-f196.google.com (mail-io0-f196.google.com [209.85.223.196]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id B4ED271468; Sat, 6 Jan 2018 14:24:57 +0000 (UTC) (envelope-from byond.lenox@gmail.com) Received: by mail-io0-f196.google.com with SMTP id 87so8627590ior.5; Sat, 06 Jan 2018 06:24:57 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=aY0SbdtumCWmBjPhvW055+jjBEQpBHEM2rj+tKkEESs=; b=KQQejPG/QHmtAjh6HHdYqcE/wo3DGQrs+8TMGO7fhKKvMUbZgoqpeKXDS0SFUGNv5/ ltaO0mmvt+ZX7hHZTapxy6jG5nyWTD6yjPaxf9j+laygxttBkg8ECTZzMxtHMDguwMVL Qh+zBBjF7tN9iJ6KGYDj3d7AxHXUyM7yth4VCBTB7gxLAFFZw/r++D/8SMVtfAQiXiGy J1KSfu6rLjcpVA7FiNSNgAxRrpCbWQ8UpzwklhI6nSI4O9SreNbxlc3lQWRiulkIRYNp QIw8iIRwi/az6FVhTmiCEUfH52fDT7OMkOyOrWXWD3sMKfJHa7vAFP07HUpnO166qmJV WAFw== X-Gm-Message-State: AKGB3mK1A/Y4gUgjtkgJB3hgLAc5L8q5rGIt3WDLmRGV6Irb75lkb+NJ UhXEyxtWNZEaVIxDnqTi6bt5VaLd X-Google-Smtp-Source: ACJfBovEkzfp9GOmDAcm1miOrKEyTmx98vVj+dAeng0sGIlNEnl0vW5JtOayuRjqj6DiU715FaZHHg== X-Received: by 10.107.24.195 with SMTP id 186mr3302151ioy.185.1515248691315; Sat, 06 Jan 2018 06:24:51 -0800 (PST) Received: from mail-it0-f50.google.com (mail-it0-f50.google.com. [209.85.214.50]) by smtp.gmail.com with ESMTPSA id y66sm4809082iod.48.2018.01.06.06.24.50 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sat, 06 Jan 2018 06:24:50 -0800 (PST) Received: by mail-it0-f50.google.com with SMTP id p139so4597008itb.1; Sat, 06 Jan 2018 06:24:50 -0800 (PST) X-Received: by 10.36.51.202 with SMTP id k193mr6054046itk.130.1515248690343; Sat, 06 Jan 2018 06:24:50 -0800 (PST) MIME-Version: 1.0 Received: by 10.107.149.147 with HTTP; Sat, 6 Jan 2018 06:24:29 -0800 (PST) In-Reply-To: <6F912304-B760-4DA2-AB74-C2C934026FC1@freebsd.org> References: <201801042237.w04MbFVR015965@repo.freebsd.org> <6F912304-B760-4DA2-AB74-C2C934026FC1@freebsd.org> From: Kyle Evans Date: Sat, 6 Jan 2018 08:24:29 -0600 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: svn commit: r327563 - in head/sys: arm/allwinner arm/conf arm64/conf conf To: Michael Tuexen Cc: src-committers , svn-src-all@freebsd.org, svn-src-head@freebsd.org, "freebsd-arm@freebsd.org" Content-Type: text/plain; charset="UTF-8" X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 06 Jan 2018 14:24:58 -0000 On Sat, Jan 6, 2018 at 7:23 AM, Michael Tuexen wrote: >> On 4. Jan 2018, at 23:37, Kyle Evans wrote: >> >> Author: kevans >> Date: Thu Jan 4 22:37:15 2018 >> New Revision: 327563 >> URL: https://svnweb.freebsd.org/changeset/base/327563 >> >> Log: >> if_awg: Use syscon prop if it exists >> >> The emac bindings that are landing in Linux 4.15 specify a syscon property >> on the emac node that point to /soc/syscon. Use this property if it's >> specified, but maintain backwards compatibility with the old method. >> >> The older method is still used for boards that we get .dtb from u-boot, such >> as pine64, that did not yet have stable emac bindings. >> >> Tested on: Banana Pi-M3 (a83t) >> Tested on: Pine64 (a64) >> Reviewed by: manu >> Differential Revision: https://reviews.freebsd.org/D13296 > This breaks booting on a RPi3. Please note that it is not only panic'ing, > but there are multiple errors before that. Ugh, sorry about that. >>> FreeBSD EFI boot block > Loader path: /boot/loader.efi > > Initializing modules: UFS > Probing 3 block devices.....* done > UFS found 1 partition > Consoles: EFI console > Command line arguments: loader.efi > Image base: 0x39ab8008 > EFI version: 2.05 > EFI Firmware: Das U-boot (rev 0.00) > > FreeBSD/arm64 EFI loader, Revision 1.1 > (Wed Dec 6 19:13:14 CET 2017 root@bsd18.fh-muenster.de) > EFI boot environment > Loading /boot/defaults/loader.conf > /boot/kernel/kernel text=0x7f3b28 data=0xaac80+0x3a106d syms=[0x8+0x10e870+0x8+0x101345] > /boot/entropy size=0x1000 > /boot/kernel/geom_label.ko text=0x2a80 text=0x2710 data=0x10118+0xfeec syms=[0x8+0x1548+0x8+0xef2] > > Hit [Enter] to boot immediately, or any other key for command prompt. > Booting [/boot/kernel/kernel]... > Using DTB provided by EFI at 0x8004000. > KDB: debugger backends: ddb > KDB: current backend: ddb > Copyright (c) 1992-2018 The FreeBSD Project. > Copyright (c) 1979, 1980, 1983, 1986, 1988, 1989, 1991, 1992, 1993, 1994 > The Regents of the University of California. All rights reserved. > FreeBSD is a registered trademark of The FreeBSD Foundation. > FreeBSD 12.0-CURRENT #21 r327563M: Sat Jan 6 14:16:20 CET 2018 > tuexen@bsd10.fh-muenster.de:/usr/home/tuexen/head/sys/arm64/compile/TCP arm64 > FreeBSD clang version 5.0.1 (branches/release_50 319231) (based on LLVM 5.0.1) > VT: init without driver. > sysctl_warn_reuse: can't re-use a leaf (kern.features.geom_label)! > module_register: cannot register g_label from kernel; already loaded from geom_label.ko > Module g_label failed to register: 17 > Starting CPU 1 (1) > Starting CPU 2 (2) > Starting CPU 3 (3) > FreeBSD/SMP: Multiprocessor System Detected: 4 CPUs > random: unblocking device. > module_register_init: MOD_LOAD (efirt, 0xffff0000000cb414, 0) error 12 > random: entropy device external interface > kbd0 at kbdmux0 > ofwbus0: > simplebus0: on ofwbus0 > ofw_clkbus0: on ofwbus0 > clk_fixed0: on ofw_clkbus0 > clk_fixed1: on ofw_clkbus0 > regfix0: on ofwbus0 > regfix1: on ofwbus0 > syscon_generic0: mem 0x40000000-0x400000ff on simplebus0 > psci0: on ofwbus0 > local_intc0: mem 0x40000000-0x400000ff on simplebus0 > local_intc0: could not allocate memory resource > device_attach: local_intc0 attach returned 6 Apologies for the breakage; this should be alleviated by r327621. There will still be some errors (syscon_generic cannot allocate memory resource), but that should be completely innocent in this case and will give me time to track down why syscon shares register space with local intc here. From owner-svn-src-head@freebsd.org Sat Jan 6 14:36:47 2018 Return-Path: Delivered-To: svn-src-head@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 09663EBC530; Sat, 6 Jan 2018 14:36:47 +0000 (UTC) (envelope-from tuexen@freebsd.org) Received: from drew.franken.de (mail-n.franken.de [193.175.24.27]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "*.franken.de", Issuer "COMODO RSA Domain Validation Secure Server CA" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id A7B3E71A9E; Sat, 6 Jan 2018 14:36:45 +0000 (UTC) (envelope-from tuexen@freebsd.org) Received: from [IPv6:2003:cd:6beb:2600:a470:65d3:e324:200f] (p200300CD6BEB2600A47065D3E324200F.dip0.t-ipconnect.de [IPv6:2003:cd:6beb:2600:a470:65d3:e324:200f]) (Authenticated sender: macmic) by mail-n.franken.de (Postfix) with ESMTPSA id 9A05771E3F906; Sat, 6 Jan 2018 15:36:35 +0100 (CET) Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (Mac OS X Mail 11.2 \(3445.5.20\)) Subject: Re: svn commit: r327563 - in head/sys: arm/allwinner arm/conf arm64/conf conf From: Michael Tuexen In-Reply-To: Date: Sat, 6 Jan 2018 15:36:25 +0100 Cc: src-committers , svn-src-all@freebsd.org, svn-src-head@freebsd.org, "freebsd-arm@freebsd.org" Content-Transfer-Encoding: quoted-printable Message-Id: <1431AAD8-E4CB-437B-83D5-7691DC3FDD51@freebsd.org> References: <201801042237.w04MbFVR015965@repo.freebsd.org> <6F912304-B760-4DA2-AB74-C2C934026FC1@freebsd.org> To: Kyle Evans X-Mailer: Apple Mail (2.3445.5.20) X-Spam-Status: No, score=-2.9 required=5.0 tests=ALL_TRUSTED,BAYES_00 autolearn=disabled version=3.4.1 X-Spam-Checker-Version: SpamAssassin 3.4.1 (2015-04-28) on mail-n.franken.de X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 06 Jan 2018 14:36:47 -0000 > On 6. Jan 2018, at 15:24, Kyle Evans wrote: >=20 > On Sat, Jan 6, 2018 at 7:23 AM, Michael Tuexen = wrote: >>> On 4. Jan 2018, at 23:37, Kyle Evans wrote: >>>=20 >>> Author: kevans >>> Date: Thu Jan 4 22:37:15 2018 >>> New Revision: 327563 >>> URL: https://svnweb.freebsd.org/changeset/base/327563 >>>=20 >>> Log: >>> if_awg: Use syscon prop if it exists >>>=20 >>> The emac bindings that are landing in Linux 4.15 specify a syscon = property >>> on the emac node that point to /soc/syscon. Use this property if = it's >>> specified, but maintain backwards compatibility with the old method. >>>=20 >>> The older method is still used for boards that we get .dtb from = u-boot, such >>> as pine64, that did not yet have stable emac bindings. >>>=20 >>> Tested on: Banana Pi-M3 (a83t) >>> Tested on: Pine64 (a64) >>> Reviewed by: manu >>> Differential Revision: https://reviews.freebsd.org/D13296 >> This breaks booting on a RPi3. Please note that it is not only = panic'ing, >> but there are multiple errors before that. >=20 > Ugh, sorry about that. No problem... >=20 >>>> FreeBSD EFI boot block >> Loader path: /boot/loader.efi >>=20 >> Initializing modules: UFS >> Probing 3 block devices.....* done >> UFS found 1 partition >> Consoles: EFI console >> Command line arguments: loader.efi >> Image base: 0x39ab8008 >> EFI version: 2.05 >> EFI Firmware: Das U-boot (rev 0.00) >>=20 >> FreeBSD/arm64 EFI loader, Revision 1.1 >> (Wed Dec 6 19:13:14 CET 2017 root@bsd18.fh-muenster.de) >> EFI boot environment >> Loading /boot/defaults/loader.conf >> /boot/kernel/kernel text=3D0x7f3b28 data=3D0xaac80+0x3a106d = syms=3D[0x8+0x10e870+0x8+0x101345] >> /boot/entropy size=3D0x1000 >> /boot/kernel/geom_label.ko text=3D0x2a80 text=3D0x2710 = data=3D0x10118+0xfeec syms=3D[0x8+0x1548+0x8+0xef2] >>=20 >> Hit [Enter] to boot immediately, or any other key for command prompt. >> Booting [/boot/kernel/kernel]... >> Using DTB provided by EFI at 0x8004000. >> KDB: debugger backends: ddb >> KDB: current backend: ddb >> Copyright (c) 1992-2018 The FreeBSD Project. >> Copyright (c) 1979, 1980, 1983, 1986, 1988, 1989, 1991, 1992, 1993, = 1994 >> The Regents of the University of California. All rights = reserved. >> FreeBSD is a registered trademark of The FreeBSD Foundation. >> FreeBSD 12.0-CURRENT #21 r327563M: Sat Jan 6 14:16:20 CET 2018 >> = tuexen@bsd10.fh-muenster.de:/usr/home/tuexen/head/sys/arm64/compile/TCP = arm64 >> FreeBSD clang version 5.0.1 (branches/release_50 319231) (based on = LLVM 5.0.1) >> VT: init without driver. >> sysctl_warn_reuse: can't re-use a leaf (kern.features.geom_label)! >> module_register: cannot register g_label from kernel; already loaded = from geom_label.ko >> Module g_label failed to register: 17 >> Starting CPU 1 (1) >> Starting CPU 2 (2) >> Starting CPU 3 (3) >> FreeBSD/SMP: Multiprocessor System Detected: 4 CPUs >> random: unblocking device. >> module_register_init: MOD_LOAD (efirt, 0xffff0000000cb414, 0) error = 12 >> random: entropy device external interface >> kbd0 at kbdmux0 >> ofwbus0: >> simplebus0: on ofwbus0 >> ofw_clkbus0: on ofwbus0 >> clk_fixed0: on ofw_clkbus0 >> clk_fixed1: on ofw_clkbus0 >> regfix0: on ofwbus0 >> regfix1: on ofwbus0 >> syscon_generic0: mem 0x40000000-0x400000ff on simplebus0 >> psci0: on ofwbus0 >> local_intc0: mem 0x40000000-0x400000ff = on simplebus0 >> local_intc0: could not allocate memory resource >> device_attach: local_intc0 attach returned 6 >=20 > Apologies for the breakage; this should be alleviated by r327621. > There will still be some errors (syscon_generic cannot allocate memory > resource), but that should be completely innocent in this case and > will give me time to track down why syscon shares register space with > local intc here. I can confirm that r327621 boots again on RPi3 and the system is usable. Thanks for the quick fix/workaround. Best regards Michael From owner-svn-src-head@freebsd.org Sat Jan 6 15:10:05 2018 Return-Path: Delivered-To: svn-src-head@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 767A4EBD7B2; Sat, 6 Jan 2018 15:10:05 +0000 (UTC) (envelope-from freebsd@pdx.rh.CN85.dnsmgr.net) Received: from pdx.rh.CN85.dnsmgr.net (br1.CN84in.dnsmgr.net [69.59.192.140]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id D6FD5729A6; Sat, 6 Jan 2018 15:10:04 +0000 (UTC) (envelope-from freebsd@pdx.rh.CN85.dnsmgr.net) Received: from pdx.rh.CN85.dnsmgr.net (localhost [127.0.0.1]) by pdx.rh.CN85.dnsmgr.net (8.13.3/8.13.3) with ESMTP id w06FA3ws011988; Sat, 6 Jan 2018 07:10:03 -0800 (PST) (envelope-from freebsd@pdx.rh.CN85.dnsmgr.net) Received: (from freebsd@localhost) by pdx.rh.CN85.dnsmgr.net (8.13.3/8.13.3/Submit) id w06FA3sM011987; Sat, 6 Jan 2018 07:10:03 -0800 (PST) (envelope-from freebsd) From: "Rodney W. Grimes" Message-Id: <201801061510.w06FA3sM011987@pdx.rh.CN85.dnsmgr.net> Subject: Re: svn commit: r327614 - head/usr.bin/morse In-Reply-To: <201801060702.w0672Osg042505@repo.freebsd.org> To: Eitan Adler Date: Sat, 6 Jan 2018 07:10:03 -0800 (PST) CC: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Reply-To: rgrimes@freebsd.org X-Mailer: ELM [version 2.4ME+ PL121h (25)] MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=US-ASCII X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 06 Jan 2018 15:10:05 -0000 [ Charset UTF-8 unsupported, converting... ] > Author: eadler > Date: Sat Jan 6 07:02:24 2018 > New Revision: 327614 > URL: https://svnweb.freebsd.org/changeset/base/327614 > > Log: > morse(6): implement support for decoding morse code > > - Use `-r` for "reverse" mode and to match DragonFlyBSD. > - Move defines around to clear up logic > - use `errx` instead of `fprintf` and `exit` > > PR: 35109 > Submitted By: philipp.mergenthaler@stud.uni-karlsruhe.de > Submitted on: 2002-02-19 > Reviewed by: kevans > > Modified: > head/usr.bin/morse/morse.6 > head/usr.bin/morse/morse.c > > Modified: head/usr.bin/morse/morse.6 > ============================================================================== > --- head/usr.bin/morse/morse.6 Sat Jan 6 06:34:49 2018 (r327613) > +++ head/usr.bin/morse/morse.6 Sat Jan 6 07:02:24 2018 (r327614) > @@ -92,6 +92,11 @@ Echo each character before it is sent, used together w > .Fl p > or > .Fl d . > +.It Fl D > +Decode morse output consisting of dots and dashes (as generated by using > +the > +.Fl s > +option). Dflag here, program is rflag???? And I do not see an update to the SYNOPSYS section of the man page adding the rflag, something like: -.Op Fl elps +.Op Fl elprs Thanks, > .El > .Pp > The > > Modified: head/usr.bin/morse/morse.c > ============================================================================== > --- head/usr.bin/morse/morse.c Sat Jan 6 06:34:49 2018 (r327613) > +++ head/usr.bin/morse/morse.c Sat Jan 6 07:02:24 2018 (r327614) > @@ -46,6 +46,7 @@ static const char rcsid[] = > #include > > #include > +#include > #include > #include > #include > @@ -59,6 +60,9 @@ static const char rcsid[] = > /* Always use the speaker, let the open fail if -p is selected */ > #define SPEAKER "/dev/speaker" > > +#define WHITESPACE " \t\n" > +#define DELIMITERS " \t" > + > #ifdef SPEAKER > #include > #endif > @@ -267,14 +271,11 @@ static const struct morsetab koi8rtab[] = { > }; > > static void show(const char *), play(const char *), morse(char); > +static void decode (char *), fdecode(FILE *); > static void ttyout(const char *); > static void sighandler(int); > > -#define GETOPTOPTS "c:d:ef:lsw:" > -#define USAGE \ > -"usage: morse [-els] [-d device] [-w speed] [-c speed] [-f frequency] [string ...]\n" > - > -static int pflag, lflag, sflag, eflag; > +static int pflag, lflag, rflag, sflag, eflag; > static int wpm = 20; /* effective words per minute */ > static int cpm; /* effective words per minute between > * characters */ > @@ -293,11 +294,14 @@ static int olflags; > > #ifdef SPEAKER > static tone_t sound; > -#undef GETOPTOPTS > -#define GETOPTOPTS "c:d:ef:lpsw:" > -#undef USAGE > +#define GETOPTOPTS "c:d:ef:lprsw:" > #define USAGE \ > -"usage: morse [-elps] [-d device] [-w speed] [-c speed] [-f frequency] [string ...]\n" > +"usage: morse [-elprs] [-d device] [-w speed] [-c speed] [-f frequency] [string ...]\n" > +#else > +#define GETOPTOPTS "c:d:ef:lrsw:" > +#define USAGE \ > +"usage: morse [-elrs] [-d device] [-w speed] [-c speed] [-f frequency] [string ...]\n" > + > #endif > > static const struct morsetab *hightab; > @@ -331,6 +335,9 @@ main(int argc, char **argv) > pflag = 1; > break; > #endif > + case 'r': > + rflag = 1; > + break; > case 's': > sflag = 1; > break; > @@ -339,42 +346,36 @@ main(int argc, char **argv) > break; > case '?': > default: > - fputs(USAGE, stderr); > - exit(1); > + errx(1, USAGE); > } > - if (sflag && lflag) { > - fputs("morse: only one of -l and -s allowed\n", stderr); > - exit(1); > + if ((sflag && lflag) || (sflag && rflag) || (lflag && rflag)) { > + errx(1, "morse: only one of -l, -s, and -r allowed\n"); > } > if ((pflag || device) && (sflag || lflag)) { > - fputs("morse: only one of -p, -d and -l, -s allowed\n", stderr); > - exit(1); > + errx(1, "morse: only one of -p, -d and -l, -s allowed\n"); > } > - if (cpm == 0) > + if (cpm == 0) { > cpm = wpm; > + } > if ((pflag || device) && ((wpm < 1) || (wpm > 60) || (cpm < 1) || (cpm > 60))) { > - fputs("morse: insane speed\n", stderr); > - exit(1); > + errx(1, "morse: insane speed\n"); > } > - if ((pflag || device) && (freq == 0)) > + if ((pflag || device) && (freq == 0)) { > freq = FREQUENCY; > - > + } > #ifdef SPEAKER > if (pflag) { > if ((spkr = open(SPEAKER, O_WRONLY, 0)) == -1) { > - perror(SPEAKER); > - exit(1); > + err(1, SPEAKER); > } > } else > #endif > if (device) { > if ((line = open(device, O_WRONLY | O_NONBLOCK)) == -1) { > - perror("open tty line"); > - exit(1); > + err(1, "open tty line"); > } > if (tcgetattr(line, &otty) == -1) { > - perror("tcgetattr() failed"); > - exit(1); > + err(1, "tcgetattr() failed"); > } > ntty = otty; > ntty.c_cflag |= CLOCAL; > @@ -419,9 +420,29 @@ main(int argc, char **argv) > hightab = iso8859_7tab; > } > > - if (lflag) > + if (lflag) { > printf("m"); > - if (*argv) { > + } > + if (rflag) { > + if (*argv) { > + do { > + p = strtok(*argv, DELIMITERS); > + if (p == NULL) { > + decode(*argv); > + } > + else { > + while (p) { > + decode(p); > + p = strtok(NULL, DELIMITERS); > + } > + } > + } while (*++argv); > + putchar('\n'); > + } else { > + fdecode(stdin); > + } > + } > + else if (*argv) { > do { > for (p = *argv; *p; ++p) { > if (eflag) > @@ -518,15 +539,13 @@ play(const char *s) > } > if (sound.duration) { > if (ioctl(spkr, SPKRTONE, &sound) == -1) { > - perror("ioctl play"); > - exit(1); > + err(1, "ioctl play"); > } > } > sound.frequency = 0; > sound.duration = dot_clock; > if (ioctl(spkr, SPKRTONE, &sound) == -1) { > - perror("ioctl rest"); > - exit(1); > + err(1, "ioctl rest"); > } > } > sound.frequency = 0; > @@ -575,6 +594,68 @@ ttyout(const char *s) > } > duration = cdot_clock * CHAR_SPACE * 10000; > usleep(duration); > +} > + > +void > +fdecode(FILE *stream) > +{ > + char *n, *p, *s; > + char buf[BUFSIZ]; > + > + s = buf; > + while (fgets(s, BUFSIZ - (s - buf), stdin)) { > + p = buf; > + > + while (*p && isblank(*p)) { > + p++; > + } > + while (*p && isspace(*p)) { > + p++; > + putchar (' '); > + } > + while (*p) { > + n = strpbrk(p, WHITESPACE); > + if (n == NULL) { > + /* The token was interrupted at the end > + * of the buffer. Shift it to the begin > + * of the buffer. > + */ > + for (s = buf; *p; *s++ = *p++) > + ; > + } else { > + *n = '\0'; > + n++; > + decode(p); > + p = n; > + } > + } > + } > + putchar('\n'); > +} > + > +void > +decode(char *p) > +{ > + char c; > + const struct morsetab *m; > + > + c = ' '; > + for (m = mtab; m != NULL && m->inchar != '\0'; m++) { > + if (strcmp(m->morse, p) == 0) { > + c = m->inchar; > + break; > + } > + } > + > + if (c == ' ') > + for (m = hightab; m != NULL && m->inchar != '\0'; m++) { > + if (strcmp(m->morse, p) == 0) { > + c = m->inchar; > + break; > + } > + } > + > + putchar(c); > } > > static void > > -- Rod Grimes rgrimes@freebsd.org From owner-svn-src-head@freebsd.org Sat Jan 6 15:52:29 2018 Return-Path: Delivered-To: svn-src-head@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 7F3DEEBF12F; Sat, 6 Jan 2018 15:52:29 +0000 (UTC) (envelope-from eadler@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4C1E573EE8; Sat, 6 Jan 2018 15:52:29 +0000 (UTC) (envelope-from eadler@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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 7DF99147C6; Sat, 6 Jan 2018 15:52:28 +0000 (UTC) (envelope-from eadler@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w06FqS3D016449; Sat, 6 Jan 2018 15:52:28 GMT (envelope-from eadler@FreeBSD.org) Received: (from eadler@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w06FqS7Z016448; Sat, 6 Jan 2018 15:52:28 GMT (envelope-from eadler@FreeBSD.org) Message-Id: <201801061552.w06FqS7Z016448@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: eadler set sender to eadler@FreeBSD.org using -f From: Eitan Adler Date: Sat, 6 Jan 2018 15:52:28 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r327623 - head/usr.bin/morse X-SVN-Group: head X-SVN-Commit-Author: eadler X-SVN-Commit-Paths: head/usr.bin/morse X-SVN-Commit-Revision: 327623 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 06 Jan 2018 15:52:29 -0000 Author: eadler Date: Sat Jan 6 15:52:28 2018 New Revision: 327623 URL: https://svnweb.freebsd.org/changeset/base/327623 Log: morse(6): update documentation - bump Dd - use 'r' instead of 'D' from the original submission Modified: head/usr.bin/morse/morse.6 Modified: head/usr.bin/morse/morse.6 ============================================================================== --- head/usr.bin/morse/morse.6 Sat Jan 6 15:52:21 2018 (r327622) +++ head/usr.bin/morse/morse.6 Sat Jan 6 15:52:28 2018 (r327623) @@ -29,7 +29,7 @@ .\" @(#)bcd.6 8.1 (Berkeley) 5/31/93 .\" $FreeBSD$ .\" -.Dd June 7, 2005 +.Dd January 5, 2018 .Dt MORSE 6 .Os .Sh NAME @@ -37,7 +37,7 @@ .Nd reformat input as morse code .Sh SYNOPSIS .Nm -.Op Fl elps +.Op Fl elrps .Op Fl d Ar device .Op Fl w Ar speed .Op Fl c Ar speed @@ -92,7 +92,7 @@ Echo each character before it is sent, used together w .Fl p or .Fl d . -.It Fl D +.It Fl r Decode morse output consisting of dots and dashes (as generated by using the .Fl s From owner-svn-src-head@freebsd.org Sat Jan 6 16:29:01 2018 Return-Path: Delivered-To: svn-src-head@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 B2B6EEC0888; Sat, 6 Jan 2018 16:29:01 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 8DF067541F; Sat, 6 Jan 2018 16:29:01 +0000 (UTC) (envelope-from kib@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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id CA1EF14CB2; Sat, 6 Jan 2018 16:29:00 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w06GT0WJ028996; Sat, 6 Jan 2018 16:29:00 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w06GT0aK028995; Sat, 6 Jan 2018 16:29:00 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201801061629.w06GT0aK028995@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Sat, 6 Jan 2018 16:29:00 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r327625 - head/share/man/man4 X-SVN-Group: head X-SVN-Commit-Author: kib X-SVN-Commit-Paths: head/share/man/man4 X-SVN-Commit-Revision: 327625 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 06 Jan 2018 16:29:01 -0000 Author: kib Date: Sat Jan 6 16:29:00 2018 New Revision: 327625 URL: https://svnweb.freebsd.org/changeset/base/327625 Log: Document kern.smp.disabled tunable. Sponsored by: The FreeBSD Foundation MFC after: 3 days Modified: head/share/man/man4/smp.4 Modified: head/share/man/man4/smp.4 ============================================================================== --- head/share/man/man4/smp.4 Sat Jan 6 16:13:17 2018 (r327624) +++ head/share/man/man4/smp.4 Sat Jan 6 16:29:00 2018 (r327625) @@ -23,7 +23,7 @@ .\" .\" $FreeBSD$ .\" -.Dd May 7, 2008 +.Dd January 6, 2017 .Dt SMP 4 .Os .Sh NAME @@ -56,6 +56,11 @@ i386 also requires The .Xr mptable 1 command may be used to view the status of multi-processor support. +.Pp +.Nm +support can be disabled by setting the loader tunable +.Va kern.smp.disabled +to 1. .Pp The number of CPUs detected by the system is available in the read-only sysctl variable From owner-svn-src-head@freebsd.org Sat Jan 6 16:36:31 2018 Return-Path: Delivered-To: svn-src-head@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 6A5A4EC1061; Sat, 6 Jan 2018 16:36:31 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from tensor.andric.com (tensor.andric.com [87.251.56.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "tensor.andric.com", Issuer "COMODO RSA Domain Validation Secure Server CA" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 2BD0E75D86; Sat, 6 Jan 2018 16:36:30 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from coleburn.home.andric.com (coleburn.home.andric.com [192.168.0.15]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by tensor.andric.com (Postfix) with ESMTPSA id 39180466C2; Sat, 6 Jan 2018 17:36:28 +0100 (CET) From: Dimitry Andric Message-Id: <8CD482D7-1C01-480E-A2DE-5B9E1ACF05D4@FreeBSD.org> Content-Type: multipart/signed; boundary="Apple-Mail=_FBF3A8B0-15AA-46F9-8083-33F4DAB094AF"; protocol="application/pgp-signature"; micalg=pgp-sha1 Mime-Version: 1.0 (Mac OS X Mail 10.3 \(3273\)) Subject: Re: svn commit: r327616 - head/usr.bin/morse Date: Sat, 6 Jan 2018 17:36:27 +0100 In-Reply-To: Cc: Li-Wen Hsu , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org To: Eitan Adler References: <201801060948.w069m4Rb058364@repo.freebsd.org> X-Mailer: Apple Mail (2.3273) X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 06 Jan 2018 16:36:31 -0000 --Apple-Mail=_FBF3A8B0-15AA-46F9-8083-33F4DAB094AF Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=utf-8 On 6 Jan 2018, at 14:19, Eitan Adler wrote: >=20 > On 6 January 2018 at 01:48, Li-Wen Hsu wrote: >> Author: lwhsu (ports committer) >> Date: Sat Jan 6 09:48:04 2018 >> New Revision: 327616 >> URL: https://svnweb.freebsd.org/changeset/base/327616 >>=20 >> Log: >> Unbreak build after r327614 >=20 > Why is testing with "make obj; make" in the morse directory = insufficient? >=20 > =E2=88=B4make obj; make > rm -f .depend > echo morse.full: /usr/lib/libc.a >> .depend > cc -O2 -pipe -g -MD -MF.depend.morse.o -MTmorse.o -std=3Dgnu99 > -fstack-protector-strong -Wsystem-headers -Werror -Wall > -Wno-format-y2k -W -Wno-unused-parameter -Wstrict-prototypes > -Wmissing-prototypes -Wpointer-arith -Wreturn-type -Wcast-qual > -Wwrite-strings -Wswitch -Wshadow -Wunused-parameter -Wcast-align > -Wchar-subscripts -Winline -Wnested-externs -Wredundant-decls > -Wold-style-definition -Wno-pointer-sign > -Wmissing-variable-declarations -Wthread-safety -Wno-empty-body > -Wno-string-plus-int -Wno-unused-const-variable -Qunused-arguments > -c morse.c -o morse.o > cc -O2 -pipe -g -std=3Dgnu99 -fstack-protector-strong -Wsystem-headers > -Werror -Wall -Wno-format-y2k -W -Wno-unused-parameter > -Wstrict-prototypes -Wmissing-prototypes -Wpointer-arith -Wreturn-type > -Wcast-qual -Wwrite-strings -Wswitch -Wshadow -Wunused-parameter > -Wcast-align -Wchar-subscripts -Winline -Wnested-externs > -Wredundant-decls -Wold-style-definition -Wno-pointer-sign > -Wmissing-variable-declarations -Wthread-safety -Wno-empty-body > -Wno-string-plus-int -Wno-unused-const-variable -Qunused-arguments -o > morse.full morse.o > objcopy --only-keep-debug morse.full morse.debug > objcopy --strip-debug --add-gnu-debuglink=3Dmorse.debug morse.full = morse > gzip -cn morse.6 > morse.6.gz Before r327616, I get: usr.bin/morse/morse.c:602:15: error: unused parameter 'stream' = [-Werror,-Wunused-parameter] fdecode(FILE *stream) ^ 1 error generated. Maybe you have warnings turned off in your local build environment? -Dimitry --Apple-Mail=_FBF3A8B0-15AA-46F9-8083-33F4DAB094AF Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename=signature.asc Content-Type: application/pgp-signature; name=signature.asc Content-Description: Message signed with OpenPGP -----BEGIN PGP SIGNATURE----- Version: GnuPG/MacGPG2 v2.2 iF0EARECAB0WIQR6tGLSzjX8bUI5T82wXqMKLiCWowUCWlD7CwAKCRCwXqMKLiCW ownYAKD6zqug9YWDGAICrc3FEResthNZkACfbH9sqM4pzQYTIqzFDfBJDk5GqLE= =C8du -----END PGP SIGNATURE----- --Apple-Mail=_FBF3A8B0-15AA-46F9-8083-33F4DAB094AF-- From owner-svn-src-head@freebsd.org Sat Jan 6 16:52:00 2018 Return-Path: Delivered-To: svn-src-head@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 2CCEBEC19E8 for ; Sat, 6 Jan 2018 16:52:00 +0000 (UTC) (envelope-from lists@eitanadler.com) Received: from mail-yb0-x22a.google.com (mail-yb0-x22a.google.com [IPv6:2607:f8b0:4002:c09::22a]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id DDF23764EE for ; Sat, 6 Jan 2018 16:51:59 +0000 (UTC) (envelope-from lists@eitanadler.com) Received: by mail-yb0-x22a.google.com with SMTP id a82so3008409ybg.1 for ; Sat, 06 Jan 2018 08:51:59 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=eitanadler.com; s=0xdeadbeef; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc:content-transfer-encoding; bh=Pn+C+y+/bMs65dCrmzUelaQuf+DFMxLHEvVzq4CEpdw=; b=XTNWvFuoWhwXX3hvGDvXhVxACqjpv+YyPl3w1z418N3wTyREjWmPAag+sWr6OOgl8N FtmDwJKiLn9zWPTR37M2Ywft55y3aRFkWuRk4B1jJeXhGR66AvAE+4vpyKZCDkostrno cPfcF/RQ7qFxZp/W4ne5s2b5abOV/OKys/49I= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc:content-transfer-encoding; bh=Pn+C+y+/bMs65dCrmzUelaQuf+DFMxLHEvVzq4CEpdw=; b=uij+nuHlB20j2cryvF2HG/qcL+gpoprPUbAh8/UzOhcssWYODL9/UGJ25YjOhi6KtZ YamHCNQYu+F8qbsT72ILgEfsGOxuPf0l7EvhgSLfIE68QDPZKgl/ByGluEGCoK/0Gpmn AvrX6j+IbDm0JLc/yq6rPn4y9uu9EnfEFpV9kGW/npReb9gzA/L8OkcDEoVkktdwAEQZ 9s/dOkyuK5MCKpraFiSFXGLjOfSnhWdLBGnZ0DVkrVKsrSHFmvwFdNbGjha3prad5sJo w3yBpvQsK2kRB1nDYGvUrpESy9neWPijxHJMMQ9wARcMSB4ud6qHgI1ZmzBYY+az6eK5 UXVA== X-Gm-Message-State: AKGB3mLNI4GFamLspVjUyhBCyRdMEBWmQ208EEu1dFXbf1A412t0zm8z u6qrvTUjslhuHSV6ojQhtQ4VBHWcKlx8BsZWnrhkcA== X-Google-Smtp-Source: ACJfBou7zrFFRwk31eLLGl5UolbQaKI6fyr8SFDGP7uUJwwvDD7OdFJQzG7lgm6ZmxMNGU999e8nJhB0VvKPjisLbgw= X-Received: by 10.37.31.69 with SMTP id f66mr6269088ybf.486.1515257518895; Sat, 06 Jan 2018 08:51:58 -0800 (PST) MIME-Version: 1.0 Received: by 10.37.217.21 with HTTP; Sat, 6 Jan 2018 08:51:28 -0800 (PST) In-Reply-To: <8CD482D7-1C01-480E-A2DE-5B9E1ACF05D4@FreeBSD.org> References: <201801060948.w069m4Rb058364@repo.freebsd.org> <8CD482D7-1C01-480E-A2DE-5B9E1ACF05D4@FreeBSD.org> From: Eitan Adler Date: Sat, 6 Jan 2018 08:51:28 -0800 Message-ID: Subject: Re: svn commit: r327616 - head/usr.bin/morse To: Dimitry Andric Cc: Li-Wen Hsu , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 06 Jan 2018 16:52:00 -0000 On 6 January 2018 at 08:36, Dimitry Andric wrote: > On 6 Jan 2018, at 14:19, Eitan Adler wrote: >> >> On 6 January 2018 at 01:48, Li-Wen Hsu wrote: >>> Author: lwhsu (ports committer) >>> Date: Sat Jan 6 09:48:04 2018 >>> New Revision: 327616 >>> URL: https://svnweb.freebsd.org/changeset/base/327616 >>> >>> Log: >>> Unbreak build after r327614 >> >> Why is testing with "make obj; make" in the morse directory insufficient= ? >> >> =E2=88=B4make obj; make >> rm -f .depend >> echo morse.full: /usr/lib/libc.a >> .depend >> cc -O2 -pipe -g -MD -MF.depend.morse.o -MTmorse.o -std=3Dgnu99 >> -fstack-protector-strong -Wsystem-headers -Werror -Wall >> -Wno-format-y2k -W -Wno-unused-parameter -Wstrict-prototypes >> -Wmissing-prototypes -Wpointer-arith -Wreturn-type -Wcast-qual >> -Wwrite-strings -Wswitch -Wshadow -Wunused-parameter -Wcast-align >> -Wchar-subscripts -Winline -Wnested-externs -Wredundant-decls >> -Wold-style-definition -Wno-pointer-sign >> -Wmissing-variable-declarations -Wthread-safety -Wno-empty-body >> -Wno-string-plus-int -Wno-unused-const-variable -Qunused-arguments >> -c morse.c -o morse.o >> cc -O2 -pipe -g -std=3Dgnu99 -fstack-protector-strong -Wsystem-headers >> -Werror -Wall -Wno-format-y2k -W -Wno-unused-parameter >> -Wstrict-prototypes -Wmissing-prototypes -Wpointer-arith -Wreturn-type >> -Wcast-qual -Wwrite-strings -Wswitch -Wshadow -Wunused-parameter >> -Wcast-align -Wchar-subscripts -Winline -Wnested-externs >> -Wredundant-decls -Wold-style-definition -Wno-pointer-sign >> -Wmissing-variable-declarations -Wthread-safety -Wno-empty-body >> -Wno-string-plus-int -Wno-unused-const-variable -Qunused-arguments -o >> morse.full morse.o >> objcopy --only-keep-debug morse.full morse.debug >> objcopy --strip-debug --add-gnu-debuglink=3Dmorse.debug morse.full mors= e >> gzip -cn morse.6 > morse.6.gz > > Before r327616, I get: > > usr.bin/morse/morse.c:602:15: error: unused parameter 'stream' [-Werror,-= Wunused-parameter] > fdecode(FILE *stream) > ^ > 1 error generated. > > Maybe you have warnings turned off in your local build environment? Is there anything that I could set in my environment that would override the command line flags? --=20 Eitan Adler From owner-svn-src-head@freebsd.org Sat Jan 6 17:02:33 2018 Return-Path: Delivered-To: svn-src-head@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 67C9DEC23A8; Sat, 6 Jan 2018 17:02:33 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from tensor.andric.com (tensor.andric.com [87.251.56.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "tensor.andric.com", Issuer "COMODO RSA Domain Validation Secure Server CA" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 23C1A76E8D; Sat, 6 Jan 2018 17:02:32 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from coleburn.home.andric.com (coleburn.home.andric.com [192.168.0.15]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by tensor.andric.com (Postfix) with ESMTPSA id 16A16466C7; Sat, 6 Jan 2018 18:02:30 +0100 (CET) From: Dimitry Andric Message-Id: Content-Type: multipart/signed; boundary="Apple-Mail=_929853BD-BD9B-4EB3-A608-4B6496E6B2A1"; protocol="application/pgp-signature"; micalg=pgp-sha1 Mime-Version: 1.0 (Mac OS X Mail 10.3 \(3273\)) Subject: Re: svn commit: r327616 - head/usr.bin/morse Date: Sat, 6 Jan 2018 18:02:29 +0100 In-Reply-To: Cc: Li-Wen Hsu , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org To: Eitan Adler References: <201801060948.w069m4Rb058364@repo.freebsd.org> <8CD482D7-1C01-480E-A2DE-5B9E1ACF05D4@FreeBSD.org> X-Mailer: Apple Mail (2.3273) X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 06 Jan 2018 17:02:33 -0000 --Apple-Mail=_929853BD-BD9B-4EB3-A608-4B6496E6B2A1 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=us-ascii On 6 Jan 2018, at 17:51, Eitan Adler wrote: >=20 > On 6 January 2018 at 08:36, Dimitry Andric wrote: >> On 6 Jan 2018, at 14:19, Eitan Adler wrote: ... >>> Why is testing with "make obj; make" in the morse directory = insufficient? ... >> usr.bin/morse/morse.c:602:15: error: unused parameter 'stream' = [-Werror,-Wunused-parameter] >> fdecode(FILE *stream) >> ^ >> 1 error generated. >>=20 >> Maybe you have warnings turned off in your local build environment? >=20 > Is there anything that I could set in my environment that would > override the command line flags? It depends. Many people have /etc/make.conf or /etc/src.conf files with extensive settings and compiler flag modifications, so usually the first advice is to do: export __MAKE_CONF=3D/dev/null export SRCCONF=3D/dev/null then attempt to build again. If that works, then slowly go through the make.conf or src.conf settings, enabling them one by one until you reproduce the failure (or unexpected success :). -Dimitry --Apple-Mail=_929853BD-BD9B-4EB3-A608-4B6496E6B2A1 Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename=signature.asc Content-Type: application/pgp-signature; name=signature.asc Content-Description: Message signed with OpenPGP -----BEGIN PGP SIGNATURE----- Version: GnuPG/MacGPG2 v2.2 iF0EARECAB0WIQR6tGLSzjX8bUI5T82wXqMKLiCWowUCWlEBJQAKCRCwXqMKLiCW o4YBAKCia+Im3GvHW7tRF45OV4+DK9gBcACfTc6jv0bPwbI29uSdGCpISQZ1yuQ= =LHO3 -----END PGP SIGNATURE----- --Apple-Mail=_929853BD-BD9B-4EB3-A608-4B6496E6B2A1-- From owner-svn-src-head@freebsd.org Sat Jan 6 18:15:51 2018 Return-Path: Delivered-To: svn-src-head@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 7BE86EC5022 for ; Sat, 6 Jan 2018 18:15:51 +0000 (UTC) (envelope-from lists@eitanadler.com) Received: from mail-yw0-x229.google.com (mail-yw0-x229.google.com [IPv6:2607:f8b0:4002:c05::229]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 375FF794CD for ; Sat, 6 Jan 2018 18:15:51 +0000 (UTC) (envelope-from lists@eitanadler.com) Received: by mail-yw0-x229.google.com with SMTP id l23so2931706ywb.13 for ; Sat, 06 Jan 2018 10:15:51 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=eitanadler.com; s=0xdeadbeef; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=U0DAzdxEJdZ6W37+82TunQ99Fg0o8Ujw4+bUN8BcJ/I=; b=GUDQcVcCsz9S/Cjh1lpfvsQIo0RIjHEshuNHZNvxeEJ88w3f/am/3K1Wvy+JsW9XGz ccba3mJ0VR1s7d1vF9T87cRG7WBRXDoOfX0j6jKM2faLO640O9YNPzfAxLR1iM9o9QIm LnGjKTrO272Cf10t1VckpBf1QyXSXliw9U1pQ= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=U0DAzdxEJdZ6W37+82TunQ99Fg0o8Ujw4+bUN8BcJ/I=; b=pjCR2ZVZHJaUDzbFGvGqRNOT7Zuy+mpOhrbesbJ+T6OsDmFsSG6IpnYdA6nobf4m5y QyiLfupKdA6Zs6wA7ILF2MT7qpLMtAD872YEv2lK0IhVx/aDzDzZG6pk+eueURDz8fJZ aXgDjhmOKqyEG/4VTJAEk2B+2kUnTR10UJ8w0ZN6mH8LrEdhuSca2Hh6LYMzNHdHwrpt xID15t9G1p5b5loE522ZZJR/4g7kao3tYklD1zWlGkQOEYqhu8Ip8SePC2tJnyJOEfTU F49PaAQKAvc1mBt9tHveClR9kpu6krRIKhYNOdX2d9eGIS8SoJNUV0t4D6a5Y9Da7+Bg yieA== X-Gm-Message-State: AKGB3mKSX1hg7qPc36O4qyu4p7M3C6p6eRxkTvF9vFwISSag+PP0/nc1 g8Lv7CRKWPyXv54/QC2XqxZsQ2eePjn+VGFhpM1MLg== X-Google-Smtp-Source: ACJfBouZ4map8KnluwkqnUYGl67d53hQzIL5CpoFXok9zgn7RqYbnc5jJlxCo4PR2/DiXVKiZc0e29Tn058r3Bknoqo= X-Received: by 10.13.220.133 with SMTP id f127mr6798622ywe.204.1515262550306; Sat, 06 Jan 2018 10:15:50 -0800 (PST) MIME-Version: 1.0 Received: by 10.37.217.21 with HTTP; Sat, 6 Jan 2018 10:15:19 -0800 (PST) In-Reply-To: References: <201801060948.w069m4Rb058364@repo.freebsd.org> <8CD482D7-1C01-480E-A2DE-5B9E1ACF05D4@FreeBSD.org> From: Eitan Adler Date: Sat, 6 Jan 2018 10:15:19 -0800 Message-ID: Subject: Re: svn commit: r327616 - head/usr.bin/morse To: Dimitry Andric Cc: Li-Wen Hsu , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Content-Type: text/plain; charset="UTF-8" X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 06 Jan 2018 18:15:51 -0000 On 6 January 2018 at 09:02, Dimitry Andric wrote: > On 6 Jan 2018, at 17:51, Eitan Adler wrote: >> >> On 6 January 2018 at 08:36, Dimitry Andric wrote: >>> On 6 Jan 2018, at 14:19, Eitan Adler wrote: > ... >>>> Why is testing with "make obj; make" in the morse directory insufficient? > ... >>> usr.bin/morse/morse.c:602:15: error: unused parameter 'stream' [-Werror,-Wunused-parameter] >>> fdecode(FILE *stream) >>> ^ >>> 1 error generated. >>> >>> Maybe you have warnings turned off in your local build environment? >> >> Is there anything that I could set in my environment that would >> override the command line flags? > > It depends. Many people have /etc/make.conf or /etc/src.conf files with > extensive settings and compiler flag modifications, so usually the first > advice is to do: > > export __MAKE_CONF=/dev/null > export SRCCONF=/dev/null > > then attempt to build again. If that works, then slowly go through the > make.conf or src.conf settings, enabling them one by one until you > reproduce the failure (or unexpected success :). Makes sense. I was asking since I copy/pasted the log above which results in success and includes the compiler warnings. My best guess right now is that my timestamps are off resulting a rebuild not actually happening. Either way, thank you to Li-Wen Hsu for fixing and everyone else for dealing with me ;) -- Eitan Adler From owner-svn-src-head@freebsd.org Sat Jan 6 20:32:15 2018 Return-Path: Delivered-To: svn-src-head@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 72140DDBEDB; Sat, 6 Jan 2018 20:32:15 +0000 (UTC) (envelope-from manu@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4EB837E487; Sat, 6 Jan 2018 20:32:15 +0000 (UTC) (envelope-from manu@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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id A783717444; Sat, 6 Jan 2018 20:32:14 +0000 (UTC) (envelope-from manu@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w06KWEPl033451; Sat, 6 Jan 2018 20:32:14 GMT (envelope-from manu@FreeBSD.org) Received: (from manu@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w06KWEjR033450; Sat, 6 Jan 2018 20:32:14 GMT (envelope-from manu@FreeBSD.org) Message-Id: <201801062032.w06KWEjR033450@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: manu set sender to manu@FreeBSD.org using -f From: Emmanuel Vadot Date: Sat, 6 Jan 2018 20:32:14 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r327636 - head/sys/conf X-SVN-Group: head X-SVN-Commit-Author: manu X-SVN-Commit-Paths: head/sys/conf X-SVN-Commit-Revision: 327636 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 06 Jan 2018 20:32:15 -0000 Author: manu Date: Sat Jan 6 20:32:14 2018 New Revision: 327636 URL: https://svnweb.freebsd.org/changeset/base/327636 Log: arm64: Remove old clock driver for Allwinner 64bit SoC All the clocks are now handled by the clkng driver. Tested On: Pine64-LTS (A64) Tested On: OrangePi PC2 (H5) Modified: head/sys/conf/files.arm64 Modified: head/sys/conf/files.arm64 ============================================================================== --- head/sys/conf/files.arm64 Sat Jan 6 20:22:32 2018 (r327635) +++ head/sys/conf/files.arm64 Sat Jan 6 20:32:14 2018 (r327636) @@ -23,17 +23,13 @@ cloudabi64_vdso_blob.o optional compat_cloudabi64 \ no-implicit-rule \ clean "cloudabi64_vdso_blob.o" # + +# Allwinner common files arm/allwinner/a10_ehci.c optional ehci aw_ehci fdt arm/allwinner/aw_gpio.c optional gpio aw_gpio fdt arm/allwinner/aw_mmc.c optional mmc aw_mmc fdt -arm/allwinner/a64/a64_padconf.c optional soc_allwinner_a64 fdt -arm/allwinner/a64/a64_r_padconf.c optional soc_allwinner_a64 fdt -arm/allwinner/h3/h3_padconf.c optional soc_allwinner_h5 fdt -arm/allwinner/h3/h3_r_padconf.c optional soc_allwinner_h5 fdt -arm/allwinner/aw_ccu.c optional aw_ccu fdt arm/allwinner/aw_nmi.c optional aw_nmi fdt \ compile-with "${NORMAL_C} -I$S/gnu/dts/include" -arm/allwinner/aw_reset.c optional aw_ccu fdt arm/allwinner/aw_rsb.c optional aw_rsb fdt arm/allwinner/aw_rtc.c optional aw_rtc fdt arm/allwinner/aw_sid.c optional aw_sid fdt @@ -41,25 +37,23 @@ arm/allwinner/aw_thermal.c optional aw_thermal fdt arm/allwinner/aw_usbphy.c optional ehci aw_usbphy fdt arm/allwinner/aw_wdog.c optional aw_wdog fdt arm/allwinner/axp81x.c optional axp81x fdt -arm/allwinner/clk/aw_ahbclk.c optional aw_ccu fdt -arm/allwinner/clk/aw_apbclk.c optional aw_ccu fdt -arm/allwinner/clk/aw_axiclk.c optional aw_ccu fdt -arm/allwinner/clk/aw_cpuclk.c optional aw_ccu fdt -arm/allwinner/clk/aw_gate.c optional aw_ccu fdt -arm/allwinner/clk/aw_modclk.c optional aw_ccu fdt -arm/allwinner/clk/aw_pll.c optional aw_ccu fdt \ - compile-with "${NORMAL_C} -I$S/gnu/dts/include" -arm/allwinner/clk/aw_thsclk.c optional aw_ccu fdt -arm/allwinner/clk/aw_usbclk.c optional aw_ccu fdt -arm/allwinner/clkng/aw_ccung.c optional aw_ccu fdt +arm/allwinner/if_awg.c optional awg ext_resources syscon fdt + +# Allwinner clock driver +arm/allwinner/clkng/aw_ccung.c optional aw_ccu fdt arm/allwinner/clkng/aw_clk_nkmp.c optional aw_ccu fdt -arm/allwinner/clkng/aw_clk_nm.c optional aw_ccu fdt +arm/allwinner/clkng/aw_clk_nm.c optional aw_ccu fdt arm/allwinner/clkng/aw_clk_prediv_mux.c optional aw_ccu fdt -arm/allwinner/clkng/ccu_a64.c optional aw_ccu fdt -arm/allwinner/clkng/ccu_h3.c optional aw_ccu fdt +arm/allwinner/clkng/ccu_a64.c optional soc_allwinner_a64 aw_ccu fdt +arm/allwinner/clkng/ccu_h3.c optional soc_allwinner_h5 aw_ccu fdt arm/allwinner/clkng/ccu_sun8i_r.c optional aw_ccu fdt -arm/allwinner/if_awg.c optional awg ext_resources syscon fdt +# Allwinner padconf files +arm/allwinner/a64/a64_padconf.c optional soc_allwinner_a64 fdt +arm/allwinner/a64/a64_r_padconf.c optional soc_allwinner_a64 fdt +arm/allwinner/h3/h3_padconf.c optional soc_allwinner_h5 fdt +arm/allwinner/h3/h3_r_padconf.c optional soc_allwinner_h5 fdt + arm/annapurna/alpine/alpine_ccu.c optional al_ccu fdt arm/annapurna/alpine/alpine_nb_service.c optional al_nb_service fdt arm/annapurna/alpine/alpine_pci.c optional al_pci fdt From owner-svn-src-head@freebsd.org Sat Jan 6 21:56:15 2018 Return-Path: Delivered-To: svn-src-head@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 99035DF4CB6; Sat, 6 Jan 2018 21:56:15 +0000 (UTC) (envelope-from bu7cher@yandex.ru) Received: from forward100p.mail.yandex.net (forward100p.mail.yandex.net [IPv6:2a02:6b8:0:1472:2741:0:8b7:100]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "forwards.mail.yandex.net", Issuer "Yandex CA" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 3AC1AAC7; Sat, 6 Jan 2018 21:56:15 +0000 (UTC) (envelope-from bu7cher@yandex.ru) Received: from mxback15j.mail.yandex.net (mxback15j.mail.yandex.net [IPv6:2a02:6b8:0:1619::91]) by forward100p.mail.yandex.net (Yandex) with ESMTP id 9D2585102632; Sun, 7 Jan 2018 00:56:02 +0300 (MSK) Received: from smtp2o.mail.yandex.net (smtp2o.mail.yandex.net [2a02:6b8:0:1a2d::26]) by mxback15j.mail.yandex.net (nwsmtp/Yandex) with ESMTP id rg7MKNMHYY-u2GuPxns; Sun, 07 Jan 2018 00:56:02 +0300 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yandex.ru; s=mail; t=1515275762; bh=7438ZicwSIfhsRtn0DMpp4n+FNh1XFg8v4Gn1nauKC8=; h=Subject:To:Cc:References:From:Message-ID:Date:In-Reply-To; b=QdMF2lUHJOH/qhTUElplG5aIHebj4VW9fVa6b1jxL6xQ2IY4qQMxfyscYBlfcNQpC Wua4gbzeiZhjNsvwCuvVEEbefx28UaGrCu4dPuENZTNDvCzwAmbViyYT+uuybPwHPD JXF4bxx4euMFxekNoXfXYwAhNU9i43Sxop68nFTs= Received: by smtp2o.mail.yandex.net (nwsmtp/Yandex) with ESMTPSA id NiaxHXB93k-u0dquard; Sun, 07 Jan 2018 00:56:01 +0300 (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client certificate not present) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yandex.ru; s=mail; t=1515275761; bh=7438ZicwSIfhsRtn0DMpp4n+FNh1XFg8v4Gn1nauKC8=; h=Subject:To:Cc:References:From:Message-ID:Date:In-Reply-To; b=TfYjjPciSHmVt866diFFYxIgVfllNelypWg1Vh+DW921X8faG4Dbsq0nRTrgSUOTR Coq6kBQplgC22EtH35I5Zq1sSojSX4hA0+LhUXcX/O4CNxpfFufbKeB6ac1z+ehHWn NFecl/uLKTsd+ZCTX4jyo2B8bS1aQlllSTA+jgR8= Authentication-Results: smtp2o.mail.yandex.net; dkim=pass header.i=@yandex.ru Subject: Re: svn commit: r327559 - in head: . sys/net To: Steven Hartland , hiren panchasara Cc: Eugene Grosbein , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org References: <201801042005.w04K5liB049411@repo.freebsd.org> <5A4E9397.9000308@grosbein.net> <20180104224214.GD18879@strugglingcoder.info> <63c3c450-aeaf-bdd5-5e16-414146c9bb3a@multiplay.co.uk> <20180105094126.GE18879@strugglingcoder.info> <1854b421-3c09-c040-ba86-738b9c621eae@multiplay.co.uk> From: "Andrey V. Elsukov" Openpgp: id=E6591E1B41DA1516F0C9BC0001C5EA0410C8A17A Message-ID: <1bee1434-efe2-efc8-977b-27f7236231b9@yandex.ru> Date: Sun, 7 Jan 2018 00:53:47 +0300 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:52.0) Gecko/20100101 Thunderbird/52.2.1 MIME-Version: 1.0 In-Reply-To: <1854b421-3c09-c040-ba86-738b9c621eae@multiplay.co.uk> Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="WnvVVgy19ZrsTyptZ0ZlHJANjuFciS7rm" X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 06 Jan 2018 21:56:15 -0000 This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --WnvVVgy19ZrsTyptZ0ZlHJANjuFciS7rm Content-Type: multipart/mixed; boundary="aD9CIey5hL2xLwATfSu8HtuJxjI8goJsE"; protected-headers="v1" From: "Andrey V. Elsukov" To: Steven Hartland , hiren panchasara Cc: Eugene Grosbein , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Message-ID: <1bee1434-efe2-efc8-977b-27f7236231b9@yandex.ru> Subject: Re: svn commit: r327559 - in head: . sys/net References: <201801042005.w04K5liB049411@repo.freebsd.org> <5A4E9397.9000308@grosbein.net> <20180104224214.GD18879@strugglingcoder.info> <63c3c450-aeaf-bdd5-5e16-414146c9bb3a@multiplay.co.uk> <20180105094126.GE18879@strugglingcoder.info> <1854b421-3c09-c040-ba86-738b9c621eae@multiplay.co.uk> In-Reply-To: <1854b421-3c09-c040-ba86-738b9c621eae@multiplay.co.uk> --aD9CIey5hL2xLwATfSu8HtuJxjI8goJsE Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: quoted-printable On 05.01.2018 19:11, Steven Hartland wrote: >> I am mostly concerned about the overhead of manual calculation but my >> knowledge is a bit rusty right now and lagg has always been special so= >> please try this out and see. >> >=20 > I've not been able to find any such option: > head:src> grep -ri rss sys/amd64/conf/ > head:src> >=20 > Any other ideas on where it might be or is it just the default on HEAD?= "options RSS" is not in the GENERIC kernel and it is defined in sys/conf/= * --=20 WBR, Andrey V. Elsukov --aD9CIey5hL2xLwATfSu8HtuJxjI8goJsE-- --WnvVVgy19ZrsTyptZ0ZlHJANjuFciS7rm Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ iQEzBAEBCAAdFiEE5lkeG0HaFRbwybwAAcXqBBDIoXoFAlpRRWsACgkQAcXqBBDI oXr7kQf9Evx8KPnWnRKSsITfD6sp4f4rVjD4hbDM3l1swDe3B/7KlfZeGvc3VmpP u+pcJ40KQxdx7klyiovNloIPLvbgl6dZqnow/sgsdlix+ojfwMWqodd10oVj0Vge IvLurO7nh26uPnNAaj2eBjlwfz3kD6todDcg5vhHG/RqQmPnDVbztyvghpPYQIfp zLyOmYxBpUEgafoPtPfFQ0t+P2/HWvkdLS1b+J1jLQXEuxEiAY0g2M9v1pO7j/BT PZpNdxTUSF7RcxkdERXo88a6AJGoCazDiV0eu63Rf+l3BZlHp0pZ+AiO45ek/DXp jUmGt00OMEbB0CW8wLS2Us3NngJejg== =Vy2I -----END PGP SIGNATURE----- --WnvVVgy19ZrsTyptZ0ZlHJANjuFciS7rm--