From owner-svn-src-stable-12@freebsd.org Mon Jan 20 01:38:03 2020 Return-Path: Delivered-To: svn-src-stable-12@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id C3601229FBC; Mon, 20 Jan 2020 01:38:03 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 481Dnl4lSRz3x2V; Mon, 20 Jan 2020 01:38:03 +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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 9E2CB1C19B; Mon, 20 Jan 2020 01:38:03 +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 00K1c3Kx011543; Mon, 20 Jan 2020 01:38:03 GMT (envelope-from markj@FreeBSD.org) Received: (from markj@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 00K1c330011542; Mon, 20 Jan 2020 01:38:03 GMT (envelope-from markj@FreeBSD.org) Message-Id: <202001200138.00K1c330011542@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: markj set sender to markj@FreeBSD.org using -f From: Mark Johnston Date: Mon, 20 Jan 2020 01:38:03 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r356903 - stable/12/usr.bin/diff X-SVN-Group: stable-12 X-SVN-Commit-Author: markj X-SVN-Commit-Paths: stable/12/usr.bin/diff X-SVN-Commit-Revision: 356903 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-12@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for only the 12-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 20 Jan 2020 01:38:03 -0000 Author: markj Date: Mon Jan 20 01:38:03 2020 New Revision: 356903 URL: https://svnweb.freebsd.org/changeset/base/356903 Log: MFC r356695, r356731: Optimize diff -q. PR: 242828 Modified: stable/12/usr.bin/diff/diffreg.c Directory Properties: stable/12/ (props changed) Modified: stable/12/usr.bin/diff/diffreg.c ============================================================================== --- stable/12/usr.bin/diff/diffreg.c Sun Jan 19 23:47:32 2020 (r356902) +++ stable/12/usr.bin/diff/diffreg.c Mon Jan 20 01:38:03 2020 (r356903) @@ -349,6 +349,11 @@ diffreg(char *file1, char *file2, int flags, int capsi goto closem; } + if (diff_format == D_BRIEF && ignore_pats == NULL) { + rval = D_DIFFER; + status |= 1; + goto closem; + } if ((flags & D_FORCEASCII) == 0 && (!asciifile(f1) || !asciifile(f2))) { rval = D_BINARY; From owner-svn-src-stable-12@freebsd.org Mon Jan 20 08:55:28 2020 Return-Path: Delivered-To: svn-src-stable-12@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 5A3B41F2D81; Mon, 20 Jan 2020 08:55:28 +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.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 481QVS1hRLz4GPd; Mon, 20 Jan 2020 08:55:28 +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 30C3E211F7; Mon, 20 Jan 2020 08:55:28 +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 00K8tS36074407; Mon, 20 Jan 2020 08:55:28 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 00K8tRIV074405; Mon, 20 Jan 2020 08:55:27 GMT (envelope-from kib@FreeBSD.org) Message-Id: <202001200855.00K8tRIV074405@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Mon, 20 Jan 2020 08:55:27 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r356906 - in stable/12/sys: compat/linuxkpi/common/src kern X-SVN-Group: stable-12 X-SVN-Commit-Author: kib X-SVN-Commit-Paths: in stable/12/sys: compat/linuxkpi/common/src kern X-SVN-Commit-Revision: 356906 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-12@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for only the 12-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 20 Jan 2020 08:55:28 -0000 Author: kib Date: Mon Jan 20 08:55:27 2020 New Revision: 356906 URL: https://svnweb.freebsd.org/changeset/base/356906 Log: MFC r356682: Code must not unlock a mutex while owning the thread lock. Modified: stable/12/sys/compat/linuxkpi/common/src/linux_rcu.c stable/12/sys/kern/subr_epoch.c Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/compat/linuxkpi/common/src/linux_rcu.c ============================================================================== --- stable/12/sys/compat/linuxkpi/common/src/linux_rcu.c Mon Jan 20 08:28:54 2020 (r356905) +++ stable/12/sys/compat/linuxkpi/common/src/linux_rcu.c Mon Jan 20 08:55:27 2020 (r356906) @@ -297,14 +297,13 @@ linux_synchronize_rcu(void) "linux_synchronize_rcu() can sleep"); td = curthread; + DROP_GIANT(); /* * Synchronizing RCU might change the CPU core this function * is running on. Save current values: */ thread_lock(td); - - DROP_GIANT(); old_cpu = PCPU_GET(cpuid); old_pinned = td->td_pinned; Modified: stable/12/sys/kern/subr_epoch.c ============================================================================== --- stable/12/sys/kern/subr_epoch.c Mon Jan 20 08:28:54 2020 (r356905) +++ stable/12/sys/kern/subr_epoch.c Mon Jan 20 08:55:27 2020 (r356906) @@ -499,8 +499,8 @@ epoch_wait_preempt(epoch_t epoch) KASSERT(!in_epoch(epoch), ("epoch_wait_preempt() called in the middle " "of an epoch section of the same epoch")); #endif - thread_lock(td); DROP_GIANT(); + thread_lock(td); old_cpu = PCPU_GET(cpuid); old_pinned = td->td_pinned; From owner-svn-src-stable-12@freebsd.org Mon Jan 20 11:19:56 2020 Return-Path: Delivered-To: svn-src-stable-12@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 8AF8F1F652D; Mon, 20 Jan 2020 11:19:56 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 481Tj82ySjz4NNg; Mon, 20 Jan 2020 11:19:56 +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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 5CA2622BD5; Mon, 20 Jan 2020 11:19:56 +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 00KBJuOp058209; Mon, 20 Jan 2020 11:19:56 GMT (envelope-from jhb@FreeBSD.org) Received: (from jhb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 00KBJuRl058208; Mon, 20 Jan 2020 11:19:56 GMT (envelope-from jhb@FreeBSD.org) Message-Id: <202001201119.00KBJuRl058208@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jhb set sender to jhb@FreeBSD.org using -f From: John Baldwin Date: Mon, 20 Jan 2020 11:19:56 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r356908 - in stable: 11/sys/opencrypto 12/sys/opencrypto X-SVN-Group: stable-12 X-SVN-Commit-Author: jhb X-SVN-Commit-Paths: in stable: 11/sys/opencrypto 12/sys/opencrypto X-SVN-Commit-Revision: 356908 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-12@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for only the 12-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 20 Jan 2020 11:19:56 -0000 Author: jhb Date: Mon Jan 20 11:19:55 2020 New Revision: 356908 URL: https://svnweb.freebsd.org/changeset/base/356908 Log: MFC 356507,356520: Add a reference count to cryptodev sessions. 356507: Add a reference count to cryptodev sessions. This prevents use-after-free races with crypto requests (which may sleep) and CIOCFSESSION as well as races from current CIOCFSESSION requests. 356520: Remove no-longer-used function prototype. admbugs: 949 Sponsored by: Chelsio Communications Modified: stable/12/sys/opencrypto/cryptodev.c Directory Properties: stable/12/ (props changed) Changes in other areas also in this revision: Modified: stable/11/sys/opencrypto/cryptodev.c Directory Properties: stable/11/ (props changed) Modified: stable/12/sys/opencrypto/cryptodev.c ============================================================================== --- stable/12/sys/opencrypto/cryptodev.c Mon Jan 20 09:16:06 2020 (r356907) +++ stable/12/sys/opencrypto/cryptodev.c Mon Jan 20 11:19:55 2020 (r356908) @@ -266,6 +266,7 @@ crypt_kop_to_32(const struct crypt_kop *from, struct c struct csession { TAILQ_ENTRY(csession) next; crypto_session_t cses; + volatile u_int refs; u_int32_t ses; struct mtx lock; /* for op submission */ @@ -292,6 +293,7 @@ struct cryptop_data { struct fcrypt { TAILQ_HEAD(csessionlist, csession) csessions; int sesn; + struct mtx lock; }; static struct timeval warninterval = { .tv_sec = 60, .tv_usec = 0 }; @@ -323,8 +325,7 @@ static struct fileops cryptofops = { }; static struct csession *csefind(struct fcrypt *, u_int); -static int csedelete(struct fcrypt *, struct csession *); -static struct csession *cseadd(struct fcrypt *, struct csession *); +static bool csedelete(struct fcrypt *, u_int); static struct csession *csecreate(struct fcrypt *, crypto_session_t, caddr_t, u_int64_t, caddr_t, u_int64_t, u_int32_t, u_int32_t, struct enc_xform *, struct auth_hash *); @@ -668,13 +669,10 @@ bail: break; case CIOCFSESSION: ses = *(u_int32_t *)data; - cse = csefind(fcr, ses); - if (cse == NULL) { + if (!csedelete(fcr, ses)) { SDT_PROBE1(opencrypto, dev, ioctl, error, __LINE__); return (EINVAL); } - csedelete(fcr, cse); - csefree(cse); break; case CIOCCRYPT: #ifdef COMPAT_FREEBSD32 @@ -691,6 +689,7 @@ bail: return (EINVAL); } error = cryptodev_op(cse, cop, active_cred, td); + csefree(cse); #ifdef COMPAT_FREEBSD32 if (error == 0 && cmd == CIOCCRYPT32) crypt_op_to_32(cop, data); @@ -757,6 +756,7 @@ bail: return (EINVAL); } error = cryptodev_aead(cse, caead, active_cred, td); + csefree(cse); break; default: error = EINVAL; @@ -1375,6 +1375,9 @@ cryptof_close(struct file *fp, struct thread *td) while ((cse = TAILQ_FIRST(&fcr->csessions))) { TAILQ_REMOVE(&fcr->csessions, cse, next); + KASSERT(cse->refs == 1, + ("%s: crypto session %p with %d refs", __func__, cse, + cse->refs)); csefree(cse); } free(fcr, M_XDATA); @@ -1395,34 +1398,36 @@ csefind(struct fcrypt *fcr, u_int ses) { struct csession *cse; - TAILQ_FOREACH(cse, &fcr->csessions, next) - if (cse->ses == ses) + mtx_lock(&fcr->lock); + TAILQ_FOREACH(cse, &fcr->csessions, next) { + if (cse->ses == ses) { + refcount_acquire(&cse->refs); + mtx_unlock(&fcr->lock); return (cse); + } + } + mtx_unlock(&fcr->lock); return (NULL); } -static int -csedelete(struct fcrypt *fcr, struct csession *cse_del) +static bool +csedelete(struct fcrypt *fcr, u_int ses) { struct csession *cse; + mtx_lock(&fcr->lock); TAILQ_FOREACH(cse, &fcr->csessions, next) { - if (cse == cse_del) { + if (cse->ses == ses) { TAILQ_REMOVE(&fcr->csessions, cse, next); - return (1); + mtx_unlock(&fcr->lock); + csefree(cse); + return (true); } } - return (0); + mtx_unlock(&fcr->lock); + return (false); } -static struct csession * -cseadd(struct fcrypt *fcr, struct csession *cse) -{ - TAILQ_INSERT_TAIL(&fcr->csessions, cse, next); - cse->ses = fcr->sesn++; - return (cse); -} - struct csession * csecreate(struct fcrypt *fcr, crypto_session_t cses, caddr_t key, u_int64_t keylen, caddr_t mackey, u_int64_t mackeylen, u_int32_t cipher, u_int32_t mac, @@ -1434,6 +1439,7 @@ csecreate(struct fcrypt *fcr, crypto_session_t cses, c if (cse == NULL) return NULL; mtx_init(&cse->lock, "cryptodev", "crypto session lock", MTX_DEF); + refcount_init(&cse->refs, 1); cse->key = key; cse->keylen = keylen/8; cse->mackey = mackey; @@ -1443,7 +1449,10 @@ csecreate(struct fcrypt *fcr, crypto_session_t cses, c cse->mac = mac; cse->txform = txform; cse->thash = thash; - cseadd(fcr, cse); + mtx_lock(&fcr->lock); + TAILQ_INSERT_TAIL(&fcr->csessions, cse, next); + cse->ses = fcr->sesn++; + mtx_unlock(&fcr->lock); return (cse); } @@ -1451,6 +1460,8 @@ static void csefree(struct csession *cse) { + if (!refcount_release(&cse->refs)) + return; crypto_freesession(cse->cses); mtx_destroy(&cse->lock); if (cse->key) @@ -1487,13 +1498,14 @@ cryptoioctl(struct cdev *dev, u_long cmd, caddr_t data switch (cmd) { case CRIOGET: - fcr = malloc(sizeof(struct fcrypt), M_XDATA, M_WAITOK); + fcr = malloc(sizeof(struct fcrypt), M_XDATA, M_WAITOK | M_ZERO); TAILQ_INIT(&fcr->csessions); - fcr->sesn = 0; + mtx_init(&fcr->lock, "fcrypt", NULL, MTX_DEF); error = falloc(td, &f, &fd, 0); if (error) { + mtx_destroy(&fcr->lock); free(fcr, M_XDATA); return (error); } From owner-svn-src-stable-12@freebsd.org Mon Jan 20 11:54:01 2020 Return-Path: Delivered-To: svn-src-stable-12@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 2032E1F7132; Mon, 20 Jan 2020 11:54:01 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 481VST00H6z4Q78; Mon, 20 Jan 2020 11:54:01 +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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id EF2172335B; Mon, 20 Jan 2020 11:54: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 00KBs0ZM081664; Mon, 20 Jan 2020 11:54:00 GMT (envelope-from jhb@FreeBSD.org) Received: (from jhb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 00KBs0tT081663; Mon, 20 Jan 2020 11:54:00 GMT (envelope-from jhb@FreeBSD.org) Message-Id: <202001201154.00KBs0tT081663@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jhb set sender to jhb@FreeBSD.org using -f From: John Baldwin Date: Mon, 20 Jan 2020 11:54:00 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r356911 - stable/12/sys/opencrypto X-SVN-Group: stable-12 X-SVN-Commit-Author: jhb X-SVN-Commit-Paths: stable/12/sys/opencrypto X-SVN-Commit-Revision: 356911 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-12@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for only the 12-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 20 Jan 2020 11:54:01 -0000 Author: jhb Date: Mon Jan 20 11:54:00 2020 New Revision: 356911 URL: https://svnweb.freebsd.org/changeset/base/356911 Log: MFC 356561: Add stricter checking on mac key lengths. Negative lengths are always invalid. The key length should also be zero for hash algorithms that do not accept a key. admbugs: 949 Modified: stable/12/sys/opencrypto/cryptodev.c Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/opencrypto/cryptodev.c ============================================================================== --- stable/12/sys/opencrypto/cryptodev.c Mon Jan 20 11:45:18 2020 (r356910) +++ stable/12/sys/opencrypto/cryptodev.c Mon Jan 20 11:54:00 2020 (r356911) @@ -585,8 +585,8 @@ cryptof_ioctl( if (thash) { cria.cri_alg = thash->type; cria.cri_klen = sop->mackeylen * 8; - if (thash->keysize != 0 && - sop->mackeylen > thash->keysize) { + if (sop->mackeylen > thash->keysize || + sop->mackeylen < 0) { CRYPTDEB("invalid mac key length"); error = EINVAL; SDT_PROBE1(opencrypto, dev, ioctl, error, From owner-svn-src-stable-12@freebsd.org Mon Jan 20 13:46:12 2020 Return-Path: Delivered-To: svn-src-stable-12@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 70C711FA839; Mon, 20 Jan 2020 13:46:12 +0000 (UTC) (envelope-from cy@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 481Xxw2xjgz4X38; Mon, 20 Jan 2020 13:46:12 +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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 601CB2479E; Mon, 20 Jan 2020 13:46:12 +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 00KDkC3X056539; Mon, 20 Jan 2020 13:46:12 GMT (envelope-from cy@FreeBSD.org) Received: (from cy@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 00KDkBgN056533; Mon, 20 Jan 2020 13:46:11 GMT (envelope-from cy@FreeBSD.org) Message-Id: <202001201346.00KDkBgN056533@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: cy set sender to cy@FreeBSD.org using -f From: Cy Schubert Date: Mon, 20 Jan 2020 13:46:11 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r356914 - in stable: 11/contrib/unbound 11/lib/libunbound 11/usr.sbin/unbound 11/usr.sbin/unbound/anchor 11/usr.sbin/unbound/checkconf 11/usr.sbin/unbound/control 11/usr.sbin/unbound/da... X-SVN-Group: stable-12 X-SVN-Commit-Author: cy X-SVN-Commit-Paths: in stable: 11/contrib/unbound 11/lib/libunbound 11/usr.sbin/unbound 11/usr.sbin/unbound/anchor 11/usr.sbin/unbound/checkconf 11/usr.sbin/unbound/control 11/usr.sbin/unbound/daemon 12/contrib/unbound 1... X-SVN-Commit-Revision: 356914 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-12@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for only the 12-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 20 Jan 2020 13:46:12 -0000 Author: cy Date: Mon Jan 20 13:46:09 2020 New Revision: 356914 URL: https://svnweb.freebsd.org/changeset/base/356914 Log: MFC r356676: Unbound's config.h is manually maintained, using a ./configure produced config.h as a guide. In practice contributed software maintains a copy of config.h within its build directory tree containing its Makefile. usr.sbin/unbound is the home for its config.h. Differential Revision: https://reviews.freebsd.org/D22983 Added: stable/12/usr.sbin/unbound/config.h - copied unchanged from r356676, head/usr.sbin/unbound/config.h Deleted: stable/12/contrib/unbound/config.h Modified: stable/12/lib/libunbound/Makefile stable/12/usr.sbin/unbound/anchor/Makefile stable/12/usr.sbin/unbound/checkconf/Makefile stable/12/usr.sbin/unbound/control/Makefile stable/12/usr.sbin/unbound/daemon/Makefile Directory Properties: stable/12/ (props changed) Changes in other areas also in this revision: Added: stable/11/usr.sbin/unbound/config.h (contents, props changed) - copied, changed from r356913, stable/11/contrib/unbound/config.h Deleted: stable/11/contrib/unbound/config.h Modified: stable/11/lib/libunbound/Makefile stable/11/usr.sbin/unbound/anchor/Makefile stable/11/usr.sbin/unbound/checkconf/Makefile stable/11/usr.sbin/unbound/control/Makefile stable/11/usr.sbin/unbound/daemon/Makefile Directory Properties: stable/11/ (props changed) Modified: stable/12/lib/libunbound/Makefile ============================================================================== --- stable/12/lib/libunbound/Makefile Mon Jan 20 12:53:02 2020 (r356913) +++ stable/12/lib/libunbound/Makefile Mon Jan 20 13:46:09 2020 (r356914) @@ -13,6 +13,7 @@ PRIVATELIB= PACKAGE= unbound CFLAGS+= -I${UNBOUNDDIR} -I${LDNSDIR} -I${.OBJDIR} +CFLAGS+= -I${SRCTOP}/usr.sbin/unbound SRCS= alloc.c as112.c authzone.c autotrust.c cachedb.c config_file.c \ configlexer.l configparser.y context.c dname.c dns.c dns64.c \ Modified: stable/12/usr.sbin/unbound/anchor/Makefile ============================================================================== --- stable/12/usr.sbin/unbound/anchor/Makefile Mon Jan 20 12:53:02 2020 (r356913) +++ stable/12/usr.sbin/unbound/anchor/Makefile Mon Jan 20 13:46:09 2020 (r356914) @@ -10,6 +10,7 @@ EXPATDIR= ${SRCTOP}/contrib/expat PROG= local-unbound-anchor SRCS= unbound-anchor.c CFLAGS+= -I${UNBOUNDDIR} -I${LDNSDIR} -I${EXPATDIR}/lib +CFLAGS+= -I${.CURDIR:H} -I${.CURDIR} LIBADD= unbound bsdxml ssl crypto pthread MAN= local-unbound-anchor.8 Modified: stable/12/usr.sbin/unbound/checkconf/Makefile ============================================================================== --- stable/12/usr.sbin/unbound/checkconf/Makefile Mon Jan 20 12:53:02 2020 (r356913) +++ stable/12/usr.sbin/unbound/checkconf/Makefile Mon Jan 20 13:46:09 2020 (r356914) @@ -9,6 +9,7 @@ UNBOUNDDIR= ${SRCTOP}/contrib/unbound PROG= local-unbound-checkconf SRCS= ub_event.c unbound-checkconf.c worker_cb.c CFLAGS+= -I${UNBOUNDDIR} -I${LDNSDIR} +CFLAGS+= -I${.CURDIR:H} -I${.CURDIR} LIBADD= unbound pthread MAN= local-unbound-checkconf.8 Copied: stable/12/usr.sbin/unbound/config.h (from r356676, head/usr.sbin/unbound/config.h) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/12/usr.sbin/unbound/config.h Mon Jan 20 13:46:09 2020 (r356914, copy of r356676, head/usr.sbin/unbound/config.h) @@ -0,0 +1,1338 @@ +/* config.h. Generated from config.h.in by configure. */ +/* config.h.in. Generated from configure.ac by autoheader. */ +/* $FreeBSD$ */ + +/* apply the noreturn attribute to a function that exits the program */ +#define ATTR_NORETURN __attribute__((__noreturn__)) + +/* apply the weak attribute to a symbol */ +#define ATTR_WEAK __attribute__((weak)) + +/* Directory to chroot to */ +#define CHROOT_DIR "/var/unbound" + +/* Define this to enable client subnet option. */ +/* #undef CLIENT_SUBNET */ + +/* Do sha512 definitions in config.h */ +/* #undef COMPAT_SHA512 */ + +/* Command line arguments used with configure */ +#define CONFCMDLINE "--with-ssl=/usr --with-libexpat=/usr --disable-dnscrypt --disable-dnstap --enable-ecdsa --disable-event-api --enable-gost --with-libevent --disable-subnet --disable-tfo-client --disable-tfo-server --with-pthreads--prefix=/usr --localstatedir=/var/unbound --mandir=/usr/share/man --build=freebsd" + +/* Pathname to the Unbound configuration file */ +#define CONFIGFILE "/var/unbound/unbound.conf" + +/* Define this if on macOSX10.4-darwin8 and setreuid and setregid do not work + */ +/* #undef DARWIN_BROKEN_SETREUID */ + +/* Whether daemon is deprecated */ +/* #undef DEPRECATED_DAEMON */ + +/* default dnstap socket path */ +/* #undef DNSTAP_SOCKET_PATH */ + +/* Define if you want to use debug lock checking (slow). */ +/* #undef ENABLE_LOCK_CHECKS */ + +/* Define this if you enabled-allsymbols from libunbound to link binaries to + it for smaller install size, but the libunbound export table is polluted by + internal symbols */ +/* #undef EXPORT_ALL_SYMBOLS */ + +/* Define to 1 if you have the `accept4' function. */ +#define HAVE_ACCEPT4 1 + +/* Define to 1 if you have the `arc4random' function. */ +#define HAVE_ARC4RANDOM 1 + +/* Define to 1 if you have the `arc4random_uniform' function. */ +#define HAVE_ARC4RANDOM_UNIFORM 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_ARPA_INET_H 1 + +/* Whether the C compiler accepts the "format" attribute */ +#define HAVE_ATTR_FORMAT 1 + +/* Whether the C compiler accepts the "noreturn" attribute */ +#define HAVE_ATTR_NORETURN 1 + +/* Whether the C compiler accepts the "unused" attribute */ +#define HAVE_ATTR_UNUSED 1 + +/* Whether the C compiler accepts the "weak" attribute */ +#define HAVE_ATTR_WEAK 1 + +/* Define to 1 if you have the `chown' function. */ +#define HAVE_CHOWN 1 + +/* Define to 1 if you have the `chroot' function. */ +#define HAVE_CHROOT 1 + +/* Define to 1 if you have the `CRYPTO_cleanup_all_ex_data' function. */ +/* #undef HAVE_CRYPTO_CLEANUP_ALL_EX_DATA */ + +/* Define to 1 if you have the `CRYPTO_THREADID_set_callback' function. */ +/* #undef HAVE_CRYPTO_THREADID_SET_CALLBACK */ + +/* Define to 1 if you have the `ctime_r' function. */ +#define HAVE_CTIME_R 1 + +/* Define to 1 if you have the `daemon' function. */ +#define HAVE_DAEMON 1 + +/* Define to 1 if you have the declaration of `arc4random', and to 0 if you + don't. */ +/* #undef HAVE_DECL_ARC4RANDOM */ + +/* Define to 1 if you have the declaration of `arc4random_uniform', and to 0 + if you don't. */ +/* #undef HAVE_DECL_ARC4RANDOM_UNIFORM */ + +/* Define to 1 if you have the declaration of `evsignal_assign', and to 0 if + you don't. */ +/* #undef HAVE_DECL_EVSIGNAL_ASSIGN */ + +/* Define to 1 if you have the declaration of `inet_ntop', and to 0 if you + don't. */ +#define HAVE_DECL_INET_NTOP 1 + +/* Define to 1 if you have the declaration of `inet_pton', and to 0 if you + don't. */ +#define HAVE_DECL_INET_PTON 1 + +/* Define to 1 if you have the declaration of `NID_ED25519', and to 0 if you + don't. */ +#define HAVE_DECL_NID_ED25519 1 + +/* Define to 1 if you have the declaration of `NID_ED448', and to 0 if you + don't. */ +#define HAVE_DECL_NID_ED448 1 + +/* Define to 1 if you have the declaration of `NID_secp384r1', and to 0 if you + don't. */ +#define HAVE_DECL_NID_SECP384R1 1 + +/* Define to 1 if you have the declaration of `NID_X9_62_prime256v1', and to 0 + if you don't. */ +#define HAVE_DECL_NID_X9_62_PRIME256V1 1 + +/* Define to 1 if you have the declaration of `reallocarray', and to 0 if you + don't. */ +#define HAVE_DECL_REALLOCARRAY 1 + +/* Define to 1 if you have the declaration of `redisConnect', and to 0 if you + don't. */ +/* #undef HAVE_DECL_REDISCONNECT */ + +/* Define to 1 if you have the declaration of `sk_SSL_COMP_pop_free', and to 0 + if you don't. */ +#define HAVE_DECL_SK_SSL_COMP_POP_FREE 1 + +/* Define to 1 if you have the declaration of + `SSL_COMP_get_compression_methods', and to 0 if you don't. */ +#define HAVE_DECL_SSL_COMP_GET_COMPRESSION_METHODS 1 + +/* Define to 1 if you have the declaration of `SSL_CTX_set_ecdh_auto', and to + 0 if you don't. */ +#define HAVE_DECL_SSL_CTX_SET_ECDH_AUTO 1 + +/* Define to 1 if you have the declaration of `strlcat', and to 0 if you + don't. */ +/* #undef HAVE_DECL_STRLCAT */ + +/* Define to 1 if you have the declaration of `strlcpy', and to 0 if you + don't. */ +/* #undef HAVE_DECL_STRLCPY */ + +/* Define to 1 if you have the declaration of `XML_StopParser', and to 0 if + you don't. */ +#define HAVE_DECL_XML_STOPPARSER 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_DLFCN_H 1 + +/* Define to 1 if you have the `DSA_SIG_set0' function. */ +#define HAVE_DSA_SIG_SET0 1 + +/* Define to 1 if you have the header file. */ +/* #undef HAVE_ENDIAN_H */ + +/* Define to 1 if you have the `endprotoent' function. */ +#define HAVE_ENDPROTOENT 1 + +/* Define to 1 if you have the `endpwent' function. */ +#define HAVE_ENDPWENT 1 + +/* Define to 1 if you have the `endservent' function. */ +#define HAVE_ENDSERVENT 1 + +/* Define to 1 if you have the `ERR_free_strings' function. */ +/* #undef HAVE_ERR_FREE_STRINGS */ + +/* Define to 1 if you have the `ERR_load_crypto_strings' function. */ +/* #undef HAVE_ERR_LOAD_CRYPTO_STRINGS */ + +/* Define to 1 if you have the `event_assign' function. */ +/* #undef HAVE_EVENT_ASSIGN */ + +/* Define to 1 if you have the `event_base_free' function. */ +/* #undef HAVE_EVENT_BASE_FREE */ + +/* Define to 1 if you have the `event_base_get_method' function. */ +/* #undef HAVE_EVENT_BASE_GET_METHOD */ + +/* Define to 1 if you have the `event_base_new' function. */ +/* #undef HAVE_EVENT_BASE_NEW */ + +/* Define to 1 if you have the `event_base_once' function. */ +/* #undef HAVE_EVENT_BASE_ONCE */ + +/* Define to 1 if you have the header file. */ +/* #undef HAVE_EVENT_H */ + +/* Define to 1 if you have the `EVP_aes_256_cbc' function. */ +#define HAVE_EVP_AES_256_CBC 1 + +/* Define to 1 if you have the `EVP_cleanup' function. */ +/* #undef HAVE_EVP_CLEANUP */ + +/* Define to 1 if you have the `EVP_DigestVerify' function. */ +#define HAVE_EVP_DIGESTVERIFY 1 + +/* Define to 1 if you have the `EVP_dss1' function. */ +/* #undef HAVE_EVP_DSS1 */ + +/* Define to 1 if you have the `EVP_EncryptInit_ex' function. */ +#define HAVE_EVP_ENCRYPTINIT_EX 1 + +/* Define to 1 if you have the `EVP_MD_CTX_new' function. */ +#define HAVE_EVP_MD_CTX_NEW 1 + +/* Define to 1 if you have the `EVP_sha1' function. */ +#define HAVE_EVP_SHA1 1 + +/* Define to 1 if you have the `EVP_sha256' function. */ +#define HAVE_EVP_SHA256 1 + +/* Define to 1 if you have the `EVP_sha512' function. */ +#define HAVE_EVP_SHA512 1 + +/* Define to 1 if you have the `ev_default_loop' function. */ +/* #undef HAVE_EV_DEFAULT_LOOP */ + +/* Define to 1 if you have the `ev_loop' function. */ +/* #undef HAVE_EV_LOOP */ + +/* Define to 1 if you have the header file. */ +#define HAVE_EXPAT_H 1 + +/* Define to 1 if you have the `explicit_bzero' function. */ +#define HAVE_EXPLICIT_BZERO 1 + +/* Define to 1 if you have the `fcntl' function. */ +#define HAVE_FCNTL 1 + +/* Define to 1 if you have the `FIPS_mode' function. */ +#define HAVE_FIPS_MODE 1 + +/* Define to 1 if you have the `fork' function. */ +#define HAVE_FORK 1 + +/* Define to 1 if fseeko (and presumably ftello) exists and is declared. */ +#define HAVE_FSEEKO 1 + +/* Define to 1 if you have the `fsync' function. */ +#define HAVE_FSYNC 1 + +/* Whether getaddrinfo is available */ +#define HAVE_GETADDRINFO 1 + +/* Define to 1 if you have the `getauxval' function. */ +/* #undef HAVE_GETAUXVAL */ + +/* Define to 1 if you have the `getentropy' function. */ +/* #undef HAVE_GETENTROPY */ + +/* Define to 1 if you have the header file. */ +#define HAVE_GETOPT_H 1 + +/* Define to 1 if you have the `getpwnam' function. */ +#define HAVE_GETPWNAM 1 + +/* Define to 1 if you have the `getrlimit' function. */ +#define HAVE_GETRLIMIT 1 + +/* Define to 1 if you have the `glob' function. */ +#define HAVE_GLOB 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_GLOB_H 1 + +/* Define to 1 if you have the `gmtime_r' function. */ +#define HAVE_GMTIME_R 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_GRP_H 1 + +/* Define to 1 if you have the header file. */ +/* #undef HAVE_HIREDIS_HIREDIS_H */ + +/* Define to 1 if you have the `HMAC_Init_ex' function. */ +#define HAVE_HMAC_INIT_EX 1 + +/* If you have HMAC_Update */ +#define HAVE_HMAC_UPDATE 1 + +/* Define to 1 if you have the `inet_aton' function. */ +#define HAVE_INET_ATON 1 + +/* Define to 1 if you have the `inet_ntop' function. */ +#define HAVE_INET_NTOP 1 + +/* Define to 1 if you have the `inet_pton' function. */ +#define HAVE_INET_PTON 1 + +/* Define to 1 if you have the `initgroups' function. */ +#define HAVE_INITGROUPS 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_INTTYPES_H 1 + +/* if the function 'ioctlsocket' is available */ +/* #undef HAVE_IOCTLSOCKET */ + +/* Define to 1 if you have the header file. */ +/* #undef HAVE_IPHLPAPI_H */ + +/* Define to 1 if you have the `isblank' function. */ +#define HAVE_ISBLANK 1 + +/* Define to 1 if you have the `kill' function. */ +#define HAVE_KILL 1 + +/* Define to 1 if you have the header file. */ +/* #undef HAVE_LIBKERN_OSBYTEORDER_H */ + +/* Define if we have LibreSSL */ +/* #undef HAVE_LIBRESSL */ + +/* Define to 1 if you have the `localtime_r' function. */ +#define HAVE_LOCALTIME_R 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_LOGIN_CAP_H 1 + +/* If have GNU libc compatible malloc */ +#define HAVE_MALLOC 1 + +/* Define to 1 if you have the `memmove' function. */ +#define HAVE_MEMMOVE 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_MEMORY_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_NETDB_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_NETINET_IN_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_NETINET_TCP_H 1 + +/* Use libnettle for crypto */ +/* #undef HAVE_NETTLE */ + +/* Define to 1 if you have the header file. */ +/* #undef HAVE_NETTLE_DSA_COMPAT_H */ + +/* Define to 1 if you have the header file. */ +/* #undef HAVE_NETTLE_EDDSA_H */ + +/* Use libnss for crypto */ +/* #undef HAVE_NSS */ + +/* Define to 1 if you have the `OpenSSL_add_all_digests' function. */ +/* #undef HAVE_OPENSSL_ADD_ALL_DIGESTS */ + +/* Define to 1 if you have the header file. */ +#define HAVE_OPENSSL_BN_H 1 + +/* Define to 1 if you have the `OPENSSL_config' function. */ +#define HAVE_OPENSSL_CONFIG 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_OPENSSL_CONF_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_OPENSSL_DH_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_OPENSSL_DSA_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_OPENSSL_ENGINE_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_OPENSSL_ERR_H 1 + +/* Define to 1 if you have the `OPENSSL_init_crypto' function. */ +#define HAVE_OPENSSL_INIT_CRYPTO 1 + +/* Define to 1 if you have the `OPENSSL_init_ssl' function. */ +#define HAVE_OPENSSL_INIT_SSL 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_OPENSSL_RAND_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_OPENSSL_RSA_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_OPENSSL_SSL_H 1 + +/* Define if you have POSIX threads libraries and header files. */ +#define HAVE_PTHREAD 1 + +/* Have PTHREAD_PRIO_INHERIT. */ +#define HAVE_PTHREAD_PRIO_INHERIT 1 + +/* Define to 1 if the system has the type `pthread_rwlock_t'. */ +#define HAVE_PTHREAD_RWLOCK_T 1 + +/* Define to 1 if the system has the type `pthread_spinlock_t'. */ +#define HAVE_PTHREAD_SPINLOCK_T 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_PWD_H 1 + +/* Define if you have Python libraries and header files. */ +/* #undef HAVE_PYTHON */ + +/* Define to 1 if you have the `random' function. */ +#define HAVE_RANDOM 1 + +/* Define to 1 if you have the `RAND_cleanup' function. */ +/* #undef HAVE_RAND_CLEANUP */ + +/* If we have reallocarray(3) */ +#define HAVE_REALLOCARRAY 1 + +/* Define to 1 if you have the `recvmsg' function. */ +#define HAVE_RECVMSG 1 + +/* Define to 1 if you have the `sendmsg' function. */ +#define HAVE_SENDMSG 1 + +/* Define to 1 if you have the `setregid' function. */ +/* #undef HAVE_SETREGID */ + +/* Define to 1 if you have the `setresgid' function. */ +#define HAVE_SETRESGID 1 + +/* Define to 1 if you have the `setresuid' function. */ +#define HAVE_SETRESUID 1 + +/* Define to 1 if you have the `setreuid' function. */ +/* #undef HAVE_SETREUID */ + +/* Define to 1 if you have the `setrlimit' function. */ +#define HAVE_SETRLIMIT 1 + +/* Define to 1 if you have the `setsid' function. */ +#define HAVE_SETSID 1 + +/* Define to 1 if you have the `setusercontext' function. */ +#define HAVE_SETUSERCONTEXT 1 + +/* Define to 1 if you have the `SHA512_Update' function. */ +/* #undef HAVE_SHA512_UPDATE */ + +/* Define to 1 if you have the `shmget' function. */ +#define HAVE_SHMGET 1 + +/* Define to 1 if you have the `sigprocmask' function. */ +#define HAVE_SIGPROCMASK 1 + +/* Define to 1 if you have the `sleep' function. */ +#define HAVE_SLEEP 1 + +/* Define to 1 if you have the `snprintf' function. */ +#define HAVE_SNPRINTF 1 + +/* Define to 1 if you have the `socketpair' function. */ +#define HAVE_SOCKETPAIR 1 + +/* Using Solaris threads */ +/* #undef HAVE_SOLARIS_THREADS */ + +/* Define to 1 if you have the `srandom' function. */ +#define HAVE_SRANDOM 1 + +/* Define if you have the SSL libraries installed. */ +#define HAVE_SSL /**/ + +/* Define to 1 if you have the `SSL_CTX_set_ciphersuites' function. */ +#define HAVE_SSL_CTX_SET_CIPHERSUITES 1 + +/* Define to 1 if you have the `SSL_CTX_set_security_level' function. */ +#define HAVE_SSL_CTX_SET_SECURITY_LEVEL 1 + +/* Define to 1 if you have the `SSL_CTX_set_tlsext_ticket_key_cb' function. */ +/* #undef HAVE_SSL_CTX_SET_TLSEXT_TICKET_KEY_CB */ + +/* Define to 1 if you have the `SSL_get0_peername' function. */ +#define HAVE_SSL_GET0_PEERNAME 1 + +/* Define to 1 if you have the `SSL_set1_host' function. */ +#define HAVE_SSL_SET1_HOST 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_STDARG_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_STDBOOL_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_STDINT_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_STDLIB_H 1 + +/* Define to 1 if you have the `strftime' function. */ +#define HAVE_STRFTIME 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_STRINGS_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_STRING_H 1 + +/* Define to 1 if you have the `strlcat' function. */ +#define HAVE_STRLCAT 1 + +/* Define to 1 if you have the `strlcpy' function. */ +#define HAVE_STRLCPY 1 + +/* Define to 1 if you have the `strptime' function. */ +#define HAVE_STRPTIME 1 + +/* Define to 1 if you have the `strsep' function. */ +#define HAVE_STRSEP 1 + +/* Define to 1 if `ipi_spec_dst' is a member of `struct in_pktinfo'. */ +/* #undef HAVE_STRUCT_IN_PKTINFO_IPI_SPEC_DST */ + +/* Define to 1 if `sun_len' is a member of `struct sockaddr_un'. */ +#define HAVE_STRUCT_SOCKADDR_UN_SUN_LEN 1 + +/* Define if you have Swig libraries and header files. */ +/* #undef HAVE_SWIG */ + +/* Define to 1 if you have the header file. */ +#define HAVE_SYSLOG_H 1 + +/* Define to 1 if systemd should be used */ +/* #undef HAVE_SYSTEMD */ + +/* Define to 1 if you have the header file. */ +#define HAVE_SYS_ENDIAN_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_SYS_IPC_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_SYS_PARAM_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_SYS_RESOURCE_H 1 + +/* Define to 1 if you have the header file. */ +/* #undef HAVE_SYS_SHA2_H */ + +/* Define to 1 if you have the header file. */ +#define HAVE_SYS_SHM_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_SYS_SOCKET_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_SYS_STAT_H 1 + +/* Define to 1 if you have the header file. */ +/* #undef HAVE_SYS_SYSCTL_H */ + +/* Define to 1 if you have the header file. */ +#define HAVE_SYS_TYPES_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_SYS_UIO_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_SYS_UN_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_SYS_WAIT_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_TIME_H 1 + +/* Define to 1 if you have the `tzset' function. */ +#define HAVE_TZSET 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_UNISTD_H 1 + +/* Define to 1 if you have the `usleep' function. */ +#define HAVE_USLEEP 1 + +/* Define to 1 if you have the `vfork' function. */ +#define HAVE_VFORK 1 + +/* Define to 1 if you have the header file. */ +/* #undef HAVE_VFORK_H */ + +/* Define to 1 if you have the header file. */ +/* #undef HAVE_WINDOWS_H */ + +/* Using Windows threads */ +/* #undef HAVE_WINDOWS_THREADS */ + +/* Define to 1 if you have the header file. */ +/* #undef HAVE_WINSOCK2_H */ + +/* Define to 1 if `fork' works. */ +#define HAVE_WORKING_FORK 1 + +/* Define to 1 if `vfork' works. */ +#define HAVE_WORKING_VFORK 1 + +/* Define to 1 if you have the `writev' function. */ +#define HAVE_WRITEV 1 + +/* Define to 1 if you have the header file. */ +/* #undef HAVE_WS2TCPIP_H */ + +/* Define to 1 if you have the `X509_VERIFY_PARAM_set1_host' function. */ +#define HAVE_X509_VERIFY_PARAM_SET1_HOST 1 + +/* Define to 1 if you have the `_beginthreadex' function. */ +/* #undef HAVE__BEGINTHREADEX */ + +/* If HMAC_Init_ex() returns void */ +/* #undef HMAC_INIT_EX_RETURNS_VOID */ + +/* if lex has yylex_destroy */ +#define LEX_HAS_YYLEX_DESTROY 1 + +/* Define to the sub-directory where libtool stores uninstalled libraries. */ +#define LT_OBJDIR ".libs/" + +/* Define to the maximum message length to pass to syslog. */ +#define MAXSYSLOGMSGLEN 10240 + +/* Define if memcmp() does not compare unsigned bytes */ +/* #undef MEMCMP_IS_BROKEN */ + +/* Define if mkdir has one argument. */ +/* #undef MKDIR_HAS_ONE_ARG */ + +/* Define if the network stack does not fully support nonblocking io (causes + lower performance). */ +/* #undef NONBLOCKING_IS_BROKEN */ + +/* Put -D_ALL_SOURCE define in config.h */ +/* #undef OMITTED__D_ALL_SOURCE */ + +/* Put -D_BSD_SOURCE define in config.h */ +/* #undef OMITTED__D_BSD_SOURCE */ + +/* Put -D_DEFAULT_SOURCE define in config.h */ +/* #undef OMITTED__D_DEFAULT_SOURCE */ + +/* Put -D_GNU_SOURCE define in config.h */ +/* #undef OMITTED__D_GNU_SOURCE */ + +/* Put -D_LARGEFILE_SOURCE=1 define in config.h */ +/* #undef OMITTED__D_LARGEFILE_SOURCE_1 */ + +/* Put -D_POSIX_C_SOURCE=200112 define in config.h */ +/* #undef OMITTED__D_POSIX_C_SOURCE_200112 */ + +/* Put -D_XOPEN_SOURCE=600 define in config.h */ +/* #undef OMITTED__D_XOPEN_SOURCE_600 */ + +/* Put -D_XOPEN_SOURCE_EXTENDED=1 define in config.h */ +/* #undef OMITTED__D_XOPEN_SOURCE_EXTENDED_1 */ + +/* Put -D__EXTENSIONS__ define in config.h */ +/* #undef OMITTED__D__EXTENSIONS__ */ + +/* Define to the address where bug reports for this package should be sent. */ +#define PACKAGE_BUGREPORT "unbound-bugs@nlnetlabs.nl or https://github.com/NLnetLabs/unbound/issues" + +/* Define to the full name of this package. */ +#define PACKAGE_NAME "unbound" + +/* Define to the full name and version of this package. */ +#define PACKAGE_STRING "unbound 1.9.6" + +/* Define to the one symbol short name of this package. */ +#define PACKAGE_TARNAME "unbound" + +/* Define to the home page for this package. */ +#define PACKAGE_URL "" + +/* Define to the version of this package. */ +#define PACKAGE_VERSION "1.9.6" + +/* default pidfile location */ +#define PIDFILE "/var/unbound/unbound.pid" + +/* Define to necessary symbol if this constant uses a non-standard name on + your system. */ +/* #undef PTHREAD_CREATE_JOINABLE */ + +/* Define as the return type of signal handlers (`int' or `void'). */ +#define RETSIGTYPE void + +/* if REUSEPORT is enabled by default */ +#define REUSEPORT_DEFAULT 0 + +/* default rootkey location */ +#define ROOT_ANCHOR_FILE "/var/unbound/root.key" + +/* default rootcert location */ +#define ROOT_CERT_FILE "/var/unbound/icannbundle.pem" + +/* version number for resource files */ +#define RSRC_PACKAGE_VERSION 1,9,6,0 + +/* Directory to chdir to */ +#define RUN_DIR "/var/unbound" + +/* Shared data */ +#define SHARE_DIR "/var/unbound" + +/* The size of `size_t'. */ +#ifdef __LP64__ +#define SIZEOF_SIZE_T 8 +#else +#define SIZEOF_SIZE_T 4 +#endif + +/* The size of `time_t', as computed by sizeof. */ +#ifdef __i386__ +#define SIZEOF_TIME_T 4 +#else +#define SIZEOF_TIME_T 8 +#endif + +/* define if (v)snprintf does not return length needed, (but length used) */ +/* #undef SNPRINTF_RET_BROKEN */ + +/* Define to 1 if libsodium supports sodium_set_misuse_handler */ +/* #undef SODIUM_MISUSE_HANDLER */ + +/* Define to 1 if you have the ANSI C header files. */ +#define STDC_HEADERS 1 + +/* use default strptime. */ +#define STRPTIME_WORKS 1 + +/* Use win32 resources and API */ +/* #undef UB_ON_WINDOWS */ + +/* the SYSLOG_FACILITY to use, default LOG_DAEMON */ +#define UB_SYSLOG_FACILITY LOG_DAEMON + +/* default username */ +#define UB_USERNAME "unbound" + +/* use to enable lightweight alloc assertions, for debug use */ +/* #undef UNBOUND_ALLOC_LITE */ + +/* use malloc not regions, for debug use */ +/* #undef UNBOUND_ALLOC_NONREGIONAL */ + +/* use statistics for allocs and frees, for debug use */ +/* #undef UNBOUND_ALLOC_STATS */ + +/* define this to enable debug checks. */ +/* #undef UNBOUND_DEBUG */ + +/* Define to 1 to use cachedb support */ +/* #undef USE_CACHEDB */ + +/* Define to 1 to enable dnscrypt support */ +/* #undef USE_DNSCRYPT */ + +/* Define to 1 to enable dnscrypt with xchacha20 support */ +/* #undef USE_DNSCRYPT_XCHACHA20 */ + +/* Define to 1 to enable dnstap support */ +/* #undef USE_DNSTAP */ + +/* Define this to enable DSA support. */ +#define USE_DSA 1 + +/* Define this to enable ECDSA support. */ +#define USE_ECDSA 1 + +/* Define this to enable an EVP workaround for older openssl */ +/* #undef USE_ECDSA_EVP_WORKAROUND */ + +/* Define this to enable ED25519 support. */ +#define USE_ED25519 1 + +/* Define this to enable ED448 support. */ +#define USE_ED448 1 + +/* Define this to enable GOST support. */ +/* #undef USE_GOST */ + +/* Define to 1 to use ipsecmod support. */ +/* #undef USE_IPSECMOD */ + +/* Define to 1 to use ipset support */ +/* #undef USE_IPSET */ + +/* Define if you want to use internal select based events */ +#define USE_MINI_EVENT 1 + +/* Define this to enable client TCP Fast Open. */ +/* #undef USE_MSG_FASTOPEN */ + +/* Define this to enable client TCP Fast Open. */ +/* #undef USE_OSX_MSG_FASTOPEN */ + +/* Define this to use hiredis client. */ +/* #undef USE_REDIS */ + +/* Define this to enable SHA1 support. */ +#define USE_SHA1 1 + +/* Define this to enable SHA256 and SHA512 support. */ +#define USE_SHA2 1 + +/* Enable extensions on AIX 3, Interix. */ +#ifndef _ALL_SOURCE +# define _ALL_SOURCE 1 +#endif +/* Enable GNU extensions on systems that have them. */ +#ifndef _GNU_SOURCE +# define _GNU_SOURCE 1 +#endif +/* Enable threading extensions on Solaris. */ +#ifndef _POSIX_PTHREAD_SEMANTICS +# define _POSIX_PTHREAD_SEMANTICS 1 +#endif +/* Enable extensions on HP NonStop. */ +#ifndef _TANDEM_SOURCE +# define _TANDEM_SOURCE 1 +#endif +/* Enable general extensions on Solaris. */ +#ifndef __EXTENSIONS__ +# define __EXTENSIONS__ 1 +#endif + + +/* Define this to enable server TCP Fast Open. */ +/* #undef USE_TCP_FASTOPEN */ + +/* Whether the windows socket API is used */ +/* #undef USE_WINSOCK */ + +/* the version of the windows API enabled */ +#define WINVER 0x0502 + +/* Define if you want Python module. */ +/* #undef WITH_PYTHONMODULE */ + +/* Define if you want PyUnbound. */ +/* #undef WITH_PYUNBOUND */ + +/* Define to 1 if `lex' declares `yytext' as a `char *' by default, not a + `char[]'. */ +#define YYTEXT_POINTER 1 + +/* Enable large inode numbers on Mac OS X 10.5. */ +#ifndef _DARWIN_USE_64_BIT_INODE +# define _DARWIN_USE_64_BIT_INODE 1 +#endif + +/* Number of bits in a file offset, on hosts where this is settable. */ +/* #undef _FILE_OFFSET_BITS */ + +/* Define to 1 to make fseeko visible on some hosts (e.g. glibc 2.2). */ +/* #undef _LARGEFILE_SOURCE */ + +/* Define for large files, on AIX-style hosts. */ +/* #undef _LARGE_FILES */ + +/* Define to 1 if on MINIX. */ +/* #undef _MINIX */ + +/* Enable for compile on Minix */ +/* #undef _NETBSD_SOURCE */ + +/* Define to 2 if the system does not provide POSIX.1 features except with + this defined. */ +/* #undef _POSIX_1_SOURCE */ + +/* Define to 1 if you need to in order for `stat' and other things to work. */ +/* #undef _POSIX_SOURCE */ + +/* Define to empty if `const' does not conform to ANSI C. */ +/* #undef const */ + +/* Define to `int' if doesn't define. */ +/* #undef gid_t */ + +/* in_addr_t */ +/* #undef in_addr_t */ + +/* in_port_t */ +/* #undef in_port_t */ + +/* Define to `__inline__' or `__inline' if that's what the C compiler + calls it, or to nothing if 'inline' is not supported under any name. */ +#ifndef __cplusplus +/* #undef inline */ +#endif + +/* Define to `short' if does not define. */ +/* #undef int16_t */ + +/* Define to `int' if does not define. */ +/* #undef int32_t */ + +/* Define to `long long' if does not define. */ +/* #undef int64_t */ + +/* Define to `signed char' if does not define. */ +/* #undef int8_t */ + +/* Define if replacement function should be used. */ +/* #undef malloc */ + +/* Define to `long int' if does not define. */ +/* #undef off_t */ + +/* Define to `int' if does not define. */ +/* #undef pid_t */ + +/* Define to 'int' if not defined */ +/* #undef rlim_t */ + +/* Define to `unsigned int' if does not define. */ +/* #undef size_t */ + +/* Define to 'int' if not defined */ +/* #undef socklen_t */ + +/* Define to `int' if does not define. */ +/* #undef ssize_t */ + +/* Define to 'unsigned char if not defined */ +/* #undef u_char */ + +/* Define to `int' if doesn't define. */ +/* #undef uid_t */ + +/* Define to `unsigned short' if does not define. */ +/* #undef uint16_t */ + +/* Define to `unsigned int' if does not define. */ +/* #undef uint32_t */ + +/* Define to `unsigned long long' if does not define. */ +/* #undef uint64_t */ + +/* Define to `unsigned char' if does not define. */ +/* #undef uint8_t */ + +/* Define as `fork' if `vfork' does not work. */ +/* #undef vfork */ + +#if defined(OMITTED__D_GNU_SOURCE) && !defined(_GNU_SOURCE) +#define _GNU_SOURCE 1 +#endif + +#if defined(OMITTED__D_BSD_SOURCE) && !defined(_BSD_SOURCE) +#define _BSD_SOURCE 1 +#endif *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-stable-12@freebsd.org Mon Jan 20 15:38:06 2020 Return-Path: Delivered-To: svn-src-stable-12@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 1460F1FE270; Mon, 20 Jan 2020 15:38:06 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 481bR16tYbz4fST; Mon, 20 Jan 2020 15:38:05 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1: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 E405D25C0E; Mon, 20 Jan 2020 15:38:05 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 00KFc5fB028065; Mon, 20 Jan 2020 15:38:05 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 00KFc5r3028064; Mon, 20 Jan 2020 15:38:05 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <202001201538.00KFc5r3028064@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Mon, 20 Jan 2020 15:38:05 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r356917 - in stable: 11/share/man/man7 12/share/man/man7 X-SVN-Group: stable-12 X-SVN-Commit-Author: gjb X-SVN-Commit-Paths: in stable: 11/share/man/man7 12/share/man/man7 X-SVN-Commit-Revision: 356917 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-12@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for only the 12-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 20 Jan 2020 15:38:06 -0000 Author: gjb Date: Mon Jan 20 15:38:05 2020 New Revision: 356917 URL: https://svnweb.freebsd.org/changeset/base/356917 Log: MFC r356792: Update release(7) to note OSRELEASE is only relevant when the 'install' target is invoked. While here, bump the sample output version name, and explicitly add the 'obj' target to avoid polluting the src checkout. PR: 243287 (related) Sponsored by: Rubicon Communications, LLC (netgate.com) Modified: stable/12/share/man/man7/release.7 Directory Properties: stable/12/ (props changed) Changes in other areas also in this revision: Modified: stable/11/share/man/man7/release.7 Directory Properties: stable/11/ (props changed) Modified: stable/12/share/man/man7/release.7 ============================================================================== --- stable/12/share/man/man7/release.7 Mon Jan 20 15:19:56 2020 (r356916) +++ stable/12/share/man/man7/release.7 Mon Jan 20 15:38:05 2020 (r356917) @@ -24,7 +24,7 @@ .\" .\" $FreeBSD$ .\" -.Dd March 28, 2018 +.Dd January 16, 2020 .Dt RELEASE 7 .Os .Sh NAME @@ -570,8 +570,10 @@ target invoked by Optional variables: .Bl -tag -width ".Ev TARGET_ARCH" .It Ev OSRELEASE -Optional base name for generated media images -.Pq e.g., FreeBSD-9.0-RC2-amd64 . +Optional base name for generated media images when invoking the +.Cm install +target +.Pq e.g., FreeBSD-12.1-RELEASE-amd64 . Defaults to the output of .Ic `uname -s`-`uname -r`-`uname -p` within the chroot. @@ -659,6 +661,7 @@ svn co svn://svn.freebsd.org/base/head src cd src make buildworld buildkernel cd release +make obj make release make install DESTDIR=/var/freebsd-snapshot .Ed From owner-svn-src-stable-12@freebsd.org Mon Jan 20 22:15:33 2020 Return-Path: Delivered-To: svn-src-stable-12@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id E27452288F4; Mon, 20 Jan 2020 22:15:33 +0000 (UTC) (envelope-from vmaffione@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 481mFd5TSpz3N6b; Mon, 20 Jan 2020 22:15:33 +0000 (UTC) (envelope-from vmaffione@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1: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 B317D273D; Mon, 20 Jan 2020 22:15:33 +0000 (UTC) (envelope-from vmaffione@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 00KMFXOb074536; Mon, 20 Jan 2020 22:15:33 GMT (envelope-from vmaffione@FreeBSD.org) Received: (from vmaffione@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 00KMFXkE074535; Mon, 20 Jan 2020 22:15:33 GMT (envelope-from vmaffione@FreeBSD.org) Message-Id: <202001202215.00KMFXkE074535@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: vmaffione set sender to vmaffione@FreeBSD.org using -f From: Vincenzo Maffione Date: Mon, 20 Jan 2020 22:15:33 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r356932 - stable/12/sys/dev/vmware/vmxnet3 X-SVN-Group: stable-12 X-SVN-Commit-Author: vmaffione X-SVN-Commit-Paths: stable/12/sys/dev/vmware/vmxnet3 X-SVN-Commit-Revision: 356932 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-12@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for only the 12-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 20 Jan 2020 22:15:34 -0000 Author: vmaffione Date: Mon Jan 20 22:15:33 2020 New Revision: 356932 URL: https://svnweb.freebsd.org/changeset/base/356932 Log: MFC r356703 vmx: fix initialization of TSO related descriptor fields Fix a mistake introduced by r343291, which ported the vmx(4) driver to iflib. In case of TSO, the hlen field of the (first) tx descriptor must be initialized to the cumulative length of Ethernet, IP and TCP headers. The length of the TCP header was missing. PR: 236999 Reported by: pkelsey Reviewed by: avg Differential Revision: https://reviews.freebsd.org/D22967 Modified: stable/12/sys/dev/vmware/vmxnet3/if_vmx.c Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/dev/vmware/vmxnet3/if_vmx.c ============================================================================== --- stable/12/sys/dev/vmware/vmxnet3/if_vmx.c Mon Jan 20 20:27:51 2020 (r356931) +++ stable/12/sys/dev/vmware/vmxnet3/if_vmx.c Mon Jan 20 22:15:33 2020 (r356932) @@ -1320,7 +1320,7 @@ vmxnet3_isc_txd_encap(void *vsc, if_pkt_info_t pi) hdrlen = pi->ipi_ehdrlen + pi->ipi_ip_hlen; if (pi->ipi_csum_flags & CSUM_TSO) { sop->offload_mode = VMXNET3_OM_TSO; - sop->hlen = hdrlen; + sop->hlen = hdrlen + pi->ipi_tcp_hlen; sop->offload_pos = pi->ipi_tso_segsz; } else if (pi->ipi_csum_flags & (VMXNET3_CSUM_OFFLOAD | VMXNET3_CSUM_OFFLOAD_IPV6)) { From owner-svn-src-stable-12@freebsd.org Tue Jan 21 15:07:24 2020 Return-Path: Delivered-To: svn-src-stable-12@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 078EC1F8DEB; Tue, 21 Jan 2020 15:07:24 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 482Bj76FByz4gL6; Tue, 21 Jan 2020 15:07:23 +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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id D1932E782; Tue, 21 Jan 2020 15:07:23 +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 00LF7Nia078904; Tue, 21 Jan 2020 15:07:23 GMT (envelope-from markj@FreeBSD.org) Received: (from markj@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 00LF7Nk7078903; Tue, 21 Jan 2020 15:07:23 GMT (envelope-from markj@FreeBSD.org) Message-Id: <202001211507.00LF7Nk7078903@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: markj set sender to markj@FreeBSD.org using -f From: Mark Johnston Date: Tue, 21 Jan 2020 15:07:23 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r356941 - stable/12/cddl/contrib/opensolaris/lib/libdtrace/common X-SVN-Group: stable-12 X-SVN-Commit-Author: markj X-SVN-Commit-Paths: stable/12/cddl/contrib/opensolaris/lib/libdtrace/common X-SVN-Commit-Revision: 356941 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-12@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for only the 12-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 21 Jan 2020 15:07:24 -0000 Author: markj Date: Tue Jan 21 15:07:23 2020 New Revision: 356941 URL: https://svnweb.freebsd.org/changeset/base/356941 Log: MFC r356477: Use a deterministic hash for USDT symbol names. Modified: stable/12/cddl/contrib/opensolaris/lib/libdtrace/common/dt_link.c Directory Properties: stable/12/ (props changed) Modified: stable/12/cddl/contrib/opensolaris/lib/libdtrace/common/dt_link.c ============================================================================== --- stable/12/cddl/contrib/opensolaris/lib/libdtrace/common/dt_link.c Tue Jan 21 13:22:35 2020 (r356940) +++ stable/12/cddl/contrib/opensolaris/lib/libdtrace/common/dt_link.c Tue Jan 21 15:07:23 2020 (r356941) @@ -57,7 +57,6 @@ #include #endif #include -#include #include #include @@ -1249,13 +1248,32 @@ dt_link_error(dtrace_hdl_t *dtp, Elf *elf, int fd, dt_ return (dt_set_errno(dtp, EDT_COMPILER)); } +/* + * Provide a unique identifier used when adding global symbols to an object. + * This is the FNV-1a hash of an absolute path for the file. + */ +static unsigned int +hash_obj(const char *obj, int fd) +{ + char path[PATH_MAX]; + unsigned int h; + + if (realpath(obj, path) == NULL) + return (-1); + + for (h = 2166136261u, obj = &path[0]; *obj != '\0'; obj++) + h = (h ^ *obj) * 16777619; + h &= 0x7fffffff; + return (h); +} + static int process_obj(dtrace_hdl_t *dtp, const char *obj, int *eprobesp) { static const char dt_prefix[] = "__dtrace"; static const char dt_enabled[] = "enabled"; static const char dt_symprefix[] = "$dtrace"; - static const char dt_symfmt[] = "%s%ld.%s"; + static const char dt_symfmt[] = "%s%u.%s"; static const char dt_weaksymfmt[] = "%s.%s"; char probename[DTRACE_NAMELEN]; int fd, i, ndx, eprobe, mod = 0; @@ -1272,7 +1290,7 @@ process_obj(dtrace_hdl_t *dtp, const char *obj, int *e dt_probe_t *prp; uint32_t off, eclass, emachine1, emachine2; size_t symsize, osym, nsym, isym, istr, len; - key_t objkey; + unsigned int objkey; dt_link_pair_t *pair, *bufs = NULL; dt_strtab_t *strtab; void *tmp; @@ -1350,10 +1368,9 @@ process_obj(dtrace_hdl_t *dtp, const char *obj, int *e * system in order to disambiguate potential conflicts between files of * the same name which contain identially named local symbols. */ - if ((objkey = ftok(obj, 0)) == (key_t)-1) { + if ((objkey = hash_obj(obj, fd)) == (unsigned int)-1) return (dt_link_error(dtp, elf, fd, bufs, "failed to generate unique key for object file: %s", obj)); - } scn_rel = NULL; while ((scn_rel = elf_nextscn(elf, scn_rel)) != NULL) { From owner-svn-src-stable-12@freebsd.org Wed Jan 22 00:30:27 2020 Return-Path: Delivered-To: svn-src-stable-12@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id DBC022278D2; Wed, 22 Jan 2020 00:30:27 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 482RBq5Hq5z4G2n; Wed, 22 Jan 2020 00:30:27 +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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id B04BE1D05A; Wed, 22 Jan 2020 00:30:27 +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 00M0URkL016589; Wed, 22 Jan 2020 00:30:27 GMT (envelope-from markj@FreeBSD.org) Received: (from markj@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 00M0URvD016588; Wed, 22 Jan 2020 00:30:27 GMT (envelope-from markj@FreeBSD.org) Message-Id: <202001220030.00M0URvD016588@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: markj set sender to markj@FreeBSD.org using -f From: Mark Johnston Date: Wed, 22 Jan 2020 00:30:27 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r356953 - stable/12/sys/compat/linuxkpi/common/src X-SVN-Group: stable-12 X-SVN-Commit-Author: markj X-SVN-Commit-Paths: stable/12/sys/compat/linuxkpi/common/src X-SVN-Commit-Revision: 356953 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-12@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for only the 12-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 22 Jan 2020 00:30:27 -0000 Author: markj Date: Wed Jan 22 00:30:27 2020 New Revision: 356953 URL: https://svnweb.freebsd.org/changeset/base/356953 Log: MFC r356760: Handle a NULL thread pointer in linux_close_file(). PR: 242913 Modified: stable/12/sys/compat/linuxkpi/common/src/linux_compat.c Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/compat/linuxkpi/common/src/linux_compat.c ============================================================================== --- stable/12/sys/compat/linuxkpi/common/src/linux_compat.c Tue Jan 21 22:28:16 2020 (r356952) +++ stable/12/sys/compat/linuxkpi/common/src/linux_compat.c Wed Jan 22 00:30:27 2020 (r356953) @@ -1502,6 +1502,9 @@ linux_file_close(struct file *file, struct thread *td) KASSERT(file_count(filp) == 0, ("File refcount(%d) is not zero", file_count(filp))); + if (td == NULL) + td = curthread; + error = 0; filp->f_flags = file->f_flag; linux_set_current(td); From owner-svn-src-stable-12@freebsd.org Wed Jan 22 00:41:19 2020 Return-Path: Delivered-To: svn-src-stable-12@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 12CFD2280CC; Wed, 22 Jan 2020 00:41:19 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 482RRL6nj0z4Gr8; Wed, 22 Jan 2020 00:41:18 +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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id E40B51D378; Wed, 22 Jan 2020 00:41:18 +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 00M0fIZP026951; Wed, 22 Jan 2020 00:41:18 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 00M0fI1P026950; Wed, 22 Jan 2020 00:41:18 GMT (envelope-from mav@FreeBSD.org) Message-Id: <202001220041.00M0fI1P026950@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Wed, 22 Jan 2020 00:41:18 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r356954 - stable/12/sys/dev/nvme X-SVN-Group: stable-12 X-SVN-Commit-Author: mav X-SVN-Commit-Paths: stable/12/sys/dev/nvme X-SVN-Commit-Revision: 356954 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-12@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for only the 12-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 22 Jan 2020 00:41:19 -0000 Author: mav Date: Wed Jan 22 00:41:18 2020 New Revision: 356954 URL: https://svnweb.freebsd.org/changeset/base/356954 Log: MFC r355465 (by imp): trackers always know what qpair they are on Don't needlessly pass around qpair pointers when the tracker knows what qpair it's on. This will simplify code and make it easier to split submission and completion queues in the future. Signed-off-by: John Meneghini Modified: stable/12/sys/dev/nvme/nvme_qpair.c Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/dev/nvme/nvme_qpair.c ============================================================================== --- stable/12/sys/dev/nvme/nvme_qpair.c Wed Jan 22 00:30:27 2020 (r356953) +++ stable/12/sys/dev/nvme/nvme_qpair.c Wed Jan 22 00:41:18 2020 (r356954) @@ -418,9 +418,10 @@ nvme_completion_is_retry(const struct nvme_completion } static void -nvme_qpair_complete_tracker(struct nvme_qpair *qpair, struct nvme_tracker *tr, +nvme_qpair_complete_tracker(struct nvme_tracker *tr, struct nvme_completion *cpl, error_print_t print_on_error) { + struct nvme_qpair * qpair = tr->qpair; struct nvme_request *req; boolean_t retry, error, retriable; @@ -484,19 +485,22 @@ nvme_qpair_complete_tracker(struct nvme_qpair *qpair, } static void -nvme_qpair_manual_complete_tracker(struct nvme_qpair *qpair, +nvme_qpair_manual_complete_tracker( struct nvme_tracker *tr, uint32_t sct, uint32_t sc, uint32_t dnr, error_print_t print_on_error) { struct nvme_completion cpl; memset(&cpl, 0, sizeof(cpl)); + + struct nvme_qpair * qpair = tr->qpair; + cpl.sqid = qpair->id; cpl.cid = tr->cid; cpl.status |= (sct & NVME_STATUS_SCT_MASK) << NVME_STATUS_SCT_SHIFT; cpl.status |= (sc & NVME_STATUS_SC_MASK) << NVME_STATUS_SC_SHIFT; cpl.status |= (dnr & NVME_STATUS_DNR_MASK) << NVME_STATUS_DNR_SHIFT; - nvme_qpair_complete_tracker(qpair, tr, &cpl, print_on_error); + nvme_qpair_complete_tracker(tr, &cpl, print_on_error); } void @@ -589,7 +593,7 @@ nvme_qpair_process_completions(struct nvme_qpair *qpai tr = qpair->act_tr[cpl.cid]; if (tr != NULL) { - nvme_qpair_complete_tracker(qpair, tr, &cpl, ERROR_PRINT_ALL); + nvme_qpair_complete_tracker(tr, &cpl, ERROR_PRINT_ALL); qpair->sq_head = cpl.sqhd; done++; } else if (!in_panic) { @@ -842,7 +846,7 @@ nvme_admin_qpair_abort_aers(struct nvme_qpair *qpair) tr = TAILQ_FIRST(&qpair->outstanding_tr); while (tr != NULL) { if (tr->req->cmd.opc == NVME_OPC_ASYNC_EVENT_REQUEST) { - nvme_qpair_manual_complete_tracker(qpair, tr, + nvme_qpair_manual_complete_tracker(tr, NVME_SCT_GENERIC, NVME_SC_ABORTED_SQ_DELETION, 0, ERROR_PRINT_NONE); tr = TAILQ_FIRST(&qpair->outstanding_tr); @@ -886,7 +890,7 @@ nvme_abort_complete(void *arg, const struct nvme_compl */ nvme_printf(tr->qpair->ctrlr, "abort command failed, aborting command manually\n"); - nvme_qpair_manual_complete_tracker(tr->qpair, tr, + nvme_qpair_manual_complete_tracker(tr, NVME_SCT_GENERIC, NVME_SC_ABORTED_BY_REQUEST, 0, ERROR_PRINT_ALL); } } @@ -1104,7 +1108,7 @@ _nvme_qpair_submit_request(struct nvme_qpair *qpair, s * with the qpair lock held. */ mtx_unlock(&qpair->lock); - nvme_qpair_manual_complete_tracker(qpair, tr, NVME_SCT_GENERIC, + nvme_qpair_manual_complete_tracker(tr, NVME_SCT_GENERIC, NVME_SC_DATA_TRANSFER_ERROR, DO_NOT_RETRY, ERROR_PRINT_ALL); mtx_lock(&qpair->lock); } @@ -1162,7 +1166,7 @@ nvme_admin_qpair_enable(struct nvme_qpair *qpair) TAILQ_FOREACH_SAFE(tr, &qpair->outstanding_tr, tailq, tr_temp) { nvme_printf(qpair->ctrlr, "aborting outstanding admin command\n"); - nvme_qpair_manual_complete_tracker(qpair, tr, NVME_SCT_GENERIC, + nvme_qpair_manual_complete_tracker(tr, NVME_SCT_GENERIC, NVME_SC_ABORTED_BY_REQUEST, DO_NOT_RETRY, ERROR_PRINT_ALL); } @@ -1184,7 +1188,7 @@ nvme_io_qpair_enable(struct nvme_qpair *qpair) */ TAILQ_FOREACH_SAFE(tr, &qpair->outstanding_tr, tailq, tr_temp) { nvme_printf(qpair->ctrlr, "aborting outstanding i/o\n"); - nvme_qpair_manual_complete_tracker(qpair, tr, NVME_SCT_GENERIC, + nvme_qpair_manual_complete_tracker(tr, NVME_SCT_GENERIC, NVME_SC_ABORTED_BY_REQUEST, 0, ERROR_PRINT_NO_RETRY); } @@ -1263,11 +1267,10 @@ nvme_qpair_fail(struct nvme_qpair *qpair) */ nvme_printf(qpair->ctrlr, "failing outstanding i/o\n"); mtx_unlock(&qpair->lock); - nvme_qpair_manual_complete_tracker(qpair, tr, NVME_SCT_GENERIC, + nvme_qpair_manual_complete_tracker(tr, NVME_SCT_GENERIC, NVME_SC_ABORTED_BY_REQUEST, DO_NOT_RETRY, ERROR_PRINT_ALL); mtx_lock(&qpair->lock); } mtx_unlock(&qpair->lock); } - From owner-svn-src-stable-12@freebsd.org Wed Jan 22 00:43:52 2020 Return-Path: Delivered-To: svn-src-stable-12@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 1A53C22828E; Wed, 22 Jan 2020 00:43:52 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 482RVH6ynbz4H3G; Wed, 22 Jan 2020 00:43:51 +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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id EA65D1D3F1; Wed, 22 Jan 2020 00:43:51 +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 00M0hpBD028976; Wed, 22 Jan 2020 00:43:51 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 00M0hp2B028975; Wed, 22 Jan 2020 00:43:51 GMT (envelope-from mav@FreeBSD.org) Message-Id: <202001220043.00M0hp2B028975@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Wed, 22 Jan 2020 00:43:51 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r356955 - stable/12/sys/dev/nvme X-SVN-Group: stable-12 X-SVN-Commit-Author: mav X-SVN-Commit-Paths: stable/12/sys/dev/nvme X-SVN-Commit-Revision: 356955 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-12@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for only the 12-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 22 Jan 2020 00:43:52 -0000 Author: mav Date: Wed Jan 22 00:43:51 2020 New Revision: 356955 URL: https://svnweb.freebsd.org/changeset/base/356955 Log: MFC r355631 (by imp): Move reset to the interrutp processing stage This trims the boot time a bit more for AWS and other platforms that have nvme drives. There's no reason too do this inline. This has been in my tree a while, but IIRC I talked to Jim Harris about this at one of our face to face meetings. Modified: stable/12/sys/dev/nvme/nvme.c stable/12/sys/dev/nvme/nvme_ctrlr.c Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/dev/nvme/nvme.c ============================================================================== --- stable/12/sys/dev/nvme/nvme.c Wed Jan 22 00:41:18 2020 (r356954) +++ stable/12/sys/dev/nvme/nvme.c Wed Jan 22 00:43:51 2020 (r356955) @@ -130,25 +130,6 @@ nvme_attach(device_t dev) int status; status = nvme_ctrlr_construct(ctrlr, dev); - - if (status != 0) { - nvme_ctrlr_destruct(ctrlr, dev); - return (status); - } - - /* - * Reset controller twice to ensure we do a transition from cc.en==1 to - * cc.en==0. This is because we don't really know what status the - * controller was left in when boot handed off to OS. Linux doesn't do - * this, however. If we adopt that policy, see also nvme_ctrlr_resume(). - */ - status = nvme_ctrlr_hw_reset(ctrlr); - if (status != 0) { - nvme_ctrlr_destruct(ctrlr, dev); - return (status); - } - - status = nvme_ctrlr_hw_reset(ctrlr); if (status != 0) { nvme_ctrlr_destruct(ctrlr, dev); return (status); Modified: stable/12/sys/dev/nvme/nvme_ctrlr.c ============================================================================== --- stable/12/sys/dev/nvme/nvme_ctrlr.c Wed Jan 22 00:41:18 2020 (r356954) +++ stable/12/sys/dev/nvme/nvme_ctrlr.c Wed Jan 22 00:43:51 2020 (r356955) @@ -909,6 +909,25 @@ void nvme_ctrlr_start_config_hook(void *arg) { struct nvme_controller *ctrlr = arg; + int status; + + /* + * Reset controller twice to ensure we do a transition from cc.en==1 to + * cc.en==0. This is because we don't really know what status the + * controller was left in when boot handed off to OS. Linux doesn't do + * this, however. If we adopt that policy, see also nvme_ctrlr_resume(). + */ + status = nvme_ctrlr_hw_reset(ctrlr); + if (status != 0) { + nvme_ctrlr_fail(ctrlr); + return; + } + + status = nvme_ctrlr_hw_reset(ctrlr); + if (status != 0) { + nvme_ctrlr_fail(ctrlr); + return; + } nvme_qpair_reset(&ctrlr->adminq); nvme_admin_qpair_enable(&ctrlr->adminq); From owner-svn-src-stable-12@freebsd.org Wed Jan 22 00:46:10 2020 Return-Path: Delivered-To: svn-src-stable-12@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 41114228338; Wed, 22 Jan 2020 00:46:10 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 482RXy0v48z4H9W; Wed, 22 Jan 2020 00:46:10 +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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 19B5B1D3F3; Wed, 22 Jan 2020 00:46:10 +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 00M0k9UV029353; Wed, 22 Jan 2020 00:46:09 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 00M0k9Go029350; Wed, 22 Jan 2020 00:46:09 GMT (envelope-from mav@FreeBSD.org) Message-Id: <202001220046.00M0k9Go029350@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Wed, 22 Jan 2020 00:46:09 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r356956 - stable/12/sys/dev/nvme X-SVN-Group: stable-12 X-SVN-Commit-Author: mav X-SVN-Commit-Paths: stable/12/sys/dev/nvme X-SVN-Commit-Revision: 356956 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-12@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for only the 12-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 22 Jan 2020 00:46:10 -0000 Author: mav Date: Wed Jan 22 00:46:09 2020 New Revision: 356956 URL: https://svnweb.freebsd.org/changeset/base/356956 Log: MFC r355721 (by imp): Move to using bool instead of boolean_t While there are subtle semantic differences between bool and boolean_t, none of them matter in these cases. Prefer true/false when dealing with bool type. Preserve a couple of TRUEs since they are passed into int args into CAM. Preserve a couple of FALSEs when used for status.done, an int. Differential Revision: https://reviews.freebsd.org/D20999 Modified: stable/12/sys/dev/nvme/nvme_ctrlr.c stable/12/sys/dev/nvme/nvme_private.h stable/12/sys/dev/nvme/nvme_qpair.c Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/dev/nvme/nvme_ctrlr.c ============================================================================== --- stable/12/sys/dev/nvme/nvme_ctrlr.c Wed Jan 22 00:43:51 2020 (r356955) +++ stable/12/sys/dev/nvme/nvme_ctrlr.c Wed Jan 22 00:46:09 2020 (r356956) @@ -181,7 +181,7 @@ nvme_ctrlr_fail(struct nvme_controller *ctrlr) { int i; - ctrlr->is_failed = TRUE; + ctrlr->is_failed = true; nvme_admin_qpair_disable(&ctrlr->adminq); nvme_qpair_fail(&ctrlr->adminq); if (ctrlr->ioq != NULL) { @@ -546,7 +546,7 @@ nvme_ctrlr_construct_namespaces(struct nvme_controller return (0); } -static boolean_t +static bool is_log_page_id_valid(uint8_t page_id) { @@ -558,10 +558,10 @@ is_log_page_id_valid(uint8_t page_id) case NVME_LOG_COMMAND_EFFECT: case NVME_LOG_RES_NOTIFICATION: case NVME_LOG_SANITIZE_STATUS: - return (TRUE); + return (true); } - return (FALSE); + return (false); } static uint32_t @@ -782,7 +782,7 @@ nvme_ctrlr_construct_and_submit_aer(struct nvme_contro * Disable timeout here, since asynchronous event requests should by * nature never be timed out. */ - req->timeout = FALSE; + req->timeout = false; req->cmd.opc = NVME_OPC_ASYNC_EVENT_REQUEST; nvme_ctrlr_submit_admin_request(ctrlr, req); } @@ -1198,7 +1198,7 @@ nvme_ctrlr_construct(struct nvme_controller *ctrlr, de TASK_INIT(&ctrlr->reset_task, 0, nvme_ctrlr_reset_task, ctrlr); TASK_INIT(&ctrlr->fail_req_task, 0, nvme_ctrlr_fail_req_task, ctrlr); STAILQ_INIT(&ctrlr->fail_req); - ctrlr->is_failed = FALSE; + ctrlr->is_failed = false; make_dev_args_init(&md_args); md_args.mda_devsw = &nvme_ctrlr_cdevsw; Modified: stable/12/sys/dev/nvme/nvme_private.h ============================================================================== --- stable/12/sys/dev/nvme/nvme_private.h Wed Jan 22 00:43:51 2020 (r356955) +++ stable/12/sys/dev/nvme/nvme_private.h Wed Jan 22 00:46:09 2020 (r356956) @@ -141,7 +141,7 @@ struct nvme_request { } u; uint32_t type; uint32_t payload_size; - boolean_t timeout; + bool timeout; nvme_cb_fn_t cb_fn; void *cb_arg; int32_t retries; @@ -214,7 +214,7 @@ struct nvme_qpair { struct nvme_tracker **act_tr; - boolean_t is_enabled; + bool is_enabled; struct mtx lock __aligned(CACHE_LINE_SIZE); @@ -322,7 +322,7 @@ struct nvme_controller { uint32_t is_initialized; uint32_t notification_sent; - boolean_t is_failed; + bool is_failed; STAILQ_HEAD(, nvme_request) fail_req; }; @@ -487,7 +487,7 @@ _nvme_allocate_request(nvme_cb_fn_t cb_fn, void *cb_ar if (req != NULL) { req->cb_fn = cb_fn; req->cb_arg = cb_arg; - req->timeout = TRUE; + req->timeout = true; } return (req); } Modified: stable/12/sys/dev/nvme/nvme_qpair.c ============================================================================== --- stable/12/sys/dev/nvme/nvme_qpair.c Wed Jan 22 00:43:51 2020 (r356955) +++ stable/12/sys/dev/nvme/nvme_qpair.c Wed Jan 22 00:46:09 2020 (r356956) @@ -357,7 +357,7 @@ nvme_qpair_print_completion(struct nvme_qpair *qpair, cpl->cdw0); } -static boolean_t +static bool nvme_completion_is_retry(const struct nvme_completion *cpl) { uint8_t sct, sc, dnr; @@ -423,7 +423,7 @@ nvme_qpair_complete_tracker(struct nvme_tracker *tr, { struct nvme_qpair * qpair = tr->qpair; struct nvme_request *req; - boolean_t retry, error, retriable; + bool retry, error, retriable; req = tr->req; error = nvme_completion_is_error(cpl); @@ -508,7 +508,7 @@ nvme_qpair_manual_complete_request(struct nvme_qpair * struct nvme_request *req, uint32_t sct, uint32_t sc) { struct nvme_completion cpl; - boolean_t error; + bool error; memset(&cpl, 0, sizeof(cpl)); cpl.sqid = qpair->id; @@ -1127,7 +1127,7 @@ static void nvme_qpair_enable(struct nvme_qpair *qpair) { - qpair->is_enabled = TRUE; + qpair->is_enabled = true; } void @@ -1215,7 +1215,7 @@ nvme_qpair_disable(struct nvme_qpair *qpair) { struct nvme_tracker *tr; - qpair->is_enabled = FALSE; + qpair->is_enabled = false; mtx_lock(&qpair->lock); TAILQ_FOREACH(tr, &qpair->outstanding_tr, tailq) callout_stop(&tr->timer); From owner-svn-src-stable-12@freebsd.org Wed Jan 22 00:48:55 2020 Return-Path: Delivered-To: svn-src-stable-12@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 43DBA2283AF; Wed, 22 Jan 2020 00:48:55 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 482Rc710mJz4HJG; Wed, 22 Jan 2020 00:48:55 +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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 198571D3F5; Wed, 22 Jan 2020 00:48:55 +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 00M0msUK029699; Wed, 22 Jan 2020 00:48:54 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 00M0msG0029698; Wed, 22 Jan 2020 00:48:54 GMT (envelope-from mav@FreeBSD.org) Message-Id: <202001220048.00M0msG0029698@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Wed, 22 Jan 2020 00:48:54 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r356957 - stable/12/sys/dev/nvme X-SVN-Group: stable-12 X-SVN-Commit-Author: mav X-SVN-Commit-Paths: stable/12/sys/dev/nvme X-SVN-Commit-Revision: 356957 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-12@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for only the 12-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 22 Jan 2020 00:48:55 -0000 Author: mav Date: Wed Jan 22 00:48:54 2020 New Revision: 356957 URL: https://svnweb.freebsd.org/changeset/base/356957 Log: MFC r355774 (by mmel): Properly synchronize completion DMA buffers. Within command completion processing the callback function may access DMAed data buffer. Synchronize it before use, not after. This allows to use NVMe disk on non-DMA coherent arm64 system. Modified: stable/12/sys/dev/nvme/nvme_qpair.c Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/dev/nvme/nvme_qpair.c ============================================================================== --- stable/12/sys/dev/nvme/nvme_qpair.c Wed Jan 22 00:46:09 2020 (r356956) +++ stable/12/sys/dev/nvme/nvme_qpair.c Wed Jan 22 00:48:54 2020 (r356957) @@ -444,8 +444,15 @@ nvme_qpair_complete_tracker(struct nvme_tracker *tr, KASSERT(cpl->cid == req->cmd.cid, ("cpl cid does not match cmd cid\n")); - if (req->cb_fn && !retry) - req->cb_fn(req->cb_arg, cpl); + if (!retry) { + if (req->type != NVME_REQUEST_NULL) { + bus_dmamap_sync(qpair->dma_tag_payload, + tr->payload_dma_map, + BUS_DMASYNC_POSTREAD | BUS_DMASYNC_POSTWRITE); + } + if (req->cb_fn) + req->cb_fn(req->cb_arg, cpl); + } mtx_lock(&qpair->lock); callout_stop(&tr->timer); @@ -455,9 +462,6 @@ nvme_qpair_complete_tracker(struct nvme_tracker *tr, nvme_qpair_submit_tracker(qpair, tr); } else { if (req->type != NVME_REQUEST_NULL) { - bus_dmamap_sync(qpair->dma_tag_payload, - tr->payload_dma_map, - BUS_DMASYNC_POSTREAD | BUS_DMASYNC_POSTWRITE); bus_dmamap_unload(qpair->dma_tag_payload, tr->payload_dma_map); } From owner-svn-src-stable-12@freebsd.org Wed Jan 22 00:52:43 2020 Return-Path: Delivered-To: svn-src-stable-12@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 15ADA228614; Wed, 22 Jan 2020 00:52:43 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 482RhV6rHhz4Hm0; Wed, 22 Jan 2020 00:52:42 +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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id E5A471D5CA; Wed, 22 Jan 2020 00:52:42 +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 00M0qgGb035781; Wed, 22 Jan 2020 00:52:42 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 00M0qgrH035780; Wed, 22 Jan 2020 00:52:42 GMT (envelope-from mav@FreeBSD.org) Message-Id: <202001220052.00M0qgrH035780@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Wed, 22 Jan 2020 00:52:42 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r356958 - stable/12/share/man/man4 X-SVN-Group: stable-12 X-SVN-Commit-Author: mav X-SVN-Commit-Paths: stable/12/share/man/man4 X-SVN-Commit-Revision: 356958 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-12@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for only the 12-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 22 Jan 2020 00:52:43 -0000 Author: mav Date: Wed Jan 22 00:52:42 2020 New Revision: 356958 URL: https://svnweb.freebsd.org/changeset/base/356958 Log: MFC r341709 (by imp): Add nda(4) cross reference to nvme(4) Modified: stable/12/share/man/man4/nvme.4 Directory Properties: stable/12/ (props changed) Modified: stable/12/share/man/man4/nvme.4 ============================================================================== --- stable/12/share/man/man4/nvme.4 Wed Jan 22 00:48:54 2020 (r356957) +++ stable/12/share/man/man4/nvme.4 Wed Jan 22 00:52:42 2020 (r356958) @@ -33,7 +33,7 @@ .\" .\" $FreeBSD$ .\" -.Dd January 7, 2016 +.Dd December 7, 2018 .Dt NVME 4 .Os .Sh NAME @@ -70,6 +70,8 @@ Per-CPU IO queue pairs .It API for registering NVMe namespace consumers such as .Xr nvd 4 +or +.Xr nda 4 .It API for submitting NVM commands to namespaces .It @@ -174,6 +176,7 @@ with a completion entry that was posted by the control and completion queues to the console. .El .Sh SEE ALSO +.Xr nda 4 , .Xr nvd 4 , .Xr pci 4 , .Xr nvmecontrol 8 , From owner-svn-src-stable-12@freebsd.org Wed Jan 22 01:03:24 2020 Return-Path: Delivered-To: svn-src-stable-12@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id E323B228890; Wed, 22 Jan 2020 01:03:24 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 482Rwr5Fzdz4J9K; Wed, 22 Jan 2020 01:03:24 +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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id AFAA21D797; Wed, 22 Jan 2020 01:03:24 +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 00M13Og8042312; Wed, 22 Jan 2020 01:03:24 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 00M13OSm042310; Wed, 22 Jan 2020 01:03:24 GMT (envelope-from mav@FreeBSD.org) Message-Id: <202001220103.00M13OSm042310@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Wed, 22 Jan 2020 01:03:24 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r356959 - stable/12/share/man/man4 X-SVN-Group: stable-12 X-SVN-Commit-Author: mav X-SVN-Commit-Paths: stable/12/share/man/man4 X-SVN-Commit-Revision: 356959 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-12@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for only the 12-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 22 Jan 2020 01:03:25 -0000 Author: mav Date: Wed Jan 22 01:03:24 2020 New Revision: 356959 URL: https://svnweb.freebsd.org/changeset/base/356959 Log: MFC r347967 (by cem): nvd.4: Reference nda(4) Fix a totally minor typo in nvme.4 while here. Modified: stable/12/share/man/man4/nvd.4 stable/12/share/man/man4/nvme.4 Directory Properties: stable/12/ (props changed) Modified: stable/12/share/man/man4/nvd.4 ============================================================================== --- stable/12/share/man/man4/nvd.4 Wed Jan 22 00:52:42 2020 (r356958) +++ stable/12/share/man/man4/nvd.4 Wed Jan 22 01:03:24 2020 (r356959) @@ -33,7 +33,7 @@ .\" .\" $FreeBSD$ .\" -.Dd January 28, 2016 +.Dd May 18, 2019 .Dt NVD 4 .Os .Sh NAME @@ -86,6 +86,7 @@ hw.nvd.delete_max= .Ed .Sh SEE ALSO .Xr GEOM 4 , +.Xr nda 4 , .Xr nvme 4 , .Xr geom 8 , .Xr nvmecontrol 8 , Modified: stable/12/share/man/man4/nvme.4 ============================================================================== --- stable/12/share/man/man4/nvme.4 Wed Jan 22 00:52:42 2020 (r356958) +++ stable/12/share/man/man4/nvme.4 Wed Jan 22 01:03:24 2020 (r356959) @@ -120,11 +120,28 @@ hw.nvme.force_intx=1 .Pp Note that use of INTx implies disabling of per-CPU I/O queue pairs. .Pp -When there is an error, -.Nm -prints only the most relevant information about the command by default. -To enable dumping of all information about the command, set the following tunable -value in +The +.Xr nvd 4 +driver is used to provide a disk driver to the system by default. +The +.Xr nda 4 +driver can also be used instead. +The +.Xr nvd 4 +driver performs better with smaller transactions and few TRIM +commands. +It sends all commands directly to the drive immediately. +The +.Xr nda 4 +driver performs better with larger transactions and also collapses +TRIM commands giving better performance. +It can queue commands to the drive; combine +.Dv BIO_DELETE +commands into a single trip; and +use the CAM I/O scheduler to bias one type of operation over another. +To select the +.Xr nda 4 +driver, set the following tunable value in .Xr loader.conf 5 : .Bd -literal -offset indent hw.nvme.verbose_cmd_dump=1 From owner-svn-src-stable-12@freebsd.org Wed Jan 22 01:04:27 2020 Return-Path: Delivered-To: svn-src-stable-12@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id CB4F8228934; Wed, 22 Jan 2020 01:04:27 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 482Ry353Pbz4JHs; Wed, 22 Jan 2020 01:04:27 +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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id A8C7F1D79A; Wed, 22 Jan 2020 01:04:27 +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 00M14RnT042480; Wed, 22 Jan 2020 01:04:27 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 00M14RbB042479; Wed, 22 Jan 2020 01:04:27 GMT (envelope-from mav@FreeBSD.org) Message-Id: <202001220104.00M14RbB042479@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Wed, 22 Jan 2020 01:04:27 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r356960 - stable/12/share/man/man4 X-SVN-Group: stable-12 X-SVN-Commit-Author: mav X-SVN-Commit-Paths: stable/12/share/man/man4 X-SVN-Commit-Revision: 356960 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-12@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for only the 12-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 22 Jan 2020 01:04:27 -0000 Author: mav Date: Wed Jan 22 01:04:26 2020 New Revision: 356960 URL: https://svnweb.freebsd.org/changeset/base/356960 Log: MFC r351357 (by imp): Document RST support in nvme(4) and ahci(4). Modified: stable/12/share/man/man4/ahci.4 stable/12/share/man/man4/nvme.4 Directory Properties: stable/12/ (props changed) Modified: stable/12/share/man/man4/ahci.4 ============================================================================== --- stable/12/share/man/man4/ahci.4 Wed Jan 22 01:03:24 2020 (r356959) +++ stable/12/share/man/man4/ahci.4 Wed Jan 22 01:04:26 2020 (r356960) @@ -24,7 +24,7 @@ .\" .\" $FreeBSD$ .\" -.Dd November 2, 2018 +.Dd August 21, 2019 .Dt AHCI 4 .Os .Sh NAME @@ -153,6 +153,26 @@ subclass 6 (SATA) and programming interface 1 (AHCI). Also, in cooperation with atamarvell and atajmicron drivers of ata(4), it supports AHCI part of legacy-PATA + AHCI-SATA combined controllers, such as JMicron JMB36x and Marvell 88SE61xx. +.Pp +The +.Nm +driver also supports AHCI devices that act as PCI bridges for +.Xr nvme 4 +using Intel Rapid Storage Technology (RST). +To use the +.Xr nvme 4 +device, either one must set the SATA mode in the BIOS to AHCI (from RST), +or one must accept the performance with RST enabled due to interrupt sharing. +.Fx +will automatically detect AHCI devices with this extension that are in RST +mode. +When that happens, +.Nm +will attach +.Xr nvme 4 +children to the +.Xr ahci 4 +device. .Sh FILES .Bl -tag -width /dev/led/ahcich*.locate .It Pa /dev/led/ahci*.*.act Modified: stable/12/share/man/man4/nvme.4 ============================================================================== --- stable/12/share/man/man4/nvme.4 Wed Jan 22 01:03:24 2020 (r356959) +++ stable/12/share/man/man4/nvme.4 Wed Jan 22 01:04:26 2020 (r356960) @@ -33,7 +33,7 @@ .\" .\" $FreeBSD$ .\" -.Dd December 7, 2018 +.Dd August 21, 2019 .Dt NVME 4 .Os .Sh NAME @@ -192,6 +192,23 @@ with a completion entry that was posted by the control (W) Writing 1 to this sysctl will dump the full contents of the submission and completion queues to the console. .El +.Pp +In addition to the typical pci attachment, the +.Nm +driver supports attaching to a +.Xr ahci 4 +device. +Intel's Rapid Storage Technology (RST) hides the nvme device +behind the AHCI device due to limitations in Windows. +However, this effectively hides it from the +.Fx +kernel. +To work around this limitation, +.Fx +detects that the AHCI device supports RST and when it is enabled. +See +.Xr ahci 4 +for more details. .Sh SEE ALSO .Xr nda 4 , .Xr nvd 4 , From owner-svn-src-stable-12@freebsd.org Wed Jan 22 01:08:29 2020 Return-Path: Delivered-To: svn-src-stable-12@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 3EBAF228A52; Wed, 22 Jan 2020 01:08:29 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 482S2j0xl1z4JRh; Wed, 22 Jan 2020 01:08:29 +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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 1B7571D79D; Wed, 22 Jan 2020 01:08:29 +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 00M18Sef043001; Wed, 22 Jan 2020 01:08:28 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 00M18STm042997; Wed, 22 Jan 2020 01:08:28 GMT (envelope-from mav@FreeBSD.org) Message-Id: <202001220108.00M18STm042997@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Wed, 22 Jan 2020 01:08:28 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r356961 - in stable/12: share/man/man4 sys/dev/nvme X-SVN-Group: stable-12 X-SVN-Commit-Author: mav X-SVN-Commit-Paths: in stable/12: share/man/man4 sys/dev/nvme X-SVN-Commit-Revision: 356961 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-12@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for only the 12-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 22 Jan 2020 01:08:29 -0000 Author: mav Date: Wed Jan 22 01:08:27 2020 New Revision: 356961 URL: https://svnweb.freebsd.org/changeset/base/356961 Log: MFC r356474, r356480, r356482, r356506: Add Host Memory Buffer support to nvme(4). This allows cheapest DRAM-less NVMe SSDs to use some of host RAM (about 1MB per 1GB on the devices I have) for its metadata cache, significantly improving random I/O performance. Device reports minimal and preferable size of the buffer. The code limits it to 5% of physical RAM by default. If the buffer can not be allocated or below minimal size, the device will just have to work without it. Modified: stable/12/share/man/man4/nvme.4 stable/12/sys/dev/nvme/nvme.h stable/12/sys/dev/nvme/nvme_ctrlr.c stable/12/sys/dev/nvme/nvme_ctrlr_cmd.c stable/12/sys/dev/nvme/nvme_private.h Directory Properties: stable/12/ (props changed) Modified: stable/12/share/man/man4/nvme.4 ============================================================================== --- stable/12/share/man/man4/nvme.4 Wed Jan 22 01:04:26 2020 (r356960) +++ stable/12/share/man/man4/nvme.4 Wed Jan 22 01:08:27 2020 (r356961) @@ -33,7 +33,7 @@ .\" .\" $FreeBSD$ .\" -.Dd August 21, 2019 +.Dd January 6, 2020 .Dt NVME 4 .Os .Sh NAME @@ -119,6 +119,14 @@ hw.nvme.force_intx=1 .Ed .Pp Note that use of INTx implies disabling of per-CPU I/O queue pairs. +.Pp +To control maximum amount of system RAM in bytes to use as Host Memory +Buffer for capable devices, set the following tunable: +.Bd -literal -offset indent +hw.nvme.hmb_max +.Ed +.Pp +The default value is 5% of physical memory size per device. .Pp The .Xr nvd 4 Modified: stable/12/sys/dev/nvme/nvme.h ============================================================================== --- stable/12/sys/dev/nvme/nvme.h Wed Jan 22 01:04:26 2020 (r356960) +++ stable/12/sys/dev/nvme/nvme.h Wed Jan 22 01:08:27 2020 (r356961) @@ -1531,6 +1531,12 @@ struct nvme_get_nsid { uint32_t nsid; }; +struct nvme_hmb_desc { + uint64_t addr; + uint32_t size; + uint32_t reserved; +}; + #define nvme_completion_is_error(cpl) \ (NVME_STATUS_GET_SC((cpl)->status) != 0 || NVME_STATUS_GET_SCT((cpl)->status) != 0) @@ -1566,6 +1572,8 @@ int nvme_ctrlr_passthrough_cmd(struct nvme_controller /* Admin functions */ void nvme_ctrlr_cmd_set_feature(struct nvme_controller *ctrlr, uint8_t feature, uint32_t cdw11, + uint32_t cdw12, uint32_t cdw13, + uint32_t cdw14, uint32_t cdw15, void *payload, uint32_t payload_size, nvme_cb_fn_t cb_fn, void *cb_arg); void nvme_ctrlr_cmd_get_feature(struct nvme_controller *ctrlr, Modified: stable/12/sys/dev/nvme/nvme_ctrlr.c ============================================================================== --- stable/12/sys/dev/nvme/nvme_ctrlr.c Wed Jan 22 01:04:26 2020 (r356960) +++ stable/12/sys/dev/nvme/nvme_ctrlr.c Wed Jan 22 01:08:27 2020 (r356961) @@ -841,6 +841,169 @@ nvme_ctrlr_configure_int_coalescing(struct nvme_contro } static void +nvme_ctrlr_hmb_free(struct nvme_controller *ctrlr) +{ + struct nvme_hmb_chunk *hmbc; + int i; + + if (ctrlr->hmb_desc_paddr) { + bus_dmamap_unload(ctrlr->hmb_desc_tag, ctrlr->hmb_desc_map); + bus_dmamem_free(ctrlr->hmb_desc_tag, ctrlr->hmb_desc_vaddr, + ctrlr->hmb_desc_map); + ctrlr->hmb_desc_paddr = 0; + } + if (ctrlr->hmb_desc_tag) { + bus_dma_tag_destroy(ctrlr->hmb_desc_tag); + ctrlr->hmb_desc_tag = NULL; + } + for (i = 0; i < ctrlr->hmb_nchunks; i++) { + hmbc = &ctrlr->hmb_chunks[i]; + bus_dmamap_unload(ctrlr->hmb_tag, hmbc->hmbc_map); + bus_dmamem_free(ctrlr->hmb_tag, hmbc->hmbc_vaddr, + hmbc->hmbc_map); + } + ctrlr->hmb_nchunks = 0; + if (ctrlr->hmb_tag) { + bus_dma_tag_destroy(ctrlr->hmb_tag); + ctrlr->hmb_tag = NULL; + } + if (ctrlr->hmb_chunks) { + free(ctrlr->hmb_chunks, M_NVME); + ctrlr->hmb_chunks = NULL; + } +} + +static void +nvme_ctrlr_hmb_alloc(struct nvme_controller *ctrlr) +{ + struct nvme_hmb_chunk *hmbc; + size_t pref, min, minc, size; + int err, i; + uint64_t max; + + /* Limit HMB to 5% of RAM size per device by default. */ + max = (uint64_t)physmem * PAGE_SIZE / 20; + TUNABLE_UINT64_FETCH("hw.nvme.hmb_max", &max); + + min = (long long unsigned)ctrlr->cdata.hmmin * 4096; + if (max == 0 || max < min) + return; + pref = MIN((long long unsigned)ctrlr->cdata.hmpre * 4096, max); + minc = MAX(ctrlr->cdata.hmminds * 4096, PAGE_SIZE); + if (min > 0 && ctrlr->cdata.hmmaxd > 0) + minc = MAX(minc, min / ctrlr->cdata.hmmaxd); + ctrlr->hmb_chunk = pref; + +again: + ctrlr->hmb_chunk = roundup2(ctrlr->hmb_chunk, PAGE_SIZE); + ctrlr->hmb_nchunks = howmany(pref, ctrlr->hmb_chunk); + if (ctrlr->cdata.hmmaxd > 0 && ctrlr->hmb_nchunks > ctrlr->cdata.hmmaxd) + ctrlr->hmb_nchunks = ctrlr->cdata.hmmaxd; + ctrlr->hmb_chunks = malloc(sizeof(struct nvme_hmb_chunk) * + ctrlr->hmb_nchunks, M_NVME, M_WAITOK); + err = bus_dma_tag_create(bus_get_dma_tag(ctrlr->dev), + PAGE_SIZE, 0, BUS_SPACE_MAXADDR, BUS_SPACE_MAXADDR, NULL, NULL, + ctrlr->hmb_chunk, 1, ctrlr->hmb_chunk, 0, NULL, NULL, &ctrlr->hmb_tag); + if (err != 0) { + nvme_printf(ctrlr, "HMB tag create failed %d\n", err); + nvme_ctrlr_hmb_free(ctrlr); + return; + } + + for (i = 0; i < ctrlr->hmb_nchunks; i++) { + hmbc = &ctrlr->hmb_chunks[i]; + if (bus_dmamem_alloc(ctrlr->hmb_tag, + (void **)&hmbc->hmbc_vaddr, BUS_DMA_NOWAIT, + &hmbc->hmbc_map)) { + nvme_printf(ctrlr, "failed to alloc HMB\n"); + break; + } + if (bus_dmamap_load(ctrlr->hmb_tag, hmbc->hmbc_map, + hmbc->hmbc_vaddr, ctrlr->hmb_chunk, nvme_single_map, + &hmbc->hmbc_paddr, BUS_DMA_NOWAIT) != 0) { + bus_dmamem_free(ctrlr->hmb_tag, hmbc->hmbc_vaddr, + hmbc->hmbc_map); + nvme_printf(ctrlr, "failed to load HMB\n"); + break; + } + bus_dmamap_sync(ctrlr->hmb_tag, hmbc->hmbc_map, + BUS_DMASYNC_PREREAD | BUS_DMASYNC_PREWRITE); + } + + if (i < ctrlr->hmb_nchunks && i * ctrlr->hmb_chunk < min && + ctrlr->hmb_chunk / 2 >= minc) { + ctrlr->hmb_nchunks = i; + nvme_ctrlr_hmb_free(ctrlr); + ctrlr->hmb_chunk /= 2; + goto again; + } + ctrlr->hmb_nchunks = i; + if (ctrlr->hmb_nchunks * ctrlr->hmb_chunk < min) { + nvme_ctrlr_hmb_free(ctrlr); + return; + } + + size = sizeof(struct nvme_hmb_desc) * ctrlr->hmb_nchunks; + err = bus_dma_tag_create(bus_get_dma_tag(ctrlr->dev), + 16, 0, BUS_SPACE_MAXADDR, BUS_SPACE_MAXADDR, NULL, NULL, + size, 1, size, 0, NULL, NULL, &ctrlr->hmb_desc_tag); + if (err != 0) { + nvme_printf(ctrlr, "HMB desc tag create failed %d\n", err); + nvme_ctrlr_hmb_free(ctrlr); + return; + } + if (bus_dmamem_alloc(ctrlr->hmb_desc_tag, + (void **)&ctrlr->hmb_desc_vaddr, BUS_DMA_WAITOK, + &ctrlr->hmb_desc_map)) { + nvme_printf(ctrlr, "failed to alloc HMB desc\n"); + nvme_ctrlr_hmb_free(ctrlr); + return; + } + if (bus_dmamap_load(ctrlr->hmb_desc_tag, ctrlr->hmb_desc_map, + ctrlr->hmb_desc_vaddr, size, nvme_single_map, + &ctrlr->hmb_desc_paddr, BUS_DMA_NOWAIT) != 0) { + bus_dmamem_free(ctrlr->hmb_desc_tag, ctrlr->hmb_desc_vaddr, + ctrlr->hmb_desc_map); + nvme_printf(ctrlr, "failed to load HMB desc\n"); + nvme_ctrlr_hmb_free(ctrlr); + return; + } + + for (i = 0; i < ctrlr->hmb_nchunks; i++) { + ctrlr->hmb_desc_vaddr[i].addr = + htole64(ctrlr->hmb_chunks[i].hmbc_paddr); + ctrlr->hmb_desc_vaddr[i].size = htole32(ctrlr->hmb_chunk / 4096); + } + bus_dmamap_sync(ctrlr->hmb_desc_tag, ctrlr->hmb_desc_map, + BUS_DMASYNC_PREWRITE); + + nvme_printf(ctrlr, "Allocated %lluMB host memory buffer\n", + (long long unsigned)ctrlr->hmb_nchunks * ctrlr->hmb_chunk + / 1024 / 1024); +} + +static void +nvme_ctrlr_hmb_enable(struct nvme_controller *ctrlr, bool enable, bool memret) +{ + struct nvme_completion_poll_status status; + uint32_t cdw11; + + cdw11 = 0; + if (enable) + cdw11 |= 1; + if (memret) + cdw11 |= 2; + status.done = 0; + nvme_ctrlr_cmd_set_feature(ctrlr, NVME_FEAT_HOST_MEMORY_BUFFER, cdw11, + ctrlr->hmb_nchunks * ctrlr->hmb_chunk / 4096, ctrlr->hmb_desc_paddr, + ctrlr->hmb_desc_paddr >> 32, ctrlr->hmb_nchunks, NULL, 0, + nvme_completion_poll_cb, &status); + nvme_completion_poll(&status); + if (nvme_completion_is_error(&status.cpl)) + nvme_printf(ctrlr, "nvme_ctrlr_hmb_enable failed!\n"); +} + +static void nvme_ctrlr_start(void *ctrlr_arg, bool resetting) { struct nvme_controller *ctrlr = ctrlr_arg; @@ -888,6 +1051,13 @@ nvme_ctrlr_start(void *ctrlr_arg, bool resetting) } } + if (ctrlr->cdata.hmpre > 0 && ctrlr->hmb_nchunks == 0) { + nvme_ctrlr_hmb_alloc(ctrlr); + if (ctrlr->hmb_nchunks > 0) + nvme_ctrlr_hmb_enable(ctrlr, true, false); + } else if (ctrlr->hmb_nchunks > 0) + nvme_ctrlr_hmb_enable(ctrlr, true, true); + if (nvme_ctrlr_create_qpairs(ctrlr) != 0) { nvme_ctrlr_fail(ctrlr); return; @@ -1240,11 +1410,15 @@ nvme_ctrlr_destruct(struct nvme_controller *ctrlr, dev destroy_dev(ctrlr->cdev); if (ctrlr->is_initialized) { - if (!gone) + if (!gone) { + if (ctrlr->hmb_nchunks > 0) + nvme_ctrlr_hmb_enable(ctrlr, false, false); nvme_ctrlr_delete_qpairs(ctrlr); + } for (i = 0; i < ctrlr->num_io_queues; i++) nvme_io_qpair_destroy(&ctrlr->ioq[i]); free(ctrlr->ioq, M_NVME); + nvme_ctrlr_hmb_free(ctrlr); nvme_admin_qpair_destroy(&ctrlr->adminq); } @@ -1367,6 +1541,9 @@ nvme_ctrlr_suspend(struct nvme_controller *ctrlr) "Competing reset task didn't finish. Try again later.\n"); return (EWOULDBLOCK); } + + if (ctrlr->hmb_nchunks > 0) + nvme_ctrlr_hmb_enable(ctrlr, false, false); /* * Per Section 7.6.2 of NVMe spec 1.4, to properly suspend, we need to Modified: stable/12/sys/dev/nvme/nvme_ctrlr_cmd.c ============================================================================== --- stable/12/sys/dev/nvme/nvme_ctrlr_cmd.c Wed Jan 22 01:04:26 2020 (r356960) +++ stable/12/sys/dev/nvme/nvme_ctrlr_cmd.c Wed Jan 22 01:08:27 2020 (r356961) @@ -166,7 +166,8 @@ nvme_ctrlr_cmd_delete_io_sq(struct nvme_controller *ct void nvme_ctrlr_cmd_set_feature(struct nvme_controller *ctrlr, uint8_t feature, - uint32_t cdw11, void *payload, uint32_t payload_size, + uint32_t cdw11, uint32_t cdw12, uint32_t cdw13, uint32_t cdw14, + uint32_t cdw15, void *payload, uint32_t payload_size, nvme_cb_fn_t cb_fn, void *cb_arg) { struct nvme_request *req; @@ -178,6 +179,10 @@ nvme_ctrlr_cmd_set_feature(struct nvme_controller *ctr cmd->opc = NVME_OPC_SET_FEATURES; cmd->cdw10 = htole32(feature); cmd->cdw11 = htole32(cdw11); + cmd->cdw12 = htole32(cdw12); + cmd->cdw13 = htole32(cdw13); + cmd->cdw14 = htole32(cdw14); + cmd->cdw15 = htole32(cdw15); nvme_ctrlr_submit_admin_request(ctrlr, req); } @@ -208,7 +213,7 @@ nvme_ctrlr_cmd_set_num_queues(struct nvme_controller * cdw11 = ((num_queues - 1) << 16) | (num_queues - 1); nvme_ctrlr_cmd_set_feature(ctrlr, NVME_FEAT_NUMBER_OF_QUEUES, cdw11, - NULL, 0, cb_fn, cb_arg); + 0, 0, 0, 0, NULL, 0, cb_fn, cb_arg); } void @@ -219,8 +224,8 @@ nvme_ctrlr_cmd_set_async_event_config(struct nvme_cont cdw11 = state; nvme_ctrlr_cmd_set_feature(ctrlr, - NVME_FEAT_ASYNC_EVENT_CONFIGURATION, cdw11, NULL, 0, cb_fn, - cb_arg); + NVME_FEAT_ASYNC_EVENT_CONFIGURATION, cdw11, 0, 0, 0, 0, NULL, 0, + cb_fn, cb_arg); } void @@ -245,7 +250,7 @@ nvme_ctrlr_cmd_set_interrupt_coalescing(struct nvme_co cdw11 = ((microseconds/100) << 8) | threshold; nvme_ctrlr_cmd_set_feature(ctrlr, NVME_FEAT_INTERRUPT_COALESCING, cdw11, - NULL, 0, cb_fn, cb_arg); + 0, 0, 0, 0, NULL, 0, cb_fn, cb_arg); } void Modified: stable/12/sys/dev/nvme/nvme_private.h ============================================================================== --- stable/12/sys/dev/nvme/nvme_private.h Wed Jan 22 01:04:26 2020 (r356960) +++ stable/12/sys/dev/nvme/nvme_private.h Wed Jan 22 01:08:27 2020 (r356961) @@ -279,9 +279,6 @@ struct nvme_controller { struct resource *res; void *tag; - bus_dma_tag_t hw_desc_tag; - bus_dmamap_t hw_desc_map; - /** maximum i/o size in bytes */ uint32_t max_xfer_size; @@ -324,6 +321,20 @@ struct nvme_controller { bool is_failed; STAILQ_HEAD(, nvme_request) fail_req; + + /* Host Memory Buffer */ + int hmb_nchunks; + size_t hmb_chunk; + bus_dma_tag_t hmb_tag; + struct nvme_hmb_chunk { + bus_dmamap_t hmbc_map; + void *hmbc_vaddr; + uint64_t hmbc_paddr; + } *hmb_chunks; + bus_dma_tag_t hmb_desc_tag; + bus_dmamap_t hmb_desc_map; + struct nvme_hmb_desc *hmb_desc_vaddr; + uint64_t hmb_desc_paddr; }; #define nvme_mmio_offsetof(reg) \ From owner-svn-src-stable-12@freebsd.org Wed Jan 22 01:10:24 2020 Return-Path: Delivered-To: svn-src-stable-12@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 39729228AFB; Wed, 22 Jan 2020 01:10:24 +0000 (UTC) (envelope-from pjd@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 482S4w0qzTz4JZP; Wed, 22 Jan 2020 01:10:24 +0000 (UTC) (envelope-from pjd@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1: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 17C9F1D7A2; Wed, 22 Jan 2020 01:10:24 +0000 (UTC) (envelope-from pjd@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 00M1ANE9043300; Wed, 22 Jan 2020 01:10:23 GMT (envelope-from pjd@FreeBSD.org) Received: (from pjd@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 00M1ANX9043299; Wed, 22 Jan 2020 01:10:23 GMT (envelope-from pjd@FreeBSD.org) Message-Id: <202001220110.00M1ANX9043299@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: pjd set sender to pjd@FreeBSD.org using -f From: Pawel Jakub Dawidek Date: Wed, 22 Jan 2020 01:10:23 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r356962 - stable/12/contrib/openbsm/libauditd X-SVN-Group: stable-12 X-SVN-Commit-Author: pjd X-SVN-Commit-Paths: stable/12/contrib/openbsm/libauditd X-SVN-Commit-Revision: 356962 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-12@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for only the 12-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 22 Jan 2020 01:10:24 -0000 Author: pjd Date: Wed Jan 22 01:10:23 2020 New Revision: 356962 URL: https://svnweb.freebsd.org/changeset/base/356962 Log: MFC r342873: In r316006 the getstrfromtype_locked() function was modified to return an empty string, instead of NULL, if an entry is missing in the audit_control file. Because of that change the getachost() function started to return success even if the host name was not defined in the audit_control. This in turn led to auditd_hostlen always being set (for an empty host it was set to 0). If auditd_hostlen was not equal to -1 we were trying to append the host name to trail file name. All this led to situation where when host name is not defined in audit_control, auditd will create trail files with a leading '.', which breaks auditdistd as it doesn't work with longer audit trail file names. Fix this by appending host name to the trail file name only if the host name is not empty. Sponsored by: Fudo Security Modified: stable/12/contrib/openbsm/libauditd/auditd_lib.c Directory Properties: stable/12/ (props changed) Modified: stable/12/contrib/openbsm/libauditd/auditd_lib.c ============================================================================== --- stable/12/contrib/openbsm/libauditd/auditd_lib.c Wed Jan 22 01:08:27 2020 (r356961) +++ stable/12/contrib/openbsm/libauditd/auditd_lib.c Wed Jan 22 01:10:23 2020 (r356962) @@ -193,7 +193,7 @@ affixdir(char *name, struct dir_ent *dirent) /* * If the host is set then also add the hostname to the filename. */ - if (auditd_hostlen != -1) + if (auditd_hostlen > 0) asprintf(&fn, "%s/%s.%s", dirent->dirname, name, auditd_host); else asprintf(&fn, "%s/%s", dirent->dirname, name); From owner-svn-src-stable-12@freebsd.org Wed Jan 22 01:28:38 2020 Return-Path: Delivered-To: svn-src-stable-12@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 4D386229063; Wed, 22 Jan 2020 01:28:38 +0000 (UTC) (envelope-from mckusick@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 482STy1Hvwz4KW7; Wed, 22 Jan 2020 01:28:38 +0000 (UTC) (envelope-from mckusick@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1: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 27A921DB26; Wed, 22 Jan 2020 01:28:38 +0000 (UTC) (envelope-from mckusick@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 00M1Sb5b056119; Wed, 22 Jan 2020 01:28:37 GMT (envelope-from mckusick@FreeBSD.org) Received: (from mckusick@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 00M1Sbjb056118; Wed, 22 Jan 2020 01:28:37 GMT (envelope-from mckusick@FreeBSD.org) Message-Id: <202001220128.00M1Sbjb056118@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mckusick set sender to mckusick@FreeBSD.org using -f From: Kirk McKusick Date: Wed, 22 Jan 2020 01:28:37 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r356964 - stable/12/sys/ufs/ufs X-SVN-Group: stable-12 X-SVN-Commit-Author: mckusick X-SVN-Commit-Paths: stable/12/sys/ufs/ufs X-SVN-Commit-Revision: 356964 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-12@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for only the 12-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 22 Jan 2020 01:28:38 -0000 Author: mckusick Date: Wed Jan 22 01:28:37 2020 New Revision: 356964 URL: https://svnweb.freebsd.org/changeset/base/356964 Log: MFC of 356627 Reset link counts after directory update failures Modified: stable/12/sys/ufs/ufs/ufs_lookup.c Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/ufs/ufs/ufs_lookup.c ============================================================================== --- stable/12/sys/ufs/ufs/ufs_lookup.c Wed Jan 22 01:15:57 2020 (r356963) +++ stable/12/sys/ufs/ufs/ufs_lookup.c Wed Jan 22 01:28:37 2020 (r356964) @@ -1169,6 +1169,7 @@ ufs_dirremove(dvp, ip, flags, isrmdir) struct inode *dp; struct direct *ep, *rep; struct buf *bp; + off_t offset; int error; dp = VTOI(dvp); @@ -1187,22 +1188,32 @@ ufs_dirremove(dvp, ip, flags, isrmdir) ip->i_flag |= IN_CHANGE; } } + if (flags & DOWHITEOUT) + offset = dp->i_offset; + else + offset = dp->i_offset - dp->i_count; + if ((error = UFS_BLKATOFF(dvp, offset, (char **)&ep, &bp)) != 0) { + if (ip) { + ip->i_effnlink++; + ip->i_flag |= IN_CHANGE; + if (DOINGSOFTDEP(dvp)) { + softdep_change_linkcnt(ip); + } else { + ip->i_nlink++; + DIP_SET(ip, i_nlink, ip->i_nlink); + ip->i_flag |= IN_CHANGE; + } + } + return (error); + } if (flags & DOWHITEOUT) { /* * Whiteout entry: set d_ino to UFS_WINO. */ - if ((error = - UFS_BLKATOFF(dvp, (off_t)dp->i_offset, (char **)&ep, &bp)) != 0) - return (error); ep->d_ino = UFS_WINO; ep->d_type = DT_WHT; goto out; } - - if ((error = UFS_BLKATOFF(dvp, - (off_t)(dp->i_offset - dp->i_count), (char **)&ep, &bp)) != 0) - return (error); - /* Set 'rep' to the entry being removed. */ if (dp->i_count == 0) rep = ep; @@ -1302,12 +1313,22 @@ ufs_dirrewrite(dp, oip, newinum, newtype, isrmdir) } error = UFS_BLKATOFF(vdp, (off_t)dp->i_offset, (char **)&ep, &bp); - if (error) - return (error); - if (ep->d_namlen == 2 && ep->d_name[1] == '.' && ep->d_name[0] == '.' && - ep->d_ino != oip->i_number) { + if (error == 0 && ep->d_namlen == 2 && ep->d_name[1] == '.' && + ep->d_name[0] == '.' && ep->d_ino != oip->i_number) { brelse(bp); - return (EIDRM); + error = EIDRM; + } + if (error) { + oip->i_effnlink++; + oip->i_flag |= IN_CHANGE; + if (DOINGSOFTDEP(vdp)) { + softdep_change_linkcnt(oip); + } else { + oip->i_nlink++; + DIP_SET(oip, i_nlink, oip->i_nlink); + oip->i_flag |= IN_CHANGE; + } + return (error); } ep->d_ino = newinum; if (!OFSFMT(vdp)) From owner-svn-src-stable-12@freebsd.org Wed Jan 22 08:31:58 2020 Return-Path: Delivered-To: svn-src-stable-12@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 9C1A4231D92; Wed, 22 Jan 2020 08:31:58 +0000 (UTC) (envelope-from hps@selasky.org) Received: from mail.turbocat.net (turbocat.net [88.99.82.50]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 482dtM3Ctnz3GjD; Wed, 22 Jan 2020 08:31:54 +0000 (UTC) (envelope-from hps@selasky.org) Received: from hps2020.home.selasky.org (unknown [62.141.129.235]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)) (No client certificate requested) by mail.turbocat.net (Postfix) with ESMTPSA id EB72026003E; Wed, 22 Jan 2020 09:31:52 +0100 (CET) Subject: Re: svn commit: r356953 - stable/12/sys/compat/linuxkpi/common/src To: Mark Johnston , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org References: <202001220030.00M0URvD016588@repo.freebsd.org> From: Hans Petter Selasky Message-ID: <4bd36510-5b00-13b6-ccdb-eb609eb9ffe6@selasky.org> Date: Wed, 22 Jan 2020 09:31:50 +0100 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:68.0) Gecko/20100101 Thunderbird/68.3.1 MIME-Version: 1.0 In-Reply-To: <202001220030.00M0URvD016588@repo.freebsd.org> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-Rspamd-Queue-Id: 482dtM3Ctnz3GjD X-Spamd-Bar: ----- Authentication-Results: mx1.freebsd.org; none X-Spamd-Result: default: False [-5.99 / 15.00]; NEURAL_HAM_MEDIUM(-1.00)[-0.998,0]; REPLY(-4.00)[]; NEURAL_HAM_LONG(-0.99)[-0.992,0] X-BeenThere: svn-src-stable-12@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for only the 12-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 22 Jan 2020 08:31:58 -0000 On 2020-01-22 01:30, Mark Johnston wrote: > Author: markj > Date: Wed Jan 22 00:30:27 2020 > New Revision: 356953 > URL: https://svnweb.freebsd.org/changeset/base/356953 > > Log: > MFC r356760: > Handle a NULL thread pointer in linux_close_file(). > > PR: 242913 > Please also MFC to 11. --HPS From owner-svn-src-stable-12@freebsd.org Wed Jan 22 22:08:02 2020 Return-Path: Delivered-To: svn-src-stable-12@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id CE1BF1FF018; Wed, 22 Jan 2020 22:08:02 +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.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4830024qxmz4bsj; Wed, 22 Jan 2020 22:08:02 +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 9C96746E3; Wed, 22 Jan 2020 22:08:02 +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 00MM82ee010868; Wed, 22 Jan 2020 22:08:02 GMT (envelope-from kevans@FreeBSD.org) Received: (from kevans@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 00MM828X010867; Wed, 22 Jan 2020 22:08:02 GMT (envelope-from kevans@FreeBSD.org) Message-Id: <202001222208.00MM828X010867@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kevans set sender to kevans@FreeBSD.org using -f From: Kyle Evans Date: Wed, 22 Jan 2020 22:08:02 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r357000 - stable/12/sys/arm/broadcom/bcm2835 X-SVN-Group: stable-12 X-SVN-Commit-Author: kevans X-SVN-Commit-Paths: stable/12/sys/arm/broadcom/bcm2835 X-SVN-Commit-Revision: 357000 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-12@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for only the 12-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 22 Jan 2020 22:08:02 -0000 Author: kevans Date: Wed Jan 22 22:08:02 2020 New Revision: 357000 URL: https://svnweb.freebsd.org/changeset/base/357000 Log: MFC r356849: bcm2835_vcbus: unifdef all platform definitions Raspberry Pi are all over the board, and the reality is that there's no harm in including all of the definitions by default but plenty of harm in the current situation. This change is safe because we match a definition by root /compatible in the FDT, so there will be no false-positives because of it. The main array of definitions grows, but it's only walked exactly once to determine which we need to use. Modified: stable/12/sys/arm/broadcom/bcm2835/bcm2835_vcbus.c Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/arm/broadcom/bcm2835/bcm2835_vcbus.c ============================================================================== --- stable/12/sys/arm/broadcom/bcm2835/bcm2835_vcbus.c Wed Jan 22 22:01:43 2020 (r356999) +++ stable/12/sys/arm/broadcom/bcm2835/bcm2835_vcbus.c Wed Jan 22 22:08:02 2020 (r357000) @@ -35,9 +35,6 @@ __FBSDID("$FreeBSD$"); * mappings for use in DMA/mailbox interactions. This is only used for the * arm64 SoC because the 32-bit SoC used the same mappings. */ -#if defined (__aarch64__) -#include "opt_soc.h" -#endif #include #include @@ -67,7 +64,6 @@ struct bcm283x_memory_mapping { vm_paddr_t vcbus_start; }; -#ifdef SOC_BCM2835 static struct bcm283x_memory_mapping bcm2835_memmap[] = { { /* SDRAM */ @@ -83,9 +79,7 @@ static struct bcm283x_memory_mapping bcm2835_memmap[] }, { 0, 0, 0 }, }; -#endif -#ifdef SOC_BCM2836 static struct bcm283x_memory_mapping bcm2836_memmap[] = { { /* SDRAM */ @@ -101,9 +95,7 @@ static struct bcm283x_memory_mapping bcm2836_memmap[] }, { 0, 0, 0 }, }; -#endif -#ifdef SOC_BRCM_BCM2837 static struct bcm283x_memory_mapping bcm2837_memmap[] = { { /* SDRAM */ @@ -119,10 +111,7 @@ static struct bcm283x_memory_mapping bcm2837_memmap[] }, { 0, 0, 0 }, }; -#endif -#ifdef SOC_BRCM_BCM2838 - /* * The BCM2838 supports up to 4GB of SDRAM, but unfortunately we can still only * map the first 1GB into the "legacy master view" (vcbus) address space. Thus, @@ -144,14 +133,12 @@ static struct bcm283x_memory_mapping bcm2838_memmap[] }, { 0, 0, 0 }, }; -#endif static struct bcm283x_memory_soc_cfg { struct bcm283x_memory_mapping *memmap; const char *soc_compat; bus_addr_t busdma_lowaddr; } bcm283x_memory_configs[] = { -#ifdef SOC_BCM2835 /* Legacy */ { .memmap = bcm2835_memmap, @@ -164,8 +151,6 @@ static struct bcm283x_memory_soc_cfg { .soc_compat = "brcm,bcm2835", .busdma_lowaddr = BUS_SPACE_MAXADDR_32BIT, }, -#endif -#ifdef SOC_BCM2836 /* Legacy */ { .memmap = bcm2836_memmap, @@ -178,16 +163,11 @@ static struct bcm283x_memory_soc_cfg { .soc_compat = "brcm,bcm2836", .busdma_lowaddr = BUS_SPACE_MAXADDR_32BIT, }, - -#endif -#ifdef SOC_BRCM_BCM2837 { .memmap = bcm2837_memmap, .soc_compat = "brcm,bcm2837", .busdma_lowaddr = BUS_SPACE_MAXADDR_32BIT, }, -#endif -#ifdef SOC_BRCM_BCM2838 { .memmap = bcm2838_memmap, .soc_compat = "brcm,bcm2711", @@ -198,7 +178,6 @@ static struct bcm283x_memory_soc_cfg { .soc_compat = "brcm,bcm2838", .busdma_lowaddr = BCM2838_PERIPH_MAXADDR, }, -#endif }; static struct bcm283x_memory_soc_cfg *booted_soc_memcfg; From owner-svn-src-stable-12@freebsd.org Wed Jan 22 22:51:57 2020 Return-Path: Delivered-To: svn-src-stable-12@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 8568D221284; Wed, 22 Jan 2020 22:51:57 +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.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4830yj33T6z4f1N; Wed, 22 Jan 2020 22:51:57 +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 640584FBA; Wed, 22 Jan 2020 22:51:57 +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 00MMpvUV036554; Wed, 22 Jan 2020 22:51:57 GMT (envelope-from kevans@FreeBSD.org) Received: (from kevans@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 00MMpuZi036550; Wed, 22 Jan 2020 22:51:56 GMT (envelope-from kevans@FreeBSD.org) Message-Id: <202001222251.00MMpuZi036550@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kevans set sender to kevans@FreeBSD.org using -f From: Kyle Evans Date: Wed, 22 Jan 2020 22:51:56 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r357001 - in stable: 11/cddl/contrib/opensolaris/lib/libzfs/common 11/lib/libbe 12/cddl/contrib/opensolaris/lib/libzfs/common 12/lib/libbe X-SVN-Group: stable-12 X-SVN-Commit-Author: kevans X-SVN-Commit-Paths: in stable: 11/cddl/contrib/opensolaris/lib/libzfs/common 11/lib/libbe 12/cddl/contrib/opensolaris/lib/libzfs/common 12/lib/libbe X-SVN-Commit-Revision: 357001 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-12@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for only the 12-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 22 Jan 2020 22:51:57 -0000 Author: kevans Date: Wed Jan 22 22:51:55 2020 New Revision: 357001 URL: https://svnweb.freebsd.org/changeset/base/357001 Log: MFC r356876-r356877: add zfs_mount_at r356876: libzfs: add zfs_mount_at This will be used in libbe in place of the internal zmount(); libbe only wants to be able to mount a dataset at an arbitrary mountpoint without altering dataset/pool properties. The natural way to do this in a portable way is by creating a zfs_mount_at() interface that's effectively zfs_mount() + a mountpoint parameter. zfs_mount() is now a light wrapper around the new method. The interface and implementation have already been accepted into ZFS On Linux, and the next commit to switch libbe() over to this new interface will solve the last compatibility issue with ZoL. The next sysutils/openzfs rebase against ZoL should be able to build libbe/bectl with only minor adjustments to build glue. r356877: libbe: use the new zfs_mount_at() More background is available in r356876, but this new interface is more portable across ZFS implementations and cleaner for what libbe is attempting to achieve anyways. Modified: stable/12/cddl/contrib/opensolaris/lib/libzfs/common/libzfs.h stable/12/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_mount.c stable/12/lib/libbe/be_access.c Directory Properties: stable/12/ (props changed) Changes in other areas also in this revision: Modified: stable/11/cddl/contrib/opensolaris/lib/libzfs/common/libzfs.h stable/11/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_mount.c stable/11/lib/libbe/be_access.c Directory Properties: stable/11/ (props changed) Modified: stable/12/cddl/contrib/opensolaris/lib/libzfs/common/libzfs.h ============================================================================== --- stable/12/cddl/contrib/opensolaris/lib/libzfs/common/libzfs.h Wed Jan 22 22:08:02 2020 (r357000) +++ stable/12/cddl/contrib/opensolaris/lib/libzfs/common/libzfs.h Wed Jan 22 22:51:55 2020 (r357001) @@ -752,6 +752,7 @@ extern boolean_t zfs_bookmark_exists(const char *path) extern boolean_t is_mounted(libzfs_handle_t *, const char *special, char **); extern boolean_t zfs_is_mounted(zfs_handle_t *, char **); extern int zfs_mount(zfs_handle_t *, const char *, int); +extern int zfs_mount_at(zfs_handle_t *, const char *, int, const char *); extern int zfs_unmount(zfs_handle_t *, const char *, int); extern int zfs_unmountall(zfs_handle_t *, int); Modified: stable/12/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_mount.c ============================================================================== --- stable/12/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_mount.c Wed Jan 22 22:08:02 2020 (r357000) +++ stable/12/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_mount.c Wed Jan 22 22:51:55 2020 (r357001) @@ -301,6 +301,17 @@ zfs_is_mounted(zfs_handle_t *zhp, char **where) return (is_mounted(zhp->zfs_hdl, zfs_get_name(zhp), where)); } +static boolean_t +zfs_is_mountable_internal(zfs_handle_t *zhp, const char *mountpoint) +{ + + if (zfs_prop_get_int(zhp, ZFS_PROP_ZONED) && + getzoneid() == GLOBAL_ZONEID) + return (B_FALSE); + + return (B_TRUE); +} + /* * Returns true if the given dataset is mountable, false otherwise. Returns the * mountpoint in 'buf'. @@ -325,8 +336,7 @@ zfs_is_mountable(zfs_handle_t *zhp, char *buf, size_t if (zfs_prop_get_int(zhp, ZFS_PROP_CANMOUNT) == ZFS_CANMOUNT_OFF) return (B_FALSE); - if (zfs_prop_get_int(zhp, ZFS_PROP_ZONED) && - getzoneid() == GLOBAL_ZONEID) + if (!zfs_is_mountable_internal(zhp, buf)) return (B_FALSE); if (source) @@ -341,8 +351,19 @@ zfs_is_mountable(zfs_handle_t *zhp, char *buf, size_t int zfs_mount(zfs_handle_t *zhp, const char *options, int flags) { - struct stat buf; char mountpoint[ZFS_MAXPROPLEN]; + + if (!zfs_is_mountable(zhp, mountpoint, sizeof (mountpoint), NULL)) + return (0); + + return (zfs_mount_at(zhp, options, flags, mountpoint)); +} + +int +zfs_mount_at(zfs_handle_t *zhp, const char *options, int flags, + const char *mountpoint) +{ + struct stat buf; char mntopts[MNT_LINE_MAX]; libzfs_handle_t *hdl = zhp->zfs_hdl; @@ -357,8 +378,8 @@ zfs_mount(zfs_handle_t *zhp, const char *options, int if (zpool_get_prop_int(zhp->zpool_hdl, ZPOOL_PROP_READONLY, NULL)) flags |= MS_RDONLY; - if (!zfs_is_mountable(zhp, mountpoint, sizeof (mountpoint), NULL)) - return (0); + if (!zfs_is_mountable_internal(zhp, mountpoint)) + return (B_FALSE); /* Create the directory if it doesn't already exist */ if (lstat(mountpoint, &buf) != 0) { Modified: stable/12/lib/libbe/be_access.c ============================================================================== --- stable/12/lib/libbe/be_access.c Wed Jan 22 22:08:02 2020 (r357000) +++ stable/12/lib/libbe/be_access.c Wed Jan 22 22:51:55 2020 (r357001) @@ -82,7 +82,6 @@ be_mount_iter(zfs_handle_t *zfs_hdl, void *data) char *mountpoint; char tmp[BE_MAXPATHLEN], zfs_mnt[BE_MAXPATHLEN]; struct be_mount_info *info; - char opt; info = (struct be_mount_info *)data; @@ -121,9 +120,7 @@ be_mount_iter(zfs_handle_t *zfs_hdl, void *data) mountpoint); } - opt = '\0'; - if ((err = zmount(zfs_get_name(zfs_hdl), tmp, info->mntflags, - __DECONST(char *, MNTTYPE_ZFS), NULL, 0, &opt, 1)) != 0) { + if ((err = zfs_mount_at(zfs_hdl, NULL, info->mntflags, tmp)) != 0) { switch (errno) { case ENAMETOOLONG: return (set_error(info->lbh, BE_ERR_PATHLEN)); From owner-svn-src-stable-12@freebsd.org Thu Jan 23 06:02:53 2020 Return-Path: Delivered-To: svn-src-stable-12@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id AADCC22DB07; Thu, 23 Jan 2020 06:02:53 +0000 (UTC) (envelope-from mckusick@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 483BWx43JMz49Pk; Thu, 23 Jan 2020 06:02:53 +0000 (UTC) (envelope-from mckusick@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1: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 8650FA168; Thu, 23 Jan 2020 06:02:53 +0000 (UTC) (envelope-from mckusick@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 00N62reL002531; Thu, 23 Jan 2020 06:02:53 GMT (envelope-from mckusick@FreeBSD.org) Received: (from mckusick@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 00N62rfL002530; Thu, 23 Jan 2020 06:02:53 GMT (envelope-from mckusick@FreeBSD.org) Message-Id: <202001230602.00N62rfL002530@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mckusick set sender to mckusick@FreeBSD.org using -f From: Kirk McKusick Date: Thu, 23 Jan 2020 06:02:53 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r357029 - stable/12/sys/ufs/ffs X-SVN-Group: stable-12 X-SVN-Commit-Author: mckusick X-SVN-Commit-Paths: stable/12/sys/ufs/ffs X-SVN-Commit-Revision: 357029 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-12@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for only the 12-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 23 Jan 2020 06:02:53 -0000 Author: mckusick Date: Thu Jan 23 06:02:52 2020 New Revision: 357029 URL: https://svnweb.freebsd.org/changeset/base/357029 Log: MFC of 356739 Optimize quota sync'ing Modified: stable/12/sys/ufs/ffs/ffs_vfsops.c Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/ufs/ffs/ffs_vfsops.c ============================================================================== --- stable/12/sys/ufs/ffs/ffs_vfsops.c Thu Jan 23 05:23:37 2020 (r357028) +++ stable/12/sys/ufs/ffs/ffs_vfsops.c Thu Jan 23 06:02:52 2020 (r357029) @@ -1457,8 +1457,12 @@ ffs_sync_lazy(mp) allerror = 0; td = curthread; - if ((mp->mnt_flag & MNT_NOATIME) != 0) - goto qupdate; + if ((mp->mnt_flag & MNT_NOATIME) != 0) { +#ifdef QUOTA + qsync(mp); +#endif + goto sbupdate; + } MNT_VNODE_FOREACH_ACTIVE(vp, mp, mvp) { if (vp->v_type == VNON) { VI_UNLOCK(vp); @@ -1480,18 +1484,16 @@ ffs_sync_lazy(mp) if ((error = vget(vp, LK_EXCLUSIVE | LK_NOWAIT | LK_INTERLOCK, td)) != 0) continue; +#ifdef QUOTA + qsyncvp(vp); +#endif if (sync_doupdate(ip)) error = ffs_update(vp, 0); if (error != 0) allerror = error; vput(vp); } - -qupdate: -#ifdef QUOTA - qsync(mp); -#endif - +sbupdate: if (VFSTOUFS(mp)->um_fs->fs_fmod != 0 && (error = ffs_sbupdate(VFSTOUFS(mp), MNT_LAZY, 0)) != 0) allerror = error; @@ -1584,6 +1586,9 @@ loop: } continue; } +#ifdef QUOTA + qsyncvp(vp); +#endif if ((error = ffs_syncvnode(vp, waitfor, 0)) != 0) allerror = error; vput(vp); @@ -1598,9 +1603,6 @@ loop: if (allerror == 0 && count) goto loop; } -#ifdef QUOTA - qsync(mp); -#endif devvp = ump->um_devvp; bo = &devvp->v_bufobj; From owner-svn-src-stable-12@freebsd.org Thu Jan 23 06:11:25 2020 Return-Path: Delivered-To: svn-src-stable-12@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id F0FA322DE61; Thu, 23 Jan 2020 06:11:25 +0000 (UTC) (envelope-from mckusick@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 483Bjn69k9z49xX; Thu, 23 Jan 2020 06:11:25 +0000 (UTC) (envelope-from mckusick@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1: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 CECA6A2CF; Thu, 23 Jan 2020 06:11:25 +0000 (UTC) (envelope-from mckusick@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 00N6BPl5005248; Thu, 23 Jan 2020 06:11:25 GMT (envelope-from mckusick@FreeBSD.org) Received: (from mckusick@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 00N6BPvQ005247; Thu, 23 Jan 2020 06:11:25 GMT (envelope-from mckusick@FreeBSD.org) Message-Id: <202001230611.00N6BPvQ005247@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mckusick set sender to mckusick@FreeBSD.org using -f From: Kirk McKusick Date: Thu, 23 Jan 2020 06:11:25 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r357031 - stable/12/sys/kern X-SVN-Group: stable-12 X-SVN-Commit-Author: mckusick X-SVN-Commit-Paths: stable/12/sys/kern X-SVN-Commit-Revision: 357031 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-12@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for only the 12-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 23 Jan 2020 06:11:26 -0000 Author: mckusick Date: Thu Jan 23 06:11:25 2020 New Revision: 357031 URL: https://svnweb.freebsd.org/changeset/base/357031 Log: MFC of 356763 Remove call to VFS_SYNC() to avoid unmount livelock Modified: stable/12/sys/kern/vfs_mount.c Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/kern/vfs_mount.c ============================================================================== --- stable/12/sys/kern/vfs_mount.c Thu Jan 23 06:06:32 2020 (r357030) +++ stable/12/sys/kern/vfs_mount.c Thu Jan 23 06:11:25 2020 (r357031) @@ -1438,9 +1438,7 @@ dounmount(struct mount *mp, int flags, struct thread * MNT_IUNLOCK(mp); cache_purgevfs(mp, false); /* remove cache entries for this file sys */ vfs_deallocate_syncvnode(mp); - if ((mp->mnt_flag & MNT_RDONLY) != 0 || (flags & MNT_FORCE) != 0 || - (error = VFS_SYNC(mp, MNT_WAIT)) == 0) - error = VFS_UNMOUNT(mp, flags); + error = VFS_UNMOUNT(mp, flags); vn_finished_write(mp); /* * If we failed to flush the dirty blocks for this mount point, From owner-svn-src-stable-12@freebsd.org Thu Jan 23 06:20:58 2020 Return-Path: Delivered-To: svn-src-stable-12@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 6A9E722E0C2; Thu, 23 Jan 2020 06:20:58 +0000 (UTC) (envelope-from mckusick@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 483Bwp2FBpz4BRp; Thu, 23 Jan 2020 06:20:58 +0000 (UTC) (envelope-from mckusick@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1: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 48538A47B; Thu, 23 Jan 2020 06:20:58 +0000 (UTC) (envelope-from mckusick@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 00N6KwwJ012181; Thu, 23 Jan 2020 06:20:58 GMT (envelope-from mckusick@FreeBSD.org) Received: (from mckusick@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 00N6Kwbc012180; Thu, 23 Jan 2020 06:20:58 GMT (envelope-from mckusick@FreeBSD.org) Message-Id: <202001230620.00N6Kwbc012180@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mckusick set sender to mckusick@FreeBSD.org using -f From: Kirk McKusick Date: Thu, 23 Jan 2020 06:20:58 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r357033 - stable/12/sys/ufs/ffs X-SVN-Group: stable-12 X-SVN-Commit-Author: mckusick X-SVN-Commit-Paths: stable/12/sys/ufs/ffs X-SVN-Commit-Revision: 357033 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-12@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for only the 12-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 23 Jan 2020 06:20:58 -0000 Author: mckusick Date: Thu Jan 23 06:20:57 2020 New Revision: 357033 URL: https://svnweb.freebsd.org/changeset/base/357033 Log: MFC of 356714 Fix DIRCHG panic Modified: stable/12/sys/ufs/ffs/ffs_softdep.c Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/ufs/ffs/ffs_softdep.c ============================================================================== --- stable/12/sys/ufs/ffs/ffs_softdep.c Thu Jan 23 06:18:08 2020 (r357032) +++ stable/12/sys/ufs/ffs/ffs_softdep.c Thu Jan 23 06:20:57 2020 (r357033) @@ -9821,14 +9821,20 @@ handle_workitem_remove(dirrem, flags) /* * Move all dependencies waiting on the remove to complete * from the dirrem to the inode inowait list to be completed - * after the inode has been updated and written to disk. Any - * marked MKDIR_PARENT are saved to be completed when the .. ref - * is removed. + * after the inode has been updated and written to disk. + * + * Any marked MKDIR_PARENT are saved to be completed when the + * dotdot ref is removed unless DIRCHG is specified. For + * directory change operations there will be no further + * directory writes and the jsegdeps need to be moved along + * with the rest to be completed when the inode is free or + * stable in the inode free list. */ LIST_INIT(&dotdotwk); while ((wk = LIST_FIRST(&dirrem->dm_jwork)) != NULL) { WORKLIST_REMOVE(wk); - if (wk->wk_state & MKDIR_PARENT) { + if ((dirrem->dm_state & DIRCHG) == 0 && + wk->wk_state & MKDIR_PARENT) { wk->wk_state &= ~MKDIR_PARENT; WORKLIST_INSERT(&dotdotwk, wk); continue; From owner-svn-src-stable-12@freebsd.org Thu Jan 23 14:01:04 2020 Return-Path: Delivered-To: svn-src-stable-12@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 5E3F71F301B; Thu, 23 Jan 2020 14:01:04 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 483P7h1ps7z4gFq; Thu, 23 Jan 2020 14:01:04 +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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 20E16FAC4; Thu, 23 Jan 2020 14:01:04 +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 00NE14ag085465; Thu, 23 Jan 2020 14:01:04 GMT (envelope-from markj@FreeBSD.org) Received: (from markj@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 00NE14Hm085464; Thu, 23 Jan 2020 14:01:04 GMT (envelope-from markj@FreeBSD.org) Message-Id: <202001231401.00NE14Hm085464@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: markj set sender to markj@FreeBSD.org using -f From: Mark Johnston Date: Thu, 23 Jan 2020 14:01:03 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r357044 - stable/12/sys/vm X-SVN-Group: stable-12 X-SVN-Commit-Author: markj X-SVN-Commit-Paths: stable/12/sys/vm X-SVN-Commit-Revision: 357044 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-12@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for only the 12-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 23 Jan 2020 14:01:04 -0000 Author: markj Date: Thu Jan 23 14:01:03 2020 New Revision: 357044 URL: https://svnweb.freebsd.org/changeset/base/357044 Log: MFC r356563: UMA: Don't destroy zones after the system shutdown process starts. PR: 242427 Modified: stable/12/sys/vm/uma_core.c Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/vm/uma_core.c ============================================================================== --- stable/12/sys/vm/uma_core.c Thu Jan 23 13:56:12 2020 (r357043) +++ stable/12/sys/vm/uma_core.c Thu Jan 23 14:01:03 2020 (r357044) @@ -156,8 +156,14 @@ SYSCTL_ULONG(_vm, OID_AUTO, uma_kmem_total, CTLFLAG_RD "UMA kernel memory usage"); /* Is the VM done starting up? */ -static enum { BOOT_COLD = 0, BOOT_STRAPPED, BOOT_PAGEALLOC, BOOT_BUCKETS, - BOOT_RUNNING } booted = BOOT_COLD; +static enum { + BOOT_COLD, + BOOT_STRAPPED, + BOOT_PAGEALLOC, + BOOT_BUCKETS, + BOOT_RUNNING, + BOOT_SHUTDOWN, +} booted = BOOT_COLD; /* * This is the handle used to schedule events that need to happen @@ -261,6 +267,7 @@ static int hash_expand(struct uma_hash *, struct uma_h static void hash_free(struct uma_hash *hash); static void uma_timeout(void *); static void uma_startup3(void); +static void uma_shutdown(void); static void *zone_alloc_item(uma_zone_t, void *, int, int); static void zone_free_item(uma_zone_t, void *, void *, enum zfreeskip); static void bucket_enable(void); @@ -1184,8 +1191,7 @@ startup_alloc(uma_zone_t zone, vm_size_t bytes, int do case BOOT_PAGEALLOC: if (keg->uk_ppera > 1) break; - case BOOT_BUCKETS: - case BOOT_RUNNING: + default: #ifdef UMA_MD_SMALL_ALLOC keg->uk_allocf = (keg->uk_ppera > 1) ? page_alloc : uma_small_alloc; @@ -2134,10 +2140,6 @@ uma_startup2(void) bucket_enable(); } -/* - * Initialize our callout handle - * - */ static void uma_startup3(void) { @@ -2150,8 +2152,18 @@ uma_startup3(void) callout_init(&uma_callout, 1); callout_reset(&uma_callout, UMA_TIMEOUT * hz, uma_timeout, NULL); booted = BOOT_RUNNING; + + EVENTHANDLER_REGISTER(shutdown_post_sync, uma_shutdown, NULL, + EVENTHANDLER_PRI_FIRST); } +static void +uma_shutdown(void) +{ + + booted = BOOT_SHUTDOWN; +} + static uma_keg_t uma_kcreate(uma_zone_t zone, size_t size, uma_init uminit, uma_fini fini, int align, uint32_t flags) @@ -2371,6 +2383,14 @@ void uma_zdestroy(uma_zone_t zone) { + /* + * Large slabs are expensive to reclaim, so don't bother doing + * unnecessary work if we're shutting down. + */ + if (booted == BOOT_SHUTDOWN && + zone->uz_fini == NULL && + zone->uz_release == (uma_release)zone_release) + return; sx_slock(&uma_drain_lock); zone_free_item(zones, zone, NULL, SKIP_NONE); sx_sunlock(&uma_drain_lock); From owner-svn-src-stable-12@freebsd.org Fri Jan 24 01:00:29 2020 Return-Path: Delivered-To: svn-src-stable-12@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 2092422A13A; Fri, 24 Jan 2020 01:00:29 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 483gmY067Mz4JSm; Fri, 24 Jan 2020 01:00:29 +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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id F32E21F652; Fri, 24 Jan 2020 01:00:28 +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 00O10SIP077013; Fri, 24 Jan 2020 01:00:28 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 00O10Sgj077012; Fri, 24 Jan 2020 01:00:28 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <202001240100.00O10Sgj077012@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Fri, 24 Jan 2020 01:00:28 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r357064 - stable/12/share/mk X-SVN-Group: stable-12 X-SVN-Commit-Author: emaste X-SVN-Commit-Paths: stable/12/share/mk X-SVN-Commit-Revision: 357064 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-12@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for only the 12-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 24 Jan 2020 01:00:29 -0000 Author: emaste Date: Fri Jan 24 01:00:28 2020 New Revision: 357064 URL: https://svnweb.freebsd.org/changeset/base/357064 Log: MFC r356836: src.opts.mk: force DMAGENT off under WITHOUT_OPENSSL dma(8) depends on OpenSSL unconditionally. Modified: stable/12/share/mk/src.opts.mk Directory Properties: stable/12/ (props changed) Modified: stable/12/share/mk/src.opts.mk ============================================================================== --- stable/12/share/mk/src.opts.mk Thu Jan 23 23:52:57 2020 (r357063) +++ stable/12/share/mk/src.opts.mk Fri Jan 24 01:00:28 2020 (r357064) @@ -503,6 +503,7 @@ MK_NLS_CATALOGS:= no .endif .if ${MK_OPENSSL} == "no" +MK_DMAGENT:= no MK_OPENSSH:= no MK_KERBEROS:= no .endif From owner-svn-src-stable-12@freebsd.org Fri Jan 24 14:22:10 2020 Return-Path: Delivered-To: svn-src-stable-12@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 62A9F1F16BC; Fri, 24 Jan 2020 14:22:10 +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.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4841YZ1d4Vz44hB; Fri, 24 Jan 2020 14:22:10 +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 18C6328873; Fri, 24 Jan 2020 14:22:10 +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 00OEM9nw057603; Fri, 24 Jan 2020 14:22:09 GMT (envelope-from eadler@FreeBSD.org) Received: (from eadler@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 00OEM9I6057601; Fri, 24 Jan 2020 14:22:09 GMT (envelope-from eadler@FreeBSD.org) Message-Id: <202001241422.00OEM9I6057601@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: eadler set sender to eadler@FreeBSD.org using -f From: Eitan Adler Date: Fri, 24 Jan 2020 14:22:09 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r357078 - stable/12/usr.bin/showmount X-SVN-Group: stable-12 X-SVN-Commit-Author: eadler X-SVN-Commit-Paths: stable/12/usr.bin/showmount X-SVN-Commit-Revision: 357078 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-12@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for only the 12-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 24 Jan 2020 14:22:10 -0000 Author: eadler Date: Fri Jan 24 14:22:09 2020 New Revision: 357078 URL: https://svnweb.freebsd.org/changeset/base/357078 Log: MFC r355647: [showmount] implement long options add long options support to showmount. Where mappings exist use the GNU names for said options. Relnotes: yes Modified: stable/12/usr.bin/showmount/showmount.8 stable/12/usr.bin/showmount/showmount.c Directory Properties: stable/12/ (props changed) Modified: stable/12/usr.bin/showmount/showmount.8 ============================================================================== --- stable/12/usr.bin/showmount/showmount.8 Fri Jan 24 13:05:53 2020 (r357077) +++ stable/12/usr.bin/showmount/showmount.8 Fri Jan 24 14:22:09 2020 (r357078) @@ -67,20 +67,20 @@ for a detailed description of the protocol. .Pp The following options are available: .Bl -tag -width indent -.It Fl a +.It Fl a , Fl -all List all mount points in the form: .Bd -ragged -offset indent -compact .Ar host : Ns Ar dirpath . .Ed -.It Fl d +.It Fl d , Fl -directories List directory paths of mount points instead of hosts. -.It Fl E +.It Fl E , Fl -exports-script Show the .Ar host Ns 's exports list in a script-friendly format. Client addresses and the header are not shown, and special characters are escaped. -.It Fl e +.It Fl e , Fl -exports Show the .Ar host Ns 's exports list. Modified: stable/12/usr.bin/showmount/showmount.c ============================================================================== --- stable/12/usr.bin/showmount/showmount.c Fri Jan 24 13:05:53 2020 (r357077) +++ stable/12/usr.bin/showmount/showmount.c Fri Jan 24 14:22:09 2020 (r357078) @@ -53,6 +53,7 @@ static const char rcsid[] = #include #include +#include #include #include #include @@ -102,6 +103,14 @@ int xdr_exportslist(XDR *, struct exportslist **); int tcp_callrpc(const char *host, int prognum, int versnum, int procnum, xdrproc_t inproc, char *in, xdrproc_t outproc, char *out); +static const struct option long_opts[] = { + { "all", no_argument, NULL, 'a' }, + { "directories", no_argument, NULL, 'd' }, + { "exports-script", no_argument, NULL, 'E' }, + { "exports", no_argument, NULL, 'e' }, + { NULL, 0, NULL, 0 }, +}; + /* * This command queries the NFS mount daemon for it's mount list and/or * it's exports list and prints them out. @@ -119,7 +128,7 @@ main(int argc, char **argv) const char *host; int ch, estat, nbytes; - while ((ch = getopt(argc, argv, "adEe13")) != -1) + while ((ch = getopt_long(argc, argv, "+adEe13", long_opts, NULL)) != -1) switch (ch) { case 'a': if (type == 0) { From owner-svn-src-stable-12@freebsd.org Fri Jan 24 15:29:36 2020 Return-Path: Delivered-To: svn-src-stable-12@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id B055B1F36D7; Fri, 24 Jan 2020 15:29:36 +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.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 48433N3z4qz49p6; Fri, 24 Jan 2020 15:29:36 +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 837342949F; Fri, 24 Jan 2020 15:29:36 +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 00OFTasJ095060; Fri, 24 Jan 2020 15:29:36 GMT (envelope-from kevans@FreeBSD.org) Received: (from kevans@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 00OFTZ80095053; Fri, 24 Jan 2020 15:29:35 GMT (envelope-from kevans@FreeBSD.org) Message-Id: <202001241529.00OFTZ80095053@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kevans set sender to kevans@FreeBSD.org using -f From: Kyle Evans Date: Fri, 24 Jan 2020 15:29:35 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r357082 - in stable: 11/etc/mtree 11/secure 11/secure/caroot 11/share/mk 11/usr.sbin 11/usr.sbin/certctl 11/usr.sbin/etcupdate 11/usr.sbin/mergemaster 12/etc/mtree 12/secure 12/secure/c... X-SVN-Group: stable-12 X-SVN-Commit-Author: kevans X-SVN-Commit-Paths: in stable: 11/etc/mtree 11/secure 11/secure/caroot 11/share/mk 11/usr.sbin 11/usr.sbin/certctl 11/usr.sbin/etcupdate 11/usr.sbin/mergemaster 12/etc/mtree 12/secure 12/secure/caroot 12/share/mk 12/usr.... X-SVN-Commit-Revision: 357082 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-12@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for only the 12-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 24 Jan 2020 15:29:36 -0000 Author: kevans Date: Fri Jan 24 15:29:33 2020 New Revision: 357082 URL: https://svnweb.freebsd.org/changeset/base/357082 Log: MFC r352948-r352951, r353002, r353066, r353070: caroot infrastructure Infrastructure only -- no plans in place currently to commit any certs to these branches. r352948: [1/3] Initial infrastructure for SSL root bundle in base This setup will add the trusted certificates from the Mozilla NSS bundle to base. This commit includes: - CAROOT option to opt out of installation of certs - mtree amendments for final destinations - infrastructure to fetch/update certs, along with instructions A follow-up commit will add a certctl(8) utility to give the user control over trust specifics. Another follow-up commit will actually commit the initial result of updatecerts. This work was done primarily by allanjude@, with minor contributions by myself. r352949: [2/3] Add certctl(8) This is a simple utility to hash all trusted on the system into /etc/ssl/certs. It also allows the user to blacklist certificates they do not trust. This work was done primarily by allanjude@, with minor contributions by myself. r352950: [3/3] etcupdate and mergemaster support for certctl This commit add support for certctl in mergemaster and etcupdate. Both will either rehash or prompt for rehash as new certificates are trusted/blacklisted. This work was done primarily by allanjude@, with minor contributions by myself. r352951: caroot: add @generated tags to extracted .pem As is the current trend; while these files are manually curated, they are still generated. If they end up in a review, it would be helpful to also take the hint and hide them. r353002: Unbreak etcupdate(8) and mergemaster(8) after r352950 r352950 introduced improper case fall-through for shell scripts. Fix it with a pipe. r353066: certctl(8): realpath the file before creating the symlink Otherwise we end up creating broken relative symlinks in /etc/ssl/blacklisted. r353070: certctl(8): let one blacklist based on hashed filenames It seems reasonable to allow, for instance: $ certctl list # reviews output -- ah, yeah, I don't trust that one $ certctl blacklist ce5e74ef.0 $ certctl rehash We can unambiguously determine what cert "ce5e74ef.0" refers to, and we've described it to them in `certctl list` output -- I see little sense in forcing another level of filesystem inspection to determien what cert file this physically corresponds to. Relnotes: yes Added: stable/12/secure/caroot/ - copied from r352951, head/secure/caroot/ stable/12/usr.sbin/certctl/ - copied from r352951, head/usr.sbin/certctl/ Modified: stable/12/etc/mtree/BSD.usr.dist stable/12/secure/Makefile stable/12/share/mk/src.opts.mk stable/12/usr.sbin/Makefile stable/12/usr.sbin/certctl/certctl.sh stable/12/usr.sbin/etcupdate/etcupdate.sh stable/12/usr.sbin/mergemaster/mergemaster.sh Directory Properties: stable/12/ (props changed) Changes in other areas also in this revision: Added: stable/11/secure/caroot/ - copied from r352951, head/secure/caroot/ stable/11/usr.sbin/certctl/ - copied from r352951, head/usr.sbin/certctl/ Modified: stable/11/etc/mtree/BSD.usr.dist stable/11/secure/Makefile stable/11/share/mk/src.opts.mk stable/11/usr.sbin/Makefile stable/11/usr.sbin/certctl/certctl.sh stable/11/usr.sbin/etcupdate/etcupdate.sh stable/11/usr.sbin/mergemaster/mergemaster.sh Directory Properties: stable/11/ (props changed) Modified: stable/12/etc/mtree/BSD.usr.dist ============================================================================== --- stable/12/etc/mtree/BSD.usr.dist Fri Jan 24 14:58:02 2020 (r357081) +++ stable/12/etc/mtree/BSD.usr.dist Fri Jan 24 15:29:33 2020 (r357082) @@ -200,6 +200,12 @@ uk_UA.KOI8-U .. .. + certs + blacklisted + .. + trusted + .. + .. dict .. doc Modified: stable/12/secure/Makefile ============================================================================== --- stable/12/secure/Makefile Fri Jan 24 14:58:02 2020 (r357081) +++ stable/12/secure/Makefile Fri Jan 24 15:29:33 2020 (r357082) @@ -8,6 +8,8 @@ SUBDIR_PARALLEL= SUBDIR.${MK_TESTS}+= tests +SUBDIR.${MK_CAROOT}+= caroot + # These are the programs which depend on crypto, but not Kerberos. SPROGS= lib/libfetch lib/libpam lib/libradius lib/libtelnet \ bin/ed libexec/telnetd usr.bin/fetch usr.bin/telnet \ Modified: stable/12/share/mk/src.opts.mk ============================================================================== --- stable/12/share/mk/src.opts.mk Fri Jan 24 14:58:02 2020 (r357081) +++ stable/12/share/mk/src.opts.mk Fri Jan 24 15:29:33 2020 (r357082) @@ -76,6 +76,7 @@ __DEFAULT_YES_OPTIONS = \ BZIP2 \ CALENDAR \ CAPSICUM \ + CAROOT \ CASPER \ CCD \ CDDL \ Modified: stable/12/usr.sbin/Makefile ============================================================================== --- stable/12/usr.sbin/Makefile Fri Jan 24 14:58:02 2020 (r357081) +++ stable/12/usr.sbin/Makefile Fri Jan 24 15:29:33 2020 (r357082) @@ -125,6 +125,9 @@ SUBDIR.${MK_BLUETOOTH}+= bluetooth SUBDIR.${MK_BOOTPARAMD}+= bootparamd SUBDIR.${MK_BSDINSTALL}+= bsdinstall SUBDIR.${MK_BSNMP}+= bsnmpd +.if ${MK_CAROOT} != "no" +SUBDIR.${MK_OPENSSL}+= certctl +.endif SUBDIR.${MK_CTM}+= ctm SUBDIR.${MK_CXGBETOOL}+= cxgbetool SUBDIR.${MK_DIALOG}+= bsdconfig Modified: stable/12/usr.sbin/certctl/certctl.sh ============================================================================== --- head/usr.sbin/certctl/certctl.sh Wed Oct 2 01:27:50 2019 (r352951) +++ stable/12/usr.sbin/certctl/certctl.sh Fri Jan 24 15:29:33 2020 (r357082) @@ -69,16 +69,26 @@ create_trusted_link() return 1 fi [ $VERBOSE -gt 0 ] && echo "Adding $hash.0 to trust store" - [ $NOOP -eq 0 ] && ln -fs "$1" "$CERTDESTDIR/$hash.0" + [ $NOOP -eq 0 ] && ln -fs $(realpath "$1") "$CERTDESTDIR/$hash.0" } create_blacklisted() { - local hash + local hash srcfile filename - hash=$( do_hash "$1" ) || return - [ $VERBOSE -gt 0 ] && echo "Adding $hash.0 to blacklist" - [ $NOOP -eq 0 ] && ln -fs "$1" "$BLACKLISTDESTDIR/$hash.0" + # If it exists as a file, we'll try that; otherwise, we'll scan + if [ -e "$1" ]; then + hash=$( do_hash "$1" ) || return + srcfile=$(realpath "$1") + filename="$hash.0" + elif [ -e "${CERTDESTDIR}/$1" ]; then + srcfile=$(realpath "${CERTDESTDIR}/$1") + filename="$1" + else + return + fi + [ $VERBOSE -gt 0 ] && echo "Adding $filename to blacklist" + [ $NOOP -eq 0 ] && ln -fs "$srcfile" "$BLACKLISTDESTDIR/$filename" } do_scan() Modified: stable/12/usr.sbin/etcupdate/etcupdate.sh ============================================================================== --- stable/12/usr.sbin/etcupdate/etcupdate.sh Fri Jan 24 14:58:02 2020 (r357081) +++ stable/12/usr.sbin/etcupdate/etcupdate.sh Fri Jan 24 15:29:33 2020 (r357082) @@ -595,6 +595,12 @@ post_install_file() NEWALIAS_WARN=yes fi ;; + /usr/share/certs/trusted/* | /usr/share/certs/blacklisted/*) + log "certctl rehash" + if [ -z "$dryrun" ]; then + env DESTDIR=${DESTDIR} certctl rehash >&3 2>&1 + fi + ;; /etc/login.conf) log "cap_mkdb ${DESTDIR}$1" if [ -z "$dryrun" ]; then Modified: stable/12/usr.sbin/mergemaster/mergemaster.sh ============================================================================== --- stable/12/usr.sbin/mergemaster/mergemaster.sh Fri Jan 24 14:58:02 2020 (r357081) +++ stable/12/usr.sbin/mergemaster/mergemaster.sh Fri Jan 24 15:29:33 2020 (r357082) @@ -884,6 +884,9 @@ mm_install () { /etc/mail/aliases) NEED_NEWALIASES=yes ;; + /usr/share/certs/trusted/* | /usr/share/certs/blacklisted/*) + NEED_CERTCTL=yes + ;; /etc/login.conf) NEED_CAP_MKDB=yes ;; @@ -1352,6 +1355,23 @@ case "${NEED_PWD_MKDB}" in echo " '/usr/sbin/pwd_mkdb -p /etc/master.passwd'" echo " to rebuild your password files" run_it_now '/usr/sbin/pwd_mkdb -p /etc/master.passwd' + fi + ;; +esac + +case "${NEED_CERTCTL}" in +'') ;; +*) + echo '' + echo "*** You installed files in /etc/ssl/certs, so make sure that you run" + if [ -n "${DESTDIR}" ]; then + echo " 'env DESTDIR=${DESTDIR} /usr/sbin/certctl rehash'" + echo " to rebuild your certificate authority database" + run_it_now "env DESTDIR=${DESTDIR} /usr/sbin/certctl rehash" + else + echo " '/usr/sbin/certctl rehash'" + echo " to rebuild your certificate authority database" + run_it_now "/usr/sbin/certctl rehash" fi ;; esac From owner-svn-src-stable-12@freebsd.org Fri Jan 24 17:15:32 2020 Return-Path: Delivered-To: svn-src-stable-12@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id AB7C01F5EF0; Fri, 24 Jan 2020 17:15:32 +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.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4845Pc48HHz4Hrs; Fri, 24 Jan 2020 17:15:32 +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 898822A914; Fri, 24 Jan 2020 17:15: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 00OHFWwI060699; Fri, 24 Jan 2020 17:15:32 GMT (envelope-from kevans@FreeBSD.org) Received: (from kevans@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 00OHFWh7060698; Fri, 24 Jan 2020 17:15:32 GMT (envelope-from kevans@FreeBSD.org) Message-Id: <202001241715.00OHFWh7060698@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kevans set sender to kevans@FreeBSD.org using -f From: Kyle Evans Date: Fri, 24 Jan 2020 17:15:32 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r357089 - in stable: 11/lib/libc/gen 12/lib/libc/gen X-SVN-Group: stable-12 X-SVN-Commit-Author: kevans X-SVN-Commit-Paths: in stable: 11/lib/libc/gen 12/lib/libc/gen X-SVN-Commit-Revision: 357089 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-12@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for only the 12-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 24 Jan 2020 17:15:32 -0000 Author: kevans Date: Fri Jan 24 17:15:31 2020 New Revision: 357089 URL: https://svnweb.freebsd.org/changeset/base/357089 Log: MFC 356951: posix_spawn: mark error as volatile In the case of an error, the RFSPAWN'd thread will write back to psa->error with the correct exit code. Mark this as volatile as the return value is being actively dorked up for erroneous exits on !x86. This fixes the following tests, tested on aarch64 (only under qemu, at the moment): - posix_spawn/spawn_test:t_spawn_missing - posix_spawn/spawn_test:t_spawn_nonexec - posix_spawn/spawn_test:t_spawn_zero Modified: stable/12/lib/libc/gen/posix_spawn.c Directory Properties: stable/12/ (props changed) Changes in other areas also in this revision: Modified: stable/11/lib/libc/gen/posix_spawn.c Directory Properties: stable/11/ (props changed) Modified: stable/12/lib/libc/gen/posix_spawn.c ============================================================================== --- stable/12/lib/libc/gen/posix_spawn.c Fri Jan 24 17:11:54 2020 (r357088) +++ stable/12/lib/libc/gen/posix_spawn.c Fri Jan 24 17:15:31 2020 (r357089) @@ -201,7 +201,7 @@ struct posix_spawn_args { char * const * argv; char * const * envp; int use_env_path; - int error; + volatile int error; }; #if defined(__i386__) || defined(__amd64__) From owner-svn-src-stable-12@freebsd.org Sat Jan 25 05:17:45 2020 Return-Path: Delivered-To: svn-src-stable-12@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 98DF023347E; Sat, 25 Jan 2020 05:17:45 +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.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 484PQx3YdQz45gx; Sat, 25 Jan 2020 05:17:45 +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 7567B313F; Sat, 25 Jan 2020 05:17:45 +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 00P5Hj5Z092899; Sat, 25 Jan 2020 05:17:45 GMT (envelope-from kevans@FreeBSD.org) Received: (from kevans@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 00P5Hj9O092897; Sat, 25 Jan 2020 05:17:45 GMT (envelope-from kevans@FreeBSD.org) Message-Id: <202001250517.00P5Hj9O092897@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kevans set sender to kevans@FreeBSD.org using -f From: Kyle Evans Date: Sat, 25 Jan 2020 05:17:45 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r357107 - in stable: 11/share/mk 12/share/mk X-SVN-Group: stable-12 X-SVN-Commit-Author: kevans X-SVN-Commit-Paths: in stable: 11/share/mk 12/share/mk X-SVN-Commit-Revision: 357107 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-12@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for only the 12-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 25 Jan 2020 05:17:45 -0000 Author: kevans Date: Sat Jan 25 05:17:44 2020 New Revision: 357107 URL: https://svnweb.freebsd.org/changeset/base/357107 Log: MFC r354968, r354976: Introduce, but do not use, bsd.sysdir.mk [Some sysent bits use bsd.sysdir.mk now, but I don't see a point in converting existing stuff] MFC r354968: Introduce bsd.sysdir.mk to consolidate looking for the kernel. MFC r354976: Install bsd.sysdir.mk Added: stable/12/share/mk/bsd.sysdir.mk - copied unchanged from r354968, head/share/mk/bsd.sysdir.mk Modified: stable/12/share/mk/Makefile Directory Properties: stable/12/ (props changed) Changes in other areas also in this revision: Added: stable/11/share/mk/bsd.sysdir.mk - copied unchanged from r354968, head/share/mk/bsd.sysdir.mk Modified: stable/11/share/mk/Makefile Directory Properties: stable/11/ (props changed) Modified: stable/12/share/mk/Makefile ============================================================================== --- stable/12/share/mk/Makefile Sat Jan 25 04:57:26 2020 (r357106) +++ stable/12/share/mk/Makefile Sat Jan 25 05:17:44 2020 (r357107) @@ -55,6 +55,7 @@ FILES= \ bsd.suffixes.mk \ bsd.symver.mk \ bsd.sys.mk \ + bsd.sysdir.mk \ bsd.test.mk \ dirdeps.mk \ dirdeps-options.mk \ Copied: stable/12/share/mk/bsd.sysdir.mk (from r354968, head/share/mk/bsd.sysdir.mk) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/12/share/mk/bsd.sysdir.mk Sat Jan 25 05:17:44 2020 (r357107, copy of r354968, head/share/mk/bsd.sysdir.mk) @@ -0,0 +1,16 @@ +# $FreeBSD$ + +# Search for kernel source tree in standard places. +.if !defined(SYSDIR) +.for _dir in ${SRCTOP:D${SRCTOP}/sys} \ + ${.CURDIR}/../.. ${.CURDIR}/../../.. ${.CURDIR}/../../../.. \ + ${.CURDIR}/../../../../.. /sys /usr/src/sys +.if !defined(SYSDIR) && exists(${_dir}/kern/) && exists(${_dir}/conf/kmod.mk) +SYSDIR= ${_dir:tA} +.endif +.endfor +.endif +.if !defined(SYSDIR) || !exists(${SYSDIR}/kern/) || \ + !exists(${SYSDIR}/conf/kmod.mk) +.error Unable to locate the kernel source tree. Set SYSDIR to override. +.endif From owner-svn-src-stable-12@freebsd.org Sat Jan 25 05:48:01 2020 Return-Path: Delivered-To: svn-src-stable-12@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 038C2234898; Sat, 25 Jan 2020 05:48:01 +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.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 484Q5r6gYXz47m3; Sat, 25 Jan 2020 05:48:00 +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 E02B838B5; Sat, 25 Jan 2020 05:48:00 +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 00P5m0FV011169; Sat, 25 Jan 2020 05:48:00 GMT (envelope-from kevans@FreeBSD.org) Received: (from kevans@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 00P5lwcf011153; Sat, 25 Jan 2020 05:47:58 GMT (envelope-from kevans@FreeBSD.org) Message-Id: <202001250547.00P5lwcf011153@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kevans set sender to kevans@FreeBSD.org using -f From: Kyle Evans Date: Sat, 25 Jan 2020 05:47:58 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r357108 - in stable: 11/sys/amd64/linux 11/sys/amd64/linux32 11/sys/compat/cloudabi32 11/sys/compat/cloudabi64 11/sys/compat/freebsd32 11/sys/compat/svr4 11/sys/conf 11/sys/i386/ibcs2 1... X-SVN-Group: stable-12 X-SVN-Commit-Author: kevans X-SVN-Commit-Paths: in stable: 11/sys/amd64/linux 11/sys/amd64/linux32 11/sys/compat/cloudabi32 11/sys/compat/cloudabi64 11/sys/compat/freebsd32 11/sys/compat/svr4 11/sys/conf 11/sys/i386/ibcs2 11/sys/i386/linux 11/sys/k... X-SVN-Commit-Revision: 357108 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-12@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for only the 12-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 25 Jan 2020 05:48:01 -0000 Author: kevans Date: Sat Jan 25 05:47:56 2020 New Revision: 357108 URL: https://svnweb.freebsd.org/changeset/base/357108 Log: MFC r355473, r356540, r356604, r356868, r356937: sysent improvements The main motivation here being .ORDER to render -jN > 1 harmless; svr4/ibcs2 targets were also refactored a bit, but both are irregular and cannot use sysent.mk as-is due to differences in files generated. I have no interest in refactoring, since these are gone in head anyways. r355473: sysent: Reduce duplication and improve readability. Use the power of variable to avoid spelling out source and generated files too many times. The previous Makefiles were hard to read, hard to edit, and badly formatted. r356540: kern/Makefile: systrace_args.c is also generated r356604: Set .ORDER for makesyscalls generated files When either makesyscalls.lua or syscalls.master changes, all of the ${GENERATED} targets are now out-of-date. With make jobs > 1, this means we will run the makesyscalls script in parallel for the same ABI, generating the same set of output files. Prior to r356603 , there is a large window for interlacing output for some of the generated files that we were generating in-place rather than staging in a temp dir. After that, we still should't need to run the script more than once per-ABI as the first invocation should update all of them. Add .ORDER to do so cleanly. r356868: sysent targets: further cleanup and deduplication r355473 vastly improved the readability and cleanliness of these Makefiles. Every single one of them follows the same pattern and duplicates the exact same logic. Now that we have GENERATED/SRCS, split SRCS up into the two parameters we'll use for ${MAKESYSCALLS} rather than assuming a specific ordering of SRCS and include a common sysent.mk to handle the rest. This makes it less tedious to make sweeping changes. Some default values are provided for GENERATED/SYSENT_*; almost all of these just use a 'syscalls.master' and 'syscalls.conf' in cwd, and they all use effectively the same filenames with an arbitrary prefix. Most ABIs will be able to get away with just setting GENERATED_PREFIX and including ^/sys/conf/sysent.mk, while others only need light additions. kern/Makefile is the notable exception, as it doesn't take a SYSENT_CONF and the generated files are spread out between ^/sys/kern and ^/sys/sys, but it otherwise fits the pattern enough to use the common version. r356937: sysent.mk: split interpreter out of target command The main objective here is to make it easy to identify what needs to change in order to use a different sysent generator than the current Lua-based one, which may be used to MFC some of the changes that have happened so we can avoid parallel accidents in stable branches, for instance. As a secondary objective, it's now feasible to override the generator on a per-Makefile basis if needed, so that one could refactor their Makefile to use this while pinning generation to the legacy makesyscalls.sh. I don't anticipate any consistent need for such a thing, but it's low-effort to achieve. Added: stable/12/sys/conf/sysent.mk - copied, changed from r356868, head/sys/conf/sysent.mk Modified: stable/12/sys/amd64/linux/Makefile stable/12/sys/amd64/linux32/Makefile stable/12/sys/arm64/linux/Makefile stable/12/sys/compat/cloudabi32/Makefile stable/12/sys/compat/cloudabi64/Makefile stable/12/sys/compat/freebsd32/Makefile stable/12/sys/i386/ibcs2/Makefile stable/12/sys/i386/linux/Makefile stable/12/sys/kern/Makefile Directory Properties: stable/12/ (props changed) Changes in other areas also in this revision: Added: stable/11/sys/conf/sysent.mk - copied, changed from r356868, head/sys/conf/sysent.mk Modified: stable/11/sys/amd64/linux/Makefile stable/11/sys/amd64/linux32/Makefile stable/11/sys/compat/cloudabi32/Makefile stable/11/sys/compat/cloudabi64/Makefile stable/11/sys/compat/freebsd32/Makefile stable/11/sys/compat/svr4/Makefile stable/11/sys/i386/ibcs2/Makefile stable/11/sys/i386/linux/Makefile stable/11/sys/kern/Makefile Directory Properties: stable/11/ (props changed) Modified: stable/12/sys/amd64/linux/Makefile ============================================================================== --- stable/12/sys/amd64/linux/Makefile Sat Jan 25 05:17:44 2020 (r357107) +++ stable/12/sys/amd64/linux/Makefile Sat Jan 25 05:47:56 2020 (r357108) @@ -2,14 +2,6 @@ # # $FreeBSD$ -# Don't use an OBJDIR -.OBJDIR: ${.CURDIR} +GENERATED_PREFIX= linux_ -all: - @echo "make sysent only" - -sysent: linux_sysent.c linux_syscall.h linux_proto.h linux_syscalls.c linux_systrace_args.c - -linux_sysent.c linux_syscall.h linux_proto.h linux_syscalls.c linux_systrace_args.c: \ - ../../kern/makesyscalls.sh syscalls.master ${.CURDIR}/syscalls.conf - sh ../../kern/makesyscalls.sh syscalls.master ${.CURDIR}/syscalls.conf +.include "../../conf/sysent.mk" Modified: stable/12/sys/amd64/linux32/Makefile ============================================================================== --- stable/12/sys/amd64/linux32/Makefile Sat Jan 25 05:17:44 2020 (r357107) +++ stable/12/sys/amd64/linux32/Makefile Sat Jan 25 05:47:56 2020 (r357108) @@ -2,14 +2,6 @@ # # $FreeBSD$ -# Don't use an OBJDIR -.OBJDIR: ${.CURDIR} +GENERATED_PREFIX= linux32_ -all: - @echo "make sysent only" - -sysent: linux32_sysent.c linux32_syscall.h linux32_proto.h linux32_syscalls.c linux32_systrace_args.c - -linux32_sysent.c linux32_syscall.h linux32_proto.h linux32_syscalls.c linux32_systrace_args.c: ../../kern/makesyscalls.sh \ - syscalls.master ${.CURDIR}/syscalls.conf - sh ../../kern/makesyscalls.sh syscalls.master ${.CURDIR}/syscalls.conf +.include "../../conf/sysent.mk" Modified: stable/12/sys/arm64/linux/Makefile ============================================================================== --- stable/12/sys/arm64/linux/Makefile Sat Jan 25 05:17:44 2020 (r357107) +++ stable/12/sys/arm64/linux/Makefile Sat Jan 25 05:47:56 2020 (r357108) @@ -2,14 +2,6 @@ # # $FreeBSD$ -# Don't use an OBJDIR -.OBJDIR: ${.CURDIR} +GENERATED_PREFIX= linux_ -all: - @echo "make sysent only" - -sysent: linux_sysent.c linux_syscall.h linux_proto.h linux_syscalls.c linux_systrace_args.c - -linux_sysent.c linux_syscall.h linux_proto.h linux_syscalls.c linux_systrace_args.c: \ - ../../kern/makesyscalls.sh syscalls.master ${.CURDIR}/syscalls.conf - sh ../../kern/makesyscalls.sh syscalls.master ${.CURDIR}/syscalls.conf +.include "../../conf/sysent.mk" Modified: stable/12/sys/compat/cloudabi32/Makefile ============================================================================== --- stable/12/sys/compat/cloudabi32/Makefile Sat Jan 25 05:17:44 2020 (r357107) +++ stable/12/sys/compat/cloudabi32/Makefile Sat Jan 25 05:47:56 2020 (r357108) @@ -1,17 +1,6 @@ # $FreeBSD$ -# Don't use an OBJDIR -.OBJDIR: ${.CURDIR} +SYSENT_FILE= ${SYSDIR}/contrib/cloudabi/syscalls32.master +GENERATED_PREFIX= cloudabi32_ -all: - @echo "make sysent only" - -sysent: cloudabi32_sysent.c cloudabi32_syscall.h cloudabi32_proto.h \ - cloudabi32_syscalls.c cloudabi32_systrace_args.c - -cloudabi32_sysent.c cloudabi32_syscall.h cloudabi32_proto.h \ - cloudabi32_syscalls.c cloudabi32_systrace_args.c: \ - ../../kern/makesyscalls.sh ../../contrib/cloudabi/syscalls32.master \ - ${.CURDIR}/syscalls.conf - sh ../../kern/makesyscalls.sh ../../contrib/cloudabi/syscalls32.master \ - ${.CURDIR}/syscalls.conf +.include "../../conf/sysent.mk" Modified: stable/12/sys/compat/cloudabi64/Makefile ============================================================================== --- stable/12/sys/compat/cloudabi64/Makefile Sat Jan 25 05:17:44 2020 (r357107) +++ stable/12/sys/compat/cloudabi64/Makefile Sat Jan 25 05:47:56 2020 (r357108) @@ -1,17 +1,6 @@ # $FreeBSD$ -# Don't use an OBJDIR -.OBJDIR: ${.CURDIR} +SYSENT_FILE= ${SYSDIR}/contrib/cloudabi/syscalls64.master +GENERATED_PREFIX= cloudabi64_ -all: - @echo "make sysent only" - -sysent: cloudabi64_sysent.c cloudabi64_syscall.h cloudabi64_proto.h \ - cloudabi64_syscalls.c cloudabi64_systrace_args.c - -cloudabi64_sysent.c cloudabi64_syscall.h cloudabi64_proto.h \ - cloudabi64_syscalls.c cloudabi64_systrace_args.c: \ - ../../kern/makesyscalls.sh ../../contrib/cloudabi/syscalls64.master \ - ${.CURDIR}/syscalls.conf - sh ../../kern/makesyscalls.sh ../../contrib/cloudabi/syscalls64.master \ - ${.CURDIR}/syscalls.conf +.include "../../conf/sysent.mk" Modified: stable/12/sys/compat/freebsd32/Makefile ============================================================================== --- stable/12/sys/compat/freebsd32/Makefile Sat Jan 25 05:17:44 2020 (r357107) +++ stable/12/sys/compat/freebsd32/Makefile Sat Jan 25 05:47:56 2020 (r357108) @@ -2,18 +2,6 @@ # # $FreeBSD$ -# Don't use an OBJDIR -.OBJDIR: ${.CURDIR} +GENERATED_PREFIX= freebsd32_ -all: - @echo "make sysent only" - -sysent: freebsd32_sysent.c freebsd32_syscall.h freebsd32_proto.h freebsd32_systrace_args.c - -freebsd32_sysent.c freebsd32_syscalls.c freebsd32_syscall.h freebsd32_proto.h freebsd32_systrace_args.c : \ - ../../kern/makesyscalls.sh syscalls.master ${.CURDIR}/syscalls.conf ../../kern/capabilities.conf - sh ../../kern/makesyscalls.sh syscalls.master ${.CURDIR}/syscalls.conf - -clean: - rm -f freebsd32_sysent.c freebsd32_syscalls.c freebsd32_syscall.h freebsd32_proto.h - rm -f freebsd32_systrace_args.c +.include "../../conf/sysent.mk" Copied and modified: stable/12/sys/conf/sysent.mk (from r356868, head/sys/conf/sysent.mk) ============================================================================== --- head/sys/conf/sysent.mk Sat Jan 18 20:37:45 2020 (r356868, copy source) +++ stable/12/sys/conf/sysent.mk Sat Jan 25 05:47:56 2020 (r357108) @@ -4,7 +4,6 @@ .OBJDIR: ${.CURDIR} .include -.include COMMON_GENERATED= proto.h \ syscall.h \ @@ -21,8 +20,11 @@ SYSENT_CONF?= syscalls.conf # and set GENERATED. SRCS+= ${SYSENT_FILE} SRCS+= ${SYSENT_CONF} -MAKESYSCALLS= ${SYSDIR}/tools/makesyscalls.lua +MAKESYSCALLS_INTERP?= sh +MAKESYSCALLS_SCRIPT?= ${SYSDIR}/kern/makesyscalls.sh +MAKESYSCALLS= ${MAKESYSCALLS_INTERP} ${MAKESYSCALLS_SCRIPT} + all: @echo "make sysent only" @@ -31,5 +33,5 @@ all: .ORDER: ${GENERATED} sysent: ${GENERATED} -${GENERATED}: ${MAKESYSCALLS} ${SRCS} - ${LUA} ${MAKESYSCALLS} ${SYSENT_FILE} ${SYSENT_CONF} +${GENERATED}: ${MAKESYSCALLS_SCRIPT} ${SRCS} + ${MAKESYSCALLS} ${SYSENT_FILE} ${SYSENT_CONF} Modified: stable/12/sys/i386/ibcs2/Makefile ============================================================================== --- stable/12/sys/i386/ibcs2/Makefile Sat Jan 25 05:17:44 2020 (r357107) +++ stable/12/sys/i386/ibcs2/Makefile Sat Jan 25 05:47:56 2020 (r357108) @@ -5,23 +5,32 @@ # Don't use an OBJDIR .OBJDIR: ${.CURDIR} +MAKESYSCALLS= ../../kern/makesyscalls.sh +BASE_GENERATED= ibcs2_syscall.h \ + ibcs2_sysent.c \ + ibcs2_proto.h +ISC_GENERATED= ibcs2_isc_syscall.h \ + ibcs2_isc_sysent.c +XENIX_GENERATED= ibcs2_xenix_syscall.h \ + ibcs2_xenix_sysent.c \ + ibcs2_xenix_proto.h + all: @echo "make sysent, isc_sysent or xenix_sysent only" -sysent: ibcs2_sysent.c ibcs2_syscall.h ibcs2_proto.h +.ORDER: ${BASE_GENERATED} +.ORDER: ${ISC_GENERATED} +.ORDER: ${XENIX_GENERATED} -ibcs2_sysent.c ibcs2_syscall.h ibcs2_proto.h: ../../kern/makesyscalls.sh \ - syscalls.master syscalls.conf - sh ../../kern/makesyscalls.sh syscalls.master syscalls.conf +sysent: ${BASE_GENERATED} +isc_sysent: ${ISC_GENERATED} +xenix_sysent: ${XENIX_GENERATED} -isc_sysent: ibcs2_isc_sysent.c ibcs2_isc_syscall.h +${BASE_GENERATED}: ${MAKESYSCALLS} syscalls.master syscalls.conf + sh ${MAKESYSCALLS} syscalls.master syscalls.conf -ibcs2_isc_sysent.c ibcs2_isc_syscall.h : ../../kern/makesyscalls.sh \ - syscalls.isc syscalls.isc.conf - sh ../../kern/makesyscalls.sh syscalls.isc syscalls.isc.conf +${ISC_GENERATED}: ${MAKESYSCALLS} syscalls.isc syscalls.isc.conf + sh ${MAKESYSCALLS} syscalls.isc syscalls.isc.conf -xenix_sysent: ibcs2_xenix_sysent.c ibcs2_xenix_syscall.h ibcs2_xenix.h - -ibcs2_xenix_sysent.c ibcs2_xenix_syscall.h ibcs2_xenix.h: \ - ../../kern/makesyscalls.sh syscalls.xenix syscalls.xenix.conf - sh ../../kern/makesyscalls.sh syscalls.xenix syscalls.xenix.conf +${XENIX_GENERATED}: ${MAKESYSCALLS} syscalls.xenix syscalls.xenix.conf + sh ${MAKESYSCALLS} syscalls.xenix syscalls.xenix.conf Modified: stable/12/sys/i386/linux/Makefile ============================================================================== --- stable/12/sys/i386/linux/Makefile Sat Jan 25 05:17:44 2020 (r357107) +++ stable/12/sys/i386/linux/Makefile Sat Jan 25 05:47:56 2020 (r357108) @@ -2,14 +2,6 @@ # # $FreeBSD$ -# Don't use an OBJDIR -.OBJDIR: ${.CURDIR} +GENERATED_PREFIX= linux_ -all: - @echo "make sysent only" - -sysent: linux_sysent.c linux_syscall.h linux_proto.h linux_syscalls.c linux_systrace_args.c - -linux_sysent.c linux_syscall.h linux_proto.h linux_syscalls.c linux_systrace_args.c: \ - ../../kern/makesyscalls.sh syscalls.master ${.CURDIR}/syscalls.conf - sh ../../kern/makesyscalls.sh syscalls.master ${.CURDIR}/syscalls.conf +.include "../../conf/sysent.mk" Modified: stable/12/sys/kern/Makefile ============================================================================== --- stable/12/sys/kern/Makefile Sat Jan 25 05:17:44 2020 (r357107) +++ stable/12/sys/kern/Makefile Sat Jan 25 05:47:56 2020 (r357108) @@ -3,16 +3,12 @@ # # Makefile for init_sysent -# Don't use an OBJDIR -.OBJDIR: ${.CURDIR} +SYSENT_CONF= +GENERATED= init_sysent.c \ + syscalls.c \ + systrace_args.c \ + ${SYSDIR}/sys/syscall.h \ + ${SYSDIR}/sys/syscall.mk \ + ${SYSDIR}/sys/sysproto.h -all: - @echo "make sysent only" - -sysent: init_sysent.c syscalls.c ../sys/syscall.h ../sys/syscall.mk \ -../sys/sysproto.h - -init_sysent.c syscalls.c systrace_args.c ../sys/syscall.h \ -../sys/syscall.mk ../sys/sysproto.h: makesyscalls.sh syscalls.master \ -capabilities.conf - sh makesyscalls.sh syscalls.master +.include "../conf/sysent.mk" From owner-svn-src-stable-12@freebsd.org Sat Jan 25 05:52:34 2020 Return-Path: Delivered-To: svn-src-stable-12@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 2DA80234C1B; Sat, 25 Jan 2020 05:52:34 +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.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 484QC60GxRz48LV; Sat, 25 Jan 2020 05:52: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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 04C693AFD; Sat, 25 Jan 2020 05:52:34 +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 00P5qXXJ016944; Sat, 25 Jan 2020 05:52:33 GMT (envelope-from kevans@FreeBSD.org) Received: (from kevans@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 00P5qXBD016940; Sat, 25 Jan 2020 05:52:33 GMT (envelope-from kevans@FreeBSD.org) Message-Id: <202001250552.00P5qXBD016940@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kevans set sender to kevans@FreeBSD.org using -f From: Kyle Evans Date: Sat, 25 Jan 2020 05:52:33 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r357109 - in stable: 11/sys/i386/ibcs2 12/sys/i386/ibcs2 X-SVN-Group: stable-12 X-SVN-Commit-Author: kevans X-SVN-Commit-Paths: in stable: 11/sys/i386/ibcs2 12/sys/i386/ibcs2 X-SVN-Commit-Revision: 357109 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-12@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for only the 12-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 25 Jan 2020 05:52:34 -0000 Author: kevans Date: Sat Jan 25 05:52:31 2020 New Revision: 357109 URL: https://svnweb.freebsd.org/changeset/base/357109 Log: Regenerate ibcs2 sysent targets, NFC Direct commit; these hadn't been regenerated in a wihle, and it's nice to see no diff going forward in case these get tweaked a little bit more for conventions. Unlikely. Modified: stable/12/sys/i386/ibcs2/ibcs2_isc_syscall.h stable/12/sys/i386/ibcs2/ibcs2_isc_sysent.c stable/12/sys/i386/ibcs2/ibcs2_xenix.h stable/12/sys/i386/ibcs2/ibcs2_xenix_syscall.h stable/12/sys/i386/ibcs2/ibcs2_xenix_sysent.c Changes in other areas also in this revision: Modified: stable/11/sys/i386/ibcs2/ibcs2_isc_syscall.h stable/11/sys/i386/ibcs2/ibcs2_isc_sysent.c stable/11/sys/i386/ibcs2/ibcs2_xenix.h stable/11/sys/i386/ibcs2/ibcs2_xenix_syscall.h stable/11/sys/i386/ibcs2/ibcs2_xenix_sysent.c Modified: stable/12/sys/i386/ibcs2/ibcs2_isc_syscall.h ============================================================================== --- stable/12/sys/i386/ibcs2/ibcs2_isc_syscall.h Sat Jan 25 05:47:56 2020 (r357108) +++ stable/12/sys/i386/ibcs2/ibcs2_isc_syscall.h Sat Jan 25 05:52:31 2020 (r357109) @@ -1,9 +1,8 @@ /* * System call numbers. * - * DO NOT EDIT-- this file is automatically generated. + * DO NOT EDIT-- this file is automatically @generated. * $FreeBSD$ - * created from FreeBSD: head/sys/i386/ibcs2/syscalls.isc 160798 2006-07-28 19:05:28Z jhb */ #define IBCS2_ISC_ibcs2_rename 2 Modified: stable/12/sys/i386/ibcs2/ibcs2_isc_sysent.c ============================================================================== --- stable/12/sys/i386/ibcs2/ibcs2_isc_sysent.c Sat Jan 25 05:47:56 2020 (r357108) +++ stable/12/sys/i386/ibcs2/ibcs2_isc_sysent.c Sat Jan 25 05:52:31 2020 (r357109) @@ -1,9 +1,8 @@ /* * System call switch table. * - * DO NOT EDIT-- this file is automatically generated. + * DO NOT EDIT-- this file is automatically @generated. * $FreeBSD$ - * created from FreeBSD: head/sys/i386/ibcs2/syscalls.isc 160798 2006-07-28 19:05:28Z jhb */ #include Modified: stable/12/sys/i386/ibcs2/ibcs2_xenix.h ============================================================================== --- stable/12/sys/i386/ibcs2/ibcs2_xenix.h Sat Jan 25 05:47:56 2020 (r357108) +++ stable/12/sys/i386/ibcs2/ibcs2_xenix.h Sat Jan 25 05:52:31 2020 (r357109) @@ -1,9 +1,8 @@ /* * System call prototypes. * - * DO NOT EDIT-- this file is automatically generated. + * DO NOT EDIT-- this file is automatically @generated. * $FreeBSD$ - * created from FreeBSD: head/sys/i386/ibcs2/syscalls.xenix 160798 2006-07-28 19:05:28Z jhb */ #ifndef _IBCS2_XENIX_H_ @@ -12,8 +11,11 @@ #include #include #include +#include +#include #include #include +#include #include @@ -134,6 +136,18 @@ int xenix_utsname(struct thread *, struct xenix_utsnam #endif /* COMPAT_FREEBSD7 */ + + +#ifdef COMPAT_FREEBSD10 + + +#endif /* COMPAT_FREEBSD10 */ + + +#ifdef COMPAT_FREEBSD11 + + +#endif /* COMPAT_FREEBSD11 */ #define IBCS2_XENIX_AUE_xenix_rdchk AUE_NULL #define IBCS2_XENIX_AUE_xenix_chsize AUE_FTRUNCATE Modified: stable/12/sys/i386/ibcs2/ibcs2_xenix_syscall.h ============================================================================== --- stable/12/sys/i386/ibcs2/ibcs2_xenix_syscall.h Sat Jan 25 05:47:56 2020 (r357108) +++ stable/12/sys/i386/ibcs2/ibcs2_xenix_syscall.h Sat Jan 25 05:52:31 2020 (r357109) @@ -1,9 +1,8 @@ /* * System call numbers. * - * DO NOT EDIT-- this file is automatically generated. + * DO NOT EDIT-- this file is automatically @generated. * $FreeBSD$ - * created from FreeBSD: head/sys/i386/ibcs2/syscalls.xenix 160798 2006-07-28 19:05:28Z jhb */ #define IBCS2_XENIX_xenix_rdchk 7 Modified: stable/12/sys/i386/ibcs2/ibcs2_xenix_sysent.c ============================================================================== --- stable/12/sys/i386/ibcs2/ibcs2_xenix_sysent.c Sat Jan 25 05:47:56 2020 (r357108) +++ stable/12/sys/i386/ibcs2/ibcs2_xenix_sysent.c Sat Jan 25 05:52:31 2020 (r357109) @@ -1,9 +1,8 @@ /* * System call switch table. * - * DO NOT EDIT-- this file is automatically generated. + * DO NOT EDIT-- this file is automatically @generated. * $FreeBSD$ - * created from FreeBSD: head/sys/i386/ibcs2/syscalls.xenix 160798 2006-07-28 19:05:28Z jhb */ #include From owner-svn-src-stable-12@freebsd.org Sat Jan 25 09:12:21 2020 Return-Path: Delivered-To: svn-src-stable-12@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 14512239DCA; Sat, 25 Jan 2020 09:12:21 +0000 (UTC) (envelope-from eugen@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 484Vdc6rT5z4J0V; Sat, 25 Jan 2020 09:12:20 +0000 (UTC) (envelope-from eugen@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1: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 E62AA6026; Sat, 25 Jan 2020 09:12:20 +0000 (UTC) (envelope-from eugen@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 00P9CKvQ035369; Sat, 25 Jan 2020 09:12:20 GMT (envelope-from eugen@FreeBSD.org) Received: (from eugen@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 00P9CKhe035368; Sat, 25 Jan 2020 09:12:20 GMT (envelope-from eugen@FreeBSD.org) Message-Id: <202001250912.00P9CKhe035368@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: eugen set sender to eugen@FreeBSD.org using -f From: Eugene Grosbein Date: Sat, 25 Jan 2020 09:12:20 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r357111 - stable/12/sys/net X-SVN-Group: stable-12 X-SVN-Commit-Author: eugen X-SVN-Commit-Paths: stable/12/sys/net X-SVN-Commit-Revision: 357111 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-12@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for only the 12-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 25 Jan 2020 09:12:21 -0000 Author: eugen Date: Sat Jan 25 09:12:20 2020 New Revision: 357111 URL: https://svnweb.freebsd.org/changeset/base/357111 Log: MFC r356863: ifa_maintain_loopback_route: adjust debugging output Correction after r333476: - write this as LOG_DEBUG again instead of LOG_INFO; - get back function name into the message; - error may be ESRCH if an address is removed in process (by carp f.e.), not only ENOENT; - expression complexity grows, so try making it more readable. Modified: stable/12/sys/net/if.c Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/net/if.c ============================================================================== --- stable/12/sys/net/if.c Sat Jan 25 08:57:26 2020 (r357110) +++ stable/12/sys/net/if.c Sat Jan 25 09:12:20 2020 (r357111) @@ -1920,10 +1920,13 @@ ifa_maintain_loopback_route(int cmd, const char *otype error = rtrequest1_fib(cmd, &info, NULL, ifp->if_fib); - if (error != 0 && - !(cmd == RTM_ADD && error == EEXIST) && - !(cmd == RTM_DELETE && error == ENOENT)) - if_printf(ifp, "%s failed: %d\n", otype, error); + if (error == 0 || + (cmd == RTM_ADD && error == EEXIST) || + (cmd == RTM_DELETE && (error == ENOENT || error == ESRCH))) + return (error); + + log(LOG_DEBUG, "%s: %s failed for interface %s: %u\n", + __func__, otype, if_name(ifp), error); return (error); }