From owner-svn-src-all@freebsd.org Sun Dec 31 00:31:16 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 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-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" 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-all@freebsd.org Sun Dec 31 00:33:29 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 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-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" 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-all@freebsd.org Sun Dec 31 00:34:31 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 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-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" 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-all@freebsd.org Sun Dec 31 00:35:13 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 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-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" 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-all@freebsd.org Sun Dec 31 00:37:52 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 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-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" 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-all@freebsd.org Sun Dec 31 00:46:43 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 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-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" 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-all@freebsd.org Sun Dec 31 00:47:06 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 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-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" 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-all@freebsd.org Sun Dec 31 00:55:02 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 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-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" 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-all@freebsd.org Sun Dec 31 02:31:02 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 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-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" 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-all@freebsd.org Sun Dec 31 01:59:58 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 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-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" 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-all@freebsd.org Sun Dec 31 03:17:30 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 23338E85252; Sun, 31 Dec 2017 03:17:30 +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 E23067DA02; Sun, 31 Dec 2017 03:17: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 vBV3HT9i091253; Sun, 31 Dec 2017 03:17:29 GMT (envelope-from mjg@FreeBSD.org) Received: (from mjg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id vBV3HTiF091252; Sun, 31 Dec 2017 03:17:29 GMT (envelope-from mjg@FreeBSD.org) Message-Id: <201712310317.vBV3HTiF091252@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 03:17:29 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r327407 - stable/11/usr.bin/xinstall X-SVN-Group: stable-11 X-SVN-Commit-Author: mjg X-SVN-Commit-Paths: stable/11/usr.bin/xinstall X-SVN-Commit-Revision: 327407 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 31 Dec 2017 03:17:30 -0000 Author: mjg Date: Sun Dec 31 03:17:28 2017 New Revision: 327407 URL: https://svnweb.freebsd.org/changeset/base/327407 Log: MFC r324547: xinstall: plug an infinite loop in directory creation If stat continues to fail with ENOENT and mkdir with EEXIST the code wont finish. In particular this can show up when the target path follows through a symlink to a non-existent directory. Modified: stable/11/usr.bin/xinstall/xinstall.c Directory Properties: stable/11/ (props changed) Modified: stable/11/usr.bin/xinstall/xinstall.c ============================================================================== --- stable/11/usr.bin/xinstall/xinstall.c Sun Dec 31 03:15:45 2017 (r327406) +++ stable/11/usr.bin/xinstall/xinstall.c Sun Dec 31 03:17:28 2017 (r327407) @@ -1292,17 +1292,19 @@ install_dir(char *path) { char *p; struct stat sb; - int ch; + int ch, tried_mkdir; for (p = path;; ++p) if (!*p || (p != path && *p == '/')) { + tried_mkdir = 0; ch = *p; *p = '\0'; again: if (stat(path, &sb) < 0) { - if (errno != ENOENT) + if (errno != ENOENT || tried_mkdir) err(EX_OSERR, "stat %s", path); if (mkdir(path, 0755) < 0) { + tried_mkdir = 1; if (errno == EEXIST) goto again; err(EX_OSERR, "mkdir %s", path); From owner-svn-src-all@freebsd.org Sun Dec 31 03:13:46 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 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-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 31 Dec 2017 03:13:47 -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-all@freebsd.org Sun Dec 31 04:06:12 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 8E3A5E89437; Sun, 31 Dec 2017 04:06:12 +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 3E86D7F9D4; Sun, 31 Dec 2017 04:06:12 +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 vBV46BBw012339; Sun, 31 Dec 2017 04:06:11 GMT (envelope-from mjg@FreeBSD.org) Received: (from mjg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id vBV46Bvp012338; Sun, 31 Dec 2017 04:06:11 GMT (envelope-from mjg@FreeBSD.org) Message-Id: <201712310406.vBV46Bvp012338@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 04:06:11 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r327411 - stable/11/sys/kern X-SVN-Group: stable-11 X-SVN-Commit-Author: mjg X-SVN-Commit-Paths: stable/11/sys/kern X-SVN-Commit-Revision: 327411 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 31 Dec 2017 04:06:12 -0000 Author: mjg Date: Sun Dec 31 04:06:11 2017 New Revision: 327411 URL: https://svnweb.freebsd.org/changeset/base/327411 Log: MFC r323307,r323308,r323385,r324378,r325266,r325268,r325433,r325451,r325456, r325458: namecache: factor out dot lookup into a dedicated function The intent is to move uncommon cases out of the way. ============= namecache: fold the unlock label into the only consumer No functional changes. ============= namecache: clean up struct namecache_ts handling namecache_ts differs from mere namecache by few fields placed mid struct. The access to the last element (the name) is thus special-cased. The standard solution is to put new fields at the very beginning anad embedd the original struct. The pointer shuffled around points to the embedded part. If needed, access to new fields can be gained through __containerof. ============= namecache: factor out ~MAKEENTRY lookups from the common path Lookups of the sort are rare compared to regular ones and succesfull ones result in removing entries from the cache. In the current code buckets are rlocked and a trylock dance is performed, which can fail and cause a restart. Fixing it will require a little bit of surgery and in order to keep the code maintaineable the 2 cases have to split. ============= namecache: ncnegfactor 16 -> 12 It is used on each new entry addition to decide whether to whack an existing negative entry in order to prevent a blow out in size, but the parameter was set years ago and never revisited. Building with poudriere results in about 400 evictions per second which unnecessarily grab entries from the hot list. With the new parameter there are next to no evictions of the sort. ============= namecache: fix .. check broken after r324378 ============= namecache: skip locking in cache_purge_negative if there are no entries ============= namecache: skip locking in cache_lookup_nomakeentry if there is no entry ============= namecache: wlock buckets in cache_lookup_nomakeentry Since the case of an empty chain was already covered, it si very likely that the existing entry is matching. Skipping readlocking saves on lock upgrade. ============= namecache: bump numcache after dropping all locks This makes no difference correctness-wise, but shortens total hold time. Modified: stable/11/sys/kern/vfs_cache.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/kern/vfs_cache.c ============================================================================== --- stable/11/sys/kern/vfs_cache.c Sun Dec 31 04:01:47 2017 (r327410) +++ stable/11/sys/kern/vfs_cache.c Sun Dec 31 04:06:11 2017 (r327411) @@ -13,7 +13,7 @@ * 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. - * 4. Neither the name of the University nor the names of its contributors + * 3. Neither the name of the University nor the names of its contributors * may be used to endorse or promote products derived from this software * without specific prior written permission. * @@ -117,20 +117,10 @@ struct namecache { * parent. */ struct namecache_ts { - LIST_ENTRY(namecache) nc_hash; /* hash chain */ - LIST_ENTRY(namecache) nc_src; /* source vnode list */ - TAILQ_ENTRY(namecache) nc_dst; /* destination vnode list */ - struct vnode *nc_dvp; /* vnode of parent of name */ - union { - struct vnode *nu_vp; /* vnode the name refers to */ - u_int nu_neghits; /* negative entry hits */ - } n_un; - u_char nc_flag; /* flag bits */ - u_char nc_nlen; /* length of name */ struct timespec nc_time; /* timespec provided by fs */ struct timespec nc_dotdottime; /* dotdot timespec provided by fs */ int nc_ticks; /* ticks value when entry was added */ - char nc_name[0]; /* segment name + nul */ + struct namecache nc_nc; }; #define nc_vp n_un.nu_vp @@ -204,7 +194,7 @@ static __read_mostly LIST_HEAD(nchashhead, namecache) static u_long __read_mostly nchash; /* size of hash table */ SYSCTL_ULONG(_debug, OID_AUTO, nchash, CTLFLAG_RD, &nchash, 0, "Size of namecache hash table"); -static u_long __read_mostly ncnegfactor = 16; /* ratio of negative entries */ +static u_long __read_mostly ncnegfactor = 12; /* ratio of negative entries */ SYSCTL_ULONG(_vfs, OID_AUTO, ncnegfactor, CTLFLAG_RW, &ncnegfactor, 0, "Ratio of negative namecache entries"); static u_long __exclusive_cache_line numneg; /* number of negative entries allocated */ @@ -281,63 +271,64 @@ static uma_zone_t __read_mostly cache_zone_large_ts; static struct namecache * cache_alloc(int len, int ts) { + struct namecache_ts *ncp_ts; + struct namecache *ncp; - if (len > CACHE_PATH_CUTOFF) { - if (ts) - return (uma_zalloc(cache_zone_large_ts, M_WAITOK)); + if (__predict_false(ts)) { + if (len <= CACHE_PATH_CUTOFF) + ncp_ts = uma_zalloc(cache_zone_small_ts, M_WAITOK); else - return (uma_zalloc(cache_zone_large, M_WAITOK)); + ncp_ts = uma_zalloc(cache_zone_large_ts, M_WAITOK); + ncp = &ncp_ts->nc_nc; + } else { + if (len <= CACHE_PATH_CUTOFF) + ncp = uma_zalloc(cache_zone_small, M_WAITOK); + else + ncp = uma_zalloc(cache_zone_large, M_WAITOK); } - if (ts) - return (uma_zalloc(cache_zone_small_ts, M_WAITOK)); - else - return (uma_zalloc(cache_zone_small, M_WAITOK)); + return (ncp); } static void cache_free(struct namecache *ncp) { - int ts; + struct namecache_ts *ncp_ts; if (ncp == NULL) return; - ts = ncp->nc_flag & NCF_TS; if ((ncp->nc_flag & NCF_DVDROP) != 0) vdrop(ncp->nc_dvp); - if (ncp->nc_nlen <= CACHE_PATH_CUTOFF) { - if (ts) - uma_zfree(cache_zone_small_ts, ncp); + if (__predict_false(ncp->nc_flag & NCF_TS)) { + ncp_ts = __containerof(ncp, struct namecache_ts, nc_nc); + if (ncp->nc_nlen <= CACHE_PATH_CUTOFF) + uma_zfree(cache_zone_small_ts, ncp_ts); else + uma_zfree(cache_zone_large_ts, ncp_ts); + } else { + if (ncp->nc_nlen <= CACHE_PATH_CUTOFF) uma_zfree(cache_zone_small, ncp); - } else if (ts) - uma_zfree(cache_zone_large_ts, ncp); - else - uma_zfree(cache_zone_large, ncp); + else + uma_zfree(cache_zone_large, ncp); + } } -static char * -nc_get_name(struct namecache *ncp) -{ - struct namecache_ts *ncp_ts; - - if ((ncp->nc_flag & NCF_TS) == 0) - return (ncp->nc_name); - ncp_ts = (struct namecache_ts *)ncp; - return (ncp_ts->nc_name); -} - static void cache_out_ts(struct namecache *ncp, struct timespec *tsp, int *ticksp) { + struct namecache_ts *ncp_ts; KASSERT((ncp->nc_flag & NCF_TS) != 0 || (tsp == NULL && ticksp == NULL), ("No NCF_TS")); + if (tsp == NULL && ticksp == NULL) + return; + + ncp_ts = __containerof(ncp, struct namecache_ts, nc_nc); if (tsp != NULL) - *tsp = ((struct namecache_ts *)ncp)->nc_time; + *tsp = ncp_ts->nc_time; if (ticksp != NULL) - *ticksp = ((struct namecache_ts *)ncp)->nc_ticks; + *ticksp = ncp_ts->nc_ticks; } static int __read_mostly doingcache = 1; /* 1 => enable the cache */ @@ -437,7 +428,7 @@ NCP2BUCKETLOCK(struct namecache *ncp) { uint32_t hash; - hash = cache_get_hash(nc_get_name(ncp), ncp->nc_nlen, ncp->nc_dvp); + hash = cache_get_hash(ncp->nc_name, ncp->nc_nlen, ncp->nc_dvp); return (HASH2BUCKETLOCK(hash)); } @@ -823,7 +814,7 @@ cache_negative_zap_one(void) goto out_unlock_all; } SDT_PROBE3(vfs, namecache, shrink_negative, done, ncp->nc_dvp, - nc_get_name(ncp), ncp->nc_neghits); + ncp->nc_name, ncp->nc_neghits); cache_zap_locked(ncp, true); out_unlock_all: @@ -854,10 +845,10 @@ cache_zap_locked(struct namecache *ncp, bool neg_locke (ncp->nc_flag & NCF_NEGATIVE) ? NULL : ncp->nc_vp); if (!(ncp->nc_flag & NCF_NEGATIVE)) { SDT_PROBE3(vfs, namecache, zap, done, ncp->nc_dvp, - nc_get_name(ncp), ncp->nc_vp); + ncp->nc_name, ncp->nc_vp); } else { SDT_PROBE3(vfs, namecache, zap_negative, done, ncp->nc_dvp, - nc_get_name(ncp), ncp->nc_neghits); + ncp->nc_name, ncp->nc_neghits); } LIST_REMOVE(ncp, nc_hash); if (!(ncp->nc_flag & NCF_NEGATIVE)) { @@ -993,6 +984,28 @@ out: } static int +cache_zap_wlocked_bucket(struct namecache *ncp, struct rwlock *blp) +{ + struct mtx *dvlp, *vlp; + + cache_assert_bucket_locked(ncp, RA_WLOCKED); + + dvlp = VP2VNODELOCK(ncp->nc_dvp); + vlp = NULL; + if (!(ncp->nc_flag & NCF_NEGATIVE)) + vlp = VP2VNODELOCK(ncp->nc_vp); + if (cache_trylock_vnodes(dvlp, vlp) == 0) { + cache_zap_locked(ncp, false); + rw_wunlock(blp); + cache_unlock_vnodes(dvlp, vlp); + return (0); + } + + rw_wunlock(blp); + return (EAGAIN); +} + +static int cache_zap_rlocked_bucket(struct namecache *ncp, struct rwlock *blp) { struct mtx *dvlp, *vlp; @@ -1067,12 +1080,47 @@ cache_lookup_unlock(struct rwlock *blp, struct mtx *vl if (blp != NULL) { rw_runlock(blp); - mtx_assert(vlp, MA_NOTOWNED); } else { mtx_unlock(vlp); } } +static int __noinline +cache_lookup_dot(struct vnode *dvp, struct vnode **vpp, struct componentname *cnp, + struct timespec *tsp, int *ticksp) +{ + int ltype; + + *vpp = dvp; + CTR2(KTR_VFS, "cache_lookup(%p, %s) found via .", + dvp, cnp->cn_nameptr); + counter_u64_add(dothits, 1); + SDT_PROBE3(vfs, namecache, lookup, hit, dvp, ".", *vpp); + if (tsp != NULL) + timespecclear(tsp); + if (ticksp != NULL) + *ticksp = ticks; + vrefact(*vpp); + /* + * When we lookup "." we still can be asked to lock it + * differently... + */ + ltype = cnp->cn_lkflags & LK_TYPE_MASK; + if (ltype != VOP_ISLOCKED(*vpp)) { + if (ltype == LK_EXCLUSIVE) { + vn_lock(*vpp, LK_UPGRADE | LK_RETRY); + if ((*vpp)->v_iflag & VI_DOOMED) { + /* forced unmount */ + vrele(*vpp); + *vpp = NULL; + return (ENOENT); + } + } else + vn_lock(*vpp, LK_DOWNGRADE | LK_RETRY); + } + return (-1); +} + /* * Lookup an entry in the cache * @@ -1090,10 +1138,94 @@ cache_lookup_unlock(struct rwlock *blp, struct mtx *vl * not recursively acquired. */ +static __noinline int +cache_lookup_nomakeentry(struct vnode *dvp, struct vnode **vpp, + struct componentname *cnp, struct timespec *tsp, int *ticksp) +{ + struct namecache *ncp; + struct rwlock *blp; + struct mtx *dvlp, *dvlp2; + uint32_t hash; + int error; + + if (cnp->cn_namelen == 2 && + cnp->cn_nameptr[0] == '.' && cnp->cn_nameptr[1] == '.') { + counter_u64_add(dotdothits, 1); + dvlp = VP2VNODELOCK(dvp); + dvlp2 = NULL; + mtx_lock(dvlp); +retry_dotdot: + ncp = dvp->v_cache_dd; + if (ncp == NULL) { + SDT_PROBE3(vfs, namecache, lookup, miss, dvp, + "..", NULL); + mtx_unlock(dvlp); + if (dvlp2 != NULL) + mtx_unlock(dvlp2); + return (0); + } + if ((ncp->nc_flag & NCF_ISDOTDOT) != 0) { + if (ncp->nc_dvp != dvp) + panic("dvp %p v_cache_dd %p\n", dvp, ncp); + if (!cache_zap_locked_vnode_kl2(ncp, + dvp, &dvlp2)) + goto retry_dotdot; + MPASS(dvp->v_cache_dd == NULL); + mtx_unlock(dvlp); + if (dvlp2 != NULL) + mtx_unlock(dvlp2); + cache_free(ncp); + } else { + dvp->v_cache_dd = NULL; + mtx_unlock(dvlp); + if (dvlp2 != NULL) + mtx_unlock(dvlp2); + } + return (0); + } + + hash = cache_get_hash(cnp->cn_nameptr, cnp->cn_namelen, dvp); + blp = HASH2BUCKETLOCK(hash); +retry: + if (LIST_EMPTY(NCHHASH(hash))) + goto out_no_entry; + + rw_wlock(blp); + + LIST_FOREACH(ncp, (NCHHASH(hash)), nc_hash) { + counter_u64_add(numchecks, 1); + if (ncp->nc_dvp == dvp && ncp->nc_nlen == cnp->cn_namelen && + !bcmp(ncp->nc_name, cnp->cn_nameptr, ncp->nc_nlen)) + break; + } + + /* We failed to find an entry */ + if (ncp == NULL) { + rw_wunlock(blp); + goto out_no_entry; + } + + counter_u64_add(numposzaps, 1); + + error = cache_zap_wlocked_bucket(ncp, blp); + if (error != 0) { + zap_and_exit_bucket_fail++; + cache_maybe_yield(); + goto retry; + } + cache_free(ncp); + return (0); +out_no_entry: + SDT_PROBE3(vfs, namecache, lookup, miss, dvp, cnp->cn_nameptr, NULL); + counter_u64_add(nummisszap, 1); + return (0); +} + int cache_lookup(struct vnode *dvp, struct vnode **vpp, struct componentname *cnp, struct timespec *tsp, int *ticksp) { + struct namecache_ts *ncp_ts; struct namecache *ncp; struct rwlock *blp; struct mtx *dvlp, *dvlp2; @@ -1104,98 +1236,52 @@ cache_lookup(struct vnode *dvp, struct vnode **vpp, st cnp->cn_flags &= ~MAKEENTRY; return (0); } + + counter_u64_add(numcalls, 1); + + if (__predict_false(cnp->cn_namelen == 1 && cnp->cn_nameptr[0] == '.')) + return (cache_lookup_dot(dvp, vpp, cnp, tsp, ticksp)); + + if ((cnp->cn_flags & MAKEENTRY) == 0) + return (cache_lookup_nomakeentry(dvp, vpp, cnp, tsp, ticksp)); + retry: blp = NULL; - dvlp = VP2VNODELOCK(dvp); error = 0; - counter_u64_add(numcalls, 1); - - if (cnp->cn_nameptr[0] == '.') { - if (cnp->cn_namelen == 1) { - *vpp = dvp; - CTR2(KTR_VFS, "cache_lookup(%p, %s) found via .", - dvp, cnp->cn_nameptr); - counter_u64_add(dothits, 1); - SDT_PROBE3(vfs, namecache, lookup, hit, dvp, ".", *vpp); - if (tsp != NULL) - timespecclear(tsp); - if (ticksp != NULL) - *ticksp = ticks; - vrefact(*vpp); - /* - * When we lookup "." we still can be asked to lock it - * differently... - */ - ltype = cnp->cn_lkflags & LK_TYPE_MASK; - if (ltype != VOP_ISLOCKED(*vpp)) { - if (ltype == LK_EXCLUSIVE) { - vn_lock(*vpp, LK_UPGRADE | LK_RETRY); - if ((*vpp)->v_iflag & VI_DOOMED) { - /* forced unmount */ - vrele(*vpp); - *vpp = NULL; - return (ENOENT); - } - } else - vn_lock(*vpp, LK_DOWNGRADE | LK_RETRY); - } - return (-1); + if (cnp->cn_namelen == 2 && + cnp->cn_nameptr[0] == '.' && cnp->cn_nameptr[1] == '.') { + counter_u64_add(dotdothits, 1); + dvlp = VP2VNODELOCK(dvp); + dvlp2 = NULL; + mtx_lock(dvlp); + ncp = dvp->v_cache_dd; + if (ncp == NULL) { + SDT_PROBE3(vfs, namecache, lookup, miss, dvp, + "..", NULL); + mtx_unlock(dvlp); + return (0); } - if (cnp->cn_namelen == 2 && cnp->cn_nameptr[1] == '.') { - counter_u64_add(dotdothits, 1); - dvlp2 = NULL; - mtx_lock(dvlp); -retry_dotdot: - ncp = dvp->v_cache_dd; - if (ncp == NULL) { - SDT_PROBE3(vfs, namecache, lookup, miss, dvp, - "..", NULL); - mtx_unlock(dvlp); - if (dvlp2 != NULL) - mtx_unlock(dvlp2); - return (0); - } - if ((cnp->cn_flags & MAKEENTRY) == 0) { - if ((ncp->nc_flag & NCF_ISDOTDOT) != 0) { - if (ncp->nc_dvp != dvp) - panic("dvp %p v_cache_dd %p\n", dvp, ncp); - if (!cache_zap_locked_vnode_kl2(ncp, - dvp, &dvlp2)) - goto retry_dotdot; - MPASS(dvp->v_cache_dd == NULL); - mtx_unlock(dvlp); - if (dvlp2 != NULL) - mtx_unlock(dvlp2); - cache_free(ncp); - } else { - dvp->v_cache_dd = NULL; - mtx_unlock(dvlp); - if (dvlp2 != NULL) - mtx_unlock(dvlp2); - } - return (0); - } - if ((ncp->nc_flag & NCF_ISDOTDOT) != 0) { - if (ncp->nc_flag & NCF_NEGATIVE) - *vpp = NULL; - else - *vpp = ncp->nc_vp; - } else - *vpp = ncp->nc_dvp; - /* Return failure if negative entry was found. */ - if (*vpp == NULL) - goto negative_success; - CTR3(KTR_VFS, "cache_lookup(%p, %s) found %p via ..", - dvp, cnp->cn_nameptr, *vpp); - SDT_PROBE3(vfs, namecache, lookup, hit, dvp, "..", - *vpp); - cache_out_ts(ncp, tsp, ticksp); - if ((ncp->nc_flag & (NCF_ISDOTDOT | NCF_DTS)) == - NCF_DTS && tsp != NULL) - *tsp = ((struct namecache_ts *)ncp)-> - nc_dotdottime; - goto success; + if ((ncp->nc_flag & NCF_ISDOTDOT) != 0) { + if (ncp->nc_flag & NCF_NEGATIVE) + *vpp = NULL; + else + *vpp = ncp->nc_vp; + } else + *vpp = ncp->nc_dvp; + /* Return failure if negative entry was found. */ + if (*vpp == NULL) + goto negative_success; + CTR3(KTR_VFS, "cache_lookup(%p, %s) found %p via ..", + dvp, cnp->cn_nameptr, *vpp); + SDT_PROBE3(vfs, namecache, lookup, hit, dvp, "..", + *vpp); + cache_out_ts(ncp, tsp, ticksp); + if ((ncp->nc_flag & (NCF_ISDOTDOT | NCF_DTS)) == + NCF_DTS && tsp != NULL) { + ncp_ts = __containerof(ncp, struct namecache_ts, nc_nc); + *tsp = ncp_ts->nc_dotdottime; } + goto success; } hash = cache_get_hash(cnp->cn_nameptr, cnp->cn_namelen, dvp); @@ -1205,35 +1291,26 @@ retry_dotdot: LIST_FOREACH(ncp, (NCHHASH(hash)), nc_hash) { counter_u64_add(numchecks, 1); if (ncp->nc_dvp == dvp && ncp->nc_nlen == cnp->cn_namelen && - !bcmp(nc_get_name(ncp), cnp->cn_nameptr, ncp->nc_nlen)) + !bcmp(ncp->nc_name, cnp->cn_nameptr, ncp->nc_nlen)) break; } /* We failed to find an entry */ if (ncp == NULL) { + rw_runlock(blp); SDT_PROBE3(vfs, namecache, lookup, miss, dvp, cnp->cn_nameptr, NULL); - if ((cnp->cn_flags & MAKEENTRY) == 0) { - counter_u64_add(nummisszap, 1); - } else { - counter_u64_add(nummiss, 1); - } - goto unlock; + counter_u64_add(nummiss, 1); + return (0); } - /* We don't want to have an entry, so dump it */ - if ((cnp->cn_flags & MAKEENTRY) == 0) { - counter_u64_add(numposzaps, 1); - goto zap_and_exit; - } - /* We found a "positive" match, return the vnode */ if (!(ncp->nc_flag & NCF_NEGATIVE)) { counter_u64_add(numposhits, 1); *vpp = ncp->nc_vp; CTR4(KTR_VFS, "cache_lookup(%p, %s) found %p via ncp %p", dvp, cnp->cn_nameptr, *vpp, ncp); - SDT_PROBE3(vfs, namecache, lookup, hit, dvp, nc_get_name(ncp), + SDT_PROBE3(vfs, namecache, lookup, hit, dvp, ncp->nc_name, *vpp); cache_out_ts(ncp, tsp, ticksp); goto success; @@ -1251,7 +1328,7 @@ negative_success: if (ncp->nc_flag & NCF_WHITE) cnp->cn_flags |= ISWHITEOUT; SDT_PROBE2(vfs, namecache, lookup, hit__negative, dvp, - nc_get_name(ncp)); + ncp->nc_name); cache_out_ts(ncp, tsp, ticksp); cache_lookup_unlock(blp, dvlp); return (ENOENT); @@ -1289,10 +1366,6 @@ success: } return (-1); -unlock: - cache_lookup_unlock(blp, dvlp); - return (0); - zap_and_exit: if (blp != NULL) error = cache_zap_rlocked_bucket(ncp, blp); @@ -1528,13 +1601,14 @@ cache_enter_time(struct vnode *dvp, struct vnode *vp, { struct celockstate cel; struct namecache *ncp, *n2, *ndd; - struct namecache_ts *n3; + struct namecache_ts *ncp_ts, *n2_ts; struct nchashhead *ncpp; struct neglist *neglist; uint32_t hash; int flag; int len; bool neg_locked; + int lnumcache; CTR3(KTR_VFS, "cache_enter(%p, %p, %s)", dvp, vp, cnp->cn_nameptr); VNASSERT(vp == NULL || (vp->v_iflag & VI_DOOMED) == 0, vp, @@ -1619,18 +1693,18 @@ cache_enter_time(struct vnode *dvp, struct vnode *vp, ncp->nc_flag |= NCF_NEGATIVE; ncp->nc_dvp = dvp; if (tsp != NULL) { - n3 = (struct namecache_ts *)ncp; - n3->nc_time = *tsp; - n3->nc_ticks = ticks; - n3->nc_flag |= NCF_TS; + ncp_ts = __containerof(ncp, struct namecache_ts, nc_nc); + ncp_ts->nc_time = *tsp; + ncp_ts->nc_ticks = ticks; + ncp_ts->nc_nc.nc_flag |= NCF_TS; if (dtsp != NULL) { - n3->nc_dotdottime = *dtsp; - n3->nc_flag |= NCF_DTS; + ncp_ts->nc_dotdottime = *dtsp; + ncp_ts->nc_nc.nc_flag |= NCF_DTS; } } len = ncp->nc_nlen = cnp->cn_namelen; hash = cache_get_hash(cnp->cn_nameptr, len, dvp); - strlcpy(nc_get_name(ncp), cnp->cn_nameptr, len + 1); + strlcpy(ncp->nc_name, cnp->cn_nameptr, len + 1); cache_enter_lock(&cel, dvp, vp, hash); /* @@ -1642,22 +1716,18 @@ cache_enter_time(struct vnode *dvp, struct vnode *vp, LIST_FOREACH(n2, ncpp, nc_hash) { if (n2->nc_dvp == dvp && n2->nc_nlen == cnp->cn_namelen && - !bcmp(nc_get_name(n2), cnp->cn_nameptr, n2->nc_nlen)) { + !bcmp(n2->nc_name, cnp->cn_nameptr, n2->nc_nlen)) { if (tsp != NULL) { KASSERT((n2->nc_flag & NCF_TS) != 0, ("no NCF_TS")); - n3 = (struct namecache_ts *)n2; - n3->nc_time = - ((struct namecache_ts *)ncp)->nc_time; - n3->nc_ticks = - ((struct namecache_ts *)ncp)->nc_ticks; + n2_ts = __containerof(n2, struct namecache_ts, nc_nc); + n2_ts->nc_time = ncp_ts->nc_time; + n2_ts->nc_ticks = ncp_ts->nc_ticks; if (dtsp != NULL) { - n3->nc_dotdottime = - ((struct namecache_ts *)ncp)-> - nc_dotdottime; + n2_ts->nc_dotdottime = ncp_ts->nc_dotdottime; if (ncp->nc_flag & NCF_NEGATIVE) mtx_lock(&ncneg_hot.nl_lock); - n3->nc_flag |= NCF_DTS; + n2_ts->nc_nc.nc_flag |= NCF_DTS; if (ncp->nc_flag & NCF_NEGATIVE) mtx_unlock(&ncneg_hot.nl_lock); } @@ -1678,7 +1748,6 @@ cache_enter_time(struct vnode *dvp, struct vnode *vp, dvp->v_cache_dd = ncp; } - atomic_add_rel_long(&numcache, 1); if (vp != NULL) { if (vp->v_type == VDIR) { if (flag != NCF_ISDOTDOT) { @@ -1721,17 +1790,18 @@ cache_enter_time(struct vnode *dvp, struct vnode *vp, */ if (vp != NULL) { TAILQ_INSERT_HEAD(&vp->v_cache_dst, ncp, nc_dst); - SDT_PROBE3(vfs, namecache, enter, done, dvp, nc_get_name(ncp), + SDT_PROBE3(vfs, namecache, enter, done, dvp, ncp->nc_name, vp); } else { if (cnp->cn_flags & ISWHITEOUT) ncp->nc_flag |= NCF_WHITE; cache_negative_insert(ncp, false); SDT_PROBE2(vfs, namecache, enter_negative, done, dvp, - nc_get_name(ncp)); + ncp->nc_name); } cache_enter_unlock(&cel); - if (numneg * ncnegfactor > numcache) + lnumcache = atomic_fetchadd_long(&numcache, 1) + 1; + if (numneg * ncnegfactor > lnumcache) cache_negative_zap_one(); cache_free(ndd); return; @@ -1854,7 +1924,7 @@ cache_changesize(int newmaxvnodes) nchash = new_nchash; for (i = 0; i <= old_nchash; i++) { while ((ncp = LIST_FIRST(&old_nchashtbl[i])) != NULL) { - hash = cache_get_hash(nc_get_name(ncp), ncp->nc_nlen, + hash = cache_get_hash(ncp->nc_name, ncp->nc_nlen, ncp->nc_dvp); LIST_REMOVE(ncp, nc_hash); LIST_INSERT_HEAD(NCHHASH(hash), ncp, nc_hash); @@ -1926,6 +1996,8 @@ cache_purge_negative(struct vnode *vp) CTR1(KTR_VFS, "cache_purge_negative(%p)", vp); SDT_PROBE1(vfs, namecache, purge_negative, done, vp); + if (LIST_EMPTY(&vp->v_cache_src)) + return; TAILQ_INIT(&ncps); vlp = VP2VNODELOCK(vp); mtx_lock(vlp); @@ -2181,9 +2253,9 @@ vn_vptocnp(struct vnode **vp, struct ucred *cred, char return (error); } *buflen -= ncp->nc_nlen; - memcpy(buf + *buflen, nc_get_name(ncp), ncp->nc_nlen); + memcpy(buf + *buflen, ncp->nc_name, ncp->nc_nlen); SDT_PROBE3(vfs, namecache, fullpath, hit, ncp->nc_dvp, - nc_get_name(ncp), vp); + ncp->nc_name, vp); dvp = *vp; *vp = ncp->nc_dvp; vref(*vp); @@ -2365,7 +2437,7 @@ vn_commname(struct vnode *vp, char *buf, u_int buflen) return (ENOENT); } l = min(ncp->nc_nlen, buflen - 1); - memcpy(buf, nc_get_name(ncp), l); + memcpy(buf, ncp->nc_name, l); mtx_unlock(vlp); buf[l] = '\0'; return (0); From owner-svn-src-all@freebsd.org Sun Dec 31 03:15:46 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id D7BA8E85173; Sun, 31 Dec 2017 03:15:46 +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 A45937D83C; Sun, 31 Dec 2017 03:15:46 +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 vBV3FjPx091147; Sun, 31 Dec 2017 03:15:45 GMT (envelope-from mjg@FreeBSD.org) Received: (from mjg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id vBV3FjCO091146; Sun, 31 Dec 2017 03:15:45 GMT (envelope-from mjg@FreeBSD.org) Message-Id: <201712310315.vBV3FjCO091146@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 03:15:45 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r327406 - stable/11/sys/fs/tmpfs X-SVN-Group: stable-11 X-SVN-Commit-Author: mjg X-SVN-Commit-Paths: stable/11/sys/fs/tmpfs X-SVN-Commit-Revision: 327406 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 31 Dec 2017 03:15:47 -0000 Author: mjg Date: Sun Dec 31 03:15:45 2017 New Revision: 327406 URL: https://svnweb.freebsd.org/changeset/base/327406 Log: MFC r324127: tmpfs: skip zero-sized page count updates Such updates consisted of vast majority of modificiations, especially in tmpfs_reg_resize. For the case where page count did no change and the size grew we only need to update tn_size. Use this fact to avoid vm object lock/relock. Modified: stable/11/sys/fs/tmpfs/tmpfs_subr.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/fs/tmpfs/tmpfs_subr.c ============================================================================== --- stable/11/sys/fs/tmpfs/tmpfs_subr.c Sun Dec 31 03:13:45 2017 (r327405) +++ stable/11/sys/fs/tmpfs/tmpfs_subr.c Sun Dec 31 03:15:45 2017 (r327406) @@ -350,7 +350,8 @@ tmpfs_free_node_locked(struct tmpfs_mount *tmp, struct case VREG: uobj = node->tn_reg.tn_aobj; if (uobj != NULL) { - atomic_subtract_long(&tmp->tm_pages_used, uobj->size); + if (uobj->size != 0) + atomic_subtract_long(&tmp->tm_pages_used, uobj->size); KASSERT((uobj->flags & OBJ_TMPFS) == 0, ("leaked OBJ_TMPFS node %p vm_obj %p", node, uobj)); vm_object_deallocate(uobj); @@ -1375,6 +1376,12 @@ tmpfs_reg_resize(struct vnode *vp, off_t newsize, bool oldpages = OFF_TO_IDX(oldsize + PAGE_MASK); MPASS(oldpages == uobj->size); newpages = OFF_TO_IDX(newsize + PAGE_MASK); + + if (__predict_true(newpages == oldpages && newsize >= oldsize)) { + node->tn_size = newsize; + return (0); + } + if (newpages > oldpages && tmpfs_pages_check_avail(tmp, newpages - oldpages) == 0) return (ENOSPC); From owner-svn-src-all@freebsd.org Sun Dec 31 03:34:02 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 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-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" 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-all@freebsd.org Sun Dec 31 04:09:41 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 732E8E896FC; Sun, 31 Dec 2017 04:09:41 +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 3D39C7FB8A; Sun, 31 Dec 2017 04:09:41 +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 vBV49esG012499; Sun, 31 Dec 2017 04:09:40 GMT (envelope-from mjg@FreeBSD.org) Received: (from mjg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id vBV49eGs012498; Sun, 31 Dec 2017 04:09:40 GMT (envelope-from mjg@FreeBSD.org) Message-Id: <201712310409.vBV49eGs012498@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 04:09:40 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r327412 - stable/11/sys/kern X-SVN-Group: stable-11 X-SVN-Commit-Author: mjg X-SVN-Commit-Paths: stable/11/sys/kern X-SVN-Commit-Revision: 327412 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 31 Dec 2017 04:09:41 -0000 Author: mjg Date: Sun Dec 31 04:09:40 2017 New Revision: 327412 URL: https://svnweb.freebsd.org/changeset/base/327412 Log: MFC r325725: sysctl: try to avoid malloc in name2oid name2oid is called all the time and passed names are almost always very short (< 16 characters). Modified: stable/11/sys/kern/kern_sysctl.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/kern/kern_sysctl.c ============================================================================== --- stable/11/sys/kern/kern_sysctl.c Sun Dec 31 04:06:11 2017 (r327411) +++ stable/11/sys/kern/kern_sysctl.c Sun Dec 31 04:09:40 2017 (r327412) @@ -1117,17 +1117,21 @@ sysctl_sysctl_name2oid(SYSCTL_HANDLER_ARGS) int error, oid[CTL_MAXNAME], len = 0; struct sysctl_oid *op = NULL; struct rm_priotracker tracker; + char buf[32]; if (!req->newlen) return (ENOENT); if (req->newlen >= MAXPATHLEN) /* XXX arbitrary, undocumented */ return (ENAMETOOLONG); - p = malloc(req->newlen+1, M_SYSCTL, M_WAITOK); + p = buf; + if (req->newlen >= sizeof(buf)) + p = malloc(req->newlen+1, M_SYSCTL, M_WAITOK); error = SYSCTL_IN(req, p, req->newlen); if (error) { - free(p, M_SYSCTL); + if (p != buf) + free(p, M_SYSCTL); return (error); } @@ -1137,7 +1141,8 @@ sysctl_sysctl_name2oid(SYSCTL_HANDLER_ARGS) error = name2oid(p, oid, &len, &op); SYSCTL_RUNLOCK(&tracker); - free(p, M_SYSCTL); + if (p != buf) + free(p, M_SYSCTL); if (error) return (error); From owner-svn-src-all@freebsd.org Sun Dec 31 04:01:48 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 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-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" 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-all@freebsd.org Sun Dec 31 05:06:37 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 5F9B2EA0ACB; Sun, 31 Dec 2017 05:06:37 +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 F11232438; Sun, 31 Dec 2017 05:06:36 +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 vBV56aqP037698; Sun, 31 Dec 2017 05:06:36 GMT (envelope-from mjg@FreeBSD.org) Received: (from mjg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id vBV56aBN037695; Sun, 31 Dec 2017 05:06:36 GMT (envelope-from mjg@FreeBSD.org) Message-Id: <201712310506.vBV56aBN037695@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 05:06:36 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r327413 - in stable/11/sys: kern sys X-SVN-Group: stable-11 X-SVN-Commit-Author: mjg X-SVN-Commit-Paths: in stable/11/sys: kern sys X-SVN-Commit-Revision: 327413 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 31 Dec 2017 05:06:37 -0000 Author: mjg Date: Sun Dec 31 05:06:35 2017 New Revision: 327413 URL: https://svnweb.freebsd.org/changeset/base/327413 Log: MFC r320561,r323236,r324041,r324314,r324609,r324613,r324778,r324780,r324787, r324803,r324836,r325469,r325706,r325917,r325918,r325919,r325920,r325921, r325922,r325925,r325963,r326106,r326107,r326110,r326111,r326112,r326194, r326195,r326196,r326197,r326198,r326199,r326200,r326237: rwlock: perform the typically false td_rw_rlocks check later Check if the lock is available first instead. ============= Sprinkle __read_frequently on few obvious places. Note that some of annotated variables should probably change their types to something smaller, preferably bit-sized. ============= mtx: drop the tid argument from _mtx_lock_sleep tid must be equal to curthread and the target routine was already reading it anyway, which is not a problem. Not passing it as a parameter allows for a little bit shorter code in callers. ============= locks: partially tidy up waiting on readers spin first instant of instantly re-readoing and don't re-read after spinning is finished - the state is already known. Note the code is subject to significant changes later. ============= locks: take the number of readers into account when waiting Previous code would always spin once before checking the lock. But a lock with e.g. 6 readers is not going to become free in the duration of once spin even if they start draining immediately. Conservatively perform one for each reader. Note that the total number of allowed spins is still extremely small and is subject to change later. ============= mtx: change MTX_UNOWNED from 4 to 0 The value is spread all over the kernel and zeroing a register is cheaper/shorter than setting it up to an arbitrary value. Reduces amd64 GENERIC-NODEBUG .text size by 0.4%. ============= mtx: fix up owner_mtx after r324609 Now that MTX_UNOWNED is 0 the test was alwayas false. ============= mtx: clean up locking spin mutexes 1) shorten the fast path by pushing the lockstat probe to the slow path 2) test for kernel panic only after it turns out we will have to spin, in particular test only after we know we are not recursing ============= mtx: stop testing SCHEDULER_STOPPED in kabi funcs for spin mutexes There is nothing panic-breaking to do in the unlock case and the lock case will fallback to the slow path doing the check already. ============= rwlock: reduce lockstat branches in the slowpath ============= mtx: fix up UP build after r324778 ============= mtx: implement thread lock fastpath ============= rwlock: fix up compilation without KDTRACE_HOOKS after r324787 ============= rwlock: use fcmpset for setting RW_LOCK_WRITE_SPINNER ============= sx: avoid branches if in the slow path if lockstat is disabled ============= rwlock: avoid branches in the slow path if lockstat is disabled ============= locks: pull up PMC_SOFT_CALLs out of slow path loops ============= mtx: unlock before traversing threads to wake up This shortens the lock hold time while not affecting corretness. All the woken up threads end up competing can lose the race against a completely unrelated thread getting the lock anyway. ============= rwlock: unlock before traversing threads to wake up While here perform a minor cleanup of the unlock path. ============= sx: perform a minor cleanup of the unlock slowpath No functional changes. ============= mtx: add missing parts of the diff in r325920 Fixes build breakage. ============= locks: fix compilation issues without SMP or KDTRACE_HOOKS ============= locks: remove the file + line argument from internal primitives when not used The pair is of use only in debug or LOCKPROF kernels, but was passed (zeroed) for many locks even in production kernels. While here whack the tid argument from wlock hard and xlock hard. There is no kbi change of any sort - "external" primitives still accept the pair. ============= locks: pass the found lock value to unlock slow path This avoids an explicit read later. While here whack the cheaply obtainable 'tid' argument. ============= rwlock: don't check for curthread's read lock count in the fast path ============= rwlock: unbreak WITNESS builds after r326110 ============= sx: unbreak debug after r326107 An assertion was modified to use the found value, but it was not updated to handle a race where blocked threads appear after the entrance to the func. Move the assertion down to the area protected with sleepq lock where the lock is read anyway. This does not affect coverage of the assertion and is consistent with what rw locks are doing. ============= rwlock: stop re-reading the owner when going to sleep ============= locks: retry turnstile/sleepq loops on failed cmpset In order to go to sleep threads set waiter flags, but that can spuriously fail e.g. when a new reader arrives. Instead of unlocking everything and looping back, re-evaluate the new state while still holding the lock necessary to go to sleep. ============= sx: change sunlock to wake waiters up if it locked sleepq sleepq is only locked if the curhtread is the last reader. By the time the lock gets acquired new ones could have arrived. The previous code would unlock and loop back. This results spurious relocking of sleepq. This is a step towards xadd-based unlock routine. ============= rwlock: add __rw_try_{r,w}lock_int ============= rwlock: fix up compilation of the previous change commmitted wrong version of the patch ============= Convert in-kernel thread_lock_flags calls to thread_lock when debug is disabled The flags argument is not used in this case. ============= Add the missing lockstat check for thread lock. ============= rw: fix runlock_hard when new readers show up When waiters/writer spinner flags are set no new readers can show up unless they already have a different rw rock read locked. The change in r326195 failed to take that into account - in presence of new readers it would spin until they all drain, which would be lead to trouble if e.g. they go off cpu and can get scheduled because of this thread. Modified: stable/11/sys/kern/kern_mutex.c stable/11/sys/kern/kern_rwlock.c stable/11/sys/kern/kern_sx.c stable/11/sys/sys/lock.h stable/11/sys/sys/mutex.h stable/11/sys/sys/rwlock.h stable/11/sys/sys/sx.h Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/kern/kern_mutex.c ============================================================================== --- stable/11/sys/kern/kern_mutex.c Sun Dec 31 04:09:40 2017 (r327412) +++ stable/11/sys/kern/kern_mutex.c Sun Dec 31 05:06:35 2017 (r327413) @@ -217,7 +217,7 @@ owner_mtx(const struct lock_object *lock, struct threa m = (const struct mtx *)lock; x = m->mtx_lock; *owner = (struct thread *)(x & ~MTX_FLAGMASK); - return (x != MTX_UNOWNED); + return (*owner != NULL); } #endif @@ -248,7 +248,7 @@ __mtx_lock_flags(volatile uintptr_t *c, int opts, cons tid = (uintptr_t)curthread; v = MTX_UNOWNED; if (!_mtx_obtain_lock_fetch(m, &v, tid)) - _mtx_lock_sleep(m, v, tid, opts, file, line); + _mtx_lock_sleep(m, v, opts, file, line); else LOCKSTAT_PROFILE_OBTAIN_LOCK_SUCCESS(adaptive__acquire, m, 0, 0, file, line); @@ -277,7 +277,7 @@ __mtx_unlock_flags(volatile uintptr_t *c, int opts, co mtx_assert(m, MA_OWNED); #ifdef LOCK_PROFILING - __mtx_unlock_sleep(c, opts, file, line); + __mtx_unlock_sleep(c, (uintptr_t)curthread, opts, file, line); #else __mtx_unlock(m, curthread, opts, file, line); #endif @@ -289,10 +289,10 @@ __mtx_lock_spin_flags(volatile uintptr_t *c, int opts, int line) { struct mtx *m; +#ifdef SMP + uintptr_t tid, v; +#endif - if (SCHEDULER_STOPPED()) - return; - m = mtxlock2mtx(c); KASSERT(m->mtx_lock != MTX_DESTROYED, @@ -308,7 +308,18 @@ __mtx_lock_spin_flags(volatile uintptr_t *c, int opts, opts &= ~MTX_RECURSE; WITNESS_CHECKORDER(&m->lock_object, opts | LOP_NEWORDER | LOP_EXCLUSIVE, file, line, NULL); +#ifdef SMP + spinlock_enter(); + tid = (uintptr_t)curthread; + v = MTX_UNOWNED; + if (!_mtx_obtain_lock_fetch(m, &v, tid)) + _mtx_lock_spin(m, v, opts, file, line); + else + LOCKSTAT_PROFILE_OBTAIN_LOCK_SUCCESS(spin__acquire, + m, 0, 0, file, line); +#else __mtx_lock_spin(m, curthread, opts, file, line); +#endif LOCK_LOG_LOCK("LOCK", &m->lock_object, opts, m->mtx_recurse, file, line); WITNESS_LOCK(&m->lock_object, opts | LOP_EXCLUSIVE, file, line); @@ -348,9 +359,6 @@ __mtx_unlock_spin_flags(volatile uintptr_t *c, int opt { struct mtx *m; - if (SCHEDULER_STOPPED()) - return; - m = mtxlock2mtx(c); KASSERT(m->mtx_lock != MTX_DESTROYED, @@ -372,9 +380,8 @@ __mtx_unlock_spin_flags(volatile uintptr_t *c, int opt * is already owned, it will recursively acquire the lock. */ int -_mtx_trylock_flags_(volatile uintptr_t *c, int opts, const char *file, int line) +_mtx_trylock_flags_int(struct mtx *m, int opts LOCK_FILE_LINE_ARG_DEF) { - struct mtx *m; struct thread *td; uintptr_t tid, v; #ifdef LOCK_PROFILING @@ -389,8 +396,6 @@ _mtx_trylock_flags_(volatile uintptr_t *c, int opts, c if (SCHEDULER_STOPPED_TD(td)) return (1); - m = mtxlock2mtx(c); - KASSERT(kdb_active != 0 || !TD_IS_IDLETHREAD(td), ("mtx_trylock() by idle thread %p on sleep mutex %s @ %s:%d", curthread, m->lock_object.lo_name, file, line)); @@ -435,6 +440,15 @@ _mtx_trylock_flags_(volatile uintptr_t *c, int opts, c return (rval); } +int +_mtx_trylock_flags_(volatile uintptr_t *c, int opts, const char *file, int line) +{ + struct mtx *m; + + m = mtxlock2mtx(c); + return (_mtx_trylock_flags_int(m, opts LOCK_FILE_LINE_ARG)); +} + /* * __mtx_lock_sleep: the tougher part of acquiring an MTX_DEF lock. * @@ -443,18 +457,18 @@ _mtx_trylock_flags_(volatile uintptr_t *c, int opts, c */ #if LOCK_DEBUG > 0 void -__mtx_lock_sleep(volatile uintptr_t *c, uintptr_t v, uintptr_t tid, int opts, - const char *file, int line) +__mtx_lock_sleep(volatile uintptr_t *c, uintptr_t v, int opts, const char *file, + int line) #else void -__mtx_lock_sleep(volatile uintptr_t *c, uintptr_t v, uintptr_t tid) +__mtx_lock_sleep(volatile uintptr_t *c, uintptr_t v) #endif { + struct thread *td; struct mtx *m; struct turnstile *ts; -#ifdef ADAPTIVE_MUTEXES - volatile struct thread *owner; -#endif + uintptr_t tid; + struct thread *owner; #ifdef KTR int cont_logged = 0; #endif @@ -473,8 +487,9 @@ __mtx_lock_sleep(volatile uintptr_t *c, uintptr_t v, u #if defined(KDTRACE_HOOKS) || defined(LOCK_PROFILING) int doing_lockprof; #endif - - if (SCHEDULER_STOPPED()) + td = curthread; + tid = (uintptr_t)td; + if (SCHEDULER_STOPPED_TD(td)) return; #if defined(ADAPTIVE_MUTEXES) @@ -486,7 +501,7 @@ __mtx_lock_sleep(volatile uintptr_t *c, uintptr_t v, u if (__predict_false(v == MTX_UNOWNED)) v = MTX_READ_VALUE(m); - if (__predict_false(lv_mtx_owner(v) == (struct thread *)tid)) { + if (__predict_false(lv_mtx_owner(v) == td)) { KASSERT((m->lock_object.lo_flags & LO_RECURSABLE) != 0 || (opts & MTX_RECURSE) != 0, ("_mtx_lock_sleep: recursed on non-recursive mutex %s @ %s:%d\n", @@ -618,7 +633,11 @@ __mtx_lock_sleep(volatile uintptr_t *c, uintptr_t v, u #ifdef KDTRACE_HOOKS sleep_time -= lockstat_nsecs(&m->lock_object); #endif - turnstile_wait(ts, mtx_owner(m), TS_EXCLUSIVE_QUEUE); +#ifndef ADAPTIVE_MUTEXES + owner = mtx_owner(m); +#endif + MPASS(owner == mtx_owner(m)); + turnstile_wait(ts, owner, TS_EXCLUSIVE_QUEUE); #ifdef KDTRACE_HOOKS sleep_time += lockstat_nsecs(&m->lock_object); sleep_cnt++; @@ -679,12 +698,18 @@ _mtx_lock_spin_failed(struct mtx *m) * This is only called if we need to actually spin for the lock. Recursion * is handled inline. */ +#if LOCK_DEBUG > 0 void -_mtx_lock_spin_cookie(volatile uintptr_t *c, uintptr_t v, uintptr_t tid, - int opts, const char *file, int line) +_mtx_lock_spin_cookie(volatile uintptr_t *c, uintptr_t v, int opts, + const char *file, int line) +#else +void +_mtx_lock_spin_cookie(volatile uintptr_t *c, uintptr_t v) +#endif { struct mtx *m; struct lock_delay_arg lda; + uintptr_t tid; #ifdef LOCK_PROFILING int contested = 0; uint64_t waittime = 0; @@ -696,10 +721,7 @@ _mtx_lock_spin_cookie(volatile uintptr_t *c, uintptr_t int doing_lockprof; #endif - if (SCHEDULER_STOPPED()) - return; - - lock_delay_arg_init(&lda, &mtx_spin_delay); + tid = (uintptr_t)curthread; m = mtxlock2mtx(c); if (__predict_false(v == MTX_UNOWNED)) @@ -710,6 +732,11 @@ _mtx_lock_spin_cookie(volatile uintptr_t *c, uintptr_t return; } + if (SCHEDULER_STOPPED()) + return; + + lock_delay_arg_init(&lda, &mtx_spin_delay); + if (LOCK_LOG_TEST(&m->lock_object, opts)) CTR1(KTR_LOCK, "_mtx_lock_spin: %p spinning", m); KTR_STATE1(KTR_SCHED, "thread", sched_tdname((struct thread *)tid), @@ -772,7 +799,74 @@ _mtx_lock_spin_cookie(volatile uintptr_t *c, uintptr_t } #endif /* SMP */ +#ifdef INVARIANTS +static void +thread_lock_validate(struct mtx *m, int opts, const char *file, int line) +{ + + KASSERT(m->mtx_lock != MTX_DESTROYED, + ("thread_lock() of destroyed mutex @ %s:%d", file, line)); + KASSERT(LOCK_CLASS(&m->lock_object) == &lock_class_mtx_spin, + ("thread_lock() of sleep mutex %s @ %s:%d", + m->lock_object.lo_name, file, line)); + if (mtx_owned(m)) + KASSERT((m->lock_object.lo_flags & LO_RECURSABLE) != 0, + ("thread_lock: recursed on non-recursive mutex %s @ %s:%d\n", + m->lock_object.lo_name, file, line)); + WITNESS_CHECKORDER(&m->lock_object, + opts | LOP_NEWORDER | LOP_EXCLUSIVE, file, line, NULL); +} +#else +#define thread_lock_validate(m, opts, file, line) do { } while (0) +#endif + +#ifndef LOCK_PROFILING +#if LOCK_DEBUG > 0 void +_thread_lock(struct thread *td, int opts, const char *file, int line) +#else +void +_thread_lock(struct thread *td) +#endif +{ + struct mtx *m; + uintptr_t tid, v; + + tid = (uintptr_t)curthread; + + if (__predict_false(LOCKSTAT_PROFILE_ENABLED(spin__acquire))) + goto slowpath_noirq; + spinlock_enter(); + m = td->td_lock; + thread_lock_validate(m, 0, file, line); + v = MTX_READ_VALUE(m); + if (__predict_true(v == MTX_UNOWNED)) { + if (__predict_false(!_mtx_obtain_lock(m, tid))) + goto slowpath_unlocked; + } else if (v == tid) { + m->mtx_recurse++; + } else + goto slowpath_unlocked; + if (__predict_true(m == td->td_lock)) { + WITNESS_LOCK(&m->lock_object, LOP_EXCLUSIVE, file, line); + return; + } + if (m->mtx_recurse != 0) + m->mtx_recurse--; + else + _mtx_release_lock_quick(m); +slowpath_unlocked: + spinlock_exit(); +slowpath_noirq: +#if LOCK_DEBUG > 0 + thread_lock_flags_(td, opts, file, line); +#else + thread_lock_flags_(td, 0, 0, 0); +#endif +} +#endif + +void thread_lock_flags_(struct thread *td, int opts, const char *file, int line) { struct mtx *m; @@ -815,17 +909,7 @@ retry: v = MTX_UNOWNED; spinlock_enter(); m = td->td_lock; - KASSERT(m->mtx_lock != MTX_DESTROYED, - ("thread_lock() of destroyed mutex @ %s:%d", file, line)); - KASSERT(LOCK_CLASS(&m->lock_object) == &lock_class_mtx_spin, - ("thread_lock() of sleep mutex %s @ %s:%d", - m->lock_object.lo_name, file, line)); - if (mtx_owned(m)) - KASSERT((m->lock_object.lo_flags & LO_RECURSABLE) != 0, - ("thread_lock: recursed on non-recursive mutex %s @ %s:%d\n", - m->lock_object.lo_name, file, line)); - WITNESS_CHECKORDER(&m->lock_object, - opts | LOP_NEWORDER | LOP_EXCLUSIVE, file, line, NULL); + thread_lock_validate(m, opts, file, line); for (;;) { if (_mtx_obtain_lock_fetch(m, &v, tid)) break; @@ -925,24 +1009,27 @@ thread_lock_set(struct thread *td, struct mtx *new) */ #if LOCK_DEBUG > 0 void -__mtx_unlock_sleep(volatile uintptr_t *c, int opts, const char *file, int line) +__mtx_unlock_sleep(volatile uintptr_t *c, uintptr_t v, int opts, + const char *file, int line) #else void -__mtx_unlock_sleep(volatile uintptr_t *c) +__mtx_unlock_sleep(volatile uintptr_t *c, uintptr_t v) #endif { struct mtx *m; struct turnstile *ts; - uintptr_t tid, v; + uintptr_t tid; if (SCHEDULER_STOPPED()) return; tid = (uintptr_t)curthread; m = mtxlock2mtx(c); - v = MTX_READ_VALUE(m); - if (v & MTX_RECURSED) { + if (__predict_false(v == tid)) + v = MTX_READ_VALUE(m); + + if (__predict_false(v & MTX_RECURSED)) { if (--(m->mtx_recurse) == 0) atomic_clear_ptr(&m->mtx_lock, MTX_RECURSED); if (LOCK_LOG_TEST(&m->lock_object, opts)) @@ -959,12 +1046,12 @@ __mtx_unlock_sleep(volatile uintptr_t *c) * can be removed from the hash list if it is empty. */ turnstile_chain_lock(&m->lock_object); + _mtx_release_lock_quick(m); ts = turnstile_lookup(&m->lock_object); + MPASS(ts != NULL); if (LOCK_LOG_TEST(&m->lock_object, opts)) CTR1(KTR_LOCK, "_mtx_unlock_sleep: %p contested", m); - MPASS(ts != NULL); turnstile_broadcast(ts, TS_EXCLUSIVE_QUEUE); - _mtx_release_lock_quick(m); /* * This turnstile is now no longer associated with the mutex. We can Modified: stable/11/sys/kern/kern_rwlock.c ============================================================================== --- stable/11/sys/kern/kern_rwlock.c Sun Dec 31 04:09:40 2017 (r327412) +++ stable/11/sys/kern/kern_rwlock.c Sun Dec 31 05:06:35 2017 (r327413) @@ -273,7 +273,7 @@ _rw_wlock_cookie(volatile uintptr_t *c, const char *fi tid = (uintptr_t)curthread; v = RW_UNLOCKED; if (!_rw_write_lock_fetch(rw, &v, tid)) - _rw_wlock_hard(rw, v, tid, file, line); + _rw_wlock_hard(rw, v, file, line); else LOCKSTAT_PROFILE_OBTAIN_RWLOCK_SUCCESS(rw__acquire, rw, 0, 0, file, line, LOCKSTAT_WRITER); @@ -284,9 +284,8 @@ _rw_wlock_cookie(volatile uintptr_t *c, const char *fi } int -__rw_try_wlock(volatile uintptr_t *c, const char *file, int line) +__rw_try_wlock_int(struct rwlock *rw LOCK_FILE_LINE_ARG_DEF) { - struct rwlock *rw; struct thread *td; uintptr_t tid, v; int rval; @@ -297,8 +296,6 @@ __rw_try_wlock(volatile uintptr_t *c, const char *file if (SCHEDULER_STOPPED_TD(td)) return (1); - rw = rwlock2rw(c); - KASSERT(kdb_active != 0 || !TD_IS_IDLETHREAD(td), ("rw_try_wlock() by idle thread %p on rwlock %s @ %s:%d", curthread, rw->lock_object.lo_name, file, line)); @@ -334,6 +331,15 @@ __rw_try_wlock(volatile uintptr_t *c, const char *file return (rval); } +int +__rw_try_wlock(volatile uintptr_t *c, const char *file, int line) +{ + struct rwlock *rw; + + rw = rwlock2rw(c); + return (__rw_try_wlock_int(rw LOCK_FILE_LINE_ARG)); +} + void _rw_wunlock_cookie(volatile uintptr_t *c, const char *file, int line) { @@ -364,14 +370,21 @@ _rw_wunlock_cookie(volatile uintptr_t *c, const char * * is unlocked and has no writer waiters or spinners. Failing otherwise * prioritizes writers before readers. */ -#define RW_CAN_READ(td, _rw) \ - (((td)->td_rw_rlocks && (_rw) & RW_LOCK_READ) || ((_rw) & \ - (RW_LOCK_READ | RW_LOCK_WRITE_WAITERS | RW_LOCK_WRITE_SPINNER)) == \ - RW_LOCK_READ) +static bool __always_inline +__rw_can_read(struct thread *td, uintptr_t v, bool fp) +{ + if ((v & (RW_LOCK_READ | RW_LOCK_WRITE_WAITERS | RW_LOCK_WRITE_SPINNER)) + == RW_LOCK_READ) + return (true); + if (!fp && td->td_rw_rlocks && (v & RW_LOCK_READ)) + return (true); + return (false); +} + static bool __always_inline -__rw_rlock_try(struct rwlock *rw, struct thread *td, uintptr_t *vp, - const char *file, int line) +__rw_rlock_try(struct rwlock *rw, struct thread *td, uintptr_t *vp, bool fp + LOCK_FILE_LINE_ARG_DEF) { /* @@ -384,7 +397,7 @@ __rw_rlock_try(struct rwlock *rw, struct thread *td, u * completely unlocked rwlock since such a lock is encoded * as a read lock with no waiters. */ - while (RW_CAN_READ(td, *vp)) { + while (__rw_can_read(td, *vp, fp)) { if (atomic_fcmpset_acq_ptr(&rw->rw_lock, vp, *vp + RW_ONE_READER)) { if (LOCK_LOG_TEST(&rw->lock_object, 0)) @@ -400,13 +413,12 @@ __rw_rlock_try(struct rwlock *rw, struct thread *td, u } static void __noinline -__rw_rlock_hard(volatile uintptr_t *c, struct thread *td, uintptr_t v, - const char *file, int line) +__rw_rlock_hard(struct rwlock *rw, struct thread *td, uintptr_t v + LOCK_FILE_LINE_ARG_DEF) { - struct rwlock *rw; struct turnstile *ts; + struct thread *owner; #ifdef ADAPTIVE_RWLOCKS - volatile struct thread *owner; int spintries = 0; int i; #endif @@ -418,11 +430,14 @@ __rw_rlock_hard(volatile uintptr_t *c, struct thread * struct lock_delay_arg lda; #endif #ifdef KDTRACE_HOOKS - uintptr_t state; u_int sleep_cnt = 0; int64_t sleep_time = 0; int64_t all_time = 0; #endif +#if defined(KDTRACE_HOOKS) || defined(LOCK_PROFILING) + uintptr_t state; + int doing_lockprof; +#endif if (SCHEDULER_STOPPED()) return; @@ -432,25 +447,30 @@ __rw_rlock_hard(volatile uintptr_t *c, struct thread * #elif defined(KDTRACE_HOOKS) lock_delay_arg_init(&lda, NULL); #endif - rw = rwlock2rw(c); -#ifdef KDTRACE_HOOKS - all_time -= lockstat_nsecs(&rw->lock_object); +#ifdef HWPMC_HOOKS + PMC_SOFT_CALL( , , lock, failed); #endif -#ifdef KDTRACE_HOOKS + lock_profile_obtain_lock_failed(&rw->lock_object, + &contested, &waittime); + +#ifdef LOCK_PROFILING + doing_lockprof = 1; state = v; +#elif defined(KDTRACE_HOOKS) + doing_lockprof = lockstat_enabled; + if (__predict_false(doing_lockprof)) { + all_time -= lockstat_nsecs(&rw->lock_object); + state = v; + } #endif + for (;;) { - if (__rw_rlock_try(rw, td, &v, file, line)) + if (__rw_rlock_try(rw, td, &v, false LOCK_FILE_LINE_ARG)) break; #ifdef KDTRACE_HOOKS lda.spin_cnt++; #endif -#ifdef HWPMC_HOOKS - PMC_SOFT_CALL( , , lock, failed); -#endif - lock_profile_obtain_lock_failed(&rw->lock_object, - &contested, &waittime); #ifdef ADAPTIVE_RWLOCKS /* @@ -483,12 +503,11 @@ __rw_rlock_hard(volatile uintptr_t *c, struct thread * "spinning", "lockname:\"%s\"", rw->lock_object.lo_name); for (i = 0; i < rowner_loops; i++) { + cpu_spinwait(); v = RW_READ_VALUE(rw); - if ((v & RW_LOCK_READ) == 0 || RW_CAN_READ(td, v)) + if ((v & RW_LOCK_READ) == 0 || __rw_can_read(td, v, false)) break; - cpu_spinwait(); } - v = RW_READ_VALUE(rw); #ifdef KDTRACE_HOOKS lda.spin_cnt += rowner_loops - i; #endif @@ -512,11 +531,14 @@ __rw_rlock_hard(volatile uintptr_t *c, struct thread * * recheck its state and restart the loop if needed. */ v = RW_READ_VALUE(rw); - if (RW_CAN_READ(td, v)) { +retry_ts: + if (__rw_can_read(td, v, false)) { turnstile_cancel(ts); continue; } + owner = lv_rw_wowner(v); + #ifdef ADAPTIVE_RWLOCKS /* * The current lock owner might have started executing @@ -525,8 +547,7 @@ __rw_rlock_hard(volatile uintptr_t *c, struct thread * * chain lock. If so, drop the turnstile lock and try * again. */ - if ((v & RW_LOCK_READ) == 0) { - owner = (struct thread *)RW_OWNER(v); + if (owner != NULL) { if (TD_IS_RUNNING(owner)) { turnstile_cancel(ts); continue; @@ -537,7 +558,7 @@ __rw_rlock_hard(volatile uintptr_t *c, struct thread * /* * The lock is held in write mode or it already has waiters. */ - MPASS(!RW_CAN_READ(td, v)); + MPASS(!__rw_can_read(td, v, false)); /* * If the RW_LOCK_READ_WAITERS flag is already set, then @@ -546,12 +567,9 @@ __rw_rlock_hard(volatile uintptr_t *c, struct thread * * lock and restart the loop. */ if (!(v & RW_LOCK_READ_WAITERS)) { - if (!atomic_cmpset_ptr(&rw->rw_lock, v, - v | RW_LOCK_READ_WAITERS)) { - turnstile_cancel(ts); - v = RW_READ_VALUE(rw); - continue; - } + if (!atomic_fcmpset_ptr(&rw->rw_lock, &v, + v | RW_LOCK_READ_WAITERS)) + goto retry_ts; if (LOCK_LOG_TEST(&rw->lock_object, 0)) CTR2(KTR_LOCK, "%s: %p set read waiters flag", __func__, rw); @@ -567,7 +585,8 @@ __rw_rlock_hard(volatile uintptr_t *c, struct thread * #ifdef KDTRACE_HOOKS sleep_time -= lockstat_nsecs(&rw->lock_object); #endif - turnstile_wait(ts, rw_owner(rw), TS_SHARED_QUEUE); + MPASS(owner == rw_owner(rw)); + turnstile_wait(ts, owner, TS_SHARED_QUEUE); #ifdef KDTRACE_HOOKS sleep_time += lockstat_nsecs(&rw->lock_object); sleep_cnt++; @@ -577,6 +596,10 @@ __rw_rlock_hard(volatile uintptr_t *c, struct thread * __func__, rw); v = RW_READ_VALUE(rw); } +#if defined(KDTRACE_HOOKS) || defined(LOCK_PROFILING) + if (__predict_true(!doing_lockprof)) + return; +#endif #ifdef KDTRACE_HOOKS all_time += lockstat_nsecs(&rw->lock_object); if (sleep_time) @@ -600,14 +623,12 @@ __rw_rlock_hard(volatile uintptr_t *c, struct thread * } void -__rw_rlock(volatile uintptr_t *c, const char *file, int line) +__rw_rlock_int(struct rwlock *rw LOCK_FILE_LINE_ARG_DEF) { - struct rwlock *rw; struct thread *td; uintptr_t v; td = curthread; - rw = rwlock2rw(c); KASSERT(kdb_active != 0 || SCHEDULER_STOPPED_TD(td) || !TD_IS_IDLETHREAD(td), @@ -622,25 +643,31 @@ __rw_rlock(volatile uintptr_t *c, const char *file, in v = RW_READ_VALUE(rw); if (__predict_false(LOCKSTAT_OOL_PROFILE_ENABLED(rw__acquire) || - !__rw_rlock_try(rw, td, &v, file, line))) - __rw_rlock_hard(c, td, v, file, line); + !__rw_rlock_try(rw, td, &v, true LOCK_FILE_LINE_ARG))) + __rw_rlock_hard(rw, td, v LOCK_FILE_LINE_ARG); LOCK_LOG_LOCK("RLOCK", &rw->lock_object, 0, 0, file, line); WITNESS_LOCK(&rw->lock_object, 0, file, line); TD_LOCKS_INC(curthread); } -int -__rw_try_rlock(volatile uintptr_t *c, const char *file, int line) +void +__rw_rlock(volatile uintptr_t *c, const char *file, int line) { struct rwlock *rw; + + rw = rwlock2rw(c); + __rw_rlock_int(rw LOCK_FILE_LINE_ARG); +} + +int +__rw_try_rlock_int(struct rwlock *rw LOCK_FILE_LINE_ARG_DEF) +{ uintptr_t x; if (SCHEDULER_STOPPED()) return (1); - rw = rwlock2rw(c); - KASSERT(kdb_active != 0 || !TD_IS_IDLETHREAD(curthread), ("rw_try_rlock() by idle thread %p on rwlock %s @ %s:%d", curthread, rw->lock_object.lo_name, file, line)); @@ -667,6 +694,15 @@ __rw_try_rlock(volatile uintptr_t *c, const char *file return (0); } +int +__rw_try_rlock(volatile uintptr_t *c, const char *file, int line) +{ + struct rwlock *rw; + + rw = rwlock2rw(c); + return (__rw_try_rlock_int(rw LOCK_FILE_LINE_ARG)); +} + static bool __always_inline __rw_runlock_try(struct rwlock *rw, struct thread *td, uintptr_t *vp) { @@ -712,18 +748,15 @@ __rw_runlock_try(struct rwlock *rw, struct thread *td, } static void __noinline -__rw_runlock_hard(volatile uintptr_t *c, struct thread *td, uintptr_t v, - const char *file, int line) +__rw_runlock_hard(struct rwlock *rw, struct thread *td, uintptr_t v + LOCK_FILE_LINE_ARG_DEF) { - struct rwlock *rw; struct turnstile *ts; uintptr_t x, queue; if (SCHEDULER_STOPPED()) return; - rw = rwlock2rw(c); - for (;;) { if (__rw_runlock_try(rw, td, &v)) break; @@ -733,7 +766,14 @@ __rw_runlock_hard(volatile uintptr_t *c, struct thread * last reader, so grab the turnstile lock. */ turnstile_chain_lock(&rw->lock_object); - v = rw->rw_lock & (RW_LOCK_WAITERS | RW_LOCK_WRITE_SPINNER); + v = RW_READ_VALUE(rw); +retry_ts: + if (__predict_false(RW_READERS(v) > 1)) { + turnstile_chain_unlock(&rw->lock_object); + continue; + } + + v &= (RW_LOCK_WAITERS | RW_LOCK_WRITE_SPINNER); MPASS(v & RW_LOCK_WAITERS); /* @@ -758,12 +798,9 @@ __rw_runlock_hard(volatile uintptr_t *c, struct thread x |= (v & RW_LOCK_READ_WAITERS); } else queue = TS_SHARED_QUEUE; - if (!atomic_cmpset_rel_ptr(&rw->rw_lock, RW_READERS_LOCK(1) | v, - x)) { - turnstile_chain_unlock(&rw->lock_object); - v = RW_READ_VALUE(rw); - continue; - } + v |= RW_READERS_LOCK(1); + if (!atomic_fcmpset_rel_ptr(&rw->rw_lock, &v, x)) + goto retry_ts; if (LOCK_LOG_TEST(&rw->lock_object, 0)) CTR2(KTR_LOCK, "%s: %p last succeeded with waiters", __func__, rw); @@ -787,17 +824,14 @@ __rw_runlock_hard(volatile uintptr_t *c, struct thread } void -_rw_runlock_cookie(volatile uintptr_t *c, const char *file, int line) +_rw_runlock_cookie_int(struct rwlock *rw LOCK_FILE_LINE_ARG_DEF) { - struct rwlock *rw; struct thread *td; uintptr_t v; - rw = rwlock2rw(c); - KASSERT(rw->rw_lock != RW_DESTROYED, ("rw_runlock() of destroyed rwlock @ %s:%d", file, line)); - __rw_assert(c, RA_RLOCKED, file, line); + __rw_assert(&rw->rw_lock, RA_RLOCKED, file, line); WITNESS_UNLOCK(&rw->lock_object, 0, file, line); LOCK_LOG_LOCK("RUNLOCK", &rw->lock_object, 0, 0, file, line); @@ -806,24 +840,33 @@ _rw_runlock_cookie(volatile uintptr_t *c, const char * if (__predict_false(LOCKSTAT_OOL_PROFILE_ENABLED(rw__release) || !__rw_runlock_try(rw, td, &v))) - __rw_runlock_hard(c, td, v, file, line); + __rw_runlock_hard(rw, td, v LOCK_FILE_LINE_ARG); TD_LOCKS_DEC(curthread); } +void +_rw_runlock_cookie(volatile uintptr_t *c, const char *file, int line) +{ + struct rwlock *rw; + + rw = rwlock2rw(c); + _rw_runlock_cookie_int(rw LOCK_FILE_LINE_ARG); +} + /* * This function is called when we are unable to obtain a write lock on the * first try. This means that at least one other thread holds either a * read or write lock. */ void -__rw_wlock_hard(volatile uintptr_t *c, uintptr_t v, uintptr_t tid, - const char *file, int line) +__rw_wlock_hard(volatile uintptr_t *c, uintptr_t v LOCK_FILE_LINE_ARG_DEF) { + uintptr_t tid; struct rwlock *rw; struct turnstile *ts; + struct thread *owner; #ifdef ADAPTIVE_RWLOCKS - volatile struct thread *owner; int spintries = 0; int i; #endif @@ -836,12 +879,16 @@ __rw_wlock_hard(volatile uintptr_t *c, uintptr_t v, ui struct lock_delay_arg lda; #endif #ifdef KDTRACE_HOOKS - uintptr_t state; u_int sleep_cnt = 0; int64_t sleep_time = 0; int64_t all_time = 0; #endif +#if defined(KDTRACE_HOOKS) || defined(LOCK_PROFILING) + uintptr_t state; + int doing_lockprof; +#endif + tid = (uintptr_t)curthread; if (SCHEDULER_STOPPED()) return; @@ -869,10 +916,23 @@ __rw_wlock_hard(volatile uintptr_t *c, uintptr_t v, ui CTR5(KTR_LOCK, "%s: %s contested (lock=%p) at %s:%d", __func__, rw->lock_object.lo_name, (void *)rw->rw_lock, file, line); -#ifdef KDTRACE_HOOKS - all_time -= lockstat_nsecs(&rw->lock_object); +#ifdef HWPMC_HOOKS + PMC_SOFT_CALL( , , lock, failed); +#endif + lock_profile_obtain_lock_failed(&rw->lock_object, + &contested, &waittime); + +#ifdef LOCK_PROFILING + doing_lockprof = 1; state = v; +#elif defined(KDTRACE_HOOKS) + doing_lockprof = lockstat_enabled; + if (__predict_false(doing_lockprof)) { + all_time -= lockstat_nsecs(&rw->lock_object); + state = v; + } #endif + for (;;) { if (v == RW_UNLOCKED) { if (_rw_write_lock_fetch(rw, &v, tid)) @@ -882,11 +942,7 @@ __rw_wlock_hard(volatile uintptr_t *c, uintptr_t v, ui #ifdef KDTRACE_HOOKS lda.spin_cnt++; #endif -#ifdef HWPMC_HOOKS - PMC_SOFT_CALL( , , lock, failed); -#endif - lock_profile_obtain_lock_failed(&rw->lock_object, - &contested, &waittime); + #ifdef ADAPTIVE_RWLOCKS /* * If the lock is write locked and the owner is @@ -913,9 +969,8 @@ __rw_wlock_hard(volatile uintptr_t *c, uintptr_t v, ui if ((v & RW_LOCK_READ) && RW_READERS(v) && spintries < rowner_retries) { if (!(v & RW_LOCK_WRITE_SPINNER)) { - if (!atomic_cmpset_ptr(&rw->rw_lock, v, + if (!atomic_fcmpset_ptr(&rw->rw_lock, &v, v | RW_LOCK_WRITE_SPINNER)) { - v = RW_READ_VALUE(rw); continue; } } @@ -924,13 +979,13 @@ __rw_wlock_hard(volatile uintptr_t *c, uintptr_t v, ui "spinning", "lockname:\"%s\"", rw->lock_object.lo_name); for (i = 0; i < rowner_loops; i++) { - if ((rw->rw_lock & RW_LOCK_WRITE_SPINNER) == 0) - break; cpu_spinwait(); + v = RW_READ_VALUE(rw); + if ((v & RW_LOCK_WRITE_SPINNER) == 0) + break; } KTR_STATE0(KTR_SCHED, "thread", sched_tdname(curthread), "running"); - v = RW_READ_VALUE(rw); #ifdef KDTRACE_HOOKS lda.spin_cnt += rowner_loops - i; #endif @@ -940,6 +995,8 @@ __rw_wlock_hard(volatile uintptr_t *c, uintptr_t v, ui #endif ts = turnstile_trywait(&rw->lock_object); v = RW_READ_VALUE(rw); +retry_ts: + owner = lv_rw_wowner(v); #ifdef ADAPTIVE_RWLOCKS /* @@ -949,8 +1006,7 @@ __rw_wlock_hard(volatile uintptr_t *c, uintptr_t v, ui * chain lock. If so, drop the turnstile lock and try * again. */ - if (!(v & RW_LOCK_READ)) { - owner = (struct thread *)RW_OWNER(v); + if (owner != NULL) { if (TD_IS_RUNNING(owner)) { turnstile_cancel(ts); continue; @@ -967,16 +1023,14 @@ __rw_wlock_hard(volatile uintptr_t *c, uintptr_t v, ui x = v & (RW_LOCK_WAITERS | RW_LOCK_WRITE_SPINNER); if ((v & ~x) == RW_UNLOCKED) { x &= ~RW_LOCK_WRITE_SPINNER; - if (atomic_cmpset_acq_ptr(&rw->rw_lock, v, tid | x)) { + if (atomic_fcmpset_acq_ptr(&rw->rw_lock, &v, tid | x)) { if (x) turnstile_claim(ts); else turnstile_cancel(ts); break; } - turnstile_cancel(ts); - v = RW_READ_VALUE(rw); - continue; + goto retry_ts; } /* * If the RW_LOCK_WRITE_WAITERS flag isn't set, then try to @@ -984,12 +1038,9 @@ __rw_wlock_hard(volatile uintptr_t *c, uintptr_t v, ui * again. */ if (!(v & RW_LOCK_WRITE_WAITERS)) { - if (!atomic_cmpset_ptr(&rw->rw_lock, v, - v | RW_LOCK_WRITE_WAITERS)) { - turnstile_cancel(ts); - v = RW_READ_VALUE(rw); - continue; - } + if (!atomic_fcmpset_ptr(&rw->rw_lock, &v, + v | RW_LOCK_WRITE_WAITERS)) + goto retry_ts; if (LOCK_LOG_TEST(&rw->lock_object, 0)) CTR2(KTR_LOCK, "%s: %p set write waiters flag", __func__, rw); @@ -1004,7 +1055,8 @@ __rw_wlock_hard(volatile uintptr_t *c, uintptr_t v, ui #ifdef KDTRACE_HOOKS sleep_time -= lockstat_nsecs(&rw->lock_object); #endif - turnstile_wait(ts, rw_owner(rw), TS_EXCLUSIVE_QUEUE); + MPASS(owner == rw_owner(rw)); + turnstile_wait(ts, owner, TS_EXCLUSIVE_QUEUE); #ifdef KDTRACE_HOOKS sleep_time += lockstat_nsecs(&rw->lock_object); sleep_cnt++; @@ -1017,6 +1069,10 @@ __rw_wlock_hard(volatile uintptr_t *c, uintptr_t v, ui #endif v = RW_READ_VALUE(rw); } +#if defined(KDTRACE_HOOKS) || defined(LOCK_PROFILING) + if (__predict_true(!doing_lockprof)) + return; +#endif #ifdef KDTRACE_HOOKS all_time += lockstat_nsecs(&rw->lock_object); if (sleep_time) @@ -1041,19 +1097,21 @@ __rw_wlock_hard(volatile uintptr_t *c, uintptr_t v, ui * on this lock. */ void -__rw_wunlock_hard(volatile uintptr_t *c, uintptr_t tid, const char *file, - int line) +__rw_wunlock_hard(volatile uintptr_t *c, uintptr_t v LOCK_FILE_LINE_ARG_DEF) { struct rwlock *rw; struct turnstile *ts; - uintptr_t v; + uintptr_t tid, setv; int queue; + tid = (uintptr_t)curthread; if (SCHEDULER_STOPPED()) return; rw = rwlock2rw(c); - v = RW_READ_VALUE(rw); + if (__predict_false(v == tid)) + v = RW_READ_VALUE(rw); + if (v & RW_LOCK_WRITER_RECURSED) { if (--(rw->rw_recurse) == 0) atomic_clear_ptr(&rw->rw_lock, RW_LOCK_WRITER_RECURSED); @@ -1073,8 +1131,6 @@ __rw_wunlock_hard(volatile uintptr_t *c, uintptr_t tid CTR2(KTR_LOCK, "%s: %p contested", __func__, rw); turnstile_chain_lock(&rw->lock_object); - ts = turnstile_lookup(&rw->lock_object); - MPASS(ts != NULL); /* * Use the same algo as sx locks for now. Prefer waking up shared @@ -1092,19 +1148,23 @@ __rw_wunlock_hard(volatile uintptr_t *c, uintptr_t tid * there that could be worked around either by waking both queues * of waiters or doing some complicated lock handoff gymnastics. */ - v = RW_UNLOCKED; - if (rw->rw_lock & RW_LOCK_WRITE_WAITERS) { + setv = RW_UNLOCKED; + v = RW_READ_VALUE(rw); + queue = TS_SHARED_QUEUE; + if (v & RW_LOCK_WRITE_WAITERS) { queue = TS_EXCLUSIVE_QUEUE; - v |= (rw->rw_lock & RW_LOCK_READ_WAITERS); - } else - queue = TS_SHARED_QUEUE; + setv |= (v & RW_LOCK_READ_WAITERS); + } + atomic_store_rel_ptr(&rw->rw_lock, setv); /* Wake up all waiters for the specific queue. */ if (LOCK_LOG_TEST(&rw->lock_object, 0)) CTR3(KTR_LOCK, "%s: %p waking up %s waiters", __func__, rw, queue == TS_SHARED_QUEUE ? "read" : "write"); + + ts = turnstile_lookup(&rw->lock_object); + MPASS(ts != NULL); *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@freebsd.org Sun Dec 31 05:14:41 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id F0BD8EA11B9; Sun, 31 Dec 2017 05:14:41 +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 B58CD29BF; Sun, 31 Dec 2017 05:14:41 +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 vBV5EemW041949; Sun, 31 Dec 2017 05:14:40 GMT (envelope-from mjg@FreeBSD.org) Received: (from mjg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id vBV5EeXT041948; Sun, 31 Dec 2017 05:14:40 GMT (envelope-from mjg@FreeBSD.org) Message-Id: <201712310514.vBV5EeXT041948@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 05:14:40 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r327414 - stable/11 X-SVN-Group: stable-11 X-SVN-Commit-Author: mjg X-SVN-Commit-Paths: stable/11 X-SVN-Commit-Revision: 327414 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 31 Dec 2017 05:14:42 -0000 Author: mjg Date: Sun Dec 31 05:14:40 2017 New Revision: 327414 URL: https://svnweb.freebsd.org/changeset/base/327414 Log: MFC r324328: amd64: remove unused variable from pmap_delayed_invl_genp Modified: Directory Properties: stable/11/ (props changed) From owner-svn-src-all@freebsd.org Sun Dec 31 02:48:17 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 946D0E83767; Sun, 31 Dec 2017 02:48:17 +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 60FB97C20A; Sun, 31 Dec 2017 02:48:17 +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 vBV2mGDF077609; Sun, 31 Dec 2017 02:48:16 GMT (envelope-from mjg@FreeBSD.org) Received: (from mjg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id vBV2mGoC077608; Sun, 31 Dec 2017 02:48:16 GMT (envelope-from mjg@FreeBSD.org) Message-Id: <201712310248.vBV2mGoC077608@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:48:16 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r327403 - stable/11/sys/amd64/amd64 X-SVN-Group: stable-11 X-SVN-Commit-Author: mjg X-SVN-Commit-Paths: stable/11/sys/amd64/amd64 X-SVN-Commit-Revision: 327403 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 31 Dec 2017 02:48:17 -0000 Author: mjg Date: Sun Dec 31 02:48:16 2017 New Revision: 327403 URL: https://svnweb.freebsd.org/changeset/base/327403 Log: MFC r321922: amd64: annotate the syscall return address check with __predict_false before: 0xffffffff80b03ebb <+2059>: mov 0x460(%r14),%rax 0xffffffff80b03ec2 <+2066>: mov 0x98(%rax),%rax 0xffffffff80b03ec9 <+2073>: shr $0x2f,%rax 0xffffffff80b03ecd <+2077>: je 0xffffffff80b03edd 0xffffffff80b03ecf <+2079>: mov 0x3f8(%r14),%rax 0xffffffff80b03ed6 <+2086>: orl $0x1,0xc8(%rax) 0xffffffff80b03edd <+2093>: add $0xf8,%rsp after: 0xffffffff80b03ebb <+2059>: mov 0x460(%r14),%rax 0xffffffff80b03ec2 <+2066>: mov 0x98(%rax),%rax 0xffffffff80b03ec9 <+2073>: shr $0x2f,%rax 0xffffffff80b03ecd <+2077>: jne 0xffffffff80b03eef 0xffffffff80b03ecf <+2079>: add $0xf8,%rsp Modified: stable/11/sys/amd64/amd64/trap.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/amd64/amd64/trap.c ============================================================================== --- stable/11/sys/amd64/amd64/trap.c Sun Dec 31 02:31:01 2017 (r327402) +++ stable/11/sys/amd64/amd64/trap.c Sun Dec 31 02:48:16 2017 (r327403) @@ -947,6 +947,6 @@ amd64_syscall(struct thread *td, int traced) * not be safe. Instead, use the full return path which * catches the problem safely. */ - if (td->td_frame->tf_rip >= VM_MAXUSER_ADDRESS) + if (__predict_false(td->td_frame->tf_rip >= VM_MAXUSER_ADDRESS)) set_pcb_flags(td->td_pcb, PCB_FULL_IRET); } From owner-svn-src-all@freebsd.org Sun Dec 31 05:16:24 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 8EBF1EA131F; Sun, 31 Dec 2017 05:16:24 +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 5978F2B06; Sun, 31 Dec 2017 05:16:24 +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 vBV5GN3v042067; Sun, 31 Dec 2017 05:16:23 GMT (envelope-from mjg@FreeBSD.org) Received: (from mjg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id vBV5GN7F042066; Sun, 31 Dec 2017 05:16:23 GMT (envelope-from mjg@FreeBSD.org) Message-Id: <201712310516.vBV5GN7F042066@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 05:16:23 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r327415 - stable/11/sys/kern X-SVN-Group: stable-11 X-SVN-Commit-Author: mjg X-SVN-Commit-Paths: stable/11/sys/kern X-SVN-Commit-Revision: 327415 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 31 Dec 2017 05:16:24 -0000 Author: mjg Date: Sun Dec 31 05:16:23 2017 New Revision: 327415 URL: https://svnweb.freebsd.org/changeset/base/327415 Log: MFC r324045: sysctl: remove target buffer read/write checks prior to calling the handler Said checks were inherently racy anyway as jokers could unmap target areas before the handler got around to accessing them. This saves time by avoiding locking the address space. Modified: stable/11/sys/kern/kern_sysctl.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/kern/kern_sysctl.c ============================================================================== --- stable/11/sys/kern/kern_sysctl.c Sun Dec 31 05:14:40 2017 (r327414) +++ stable/11/sys/kern/kern_sysctl.c Sun Dec 31 05:16:23 2017 (r327415) @@ -1982,16 +1982,9 @@ userland_sysctl(struct thread *td, int *name, u_int na } } req.validlen = req.oldlen; + req.oldptr = old; - if (old) { - if (!useracc(old, req.oldlen, VM_PROT_WRITE)) - return (EFAULT); - req.oldptr= old; - } - if (new != NULL) { - if (!useracc(new, newlen, VM_PROT_READ)) - return (EFAULT); req.newlen = newlen; req.newptr = new; } From owner-svn-src-all@freebsd.org Sun Dec 31 05:38:20 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 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-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" 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-all@freebsd.org Sun Dec 31 03:06:31 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 76454E84720; Sun, 31 Dec 2017 03:06: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 506F17CF96; Sun, 31 Dec 2017 03:06:31 +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 vBV36UXa086528; Sun, 31 Dec 2017 03:06:30 GMT (envelope-from mjg@FreeBSD.org) Received: (from mjg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id vBV36TcH086521; Sun, 31 Dec 2017 03:06:29 GMT (envelope-from mjg@FreeBSD.org) Message-Id: <201712310306.vBV36TcH086521@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 03:06:29 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r327404 - in stable/11/sys: kern vm X-SVN-Group: stable-11 X-SVN-Commit-Author: mjg X-SVN-Commit-Paths: in stable/11/sys: kern vm X-SVN-Commit-Revision: 327404 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 31 Dec 2017 03:06:31 -0000 Author: mjg Date: Sun Dec 31 03:06:29 2017 New Revision: 327404 URL: https://svnweb.freebsd.org/changeset/base/327404 Log: MFC r323234,r323305,r323306,r324044: Start annotating global _padalign locks with __exclusive_cache_line While these locks are guarnteed to not share their respective cache lines, their current placement leaves unnecessary holes in lines which preceeded them. For instance the annotation of vm_page_queue_free_mtx allows 2 neighbour cachelines (previously separate by the lock) to be collapsed into 1. The annotation is only effective on architectures which have it implemented in their linker script (currently only amd64). Thus locks are not converted to their not-padaligned variants as to not affect the rest. ============= Annotate global process locks with __exclusive_cache_line ============= Annotate Giant with __exclusive_cache_line ============= Annotate sysctlmemlock with __exclusive_cache_line. Modified: stable/11/sys/kern/kern_proc.c stable/11/sys/kern/kern_sysctl.c stable/11/sys/kern/subr_vmem.c stable/11/sys/kern/vfs_bio.c stable/11/sys/vm/uma_core.c stable/11/sys/vm/vm_page.c stable/11/sys/vm/vm_pager.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/kern/kern_proc.c ============================================================================== --- stable/11/sys/kern/kern_proc.c Sun Dec 31 02:48:16 2017 (r327403) +++ stable/11/sys/kern/kern_proc.c Sun Dec 31 03:06:29 2017 (r327404) @@ -131,9 +131,9 @@ struct pgrphashhead *pgrphashtbl; u_long pgrphash; struct proclist allproc; struct proclist zombproc; -struct sx allproc_lock; -struct sx proctree_lock; -struct mtx ppeers_lock; +struct sx __exclusive_cache_line allproc_lock; +struct sx __exclusive_cache_line proctree_lock; +struct mtx __exclusive_cache_line ppeers_lock; uma_zone_t proc_zone; /* Modified: stable/11/sys/kern/kern_sysctl.c ============================================================================== --- stable/11/sys/kern/kern_sysctl.c Sun Dec 31 02:48:16 2017 (r327403) +++ stable/11/sys/kern/kern_sysctl.c Sun Dec 31 03:06:29 2017 (r327404) @@ -88,7 +88,7 @@ static MALLOC_DEFINE(M_SYSCTLTMP, "sysctltmp", "sysctl * sysctl requests larger than a single page via an exclusive lock. */ static struct rmlock sysctllock; -static struct sx sysctlmemlock; +static struct sx __exclusive_cache_line sysctlmemlock; #define SYSCTL_WLOCK() rm_wlock(&sysctllock) #define SYSCTL_WUNLOCK() rm_wunlock(&sysctllock) Modified: stable/11/sys/kern/subr_vmem.c ============================================================================== --- stable/11/sys/kern/subr_vmem.c Sun Dec 31 02:48:16 2017 (r327403) +++ stable/11/sys/kern/subr_vmem.c Sun Dec 31 03:06:29 2017 (r327404) @@ -181,7 +181,7 @@ static struct callout vmem_periodic_ch; static int vmem_periodic_interval; static struct task vmem_periodic_wk; -static struct mtx_padalign vmem_list_lock; +static struct mtx_padalign __exclusive_cache_line vmem_list_lock; static LIST_HEAD(, vmem) vmem_list = LIST_HEAD_INITIALIZER(vmem_list); /* ---- misc */ @@ -580,7 +580,7 @@ qc_drain(vmem_t *vm) #ifndef UMA_MD_SMALL_ALLOC -static struct mtx_padalign vmem_bt_lock; +static struct mtx_padalign __exclusive_cache_line vmem_bt_lock; /* * vmem_bt_alloc: Allocate a new page of boundary tags. Modified: stable/11/sys/kern/vfs_bio.c ============================================================================== --- stable/11/sys/kern/vfs_bio.c Sun Dec 31 02:48:16 2017 (r327403) +++ stable/11/sys/kern/vfs_bio.c Sun Dec 31 03:06:29 2017 (r327404) @@ -253,23 +253,23 @@ SYSCTL_INT(_vfs, OID_AUTO, maxbcachebuf, CTLFLAG_RDTUN /* * This lock synchronizes access to bd_request. */ -static struct mtx_padalign bdlock; +static struct mtx_padalign __exclusive_cache_line bdlock; /* * This lock protects the runningbufreq and synchronizes runningbufwakeup and * waitrunningbufspace(). */ -static struct mtx_padalign rbreqlock; +static struct mtx_padalign __exclusive_cache_line rbreqlock; /* * Lock that protects needsbuffer and the sleeps/wakeups surrounding it. */ -static struct rwlock_padalign nblock; +static struct rwlock_padalign __exclusive_cache_line nblock; /* * Lock that protects bdirtywait. */ -static struct mtx_padalign bdirtylock; +static struct mtx_padalign __exclusive_cache_line bdirtylock; /* * Wakeup point for bufdaemon, as well as indicator of whether it is already @@ -348,7 +348,7 @@ static int bq_len[BUFFER_QUEUES]; /* * Lock for each bufqueue */ -static struct mtx_padalign bqlocks[BUFFER_QUEUES]; +static struct mtx_padalign __exclusive_cache_line bqlocks[BUFFER_QUEUES]; /* * per-cpu empty buffer cache. Modified: stable/11/sys/vm/uma_core.c ============================================================================== --- stable/11/sys/vm/uma_core.c Sun Dec 31 02:48:16 2017 (r327403) +++ stable/11/sys/vm/uma_core.c Sun Dec 31 03:06:29 2017 (r327404) @@ -138,7 +138,7 @@ static LIST_HEAD(,uma_zone) uma_cachezones = LIST_HEAD_INITIALIZER(uma_cachezones); /* This RW lock protects the keg list */ -static struct rwlock_padalign uma_rwlock; +static struct rwlock_padalign __exclusive_cache_line uma_rwlock; /* Linked list of boot time pages */ static LIST_HEAD(,uma_slab) uma_boot_pages = Modified: stable/11/sys/vm/vm_page.c ============================================================================== --- stable/11/sys/vm/vm_page.c Sun Dec 31 02:48:16 2017 (r327403) +++ stable/11/sys/vm/vm_page.c Sun Dec 31 03:06:29 2017 (r327404) @@ -127,9 +127,9 @@ __FBSDID("$FreeBSD$"); */ struct vm_domain vm_dom[MAXMEMDOM]; -struct mtx_padalign vm_page_queue_free_mtx; +struct mtx_padalign __exclusive_cache_line vm_page_queue_free_mtx; -struct mtx_padalign pa_lock[PA_LOCK_COUNT]; +struct mtx_padalign __exclusive_cache_line pa_lock[PA_LOCK_COUNT]; vm_page_t vm_page_array; long vm_page_array_size; Modified: stable/11/sys/vm/vm_pager.c ============================================================================== --- stable/11/sys/vm/vm_pager.c Sun Dec 31 02:48:16 2017 (r327403) +++ stable/11/sys/vm/vm_pager.c Sun Dec 31 03:06:29 2017 (r327404) @@ -165,7 +165,7 @@ struct pagerops *pagertab[] = { * cleaning requests (NPENDINGIO == 64) * the maximum swap cluster size * (MAXPHYS == 64k) if you want to get the most efficiency. */ -struct mtx_padalign pbuf_mtx; +struct mtx_padalign __exclusive_cache_line pbuf_mtx; static TAILQ_HEAD(swqueue, buf) bswlist; static int bswneeded; vm_offset_t swapbkva; /* swap buffers kva */ From owner-svn-src-all@freebsd.org Sun Dec 31 03:35:37 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 37CD9E86729; Sun, 31 Dec 2017 03:35:37 +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 11EA47E7C3; Sun, 31 Dec 2017 03:35:36 +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 vBV3Za6F099275; Sun, 31 Dec 2017 03:35:36 GMT (envelope-from mjg@FreeBSD.org) Received: (from mjg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id vBV3ZZro099265; Sun, 31 Dec 2017 03:35:35 GMT (envelope-from mjg@FreeBSD.org) Message-Id: <201712310335.vBV3ZZro099265@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 03:35:35 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r327409 - in stable/11/sys: conf kern security/audit sys X-SVN-Group: stable-11 X-SVN-Commit-Author: mjg X-SVN-Commit-Paths: in stable/11/sys: conf kern security/audit sys X-SVN-Commit-Revision: 327409 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 31 Dec 2017 03:35:37 -0000 Author: mjg Date: Sun Dec 31 03:35:34 2017 New Revision: 327409 URL: https://svnweb.freebsd.org/changeset/base/327409 Log: MFC r323235,r323236,r324789,r324863: Introduce __read_frequently While __read_mostly groups variables together, their placement is not specified. In particular 2 frequently used variables can end up in different lines. This annotation is only expected to be used for variables read all the time, e.g. on each syscall entry. ============= Sprinkle __read_frequently on few obvious places. Note that some of annotated variables should probably change their types to something smaller, preferably bit-sized. ============= Mark kdb_active as __read_frequently and switch to bool to eat less space. ============= Change kdb_active type to u_char. Fixes warnings from gcc and keeps the small size. Perhaps nesting should be moved to another variablle. Modified: stable/11/sys/conf/ldscript.amd64 stable/11/sys/kern/kern_dtrace.c stable/11/sys/kern/kern_lockstat.c stable/11/sys/kern/kern_mutex.c stable/11/sys/kern/kern_rwlock.c stable/11/sys/kern/kern_sx.c stable/11/sys/kern/subr_kdb.c stable/11/sys/security/audit/audit.c stable/11/sys/sys/kdb.h stable/11/sys/sys/systm.h Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/conf/ldscript.amd64 ============================================================================== --- stable/11/sys/conf/ldscript.amd64 Sun Dec 31 03:34:00 2017 (r327408) +++ stable/11/sys/conf/ldscript.amd64 Sun Dec 31 03:35:34 2017 (r327409) @@ -146,6 +146,10 @@ SECTIONS . = DATA_SEGMENT_RELRO_END (24, .); .got.plt : { *(.got.plt) } . = ALIGN(64); + .data.read_frequently : + { + *(.data.read_frequently) + } .data.read_mostly : { *(.data.read_mostly) Modified: stable/11/sys/kern/kern_dtrace.c ============================================================================== --- stable/11/sys/kern/kern_dtrace.c Sun Dec 31 03:34:00 2017 (r327408) +++ stable/11/sys/kern/kern_dtrace.c Sun Dec 31 03:35:34 2017 (r327409) @@ -54,7 +54,7 @@ dtrace_doubletrap_func_t dtrace_doubletrap_func; dtrace_pid_probe_ptr_t dtrace_pid_probe_ptr; dtrace_return_probe_ptr_t dtrace_return_probe_ptr; -systrace_probe_func_t systrace_probe_func; +systrace_probe_func_t __read_frequently systrace_probe_func; /* Return the DTrace process data size compiled in the kernel hooks. */ size_t Modified: stable/11/sys/kern/kern_lockstat.c ============================================================================== --- stable/11/sys/kern/kern_lockstat.c Sun Dec 31 03:34:00 2017 (r327408) +++ stable/11/sys/kern/kern_lockstat.c Sun Dec 31 03:35:34 2017 (r327409) @@ -62,7 +62,7 @@ SDT_PROBE_DEFINE1(lockstat, , , sx__downgrade, "struct SDT_PROBE_DEFINE2(lockstat, , , thread__spin, "struct mtx *", "uint64_t"); -volatile int __read_mostly lockstat_enabled; +volatile int __read_frequently lockstat_enabled; uint64_t lockstat_nsecs(struct lock_object *lo) Modified: stable/11/sys/kern/kern_mutex.c ============================================================================== --- stable/11/sys/kern/kern_mutex.c Sun Dec 31 03:34:00 2017 (r327408) +++ stable/11/sys/kern/kern_mutex.c Sun Dec 31 03:35:34 2017 (r327409) @@ -140,7 +140,7 @@ struct lock_class lock_class_mtx_spin = { #ifdef ADAPTIVE_MUTEXES static SYSCTL_NODE(_debug, OID_AUTO, mtx, CTLFLAG_RD, NULL, "mtx debugging"); -static struct lock_delay_config __read_mostly mtx_delay; +static struct lock_delay_config __read_frequently mtx_delay; SYSCTL_INT(_debug_mtx, OID_AUTO, delay_base, CTLFLAG_RW, &mtx_delay.base, 0, ""); @@ -153,7 +153,7 @@ LOCK_DELAY_SYSINIT_DEFAULT(mtx_delay); static SYSCTL_NODE(_debug, OID_AUTO, mtx_spin, CTLFLAG_RD, NULL, "mtx spin debugging"); -static struct lock_delay_config __read_mostly mtx_spin_delay; +static struct lock_delay_config __read_frequently mtx_spin_delay; SYSCTL_INT(_debug_mtx_spin, OID_AUTO, delay_base, CTLFLAG_RW, &mtx_spin_delay.base, 0, ""); Modified: stable/11/sys/kern/kern_rwlock.c ============================================================================== --- stable/11/sys/kern/kern_rwlock.c Sun Dec 31 03:34:00 2017 (r327408) +++ stable/11/sys/kern/kern_rwlock.c Sun Dec 31 03:35:34 2017 (r327409) @@ -93,14 +93,14 @@ struct lock_class lock_class_rw = { }; #ifdef ADAPTIVE_RWLOCKS -static int rowner_retries = 10; -static int rowner_loops = 10000; +static int __read_frequently rowner_retries = 10; +static int __read_frequently rowner_loops = 10000; static SYSCTL_NODE(_debug, OID_AUTO, rwlock, CTLFLAG_RD, NULL, "rwlock debugging"); SYSCTL_INT(_debug_rwlock, OID_AUTO, retry, CTLFLAG_RW, &rowner_retries, 0, ""); SYSCTL_INT(_debug_rwlock, OID_AUTO, loops, CTLFLAG_RW, &rowner_loops, 0, ""); -static struct lock_delay_config __read_mostly rw_delay; +static struct lock_delay_config __read_frequently rw_delay; SYSCTL_INT(_debug_rwlock, OID_AUTO, delay_base, CTLFLAG_RW, &rw_delay.base, 0, ""); Modified: stable/11/sys/kern/kern_sx.c ============================================================================== --- stable/11/sys/kern/kern_sx.c Sun Dec 31 03:34:00 2017 (r327408) +++ stable/11/sys/kern/kern_sx.c Sun Dec 31 03:35:34 2017 (r327409) @@ -142,13 +142,13 @@ struct lock_class lock_class_sx = { #endif #ifdef ADAPTIVE_SX -static u_int asx_retries = 10; -static u_int asx_loops = 10000; +static __read_frequently u_int asx_retries = 10; +static __read_frequently u_int asx_loops = 10000; static SYSCTL_NODE(_debug, OID_AUTO, sx, CTLFLAG_RD, NULL, "sxlock debugging"); SYSCTL_UINT(_debug_sx, OID_AUTO, retries, CTLFLAG_RW, &asx_retries, 0, ""); SYSCTL_UINT(_debug_sx, OID_AUTO, loops, CTLFLAG_RW, &asx_loops, 0, ""); -static struct lock_delay_config __read_mostly sx_delay; +static struct lock_delay_config __read_frequently sx_delay; SYSCTL_INT(_debug_sx, OID_AUTO, delay_base, CTLFLAG_RW, &sx_delay.base, 0, ""); Modified: stable/11/sys/kern/subr_kdb.c ============================================================================== --- stable/11/sys/kern/subr_kdb.c Sun Dec 31 03:34:00 2017 (r327408) +++ stable/11/sys/kern/subr_kdb.c Sun Dec 31 03:35:34 2017 (r327409) @@ -50,7 +50,7 @@ __FBSDID("$FreeBSD$"); #include #endif -int kdb_active = 0; +u_char __read_frequently kdb_active = 0; static void *kdb_jmpbufp = NULL; struct kdb_dbbe *kdb_dbbe = NULL; static struct pcb kdb_pcb; Modified: stable/11/sys/security/audit/audit.c ============================================================================== --- stable/11/sys/security/audit/audit.c Sun Dec 31 03:34:00 2017 (r327408) +++ stable/11/sys/security/audit/audit.c Sun Dec 31 03:35:34 2017 (r327409) @@ -91,7 +91,7 @@ static SYSCTL_NODE(_security, OID_AUTO, audit, CTLFLAG * * Define the audit control flags. */ -int audit_enabled; +int __read_frequently audit_enabled; int audit_suspended; /* Modified: stable/11/sys/sys/kdb.h ============================================================================== --- stable/11/sys/sys/kdb.h Sun Dec 31 03:34:00 2017 (r327408) +++ stable/11/sys/sys/kdb.h Sun Dec 31 03:35:34 2017 (r327409) @@ -59,7 +59,7 @@ struct kdb_dbbe { }; \ DATA_SET(kdb_dbbe_set, name##_dbbe) -extern int kdb_active; /* Non-zero while in debugger. */ +extern u_char kdb_active; /* Non-zero while in debugger. */ extern int debugger_on_panic; /* enter the debugger on panic. */ extern struct kdb_dbbe *kdb_dbbe; /* Default debugger backend or NULL. */ extern struct trapframe *kdb_frame; /* Frame to kdb_trap(). */ Modified: stable/11/sys/sys/systm.h ============================================================================== --- stable/11/sys/sys/systm.h Sun Dec 31 03:34:00 2017 (r327408) +++ stable/11/sys/sys/systm.h Sun Dec 31 03:35:34 2017 (r327409) @@ -138,6 +138,7 @@ void kassert_panic(const char *fmt, ...) __printflike * Align variables. */ #define __read_mostly __section(".data.read_mostly") +#define __read_frequently __section(".data.read_frequently") #define __exclusive_cache_line __aligned(CACHE_LINE_SIZE) \ __section(".data.exclusive_cache_line") /* From owner-svn-src-all@freebsd.org Sun Dec 31 05:22:28 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 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-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" 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-all@freebsd.org Sun Dec 31 06:10:08 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 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-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" 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-all@freebsd.org Sun Dec 31 06:44:16 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 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-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" 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-all@freebsd.org Sun Dec 31 06:58:59 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 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-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" 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-all@freebsd.org Sun Dec 31 07:25:57 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 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-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" 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-all@freebsd.org Sun Dec 31 07:26:25 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 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-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" 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-all@freebsd.org Sun Dec 31 09:21:02 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 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-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" 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-all@freebsd.org Sun Dec 31 09:21:36 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 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-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" 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-all@freebsd.org Sun Dec 31 09:22:08 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 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-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" 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-all@freebsd.org Sun Dec 31 09:22:33 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 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-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" 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-all@freebsd.org Sun Dec 31 09:23:04 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 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-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" 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-all@freebsd.org Sun Dec 31 09:23:20 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 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-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" 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-all@freebsd.org Sun Dec 31 09:23:37 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 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-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" 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-all@freebsd.org Sun Dec 31 09:23:54 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 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-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" 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-all@freebsd.org Sun Dec 31 09:24:12 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 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-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" 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-all@freebsd.org Sun Dec 31 09:24:44 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 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-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" 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-all@freebsd.org Sun Dec 31 10:01:33 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 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-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" 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-all@freebsd.org Sun Dec 31 10:10:56 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 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-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" 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-all@freebsd.org Sun Dec 31 11:15:23 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 84D41EB0B3A; Sun, 31 Dec 2017 11:15:23 +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 5B3A86EF42; Sun, 31 Dec 2017 11:15:22 +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 vBVBFLZF080997; Sun, 31 Dec 2017 03:15:21 -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 vBVBFLGu080996; Sun, 31 Dec 2017 03:15:21 -0800 (PST) (envelope-from freebsd) From: "Rodney W. Grimes" Message-Id: <201712311115.vBVBFLGu080996@pdx.rh.CN85.dnsmgr.net> Subject: Re: svn commit: r327414 - stable/11 In-Reply-To: <201712310514.vBV5EeXT041948@repo.freebsd.org> To: Mateusz Guzik Date: Sun, 31 Dec 2017 03:15:20 -0800 (PST) CC: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@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-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 31 Dec 2017 11:15:23 -0000 [ Charset UTF-8 unsupported, converting... ] > Author: mjg > Date: Sun Dec 31 05:14:40 2017 > New Revision: 327414 > URL: https://svnweb.freebsd.org/changeset/base/327414 > > Log: > MFC r324328: > > amd64: remove unused variable from pmap_delayed_invl_genp > > Modified: > Directory Properties: > stable/11/ (props changed) > > I dont see any diff here???? https://www.mail-archive.com/svn-src-all@freebsd.org/msg151169.html shows that 2 lines are deleted by r324328 -- Rod Grimes rgrimes@freebsd.org From owner-svn-src-all@freebsd.org Sun Dec 31 11:20:46 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 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-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" 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-all@freebsd.org Sun Dec 31 16:18:14 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 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-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" 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-all@freebsd.org Sun Dec 31 16:48:06 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 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-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" 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-all@freebsd.org Sun Dec 31 16:52:30 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id BB56AE86690; Sun, 31 Dec 2017 16:52:30 +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 8432979EF3; Sun, 31 Dec 2017 16:52:30 +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 vBVGqT9c036059; Sun, 31 Dec 2017 16:52:29 GMT (envelope-from bz@FreeBSD.org) Received: (from bz@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id vBVGqTKh036057; Sun, 31 Dec 2017 16:52:29 GMT (envelope-from bz@FreeBSD.org) Message-Id: <201712311652.vBVGqTKh036057@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:52:29 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r327436 - in stable/11: . sys/sys X-SVN-Group: stable-11 X-SVN-Commit-Author: bz X-SVN-Commit-Paths: in stable/11: . sys/sys X-SVN-Commit-Revision: 327436 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 31 Dec 2017 16:52:30 -0000 Author: bz Date: Sun Dec 31 16:52:29 2017 New Revision: 327436 URL: https://svnweb.freebsd.org/changeset/base/327436 Log: MFC r327435: Happy New Year 2018 my friends! Modified: stable/11/COPYRIGHT stable/11/sys/sys/copyright.h Directory Properties: stable/11/ (props changed) Modified: stable/11/COPYRIGHT ============================================================================== --- stable/11/COPYRIGHT Sun Dec 31 16:48:04 2017 (r327435) +++ stable/11/COPYRIGHT Sun Dec 31 16:52:29 2017 (r327436) @@ -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: stable/11/sys/sys/copyright.h ============================================================================== --- stable/11/sys/sys/copyright.h Sun Dec 31 16:48:04 2017 (r327435) +++ stable/11/sys/sys/copyright.h Sun Dec 31 16:52:29 2017 (r327436) @@ -1,5 +1,5 @@ /*- - * 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 @@ -34,7 +34,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-all@freebsd.org Sun Dec 31 17:08:00 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 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-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" 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-all@freebsd.org Sun Dec 31 17:11:14 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 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-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" 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-all@freebsd.org Sun Dec 31 18:53:14 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 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-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" 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-all@freebsd.org Sun Dec 31 19:24:14 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 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-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" 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-all@freebsd.org Sun Dec 31 20:08:17 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 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-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" 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-all@freebsd.org Sun Dec 31 20:10:09 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 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-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" 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-all@freebsd.org Sun Dec 31 20:20:57 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 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-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" 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-all@freebsd.org Sun Dec 31 20:21:08 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 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-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" 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-all@freebsd.org Sun Dec 31 20:23:40 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 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-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 31 Dec 2017 20:23:41 -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-all@freebsd.org Sun Dec 31 20:30:53 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 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-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" 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-all@freebsd.org Sun Dec 31 21:00:22 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 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-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" 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-all@freebsd.org Sun Dec 31 21:23:15 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 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-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" 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-all@freebsd.org Sun Dec 31 21:29:22 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 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-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" 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-all@freebsd.org Sun Dec 31 21:36:44 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 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-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" 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-all@freebsd.org Sun Dec 31 22:01:38 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 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-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" 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-all@freebsd.org Sun Dec 31 22:35:34 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 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-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" 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-all@freebsd.org Sun Dec 31 22:43:26 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 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-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" 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-all@freebsd.org Sun Dec 31 23:40:07 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 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-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" 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-all@freebsd.org Mon Jan 1 00:20:36 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 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-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" 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-all@freebsd.org Mon Jan 1 03:33:03 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 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-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" 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-all@freebsd.org Mon Jan 1 04:06:25 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 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-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" 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-all@freebsd.org Mon Jan 1 04:10:26 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 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-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" 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-all@freebsd.org Mon Jan 1 04:10:32 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 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-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" 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-all@freebsd.org Mon Jan 1 04:10:39 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 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-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" 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-all@freebsd.org Mon Jan 1 05:13:04 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 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-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" 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-all@freebsd.org Mon Jan 1 05:18:29 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 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-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" 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-all@freebsd.org Mon Jan 1 08:01:27 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 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-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" 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-all@freebsd.org Mon Jan 1 09:41:20 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 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-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" 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-all@freebsd.org Mon Jan 1 18:55:14 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 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-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" 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-all@freebsd.org Mon Jan 1 18:59:12 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 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-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" 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-all@freebsd.org Mon Jan 1 19:04:42 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 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-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" 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-all@freebsd.org Mon Jan 1 19:27:34 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 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-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" 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-all@freebsd.org Mon Jan 1 19:34:20 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 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-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" 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-all@freebsd.org Mon Jan 1 20:24:18 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id B6B3BEBAE0A; Mon, 1 Jan 2018 20:24:18 +0000 (UTC) (envelope-from dim@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 7DCE67B7EA; Mon, 1 Jan 2018 20:24:18 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w01KOHuR031017; Mon, 1 Jan 2018 20:24:17 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w01KOHtZ031016; Mon, 1 Jan 2018 20:24:17 GMT (envelope-from dim@FreeBSD.org) Message-Id: <201801012024.w01KOHtZ031016@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Mon, 1 Jan 2018 20:24:17 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r327470 - in stable: 10/sys/cddl/contrib/opensolaris/uts/common/sys 11/sys/cddl/contrib/opensolaris/uts/common/sys 9/sys/cddl/contrib/opensolaris/uts/common/sys X-SVN-Group: stable-10 X-SVN-Commit-Author: dim X-SVN-Commit-Paths: in stable: 10/sys/cddl/contrib/opensolaris/uts/common/sys 11/sys/cddl/contrib/opensolaris/uts/common/sys 9/sys/cddl/contrib/opensolaris/uts/common/sys X-SVN-Commit-Revision: 327470 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 01 Jan 2018 20:24:18 -0000 Author: dim Date: Mon Jan 1 20:24:16 2018 New Revision: 327470 URL: https://svnweb.freebsd.org/changeset/base/327470 Log: MFC r327167: Remove obsolete register keyword from opensolaris's sysmacros.h. When compiling zfsd with recent clang, it leads to a warning about the register storage class being incompatible with C++17. Modified: stable/10/sys/cddl/contrib/opensolaris/uts/common/sys/sysmacros.h Directory Properties: stable/10/ (props changed) Changes in other areas also in this revision: Modified: stable/11/sys/cddl/contrib/opensolaris/uts/common/sys/sysmacros.h stable/9/sys/cddl/contrib/opensolaris/uts/common/sys/sysmacros.h Directory Properties: stable/11/ (props changed) stable/9/ (props changed) stable/9/sys/ (props changed) stable/9/sys/cddl/contrib/opensolaris/ (props changed) Modified: stable/10/sys/cddl/contrib/opensolaris/uts/common/sys/sysmacros.h ============================================================================== --- stable/10/sys/cddl/contrib/opensolaris/uts/common/sys/sysmacros.h Mon Jan 1 19:34:19 2018 (r327469) +++ stable/10/sys/cddl/contrib/opensolaris/uts/common/sys/sysmacros.h Mon Jan 1 20:24:16 2018 (r327470) @@ -388,7 +388,7 @@ highbit(ulong_t i) #if defined(__FreeBSD__) && defined(_KERNEL) && defined(HAVE_INLINE_FLSL) return (flsl(i)); #else - register int h = 1; + int h = 1; if (i == 0) return (0); From owner-svn-src-all@freebsd.org Mon Jan 1 20:24:18 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 502CEEBAE00; Mon, 1 Jan 2018 20:24:18 +0000 (UTC) (envelope-from dim@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 17FA47B7E7; Mon, 1 Jan 2018 20:24:18 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w01KOHCs031005; Mon, 1 Jan 2018 20:24:17 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w01KOHLj031004; Mon, 1 Jan 2018 20:24:17 GMT (envelope-from dim@FreeBSD.org) Message-Id: <201801012024.w01KOHLj031004@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Mon, 1 Jan 2018 20:24:17 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r327470 - in stable: 10/sys/cddl/contrib/opensolaris/uts/common/sys 11/sys/cddl/contrib/opensolaris/uts/common/sys 9/sys/cddl/contrib/opensolaris/uts/common/sys X-SVN-Group: stable-9 X-SVN-Commit-Author: dim X-SVN-Commit-Paths: in stable: 10/sys/cddl/contrib/opensolaris/uts/common/sys 11/sys/cddl/contrib/opensolaris/uts/common/sys 9/sys/cddl/contrib/opensolaris/uts/common/sys X-SVN-Commit-Revision: 327470 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 01 Jan 2018 20:24:18 -0000 Author: dim Date: Mon Jan 1 20:24:16 2018 New Revision: 327470 URL: https://svnweb.freebsd.org/changeset/base/327470 Log: MFC r327167: Remove obsolete register keyword from opensolaris's sysmacros.h. When compiling zfsd with recent clang, it leads to a warning about the register storage class being incompatible with C++17. Modified: stable/9/sys/cddl/contrib/opensolaris/uts/common/sys/sysmacros.h Directory Properties: stable/9/ (props changed) stable/9/sys/ (props changed) stable/9/sys/cddl/contrib/opensolaris/ (props changed) Changes in other areas also in this revision: Modified: stable/10/sys/cddl/contrib/opensolaris/uts/common/sys/sysmacros.h stable/11/sys/cddl/contrib/opensolaris/uts/common/sys/sysmacros.h Directory Properties: stable/10/ (props changed) stable/11/ (props changed) Modified: stable/9/sys/cddl/contrib/opensolaris/uts/common/sys/sysmacros.h ============================================================================== --- stable/9/sys/cddl/contrib/opensolaris/uts/common/sys/sysmacros.h Mon Jan 1 19:34:19 2018 (r327469) +++ stable/9/sys/cddl/contrib/opensolaris/uts/common/sys/sysmacros.h Mon Jan 1 20:24:16 2018 (r327470) @@ -388,7 +388,7 @@ highbit(ulong_t i) #if defined(__FreeBSD__) && defined(_KERNEL) && defined(HAVE_INLINE_FLSL) return (flsl(i)); #else - register int h = 1; + int h = 1; if (i == 0) return (0); From owner-svn-src-all@freebsd.org Mon Jan 1 20:24:18 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 9B738EBAE04; Mon, 1 Jan 2018 20:24:18 +0000 (UTC) (envelope-from dim@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 628D57B7E8; Mon, 1 Jan 2018 20:24:18 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w01KOHPj031011; Mon, 1 Jan 2018 20:24:17 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w01KOH4v031010; Mon, 1 Jan 2018 20:24:17 GMT (envelope-from dim@FreeBSD.org) Message-Id: <201801012024.w01KOH4v031010@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Mon, 1 Jan 2018 20:24:17 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r327470 - in stable: 10/sys/cddl/contrib/opensolaris/uts/common/sys 11/sys/cddl/contrib/opensolaris/uts/common/sys 9/sys/cddl/contrib/opensolaris/uts/common/sys X-SVN-Group: stable-11 X-SVN-Commit-Author: dim X-SVN-Commit-Paths: in stable: 10/sys/cddl/contrib/opensolaris/uts/common/sys 11/sys/cddl/contrib/opensolaris/uts/common/sys 9/sys/cddl/contrib/opensolaris/uts/common/sys X-SVN-Commit-Revision: 327470 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 01 Jan 2018 20:24:18 -0000 Author: dim Date: Mon Jan 1 20:24:16 2018 New Revision: 327470 URL: https://svnweb.freebsd.org/changeset/base/327470 Log: MFC r327167: Remove obsolete register keyword from opensolaris's sysmacros.h. When compiling zfsd with recent clang, it leads to a warning about the register storage class being incompatible with C++17. Modified: stable/11/sys/cddl/contrib/opensolaris/uts/common/sys/sysmacros.h Directory Properties: stable/11/ (props changed) Changes in other areas also in this revision: Modified: stable/10/sys/cddl/contrib/opensolaris/uts/common/sys/sysmacros.h stable/9/sys/cddl/contrib/opensolaris/uts/common/sys/sysmacros.h Directory Properties: stable/10/ (props changed) stable/9/ (props changed) stable/9/sys/ (props changed) stable/9/sys/cddl/contrib/opensolaris/ (props changed) Modified: stable/11/sys/cddl/contrib/opensolaris/uts/common/sys/sysmacros.h ============================================================================== --- stable/11/sys/cddl/contrib/opensolaris/uts/common/sys/sysmacros.h Mon Jan 1 19:34:19 2018 (r327469) +++ stable/11/sys/cddl/contrib/opensolaris/uts/common/sys/sysmacros.h Mon Jan 1 20:24:16 2018 (r327470) @@ -388,7 +388,7 @@ highbit(ulong_t i) #if defined(__FreeBSD__) && defined(_KERNEL) && defined(HAVE_INLINE_FLSL) return (flsl(i)); #else - register int h = 1; + int h = 1; if (i == 0) return (0); From owner-svn-src-all@freebsd.org Mon Jan 1 20:39:16 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 36D79EBB96A; Mon, 1 Jan 2018 20:39:16 +0000 (UTC) (envelope-from dim@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 B01E87C5FC; Mon, 1 Jan 2018 20:39:15 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w01KdD9Y035814; Mon, 1 Jan 2018 20:39:13 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w01KdDgS035811; Mon, 1 Jan 2018 20:39:13 GMT (envelope-from dim@FreeBSD.org) Message-Id: <201801012039.w01KdDgS035811@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Mon, 1 Jan 2018 20:39:13 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r327471 - in stable: 10/contrib/binutils/bfd 10/contrib/binutils/include 11/contrib/binutils/bfd 11/contrib/binutils/include 9/contrib/binutils/bfd 9/contrib/binutils/include X-SVN-Group: stable-9 X-SVN-Commit-Author: dim X-SVN-Commit-Paths: in stable: 10/contrib/binutils/bfd 10/contrib/binutils/include 11/contrib/binutils/bfd 11/contrib/binutils/include 9/contrib/binutils/bfd 9/contrib/binutils/include X-SVN-Commit-Revision: 327471 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 01 Jan 2018 20:39:16 -0000 Author: dim Date: Mon Jan 1 20:39:12 2018 New Revision: 327471 URL: https://svnweb.freebsd.org/changeset/base/327471 Log: MFC r327164: Fix clang 6.0.0 compiler warnings in binutils Latest clang git has a warning -Wnull-pointer-arithmetic which will trigger a -Werror failure. Addition and subtraction from a null pointer is undefined behaviour and could be optimized into anything. Furthermore, using the difference between two pointers and casting the result back to a pointer is not portable since the size of ptrdiff_t does not necessary have to be the same as size of void* (this happens e.g. on CHERI). Using intptr_t instead fixes this portability issue and the compiler warning. Submitted by; Alexander Richardson Obtained from: CheriBSD Differential Revision: https://reviews.freebsd.org/D12928 Modified: stable/9/contrib/binutils/bfd/elflink.c stable/9/contrib/binutils/include/obstack.h Directory Properties: stable/9/ (props changed) stable/9/contrib/ (props changed) stable/9/contrib/binutils/ (props changed) Changes in other areas also in this revision: Modified: stable/10/contrib/binutils/bfd/elflink.c stable/10/contrib/binutils/include/obstack.h stable/11/contrib/binutils/bfd/elflink.c stable/11/contrib/binutils/include/obstack.h Directory Properties: stable/10/ (props changed) stable/11/ (props changed) Modified: stable/9/contrib/binutils/bfd/elflink.c ============================================================================== --- stable/9/contrib/binutils/bfd/elflink.c Mon Jan 1 20:24:16 2018 (r327470) +++ stable/9/contrib/binutils/bfd/elflink.c Mon Jan 1 20:39:12 2018 (r327471) @@ -4815,7 +4815,7 @@ _bfd_elf_archive_symbol_lookup (bfd *abfd, len = strlen (name); copy = bfd_alloc (abfd, len); if (copy == NULL) - return (struct elf_link_hash_entry *) 0 - 1; + return (struct elf_link_hash_entry *)(intptr_t)-1; first = p - name + 1; memcpy (copy, name, first); @@ -4927,7 +4927,7 @@ elf_link_add_archive_symbols (bfd *abfd, struct bfd_li } h = archive_symbol_lookup (abfd, info, symdef->name); - if (h == (struct elf_link_hash_entry *) 0 - 1) + if (h == (struct elf_link_hash_entry *)(intptr_t)-1) goto error_return; if (h == NULL) Modified: stable/9/contrib/binutils/include/obstack.h ============================================================================== --- stable/9/contrib/binutils/include/obstack.h Mon Jan 1 20:24:16 2018 (r327470) +++ stable/9/contrib/binutils/include/obstack.h Mon Jan 1 20:39:12 2018 (r327471) @@ -119,11 +119,11 @@ extern "C" { may ignore the byte-within-word field of the pointer. */ #ifndef __PTR_TO_INT -# define __PTR_TO_INT(P) ((P) - (char *) 0) +# define __PTR_TO_INT(P) ((intptr_t)(P)) #endif #ifndef __INT_TO_PTR -# define __INT_TO_PTR(P) ((P) + (char *) 0) +# define __INT_TO_PTR(P) ((void*)(intptr_t)(P)) #endif /* We need the type of the resulting object. If __PTRDIFF_TYPE__ is @@ -427,7 +427,7 @@ __extension__ \ __o1->maybe_empty_object = 1; \ __o1->next_free \ = __INT_TO_PTR ((__PTR_TO_INT (__o1->next_free)+__o1->alignment_mask)\ - & ~ (__o1->alignment_mask)); \ + & ~(intptr_t)(__o1->alignment_mask)); \ if (__o1->next_free - (char *)__o1->chunk \ > __o1->chunk_limit - (char *)__o1->chunk) \ __o1->next_free = __o1->chunk_limit; \ From owner-svn-src-all@freebsd.org Mon Jan 1 20:39:16 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 2E93CEBB969; Mon, 1 Jan 2018 20:39:16 +0000 (UTC) (envelope-from dim@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 AE3567C5FB; Mon, 1 Jan 2018 20:39:15 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w01KdDCb035821; Mon, 1 Jan 2018 20:39:13 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w01KdDE0035819; Mon, 1 Jan 2018 20:39:13 GMT (envelope-from dim@FreeBSD.org) Message-Id: <201801012039.w01KdDE0035819@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Mon, 1 Jan 2018 20:39:13 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r327471 - in stable: 10/contrib/binutils/bfd 10/contrib/binutils/include 11/contrib/binutils/bfd 11/contrib/binutils/include 9/contrib/binutils/bfd 9/contrib/binutils/include X-SVN-Group: stable-11 X-SVN-Commit-Author: dim X-SVN-Commit-Paths: in stable: 10/contrib/binutils/bfd 10/contrib/binutils/include 11/contrib/binutils/bfd 11/contrib/binutils/include 9/contrib/binutils/bfd 9/contrib/binutils/include X-SVN-Commit-Revision: 327471 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 01 Jan 2018 20:39:16 -0000 Author: dim Date: Mon Jan 1 20:39:12 2018 New Revision: 327471 URL: https://svnweb.freebsd.org/changeset/base/327471 Log: MFC r327164: Fix clang 6.0.0 compiler warnings in binutils Latest clang git has a warning -Wnull-pointer-arithmetic which will trigger a -Werror failure. Addition and subtraction from a null pointer is undefined behaviour and could be optimized into anything. Furthermore, using the difference between two pointers and casting the result back to a pointer is not portable since the size of ptrdiff_t does not necessary have to be the same as size of void* (this happens e.g. on CHERI). Using intptr_t instead fixes this portability issue and the compiler warning. Submitted by; Alexander Richardson Obtained from: CheriBSD Differential Revision: https://reviews.freebsd.org/D12928 Modified: stable/11/contrib/binutils/bfd/elflink.c stable/11/contrib/binutils/include/obstack.h Directory Properties: stable/11/ (props changed) Changes in other areas also in this revision: Modified: stable/10/contrib/binutils/bfd/elflink.c stable/10/contrib/binutils/include/obstack.h stable/9/contrib/binutils/bfd/elflink.c stable/9/contrib/binutils/include/obstack.h Directory Properties: stable/10/ (props changed) stable/9/ (props changed) stable/9/contrib/ (props changed) stable/9/contrib/binutils/ (props changed) Modified: stable/11/contrib/binutils/bfd/elflink.c ============================================================================== --- stable/11/contrib/binutils/bfd/elflink.c Mon Jan 1 20:24:16 2018 (r327470) +++ stable/11/contrib/binutils/bfd/elflink.c Mon Jan 1 20:39:12 2018 (r327471) @@ -4815,7 +4815,7 @@ _bfd_elf_archive_symbol_lookup (bfd *abfd, len = strlen (name); copy = bfd_alloc (abfd, len); if (copy == NULL) - return (struct elf_link_hash_entry *) 0 - 1; + return (struct elf_link_hash_entry *)(intptr_t)-1; first = p - name + 1; memcpy (copy, name, first); @@ -4927,7 +4927,7 @@ elf_link_add_archive_symbols (bfd *abfd, struct bfd_li } h = archive_symbol_lookup (abfd, info, symdef->name); - if (h == (struct elf_link_hash_entry *) 0 - 1) + if (h == (struct elf_link_hash_entry *)(intptr_t)-1) goto error_return; if (h == NULL) Modified: stable/11/contrib/binutils/include/obstack.h ============================================================================== --- stable/11/contrib/binutils/include/obstack.h Mon Jan 1 20:24:16 2018 (r327470) +++ stable/11/contrib/binutils/include/obstack.h Mon Jan 1 20:39:12 2018 (r327471) @@ -119,11 +119,11 @@ extern "C" { may ignore the byte-within-word field of the pointer. */ #ifndef __PTR_TO_INT -# define __PTR_TO_INT(P) ((P) - (char *) 0) +# define __PTR_TO_INT(P) ((intptr_t)(P)) #endif #ifndef __INT_TO_PTR -# define __INT_TO_PTR(P) ((P) + (char *) 0) +# define __INT_TO_PTR(P) ((void*)(intptr_t)(P)) #endif /* We need the type of the resulting object. If __PTRDIFF_TYPE__ is @@ -427,7 +427,7 @@ __extension__ \ __o1->maybe_empty_object = 1; \ __o1->next_free \ = __INT_TO_PTR ((__PTR_TO_INT (__o1->next_free)+__o1->alignment_mask)\ - & ~ (__o1->alignment_mask)); \ + & ~(intptr_t)(__o1->alignment_mask)); \ if (__o1->next_free - (char *)__o1->chunk \ > __o1->chunk_limit - (char *)__o1->chunk) \ __o1->next_free = __o1->chunk_limit; \ From owner-svn-src-all@freebsd.org Mon Jan 1 20:39:16 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id BCD70EBB975; Mon, 1 Jan 2018 20:39:16 +0000 (UTC) (envelope-from dim@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 4A5667C611; Mon, 1 Jan 2018 20:39:15 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w01KdD8X035828; Mon, 1 Jan 2018 20:39:13 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w01KdDuI035826; Mon, 1 Jan 2018 20:39:13 GMT (envelope-from dim@FreeBSD.org) Message-Id: <201801012039.w01KdDuI035826@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Mon, 1 Jan 2018 20:39:13 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r327471 - in stable: 10/contrib/binutils/bfd 10/contrib/binutils/include 11/contrib/binutils/bfd 11/contrib/binutils/include 9/contrib/binutils/bfd 9/contrib/binutils/include X-SVN-Group: stable-10 X-SVN-Commit-Author: dim X-SVN-Commit-Paths: in stable: 10/contrib/binutils/bfd 10/contrib/binutils/include 11/contrib/binutils/bfd 11/contrib/binutils/include 9/contrib/binutils/bfd 9/contrib/binutils/include X-SVN-Commit-Revision: 327471 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 01 Jan 2018 20:39:17 -0000 Author: dim Date: Mon Jan 1 20:39:12 2018 New Revision: 327471 URL: https://svnweb.freebsd.org/changeset/base/327471 Log: MFC r327164: Fix clang 6.0.0 compiler warnings in binutils Latest clang git has a warning -Wnull-pointer-arithmetic which will trigger a -Werror failure. Addition and subtraction from a null pointer is undefined behaviour and could be optimized into anything. Furthermore, using the difference between two pointers and casting the result back to a pointer is not portable since the size of ptrdiff_t does not necessary have to be the same as size of void* (this happens e.g. on CHERI). Using intptr_t instead fixes this portability issue and the compiler warning. Submitted by; Alexander Richardson Obtained from: CheriBSD Differential Revision: https://reviews.freebsd.org/D12928 Modified: stable/10/contrib/binutils/bfd/elflink.c stable/10/contrib/binutils/include/obstack.h Directory Properties: stable/10/ (props changed) Changes in other areas also in this revision: Modified: stable/11/contrib/binutils/bfd/elflink.c stable/11/contrib/binutils/include/obstack.h stable/9/contrib/binutils/bfd/elflink.c stable/9/contrib/binutils/include/obstack.h Directory Properties: stable/11/ (props changed) stable/9/ (props changed) stable/9/contrib/ (props changed) stable/9/contrib/binutils/ (props changed) Modified: stable/10/contrib/binutils/bfd/elflink.c ============================================================================== --- stable/10/contrib/binutils/bfd/elflink.c Mon Jan 1 20:24:16 2018 (r327470) +++ stable/10/contrib/binutils/bfd/elflink.c Mon Jan 1 20:39:12 2018 (r327471) @@ -4815,7 +4815,7 @@ _bfd_elf_archive_symbol_lookup (bfd *abfd, len = strlen (name); copy = bfd_alloc (abfd, len); if (copy == NULL) - return (struct elf_link_hash_entry *) 0 - 1; + return (struct elf_link_hash_entry *)(intptr_t)-1; first = p - name + 1; memcpy (copy, name, first); @@ -4927,7 +4927,7 @@ elf_link_add_archive_symbols (bfd *abfd, struct bfd_li } h = archive_symbol_lookup (abfd, info, symdef->name); - if (h == (struct elf_link_hash_entry *) 0 - 1) + if (h == (struct elf_link_hash_entry *)(intptr_t)-1) goto error_return; if (h == NULL) Modified: stable/10/contrib/binutils/include/obstack.h ============================================================================== --- stable/10/contrib/binutils/include/obstack.h Mon Jan 1 20:24:16 2018 (r327470) +++ stable/10/contrib/binutils/include/obstack.h Mon Jan 1 20:39:12 2018 (r327471) @@ -119,11 +119,11 @@ extern "C" { may ignore the byte-within-word field of the pointer. */ #ifndef __PTR_TO_INT -# define __PTR_TO_INT(P) ((P) - (char *) 0) +# define __PTR_TO_INT(P) ((intptr_t)(P)) #endif #ifndef __INT_TO_PTR -# define __INT_TO_PTR(P) ((P) + (char *) 0) +# define __INT_TO_PTR(P) ((void*)(intptr_t)(P)) #endif /* We need the type of the resulting object. If __PTRDIFF_TYPE__ is @@ -427,7 +427,7 @@ __extension__ \ __o1->maybe_empty_object = 1; \ __o1->next_free \ = __INT_TO_PTR ((__PTR_TO_INT (__o1->next_free)+__o1->alignment_mask)\ - & ~ (__o1->alignment_mask)); \ + & ~(intptr_t)(__o1->alignment_mask)); \ if (__o1->next_free - (char *)__o1->chunk \ > __o1->chunk_limit - (char *)__o1->chunk) \ __o1->next_free = __o1->chunk_limit; \ From owner-svn-src-all@freebsd.org Mon Jan 1 20:47:04 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 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-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" 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-all@freebsd.org Mon Jan 1 21:25:02 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 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-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" 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-all@freebsd.org Mon Jan 1 22:10:22 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 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-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" 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-all@freebsd.org Mon Jan 1 22:31:54 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 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-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" 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-all@freebsd.org Mon Jan 1 22:33:59 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 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-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" 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-all@freebsd.org Mon Jan 1 22:40:40 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 17CC4E87B64 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 EB29F1E7A 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-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" 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-all@freebsd.org Mon Jan 1 22:54:20 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 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-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" 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-all@freebsd.org Mon Jan 1 23:05:17 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id E35C2E89FE8 for ; Mon, 1 Jan 2018 23:05:17 +0000 (UTC) (envelope-from lists@eitanadler.com) Received: from mail-yb0-x22d.google.com (mail-yb0-x22d.google.com [IPv6:2607:f8b0:4002: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 985602F19 for ; Mon, 1 Jan 2018 23:05:17 +0000 (UTC) (envelope-from lists@eitanadler.com) Received: by mail-yb0-x22d.google.com with SMTP id 129so16758741ybe.5 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=a5J5xY9/VgGfBlWxQdMf+vFsToo8AUDiRmUJiDviUO++hhUNl67wC+9KRmpmA4TmCw mwJEcHhNfuP1KnXyb5blxeOLiExldyrI60jMUT2fLiEiGzM6GunM8kM05PpYzwUtkeFR S3wCxthyK8eFhpoTHlIO0IZfGCpxv1jD4OZnbkzruABkfwm6syxEi1FFC7t/chWtsP2h ef+nP/W66/TeDgDMbc8JIExYWPtjnXdD2fQZOBzHYmW3hZxOf3JwFg5wSCrzdzhxYjaN OYEl7Kl7RAQP6Fk+Fs6jHK8MNUmduSEvrgSnY6djcjhHNyfoDxpJgLXL1Fcdfi4W25Qv +V2Q== X-Gm-Message-State: AKGB3mKJaf/rTRJ1mofWg/e04Pobbt6l/2QPJTtNDdMDWJQnSjhDJcYZ EUSaY85g3UblV2TaHUVQaqEehP95Pq7W6qhIW0XZDw== 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-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" 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-all@freebsd.org Mon Jan 1 23:22:21 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 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-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" 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-all@freebsd.org Mon Jan 1 23:45:10 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 95D8FEA2B0D; Mon, 1 Jan 2018 23:45:10 +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 6A437633C6; Mon, 1 Jan 2018 23:45:10 +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 w01Nj9Jg016512; Mon, 1 Jan 2018 23:45:09 GMT (envelope-from mjg@FreeBSD.org) Received: (from mjg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w01Nj917016511; Mon, 1 Jan 2018 23:45:09 GMT (envelope-from mjg@FreeBSD.org) Message-Id: <201801012345.w01Nj917016511@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mjg set sender to mjg@FreeBSD.org using -f From: Mateusz Guzik Date: Mon, 1 Jan 2018 23:45:09 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r327477 - stable/11/sys/kern X-SVN-Group: stable-11 X-SVN-Commit-Author: mjg X-SVN-Commit-Paths: stable/11/sys/kern X-SVN-Commit-Revision: 327477 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 01 Jan 2018 23:45:10 -0000 Author: mjg Date: Mon Jan 1 23:45:09 2018 New Revision: 327477 URL: https://svnweb.freebsd.org/changeset/base/327477 Log: MFC r327394,r327395: 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. ============= mtx: deduplicate indefinite wait check in spinlocks and thread lock Modified: stable/11/sys/kern/kern_mutex.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/kern/kern_mutex.c ============================================================================== --- stable/11/sys/kern/kern_mutex.c Mon Jan 1 22:33:57 2018 (r327476) +++ stable/11/sys/kern/kern_mutex.c Mon Jan 1 23:45:09 2018 (r327477) @@ -168,6 +168,8 @@ LOCK_DELAY_SYSINIT_DEFAULT(mtx_spin_delay); struct mtx blocked_lock; struct mtx Giant; +static void _mtx_lock_indefinite_check(struct mtx *, struct lock_delay_arg *); + void assert_mtx(const struct lock_object *lock, int what) { @@ -672,25 +674,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. @@ -762,16 +745,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); @@ -897,6 +874,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) @@ -906,37 +887,29 @@ 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. */ 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; @@ -1225,6 +1198,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-all@freebsd.org Tue Jan 2 00:02:37 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 86674EA3C52; Tue, 2 Jan 2018 00:02:37 +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 4A74B6424E; Tue, 2 Jan 2018 00:02:37 +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 w0202aWi025159; Tue, 2 Jan 2018 00:02:36 GMT (envelope-from mjg@FreeBSD.org) Received: (from mjg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w0202agg025156; Tue, 2 Jan 2018 00:02:36 GMT (envelope-from mjg@FreeBSD.org) Message-Id: <201801020002.w0202agg025156@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mjg set sender to mjg@FreeBSD.org using -f From: Mateusz Guzik Date: Tue, 2 Jan 2018 00:02:36 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r327478 - in stable/11/sys: kern sys X-SVN-Group: stable-11 X-SVN-Commit-Author: mjg X-SVN-Commit-Paths: in stable/11/sys: kern sys X-SVN-Commit-Revision: 327478 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 02 Jan 2018 00:02:37 -0000 Author: mjg Date: Tue Jan 2 00:02:36 2018 New Revision: 327478 URL: https://svnweb.freebsd.org/changeset/base/327478 Log: MFC r324335,r327393,r327397,r327401,r327402: locks: take the number of readers into account when waiting Previous code would always spin once before checking the lock. But a lock with e.g. 6 readers is not going to become free in the duration of once spin even if they start draining immediately. Conservatively perform one for each reader. Note that the total number of allowed spins is still extremely small and is subject to change later. ============= rwlock: tidy up __rw_runlock_hard similarly to r325921 ============= 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. ============= 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. ============= sx: fix up non-smp compilation after r327397 ============= 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. ============= Return a non-NULL owner only if the lock is exclusively held in owner_sx(). Fix some whitespace bugs while here. Modified: stable/11/sys/kern/kern_rwlock.c stable/11/sys/kern/kern_sx.c stable/11/sys/sys/lock.h Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/kern/kern_rwlock.c ============================================================================== --- stable/11/sys/kern/kern_rwlock.c Mon Jan 1 23:45:09 2018 (r327477) +++ stable/11/sys/kern/kern_rwlock.c Tue Jan 2 00:02:36 2018 (r327478) @@ -420,7 +420,7 @@ __rw_rlock_hard(struct rwlock *rw, struct thread *td, struct thread *owner; #ifdef ADAPTIVE_RWLOCKS int spintries = 0; - int i; + int i, n; #endif #ifdef LOCK_PROFILING uint64_t waittime = 0; @@ -502,8 +502,9 @@ __rw_rlock_hard(struct rwlock *rw, struct thread *td, KTR_STATE1(KTR_SCHED, "thread", sched_tdname(curthread), "spinning", "lockname:\"%s\"", rw->lock_object.lo_name); - for (i = 0; i < rowner_loops; i++) { - cpu_spinwait(); + for (i = 0; i < rowner_loops; i += n) { + n = RW_READERS(v); + lock_delay_spin(n); v = RW_READ_VALUE(rw); if ((v & RW_LOCK_READ) == 0 || __rw_can_read(td, v, false)) break; @@ -513,7 +514,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 @@ -752,7 +753,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; @@ -792,14 +793,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", @@ -868,7 +869,8 @@ __rw_wlock_hard(volatile uintptr_t *c, uintptr_t v LOC struct thread *owner; #ifdef ADAPTIVE_RWLOCKS int spintries = 0; - int i; + int i, n; + int sleep_reason = 0; #endif uintptr_t x; #ifdef LOCK_PROFILING @@ -949,6 +951,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)) @@ -978,8 +981,9 @@ __rw_wlock_hard(volatile uintptr_t *c, uintptr_t v LOC KTR_STATE1(KTR_SCHED, "thread", sched_tdname(curthread), "spinning", "lockname:\"%s\"", rw->lock_object.lo_name); - for (i = 0; i < rowner_loops; i++) { - cpu_spinwait(); + for (i = 0; i < rowner_loops; i += n) { + n = RW_READERS(v); + lock_delay_spin(n); v = RW_READ_VALUE(rw); if ((v & RW_LOCK_WRITE_SPINNER) == 0) break; @@ -989,8 +993,9 @@ __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; } #endif ts = turnstile_trywait(&rw->lock_object); @@ -1011,6 +1016,9 @@ retry_ts: turnstile_cancel(ts); continue; } + } else if (RW_READERS(v) > 0 && sleep_reason == 1) { + turnstile_cancel(ts); + continue; } #endif /* Modified: stable/11/sys/kern/kern_sx.c ============================================================================== --- stable/11/sys/kern/kern_sx.c Mon Jan 1 23:45:09 2018 (r327477) +++ stable/11/sys/kern/kern_sx.c Tue Jan 2 00:02:36 2018 (r327478) @@ -89,7 +89,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)) { \ @@ -198,12 +198,14 @@ unlock_sx(struct lock_object *lock) int owner_sx(const struct lock_object *lock, struct thread **owner) { - const struct sx *sx = (const struct sx *)lock; - uintptr_t x = sx->sx_lock; + const struct sx *sx; + uintptr_t x; - *owner = (struct thread *)SX_OWNER(x); - return ((x & SX_LOCK_SHARED) != 0 ? (SX_SHARERS(x) != 0) : - (*owner != NULL)); + sx = (const struct sx *)lock; + x = sx->sx_lock; + *owner = NULL; + return ((x & SX_LOCK_SHARED) != 0 ? (SX_SHARERS(x) != 0) : + ((*owner = (struct thread *)SX_OWNER(x)) != NULL)); } #endif @@ -528,7 +530,9 @@ _sx_xlock_hard(struct sx *sx, uintptr_t x, int opts LO uintptr_t tid; #ifdef ADAPTIVE_SX volatile struct thread *owner; - u_int i, spintries = 0; + u_int i, n, spintries = 0; + bool adaptive; + int sleep_reason = 0; #endif #ifdef LOCK_PROFILING uint64_t waittime = 0; @@ -577,6 +581,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 @@ -593,6 +601,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) { @@ -600,66 +611,70 @@ _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++) { - if (LOCK_LOG_TEST(&sx->lock_object, 0)) - CTR4(KTR_LOCK, - "%s: shared spinning on %p with %u and %u", - __func__, sx, spintries, i); - cpu_spinwait(); + "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; } + sleep_reason = 1; + } 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; + sleep_reason = 2; } +sleepq: #endif - sleepq_lock(&sx->lock_object); x = SX_READ_VALUE(sx); retry_sleepq: @@ -681,10 +696,14 @@ 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) { - 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; } @@ -737,7 +756,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); @@ -887,6 +905,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; @@ -915,6 +934,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 @@ -931,6 +954,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 @@ -939,37 +965,40 @@ _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; } +sleepq: #endif /* @@ -994,8 +1023,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); @@ -1030,7 +1058,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); Modified: stable/11/sys/sys/lock.h ============================================================================== --- stable/11/sys/sys/lock.h Mon Jan 1 23:45:09 2018 (r327477) +++ stable/11/sys/sys/lock.h Tue Jan 2 00:02:36 2018 (r327478) @@ -230,6 +230,13 @@ lock_delay_arg_init(struct lock_delay_arg *la, struct la->spin_cnt = 0; } +#define lock_delay_spin(n) do { \ + u_int _i; \ + \ + for (_i = (n); _i > 0; _i--) \ + cpu_spinwait(); \ +} while (0) + #define LOCK_DELAY_SYSINIT(func) \ SYSINIT(func##_ld, SI_SUB_LOCK, SI_ORDER_ANY, func, NULL) From owner-svn-src-all@freebsd.org Tue Jan 2 00:07:30 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 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-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" 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-all@freebsd.org Tue Jan 2 00:11:58 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 285B1EA45C5; Tue, 2 Jan 2018 00:11: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 F348D649BA; Tue, 2 Jan 2018 00:11: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 w020BvAb026511; Tue, 2 Jan 2018 00:11:57 GMT (envelope-from mjg@FreeBSD.org) Received: (from mjg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w020Buhk026508; Tue, 2 Jan 2018 00:11:56 GMT (envelope-from mjg@FreeBSD.org) Message-Id: <201801020011.w020Buhk026508@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mjg set sender to mjg@FreeBSD.org using -f From: Mateusz Guzik Date: Tue, 2 Jan 2018 00:11:56 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r327480 - in stable/11/sys: cddl/dev/sdt kern sys X-SVN-Group: stable-11 X-SVN-Commit-Author: mjg X-SVN-Commit-Paths: in stable/11/sys: cddl/dev/sdt kern sys X-SVN-Commit-Revision: 327480 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 02 Jan 2018 00:11:58 -0000 Author: mjg Date: Tue Jan 2 00:11:56 2018 New Revision: 327480 URL: https://svnweb.freebsd.org/changeset/base/327480 Log: MFC r324867,r324869: sdt: whack unused SDT_PROBE_ENABLED ============= sdt: make all sdt probe sites test one variable This saves on cache misses at the expense of a slight grow of .text. Note this is a bandaid for lack of hotpatching. Modified: stable/11/sys/cddl/dev/sdt/sdt.c stable/11/sys/kern/kern_sdt.c stable/11/sys/sys/sdt.h Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/cddl/dev/sdt/sdt.c ============================================================================== --- stable/11/sys/cddl/dev/sdt/sdt.c Tue Jan 2 00:07:28 2018 (r327479) +++ stable/11/sys/cddl/dev/sdt/sdt.c Tue Jan 2 00:11:56 2018 (r327480) @@ -76,6 +76,8 @@ static void sdt_kld_unload_try(void *, struct linker_f static MALLOC_DEFINE(M_SDT, "SDT", "DTrace SDT providers"); +static int sdt_probes_enabled_count; + static dtrace_pattr_t sdt_attr = { { DTRACE_STABILITY_EVOLVING, DTRACE_STABILITY_EVOLVING, DTRACE_CLASS_COMMON }, { DTRACE_STABILITY_PRIVATE, DTRACE_STABILITY_PRIVATE, DTRACE_CLASS_UNKNOWN }, @@ -208,6 +210,9 @@ sdt_enable(void *arg __unused, dtrace_id_t id, void *p probe->sdtp_lf->nenabled++; if (strcmp(probe->prov->name, "lockstat") == 0) lockstat_enabled++; + sdt_probes_enabled_count++; + if (sdt_probes_enabled_count == 1) + sdt_probes_enabled = true; } static void @@ -217,6 +222,9 @@ sdt_disable(void *arg __unused, dtrace_id_t id, void * KASSERT(probe->sdtp_lf->nenabled > 0, ("no probes enabled")); + sdt_probes_enabled_count--; + if (sdt_probes_enabled_count == 0) + sdt_probes_enabled = false; if (strcmp(probe->prov->name, "lockstat") == 0) lockstat_enabled--; probe->id = 0; Modified: stable/11/sys/kern/kern_sdt.c ============================================================================== --- stable/11/sys/kern/kern_sdt.c Tue Jan 2 00:07:28 2018 (r327479) +++ stable/11/sys/kern/kern_sdt.c Tue Jan 2 00:11:56 2018 (r327480) @@ -37,6 +37,7 @@ SDT_PROVIDER_DEFINE(sdt); * dtrace_probe() when it loads. */ sdt_probe_func_t sdt_probe_func = sdt_probe_stub; +volatile bool __read_frequently sdt_probes_enabled; /* * This is a stub for probe calls in case kernel DTrace support isn't Modified: stable/11/sys/sys/sdt.h ============================================================================== --- stable/11/sys/sys/sdt.h Tue Jan 2 00:07:28 2018 (r327479) +++ stable/11/sys/sys/sdt.h Tue Jan 2 00:11:56 2018 (r327480) @@ -80,13 +80,14 @@ #include #include +extern volatile bool sdt_probes_enabled; + #ifndef KDTRACE_HOOKS #define SDT_PROVIDER_DEFINE(prov) #define SDT_PROVIDER_DECLARE(prov) #define SDT_PROBE_DEFINE(prov, mod, func, name) #define SDT_PROBE_DECLARE(prov, mod, func, name) -#define SDT_PROBE_ENABLED(prov, mod, func, name) 0 #define SDT_PROBE(prov, mod, func, name, arg0, arg1, arg2, arg3, arg4) #define SDT_PROBE_ARGTYPE(prov, mod, func, name, num, type, xtype) @@ -161,14 +162,13 @@ SET_DECLARE(sdt_argtypes_set, struct sdt_argtype); #define SDT_PROBE_DECLARE(prov, mod, func, name) \ extern struct sdt_probe sdt_##prov##_##mod##_##func##_##name[1] -#define SDT_PROBE_ENABLED(prov, mod, func, name) \ - __predict_false((sdt_##prov##_##mod##_##func##_##name->id)) - #define SDT_PROBE(prov, mod, func, name, arg0, arg1, arg2, arg3, arg4) do { \ - if (__predict_false(sdt_##prov##_##mod##_##func##_##name->id)) \ + if (__predict_false(sdt_probes_enabled)) { \ + if (__predict_false(sdt_##prov##_##mod##_##func##_##name->id)) \ (*sdt_probe_func)(sdt_##prov##_##mod##_##func##_##name->id, \ (uintptr_t) arg0, (uintptr_t) arg1, (uintptr_t) arg2, \ (uintptr_t) arg3, (uintptr_t) arg4); \ + } \ } while (0) #define SDT_PROBE_ARGTYPE(prov, mod, func, name, num, type, xtype) \ From owner-svn-src-all@freebsd.org Tue Jan 2 00:14:47 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 9FD31EA473B; Tue, 2 Jan 2018 00:14:47 +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 6A35D64B93; Tue, 2 Jan 2018 00:14:47 +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 w020EkUX029917; Tue, 2 Jan 2018 00:14:46 GMT (envelope-from mjg@FreeBSD.org) Received: (from mjg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w020EkU3029916; Tue, 2 Jan 2018 00:14:46 GMT (envelope-from mjg@FreeBSD.org) Message-Id: <201801020014.w020EkU3029916@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mjg set sender to mjg@FreeBSD.org using -f From: Mateusz Guzik Date: Tue, 2 Jan 2018 00:14:46 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r327481 - stable/11/sys/kern X-SVN-Group: stable-11 X-SVN-Commit-Author: mjg X-SVN-Commit-Paths: stable/11/sys/kern X-SVN-Commit-Revision: 327481 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 02 Jan 2018 00:14:47 -0000 Author: mjg Date: Tue Jan 2 00:14:46 2018 New Revision: 327481 URL: https://svnweb.freebsd.org/changeset/base/327481 Log: MFC r325924: sched: move panic handling code out of choosethread This avoids jumps in the common case of the kernel not being panicked. Modified: stable/11/sys/kern/kern_switch.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/kern/kern_switch.c ============================================================================== --- stable/11/sys/kern/kern_switch.c Tue Jan 2 00:11:56 2018 (r327480) +++ stable/11/sys/kern/kern_switch.c Tue Jan 2 00:14:46 2018 (r327481) @@ -150,24 +150,37 @@ SYSCTL_PROC(_kern_sched_stats, OID_AUTO, reset, CTLTYP /* * Select the thread that will be run next. */ -struct thread * -choosethread(void) + +static __noinline struct thread * +choosethread_panic(struct thread *td) { - struct thread *td; -retry: - td = sched_choose(); - /* * If we are in panic, only allow system threads, * plus the one we are running in, to be run. */ - if (panicstr && ((td->td_proc->p_flag & P_SYSTEM) == 0 && +retry: + if (((td->td_proc->p_flag & P_SYSTEM) == 0 && (td->td_flags & TDF_INPANIC) == 0)) { /* note that it is no longer on the run queue */ TD_SET_CAN_RUN(td); + td = sched_choose(); goto retry; } + + TD_SET_RUNNING(td); + return (td); +} + +struct thread * +choosethread(void) +{ + struct thread *td; + + td = sched_choose(); + + if (__predict_false(panicstr != NULL)) + return (choosethread_panic(td)); TD_SET_RUNNING(td); return (td); From owner-svn-src-all@freebsd.org Tue Jan 2 00:48:20 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 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-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" 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-all@freebsd.org Tue Jan 2 01:48:12 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 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-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" 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-all@freebsd.org Tue Jan 2 03:56:43 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 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-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" 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-all@freebsd.org Tue Jan 2 03:59:48 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 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-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" 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-all@freebsd.org Tue Jan 2 04:35:58 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 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-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" 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-all@freebsd.org Tue Jan 2 05:22:55 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 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-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" 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-all@freebsd.org Tue Jan 2 05:27:26 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 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-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" 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-all@freebsd.org Tue Jan 2 09:02:43 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 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-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" 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-all@freebsd.org Tue Jan 2 09:03:54 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id A900AEBC4D2 for ; Tue, 2 Jan 2018 09:03:54 +0000 (UTC) (envelope-from lists@eitanadler.com) Received: from mail-yb0-x22c.google.com (mail-yb0-x22c.google.com [IPv6:2607:f8b0:4002: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 5B464768D9 for ; Tue, 2 Jan 2018 09:03:54 +0000 (UTC) (envelope-from lists@eitanadler.com) Received: by mail-yb0-x22c.google.com with SMTP id h189so6757650ybc.11 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=BMa9LeRzPkInAUShj3uuwv1gteu8PrL9c7tF8lT3cT5g5RjvnbgjCgWojvG7C5UxCI 2B8MfTEGD3S/geC2VH9K8+R/9daUteE5extWo7dRNWsdCh3JeKoYihS92aHTkWWvoSya u5D/bNZxVXwaF7W9H/MjKcZMVd7+Moe0TcMFNaJ92Ha8U25G9Ue59mbswFoK996dS19p VQsQ+uGMIpCuiATrhp5Mk4QiRGldEpn0MvIO9PZuJZZry1N90UPI7BfFnHAQIL7Kkwxj Dzjf0FF6H/IkUkIGJ2RUIl6iGqy43Pq5+0G4hNSwD+8DvJlsanaUE7wSoyXCSKpoZ5DK oKuQ== X-Gm-Message-State: AKGB3mIFeySWXy2Onrd3/X0+CAnbMAaEwCAR3tYyc+VoUrcpR0L3E7jm nhXE+shWLNR7bIC+giqrXN52oq+PuUSez9FqWrle1w== 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-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" 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-all@freebsd.org Tue Jan 2 14:07:56 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 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-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" 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-all@freebsd.org Tue Jan 2 14:54:55 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 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-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" 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-all@freebsd.org Tue Jan 2 15:29:09 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 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-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" 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-all@freebsd.org Tue Jan 2 16:14:37 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id E6CFDEAD026; Tue, 2 Jan 2018 16:14:37 +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 AE15267183; Tue, 2 Jan 2018 16:14:37 +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 w02GEagD038158; Tue, 2 Jan 2018 16:14:36 GMT (envelope-from markj@FreeBSD.org) Received: (from markj@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w02GEalR038157; Tue, 2 Jan 2018 16:14:36 GMT (envelope-from markj@FreeBSD.org) Message-Id: <201801021614.w02GEalR038157@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 16:14:36 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r327491 - stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs X-SVN-Group: stable-11 X-SVN-Commit-Author: markj X-SVN-Commit-Paths: stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs X-SVN-Commit-Revision: 327491 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 02 Jan 2018 16:14:38 -0000 Author: markj Date: Tue Jan 2 16:14:36 2018 New Revision: 327491 URL: https://svnweb.freebsd.org/changeset/base/327491 Log: MFC r326919: Unregister the ARC lowmem event handler earlier in arc_fini(). Modified: stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/arc.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/arc.c ============================================================================== --- stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/arc.c Tue Jan 2 14:54:54 2018 (r327490) +++ stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/arc.c Tue Jan 2 16:14:36 2018 (r327491) @@ -6619,6 +6619,11 @@ arc_init(void) void arc_fini(void) { +#ifdef _KERNEL + if (arc_event_lowmem != NULL) + EVENTHANDLER_DEREGISTER(vm_lowmem, arc_event_lowmem); +#endif + mutex_enter(&arc_reclaim_lock); arc_reclaim_thread_exit = B_TRUE; /* @@ -6664,11 +6669,6 @@ arc_fini(void) buf_fini(); ASSERT0(arc_loaned_bytes); - -#ifdef _KERNEL - if (arc_event_lowmem != NULL) - EVENTHANDLER_DEREGISTER(vm_lowmem, arc_event_lowmem); -#endif } /* From owner-svn-src-all@freebsd.org Tue Jan 2 16:15:25 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id F1E7CEAD0CB; Tue, 2 Jan 2018 16:15:25 +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 BAE9567303; Tue, 2 Jan 2018 16:15:25 +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 w02GFOvx038252; Tue, 2 Jan 2018 16:15:24 GMT (envelope-from markj@FreeBSD.org) Received: (from markj@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w02GFOmK038250; Tue, 2 Jan 2018 16:15:24 GMT (envelope-from markj@FreeBSD.org) Message-Id: <201801021615.w02GFOmK038250@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 16:15:24 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r327492 - in stable/11/sys/cddl/dev/dtrace: amd64 i386 X-SVN-Group: stable-11 X-SVN-Commit-Author: markj X-SVN-Commit-Paths: in stable/11/sys/cddl/dev/dtrace: amd64 i386 X-SVN-Commit-Revision: 327492 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 02 Jan 2018 16:15:26 -0000 Author: markj Date: Tue Jan 2 16:15:24 2018 New Revision: 327492 URL: https://svnweb.freebsd.org/changeset/base/327492 Log: MFC r326935: Avoid CPU migration in dtrace_gethrtime() on x86. Modified: stable/11/sys/cddl/dev/dtrace/amd64/dtrace_subr.c stable/11/sys/cddl/dev/dtrace/i386/dtrace_subr.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/cddl/dev/dtrace/amd64/dtrace_subr.c ============================================================================== --- stable/11/sys/cddl/dev/dtrace/amd64/dtrace_subr.c Tue Jan 2 16:14:36 2018 (r327491) +++ stable/11/sys/cddl/dev/dtrace/amd64/dtrace_subr.c Tue Jan 2 16:15:24 2018 (r327492) @@ -353,11 +353,11 @@ SYSINIT(dtrace_gethrtime_init, SI_SUB_SMP, SI_ORDER_AN * Returns nanoseconds since boot. */ uint64_t -dtrace_gethrtime() +dtrace_gethrtime(void) { uint64_t tsc; - uint32_t lo; - uint32_t hi; + uint32_t lo, hi; + register_t rflags; /* * We split TSC value into lower and higher 32-bit halves and separately @@ -365,7 +365,10 @@ dtrace_gethrtime() * (see nsec_scale calculations) taking into account 32-bit shift of * the higher half and finally add. */ + rflags = intr_disable(); tsc = rdtsc() - tsc_skew[curcpu]; + intr_restore(rflags); + lo = tsc; hi = tsc >> 32; return (((lo * nsec_scale) >> SCALE_SHIFT) + Modified: stable/11/sys/cddl/dev/dtrace/i386/dtrace_subr.c ============================================================================== --- stable/11/sys/cddl/dev/dtrace/i386/dtrace_subr.c Tue Jan 2 16:14:36 2018 (r327491) +++ stable/11/sys/cddl/dev/dtrace/i386/dtrace_subr.c Tue Jan 2 16:15:24 2018 (r327492) @@ -355,11 +355,11 @@ SYSINIT(dtrace_gethrtime_init, SI_SUB_SMP, SI_ORDER_AN * Returns nanoseconds since boot. */ uint64_t -dtrace_gethrtime() +dtrace_gethrtime(void) { uint64_t tsc; - uint32_t lo; - uint32_t hi; + uint32_t lo, hi; + register_t eflags; /* * We split TSC value into lower and higher 32-bit halves and separately @@ -367,7 +367,10 @@ dtrace_gethrtime() * (see nsec_scale calculations) taking into account 32-bit shift of * the higher half and finally add. */ + eflags = intr_disable(); tsc = rdtsc() - tsc_skew[curcpu]; + intr_restore(eflags); + lo = tsc; hi = tsc >> 32; return (((lo * nsec_scale) >> SCALE_SHIFT) + From owner-svn-src-all@freebsd.org Tue Jan 2 16:19:43 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 43C31EAD3C8; Tue, 2 Jan 2018 16:19:43 +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 EE6D867705; Tue, 2 Jan 2018 16:19:42 +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 w02GJglE038703; Tue, 2 Jan 2018 16:19:42 GMT (envelope-from markj@FreeBSD.org) Received: (from markj@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w02GJfBM038701; Tue, 2 Jan 2018 16:19:41 GMT (envelope-from markj@FreeBSD.org) Message-Id: <201801021619.w02GJfBM038701@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 16:19:41 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r327493 - stable/11/sys/geom/mirror X-SVN-Group: stable-11 X-SVN-Commit-Author: markj X-SVN-Commit-Paths: stable/11/sys/geom/mirror X-SVN-Commit-Revision: 327493 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 02 Jan 2018 16:19:43 -0000 Author: markj Date: Tue Jan 2 16:19:41 2018 New Revision: 327493 URL: https://svnweb.freebsd.org/changeset/base/327493 Log: MFC r326983: Avoid using bioq_* in gmirror. Modified: stable/11/sys/geom/mirror/g_mirror.c stable/11/sys/geom/mirror/g_mirror.h Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/geom/mirror/g_mirror.c ============================================================================== --- stable/11/sys/geom/mirror/g_mirror.c Tue Jan 2 16:15:24 2018 (r327492) +++ stable/11/sys/geom/mirror/g_mirror.c Tue Jan 2 16:19:41 2018 (r327493) @@ -305,7 +305,7 @@ g_mirror_nrequests(struct g_mirror_softc *sc, struct g u_int nreqs = 0; mtx_lock(&sc->sc_queue_mtx); - TAILQ_FOREACH(bp, &sc->sc_queue.queue, bio_queue) { + TAILQ_FOREACH(bp, &sc->sc_queue, bio_queue) { if (bp->bio_from == cp) nreqs++; } @@ -918,7 +918,7 @@ g_mirror_done(struct bio *bp) sc = bp->bio_from->geom->softc; bp->bio_cflags = G_MIRROR_BIO_FLAG_REGULAR; mtx_lock(&sc->sc_queue_mtx); - bioq_insert_tail(&sc->sc_queue, bp); + TAILQ_INSERT_TAIL(&sc->sc_queue, bp, bio_queue); mtx_unlock(&sc->sc_queue_mtx); wakeup(sc); } @@ -963,7 +963,7 @@ g_mirror_regular_request(struct bio *bp) pbp->bio_completed = pbp->bio_length; if (pbp->bio_cmd == BIO_WRITE || pbp->bio_cmd == BIO_DELETE) { - bioq_remove(&sc->sc_inflight, pbp); + TAILQ_REMOVE(&sc->sc_inflight, pbp, bio_queue); /* Release delayed sync requests if possible. */ g_mirror_sync_release(sc); } @@ -1018,7 +1018,7 @@ g_mirror_regular_request(struct bio *bp) else { pbp->bio_error = 0; mtx_lock(&sc->sc_queue_mtx); - bioq_insert_tail(&sc->sc_queue, pbp); + TAILQ_INSERT_TAIL(&sc->sc_queue, pbp, bio_queue); mtx_unlock(&sc->sc_queue_mtx); G_MIRROR_DEBUG(4, "%s: Waking up %p.", __func__, sc); wakeup(sc); @@ -1038,7 +1038,7 @@ g_mirror_regular_request(struct bio *bp) pbp->bio_error = 0; pbp->bio_completed = pbp->bio_length; } - bioq_remove(&sc->sc_inflight, pbp); + 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); @@ -1058,7 +1058,7 @@ g_mirror_sync_done(struct bio *bp) sc = bp->bio_from->geom->softc; bp->bio_cflags = G_MIRROR_BIO_FLAG_SYNC; mtx_lock(&sc->sc_queue_mtx); - bioq_insert_tail(&sc->sc_queue, bp); + TAILQ_INSERT_TAIL(&sc->sc_queue, bp, bio_queue); mtx_unlock(&sc->sc_queue_mtx); wakeup(sc); } @@ -1115,30 +1115,33 @@ g_mirror_kernel_dump(struct bio *bp) static void g_mirror_flush(struct g_mirror_softc *sc, struct bio *bp) { - struct bio_queue_head queue; + struct bio_queue queue; struct g_mirror_disk *disk; struct g_consumer *cp; struct bio *cbp; - bioq_init(&queue); + 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 = bioq_takefirst(&queue)) != 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; } - bioq_insert_tail(&queue, cbp); + 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 = bioq_takefirst(&queue)) != NULL) { + 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; @@ -1192,7 +1195,7 @@ g_mirror_start(struct bio *bp) g_io_deliver(bp, bp->bio_to->error); return; } - bioq_insert_tail(&sc->sc_queue, bp); + TAILQ_INSERT_TAIL(&sc->sc_queue, bp, bio_queue); mtx_unlock(&sc->sc_queue_mtx); G_MIRROR_DEBUG(4, "%s: Waking up %p.", __func__, sc); wakeup(sc); @@ -1244,7 +1247,7 @@ g_mirror_regular_collision(struct g_mirror_softc *sc, return (false); sstart = sbp->bio_offset; send = sbp->bio_offset + sbp->bio_length; - TAILQ_FOREACH(bp, &sc->sc_inflight.queue, bio_queue) { + TAILQ_FOREACH(bp, &sc->sc_inflight, bio_queue) { rstart = bp->bio_offset; rend = bp->bio_offset + bp->bio_length; if (rend > sstart && rstart < send) @@ -1261,7 +1264,7 @@ g_mirror_regular_delay(struct g_mirror_softc *sc, stru { G_MIRROR_LOGREQ(2, bp, "Delaying request."); - bioq_insert_head(&sc->sc_regular_delayed, bp); + TAILQ_INSERT_HEAD(&sc->sc_regular_delayed, bp, bio_queue); } /* @@ -1272,7 +1275,7 @@ g_mirror_sync_delay(struct g_mirror_softc *sc, struct { G_MIRROR_LOGREQ(2, bp, "Delaying synchronization request."); - bioq_insert_tail(&sc->sc_sync_delayed, bp); + TAILQ_INSERT_TAIL(&sc->sc_sync_delayed, bp, bio_queue); } /* @@ -1284,13 +1287,13 @@ g_mirror_regular_release(struct g_mirror_softc *sc) { struct bio *bp, *bp2; - TAILQ_FOREACH_SAFE(bp, &sc->sc_regular_delayed.queue, bio_queue, bp2) { + TAILQ_FOREACH_SAFE(bp, &sc->sc_regular_delayed, bio_queue, bp2) { if (g_mirror_sync_collision(sc, bp)) continue; - bioq_remove(&sc->sc_regular_delayed, bp); + 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); - bioq_insert_head(&sc->sc_queue, bp); + TAILQ_INSERT_HEAD(&sc->sc_queue, bp, bio_queue); mtx_unlock(&sc->sc_queue_mtx); } } @@ -1304,10 +1307,10 @@ g_mirror_sync_release(struct g_mirror_softc *sc) { struct bio *bp, *bp2; - TAILQ_FOREACH_SAFE(bp, &sc->sc_sync_delayed.queue, bio_queue, bp2) { + TAILQ_FOREACH_SAFE(bp, &sc->sc_sync_delayed, bio_queue, bp2) { if (g_mirror_regular_collision(sc, bp)) continue; - bioq_remove(&sc->sc_sync_delayed, bp); + TAILQ_REMOVE(&sc->sc_sync_delayed, bp, bio_queue); G_MIRROR_LOGREQ(2, bp, "Releasing delayed synchronization request."); g_io_request(bp, bp->bio_from); @@ -1613,7 +1616,7 @@ g_mirror_request_load(struct g_mirror_softc *sc, struc static void g_mirror_request_split(struct g_mirror_softc *sc, struct bio *bp) { - struct bio_queue_head queue; + struct bio_queue queue; struct g_mirror_disk *disk; struct g_consumer *cp; struct bio *cbp; @@ -1637,20 +1640,22 @@ g_mirror_request_split(struct g_mirror_softc *sc, stru left = bp->bio_length; offset = bp->bio_offset; data = bp->bio_data; - bioq_init(&queue); + 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 = bioq_takefirst(&queue)) != 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; } - bioq_insert_tail(&queue, cbp); + TAILQ_INSERT_TAIL(&queue, cbp, bio_queue); cbp->bio_done = g_mirror_done; cbp->bio_caller1 = disk; cbp->bio_to = disk->d_consumer->provider; @@ -1663,7 +1668,8 @@ g_mirror_request_split(struct g_mirror_softc *sc, stru offset += cbp->bio_length; data += cbp->bio_length; } - while ((cbp = bioq_takefirst(&queue)) != NULL) { + 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; @@ -1702,9 +1708,9 @@ g_mirror_register_request(struct bio *bp) case BIO_WRITE: case BIO_DELETE: { + struct bio_queue queue; struct g_mirror_disk *disk; struct g_mirror_disk_sync *sync; - struct bio_queue_head queue; struct g_consumer *cp; struct bio *cbp; @@ -1734,7 +1740,7 @@ g_mirror_register_request(struct bio *bp) * Allocate all bios before sending any request, so we can * return ENOMEM in nice and clean way. */ - bioq_init(&queue); + TAILQ_INIT(&queue); LIST_FOREACH(disk, &sc->sc_disks, d_next) { sync = &disk->d_sync; switch (disk->d_state) { @@ -1752,14 +1758,16 @@ g_mirror_register_request(struct bio *bp) continue; cbp = g_clone_bio(bp); if (cbp == NULL) { - while ((cbp = bioq_takefirst(&queue)) != 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; } - bioq_insert_tail(&queue, cbp); + TAILQ_INSERT_TAIL(&queue, cbp, bio_queue); cbp->bio_done = g_mirror_done; cp = disk->d_consumer; cbp->bio_caller1 = cp; @@ -1768,12 +1776,13 @@ g_mirror_register_request(struct bio *bp) ("Consumer %s not opened (r%dw%de%d).", cp->provider->name, cp->acr, cp->acw, cp->ace)); } - if (bioq_first(&queue) == NULL) { + if (TAILQ_EMPTY(&queue)) { g_io_deliver(bp, EOPNOTSUPP); return; } - while ((cbp = bioq_takefirst(&queue)) != NULL) { + while ((cbp = TAILQ_FIRST(&queue)) != NULL) { G_MIRROR_LOGREQ(3, cbp, "Sending request."); + TAILQ_REMOVE(&queue, cbp, bio_queue); cp = cbp->bio_caller1; cbp->bio_caller1 = NULL; cp->index++; @@ -1784,7 +1793,7 @@ g_mirror_register_request(struct bio *bp) * Put request onto inflight queue, so we can check if new * synchronization requests don't collide with it. */ - bioq_insert_tail(&sc->sc_inflight, bp); + TAILQ_INSERT_TAIL(&sc->sc_inflight, bp, bio_queue); return; } default: @@ -1927,8 +1936,10 @@ g_mirror_worker(void *arg) */ /* Get first request from the queue. */ mtx_lock(&sc->sc_queue_mtx); - bp = bioq_takefirst(&sc->sc_queue); - if (bp == NULL) { + bp = TAILQ_FIRST(&sc->sc_queue); + if (bp != NULL) + TAILQ_REMOVE(&sc->sc_queue, bp, bio_queue); + else { if ((sc->sc_flags & G_MIRROR_DEVICE_FLAG_DESTROY) != 0) { mtx_unlock(&sc->sc_queue_mtx); @@ -1938,7 +1949,7 @@ g_mirror_worker(void *arg) kproc_exit(0); } mtx_lock(&sc->sc_queue_mtx); - if (bioq_first(&sc->sc_queue) != NULL) { + if (!TAILQ_EMPTY(&sc->sc_queue)) { mtx_unlock(&sc->sc_queue_mtx); continue; } @@ -2188,7 +2199,8 @@ g_mirror_destroy_provider(struct g_mirror_softc *sc) g_topology_lock(); g_error_provider(sc->sc_provider, ENXIO); mtx_lock(&sc->sc_queue_mtx); - while ((bp = bioq_takefirst(&sc->sc_queue)) != NULL) { + while ((bp = TAILQ_FIRST(&sc->sc_queue)) != NULL) { + TAILQ_REMOVE(&sc->sc_queue, bp, bio_queue); /* * Abort any pending I/O that wasn't generated by us. * Synchronization requests and requests destined for individual @@ -3007,11 +3019,11 @@ g_mirror_create(struct g_class *mp, const struct g_mir sc->sc_writes = 0; sc->sc_refcnt = 1; sx_init(&sc->sc_lock, "gmirror:lock"); - bioq_init(&sc->sc_queue); + TAILQ_INIT(&sc->sc_queue); mtx_init(&sc->sc_queue_mtx, "gmirror:queue", NULL, MTX_DEF); - bioq_init(&sc->sc_regular_delayed); - bioq_init(&sc->sc_inflight); - bioq_init(&sc->sc_sync_delayed); + TAILQ_INIT(&sc->sc_regular_delayed); + TAILQ_INIT(&sc->sc_inflight); + TAILQ_INIT(&sc->sc_sync_delayed); LIST_INIT(&sc->sc_disks); TAILQ_INIT(&sc->sc_events); mtx_init(&sc->sc_events_mtx, "gmirror:events", NULL, MTX_DEF); Modified: stable/11/sys/geom/mirror/g_mirror.h ============================================================================== --- stable/11/sys/geom/mirror/g_mirror.h Tue Jan 2 16:15:24 2018 (r327492) +++ stable/11/sys/geom/mirror/g_mirror.h Tue Jan 2 16:19:41 2018 (r327493) @@ -191,17 +191,14 @@ struct g_mirror_softc { uint32_t sc_id; /* Mirror unique ID. */ struct sx sc_lock; - struct bio_queue_head sc_queue; + struct bio_queue sc_queue; struct mtx sc_queue_mtx; struct proc *sc_worker; - struct bio_queue_head sc_regular_delayed; /* Delayed I/O requests due - collision with sync - requests. */ - struct bio_queue_head sc_inflight; /* In-flight regular write - requests. */ - struct bio_queue_head sc_sync_delayed; /* Delayed sync requests due - collision with regular - requests. */ + struct bio_queue sc_inflight; /* In-flight regular write requests. */ + struct bio_queue sc_regular_delayed; /* Delayed I/O requests due to + collision with sync requests. */ + struct bio_queue sc_sync_delayed; /* Delayed sync requests due to + collision with regular requests. */ LIST_HEAD(, g_mirror_disk) sc_disks; u_int sc_ndisks; /* Number of disks. */ From owner-svn-src-all@freebsd.org Tue Jan 2 16:50:59 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 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-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" 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-all@freebsd.org Tue Jan 2 17:25:14 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 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-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" 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-all@freebsd.org Tue Jan 2 17:28:36 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 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-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" 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-all@freebsd.org Tue Jan 2 18:11:55 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 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-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" 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-all@freebsd.org Tue Jan 2 18:14:49 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 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-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" 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-all@freebsd.org Tue Jan 2 18:29:46 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 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-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" 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-all@freebsd.org Tue Jan 2 18:31:34 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 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-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" 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-all@freebsd.org Tue Jan 2 19:17:57 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 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-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" 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-all@freebsd.org Tue Jan 2 19:17:58 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 184D9EB461C; Tue, 2 Jan 2018 19:17:58 +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 E7EAD6E325; Tue, 2 Jan 2018 19:17:57 +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 E1C4C10AFC8; Tue, 2 Jan 2018 14:17:56 -0500 (EST) From: John Baldwin To: Mateusz Guzik Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: Re: svn commit: r327414 - stable/11 Date: Tue, 02 Jan 2018 09:48:27 -0800 Message-ID: <13482268.SAk0YaOX8x@ralph.baldwin.cx> User-Agent: KMail/4.14.10 (FreeBSD/11.1-STABLE; KDE/4.14.30; amd64; ; ) In-Reply-To: <201712310514.vBV5EeXT041948@repo.freebsd.org> References: <201712310514.vBV5EeXT041948@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:57 -0500 (EST) X-Virus-Scanned: clamav-milter 0.99.2 at mail.baldwin.cx X-Virus-Status: Clean X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 02 Jan 2018 19:17:58 -0000 On Sunday, December 31, 2017 05:14:40 AM Mateusz Guzik wrote: > Author: mjg > Date: Sun Dec 31 05:14:40 2017 > New Revision: 327414 > URL: https://svnweb.freebsd.org/changeset/base/327414 > > Log: > MFC r324328: > > amd64: remove unused variable from pmap_delayed_invl_genp > > Modified: > Directory Properties: > stable/11/ (props changed) Was this already MFC'd and this commit only updated mergeinfo on purpose? -- John Baldwin From owner-svn-src-all@freebsd.org Tue Jan 2 19:29:32 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 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-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" 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-all@freebsd.org Tue Jan 2 19:34:24 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 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-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" 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-all@freebsd.org Tue Jan 2 19:49:45 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 0A93EEB5B48; Tue, 2 Jan 2018 19:49:45 +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 D5F916FA70; Tue, 2 Jan 2018 19:49:44 +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 w02JnZeF092779; Tue, 2 Jan 2018 11:49:35 -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 w02JnZO2092778; Tue, 2 Jan 2018 11:49:35 -0800 (PST) (envelope-from freebsd) From: "Rodney W. Grimes" Message-Id: <201801021949.w02JnZO2092778@pdx.rh.CN85.dnsmgr.net> Subject: Re: svn commit: r327414 - stable/11 In-Reply-To: <13482268.SAk0YaOX8x@ralph.baldwin.cx> To: John Baldwin Date: Tue, 2 Jan 2018 11:49:35 -0800 (PST) CC: Mateusz Guzik , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@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-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 02 Jan 2018 19:49:45 -0000 > On Sunday, December 31, 2017 05:14:40 AM Mateusz Guzik wrote: > > Author: mjg > > Date: Sun Dec 31 05:14:40 2017 > > New Revision: 327414 > > URL: https://svnweb.freebsd.org/changeset/base/327414 > > > > Log: > > MFC r324328: > > > > amd64: remove unused variable from pmap_delayed_invl_genp > > > > Modified: > > Directory Properties: > > stable/11/ (props changed) > > Was this already MFC'd and this commit only updated mergeinfo on purpose? I sent a similiar query shortly after commit and have no reply. -- Rod Grimes rgrimes@freebsd.org From owner-svn-src-all@freebsd.org Tue Jan 2 20:22:32 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 6E323EB77AC; Tue, 2 Jan 2018 20:22:32 +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 3B45971656; Tue, 2 Jan 2018 20:22:32 +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 w02KMVRH044812; Tue, 2 Jan 2018 20:22:31 GMT (envelope-from mjg@FreeBSD.org) Received: (from mjg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w02KMVUZ044811; Tue, 2 Jan 2018 20:22:31 GMT (envelope-from mjg@FreeBSD.org) Message-Id: <201801022022.w02KMVUZ044811@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mjg set sender to mjg@FreeBSD.org using -f From: Mateusz Guzik Date: Tue, 2 Jan 2018 20:22:31 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r327501 - stable/11/sys/amd64/amd64 X-SVN-Group: stable-11 X-SVN-Commit-Author: mjg X-SVN-Commit-Paths: stable/11/sys/amd64/amd64 X-SVN-Commit-Revision: 327501 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 02 Jan 2018 20:22:32 -0000 Author: mjg Date: Tue Jan 2 20:22:31 2018 New Revision: 327501 URL: https://svnweb.freebsd.org/changeset/base/327501 Log: MFC r324328: amd64: remove unused variable from pmap_delayed_invl_genp This is take #2. Modified: stable/11/sys/amd64/amd64/pmap.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/amd64/amd64/pmap.c ============================================================================== --- stable/11/sys/amd64/amd64/pmap.c Tue Jan 2 19:34:23 2018 (r327500) +++ stable/11/sys/amd64/amd64/pmap.c Tue Jan 2 20:22:31 2018 (r327501) @@ -537,14 +537,12 @@ pmap_delayed_invl_genp(vm_page_t m) static void pmap_delayed_invl_wait(vm_page_t m) { - struct thread *td; struct turnstile *ts; u_long *m_gen; #ifdef PV_STATS bool accounted = false; #endif - td = curthread; m_gen = pmap_delayed_invl_genp(m); while (*m_gen > pmap_invl_gen) { #ifdef PV_STATS From owner-svn-src-all@freebsd.org Tue Jan 2 20:24:11 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id B067AEB78D2; Tue, 2 Jan 2018 20:24:11 +0000 (UTC) (envelope-from mjguzik@gmail.com) Received: from mail-qt0-x243.google.com (mail-qt0-x243.google.com [IPv6:2607:f8b0:400d:c0d::243]) (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 68567717D2; Tue, 2 Jan 2018 20:24:11 +0000 (UTC) (envelope-from mjguzik@gmail.com) Received: by mail-qt0-x243.google.com with SMTP id u42so64251146qte.7; Tue, 02 Jan 2018 12:24:11 -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=gJvIjEkO9t1uRN+Y1V7hWVHaCLFfWYVWkzyYybPq6yA=; b=fIG1QQIOn35el6K0CnAnMTkhm/4mKNiWA8KkmvP3mTC6oJDGxHa5HHgjX1TisjXOh2 lUrXb57nsJnug0qGy1x8M83ej57DL1SwCtcLi91zAGrN8blxAMse2rYQ/tS2V7oXqwNv kiiJEKkGSH4BxWUWQSde1hbyBwxQ52EU9nJ6TZRUVEsZh3KYm2zg/a34fIY4d0n7GlxL Xq7SuIqu35OTInABzM7irgsUzBLKc5743hZx2Y6xGPrk3FuTSceKg8QXb5zhswsiDjGG dt+aQD+ETSDhDsgt6VZm1ecggdM88IJ+S5/6U6sQPLYP6hXfz2yx3uS/xLcN2TUn5Ukm PCTg== 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=gJvIjEkO9t1uRN+Y1V7hWVHaCLFfWYVWkzyYybPq6yA=; b=BVsJvKdCA+TDKfRuCtxiYUCB+jqXUS4N/VG+rtCMfAZJe4Vsfk67UMuEgonhDcwdyM de+jpaPqwxkccapwXCjKJSn2PfRIEv/genwWLs94E97JbXiNPpncPDCLz6VjzZdQ2AQr ywUz6SsC8uSNMC4ei1jCAx/idIvRQyd9GHein1WvXNuN5YgFHowWw5za7LLqT7BotECx NILEy1+4HLlafAMLpK3e88oVmwzNHJZatYpLEYPEmG7Cu0vysrhYFSYRz5hS7UjVFLQ9 54hDI7tJSU8HnTjrJgwuLUHo3ud7eUWoWaMkb6P7w5eo9wBR1ckgPtp0sI7jCQTyoe6w Kvzw== X-Gm-Message-State: AKGB3mKTsRWoxrgX0wAmVRXIEttVYo5y2hWwaefYjqfAGcgPDMoSFWWb ITNWNldUm/9fMbxL87t3eHZUmZgU44P+9nnBZQwG9Q== X-Google-Smtp-Source: ACJfBouB7B4dgn61c3+0imktNqDFoiaEJEONfI/y80PsWS1WCjysgHCp+pz0a+1uXiMAtaxs8uyKm0U8HKkv5Xm6QtA= X-Received: by 10.55.76.142 with SMTP id z136mr53122619qka.332.1514924650383; Tue, 02 Jan 2018 12:24:10 -0800 (PST) MIME-Version: 1.0 Received: by 10.200.44.214 with HTTP; Tue, 2 Jan 2018 12:24:09 -0800 (PST) In-Reply-To: <201801021949.w02JnZO2092778@pdx.rh.CN85.dnsmgr.net> References: <13482268.SAk0YaOX8x@ralph.baldwin.cx> <201801021949.w02JnZO2092778@pdx.rh.CN85.dnsmgr.net> From: Mateusz Guzik Date: Tue, 2 Jan 2018 21:24:09 +0100 Message-ID: Subject: Re: svn commit: r327414 - stable/11 To: rgrimes@freebsd.org Cc: John Baldwin , Mateusz Guzik , src-committers , svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Content-Type: text/plain; charset="UTF-8" X-Content-Filtered-By: Mailman/MimeDel 2.1.25 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 02 Jan 2018 20:24:11 -0000 On Tue, Jan 2, 2018 at 8:49 PM, Rodney W. Grimes < freebsd@pdx.rh.cn85.dnsmgr.net> wrote: > > On Sunday, December 31, 2017 05:14:40 AM Mateusz Guzik wrote: > > > Author: mjg > > > Date: Sun Dec 31 05:14:40 2017 > > > New Revision: 327414 > > > URL: https://svnweb.freebsd.org/changeset/base/327414 > > > > > > Log: > > > MFC r324328: > > > > > > amd64: remove unused variable from pmap_delayed_invl_genp > > > > > > Modified: > > > Directory Properties: > > > stable/11/ (props changed) > > > > Was this already MFC'd and this commit only updated mergeinfo on purpose? > > I sent a similiar query shortly after commit and have no reply. > Weird, I have no idea what happened to that one. I mfced again and this time it's fine: https://svnweb.freebsd.org/base?view=revision&revision=327501 -- Mateusz Guzik From owner-svn-src-all@freebsd.org Tue Jan 2 20:58:06 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 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-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" 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-all@freebsd.org Tue Jan 2 21:31:55 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 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-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" 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-all@freebsd.org Wed Jan 3 00:56:32 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 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-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" 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-all@freebsd.org Wed Jan 3 03:46:29 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 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-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" 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-all@freebsd.org Wed Jan 3 06:22:41 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 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-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" 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-all@freebsd.org Wed Jan 3 06:41:41 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 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-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" 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-all@freebsd.org Wed Jan 3 07:43:05 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 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-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" 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-all@freebsd.org Wed Jan 3 09:08:33 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 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-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" 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-all@freebsd.org Wed Jan 3 09:34:01 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 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-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" 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-all@freebsd.org Wed Jan 3 11:03:45 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id AEFEFEB99BE; Wed, 3 Jan 2018 11:03:45 +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 7BCF76F054; Wed, 3 Jan 2018 11:03:45 +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 w03B3imY013619; Wed, 3 Jan 2018 11:03:44 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w03B3ibO013618; Wed, 3 Jan 2018 11:03:44 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201801031103.w03B3ibO013618@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:03:44 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r327516 - stable/11/sys/amd64/amd64 X-SVN-Group: stable-11 X-SVN-Commit-Author: kib X-SVN-Commit-Paths: stable/11/sys/amd64/amd64 X-SVN-Commit-Revision: 327516 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 03 Jan 2018 11:03:45 -0000 Author: kib Date: Wed Jan 3 11:03:44 2018 New Revision: 327516 URL: https://svnweb.freebsd.org/changeset/base/327516 Log: MFC r327437: Remove MP SAFE marks and stray register name in comments. Modified: stable/11/sys/amd64/amd64/support.S Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/amd64/amd64/support.S ============================================================================== --- stable/11/sys/amd64/amd64/support.S Wed Jan 3 09:33:59 2018 (r327515) +++ stable/11/sys/amd64/amd64/support.S Wed Jan 3 11:03:44 2018 (r327516) @@ -214,7 +214,7 @@ END(fillw) */ /* - * copyout(from_kernel, to_user, len) - MP SAFE + * copyout(from_kernel, to_user, len) * %rdi, %rsi, %rdx */ ENTRY(copyout) @@ -277,7 +277,7 @@ copyout_fault: END(copyout) /* - * copyin(from_user, to_kernel, len) - MP SAFE + * copyin(from_user, to_kernel, len) * %rdi, %rsi, %rdx */ ENTRY(copyin) @@ -494,7 +494,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) @@ -569,7 +569,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. @@ -640,7 +640,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) @@ -680,7 +680,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-all@freebsd.org Wed Jan 3 11:23:48 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 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-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" 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-all@freebsd.org Wed Jan 3 12:18:57 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 48B72EBCADB; Wed, 3 Jan 2018 12:18:57 +0000 (UTC) (envelope-from ae@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 1176371962; Wed, 3 Jan 2018 12:18:56 +0000 (UTC) (envelope-from ae@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w03CIuQB043419; Wed, 3 Jan 2018 12:18:56 GMT (envelope-from ae@FreeBSD.org) Received: (from ae@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w03CIut8043418; Wed, 3 Jan 2018 12:18:56 GMT (envelope-from ae@FreeBSD.org) Message-Id: <201801031218.w03CIut8043418@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ae set sender to ae@FreeBSD.org using -f From: "Andrey V. Elsukov" Date: Wed, 3 Jan 2018 12:18:56 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r327518 - stable/11/sbin/ipfw X-SVN-Group: stable-11 X-SVN-Commit-Author: ae X-SVN-Commit-Paths: stable/11/sbin/ipfw X-SVN-Commit-Revision: 327518 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 03 Jan 2018 12:18:57 -0000 Author: ae Date: Wed Jan 3 12:18:55 2018 New Revision: 327518 URL: https://svnweb.freebsd.org/changeset/base/327518 Log: MFC r327140: Fix rule number truncation, use uint16_t type to specify rulenum. Also sort variable declartions by size. PR: 224555 Modified: stable/11/sbin/ipfw/ipfw2.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sbin/ipfw/ipfw2.c ============================================================================== --- stable/11/sbin/ipfw/ipfw2.c Wed Jan 3 11:23:47 2018 (r327517) +++ stable/11/sbin/ipfw/ipfw2.c Wed Jan 3 12:18:55 2018 (r327518) @@ -2250,12 +2250,13 @@ do_range_cmd(int cmd, ipfw_range_tlv *rt) void ipfw_sets_handler(char *av[]) { - uint32_t masks[2]; - int i; - uint8_t cmd, rulenum; ipfw_range_tlv rt; char *msg; size_t size; + uint32_t masks[2]; + int i; + uint16_t rulenum; + uint8_t cmd; av++; memset(&rt, 0, sizeof(rt)); From owner-svn-src-all@freebsd.org Wed Jan 3 15:01:33 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 0C0D5E811E7; Wed, 3 Jan 2018 15:01:33 +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 CA57676DAD; Wed, 3 Jan 2018 15:01:32 +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 w03F1VOb013231; Wed, 3 Jan 2018 15:01:31 GMT (envelope-from smh@FreeBSD.org) Received: (from smh@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w03F1Voq013230; Wed, 3 Jan 2018 15:01:31 GMT (envelope-from smh@FreeBSD.org) Message-Id: <201801031501.w03F1Voq013230@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: smh set sender to smh@FreeBSD.org using -f From: Steven Hartland Date: Wed, 3 Jan 2018 15:01:31 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r327519 - stable/11/sys/netinet X-SVN-Group: stable-11 X-SVN-Commit-Author: smh X-SVN-Commit-Paths: stable/11/sys/netinet X-SVN-Commit-Revision: 327519 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 03 Jan 2018 15:01:33 -0000 Author: smh Date: Wed Jan 3 15:01:31 2018 New Revision: 327519 URL: https://svnweb.freebsd.org/changeset/base/327519 Log: MFC r322812: Avoid TCP log messages which are false positives. Sponsored by: Multiplay Modified: stable/11/sys/netinet/tcp_input.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/netinet/tcp_input.c ============================================================================== --- stable/11/sys/netinet/tcp_input.c Wed Jan 3 12:18:55 2018 (r327518) +++ stable/11/sys/netinet/tcp_input.c Wed Jan 3 15:01:31 2018 (r327519) @@ -1686,25 +1686,6 @@ tcp_do_segment(struct mbuf *m, struct tcphdr *th, stru to.to_tsecr = 0; } /* - * If timestamps were negotiated during SYN/ACK they should - * appear on every segment during this session and vice versa. - */ - if ((tp->t_flags & TF_RCVD_TSTMP) && !(to.to_flags & TOF_TS)) { - if ((s = tcp_log_addrs(inc, th, NULL, NULL))) { - log(LOG_DEBUG, "%s; %s: Timestamp missing, " - "no action\n", s, __func__); - free(s, M_TCPLOG); - } - } - if (!(tp->t_flags & TF_RCVD_TSTMP) && (to.to_flags & TOF_TS)) { - if ((s = tcp_log_addrs(inc, th, NULL, NULL))) { - log(LOG_DEBUG, "%s; %s: Timestamp not expected, " - "no action\n", s, __func__); - free(s, M_TCPLOG); - } - } - - /* * Process options only when we get SYN/ACK back. The SYN case * for incoming connections is handled in tcp_syncache. * According to RFC1323 the window field in a SYN (i.e., a @@ -1732,6 +1713,25 @@ tcp_do_segment(struct mbuf *m, struct tcphdr *th, stru if ((tp->t_flags & TF_SACK_PERMIT) && (to.to_flags & TOF_SACKPERM) == 0) tp->t_flags &= ~TF_SACK_PERMIT; + } + + /* + * If timestamps were negotiated during SYN/ACK they should + * appear on every segment during this session and vice versa. + */ + if ((tp->t_flags & TF_RCVD_TSTMP) && !(to.to_flags & TOF_TS)) { + if ((s = tcp_log_addrs(inc, th, NULL, NULL))) { + log(LOG_DEBUG, "%s; %s: Timestamp missing, " + "no action\n", s, __func__); + free(s, M_TCPLOG); + } + } + if (!(tp->t_flags & TF_RCVD_TSTMP) && (to.to_flags & TOF_TS)) { + if ((s = tcp_log_addrs(inc, th, NULL, NULL))) { + log(LOG_DEBUG, "%s; %s: Timestamp not expected, " + "no action\n", s, __func__); + free(s, M_TCPLOG); + } } /* From owner-svn-src-all@freebsd.org Wed Jan 3 16:16:21 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 6CC94E87DB3; Wed, 3 Jan 2018 16:16:21 +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 3708179B68; Wed, 3 Jan 2018 16:16:21 +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 w03GGKHY046422; Wed, 3 Jan 2018 16:16:20 GMT (envelope-from smh@FreeBSD.org) Received: (from smh@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w03GGKPN046421; Wed, 3 Jan 2018 16:16:20 GMT (envelope-from smh@FreeBSD.org) Message-Id: <201801031616.w03GGKPN046421@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: smh set sender to smh@FreeBSD.org using -f From: Steven Hartland Date: Wed, 3 Jan 2018 16:16:20 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r327520 - stable/10/sys/netinet X-SVN-Group: stable-10 X-SVN-Commit-Author: smh X-SVN-Commit-Paths: stable/10/sys/netinet X-SVN-Commit-Revision: 327520 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 03 Jan 2018 16:16:21 -0000 Author: smh Date: Wed Jan 3 16:16:20 2018 New Revision: 327520 URL: https://svnweb.freebsd.org/changeset/base/327520 Log: MFC r322812: Avoid TCP log messages which are false positives. Sponsored by: Multiplay Modified: stable/10/sys/netinet/tcp_input.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/netinet/tcp_input.c ============================================================================== --- stable/10/sys/netinet/tcp_input.c Wed Jan 3 15:01:31 2018 (r327519) +++ stable/10/sys/netinet/tcp_input.c Wed Jan 3 16:16:20 2018 (r327520) @@ -1647,25 +1647,6 @@ tcp_do_segment(struct mbuf *m, struct tcphdr *th, stru to.to_tsecr = 0; } /* - * If timestamps were negotiated during SYN/ACK they should - * appear on every segment during this session and vice versa. - */ - if ((tp->t_flags & TF_RCVD_TSTMP) && !(to.to_flags & TOF_TS)) { - if ((s = tcp_log_addrs(inc, th, NULL, NULL))) { - log(LOG_DEBUG, "%s; %s: Timestamp missing, " - "no action\n", s, __func__); - free(s, M_TCPLOG); - } - } - if (!(tp->t_flags & TF_RCVD_TSTMP) && (to.to_flags & TOF_TS)) { - if ((s = tcp_log_addrs(inc, th, NULL, NULL))) { - log(LOG_DEBUG, "%s; %s: Timestamp not expected, " - "no action\n", s, __func__); - free(s, M_TCPLOG); - } - } - - /* * Process options only when we get SYN/ACK back. The SYN case * for incoming connections is handled in tcp_syncache. * According to RFC1323 the window field in a SYN (i.e., a @@ -1693,6 +1674,25 @@ tcp_do_segment(struct mbuf *m, struct tcphdr *th, stru if ((tp->t_flags & TF_SACK_PERMIT) && (to.to_flags & TOF_SACKPERM) == 0) tp->t_flags &= ~TF_SACK_PERMIT; + } + + /* + * If timestamps were negotiated during SYN/ACK they should + * appear on every segment during this session and vice versa. + */ + if ((tp->t_flags & TF_RCVD_TSTMP) && !(to.to_flags & TOF_TS)) { + if ((s = tcp_log_addrs(inc, th, NULL, NULL))) { + log(LOG_DEBUG, "%s; %s: Timestamp missing, " + "no action\n", s, __func__); + free(s, M_TCPLOG); + } + } + if (!(tp->t_flags & TF_RCVD_TSTMP) && (to.to_flags & TOF_TS)) { + if ((s = tcp_log_addrs(inc, th, NULL, NULL))) { + log(LOG_DEBUG, "%s; %s: Timestamp not expected, " + "no action\n", s, __func__); + free(s, M_TCPLOG); + } } /* From owner-svn-src-all@freebsd.org Wed Jan 3 17:04:14 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 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-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" 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-all@freebsd.org Wed Jan 3 17:28:02 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 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-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" 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-all@freebsd.org Wed Jan 3 17:35:39 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 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-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" 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-all@freebsd.org Wed Jan 3 17:40:53 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 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-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" 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-all@freebsd.org Wed Jan 3 18:19:48 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 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-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" 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-all@freebsd.org Wed Jan 3 18:43:58 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 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-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" 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-all@freebsd.org Wed Jan 3 19:22:12 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 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-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" 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-all@freebsd.org Wed Jan 3 19:24:23 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 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-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" 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-all@freebsd.org Wed Jan 3 19:24:59 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 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-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" 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-all@freebsd.org Wed Jan 3 19:28:14 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 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-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" 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-all@freebsd.org Wed Jan 3 20:20:36 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id EAAA9EAD797 for ; Wed, 3 Jan 2018 20:20:36 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: from mail-io0-x22a.google.com (mail-io0-x22a.google.com [IPv6:2607:f8b0:4001:c06::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 B136864359 for ; Wed, 3 Jan 2018 20:20:36 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: by mail-io0-x22a.google.com with SMTP id w188so3312715iod.10 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=Y65ewf+NpSkOxh0VCkJ5wBd5DOvNdfaBo7HoN2LkFfUa0v9UB+KFdDMBjqCmDtEdfh oCxjkpPEBW1NsaTux1dHX23UFL8BCyMnS+GfbYhWT9GgN5LoK2O3clkLRpwwLBcnLwDE JYJX4zKDFv9dFhCoOU0150Adn0IIaf4iZvQiqxzMY0ZMqfq/wdwq7nbECXq198IG8DI4 XFAWZXaG1IS9YOIKQ14FXh0nmMFd8P0nwblSlhSJ4GtDRqPDbxRWGNfAE1b5cPSOgRMw rL9IoM7SlSgakmpdPd0nkvrapKJ/qdegaw5DzNEn2d4ffxFx/iPS1JxZlU0tZ2gGHBXr abKA== X-Gm-Message-State: AKGB3mJG5nZb1izVFGtZ2Fdvpfd3gOQ2F6qm/QEgocJvVPyoHsdhZWFp Mx3KrY4Nfijh6dxQTTtWwC/8q9wX9y6TShPnVk7CRA== 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-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" 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-all@freebsd.org Wed Jan 3 20:20:44 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 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-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" 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-all@freebsd.org Wed Jan 3 22:17:31 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 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-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" 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-all@freebsd.org Wed Jan 3 23:03:21 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id B3BA3EB43A5 for ; Wed, 3 Jan 2018 23:03:21 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: from mail-io0-x22a.google.com (mail-io0-x22a.google.com [IPv6:2607:f8b0:4001:c06::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 74E126AFC0 for ; Wed, 3 Jan 2018 23:03:21 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: by mail-io0-x22a.google.com with SMTP id g70so313941ioj.6 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=bJ0U/2ePPMzlHHNOx8/752+uDpyBWfVTTaBk3VfPPra7LG1Gd9U49HIqj/jhAuG3Oq 0cwG9htgNR1osmrd0mM9fUf8VNY91Y1mPqRfh/9tcTZvWtAUFkx8y2AAB+pv1R/VVWdK mSbSZncCQ2KghWJfg3OOXxy8FoLnm7sUsKJdpjTgcKE3ZjMRak7665GaGV0AiL/xZ3gH lV5B4gEIdl9v2w3R/7BnLYq7b3105kNtfG/J5oJWs6BjF2ZI7woL69TQsi7PIFFJtIo5 umsFgEAk35SXHC8oLBrvgJjEvu8zVv5oUFmOLFzwmRVpB+mFv0QivjZ05CqZ6FB9xoLU 60mw== X-Gm-Message-State: AKGB3mJdGzGAW9Xm9PxmPC8rTuRSKy8YM1B1JBKju/fOlCq4RSId2PlI Y1n5WJox7G4pkuaWWHA0LVOSm6ASWBr42pPpXFqF9A== 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-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" 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-all@freebsd.org Wed Jan 3 23:41:58 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 52C7EEB59F3 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 15CEF6C4DA 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-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" 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-all@freebsd.org Thu Jan 4 00:58:32 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 5A49CEB898F; Thu, 4 Jan 2018 00:58:32 +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 C48C26F112; Thu, 4 Jan 2018 00:58:31 +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 w040wUla066786; Thu, 4 Jan 2018 00:58:30 GMT (envelope-from jkim@FreeBSD.org) Received: (from jkim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w040wUM0066783; Thu, 4 Jan 2018 00:58:30 GMT (envelope-from jkim@FreeBSD.org) Message-Id: <201801040058.w040wUM0066783@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jkim set sender to jkim@FreeBSD.org using -f From: Jung-uk Kim Date: Thu, 4 Jan 2018 00:58:30 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org Subject: svn commit: r327536 - in stable/8: crypto/openssl crypto/openssl/apps crypto/openssl/crypto crypto/openssl/crypto/asn1 crypto/openssl/crypto/des/t crypto/openssl/crypto/evp crypto/openssl/doc crypt... X-SVN-Group: stable-8 X-SVN-Commit-Author: jkim X-SVN-Commit-Paths: in stable/8: crypto/openssl crypto/openssl/apps crypto/openssl/crypto crypto/openssl/crypto/asn1 crypto/openssl/crypto/des/t crypto/openssl/crypto/evp crypto/openssl/doc crypto/openssl/doc/crypto cryp... X-SVN-Commit-Revision: 327536 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 04 Jan 2018 00:58:32 -0000 Author: jkim Date: Thu Jan 4 00:58:30 2018 New Revision: 327536 URL: https://svnweb.freebsd.org/changeset/base/327536 Log: Merge OpenSSL 0.9.8zh. Requested by: danfe Added: stable/8/crypto/openssl/doc/dir-locals.example.el - copied unchanged from r291711, vendor-crypto/openssl/dist-0.9.8/doc/dir-locals.example.el stable/8/crypto/openssl/doc/openssl-c-indent.el - copied unchanged from r291711, vendor-crypto/openssl/dist-0.9.8/doc/openssl-c-indent.el Deleted: stable/8/crypto/openssl/crypto/des/t/test stable/8/crypto/openssl/test/bctest stable/8/crypto/openssl/util/pod2mantest Modified: stable/8/crypto/openssl/CHANGES stable/8/crypto/openssl/FAQ stable/8/crypto/openssl/Makefile stable/8/crypto/openssl/Makefile.org stable/8/crypto/openssl/NEWS stable/8/crypto/openssl/README stable/8/crypto/openssl/apps/asn1pars.c stable/8/crypto/openssl/crypto/asn1/asn1_par.c stable/8/crypto/openssl/crypto/asn1/tasn_dec.c stable/8/crypto/openssl/crypto/evp/e_des3.c stable/8/crypto/openssl/crypto/mem_clr.c stable/8/crypto/openssl/crypto/opensslv.h stable/8/crypto/openssl/doc/crypto/X509_NAME_get_index_by_NID.pod stable/8/crypto/openssl/openssl.spec stable/8/crypto/openssl/ssl/ssl_sess.c stable/8/crypto/openssl/ssl/ssltest.c stable/8/secure/lib/libcrypto/Makefile.inc stable/8/secure/lib/libcrypto/man/ASN1_OBJECT_new.3 stable/8/secure/lib/libcrypto/man/ASN1_STRING_length.3 stable/8/secure/lib/libcrypto/man/ASN1_STRING_new.3 stable/8/secure/lib/libcrypto/man/ASN1_STRING_print_ex.3 stable/8/secure/lib/libcrypto/man/ASN1_generate_nconf.3 stable/8/secure/lib/libcrypto/man/BIO_ctrl.3 stable/8/secure/lib/libcrypto/man/BIO_f_base64.3 stable/8/secure/lib/libcrypto/man/BIO_f_buffer.3 stable/8/secure/lib/libcrypto/man/BIO_f_cipher.3 stable/8/secure/lib/libcrypto/man/BIO_f_md.3 stable/8/secure/lib/libcrypto/man/BIO_f_null.3 stable/8/secure/lib/libcrypto/man/BIO_f_ssl.3 stable/8/secure/lib/libcrypto/man/BIO_find_type.3 stable/8/secure/lib/libcrypto/man/BIO_new.3 stable/8/secure/lib/libcrypto/man/BIO_push.3 stable/8/secure/lib/libcrypto/man/BIO_read.3 stable/8/secure/lib/libcrypto/man/BIO_s_accept.3 stable/8/secure/lib/libcrypto/man/BIO_s_bio.3 stable/8/secure/lib/libcrypto/man/BIO_s_connect.3 stable/8/secure/lib/libcrypto/man/BIO_s_fd.3 stable/8/secure/lib/libcrypto/man/BIO_s_file.3 stable/8/secure/lib/libcrypto/man/BIO_s_mem.3 stable/8/secure/lib/libcrypto/man/BIO_s_null.3 stable/8/secure/lib/libcrypto/man/BIO_s_socket.3 stable/8/secure/lib/libcrypto/man/BIO_set_callback.3 stable/8/secure/lib/libcrypto/man/BIO_should_retry.3 stable/8/secure/lib/libcrypto/man/BN_BLINDING_new.3 stable/8/secure/lib/libcrypto/man/BN_CTX_new.3 stable/8/secure/lib/libcrypto/man/BN_CTX_start.3 stable/8/secure/lib/libcrypto/man/BN_add.3 stable/8/secure/lib/libcrypto/man/BN_add_word.3 stable/8/secure/lib/libcrypto/man/BN_bn2bin.3 stable/8/secure/lib/libcrypto/man/BN_cmp.3 stable/8/secure/lib/libcrypto/man/BN_copy.3 stable/8/secure/lib/libcrypto/man/BN_generate_prime.3 stable/8/secure/lib/libcrypto/man/BN_mod_inverse.3 stable/8/secure/lib/libcrypto/man/BN_mod_mul_montgomery.3 stable/8/secure/lib/libcrypto/man/BN_mod_mul_reciprocal.3 stable/8/secure/lib/libcrypto/man/BN_new.3 stable/8/secure/lib/libcrypto/man/BN_num_bytes.3 stable/8/secure/lib/libcrypto/man/BN_rand.3 stable/8/secure/lib/libcrypto/man/BN_set_bit.3 stable/8/secure/lib/libcrypto/man/BN_swap.3 stable/8/secure/lib/libcrypto/man/BN_zero.3 stable/8/secure/lib/libcrypto/man/CONF_modules_free.3 stable/8/secure/lib/libcrypto/man/CONF_modules_load_file.3 stable/8/secure/lib/libcrypto/man/CRYPTO_set_ex_data.3 stable/8/secure/lib/libcrypto/man/DH_generate_key.3 stable/8/secure/lib/libcrypto/man/DH_generate_parameters.3 stable/8/secure/lib/libcrypto/man/DH_get_ex_new_index.3 stable/8/secure/lib/libcrypto/man/DH_new.3 stable/8/secure/lib/libcrypto/man/DH_set_method.3 stable/8/secure/lib/libcrypto/man/DH_size.3 stable/8/secure/lib/libcrypto/man/DSA_SIG_new.3 stable/8/secure/lib/libcrypto/man/DSA_do_sign.3 stable/8/secure/lib/libcrypto/man/DSA_dup_DH.3 stable/8/secure/lib/libcrypto/man/DSA_generate_key.3 stable/8/secure/lib/libcrypto/man/DSA_generate_parameters.3 stable/8/secure/lib/libcrypto/man/DSA_get_ex_new_index.3 stable/8/secure/lib/libcrypto/man/DSA_new.3 stable/8/secure/lib/libcrypto/man/DSA_set_method.3 stable/8/secure/lib/libcrypto/man/DSA_sign.3 stable/8/secure/lib/libcrypto/man/DSA_size.3 stable/8/secure/lib/libcrypto/man/ERR_GET_LIB.3 stable/8/secure/lib/libcrypto/man/ERR_clear_error.3 stable/8/secure/lib/libcrypto/man/ERR_error_string.3 stable/8/secure/lib/libcrypto/man/ERR_get_error.3 stable/8/secure/lib/libcrypto/man/ERR_load_crypto_strings.3 stable/8/secure/lib/libcrypto/man/ERR_load_strings.3 stable/8/secure/lib/libcrypto/man/ERR_print_errors.3 stable/8/secure/lib/libcrypto/man/ERR_put_error.3 stable/8/secure/lib/libcrypto/man/ERR_remove_state.3 stable/8/secure/lib/libcrypto/man/ERR_set_mark.3 stable/8/secure/lib/libcrypto/man/EVP_BytesToKey.3 stable/8/secure/lib/libcrypto/man/EVP_DigestInit.3 stable/8/secure/lib/libcrypto/man/EVP_EncryptInit.3 stable/8/secure/lib/libcrypto/man/EVP_OpenInit.3 stable/8/secure/lib/libcrypto/man/EVP_PKEY_new.3 stable/8/secure/lib/libcrypto/man/EVP_PKEY_set1_RSA.3 stable/8/secure/lib/libcrypto/man/EVP_SealInit.3 stable/8/secure/lib/libcrypto/man/EVP_SignInit.3 stable/8/secure/lib/libcrypto/man/EVP_VerifyInit.3 stable/8/secure/lib/libcrypto/man/OBJ_nid2obj.3 stable/8/secure/lib/libcrypto/man/OPENSSL_Applink.3 stable/8/secure/lib/libcrypto/man/OPENSSL_VERSION_NUMBER.3 stable/8/secure/lib/libcrypto/man/OPENSSL_config.3 stable/8/secure/lib/libcrypto/man/OPENSSL_ia32cap.3 stable/8/secure/lib/libcrypto/man/OPENSSL_load_builtin_modules.3 stable/8/secure/lib/libcrypto/man/OpenSSL_add_all_algorithms.3 stable/8/secure/lib/libcrypto/man/PKCS12_create.3 stable/8/secure/lib/libcrypto/man/PKCS12_parse.3 stable/8/secure/lib/libcrypto/man/PKCS7_decrypt.3 stable/8/secure/lib/libcrypto/man/PKCS7_encrypt.3 stable/8/secure/lib/libcrypto/man/PKCS7_sign.3 stable/8/secure/lib/libcrypto/man/PKCS7_verify.3 stable/8/secure/lib/libcrypto/man/RAND_add.3 stable/8/secure/lib/libcrypto/man/RAND_bytes.3 stable/8/secure/lib/libcrypto/man/RAND_cleanup.3 stable/8/secure/lib/libcrypto/man/RAND_egd.3 stable/8/secure/lib/libcrypto/man/RAND_load_file.3 stable/8/secure/lib/libcrypto/man/RAND_set_rand_method.3 stable/8/secure/lib/libcrypto/man/RSA_blinding_on.3 stable/8/secure/lib/libcrypto/man/RSA_check_key.3 stable/8/secure/lib/libcrypto/man/RSA_generate_key.3 stable/8/secure/lib/libcrypto/man/RSA_get_ex_new_index.3 stable/8/secure/lib/libcrypto/man/RSA_new.3 stable/8/secure/lib/libcrypto/man/RSA_padding_add_PKCS1_type_1.3 stable/8/secure/lib/libcrypto/man/RSA_print.3 stable/8/secure/lib/libcrypto/man/RSA_private_encrypt.3 stable/8/secure/lib/libcrypto/man/RSA_public_encrypt.3 stable/8/secure/lib/libcrypto/man/RSA_set_method.3 stable/8/secure/lib/libcrypto/man/RSA_sign.3 stable/8/secure/lib/libcrypto/man/RSA_sign_ASN1_OCTET_STRING.3 stable/8/secure/lib/libcrypto/man/RSA_size.3 stable/8/secure/lib/libcrypto/man/SMIME_read_PKCS7.3 stable/8/secure/lib/libcrypto/man/SMIME_write_PKCS7.3 stable/8/secure/lib/libcrypto/man/X509_NAME_ENTRY_get_object.3 stable/8/secure/lib/libcrypto/man/X509_NAME_add_entry_by_txt.3 stable/8/secure/lib/libcrypto/man/X509_NAME_get_index_by_NID.3 stable/8/secure/lib/libcrypto/man/X509_NAME_print_ex.3 stable/8/secure/lib/libcrypto/man/X509_new.3 stable/8/secure/lib/libcrypto/man/bio.3 stable/8/secure/lib/libcrypto/man/blowfish.3 stable/8/secure/lib/libcrypto/man/bn.3 stable/8/secure/lib/libcrypto/man/bn_internal.3 stable/8/secure/lib/libcrypto/man/buffer.3 stable/8/secure/lib/libcrypto/man/crypto.3 stable/8/secure/lib/libcrypto/man/d2i_ASN1_OBJECT.3 stable/8/secure/lib/libcrypto/man/d2i_DHparams.3 stable/8/secure/lib/libcrypto/man/d2i_DSAPublicKey.3 stable/8/secure/lib/libcrypto/man/d2i_PKCS8PrivateKey.3 stable/8/secure/lib/libcrypto/man/d2i_RSAPublicKey.3 stable/8/secure/lib/libcrypto/man/d2i_X509.3 stable/8/secure/lib/libcrypto/man/d2i_X509_ALGOR.3 stable/8/secure/lib/libcrypto/man/d2i_X509_CRL.3 stable/8/secure/lib/libcrypto/man/d2i_X509_NAME.3 stable/8/secure/lib/libcrypto/man/d2i_X509_REQ.3 stable/8/secure/lib/libcrypto/man/d2i_X509_SIG.3 stable/8/secure/lib/libcrypto/man/des.3 stable/8/secure/lib/libcrypto/man/dh.3 stable/8/secure/lib/libcrypto/man/dsa.3 stable/8/secure/lib/libcrypto/man/ecdsa.3 stable/8/secure/lib/libcrypto/man/engine.3 stable/8/secure/lib/libcrypto/man/err.3 stable/8/secure/lib/libcrypto/man/evp.3 stable/8/secure/lib/libcrypto/man/hmac.3 stable/8/secure/lib/libcrypto/man/lh_stats.3 stable/8/secure/lib/libcrypto/man/lhash.3 stable/8/secure/lib/libcrypto/man/md5.3 stable/8/secure/lib/libcrypto/man/mdc2.3 stable/8/secure/lib/libcrypto/man/pem.3 stable/8/secure/lib/libcrypto/man/rand.3 stable/8/secure/lib/libcrypto/man/rc4.3 stable/8/secure/lib/libcrypto/man/ripemd.3 stable/8/secure/lib/libcrypto/man/rsa.3 stable/8/secure/lib/libcrypto/man/sha.3 stable/8/secure/lib/libcrypto/man/threads.3 stable/8/secure/lib/libcrypto/man/ui.3 stable/8/secure/lib/libcrypto/man/ui_compat.3 stable/8/secure/lib/libcrypto/man/x509.3 stable/8/secure/lib/libssl/man/SSL_CIPHER_get_name.3 stable/8/secure/lib/libssl/man/SSL_COMP_add_compression_method.3 stable/8/secure/lib/libssl/man/SSL_CTX_add_extra_chain_cert.3 stable/8/secure/lib/libssl/man/SSL_CTX_add_session.3 stable/8/secure/lib/libssl/man/SSL_CTX_ctrl.3 stable/8/secure/lib/libssl/man/SSL_CTX_flush_sessions.3 stable/8/secure/lib/libssl/man/SSL_CTX_free.3 stable/8/secure/lib/libssl/man/SSL_CTX_get_ex_new_index.3 stable/8/secure/lib/libssl/man/SSL_CTX_get_verify_mode.3 stable/8/secure/lib/libssl/man/SSL_CTX_load_verify_locations.3 stable/8/secure/lib/libssl/man/SSL_CTX_new.3 stable/8/secure/lib/libssl/man/SSL_CTX_sess_number.3 stable/8/secure/lib/libssl/man/SSL_CTX_sess_set_cache_size.3 stable/8/secure/lib/libssl/man/SSL_CTX_sess_set_get_cb.3 stable/8/secure/lib/libssl/man/SSL_CTX_sessions.3 stable/8/secure/lib/libssl/man/SSL_CTX_set_cert_store.3 stable/8/secure/lib/libssl/man/SSL_CTX_set_cert_verify_callback.3 stable/8/secure/lib/libssl/man/SSL_CTX_set_cipher_list.3 stable/8/secure/lib/libssl/man/SSL_CTX_set_client_CA_list.3 stable/8/secure/lib/libssl/man/SSL_CTX_set_client_cert_cb.3 stable/8/secure/lib/libssl/man/SSL_CTX_set_default_passwd_cb.3 stable/8/secure/lib/libssl/man/SSL_CTX_set_generate_session_id.3 stable/8/secure/lib/libssl/man/SSL_CTX_set_info_callback.3 stable/8/secure/lib/libssl/man/SSL_CTX_set_max_cert_list.3 stable/8/secure/lib/libssl/man/SSL_CTX_set_mode.3 stable/8/secure/lib/libssl/man/SSL_CTX_set_msg_callback.3 stable/8/secure/lib/libssl/man/SSL_CTX_set_options.3 stable/8/secure/lib/libssl/man/SSL_CTX_set_quiet_shutdown.3 stable/8/secure/lib/libssl/man/SSL_CTX_set_session_cache_mode.3 stable/8/secure/lib/libssl/man/SSL_CTX_set_session_id_context.3 stable/8/secure/lib/libssl/man/SSL_CTX_set_ssl_version.3 stable/8/secure/lib/libssl/man/SSL_CTX_set_timeout.3 stable/8/secure/lib/libssl/man/SSL_CTX_set_tlsext_ticket_key_cb.3 stable/8/secure/lib/libssl/man/SSL_CTX_set_tmp_dh_callback.3 stable/8/secure/lib/libssl/man/SSL_CTX_set_tmp_rsa_callback.3 stable/8/secure/lib/libssl/man/SSL_CTX_set_verify.3 stable/8/secure/lib/libssl/man/SSL_CTX_use_certificate.3 stable/8/secure/lib/libssl/man/SSL_SESSION_free.3 stable/8/secure/lib/libssl/man/SSL_SESSION_get_ex_new_index.3 stable/8/secure/lib/libssl/man/SSL_SESSION_get_time.3 stable/8/secure/lib/libssl/man/SSL_accept.3 stable/8/secure/lib/libssl/man/SSL_alert_type_string.3 stable/8/secure/lib/libssl/man/SSL_clear.3 stable/8/secure/lib/libssl/man/SSL_connect.3 stable/8/secure/lib/libssl/man/SSL_do_handshake.3 stable/8/secure/lib/libssl/man/SSL_free.3 stable/8/secure/lib/libssl/man/SSL_get_SSL_CTX.3 stable/8/secure/lib/libssl/man/SSL_get_ciphers.3 stable/8/secure/lib/libssl/man/SSL_get_client_CA_list.3 stable/8/secure/lib/libssl/man/SSL_get_current_cipher.3 stable/8/secure/lib/libssl/man/SSL_get_default_timeout.3 stable/8/secure/lib/libssl/man/SSL_get_error.3 stable/8/secure/lib/libssl/man/SSL_get_ex_data_X509_STORE_CTX_idx.3 stable/8/secure/lib/libssl/man/SSL_get_ex_new_index.3 stable/8/secure/lib/libssl/man/SSL_get_fd.3 stable/8/secure/lib/libssl/man/SSL_get_peer_cert_chain.3 stable/8/secure/lib/libssl/man/SSL_get_peer_certificate.3 stable/8/secure/lib/libssl/man/SSL_get_rbio.3 stable/8/secure/lib/libssl/man/SSL_get_session.3 stable/8/secure/lib/libssl/man/SSL_get_verify_result.3 stable/8/secure/lib/libssl/man/SSL_get_version.3 stable/8/secure/lib/libssl/man/SSL_library_init.3 stable/8/secure/lib/libssl/man/SSL_load_client_CA_file.3 stable/8/secure/lib/libssl/man/SSL_new.3 stable/8/secure/lib/libssl/man/SSL_pending.3 stable/8/secure/lib/libssl/man/SSL_read.3 stable/8/secure/lib/libssl/man/SSL_rstate_string.3 stable/8/secure/lib/libssl/man/SSL_session_reused.3 stable/8/secure/lib/libssl/man/SSL_set_bio.3 stable/8/secure/lib/libssl/man/SSL_set_connect_state.3 stable/8/secure/lib/libssl/man/SSL_set_fd.3 stable/8/secure/lib/libssl/man/SSL_set_session.3 stable/8/secure/lib/libssl/man/SSL_set_shutdown.3 stable/8/secure/lib/libssl/man/SSL_set_verify_result.3 stable/8/secure/lib/libssl/man/SSL_shutdown.3 stable/8/secure/lib/libssl/man/SSL_state_string.3 stable/8/secure/lib/libssl/man/SSL_want.3 stable/8/secure/lib/libssl/man/SSL_write.3 stable/8/secure/lib/libssl/man/d2i_SSL_SESSION.3 stable/8/secure/lib/libssl/man/ssl.3 stable/8/secure/usr.bin/openssl/man/CA.pl.1 stable/8/secure/usr.bin/openssl/man/asn1parse.1 stable/8/secure/usr.bin/openssl/man/ca.1 stable/8/secure/usr.bin/openssl/man/ciphers.1 stable/8/secure/usr.bin/openssl/man/crl.1 stable/8/secure/usr.bin/openssl/man/crl2pkcs7.1 stable/8/secure/usr.bin/openssl/man/dgst.1 stable/8/secure/usr.bin/openssl/man/dhparam.1 stable/8/secure/usr.bin/openssl/man/dsa.1 stable/8/secure/usr.bin/openssl/man/dsaparam.1 stable/8/secure/usr.bin/openssl/man/ec.1 stable/8/secure/usr.bin/openssl/man/ecparam.1 stable/8/secure/usr.bin/openssl/man/enc.1 stable/8/secure/usr.bin/openssl/man/errstr.1 stable/8/secure/usr.bin/openssl/man/gendsa.1 stable/8/secure/usr.bin/openssl/man/genrsa.1 stable/8/secure/usr.bin/openssl/man/nseq.1 stable/8/secure/usr.bin/openssl/man/ocsp.1 stable/8/secure/usr.bin/openssl/man/openssl.1 stable/8/secure/usr.bin/openssl/man/passwd.1 stable/8/secure/usr.bin/openssl/man/pkcs12.1 stable/8/secure/usr.bin/openssl/man/pkcs7.1 stable/8/secure/usr.bin/openssl/man/pkcs8.1 stable/8/secure/usr.bin/openssl/man/rand.1 stable/8/secure/usr.bin/openssl/man/req.1 stable/8/secure/usr.bin/openssl/man/rsa.1 stable/8/secure/usr.bin/openssl/man/rsautl.1 stable/8/secure/usr.bin/openssl/man/s_client.1 stable/8/secure/usr.bin/openssl/man/s_server.1 stable/8/secure/usr.bin/openssl/man/s_time.1 stable/8/secure/usr.bin/openssl/man/sess_id.1 stable/8/secure/usr.bin/openssl/man/smime.1 stable/8/secure/usr.bin/openssl/man/speed.1 stable/8/secure/usr.bin/openssl/man/spkac.1 stable/8/secure/usr.bin/openssl/man/verify.1 stable/8/secure/usr.bin/openssl/man/version.1 stable/8/secure/usr.bin/openssl/man/x509.1 stable/8/secure/usr.bin/openssl/man/x509v3_config.1 Directory Properties: stable/8/crypto/openssl/ (props changed) Modified: stable/8/crypto/openssl/CHANGES ============================================================================== --- stable/8/crypto/openssl/CHANGES Thu Jan 4 00:36:52 2018 (r327535) +++ stable/8/crypto/openssl/CHANGES Thu Jan 4 00:58:30 2018 (r327536) @@ -2,6 +2,20 @@ OpenSSL CHANGES _______________ + Changes between 0.9.8zg and 0.9.8zh [3 Dec 2015] + + *) X509_ATTRIBUTE memory leak + + When presented with a malformed X509_ATTRIBUTE structure OpenSSL will leak + memory. This structure is used by the PKCS#7 and CMS routines so any + application which reads PKCS#7 or CMS data from untrusted sources is + affected. SSL/TLS is not affected. + + This issue was reported to OpenSSL by Adam Langley (Google/BoringSSL) using + libFuzzer. + (CVE-2015-3195) + [Stephen Henson] + Changes between 0.9.8zf and 0.9.8zg [11 Jun 2015] *) Malformed ECParameters causes infinite loop Modified: stable/8/crypto/openssl/FAQ ============================================================================== --- stable/8/crypto/openssl/FAQ Thu Jan 4 00:36:52 2018 (r327535) +++ stable/8/crypto/openssl/FAQ Thu Jan 4 00:58:30 2018 (r327536) @@ -1,1039 +1,2 @@ -OpenSSL - Frequently Asked Questions --------------------------------------- - -[MISC] Miscellaneous questions - -* Which is the current version of OpenSSL? -* Where is the documentation? -* How can I contact the OpenSSL developers? -* Where can I get a compiled version of OpenSSL? -* Why aren't tools like 'autoconf' and 'libtool' used? -* What is an 'engine' version? -* How do I check the authenticity of the OpenSSL distribution? -* How does the versioning scheme work? - -[LEGAL] Legal questions - -* Do I need patent licenses to use OpenSSL? -* Can I use OpenSSL with GPL software? - -[USER] Questions on using the OpenSSL applications - -* Why do I get a "PRNG not seeded" error message? -* Why do I get an "unable to write 'random state'" error message? -* How do I create certificates or certificate requests? -* Why can't I create certificate requests? -* Why does fail with a certificate verify error? -* Why can I only use weak ciphers when I connect to a server using OpenSSL? -* How can I create DSA certificates? -* Why can't I make an SSL connection using a DSA certificate? -* How can I remove the passphrase on a private key? -* Why can't I use OpenSSL certificates with SSL client authentication? -* Why does my browser give a warning about a mismatched hostname? -* How do I install a CA certificate into a browser? -* Why is OpenSSL x509 DN output not conformant to RFC2253? -* What is a "128 bit certificate"? Can I create one with OpenSSL? -* Why does OpenSSL set the authority key identifier extension incorrectly? -* How can I set up a bundle of commercial root CA certificates? - -[BUILD] Questions about building and testing OpenSSL - -* Why does the linker complain about undefined symbols? -* Why does the OpenSSL test fail with "bc: command not found"? -* Why does the OpenSSL test fail with "bc: 1 no implemented"? -* Why does the OpenSSL test fail with "bc: stack empty"? -* Why does the OpenSSL compilation fail on Alpha Tru64 Unix? -* Why does the OpenSSL compilation fail with "ar: command not found"? -* Why does the OpenSSL compilation fail on Win32 with VC++? -* What is special about OpenSSL on Redhat? -* Why does the OpenSSL compilation fail on MacOS X? -* Why does the OpenSSL test suite fail on MacOS X? -* Why does the OpenSSL test suite fail in BN_sqr test [on a 64-bit platform]? -* Why does OpenBSD-i386 build fail on des-586.s with "Unimplemented segment type"? -* Why does the OpenSSL test suite fail in sha512t on x86 CPU? -* Why does compiler fail to compile sha512.c? -* Test suite still fails, what to do? -* I think I've found a bug, what should I do? -* I'm SURE I've found a bug, how do I report it? -* I've found a security issue, how do I report it? - -[PROG] Questions about programming with OpenSSL - -* Is OpenSSL thread-safe? -* I've compiled a program under Windows and it crashes: why? -* How do I read or write a DER encoded buffer using the ASN1 functions? -* OpenSSL uses DER but I need BER format: does OpenSSL support BER? -* I've tried using and I get errors why? -* I've called and it fails, why? -* I just get a load of numbers for the error output, what do they mean? -* Why do I get errors about unknown algorithms? -* Why can't the OpenSSH configure script detect OpenSSL? -* Can I use OpenSSL's SSL library with non-blocking I/O? -* Why doesn't my server application receive a client certificate? -* Why does compilation fail due to an undefined symbol NID_uniqueIdentifier? -* I think I've detected a memory leak, is this a bug? -* Why does Valgrind complain about the use of uninitialized data? -* Why doesn't a memory BIO work when a file does? -* Where are the declarations and implementations of d2i_X509() etc? - -=============================================================================== - -[MISC] ======================================================================== - -* Which is the current version of OpenSSL? - -The current version is available from . -OpenSSL 1.0.1d was released on Feb 5th, 2013. - -In addition to the current stable release, you can also access daily -snapshots of the OpenSSL development version at , or get it by anonymous Git access. - - -* Where is the documentation? - -OpenSSL is a library that provides cryptographic functionality to -applications such as secure web servers. Be sure to read the -documentation of the application you want to use. The INSTALL file -explains how to install this library. - -OpenSSL includes a command line utility that can be used to perform a -variety of cryptographic functions. It is described in the openssl(1) -manpage. Documentation for developers is currently being written. Many -manual pages are available; overviews over libcrypto and -libssl are given in the crypto(3) and ssl(3) manpages. - -The OpenSSL manpages are installed in /usr/local/ssl/man/ (or a -different directory if you specified one as described in INSTALL). -In addition, you can read the most current versions at -. Note that the online documents refer -to the very latest development versions of OpenSSL and may include features -not present in released versions. If in doubt refer to the documentation -that came with the version of OpenSSL you are using. The pod format -documentation is included in each OpenSSL distribution under the docs -directory. - -There is some documentation about certificate extensions and PKCS#12 -in doc/openssl.txt - -The original SSLeay documentation is included in OpenSSL as -doc/ssleay.txt. It may be useful when none of the other resources -help, but please note that it reflects the obsolete version SSLeay -0.6.6. - - -* How can I contact the OpenSSL developers? - -The README file describes how to submit bug reports and patches to -OpenSSL. Information on the OpenSSL mailing lists is available from -. - - -* Where can I get a compiled version of OpenSSL? - -You can finder pointers to binary distributions in - . - -Some applications that use OpenSSL are distributed in binary form. -When using such an application, you don't need to install OpenSSL -yourself; the application will include the required parts (e.g. DLLs). - -If you want to build OpenSSL on a Windows system and you don't have -a C compiler, read the "Mingw32" section of INSTALL.W32 for information -on how to obtain and install the free GNU C compiler. - -A number of Linux and *BSD distributions include OpenSSL. - - -* Why aren't tools like 'autoconf' and 'libtool' used? - -autoconf will probably be used in future OpenSSL versions. If it was -less Unix-centric, it might have been used much earlier. - -* What is an 'engine' version? - -With version 0.9.6 OpenSSL was extended to interface to external crypto -hardware. This was realized in a special release '0.9.6-engine'. With -version 0.9.7 the changes were merged into the main development line, -so that the special release is no longer necessary. - -* How do I check the authenticity of the OpenSSL distribution? - -We provide MD5 digests and ASC signatures of each tarball. -Use MD5 to check that a tarball from a mirror site is identical: - - md5sum TARBALL | awk '{print $1;}' | cmp - TARBALL.md5 - -You can check authenticity using pgp or gpg. You need the OpenSSL team -member public key used to sign it (download it from a key server, see a -list of keys at ). Then -just do: - - pgp TARBALL.asc - -* How does the versioning scheme work? - -After the release of OpenSSL 1.0.0 the versioning scheme changed. Letter -releases (e.g. 1.0.1a) can only contain bug and security fixes and no -new features. Minor releases change the last number (e.g. 1.0.2) and -can contain new features that retain binary compatibility. Changes to -the middle number are considered major releases and neither source nor -binary compatibility is guaranteed. - -Therefore the answer to the common question "when will feature X be -backported to OpenSSL 1.0.0/0.9.8?" is "never" but it could appear -in the next minor release. - -[LEGAL] ======================================================================= - -* Do I need patent licenses to use OpenSSL? - -The patents section of the README file lists patents that may apply to -you if you want to use OpenSSL. For information on intellectual -property rights, please consult a lawyer. The OpenSSL team does not -offer legal advice. - -You can configure OpenSSL so as not to use IDEA, MDC2 and RC5 by using - ./config no-idea no-mdc2 no-rc5 - - -* Can I use OpenSSL with GPL software? - -On many systems including the major Linux and BSD distributions, yes (the -GPL does not place restrictions on using libraries that are part of the -normal operating system distribution). - -On other systems, the situation is less clear. Some GPL software copyright -holders claim that you infringe on their rights if you use OpenSSL with -their software on operating systems that don't normally include OpenSSL. - -If you develop open source software that uses OpenSSL, you may find it -useful to choose an other license than the GPL, or state explicitly that -"This program is released under the GPL with the additional exemption that -compiling, linking, and/or using OpenSSL is allowed." If you are using -GPL software developed by others, you may want to ask the copyright holder -for permission to use their software with OpenSSL. - - -[USER] ======================================================================== - -* Why do I get a "PRNG not seeded" error message? - -Cryptographic software needs a source of unpredictable data to work -correctly. Many open source operating systems provide a "randomness -device" (/dev/urandom or /dev/random) that serves this purpose. -All OpenSSL versions try to use /dev/urandom by default; starting with -version 0.9.7, OpenSSL also tries /dev/random if /dev/urandom is not -available. - -On other systems, applications have to call the RAND_add() or -RAND_seed() function with appropriate data before generating keys or -performing public key encryption. (These functions initialize the -pseudo-random number generator, PRNG.) Some broken applications do -not do this. As of version 0.9.5, the OpenSSL functions that need -randomness report an error if the random number generator has not been -seeded with at least 128 bits of randomness. If this error occurs and -is not discussed in the documentation of the application you are -using, please contact the author of that application; it is likely -that it never worked correctly. OpenSSL 0.9.5 and later make the -error visible by refusing to perform potentially insecure encryption. - -If you are using Solaris 8, you can add /dev/urandom and /dev/random -devices by installing patch 112438 (Sparc) or 112439 (x86), which are -available via the Patchfinder at -(Solaris 9 includes these devices by default). For /dev/random support -for earlier Solaris versions, see Sun's statement at - -(the SUNWski package is available in patch 105710). - -On systems without /dev/urandom and /dev/random, it is a good idea to -use the Entropy Gathering Demon (EGD); see the RAND_egd() manpage for -details. Starting with version 0.9.7, OpenSSL will automatically look -for an EGD socket at /var/run/egd-pool, /dev/egd-pool, /etc/egd-pool and -/etc/entropy. - -Most components of the openssl command line utility automatically try -to seed the random number generator from a file. The name of the -default seeding file is determined as follows: If environment variable -RANDFILE is set, then it names the seeding file. Otherwise if -environment variable HOME is set, then the seeding file is $HOME/.rnd. -If neither RANDFILE nor HOME is set, versions up to OpenSSL 0.9.6 will -use file .rnd in the current directory while OpenSSL 0.9.6a uses no -default seeding file at all. OpenSSL 0.9.6b and later will behave -similarly to 0.9.6a, but will use a default of "C:\" for HOME on -Windows systems if the environment variable has not been set. - -If the default seeding file does not exist or is too short, the "PRNG -not seeded" error message may occur. - -The openssl command line utility will write back a new state to the -default seeding file (and create this file if necessary) unless -there was no sufficient seeding. - -Pointing $RANDFILE to an Entropy Gathering Daemon socket does not work. -Use the "-rand" option of the OpenSSL command line tools instead. -The $RANDFILE environment variable and $HOME/.rnd are only used by the -OpenSSL command line tools. Applications using the OpenSSL library -provide their own configuration options to specify the entropy source, -please check out the documentation coming the with application. - - -* Why do I get an "unable to write 'random state'" error message? - - -Sometimes the openssl command line utility does not abort with -a "PRNG not seeded" error message, but complains that it is -"unable to write 'random state'". This message refers to the -default seeding file (see previous answer). A possible reason -is that no default filename is known because neither RANDFILE -nor HOME is set. (Versions up to 0.9.6 used file ".rnd" in the -current directory in this case, but this has changed with 0.9.6a.) - - -* How do I create certificates or certificate requests? - -Check out the CA.pl(1) manual page. This provides a simple wrapper round -the 'req', 'verify', 'ca' and 'pkcs12' utilities. For finer control check -out the manual pages for the individual utilities and the certificate -extensions documentation (in ca(1), req(1), x509v3_config(5) ) - - -* Why can't I create certificate requests? - -You typically get the error: - - unable to find 'distinguished_name' in config - problems making Certificate Request - -This is because it can't find the configuration file. Check out the -DIAGNOSTICS section of req(1) for more information. - - -* Why does fail with a certificate verify error? - -This problem is usually indicated by log messages saying something like -"unable to get local issuer certificate" or "self signed certificate". -When a certificate is verified its root CA must be "trusted" by OpenSSL -this typically means that the CA certificate must be placed in a directory -or file and the relevant program configured to read it. The OpenSSL program -'verify' behaves in a similar way and issues similar error messages: check -the verify(1) program manual page for more information. - - -* Why can I only use weak ciphers when I connect to a server using OpenSSL? - -This is almost certainly because you are using an old "export grade" browser -which only supports weak encryption. Upgrade your browser to support 128 bit -ciphers. - - -* How can I create DSA certificates? - -Check the CA.pl(1) manual page for a DSA certificate example. - - -* Why can't I make an SSL connection to a server using a DSA certificate? - -Typically you'll see a message saying there are no shared ciphers when -the same setup works fine with an RSA certificate. There are two possible -causes. The client may not support connections to DSA servers most web -browsers (including Netscape and MSIE) only support connections to servers -supporting RSA cipher suites. The other cause is that a set of DH parameters -has not been supplied to the server. DH parameters can be created with the -dhparam(1) command and loaded using the SSL_CTX_set_tmp_dh() for example: -check the source to s_server in apps/s_server.c for an example. - - -* How can I remove the passphrase on a private key? - -Firstly you should be really *really* sure you want to do this. Leaving -a private key unencrypted is a major security risk. If you decide that -you do have to do this check the EXAMPLES sections of the rsa(1) and -dsa(1) manual pages. - - -* Why can't I use OpenSSL certificates with SSL client authentication? - -What will typically happen is that when a server requests authentication -it will either not include your certificate or tell you that you have -no client certificates (Netscape) or present you with an empty list box -(MSIE). The reason for this is that when a server requests a client -certificate it includes a list of CAs names which it will accept. Browsers -will only let you select certificates from the list on the grounds that -there is little point presenting a certificate which the server will -reject. - -The solution is to add the relevant CA certificate to your servers "trusted -CA list". How you do this depends on the server software in uses. You can -print out the servers list of acceptable CAs using the OpenSSL s_client tool: - -openssl s_client -connect www.some.host:443 -prexit - -If your server only requests certificates on certain URLs then you may need -to manually issue an HTTP GET command to get the list when s_client connects: - -GET /some/page/needing/a/certificate.html - -If your CA does not appear in the list then this confirms the problem. - - -* Why does my browser give a warning about a mismatched hostname? - -Browsers expect the server's hostname to match the value in the commonName -(CN) field of the certificate. If it does not then you get a warning. - - -* How do I install a CA certificate into a browser? - -The usual way is to send the DER encoded certificate to the browser as -MIME type application/x-x509-ca-cert, for example by clicking on an appropriate -link. On MSIE certain extensions such as .der or .cacert may also work, or you -can import the certificate using the certificate import wizard. - -You can convert a certificate to DER form using the command: - -openssl x509 -in ca.pem -outform DER -out ca.der - -Occasionally someone suggests using a command such as: - -openssl pkcs12 -export -out cacert.p12 -in cacert.pem -inkey cakey.pem - -DO NOT DO THIS! This command will give away your CAs private key and -reduces its security to zero: allowing anyone to forge certificates in -whatever name they choose. - -* Why is OpenSSL x509 DN output not conformant to RFC2253? - -The ways to print out the oneline format of the DN (Distinguished Name) have -been extended in version 0.9.7 of OpenSSL. Using the new X509_NAME_print_ex() -interface, the "-nameopt" option could be introduded. See the manual -page of the "openssl x509" commandline tool for details. The old behaviour -has however been left as default for the sake of compatibility. - -* What is a "128 bit certificate"? Can I create one with OpenSSL? - -The term "128 bit certificate" is a highly misleading marketing term. It does -*not* refer to the size of the public key in the certificate! A certificate -containing a 128 bit RSA key would have negligible security. - -There were various other names such as "magic certificates", "SGC -certificates", "step up certificates" etc. - -You can't generally create such a certificate using OpenSSL but there is no -need to any more. Nowadays web browsers using unrestricted strong encryption -are generally available. - -When there were tight restrictions on the export of strong encryption -software from the US only weak encryption algorithms could be freely exported -(initially 40 bit and then 56 bit). It was widely recognised that this was -inadequate. A relaxation of the rules allowed the use of strong encryption but -only to an authorised server. - -Two slighly different techniques were developed to support this, one used by -Netscape was called "step up", the other used by MSIE was called "Server Gated -Cryptography" (SGC). When a browser initially connected to a server it would -check to see if the certificate contained certain extensions and was issued by -an authorised authority. If these test succeeded it would reconnect using -strong encryption. - -Only certain (initially one) certificate authorities could issue the -certificates and they generally cost more than ordinary certificates. - -Although OpenSSL can create certificates containing the appropriate extensions -the certificate would not come from a permitted authority and so would not -be recognized. - -The export laws were later changed to allow almost unrestricted use of strong -encryption so these certificates are now obsolete. - - -* Why does OpenSSL set the authority key identifier (AKID) extension incorrectly? - -It doesn't: this extension is often the cause of confusion. - -Consider a certificate chain A->B->C so that A signs B and B signs C. Suppose -certificate C contains AKID. - -The purpose of this extension is to identify the authority certificate B. This -can be done either by including the subject key identifier of B or its issuer -name and serial number. - -In this latter case because it is identifying certifcate B it must contain the -issuer name and serial number of B. - -It is often wrongly assumed that it should contain the subject name of B. If it -did this would be redundant information because it would duplicate the issuer -name of C. - - -* How can I set up a bundle of commercial root CA certificates? - -The OpenSSL software is shipped without any root CA certificate as the -OpenSSL project does not have any policy on including or excluding -any specific CA and does not intend to set up such a policy. Deciding -about which CAs to support is up to application developers or -administrators. - -Other projects do have other policies so you can for example extract the CA -bundle used by Mozilla and/or modssl as described in this article: - - - - -[BUILD] ======================================================================= - -* Why does the linker complain about undefined symbols? - -Maybe the compilation was interrupted, and make doesn't notice that -something is missing. Run "make clean; make". - -If you used ./Configure instead of ./config, make sure that you -selected the right target. File formats may differ slightly between -OS versions (for example sparcv8/sparcv9, or a.out/elf). - -In case you get errors about the following symbols, use the config -option "no-asm", as described in INSTALL: - - BF_cbc_encrypt, BF_decrypt, BF_encrypt, CAST_cbc_encrypt, - CAST_decrypt, CAST_encrypt, RC4, RC5_32_cbc_encrypt, RC5_32_decrypt, - RC5_32_encrypt, bn_add_words, bn_div_words, bn_mul_add_words, - bn_mul_comba4, bn_mul_comba8, bn_mul_words, bn_sqr_comba4, - bn_sqr_comba8, bn_sqr_words, bn_sub_words, des_decrypt3, - des_ede3_cbc_encrypt, des_encrypt, des_encrypt2, des_encrypt3, - des_ncbc_encrypt, md5_block_asm_host_order, sha1_block_asm_data_order - -If none of these helps, you may want to try using the current snapshot. -If the problem persists, please submit a bug report. - - -* Why does the OpenSSL test fail with "bc: command not found"? - -You didn't install "bc", the Unix calculator. If you want to run the -tests, get GNU bc from ftp://ftp.gnu.org or from your OS distributor. - - -* Why does the OpenSSL test fail with "bc: 1 no implemented"? - -On some SCO installations or versions, bc has a bug that gets triggered -when you run the test suite (using "make test"). The message returned is -"bc: 1 not implemented". - -The best way to deal with this is to find another implementation of bc -and compile/install it. GNU bc (see -for download instructions) can be safely used, for example. - - -* Why does the OpenSSL test fail with "bc: stack empty"? - -On some DG/ux versions, bc seems to have a too small stack for calculations -that the OpenSSL bntest throws at it. This gets triggered when you run the -test suite (using "make test"). The message returned is "bc: stack empty". - -The best way to deal with this is to find another implementation of bc -and compile/install it. GNU bc (see -for download instructions) can be safely used, for example. - - -* Why does the OpenSSL compilation fail on Alpha Tru64 Unix? - -On some Alpha installations running Tru64 Unix and Compaq C, the compilation -of crypto/sha/sha_dgst.c fails with the message 'Fatal: Insufficient virtual -memory to continue compilation.' As far as the tests have shown, this may be -a compiler bug. What happens is that it eats up a lot of resident memory -to build something, probably a table. The problem is clearly in the -optimization code, because if one eliminates optimization completely (-O0), -the compilation goes through (and the compiler consumes about 2MB of resident -memory instead of 240MB or whatever one's limit is currently). - -There are three options to solve this problem: - -1. set your current data segment size soft limit higher. Experience shows -that about 241000 kbytes seems to be enough on an AlphaServer DS10. You do -this with the command 'ulimit -Sd nnnnnn', where 'nnnnnn' is the number of -kbytes to set the limit to. - -2. If you have a hard limit that is lower than what you need and you can't -get it changed, you can compile all of OpenSSL with -O0 as optimization -level. This is however not a very nice thing to do for those who expect to -get the best result from OpenSSL. A bit more complicated solution is the -following: - ------ snip:start ----- - make DIRS=crypto SDIRS=sha "`grep '^CFLAG=' Makefile.ssl | \ - sed -e 's/ -O[0-9] / -O0 /'`" - rm `ls crypto/*.o crypto/sha/*.o | grep -v 'sha_dgst\.o'` - make ------ snip:end ----- - -This will only compile sha_dgst.c with -O0, the rest with the optimization -level chosen by the configuration process. When the above is done, do the -test and installation and you're set. - -3. Reconfigure the toolkit with no-sha0 option to leave out SHA0. It -should not be used and is not used in SSL/TLS nor any other recognized -protocol in either case. - - -* Why does the OpenSSL compilation fail with "ar: command not found"? - -Getting this message is quite usual on Solaris 2, because Sun has hidden -away 'ar' and other development commands in directories that aren't in -$PATH by default. One of those directories is '/usr/ccs/bin'. The -quickest way to fix this is to do the following (it assumes you use sh -or any sh-compatible shell): - ------ snip:start ----- - PATH=${PATH}:/usr/ccs/bin; export PATH ------ snip:end ----- - -and then redo the compilation. What you should really do is make sure -'/usr/ccs/bin' is permanently in your $PATH, for example through your -'.profile' (again, assuming you use a sh-compatible shell). - - -* Why does the OpenSSL compilation fail on Win32 with VC++? - -Sometimes, you may get reports from VC++ command line (cl) that it -can't find standard include files like stdio.h and other weirdnesses. -One possible cause is that the environment isn't correctly set up. -To solve that problem for VC++ versions up to 6, one should run -VCVARS32.BAT which is found in the 'bin' subdirectory of the VC++ -installation directory (somewhere under 'Program Files'). For VC++ -version 7 (and up?), which is also called VS.NET, the file is called -VSVARS32.BAT instead. -This needs to be done prior to running NMAKE, and the changes are only -valid for the current DOS session. - - -* What is special about OpenSSL on Redhat? - -Red Hat Linux (release 7.0 and later) include a preinstalled limited -version of OpenSSL. For patent reasons, support for IDEA, RC5 and MDC2 -is disabled in this version. The same may apply to other Linux distributions. -Users may therefore wish to install more or all of the features left out. - -To do this you MUST ensure that you do not overwrite the openssl that is in -/usr/bin on your Red Hat machine. Several packages depend on this file, -including sendmail and ssh. /usr/local/bin is a good alternative choice. The -libraries that come with Red Hat 7.0 onwards have different names and so are -not affected. (eg For Red Hat 7.2 they are /lib/libssl.so.0.9.6b and -/lib/libcrypto.so.0.9.6b with symlinks /lib/libssl.so.2 and -/lib/libcrypto.so.2 respectively). - -Please note that we have been advised by Red Hat attempting to recompile the -openssl rpm with all the cryptography enabled will not work. All other -packages depend on the original Red Hat supplied openssl package. It is also -worth noting that due to the way Red Hat supplies its packages, updates to -openssl on each distribution never change the package version, only the -build number. For example, on Red Hat 7.1, the latest openssl package has -version number 0.9.6 and build number 9 even though it contains all the -relevant updates in packages up to and including 0.9.6b. - -A possible way around this is to persuade Red Hat to produce a non-US -version of Red Hat Linux. - -FYI: Patent numbers and expiry dates of US patents: -MDC-2: 4,908,861 13/03/2007 -IDEA: 5,214,703 25/05/2010 -RC5: 5,724,428 03/03/2015 - - -* Why does the OpenSSL compilation fail on MacOS X? - -If the failure happens when trying to build the "openssl" binary, with -a large number of undefined symbols, it's very probable that you have -OpenSSL 0.9.6b delivered with the operating system (you can find out by -running '/usr/bin/openssl version') and that you were trying to build -OpenSSL 0.9.7 or newer. The problem is that the loader ('ld') in -MacOS X has a misfeature that's quite difficult to go around. -Look in the file PROBLEMS for a more detailed explanation and for possible -solutions. - - -* Why does the OpenSSL test suite fail on MacOS X? - -If the failure happens when running 'make test' and the RC4 test fails, -it's very probable that you have OpenSSL 0.9.6b delivered with the -operating system (you can find out by running '/usr/bin/openssl version') -and that you were trying to build OpenSSL 0.9.6d. The problem is that -the loader ('ld') in MacOS X has a misfeature that's quite difficult to -go around and has linked the programs "openssl" and the test programs -with /usr/lib/libcrypto.dylib and /usr/lib/libssl.dylib instead of the -libraries you just built. -Look in the file PROBLEMS for a more detailed explanation and for possible -solutions. - -* Why does the OpenSSL test suite fail in BN_sqr test [on a 64-bit platform]? - -Failure in BN_sqr test is most likely caused by a failure to configure the -toolkit for current platform or lack of support for the platform in question. -Run './config -t' and './apps/openssl version -p'. Do these platform -identifiers match? If they don't, then you most likely failed to run -./config and you're hereby advised to do so before filing a bug report. -If ./config itself fails to run, then it's most likely problem with your -local environment and you should turn to your system administrator (or -similar). If identifiers match (and/or no alternative identifier is -suggested by ./config script), then the platform is unsupported. There might -or might not be a workaround. Most notably on SPARC64 platforms with GNU -C compiler you should be able to produce a working build by running -'./config -m32'. I understand that -m32 might not be what you want/need, -but the build should be operational. For further details turn to -. - -* Why does OpenBSD-i386 build fail on des-586.s with "Unimplemented segment type"? - -As of 0.9.7 assembler routines were overhauled for position independence -of the machine code, which is essential for shared library support. For -some reason OpenBSD is equipped with an out-of-date GNU assembler which -finds the new code offensive. To work around the problem, configure with -no-asm (and sacrifice a great deal of performance) or patch your assembler -according to . -For your convenience a pre-compiled replacement binary is provided at -. -Reportedly elder *BSD a.out platforms also suffer from this problem and -remedy should be same. Provided binary is statically linked and should be -working across wider range of *BSD branches, not just OpenBSD. - -* Why does the OpenSSL test suite fail in sha512t on x86 CPU? - -If the test program in question fails withs SIGILL, Illegal Instruction -exception, then you more than likely to run SSE2-capable CPU, such as -Intel P4, under control of kernel which does not support SSE2 -instruction extentions. See accompanying INSTALL file and -OPENSSL_ia32cap(3) documentation page for further information. - -* Why does compiler fail to compile sha512.c? - -OpenSSL SHA-512 implementation depends on compiler support for 64-bit -integer type. Few elder compilers [ULTRIX cc, SCO compiler to mention a -couple] lack support for this and therefore are incapable of compiling -the module in question. The recommendation is to disable SHA-512 by -adding no-sha512 to ./config [or ./Configure] command line. Another -possible alternative might be to switch to GCC. - -* Test suite still fails, what to do? - -Another common reason for failure to complete some particular test is -simply bad code generated by a buggy component in toolchain or deficiency -in run-time environment. There are few cases documented in PROBLEMS file, -consult it for possible workaround before you beat the drum. Even if you -don't find solution or even mention there, do reserve for possibility of -a compiler bug. Compiler bugs might appear in rather bizarre ways, they -never make sense, and tend to emerge when you least expect them. In order -to identify one, drop optimization level, e.g. by editing CFLAG line in -top-level Makefile, recompile and re-run the test. - -* I think I've found a bug, what should I do? - -If you are a new user then it is quite likely you haven't found a bug and -something is happening you aren't familiar with. Check this FAQ, the associated -documentation and the mailing lists for similar queries. If you are still -unsure whether it is a bug or not submit a query to the openssl-users mailing -list. - - -* I'm SURE I've found a bug, how do I report it? - -Bug reports with no security implications should be sent to the request -tracker. This can be done by mailing the report to (or its -alias ), please note that messages sent to the -request tracker also appear in the public openssl-dev mailing list. - -The report should be in plain text. Any patches should be sent as -plain text attachments because some mailers corrupt patches sent inline. -If your issue affects multiple versions of OpenSSL check any patches apply -cleanly and, if possible include patches to each affected version. - -The report should be given a meaningful subject line briefly summarising the -issue. Just "bug in OpenSSL" or "bug in OpenSSL 0.9.8n" is not very helpful. - -By sending reports to the request tracker the bug can then be given a priority -and assigned to the appropriate maintainer. The history of discussions can be -accessed and if the issue has been addressed or a reason why not. If patches -are only sent to openssl-dev they can be mislaid if a team member has to -wade through months of old messages to review the discussion. - -See also - - -* I've found a security issue, how do I report it? - -If you think your bug has security implications then please send it to -openssl-security@openssl.org if you don't get a prompt reply at least -acknowledging receipt then resend or mail it directly to one of the -more active team members (e.g. Steve). - -Note that bugs only present in the openssl utility are not in general -considered to be security issues. - -[PROG] ======================================================================== - -* Is OpenSSL thread-safe? - -Yes (with limitations: an SSL connection may not concurrently be used -by multiple threads). On Windows and many Unix systems, OpenSSL -automatically uses the multi-threaded versions of the standard -libraries. If your platform is not one of these, consult the INSTALL -file. - -Multi-threaded applications must provide two callback functions to -OpenSSL by calling CRYPTO_set_locking_callback() and -CRYPTO_set_id_callback(), for all versions of OpenSSL up to and -including 0.9.8[abc...]. As of version 1.0.0, CRYPTO_set_id_callback() -and associated APIs are deprecated by CRYPTO_THREADID_set_callback() -and friends. This is described in the threads(3) manpage. - -* I've compiled a program under Windows and it crashes: why? - -This is usually because you've missed the comment in INSTALL.W32. -Your application must link against the same version of the Win32 -C-Runtime against which your openssl libraries were linked. The -default version for OpenSSL is /MD - "Multithreaded DLL". - -If you are using Microsoft Visual C++'s IDE (Visual Studio), in -many cases, your new project most likely defaulted to "Debug -Singlethreaded" - /ML. This is NOT interchangeable with /MD and your -program will crash, typically on the first BIO related read or write -operation. - -For each of the six possible link stage configurations within Win32, -your application must link against the same by which OpenSSL was -built. If you are using MS Visual C++ (Studio) this can be changed -by: - - 1. Select Settings... from the Project Menu. - 2. Select the C/C++ Tab. - 3. Select "Code Generation from the "Category" drop down list box - 4. Select the Appropriate library (see table below) from the "Use - run-time library" drop down list box. Perform this step for both - your debug and release versions of your application (look at the - top left of the settings panel to change between the two) - - Single Threaded /ML - MS VC++ often defaults to - this for the release - version of a new project. - Debug Single Threaded /MLd - MS VC++ often defaults to - this for the debug version - of a new project. - Multithreaded /MT - Debug Multithreaded /MTd - Multithreaded DLL /MD - OpenSSL defaults to this. - Debug Multithreaded DLL /MDd - -Note that debug and release libraries are NOT interchangeable. If you -built OpenSSL with /MD your application must use /MD and cannot use /MDd. - -As per 0.9.8 the above limitation is eliminated for .DLLs. OpenSSL -.DLLs compiled with some specific run-time option [we insist on the -default /MD] can be deployed with application compiled with different -option or even different compiler. But there is a catch! Instead of -re-compiling OpenSSL toolkit, as you would have to with prior versions, -you have to compile small C snippet with compiler and/or options of -your choice. The snippet gets installed as -/include/openssl/applink.c and should be either added to -your application project or simply #include-d in one [and only one] -of your application source files. Failure to link this shim module -into your application manifests itself as fatal "no OPENSSL_Applink" -run-time error. An explicit reminder is due that in this situation -[mixing compiler options] it is as important to add CRYPTO_malloc_init -prior first call to OpenSSL. - -* How do I read or write a DER encoded buffer using the ASN1 functions? - -You have two options. You can either use a memory BIO in conjunction -with the i2d_*_bio() or d2i_*_bio() functions or you can use the -i2d_*(), d2i_*() functions directly. Since these are often the -cause of grief here are some code fragments using PKCS7 as an example: - - unsigned char *buf, *p; - int len; - - len = i2d_PKCS7(p7, NULL); - buf = OPENSSL_malloc(len); /* or Malloc, error checking omitted */ - p = buf; - i2d_PKCS7(p7, &p); - -At this point buf contains the len bytes of the DER encoding of -p7. - -The opposite assumes we already have len bytes in buf: - - unsigned char *p; - p = buf; - p7 = d2i_PKCS7(NULL, &p, len); - -At this point p7 contains a valid PKCS7 structure of NULL if an error -occurred. If an error occurred ERR_print_errors(bio) should give more -information. - -The reason for the temporary variable 'p' is that the ASN1 functions -increment the passed pointer so it is ready to read or write the next -structure. This is often a cause of problems: without the temporary -variable the buffer pointer is changed to point just after the data -that has been read or written. This may well be uninitialized data -and attempts to free the buffer will have unpredictable results -because it no longer points to the same address. - - -* OpenSSL uses DER but I need BER format: does OpenSSL support BER? - -The short answer is yes, because DER is a special case of BER and OpenSSL -ASN1 decoders can process BER. - -The longer answer is that ASN1 structures can be encoded in a number of -different ways. One set of ways is the Basic Encoding Rules (BER) with various -permissible encodings. A restriction of BER is the Distinguished Encoding -Rules (DER): these uniquely specify how a given structure is encoded. - -Therefore, because DER is a special case of BER, DER is an acceptable encoding -for BER. - - -* I've tried using and I get errors why? - -This usually happens when you try compiling something using the PKCS#12 -macros with a C++ compiler. There is hardly ever any need to use the -PKCS#12 macros in a program, it is much easier to parse and create -PKCS#12 files using the PKCS12_parse() and PKCS12_create() functions -documented in doc/openssl.txt and with examples in demos/pkcs12. The -'pkcs12' application has to use the macros because it prints out -debugging information. - - -* I've called and it fails, why? - -Before submitting a report or asking in one of the mailing lists, you -should try to determine the cause. In particular, you should call -ERR_print_errors() or ERR_print_errors_fp() after the failed call -and see if the message helps. Note that the problem may occur earlier -than you think -- you should check for errors after every call where -it is possible, otherwise the actual problem may be hidden because -some OpenSSL functions clear the error state. - - -* I just get a load of numbers for the error output, what do they mean? - -The actual format is described in the ERR_print_errors() manual page. -You should call the function ERR_load_crypto_strings() before hand and -the message will be output in text form. If you can't do this (for example -it is a pre-compiled binary) you can use the errstr utility on the error -code itself (the hex digits after the second colon). - - -* Why do I get errors about unknown algorithms? - -The cause is forgetting to load OpenSSL's table of algorithms with -OpenSSL_add_all_algorithms(). See the manual page for more information. This -can cause several problems such as being unable to read in an encrypted -PEM file, unable to decrypt a PKCS#12 file or signature failure when -verifying certificates. - -* Why can't the OpenSSH configure script detect OpenSSL? - -Several reasons for problems with the automatic detection exist. -OpenSSH requires at least version 0.9.5a of the OpenSSL libraries. -Sometimes the distribution has installed an older version in the system -locations that is detected instead of a new one installed. The OpenSSL -library might have been compiled for another CPU or another mode (32/64 bits). -Permissions might be wrong. - -The general answer is to check the config.log file generated when running -the OpenSSH configure script. It should contain the detailed information -on why the OpenSSL library was not detected or considered incompatible. - - -* Can I use OpenSSL's SSL library with non-blocking I/O? - -Yes; make sure to read the SSL_get_error(3) manual page! - -A pitfall to avoid: Don't assume that SSL_read() will just read from -the underlying transport or that SSL_write() will just write to it -- -it is also possible that SSL_write() cannot do any useful work until -there is data to read, or that SSL_read() cannot do anything until it -is possible to send data. One reason for this is that the peer may -request a new TLS/SSL handshake at any time during the protocol, -requiring a bi-directional message exchange; both SSL_read() and -SSL_write() will try to continue any pending handshake. - - -* Why doesn't my server application receive a client certificate? - -Due to the TLS protocol definition, a client will only send a certificate, -if explicitly asked by the server. Use the SSL_VERIFY_PEER flag of the -SSL_CTX_set_verify() function to enable the use of client certificates. - - -* Why does compilation fail due to an undefined symbol NID_uniqueIdentifier? - -For OpenSSL 0.9.7 the OID table was extended and corrected. In earlier -versions, uniqueIdentifier was incorrectly used for X.509 certificates. -The correct name according to RFC2256 (LDAP) is x500UniqueIdentifier. -Change your code to use the new name when compiling against OpenSSL 0.9.7. - - -* I think I've detected a memory leak, is this a bug? *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@freebsd.org Thu Jan 4 01:21:25 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id EB8F8EBA1E5; Thu, 4 Jan 2018 01:21:25 +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 9C3FB70149; Thu, 4 Jan 2018 01:21:25 +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 w041LOXU075077; Thu, 4 Jan 2018 01:21:24 GMT (envelope-from jkim@FreeBSD.org) Received: (from jkim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w041LOUA075068; Thu, 4 Jan 2018 01:21:24 GMT (envelope-from jkim@FreeBSD.org) Message-Id: <201801040121.w041LOUA075068@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jkim set sender to jkim@FreeBSD.org using -f From: Jung-uk Kim Date: Thu, 4 Jan 2018 01:21:24 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org Subject: svn commit: r327537 - in stable/8/crypto/openssl: crypto/asn1 crypto/bio crypto/bn crypto/dsa crypto/evp crypto/mdc2 crypto/x509 doc/apps ssl X-SVN-Group: stable-8 X-SVN-Commit-Author: jkim X-SVN-Commit-Paths: in stable/8/crypto/openssl: crypto/asn1 crypto/bio crypto/bn crypto/dsa crypto/evp crypto/mdc2 crypto/x509 doc/apps ssl X-SVN-Commit-Revision: 327537 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 04 Jan 2018 01:21:26 -0000 Author: jkim Date: Thu Jan 4 01:21:24 2018 New Revision: 327537 URL: https://svnweb.freebsd.org/changeset/base/327537 Log: MFS: r295060, r296462, r296597-296598, r299053, r306229, r306335, r308200 Sync. OpenSSL with stable/9. r295060 (delphij): Fix OpenSSL SSLv2 ciphersuite downgrade vulnerability. [SA-16:11] r296462, r296597-296598 (delphij): Fix multiple OpenSSL vulnerabilities. [SA-16:12] r299053 (delphij): Fix several OpenSSL vulnerabilities. [SA-16:17] r306229, r306335 (delphij): Fix multiple OpenSSL vulnerabilities. [SA-16:26] r308200 (delphij): Fix OpenSSL remote DoS vulnerability. [SA-16:35] Requested by: danfe Modified: stable/8/crypto/openssl/crypto/asn1/a_type.c stable/8/crypto/openssl/crypto/asn1/tasn_dec.c stable/8/crypto/openssl/crypto/asn1/tasn_enc.c stable/8/crypto/openssl/crypto/bio/b_print.c stable/8/crypto/openssl/crypto/bn/bn.h stable/8/crypto/openssl/crypto/bn/bn_exp.c stable/8/crypto/openssl/crypto/bn/bn_print.c stable/8/crypto/openssl/crypto/dsa/dsa_ossl.c stable/8/crypto/openssl/crypto/evp/encode.c stable/8/crypto/openssl/crypto/evp/evp_enc.c stable/8/crypto/openssl/crypto/mdc2/mdc2dgst.c stable/8/crypto/openssl/crypto/x509/x509_obj.c stable/8/crypto/openssl/doc/apps/ciphers.pod stable/8/crypto/openssl/ssl/d1_both.c stable/8/crypto/openssl/ssl/d1_clnt.c stable/8/crypto/openssl/ssl/d1_lib.c stable/8/crypto/openssl/ssl/d1_pkt.c stable/8/crypto/openssl/ssl/d1_srvr.c stable/8/crypto/openssl/ssl/s2_lib.c stable/8/crypto/openssl/ssl/s2_srvr.c stable/8/crypto/openssl/ssl/s3_clnt.c stable/8/crypto/openssl/ssl/s3_pkt.c stable/8/crypto/openssl/ssl/s3_srvr.c stable/8/crypto/openssl/ssl/ssl.h stable/8/crypto/openssl/ssl/ssl3.h stable/8/crypto/openssl/ssl/ssl_err.c stable/8/crypto/openssl/ssl/ssl_lib.c stable/8/crypto/openssl/ssl/ssl_locl.h stable/8/crypto/openssl/ssl/ssl_sess.c stable/8/crypto/openssl/ssl/t1_lib.c Modified: stable/8/crypto/openssl/crypto/asn1/a_type.c ============================================================================== --- stable/8/crypto/openssl/crypto/asn1/a_type.c Thu Jan 4 00:58:30 2018 (r327536) +++ stable/8/crypto/openssl/crypto/asn1/a_type.c Thu Jan 4 01:21:24 2018 (r327537) @@ -123,9 +123,7 @@ int ASN1_TYPE_cmp(const ASN1_TYPE *a, const ASN1_TYPE result = 0; /* They do not have content. */ break; case V_ASN1_INTEGER: - case V_ASN1_NEG_INTEGER: case V_ASN1_ENUMERATED: - case V_ASN1_NEG_ENUMERATED: case V_ASN1_BIT_STRING: case V_ASN1_OCTET_STRING: case V_ASN1_SEQUENCE: Modified: stable/8/crypto/openssl/crypto/asn1/tasn_dec.c ============================================================================== --- stable/8/crypto/openssl/crypto/asn1/tasn_dec.c Thu Jan 4 00:58:30 2018 (r327536) +++ stable/8/crypto/openssl/crypto/asn1/tasn_dec.c Thu Jan 4 01:21:24 2018 (r327537) @@ -901,9 +901,7 @@ int asn1_ex_c2i(ASN1_VALUE **pval, const unsigned char break; case V_ASN1_INTEGER: - case V_ASN1_NEG_INTEGER: case V_ASN1_ENUMERATED: - case V_ASN1_NEG_ENUMERATED: tint = (ASN1_INTEGER **)pval; if (!c2i_ASN1_INTEGER(tint, &cont, len)) goto err; Modified: stable/8/crypto/openssl/crypto/asn1/tasn_enc.c ============================================================================== --- stable/8/crypto/openssl/crypto/asn1/tasn_enc.c Thu Jan 4 00:58:30 2018 (r327536) +++ stable/8/crypto/openssl/crypto/asn1/tasn_enc.c Thu Jan 4 01:21:24 2018 (r327537) @@ -610,9 +610,7 @@ int asn1_ex_i2c(ASN1_VALUE **pval, unsigned char *cout break; case V_ASN1_INTEGER: - case V_ASN1_NEG_INTEGER: case V_ASN1_ENUMERATED: - case V_ASN1_NEG_ENUMERATED: /* * These are all have the same content format as ASN1_INTEGER */ Modified: stable/8/crypto/openssl/crypto/bio/b_print.c ============================================================================== --- stable/8/crypto/openssl/crypto/bio/b_print.c Thu Jan 4 00:58:30 2018 (r327536) +++ stable/8/crypto/openssl/crypto/bio/b_print.c Thu Jan 4 01:21:24 2018 (r327537) @@ -122,20 +122,20 @@ # define LLONG long long # endif #else -# define LLONG long -#endif - -static void fmtstr(char **, char **, size_t *, size_t *, - const char *, int, int, int); -static void fmtint(char **, char **, size_t *, size_t *, - LLONG, int, int, int, int); -static void fmtfp(char **, char **, size_t *, size_t *, - LDOUBLE, int, int, int); -static void doapr_outch(char **, char **, size_t *, size_t *, int); -static void _dopr(char **sbuffer, char **buffer, - size_t *maxlen, size_t *retlen, int *truncated, - const char *format, va_list args); - +# define LLONG long +#endif + +static int fmtstr(char **, char **, size_t *, size_t *, + const char *, int, int, int); +static int fmtint(char **, char **, size_t *, size_t *, + LLONG, int, int, int, int); +static int fmtfp(char **, char **, size_t *, size_t *, + LDOUBLE, int, int, int); +static int doapr_outch(char **, char **, size_t *, size_t *, int); +static int _dopr(char **sbuffer, char **buffer, + size_t *maxlen, size_t *retlen, int *truncated, + const char *format, va_list args); + /* format read states */ #define DP_S_DEFAULT 0 #define DP_S_FLAGS 1 @@ -162,13 +162,13 @@ static void _dopr(char **sbuffer, char **buffer, #define DP_C_LLONG 4 /* some handy macros */ -#define char_to_int(p) (p - '0') -#define OSSL_MAX(p,q) ((p >= q) ? p : q) - -static void -_dopr(char **sbuffer, - char **buffer, - size_t *maxlen, +#define char_to_int(p) (p - '0') +#define OSSL_MAX(p,q) ((p >= q) ? p : q) + +static int +_dopr(char **sbuffer, + char **buffer, + size_t *maxlen, size_t *retlen, int *truncated, const char *format, va_list args) { char ch; @@ -193,13 +193,14 @@ _dopr(char **sbuffer, switch (state) { case DP_S_DEFAULT: - if (ch == '%') - state = DP_S_FLAGS; - else - doapr_outch(sbuffer, buffer, &currlen, maxlen, ch); - ch = *format++; - break; - case DP_S_FLAGS: + if (ch == '%') + state = DP_S_FLAGS; + else + if(!doapr_outch(sbuffer, buffer, &currlen, maxlen, ch)) + return 0; + ch = *format++; + break; + case DP_S_FLAGS: switch (ch) { case '-': flags |= DP_F_MINUS; @@ -299,14 +300,15 @@ _dopr(char **sbuffer, value = va_arg(args, LLONG); break; default: - value = va_arg(args, int); - break; - } - fmtint(sbuffer, buffer, &currlen, maxlen, - value, 10, min, max, flags); - break; - case 'X': - flags |= DP_F_UP; + value = va_arg(args, int); + break; + } + if (!fmtint(sbuffer, buffer, &currlen, maxlen, value, 10, min, + max, flags)) + return 0; + break; + case 'X': + flags |= DP_F_UP; /* FALLTHROUGH */ case 'x': case 'o': @@ -323,23 +325,25 @@ _dopr(char **sbuffer, value = va_arg(args, unsigned LLONG); break; default: - value = (LLONG) va_arg(args, unsigned int); - break; - } - fmtint(sbuffer, buffer, &currlen, maxlen, value, - ch == 'o' ? 8 : (ch == 'u' ? 10 : 16), - min, max, flags); - break; - case 'f': - if (cflags == DP_C_LDOUBLE) - fvalue = va_arg(args, LDOUBLE); - else - fvalue = va_arg(args, double); - fmtfp(sbuffer, buffer, &currlen, maxlen, - fvalue, min, max, flags); - break; - case 'E': - flags |= DP_F_UP; + value = (LLONG) va_arg(args, unsigned int); + break; + } + if (!fmtint(sbuffer, buffer, &currlen, maxlen, value, + ch == 'o' ? 8 : (ch == 'u' ? 10 : 16), + min, max, flags)) + return 0; + break; + case 'f': + if (cflags == DP_C_LDOUBLE) + fvalue = va_arg(args, LDOUBLE); + else + fvalue = va_arg(args, double); + if (!fmtfp(sbuffer, buffer, &currlen, maxlen, fvalue, min, max, + flags)) + return 0; + break; + case 'E': + flags |= DP_F_UP; case 'e': if (cflags == DP_C_LDOUBLE) fvalue = va_arg(args, LDOUBLE); @@ -352,30 +356,33 @@ _dopr(char **sbuffer, if (cflags == DP_C_LDOUBLE) fvalue = va_arg(args, LDOUBLE); else - fvalue = va_arg(args, double); - break; - case 'c': - doapr_outch(sbuffer, buffer, &currlen, maxlen, - va_arg(args, int)); - break; - case 's': - strvalue = va_arg(args, char *); + fvalue = va_arg(args, double); + break; + case 'c': + if(!doapr_outch(sbuffer, buffer, &currlen, maxlen, + va_arg(args, int))) + return 0; + break; + case 's': + strvalue = va_arg(args, char *); if (max < 0) { if (buffer) max = INT_MAX; - else - max = *maxlen; - } - fmtstr(sbuffer, buffer, &currlen, maxlen, strvalue, - flags, min, max); - break; - case 'p': - value = (long)va_arg(args, void *); - fmtint(sbuffer, buffer, &currlen, maxlen, - value, 16, min, max, flags | DP_F_NUM); - break; - case 'n': /* XXX */ - if (cflags == DP_C_SHORT) { + else + max = *maxlen; + } + if (!fmtstr(sbuffer, buffer, &currlen, maxlen, strvalue, + flags, min, max)) + return 0; + break; + case 'p': + value = (long)va_arg(args, void *); + if (!fmtint(sbuffer, buffer, &currlen, maxlen, + value, 16, min, max, flags | DP_F_NUM)) + return 0; + break; + case 'n': /* XXX */ + if (cflags == DP_C_SHORT) { short int *num; num = va_arg(args, short int *); *num = currlen; @@ -391,13 +398,14 @@ _dopr(char **sbuffer, int *num; num = va_arg(args, int *); *num = currlen; - } - break; - case '%': - doapr_outch(sbuffer, buffer, &currlen, maxlen, ch); - break; - case 'w': - /* not supported yet, treat as next char */ + } + break; + case '%': + if(!doapr_outch(sbuffer, buffer, &currlen, maxlen, ch)) + return 0; + break; + case 'w': + /* not supported yet, treat as next char */ ch = *format++; break; default: @@ -415,52 +423,62 @@ _dopr(char **sbuffer, break; } } - *truncated = (currlen > *maxlen - 1); - if (*truncated) - currlen = *maxlen - 1; - doapr_outch(sbuffer, buffer, &currlen, maxlen, '\0'); - *retlen = currlen - 1; - return; -} - -static void -fmtstr(char **sbuffer, - char **buffer, - size_t *currlen, - size_t *maxlen, const char *value, int flags, int min, int max) -{ - int padlen, strln; - int cnt = 0; - - if (value == 0) - value = ""; - for (strln = 0; value[strln]; ++strln) ; - padlen = min - strln; - if (padlen < 0) - padlen = 0; - if (flags & DP_F_MINUS) - padlen = -padlen; - - while ((padlen > 0) && (cnt < max)) { - doapr_outch(sbuffer, buffer, currlen, maxlen, ' '); - --padlen; - ++cnt; - } - while (*value && (cnt < max)) { - doapr_outch(sbuffer, buffer, currlen, maxlen, *value++); - ++cnt; - } - while ((padlen < 0) && (cnt < max)) { - doapr_outch(sbuffer, buffer, currlen, maxlen, ' '); - ++padlen; - ++cnt; - } -} - -static void -fmtint(char **sbuffer, - char **buffer, - size_t *currlen, + *truncated = (currlen > *maxlen - 1); + if (*truncated) + currlen = *maxlen - 1; + if(!doapr_outch(sbuffer, buffer, &currlen, maxlen, '\0')) + return 0; + *retlen = currlen - 1; + return 1; +} + +static int +fmtstr(char **sbuffer, + char **buffer, + size_t *currlen, + size_t *maxlen, const char *value, int flags, int min, int max) +{ + int padlen; + size_t strln; + int cnt = 0; + + if (value == 0) + value = ""; + + strln = strlen(value); + if (strln > INT_MAX) + strln = INT_MAX; + + padlen = min - strln; + if (min < 0 || padlen < 0) + padlen = 0; + if (flags & DP_F_MINUS) + padlen = -padlen; + + while ((padlen > 0) && (cnt < max)) { + if(!doapr_outch(sbuffer, buffer, currlen, maxlen, ' ')) + return 0; + --padlen; + ++cnt; + } + while (*value && (cnt < max)) { + if(!doapr_outch(sbuffer, buffer, currlen, maxlen, *value++)) + return 0; + ++cnt; + } + while ((padlen < 0) && (cnt < max)) { + if(!doapr_outch(sbuffer, buffer, currlen, maxlen, ' ')) + return 0; + ++padlen; + ++cnt; + } + return 1; +} + +static int +fmtint(char **sbuffer, + char **buffer, + size_t *currlen, size_t *maxlen, LLONG value, int base, int min, int max, int flags) { int signvalue = 0; @@ -514,43 +532,50 @@ fmtint(char **sbuffer, } if (flags & DP_F_MINUS) spadlen = -spadlen; - - /* spaces */ - while (spadlen > 0) { - doapr_outch(sbuffer, buffer, currlen, maxlen, ' '); - --spadlen; - } - - /* sign */ - if (signvalue) - doapr_outch(sbuffer, buffer, currlen, maxlen, signvalue); - - /* prefix */ - while (*prefix) { - doapr_outch(sbuffer, buffer, currlen, maxlen, *prefix); - prefix++; - } - - /* zeros */ - if (zpadlen > 0) { - while (zpadlen > 0) { - doapr_outch(sbuffer, buffer, currlen, maxlen, '0'); - --zpadlen; - } - } - /* digits */ - while (place > 0) - doapr_outch(sbuffer, buffer, currlen, maxlen, convert[--place]); - - /* left justified spaces */ - while (spadlen < 0) { - doapr_outch(sbuffer, buffer, currlen, maxlen, ' '); - ++spadlen; - } - return; -} - -static LDOUBLE abs_val(LDOUBLE value) + + /* spaces */ + while (spadlen > 0) { + if(!doapr_outch(sbuffer, buffer, currlen, maxlen, ' ')) + return 0; + --spadlen; + } + + /* sign */ + if (signvalue) + if(!doapr_outch(sbuffer, buffer, currlen, maxlen, signvalue)) + return 0; + + /* prefix */ + while (*prefix) { + if(!doapr_outch(sbuffer, buffer, currlen, maxlen, *prefix)) + return 0; + prefix++; + } + + /* zeros */ + if (zpadlen > 0) { + while (zpadlen > 0) { + if(!doapr_outch(sbuffer, buffer, currlen, maxlen, '0')) + return 0; + --zpadlen; + } + } + /* digits */ + while (place > 0) { + if (!doapr_outch(sbuffer, buffer, currlen, maxlen, convert[--place])) + return 0; + } + + /* left justified spaces */ + while (spadlen < 0) { + if (!doapr_outch(sbuffer, buffer, currlen, maxlen, ' ')) + return 0; + ++spadlen; + } + return 1; +} + +static LDOUBLE abs_val(LDOUBLE value) { LDOUBLE result = value; if (value < 0) @@ -575,13 +600,13 @@ static long roundv(LDOUBLE value) value = value - intpart; if (value >= 0.5) intpart++; - return intpart; -} - -static void -fmtfp(char **sbuffer, - char **buffer, - size_t *currlen, + return intpart; +} + +static int +fmtfp(char **sbuffer, + char **buffer, + size_t *currlen, size_t *maxlen, LDOUBLE fvalue, int min, int max, int flags) { int signvalue = 0; @@ -657,88 +682,108 @@ fmtfp(char **sbuffer, padlen = 0; if (flags & DP_F_MINUS) padlen = -padlen; - - if ((flags & DP_F_ZERO) && (padlen > 0)) { - if (signvalue) { - doapr_outch(sbuffer, buffer, currlen, maxlen, signvalue); - --padlen; - signvalue = 0; - } - while (padlen > 0) { - doapr_outch(sbuffer, buffer, currlen, maxlen, '0'); - --padlen; - } - } - while (padlen > 0) { - doapr_outch(sbuffer, buffer, currlen, maxlen, ' '); - --padlen; - } - if (signvalue) - doapr_outch(sbuffer, buffer, currlen, maxlen, signvalue); - - while (iplace > 0) - doapr_outch(sbuffer, buffer, currlen, maxlen, iconvert[--iplace]); - - /* - * Decimal point. This should probably use locale to find the correct - * char to print out. - */ - if (max > 0 || (flags & DP_F_NUM)) { - doapr_outch(sbuffer, buffer, currlen, maxlen, '.'); - - while (fplace > 0) - doapr_outch(sbuffer, buffer, currlen, maxlen, fconvert[--fplace]); - } - while (zpadlen > 0) { - doapr_outch(sbuffer, buffer, currlen, maxlen, '0'); - --zpadlen; - } - - while (padlen < 0) { - doapr_outch(sbuffer, buffer, currlen, maxlen, ' '); - ++padlen; - } -} - -static void -doapr_outch(char **sbuffer, - char **buffer, size_t *currlen, size_t *maxlen, int c) -{ - /* If we haven't at least one buffer, someone has doe a big booboo */ - assert(*sbuffer != NULL || buffer != NULL); - - if (buffer) { - while (*currlen >= *maxlen) { - if (*buffer == NULL) { - if (*maxlen == 0) - *maxlen = 1024; - *buffer = OPENSSL_malloc(*maxlen); - if (*currlen > 0) { - assert(*sbuffer != NULL); - memcpy(*buffer, *sbuffer, *currlen); - } - *sbuffer = NULL; - } else { - *maxlen += 1024; - *buffer = OPENSSL_realloc(*buffer, *maxlen); - } - } - /* What to do if *buffer is NULL? */ - assert(*sbuffer != NULL || *buffer != NULL); - } - - if (*currlen < *maxlen) { - if (*sbuffer) + + if ((flags & DP_F_ZERO) && (padlen > 0)) { + if (signvalue) { + if (!doapr_outch(sbuffer, buffer, currlen, maxlen, signvalue)) + return 0; + --padlen; + signvalue = 0; + } + while (padlen > 0) { + if (!doapr_outch(sbuffer, buffer, currlen, maxlen, '0')) + return 0; + --padlen; + } + } + while (padlen > 0) { + if (!doapr_outch(sbuffer, buffer, currlen, maxlen, ' ')) + return 0; + --padlen; + } + if (signvalue && !doapr_outch(sbuffer, buffer, currlen, maxlen, signvalue)) + return 0; + + while (iplace > 0) { + if (!doapr_outch(sbuffer, buffer, currlen, maxlen, iconvert[--iplace])) + return 0; + } + + /* + * Decimal point. This should probably use locale to find the correct + * char to print out. + */ + if (max > 0 || (flags & DP_F_NUM)) { + if (!doapr_outch(sbuffer, buffer, currlen, maxlen, '.')) + return 0; + + while (fplace > 0) { + if(!doapr_outch(sbuffer, buffer, currlen, maxlen, + fconvert[--fplace])) + return 0; + } + } + while (zpadlen > 0) { + if (!doapr_outch(sbuffer, buffer, currlen, maxlen, '0')) + return 0; + --zpadlen; + } + + while (padlen < 0) { + if (!doapr_outch(sbuffer, buffer, currlen, maxlen, ' ')) + return 0; + ++padlen; + } + return 1; +} + +#define BUFFER_INC 1024 + +static int +doapr_outch(char **sbuffer, + char **buffer, size_t *currlen, size_t *maxlen, int c) +{ + /* If we haven't at least one buffer, someone has doe a big booboo */ + assert(*sbuffer != NULL || buffer != NULL); + + /* |currlen| must always be <= |*maxlen| */ + assert(*currlen <= *maxlen); + + if (buffer && *currlen == *maxlen) { + if (*maxlen > INT_MAX - BUFFER_INC) + return 0; + + *maxlen += BUFFER_INC; + if (*buffer == NULL) { + *buffer = OPENSSL_malloc(*maxlen); + if (*buffer == NULL) + return 0; + if (*currlen > 0) { + assert(*sbuffer != NULL); + memcpy(*buffer, *sbuffer, *currlen); + } + *sbuffer = NULL; + } else { + char *tmpbuf; + tmpbuf = OPENSSL_realloc(*buffer, *maxlen); + if (tmpbuf == NULL) + return 0; + *buffer = tmpbuf; + } + } + + if (*currlen < *maxlen) { + if (*sbuffer) (*sbuffer)[(*currlen)++] = (char)c; else - (*buffer)[(*currlen)++] = (char)c; - } + (*buffer)[(*currlen)++] = (char)c; + } + + return 1; +} + +/***************************************************************************/ - return; -} - -/***************************************************************************/ - int BIO_printf(BIO *bio, const char *format, ...) { va_list args; @@ -763,13 +808,17 @@ int BIO_vprintf(BIO *bio, const char *format, va_list size_t hugebufsize = sizeof(hugebuf); char *dynbuf = NULL; int ignored; - - dynbuf = NULL; - CRYPTO_push_info("doapr()"); - _dopr(&hugebufp, &dynbuf, &hugebufsize, &retlen, &ignored, format, args); - if (dynbuf) { - ret = BIO_write(bio, dynbuf, (int)retlen); - OPENSSL_free(dynbuf); + + dynbuf = NULL; + CRYPTO_push_info("doapr()"); + if (!_dopr(&hugebufp, &dynbuf, &hugebufsize, &retlen, &ignored, format, + args)) { + OPENSSL_free(dynbuf); + return -1; + } + if (dynbuf) { + ret = BIO_write(bio, dynbuf, (int)retlen); + OPENSSL_free(dynbuf); } else { ret = BIO_write(bio, hugebuf, (int)retlen); } @@ -798,13 +847,14 @@ int BIO_snprintf(char *buf, size_t n, const char *form int BIO_vsnprintf(char *buf, size_t n, const char *format, va_list args) { - size_t retlen; - int truncated; - - _dopr(&buf, NULL, &n, &retlen, &truncated, format, args); - - if (truncated) - /* + size_t retlen; + int truncated; + + if(!_dopr(&buf, NULL, &n, &retlen, &truncated, format, args)) + return -1; + + if (truncated) + /* * In case of truncation, return -1 like traditional snprintf. * (Current drafts for ISO/IEC 9899 say snprintf should return the * number of characters that would have been written, had the buffer Modified: stable/8/crypto/openssl/crypto/bn/bn.h ============================================================================== --- stable/8/crypto/openssl/crypto/bn/bn.h Thu Jan 4 00:58:30 2018 (r327536) +++ stable/8/crypto/openssl/crypto/bn/bn.h Thu Jan 4 01:21:24 2018 (r327537) @@ -69,12 +69,13 @@ * */ -#ifndef HEADER_BN_H -# define HEADER_BN_H - -# include -# ifndef OPENSSL_NO_FP_API -# include /* FILE */ +#ifndef HEADER_BN_H +# define HEADER_BN_H + +# include +# include +# ifndef OPENSSL_NO_FP_API +# include /* FILE */ # endif # include @@ -701,14 +702,23 @@ const BIGNUM *BN_get0_nist_prime_224(void); const BIGNUM *BN_get0_nist_prime_256(void); const BIGNUM *BN_get0_nist_prime_384(void); const BIGNUM *BN_get0_nist_prime_521(void); - -/* library internal functions */ - -# define bn_expand(a,bits) ((((((bits+BN_BITS2-1))/BN_BITS2)) <= (a)->dmax)?\ - (a):bn_expand2((a),(bits+BN_BITS2-1)/BN_BITS2)) -# define bn_wexpand(a,words) (((words) <= (a)->dmax)?(a):bn_expand2((a),(words))) -BIGNUM *bn_expand2(BIGNUM *a, int words); -# ifndef OPENSSL_NO_DEPRECATED + +/* library internal functions */ + +# define bn_expand(a,bits) \ + ( \ + bits > (INT_MAX - BN_BITS2 + 1) ? \ + NULL \ + : \ + (((bits+BN_BITS2-1)/BN_BITS2) <= (a)->dmax) ? \ + (a) \ + : \ + bn_expand2((a),(bits+BN_BITS2-1)/BN_BITS2) \ + ) + +# define bn_wexpand(a,words) (((words) <= (a)->dmax)?(a):bn_expand2((a),(words))) +BIGNUM *bn_expand2(BIGNUM *a, int words); +# ifndef OPENSSL_NO_DEPRECATED BIGNUM *bn_dup_expand(const BIGNUM *a, int words); /* unused */ # endif Modified: stable/8/crypto/openssl/crypto/bn/bn_exp.c ============================================================================== --- stable/8/crypto/openssl/crypto/bn/bn_exp.c Thu Jan 4 00:58:30 2018 (r327536) +++ stable/8/crypto/openssl/crypto/bn/bn_exp.c Thu Jan 4 01:21:24 2018 (r327537) @@ -110,6 +110,7 @@ */ #include "cryptlib.h" +#include "constant_time_locl.h" #include "bn_lcl.h" /* maximum precomputation table size for *variable* sliding windows */ @@ -523,9 +524,11 @@ int BN_mod_exp_mont(BIGNUM *rr, const BIGNUM *a, const static int MOD_EXP_CTIME_COPY_TO_PREBUF(BIGNUM *b, int top, unsigned char *buf, int idx, - int width) + int window) { - size_t i, j; + int i, j; + int width = 1 << window; + BN_ULONG *table = (BN_ULONG *)buf; if (bn_wexpand(b, top) == NULL) return 0; @@ -533,8 +536,8 @@ static int MOD_EXP_CTIME_COPY_TO_PREBUF(BIGNUM *b, int b->d[b->top++] = 0; } - for (i = 0, j = idx; i < top * sizeof b->d[0]; i++, j += width) { - buf[j] = ((unsigned char *)b->d)[i]; + for (i = 0, j = idx; i < top; i++, j += width) { + table[j] = b->d[i]; } bn_correct_top(b); @@ -543,15 +546,51 @@ static int MOD_EXP_CTIME_COPY_TO_PREBUF(BIGNUM *b, int static int MOD_EXP_CTIME_COPY_FROM_PREBUF(BIGNUM *b, int top, unsigned char *buf, int idx, - int width) + int window) { - size_t i, j; + int i, j; + int width = 1 << window; + volatile BN_ULONG *table = (volatile BN_ULONG *)buf; if (bn_wexpand(b, top) == NULL) return 0; - for (i = 0, j = idx; i < top * sizeof b->d[0]; i++, j += width) { - ((unsigned char *)b->d)[i] = buf[j]; + if (window <= 3) { + for (i = 0; i < top; i++, table += width) { + BN_ULONG acc = 0; + + for (j = 0; j < width; j++) { + acc |= table[j] & + ((BN_ULONG)0 - (constant_time_eq_int(j,idx)&1)); + } + + b->d[i] = acc; + } + } else { + int xstride = 1 << (window - 2); + BN_ULONG y0, y1, y2, y3; + + i = idx >> (window - 2); /* equivalent of idx / xstride */ + idx &= xstride - 1; /* equivalent of idx % xstride */ + + y0 = (BN_ULONG)0 - (constant_time_eq_int(i,0)&1); + y1 = (BN_ULONG)0 - (constant_time_eq_int(i,1)&1); + y2 = (BN_ULONG)0 - (constant_time_eq_int(i,2)&1); + y3 = (BN_ULONG)0 - (constant_time_eq_int(i,3)&1); + + for (i = 0; i < top; i++, table += width) { + BN_ULONG acc = 0; + + for (j = 0; j < xstride; j++) { + acc |= ( (table[j + 0 * xstride] & y0) | + (table[j + 1 * xstride] & y1) | + (table[j + 2 * xstride] & y2) | + (table[j + 3 * xstride] & y3) ) + & ((BN_ULONG)0 - (constant_time_eq_int(j,idx)&1)); + } + + b->d[i] = acc; + } } b->top = top; @@ -648,7 +687,7 @@ int BN_mod_exp_mont_consttime(BIGNUM *rr, const BIGNUM */ if (!BN_to_montgomery(r, BN_value_one(), mont, ctx)) goto err; - if (!MOD_EXP_CTIME_COPY_TO_PREBUF(r, top, powerbuf, 0, numPowers)) + if (!MOD_EXP_CTIME_COPY_TO_PREBUF(r, top, powerbuf, 0, window)) goto err; /* Initialize computeTemp as a^1 with montgomery precalcs */ @@ -667,7 +706,7 @@ int BN_mod_exp_mont_consttime(BIGNUM *rr, const BIGNUM goto err; if (!BN_copy(computeTemp, am)) goto err; - if (!MOD_EXP_CTIME_COPY_TO_PREBUF(am, top, powerbuf, 1, numPowers)) + if (!MOD_EXP_CTIME_COPY_TO_PREBUF(am, top, powerbuf, 1, window)) goto err; /* @@ -682,8 +721,8 @@ int BN_mod_exp_mont_consttime(BIGNUM *rr, const BIGNUM if (!BN_mod_mul_montgomery (computeTemp, am, computeTemp, mont, ctx)) goto err; - if (!MOD_EXP_CTIME_COPY_TO_PREBUF - (computeTemp, top, powerbuf, i, numPowers)) + if (!MOD_EXP_CTIME_COPY_TO_PREBUF(computeTemp, top, powerbuf, i, + window)) goto err; } } @@ -719,7 +758,7 @@ int BN_mod_exp_mont_consttime(BIGNUM *rr, const BIGNUM * Fetch the appropriate pre-computed value from the pre-buf */ if (!MOD_EXP_CTIME_COPY_FROM_PREBUF - (computeTemp, top, powerbuf, wvalue, numPowers)) + (computeTemp, top, powerbuf, wvalue, window)) goto err; /* Multiply the result into the intermediate result */ Modified: stable/8/crypto/openssl/crypto/bn/bn_print.c ============================================================================== --- stable/8/crypto/openssl/crypto/bn/bn_print.c Thu Jan 4 00:58:30 2018 (r327536) +++ stable/8/crypto/openssl/crypto/bn/bn_print.c Thu Jan 4 01:21:24 2018 (r327537) @@ -55,13 +55,14 @@ * copied and put under another distribution licence * [including the GNU Public Licence.] */ + +#include +#include +#include +#include "cryptlib.h" +#include +#include "bn_lcl.h" -#include -#include -#include "cryptlib.h" -#include -#include "bn_lcl.h" - static const char Hex[] = "0123456789ABCDEF"; /* Must 'OPENSSL_free' the returned data */ @@ -110,6 +111,7 @@ char *BN_bn2dec(const BIGNUM *a) char *p; BIGNUM *t = NULL; BN_ULONG *bn_data = NULL, *lp; + int bn_data_num; /*- * get an upper bound for the length of the decimal integer @@ -119,8 +121,8 @@ char *BN_bn2dec(const BIGNUM *a) */ i = BN_num_bits(a) * 3; num = (i / 10 + i / 1000 + 1) + 1; - bn_data = - (BN_ULONG *)OPENSSL_malloc((num / BN_DEC_NUM + 1) * sizeof(BN_ULONG)); + bn_data_num = num / BN_DEC_NUM + 1; + bn_data = OPENSSL_malloc(bn_data_num * sizeof(BN_ULONG)); buf = (char *)OPENSSL_malloc(num + 3); if ((buf == NULL) || (bn_data == NULL)) { BNerr(BN_F_BN_BN2DEC, ERR_R_MALLOC_FAILURE); @@ -139,9 +141,12 @@ char *BN_bn2dec(const BIGNUM *a) if (BN_is_negative(t)) *p++ = '-'; - i = 0; while (!BN_is_zero(t)) { + if (lp - bn_data >= bn_data_num) + goto err; *lp = BN_div_word(t, BN_DEC_CONV); + if (*lp == (BN_ULONG)-1) + goto err; lp++; } lp--; @@ -186,28 +191,32 @@ int BN_hex2bn(BIGNUM **bn, const char *a) if (*a == '-') { neg = 1; - a++; - } + a++; + } + + for (i = 0; i <= (INT_MAX/4) && isxdigit((unsigned char)a[i]); i++) + continue; + + if (i > INT_MAX/4) + goto err; + + num = i + neg; + if (bn == NULL) + return (num); - for (i = 0; isxdigit((unsigned char)a[i]); i++) ; - - num = i + neg; - if (bn == NULL) - return (num); - /* a is the start of the hex digits, and it is 'i' long */ if (*bn == NULL) { if ((ret = BN_new()) == NULL) return (0); } else { ret = *bn; - BN_zero(ret); - } - - /* i is the number of hex digests; */ - if (bn_expand(ret, i * 4) == NULL) - goto err; - + BN_zero(ret); + } + + /* i is the number of hex digits */ + if (bn_expand(ret, i * 4) == NULL) + goto err; + j = i; /* least significant 'hex' */ m = 0; h = 0; *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@freebsd.org Thu Jan 4 03:16:33 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 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-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" 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-all@freebsd.org Thu Jan 4 04:04:30 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 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-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" 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-all@freebsd.org Thu Jan 4 04:11:41 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 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-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" 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-all@freebsd.org Thu Jan 4 08:07:34 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 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-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" 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-all@freebsd.org Thu Jan 4 08:23:25 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 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-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" 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-all@freebsd.org Thu Jan 4 09:46:55 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 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-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" 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-all@freebsd.org Thu Jan 4 10:00:47 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 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-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" 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-all@freebsd.org Thu Jan 4 11:36:15 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 66F7CEABDCA; Thu, 4 Jan 2018 11:36:15 +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 31363649C6; Thu, 4 Jan 2018 11:36:15 +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 w04BaECF033396; Thu, 4 Jan 2018 11:36:14 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w04BaE9i033394; Thu, 4 Jan 2018 11:36:14 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201801041136.w04BaE9i033394@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 11:36:14 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r327542 - stable/11/usr.sbin/cpucontrol X-SVN-Group: stable-11 X-SVN-Commit-Author: kib X-SVN-Commit-Paths: stable/11/usr.sbin/cpucontrol X-SVN-Commit-Revision: 327542 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 04 Jan 2018 11:36:15 -0000 Author: kib Date: Thu Jan 4 11:36:13 2018 New Revision: 327542 URL: https://svnweb.freebsd.org/changeset/base/327542 Log: MFC r327264i (by imp), r327283: Fix returns without cleanups. Modified: stable/11/usr.sbin/cpucontrol/intel.c stable/11/usr.sbin/cpucontrol/via.c Directory Properties: stable/11/ (props changed) Modified: stable/11/usr.sbin/cpucontrol/intel.c ============================================================================== --- stable/11/usr.sbin/cpucontrol/intel.c Thu Jan 4 08:23:23 2018 (r327541) +++ stable/11/usr.sbin/cpucontrol/intel.c Thu Jan 4 11:36:13 2018 (r327542) @@ -145,7 +145,7 @@ intel_update(const char *dev, const char *path) fd = open(path, O_RDONLY, 0); if (fd < 0) { WARN(0, "open(%s)", path); - return; + goto fail; } error = fstat(fd, &st); if (error != 0) { @@ -259,7 +259,7 @@ matched: if (revision >= fw_header->revision) { WARNX(1, "skipping %s of rev %#x: up to date", path, fw_header->revision); - return; + goto fail; } fprintf(stderr, "%s: updating cpu %s from rev %#x to rev %#x... ", path, dev, revision, fw_header->revision); Modified: stable/11/usr.sbin/cpucontrol/via.c ============================================================================== --- stable/11/usr.sbin/cpucontrol/via.c Thu Jan 4 08:23:23 2018 (r327541) +++ stable/11/usr.sbin/cpucontrol/via.c Thu Jan 4 11:36:13 2018 (r327542) @@ -138,7 +138,7 @@ via_update(const char *dev, const char *path) fd = open(path, O_RDONLY, 0); if (fd < 0) { WARN(0, "open(%s)", path); - return; + goto fail; } error = fstat(fd, &st); if (error != 0) { From owner-svn-src-all@freebsd.org Thu Jan 4 11:38:43 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 6C481EAC050; Thu, 4 Jan 2018 11:38:43 +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 3369A64B5C; Thu, 4 Jan 2018 11:38:43 +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 w04BcgBO033527; Thu, 4 Jan 2018 11:38:42 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w04Bcgc5033526; Thu, 4 Jan 2018 11:38:42 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201801041138.w04Bcgc5033526@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 11:38:42 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r327543 - stable/11/usr.sbin/cpucontrol X-SVN-Group: stable-11 X-SVN-Commit-Author: kib X-SVN-Commit-Paths: stable/11/usr.sbin/cpucontrol X-SVN-Commit-Revision: 327543 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 04 Jan 2018 11:38:43 -0000 Author: kib Date: Thu Jan 4 11:38:42 2018 New Revision: 327543 URL: https://svnweb.freebsd.org/changeset/base/327543 Log: MFC r327284: Style. Remove useless return. Modified: stable/11/usr.sbin/cpucontrol/intel.c Directory Properties: stable/11/ (props changed) Modified: stable/11/usr.sbin/cpucontrol/intel.c ============================================================================== --- stable/11/usr.sbin/cpucontrol/intel.c Thu Jan 4 11:36:13 2018 (r327542) +++ stable/11/usr.sbin/cpucontrol/intel.c Thu Jan 4 11:38:42 2018 (r327543) @@ -86,7 +86,7 @@ intel_update(const char *dev, const char *path) intel_fw_header_t *fw_header; intel_cpu_signature_t *ext_table; intel_ext_header_t *ext_header; - uint32_t signature, flags; + uint32_t sig, signature, flags; int32_t revision; ssize_t ext_size; size_t ext_table_size; @@ -229,7 +229,8 @@ intel_update(const char *dev, const char *path) for (i = 0; i < (ext_table_size / sizeof(uint32_t)); i++) sum += *((uint32_t *)ext_header + i); if (sum != 0) { - WARNX(2, "%s: extended signature table checksum invalid", + WARNX(2, + "%s: extended signature table checksum invalid", path); goto no_table; } @@ -244,10 +245,10 @@ no_table: */ if (signature == fw_header->cpu_signature && (flags & fw_header->cpu_flags) != 0) - goto matched; + goto matched; else if (have_ext_table != 0) { for (i = 0; i < ext_header->sig_count; i++) { - uint32_t sig = ext_table[i].cpu_signature; + sig = ext_table[i].cpu_signature; if (signature == sig && (flags & ext_table[i].cpu_flags) != 0) goto matched; @@ -262,14 +263,14 @@ matched: goto fail; } fprintf(stderr, "%s: updating cpu %s from rev %#x to rev %#x... ", - path, dev, revision, fw_header->revision); + path, dev, revision, fw_header->revision); args.data = fw_data; args.size = data_size; error = ioctl(devfd, CPUCTL_UPDATE, &args); if (error < 0) { - error = errno; + error = errno; fprintf(stderr, "failed.\n"); - errno = error; + errno = error; WARN(0, "ioctl()"); goto fail; } @@ -283,5 +284,4 @@ fail: close(devfd); if (fd >= 0) close(fd); - return; } From owner-svn-src-all@freebsd.org Thu Jan 4 11:40:23 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id CCB9AEAC1F3; Thu, 4 Jan 2018 11:40:23 +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 94D3664CD6; Thu, 4 Jan 2018 11:40:23 +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 w04BeMdP033662; Thu, 4 Jan 2018 11:40:22 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w04BeMNP033661; Thu, 4 Jan 2018 11:40:22 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201801041140.w04BeMNP033661@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 11:40:22 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r327544 - stable/11/sys/x86/include X-SVN-Group: stable-11 X-SVN-Commit-Author: kib X-SVN-Commit-Paths: stable/11/sys/x86/include X-SVN-Commit-Revision: 327544 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 04 Jan 2018 11:40:23 -0000 Author: kib Date: Thu Jan 4 11:40:22 2018 New Revision: 327544 URL: https://svnweb.freebsd.org/changeset/base/327544 Log: MFC r327469: Add CR4.SMAP control bit. Modified: stable/11/sys/x86/include/specialreg.h Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/x86/include/specialreg.h ============================================================================== --- stable/11/sys/x86/include/specialreg.h Thu Jan 4 11:38:42 2018 (r327543) +++ stable/11/sys/x86/include/specialreg.h Thu Jan 4 11:40:22 2018 (r327544) @@ -74,6 +74,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-all@freebsd.org Thu Jan 4 11:43:43 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 7C237EAC754; Thu, 4 Jan 2018 11:43:43 +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 4667D6524A; Thu, 4 Jan 2018 11:43:43 +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 w04BhgcT038071; Thu, 4 Jan 2018 11:43:42 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w04Bhgab038070; Thu, 4 Jan 2018 11:43:42 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201801041143.w04Bhgab038070@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 11:43:42 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r327545 - stable/11/sys/vm X-SVN-Group: stable-11 X-SVN-Commit-Author: kib X-SVN-Commit-Paths: stable/11/sys/vm X-SVN-Commit-Revision: 327545 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 04 Jan 2018 11:43:43 -0000 Author: kib Date: Thu Jan 4 11:43:42 2018 New Revision: 327545 URL: https://svnweb.freebsd.org/changeset/base/327545 Log: MFC r327319: Clean up the comment. Modified: stable/11/sys/vm/vm_swapout.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/vm/vm_swapout.c ============================================================================== --- stable/11/sys/vm/vm_swapout.c Thu Jan 4 11:40:22 2018 (r327544) +++ stable/11/sys/vm/vm_swapout.c Thu Jan 4 11:43:42 2018 (r327545) @@ -713,8 +713,7 @@ loop: } /* - * We would like to bring someone in. (only if there is space). - * [What checks the space? ] + * We would like to bring someone in. */ faultin(p); PROC_UNLOCK(p); From owner-svn-src-all@freebsd.org Thu Jan 4 11:44:59 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 9DABAEAC8C8; Thu, 4 Jan 2018 11:44: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 675ED653C3; Thu, 4 Jan 2018 11:44: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 w04Biww0038180; Thu, 4 Jan 2018 11:44:58 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w04BiwC8038179; Thu, 4 Jan 2018 11:44:58 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201801041144.w04BiwC8038179@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 11:44:58 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r327546 - stable/11/sys/vm X-SVN-Group: stable-11 X-SVN-Commit-Author: kib X-SVN-Commit-Paths: stable/11/sys/vm X-SVN-Commit-Revision: 327546 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 04 Jan 2018 11:44:59 -0000 Author: kib Date: Thu Jan 4 11:44:58 2018 New Revision: 327546 URL: https://svnweb.freebsd.org/changeset/base/327546 Log: MFC r327316: In vm_swapout_map_deactivate_pages(), it is enough to lock the map for read. Modified: stable/11/sys/vm/vm_swapout.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/vm/vm_swapout.c ============================================================================== --- stable/11/sys/vm/vm_swapout.c Thu Jan 4 11:43:42 2018 (r327545) +++ stable/11/sys/vm/vm_swapout.c Thu Jan 4 11:44:58 2018 (r327546) @@ -261,7 +261,7 @@ vm_swapout_map_deactivate_pages(vm_map_t map, long des vm_object_t obj, bigobj; int nothingwired; - if (!vm_map_trylock(map)) + if (!vm_map_trylock_read(map)) return; bigobj = NULL; @@ -325,7 +325,7 @@ vm_swapout_map_deactivate_pages(vm_map_t map, long des vm_map_max(map)); } - vm_map_unlock(map); + vm_map_unlock_read(map); } /* From owner-svn-src-all@freebsd.org Thu Jan 4 11:49:34 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 65502EACEB7; Thu, 4 Jan 2018 11:49: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 3D2F1656A2; Thu, 4 Jan 2018 11:49: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 w04BnX0t038388; Thu, 4 Jan 2018 11:49:33 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w04BnXCJ038386; Thu, 4 Jan 2018 11:49:33 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201801041149.w04BnXCJ038386@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 11:49:33 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r327547 - in stable/11/sys: kern sys X-SVN-Group: stable-11 X-SVN-Commit-Author: kib X-SVN-Commit-Paths: in stable/11/sys: kern sys X-SVN-Commit-Revision: 327547 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 04 Jan 2018 11:49:34 -0000 Author: kib Date: Thu Jan 4 11:49:32 2018 New Revision: 327547 URL: https://svnweb.freebsd.org/changeset/base/327547 Log: MFC r327285: Make kern_proc_vmmap_resident() externally accesible, and move the vmmap_skip_res_cnt control check inside it. Modified: stable/11/sys/kern/kern_proc.c stable/11/sys/sys/proc.h Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/kern/kern_proc.c ============================================================================== --- stable/11/sys/kern/kern_proc.c Thu Jan 4 11:44:58 2018 (r327546) +++ stable/11/sys/kern/kern_proc.c Thu Jan 4 11:49:32 2018 (r327547) @@ -2256,9 +2256,9 @@ sysctl_kern_proc_ovmmap(SYSCTL_HANDLER_ARGS) CTASSERT(sizeof(struct kinfo_vmentry) == KINFO_VMENTRY_SIZE); #endif -static void +void kern_proc_vmmap_resident(vm_map_t map, vm_map_entry_t entry, - struct kinfo_vmentry *kve) + int *resident_count, bool *super) { vm_object_t obj, tobj; vm_page_t m, m_adv; @@ -2266,6 +2266,11 @@ kern_proc_vmmap_resident(vm_map_t map, vm_map_entry_t vm_paddr_t locked_pa; vm_pindex_t pi, pi_adv, pindex; + *super = false; + *resident_count = 0; + if (vmmap_skip_res_cnt) + return; + locked_pa = 0; obj = entry->object.vm_object; addr = entry->start; @@ -2298,7 +2303,7 @@ kern_proc_vmmap_resident(vm_map_t map, vm_map_entry_t (addr & (pagesizes[1] - 1)) == 0 && (pmap_mincore(map->pmap, addr, &locked_pa) & MINCORE_SUPER) != 0) { - kve->kve_flags |= KVME_FLAG_SUPER; + *super = true; pi_adv = atop(pagesizes[1]); } else { /* @@ -2310,7 +2315,7 @@ kern_proc_vmmap_resident(vm_map_t map, vm_map_entry_t */ pi_adv = 1; } - kve->kve_resident += pi_adv; + *resident_count += pi_adv; next:; } PA_UNLOCK_COND(locked_pa); @@ -2334,6 +2339,7 @@ kern_proc_vmmap_out(struct proc *p, struct sbuf *sb, s vm_offset_t addr; unsigned int last_timestamp; int error; + bool super; PROC_LOCK_ASSERT(p, MA_OWNED); @@ -2366,8 +2372,10 @@ kern_proc_vmmap_out(struct proc *p, struct sbuf *sb, s if (obj->backing_object == NULL) kve->kve_private_resident = obj->resident_page_count; - if (!vmmap_skip_res_cnt) - kern_proc_vmmap_resident(map, entry, kve); + kern_proc_vmmap_resident(map, entry, + &kve->kve_resident, &super); + if (super) + kve->kve_flags |= KVME_FLAG_SUPER; for (tobj = obj; tobj != NULL; tobj = tobj->backing_object) { if (tobj != obj && tobj != lobj) @@ -3077,6 +3085,7 @@ resume_all_proc(void) cp = curproc; sx_xlock(&allproc_lock); +again: LIST_REMOVE(cp, p_list); LIST_INSERT_HEAD(&allproc, cp, p_list); for (;;) { @@ -3096,6 +3105,12 @@ resume_all_proc(void) } else { PROC_UNLOCK(p); } + } + /* Did the loop above missed any stopped process ? */ + LIST_FOREACH(p, &allproc, p_list) { + /* No need for proc lock. */ + if ((p->p_flag & P_TOTAL_STOP) != 0) + goto again; } sx_xunlock(&allproc_lock); } Modified: stable/11/sys/sys/proc.h ============================================================================== --- stable/11/sys/sys/proc.h Thu Jan 4 11:44:58 2018 (r327546) +++ stable/11/sys/sys/proc.h Thu Jan 4 11:49:32 2018 (r327547) @@ -182,6 +182,8 @@ struct td_sched; struct thread; struct trapframe; struct turnstile; +struct vm_map; +struct vm_map_entry; /* * XXX: Does this belong in resource.h or resourcevar.h instead? @@ -1002,6 +1004,8 @@ void fork_exit(void (*)(void *, struct trapframe *), v struct trapframe *); void fork_return(struct thread *, struct trapframe *); int inferior(struct proc *p); +void kern_proc_vmmap_resident(struct vm_map *map, struct vm_map_entry *entry, + int *resident_count, bool *super); void kern_yield(int); void kick_proc0(void); void killjobc(void); From owner-svn-src-all@freebsd.org Thu Jan 4 11:51:04 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 39F91EAD052; Thu, 4 Jan 2018 11:51: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 0EE146586B; Thu, 4 Jan 2018 11:51:03 +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 w04Bp378039277; Thu, 4 Jan 2018 11:51:03 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w04Bp3wt039276; Thu, 4 Jan 2018 11:51:03 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201801041151.w04Bp3wt039276@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 11:51:03 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r327548 - stable/11/sys/fs/procfs X-SVN-Group: stable-11 X-SVN-Commit-Author: kib X-SVN-Commit-Paths: stable/11/sys/fs/procfs X-SVN-Commit-Revision: 327548 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 04 Jan 2018 11:51:04 -0000 Author: kib Date: Thu Jan 4 11:51:02 2018 New Revision: 327548 URL: https://svnweb.freebsd.org/changeset/base/327548 Log: MFC r327286: Reuse kern_proc_vmmap_resident() for procfs_map resident count. Modified: stable/11/sys/fs/procfs/procfs_map.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/fs/procfs/procfs_map.c ============================================================================== --- stable/11/sys/fs/procfs/procfs_map.c Thu Jan 4 11:49:32 2018 (r327547) +++ stable/11/sys/fs/procfs/procfs_map.c Thu Jan 4 11:51:02 2018 (r327548) @@ -82,12 +82,17 @@ procfs_doprocmap(PFS_FILL_ARGS) vm_map_t map; vm_map_entry_t entry, tmp_entry; struct vnode *vp; - char *fullpath, *freepath; + char *fullpath, *freepath, *type; struct ucred *cred; - int error; + vm_object_t obj, tobj, lobj; + int error, privateresident, ref_count, resident, shadow_count, flags; + vm_offset_t e_start, e_end; + vm_eflags_t e_eflags; + vm_prot_t e_prot; unsigned int last_timestamp; + bool super; #ifdef COMPAT_FREEBSD32 - int wrap32 = 0; + bool wrap32; #endif PROC_LOCK(p); @@ -100,11 +105,12 @@ procfs_doprocmap(PFS_FILL_ARGS) return (EOPNOTSUPP); #ifdef COMPAT_FREEBSD32 - if (SV_CURPROC_FLAG(SV_ILP32)) { - if (!(SV_PROC_FLAG(p, SV_ILP32))) - return (EOPNOTSUPP); - wrap32 = 1; - } + wrap32 = false; + if (SV_CURPROC_FLAG(SV_ILP32)) { + if (!(SV_PROC_FLAG(p, SV_ILP32))) + return (EOPNOTSUPP); + wrap32 = true; + } #endif vm = vmspace_acquire_ref(p); @@ -114,14 +120,6 @@ procfs_doprocmap(PFS_FILL_ARGS) vm_map_lock_read(map); for (entry = map->header.next; entry != &map->header; entry = entry->next) { - vm_object_t obj, tobj, lobj; - int ref_count, shadow_count, flags; - vm_offset_t e_start, e_end, addr; - int resident, privateresident; - char *type; - vm_eflags_t e_eflags; - vm_prot_t e_prot; - if (entry->eflags & MAP_ENTRY_IS_SUB_MAP) continue; @@ -130,6 +128,7 @@ procfs_doprocmap(PFS_FILL_ARGS) e_start = entry->start; e_end = entry->end; privateresident = 0; + resident = 0; obj = entry->object.vm_object; if (obj != NULL) { VM_OBJECT_RLOCK(obj); @@ -138,20 +137,17 @@ procfs_doprocmap(PFS_FILL_ARGS) } cred = (entry->cred) ? entry->cred : (obj ? obj->cred : NULL); - resident = 0; - addr = entry->start; - while (addr < entry->end) { - if (pmap_extract(map->pmap, addr)) - resident++; - addr += PAGE_SIZE; - } - - for (lobj = tobj = obj; tobj; tobj = tobj->backing_object) { + for (lobj = tobj = obj; tobj != NULL; + tobj = tobj->backing_object) { if (tobj != obj) VM_OBJECT_RLOCK(tobj); - if (lobj != obj) - VM_OBJECT_RUNLOCK(lobj); lobj = tobj; + } + if (obj != NULL) + kern_proc_vmmap_resident(map, entry, &resident, &super); + for (tobj = obj; tobj != NULL; tobj = tobj->backing_object) { + if (tobj != obj && tobj != lobj) + VM_OBJECT_RUNLOCK(tobj); } last_timestamp = map->timestamp; vm_map_unlock_read(map); From owner-svn-src-all@freebsd.org Thu Jan 4 15:55:29 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 16188EBEE9E; Thu, 4 Jan 2018 15:55:29 +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 D2E366FD35; Thu, 4 Jan 2018 15:55:28 +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 w04FtRbf041948; Thu, 4 Jan 2018 15:55:27 GMT (envelope-from pfg@FreeBSD.org) Received: (from pfg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w04FtRTN041947; Thu, 4 Jan 2018 15:55:27 GMT (envelope-from pfg@FreeBSD.org) Message-Id: <201801041555.w04FtRTN041947@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: pfg set sender to pfg@FreeBSD.org using -f From: "Pedro F. Giffuni" Date: Thu, 4 Jan 2018 15:55:27 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r327549 - stable/11/sys/netinet6 X-SVN-Group: stable-11 X-SVN-Commit-Author: pfg X-SVN-Commit-Paths: stable/11/sys/netinet6 X-SVN-Commit-Revision: 327549 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 04 Jan 2018 15:55:29 -0000 Author: pfg Date: Thu Jan 4 15:55:27 2018 New Revision: 327549 URL: https://svnweb.freebsd.org/changeset/base/327549 Log: MFC r327295: Start syncing changes from OpenBSD's ip6_id.c instead of ip_id.c. correct non-repetitive ID code, based on comments from niels provos. - seed2 is necessary, but use it as "seed2 + x" not "seed2 ^ x". - skipping number is not needed, so disable it for 16bit generator (makes the repetition period to 30000) Obtained from: OpenBSD (CVS rev. 1.2) Modified: stable/11/sys/netinet6/ip6_id.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/netinet6/ip6_id.c ============================================================================== --- stable/11/sys/netinet6/ip6_id.c Thu Jan 4 11:51:02 2018 (r327548) +++ stable/11/sys/netinet6/ip6_id.c Thu Jan 4 15:55:27 2018 (r327549) @@ -63,7 +63,7 @@ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * - * $OpenBSD: ip_id.c,v 1.6 2002/03/15 18:19:52 millert Exp $ + * $OpenBSD: ip6_id.c,v 1.2 2003/12/10 07:21:01 itojun Exp $ */ #include @@ -230,15 +230,12 @@ static u_int32_t randomid(struct randomtab *p) { int i, n; - u_int32_t tmp; if (p->ru_counter >= p->ru_max || time_uptime > p->ru_reseed) initid(p); - tmp = arc4random(); - /* Skip a random number of ids */ - n = tmp & 0x3; tmp = tmp >> 2; + n = arc4random() & 0x3; if (p->ru_counter + n >= p->ru_max) initid(p); @@ -249,7 +246,7 @@ randomid(struct randomtab *p) p->ru_counter += i; - return (p->ru_seed ^ pmod(p->ru_g, p->ru_seed2 ^ p->ru_x, p->ru_n)) | + return (p->ru_seed ^ pmod(p->ru_g, p->ru_seed2 + p->ru_x, p->ru_n)) | p->ru_msb; } From owner-svn-src-all@freebsd.org Thu Jan 4 15:57:51 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 01AFCEBF1A3; Thu, 4 Jan 2018 15:57:51 +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 A7C7E6FF27; Thu, 4 Jan 2018 15:57:50 +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 w04FvnTq042059; Thu, 4 Jan 2018 15:57:49 GMT (envelope-from pfg@FreeBSD.org) Received: (from pfg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w04FvnW9042058; Thu, 4 Jan 2018 15:57:49 GMT (envelope-from pfg@FreeBSD.org) Message-Id: <201801041557.w04FvnW9042058@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: pfg set sender to pfg@FreeBSD.org using -f From: "Pedro F. Giffuni" Date: Thu, 4 Jan 2018 15:57:49 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r327550 - stable/10/sys/netinet6 X-SVN-Group: stable-10 X-SVN-Commit-Author: pfg X-SVN-Commit-Paths: stable/10/sys/netinet6 X-SVN-Commit-Revision: 327550 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 04 Jan 2018 15:57:51 -0000 Author: pfg Date: Thu Jan 4 15:57:49 2018 New Revision: 327550 URL: https://svnweb.freebsd.org/changeset/base/327550 Log: MFC r327295: Start syncing changes from OpenBSD's ip6_id.c instead of ip_id.c. correct non-repetitive ID code, based on comments from niels provos. - seed2 is necessary, but use it as "seed2 + x" not "seed2 ^ x". - skipping number is not needed, so disable it for 16bit generator (makes the repetition period to 30000) Obtained from: OpenBSD (CVS rev. 1.2) Modified: stable/10/sys/netinet6/ip6_id.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/netinet6/ip6_id.c ============================================================================== --- stable/10/sys/netinet6/ip6_id.c Thu Jan 4 15:55:27 2018 (r327549) +++ stable/10/sys/netinet6/ip6_id.c Thu Jan 4 15:57:49 2018 (r327550) @@ -63,7 +63,7 @@ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * - * $OpenBSD: ip_id.c,v 1.6 2002/03/15 18:19:52 millert Exp $ + * $OpenBSD: ip6_id.c,v 1.2 2003/12/10 07:21:01 itojun Exp $ */ #include @@ -229,15 +229,12 @@ static u_int32_t randomid(struct randomtab *p) { int i, n; - u_int32_t tmp; if (p->ru_counter >= p->ru_max || time_uptime > p->ru_reseed) initid(p); - tmp = arc4random(); - /* Skip a random number of ids */ - n = tmp & 0x3; tmp = tmp >> 2; + n = arc4random() & 0x3; if (p->ru_counter + n >= p->ru_max) initid(p); @@ -248,7 +245,7 @@ randomid(struct randomtab *p) p->ru_counter += i; - return (p->ru_seed ^ pmod(p->ru_g, p->ru_seed2 ^ p->ru_x, p->ru_n)) | + return (p->ru_seed ^ pmod(p->ru_g, p->ru_seed2 + p->ru_x, p->ru_n)) | p->ru_msb; } From owner-svn-src-all@freebsd.org Thu Jan 4 16:15:18 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id A375AEC06D8 for ; Thu, 4 Jan 2018 16:15:18 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: from mail-io0-x236.google.com (mail-io0-x236.google.com [IPv6:2607:f8b0:4001:c06::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 671BE70F5D for ; Thu, 4 Jan 2018 16:15:18 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: by mail-io0-x236.google.com with SMTP id 14so2734958iou.2 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=Mim//XDKB7FYXVhOJAvSBrNp7VDemkYCCbZL3BVCF/ne5jdYT6PeCFADpTIRm244Mq TG9lQHpE6AGeH+rMhcnWtddgydhaMxieVmruNlpWoPjAhmwJWYLvBaPI4UfxEo/hhloE T9ns9qBgigwW1/TRXyVxh9VAmBcV0EMDqNEMe5uhrukW5OEiGjbfQlDltPGuj0gbCU9F hLTbjLhUCRmH6Vi9cy+XR9hoY9K0C3J4kYsavMCN4SiKTbNDpt6Tu4M2pYAWA3BYp7SI q9Ca05w/6TXiu0Vb5f3giuDdaCsBrGrLprzzjqttQsbA09NNOCUalN6xcD/Ih/Ptcvn2 Y/Pw== X-Gm-Message-State: AKGB3mKVPtux8jHPIjsZxxDmhgVCiDuHR9QLZkDL9CYkxCbnsgMKN+9v +bTAwC4Y4HDy45EzWBgdJyZjKX3HjV4PY6qV6zZ7NA== 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-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" 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-all@freebsd.org Thu Jan 4 16:17:37 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 6E3E7EC09C8; Thu, 4 Jan 2018 16:17:37 +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 A055B7136A; Thu, 4 Jan 2018 16:17:33 +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 w04GHWE4050736; Thu, 4 Jan 2018 16:17:32 GMT (envelope-from markj@FreeBSD.org) Received: (from markj@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w04GHViu050729; Thu, 4 Jan 2018 16:17:31 GMT (envelope-from markj@FreeBSD.org) Message-Id: <201801041617.w04GHViu050729@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: markj set sender to markj@FreeBSD.org using -f From: Mark Johnston Date: Thu, 4 Jan 2018 16:17:31 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r327551 - in stable/11/sys: amd64/amd64 cddl/contrib/opensolaris/uts/common/sys cddl/contrib/opensolaris/uts/intel/dtrace cddl/contrib/opensolaris/uts/powerpc/dtrace i386/i386 powerpc/p... X-SVN-Group: stable-11 X-SVN-Commit-Author: markj X-SVN-Commit-Paths: in stable/11/sys: amd64/amd64 cddl/contrib/opensolaris/uts/common/sys cddl/contrib/opensolaris/uts/intel/dtrace cddl/contrib/opensolaris/uts/powerpc/dtrace i386/i386 powerpc/powerpc sys X-SVN-Commit-Revision: 327551 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 04 Jan 2018 16:17:37 -0000 Author: markj Date: Thu Jan 4 16:17:31 2018 New Revision: 327551 URL: https://svnweb.freebsd.org/changeset/base/327551 Log: MFC r326774, r326811: Pass the trap frame to fasttrap hooks. Modified: stable/11/sys/amd64/amd64/trap.c stable/11/sys/cddl/contrib/opensolaris/uts/common/sys/fasttrap_impl.h stable/11/sys/cddl/contrib/opensolaris/uts/intel/dtrace/fasttrap_isa.c stable/11/sys/cddl/contrib/opensolaris/uts/powerpc/dtrace/fasttrap_isa.c stable/11/sys/i386/i386/trap.c stable/11/sys/powerpc/powerpc/trap.c stable/11/sys/sys/dtrace_bsd.h Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/amd64/amd64/trap.c ============================================================================== --- stable/11/sys/amd64/amd64/trap.c Thu Jan 4 15:57:49 2018 (r327550) +++ stable/11/sys/amd64/amd64/trap.c Thu Jan 4 16:17:31 2018 (r327551) @@ -162,9 +162,6 @@ SYSCTL_INT(_machdep, OID_AUTO, uprintf_signal, CTLFLAG void trap(struct trapframe *frame) { -#ifdef KDTRACE_HOOKS - struct reg regs; -#endif ksiginfo_t ksi; struct thread *td; struct proc *p; @@ -276,9 +273,8 @@ trap(struct trapframe *frame) enable_intr(); #ifdef KDTRACE_HOOKS if (type == T_BPTFLT) { - fill_frame_regs(frame, ®s); if (dtrace_pid_probe_ptr != NULL && - dtrace_pid_probe_ptr(®s) == 0) + dtrace_pid_probe_ptr(frame) == 0) return; } #endif @@ -404,9 +400,8 @@ trap(struct trapframe *frame) #ifdef KDTRACE_HOOKS case T_DTRACE_RET: enable_intr(); - fill_frame_regs(frame, ®s); if (dtrace_return_probe_ptr != NULL) - dtrace_return_probe_ptr(®s); + dtrace_return_probe_ptr(frame); return; #endif } Modified: stable/11/sys/cddl/contrib/opensolaris/uts/common/sys/fasttrap_impl.h ============================================================================== --- stable/11/sys/cddl/contrib/opensolaris/uts/common/sys/fasttrap_impl.h Thu Jan 4 15:57:49 2018 (r327550) +++ stable/11/sys/cddl/contrib/opensolaris/uts/common/sys/fasttrap_impl.h Thu Jan 4 16:17:31 2018 (r327551) @@ -221,9 +221,9 @@ extern int fasttrap_tracepoint_init(proc_t *, fasttrap extern int fasttrap_tracepoint_install(proc_t *, fasttrap_tracepoint_t *); extern int fasttrap_tracepoint_remove(proc_t *, fasttrap_tracepoint_t *); -struct reg; -extern int fasttrap_pid_probe(struct reg *); -extern int fasttrap_return_probe(struct reg *); +struct trapframe; +extern int fasttrap_pid_probe(struct trapframe *); +extern int fasttrap_return_probe(struct trapframe *); extern uint64_t fasttrap_pid_getarg(void *, dtrace_id_t, void *, int, int); extern uint64_t fasttrap_usdt_getarg(void *, dtrace_id_t, void *, int, int); Modified: stable/11/sys/cddl/contrib/opensolaris/uts/intel/dtrace/fasttrap_isa.c ============================================================================== --- stable/11/sys/cddl/contrib/opensolaris/uts/intel/dtrace/fasttrap_isa.c Thu Jan 4 15:57:49 2018 (r327550) +++ stable/11/sys/cddl/contrib/opensolaris/uts/intel/dtrace/fasttrap_isa.c Thu Jan 4 16:17:31 2018 (r327551) @@ -967,14 +967,12 @@ fasttrap_do_seg(fasttrap_tracepoint_t *tp, struct reg } int -fasttrap_pid_probe(struct reg *rp) +fasttrap_pid_probe(struct trapframe *tf) { - proc_t *p = curproc; -#ifndef illumos + struct reg reg, *rp; + proc_t *p = curproc, *pp; struct rm_priotracker tracker; - proc_t *pp; -#endif - uintptr_t pc = rp->r_rip - 1; + uintptr_t pc; uintptr_t new_pc = 0; fasttrap_bucket_t *bucket; #ifdef illumos @@ -985,6 +983,11 @@ fasttrap_pid_probe(struct reg *rp) dtrace_icookie_t cookie; uint_t is_enabled = 0; + fill_frame_regs(tf, ®); + rp = ® + + pc = rp->r_rip - 1; + /* * It's possible that a user (in a veritable orgy of bad planning) * could redirect this thread's flow of control before it reached the @@ -1796,12 +1799,16 @@ done: } int -fasttrap_return_probe(struct reg *rp) +fasttrap_return_probe(struct trapframe *tf) { + struct reg reg, *rp; proc_t *p = curproc; uintptr_t pc = curthread->t_dtrace_pc; uintptr_t npc = curthread->t_dtrace_npc; + fill_frame_regs(tf, ®); + rp = ® + curthread->t_dtrace_pc = 0; curthread->t_dtrace_npc = 0; curthread->t_dtrace_scrpc = 0; @@ -1821,9 +1828,7 @@ fasttrap_return_probe(struct reg *rp) /* * We set rp->r_rip to the address of the traced instruction so * that it appears to dtrace_probe() that we're on the original - * instruction, and so that the user can't easily detect our - * complex web of lies. dtrace_return_probe() (our caller) - * will correctly set %pc after we return. + * instruction. */ rp->r_rip = pc; Modified: stable/11/sys/cddl/contrib/opensolaris/uts/powerpc/dtrace/fasttrap_isa.c ============================================================================== --- stable/11/sys/cddl/contrib/opensolaris/uts/powerpc/dtrace/fasttrap_isa.c Thu Jan 4 15:57:49 2018 (r327550) +++ stable/11/sys/cddl/contrib/opensolaris/uts/powerpc/dtrace/fasttrap_isa.c Thu Jan 4 16:17:31 2018 (r327551) @@ -328,11 +328,12 @@ fasttrap_branch_taken(int bo, int bi, struct reg *regs int -fasttrap_pid_probe(struct reg *rp) +fasttrap_pid_probe(struct trapframe *frame) { + struct reg reg, *rp; struct rm_priotracker tracker; proc_t *p = curproc; - uintptr_t pc = rp->pc; + uintptr_t pc; uintptr_t new_pc = 0; fasttrap_bucket_t *bucket; fasttrap_tracepoint_t *tp, tp_local; @@ -340,6 +341,10 @@ fasttrap_pid_probe(struct reg *rp) dtrace_icookie_t cookie; uint_t is_enabled = 0; + fill_regs(curthread, ®); + rp = ® + pc = rp->pc; + /* * It's possible that a user (in a veritable orgy of bad planning) * could redirect this thread's flow of control before it reached the @@ -515,8 +520,9 @@ done: } int -fasttrap_return_probe(struct reg *rp) +fasttrap_return_probe(struct trapframe *tf) { + struct reg reg, *rp; proc_t *p = curproc; uintptr_t pc = curthread->t_dtrace_pc; uintptr_t npc = curthread->t_dtrace_npc; @@ -526,12 +532,13 @@ fasttrap_return_probe(struct reg *rp) curthread->t_dtrace_scrpc = 0; curthread->t_dtrace_astpc = 0; + fill_regs(curthread, ®); + rp = ® + /* * We set rp->pc to the address of the traced instruction so * that it appears to dtrace_probe() that we're on the original - * instruction, and so that the user can't easily detect our - * complex web of lies. dtrace_return_probe() (our caller) - * will correctly set %pc after we return. + * instruction. */ rp->pc = pc; @@ -539,4 +546,3 @@ fasttrap_return_probe(struct reg *rp) return (0); } - Modified: stable/11/sys/i386/i386/trap.c ============================================================================== --- stable/11/sys/i386/i386/trap.c Thu Jan 4 15:57:49 2018 (r327550) +++ stable/11/sys/i386/i386/trap.c Thu Jan 4 16:17:31 2018 (r327551) @@ -175,9 +175,6 @@ SYSCTL_INT(_machdep, OID_AUTO, uprintf_signal, CTLFLAG void trap(struct trapframe *frame) { -#ifdef KDTRACE_HOOKS - struct reg regs; -#endif ksiginfo_t ksi; struct thread *td; struct proc *p; @@ -325,9 +322,8 @@ trap(struct trapframe *frame) enable_intr(); #ifdef KDTRACE_HOOKS if (type == T_BPTFLT) { - fill_frame_regs(frame, ®s); if (dtrace_pid_probe_ptr != NULL && - dtrace_pid_probe_ptr(®s) == 0) + dtrace_pid_probe_ptr(frame) == 0) return; } #endif @@ -495,9 +491,8 @@ user_trctrap_out: #ifdef KDTRACE_HOOKS case T_DTRACE_RET: enable_intr(); - fill_frame_regs(frame, ®s); if (dtrace_return_probe_ptr != NULL) - dtrace_return_probe_ptr(®s); + dtrace_return_probe_ptr(frame); return; #endif } Modified: stable/11/sys/powerpc/powerpc/trap.c ============================================================================== --- stable/11/sys/powerpc/powerpc/trap.c Thu Jan 4 15:57:49 2018 (r327550) +++ stable/11/sys/powerpc/powerpc/trap.c Thu Jan 4 16:17:31 2018 (r327551) @@ -299,9 +299,7 @@ trap(struct trapframe *frame) inst = fuword32((const void *)frame->srr0); if (inst == 0x0FFFDDDD && dtrace_pid_probe_ptr != NULL) { - struct reg regs; - fill_regs(td, ®s); - (*dtrace_pid_probe_ptr)(®s); + (*dtrace_pid_probe_ptr)(frame); break; } #endif Modified: stable/11/sys/sys/dtrace_bsd.h ============================================================================== --- stable/11/sys/sys/dtrace_bsd.h Thu Jan 4 15:57:49 2018 (r327550) +++ stable/11/sys/sys/dtrace_bsd.h Thu Jan 4 16:17:31 2018 (r327551) @@ -37,7 +37,6 @@ struct trapframe; struct thread; struct vattr; struct vnode; -struct reg; int dtrace_trap(struct trapframe *, u_int); @@ -58,9 +57,9 @@ typedef void (*dtrace_doubletrap_func_t)(void); extern dtrace_doubletrap_func_t dtrace_doubletrap_func; /* Pid provider hooks */ -typedef int (*dtrace_pid_probe_ptr_t)(struct reg *); +typedef int (*dtrace_pid_probe_ptr_t)(struct trapframe *); extern dtrace_pid_probe_ptr_t dtrace_pid_probe_ptr; -typedef int (*dtrace_return_probe_ptr_t)(struct reg *); +typedef int (*dtrace_return_probe_ptr_t)(struct trapframe *); extern dtrace_return_probe_ptr_t dtrace_return_probe_ptr; /* Virtual time hook function type. */ From owner-svn-src-all@freebsd.org Thu Jan 4 16:18:31 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id D84DCEC0C21; Thu, 4 Jan 2018 16:18:31 +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 A1D8871604; Thu, 4 Jan 2018 16:18:31 +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 w04GIUPc050826; Thu, 4 Jan 2018 16:18:30 GMT (envelope-from markj@FreeBSD.org) Received: (from markj@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w04GIUE5050825; Thu, 4 Jan 2018 16:18:30 GMT (envelope-from markj@FreeBSD.org) Message-Id: <201801041618.w04GIUE5050825@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: markj set sender to markj@FreeBSD.org using -f From: Mark Johnston Date: Thu, 4 Jan 2018 16:18:30 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r327552 - stable/11/usr.sbin/makefs X-SVN-Group: stable-11 X-SVN-Commit-Author: markj X-SVN-Commit-Paths: stable/11/usr.sbin/makefs X-SVN-Commit-Revision: 327552 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 04 Jan 2018 16:18:31 -0000 Author: markj Date: Thu Jan 4 16:18:30 2018 New Revision: 327552 URL: https://svnweb.freebsd.org/changeset/base/327552 Log: MFC r326912: Fix a logic bug in makefs lazy inode initialization. Modified: stable/11/usr.sbin/makefs/ffs.c Directory Properties: stable/11/ (props changed) Modified: stable/11/usr.sbin/makefs/ffs.c ============================================================================== --- stable/11/usr.sbin/makefs/ffs.c Thu Jan 4 16:17:31 2018 (r327551) +++ stable/11/usr.sbin/makefs/ffs.c Thu Jan 4 16:18:30 2018 (r327552) @@ -1134,7 +1134,7 @@ ffs_write_inode(union dinode *dp, uint32_t ino, const * Initialize inode blocks on the fly for UFS2. */ initediblk = ufs_rw32(cgp->cg_initediblk, fsopts->needswap); - if (ffs_opts->version == 2 && cgino + INOPB(fs) > initediblk && + while (ffs_opts->version == 2 && cgino + INOPB(fs) > initediblk && initediblk < ufs_rw32(cgp->cg_niblk, fsopts->needswap)) { memset(buf, 0, fs->fs_bsize); dip = (struct ufs2_dinode *)buf; From owner-svn-src-all@freebsd.org Thu Jan 4 16:19:58 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 8273CEC0E0D; Thu, 4 Jan 2018 16:19:58 +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 1D6CD7188D; Thu, 4 Jan 2018 16:19:58 +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 w04GJvMk051089; Thu, 4 Jan 2018 16:19:57 GMT (envelope-from markj@FreeBSD.org) Received: (from markj@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w04GJuSu051079; Thu, 4 Jan 2018 16:19:56 GMT (envelope-from markj@FreeBSD.org) Message-Id: <201801041619.w04GJuSu051079@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: markj set sender to markj@FreeBSD.org using -f From: Mark Johnston Date: Thu, 4 Jan 2018 16:19:56 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r327553 - in stable/11/tests/sys/geom/class: . mirror X-SVN-Group: stable-11 X-SVN-Commit-Author: markj X-SVN-Commit-Paths: in stable/11/tests/sys/geom/class: . mirror X-SVN-Commit-Revision: 327553 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 04 Jan 2018 16:19:58 -0000 Author: markj Date: Thu Jan 4 16:19:56 2018 New Revision: 327553 URL: https://svnweb.freebsd.org/changeset/base/327553 Log: MFC r326861-r326863: Add some gmirror tests and fix indentation in existing tests. Added: stable/11/tests/sys/geom/class/mirror/10_test.sh - copied unchanged from r326861, head/tests/sys/geom/class/mirror/10_test.sh stable/11/tests/sys/geom/class/mirror/11_test.sh - copied unchanged from r326861, head/tests/sys/geom/class/mirror/11_test.sh stable/11/tests/sys/geom/class/mirror/12_test.sh - copied unchanged from r326861, head/tests/sys/geom/class/mirror/12_test.sh stable/11/tests/sys/geom/class/mirror/13_test.sh - copied unchanged from r326861, head/tests/sys/geom/class/mirror/13_test.sh Modified: stable/11/tests/sys/geom/class/geom_subr.sh stable/11/tests/sys/geom/class/mirror/8_test.sh stable/11/tests/sys/geom/class/mirror/9_test.sh stable/11/tests/sys/geom/class/mirror/Makefile stable/11/tests/sys/geom/class/mirror/conf.sh Directory Properties: stable/11/ (props changed) Modified: stable/11/tests/sys/geom/class/geom_subr.sh ============================================================================== --- stable/11/tests/sys/geom/class/geom_subr.sh Thu Jan 4 16:18:30 2018 (r327552) +++ stable/11/tests/sys/geom/class/geom_subr.sh Thu Jan 4 16:19:56 2018 (r327553) @@ -20,6 +20,16 @@ attach_md() echo $test_md } +detach_md() +{ + local test_md unit + + test_md=$1 + unit=${test_md#md} + mdconfig -d -u $unit || exit + sed -i '' "/^${test_md}$/d" $TEST_MDS_FILE || exit +} + geom_test_cleanup() { local test_md @@ -38,6 +48,7 @@ if [ $(id -u) -ne 0 ]; then echo '1..0 # SKIP tests must be run as root' exit 0 fi + # If the geom class isn't already loaded, try loading it. if ! kldstat -q -m g_${class}; then if ! geom ${class} load; then Copied: stable/11/tests/sys/geom/class/mirror/10_test.sh (from r326861, head/tests/sys/geom/class/mirror/10_test.sh) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/11/tests/sys/geom/class/mirror/10_test.sh Thu Jan 4 16:19:56 2018 (r327553, copy of r326861, head/tests/sys/geom/class/mirror/10_test.sh) @@ -0,0 +1,69 @@ +#!/bin/sh +# $FreeBSD$ + +# Test handling of read errors. + +. $(dirname $0)/conf.sh + +echo 1..3 + +set -e + +ddbs=2048 +regreadfp="debug.fail_point.g_mirror_regular_request_read" +m1=$(mktemp $base.XXXXXX) +m2=$(mktemp $base.XXXXXX) + +dd if=/dev/random of=$m1 bs=$ddbs count=1024 >/dev/null 2>&1 +dd if=/dev/zero of=$m2 bs=$ddbs count=1024 >/dev/null 2>&1 + +us0=$(attach_md -t vnode -f $m1) +us1=$(attach_md -t vnode -f $m2) + +gmirror label $name /dev/$us0 +gmirror insert $name /dev/$us1 +devwait +syncwait + +tmp1=$(mktemp $base.XXXXXX) +tmp2=$(mktemp $base.XXXXXX) + +EIO=5 +# gmirror should retry a failed read from the other mirror. +sysctl ${regreadfp}="1*return(${EIO})" +dd if=/dev/mirror/$name of=$tmp1 iseek=256 bs=$ddbs count=1 >/dev/null 2>&1 +dd if=/dev/$us1 of=$tmp2 iseek=256 bs=$ddbs count=1 >/dev/null 2>&1 +sysctl ${regreadfp}='off' + +if cmp -s $tmp1 $tmp2; then + echo "ok 1" +else + echo "not ok 1" +fi + +# Make sure that one of the mirrors was marked broken. +genid1=$(gmirror dump /dev/$us0 | awk '/^[[:space:]]*genid: /{print $2}') +genid2=$(gmirror dump /dev/$us1 | awk '/^[[:space:]]*genid: /{print $2}') +if [ $genid1 -eq $(($genid2 + 1)) -o $genid2 -eq $(($genid1 + 1)) ]; then + echo "ok 2" +else + echo "not ok 2" +fi + +# Force a retaste of the disconnected component. +if [ $(gmirror status -s $name | awk '{print $3}') = $us0 ]; then + detach_md $us1 + us1=$(attach_md -t vnode -f $m2) +else + detach_md $us0 + us0=$(attach_md -t vnode -f $m1) +fi + +# Make sure that the component wasn't re-added to the gmirror. +if [ $(gmirror status -s $name | wc -l) -eq 1 ]; then + echo "ok 3" +else + echo "not ok 3" +fi + +rm -f $m1 $m2 $tmp1 $tmp2 Copied: stable/11/tests/sys/geom/class/mirror/11_test.sh (from r326861, head/tests/sys/geom/class/mirror/11_test.sh) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/11/tests/sys/geom/class/mirror/11_test.sh Thu Jan 4 16:19:56 2018 (r327553, copy of r326861, head/tests/sys/geom/class/mirror/11_test.sh) @@ -0,0 +1,84 @@ +#!/bin/sh +# $FreeBSD$ + +# Test handling of read errors. + +. $(dirname $0)/conf.sh + +echo 1..4 + +set -e + +ddbs=2048 +regreadfp="debug.fail_point.g_mirror_regular_request_read" +m1=$(mktemp $base.XXXXXX) +m2=$(mktemp $base.XXXXXX) + +dd if=/dev/random of=$m1 bs=$ddbs count=1024 >/dev/null 2>&1 +dd if=/dev/zero of=$m2 bs=$ddbs count=1024 >/dev/null 2>&1 + +us0=$(attach_md -t vnode -f $m1) +us1=$(attach_md -t vnode -f $m2) + +gmirror label $name /dev/$us0 +gmirror insert $name /dev/$us1 +devwait +syncwait + +tmp1=$(mktemp $base.XXXXXX) +tmp2=$(mktemp $base.XXXXXX) + +ENXIO=6 +# gmirror has special handling for ENXIO. It does not mark the failed component +# as broken, allowing it to rejoin the mirror automatically when it appears. +sysctl ${regreadfp}="1*return(${ENXIO})" +dd if=/dev/mirror/$name of=$tmp1 iseek=512 bs=$ddbs count=1 >/dev/null 2>&1 +dd if=/dev/$us1 of=$tmp2 iseek=512 bs=$ddbs count=1 >/dev/null 2>&1 +sysctl ${regreadfp}='off' + +if cmp -s $tmp1 $tmp2; then + echo "ok 1" +else + echo "not ok 1" +fi + +# Verify that the genids still match after ENXIO. +genid1=$(gmirror dump /dev/$us0 | awk '/^[[:space:]]*genid: /{print $2}') +genid2=$(gmirror dump /dev/$us1 | awk '/^[[:space:]]*genid: /{print $2}') +if [ $genid1 -eq $genid2 ]; then + echo "ok 2" +else + echo "not ok 2" +fi + +# Trigger a syncid bump. +dd if=/dev/zero of=/dev/mirror/$name bs=$ddbs count=1 >/dev/null 2>&1 + +# The ENXIO+write should have caused a syncid bump. +syncid1=$(gmirror dump /dev/$us0 | awk '/^[[:space:]]*syncid: /{print $2}') +syncid2=$(gmirror dump /dev/$us1 | awk '/^[[:space:]]*syncid: /{print $2}') +if [ $syncid1 -eq $(($syncid2 + 1)) -o $syncid2 -eq $(($syncid1 + 1)) ]; then + echo "ok 3" +else + echo "not ok 3" +fi + +# Force a retaste of the disconnected component. +if [ $(gmirror status -s $name | awk '{print $3}') = $us0 ]; then + detach_md $us1 + us1=$(attach_md -t vnode -f $m2) +else + detach_md $us0 + us0=$(attach_md -t vnode -f $m1) +fi + +# Make sure that the retaste caused the mirror to automatically be re-added. +if [ $(gmirror status -s $name | wc -l) -eq 2 ]; then + echo "ok 4" +else + echo "not ok 4" +fi + +syncwait + +rm -f $m1 $m2 $tmp1 $tmp2 Copied: stable/11/tests/sys/geom/class/mirror/12_test.sh (from r326861, head/tests/sys/geom/class/mirror/12_test.sh) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/11/tests/sys/geom/class/mirror/12_test.sh Thu Jan 4 16:19:56 2018 (r327553, copy of r326861, head/tests/sys/geom/class/mirror/12_test.sh) @@ -0,0 +1,68 @@ +#!/bin/sh +# $FreeBSD$ + +# Test handling of write errors. + +. $(dirname $0)/conf.sh + +echo 1..3 + +set -e + +ddbs=2048 +regwritefp="debug.fail_point.g_mirror_regular_request_write" +m1=$(mktemp $base.XXXXXX) +m2=$(mktemp $base.XXXXXX) + +dd if=/dev/zero of=$m1 bs=$ddbs count=1024 >/dev/null 2>&1 +dd if=/dev/zero of=$m2 bs=$ddbs count=1024 >/dev/null 2>&1 + +us0=$(attach_md -t vnode -f $m1) +us1=$(attach_md -t vnode -f $m2) + +gmirror label $name /dev/$us0 /dev/$us1 +devwait + +tmp1=$(mktemp $base.XXXXXX) +tmp2=$(mktemp $base.XXXXXX) +dd if=/dev/random of=$tmp1 bs=$ddbs count=1 >/dev/null 2>&1 + +EIO=5 +# gmirror should kick one of the mirrors out after hitting EIO. +sysctl ${regwritefp}="1*return(${EIO})" +dd if=$tmp1 of=/dev/mirror/$name bs=$ddbs count=1 >/dev/null 2>&1 +dd if=/dev/mirror/$name of=$tmp2 bs=$ddbs count=1 >/dev/null 2>&1 +sysctl ${regwritefp}='off' + +if cmp -s $tmp1 $tmp2; then + echo "ok 1" +else + echo "not ok 1" +fi + +# Make sure that one of the mirrors was marked broken. +genid1=$(gmirror dump /dev/$us0 | awk '/^[[:space:]]*genid: /{print $2}') +genid2=$(gmirror dump /dev/$us1 | awk '/^[[:space:]]*genid: /{print $2}') +if [ $genid1 -eq $(($genid2 + 1)) -o $genid2 -eq $(($genid1 + 1)) ]; then + echo "ok 2" +else + echo "not ok 2" +fi + +# Force a retaste of the disconnected component. +if [ $(gmirror status -s $name | awk '{print $3}') = $us0 ]; then + detach_md $us1 + us1=$(attach_md -t vnode -f $m2) +else + detach_md $us0 + us0=$(attach_md -t vnode -f $m1) +fi + +# Make sure that the component wasn't re-added to the gmirror. +if [ $(gmirror status -s $name | wc -l) -eq 1 ]; then + echo "ok 3" +else + echo "not ok 3" +fi + +rm -f $m1 $m2 $tmp1 $tmp2 Copied: stable/11/tests/sys/geom/class/mirror/13_test.sh (from r326861, head/tests/sys/geom/class/mirror/13_test.sh) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/11/tests/sys/geom/class/mirror/13_test.sh Thu Jan 4 16:19:56 2018 (r327553, copy of r326861, head/tests/sys/geom/class/mirror/13_test.sh) @@ -0,0 +1,81 @@ +#!/bin/sh +# $FreeBSD$ + +# Test handling of write errors. + +. $(dirname $0)/conf.sh + +echo 1..4 + +set -e + +ddbs=2048 +regwritefp="debug.fail_point.g_mirror_regular_request_write" +m1=$(mktemp $base.XXXXXX) +m2=$(mktemp $base.XXXXXX) + +dd if=/dev/random of=$m1 bs=$ddbs count=1024 >/dev/null 2>&1 +dd if=/dev/zero of=$m2 bs=$ddbs count=1024 >/dev/null 2>&1 + +us0=$(attach_md -t vnode -f $m1) +us1=$(attach_md -t vnode -f $m2) + +gmirror label $name /dev/$us0 /dev/$us1 +devwait + +tmp1=$(mktemp $base.XXXXXX) +tmp2=$(mktemp $base.XXXXXX) + +dd if=/dev/random of=$tmp1 bs=$ddbs count=1 >/dev/null 2>&1 + +ENXIO=6 +# gmirror has special handling for ENXIO. It does not mark the failed component +# as broken, allowing it to rejoin the mirror automatically when it appears. +sysctl ${regwritefp}="1*return(${ENXIO})" +dd if=$tmp1 of=/dev/mirror/$name bs=$ddbs count=1 >/dev/null 2>&1 +dd if=/dev/mirror/$name of=$tmp2 bs=$ddbs count=1 >/dev/null 2>&1 +sysctl ${regwritefp}='off' + +if cmp -s $tmp1 $tmp2; then + echo "ok 1" +else + echo "not ok 1" +fi + +# Verify that the genids still match after ENXIO. +genid1=$(gmirror dump /dev/$us0 | awk '/^[[:space:]]*genid: /{print $2}') +genid2=$(gmirror dump /dev/$us1 | awk '/^[[:space:]]*genid: /{print $2}') +if [ $genid1 -eq $genid2 ]; then + echo "ok 2" +else + echo "not ok 2" +fi + +# The ENXIO should have caused a syncid bump. +syncid1=$(gmirror dump /dev/$us0 | awk '/^[[:space:]]*syncid: /{print $2}') +syncid2=$(gmirror dump /dev/$us1 | awk '/^[[:space:]]*syncid: /{print $2}') +if [ $syncid1 -eq $(($syncid2 + 1)) -o $syncid2 -eq $(($syncid1 + 1)) ]; then + echo "ok 3" +else + echo "not ok 3" +fi + +# Force a retaste of the disconnected component. +if [ $(gmirror status -s $name | awk '{print $3}') = $us0 ]; then + detach_md $us1 + us1=$(attach_md -t vnode -f $m2) +else + detach_md $us0 + us0=$(attach_md -t vnode -f $m1) +fi + +# Make sure that the retaste caused the mirror to automatically be re-added. +if [ $(gmirror status -s $name | wc -l) -eq 2 ]; then + echo "ok 4" +else + echo "not ok 4" +fi + +syncwait + +rm -f $m1 $m2 $tmp1 $tmp2 Modified: stable/11/tests/sys/geom/class/mirror/8_test.sh ============================================================================== --- stable/11/tests/sys/geom/class/mirror/8_test.sh Thu Jan 4 16:18:30 2018 (r327552) +++ stable/11/tests/sys/geom/class/mirror/8_test.sh Thu Jan 4 16:19:56 2018 (r327553) @@ -35,9 +35,7 @@ devwait # This will take kern.geom.mirror.timeout seco # Re-attach the second mirror and wait for it to synchronize. us1=$(attach_md -t vnode -f $m2) || exit 1 -while [ $(gmirror status $name | grep ACTIVE | wc -l) -ne 2 ]; do - sleep 1 -done +syncwait # Verify the two mirrors are identical. Destroy the gmirror first so that # the mirror metadata is wiped; otherwise the metadata blocks will fail @@ -45,9 +43,9 @@ done # command instead. gmirror destroy $name if cmp -s ${m1} ${m2}; then - echo "ok 1" + echo "ok 1" else - echo "not ok 1" + echo "not ok 1" fi rm -f $m1 $m2 Modified: stable/11/tests/sys/geom/class/mirror/9_test.sh ============================================================================== --- stable/11/tests/sys/geom/class/mirror/9_test.sh Thu Jan 4 16:18:30 2018 (r327552) +++ stable/11/tests/sys/geom/class/mirror/9_test.sh Thu Jan 4 16:19:56 2018 (r327553) @@ -33,9 +33,7 @@ sysctl debug.fail_point.g_mirror_metadata_write='off' # Replace the broken mirror, and then stop the gmirror. gmirror forget $name || exit 1 gmirror insert $name /dev/$us2 || exit 1 -while [ $(gmirror status $name | grep ACTIVE | wc -l) -ne 2 ]; do - sleep 1 -done +syncwait gmirror stop $name || exit 1 # Restart the gmirror on the original two mirrors. One of them is broken, @@ -49,14 +47,12 @@ dd if=/dev/random of=/dev/mirror/$name bs=$ddbs count= # the metadata blocks will fail the comparison. It would be nice to do this # with a "gmirror verify" command instead. gmirror activate $name /dev/$us2 || exit 1 -while [ $(gmirror status $name | grep ACTIVE | wc -l) -ne 2 ]; do - sleep 1 -done +syncwait gmirror destroy $name || exit 1 if cmp -s $m1 $m3; then - echo "ok 1" + echo "ok 1" else - echo "not ok 1" + echo "not ok 1" fi rm -f $m1 $m2 $m3 Modified: stable/11/tests/sys/geom/class/mirror/Makefile ============================================================================== --- stable/11/tests/sys/geom/class/mirror/Makefile Thu Jan 4 16:18:30 2018 (r327552) +++ stable/11/tests/sys/geom/class/mirror/Makefile Thu Jan 4 16:19:56 2018 (r327553) @@ -13,6 +13,10 @@ TAP_TESTS_SH+= 6_test TAP_TESTS_SH+= 7_test TAP_TESTS_SH+= 8_test TAP_TESTS_SH+= 9_test +TAP_TESTS_SH+= 10_test +TAP_TESTS_SH+= 11_test +TAP_TESTS_SH+= 12_test +TAP_TESTS_SH+= 13_test ${PACKAGE}FILES+= conf.sh Modified: stable/11/tests/sys/geom/class/mirror/conf.sh ============================================================================== --- stable/11/tests/sys/geom/class/mirror/conf.sh Thu Jan 4 16:18:30 2018 (r327552) +++ stable/11/tests/sys/geom/class/mirror/conf.sh Thu Jan 4 16:19:56 2018 (r327553) @@ -12,4 +12,11 @@ gmirror_test_cleanup() } trap gmirror_test_cleanup ABRT EXIT INT TERM +syncwait() +{ + while $(gmirror status -s $name | grep -q SYNCHRONIZING); do + sleep 0.1; + done +} + . `dirname $0`/../geom_subr.sh From owner-svn-src-all@freebsd.org Thu Jan 4 17:58:49 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 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-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" 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-all@freebsd.org Thu Jan 4 18:14:59 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 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-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" 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-all@freebsd.org Thu Jan 4 19:35:57 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 0D384EB0D95; Thu, 4 Jan 2018 19:35:57 +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 CDBA17B8C9; Thu, 4 Jan 2018 19:35:56 +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 w04JZug9036029; Thu, 4 Jan 2018 19:35:56 GMT (envelope-from jkim@FreeBSD.org) Received: (from jkim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w04JZt7K036028; Thu, 4 Jan 2018 19:35:55 GMT (envelope-from jkim@FreeBSD.org) Message-Id: <201801041935.w04JZt7K036028@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jkim set sender to jkim@FreeBSD.org using -f From: Jung-uk Kim Date: Thu, 4 Jan 2018 19:35:55 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r327556 - stable/11/sys/dev/acpica/Osd X-SVN-Group: stable-11 X-SVN-Commit-Author: jkim X-SVN-Commit-Paths: stable/11/sys/dev/acpica/Osd X-SVN-Commit-Revision: 327556 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 04 Jan 2018 19:35:57 -0000 Author: jkim Date: Thu Jan 4 19:35:55 2018 New Revision: 327556 URL: https://svnweb.freebsd.org/changeset/base/327556 Log: MFC: r324501 Do not check whether AcpiOsGetTimer() is called during boot. Modified: stable/11/sys/dev/acpica/Osd/OsdSchedule.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/dev/acpica/Osd/OsdSchedule.c ============================================================================== --- stable/11/sys/dev/acpica/Osd/OsdSchedule.c Thu Jan 4 18:14:58 2018 (r327555) +++ stable/11/sys/dev/acpica/Osd/OsdSchedule.c Thu Jan 4 19:35:55 2018 (r327556) @@ -274,9 +274,6 @@ AcpiOsGetTimer(void) struct bintime bt; UINT64 t; - /* XXX During early boot there is no (decent) timer available yet. */ - KASSERT(cold == 0, ("acpi: timer op not yet supported during boot")); - binuptime(&bt); t = (uint64_t)bt.sec * 10000000; t += ((uint64_t)10000000 * (uint32_t)(bt.frac >> 32)) >> 32; From owner-svn-src-all@freebsd.org Thu Jan 4 19:43:45 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 606A3EB15EC; Thu, 4 Jan 2018 19:43:45 +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 CD5807C12B; Thu, 4 Jan 2018 19:43:44 +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 w04Jhi0P040516; Thu, 4 Jan 2018 19:43:44 GMT (envelope-from jkim@FreeBSD.org) Received: (from jkim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w04Jhhvp040506; Thu, 4 Jan 2018 19:43:43 GMT (envelope-from jkim@FreeBSD.org) Message-Id: <201801041943.w04Jhhvp040506@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jkim set sender to jkim@FreeBSD.org using -f From: Jung-uk Kim Date: Thu, 4 Jan 2018 19:43:43 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r327557 - in stable/11: sys/conf sys/contrib/dev/acpica sys/contrib/dev/acpica/common sys/contrib/dev/acpica/compiler sys/contrib/dev/acpica/components/debugger sys/contrib/dev/acpica/c... X-SVN-Group: stable-11 X-SVN-Commit-Author: jkim X-SVN-Commit-Paths: in stable/11: sys/conf sys/contrib/dev/acpica sys/contrib/dev/acpica/common sys/contrib/dev/acpica/compiler sys/contrib/dev/acpica/components/debugger sys/contrib/dev/acpica/components/disassembler sy... X-SVN-Commit-Revision: 327557 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 04 Jan 2018 19:43:45 -0000 Author: jkim Date: Thu Jan 4 19:43:42 2018 New Revision: 327557 URL: https://svnweb.freebsd.org/changeset/base/327557 Log: MFC: r323076, r324502, r325670, r326866 Merge ACPICA 20171214. Added: stable/11/sys/contrib/dev/acpica/compiler/aslallocate.c - copied unchanged from r324502, head/sys/contrib/dev/acpica/compiler/aslallocate.c stable/11/sys/contrib/dev/acpica/compiler/aslcache.c - copied unchanged from r324502, head/sys/contrib/dev/acpica/compiler/aslcache.c stable/11/sys/contrib/dev/acpica/components/utilities/utstrsuppt.c - copied, changed from r323076, head/sys/contrib/dev/acpica/components/utilities/utstrsuppt.c Modified: stable/11/sys/conf/files stable/11/sys/contrib/dev/acpica/changes.txt stable/11/sys/contrib/dev/acpica/common/adfile.c stable/11/sys/contrib/dev/acpica/common/adisasm.c stable/11/sys/contrib/dev/acpica/common/ahtable.c stable/11/sys/contrib/dev/acpica/common/dmswitch.c stable/11/sys/contrib/dev/acpica/common/dmtable.c stable/11/sys/contrib/dev/acpica/common/dmtables.c stable/11/sys/contrib/dev/acpica/common/dmtbdump.c stable/11/sys/contrib/dev/acpica/common/dmtbinfo.c stable/11/sys/contrib/dev/acpica/compiler/aslcodegen.c stable/11/sys/contrib/dev/acpica/compiler/aslcompile.c stable/11/sys/contrib/dev/acpica/compiler/aslcompiler.h stable/11/sys/contrib/dev/acpica/compiler/aslcompiler.l stable/11/sys/contrib/dev/acpica/compiler/asldebug.c stable/11/sys/contrib/dev/acpica/compiler/asldefine.h stable/11/sys/contrib/dev/acpica/compiler/aslerror.c stable/11/sys/contrib/dev/acpica/compiler/aslfiles.c stable/11/sys/contrib/dev/acpica/compiler/aslhelp.c stable/11/sys/contrib/dev/acpica/compiler/aslload.c stable/11/sys/contrib/dev/acpica/compiler/aslmain.c stable/11/sys/contrib/dev/acpica/compiler/aslmapenter.c stable/11/sys/contrib/dev/acpica/compiler/aslmaputils.c stable/11/sys/contrib/dev/acpica/compiler/aslmessages.c stable/11/sys/contrib/dev/acpica/compiler/aslmessages.h stable/11/sys/contrib/dev/acpica/compiler/aslmethod.c stable/11/sys/contrib/dev/acpica/compiler/asloperands.c stable/11/sys/contrib/dev/acpica/compiler/aslopt.c stable/11/sys/contrib/dev/acpica/compiler/asloptions.c stable/11/sys/contrib/dev/acpica/compiler/aslparseop.c stable/11/sys/contrib/dev/acpica/compiler/aslprintf.c stable/11/sys/contrib/dev/acpica/compiler/aslresource.c stable/11/sys/contrib/dev/acpica/compiler/aslrules.y stable/11/sys/contrib/dev/acpica/compiler/aslstartup.c stable/11/sys/contrib/dev/acpica/compiler/aslsupport.l stable/11/sys/contrib/dev/acpica/compiler/asltree.c stable/11/sys/contrib/dev/acpica/compiler/asltypes.h stable/11/sys/contrib/dev/acpica/compiler/aslutils.c stable/11/sys/contrib/dev/acpica/compiler/cvcompiler.c stable/11/sys/contrib/dev/acpica/compiler/cvdisasm.c stable/11/sys/contrib/dev/acpica/compiler/cvparser.c stable/11/sys/contrib/dev/acpica/compiler/dtcompile.c stable/11/sys/contrib/dev/acpica/compiler/dtcompiler.h stable/11/sys/contrib/dev/acpica/compiler/dtexpress.c stable/11/sys/contrib/dev/acpica/compiler/dtfield.c stable/11/sys/contrib/dev/acpica/compiler/dtio.c stable/11/sys/contrib/dev/acpica/compiler/dtparser.y stable/11/sys/contrib/dev/acpica/compiler/dtsubtable.c stable/11/sys/contrib/dev/acpica/compiler/dttable.c stable/11/sys/contrib/dev/acpica/compiler/dttable1.c stable/11/sys/contrib/dev/acpica/compiler/dttable2.c stable/11/sys/contrib/dev/acpica/compiler/dttemplate.c stable/11/sys/contrib/dev/acpica/compiler/dttemplate.h stable/11/sys/contrib/dev/acpica/compiler/dtutils.c stable/11/sys/contrib/dev/acpica/compiler/prexpress.c stable/11/sys/contrib/dev/acpica/compiler/prmacros.c stable/11/sys/contrib/dev/acpica/compiler/prparser.y stable/11/sys/contrib/dev/acpica/compiler/prscan.c stable/11/sys/contrib/dev/acpica/compiler/prutils.c stable/11/sys/contrib/dev/acpica/components/debugger/dbconvert.c stable/11/sys/contrib/dev/acpica/components/debugger/dbexec.c stable/11/sys/contrib/dev/acpica/components/debugger/dbfileio.c stable/11/sys/contrib/dev/acpica/components/debugger/dbinput.c stable/11/sys/contrib/dev/acpica/components/disassembler/dmresrc.c stable/11/sys/contrib/dev/acpica/components/disassembler/dmwalk.c stable/11/sys/contrib/dev/acpica/components/dispatcher/dscontrol.c stable/11/sys/contrib/dev/acpica/components/dispatcher/dsfield.c stable/11/sys/contrib/dev/acpica/components/dispatcher/dsobject.c stable/11/sys/contrib/dev/acpica/components/dispatcher/dspkginit.c stable/11/sys/contrib/dev/acpica/components/dispatcher/dsutils.c stable/11/sys/contrib/dev/acpica/components/dispatcher/dswexec.c stable/11/sys/contrib/dev/acpica/components/dispatcher/dswload.c stable/11/sys/contrib/dev/acpica/components/dispatcher/dswload2.c stable/11/sys/contrib/dev/acpica/components/events/evgpe.c stable/11/sys/contrib/dev/acpica/components/events/evregion.c stable/11/sys/contrib/dev/acpica/components/executer/exconcat.c stable/11/sys/contrib/dev/acpica/components/executer/exconvrt.c stable/11/sys/contrib/dev/acpica/components/executer/exdump.c stable/11/sys/contrib/dev/acpica/components/executer/exmisc.c stable/11/sys/contrib/dev/acpica/components/executer/exresop.c stable/11/sys/contrib/dev/acpica/components/hardware/hwgpe.c stable/11/sys/contrib/dev/acpica/components/hardware/hwregs.c stable/11/sys/contrib/dev/acpica/components/hardware/hwtimer.c stable/11/sys/contrib/dev/acpica/components/hardware/hwvalid.c stable/11/sys/contrib/dev/acpica/components/hardware/hwxface.c stable/11/sys/contrib/dev/acpica/components/namespace/nsaccess.c stable/11/sys/contrib/dev/acpica/components/namespace/nsconvert.c stable/11/sys/contrib/dev/acpica/components/namespace/nsnames.c stable/11/sys/contrib/dev/acpica/components/namespace/nssearch.c stable/11/sys/contrib/dev/acpica/components/namespace/nsxfeval.c stable/11/sys/contrib/dev/acpica/components/parser/psargs.c stable/11/sys/contrib/dev/acpica/components/parser/psobject.c stable/11/sys/contrib/dev/acpica/components/parser/psutils.c stable/11/sys/contrib/dev/acpica/components/tables/tbxface.c stable/11/sys/contrib/dev/acpica/components/utilities/utdebug.c stable/11/sys/contrib/dev/acpica/components/utilities/utdecode.c stable/11/sys/contrib/dev/acpica/components/utilities/uterror.c stable/11/sys/contrib/dev/acpica/components/utilities/utinit.c stable/11/sys/contrib/dev/acpica/components/utilities/utmath.c stable/11/sys/contrib/dev/acpica/components/utilities/utmutex.c stable/11/sys/contrib/dev/acpica/components/utilities/utnonansi.c stable/11/sys/contrib/dev/acpica/components/utilities/utosi.c stable/11/sys/contrib/dev/acpica/components/utilities/utstrtoul64.c stable/11/sys/contrib/dev/acpica/components/utilities/uttrack.c stable/11/sys/contrib/dev/acpica/components/utilities/utxferror.c stable/11/sys/contrib/dev/acpica/include/acapps.h stable/11/sys/contrib/dev/acpica/include/acconfig.h stable/11/sys/contrib/dev/acpica/include/acdebug.h stable/11/sys/contrib/dev/acpica/include/acdisasm.h stable/11/sys/contrib/dev/acpica/include/acexcep.h stable/11/sys/contrib/dev/acpica/include/acglobal.h stable/11/sys/contrib/dev/acpica/include/achware.h stable/11/sys/contrib/dev/acpica/include/acinterp.h stable/11/sys/contrib/dev/acpica/include/aclocal.h stable/11/sys/contrib/dev/acpica/include/acmacros.h stable/11/sys/contrib/dev/acpica/include/acnamesp.h stable/11/sys/contrib/dev/acpica/include/acpixf.h stable/11/sys/contrib/dev/acpica/include/actbl1.h stable/11/sys/contrib/dev/acpica/include/actbl2.h stable/11/sys/contrib/dev/acpica/include/actypes.h stable/11/sys/contrib/dev/acpica/include/acutils.h stable/11/sys/contrib/dev/acpica/os_specific/service_layers/osgendbg.c stable/11/sys/dev/acpica/acpi_cpu.c stable/11/usr.sbin/acpi/acpidb/Makefile stable/11/usr.sbin/acpi/iasl/Makefile Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/conf/files ============================================================================== --- stable/11/sys/conf/files Thu Jan 4 19:35:55 2018 (r327556) +++ stable/11/sys/conf/files Thu Jan 4 19:43:42 2018 (r327557) @@ -515,6 +515,7 @@ contrib/dev/acpica/components/utilities/utresdecode.c contrib/dev/acpica/components/utilities/utresrc.c optional acpi contrib/dev/acpica/components/utilities/utstate.c optional acpi contrib/dev/acpica/components/utilities/utstring.c optional acpi +contrib/dev/acpica/components/utilities/utstrsuppt.c optional acpi contrib/dev/acpica/components/utilities/utstrtoul64.c optional acpi contrib/dev/acpica/components/utilities/utuuid.c optional acpi acpi_debug contrib/dev/acpica/components/utilities/utxface.c optional acpi Modified: stable/11/sys/contrib/dev/acpica/changes.txt ============================================================================== --- stable/11/sys/contrib/dev/acpica/changes.txt Thu Jan 4 19:35:55 2018 (r327556) +++ stable/11/sys/contrib/dev/acpica/changes.txt Thu Jan 4 19:43:42 2018 (r327557) @@ -1,4 +1,246 @@ ---------------------------------------- +14 December 2017. Summary of changes for version 20171214: + + +1) ACPICA kernel-resident subsystem: + +Fixed a regression in the external (public) AcpiEvaluateObjectTyped +interface where the optional "pathname" argument had inadvertently become +a required argument returning an error if omitted (NULL pointer +argument). + +Fixed two possible memory leaks related to the recently developed "late +resolution" of reference objects within ASL Package Object definitions. + +Added two recently defined _OSI strings: "Windows 2016" and "Windows +2017". Mario Limonciello. + +Implemented and deployed a safer version of the C library function +strncpy: AcpiUtSafeStrncpy. The intent is to at least prevent the +creation of unterminated strings as a possible result of a standard +strncpy. + +Cleaned up and restructured the global variable file (acglobal.h). There +are many changes, but no functional changes. + + +2) iASL Compiler/Disassembler and Tools: + +iASL Table Compiler: Fixed a problem with the DBG2 ACPI table where the +optional OemData field at the end of the table was incorrectly required +for proper compilation. It is now correctly an optional field. + +ASLTS: The entire suite was converted from standard ASL to the ASL+ +language, using the ASL-to-ASL+ converter which is integrated into the +iASL compiler. A binary compare of all output files has verified the +correctness of the conversion. + +iASL: Fixed the source code build for platforms where "char" is unsigned. +This affected the iASL lexer only. Jung-uk Kim. + +---------------------------------------- +10 November 2017. Summary of changes for version 20171110: + + +1) ACPICA kernel-resident subsystem: + +This release implements full support for ACPI 6.2A: + NFIT - Added a new subtable, "Platform Capabilities Structure" +No other changes to ACPICA were required, since ACPI 6.2A is primarily an +errata release of the specification. + +Other ACPI table changes: + IORT: Added the SMMUv3 Device ID mapping index. Hanjun Guo + PPTT: Added cache attribute flag definitions to actbl1.h. Jeremy +Linton + +Utilities: Modified the string/integer conversion functions to use +internal 64-bit divide support instead of a native divide. On 32-bit +platforms, a 64-bit divide typically requires a library function which +may not be present in the build (kernel or otherwise). + +Implemented a targeted error message for timeouts returned from the +Embedded Controller device driver. This is seen frequently enough to +special-case an AE_TIME returned from an EC operation region access: + "Timeout from EC hardware or EC device driver" + +Changed the "ACPI Exception" message prefix to "ACPI Error" so that all +runtime error messages have the identical prefix. + + +2) iASL Compiler/Disassembler and Tools: + +AcpiXtract: Fixed a problem with table header detection within the +acpidump file. Processing a table could be ended early if a 0x40 (@) +appears in the original binary table, resulting in the @ symbol appearing +in the decoded ASCII field at the end of the acpidump text line. The +symbol caused acpixtract to incorrectly think it had reached the end of +the current table and the beginning of a new table. + +AcpiXtract: Added an option (-f) to ignore some errors during table +extraction. This initial implementation ignores non-ASCII and non- +printable characters found in the acpidump text file. + +TestSuite(ASLTS)/AcpiExec: Fixed and restored the memory usage statistics +for ASLTS. This feature is used to track memory allocations from +different memory caches within the ACPICA code. At the end of an ASLTS +run, these memory statistics are recorded and stored in a log file. + +Debugger (user-space version): Implemented a simple "Background" command. +Creates a new thread to execute a control method in the background, while +control returns to the debugger prompt to allow additional commands. + Syntax: Background [Arguments] + +---------------------------------------- +29 September 2017. Summary of changes for version 20170929: + + +1) ACPICA kernel-resident subsystem: + +Redesigned and implemented an improved ASL While() loop timeout +mechanism. This mechanism is used to prevent infinite loops in the kernel +AML interpreter caused by either non-responsive hardware or incorrect AML +code. The new implementation uses AcpiOsGetTimer instead of a simple +maximum loop count, and is thus more accurate and constant across +different machines. The default timeout is currently 30 seconds, but this +may be adjusted later. + +Renamed the ACPI_AML_INFINITE_LOOP exception to AE_AML_LOOP_TIMEOUT to +better reflect the new implementation of the loop timeout mechanism. + +Updated the AcpiGetTimerDuration interface to cleanup the 64-bit support +and to fix an off-by-one error. Jung-uk Kim. + +Fixed an EFI build problem by updating the makefiles to for a new file +that was added, utstrsuppt.c + + +2) iASL Compiler/Disassembler and Tools: + +Implemented full support for the PDTT, SDEV, and TPM2 ACPI tables. This +includes support in the table disassembler, compiler, and template +generator. + +iASL: Added an exception for an illegal type of recursive method +invocation. If a method creates named objects, the first recursive call +will fail at runtime. This change adds an error detection at compile time +to catch the problem up front. Note: Marking such a method as +"serialized" will not help with this problem, because the same thread can +acquire the method mutex more than once. Example compiler and runtime +output: + + Method (MTH1) + { + Name (INT1, 1) + MTH1 () + } + + dsdt.asl 22: MTH1 () + Error 6152 - ^ Illegal recursive call to method + that creates named objects (MTH1) + +Previous runtime exception: + ACPI Error: [INT1] Namespace lookup failure, + AE_ALREADY_EXISTS (20170831/dswload2-465) + +iASL: Updated support for External() opcodes to improve namespace +management and error detection. These changes are related to issues seen +with multiple-segment namespace pathnames within External declarations, +such as below: + + External(\_SB.PCI0.GFX0, DeviceObj) + External(\_SB.PCI0.GFX0.ALSI) + +iASL: Implemented support for multi-line error/warning messages. This +enables more detailed and helpful error messages as below, from the +initial deployment for the duplicate names error: + + DSDT.iiii 1692: Device(PEG2) { + Error 6074 - ^ Name already exists in scope +(PEG2) + + Original name creation/declaration below: + DSDT.iiii 93: External(\_SB.PCI0.PEG2, DeviceObj) + +AcpiXtract: Added additional flexibility to support differing input hex +dump formats. Specifically, hex dumps that contain partial disassembly +and/or comments within the ACPI table data definition. There exist some +dump utilities seen in the field that create this type of hex dump (such +as Simics). For example: + + DSDT @ 0xdfffd0c0 (10999 bytes) + Signature DSDT + Length 10999 + Revision 1 + Checksum 0xf3 (Ok) + OEM_ID BXPC + OEM_table_id BXDSDT + OEM_revision 1 + Creator_id 1280593481 + Creator_revision 537399345 + 0000: 44 53 44 54 f7 2a 00 00 01 f3 42 58 50 43 00 00 + ... + 2af0: 5f 4c 30 46 00 a4 01 + +Test suite: Miscellaneous changes/fixes: + More cleanup and simplification of makefiles + Continue compilation of test cases after a compile failure + Do not perform binary compare unless both files actually exist + +iASL: Performed some code/module restructuring. Moved all memory +allocation functions to new modules. Two new files, aslallocate.c and +aslcache.c + +---------------------------------------- +31 August 2017. Summary of changes for version 20170831: + + +1) ACPICA kernel-resident subsystem: + +Implemented internal support for full 64-bit addresses that appear in all +Generic Address Structure (GAS) structures. Previously, only the lower 32 +bits were used. Affects the use of GAS structures in the FADT and other +tables, as well as the GAS structures passed to the AcpiRead and +AcpiWrite public external interfaces that are used by drivers. Lv Zheng. + +Added header support for the PDTT ACPI table (Processor Debug Trigger +Table). Full support in the iASL Data Table Compiler and disassembler is +forthcoming. + + +2) iASL Compiler/Disassembler and Tools: + +iASL/Disassembler: Fixed a problem with the PPTT ACPI table (Processor +Properties Topology Table) where a flag bit was specified in the wrong +bit position ("Line Size Valid", bit 6). + +iASL: Implemented support for Octal integer constants as defined by the +ASL language grammar, per the ACPI specification. Any integer constant +that starts with a zero is an octal constant. For example, + Store (037777, Local0) /* Octal constant */ + Store (0x3FFF, Local0) /* Hex equivalent */ + Store (16383, Local0) /* Decimal equivalent */ + +iASL: Improved overflow detection for 64-bit string conversions during +compilation of integer constants. "Overflow" in this case means a string +that represents an integer that is too large to fit into a 64-bit value. +Any 64-bit constants within a 32-bit DSDT or SSDT are still truncated to +the low-order 32 bits with a warning, as previously implemented. Several +new exceptions are defined that indicate a 64-bit overflow, as well as +the base (radix) that was used during the attempted conversion. Examples: + Local0 = 0xAAAABBBBCCCCDDDDEEEEFFFF // AE_HEX_OVERFLOW + Local0 = 01111222233334444555566667777 // AE_OCTAL_OVERFLOW + Local0 = 11112222333344445555666677778888 // AE_DECIMAL_OVERFLOW + +iASL: Added a warning for the case where a ResourceTemplate is declared +with no ResourceDescriptor entries (coded as "ResourceTemplate(){}"). In +this case, the resulting template is created with a single END_TAG +descriptor, which is essentially useless. + +iASL: Expanded the -vw option (ignore specific warnings/remarks) to +include compilation error codes as well. + +---------------------------------------- 28 July 2017. Summary of changes for version 20170728: Modified: stable/11/sys/contrib/dev/acpica/common/adfile.c ============================================================================== --- stable/11/sys/contrib/dev/acpica/common/adfile.c Thu Jan 4 19:35:55 2018 (r327556) +++ stable/11/sys/contrib/dev/acpica/common/adfile.c Thu Jan 4 19:43:42 2018 (r327557) @@ -314,7 +314,7 @@ FlGenerateFilename ( * Copy the original filename to a new buffer. Leave room for the worst * case where we append the suffix, an added dot and the null terminator. */ - NewFilename = UtStringCacheCalloc ((ACPI_SIZE) + NewFilename = UtLocalCacheCalloc ((ACPI_SIZE) strlen (InputFilename) + strlen (Suffix) + 2); strcpy (NewFilename, InputFilename); @@ -358,7 +358,7 @@ FlStrdup ( char *NewString; - NewString = UtStringCacheCalloc ((ACPI_SIZE) strlen (String) + 1); + NewString = UtLocalCacheCalloc ((ACPI_SIZE) strlen (String) + 1); strcpy (NewString, String); return (NewString); } Modified: stable/11/sys/contrib/dev/acpica/common/adisasm.c ============================================================================== --- stable/11/sys/contrib/dev/acpica/common/adisasm.c Thu Jan 4 19:35:55 2018 (r327556) +++ stable/11/sys/contrib/dev/acpica/common/adisasm.c Thu Jan 4 19:43:42 2018 (r327557) @@ -457,9 +457,9 @@ AdDisassembleOneTable ( * (.xxx) file produced from the converter in case if * it fails to get deleted. */ - if (Gbl_CaptureComments) + if (AcpiGbl_CaptureComments) { - strncpy (Table->Signature, AcpiGbl_TableSig, 4); + strncpy (Table->Signature, AcpiGbl_TableSig, ACPI_NAME_SIZE); } #endif Modified: stable/11/sys/contrib/dev/acpica/common/ahtable.c ============================================================================== --- stable/11/sys/contrib/dev/acpica/common/ahtable.c Thu Jan 4 19:35:55 2018 (r327556) +++ stable/11/sys/contrib/dev/acpica/common/ahtable.c Thu Jan 4 19:43:42 2018 (r327557) @@ -232,6 +232,7 @@ const AH_TABLE Gbl_AcpiSupportedTables[] = {ACPI_SIG_MTMR, "MID Timer Table"}, {ACPI_SIG_NFIT, "NVDIMM Firmware Interface Table"}, {ACPI_SIG_PCCT, "Platform Communications Channel Table"}, + {ACPI_SIG_PDTT, "Platform Debug Trigger Table"}, {ACPI_SIG_PMTT, "Platform Memory Topology Table"}, {ACPI_SIG_PPTT, "Processor Properties Topology Table"}, {ACPI_SIG_RASF, "RAS Features Table"}, @@ -240,6 +241,7 @@ const AH_TABLE Gbl_AcpiSupportedTables[] = {ACPI_SIG_S3PT, "S3 Performance Table"}, {ACPI_SIG_SBST, "Smart Battery Specification Table"}, {ACPI_SIG_SDEI, "Software Delegated Exception Interface Table"}, + {ACPI_SIG_SDEV, "Secure Devices table"}, {ACPI_SIG_SLIC, "Software Licensing Description Table"}, {ACPI_SIG_SLIT, "System Locality Information Table"}, {ACPI_SIG_SPCR, "Serial Port Console Redirection table"}, Modified: stable/11/sys/contrib/dev/acpica/common/dmswitch.c ============================================================================== --- stable/11/sys/contrib/dev/acpica/common/dmswitch.c Thu Jan 4 19:35:55 2018 (r327556) +++ stable/11/sys/contrib/dev/acpica/common/dmswitch.c Thu Jan 4 19:43:42 2018 (r327557) @@ -543,6 +543,10 @@ AcpiDmIsSwitchBlock ( * statement, so check for it. */ CurrentOp = StoreOp->Common.Next->Common.Next; + if (!CurrentOp) + { + return (FALSE); + } if (CurrentOp->Common.AmlOpcode == AML_ELSE_OP) { CurrentOp = CurrentOp->Common.Next; Modified: stable/11/sys/contrib/dev/acpica/common/dmtable.c ============================================================================== --- stable/11/sys/contrib/dev/acpica/common/dmtable.c Thu Jan 4 19:35:55 2018 (r327556) +++ stable/11/sys/contrib/dev/acpica/common/dmtable.c Thu Jan 4 19:43:42 2018 (r327557) @@ -154,7 +154,6 @@ #include #include #include -#include /* This module used for application-level code only */ @@ -290,9 +289,9 @@ static const char *AcpiDmHestSubnames[] = "IA-32 Machine Check Exception", "IA-32 Corrected Machine Check", "IA-32 Non-Maskable Interrupt", - "Unknown SubTable Type", /* 3 - Reserved */ - "Unknown SubTable Type", /* 4 - Reserved */ - "Unknown SubTable Type", /* 5 - Reserved */ + "Unknown Subtable Type", /* 3 - Reserved */ + "Unknown Subtable Type", /* 4 - Reserved */ + "Unknown Subtable Type", /* 5 - Reserved */ "PCI Express Root Port AER", "PCI Express AER (AER Endpoint)", "PCI Express/PCI-X Bridge AER", @@ -357,6 +356,7 @@ static const char *AcpiDmNfitSubnames[] = "NVDIMM Control Region", /* ACPI_NFIT_TYPE_CONTROL_REGION */ "NVDIMM Block Data Window Region", /* ACPI_NFIT_TYPE_DATA_REGION */ "Flush Hint Address", /* ACPI_NFIT_TYPE_FLUSH_ADDRESS */ + "Platform Capabilities", /* ACPI_NFIT_TYPE_CAPABILITIES */ "Unknown Subtable Type" /* Reserved */ }; @@ -374,7 +374,7 @@ static const char *AcpiDmPmttSubnames[] = { "Socket", /* ACPI_PMTT_TYPE_SOCKET */ "Memory Controller", /* ACPI_PMTT_TYPE_CONTROLLER */ - "Physical Component (DIMM)", /* ACPI_PMTT_TYPE_DIMM */ + "Physical Component (DIMM)", /* ACPI_PMTT_TYPE_DIMM */ "Unknown Subtable Type" /* Reserved */ }; @@ -382,10 +382,17 @@ static const char *AcpiDmPpttSubnames[] = { "Processor Hierarchy Node", /* ACPI_PPTT_TYPE_PROCESSOR */ "Cache Type", /* ACPI_PPTT_TYPE_CACHE */ - "ID", /* ACPI_PMTT_TYPE_ID */ + "ID", /* ACPI_PPTT_TYPE_ID */ "Unknown Subtable Type" /* Reserved */ }; +static const char *AcpiDmSdevSubnames[] = +{ + "Namespace Device", /* ACPI_SDEV_TYPE_NAMESPACE_DEVICE */ + "PCIe Endpoint Device", /* ACPI_SDEV_TYPE_PCIE_ENDPOINT_DEVICE */ + "Unknown Subtable Type" /* Reserved */ +}; + static const char *AcpiDmSratSubnames[] = { "Processor Local APIC/SAPIC Affinity", @@ -396,6 +403,23 @@ static const char *AcpiDmSratSubnames[] = "Unknown Subtable Type" /* Reserved */ }; +static const char *AcpiDmTpm2Subnames[] = +{ + "Illegal Start Method value", + "Reserved", + "ACPI Start Method", + "Reserved", + "Reserved", + "Reserved", + "Memory Mapped I/O", + "Command Response Buffer", + "Command Response Buffer with ACPI Start Method", + "Reserved", + "Reserved", + "Command Response Buffer with ARM SMC", + "Unknown Subtable Type" /* Reserved */ +}; + static const char *AcpiDmIvrsSubnames[] = { "Hardware Definition Block", @@ -487,6 +511,7 @@ const ACPI_DMTABLE_DATA AcpiDmTableData[] = {ACPI_SIG_MTMR, NULL, AcpiDmDumpMtmr, DtCompileMtmr, TemplateMtmr}, {ACPI_SIG_NFIT, AcpiDmTableInfoNfit, AcpiDmDumpNfit, DtCompileNfit, TemplateNfit}, {ACPI_SIG_PCCT, AcpiDmTableInfoPcct, AcpiDmDumpPcct, DtCompilePcct, TemplatePcct}, + {ACPI_SIG_PDTT, AcpiDmTableInfoPdtt, AcpiDmDumpPdtt, DtCompilePdtt, TemplatePdtt}, {ACPI_SIG_PMTT, NULL, AcpiDmDumpPmtt, DtCompilePmtt, TemplatePmtt}, {ACPI_SIG_PPTT, NULL, AcpiDmDumpPptt, DtCompilePptt, TemplatePptt}, {ACPI_SIG_RASF, AcpiDmTableInfoRasf, NULL, NULL, TemplateRasf}, @@ -494,6 +519,7 @@ const ACPI_DMTABLE_DATA AcpiDmTableData[] = {ACPI_SIG_S3PT, NULL, NULL, NULL, TemplateS3pt}, {ACPI_SIG_SBST, AcpiDmTableInfoSbst, NULL, NULL, TemplateSbst}, {ACPI_SIG_SDEI, AcpiDmTableInfoSdei, NULL, NULL, TemplateSdei}, + {ACPI_SIG_SDEV, AcpiDmTableInfoSdev, AcpiDmDumpSdev, DtCompileSdev, TemplateSdev}, {ACPI_SIG_SLIC, NULL, AcpiDmDumpSlic, DtCompileSlic, TemplateSlic}, {ACPI_SIG_SLIT, NULL, AcpiDmDumpSlit, DtCompileSlit, TemplateSlit}, {ACPI_SIG_SPCR, AcpiDmTableInfoSpcr, NULL, NULL, TemplateSpcr}, @@ -501,7 +527,7 @@ const ACPI_DMTABLE_DATA AcpiDmTableData[] = {ACPI_SIG_SRAT, NULL, AcpiDmDumpSrat, DtCompileSrat, TemplateSrat}, {ACPI_SIG_STAO, NULL, AcpiDmDumpStao, DtCompileStao, TemplateStao}, {ACPI_SIG_TCPA, NULL, AcpiDmDumpTcpa, DtCompileTcpa, TemplateTcpa}, - {ACPI_SIG_TPM2, AcpiDmTableInfoTpm2, NULL, NULL, TemplateTpm2}, + {ACPI_SIG_TPM2, AcpiDmTableInfoTpm2, AcpiDmDumpTpm2, DtCompileTpm2, TemplateTpm2}, {ACPI_SIG_UEFI, AcpiDmTableInfoUefi, NULL, DtCompileUefi, TemplateUefi}, {ACPI_SIG_VRTC, AcpiDmTableInfoVrtc, AcpiDmDumpVrtc, DtCompileVrtc, TemplateVrtc}, {ACPI_SIG_WAET, AcpiDmTableInfoWaet, NULL, NULL, TemplateWaet}, @@ -917,6 +943,7 @@ AcpiDmDumpTable ( case ACPI_DMT_PCCT: case ACPI_DMT_PMTT: case ACPI_DMT_PPTT: + case ACPI_DMT_SDEV: case ACPI_DMT_SRAT: case ACPI_DMT_ASF: case ACPI_DMT_HESTNTYP: @@ -948,6 +975,7 @@ AcpiDmDumpTable ( case ACPI_DMT_NAME4: case ACPI_DMT_SIG: case ACPI_DMT_LPIT: + case ACPI_DMT_TPM2: ByteLength = 4; break; @@ -1583,6 +1611,20 @@ AcpiDmDumpTable ( CurrentOffset, NULL); break; + case ACPI_DMT_SDEV: + + /* SDEV subtable types */ + + Temp8 = *Target; + if (Temp8 > ACPI_SDEV_TYPE_RESERVED) + { + Temp8 = ACPI_SDEV_TYPE_RESERVED; + } + + AcpiOsPrintf (UINT8_FORMAT, *Target, + AcpiDmSdevSubnames[Temp8]); + break; + case ACPI_DMT_SRAT: /* SRAT subtable types */ @@ -1596,6 +1638,21 @@ AcpiDmDumpTable ( AcpiOsPrintf (UINT8_FORMAT, *Target, AcpiDmSratSubnames[Temp8]); break; + + case ACPI_DMT_TPM2: + + /* TPM2 Start Method types */ + + Temp8 = *Target; + if (Temp8 > ACPI_TPM2_RESERVED) + { + Temp8 = ACPI_TPM2_RESERVED; + } + + AcpiOsPrintf (UINT8_FORMAT, *Target, + AcpiDmTpm2Subnames[Temp8]); + break; + case ACPI_DMT_FADTPM: Modified: stable/11/sys/contrib/dev/acpica/common/dmtables.c ============================================================================== --- stable/11/sys/contrib/dev/acpica/common/dmtables.c Thu Jan 4 19:35:55 2018 (r327556) +++ stable/11/sys/contrib/dev/acpica/common/dmtables.c Thu Jan 4 19:43:42 2018 (r327557) @@ -314,7 +314,7 @@ AdCreateTableHeader ( /* * Print comments that come before this definition block. */ - if (Gbl_CaptureComments) + if (AcpiGbl_CaptureComments) { ASL_CV_PRINT_ONE_COMMENT(AcpiGbl_ParseOpRoot,AML_COMMENT_STANDARD, NULL, 0); } @@ -517,7 +517,7 @@ AdParseTable ( } #ifdef ACPI_ASL_COMPILER - if (Gbl_CaptureComments) + if (AcpiGbl_CaptureComments) { AcpiGbl_ParseOpRoot->Common.CvFilename = AcpiGbl_FileTreeRoot->Filename; } Modified: stable/11/sys/contrib/dev/acpica/common/dmtbdump.c ============================================================================== --- stable/11/sys/contrib/dev/acpica/common/dmtbdump.c Thu Jan 4 19:35:55 2018 (r327556) +++ stable/11/sys/contrib/dev/acpica/common/dmtbdump.c Thu Jan 4 19:43:42 2018 (r327557) @@ -623,7 +623,7 @@ AcpiDmDumpAsf ( { ACPI_STATUS Status; UINT32 Offset = sizeof (ACPI_TABLE_HEADER); - ACPI_ASF_INFO *SubTable; + ACPI_ASF_INFO *Subtable; ACPI_DMTABLE_INFO *InfoTable; ACPI_DMTABLE_INFO *DataInfoTable = NULL; UINT8 *DataTable = NULL; @@ -636,13 +636,13 @@ AcpiDmDumpAsf ( /* No main table, only subtables */ - SubTable = ACPI_ADD_PTR (ACPI_ASF_INFO, Table, Offset); + Subtable = ACPI_ADD_PTR (ACPI_ASF_INFO, Table, Offset); while (Offset < Table->Length) { /* Common subtable header */ - Status = AcpiDmDumpTable (Table->Length, Offset, SubTable, - SubTable->Header.Length, AcpiDmTableInfoAsfHdr); + Status = AcpiDmDumpTable (Table->Length, Offset, Subtable, + Subtable->Header.Length, AcpiDmTableInfoAsfHdr); if (ACPI_FAILURE (Status)) { return; @@ -650,7 +650,7 @@ AcpiDmDumpAsf ( /* The actual type is the lower 7 bits of Type */ - Type = (UINT8) (SubTable->Header.Type & 0x7F); + Type = (UINT8) (Subtable->Header.Type & 0x7F); switch (Type) { @@ -663,9 +663,9 @@ AcpiDmDumpAsf ( InfoTable = AcpiDmTableInfoAsf1; DataInfoTable = AcpiDmTableInfoAsf1a; - DataTable = ACPI_ADD_PTR (UINT8, SubTable, sizeof (ACPI_ASF_ALERT)); - DataCount = ACPI_CAST_PTR (ACPI_ASF_ALERT, SubTable)->Alerts; - DataLength = ACPI_CAST_PTR (ACPI_ASF_ALERT, SubTable)->DataLength; + DataTable = ACPI_ADD_PTR (UINT8, Subtable, sizeof (ACPI_ASF_ALERT)); + DataCount = ACPI_CAST_PTR (ACPI_ASF_ALERT, Subtable)->Alerts; + DataLength = ACPI_CAST_PTR (ACPI_ASF_ALERT, Subtable)->DataLength; DataOffset = Offset + sizeof (ACPI_ASF_ALERT); break; @@ -673,9 +673,9 @@ AcpiDmDumpAsf ( InfoTable = AcpiDmTableInfoAsf2; DataInfoTable = AcpiDmTableInfoAsf2a; - DataTable = ACPI_ADD_PTR (UINT8, SubTable, sizeof (ACPI_ASF_REMOTE)); - DataCount = ACPI_CAST_PTR (ACPI_ASF_REMOTE, SubTable)->Controls; - DataLength = ACPI_CAST_PTR (ACPI_ASF_REMOTE, SubTable)->DataLength; + DataTable = ACPI_ADD_PTR (UINT8, Subtable, sizeof (ACPI_ASF_REMOTE)); + DataCount = ACPI_CAST_PTR (ACPI_ASF_REMOTE, Subtable)->Controls; + DataLength = ACPI_CAST_PTR (ACPI_ASF_REMOTE, Subtable)->DataLength; DataOffset = Offset + sizeof (ACPI_ASF_REMOTE); break; @@ -687,20 +687,20 @@ AcpiDmDumpAsf ( case ACPI_ASF_TYPE_ADDRESS: InfoTable = AcpiDmTableInfoAsf4; - DataTable = ACPI_ADD_PTR (UINT8, SubTable, sizeof (ACPI_ASF_ADDRESS)); - DataLength = ACPI_CAST_PTR (ACPI_ASF_ADDRESS, SubTable)->Devices; + DataTable = ACPI_ADD_PTR (UINT8, Subtable, sizeof (ACPI_ASF_ADDRESS)); + DataLength = ACPI_CAST_PTR (ACPI_ASF_ADDRESS, Subtable)->Devices; DataOffset = Offset + sizeof (ACPI_ASF_ADDRESS); break; default: AcpiOsPrintf ("\n**** Unknown ASF subtable type 0x%X\n", - SubTable->Header.Type); + Subtable->Header.Type); return; } - Status = AcpiDmDumpTable (Table->Length, Offset, SubTable, - SubTable->Header.Length, InfoTable); + Status = AcpiDmDumpTable (Table->Length, Offset, Subtable, + Subtable->Header.Length, InfoTable); if (ACPI_FAILURE (Status)) { return; @@ -762,15 +762,15 @@ AcpiDmDumpAsf ( /* Point to next subtable */ - if (!SubTable->Header.Length) + if (!Subtable->Header.Length) { AcpiOsPrintf ("Invalid zero subtable header length\n"); return; } - Offset += SubTable->Header.Length; - SubTable = ACPI_ADD_PTR (ACPI_ASF_INFO, SubTable, - SubTable->Header.Length); + Offset += Subtable->Header.Length; + Subtable = ACPI_ADD_PTR (ACPI_ASF_INFO, Subtable, + Subtable->Header.Length); } } @@ -793,7 +793,7 @@ AcpiDmDumpCpep ( ACPI_TABLE_HEADER *Table) { ACPI_STATUS Status; - ACPI_CPEP_POLLING *SubTable; + ACPI_CPEP_POLLING *Subtable; UINT32 Length = Table->Length; UINT32 Offset = sizeof (ACPI_TABLE_CPEP); @@ -808,12 +808,12 @@ AcpiDmDumpCpep ( /* Subtables */ - SubTable = ACPI_ADD_PTR (ACPI_CPEP_POLLING, Table, Offset); + Subtable = ACPI_ADD_PTR (ACPI_CPEP_POLLING, Table, Offset); while (Offset < Table->Length) { AcpiOsPrintf ("\n"); - Status = AcpiDmDumpTable (Length, Offset, SubTable, - SubTable->Header.Length, AcpiDmTableInfoCpep0); + Status = AcpiDmDumpTable (Length, Offset, Subtable, + Subtable->Header.Length, AcpiDmTableInfoCpep0); if (ACPI_FAILURE (Status)) { return; @@ -821,9 +821,9 @@ AcpiDmDumpCpep ( /* Point to next subtable */ - Offset += SubTable->Header.Length; - SubTable = ACPI_ADD_PTR (ACPI_CPEP_POLLING, SubTable, - SubTable->Header.Length); + Offset += Subtable->Header.Length; + Subtable = ACPI_ADD_PTR (ACPI_CPEP_POLLING, Subtable, + Subtable->Header.Length); } } @@ -846,9 +846,9 @@ AcpiDmDumpCsrt ( ACPI_TABLE_HEADER *Table) { ACPI_STATUS Status; - ACPI_CSRT_GROUP *SubTable; + ACPI_CSRT_GROUP *Subtable; ACPI_CSRT_SHARED_INFO *SharedInfoTable; - ACPI_CSRT_DESCRIPTOR *SubSubTable; + ACPI_CSRT_DESCRIPTOR *SubSubtable; UINT32 Length = Table->Length; UINT32 Offset = sizeof (ACPI_TABLE_CSRT); UINT32 SubOffset; @@ -860,14 +860,14 @@ AcpiDmDumpCsrt ( /* Subtables (Resource Groups) */ - SubTable = ACPI_ADD_PTR (ACPI_CSRT_GROUP, Table, Offset); + Subtable = ACPI_ADD_PTR (ACPI_CSRT_GROUP, Table, Offset); while (Offset < Table->Length) { /* Resource group subtable */ AcpiOsPrintf ("\n"); - Status = AcpiDmDumpTable (Length, Offset, SubTable, - SubTable->Length, AcpiDmTableInfoCsrt0); + Status = AcpiDmDumpTable (Length, Offset, Subtable, + Subtable->Length, AcpiDmTableInfoCsrt0); if (ACPI_FAILURE (Status)) { return; @@ -887,19 +887,19 @@ AcpiDmDumpCsrt ( return; } - SubOffset += SubTable->SharedInfoLength; + SubOffset += Subtable->SharedInfoLength; /* Sub-Subtables (Resource Descriptors) */ - SubSubTable = ACPI_ADD_PTR (ACPI_CSRT_DESCRIPTOR, Table, + SubSubtable = ACPI_ADD_PTR (ACPI_CSRT_DESCRIPTOR, Table, Offset + SubOffset); - while ((SubOffset < SubTable->Length) && + while ((SubOffset < Subtable->Length) && ((Offset + SubOffset) < Table->Length)) { AcpiOsPrintf ("\n"); - Status = AcpiDmDumpTable (Length, Offset + SubOffset, SubSubTable, - SubSubTable->Length, AcpiDmTableInfoCsrt2); + Status = AcpiDmDumpTable (Length, Offset + SubOffset, SubSubtable, + SubSubtable->Length, AcpiDmTableInfoCsrt2); if (ACPI_FAILURE (Status)) { return; @@ -909,7 +909,7 @@ AcpiDmDumpCsrt ( /* Resource-specific info buffer */ - InfoLength = SubSubTable->Length - SubSubOffset; + InfoLength = SubSubtable->Length - SubSubOffset; if (InfoLength) { Status = AcpiDmDumpTable (Length, @@ -924,16 +924,16 @@ AcpiDmDumpCsrt ( /* Point to next sub-subtable */ - SubOffset += SubSubTable->Length; - SubSubTable = ACPI_ADD_PTR (ACPI_CSRT_DESCRIPTOR, SubSubTable, - SubSubTable->Length); + SubOffset += SubSubtable->Length; + SubSubtable = ACPI_ADD_PTR (ACPI_CSRT_DESCRIPTOR, SubSubtable, + SubSubtable->Length); } /* Point to next subtable */ - Offset += SubTable->Length; - SubTable = ACPI_ADD_PTR (ACPI_CSRT_GROUP, SubTable, - SubTable->Length); + Offset += Subtable->Length; + Subtable = ACPI_ADD_PTR (ACPI_CSRT_GROUP, Subtable, + Subtable->Length); } } @@ -956,7 +956,7 @@ AcpiDmDumpDbg2 ( ACPI_TABLE_HEADER *Table) { ACPI_STATUS Status; - ACPI_DBG2_DEVICE *SubTable; + ACPI_DBG2_DEVICE *Subtable; UINT32 Length = Table->Length; UINT32 Offset = sizeof (ACPI_TABLE_DBG2); UINT32 i; @@ -975,12 +975,12 @@ AcpiDmDumpDbg2 ( /* Subtables */ - SubTable = ACPI_ADD_PTR (ACPI_DBG2_DEVICE, Table, Offset); + Subtable = ACPI_ADD_PTR (ACPI_DBG2_DEVICE, Table, Offset); while (Offset < Table->Length) { AcpiOsPrintf ("\n"); - Status = AcpiDmDumpTable (Length, Offset, SubTable, - SubTable->Length, AcpiDmTableInfoDbg2Device); + Status = AcpiDmDumpTable (Length, Offset, Subtable, + Subtable->Length, AcpiDmTableInfoDbg2Device); if (ACPI_FAILURE (Status)) { return; @@ -988,15 +988,15 @@ AcpiDmDumpDbg2 ( /* Dump the BaseAddress array */ - for (i = 0; i < SubTable->RegisterCount; i++) + for (i = 0; i < Subtable->RegisterCount; i++) { - ArrayOffset = SubTable->BaseAddressOffset + + ArrayOffset = Subtable->BaseAddressOffset + (sizeof (ACPI_GENERIC_ADDRESS) * i); AbsoluteOffset = Offset + ArrayOffset; - Array = (UINT8 *) SubTable + ArrayOffset; + Array = (UINT8 *) Subtable + ArrayOffset; Status = AcpiDmDumpTable (Length, AbsoluteOffset, Array, - SubTable->Length, AcpiDmTableInfoDbg2Addr); + Subtable->Length, AcpiDmTableInfoDbg2Addr); if (ACPI_FAILURE (Status)) { return; @@ -1005,15 +1005,15 @@ AcpiDmDumpDbg2 ( /* Dump the AddressSize array */ - for (i = 0; i < SubTable->RegisterCount; i++) + for (i = 0; i < Subtable->RegisterCount; i++) { - ArrayOffset = SubTable->AddressSizeOffset + + ArrayOffset = Subtable->AddressSizeOffset + (sizeof (UINT32) * i); AbsoluteOffset = Offset + ArrayOffset; - Array = (UINT8 *) SubTable + ArrayOffset; + Array = (UINT8 *) Subtable + ArrayOffset; Status = AcpiDmDumpTable (Length, AbsoluteOffset, Array, - SubTable->Length, AcpiDmTableInfoDbg2Size); + Subtable->Length, AcpiDmTableInfoDbg2Size); if (ACPI_FAILURE (Status)) { return; @@ -1023,12 +1023,12 @@ AcpiDmDumpDbg2 ( /* Dump the Namestring (required) */ AcpiOsPrintf ("\n"); - ArrayOffset = SubTable->NamepathOffset; + ArrayOffset = Subtable->NamepathOffset; AbsoluteOffset = Offset + ArrayOffset; - Array = (UINT8 *) SubTable + ArrayOffset; + Array = (UINT8 *) Subtable + ArrayOffset; Status = AcpiDmDumpTable (Length, AbsoluteOffset, Array, - SubTable->Length, AcpiDmTableInfoDbg2Name); + Subtable->Length, AcpiDmTableInfoDbg2Name); if (ACPI_FAILURE (Status)) { return; @@ -1036,10 +1036,10 @@ AcpiDmDumpDbg2 ( /* Dump the OemData (optional) */ - if (SubTable->OemDataOffset) + if (Subtable->OemDataOffset) { - Status = AcpiDmDumpTable (Length, Offset + SubTable->OemDataOffset, - Table, SubTable->OemDataLength, + Status = AcpiDmDumpTable (Length, Offset + Subtable->OemDataOffset, + Table, Subtable->OemDataLength, AcpiDmTableInfoDbg2OemData); if (ACPI_FAILURE (Status)) { @@ -1049,9 +1049,9 @@ AcpiDmDumpDbg2 ( /* Point to next subtable */ - Offset += SubTable->Length; - SubTable = ACPI_ADD_PTR (ACPI_DBG2_DEVICE, SubTable, - SubTable->Length); + Offset += Subtable->Length; + Subtable = ACPI_ADD_PTR (ACPI_DBG2_DEVICE, Subtable, + Subtable->Length); } } @@ -1074,7 +1074,7 @@ AcpiDmDumpDmar ( ACPI_TABLE_HEADER *Table) { ACPI_STATUS Status; - ACPI_DMAR_HEADER *SubTable; + ACPI_DMAR_HEADER *Subtable; UINT32 Length = Table->Length; UINT32 Offset = sizeof (ACPI_TABLE_DMAR); ACPI_DMTABLE_INFO *InfoTable; @@ -1094,14 +1094,14 @@ AcpiDmDumpDmar ( /* Subtables */ - SubTable = ACPI_ADD_PTR (ACPI_DMAR_HEADER, Table, Offset); + Subtable = ACPI_ADD_PTR (ACPI_DMAR_HEADER, Table, Offset); while (Offset < Table->Length) { /* Common subtable header */ AcpiOsPrintf ("\n"); - Status = AcpiDmDumpTable (Length, Offset, SubTable, - SubTable->Length, AcpiDmTableInfoDmarHdr); + Status = AcpiDmDumpTable (Length, Offset, Subtable, + Subtable->Length, AcpiDmTableInfoDmarHdr); if (ACPI_FAILURE (Status)) { return; @@ -1109,7 +1109,7 @@ AcpiDmDumpDmar ( AcpiOsPrintf ("\n"); - switch (SubTable->Type) + switch (Subtable->Type) { case ACPI_DMAR_TYPE_HARDWARE_UNIT: @@ -1144,12 +1144,12 @@ AcpiDmDumpDmar ( default: AcpiOsPrintf ("\n**** Unknown DMAR subtable type 0x%X\n\n", - SubTable->Type); + Subtable->Type); return; } - Status = AcpiDmDumpTable (Length, Offset, SubTable, - SubTable->Length, InfoTable); + Status = AcpiDmDumpTable (Length, Offset, Subtable, + Subtable->Length, InfoTable); if (ACPI_FAILURE (Status)) { return; @@ -1158,16 +1158,16 @@ AcpiDmDumpDmar ( /* * Dump the optional device scope entries */ - if ((SubTable->Type == ACPI_DMAR_TYPE_HARDWARE_AFFINITY) || - (SubTable->Type == ACPI_DMAR_TYPE_NAMESPACE)) + if ((Subtable->Type == ACPI_DMAR_TYPE_HARDWARE_AFFINITY) || + (Subtable->Type == ACPI_DMAR_TYPE_NAMESPACE)) { /* These types do not support device scopes */ goto NextSubtable; } - ScopeTable = ACPI_ADD_PTR (ACPI_DMAR_DEVICE_SCOPE, SubTable, ScopeOffset); - while (ScopeOffset < SubTable->Length) + ScopeTable = ACPI_ADD_PTR (ACPI_DMAR_DEVICE_SCOPE, Subtable, ScopeOffset); + while (ScopeOffset < Subtable->Length) { AcpiOsPrintf ("\n"); Status = AcpiDmDumpTable (Length, Offset + ScopeOffset, ScopeTable, @@ -1208,9 +1208,9 @@ AcpiDmDumpDmar ( NextSubtable: /* Point to next subtable */ - Offset += SubTable->Length; - SubTable = ACPI_ADD_PTR (ACPI_DMAR_HEADER, SubTable, - SubTable->Length); + Offset += Subtable->Length; + Subtable = ACPI_ADD_PTR (ACPI_DMAR_HEADER, Subtable, + Subtable->Length); } } @@ -1343,7 +1343,7 @@ AcpiDmDumpEinj ( ACPI_TABLE_HEADER *Table) { ACPI_STATUS Status; - ACPI_WHEA_HEADER *SubTable; + ACPI_WHEA_HEADER *Subtable; UINT32 Length = Table->Length; UINT32 Offset = sizeof (ACPI_TABLE_EINJ); @@ -1358,11 +1358,11 @@ AcpiDmDumpEinj ( /* Subtables */ - SubTable = ACPI_ADD_PTR (ACPI_WHEA_HEADER, Table, Offset); + Subtable = ACPI_ADD_PTR (ACPI_WHEA_HEADER, Table, Offset); while (Offset < Table->Length) { AcpiOsPrintf ("\n"); - Status = AcpiDmDumpTable (Length, Offset, SubTable, + Status = AcpiDmDumpTable (Length, Offset, Subtable, sizeof (ACPI_WHEA_HEADER), AcpiDmTableInfoEinj0); if (ACPI_FAILURE (Status)) { @@ -1372,7 +1372,7 @@ AcpiDmDumpEinj ( /* Point to next subtable (each subtable is of fixed length) */ Offset += sizeof (ACPI_WHEA_HEADER); - SubTable = ACPI_ADD_PTR (ACPI_WHEA_HEADER, SubTable, + Subtable = ACPI_ADD_PTR (ACPI_WHEA_HEADER, Subtable, sizeof (ACPI_WHEA_HEADER)); } } @@ -1396,7 +1396,7 @@ AcpiDmDumpErst ( ACPI_TABLE_HEADER *Table) { ACPI_STATUS Status; - ACPI_WHEA_HEADER *SubTable; + ACPI_WHEA_HEADER *Subtable; UINT32 Length = Table->Length; UINT32 Offset = sizeof (ACPI_TABLE_ERST); @@ -1411,11 +1411,11 @@ AcpiDmDumpErst ( /* Subtables */ - SubTable = ACPI_ADD_PTR (ACPI_WHEA_HEADER, Table, Offset); + Subtable = ACPI_ADD_PTR (ACPI_WHEA_HEADER, Table, Offset); while (Offset < Table->Length) { AcpiOsPrintf ("\n"); - Status = AcpiDmDumpTable (Length, Offset, SubTable, + Status = AcpiDmDumpTable (Length, Offset, Subtable, sizeof (ACPI_WHEA_HEADER), AcpiDmTableInfoErst0); if (ACPI_FAILURE (Status)) { @@ -1425,7 +1425,7 @@ AcpiDmDumpErst ( /* Point to next subtable (each subtable is of fixed length) */ Offset += sizeof (ACPI_WHEA_HEADER); - SubTable = ACPI_ADD_PTR (ACPI_WHEA_HEADER, SubTable, + Subtable = ACPI_ADD_PTR (ACPI_WHEA_HEADER, Subtable, *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@freebsd.org Thu Jan 4 19:47:02 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 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-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" 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-all@freebsd.org Thu Jan 4 20:05:48 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 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-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" 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-all@freebsd.org Thu Jan 4 20:16:41 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 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-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" 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-all@freebsd.org Thu Jan 4 20:50:47 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 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-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" 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-all@freebsd.org Thu Jan 4 21:52:32 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 847D0EBA189 for ; Thu, 4 Jan 2018 21:52:32 +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 1AB3E38FA for ; Thu, 4 Jan 2018 21:52:32 +0000 (UTC) (envelope-from steven@multiplay.co.uk) Received: by mail-wm0-x235.google.com with SMTP id b76so5894796wmg.1 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=N+ihqp6rJoOLF8h8BQLGlnhSNLM07/ryuAdO2anHP5MkuLqhB/+IuTRljuW2G5acJh oSC2JJ/WlK/jtbS2euLaC7PpKzHGg3rp/g2Z2nB5U83+z910OMhWb1HuF07gHWjzRYuO 6QreZKYgvHthS/6jJ2bx440+/NNpq3U96xh+cMjCgIjOBxn8LL0wOuS2Bl3D92LrNHCr ldia2uNWhu5QbduN91Yi3v5dwjSFlkZp6Q2RUwEcjeGnkbZve/51ke4zrjlSV/VwRc2h yRshiolTOKVF8lT1wh1Dm/WpqpO2pYHeTS2NCRtgfO/Ob+07tlivi97nnjAnpnDtEih3 yuRA== X-Gm-Message-State: AKGB3mLDRzSR+Zt7XLx1zqEiXfDwSekqyZj2eIwkMMtlv8N0jNR7fNXM jGiI39LuWVWQwYz7cZlizwsDwA== 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-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" 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-all@freebsd.org Thu Jan 4 21:57:38 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 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-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" 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-all@freebsd.org Thu Jan 4 21:59:35 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 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-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" 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-all@freebsd.org Thu Jan 4 22:08:00 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 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-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" 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-all@freebsd.org Thu Jan 4 22:37:16 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 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-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" 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-all@freebsd.org Thu Jan 4 22:38:03 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 43316EBCD16; Thu, 4 Jan 2018 22:38:03 +0000 (UTC) (envelope-from sjg@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 0C2F364C26; Thu, 4 Jan 2018 22:38:02 +0000 (UTC) (envelope-from sjg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w04Mc17n016044; Thu, 4 Jan 2018 22:38:01 GMT (envelope-from sjg@FreeBSD.org) Received: (from sjg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w04Mc1kV016043; Thu, 4 Jan 2018 22:38:01 GMT (envelope-from sjg@FreeBSD.org) Message-Id: <201801042238.w04Mc1kV016043@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: sjg set sender to sjg@FreeBSD.org using -f From: "Simon J. Gerraty" Date: Thu, 4 Jan 2018 22:38:01 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-svnadmin@freebsd.org Subject: svn commit: r327564 - svnadmin/conf X-SVN-Group: svnadmin X-SVN-Commit-Author: sjg X-SVN-Commit-Paths: svnadmin/conf X-SVN-Commit-Revision: 327564 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 04 Jan 2018 22:38:03 -0000 Author: sjg Date: Thu Jan 4 22:38:01 2018 New Revision: 327564 URL: https://svnweb.freebsd.org/changeset/base/327564 Log: Release stevek from bondage Reviewed by: sjg Modified: svnadmin/conf/mentors Modified: svnadmin/conf/mentors ============================================================================== --- svnadmin/conf/mentors Thu Jan 4 22:37:15 2018 (r327563) +++ svnadmin/conf/mentors Thu Jan 4 22:38:01 2018 (r327564) @@ -28,6 +28,5 @@ mjoras rstone peterj jhb Co-mentor: grog rgrimes grehan slm ken Co-mentor: scottl, ambrisko -stevek sjg wosch cem wulf gonzo Co-mentor: bapt From owner-svn-src-all@freebsd.org Thu Jan 4 22:42:17 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 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-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" 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-all@freebsd.org Thu Jan 4 22:59:25 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 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-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" 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-all@freebsd.org Thu Jan 4 23:07:52 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 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-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" 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-all@freebsd.org Thu Jan 4 23:37:02 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id EE8AEEC05E1 for ; Thu, 4 Jan 2018 23:37:02 +0000 (UTC) (envelope-from steven@multiplay.co.uk) Received: from mail-wm0-x230.google.com (mail-wm0-x230.google.com [IPv6:2a00:1450:400c: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 9D7E167586 for ; Thu, 4 Jan 2018 23:37:02 +0000 (UTC) (envelope-from steven@multiplay.co.uk) Received: by mail-wm0-x230.google.com with SMTP id a79so6174150wma.0 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=QqKA7UxWFaeOOp8mf3TJ4Dz6B64DC2n50wd6mRWSZbehtdDbowGe4T32CLIQdcuEd1 QPqUwuA5V6FsEN49QgPFZ/cIhD0UrSGp4trHsHbbb7ukrHyhJ8Xy1lVUOl5iA7cIgSlG LuBEsIdmR6oSFKCD6WH1Bx3887pNV9uJDtSyruiGOd3uG/3fk3F2IKg9DG8BNAmj4Eof aklmOj3+ONVoqxg2IL+pjKLGaIZL78GHTUAVda+1yaAcE7r22o5WJB7H0AF6yNDxPvXU k2SGh02H3ei4XjVFNwcNLNoKkD5X9stAB/WD9yJ974bf6WYXpGpC7xTHYDpW3BIa/GfC 6N/Q== X-Gm-Message-State: AKGB3mJgDc86GqvTD63B0uU83dNa+S/8SobynBxJ1aR8PrgG5GIHv6WW moJvet1Vr7zvIX9yUPc9aOiMgw== 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-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" 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-all@freebsd.org Fri Jan 5 01:46:42 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 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-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" 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-all@freebsd.org Fri Jan 5 02:01:35 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 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-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" 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-all@freebsd.org Fri Jan 5 02:09:54 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 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-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" 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-all@freebsd.org Fri Jan 5 02:15:06 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id BB575EA7046; Fri, 5 Jan 2018 02:15:06 +0000 (UTC) (envelope-from mav@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 84F226E09E; Fri, 5 Jan 2018 02:15:06 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w052F5aF007970; Fri, 5 Jan 2018 02:15:05 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w052F53G007968; Fri, 5 Jan 2018 02:15:05 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201801050215.w052F53G007968@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Fri, 5 Jan 2018 02:15:05 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r327568 - in stable/11/sys/dev: ahci usb/controller X-SVN-Group: stable-11 X-SVN-Commit-Author: mav X-SVN-Commit-Paths: in stable/11/sys/dev: ahci usb/controller X-SVN-Commit-Revision: 327568 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 05 Jan 2018 02:15:06 -0000 Author: mav Date: Fri Jan 5 02:15:05 2018 New Revision: 327568 URL: https://svnweb.freebsd.org/changeset/base/327568 Log: MFC r327094: Add AHCI/XHCI device IDs found on AMD Ryzen+B350 system. Modified: stable/11/sys/dev/ahci/ahci_pci.c stable/11/sys/dev/usb/controller/xhci_pci.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/dev/ahci/ahci_pci.c ============================================================================== --- stable/11/sys/dev/ahci/ahci_pci.c Fri Jan 5 01:46:41 2018 (r327567) +++ stable/11/sys/dev/ahci/ahci_pci.c Fri Jan 5 02:15:05 2018 (r327568) @@ -68,6 +68,7 @@ static const struct { AHCI_Q_ATI_PMP_BUG | AHCI_Q_1MSI}, /* Not sure SB8x0/SB9x0 needs this quirk. Be conservative though */ {0x43951002, 0x00, "AMD SB8x0/SB9x0", AHCI_Q_ATI_PMP_BUG}, + {0x43b71022, 0x00, "AMD 300 Series", 0}, {0x78001022, 0x00, "AMD Hudson-2", 0}, {0x78011022, 0x00, "AMD Hudson-2", 0}, {0x78021022, 0x00, "AMD Hudson-2", 0}, Modified: stable/11/sys/dev/usb/controller/xhci_pci.c ============================================================================== --- stable/11/sys/dev/usb/controller/xhci_pci.c Fri Jan 5 01:46:41 2018 (r327567) +++ stable/11/sys/dev/usb/controller/xhci_pci.c Fri Jan 5 02:15:05 2018 (r327568) @@ -95,6 +95,10 @@ xhci_pci_match(device_t self) uint32_t device_id = pci_get_devid(self); switch (device_id) { + case 0x145c1022: + return ("AMD KERNCZ USB 3.0 controller"); + case 0x43bb1022: + return ("AMD 300 Series USB 3.0 controller"); case 0x78141022: return ("AMD FCH USB 3.0 controller"); From owner-svn-src-all@freebsd.org Fri Jan 5 02:55:24 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 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-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" 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-all@freebsd.org Fri Jan 5 05:02:11 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 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-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" 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-all@freebsd.org Fri Jan 5 05:34:16 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 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-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" 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-all@freebsd.org Fri Jan 5 05:34:25 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 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-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" 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-all@freebsd.org Fri Jan 5 07:09:10 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 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-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" 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-all@freebsd.org Fri Jan 5 07:09:21 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 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-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" 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-all@freebsd.org Fri Jan 5 07:09:26 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 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-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" 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-all@freebsd.org Fri Jan 5 07:09:32 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 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-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" 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-all@freebsd.org Fri Jan 5 07:09:41 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 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-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" 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-all@freebsd.org Fri Jan 5 07:14:40 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 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-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" 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-all@freebsd.org Fri Jan 5 07:24:44 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 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-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" 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-all@freebsd.org Fri Jan 5 07:28:50 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 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-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" 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-all@freebsd.org Fri Jan 5 07:29:00 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 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-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" 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-all@freebsd.org Fri Jan 5 07:29:04 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 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-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" 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-all@freebsd.org Fri Jan 5 08:29:33 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 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-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" 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-all@freebsd.org Fri Jan 5 09:26:34 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id B5E56EBFB28 for ; Fri, 5 Jan 2018 09:26:34 +0000 (UTC) (envelope-from steven@multiplay.co.uk) Received: from mail-lf0-x235.google.com (mail-lf0-x235.google.com [IPv6:2a00:1450:4010:c07::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 5D1DA7F804 for ; Fri, 5 Jan 2018 09:26:34 +0000 (UTC) (envelope-from steven@multiplay.co.uk) Received: by mail-lf0-x235.google.com with SMTP id h140so4503837lfg.1 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=XRY3AprswS/MR/ec6JuWgjTSdyGVwyqcSSk3Jjwzqn3wmzJZGXo/JjPJrMMCh+1chA 5WWsSHupzYPVoIasEP1XOHWXpc2xQpSd2XOlbSHNlrI1eGSMICaKuThYoZAoP+e38em5 vyz9m1UujNwGnsklL7ukJCMcPTCzHTq/HJzvz57MZ0a1g0efyg7g3gxRbSP/a/SOcwDt sGUtY36t5ZjNrgeMruSanVSJMYRTj8uT6wpNAF4ZoehTPfLeHTv8tu4LAEMh1cYviiFd NFPoF/HlSVM1ZgHOAOROunAh8Om2/bw9oLlTnGwtSlmbT5l0k6NRr7Z/40yOywmQW0Ol JYcw== X-Gm-Message-State: AKGB3mK+IPoLCB8DBowFX4BAlmeOmPwj86MKDYT8v+cTBA1/bOz2C1ag wzvOQ2kh0LbteFQ4IXsXCOMdBzOYfsU= 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-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 05 Jan 2018 09:26:34 -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-all@freebsd.org Fri Jan 5 09:31:43 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 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-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" 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-all@freebsd.org Fri Jan 5 09:34:30 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 0F163EC0245 for ; Fri, 5 Jan 2018 09:34:30 +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 8D03F80125 for ; Fri, 5 Jan 2018 09:34:29 +0000 (UTC) (envelope-from steven@multiplay.co.uk) Received: by mail-wm0-x232.google.com with SMTP id r78so1294305wme.5 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=HeOHC+5CxBIA+brKdipFxXqTp8zZMVARS6jH76u41RiSr5SrS3/0wmUa1WcRCpLb3P aIXuFwc1EPYxdv3MtGfG0/SgVBOHQ+TdKEdQWIku7Q0Q+tBXa3K25d/3kYNlTY4S/TzE J3i41JJwRDQjasPnyIqP0mAaXSCs/l4Gwl8eb6LNlHayChpGSw++MziYdYcj7SPrb/IM +54b49TQaKthMjMx85zXMEHM5YHC1K3AyrcAJyBa8XuzR4BMGDvdpCy4vC3cP1rvRTzl E2OC/JGQFwHkIr8YqgL3wWxouoWFThc4xU2Kq/Ggkh+Nf0olEQrbY7UHzi4QOQZC0N/L v0dQ== X-Gm-Message-State: AKGB3mIDnlbd58rlGomOmbykrAkeDNJLHj4yjoX5mvsGl28Q69e2cBu0 LnBXMwvPVElqEvtaS9hb24QoQw== 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-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" 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-all@freebsd.org Fri Jan 5 09:41:24 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 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-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" 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-all@freebsd.org Fri Jan 5 09:44:27 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id B3113EC0AA9 for ; Fri, 5 Jan 2018 09:44:27 +0000 (UTC) (envelope-from steven@multiplay.co.uk) Received: from mail-wr0-x22a.google.com (mail-wr0-x22a.google.com [IPv6:2a00:1450:400c:c0c::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 3D1738092C for ; Fri, 5 Jan 2018 09:44:27 +0000 (UTC) (envelope-from steven@multiplay.co.uk) Received: by mail-wr0-x22a.google.com with SMTP id s10so943326wrb.6 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=t+YDjLOwLFlGxXjsy3RpBJwV2gxyAzs6Ni/dwyY+8i+/figE78j0iYwv2Debi2NouF nvrVHB8xFS1vl7CXWiBXoMjzqpvo/j0g3kg85OxUnab3yCb5BcTp69AnwMjQioyFwtqg 7wLekH4EnL/5PrvT3Jom4I43HSU8nFhgal7gZt095OoxJX631TXmfBSC3dbcjFL3PWpI AjLsQHqLfag4CShVm4QLq5vrNBJCd4IxtWle8x/81B/DjI2lIeawLTlz5pvVfqVjGv8D A+wUXGRuBS3ZWSmm8D4Q2HyBlFk/mAyCuv5QNQHNSZLf/Tk8XBYcUX4b2cIwxMnOxIu+ fF5A== X-Gm-Message-State: AKGB3mJMdTGNFWQLNgD01ruJxuc03uqq26pPwBc12lK3/UApKs1MyH9R uFycNs6RXyb69uXn7KJuzLzvTrCOSbM= 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-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 05 Jan 2018 09:44:27 -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-all@freebsd.org Fri Jan 5 10:04:04 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 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-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" 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-all@freebsd.org Fri Jan 5 10:04:15 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id B8CD1EC198B; Fri, 5 Jan 2018 10:04:15 +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 27B4D14C0; Fri, 5 Jan 2018 10:04:14 +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 w05A4Dgf005986; Fri, 5 Jan 2018 10:04:13 GMT (envelope-from fsu@FreeBSD.org) Received: (from fsu@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w05A4DC3005985; Fri, 5 Jan 2018 10:04:13 GMT (envelope-from fsu@FreeBSD.org) Message-Id: <201801051004.w05A4DC3005985@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:13 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r327585 - stable/11/sys/fs/ext2fs X-SVN-Group: stable-11 X-SVN-Commit-Author: fsu X-SVN-Commit-Paths: stable/11/sys/fs/ext2fs X-SVN-Commit-Revision: 327585 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 05 Jan 2018 10:04:16 -0000 Author: fsu Date: Fri Jan 5 10:04:13 2018 New Revision: 327585 URL: https://svnweb.freebsd.org/changeset/base/327585 Log: MFC r326807: Fix extattr getters in case of neither uio nor buffer was not passed to VOP_*. Approved by: pfg (mentor) Differential Revision: https://reviews.freebsd.org/D13359 Modified: stable/11/sys/fs/ext2fs/ext2_extattr.c Modified: stable/11/sys/fs/ext2fs/ext2_extattr.c ============================================================================== --- stable/11/sys/fs/ext2fs/ext2_extattr.c Fri Jan 5 10:04:01 2018 (r327584) +++ stable/11/sys/fs/ext2fs/ext2_extattr.c Fri Jan 5 10:04:13 2018 (r327585) @@ -218,9 +218,10 @@ ext2_extattr_inode_list(struct inode *ip, int attrname return (ENOTSUP); } - if (uio == NULL) + if (size != NULL) *size += name_len + 1; - else { + + if (uio != NULL) { char *name = malloc(name_len + 1, M_TEMP, M_WAITOK); name[0] = name_len; memcpy(&name[1], attr_name, name_len); @@ -284,9 +285,10 @@ ext2_extattr_block_list(struct inode *ip, int attrname return (ENOTSUP); } - if (uio == NULL) + if (size != NULL) *size += name_len + 1; - else { + + if (uio != NULL) { char *name = malloc(name_len + 1, M_TEMP, M_WAITOK); name[0] = name_len; memcpy(&name[1], attr_name, name_len); @@ -359,12 +361,12 @@ ext2_extattr_inode_get(struct inode *ip, int attrnames if (strlen(name) == name_len && 0 == strncmp(attr_name, name, name_len)) { - if (uio == NULL) + if (size != NULL) *size += entry->e_value_size; - else { + + if (uio != NULL) error = uiomove(((char *)EXT2_IFIRST(header)) + entry->e_value_offs, entry->e_value_size, uio); - } brelse(bp); return (error); @@ -426,12 +428,12 @@ ext2_extattr_block_get(struct inode *ip, int attrnames if (strlen(name) == name_len && 0 == strncmp(attr_name, name, name_len)) { - if (uio == NULL) + if (size != NULL) *size += entry->e_value_size; - else { + + if (uio != NULL) error = uiomove(bp->b_data + entry->e_value_offs, entry->e_value_size, uio); - } brelse(bp); return (error); From owner-svn-src-all@freebsd.org Fri Jan 5 11:45:41 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 66C0CEC5D1B; Fri, 5 Jan 2018 11:45:41 +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 3E6CE643FD; Fri, 5 Jan 2018 11:45:41 +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 w05BjeDm048171; Fri, 5 Jan 2018 11:45:40 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w05Bjeio048170; Fri, 5 Jan 2018 11:45:40 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201801051145.w05Bjeio048170@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 11:45:40 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r327586 - stable/11/sys/vm X-SVN-Group: stable-11 X-SVN-Commit-Author: kib X-SVN-Commit-Paths: stable/11/sys/vm X-SVN-Commit-Revision: 327586 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 05 Jan 2018 11:45:41 -0000 Author: kib Date: Fri Jan 5 11:45:40 2018 New Revision: 327586 URL: https://svnweb.freebsd.org/changeset/base/327586 Log: MFC r327354: Style. Modified: stable/11/sys/vm/vm_swapout.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/vm/vm_swapout.c ============================================================================== --- stable/11/sys/vm/vm_swapout.c Fri Jan 5 10:04:13 2018 (r327585) +++ stable/11/sys/vm/vm_swapout.c Fri Jan 5 11:45:40 2018 (r327586) @@ -554,16 +554,14 @@ vm_thread_swapin(struct thread *td) { vm_object_t ksobj; vm_page_t ma[KSTACK_MAX_PAGES]; - int pages; + int a, count, i, j, pages, rv; pages = td->td_kstack_pages; ksobj = td->td_kstack_obj; VM_OBJECT_WLOCK(ksobj); (void)vm_page_grab_pages(ksobj, 0, VM_ALLOC_NORMAL | VM_ALLOC_WIRED, ma, pages); - for (int i = 0; i < pages;) { - int j, a, count, rv; - + for (i = 0; i < pages;) { vm_page_assert_xbusied(ma[i]); if (ma[i]->valid == VM_PAGE_BITS_ALL) { vm_page_xunbusy(ma[i]); @@ -640,13 +638,9 @@ faultin(struct proc *p) void swapper(void) { - struct proc *p; + struct proc *p, *pp; struct thread *td; - struct proc *pp; - int slptime; - int swtime; - int ppri; - int pri; + int ppri, pri, slptime, swtime; loop: if (vm_page_count_min()) { @@ -733,15 +727,15 @@ swapout_procs(int action) { struct proc *p; struct thread *td; - int didswap = 0; + struct vmspace *vm; + int minslptime, slptime; + bool didswap; + minslptime = 100000; + didswap = false; retry: sx_slock(&allproc_lock); FOREACH_PROC_IN_SYSTEM(p) { - struct vmspace *vm; - int minslptime = 100000; - int slptime; - PROC_LOCK(p); /* * Watch out for a process in @@ -791,17 +785,20 @@ retry: goto nextproc; /* - * only aiod changes vmspace, however it will be + * Only aiod changes vmspace. However, it will be * skipped because of the if statement above checking - * for P_SYSTEM + * for P_SYSTEM. */ - if ((p->p_flag & (P_INMEM|P_SWAPPINGOUT|P_SWAPPINGIN)) != P_INMEM) + 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. */ + /* + * Don't swap out processes in any sort + * of 'special' state. + */ break; case PRS_NORMAL: @@ -844,9 +841,9 @@ retry: * 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))) { + if ((action & VM_SWAP_NORMAL) == 0 && + ((action & VM_SWAP_IDLE) == 0 || + slptime < swap_idle_threshold2)) { thread_unlock(td); goto nextproc; } @@ -861,12 +858,12 @@ retry: * or if this process is idle and the system is * configured to swap proactively, swap it out. */ - if ((action & VM_SWAP_NORMAL) || - ((action & VM_SWAP_IDLE) && - (minslptime > swap_idle_threshold2))) { + if ((action & VM_SWAP_NORMAL) != 0 || + ((action & VM_SWAP_IDLE) != 0 && + minslptime > swap_idle_threshold2)) { _PRELE(p); if (swapout(p) == 0) - didswap++; + didswap = true; PROC_UNLOCK(p); vm_map_unlock(&vm->vm_map); vmspace_free(vm); @@ -936,9 +933,10 @@ swapout(struct proc *p) P_INMEM, ("swapout: lost a swapout race?")); /* - * remember the process resident count + * Remember the resident count. */ p->p_vmspace->vm_swrss = vmspace_resident_count(p->p_vmspace); + /* * Check and mark all threads before we proceed. */ From owner-svn-src-all@freebsd.org Fri Jan 5 11:46:46 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id A9533EC5DF5; Fri, 5 Jan 2018 11:46:46 +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 73C6664543; Fri, 5 Jan 2018 11:46:46 +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 w05BkjZ0048263; Fri, 5 Jan 2018 11:46:45 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w05BkjOQ048262; Fri, 5 Jan 2018 11:46:45 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201801051146.w05BkjOQ048262@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 11:46:45 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r327587 - stable/11/sys/vm X-SVN-Group: stable-11 X-SVN-Commit-Author: kib X-SVN-Commit-Paths: stable/11/sys/vm X-SVN-Commit-Revision: 327587 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 05 Jan 2018 11:46:46 -0000 Author: kib Date: Fri Jan 5 11:46:45 2018 New Revision: 327587 URL: https://svnweb.freebsd.org/changeset/base/327587 Log: MFC r327359: Do not lock vm map in swapout_procs(). Modified: stable/11/sys/vm/vm_swapout.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/vm/vm_swapout.c ============================================================================== --- stable/11/sys/vm/vm_swapout.c Fri Jan 5 11:45:40 2018 (r327586) +++ stable/11/sys/vm/vm_swapout.c Fri Jan 5 11:46:45 2018 (r327587) @@ -727,7 +727,6 @@ swapout_procs(int action) { struct proc *p; struct thread *td; - struct vmspace *vm; int minslptime, slptime; bool didswap; @@ -761,24 +760,6 @@ retry: PROC_UNLOCK(p); sx_sunlock(&allproc_lock); - /* - * Do not swapout a process that - * is waiting for VM data - * structures as there is a possible - * deadlock. Test this first as - * this may block. - * - * Lock the map until swapout - * finishes, or a thread of this - * process may attempt to alter - * the map. - */ - vm = vmspace_acquire_ref(p); - if (vm == NULL) - goto nextproc2; - if (!vm_map_trylock(&vm->vm_map)) - goto nextproc1; - PROC_LOCK(p); if (p->p_lock != 1 || (p->p_flag & (P_STOPPED_SINGLE | P_TRACED | P_SYSTEM)) != 0) @@ -865,17 +846,11 @@ retry: if (swapout(p) == 0) didswap = true; PROC_UNLOCK(p); - vm_map_unlock(&vm->vm_map); - vmspace_free(vm); goto retry; } } nextproc: PROC_UNLOCK(p); - vm_map_unlock(&vm->vm_map); -nextproc1: - vmspace_free(vm); -nextproc2: sx_slock(&allproc_lock); PRELE(p); } From owner-svn-src-all@freebsd.org Fri Jan 5 13:37:04 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 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-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" 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-all@freebsd.org Fri Jan 5 13:41:44 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 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-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" 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-all@freebsd.org Fri Jan 5 13:49:32 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 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-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" 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-all@freebsd.org Fri Jan 5 13:54:11 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 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-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" 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-all@freebsd.org Fri Jan 5 14:38:29 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 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-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" 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-all@freebsd.org Fri Jan 5 15:13:08 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id E5497EAE95A for ; Fri, 5 Jan 2018 15:13:08 +0000 (UTC) (envelope-from steven@multiplay.co.uk) Received: from mail-wm0-x22f.google.com (mail-wm0-x22f.google.com [IPv6:2a00:1450:400c:c09::22f]) (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 6B8866D3E7 for ; Fri, 5 Jan 2018 15:13:08 +0000 (UTC) (envelope-from steven@multiplay.co.uk) Received: by mail-wm0-x22f.google.com with SMTP id b141so3041555wme.1 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=ROFcuUv/mwKfajXjop92XBSpeIRkako6yav+ju1Le4fIgqjWNg4waApNVBWPDtomef 0T+YlsE1wpYw8dxOCdHuJyKfc+uLLlBPq+5cJNMvW1qqWAOg+5buGeX5lN2jZ3D1dBrR qfTwj2st4yLHWZ5VHX/fK0Q/Nj/l+k45HNrlXc87Qr7ZvZPdWc84f4B33IBW4ZttRNiZ ZmA/M2sjXXF6bB+ZwE0pC+k9KMgq6mxIxAG4Q7GUGUB7WqaIG9ahs5NtuefAxEa6IdhH O9b3qEdPKWzDdWpcvyLTUOI9vKnpexFOYypuANcZ+ijTqqD3l+xYun3K9k04EpNhKATv Wuxg== X-Gm-Message-State: AKGB3mJjmiU5Egx2KEmPVAdJWRa606OUYB7ndKL2vB3SlLg+9k3dmqaD Ku+swZf7v5s46q+aFqsaY7iSXw== 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-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" 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-all@freebsd.org Fri Jan 5 15:42:03 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id D66CCEB01A4 for ; Fri, 5 Jan 2018 15:42:03 +0000 (UTC) (envelope-from steven@multiplay.co.uk) Received: from mail-wm0-x230.google.com (mail-wm0-x230.google.com [IPv6:2a00:1450:400c: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 618386E7DE for ; Fri, 5 Jan 2018 15:42:03 +0000 (UTC) (envelope-from steven@multiplay.co.uk) Received: by mail-wm0-x230.google.com with SMTP id b76so3218067wmg.1 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=NfqO6nR1OL0a0r+R9sZneDqfYiwGgwevfiqA0qmiUPg5WtTqpZW/EQGRdWGBKNIHBf TVEsJGhk2mdCGopLxjn+Vm1cSJioqrZmASWq/QiKwy5RIc55npeZtKZl4bLN9/HtOxZP AfaBWJKsVT8Etka8xIv+NGWzYWrec+WuKmNFJ8zrqVXlY9O9Xd4VRovrJVxuG3wMNUyY 3rVhUdT5Qz1M2NMd4STZzhckJPbiMEmQna7sZhMZNFJFQQt5/vm3VvWUJwYgLYi+A+Gk 3AlyoXT7tV7M16nnM2RGx+TcErqSSKHCQUPn9Z8ogyKpth98vRgUIb2mD6YJw1J8lGpm AATw== X-Gm-Message-State: AKGB3mIeEZ3QvVWmffLxdPSoRgsPLkY+0O5JTSqR+dYP3dvnSMOrSLy8 Dh08zQtyTaRySdkG3OvrcQz88A== 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-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 05 Jan 2018 15:42:03 -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-all@freebsd.org Fri Jan 5 15:44:30 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 82402EB03B9 for ; Fri, 5 Jan 2018 15:44:30 +0000 (UTC) (envelope-from steven@multiplay.co.uk) Received: from mail-wm0-x230.google.com (mail-wm0-x230.google.com [IPv6:2a00:1450:400c: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 10D366EAF6 for ; Fri, 5 Jan 2018 15:44:30 +0000 (UTC) (envelope-from steven@multiplay.co.uk) Received: by mail-wm0-x230.google.com with SMTP id 9so3160935wme.4 for ; Fri, 05 Jan 2018 07:44:29 -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=GMpzaDrxGMHyBU8TThNpiEqu6fX63j1vqoQkzd5hbzNCapm6sA3+yK1GYhP6tq8JI2 OmM8pcgzeps8oOqnUsVt4z4rkYHT+ETE6yF/zuYG30b2URMVYBQQikOBMT65mSLGsjhE 8GhyC9Fr/2mxda8CSb9xSFh2GGTVOuMUK6C6ule/RvHQka075bmX17Rkvq7SJUYhNYds BbCRpqlDG2DQufeXplcLEdvKa4h5lRr65MRUZHaiT+R75c+ucxPTiQeS43rEaKWcT3m3 Q+2i1p08pQybKHEScDNS8MMs1PFmJvPKqDO2TgAEEuVsWgxeMM/W5rjrwaeMu5GVTiaQ TAqg== X-Gm-Message-State: AKGB3mKLsZgFkKTO0G0f6NpVd0CrxPNcJssFN+/8onZfPvbWJ3F2ocfA l8X891YgFJdCFrXK0uA5KWRfKw== 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-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 05 Jan 2018 15:44:30 -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-all@freebsd.org Fri Jan 5 16:04:58 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 16A11EB18FF; Fri, 5 Jan 2018 16:04:58 +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 E0A286FCE3; Fri, 5 Jan 2018 16:04:57 +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 w05G4uOg058127; Fri, 5 Jan 2018 16:04:56 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w05G4uRi058124; Fri, 5 Jan 2018 16:04:56 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <201801051604.w05G4uRi058124@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Fri, 5 Jan 2018 16:04:56 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r327588 - in stable/11/sys/dev: hpt27xx hptnr hptrr X-SVN-Group: stable-11 X-SVN-Commit-Author: emaste X-SVN-Commit-Paths: in stable/11/sys/dev: hpt27xx hptnr hptrr X-SVN-Commit-Revision: 327588 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 05 Jan 2018 16:04:58 -0000 Author: emaste Date: Fri Jan 5 16:04:56 2018 New Revision: 327588 URL: https://svnweb.freebsd.org/changeset/base/327588 Log: MFC r327497, r327498: fix memory disclosure in hpt* ioctls r327497: 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) r327498: 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. Security: memory disclosure in root-only ioctls Sponsored by: The FreeBSD Foundation Modified: stable/11/sys/dev/hpt27xx/hpt27xx_osm_bsd.c stable/11/sys/dev/hptnr/hptnr_osm_bsd.c stable/11/sys/dev/hptrr/hptrr_osm_bsd.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/dev/hpt27xx/hpt27xx_osm_bsd.c ============================================================================== --- stable/11/sys/dev/hpt27xx/hpt27xx_osm_bsd.c Fri Jan 5 11:46:45 2018 (r327587) +++ stable/11/sys/dev/hpt27xx/hpt27xx_osm_bsd.c Fri Jan 5 16:04:56 2018 (r327588) @@ -1402,7 +1402,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: @@ -1432,7 +1432,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: stable/11/sys/dev/hptnr/hptnr_osm_bsd.c ============================================================================== --- stable/11/sys/dev/hptnr/hptnr_osm_bsd.c Fri Jan 5 11:46:45 2018 (r327587) +++ stable/11/sys/dev/hptnr/hptnr_osm_bsd.c Fri Jan 5 16:04:56 2018 (r327588) @@ -1584,7 +1584,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: @@ -1614,7 +1614,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: stable/11/sys/dev/hptrr/hptrr_osm_bsd.c ============================================================================== --- stable/11/sys/dev/hptrr/hptrr_osm_bsd.c Fri Jan 5 11:46:45 2018 (r327587) +++ stable/11/sys/dev/hptrr/hptrr_osm_bsd.c Fri Jan 5 16:04:56 2018 (r327588) @@ -1231,7 +1231,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: @@ -1261,7 +1261,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-all@freebsd.org Fri Jan 5 16:11:36 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 4420BEB1F2E for ; Fri, 5 Jan 2018 16:11:36 +0000 (UTC) (envelope-from steven@multiplay.co.uk) Received: from mail-wm0-x22f.google.com (mail-wm0-x22f.google.com [IPv6:2a00:1450:400c:c09::22f]) (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 BEA2F701CF for ; Fri, 5 Jan 2018 16:11:35 +0000 (UTC) (envelope-from steven@multiplay.co.uk) Received: by mail-wm0-x22f.google.com with SMTP id b141so3362028wme.1 for ; Fri, 05 Jan 2018 08:11:35 -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=DU4iDMcsRrc+cOgQx1aDCZ6pRCwUYyiUTdSTbM/Xl7Afup0SJJaJTv6TX1TpduP350 kFU1AnqWf2JftHbXxodYpB8iSKm8B3G2haK7J8DoX7HqyGznLn8pNs5+V15QU+91kQmO lwYPIG6w5U9U+FUendifV4sS0rtU9kkrx2f/A6NyF2cvG6Ux1xElTo79rPD9jr3rff+7 BNiyGWjKDlOVRs2rnnvosZS8jx0YR+/7Gh/h7ttdJtg9AYOXik0jhq//a4BCs/etM8Uu q6nn+okyZ0B1ddlgGVPeWovkzLacQecW4pN6Zmzy1cgS+MrBL4+uX2VWcO57DVh5S+Jo kS/g== X-Gm-Message-State: AKGB3mKQg6VLY+0H3UkT5yww0pMTZa6f+y2u+BuwqZ/ZNTkfzaZia0C9 6U1I/k87RWeLU3OgDrtzEdFYNA== 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-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 05 Jan 2018 16:11:36 -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-all@freebsd.org Fri Jan 5 16:59:47 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 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-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" 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-all@freebsd.org Fri Jan 5 17:02:44 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 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-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" 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-all@freebsd.org Fri Jan 5 17:07:15 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 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-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" 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-all@freebsd.org Fri Jan 5 17:12:31 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 77644EB4D6F for ; Fri, 5 Jan 2018 17:12:31 +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 E3D3C72F63 for ; Fri, 5 Jan 2018 17:12:30 +0000 (UTC) (envelope-from steven@multiplay.co.uk) Received: by mail-wm0-x22e.google.com with SMTP id g75so3689524wme.0 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=NuAFe8PYNIyT+8RnIqDIPZkYyRJyZEYU5l98/CHZDe9mZXk66a+wwrjzQEI/ebFbt1 SOQBGEUowCqIsZsrmX/SJ7vBoVaiarTmxRrHumY6XSGi7I62BVT7l0in7s30/EzU1Uze EL1/UcdOdAuvdrB92hCoY25IND278v8GKRcHpG2TBGQ2HJwcV30mnG+0m5Cc5NjcMazU MFYmrMd/Zr4jCMmwEXkQ+NSN9cIsRHeUZhTsNE++EMYmLCrFLGjy/Nw/EzjolrjSHbUl UivOvXG+uiPeg+W5MaXzvcGJ2odoKdsFn0J1AjXU6Jd7NlSa+HaHruMq57RCWOpxVTon yOXA== X-Gm-Message-State: AKGB3mKNdoe7oxh/C5MM0BJpHY0pcnDwfeAWoT6zYMF7Vl9BJJsPf43U EGKbUoSX/96ursil41ieIgPpopSJXtk= 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-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" 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-all@freebsd.org Fri Jan 5 17:16:54 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 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-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" 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-all@freebsd.org Fri Jan 5 17:21:53 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 34D12EB5453; Fri, 5 Jan 2018 17:21:53 +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 F2E237356F; Fri, 5 Jan 2018 17:21:52 +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 w05HLqY4089710; Fri, 5 Jan 2018 17:21:52 GMT (envelope-from pfg@FreeBSD.org) Received: (from pfg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w05HLqAR089708; Fri, 5 Jan 2018 17:21:52 GMT (envelope-from pfg@FreeBSD.org) Message-Id: <201801051721.w05HLqAR089708@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: pfg set sender to pfg@FreeBSD.org using -f From: "Pedro F. Giffuni" Date: Fri, 5 Jan 2018 17:21:51 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r327589 - stable/11/sys/dev/txp X-SVN-Group: stable-11 X-SVN-Commit-Author: pfg X-SVN-Commit-Paths: stable/11/sys/dev/txp X-SVN-Commit-Revision: 327589 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 05 Jan 2018 17:21:53 -0000 Author: pfg Date: Fri Jan 5 17:21:51 2018 New Revision: 327589 URL: https://svnweb.freebsd.org/changeset/base/327589 Log: MFC r327329: dev/txp: Update if_txpreg.h to match OpenBSD's version. Resolve a minor mismatch: TXP_CMD_READ_VERSION instead of TXP_CMD_VERSIONS_READ. Curiously the later is defined but not used in OpenBSD. Obtained from: OpenBSD (CVS 1.31-1.34) Modified: stable/11/sys/dev/txp/if_txp.c stable/11/sys/dev/txp/if_txpreg.h Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/dev/txp/if_txp.c ============================================================================== --- stable/11/sys/dev/txp/if_txp.c Fri Jan 5 16:04:56 2018 (r327588) +++ stable/11/sys/dev/txp/if_txp.c Fri Jan 5 17:21:51 2018 (r327589) @@ -371,7 +371,7 @@ txp_attach(device_t dev) * diagnose sleep image specific issues. */ rsp = NULL; - if (txp_ext_command(sc, TXP_CMD_READ_VERSION, 0, 0, 0, NULL, 0, + if (txp_ext_command(sc, TXP_CMD_VERSIONS_READ, 0, 0, 0, NULL, 0, &rsp, TXP_CMD_WAIT)) { device_printf(dev, "can not read sleep image version\n"); error = ENXIO; Modified: stable/11/sys/dev/txp/if_txpreg.h ============================================================================== --- stable/11/sys/dev/txp/if_txpreg.h Fri Jan 5 16:04:56 2018 (r327588) +++ stable/11/sys/dev/txp/if_txpreg.h Fri Jan 5 17:21:51 2018 (r327589) @@ -1,4 +1,4 @@ -/* $OpenBSD: if_txpreg.h,v 1.30 2001/06/23 04:18:02 jason Exp $ */ +/* $OpenBSD: if_txpreg.h,v 1.34 2001/11/05 17:25:58 art Exp $ */ /* $FreeBSD$ */ /*- @@ -164,7 +164,7 @@ #define TXP_CMD_FILTER_TABLE_MODE_WRITE 0x3d #define TXP_CMD_FILTER_TCL_WRITE 0x3e #define TXP_CMD_FILTER_TBL_READ 0x3f -#define TXP_CMD_READ_VERSION 0x43 +#define TXP_CMD_VERSIONS_READ 0x43 #define TXP_CMD_FILTER_DEFINE 0x45 #define TXP_CMD_ADD_WAKEUP_PKT 0x46 #define TXP_CMD_ADD_SLEEP_PKT 0x47 @@ -382,6 +382,7 @@ struct txp_frag_desc { #define FRAG_FLAGS_TYPE_OPT 0x03 /* type: options */ #define FRAG_FLAGS_TYPE_RX 0x04 /* type: command */ #define FRAG_FLAGS_TYPE_RESP 0x05 /* type: response */ +#define FRAG_FLAGS_VALID 0x80 /* valid descriptor */ struct txp_opt_desc { uint8_t opt_desctype:3, From owner-svn-src-all@freebsd.org Fri Jan 5 17:23:18 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 7FF36EB5574; Fri, 5 Jan 2018 17:23:18 +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 445BF73865; Fri, 5 Jan 2018 17:23:18 +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 w05HNHaY091991; Fri, 5 Jan 2018 17:23:17 GMT (envelope-from pfg@FreeBSD.org) Received: (from pfg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w05HNHCv091989; Fri, 5 Jan 2018 17:23:17 GMT (envelope-from pfg@FreeBSD.org) Message-Id: <201801051723.w05HNHCv091989@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: pfg set sender to pfg@FreeBSD.org using -f From: "Pedro F. Giffuni" Date: Fri, 5 Jan 2018 17:23:17 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r327590 - stable/10/sys/dev/txp X-SVN-Group: stable-10 X-SVN-Commit-Author: pfg X-SVN-Commit-Paths: stable/10/sys/dev/txp X-SVN-Commit-Revision: 327590 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 05 Jan 2018 17:23:18 -0000 Author: pfg Date: Fri Jan 5 17:23:17 2018 New Revision: 327590 URL: https://svnweb.freebsd.org/changeset/base/327590 Log: MFC r327329: dev/txp: Update if_txpreg.h to match OpenBSD's version. Resolve a minor mismatch: TXP_CMD_READ_VERSION instead of TXP_CMD_VERSIONS_READ. Curiously the later is defined but not used in OpenBSD. Obtained from: OpenBSD (CVS 1.31-1.34) Modified: stable/10/sys/dev/txp/if_txp.c stable/10/sys/dev/txp/if_txpreg.h Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/txp/if_txp.c ============================================================================== --- stable/10/sys/dev/txp/if_txp.c Fri Jan 5 17:21:51 2018 (r327589) +++ stable/10/sys/dev/txp/if_txp.c Fri Jan 5 17:23:17 2018 (r327590) @@ -369,7 +369,7 @@ txp_attach(device_t dev) * diagnose sleep image specific issues. */ rsp = NULL; - if (txp_ext_command(sc, TXP_CMD_READ_VERSION, 0, 0, 0, NULL, 0, + if (txp_ext_command(sc, TXP_CMD_VERSIONS_READ, 0, 0, 0, NULL, 0, &rsp, TXP_CMD_WAIT)) { device_printf(dev, "can not read sleep image version\n"); error = ENXIO; Modified: stable/10/sys/dev/txp/if_txpreg.h ============================================================================== --- stable/10/sys/dev/txp/if_txpreg.h Fri Jan 5 17:21:51 2018 (r327589) +++ stable/10/sys/dev/txp/if_txpreg.h Fri Jan 5 17:23:17 2018 (r327590) @@ -1,4 +1,4 @@ -/* $OpenBSD: if_txpreg.h,v 1.30 2001/06/23 04:18:02 jason Exp $ */ +/* $OpenBSD: if_txpreg.h,v 1.34 2001/11/05 17:25:58 art Exp $ */ /* $FreeBSD$ */ /*- @@ -164,7 +164,7 @@ #define TXP_CMD_FILTER_TABLE_MODE_WRITE 0x3d #define TXP_CMD_FILTER_TCL_WRITE 0x3e #define TXP_CMD_FILTER_TBL_READ 0x3f -#define TXP_CMD_READ_VERSION 0x43 +#define TXP_CMD_VERSIONS_READ 0x43 #define TXP_CMD_FILTER_DEFINE 0x45 #define TXP_CMD_ADD_WAKEUP_PKT 0x46 #define TXP_CMD_ADD_SLEEP_PKT 0x47 @@ -382,6 +382,7 @@ struct txp_frag_desc { #define FRAG_FLAGS_TYPE_OPT 0x03 /* type: options */ #define FRAG_FLAGS_TYPE_RX 0x04 /* type: command */ #define FRAG_FLAGS_TYPE_RESP 0x05 /* type: response */ +#define FRAG_FLAGS_VALID 0x80 /* valid descriptor */ struct txp_opt_desc { uint8_t opt_desctype:3, From owner-svn-src-all@freebsd.org Fri Jan 5 17:28:29 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 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-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" 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-all@freebsd.org Fri Jan 5 17:28:52 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 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-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" 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-all@freebsd.org Fri Jan 5 17:29:49 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 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-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" 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-all@freebsd.org Fri Jan 5 17:33:01 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 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-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" 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-all@freebsd.org Fri Jan 5 17:38:42 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 7E26BEB60E4 for ; Fri, 5 Jan 2018 17:38:42 +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 0A58A74513 for ; Fri, 5 Jan 2018 17:38:42 +0000 (UTC) (envelope-from steven@multiplay.co.uk) Received: by mail-wm0-x231.google.com with SMTP id a79so3799271wma.0 for ; Fri, 05 Jan 2018 09:38:41 -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=RhdAtOSpLzsZccC7pD1wyjwdXlMjmal9EMyvsY4czoWXODXMgoa1yDZEa5ou2TBXLS Zs/oBHwzFil4rFSULy7aEw8cj8RhGVz8WMHveDB8jYaV4NnqiBmh1lt88BVmNtuSyvej xXesa1D2x6JPZdNNfWebAbtdwLpopQ75jSMwya1NvOh8iko6WYhcVI/qv/pHzaUuaSke FZpGwGndeGiiINwdYFzXwjOvAyZYYQ5/QO+jSJbch0LXKBTyTqoA9KBoFyxhI242FNqg M1yEShwXwpCIEhkJ6BPyKf1BxLn9pWIaokySNRDzHCBL0O6ywkm4WuWA4lmeJqbns05/ u3CQ== X-Gm-Message-State: AKGB3mI2hysF99DmXP7CmC3RIKiZaEbaTK1P4FcIojqZgp57rLkNQBXO 9oNxLLM/ct3OGWsLptWLaTQVHQ== 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-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 05 Jan 2018 17:38:42 -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-all@freebsd.org Fri Jan 5 17:46:03 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 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-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" 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-all@freebsd.org Fri Jan 5 17:46:01 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 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-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" 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-all@freebsd.org Fri Jan 5 17:46:19 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 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-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 05 Jan 2018 17:46:19 -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-all@freebsd.org Fri Jan 5 18:03:54 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id E0C0AEB7454 for ; Fri, 5 Jan 2018 18:03:54 +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 6D31B758F2 for ; Fri, 5 Jan 2018 18:03:54 +0000 (UTC) (envelope-from steven@multiplay.co.uk) Received: by mail-wm0-x22b.google.com with SMTP id b141so3945112wme.1 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=rdu+l2cgTKfWsUVSLN4ZPjICAMke3YRSY1Lw2KAbIKzsk2Dy2pOhIQK/vn6U3yB1DJ 1q6750xkijWMEYiT9T3/4ZlNv+9cQsdf6kEtRDtw60YsVWaNPC0FR5PlHJ4Yh2ptgrzH uV49QmSG0VRd9QGaSK0m4rsPOLRJVY1T91H9n+cNKHn4dXrZ6onqPIPP7zmADLMAxD07 6l8OC9gpymjOgo/KJCRzCbzqh8G46aRXCpybK23HXdQwFIibbfUzenuDjxzRma3f6++V Ig0B0qcYwUQWOutMZbxlsKfSWhcS+KlAP22brDopOKg0KQUrWTqj5Vwdo9jfnv24hvIf joQQ== X-Gm-Message-State: AKGB3mJBDDGOACtE+vh9cGucy5OMjD1H5aXTmpHqHToEmd40QuZGuLoa ausdtguzFFvq1GCUK+gxEPR/qQ== 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-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" 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-all@freebsd.org Fri Jan 5 18:20:37 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 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-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" 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-all@freebsd.org Fri Jan 5 18:24:21 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 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-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" 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-all@freebsd.org Fri Jan 5 18:32:47 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 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-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" 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-all@freebsd.org Fri Jan 5 19:12:38 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id A82D3EBA9EC; Fri, 5 Jan 2018 19:12:38 +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 6193A78C2B; Fri, 5 Jan 2018 19:12:38 +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 w05JCbJH038709; Fri, 5 Jan 2018 19:12:37 GMT (envelope-from ian@FreeBSD.org) Received: (from ian@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w05JCb9g038703; Fri, 5 Jan 2018 19:12:37 GMT (envelope-from ian@FreeBSD.org) Message-Id: <201801051912.w05JCb9g038703@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ian set sender to ian@FreeBSD.org using -f From: Ian Lepore Date: Fri, 5 Jan 2018 19:12:37 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r327592 - in stable/11: etc etc/defaults sbin/mdmfs X-SVN-Group: stable-11 X-SVN-Commit-Author: ian X-SVN-Commit-Paths: in stable/11: etc etc/defaults sbin/mdmfs X-SVN-Commit-Revision: 327592 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 05 Jan 2018 19:12:38 -0000 Author: ian Date: Fri Jan 5 19:12:36 2018 New Revision: 327592 URL: https://svnweb.freebsd.org/changeset/base/327592 Log: MFC r319987, r324107-r324108 r319987 (MFC'd just to make following changes apply cleanly): Replace md(4) usage in diskless(8) script rc.initdiskless with tmpfs(5). Need to multiply the size of the disk passed to mount_md by 512 as mdmfs expects number of 512-byte blocks while tmpfs size option wants number of bytes. r324107: Enhance mdmfs(8) to work with tmpfs(5). Existing scripts and associated config such as rc.initdiskless, rc.d/var, and others, use mdmfs to create memory filesystems. That program accepts a size argument which allows SI suffixes and treats an unsuffixed number as a count of 512 byte sectors. That makes it difficult to convert existing scripts to use tmpfs instead of mdmfs, because tmpfs treats unsuffixed numbers as a count of bytes. The script logic to deal with existing user config that might include suffixed and unsuffixed numbers is... unpleasant. Also, there is no g'tee that tmpfs will be available. It is sometimes configured out of small-resource embedded systems to save memory and flash storage space. These changes enhance mdmfs(8) so that it accepts two new values for the 'md-device' arg: 'tmpfs' and 'auto'. With tmpfs, the program always uses tmpfs(5) (and fails if it's not available). With 'auto' the program prefers tmpfs, but falls back to using md(4) if tmpfs isn't available. It also handles the -s argument so that the mdconfig interpetation of unsuffixed numbers applies when tmpfs is used as well, so that existing user config keeps working after a switch to tmpfs. A new rc setting, mfs_type, is added to etc/defaults/rc.conf to let users force the use of tmpfs or md; the default value is "auto". Differential Revision: https://reviews.freebsd.org/D12301 r324108: Remove spurious $flags; it's a paste-o from copying the line from rc.subr. Also, add a comment documenting the args passed to mount_md(). Modified: stable/11/etc/defaults/rc.conf stable/11/etc/rc.initdiskless stable/11/etc/rc.subr stable/11/sbin/mdmfs/mdmfs.8 stable/11/sbin/mdmfs/mdmfs.c Directory Properties: stable/11/ (props changed) Modified: stable/11/etc/defaults/rc.conf ============================================================================== --- stable/11/etc/defaults/rc.conf Fri Jan 5 18:32:46 2018 (r327591) +++ stable/11/etc/defaults/rc.conf Fri Jan 5 19:12:36 2018 (r327592) @@ -51,6 +51,7 @@ tmpmfs_flags="-S" # Extra mdmfs options for the mfs /t varmfs="AUTO" # Set to YES to always create an mfs /var, NO to never varsize="32m" # Size of mfs /var if created varmfs_flags="-S" # Extra mount options for the mfs /var +mfs_type="auto" # "md", "tmpfs", "auto" to prefer tmpfs with md as fallback populate_var="AUTO" # Set to YES to always (re)populate /var, NO to never cleanvar_enable="YES" # Clean the /var directory local_startup="/usr/local/etc/rc.d" # startup script dirs. Modified: stable/11/etc/rc.initdiskless ============================================================================== --- stable/11/etc/rc.initdiskless Fri Jan 5 18:32:46 2018 (r327591) +++ stable/11/etc/rc.initdiskless Fri Jan 5 19:12:36 2018 (r327592) @@ -195,10 +195,11 @@ handle_remount() { # $1 = mount point to_umount="$b ${to_umount}" } -# Create a generic memory disk -# +# Create a generic memory disk. +# The 'auto' parameter will attempt to use tmpfs(5), falls back to md(4). +# $1 is size in 512-byte sectors, $2 is the mount point. mount_md() { - /sbin/mdmfs -S -i 4096 -s $1 -M md $2 + /sbin/mdmfs -s $1 auto $2 } # Create the memory filesystem if it has not already been created Modified: stable/11/etc/rc.subr ============================================================================== --- stable/11/etc/rc.subr Fri Jan 5 18:32:46 2018 (r327591) +++ stable/11/etc/rc.subr Fri Jan 5 19:12:36 2018 (r327592) @@ -1834,7 +1834,7 @@ mount_md() if [ -n "$3" ]; then flags="$3" fi - /sbin/mdmfs $flags -s $1 md $2 + /sbin/mdmfs $flags -s $1 ${mfs_type} $2 } # Code common to scripts that need to load a kernel module Modified: stable/11/sbin/mdmfs/mdmfs.8 ============================================================================== --- stable/11/sbin/mdmfs/mdmfs.8 Fri Jan 5 18:32:46 2018 (r327591) +++ stable/11/sbin/mdmfs/mdmfs.8 Fri Jan 5 19:12:36 2018 (r327592) @@ -25,7 +25,7 @@ .\" .\" $FreeBSD$ .\" -.Dd March 9, 2016 +.Dd September 9, 2017 .Dt MDMFS 8 .Os .Sh NAME @@ -33,7 +33,9 @@ .Nm mount_mfs .Nd configure and mount an in-memory file system using the .Xr md 4 -driver +driver or the +.Xr tmpfs 5 +filesystem .Sh SYNOPSIS .Nm .Op Fl DLlMNnPStTUX @@ -63,9 +65,13 @@ utility is designed to be a work-alike and look-alike .Xr mount_mfs 8 . The end result is essentially the same, but is accomplished in a completely different way. -The +Based on +.Ar md-device , +the .Nm -utility configures an +utility either creates a +.Xr tmpfs 5 +filesystem, or it configures an .Xr md 4 disk using .Xr mdconfig 8 , @@ -81,6 +87,44 @@ compressed disk images, as long as the kernel supports All the command line options are passed to the appropriate program at the appropriate stage in order to achieve the desired effect. .Pp +When +.Ar md-device +is `auto', +.Nm +uses +.Xr tmpfs 5 +if it is present in the kernel or can be loaded as a module, +otherwise it falls back to using +.Xr md 4 +auto-unit as if `md' had been specified. +.Pp +When +.Ar md-device +is `tmpfs', +.Nm +mounts a +.Xr tmpfs 5 +filesystem, translating the +.Fl s +size option, if present, into a `-o size=' mount option. +Any +.Fl o +options on the command line are passed through to the +.Xr tmpfs 5 +mount. +Options specific to +.Xr mdconfig 8 +or +.Xr newfs 8 +are ignored. +.Pp +When +.Ar md-device +does not result in +.Xr tmpfs 5 +being used, then an +.Xr md 4 +device is configured instead. By default, .Nm creates a swap-based @@ -218,14 +262,10 @@ is .Em not specified. That is, -this will work for the default swap-backed -.Pq Dv MD_SWAP -disks, -and the optional -.Pq Fl M -.Xr malloc 9 -backed disks -.Pq Dv MD_MALLOC . +this will work when the backing storage is some form of +memory, as opposed to a fixed-size file. +The size may include the usual SI suffixes (k, m, g, t, p). +A number without a suffix is interpreted as a count of 512-byte sectors. .It Fl t Turn on the TRIM enable flag for .Xr newfs 8 . @@ -391,6 +431,7 @@ was given on the command line. .Sh SEE ALSO .Xr md 4 , .Xr fstab 5 , +.Xr tmpfs 5 , .Xr mdconfig 8 , .Xr mount 8 , .Xr newfs 8 Modified: stable/11/sbin/mdmfs/mdmfs.c ============================================================================== --- stable/11/sbin/mdmfs/mdmfs.c Fri Jan 5 18:32:46 2018 (r327591) +++ stable/11/sbin/mdmfs/mdmfs.c Fri Jan 5 19:12:36 2018 (r327592) @@ -34,15 +34,19 @@ __FBSDID("$FreeBSD$"); #include +#include #include +#include #include #include #include #include #include +#include #include #include +#include #include #include #include @@ -78,7 +82,8 @@ static void debugprintf(const char *, ...) __printfli static void do_mdconfig_attach(const char *, const enum md_types); static void do_mdconfig_attach_au(const char *, const enum md_types); static void do_mdconfig_detach(void); -static void do_mount(const char *, const char *); +static void do_mount_md(const char *, const char *); +static void do_mount_tmpfs(const char *, const char *); static void do_mtptsetup(const char *, struct mtpt_info *); static void do_newfs(const char *); static void extract_ugid(const char *, struct mtpt_info *); @@ -89,14 +94,15 @@ int main(int argc, char **argv) { struct mtpt_info mi; /* Mountpoint info. */ + intmax_t mdsize; char *mdconfig_arg, *newfs_arg, /* Args to helper programs. */ *mount_arg; enum md_types mdtype; /* The type of our memory disk. */ - bool have_mdtype; + bool have_mdtype, mlmac; bool detach, softdep, autounit, newfs; - char *mtpoint, *unitstr; + const char *mtpoint, *size_arg, *unitstr; char *p; - int ch; + int ch, idx; void *set; unsigned long ul; @@ -105,6 +111,7 @@ main(int argc, char **argv) detach = true; softdep = true; autounit = false; + mlmac = false; newfs = true; have_mdtype = false; mdtype = MD_SWAP; @@ -119,6 +126,7 @@ main(int argc, char **argv) mdconfig_arg = strdup(""); newfs_arg = strdup(""); mount_arg = strdup(""); + size_arg = NULL; /* If we were started as mount_mfs or mfs, imply -C. */ if (strcmp(getprogname(), "mount_mfs") == 0 || @@ -175,6 +183,7 @@ main(int argc, char **argv) loudsubs = true; break; case 'l': + mlmac = true; argappend(&newfs_arg, "-l"); break; case 'M': @@ -213,7 +222,7 @@ main(int argc, char **argv) softdep = false; break; case 's': - argappend(&mdconfig_arg, "-s %s", optarg); + size_arg = optarg; break; case 't': argappend(&newfs_arg, "-t"); @@ -242,42 +251,107 @@ main(int argc, char **argv) if (argc < 2) usage(); - /* Derive 'unit' (global). */ - unitstr = argv[0]; - if (strncmp(unitstr, "/dev/", 5) == 0) - unitstr += 5; - if (strncmp(unitstr, mdname, mdnamelen) == 0) - unitstr += mdnamelen; - if (!isdigit(*unitstr)) { - autounit = true; - unit = -1; - mdsuffix = unitstr; - } else { - ul = strtoul(unitstr, &p, 10); - if (ul == ULONG_MAX) - errx(1, "bad device unit: %s", unitstr); - unit = ul; - mdsuffix = p; /* can be empty */ + /* + * Historically our size arg was passed directly to mdconfig, which + * treats a number without a suffix as a count of 512-byte sectors; + * tmpfs would treat it as a count of bytes. To get predictable + * behavior for 'auto' we document that the size always uses mdconfig + * rules. To make that work, decode the size here so it can be passed + * to either tmpfs or mdconfig as a count of bytes. + */ + if (size_arg != NULL) { + mdsize = (intmax_t)strtoumax(size_arg, &p, 0); + if (p == size_arg || (p[0] != 0 && p[1] != 0) || mdsize < 0) + errx(1, "invalid size '%s'", size_arg); + switch (*p) { + case 'p': + case 'P': + mdsize *= 1024; + case 't': + case 'T': + mdsize *= 1024; + case 'g': + case 'G': + mdsize *= 1024; + case 'm': + case 'M': + mdsize *= 1024; + case 'k': + case 'K': + mdsize *= 1024; + case 'b': + case 'B': + break; + case '\0': + mdsize *= 512; + break; + default: + errx(1, "invalid size suffix on '%s'", size_arg); + } } + /* + * Based on the command line 'md-device' either mount a tmpfs filesystem + * or configure the md device then format and mount a filesystem on it. + * If the device is 'auto' use tmpfs if it is available and there is no + * request for multilabel MAC (which tmpfs does not support). + */ + unitstr = argv[0]; mtpoint = argv[1]; - if (!have_mdtype) - mdtype = MD_SWAP; - if (softdep) - argappend(&newfs_arg, "-U"); - if (mdtype != MD_VNODE && !newfs) - errx(1, "-P requires a vnode-backed disk"); - /* Do the work. */ - if (detach && !autounit) - do_mdconfig_detach(); - if (autounit) - do_mdconfig_attach_au(mdconfig_arg, mdtype); - else - do_mdconfig_attach(mdconfig_arg, mdtype); - if (newfs) - do_newfs(newfs_arg); - do_mount(mount_arg, mtpoint); + if (strcmp(unitstr, "auto") == 0) { + if (mlmac) + idx = -1; /* Must use md for mlmac. */ + else if ((idx = modfind("tmpfs")) == -1) + idx = kldload("tmpfs"); + if (idx == -1) + unitstr = "md"; + else + unitstr = "tmpfs"; + } + + if (strcmp(unitstr, "tmpfs") == 0) { + if (size_arg != NULL && mdsize != 0) + argappend(&mount_arg, "-o size=%jd", mdsize); + do_mount_tmpfs(mount_arg, mtpoint); + } else { + if (size_arg != NULL) + argappend(&mdconfig_arg, "-s %jdB", mdsize); + if (strncmp(unitstr, "/dev/", 5) == 0) + unitstr += 5; + if (strncmp(unitstr, mdname, mdnamelen) == 0) + unitstr += mdnamelen; + if (!isdigit(*unitstr)) { + autounit = true; + unit = -1; + mdsuffix = unitstr; + } else { + ul = strtoul(unitstr, &p, 10); + if (ul == ULONG_MAX) + errx(1, "bad device unit: %s", unitstr); + unit = ul; + mdsuffix = p; /* can be empty */ + } + + if (!have_mdtype) + mdtype = MD_SWAP; + if (softdep) + argappend(&newfs_arg, "-U"); + if (mdtype != MD_VNODE && !newfs) + errx(1, "-P requires a vnode-backed disk"); + + /* Do the work. */ + if (detach && !autounit) + do_mdconfig_detach(); + if (autounit) + do_mdconfig_attach_au(mdconfig_arg, mdtype); + else + do_mdconfig_attach(mdconfig_arg, mdtype); + if (newfs) + do_newfs(newfs_arg); + do_mount_md(mount_arg, mtpoint); + } + do_mtptsetup(mtpoint, &mi); return (0); @@ -434,7 +508,7 @@ do_mdconfig_detach(void) * Mount the configured memory disk. */ static void -do_mount(const char *args, const char *mtpoint) +do_mount_md(const char *args, const char *mtpoint) { int rv; @@ -442,6 +516,19 @@ do_mount(const char *args, const char *mtpoint) mdname, unit, mdsuffix, mtpoint); if (rv) errx(1, "mount exited with error code %d", rv); +} + +/* + * Mount the configured tmpfs. + */ +static void +do_mount_tmpfs(const char *args, const char *mtpoint) +{ + int rv; + + rv = run(NULL, "%s -t tmpfs %s tmp %s", _PATH_MOUNT, args, mtpoint); + if (rv) + errx(1, "tmpfs mount exited with error code %d", rv); } /* From owner-svn-src-all@freebsd.org Fri Jan 5 19:15:25 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 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-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" 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-all@freebsd.org Fri Jan 5 19:20:45 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 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-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" 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-all@freebsd.org Fri Jan 5 19:21:46 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 7D3B9EBB38D; Fri, 5 Jan 2018 19:21:46 +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 42511796FA; Fri, 5 Jan 2018 19:21:46 +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 w05JLjrs041017; Fri, 5 Jan 2018 19:21:45 GMT (envelope-from ian@FreeBSD.org) Received: (from ian@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w05JLjs9041014; Fri, 5 Jan 2018 19:21:45 GMT (envelope-from ian@FreeBSD.org) Message-Id: <201801051921.w05JLjs9041014@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ian set sender to ian@FreeBSD.org using -f From: Ian Lepore Date: Fri, 5 Jan 2018 19:21:45 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r327594 - stable/11/sys/arm/broadcom/bcm2835 X-SVN-Group: stable-11 X-SVN-Commit-Author: ian X-SVN-Commit-Paths: stable/11/sys/arm/broadcom/bcm2835 X-SVN-Commit-Revision: 327594 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 05 Jan 2018 19:21:46 -0000 Author: ian Date: Fri Jan 5 19:21:45 2018 New Revision: 327594 URL: https://svnweb.freebsd.org/changeset/base/327594 Log: MFC r324169: Work around bcm283x silicon bugs to make i2c repeat-start work for the most common case where it's needed -- a write followed by a read to the same slave. The i2c controller in this chip only performs complete transfers, it does not provide control over start/repeat-start/stop operations on the bus. Thus, we have gotten a full stop/start sequence rather than a repeat-start when doing a typical i2c slave access of "write address, read data". Some i2c slave devices require a repeat-start to work correctly. These changes cause the controller to do a repeat-start by pre-staging the read parameters in the controller registers immediate after the controller has latched the values for the initial write operation, but before any bytes are actually written. With the values pre-staged, when the write portion of the transfer completes, the state machine in the silicon sees a new start operation already staged and that causes it to perform a repeat-start. The key to tricking the buggy hardware into doing this is to avoid prefilling any output data in the transmit FIFO so that it is possible to catch the silicon in the state where transmit values are latched but the transmit isn't completed yet. Modified: stable/11/sys/arm/broadcom/bcm2835/bcm2835_bsc.c stable/11/sys/arm/broadcom/bcm2835/bcm2835_bscreg.h stable/11/sys/arm/broadcom/bcm2835/bcm2835_bscvar.h Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/arm/broadcom/bcm2835/bcm2835_bsc.c ============================================================================== --- stable/11/sys/arm/broadcom/bcm2835/bcm2835_bsc.c Fri Jan 5 19:15:24 2018 (r327593) +++ stable/11/sys/arm/broadcom/bcm2835/bcm2835_bsc.c Fri Jan 5 19:21:45 2018 (r327594) @@ -2,6 +2,7 @@ * Copyright (c) 2001 Tsubai Masanari. * Copyright (c) 2012 Oleksandr Tymoshenko * Copyright (c) 2013 Luiz Otavio O Souza + * Copyright (c) 2017 Ian Lepore * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -29,6 +30,57 @@ #include __FBSDID("$FreeBSD$"); +/* + * Driver for bcm2835 i2c-compatible two-wire bus, named 'BSC' on this SoC. + * + * This controller can only perform complete transfers, it does not provide + * low-level control over sending start/repeat-start/stop sequences on the bus. + * In addition, bugs in the silicon make it somewhat difficult to perform a + * repeat-start, and limit the repeat-start to a read following a write on + * the same slave device. (The i2c protocol allows a repeat start to change + * direction or not, and change slave address or not at any time.) + * + * The repeat-start bug and workaround are described in a problem report at + * https://github.com/raspberrypi/linux/issues/254 with the crucial part being + * in a comment block from a fragment of a GPU i2c driver, containing this: + * + * ----------------------------------------------------------------------------- + * - See i2c.v: The I2C peripheral samples the values for rw_bit and xfer_count + * - in the IDLE state if start is set. + * - + * - We want to generate a ReSTART not a STOP at the end of the TX phase. In + * - order to do that we must ensure the state machine goes RACK1 -> RACK2 -> + * - SRSTRT1 (not RACK1 -> RACK2 -> SSTOP1). + * - + * - So, in the RACK2 state when (TX) xfer_count==0 we must therefore have + * - already set, ready to be sampled: + * - READ ; rw_bit <= I2CC bit 0 -- must be "read" + * - ST; start <= I2CC bit 7 -- must be "Go" in order to not issue STOP + * - DLEN; xfer_count <= I2CDLEN -- must be equal to our read amount + * - + * - The plan to do this is: + * - 1. Start the sub-address write, but don't let it finish + * - (keep xfer_count > 0) + * - 2. Populate READ, DLEN and ST in preparation for ReSTART read sequence + * - 3. Let TX finish (write the rest of the data) + * - 4. Read back data as it arrives + * ----------------------------------------------------------------------------- + * + * The transfer function below scans the list of messages passed to it, looking + * for a read following a write to the same slave. When it finds that, it + * starts the write without prefilling the tx fifo, which holds xfer_count>0, + * then presets the direction, length, and start command for the following read, + * as described above. Then the tx fifo is filled and the rest of the transfer + * proceeds as normal, with the controller automatically supplying a + * repeat-start on the bus when the write operation finishes. + * + * XXX I suspect the controller may be able to do a repeat-start on any + * write->read or write->write transition, even when the slave addresses differ. + * It's unclear whether the slave address can be prestaged along with the + * direction and length while the write xfer_count is being held at zero. In + * fact, if it can't do this, then it couldn't be used to read EDID data. + */ + #include #include #include @@ -58,6 +110,14 @@ static struct ofw_compat_data compat_data[] = { {NULL, 0} }; +#define DEVICE_DEBUGF(sc, lvl, fmt, args...) \ + if ((lvl) <= (sc)->sc_debug) \ + device_printf((sc)->sc_dev, fmt, ##args) + +#define DEBUGF(sc, lvl, fmt, args...) \ + if ((lvl) <= (sc)->sc_debug) \ + printf(fmt, ##args) + static void bcm_bsc_intr(void *); static int bcm_bsc_detach(device_t); @@ -197,6 +257,9 @@ bcm_bsc_sysctl_init(struct bcm_bsc_softc *sc) SYSCTL_ADD_PROC(ctx, tree, OID_AUTO, "rise_edge_delay", CTLFLAG_RW | CTLTYPE_UINT, sc, sizeof(*sc), bcm_bsc_rise_proc, "IU", "I2C BUS rising edge delay"); + SYSCTL_ADD_INT(ctx, tree, OID_AUTO, "debug", + CTLFLAG_RWTUN, &sc->sc_debug, 0, + "Enable debug; 1=reads/writes, 2=add starts/stops"); } static void @@ -322,6 +385,8 @@ bcm_bsc_detach(device_t dev) bus_generic_detach(dev); sc = device_get_softc(dev); + if (sc->sc_iicbus != NULL) + device_delete_child(dev, sc->sc_iicbus); mtx_destroy(&sc->sc_mtx); if (sc->sc_intrhand) bus_teardown_intr(dev, sc->sc_irq_res, sc->sc_intrhand); @@ -334,6 +399,76 @@ bcm_bsc_detach(device_t dev) } static void +bcm_bsc_empty_rx_fifo(struct bcm_bsc_softc *sc) +{ + uint32_t status; + + /* Assumes sc_totlen > 0 and BCM_BSC_STATUS_RXD is asserted on entry. */ + do { + if (sc->sc_resid == 0) { + sc->sc_data = sc->sc_curmsg->buf; + sc->sc_dlen = sc->sc_curmsg->len; + sc->sc_resid = sc->sc_dlen; + ++sc->sc_curmsg; + } + do { + *sc->sc_data = BCM_BSC_READ(sc, BCM_BSC_DATA); + DEBUGF(sc, 1, "0x%02x ", *sc->sc_data); + ++sc->sc_data; + --sc->sc_resid; + --sc->sc_totlen; + status = BCM_BSC_READ(sc, BCM_BSC_STATUS); + } while (sc->sc_resid > 0 && (status & BCM_BSC_STATUS_RXD)); + } while (sc->sc_totlen > 0 && (status & BCM_BSC_STATUS_RXD)); +} + +static void +bcm_bsc_fill_tx_fifo(struct bcm_bsc_softc *sc) +{ + uint32_t status; + + /* Assumes sc_totlen > 0 and BCM_BSC_STATUS_TXD is asserted on entry. */ + do { + if (sc->sc_resid == 0) { + sc->sc_data = sc->sc_curmsg->buf; + sc->sc_dlen = sc->sc_curmsg->len; + sc->sc_resid = sc->sc_dlen; + ++sc->sc_curmsg; + } + do { + BCM_BSC_WRITE(sc, BCM_BSC_DATA, *sc->sc_data); + DEBUGF(sc, 1, "0x%02x ", *sc->sc_data); + ++sc->sc_data; + --sc->sc_resid; + --sc->sc_totlen; + status = BCM_BSC_READ(sc, BCM_BSC_STATUS); + } while (sc->sc_resid > 0 && (status & BCM_BSC_STATUS_TXD)); + /* + * If a repeat-start was pending and we just hit the end of a tx + * buffer, see if it's also the end of the writes that preceeded + * the repeat-start. If so, log the repeat-start and the start + * of the following read, and return because we're not writing + * anymore (and TXD will be true because there's room to write + * in the fifo). + */ + if (sc->sc_replen > 0 && sc->sc_resid == 0) { + sc->sc_replen -= sc->sc_dlen; + if (sc->sc_replen == 0) { + DEBUGF(sc, 1, " err=0\n"); + DEVICE_DEBUGF(sc, 2, "rstart 0x%02x\n", + sc->sc_curmsg->slave | 0x01); + DEVICE_DEBUGF(sc, 1, + "read 0x%02x len %d: ", + sc->sc_curmsg->slave | 0x01, + sc->sc_totlen); + sc->sc_flags |= BCM_I2C_READ; + return; + } + } + } while (sc->sc_totlen > 0 && (status & BCM_BSC_STATUS_TXD)); +} + +static void bcm_bsc_intr(void *arg) { struct bcm_bsc_softc *sc; @@ -350,35 +485,28 @@ bcm_bsc_intr(void *arg) } status = BCM_BSC_READ(sc, BCM_BSC_STATUS); + DEBUGF(sc, 4, " ", status); - /* Check for errors. */ - if (status & (BCM_BSC_STATUS_CLKT | BCM_BSC_STATUS_ERR)) { - /* Disable interrupts. */ - bcm_bsc_reset(sc); - sc->sc_flags |= BCM_I2C_ERROR; - wakeup(sc->sc_dev); - BCM_BSC_UNLOCK(sc); - return; - } + /* RXD and DONE can assert together, empty fifo before checking done. */ + if ((sc->sc_flags & BCM_I2C_READ) && (status & BCM_BSC_STATUS_RXD)) + bcm_bsc_empty_rx_fifo(sc); - if (sc->sc_flags & BCM_I2C_READ) { - while (sc->sc_resid > 0 && (status & BCM_BSC_STATUS_RXD)) { - *sc->sc_data++ = BCM_BSC_READ(sc, BCM_BSC_DATA); - sc->sc_resid--; - status = BCM_BSC_READ(sc, BCM_BSC_STATUS); - } - } else { - while (sc->sc_resid > 0 && (status & BCM_BSC_STATUS_TXD)) { - BCM_BSC_WRITE(sc, BCM_BSC_DATA, *sc->sc_data++); - sc->sc_resid--; - status = BCM_BSC_READ(sc, BCM_BSC_STATUS); - } - } - - if (status & BCM_BSC_STATUS_DONE) { + /* Check for completion. */ + if (status & (BCM_BSC_STATUS_ERRBITS | BCM_BSC_STATUS_DONE)) { + sc->sc_flags |= BCM_I2C_DONE; + if (status & BCM_BSC_STATUS_ERRBITS) + sc->sc_flags |= BCM_I2C_ERROR; /* Disable interrupts. */ bcm_bsc_reset(sc); - wakeup(sc->sc_dev); + wakeup(sc); + } else if (!(sc->sc_flags & BCM_I2C_READ)) { + /* + * Don't check for TXD until after determining whether the + * transfer is complete; TXD will be asserted along with ERR or + * DONE if there is room in the fifo. + */ + if (status & BCM_BSC_STATUS_TXD) + bcm_bsc_fill_tx_fifo(sc); } BCM_BSC_UNLOCK(sc); @@ -388,8 +516,11 @@ static int bcm_bsc_transfer(device_t dev, struct iic_msg *msgs, uint32_t nmsgs) { struct bcm_bsc_softc *sc; - uint32_t intr, read, status; - int i, err; + struct iic_msg *endmsgs, *nxtmsg; + uint32_t readctl, status; + int err; + uint16_t curlen; + uint8_t curisread, curslave, nxtisread, nxtslave; sc = device_get_softc(dev); BCM_BSC_LOCK(sc); @@ -401,53 +532,156 @@ bcm_bsc_transfer(device_t dev, struct iic_msg *msgs, u /* Now we have control over the BSC controller. */ sc->sc_flags = BCM_I2C_BUSY; + DEVICE_DEBUGF(sc, 3, "Transfer %d msgs\n", nmsgs); + /* Clear the FIFO and the pending interrupts. */ bcm_bsc_reset(sc); + /* + * Perform all the transfers requested in the array of msgs. Note that + * it is bcm_bsc_empty_rx_fifo() and bcm_bsc_fill_tx_fifo() that advance + * sc->sc_curmsg through the array of messages, as the data from each + * message is fully consumed, but it is this loop that notices when we + * have no more messages to process. + */ err = 0; - for (i = 0; i < nmsgs; i++) { + sc->sc_resid = 0; + sc->sc_curmsg = msgs; + endmsgs = &msgs[nmsgs]; + while (sc->sc_curmsg < endmsgs) { + readctl = 0; + curslave = sc->sc_curmsg->slave >> 1; + curisread = sc->sc_curmsg->flags & IIC_M_RD; + sc->sc_replen = 0; + sc->sc_totlen = sc->sc_curmsg->len; + /* + * Scan for scatter/gather IO (same slave and direction) or + * repeat-start (read following write for the same slave). + */ + for (nxtmsg = sc->sc_curmsg + 1; nxtmsg < endmsgs; ++nxtmsg) { + nxtslave = nxtmsg->slave >> 1; + if (curslave == nxtslave) { + nxtisread = nxtmsg->flags & IIC_M_RD; + if (curisread == nxtisread) { + /* + * Same slave and direction, this + * message will be part of the same + * transfer as the previous one. + */ + sc->sc_totlen += nxtmsg->len; + continue; + } else if (curisread == IIC_M_WR) { + /* + * Read after write to same slave means + * repeat-start, remember how many bytes + * come before the repeat-start, switch + * the direction to IIC_M_RD, and gather + * up following reads to the same slave. + */ + curisread = IIC_M_RD; + sc->sc_replen = sc->sc_totlen; + sc->sc_totlen += nxtmsg->len; + continue; + } + } + break; + } + /* + * curslave and curisread temporaries from above may refer to + * the after-repstart msg, reset them to reflect sc_curmsg. + */ + curisread = (sc->sc_curmsg->flags & IIC_M_RD) ? 1 : 0; + curslave = sc->sc_curmsg->slave | curisread; + /* Write the slave address. */ - BCM_BSC_WRITE(sc, BCM_BSC_SLAVE, msgs[i].slave >> 1); + BCM_BSC_WRITE(sc, BCM_BSC_SLAVE, curslave >> 1); - /* Write the data length. */ - BCM_BSC_WRITE(sc, BCM_BSC_DLEN, msgs[i].len); + DEVICE_DEBUGF(sc, 2, "start 0x%02x\n", curslave); - sc->sc_data = msgs[i].buf; - sc->sc_resid = msgs[i].len; - if ((msgs[i].flags & IIC_M_RD) == 0) { - /* Fill up the TX FIFO. */ - status = BCM_BSC_READ(sc, BCM_BSC_STATUS); - while (sc->sc_resid > 0 && - (status & BCM_BSC_STATUS_TXD)) { - BCM_BSC_WRITE(sc, BCM_BSC_DATA, *sc->sc_data); - sc->sc_data++; - sc->sc_resid--; - status = BCM_BSC_READ(sc, BCM_BSC_STATUS); + /* + * Either set up read length and direction variables for a + * simple transfer or get the hardware started on the first + * piece of a transfer that involves a repeat-start and set up + * the read length and direction vars for the second piece. + */ + if (sc->sc_replen == 0) { + DEVICE_DEBUGF(sc, 1, "%-6s 0x%02x len %d: ", + (curisread) ? "readctl" : "write", curslave, + sc->sc_totlen); + curlen = sc->sc_totlen; + if (curisread) { + readctl = BCM_BSC_CTRL_READ; + sc->sc_flags |= BCM_I2C_READ; + } else { + readctl = 0; + sc->sc_flags &= ~BCM_I2C_READ; } - read = 0; - intr = BCM_BSC_CTRL_INTT; - sc->sc_flags &= ~BCM_I2C_READ; } else { - sc->sc_flags |= BCM_I2C_READ; - read = BCM_BSC_CTRL_READ; - intr = BCM_BSC_CTRL_INTR; + DEVICE_DEBUGF(sc, 1, "%-6s 0x%02x len %d: ", + (curisread) ? "readctl" : "write", curslave, + sc->sc_replen); + + /* + * Start the write transfer with an empty fifo and wait + * for the 'transfer active' status bit to light up; + * that indicates that the hardware has latched the + * direction and length for the write, and we can safely + * reload those registers and issue the start for the + * following read; interrupts are not enabled here. + */ + BCM_BSC_WRITE(sc, BCM_BSC_DLEN, sc->sc_replen); + BCM_BSC_WRITE(sc, BCM_BSC_CTRL, BCM_BSC_CTRL_I2CEN | + BCM_BSC_CTRL_ST); + do { + status = BCM_BSC_READ(sc, BCM_BSC_STATUS); + if (status & BCM_BSC_STATUS_ERR) { + /* no ACK on slave addr */ + err = EIO; + goto xfer_done; + } + } while ((status & BCM_BSC_STATUS_TA) == 0); + /* + * Set curlen and readctl for the repeat-start read that + * we need to set up below, but set sc_flags to write, + * because that is the operation in progress right now. + */ + curlen = sc->sc_totlen - sc->sc_replen; + readctl = BCM_BSC_CTRL_READ; + sc->sc_flags &= ~BCM_I2C_READ; } - intr |= BCM_BSC_CTRL_INTD; - /* Start the transfer. */ - BCM_BSC_WRITE(sc, BCM_BSC_CTRL, BCM_BSC_CTRL_I2CEN | - BCM_BSC_CTRL_ST | read | intr); + /* + * Start the transfer with interrupts enabled, then if doing a + * write, fill the tx fifo. Not prefilling the fifo until after + * this start command is the key workaround for making + * repeat-start work, and it's harmless to do it in this order + * for a regular write too. + */ + BCM_BSC_WRITE(sc, BCM_BSC_DLEN, curlen); + BCM_BSC_WRITE(sc, BCM_BSC_CTRL, readctl | BCM_BSC_CTRL_I2CEN | + BCM_BSC_CTRL_ST | BCM_BSC_CTRL_INT_ALL); - /* Wait for the transaction to complete. */ - err = mtx_sleep(dev, &sc->sc_mtx, 0, "bsciow", hz); + if (!(sc->sc_curmsg->flags & IIC_M_RD)) { + bcm_bsc_fill_tx_fifo(sc); + } + /* Wait for the transaction to complete. */ + while (err == 0 && !(sc->sc_flags & BCM_I2C_DONE)) { + err = mtx_sleep(sc, &sc->sc_mtx, 0, "bsciow", hz); + } /* Check for errors. */ if (err == 0 && (sc->sc_flags & BCM_I2C_ERROR)) err = EIO; +xfer_done: + DEBUGF(sc, 1, " err=%d\n", err); + DEVICE_DEBUGF(sc, 2, "stop\n"); if (err != 0) break; } + + /* Disable interrupts, clean fifo, etc. */ + bcm_bsc_reset(sc); /* Clean the controller flags. */ sc->sc_flags = 0; Modified: stable/11/sys/arm/broadcom/bcm2835/bcm2835_bscreg.h ============================================================================== --- stable/11/sys/arm/broadcom/bcm2835/bcm2835_bscreg.h Fri Jan 5 19:15:24 2018 (r327593) +++ stable/11/sys/arm/broadcom/bcm2835/bcm2835_bscreg.h Fri Jan 5 19:21:45 2018 (r327594) @@ -40,6 +40,9 @@ #define BCM_BSC_CTRL_CLEAR1 (1 << 5) #define BCM_BSC_CTRL_CLEAR0 (1 << 4) #define BCM_BSC_CTRL_READ (1 << 0) +#define BCM_BSC_CTRL_INT_ALL \ + (BCM_BSC_CTRL_INTR | BCM_BSC_CTRL_INTT | BCM_BSC_CTRL_INTD) + #define BCM_BSC_STATUS 0x04 #define BCM_BSC_STATUS_CLKT (1 << 9) #define BCM_BSC_STATUS_ERR (1 << 8) @@ -51,6 +54,9 @@ #define BCM_BSC_STATUS_TXW (1 << 2) #define BCM_BSC_STATUS_DONE (1 << 1) #define BCM_BSC_STATUS_TA (1 << 0) +#define BCM_BSC_STATUS_ERRBITS \ + (BCM_BSC_STATUS_CLKT | BCM_BSC_STATUS_ERR) + #define BCM_BSC_DLEN 0x08 #define BCM_BSC_SLAVE 0x0c #define BCM_BSC_DATA 0x10 Modified: stable/11/sys/arm/broadcom/bcm2835/bcm2835_bscvar.h ============================================================================== --- stable/11/sys/arm/broadcom/bcm2835/bcm2835_bscvar.h Fri Jan 5 19:15:24 2018 (r327593) +++ stable/11/sys/arm/broadcom/bcm2835/bcm2835_bscvar.h Fri Jan 5 19:21:45 2018 (r327594) @@ -40,23 +40,31 @@ struct { }; #define BCM_BSC_BASE_MASK 0x00ffffff +struct iic_msg; + struct bcm_bsc_softc { device_t sc_dev; device_t sc_iicbus; struct mtx sc_mtx; struct resource * sc_mem_res; struct resource * sc_irq_res; + void * sc_intrhand; + struct iic_msg * sc_curmsg; bus_space_tag_t sc_bst; bus_space_handle_t sc_bsh; + int sc_debug; + uint16_t sc_replen; + uint16_t sc_totlen; uint16_t sc_resid; - uint8_t *sc_data; + uint16_t sc_dlen; + uint8_t * sc_data; uint8_t sc_flags; - void * sc_intrhand; }; #define BCM_I2C_BUSY 0x01 #define BCM_I2C_READ 0x02 #define BCM_I2C_ERROR 0x04 +#define BCM_I2C_DONE 0x08 #define BCM_BSC_WRITE(_sc, _off, _val) \ bus_space_write_4((_sc)->sc_bst, (_sc)->sc_bsh, _off, _val) From owner-svn-src-all@freebsd.org Fri Jan 5 19:28:14 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id A012BEBBA3C; Fri, 5 Jan 2018 19:28: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 53D1979EFE; Fri, 5 Jan 2018 19:28: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 w05JSDP2043668; Fri, 5 Jan 2018 19:28:13 GMT (envelope-from ian@FreeBSD.org) Received: (from ian@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w05JSDEL043666; Fri, 5 Jan 2018 19:28:13 GMT (envelope-from ian@FreeBSD.org) Message-Id: <201801051928.w05JSDEL043666@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ian set sender to ian@FreeBSD.org using -f From: Ian Lepore Date: Fri, 5 Jan 2018 19:28:13 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r327595 - stable/11/sys/arm/ti X-SVN-Group: stable-11 X-SVN-Commit-Author: ian X-SVN-Commit-Paths: stable/11/sys/arm/ti X-SVN-Commit-Revision: 327595 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 05 Jan 2018 19:28:14 -0000 Author: ian Date: Fri Jan 5 19:28:13 2018 New Revision: 327595 URL: https://svnweb.freebsd.org/changeset/base/327595 Log: MFC r324185: Enhance the interrupt capabilities of ti_pruss driver. The existing ti_pruss driver for the PRUSS Hardware provided by the AM335x ARM CPU has basic interrupt capabilities. This updated driver provides some more options: - Sysctl based configuration for the interrupts (for some examples, see the test plan in the phabricator review cited below). - A device file (/dev/pruss0.irqN) for each enabled interrupt. This file can be read and the device blocks if no irq has happened or returns an uint64_t timestamp based on nanouptime(). - Each interrupt device file provides kqueue-based event notification, blocking read(), or select(). Submitted by: Manuel Stuhn Differential Revision: https://reviews.freebsd.org/D11959 Modified: stable/11/sys/arm/ti/ti_pruss.c stable/11/sys/arm/ti/ti_pruss.h Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/arm/ti/ti_pruss.c ============================================================================== --- stable/11/sys/arm/ti/ti_pruss.c Fri Jan 5 19:21:45 2018 (r327594) +++ stable/11/sys/arm/ti/ti_pruss.c Fri Jan 5 19:28:13 2018 (r327595) @@ -1,5 +1,6 @@ /*- * Copyright (c) 2013 Rui Paulo + * Copyright (c) 2017 Manuel Stuehn * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -26,28 +27,33 @@ #include __FBSDID("$FreeBSD$"); +#include +#include +#include #include #include +#include #include #include #include #include #include #include +#include +#include #include #include #include #include #include #include +#include #include #include #include #include -#include - #include #include @@ -60,27 +66,72 @@ __FBSDID("$FreeBSD$"); #define DPRINTF(fmt, ...) #endif +static d_open_t ti_pruss_irq_open; +static d_read_t ti_pruss_irq_read; +static d_poll_t ti_pruss_irq_poll; + static device_probe_t ti_pruss_probe; static device_attach_t ti_pruss_attach; static device_detach_t ti_pruss_detach; static void ti_pruss_intr(void *); static d_open_t ti_pruss_open; static d_mmap_t ti_pruss_mmap; -static void ti_pruss_kq_read_detach(struct knote *); -static int ti_pruss_kq_read_event(struct knote *, long); -static d_kqfilter_t ti_pruss_kqfilter; +static void ti_pruss_irq_kqread_detach(struct knote *); +static int ti_pruss_irq_kqevent(struct knote *, long); +static d_kqfilter_t ti_pruss_irq_kqfilter; +static void ti_pruss_privdtor(void *data); -#define TI_PRUSS_IRQS 8 +#define TI_PRUSS_PRU_IRQS 2 +#define TI_PRUSS_HOST_IRQS 8 +#define TI_PRUSS_IRQS (TI_PRUSS_HOST_IRQS+TI_PRUSS_PRU_IRQS) +#define TI_PRUSS_EVENTS 64 +#define NOT_SET_STR "NONE" +#define TI_TS_ARRAY 16 +struct ctl +{ + size_t cnt; + size_t idx; +}; + +struct ts_ring_buf +{ + struct ctl ctl; + uint64_t ts[TI_TS_ARRAY]; +}; + +struct ti_pruss_irqsc +{ + struct mtx sc_mtx; + struct cdev *sc_pdev; + struct selinfo sc_selinfo; + int8_t channel; + int8_t last; + int8_t event; + bool enable; + struct ts_ring_buf tstamps; +}; + +static struct cdevsw ti_pruss_cdevirq = { + .d_version = D_VERSION, + .d_name = "ti_pruss_irq", + .d_open = ti_pruss_irq_open, + .d_read = ti_pruss_irq_read, + .d_poll = ti_pruss_irq_poll, + .d_kqfilter = ti_pruss_irq_kqfilter, +}; + struct ti_pruss_softc { struct mtx sc_mtx; struct resource *sc_mem_res; - struct resource *sc_irq_res[TI_PRUSS_IRQS]; - void *sc_intr[TI_PRUSS_IRQS]; + struct resource *sc_irq_res[TI_PRUSS_HOST_IRQS]; + void *sc_intr[TI_PRUSS_HOST_IRQS]; + struct ti_pruss_irqsc sc_irq_devs[TI_PRUSS_IRQS]; bus_space_tag_t sc_bt; bus_space_handle_t sc_bh; struct cdev *sc_pdev; struct selinfo sc_selinfo; + bool sc_glob_irqen; }; static struct cdevsw ti_pruss_cdevsw = { @@ -88,7 +139,6 @@ static struct cdevsw ti_pruss_cdevsw = { .d_name = "ti_pruss", .d_open = ti_pruss_open, .d_mmap = ti_pruss_mmap, - .d_kqfilter = ti_pruss_kqfilter, }; static device_method_t ti_pruss_methods[] = { @@ -108,6 +158,7 @@ static driver_t ti_pruss_driver = { static devclass_t ti_pruss_devclass; DRIVER_MODULE(ti_pruss, simplebus, ti_pruss_driver, ti_pruss_devclass, 0, 0); +MODULE_DEPEND(ti_pruss, ti_prcm, 1, 1, 1); static struct resource_spec ti_pruss_irq_spec[] = { { SYS_RES_IRQ, 0, RF_ACTIVE }, @@ -120,8 +171,112 @@ static struct resource_spec ti_pruss_irq_spec[] = { { SYS_RES_IRQ, 7, RF_ACTIVE }, { -1, 0, 0 } }; -CTASSERT(TI_PRUSS_IRQS == nitems(ti_pruss_irq_spec) - 1); +CTASSERT(TI_PRUSS_HOST_IRQS == nitems(ti_pruss_irq_spec) - 1); +static int +ti_pruss_irq_open(struct cdev *dev, int oflags, int devtype, struct thread *td) +{ + struct ctl* irqs; + struct ti_pruss_irqsc *sc; + sc = dev->si_drv1; + + irqs = malloc(sizeof(struct ctl), M_DEVBUF, M_WAITOK); + if (!irqs) + return (ENOMEM); + + irqs->cnt = sc->tstamps.ctl.cnt; + irqs->idx = sc->tstamps.ctl.idx; + + return devfs_set_cdevpriv(irqs, ti_pruss_privdtor); +} + +static void +ti_pruss_privdtor(void *data) +{ + free(data, M_DEVBUF); +} + +static int +ti_pruss_irq_poll(struct cdev *dev, int events, struct thread *td) +{ + struct ctl* irqs; + struct ti_pruss_irqsc *sc; + sc = dev->si_drv1; + + devfs_get_cdevpriv((void**)&irqs); + + if (events & (POLLIN | POLLRDNORM)) { + if (sc->tstamps.ctl.cnt != irqs->cnt) + return events & (POLLIN | POLLRDNORM); + else + selrecord(td, &sc->sc_selinfo); + } + return 0; +} + +static int +ti_pruss_irq_read(struct cdev *cdev, struct uio *uio, int ioflag) +{ + const size_t ts_len = sizeof(uint64_t); + struct ti_pruss_irqsc* irq; + struct ctl* priv; + int error = 0; + size_t idx; + ssize_t level; + + irq = cdev->si_drv1; + + if (uio->uio_resid < ts_len) + return (EINVAL); + + error = devfs_get_cdevpriv((void**)&priv); + if (error) + return (error); + + mtx_lock(&irq->sc_mtx); + + if (irq->tstamps.ctl.cnt - priv->cnt > TI_TS_ARRAY) + { + priv->cnt = irq->tstamps.ctl.cnt; + priv->idx = irq->tstamps.ctl.idx; + mtx_unlock(&irq->sc_mtx); + return (ENXIO); + } + + do { + idx = priv->idx; + level = irq->tstamps.ctl.idx - idx; + if (level < 0) + level += TI_TS_ARRAY; + + if (level == 0) { + if (ioflag & O_NONBLOCK) { + mtx_unlock(&irq->sc_mtx); + return (EWOULDBLOCK); + } + + error = msleep(irq, &irq->sc_mtx, PCATCH | PDROP, + "pruirq", 0); + if (error) + return error; + + mtx_lock(&irq->sc_mtx); + } + }while(level == 0); + + mtx_unlock(&irq->sc_mtx); + + error = uiomove(&irq->tstamps.ts[idx], ts_len, uio); + + if (++idx == TI_TS_ARRAY) + idx = 0; + priv->idx = idx; + + atomic_add_32(&priv->cnt, 1); + + return (error); +} + static struct ti_pruss_irq_arg { int irq; struct ti_pruss_softc *sc; @@ -139,7 +294,205 @@ ti_pruss_reg_write(struct ti_pruss_softc *sc, uint32_t bus_space_write_4(sc->sc_bt, sc->sc_bh, reg, val); } +static __inline void +ti_pruss_interrupts_clear(struct ti_pruss_softc *sc) +{ + /* disable global interrupt */ + ti_pruss_reg_write(sc, PRUSS_INTC_GER, 0 ); + + /* clear all events */ + ti_pruss_reg_write(sc, PRUSS_INTC_SECR0, 0xFFFFFFFF); + ti_pruss_reg_write(sc, PRUSS_INTC_SECR1, 0xFFFFFFFF); + + /* disable all host interrupts */ + ti_pruss_reg_write(sc, PRUSS_INTC_HIER, 0); +} + +static __inline int +ti_pruss_interrupts_enable(struct ti_pruss_softc *sc, int8_t irq, bool enable) +{ + if (enable && ((sc->sc_irq_devs[irq].channel == -1) || + (sc->sc_irq_devs[irq].event== -1))) + { + device_printf( sc->sc_pdev->si_drv1, + "Interrupt chain not fully configured, not possible to enable\n" ); + return (EINVAL); + } + + sc->sc_irq_devs[irq].enable = enable; + + if (sc->sc_irq_devs[irq].sc_pdev) { + destroy_dev(sc->sc_irq_devs[irq].sc_pdev); + sc->sc_irq_devs[irq].sc_pdev = NULL; + } + + if (enable) { + sc->sc_irq_devs[irq].sc_pdev = make_dev(&ti_pruss_cdevirq, 0, UID_ROOT, GID_WHEEL, + 0600, "pruss%d.irq%d", device_get_unit(sc->sc_pdev->si_drv1), irq); + sc->sc_irq_devs[irq].sc_pdev->si_drv1 = &sc->sc_irq_devs[irq]; + + sc->sc_irq_devs[irq].tstamps.ctl.idx = 0; + } + + uint32_t reg = enable ? PRUSS_INTC_HIEISR : PRUSS_INTC_HIDISR; + ti_pruss_reg_write(sc, reg, sc->sc_irq_devs[irq].channel); + + reg = enable ? PRUSS_INTC_EISR : PRUSS_INTC_EICR; + ti_pruss_reg_write(sc, reg, sc->sc_irq_devs[irq].event ); + + return (0); +} + +static __inline void +ti_pruss_map_write(struct ti_pruss_softc *sc, uint32_t basereg, uint8_t index, uint8_t content) +{ + const size_t regadr = basereg + index & ~0x03; + const size_t bitpos = (index & 0x03) * 8; + uint32_t rmw = ti_pruss_reg_read(sc, regadr); + rmw = (rmw & ~( 0xF << bitpos)) | ( (content & 0xF) << bitpos); + ti_pruss_reg_write(sc, regadr, rmw); +} + static int +ti_pruss_event_map( SYSCTL_HANDLER_ARGS ) +{ + struct ti_pruss_softc *sc; + const int8_t irq = arg2; + int err; + char event[sizeof(NOT_SET_STR)]; + + sc = arg1; + + if(sc->sc_irq_devs[irq].event == -1) + bcopy(NOT_SET_STR, event, sizeof(event)); + else + snprintf(event, sizeof(event), "%d", sc->sc_irq_devs[irq].event); + + err = sysctl_handle_string(oidp, event, sizeof(event), req); + if(err != 0) + return (err); + + if (req->newptr) { // write event + if (strcmp(NOT_SET_STR, event) == 0) { + ti_pruss_interrupts_enable(sc, irq, false); + sc->sc_irq_devs[irq].event = -1; + } else { + if (sc->sc_irq_devs[irq].channel == -1) { + device_printf( sc->sc_pdev->si_drv1, + "corresponding channel not configured\n"); + return (ENXIO); + } + + const int8_t channelnr = sc->sc_irq_devs[irq].channel; + const int8_t eventnr = strtol( event, NULL, 10 ); // TODO: check if strol is valid + if (eventnr > TI_PRUSS_EVENTS || eventnr < 0) { + device_printf( sc->sc_pdev->si_drv1, + "Event number %d not valid (0 - %d)", + channelnr, TI_PRUSS_EVENTS -1); + return (EINVAL); + } + + sc->sc_irq_devs[irq].channel = channelnr; + sc->sc_irq_devs[irq].event = eventnr; + + // event[nr] <= channel + ti_pruss_map_write(sc, PRUSS_INTC_CMR_BASE, + eventnr, channelnr); + } + } + return (err); +} + +static int +ti_pruss_channel_map(SYSCTL_HANDLER_ARGS) +{ + struct ti_pruss_softc *sc; + int err; + char channel[sizeof(NOT_SET_STR)]; + const int8_t irq = arg2; + + sc = arg1; + + if (sc->sc_irq_devs[irq].channel == -1) + bcopy(NOT_SET_STR, channel, sizeof(channel)); + else + snprintf(channel, sizeof(channel), "%d", sc->sc_irq_devs[irq].channel); + + err = sysctl_handle_string(oidp, channel, sizeof(channel), req); + if (err != 0) + return (err); + + if (req->newptr) { // write event + if (strcmp(NOT_SET_STR, channel) == 0) { + ti_pruss_interrupts_enable(sc, irq, false); + ti_pruss_reg_write(sc, PRUSS_INTC_HIDISR, + sc->sc_irq_devs[irq].channel); + sc->sc_irq_devs[irq].channel = -1; + } else { + const int8_t channelnr = strtol(channel, NULL, 10); // TODO: check if strol is valid + if (channelnr > TI_PRUSS_IRQS || channelnr < 0) + { + device_printf(sc->sc_pdev->si_drv1, + "Channel number %d not valid (0 - %d)", + channelnr, TI_PRUSS_IRQS-1); + return (EINVAL); + } + + sc->sc_irq_devs[irq].channel = channelnr; + sc->sc_irq_devs[irq].last = -1; + + // channel[nr] <= irqnr + ti_pruss_map_write(sc, PRUSS_INTC_HMR_BASE, + irq, channelnr); + } + } + + return (err); +} + +static int +ti_pruss_interrupt_enable(SYSCTL_HANDLER_ARGS) +{ + struct ti_pruss_softc *sc; + int err; + bool irqenable; + const int8_t irq = arg2; + + sc = arg1; + irqenable = sc->sc_irq_devs[arg2].enable; + + err = sysctl_handle_bool(oidp, &irqenable, arg2, req); + if (err != 0) + return (err); + + if (req->newptr) // write enable + return ti_pruss_interrupts_enable(sc, irq, irqenable); + + return (err); +} + +static int +ti_pruss_global_interrupt_enable(SYSCTL_HANDLER_ARGS) +{ + struct ti_pruss_softc *sc; + int err; + bool glob_irqen; + + sc = arg1; + glob_irqen = sc->sc_glob_irqen; + + err = sysctl_handle_bool(oidp, &glob_irqen, arg2, req); + if (err != 0) + return (err); + + if (req->newptr) { + sc->sc_glob_irqen = glob_irqen; + ti_pruss_reg_write(sc, PRUSS_INTC_GER, glob_irqen); + } + + return (err); +} +static int ti_pruss_probe(device_t dev) { @@ -168,13 +521,31 @@ ti_pruss_attach(device_t dev) sc = device_get_softc(dev); rid = 0; mtx_init(&sc->sc_mtx, "TI PRUSS", NULL, MTX_DEF); - knlist_init_mtx(&sc->sc_selinfo.si_note, &sc->sc_mtx); sc->sc_mem_res = bus_alloc_resource_any(dev, SYS_RES_MEMORY, &rid, RF_ACTIVE); if (sc->sc_mem_res == NULL) { device_printf(dev, "could not allocate memory resource\n"); return (ENXIO); } + + struct sysctl_ctx_list *clist = device_get_sysctl_ctx(dev); + if (!clist) + return (EINVAL); + + struct sysctl_oid *poid; + poid = device_get_sysctl_tree( dev ); + if (!poid) + return (EINVAL); + + sc->sc_glob_irqen = false; + struct sysctl_oid *irq_root = SYSCTL_ADD_NODE(clist, SYSCTL_CHILDREN(poid), + OID_AUTO, "irq", CTLFLAG_RD, 0, + "PRUSS Host Interrupts"); + SYSCTL_ADD_PROC(clist, SYSCTL_CHILDREN(poid), OID_AUTO, + "global_interrupt_enable", CTLFLAG_RW | CTLTYPE_U8, + sc, 0, ti_pruss_global_interrupt_enable, + "CU", "Global interrupt enable"); + sc->sc_bt = rman_get_bustag(sc->sc_mem_res); sc->sc_bh = rman_get_bushandle(sc->sc_mem_res); if (bus_alloc_resources(dev, ti_pruss_irq_spec, sc->sc_irq_res) != 0) { @@ -182,48 +553,91 @@ ti_pruss_attach(device_t dev) ti_pruss_detach(dev); return (ENXIO); } + + ti_pruss_interrupts_clear(sc); + for (i = 0; i < TI_PRUSS_IRQS; i++) { - ti_pruss_irq_args[i].irq = i; - ti_pruss_irq_args[i].sc = sc; - if (bus_setup_intr(dev, sc->sc_irq_res[i], - INTR_MPSAFE | INTR_TYPE_MISC, - NULL, ti_pruss_intr, &ti_pruss_irq_args[i], - &sc->sc_intr[i]) != 0) { - device_printf(dev, - "unable to setup the interrupt handler\n"); - ti_pruss_detach(dev); - return (ENXIO); + char name[8]; + snprintf(name, sizeof(name), "%d", i); + + struct sysctl_oid *irq_nodes = SYSCTL_ADD_NODE(clist, SYSCTL_CHILDREN(irq_root), + OID_AUTO, name, CTLFLAG_RD, 0, + "PRUSS Interrupts"); + SYSCTL_ADD_PROC(clist, SYSCTL_CHILDREN(irq_nodes), OID_AUTO, + "channel", CTLFLAG_RW | CTLTYPE_STRING, sc, i, ti_pruss_channel_map, + "A", "Channel attached to this irq"); + SYSCTL_ADD_PROC(clist, SYSCTL_CHILDREN(irq_nodes), OID_AUTO, + "event", CTLFLAG_RW | CTLTYPE_STRING, sc, i, ti_pruss_event_map, + "A", "Event attached to this irq"); + SYSCTL_ADD_PROC(clist, SYSCTL_CHILDREN(irq_nodes), OID_AUTO, + "enable", CTLFLAG_RW | CTLTYPE_U8, sc, i, ti_pruss_interrupt_enable, + "CU", "Enable/Disable interrupt"); + + sc->sc_irq_devs[i].event = -1; + sc->sc_irq_devs[i].channel = -1; + sc->sc_irq_devs[i].tstamps.ctl.idx = 0; + + if (i < TI_PRUSS_HOST_IRQS) { + ti_pruss_irq_args[i].irq = i; + ti_pruss_irq_args[i].sc = sc; + if (bus_setup_intr(dev, sc->sc_irq_res[i], + INTR_MPSAFE | INTR_TYPE_MISC, + NULL, ti_pruss_intr, &ti_pruss_irq_args[i], + &sc->sc_intr[i]) != 0) { + device_printf(dev, + "unable to setup the interrupt handler\n"); + ti_pruss_detach(dev); + + return (ENXIO); + } + mtx_init(&sc->sc_irq_devs[i].sc_mtx, "TI PRUSS IRQ", NULL, MTX_DEF); + knlist_init_mtx(&sc->sc_irq_devs[i].sc_selinfo.si_note, &sc->sc_irq_devs[i].sc_mtx); } } - if (ti_pruss_reg_read(sc, PRUSS_AM18XX_INTC) == PRUSS_AM18XX_REV) - device_printf(dev, "AM18xx PRU-ICSS\n"); - else if (ti_pruss_reg_read(sc, PRUSS_AM33XX_INTC) == PRUSS_AM33XX_REV) + + if (ti_pruss_reg_read(sc, PRUSS_AM33XX_INTC) == PRUSS_AM33XX_REV) device_printf(dev, "AM33xx PRU-ICSS\n"); sc->sc_pdev = make_dev(&ti_pruss_cdevsw, 0, UID_ROOT, GID_WHEEL, 0600, "pruss%d", device_get_unit(dev)); sc->sc_pdev->si_drv1 = dev; + /* Acc. to datasheet always write 1 to polarity registers */ + ti_pruss_reg_write(sc, PRUSS_INTC_SIPR0, 0xFFFFFFFF); + ti_pruss_reg_write(sc, PRUSS_INTC_SIPR1, 0xFFFFFFFF); + + /* Acc. to datasheet always write 0 to event type registers */ + ti_pruss_reg_write(sc, PRUSS_INTC_SITR0, 0); + ti_pruss_reg_write(sc, PRUSS_INTC_SITR1, 0); + return (0); } static int ti_pruss_detach(device_t dev) { - struct ti_pruss_softc *sc; - int i; + struct ti_pruss_softc *sc = device_get_softc(dev); - sc = device_get_softc(dev); - for (i = 0; i < TI_PRUSS_IRQS; i++) { + ti_pruss_interrupts_clear(sc); + + for (int i = 0; i < TI_PRUSS_HOST_IRQS; i++) { + ti_pruss_interrupts_enable( sc, i, false ); + if (sc->sc_intr[i]) bus_teardown_intr(dev, sc->sc_irq_res[i], sc->sc_intr[i]); if (sc->sc_irq_res[i]) bus_release_resource(dev, SYS_RES_IRQ, rman_get_rid(sc->sc_irq_res[i]), sc->sc_irq_res[i]); + knlist_clear(&sc->sc_irq_devs[i].sc_selinfo.si_note, 0); + mtx_lock(&sc->sc_irq_devs[i].sc_mtx); + if (!knlist_empty(&sc->sc_irq_devs[i].sc_selinfo.si_note)) + printf("IRQ %d KQueue not empty!\n", i ); + mtx_unlock(&sc->sc_irq_devs[i].sc_mtx); + knlist_destroy(&sc->sc_irq_devs[i].sc_selinfo.si_note); + mtx_destroy(&sc->sc_irq_devs[i].sc_mtx); } - knlist_clear(&sc->sc_selinfo.si_note, 0); - knlist_destroy(&sc->sc_selinfo.si_note); + mtx_destroy(&sc->sc_mtx); if (sc->sc_mem_res) bus_release_resource(dev, SYS_RES_MEMORY, rman_get_rid(sc->sc_mem_res), @@ -241,19 +655,38 @@ ti_pruss_intr(void *arg) struct ti_pruss_irq_arg *iap = arg; struct ti_pruss_softc *sc = iap->sc; /* - * Interrupts pr1_host_intr[0:7] are mapped to + * Interrupts pr1_host_intr[0:7] are mapped to * Host-2 to Host-9 of PRU-ICSS IRQ-controller. */ - const int pru_int = iap->irq + 2; + const int pru_int = iap->irq + TI_PRUSS_PRU_IRQS; const int pru_int_mask = (1 << pru_int); + const int pru_channel = sc->sc_irq_devs[pru_int].channel; + const int pru_event = sc->sc_irq_devs[pru_channel].event; - val = ti_pruss_reg_read(sc, PRUSS_AM33XX_INTC + PRUSS_INTC_HIER); - DPRINTF("interrupt %p, %d", sc, pru_int); + val = ti_pruss_reg_read(sc, PRUSS_INTC_HIER); if (!(val & pru_int_mask)) return; - ti_pruss_reg_write(sc, PRUSS_AM33XX_INTC + PRUSS_INTC_HIDISR, - pru_int); - KNOTE_UNLOCKED(&sc->sc_selinfo.si_note, pru_int); + + ti_pruss_reg_write(sc, PRUSS_INTC_HIDISR, pru_int); + ti_pruss_reg_write(sc, PRUSS_INTC_SICR, pru_event); + ti_pruss_reg_write(sc, PRUSS_INTC_HIEISR, pru_int); + + struct ti_pruss_irqsc* irq = &sc->sc_irq_devs[pru_channel]; + size_t wr = irq->tstamps.ctl.idx; + + struct timespec ts; + nanouptime(&ts); + irq->tstamps.ts[wr] = ts.tv_sec * 1000000000 + ts.tv_nsec; + + if (++wr == TI_TS_ARRAY) + wr = 0; + atomic_add_32(&irq->tstamps.ctl.cnt, 1); + + irq->tstamps.ctl.idx = wr; + + KNOTE_UNLOCKED(&irq->sc_selinfo.si_note, pru_int); + wakeup(irq); + selwakeup(&irq->sc_selinfo); } static int @@ -271,7 +704,7 @@ ti_pruss_mmap(struct cdev *cdev, vm_ooffset_t offset, struct ti_pruss_softc *sc = device_get_softc(dev); if (offset > rman_get_size(sc->sc_mem_res)) - return (-1); + return (ENOSPC); *paddr = rman_get_start(sc->sc_mem_res) + offset; *memattr = VM_MEMATTR_UNCACHEABLE; @@ -280,31 +713,43 @@ ti_pruss_mmap(struct cdev *cdev, vm_ooffset_t offset, static struct filterops ti_pruss_kq_read = { .f_isfd = 1, - .f_detach = ti_pruss_kq_read_detach, - .f_event = ti_pruss_kq_read_event, + .f_detach = ti_pruss_irq_kqread_detach, + .f_event = ti_pruss_irq_kqevent, }; static void -ti_pruss_kq_read_detach(struct knote *kn) +ti_pruss_irq_kqread_detach(struct knote *kn) { - struct ti_pruss_softc *sc = kn->kn_hook; + struct ti_pruss_irqsc *sc = kn->kn_hook; knlist_remove(&sc->sc_selinfo.si_note, kn, 0); } static int -ti_pruss_kq_read_event(struct knote *kn, long hint) +ti_pruss_irq_kqevent(struct knote *kn, long hint) { - kn->kn_data = hint; + struct ti_pruss_irqsc* irq_sc; + int notify; - return (hint); + irq_sc = kn->kn_hook; + + if (hint > 0) + kn->kn_data = hint - 2; + + if (hint > 0 || irq_sc->last > 0) + notify = 1; + else + notify = 0; + + irq_sc->last = hint; + + return (notify); } static int -ti_pruss_kqfilter(struct cdev *cdev, struct knote *kn) +ti_pruss_irq_kqfilter(struct cdev *cdev, struct knote *kn) { - device_t dev = cdev->si_drv1; - struct ti_pruss_softc *sc = device_get_softc(dev); + struct ti_pruss_irqsc *sc = cdev->si_drv1; switch (kn->kn_filter) { case EVFILT_READ: Modified: stable/11/sys/arm/ti/ti_pruss.h ============================================================================== --- stable/11/sys/arm/ti/ti_pruss.h Fri Jan 5 19:21:45 2018 (r327594) +++ stable/11/sys/arm/ti/ti_pruss.h Fri Jan 5 19:28:13 2018 (r327595) @@ -1,5 +1,6 @@ /*- * Copyright (c) 2013 Rui Paulo + * Copyright (c) 2017 Manuel Stuehn * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -33,8 +34,22 @@ #define PRUSS_AM33XX_REV 0x4e82A900 #define PRUSS_AM33XX_INTC 0x20000 -#define PRUSS_INTC_HIER 0x1500 -#define PRUSS_INTC_HIDISR 0x0038 -#define PRUSS_INTC_HIPIR_BASE 0x0900 +#define PRUSS_INTC_GER (PRUSS_AM33XX_INTC + 0x0010) +#define PRUSS_INTC_SISR (PRUSS_AM33XX_INTC + 0x0020) +#define PRUSS_INTC_SICR (PRUSS_AM33XX_INTC + 0x0024) +#define PRUSS_INTC_EISR (PRUSS_AM33XX_INTC + 0x0028) +#define PRUSS_INTC_EICR (PRUSS_AM33XX_INTC + 0x002C) +#define PRUSS_INTC_HIEISR (PRUSS_AM33XX_INTC + 0x0034) +#define PRUSS_INTC_HIDISR (PRUSS_AM33XX_INTC + 0x0038) +#define PRUSS_INTC_SECR0 (PRUSS_AM33XX_INTC + 0x0280) +#define PRUSS_INTC_SECR1 (PRUSS_AM33XX_INTC + 0x0284) +#define PRUSS_INTC_CMR_BASE (PRUSS_AM33XX_INTC + 0x0400) +#define PRUSS_INTC_HMR_BASE (PRUSS_AM33XX_INTC + 0x0800) +#define PRUSS_INTC_HIPIR_BASE (PRUSS_AM33XX_INTC + 0x0900) +#define PRUSS_INTC_SIPR0 (PRUSS_AM33XX_INTC + 0x0D00) +#define PRUSS_INTC_SIPR1 (PRUSS_AM33XX_INTC + 0x0D04) +#define PRUSS_INTC_SITR0 (PRUSS_AM33XX_INTC + 0x0D80) +#define PRUSS_INTC_SITR1 (PRUSS_AM33XX_INTC + 0x0D84) +#define PRUSS_INTC_HIER (PRUSS_AM33XX_INTC + 0x1500) #endif /* _TI_PRUSS_H_ */ From owner-svn-src-all@freebsd.org Fri Jan 5 19:43:56 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 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-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" 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-all@freebsd.org Fri Jan 5 20:08:10 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 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-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" 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-all@freebsd.org Fri Jan 5 20:21:47 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 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-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" 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-all@freebsd.org Fri Jan 5 21:01:11 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 8363AEC05F7 for ; Fri, 5 Jan 2018 21:01:11 +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 0C8717E39B for ; Fri, 5 Jan 2018 21:01:11 +0000 (UTC) (envelope-from steven@multiplay.co.uk) Received: by mail-wm0-x22e.google.com with SMTP id f206so4637991wmf.5 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=AqUOtENN88pDA9ISOUlIwjkOKgaqtjjzsEZkfqdExNAryubanyGMq8CEFg+aIfG3l0 7NrRLXdH7yGw6afBVX/qUnsUu9erRNh78xvvo+ZeqJww7I3IPQ3+xh8Iv7xb0cHzL39G NcRz2ZnUS+Sldr7d2rx0ojrfaz6Re5fTdoSxm7oS5MT586usDV7/KD6OQUSsY+6nTmd1 bs25GZNDX82stPlYj7OWWfhDvyj62RyozoC+HHrdGV4iPoGSVXJQ1TC2WjulQ1KRIyNS Z5/jh8TXmgpGLeJfHonlCwR+AyjfjDB7EhC7C6C0zCA9Ddfyt8QWv6qXGVNP1m318osg jTfQ== X-Gm-Message-State: AKGB3mJhUMIWwB0QP9oZxKNLkiMvCYDLhMfB5UGwayOI88i++D8ceQnO fqkz2ZXvWsJ+JJOpP+Po9V8URw== 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-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" 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-all@freebsd.org Fri Jan 5 21:06:22 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 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-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" 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-all@freebsd.org Fri Jan 5 22:26:25 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 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-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" 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-all@freebsd.org Fri Jan 5 22:51:27 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 58C93EA4242; Fri, 5 Jan 2018 22:51:27 +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 AAC763EFB; Fri, 5 Jan 2018 22:51:26 +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 w05MpPBM028187; Fri, 5 Jan 2018 22:51:25 GMT (envelope-from jkim@FreeBSD.org) Received: (from jkim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w05MpJIV028121; Fri, 5 Jan 2018 22:51:19 GMT (envelope-from jkim@FreeBSD.org) Message-Id: <201801052251.w05MpJIV028121@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 22:51:19 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r327599 - in vendor-sys/acpica/dist: . source/common source/compiler source/components/debugger source/components/disassembler source/components/dispatcher source/components/events sour... X-SVN-Group: vendor-sys X-SVN-Commit-Author: jkim X-SVN-Commit-Paths: in vendor-sys/acpica/dist: . source/common source/compiler source/components/debugger source/components/disassembler source/components/dispatcher source/components/events source/components/executer so... X-SVN-Commit-Revision: 327599 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 05 Jan 2018 22:51:27 -0000 Author: jkim Date: Fri Jan 5 22:51:18 2018 New Revision: 327599 URL: https://svnweb.freebsd.org/changeset/base/327599 Log: Import ACPICA 20180105. Modified: vendor-sys/acpica/dist/changes.txt vendor-sys/acpica/dist/source/common/acfileio.c vendor-sys/acpica/dist/source/common/acgetline.c vendor-sys/acpica/dist/source/common/adfile.c vendor-sys/acpica/dist/source/common/adisasm.c vendor-sys/acpica/dist/source/common/adwalk.c vendor-sys/acpica/dist/source/common/ahids.c vendor-sys/acpica/dist/source/common/ahpredef.c vendor-sys/acpica/dist/source/common/ahtable.c vendor-sys/acpica/dist/source/common/ahuuids.c vendor-sys/acpica/dist/source/common/cmfsize.c vendor-sys/acpica/dist/source/common/dmextern.c vendor-sys/acpica/dist/source/common/dmrestag.c vendor-sys/acpica/dist/source/common/dmswitch.c vendor-sys/acpica/dist/source/common/dmtable.c vendor-sys/acpica/dist/source/common/dmtables.c vendor-sys/acpica/dist/source/common/dmtbdump.c vendor-sys/acpica/dist/source/common/dmtbinfo.c vendor-sys/acpica/dist/source/common/getopt.c vendor-sys/acpica/dist/source/compiler/aslallocate.c vendor-sys/acpica/dist/source/compiler/aslanalyze.c vendor-sys/acpica/dist/source/compiler/aslascii.c vendor-sys/acpica/dist/source/compiler/aslbtypes.c vendor-sys/acpica/dist/source/compiler/aslcache.c vendor-sys/acpica/dist/source/compiler/aslcodegen.c vendor-sys/acpica/dist/source/compiler/aslcompile.c vendor-sys/acpica/dist/source/compiler/aslcompiler.h vendor-sys/acpica/dist/source/compiler/aslcompiler.l vendor-sys/acpica/dist/source/compiler/aslcstyle.y vendor-sys/acpica/dist/source/compiler/asldebug.c vendor-sys/acpica/dist/source/compiler/asldefine.h vendor-sys/acpica/dist/source/compiler/aslerror.c vendor-sys/acpica/dist/source/compiler/aslexternal.c vendor-sys/acpica/dist/source/compiler/aslfileio.c vendor-sys/acpica/dist/source/compiler/aslfiles.c vendor-sys/acpica/dist/source/compiler/aslfold.c vendor-sys/acpica/dist/source/compiler/aslglobal.h vendor-sys/acpica/dist/source/compiler/aslhelp.c vendor-sys/acpica/dist/source/compiler/aslhelpers.y vendor-sys/acpica/dist/source/compiler/aslhex.c vendor-sys/acpica/dist/source/compiler/aslkeywords.y vendor-sys/acpica/dist/source/compiler/asllength.c vendor-sys/acpica/dist/source/compiler/asllisting.c vendor-sys/acpica/dist/source/compiler/asllistsup.c vendor-sys/acpica/dist/source/compiler/aslload.c vendor-sys/acpica/dist/source/compiler/asllookup.c vendor-sys/acpica/dist/source/compiler/aslmain.c vendor-sys/acpica/dist/source/compiler/aslmap.c vendor-sys/acpica/dist/source/compiler/aslmapenter.c vendor-sys/acpica/dist/source/compiler/aslmapoutput.c vendor-sys/acpica/dist/source/compiler/aslmaputils.c vendor-sys/acpica/dist/source/compiler/aslmessages.c vendor-sys/acpica/dist/source/compiler/aslmessages.h vendor-sys/acpica/dist/source/compiler/aslmethod.c vendor-sys/acpica/dist/source/compiler/aslnamesp.c vendor-sys/acpica/dist/source/compiler/asloffset.c vendor-sys/acpica/dist/source/compiler/aslopcodes.c vendor-sys/acpica/dist/source/compiler/asloperands.c vendor-sys/acpica/dist/source/compiler/aslopt.c vendor-sys/acpica/dist/source/compiler/asloptions.c vendor-sys/acpica/dist/source/compiler/aslparseop.c vendor-sys/acpica/dist/source/compiler/aslparser.y vendor-sys/acpica/dist/source/compiler/aslpld.c vendor-sys/acpica/dist/source/compiler/aslpredef.c vendor-sys/acpica/dist/source/compiler/aslprepkg.c vendor-sys/acpica/dist/source/compiler/aslprimaries.y vendor-sys/acpica/dist/source/compiler/aslprintf.c vendor-sys/acpica/dist/source/compiler/aslprune.c vendor-sys/acpica/dist/source/compiler/aslresource.c vendor-sys/acpica/dist/source/compiler/aslresources.y vendor-sys/acpica/dist/source/compiler/aslrestype1.c vendor-sys/acpica/dist/source/compiler/aslrestype1i.c vendor-sys/acpica/dist/source/compiler/aslrestype2.c vendor-sys/acpica/dist/source/compiler/aslrestype2d.c vendor-sys/acpica/dist/source/compiler/aslrestype2e.c vendor-sys/acpica/dist/source/compiler/aslrestype2q.c vendor-sys/acpica/dist/source/compiler/aslrestype2s.c vendor-sys/acpica/dist/source/compiler/aslrestype2w.c vendor-sys/acpica/dist/source/compiler/aslrules.y vendor-sys/acpica/dist/source/compiler/aslstartup.c vendor-sys/acpica/dist/source/compiler/aslstubs.c vendor-sys/acpica/dist/source/compiler/aslsupport.l vendor-sys/acpica/dist/source/compiler/aslsupport.y vendor-sys/acpica/dist/source/compiler/asltokens.y vendor-sys/acpica/dist/source/compiler/asltransform.c vendor-sys/acpica/dist/source/compiler/asltree.c vendor-sys/acpica/dist/source/compiler/asltypes.h vendor-sys/acpica/dist/source/compiler/asltypes.y vendor-sys/acpica/dist/source/compiler/aslutils.c vendor-sys/acpica/dist/source/compiler/asluuid.c vendor-sys/acpica/dist/source/compiler/aslwalks.c vendor-sys/acpica/dist/source/compiler/aslxref.c vendor-sys/acpica/dist/source/compiler/aslxrefout.c vendor-sys/acpica/dist/source/compiler/cvcompiler.c vendor-sys/acpica/dist/source/compiler/cvdisasm.c vendor-sys/acpica/dist/source/compiler/cvparser.c vendor-sys/acpica/dist/source/compiler/dtcompile.c vendor-sys/acpica/dist/source/compiler/dtcompiler.h vendor-sys/acpica/dist/source/compiler/dtexpress.c vendor-sys/acpica/dist/source/compiler/dtfield.c vendor-sys/acpica/dist/source/compiler/dtio.c vendor-sys/acpica/dist/source/compiler/dtparser.l vendor-sys/acpica/dist/source/compiler/dtparser.y vendor-sys/acpica/dist/source/compiler/dtsubtable.c vendor-sys/acpica/dist/source/compiler/dttable.c vendor-sys/acpica/dist/source/compiler/dttable1.c vendor-sys/acpica/dist/source/compiler/dttable2.c vendor-sys/acpica/dist/source/compiler/dttemplate.c vendor-sys/acpica/dist/source/compiler/dttemplate.h vendor-sys/acpica/dist/source/compiler/dtutils.c vendor-sys/acpica/dist/source/compiler/preprocess.h vendor-sys/acpica/dist/source/compiler/prexpress.c vendor-sys/acpica/dist/source/compiler/prmacros.c vendor-sys/acpica/dist/source/compiler/prparser.l vendor-sys/acpica/dist/source/compiler/prparser.y vendor-sys/acpica/dist/source/compiler/prscan.c vendor-sys/acpica/dist/source/compiler/prutils.c vendor-sys/acpica/dist/source/components/debugger/dbcmds.c vendor-sys/acpica/dist/source/components/debugger/dbconvert.c vendor-sys/acpica/dist/source/components/debugger/dbdisply.c vendor-sys/acpica/dist/source/components/debugger/dbexec.c vendor-sys/acpica/dist/source/components/debugger/dbfileio.c vendor-sys/acpica/dist/source/components/debugger/dbhistry.c vendor-sys/acpica/dist/source/components/debugger/dbinput.c vendor-sys/acpica/dist/source/components/debugger/dbmethod.c vendor-sys/acpica/dist/source/components/debugger/dbnames.c vendor-sys/acpica/dist/source/components/debugger/dbobject.c vendor-sys/acpica/dist/source/components/debugger/dbstats.c vendor-sys/acpica/dist/source/components/debugger/dbtest.c vendor-sys/acpica/dist/source/components/debugger/dbutils.c vendor-sys/acpica/dist/source/components/debugger/dbxface.c vendor-sys/acpica/dist/source/components/disassembler/dmbuffer.c vendor-sys/acpica/dist/source/components/disassembler/dmcstyle.c vendor-sys/acpica/dist/source/components/disassembler/dmdeferred.c vendor-sys/acpica/dist/source/components/disassembler/dmnames.c vendor-sys/acpica/dist/source/components/disassembler/dmopcode.c vendor-sys/acpica/dist/source/components/disassembler/dmresrc.c vendor-sys/acpica/dist/source/components/disassembler/dmresrcl.c vendor-sys/acpica/dist/source/components/disassembler/dmresrcl2.c vendor-sys/acpica/dist/source/components/disassembler/dmresrcs.c vendor-sys/acpica/dist/source/components/disassembler/dmutils.c vendor-sys/acpica/dist/source/components/disassembler/dmwalk.c vendor-sys/acpica/dist/source/components/dispatcher/dsargs.c vendor-sys/acpica/dist/source/components/dispatcher/dscontrol.c vendor-sys/acpica/dist/source/components/dispatcher/dsdebug.c vendor-sys/acpica/dist/source/components/dispatcher/dsfield.c vendor-sys/acpica/dist/source/components/dispatcher/dsinit.c vendor-sys/acpica/dist/source/components/dispatcher/dsmethod.c vendor-sys/acpica/dist/source/components/dispatcher/dsmthdat.c vendor-sys/acpica/dist/source/components/dispatcher/dsobject.c vendor-sys/acpica/dist/source/components/dispatcher/dsopcode.c vendor-sys/acpica/dist/source/components/dispatcher/dspkginit.c vendor-sys/acpica/dist/source/components/dispatcher/dsutils.c vendor-sys/acpica/dist/source/components/dispatcher/dswexec.c vendor-sys/acpica/dist/source/components/dispatcher/dswload.c vendor-sys/acpica/dist/source/components/dispatcher/dswload2.c vendor-sys/acpica/dist/source/components/dispatcher/dswscope.c vendor-sys/acpica/dist/source/components/dispatcher/dswstate.c vendor-sys/acpica/dist/source/components/events/evevent.c vendor-sys/acpica/dist/source/components/events/evglock.c vendor-sys/acpica/dist/source/components/events/evgpe.c vendor-sys/acpica/dist/source/components/events/evgpeblk.c vendor-sys/acpica/dist/source/components/events/evgpeinit.c vendor-sys/acpica/dist/source/components/events/evgpeutil.c vendor-sys/acpica/dist/source/components/events/evhandler.c vendor-sys/acpica/dist/source/components/events/evmisc.c vendor-sys/acpica/dist/source/components/events/evregion.c vendor-sys/acpica/dist/source/components/events/evrgnini.c vendor-sys/acpica/dist/source/components/events/evsci.c vendor-sys/acpica/dist/source/components/events/evxface.c vendor-sys/acpica/dist/source/components/events/evxfevnt.c vendor-sys/acpica/dist/source/components/events/evxfgpe.c vendor-sys/acpica/dist/source/components/events/evxfregn.c vendor-sys/acpica/dist/source/components/executer/exconcat.c vendor-sys/acpica/dist/source/components/executer/exconfig.c vendor-sys/acpica/dist/source/components/executer/exconvrt.c vendor-sys/acpica/dist/source/components/executer/excreate.c vendor-sys/acpica/dist/source/components/executer/exdebug.c vendor-sys/acpica/dist/source/components/executer/exdump.c vendor-sys/acpica/dist/source/components/executer/exfield.c vendor-sys/acpica/dist/source/components/executer/exfldio.c vendor-sys/acpica/dist/source/components/executer/exmisc.c vendor-sys/acpica/dist/source/components/executer/exmutex.c vendor-sys/acpica/dist/source/components/executer/exnames.c vendor-sys/acpica/dist/source/components/executer/exoparg1.c vendor-sys/acpica/dist/source/components/executer/exoparg2.c vendor-sys/acpica/dist/source/components/executer/exoparg3.c vendor-sys/acpica/dist/source/components/executer/exoparg6.c vendor-sys/acpica/dist/source/components/executer/exprep.c vendor-sys/acpica/dist/source/components/executer/exregion.c vendor-sys/acpica/dist/source/components/executer/exresnte.c vendor-sys/acpica/dist/source/components/executer/exresolv.c vendor-sys/acpica/dist/source/components/executer/exresop.c vendor-sys/acpica/dist/source/components/executer/exstore.c vendor-sys/acpica/dist/source/components/executer/exstoren.c vendor-sys/acpica/dist/source/components/executer/exstorob.c vendor-sys/acpica/dist/source/components/executer/exsystem.c vendor-sys/acpica/dist/source/components/executer/extrace.c vendor-sys/acpica/dist/source/components/executer/exutils.c vendor-sys/acpica/dist/source/components/hardware/hwacpi.c vendor-sys/acpica/dist/source/components/hardware/hwesleep.c vendor-sys/acpica/dist/source/components/hardware/hwgpe.c vendor-sys/acpica/dist/source/components/hardware/hwpci.c vendor-sys/acpica/dist/source/components/hardware/hwregs.c vendor-sys/acpica/dist/source/components/hardware/hwsleep.c vendor-sys/acpica/dist/source/components/hardware/hwtimer.c vendor-sys/acpica/dist/source/components/hardware/hwvalid.c vendor-sys/acpica/dist/source/components/hardware/hwxface.c vendor-sys/acpica/dist/source/components/hardware/hwxfsleep.c vendor-sys/acpica/dist/source/components/namespace/nsaccess.c vendor-sys/acpica/dist/source/components/namespace/nsalloc.c vendor-sys/acpica/dist/source/components/namespace/nsarguments.c vendor-sys/acpica/dist/source/components/namespace/nsconvert.c vendor-sys/acpica/dist/source/components/namespace/nsdump.c vendor-sys/acpica/dist/source/components/namespace/nsdumpdv.c vendor-sys/acpica/dist/source/components/namespace/nseval.c vendor-sys/acpica/dist/source/components/namespace/nsinit.c vendor-sys/acpica/dist/source/components/namespace/nsload.c vendor-sys/acpica/dist/source/components/namespace/nsnames.c vendor-sys/acpica/dist/source/components/namespace/nsobject.c vendor-sys/acpica/dist/source/components/namespace/nsparse.c vendor-sys/acpica/dist/source/components/namespace/nspredef.c vendor-sys/acpica/dist/source/components/namespace/nsprepkg.c vendor-sys/acpica/dist/source/components/namespace/nsrepair.c vendor-sys/acpica/dist/source/components/namespace/nsrepair2.c vendor-sys/acpica/dist/source/components/namespace/nssearch.c vendor-sys/acpica/dist/source/components/namespace/nsutils.c vendor-sys/acpica/dist/source/components/namespace/nswalk.c vendor-sys/acpica/dist/source/components/namespace/nsxfeval.c vendor-sys/acpica/dist/source/components/namespace/nsxfname.c vendor-sys/acpica/dist/source/components/namespace/nsxfobj.c vendor-sys/acpica/dist/source/components/parser/psargs.c vendor-sys/acpica/dist/source/components/parser/psloop.c vendor-sys/acpica/dist/source/components/parser/psobject.c vendor-sys/acpica/dist/source/components/parser/psopcode.c vendor-sys/acpica/dist/source/components/parser/psopinfo.c vendor-sys/acpica/dist/source/components/parser/psparse.c vendor-sys/acpica/dist/source/components/parser/psscope.c vendor-sys/acpica/dist/source/components/parser/pstree.c vendor-sys/acpica/dist/source/components/parser/psutils.c vendor-sys/acpica/dist/source/components/parser/pswalk.c vendor-sys/acpica/dist/source/components/parser/psxface.c vendor-sys/acpica/dist/source/components/resources/rsaddr.c vendor-sys/acpica/dist/source/components/resources/rscalc.c vendor-sys/acpica/dist/source/components/resources/rscreate.c vendor-sys/acpica/dist/source/components/resources/rsdump.c vendor-sys/acpica/dist/source/components/resources/rsdumpinfo.c vendor-sys/acpica/dist/source/components/resources/rsinfo.c vendor-sys/acpica/dist/source/components/resources/rsio.c vendor-sys/acpica/dist/source/components/resources/rsirq.c vendor-sys/acpica/dist/source/components/resources/rslist.c vendor-sys/acpica/dist/source/components/resources/rsmemory.c vendor-sys/acpica/dist/source/components/resources/rsmisc.c vendor-sys/acpica/dist/source/components/resources/rsserial.c vendor-sys/acpica/dist/source/components/resources/rsutils.c vendor-sys/acpica/dist/source/components/resources/rsxface.c vendor-sys/acpica/dist/source/components/tables/tbdata.c vendor-sys/acpica/dist/source/components/tables/tbfadt.c vendor-sys/acpica/dist/source/components/tables/tbfind.c vendor-sys/acpica/dist/source/components/tables/tbinstal.c vendor-sys/acpica/dist/source/components/tables/tbprint.c vendor-sys/acpica/dist/source/components/tables/tbutils.c vendor-sys/acpica/dist/source/components/tables/tbxface.c vendor-sys/acpica/dist/source/components/tables/tbxfload.c vendor-sys/acpica/dist/source/components/tables/tbxfroot.c vendor-sys/acpica/dist/source/components/utilities/utaddress.c vendor-sys/acpica/dist/source/components/utilities/utalloc.c vendor-sys/acpica/dist/source/components/utilities/utascii.c vendor-sys/acpica/dist/source/components/utilities/utbuffer.c vendor-sys/acpica/dist/source/components/utilities/utcache.c vendor-sys/acpica/dist/source/components/utilities/utclib.c vendor-sys/acpica/dist/source/components/utilities/utcopy.c vendor-sys/acpica/dist/source/components/utilities/utdebug.c vendor-sys/acpica/dist/source/components/utilities/utdecode.c vendor-sys/acpica/dist/source/components/utilities/utdelete.c vendor-sys/acpica/dist/source/components/utilities/uterror.c vendor-sys/acpica/dist/source/components/utilities/uteval.c vendor-sys/acpica/dist/source/components/utilities/utexcep.c vendor-sys/acpica/dist/source/components/utilities/utglobal.c vendor-sys/acpica/dist/source/components/utilities/uthex.c vendor-sys/acpica/dist/source/components/utilities/utids.c vendor-sys/acpica/dist/source/components/utilities/utinit.c vendor-sys/acpica/dist/source/components/utilities/utlock.c vendor-sys/acpica/dist/source/components/utilities/utmath.c vendor-sys/acpica/dist/source/components/utilities/utmisc.c vendor-sys/acpica/dist/source/components/utilities/utmutex.c vendor-sys/acpica/dist/source/components/utilities/utnonansi.c vendor-sys/acpica/dist/source/components/utilities/utobject.c vendor-sys/acpica/dist/source/components/utilities/utosi.c vendor-sys/acpica/dist/source/components/utilities/utownerid.c vendor-sys/acpica/dist/source/components/utilities/utpredef.c vendor-sys/acpica/dist/source/components/utilities/utprint.c vendor-sys/acpica/dist/source/components/utilities/utresdecode.c vendor-sys/acpica/dist/source/components/utilities/utresrc.c vendor-sys/acpica/dist/source/components/utilities/utstate.c vendor-sys/acpica/dist/source/components/utilities/utstring.c vendor-sys/acpica/dist/source/components/utilities/utstrsuppt.c vendor-sys/acpica/dist/source/components/utilities/utstrtoul64.c vendor-sys/acpica/dist/source/components/utilities/uttrack.c vendor-sys/acpica/dist/source/components/utilities/utuuid.c vendor-sys/acpica/dist/source/components/utilities/utxface.c vendor-sys/acpica/dist/source/components/utilities/utxferror.c vendor-sys/acpica/dist/source/components/utilities/utxfinit.c vendor-sys/acpica/dist/source/components/utilities/utxfmutex.c vendor-sys/acpica/dist/source/include/acapps.h vendor-sys/acpica/dist/source/include/acbuffer.h vendor-sys/acpica/dist/source/include/acclib.h vendor-sys/acpica/dist/source/include/accommon.h vendor-sys/acpica/dist/source/include/acconfig.h vendor-sys/acpica/dist/source/include/acconvert.h vendor-sys/acpica/dist/source/include/acdebug.h vendor-sys/acpica/dist/source/include/acdisasm.h vendor-sys/acpica/dist/source/include/acdispat.h vendor-sys/acpica/dist/source/include/acevents.h vendor-sys/acpica/dist/source/include/acexcep.h vendor-sys/acpica/dist/source/include/acglobal.h vendor-sys/acpica/dist/source/include/achware.h vendor-sys/acpica/dist/source/include/acinterp.h vendor-sys/acpica/dist/source/include/aclocal.h vendor-sys/acpica/dist/source/include/acmacros.h vendor-sys/acpica/dist/source/include/acnames.h vendor-sys/acpica/dist/source/include/acnamesp.h vendor-sys/acpica/dist/source/include/acobject.h vendor-sys/acpica/dist/source/include/acopcode.h vendor-sys/acpica/dist/source/include/acoutput.h vendor-sys/acpica/dist/source/include/acparser.h vendor-sys/acpica/dist/source/include/acpi.h vendor-sys/acpica/dist/source/include/acpiosxf.h vendor-sys/acpica/dist/source/include/acpixf.h vendor-sys/acpica/dist/source/include/acpredef.h vendor-sys/acpica/dist/source/include/acresrc.h vendor-sys/acpica/dist/source/include/acrestyp.h vendor-sys/acpica/dist/source/include/acstruct.h vendor-sys/acpica/dist/source/include/actables.h vendor-sys/acpica/dist/source/include/actbl.h vendor-sys/acpica/dist/source/include/actbl1.h vendor-sys/acpica/dist/source/include/actbl2.h vendor-sys/acpica/dist/source/include/actbl3.h vendor-sys/acpica/dist/source/include/actypes.h vendor-sys/acpica/dist/source/include/acutils.h vendor-sys/acpica/dist/source/include/acuuid.h vendor-sys/acpica/dist/source/include/amlcode.h vendor-sys/acpica/dist/source/include/amlresrc.h vendor-sys/acpica/dist/source/include/platform/accygwin.h vendor-sys/acpica/dist/source/include/platform/acdragonflyex.h vendor-sys/acpica/dist/source/include/platform/acefi.h vendor-sys/acpica/dist/source/include/platform/acefiex.h vendor-sys/acpica/dist/source/include/platform/acenv.h vendor-sys/acpica/dist/source/include/platform/acenvex.h vendor-sys/acpica/dist/source/include/platform/acfreebsd.h vendor-sys/acpica/dist/source/include/platform/acgcc.h vendor-sys/acpica/dist/source/include/platform/acgccex.h vendor-sys/acpica/dist/source/include/platform/achaiku.h vendor-sys/acpica/dist/source/include/platform/acintel.h vendor-sys/acpica/dist/source/include/platform/aclinux.h vendor-sys/acpica/dist/source/include/platform/aclinuxex.h vendor-sys/acpica/dist/source/include/platform/acmacosx.h vendor-sys/acpica/dist/source/include/platform/acmsvc.h vendor-sys/acpica/dist/source/include/platform/acmsvcex.h vendor-sys/acpica/dist/source/include/platform/acnetbsd.h vendor-sys/acpica/dist/source/include/platform/acos2.h vendor-sys/acpica/dist/source/include/platform/acqnx.h vendor-sys/acpica/dist/source/include/platform/acwin.h vendor-sys/acpica/dist/source/include/platform/acwin64.h vendor-sys/acpica/dist/source/os_specific/service_layers/osbsdtbl.c vendor-sys/acpica/dist/source/os_specific/service_layers/oslinuxtbl.c vendor-sys/acpica/dist/source/os_specific/service_layers/osunixdir.c vendor-sys/acpica/dist/source/os_specific/service_layers/osunixmap.c vendor-sys/acpica/dist/source/os_specific/service_layers/osunixxf.c vendor-sys/acpica/dist/source/os_specific/service_layers/oswindir.c vendor-sys/acpica/dist/source/os_specific/service_layers/oswintbl.c vendor-sys/acpica/dist/source/os_specific/service_layers/oswinxf.c vendor-sys/acpica/dist/source/tools/acpibin/abcompare.c vendor-sys/acpica/dist/source/tools/acpibin/abmain.c vendor-sys/acpica/dist/source/tools/acpibin/acpibin.h vendor-sys/acpica/dist/source/tools/acpidump/acpidump.h vendor-sys/acpica/dist/source/tools/acpidump/apdump.c vendor-sys/acpica/dist/source/tools/acpidump/apfiles.c vendor-sys/acpica/dist/source/tools/acpidump/apmain.c vendor-sys/acpica/dist/source/tools/acpiexec/aecommon.h vendor-sys/acpica/dist/source/tools/acpiexec/aeexception.c vendor-sys/acpica/dist/source/tools/acpiexec/aeexec.c vendor-sys/acpica/dist/source/tools/acpiexec/aehandlers.c vendor-sys/acpica/dist/source/tools/acpiexec/aeinitfile.c vendor-sys/acpica/dist/source/tools/acpiexec/aeinstall.c vendor-sys/acpica/dist/source/tools/acpiexec/aemain.c vendor-sys/acpica/dist/source/tools/acpiexec/aeregion.c vendor-sys/acpica/dist/source/tools/acpiexec/aetables.c vendor-sys/acpica/dist/source/tools/acpiexec/aetables.h vendor-sys/acpica/dist/source/tools/acpiexec/aetests.c vendor-sys/acpica/dist/source/tools/acpihelp/acpihelp.h vendor-sys/acpica/dist/source/tools/acpihelp/ahaml.c vendor-sys/acpica/dist/source/tools/acpihelp/ahamlops.c vendor-sys/acpica/dist/source/tools/acpihelp/ahasl.c vendor-sys/acpica/dist/source/tools/acpihelp/ahaslkey.c vendor-sys/acpica/dist/source/tools/acpihelp/ahaslops.c vendor-sys/acpica/dist/source/tools/acpihelp/ahdecode.c vendor-sys/acpica/dist/source/tools/acpihelp/ahgrammar.c vendor-sys/acpica/dist/source/tools/acpihelp/ahmain.c vendor-sys/acpica/dist/source/tools/acpinames/acpinames.h vendor-sys/acpica/dist/source/tools/acpinames/anmain.c vendor-sys/acpica/dist/source/tools/acpinames/anstubs.c vendor-sys/acpica/dist/source/tools/acpinames/antables.c vendor-sys/acpica/dist/source/tools/acpisrc/acpisrc.h vendor-sys/acpica/dist/source/tools/acpisrc/ascase.c vendor-sys/acpica/dist/source/tools/acpisrc/asconvrt.c vendor-sys/acpica/dist/source/tools/acpisrc/asfile.c vendor-sys/acpica/dist/source/tools/acpisrc/asmain.c vendor-sys/acpica/dist/source/tools/acpisrc/asremove.c vendor-sys/acpica/dist/source/tools/acpisrc/astable.c vendor-sys/acpica/dist/source/tools/acpisrc/asutils.c vendor-sys/acpica/dist/source/tools/acpixtract/acpixtract.c vendor-sys/acpica/dist/source/tools/acpixtract/acpixtract.h vendor-sys/acpica/dist/source/tools/acpixtract/axmain.c vendor-sys/acpica/dist/source/tools/acpixtract/axutils.c vendor-sys/acpica/dist/source/tools/efihello/efihello.c vendor-sys/acpica/dist/source/tools/examples/examples.c vendor-sys/acpica/dist/source/tools/examples/examples.h vendor-sys/acpica/dist/source/tools/examples/exstubs.c vendor-sys/acpica/dist/source/tools/examples/extables.c vendor-sys/acpica/dist/tests/misc/badcode.asl vendor-sys/acpica/dist/tests/misc/converterSample.asl vendor-sys/acpica/dist/tests/misc/grammar.asl Modified: vendor-sys/acpica/dist/changes.txt ============================================================================== --- vendor-sys/acpica/dist/changes.txt Fri Jan 5 22:26:23 2018 (r327598) +++ vendor-sys/acpica/dist/changes.txt Fri Jan 5 22:51:18 2018 (r327599) @@ -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: vendor-sys/acpica/dist/source/common/acfileio.c ============================================================================== --- vendor-sys/acpica/dist/source/common/acfileio.c Fri Jan 5 22:26:23 2018 (r327598) +++ vendor-sys/acpica/dist/source/common/acfileio.c Fri Jan 5 22:51:18 2018 (r327599) @@ -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: vendor-sys/acpica/dist/source/common/acgetline.c ============================================================================== --- vendor-sys/acpica/dist/source/common/acgetline.c Fri Jan 5 22:26:23 2018 (r327598) +++ vendor-sys/acpica/dist/source/common/acgetline.c Fri Jan 5 22:51:18 2018 (r327599) @@ -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: vendor-sys/acpica/dist/source/common/adfile.c ============================================================================== --- vendor-sys/acpica/dist/source/common/adfile.c Fri Jan 5 22:26:23 2018 (r327598) +++ vendor-sys/acpica/dist/source/common/adfile.c Fri Jan 5 22:51:18 2018 (r327599) @@ -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: vendor-sys/acpica/dist/source/common/adisasm.c ============================================================================== --- vendor-sys/acpica/dist/source/common/adisasm.c Fri Jan 5 22:26:23 2018 (r327598) +++ vendor-sys/acpica/dist/source/common/adisasm.c Fri Jan 5 22:51:18 2018 (r327599) @@ -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: vendor-sys/acpica/dist/source/common/adwalk.c ============================================================================== --- vendor-sys/acpica/dist/source/common/adwalk.c Fri Jan 5 22:26:23 2018 (r327598) +++ vendor-sys/acpica/dist/source/common/adwalk.c Fri Jan 5 22:51:18 2018 (r327599) @@ -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: vendor-sys/acpica/dist/source/common/ahids.c ============================================================================== --- vendor-sys/acpica/dist/source/common/ahids.c Fri Jan 5 22:26:23 2018 (r327598) +++ vendor-sys/acpica/dist/source/common/ahids.c Fri Jan 5 22:51:18 2018 (r327599) @@ -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: vendor-sys/acpica/dist/source/common/ahpredef.c ============================================================================== --- vendor-sys/acpica/dist/source/common/ahpredef.c Fri Jan 5 22:26:23 2018 (r327598) +++ vendor-sys/acpica/dist/source/common/ahpredef.c Fri Jan 5 22:51:18 2018 (r327599) @@ -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: vendor-sys/acpica/dist/source/common/ahtable.c ============================================================================== --- vendor-sys/acpica/dist/source/common/ahtable.c Fri Jan 5 22:26:23 2018 (r327598) +++ vendor-sys/acpica/dist/source/common/ahtable.c Fri Jan 5 22:51:18 2018 (r327599) @@ -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: vendor-sys/acpica/dist/source/common/ahuuids.c ============================================================================== --- vendor-sys/acpica/dist/source/common/ahuuids.c Fri Jan 5 22:26:23 2018 (r327598) +++ vendor-sys/acpica/dist/source/common/ahuuids.c Fri Jan 5 22:51:18 2018 (r327599) @@ -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: vendor-sys/acpica/dist/source/common/cmfsize.c ============================================================================== --- vendor-sys/acpica/dist/source/common/cmfsize.c Fri Jan 5 22:26:23 2018 (r327598) +++ vendor-sys/acpica/dist/source/common/cmfsize.c Fri Jan 5 22:51:18 2018 (r327599) @@ -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: vendor-sys/acpica/dist/source/common/dmextern.c ============================================================================== --- vendor-sys/acpica/dist/source/common/dmextern.c Fri Jan 5 22:26:23 2018 (r327598) +++ vendor-sys/acpica/dist/source/common/dmextern.c Fri Jan 5 22:51:18 2018 (r327599) @@ -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: vendor-sys/acpica/dist/source/common/dmrestag.c ============================================================================== --- vendor-sys/acpica/dist/source/common/dmrestag.c Fri Jan 5 22:26:23 2018 (r327598) +++ vendor-sys/acpica/dist/source/common/dmrestag.c Fri Jan 5 22:51:18 2018 (r327599) @@ -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: vendor-sys/acpica/dist/source/common/dmswitch.c ============================================================================== --- vendor-sys/acpica/dist/source/common/dmswitch.c Fri Jan 5 22:26:23 2018 (r327598) +++ vendor-sys/acpica/dist/source/common/dmswitch.c Fri Jan 5 22:51:18 2018 (r327599) @@ -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: vendor-sys/acpica/dist/source/common/dmtable.c ============================================================================== --- vendor-sys/acpica/dist/source/common/dmtable.c Fri Jan 5 22:26:23 2018 (r327598) +++ vendor-sys/acpica/dist/source/common/dmtable.c Fri Jan 5 22:51:18 2018 (r327599) @@ -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: vendor-sys/acpica/dist/source/common/dmtables.c ============================================================================== --- vendor-sys/acpica/dist/source/common/dmtables.c Fri Jan 5 22:26:23 2018 (r327598) +++ vendor-sys/acpica/dist/source/common/dmtables.c Fri Jan 5 22:51:18 2018 (r327599) @@ -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: vendor-sys/acpica/dist/source/common/dmtbdump.c ============================================================================== --- vendor-sys/acpica/dist/source/common/dmtbdump.c Fri Jan 5 22:26:23 2018 (r327598) +++ vendor-sys/acpica/dist/source/common/dmtbdump.c Fri Jan 5 22:51:18 2018 (r327599) @@ -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: vendor-sys/acpica/dist/source/common/dmtbinfo.c ============================================================================== --- vendor-sys/acpica/dist/source/common/dmtbinfo.c Fri Jan 5 22:26:23 2018 (r327598) +++ vendor-sys/acpica/dist/source/common/dmtbinfo.c Fri Jan 5 22:51:18 2018 (r327599) @@ -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 "acpi.h" #include "accommon.h" #include "acdisasm.h" +#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: vendor-sys/acpica/dist/source/common/getopt.c ============================================================================== --- vendor-sys/acpica/dist/source/common/getopt.c Fri Jan 5 22:26:23 2018 (r327598) +++ vendor-sys/acpica/dist/source/common/getopt.c Fri Jan 5 22:51:18 2018 (r327599) @@ -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: vendor-sys/acpica/dist/source/compiler/aslallocate.c ============================================================================== --- vendor-sys/acpica/dist/source/compiler/aslallocate.c Fri Jan 5 22:26:23 2018 (r327598) +++ vendor-sys/acpica/dist/source/compiler/aslallocate.c Fri Jan 5 22:51:18 2018 (r327599) @@ -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: vendor-sys/acpica/dist/source/compiler/aslanalyze.c ============================================================================== --- vendor-sys/acpica/dist/source/compiler/aslanalyze.c Fri Jan 5 22:26:23 2018 (r327598) +++ vendor-sys/acpica/dist/source/compiler/aslanalyze.c Fri Jan 5 22:51:18 2018 (r327599) @@ -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: vendor-sys/acpica/dist/source/compiler/aslascii.c ============================================================================== --- vendor-sys/acpica/dist/source/compiler/aslascii.c Fri Jan 5 22:26:23 2018 (r327598) +++ vendor-sys/acpica/dist/source/compiler/aslascii.c Fri Jan 5 22:51:18 2018 (r327599) @@ -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: vendor-sys/acpica/dist/source/compiler/aslbtypes.c ============================================================================== --- vendor-sys/acpica/dist/source/compiler/aslbtypes.c Fri Jan 5 22:26:23 2018 (r327598) +++ vendor-sys/acpica/dist/source/compiler/aslbtypes.c Fri Jan 5 22:51:18 2018 (r327599) @@ -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: vendor-sys/acpica/dist/source/compiler/aslcache.c ============================================================================== --- vendor-sys/acpica/dist/source/compiler/aslcache.c Fri Jan 5 22:26:23 2018 (r327598) +++ vendor-sys/acpica/dist/source/compiler/aslcache.c Fri Jan 5 22:51:18 2018 (r327599) @@ -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: vendor-sys/acpica/dist/source/compiler/aslcodegen.c ============================================================================== --- vendor-sys/acpica/dist/source/compiler/aslcodegen.c Fri Jan 5 22:26:23 2018 (r327598) +++ vendor-sys/acpica/dist/source/compiler/aslcodegen.c Fri Jan 5 22:51:18 2018 (r327599) @@ -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: vendor-sys/acpica/dist/source/compiler/aslcompile.c ============================================================================== --- vendor-sys/acpica/dist/source/compiler/aslcompile.c Fri Jan 5 22:26:23 2018 (r327598) +++ vendor-sys/acpica/dist/source/compiler/aslcompile.c Fri Jan 5 22:51:18 2018 (r327599) @@ -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: vendor-sys/acpica/dist/source/compiler/aslcompiler.h ============================================================================== --- vendor-sys/acpica/dist/source/compiler/aslcompiler.h Fri Jan 5 22:26:23 2018 (r327598) +++ vendor-sys/acpica/dist/source/compiler/aslcompiler.h Fri Jan 5 22:51:18 2018 (r327599) @@ -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: vendor-sys/acpica/dist/source/compiler/aslcompiler.l ============================================================================== --- vendor-sys/acpica/dist/source/compiler/aslcompiler.l Fri Jan 5 22:26:23 2018 (r327598) +++ vendor-sys/acpica/dist/source/compiler/aslcompiler.l Fri Jan 5 22:51:18 2018 (r327599) @@ -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: vendor-sys/acpica/dist/source/compiler/aslcstyle.y ============================================================================== --- vendor-sys/acpica/dist/source/compiler/aslcstyle.y Fri Jan 5 22:26:23 2018 (r327598) +++ vendor-sys/acpica/dist/source/compiler/aslcstyle.y Fri Jan 5 22:51:18 2018 (r327599) @@ -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: vendor-sys/acpica/dist/source/compiler/asldebug.c ============================================================================== --- vendor-sys/acpica/dist/source/compiler/asldebug.c Fri Jan 5 22:26:23 2018 (r327598) +++ vendor-sys/acpica/dist/source/compiler/asldebug.c Fri Jan 5 22:51:18 2018 (r327599) @@ -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: vendor-sys/acpica/dist/source/compiler/asldefine.h ============================================================================== --- vendor-sys/acpica/dist/source/compiler/asldefine.h Fri Jan 5 22:26:23 2018 (r327598) +++ vendor-sys/acpica/dist/source/compiler/asldefine.h Fri Jan 5 22:51:18 2018 (r327599) @@ -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: vendor-sys/acpica/dist/source/compiler/aslerror.c ============================================================================== --- vendor-sys/acpica/dist/source/compiler/aslerror.c Fri Jan 5 22:26:23 2018 (r327598) +++ vendor-sys/acpica/dist/source/compiler/aslerror.c Fri Jan 5 22:51:18 2018 (r327599) @@ -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: vendor-sys/acpica/dist/source/compiler/aslexternal.c ============================================================================== --- vendor-sys/acpica/dist/source/compiler/aslexternal.c Fri Jan 5 22:26:23 2018 (r327598) +++ vendor-sys/acpica/dist/source/compiler/aslexternal.c Fri Jan 5 22:51:18 2018 (r327599) @@ -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: vendor-sys/acpica/dist/source/compiler/aslfileio.c ============================================================================== --- vendor-sys/acpica/dist/source/compiler/aslfileio.c Fri Jan 5 22:26:23 2018 (r327598) +++ vendor-sys/acpica/dist/source/compiler/aslfileio.c Fri Jan 5 22:51:18 2018 (r327599) @@ -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: vendor-sys/acpica/dist/source/compiler/aslfiles.c ============================================================================== --- vendor-sys/acpica/dist/source/compiler/aslfiles.c Fri Jan 5 22:26:23 2018 (r327598) +++ vendor-sys/acpica/dist/source/compiler/aslfiles.c Fri Jan 5 22:51:18 2018 (r327599) @@ -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: vendor-sys/acpica/dist/source/compiler/aslfold.c ============================================================================== --- vendor-sys/acpica/dist/source/compiler/aslfold.c Fri Jan 5 22:26:23 2018 (r327598) +++ vendor-sys/acpica/dist/source/compiler/aslfold.c Fri Jan 5 22:51:18 2018 (r327599) @@ -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: vendor-sys/acpica/dist/source/compiler/aslglobal.h ============================================================================== --- vendor-sys/acpica/dist/source/compiler/aslglobal.h Fri Jan 5 22:26:23 2018 (r327598) +++ vendor-sys/acpica/dist/source/compiler/aslglobal.h Fri Jan 5 22:51:18 2018 (r327599) @@ -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: vendor-sys/acpica/dist/source/compiler/aslhelp.c ============================================================================== --- vendor-sys/acpica/dist/source/compiler/aslhelp.c Fri Jan 5 22:26:23 2018 (r327598) +++ vendor-sys/acpica/dist/source/compiler/aslhelp.c Fri Jan 5 22:51:18 2018 (r327599) @@ -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: vendor-sys/acpica/dist/source/compiler/aslhelpers.y ============================================================================== --- vendor-sys/acpica/dist/source/compiler/aslhelpers.y Fri Jan 5 22:26:23 2018 (r327598) +++ vendor-sys/acpica/dist/source/compiler/aslhelpers.y Fri Jan 5 22:51:18 2018 (r327599) @@ -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: vendor-sys/acpica/dist/source/compiler/aslhex.c ============================================================================== --- vendor-sys/acpica/dist/source/compiler/aslhex.c Fri Jan 5 22:26:23 2018 (r327598) +++ vendor-sys/acpica/dist/source/compiler/aslhex.c Fri Jan 5 22:51:18 2018 (r327599) @@ -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: vendor-sys/acpica/dist/source/compiler/aslkeywords.y ============================================================================== --- vendor-sys/acpica/dist/source/compiler/aslkeywords.y Fri Jan 5 22:26:23 2018 (r327598) +++ vendor-sys/acpica/dist/source/compiler/aslkeywords.y Fri Jan 5 22:51:18 2018 (r327599) @@ -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: vendor-sys/acpica/dist/source/compiler/asllength.c ============================================================================== --- vendor-sys/acpica/dist/source/compiler/asllength.c Fri Jan 5 22:26:23 2018 (r327598) +++ vendor-sys/acpica/dist/source/compiler/asllength.c Fri Jan 5 22:51:18 2018 (r327599) @@ -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: vendor-sys/acpica/dist/source/compiler/asllisting.c ============================================================================== --- vendor-sys/acpica/dist/source/compiler/asllisting.c Fri Jan 5 22:26:23 2018 (r327598) +++ vendor-sys/acpica/dist/source/compiler/asllisting.c Fri Jan 5 22:51:18 2018 (r327599) @@ -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: vendor-sys/acpica/dist/source/compiler/asllistsup.c ============================================================================== --- vendor-sys/acpica/dist/source/compiler/asllistsup.c Fri Jan 5 22:26:23 2018 (r327598) +++ vendor-sys/acpica/dist/source/compiler/asllistsup.c Fri Jan 5 22:51:18 2018 (r327599) @@ -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: vendor-sys/acpica/dist/source/compiler/aslload.c ============================================================================== --- vendor-sys/acpica/dist/source/compiler/aslload.c Fri Jan 5 22:26:23 2018 (r327598) +++ vendor-sys/acpica/dist/source/compiler/aslload.c Fri Jan 5 22:51:18 2018 (r327599) @@ -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: vendor-sys/acpica/dist/source/compiler/asllookup.c ============================================================================== --- vendor-sys/acpica/dist/source/compiler/asllookup.c Fri Jan 5 22:26:23 2018 (r327598) +++ vendor-sys/acpica/dist/source/compiler/asllookup.c Fri Jan 5 22:51:18 2018 (r327599) @@ -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: vendor-sys/acpica/dist/source/compiler/aslmain.c ============================================================================== --- vendor-sys/acpica/dist/source/compiler/aslmain.c Fri Jan 5 22:26:23 2018 (r327598) +++ vendor-sys/acpica/dist/source/compiler/aslmain.c Fri Jan 5 22:51:18 2018 (r327599) @@ -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: vendor-sys/acpica/dist/source/compiler/aslmap.c ============================================================================== --- vendor-sys/acpica/dist/source/compiler/aslmap.c Fri Jan 5 22:26:23 2018 (r327598) +++ vendor-sys/acpica/dist/source/compiler/aslmap.c Fri Jan 5 22:51:18 2018 (r327599) @@ -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: vendor-sys/acpica/dist/source/compiler/aslmapenter.c ============================================================================== --- vendor-sys/acpica/dist/source/compiler/aslmapenter.c Fri Jan 5 22:26:23 2018 (r327598) +++ vendor-sys/acpica/dist/source/compiler/aslmapenter.c Fri Jan 5 22:51:18 2018 (r327599) @@ -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: vendor-sys/acpica/dist/source/compiler/aslmapoutput.c ============================================================================== --- vendor-sys/acpica/dist/source/compiler/aslmapoutput.c Fri Jan 5 22:26:23 2018 (r327598) +++ vendor-sys/acpica/dist/source/compiler/aslmapoutput.c Fri Jan 5 22:51:18 2018 (r327599) @@ -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: vendor-sys/acpica/dist/source/compiler/aslmaputils.c ============================================================================== --- vendor-sys/acpica/dist/source/compiler/aslmaputils.c Fri Jan 5 22:26:23 2018 (r327598) +++ vendor-sys/acpica/dist/source/compiler/aslmaputils.c Fri Jan 5 22:51:18 2018 (r327599) @@ -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: vendor-sys/acpica/dist/source/compiler/aslmessages.c ============================================================================== --- vendor-sys/acpica/dist/source/compiler/aslmessages.c Fri Jan 5 22:26:23 2018 (r327598) +++ vendor-sys/acpica/dist/source/compiler/aslmessages.c Fri Jan 5 22:51:18 2018 (r327599) @@ -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: vendor-sys/acpica/dist/source/compiler/aslmessages.h ============================================================================== --- vendor-sys/acpica/dist/source/compiler/aslmessages.h Fri Jan 5 22:26:23 2018 (r327598) +++ vendor-sys/acpica/dist/source/compiler/aslmessages.h Fri Jan 5 22:51:18 2018 (r327599) @@ -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: vendor-sys/acpica/dist/source/compiler/aslmethod.c ============================================================================== --- vendor-sys/acpica/dist/source/compiler/aslmethod.c Fri Jan 5 22:26:23 2018 (r327598) +++ vendor-sys/acpica/dist/source/compiler/aslmethod.c Fri Jan 5 22:51:18 2018 (r327599) @@ -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: vendor-sys/acpica/dist/source/compiler/aslnamesp.c ============================================================================== --- vendor-sys/acpica/dist/source/compiler/aslnamesp.c Fri Jan 5 22:26:23 2018 (r327598) +++ vendor-sys/acpica/dist/source/compiler/aslnamesp.c Fri Jan 5 22:51:18 2018 (r327599) @@ -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: vendor-sys/acpica/dist/source/compiler/asloffset.c ============================================================================== --- vendor-sys/acpica/dist/source/compiler/asloffset.c Fri Jan 5 22:26:23 2018 (r327598) +++ vendor-sys/acpica/dist/source/compiler/asloffset.c Fri Jan 5 22:51:18 2018 (r327599) @@ -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: vendor-sys/acpica/dist/source/compiler/aslopcodes.c ============================================================================== --- vendor-sys/acpica/dist/source/compiler/aslopcodes.c Fri Jan 5 22:26:23 2018 (r327598) +++ vendor-sys/acpica/dist/source/compiler/aslopcodes.c Fri Jan 5 22:51:18 2018 (r327599) @@ -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: vendor-sys/acpica/dist/source/compiler/asloperands.c ============================================================================== --- vendor-sys/acpica/dist/source/compiler/asloperands.c Fri Jan 5 22:26:23 2018 (r327598) +++ vendor-sys/acpica/dist/source/compiler/asloperands.c Fri Jan 5 22:51:18 2018 (r327599) @@ -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: vendor-sys/acpica/dist/source/compiler/aslopt.c ============================================================================== --- vendor-sys/acpica/dist/source/compiler/aslopt.c Fri Jan 5 22:26:23 2018 (r327598) +++ vendor-sys/acpica/dist/source/compiler/aslopt.c Fri Jan 5 22:51:18 2018 (r327599) @@ -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: vendor-sys/acpica/dist/source/compiler/asloptions.c ============================================================================== --- vendor-sys/acpica/dist/source/compiler/asloptions.c Fri Jan 5 22:26:23 2018 (r327598) +++ vendor-sys/acpica/dist/source/compiler/asloptions.c Fri Jan 5 22:51:18 2018 (r327599) @@ -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: vendor-sys/acpica/dist/source/compiler/aslparseop.c ============================================================================== --- vendor-sys/acpica/dist/source/compiler/aslparseop.c Fri Jan 5 22:26:23 2018 (r327598) +++ vendor-sys/acpica/dist/source/compiler/aslparseop.c Fri Jan 5 22:51:18 2018 (r327599) @@ -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: vendor-sys/acpica/dist/source/compiler/aslparser.y ============================================================================== --- vendor-sys/acpica/dist/source/compiler/aslparser.y Fri Jan 5 22:26:23 2018 (r327598) +++ vendor-sys/acpica/dist/source/compiler/aslparser.y Fri Jan 5 22:51:18 2018 (r327599) @@ -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: vendor-sys/acpica/dist/source/compiler/aslpld.c ============================================================================== --- vendor-sys/acpica/dist/source/compiler/aslpld.c Fri Jan 5 22:26:23 2018 (r327598) +++ vendor-sys/acpica/dist/source/compiler/aslpld.c Fri Jan 5 22:51:18 2018 (r327599) @@ -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: vendor-sys/acpica/dist/source/compiler/aslpredef.c ============================================================================== --- vendor-sys/acpica/dist/source/compiler/aslpredef.c Fri Jan 5 22:26:23 2018 (r327598) *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@freebsd.org Fri Jan 5 22:52:19 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id C154FEA439B; Fri, 5 Jan 2018 22:52:19 +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 894DD63500; Fri, 5 Jan 2018 22:52:19 +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 w05MqICt032201; Fri, 5 Jan 2018 22:52:18 GMT (envelope-from jkim@FreeBSD.org) Received: (from jkim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w05MqIPZ032200; Fri, 5 Jan 2018 22:52:18 GMT (envelope-from jkim@FreeBSD.org) Message-Id: <201801052252.w05MqIPZ032200@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 22:52:18 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r327600 - vendor-sys/acpica/20180105 X-SVN-Group: vendor-sys X-SVN-Commit-Author: jkim X-SVN-Commit-Paths: vendor-sys/acpica/20180105 X-SVN-Commit-Revision: 327600 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 05 Jan 2018 22:52:19 -0000 Author: jkim Date: Fri Jan 5 22:52:18 2018 New Revision: 327600 URL: https://svnweb.freebsd.org/changeset/base/327600 Log: Tag ACPICA 20180105. Added: vendor-sys/acpica/20180105/ - copied from r327599, vendor-sys/acpica/dist/ From owner-svn-src-all@freebsd.org Fri Jan 5 22:56:08 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 6FEEBEA46EF; Fri, 5 Jan 2018 22:56:08 +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 3A8CF636EC; Fri, 5 Jan 2018 22:56:08 +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 w05Mu7JQ032451; Fri, 5 Jan 2018 22:56:07 GMT (envelope-from jkim@FreeBSD.org) Received: (from jkim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w05Mu7bU032450; Fri, 5 Jan 2018 22:56:07 GMT (envelope-from jkim@FreeBSD.org) Message-Id: <201801052256.w05Mu7bU032450@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 22:56:07 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r327601 - vendor-sys/acpica/20180105 X-SVN-Group: vendor-sys X-SVN-Commit-Author: jkim X-SVN-Commit-Paths: vendor-sys/acpica/20180105 X-SVN-Commit-Revision: 327601 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 05 Jan 2018 22:56:08 -0000 Author: jkim Date: Fri Jan 5 22:56:07 2018 New Revision: 327601 URL: https://svnweb.freebsd.org/changeset/base/327601 Log: Remove a tag. The import was missing a new file. Deleted: vendor-sys/acpica/20180105/ From owner-svn-src-all@freebsd.org Fri Jan 5 22:59:11 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id D5F6FEA4A9C; Fri, 5 Jan 2018 22:59:11 +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 3921A63A1C; Fri, 5 Jan 2018 22:59:11 +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 w05MxAck032649; Fri, 5 Jan 2018 22:59:10 GMT (envelope-from jkim@FreeBSD.org) Received: (from jkim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w05Mx3nF032582; Fri, 5 Jan 2018 22:59:03 GMT (envelope-from jkim@FreeBSD.org) Message-Id: <201801052259.w05Mx3nF032582@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 22:59:03 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r327602 - in vendor-sys/acpica/dist: . source/common source/compiler source/components/debugger source/components/disassembler source/components/dispatcher source/components/events sour... X-SVN-Group: vendor-sys X-SVN-Commit-Author: jkim X-SVN-Commit-Paths: in vendor-sys/acpica/dist: . source/common source/compiler source/components/debugger source/components/disassembler source/components/dispatcher source/components/events source/components/executer so... X-SVN-Commit-Revision: 327602 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 05 Jan 2018 22:59:11 -0000 Author: jkim Date: Fri Jan 5 22:59:03 2018 New Revision: 327602 URL: https://svnweb.freebsd.org/changeset/base/327602 Log: Revert r327599. I missed a new file. Pointyhat to: jkim Modified: vendor-sys/acpica/dist/changes.txt vendor-sys/acpica/dist/source/common/acfileio.c vendor-sys/acpica/dist/source/common/acgetline.c vendor-sys/acpica/dist/source/common/adfile.c vendor-sys/acpica/dist/source/common/adisasm.c vendor-sys/acpica/dist/source/common/adwalk.c vendor-sys/acpica/dist/source/common/ahids.c vendor-sys/acpica/dist/source/common/ahpredef.c vendor-sys/acpica/dist/source/common/ahtable.c vendor-sys/acpica/dist/source/common/ahuuids.c vendor-sys/acpica/dist/source/common/cmfsize.c vendor-sys/acpica/dist/source/common/dmextern.c vendor-sys/acpica/dist/source/common/dmrestag.c vendor-sys/acpica/dist/source/common/dmswitch.c vendor-sys/acpica/dist/source/common/dmtable.c vendor-sys/acpica/dist/source/common/dmtables.c vendor-sys/acpica/dist/source/common/dmtbdump.c vendor-sys/acpica/dist/source/common/dmtbinfo.c vendor-sys/acpica/dist/source/common/getopt.c vendor-sys/acpica/dist/source/compiler/aslallocate.c vendor-sys/acpica/dist/source/compiler/aslanalyze.c vendor-sys/acpica/dist/source/compiler/aslascii.c vendor-sys/acpica/dist/source/compiler/aslbtypes.c vendor-sys/acpica/dist/source/compiler/aslcache.c vendor-sys/acpica/dist/source/compiler/aslcodegen.c vendor-sys/acpica/dist/source/compiler/aslcompile.c vendor-sys/acpica/dist/source/compiler/aslcompiler.h vendor-sys/acpica/dist/source/compiler/aslcompiler.l vendor-sys/acpica/dist/source/compiler/aslcstyle.y vendor-sys/acpica/dist/source/compiler/asldebug.c vendor-sys/acpica/dist/source/compiler/asldefine.h vendor-sys/acpica/dist/source/compiler/aslerror.c vendor-sys/acpica/dist/source/compiler/aslexternal.c vendor-sys/acpica/dist/source/compiler/aslfileio.c vendor-sys/acpica/dist/source/compiler/aslfiles.c vendor-sys/acpica/dist/source/compiler/aslfold.c vendor-sys/acpica/dist/source/compiler/aslglobal.h vendor-sys/acpica/dist/source/compiler/aslhelp.c vendor-sys/acpica/dist/source/compiler/aslhelpers.y vendor-sys/acpica/dist/source/compiler/aslhex.c vendor-sys/acpica/dist/source/compiler/aslkeywords.y vendor-sys/acpica/dist/source/compiler/asllength.c vendor-sys/acpica/dist/source/compiler/asllisting.c vendor-sys/acpica/dist/source/compiler/asllistsup.c vendor-sys/acpica/dist/source/compiler/aslload.c vendor-sys/acpica/dist/source/compiler/asllookup.c vendor-sys/acpica/dist/source/compiler/aslmain.c vendor-sys/acpica/dist/source/compiler/aslmap.c vendor-sys/acpica/dist/source/compiler/aslmapenter.c vendor-sys/acpica/dist/source/compiler/aslmapoutput.c vendor-sys/acpica/dist/source/compiler/aslmaputils.c vendor-sys/acpica/dist/source/compiler/aslmessages.c vendor-sys/acpica/dist/source/compiler/aslmessages.h vendor-sys/acpica/dist/source/compiler/aslmethod.c vendor-sys/acpica/dist/source/compiler/aslnamesp.c vendor-sys/acpica/dist/source/compiler/asloffset.c vendor-sys/acpica/dist/source/compiler/aslopcodes.c vendor-sys/acpica/dist/source/compiler/asloperands.c vendor-sys/acpica/dist/source/compiler/aslopt.c vendor-sys/acpica/dist/source/compiler/asloptions.c vendor-sys/acpica/dist/source/compiler/aslparseop.c vendor-sys/acpica/dist/source/compiler/aslparser.y vendor-sys/acpica/dist/source/compiler/aslpld.c vendor-sys/acpica/dist/source/compiler/aslpredef.c vendor-sys/acpica/dist/source/compiler/aslprepkg.c vendor-sys/acpica/dist/source/compiler/aslprimaries.y vendor-sys/acpica/dist/source/compiler/aslprintf.c vendor-sys/acpica/dist/source/compiler/aslprune.c vendor-sys/acpica/dist/source/compiler/aslresource.c vendor-sys/acpica/dist/source/compiler/aslresources.y vendor-sys/acpica/dist/source/compiler/aslrestype1.c vendor-sys/acpica/dist/source/compiler/aslrestype1i.c vendor-sys/acpica/dist/source/compiler/aslrestype2.c vendor-sys/acpica/dist/source/compiler/aslrestype2d.c vendor-sys/acpica/dist/source/compiler/aslrestype2e.c vendor-sys/acpica/dist/source/compiler/aslrestype2q.c vendor-sys/acpica/dist/source/compiler/aslrestype2s.c vendor-sys/acpica/dist/source/compiler/aslrestype2w.c vendor-sys/acpica/dist/source/compiler/aslrules.y vendor-sys/acpica/dist/source/compiler/aslstartup.c vendor-sys/acpica/dist/source/compiler/aslstubs.c vendor-sys/acpica/dist/source/compiler/aslsupport.l vendor-sys/acpica/dist/source/compiler/aslsupport.y vendor-sys/acpica/dist/source/compiler/asltokens.y vendor-sys/acpica/dist/source/compiler/asltransform.c vendor-sys/acpica/dist/source/compiler/asltree.c vendor-sys/acpica/dist/source/compiler/asltypes.h vendor-sys/acpica/dist/source/compiler/asltypes.y vendor-sys/acpica/dist/source/compiler/aslutils.c vendor-sys/acpica/dist/source/compiler/asluuid.c vendor-sys/acpica/dist/source/compiler/aslwalks.c vendor-sys/acpica/dist/source/compiler/aslxref.c vendor-sys/acpica/dist/source/compiler/aslxrefout.c vendor-sys/acpica/dist/source/compiler/cvcompiler.c vendor-sys/acpica/dist/source/compiler/cvdisasm.c vendor-sys/acpica/dist/source/compiler/cvparser.c vendor-sys/acpica/dist/source/compiler/dtcompile.c vendor-sys/acpica/dist/source/compiler/dtcompiler.h vendor-sys/acpica/dist/source/compiler/dtexpress.c vendor-sys/acpica/dist/source/compiler/dtfield.c vendor-sys/acpica/dist/source/compiler/dtio.c vendor-sys/acpica/dist/source/compiler/dtparser.l vendor-sys/acpica/dist/source/compiler/dtparser.y vendor-sys/acpica/dist/source/compiler/dtsubtable.c vendor-sys/acpica/dist/source/compiler/dttable.c vendor-sys/acpica/dist/source/compiler/dttable1.c vendor-sys/acpica/dist/source/compiler/dttable2.c vendor-sys/acpica/dist/source/compiler/dttemplate.c vendor-sys/acpica/dist/source/compiler/dttemplate.h vendor-sys/acpica/dist/source/compiler/dtutils.c vendor-sys/acpica/dist/source/compiler/preprocess.h vendor-sys/acpica/dist/source/compiler/prexpress.c vendor-sys/acpica/dist/source/compiler/prmacros.c vendor-sys/acpica/dist/source/compiler/prparser.l vendor-sys/acpica/dist/source/compiler/prparser.y vendor-sys/acpica/dist/source/compiler/prscan.c vendor-sys/acpica/dist/source/compiler/prutils.c vendor-sys/acpica/dist/source/components/debugger/dbcmds.c vendor-sys/acpica/dist/source/components/debugger/dbconvert.c vendor-sys/acpica/dist/source/components/debugger/dbdisply.c vendor-sys/acpica/dist/source/components/debugger/dbexec.c vendor-sys/acpica/dist/source/components/debugger/dbfileio.c vendor-sys/acpica/dist/source/components/debugger/dbhistry.c vendor-sys/acpica/dist/source/components/debugger/dbinput.c vendor-sys/acpica/dist/source/components/debugger/dbmethod.c vendor-sys/acpica/dist/source/components/debugger/dbnames.c vendor-sys/acpica/dist/source/components/debugger/dbobject.c vendor-sys/acpica/dist/source/components/debugger/dbstats.c vendor-sys/acpica/dist/source/components/debugger/dbtest.c vendor-sys/acpica/dist/source/components/debugger/dbutils.c vendor-sys/acpica/dist/source/components/debugger/dbxface.c vendor-sys/acpica/dist/source/components/disassembler/dmbuffer.c vendor-sys/acpica/dist/source/components/disassembler/dmcstyle.c vendor-sys/acpica/dist/source/components/disassembler/dmdeferred.c vendor-sys/acpica/dist/source/components/disassembler/dmnames.c vendor-sys/acpica/dist/source/components/disassembler/dmopcode.c vendor-sys/acpica/dist/source/components/disassembler/dmresrc.c vendor-sys/acpica/dist/source/components/disassembler/dmresrcl.c vendor-sys/acpica/dist/source/components/disassembler/dmresrcl2.c vendor-sys/acpica/dist/source/components/disassembler/dmresrcs.c vendor-sys/acpica/dist/source/components/disassembler/dmutils.c vendor-sys/acpica/dist/source/components/disassembler/dmwalk.c vendor-sys/acpica/dist/source/components/dispatcher/dsargs.c vendor-sys/acpica/dist/source/components/dispatcher/dscontrol.c vendor-sys/acpica/dist/source/components/dispatcher/dsdebug.c vendor-sys/acpica/dist/source/components/dispatcher/dsfield.c vendor-sys/acpica/dist/source/components/dispatcher/dsinit.c vendor-sys/acpica/dist/source/components/dispatcher/dsmethod.c vendor-sys/acpica/dist/source/components/dispatcher/dsmthdat.c vendor-sys/acpica/dist/source/components/dispatcher/dsobject.c vendor-sys/acpica/dist/source/components/dispatcher/dsopcode.c vendor-sys/acpica/dist/source/components/dispatcher/dspkginit.c vendor-sys/acpica/dist/source/components/dispatcher/dsutils.c vendor-sys/acpica/dist/source/components/dispatcher/dswexec.c vendor-sys/acpica/dist/source/components/dispatcher/dswload.c vendor-sys/acpica/dist/source/components/dispatcher/dswload2.c vendor-sys/acpica/dist/source/components/dispatcher/dswscope.c vendor-sys/acpica/dist/source/components/dispatcher/dswstate.c vendor-sys/acpica/dist/source/components/events/evevent.c vendor-sys/acpica/dist/source/components/events/evglock.c vendor-sys/acpica/dist/source/components/events/evgpe.c vendor-sys/acpica/dist/source/components/events/evgpeblk.c vendor-sys/acpica/dist/source/components/events/evgpeinit.c vendor-sys/acpica/dist/source/components/events/evgpeutil.c vendor-sys/acpica/dist/source/components/events/evhandler.c vendor-sys/acpica/dist/source/components/events/evmisc.c vendor-sys/acpica/dist/source/components/events/evregion.c vendor-sys/acpica/dist/source/components/events/evrgnini.c vendor-sys/acpica/dist/source/components/events/evsci.c vendor-sys/acpica/dist/source/components/events/evxface.c vendor-sys/acpica/dist/source/components/events/evxfevnt.c vendor-sys/acpica/dist/source/components/events/evxfgpe.c vendor-sys/acpica/dist/source/components/events/evxfregn.c vendor-sys/acpica/dist/source/components/executer/exconcat.c vendor-sys/acpica/dist/source/components/executer/exconfig.c vendor-sys/acpica/dist/source/components/executer/exconvrt.c vendor-sys/acpica/dist/source/components/executer/excreate.c vendor-sys/acpica/dist/source/components/executer/exdebug.c vendor-sys/acpica/dist/source/components/executer/exdump.c vendor-sys/acpica/dist/source/components/executer/exfield.c vendor-sys/acpica/dist/source/components/executer/exfldio.c vendor-sys/acpica/dist/source/components/executer/exmisc.c vendor-sys/acpica/dist/source/components/executer/exmutex.c vendor-sys/acpica/dist/source/components/executer/exnames.c vendor-sys/acpica/dist/source/components/executer/exoparg1.c vendor-sys/acpica/dist/source/components/executer/exoparg2.c vendor-sys/acpica/dist/source/components/executer/exoparg3.c vendor-sys/acpica/dist/source/components/executer/exoparg6.c vendor-sys/acpica/dist/source/components/executer/exprep.c vendor-sys/acpica/dist/source/components/executer/exregion.c vendor-sys/acpica/dist/source/components/executer/exresnte.c vendor-sys/acpica/dist/source/components/executer/exresolv.c vendor-sys/acpica/dist/source/components/executer/exresop.c vendor-sys/acpica/dist/source/components/executer/exstore.c vendor-sys/acpica/dist/source/components/executer/exstoren.c vendor-sys/acpica/dist/source/components/executer/exstorob.c vendor-sys/acpica/dist/source/components/executer/exsystem.c vendor-sys/acpica/dist/source/components/executer/extrace.c vendor-sys/acpica/dist/source/components/executer/exutils.c vendor-sys/acpica/dist/source/components/hardware/hwacpi.c vendor-sys/acpica/dist/source/components/hardware/hwesleep.c vendor-sys/acpica/dist/source/components/hardware/hwgpe.c vendor-sys/acpica/dist/source/components/hardware/hwpci.c vendor-sys/acpica/dist/source/components/hardware/hwregs.c vendor-sys/acpica/dist/source/components/hardware/hwsleep.c vendor-sys/acpica/dist/source/components/hardware/hwtimer.c vendor-sys/acpica/dist/source/components/hardware/hwvalid.c vendor-sys/acpica/dist/source/components/hardware/hwxface.c vendor-sys/acpica/dist/source/components/hardware/hwxfsleep.c vendor-sys/acpica/dist/source/components/namespace/nsaccess.c vendor-sys/acpica/dist/source/components/namespace/nsalloc.c vendor-sys/acpica/dist/source/components/namespace/nsarguments.c vendor-sys/acpica/dist/source/components/namespace/nsconvert.c vendor-sys/acpica/dist/source/components/namespace/nsdump.c vendor-sys/acpica/dist/source/components/namespace/nsdumpdv.c vendor-sys/acpica/dist/source/components/namespace/nseval.c vendor-sys/acpica/dist/source/components/namespace/nsinit.c vendor-sys/acpica/dist/source/components/namespace/nsload.c vendor-sys/acpica/dist/source/components/namespace/nsnames.c vendor-sys/acpica/dist/source/components/namespace/nsobject.c vendor-sys/acpica/dist/source/components/namespace/nsparse.c vendor-sys/acpica/dist/source/components/namespace/nspredef.c vendor-sys/acpica/dist/source/components/namespace/nsprepkg.c vendor-sys/acpica/dist/source/components/namespace/nsrepair.c vendor-sys/acpica/dist/source/components/namespace/nsrepair2.c vendor-sys/acpica/dist/source/components/namespace/nssearch.c vendor-sys/acpica/dist/source/components/namespace/nsutils.c vendor-sys/acpica/dist/source/components/namespace/nswalk.c vendor-sys/acpica/dist/source/components/namespace/nsxfeval.c vendor-sys/acpica/dist/source/components/namespace/nsxfname.c vendor-sys/acpica/dist/source/components/namespace/nsxfobj.c vendor-sys/acpica/dist/source/components/parser/psargs.c vendor-sys/acpica/dist/source/components/parser/psloop.c vendor-sys/acpica/dist/source/components/parser/psobject.c vendor-sys/acpica/dist/source/components/parser/psopcode.c vendor-sys/acpica/dist/source/components/parser/psopinfo.c vendor-sys/acpica/dist/source/components/parser/psparse.c vendor-sys/acpica/dist/source/components/parser/psscope.c vendor-sys/acpica/dist/source/components/parser/pstree.c vendor-sys/acpica/dist/source/components/parser/psutils.c vendor-sys/acpica/dist/source/components/parser/pswalk.c vendor-sys/acpica/dist/source/components/parser/psxface.c vendor-sys/acpica/dist/source/components/resources/rsaddr.c vendor-sys/acpica/dist/source/components/resources/rscalc.c vendor-sys/acpica/dist/source/components/resources/rscreate.c vendor-sys/acpica/dist/source/components/resources/rsdump.c vendor-sys/acpica/dist/source/components/resources/rsdumpinfo.c vendor-sys/acpica/dist/source/components/resources/rsinfo.c vendor-sys/acpica/dist/source/components/resources/rsio.c vendor-sys/acpica/dist/source/components/resources/rsirq.c vendor-sys/acpica/dist/source/components/resources/rslist.c vendor-sys/acpica/dist/source/components/resources/rsmemory.c vendor-sys/acpica/dist/source/components/resources/rsmisc.c vendor-sys/acpica/dist/source/components/resources/rsserial.c vendor-sys/acpica/dist/source/components/resources/rsutils.c vendor-sys/acpica/dist/source/components/resources/rsxface.c vendor-sys/acpica/dist/source/components/tables/tbdata.c vendor-sys/acpica/dist/source/components/tables/tbfadt.c vendor-sys/acpica/dist/source/components/tables/tbfind.c vendor-sys/acpica/dist/source/components/tables/tbinstal.c vendor-sys/acpica/dist/source/components/tables/tbprint.c vendor-sys/acpica/dist/source/components/tables/tbutils.c vendor-sys/acpica/dist/source/components/tables/tbxface.c vendor-sys/acpica/dist/source/components/tables/tbxfload.c vendor-sys/acpica/dist/source/components/tables/tbxfroot.c vendor-sys/acpica/dist/source/components/utilities/utaddress.c vendor-sys/acpica/dist/source/components/utilities/utalloc.c vendor-sys/acpica/dist/source/components/utilities/utascii.c vendor-sys/acpica/dist/source/components/utilities/utbuffer.c vendor-sys/acpica/dist/source/components/utilities/utcache.c vendor-sys/acpica/dist/source/components/utilities/utclib.c vendor-sys/acpica/dist/source/components/utilities/utcopy.c vendor-sys/acpica/dist/source/components/utilities/utdebug.c vendor-sys/acpica/dist/source/components/utilities/utdecode.c vendor-sys/acpica/dist/source/components/utilities/utdelete.c vendor-sys/acpica/dist/source/components/utilities/uterror.c vendor-sys/acpica/dist/source/components/utilities/uteval.c vendor-sys/acpica/dist/source/components/utilities/utexcep.c vendor-sys/acpica/dist/source/components/utilities/utglobal.c vendor-sys/acpica/dist/source/components/utilities/uthex.c vendor-sys/acpica/dist/source/components/utilities/utids.c vendor-sys/acpica/dist/source/components/utilities/utinit.c vendor-sys/acpica/dist/source/components/utilities/utlock.c vendor-sys/acpica/dist/source/components/utilities/utmath.c vendor-sys/acpica/dist/source/components/utilities/utmisc.c vendor-sys/acpica/dist/source/components/utilities/utmutex.c vendor-sys/acpica/dist/source/components/utilities/utnonansi.c vendor-sys/acpica/dist/source/components/utilities/utobject.c vendor-sys/acpica/dist/source/components/utilities/utosi.c vendor-sys/acpica/dist/source/components/utilities/utownerid.c vendor-sys/acpica/dist/source/components/utilities/utpredef.c vendor-sys/acpica/dist/source/components/utilities/utprint.c vendor-sys/acpica/dist/source/components/utilities/utresdecode.c vendor-sys/acpica/dist/source/components/utilities/utresrc.c vendor-sys/acpica/dist/source/components/utilities/utstate.c vendor-sys/acpica/dist/source/components/utilities/utstring.c vendor-sys/acpica/dist/source/components/utilities/utstrsuppt.c vendor-sys/acpica/dist/source/components/utilities/utstrtoul64.c vendor-sys/acpica/dist/source/components/utilities/uttrack.c vendor-sys/acpica/dist/source/components/utilities/utuuid.c vendor-sys/acpica/dist/source/components/utilities/utxface.c vendor-sys/acpica/dist/source/components/utilities/utxferror.c vendor-sys/acpica/dist/source/components/utilities/utxfinit.c vendor-sys/acpica/dist/source/components/utilities/utxfmutex.c vendor-sys/acpica/dist/source/include/acapps.h vendor-sys/acpica/dist/source/include/acbuffer.h vendor-sys/acpica/dist/source/include/acclib.h vendor-sys/acpica/dist/source/include/accommon.h vendor-sys/acpica/dist/source/include/acconfig.h vendor-sys/acpica/dist/source/include/acconvert.h vendor-sys/acpica/dist/source/include/acdebug.h vendor-sys/acpica/dist/source/include/acdisasm.h vendor-sys/acpica/dist/source/include/acdispat.h vendor-sys/acpica/dist/source/include/acevents.h vendor-sys/acpica/dist/source/include/acexcep.h vendor-sys/acpica/dist/source/include/acglobal.h vendor-sys/acpica/dist/source/include/achware.h vendor-sys/acpica/dist/source/include/acinterp.h vendor-sys/acpica/dist/source/include/aclocal.h vendor-sys/acpica/dist/source/include/acmacros.h vendor-sys/acpica/dist/source/include/acnames.h vendor-sys/acpica/dist/source/include/acnamesp.h vendor-sys/acpica/dist/source/include/acobject.h vendor-sys/acpica/dist/source/include/acopcode.h vendor-sys/acpica/dist/source/include/acoutput.h vendor-sys/acpica/dist/source/include/acparser.h vendor-sys/acpica/dist/source/include/acpi.h vendor-sys/acpica/dist/source/include/acpiosxf.h vendor-sys/acpica/dist/source/include/acpixf.h vendor-sys/acpica/dist/source/include/acpredef.h vendor-sys/acpica/dist/source/include/acresrc.h vendor-sys/acpica/dist/source/include/acrestyp.h vendor-sys/acpica/dist/source/include/acstruct.h vendor-sys/acpica/dist/source/include/actables.h vendor-sys/acpica/dist/source/include/actbl.h vendor-sys/acpica/dist/source/include/actbl1.h vendor-sys/acpica/dist/source/include/actbl2.h vendor-sys/acpica/dist/source/include/actbl3.h vendor-sys/acpica/dist/source/include/actypes.h vendor-sys/acpica/dist/source/include/acutils.h vendor-sys/acpica/dist/source/include/acuuid.h vendor-sys/acpica/dist/source/include/amlcode.h vendor-sys/acpica/dist/source/include/amlresrc.h vendor-sys/acpica/dist/source/include/platform/accygwin.h vendor-sys/acpica/dist/source/include/platform/acdragonflyex.h vendor-sys/acpica/dist/source/include/platform/acefi.h vendor-sys/acpica/dist/source/include/platform/acefiex.h vendor-sys/acpica/dist/source/include/platform/acenv.h vendor-sys/acpica/dist/source/include/platform/acenvex.h vendor-sys/acpica/dist/source/include/platform/acfreebsd.h vendor-sys/acpica/dist/source/include/platform/acgcc.h vendor-sys/acpica/dist/source/include/platform/acgccex.h vendor-sys/acpica/dist/source/include/platform/achaiku.h vendor-sys/acpica/dist/source/include/platform/acintel.h vendor-sys/acpica/dist/source/include/platform/aclinux.h vendor-sys/acpica/dist/source/include/platform/aclinuxex.h vendor-sys/acpica/dist/source/include/platform/acmacosx.h vendor-sys/acpica/dist/source/include/platform/acmsvc.h vendor-sys/acpica/dist/source/include/platform/acmsvcex.h vendor-sys/acpica/dist/source/include/platform/acnetbsd.h vendor-sys/acpica/dist/source/include/platform/acos2.h vendor-sys/acpica/dist/source/include/platform/acqnx.h vendor-sys/acpica/dist/source/include/platform/acwin.h vendor-sys/acpica/dist/source/include/platform/acwin64.h vendor-sys/acpica/dist/source/os_specific/service_layers/osbsdtbl.c vendor-sys/acpica/dist/source/os_specific/service_layers/oslinuxtbl.c vendor-sys/acpica/dist/source/os_specific/service_layers/osunixdir.c vendor-sys/acpica/dist/source/os_specific/service_layers/osunixmap.c vendor-sys/acpica/dist/source/os_specific/service_layers/osunixxf.c vendor-sys/acpica/dist/source/os_specific/service_layers/oswindir.c vendor-sys/acpica/dist/source/os_specific/service_layers/oswintbl.c vendor-sys/acpica/dist/source/os_specific/service_layers/oswinxf.c vendor-sys/acpica/dist/source/tools/acpibin/abcompare.c vendor-sys/acpica/dist/source/tools/acpibin/abmain.c vendor-sys/acpica/dist/source/tools/acpibin/acpibin.h vendor-sys/acpica/dist/source/tools/acpidump/acpidump.h vendor-sys/acpica/dist/source/tools/acpidump/apdump.c vendor-sys/acpica/dist/source/tools/acpidump/apfiles.c vendor-sys/acpica/dist/source/tools/acpidump/apmain.c vendor-sys/acpica/dist/source/tools/acpiexec/aecommon.h vendor-sys/acpica/dist/source/tools/acpiexec/aeexception.c vendor-sys/acpica/dist/source/tools/acpiexec/aeexec.c vendor-sys/acpica/dist/source/tools/acpiexec/aehandlers.c vendor-sys/acpica/dist/source/tools/acpiexec/aeinitfile.c vendor-sys/acpica/dist/source/tools/acpiexec/aeinstall.c vendor-sys/acpica/dist/source/tools/acpiexec/aemain.c vendor-sys/acpica/dist/source/tools/acpiexec/aeregion.c vendor-sys/acpica/dist/source/tools/acpiexec/aetables.c vendor-sys/acpica/dist/source/tools/acpiexec/aetables.h vendor-sys/acpica/dist/source/tools/acpiexec/aetests.c vendor-sys/acpica/dist/source/tools/acpihelp/acpihelp.h vendor-sys/acpica/dist/source/tools/acpihelp/ahaml.c vendor-sys/acpica/dist/source/tools/acpihelp/ahamlops.c vendor-sys/acpica/dist/source/tools/acpihelp/ahasl.c vendor-sys/acpica/dist/source/tools/acpihelp/ahaslkey.c vendor-sys/acpica/dist/source/tools/acpihelp/ahaslops.c vendor-sys/acpica/dist/source/tools/acpihelp/ahdecode.c vendor-sys/acpica/dist/source/tools/acpihelp/ahgrammar.c vendor-sys/acpica/dist/source/tools/acpihelp/ahmain.c vendor-sys/acpica/dist/source/tools/acpinames/acpinames.h vendor-sys/acpica/dist/source/tools/acpinames/anmain.c vendor-sys/acpica/dist/source/tools/acpinames/anstubs.c vendor-sys/acpica/dist/source/tools/acpinames/antables.c vendor-sys/acpica/dist/source/tools/acpisrc/acpisrc.h vendor-sys/acpica/dist/source/tools/acpisrc/ascase.c vendor-sys/acpica/dist/source/tools/acpisrc/asconvrt.c vendor-sys/acpica/dist/source/tools/acpisrc/asfile.c vendor-sys/acpica/dist/source/tools/acpisrc/asmain.c vendor-sys/acpica/dist/source/tools/acpisrc/asremove.c vendor-sys/acpica/dist/source/tools/acpisrc/astable.c vendor-sys/acpica/dist/source/tools/acpisrc/asutils.c vendor-sys/acpica/dist/source/tools/acpixtract/acpixtract.c vendor-sys/acpica/dist/source/tools/acpixtract/acpixtract.h vendor-sys/acpica/dist/source/tools/acpixtract/axmain.c vendor-sys/acpica/dist/source/tools/acpixtract/axutils.c vendor-sys/acpica/dist/source/tools/efihello/efihello.c vendor-sys/acpica/dist/source/tools/examples/examples.c vendor-sys/acpica/dist/source/tools/examples/examples.h vendor-sys/acpica/dist/source/tools/examples/exstubs.c vendor-sys/acpica/dist/source/tools/examples/extables.c vendor-sys/acpica/dist/tests/misc/badcode.asl vendor-sys/acpica/dist/tests/misc/converterSample.asl vendor-sys/acpica/dist/tests/misc/grammar.asl Modified: vendor-sys/acpica/dist/changes.txt ============================================================================== --- vendor-sys/acpica/dist/changes.txt Fri Jan 5 22:56:07 2018 (r327601) +++ vendor-sys/acpica/dist/changes.txt Fri Jan 5 22:59:03 2018 (r327602) @@ -1,37 +1,4 @@ ---------------------------------------- -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: vendor-sys/acpica/dist/source/common/acfileio.c ============================================================================== --- vendor-sys/acpica/dist/source/common/acfileio.c Fri Jan 5 22:56:07 2018 (r327601) +++ vendor-sys/acpica/dist/source/common/acfileio.c Fri Jan 5 22:59:03 2018 (r327602) @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2018, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2017, Intel Corp. * All rights reserved. * * 2. License Modified: vendor-sys/acpica/dist/source/common/acgetline.c ============================================================================== --- vendor-sys/acpica/dist/source/common/acgetline.c Fri Jan 5 22:56:07 2018 (r327601) +++ vendor-sys/acpica/dist/source/common/acgetline.c Fri Jan 5 22:59:03 2018 (r327602) @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2018, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2017, Intel Corp. * All rights reserved. * * 2. License Modified: vendor-sys/acpica/dist/source/common/adfile.c ============================================================================== --- vendor-sys/acpica/dist/source/common/adfile.c Fri Jan 5 22:56:07 2018 (r327601) +++ vendor-sys/acpica/dist/source/common/adfile.c Fri Jan 5 22:59:03 2018 (r327602) @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2018, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2017, Intel Corp. * All rights reserved. * * 2. License Modified: vendor-sys/acpica/dist/source/common/adisasm.c ============================================================================== --- vendor-sys/acpica/dist/source/common/adisasm.c Fri Jan 5 22:56:07 2018 (r327601) +++ vendor-sys/acpica/dist/source/common/adisasm.c Fri Jan 5 22:59:03 2018 (r327602) @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2018, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2017, Intel Corp. * All rights reserved. * * 2. License Modified: vendor-sys/acpica/dist/source/common/adwalk.c ============================================================================== --- vendor-sys/acpica/dist/source/common/adwalk.c Fri Jan 5 22:56:07 2018 (r327601) +++ vendor-sys/acpica/dist/source/common/adwalk.c Fri Jan 5 22:59:03 2018 (r327602) @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2018, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2017, Intel Corp. * All rights reserved. * * 2. License Modified: vendor-sys/acpica/dist/source/common/ahids.c ============================================================================== --- vendor-sys/acpica/dist/source/common/ahids.c Fri Jan 5 22:56:07 2018 (r327601) +++ vendor-sys/acpica/dist/source/common/ahids.c Fri Jan 5 22:59:03 2018 (r327602) @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2018, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2017, Intel Corp. * All rights reserved. * * 2. License Modified: vendor-sys/acpica/dist/source/common/ahpredef.c ============================================================================== --- vendor-sys/acpica/dist/source/common/ahpredef.c Fri Jan 5 22:56:07 2018 (r327601) +++ vendor-sys/acpica/dist/source/common/ahpredef.c Fri Jan 5 22:59:03 2018 (r327602) @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2018, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2017, Intel Corp. * All rights reserved. * * 2. License Modified: vendor-sys/acpica/dist/source/common/ahtable.c ============================================================================== --- vendor-sys/acpica/dist/source/common/ahtable.c Fri Jan 5 22:56:07 2018 (r327601) +++ vendor-sys/acpica/dist/source/common/ahtable.c Fri Jan 5 22:59:03 2018 (r327602) @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2018, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2017, Intel Corp. * All rights reserved. * * 2. License Modified: vendor-sys/acpica/dist/source/common/ahuuids.c ============================================================================== --- vendor-sys/acpica/dist/source/common/ahuuids.c Fri Jan 5 22:56:07 2018 (r327601) +++ vendor-sys/acpica/dist/source/common/ahuuids.c Fri Jan 5 22:59:03 2018 (r327602) @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2018, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2017, Intel Corp. * All rights reserved. * * 2. License Modified: vendor-sys/acpica/dist/source/common/cmfsize.c ============================================================================== --- vendor-sys/acpica/dist/source/common/cmfsize.c Fri Jan 5 22:56:07 2018 (r327601) +++ vendor-sys/acpica/dist/source/common/cmfsize.c Fri Jan 5 22:59:03 2018 (r327602) @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2018, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2017, Intel Corp. * All rights reserved. * * 2. License Modified: vendor-sys/acpica/dist/source/common/dmextern.c ============================================================================== --- vendor-sys/acpica/dist/source/common/dmextern.c Fri Jan 5 22:56:07 2018 (r327601) +++ vendor-sys/acpica/dist/source/common/dmextern.c Fri Jan 5 22:59:03 2018 (r327602) @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2018, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2017, Intel Corp. * All rights reserved. * * 2. License Modified: vendor-sys/acpica/dist/source/common/dmrestag.c ============================================================================== --- vendor-sys/acpica/dist/source/common/dmrestag.c Fri Jan 5 22:56:07 2018 (r327601) +++ vendor-sys/acpica/dist/source/common/dmrestag.c Fri Jan 5 22:59:03 2018 (r327602) @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2018, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2017, Intel Corp. * All rights reserved. * * 2. License Modified: vendor-sys/acpica/dist/source/common/dmswitch.c ============================================================================== --- vendor-sys/acpica/dist/source/common/dmswitch.c Fri Jan 5 22:56:07 2018 (r327601) +++ vendor-sys/acpica/dist/source/common/dmswitch.c Fri Jan 5 22:59:03 2018 (r327602) @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2018, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2017, Intel Corp. * All rights reserved. * * 2. License Modified: vendor-sys/acpica/dist/source/common/dmtable.c ============================================================================== --- vendor-sys/acpica/dist/source/common/dmtable.c Fri Jan 5 22:56:07 2018 (r327601) +++ vendor-sys/acpica/dist/source/common/dmtable.c Fri Jan 5 22:59:03 2018 (r327602) @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2018, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2017, Intel Corp. * All rights reserved. * * 2. License Modified: vendor-sys/acpica/dist/source/common/dmtables.c ============================================================================== --- vendor-sys/acpica/dist/source/common/dmtables.c Fri Jan 5 22:56:07 2018 (r327601) +++ vendor-sys/acpica/dist/source/common/dmtables.c Fri Jan 5 22:59:03 2018 (r327602) @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2018, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2017, Intel Corp. * All rights reserved. * * 2. License Modified: vendor-sys/acpica/dist/source/common/dmtbdump.c ============================================================================== --- vendor-sys/acpica/dist/source/common/dmtbdump.c Fri Jan 5 22:56:07 2018 (r327601) +++ vendor-sys/acpica/dist/source/common/dmtbdump.c Fri Jan 5 22:59:03 2018 (r327602) @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2018, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2017, Intel Corp. * All rights reserved. * * 2. License Modified: vendor-sys/acpica/dist/source/common/dmtbinfo.c ============================================================================== --- vendor-sys/acpica/dist/source/common/dmtbinfo.c Fri Jan 5 22:56:07 2018 (r327601) +++ vendor-sys/acpica/dist/source/common/dmtbinfo.c Fri Jan 5 22:59:03 2018 (r327602) @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2018, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2017, Intel Corp. * All rights reserved. * * 2. License @@ -152,7 +152,6 @@ #include "acpi.h" #include "accommon.h" #include "acdisasm.h" -#include "actbinfo.h" /* This module used for application-level code only */ @@ -183,6 +182,268 @@ * - 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: vendor-sys/acpica/dist/source/common/getopt.c ============================================================================== --- vendor-sys/acpica/dist/source/common/getopt.c Fri Jan 5 22:56:07 2018 (r327601) +++ vendor-sys/acpica/dist/source/common/getopt.c Fri Jan 5 22:59:03 2018 (r327602) @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2018, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2017, Intel Corp. * All rights reserved. * * 2. License Modified: vendor-sys/acpica/dist/source/compiler/aslallocate.c ============================================================================== --- vendor-sys/acpica/dist/source/compiler/aslallocate.c Fri Jan 5 22:56:07 2018 (r327601) +++ vendor-sys/acpica/dist/source/compiler/aslallocate.c Fri Jan 5 22:59:03 2018 (r327602) @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2018, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2017, Intel Corp. * All rights reserved. * * 2. License Modified: vendor-sys/acpica/dist/source/compiler/aslanalyze.c ============================================================================== --- vendor-sys/acpica/dist/source/compiler/aslanalyze.c Fri Jan 5 22:56:07 2018 (r327601) +++ vendor-sys/acpica/dist/source/compiler/aslanalyze.c Fri Jan 5 22:59:03 2018 (r327602) @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2018, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2017, Intel Corp. * All rights reserved. * * 2. License Modified: vendor-sys/acpica/dist/source/compiler/aslascii.c ============================================================================== --- vendor-sys/acpica/dist/source/compiler/aslascii.c Fri Jan 5 22:56:07 2018 (r327601) +++ vendor-sys/acpica/dist/source/compiler/aslascii.c Fri Jan 5 22:59:03 2018 (r327602) @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2018, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2017, Intel Corp. * All rights reserved. * * 2. License Modified: vendor-sys/acpica/dist/source/compiler/aslbtypes.c ============================================================================== --- vendor-sys/acpica/dist/source/compiler/aslbtypes.c Fri Jan 5 22:56:07 2018 (r327601) +++ vendor-sys/acpica/dist/source/compiler/aslbtypes.c Fri Jan 5 22:59:03 2018 (r327602) @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2018, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2017, Intel Corp. * All rights reserved. * * 2. License Modified: vendor-sys/acpica/dist/source/compiler/aslcache.c ============================================================================== --- vendor-sys/acpica/dist/source/compiler/aslcache.c Fri Jan 5 22:56:07 2018 (r327601) +++ vendor-sys/acpica/dist/source/compiler/aslcache.c Fri Jan 5 22:59:03 2018 (r327602) @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2018, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2017, Intel Corp. * All rights reserved. * * 2. License Modified: vendor-sys/acpica/dist/source/compiler/aslcodegen.c ============================================================================== --- vendor-sys/acpica/dist/source/compiler/aslcodegen.c Fri Jan 5 22:56:07 2018 (r327601) +++ vendor-sys/acpica/dist/source/compiler/aslcodegen.c Fri Jan 5 22:59:03 2018 (r327602) @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2018, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2017, Intel Corp. * All rights reserved. * * 2. License Modified: vendor-sys/acpica/dist/source/compiler/aslcompile.c ============================================================================== --- vendor-sys/acpica/dist/source/compiler/aslcompile.c Fri Jan 5 22:56:07 2018 (r327601) +++ vendor-sys/acpica/dist/source/compiler/aslcompile.c Fri Jan 5 22:59:03 2018 (r327602) @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2018, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2017, Intel Corp. * All rights reserved. * * 2. License Modified: vendor-sys/acpica/dist/source/compiler/aslcompiler.h ============================================================================== --- vendor-sys/acpica/dist/source/compiler/aslcompiler.h Fri Jan 5 22:56:07 2018 (r327601) +++ vendor-sys/acpica/dist/source/compiler/aslcompiler.h Fri Jan 5 22:59:03 2018 (r327602) @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2018, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2017, Intel Corp. * All rights reserved. * * 2. License Modified: vendor-sys/acpica/dist/source/compiler/aslcompiler.l ============================================================================== --- vendor-sys/acpica/dist/source/compiler/aslcompiler.l Fri Jan 5 22:56:07 2018 (r327601) +++ vendor-sys/acpica/dist/source/compiler/aslcompiler.l Fri Jan 5 22:59:03 2018 (r327602) @@ -9,7 +9,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2018, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2017, Intel Corp. * All rights reserved. * * 2. License Modified: vendor-sys/acpica/dist/source/compiler/aslcstyle.y ============================================================================== --- vendor-sys/acpica/dist/source/compiler/aslcstyle.y Fri Jan 5 22:56:07 2018 (r327601) +++ vendor-sys/acpica/dist/source/compiler/aslcstyle.y Fri Jan 5 22:59:03 2018 (r327602) @@ -9,7 +9,7 @@ NoEcho(' * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2018, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2017, Intel Corp. * All rights reserved. * * 2. License Modified: vendor-sys/acpica/dist/source/compiler/asldebug.c ============================================================================== --- vendor-sys/acpica/dist/source/compiler/asldebug.c Fri Jan 5 22:56:07 2018 (r327601) +++ vendor-sys/acpica/dist/source/compiler/asldebug.c Fri Jan 5 22:59:03 2018 (r327602) @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2018, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2017, Intel Corp. * All rights reserved. * * 2. License Modified: vendor-sys/acpica/dist/source/compiler/asldefine.h ============================================================================== --- vendor-sys/acpica/dist/source/compiler/asldefine.h Fri Jan 5 22:56:07 2018 (r327601) +++ vendor-sys/acpica/dist/source/compiler/asldefine.h Fri Jan 5 22:59:03 2018 (r327602) @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2018, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2017, Intel Corp. * All rights reserved. * * 2. License Modified: vendor-sys/acpica/dist/source/compiler/aslerror.c ============================================================================== --- vendor-sys/acpica/dist/source/compiler/aslerror.c Fri Jan 5 22:56:07 2018 (r327601) +++ vendor-sys/acpica/dist/source/compiler/aslerror.c Fri Jan 5 22:59:03 2018 (r327602) @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2018, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2017, Intel Corp. * All rights reserved. * * 2. License Modified: vendor-sys/acpica/dist/source/compiler/aslexternal.c ============================================================================== --- vendor-sys/acpica/dist/source/compiler/aslexternal.c Fri Jan 5 22:56:07 2018 (r327601) +++ vendor-sys/acpica/dist/source/compiler/aslexternal.c Fri Jan 5 22:59:03 2018 (r327602) @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2018, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2017, Intel Corp. * All rights reserved. * * 2. License Modified: vendor-sys/acpica/dist/source/compiler/aslfileio.c ============================================================================== --- vendor-sys/acpica/dist/source/compiler/aslfileio.c Fri Jan 5 22:56:07 2018 (r327601) +++ vendor-sys/acpica/dist/source/compiler/aslfileio.c Fri Jan 5 22:59:03 2018 (r327602) @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2018, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2017, Intel Corp. * All rights reserved. * * 2. License Modified: vendor-sys/acpica/dist/source/compiler/aslfiles.c ============================================================================== --- vendor-sys/acpica/dist/source/compiler/aslfiles.c Fri Jan 5 22:56:07 2018 (r327601) +++ vendor-sys/acpica/dist/source/compiler/aslfiles.c Fri Jan 5 22:59:03 2018 (r327602) @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2018, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2017, Intel Corp. * All rights reserved. * * 2. License Modified: vendor-sys/acpica/dist/source/compiler/aslfold.c ============================================================================== --- vendor-sys/acpica/dist/source/compiler/aslfold.c Fri Jan 5 22:56:07 2018 (r327601) +++ vendor-sys/acpica/dist/source/compiler/aslfold.c Fri Jan 5 22:59:03 2018 (r327602) @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2018, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2017, Intel Corp. * All rights reserved. * * 2. License Modified: vendor-sys/acpica/dist/source/compiler/aslglobal.h ============================================================================== --- vendor-sys/acpica/dist/source/compiler/aslglobal.h Fri Jan 5 22:56:07 2018 (r327601) +++ vendor-sys/acpica/dist/source/compiler/aslglobal.h Fri Jan 5 22:59:03 2018 (r327602) @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2018, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2017, Intel Corp. * All rights reserved. * * 2. License Modified: vendor-sys/acpica/dist/source/compiler/aslhelp.c ============================================================================== --- vendor-sys/acpica/dist/source/compiler/aslhelp.c Fri Jan 5 22:56:07 2018 (r327601) +++ vendor-sys/acpica/dist/source/compiler/aslhelp.c Fri Jan 5 22:59:03 2018 (r327602) @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2018, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2017, Intel Corp. * All rights reserved. * * 2. License Modified: vendor-sys/acpica/dist/source/compiler/aslhelpers.y ============================================================================== --- vendor-sys/acpica/dist/source/compiler/aslhelpers.y Fri Jan 5 22:56:07 2018 (r327601) +++ vendor-sys/acpica/dist/source/compiler/aslhelpers.y Fri Jan 5 22:59:03 2018 (r327602) @@ -9,7 +9,7 @@ NoEcho(' * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2018, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2017, Intel Corp. * All rights reserved. * * 2. License Modified: vendor-sys/acpica/dist/source/compiler/aslhex.c ============================================================================== --- vendor-sys/acpica/dist/source/compiler/aslhex.c Fri Jan 5 22:56:07 2018 (r327601) +++ vendor-sys/acpica/dist/source/compiler/aslhex.c Fri Jan 5 22:59:03 2018 (r327602) @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2018, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2017, Intel Corp. * All rights reserved. * * 2. License Modified: vendor-sys/acpica/dist/source/compiler/aslkeywords.y ============================================================================== --- vendor-sys/acpica/dist/source/compiler/aslkeywords.y Fri Jan 5 22:56:07 2018 (r327601) +++ vendor-sys/acpica/dist/source/compiler/aslkeywords.y Fri Jan 5 22:59:03 2018 (r327602) @@ -9,7 +9,7 @@ NoEcho(' * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2018, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2017, Intel Corp. * All rights reserved. * * 2. License Modified: vendor-sys/acpica/dist/source/compiler/asllength.c ============================================================================== --- vendor-sys/acpica/dist/source/compiler/asllength.c Fri Jan 5 22:56:07 2018 (r327601) +++ vendor-sys/acpica/dist/source/compiler/asllength.c Fri Jan 5 22:59:03 2018 (r327602) @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2018, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2017, Intel Corp. * All rights reserved. * * 2. License Modified: vendor-sys/acpica/dist/source/compiler/asllisting.c ============================================================================== --- vendor-sys/acpica/dist/source/compiler/asllisting.c Fri Jan 5 22:56:07 2018 (r327601) +++ vendor-sys/acpica/dist/source/compiler/asllisting.c Fri Jan 5 22:59:03 2018 (r327602) @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2018, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2017, Intel Corp. * All rights reserved. * * 2. License Modified: vendor-sys/acpica/dist/source/compiler/asllistsup.c ============================================================================== --- vendor-sys/acpica/dist/source/compiler/asllistsup.c Fri Jan 5 22:56:07 2018 (r327601) +++ vendor-sys/acpica/dist/source/compiler/asllistsup.c Fri Jan 5 22:59:03 2018 (r327602) @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2018, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2017, Intel Corp. * All rights reserved. * * 2. License Modified: vendor-sys/acpica/dist/source/compiler/aslload.c ============================================================================== --- vendor-sys/acpica/dist/source/compiler/aslload.c Fri Jan 5 22:56:07 2018 (r327601) +++ vendor-sys/acpica/dist/source/compiler/aslload.c Fri Jan 5 22:59:03 2018 (r327602) @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2018, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2017, Intel Corp. * All rights reserved. * * 2. License Modified: vendor-sys/acpica/dist/source/compiler/asllookup.c ============================================================================== --- vendor-sys/acpica/dist/source/compiler/asllookup.c Fri Jan 5 22:56:07 2018 (r327601) +++ vendor-sys/acpica/dist/source/compiler/asllookup.c Fri Jan 5 22:59:03 2018 (r327602) @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2018, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2017, Intel Corp. * All rights reserved. * * 2. License Modified: vendor-sys/acpica/dist/source/compiler/aslmain.c ============================================================================== --- vendor-sys/acpica/dist/source/compiler/aslmain.c Fri Jan 5 22:56:07 2018 (r327601) +++ vendor-sys/acpica/dist/source/compiler/aslmain.c Fri Jan 5 22:59:03 2018 (r327602) @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2018, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2017, Intel Corp. * All rights reserved. * * 2. License Modified: vendor-sys/acpica/dist/source/compiler/aslmap.c ============================================================================== --- vendor-sys/acpica/dist/source/compiler/aslmap.c Fri Jan 5 22:56:07 2018 (r327601) +++ vendor-sys/acpica/dist/source/compiler/aslmap.c Fri Jan 5 22:59:03 2018 (r327602) @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2018, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2017, Intel Corp. * All rights reserved. * * 2. License Modified: vendor-sys/acpica/dist/source/compiler/aslmapenter.c ============================================================================== --- vendor-sys/acpica/dist/source/compiler/aslmapenter.c Fri Jan 5 22:56:07 2018 (r327601) +++ vendor-sys/acpica/dist/source/compiler/aslmapenter.c Fri Jan 5 22:59:03 2018 (r327602) @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2018, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2017, Intel Corp. * All rights reserved. * * 2. License Modified: vendor-sys/acpica/dist/source/compiler/aslmapoutput.c ============================================================================== --- vendor-sys/acpica/dist/source/compiler/aslmapoutput.c Fri Jan 5 22:56:07 2018 (r327601) +++ vendor-sys/acpica/dist/source/compiler/aslmapoutput.c Fri Jan 5 22:59:03 2018 (r327602) @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2018, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2017, Intel Corp. * All rights reserved. * * 2. License Modified: vendor-sys/acpica/dist/source/compiler/aslmaputils.c ============================================================================== --- vendor-sys/acpica/dist/source/compiler/aslmaputils.c Fri Jan 5 22:56:07 2018 (r327601) +++ vendor-sys/acpica/dist/source/compiler/aslmaputils.c Fri Jan 5 22:59:03 2018 (r327602) @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2018, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2017, Intel Corp. * All rights reserved. * * 2. License Modified: vendor-sys/acpica/dist/source/compiler/aslmessages.c ============================================================================== --- vendor-sys/acpica/dist/source/compiler/aslmessages.c Fri Jan 5 22:56:07 2018 (r327601) +++ vendor-sys/acpica/dist/source/compiler/aslmessages.c Fri Jan 5 22:59:03 2018 (r327602) @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2018, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2017, Intel Corp. * All rights reserved. * * 2. License Modified: vendor-sys/acpica/dist/source/compiler/aslmessages.h ============================================================================== --- vendor-sys/acpica/dist/source/compiler/aslmessages.h Fri Jan 5 22:56:07 2018 (r327601) +++ vendor-sys/acpica/dist/source/compiler/aslmessages.h Fri Jan 5 22:59:03 2018 (r327602) @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2018, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2017, Intel Corp. * All rights reserved. * * 2. License Modified: vendor-sys/acpica/dist/source/compiler/aslmethod.c ============================================================================== --- vendor-sys/acpica/dist/source/compiler/aslmethod.c Fri Jan 5 22:56:07 2018 (r327601) +++ vendor-sys/acpica/dist/source/compiler/aslmethod.c Fri Jan 5 22:59:03 2018 (r327602) @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2018, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2017, Intel Corp. * All rights reserved. * * 2. License Modified: vendor-sys/acpica/dist/source/compiler/aslnamesp.c ============================================================================== --- vendor-sys/acpica/dist/source/compiler/aslnamesp.c Fri Jan 5 22:56:07 2018 (r327601) +++ vendor-sys/acpica/dist/source/compiler/aslnamesp.c Fri Jan 5 22:59:03 2018 (r327602) @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2018, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2017, Intel Corp. * All rights reserved. * * 2. License Modified: vendor-sys/acpica/dist/source/compiler/asloffset.c ============================================================================== --- vendor-sys/acpica/dist/source/compiler/asloffset.c Fri Jan 5 22:56:07 2018 (r327601) +++ vendor-sys/acpica/dist/source/compiler/asloffset.c Fri Jan 5 22:59:03 2018 (r327602) @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2018, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2017, Intel Corp. * All rights reserved. * * 2. License Modified: vendor-sys/acpica/dist/source/compiler/aslopcodes.c ============================================================================== --- vendor-sys/acpica/dist/source/compiler/aslopcodes.c Fri Jan 5 22:56:07 2018 (r327601) +++ vendor-sys/acpica/dist/source/compiler/aslopcodes.c Fri Jan 5 22:59:03 2018 (r327602) @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2018, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2017, Intel Corp. * All rights reserved. * * 2. License Modified: vendor-sys/acpica/dist/source/compiler/asloperands.c ============================================================================== --- vendor-sys/acpica/dist/source/compiler/asloperands.c Fri Jan 5 22:56:07 2018 (r327601) +++ vendor-sys/acpica/dist/source/compiler/asloperands.c Fri Jan 5 22:59:03 2018 (r327602) @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2018, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2017, Intel Corp. * All rights reserved. * * 2. License Modified: vendor-sys/acpica/dist/source/compiler/aslopt.c ============================================================================== --- vendor-sys/acpica/dist/source/compiler/aslopt.c Fri Jan 5 22:56:07 2018 (r327601) +++ vendor-sys/acpica/dist/source/compiler/aslopt.c Fri Jan 5 22:59:03 2018 (r327602) @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2018, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2017, Intel Corp. * All rights reserved. * * 2. License Modified: vendor-sys/acpica/dist/source/compiler/asloptions.c ============================================================================== --- vendor-sys/acpica/dist/source/compiler/asloptions.c Fri Jan 5 22:56:07 2018 (r327601) +++ vendor-sys/acpica/dist/source/compiler/asloptions.c Fri Jan 5 22:59:03 2018 (r327602) @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2018, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2017, Intel Corp. * All rights reserved. * * 2. License Modified: vendor-sys/acpica/dist/source/compiler/aslparseop.c ============================================================================== --- vendor-sys/acpica/dist/source/compiler/aslparseop.c Fri Jan 5 22:56:07 2018 (r327601) +++ vendor-sys/acpica/dist/source/compiler/aslparseop.c Fri Jan 5 22:59:03 2018 (r327602) @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2018, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2017, Intel Corp. * All rights reserved. * * 2. License Modified: vendor-sys/acpica/dist/source/compiler/aslparser.y ============================================================================== --- vendor-sys/acpica/dist/source/compiler/aslparser.y Fri Jan 5 22:56:07 2018 (r327601) +++ vendor-sys/acpica/dist/source/compiler/aslparser.y Fri Jan 5 22:59:03 2018 (r327602) @@ -9,7 +9,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2018, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2017, Intel Corp. * All rights reserved. * * 2. License Modified: vendor-sys/acpica/dist/source/compiler/aslpld.c ============================================================================== --- vendor-sys/acpica/dist/source/compiler/aslpld.c Fri Jan 5 22:56:07 2018 (r327601) +++ vendor-sys/acpica/dist/source/compiler/aslpld.c Fri Jan 5 22:59:03 2018 (r327602) @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2018, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2017, Intel Corp. * All rights reserved. * * 2. License Modified: vendor-sys/acpica/dist/source/compiler/aslpredef.c ============================================================================== --- vendor-sys/acpica/dist/source/compiler/aslpredef.c Fri Jan 5 22:56:07 2018 (r327601) *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@freebsd.org Fri Jan 5 23:02:20 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 6F7C0EA51B3; Fri, 5 Jan 2018 23:02:20 +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 C65E763FBE; Fri, 5 Jan 2018 23:02:19 +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 w05N2J7e036534; Fri, 5 Jan 2018 23:02:19 GMT (envelope-from jkim@FreeBSD.org) Received: (from jkim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w05N2CRU036468; Fri, 5 Jan 2018 23:02:12 GMT (envelope-from jkim@FreeBSD.org) Message-Id: <201801052302.w05N2CRU036468@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:02:12 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r327603 - in vendor-sys/acpica/dist: . source/common source/compiler source/components/debugger source/components/disassembler source/components/dispatcher source/components/events sour... X-SVN-Group: vendor-sys X-SVN-Commit-Author: jkim X-SVN-Commit-Paths: in vendor-sys/acpica/dist: . source/common source/compiler source/components/debugger source/components/disassembler source/components/dispatcher source/components/events source/components/executer so... X-SVN-Commit-Revision: 327603 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 05 Jan 2018 23:02:20 -0000 Author: jkim Date: Fri Jan 5 23:02:12 2018 New Revision: 327603 URL: https://svnweb.freebsd.org/changeset/base/327603 Log: Import ACPICA 20180105. Added: vendor-sys/acpica/dist/source/include/actbinfo.h (contents, props changed) Modified: vendor-sys/acpica/dist/changes.txt vendor-sys/acpica/dist/source/common/acfileio.c vendor-sys/acpica/dist/source/common/acgetline.c vendor-sys/acpica/dist/source/common/adfile.c vendor-sys/acpica/dist/source/common/adisasm.c vendor-sys/acpica/dist/source/common/adwalk.c vendor-sys/acpica/dist/source/common/ahids.c vendor-sys/acpica/dist/source/common/ahpredef.c vendor-sys/acpica/dist/source/common/ahtable.c vendor-sys/acpica/dist/source/common/ahuuids.c vendor-sys/acpica/dist/source/common/cmfsize.c vendor-sys/acpica/dist/source/common/dmextern.c vendor-sys/acpica/dist/source/common/dmrestag.c vendor-sys/acpica/dist/source/common/dmswitch.c vendor-sys/acpica/dist/source/common/dmtable.c vendor-sys/acpica/dist/source/common/dmtables.c vendor-sys/acpica/dist/source/common/dmtbdump.c vendor-sys/acpica/dist/source/common/dmtbinfo.c vendor-sys/acpica/dist/source/common/getopt.c vendor-sys/acpica/dist/source/compiler/aslallocate.c vendor-sys/acpica/dist/source/compiler/aslanalyze.c vendor-sys/acpica/dist/source/compiler/aslascii.c vendor-sys/acpica/dist/source/compiler/aslbtypes.c vendor-sys/acpica/dist/source/compiler/aslcache.c vendor-sys/acpica/dist/source/compiler/aslcodegen.c vendor-sys/acpica/dist/source/compiler/aslcompile.c vendor-sys/acpica/dist/source/compiler/aslcompiler.h vendor-sys/acpica/dist/source/compiler/aslcompiler.l vendor-sys/acpica/dist/source/compiler/aslcstyle.y vendor-sys/acpica/dist/source/compiler/asldebug.c vendor-sys/acpica/dist/source/compiler/asldefine.h vendor-sys/acpica/dist/source/compiler/aslerror.c vendor-sys/acpica/dist/source/compiler/aslexternal.c vendor-sys/acpica/dist/source/compiler/aslfileio.c vendor-sys/acpica/dist/source/compiler/aslfiles.c vendor-sys/acpica/dist/source/compiler/aslfold.c vendor-sys/acpica/dist/source/compiler/aslglobal.h vendor-sys/acpica/dist/source/compiler/aslhelp.c vendor-sys/acpica/dist/source/compiler/aslhelpers.y vendor-sys/acpica/dist/source/compiler/aslhex.c vendor-sys/acpica/dist/source/compiler/aslkeywords.y vendor-sys/acpica/dist/source/compiler/asllength.c vendor-sys/acpica/dist/source/compiler/asllisting.c vendor-sys/acpica/dist/source/compiler/asllistsup.c vendor-sys/acpica/dist/source/compiler/aslload.c vendor-sys/acpica/dist/source/compiler/asllookup.c vendor-sys/acpica/dist/source/compiler/aslmain.c vendor-sys/acpica/dist/source/compiler/aslmap.c vendor-sys/acpica/dist/source/compiler/aslmapenter.c vendor-sys/acpica/dist/source/compiler/aslmapoutput.c vendor-sys/acpica/dist/source/compiler/aslmaputils.c vendor-sys/acpica/dist/source/compiler/aslmessages.c vendor-sys/acpica/dist/source/compiler/aslmessages.h vendor-sys/acpica/dist/source/compiler/aslmethod.c vendor-sys/acpica/dist/source/compiler/aslnamesp.c vendor-sys/acpica/dist/source/compiler/asloffset.c vendor-sys/acpica/dist/source/compiler/aslopcodes.c vendor-sys/acpica/dist/source/compiler/asloperands.c vendor-sys/acpica/dist/source/compiler/aslopt.c vendor-sys/acpica/dist/source/compiler/asloptions.c vendor-sys/acpica/dist/source/compiler/aslparseop.c vendor-sys/acpica/dist/source/compiler/aslparser.y vendor-sys/acpica/dist/source/compiler/aslpld.c vendor-sys/acpica/dist/source/compiler/aslpredef.c vendor-sys/acpica/dist/source/compiler/aslprepkg.c vendor-sys/acpica/dist/source/compiler/aslprimaries.y vendor-sys/acpica/dist/source/compiler/aslprintf.c vendor-sys/acpica/dist/source/compiler/aslprune.c vendor-sys/acpica/dist/source/compiler/aslresource.c vendor-sys/acpica/dist/source/compiler/aslresources.y vendor-sys/acpica/dist/source/compiler/aslrestype1.c vendor-sys/acpica/dist/source/compiler/aslrestype1i.c vendor-sys/acpica/dist/source/compiler/aslrestype2.c vendor-sys/acpica/dist/source/compiler/aslrestype2d.c vendor-sys/acpica/dist/source/compiler/aslrestype2e.c vendor-sys/acpica/dist/source/compiler/aslrestype2q.c vendor-sys/acpica/dist/source/compiler/aslrestype2s.c vendor-sys/acpica/dist/source/compiler/aslrestype2w.c vendor-sys/acpica/dist/source/compiler/aslrules.y vendor-sys/acpica/dist/source/compiler/aslstartup.c vendor-sys/acpica/dist/source/compiler/aslstubs.c vendor-sys/acpica/dist/source/compiler/aslsupport.l vendor-sys/acpica/dist/source/compiler/aslsupport.y vendor-sys/acpica/dist/source/compiler/asltokens.y vendor-sys/acpica/dist/source/compiler/asltransform.c vendor-sys/acpica/dist/source/compiler/asltree.c vendor-sys/acpica/dist/source/compiler/asltypes.h vendor-sys/acpica/dist/source/compiler/asltypes.y vendor-sys/acpica/dist/source/compiler/aslutils.c vendor-sys/acpica/dist/source/compiler/asluuid.c vendor-sys/acpica/dist/source/compiler/aslwalks.c vendor-sys/acpica/dist/source/compiler/aslxref.c vendor-sys/acpica/dist/source/compiler/aslxrefout.c vendor-sys/acpica/dist/source/compiler/cvcompiler.c vendor-sys/acpica/dist/source/compiler/cvdisasm.c vendor-sys/acpica/dist/source/compiler/cvparser.c vendor-sys/acpica/dist/source/compiler/dtcompile.c vendor-sys/acpica/dist/source/compiler/dtcompiler.h vendor-sys/acpica/dist/source/compiler/dtexpress.c vendor-sys/acpica/dist/source/compiler/dtfield.c vendor-sys/acpica/dist/source/compiler/dtio.c vendor-sys/acpica/dist/source/compiler/dtparser.l vendor-sys/acpica/dist/source/compiler/dtparser.y vendor-sys/acpica/dist/source/compiler/dtsubtable.c vendor-sys/acpica/dist/source/compiler/dttable.c vendor-sys/acpica/dist/source/compiler/dttable1.c vendor-sys/acpica/dist/source/compiler/dttable2.c vendor-sys/acpica/dist/source/compiler/dttemplate.c vendor-sys/acpica/dist/source/compiler/dttemplate.h vendor-sys/acpica/dist/source/compiler/dtutils.c vendor-sys/acpica/dist/source/compiler/preprocess.h vendor-sys/acpica/dist/source/compiler/prexpress.c vendor-sys/acpica/dist/source/compiler/prmacros.c vendor-sys/acpica/dist/source/compiler/prparser.l vendor-sys/acpica/dist/source/compiler/prparser.y vendor-sys/acpica/dist/source/compiler/prscan.c vendor-sys/acpica/dist/source/compiler/prutils.c vendor-sys/acpica/dist/source/components/debugger/dbcmds.c vendor-sys/acpica/dist/source/components/debugger/dbconvert.c vendor-sys/acpica/dist/source/components/debugger/dbdisply.c vendor-sys/acpica/dist/source/components/debugger/dbexec.c vendor-sys/acpica/dist/source/components/debugger/dbfileio.c vendor-sys/acpica/dist/source/components/debugger/dbhistry.c vendor-sys/acpica/dist/source/components/debugger/dbinput.c vendor-sys/acpica/dist/source/components/debugger/dbmethod.c vendor-sys/acpica/dist/source/components/debugger/dbnames.c vendor-sys/acpica/dist/source/components/debugger/dbobject.c vendor-sys/acpica/dist/source/components/debugger/dbstats.c vendor-sys/acpica/dist/source/components/debugger/dbtest.c vendor-sys/acpica/dist/source/components/debugger/dbutils.c vendor-sys/acpica/dist/source/components/debugger/dbxface.c vendor-sys/acpica/dist/source/components/disassembler/dmbuffer.c vendor-sys/acpica/dist/source/components/disassembler/dmcstyle.c vendor-sys/acpica/dist/source/components/disassembler/dmdeferred.c vendor-sys/acpica/dist/source/components/disassembler/dmnames.c vendor-sys/acpica/dist/source/components/disassembler/dmopcode.c vendor-sys/acpica/dist/source/components/disassembler/dmresrc.c vendor-sys/acpica/dist/source/components/disassembler/dmresrcl.c vendor-sys/acpica/dist/source/components/disassembler/dmresrcl2.c vendor-sys/acpica/dist/source/components/disassembler/dmresrcs.c vendor-sys/acpica/dist/source/components/disassembler/dmutils.c vendor-sys/acpica/dist/source/components/disassembler/dmwalk.c vendor-sys/acpica/dist/source/components/dispatcher/dsargs.c vendor-sys/acpica/dist/source/components/dispatcher/dscontrol.c vendor-sys/acpica/dist/source/components/dispatcher/dsdebug.c vendor-sys/acpica/dist/source/components/dispatcher/dsfield.c vendor-sys/acpica/dist/source/components/dispatcher/dsinit.c vendor-sys/acpica/dist/source/components/dispatcher/dsmethod.c vendor-sys/acpica/dist/source/components/dispatcher/dsmthdat.c vendor-sys/acpica/dist/source/components/dispatcher/dsobject.c vendor-sys/acpica/dist/source/components/dispatcher/dsopcode.c vendor-sys/acpica/dist/source/components/dispatcher/dspkginit.c vendor-sys/acpica/dist/source/components/dispatcher/dsutils.c vendor-sys/acpica/dist/source/components/dispatcher/dswexec.c vendor-sys/acpica/dist/source/components/dispatcher/dswload.c vendor-sys/acpica/dist/source/components/dispatcher/dswload2.c vendor-sys/acpica/dist/source/components/dispatcher/dswscope.c vendor-sys/acpica/dist/source/components/dispatcher/dswstate.c vendor-sys/acpica/dist/source/components/events/evevent.c vendor-sys/acpica/dist/source/components/events/evglock.c vendor-sys/acpica/dist/source/components/events/evgpe.c vendor-sys/acpica/dist/source/components/events/evgpeblk.c vendor-sys/acpica/dist/source/components/events/evgpeinit.c vendor-sys/acpica/dist/source/components/events/evgpeutil.c vendor-sys/acpica/dist/source/components/events/evhandler.c vendor-sys/acpica/dist/source/components/events/evmisc.c vendor-sys/acpica/dist/source/components/events/evregion.c vendor-sys/acpica/dist/source/components/events/evrgnini.c vendor-sys/acpica/dist/source/components/events/evsci.c vendor-sys/acpica/dist/source/components/events/evxface.c vendor-sys/acpica/dist/source/components/events/evxfevnt.c vendor-sys/acpica/dist/source/components/events/evxfgpe.c vendor-sys/acpica/dist/source/components/events/evxfregn.c vendor-sys/acpica/dist/source/components/executer/exconcat.c vendor-sys/acpica/dist/source/components/executer/exconfig.c vendor-sys/acpica/dist/source/components/executer/exconvrt.c vendor-sys/acpica/dist/source/components/executer/excreate.c vendor-sys/acpica/dist/source/components/executer/exdebug.c vendor-sys/acpica/dist/source/components/executer/exdump.c vendor-sys/acpica/dist/source/components/executer/exfield.c vendor-sys/acpica/dist/source/components/executer/exfldio.c vendor-sys/acpica/dist/source/components/executer/exmisc.c vendor-sys/acpica/dist/source/components/executer/exmutex.c vendor-sys/acpica/dist/source/components/executer/exnames.c vendor-sys/acpica/dist/source/components/executer/exoparg1.c vendor-sys/acpica/dist/source/components/executer/exoparg2.c vendor-sys/acpica/dist/source/components/executer/exoparg3.c vendor-sys/acpica/dist/source/components/executer/exoparg6.c vendor-sys/acpica/dist/source/components/executer/exprep.c vendor-sys/acpica/dist/source/components/executer/exregion.c vendor-sys/acpica/dist/source/components/executer/exresnte.c vendor-sys/acpica/dist/source/components/executer/exresolv.c vendor-sys/acpica/dist/source/components/executer/exresop.c vendor-sys/acpica/dist/source/components/executer/exstore.c vendor-sys/acpica/dist/source/components/executer/exstoren.c vendor-sys/acpica/dist/source/components/executer/exstorob.c vendor-sys/acpica/dist/source/components/executer/exsystem.c vendor-sys/acpica/dist/source/components/executer/extrace.c vendor-sys/acpica/dist/source/components/executer/exutils.c vendor-sys/acpica/dist/source/components/hardware/hwacpi.c vendor-sys/acpica/dist/source/components/hardware/hwesleep.c vendor-sys/acpica/dist/source/components/hardware/hwgpe.c vendor-sys/acpica/dist/source/components/hardware/hwpci.c vendor-sys/acpica/dist/source/components/hardware/hwregs.c vendor-sys/acpica/dist/source/components/hardware/hwsleep.c vendor-sys/acpica/dist/source/components/hardware/hwtimer.c vendor-sys/acpica/dist/source/components/hardware/hwvalid.c vendor-sys/acpica/dist/source/components/hardware/hwxface.c vendor-sys/acpica/dist/source/components/hardware/hwxfsleep.c vendor-sys/acpica/dist/source/components/namespace/nsaccess.c vendor-sys/acpica/dist/source/components/namespace/nsalloc.c vendor-sys/acpica/dist/source/components/namespace/nsarguments.c vendor-sys/acpica/dist/source/components/namespace/nsconvert.c vendor-sys/acpica/dist/source/components/namespace/nsdump.c vendor-sys/acpica/dist/source/components/namespace/nsdumpdv.c vendor-sys/acpica/dist/source/components/namespace/nseval.c vendor-sys/acpica/dist/source/components/namespace/nsinit.c vendor-sys/acpica/dist/source/components/namespace/nsload.c vendor-sys/acpica/dist/source/components/namespace/nsnames.c vendor-sys/acpica/dist/source/components/namespace/nsobject.c vendor-sys/acpica/dist/source/components/namespace/nsparse.c vendor-sys/acpica/dist/source/components/namespace/nspredef.c vendor-sys/acpica/dist/source/components/namespace/nsprepkg.c vendor-sys/acpica/dist/source/components/namespace/nsrepair.c vendor-sys/acpica/dist/source/components/namespace/nsrepair2.c vendor-sys/acpica/dist/source/components/namespace/nssearch.c vendor-sys/acpica/dist/source/components/namespace/nsutils.c vendor-sys/acpica/dist/source/components/namespace/nswalk.c vendor-sys/acpica/dist/source/components/namespace/nsxfeval.c vendor-sys/acpica/dist/source/components/namespace/nsxfname.c vendor-sys/acpica/dist/source/components/namespace/nsxfobj.c vendor-sys/acpica/dist/source/components/parser/psargs.c vendor-sys/acpica/dist/source/components/parser/psloop.c vendor-sys/acpica/dist/source/components/parser/psobject.c vendor-sys/acpica/dist/source/components/parser/psopcode.c vendor-sys/acpica/dist/source/components/parser/psopinfo.c vendor-sys/acpica/dist/source/components/parser/psparse.c vendor-sys/acpica/dist/source/components/parser/psscope.c vendor-sys/acpica/dist/source/components/parser/pstree.c vendor-sys/acpica/dist/source/components/parser/psutils.c vendor-sys/acpica/dist/source/components/parser/pswalk.c vendor-sys/acpica/dist/source/components/parser/psxface.c vendor-sys/acpica/dist/source/components/resources/rsaddr.c vendor-sys/acpica/dist/source/components/resources/rscalc.c vendor-sys/acpica/dist/source/components/resources/rscreate.c vendor-sys/acpica/dist/source/components/resources/rsdump.c vendor-sys/acpica/dist/source/components/resources/rsdumpinfo.c vendor-sys/acpica/dist/source/components/resources/rsinfo.c vendor-sys/acpica/dist/source/components/resources/rsio.c vendor-sys/acpica/dist/source/components/resources/rsirq.c vendor-sys/acpica/dist/source/components/resources/rslist.c vendor-sys/acpica/dist/source/components/resources/rsmemory.c vendor-sys/acpica/dist/source/components/resources/rsmisc.c vendor-sys/acpica/dist/source/components/resources/rsserial.c vendor-sys/acpica/dist/source/components/resources/rsutils.c vendor-sys/acpica/dist/source/components/resources/rsxface.c vendor-sys/acpica/dist/source/components/tables/tbdata.c vendor-sys/acpica/dist/source/components/tables/tbfadt.c vendor-sys/acpica/dist/source/components/tables/tbfind.c vendor-sys/acpica/dist/source/components/tables/tbinstal.c vendor-sys/acpica/dist/source/components/tables/tbprint.c vendor-sys/acpica/dist/source/components/tables/tbutils.c vendor-sys/acpica/dist/source/components/tables/tbxface.c vendor-sys/acpica/dist/source/components/tables/tbxfload.c vendor-sys/acpica/dist/source/components/tables/tbxfroot.c vendor-sys/acpica/dist/source/components/utilities/utaddress.c vendor-sys/acpica/dist/source/components/utilities/utalloc.c vendor-sys/acpica/dist/source/components/utilities/utascii.c vendor-sys/acpica/dist/source/components/utilities/utbuffer.c vendor-sys/acpica/dist/source/components/utilities/utcache.c vendor-sys/acpica/dist/source/components/utilities/utclib.c vendor-sys/acpica/dist/source/components/utilities/utcopy.c vendor-sys/acpica/dist/source/components/utilities/utdebug.c vendor-sys/acpica/dist/source/components/utilities/utdecode.c vendor-sys/acpica/dist/source/components/utilities/utdelete.c vendor-sys/acpica/dist/source/components/utilities/uterror.c vendor-sys/acpica/dist/source/components/utilities/uteval.c vendor-sys/acpica/dist/source/components/utilities/utexcep.c vendor-sys/acpica/dist/source/components/utilities/utglobal.c vendor-sys/acpica/dist/source/components/utilities/uthex.c vendor-sys/acpica/dist/source/components/utilities/utids.c vendor-sys/acpica/dist/source/components/utilities/utinit.c vendor-sys/acpica/dist/source/components/utilities/utlock.c vendor-sys/acpica/dist/source/components/utilities/utmath.c vendor-sys/acpica/dist/source/components/utilities/utmisc.c vendor-sys/acpica/dist/source/components/utilities/utmutex.c vendor-sys/acpica/dist/source/components/utilities/utnonansi.c vendor-sys/acpica/dist/source/components/utilities/utobject.c vendor-sys/acpica/dist/source/components/utilities/utosi.c vendor-sys/acpica/dist/source/components/utilities/utownerid.c vendor-sys/acpica/dist/source/components/utilities/utpredef.c vendor-sys/acpica/dist/source/components/utilities/utprint.c vendor-sys/acpica/dist/source/components/utilities/utresdecode.c vendor-sys/acpica/dist/source/components/utilities/utresrc.c vendor-sys/acpica/dist/source/components/utilities/utstate.c vendor-sys/acpica/dist/source/components/utilities/utstring.c vendor-sys/acpica/dist/source/components/utilities/utstrsuppt.c vendor-sys/acpica/dist/source/components/utilities/utstrtoul64.c vendor-sys/acpica/dist/source/components/utilities/uttrack.c vendor-sys/acpica/dist/source/components/utilities/utuuid.c vendor-sys/acpica/dist/source/components/utilities/utxface.c vendor-sys/acpica/dist/source/components/utilities/utxferror.c vendor-sys/acpica/dist/source/components/utilities/utxfinit.c vendor-sys/acpica/dist/source/components/utilities/utxfmutex.c vendor-sys/acpica/dist/source/include/acapps.h vendor-sys/acpica/dist/source/include/acbuffer.h vendor-sys/acpica/dist/source/include/acclib.h vendor-sys/acpica/dist/source/include/accommon.h vendor-sys/acpica/dist/source/include/acconfig.h vendor-sys/acpica/dist/source/include/acconvert.h vendor-sys/acpica/dist/source/include/acdebug.h vendor-sys/acpica/dist/source/include/acdisasm.h vendor-sys/acpica/dist/source/include/acdispat.h vendor-sys/acpica/dist/source/include/acevents.h vendor-sys/acpica/dist/source/include/acexcep.h vendor-sys/acpica/dist/source/include/acglobal.h vendor-sys/acpica/dist/source/include/achware.h vendor-sys/acpica/dist/source/include/acinterp.h vendor-sys/acpica/dist/source/include/aclocal.h vendor-sys/acpica/dist/source/include/acmacros.h vendor-sys/acpica/dist/source/include/acnames.h vendor-sys/acpica/dist/source/include/acnamesp.h vendor-sys/acpica/dist/source/include/acobject.h vendor-sys/acpica/dist/source/include/acopcode.h vendor-sys/acpica/dist/source/include/acoutput.h vendor-sys/acpica/dist/source/include/acparser.h vendor-sys/acpica/dist/source/include/acpi.h vendor-sys/acpica/dist/source/include/acpiosxf.h vendor-sys/acpica/dist/source/include/acpixf.h vendor-sys/acpica/dist/source/include/acpredef.h vendor-sys/acpica/dist/source/include/acresrc.h vendor-sys/acpica/dist/source/include/acrestyp.h vendor-sys/acpica/dist/source/include/acstruct.h vendor-sys/acpica/dist/source/include/actables.h vendor-sys/acpica/dist/source/include/actbl.h vendor-sys/acpica/dist/source/include/actbl1.h vendor-sys/acpica/dist/source/include/actbl2.h vendor-sys/acpica/dist/source/include/actbl3.h vendor-sys/acpica/dist/source/include/actypes.h vendor-sys/acpica/dist/source/include/acutils.h vendor-sys/acpica/dist/source/include/acuuid.h vendor-sys/acpica/dist/source/include/amlcode.h vendor-sys/acpica/dist/source/include/amlresrc.h vendor-sys/acpica/dist/source/include/platform/accygwin.h vendor-sys/acpica/dist/source/include/platform/acdragonflyex.h vendor-sys/acpica/dist/source/include/platform/acefi.h vendor-sys/acpica/dist/source/include/platform/acefiex.h vendor-sys/acpica/dist/source/include/platform/acenv.h vendor-sys/acpica/dist/source/include/platform/acenvex.h vendor-sys/acpica/dist/source/include/platform/acfreebsd.h vendor-sys/acpica/dist/source/include/platform/acgcc.h vendor-sys/acpica/dist/source/include/platform/acgccex.h vendor-sys/acpica/dist/source/include/platform/achaiku.h vendor-sys/acpica/dist/source/include/platform/acintel.h vendor-sys/acpica/dist/source/include/platform/aclinux.h vendor-sys/acpica/dist/source/include/platform/aclinuxex.h vendor-sys/acpica/dist/source/include/platform/acmacosx.h vendor-sys/acpica/dist/source/include/platform/acmsvc.h vendor-sys/acpica/dist/source/include/platform/acmsvcex.h vendor-sys/acpica/dist/source/include/platform/acnetbsd.h vendor-sys/acpica/dist/source/include/platform/acos2.h vendor-sys/acpica/dist/source/include/platform/acqnx.h vendor-sys/acpica/dist/source/include/platform/acwin.h vendor-sys/acpica/dist/source/include/platform/acwin64.h vendor-sys/acpica/dist/source/os_specific/service_layers/osbsdtbl.c vendor-sys/acpica/dist/source/os_specific/service_layers/oslinuxtbl.c vendor-sys/acpica/dist/source/os_specific/service_layers/osunixdir.c vendor-sys/acpica/dist/source/os_specific/service_layers/osunixmap.c vendor-sys/acpica/dist/source/os_specific/service_layers/osunixxf.c vendor-sys/acpica/dist/source/os_specific/service_layers/oswindir.c vendor-sys/acpica/dist/source/os_specific/service_layers/oswintbl.c vendor-sys/acpica/dist/source/os_specific/service_layers/oswinxf.c vendor-sys/acpica/dist/source/tools/acpibin/abcompare.c vendor-sys/acpica/dist/source/tools/acpibin/abmain.c vendor-sys/acpica/dist/source/tools/acpibin/acpibin.h vendor-sys/acpica/dist/source/tools/acpidump/acpidump.h vendor-sys/acpica/dist/source/tools/acpidump/apdump.c vendor-sys/acpica/dist/source/tools/acpidump/apfiles.c vendor-sys/acpica/dist/source/tools/acpidump/apmain.c vendor-sys/acpica/dist/source/tools/acpiexec/aecommon.h vendor-sys/acpica/dist/source/tools/acpiexec/aeexception.c vendor-sys/acpica/dist/source/tools/acpiexec/aeexec.c vendor-sys/acpica/dist/source/tools/acpiexec/aehandlers.c vendor-sys/acpica/dist/source/tools/acpiexec/aeinitfile.c vendor-sys/acpica/dist/source/tools/acpiexec/aeinstall.c vendor-sys/acpica/dist/source/tools/acpiexec/aemain.c vendor-sys/acpica/dist/source/tools/acpiexec/aeregion.c vendor-sys/acpica/dist/source/tools/acpiexec/aetables.c vendor-sys/acpica/dist/source/tools/acpiexec/aetables.h vendor-sys/acpica/dist/source/tools/acpiexec/aetests.c vendor-sys/acpica/dist/source/tools/acpihelp/acpihelp.h vendor-sys/acpica/dist/source/tools/acpihelp/ahaml.c vendor-sys/acpica/dist/source/tools/acpihelp/ahamlops.c vendor-sys/acpica/dist/source/tools/acpihelp/ahasl.c vendor-sys/acpica/dist/source/tools/acpihelp/ahaslkey.c vendor-sys/acpica/dist/source/tools/acpihelp/ahaslops.c vendor-sys/acpica/dist/source/tools/acpihelp/ahdecode.c vendor-sys/acpica/dist/source/tools/acpihelp/ahgrammar.c vendor-sys/acpica/dist/source/tools/acpihelp/ahmain.c vendor-sys/acpica/dist/source/tools/acpinames/acpinames.h vendor-sys/acpica/dist/source/tools/acpinames/anmain.c vendor-sys/acpica/dist/source/tools/acpinames/anstubs.c vendor-sys/acpica/dist/source/tools/acpinames/antables.c vendor-sys/acpica/dist/source/tools/acpisrc/acpisrc.h vendor-sys/acpica/dist/source/tools/acpisrc/ascase.c vendor-sys/acpica/dist/source/tools/acpisrc/asconvrt.c vendor-sys/acpica/dist/source/tools/acpisrc/asfile.c vendor-sys/acpica/dist/source/tools/acpisrc/asmain.c vendor-sys/acpica/dist/source/tools/acpisrc/asremove.c vendor-sys/acpica/dist/source/tools/acpisrc/astable.c vendor-sys/acpica/dist/source/tools/acpisrc/asutils.c vendor-sys/acpica/dist/source/tools/acpixtract/acpixtract.c vendor-sys/acpica/dist/source/tools/acpixtract/acpixtract.h vendor-sys/acpica/dist/source/tools/acpixtract/axmain.c vendor-sys/acpica/dist/source/tools/acpixtract/axutils.c vendor-sys/acpica/dist/source/tools/efihello/efihello.c vendor-sys/acpica/dist/source/tools/examples/examples.c vendor-sys/acpica/dist/source/tools/examples/examples.h vendor-sys/acpica/dist/source/tools/examples/exstubs.c vendor-sys/acpica/dist/source/tools/examples/extables.c vendor-sys/acpica/dist/tests/misc/badcode.asl vendor-sys/acpica/dist/tests/misc/converterSample.asl vendor-sys/acpica/dist/tests/misc/grammar.asl Modified: vendor-sys/acpica/dist/changes.txt ============================================================================== --- vendor-sys/acpica/dist/changes.txt Fri Jan 5 22:59:03 2018 (r327602) +++ vendor-sys/acpica/dist/changes.txt Fri Jan 5 23:02:12 2018 (r327603) @@ -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: vendor-sys/acpica/dist/source/common/acfileio.c ============================================================================== --- vendor-sys/acpica/dist/source/common/acfileio.c Fri Jan 5 22:59:03 2018 (r327602) +++ vendor-sys/acpica/dist/source/common/acfileio.c Fri Jan 5 23:02:12 2018 (r327603) @@ -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: vendor-sys/acpica/dist/source/common/acgetline.c ============================================================================== --- vendor-sys/acpica/dist/source/common/acgetline.c Fri Jan 5 22:59:03 2018 (r327602) +++ vendor-sys/acpica/dist/source/common/acgetline.c Fri Jan 5 23:02:12 2018 (r327603) @@ -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: vendor-sys/acpica/dist/source/common/adfile.c ============================================================================== --- vendor-sys/acpica/dist/source/common/adfile.c Fri Jan 5 22:59:03 2018 (r327602) +++ vendor-sys/acpica/dist/source/common/adfile.c Fri Jan 5 23:02:12 2018 (r327603) @@ -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: vendor-sys/acpica/dist/source/common/adisasm.c ============================================================================== --- vendor-sys/acpica/dist/source/common/adisasm.c Fri Jan 5 22:59:03 2018 (r327602) +++ vendor-sys/acpica/dist/source/common/adisasm.c Fri Jan 5 23:02:12 2018 (r327603) @@ -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: vendor-sys/acpica/dist/source/common/adwalk.c ============================================================================== --- vendor-sys/acpica/dist/source/common/adwalk.c Fri Jan 5 22:59:03 2018 (r327602) +++ vendor-sys/acpica/dist/source/common/adwalk.c Fri Jan 5 23:02:12 2018 (r327603) @@ -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: vendor-sys/acpica/dist/source/common/ahids.c ============================================================================== --- vendor-sys/acpica/dist/source/common/ahids.c Fri Jan 5 22:59:03 2018 (r327602) +++ vendor-sys/acpica/dist/source/common/ahids.c Fri Jan 5 23:02:12 2018 (r327603) @@ -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: vendor-sys/acpica/dist/source/common/ahpredef.c ============================================================================== --- vendor-sys/acpica/dist/source/common/ahpredef.c Fri Jan 5 22:59:03 2018 (r327602) +++ vendor-sys/acpica/dist/source/common/ahpredef.c Fri Jan 5 23:02:12 2018 (r327603) @@ -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: vendor-sys/acpica/dist/source/common/ahtable.c ============================================================================== --- vendor-sys/acpica/dist/source/common/ahtable.c Fri Jan 5 22:59:03 2018 (r327602) +++ vendor-sys/acpica/dist/source/common/ahtable.c Fri Jan 5 23:02:12 2018 (r327603) @@ -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: vendor-sys/acpica/dist/source/common/ahuuids.c ============================================================================== --- vendor-sys/acpica/dist/source/common/ahuuids.c Fri Jan 5 22:59:03 2018 (r327602) +++ vendor-sys/acpica/dist/source/common/ahuuids.c Fri Jan 5 23:02:12 2018 (r327603) @@ -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: vendor-sys/acpica/dist/source/common/cmfsize.c ============================================================================== --- vendor-sys/acpica/dist/source/common/cmfsize.c Fri Jan 5 22:59:03 2018 (r327602) +++ vendor-sys/acpica/dist/source/common/cmfsize.c Fri Jan 5 23:02:12 2018 (r327603) @@ -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: vendor-sys/acpica/dist/source/common/dmextern.c ============================================================================== --- vendor-sys/acpica/dist/source/common/dmextern.c Fri Jan 5 22:59:03 2018 (r327602) +++ vendor-sys/acpica/dist/source/common/dmextern.c Fri Jan 5 23:02:12 2018 (r327603) @@ -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: vendor-sys/acpica/dist/source/common/dmrestag.c ============================================================================== --- vendor-sys/acpica/dist/source/common/dmrestag.c Fri Jan 5 22:59:03 2018 (r327602) +++ vendor-sys/acpica/dist/source/common/dmrestag.c Fri Jan 5 23:02:12 2018 (r327603) @@ -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: vendor-sys/acpica/dist/source/common/dmswitch.c ============================================================================== --- vendor-sys/acpica/dist/source/common/dmswitch.c Fri Jan 5 22:59:03 2018 (r327602) +++ vendor-sys/acpica/dist/source/common/dmswitch.c Fri Jan 5 23:02:12 2018 (r327603) @@ -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: vendor-sys/acpica/dist/source/common/dmtable.c ============================================================================== --- vendor-sys/acpica/dist/source/common/dmtable.c Fri Jan 5 22:59:03 2018 (r327602) +++ vendor-sys/acpica/dist/source/common/dmtable.c Fri Jan 5 23:02:12 2018 (r327603) @@ -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: vendor-sys/acpica/dist/source/common/dmtables.c ============================================================================== --- vendor-sys/acpica/dist/source/common/dmtables.c Fri Jan 5 22:59:03 2018 (r327602) +++ vendor-sys/acpica/dist/source/common/dmtables.c Fri Jan 5 23:02:12 2018 (r327603) @@ -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: vendor-sys/acpica/dist/source/common/dmtbdump.c ============================================================================== --- vendor-sys/acpica/dist/source/common/dmtbdump.c Fri Jan 5 22:59:03 2018 (r327602) +++ vendor-sys/acpica/dist/source/common/dmtbdump.c Fri Jan 5 23:02:12 2018 (r327603) @@ -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: vendor-sys/acpica/dist/source/common/dmtbinfo.c ============================================================================== --- vendor-sys/acpica/dist/source/common/dmtbinfo.c Fri Jan 5 22:59:03 2018 (r327602) +++ vendor-sys/acpica/dist/source/common/dmtbinfo.c Fri Jan 5 23:02:12 2018 (r327603) @@ -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 "acpi.h" #include "accommon.h" #include "acdisasm.h" +#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: vendor-sys/acpica/dist/source/common/getopt.c ============================================================================== --- vendor-sys/acpica/dist/source/common/getopt.c Fri Jan 5 22:59:03 2018 (r327602) +++ vendor-sys/acpica/dist/source/common/getopt.c Fri Jan 5 23:02:12 2018 (r327603) @@ -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: vendor-sys/acpica/dist/source/compiler/aslallocate.c ============================================================================== --- vendor-sys/acpica/dist/source/compiler/aslallocate.c Fri Jan 5 22:59:03 2018 (r327602) +++ vendor-sys/acpica/dist/source/compiler/aslallocate.c Fri Jan 5 23:02:12 2018 (r327603) @@ -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: vendor-sys/acpica/dist/source/compiler/aslanalyze.c ============================================================================== --- vendor-sys/acpica/dist/source/compiler/aslanalyze.c Fri Jan 5 22:59:03 2018 (r327602) +++ vendor-sys/acpica/dist/source/compiler/aslanalyze.c Fri Jan 5 23:02:12 2018 (r327603) @@ -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: vendor-sys/acpica/dist/source/compiler/aslascii.c ============================================================================== --- vendor-sys/acpica/dist/source/compiler/aslascii.c Fri Jan 5 22:59:03 2018 (r327602) +++ vendor-sys/acpica/dist/source/compiler/aslascii.c Fri Jan 5 23:02:12 2018 (r327603) @@ -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: vendor-sys/acpica/dist/source/compiler/aslbtypes.c ============================================================================== --- vendor-sys/acpica/dist/source/compiler/aslbtypes.c Fri Jan 5 22:59:03 2018 (r327602) +++ vendor-sys/acpica/dist/source/compiler/aslbtypes.c Fri Jan 5 23:02:12 2018 (r327603) @@ -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: vendor-sys/acpica/dist/source/compiler/aslcache.c ============================================================================== --- vendor-sys/acpica/dist/source/compiler/aslcache.c Fri Jan 5 22:59:03 2018 (r327602) +++ vendor-sys/acpica/dist/source/compiler/aslcache.c Fri Jan 5 23:02:12 2018 (r327603) @@ -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: vendor-sys/acpica/dist/source/compiler/aslcodegen.c ============================================================================== --- vendor-sys/acpica/dist/source/compiler/aslcodegen.c Fri Jan 5 22:59:03 2018 (r327602) +++ vendor-sys/acpica/dist/source/compiler/aslcodegen.c Fri Jan 5 23:02:12 2018 (r327603) @@ -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: vendor-sys/acpica/dist/source/compiler/aslcompile.c ============================================================================== --- vendor-sys/acpica/dist/source/compiler/aslcompile.c Fri Jan 5 22:59:03 2018 (r327602) +++ vendor-sys/acpica/dist/source/compiler/aslcompile.c Fri Jan 5 23:02:12 2018 (r327603) @@ -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: vendor-sys/acpica/dist/source/compiler/aslcompiler.h ============================================================================== --- vendor-sys/acpica/dist/source/compiler/aslcompiler.h Fri Jan 5 22:59:03 2018 (r327602) +++ vendor-sys/acpica/dist/source/compiler/aslcompiler.h Fri Jan 5 23:02:12 2018 (r327603) @@ -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: vendor-sys/acpica/dist/source/compiler/aslcompiler.l ============================================================================== --- vendor-sys/acpica/dist/source/compiler/aslcompiler.l Fri Jan 5 22:59:03 2018 (r327602) +++ vendor-sys/acpica/dist/source/compiler/aslcompiler.l Fri Jan 5 23:02:12 2018 (r327603) @@ -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: vendor-sys/acpica/dist/source/compiler/aslcstyle.y ============================================================================== --- vendor-sys/acpica/dist/source/compiler/aslcstyle.y Fri Jan 5 22:59:03 2018 (r327602) +++ vendor-sys/acpica/dist/source/compiler/aslcstyle.y Fri Jan 5 23:02:12 2018 (r327603) @@ -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: vendor-sys/acpica/dist/source/compiler/asldebug.c ============================================================================== --- vendor-sys/acpica/dist/source/compiler/asldebug.c Fri Jan 5 22:59:03 2018 (r327602) +++ vendor-sys/acpica/dist/source/compiler/asldebug.c Fri Jan 5 23:02:12 2018 (r327603) @@ -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: vendor-sys/acpica/dist/source/compiler/asldefine.h ============================================================================== --- vendor-sys/acpica/dist/source/compiler/asldefine.h Fri Jan 5 22:59:03 2018 (r327602) +++ vendor-sys/acpica/dist/source/compiler/asldefine.h Fri Jan 5 23:02:12 2018 (r327603) @@ -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: vendor-sys/acpica/dist/source/compiler/aslerror.c ============================================================================== --- vendor-sys/acpica/dist/source/compiler/aslerror.c Fri Jan 5 22:59:03 2018 (r327602) +++ vendor-sys/acpica/dist/source/compiler/aslerror.c Fri Jan 5 23:02:12 2018 (r327603) @@ -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: vendor-sys/acpica/dist/source/compiler/aslexternal.c ============================================================================== --- vendor-sys/acpica/dist/source/compiler/aslexternal.c Fri Jan 5 22:59:03 2018 (r327602) +++ vendor-sys/acpica/dist/source/compiler/aslexternal.c Fri Jan 5 23:02:12 2018 (r327603) @@ -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: vendor-sys/acpica/dist/source/compiler/aslfileio.c ============================================================================== --- vendor-sys/acpica/dist/source/compiler/aslfileio.c Fri Jan 5 22:59:03 2018 (r327602) +++ vendor-sys/acpica/dist/source/compiler/aslfileio.c Fri Jan 5 23:02:12 2018 (r327603) @@ -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: vendor-sys/acpica/dist/source/compiler/aslfiles.c ============================================================================== --- vendor-sys/acpica/dist/source/compiler/aslfiles.c Fri Jan 5 22:59:03 2018 (r327602) +++ vendor-sys/acpica/dist/source/compiler/aslfiles.c Fri Jan 5 23:02:12 2018 (r327603) @@ -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: vendor-sys/acpica/dist/source/compiler/aslfold.c ============================================================================== --- vendor-sys/acpica/dist/source/compiler/aslfold.c Fri Jan 5 22:59:03 2018 (r327602) +++ vendor-sys/acpica/dist/source/compiler/aslfold.c Fri Jan 5 23:02:12 2018 (r327603) @@ -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: vendor-sys/acpica/dist/source/compiler/aslglobal.h ============================================================================== --- vendor-sys/acpica/dist/source/compiler/aslglobal.h Fri Jan 5 22:59:03 2018 (r327602) +++ vendor-sys/acpica/dist/source/compiler/aslglobal.h Fri Jan 5 23:02:12 2018 (r327603) @@ -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: vendor-sys/acpica/dist/source/compiler/aslhelp.c ============================================================================== --- vendor-sys/acpica/dist/source/compiler/aslhelp.c Fri Jan 5 22:59:03 2018 (r327602) +++ vendor-sys/acpica/dist/source/compiler/aslhelp.c Fri Jan 5 23:02:12 2018 (r327603) @@ -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: vendor-sys/acpica/dist/source/compiler/aslhelpers.y ============================================================================== --- vendor-sys/acpica/dist/source/compiler/aslhelpers.y Fri Jan 5 22:59:03 2018 (r327602) +++ vendor-sys/acpica/dist/source/compiler/aslhelpers.y Fri Jan 5 23:02:12 2018 (r327603) @@ -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: vendor-sys/acpica/dist/source/compiler/aslhex.c ============================================================================== --- vendor-sys/acpica/dist/source/compiler/aslhex.c Fri Jan 5 22:59:03 2018 (r327602) +++ vendor-sys/acpica/dist/source/compiler/aslhex.c Fri Jan 5 23:02:12 2018 (r327603) @@ -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: vendor-sys/acpica/dist/source/compiler/aslkeywords.y ============================================================================== --- vendor-sys/acpica/dist/source/compiler/aslkeywords.y Fri Jan 5 22:59:03 2018 (r327602) +++ vendor-sys/acpica/dist/source/compiler/aslkeywords.y Fri Jan 5 23:02:12 2018 (r327603) @@ -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: vendor-sys/acpica/dist/source/compiler/asllength.c ============================================================================== --- vendor-sys/acpica/dist/source/compiler/asllength.c Fri Jan 5 22:59:03 2018 (r327602) +++ vendor-sys/acpica/dist/source/compiler/asllength.c Fri Jan 5 23:02:12 2018 (r327603) @@ -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: vendor-sys/acpica/dist/source/compiler/asllisting.c ============================================================================== --- vendor-sys/acpica/dist/source/compiler/asllisting.c Fri Jan 5 22:59:03 2018 (r327602) +++ vendor-sys/acpica/dist/source/compiler/asllisting.c Fri Jan 5 23:02:12 2018 (r327603) @@ -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: vendor-sys/acpica/dist/source/compiler/asllistsup.c ============================================================================== --- vendor-sys/acpica/dist/source/compiler/asllistsup.c Fri Jan 5 22:59:03 2018 (r327602) +++ vendor-sys/acpica/dist/source/compiler/asllistsup.c Fri Jan 5 23:02:12 2018 (r327603) @@ -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: vendor-sys/acpica/dist/source/compiler/aslload.c ============================================================================== --- vendor-sys/acpica/dist/source/compiler/aslload.c Fri Jan 5 22:59:03 2018 (r327602) +++ vendor-sys/acpica/dist/source/compiler/aslload.c Fri Jan 5 23:02:12 2018 (r327603) @@ -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: vendor-sys/acpica/dist/source/compiler/asllookup.c ============================================================================== --- vendor-sys/acpica/dist/source/compiler/asllookup.c Fri Jan 5 22:59:03 2018 (r327602) +++ vendor-sys/acpica/dist/source/compiler/asllookup.c Fri Jan 5 23:02:12 2018 (r327603) @@ -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: vendor-sys/acpica/dist/source/compiler/aslmain.c ============================================================================== --- vendor-sys/acpica/dist/source/compiler/aslmain.c Fri Jan 5 22:59:03 2018 (r327602) +++ vendor-sys/acpica/dist/source/compiler/aslmain.c Fri Jan 5 23:02:12 2018 (r327603) @@ -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: vendor-sys/acpica/dist/source/compiler/aslmap.c ============================================================================== --- vendor-sys/acpica/dist/source/compiler/aslmap.c Fri Jan 5 22:59:03 2018 (r327602) +++ vendor-sys/acpica/dist/source/compiler/aslmap.c Fri Jan 5 23:02:12 2018 (r327603) @@ -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: vendor-sys/acpica/dist/source/compiler/aslmapenter.c ============================================================================== --- vendor-sys/acpica/dist/source/compiler/aslmapenter.c Fri Jan 5 22:59:03 2018 (r327602) +++ vendor-sys/acpica/dist/source/compiler/aslmapenter.c Fri Jan 5 23:02:12 2018 (r327603) @@ -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: vendor-sys/acpica/dist/source/compiler/aslmapoutput.c ============================================================================== --- vendor-sys/acpica/dist/source/compiler/aslmapoutput.c Fri Jan 5 22:59:03 2018 (r327602) +++ vendor-sys/acpica/dist/source/compiler/aslmapoutput.c Fri Jan 5 23:02:12 2018 (r327603) @@ -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: vendor-sys/acpica/dist/source/compiler/aslmaputils.c ============================================================================== --- vendor-sys/acpica/dist/source/compiler/aslmaputils.c Fri Jan 5 22:59:03 2018 (r327602) +++ vendor-sys/acpica/dist/source/compiler/aslmaputils.c Fri Jan 5 23:02:12 2018 (r327603) @@ -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: vendor-sys/acpica/dist/source/compiler/aslmessages.c ============================================================================== --- vendor-sys/acpica/dist/source/compiler/aslmessages.c Fri Jan 5 22:59:03 2018 (r327602) +++ vendor-sys/acpica/dist/source/compiler/aslmessages.c Fri Jan 5 23:02:12 2018 (r327603) @@ -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: vendor-sys/acpica/dist/source/compiler/aslmessages.h ============================================================================== --- vendor-sys/acpica/dist/source/compiler/aslmessages.h Fri Jan 5 22:59:03 2018 (r327602) +++ vendor-sys/acpica/dist/source/compiler/aslmessages.h Fri Jan 5 23:02:12 2018 (r327603) @@ -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: vendor-sys/acpica/dist/source/compiler/aslmethod.c ============================================================================== --- vendor-sys/acpica/dist/source/compiler/aslmethod.c Fri Jan 5 22:59:03 2018 (r327602) +++ vendor-sys/acpica/dist/source/compiler/aslmethod.c Fri Jan 5 23:02:12 2018 (r327603) @@ -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: vendor-sys/acpica/dist/source/compiler/aslnamesp.c ============================================================================== --- vendor-sys/acpica/dist/source/compiler/aslnamesp.c Fri Jan 5 22:59:03 2018 (r327602) +++ vendor-sys/acpica/dist/source/compiler/aslnamesp.c Fri Jan 5 23:02:12 2018 (r327603) @@ -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: vendor-sys/acpica/dist/source/compiler/asloffset.c ============================================================================== --- vendor-sys/acpica/dist/source/compiler/asloffset.c Fri Jan 5 22:59:03 2018 (r327602) +++ vendor-sys/acpica/dist/source/compiler/asloffset.c Fri Jan 5 23:02:12 2018 (r327603) @@ -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: vendor-sys/acpica/dist/source/compiler/aslopcodes.c ============================================================================== --- vendor-sys/acpica/dist/source/compiler/aslopcodes.c Fri Jan 5 22:59:03 2018 (r327602) +++ vendor-sys/acpica/dist/source/compiler/aslopcodes.c Fri Jan 5 23:02:12 2018 (r327603) @@ -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: vendor-sys/acpica/dist/source/compiler/asloperands.c ============================================================================== --- vendor-sys/acpica/dist/source/compiler/asloperands.c Fri Jan 5 22:59:03 2018 (r327602) +++ vendor-sys/acpica/dist/source/compiler/asloperands.c Fri Jan 5 23:02:12 2018 (r327603) @@ -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: vendor-sys/acpica/dist/source/compiler/aslopt.c ============================================================================== --- vendor-sys/acpica/dist/source/compiler/aslopt.c Fri Jan 5 22:59:03 2018 (r327602) +++ vendor-sys/acpica/dist/source/compiler/aslopt.c Fri Jan 5 23:02:12 2018 (r327603) @@ -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: vendor-sys/acpica/dist/source/compiler/asloptions.c ============================================================================== --- vendor-sys/acpica/dist/source/compiler/asloptions.c Fri Jan 5 22:59:03 2018 (r327602) +++ vendor-sys/acpica/dist/source/compiler/asloptions.c Fri Jan 5 23:02:12 2018 (r327603) @@ -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: vendor-sys/acpica/dist/source/compiler/aslparseop.c ============================================================================== --- vendor-sys/acpica/dist/source/compiler/aslparseop.c Fri Jan 5 22:59:03 2018 (r327602) +++ vendor-sys/acpica/dist/source/compiler/aslparseop.c Fri Jan 5 23:02:12 2018 (r327603) @@ -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: vendor-sys/acpica/dist/source/compiler/aslparser.y ============================================================================== --- vendor-sys/acpica/dist/source/compiler/aslparser.y Fri Jan 5 22:59:03 2018 (r327602) +++ vendor-sys/acpica/dist/source/compiler/aslparser.y Fri Jan 5 23:02:12 2018 (r327603) @@ -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: vendor-sys/acpica/dist/source/compiler/aslpld.c ============================================================================== --- vendor-sys/acpica/dist/source/compiler/aslpld.c Fri Jan 5 22:59:03 2018 (r327602) +++ vendor-sys/acpica/dist/source/compiler/aslpld.c Fri Jan 5 23:02:12 2018 (r327603) @@ -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: vendor-sys/acpica/dist/source/compiler/aslpredef.c ============================================================================== --- vendor-sys/acpica/dist/source/compiler/aslpredef.c Fri Jan 5 22:59:03 2018 (r327602) *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@freebsd.org Fri Jan 5 23:04:14 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id ABFCFEA533D; Fri, 5 Jan 2018 23:04:14 +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 51D5A6416B; Fri, 5 Jan 2018 23:04:14 +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 w05N4DtF036646; Fri, 5 Jan 2018 23:04:13 GMT (envelope-from jkim@FreeBSD.org) Received: (from jkim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w05N4DhN036645; Fri, 5 Jan 2018 23:04:13 GMT (envelope-from jkim@FreeBSD.org) Message-Id: <201801052304.w05N4DhN036645@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:04:13 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r327604 - vendor-sys/acpica/20180105 X-SVN-Group: vendor-sys X-SVN-Commit-Author: jkim X-SVN-Commit-Paths: vendor-sys/acpica/20180105 X-SVN-Commit-Revision: 327604 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 05 Jan 2018 23:04:14 -0000 Author: jkim Date: Fri Jan 5 23:04:13 2018 New Revision: 327604 URL: https://svnweb.freebsd.org/changeset/base/327604 Log: Tag ACPICA 20180105. Added: vendor-sys/acpica/20180105/ - copied from r327603, vendor-sys/acpica/dist/ From owner-svn-src-all@freebsd.org Fri Jan 5 23:21:56 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 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-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" 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-all@freebsd.org Fri Jan 5 23:30:06 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 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-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" 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-all@freebsd.org Fri Jan 5 23:50:51 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 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-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" 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-all@freebsd.org Sat Jan 6 00:39:30 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id F1B65EAA506 for ; Sat, 6 Jan 2018 00:39:30 +0000 (UTC) (envelope-from steven@multiplay.co.uk) Received: from mail-wr0-x231.google.com (mail-wr0-x231.google.com [IPv6:2a00:1450:400c:c0c::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 7FE36681A4 for ; Sat, 6 Jan 2018 00:39:30 +0000 (UTC) (envelope-from steven@multiplay.co.uk) Received: by mail-wr0-x231.google.com with SMTP id l41so5669555wre.11 for ; Fri, 05 Jan 2018 16:39: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=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=TZ7/PbrcEt0xCTH5pM63YZbNy76oMK6rmlRu8Sxvp7ZzlEeQ5v0tj+BovLd+hOn1nx fDrYApF8xaIi7p31hhbKhQqV3LG7LNriZbWMc0OvDWYPw9hDnY7Shrm3Y/cRNCwEkMIZ PFJrOFaaNBY8D+r7LXN4YaACcVW8SJiEpGUdU8cIUwXsmoqx+vgZZLbTzF3eT+/sTHL4 JBb4iy0dC+x7mM9QwxEZwJEPo4/FGF8GlXugVbnr3kcEjd502w7JZ/B07Gs6pkhvKEsJ YCietYS6q38EXrAKLR8nck7bIaGWoARJ4OEK6L9wximieUpsluiQin+8zbxAtau8lQZX CvLA== X-Gm-Message-State: AKGB3mL6ao28JSjFvDXryS15aJsEJ/FDVSx2GcqtqypeuYrj8q0e+j4z eW4SsVdBpPJ1r1lI9CxNkA/cAg== 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-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" 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-all@freebsd.org Sat Jan 6 03:41:36 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 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-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" 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-all@freebsd.org Sat Jan 6 05:00:31 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id BA5F8EB9989; Sat, 6 Jan 2018 05:00:31 +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 94F6873743; Sat, 6 Jan 2018 05:00:31 +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 BBCE9ADFB; Sat, 6 Jan 2018 05:00:30 +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 w0650Uv2086713; Sat, 6 Jan 2018 05:00:30 GMT (envelope-from eadler@FreeBSD.org) Received: (from eadler@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w0650UPO086711; Sat, 6 Jan 2018 05:00:30 GMT (envelope-from eadler@FreeBSD.org) Message-Id: <201801060500.w0650UPO086711@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 05:00:30 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r327608 - stable/10 X-SVN-Group: stable-10 X-SVN-Commit-Author: eadler X-SVN-Commit-Paths: stable/10 X-SVN-Commit-Revision: 327608 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 06 Jan 2018 05:00:31 -0000 Author: eadler Date: Sat Jan 6 05:00:30 2018 New Revision: 327608 URL: https://svnweb.freebsd.org/changeset/base/327608 Log: MFC r327183: .git*: add gitattributes and gitignore For users of the git mirrors, lets provide useful git configuration files. Added: stable/10/.gitattributes - copied unchanged from r327183, head/.gitattributes stable/10/.gitignore - copied unchanged from r327183, head/.gitignore Modified: Directory Properties: stable/10/ (props changed) Copied: stable/10/.gitattributes (from r327183, head/.gitattributes) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/10/.gitattributes Sat Jan 6 05:00:30 2018 (r327608, copy of r327183, head/.gitattributes) @@ -0,0 +1,5 @@ +*.c diff=cpp +*.h diff=cpp +*.cpp diff=cpp +*.hpp diff=cpp +*.py diff=python Copied: stable/10/.gitignore (from r327183, head/.gitignore) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/10/.gitignore Sat Jan 6 05:00:30 2018 (r327608, copy of r327183, head/.gitignore) @@ -0,0 +1,18 @@ +_.tinderbox.* +_.amd64.* +_.arm.* +_.arm64.* +_.i386.* +_.ia64.* +_.mips.* +_.pc98.* +_.powerpc.* +_.riscv.* +_.sparc64.* +_.sun4v.* +GPATH +GRTAGS +GTAGS +ID +cscope.out +?cscope.out From owner-svn-src-all@freebsd.org Sat Jan 6 05:00:38 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 02833EB99E5; Sat, 6 Jan 2018 05:00:38 +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 D161373770; Sat, 6 Jan 2018 05:00:37 +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 039A7AE02; Sat, 6 Jan 2018 05:00: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 w0650aHO086761; Sat, 6 Jan 2018 05:00:36 GMT (envelope-from eadler@FreeBSD.org) Received: (from eadler@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w0650aqm086759; Sat, 6 Jan 2018 05:00:36 GMT (envelope-from eadler@FreeBSD.org) Message-Id: <201801060500.w0650aqm086759@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 05:00:36 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r327609 - stable/11 X-SVN-Group: stable-11 X-SVN-Commit-Author: eadler X-SVN-Commit-Paths: stable/11 X-SVN-Commit-Revision: 327609 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 06 Jan 2018 05:00:38 -0000 Author: eadler Date: Sat Jan 6 05:00:36 2018 New Revision: 327609 URL: https://svnweb.freebsd.org/changeset/base/327609 Log: MFC r327183: .git*: add gitattributes and gitignore For users of the git mirrors, lets provide useful git configuration files. Added: stable/11/.gitattributes - copied unchanged from r327183, head/.gitattributes stable/11/.gitignore - copied unchanged from r327183, head/.gitignore Modified: Directory Properties: stable/11/ (props changed) Copied: stable/11/.gitattributes (from r327183, head/.gitattributes) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/11/.gitattributes Sat Jan 6 05:00:36 2018 (r327609, copy of r327183, head/.gitattributes) @@ -0,0 +1,5 @@ +*.c diff=cpp +*.h diff=cpp +*.cpp diff=cpp +*.hpp diff=cpp +*.py diff=python Copied: stable/11/.gitignore (from r327183, head/.gitignore) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/11/.gitignore Sat Jan 6 05:00:36 2018 (r327609, copy of r327183, head/.gitignore) @@ -0,0 +1,18 @@ +_.tinderbox.* +_.amd64.* +_.arm.* +_.arm64.* +_.i386.* +_.ia64.* +_.mips.* +_.pc98.* +_.powerpc.* +_.riscv.* +_.sparc64.* +_.sun4v.* +GPATH +GRTAGS +GTAGS +ID +cscope.out +?cscope.out From owner-svn-src-all@freebsd.org Sat Jan 6 06:00:41 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 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-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" 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-all@freebsd.org Sat Jan 6 06:00:36 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 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-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" 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-all@freebsd.org Sat Jan 6 06:00:47 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 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-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" 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-all@freebsd.org Sat Jan 6 06:34:50 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 950DAEC3450; Sat, 6 Jan 2018 06:34:50 +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 7116B783DF; Sat, 6 Jan 2018 06:34:50 +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 B8B81BE46; Sat, 6 Jan 2018 06:34:49 +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 w066Yndv030135; Sat, 6 Jan 2018 06:34:49 GMT (envelope-from eadler@FreeBSD.org) Received: (from eadler@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w066Ynsc030134; Sat, 6 Jan 2018 06:34:49 GMT (envelope-from eadler@FreeBSD.org) Message-Id: <201801060634.w066Ynsc030134@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 06:34:49 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r327613 - stable/11/usr.bin/pathchk X-SVN-Group: stable-11 X-SVN-Commit-Author: eadler X-SVN-Commit-Paths: stable/11/usr.bin/pathchk X-SVN-Commit-Revision: 327613 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 06 Jan 2018 06:34:50 -0000 Author: eadler Date: Sat Jan 6 06:34:49 2018 New Revision: 327613 URL: https://svnweb.freebsd.org/changeset/base/327613 Log: MFC r302480: Add -P to pathchk usage Modified: stable/11/usr.bin/pathchk/pathchk.c Directory Properties: stable/11/ (props changed) Modified: stable/11/usr.bin/pathchk/pathchk.c ============================================================================== --- stable/11/usr.bin/pathchk/pathchk.c Sat Jan 6 06:00:45 2018 (r327612) +++ stable/11/usr.bin/pathchk/pathchk.c Sat Jan 6 06:34:49 2018 (r327613) @@ -89,7 +89,7 @@ static void usage(void) { - fprintf(stderr, "usage: pathchk [-p] pathname ...\n"); + fprintf(stderr, "usage: pathchk [-Pp] pathname ...\n"); exit(1); } From owner-svn-src-all@freebsd.org Sat Jan 6 07:02:25 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 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-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" 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-all@freebsd.org Sat Jan 6 07:05:10 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 55FEFEC4B25 for ; Sat, 6 Jan 2018 07:05:10 +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 0E7AF797FC for ; Sat, 6 Jan 2018 07:05:10 +0000 (UTC) (envelope-from lists@eitanadler.com) Received: by mail-yb0-x234.google.com with SMTP id s10so2696407ybl.7 for ; Fri, 05 Jan 2018 23:05:10 -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=WsQD9B0m1rY1nj7aX3imDCn6wXhGYJmJ8356uEt57w+9zCOjuOnGWqQKRG8F/MtlWA VZ4MGq+BSMqxOcEYmwnVWFiakjApSkoAD3lSSoZEffOidUx17+i3ejtuTIoXSR2JSzt8 u0LhyWL57rJuAw1RvA8Y1LNkskIPi+AiQt23EadNlpOlQdI34QoivV/4K6WTngpPLJ+/ Vv6Jcmg58Jq0OLmFtWfN60s75fc85NoVoAMs6aY8K4QsQBXFKpkbTLi6VYqEcw9ttfUR 6ZBGp712uFKF2dqduIOW3joOeDpLE1Z2E9UVrPxLyrg1uCitNNpC/90+aK/wodnsoQtz S8iw== X-Gm-Message-State: AKGB3mJ1Tu6NojhhkTSR+TocN1t+FFCrTUTY+nXgkX0/PU/lzYokCMNM H5pehwFHtQqz1KX42noSS6Pal3V/rjxAoxLqBwyr5JHu 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-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" 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-all@freebsd.org Sat Jan 6 07:48:18 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 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-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" 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-all@freebsd.org Sat Jan 6 09:48:05 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 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-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" 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-all@freebsd.org Sat Jan 6 12:34:05 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 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-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" 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-all@freebsd.org Sat Jan 6 12:46:00 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 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-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" 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-all@freebsd.org Sat Jan 6 12:46:05 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 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-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" 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-all@freebsd.org Sat Jan 6 13:20:23 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id EFEEDEB8FA1 for ; Sat, 6 Jan 2018 13:20:23 +0000 (UTC) (envelope-from lists@eitanadler.com) Received: from mail-yb0-x22d.google.com (mail-yb0-x22d.google.com [IPv6:2607:f8b0:4002: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 A9E746D44B for ; Sat, 6 Jan 2018 13:20:23 +0000 (UTC) (envelope-from lists@eitanadler.com) Received: by mail-yb0-x22d.google.com with SMTP id 129so2881414ybe.5 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=EA5bIRZ1q4esdxC5Twma2wuVYckcAF8bTeycYCp0yqP5j9vi/jzSgvH4ZUwWMROPPt IE1Ct7ZJnp1EQU1Xnzrs5FVunZF3zqPkTTsNyecWijICIrLxB6OyS+C5Na8WFJA5jMmg UNYUir6oliFxqpUkoqyfB9IMPP7oyU05AU/gKjgEvlOYXzKZXsCBGLFDw1VzMBh9DmB0 cj/jAon4Tu4Erl4/2FlUkVfdnhVNHTfpHg7iEmFiZoi0pzzV4zea2l7WiVFvEP+j+OM+ Z2Rf11yVABSDyat7Tkt3fTHztTg6Oij9Kg+xEKCN24hjKX2hbGhmwk4Y0ZmkW2sAnIVL VqxQ== X-Gm-Message-State: AKGB3mLeGIa2sdo2U/wz9CLQRvVlf3cAlo7PNNKy18CgVzgdglzsQory bty6eHzCYmdYejVxSLfvF64iV8sJ8/siL36WQx1lJB1m 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-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 06 Jan 2018 13:20:24 -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-all@freebsd.org Sat Jan 6 13:23:34 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 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-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" 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-all@freebsd.org Sat Jan 6 13:31:39 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 1340EEB97F8 for ; Sat, 6 Jan 2018 13:31:39 +0000 (UTC) (envelope-from lists@eitanadler.com) Received: from mail-yb0-x231.google.com (mail-yb0-x231.google.com [IPv6:2607:f8b0:4002: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 C05C66DD55 for ; Sat, 6 Jan 2018 13:31:38 +0000 (UTC) (envelope-from lists@eitanadler.com) Received: by mail-yb0-x231.google.com with SMTP id j197so1927207ybg.9 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=H8m838LUyOaj+yMfR0LVjrXtQz000WP474eVBe2XBLjbPBQFmfTx7UraBc+Gw1Vpcz YXaGUOAi8SFINk95pUc13PEsuhL56MrYRPuAMSPQvCqyxcDvSRMeIQ2viVAFLcnp3L7r bo9Wz1bCpUkdjlbdq1BNqqKl5n1lIVj8Nrrqm5CVt4yRmlSDQlh8QC9riM48oLODwWVa CDqzTXKcnj6CMXNul4we2qiFseBvDGCxA3mVUjDFaZ9cROjQ4YHCISogpo3tE2axFUOQ ure81T3IvS4LFW1odLhNR33xuWBEBtFpMA5ATdV7LHfKkqYtW7PptGgeGTdM9W1IFlm7 Ph5g== X-Gm-Message-State: AKGB3mKRMQymaGNCbqJcEL2Wd0EeF0Z7Y8h7K9nikNllXq6itda9h8No twAWG2scxTsJPZO+AmwiipLh58+n9q0gf8u+/a15NA== 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-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 06 Jan 2018 13:31:39 -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-all@freebsd.org Sat Jan 6 13:33:21 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id C6DB6EB9A51 for ; Sat, 6 Jan 2018 13:33:21 +0000 (UTC) (envelope-from shawn.webb@hardenedbsd.org) Received: from mail-lf0-x22f.google.com (mail-lf0-x22f.google.com [IPv6:2a00:1450:4010:c07::22f]) (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 42B7D6E056 for ; Sat, 6 Jan 2018 13:33:21 +0000 (UTC) (envelope-from shawn.webb@hardenedbsd.org) Received: by mail-lf0-x22f.google.com with SMTP id m8so1735507lfc.6 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=W4Yj4owx/f7AJzCxzMuE6Oh5Mihed+HHQNf0y7fFz24IvjTuGtA3owjGQmJb5yYmvQ CCp0VIrUjPTuunmUmT5TJdWIsryH8aaPTpWjIKFGJXmaBhL1iJ38mersGMeSTdb6mtKG v0Z/xxPQU3ycZLf5TC+XiqQ3FGOFi+HYfEguRmxailaSeE3LI3C3sc4oYHf7VN4l50R0 Ef53/pF5X5PjpckALTI/HoqOmIKA29HiAjRTp7BN/RxSAi4SPjHvAFFCyvS4CYfmRPpr UyK1USjvLJgUK6bLGhWWI0ixB7B2y+07E+Zbzc1S+3N7uhR+iY7sQyyUj8qU8+10U0UD s+dQ== X-Gm-Message-State: AKGB3mJiOKjGoozE2NSjZG8wq1sA0a/hZS5xz7v7RuYJXWx5np5oo7vf k+ZU3wueW0C/9VhVSAdUXuvTbQ== 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-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" 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-all@freebsd.org Sat Jan 6 13:34:54 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 037B0EB9B6C for ; Sat, 6 Jan 2018 13:34:54 +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 76D246E1D2 for ; Sat, 6 Jan 2018 13:34:53 +0000 (UTC) (envelope-from shawn.webb@hardenedbsd.org) Received: by mail-lf0-x234.google.com with SMTP id c19so7822557lfg.3 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=oyf9El7CsuOzH4nUFnKOmM5S9YmeL7l7u5srYLIyvKxpX2yuerMPm13bWwcc1WBnEC ZwLlec9ckizWW8OgbV7xiwp6duMZJ2weUjnV2tsg0ciQRZIyK69RyUmOh1XsVUnt8x3Q JIT85sywW/k1kybJzY2AU+U7F9eaI0RWamqHUHAw9yLO2hsipu8A21OugJ2AYD+Yyf9/ a+n2JeN9DGrGrp5s/i5OU7CWQ1qB46/gn9NQ/6YdAWDtj9vOltmU/3AqyddfW1CaEnln bYHxSfhGYmBQp2SvfepQHVs7OpcvOlN8Cwdw+n47vapPQirs6+R+AERTrZLMxM65Agrn UmJQ== X-Gm-Message-State: AKwxyteaXYaHmxubri0JYL5fRwNY+zB4MYJkiKOZTzXlf4JPxaFyBcHI 6hQSUIB2lDVoV/rFJZIbBwv4nA== 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-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" 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-all@freebsd.org Sat Jan 6 14:21:33 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 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-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" 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-all@freebsd.org Sat Jan 6 14:24:57 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 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-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" 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-all@freebsd.org Sat Jan 6 14:36:47 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 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-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" 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-all@freebsd.org Sat Jan 6 15:10:05 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 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-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" 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-all@freebsd.org Sat Jan 6 15:52:29 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 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-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" 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-all@freebsd.org Sat Jan 6 16:29:01 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 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-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" 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-all@freebsd.org Sat Jan 6 16:36:31 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 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-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" 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-all@freebsd.org Sat Jan 6 16:52:00 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 314C8EC19E9 for ; Sat, 6 Jan 2018 16:52:00 +0000 (UTC) (envelope-from lists@eitanadler.com) Received: from mail-yb0-x233.google.com (mail-yb0-x233.google.com [IPv6:2607:f8b0:4002:c09::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 E248B764EF for ; Sat, 6 Jan 2018 16:51:59 +0000 (UTC) (envelope-from lists@eitanadler.com) Received: by mail-yb0-x233.google.com with SMTP id 5so3005656ybp.4 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=UTP4Uy5LZkrNyIenQHUEFVd5/hE2eZbmasRTYReLBjTLV+Nl8+ep4jITbRdjo+PuXA GXz4jWFTnnL8xEFTsa9V7Hn7m6P2ZyPrBHoDC4lGQKb4PXVy1IVEb85kqf4ABLyAwBkA PSXr3WRomoDW11EZGse0ptH+tVmfKi0c3ybXMBh+TPCv7cYRL3WLW88rj212+m0gF4gB 3/sOX0qMsAX8hXCXqI1qju4OFN4hfL27zbcJf3dZuoL/8wXUIreqe4Z3l1dl5i0ViW9h hGozs5MDK9+7LIE03Ui+yZtg2DS4q/buKkXt0Ic9NBt2OvkuC/bnTquW1vxmqNQXC4eH 7K/w== X-Gm-Message-State: AKGB3mLWY6sWBOi1vxu4ZxO/AxFRL2/t/v8AoeZqyhwLJRks44hN5+ez 0DvCYB5jsvM4qkXJ0ZQ4v3rRf+R+Q4YxM9vdb2ZOeQ== 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-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" 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-all@freebsd.org Sat Jan 6 17:02:33 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 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-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" 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-all@freebsd.org Sat Jan 6 17:21:00 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 4E33FEC3126; Sat, 6 Jan 2018 17:21:00 +0000 (UTC) (envelope-from ian@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 2839B7797F; Sat, 6 Jan 2018 17:21:00 +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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 77538154E1; Sat, 6 Jan 2018 17:20:59 +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 w06HKx8g051233; Sat, 6 Jan 2018 17:20:59 GMT (envelope-from ian@FreeBSD.org) Received: (from ian@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w06HKxRS051229; Sat, 6 Jan 2018 17:20:59 GMT (envelope-from ian@FreeBSD.org) Message-Id: <201801061720.w06HKxRS051229@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ian set sender to ian@FreeBSD.org using -f From: Ian Lepore Date: Sat, 6 Jan 2018 17:20:59 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r327626 - in stable/11: share/man/man9 sys/kern sys/sys X-SVN-Group: stable-11 X-SVN-Commit-Author: ian X-SVN-Commit-Paths: in stable/11: share/man/man9 sys/kern sys/sys X-SVN-Commit-Revision: 327626 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 06 Jan 2018 17:21:00 -0000 Author: ian Date: Sat Jan 6 17:20:58 2018 New Revision: 327626 URL: https://svnweb.freebsd.org/changeset/base/327626 Log: MFC r324413, r324415 r324413: Restore the ability to deregister an eventhandler from within the callback. When the EVENTHANDLER(9) subsystem was created, it was a documented feature that an eventhandler callback function could safely deregister itself. In r200652 that feature was inadvertantly broken by adding drain-wait logic to eventhandler_deregister(), so that it would be safe to unload a module upon return from deregistering its event handlers. There are now 145 callers of EVENTHANDLER_DEREGISTER(), and it's likely many of them are depending on the drain-wait logic that has been in place for 8 years. So instead of creating a separate eventhandler_drain() and adding it to some or all of those 145 call sites, this creates a separate eventhandler_drain_nowait() function for the specific purpose of deregistering a callback from within the running callback. Differential Revision: https://reviews.freebsd.org/D12561 r324415: Add eventhandler notifications for newbus device attach/detach. The detach case is slightly complicated by the fact that some in-kernel consumers may want to know before a device detaches (so they can release related resources, stop using the device, etc), but the detach can fail. So there are pre- and post-detach notifications for those consumers who need to handle all cases. A couple salient comments from the review, they amount to some helpful documentation about these events, but there's currently no good place for such documentation... Note that in the current newbus locking model, DETACH_BEGIN and DETACH_COMPLETE/FAILED sequence of event handler invocation might interweave with other attach/detach events arbitrarily. The handlers should be prepared for such situations. Also should note that detach may be called after the parent bus knows the hardware has left the building. In-kernel consumers have to be prepared to cope with this race. Differential Revision: https://reviews.freebsd.org/D12557 Modified: stable/11/share/man/man9/EVENTHANDLER.9 stable/11/sys/kern/subr_bus.c stable/11/sys/kern/subr_eventhandler.c stable/11/sys/sys/eventhandler.h Directory Properties: stable/11/ (props changed) Modified: stable/11/share/man/man9/EVENTHANDLER.9 ============================================================================== --- stable/11/share/man/man9/EVENTHANDLER.9 Sat Jan 6 16:29:00 2018 (r327625) +++ stable/11/share/man/man9/EVENTHANDLER.9 Sat Jan 6 17:20:58 2018 (r327626) @@ -23,7 +23,7 @@ .\" SUCH DAMAGE. .\" $FreeBSD$ .\" -.Dd March 27, 2017 +.Dd October 1, 2017 .Dt EVENTHANDLER 9 .Os .Sh NAME @@ -37,6 +37,7 @@ .Ft eventhandler_tag .Fn EVENTHANDLER_REGISTER name func arg priority .Fn EVENTHANDLER_DEREGISTER name tag +.Fn EVENTHANDLER_DEREGISTER_NOWAIT name tag .Ft eventhandler_tag .Fo eventhandler_register .Fa "struct eventhandler_list *list" @@ -50,6 +51,11 @@ .Fa "struct eventhandler_list *list" .Fa "eventhandler_tag tag" .Fc +.Ft void +.Fo eventhandler_deregister_nowait +.Fa "struct eventhandler_list *list" +.Fa "eventhandler_tag tag" +.Fc .Ft "struct eventhandler_list *" .Fn eventhandler_find_list "const char *name" .Ft void @@ -121,6 +127,18 @@ This macro removes a previously registered callback as .Fa tag from the event handler named by argument .Fa name . +It waits until no threads are running handlers for this event before +returning, making it safe to unload a module immediately upon return +from this function. +.It Fn EVENTHANDLER_DEREGISTER_NOWAIT +This macro removes a previously registered callback associated with tag +.Fa tag +from the event handler named by argument +.Fa name . +Upon return, one or more threads could still be running the removed +function(s), but no new calls will be made. +To remove a handler function from within that function, use this +version of deregister, to avoid a deadlock. .It Fn EVENTHANDLER_INVOKE This macro is used to invoke all the callbacks associated with event handler @@ -176,6 +194,21 @@ that can later be used with .Fn eventhandler_deregister to remove the particular callback function. .It Fn eventhandler_deregister +The +.Fn eventhandler_deregister +function removes the callback associated with tag +.Fa tag +from the event handler list pointed to by +.Fa list . +If +.Fa tag +is +.Va NULL , +all callback functions for the event are removed. +This function will not return until all threads have exited from the +removed handler callback function(s). +This function is not safe to call from inside an event handler callback. +.It Fn eventhandler_deregister_nowait The .Fn eventhandler_deregister function removes the callback associated with tag Modified: stable/11/sys/kern/subr_bus.c ============================================================================== --- stable/11/sys/kern/subr_bus.c Sat Jan 6 16:29:00 2018 (r327625) +++ stable/11/sys/kern/subr_bus.c Sat Jan 6 17:20:58 2018 (r327626) @@ -2934,6 +2934,7 @@ device_attach(device_t dev) else dev->state = DS_ATTACHED; dev->flags &= ~DF_DONENOMATCH; + EVENTHANDLER_INVOKE(device_attach, dev); devadded(dev); return (0); } @@ -2967,8 +2968,13 @@ device_detach(device_t dev) if (dev->state != DS_ATTACHED) return (0); - if ((error = DEVICE_DETACH(dev)) != 0) + EVENTHANDLER_INVOKE(device_detach, dev, EVHDEV_DETACH_BEGIN); + if ((error = DEVICE_DETACH(dev)) != 0) { + EVENTHANDLER_INVOKE(device_detach, dev, EVHDEV_DETACH_FAILED); return (error); + } else { + EVENTHANDLER_INVOKE(device_detach, dev, EVHDEV_DETACH_COMPLETE); + } devremoved(dev); if (!device_is_quiet(dev)) device_printf(dev, "detached\n"); Modified: stable/11/sys/kern/subr_eventhandler.c ============================================================================== --- stable/11/sys/kern/subr_eventhandler.c Sat Jan 6 16:29:00 2018 (r327625) +++ stable/11/sys/kern/subr_eventhandler.c Sat Jan 6 17:20:58 2018 (r327626) @@ -180,8 +180,9 @@ vimage_eventhandler_register(struct eventhandler_list } #endif -void -eventhandler_deregister(struct eventhandler_list *list, eventhandler_tag tag) +static void +_eventhandler_deregister(struct eventhandler_list *list, eventhandler_tag tag, + bool wait) { struct eventhandler_entry *ep = tag; @@ -215,9 +216,24 @@ eventhandler_deregister(struct eventhandler_list *list ep->ee_priority = EHE_DEAD_PRIORITY; } } - while (list->el_runcount > 0) + while (wait && list->el_runcount > 0) mtx_sleep(list, &list->el_lock, 0, "evhrm", 0); EHL_UNLOCK(list); +} + +void +eventhandler_deregister(struct eventhandler_list *list, eventhandler_tag tag) +{ + + _eventhandler_deregister(list, tag, true); +} + +void +eventhandler_deregister_nowait(struct eventhandler_list *list, + eventhandler_tag tag) +{ + + _eventhandler_deregister(list, tag, false); } /* Modified: stable/11/sys/sys/eventhandler.h ============================================================================== --- stable/11/sys/sys/eventhandler.h Sat Jan 6 16:29:00 2018 (r327625) +++ stable/11/sys/sys/eventhandler.h Sat Jan 6 17:20:58 2018 (r327626) @@ -141,12 +141,21 @@ do { \ if ((_el = eventhandler_find_list(#name)) != NULL) \ eventhandler_deregister(_el, tag); \ } while(0) - +#define EVENTHANDLER_DEREGISTER_NOWAIT(name, tag) \ +do { \ + struct eventhandler_list *_el; \ + \ + if ((_el = eventhandler_find_list(#name)) != NULL) \ + eventhandler_deregister_nowait(_el, tag); \ +} while(0) + eventhandler_tag eventhandler_register(struct eventhandler_list *list, const char *name, void *func, void *arg, int priority); void eventhandler_deregister(struct eventhandler_list *list, eventhandler_tag tag); +void eventhandler_deregister_nowait(struct eventhandler_list *list, + eventhandler_tag tag); struct eventhandler_list *eventhandler_find_list(const char *name); void eventhandler_prune_list(struct eventhandler_list *list); @@ -276,5 +285,16 @@ struct ata_params; typedef void (*ada_probe_veto_fn)(void *, struct cam_path *, struct ata_params *, int *); EVENTHANDLER_DECLARE(ada_probe_veto, ada_probe_veto_fn); + +/* newbus device events */ +enum evhdev_detach { + EVHDEV_DETACH_BEGIN, /* Before detach() is called */ + EVHDEV_DETACH_COMPLETE, /* After detach() returns 0 */ + EVHDEV_DETACH_FAILED /* After detach() returns err */ +}; +typedef void (*device_attach_fn)(void *, device_t); +typedef void (*device_detach_fn)(void *, device_t, enum evhdev_detach); +EVENTHANDLER_DECLARE(device_attach, device_attach_fn); +EVENTHANDLER_DECLARE(device_detach, device_detach_fn); #endif /* _SYS_EVENTHANDLER_H_ */ From owner-svn-src-all@freebsd.org Sat Jan 6 18:15:51 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 9763DEC5024 for ; Sat, 6 Jan 2018 18:15:51 +0000 (UTC) (envelope-from lists@eitanadler.com) Received: from mail-yw0-x22d.google.com (mail-yw0-x22d.google.com [IPv6:2607:f8b0:4002:c05::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 53584794CF for ; Sat, 6 Jan 2018 18:15:51 +0000 (UTC) (envelope-from lists@eitanadler.com) Received: by mail-yw0-x22d.google.com with SMTP id r205so2935574ywb.3 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=Xn+wehluiiMmBlK7RwD0JY8k+wdTaZjh8eQ3uon541zLM0jsEuNbXCs7P4SnbqHmo8 AvZzvtXfi3OZ4T9PVImjljQ8NJfuWfD3LgnNe899hx6oe+vQGZoxQbb1mbZJgRQhXcrh rD4s6LkGtTIcYk3Q+2YYtvJr3TJ0BzkwDhx1nRdzdVqlssHGMw/IrWv2M40b0A4znNzP NasIGkzyx4yhcDKEYADFIa+cNfu0mvHDBqiHai3QT8V6HWqxk3lNbm+9ZKRvNUYzCVPx GJEzJwOe4JA/NSWP47Fg8qRyvzn71h4Gf4lvmUhcKyxi7u19djfN0cxohXIbQUVjTgqx +kpg== X-Gm-Message-State: AKGB3mK84NLdfmRlbJetYMlid66UznD98MAzNdq4lsF8txNWTRiCI2cu i0CAL1s2R9Cr7+DTuE4AoqLfyrlT4rP3gqANYyStPw== 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-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" 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-all@freebsd.org Sat Jan 6 18:42:01 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 41B70EC5EB6; Sat, 6 Jan 2018 18:42:01 +0000 (UTC) (envelope-from dim@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 1BB6F7A22E; Sat, 6 Jan 2018 18:42:01 +0000 (UTC) (envelope-from dim@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 46E6416306; Sat, 6 Jan 2018 18:42:00 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w06Ig0TA087249; Sat, 6 Jan 2018 18:42:00 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w06Ig0JK087248; Sat, 6 Jan 2018 18:42:00 GMT (envelope-from dim@FreeBSD.org) Message-Id: <201801061842.w06Ig0JK087248@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Sat, 6 Jan 2018 18:42:00 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r327627 - vendor/llvm/dist-release_60 X-SVN-Group: vendor X-SVN-Commit-Author: dim X-SVN-Commit-Paths: vendor/llvm/dist-release_60 X-SVN-Commit-Revision: 327627 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 06 Jan 2018 18:42:01 -0000 Author: dim Date: Sat Jan 6 18:41:59 2018 New Revision: 327627 URL: https://svnweb.freebsd.org/changeset/base/327627 Log: Branch vendor/llvm/dist to vendor/llvm/dist-release_60, to allow for independent merges of the upstream trunk and release_60 branches. Added: vendor/llvm/dist-release_60/ - copied from r327626, vendor/llvm/dist/ From owner-svn-src-all@freebsd.org Sat Jan 6 18:42:04 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 1B115EC5EDC; Sat, 6 Jan 2018 18:42:04 +0000 (UTC) (envelope-from dim@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 E85237A241; Sat, 6 Jan 2018 18:42:03 +0000 (UTC) (envelope-from dim@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 1C6521630C; Sat, 6 Jan 2018 18:42:03 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w06Ig2UB087298; Sat, 6 Jan 2018 18:42:02 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w06Ig2k0087297; Sat, 6 Jan 2018 18:42:02 GMT (envelope-from dim@FreeBSD.org) Message-Id: <201801061842.w06Ig2k0087297@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Sat, 6 Jan 2018 18:42:02 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r327628 - vendor/clang/dist-release_60 X-SVN-Group: vendor X-SVN-Commit-Author: dim X-SVN-Commit-Paths: vendor/clang/dist-release_60 X-SVN-Commit-Revision: 327628 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 06 Jan 2018 18:42:04 -0000 Author: dim Date: Sat Jan 6 18:42:02 2018 New Revision: 327628 URL: https://svnweb.freebsd.org/changeset/base/327628 Log: Branch vendor/clang/dist to vendor/clang/dist-release_60, to allow for independent merges of the upstream trunk and release_60 branches. Added: vendor/clang/dist-release_60/ - copied from r327627, vendor/clang/dist/ From owner-svn-src-all@freebsd.org Sat Jan 6 18:42:09 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 043C4EC5F11; Sat, 6 Jan 2018 18:42:09 +0000 (UTC) (envelope-from dim@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 D2B767A2A3; Sat, 6 Jan 2018 18:42:08 +0000 (UTC) (envelope-from dim@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 005BE1630F; Sat, 6 Jan 2018 18:42:08 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w06Ig77n087344; Sat, 6 Jan 2018 18:42:07 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w06Ig7cZ087343; Sat, 6 Jan 2018 18:42:07 GMT (envelope-from dim@FreeBSD.org) Message-Id: <201801061842.w06Ig7cZ087343@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Sat, 6 Jan 2018 18:42:07 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r327629 - vendor/compiler-rt/dist-release_60 X-SVN-Group: vendor X-SVN-Commit-Author: dim X-SVN-Commit-Paths: vendor/compiler-rt/dist-release_60 X-SVN-Commit-Revision: 327629 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 06 Jan 2018 18:42:09 -0000 Author: dim Date: Sat Jan 6 18:42:07 2018 New Revision: 327629 URL: https://svnweb.freebsd.org/changeset/base/327629 Log: Branch vendor/compiler-rt/dist to vendor/compiler-rt/dist-release_60, to allow for independent merges of the upstream trunk and release_60 branches. Added: vendor/compiler-rt/dist-release_60/ - copied from r327628, vendor/compiler-rt/dist/ From owner-svn-src-all@freebsd.org Sat Jan 6 18:42:14 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 40F19EC5F35; Sat, 6 Jan 2018 18:42:14 +0000 (UTC) (envelope-from dim@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 7677A7A341; Sat, 6 Jan 2018 18:42:12 +0000 (UTC) (envelope-from dim@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 E8E2F16313; Sat, 6 Jan 2018 18:42:10 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w06IgA47087393; Sat, 6 Jan 2018 18:42:10 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w06IgAE4087392; Sat, 6 Jan 2018 18:42:10 GMT (envelope-from dim@FreeBSD.org) Message-Id: <201801061842.w06IgAE4087392@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Sat, 6 Jan 2018 18:42:10 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r327630 - vendor/libc++/dist-release_60 X-SVN-Group: vendor X-SVN-Commit-Author: dim X-SVN-Commit-Paths: vendor/libc++/dist-release_60 X-SVN-Commit-Revision: 327630 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 06 Jan 2018 18:42:14 -0000 Author: dim Date: Sat Jan 6 18:42:10 2018 New Revision: 327630 URL: https://svnweb.freebsd.org/changeset/base/327630 Log: Branch vendor/libc++/dist to vendor/libc++/dist-release_60, to allow for independent merges of the upstream trunk and release_60 branches. Added: vendor/libc++/dist-release_60/ - copied from r327629, vendor/libc++/dist/ From owner-svn-src-all@freebsd.org Sat Jan 6 18:42:21 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 6918FEC5F99; Sat, 6 Jan 2018 18:42:21 +0000 (UTC) (envelope-from dim@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 1A48F7A496; Sat, 6 Jan 2018 18:42:19 +0000 (UTC) (envelope-from dim@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 4B5B816321; Sat, 6 Jan 2018 18:42:18 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w06IgIgJ087487; Sat, 6 Jan 2018 18:42:18 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w06IgIx6087486; Sat, 6 Jan 2018 18:42:18 GMT (envelope-from dim@FreeBSD.org) Message-Id: <201801061842.w06IgIx6087486@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Sat, 6 Jan 2018 18:42:18 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r327632 - vendor/lldb/dist-release_60 X-SVN-Group: vendor X-SVN-Commit-Author: dim X-SVN-Commit-Paths: vendor/lldb/dist-release_60 X-SVN-Commit-Revision: 327632 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 06 Jan 2018 18:42:21 -0000 Author: dim Date: Sat Jan 6 18:42:17 2018 New Revision: 327632 URL: https://svnweb.freebsd.org/changeset/base/327632 Log: Branch vendor/lldb/dist to vendor/lldb/dist-release_60, to allow for independent merges of the upstream trunk and release_60 branches. Added: vendor/lldb/dist-release_60/ - copied from r327631, vendor/lldb/dist/ From owner-svn-src-all@freebsd.org Sat Jan 6 18:42:18 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id DC6DAEC5F84; Sat, 6 Jan 2018 18:42:18 +0000 (UTC) (envelope-from dim@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 C92917A40D; Sat, 6 Jan 2018 18:42:16 +0000 (UTC) (envelope-from dim@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 5811C1631C; Sat, 6 Jan 2018 18:42:15 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w06IgFut087439; Sat, 6 Jan 2018 18:42:15 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w06IgFU2087438; Sat, 6 Jan 2018 18:42:15 GMT (envelope-from dim@FreeBSD.org) Message-Id: <201801061842.w06IgFU2087438@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Sat, 6 Jan 2018 18:42:15 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r327631 - vendor/lld/dist-release_60 X-SVN-Group: vendor X-SVN-Commit-Author: dim X-SVN-Commit-Paths: vendor/lld/dist-release_60 X-SVN-Commit-Revision: 327631 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 06 Jan 2018 18:42:19 -0000 Author: dim Date: Sat Jan 6 18:42:15 2018 New Revision: 327631 URL: https://svnweb.freebsd.org/changeset/base/327631 Log: Branch vendor/lld/dist to vendor/lld/dist-release_60, to allow for independent merges of the upstream trunk and release_60 branches. Added: vendor/lld/dist-release_60/ - copied from r327630, vendor/lld/dist/ From owner-svn-src-all@freebsd.org Sat Jan 6 19:24:50 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id B9EC3EC7930; Sat, 6 Jan 2018 19:24:50 +0000 (UTC) (envelope-from ian@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 959CC7BDA1; Sat, 6 Jan 2018 19:24:50 +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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id D7598169C8; Sat, 6 Jan 2018 19:24:49 +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 w06JOn5h004255; Sat, 6 Jan 2018 19:24:49 GMT (envelope-from ian@FreeBSD.org) Received: (from ian@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w06JOnlF004254; Sat, 6 Jan 2018 19:24:49 GMT (envelope-from ian@FreeBSD.org) Message-Id: <201801061924.w06JOnlF004254@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ian set sender to ian@FreeBSD.org using -f From: Ian Lepore Date: Sat, 6 Jan 2018 19:24:49 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r327633 - stable/11/sys/arm/freescale/imx X-SVN-Group: stable-11 X-SVN-Commit-Author: ian X-SVN-Commit-Paths: stable/11/sys/arm/freescale/imx X-SVN-Commit-Revision: 327633 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 06 Jan 2018 19:24:50 -0000 Author: ian Date: Sat Jan 6 19:24:49 2018 New Revision: 327633 URL: https://svnweb.freebsd.org/changeset/base/327633 Log: Fix imx6 hdmi init after r323553. This is a direct commit to 11-stable because major architectural changes in 12 prevent a direct MFC of the affected code. Conceptually, this is... MFC r324416: Fix imx6 hdmi init after r323553, which used a config_intrhook to defer the attachment of i2c devices needed by hdmi. The hdmi init also uses an intrhook callback to defer initialization, and if the hdmi callback runs first, the i2c devices will not yet have registered their device_t in association with their FDT phandle, which allows cross- device references on FDT systems. Now the hdmi deferred init checks for the i2c device registration, and if it's not complete yet, it registers as an eventhandler watching for newbus attach events. When the i2c device eventually attaches, the hdmi driver unregisters from watching further events, and continues with the hdmi init. Because the function signatures for an intrhook callback and an event handler callback are the same, a single function is used for both callbacks. Reported by: Russell Haley Modified: stable/11/sys/arm/freescale/imx/imx6_hdmi.c Modified: stable/11/sys/arm/freescale/imx/imx6_hdmi.c ============================================================================== --- stable/11/sys/arm/freescale/imx/imx6_hdmi.c Sat Jan 6 18:42:17 2018 (r327632) +++ stable/11/sys/arm/freescale/imx/imx6_hdmi.c Sat Jan 6 19:24:49 2018 (r327633) @@ -63,11 +63,11 @@ struct imx_hdmi_softc { device_t sc_dev; struct resource *sc_mem_res; int sc_mem_rid; - struct intr_config_hook sc_mode_hook; struct videomode sc_mode; uint8_t *sc_edid; uint8_t sc_edid_len; phandle_t sc_i2c_xref; + eventhandler_tag eh_tag; }; static struct ofw_compat_data compat_data[] = { @@ -626,15 +626,51 @@ hdmi_edid_read(struct imx_hdmi_softc *sc, uint8_t **ed return (result); } +/* + * Deferred HDMI init. dwc_hdmi_init() does i2c transfers for DDC/EDID. The imx + * i2c devices also use a config_intrhook function to finish their init, because + * they require interrupts to perform transfers. There is no way to control + * whether the i2c or our hdmi intrhook function runs first. If we go first we + * have to continue waiting until after the i2c driver is ready to do transfers + * and has registered its phandle. + * + * This function is used as both a config_intrhook function and after that as an + * eventhandler callback function (if necessary), to see if our i2c device is + * ready yet. When it is, continue with hdmi init. When first called as an + * intrhook function the i2c devices might be ready, in which case we never + * register as an eventhandler at all. Otherwise we register to see newbus + * attach events, and as each device attaches we check to see whether it was the + * i2c device we care about. Once we have our i2c device we unregister from + * seeing further attach events. + */ static void -imx_hdmi_detect_cable(void *arg) +imx_hdmi_init(void *dev) { struct imx_hdmi_softc *sc; - sc = arg; - EVENTHANDLER_INVOKE(hdmi_event, sc->sc_dev, HDMI_EVENT_CONNECTED); - /* Finished with the interrupt hook */ - config_intrhook_disestablish(&sc->sc_mode_hook); + sc = device_get_softc((device_t)dev); + + if (OF_device_from_xref(sc->sc_i2c_xref) != NULL) { + if (sc->eh_tag != NULL) { + EVENTHANDLER_DEREGISTER_NOWAIT(device_attach, + sc->eh_tag); + } + WR1(sc, HDMI_PHY_POL0, HDMI_PHY_HPD); + WR1(sc, HDMI_IH_PHY_STAT0, HDMI_IH_PHY_STAT0_HPD); + if ((RD1(sc, HDMI_IH_PHY_STAT0) & HDMI_IH_PHY_STAT0_HPD) != 0) { + EVENTHANDLER_INVOKE(hdmi_event, sc->sc_dev, + HDMI_EVENT_CONNECTED); + } + return; + } + + if (bootverbose) + device_printf((device_t)dev, "Waiting for DDC i2c device\n"); + + if (sc->eh_tag == NULL) { + sc->eh_tag = EVENTHANDLER_REGISTER(device_attach, + imx_hdmi_init, dev, EVENTHANDLER_PRI_ANY); + } } static int @@ -673,14 +709,6 @@ imx_hdmi_attach(device_t dev) goto out; } - sc->sc_mode_hook.ich_func = imx_hdmi_detect_cable; - sc->sc_mode_hook.ich_arg = sc; - - if (config_intrhook_establish(&sc->sc_mode_hook) != 0) { - err = ENOMEM; - goto out; - } - node = ofw_bus_get_node(dev); if (OF_getencprop(node, "ddc-i2c-bus", &i2c_xref, sizeof(i2c_xref)) == -1) sc->sc_i2c_xref = 0; @@ -702,8 +730,8 @@ imx_hdmi_attach(device_t dev) gpr3 |= IOMUXC_GPR3_HDMI_IPU1_DI0; imx_iomux_gpr_set(IOMUXC_GPR3, gpr3); - WR1(sc, HDMI_PHY_POL0, HDMI_PHY_HPD); - WR1(sc, HDMI_IH_PHY_STAT0, HDMI_IH_PHY_STAT0_HPD); + /* Further HDMI init requires interrupts for i2c transfers. */ + config_intrhook_oneshot(imx_hdmi_init, dev); out: From owner-svn-src-all@freebsd.org Sat Jan 6 20:22:34 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 1F518DDB530; Sat, 6 Jan 2018 20:22:34 +0000 (UTC) (envelope-from bryanv@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 ED6497DE9A; Sat, 6 Jan 2018 20:22:33 +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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 36131173AC; Sat, 6 Jan 2018 20:22:33 +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 w06KMXfk029468; Sat, 6 Jan 2018 20:22:33 GMT (envelope-from bryanv@FreeBSD.org) Received: (from bryanv@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w06KMXP1029467; Sat, 6 Jan 2018 20:22:33 GMT (envelope-from bryanv@FreeBSD.org) Message-Id: <201801062022.w06KMXP1029467@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bryanv set sender to bryanv@FreeBSD.org using -f From: Bryan Venteicher Date: Sat, 6 Jan 2018 20:22:33 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r327635 - stable/11/sbin/ifconfig X-SVN-Group: stable-11 X-SVN-Commit-Author: bryanv X-SVN-Commit-Paths: stable/11/sbin/ifconfig X-SVN-Commit-Revision: 327635 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 06 Jan 2018 20:22:34 -0000 Author: bryanv Date: Sat Jan 6 20:22:32 2018 New Revision: 327635 URL: https://svnweb.freebsd.org/changeset/base/327635 Log: MFC r326654: Use consistent name for the vxlan VNI parameter name and provide shorthand Modified: stable/11/sbin/ifconfig/ifvxlan.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sbin/ifconfig/ifvxlan.c ============================================================================== --- stable/11/sbin/ifconfig/ifvxlan.c Sat Jan 6 19:36:29 2018 (r327634) +++ stable/11/sbin/ifconfig/ifvxlan.c Sat Jan 6 20:22:32 2018 (r327635) @@ -594,6 +594,7 @@ setvxlan_flush(const char *val, int d, int s, const st static struct cmd vxlan_cmds[] = { + DEF_CLONE_CMD_ARG("vni", setvxlan_vni), DEF_CLONE_CMD_ARG("vxlanid", setvxlan_vni), DEF_CLONE_CMD_ARG("vxlanlocal", setvxlan_local), DEF_CLONE_CMD_ARG("vxlanremote", setvxlan_remote), @@ -608,7 +609,8 @@ static struct cmd vxlan_cmds[] = { DEF_CLONE_CMD("vxlanlearn", 1, setvxlan_learn), DEF_CLONE_CMD("-vxlanlearn", 0, setvxlan_learn), - DEF_CMD_ARG("vxlanvni", setvxlan_vni), + DEF_CMD_ARG("vni", setvxlan_vni), + DEF_CMD_ARG("vxlanid", setvxlan_vni), DEF_CMD_ARG("vxlanlocal", setvxlan_local), DEF_CMD_ARG("vxlanremote", setvxlan_remote), DEF_CMD_ARG("vxlangroup", setvxlan_group), From owner-svn-src-all@freebsd.org Sat Jan 6 20:32:15 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 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-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" 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-all@freebsd.org Sat Jan 6 20:52:31 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id EF5BADEF025; Sat, 6 Jan 2018 20:52:31 +0000 (UTC) (envelope-from ian@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 CAA037F156; Sat, 6 Jan 2018 20:52:31 +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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id EFE4D17892; Sat, 6 Jan 2018 20:52:30 +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 w06KqUnq041939; Sat, 6 Jan 2018 20:52:30 GMT (envelope-from ian@FreeBSD.org) Received: (from ian@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w06KqUDd041938; Sat, 6 Jan 2018 20:52:30 GMT (envelope-from ian@FreeBSD.org) Message-Id: <201801062052.w06KqUDd041938@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ian set sender to ian@FreeBSD.org using -f From: Ian Lepore Date: Sat, 6 Jan 2018 20:52:30 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r327637 - stable/11/sys/sys X-SVN-Group: stable-11 X-SVN-Commit-Author: ian X-SVN-Commit-Paths: stable/11/sys/sys X-SVN-Commit-Revision: 327637 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 06 Jan 2018 20:52:32 -0000 Author: ian Date: Sat Jan 6 20:52:30 2018 New Revision: 327637 URL: https://svnweb.freebsd.org/changeset/base/327637 Log: MFC r325060: Add a #define RESOURCE_SPEC_END. Similar to DEVMETHOD_END and KOBJMETHOD_END, this is to serve as the end marker in an array of resource_spec structures. Modified: stable/11/sys/sys/bus.h Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/sys/bus.h ============================================================================== --- stable/11/sys/sys/bus.h Sat Jan 6 20:32:14 2018 (r327636) +++ stable/11/sys/sys/bus.h Sat Jan 6 20:52:30 2018 (r327637) @@ -491,6 +491,7 @@ struct resource_spec { int rid; int flags; }; +#define RESOURCE_SPEC_END {-1, 0, 0} int bus_alloc_resources(device_t dev, struct resource_spec *rs, struct resource **res); From owner-svn-src-all@freebsd.org Sat Jan 6 21:19:53 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id EA83BDF0617; Sat, 6 Jan 2018 21:19:53 +0000 (UTC) (envelope-from ian@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 B665780025; Sat, 6 Jan 2018 21:19: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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 09C2017BDA; Sat, 6 Jan 2018 21:19:53 +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 w06LJrDQ050562; Sat, 6 Jan 2018 21:19:53 GMT (envelope-from ian@FreeBSD.org) Received: (from ian@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w06LJqLi050559; Sat, 6 Jan 2018 21:19:52 GMT (envelope-from ian@FreeBSD.org) Message-Id: <201801062119.w06LJqLi050559@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ian set sender to ian@FreeBSD.org using -f From: Ian Lepore Date: Sat, 6 Jan 2018 21:19:52 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r327638 - in stable/11/sys/dev: ffec sdhci X-SVN-Group: stable-11 X-SVN-Commit-Author: ian X-SVN-Commit-Paths: in stable/11/sys/dev: ffec sdhci X-SVN-Commit-Revision: 327638 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 06 Jan 2018 21:19:54 -0000 Author: ian Date: Sat Jan 6 21:19:52 2018 New Revision: 327638 URL: https://svnweb.freebsd.org/changeset/base/327638 Log: MFC r325045, r325054-r325056, r325061, r325063, r325065 r325045: Actually release resources in detach() rather than just returning EBUSY. This will enable use of 'devctl disable', allow creation of a module, etc. r325054: Increase the alignment of the rx/tx descriptor ring buffers to 64 bytes. 16 was the correct alignment for older hardware, but the imx7 requires 64-byte alignment, which is a fine value to use on all systems. PR: 222634 Submitted by: sebastian.huber@embedded-brains.de r325055: Add FECFLAG_AVB variant flag to support new features on imx7. This flag is analogous to the Linux driver FEC_QUIRK_HAS_AVB. It indicates an FEC with support for Audio Video Bridging (AVB). This indicator is used for various other parts in the Linux driver (drivers/net/ethernet/freescale/fec_main.c). Use it to customize the receive/transmit buffer alignment. The receive buffer alignment increased to 64-bytes on the i.MX 6SoloX and i.MX 7Dual. There are no hard alignment restrictions for transmit buffers on these chips. Fix the ffec_softc::fectype type to provide enough storage for the feature flags. PR: 222634 Submitted by: sebastian.huber@embedded-brains.de r325056: Avoid AXI bus issues due to a MAC reset on imx6sx and imx7. When the FEC is connected to the AXI bus (indicated by AVB flag), a MAC reset while a bus transaction is pending can hang the bus. Instead of resetting, turn off the ENABLE bit, which allows the hardware to complete any in-progress transfers (appending a bad CRC to any partial packet) and release the AXI bus. This could probably be done unconditionally for all hardware variants, but that hasn't been tested. PR: 222634 Submitted by: sebastian.huber@embedded-brains.de r325061: Support up to 3 IRQs in the ffec driver. Newer hardware splits the interrupts onto 3 different irq lines, but the docs barely mention that there are multiple interrupts, and do not detail how they're split up. The code now supports 1-3 irqs, and uses the same interrupt service routine to handle all of them. I modified the submitted changes to use bus_alloc_resources() instead of using loops to allocate each irq separately. Thus, blame any bugs on me (I can't actually test on imx7 hardware). PR: 222634 Submitted by: sebastian.huber@embedded-brains.de r325063: Use the 16-bit receive shift feature in ffec hardware that supports it. When available, enabling this feature causes the hardware to write data to the receive buffer starting at a 16-bit offset from the start address. This eliminates the need to copy the data after receiving to re-align the protocol headers to a 32-bit boundary. PR: 222634 Submitted by: sebastian.huber@embedded-brains.de r325065: Split the hardware type enum and the hw feature flags bits into separate fields in the softc; they're ORed together in the ofw_compat_data. I already caught myself doing 'sc->fectype == ' without masking out the feature bits in one place, and that's sure to happen again. Glomming them together is convenient for storing them in the ofw_compat_data array, but there's no reason to keep them together in the softc. Modified: stable/11/sys/dev/ffec/if_ffec.c stable/11/sys/dev/ffec/if_ffecreg.h stable/11/sys/dev/sdhci/fsl_sdhci.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/dev/ffec/if_ffec.c ============================================================================== --- stable/11/sys/dev/ffec/if_ffec.c Sat Jan 6 20:52:30 2018 (r327637) +++ stable/11/sys/dev/ffec/if_ffec.c Sat Jan 6 21:19:52 2018 (r327638) @@ -97,16 +97,21 @@ enum { FECTYPE_NONE, FECTYPE_GENERIC, FECTYPE_IMX53, - FECTYPE_IMX6, + FECTYPE_IMX6, /* imx6 and imx7 */ FECTYPE_MVF, }; /* * Flags that describe general differences between the FEC hardware in various - * SoCs. These are ORed into the FECTYPE enum values. + * SoCs. These are ORed into the FECTYPE enum values in the ofw_compat_data, so + * the low 8 bits are reserved for the type enum. In the softc, the type and + * flags are put into separate members, so that you don't need to mask the flags + * out of the type to compare it. */ -#define FECTYPE_MASK 0x0000ffff -#define FECFLAG_GBE (0x0001 << 16) +#define FECTYPE_MASK 0x000000ff +#define FECFLAG_GBE (1 << 8) +#define FECFLAG_AVB (1 << 9) +#define FECFLAG_RACC (1 << 10) /* * Table of supported FDT compat strings and their associated FECTYPE values. @@ -114,9 +119,11 @@ enum { static struct ofw_compat_data compat_data[] = { {"fsl,imx51-fec", FECTYPE_GENERIC}, {"fsl,imx53-fec", FECTYPE_IMX53}, - {"fsl,imx6q-fec", FECTYPE_IMX6 | FECFLAG_GBE}, - {"fsl,imx6ul-fec", FECTYPE_IMX6}, - {"fsl,mvf600-fec", FECTYPE_MVF}, + {"fsl,imx6q-fec", FECTYPE_IMX6 | FECFLAG_RACC | FECFLAG_GBE }, + {"fsl,imx6ul-fec", FECTYPE_IMX6 | FECFLAG_RACC }, + {"fsl,imx7d-fec", FECTYPE_IMX6 | FECFLAG_RACC | FECFLAG_GBE | + FECFLAG_AVB }, + {"fsl,mvf600-fec", FECTYPE_MVF | FECFLAG_RACC }, {"fsl,mvf-fec", FECTYPE_MVF}, {NULL, FECTYPE_NONE}, }; @@ -131,6 +138,8 @@ static struct ofw_compat_data compat_data[] = { #define WATCHDOG_TIMEOUT_SECS 5 +#define MAX_IRQ_COUNT 3 + struct ffec_bufmap { struct mbuf *mbuf; bus_dmamap_t map; @@ -143,16 +152,19 @@ struct ffec_softc { struct ifnet *ifp; int if_flags; struct mtx mtx; - struct resource *irq_res; + struct resource *irq_res[MAX_IRQ_COUNT]; struct resource *mem_res; - void * intr_cookie; + void * intr_cookie[MAX_IRQ_COUNT]; struct callout ffec_callout; mii_contype_t phy_conn_type; + uint32_t fecflags; uint8_t fectype; boolean_t link_is_up; boolean_t is_attached; boolean_t is_detaching; int tx_watchdog_count; + int rxbuf_align; + int txbuf_align; bus_dma_tag_t rxdesc_tag; bus_dmamap_t rxdesc_map; @@ -173,6 +185,13 @@ struct ffec_softc { int txcount; }; +static struct resource_spec irq_res_spec[MAX_IRQ_COUNT + 1] = { + { SYS_RES_IRQ, 0, RF_ACTIVE }, + { SYS_RES_IRQ, 1, RF_ACTIVE | RF_OPTIONAL }, + { SYS_RES_IRQ, 2, RF_ACTIVE | RF_OPTIONAL }, + RESOURCE_SPEC_END +}; + #define FFEC_LOCK(sc) mtx_lock(&(sc)->mtx) #define FFEC_UNLOCK(sc) mtx_unlock(&(sc)->mtx) #define FFEC_LOCK_INIT(sc) mtx_init(&(sc)->mtx, \ @@ -246,7 +265,7 @@ ffec_miigasket_setup(struct ffec_softc *sc) * We only need the gasket for MII and RMII connections on certain SoCs. */ - switch (sc->fectype & FECTYPE_MASK) + switch (sc->fectype) { case FECTYPE_IMX53: break; @@ -747,14 +766,17 @@ ffec_setup_rxbuf(struct ffec_softc *sc, int idx, struc int error, nsegs; struct bus_dma_segment seg; - /* - * We need to leave at least ETHER_ALIGN bytes free at the beginning of - * the buffer to allow the data to be re-aligned after receiving it (by - * copying it backwards ETHER_ALIGN bytes in the same buffer). We also - * have to ensure that the beginning of the buffer is aligned to the - * hardware's requirements. - */ - m_adj(m, roundup(ETHER_ALIGN, FEC_RXBUF_ALIGN)); + if (!(sc->fecflags & FECFLAG_RACC)) { + /* + * The RACC[SHIFT16] feature is not available. So, we need to + * leave at least ETHER_ALIGN bytes free at the beginning of the + * buffer to allow the data to be re-aligned after receiving it + * (by copying it backwards ETHER_ALIGN bytes in the same + * buffer). We also have to ensure that the beginning of the + * buffer is aligned to the hardware's requirements. + */ + m_adj(m, roundup(ETHER_ALIGN, sc->rxbuf_align)); + } error = bus_dmamap_load_mbuf_sg(sc->rxbuf_tag, sc->rxbuf_map[idx].map, m, &seg, &nsegs, 0); @@ -802,23 +824,6 @@ ffec_rxfinish_onebuf(struct ffec_softc *sc, int len) return; } - /* - * Unfortunately, the protocol headers need to be aligned on a 32-bit - * boundary for the upper layers. The hardware requires receive - * buffers to be 16-byte aligned. The ethernet header is 14 bytes, - * leaving the protocol header unaligned. We used m_adj() after - * allocating the buffer to leave empty space at the start of the - * buffer, now we'll use the alignment agnostic bcopy() routine to - * shuffle all the data backwards 2 bytes and adjust m_data. - * - * XXX imx6 hardware is able to do this 2-byte alignment by setting the - * SHIFT16 bit in the RACC register. Older hardware doesn't have that - * feature, but for them could we speed this up by copying just the - * protocol headers into their own small mbuf then chaining the cluster - * to it? That way we'd only need to copy like 64 bytes or whatever - * the biggest header is, instead of the whole 1530ish-byte frame. - */ - FFEC_UNLOCK(sc); bmap = &sc->rxbuf_map[sc->rx_idx]; @@ -831,10 +836,24 @@ ffec_rxfinish_onebuf(struct ffec_softc *sc, int len) m->m_pkthdr.len = len; m->m_pkthdr.rcvif = sc->ifp; - src = mtod(m, uint8_t*); - dst = src - ETHER_ALIGN; - bcopy(src, dst, len); - m->m_data = dst; + /* + * Align the protocol headers in the receive buffer on a 32-bit + * boundary. Newer hardware does the alignment for us. On hardware + * that doesn't support this feature, we have to copy-align the data. + * + * XXX for older hardware, could we speed this up by copying just the + * protocol headers into their own small mbuf then chaining the cluster + * to it? That way we'd only need to copy like 64 bytes or whatever the + * biggest header is, instead of the whole 1530ish-byte frame. + */ + if (sc->fecflags & FECFLAG_RACC) { + m->m_data = mtod(m, uint8_t *) + 2; + } else { + src = mtod(m, uint8_t*); + dst = src - ETHER_ALIGN; + bcopy(src, dst, len); + m->m_data = dst; + } sc->ifp->if_input(sc->ifp, m); FFEC_LOCK(sc); @@ -1098,7 +1117,7 @@ ffec_init_locked(struct ffec_softc *sc) * when we support jumbo frames and receiving fragments of them into * separate buffers. */ - maxbuf = MCLBYTES - roundup(ETHER_ALIGN, FEC_RXBUF_ALIGN); + maxbuf = MCLBYTES - roundup(ETHER_ALIGN, sc->rxbuf_align); maxfl = min(maxbuf, 0x7ff); if (ifp->if_drv_flags & IFF_DRV_RUNNING) @@ -1208,6 +1227,14 @@ ffec_init_locked(struct ffec_softc *sc) ffec_clear_stats(sc); WR4(sc, FEC_MIBC_REG, regval & ~FEC_MIBC_DIS); + if (sc->fecflags & FECFLAG_RACC) { + /* + * RACC - Receive Accelerator Function Configuration. + */ + regval = RD4(sc, FEC_RACC_REG); + WR4(sc, FEC_RACC_REG, regval | FEC_RACC_SHIFT16); + } + /* * ECR - Ethernet control register. * @@ -1360,7 +1387,7 @@ ffec_detach(device_t dev) { struct ffec_softc *sc; bus_dmamap_t map; - int idx; + int idx, irq; /* * NB: This function can be called internally to unwind a failure to @@ -1411,15 +1438,17 @@ ffec_detach(device_t dev) bus_dmamap_destroy(sc->txdesc_tag, sc->txdesc_map); } if (sc->txdesc_tag != NULL) - bus_dma_tag_destroy(sc->txdesc_tag); + bus_dma_tag_destroy(sc->txdesc_tag); /* Release bus resources. */ - if (sc->intr_cookie) - bus_teardown_intr(dev, sc->irq_res, sc->intr_cookie); + for (irq = 0; irq < MAX_IRQ_COUNT; ++irq) { + if (sc->intr_cookie[irq] != NULL) { + bus_teardown_intr(dev, sc->irq_res[irq], + sc->intr_cookie[irq]); + } + } + bus_release_resources(dev, irq_res_spec, sc->irq_res); - if (sc->irq_res != NULL) - bus_release_resource(dev, SYS_RES_IRQ, 0, sc->irq_res); - if (sc->mem_res != NULL) bus_release_resource(dev, SYS_RES_MEMORY, 0, sc->mem_res); @@ -1434,10 +1463,11 @@ ffec_attach(device_t dev) struct ifnet *ifp = NULL; struct mbuf *m; void *dummy; + uintptr_t typeflags; phandle_t ofw_node; - int error, phynum, rid; - uint8_t eaddr[ETHER_ADDR_LEN]; uint32_t idx, mscr; + int error, phynum, rid, irq; + uint8_t eaddr[ETHER_ADDR_LEN]; sc = device_get_softc(dev); sc->dev = dev; @@ -1448,8 +1478,18 @@ ffec_attach(device_t dev) * There are differences in the implementation and features of the FEC * hardware on different SoCs, so figure out what type we are. */ - sc->fectype = ofw_bus_search_compatible(dev, compat_data)->ocd_data; + typeflags = ofw_bus_search_compatible(dev, compat_data)->ocd_data; + sc->fectype = (uint8_t)(typeflags & FECTYPE_MASK); + sc->fecflags = (uint32_t)(typeflags & ~FECTYPE_MASK); + if (sc->fecflags & FECFLAG_AVB) { + sc->rxbuf_align = 64; + sc->txbuf_align = 1; + } else { + sc->rxbuf_align = 16; + sc->txbuf_align = 16; + } + /* * We have to be told what kind of electrical connection exists between * the MAC and PHY or we can't operate correctly. @@ -1478,12 +1518,10 @@ ffec_attach(device_t dev) error = ENOMEM; goto out; } - rid = 0; - sc->irq_res = bus_alloc_resource_any(dev, SYS_RES_IRQ, &rid, - RF_ACTIVE); - if (sc->irq_res == NULL) { - device_printf(dev, "could not allocate interrupt resources.\n"); - error = ENOMEM; + + error = bus_alloc_resources(dev, irq_res_spec, sc->irq_res); + if (error != 0) { + device_printf(dev, "could not allocate interrupt resources\n"); goto out; } @@ -1525,7 +1563,7 @@ ffec_attach(device_t dev) error = bus_dma_tag_create( bus_get_dma_tag(dev), /* Parent tag. */ - FEC_TXBUF_ALIGN, 0, /* alignment, boundary */ + sc->txbuf_align, 0, /* alignment, boundary */ BUS_SPACE_MAXADDR_32BIT, /* lowaddr */ BUS_SPACE_MAXADDR, /* highaddr */ NULL, NULL, /* filter, filterarg */ @@ -1627,15 +1665,34 @@ ffec_attach(device_t dev) /* Try to get the MAC address from the hardware before resetting it. */ ffec_get_hwaddr(sc, eaddr); - /* Reset the hardware. Disables all interrupts. */ - WR4(sc, FEC_ECR_REG, FEC_ECR_RESET); + /* + * Reset the hardware. Disables all interrupts. + * + * When the FEC is connected to the AXI bus (indicated by AVB flag), a + * MAC reset while a bus transaction is pending can hang the bus. + * Instead of resetting, turn off the ENABLE bit, which allows the + * hardware to complete any in-progress transfers (appending a bad CRC + * to any partial packet) and release the AXI bus. This could probably + * be done unconditionally for all hardware variants, but that hasn't + * been tested. + */ + if (sc->fecflags & FECFLAG_AVB) + WR4(sc, FEC_ECR_REG, 0); + else + WR4(sc, FEC_ECR_REG, FEC_ECR_RESET); /* Setup interrupt handler. */ - error = bus_setup_intr(dev, sc->irq_res, INTR_TYPE_NET | INTR_MPSAFE, - NULL, ffec_intr, sc, &sc->intr_cookie); - if (error != 0) { - device_printf(dev, "could not setup interrupt handler.\n"); - goto out; + for (irq = 0; irq < MAX_IRQ_COUNT; ++irq) { + if (sc->irq_res[irq] != NULL) { + error = bus_setup_intr(dev, sc->irq_res[irq], + INTR_TYPE_NET | INTR_MPSAFE, NULL, ffec_intr, sc, + &sc->intr_cookie[irq]); + if (error != 0) { + device_printf(dev, + "could not setup interrupt handler.\n"); + goto out; + } + } } /* @@ -1701,7 +1758,7 @@ ffec_attach(device_t dev) } error = mii_attach(dev, &sc->miibus, ifp, ffec_media_change, ffec_media_status, BMSR_DEFCAPMASK, phynum, MII_OFFSET_ANY, - (sc->fectype & FECTYPE_MVF) ? MIIF_FORCEANEG : 0); + (sc->fecflags & FECTYPE_MVF) ? MIIF_FORCEANEG : 0); if (error != 0) { device_printf(dev, "PHY attach failed\n"); goto out; Modified: stable/11/sys/dev/ffec/if_ffecreg.h ============================================================================== --- stable/11/sys/dev/ffec/if_ffecreg.h Sat Jan 6 20:52:30 2018 (r327637) +++ stable/11/sys/dev/ffec/if_ffecreg.h Sat Jan 6 21:19:52 2018 (r327638) @@ -317,8 +317,6 @@ struct ffec_hwdesc * The hardware imposes alignment restrictions on various objects involved in * DMA transfers. These values are expressed in bytes (not bits). */ -#define FEC_DESC_RING_ALIGN 16 -#define FEC_RXBUF_ALIGN 16 -#define FEC_TXBUF_ALIGN 16 +#define FEC_DESC_RING_ALIGN 64 #endif /* IF_FFECREG_H */ Modified: stable/11/sys/dev/sdhci/fsl_sdhci.c ============================================================================== --- stable/11/sys/dev/sdhci/fsl_sdhci.c Sat Jan 6 20:52:30 2018 (r327637) +++ stable/11/sys/dev/sdhci/fsl_sdhci.c Sat Jan 6 21:19:52 2018 (r327638) @@ -807,9 +807,26 @@ fsl_sdhci_get_platform_clock(device_t dev) static int fsl_sdhci_detach(device_t dev) { + struct fsl_sdhci_softc *sc = device_get_softc(dev); - /* sdhci_fdt_gpio_teardown(sc->gpio); */ - return (EBUSY); + if (sc->gpio != NULL) + sdhci_fdt_gpio_teardown(sc->gpio); + + callout_drain(&sc->r1bfix_callout); + + if (sc->intr_cookie != NULL) + bus_teardown_intr(dev, sc->irq_res, sc->intr_cookie); + if (sc->irq_res != NULL) + bus_release_resource(dev, SYS_RES_IRQ, + rman_get_rid(sc->irq_res), sc->irq_res); + + if (sc->mem_res != NULL) { + sdhci_cleanup_slot(&sc->slot); + bus_release_resource(dev, SYS_RES_MEMORY, + rman_get_rid(sc->mem_res), sc->mem_res); + } + + return (0); } static int @@ -922,13 +939,7 @@ fsl_sdhci_attach(device_t dev) return (0); fail: - if (sc->intr_cookie) - bus_teardown_intr(dev, sc->irq_res, sc->intr_cookie); - if (sc->irq_res) - bus_release_resource(dev, SYS_RES_IRQ, 0, sc->irq_res); - if (sc->mem_res) - bus_release_resource(dev, SYS_RES_MEMORY, 0, sc->mem_res); - + fsl_sdhci_detach(dev); return (err); } @@ -936,7 +947,7 @@ static int fsl_sdhci_probe(device_t dev) { - if (!ofw_bus_status_okay(dev)) + if (!ofw_bus_status_okay(dev)) return (ENXIO); switch (ofw_bus_search_compatible(dev, compat_data)->ocd_data) { From owner-svn-src-all@freebsd.org Sat Jan 6 21:34:34 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id D7BFBDF32B5; Sat, 6 Jan 2018 21:34:34 +0000 (UTC) (envelope-from dim@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 B38FD80C89; Sat, 6 Jan 2018 21:34:34 +0000 (UTC) (envelope-from dim@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 C987D17F24; Sat, 6 Jan 2018 21:34:33 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w06LYXVV067169; Sat, 6 Jan 2018 21:34:33 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w06LYX0k067168; Sat, 6 Jan 2018 21:34:33 GMT (envelope-from dim@FreeBSD.org) Message-Id: <201801062134.w06LYX0k067168@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Sat, 6 Jan 2018 21:34:33 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r327640 - vendor/llvm/llvm-release_60-r321788 X-SVN-Group: vendor X-SVN-Commit-Author: dim X-SVN-Commit-Paths: vendor/llvm/llvm-release_60-r321788 X-SVN-Commit-Revision: 327640 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 06 Jan 2018 21:34:34 -0000 Author: dim Date: Sat Jan 6 21:34:33 2018 New Revision: 327640 URL: https://svnweb.freebsd.org/changeset/base/327640 Log: Tag llvm release_60 branch r321788. Added: vendor/llvm/llvm-release_60-r321788/ - copied from r327639, vendor/llvm/dist-release_60/ From owner-svn-src-all@freebsd.org Sat Jan 6 21:34:30 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id A66BFDF32AD; Sat, 6 Jan 2018 21:34:30 +0000 (UTC) (envelope-from dim@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 2F32880C86; Sat, 6 Jan 2018 21:34:30 +0000 (UTC) (envelope-from dim@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 57C9017F23; Sat, 6 Jan 2018 21:34:29 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w06LYT6i067122; Sat, 6 Jan 2018 21:34:29 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w06LYRfN067101; Sat, 6 Jan 2018 21:34:27 GMT (envelope-from dim@FreeBSD.org) Message-Id: <201801062134.w06LYRfN067101@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Sat, 6 Jan 2018 21:34:27 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r327639 - in vendor/llvm/dist-release_60: . cmake include/llvm/CodeGen include/llvm/IR include/llvm/Support include/llvm/Transforms/Scalar lib/Analysis lib/CodeGen lib/CodeGen/GlobalISe... X-SVN-Group: vendor X-SVN-Commit-Author: dim X-SVN-Commit-Paths: in vendor/llvm/dist-release_60: . cmake include/llvm/CodeGen include/llvm/IR include/llvm/Support include/llvm/Transforms/Scalar lib/Analysis lib/CodeGen lib/CodeGen/GlobalISel lib/CodeGen/SelectionDA... X-SVN-Commit-Revision: 327639 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 06 Jan 2018 21:34:30 -0000 Author: dim Date: Sat Jan 6 21:34:26 2018 New Revision: 327639 URL: https://svnweb.freebsd.org/changeset/base/327639 Log: Vendor import of llvm release_60 branch r321788: https://llvm.org/svn/llvm-project/llvm/branches/release_60@321788 Added: vendor/llvm/dist-release_60/test/CodeGen/AArch64/GlobalISel/unknown-intrinsic.ll vendor/llvm/dist-release_60/test/CodeGen/AArch64/minmax-of-minmax.ll vendor/llvm/dist-release_60/test/CodeGen/Mips/constraint-c-err.ll vendor/llvm/dist-release_60/test/CodeGen/Mips/constraint-c.ll vendor/llvm/dist-release_60/test/CodeGen/PowerPC/convert-rr-to-ri-instrs-out-of-range.mir vendor/llvm/dist-release_60/test/CodeGen/PowerPC/pr35688.ll vendor/llvm/dist-release_60/test/CodeGen/X86/pr35765.ll vendor/llvm/dist-release_60/test/MC/ELF/metadata-declaration-errors.s (contents, props changed) vendor/llvm/dist-release_60/test/Transforms/InstCombine/fmul-sqrt.ll vendor/llvm/dist-release_60/test/Transforms/InstSimplify/bitreverse-fold.ll vendor/llvm/dist-release_60/test/Transforms/InstSimplify/exp-intrinsic.ll vendor/llvm/dist-release_60/test/Transforms/InstSimplify/exp2-intrinsic.ll vendor/llvm/dist-release_60/test/Transforms/InstSimplify/fold-intrinsics.ll vendor/llvm/dist-release_60/test/Transforms/InstSimplify/log-intrinsic.ll vendor/llvm/dist-release_60/test/Transforms/InstSimplify/log2-intrinsic.ll vendor/llvm/dist-release_60/test/Transforms/SimplifyCFG/pr35774.ll Deleted: vendor/llvm/dist-release_60/test/Transforms/InstCombine/bitreverse-fold.ll Modified: vendor/llvm/dist-release_60/CMakeLists.txt vendor/llvm/dist-release_60/cmake/config-ix.cmake vendor/llvm/dist-release_60/include/llvm/CodeGen/TargetPassConfig.h vendor/llvm/dist-release_60/include/llvm/IR/Function.h vendor/llvm/dist-release_60/include/llvm/IR/IntrinsicsAMDGPU.td vendor/llvm/dist-release_60/include/llvm/Support/CommandLine.h vendor/llvm/dist-release_60/include/llvm/Support/TargetRegistry.h vendor/llvm/dist-release_60/include/llvm/Transforms/Scalar/LoopPassManager.h vendor/llvm/dist-release_60/lib/Analysis/InstructionSimplify.cpp vendor/llvm/dist-release_60/lib/Analysis/ScalarEvolution.cpp vendor/llvm/dist-release_60/lib/Analysis/ScalarEvolutionExpander.cpp vendor/llvm/dist-release_60/lib/Analysis/ValueTracking.cpp vendor/llvm/dist-release_60/lib/CodeGen/CodeGenPrepare.cpp vendor/llvm/dist-release_60/lib/CodeGen/GlobalISel/IRTranslator.cpp vendor/llvm/dist-release_60/lib/CodeGen/GlobalISel/LegalizerHelper.cpp vendor/llvm/dist-release_60/lib/CodeGen/LLVMTargetMachine.cpp vendor/llvm/dist-release_60/lib/CodeGen/LiveDebugVariables.cpp vendor/llvm/dist-release_60/lib/CodeGen/SelectionDAG/DAGCombiner.cpp vendor/llvm/dist-release_60/lib/CodeGen/SelectionDAG/FastISel.cpp vendor/llvm/dist-release_60/lib/CodeGen/SelectionDAG/FunctionLoweringInfo.cpp vendor/llvm/dist-release_60/lib/CodeGen/SelectionDAG/LegalizeVectorOps.cpp vendor/llvm/dist-release_60/lib/CodeGen/SelectionDAG/LegalizeVectorTypes.cpp vendor/llvm/dist-release_60/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp vendor/llvm/dist-release_60/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp vendor/llvm/dist-release_60/lib/CodeGen/TargetPassConfig.cpp vendor/llvm/dist-release_60/lib/CodeGen/WinEHPrepare.cpp vendor/llvm/dist-release_60/lib/IR/BasicBlock.cpp vendor/llvm/dist-release_60/lib/IR/Verifier.cpp vendor/llvm/dist-release_60/lib/MC/MCParser/ELFAsmParser.cpp vendor/llvm/dist-release_60/lib/Passes/PassBuilder.cpp vendor/llvm/dist-release_60/lib/Support/CommandLine.cpp vendor/llvm/dist-release_60/lib/Target/AArch64/AArch64ISelLowering.cpp vendor/llvm/dist-release_60/lib/Target/AArch64/AArch64RegisterInfo.td vendor/llvm/dist-release_60/lib/Target/AArch64/AArch64TargetMachine.cpp vendor/llvm/dist-release_60/lib/Target/AArch64/AsmParser/AArch64AsmParser.cpp vendor/llvm/dist-release_60/lib/Target/AArch64/Disassembler/AArch64Disassembler.cpp vendor/llvm/dist-release_60/lib/Target/AArch64/MCTargetDesc/AArch64AsmBackend.cpp vendor/llvm/dist-release_60/lib/Target/AArch64/MCTargetDesc/AArch64MCTargetDesc.h vendor/llvm/dist-release_60/lib/Target/AMDGPU/AsmParser/AMDGPUAsmParser.cpp vendor/llvm/dist-release_60/lib/Target/AMDGPU/MCTargetDesc/AMDGPUAsmBackend.cpp vendor/llvm/dist-release_60/lib/Target/AMDGPU/MCTargetDesc/AMDGPUMCTargetDesc.h vendor/llvm/dist-release_60/lib/Target/AMDGPU/MIMGInstructions.td vendor/llvm/dist-release_60/lib/Target/AMDGPU/SIISelLowering.cpp vendor/llvm/dist-release_60/lib/Target/AMDGPU/SIMachineFunctionInfo.cpp vendor/llvm/dist-release_60/lib/Target/AMDGPU/SIMachineFunctionInfo.h vendor/llvm/dist-release_60/lib/Target/ARM/MCTargetDesc/ARMAsmBackend.cpp vendor/llvm/dist-release_60/lib/Target/ARM/MCTargetDesc/ARMAsmBackend.h vendor/llvm/dist-release_60/lib/Target/ARM/MCTargetDesc/ARMAsmBackendDarwin.h vendor/llvm/dist-release_60/lib/Target/ARM/MCTargetDesc/ARMAsmBackendELF.h vendor/llvm/dist-release_60/lib/Target/ARM/MCTargetDesc/ARMAsmBackendWinCOFF.h vendor/llvm/dist-release_60/lib/Target/ARM/MCTargetDesc/ARMMCTargetDesc.h vendor/llvm/dist-release_60/lib/Target/AVR/MCTargetDesc/AVRAsmBackend.cpp vendor/llvm/dist-release_60/lib/Target/AVR/MCTargetDesc/AVRMCTargetDesc.h vendor/llvm/dist-release_60/lib/Target/BPF/MCTargetDesc/BPFAsmBackend.cpp vendor/llvm/dist-release_60/lib/Target/BPF/MCTargetDesc/BPFMCTargetDesc.h vendor/llvm/dist-release_60/lib/Target/Hexagon/HexagonLoopIdiomRecognition.cpp vendor/llvm/dist-release_60/lib/Target/Hexagon/HexagonPatterns.td vendor/llvm/dist-release_60/lib/Target/Hexagon/MCTargetDesc/HexagonAsmBackend.cpp vendor/llvm/dist-release_60/lib/Target/Hexagon/MCTargetDesc/HexagonMCTargetDesc.h vendor/llvm/dist-release_60/lib/Target/Lanai/MCTargetDesc/LanaiAsmBackend.cpp vendor/llvm/dist-release_60/lib/Target/Lanai/MCTargetDesc/LanaiMCTargetDesc.h vendor/llvm/dist-release_60/lib/Target/Mips/MCTargetDesc/MipsAsmBackend.cpp vendor/llvm/dist-release_60/lib/Target/Mips/MCTargetDesc/MipsMCTargetDesc.h vendor/llvm/dist-release_60/lib/Target/Mips/MipsISelLowering.cpp vendor/llvm/dist-release_60/lib/Target/PowerPC/MCTargetDesc/PPCAsmBackend.cpp vendor/llvm/dist-release_60/lib/Target/PowerPC/MCTargetDesc/PPCMCTargetDesc.h vendor/llvm/dist-release_60/lib/Target/PowerPC/PPCISelLowering.cpp vendor/llvm/dist-release_60/lib/Target/PowerPC/PPCInstrInfo.cpp vendor/llvm/dist-release_60/lib/Target/PowerPC/PPCInstrInfo.h vendor/llvm/dist-release_60/lib/Target/PowerPC/PPCMIPeephole.cpp vendor/llvm/dist-release_60/lib/Target/PowerPC/PPCPreEmitPeephole.cpp vendor/llvm/dist-release_60/lib/Target/RISCV/MCTargetDesc/RISCVAsmBackend.cpp vendor/llvm/dist-release_60/lib/Target/RISCV/MCTargetDesc/RISCVMCTargetDesc.h vendor/llvm/dist-release_60/lib/Target/RISCV/RISCVISelLowering.cpp vendor/llvm/dist-release_60/lib/Target/RISCV/RISCVInstrInfoC.td vendor/llvm/dist-release_60/lib/Target/Sparc/MCTargetDesc/SparcAsmBackend.cpp vendor/llvm/dist-release_60/lib/Target/Sparc/MCTargetDesc/SparcMCTargetDesc.h vendor/llvm/dist-release_60/lib/Target/SystemZ/MCTargetDesc/SystemZMCAsmBackend.cpp vendor/llvm/dist-release_60/lib/Target/SystemZ/MCTargetDesc/SystemZMCTargetDesc.h vendor/llvm/dist-release_60/lib/Target/WebAssembly/MCTargetDesc/WebAssemblyMCTargetDesc.cpp vendor/llvm/dist-release_60/lib/Target/X86/MCTargetDesc/X86AsmBackend.cpp vendor/llvm/dist-release_60/lib/Target/X86/MCTargetDesc/X86MCTargetDesc.h vendor/llvm/dist-release_60/lib/Target/X86/X86FixupBWInsts.cpp vendor/llvm/dist-release_60/lib/Target/X86/X86ISelLowering.cpp vendor/llvm/dist-release_60/lib/Target/X86/X86ISelLowering.h vendor/llvm/dist-release_60/lib/Target/X86/X86InstrAVX512.td vendor/llvm/dist-release_60/lib/Target/X86/X86InstrMMX.td vendor/llvm/dist-release_60/lib/Transforms/Coroutines/CoroSplit.cpp vendor/llvm/dist-release_60/lib/Transforms/InstCombine/InstCombineMulDivRem.cpp vendor/llvm/dist-release_60/lib/Transforms/Scalar/CallSiteSplitting.cpp vendor/llvm/dist-release_60/lib/Transforms/Scalar/GVNSink.cpp vendor/llvm/dist-release_60/lib/Transforms/Scalar/IndVarSimplify.cpp vendor/llvm/dist-release_60/lib/Transforms/Scalar/InductiveRangeCheckElimination.cpp vendor/llvm/dist-release_60/lib/Transforms/Scalar/JumpThreading.cpp vendor/llvm/dist-release_60/lib/Transforms/Scalar/LoopDeletion.cpp vendor/llvm/dist-release_60/lib/Transforms/Scalar/LoopStrengthReduce.cpp vendor/llvm/dist-release_60/lib/Transforms/Scalar/LoopUnswitch.cpp vendor/llvm/dist-release_60/lib/Transforms/Scalar/SCCP.cpp vendor/llvm/dist-release_60/lib/Transforms/Scalar/SimpleLoopUnswitch.cpp vendor/llvm/dist-release_60/lib/Transforms/Scalar/StructurizeCFG.cpp vendor/llvm/dist-release_60/lib/Transforms/Utils/BasicBlockUtils.cpp vendor/llvm/dist-release_60/lib/Transforms/Utils/BreakCriticalEdges.cpp vendor/llvm/dist-release_60/lib/Transforms/Utils/CallPromotionUtils.cpp vendor/llvm/dist-release_60/lib/Transforms/Utils/CloneFunction.cpp vendor/llvm/dist-release_60/lib/Transforms/Utils/Local.cpp vendor/llvm/dist-release_60/lib/Transforms/Utils/LoopUnroll.cpp vendor/llvm/dist-release_60/lib/Transforms/Utils/LoopUnrollRuntime.cpp vendor/llvm/dist-release_60/lib/Transforms/Utils/LoopUtils.cpp vendor/llvm/dist-release_60/lib/Transforms/Utils/SSAUpdater.cpp vendor/llvm/dist-release_60/lib/Transforms/Utils/SimplifyCFG.cpp vendor/llvm/dist-release_60/lib/Transforms/Vectorize/LoopVectorize.cpp vendor/llvm/dist-release_60/test/CodeGen/AArch64/GlobalISel/arm64-fallback.ll vendor/llvm/dist-release_60/test/CodeGen/AArch64/GlobalISel/gisel-commandline-option.ll vendor/llvm/dist-release_60/test/CodeGen/AArch64/GlobalISel/legalize-mul.mir vendor/llvm/dist-release_60/test/CodeGen/AArch64/aarch64_f16_be.ll vendor/llvm/dist-release_60/test/CodeGen/AArch64/and-mask-removal.ll vendor/llvm/dist-release_60/test/CodeGen/AArch64/arm64-EXT-undef-mask.ll vendor/llvm/dist-release_60/test/CodeGen/AArch64/arm64-abi.ll vendor/llvm/dist-release_60/test/CodeGen/AArch64/arm64-abi_align.ll vendor/llvm/dist-release_60/test/CodeGen/AArch64/arm64-elf-constpool.ll vendor/llvm/dist-release_60/test/CodeGen/AArch64/arm64-elf-globals.ll vendor/llvm/dist-release_60/test/CodeGen/AArch64/arm64-fast-isel-alloca.ll vendor/llvm/dist-release_60/test/CodeGen/AArch64/arm64-fast-isel-br.ll vendor/llvm/dist-release_60/test/CodeGen/AArch64/arm64-fast-isel-call.ll vendor/llvm/dist-release_60/test/CodeGen/AArch64/arm64-fast-isel-conversion-fallback.ll vendor/llvm/dist-release_60/test/CodeGen/AArch64/arm64-fast-isel-conversion.ll vendor/llvm/dist-release_60/test/CodeGen/AArch64/arm64-fast-isel-fcmp.ll vendor/llvm/dist-release_60/test/CodeGen/AArch64/arm64-fast-isel-gv.ll vendor/llvm/dist-release_60/test/CodeGen/AArch64/arm64-fast-isel-icmp.ll vendor/llvm/dist-release_60/test/CodeGen/AArch64/arm64-fast-isel-intrinsic.ll vendor/llvm/dist-release_60/test/CodeGen/AArch64/arm64-fast-isel-materialize.ll vendor/llvm/dist-release_60/test/CodeGen/AArch64/arm64-fast-isel-noconvert.ll vendor/llvm/dist-release_60/test/CodeGen/AArch64/arm64-fast-isel-rem.ll vendor/llvm/dist-release_60/test/CodeGen/AArch64/arm64-fast-isel-ret.ll vendor/llvm/dist-release_60/test/CodeGen/AArch64/arm64-fast-isel.ll vendor/llvm/dist-release_60/test/CodeGen/AArch64/arm64-simd-scalar-to-vector.ll vendor/llvm/dist-release_60/test/CodeGen/AArch64/arm64-tls-dynamic-together.ll vendor/llvm/dist-release_60/test/CodeGen/AArch64/arm64-vcvt_f.ll vendor/llvm/dist-release_60/test/CodeGen/AArch64/br-cond-not-merge.ll vendor/llvm/dist-release_60/test/CodeGen/AArch64/cmpxchg-O0.ll vendor/llvm/dist-release_60/test/CodeGen/AArch64/cxx-tlscc.ll vendor/llvm/dist-release_60/test/CodeGen/AArch64/fast-isel-atomic.ll vendor/llvm/dist-release_60/test/CodeGen/AArch64/fast-isel-sp-adjust.ll vendor/llvm/dist-release_60/test/CodeGen/AArch64/i128-fast-isel-fallback.ll vendor/llvm/dist-release_60/test/CodeGen/AArch64/ldst-paired-aliasing.ll vendor/llvm/dist-release_60/test/CodeGen/AArch64/preferred-alignment.ll vendor/llvm/dist-release_60/test/CodeGen/AArch64/swift-return.ll vendor/llvm/dist-release_60/test/CodeGen/AArch64/swifterror.ll vendor/llvm/dist-release_60/test/CodeGen/AArch64/swiftself.ll vendor/llvm/dist-release_60/test/CodeGen/AArch64/tailcall-fastisel.ll vendor/llvm/dist-release_60/test/CodeGen/AMDGPU/indirect-addressing-si.ll vendor/llvm/dist-release_60/test/CodeGen/AMDGPU/llvm.amdgcn.image.ll vendor/llvm/dist-release_60/test/CodeGen/AMDGPU/llvm.amdgcn.s.waitcnt.ll vendor/llvm/dist-release_60/test/CodeGen/Hexagon/autohvx/vext-128b.ll vendor/llvm/dist-release_60/test/CodeGen/Hexagon/autohvx/vext-64b.ll vendor/llvm/dist-release_60/test/CodeGen/PowerPC/convert-rr-to-ri-instrs.mir vendor/llvm/dist-release_60/test/CodeGen/PowerPC/duplicate-returns-for-tailcall.ll vendor/llvm/dist-release_60/test/CodeGen/PowerPC/ppc64-sibcall.ll vendor/llvm/dist-release_60/test/CodeGen/X86/avx-intrinsics-fast-isel.ll vendor/llvm/dist-release_60/test/CodeGen/X86/avx-splat.ll vendor/llvm/dist-release_60/test/CodeGen/X86/avx-vbroadcast.ll vendor/llvm/dist-release_60/test/CodeGen/X86/avx512-calling-conv.ll vendor/llvm/dist-release_60/test/CodeGen/X86/avx512-cvt.ll vendor/llvm/dist-release_60/test/CodeGen/X86/avx512-ext.ll vendor/llvm/dist-release_60/test/CodeGen/X86/avx512-extract-subvector-load-store.ll vendor/llvm/dist-release_60/test/CodeGen/X86/avx512-insert-extract.ll vendor/llvm/dist-release_60/test/CodeGen/X86/avx512-shuffles/partial_permute.ll vendor/llvm/dist-release_60/test/CodeGen/X86/avx512-skx-insert-subvec.ll vendor/llvm/dist-release_60/test/CodeGen/X86/avx512-vec-cmp.ll vendor/llvm/dist-release_60/test/CodeGen/X86/avx512vl-intrinsics-fast-isel.ll vendor/llvm/dist-release_60/test/CodeGen/X86/avx512vl-vec-masked-cmp.ll vendor/llvm/dist-release_60/test/CodeGen/X86/bitcast-and-setcc-128.ll vendor/llvm/dist-release_60/test/CodeGen/X86/bitcast-and-setcc-256.ll vendor/llvm/dist-release_60/test/CodeGen/X86/bitcast-int-to-vector-bool-sext.ll vendor/llvm/dist-release_60/test/CodeGen/X86/bitcast-int-to-vector-bool-zext.ll vendor/llvm/dist-release_60/test/CodeGen/X86/bitcast-int-to-vector-bool.ll vendor/llvm/dist-release_60/test/CodeGen/X86/bitcast-setcc-128.ll vendor/llvm/dist-release_60/test/CodeGen/X86/bitcast-setcc-256.ll vendor/llvm/dist-release_60/test/CodeGen/X86/bitcast-setcc-512.ll vendor/llvm/dist-release_60/test/CodeGen/X86/broadcastm-lowering.ll vendor/llvm/dist-release_60/test/CodeGen/X86/build-vector-128.ll vendor/llvm/dist-release_60/test/CodeGen/X86/build-vector-256.ll vendor/llvm/dist-release_60/test/CodeGen/X86/cast-vsel.ll vendor/llvm/dist-release_60/test/CodeGen/X86/cvtv2f32.ll vendor/llvm/dist-release_60/test/CodeGen/X86/fixup-bw-inst.mir vendor/llvm/dist-release_60/test/CodeGen/X86/memset-nonzero.ll vendor/llvm/dist-release_60/test/CodeGen/X86/oddshuffles.ll vendor/llvm/dist-release_60/test/CodeGen/X86/pr33349.ll vendor/llvm/dist-release_60/test/CodeGen/X86/psubus.ll vendor/llvm/dist-release_60/test/CodeGen/X86/setcc-wide-types.ll vendor/llvm/dist-release_60/test/CodeGen/X86/sse-intrinsics-x86-upgrade.ll vendor/llvm/dist-release_60/test/CodeGen/X86/sse2-intrinsics-fast-isel.ll vendor/llvm/dist-release_60/test/CodeGen/X86/sse2-intrinsics-x86-upgrade.ll vendor/llvm/dist-release_60/test/CodeGen/X86/vec_fp_to_int.ll vendor/llvm/dist-release_60/test/CodeGen/X86/vec_set-H.ll vendor/llvm/dist-release_60/test/CodeGen/X86/vector-compare-results.ll vendor/llvm/dist-release_60/test/CodeGen/X86/vector-pcmp.ll vendor/llvm/dist-release_60/test/CodeGen/X86/vector-shift-ashr-128.ll vendor/llvm/dist-release_60/test/CodeGen/X86/vector-shift-lshr-128.ll vendor/llvm/dist-release_60/test/CodeGen/X86/vector-shift-shl-128.ll vendor/llvm/dist-release_60/test/CodeGen/X86/vector-shuffle-128-v16.ll vendor/llvm/dist-release_60/test/CodeGen/X86/vector-shuffle-128-v8.ll vendor/llvm/dist-release_60/test/CodeGen/X86/vector-shuffle-256-v16.ll vendor/llvm/dist-release_60/test/CodeGen/X86/vector-shuffle-256-v32.ll vendor/llvm/dist-release_60/test/CodeGen/X86/vector-shuffle-v1.ll vendor/llvm/dist-release_60/test/CodeGen/X86/vector-trunc.ll vendor/llvm/dist-release_60/test/CodeGen/X86/widened-broadcast.ll vendor/llvm/dist-release_60/test/CodeGen/X86/x86-interleaved-access.ll vendor/llvm/dist-release_60/test/DebugInfo/AArch64/asan-stack-vars.ll vendor/llvm/dist-release_60/test/DebugInfo/AArch64/frameindices.ll vendor/llvm/dist-release_60/test/DebugInfo/AArch64/line-header.ll vendor/llvm/dist-release_60/test/DebugInfo/AArch64/prologue_end.ll vendor/llvm/dist-release_60/test/MC/AMDGPU/flat-gfx9.s vendor/llvm/dist-release_60/test/MC/Disassembler/AMDGPU/flat_gfx9.txt vendor/llvm/dist-release_60/test/MC/X86/intel-syntax-error.s vendor/llvm/dist-release_60/test/MC/X86/intel-syntax.s vendor/llvm/dist-release_60/test/MC/X86/x86_64-asm-match.s vendor/llvm/dist-release_60/test/Other/loop-pm-invalidation.ll vendor/llvm/dist-release_60/test/Other/new-pass-manager.ll vendor/llvm/dist-release_60/test/Other/new-pm-defaults.ll vendor/llvm/dist-release_60/test/Other/new-pm-thinlto-defaults.ll vendor/llvm/dist-release_60/test/Transforms/InstCombine/bswap-fold.ll vendor/llvm/dist-release_60/test/Transforms/InstCombine/call.ll vendor/llvm/dist-release_60/test/Transforms/InstCombine/extractelement.ll vendor/llvm/dist-release_60/test/Transforms/InstCombine/intrinsics.ll vendor/llvm/dist-release_60/test/Transforms/InstCombine/udiv-simplify.ll vendor/llvm/dist-release_60/test/Transforms/InstCombine/vec_demanded_elts.ll vendor/llvm/dist-release_60/test/Transforms/InstCombine/vector_insertelt_shuffle.ll vendor/llvm/dist-release_60/test/Transforms/InstSimplify/extract-element.ll vendor/llvm/dist-release_60/test/Transforms/InstSimplify/insertelement.ll vendor/llvm/dist-release_60/test/Transforms/LoopRotate/pr35210.ll vendor/llvm/dist-release_60/test/Transforms/LoopSimplify/unreachable-loop-pred.ll vendor/llvm/dist-release_60/test/tools/llvm-objcopy/symbol-copy.test vendor/llvm/dist-release_60/tools/dsymutil/DwarfLinker.cpp vendor/llvm/dist-release_60/tools/llvm-dwp/llvm-dwp.cpp vendor/llvm/dist-release_60/tools/llvm-mc/llvm-mc.cpp vendor/llvm/dist-release_60/tools/llvm-objcopy/Object.cpp vendor/llvm/dist-release_60/tools/llvm-objcopy/Object.h vendor/llvm/dist-release_60/unittests/DebugInfo/DWARF/DwarfGenerator.cpp vendor/llvm/dist-release_60/unittests/IR/BasicBlockTest.cpp vendor/llvm/dist-release_60/unittests/Support/CommandLineTest.cpp vendor/llvm/dist-release_60/utils/TableGen/CodeGenDAGPatterns.cpp Modified: vendor/llvm/dist-release_60/CMakeLists.txt ============================================================================== --- vendor/llvm/dist-release_60/CMakeLists.txt Sat Jan 6 21:19:52 2018 (r327638) +++ vendor/llvm/dist-release_60/CMakeLists.txt Sat Jan 6 21:34:26 2018 (r327639) @@ -27,7 +27,7 @@ if(NOT DEFINED LLVM_VERSION_PATCH) set(LLVM_VERSION_PATCH 0) endif() if(NOT DEFINED LLVM_VERSION_SUFFIX) - set(LLVM_VERSION_SUFFIX svn) + set(LLVM_VERSION_SUFFIX "") endif() if (NOT PACKAGE_VERSION) Modified: vendor/llvm/dist-release_60/cmake/config-ix.cmake ============================================================================== --- vendor/llvm/dist-release_60/cmake/config-ix.cmake Sat Jan 6 21:19:52 2018 (r327638) +++ vendor/llvm/dist-release_60/cmake/config-ix.cmake Sat Jan 6 21:34:26 2018 (r327639) @@ -640,7 +640,8 @@ endif() string(REPLACE " " ";" LLVM_BINDINGS_LIST "${LLVM_BINDINGS}") function(find_python_module module) - string(TOUPPER ${module} module_upper) + string(REPLACE "." "_" module_name ${module}) + string(TOUPPER ${module_name} module_upper) set(FOUND_VAR PY_${module_upper}_FOUND) execute_process(COMMAND "${PYTHON_EXECUTABLE}" "-c" "import ${module}" @@ -658,13 +659,16 @@ endfunction() set (PYTHON_MODULES pygments + # Some systems still don't have pygments.lexers.c_cpp which was introduced in + # version 2.0 in 2014... + pygments.lexers.c_cpp yaml ) foreach(module ${PYTHON_MODULES}) find_python_module(${module}) endforeach() -if(PY_PYGMENTS_FOUND AND PY_YAML_FOUND) +if(PY_PYGMENTS_FOUND AND PY_PYGMENTS_LEXERS_C_CPP_FOUND AND PY_YAML_FOUND) set (LLVM_HAVE_OPT_VIEWER_MODULES 1) else() set (LLVM_HAVE_OPT_VIEWER_MODULES 0) Modified: vendor/llvm/dist-release_60/include/llvm/CodeGen/TargetPassConfig.h ============================================================================== --- vendor/llvm/dist-release_60/include/llvm/CodeGen/TargetPassConfig.h Sat Jan 6 21:19:52 2018 (r327638) +++ vendor/llvm/dist-release_60/include/llvm/CodeGen/TargetPassConfig.h Sat Jan 6 21:34:26 2018 (r327639) @@ -325,9 +325,9 @@ class TargetPassConfig : public ImmutablePass { (publi virtual bool isGlobalISelEnabled() const; /// Check whether or not GlobalISel should abort on error. - /// When this is disable, GlobalISel will fall back on SDISel instead of + /// When this is disabled, GlobalISel will fall back on SDISel instead of /// erroring out. - virtual bool isGlobalISelAbortEnabled() const; + bool isGlobalISelAbortEnabled() const; /// Check whether or not a diagnostic should be emitted when GlobalISel /// uses the fallback path. In other words, it will emit a diagnostic Modified: vendor/llvm/dist-release_60/include/llvm/IR/Function.h ============================================================================== --- vendor/llvm/dist-release_60/include/llvm/IR/Function.h Sat Jan 6 21:19:52 2018 (r327638) +++ vendor/llvm/dist-release_60/include/llvm/IR/Function.h Sat Jan 6 21:34:26 2018 (r327639) @@ -218,6 +218,7 @@ class Function : public GlobalObject, public ilist_nod Attribute::get(getContext(), Kind, Val)); } + /// @brief Add function attributes to this function. void addFnAttr(Attribute Attr) { addAttribute(AttributeList::FunctionIndex, Attr); } @@ -268,6 +269,8 @@ class Function : public GlobalObject, public ilist_nod bool hasFnAttribute(Attribute::AttrKind Kind) const { return AttributeSets.hasFnAttribute(Kind); } + + /// @brief Return true if the function has the attribute. bool hasFnAttribute(StringRef Kind) const { return AttributeSets.hasFnAttribute(Kind); } @@ -276,6 +279,8 @@ class Function : public GlobalObject, public ilist_nod Attribute getFnAttribute(Attribute::AttrKind Kind) const { return getAttribute(AttributeList::FunctionIndex, Kind); } + + /// @brief Return the attribute for the given attribute kind. Attribute getFnAttribute(StringRef Kind) const { return getAttribute(AttributeList::FunctionIndex, Kind); } @@ -342,10 +347,12 @@ class Function : public GlobalObject, public ilist_nod return getAttributes().hasParamAttribute(ArgNo, Kind); } + /// @brief gets the attribute from the list of attributes. Attribute getAttribute(unsigned i, Attribute::AttrKind Kind) const { return AttributeSets.getAttribute(i, Kind); } + /// @brief gets the attribute from the list of attributes. Attribute getAttribute(unsigned i, StringRef Kind) const { return AttributeSets.getAttribute(i, Kind); } Modified: vendor/llvm/dist-release_60/include/llvm/IR/IntrinsicsAMDGPU.td ============================================================================== --- vendor/llvm/dist-release_60/include/llvm/IR/IntrinsicsAMDGPU.td Sat Jan 6 21:19:52 2018 (r327638) +++ vendor/llvm/dist-release_60/include/llvm/IR/IntrinsicsAMDGPU.td Sat Jan 6 21:34:26 2018 (r327639) @@ -304,7 +304,8 @@ class AMDGPUImageLoad : Intrinsic < llvm_i1_ty, // slc(imm) llvm_i1_ty, // lwe(imm) llvm_i1_ty], // da(imm) - !if(NoMem, [IntrNoMem], [IntrReadMem])>; + !if(NoMem, [IntrNoMem], [IntrReadMem]), "", + !if(NoMem, [], [SDNPMemOperand])>; def int_amdgcn_image_load : AMDGPUImageLoad; def int_amdgcn_image_load_mip : AMDGPUImageLoad; @@ -320,7 +321,7 @@ class AMDGPUImageStore : Intrinsic < llvm_i1_ty, // slc(imm) llvm_i1_ty, // lwe(imm) llvm_i1_ty], // da(imm) - []>; + [IntrWriteMem], "", [SDNPMemOperand]>; def int_amdgcn_image_store : AMDGPUImageStore; def int_amdgcn_image_store_mip : AMDGPUImageStore; @@ -336,7 +337,8 @@ class AMDGPUImageSample : Intrinsic < llvm_i1_ty, // slc(imm) llvm_i1_ty, // lwe(imm) llvm_i1_ty], // da(imm) - !if(NoMem, [IntrNoMem], [IntrReadMem])>; + !if(NoMem, [IntrNoMem], [IntrReadMem]), "", + !if(NoMem, [], [SDNPMemOperand])>; // Basic sample def int_amdgcn_image_sample : AMDGPUImageSample; @@ -428,7 +430,7 @@ class AMDGPUImageAtomic : Intrinsic < llvm_i1_ty, // r128(imm) llvm_i1_ty, // da(imm) llvm_i1_ty], // slc(imm) - []>; + [], "", [SDNPMemOperand]>; def int_amdgcn_image_atomic_swap : AMDGPUImageAtomic; def int_amdgcn_image_atomic_add : AMDGPUImageAtomic; @@ -451,7 +453,7 @@ def int_amdgcn_image_atomic_cmpswap : Intrinsic < llvm_i1_ty, // r128(imm) llvm_i1_ty, // da(imm) llvm_i1_ty], // slc(imm) - []>; + [], "", [SDNPMemOperand]>; class AMDGPUBufferLoad : Intrinsic < [llvm_anyfloat_ty], @@ -460,7 +462,7 @@ class AMDGPUBufferLoad : Intrinsic < llvm_i32_ty, // offset(SGPR/VGPR/imm) llvm_i1_ty, // glc(imm) llvm_i1_ty], // slc(imm) - [IntrReadMem]>; + [IntrReadMem], "", [SDNPMemOperand]>; def int_amdgcn_buffer_load_format : AMDGPUBufferLoad; def int_amdgcn_buffer_load : AMDGPUBufferLoad; @@ -472,7 +474,7 @@ class AMDGPUBufferStore : Intrinsic < llvm_i32_ty, // offset(SGPR/VGPR/imm) llvm_i1_ty, // glc(imm) llvm_i1_ty], // slc(imm) - [IntrWriteMem]>; + [IntrWriteMem], "", [SDNPMemOperand]>; def int_amdgcn_buffer_store_format : AMDGPUBufferStore; def int_amdgcn_buffer_store : AMDGPUBufferStore; @@ -487,7 +489,7 @@ def int_amdgcn_tbuffer_load : Intrinsic < llvm_i32_ty, // nfmt(imm) llvm_i1_ty, // glc(imm) llvm_i1_ty], // slc(imm) - []>; + [IntrReadMem], "", [SDNPMemOperand]>; def int_amdgcn_tbuffer_store : Intrinsic < [], @@ -501,7 +503,7 @@ def int_amdgcn_tbuffer_store : Intrinsic < llvm_i32_ty, // nfmt(imm) llvm_i1_ty, // glc(imm) llvm_i1_ty], // slc(imm) - []>; + [IntrWriteMem], "", [SDNPMemOperand]>; class AMDGPUBufferAtomic : Intrinsic < [llvm_i32_ty], @@ -510,7 +512,7 @@ class AMDGPUBufferAtomic : Intrinsic < llvm_i32_ty, // vindex(VGPR) llvm_i32_ty, // offset(SGPR/VGPR/imm) llvm_i1_ty], // slc(imm) - []>; + [], "", [SDNPMemOperand]>; def int_amdgcn_buffer_atomic_swap : AMDGPUBufferAtomic; def int_amdgcn_buffer_atomic_add : AMDGPUBufferAtomic; def int_amdgcn_buffer_atomic_sub : AMDGPUBufferAtomic; @@ -529,7 +531,7 @@ def int_amdgcn_buffer_atomic_cmpswap : Intrinsic< llvm_i32_ty, // vindex(VGPR) llvm_i32_ty, // offset(SGPR/VGPR/imm) llvm_i1_ty], // slc(imm) - []>; + [], "", [SDNPMemOperand]>; // Uses that do not set the done bit should set IntrWriteMem on the // call site. Modified: vendor/llvm/dist-release_60/include/llvm/Support/CommandLine.h ============================================================================== --- vendor/llvm/dist-release_60/include/llvm/Support/CommandLine.h Sat Jan 6 21:19:52 2018 (r327638) +++ vendor/llvm/dist-release_60/include/llvm/Support/CommandLine.h Sat Jan 6 21:34:26 2018 (r327639) @@ -1862,6 +1862,33 @@ using TokenizerCallback = void (*)(StringRef Source, S SmallVectorImpl &NewArgv, bool MarkEOLs); +/// Tokenizes content of configuration file. +/// +/// \param [in] Source The string representing content of config file. +/// \param [in] Saver Delegates back to the caller for saving parsed strings. +/// \param [out] NewArgv All parsed strings are appended to NewArgv. +/// \param [in] MarkEOLs Added for compatibility with TokenizerCallback. +/// +/// It works like TokenizeGNUCommandLine with ability to skip comment lines. +/// +void tokenizeConfigFile(StringRef Source, StringSaver &Saver, + SmallVectorImpl &NewArgv, + bool MarkEOLs = false); + +/// Reads command line options from the given configuration file. +/// +/// \param [in] CfgFileName Path to configuration file. +/// \param [in] Saver Objects that saves allocated strings. +/// \param [out] Argv Array to which the read options are added. +/// \return true if the file was successfully read. +/// +/// It reads content of the specified file, tokenizes it and expands "@file" +/// commands resolving file names in them relative to the directory where +/// CfgFilename resides. +/// +bool readConfigFile(StringRef CfgFileName, StringSaver &Saver, + SmallVectorImpl &Argv); + /// \brief Expand response files on a command line recursively using the given /// StringSaver and tokenization strategy. Argv should contain the command line /// before expansion and will be modified in place. If requested, Argv will Modified: vendor/llvm/dist-release_60/include/llvm/Support/TargetRegistry.h ============================================================================== --- vendor/llvm/dist-release_60/include/llvm/Support/TargetRegistry.h Sat Jan 6 21:19:52 2018 (r327638) +++ vendor/llvm/dist-release_60/include/llvm/Support/TargetRegistry.h Sat Jan 6 21:34:26 2018 (r327639) @@ -123,8 +123,8 @@ class Target { (public) using AsmPrinterCtorTy = AsmPrinter *(*)( TargetMachine &TM, std::unique_ptr &&Streamer); using MCAsmBackendCtorTy = MCAsmBackend *(*)(const Target &T, + const MCSubtargetInfo &STI, const MCRegisterInfo &MRI, - const Triple &TT, StringRef CPU, const MCTargetOptions &Options); using MCAsmParserCtorTy = MCTargetAsmParser *(*)( const MCSubtargetInfo &STI, MCAsmParser &P, const MCInstrInfo &MII, @@ -381,15 +381,12 @@ class Target { (public) } /// createMCAsmBackend - Create a target specific assembly parser. - /// - /// \param TheTriple The target triple string. - MCAsmBackend *createMCAsmBackend(const MCRegisterInfo &MRI, - StringRef TheTriple, StringRef CPU, - const MCTargetOptions &Options) - const { + MCAsmBackend *createMCAsmBackend(const MCSubtargetInfo &STI, + const MCRegisterInfo &MRI, + const MCTargetOptions &Options) const { if (!MCAsmBackendCtorFn) return nullptr; - return MCAsmBackendCtorFn(*this, MRI, Triple(TheTriple), CPU, Options); + return MCAsmBackendCtorFn(*this, STI, MRI, Options); } /// createMCAsmParser - Create a target specific assembly parser. @@ -1106,10 +1103,10 @@ template struct RegisterMCAsm } private: - static MCAsmBackend *Allocator(const Target &T, const MCRegisterInfo &MRI, - const Triple &TheTriple, StringRef CPU, + static MCAsmBackend *Allocator(const Target &T, const MCSubtargetInfo &STI, + const MCRegisterInfo &MRI, const MCTargetOptions &Options) { - return new MCAsmBackendImpl(T, MRI, TheTriple, CPU); + return new MCAsmBackendImpl(T, STI, MRI); } }; Modified: vendor/llvm/dist-release_60/include/llvm/Transforms/Scalar/LoopPassManager.h ============================================================================== --- vendor/llvm/dist-release_60/include/llvm/Transforms/Scalar/LoopPassManager.h Sat Jan 6 21:19:52 2018 (r327638) +++ vendor/llvm/dist-release_60/include/llvm/Transforms/Scalar/LoopPassManager.h Sat Jan 6 21:34:26 2018 (r327639) @@ -264,7 +264,8 @@ template class FunctionToLoopPassAdaptor : public PassInfoMixin> { public: - explicit FunctionToLoopPassAdaptor(LoopPassT Pass) : Pass(std::move(Pass)) { + explicit FunctionToLoopPassAdaptor(LoopPassT Pass, bool DebugLogging = false) + : Pass(std::move(Pass)), LoopCanonicalizationFPM(DebugLogging) { LoopCanonicalizationFPM.addPass(LoopSimplifyPass()); LoopCanonicalizationFPM.addPass(LCSSAPass()); } @@ -384,8 +385,8 @@ class FunctionToLoopPassAdaptor (private) /// adaptor. template FunctionToLoopPassAdaptor -createFunctionToLoopPassAdaptor(LoopPassT Pass) { - return FunctionToLoopPassAdaptor(std::move(Pass)); +createFunctionToLoopPassAdaptor(LoopPassT Pass, bool DebugLogging = false) { + return FunctionToLoopPassAdaptor(std::move(Pass), DebugLogging); } /// \brief Pass for printing a loop's contents as textual IR. Modified: vendor/llvm/dist-release_60/lib/Analysis/InstructionSimplify.cpp ============================================================================== --- vendor/llvm/dist-release_60/lib/Analysis/InstructionSimplify.cpp Sat Jan 6 21:19:52 2018 (r327638) +++ vendor/llvm/dist-release_60/lib/Analysis/InstructionSimplify.cpp Sat Jan 6 21:34:26 2018 (r327639) @@ -826,7 +826,7 @@ static Value *SimplifyMulInst(Value *Op0, Value *Op1, MaxRecurse)) return V; - // Mul distributes over Add. Try some generic simplifications based on this. + // Mul distributes over Add. Try some generic simplifications based on this. if (Value *V = ExpandBinOp(Instruction::Mul, Op0, Op1, Instruction::Add, Q, MaxRecurse)) return V; @@ -3838,12 +3838,13 @@ Value *llvm::SimplifyInsertElementInst(Value *Vec, Val // Fold into undef if index is out of bounds. if (auto *CI = dyn_cast(Idx)) { uint64_t NumElements = cast(Vec->getType())->getNumElements(); - if (CI->uge(NumElements)) return UndefValue::get(Vec->getType()); } - // TODO: We should also fold if index is iteslf an undef. + // If index is undef, it might be out of bounds (see above case) + if (isa(Idx)) + return UndefValue::get(Vec->getType()); return nullptr; } @@ -3896,10 +3897,13 @@ static Value *SimplifyExtractElementInst(Value *Vec, V // If extracting a specified index from the vector, see if we can recursively // find a previously computed scalar that was inserted into the vector. - if (auto *IdxC = dyn_cast(Idx)) - if (IdxC->getValue().ule(Vec->getType()->getVectorNumElements())) - if (Value *Elt = findScalarElement(Vec, IdxC->getZExtValue())) - return Elt; + if (auto *IdxC = dyn_cast(Idx)) { + if (IdxC->getValue().uge(Vec->getType()->getVectorNumElements())) + // definitely out of bounds, thus undefined result + return UndefValue::get(Vec->getType()->getVectorElementType()); + if (Value *Elt = findScalarElement(Vec, IdxC->getZExtValue())) + return Elt; + } // An undef extract index can be arbitrarily chosen to be an out-of-range // index value, which would result in the instruction being undef. @@ -4489,26 +4493,53 @@ static Value *SimplifyIntrinsic(Function *F, IterTy Ar } } + Value *IIOperand = *ArgBegin; + Value *X; switch (IID) { case Intrinsic::fabs: { - if (SignBitMustBeZero(*ArgBegin, Q.TLI)) - return *ArgBegin; + if (SignBitMustBeZero(IIOperand, Q.TLI)) + return IIOperand; return nullptr; } case Intrinsic::bswap: { - Value *IIOperand = *ArgBegin; - Value *X = nullptr; // bswap(bswap(x)) -> x if (match(IIOperand, m_BSwap(m_Value(X)))) return X; return nullptr; } case Intrinsic::bitreverse: { - Value *IIOperand = *ArgBegin; - Value *X = nullptr; // bitreverse(bitreverse(x)) -> x if (match(IIOperand, m_BitReverse(m_Value(X)))) return X; + return nullptr; + } + case Intrinsic::exp: { + // exp(log(x)) -> x + if (Q.CxtI->isFast() && + match(IIOperand, m_Intrinsic(m_Value(X)))) + return X; + return nullptr; + } + case Intrinsic::exp2: { + // exp2(log2(x)) -> x + if (Q.CxtI->isFast() && + match(IIOperand, m_Intrinsic(m_Value(X)))) + return X; + return nullptr; + } + case Intrinsic::log: { + // log(exp(x)) -> x + if (Q.CxtI->isFast() && + match(IIOperand, m_Intrinsic(m_Value(X)))) + return X; + return nullptr; + } + case Intrinsic::log2: { + // log2(exp2(x)) -> x + if (Q.CxtI->isFast() && + match(IIOperand, m_Intrinsic(m_Value(X)))) { + return X; + } return nullptr; } default: Modified: vendor/llvm/dist-release_60/lib/Analysis/ScalarEvolution.cpp ============================================================================== --- vendor/llvm/dist-release_60/lib/Analysis/ScalarEvolution.cpp Sat Jan 6 21:19:52 2018 (r327638) +++ vendor/llvm/dist-release_60/lib/Analysis/ScalarEvolution.cpp Sat Jan 6 21:34:26 2018 (r327639) @@ -2358,7 +2358,7 @@ const SCEV *ScalarEvolution::getAddExpr(SmallVectorImp FoundMatch = true; } if (FoundMatch) - return getAddExpr(Ops, Flags); + return getAddExpr(Ops, Flags, Depth + 1); // Check for truncates. If all the operands are truncated from the same // type, see if factoring out the truncate would permit the result to be @@ -6402,9 +6402,8 @@ PushLoopPHIs(const Loop *L, SmallVectorImplgetHeader(); // Push all Loop-header PHIs onto the Worklist stack. - for (BasicBlock::iterator I = Header->begin(); - PHINode *PN = dyn_cast(I); ++I) - Worklist.push_back(PN); + for (PHINode &PN : Header->phis()) + Worklist.push_back(&PN); } const ScalarEvolution::BackedgeTakenInfo & @@ -7638,12 +7637,9 @@ ScalarEvolution::getConstantEvolutionLoopExitValue(PHI if (!Latch) return nullptr; - for (auto &I : *Header) { - PHINode *PHI = dyn_cast(&I); - if (!PHI) break; - auto *StartCST = getOtherIncomingValue(PHI, Latch); - if (!StartCST) continue; - CurrentIterVals[PHI] = StartCST; + for (PHINode &PHI : Header->phis()) { + if (auto *StartCST = getOtherIncomingValue(&PHI, Latch)) + CurrentIterVals[&PHI] = StartCST; } if (!CurrentIterVals.count(PN)) return RetVal = nullptr; @@ -7720,13 +7716,9 @@ const SCEV *ScalarEvolution::computeExitCountExhaustiv BasicBlock *Latch = L->getLoopLatch(); assert(Latch && "Should follow from NumIncomingValues == 2!"); - for (auto &I : *Header) { - PHINode *PHI = dyn_cast(&I); - if (!PHI) - break; - auto *StartCST = getOtherIncomingValue(PHI, Latch); - if (!StartCST) continue; - CurrentIterVals[PHI] = StartCST; + for (PHINode &PHI : Header->phis()) { + if (auto *StartCST = getOtherIncomingValue(&PHI, Latch)) + CurrentIterVals[&PHI] = StartCST; } if (!CurrentIterVals.count(PN)) return getCouldNotCompute(); Modified: vendor/llvm/dist-release_60/lib/Analysis/ScalarEvolutionExpander.cpp ============================================================================== --- vendor/llvm/dist-release_60/lib/Analysis/ScalarEvolutionExpander.cpp Sat Jan 6 21:19:52 2018 (r327638) +++ vendor/llvm/dist-release_60/lib/Analysis/ScalarEvolutionExpander.cpp Sat Jan 6 21:34:26 2018 (r327639) @@ -1154,16 +1154,11 @@ SCEVExpander::getAddRecExprPHILiterally(const SCEVAddR IVIncInsertLoop && SE.DT.properlyDominates(LatchBlock, IVIncInsertLoop->getHeader()); - for (auto &I : *L->getHeader()) { - auto *PN = dyn_cast(&I); - // Found first non-phi, the rest of instructions are also not Phis. - if (!PN) - break; - - if (!SE.isSCEVable(PN->getType())) + for (PHINode &PN : L->getHeader()->phis()) { + if (!SE.isSCEVable(PN.getType())) continue; - const SCEVAddRecExpr *PhiSCEV = dyn_cast(SE.getSCEV(PN)); + const SCEVAddRecExpr *PhiSCEV = dyn_cast(SE.getSCEV(&PN)); if (!PhiSCEV) continue; @@ -1175,16 +1170,16 @@ SCEVExpander::getAddRecExprPHILiterally(const SCEVAddR continue; Instruction *TempIncV = - cast(PN->getIncomingValueForBlock(LatchBlock)); + cast(PN.getIncomingValueForBlock(LatchBlock)); // Check whether we can reuse this PHI node. if (LSRMode) { - if (!isExpandedAddRecExprPHI(PN, TempIncV, L)) + if (!isExpandedAddRecExprPHI(&PN, TempIncV, L)) continue; if (L == IVIncInsertLoop && !hoistIVInc(TempIncV, IVIncInsertPos)) continue; } else { - if (!isNormalAddRecExprPHI(PN, TempIncV, L)) + if (!isNormalAddRecExprPHI(&PN, TempIncV, L)) continue; } @@ -1193,7 +1188,7 @@ SCEVExpander::getAddRecExprPHILiterally(const SCEVAddR IncV = TempIncV; TruncTy = nullptr; InvertStep = false; - AddRecPhiMatch = PN; + AddRecPhiMatch = &PN; break; } @@ -1203,7 +1198,7 @@ SCEVExpander::getAddRecExprPHILiterally(const SCEVAddR canBeCheaplyTransformed(SE, PhiSCEV, Normalized, InvertStep)) { // Record the phi node. But don't stop we might find an exact match // later. - AddRecPhiMatch = PN; + AddRecPhiMatch = &PN; IncV = TempIncV; TruncTy = SE.getEffectiveSCEVType(Normalized->getType()); } @@ -1863,12 +1858,8 @@ SCEVExpander::replaceCongruentIVs(Loop *L, const Domin const TargetTransformInfo *TTI) { // Find integer phis in order of increasing width. SmallVector Phis; - for (auto &I : *L->getHeader()) { - if (auto *PN = dyn_cast(&I)) - Phis.push_back(PN); - else - break; - } + for (PHINode &PN : L->getHeader()->phis()) + Phis.push_back(&PN); if (TTI) std::sort(Phis.begin(), Phis.end(), [](Value *LHS, Value *RHS) { Modified: vendor/llvm/dist-release_60/lib/Analysis/ValueTracking.cpp ============================================================================== --- vendor/llvm/dist-release_60/lib/Analysis/ValueTracking.cpp Sat Jan 6 21:19:52 2018 (r327638) +++ vendor/llvm/dist-release_60/lib/Analysis/ValueTracking.cpp Sat Jan 6 21:34:26 2018 (r327639) @@ -2264,9 +2264,9 @@ static unsigned ComputeNumSignBitsImpl(const Value *V, // ashr X, C -> adds C sign bits. Vectors too. const APInt *ShAmt; if (match(U->getOperand(1), m_APInt(ShAmt))) { - unsigned ShAmtLimited = ShAmt->getZExtValue(); - if (ShAmtLimited >= TyBits) + if (ShAmt->uge(TyBits)) break; // Bad shift. + unsigned ShAmtLimited = ShAmt->getZExtValue(); Tmp += ShAmtLimited; if (Tmp > TyBits) Tmp = TyBits; } @@ -2277,9 +2277,9 @@ static unsigned ComputeNumSignBitsImpl(const Value *V, if (match(U->getOperand(1), m_APInt(ShAmt))) { // shl destroys sign bits. Tmp = ComputeNumSignBits(U->getOperand(0), Depth + 1, Q); + if (ShAmt->uge(TyBits) || // Bad shift. + ShAmt->uge(Tmp)) break; // Shifted all sign bits out. Tmp2 = ShAmt->getZExtValue(); - if (Tmp2 >= TyBits || // Bad shift. - Tmp2 >= Tmp) break; // Shifted all sign bits out. return Tmp - Tmp2; } break; @@ -4161,6 +4161,81 @@ static SelectPatternResult matchClamp(CmpInst::Predica return {SPF_UNKNOWN, SPNB_NA, false}; } +/// Recognize variations of: +/// a < c ? min(a,b) : min(b,c) ==> min(min(a,b),min(b,c)) +static SelectPatternResult matchMinMaxOfMinMax(CmpInst::Predicate Pred, + Value *CmpLHS, Value *CmpRHS, + Value *TrueVal, Value *FalseVal) { + // TODO: Allow FP min/max with nnan/nsz. + assert(CmpInst::isIntPredicate(Pred) && "Expected integer comparison"); + + Value *A, *B; + SelectPatternResult L = matchSelectPattern(TrueVal, A, B); + if (!SelectPatternResult::isMinOrMax(L.Flavor)) + return {SPF_UNKNOWN, SPNB_NA, false}; + + Value *C, *D; + SelectPatternResult R = matchSelectPattern(FalseVal, C, D); + if (L.Flavor != R.Flavor) + return {SPF_UNKNOWN, SPNB_NA, false}; + + // Match the compare to the min/max operations of the select operands. + switch (L.Flavor) { + case SPF_SMIN: + if (Pred == ICmpInst::ICMP_SGT || Pred == ICmpInst::ICMP_SGE) { + Pred = ICmpInst::getSwappedPredicate(Pred); + std::swap(CmpLHS, CmpRHS); + } + if (Pred == ICmpInst::ICMP_SLT || Pred == ICmpInst::ICMP_SLE) + break; + return {SPF_UNKNOWN, SPNB_NA, false}; + case SPF_SMAX: + if (Pred == ICmpInst::ICMP_SLT || Pred == ICmpInst::ICMP_SLE) { + Pred = ICmpInst::getSwappedPredicate(Pred); + std::swap(CmpLHS, CmpRHS); + } + if (Pred == ICmpInst::ICMP_SGT || Pred == ICmpInst::ICMP_SGE) + break; + return {SPF_UNKNOWN, SPNB_NA, false}; + case SPF_UMIN: + if (Pred == ICmpInst::ICMP_UGT || Pred == ICmpInst::ICMP_UGE) { + Pred = ICmpInst::getSwappedPredicate(Pred); + std::swap(CmpLHS, CmpRHS); + } + if (Pred == ICmpInst::ICMP_ULT || Pred == ICmpInst::ICMP_ULE) + break; + return {SPF_UNKNOWN, SPNB_NA, false}; + case SPF_UMAX: + if (Pred == ICmpInst::ICMP_ULT || Pred == ICmpInst::ICMP_ULE) { + Pred = ICmpInst::getSwappedPredicate(Pred); + std::swap(CmpLHS, CmpRHS); + } + if (Pred == ICmpInst::ICMP_UGT || Pred == ICmpInst::ICMP_UGE) + break; + return {SPF_UNKNOWN, SPNB_NA, false}; + default: + llvm_unreachable("Bad flavor while matching min/max"); + } + + // a pred c ? m(a, b) : m(c, b) --> m(m(a, b), m(c, b)) + if (CmpLHS == A && CmpRHS == C && D == B) + return {L.Flavor, SPNB_NA, false}; + + // a pred d ? m(a, b) : m(b, d) --> m(m(a, b), m(b, d)) + if (CmpLHS == A && CmpRHS == D && C == B) + return {L.Flavor, SPNB_NA, false}; + + // b pred c ? m(a, b) : m(c, a) --> m(m(a, b), m(c, a)) + if (CmpLHS == B && CmpRHS == C && D == A) + return {L.Flavor, SPNB_NA, false}; + + // b pred d ? m(a, b) : m(a, d) --> m(m(a, b), m(a, d)) + if (CmpLHS == B && CmpRHS == D && C == A) + return {L.Flavor, SPNB_NA, false}; + + return {SPF_UNKNOWN, SPNB_NA, false}; +} + /// Match non-obvious integer minimum and maximum sequences. static SelectPatternResult matchMinMax(CmpInst::Predicate Pred, Value *CmpLHS, Value *CmpRHS, @@ -4174,6 +4249,10 @@ static SelectPatternResult matchMinMax(CmpInst::Predic if (SPR.Flavor != SelectPatternFlavor::SPF_UNKNOWN) return SPR; + SPR = matchMinMaxOfMinMax(Pred, CmpLHS, CmpRHS, TrueVal, FalseVal); + if (SPR.Flavor != SelectPatternFlavor::SPF_UNKNOWN) + return SPR; + if (Pred != CmpInst::ICMP_SGT && Pred != CmpInst::ICMP_SLT) return {SPF_UNKNOWN, SPNB_NA, false}; Modified: vendor/llvm/dist-release_60/lib/CodeGen/CodeGenPrepare.cpp ============================================================================== --- vendor/llvm/dist-release_60/lib/CodeGen/CodeGenPrepare.cpp Sat Jan 6 21:19:52 2018 (r327638) +++ vendor/llvm/dist-release_60/lib/CodeGen/CodeGenPrepare.cpp Sat Jan 6 21:34:26 2018 (r327639) @@ -633,16 +633,10 @@ bool CodeGenPrepare::isMergingEmptyBlockProfitable(Bas if (DestBBPred == BB) continue; - bool HasAllSameValue = true; - BasicBlock::const_iterator DestBBI = DestBB->begin(); - while (const PHINode *DestPN = dyn_cast(DestBBI++)) { - if (DestPN->getIncomingValueForBlock(BB) != - DestPN->getIncomingValueForBlock(DestBBPred)) { - HasAllSameValue = false; - break; - } - } - if (HasAllSameValue) + if (llvm::all_of(DestBB->phis(), [&](const PHINode &DestPN) { + return DestPN.getIncomingValueForBlock(BB) == + DestPN.getIncomingValueForBlock(DestBBPred); + })) SameIncomingValueBBs.insert(DestBBPred); } @@ -672,9 +666,8 @@ bool CodeGenPrepare::canMergeBlocks(const BasicBlock * // We only want to eliminate blocks whose phi nodes are used by phi nodes in // the successor. If there are more complex condition (e.g. preheaders), // don't mess around with them. - BasicBlock::const_iterator BBI = BB->begin(); - while (const PHINode *PN = dyn_cast(BBI++)) { - for (const User *U : PN->users()) { + for (const PHINode &PN : BB->phis()) { + for (const User *U : PN.users()) { const Instruction *UI = cast(U); if (UI->getParent() != DestBB || !isa(UI)) return false; @@ -713,10 +706,9 @@ bool CodeGenPrepare::canMergeBlocks(const BasicBlock * for (unsigned i = 0, e = DestBBPN->getNumIncomingValues(); i != e; ++i) { BasicBlock *Pred = DestBBPN->getIncomingBlock(i); if (BBPreds.count(Pred)) { // Common predecessor? - BBI = DestBB->begin(); - while (const PHINode *PN = dyn_cast(BBI++)) { - const Value *V1 = PN->getIncomingValueForBlock(Pred); - const Value *V2 = PN->getIncomingValueForBlock(BB); + for (const PHINode &PN : DestBB->phis()) { + const Value *V1 = PN.getIncomingValueForBlock(Pred); + const Value *V2 = PN.getIncomingValueForBlock(BB); // If V2 is a phi node in BB, look up what the mapped value will be. if (const PHINode *V2PN = dyn_cast(V2)) @@ -759,11 +751,9 @@ void CodeGenPrepare::eliminateMostlyEmptyBlock(BasicBl // Otherwise, we have multiple predecessors of BB. Update the PHIs in DestBB // to handle the new incoming edges it is about to have. - PHINode *PN; - for (BasicBlock::iterator BBI = DestBB->begin(); - (PN = dyn_cast(BBI)); ++BBI) { + for (PHINode &PN : DestBB->phis()) { // Remove the incoming value for BB, and remember it. - Value *InVal = PN->removeIncomingValue(BB, false); + Value *InVal = PN.removeIncomingValue(BB, false); // Two options: either the InVal is a phi node defined in BB or it is some // value that dominates BB. @@ -771,17 +761,17 @@ void CodeGenPrepare::eliminateMostlyEmptyBlock(BasicBl if (InValPhi && InValPhi->getParent() == BB) { // Add all of the input values of the input PHI as inputs of this phi. for (unsigned i = 0, e = InValPhi->getNumIncomingValues(); i != e; ++i) - PN->addIncoming(InValPhi->getIncomingValue(i), - InValPhi->getIncomingBlock(i)); + PN.addIncoming(InValPhi->getIncomingValue(i), + InValPhi->getIncomingBlock(i)); } else { // Otherwise, add one instance of the dominating value for each edge that // we will be adding. if (PHINode *BBPN = dyn_cast(BB->begin())) { for (unsigned i = 0, e = BBPN->getNumIncomingValues(); i != e; ++i) - PN->addIncoming(InVal, BBPN->getIncomingBlock(i)); + PN.addIncoming(InVal, BBPN->getIncomingBlock(i)); } else { for (pred_iterator PI = pred_begin(BB), E = pred_end(BB); PI != E; ++PI) - PN->addIncoming(InVal, *PI); + PN.addIncoming(InVal, *PI); } } } @@ -6497,22 +6487,16 @@ bool CodeGenPrepare::splitBranchCondition(Function &F) std::swap(TBB, FBB); // Replace the old BB with the new BB. - for (auto &I : *TBB) { - PHINode *PN = dyn_cast(&I); - if (!PN) - break; + for (PHINode &PN : TBB->phis()) { int i; - while ((i = PN->getBasicBlockIndex(&BB)) >= 0) - PN->setIncomingBlock(i, TmpBB); + while ((i = PN.getBasicBlockIndex(&BB)) >= 0) + PN.setIncomingBlock(i, TmpBB); } // Add another incoming edge form the new BB. - for (auto &I : *FBB) { - PHINode *PN = dyn_cast(&I); - if (!PN) - break; - auto *Val = PN->getIncomingValueForBlock(&BB); - PN->addIncoming(Val, TmpBB); + for (PHINode &PN : FBB->phis()) { + auto *Val = PN.getIncomingValueForBlock(&BB); + PN.addIncoming(Val, TmpBB); } // Update the branch weights (from SelectionDAGBuilder:: Modified: vendor/llvm/dist-release_60/lib/CodeGen/GlobalISel/IRTranslator.cpp ============================================================================== --- vendor/llvm/dist-release_60/lib/CodeGen/GlobalISel/IRTranslator.cpp Sat Jan 6 21:19:52 2018 (r327638) +++ vendor/llvm/dist-release_60/lib/CodeGen/GlobalISel/IRTranslator.cpp Sat Jan 6 21:34:26 2018 (r327639) @@ -815,7 +815,14 @@ bool IRTranslator::translateCall(const User &U, Machin if (CI.isInlineAsm()) return translateInlineAsm(CI, MIRBuilder); - if (!F || !F->isIntrinsic()) { + Intrinsic::ID ID = Intrinsic::not_intrinsic; + if (F && F->isIntrinsic()) { + ID = F->getIntrinsicID(); + if (TII && ID == Intrinsic::not_intrinsic) + ID = static_cast(TII->getIntrinsicID(F)); + } + + if (!F || !F->isIntrinsic() || ID == Intrinsic::not_intrinsic) { unsigned Res = CI.getType()->isVoidTy() ? 0 : getOrCreateVReg(CI); SmallVector Args; for (auto &Arg: CI.arg_operands()) @@ -826,10 +833,6 @@ bool IRTranslator::translateCall(const User &U, Machin return getOrCreateVReg(*CI.getCalledValue()); }); } - - Intrinsic::ID ID = F->getIntrinsicID(); - if (TII && ID == Intrinsic::not_intrinsic) - ID = static_cast(TII->getIntrinsicID(F)); assert(ID != Intrinsic::not_intrinsic && "unknown intrinsic"); Modified: vendor/llvm/dist-release_60/lib/CodeGen/GlobalISel/LegalizerHelper.cpp ============================================================================== --- vendor/llvm/dist-release_60/lib/CodeGen/GlobalISel/LegalizerHelper.cpp Sat Jan 6 21:19:52 2018 (r327638) +++ vendor/llvm/dist-release_60/lib/CodeGen/GlobalISel/LegalizerHelper.cpp Sat Jan 6 21:34:26 2018 (r327639) @@ -813,7 +813,21 @@ LegalizerHelper::lower(MachineInstr &MI, unsigned Type unsigned Zero = MRI.createGenericVirtualRegister(Ty); MIRBuilder.buildConstant(Zero, 0); - MIRBuilder.buildICmp(CmpInst::ICMP_NE, Overflow, HiPart, Zero); + + // For *signed* multiply, overflow is detected by checking: + // (hi != (lo >> bitwidth-1)) + if (Opcode == TargetOpcode::G_SMULH) { + unsigned Shifted = MRI.createGenericVirtualRegister(Ty); + unsigned ShiftAmt = MRI.createGenericVirtualRegister(Ty); + MIRBuilder.buildConstant(ShiftAmt, Ty.getSizeInBits() - 1); + MIRBuilder.buildInstr(TargetOpcode::G_ASHR) + .addDef(Shifted) + .addUse(Res) + .addUse(ShiftAmt); + MIRBuilder.buildICmp(CmpInst::ICMP_NE, Overflow, HiPart, Shifted); + } else { + MIRBuilder.buildICmp(CmpInst::ICMP_NE, Overflow, HiPart, Zero); + } MI.eraseFromParent(); return Legalized; } Modified: vendor/llvm/dist-release_60/lib/CodeGen/LLVMTargetMachine.cpp ============================================================================== --- vendor/llvm/dist-release_60/lib/CodeGen/LLVMTargetMachine.cpp Sat Jan 6 21:19:52 2018 (r327638) +++ vendor/llvm/dist-release_60/lib/CodeGen/LLVMTargetMachine.cpp Sat Jan 6 21:34:26 2018 (r327639) @@ -136,8 +136,7 @@ bool LLVMTargetMachine::addAsmPrinter(PassManagerBase MCE = getTarget().createMCCodeEmitter(MII, MRI, Context); MCAsmBackend *MAB = - getTarget().createMCAsmBackend(MRI, getTargetTriple().str(), TargetCPU, - Options.MCOptions); + getTarget().createMCAsmBackend(STI, MRI, Options.MCOptions); auto FOut = llvm::make_unique(Out); MCStreamer *S = getTarget().createAsmStreamer( Context, std::move(FOut), Options.MCOptions.AsmVerbose, @@ -151,8 +150,7 @@ bool LLVMTargetMachine::addAsmPrinter(PassManagerBase // emission fails. MCCodeEmitter *MCE = getTarget().createMCCodeEmitter(MII, MRI, Context); MCAsmBackend *MAB = - getTarget().createMCAsmBackend(MRI, getTargetTriple().str(), TargetCPU, - Options.MCOptions); + getTarget().createMCAsmBackend(STI, MRI, Options.MCOptions); if (!MCE || !MAB) return true; @@ -225,17 +223,16 @@ bool LLVMTargetMachine::addPassesToEmitMC(PassManagerB // Create the code emitter for the target if it exists. If not, .o file // emission fails. + const MCSubtargetInfo &STI = *getMCSubtargetInfo(); const MCRegisterInfo &MRI = *getMCRegisterInfo(); MCCodeEmitter *MCE = getTarget().createMCCodeEmitter(*getMCInstrInfo(), MRI, *Ctx); MCAsmBackend *MAB = - getTarget().createMCAsmBackend(MRI, getTargetTriple().str(), TargetCPU, - Options.MCOptions); + getTarget().createMCAsmBackend(STI, MRI, Options.MCOptions); if (!MCE || !MAB) return true; const Triple &T = getTargetTriple(); - const MCSubtargetInfo &STI = *getMCSubtargetInfo(); std::unique_ptr AsmStreamer(getTarget().createMCObjectStreamer( T, *Ctx, std::unique_ptr(MAB), Out, std::unique_ptr(MCE), STI, Options.MCOptions.MCRelaxAll, Modified: vendor/llvm/dist-release_60/lib/CodeGen/LiveDebugVariables.cpp ============================================================================== --- vendor/llvm/dist-release_60/lib/CodeGen/LiveDebugVariables.cpp Sat Jan 6 21:19:52 2018 (r327638) +++ vendor/llvm/dist-release_60/lib/CodeGen/LiveDebugVariables.cpp Sat Jan 6 21:34:26 2018 (r327639) @@ -242,8 +242,11 @@ class UserValue { (public) // We are storing a MachineOperand outside a MachineInstr. locations.back().clearParent(); // Don't store def operands. - if (locations.back().isReg()) + if (locations.back().isReg()) { + if (locations.back().isDef()) + locations.back().setIsDead(false); locations.back().setIsUse(); + } return locations.size() - 1; } Modified: vendor/llvm/dist-release_60/lib/CodeGen/SelectionDAG/DAGCombiner.cpp ============================================================================== --- vendor/llvm/dist-release_60/lib/CodeGen/SelectionDAG/DAGCombiner.cpp Sat Jan 6 21:19:52 2018 (r327638) +++ vendor/llvm/dist-release_60/lib/CodeGen/SelectionDAG/DAGCombiner.cpp Sat Jan 6 21:34:26 2018 (r327639) @@ -3850,7 +3850,6 @@ bool DAGCombiner::SearchForAndLoads(SDNode *N, return false; } case ISD::ZERO_EXTEND: - case ISD::ANY_EXTEND: case ISD::AssertZext: { unsigned ActiveBits = Mask->getAPIntValue().countTrailingOnes(); EVT ExtVT = EVT::getIntegerVT(*DAG.getContext(), ActiveBits); @@ -13783,30 +13782,30 @@ SDValue DAGCombiner::visitSTORE(SDNode *N) { } } - // Deal with elidable overlapping chained stores. - if (StoreSDNode *ST1 = dyn_cast(Chain)) - if (OptLevel != CodeGenOpt::None && ST->isUnindexed() && - ST1->isUnindexed() && !ST1->isVolatile() && ST1->hasOneUse() && - !ST1->getBasePtr().isUndef() && !ST->isVolatile()) { - BaseIndexOffset STBasePtr = BaseIndexOffset::match(ST->getBasePtr(), DAG); - BaseIndexOffset ST1BasePtr = - BaseIndexOffset::match(ST1->getBasePtr(), DAG); - unsigned STBytes = ST->getMemoryVT().getStoreSize(); - unsigned ST1Bytes = ST1->getMemoryVT().getStoreSize(); - int64_t PtrDiff; - // If this is a store who's preceeding store to a subset of the same - // memory and no one other node is chained to that store we can - // effectively drop the store. Do not remove stores to undef as they may - // be used as data sinks. + if (StoreSDNode *ST1 = dyn_cast(Chain)) { + if (ST->isUnindexed() && !ST->isVolatile() && ST1->isUnindexed() && + !ST1->isVolatile() && ST1->getBasePtr() == Ptr && + ST->getMemoryVT() == ST1->getMemoryVT()) { + // If this is a store followed by a store with the same value to the same + // location, then the store is dead/noop. + if (ST1->getValue() == Value) { + // The store is dead, remove it. + return Chain; + } - if (((ST->getBasePtr() == ST1->getBasePtr()) && - (ST->getValue() == ST1->getValue())) || - (STBasePtr.equalBaseIndex(ST1BasePtr, DAG, PtrDiff) && - (0 <= PtrDiff) && (PtrDiff + ST1Bytes <= STBytes))) { + // If this is a store who's preceeding store to the same location + // and no one other node is chained to that store we can effectively + // drop the store. Do not remove stores to undef as they may be used as + // data sinks. + if (OptLevel != CodeGenOpt::None && ST1->hasOneUse() && + !ST1->getBasePtr().isUndef()) { + // ST1 is fully overwritten and can be elided. Combine with it's chain + // value. CombineTo(ST1, ST1->getChain()); - return SDValue(N, 0); + return SDValue(); } } + } // If this is an FP_ROUND or TRUNC followed by a store, fold this into a // truncating store. We can do this even if this is already a truncstore. Modified: vendor/llvm/dist-release_60/lib/CodeGen/SelectionDAG/FastISel.cpp ============================================================================== --- vendor/llvm/dist-release_60/lib/CodeGen/SelectionDAG/FastISel.cpp Sat Jan 6 21:19:52 2018 (r327638) +++ vendor/llvm/dist-release_60/lib/CodeGen/SelectionDAG/FastISel.cpp Sat Jan 6 21:34:26 2018 (r327639) @@ -2051,11 +2051,9 @@ bool FastISel::handlePHINodesInSuccessorBlocks(const B // At this point we know that there is a 1-1 correspondence between LLVM PHI // nodes and Machine PHI nodes, but the incoming operands have not been // emitted yet. - for (BasicBlock::const_iterator I = SuccBB->begin(); - const auto *PN = dyn_cast(I); ++I) { - + for (const PHINode &PN : SuccBB->phis()) { // Ignore dead phi's. - if (PN->use_empty()) + if (PN.use_empty()) continue; // Only handle legal types. Two interesting things to note here. First, @@ -2064,7 +2062,7 @@ bool FastISel::handlePHINodesInSuccessorBlocks(const B // own moves. Second, this check is necessary because FastISel doesn't // use CreateRegs to create registers, so it always creates // exactly one register for each non-void instruction. - EVT VT = TLI.getValueType(DL, PN->getType(), /*AllowUnknown=*/true); + EVT VT = TLI.getValueType(DL, PN.getType(), /*AllowUnknown=*/true); if (VT == MVT::Other || !TLI.isTypeLegal(VT)) { // Handle integer promotions, though, because they're common and easy. if (!(VT == MVT::i1 || VT == MVT::i8 || VT == MVT::i16)) { @@ -2073,11 +2071,11 @@ bool FastISel::handlePHINodesInSuccessorBlocks(const B } } - const Value *PHIOp = PN->getIncomingValueForBlock(LLVMBB); + const Value *PHIOp = PN.getIncomingValueForBlock(LLVMBB); // Set the DebugLoc for the copy. Prefer the location of the operand // if there is one; use the location of the PHI otherwise. - DbgLoc = PN->getDebugLoc(); + DbgLoc = PN.getDebugLoc(); if (const auto *Inst = dyn_cast(PHIOp)) DbgLoc = Inst->getDebugLoc(); Modified: vendor/llvm/dist-release_60/lib/CodeGen/SelectionDAG/FunctionLoweringInfo.cpp ============================================================================== --- vendor/llvm/dist-release_60/lib/CodeGen/SelectionDAG/FunctionLoweringInfo.cpp Sat Jan 6 21:19:52 2018 (r327638) +++ vendor/llvm/dist-release_60/lib/CodeGen/SelectionDAG/FunctionLoweringInfo.cpp Sat Jan 6 21:34:26 2018 (r327639) @@ -257,20 +257,20 @@ void FunctionLoweringInfo::set(const Function &fn, Mac // Create Machine PHI nodes for LLVM PHI nodes, lowering them as // appropriate. - for (BasicBlock::const_iterator I = BB.begin(); - const PHINode *PN = dyn_cast(I); ++I) { - if (PN->use_empty()) continue; + for (const PHINode &PN : BB.phis()) { + if (PN.use_empty()) + continue; // Skip empty types - if (PN->getType()->isEmptyTy()) + if (PN.getType()->isEmptyTy()) *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@freebsd.org Sat Jan 6 21:35:49 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 87432DF3458; Sat, 6 Jan 2018 21:35:49 +0000 (UTC) (envelope-from dim@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 C415780F17; Sat, 6 Jan 2018 21:35:48 +0000 (UTC) (envelope-from dim@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 0139217F25; Sat, 6 Jan 2018 21:35:48 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w06LZlxd067265; Sat, 6 Jan 2018 21:35:47 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w06LZlDa067262; Sat, 6 Jan 2018 21:35:47 GMT (envelope-from dim@FreeBSD.org) Message-Id: <201801062135.w06LZlDa067262@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Sat, 6 Jan 2018 21:35:47 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r327641 - in vendor/clang/dist-release_60: docs include/clang/AST include/clang/Basic include/clang/Config include/clang/Driver include/clang/Parse include/clang/Sema lib/AST lib/Basic ... X-SVN-Group: vendor X-SVN-Commit-Author: dim X-SVN-Commit-Paths: in vendor/clang/dist-release_60: docs include/clang/AST include/clang/Basic include/clang/Config include/clang/Driver include/clang/Parse include/clang/Sema lib/AST lib/Basic lib/Basic/Targets lib/Cod... X-SVN-Commit-Revision: 327641 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 06 Jan 2018 21:35:49 -0000 Author: dim Date: Sat Jan 6 21:35:46 2018 New Revision: 327641 URL: https://svnweb.freebsd.org/changeset/base/327641 Log: Vendor import of clang release_60 branch r321788: https://llvm.org/svn/llvm-project/cfe/branches/release_60@321788 Added: vendor/clang/dist-release_60/test/Driver/Inputs/config/ vendor/clang/dist-release_60/test/Driver/Inputs/config-1.cfg vendor/clang/dist-release_60/test/Driver/Inputs/config-2.cfg vendor/clang/dist-release_60/test/Driver/Inputs/config-2a.cfg vendor/clang/dist-release_60/test/Driver/Inputs/config-3.cfg vendor/clang/dist-release_60/test/Driver/Inputs/config-4.cfg vendor/clang/dist-release_60/test/Driver/Inputs/config-5.cfg vendor/clang/dist-release_60/test/Driver/Inputs/config-6.cfg vendor/clang/dist-release_60/test/Driver/Inputs/config/config-4.cfg vendor/clang/dist-release_60/test/Driver/Inputs/config/i386-qqq.cfg vendor/clang/dist-release_60/test/Driver/Inputs/config/i386-qqq3.cfg vendor/clang/dist-release_60/test/Driver/Inputs/config/x86_64-qqq.cfg vendor/clang/dist-release_60/test/Driver/Inputs/config/x86_64-qqq2.cfg vendor/clang/dist-release_60/test/Driver/Inputs/config/x86_64.cfg vendor/clang/dist-release_60/test/Driver/Inputs/config2/ vendor/clang/dist-release_60/test/Driver/Inputs/config2/config-4.cfg vendor/clang/dist-release_60/test/Driver/Inputs/config2/i386.cfg vendor/clang/dist-release_60/test/Driver/config-file-errs.c (contents, props changed) vendor/clang/dist-release_60/test/Driver/config-file.c (contents, props changed) vendor/clang/dist-release_60/test/Driver/config-file2.c (contents, props changed) vendor/clang/dist-release_60/test/Driver/config-file3.c (contents, props changed) Modified: vendor/clang/dist-release_60/docs/AttributeReference.rst vendor/clang/dist-release_60/docs/ClangCommandLineReference.rst vendor/clang/dist-release_60/docs/ReleaseNotes.rst vendor/clang/dist-release_60/docs/UsersManual.rst vendor/clang/dist-release_60/include/clang/AST/StmtOpenMP.h vendor/clang/dist-release_60/include/clang/Basic/DiagnosticDriverKinds.td vendor/clang/dist-release_60/include/clang/Basic/DiagnosticGroups.td vendor/clang/dist-release_60/include/clang/Basic/DiagnosticSemaKinds.td vendor/clang/dist-release_60/include/clang/Basic/LangOptions.def vendor/clang/dist-release_60/include/clang/Config/config.h.cmake vendor/clang/dist-release_60/include/clang/Driver/Driver.h vendor/clang/dist-release_60/include/clang/Driver/Options.td vendor/clang/dist-release_60/include/clang/Parse/Parser.h vendor/clang/dist-release_60/include/clang/Parse/RAIIObjectsForParser.h vendor/clang/dist-release_60/include/clang/Sema/DeclSpec.h vendor/clang/dist-release_60/include/clang/Sema/Sema.h vendor/clang/dist-release_60/lib/AST/Decl.cpp vendor/clang/dist-release_60/lib/Basic/Targets/X86.cpp vendor/clang/dist-release_60/lib/Basic/Version.cpp vendor/clang/dist-release_60/lib/CodeGen/CGDeclCXX.cpp vendor/clang/dist-release_60/lib/CodeGen/CGException.cpp vendor/clang/dist-release_60/lib/CodeGen/CGExpr.cpp vendor/clang/dist-release_60/lib/CodeGen/CGOpenMPRuntime.cpp vendor/clang/dist-release_60/lib/CodeGen/CGOpenMPRuntime.h vendor/clang/dist-release_60/lib/CodeGen/CGStmt.cpp vendor/clang/dist-release_60/lib/CodeGen/CGStmtOpenMP.cpp vendor/clang/dist-release_60/lib/CodeGen/CodeGenFunction.cpp vendor/clang/dist-release_60/lib/CodeGen/CodeGenFunction.h vendor/clang/dist-release_60/lib/CodeGen/CodeGenModule.cpp vendor/clang/dist-release_60/lib/Driver/Driver.cpp vendor/clang/dist-release_60/lib/Driver/ToolChains/Clang.cpp vendor/clang/dist-release_60/lib/Driver/ToolChains/Darwin.cpp vendor/clang/dist-release_60/lib/Frontend/CompilerInvocation.cpp vendor/clang/dist-release_60/lib/Frontend/InitPreprocessor.cpp vendor/clang/dist-release_60/lib/Headers/emmintrin.h vendor/clang/dist-release_60/lib/Headers/pmmintrin.h vendor/clang/dist-release_60/lib/Headers/smmintrin.h vendor/clang/dist-release_60/lib/Parse/ParseDecl.cpp vendor/clang/dist-release_60/lib/Parse/ParseDeclCXX.cpp vendor/clang/dist-release_60/lib/Parse/ParseExpr.cpp vendor/clang/dist-release_60/lib/Parse/ParseExprCXX.cpp vendor/clang/dist-release_60/lib/Parse/ParseObjc.cpp vendor/clang/dist-release_60/lib/Parse/ParseOpenMP.cpp vendor/clang/dist-release_60/lib/Parse/ParseStmt.cpp vendor/clang/dist-release_60/lib/Parse/ParseTemplate.cpp vendor/clang/dist-release_60/lib/Parse/Parser.cpp vendor/clang/dist-release_60/lib/Sema/DeclSpec.cpp vendor/clang/dist-release_60/lib/Sema/SemaCodeComplete.cpp vendor/clang/dist-release_60/lib/Sema/SemaDecl.cpp vendor/clang/dist-release_60/lib/Sema/SemaDeclCXX.cpp vendor/clang/dist-release_60/lib/Sema/SemaDeclObjC.cpp vendor/clang/dist-release_60/lib/Sema/SemaExpr.cpp vendor/clang/dist-release_60/lib/Sema/SemaExprCXX.cpp vendor/clang/dist-release_60/lib/Sema/SemaExprMember.cpp vendor/clang/dist-release_60/lib/Sema/SemaLambda.cpp vendor/clang/dist-release_60/lib/Sema/SemaOverload.cpp vendor/clang/dist-release_60/lib/Sema/SemaStmt.cpp vendor/clang/dist-release_60/lib/Sema/SemaTemplate.cpp vendor/clang/dist-release_60/lib/Sema/SemaTemplateDeduction.cpp vendor/clang/dist-release_60/lib/Sema/SemaTemplateInstantiateDecl.cpp vendor/clang/dist-release_60/lib/Sema/SemaType.cpp vendor/clang/dist-release_60/lib/StaticAnalyzer/Core/BugReporter.cpp vendor/clang/dist-release_60/test/Analysis/call_once.cpp vendor/clang/dist-release_60/test/CXX/over/over.match/over.match.funcs/p4-0x.cpp vendor/clang/dist-release_60/test/CXX/stmt.stmt/stmt.iter/stmt.ranged/p1.cpp vendor/clang/dist-release_60/test/Driver/darwin-version.c vendor/clang/dist-release_60/test/Index/annotate-tokens.cpp vendor/clang/dist-release_60/test/OpenMP/atomic_ast_print.cpp vendor/clang/dist-release_60/test/OpenMP/atomic_capture_codegen.cpp vendor/clang/dist-release_60/test/OpenMP/atomic_codegen.cpp vendor/clang/dist-release_60/test/OpenMP/atomic_messages.c vendor/clang/dist-release_60/test/OpenMP/atomic_messages.cpp vendor/clang/dist-release_60/test/OpenMP/atomic_read_codegen.c vendor/clang/dist-release_60/test/OpenMP/atomic_update_codegen.cpp vendor/clang/dist-release_60/test/OpenMP/atomic_write_codegen.c vendor/clang/dist-release_60/test/OpenMP/barrier_ast_print.cpp vendor/clang/dist-release_60/test/OpenMP/barrier_codegen.cpp vendor/clang/dist-release_60/test/OpenMP/barrier_messages.cpp vendor/clang/dist-release_60/test/OpenMP/cancel_ast_print.cpp vendor/clang/dist-release_60/test/OpenMP/cancel_codegen.cpp vendor/clang/dist-release_60/test/OpenMP/cancel_codegen_cleanup.cpp vendor/clang/dist-release_60/test/OpenMP/cancel_if_messages.cpp vendor/clang/dist-release_60/test/OpenMP/cancel_messages.cpp vendor/clang/dist-release_60/test/OpenMP/cancellation_point_ast_print.cpp vendor/clang/dist-release_60/test/OpenMP/cancellation_point_codegen.cpp vendor/clang/dist-release_60/test/OpenMP/cancellation_point_messages.cpp vendor/clang/dist-release_60/test/OpenMP/capturing_in_templates.cpp vendor/clang/dist-release_60/test/OpenMP/critical_ast_print.cpp vendor/clang/dist-release_60/test/OpenMP/critical_codegen.cpp vendor/clang/dist-release_60/test/OpenMP/critical_messages.cpp vendor/clang/dist-release_60/test/OpenMP/debug-info-openmp-array.cpp vendor/clang/dist-release_60/test/OpenMP/declare_reduction_ast_print.c vendor/clang/dist-release_60/test/OpenMP/declare_reduction_ast_print.cpp vendor/clang/dist-release_60/test/OpenMP/declare_reduction_codegen.c vendor/clang/dist-release_60/test/OpenMP/declare_reduction_codegen.cpp vendor/clang/dist-release_60/test/OpenMP/declare_reduction_messages.c vendor/clang/dist-release_60/test/OpenMP/declare_reduction_messages.cpp vendor/clang/dist-release_60/test/OpenMP/declare_simd_ast_print.c vendor/clang/dist-release_60/test/OpenMP/declare_simd_ast_print.cpp vendor/clang/dist-release_60/test/OpenMP/declare_simd_codegen.cpp vendor/clang/dist-release_60/test/OpenMP/declare_simd_messages.cpp vendor/clang/dist-release_60/test/OpenMP/declare_target_ast_print.cpp vendor/clang/dist-release_60/test/OpenMP/declare_target_messages.cpp vendor/clang/dist-release_60/test/OpenMP/distribute_ast_print.cpp vendor/clang/dist-release_60/test/OpenMP/distribute_codegen.cpp vendor/clang/dist-release_60/test/OpenMP/distribute_collapse_messages.cpp vendor/clang/dist-release_60/test/OpenMP/distribute_dist_schedule_ast_print.cpp vendor/clang/dist-release_60/test/OpenMP/distribute_dist_schedule_messages.cpp vendor/clang/dist-release_60/test/OpenMP/distribute_firstprivate_codegen.cpp vendor/clang/dist-release_60/test/OpenMP/distribute_firstprivate_messages.cpp vendor/clang/dist-release_60/test/OpenMP/distribute_lastprivate_codegen.cpp vendor/clang/dist-release_60/test/OpenMP/distribute_parallel_for_ast_print.cpp vendor/clang/dist-release_60/test/OpenMP/distribute_parallel_for_codegen.cpp vendor/clang/dist-release_60/test/OpenMP/distribute_parallel_for_collapse_messages.cpp vendor/clang/dist-release_60/test/OpenMP/distribute_parallel_for_copyin_messages.cpp vendor/clang/dist-release_60/test/OpenMP/distribute_parallel_for_default_messages.cpp vendor/clang/dist-release_60/test/OpenMP/distribute_parallel_for_dist_schedule_messages.cpp vendor/clang/dist-release_60/test/OpenMP/distribute_parallel_for_firstprivate_codegen.cpp vendor/clang/dist-release_60/test/OpenMP/distribute_parallel_for_firstprivate_messages.cpp vendor/clang/dist-release_60/test/OpenMP/distribute_parallel_for_if_codegen.cpp vendor/clang/dist-release_60/test/OpenMP/distribute_parallel_for_if_messages.cpp vendor/clang/dist-release_60/test/OpenMP/distribute_parallel_for_lastprivate_codegen.cpp vendor/clang/dist-release_60/test/OpenMP/distribute_parallel_for_lastprivate_messages.cpp vendor/clang/dist-release_60/test/OpenMP/distribute_parallel_for_messages.cpp vendor/clang/dist-release_60/test/OpenMP/distribute_parallel_for_num_threads_codegen.cpp vendor/clang/dist-release_60/test/OpenMP/distribute_parallel_for_num_threads_messages.cpp vendor/clang/dist-release_60/test/OpenMP/distribute_parallel_for_private_codegen.cpp vendor/clang/dist-release_60/test/OpenMP/distribute_parallel_for_private_messages.cpp vendor/clang/dist-release_60/test/OpenMP/distribute_parallel_for_proc_bind_codegen.cpp vendor/clang/dist-release_60/test/OpenMP/distribute_parallel_for_proc_bind_messages.cpp vendor/clang/dist-release_60/test/OpenMP/distribute_parallel_for_reduction_messages.cpp vendor/clang/dist-release_60/test/OpenMP/distribute_parallel_for_schedule_messages.cpp vendor/clang/dist-release_60/test/OpenMP/distribute_parallel_for_shared_messages.cpp vendor/clang/dist-release_60/test/OpenMP/distribute_parallel_for_simd_aligned_messages.cpp vendor/clang/dist-release_60/test/OpenMP/distribute_parallel_for_simd_ast_print.cpp vendor/clang/dist-release_60/test/OpenMP/distribute_parallel_for_simd_codegen.cpp vendor/clang/dist-release_60/test/OpenMP/distribute_parallel_for_simd_collapse_messages.cpp vendor/clang/dist-release_60/test/OpenMP/distribute_parallel_for_simd_copyin_messages.cpp vendor/clang/dist-release_60/test/OpenMP/distribute_parallel_for_simd_default_messages.cpp vendor/clang/dist-release_60/test/OpenMP/distribute_parallel_for_simd_dist_schedule_messages.cpp vendor/clang/dist-release_60/test/OpenMP/distribute_parallel_for_simd_firstprivate_codegen.cpp vendor/clang/dist-release_60/test/OpenMP/distribute_parallel_for_simd_firstprivate_messages.cpp vendor/clang/dist-release_60/test/OpenMP/distribute_parallel_for_simd_if_codegen.cpp vendor/clang/dist-release_60/test/OpenMP/distribute_parallel_for_simd_if_messages.cpp vendor/clang/dist-release_60/test/OpenMP/distribute_parallel_for_simd_lastprivate_codegen.cpp vendor/clang/dist-release_60/test/OpenMP/distribute_parallel_for_simd_lastprivate_messages.cpp vendor/clang/dist-release_60/test/OpenMP/distribute_parallel_for_simd_linear_messages.cpp vendor/clang/dist-release_60/test/OpenMP/distribute_parallel_for_simd_loop_messages.cpp vendor/clang/dist-release_60/test/OpenMP/distribute_parallel_for_simd_misc_messages.c vendor/clang/dist-release_60/test/OpenMP/distribute_parallel_for_simd_num_threads_codegen.cpp vendor/clang/dist-release_60/test/OpenMP/distribute_parallel_for_simd_num_threads_messages.cpp vendor/clang/dist-release_60/test/OpenMP/distribute_parallel_for_simd_private_codegen.cpp vendor/clang/dist-release_60/test/OpenMP/distribute_parallel_for_simd_private_messages.cpp vendor/clang/dist-release_60/test/OpenMP/distribute_parallel_for_simd_proc_bind_codegen.cpp vendor/clang/dist-release_60/test/OpenMP/distribute_parallel_for_simd_proc_bind_messages.cpp vendor/clang/dist-release_60/test/OpenMP/distribute_parallel_for_simd_reduction_messages.cpp vendor/clang/dist-release_60/test/OpenMP/distribute_parallel_for_simd_safelen_messages.cpp vendor/clang/dist-release_60/test/OpenMP/distribute_parallel_for_simd_schedule_messages.cpp vendor/clang/dist-release_60/test/OpenMP/distribute_parallel_for_simd_shared_messages.cpp vendor/clang/dist-release_60/test/OpenMP/distribute_parallel_for_simd_simdlen_messages.cpp vendor/clang/dist-release_60/test/OpenMP/distribute_private_codegen.cpp vendor/clang/dist-release_60/test/OpenMP/distribute_private_messages.cpp vendor/clang/dist-release_60/test/OpenMP/distribute_simd_aligned_messages.cpp vendor/clang/dist-release_60/test/OpenMP/distribute_simd_ast_print.cpp vendor/clang/dist-release_60/test/OpenMP/distribute_simd_codegen.cpp vendor/clang/dist-release_60/test/OpenMP/distribute_simd_collapse_messages.cpp vendor/clang/dist-release_60/test/OpenMP/distribute_simd_dist_schedule_messages.cpp vendor/clang/dist-release_60/test/OpenMP/distribute_simd_firstprivate_codegen.cpp vendor/clang/dist-release_60/test/OpenMP/distribute_simd_firstprivate_messages.cpp vendor/clang/dist-release_60/test/OpenMP/distribute_simd_lastprivate_codegen.cpp vendor/clang/dist-release_60/test/OpenMP/distribute_simd_lastprivate_messages.cpp vendor/clang/dist-release_60/test/OpenMP/distribute_simd_linear_messages.cpp vendor/clang/dist-release_60/test/OpenMP/distribute_simd_loop_messages.cpp vendor/clang/dist-release_60/test/OpenMP/distribute_simd_misc_messages.c vendor/clang/dist-release_60/test/OpenMP/distribute_simd_private_codegen.cpp vendor/clang/dist-release_60/test/OpenMP/distribute_simd_private_messages.cpp vendor/clang/dist-release_60/test/OpenMP/distribute_simd_reduction_codegen.cpp vendor/clang/dist-release_60/test/OpenMP/distribute_simd_reduction_messages.cpp vendor/clang/dist-release_60/test/OpenMP/distribute_simd_safelen_messages.cpp vendor/clang/dist-release_60/test/OpenMP/distribute_simd_simdlen_messages.cpp vendor/clang/dist-release_60/test/OpenMP/driver.c vendor/clang/dist-release_60/test/OpenMP/dump.cpp vendor/clang/dist-release_60/test/OpenMP/flush_ast_print.cpp vendor/clang/dist-release_60/test/OpenMP/flush_codegen.cpp vendor/clang/dist-release_60/test/OpenMP/flush_messages.cpp vendor/clang/dist-release_60/test/OpenMP/for_ast_print.cpp vendor/clang/dist-release_60/test/OpenMP/for_codegen.cpp vendor/clang/dist-release_60/test/OpenMP/for_collapse_messages.cpp vendor/clang/dist-release_60/test/OpenMP/for_firstprivate_codegen.cpp vendor/clang/dist-release_60/test/OpenMP/for_firstprivate_messages.cpp vendor/clang/dist-release_60/test/OpenMP/for_lastprivate_codegen.cpp vendor/clang/dist-release_60/test/OpenMP/for_lastprivate_messages.cpp vendor/clang/dist-release_60/test/OpenMP/for_linear_codegen.cpp vendor/clang/dist-release_60/test/OpenMP/for_linear_messages.cpp vendor/clang/dist-release_60/test/OpenMP/for_loop_messages.cpp vendor/clang/dist-release_60/test/OpenMP/for_misc_messages.c vendor/clang/dist-release_60/test/OpenMP/for_ordered_clause.cpp vendor/clang/dist-release_60/test/OpenMP/for_private_codegen.cpp vendor/clang/dist-release_60/test/OpenMP/for_private_messages.cpp vendor/clang/dist-release_60/test/OpenMP/for_reduction_codegen.cpp vendor/clang/dist-release_60/test/OpenMP/for_reduction_codegen_UDR.cpp vendor/clang/dist-release_60/test/OpenMP/for_reduction_messages.cpp vendor/clang/dist-release_60/test/OpenMP/for_schedule_messages.cpp vendor/clang/dist-release_60/test/OpenMP/for_simd_aligned_messages.cpp vendor/clang/dist-release_60/test/OpenMP/for_simd_ast_print.cpp vendor/clang/dist-release_60/test/OpenMP/for_simd_codegen.cpp vendor/clang/dist-release_60/test/OpenMP/for_simd_collapse_messages.cpp vendor/clang/dist-release_60/test/OpenMP/for_simd_firstprivate_messages.cpp vendor/clang/dist-release_60/test/OpenMP/for_simd_lastprivate_messages.cpp vendor/clang/dist-release_60/test/OpenMP/for_simd_linear_messages.cpp vendor/clang/dist-release_60/test/OpenMP/for_simd_loop_messages.cpp vendor/clang/dist-release_60/test/OpenMP/for_simd_misc_messages.c vendor/clang/dist-release_60/test/OpenMP/for_simd_private_messages.cpp vendor/clang/dist-release_60/test/OpenMP/for_simd_reduction_messages.cpp vendor/clang/dist-release_60/test/OpenMP/for_simd_safelen_messages.cpp vendor/clang/dist-release_60/test/OpenMP/for_simd_schedule_messages.cpp vendor/clang/dist-release_60/test/OpenMP/for_simd_simdlen_messages.cpp vendor/clang/dist-release_60/test/OpenMP/function-attr.cpp vendor/clang/dist-release_60/test/OpenMP/is_initial_device.c vendor/clang/dist-release_60/test/OpenMP/linking.c vendor/clang/dist-release_60/test/OpenMP/loops_explicit_clauses_codegen.cpp vendor/clang/dist-release_60/test/OpenMP/master_ast_print.cpp vendor/clang/dist-release_60/test/OpenMP/master_codegen.cpp vendor/clang/dist-release_60/test/OpenMP/master_messages.cpp vendor/clang/dist-release_60/test/OpenMP/nesting_of_regions.cpp vendor/clang/dist-release_60/test/OpenMP/no_option.c vendor/clang/dist-release_60/test/OpenMP/no_option_no_warn.c vendor/clang/dist-release_60/test/OpenMP/nvptx_target_printf_codegen.c vendor/clang/dist-release_60/test/OpenMP/openmp_check.cpp vendor/clang/dist-release_60/test/OpenMP/openmp_common.c vendor/clang/dist-release_60/test/OpenMP/openmp_offload_codegen.cpp vendor/clang/dist-release_60/test/OpenMP/openmp_seh.c vendor/clang/dist-release_60/test/OpenMP/openmp_win_codegen.cpp vendor/clang/dist-release_60/test/OpenMP/option_warn.c vendor/clang/dist-release_60/test/OpenMP/ordered_ast_print.cpp vendor/clang/dist-release_60/test/OpenMP/ordered_codegen.cpp vendor/clang/dist-release_60/test/OpenMP/ordered_doacross_codegen.cpp vendor/clang/dist-release_60/test/OpenMP/ordered_messages.cpp vendor/clang/dist-release_60/test/OpenMP/parallel_ast_print.cpp vendor/clang/dist-release_60/test/OpenMP/parallel_codegen.cpp vendor/clang/dist-release_60/test/OpenMP/parallel_copyin_codegen.cpp vendor/clang/dist-release_60/test/OpenMP/parallel_copyin_messages.cpp vendor/clang/dist-release_60/test/OpenMP/parallel_default_messages.cpp vendor/clang/dist-release_60/test/OpenMP/parallel_firstprivate_codegen.cpp vendor/clang/dist-release_60/test/OpenMP/parallel_firstprivate_messages.cpp vendor/clang/dist-release_60/test/OpenMP/parallel_for_ast_print.cpp vendor/clang/dist-release_60/test/OpenMP/parallel_for_codegen.cpp vendor/clang/dist-release_60/test/OpenMP/parallel_for_collapse_messages.cpp vendor/clang/dist-release_60/test/OpenMP/parallel_for_copyin_messages.cpp vendor/clang/dist-release_60/test/OpenMP/parallel_for_default_messages.cpp vendor/clang/dist-release_60/test/OpenMP/parallel_for_firstprivate_messages.cpp vendor/clang/dist-release_60/test/OpenMP/parallel_for_if_messages.cpp vendor/clang/dist-release_60/test/OpenMP/parallel_for_lastprivate_messages.cpp vendor/clang/dist-release_60/test/OpenMP/parallel_for_linear_codegen.cpp vendor/clang/dist-release_60/test/OpenMP/parallel_for_linear_messages.cpp vendor/clang/dist-release_60/test/OpenMP/parallel_for_loop_messages.cpp vendor/clang/dist-release_60/test/OpenMP/parallel_for_messages.cpp vendor/clang/dist-release_60/test/OpenMP/parallel_for_misc_messages.c vendor/clang/dist-release_60/test/OpenMP/parallel_for_num_threads_messages.cpp vendor/clang/dist-release_60/test/OpenMP/parallel_for_ordered_messages.cpp vendor/clang/dist-release_60/test/OpenMP/parallel_for_private_messages.cpp vendor/clang/dist-release_60/test/OpenMP/parallel_for_proc_bind_messages.cpp vendor/clang/dist-release_60/test/OpenMP/parallel_for_reduction_messages.cpp vendor/clang/dist-release_60/test/OpenMP/parallel_for_schedule_messages.cpp vendor/clang/dist-release_60/test/OpenMP/parallel_for_simd_aligned_messages.cpp vendor/clang/dist-release_60/test/OpenMP/parallel_for_simd_ast_print.cpp vendor/clang/dist-release_60/test/OpenMP/parallel_for_simd_codegen.cpp vendor/clang/dist-release_60/test/OpenMP/parallel_for_simd_collapse_messages.cpp vendor/clang/dist-release_60/test/OpenMP/parallel_for_simd_copyin_messages.cpp vendor/clang/dist-release_60/test/OpenMP/parallel_for_simd_default_messages.cpp vendor/clang/dist-release_60/test/OpenMP/parallel_for_simd_firstprivate_messages.cpp vendor/clang/dist-release_60/test/OpenMP/parallel_for_simd_if_messages.cpp vendor/clang/dist-release_60/test/OpenMP/parallel_for_simd_lastprivate_messages.cpp vendor/clang/dist-release_60/test/OpenMP/parallel_for_simd_linear_messages.cpp vendor/clang/dist-release_60/test/OpenMP/parallel_for_simd_loop_messages.cpp vendor/clang/dist-release_60/test/OpenMP/parallel_for_simd_messages.cpp vendor/clang/dist-release_60/test/OpenMP/parallel_for_simd_misc_messages.c vendor/clang/dist-release_60/test/OpenMP/parallel_for_simd_num_threads_messages.cpp vendor/clang/dist-release_60/test/OpenMP/parallel_for_simd_private_messages.cpp vendor/clang/dist-release_60/test/OpenMP/parallel_for_simd_proc_bind_messages.cpp vendor/clang/dist-release_60/test/OpenMP/parallel_for_simd_reduction_messages.cpp vendor/clang/dist-release_60/test/OpenMP/parallel_for_simd_safelen_messages.cpp vendor/clang/dist-release_60/test/OpenMP/parallel_for_simd_schedule_messages.cpp vendor/clang/dist-release_60/test/OpenMP/parallel_for_simd_simdlen_messages.cpp vendor/clang/dist-release_60/test/OpenMP/parallel_if_codegen.cpp vendor/clang/dist-release_60/test/OpenMP/parallel_if_messages.cpp vendor/clang/dist-release_60/test/OpenMP/parallel_messages.cpp vendor/clang/dist-release_60/test/OpenMP/parallel_num_threads_codegen.cpp vendor/clang/dist-release_60/test/OpenMP/parallel_num_threads_messages.cpp vendor/clang/dist-release_60/test/OpenMP/parallel_private_codegen.cpp vendor/clang/dist-release_60/test/OpenMP/parallel_private_messages.cpp vendor/clang/dist-release_60/test/OpenMP/parallel_proc_bind_codegen.cpp vendor/clang/dist-release_60/test/OpenMP/parallel_proc_bind_messages.cpp vendor/clang/dist-release_60/test/OpenMP/parallel_reduction_codegen.cpp vendor/clang/dist-release_60/test/OpenMP/parallel_reduction_messages.cpp vendor/clang/dist-release_60/test/OpenMP/parallel_sections_ast_print.cpp vendor/clang/dist-release_60/test/OpenMP/parallel_sections_codegen.cpp vendor/clang/dist-release_60/test/OpenMP/parallel_sections_copyin_messages.cpp vendor/clang/dist-release_60/test/OpenMP/parallel_sections_default_messages.cpp vendor/clang/dist-release_60/test/OpenMP/parallel_sections_firstprivate_messages.cpp vendor/clang/dist-release_60/test/OpenMP/parallel_sections_if_messages.cpp vendor/clang/dist-release_60/test/OpenMP/parallel_sections_lastprivate_messages.cpp vendor/clang/dist-release_60/test/OpenMP/parallel_sections_messages.cpp vendor/clang/dist-release_60/test/OpenMP/parallel_sections_misc_messages.c vendor/clang/dist-release_60/test/OpenMP/parallel_sections_num_threads_messages.cpp vendor/clang/dist-release_60/test/OpenMP/parallel_sections_private_messages.cpp vendor/clang/dist-release_60/test/OpenMP/parallel_sections_proc_bind_messages.cpp vendor/clang/dist-release_60/test/OpenMP/parallel_sections_reduction_messages.cpp vendor/clang/dist-release_60/test/OpenMP/parallel_sections_shared_messages.cpp vendor/clang/dist-release_60/test/OpenMP/parallel_shared_messages.cpp vendor/clang/dist-release_60/test/OpenMP/predefined_macro.c vendor/clang/dist-release_60/test/OpenMP/report_default_DSA.cpp vendor/clang/dist-release_60/test/OpenMP/schedule_codegen.cpp vendor/clang/dist-release_60/test/OpenMP/sections_ast_print.cpp vendor/clang/dist-release_60/test/OpenMP/sections_codegen.cpp vendor/clang/dist-release_60/test/OpenMP/sections_firstprivate_codegen.cpp vendor/clang/dist-release_60/test/OpenMP/sections_firstprivate_messages.cpp vendor/clang/dist-release_60/test/OpenMP/sections_lastprivate_codegen.cpp vendor/clang/dist-release_60/test/OpenMP/sections_lastprivate_messages.cpp vendor/clang/dist-release_60/test/OpenMP/sections_misc_messages.c vendor/clang/dist-release_60/test/OpenMP/sections_private_codegen.cpp vendor/clang/dist-release_60/test/OpenMP/sections_private_messages.cpp vendor/clang/dist-release_60/test/OpenMP/sections_reduction_codegen.cpp vendor/clang/dist-release_60/test/OpenMP/sections_reduction_messages.cpp vendor/clang/dist-release_60/test/OpenMP/simd_aligned_messages.cpp vendor/clang/dist-release_60/test/OpenMP/simd_ast_print.cpp vendor/clang/dist-release_60/test/OpenMP/simd_codegen.cpp vendor/clang/dist-release_60/test/OpenMP/simd_collapse_messages.cpp vendor/clang/dist-release_60/test/OpenMP/simd_lastprivate_messages.cpp vendor/clang/dist-release_60/test/OpenMP/simd_linear_messages.cpp vendor/clang/dist-release_60/test/OpenMP/simd_loop_messages.cpp vendor/clang/dist-release_60/test/OpenMP/simd_metadata.c vendor/clang/dist-release_60/test/OpenMP/simd_misc_messages.c vendor/clang/dist-release_60/test/OpenMP/simd_private_messages.cpp vendor/clang/dist-release_60/test/OpenMP/simd_reduction_messages.cpp vendor/clang/dist-release_60/test/OpenMP/simd_safelen_messages.cpp vendor/clang/dist-release_60/test/OpenMP/simd_simdlen_messages.cpp vendor/clang/dist-release_60/test/OpenMP/single_ast_print.cpp vendor/clang/dist-release_60/test/OpenMP/single_codegen.cpp vendor/clang/dist-release_60/test/OpenMP/single_copyprivate_messages.cpp vendor/clang/dist-release_60/test/OpenMP/single_firstprivate_codegen.cpp vendor/clang/dist-release_60/test/OpenMP/single_firstprivate_messages.cpp vendor/clang/dist-release_60/test/OpenMP/single_misc_messages.c vendor/clang/dist-release_60/test/OpenMP/single_private_codegen.cpp vendor/clang/dist-release_60/test/OpenMP/single_private_messages.cpp vendor/clang/dist-release_60/test/OpenMP/target_ast_print.cpp vendor/clang/dist-release_60/test/OpenMP/target_codegen.cpp vendor/clang/dist-release_60/test/OpenMP/target_codegen_global_capture.cpp vendor/clang/dist-release_60/test/OpenMP/target_codegen_registration.cpp vendor/clang/dist-release_60/test/OpenMP/target_codegen_registration_naming.cpp vendor/clang/dist-release_60/test/OpenMP/target_data_ast_print.cpp vendor/clang/dist-release_60/test/OpenMP/target_data_codegen.cpp vendor/clang/dist-release_60/test/OpenMP/target_data_device_messages.cpp vendor/clang/dist-release_60/test/OpenMP/target_data_if_messages.cpp vendor/clang/dist-release_60/test/OpenMP/target_data_messages.c vendor/clang/dist-release_60/test/OpenMP/target_data_use_device_ptr_ast_print.cpp vendor/clang/dist-release_60/test/OpenMP/target_data_use_device_ptr_codegen.cpp vendor/clang/dist-release_60/test/OpenMP/target_data_use_device_ptr_messages.cpp vendor/clang/dist-release_60/test/OpenMP/target_defaultmap_messages.cpp vendor/clang/dist-release_60/test/OpenMP/target_depend_messages.cpp vendor/clang/dist-release_60/test/OpenMP/target_device_messages.cpp vendor/clang/dist-release_60/test/OpenMP/target_enter_data_ast_print.cpp vendor/clang/dist-release_60/test/OpenMP/target_enter_data_codegen.cpp vendor/clang/dist-release_60/test/OpenMP/target_enter_data_depend_codegen.cpp vendor/clang/dist-release_60/test/OpenMP/target_enter_data_depend_messages.cpp vendor/clang/dist-release_60/test/OpenMP/target_enter_data_device_messages.cpp vendor/clang/dist-release_60/test/OpenMP/target_enter_data_if_messages.cpp vendor/clang/dist-release_60/test/OpenMP/target_enter_data_map_messages.c vendor/clang/dist-release_60/test/OpenMP/target_enter_data_nowait_messages.cpp vendor/clang/dist-release_60/test/OpenMP/target_exit_data_ast_print.cpp vendor/clang/dist-release_60/test/OpenMP/target_exit_data_codegen.cpp vendor/clang/dist-release_60/test/OpenMP/target_exit_data_depend_codegen.cpp vendor/clang/dist-release_60/test/OpenMP/target_exit_data_depend_messages.cpp vendor/clang/dist-release_60/test/OpenMP/target_exit_data_device_messages.cpp vendor/clang/dist-release_60/test/OpenMP/target_exit_data_if_messages.cpp vendor/clang/dist-release_60/test/OpenMP/target_exit_data_map_messages.c vendor/clang/dist-release_60/test/OpenMP/target_exit_data_nowait_messages.cpp vendor/clang/dist-release_60/test/OpenMP/target_firstprivate_codegen.cpp vendor/clang/dist-release_60/test/OpenMP/target_firstprivate_messages.cpp vendor/clang/dist-release_60/test/OpenMP/target_if_messages.cpp vendor/clang/dist-release_60/test/OpenMP/target_is_device_ptr_ast_print.cpp vendor/clang/dist-release_60/test/OpenMP/target_is_device_ptr_codegen.cpp vendor/clang/dist-release_60/test/OpenMP/target_is_device_ptr_messages.cpp vendor/clang/dist-release_60/test/OpenMP/target_map_codegen.cpp vendor/clang/dist-release_60/test/OpenMP/target_map_messages.cpp vendor/clang/dist-release_60/test/OpenMP/target_messages.cpp vendor/clang/dist-release_60/test/OpenMP/target_nowait_messages.cpp vendor/clang/dist-release_60/test/OpenMP/target_parallel_ast_print.cpp vendor/clang/dist-release_60/test/OpenMP/target_parallel_codegen.cpp vendor/clang/dist-release_60/test/OpenMP/target_parallel_codegen_registration.cpp vendor/clang/dist-release_60/test/OpenMP/target_parallel_codegen_registration_naming.cpp vendor/clang/dist-release_60/test/OpenMP/target_parallel_default_messages.cpp vendor/clang/dist-release_60/test/OpenMP/target_parallel_defaultmap_messages.cpp vendor/clang/dist-release_60/test/OpenMP/target_parallel_depend_messages.cpp vendor/clang/dist-release_60/test/OpenMP/target_parallel_device_messages.cpp vendor/clang/dist-release_60/test/OpenMP/target_parallel_firstprivate_messages.cpp vendor/clang/dist-release_60/test/OpenMP/target_parallel_for_ast_print.cpp vendor/clang/dist-release_60/test/OpenMP/target_parallel_for_codegen.cpp vendor/clang/dist-release_60/test/OpenMP/target_parallel_for_codegen_registration.cpp vendor/clang/dist-release_60/test/OpenMP/target_parallel_for_codegen_registration_naming.cpp vendor/clang/dist-release_60/test/OpenMP/target_parallel_for_collapse_messages.cpp vendor/clang/dist-release_60/test/OpenMP/target_parallel_for_default_messages.cpp vendor/clang/dist-release_60/test/OpenMP/target_parallel_for_defaultmap_messages.cpp vendor/clang/dist-release_60/test/OpenMP/target_parallel_for_depend_messages.cpp vendor/clang/dist-release_60/test/OpenMP/target_parallel_for_device_messages.cpp vendor/clang/dist-release_60/test/OpenMP/target_parallel_for_firstprivate_messages.cpp vendor/clang/dist-release_60/test/OpenMP/target_parallel_for_if_messages.cpp vendor/clang/dist-release_60/test/OpenMP/target_parallel_for_is_device_ptr_ast_print.cpp vendor/clang/dist-release_60/test/OpenMP/target_parallel_for_is_device_ptr_messages.cpp vendor/clang/dist-release_60/test/OpenMP/target_parallel_for_lastprivate_messages.cpp vendor/clang/dist-release_60/test/OpenMP/target_parallel_for_linear_messages.cpp vendor/clang/dist-release_60/test/OpenMP/target_parallel_for_loop_messages.cpp vendor/clang/dist-release_60/test/OpenMP/target_parallel_for_map_messages.cpp vendor/clang/dist-release_60/test/OpenMP/target_parallel_for_messages.cpp vendor/clang/dist-release_60/test/OpenMP/target_parallel_for_misc_messages.c vendor/clang/dist-release_60/test/OpenMP/target_parallel_for_nowait_messages.cpp vendor/clang/dist-release_60/test/OpenMP/target_parallel_for_num_threads_messages.cpp vendor/clang/dist-release_60/test/OpenMP/target_parallel_for_ordered_messages.cpp vendor/clang/dist-release_60/test/OpenMP/target_parallel_for_private_messages.cpp vendor/clang/dist-release_60/test/OpenMP/target_parallel_for_proc_bind_messages.cpp vendor/clang/dist-release_60/test/OpenMP/target_parallel_for_reduction_messages.cpp vendor/clang/dist-release_60/test/OpenMP/target_parallel_for_schedule_messages.cpp vendor/clang/dist-release_60/test/OpenMP/target_parallel_for_simd_aligned_messages.cpp vendor/clang/dist-release_60/test/OpenMP/target_parallel_for_simd_ast_print.cpp vendor/clang/dist-release_60/test/OpenMP/target_parallel_for_simd_codegen.cpp vendor/clang/dist-release_60/test/OpenMP/target_parallel_for_simd_codegen_registration.cpp vendor/clang/dist-release_60/test/OpenMP/target_parallel_for_simd_codegen_registration_naming.cpp vendor/clang/dist-release_60/test/OpenMP/target_parallel_for_simd_collapse_messages.cpp vendor/clang/dist-release_60/test/OpenMP/target_parallel_for_simd_default_messages.cpp vendor/clang/dist-release_60/test/OpenMP/target_parallel_for_simd_defaultmap_messages.cpp vendor/clang/dist-release_60/test/OpenMP/target_parallel_for_simd_depend_messages.cpp vendor/clang/dist-release_60/test/OpenMP/target_parallel_for_simd_device_messages.cpp vendor/clang/dist-release_60/test/OpenMP/target_parallel_for_simd_firstprivate_messages.cpp vendor/clang/dist-release_60/test/OpenMP/target_parallel_for_simd_if_messages.cpp vendor/clang/dist-release_60/test/OpenMP/target_parallel_for_simd_is_device_ptr_ast_print.cpp vendor/clang/dist-release_60/test/OpenMP/target_parallel_for_simd_is_device_ptr_messages.cpp vendor/clang/dist-release_60/test/OpenMP/target_parallel_for_simd_lastprivate_messages.cpp vendor/clang/dist-release_60/test/OpenMP/target_parallel_for_simd_linear_messages.cpp vendor/clang/dist-release_60/test/OpenMP/target_parallel_for_simd_loop_messages.cpp vendor/clang/dist-release_60/test/OpenMP/target_parallel_for_simd_map_messages.cpp vendor/clang/dist-release_60/test/OpenMP/target_parallel_for_simd_messages.cpp vendor/clang/dist-release_60/test/OpenMP/target_parallel_for_simd_misc_messages.c vendor/clang/dist-release_60/test/OpenMP/target_parallel_for_simd_nowait_messages.cpp vendor/clang/dist-release_60/test/OpenMP/target_parallel_for_simd_num_threads_messages.cpp vendor/clang/dist-release_60/test/OpenMP/target_parallel_for_simd_ordered_messages.cpp vendor/clang/dist-release_60/test/OpenMP/target_parallel_for_simd_private_messages.cpp vendor/clang/dist-release_60/test/OpenMP/target_parallel_for_simd_proc_bind_messages.cpp vendor/clang/dist-release_60/test/OpenMP/target_parallel_for_simd_reduction_messages.cpp vendor/clang/dist-release_60/test/OpenMP/target_parallel_for_simd_safelen_messages.cpp vendor/clang/dist-release_60/test/OpenMP/target_parallel_for_simd_schedule_messages.cpp vendor/clang/dist-release_60/test/OpenMP/target_parallel_for_simd_simdlen_messages.cpp vendor/clang/dist-release_60/test/OpenMP/target_parallel_if_codegen.cpp vendor/clang/dist-release_60/test/OpenMP/target_parallel_if_messages.cpp vendor/clang/dist-release_60/test/OpenMP/target_parallel_is_device_ptr_ast_print.cpp vendor/clang/dist-release_60/test/OpenMP/target_parallel_is_device_ptr_messages.cpp vendor/clang/dist-release_60/test/OpenMP/target_parallel_map_messages.cpp vendor/clang/dist-release_60/test/OpenMP/target_parallel_messages.cpp vendor/clang/dist-release_60/test/OpenMP/target_parallel_nowait_messages.cpp vendor/clang/dist-release_60/test/OpenMP/target_parallel_num_threads_codegen.cpp vendor/clang/dist-release_60/test/OpenMP/target_parallel_num_threads_messages.cpp vendor/clang/dist-release_60/test/OpenMP/target_parallel_private_messages.cpp vendor/clang/dist-release_60/test/OpenMP/target_parallel_proc_bind_messages.cpp vendor/clang/dist-release_60/test/OpenMP/target_parallel_reduction_messages.cpp vendor/clang/dist-release_60/test/OpenMP/target_parallel_shared_messages.cpp vendor/clang/dist-release_60/test/OpenMP/target_private_codegen.cpp vendor/clang/dist-release_60/test/OpenMP/target_private_messages.cpp vendor/clang/dist-release_60/test/OpenMP/target_reduction_codegen.cpp vendor/clang/dist-release_60/test/OpenMP/target_reduction_messages.cpp vendor/clang/dist-release_60/test/OpenMP/target_simd_aligned_messages.cpp vendor/clang/dist-release_60/test/OpenMP/target_simd_ast_print.cpp vendor/clang/dist-release_60/test/OpenMP/target_simd_codegen.cpp vendor/clang/dist-release_60/test/OpenMP/target_simd_codegen_registration.cpp vendor/clang/dist-release_60/test/OpenMP/target_simd_codegen_registration_naming.cpp vendor/clang/dist-release_60/test/OpenMP/target_simd_collapse_messages.cpp vendor/clang/dist-release_60/test/OpenMP/target_simd_defaultmap_messages.cpp vendor/clang/dist-release_60/test/OpenMP/target_simd_depend_messages.cpp vendor/clang/dist-release_60/test/OpenMP/target_simd_device_messages.cpp vendor/clang/dist-release_60/test/OpenMP/target_simd_firstprivate_messages.cpp vendor/clang/dist-release_60/test/OpenMP/target_simd_if_messages.cpp vendor/clang/dist-release_60/test/OpenMP/target_simd_is_device_ptr_messages.cpp vendor/clang/dist-release_60/test/OpenMP/target_simd_lastprivate_messages.cpp vendor/clang/dist-release_60/test/OpenMP/target_simd_linear_messages.cpp vendor/clang/dist-release_60/test/OpenMP/target_simd_loop_messages.cpp vendor/clang/dist-release_60/test/OpenMP/target_simd_map_messages.cpp vendor/clang/dist-release_60/test/OpenMP/target_simd_messages.cpp vendor/clang/dist-release_60/test/OpenMP/target_simd_misc_messages.c vendor/clang/dist-release_60/test/OpenMP/target_simd_nowait_messages.cpp vendor/clang/dist-release_60/test/OpenMP/target_simd_private_messages.cpp vendor/clang/dist-release_60/test/OpenMP/target_simd_reduction_messages.cpp vendor/clang/dist-release_60/test/OpenMP/target_simd_safelen_messages.cpp vendor/clang/dist-release_60/test/OpenMP/target_simd_simdlen_messages.cpp vendor/clang/dist-release_60/test/OpenMP/target_teams_ast_print.cpp vendor/clang/dist-release_60/test/OpenMP/target_teams_codegen.cpp vendor/clang/dist-release_60/test/OpenMP/target_teams_codegen_registration.cpp vendor/clang/dist-release_60/test/OpenMP/target_teams_codegen_registration_naming.cpp vendor/clang/dist-release_60/test/OpenMP/target_teams_default_messages.cpp vendor/clang/dist-release_60/test/OpenMP/target_teams_defaultmap_messages.cpp vendor/clang/dist-release_60/test/OpenMP/target_teams_depend_messages.cpp vendor/clang/dist-release_60/test/OpenMP/target_teams_device_messages.cpp vendor/clang/dist-release_60/test/OpenMP/target_teams_distribute_ast_print.cpp vendor/clang/dist-release_60/test/OpenMP/target_teams_distribute_codegen.cpp vendor/clang/dist-release_60/test/OpenMP/target_teams_distribute_codegen_registration.cpp vendor/clang/dist-release_60/test/OpenMP/target_teams_distribute_codegen_registration_naming.cpp vendor/clang/dist-release_60/test/OpenMP/target_teams_distribute_collapse_codegen.cpp vendor/clang/dist-release_60/test/OpenMP/target_teams_distribute_collapse_messages.cpp vendor/clang/dist-release_60/test/OpenMP/target_teams_distribute_default_messages.cpp vendor/clang/dist-release_60/test/OpenMP/target_teams_distribute_defaultmap_messages.cpp vendor/clang/dist-release_60/test/OpenMP/target_teams_distribute_depend_messages.cpp vendor/clang/dist-release_60/test/OpenMP/target_teams_distribute_device_messages.cpp vendor/clang/dist-release_60/test/OpenMP/target_teams_distribute_dist_schedule_codegen.cpp vendor/clang/dist-release_60/test/OpenMP/target_teams_distribute_dist_schedule_messages.cpp vendor/clang/dist-release_60/test/OpenMP/target_teams_distribute_firstprivate_codegen.cpp vendor/clang/dist-release_60/test/OpenMP/target_teams_distribute_firstprivate_messages.cpp vendor/clang/dist-release_60/test/OpenMP/target_teams_distribute_if_messages.cpp vendor/clang/dist-release_60/test/OpenMP/target_teams_distribute_lastprivate_codegen.cpp vendor/clang/dist-release_60/test/OpenMP/target_teams_distribute_lastprivate_messages.cpp vendor/clang/dist-release_60/test/OpenMP/target_teams_distribute_loop_messages.cpp vendor/clang/dist-release_60/test/OpenMP/target_teams_distribute_map_messages.cpp vendor/clang/dist-release_60/test/OpenMP/target_teams_distribute_messages.cpp vendor/clang/dist-release_60/test/OpenMP/target_teams_distribute_misc_messages.c vendor/clang/dist-release_60/test/OpenMP/target_teams_distribute_nowait_messages.cpp vendor/clang/dist-release_60/test/OpenMP/target_teams_distribute_num_teams_messages.cpp vendor/clang/dist-release_60/test/OpenMP/target_teams_distribute_parallel_for_ast_print.cpp vendor/clang/dist-release_60/test/OpenMP/target_teams_distribute_parallel_for_collapse_messages.cpp vendor/clang/dist-release_60/test/OpenMP/target_teams_distribute_parallel_for_default_messages.cpp vendor/clang/dist-release_60/test/OpenMP/target_teams_distribute_parallel_for_defaultmap_messages.cpp vendor/clang/dist-release_60/test/OpenMP/target_teams_distribute_parallel_for_depend_messages.cpp vendor/clang/dist-release_60/test/OpenMP/target_teams_distribute_parallel_for_device_messages.cpp vendor/clang/dist-release_60/test/OpenMP/target_teams_distribute_parallel_for_dist_schedule_messages.cpp vendor/clang/dist-release_60/test/OpenMP/target_teams_distribute_parallel_for_firstprivate_messages.cpp vendor/clang/dist-release_60/test/OpenMP/target_teams_distribute_parallel_for_if_messages.cpp vendor/clang/dist-release_60/test/OpenMP/target_teams_distribute_parallel_for_is_device_ptr_ast_print.cpp vendor/clang/dist-release_60/test/OpenMP/target_teams_distribute_parallel_for_is_device_ptr_messages.cpp vendor/clang/dist-release_60/test/OpenMP/target_teams_distribute_parallel_for_lastprivate_messages.cpp vendor/clang/dist-release_60/test/OpenMP/target_teams_distribute_parallel_for_loop_messages.cpp vendor/clang/dist-release_60/test/OpenMP/target_teams_distribute_parallel_for_map_messages.cpp vendor/clang/dist-release_60/test/OpenMP/target_teams_distribute_parallel_for_messages.cpp vendor/clang/dist-release_60/test/OpenMP/target_teams_distribute_parallel_for_misc_messages.c vendor/clang/dist-release_60/test/OpenMP/target_teams_distribute_parallel_for_nowait_messages.cpp vendor/clang/dist-release_60/test/OpenMP/target_teams_distribute_parallel_for_num_teams_messages.cpp vendor/clang/dist-release_60/test/OpenMP/target_teams_distribute_parallel_for_num_threads_messages.cpp vendor/clang/dist-release_60/test/OpenMP/target_teams_distribute_parallel_for_private_messages.cpp vendor/clang/dist-release_60/test/OpenMP/target_teams_distribute_parallel_for_proc_bind_messages.cpp vendor/clang/dist-release_60/test/OpenMP/target_teams_distribute_parallel_for_reduction_messages.cpp vendor/clang/dist-release_60/test/OpenMP/target_teams_distribute_parallel_for_schedule_messages.cpp vendor/clang/dist-release_60/test/OpenMP/target_teams_distribute_parallel_for_shared_messages.cpp vendor/clang/dist-release_60/test/OpenMP/target_teams_distribute_parallel_for_simd_aligned_messages.cpp vendor/clang/dist-release_60/test/OpenMP/target_teams_distribute_parallel_for_simd_ast_print.cpp vendor/clang/dist-release_60/test/OpenMP/target_teams_distribute_parallel_for_simd_collapse_messages.cpp vendor/clang/dist-release_60/test/OpenMP/target_teams_distribute_parallel_for_simd_default_messages.cpp vendor/clang/dist-release_60/test/OpenMP/target_teams_distribute_parallel_for_simd_defaultmap_messages.cpp vendor/clang/dist-release_60/test/OpenMP/target_teams_distribute_parallel_for_simd_depend_messages.cpp vendor/clang/dist-release_60/test/OpenMP/target_teams_distribute_parallel_for_simd_device_messages.cpp vendor/clang/dist-release_60/test/OpenMP/target_teams_distribute_parallel_for_simd_dist_schedule_messages.cpp vendor/clang/dist-release_60/test/OpenMP/target_teams_distribute_parallel_for_simd_firstprivate_messages.cpp vendor/clang/dist-release_60/test/OpenMP/target_teams_distribute_parallel_for_simd_if_messages.cpp vendor/clang/dist-release_60/test/OpenMP/target_teams_distribute_parallel_for_simd_is_device_ptr_ast_print.cpp vendor/clang/dist-release_60/test/OpenMP/target_teams_distribute_parallel_for_simd_is_device_ptr_messages.cpp vendor/clang/dist-release_60/test/OpenMP/target_teams_distribute_parallel_for_simd_lastprivate_messages.cpp vendor/clang/dist-release_60/test/OpenMP/target_teams_distribute_parallel_for_simd_linear_messages.cpp vendor/clang/dist-release_60/test/OpenMP/target_teams_distribute_parallel_for_simd_loop_messages.cpp vendor/clang/dist-release_60/test/OpenMP/target_teams_distribute_parallel_for_simd_map_messages.cpp vendor/clang/dist-release_60/test/OpenMP/target_teams_distribute_parallel_for_simd_messages.cpp vendor/clang/dist-release_60/test/OpenMP/target_teams_distribute_parallel_for_simd_misc_messages.c vendor/clang/dist-release_60/test/OpenMP/target_teams_distribute_parallel_for_simd_nowait_messages.cpp vendor/clang/dist-release_60/test/OpenMP/target_teams_distribute_parallel_for_simd_num_teams_messages.cpp vendor/clang/dist-release_60/test/OpenMP/target_teams_distribute_parallel_for_simd_num_threads_messages.cpp vendor/clang/dist-release_60/test/OpenMP/target_teams_distribute_parallel_for_simd_private_messages.cpp vendor/clang/dist-release_60/test/OpenMP/target_teams_distribute_parallel_for_simd_proc_bind_messages.cpp vendor/clang/dist-release_60/test/OpenMP/target_teams_distribute_parallel_for_simd_reduction_messages.cpp vendor/clang/dist-release_60/test/OpenMP/target_teams_distribute_parallel_for_simd_safelen_messages.cpp vendor/clang/dist-release_60/test/OpenMP/target_teams_distribute_parallel_for_simd_schedule_messages.cpp vendor/clang/dist-release_60/test/OpenMP/target_teams_distribute_parallel_for_simd_shared_messages.cpp vendor/clang/dist-release_60/test/OpenMP/target_teams_distribute_parallel_for_simd_simdlen_messages.cpp vendor/clang/dist-release_60/test/OpenMP/target_teams_distribute_parallel_for_simd_thread_limit_messages.cpp vendor/clang/dist-release_60/test/OpenMP/target_teams_distribute_parallel_for_thread_limit_messages.cpp vendor/clang/dist-release_60/test/OpenMP/target_teams_distribute_private_codegen.cpp vendor/clang/dist-release_60/test/OpenMP/target_teams_distribute_private_messages.cpp vendor/clang/dist-release_60/test/OpenMP/target_teams_distribute_reduction_codegen.cpp vendor/clang/dist-release_60/test/OpenMP/target_teams_distribute_reduction_messages.cpp vendor/clang/dist-release_60/test/OpenMP/target_teams_distribute_shared_messages.cpp vendor/clang/dist-release_60/test/OpenMP/target_teams_distribute_simd_aligned_messages.cpp vendor/clang/dist-release_60/test/OpenMP/target_teams_distribute_simd_ast_print.cpp vendor/clang/dist-release_60/test/OpenMP/target_teams_distribute_simd_codegen.cpp vendor/clang/dist-release_60/test/OpenMP/target_teams_distribute_simd_codegen_registration.cpp vendor/clang/dist-release_60/test/OpenMP/target_teams_distribute_simd_codegen_registration_naming.cpp vendor/clang/dist-release_60/test/OpenMP/target_teams_distribute_simd_collapse_codegen.cpp vendor/clang/dist-release_60/test/OpenMP/target_teams_distribute_simd_collapse_messages.cpp vendor/clang/dist-release_60/test/OpenMP/target_teams_distribute_simd_defaultmap_messages.cpp vendor/clang/dist-release_60/test/OpenMP/target_teams_distribute_simd_depend_messages.cpp vendor/clang/dist-release_60/test/OpenMP/target_teams_distribute_simd_device_messages.cpp vendor/clang/dist-release_60/test/OpenMP/target_teams_distribute_simd_dist_schedule_codegen.cpp vendor/clang/dist-release_60/test/OpenMP/target_teams_distribute_simd_dist_schedule_messages.cpp vendor/clang/dist-release_60/test/OpenMP/target_teams_distribute_simd_firstprivate_codegen.cpp vendor/clang/dist-release_60/test/OpenMP/target_teams_distribute_simd_firstprivate_messages.cpp vendor/clang/dist-release_60/test/OpenMP/target_teams_distribute_simd_if_messages.cpp vendor/clang/dist-release_60/test/OpenMP/target_teams_distribute_simd_is_device_ptr_ast_print.cpp vendor/clang/dist-release_60/test/OpenMP/target_teams_distribute_simd_is_device_ptr_messages.cpp vendor/clang/dist-release_60/test/OpenMP/target_teams_distribute_simd_lastprivate_codegen.cpp vendor/clang/dist-release_60/test/OpenMP/target_teams_distribute_simd_lastprivate_messages.cpp vendor/clang/dist-release_60/test/OpenMP/target_teams_distribute_simd_linear_messages.cpp vendor/clang/dist-release_60/test/OpenMP/target_teams_distribute_simd_loop_messages.cpp vendor/clang/dist-release_60/test/OpenMP/target_teams_distribute_simd_map_messages.cpp vendor/clang/dist-release_60/test/OpenMP/target_teams_distribute_simd_messages.cpp vendor/clang/dist-release_60/test/OpenMP/target_teams_distribute_simd_misc_messages.c vendor/clang/dist-release_60/test/OpenMP/target_teams_distribute_simd_nowait_messages.cpp vendor/clang/dist-release_60/test/OpenMP/target_teams_distribute_simd_num_teams_messages.cpp vendor/clang/dist-release_60/test/OpenMP/target_teams_distribute_simd_private_codegen.cpp vendor/clang/dist-release_60/test/OpenMP/target_teams_distribute_simd_private_messages.cpp vendor/clang/dist-release_60/test/OpenMP/target_teams_distribute_simd_reduction_codegen.cpp vendor/clang/dist-release_60/test/OpenMP/target_teams_distribute_simd_reduction_messages.cpp vendor/clang/dist-release_60/test/OpenMP/target_teams_distribute_simd_safelen_messages.cpp vendor/clang/dist-release_60/test/OpenMP/target_teams_distribute_simd_shared_messages.cpp vendor/clang/dist-release_60/test/OpenMP/target_teams_distribute_simd_simdlen_messages.cpp vendor/clang/dist-release_60/test/OpenMP/target_teams_distribute_simd_thread_limit_messages.cpp vendor/clang/dist-release_60/test/OpenMP/target_teams_firstprivate_messages.cpp vendor/clang/dist-release_60/test/OpenMP/target_teams_if_messages.cpp vendor/clang/dist-release_60/test/OpenMP/target_teams_is_device_ptr_ast_print.cpp vendor/clang/dist-release_60/test/OpenMP/target_teams_is_device_ptr_messages.cpp vendor/clang/dist-release_60/test/OpenMP/target_teams_map_messages.cpp vendor/clang/dist-release_60/test/OpenMP/target_teams_messages.cpp vendor/clang/dist-release_60/test/OpenMP/target_teams_nowait_messages.cpp vendor/clang/dist-release_60/test/OpenMP/target_teams_num_teams_codegen.cpp vendor/clang/dist-release_60/test/OpenMP/target_teams_num_teams_messages.cpp vendor/clang/dist-release_60/test/OpenMP/target_teams_private_messages.cpp vendor/clang/dist-release_60/test/OpenMP/target_teams_reduction_messages.cpp vendor/clang/dist-release_60/test/OpenMP/target_teams_shared_messages.cpp vendor/clang/dist-release_60/test/OpenMP/target_teams_thread_limit_codegen.cpp vendor/clang/dist-release_60/test/OpenMP/target_teams_thread_limit_messages.cpp vendor/clang/dist-release_60/test/OpenMP/target_update_ast_print.cpp vendor/clang/dist-release_60/test/OpenMP/target_update_codegen.cpp vendor/clang/dist-release_60/test/OpenMP/target_update_depend_codegen.cpp vendor/clang/dist-release_60/test/OpenMP/target_update_depend_messages.cpp vendor/clang/dist-release_60/test/OpenMP/target_update_device_messages.cpp vendor/clang/dist-release_60/test/OpenMP/target_update_from_messages.cpp vendor/clang/dist-release_60/test/OpenMP/target_update_if_messages.cpp vendor/clang/dist-release_60/test/OpenMP/target_update_messages.cpp vendor/clang/dist-release_60/test/OpenMP/target_update_nowait_messages.cpp vendor/clang/dist-release_60/test/OpenMP/target_update_to_messages.cpp vendor/clang/dist-release_60/test/OpenMP/target_vla_messages.cpp vendor/clang/dist-release_60/test/OpenMP/task_ast_print.cpp vendor/clang/dist-release_60/test/OpenMP/task_codegen.c vendor/clang/dist-release_60/test/OpenMP/task_codegen.cpp vendor/clang/dist-release_60/test/OpenMP/task_default_messages.cpp vendor/clang/dist-release_60/test/OpenMP/task_depend_messages.cpp vendor/clang/dist-release_60/test/OpenMP/task_final_messages.cpp vendor/clang/dist-release_60/test/OpenMP/task_firstprivate_codegen.cpp vendor/clang/dist-release_60/test/OpenMP/task_firstprivate_messages.cpp vendor/clang/dist-release_60/test/OpenMP/task_if_codegen.cpp vendor/clang/dist-release_60/test/OpenMP/task_if_messages.cpp vendor/clang/dist-release_60/test/OpenMP/task_in_reduction_codegen.cpp vendor/clang/dist-release_60/test/OpenMP/task_in_reduction_message.cpp vendor/clang/dist-release_60/test/OpenMP/task_messages.cpp vendor/clang/dist-release_60/test/OpenMP/task_priority_messages.cpp vendor/clang/dist-release_60/test/OpenMP/task_private_codegen.cpp vendor/clang/dist-release_60/test/OpenMP/task_private_messages.cpp vendor/clang/dist-release_60/test/OpenMP/task_shared_messages.cpp vendor/clang/dist-release_60/test/OpenMP/taskgroup_ast_print.cpp vendor/clang/dist-release_60/test/OpenMP/taskgroup_codegen.cpp vendor/clang/dist-release_60/test/OpenMP/taskgroup_messages.cpp vendor/clang/dist-release_60/test/OpenMP/taskgroup_task_reduction_codegen.cpp vendor/clang/dist-release_60/test/OpenMP/taskgroup_task_reduction_messages.cpp vendor/clang/dist-release_60/test/OpenMP/taskloop_ast_print.cpp vendor/clang/dist-release_60/test/OpenMP/taskloop_codegen.cpp vendor/clang/dist-release_60/test/OpenMP/taskloop_collapse_messages.cpp vendor/clang/dist-release_60/test/OpenMP/taskloop_final_messages.cpp vendor/clang/dist-release_60/test/OpenMP/taskloop_firstprivate_codegen.cpp vendor/clang/dist-release_60/test/OpenMP/taskloop_firstprivate_messages.cpp vendor/clang/dist-release_60/test/OpenMP/taskloop_grainsize_messages.cpp vendor/clang/dist-release_60/test/OpenMP/taskloop_in_reduction_codegen.cpp vendor/clang/dist-release_60/test/OpenMP/taskloop_in_reduction_messages.cpp vendor/clang/dist-release_60/test/OpenMP/taskloop_lastprivate_codegen.cpp vendor/clang/dist-release_60/test/OpenMP/taskloop_lastprivate_messages.cpp vendor/clang/dist-release_60/test/OpenMP/taskloop_loop_messages.cpp vendor/clang/dist-release_60/test/OpenMP/taskloop_misc_messages.c vendor/clang/dist-release_60/test/OpenMP/taskloop_num_tasks_messages.cpp vendor/clang/dist-release_60/test/OpenMP/taskloop_priority_messages.cpp vendor/clang/dist-release_60/test/OpenMP/taskloop_private_codegen.cpp vendor/clang/dist-release_60/test/OpenMP/taskloop_private_messages.cpp vendor/clang/dist-release_60/test/OpenMP/taskloop_reduction_codegen.cpp vendor/clang/dist-release_60/test/OpenMP/taskloop_reduction_messages.cpp vendor/clang/dist-release_60/test/OpenMP/taskloop_simd_aligned_messages.cpp vendor/clang/dist-release_60/test/OpenMP/taskloop_simd_ast_print.cpp vendor/clang/dist-release_60/test/OpenMP/taskloop_simd_codegen.cpp vendor/clang/dist-release_60/test/OpenMP/taskloop_simd_collapse_messages.cpp vendor/clang/dist-release_60/test/OpenMP/taskloop_simd_final_messages.cpp vendor/clang/dist-release_60/test/OpenMP/taskloop_simd_firstprivate_codegen.cpp vendor/clang/dist-release_60/test/OpenMP/taskloop_simd_firstprivate_messages.cpp vendor/clang/dist-release_60/test/OpenMP/taskloop_simd_grainsize_messages.cpp vendor/clang/dist-release_60/test/OpenMP/taskloop_simd_in_reduction_codegen.cpp vendor/clang/dist-release_60/test/OpenMP/taskloop_simd_in_reduction_messages.cpp vendor/clang/dist-release_60/test/OpenMP/taskloop_simd_lastprivate_codegen.cpp vendor/clang/dist-release_60/test/OpenMP/taskloop_simd_lastprivate_messages.cpp vendor/clang/dist-release_60/test/OpenMP/taskloop_simd_linear_messages.cpp vendor/clang/dist-release_60/test/OpenMP/taskloop_simd_loop_messages.cpp vendor/clang/dist-release_60/test/OpenMP/taskloop_simd_misc_messages.c vendor/clang/dist-release_60/test/OpenMP/taskloop_simd_num_tasks_messages.cpp vendor/clang/dist-release_60/test/OpenMP/taskloop_simd_priority_messages.cpp vendor/clang/dist-release_60/test/OpenMP/taskloop_simd_private_codegen.cpp vendor/clang/dist-release_60/test/OpenMP/taskloop_simd_private_messages.cpp vendor/clang/dist-release_60/test/OpenMP/taskloop_simd_reduction_codegen.cpp vendor/clang/dist-release_60/test/OpenMP/taskloop_simd_reduction_messages.cpp vendor/clang/dist-release_60/test/OpenMP/taskloop_simd_safelen_messages.cpp vendor/clang/dist-release_60/test/OpenMP/taskloop_simd_simdlen_messages.cpp vendor/clang/dist-release_60/test/OpenMP/taskwait_ast_print.cpp vendor/clang/dist-release_60/test/OpenMP/taskwait_codegen.cpp vendor/clang/dist-release_60/test/OpenMP/taskwait_messages.cpp vendor/clang/dist-release_60/test/OpenMP/taskyield_ast_print.cpp vendor/clang/dist-release_60/test/OpenMP/taskyield_codegen.cpp vendor/clang/dist-release_60/test/OpenMP/taskyield_messages.cpp vendor/clang/dist-release_60/test/OpenMP/teams_ast_print.cpp vendor/clang/dist-release_60/test/OpenMP/teams_codegen.cpp vendor/clang/dist-release_60/test/OpenMP/teams_default_messages.cpp vendor/clang/dist-release_60/test/OpenMP/teams_distribute_ast_print.cpp vendor/clang/dist-release_60/test/OpenMP/teams_distribute_codegen.cpp vendor/clang/dist-release_60/test/OpenMP/teams_distribute_collapse_codegen.cpp vendor/clang/dist-release_60/test/OpenMP/teams_distribute_collapse_messages.cpp vendor/clang/dist-release_60/test/OpenMP/teams_distribute_default_messages.cpp vendor/clang/dist-release_60/test/OpenMP/teams_distribute_dist_schedule_codegen.cpp vendor/clang/dist-release_60/test/OpenMP/teams_distribute_dist_schedule_messages.cpp vendor/clang/dist-release_60/test/OpenMP/teams_distribute_firstprivate_codegen.cpp vendor/clang/dist-release_60/test/OpenMP/teams_distribute_firstprivate_messages.cpp vendor/clang/dist-release_60/test/OpenMP/teams_distribute_lastprivate_codegen.cpp vendor/clang/dist-release_60/test/OpenMP/teams_distribute_lastprivate_messages.cpp vendor/clang/dist-release_60/test/OpenMP/teams_distribute_loop_messages.cpp vendor/clang/dist-release_60/test/OpenMP/teams_distribute_num_teams_messages.cpp vendor/clang/dist-release_60/test/OpenMP/teams_distribute_parallel_for_ast_print.cpp vendor/clang/dist-release_60/test/OpenMP/teams_distribute_parallel_for_codegen.cpp vendor/clang/dist-release_60/test/OpenMP/teams_distribute_parallel_for_collapse_codegen.cpp vendor/clang/dist-release_60/test/OpenMP/teams_distribute_parallel_for_collapse_messages.cpp vendor/clang/dist-release_60/test/OpenMP/teams_distribute_parallel_for_copyin_codegen.cpp vendor/clang/dist-release_60/test/OpenMP/teams_distribute_parallel_for_copyin_messages.cpp vendor/clang/dist-release_60/test/OpenMP/teams_distribute_parallel_for_default_messages.cpp vendor/clang/dist-release_60/test/OpenMP/teams_distribute_parallel_for_dist_schedule_codegen.cpp vendor/clang/dist-release_60/test/OpenMP/teams_distribute_parallel_for_dist_schedule_messages.cpp vendor/clang/dist-release_60/test/OpenMP/teams_distribute_parallel_for_firstprivate_codegen.cpp vendor/clang/dist-release_60/test/OpenMP/teams_distribute_parallel_for_firstprivate_messages.cpp vendor/clang/dist-release_60/test/OpenMP/teams_distribute_parallel_for_if_codegen.cpp vendor/clang/dist-release_60/test/OpenMP/teams_distribute_parallel_for_if_messages.cpp vendor/clang/dist-release_60/test/OpenMP/teams_distribute_parallel_for_lastprivate_codegen.cpp vendor/clang/dist-release_60/test/OpenMP/teams_distribute_parallel_for_lastprivate_messages.cpp vendor/clang/dist-release_60/test/OpenMP/teams_distribute_parallel_for_loop_messages.cpp vendor/clang/dist-release_60/test/OpenMP/teams_distribute_parallel_for_messages.cpp vendor/clang/dist-release_60/test/OpenMP/teams_distribute_parallel_for_num_teams_messages.cpp vendor/clang/dist-release_60/test/OpenMP/teams_distribute_parallel_for_num_threads_codegen.cpp vendor/clang/dist-release_60/test/OpenMP/teams_distribute_parallel_for_private_codegen.cpp vendor/clang/dist-release_60/test/OpenMP/teams_distribute_parallel_for_private_messages.cpp vendor/clang/dist-release_60/test/OpenMP/teams_distribute_parallel_for_proc_bind_codegen.cpp vendor/clang/dist-release_60/test/OpenMP/teams_distribute_parallel_for_proc_bind_messages.cpp vendor/clang/dist-release_60/test/OpenMP/teams_distribute_parallel_for_reduction_codegen.cpp vendor/clang/dist-release_60/test/OpenMP/teams_distribute_parallel_for_reduction_messages.cpp vendor/clang/dist-release_60/test/OpenMP/teams_distribute_parallel_for_schedule_codegen.cpp vendor/clang/dist-release_60/test/OpenMP/teams_distribute_parallel_for_schedule_messages.cpp vendor/clang/dist-release_60/test/OpenMP/teams_distribute_parallel_for_shared_messages.cpp vendor/clang/dist-release_60/test/OpenMP/teams_distribute_parallel_for_simd_aligned_messages.cpp vendor/clang/dist-release_60/test/OpenMP/teams_distribute_parallel_for_simd_ast_print.cpp vendor/clang/dist-release_60/test/OpenMP/teams_distribute_parallel_for_simd_codegen.cpp vendor/clang/dist-release_60/test/OpenMP/teams_distribute_parallel_for_simd_collapse_codegen.cpp vendor/clang/dist-release_60/test/OpenMP/teams_distribute_parallel_for_simd_collapse_messages.cpp vendor/clang/dist-release_60/test/OpenMP/teams_distribute_parallel_for_simd_default_messages.cpp vendor/clang/dist-release_60/test/OpenMP/teams_distribute_parallel_for_simd_dist_schedule_codegen.cpp vendor/clang/dist-release_60/test/OpenMP/teams_distribute_parallel_for_simd_dist_schedule_messages.cpp vendor/clang/dist-release_60/test/OpenMP/teams_distribute_parallel_for_simd_firstprivate_codegen.cpp vendor/clang/dist-release_60/test/OpenMP/teams_distribute_parallel_for_simd_firstprivate_messages.cpp vendor/clang/dist-release_60/test/OpenMP/teams_distribute_parallel_for_simd_if_codegen.cpp vendor/clang/dist-release_60/test/OpenMP/teams_distribute_parallel_for_simd_if_messages.cpp vendor/clang/dist-release_60/test/OpenMP/teams_distribute_parallel_for_simd_lastprivate_codegen.cpp vendor/clang/dist-release_60/test/OpenMP/teams_distribute_parallel_for_simd_lastprivate_messages.cpp vendor/clang/dist-release_60/test/OpenMP/teams_distribute_parallel_for_simd_linear_messages.cpp vendor/clang/dist-release_60/test/OpenMP/teams_distribute_parallel_for_simd_loop_messages.cpp vendor/clang/dist-release_60/test/OpenMP/teams_distribute_parallel_for_simd_messages.cpp vendor/clang/dist-release_60/test/OpenMP/teams_distribute_parallel_for_simd_num_teams_messages.cpp vendor/clang/dist-release_60/test/OpenMP/teams_distribute_parallel_for_simd_num_threads_codegen.cpp vendor/clang/dist-release_60/test/OpenMP/teams_distribute_parallel_for_simd_num_threads_messages.cpp vendor/clang/dist-release_60/test/OpenMP/teams_distribute_parallel_for_simd_private_codegen.cpp vendor/clang/dist-release_60/test/OpenMP/teams_distribute_parallel_for_simd_private_messages.cpp vendor/clang/dist-release_60/test/OpenMP/teams_distribute_parallel_for_simd_proc_bind_codegen.cpp vendor/clang/dist-release_60/test/OpenMP/teams_distribute_parallel_for_simd_proc_bind_messages.cpp vendor/clang/dist-release_60/test/OpenMP/teams_distribute_parallel_for_simd_reduction_codegen.cpp vendor/clang/dist-release_60/test/OpenMP/teams_distribute_parallel_for_simd_reduction_messages.cpp vendor/clang/dist-release_60/test/OpenMP/teams_distribute_parallel_for_simd_safelen_messages.cpp vendor/clang/dist-release_60/test/OpenMP/teams_distribute_parallel_for_simd_schedule_codegen.cpp vendor/clang/dist-release_60/test/OpenMP/teams_distribute_parallel_for_simd_shared_messages.cpp vendor/clang/dist-release_60/test/OpenMP/teams_distribute_parallel_for_simd_simdlen_messages.cpp vendor/clang/dist-release_60/test/OpenMP/teams_distribute_parallel_for_simd_thread_limit_messages.cpp vendor/clang/dist-release_60/test/OpenMP/teams_distribute_parallel_for_thread_limit_messages.cpp vendor/clang/dist-release_60/test/OpenMP/teams_distribute_private_codegen.cpp vendor/clang/dist-release_60/test/OpenMP/teams_distribute_private_messages.cpp vendor/clang/dist-release_60/test/OpenMP/teams_distribute_reduction_codegen.cpp vendor/clang/dist-release_60/test/OpenMP/teams_distribute_reduction_messages.cpp vendor/clang/dist-release_60/test/OpenMP/teams_distribute_shared_messages.cpp vendor/clang/dist-release_60/test/OpenMP/teams_distribute_simd_aligned_messages.cpp vendor/clang/dist-release_60/test/OpenMP/teams_distribute_simd_ast_print.cpp vendor/clang/dist-release_60/test/OpenMP/teams_distribute_simd_codegen.cpp vendor/clang/dist-release_60/test/OpenMP/teams_distribute_simd_collapse_codegen.cpp vendor/clang/dist-release_60/test/OpenMP/teams_distribute_simd_collapse_messages.cpp vendor/clang/dist-release_60/test/OpenMP/teams_distribute_simd_default_messages.cpp vendor/clang/dist-release_60/test/OpenMP/teams_distribute_simd_dist_schedule_codegen.cpp vendor/clang/dist-release_60/test/OpenMP/teams_distribute_simd_dist_schedule_messages.cpp vendor/clang/dist-release_60/test/OpenMP/teams_distribute_simd_firstprivate_codegen.cpp vendor/clang/dist-release_60/test/OpenMP/teams_distribute_simd_firstprivate_messages.cpp vendor/clang/dist-release_60/test/OpenMP/teams_distribute_simd_lastprivate_codegen.cpp vendor/clang/dist-release_60/test/OpenMP/teams_distribute_simd_lastprivate_messages.cpp vendor/clang/dist-release_60/test/OpenMP/teams_distribute_simd_linear_messages.cpp vendor/clang/dist-release_60/test/OpenMP/teams_distribute_simd_loop_messages.cpp vendor/clang/dist-release_60/test/OpenMP/teams_distribute_simd_messages.cpp vendor/clang/dist-release_60/test/OpenMP/teams_distribute_simd_num_teams_messages.cpp vendor/clang/dist-release_60/test/OpenMP/teams_distribute_simd_private_codegen.cpp vendor/clang/dist-release_60/test/OpenMP/teams_distribute_simd_private_messages.cpp vendor/clang/dist-release_60/test/OpenMP/teams_distribute_simd_reduction_codegen.cpp vendor/clang/dist-release_60/test/OpenMP/teams_distribute_simd_reduction_messages.cpp vendor/clang/dist-release_60/test/OpenMP/teams_distribute_simd_safelen_messages.cpp vendor/clang/dist-release_60/test/OpenMP/teams_distribute_simd_shared_messages.cpp vendor/clang/dist-release_60/test/OpenMP/teams_distribute_simd_simdlen_messages.cpp vendor/clang/dist-release_60/test/OpenMP/teams_distribute_simd_thread_limit_messages.cpp vendor/clang/dist-release_60/test/OpenMP/teams_distribute_thread_limit_messages.cpp vendor/clang/dist-release_60/test/OpenMP/teams_firstprivate_codegen.cpp vendor/clang/dist-release_60/test/OpenMP/teams_firstprivate_messages.cpp vendor/clang/dist-release_60/test/OpenMP/teams_messages.cpp vendor/clang/dist-release_60/test/OpenMP/teams_num_teams_messages.cpp vendor/clang/dist-release_60/test/OpenMP/teams_private_codegen.cpp vendor/clang/dist-release_60/test/OpenMP/teams_private_messages.cpp vendor/clang/dist-release_60/test/OpenMP/teams_reduction_messages.cpp vendor/clang/dist-release_60/test/OpenMP/teams_shared_messages.cpp vendor/clang/dist-release_60/test/OpenMP/teams_thread_limit_messages.cpp vendor/clang/dist-release_60/test/OpenMP/threadprivate_ast_print.cpp vendor/clang/dist-release_60/test/OpenMP/threadprivate_codegen.cpp vendor/clang/dist-release_60/test/OpenMP/threadprivate_messages.cpp vendor/clang/dist-release_60/test/OpenMP/varargs.cpp vendor/clang/dist-release_60/test/OpenMP/vla_crash.c vendor/clang/dist-release_60/test/Preprocessor/predefined-arch-macros.c vendor/clang/dist-release_60/test/Sema/compare.c vendor/clang/dist-release_60/test/Sema/tautological-constant-compare.c vendor/clang/dist-release_60/test/Sema/tautological-constant-enum-compare.c vendor/clang/dist-release_60/test/Sema/tautological-unsigned-enum-zero-compare.c vendor/clang/dist-release_60/test/Sema/tautological-unsigned-enum-zero-compare.cpp vendor/clang/dist-release_60/test/Sema/tautological-unsigned-zero-compare.c vendor/clang/dist-release_60/test/Sema/warn-strict-prototypes.c vendor/clang/dist-release_60/test/SemaCXX/compare.cpp vendor/clang/dist-release_60/test/SemaCXX/copy-initialization.cpp vendor/clang/dist-release_60/test/SemaCXX/cxx1y-contextual-conversion-tweaks.cpp vendor/clang/dist-release_60/test/SemaCXX/cxx1y-generic-lambdas.cpp vendor/clang/dist-release_60/test/SemaCXX/cxx2a-pointer-to-const-ref-member.cpp vendor/clang/dist-release_60/test/SemaCXX/extern-c.cpp vendor/clang/dist-release_60/test/SemaCXX/lambda-expressions.cpp vendor/clang/dist-release_60/test/SemaTemplate/undefined-template.cpp vendor/clang/dist-release_60/tools/driver/cc1as_main.cpp vendor/clang/dist-release_60/tools/libclang/CIndex.cpp vendor/clang/dist-release_60/tools/libclang/libclang.exports Modified: vendor/clang/dist-release_60/docs/AttributeReference.rst ============================================================================== --- vendor/clang/dist-release_60/docs/AttributeReference.rst Sat Jan 6 21:34:33 2018 (r327640) +++ vendor/clang/dist-release_60/docs/AttributeReference.rst Sat Jan 6 21:35:46 2018 (r327641) @@ -1,13 +1,3567 @@ .. ------------------------------------------------------------------- NOTE: This file is automatically generated by running clang-tblgen - -gen-attr-docs. Do not edit this file by hand!! The contents for - this file are automatically generated by a server-side process. - - Please do not commit this file. The file exists for local testing - purposes only. + -gen-attr-docs. Do not edit this file by hand!! ------------------------------------------------------------------- =================== Attributes in Clang -=================== \ No newline at end of file +=================== +.. contents:: + :local: + +Introduction +============ + +This page lists the attributes currently supported by Clang. + +Function Attributes +=================== + + +#pragma omp declare simd +------------------------ +.. csv-table:: Supported Syntaxes + :header: "GNU", "C++11", "C2x", "__declspec", "Keyword", "Pragma", "Pragma clang attribute" + + "","","","","", "X", "" + +The `declare simd` construct can be applied to a function to enable the creation +of one or more versions that can process multiple arguments using SIMD +instructions from a single invocation in a SIMD loop. The `declare simd` +directive is a declarative directive. There may be multiple `declare simd` +directives for a function. The use of a `declare simd` construct on a function +enables the creation of SIMD versions of the associated function that can be +used to process multiple arguments from a single invocation from a SIMD loop +concurrently. +The syntax of the `declare simd` construct is as follows: + + .. code-block:: c + + #pragma omp declare simd [clause[[,] clause] ...] new-line + [#pragma omp declare simd [clause[[,] clause] ...] new-line] + [...] + function definition or declaration + +where clause is one of the following: + + .. code-block:: c + + simdlen(length) + linear(argument-list[:constant-linear-step]) + aligned(argument-list[:alignment]) + uniform(argument-list) + inbranch + notinbranch + + +#pragma omp declare target +-------------------------- +.. csv-table:: Supported Syntaxes + :header: "GNU", "C++11", "C2x", "__declspec", "Keyword", "Pragma", "Pragma clang attribute" + + "","","","","", "X", "" + +The `declare target` directive specifies that variables and functions are mapped +to a device for OpenMP offload mechanism. + +The syntax of the declare target directive is as follows: + + .. code-block:: c + + #pragma omp declare target new-line + declarations-definition-seq + #pragma omp end declare target new-line + + +_Noreturn +--------- +.. csv-table:: Supported Syntaxes + :header: "GNU", "C++11", "C2x", "__declspec", "Keyword", "Pragma", "Pragma clang attribute" + + "","","","","X", "", "" + +A function declared as ``_Noreturn`` shall not return to its caller. The +compiler will generate a diagnostic for a function declared as ``_Noreturn`` +that appears to be capable of returning to its caller. + + +abi_tag (gnu::abi_tag) +---------------------- +.. csv-table:: Supported Syntaxes + :header: "GNU", "C++11", "C2x", "__declspec", "Keyword", "Pragma", "Pragma clang attribute" + + "X","X","","","", "", "X" + +The ``abi_tag`` attribute can be applied to a function, variable, class or +inline namespace declaration to modify the mangled name of the entity. It gives +the ability to distinguish between different versions of the same entity but +with different ABI versions supported. For example, a newer version of a class +could have a different set of data members and thus have a different size. Using +the ``abi_tag`` attribute, it is possible to have different mangled names for +a global variable of the class type. Therefor, the old code could keep using +the old manged name and the new code will use the new mangled name with tags. + + +acquire_capability (acquire_shared_capability, clang::acquire_capability, clang::acquire_shared_capability) +----------------------------------------------------------------------------------------------------------- +.. csv-table:: Supported Syntaxes + :header: "GNU", "C++11", "C2x", "__declspec", "Keyword", "Pragma", "Pragma clang attribute" + + "X","X","","","", "", "" + +Marks a function as acquiring a capability. + + +alloc_align (gnu::alloc_align) +------------------------------ +.. csv-table:: Supported Syntaxes + :header: "GNU", "C++11", "C2x", "__declspec", "Keyword", "Pragma", "Pragma clang attribute" + + "X","X","","","", "", "" + +Use ``__attribute__((alloc_align())`` on a function +declaration to specify that the return value of the function (which must be a +pointer type) is at least as aligned as the value of the indicated parameter. The +parameter is given by its index in the list of formal parameters; the first +parameter has index 1 unless the function is a C++ non-static member function, +in which case the first parameter has index 2 to account for the implicit ``this`` +parameter. + +.. code-block:: c++ + + // The returned pointer has the alignment specified by the first parameter. + void *a(size_t align) __attribute__((alloc_align(1))); + + // The returned pointer has the alignment specified by the second parameter. + void *b(void *v, size_t align) __attribute__((alloc_align(2))); + + // The returned pointer has the alignment specified by the second visible + // parameter, however it must be adjusted for the implicit 'this' parameter. + void *Foo::b(void *v, size_t align) __attribute__((alloc_align(3))); + +Note that this attribute merely informs the compiler that a function always +returns a sufficiently aligned pointer. It does not cause the compiler to +emit code to enforce that alignment. The behavior is undefined if the returned +poitner is not sufficiently aligned. + + +alloc_size (gnu::alloc_size) +---------------------------- +.. csv-table:: Supported Syntaxes + :header: "GNU", "C++11", "C2x", "__declspec", "Keyword", "Pragma", "Pragma clang attribute" + + "X","X","","","", "", "X" + +The ``alloc_size`` attribute can be placed on functions that return pointers in +order to hint to the compiler how many bytes of memory will be available at the +returned poiner. ``alloc_size`` takes one or two arguments. + +- ``alloc_size(N)`` implies that argument number N equals the number of + available bytes at the returned pointer. +- ``alloc_size(N, M)`` implies that the product of argument number N and + argument number M equals the number of available bytes at the returned + pointer. + +Argument numbers are 1-based. + +An example of how to use ``alloc_size`` + +.. code-block:: c + + void *my_malloc(int a) __attribute__((alloc_size(1))); + void *my_calloc(int a, int b) __attribute__((alloc_size(1, 2))); + + int main() { + void *const p = my_malloc(100); + assert(__builtin_object_size(p, 0) == 100); + void *const a = my_calloc(20, 5); + assert(__builtin_object_size(a, 0) == 100); + } + +.. Note:: This attribute works differently in clang than it does in GCC. + Specifically, clang will only trace ``const`` pointers (as above); we give up + on pointers that are not marked as ``const``. In the vast majority of cases, + this is unimportant, because LLVM has support for the ``alloc_size`` + attribute. However, this may cause mildly unintuitive behavior when used with + other attributes, such as ``enable_if``. + + +assert_capability (assert_shared_capability, clang::assert_capability, clang::assert_shared_capability) +------------------------------------------------------------------------------------------------------- +.. csv-table:: Supported Syntaxes + :header: "GNU", "C++11", "C2x", "__declspec", "Keyword", "Pragma", "Pragma clang attribute" + + "X","X","","","", "", "" + +Marks a function that dynamically tests whether a capability is held, and halts +the program if it is not held. + + +assume_aligned (gnu::assume_aligned) +------------------------------------ +.. csv-table:: Supported Syntaxes + :header: "GNU", "C++11", "C2x", "__declspec", "Keyword", "Pragma", "Pragma clang attribute" + + "X","X","","","", "", "X" + +Use ``__attribute__((assume_aligned([,]))`` on a function +declaration to specify that the return value of the function (which must be a +pointer type) has the specified offset, in bytes, from an address with the +specified alignment. The offset is taken to be zero if omitted. + +.. code-block:: c++ + + // The returned pointer value has 32-byte alignment. + void *a() __attribute__((assume_aligned (32))); + + // The returned pointer value is 4 bytes greater than an address having + // 32-byte alignment. + void *b() __attribute__((assume_aligned (32, 4))); + +Note that this attribute provides information to the compiler regarding a +condition that the code already ensures is true. It does not cause the compiler +to enforce the provided alignment assumption. + + +availability +------------ +.. csv-table:: Supported Syntaxes + :header: "GNU", "C++11", "C2x", "__declspec", "Keyword", "Pragma", "Pragma clang attribute" + + "X","","","","", "", "X" + +The ``availability`` attribute can be placed on declarations to describe the +lifecycle of that declaration relative to operating system versions. Consider +the function declaration for a hypothetical function ``f``: + +.. code-block:: c++ + + void f(void) __attribute__((availability(macos,introduced=10.4,deprecated=10.6,obsoleted=10.7))); + +The availability attribute states that ``f`` was introduced in macOS 10.4, +deprecated in macOS 10.6, and obsoleted in macOS 10.7. This information +is used by Clang to determine when it is safe to use ``f``: for example, if +Clang is instructed to compile code for macOS 10.5, a call to ``f()`` +succeeds. If Clang is instructed to compile code for macOS 10.6, the call +succeeds but Clang emits a warning specifying that the function is deprecated. +Finally, if Clang is instructed to compile code for macOS 10.7, the call +fails because ``f()`` is no longer available. + +The availability attribute is a comma-separated list starting with the +platform name and then including clauses specifying important milestones in the +declaration's lifetime (in any order) along with additional information. Those +clauses can be: + +introduced=\ *version* + The first version in which this declaration was introduced. + +deprecated=\ *version* + The first version in which this declaration was deprecated, meaning that + users should migrate away from this API. + +obsoleted=\ *version* + The first version in which this declaration was obsoleted, meaning that it + was removed completely and can no longer be used. + +unavailable + This declaration is never available on this platform. + +message=\ *string-literal* + Additional message text that Clang will provide when emitting a warning or + error about use of a deprecated or obsoleted declaration. Useful to direct + users to replacement APIs. + +replacement=\ *string-literal* + Additional message text that Clang will use to provide Fix-It when emitting + a warning about use of a deprecated declaration. The Fix-It will replace + the deprecated declaration with the new declaration specified. + +Multiple availability attributes can be placed on a declaration, which may +correspond to different platforms. Only the availability attribute with the +platform corresponding to the target platform will be used; any others will be +ignored. If no availability attribute specifies availability for the current +target platform, the availability attributes are ignored. Supported platforms +are: + +``ios`` + Apple's iOS operating system. The minimum deployment target is specified by + the ``-mios-version-min=*version*`` or ``-miphoneos-version-min=*version*`` + command-line arguments. + +``macos`` + Apple's macOS operating system. The minimum deployment target is + specified by the ``-mmacosx-version-min=*version*`` command-line argument. + ``macosx`` is supported for backward-compatibility reasons, but it is + deprecated. + +``tvos`` + Apple's tvOS operating system. The minimum deployment target is specified by + the ``-mtvos-version-min=*version*`` command-line argument. + +``watchos`` + Apple's watchOS operating system. The minimum deployment target is specified by + the ``-mwatchos-version-min=*version*`` command-line argument. + +A declaration can typically be used even when deploying back to a platform +version prior to when the declaration was introduced. When this happens, the +declaration is `weakly linked +`_, +as if the ``weak_import`` attribute were added to the declaration. A +weakly-linked declaration may or may not be present a run-time, and a program +can determine whether the declaration is present by checking whether the +address of that declaration is non-NULL. + +The flag ``strict`` disallows using API when deploying back to a +platform version prior to when the declaration was introduced. An +attempt to use such API before its introduction causes a hard error. +Weakly-linking is almost always a better API choice, since it allows +users to query availability at runtime. + +If there are multiple declarations of the same entity, the availability +attributes must either match on a per-platform basis or later +declarations must not have availability attributes for that +platform. For example: + +.. code-block:: c + + void g(void) __attribute__((availability(macos,introduced=10.4))); + void g(void) __attribute__((availability(macos,introduced=10.4))); // okay, matches + void g(void) __attribute__((availability(ios,introduced=4.0))); // okay, adds a new platform + void g(void); // okay, inherits both macos and ios availability from above. + void g(void) __attribute__((availability(macos,introduced=10.5))); // error: mismatch + +When one method overrides another, the overriding method can be more widely available than the overridden method, e.g.,: + +.. code-block:: objc + + @interface A + - (id)method __attribute__((availability(macos,introduced=10.4))); + - (id)method2 __attribute__((availability(macos,introduced=10.4))); + @end + + @interface B : A + - (id)method __attribute__((availability(macos,introduced=10.3))); // okay: method moved into base class later + - (id)method __attribute__((availability(macos,introduced=10.5))); // error: this method was available via the base class in 10.4 + @end + +Starting with the macOS 10.12 SDK, the ``API_AVAILABLE`` macro from +```` can simplify the spelling: + +.. code-block:: objc + + @interface A + - (id)method API_AVAILABLE(macos(10.11))); + - (id)otherMethod API_AVAILABLE(macos(10.11), ios(11.0)); + @end + +Also see the documentation for `@available +`_ + + +carries_dependency +------------------ +.. csv-table:: Supported Syntaxes + :header: "GNU", "C++11", "C2x", "__declspec", "Keyword", "Pragma", "Pragma clang attribute" + + "X","X","","","", "", "X" + +The ``carries_dependency`` attribute specifies dependency propagation into and +out of functions. + +When specified on a function or Objective-C method, the ``carries_dependency`` +attribute means that the return value carries a dependency out of the function, +so that the implementation need not constrain ordering upon return from that +function. Implementations of the function and its caller may choose to preserve +dependencies instead of emitting memory ordering instructions such as fences. + +Note, this attribute does not change the meaning of the program, but may result +in generation of more efficient code. + + +convergent (clang::convergent) +------------------------------ +.. csv-table:: Supported Syntaxes + :header: "GNU", "C++11", "C2x", "__declspec", "Keyword", "Pragma", "Pragma clang attribute" + + "X","X","","","", "", "X" + +The ``convergent`` attribute can be placed on a function declaration. It is +translated into the LLVM ``convergent`` attribute, which indicates that the call +instructions of a function with this attribute cannot be made control-dependent +on any additional values. + +In languages designed for SPMD/SIMT programming model, e.g. OpenCL or CUDA, +the call instructions of a function with this attribute must be executed by +all work items or threads in a work group or sub group. + +This attribute is different from ``noduplicate`` because it allows duplicating +function calls if it can be proved that the duplicated function calls are +not made control-dependent on any additional values, e.g., unrolling a loop +executed by all work items. + +Sample usage: +.. code-block:: c + + void convfunc(void) __attribute__((convergent)); + // Setting it as a C++11 attribute is also valid in a C++ program. + // void convfunc(void) [[clang::convergent]]; + + +deprecated (gnu::deprecated) +---------------------------- +.. csv-table:: Supported Syntaxes + :header: "GNU", "C++11", "C2x", "__declspec", "Keyword", "Pragma", "Pragma clang attribute" + + "X","X","X","X","", "", "" + +The ``deprecated`` attribute can be applied to a function, a variable, or a +type. This is useful when identifying functions, variables, or types that are +expected to be removed in a future version of a program. + +Consider the function declaration for a hypothetical function ``f``: + +.. code-block:: c++ + + void f(void) __attribute__((deprecated("message", "replacement"))); + +When spelled as `__attribute__((deprecated))`, the deprecated attribute can have +two optional string arguments. The first one is the message to display when +emitting the warning; the second one enables the compiler to provide a Fix-It +to replace the deprecated name with a new name. Otherwise, when spelled as +`[[gnu::deprecated]] or [[deprecated]]`, the attribute can have one optional +string argument which is the message to display when emitting the warning. + + +diagnose_if +----------- +.. csv-table:: Supported Syntaxes + :header: "GNU", "C++11", "C2x", "__declspec", "Keyword", "Pragma", "Pragma clang attribute" + + "X","","","","", "", "" + +The ``diagnose_if`` attribute can be placed on function declarations to emit +warnings or errors at compile-time if calls to the attributed function meet +certain user-defined criteria. For example: + +.. code-block:: c + + void abs(int a) + __attribute__((diagnose_if(a >= 0, "Redundant abs call", "warning"))); + void must_abs(int a) + __attribute__((diagnose_if(a >= 0, "Redundant abs call", "error"))); + + int val = abs(1); // warning: Redundant abs call + int val2 = must_abs(1); // error: Redundant abs call + int val3 = abs(val); + int val4 = must_abs(val); // Because run-time checks are not emitted for + // diagnose_if attributes, this executes without + // issue. + + +``diagnose_if`` is closely related to ``enable_if``, with a few key differences: + +* Overload resolution is not aware of ``diagnose_if`` attributes: they're + considered only after we select the best candidate from a given candidate set. +* Function declarations that differ only in their ``diagnose_if`` attributes are + considered to be redeclarations of the same function (not overloads). +* If the condition provided to ``diagnose_if`` cannot be evaluated, no + diagnostic will be emitted. + +Otherwise, ``diagnose_if`` is essentially the logical negation of ``enable_if``. + +As a result of bullet number two, ``diagnose_if`` attributes will stack on the +same function. For example: + +.. code-block:: c + + int foo() __attribute__((diagnose_if(1, "diag1", "warning"))); + int foo() __attribute__((diagnose_if(1, "diag2", "warning"))); + + int bar = foo(); // warning: diag1 + // warning: diag2 + int (*fooptr)(void) = foo; // warning: diag1 + // warning: diag2 + + constexpr int supportsAPILevel(int N) { return N < 5; } + int baz(int a) + __attribute__((diagnose_if(!supportsAPILevel(10), + "Upgrade to API level 10 to use baz", "error"))); + int baz(int a) + __attribute__((diagnose_if(!a, "0 is not recommended.", "warning"))); + + int (*bazptr)(int) = baz; // error: Upgrade to API level 10 to use baz + int v = baz(0); // error: Upgrade to API level 10 to use baz + +Query for this feature with ``__has_attribute(diagnose_if)``. + + +disable_tail_calls (clang::disable_tail_calls) +---------------------------------------------- +.. csv-table:: Supported Syntaxes + :header: "GNU", "C++11", "C2x", "__declspec", "Keyword", "Pragma", "Pragma clang attribute" + + "X","X","","","", "", "X" + +The ``disable_tail_calls`` attribute instructs the backend to not perform tail call optimization inside the marked function. + +For example: + + .. code-block:: c + + int callee(int); + + int foo(int a) __attribute__((disable_tail_calls)) { + return callee(a); // This call is not tail-call optimized. + } + +Marking virtual functions as ``disable_tail_calls`` is legal. + + .. code-block:: c++ + + int callee(int); + + class Base { + public: + [[clang::disable_tail_calls]] virtual int foo1() { + return callee(); // This call is not tail-call optimized. + } + }; + + class Derived1 : public Base { + public: + int foo1() override { + return callee(); // This call is tail-call optimized. + } + }; + + +enable_if +--------- +.. csv-table:: Supported Syntaxes + :header: "GNU", "C++11", "C2x", "__declspec", "Keyword", "Pragma", "Pragma clang attribute" + + "X","","","","", "", "X" + +.. Note:: Some features of this attribute are experimental. The meaning of + multiple enable_if attributes on a single declaration is subject to change in + a future version of clang. Also, the ABI is not standardized and the name + mangling may change in future versions. To avoid that, use asm labels. + +The ``enable_if`` attribute can be placed on function declarations to control +which overload is selected based on the values of the function's arguments. +When combined with the ``overloadable`` attribute, this feature is also +available in C. + +.. code-block:: c++ + + int isdigit(int c); + int isdigit(int c) __attribute__((enable_if(c <= -1 || c > 255, "chosen when 'c' is out of range"))) __attribute__((unavailable("'c' must have the value of an unsigned char or EOF"))); + + void foo(char c) { + isdigit(c); + isdigit(10); + isdigit(-10); // results in a compile-time error. + } + +The enable_if attribute takes two arguments, the first is an expression written +in terms of the function parameters, the second is a string explaining why this +overload candidate could not be selected to be displayed in diagnostics. The +expression is part of the function signature for the purposes of determining +whether it is a redeclaration (following the rules used when determining +whether a C++ template specialization is ODR-equivalent), but is not part of +the type. + +The enable_if expression is evaluated as if it were the body of a +bool-returning constexpr function declared with the arguments of the function +it is being applied to, then called with the parameters at the call site. If the +result is false or could not be determined through constant expression +evaluation, then this overload will not be chosen and the provided string may +be used in a diagnostic if the compile fails as a result. + +Because the enable_if expression is an unevaluated context, there are no global +state changes, nor the ability to pass information from the enable_if +expression to the function body. For example, suppose we want calls to +strnlen(strbuf, maxlen) to resolve to strnlen_chk(strbuf, maxlen, size of +strbuf) only if the size of strbuf can be determined: + +.. code-block:: c++ + + __attribute__((always_inline)) + static inline size_t strnlen(const char *s, size_t maxlen) + __attribute__((overloadable)) + __attribute__((enable_if(__builtin_object_size(s, 0) != -1))), + "chosen when the buffer size is known but 'maxlen' is not"))) + { + return strnlen_chk(s, maxlen, __builtin_object_size(s, 0)); + } + +Multiple enable_if attributes may be applied to a single declaration. In this +case, the enable_if expressions are evaluated from left to right in the +following manner. First, the candidates whose enable_if expressions evaluate to +false or cannot be evaluated are discarded. If the remaining candidates do not +share ODR-equivalent enable_if expressions, the overload resolution is +ambiguous. Otherwise, enable_if overload resolution continues with the next +enable_if attribute on the candidates that have not been discarded and have +remaining enable_if attributes. In this way, we pick the most specific +overload out of a number of viable overloads using enable_if. + +.. code-block:: c++ + + void f() __attribute__((enable_if(true, ""))); // #1 + void f() __attribute__((enable_if(true, ""))) __attribute__((enable_if(true, ""))); // #2 + + void g(int i, int j) __attribute__((enable_if(i, ""))); // #1 + void g(int i, int j) __attribute__((enable_if(j, ""))) __attribute__((enable_if(true))); // #2 + +In this example, a call to f() is always resolved to #2, as the first enable_if +expression is ODR-equivalent for both declarations, but #1 does not have another +enable_if expression to continue evaluating, so the next round of evaluation has +only a single candidate. In a call to g(1, 1), the call is ambiguous even though +#2 has more enable_if attributes, because the first enable_if expressions are +not ODR-equivalent. + +Query for this feature with ``__has_attribute(enable_if)``. + +Note that functions with one or more ``enable_if`` attributes may not have +their address taken, unless all of the conditions specified by said +``enable_if`` are constants that evaluate to ``true``. For example: + +.. code-block:: c + + const int TrueConstant = 1; + const int FalseConstant = 0; + int f(int a) __attribute__((enable_if(a > 0, ""))); + int g(int a) __attribute__((enable_if(a == 0 || a != 0, ""))); + int h(int a) __attribute__((enable_if(1, ""))); + int i(int a) __attribute__((enable_if(TrueConstant, ""))); + int j(int a) __attribute__((enable_if(FalseConstant, ""))); + + void fn() { + int (*ptr)(int); + ptr = &f; // error: 'a > 0' is not always true + ptr = &g; // error: 'a == 0 || a != 0' is not a truthy constant + ptr = &h; // OK: 1 is a truthy constant + ptr = &i; // OK: 'TrueConstant' is a truthy constant + ptr = &j; // error: 'FalseConstant' is a constant, but not truthy + } + +Because ``enable_if`` evaluation happens during overload resolution, +``enable_if`` may give unintuitive results when used with templates, depending +on when overloads are resolved. In the example below, clang will emit a +diagnostic about no viable overloads for ``foo`` in ``bar``, but not in ``baz``: + +.. code-block:: c++ + + double foo(int i) __attribute__((enable_if(i > 0, ""))); + void *foo(int i) __attribute__((enable_if(i <= 0, ""))); + template + auto bar() { return foo(I); } + + template + auto baz() { return foo(T::number); } + + struct WithNumber { constexpr static int number = 1; }; + void callThem() { + bar(); + baz(); + } + +This is because, in ``bar``, ``foo`` is resolved prior to template +instantiation, so the value for ``I`` isn't known (thus, both ``enable_if`` +conditions for ``foo`` fail). However, in ``baz``, ``foo`` is resolved during +template instantiation, so the value for ``T::number`` is known. + + +external_source_symbol (clang::external_source_symbol) +------------------------------------------------------ +.. csv-table:: Supported Syntaxes + :header: "GNU", "C++11", "C2x", "__declspec", "Keyword", "Pragma", "Pragma clang attribute" + + "X","X","","","", "", "X" + +The ``external_source_symbol`` attribute specifies that a declaration originates +from an external source and describes the nature of that source. + +The fact that Clang is capable of recognizing declarations that were defined +externally can be used to provide better tooling support for mixed-language +projects or projects that rely on auto-generated code. For instance, an IDE that +uses Clang and that supports mixed-language projects can use this attribute to +provide a correct 'jump-to-definition' feature. For a concrete example, +consider a protocol that's defined in a Swift file: + +.. code-block:: swift + + @objc public protocol SwiftProtocol { + func method() + } + +This protocol can be used from Objective-C code by including a header file that +was generated by the Swift compiler. The declarations in that header can use +the ``external_source_symbol`` attribute to make Clang aware of the fact +that ``SwiftProtocol`` actually originates from a Swift module: + +.. code-block:: objc + + __attribute__((external_source_symbol(language="Swift",defined_in="module"))) + @protocol SwiftProtocol + @required + - (void) method; + @end + +Consequently, when 'jump-to-definition' is performed at a location that +references ``SwiftProtocol``, the IDE can jump to the original definition in +the Swift source file rather than jumping to the Objective-C declaration in the +auto-generated header file. + +The ``external_source_symbol`` attribute is a comma-separated list that includes +clauses that describe the origin and the nature of the particular declaration. +Those clauses can be: + +language=\ *string-literal* + The name of the source language in which this declaration was defined. + +defined_in=\ *string-literal* + The name of the source container in which the declaration was defined. The + exact definition of source container is language-specific, e.g. Swift's + source containers are modules, so ``defined_in`` should specify the Swift + module name. + +generated_declaration + This declaration was automatically generated by some tool. + +The clauses can be specified in any order. The clauses that are listed above are +all optional, but the attribute has to have at least one clause. + + +flatten (gnu::flatten) +---------------------- +.. csv-table:: Supported Syntaxes + :header: "GNU", "C++11", "C2x", "__declspec", "Keyword", "Pragma", "Pragma clang attribute" + + "X","X","","","", "", "X" + +The ``flatten`` attribute causes calls within the attributed function to +be inlined unless it is impossible to do so, for example if the body of the +callee is unavailable or if the callee has the ``noinline`` attribute. + + +force_align_arg_pointer (gnu::force_align_arg_pointer) +------------------------------------------------------ +.. csv-table:: Supported Syntaxes + :header: "GNU", "C++11", "C2x", "__declspec", "Keyword", "Pragma", "Pragma clang attribute" + + "X","X","","","", "", "" + +Use this attribute to force stack alignment. + +Legacy x86 code uses 4-byte stack alignment. Newer aligned SSE instructions +(like 'movaps') that work with the stack require operands to be 16-byte aligned. +This attribute realigns the stack in the function prologue to make sure the +stack can be used with SSE instructions. + +Note that the x86_64 ABI forces 16-byte stack alignment at the call site. +Because of this, 'force_align_arg_pointer' is not needed on x86_64, except in +rare cases where the caller does not align the stack properly (e.g. flow +jumps from i386 arch code). + + .. code-block:: c + + __attribute__ ((force_align_arg_pointer)) + void f () { + ... + } + + +format (gnu::format) +-------------------- +.. csv-table:: Supported Syntaxes + :header: "GNU", "C++11", "C2x", "__declspec", "Keyword", "Pragma", "Pragma clang attribute" + + "X","X","","","", "", "" + +Clang supports the ``format`` attribute, which indicates that the function +accepts a ``printf`` or ``scanf``-like format string and corresponding +arguments or a ``va_list`` that contains these arguments. + +Please see `GCC documentation about format attribute +`_ to find details +about attribute syntax. + +Clang implements two kinds of checks with this attribute. + +#. Clang checks that the function with the ``format`` attribute is called with + a format string that uses format specifiers that are allowed, and that + arguments match the format string. This is the ``-Wformat`` warning, it is + on by default. + +#. Clang checks that the format string argument is a literal string. This is + the ``-Wformat-nonliteral`` warning, it is off by default. + + Clang implements this mostly the same way as GCC, but there is a difference + for functions that accept a ``va_list`` argument (for example, ``vprintf``). + GCC does not emit ``-Wformat-nonliteral`` warning for calls to such + functions. Clang does not warn if the format string comes from a function + parameter, where the function is annotated with a compatible attribute, + otherwise it warns. For example: + + .. code-block:: c + + __attribute__((__format__ (__scanf__, 1, 3))) + void foo(const char* s, char *buf, ...) { + va_list ap; + va_start(ap, buf); + + vprintf(s, ap); // warning: format string is not a string literal + } + + In this case we warn because ``s`` contains a format string for a + ``scanf``-like function, but it is passed to a ``printf``-like function. + + If the attribute is removed, clang still warns, because the format string is + not a string literal. + + Another example: + + .. code-block:: c + + __attribute__((__format__ (__printf__, 1, 3))) + void foo(const char* s, char *buf, ...) { + va_list ap; + va_start(ap, buf); + + vprintf(s, ap); // warning + } + + In this case Clang does not warn because the format string ``s`` and + the corresponding arguments are annotated. If the arguments are + incorrect, the caller of ``foo`` will receive a warning. + + +ifunc (gnu::ifunc) +------------------ +.. csv-table:: Supported Syntaxes + :header: "GNU", "C++11", "C2x", "__declspec", "Keyword", "Pragma", "Pragma clang attribute" + + "X","X","","","", "", "X" + +``__attribute__((ifunc("resolver")))`` is used to mark that the address of a declaration should be resolved at runtime by calling a resolver function. + +The symbol name of the resolver function is given in quotes. A function with this name (after mangling) must be defined in the current translation unit; it may be ``static``. The resolver function should take no arguments and return a pointer. + +The ``ifunc`` attribute may only be used on a function declaration. A function declaration with an ``ifunc`` attribute is considered to be a definition of the declared entity. The entity must not have weak linkage; for example, in C++, it cannot be applied to a declaration if a definition at that location would be considered inline. + +Not all targets support this attribute. ELF targets support this attribute when using binutils v2.20.1 or higher and glibc v2.11.1 or higher. Non-ELF targets currently do not support this attribute. + + +internal_linkage (clang::internal_linkage) +------------------------------------------ +.. csv-table:: Supported Syntaxes + :header: "GNU", "C++11", "C2x", "__declspec", "Keyword", "Pragma", "Pragma clang attribute" + + "X","X","","","", "", "X" + +The ``internal_linkage`` attribute changes the linkage type of the declaration to internal. +This is similar to C-style ``static``, but can be used on classes and class methods. When applied to a class definition, +this attribute affects all methods and static data members of that class. +This can be used to contain the ABI of a C++ library by excluding unwanted class methods from the export tables. + + +interrupt (ARM) +--------------- +.. csv-table:: Supported Syntaxes + :header: "GNU", "C++11", "C2x", "__declspec", "Keyword", "Pragma", "Pragma clang attribute" + + "X","X","","","", "", "" + +Clang supports the GNU style ``__attribute__((interrupt("TYPE")))`` attribute on +ARM targets. This attribute may be attached to a function definition and +instructs the backend to generate appropriate function entry/exit code so that +it can be used directly as an interrupt service routine. + +The parameter passed to the interrupt attribute is optional, but if +provided it must be a string literal with one of the following values: "IRQ", +"FIQ", "SWI", "ABORT", "UNDEF". + +The semantics are as follows: + +- If the function is AAPCS, Clang instructs the backend to realign the stack to + 8 bytes on entry. This is a general requirement of the AAPCS at public + interfaces, but may not hold when an exception is taken. Doing this allows + other AAPCS functions to be called. +- If the CPU is M-class this is all that needs to be done since the architecture + itself is designed in such a way that functions obeying the normal AAPCS ABI + constraints are valid exception handlers. +- If the CPU is not M-class, the prologue and epilogue are modified to save all + non-banked registers that are used, so that upon return the user-mode state + will not be corrupted. Note that to avoid unnecessary overhead, only + general-purpose (integer) registers are saved in this way. If VFP operations + are needed, that state must be saved manually. + + Specifically, interrupt kinds other than "FIQ" will save all core registers + except "lr" and "sp". "FIQ" interrupts will save r0-r7. +- If the CPU is not M-class, the return instruction is changed to one of the + canonical sequences permitted by the architecture for exception return. Where + possible the function itself will make the necessary "lr" adjustments so that + the "preferred return address" is selected. + + Unfortunately the compiler is unable to make this guarantee for an "UNDEF" + handler, where the offset from "lr" to the preferred return address depends on + the execution state of the code which generated the exception. In this case + a sequence equivalent to "movs pc, lr" will be used. + + +interrupt (AVR) +--------------- +.. csv-table:: Supported Syntaxes + :header: "GNU", "C++11", "C2x", "__declspec", "Keyword", "Pragma", "Pragma clang attribute" + + "X","X","","","", "", "X" + +Clang supports the GNU style ``__attribute__((interrupt))`` attribute on +AVR targets. This attribute may be attached to a function definition and instructs +the backend to generate appropriate function entry/exit code so that it can be used +directly as an interrupt service routine. + +On the AVR, the hardware globally disables interrupts when an interrupt is executed. +The first instruction of an interrupt handler declared with this attribute is a SEI +instruction to re-enable interrupts. See also the signal attribute that +does not insert a SEI instruction. + + +interrupt (MIPS) +---------------- +.. csv-table:: Supported Syntaxes + :header: "GNU", "C++11", "C2x", "__declspec", "Keyword", "Pragma", "Pragma clang attribute" + + "X","X","","","", "", "X" + +Clang supports the GNU style ``__attribute__((interrupt("ARGUMENT")))`` attribute on +MIPS targets. This attribute may be attached to a function definition and instructs +the backend to generate appropriate function entry/exit code so that it can be used +directly as an interrupt service routine. + +By default, the compiler will produce a function prologue and epilogue suitable for +an interrupt service routine that handles an External Interrupt Controller (eic) +generated interrupt. This behaviour can be explicitly requested with the "eic" +argument. + +Otherwise, for use with vectored interrupt mode, the argument passed should be +of the form "vector=LEVEL" where LEVEL is one of the following values: +"sw0", "sw1", "hw0", "hw1", "hw2", "hw3", "hw4", "hw5". The compiler will +then set the interrupt mask to the corresponding level which will mask all +interrupts up to and including the argument. + +The semantics are as follows: + +- The prologue is modified so that the Exception Program Counter (EPC) and + Status coprocessor registers are saved to the stack. The interrupt mask is + set so that the function can only be interrupted by a higher priority + interrupt. The epilogue will restore the previous values of EPC and Status. + +- The prologue and epilogue are modified to save and restore all non-kernel + registers as necessary. + +- The FPU is disabled in the prologue, as the floating pointer registers are not + spilled to the stack. + +- The function return sequence is changed to use an exception return instruction. + +- The parameter sets the interrupt mask for the function corresponding to the + interrupt level specified. If no mask is specified the interrupt mask + defaults to "eic". + + +kernel +------ +.. csv-table:: Supported Syntaxes + :header: "GNU", "C++11", "C2x", "__declspec", "Keyword", "Pragma", "Pragma clang attribute" + + "X","","","","", "", "X" + +``__attribute__((kernel))`` is used to mark a ``kernel`` function in +RenderScript. + +In RenderScript, ``kernel`` functions are used to express data-parallel +computations. The RenderScript runtime efficiently parallelizes ``kernel`` +functions to run on computational resources such as multi-core CPUs and GPUs. +See the RenderScript_ documentation for more information. + +.. _RenderScript: https://developer.android.com/guide/topics/renderscript/compute.html *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@freebsd.org Sat Jan 6 21:35:54 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 8F0AFDF3473; Sat, 6 Jan 2018 21:35:54 +0000 (UTC) (envelope-from dim@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 6B57680F1B; Sat, 6 Jan 2018 21:35:54 +0000 (UTC) (envelope-from dim@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 9ACB317F26; Sat, 6 Jan 2018 21:35:53 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w06LZr06067311; Sat, 6 Jan 2018 21:35:53 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w06LZrdr067310; Sat, 6 Jan 2018 21:35:53 GMT (envelope-from dim@FreeBSD.org) Message-Id: <201801062135.w06LZrdr067310@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Sat, 6 Jan 2018 21:35:53 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r327642 - vendor/clang/clang-release_60-r321788 X-SVN-Group: vendor X-SVN-Commit-Author: dim X-SVN-Commit-Paths: vendor/clang/clang-release_60-r321788 X-SVN-Commit-Revision: 327642 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 06 Jan 2018 21:35:54 -0000 Author: dim Date: Sat Jan 6 21:35:53 2018 New Revision: 327642 URL: https://svnweb.freebsd.org/changeset/base/327642 Log: Tag clang release_60 branch r321788. Added: vendor/clang/clang-release_60-r321788/ - copied from r327641, vendor/clang/dist-release_60/ From owner-svn-src-all@freebsd.org Sat Jan 6 21:36:11 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id BAB49DF34F2; Sat, 6 Jan 2018 21:36:11 +0000 (UTC) (envelope-from dim@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 685CE810D3; Sat, 6 Jan 2018 21:36:09 +0000 (UTC) (envelope-from dim@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 06CD017F27; Sat, 6 Jan 2018 21:36:09 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w06La8hB067372; Sat, 6 Jan 2018 21:36:08 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w06La8tg067367; Sat, 6 Jan 2018 21:36:08 GMT (envelope-from dim@FreeBSD.org) Message-Id: <201801062136.w06La8tg067367@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Sat, 6 Jan 2018 21:36:08 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r327643 - in vendor/compiler-rt/dist-release_60: lib/asan/scripts lib/profile test/profile test/profile/Inputs test/scudo X-SVN-Group: vendor X-SVN-Commit-Author: dim X-SVN-Commit-Paths: in vendor/compiler-rt/dist-release_60: lib/asan/scripts lib/profile test/profile test/profile/Inputs test/scudo X-SVN-Commit-Revision: 327643 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 06 Jan 2018 21:36:12 -0000 Author: dim Date: Sat Jan 6 21:36:08 2018 New Revision: 327643 URL: https://svnweb.freebsd.org/changeset/base/327643 Log: Vendor import of compiler-rt release_60 branch r321788: https://llvm.org/svn/llvm-project/compiler-rt/branches/release_60@321788 Added: vendor/compiler-rt/dist-release_60/test/profile/Inputs/instrprof-dlopen-dlclose-main.c (contents, props changed) vendor/compiler-rt/dist-release_60/test/profile/instrprof-dlopen-dlclose-gcov.test Modified: vendor/compiler-rt/dist-release_60/lib/asan/scripts/asan_device_setup vendor/compiler-rt/dist-release_60/lib/profile/GCDAProfiling.c vendor/compiler-rt/dist-release_60/test/scudo/interface.cpp Modified: vendor/compiler-rt/dist-release_60/lib/asan/scripts/asan_device_setup ============================================================================== --- vendor/compiler-rt/dist-release_60/lib/asan/scripts/asan_device_setup Sat Jan 6 21:35:53 2018 (r327642) +++ vendor/compiler-rt/dist-release_60/lib/asan/scripts/asan_device_setup Sat Jan 6 21:36:08 2018 (r327643) @@ -336,6 +336,13 @@ exec $_to \$@ EOF } +# On Android-L not allowing user segv handler breaks some applications. +# Since ~May 2017 this is the default setting; included for compatibility with +# older library versions. +if [[ PRE_L -eq 0 ]]; then + ASAN_OPTIONS="$ASAN_OPTIONS,allow_user_segv_handler=1" +fi + if [[ x$extra_options != x ]] ; then ASAN_OPTIONS="$ASAN_OPTIONS,$extra_options" fi Modified: vendor/compiler-rt/dist-release_60/lib/profile/GCDAProfiling.c ============================================================================== --- vendor/compiler-rt/dist-release_60/lib/profile/GCDAProfiling.c Sat Jan 6 21:35:53 2018 (r327642) +++ vendor/compiler-rt/dist-release_60/lib/profile/GCDAProfiling.c Sat Jan 6 21:36:08 2018 (r327643) @@ -228,6 +228,7 @@ static void unmap_file() { * profiling enabled will emit to a different file. Only one file may be * started at a time. */ +COMPILER_RT_VISIBILITY void llvm_gcda_start_file(const char *orig_filename, const char version[4], uint32_t checksum) { const char *mode = "r+b"; @@ -295,6 +296,7 @@ void llvm_gcda_start_file(const char *orig_filename, c /* Given an array of pointers to counters (counters), increment the n-th one, * where we're also given a pointer to n (predecessor). */ +COMPILER_RT_VISIBILITY void llvm_gcda_increment_indirect_counter(uint32_t *predecessor, uint64_t **counters) { uint64_t *counter; @@ -317,6 +319,7 @@ void llvm_gcda_increment_indirect_counter(uint32_t *pr #endif } +COMPILER_RT_VISIBILITY void llvm_gcda_emit_function(uint32_t ident, const char *function_name, uint32_t func_checksum, uint8_t use_extra_checksum, uint32_t cfg_checksum) { @@ -343,6 +346,7 @@ void llvm_gcda_emit_function(uint32_t ident, const cha write_string(function_name); } +COMPILER_RT_VISIBILITY void llvm_gcda_emit_arcs(uint32_t num_counters, uint64_t *counters) { uint32_t i; uint64_t *old_ctrs = NULL; @@ -394,6 +398,7 @@ void llvm_gcda_emit_arcs(uint32_t num_counters, uint64 #endif } +COMPILER_RT_VISIBILITY void llvm_gcda_summary_info() { const uint32_t obj_summary_len = 9; /* Length for gcov compatibility. */ uint32_t i; @@ -447,6 +452,7 @@ void llvm_gcda_summary_info() { #endif } +COMPILER_RT_VISIBILITY void llvm_gcda_end_file() { /* Write out EOF record. */ if (output_file) { @@ -459,6 +465,7 @@ void llvm_gcda_end_file() { unmap_file(); } + fflush(output_file); lprofUnlockFd(fd); fclose(output_file); output_file = NULL; @@ -471,6 +478,7 @@ void llvm_gcda_end_file() { #endif } +COMPILER_RT_VISIBILITY void llvm_register_writeout_function(writeout_fn fn) { struct writeout_fn_node *new_node = malloc(sizeof(struct writeout_fn_node)); new_node->fn = fn; @@ -484,6 +492,7 @@ void llvm_register_writeout_function(writeout_fn fn) { } } +COMPILER_RT_VISIBILITY void llvm_writeout_files(void) { struct writeout_fn_node *curr = writeout_fn_head; @@ -493,6 +502,7 @@ void llvm_writeout_files(void) { } } +COMPILER_RT_VISIBILITY void llvm_delete_writeout_function_list(void) { while (writeout_fn_head) { struct writeout_fn_node *node = writeout_fn_head; @@ -503,6 +513,7 @@ void llvm_delete_writeout_function_list(void) { writeout_fn_head = writeout_fn_tail = NULL; } +COMPILER_RT_VISIBILITY void llvm_register_flush_function(flush_fn fn) { struct flush_fn_node *new_node = malloc(sizeof(struct flush_fn_node)); new_node->fn = fn; @@ -516,6 +527,7 @@ void llvm_register_flush_function(flush_fn fn) { } } +COMPILER_RT_VISIBILITY void __gcov_flush() { struct flush_fn_node *curr = flush_fn_head; @@ -525,6 +537,7 @@ void __gcov_flush() { } } +COMPILER_RT_VISIBILITY void llvm_delete_flush_function_list(void) { while (flush_fn_head) { struct flush_fn_node *node = flush_fn_head; @@ -535,6 +548,7 @@ void llvm_delete_flush_function_list(void) { flush_fn_head = flush_fn_tail = NULL; } +COMPILER_RT_VISIBILITY void llvm_gcov_init(writeout_fn wfn, flush_fn ffn) { static int atexit_ran = 0; Added: vendor/compiler-rt/dist-release_60/test/profile/Inputs/instrprof-dlopen-dlclose-main.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ vendor/compiler-rt/dist-release_60/test/profile/Inputs/instrprof-dlopen-dlclose-main.c Sat Jan 6 21:36:08 2018 (r327643) @@ -0,0 +1,26 @@ +#include +#include +#include + +int main(int argc, char *argv[]) { + dlerror(); + void *f1_handle = dlopen("func.shared", RTLD_LAZY | RTLD_GLOBAL); + if (f1_handle == NULL) { + fprintf(stderr, "unable to open 'func.shared': %s\n", dlerror()); + return EXIT_FAILURE; + } + + void *f2_handle = dlopen("func2.shared", RTLD_LAZY | RTLD_GLOBAL); + if (f2_handle == NULL) { + fprintf(stderr, "unable to open 'func2.shared': %s\n", dlerror()); + return EXIT_FAILURE; + } + + if (dlclose(f2_handle) != 0) { + fprintf(stderr, "unable to close 'func2.shared': %s\n", dlerror()); + return EXIT_FAILURE; + } + + return EXIT_SUCCESS; +} + Added: vendor/compiler-rt/dist-release_60/test/profile/instrprof-dlopen-dlclose-gcov.test ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ vendor/compiler-rt/dist-release_60/test/profile/instrprof-dlopen-dlclose-gcov.test Sat Jan 6 21:36:08 2018 (r327643) @@ -0,0 +1,6 @@ +RUN: mkdir -p %t.d +RUN: %clang --coverage -o %t.d/func.shared -fPIC -shared %S/Inputs/instrprof-dlopen-func.c +RUN: %clang --coverage -o %t.d/func2.shared -fPIC -shared %S/Inputs/instrprof-dlopen-func2.c +RUN: %clang --coverage -o %t -fPIC -rpath %t.d %S/Inputs/instrprof-dlopen-dlclose-main.c + +RUN: %run %t Modified: vendor/compiler-rt/dist-release_60/test/scudo/interface.cpp ============================================================================== --- vendor/compiler-rt/dist-release_60/test/scudo/interface.cpp Sat Jan 6 21:35:53 2018 (r327642) +++ vendor/compiler-rt/dist-release_60/test/scudo/interface.cpp Sat Jan 6 21:36:08 2018 (r327643) @@ -4,7 +4,6 @@ // RUN: %run %t heap-size 2>&1 // RUN: %env_scudo_opts="allocator_may_return_null=1" %run %t soft-limit 2>&1 // RUN: %env_scudo_opts="allocator_may_return_null=1" not %run %t hard-limit 2>&1 -// UNSUPPORTED: armhf-linux // Tests that the sanitizer interface functions behave appropriately. @@ -51,8 +50,11 @@ int main(int argc, char **argv) // Verifies that setting the soft RSS limit at runtime works as expected. std::vector pointers; size_t size = 1 << 19; // 512Kb - for (int i = 0; i < 5; i++) - pointers.push_back(malloc(size)); + for (int i = 0; i < 5; i++) { + void *p = malloc(size); + memset(p, 0, size); + pointers.push_back(p); + } // Set the soft RSS limit to 1Mb. __scudo_set_rss_limit(1, 0); usleep(20000); @@ -74,8 +76,11 @@ int main(int argc, char **argv) // Verifies that setting the hard RSS limit at runtime works as expected. std::vector pointers; size_t size = 1 << 19; // 512Kb - for (int i = 0; i < 5; i++) - pointers.push_back(malloc(size)); + for (int i = 0; i < 5; i++) { + void *p = malloc(size); + memset(p, 0, size); + pointers.push_back(p); + } // Set the hard RSS limit to 1Mb __scudo_set_rss_limit(1, 1); usleep(20000); From owner-svn-src-all@freebsd.org Sat Jan 6 21:36:13 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 0E61CDF3504; Sat, 6 Jan 2018 21:36:13 +0000 (UTC) (envelope-from dim@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 DC115810F9; Sat, 6 Jan 2018 21:36:12 +0000 (UTC) (envelope-from dim@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 0F5C617F28; Sat, 6 Jan 2018 21:36:12 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w06LaBbN067420; Sat, 6 Jan 2018 21:36:11 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w06LaBBI067419; Sat, 6 Jan 2018 21:36:11 GMT (envelope-from dim@FreeBSD.org) Message-Id: <201801062136.w06LaBBI067419@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Sat, 6 Jan 2018 21:36:11 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r327644 - vendor/compiler-rt/compiler-rt-release_60-r321788 X-SVN-Group: vendor X-SVN-Commit-Author: dim X-SVN-Commit-Paths: vendor/compiler-rt/compiler-rt-release_60-r321788 X-SVN-Commit-Revision: 327644 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 06 Jan 2018 21:36:13 -0000 Author: dim Date: Sat Jan 6 21:36:11 2018 New Revision: 327644 URL: https://svnweb.freebsd.org/changeset/base/327644 Log: Tag compiler-rt release_60 branch r321788. Added: vendor/compiler-rt/compiler-rt-release_60-r321788/ - copied from r327643, vendor/compiler-rt/dist-release_60/ From owner-svn-src-all@freebsd.org Sat Jan 6 21:36:39 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id DD562DF3622; Sat, 6 Jan 2018 21:36:39 +0000 (UTC) (envelope-from dim@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 B74E3813B5; Sat, 6 Jan 2018 21:36:39 +0000 (UTC) (envelope-from dim@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 CF4D317F2A; Sat, 6 Jan 2018 21:36:38 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w06LaciJ067536; Sat, 6 Jan 2018 21:36:38 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w06LacaA067535; Sat, 6 Jan 2018 21:36:38 GMT (envelope-from dim@FreeBSD.org) Message-Id: <201801062136.w06LacaA067535@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Sat, 6 Jan 2018 21:36:38 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r327646 - vendor/libc++/libc++-release_60-r321788 X-SVN-Group: vendor X-SVN-Commit-Author: dim X-SVN-Commit-Paths: vendor/libc++/libc++-release_60-r321788 X-SVN-Commit-Revision: 327646 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 06 Jan 2018 21:36:40 -0000 Author: dim Date: Sat Jan 6 21:36:38 2018 New Revision: 327646 URL: https://svnweb.freebsd.org/changeset/base/327646 Log: Tag libc++ release_60 branch r321788. Added: vendor/libc++/libc++-release_60-r321788/ - copied from r327645, vendor/libc++/dist-release_60/ From owner-svn-src-all@freebsd.org Sat Jan 6 21:36:37 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 2620EDF360F; Sat, 6 Jan 2018 21:36:37 +0000 (UTC) (envelope-from dim@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 C41C7813AD; Sat, 6 Jan 2018 21:36:36 +0000 (UTC) (envelope-from dim@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 F384B17F29; Sat, 6 Jan 2018 21:36:35 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w06LaZN1067490; Sat, 6 Jan 2018 21:36:35 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w06LaYKc067475; Sat, 6 Jan 2018 21:36:34 GMT (envelope-from dim@FreeBSD.org) Message-Id: <201801062136.w06LaYKc067475@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Sat, 6 Jan 2018 21:36:34 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r327645 - in vendor/libc++/dist-release_60: . include test/std/containers/sequences/list/list.ops test/std/utilities/meta/meta.unary/meta.unary.prop www X-SVN-Group: vendor X-SVN-Commit-Author: dim X-SVN-Commit-Paths: in vendor/libc++/dist-release_60: . include test/std/containers/sequences/list/list.ops test/std/utilities/meta/meta.unary/meta.unary.prop www X-SVN-Commit-Revision: 327645 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 06 Jan 2018 21:36:37 -0000 Author: dim Date: Sat Jan 6 21:36:34 2018 New Revision: 327645 URL: https://svnweb.freebsd.org/changeset/base/327645 Log: Vendor import of libc++ release_60 branch r321788: https://llvm.org/svn/llvm-project/libcxx/branches/release_60@321788 Added: vendor/libc++/dist-release_60/test/std/utilities/meta/meta.unary/meta.unary.prop/has_unique_object_representations.pass.cpp (contents, props changed) Modified: vendor/libc++/dist-release_60/CMakeLists.txt vendor/libc++/dist-release_60/CREDITS.TXT vendor/libc++/dist-release_60/include/__config vendor/libc++/dist-release_60/include/__functional_base vendor/libc++/dist-release_60/include/__mutex_base vendor/libc++/dist-release_60/include/chrono vendor/libc++/dist-release_60/include/functional vendor/libc++/dist-release_60/include/memory vendor/libc++/dist-release_60/include/mutex vendor/libc++/dist-release_60/include/optional vendor/libc++/dist-release_60/include/ratio vendor/libc++/dist-release_60/include/system_error vendor/libc++/dist-release_60/include/tuple vendor/libc++/dist-release_60/include/type_traits vendor/libc++/dist-release_60/include/utility vendor/libc++/dist-release_60/include/variant vendor/libc++/dist-release_60/test/std/containers/sequences/list/list.ops/sort_comp.pass.cpp vendor/libc++/dist-release_60/www/cxx1z_status.html Modified: vendor/libc++/dist-release_60/CMakeLists.txt ============================================================================== --- vendor/libc++/dist-release_60/CMakeLists.txt Sat Jan 6 21:36:11 2018 (r327644) +++ vendor/libc++/dist-release_60/CMakeLists.txt Sat Jan 6 21:36:34 2018 (r327645) @@ -23,7 +23,7 @@ if (CMAKE_SOURCE_DIR STREQUAL CMAKE_CURRENT_SOURCE_DIR project(libcxx CXX C) set(PACKAGE_NAME libcxx) - set(PACKAGE_VERSION 6.0.0svn) + set(PACKAGE_VERSION 6.0.0) set(PACKAGE_STRING "${PACKAGE_NAME} ${PACKAGE_VERSION}") set(PACKAGE_BUGREPORT "llvm-bugs@lists.llvm.org") Modified: vendor/libc++/dist-release_60/CREDITS.TXT ============================================================================== --- vendor/libc++/dist-release_60/CREDITS.TXT Sat Jan 6 21:36:11 2018 (r327644) +++ vendor/libc++/dist-release_60/CREDITS.TXT Sat Jan 6 21:36:34 2018 (r327645) @@ -101,7 +101,7 @@ E: nico.rieck@gmail.com D: Windows fixes N: Jon Roelofs -E: jonathan@codesourcery.com +E: jroelofS@jroelofs.com D: Remote testing, Newlib port, baremetal/single-threaded support. N: Jonathan Sauer Modified: vendor/libc++/dist-release_60/include/__config ============================================================================== --- vendor/libc++/dist-release_60/include/__config Sat Jan 6 21:36:11 2018 (r327644) +++ vendor/libc++/dist-release_60/include/__config Sat Jan 6 21:36:34 2018 (r327645) @@ -461,9 +461,13 @@ namespace std { #endif #if __has_builtin(__builtin_launder) -#define _LIBCPP_COMPILER_HAS_BUILTIN_LAUNDER +#define _LIBCPP_COMPILER_HAS_BUILTIN_LAUNDER #endif +#if !__is_identifier(__has_unique_object_representations) +#define _LIBCPP_HAS_UNIQUE_OBJECT_REPRESENTATIONS +#endif + #elif defined(_LIBCPP_COMPILER_GCC) #define _ALIGNAS(x) __attribute__((__aligned__(x))) @@ -547,9 +551,13 @@ namespace std { #endif #if _GNUC_VER >= 700 -#define _LIBCPP_COMPILER_HAS_BUILTIN_LAUNDER +#define _LIBCPP_COMPILER_HAS_BUILTIN_LAUNDER #endif +#if _GNUC_VER >= 700 +#define _LIBCPP_HAS_UNIQUE_OBJECT_REPRESENTATIONS +#endif + #elif defined(_LIBCPP_COMPILER_MSVC) #define _LIBCPP_TOSTRING2(x) #x @@ -980,9 +988,10 @@ template struct __static_assert_check {}; #define _LIBCPP_NODISCARD_AFTER_CXX17 #endif -// FIXME: Remove all usages of this macro once compilers catch up. -#if !defined(__cpp_inline_variables) || (__cpp_inline_variables < 201606L) -# define _LIBCPP_HAS_NO_INLINE_VARIABLES +#if _LIBCPP_STD_VER > 14 && defined(__cpp_inline_variables) && (__cpp_inline_variables >= 201606L) +# define _LIBCPP_INLINE_VAR inline +#else +# define _LIBCPP_INLINE_VAR #endif #ifdef _LIBCPP_HAS_NO_RVALUE_REFERENCES Modified: vendor/libc++/dist-release_60/include/__functional_base ============================================================================== --- vendor/libc++/dist-release_60/include/__functional_base Sat Jan 6 21:36:11 2018 (r327644) +++ vendor/libc++/dist-release_60/include/__functional_base Sat Jan 6 21:36:34 2018 (r327645) @@ -564,7 +564,7 @@ struct _LIBCPP_TEMPLATE_VIS allocator_arg_t { }; #if defined(_LIBCPP_CXX03_LANG) || defined(_LIBCPP_BUILDING_MEMORY) extern const allocator_arg_t allocator_arg; #else -constexpr allocator_arg_t allocator_arg = allocator_arg_t(); +/* _LIBCPP_INLINE_VAR */ constexpr allocator_arg_t allocator_arg = allocator_arg_t(); #endif // uses_allocator @@ -601,7 +601,7 @@ struct _LIBCPP_TEMPLATE_VIS uses_allocator #if _LIBCPP_STD_VER > 14 template -constexpr size_t uses_allocator_v = uses_allocator<_Tp, _Alloc>::value; +_LIBCPP_INLINE_VAR constexpr size_t uses_allocator_v = uses_allocator<_Tp, _Alloc>::value; #endif #ifndef _LIBCPP_CXX03_LANG Modified: vendor/libc++/dist-release_60/include/__mutex_base ============================================================================== --- vendor/libc++/dist-release_60/include/__mutex_base Sat Jan 6 21:36:11 2018 (r327644) +++ vendor/libc++/dist-release_60/include/__mutex_base Sat Jan 6 21:36:34 2018 (r327645) @@ -82,9 +82,9 @@ extern const adopt_lock_t adopt_lock; #else -constexpr defer_lock_t defer_lock = defer_lock_t(); -constexpr try_to_lock_t try_to_lock = try_to_lock_t(); -constexpr adopt_lock_t adopt_lock = adopt_lock_t(); +/* _LIBCPP_INLINE_VAR */ constexpr defer_lock_t defer_lock = defer_lock_t(); +/* _LIBCPP_INLINE_VAR */ constexpr try_to_lock_t try_to_lock = try_to_lock_t(); +/* _LIBCPP_INLINE_VAR */ constexpr adopt_lock_t adopt_lock = adopt_lock_t(); #endif Modified: vendor/libc++/dist-release_60/include/chrono ============================================================================== --- vendor/libc++/dist-release_60/include/chrono Sat Jan 6 21:36:11 2018 (r327644) +++ vendor/libc++/dist-release_60/include/chrono Sat Jan 6 21:36:34 2018 (r327645) @@ -26,7 +26,7 @@ duration_cast(const duration& fd); template struct treat_as_floating_point : is_floating_point {}; -template constexpr bool treat_as_floating_point_v +template inline constexpr bool treat_as_floating_point_v = treat_as_floating_point::value; // C++17 template @@ -419,7 +419,8 @@ template struct _LIBCPP_TEMPLATE_VIS treat_as_floating_point : is_floating_point<_Rep> {}; #if _LIBCPP_STD_VER > 14 && !defined(_LIBCPP_HAS_NO_VARIABLE_TEMPLATES) -template _LIBCPP_CONSTEXPR bool treat_as_floating_point_v +template +_LIBCPP_INLINE_VAR _LIBCPP_CONSTEXPR bool treat_as_floating_point_v = treat_as_floating_point<_Rep>::value; #endif Modified: vendor/libc++/dist-release_60/include/functional ============================================================================== --- vendor/libc++/dist-release_60/include/functional Sat Jan 6 21:36:11 2018 (r327644) +++ vendor/libc++/dist-release_60/include/functional Sat Jan 6 21:36:34 2018 (r327645) @@ -213,9 +213,9 @@ template struct is_bind_expression; template struct is_placeholder; // See C++14 20.9.9, Function object binders -template constexpr bool is_bind_expression_v +template inline constexpr bool is_bind_expression_v = is_bind_expression::value; // C++17 -template constexpr int is_placeholder_v +template inline constexpr int is_placeholder_v = is_placeholder::value; // C++17 @@ -1991,7 +1991,7 @@ template struct _LIBCPP_TEMPLATE_VIS is_bin #if _LIBCPP_STD_VER > 14 template -constexpr size_t is_bind_expression_v = is_bind_expression<_Tp>::value; +_LIBCPP_INLINE_VAR constexpr size_t is_bind_expression_v = is_bind_expression<_Tp>::value; #endif template struct __is_placeholder : public integral_constant {}; @@ -2000,7 +2000,7 @@ template struct _LIBCPP_TEMPLATE_VIS is_pla #if _LIBCPP_STD_VER > 14 template -constexpr size_t is_placeholder_v = is_placeholder<_Tp>::value; +_LIBCPP_INLINE_VAR constexpr size_t is_placeholder_v = is_placeholder<_Tp>::value; #endif namespace placeholders @@ -2020,16 +2020,16 @@ _LIBCPP_FUNC_VIS extern const __ph<8> _8; _LIBCPP_FUNC_VIS extern const __ph<9> _9; _LIBCPP_FUNC_VIS extern const __ph<10> _10; #else -constexpr __ph<1> _1{}; -constexpr __ph<2> _2{}; -constexpr __ph<3> _3{}; -constexpr __ph<4> _4{}; -constexpr __ph<5> _5{}; -constexpr __ph<6> _6{}; -constexpr __ph<7> _7{}; -constexpr __ph<8> _8{}; -constexpr __ph<9> _9{}; -constexpr __ph<10> _10{}; +/* _LIBCPP_INLINE_VAR */ constexpr __ph<1> _1{}; +/* _LIBCPP_INLINE_VAR */ constexpr __ph<2> _2{}; +/* _LIBCPP_INLINE_VAR */ constexpr __ph<3> _3{}; +/* _LIBCPP_INLINE_VAR */ constexpr __ph<4> _4{}; +/* _LIBCPP_INLINE_VAR */ constexpr __ph<5> _5{}; +/* _LIBCPP_INLINE_VAR */ constexpr __ph<6> _6{}; +/* _LIBCPP_INLINE_VAR */ constexpr __ph<7> _7{}; +/* _LIBCPP_INLINE_VAR */ constexpr __ph<8> _8{}; +/* _LIBCPP_INLINE_VAR */ constexpr __ph<9> _9{}; +/* _LIBCPP_INLINE_VAR */ constexpr __ph<10> _10{}; #endif // defined(_LIBCPP_CXX03_LANG) || defined(_LIBCPP_BUILDING_BIND) } // placeholders Modified: vendor/libc++/dist-release_60/include/memory ============================================================================== --- vendor/libc++/dist-release_60/include/memory Sat Jan 6 21:36:11 2018 (r327644) +++ vendor/libc++/dist-release_60/include/memory Sat Jan 6 21:36:34 2018 (r327645) @@ -18,7 +18,7 @@ namespace std { struct allocator_arg_t { }; -constexpr allocator_arg_t allocator_arg = allocator_arg_t(); +inline constexpr allocator_arg_t allocator_arg = allocator_arg_t(); template struct uses_allocator; @@ -630,6 +630,9 @@ template template struct hash; template struct hash >; template struct hash >; + +template + inline constexpr bool uses_allocator_v = uses_allocator::value; // Pointer safety enum class pointer_safety { relaxed, preferred, strict }; Modified: vendor/libc++/dist-release_60/include/mutex ============================================================================== --- vendor/libc++/dist-release_60/include/mutex Sat Jan 6 21:36:11 2018 (r327644) +++ vendor/libc++/dist-release_60/include/mutex Sat Jan 6 21:36:34 2018 (r327645) @@ -91,9 +91,9 @@ struct defer_lock_t {}; struct try_to_lock_t {}; struct adopt_lock_t {}; -constexpr defer_lock_t defer_lock{}; -constexpr try_to_lock_t try_to_lock{}; -constexpr adopt_lock_t adopt_lock{}; +inline constexpr defer_lock_t defer_lock{}; +inline constexpr try_to_lock_t try_to_lock{}; +inline constexpr adopt_lock_t adopt_lock{}; template class lock_guard Modified: vendor/libc++/dist-release_60/include/optional ============================================================================== --- vendor/libc++/dist-release_60/include/optional Sat Jan 6 21:36:11 2018 (r327644) +++ vendor/libc++/dist-release_60/include/optional Sat Jan 6 21:36:34 2018 (r327645) @@ -22,7 +22,7 @@ namespace std { // 23.6.4, no-value state indicator struct nullopt_t{see below }; - constexpr nullopt_t nullopt(unspecified ); + inline constexpr nullopt_t nullopt(unspecified ); // 23.6.5, class bad_optional_access class bad_optional_access; @@ -195,7 +195,7 @@ struct nullopt_t _LIBCPP_INLINE_VISIBILITY constexpr explicit nullopt_t(__secret_tag, __secret_tag) noexcept {} }; -/* inline */ constexpr nullopt_t nullopt{nullopt_t::__secret_tag{}, nullopt_t::__secret_tag{}}; +_LIBCPP_INLINE_VAR constexpr nullopt_t nullopt{nullopt_t::__secret_tag{}, nullopt_t::__secret_tag{}}; template ::value> struct __optional_destruct_base; Modified: vendor/libc++/dist-release_60/include/ratio ============================================================================== --- vendor/libc++/dist-release_60/include/ratio Sat Jan 6 21:36:11 2018 (r327644) +++ vendor/libc++/dist-release_60/include/ratio Sat Jan 6 21:36:34 2018 (r327645) @@ -63,17 +63,17 @@ typedef ratio< 1000000000000000000000, 1> zetta; // typedef ratio<1000000000000000000000000, 1> yotta; // not supported // 20.11.5, ratio comparison - template constexpr bool ratio_equal_v + template inline constexpr bool ratio_equal_v = ratio_equal::value; // C++17 - template constexpr bool ratio_not_equal_v + template inline constexpr bool ratio_not_equal_v = ratio_not_equal::value; // C++17 - template constexpr bool ratio_less_v + template inline constexpr bool ratio_less_v = ratio_less::value; // C++17 - template constexpr bool ratio_less_equal_v + template inline constexpr bool ratio_less_equal_v = ratio_less_equal::value; // C++17 - template constexpr bool ratio_greater_v + template inline constexpr bool ratio_greater_v = ratio_greater::value; // C++17 - template constexpr bool ratio_greater_equal_v + template inline constexpr bool ratio_greater_equal_v = ratio_greater_equal::value; // C++17 } */ @@ -501,22 +501,28 @@ struct __ratio_gcd }; #if _LIBCPP_STD_VER > 14 && !defined(_LIBCPP_HAS_NO_VARIABLE_TEMPLATES) -template _LIBCPP_CONSTEXPR bool ratio_equal_v +template +_LIBCPP_INLINE_VAR _LIBCPP_CONSTEXPR bool ratio_equal_v = ratio_equal<_R1, _R2>::value; -template _LIBCPP_CONSTEXPR bool ratio_not_equal_v +template +_LIBCPP_INLINE_VAR _LIBCPP_CONSTEXPR bool ratio_not_equal_v = ratio_not_equal<_R1, _R2>::value; -template _LIBCPP_CONSTEXPR bool ratio_less_v +template +_LIBCPP_INLINE_VAR _LIBCPP_CONSTEXPR bool ratio_less_v = ratio_less<_R1, _R2>::value; -template _LIBCPP_CONSTEXPR bool ratio_less_equal_v +template +_LIBCPP_INLINE_VAR _LIBCPP_CONSTEXPR bool ratio_less_equal_v = ratio_less_equal<_R1, _R2>::value; -template _LIBCPP_CONSTEXPR bool ratio_greater_v +template +_LIBCPP_INLINE_VAR _LIBCPP_CONSTEXPR bool ratio_greater_v = ratio_greater<_R1, _R2>::value; -template _LIBCPP_CONSTEXPR bool ratio_greater_equal_v +template +_LIBCPP_INLINE_VAR _LIBCPP_CONSTEXPR bool ratio_greater_equal_v = ratio_greater_equal<_R1, _R2>::value; #endif Modified: vendor/libc++/dist-release_60/include/system_error ============================================================================== --- vendor/libc++/dist-release_60/include/system_error Sat Jan 6 21:36:11 2018 (r327644) +++ vendor/libc++/dist-release_60/include/system_error Sat Jan 6 21:36:34 2018 (r327645) @@ -47,10 +47,10 @@ template struct is_error_condition_enum : public false_type {}; template -constexpr size_t is_error_condition_enum_v = is_error_condition_enum<_Tp>::value; // C++17 +inline constexpr size_t is_error_condition_enum_v = is_error_condition_enum<_Tp>::value; // C++17 template -constexpr size_t is_error_code_enum_v = is_error_code_enum<_Tp>::value; // C++17 +inline constexpr size_t is_error_code_enum_v = is_error_code_enum<_Tp>::value; // C++17 class error_code { @@ -246,7 +246,7 @@ struct _LIBCPP_TEMPLATE_VIS is_error_code_enum #if _LIBCPP_STD_VER > 14 template -constexpr size_t is_error_code_enum_v = is_error_code_enum<_Tp>::value; +_LIBCPP_INLINE_VAR constexpr size_t is_error_code_enum_v = is_error_code_enum<_Tp>::value; #endif // is_error_condition_enum @@ -257,7 +257,7 @@ struct _LIBCPP_TEMPLATE_VIS is_error_condition_enum #if _LIBCPP_STD_VER > 14 template -constexpr size_t is_error_condition_enum_v = is_error_condition_enum<_Tp>::value; +_LIBCPP_INLINE_VAR constexpr size_t is_error_condition_enum_v = is_error_condition_enum<_Tp>::value; #endif // Some error codes are not present on all platforms, so we provide equivalents Modified: vendor/libc++/dist-release_60/include/tuple ============================================================================== --- vendor/libc++/dist-release_60/include/tuple Sat Jan 6 21:36:11 2018 (r327644) +++ vendor/libc++/dist-release_60/include/tuple Sat Jan 6 21:36:34 2018 (r327645) @@ -70,7 +70,7 @@ class tuple { (public) void swap(tuple&) noexcept(AND(swap(declval(), declval())...)); }; -const unspecified ignore; +inline constexpr unspecified ignore; template tuple make_tuple(T&&...); // constexpr in C++14 template tuple forward_as_tuple(T&&...) noexcept; // constexpr in C++14 @@ -87,7 +87,7 @@ template template class tuple_size; // undefined template class tuple_size>; template - constexpr size_t tuple_size_v = tuple_size::value; // C++17 + inline constexpr size_t tuple_size_v = tuple_size::value; // C++17 template class tuple_element; // undefined template class tuple_element>; template @@ -1079,7 +1079,7 @@ struct __ignore_t }; namespace { - constexpr __ignore_t ignore = __ignore_t(); + _LIBCPP_INLINE_VAR constexpr __ignore_t ignore = __ignore_t(); } template @@ -1368,7 +1368,7 @@ pair<_T1, _T2>::pair(piecewise_construct_t, #if _LIBCPP_STD_VER > 14 template -constexpr size_t tuple_size_v = tuple_size<_Tp>::value; +_LIBCPP_INLINE_VAR constexpr size_t tuple_size_v = tuple_size<_Tp>::value; #define _LIBCPP_NOEXCEPT_RETURN(...) noexcept(noexcept(__VA_ARGS__)) { return __VA_ARGS__; } Modified: vendor/libc++/dist-release_60/include/type_traits ============================================================================== --- vendor/libc++/dist-release_60/include/type_traits Sat Jan 6 21:36:11 2018 (r327644) +++ vendor/libc++/dist-release_60/include/type_traits Sat Jan 6 21:36:34 2018 (r327645) @@ -132,6 +132,8 @@ namespace std template struct has_virtual_destructor; + template struct has_unique_object_representations; // C++17 + // Relationships between types: template struct is_same; template struct is_base_of; @@ -223,173 +225,175 @@ namespace std using void_t = void; // C++17 // See C++14 20.10.4.1, primary type categories - template constexpr bool is_void_v + template inline constexpr bool is_void_v = is_void::value; // C++17 - template constexpr bool is_null_pointer_v + template inline constexpr bool is_null_pointer_v = is_null_pointer::value; // C++17 - template constexpr bool is_integral_v + template inline constexpr bool is_integral_v = is_integral::value; // C++17 - template constexpr bool is_floating_point_v + template inline constexpr bool is_floating_point_v = is_floating_point::value; // C++17 - template constexpr bool is_array_v + template inline constexpr bool is_array_v = is_array::value; // C++17 - template constexpr bool is_pointer_v + template inline constexpr bool is_pointer_v = is_pointer::value; // C++17 - template constexpr bool is_lvalue_reference_v + template inline constexpr bool is_lvalue_reference_v = is_lvalue_reference::value; // C++17 - template constexpr bool is_rvalue_reference_v + template inline constexpr bool is_rvalue_reference_v = is_rvalue_reference::value; // C++17 - template constexpr bool is_member_object_pointer_v + template inline constexpr bool is_member_object_pointer_v = is_member_object_pointer::value; // C++17 - template constexpr bool is_member_function_pointer_v + template inline constexpr bool is_member_function_pointer_v = is_member_function_pointer::value; // C++17 - template constexpr bool is_enum_v + template inline constexpr bool is_enum_v = is_enum::value; // C++17 - template constexpr bool is_union_v + template inline constexpr bool is_union_v = is_union::value; // C++17 - template constexpr bool is_class_v + template inline constexpr bool is_class_v = is_class::value; // C++17 - template constexpr bool is_function_v + template inline constexpr bool is_function_v = is_function::value; // C++17 // See C++14 20.10.4.2, composite type categories - template constexpr bool is_reference_v + template inline constexpr bool is_reference_v = is_reference::value; // C++17 - template constexpr bool is_arithmetic_v + template inline constexpr bool is_arithmetic_v = is_arithmetic::value; // C++17 - template constexpr bool is_fundamental_v + template inline constexpr bool is_fundamental_v = is_fundamental::value; // C++17 - template constexpr bool is_object_v + template inline constexpr bool is_object_v = is_object::value; // C++17 - template constexpr bool is_scalar_v + template inline constexpr bool is_scalar_v = is_scalar::value; // C++17 - template constexpr bool is_compound_v + template inline constexpr bool is_compound_v = is_compound::value; // C++17 - template constexpr bool is_member_pointer_v + template inline constexpr bool is_member_pointer_v = is_member_pointer::value; // C++17 // See C++14 20.10.4.3, type properties - template constexpr bool is_const_v + template inline constexpr bool is_const_v = is_const::value; // C++17 - template constexpr bool is_volatile_v + template inline constexpr bool is_volatile_v = is_volatile::value; // C++17 - template constexpr bool is_trivial_v + template inline constexpr bool is_trivial_v = is_trivial::value; // C++17 - template constexpr bool is_trivially_copyable_v + template inline constexpr bool is_trivially_copyable_v = is_trivially_copyable::value; // C++17 - template constexpr bool is_standard_layout_v + template inline constexpr bool is_standard_layout_v = is_standard_layout::value; // C++17 - template constexpr bool is_pod_v + template inline constexpr bool is_pod_v = is_pod::value; // C++17 - template constexpr bool is_literal_type_v + template inline constexpr bool is_literal_type_v = is_literal_type::value; // C++17 - template constexpr bool is_empty_v + template inline constexpr bool is_empty_v = is_empty::value; // C++17 - template constexpr bool is_polymorphic_v + template inline constexpr bool is_polymorphic_v = is_polymorphic::value; // C++17 - template constexpr bool is_abstract_v + template inline constexpr bool is_abstract_v = is_abstract::value; // C++17 - template constexpr bool is_final_v + template inline constexpr bool is_final_v = is_final::value; // C++17 - template constexpr bool is_aggregate_v + template inline constexpr bool is_aggregate_v = is_aggregate::value; // C++17 - template constexpr bool is_signed_v + template inline constexpr bool is_signed_v = is_signed::value; // C++17 - template constexpr bool is_unsigned_v + template inline constexpr bool is_unsigned_v = is_unsigned::value; // C++17 - template constexpr bool is_constructible_v + template inline constexpr bool is_constructible_v = is_constructible::value; // C++17 - template constexpr bool is_default_constructible_v + template inline constexpr bool is_default_constructible_v = is_default_constructible::value; // C++17 - template constexpr bool is_copy_constructible_v + template inline constexpr bool is_copy_constructible_v = is_copy_constructible::value; // C++17 - template constexpr bool is_move_constructible_v + template inline constexpr bool is_move_constructible_v = is_move_constructible::value; // C++17 - template constexpr bool is_assignable_v + template inline constexpr bool is_assignable_v = is_assignable::value; // C++17 - template constexpr bool is_copy_assignable_v + template inline constexpr bool is_copy_assignable_v = is_copy_assignable::value; // C++17 - template constexpr bool is_move_assignable_v + template inline constexpr bool is_move_assignable_v = is_move_assignable::value; // C++17 - template constexpr bool is_swappable_with_v + template inline constexpr bool is_swappable_with_v = is_swappable_with::value; // C++17 - template constexpr bool is_swappable_v + template inline constexpr bool is_swappable_v = is_swappable::value; // C++17 - template constexpr bool is_destructible_v + template inline constexpr bool is_destructible_v = is_destructible::value; // C++17 - template constexpr bool is_trivially_constructible_v + template inline constexpr bool is_trivially_constructible_v = is_trivially_constructible::value; // C++17 - template constexpr bool is_trivially_default_constructible_v + template inline constexpr bool is_trivially_default_constructible_v = is_trivially_default_constructible::value; // C++17 - template constexpr bool is_trivially_copy_constructible_v + template inline constexpr bool is_trivially_copy_constructible_v = is_trivially_copy_constructible::value; // C++17 - template constexpr bool is_trivially_move_constructible_v + template inline constexpr bool is_trivially_move_constructible_v = is_trivially_move_constructible::value; // C++17 - template constexpr bool is_trivially_assignable_v + template inline constexpr bool is_trivially_assignable_v = is_trivially_assignable::value; // C++17 - template constexpr bool is_trivially_copy_assignable_v + template inline constexpr bool is_trivially_copy_assignable_v = is_trivially_copy_assignable::value; // C++17 - template constexpr bool is_trivially_move_assignable_v + template inline constexpr bool is_trivially_move_assignable_v = is_trivially_move_assignable::value; // C++17 - template constexpr bool is_trivially_destructible_v + template inline constexpr bool is_trivially_destructible_v = is_trivially_destructible::value; // C++17 - template constexpr bool is_nothrow_constructible_v + template inline constexpr bool is_nothrow_constructible_v = is_nothrow_constructible::value; // C++17 - template constexpr bool is_nothrow_default_constructible_v + template inline constexpr bool is_nothrow_default_constructible_v = is_nothrow_default_constructible::value; // C++17 - template constexpr bool is_nothrow_copy_constructible_v + template inline constexpr bool is_nothrow_copy_constructible_v = is_nothrow_copy_constructible::value; // C++17 - template constexpr bool is_nothrow_move_constructible_v + template inline constexpr bool is_nothrow_move_constructible_v = is_nothrow_move_constructible::value; // C++17 - template constexpr bool is_nothrow_assignable_v + template inline constexpr bool is_nothrow_assignable_v = is_nothrow_assignable::value; // C++17 - template constexpr bool is_nothrow_copy_assignable_v + template inline constexpr bool is_nothrow_copy_assignable_v = is_nothrow_copy_assignable::value; // C++17 - template constexpr bool is_nothrow_move_assignable_v + template inline constexpr bool is_nothrow_move_assignable_v = is_nothrow_move_assignable::value; // C++17 - template constexpr bool is_nothrow_swappable_with_v + template inline constexpr bool is_nothrow_swappable_with_v = is_nothrow_swappable_with::value; // C++17 - template constexpr bool is_nothrow_swappable_v + template inline constexpr bool is_nothrow_swappable_v = is_nothrow_swappable::value; // C++17 - template constexpr bool is_nothrow_destructible_v + template inline constexpr bool is_nothrow_destructible_v = is_nothrow_destructible::value; // C++17 - template constexpr bool has_virtual_destructor_v + template inline constexpr bool has_virtual_destructor_v = has_virtual_destructor::value; // C++17 + template inline constexpr bool has_unique_object_representations_v // C++17 + = has_unique_object_representations::value; // See C++14 20.10.5, type property queries - template constexpr size_t alignment_of_v + template inline constexpr size_t alignment_of_v = alignment_of::value; // C++17 - template constexpr size_t rank_v + template inline constexpr size_t rank_v = rank::value; // C++17 - template constexpr size_t extent_v + template inline constexpr size_t extent_v = extent::value; // C++17 // See C++14 20.10.6, type relations - template constexpr bool is_same_v + template inline constexpr bool is_same_v = is_same::value; // C++17 - template constexpr bool is_base_of_v + template inline constexpr bool is_base_of_v = is_base_of::value; // C++17 - template constexpr bool is_convertible_v + template inline constexpr bool is_convertible_v = is_convertible::value; // C++17 - template constexpr bool is_invocable_v + template inline constexpr bool is_invocable_v = is_invocable::value; // C++17 - template constexpr bool is_invocable_r_v + template inline constexpr bool is_invocable_r_v = is_invocable_r::value; // C++17 - template constexpr bool is_nothrow_invocable_v + template inline constexpr bool is_nothrow_invocable_v = is_nothrow_invocable::value; // C++17 - template constexpr bool is_nothrow_invocable_r_v + template inline constexpr bool is_nothrow_invocable_r_v = is_nothrow_invocable_r::value; // C++17 // [meta.logical], logical operator traits: template struct conjunction; // C++17 template - constexpr bool conjunction_v = conjunction::value; // C++17 + inline constexpr bool conjunction_v = conjunction::value; // C++17 template struct disjunction; // C++17 template - constexpr bool disjunction_v = disjunction::value; // C++17 + inline constexpr bool disjunction_v = disjunction::value; // C++17 template struct negation; // C++17 template - constexpr bool negation_v = negation::value; // C++17 + inline constexpr bool negation_v = negation::value; // C++17 } @@ -619,7 +623,8 @@ template struct _LIBCPP_TEMPLATE_VIS is_co template struct _LIBCPP_TEMPLATE_VIS is_const<_Tp const> : public true_type {}; #if _LIBCPP_STD_VER > 14 && !defined(_LIBCPP_HAS_NO_VARIABLE_TEMPLATES) -template _LIBCPP_CONSTEXPR bool is_const_v +template +_LIBCPP_INLINE_VAR _LIBCPP_CONSTEXPR bool is_const_v = is_const<_Tp>::value; #endif @@ -629,7 +634,8 @@ template struct _LIBCPP_TEMPLATE_VIS is_vo template struct _LIBCPP_TEMPLATE_VIS is_volatile<_Tp volatile> : public true_type {}; #if _LIBCPP_STD_VER > 14 && !defined(_LIBCPP_HAS_NO_VARIABLE_TEMPLATES) -template _LIBCPP_CONSTEXPR bool is_volatile_v +template +_LIBCPP_INLINE_VAR _LIBCPP_CONSTEXPR bool is_volatile_v = is_volatile<_Tp>::value; #endif @@ -666,7 +672,8 @@ template struct _LIBCPP_TEMPLATE_VIS is_vo : public __libcpp_is_void::type> {}; #if _LIBCPP_STD_VER > 14 && !defined(_LIBCPP_HAS_NO_VARIABLE_TEMPLATES) -template _LIBCPP_CONSTEXPR bool is_void_v +template +_LIBCPP_INLINE_VAR _LIBCPP_CONSTEXPR bool is_void_v = is_void<_Tp>::value; #endif @@ -683,7 +690,8 @@ template struct _LIBCPP_TEMPLATE_VIS is_nu : public __is_nullptr_t_impl::type> {}; #if _LIBCPP_STD_VER > 14 && !defined(_LIBCPP_HAS_NO_VARIABLE_TEMPLATES) -template _LIBCPP_CONSTEXPR bool is_null_pointer_v +template +_LIBCPP_INLINE_VAR _LIBCPP_CONSTEXPR bool is_null_pointer_v = is_null_pointer<_Tp>::value; #endif #endif @@ -717,7 +725,8 @@ template struct _LIBCPP_TEMPLATE_VIS is_in : public __libcpp_is_integral::type> {}; #if _LIBCPP_STD_VER > 14 && !defined(_LIBCPP_HAS_NO_VARIABLE_TEMPLATES) -template _LIBCPP_CONSTEXPR bool is_integral_v +template +_LIBCPP_INLINE_VAR _LIBCPP_CONSTEXPR bool is_integral_v = is_integral<_Tp>::value; #endif @@ -732,7 +741,8 @@ template struct _LIBCPP_TEMPLATE_VIS is_fl : public __libcpp_is_floating_point::type> {}; #if _LIBCPP_STD_VER > 14 && !defined(_LIBCPP_HAS_NO_VARIABLE_TEMPLATES) -template _LIBCPP_CONSTEXPR bool is_floating_point_v +template +_LIBCPP_INLINE_VAR _LIBCPP_CONSTEXPR bool is_floating_point_v = is_floating_point<_Tp>::value; #endif @@ -746,7 +756,8 @@ template struct _LIBCPP_TEMPLA : public true_type {}; #if _LIBCPP_STD_VER > 14 && !defined(_LIBCPP_HAS_NO_VARIABLE_TEMPLATES) -template _LIBCPP_CONSTEXPR bool is_array_v +template +_LIBCPP_INLINE_VAR _LIBCPP_CONSTEXPR bool is_array_v = is_array<_Tp>::value; #endif @@ -759,7 +770,8 @@ template struct _LIBCPP_TEMPLATE_VIS is_po : public __libcpp_is_pointer::type> {}; #if _LIBCPP_STD_VER > 14 && !defined(_LIBCPP_HAS_NO_VARIABLE_TEMPLATES) -template _LIBCPP_CONSTEXPR bool is_pointer_v +template +_LIBCPP_INLINE_VAR _LIBCPP_CONSTEXPR bool is_pointer_v = is_pointer<_Tp>::value; #endif @@ -780,13 +792,16 @@ template struct _LIBCPP_TEMPLATE_VIS is_re #endif #if _LIBCPP_STD_VER > 14 && !defined(_LIBCPP_HAS_NO_VARIABLE_TEMPLATES) -template _LIBCPP_CONSTEXPR bool is_reference_v +template +_LIBCPP_INLINE_VAR _LIBCPP_CONSTEXPR bool is_reference_v = is_reference<_Tp>::value; -template _LIBCPP_CONSTEXPR bool is_lvalue_reference_v +template +_LIBCPP_INLINE_VAR _LIBCPP_CONSTEXPR bool is_lvalue_reference_v = is_lvalue_reference<_Tp>::value; -template _LIBCPP_CONSTEXPR bool is_rvalue_reference_v +template +_LIBCPP_INLINE_VAR _LIBCPP_CONSTEXPR bool is_rvalue_reference_v = is_rvalue_reference<_Tp>::value; #endif // is_union @@ -805,7 +820,8 @@ template struct _LIBCPP_TEMPLATE_VIS is_un #endif #if _LIBCPP_STD_VER > 14 && !defined(_LIBCPP_HAS_NO_VARIABLE_TEMPLATES) -template _LIBCPP_CONSTEXPR bool is_union_v +template +_LIBCPP_INLINE_VAR _LIBCPP_CONSTEXPR bool is_union_v = is_union<_Tp>::value; #endif @@ -830,7 +846,8 @@ template struct _LIBCPP_TEMPLATE_VIS is_cl #endif #if _LIBCPP_STD_VER > 14 && !defined(_LIBCPP_HAS_NO_VARIABLE_TEMPLATES) -template _LIBCPP_CONSTEXPR bool is_class_v +template +_LIBCPP_INLINE_VAR _LIBCPP_CONSTEXPR bool is_class_v = is_class<_Tp>::value; #endif @@ -840,7 +857,8 @@ template struct _LIBCPP_TEMPLAT template struct _LIBCPP_TEMPLATE_VIS is_same<_Tp, _Tp> : public true_type {}; #if _LIBCPP_STD_VER > 14 && !defined(_LIBCPP_HAS_NO_VARIABLE_TEMPLATES) -template _LIBCPP_CONSTEXPR bool is_same_v +template +_LIBCPP_INLINE_VAR _LIBCPP_CONSTEXPR bool is_same_v = is_same<_Tp, _Up>::value; #endif @@ -870,7 +888,8 @@ template struct _LIBCPP_TEMPLATE_VIS is_fu : public __libcpp_is_function<_Tp> {}; #if _LIBCPP_STD_VER > 14 && !defined(_LIBCPP_HAS_NO_VARIABLE_TEMPLATES) -template _LIBCPP_CONSTEXPR bool is_function_v +template +_LIBCPP_INLINE_VAR _LIBCPP_CONSTEXPR bool is_function_v = is_function<_Tp>::value; #endif @@ -897,7 +916,8 @@ template struct _LIBCPP_TEMPLATE_VIS is_me : public __libcpp_is_member_function_pointer::type>::type {}; #if _LIBCPP_STD_VER > 14 && !defined(_LIBCPP_HAS_NO_VARIABLE_TEMPLATES) -template _LIBCPP_CONSTEXPR bool is_member_function_pointer_v +template +_LIBCPP_INLINE_VAR _LIBCPP_CONSTEXPR bool is_member_function_pointer_v = is_member_function_pointer<_Tp>::value; #endif @@ -910,7 +930,8 @@ template struct _LIBCPP_TEMPLATE_VIS is_me : public __libcpp_is_member_pointer::type> {}; #if _LIBCPP_STD_VER > 14 && !defined(_LIBCPP_HAS_NO_VARIABLE_TEMPLATES) -template _LIBCPP_CONSTEXPR bool is_member_pointer_v +template +_LIBCPP_INLINE_VAR _LIBCPP_CONSTEXPR bool is_member_pointer_v = is_member_pointer<_Tp>::value; #endif @@ -921,7 +942,8 @@ template struct _LIBCPP_TEMPLATE_VIS is_me !is_member_function_pointer<_Tp>::value> {}; #if _LIBCPP_STD_VER > 14 && !defined(_LIBCPP_HAS_NO_VARIABLE_TEMPLATES) -template _LIBCPP_CONSTEXPR bool is_member_object_pointer_v +template +_LIBCPP_INLINE_VAR _LIBCPP_CONSTEXPR bool is_member_object_pointer_v = is_member_object_pointer<_Tp>::value; #endif @@ -949,7 +971,8 @@ template struct _LIBCPP_TEMPLATE_VIS is_en #endif #if _LIBCPP_STD_VER > 14 && !defined(_LIBCPP_HAS_NO_VARIABLE_TEMPLATES) -template _LIBCPP_CONSTEXPR bool is_enum_v +template +_LIBCPP_INLINE_VAR _LIBCPP_CONSTEXPR bool is_enum_v = is_enum<_Tp>::value; #endif @@ -960,7 +983,8 @@ template struct _LIBCPP_TEMPLATE_VIS is_ar is_floating_point<_Tp>::value> {}; #if _LIBCPP_STD_VER > 14 && !defined(_LIBCPP_HAS_NO_VARIABLE_TEMPLATES) -template _LIBCPP_CONSTEXPR bool is_arithmetic_v +template +_LIBCPP_INLINE_VAR _LIBCPP_CONSTEXPR bool is_arithmetic_v = is_arithmetic<_Tp>::value; #endif @@ -972,7 +996,8 @@ template struct _LIBCPP_TEMPLATE_VIS is_fu is_arithmetic<_Tp>::value> {}; #if _LIBCPP_STD_VER > 14 && !defined(_LIBCPP_HAS_NO_VARIABLE_TEMPLATES) -template _LIBCPP_CONSTEXPR bool is_fundamental_v +template +_LIBCPP_INLINE_VAR _LIBCPP_CONSTEXPR bool is_fundamental_v = is_fundamental<_Tp>::value; #endif @@ -988,7 +1013,8 @@ template struct _LIBCPP_TEMPLATE_VIS is_sc template <> struct _LIBCPP_TEMPLATE_VIS is_scalar : public true_type {}; #if _LIBCPP_STD_VER > 14 && !defined(_LIBCPP_HAS_NO_VARIABLE_TEMPLATES) -template _LIBCPP_CONSTEXPR bool is_scalar_v +template +_LIBCPP_INLINE_VAR _LIBCPP_CONSTEXPR bool is_scalar_v = is_scalar<_Tp>::value; #endif @@ -1001,7 +1027,8 @@ template struct _LIBCPP_TEMPLATE_VIS is_ob is_class<_Tp>::value > {}; #if _LIBCPP_STD_VER > 14 && !defined(_LIBCPP_HAS_NO_VARIABLE_TEMPLATES) -template _LIBCPP_CONSTEXPR bool is_object_v +template +_LIBCPP_INLINE_VAR _LIBCPP_CONSTEXPR bool is_object_v = is_object<_Tp>::value; #endif @@ -1011,7 +1038,8 @@ template struct _LIBCPP_TEMPLATE_VIS is_co : public integral_constant::value> {}; #if _LIBCPP_STD_VER > 14 && !defined(_LIBCPP_HAS_NO_VARIABLE_TEMPLATES) -template _LIBCPP_CONSTEXPR bool is_compound_v +template +_LIBCPP_INLINE_VAR _LIBCPP_CONSTEXPR bool is_compound_v = is_compound<_Tp>::value; #endif @@ -1210,7 +1238,8 @@ template struct __libcpp_is_signed<_Tp, fa template struct _LIBCPP_TEMPLATE_VIS is_signed : public __libcpp_is_signed<_Tp> {}; #if _LIBCPP_STD_VER > 14 && !defined(_LIBCPP_HAS_NO_VARIABLE_TEMPLATES) -template _LIBCPP_CONSTEXPR bool is_signed_v +template +_LIBCPP_INLINE_VAR _LIBCPP_CONSTEXPR bool is_signed_v = is_signed<_Tp>::value; #endif @@ -1230,7 +1259,8 @@ template struct __libcpp_is_unsigned<_Tp, template struct _LIBCPP_TEMPLATE_VIS is_unsigned : public __libcpp_is_unsigned<_Tp> {}; #if _LIBCPP_STD_VER > 14 && !defined(_LIBCPP_HAS_NO_VARIABLE_TEMPLATES) -template _LIBCPP_CONSTEXPR bool is_unsigned_v +template +_LIBCPP_INLINE_VAR _LIBCPP_CONSTEXPR bool is_unsigned_v = is_unsigned<_Tp>::value; #endif @@ -1244,7 +1274,8 @@ template struct _LIBCPP_TEMPLA : public integral_constant::value + 1> {}; #if _LIBCPP_STD_VER > 14 && !defined(_LIBCPP_HAS_NO_VARIABLE_TEMPLATES) -template _LIBCPP_CONSTEXPR size_t rank_v +template +_LIBCPP_INLINE_VAR _LIBCPP_CONSTEXPR size_t rank_v = rank<_Tp>::value; #endif @@ -1262,7 +1293,8 @@ template struct : public integral_constant::value> {}; #if _LIBCPP_STD_VER > 14 && !defined(_LIBCPP_HAS_NO_VARIABLE_TEMPLATES) -template _LIBCPP_CONSTEXPR size_t extent_v +template +_LIBCPP_INLINE_VAR _LIBCPP_CONSTEXPR size_t extent_v = extent<_Tp, _Ip>::value; #endif @@ -1334,7 +1366,8 @@ template struct _LIBCPP_TEMPLATE_VIS is_ab : public integral_constant {}; #if _LIBCPP_STD_VER > 14 && !defined(_LIBCPP_HAS_NO_VARIABLE_TEMPLATES) -template _LIBCPP_CONSTEXPR bool is_abstract_v +template +_LIBCPP_INLINE_VAR _LIBCPP_CONSTEXPR bool is_abstract_v = is_abstract<_Tp>::value; #endif @@ -1354,7 +1387,8 @@ is_final : public integral_constant 14 && !defined(_LIBCPP_HAS_NO_VARIABLE_TEMPLATES) -template _LIBCPP_CONSTEXPR bool is_final_v +template +_LIBCPP_INLINE_VAR _LIBCPP_CONSTEXPR bool is_final_v = is_final<_Tp>::value; #endif @@ -1366,7 +1400,8 @@ is_aggregate : public integral_constant -constexpr bool is_aggregate_v = is_aggregate<_Tp>::value; +_LIBCPP_INLINE_VAR constexpr bool is_aggregate_v + = is_aggregate<_Tp>::value; #endif #endif // _LIBCPP_STD_VER > 14 && !defined(_LIBCPP_HAS_NO_IS_AGGREGATE) @@ -1407,7 +1442,8 @@ struct _LIBCPP_TEMPLATE_VIS is_base_of #endif // _LIBCPP_HAS_IS_BASE_OF #if _LIBCPP_STD_VER > 14 && !defined(_LIBCPP_HAS_NO_VARIABLE_TEMPLATES) -template _LIBCPP_CONSTEXPR bool is_base_of_v +template +_LIBCPP_INLINE_VAR _LIBCPP_CONSTEXPR bool is_base_of_v = is_base_of<_Bp, _Dp>::value; #endif @@ -1497,7 +1533,8 @@ template struct _LIBCPP_TEMPLAT #endif // __has_feature(is_convertible_to) #if _LIBCPP_STD_VER > 14 && !defined(_LIBCPP_HAS_NO_VARIABLE_TEMPLATES) -template _LIBCPP_CONSTEXPR bool is_convertible_v +template +_LIBCPP_INLINE_VAR _LIBCPP_CONSTEXPR bool is_convertible_v = is_convertible<_From, _To>::value; #endif @@ -1533,7 +1570,8 @@ template struct _LIBCPP_TEMPLATE_VIS is_em #endif // __has_feature(is_empty) #if _LIBCPP_STD_VER > 14 && !defined(_LIBCPP_HAS_NO_VARIABLE_TEMPLATES) -template _LIBCPP_CONSTEXPR bool is_empty_v +template +_LIBCPP_INLINE_VAR _LIBCPP_CONSTEXPR bool is_empty_v = is_empty<_Tp>::value; #endif @@ -1558,7 +1596,8 @@ template struct _LIBCPP_TEMPLATE_VIS is_po #endif // __has_feature(is_polymorphic) #if _LIBCPP_STD_VER > 14 && !defined(_LIBCPP_HAS_NO_VARIABLE_TEMPLATES) -template _LIBCPP_CONSTEXPR bool is_polymorphic_v +template +_LIBCPP_INLINE_VAR _LIBCPP_CONSTEXPR bool is_polymorphic_v = is_polymorphic<_Tp>::value; #endif @@ -1577,17 +1616,35 @@ template struct _LIBCPP_TEMPLATE_VIS has_v #endif #if _LIBCPP_STD_VER > 14 && !defined(_LIBCPP_HAS_NO_VARIABLE_TEMPLATES) -template _LIBCPP_CONSTEXPR bool has_virtual_destructor_v +template +_LIBCPP_INLINE_VAR _LIBCPP_CONSTEXPR bool has_virtual_destructor_v = has_virtual_destructor<_Tp>::value; #endif +// has_unique_object_representations + +#if _LIBCPP_STD_VER > 14 && defined(_LIBCPP_HAS_UNIQUE_OBJECT_REPRESENTATIONS) + +template struct _LIBCPP_TEMPLATE_VIS has_unique_object_representations + : public integral_constant>)> {}; + +#if !defined(_LIBCPP_HAS_NO_VARIABLE_TEMPLATES) +template +_LIBCPP_INLINE_VAR _LIBCPP_CONSTEXPR bool has_unique_object_representations_v + = has_unique_object_representations<_Tp>::value; +#endif + +#endif *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@freebsd.org Sat Jan 6 21:36:53 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 06DDFDF36AA; Sat, 6 Jan 2018 21:36:52 +0000 (UTC) (envelope-from dim@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 C33E081528; Sat, 6 Jan 2018 21:36:50 +0000 (UTC) (envelope-from dim@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 E055517F2B; Sat, 6 Jan 2018 21:36:49 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w06LanuN067601; Sat, 6 Jan 2018 21:36:49 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w06LamLw067590; Sat, 6 Jan 2018 21:36:48 GMT (envelope-from dim@FreeBSD.org) Message-Id: <201801062136.w06LamLw067590@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Sat, 6 Jan 2018 21:36:48 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r327647 - in vendor/lld/dist-release_60: ELF docs test/ELF test/ELF/Inputs test/ELF/linkerscript X-SVN-Group: vendor X-SVN-Commit-Author: dim X-SVN-Commit-Paths: in vendor/lld/dist-release_60: ELF docs test/ELF test/ELF/Inputs test/ELF/linkerscript X-SVN-Commit-Revision: 327647 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 06 Jan 2018 21:36:54 -0000 Author: dim Date: Sat Jan 6 21:36:48 2018 New Revision: 327647 URL: https://svnweb.freebsd.org/changeset/base/327647 Log: Vendor import of lld release_60 branch r321788: https://llvm.org/svn/llvm-project/lld/branches/release_60@321788 Added: vendor/lld/dist-release_60/test/ELF/Inputs/shlib-undefined-ref.s (contents, props changed) vendor/lld/dist-release_60/test/ELF/gnu-ifunc-dyntags.s (contents, props changed) vendor/lld/dist-release_60/test/ELF/linkerscript/nobits-offset.s (contents, props changed) vendor/lld/dist-release_60/test/ELF/relocation-size-err.s (contents, props changed) vendor/lld/dist-release_60/test/ELF/shlib-undefined-shared.s (contents, props changed) vendor/lld/dist-release_60/test/ELF/weak-undef-rw.s (contents, props changed) Modified: vendor/lld/dist-release_60/ELF/Driver.cpp vendor/lld/dist-release_60/ELF/Relocations.cpp vendor/lld/dist-release_60/ELF/SyntheticSections.cpp vendor/lld/dist-release_60/ELF/Writer.cpp vendor/lld/dist-release_60/docs/ReleaseNotes.rst Modified: vendor/lld/dist-release_60/ELF/Driver.cpp ============================================================================== --- vendor/lld/dist-release_60/ELF/Driver.cpp Sat Jan 6 21:36:38 2018 (r327646) +++ vendor/lld/dist-release_60/ELF/Driver.cpp Sat Jan 6 21:36:48 2018 (r327647) @@ -1043,7 +1043,8 @@ template void LinkerDriver::link(opt::Inp return; // Handle undefined symbols in DSOs. - Symtab->scanShlibUndefined(); + if (!Config->Shared) + Symtab->scanShlibUndefined(); // Handle the -exclude-libs option. if (Args.hasArg(OPT_exclude_libs)) Modified: vendor/lld/dist-release_60/ELF/Relocations.cpp ============================================================================== --- vendor/lld/dist-release_60/ELF/Relocations.cpp Sat Jan 6 21:36:38 2018 (r327646) +++ vendor/lld/dist-release_60/ELF/Relocations.cpp Sat Jan 6 21:36:48 2018 (r327647) @@ -367,7 +367,7 @@ static bool isRelExpr(RelExpr Expr) { static bool isStaticLinkTimeConstant(RelExpr E, RelType Type, const Symbol &Sym, InputSectionBase &S, uint64_t RelOff) { // These expressions always compute a constant - if (isRelExprOneOfPic) return true; + // The size of a non preemptible symbol is a constant. + if (E == R_SIZE) + return true; + // For the target and the relocation, we want to know if they are // absolute or relative. bool AbsVal = isAbsoluteValue(Sym); @@ -592,6 +596,12 @@ static RelExpr adjustExpr(Symbol &Sym, RelExpr Expr, R if (IsConstant) return Expr; + // We can create any dynamic relocation supported by the dynamic linker if a + // section is writable or we are passed -z notext. + bool CanWrite = (S.Flags & SHF_WRITE) || !Config->ZText; + if (CanWrite && Target->isPicRel(Type)) + return Expr; + // If the relocation is to a weak undef, and we are producing // executable, give up on it and produce a non preemptible 0. if (!Config->Shared && Sym.isUndefWeak()) { @@ -599,12 +609,6 @@ static RelExpr adjustExpr(Symbol &Sym, RelExpr Expr, R IsConstant = true; return Expr; } - - // We can create any dynamic relocation supported by the dynamic linker if a - // section is writable or we are passed -z notext. - bool CanWrite = (S.Flags & SHF_WRITE) || !Config->ZText; - if (CanWrite && Target->isPicRel(Type)) - return Expr; // If we got here we know that this relocation would require the dynamic // linker to write a value to read only memory or use an unsupported Modified: vendor/lld/dist-release_60/ELF/SyntheticSections.cpp ============================================================================== --- vendor/lld/dist-release_60/ELF/SyntheticSections.cpp Sat Jan 6 21:36:38 2018 (r327646) +++ vendor/lld/dist-release_60/ELF/SyntheticSections.cpp Sat Jan 6 21:36:48 2018 (r327647) @@ -1064,7 +1064,7 @@ template void DynamicSection::final addInt(DT_DEBUG, 0); this->Link = InX::DynStrTab->getParent()->SectionIndex; - if (InX::RelaDyn->getParent() && !InX::RelaDyn->empty()) { + if (!InX::RelaDyn->empty()) { addInSec(InX::RelaDyn->DynamicTag, InX::RelaDyn); addSize(InX::RelaDyn->SizeDynamicTag, InX::RelaDyn->getParent()); @@ -1081,7 +1081,13 @@ template void DynamicSection::final addInt(IsRela ? DT_RELACOUNT : DT_RELCOUNT, NumRelativeRels); } } - if (InX::RelaPlt->getParent() && !InX::RelaPlt->empty()) { + // .rel[a].plt section usually consists of two parts, containing plt and + // iplt relocations. It is possible to have only iplt relocations in the + // output. In that case RelaPlt is empty and have zero offset, the same offset + // as RelaIplt have. And we still want to emit proper dynamic tags for that + // case, so here we always use RelaPlt as marker for the begining of + // .rel[a].plt section. + if (InX::RelaPlt->getParent()->Live) { addInSec(DT_JMPREL, InX::RelaPlt); addSize(DT_PLTRELSZ, InX::RelaPlt->getParent()); switch (Config->EMachine) { Modified: vendor/lld/dist-release_60/ELF/Writer.cpp ============================================================================== --- vendor/lld/dist-release_60/ELF/Writer.cpp Sat Jan 6 21:36:38 2018 (r327646) +++ vendor/lld/dist-release_60/ELF/Writer.cpp Sat Jan 6 21:36:48 2018 (r327647) @@ -1767,30 +1767,36 @@ template void Writer::fixSectionAli // virtual address (modulo the page size) so that the loader can load // executables without any address adjustment. static uint64_t getFileAlignment(uint64_t Off, OutputSection *Cmd) { - // If the section is not in a PT_LOAD, we just have to align it. - if (!Cmd->PtLoad) - return alignTo(Off, Cmd->Alignment); - - OutputSection *First = Cmd->PtLoad->FirstSec; + OutputSection *First = Cmd->PtLoad ? Cmd->PtLoad->FirstSec : nullptr; // The first section in a PT_LOAD has to have congruent offset and address // module the page size. if (Cmd == First) return alignTo(Off, std::max(Cmd->Alignment, Config->MaxPageSize), Cmd->Addr); + // For SHT_NOBITS we don't want the alignment of the section to impact the + // offset of the sections that follow. Since nothing seems to care about the + // sh_offset of the SHT_NOBITS section itself, just ignore it. + if (Cmd->Type == SHT_NOBITS) + return Off; + + // If the section is not in a PT_LOAD, we just have to align it. + if (!Cmd->PtLoad) + return alignTo(Off, Cmd->Alignment); + // If two sections share the same PT_LOAD the file offset is calculated // using this formula: Off2 = Off1 + (VA2 - VA1). return First->Offset + Cmd->Addr - First->Addr; } static uint64_t setOffset(OutputSection *Cmd, uint64_t Off) { - if (Cmd->Type == SHT_NOBITS) { - Cmd->Offset = Off; - return Off; - } - Off = getFileAlignment(Off, Cmd); Cmd->Offset = Off; + + // For SHT_NOBITS we should not count the size. + if (Cmd->Type == SHT_NOBITS) + return Off; + return Off + Cmd->Size; } Modified: vendor/lld/dist-release_60/docs/ReleaseNotes.rst ============================================================================== --- vendor/lld/dist-release_60/docs/ReleaseNotes.rst Sat Jan 6 21:36:38 2018 (r327646) +++ vendor/lld/dist-release_60/docs/ReleaseNotes.rst Sat Jan 6 21:36:48 2018 (r327647) @@ -29,7 +29,13 @@ ELF Improvements COFF Improvements ----------------- -* Item 1. +* A GNU ld style frontend for the COFF linker has been added for MinGW. + In MinGW environments, the linker is invoked with GNU ld style parameters; + which LLD previously only supported when used as an ELF linker. When + a PE/COFF target is chosen, those parameters are rewritten into the + lld-link style parameters and the COFF linker is invoked instead. + +* Initial support for the ARM64 architecture has been added. MachO Improvements ------------------ Added: vendor/lld/dist-release_60/test/ELF/Inputs/shlib-undefined-ref.s ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ vendor/lld/dist-release_60/test/ELF/Inputs/shlib-undefined-ref.s Sat Jan 6 21:36:48 2018 (r327647) @@ -0,0 +1,4 @@ +.globl f +f: + call should_not_be_exported@PLT + ret Added: vendor/lld/dist-release_60/test/ELF/gnu-ifunc-dyntags.s ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ vendor/lld/dist-release_60/test/ELF/gnu-ifunc-dyntags.s Sat Jan 6 21:36:48 2018 (r327647) @@ -0,0 +1,41 @@ +# REQUIRES: x86 +# RUN: llvm-mc -filetype=obj -triple=x86_64-pc-linux %s -o %t.o +# RUN: ld.lld -pie %t.o -o %tout +# RUN: llvm-objdump -section-headers %tout | FileCheck %s +# RUN: llvm-readobj -dynamic-table -r %tout | FileCheck %s --check-prefix=TAGS + +## Check we produce DT_PLTREL/DT_JMPREL/DT_PLTGOT and DT_PLTRELSZ tags +## when there are no other relocations except R_*_IRELATIVE. + +# CHECK: Name Size Address +# CHECK: .rela.plt 00000030 0000000000000210 +# CHECK: .got.plt 00000010 0000000000002000 + +# TAGS: Relocations [ +# TAGS-NEXT: Section {{.*}} .rela.plt { +# TAGS-NEXT: R_X86_64_IRELATIVE +# TAGS-NEXT: R_X86_64_IRELATIVE +# TAGS-NEXT: } +# TAGS-NEXT: ] + +# TAGS: Tag Type Name/Value +# TAGS: 0x0000000000000017 JMPREL 0x210 +# TAGS: 0x0000000000000002 PLTRELSZ 48 +# TAGS: 0x0000000000000003 PLTGOT 0x2000 +# TAGS: 0x0000000000000014 PLTREL RELA + +.text +.type foo STT_GNU_IFUNC +.globl foo +foo: + ret + +.type bar STT_GNU_IFUNC +.globl bar +bar: + ret + +.globl _start +_start: + call foo + call bar Added: vendor/lld/dist-release_60/test/ELF/linkerscript/nobits-offset.s ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ vendor/lld/dist-release_60/test/ELF/linkerscript/nobits-offset.s Sat Jan 6 21:36:48 2018 (r327647) @@ -0,0 +1,18 @@ +# REQUIRES: x86 +# RUN: llvm-mc -filetype=obj -triple=x86_64-pc-linux %s -o %t.o +# RUN: echo "SECTIONS { \ +# RUN: .sec1 (NOLOAD) : { . += 1; } \ +# RUN: .text : { *(.text) } \ +# RUN: };" > %t.script +# RUN: ld.lld %t.o -T %t.script -o %t +# RUN: llvm-readelf --sections %t | FileCheck %s + +# We used to misalign section offsets if the first section in a +# PT_LOAD was SHT_NOBITS. + +# CHECK: [ 2] .text PROGBITS 0000000000000010 001010 000010 00 AX 0 0 16 + +.global _start +_start: + nop +.p2align 4 Added: vendor/lld/dist-release_60/test/ELF/relocation-size-err.s ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ vendor/lld/dist-release_60/test/ELF/relocation-size-err.s Sat Jan 6 21:36:48 2018 (r327647) @@ -0,0 +1,12 @@ +// REQUIRES: x86 +// RUN: llvm-mc -filetype=obj -triple=x86_64-pc-linux %s -o %t.o +// RUN: not ld.lld %t.o -o %t.so -shared 2>&1 | FileCheck %s + +// CHECK: error: can't create dynamic relocation R_X86_64_SIZE64 against symbol: foo in readonly segment; recompile object files with -fPIC + + .global foo +foo: + .quad 42 + .size foo, 8 + + .quad foo@SIZE Added: vendor/lld/dist-release_60/test/ELF/shlib-undefined-shared.s ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ vendor/lld/dist-release_60/test/ELF/shlib-undefined-shared.s Sat Jan 6 21:36:48 2018 (r327647) @@ -0,0 +1,15 @@ +# REQUIRES: x86 + +# RUN: llvm-mc -filetype=obj -triple=x86_64-linux-gnu -o %t1.o %S/Inputs/shlib-undefined-ref.s +# RUN: ld.lld -shared -o %t1.so %t1.o + +# RUN: llvm-mc -filetype=obj -triple=x86_64-linux-gnu -o %t2.o %s +# RUN: echo "{ local: *; };" > %t.script +# RUN: ld.lld -shared -version-script %t.script -o %t2.so %t2.o %t1.so +# RUN: llvm-nm -g %t2.so | FileCheck -allow-empty %s + +# CHECK-NOT: should_not_be_exported + +.globl should_not_be_exported +should_not_be_exported: + ret Added: vendor/lld/dist-release_60/test/ELF/weak-undef-rw.s ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ vendor/lld/dist-release_60/test/ELF/weak-undef-rw.s Sat Jan 6 21:36:48 2018 (r327647) @@ -0,0 +1,12 @@ +# REQUIRES: x86 +# RUN: llvm-mc -filetype=obj -triple=x86_64-pc-linux %s -o %t.o +# RUN: ld.lld %t.o -o %t --export-dynamic +# RUN: llvm-readobj -r %t | FileCheck %s + +# CHECK: R_X86_64_64 foobar 0x0 + + .global _start +_start: + .data + .weak foobar + .quad foobar From owner-svn-src-all@freebsd.org Sat Jan 6 21:36:55 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 96E27DF36C6; Sat, 6 Jan 2018 21:36:55 +0000 (UTC) (envelope-from dim@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 6E4078159F; Sat, 6 Jan 2018 21:36:53 +0000 (UTC) (envelope-from dim@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 D4D5717F2C; Sat, 6 Jan 2018 21:36:52 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w06Laqwj067647; Sat, 6 Jan 2018 21:36:52 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w06LaqBC067646; Sat, 6 Jan 2018 21:36:52 GMT (envelope-from dim@FreeBSD.org) Message-Id: <201801062136.w06LaqBC067646@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Sat, 6 Jan 2018 21:36:52 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r327648 - vendor/lld/lld-release_60-r321788 X-SVN-Group: vendor X-SVN-Commit-Author: dim X-SVN-Commit-Paths: vendor/lld/lld-release_60-r321788 X-SVN-Commit-Revision: 327648 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 06 Jan 2018 21:36:55 -0000 Author: dim Date: Sat Jan 6 21:36:52 2018 New Revision: 327648 URL: https://svnweb.freebsd.org/changeset/base/327648 Log: Tag lld release_60 branch r321788. Added: vendor/lld/lld-release_60-r321788/ - copied from r327647, vendor/lld/dist-release_60/ From owner-svn-src-all@freebsd.org Sat Jan 6 21:37:25 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 3F8CCDF386A; Sat, 6 Jan 2018 21:37:25 +0000 (UTC) (envelope-from dim@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 1AA7381862; Sat, 6 Jan 2018 21:37:25 +0000 (UTC) (envelope-from dim@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 2882217F2E; Sat, 6 Jan 2018 21:37:24 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w06LbOiX067762; Sat, 6 Jan 2018 21:37:24 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w06LbOrk067761; Sat, 6 Jan 2018 21:37:24 GMT (envelope-from dim@FreeBSD.org) Message-Id: <201801062137.w06LbOrk067761@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Sat, 6 Jan 2018 21:37:24 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r327650 - vendor/lldb/lldb-release_60-r321788 X-SVN-Group: vendor X-SVN-Commit-Author: dim X-SVN-Commit-Paths: vendor/lldb/lldb-release_60-r321788 X-SVN-Commit-Revision: 327650 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 06 Jan 2018 21:37:25 -0000 Author: dim Date: Sat Jan 6 21:37:23 2018 New Revision: 327650 URL: https://svnweb.freebsd.org/changeset/base/327650 Log: Tag lldb release_60 branch r321788. Added: vendor/lldb/lldb-release_60-r321788/ - copied from r327649, vendor/lldb/dist-release_60/ From owner-svn-src-all@freebsd.org Sat Jan 6 21:37:22 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 4AE6FDF383B; Sat, 6 Jan 2018 21:37:22 +0000 (UTC) (envelope-from dim@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 24D9581859; Sat, 6 Jan 2018 21:37:22 +0000 (UTC) (envelope-from dim@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 65A4317F2D; Sat, 6 Jan 2018 21:37:21 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w06LbL7b067716; Sat, 6 Jan 2018 21:37:21 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w06LbK19067713; Sat, 6 Jan 2018 21:37:20 GMT (envelope-from dim@FreeBSD.org) Message-Id: <201801062137.w06LbK19067713@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Sat, 6 Jan 2018 21:37:20 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r327649 - in vendor/lldb/dist-release_60/source: Core Plugins/Instruction/ARM64 Plugins/Process/MacOSX-Kernel X-SVN-Group: vendor X-SVN-Commit-Author: dim X-SVN-Commit-Paths: in vendor/lldb/dist-release_60/source: Core Plugins/Instruction/ARM64 Plugins/Process/MacOSX-Kernel X-SVN-Commit-Revision: 327649 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 06 Jan 2018 21:37:22 -0000 Author: dim Date: Sat Jan 6 21:37:20 2018 New Revision: 327649 URL: https://svnweb.freebsd.org/changeset/base/327649 Log: Vendor import of lldb release_60 branch r321788: https://llvm.org/svn/llvm-project/lldb/branches/release_60@321788 Modified: vendor/lldb/dist-release_60/source/Core/Debugger.cpp vendor/lldb/dist-release_60/source/Plugins/Instruction/ARM64/EmulateInstructionARM64.cpp vendor/lldb/dist-release_60/source/Plugins/Process/MacOSX-Kernel/CommunicationKDP.cpp Modified: vendor/lldb/dist-release_60/source/Core/Debugger.cpp ============================================================================== --- vendor/lldb/dist-release_60/source/Core/Debugger.cpp Sat Jan 6 21:36:52 2018 (r327648) +++ vendor/lldb/dist-release_60/source/Core/Debugger.cpp Sat Jan 6 21:37:20 2018 (r327649) @@ -1162,75 +1162,6 @@ DebuggerSP Debugger::FindDebuggerWithID(lldb::user_id_ return debugger_sp; } -#if 0 -static void -TestPromptFormats (StackFrame *frame) -{ - if (frame == nullptr) - return; - - StreamString s; - const char *prompt_format = - "{addr = '${addr}'\n}" - "{addr-file-or-load = '${addr-file-or-load}'\n}" - "{current-pc-arrow = '${current-pc-arrow}'\n}" - "{process.id = '${process.id}'\n}" - "{process.name = '${process.name}'\n}" - "{process.file.basename = '${process.file.basename}'\n}" - "{process.file.fullpath = '${process.file.fullpath}'\n}" - "{thread.id = '${thread.id}'\n}" - "{thread.index = '${thread.index}'\n}" - "{thread.name = '${thread.name}'\n}" - "{thread.queue = '${thread.queue}'\n}" - "{thread.stop-reason = '${thread.stop-reason}'\n}" - "{target.arch = '${target.arch}'\n}" - "{module.file.basename = '${module.file.basename}'\n}" - "{module.file.fullpath = '${module.file.fullpath}'\n}" - "{file.basename = '${file.basename}'\n}" - "{file.fullpath = '${file.fullpath}'\n}" - "{frame.index = '${frame.index}'\n}" - "{frame.pc = '${frame.pc}'\n}" - "{frame.sp = '${frame.sp}'\n}" - "{frame.fp = '${frame.fp}'\n}" - "{frame.flags = '${frame.flags}'\n}" - "{frame.reg.rdi = '${frame.reg.rdi}'\n}" - "{frame.reg.rip = '${frame.reg.rip}'\n}" - "{frame.reg.rsp = '${frame.reg.rsp}'\n}" - "{frame.reg.rbp = '${frame.reg.rbp}'\n}" - "{frame.reg.rflags = '${frame.reg.rflags}'\n}" - "{frame.reg.xmm0 = '${frame.reg.xmm0}'\n}" - "{frame.reg.carp = '${frame.reg.carp}'\n}" - "{function.id = '${function.id}'\n}" - "{function.changed = '${function.changed}'\n}" - "{function.initial-function = '${function.initial-function}'\n}" - "{function.name = '${function.name}'\n}" - "{function.name-without-args = '${function.name-without-args}'\n}" - "{function.name-with-args = '${function.name-with-args}'\n}" - "{function.addr-offset = '${function.addr-offset}'\n}" - "{function.concrete-only-addr-offset-no-padding = '${function.concrete-only-addr-offset-no-padding}'\n}" - "{function.line-offset = '${function.line-offset}'\n}" - "{function.pc-offset = '${function.pc-offset}'\n}" - "{line.file.basename = '${line.file.basename}'\n}" - "{line.file.fullpath = '${line.file.fullpath}'\n}" - "{line.number = '${line.number}'\n}" - "{line.start-addr = '${line.start-addr}'\n}" - "{line.end-addr = '${line.end-addr}'\n}" -; - - SymbolContext sc (frame->GetSymbolContext(eSymbolContextEverything)); - ExecutionContext exe_ctx; - frame->CalculateExecutionContext(exe_ctx); - if (Debugger::FormatPrompt (prompt_format, &sc, &exe_ctx, &sc.line_entry.range.GetBaseAddress(), s)) - { - printf("%s\n", s.GetData()); - } - else - { - printf ("what we got: %s\n", s.GetData()); - } -} -#endif - bool Debugger::FormatDisassemblerAddress(const FormatEntity::Entry *format, const SymbolContext *sc, const SymbolContext *prev_sc, Modified: vendor/lldb/dist-release_60/source/Plugins/Instruction/ARM64/EmulateInstructionARM64.cpp ============================================================================== --- vendor/lldb/dist-release_60/source/Plugins/Instruction/ARM64/EmulateInstructionARM64.cpp Sat Jan 6 21:36:52 2018 (r327648) +++ vendor/lldb/dist-release_60/source/Plugins/Instruction/ARM64/EmulateInstructionARM64.cpp Sat Jan 6 21:37:20 2018 (r327649) @@ -76,19 +76,6 @@ static inline bool IsZero(uint64_t x) { return x == 0; static inline uint64_t NOT(uint64_t x) { return ~x; } -#if 0 -// LSL_C() -// ======= -static inline uint64_t -LSL_C (uint64_t x, integer shift, bool &carry_out) -{ - assert (shift >= 0); - uint64_t result = x << shift; - carry_out = ((1ull << (64-1)) >> (shift - 1)) != 0; - return result; -} -#endif - // LSL() // ===== Modified: vendor/lldb/dist-release_60/source/Plugins/Process/MacOSX-Kernel/CommunicationKDP.cpp ============================================================================== --- vendor/lldb/dist-release_60/source/Plugins/Process/MacOSX-Kernel/CommunicationKDP.cpp Sat Jan 6 21:36:52 2018 (r327648) +++ vendor/lldb/dist-release_60/source/Plugins/Process/MacOSX-Kernel/CommunicationKDP.cpp Sat Jan 6 21:37:20 2018 (r327649) @@ -59,15 +59,6 @@ bool CommunicationKDP::SendRequestPacket( return SendRequestPacketNoLock(request_packet); } -#if 0 -typedef struct { - uint8_t request; // Either: CommandType | ePacketTypeRequest, or CommandType | ePacketTypeReply - uint8_t sequence; - uint16_t length; // Length of entire packet including this header - uint32_t key; // Session key -} kdp_hdr_t; -#endif - void CommunicationKDP::MakeRequestPacketHeader(CommandType request_type, PacketStreamType &request_packet, uint16_t request_length) { @@ -435,34 +426,6 @@ bool CommunicationKDP::SendRequestVersion() { } return false; } - -#if 0 // Disable KDP_IMAGEPATH for now, it seems to hang the KDP connection... -const char * -CommunicationKDP::GetImagePath () -{ - if (m_image_path.empty()) - SendRequestImagePath(); - return m_image_path.c_str(); -} - -bool -CommunicationKDP::SendRequestImagePath () -{ - PacketStreamType request_packet (Stream::eBinary, m_addr_byte_size, m_byte_order); - const CommandType command = KDP_IMAGEPATH; - const uint32_t command_length = 8; - MakeRequestPacketHeader (command, request_packet, command_length); - DataExtractor reply_packet; - if (SendRequestAndGetReply (command, request_packet, reply_packet)) - { - const char *path = reply_packet.PeekCStr(8); - if (path && path[0]) - m_kernel_version.assign (path); - return true; - } - return false; -} -#endif uint32_t CommunicationKDP::GetCPUMask() { if (!HostInfoIsValid()) From owner-svn-src-all@freebsd.org Sat Jan 6 21:56:15 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 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-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" 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-- From owner-svn-src-all@freebsd.org Sat Jan 6 22:56:49 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id A54C5DF7F85; Sat, 6 Jan 2018 22:56:49 +0000 (UTC) (envelope-from ian@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 80CB23606; Sat, 6 Jan 2018 22:56:49 +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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id BA66318BD7; Sat, 6 Jan 2018 22:56:48 +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 w06MumWQ001561; Sat, 6 Jan 2018 22:56:48 GMT (envelope-from ian@FreeBSD.org) Received: (from ian@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w06MumgA001560; Sat, 6 Jan 2018 22:56:48 GMT (envelope-from ian@FreeBSD.org) Message-Id: <201801062256.w06MumgA001560@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ian set sender to ian@FreeBSD.org using -f From: Ian Lepore Date: Sat, 6 Jan 2018 22:56:48 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r327651 - stable/11/sys/amd64/vmm/io X-SVN-Group: stable-11 X-SVN-Commit-Author: ian X-SVN-Commit-Paths: stable/11/sys/amd64/vmm/io X-SVN-Commit-Revision: 327651 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 06 Jan 2018 22:56:49 -0000 Author: ian Date: Sat Jan 6 22:56:48 2018 New Revision: 327651 URL: https://svnweb.freebsd.org/changeset/base/327651 Log: MFC r325108: Improve the performance of the hpet timer in bhyve guests by making the timer frequency a power of two. This changes the frequency from 10 to 16.7 MHz (2 ^ 24 HZ). Using a power of two avoids roundoff errors when doing arithmetic in sbintime_t units. Testing shows this can fix erratic ntpd behavior in guests using the hpet timer (which is the default for multicore guests). Modified: stable/11/sys/amd64/vmm/io/vhpet.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/amd64/vmm/io/vhpet.c ============================================================================== --- stable/11/sys/amd64/vmm/io/vhpet.c Sat Jan 6 21:37:23 2018 (r327650) +++ stable/11/sys/amd64/vmm/io/vhpet.c Sat Jan 6 22:56:48 2018 (r327651) @@ -51,7 +51,7 @@ __FBSDID("$FreeBSD$"); static MALLOC_DEFINE(M_VHPET, "vhpet", "bhyve virtual hpet"); -#define HPET_FREQ 10000000 /* 10.0 Mhz */ +#define HPET_FREQ 16777216 /* 16.7 (2^24) Mhz */ #define FS_PER_S 1000000000000000ul /* Timer N Configuration and Capabilities Register */ From owner-svn-src-all@freebsd.org Sat Jan 6 22:59:12 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 0CFF0DF8179; Sat, 6 Jan 2018 22:59:12 +0000 (UTC) (envelope-from jilles@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 D91DA3785; Sat, 6 Jan 2018 22:59:11 +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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 16F9418BD9; Sat, 6 Jan 2018 22:59:11 +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 w06MxAFb001697; Sat, 6 Jan 2018 22:59:10 GMT (envelope-from jilles@FreeBSD.org) Received: (from jilles@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w06MxAjp001695; Sat, 6 Jan 2018 22:59:10 GMT (envelope-from jilles@FreeBSD.org) Message-Id: <201801062259.w06MxAjp001695@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jilles set sender to jilles@FreeBSD.org using -f From: Jilles Tjoelker Date: Sat, 6 Jan 2018 22:59:10 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r327652 - stable/11/usr.sbin/nandtool X-SVN-Group: stable-11 X-SVN-Commit-Author: jilles X-SVN-Commit-Paths: stable/11/usr.sbin/nandtool X-SVN-Commit-Revision: 327652 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 06 Jan 2018 22:59:12 -0000 Author: jilles Date: Sat Jan 6 22:59:10 2018 New Revision: 327652 URL: https://svnweb.freebsd.org/changeset/base/327652 Log: MFC r327211: nandtool: Add missing mode for open() with O_CREAT If O_CREAT is given, open() needs a mode argument. Follow the umask by passing 0666. Modified: stable/11/usr.sbin/nandtool/nand_read.c stable/11/usr.sbin/nandtool/nand_readoob.c Directory Properties: stable/11/ (props changed) Modified: stable/11/usr.sbin/nandtool/nand_read.c ============================================================================== --- stable/11/usr.sbin/nandtool/nand_read.c Sat Jan 6 22:56:48 2018 (r327651) +++ stable/11/usr.sbin/nandtool/nand_read.c Sat Jan 6 22:59:10 2018 (r327652) @@ -50,7 +50,7 @@ int nand_read(struct cmd_param *params) } if ((out = param_get_string(params, "out"))) { - out_fd = open(out, O_WRONLY|O_CREAT); + out_fd = open(out, O_WRONLY|O_CREAT, 0666); if (out_fd == -1) { perrorf("Cannot open %s for writing", out); return (1); Modified: stable/11/usr.sbin/nandtool/nand_readoob.c ============================================================================== --- stable/11/usr.sbin/nandtool/nand_readoob.c Sat Jan 6 22:56:48 2018 (r327651) +++ stable/11/usr.sbin/nandtool/nand_readoob.c Sat Jan 6 22:59:10 2018 (r327652) @@ -57,7 +57,7 @@ int nand_read_oob(struct cmd_param *params) } if ((out = param_get_string(params, "out"))) { - if ((fd_out = open(out, O_WRONLY | O_CREAT)) == -1) { + if ((fd_out = open(out, O_WRONLY | O_CREAT, 0666)) == -1) { perrorf("Cannot open %s", out); ret = 1; goto out; From owner-svn-src-all@freebsd.org Sat Jan 6 23:04:15 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 6FA1DDF8643; Sat, 6 Jan 2018 23:04:15 +0000 (UTC) (envelope-from ian@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 49CC63D24; Sat, 6 Jan 2018 23:04:15 +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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 6189718D80; Sat, 6 Jan 2018 23:04: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 w06N4E9q005848; Sat, 6 Jan 2018 23:04:14 GMT (envelope-from ian@FreeBSD.org) Received: (from ian@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w06N4EFI005847; Sat, 6 Jan 2018 23:04:14 GMT (envelope-from ian@FreeBSD.org) Message-Id: <201801062304.w06N4EFI005847@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ian set sender to ian@FreeBSD.org using -f From: Ian Lepore Date: Sat, 6 Jan 2018 23:04:14 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r327653 - stable/11/sys/dev/iicbus X-SVN-Group: stable-11 X-SVN-Commit-Author: ian X-SVN-Commit-Paths: stable/11/sys/dev/iicbus X-SVN-Commit-Revision: 327653 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 06 Jan 2018 23:04:15 -0000 Author: ian Date: Sat Jan 6 23:04:14 2018 New Revision: 327653 URL: https://svnweb.freebsd.org/changeset/base/327653 Log: MFC r326750: Do not give up if writing to the chip's control and status registers fails during startup. When a brand new chip leaves the factory, it is in a special power-saving mode that disables most functions on the chip to save battery power. The chip is stuck in this mode until the first write to the time registers, which automatically clears the special power-saving mode and starts the oscillator. Also, the day-of-week register in this chip counts 1-7, not 0-6, so write the values accordingly. These changes are based on the patch submitted by Brian Scott, but I elimated warnings since this condition is expected, and added some comments, and so in general blame me for any mistakes. PR: 223642 Modified: stable/11/sys/dev/iicbus/ds3231.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/dev/iicbus/ds3231.c ============================================================================== --- stable/11/sys/dev/iicbus/ds3231.c Sat Jan 6 22:59:10 2018 (r327652) +++ stable/11/sys/dev/iicbus/ds3231.c Sat Jan 6 23:04:14 2018 (r327653) @@ -427,13 +427,19 @@ ds3231_start(void *xdev) device_printf(sc->sc_dev, "WARNING: RTC clock stopped, check the battery.\n"); } - /* Ack any pending alarm interrupt. */ - if (ds3231_status_write(sc, 1, 1) != 0) - return; - /* Always enable the oscillator. */ - if (ds3231_ctrl_write(sc) != 0) - return; + /* + * Ack any pending alarm interrupts and clear the EOSC bit to ensure the + * clock runs even when on battery power. Do not give up if these + * writes fail, because a factory-fresh chip is in a special mode that + * disables much of the chip to save battery power, and the only thing + * that gets it out of that mode is writing to the time registers. In + * these pristine chips, the EOSC and alarm bits are zero already, so + * the first valid write of time will get everything running properly. + */ + ds3231_status_write(sc, 1, 1); + ds3231_ctrl_write(sc); + /* Temperature. */ SYSCTL_ADD_PROC(ctx, tree, OID_AUTO, "temperature", CTLTYPE_INT | CTLFLAG_RD | CTLFLAG_MPSAFE, sc, 0, @@ -568,7 +574,7 @@ ds3231_settime(device_t dev, struct timespec *ts) data[DS3231_MINS] = TOBCD(ct.min); data[DS3231_HOUR] = TOBCD(ct.hour) | pmflags; data[DS3231_DATE] = TOBCD(ct.day); - data[DS3231_WEEKDAY] = ct.dow; + data[DS3231_WEEKDAY] = ct.dow + 1; data[DS3231_MONTH] = TOBCD(ct.mon); data[DS3231_YEAR] = TOBCD(ct.year % 100); if (sc->sc_last_c) From owner-svn-src-all@freebsd.org Sat Jan 6 23:12:34 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 00BDADF8CE3; Sat, 6 Jan 2018 23:12:34 +0000 (UTC) (envelope-from ian@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 CE89363515; Sat, 6 Jan 2018 23:12:33 +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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id E6D5F18F0E; Sat, 6 Jan 2018 23:12:32 +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 w06NCWIj009813; Sat, 6 Jan 2018 23:12:32 GMT (envelope-from ian@FreeBSD.org) Received: (from ian@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w06NCWY4009812; Sat, 6 Jan 2018 23:12:32 GMT (envelope-from ian@FreeBSD.org) Message-Id: <201801062312.w06NCWY4009812@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ian set sender to ian@FreeBSD.org using -f From: Ian Lepore Date: Sat, 6 Jan 2018 23:12:32 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r327654 - stable/11/sys/arm/broadcom/bcm2835 X-SVN-Group: stable-11 X-SVN-Commit-Author: ian X-SVN-Commit-Paths: stable/11/sys/arm/broadcom/bcm2835 X-SVN-Commit-Revision: 327654 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 06 Jan 2018 23:12:34 -0000 Author: ian Date: Sat Jan 6 23:12:32 2018 New Revision: 327654 URL: https://svnweb.freebsd.org/changeset/base/327654 Log: MFC r326924-r326925 r326924: Fix debugging output, fallout from something like s/read/readctl/g while renaming variables in a previous change. r326925: Do not attempt to refill the TX fifo if there is no data left to transfer. A comment in bcm_bsc_fill_tx_fifo() even lists sc_totlen > 0 as a precondition for calling the routine. I apparently forgot to make the code do what my comment said. Modified: stable/11/sys/arm/broadcom/bcm2835/bcm2835_bsc.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/arm/broadcom/bcm2835/bcm2835_bsc.c ============================================================================== --- stable/11/sys/arm/broadcom/bcm2835/bcm2835_bsc.c Sat Jan 6 23:04:14 2018 (r327653) +++ stable/11/sys/arm/broadcom/bcm2835/bcm2835_bsc.c Sat Jan 6 23:12:32 2018 (r327654) @@ -505,7 +505,7 @@ bcm_bsc_intr(void *arg) * transfer is complete; TXD will be asserted along with ERR or * DONE if there is room in the fifo. */ - if (status & BCM_BSC_STATUS_TXD) + if ((status & BCM_BSC_STATUS_TXD) && sc->sc_totlen > 0) bcm_bsc_fill_tx_fifo(sc); } @@ -607,7 +607,7 @@ bcm_bsc_transfer(device_t dev, struct iic_msg *msgs, u */ if (sc->sc_replen == 0) { DEVICE_DEBUGF(sc, 1, "%-6s 0x%02x len %d: ", - (curisread) ? "readctl" : "write", curslave, + (curisread) ? "read" : "write", curslave, sc->sc_totlen); curlen = sc->sc_totlen; if (curisread) { @@ -619,7 +619,7 @@ bcm_bsc_transfer(device_t dev, struct iic_msg *msgs, u } } else { DEVICE_DEBUGF(sc, 1, "%-6s 0x%02x len %d: ", - (curisread) ? "readctl" : "write", curslave, + (curisread) ? "read" : "write", curslave, sc->sc_replen); /* From owner-svn-src-all@freebsd.org Sat Jan 6 23:20:36 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id C51B4DF9309; Sat, 6 Jan 2018 23:20:36 +0000 (UTC) (envelope-from ian@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 9F44F6398E; Sat, 6 Jan 2018 23:20:36 +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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id D48CE18F23; Sat, 6 Jan 2018 23:20:35 +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 w06NKZMA010362; Sat, 6 Jan 2018 23:20:35 GMT (envelope-from ian@FreeBSD.org) Received: (from ian@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w06NKZkl010357; Sat, 6 Jan 2018 23:20:35 GMT (envelope-from ian@FreeBSD.org) Message-Id: <201801062320.w06NKZkl010357@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ian set sender to ian@FreeBSD.org using -f From: Ian Lepore Date: Sat, 6 Jan 2018 23:20:35 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r327655 - in stable/11: share/man/man4 sys/conf sys/dev/md X-SVN-Group: stable-11 X-SVN-Commit-Author: ian X-SVN-Commit-Paths: in stable/11: share/man/man4 sys/conf sys/dev/md X-SVN-Commit-Revision: 327655 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 06 Jan 2018 23:20:36 -0000 Author: ian Date: Sat Jan 6 23:20:35 2018 New Revision: 327655 URL: https://svnweb.freebsd.org/changeset/base/327655 Log: MFC r327032: Add a new kernel config option, MD_ROOT_READONLY, which forces on the MD_READONLY flag for the md device automatically instantiated during kernel init for an mdroot filesystem. Note that there is specifically and by design no tunable or sysctl control over this feature. Without this option, you already have control over whether the mdroot fs is writeable using vfs.root.mountfrom.options from loader(8), the root_rw_mount rcvar, and by using "mount -u[rw] /" or equivelent on the fly. This option is being added to provide a way to make the mdroot fs truly immutable before userland code begins running. Differential Revision: https://reviews.freebsd.org/D13411 Modified: stable/11/share/man/man4/md.4 stable/11/sys/conf/NOTES stable/11/sys/conf/options stable/11/sys/dev/md/md.c Directory Properties: stable/11/ (props changed) Modified: stable/11/share/man/man4/md.4 ============================================================================== --- stable/11/share/man/man4/md.4 Sat Jan 6 23:12:32 2018 (r327654) +++ stable/11/share/man/man4/md.4 Sat Jan 6 23:20:35 2018 (r327655) @@ -7,7 +7,7 @@ .\" .\" $FreeBSD$ .\" -.Dd November 5, 2017 +.Dd December 7, 2017 .Dt MD 4 .Os .Sh NAME @@ -79,7 +79,8 @@ To create a kernel with a ramdisk or MD file system, y needs the following options: .Bd -literal -offset indent options MD_ROOT # MD is a potential root device -options MD_ROOT_SIZE=8192 # 8MB ram disk +options MD_ROOT_READONLY # disallow mounting root writeable +options MD_ROOT_SIZE=8192 # 8MB ram disk makeoptions MFS_IMAGE=/h/foo/ARM-MD options ROOTDEVNAME=\\"ufs:md0\\" .Ed Modified: stable/11/sys/conf/NOTES ============================================================================== --- stable/11/sys/conf/NOTES Sat Jan 6 23:12:32 2018 (r327654) +++ stable/11/sys/conf/NOTES Sat Jan 6 23:20:35 2018 (r327655) @@ -1102,6 +1102,9 @@ options MD_ROOT_SIZE=10 # images of type mfs_root or md_root. options MD_ROOT +# Write-protect the md root device so that it may not be mounted writeable. +options MD_ROOT_READONLY + # Disk quotas are supported when this option is enabled. options QUOTA #enable disk quotas Modified: stable/11/sys/conf/options ============================================================================== --- stable/11/sys/conf/options Sat Jan 6 23:12:32 2018 (r327654) +++ stable/11/sys/conf/options Sat Jan 6 23:20:35 2018 (r327655) @@ -165,6 +165,7 @@ MAC_STUB opt_dontuse.h MAC_TEST opt_dontuse.h MD_ROOT opt_md.h MD_ROOT_FSTYPE opt_md.h +MD_ROOT_READONLY opt_md.h MD_ROOT_SIZE opt_md.h MFI_DEBUG opt_mfi.h MFI_DECODE_LOG opt_mfi.h Modified: stable/11/sys/dev/md/md.c ============================================================================== --- stable/11/sys/dev/md/md.c Sat Jan 6 23:12:32 2018 (r327654) +++ stable/11/sys/dev/md/md.c Sat Jan 6 23:20:35 2018 (r327655) @@ -1755,9 +1755,15 @@ md_preloaded(u_char *image, size_t length, const char sc->pl_ptr = image; sc->pl_len = length; sc->start = mdstart_preload; -#if defined(MD_ROOT) && !defined(ROOTDEVNAME) - if (sc->unit == 0) +#ifdef MD_ROOT + if (sc->unit == 0) { +#ifndef ROOTDEVNAME rootdevnames[0] = MD_ROOT_FSTYPE ":/dev/md0"; +#endif +#ifdef MD_ROOT_READONLY + sc->flags |= MD_READONLY; +#endif + } #endif mdinit(sc); if (name != NULL) { From owner-svn-src-all@freebsd.org Sat Jan 6 23:24:54 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 407C5DF971B; Sat, 6 Jan 2018 23:24:54 +0000 (UTC) (envelope-from ian@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 1A8BF63DB3; Sat, 6 Jan 2018 23:24:54 +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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4FAFB190AB; Sat, 6 Jan 2018 23:24:53 +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 w06NOrxk014477; Sat, 6 Jan 2018 23:24:53 GMT (envelope-from ian@FreeBSD.org) Received: (from ian@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w06NOrgQ014475; Sat, 6 Jan 2018 23:24:53 GMT (envelope-from ian@FreeBSD.org) Message-Id: <201801062324.w06NOrgQ014475@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ian set sender to ian@FreeBSD.org using -f From: Ian Lepore Date: Sat, 6 Jan 2018 23:24:53 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r327656 - stable/11/sys/arm/arm X-SVN-Group: stable-11 X-SVN-Commit-Author: ian X-SVN-Commit-Paths: stable/11/sys/arm/arm X-SVN-Commit-Revision: 327656 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 06 Jan 2018 23:24:54 -0000 Author: ian Date: Sat Jan 6 23:24:52 2018 New Revision: 327656 URL: https://svnweb.freebsd.org/changeset/base/327656 Log: MFC r327048-r327050 r327048: Restore the ability to use EARLY_PRINTF support during most of initarm(). The real kernel page tables are set up much earlier in initarm() now than they were when early printf support was first added, and they end up undoing the mapping made in locore.S for early printf support. This re-adds the mapping after switching to the new/real kernel page tables, making early printf work again right after switching to them. r327049: Allow pmap_kremove() to remove 1MB section mappings as well as 4K pages. This will allow it to undo temporary device mappings such as those made with pmap_preboot_map_attr(). Reviewed by: cognet r327050: If a temporary mapping is made to support EARLY_PRINTF, undo that mapping after cninit() runs, otherwise we leave a bogus device-memory mapping in userspace VA in the kernel pmap forever. Pointed out by: cognet Modified: stable/11/sys/arm/arm/machdep.c stable/11/sys/arm/arm/pmap-v6.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/arm/arm/machdep.c ============================================================================== --- stable/11/sys/arm/arm/machdep.c Sat Jan 6 23:20:35 2018 (r327655) +++ stable/11/sys/arm/arm/machdep.c Sat Jan 6 23:24:52 2018 (r327656) @@ -1115,6 +1115,19 @@ initarm(struct arm_boot_params *abp) pmap_bootstrap_prepare(lastaddr); /* + * If EARLY_PRINTF support is enabled, we need to re-establish the + * mapping after pmap_bootstrap_prepare() switches to new page tables. + * Note that we can only do the remapping if the VA is outside the + * kernel, now that we have real virtual (not VA=PA) mappings in effect. + * Early printf does not work between the time pmap_set_tex() does + * cp15_prrr_set() and this code remaps the VA. + */ +#if defined(EARLY_PRINTF) && defined(SOCDEV_PA) && defined(SOCDEV_VA) && SOCDEV_VA < KERNBASE + pmap_preboot_map_attr(SOCDEV_PA, SOCDEV_VA, 1024 * 1024, + VM_PROT_READ | VM_PROT_WRITE, VM_MEMATTR_DEVICE); +#endif + + /* * Now that proper page tables are installed, call cpu_setup() to enable * instruction and data caches and other chip-specific features. */ @@ -1176,6 +1189,14 @@ initarm(struct arm_boot_params *abp) OF_interpret("perform-fixup", 0); platform_gpio_init(); cninit(); + + /* + * If we made a mapping for EARLY_PRINTF after pmap_bootstrap_prepare(), + * undo it now that the normal console printf works. + */ +#if defined(EARLY_PRINTF) && defined(SOCDEV_PA) && defined(SOCDEV_VA) && SOCDEV_VA < KERNBASE + pmap_kremove(SOCDEV_VA); +#endif debugf("initarm: console initialized\n"); debugf(" arg1 kmdp = 0x%08x\n", (uint32_t)kmdp); Modified: stable/11/sys/arm/arm/pmap-v6.c ============================================================================== --- stable/11/sys/arm/arm/pmap-v6.c Sat Jan 6 23:20:35 2018 (r327655) +++ stable/11/sys/arm/arm/pmap-v6.c Sat Jan 6 23:24:52 2018 (r327656) @@ -1312,10 +1312,16 @@ pmap_kenter(vm_offset_t va, vm_paddr_t pa) PMAP_INLINE void pmap_kremove(vm_offset_t va) { + pt1_entry_t *pte1p; pt2_entry_t *pte2p; - pte2p = pt2map_entry(va); - pte2_clear(pte2p); + pte1p = kern_pte1(va); + if (pte1_is_section(pte1_load(pte1p))) { + pte1_clear(pte1p); + } else { + pte2p = pt2map_entry(va); + pte2_clear(pte2p); + } } /*