From owner-svn-src-all@freebsd.org Sun Jan 13 00:19:16 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 4646914A344A; Sun, 13 Jan 2019 00:19:16 +0000 (UTC) (envelope-from cognet@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 D7616762B6; Sun, 13 Jan 2019 00:19:15 +0000 (UTC) (envelope-from cognet@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1: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 C783EAD50; Sun, 13 Jan 2019 00:19:15 +0000 (UTC) (envelope-from cognet@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x0D0JFEZ071229; Sun, 13 Jan 2019 00:19:15 GMT (envelope-from cognet@FreeBSD.org) Received: (from cognet@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x0D0JFRD071228; Sun, 13 Jan 2019 00:19:15 GMT (envelope-from cognet@FreeBSD.org) Message-Id: <201901130019.x0D0JFRD071228@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: cognet set sender to cognet@FreeBSD.org using -f From: Olivier Houchard Date: Sun, 13 Jan 2019 00:19:15 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r342978 - head/sys/kern X-SVN-Group: head X-SVN-Commit-Author: cognet X-SVN-Commit-Paths: head/sys/kern X-SVN-Commit-Revision: 342978 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: D7616762B6 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.97 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_SHORT(-0.97)[-0.969,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_LONG(-1.00)[-0.999,0] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 13 Jan 2019 00:19:16 -0000 Author: cognet Date: Sun Jan 13 00:19:15 2019 New Revision: 342978 URL: https://svnweb.freebsd.org/changeset/base/342978 Log: Instead of using an incomplete list of platforms that uses 64bits time_t in 32bits mode, special case amd64, as i386 is the only arch that still uses 32bits time_t. Modified: head/sys/kern/kern_tc.c Modified: head/sys/kern/kern_tc.c ============================================================================== --- head/sys/kern/kern_tc.c Sat Jan 12 22:36:33 2019 (r342977) +++ head/sys/kern/kern_tc.c Sun Jan 13 00:19:15 2019 (r342978) @@ -145,7 +145,8 @@ sysctl_kern_boottime(SYSCTL_HANDLER_ARGS) getboottime(&boottime); -#ifndef __mips__ +/* i386 is the only arch which uses a 32bits time_t */ +#ifdef __amd64__ #ifdef SCTL_MASK32 int tv[2]; From owner-svn-src-all@freebsd.org Sun Jan 13 00:37:32 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 1EB1014A3D1B; Sun, 13 Jan 2019 00:37:32 +0000 (UTC) (envelope-from cognet@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 B2F5876F47; Sun, 13 Jan 2019 00:37:31 +0000 (UTC) (envelope-from cognet@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1: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 A4537B0B0; Sun, 13 Jan 2019 00:37:31 +0000 (UTC) (envelope-from cognet@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x0D0bVUr082073; Sun, 13 Jan 2019 00:37:31 GMT (envelope-from cognet@FreeBSD.org) Received: (from cognet@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x0D0bVcE082072; Sun, 13 Jan 2019 00:37:31 GMT (envelope-from cognet@FreeBSD.org) Message-Id: <201901130037.x0D0bVcE082072@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: cognet set sender to cognet@FreeBSD.org using -f From: Olivier Houchard Date: Sun, 13 Jan 2019 00:37:31 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r342979 - head/sys/compat/freebsd32 X-SVN-Group: head X-SVN-Commit-Author: cognet X-SVN-Commit-Paths: head/sys/compat/freebsd32 X-SVN-Commit-Revision: 342979 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: B2F5876F47 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.97 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_SHORT(-0.97)[-0.969,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_LONG(-1.00)[-0.999,0] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 13 Jan 2019 00:37:32 -0000 Author: cognet Date: Sun Jan 13 00:37:31 2019 New Revision: 342979 URL: https://svnweb.freebsd.org/changeset/base/342979 Log: amd64 is the only arch that doesn't require padding for 32bits syscalls, so instead of listing every arch thar requires it, just exclude amd64. Modified: head/sys/compat/freebsd32/syscalls.master Modified: head/sys/compat/freebsd32/syscalls.master ============================================================================== --- head/sys/compat/freebsd32/syscalls.master Sun Jan 13 00:19:15 2019 (r342978) +++ head/sys/compat/freebsd32/syscalls.master Sun Jan 13 00:37:31 2019 (r342979) @@ -54,7 +54,7 @@ #include #include -#if !defined(PAD64_REQUIRED) && (defined(__powerpc__) || defined(__mips__)) +#if !defined(PAD64_REQUIRED) && !defined(__amd64__) #define PAD64_REQUIRED #endif From owner-svn-src-all@freebsd.org Sun Jan 13 00:38:57 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 4ABA014A3EA0; Sun, 13 Jan 2019 00:38:57 +0000 (UTC) (envelope-from cognet@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 DFB1B7756A; Sun, 13 Jan 2019 00:38:56 +0000 (UTC) (envelope-from cognet@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1: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 92BBDB0B8; Sun, 13 Jan 2019 00:38:56 +0000 (UTC) (envelope-from cognet@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x0D0cu12082987; Sun, 13 Jan 2019 00:38:56 GMT (envelope-from cognet@FreeBSD.org) Received: (from cognet@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x0D0ctiC082981; Sun, 13 Jan 2019 00:38:55 GMT (envelope-from cognet@FreeBSD.org) Message-Id: <201901130038.x0D0ctiC082981@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: cognet set sender to cognet@FreeBSD.org using -f From: Olivier Houchard Date: Sun, 13 Jan 2019 00:38:55 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r342980 - head/sys/compat/freebsd32 X-SVN-Group: head X-SVN-Commit-Author: cognet X-SVN-Commit-Paths: head/sys/compat/freebsd32 X-SVN-Commit-Revision: 342980 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: DFB1B7756A X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.97 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_SHORT(-0.97)[-0.971,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_LONG(-1.00)[-0.999,0] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 13 Jan 2019 00:38:57 -0000 Author: cognet Date: Sun Jan 13 00:38:55 2019 New Revision: 342980 URL: https://svnweb.freebsd.org/changeset/base/342980 Log: Regenerate sysent files after having modified syscalls.master. Modified: head/sys/compat/freebsd32/freebsd32_proto.h head/sys/compat/freebsd32/freebsd32_syscalls.c head/sys/compat/freebsd32/freebsd32_sysent.c head/sys/compat/freebsd32/freebsd32_systrace_args.c Modified: head/sys/compat/freebsd32/freebsd32_proto.h ============================================================================== --- head/sys/compat/freebsd32/freebsd32_proto.h Sun Jan 13 00:37:31 2019 (r342979) +++ head/sys/compat/freebsd32/freebsd32_proto.h Sun Jan 13 00:38:55 2019 (r342980) @@ -34,7 +34,7 @@ struct thread; #define PADR_(t) 0 #endif -#if !defined(PAD64_REQUIRED) && (defined(__powerpc__) || defined(__mips__)) +#if !defined(PAD64_REQUIRED) && !defined(__amd64__) #define PAD64_REQUIRED #endif struct freebsd32_wait4_args { @@ -167,7 +167,7 @@ struct freebsd32___sysctl_args { char namelen_l_[PADL_(u_int)]; u_int namelen; char namelen_r_[PADR_(u_int)]; char old_l_[PADL_(void *)]; void * old; char old_r_[PADR_(void *)]; char oldlenp_l_[PADL_(uint32_t *)]; uint32_t * oldlenp; char oldlenp_r_[PADR_(uint32_t *)]; - char new_l_[PADL_(void *)]; void * new; char new_r_[PADR_(void *)]; + char new_l_[PADL_(const void *)]; const void * new; char new_r_[PADR_(const void *)]; char newlen_l_[PADL_(uint32_t)]; uint32_t newlen; char newlen_r_[PADR_(uint32_t)]; }; struct freebsd32_futimes_args { @@ -728,7 +728,7 @@ struct freebsd32_cpuset_setdomain_args { char mask_l_[PADL_(domainset_t *)]; domainset_t * mask; char mask_r_[PADR_(domainset_t *)]; char policy_l_[PADL_(int)]; int policy; char policy_r_[PADR_(int)]; }; -#if !defined(PAD64_REQUIRED) && (defined(__powerpc__) || defined(__mips__)) +#if !defined(PAD64_REQUIRED) && !defined(__amd64__) #define PAD64_REQUIRED #endif int freebsd32_wait4(struct thread *, struct freebsd32_wait4_args *); @@ -868,7 +868,7 @@ int freebsd32_cpuset_setdomain(struct thread *, struct #ifdef COMPAT_43 -#if !defined(PAD64_REQUIRED) && (defined(__powerpc__) || defined(__mips__)) +#if !defined(PAD64_REQUIRED) && !defined(__amd64__) #define PAD64_REQUIRED #endif struct ofreebsd32_lseek_args { @@ -963,7 +963,7 @@ int ofreebsd32_getdirentries(struct thread *, struct o #ifdef COMPAT_FREEBSD4 -#if !defined(PAD64_REQUIRED) && (defined(__powerpc__) || defined(__mips__)) +#if !defined(PAD64_REQUIRED) && !defined(__amd64__) #define PAD64_REQUIRED #endif struct freebsd4_freebsd32_getfsstat_args { @@ -1029,7 +1029,7 @@ int freebsd4_freebsd32_sigreturn(struct thread *, stru #ifdef COMPAT_FREEBSD6 -#if !defined(PAD64_REQUIRED) && (defined(__powerpc__) || defined(__mips__)) +#if !defined(PAD64_REQUIRED) && !defined(__amd64__) #define PAD64_REQUIRED #endif struct freebsd6_freebsd32_pread_args { @@ -1119,7 +1119,7 @@ int freebsd6_freebsd32_lio_listio(struct thread *, str #ifdef COMPAT_FREEBSD7 -#if !defined(PAD64_REQUIRED) && (defined(__powerpc__) || defined(__mips__)) +#if !defined(PAD64_REQUIRED) && !defined(__amd64__) #define PAD64_REQUIRED #endif struct freebsd7_freebsd32_semctl_args { @@ -1162,7 +1162,7 @@ int freebsd7_freebsd32_shmctl(struct thread *, struct #ifdef COMPAT_FREEBSD10 -#if !defined(PAD64_REQUIRED) && (defined(__powerpc__) || defined(__mips__)) +#if !defined(PAD64_REQUIRED) && !defined(__amd64__) #define PAD64_REQUIRED #endif #ifdef PAD64_REQUIRED @@ -1187,7 +1187,7 @@ int freebsd10_freebsd32_pipe(struct thread *, struct f #ifdef COMPAT_FREEBSD11 -#if !defined(PAD64_REQUIRED) && (defined(__powerpc__) || defined(__mips__)) +#if !defined(PAD64_REQUIRED) && !defined(__amd64__) #define PAD64_REQUIRED #endif struct freebsd11_freebsd32_stat_args { Modified: head/sys/compat/freebsd32/freebsd32_syscalls.c ============================================================================== --- head/sys/compat/freebsd32/freebsd32_syscalls.c Sun Jan 13 00:37:31 2019 (r342979) +++ head/sys/compat/freebsd32/freebsd32_syscalls.c Sun Jan 13 00:38:55 2019 (r342980) @@ -6,7 +6,7 @@ */ const char *freebsd32_syscallnames[] = { -#if !defined(PAD64_REQUIRED) && (defined(__powerpc__) || defined(__mips__)) +#if !defined(PAD64_REQUIRED) && !defined(__amd64__) #define PAD64_REQUIRED #endif "syscall", /* 0 = syscall */ Modified: head/sys/compat/freebsd32/freebsd32_sysent.c ============================================================================== --- head/sys/compat/freebsd32/freebsd32_sysent.c Sun Jan 13 00:37:31 2019 (r342979) +++ head/sys/compat/freebsd32/freebsd32_sysent.c Sun Jan 13 00:38:55 2019 (r342980) @@ -53,7 +53,7 @@ /* The casts are bogus but will do for now. */ struct sysent freebsd32_sysent[] = { -#if !defined(PAD64_REQUIRED) && (defined(__powerpc__) || defined(__mips__)) +#if !defined(PAD64_REQUIRED) && !defined(__amd64__) #define PAD64_REQUIRED #endif { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 0 = syscall */ Modified: head/sys/compat/freebsd32/freebsd32_systrace_args.c ============================================================================== --- head/sys/compat/freebsd32/freebsd32_systrace_args.c Sun Jan 13 00:37:31 2019 (r342979) +++ head/sys/compat/freebsd32/freebsd32_systrace_args.c Sun Jan 13 00:38:55 2019 (r342980) @@ -11,7 +11,7 @@ systrace_args(int sysnum, void *params, uint64_t *uarg { int64_t *iarg = (int64_t *) uarg; switch (sysnum) { -#if !defined(PAD64_REQUIRED) && (defined(__powerpc__) || defined(__mips__)) +#if !defined(PAD64_REQUIRED) && !defined(__amd64__) #define PAD64_REQUIRED #endif /* nosys */ @@ -942,7 +942,7 @@ systrace_args(int sysnum, void *params, uint64_t *uarg uarg[1] = p->namelen; /* u_int */ uarg[2] = (intptr_t) p->old; /* void * */ uarg[3] = (intptr_t) p->oldlenp; /* uint32_t * */ - uarg[4] = (intptr_t) p->new; /* void * */ + uarg[4] = (intptr_t) p->new; /* const void * */ uarg[5] = p->newlen; /* uint32_t */ *n_args = 6; break; @@ -3320,7 +3320,7 @@ systrace_entry_setargdesc(int sysnum, int ndx, char *d { const char *p = NULL; switch (sysnum) { -#if !defined(PAD64_REQUIRED) && (defined(__powerpc__) || defined(__mips__)) +#if !defined(PAD64_REQUIRED) && !defined(__amd64__) #define PAD64_REQUIRED #endif /* nosys */ @@ -4823,7 +4823,7 @@ systrace_entry_setargdesc(int sysnum, int ndx, char *d p = "userland uint32_t *"; break; case 4: - p = "userland void *"; + p = "userland const void *"; break; case 5: p = "uint32_t"; @@ -8916,7 +8916,7 @@ systrace_return_setargdesc(int sysnum, int ndx, char * { const char *p = NULL; switch (sysnum) { -#if !defined(PAD64_REQUIRED) && (defined(__powerpc__) || defined(__mips__)) +#if !defined(PAD64_REQUIRED) && !defined(__amd64__) #define PAD64_REQUIRED #endif /* nosys */ From owner-svn-src-all@freebsd.org Sun Jan 13 02:27:11 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id A8BB01483C4C; Sun, 13 Jan 2019 02:27:11 +0000 (UTC) (envelope-from avos@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 4D7E383C44; Sun, 13 Jan 2019 02:27:11 +0000 (UTC) (envelope-from avos@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1: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 26EE1CA7F; Sun, 13 Jan 2019 02:27:11 +0000 (UTC) (envelope-from avos@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x0D2RBAv041223; Sun, 13 Jan 2019 02:27:11 GMT (envelope-from avos@FreeBSD.org) Received: (from avos@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x0D2RAx6041222; Sun, 13 Jan 2019 02:27:10 GMT (envelope-from avos@FreeBSD.org) Message-Id: <201901130227.x0D2RAx6041222@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: avos set sender to avos@FreeBSD.org using -f From: Andriy Voskoboinyk Date: Sun, 13 Jan 2019 02:27:10 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r342983 - stable/10/usr.sbin/powerd X-SVN-Group: stable-10 X-SVN-Commit-Author: avos X-SVN-Commit-Paths: stable/10/usr.sbin/powerd X-SVN-Commit-Revision: 342983 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 4D7E383C44 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.97 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_SHORT(-0.97)[-0.970,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_LONG(-1.00)[-0.998,0] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 13 Jan 2019 02:27:11 -0000 Author: avos Date: Sun Jan 13 02:27:10 2019 New Revision: 342983 URL: https://svnweb.freebsd.org/changeset/base/342983 Log: MFC r342810: powerd(8): allow to force a method of battery state query This change allows to determine power source via sysctl or /dev/apm when devd(8) is running (used by default). Based on patch from PR; other changes on top of it: - '-f' (force) -> '-s' (source) parameter renaming; - allow 'apm' -> 'devd' transition when '-s devd' is set (if APM is enabled); - man page update. PR: 125707 Submitted by: Konstantin Stepanov Reviewed by: bcr, imp Differential Revision: https://reviews.freebsd.org/D18742 Modified: stable/10/usr.sbin/powerd/powerd.8 stable/10/usr.sbin/powerd/powerd.c Directory Properties: stable/10/ (props changed) Modified: stable/10/usr.sbin/powerd/powerd.8 ============================================================================== --- stable/10/usr.sbin/powerd/powerd.8 Sun Jan 13 02:23:18 2019 (r342982) +++ stable/10/usr.sbin/powerd/powerd.8 Sun Jan 13 02:27:10 2019 (r342983) @@ -24,7 +24,7 @@ .\" .\" $FreeBSD$ .\" -.Dd July 4, 2013 +.Dd January 13, 2019 .Dt POWERD 8 .Os .Sh NAME @@ -41,6 +41,7 @@ .Op Fl p Ar ival .Op Fl P Ar pidfile .Op Fl r Ar percent +.Op Fl s Ar source .Op Fl v .Sh DESCRIPTION The @@ -117,6 +118,14 @@ The default is Specifies the CPU load percent level where adaptive mode should consider the CPU running and increase performance. The default is 75% or higher. +.It Fl s Ar source +Enforces method for AC line state refresh; by default, it is chosen +automatically. +The set of valid methods is +.Cm sysctl , devd +and +.Cm apm +(i386 only). .It Fl v Verbose mode. Messages about power changes will be printed to stdout and Modified: stable/10/usr.sbin/powerd/powerd.c ============================================================================== --- stable/10/usr.sbin/powerd/powerd.c Sun Jan 13 02:23:18 2019 (r342982) +++ stable/10/usr.sbin/powerd/powerd.c Sun Jan 13 02:27:10 2019 (r342983) @@ -111,14 +111,16 @@ static int vflag; static volatile sig_atomic_t exit_requested; static power_src_t acline_status; -static enum { +typedef enum { ac_none, ac_sysctl, ac_acpi_devd, #ifdef USE_APM ac_apm, #endif -} acline_mode; +} acline_mode_t; +static acline_mode_t acline_mode; +static acline_mode_t acline_mode_user = ac_none; #ifdef USE_APM static int apm_fd = -1; #endif @@ -284,21 +286,28 @@ get_freq_id(int freq, int *freqs, int numfreqs) static void acline_init(void) { + int skip_source_check; + acline_mib_len = 4; acline_status = SRC_UNKNOWN; + skip_source_check = (acline_mode_user == ac_none || + acline_mode_user == ac_acpi_devd); - if (sysctlnametomib(ACPIAC, acline_mib, &acline_mib_len) == 0) { + if ((skip_source_check || acline_mode_user == ac_sysctl) && + sysctlnametomib(ACPIAC, acline_mib, &acline_mib_len) == 0) { acline_mode = ac_sysctl; if (vflag) warnx("using sysctl for AC line status"); #if __powerpc__ - } else if (sysctlnametomib(PMUAC, acline_mib, &acline_mib_len) == 0) { + } else if ((skip_source_check || acline_mode_user == ac_sysctl) && + sysctlnametomib(PMUAC, acline_mib, &acline_mib_len) == 0) { acline_mode = ac_sysctl; if (vflag) warnx("using sysctl for AC line status"); #endif #ifdef USE_APM - } else if ((apm_fd = open(APMDEV, O_RDONLY)) >= 0) { + } else if ((skip_source_check || acline_mode_user == ac_apm) && + (apm_fd = open(APMDEV, O_RDONLY)) >= 0) { if (vflag) warnx("using APM for AC line status"); acline_mode = ac_apm; @@ -358,7 +367,17 @@ acline_read(void) } #endif /* try to (re)connect to devd */ - if (acline_mode == ac_sysctl) { +#ifdef USE_APM + if ((acline_mode == ac_sysctl && + (acline_mode_user == ac_none || + acline_mode_user == ac_acpi_devd)) || + (acline_mode == ac_apm && + acline_mode_user == ac_acpi_devd)) { +#else + if (acline_mode == ac_sysctl && + (acline_mode_user == ac_none || + acline_mode_user == ac_acpi_devd)) { +#endif struct timeval now; gettimeofday(&now, NULL); @@ -431,6 +450,21 @@ parse_mode(char *arg, int *mode, int ch) } static void +parse_acline_mode(char *arg, int ch) +{ + if (strcmp(arg, "sysctl") == 0) + acline_mode_user = ac_sysctl; + else if (strcmp(arg, "devd") == 0) + acline_mode_user = ac_acpi_devd; +#ifdef USE_APM + else if (strcmp(arg, "apm") == 0) + acline_mode_user = ac_apm; +#endif + else + errx(1, "bad option: -%c %s", (char)ch, optarg); +} + +static void handle_sigs(int __unused sig) { @@ -442,7 +476,7 @@ usage(void) { fprintf(stderr, -"usage: powerd [-v] [-a mode] [-b mode] [-i %%] [-m freq] [-M freq] [-n mode] [-p ival] [-r %%] [-P pidfile]\n"); +"usage: powerd [-v] [-a mode] [-b mode] [-i %%] [-m freq] [-M freq] [-n mode] [-p ival] [-r %%] [-s source] [-P pidfile]\n"); exit(1); } @@ -473,13 +507,16 @@ main(int argc, char * argv[]) if (geteuid() != 0) errx(1, "must be root to run"); - while ((ch = getopt(argc, argv, "a:b:i:m:M:n:p:P:r:v")) != -1) + while ((ch = getopt(argc, argv, "a:b:i:m:M:n:p:P:r:s:v")) != -1) switch (ch) { case 'a': parse_mode(optarg, &mode_ac, ch); break; case 'b': parse_mode(optarg, &mode_battery, ch); + break; + case 's': + parse_acline_mode(optarg, ch); break; case 'i': cpu_idle_mark = atoi(optarg); From owner-svn-src-all@freebsd.org Sun Jan 13 02:28:38 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 8FE191483E16; Sun, 13 Jan 2019 02:28:38 +0000 (UTC) (envelope-from jhibbits@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 2F63A83F66; Sun, 13 Jan 2019 02:28:38 +0000 (UTC) (envelope-from jhibbits@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1: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 24D63CA8D; Sun, 13 Jan 2019 02:28:38 +0000 (UTC) (envelope-from jhibbits@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x0D2Scup041464; Sun, 13 Jan 2019 02:28:38 GMT (envelope-from jhibbits@FreeBSD.org) Received: (from jhibbits@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x0D2SbWi041463; Sun, 13 Jan 2019 02:28:38 GMT (envelope-from jhibbits@FreeBSD.org) Message-Id: <201901130228.x0D2SbWi041463@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jhibbits set sender to jhibbits@FreeBSD.org using -f From: Justin Hibbits Date: Sun, 13 Jan 2019 02:28:37 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r342984 - head/sys/powerpc/powerpc X-SVN-Group: head X-SVN-Commit-Author: jhibbits X-SVN-Commit-Paths: head/sys/powerpc/powerpc X-SVN-Commit-Revision: 342984 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 2F63A83F66 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.97 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_SHORT(-0.97)[-0.969,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_LONG(-1.00)[-0.999,0] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 13 Jan 2019 02:28:38 -0000 Author: jhibbits Date: Sun Jan 13 02:28:37 2019 New Revision: 342984 URL: https://svnweb.freebsd.org/changeset/base/342984 Log: Add AT_HWCAP / AT_HWCAP2 to elf64_sysvec_v2. Summary: I was working on implementing ifuncs on powerpc64 elfv2 today, and I suddenly realized that the reason I was having so much trouble with AT_HWCAP and AT_HWCAP2 is they are missing from the sysentvec. After adding them, the auxv is being filled like it should. Submitted by: Brandon Bergren (git_bdragon.rtk0.net) Differential Revision: https://reviews.freebsd.org/D18575 Modified: head/sys/powerpc/powerpc/elf64_machdep.c Modified: head/sys/powerpc/powerpc/elf64_machdep.c ============================================================================== --- head/sys/powerpc/powerpc/elf64_machdep.c Sun Jan 13 02:27:10 2019 (r342983) +++ head/sys/powerpc/powerpc/elf64_machdep.c Sun Jan 13 02:28:37 2019 (r342984) @@ -125,6 +125,9 @@ struct sysentvec elf64_freebsd_sysvec_v2 = { .sv_shared_page_len = PAGE_SIZE, .sv_schedtail = NULL, .sv_thread_detach = NULL, + .sv_trap = NULL, + .sv_hwcap = &cpu_features, + .sv_hwcap2 = &cpu_features2, }; INIT_SYSENTVEC(elf64_sysvec_v2, &elf64_freebsd_sysvec_v2); From owner-svn-src-all@freebsd.org Sun Jan 13 02:19:02 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 6AF88148380F; Sun, 13 Jan 2019 02:19:02 +0000 (UTC) (envelope-from avos@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 0775B83643; Sun, 13 Jan 2019 02:19:02 +0000 (UTC) (envelope-from avos@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1: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 F0062C897; Sun, 13 Jan 2019 02:19:01 +0000 (UTC) (envelope-from avos@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x0D2J1HG035852; Sun, 13 Jan 2019 02:19:01 GMT (envelope-from avos@FreeBSD.org) Received: (from avos@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x0D2J1Ik035850; Sun, 13 Jan 2019 02:19:01 GMT (envelope-from avos@FreeBSD.org) Message-Id: <201901130219.x0D2J1Ik035850@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: avos set sender to avos@FreeBSD.org using -f From: Andriy Voskoboinyk Date: Sun, 13 Jan 2019 02:19:01 +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: r342981 - stable/12/usr.sbin/powerd X-SVN-Group: stable-12 X-SVN-Commit-Author: avos X-SVN-Commit-Paths: stable/12/usr.sbin/powerd X-SVN-Commit-Revision: 342981 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 0775B83643 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.97 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_SHORT(-0.97)[-0.970,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_LONG(-1.00)[-0.998,0] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 13 Jan 2019 02:19:02 -0000 Author: avos Date: Sun Jan 13 02:19:01 2019 New Revision: 342981 URL: https://svnweb.freebsd.org/changeset/base/342981 Log: MFC r342810: powerd(8): allow to force a method of battery state query This change allows to determine power source via sysctl or /dev/apm when devd(8) is running (used by default). Based on patch from PR; other changes on top of it: - '-f' (force) -> '-s' (source) parameter renaming; - allow 'apm' -> 'devd' transition when '-s devd' is set (if APM is enabled); - man page update. PR: 125707 Submitted by: Konstantin Stepanov Reviewed by: bcr, imp Differential Revision: https://reviews.freebsd.org/D18742 Modified: stable/12/usr.sbin/powerd/powerd.8 stable/12/usr.sbin/powerd/powerd.c Directory Properties: stable/12/ (props changed) Modified: stable/12/usr.sbin/powerd/powerd.8 ============================================================================== --- stable/12/usr.sbin/powerd/powerd.8 Sun Jan 13 00:38:55 2019 (r342980) +++ stable/12/usr.sbin/powerd/powerd.8 Sun Jan 13 02:19:01 2019 (r342981) @@ -24,7 +24,7 @@ .\" .\" $FreeBSD$ .\" -.Dd July 4, 2013 +.Dd January 13, 2019 .Dt POWERD 8 .Os .Sh NAME @@ -41,6 +41,7 @@ .Op Fl p Ar ival .Op Fl P Ar pidfile .Op Fl r Ar percent +.Op Fl s Ar source .Op Fl v .Sh DESCRIPTION The @@ -117,6 +118,14 @@ The default is Specifies the CPU load percent level where adaptive mode should consider the CPU running and increase performance. The default is 75% or higher. +.It Fl s Ar source +Enforces method for AC line state refresh; by default, it is chosen +automatically. +The set of valid methods is +.Cm sysctl , devd +and +.Cm apm +(i386 only). .It Fl v Verbose mode. Messages about power changes will be printed to stdout and Modified: stable/12/usr.sbin/powerd/powerd.c ============================================================================== --- stable/12/usr.sbin/powerd/powerd.c Sun Jan 13 00:38:55 2019 (r342980) +++ stable/12/usr.sbin/powerd/powerd.c Sun Jan 13 02:19:01 2019 (r342981) @@ -113,14 +113,16 @@ static int vflag; static volatile sig_atomic_t exit_requested; static power_src_t acline_status; -static enum { +typedef enum { ac_none, ac_sysctl, ac_acpi_devd, #ifdef USE_APM ac_apm, #endif -} acline_mode; +} acline_mode_t; +static acline_mode_t acline_mode; +static acline_mode_t acline_mode_user = ac_none; #ifdef USE_APM static int apm_fd = -1; #endif @@ -286,21 +288,28 @@ get_freq_id(int freq, int *freqs, int numfreqs) static void acline_init(void) { + int skip_source_check; + acline_mib_len = 4; acline_status = SRC_UNKNOWN; + skip_source_check = (acline_mode_user == ac_none || + acline_mode_user == ac_acpi_devd); - if (sysctlnametomib(ACPIAC, acline_mib, &acline_mib_len) == 0) { + if ((skip_source_check || acline_mode_user == ac_sysctl) && + sysctlnametomib(ACPIAC, acline_mib, &acline_mib_len) == 0) { acline_mode = ac_sysctl; if (vflag) warnx("using sysctl for AC line status"); #ifdef __powerpc__ - } else if (sysctlnametomib(PMUAC, acline_mib, &acline_mib_len) == 0) { + } else if ((skip_source_check || acline_mode_user == ac_sysctl) && + sysctlnametomib(PMUAC, acline_mib, &acline_mib_len) == 0) { acline_mode = ac_sysctl; if (vflag) warnx("using sysctl for AC line status"); #endif #ifdef USE_APM - } else if ((apm_fd = open(APMDEV, O_RDONLY)) >= 0) { + } else if ((skip_source_check || acline_mode_user == ac_apm) && + (apm_fd = open(APMDEV, O_RDONLY)) >= 0) { if (vflag) warnx("using APM for AC line status"); acline_mode = ac_apm; @@ -360,7 +369,17 @@ acline_read(void) } #endif /* try to (re)connect to devd */ - if (acline_mode == ac_sysctl) { +#ifdef USE_APM + if ((acline_mode == ac_sysctl && + (acline_mode_user == ac_none || + acline_mode_user == ac_acpi_devd)) || + (acline_mode == ac_apm && + acline_mode_user == ac_acpi_devd)) { +#else + if (acline_mode == ac_sysctl && + (acline_mode_user == ac_none || + acline_mode_user == ac_acpi_devd)) { +#endif struct timeval now; gettimeofday(&now, NULL); @@ -426,6 +445,21 @@ parse_mode(char *arg, int *mode, int ch) } static void +parse_acline_mode(char *arg, int ch) +{ + if (strcmp(arg, "sysctl") == 0) + acline_mode_user = ac_sysctl; + else if (strcmp(arg, "devd") == 0) + acline_mode_user = ac_acpi_devd; +#ifdef USE_APM + else if (strcmp(arg, "apm") == 0) + acline_mode_user = ac_apm; +#endif + else + errx(1, "bad option: -%c %s", (char)ch, optarg); +} + +static void handle_sigs(int __unused sig) { @@ -437,7 +471,7 @@ usage(void) { fprintf(stderr, -"usage: powerd [-v] [-a mode] [-b mode] [-i %%] [-m freq] [-M freq] [-n mode] [-p ival] [-r %%] [-P pidfile]\n"); +"usage: powerd [-v] [-a mode] [-b mode] [-i %%] [-m freq] [-M freq] [-n mode] [-p ival] [-r %%] [-s source] [-P pidfile]\n"); exit(1); } @@ -468,13 +502,16 @@ main(int argc, char * argv[]) if (geteuid() != 0) errx(1, "must be root to run"); - while ((ch = getopt(argc, argv, "a:b:i:m:M:n:p:P:r:v")) != -1) + while ((ch = getopt(argc, argv, "a:b:i:m:M:n:p:P:r:s:v")) != -1) switch (ch) { case 'a': parse_mode(optarg, &mode_ac, ch); break; case 'b': parse_mode(optarg, &mode_battery, ch); + break; + case 's': + parse_acline_mode(optarg, ch); break; case 'i': cpu_idle_mark = atoi(optarg); From owner-svn-src-all@freebsd.org Sun Jan 13 02:38:15 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 649881484297; Sun, 13 Jan 2019 02:38:15 +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 0842784775; Sun, 13 Jan 2019 02:38:15 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id EC155CC92; Sun, 13 Jan 2019 02:38:14 +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 x0D2cE6Z047071; Sun, 13 Jan 2019 02:38:14 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x0D2cEfk047070; Sun, 13 Jan 2019 02:38:14 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201901130238.x0D2cEfk047070@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Sun, 13 Jan 2019 02:38:14 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r342987 - stable/11/contrib/xz/src/common X-SVN-Group: stable-11 X-SVN-Commit-Author: kib X-SVN-Commit-Paths: stable/11/contrib/xz/src/common X-SVN-Commit-Revision: 342987 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 0842784775 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.97 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_SHORT(-0.97)[-0.968,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_LONG(-1.00)[-0.998,0] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 13 Jan 2019 02:38:15 -0000 Author: kib Date: Sun Jan 13 02:38:14 2019 New Revision: 342987 URL: https://svnweb.freebsd.org/changeset/base/342987 Log: MFC r342823: Clamp tuklib_physmem() return value to SIZE_T_MAX. Modified: stable/11/contrib/xz/src/common/tuklib_physmem.c Directory Properties: stable/11/ (props changed) Modified: stable/11/contrib/xz/src/common/tuklib_physmem.c ============================================================================== --- stable/11/contrib/xz/src/common/tuklib_physmem.c Sun Jan 13 02:36:58 2019 (r342986) +++ stable/11/contrib/xz/src/common/tuklib_physmem.c Sun Jan 13 02:38:14 2019 (r342987) @@ -45,6 +45,7 @@ # include #elif defined(TUKLIB_PHYSMEM_SYSCONF) +# include # include #elif defined(TUKLIB_PHYSMEM_SYSCTL) @@ -145,13 +146,16 @@ tuklib_physmem(void) #elif defined(TUKLIB_PHYSMEM_SYSCONF) const long pagesize = sysconf(_SC_PAGESIZE); const long pages = sysconf(_SC_PHYS_PAGES); - if (pagesize != -1 && pages != -1) + if (pagesize != -1 && pages != -1) { // According to docs, pagesize * pages can overflow. // Simple case is 32-bit box with 4 GiB or more RAM, // which may report exactly 4 GiB of RAM, and "long" // being 32-bit will overflow. Casting to uint64_t // hopefully avoids overflows in the near future. ret = (uint64_t)pagesize * (uint64_t)pages; + if (ret > SIZE_T_MAX) + ret = SIZE_T_MAX; + } #elif defined(TUKLIB_PHYSMEM_SYSCTL) int name[2] = { From owner-svn-src-all@freebsd.org Sun Jan 13 04:51:25 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 41F101488EDA; Sun, 13 Jan 2019 04:51:25 +0000 (UTC) (envelope-from jhibbits@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 D83D38ADF5; Sun, 13 Jan 2019 04:51:24 +0000 (UTC) (envelope-from jhibbits@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1: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 C6D78E6BE; Sun, 13 Jan 2019 04:51:24 +0000 (UTC) (envelope-from jhibbits@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x0D4pOR3020437; Sun, 13 Jan 2019 04:51:24 GMT (envelope-from jhibbits@FreeBSD.org) Received: (from jhibbits@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x0D4pOfS020436; Sun, 13 Jan 2019 04:51:24 GMT (envelope-from jhibbits@FreeBSD.org) Message-Id: <201901130451.x0D4pOfS020436@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jhibbits set sender to jhibbits@FreeBSD.org using -f From: Justin Hibbits Date: Sun, 13 Jan 2019 04:51:24 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r342988 - head/sys/powerpc/booke X-SVN-Group: head X-SVN-Commit-Author: jhibbits X-SVN-Commit-Paths: head/sys/powerpc/booke X-SVN-Commit-Revision: 342988 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: D83D38ADF5 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.98 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_SHORT(-0.99)[-0.986,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_LONG(-1.00)[-0.999,0] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 13 Jan 2019 04:51:25 -0000 Author: jhibbits Date: Sun Jan 13 04:51:24 2019 New Revision: 342988 URL: https://svnweb.freebsd.org/changeset/base/342988 Log: powerpcspe: Correct SPE high-component loading Don't clobber the low part of the register restoring the high component of. This could lead to very bad behavior if it's an ABI-affected register. While here, also mark the asm volatile in the SPE high save case, to match the load case. Reported by: Branden Bergren (git_bdragon.rtk0.net) MFC after: 1 week Modified: head/sys/powerpc/booke/spe.c Modified: head/sys/powerpc/booke/spe.c ============================================================================== --- head/sys/powerpc/booke/spe.c Sun Jan 13 02:38:14 2019 (r342987) +++ head/sys/powerpc/booke/spe.c Sun Jan 13 04:51:24 2019 (r342988) @@ -425,7 +425,7 @@ static uint32_t spe_save_reg_high(int reg) { uint32_t vec[2]; -#define EVSTDW(n) case n: __asm ("evstdw %1,0(%0)" \ +#define EVSTDW(n) case n: __asm __volatile ("evstdw %1,0(%0)" \ :: "b"(vec), "n"(n)); break; switch (reg) { EVSTDW(0); EVSTDW(1); EVSTDW(2); EVSTDW(3); @@ -448,7 +448,7 @@ spe_save_reg_high(int reg) static void spe_load_reg_high(int reg, uint32_t val) { -#define EVLDW(n) case n: __asm __volatile("evmergelo "#n",%0,0," \ +#define EVLDW(n) case n: __asm __volatile("evmergelo "#n",%0,"#n \ :: "r"(val)); break; switch (reg) { EVLDW(1); EVLDW(2); EVLDW(3); EVLDW(4); From owner-svn-src-all@freebsd.org Sun Jan 13 02:23:20 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id D13781483A58; Sun, 13 Jan 2019 02:23:19 +0000 (UTC) (envelope-from avos@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 73497839FD; Sun, 13 Jan 2019 02:23:19 +0000 (UTC) (envelope-from avos@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1: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 61989CA66; Sun, 13 Jan 2019 02:23:19 +0000 (UTC) (envelope-from avos@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x0D2NJ7W040978; Sun, 13 Jan 2019 02:23:19 GMT (envelope-from avos@FreeBSD.org) Received: (from avos@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x0D2NJOf040976; Sun, 13 Jan 2019 02:23:19 GMT (envelope-from avos@FreeBSD.org) Message-Id: <201901130223.x0D2NJOf040976@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: avos set sender to avos@FreeBSD.org using -f From: Andriy Voskoboinyk Date: Sun, 13 Jan 2019 02:23:19 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r342982 - stable/11/usr.sbin/powerd X-SVN-Group: stable-11 X-SVN-Commit-Author: avos X-SVN-Commit-Paths: stable/11/usr.sbin/powerd X-SVN-Commit-Revision: 342982 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 73497839FD X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.97 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_SHORT(-0.97)[-0.970,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_LONG(-1.00)[-0.998,0] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 13 Jan 2019 02:23:20 -0000 Author: avos Date: Sun Jan 13 02:23:18 2019 New Revision: 342982 URL: https://svnweb.freebsd.org/changeset/base/342982 Log: MFC r342810: powerd(8): allow to force a method of battery state query This change allows to determine power source via sysctl or /dev/apm when devd(8) is running (used by default). Based on patch from PR; other changes on top of it: - '-f' (force) -> '-s' (source) parameter renaming; - allow 'apm' -> 'devd' transition when '-s devd' is set (if APM is enabled); - man page update. PR: 125707 Submitted by: Konstantin Stepanov Reviewed by: bcr, imp Differential Revision: https://reviews.freebsd.org/D18742 Modified: stable/11/usr.sbin/powerd/powerd.8 stable/11/usr.sbin/powerd/powerd.c Directory Properties: stable/11/ (props changed) Modified: stable/11/usr.sbin/powerd/powerd.8 ============================================================================== --- stable/11/usr.sbin/powerd/powerd.8 Sun Jan 13 02:19:01 2019 (r342981) +++ stable/11/usr.sbin/powerd/powerd.8 Sun Jan 13 02:23:18 2019 (r342982) @@ -24,7 +24,7 @@ .\" .\" $FreeBSD$ .\" -.Dd July 4, 2013 +.Dd January 13, 2019 .Dt POWERD 8 .Os .Sh NAME @@ -41,6 +41,7 @@ .Op Fl p Ar ival .Op Fl P Ar pidfile .Op Fl r Ar percent +.Op Fl s Ar source .Op Fl v .Sh DESCRIPTION The @@ -117,6 +118,14 @@ The default is Specifies the CPU load percent level where adaptive mode should consider the CPU running and increase performance. The default is 75% or higher. +.It Fl s Ar source +Enforces method for AC line state refresh; by default, it is chosen +automatically. +The set of valid methods is +.Cm sysctl , devd +and +.Cm apm +(i386 only). .It Fl v Verbose mode. Messages about power changes will be printed to stdout and Modified: stable/11/usr.sbin/powerd/powerd.c ============================================================================== --- stable/11/usr.sbin/powerd/powerd.c Sun Jan 13 02:19:01 2019 (r342981) +++ stable/11/usr.sbin/powerd/powerd.c Sun Jan 13 02:23:18 2019 (r342982) @@ -113,14 +113,16 @@ static int vflag; static volatile sig_atomic_t exit_requested; static power_src_t acline_status; -static enum { +typedef enum { ac_none, ac_sysctl, ac_acpi_devd, #ifdef USE_APM ac_apm, #endif -} acline_mode; +} acline_mode_t; +static acline_mode_t acline_mode; +static acline_mode_t acline_mode_user = ac_none; #ifdef USE_APM static int apm_fd = -1; #endif @@ -286,21 +288,28 @@ get_freq_id(int freq, int *freqs, int numfreqs) static void acline_init(void) { + int skip_source_check; + acline_mib_len = 4; acline_status = SRC_UNKNOWN; + skip_source_check = (acline_mode_user == ac_none || + acline_mode_user == ac_acpi_devd); - if (sysctlnametomib(ACPIAC, acline_mib, &acline_mib_len) == 0) { + if ((skip_source_check || acline_mode_user == ac_sysctl) && + sysctlnametomib(ACPIAC, acline_mib, &acline_mib_len) == 0) { acline_mode = ac_sysctl; if (vflag) warnx("using sysctl for AC line status"); #if __powerpc__ - } else if (sysctlnametomib(PMUAC, acline_mib, &acline_mib_len) == 0) { + } else if ((skip_source_check || acline_mode_user == ac_sysctl) && + sysctlnametomib(PMUAC, acline_mib, &acline_mib_len) == 0) { acline_mode = ac_sysctl; if (vflag) warnx("using sysctl for AC line status"); #endif #ifdef USE_APM - } else if ((apm_fd = open(APMDEV, O_RDONLY)) >= 0) { + } else if ((skip_source_check || acline_mode_user == ac_apm) && + (apm_fd = open(APMDEV, O_RDONLY)) >= 0) { if (vflag) warnx("using APM for AC line status"); acline_mode = ac_apm; @@ -360,7 +369,17 @@ acline_read(void) } #endif /* try to (re)connect to devd */ - if (acline_mode == ac_sysctl) { +#ifdef USE_APM + if ((acline_mode == ac_sysctl && + (acline_mode_user == ac_none || + acline_mode_user == ac_acpi_devd)) || + (acline_mode == ac_apm && + acline_mode_user == ac_acpi_devd)) { +#else + if (acline_mode == ac_sysctl && + (acline_mode_user == ac_none || + acline_mode_user == ac_acpi_devd)) { +#endif struct timeval now; gettimeofday(&now, NULL); @@ -426,6 +445,21 @@ parse_mode(char *arg, int *mode, int ch) } static void +parse_acline_mode(char *arg, int ch) +{ + if (strcmp(arg, "sysctl") == 0) + acline_mode_user = ac_sysctl; + else if (strcmp(arg, "devd") == 0) + acline_mode_user = ac_acpi_devd; +#ifdef USE_APM + else if (strcmp(arg, "apm") == 0) + acline_mode_user = ac_apm; +#endif + else + errx(1, "bad option: -%c %s", (char)ch, optarg); +} + +static void handle_sigs(int __unused sig) { @@ -437,7 +471,7 @@ usage(void) { fprintf(stderr, -"usage: powerd [-v] [-a mode] [-b mode] [-i %%] [-m freq] [-M freq] [-n mode] [-p ival] [-r %%] [-P pidfile]\n"); +"usage: powerd [-v] [-a mode] [-b mode] [-i %%] [-m freq] [-M freq] [-n mode] [-p ival] [-r %%] [-s source] [-P pidfile]\n"); exit(1); } @@ -468,13 +502,16 @@ main(int argc, char * argv[]) if (geteuid() != 0) errx(1, "must be root to run"); - while ((ch = getopt(argc, argv, "a:b:i:m:M:n:p:P:r:v")) != -1) + while ((ch = getopt(argc, argv, "a:b:i:m:M:n:p:P:r:s:v")) != -1) switch (ch) { case 'a': parse_mode(optarg, &mode_ac, ch); break; case 'b': parse_mode(optarg, &mode_battery, ch); + break; + case 's': + parse_acline_mode(optarg, ch); break; case 'i': cpu_idle_mark = atoi(optarg); From owner-svn-src-all@freebsd.org Sun Jan 13 02:36:59 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id F0D041484256; Sun, 13 Jan 2019 02:36:58 +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 917628468C; Sun, 13 Jan 2019 02:36:58 +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 80D6FCC8D; Sun, 13 Jan 2019 02:36:58 +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 x0D2awi0046940; Sun, 13 Jan 2019 02:36:58 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x0D2awCp046939; Sun, 13 Jan 2019 02:36:58 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201901130236.x0D2awCp046939@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Sun, 13 Jan 2019 02:36: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: r342986 - stable/12/contrib/xz/src/common X-SVN-Group: stable-12 X-SVN-Commit-Author: kib X-SVN-Commit-Paths: stable/12/contrib/xz/src/common X-SVN-Commit-Revision: 342986 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 917628468C X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.97 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_SHORT(-0.97)[-0.968,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_LONG(-1.00)[-0.998,0] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 13 Jan 2019 02:36:59 -0000 Author: kib Date: Sun Jan 13 02:36:58 2019 New Revision: 342986 URL: https://svnweb.freebsd.org/changeset/base/342986 Log: MFC r342823: Clamp tuklib_physmem() return value to SIZE_T_MAX. Modified: stable/12/contrib/xz/src/common/tuklib_physmem.c Directory Properties: stable/12/ (props changed) Modified: stable/12/contrib/xz/src/common/tuklib_physmem.c ============================================================================== --- stable/12/contrib/xz/src/common/tuklib_physmem.c Sun Jan 13 02:33:20 2019 (r342985) +++ stable/12/contrib/xz/src/common/tuklib_physmem.c Sun Jan 13 02:36:58 2019 (r342986) @@ -45,6 +45,7 @@ # include #elif defined(TUKLIB_PHYSMEM_SYSCONF) +# include # include #elif defined(TUKLIB_PHYSMEM_SYSCTL) @@ -145,13 +146,16 @@ tuklib_physmem(void) #elif defined(TUKLIB_PHYSMEM_SYSCONF) const long pagesize = sysconf(_SC_PAGESIZE); const long pages = sysconf(_SC_PHYS_PAGES); - if (pagesize != -1 && pages != -1) + if (pagesize != -1 && pages != -1) { // According to docs, pagesize * pages can overflow. // Simple case is 32-bit box with 4 GiB or more RAM, // which may report exactly 4 GiB of RAM, and "long" // being 32-bit will overflow. Casting to uint64_t // hopefully avoids overflows in the near future. ret = (uint64_t)pagesize * (uint64_t)pages; + if (ret > SIZE_T_MAX) + ret = SIZE_T_MAX; + } #elif defined(TUKLIB_PHYSMEM_SYSCTL) int name[2] = { From owner-svn-src-all@freebsd.org Sun Jan 13 02:33:21 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 68B0E1484173; Sun, 13 Jan 2019 02:33:21 +0000 (UTC) (envelope-from jhibbits@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 0DDC38448C; Sun, 13 Jan 2019 02:33:21 +0000 (UTC) (envelope-from jhibbits@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1: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 02FC7CC5C; Sun, 13 Jan 2019 02:33:21 +0000 (UTC) (envelope-from jhibbits@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x0D2XKA2046600; Sun, 13 Jan 2019 02:33:20 GMT (envelope-from jhibbits@FreeBSD.org) Received: (from jhibbits@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x0D2XKma046599; Sun, 13 Jan 2019 02:33:20 GMT (envelope-from jhibbits@FreeBSD.org) Message-Id: <201901130233.x0D2XKma046599@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jhibbits set sender to jhibbits@FreeBSD.org using -f From: Justin Hibbits Date: Sun, 13 Jan 2019 02:33:20 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r342985 - head/libexec/rtld-elf/powerpc64 X-SVN-Group: head X-SVN-Commit-Author: jhibbits X-SVN-Commit-Paths: head/libexec/rtld-elf/powerpc64 X-SVN-Commit-Revision: 342985 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 0DDC38448C X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.97 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_LONG(-1.00)[-0.999,0]; NEURAL_HAM_SHORT(-0.97)[-0.969,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 13 Jan 2019 02:33:21 -0000 Author: jhibbits Date: Sun Jan 13 02:33:20 2019 New Revision: 342985 URL: https://svnweb.freebsd.org/changeset/base/342985 Log: Fix rtld-elf compilation warning for powerpc64 ELFv2 ABI Summary: reloc_jmpslot function parameter 'defobj' is not used when using ELFv2 ABI Submitted by: alfredo.junior_eldorado.org.br Reviewed By: kib, git_bdragon.rtk0.net, emaste, jhibbits Differential Revision: https://reviews.freebsd.org/D18808 Modified: head/libexec/rtld-elf/powerpc64/reloc.c Modified: head/libexec/rtld-elf/powerpc64/reloc.c ============================================================================== --- head/libexec/rtld-elf/powerpc64/reloc.c Sun Jan 13 02:28:37 2019 (r342984) +++ head/libexec/rtld-elf/powerpc64/reloc.c Sun Jan 13 02:33:20 2019 (r342985) @@ -447,7 +447,7 @@ reloc_jmpslots(Obj_Entry *obj, int flags, RtldLockStat * Update the value of a PLT jump slot. */ Elf_Addr -reloc_jmpslot(Elf_Addr *wherep, Elf_Addr target, const Obj_Entry *defobj, +reloc_jmpslot(Elf_Addr *wherep, Elf_Addr target, const Obj_Entry *defobj __unused, const Obj_Entry *obj __unused, const Elf_Rel *rel __unused) { From owner-svn-src-all@freebsd.org Sun Jan 13 07:22:17 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 0CE15148CFB2; Sun, 13 Jan 2019 07:22:17 +0000 (UTC) (envelope-from tsoome@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 9C26F8EC42; Sun, 13 Jan 2019 07:22:16 +0000 (UTC) (envelope-from tsoome@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1: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 91DC0181C7; Sun, 13 Jan 2019 07:22:16 +0000 (UTC) (envelope-from tsoome@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x0D7MGKR098755; Sun, 13 Jan 2019 07:22:16 GMT (envelope-from tsoome@FreeBSD.org) Received: (from tsoome@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x0D7MGXb098754; Sun, 13 Jan 2019 07:22:16 GMT (envelope-from tsoome@FreeBSD.org) Message-Id: <201901130722.x0D7MGXb098754@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: tsoome set sender to tsoome@FreeBSD.org using -f From: Toomas Soome Date: Sun, 13 Jan 2019 07:22:16 +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: r342994 - stable/12/stand/i386/libi386 X-SVN-Group: stable-12 X-SVN-Commit-Author: tsoome X-SVN-Commit-Paths: stable/12/stand/i386/libi386 X-SVN-Commit-Revision: 342994 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 9C26F8EC42 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.90 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_SHORT(-0.90)[-0.901,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_LONG(-1.00)[-0.998,0] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 13 Jan 2019 07:22:17 -0000 Author: tsoome Date: Sun Jan 13 07:22:16 2019 New Revision: 342994 URL: https://svnweb.freebsd.org/changeset/base/342994 Log: i386_parsedev() needs to support fd devices After introduction of fd device list to BIOS loader, the i386_parsedev() needs to recognize fd devices. Modified: stable/12/stand/i386/libi386/devicename.c Directory Properties: stable/12/ (props changed) Modified: stable/12/stand/i386/libi386/devicename.c ============================================================================== --- stable/12/stand/i386/libi386/devicename.c Sun Jan 13 07:19:20 2019 (r342993) +++ stable/12/stand/i386/libi386/devicename.c Sun Jan 13 07:22:16 2019 (r342994) @@ -103,23 +103,42 @@ i386_parsedev(struct i386_devdesc **dev, const char *d } if (dv == NULL) return(ENOENT); - idev = malloc(sizeof(struct i386_devdesc)); - err = 0; + np = (devspec + strlen(dv->dv_name)); + idev = NULL; + err = 0; switch(dv->dv_type) { - case DEVT_NONE: /* XXX what to do here? Do we care? */ + case DEVT_NONE: break; case DEVT_DISK: + idev = malloc(sizeof(struct i386_devdesc)); + if (idev == NULL) + return (ENOMEM); + err = disk_parsedev((struct disk_devdesc *)idev, np, path); if (err != 0) goto fail; break; - case DEVT_CD: - case DEVT_NET: + case DEVT_ZFS: + idev = malloc(sizeof (struct zfs_devdesc)); + if (idev == NULL) + return (ENOMEM); + + err = zfs_parsedev((struct zfs_devdesc *)idev, np, path); + if (err != 0) + goto fail; + break; + + default: + idev = malloc(sizeof (struct devdesc)); + if (idev == NULL) + return (ENOMEM); + unit = 0; + cp = (char *)np; if (*np && (*np != ':')) { unit = strtol(np, &cp, 0); /* get unit number if present */ @@ -127,9 +146,8 @@ i386_parsedev(struct i386_devdesc **dev, const char *d err = EUNIT; goto fail; } - } else { - cp = (char *)np; } + if (*cp && (*cp != ':')) { err = EINVAL; goto fail; @@ -139,21 +157,13 @@ i386_parsedev(struct i386_devdesc **dev, const char *d if (path != NULL) *path = (*cp == 0) ? cp : cp + 1; break; - case DEVT_ZFS: - err = zfs_parsedev((struct zfs_devdesc *)idev, np, path); - if (err != 0) - goto fail; - break; - default: - err = EINVAL; - goto fail; } idev->dd.d_dev = dv; - if (dev == NULL) { - free(idev); - } else { + if (dev != NULL) *dev = idev; - } + else + free(idev); + return(0); fail: From owner-svn-src-all@freebsd.org Sun Jan 13 06:01:37 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id B4D0C148AA8C; Sun, 13 Jan 2019 06:01:37 +0000 (UTC) (envelope-from avos@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 5504C8C74E; Sun, 13 Jan 2019 06:01:37 +0000 (UTC) (envelope-from avos@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1: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 44934F3DC; Sun, 13 Jan 2019 06:01:37 +0000 (UTC) (envelope-from avos@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x0D61bwW054028; Sun, 13 Jan 2019 06:01:37 GMT (envelope-from avos@FreeBSD.org) Received: (from avos@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x0D61bAB054027; Sun, 13 Jan 2019 06:01:37 GMT (envelope-from avos@FreeBSD.org) Message-Id: <201901130601.x0D61bAB054027@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: avos set sender to avos@FreeBSD.org using -f From: Andriy Voskoboinyk Date: Sun, 13 Jan 2019 06:01:37 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r342991 - head/sys/net80211 X-SVN-Group: head X-SVN-Commit-Author: avos X-SVN-Commit-Paths: head/sys/net80211 X-SVN-Commit-Revision: 342991 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 5504C8C74E X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.98 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_SHORT(-0.99)[-0.987,0]; NEURAL_HAM_LONG(-1.00)[-0.999,0] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 13 Jan 2019 06:01:38 -0000 Author: avos Date: Sun Jan 13 06:01:36 2019 New Revision: 342991 URL: https://svnweb.freebsd.org/changeset/base/342991 Log: net80211: provide rate validation for injected frames. There may be various side effects (device timeout, firmware and / or kernel panic) when an invalid (or inapplicable - e.g., an MCS rate for 11g-only device) is set; check rates before sending the frame to the driver. How-to-reproduce: Set an MCS (real or bogus - with 0x80 bit set) rate in ibp_rate0 field for any device that uses ieee80211_isratevalid() for rate checks - rum(4), run(4), ural(4), bwi(4) or ral(4); if kernel is compiled with INVARIANTS the check will result in "rate %d is basic/mcs?" panic. Tested with WUSB54GC (rum(4)), AP mode. MFC after: 1 week Modified: head/sys/net80211/ieee80211_output.c Modified: head/sys/net80211/ieee80211_output.c ============================================================================== --- head/sys/net80211/ieee80211_output.c Sun Jan 13 05:31:53 2019 (r342990) +++ head/sys/net80211/ieee80211_output.c Sun Jan 13 06:01:36 2019 (r342991) @@ -604,6 +604,97 @@ ieee80211_validate_frame(struct mbuf *m, return (0); } +static int +ieee80211_validate_rate(struct ieee80211_node *ni, uint8_t rate) +{ + struct ieee80211com *ic = ni->ni_ic; + + if (IEEE80211_IS_HT_RATE(rate)) { + if ((ic->ic_htcaps & IEEE80211_HTC_HT) == 0) + return (EINVAL); + + rate = IEEE80211_RV(rate); + if (rate <= 31) { + if (rate > ic->ic_txstream * 8 - 1) + return (EINVAL); + + return (0); + } + + if (rate == 32) { + if ((ic->ic_htcaps & IEEE80211_HTC_TXMCS32) == 0) + return (EINVAL); + + return (0); + } + + if ((ic->ic_htcaps & IEEE80211_HTC_TXUNEQUAL) == 0) + return (EINVAL); + + switch (ic->ic_txstream) { + case 0: + case 1: + return (EINVAL); + case 2: + if (rate > 38) + return (EINVAL); + + return (0); + case 3: + if (rate > 52) + return (EINVAL); + + return (0); + case 4: + default: + if (rate > 76) + return (EINVAL); + + return (0); + } + } + + if (!ieee80211_isratevalid(ic->ic_rt, rate)) + return (EINVAL); + + return (0); +} + +static int +ieee80211_sanitize_rates(struct ieee80211_node *ni, struct mbuf *m, + const struct ieee80211_bpf_params *params) +{ + int error; + + if (!params) + return (0); /* nothing to do */ + + /* NB: most drivers assume that ibp_rate0 is set (!= 0). */ + if (params->ibp_rate0 != 0) { + error = ieee80211_validate_rate(ni, params->ibp_rate0); + if (error != 0) + return (error); + } else { + /* XXX pre-setup some default (e.g., mgmt / mcast) rate */ + /* XXX __DECONST? */ + (void) m; + } + + if (params->ibp_rate1 != 0 && + (error = ieee80211_validate_rate(ni, params->ibp_rate1)) != 0) + return (error); + + if (params->ibp_rate2 != 0 && + (error = ieee80211_validate_rate(ni, params->ibp_rate2)) != 0) + return (error); + + if (params->ibp_rate3 != 0 && + (error = ieee80211_validate_rate(ni, params->ibp_rate3)) != 0) + return (error); + + return (0); +} + /* * 802.11 output routine. This is (currently) used only to * connect bpf write calls to the 802.11 layer for injecting @@ -717,6 +808,10 @@ ieee80211_output(struct ifnet *ifp, struct mbuf *m, m->m_pkthdr.len - ieee80211_hdrsize(wh)); } else M_WME_SETAC(m, WME_AC_BE); + + error = ieee80211_sanitize_rates(ni, m, params); + if (error != 0) + senderr(error); IEEE80211_NODE_STAT(ni, tx_data); if (IEEE80211_IS_MULTICAST(wh->i_addr1)) { From owner-svn-src-all@freebsd.org Sun Jan 13 05:30:27 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 63F8D1489E6B; Sun, 13 Jan 2019 05:30:27 +0000 (UTC) (envelope-from kp@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 0A92C8BB9B; Sun, 13 Jan 2019 05:30:27 +0000 (UTC) (envelope-from kp@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id F41DEED47; Sun, 13 Jan 2019 05:30:26 +0000 (UTC) (envelope-from kp@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x0D5UQL6037074; Sun, 13 Jan 2019 05:30:26 GMT (envelope-from kp@FreeBSD.org) Received: (from kp@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x0D5UQjG037073; Sun, 13 Jan 2019 05:30:26 GMT (envelope-from kp@FreeBSD.org) Message-Id: <201901130530.x0D5UQjG037073@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kp set sender to kp@FreeBSD.org using -f From: Kristof Provost Date: Sun, 13 Jan 2019 05:30:26 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r342989 - head/sbin/pfctl X-SVN-Group: head X-SVN-Commit-Author: kp X-SVN-Commit-Paths: head/sbin/pfctl X-SVN-Commit-Revision: 342989 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 0A92C8BB9B X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.98 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_SHORT(-0.99)[-0.986,0]; NEURAL_HAM_LONG(-1.00)[-0.999,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 13 Jan 2019 05:30:27 -0000 Author: kp Date: Sun Jan 13 05:30:26 2019 New Revision: 342989 URL: https://svnweb.freebsd.org/changeset/base/342989 Log: pfctl: Fix 'set skip' handling for groups When we skip on a group the kernel will automatically skip on the member interfaces. We still need to update our own cache though, or we risk overruling the kernel afterwards. This manifested as 'set skip' working initially, then not working when the rules were reloaded. PR: 229241 MFC after: 1 week Modified: head/sbin/pfctl/pfctl.c Modified: head/sbin/pfctl/pfctl.c ============================================================================== --- head/sbin/pfctl/pfctl.c Sun Jan 13 04:51:24 2019 (r342988) +++ head/sbin/pfctl/pfctl.c Sun Jan 13 05:30:26 2019 (r342989) @@ -1977,6 +1977,7 @@ int pfctl_set_interface_flags(struct pfctl *pf, char *ifname, int flags, int how) { struct pfioc_iface pi; + struct node_host *h = NULL, *n = NULL; if ((loadopt & PFCTL_FLAG_OPTION) == 0) return (0); @@ -1984,6 +1985,12 @@ pfctl_set_interface_flags(struct pfctl *pf, char *ifna bzero(&pi, sizeof(pi)); pi.pfiio_flags = flags; + + /* Make sure our cache matches the kernel. If we set or clear the flag + * for a group this applies to all members. */ + h = ifa_grouplookup(ifname, 0); + for (n = h; n != NULL; n = n->next) + pfctl_set_interface_flags(pf, n->ifname, flags, how); if (strlcpy(pi.pfiio_name, ifname, sizeof(pi.pfiio_name)) >= sizeof(pi.pfiio_name)) From owner-svn-src-all@freebsd.org Sun Jan 13 07:25:57 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 2DB6D148D24F; Sun, 13 Jan 2019 07:25:57 +0000 (UTC) (envelope-from tsoome@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 D2E138EF40; Sun, 13 Jan 2019 07:25:56 +0000 (UTC) (envelope-from tsoome@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1: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 A6154181D7; Sun, 13 Jan 2019 07:25:56 +0000 (UTC) (envelope-from tsoome@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x0D7PuxS098973; Sun, 13 Jan 2019 07:25:56 GMT (envelope-from tsoome@FreeBSD.org) Received: (from tsoome@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x0D7PtmT098968; Sun, 13 Jan 2019 07:25:55 GMT (envelope-from tsoome@FreeBSD.org) Message-Id: <201901130725.x0D7PtmT098968@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: tsoome set sender to tsoome@FreeBSD.org using -f From: Toomas Soome Date: Sun, 13 Jan 2019 07:25:55 +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: r342995 - stable/12/stand/i386/libi386 X-SVN-Group: stable-12 X-SVN-Commit-Author: tsoome X-SVN-Commit-Paths: stable/12/stand/i386/libi386 X-SVN-Commit-Revision: 342995 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: D2E138EF40 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.90 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_SHORT(-0.91)[-0.905,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_LONG(-1.00)[-0.999,0] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 13 Jan 2019 07:25:57 -0000 Author: tsoome Date: Sun Jan 13 07:25:55 2019 New Revision: 342995 URL: https://svnweb.freebsd.org/changeset/base/342995 Log: MFC: r342619, r342626 loader: create bio_alloc and bio_free for bios bounce buffer We do have 16KB buffer space defined in pxe.c, move it to bio.c and implement bio_alloc()/bio_free() interface to make it possible to use this space for other BIOS calls (notably, from biosdisk.c). Added: stable/12/stand/i386/libi386/bio.c - copied, changed from r342619, head/stand/i386/libi386/bio.c Modified: stable/12/stand/i386/libi386/Makefile stable/12/stand/i386/libi386/biosdisk.c stable/12/stand/i386/libi386/libi386.h stable/12/stand/i386/libi386/pxe.c Directory Properties: stable/12/ (props changed) Modified: stable/12/stand/i386/libi386/Makefile ============================================================================== --- stable/12/stand/i386/libi386/Makefile Sun Jan 13 07:22:16 2019 (r342994) +++ stable/12/stand/i386/libi386/Makefile Sun Jan 13 07:25:55 2019 (r342995) @@ -4,7 +4,7 @@ LIB= i386 -SRCS= biosacpi.c biosdisk.c biosmem.c biospnp.c \ +SRCS= bio.c biosacpi.c biosdisk.c biosmem.c biospnp.c \ biospci.c biossmap.c bootinfo.c bootinfo32.c bootinfo64.c \ comconsole.c devicename.c elf32_freebsd.c \ elf64_freebsd.c multiboot.c multiboot_tramp.S relocater_tramp.S \ Copied and modified: stable/12/stand/i386/libi386/bio.c (from r342619, head/stand/i386/libi386/bio.c) ============================================================================== --- head/stand/i386/libi386/bio.c Sun Dec 30 09:35:47 2018 (r342619, copy source) +++ stable/12/stand/i386/libi386/bio.c Sun Jan 13 07:25:55 2019 (r342995) @@ -1,4 +1,6 @@ /*- + * Copyright 2018 Toomas Soome + * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: Modified: stable/12/stand/i386/libi386/biosdisk.c ============================================================================== --- stable/12/stand/i386/libi386/biosdisk.c Sun Jan 13 07:22:16 2019 (r342994) +++ stable/12/stand/i386/libi386/biosdisk.c Sun Jan 13 07:25:55 2019 (r342995) @@ -507,10 +507,10 @@ bd_get_diskinfo_ext(struct bdinfo *bd) * Sector size must be a multiple of 512 bytes. * An alternate test would be to check power of 2, * powerof2(params.sector_size). - * 4K is largest read buffer we can use at this time. + * 16K is largest read buffer we can use at this time. */ if (params.sector_size >= 512 && - params.sector_size <= 4096 && + params.sector_size <= 16384 && (params.sector_size % BIOSDISK_SECSIZE) == 0) bd->bd_sectorsize = params.sector_size; @@ -899,8 +899,8 @@ bd_realstrategy(void *devdata, int rw, daddr_t dblk, s struct disk_devdesc *dev = (struct disk_devdesc *)devdata; bdinfo_t *bd; uint64_t disk_blocks, offset, d_offset; - size_t blks, blkoff, bsize, rest; - caddr_t bbuf; + size_t blks, blkoff, bsize, bio_size, rest; + caddr_t bbuf = NULL; int rc; bd = bd_get_bdinfo(&dev->dd); @@ -975,14 +975,25 @@ bd_realstrategy(void *devdata, int rw, daddr_t dblk, s DEBUG("short I/O %d", blks); } - if (V86_IO_BUFFER_SIZE / bd->bd_sectorsize == 0) - panic("BUG: Real mode buffer is too small"); + bio_size = min(BIO_BUFFER_SIZE, size); + while (bio_size > bd->bd_sectorsize) { + bbuf = bio_alloc(bio_size); + if (bbuf != NULL) + break; + bio_size -= bd->bd_sectorsize; + } + if (bbuf == NULL) { + bio_size = V86_IO_BUFFER_SIZE; + if (bio_size / bd->bd_sectorsize == 0) + panic("BUG: Real mode buffer is too small"); - bbuf = PTOV(V86_IO_BUFFER); + /* Use alternate 4k buffer */ + bbuf = PTOV(V86_IO_BUFFER); + } rest = size; - + rc = 0; while (blks > 0) { - int x = min(blks, V86_IO_BUFFER_SIZE / bd->bd_sectorsize); + int x = min(blks, bio_size / bd->bd_sectorsize); switch (rw & F_MASK) { case F_READ: @@ -991,8 +1002,10 @@ bd_realstrategy(void *devdata, int rw, daddr_t dblk, s if (rest < bsize) bsize = rest; - if ((rc = bd_io(dev, bd, dblk, x, bbuf, BD_RD)) != 0) - return (EIO); + if ((rc = bd_io(dev, bd, dblk, x, bbuf, BD_RD)) != 0) { + rc = EIO; + goto error; + } bcopy(bbuf + blkoff, buf, bsize); break; @@ -1024,13 +1037,16 @@ bd_realstrategy(void *devdata, int rw, daddr_t dblk, s * Put your Data In, and shake it all about */ bcopy(buf, bbuf + blkoff, bsize); - if ((rc = bd_io(dev, bd, dblk, x, bbuf, BD_WR)) != 0) - return (EIO); + if ((rc = bd_io(dev, bd, dblk, x, bbuf, BD_WR)) != 0) { + rc = EIO; + goto error; + } break; default: /* DO NOTHING */ - return (EROFS); + rc = EROFS; + goto error; } blkoff = 0; @@ -1042,7 +1058,10 @@ bd_realstrategy(void *devdata, int rw, daddr_t dblk, s if (rsize != NULL) *rsize = size; - return (0); +error: + if (bbuf != PTOV(V86_IO_BUFFER)) + bio_free(bbuf, bio_size); + return (rc); } static int Modified: stable/12/stand/i386/libi386/libi386.h ============================================================================== --- stable/12/stand/i386/libi386/libi386.h Sun Jan 13 07:22:16 2019 (r342994) +++ stable/12/stand/i386/libi386/libi386.h Sun Jan 13 07:25:55 2019 (r342995) @@ -121,6 +121,11 @@ extern vm_offset_t memtop_copyin; /* memtop less heap extern uint32_t high_heap_size; /* extended memory region available */ extern vm_offset_t high_heap_base; /* for use as the heap */ +/* 16KB buffer space for real mode data transfers. */ +#define BIO_BUFFER_SIZE 0x4000 +void *bio_alloc(size_t size); +void bio_free(void *ptr, size_t size); + /* * Values for width parameter to biospci_{read,write}_config */ Modified: stable/12/stand/i386/libi386/pxe.c ============================================================================== --- stable/12/stand/i386/libi386/pxe.c Sun Jan 13 07:22:16 2019 (r342994) +++ stable/12/stand/i386/libi386/pxe.c Sun Jan 13 07:25:55 2019 (r342995) @@ -48,18 +48,10 @@ __FBSDID("$FreeBSD$"); #include #include +#include "libi386.h" #include "btxv86.h" #include "pxe.h" -/* - * Allocate the PXE buffers statically instead of sticking grimy fingers into - * BTX's private data area. The scratch buffer is used to send information to - * the PXE BIOS, and the data buffer is used to receive data from the PXE BIOS. - */ -#define PXE_BUFFER_SIZE 0x2000 -static char scratch_buffer[PXE_BUFFER_SIZE]; -static char data_buffer[PXE_BUFFER_SIZE]; - static pxenv_t *pxenv_p = NULL; /* PXENV+ */ static pxe_t *pxe_p = NULL; /* !PXE */ @@ -68,9 +60,9 @@ static int pxe_debug = 0; #endif void pxe_enable(void *pxeinfo); -static void (*pxe_call)(int func); -static void pxenv_call(int func); -static void bangpxe_call(int func); +static void (*pxe_call)(int func, void *ptr); +static void pxenv_call(int func, void *ptr); +static void bangpxe_call(int func, void *ptr); static int pxe_init(void); static int pxe_print(int verbose); @@ -225,12 +217,17 @@ pxe_init(void) printf("@%04x:%04x\n", pxenv_p->RMEntry.segment, pxenv_p->RMEntry.offset); - gci_p = (t_PXENV_GET_CACHED_INFO *) scratch_buffer; + gci_p = bio_alloc(sizeof(*gci_p)); + if (gci_p == NULL) { + pxe_p = NULL; + return (0); + } bzero(gci_p, sizeof(*gci_p)); gci_p->PacketType = PXENV_PACKET_TYPE_BINL_REPLY; - pxe_call(PXENV_GET_CACHED_INFO); + pxe_call(PXENV_GET_CACHED_INFO, gci_p); if (gci_p->Status != 0) { pxe_perror(gci_p->Status); + bio_free(gci_p, sizeof(*gci_p)); pxe_p = NULL; return (0); } @@ -240,6 +237,7 @@ pxe_init(void) bcopy(PTOV((gci_p->Buffer.segment << 4) + gci_p->Buffer.offset), bootp_response, bootp_response_size); } + bio_free(gci_p, sizeof(*gci_p)); return (1); } @@ -262,31 +260,37 @@ pxe_print(int verbose) static void pxe_cleanup(void) { -#ifdef PXE_DEBUG - t_PXENV_UNLOAD_STACK *unload_stack_p = - (t_PXENV_UNLOAD_STACK *)scratch_buffer; - t_PXENV_UNDI_SHUTDOWN *undi_shutdown_p = - (t_PXENV_UNDI_SHUTDOWN *)scratch_buffer; -#endif + t_PXENV_UNLOAD_STACK *unload_stack_p; + t_PXENV_UNDI_SHUTDOWN *undi_shutdown_p; if (pxe_call == NULL) return; - pxe_call(PXENV_UNDI_SHUTDOWN); + undi_shutdown_p = bio_alloc(sizeof(*undi_shutdown_p)); + if (undi_shutdown_p != NULL) { + bzero(undi_shutdown_p, sizeof(*undi_shutdown_p)); + pxe_call(PXENV_UNDI_SHUTDOWN, undi_shutdown_p); #ifdef PXE_DEBUG - if (pxe_debug && undi_shutdown_p->Status != 0) - printf("pxe_cleanup: UNDI_SHUTDOWN failed %x\n", - undi_shutdown_p->Status); + if (pxe_debug && undi_shutdown_p->Status != 0) + printf("pxe_cleanup: UNDI_SHUTDOWN failed %x\n", + undi_shutdown_p->Status); #endif + bio_free(undi_shutdown_p, sizeof(*undi_shutdown_p)); + } - pxe_call(PXENV_UNLOAD_STACK); + unload_stack_p = bio_alloc(sizeof(*unload_stack_p)); + if (unload_stack_p != NULL) { + bzero(unload_stack_p, sizeof(*unload_stack_p)); + pxe_call(PXENV_UNLOAD_STACK, unload_stack_p); #ifdef PXE_DEBUG - if (pxe_debug && unload_stack_p->Status != 0) - printf("pxe_cleanup: UNLOAD_STACK failed %x\n", - unload_stack_p->Status); + if (pxe_debug && unload_stack_p->Status != 0) + printf("pxe_cleanup: UNLOAD_STACK failed %x\n", + unload_stack_p->Status); #endif + bio_free(unload_stack_p, sizeof(*unload_stack_p)); + } } void @@ -296,7 +300,7 @@ pxe_perror(int err) } void -pxenv_call(int func) +pxenv_call(int func, void *ptr) { #ifdef PXE_DEBUG if (pxe_debug) @@ -304,14 +308,13 @@ pxenv_call(int func) #endif bzero(&v86, sizeof(v86)); - bzero(data_buffer, sizeof(data_buffer)); __pxenvseg = pxenv_p->RMEntry.segment; __pxenvoff = pxenv_p->RMEntry.offset; v86.ctl = V86_ADDR | V86_CALLF | V86_FLAGS; - v86.es = VTOPSEG(scratch_buffer); - v86.edi = VTOPOFF(scratch_buffer); + v86.es = VTOPSEG(ptr); + v86.edi = VTOPOFF(ptr); v86.addr = (VTOPSEG(__pxenventry) << 16) | VTOPOFF(__pxenventry); v86.ebx = func; v86int(); @@ -319,7 +322,7 @@ pxenv_call(int func) } void -bangpxe_call(int func) +bangpxe_call(int func, void *ptr) { #ifdef PXE_DEBUG if (pxe_debug) @@ -327,14 +330,13 @@ bangpxe_call(int func) #endif bzero(&v86, sizeof(v86)); - bzero(data_buffer, sizeof(data_buffer)); __bangpxeseg = pxe_p->EntryPointSP.segment; __bangpxeoff = pxe_p->EntryPointSP.offset; v86.ctl = V86_ADDR | V86_CALLF | V86_FLAGS; - v86.edx = VTOPSEG(scratch_buffer); - v86.eax = VTOPOFF(scratch_buffer); + v86.edx = VTOPSEG(ptr); + v86.eax = VTOPOFF(ptr); v86.addr = (VTOPSEG(__bangpxeentry) << 16) | VTOPOFF(__bangpxeentry); v86.ebx = func; v86int(); @@ -362,11 +364,14 @@ pxe_netif_end(struct netif *nif) { t_PXENV_UNDI_CLOSE *undi_close_p; - undi_close_p = (t_PXENV_UNDI_CLOSE *)scratch_buffer; - bzero(undi_close_p, sizeof(*undi_close_p)); - pxe_call(PXENV_UNDI_CLOSE); - if (undi_close_p->Status != 0) - printf("undi close failed: %x\n", undi_close_p->Status); + undi_close_p = bio_alloc(sizeof(*undi_close_p)); + if (undi_close_p != NULL) { + bzero(undi_close_p, sizeof(*undi_close_p)); + pxe_call(PXENV_UNDI_CLOSE, undi_close_p); + if (undi_close_p->Status != 0) + printf("undi close failed: %x\n", undi_close_p->Status); + bio_free(undi_close_p, sizeof(*undi_close_p)); + } } static void @@ -377,11 +382,15 @@ pxe_netif_init(struct iodesc *desc, void *machdep_hint uint8_t *mac; int i, len; - undi_info_p = (t_PXENV_UNDI_GET_INFORMATION *)scratch_buffer; + undi_info_p = bio_alloc(sizeof(*undi_info_p)); + if (undi_info_p == NULL) + return; + bzero(undi_info_p, sizeof(*undi_info_p)); - pxe_call(PXENV_UNDI_GET_INFORMATION); + pxe_call(PXENV_UNDI_GET_INFORMATION, undi_info_p); if (undi_info_p->Status != 0) { printf("undi get info failed: %x\n", undi_info_p->Status); + bio_free(undi_info_p, sizeof(*undi_info_p)); return; } @@ -410,32 +419,44 @@ pxe_netif_init(struct iodesc *desc, void *machdep_hint else desc->xid = 0; - undi_open_p = (t_PXENV_UNDI_OPEN *)scratch_buffer; + bio_free(undi_info_p, sizeof(*undi_info_p)); + undi_open_p = bio_alloc(sizeof(*undi_open_p)); + if (undi_open_p == NULL) + return; bzero(undi_open_p, sizeof(*undi_open_p)); undi_open_p->PktFilter = FLTR_DIRECTED | FLTR_BRDCST; - pxe_call(PXENV_UNDI_OPEN); + pxe_call(PXENV_UNDI_OPEN, undi_open_p); if (undi_open_p->Status != 0) printf("undi open failed: %x\n", undi_open_p->Status); + bio_free(undi_open_p, sizeof(*undi_open_p)); } static int pxe_netif_receive(void **pkt) { - t_PXENV_UNDI_ISR *isr = (t_PXENV_UNDI_ISR *)scratch_buffer; + t_PXENV_UNDI_ISR *isr; char *buf, *ptr, *frame; size_t size, rsize; + isr = bio_alloc(sizeof(*isr)); + if (isr == NULL) + return (-1); + bzero(isr, sizeof(*isr)); isr->FuncFlag = PXENV_UNDI_ISR_IN_START; - pxe_call(PXENV_UNDI_ISR); - if (isr->Status != 0) + pxe_call(PXENV_UNDI_ISR, isr); + if (isr->Status != 0) { + bio_free(isr, sizeof(*isr)); return (-1); + } bzero(isr, sizeof(*isr)); isr->FuncFlag = PXENV_UNDI_ISR_IN_PROCESS; - pxe_call(PXENV_UNDI_ISR); - if (isr->Status != 0) + pxe_call(PXENV_UNDI_ISR, isr); + if (isr->Status != 0) { + bio_free(isr, sizeof(*isr)); return (-1); + } while (isr->FuncFlag == PXENV_UNDI_ISR_OUT_TRANSMIT) { /* @@ -443,26 +464,31 @@ pxe_netif_receive(void **pkt) */ bzero(isr, sizeof(*isr)); isr->FuncFlag = PXENV_UNDI_ISR_IN_GET_NEXT; - pxe_call(PXENV_UNDI_ISR); + pxe_call(PXENV_UNDI_ISR, isr); if (isr->Status != 0 || - isr->FuncFlag == PXENV_UNDI_ISR_OUT_DONE) + isr->FuncFlag == PXENV_UNDI_ISR_OUT_DONE) { + bio_free(isr, sizeof(*isr)); return (-1); + } } while (isr->FuncFlag != PXENV_UNDI_ISR_OUT_RECEIVE) { if (isr->Status != 0 || isr->FuncFlag == PXENV_UNDI_ISR_OUT_DONE) { + bio_free(isr, sizeof(*isr)); return (-1); } bzero(isr, sizeof(*isr)); isr->FuncFlag = PXENV_UNDI_ISR_IN_GET_NEXT; - pxe_call(PXENV_UNDI_ISR); + pxe_call(PXENV_UNDI_ISR, isr); } size = isr->FrameLength; buf = malloc(size + ETHER_ALIGN); - if (buf == NULL) + if (buf == NULL) { + bio_free(isr, sizeof(*isr)); return (-1); + } ptr = buf + ETHER_ALIGN; rsize = 0; @@ -475,8 +501,9 @@ pxe_netif_receive(void **pkt) bzero(isr, sizeof(*isr)); isr->FuncFlag = PXENV_UNDI_ISR_IN_GET_NEXT; - pxe_call(PXENV_UNDI_ISR); + pxe_call(PXENV_UNDI_ISR, isr); if (isr->Status != 0) { + bio_free(isr, sizeof(*isr)); free(buf); return (-1); } @@ -488,6 +515,7 @@ pxe_netif_receive(void **pkt) } *pkt = buf; + bio_free(isr, sizeof(*isr)); return (rsize); } @@ -515,26 +543,31 @@ pxe_netif_put(struct iodesc *desc, void *pkt, size_t l t_PXENV_UNDI_TRANSMIT *trans_p; t_PXENV_UNDI_TBD *tbd_p; char *data; + ssize_t rv = -1; - trans_p = (t_PXENV_UNDI_TRANSMIT *)scratch_buffer; - bzero(trans_p, sizeof(*trans_p)); - tbd_p = (t_PXENV_UNDI_TBD *)(scratch_buffer + sizeof(*trans_p)); - bzero(tbd_p, sizeof(*tbd_p)); + trans_p = bio_alloc(sizeof(*trans_p)); + tbd_p = bio_alloc(sizeof(*tbd_p)); + data = bio_alloc(len); - data = scratch_buffer + sizeof(*trans_p) + sizeof(*tbd_p); + if (trans_p != NULL && tbd_p != NULL && data != NULL) { + bzero(trans_p, sizeof(*trans_p)); + bzero(tbd_p, sizeof(*tbd_p)); - trans_p->TBD.segment = VTOPSEG(tbd_p); - trans_p->TBD.offset = VTOPOFF(tbd_p); + trans_p->TBD.segment = VTOPSEG(tbd_p); + trans_p->TBD.offset = VTOPOFF(tbd_p); - tbd_p->ImmedLength = len; - tbd_p->Xmit.segment = VTOPSEG(data); - tbd_p->Xmit.offset = VTOPOFF(data); - bcopy(pkt, data, len); + tbd_p->ImmedLength = len; + tbd_p->Xmit.segment = VTOPSEG(data); + tbd_p->Xmit.offset = VTOPOFF(data); + bcopy(pkt, data, len); - pxe_call(PXENV_UNDI_TRANSMIT); - if (trans_p->Status != 0) { - return (-1); + pxe_call(PXENV_UNDI_TRANSMIT, trans_p); + if (trans_p->Status == 0) + rv = len; } - return (len); + bio_free(data, len); + bio_free(tbd_p, sizeof(*tbd_p)); + bio_free(trans_p, sizeof(*trans_p)); + return (rv); } From owner-svn-src-all@freebsd.org Sun Jan 13 08:49:57 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 2E63F148FDFD; Sun, 13 Jan 2019 08:49:57 +0000 (UTC) (envelope-from delphij@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 C4E1E6ABE8; Sun, 13 Jan 2019 08:49:56 +0000 (UTC) (envelope-from delphij@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id B432C18FAD; Sun, 13 Jan 2019 08:49:56 +0000 (UTC) (envelope-from delphij@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x0D8nuiQ040396; Sun, 13 Jan 2019 08:49:56 GMT (envelope-from delphij@FreeBSD.org) Received: (from delphij@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x0D8nt0Z040392; Sun, 13 Jan 2019 08:49:55 GMT (envelope-from delphij@FreeBSD.org) Message-Id: <201901130849.x0D8nt0Z040392@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: delphij set sender to delphij@FreeBSD.org using -f From: Xin LI Date: Sun, 13 Jan 2019 08:49:55 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r342997 - stable/11/share/timedef X-SVN-Group: stable-11 X-SVN-Commit-Author: delphij X-SVN-Commit-Paths: stable/11/share/timedef X-SVN-Commit-Revision: 342997 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: C4E1E6ABE8 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.90 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_SHORT(-0.90)[-0.903,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_LONG(-1.00)[-0.998,0] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 13 Jan 2019 08:49:57 -0000 Author: delphij Date: Sun Jan 13 08:49:55 2019 New Revision: 342997 URL: https://svnweb.freebsd.org/changeset/base/342997 Log: MFC r342614, r342633 r342614: Properly set svn:mimetype for zh_CN.UTF-8.src. r342633: Fix various issues with Chinese locales: - Change short weekday names to use only one Chinese character. (note: this is a somewhat misunfortunate compromise due to the fact that some applications are using short buffer for weekday names, and in ~1905 when 星期 system was created to replace the traditional 七曜 system, which can use 日月ç«æ°´æœ¨é‡‘土 to represent Sunday through Saturday with just one character without any confusion). - for zh_CN locales: use Arabic numerals for month names, matching the practice of all other CJK locales - Regenerate zh_CN.{GB2312,GBK} locales from zh_CN.UTF-8. Reported by: ygy Reviewed by: kevlo Differential Revision: https://reviews.freebsd.org/D18689 Modified: stable/11/share/timedef/zh_CN.GB2312.src stable/11/share/timedef/zh_CN.GBK.src stable/11/share/timedef/zh_CN.UTF-8.src (contents, props changed) stable/11/share/timedef/zh_HK.UTF-8.src stable/11/share/timedef/zh_TW.UTF-8.src Directory Properties: stable/11/ (props changed) Modified: stable/11/share/timedef/zh_CN.GB2312.src ============================================================================== --- stable/11/share/timedef/zh_CN.GB2312.src Sun Jan 13 08:46:06 2019 (r342996) +++ stable/11/share/timedef/zh_CN.GB2312.src Sun Jan 13 08:49:55 2019 (r342997) @@ -4,41 +4,41 @@ # ----------------------------------------------------------------------------- # # Short month names -!!#1TB -!!#2TB -!!#3TB -!!#4TB -!!#5TB -!!#6TB -!!#7TB -!!#8TB -!!#9TB -#1#0TB -#1#1TB -#1#2TB + 1Ô + 2Ô + 3Ô + 4Ô + 5Ô + 6Ô + 7Ô + 8Ô + 9Ô +10Ô +11Ô +12Ô # # Long month names (as in a date) -Ò»Ô -¶þÔ -ÈýÔ -ËÄÔ -ÎåÔ -ÁùÔ -ÆßÔ -°ËÔ -¾ÅÔ -ʮԠ-ʮһÔ -Ê®¶þÔ +1Ô +2Ô +3Ô +4Ô +5Ô +6Ô +7Ô +8Ô +9Ô +10Ô +11Ô +12Ô # # Short weekday names -ÖÜÈÕ -ÖÜÒ» -Öܶþ -ÖÜÈý -ÖÜËÄ -ÖÜÎå -ÖÜÁù +ÈÕ +Ò» +¶þ +Èý +ËÄ +Îå +Áù # # Long weekday names ÐÇÆÚÈÕ @@ -66,18 +66,18 @@ %YÄê%_mÔÂ%eÈÕ %A %X %Z # # Long month names (without case ending) -Ò»Ô -¶þÔ -ÈýÔ -ËÄÔ -ÎåÔ -ÁùÔ -ÆßÔ -°ËÔ -¾ÅÔ -ʮԠ-ʮһÔ -Ê®¶þÔ +1Ô +2Ô +3Ô +4Ô +5Ô +6Ô +7Ô +8Ô +9Ô +10Ô +11Ô +12Ô # # md_order md Modified: stable/11/share/timedef/zh_CN.GBK.src ============================================================================== --- stable/11/share/timedef/zh_CN.GBK.src Sun Jan 13 08:46:06 2019 (r342996) +++ stable/11/share/timedef/zh_CN.GBK.src Sun Jan 13 08:49:55 2019 (r342997) @@ -18,27 +18,27 @@ 12Ô # # Long month names (as in a date) -Ò»Ô -¶þÔ -ÈýÔ -ËÄÔ -ÎåÔ -ÁùÔ -ÆßÔ -°ËÔ -¾ÅÔ -ʮԠ-ʮһÔ -Ê®¶þÔ +1Ô +2Ô +3Ô +4Ô +5Ô +6Ô +7Ô +8Ô +9Ô +10Ô +11Ô +12Ô # # Short weekday names -ÖÜÈÕ -ÖÜÒ» -Öܶþ -ÖÜÈý -ÖÜËÄ -ÖÜÎå -ÖÜÁù +ÈÕ +Ò» +¶þ +Èý +ËÄ +Îå +Áù # # Long weekday names ÐÇÆÚÈÕ @@ -66,18 +66,18 @@ %YÄê%_mÔÂ%eÈÕ %A %X %Z # # Long month names (without case ending) -Ò»Ô -¶þÔ -ÈýÔ -ËÄÔ -ÎåÔ -ÁùÔ -ÆßÔ -°ËÔ -¾ÅÔ -ʮԠ-ʮһÔ -Ê®¶þÔ +1Ô +2Ô +3Ô +4Ô +5Ô +6Ô +7Ô +8Ô +9Ô +10Ô +11Ô +12Ô # # md_order md Modified: stable/11/share/timedef/zh_CN.UTF-8.src ============================================================================== Binary file (source and/or target). No diff available. Modified: stable/11/share/timedef/zh_HK.UTF-8.src ============================================================================== --- stable/11/share/timedef/zh_HK.UTF-8.src Sun Jan 13 08:46:06 2019 (r342996) +++ stable/11/share/timedef/zh_HK.UTF-8.src Sun Jan 13 08:49:55 2019 (r342997) @@ -32,13 +32,13 @@ 12月 # # Short weekday names -週日 -週一 -週二 -週三 -週四 -週五 -週六 +æ—¥ +一 +二 +三 +å›› +五 +å…­ # # Long weekday names 星期日 Modified: stable/11/share/timedef/zh_TW.UTF-8.src ============================================================================== --- stable/11/share/timedef/zh_TW.UTF-8.src Sun Jan 13 08:46:06 2019 (r342996) +++ stable/11/share/timedef/zh_TW.UTF-8.src Sun Jan 13 08:49:55 2019 (r342997) @@ -32,13 +32,13 @@ 12月 # # Short weekday names -週日 -週一 -週二 -週三 -週四 -週五 -週六 +æ—¥ +一 +二 +三 +å›› +五 +å…­ # # Long weekday names 星期日 From owner-svn-src-all@freebsd.org Sun Jan 13 05:31:54 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 8ADC91489EC5; Sun, 13 Jan 2019 05:31:54 +0000 (UTC) (envelope-from kp@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 3082C8BD64; Sun, 13 Jan 2019 05:31:54 +0000 (UTC) (envelope-from kp@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 26198EEC4; Sun, 13 Jan 2019 05:31:54 +0000 (UTC) (envelope-from kp@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x0D5VsRf041676; Sun, 13 Jan 2019 05:31:54 GMT (envelope-from kp@FreeBSD.org) Received: (from kp@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x0D5VrJP041675; Sun, 13 Jan 2019 05:31:53 GMT (envelope-from kp@FreeBSD.org) Message-Id: <201901130531.x0D5VrJP041675@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kp set sender to kp@FreeBSD.org using -f From: Kristof Provost Date: Sun, 13 Jan 2019 05:31:53 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r342990 - head/tests/sys/netpfil/pf X-SVN-Group: head X-SVN-Commit-Author: kp X-SVN-Commit-Paths: head/tests/sys/netpfil/pf X-SVN-Commit-Revision: 342990 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 3082C8BD64 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.98 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_SHORT(-0.99)[-0.986,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_LONG(-1.00)[-0.999,0] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 13 Jan 2019 05:31:54 -0000 Author: kp Date: Sun Jan 13 05:31:53 2019 New Revision: 342990 URL: https://svnweb.freebsd.org/changeset/base/342990 Log: pf tests: Test PR 229241 pfctl has an issue with 'set skip on ', which causes inconsistent behaviour: the set skip directive works initially, but does not take effect when the same rules are re-applied. PR: 229241 MFC after: 1 week Modified: head/tests/sys/netpfil/pf/set_skip.sh head/tests/sys/netpfil/pf/utils.subr Modified: head/tests/sys/netpfil/pf/set_skip.sh ============================================================================== --- head/tests/sys/netpfil/pf/set_skip.sh Sun Jan 13 05:30:26 2019 (r342989) +++ head/tests/sys/netpfil/pf/set_skip.sh Sun Jan 13 05:31:53 2019 (r342990) @@ -30,7 +30,38 @@ set_skip_group_cleanup() pft_cleanup } +atf_test_case "set_skip_group_lo" "cleanup" +set_skip_group_lo_head() +{ + atf_set descr 'Basic set skip test, lo' + atf_set require.user root +} + +set_skip_group_lo_body() +{ + # See PR 229241 + pft_init + + pft_mkjail alcatraz + jexec alcatraz ifconfig lo0 127.0.0.1/8 up + jexec alcatraz pfctl -e + pft_set_rules alcatraz "set skip on lo" \ + "block on lo0" + + atf_check -s exit:0 -o ignore jexec alcatraz ping -c 1 127.0.0.1 + pft_set_rules noflush alcatraz "set skip on lo" \ + "block on lo0" + atf_check -s exit:0 -o ignore jexec alcatraz ping -c 1 127.0.0.1 + jexec alcatraz pfctl -s rules +} + +set_skip_group_lo_cleanup() +{ + pft_cleanup +} + atf_init_test_cases() { atf_add_test_case "set_skip_group" + atf_add_test_case "set_skip_group_lo" } Modified: head/tests/sys/netpfil/pf/utils.subr ============================================================================== --- head/tests/sys/netpfil/pf/utils.subr Sun Jan 13 05:30:26 2019 (r342989) +++ head/tests/sys/netpfil/pf/utils.subr Sun Jan 13 05:31:53 2019 (r342990) @@ -49,8 +49,14 @@ pft_set_rules() jname=$1 shift - # Flush all states, rules, fragments, ... - jexec ${jname} pfctl -F all + if [ $jname == "noflush" ]; + then + jname=$1 + shift + else + # Flush all states, rules, fragments, ... + jexec ${jname} pfctl -F all + fi while [ $# -gt 0 ]; do printf "$1\n" From owner-svn-src-all@freebsd.org Sun Jan 13 13:57:12 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 7FA4B149B1D5; Sun, 13 Jan 2019 13:57:12 +0000 (UTC) (envelope-from jilles@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.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 25EE67525E; Sun, 13 Jan 2019 13:57:12 +0000 (UTC) (envelope-from jilles@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 1B1A41C59F; Sun, 13 Jan 2019 13:57:12 +0000 (UTC) (envelope-from jilles@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x0DDvBBS002790; Sun, 13 Jan 2019 13:57:11 GMT (envelope-from jilles@FreeBSD.org) Received: (from jilles@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x0DDvBL0002789; Sun, 13 Jan 2019 13:57:11 GMT (envelope-from jilles@FreeBSD.org) Message-Id: <201901131357.x0DDvBL0002789@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jilles set sender to jilles@FreeBSD.org using -f From: Jilles Tjoelker Date: Sun, 13 Jan 2019 13:57: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: r343000 - stable/12/usr.bin/getconf X-SVN-Group: stable-12 X-SVN-Commit-Author: jilles X-SVN-Commit-Paths: stable/12/usr.bin/getconf X-SVN-Commit-Revision: 343000 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 25EE67525E X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.96 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_SHORT(-0.96)[-0.958,0]; NEURAL_HAM_LONG(-1.00)[-0.998,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 13 Jan 2019 13:57:12 -0000 Author: jilles Date: Sun Jan 13 13:57:11 2019 New Revision: 343000 URL: https://svnweb.freebsd.org/changeset/base/343000 Log: MFC r342817: getconf(1): Minor mdoc fix Modified: stable/12/usr.bin/getconf/getconf.1 Directory Properties: stable/12/ (props changed) Modified: stable/12/usr.bin/getconf/getconf.1 ============================================================================== --- stable/12/usr.bin/getconf/getconf.1 Sun Jan 13 12:13:08 2019 (r342999) +++ stable/12/usr.bin/getconf/getconf.1 Sun Jan 13 13:57:11 2019 (r343000) @@ -70,7 +70,7 @@ Otherwise, all system configuration variables are reported using .Xr confstr 3 and -.Xr sysconf 3. +.Xr sysconf 3 . .Pp The second form of the command, with two mandatory arguments, retrieves file- and file system-specific From owner-svn-src-all@freebsd.org Sun Jan 13 07:12:51 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 7D409148CCD3; Sun, 13 Jan 2019 07:12:51 +0000 (UTC) (envelope-from tsoome@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 216978E809; Sun, 13 Jan 2019 07:12:51 +0000 (UTC) (envelope-from tsoome@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1: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 10D8D18011; Sun, 13 Jan 2019 07:12:51 +0000 (UTC) (envelope-from tsoome@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x0D7Co5k093473; Sun, 13 Jan 2019 07:12:50 GMT (envelope-from tsoome@FreeBSD.org) Received: (from tsoome@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x0D7CoXl093472; Sun, 13 Jan 2019 07:12:50 GMT (envelope-from tsoome@FreeBSD.org) Message-Id: <201901130712.x0D7CoXl093472@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: tsoome set sender to tsoome@FreeBSD.org using -f From: Toomas Soome Date: Sun, 13 Jan 2019 07:12:50 +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: r342992 - stable/12/stand/i386/libi386 X-SVN-Group: stable-12 X-SVN-Commit-Author: tsoome X-SVN-Commit-Paths: stable/12/stand/i386/libi386 X-SVN-Commit-Revision: 342992 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 216978E809 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.90 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_SHORT(-0.90)[-0.901,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_LONG(-1.00)[-0.998,0] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 13 Jan 2019 07:12:51 -0000 Author: tsoome Date: Sun Jan 13 07:12:50 2019 New Revision: 342992 URL: https://svnweb.freebsd.org/changeset/base/342992 Log: With buggy int13 ah=15, we can mis-identify the floppy devices. We have no option than trust INT13 ah=08 return code during the init phase. PR: 234460 Reported by: Oleh Hushchenkov Modified: stable/12/stand/i386/libi386/biosdisk.c Directory Properties: stable/12/ (props changed) Modified: stable/12/stand/i386/libi386/biosdisk.c ============================================================================== --- stable/12/stand/i386/libi386/biosdisk.c Sun Jan 13 06:01:36 2019 (r342991) +++ stable/12/stand/i386/libi386/biosdisk.c Sun Jan 13 07:12:50 2019 (r342992) @@ -136,6 +136,8 @@ static int bd_ioctl(struct open_file *f, u_long cmd, v static int bd_print(int verbose); static int cd_print(int verbose); static int fd_print(int verbose); +static void bd_reset_disk(int); +static int bd_get_diskinfo_std(struct bdinfo *); struct devsw biosfd = { .dv_name = "fd", @@ -252,20 +254,52 @@ bd_unit2bios(struct i386_devdesc *dev) } /* + * Use INT13 AH=15 - Read Drive Type. + */ +static int +fd_count(void) +{ + int drive; + + for (drive = 0; drive < MAXBDDEV; drive++) { + bd_reset_disk(drive); + + v86.ctl = V86_FLAGS; + v86.addr = 0x13; + v86.eax = 0x1500; + v86.edx = drive; + v86int(); + + if (V86_CY(v86.efl)) + break; + + if ((v86.eax & 0x300) == 0) + break; + } + + return (drive); +} + +/* * Quiz the BIOS for disk devices, save a little info about them. */ static int fd_init(void) { - int unit; + int unit, numfd; bdinfo_t *bd; - for (unit = 0; unit < MAXBDDEV; unit++) { + numfd = fd_count(); + for (unit = 0; unit < numfd; unit++) { if ((bd = calloc(1, sizeof(*bd))) == NULL) break; + + bd->bd_sectorsize = BIOSDISK_SECSIZE; bd->bd_flags = BD_FLOPPY; bd->bd_unit = unit; - if (!bd_int13probe(bd)) { + + /* Use std diskinfo for floppy drive */ + if (bd_get_diskinfo_std(bd) != 0) { free(bd); break; } @@ -382,6 +416,10 @@ bc_add(int biosdev) static int bd_check_extensions(int unit) { + /* do not use ext calls for floppy devices */ + if (unit < 0x80) + return (0); + /* Determine if we can use EDD with this device. */ v86.ctl = V86_FLAGS; v86.addr = 0x13; From owner-svn-src-all@freebsd.org Sun Jan 13 07:19:22 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id C7A4D148CDF1; Sun, 13 Jan 2019 07:19:21 +0000 (UTC) (envelope-from tsoome@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 65DF28E90B; Sun, 13 Jan 2019 07:19:21 +0000 (UTC) (envelope-from tsoome@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1: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 54A211801C; Sun, 13 Jan 2019 07:19:21 +0000 (UTC) (envelope-from tsoome@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x0D7JLk0093826; Sun, 13 Jan 2019 07:19:21 GMT (envelope-from tsoome@FreeBSD.org) Received: (from tsoome@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x0D7JKY1093822; Sun, 13 Jan 2019 07:19:20 GMT (envelope-from tsoome@FreeBSD.org) Message-Id: <201901130719.x0D7JKY1093822@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: tsoome set sender to tsoome@FreeBSD.org using -f From: Toomas Soome Date: Sun, 13 Jan 2019 07:19: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: r342993 - in stable/12/stand/efi: include libefi loader X-SVN-Group: stable-12 X-SVN-Commit-Author: tsoome X-SVN-Commit-Paths: in stable/12/stand/efi: include libefi loader X-SVN-Commit-Revision: 342993 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 65DF28E90B X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.90 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_SHORT(-0.90)[-0.903,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_LONG(-1.00)[-0.998,0] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 13 Jan 2019 07:19:22 -0000 Author: tsoome Date: Sun Jan 13 07:19:20 2019 New Revision: 342993 URL: https://svnweb.freebsd.org/changeset/base/342993 Log: loader.efi: update memmap command to recognize new attributes Also move memory type to string translation to libefi for later use. Modified: stable/12/stand/efi/include/efidef.h stable/12/stand/efi/include/efilib.h stable/12/stand/efi/libefi/env.c stable/12/stand/efi/loader/main.c Directory Properties: stable/12/ (props changed) Modified: stable/12/stand/efi/include/efidef.h ============================================================================== --- stable/12/stand/efi/include/efidef.h Sun Jan 13 07:12:50 2019 (r342992) +++ stable/12/stand/efi/include/efidef.h Sun Jan 13 07:19:20 2019 (r342993) @@ -157,23 +157,27 @@ typedef enum { EfiMemoryMappedIO, EfiMemoryMappedIOPortSpace, EfiPalCode, + EfiPersistentMemory, EfiMaxMemoryType } EFI_MEMORY_TYPE; // possible caching types for the memory range -#define EFI_MEMORY_UC 0x0000000000000001 -#define EFI_MEMORY_WC 0x0000000000000002 -#define EFI_MEMORY_WT 0x0000000000000004 -#define EFI_MEMORY_WB 0x0000000000000008 -#define EFI_MEMORY_UCE 0x0000000000000010 +#define EFI_MEMORY_UC 0x0000000000000001 +#define EFI_MEMORY_WC 0x0000000000000002 +#define EFI_MEMORY_WT 0x0000000000000004 +#define EFI_MEMORY_WB 0x0000000000000008 +#define EFI_MEMORY_UCE 0x0000000000000010 // physical memory protection on range -#define EFI_MEMORY_WP 0x0000000000001000 -#define EFI_MEMORY_RP 0x0000000000002000 -#define EFI_MEMORY_XP 0x0000000000004000 +#define EFI_MEMORY_WP 0x0000000000001000 +#define EFI_MEMORY_RP 0x0000000000002000 +#define EFI_MEMORY_XP 0x0000000000004000 +#define EFI_MEMORY_NV 0x0000000000008000 +#define EFI_MEMORY_MORE_RELIABLE 0x0000000000010000 +#define EFI_MEMORY_RO 0x0000000000020000 // range requires a runtime mapping -#define EFI_MEMORY_RUNTIME 0x8000000000000000 +#define EFI_MEMORY_RUNTIME 0x8000000000000000 #define EFI_MEMORY_DESCRIPTOR_VERSION 1 typedef struct { Modified: stable/12/stand/efi/include/efilib.h ============================================================================== --- stable/12/stand/efi/include/efilib.h Sun Jan 13 07:12:50 2019 (r342992) +++ stable/12/stand/efi/include/efilib.h Sun Jan 13 07:19:20 2019 (r342993) @@ -108,6 +108,9 @@ void delay(int usecs); /* EFI environment initialization. */ void efi_init_environment(void); +/* EFI Memory type strings. */ +const char *efi_memory_type(EFI_MEMORY_TYPE); + /* CHAR16 utility functions. */ int wcscmp(CHAR16 *, CHAR16 *); void cpy8to16(const char *, CHAR16 *, size_t); Modified: stable/12/stand/efi/libefi/env.c ============================================================================== --- stable/12/stand/efi/libefi/env.c Sun Jan 13 07:12:50 2019 (r342992) +++ stable/12/stand/efi/libefi/env.c Sun Jan 13 07:19:20 2019 (r342993) @@ -47,6 +47,49 @@ efi_init_environment(void) COMMAND_SET(efishow, "efi-show", "print some or all EFI variables", command_efi_show); +const char * +efi_memory_type(EFI_MEMORY_TYPE type) +{ + const char *types[] = { + "Reserved", + "LoaderCode", + "LoaderData", + "BootServicesCode", + "BootServicesData", + "RuntimeServicesCode", + "RuntimeServicesData", + "ConventionalMemory", + "UnusableMemory", + "ACPIReclaimMemory", + "ACPIMemoryNVS", + "MemoryMappedIO", + "MemoryMappedIOPortSpace", + "PalCode", + "PersistentMemory" + }; + + switch (type) { + case EfiReservedMemoryType: + case EfiLoaderCode: + case EfiLoaderData: + case EfiBootServicesCode: + case EfiBootServicesData: + case EfiRuntimeServicesCode: + case EfiRuntimeServicesData: + case EfiConventionalMemory: + case EfiUnusableMemory: + case EfiACPIReclaimMemory: + case EfiACPIMemoryNVS: + case EfiMemoryMappedIO: + case EfiMemoryMappedIOPortSpace: + case EfiPalCode: + case EfiPersistentMemory: + return (types[type]); + default: + return ("Unknown"); + } +} + static int efi_print_var(CHAR16 *varnamearg, EFI_GUID *matchguid, int lflag) { Modified: stable/12/stand/efi/loader/main.c ============================================================================== --- stable/12/stand/efi/loader/main.c Sun Jan 13 07:12:50 2019 (r342992) +++ stable/12/stand/efi/loader/main.c Sun Jan 13 07:19:20 2019 (r342993) @@ -1041,7 +1041,7 @@ command_quit(int argc, char *argv[]) COMMAND_SET(memmap, "memmap", "print memory map", command_memmap); static int -command_memmap(int argc, char *argv[]) +command_memmap(int argc __unused, char *argv[] __unused) { UINTN sz; EFI_MEMORY_DESCRIPTOR *map, *p; @@ -1050,22 +1050,6 @@ command_memmap(int argc, char *argv[]) EFI_STATUS status; int i, ndesc; char line[80]; - static char *types[] = { - "Reserved", - "LoaderCode", - "LoaderData", - "BootServicesCode", - "BootServicesData", - "RuntimeServicesCode", - "RuntimeServicesData", - "ConventionalMemory", - "UnusableMemory", - "ACPIReclaimMemory", - "ACPIMemoryNVS", - "MemoryMappedIO", - "MemoryMappedIOPortSpace", - "PalCode" - }; sz = 0; status = BS->GetMemoryMap(&sz, 0, &key, &dsz, &dver); @@ -1091,9 +1075,12 @@ command_memmap(int argc, char *argv[]) for (i = 0, p = map; i < ndesc; i++, p = NextMemoryDescriptor(p, dsz)) { - printf("%23s %012jx %012jx %08jx ", types[p->Type], - (uintmax_t)p->PhysicalStart, (uintmax_t)p->VirtualStart, - (uintmax_t)p->NumberOfPages); + snprintf(line, sizeof(line), "%23s %012jx %012jx %08jx ", + efi_memory_type(p->Type), (uintmax_t)p->PhysicalStart, + (uintmax_t)p->VirtualStart, (uintmax_t)p->NumberOfPages); + if (pager_output(line)) + break; + if (p->Attribute & EFI_MEMORY_UC) printf("UC "); if (p->Attribute & EFI_MEMORY_WC) @@ -1110,6 +1097,12 @@ command_memmap(int argc, char *argv[]) printf("RP "); if (p->Attribute & EFI_MEMORY_XP) printf("XP "); + if (p->Attribute & EFI_MEMORY_NV) + printf("NV "); + if (p->Attribute & EFI_MEMORY_MORE_RELIABLE) + printf("MR "); + if (p->Attribute & EFI_MEMORY_RO) + printf("RO "); if (pager_output("\n")) break; } From owner-svn-src-all@freebsd.org Sun Jan 13 12:13:09 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 66B2714976DD; Sun, 13 Jan 2019 12:13:09 +0000 (UTC) (envelope-from fsu@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 0C1B771908; Sun, 13 Jan 2019 12:13:09 +0000 (UTC) (envelope-from fsu@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id F04201B4C8; Sun, 13 Jan 2019 12:13:08 +0000 (UTC) (envelope-from fsu@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x0DCD89h050153; Sun, 13 Jan 2019 12:13:08 GMT (envelope-from fsu@FreeBSD.org) Received: (from fsu@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x0DCD8JT050150; Sun, 13 Jan 2019 12:13:08 GMT (envelope-from fsu@FreeBSD.org) Message-Id: <201901131213.x0DCD8JT050150@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: fsu set sender to fsu@FreeBSD.org using -f From: Fedor Uporov Date: Sun, 13 Jan 2019 12:13:08 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r342999 - in stable/11/sys: amd64/linux amd64/linux32 i386/linux X-SVN-Group: stable-11 X-SVN-Commit-Author: fsu X-SVN-Commit-Paths: in stable/11/sys: amd64/linux amd64/linux32 i386/linux X-SVN-Commit-Revision: 342999 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 0C1B771908 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.95 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_LONG(-1.00)[-0.998,0]; NEURAL_HAM_SHORT(-0.95)[-0.953,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 13 Jan 2019 12:13:09 -0000 Author: fsu Date: Sun Jan 13 12:13:08 2019 New Revision: 342999 URL: https://svnweb.freebsd.org/changeset/base/342999 Log: MFC r342933: Fix errno values returned from DUMMY_XATTR linuxulator calls Reported by: weiss@uni-mainz.de Reviewed by: markj Differential Revision: https://reviews.freebsd.org/D18812 Modified: stable/11/sys/amd64/linux/linux_dummy.c stable/11/sys/amd64/linux32/linux32_dummy.c stable/11/sys/i386/linux/linux_dummy.c Modified: stable/11/sys/amd64/linux/linux_dummy.c ============================================================================== --- stable/11/sys/amd64/linux/linux_dummy.c Sun Jan 13 12:12:50 2019 (r342998) +++ stable/11/sys/amd64/linux/linux_dummy.c Sun Jan 13 12:13:08 2019 (r342999) @@ -164,7 +164,7 @@ linux_ ## s ## xattr( \ struct thread *td, struct linux_ ## s ## xattr_args *arg) \ { \ \ - return (ENOATTR); \ + return (EOPNOTSUPP); \ } DUMMY_XATTR(set); DUMMY_XATTR(lset); Modified: stable/11/sys/amd64/linux32/linux32_dummy.c ============================================================================== --- stable/11/sys/amd64/linux32/linux32_dummy.c Sun Jan 13 12:12:50 2019 (r342998) +++ stable/11/sys/amd64/linux32/linux32_dummy.c Sun Jan 13 12:13:08 2019 (r342999) @@ -170,7 +170,7 @@ linux_ ## s ## xattr( \ struct thread *td, struct linux_ ## s ## xattr_args *arg) \ { \ \ - return (ENOATTR); \ + return (EOPNOTSUPP); \ } DUMMY_XATTR(set); DUMMY_XATTR(lset); Modified: stable/11/sys/i386/linux/linux_dummy.c ============================================================================== --- stable/11/sys/i386/linux/linux_dummy.c Sun Jan 13 12:12:50 2019 (r342998) +++ stable/11/sys/i386/linux/linux_dummy.c Sun Jan 13 12:13:08 2019 (r342999) @@ -166,7 +166,7 @@ linux_ ## s ## xattr( \ struct thread *td, struct linux_ ## s ## xattr_args *arg) \ { \ \ - return (ENOATTR); \ + return (EOPNOTSUPP); \ } DUMMY_XATTR(set); DUMMY_XATTR(lset); From owner-svn-src-all@freebsd.org Sun Jan 13 08:46:08 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 57CA9148FCBC; Sun, 13 Jan 2019 08:46:08 +0000 (UTC) (envelope-from delphij@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 F1AB36AA6C; Sun, 13 Jan 2019 08:46:07 +0000 (UTC) (envelope-from delphij@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id E7C2A18F91; Sun, 13 Jan 2019 08:46:07 +0000 (UTC) (envelope-from delphij@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x0D8k7eT040206; Sun, 13 Jan 2019 08:46:07 GMT (envelope-from delphij@FreeBSD.org) Received: (from delphij@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x0D8k70i040202; Sun, 13 Jan 2019 08:46:07 GMT (envelope-from delphij@FreeBSD.org) Message-Id: <201901130846.x0D8k70i040202@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: delphij set sender to delphij@FreeBSD.org using -f From: Xin LI Date: Sun, 13 Jan 2019 08:46:07 +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: r342996 - stable/12/share/timedef X-SVN-Group: stable-12 X-SVN-Commit-Author: delphij X-SVN-Commit-Paths: stable/12/share/timedef X-SVN-Commit-Revision: 342996 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: F1AB36AA6C X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.90 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_LONG(-1.00)[-0.998,0]; NEURAL_HAM_SHORT(-0.90)[-0.903,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 13 Jan 2019 08:46:08 -0000 Author: delphij Date: Sun Jan 13 08:46:06 2019 New Revision: 342996 URL: https://svnweb.freebsd.org/changeset/base/342996 Log: MFC r342614, r342633 r342614: Properly set svn:mimetype for zh_CN.UTF-8.src. r342633: Fix various issues with Chinese locales: - Change short weekday names to use only one Chinese character. (note: this is a somewhat misunfortunate compromise due to the fact that some applications are using short buffer for weekday names, and in ~1905 when 星期 system was created to replace the traditional 七曜 system, which can use 日月ç«æ°´æœ¨é‡‘土 to represent Sunday through Saturday with just one character without any confusion). - for zh_CN locales: use Arabic numerals for month names, matching the practice of all other CJK locales - Regenerate zh_CN.{GB2312,GBK} locales from zh_CN.UTF-8. Reported by: ygy Reviewed by: kevlo Differential Revision: https://reviews.freebsd.org/D18689 Modified: stable/12/share/timedef/zh_CN.GB2312.src stable/12/share/timedef/zh_CN.GBK.src stable/12/share/timedef/zh_CN.UTF-8.src (contents, props changed) stable/12/share/timedef/zh_HK.UTF-8.src stable/12/share/timedef/zh_TW.UTF-8.src Directory Properties: stable/12/ (props changed) Modified: stable/12/share/timedef/zh_CN.GB2312.src ============================================================================== --- stable/12/share/timedef/zh_CN.GB2312.src Sun Jan 13 07:25:55 2019 (r342995) +++ stable/12/share/timedef/zh_CN.GB2312.src Sun Jan 13 08:46:06 2019 (r342996) @@ -4,41 +4,41 @@ # ----------------------------------------------------------------------------- # # Short month names -!!#1TB -!!#2TB -!!#3TB -!!#4TB -!!#5TB -!!#6TB -!!#7TB -!!#8TB -!!#9TB -#1#0TB -#1#1TB -#1#2TB + 1Ô + 2Ô + 3Ô + 4Ô + 5Ô + 6Ô + 7Ô + 8Ô + 9Ô +10Ô +11Ô +12Ô # # Long month names (as in a date) -Ò»Ô -¶þÔ -ÈýÔ -ËÄÔ -ÎåÔ -ÁùÔ -ÆßÔ -°ËÔ -¾ÅÔ -ʮԠ-ʮһÔ -Ê®¶þÔ +1Ô +2Ô +3Ô +4Ô +5Ô +6Ô +7Ô +8Ô +9Ô +10Ô +11Ô +12Ô # # Short weekday names -ÖÜÈÕ -ÖÜÒ» -Öܶþ -ÖÜÈý -ÖÜËÄ -ÖÜÎå -ÖÜÁù +ÈÕ +Ò» +¶þ +Èý +ËÄ +Îå +Áù # # Long weekday names ÐÇÆÚÈÕ @@ -66,18 +66,18 @@ %YÄê%_mÔÂ%eÈÕ %A %X %Z # # Long month names (without case ending) -Ò»Ô -¶þÔ -ÈýÔ -ËÄÔ -ÎåÔ -ÁùÔ -ÆßÔ -°ËÔ -¾ÅÔ -ʮԠ-ʮһÔ -Ê®¶þÔ +1Ô +2Ô +3Ô +4Ô +5Ô +6Ô +7Ô +8Ô +9Ô +10Ô +11Ô +12Ô # # md_order md Modified: stable/12/share/timedef/zh_CN.GBK.src ============================================================================== --- stable/12/share/timedef/zh_CN.GBK.src Sun Jan 13 07:25:55 2019 (r342995) +++ stable/12/share/timedef/zh_CN.GBK.src Sun Jan 13 08:46:06 2019 (r342996) @@ -18,27 +18,27 @@ 12Ô # # Long month names (as in a date) -Ò»Ô -¶þÔ -ÈýÔ -ËÄÔ -ÎåÔ -ÁùÔ -ÆßÔ -°ËÔ -¾ÅÔ -ʮԠ-ʮһÔ -Ê®¶þÔ +1Ô +2Ô +3Ô +4Ô +5Ô +6Ô +7Ô +8Ô +9Ô +10Ô +11Ô +12Ô # # Short weekday names -ÖÜÈÕ -ÖÜÒ» -Öܶþ -ÖÜÈý -ÖÜËÄ -ÖÜÎå -ÖÜÁù +ÈÕ +Ò» +¶þ +Èý +ËÄ +Îå +Áù # # Long weekday names ÐÇÆÚÈÕ @@ -66,18 +66,18 @@ %YÄê%_mÔÂ%eÈÕ %A %X %Z # # Long month names (without case ending) -Ò»Ô -¶þÔ -ÈýÔ -ËÄÔ -ÎåÔ -ÁùÔ -ÆßÔ -°ËÔ -¾ÅÔ -ʮԠ-ʮһÔ -Ê®¶þÔ +1Ô +2Ô +3Ô +4Ô +5Ô +6Ô +7Ô +8Ô +9Ô +10Ô +11Ô +12Ô # # md_order md Modified: stable/12/share/timedef/zh_CN.UTF-8.src ============================================================================== Binary file (source and/or target). No diff available. Modified: stable/12/share/timedef/zh_HK.UTF-8.src ============================================================================== --- stable/12/share/timedef/zh_HK.UTF-8.src Sun Jan 13 07:25:55 2019 (r342995) +++ stable/12/share/timedef/zh_HK.UTF-8.src Sun Jan 13 08:46:06 2019 (r342996) @@ -32,13 +32,13 @@ 12月 # # Short weekday names -週日 -週一 -週二 -週三 -週四 -週五 -週六 +æ—¥ +一 +二 +三 +å›› +五 +å…­ # # Long weekday names 星期日 Modified: stable/12/share/timedef/zh_TW.UTF-8.src ============================================================================== --- stable/12/share/timedef/zh_TW.UTF-8.src Sun Jan 13 07:25:55 2019 (r342995) +++ stable/12/share/timedef/zh_TW.UTF-8.src Sun Jan 13 08:46:06 2019 (r342996) @@ -32,13 +32,13 @@ 12月 # # Short weekday names -週日 -週一 -週二 -週三 -週四 -週五 -週六 +æ—¥ +一 +二 +三 +å›› +五 +å…­ # # Long weekday names 星期日 From owner-svn-src-all@freebsd.org Sun Jan 13 12:12:51 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 9B0A714976D0; Sun, 13 Jan 2019 12:12:51 +0000 (UTC) (envelope-from fsu@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 3BD7371828; Sun, 13 Jan 2019 12:12:51 +0000 (UTC) (envelope-from fsu@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 2CD2E1B4C7; Sun, 13 Jan 2019 12:12:51 +0000 (UTC) (envelope-from fsu@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x0DCCp7A050090; Sun, 13 Jan 2019 12:12:51 GMT (envelope-from fsu@FreeBSD.org) Received: (from fsu@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x0DCCok5050086; Sun, 13 Jan 2019 12:12:50 GMT (envelope-from fsu@FreeBSD.org) Message-Id: <201901131212.x0DCCok5050086@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: fsu set sender to fsu@FreeBSD.org using -f From: Fedor Uporov Date: Sun, 13 Jan 2019 12:12:50 +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: r342998 - in stable/12/sys: amd64/linux amd64/linux32 arm64/linux i386/linux X-SVN-Group: stable-12 X-SVN-Commit-Author: fsu X-SVN-Commit-Paths: in stable/12/sys: amd64/linux amd64/linux32 arm64/linux i386/linux X-SVN-Commit-Revision: 342998 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 3BD7371828 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.95 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_SHORT(-0.95)[-0.954,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_LONG(-1.00)[-0.998,0] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 13 Jan 2019 12:12:51 -0000 Author: fsu Date: Sun Jan 13 12:12:50 2019 New Revision: 342998 URL: https://svnweb.freebsd.org/changeset/base/342998 Log: MFC r342933: Fix errno values returned from DUMMY_XATTR linuxulator calls Reported by: weiss@uni-mainz.de Reviewed by: markj Differential Revision: https://reviews.freebsd.org/D18812 Modified: stable/12/sys/amd64/linux/linux_dummy.c stable/12/sys/amd64/linux32/linux32_dummy.c stable/12/sys/arm64/linux/linux_dummy.c stable/12/sys/i386/linux/linux_dummy.c Modified: stable/12/sys/amd64/linux/linux_dummy.c ============================================================================== --- stable/12/sys/amd64/linux/linux_dummy.c Sun Jan 13 08:49:55 2019 (r342997) +++ stable/12/sys/amd64/linux/linux_dummy.c Sun Jan 13 12:12:50 2019 (r342998) @@ -162,7 +162,7 @@ linux_ ## s ## xattr( \ struct thread *td, struct linux_ ## s ## xattr_args *arg) \ { \ \ - return (ENOATTR); \ + return (EOPNOTSUPP); \ } DUMMY_XATTR(set); DUMMY_XATTR(lset); Modified: stable/12/sys/amd64/linux32/linux32_dummy.c ============================================================================== --- stable/12/sys/amd64/linux32/linux32_dummy.c Sun Jan 13 08:49:55 2019 (r342997) +++ stable/12/sys/amd64/linux32/linux32_dummy.c Sun Jan 13 12:12:50 2019 (r342998) @@ -168,7 +168,7 @@ linux_ ## s ## xattr( \ struct thread *td, struct linux_ ## s ## xattr_args *arg) \ { \ \ - return (ENOATTR); \ + return (EOPNOTSUPP); \ } DUMMY_XATTR(set); DUMMY_XATTR(lset); Modified: stable/12/sys/arm64/linux/linux_dummy.c ============================================================================== --- stable/12/sys/arm64/linux/linux_dummy.c Sun Jan 13 08:49:55 2019 (r342997) +++ stable/12/sys/arm64/linux/linux_dummy.c Sun Jan 13 12:12:50 2019 (r342998) @@ -161,7 +161,7 @@ linux_ ## s ## xattr( \ struct thread *td, struct linux_ ## s ## xattr_args *arg) \ { \ \ - return (ENOATTR); \ + return (EOPNOTSUPP); \ } DUMMY_XATTR(set); DUMMY_XATTR(lset); Modified: stable/12/sys/i386/linux/linux_dummy.c ============================================================================== --- stable/12/sys/i386/linux/linux_dummy.c Sun Jan 13 08:49:55 2019 (r342997) +++ stable/12/sys/i386/linux/linux_dummy.c Sun Jan 13 12:12:50 2019 (r342998) @@ -164,7 +164,7 @@ linux_ ## s ## xattr( \ struct thread *td, struct linux_ ## s ## xattr_args *arg) \ { \ \ - return (ENOATTR); \ + return (EOPNOTSUPP); \ } DUMMY_XATTR(set); DUMMY_XATTR(lset); From owner-svn-src-all@freebsd.org Sun Jan 13 18:47:38 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 6CDEF14A5F66; Sun, 13 Jan 2019 18:47:38 +0000 (UTC) (envelope-from jilles@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.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 0FBAD89887; Sun, 13 Jan 2019 18:47:38 +0000 (UTC) (envelope-from jilles@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id ECDCE1F6ED; Sun, 13 Jan 2019 18:47:37 +0000 (UTC) (envelope-from jilles@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x0DIlb6H057673; Sun, 13 Jan 2019 18:47:37 GMT (envelope-from jilles@FreeBSD.org) Received: (from jilles@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x0DIlbEW057672; Sun, 13 Jan 2019 18:47:37 GMT (envelope-from jilles@FreeBSD.org) Message-Id: <201901131847.x0DIlbEW057672@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jilles set sender to jilles@FreeBSD.org using -f From: Jilles Tjoelker Date: Sun, 13 Jan 2019 18:47:37 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r343002 - stable/11/lib/libc/sys X-SVN-Group: stable-11 X-SVN-Commit-Author: jilles X-SVN-Commit-Paths: stable/11/lib/libc/sys X-SVN-Commit-Revision: 343002 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 0FBAD89887 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.97 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_SHORT(-0.98)[-0.977,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_LONG(-1.00)[-0.998,0] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 13 Jan 2019 18:47:38 -0000 Author: jilles Date: Sun Jan 13 18:47:37 2019 New Revision: 343002 URL: https://svnweb.freebsd.org/changeset/base/343002 Log: MFC r342816: thr_wake(2): Minor mdoc fixes Modified: stable/11/lib/libc/sys/thr_wake.2 Directory Properties: stable/11/ (props changed) Modified: stable/11/lib/libc/sys/thr_wake.2 ============================================================================== --- stable/11/lib/libc/sys/thr_wake.2 Sun Jan 13 13:57:56 2019 (r343001) +++ stable/11/lib/libc/sys/thr_wake.2 Sun Jan 13 18:47:37 2019 (r343002) @@ -67,7 +67,7 @@ of that thread in the kernel to fail immediately with .Er EINTR error. The flag is cleared by an interruptible sleep attempt or by a call to -.Xr thr_suspend 2. +.Xr thr_suspend 2 . This is used by the system threading library to implement cancellation. .Pp If @@ -96,7 +96,7 @@ of the calling thread. .El .Sh SEE ALSO .Xr ps 1 , -.Xr thr_self 2 +.Xr thr_self 2 , .Xr thr_suspend 2 , .Xr pthread_cancel 3 , .Xr pthread_resume_np 3 , From owner-svn-src-all@freebsd.org Sun Jan 13 19:49:50 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 75667148373D; Sun, 13 Jan 2019 19:49:50 +0000 (UTC) (envelope-from cognet@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 9D9DA8C05C; Sun, 13 Jan 2019 19:49:49 +0000 (UTC) (envelope-from cognet@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1: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 7F1EC200FD; Sun, 13 Jan 2019 19:49:49 +0000 (UTC) (envelope-from cognet@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x0DJnnue090008; Sun, 13 Jan 2019 19:49:49 GMT (envelope-from cognet@FreeBSD.org) Received: (from cognet@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x0DJnkRL089992; Sun, 13 Jan 2019 19:49:46 GMT (envelope-from cognet@FreeBSD.org) Message-Id: <201901131949.x0DJnkRL089992@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: cognet set sender to cognet@FreeBSD.org using -f From: Olivier Houchard Date: Sun, 13 Jan 2019 19:49:46 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r343004 - in head/sys/arm64: arm64 conf include X-SVN-Group: head X-SVN-Commit-Author: cognet X-SVN-Commit-Paths: in head/sys/arm64: arm64 conf include X-SVN-Commit-Revision: 343004 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 9D9DA8C05C X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.98 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_LONG(-1.00)[-0.999,0]; NEURAL_HAM_SHORT(-0.98)[-0.983,0] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 13 Jan 2019 19:49:50 -0000 Author: cognet Date: Sun Jan 13 19:49:46 2019 New Revision: 343004 URL: https://svnweb.freebsd.org/changeset/base/343004 Log: Impleent COMPAT_FREEBSD32 for arm64. This is based on early work by andrew@. Modified: head/sys/arm64/arm64/elf32_machdep.c head/sys/arm64/arm64/freebsd32_machdep.c head/sys/arm64/arm64/identcpu.c head/sys/arm64/arm64/locore.S head/sys/arm64/arm64/machdep.c head/sys/arm64/arm64/undefined.c head/sys/arm64/arm64/vm_machdep.c head/sys/arm64/conf/GENERIC head/sys/arm64/include/armreg.h head/sys/arm64/include/elf.h head/sys/arm64/include/frame.h head/sys/arm64/include/reg.h head/sys/arm64/include/ucontext.h head/sys/arm64/include/vfp.h Modified: head/sys/arm64/arm64/elf32_machdep.c ============================================================================== --- head/sys/arm64/arm64/elf32_machdep.c Sun Jan 13 18:48:13 2019 (r343003) +++ head/sys/arm64/arm64/elf32_machdep.c Sun Jan 13 19:49:46 2019 (r343004) @@ -1,6 +1,15 @@ /*- - * Copyright (c) 2017 Nuxi, https://nuxi.nl/ + * Copyright (c) 2014, 2015 The FreeBSD Foundation. + * Copyright (c) 2014, 2017 Andrew Turner. + * Copyright (c) 2018 Olivier Houchard + * All rights reserved. * + * This software was developed by Andrew Turner under + * sponsorship from the FreeBSD Foundation. + * + * Portions of this software were developed by Konstantin Belousov + * under sponsorship from the FreeBSD Foundation. + * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: @@ -26,13 +35,225 @@ #include __FBSDID("$FreeBSD$"); -#include -#define __ELF_WORD_SIZE 32 +#define __ELF_WORD_SIZE 32 + +#include +#include +#include +#include +#include +#include +#include +#include #include +#include +#include +#include -void -elf32_dump_thread(struct thread *td __unused, void *dst __unused, - size_t *off __unused) +#include + +#include + +#define FREEBSD32_MINUSER 0x00001000 +#define FREEBSD32_MAXUSER ((1ul << 32) - PAGE_SIZE) +#define FREEBSD32_SHAREDPAGE (FREEBSD32_MAXUSER - PAGE_SIZE) +#define FREEBSD32_USRSTACK FREEBSD32_SHAREDPAGE + +extern const char *freebsd32_syscallnames[]; + +extern char aarch32_sigcode[]; +extern int sz_aarch32_sigcode; + +static int freebsd32_fetch_syscall_args(struct thread *td); +static void freebsd32_setregs(struct thread *td, struct image_params *imgp, + u_long stack); +static void freebsd32_set_syscall_retval(struct thread *, int); + +static boolean_t elf32_arm_abi_supported(struct image_params *); + +extern void freebsd32_sendsig(sig_t catcher, ksiginfo_t *ksi, sigset_t *mask); + +static struct sysentvec elf32_freebsd_sysvec = { + .sv_size = SYS_MAXSYSCALL, + .sv_table = freebsd32_sysent, + .sv_errsize = 0, + .sv_errtbl = NULL, + .sv_transtrap = NULL, + .sv_fixup = elf32_freebsd_fixup, + .sv_sendsig = freebsd32_sendsig, + .sv_sigcode = aarch32_sigcode, + .sv_szsigcode = &sz_aarch32_sigcode, + .sv_name = "FreeBSD ELF32", + .sv_coredump = elf32_coredump, + .sv_imgact_try = NULL, + .sv_minsigstksz = MINSIGSTKSZ, + .sv_pagesize = PAGE_SIZE, + .sv_minuser = FREEBSD32_MINUSER, + .sv_maxuser = FREEBSD32_MAXUSER, + .sv_usrstack = FREEBSD32_USRSTACK, + .sv_psstrings = FREEBSD32_PS_STRINGS, + .sv_stackprot = VM_PROT_READ | VM_PROT_WRITE, + .sv_copyout_strings = freebsd32_copyout_strings, + .sv_setregs = freebsd32_setregs, + .sv_fixlimit = NULL, // XXX + .sv_maxssiz = NULL, + .sv_flags = SV_ABI_FREEBSD | SV_ILP32 | SV_SHP | SV_TIMEKEEP, + .sv_set_syscall_retval = freebsd32_set_syscall_retval, + .sv_fetch_syscall_args = freebsd32_fetch_syscall_args, + .sv_syscallnames = freebsd32_syscallnames, + .sv_shared_page_base = FREEBSD32_SHAREDPAGE, + .sv_shared_page_len = PAGE_SIZE, + .sv_schedtail = NULL, + .sv_thread_detach = NULL, + .sv_trap = NULL, +}; +INIT_SYSENTVEC(elf32_sysvec, &elf32_freebsd_sysvec); + +static Elf32_Brandinfo freebsd32_brand_info = { + .brand = ELFOSABI_FREEBSD, + .machine = EM_ARM, + .compat_3_brand = "FreeBSD", + .emul_path = NULL, + .interp_path = "/libexec/ld-elf.so.1", + .sysvec = &elf32_freebsd_sysvec, + .interp_newpath = NULL, + .brand_note = &elf32_freebsd_brandnote, + .flags = BI_CAN_EXEC_DYN | BI_BRAND_NOTE, + .header_supported= elf32_arm_abi_supported, +}; + +SYSINIT(elf32, SI_SUB_EXEC, SI_ORDER_FIRST, + (sysinit_cfunc_t)elf32_insert_brand_entry, &freebsd32_brand_info); + +static boolean_t +elf32_arm_abi_supported(struct image_params *imgp) { + const Elf32_Ehdr *hdr; + /* Check if we support AArch32 */ + if (ID_AA64PFR0_EL0(READ_SPECIALREG(id_aa64pfr0_el1)) != + ID_AA64PFR0_EL0_64_32) + return (FALSE); + +#define EF_ARM_EABI_VERSION(x) (((x) & EF_ARM_EABIMASK) >> 24) +#define EF_ARM_EABI_FREEBSD_MIN 4 + hdr = (const Elf32_Ehdr *)imgp->image_header; + if (EF_ARM_EABI_VERSION(hdr->e_flags) < EF_ARM_EABI_FREEBSD_MIN) { + if (bootverbose) + uprintf("Attempting to execute non EABI binary " + "(rev %d) image %s", + EF_ARM_EABI_VERSION(hdr->e_flags), + imgp->args->fname); + return (FALSE); + } + + return (TRUE); +} + +static int +freebsd32_fetch_syscall_args(struct thread *td) +{ + struct proc *p; + register_t *ap; + struct syscall_args *sa; + int error, i, nap; + unsigned int args[4]; + + nap = 4; + p = td->td_proc; + ap = td->td_frame->tf_x; + sa = &td->td_sa; + + /* r7 is the syscall id */ + sa->code = td->td_frame->tf_x[7]; + + if (sa->code == SYS_syscall) { + sa->code = *ap++; + nap--; + } else if (sa->code == SYS___syscall) { + sa->code = ap[1]; + nap -= 2; + ap += 2; + } + + if (sa->code >= p->p_sysent->sv_size) + sa->callp = &p->p_sysent->sv_table[0]; + else + sa->callp = &p->p_sysent->sv_table[sa->code]; + + sa->narg = sa->callp->sy_narg; + for (i = 0; i < nap; i++) + sa->args[i] = ap[i]; + if (sa->narg > nap) { + if ((sa->narg - nap) > nitems(args)) + panic("Too many system call arguiments"); + error = copyin((void *)td->td_frame->tf_x[13], args, + (sa->narg - nap) * sizeof(int)); + for (i = 0; i < (sa->narg - nap); i++) + sa->args[i + nap] = args[i]; + } + + td->td_retval[0] = 0; + td->td_retval[1] = 0; + + return (0); +} + +static void +freebsd32_set_syscall_retval(struct thread *td, int error) +{ + struct trapframe *frame; + + frame = td->td_frame; + switch (error) { + case 0: + frame->tf_x[0] = td->td_retval[0]; + frame->tf_x[1] = td->td_retval[1]; + frame->tf_spsr &= ~PSR_C; + break; + case ERESTART: + /* + * Reconstruct the pc to point at the swi. + */ + if ((frame->tf_spsr & PSR_T) != 0) + frame->tf_elr -= 2; //THUMB_INSN_SIZE; + else + frame->tf_elr -= 4; //INSN_SIZE; + break; + case EJUSTRETURN: + /* nothing to do */ + break; + default: + frame->tf_x[0] = error; + frame->tf_spsr |= PSR_C; + break; + } +} + +static void +freebsd32_setregs(struct thread *td, struct image_params *imgp, + u_long stack) +{ + struct trapframe *tf = td->td_frame; + + memset(tf, 0, sizeof(struct trapframe)); + + /* + * We need to set x0 for init as it doesn't call + * cpu_set_syscall_retval to copy the value. We also + * need to set td_retval for the cases where we do. + */ + tf->tf_x[0] = stack; + /* SP_usr is mapped to x13 */ + tf->tf_x[13] = stack; + /* LR_usr is mapped to x14 */ + tf->tf_x[14] = imgp->entry_addr; + tf->tf_elr = imgp->entry_addr; + tf->tf_spsr = PSR_M_32; +} + +void +elf32_dump_thread(struct thread *td, void *dst, size_t *off) +{ + /* XXX: VFP */ } Modified: head/sys/arm64/arm64/freebsd32_machdep.c ============================================================================== --- head/sys/arm64/arm64/freebsd32_machdep.c Sun Jan 13 18:48:13 2019 (r343003) +++ head/sys/arm64/arm64/freebsd32_machdep.c Sun Jan 13 19:49:46 2019 (r343004) @@ -1,4 +1,5 @@ /*- + * Copyright (c) 2018 Olivier Houchard * Copyright (c) 2017 Nuxi, https://nuxi.nl/ * * Redistribution and use in source and binary forms, with or without @@ -27,44 +28,382 @@ __FBSDID("$FreeBSD$"); #include - +#include +#include +#include +#include +#include +#include +#include +#ifdef VFP +#include +#endif #include +#include +extern void freebsd32_sendsig(sig_t catcher, ksiginfo_t *ksi, sigset_t *mask); + /* + * The first two fields of a ucontext_t are the signal mask and the machine + * context. The next field is uc_link; we want to avoid destroying the link + * when copying out contexts. + */ +#define UC32_COPY_SIZE offsetof(ucontext32_t, uc_link) + +#ifdef VFP +static void get_fpcontext32(struct thread *td, mcontext32_vfp_t *); +#endif + +/* * Stubs for machine dependent 32-bits system calls. */ int +freebsd32_sysarch(struct thread *td, struct freebsd32_sysarch_args *uap) +{ + int error; + +#define ARM_SYNC_ICACHE 0 +#define ARM_DRAIN_WRITEBUF 1 +#define ARM_SET_TP 2 +#define ARM_GET_TP 3 +#define ARM_GET_VFPSTATE 4 + + switch(uap->op) { + case ARM_SET_TP: + WRITE_SPECIALREG(TPIDR_EL0, uap->parms); + WRITE_SPECIALREG(TPIDRRO_EL0, uap->parms); + return 0; + case ARM_SYNC_ICACHE: + { + struct { + uint32_t addr; + uint32_t size; + } args; + + if ((error = copyin(uap->parms, &args, sizeof(args))) != 0) + return (error); + if ((uint64_t)args.addr + (uint64_t)args.size > 0xffffffff) + return (EINVAL); + cpu_icache_sync_range(args.addr, args.size); + return 0; + } + case ARM_GET_VFPSTATE: + { + mcontext32_vfp_t mcontext_vfp; + + struct { + uint32_t mc_vfp_size; + uint32_t mc_vfp; + } args; + if ((error = copyin(uap->parms, &args, sizeof(args))) != 0) + return (error); + if (args.mc_vfp_size != sizeof(mcontext_vfp)) + return (EINVAL); +#ifdef VFP + get_fpcontext32(td, &mcontext_vfp); +#else + bzero(&mcontext_vfp, sizeof(mcontext_vfp)); +#endif + error = copyout(&mcontext_vfp, + (void *)(uintptr_t)args.mc_vfp, + sizeof(mcontext_vfp)); + return error; + } + } + + return (EINVAL); +} + + + +#ifdef VFP +static void +get_fpcontext32(struct thread *td, mcontext32_vfp_t *mcp) +{ + struct pcb *curpcb; + + critical_enter(); + curpcb = curthread->td_pcb; + + if ((curpcb->pcb_fpflags & PCB_FP_STARTED) != 0) { + /* + * If we have just been running VFP instructions we will + * need to save the state to memcpy it below. + */ + vfp_save_state(td, curpcb); + + KASSERT(curpcb->pcb_fpusaved == &curpcb->pcb_fpustate, + ("Called get_fpcontext while the kernel is using the VFP")); + KASSERT((curpcb->pcb_fpflags & ~PCB_FP_USERMASK) == 0, + ("Non-userspace FPU flags set in get_fpcontext")); + memcpy(mcp->mcv_reg, curpcb->pcb_fpustate.vfp_regs, + sizeof(mcp->mcv_reg)); + mcp->mcv_fpscr = VFP_FPSCR_FROM_SRCR(curpcb->pcb_fpustate.vfp_fpcr, + curpcb->pcb_fpustate.vfp_fpsr); + } + critical_exit(); +} + +static void +set_fpcontext32(struct thread *td, mcontext32_vfp_t *mcp) +{ + struct pcb *pcb; + + critical_enter(); + pcb = td->td_pcb; + if (td == curthread) + vfp_discard(td); + memcpy(pcb->pcb_fpustate.vfp_regs, mcp->mcv_reg, + sizeof(pcb->pcb_fpustate.vfp_regs)); + pcb->pcb_fpustate.vfp_fpsr = VFP_FPSR_FROM_FPSCR(mcp->mcv_fpscr); + pcb->pcb_fpustate.vfp_fpcr = VFP_FPSR_FROM_FPSCR(mcp->mcv_fpscr); + critical_exit(); +} +#endif +static void +get_mcontext32(struct thread *td, mcontext32_t *mcp, int flags) +{ + struct pcb *pcb; + struct trapframe *tf; + int i; + + pcb = td->td_pcb; + tf = td->td_frame; + + if ((flags & GET_MC_CLEAR_RET) != 0) { + mcp->mc_gregset[0] = 0; + mcp->mc_gregset[16] = tf->tf_spsr & ~PSR_C; + } else { + mcp->mc_gregset[0] = tf->tf_x[0]; + mcp->mc_gregset[16] = tf->tf_spsr; + } + for (i = 1; i < 15; i++) + mcp->mc_gregset[i] = tf->tf_x[i]; + mcp->mc_gregset[15] = tf->tf_elr; + + mcp->mc_vfp_size = 0; + mcp->mc_vfp_ptr = 0; + + memset(mcp->mc_spare, 0, sizeof(mcp->mc_spare)); +} + +static int +set_mcontext32(struct thread *td, mcontext32_t *mcp) +{ + struct trapframe *tf; + mcontext32_vfp_t mc_vfp; + int i; + + tf = td->td_frame; + + for (i = 0; i < 15; i++) + tf->tf_x[i] = mcp->mc_gregset[i]; + tf->tf_elr = mcp->mc_gregset[15]; + tf->tf_spsr = mcp->mc_gregset[16]; +#ifdef VFP + if (mcp->mc_vfp_size == sizeof(mc_vfp) && mcp->mc_vfp_ptr != 0) { + if (copyin((void *)(uintptr_t)mcp->mc_vfp_ptr, &mc_vfp, + sizeof(mc_vfp)) != 0) + return (EFAULT); + set_fpcontext32(td, &mc_vfp); + } +#endif + + return (0); +} + +#define UC_COPY_SIZE offsetof(ucontext32_t, uc_link) + +int freebsd32_getcontext(struct thread *td, struct freebsd32_getcontext_args *uap) { + ucontext32_t uc; + int ret; - return (ENOSYS); + if (uap->ucp == NULL) + ret = EINVAL; + else { + memset(&uc, 0, sizeof(uc)); + get_mcontext32(td, &uc.uc_mcontext, GET_MC_CLEAR_RET); + PROC_LOCK(td->td_proc); + uc.uc_sigmask = td->td_sigmask; + PROC_UNLOCK(td->td_proc); + ret = copyout(&uc, uap->ucp, UC_COPY_SIZE); + } + return (ret); } int freebsd32_setcontext(struct thread *td, struct freebsd32_setcontext_args *uap) { + ucontext32_t uc; + int ret; - return (ENOSYS); + if (uap->ucp == NULL) + ret = EINVAL; + else { + ret = copyin(uap->ucp, &uc, UC_COPY_SIZE); + if (ret == 0) { + ret = set_mcontext32(td, &uc.uc_mcontext); + if (ret == 0) + kern_sigprocmask(td, SIG_SETMASK, &uc.uc_sigmask, + NULL, 0); + } + } + return (ret); } int freebsd32_sigreturn(struct thread *td, struct freebsd32_sigreturn_args *uap) { + ucontext32_t uc; + int error; - return (ENOSYS); + if (uap == NULL) + return (EFAULT); + if (copyin(uap->sigcntxp, &uc, sizeof(uc))) + return (EFAULT); + error = set_mcontext32(td, &uc.uc_mcontext); + if (error != 0) + return (0); + + /* Restore signal mask. */ + kern_sigprocmask(td, SIG_SETMASK, &uc.uc_sigmask, NULL, 0); + + return (EJUSTRETURN); + } int freebsd32_swapcontext(struct thread *td, struct freebsd32_swapcontext_args *uap) { + ucontext32_t uc; + int ret; - return (ENOSYS); + if (uap->oucp == NULL || uap->ucp == NULL) + ret = EINVAL; + else { + get_mcontext32(td, &uc.uc_mcontext, GET_MC_CLEAR_RET); + PROC_LOCK(td->td_proc); + uc.uc_sigmask = td->td_sigmask; + PROC_UNLOCK(td->td_proc); + ret = copyout(&uc, uap->oucp, UC32_COPY_SIZE); + if (ret == 0) { + ret = copyin(uap->ucp, &uc, UC32_COPY_SIZE); + if (ret == 0) { + ret = set_mcontext32(td, &uc.uc_mcontext); + kern_sigprocmask(td, SIG_SETMASK, + &uc.uc_sigmask, NULL, 0); + } + } + } + return (ret); } -int -freebsd32_sysarch(struct thread *td, struct freebsd32_sysarch_args *uap) +void +freebsd32_sendsig(sig_t catcher, ksiginfo_t *ksi, sigset_t *mask) { + struct thread *td; + struct proc *p; + struct trapframe *tf; + struct sigframe32 *fp, frame; + struct sigacts *psp; + struct siginfo32 siginfo; + struct sysentvec *sysent; + int onstack; + int sig; + int code; - return (ENOSYS); + siginfo_to_siginfo32(&ksi->ksi_info, &siginfo); + td = curthread; + p = td->td_proc; + PROC_LOCK_ASSERT(p, MA_OWNED); + sig = ksi->ksi_signo; + code = ksi->ksi_code; + psp = p->p_sigacts; + mtx_assert(&psp->ps_mtx, MA_OWNED); + tf = td->td_frame; + onstack = sigonstack(tf->tf_x[13]); + + CTR4(KTR_SIG, "sendsig: td=%p (%s) catcher=%p sig=%d", td, p->p_comm, + catcher, sig); + + /* Allocate and validate space for the signal handler context. */ + if ((td->td_pflags & TDP_ALTSTACK) != 0 && !(onstack) && + SIGISMEMBER(psp->ps_sigonstack, sig)) { + fp = (struct sigframe32 *)((uintptr_t)td->td_sigstk.ss_sp + + td->td_sigstk.ss_size); +#if defined(COMPAT_43) + td->td_sigstk.ss_flags |= SS_ONSTACK; +#endif + } else + fp = (struct sigframe32 *)td->td_frame->tf_x[13]; + + /* make room on the stack */ + fp--; + + /* make the stack aligned */ + fp = (struct sigframe32 *)((unsigned long)(fp) &~ (8 - 1)); + /* Populate the siginfo frame. */ + get_mcontext32(td, &frame.sf_uc.uc_mcontext, 0); +#ifdef VFP + get_fpcontext32(td, &frame.sf_vfp); + frame.sf_uc.uc_mcontext.mc_vfp_size = sizeof(fp->sf_vfp); + frame.sf_uc.uc_mcontext.mc_vfp_ptr = (uint32_t)(uintptr_t)&fp->sf_vfp; +#else + frame.sf_uc.uc_mcontext.mc_vfp_size = 0; + frame.sf_uc.uc_mcontext.mc_vfp_ptr = (uint32_t)NULL; +#endif + frame.sf_si = siginfo; + frame.sf_uc.uc_sigmask = *mask; + frame.sf_uc.uc_stack.ss_flags = (td->td_pflags & TDP_ALTSTACK ) + ? ((onstack) ? SS_ONSTACK : 0) : SS_DISABLE; + frame.sf_uc.uc_stack.ss_sp = (uintptr_t)td->td_sigstk.ss_sp; + frame.sf_uc.uc_stack.ss_size = td->td_sigstk.ss_size; + + mtx_unlock(&psp->ps_mtx); + PROC_UNLOCK(td->td_proc); + + /* Copy the sigframe out to the user's stack. */ + if (copyout(&frame, fp, sizeof(*fp)) != 0) { + /* Process has trashed its stack. Kill it. */ + CTR2(KTR_SIG, "sendsig: sigexit td=%p fp=%p", td, fp); + PROC_LOCK(p); + sigexit(td, SIGILL); + } + + /* + * Build context to run handler in. We invoke the handler + * directly, only returning via the trampoline. Note the + * trampoline version numbers are coordinated with machine- + * dependent code in libc. + */ + + tf->tf_x[0] = sig; + tf->tf_x[1] = (register_t)&fp->sf_si; + tf->tf_x[2] = (register_t)&fp->sf_uc; + + /* the trampoline uses r5 as the uc address */ + tf->tf_x[5] = (register_t)&fp->sf_uc; + tf->tf_elr = (register_t)catcher; + tf->tf_x[13] = (register_t)fp; + sysent = p->p_sysent; + if (sysent->sv_sigcode_base != 0) + tf->tf_x[14] = (register_t)sysent->sv_sigcode_base; + else + tf->tf_x[14] = (register_t)(sysent->sv_psstrings - + *(sysent->sv_szsigcode)); + /* Set the mode to enter in the signal handler */ + if ((register_t)catcher & 1) + tf->tf_spsr |= PSR_T; + else + tf->tf_spsr &= ~PSR_T; + + CTR3(KTR_SIG, "sendsig: return td=%p pc=%#x sp=%#x", td, tf->tf_x[14], + tf->tf_x[13]); + + PROC_LOCK(p); + mtx_lock(&psp->ps_mtx); + } Modified: head/sys/arm64/arm64/identcpu.c ============================================================================== --- head/sys/arm64/arm64/identcpu.c Sun Jan 13 18:48:13 2019 (r343003) +++ head/sys/arm64/arm64/identcpu.c Sun Jan 13 19:49:46 2019 (r343004) @@ -49,8 +49,28 @@ static int ident_lock; char machine[] = "arm64"; -SYSCTL_STRING(_hw, HW_MACHINE, machine, CTLFLAG_RD, machine, 0, - "Machine class"); +#ifdef SCTL_MASK32 +extern int adaptive_machine_arch; +#endif + +static int +sysctl_hw_machine(SYSCTL_HANDLER_ARGS) +{ +#ifdef SCTL_MASK32 + static const char machine32[] = "arm"; +#endif + int error; +#ifdef SCTL_MASK32 + if ((req->flags & SCTL_MASK32) != 0 && adaptive_machine_arch) + error = SYSCTL_OUT(req, machine32, sizeof(machine32)); + else +#endif + error = SYSCTL_OUT(req, machine, sizeof(machine)); + return (error); +} + +SYSCTL_PROC(_hw, HW_MACHINE, machine, CTLTYPE_STRING | CTLFLAG_RD | + CTLFLAG_MPSAFE, NULL, 0, sysctl_hw_machine, "A", "Machine class"); /* * Per-CPU affinity as provided in MPIDR_EL1 Modified: head/sys/arm64/arm64/locore.S ============================================================================== --- head/sys/arm64/arm64/locore.S Sun Jan 13 18:48:13 2019 (r343003) +++ head/sys/arm64/arm64/locore.S Sun Jan 13 19:49:46 2019 (r343004) @@ -699,3 +699,21 @@ esigcode: .global szsigcode szsigcode: .quad esigcode - sigcode + +ENTRY(aarch32_sigcode) + .word 0xe1a0000d // mov r0, sp + .word 0xe2800040 // add r0, r0, #SIGF_UC + .word 0xe59f700c // ldr r7, [pc, #12] + .word 0xef000000 // swi #0 + .word 0xe59f7008 // ldr r7, [pc, #8] + .word 0xef000000 // swi #0 + .word 0xeafffffa // b . - 16 +END(aarch32_sigcode) + .word SYS_sigreturn + .word SYS_exit + .align 3 +aarch32_esigcode: + .data + .global sz_aarch32_sigcode +sz_aarch32_sigcode: + .quad aarch32_esigcode - aarch32_sigcode Modified: head/sys/arm64/arm64/machdep.c ============================================================================== --- head/sys/arm64/arm64/machdep.c Sun Jan 13 18:48:13 2019 (r343003) +++ head/sys/arm64/arm64/machdep.c Sun Jan 13 19:49:46 2019 (r343004) @@ -276,17 +276,36 @@ set_dbregs(struct thread *td, struct dbreg *regs) int fill_regs32(struct thread *td, struct reg32 *regs) { + int i; + struct trapframe *tf; - printf("ARM64TODO: fill_regs32"); - return (EDOOFUS); + tf = td->td_frame; + for (i = 0; i < 13; i++) + regs->r[i] = tf->tf_x[i]; + regs->r_sp = tf->tf_sp; + regs->r_lr = tf->tf_lr; + regs->r_pc = tf->tf_elr; + regs->r_cpsr = tf->tf_spsr; + + return (0); } int set_regs32(struct thread *td, struct reg32 *regs) { + int i; + struct trapframe *tf; - printf("ARM64TODO: set_regs32"); - return (EDOOFUS); + tf = td->td_frame; + for (i = 0; i < 13; i++) + tf->tf_x[i] = regs->r[i]; + tf->tf_sp = regs->r_sp; + tf->tf_lr = regs->r_lr; + tf->tf_elr = regs->r_pc; + tf->tf_spsr = regs->r_cpsr; + + + return (0); } int Modified: head/sys/arm64/arm64/undefined.c ============================================================================== --- head/sys/arm64/arm64/undefined.c Sun Jan 13 18:48:13 2019 (r343003) +++ head/sys/arm64/arm64/undefined.c Sun Jan 13 19:49:46 2019 (r343004) @@ -35,10 +35,15 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include +#include +#include +#include #include #include +#include MALLOC_DEFINE(M_UNDEF, "undefhandler", "Undefined instruction handler data"); @@ -83,6 +88,33 @@ id_aa64mmfr2_handler(vm_offset_t va, uint32_t insn, st return (0); } +#ifdef COMPAT_FREEBSD32 +/* arm32 GDB breakpoints */ +#define GDB_BREAKPOINT 0xe6000011 +#define GDB5_BREAKPOINT 0xe7ffdefe +static int +gdb_trapper(vm_offset_t va, uint32_t insn, struct trapframe *frame, + uint32_t esr) +{ + struct thread *td = curthread; + + if (insn == GDB_BREAKPOINT || insn == GDB5_BREAKPOINT) { + if (SV_PROC_FLAG(td->td_proc, SV_ILP32) && + va < VM_MAXUSER_ADDRESS) { + ksiginfo_t ksi; + + ksiginfo_init_trap(&ksi); + ksi.ksi_signo = SIGTRAP; + ksi.ksi_code = TRAP_TRACE; + ksi.ksi_addr = (void *)va; + trapsignal(td, &ksi); + return 1; + } + } + return 0; +} +#endif + void undef_init(void) { @@ -91,6 +123,9 @@ undef_init(void) LIST_INIT(&undef_handlers[1]); install_undef_handler(false, id_aa64mmfr2_handler); +#ifdef COMPAT_FREEBSD32 + install_undef_handler(true, gdb_trapper); +#endif } void * Modified: head/sys/arm64/arm64/vm_machdep.c ============================================================================== --- head/sys/arm64/arm64/vm_machdep.c Sun Jan 13 18:48:13 2019 (r343003) +++ head/sys/arm64/arm64/vm_machdep.c Sun Jan 13 19:49:46 2019 (r343004) @@ -78,6 +78,7 @@ cpu_fork(struct thread *td1, struct proc *p2, struct t * this may not have happened. */ td1->td_pcb->pcb_tpidr_el0 = READ_SPECIALREG(tpidr_el0); + td1->td_pcb->pcb_tpidrro_el0 = READ_SPECIALREG(tpidrro_el0); #ifdef VFP if ((td1->td_pcb->pcb_fpflags & PCB_FP_STARTED) != 0) vfp_save_state(td1, td1->td_pcb); @@ -97,7 +98,7 @@ cpu_fork(struct thread *td1, struct proc *p2, struct t bcopy(td1->td_frame, tf, sizeof(*tf)); tf->tf_x[0] = 0; tf->tf_x[1] = 0; - tf->tf_spsr = 0; + tf->tf_spsr = td1->td_frame->tf_spsr & PSR_M_32; td2->td_frame = tf; @@ -195,7 +196,11 @@ cpu_set_upcall(struct thread *td, void (*entry)(void * { struct trapframe *tf = td->td_frame; - tf->tf_sp = STACKALIGN((uintptr_t)stack->ss_sp + stack->ss_size); + /* 32bits processes use r13 for sp */ + if (td->td_frame->tf_spsr & PSR_M_32) + tf->tf_x[13] = STACKALIGN((uintptr_t)stack->ss_sp + stack->ss_size); + else + tf->tf_sp = STACKALIGN((uintptr_t)stack->ss_sp + stack->ss_size); tf->tf_elr = (register_t)entry; tf->tf_x[0] = (register_t)arg; } @@ -209,9 +214,19 @@ cpu_set_user_tls(struct thread *td, void *tls_base) return (EINVAL); pcb = td->td_pcb; - pcb->pcb_tpidr_el0 = (register_t)tls_base; - if (td == curthread) - WRITE_SPECIALREG(tpidr_el0, tls_base); + if (td->td_frame->tf_spsr & PSR_M_32) { + /* 32bits arm stores the user TLS into tpidrro */ + pcb->pcb_tpidrro_el0 = (register_t)tls_base; + pcb->pcb_tpidr_el0 = (register_t)tls_base; + if (td == curthread) { + WRITE_SPECIALREG(tpidrro_el0, tls_base); + WRITE_SPECIALREG(tpidr_el0, tls_base); + } + } else { + pcb->pcb_tpidr_el0 = (register_t)tls_base; + if (td == curthread) + WRITE_SPECIALREG(tpidr_el0, tls_base); + } return (0); } Modified: head/sys/arm64/conf/GENERIC ============================================================================== --- head/sys/arm64/conf/GENERIC Sun Jan 13 18:48:13 2019 (r343003) +++ head/sys/arm64/conf/GENERIC Sun Jan 13 19:49:46 2019 (r343004) @@ -52,7 +52,7 @@ options PROCFS # Process filesystem (requires PSEUD options PSEUDOFS # Pseudo-filesystem framework options GEOM_RAID # Soft RAID functionality. options GEOM_LABEL # Provides labelization -options COMPAT_FREEBSD32 # Incomplete, but used by cloudabi32.ko. +options COMPAT_FREEBSD32 # Compatible with FreeBSD/arm options COMPAT_FREEBSD11 # Compatible with FreeBSD11 options SCSI_DELAY=5000 # Delay (in ms) before probing SCSI options KTRACE # ktrace(1) support Modified: head/sys/arm64/include/armreg.h ============================================================================== --- head/sys/arm64/include/armreg.h Sun Jan 13 18:48:13 2019 (r343003) +++ head/sys/arm64/include/armreg.h Sun Jan 13 19:49:46 2019 (r343004) @@ -575,7 +575,11 @@ #define PSR_M_EL1h 0x00000005 #define PSR_M_EL2t 0x00000008 #define PSR_M_EL2h 0x00000009 +#define PSR_M_64 0x00000000 +#define PSR_M_32 0x00000010 #define PSR_M_MASK 0x0000000f + +#define PSR_T 0x00000020 #define PSR_AARCH32 0x00000010 #define PSR_F 0x00000040 Modified: head/sys/arm64/include/elf.h ============================================================================== --- head/sys/arm64/include/elf.h Sun Jan 13 18:48:13 2019 (r343003) +++ head/sys/arm64/include/elf.h Sun Jan 13 19:49:46 2019 (r343004) @@ -81,6 +81,10 @@ __ElfType(Auxinfo); #define ELF_TARG_VER 1 #endif +#if __ELF_WORD_SIZE == 32 +#define ET_DYN_LOAD_ADDR 0x12000 +#else #define ET_DYN_LOAD_ADDR 0x100000 +#endif #endif /* !_MACHINE_ELF_H_ */ Modified: head/sys/arm64/include/frame.h ============================================================================== --- head/sys/arm64/include/frame.h Sun Jan 13 18:48:13 2019 (r343003) +++ head/sys/arm64/include/frame.h Sun Jan 13 19:49:46 2019 (r343004) @@ -70,6 +70,14 @@ struct frame { int dummy; }; +#ifdef COMPAT_FREEBSD32 +struct sigframe32 { + struct siginfo32 sf_si; + ucontext32_t sf_uc; + mcontext32_vfp_t sf_vfp; +}; +#endif /* COMPAT_FREEBSD32 */ + #endif /* !LOCORE */ #endif /* !_MACHINE_FRAME_H_ */ Modified: head/sys/arm64/include/reg.h ============================================================================== --- head/sys/arm64/include/reg.h Sun Jan 13 18:48:13 2019 (r343003) +++ head/sys/arm64/include/reg.h Sun Jan 13 19:49:46 2019 (r343004) @@ -42,7 +42,11 @@ struct reg { }; struct reg32 { - int dummy; + unsigned int r[13]; + unsigned int r_sp; + unsigned int r_lr; + unsigned int r_pc; + unsigned int r_cpsr; }; struct fpreg { Modified: head/sys/arm64/include/ucontext.h ============================================================================== --- head/sys/arm64/include/ucontext.h Sun Jan 13 18:48:13 2019 (r343003) +++ head/sys/arm64/include/ucontext.h Sun Jan 13 19:49:46 2019 (r343004) @@ -61,4 +61,30 @@ struct __mcontext { typedef struct __mcontext mcontext_t; +#ifdef COMPAT_FREEBSD32 +#include +typedef struct __mcontext32 { + uint32_t mc_gregset[17]; + uint32_t mc_vfp_size; + uint32_t mc_vfp_ptr; + uint32_t mc_spare[33]; +} mcontext32_t; + +typedef struct __ucontext32 { + sigset_t uc_sigmask; + mcontext32_t uc_mcontext; + u_int32_t uc_link; + struct sigaltstack32 uc_stack; + u_int32_t uc_flags; + u_int32_t __spare__[4]; +} ucontext32_t; + +typedef struct __mcontext32_vfp { + __uint64_t mcv_reg[32]; + __uint32_t mcv_fpscr; +} mcontext32_vfp_t; + +#endif /* COMPAT_FREEBSD32 */ + + #endif /* !_MACHINE_UCONTEXT_H_ */ Modified: head/sys/arm64/include/vfp.h ============================================================================== --- head/sys/arm64/include/vfp.h Sun Jan 13 18:48:13 2019 (r343003) +++ head/sys/arm64/include/vfp.h Sun Jan 13 19:49:46 2019 (r343004) @@ -65,6 +65,11 @@ int fpu_kern_leave(struct thread *, struct fpu_kern_ct int fpu_kern_thread(u_int); int is_fpu_kern_thread(u_int); +/* Convert to and from Aarch32 FPSCR to Aarch64 FPCR/FPSR */ +#define VFP_FPSCR_FROM_SRCR(vpsr, vpcr) ((vpsr) | ((vpcr) & 0x7c00000)) +#define VFP_FPSR_FROM_FPSCR(vpscr) ((vpscr) &~ 0x7c00000) +#define VFP_FPCR_FROM_FPSCR(vpsrc) ((vpsrc) & 0x7c00000) + #endif #endif From owner-svn-src-all@freebsd.org Sun Jan 13 13:57:56 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id DF7F7149B202; Sun, 13 Jan 2019 13:57:56 +0000 (UTC) (envelope-from jilles@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.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 80FC975342; Sun, 13 Jan 2019 13:57:56 +0000 (UTC) (envelope-from jilles@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 6E5E51C5A1; Sun, 13 Jan 2019 13:57:56 +0000 (UTC) (envelope-from jilles@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x0DDvuaY002869; Sun, 13 Jan 2019 13:57:56 GMT (envelope-from jilles@FreeBSD.org) Received: (from jilles@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x0DDvurD002868; Sun, 13 Jan 2019 13:57:56 GMT (envelope-from jilles@FreeBSD.org) Message-Id: <201901131357.x0DDvurD002868@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jilles set sender to jilles@FreeBSD.org using -f From: Jilles Tjoelker Date: Sun, 13 Jan 2019 13:57: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: r343001 - stable/12/lib/libc/sys X-SVN-Group: stable-12 X-SVN-Commit-Author: jilles X-SVN-Commit-Paths: stable/12/lib/libc/sys X-SVN-Commit-Revision: 343001 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 80FC975342 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.96 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_SHORT(-0.96)[-0.958,0]; NEURAL_HAM_LONG(-1.00)[-0.998,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 13 Jan 2019 13:57:57 -0000 Author: jilles Date: Sun Jan 13 13:57:56 2019 New Revision: 343001 URL: https://svnweb.freebsd.org/changeset/base/343001 Log: MFC r342816: thr_wake(2): Minor mdoc fixes Modified: stable/12/lib/libc/sys/thr_wake.2 Directory Properties: stable/12/ (props changed) Modified: stable/12/lib/libc/sys/thr_wake.2 ============================================================================== --- stable/12/lib/libc/sys/thr_wake.2 Sun Jan 13 13:57:11 2019 (r343000) +++ stable/12/lib/libc/sys/thr_wake.2 Sun Jan 13 13:57:56 2019 (r343001) @@ -67,7 +67,7 @@ of that thread in the kernel to fail immediately with .Er EINTR error. The flag is cleared by an interruptible sleep attempt or by a call to -.Xr thr_suspend 2. +.Xr thr_suspend 2 . This is used by the system threading library to implement cancellation. .Pp If @@ -96,7 +96,7 @@ of the calling thread. .El .Sh SEE ALSO .Xr ps 1 , -.Xr thr_self 2 +.Xr thr_self 2 , .Xr thr_suspend 2 , .Xr pthread_cancel 3 , .Xr pthread_resume_np 3 , From owner-svn-src-all@freebsd.org Sun Jan 13 20:33:55 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id D76BA1485EE9; Sun, 13 Jan 2019 20:33:55 +0000 (UTC) (envelope-from jah@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 766398FBA7; Sun, 13 Jan 2019 20:33:55 +0000 (UTC) (envelope-from jah@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1: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 62B2320979; Sun, 13 Jan 2019 20:33:55 +0000 (UTC) (envelope-from jah@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x0DKXtHM020500; Sun, 13 Jan 2019 20:33:55 GMT (envelope-from jah@FreeBSD.org) Received: (from jah@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x0DKXtin020499; Sun, 13 Jan 2019 20:33:55 GMT (envelope-from jah@FreeBSD.org) Message-Id: <201901132033.x0DKXtin020499@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jah set sender to jah@FreeBSD.org using -f From: "Jason A. Harmening" Date: Sun, 13 Jan 2019 20:33:55 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r343005 - head/sys/kern X-SVN-Group: head X-SVN-Commit-Author: jah X-SVN-Commit-Paths: head/sys/kern X-SVN-Commit-Revision: 343005 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 766398FBA7 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.95 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_SHORT(-0.96)[-0.956,0]; NEURAL_HAM_LONG(-1.00)[-0.999,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 13 Jan 2019 20:33:56 -0000 Author: jah Date: Sun Jan 13 20:33:54 2019 New Revision: 343005 URL: https://svnweb.freebsd.org/changeset/base/343005 Log: Handle SIGIO for listening sockets r319722 separated struct socket and parts of the socket I/O path into listening-socket-specific and dataflow-socket-specific pieces. Listening socket connection notifications are now handled by solisten_wakeup() instead of sowakeup(), but solisten_wakeup() does not currently post SIGIO to the owning process. PR: 234258 Reported by: Kenneth Adelman MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D18664 Modified: head/sys/kern/uipc_socket.c Modified: head/sys/kern/uipc_socket.c ============================================================================== --- head/sys/kern/uipc_socket.c Sun Jan 13 19:49:46 2019 (r343004) +++ head/sys/kern/uipc_socket.c Sun Jan 13 20:33:54 2019 (r343005) @@ -886,6 +886,8 @@ solisten_wakeup(struct socket *sol) } SOLISTEN_UNLOCK(sol); wakeup_one(&sol->sol_comp); + if ((sol->so_state & SS_ASYNC) && sol->so_sigio != NULL) + pgsigio(&sol->so_sigio, SIGIO, 0); } /* From owner-svn-src-all@freebsd.org Sun Jan 13 18:48:14 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 7E86214A5FB8; Sun, 13 Jan 2019 18:48:14 +0000 (UTC) (envelope-from jilles@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.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 2487C899AF; Sun, 13 Jan 2019 18:48:14 +0000 (UTC) (envelope-from jilles@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 13DF51F6EE; Sun, 13 Jan 2019 18:48:14 +0000 (UTC) (envelope-from jilles@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x0DImDu7057775; Sun, 13 Jan 2019 18:48:13 GMT (envelope-from jilles@FreeBSD.org) Received: (from jilles@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x0DImDAc057774; Sun, 13 Jan 2019 18:48:13 GMT (envelope-from jilles@FreeBSD.org) Message-Id: <201901131848.x0DImDAc057774@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jilles set sender to jilles@FreeBSD.org using -f From: Jilles Tjoelker Date: Sun, 13 Jan 2019 18:48:13 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r343003 - stable/11/usr.bin/getconf X-SVN-Group: stable-11 X-SVN-Commit-Author: jilles X-SVN-Commit-Paths: stable/11/usr.bin/getconf X-SVN-Commit-Revision: 343003 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 2487C899AF X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.97 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_LONG(-1.00)[-0.998,0]; NEURAL_HAM_SHORT(-0.98)[-0.977,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 13 Jan 2019 18:48:14 -0000 Author: jilles Date: Sun Jan 13 18:48:13 2019 New Revision: 343003 URL: https://svnweb.freebsd.org/changeset/base/343003 Log: MFC r342817: getconf(1): Minor mdoc fix Modified: stable/11/usr.bin/getconf/getconf.1 Directory Properties: stable/11/ (props changed) Modified: stable/11/usr.bin/getconf/getconf.1 ============================================================================== --- stable/11/usr.bin/getconf/getconf.1 Sun Jan 13 18:47:37 2019 (r343002) +++ stable/11/usr.bin/getconf/getconf.1 Sun Jan 13 18:48:13 2019 (r343003) @@ -70,7 +70,7 @@ Otherwise, all system configuration variables are reported using .Xr confstr 3 and -.Xr sysconf 3. +.Xr sysconf 3 . .Pp The second form of the command, with two mandatory arguments, retrieves file- and file system-specific From owner-svn-src-all@freebsd.org Sun Jan 13 23:29:47 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id AF43A148C884; Sun, 13 Jan 2019 23:29:47 +0000 (UTC) (envelope-from cognet@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 5718296327; Sun, 13 Jan 2019 23:29:47 +0000 (UTC) (envelope-from cognet@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1: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 2EDF322648; Sun, 13 Jan 2019 23:29:47 +0000 (UTC) (envelope-from cognet@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x0DNTlhT012729; Sun, 13 Jan 2019 23:29:47 GMT (envelope-from cognet@FreeBSD.org) Received: (from cognet@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x0DNTkJs012724; Sun, 13 Jan 2019 23:29:46 GMT (envelope-from cognet@FreeBSD.org) Message-Id: <201901132329.x0DNTkJs012724@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: cognet set sender to cognet@FreeBSD.org using -f From: Olivier Houchard Date: Sun, 13 Jan 2019 23:29:46 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r343006 - in head/sys/arm64: arm64 include X-SVN-Group: head X-SVN-Commit-Author: cognet X-SVN-Commit-Paths: in head/sys/arm64: arm64 include X-SVN-Commit-Revision: 343006 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 5718296327 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.97 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_SHORT(-0.97)[-0.968,0]; NEURAL_HAM_LONG(-1.00)[-0.999,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 13 Jan 2019 23:29:47 -0000 Author: cognet Date: Sun Jan 13 23:29:46 2019 New Revision: 343006 URL: https://svnweb.freebsd.org/changeset/base/343006 Log: Introduce cpu_icache_sync_range_checked(), that does the same thing as cpu_icache_sync_range(), except that it sets pcb_onfault to catch any page fault, as doing cache maintenance operations for non-mapped generates a data abort, and use it in freebsd32_sysarch(), so that a userland program attempting to sync the icache with unmapped addresses doesn't crash the kernel. Spotted out by: andrew Modified: head/sys/arm64/arm64/cpufunc_asm.S head/sys/arm64/arm64/freebsd32_machdep.c head/sys/arm64/include/cpufunc.h Modified: head/sys/arm64/arm64/cpufunc_asm.S ============================================================================== --- head/sys/arm64/arm64/cpufunc_asm.S Sun Jan 13 20:33:54 2019 (r343005) +++ head/sys/arm64/arm64/cpufunc_asm.S Sun Jan 13 23:29:46 2019 (r343006) @@ -147,3 +147,24 @@ ENTRY(arm64_icache_sync_range) ic ialluis dsb ish END(arm64_icache_sync_range) + +/* + * int arm64_icache_sync_range_checked(vm_offset_t, vm_size_t) + */ +ENTRY(arm64_icache_sync_range_checked) + adr x5, cache_maint_fault + SET_FAULT_HANDLER(x5, x6) + /* XXX: See comment in arm64_icache_sync_range */ + cache_handle_range dcop = cvau + ic ialluis + dsb ish + SET_FAULT_HANDLER(xzr, x6) + mov x0, #0 + ret +END(arm64_icache_sync_range_checked) + +ENTRY(cache_maint_fault) + SET_FAULT_HANDLER(xzr, x1) + mov x0, #EFAULT + ret +END(cache_maint_fault) Modified: head/sys/arm64/arm64/freebsd32_machdep.c ============================================================================== --- head/sys/arm64/arm64/freebsd32_machdep.c Sun Jan 13 20:33:54 2019 (r343005) +++ head/sys/arm64/arm64/freebsd32_machdep.c Sun Jan 13 23:29:46 2019 (r343006) @@ -85,7 +85,7 @@ freebsd32_sysarch(struct thread *td, struct freebsd32_ return (error); if ((uint64_t)args.addr + (uint64_t)args.size > 0xffffffff) return (EINVAL); - cpu_icache_sync_range(args.addr, args.size); + cpu_icache_sync_range_checked(args.addr, args.size); return 0; } case ARM_GET_VFPSTATE: Modified: head/sys/arm64/include/cpufunc.h ============================================================================== --- head/sys/arm64/include/cpufunc.h Sun Jan 13 20:33:54 2019 (r343005) +++ head/sys/arm64/include/cpufunc.h Sun Jan 13 23:29:46 2019 (r343006) @@ -138,12 +138,14 @@ extern int64_t dczva_line_size; #define cpu_idcache_wbinv_range(a, s) arm64_idcache_wbinv_range((a), (s)) #define cpu_icache_sync_range(a, s) arm64_icache_sync_range((a), (s)) +#define cpu_icache_sync_range_checked(a, s) arm64_icache_sync_range_checked((a), (s)) void arm64_nullop(void); void arm64_setttb(vm_offset_t); void arm64_tlb_flushID(void); void arm64_tlb_flushID_SE(vm_offset_t); void arm64_icache_sync_range(vm_offset_t, vm_size_t); +int arm64_icache_sync_range_checked(vm_offset_t, vm_size_t); void arm64_idcache_wbinv_range(vm_offset_t, vm_size_t); void arm64_dcache_wbinv_range(vm_offset_t, vm_size_t); void arm64_dcache_inv_range(vm_offset_t, vm_size_t); From owner-svn-src-all@freebsd.org Sun Jan 13 23:41:57 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 81C7C148CE10; Sun, 13 Jan 2019 23:41:57 +0000 (UTC) (envelope-from cognet@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 2930B96AE4; Sun, 13 Jan 2019 23:41:57 +0000 (UTC) (envelope-from cognet@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1: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 1B91922968; Sun, 13 Jan 2019 23:41:57 +0000 (UTC) (envelope-from cognet@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x0DNfuYk023134; Sun, 13 Jan 2019 23:41:56 GMT (envelope-from cognet@FreeBSD.org) Received: (from cognet@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x0DNfu5r023132; Sun, 13 Jan 2019 23:41:56 GMT (envelope-from cognet@FreeBSD.org) Message-Id: <201901132341.x0DNfu5r023132@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: cognet set sender to cognet@FreeBSD.org using -f From: Olivier Houchard Date: Sun, 13 Jan 2019 23:41:56 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r343007 - head/sys/arm64/arm64 X-SVN-Group: head X-SVN-Commit-Author: cognet X-SVN-Commit-Paths: head/sys/arm64/arm64 X-SVN-Commit-Revision: 343007 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 2930B96AE4 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.97 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_SHORT(-0.97)[-0.967,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_LONG(-1.00)[-0.999,0] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 13 Jan 2019 23:41:57 -0000 Author: cognet Date: Sun Jan 13 23:41:56 2019 New Revision: 343007 URL: https://svnweb.freebsd.org/changeset/base/343007 Log: Don't forget to add the needed #includes. Pointy hat to: cognet Modified: head/sys/arm64/arm64/cpufunc_asm.S Modified: head/sys/arm64/arm64/cpufunc_asm.S ============================================================================== --- head/sys/arm64/arm64/cpufunc_asm.S Sun Jan 13 23:29:46 2019 (r343006) +++ head/sys/arm64/arm64/cpufunc_asm.S Sun Jan 13 23:41:56 2019 (r343007) @@ -29,8 +29,12 @@ * */ +#include #include #include + +#include "assym.inc" + __FBSDID("$FreeBSD$"); /* From owner-svn-src-all@freebsd.org Mon Jan 14 01:30:49 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 2C256148F526; Mon, 14 Jan 2019 01:30:49 +0000 (UTC) (envelope-from gonzo@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 BFA016AF57; Mon, 14 Jan 2019 01:30:48 +0000 (UTC) (envelope-from gonzo@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id B238323A98; Mon, 14 Jan 2019 01:30:48 +0000 (UTC) (envelope-from gonzo@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x0E1Umea076470; Mon, 14 Jan 2019 01:30:48 GMT (envelope-from gonzo@FreeBSD.org) Received: (from gonzo@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x0E1Um2T076469; Mon, 14 Jan 2019 01:30:48 GMT (envelope-from gonzo@FreeBSD.org) Message-Id: <201901140130.x0E1Um2T076469@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gonzo set sender to gonzo@FreeBSD.org using -f From: Oleksandr Tymoshenko Date: Mon, 14 Jan 2019 01:30:48 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r343008 - head/stand/i386/libi386 X-SVN-Group: head X-SVN-Commit-Author: gonzo X-SVN-Commit-Paths: head/stand/i386/libi386 X-SVN-Commit-Revision: 343008 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: BFA016AF57 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.94 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_SHORT(-0.95)[-0.945,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_LONG(-1.00)[-0.999,0] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 14 Jan 2019 01:30:49 -0000 Author: gonzo Date: Mon Jan 14 01:30:48 2019 New Revision: 343008 URL: https://svnweb.freebsd.org/changeset/base/343008 Log: Add Dell Chromebook to the list of devices with E820 extmem quirk enabled Just like for Acer C270 chromebook the E820 extmem workaround is required for FreeBSD to boot on Dell chromebook. PR: 204916 Submitted by: Keith White MFC after: 1 week Modified: head/stand/i386/libi386/biosmem.c Modified: head/stand/i386/libi386/biosmem.c ============================================================================== --- head/stand/i386/libi386/biosmem.c Sun Jan 13 23:41:56 2019 (r343007) +++ head/stand/i386/libi386/biosmem.c Mon Jan 14 01:30:48 2019 (r343008) @@ -74,6 +74,7 @@ struct bios_getmem_quirks { static struct bios_getmem_quirks quirks[] = { {"coreboot", "Acer", "Peppy", BQ_DISTRUST_E820_EXTMEM}, + {"coreboot", "Dell", "Wolf", BQ_DISTRUST_E820_EXTMEM}, {NULL, NULL, NULL, 0} }; From owner-svn-src-all@freebsd.org Mon Jan 14 03:13:32 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 0F6851491AAD; Mon, 14 Jan 2019 03:13:32 +0000 (UTC) (envelope-from gonzo@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 A00B16DF4D; Mon, 14 Jan 2019 03:13:31 +0000 (UTC) (envelope-from gonzo@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 8C4BE24D87; Mon, 14 Jan 2019 03:13:31 +0000 (UTC) (envelope-from gonzo@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x0E3DV4E035167; Mon, 14 Jan 2019 03:13:31 GMT (envelope-from gonzo@FreeBSD.org) Received: (from gonzo@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x0E3DVir035166; Mon, 14 Jan 2019 03:13:31 GMT (envelope-from gonzo@FreeBSD.org) Message-Id: <201901140313.x0E3DVir035166@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gonzo set sender to gonzo@FreeBSD.org using -f From: Oleksandr Tymoshenko Date: Mon, 14 Jan 2019 03:13:31 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r343009 - head/tools/build/mk X-SVN-Group: head X-SVN-Commit-Author: gonzo X-SVN-Commit-Paths: head/tools/build/mk X-SVN-Commit-Revision: 343009 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: A00B16DF4D X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.96 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_SHORT(-0.96)[-0.960,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_LONG(-1.00)[-0.999,0] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 14 Jan 2019 03:13:32 -0000 Author: gonzo Date: Mon Jan 14 03:13:31 2019 New Revision: 343009 URL: https://svnweb.freebsd.org/changeset/base/343009 Log: Add four kerberos CLI utilities to OptionalObsoleteFiles.inc Add asn1_compile, make-roken, kcc, and slc to the OptionalObsoleteFiles.inc so they would be removed during delete-old stage if the new world is built without Kerberos support. PR: 230725 Submitted by: Dmitry Wagin MFC after: 1 week Modified: head/tools/build/mk/OptionalObsoleteFiles.inc Modified: head/tools/build/mk/OptionalObsoleteFiles.inc ============================================================================== --- head/tools/build/mk/OptionalObsoleteFiles.inc Mon Jan 14 01:30:48 2019 (r343008) +++ head/tools/build/mk/OptionalObsoleteFiles.inc Mon Jan 14 03:13:31 2019 (r343009) @@ -2989,9 +2989,11 @@ OLD_FILES+=usr/share/man/man1/truss.1.gz .if ${MK_KERBEROS} == no OLD_FILES+=etc/rc.d/ipropd_master OLD_FILES+=etc/rc.d/ipropd_slave +OLD_FILES+=usr/bin/asn1_compile OLD_FILES+=usr/bin/compile_et OLD_FILES+=usr/bin/hxtool OLD_FILES+=usr/bin/kadmin +OLD_FILES+=usr/bin/kcc OLD_FILES+=usr/bin/kdestroy OLD_FILES+=usr/bin/kf OLD_FILES+=usr/bin/kgetcred @@ -3001,6 +3003,8 @@ OLD_FILES+=usr/bin/kpasswd OLD_FILES+=usr/bin/krb5-config OLD_FILES+=usr/bin/ksu OLD_FILES+=usr/bin/kswitch +OLD_FILES+=usr/bin/make-roken +OLD_FILES+=usr/bin/slc OLD_FILES+=usr/bin/string2key OLD_FILES+=usr/bin/verify_krb5_conf OLD_FILES+=usr/include/asn1-common.h From owner-svn-src-all@freebsd.org Mon Jan 14 03:19:10 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 2A8EE1491CD5; Mon, 14 Jan 2019 03:19:10 +0000 (UTC) (envelope-from pfg@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 C19586E2C9; Mon, 14 Jan 2019 03:19:09 +0000 (UTC) (envelope-from pfg@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 96EDF24D8F; Mon, 14 Jan 2019 03:19:09 +0000 (UTC) (envelope-from pfg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x0E3J97d035640; Mon, 14 Jan 2019 03:19:09 GMT (envelope-from pfg@FreeBSD.org) Received: (from pfg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x0E3J9e7035639; Mon, 14 Jan 2019 03:19:09 GMT (envelope-from pfg@FreeBSD.org) Message-Id: <201901140319.x0E3J9e7035639@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: pfg set sender to pfg@FreeBSD.org using -f From: "Pedro F. Giffuni" Date: Mon, 14 Jan 2019 03:19: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: r343010 - stable/12/share/man/man5 X-SVN-Group: stable-12 X-SVN-Commit-Author: pfg X-SVN-Commit-Paths: stable/12/share/man/man5 X-SVN-Commit-Revision: 343010 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: C19586E2C9 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.95 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_SHORT(-0.96)[-0.955,0]; NEURAL_HAM_LONG(-1.00)[-0.998,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 14 Jan 2019 03:19:10 -0000 Author: pfg Date: Mon Jan 14 03:19:08 2019 New Revision: 343010 URL: https://svnweb.freebsd.org/changeset/base/343010 Log: MFC r342632: ext2fs.5: Update the manpage. General update of the driver description and mention some important credits. Add a symlink for ext4fs as it is of special interest nowadays. Fix some `mandoc -Tlint` issues while here. Modified: stable/12/share/man/man5/Makefile stable/12/share/man/man5/ext2fs.5 Directory Properties: stable/12/ (props changed) Modified: stable/12/share/man/man5/Makefile ============================================================================== --- stable/12/share/man/man5/Makefile Mon Jan 14 03:13:31 2019 (r343009) +++ stable/12/share/man/man5/Makefile Mon Jan 14 03:19:08 2019 (r343010) @@ -70,6 +70,7 @@ MAN= acct.5 \ tmpfs.5 MLINKS= dir.5 dirent.5 +MLINKS+=ext2fs.5 ext4fs.5 MLINKS+=fs.5 inode.5 MLINKS+=hosts.equiv.5 rhosts.5 MLINKS+=msdosfs.5 msdos.5 Modified: stable/12/share/man/man5/ext2fs.5 ============================================================================== --- stable/12/share/man/man5/ext2fs.5 Mon Jan 14 03:13:31 2019 (r343009) +++ stable/12/share/man/man5/ext2fs.5 Mon Jan 14 03:19:08 2019 (r343010) @@ -26,7 +26,7 @@ .\" .\" $FreeBSD$ .\" -.Dd December 4, 2018 +.Dd December 30, 2018 .Dt EXT2FS 5 .Os .Sh NAME @@ -47,13 +47,15 @@ The driver will permit the .Fx kernel to access -.Tn ext2 , -.Tn ext3 , +ext2 +file systems and its derivatives. +It currently implements most of the features required by +.Em ext3 and -.Tn ext4 +.Em ext4 file systems. Support for Extended Attributes in -.Tn ext4 +.Em ext4 is experimental. Journalling and encryption are currently not supported. .Sh EXAMPLES @@ -77,14 +79,28 @@ driver first appeared in .An -nosplit The .Nm -kernel implementation was written by +kernel implementation is derived from code written, +or modified, +by .An Godmar Back -or modified by him using the CSRG sources. +using the UFS CSRG sources for CMU Mach. .Pp .An John Dyson -and others in the +did the initial port to +.Fx . +.An Aditya Sarawgi +merged important parts of the allocation code from a clean-room +.Nx +implementation. +.An Zheng Liu +and +.An Fedor Upurov +implemented the read and write support respectively for +.Em ext4 +filesystems. +The .Fx -Project made modifications. +community has contributed a huge amount of modifications. .Pp -This manual page was written by +The initial version of this manual page was written by .An Craig Rodrigues Aq Mt rodrigc@FreeBSD.org . From owner-svn-src-all@freebsd.org Mon Jan 14 06:34:59 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 03FE3149558C; Mon, 14 Jan 2019 06:34:59 +0000 (UTC) (envelope-from nyan@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 90B6F72954; Mon, 14 Jan 2019 06:34:58 +0000 (UTC) (envelope-from nyan@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1: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 6386E26F3F; Mon, 14 Jan 2019 06:34:58 +0000 (UTC) (envelope-from nyan@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x0E6YwXm038892; Mon, 14 Jan 2019 06:34:58 GMT (envelope-from nyan@FreeBSD.org) Received: (from nyan@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x0E6YscN038873; Mon, 14 Jan 2019 06:34:54 GMT (envelope-from nyan@FreeBSD.org) Message-Id: <201901140634.x0E6YscN038873@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: nyan set sender to nyan@FreeBSD.org using -f From: Takahashi Yoshihiro Date: Mon, 14 Jan 2019 06:34:54 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r343011 - in head/kerberos5: lib/libasn1 lib/libgssapi_krb5 lib/libhdb lib/libheimntlm lib/libhx509 lib/libkadm5clnt lib/libkadm5srv lib/libkdc lib/libkrb5 lib/libwind libexec/digest-se... X-SVN-Group: head X-SVN-Commit-Author: nyan X-SVN-Commit-Paths: in head/kerberos5: lib/libasn1 lib/libgssapi_krb5 lib/libhdb lib/libheimntlm lib/libhx509 lib/libkadm5clnt lib/libkadm5srv lib/libkdc lib/libkrb5 lib/libwind libexec/digest-service libexec/hprop libex... X-SVN-Commit-Revision: 343011 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 90B6F72954 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.94 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_SHORT(-0.94)[-0.942,0]; NEURAL_HAM_LONG(-1.00)[-0.999,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 14 Jan 2019 06:34:59 -0000 Author: nyan Date: Mon Jan 14 06:34:54 2019 New Revision: 343011 URL: https://svnweb.freebsd.org/changeset/base/343011 Log: Use ${SRCTOP}/contrib/com_err/com_err.h instead of the installed com_err.h. This fixes build when com_err.h is not installed. PR: 234691 MFC after: 1 week Modified: head/kerberos5/lib/libasn1/Makefile head/kerberos5/lib/libgssapi_krb5/Makefile head/kerberos5/lib/libhdb/Makefile head/kerberos5/lib/libheimntlm/Makefile head/kerberos5/lib/libhx509/Makefile head/kerberos5/lib/libkadm5clnt/Makefile head/kerberos5/lib/libkadm5srv/Makefile head/kerberos5/lib/libkdc/Makefile head/kerberos5/lib/libkrb5/Makefile head/kerberos5/lib/libwind/Makefile head/kerberos5/libexec/digest-service/Makefile head/kerberos5/libexec/hprop/Makefile head/kerberos5/libexec/hpropd/Makefile head/kerberos5/libexec/kadmind/Makefile head/kerberos5/libexec/kdc/Makefile head/kerberos5/usr.bin/hxtool/Makefile head/kerberos5/usr.bin/kadmin/Makefile head/kerberos5/usr.bin/string2key/Makefile head/kerberos5/usr.bin/verify_krb5_conf/Makefile head/kerberos5/usr.sbin/kstash/Makefile Modified: head/kerberos5/lib/libasn1/Makefile ============================================================================== --- head/kerberos5/lib/libasn1/Makefile Mon Jan 14 03:19:08 2019 (r343010) +++ head/kerberos5/lib/libasn1/Makefile Mon Jan 14 06:34:54 2019 (r343011) @@ -21,7 +21,8 @@ SRCS= asn1_err.c \ timegm.c \ ${GEN:S/.x$/.c/:S/.hx$/.h/} -CFLAGS+=-I${KRB5DIR}/lib/asn1 -I${KRB5DIR}/lib/roken -I. +CFLAGS+=-I${KRB5DIR}/lib/asn1 -I${KRB5DIR}/lib/roken \ + -I${SRCTOP}/contrib/com_err -I. GEN_RFC2459= asn1_rfc2459_asn1.x rfc2459_asn1.hx rfc2459_asn1-priv.hx GEN_CMS= asn1_cms_asn1.x cms_asn1.hx cms_asn1-priv.hx Modified: head/kerberos5/lib/libgssapi_krb5/Makefile ============================================================================== --- head/kerberos5/lib/libgssapi_krb5/Makefile Mon Jan 14 03:19:08 2019 (r343010) +++ head/kerberos5/lib/libgssapi_krb5/Makefile Mon Jan 14 06:34:54 2019 (r343011) @@ -78,7 +78,9 @@ CFLAGS+=-I${KRB5DIR}/lib/gssapi/krb5 CFLAGS+=-I${KRB5DIR}/lib/gssapi/gssapi CFLAGS+=-I${KRB5DIR}/lib/krb5 CFLAGS+=-I${KRB5DIR}/lib/asn1 -CFLAGS+=-I${KRB5DIR}/lib/roken -I. +CFLAGS+=-I${KRB5DIR}/lib/roken +CFLAGS+=-I${SRCTOP}/contrib/com_err +CFLAGS+=-I. .include Modified: head/kerberos5/lib/libhdb/Makefile ============================================================================== --- head/kerberos5/lib/libhdb/Makefile Mon Jan 14 03:19:08 2019 (r343010) +++ head/kerberos5/lib/libhdb/Makefile Mon Jan 14 06:34:54 2019 (r343011) @@ -59,6 +59,7 @@ SRCS= common.c \ CFLAGS+=-I${KRB5DIR}/lib/hdb -I${KRB5DIR}/lib/asn1 \ -I${KRB5DIR}/lib/roken -I${SRCTOP}/contrib/sqlite3/ \ -I${KRB5DIR}/lib/krb5 \ + -I${SRCTOP}/contrib/com_err \ -I. ${LDAPCFLAGS} CFLAGS+=-DHDB_DB_DIR="\"/var/heimdal\"" Modified: head/kerberos5/lib/libheimntlm/Makefile ============================================================================== --- head/kerberos5/lib/libheimntlm/Makefile Mon Jan 14 03:19:08 2019 (r343010) +++ head/kerberos5/lib/libheimntlm/Makefile Mon Jan 14 06:34:54 2019 (r343011) @@ -5,7 +5,8 @@ LDFLAGS= -Wl,--no-undefined LIBADD= crypto com_err krb5 roken SRCS= ntlm.c ntlm_err.c ntlm_err.h INCS= heimntlm.h heimntlm-protos.h ntlm_err.h -CFLAGS+=-I${KRB5DIR}/lib/ntlm -I${KRB5DIR}/lib/roken +CFLAGS+=-I${KRB5DIR}/lib/ntlm -I${KRB5DIR}/lib/roken \ + -I${SRCTOP}/contrib/com_err VERSION_MAP= ${KRB5DIR}/lib/ntlm/version-script.map MAN= ntlm_buf.3 \ Modified: head/kerberos5/lib/libhx509/Makefile ============================================================================== --- head/kerberos5/lib/libhx509/Makefile Mon Jan 14 03:19:08 2019 (r343010) +++ head/kerberos5/lib/libhx509/Makefile Mon Jan 14 06:34:54 2019 (r343011) @@ -211,7 +211,9 @@ CFLAGS+=-I${KRB5DIR}/lib/hx509 CFLAGS+=-I${KRB5DIR}/lib/hx509/ref CFLAGS+=-I${KRB5DIR}/lib/asn1 CFLAGS+=-I${KRB5DIR}/lib/wind -CFLAGS+=-I${KRB5DIR}/lib/roken -I. +CFLAGS+=-I${KRB5DIR}/lib/roken +CFLAGS+=-I${SRCTOP}/contrib/com_err +CFLAGS+=-I. GEN_OCSP= \ asn1_OCSPBasicOCSPResponse.x \ Modified: head/kerberos5/lib/libkadm5clnt/Makefile ============================================================================== --- head/kerberos5/lib/libkadm5clnt/Makefile Mon Jan 14 03:19:08 2019 (r343010) +++ head/kerberos5/lib/libkadm5clnt/Makefile Mon Jan 14 06:34:54 2019 (r343011) @@ -34,7 +34,8 @@ SRCS= ad.c \ rename_c.c \ send_recv.c -CFLAGS+=-I${KRB5DIR}/lib/kadm5 -I${KRB5DIR}/lib/asn1 -I${KRB5DIR}/lib/roken -I. +CFLAGS+=-I${KRB5DIR}/lib/kadm5 -I${KRB5DIR}/lib/asn1 -I${KRB5DIR}/lib/roken \ + -I${SRCTOP}/contrib/com_err -I. .include Modified: head/kerberos5/lib/libkadm5srv/Makefile ============================================================================== --- head/kerberos5/lib/libkadm5srv/Makefile Mon Jan 14 03:19:08 2019 (r343010) +++ head/kerberos5/lib/libkadm5srv/Makefile Mon Jan 14 06:34:54 2019 (r343011) @@ -35,7 +35,8 @@ SRCS= acl.c \ set_keys.c \ set_modifier.c -CFLAGS+=-I${KRB5DIR}/lib/kadm5 -I${KRB5DIR}/lib/asn1 -I${KRB5DIR}/lib/roken -I. +CFLAGS+=-I${KRB5DIR}/lib/kadm5 -I${KRB5DIR}/lib/asn1 -I${KRB5DIR}/lib/roken \ + -I${SRCTOP}/contrib/com_err -I. .include Modified: head/kerberos5/lib/libkdc/Makefile ============================================================================== --- head/kerberos5/lib/libkdc/Makefile Mon Jan 14 03:19:08 2019 (r343010) +++ head/kerberos5/lib/libkdc/Makefile Mon Jan 14 06:34:54 2019 (r343011) @@ -28,7 +28,8 @@ SRCS= \ CFLAGS+= -I${KRB5DIR}/lib/roken \ -I${KRB5DIR}/lib/krb5 \ -I${KRB5DIR}/lib/hdb \ - -I${KRB5DIR}/kdc + -I${KRB5DIR}/kdc \ + -I${SRCTOP}/contrib/com_err .include Modified: head/kerberos5/lib/libkrb5/Makefile ============================================================================== --- head/kerberos5/lib/libkrb5/Makefile Mon Jan 14 03:19:08 2019 (r343010) +++ head/kerberos5/lib/libkrb5/Makefile Mon Jan 14 06:34:54 2019 (r343011) @@ -621,7 +621,9 @@ CFLAGS+= -I${KRB5DIR}/lib/krb5 \ -I${KRB5DIR}/lib/asn1 \ -I${KRB5DIR}/lib/roken \ -I${KRB5DIR}/lib/ipc \ - -I${KRB5DIR}/base -I. + -I${KRB5DIR}/base \ + -I${SRCTOP}/contrib/com_err \ + -I. .include Modified: head/kerberos5/lib/libwind/Makefile ============================================================================== --- head/kerberos5/lib/libwind/Makefile Mon Jan 14 03:19:08 2019 (r343010) +++ head/kerberos5/lib/libwind/Makefile Mon Jan 14 06:34:54 2019 (r343011) @@ -27,7 +27,7 @@ SRCS= bidi.c \ SRCS+= wind_err.c \ wind_err.h -CFLAGS+=-I${KRB5DIR}/lib/roken -I. +CFLAGS+=-I${KRB5DIR}/lib/roken -I${SRCTOP}/contrib/com_err -I. .include Modified: head/kerberos5/libexec/digest-service/Makefile ============================================================================== --- head/kerberos5/libexec/digest-service/Makefile Mon Jan 14 03:19:08 2019 (r343010) +++ head/kerberos5/libexec/digest-service/Makefile Mon Jan 14 06:34:54 2019 (r343011) @@ -7,7 +7,8 @@ CFLAGS+= -I${KRB5DIR}/kdc \ -I${KRB5DIR}/lib/krb5 \ -I${KRB5DIR}/lib/ipc \ -I${KRB5DIR}/lib/wind \ - -I${KRB5DIR}/lib/roken + -I${KRB5DIR}/lib/roken \ + -I${SRCTOP}/contrib/com_err LIBADD= hdb kdc heimipcs krb5 roken asn1 crypto vers heimntlm LDFLAGS=${LDAPLDFLAGS} Modified: head/kerberos5/libexec/hprop/Makefile ============================================================================== --- head/kerberos5/libexec/hprop/Makefile Mon Jan 14 03:19:08 2019 (r343010) +++ head/kerberos5/libexec/hprop/Makefile Mon Jan 14 06:34:54 2019 (r343011) @@ -9,6 +9,7 @@ CFLAGS+=-I${KRB5DIR}/lib/asn1 CFLAGS+=-I${KRB5DIR}/lib/hx509 CFLAGS+=-I${KRB5DIR}/lib/ntlm CFLAGS+=-I${KRB5DIR}/kdc +CFLAGS+=-I${SRCTOP}/contrib/com_err CFLAGS+=-I${.OBJDIR:H:H}/lib/libkrb5 LIBADD= hdb krb5 roken vers DPADD= ${LDAPDPADD} Modified: head/kerberos5/libexec/hpropd/Makefile ============================================================================== --- head/kerberos5/libexec/hpropd/Makefile Mon Jan 14 03:19:08 2019 (r343010) +++ head/kerberos5/libexec/hpropd/Makefile Mon Jan 14 06:34:54 2019 (r343011) @@ -3,7 +3,7 @@ PROG= hpropd MAN= hpropd.8 CFLAGS+=-I${KRB5DIR}/lib/roken -I${KRB5DIR}/lib/krb5 -I${KRB5DIR}/lib/asn1 \ - -I${KRB5DIR}/kdc ${LDAPCFLAGS} + -I${KRB5DIR}/kdc -I${SRCTOP}/contrib/com_err ${LDAPCFLAGS} LIBADD= hdb krb5 roken vers DPADD= ${LDAPDPADD} LDADD= ${LDAPLDADD} Modified: head/kerberos5/libexec/kadmind/Makefile ============================================================================== --- head/kerberos5/libexec/kadmind/Makefile Mon Jan 14 03:19:08 2019 (r343010) +++ head/kerberos5/libexec/kadmind/Makefile Mon Jan 14 06:34:54 2019 (r343011) @@ -8,7 +8,7 @@ SRCS= rpc.c \ kadm_conn.c CFLAGS+=-I${KRB5DIR}/lib/krb5 -I${KRB5DIR}/lib/asn1 -I${KRB5DIR}/lib/roken \ - ${LDAPCFLAGS} + -I${SRCTOP}/contrib/com_err ${LDAPCFLAGS} LIBADD= kadm5srv gssapi hdb krb5 roken vers DPADD= ${LDAPDPADD} LDADD= ${LDAPLDADD} Modified: head/kerberos5/libexec/kdc/Makefile ============================================================================== --- head/kerberos5/libexec/kdc/Makefile Mon Jan 14 03:19:08 2019 (r343010) +++ head/kerberos5/libexec/kdc/Makefile Mon Jan 14 06:34:54 2019 (r343011) @@ -9,7 +9,7 @@ SRCS= config.c \ main.c CFLAGS+=-I${KRB5DIR}/lib/krb5 -I${KRB5DIR}/lib/asn1 -I${KRB5DIR}/lib/roken \ - -I${KRB5DIR}/kdc ${LDAPCFLAGS} + -I${KRB5DIR}/kdc -I${SRCTOP}/contrib/com_err ${LDAPCFLAGS} LIBADD= kdc hdb krb5 roken crypt vers LDFLAGS=${LDAPLDFLAGS} Modified: head/kerberos5/usr.bin/hxtool/Makefile ============================================================================== --- head/kerberos5/usr.bin/hxtool/Makefile Mon Jan 14 03:19:08 2019 (r343010) +++ head/kerberos5/usr.bin/hxtool/Makefile Mon Jan 14 06:34:54 2019 (r343011) @@ -5,7 +5,9 @@ MAN= CFLAGS+= -I${KRB5DIR}/lib/hx509 \ -I${KRB5DIR}/lib/asn1 \ -I${KRB5DIR}/lib/roken \ - -I${KRB5DIR}/lib/sl -I. + -I${KRB5DIR}/lib/sl \ + -I${SRCTOP}/contrib/com_err \ + -I. LIBADD= hx509 roken asn1 crypto sl vers edit SRCS= hxtool.c hxtool-commands.c hxtool-commands.h Modified: head/kerberos5/usr.bin/kadmin/Makefile ============================================================================== --- head/kerberos5/usr.bin/kadmin/Makefile Mon Jan 14 03:19:08 2019 (r343010) +++ head/kerberos5/usr.bin/kadmin/Makefile Mon Jan 14 06:34:54 2019 (r343011) @@ -25,7 +25,7 @@ SRCS= add_enctype.c \ util.c CFLAGS+=-I${KRB5DIR}/lib/asn1 -I${KRB5DIR}/lib/krb5 -I${KRB5DIR}/lib/roken \ - -I${KRB5DIR}/lib/sl -I. ${LDAPCFLAGS} + -I${KRB5DIR}/lib/sl -I${SRCTOP}/contrib/com_err -I. ${LDAPCFLAGS} LIBADD= kadm5clnt kadm5srv hdb krb5 roken vers sl asn1 crypto edit DPADD= ${LDAPDPADD} LDADD= ${LDAPLDADD} Modified: head/kerberos5/usr.bin/string2key/Makefile ============================================================================== --- head/kerberos5/usr.bin/string2key/Makefile Mon Jan 14 03:19:08 2019 (r343010) +++ head/kerberos5/usr.bin/string2key/Makefile Mon Jan 14 06:34:54 2019 (r343011) @@ -6,7 +6,8 @@ CFLAGS+= -I${KRB5DIR}/kdc \ -I${KRB5DIR}/lib/asn1 \ -I${KRB5DIR}/lib/krb5 \ -I${KRB5DIR}/lib/roken \ - -I${KRB5DIR}/lib/windc + -I${KRB5DIR}/lib/windc \ + -I${SRCTOP}/contrib/com_err LIBADD= krb5 roken crypto vers .include Modified: head/kerberos5/usr.bin/verify_krb5_conf/Makefile ============================================================================== --- head/kerberos5/usr.bin/verify_krb5_conf/Makefile Mon Jan 14 03:19:08 2019 (r343010) +++ head/kerberos5/usr.bin/verify_krb5_conf/Makefile Mon Jan 14 06:34:54 2019 (r343011) @@ -2,7 +2,8 @@ PROG= verify_krb5_conf MAN= verify_krb5_conf.8 -CFLAGS+=-I${KRB5DIR}/lib/asn1 -I${KRB5DIR}/lib/krb5 -I${KRB5DIR}/lib/roken +CFLAGS+=-I${KRB5DIR}/lib/asn1 -I${KRB5DIR}/lib/krb5 -I${KRB5DIR}/lib/roken \ + -I${SRCTOP}/contrib/com_err LIBADD= krb5 roken vers .include Modified: head/kerberos5/usr.sbin/kstash/Makefile ============================================================================== --- head/kerberos5/usr.sbin/kstash/Makefile Mon Jan 14 03:19:08 2019 (r343010) +++ head/kerberos5/usr.sbin/kstash/Makefile Mon Jan 14 06:34:54 2019 (r343011) @@ -3,7 +3,7 @@ PROG= kstash MAN= kstash.8 CFLAGS+=-I${KRB5DIR}/lib/asn1 -I${KRB5DIR}/lib/krb5 -I${KRB5DIR}/lib/roken \ - -I${KRB5DIR}/kdc ${LDAPCFLAGS} + -I${KRB5DIR}/kdc -I${SRCTOP}/contrib/com_err ${LDAPCFLAGS} LIBADD= hdb krb5 crypto vers DPADD= ${LDAPDPADD} LDADD= ${LDAPLDADD} From owner-svn-src-all@freebsd.org Mon Jan 14 06:57:44 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 1AE381495BA8; Mon, 14 Jan 2019 06:57:44 +0000 (UTC) (envelope-from manu@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.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 B688F732EF; Mon, 14 Jan 2019 06:57:43 +0000 (UTC) (envelope-from manu@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id AA296272A8; Mon, 14 Jan 2019 06:57:43 +0000 (UTC) (envelope-from manu@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x0E6vhqs049284; Mon, 14 Jan 2019 06:57:43 GMT (envelope-from manu@FreeBSD.org) Received: (from manu@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x0E6veXd049265; Mon, 14 Jan 2019 06:57:40 GMT (envelope-from manu@FreeBSD.org) Message-Id: <201901140657.x0E6veXd049265@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: manu set sender to manu@FreeBSD.org using -f From: Emmanuel Vadot Date: Mon, 14 Jan 2019 06:57:40 +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: r343012 - in stable/12/sys/gnu/dts/include/dt-bindings: bus clock dma gce iio/adc memory pinctrl regulator reset soc usb X-SVN-Group: stable-12 X-SVN-Commit-Author: manu X-SVN-Commit-Paths: in stable/12/sys/gnu/dts/include/dt-bindings: bus clock dma gce iio/adc memory pinctrl regulator reset soc usb X-SVN-Commit-Revision: 343012 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: B688F732EF X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.94 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_SHORT(-0.94)[-0.939,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_LONG(-1.00)[-0.999,0] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 14 Jan 2019 06:57:44 -0000 Author: manu Date: Mon Jan 14 06:57:39 2019 New Revision: 343012 URL: https://svnweb.freebsd.org/changeset/base/343012 Log: MFC r342935: Import DTS includes from 4.19 This was missed in r340337 Added: stable/12/sys/gnu/dts/include/dt-bindings/clock/actions,s700-cmu.h - copied unchanged from r342935, head/sys/gnu/dts/include/dt-bindings/clock/actions,s700-cmu.h stable/12/sys/gnu/dts/include/dt-bindings/clock/axg-audio-clkc.h - copied unchanged from r342935, head/sys/gnu/dts/include/dt-bindings/clock/axg-audio-clkc.h stable/12/sys/gnu/dts/include/dt-bindings/clock/maxim,max9485.h - copied unchanged from r342935, head/sys/gnu/dts/include/dt-bindings/clock/maxim,max9485.h stable/12/sys/gnu/dts/include/dt-bindings/clock/px30-cru.h - copied unchanged from r342935, head/sys/gnu/dts/include/dt-bindings/clock/px30-cru.h stable/12/sys/gnu/dts/include/dt-bindings/clock/qcom,dispcc-sdm845.h - copied unchanged from r342935, head/sys/gnu/dts/include/dt-bindings/clock/qcom,dispcc-sdm845.h stable/12/sys/gnu/dts/include/dt-bindings/clock/r9a06g032-sysctrl.h - copied unchanged from r342935, head/sys/gnu/dts/include/dt-bindings/clock/r9a06g032-sysctrl.h stable/12/sys/gnu/dts/include/dt-bindings/clock/rk3399-ddr.h - copied unchanged from r342935, head/sys/gnu/dts/include/dt-bindings/clock/rk3399-ddr.h stable/12/sys/gnu/dts/include/dt-bindings/clock/sun8i-tcon-top.h - copied unchanged from r342935, head/sys/gnu/dts/include/dt-bindings/clock/sun8i-tcon-top.h stable/12/sys/gnu/dts/include/dt-bindings/dma/jz4780-dma.h - copied unchanged from r342935, head/sys/gnu/dts/include/dt-bindings/dma/jz4780-dma.h stable/12/sys/gnu/dts/include/dt-bindings/gce/ - copied from r342935, head/sys/gnu/dts/include/dt-bindings/gce/ stable/12/sys/gnu/dts/include/dt-bindings/iio/adc/at91-sama5d2_adc.h - copied unchanged from r342935, head/sys/gnu/dts/include/dt-bindings/iio/adc/at91-sama5d2_adc.h stable/12/sys/gnu/dts/include/dt-bindings/memory/mt2712-larb-port.h - copied unchanged from r342935, head/sys/gnu/dts/include/dt-bindings/memory/mt2712-larb-port.h stable/12/sys/gnu/dts/include/dt-bindings/regulator/qcom,rpmh-regulator.h - copied unchanged from r342935, head/sys/gnu/dts/include/dt-bindings/regulator/qcom,rpmh-regulator.h stable/12/sys/gnu/dts/include/dt-bindings/reset/amlogic,meson-axg-audio-arb.h - copied unchanged from r342935, head/sys/gnu/dts/include/dt-bindings/reset/amlogic,meson-axg-audio-arb.h stable/12/sys/gnu/dts/include/dt-bindings/reset/qcom,sdm845-aoss.h - copied unchanged from r342935, head/sys/gnu/dts/include/dt-bindings/reset/qcom,sdm845-aoss.h stable/12/sys/gnu/dts/include/dt-bindings/soc/qcom,rpmh-rsc.h - copied unchanged from r342935, head/sys/gnu/dts/include/dt-bindings/soc/qcom,rpmh-rsc.h stable/12/sys/gnu/dts/include/dt-bindings/usb/ - copied from r342935, head/sys/gnu/dts/include/dt-bindings/usb/ Deleted: stable/12/sys/gnu/dts/include/dt-bindings/clock/exynos5440.h Modified: stable/12/sys/gnu/dts/include/dt-bindings/bus/ti-sysc.h stable/12/sys/gnu/dts/include/dt-bindings/clock/aspeed-clock.h stable/12/sys/gnu/dts/include/dt-bindings/clock/axg-clkc.h stable/12/sys/gnu/dts/include/dt-bindings/clock/dra7.h stable/12/sys/gnu/dts/include/dt-bindings/clock/gxbb-clkc.h stable/12/sys/gnu/dts/include/dt-bindings/clock/imx6sll-clock.h stable/12/sys/gnu/dts/include/dt-bindings/clock/imx6ul-clock.h stable/12/sys/gnu/dts/include/dt-bindings/clock/pxa-clock.h stable/12/sys/gnu/dts/include/dt-bindings/clock/qcom,gcc-sdm845.h stable/12/sys/gnu/dts/include/dt-bindings/clock/sun8i-r40-ccu.h stable/12/sys/gnu/dts/include/dt-bindings/pinctrl/at91.h stable/12/sys/gnu/dts/include/dt-bindings/pinctrl/samsung.h stable/12/sys/gnu/dts/include/dt-bindings/regulator/maxim,max77802.h Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/gnu/dts/include/dt-bindings/bus/ti-sysc.h ============================================================================== --- stable/12/sys/gnu/dts/include/dt-bindings/bus/ti-sysc.h Mon Jan 14 06:34:54 2019 (r343011) +++ stable/12/sys/gnu/dts/include/dt-bindings/bus/ti-sysc.h Mon Jan 14 06:57:39 2019 (r343012) @@ -15,6 +15,8 @@ /* SmartReflex sysc found on 36xx and later */ #define SYSC_OMAP3_SR_ENAWAKEUP (1 << 26) +#define SYSC_DRA7_MCAN_ENAWAKEUP (1 << 4) + /* SYSCONFIG STANDBYMODE/MIDLEMODE/SIDLEMODE supported by hardware */ #define SYSC_IDLE_FORCE 0 #define SYSC_IDLE_NO 1 Copied: stable/12/sys/gnu/dts/include/dt-bindings/clock/actions,s700-cmu.h (from r342935, head/sys/gnu/dts/include/dt-bindings/clock/actions,s700-cmu.h) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/12/sys/gnu/dts/include/dt-bindings/clock/actions,s700-cmu.h Mon Jan 14 06:57:39 2019 (r343012, copy of r342935, head/sys/gnu/dts/include/dt-bindings/clock/actions,s700-cmu.h) @@ -0,0 +1,118 @@ +/* SPDX-License-Identifier: GPL-2.0 + * + * Device Tree binding constants for Actions Semi S700 Clock Management Unit + * + * Copyright (c) 2014 Actions Semi Inc. + * Author: David Liu + * + * Author: Pathiban Nallathambi + * Author: Saravanan Sekar + */ + +#ifndef __DT_BINDINGS_CLOCK_S700_H +#define __DT_BINDINGS_CLOCK_S700_H + +#define CLK_NONE 0 + +/* pll clocks */ +#define CLK_CORE_PLL 1 +#define CLK_DEV_PLL 2 +#define CLK_DDR_PLL 3 +#define CLK_NAND_PLL 4 +#define CLK_DISPLAY_PLL 5 +#define CLK_TVOUT_PLL 6 +#define CLK_CVBS_PLL 7 +#define CLK_AUDIO_PLL 8 +#define CLK_ETHERNET_PLL 9 + +/* system clock */ +#define CLK_CPU 10 +#define CLK_DEV 11 +#define CLK_AHB 12 +#define CLK_APB 13 +#define CLK_DMAC 14 +#define CLK_NOC0_CLK_MUX 15 +#define CLK_NOC1_CLK_MUX 16 +#define CLK_HP_CLK_MUX 17 +#define CLK_HP_CLK_DIV 18 +#define CLK_NOC1_CLK_DIV 19 +#define CLK_NOC0 20 +#define CLK_NOC1 21 +#define CLK_SENOR_SRC 22 + +/* peripheral device clock */ +#define CLK_GPIO 23 +#define CLK_TIMER 24 +#define CLK_DSI 25 +#define CLK_CSI 26 +#define CLK_SI 27 +#define CLK_DE 28 +#define CLK_HDE 29 +#define CLK_VDE 30 +#define CLK_VCE 31 +#define CLK_NAND 32 +#define CLK_SD0 33 +#define CLK_SD1 34 +#define CLK_SD2 35 + +#define CLK_UART0 36 +#define CLK_UART1 37 +#define CLK_UART2 38 +#define CLK_UART3 39 +#define CLK_UART4 40 +#define CLK_UART5 41 +#define CLK_UART6 42 + +#define CLK_PWM0 43 +#define CLK_PWM1 44 +#define CLK_PWM2 45 +#define CLK_PWM3 46 +#define CLK_PWM4 47 +#define CLK_PWM5 48 +#define CLK_GPU3D 49 + +#define CLK_I2C0 50 +#define CLK_I2C1 51 +#define CLK_I2C2 52 +#define CLK_I2C3 53 + +#define CLK_SPI0 54 +#define CLK_SPI1 55 +#define CLK_SPI2 56 +#define CLK_SPI3 57 + +#define CLK_USB3_480MPLL0 58 +#define CLK_USB3_480MPHY0 59 +#define CLK_USB3_5GPHY 60 +#define CLK_USB3_CCE 61 +#define CLK_USB3_MAC 62 + +#define CLK_LCD 63 +#define CLK_HDMI_AUDIO 64 +#define CLK_I2SRX 65 +#define CLK_I2STX 66 + +#define CLK_SENSOR0 67 +#define CLK_SENSOR1 68 + +#define CLK_HDMI_DEV 69 + +#define CLK_ETHERNET 70 +#define CLK_RMII_REF 71 + +#define CLK_USB2H0_PLLEN 72 +#define CLK_USB2H0_PHY 73 +#define CLK_USB2H0_CCE 74 +#define CLK_USB2H1_PLLEN 75 +#define CLK_USB2H1_PHY 76 +#define CLK_USB2H1_CCE 77 + +#define CLK_TVOUT 78 + +#define CLK_THERMAL_SENSOR 79 + +#define CLK_IRC_SWITCH 80 +#define CLK_PCM1 81 +#define CLK_NR_CLKS (CLK_PCM1 + 1) + +#endif /* __DT_BINDINGS_CLOCK_S700_H */ Modified: stable/12/sys/gnu/dts/include/dt-bindings/clock/aspeed-clock.h ============================================================================== --- stable/12/sys/gnu/dts/include/dt-bindings/clock/aspeed-clock.h Mon Jan 14 06:34:54 2019 (r343011) +++ stable/12/sys/gnu/dts/include/dt-bindings/clock/aspeed-clock.h Mon Jan 14 06:57:39 2019 (r343012) @@ -25,7 +25,7 @@ #define ASPEED_CLK_GATE_RSACLK 19 #define ASPEED_CLK_GATE_UART3CLK 20 #define ASPEED_CLK_GATE_UART4CLK 21 -#define ASPEED_CLK_GATE_SDCLKCLK 22 +#define ASPEED_CLK_GATE_SDCLK 22 #define ASPEED_CLK_GATE_LHCCLK 23 #define ASPEED_CLK_HPLL 24 #define ASPEED_CLK_AHB 25 Copied: stable/12/sys/gnu/dts/include/dt-bindings/clock/axg-audio-clkc.h (from r342935, head/sys/gnu/dts/include/dt-bindings/clock/axg-audio-clkc.h) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/12/sys/gnu/dts/include/dt-bindings/clock/axg-audio-clkc.h Mon Jan 14 06:57:39 2019 (r343012, copy of r342935, head/sys/gnu/dts/include/dt-bindings/clock/axg-audio-clkc.h) @@ -0,0 +1,94 @@ +/* SPDX-License-Identifier: (GPL-2.0 OR MIT) */ +/* + * Copyright (c) 2018 Baylibre SAS. + * Author: Jerome Brunet + */ + +#ifndef __AXG_AUDIO_CLKC_BINDINGS_H +#define __AXG_AUDIO_CLKC_BINDINGS_H + +#define AUD_CLKID_SLV_SCLK0 9 +#define AUD_CLKID_SLV_SCLK1 10 +#define AUD_CLKID_SLV_SCLK2 11 +#define AUD_CLKID_SLV_SCLK3 12 +#define AUD_CLKID_SLV_SCLK4 13 +#define AUD_CLKID_SLV_SCLK5 14 +#define AUD_CLKID_SLV_SCLK6 15 +#define AUD_CLKID_SLV_SCLK7 16 +#define AUD_CLKID_SLV_SCLK8 17 +#define AUD_CLKID_SLV_SCLK9 18 +#define AUD_CLKID_SLV_LRCLK0 19 +#define AUD_CLKID_SLV_LRCLK1 20 +#define AUD_CLKID_SLV_LRCLK2 21 +#define AUD_CLKID_SLV_LRCLK3 22 +#define AUD_CLKID_SLV_LRCLK4 23 +#define AUD_CLKID_SLV_LRCLK5 24 +#define AUD_CLKID_SLV_LRCLK6 25 +#define AUD_CLKID_SLV_LRCLK7 26 +#define AUD_CLKID_SLV_LRCLK8 27 +#define AUD_CLKID_SLV_LRCLK9 28 +#define AUD_CLKID_DDR_ARB 29 +#define AUD_CLKID_PDM 30 +#define AUD_CLKID_TDMIN_A 31 +#define AUD_CLKID_TDMIN_B 32 +#define AUD_CLKID_TDMIN_C 33 +#define AUD_CLKID_TDMIN_LB 34 +#define AUD_CLKID_TDMOUT_A 35 +#define AUD_CLKID_TDMOUT_B 36 +#define AUD_CLKID_TDMOUT_C 37 +#define AUD_CLKID_FRDDR_A 38 +#define AUD_CLKID_FRDDR_B 39 +#define AUD_CLKID_FRDDR_C 40 +#define AUD_CLKID_TODDR_A 41 +#define AUD_CLKID_TODDR_B 42 +#define AUD_CLKID_TODDR_C 43 +#define AUD_CLKID_LOOPBACK 44 +#define AUD_CLKID_SPDIFIN 45 +#define AUD_CLKID_SPDIFOUT 46 +#define AUD_CLKID_RESAMPLE 47 +#define AUD_CLKID_POWER_DETECT 48 +#define AUD_CLKID_MST_A_MCLK 49 +#define AUD_CLKID_MST_B_MCLK 50 +#define AUD_CLKID_MST_C_MCLK 51 +#define AUD_CLKID_MST_D_MCLK 52 +#define AUD_CLKID_MST_E_MCLK 53 +#define AUD_CLKID_MST_F_MCLK 54 +#define AUD_CLKID_SPDIFOUT_CLK 55 +#define AUD_CLKID_SPDIFIN_CLK 56 +#define AUD_CLKID_PDM_DCLK 57 +#define AUD_CLKID_PDM_SYSCLK 58 +#define AUD_CLKID_MST_A_SCLK 79 +#define AUD_CLKID_MST_B_SCLK 80 +#define AUD_CLKID_MST_C_SCLK 81 +#define AUD_CLKID_MST_D_SCLK 82 +#define AUD_CLKID_MST_E_SCLK 83 +#define AUD_CLKID_MST_F_SCLK 84 +#define AUD_CLKID_MST_A_LRCLK 86 +#define AUD_CLKID_MST_B_LRCLK 87 +#define AUD_CLKID_MST_C_LRCLK 88 +#define AUD_CLKID_MST_D_LRCLK 89 +#define AUD_CLKID_MST_E_LRCLK 90 +#define AUD_CLKID_MST_F_LRCLK 91 +#define AUD_CLKID_TDMIN_A_SCLK_SEL 116 +#define AUD_CLKID_TDMIN_B_SCLK_SEL 117 +#define AUD_CLKID_TDMIN_C_SCLK_SEL 118 +#define AUD_CLKID_TDMIN_LB_SCLK_SEL 119 +#define AUD_CLKID_TDMOUT_A_SCLK_SEL 120 +#define AUD_CLKID_TDMOUT_B_SCLK_SEL 121 +#define AUD_CLKID_TDMOUT_C_SCLK_SEL 122 +#define AUD_CLKID_TDMIN_A_SCLK 123 +#define AUD_CLKID_TDMIN_B_SCLK 124 +#define AUD_CLKID_TDMIN_C_SCLK 125 +#define AUD_CLKID_TDMIN_LB_SCLK 126 +#define AUD_CLKID_TDMOUT_A_SCLK 127 +#define AUD_CLKID_TDMOUT_B_SCLK 128 +#define AUD_CLKID_TDMOUT_C_SCLK 129 +#define AUD_CLKID_TDMIN_A_LRCLK 130 +#define AUD_CLKID_TDMIN_B_LRCLK 131 +#define AUD_CLKID_TDMIN_C_LRCLK 132 +#define AUD_CLKID_TDMIN_LB_LRCLK 133 +#define AUD_CLKID_TDMOUT_A_LRCLK 134 +#define AUD_CLKID_TDMOUT_B_LRCLK 135 +#define AUD_CLKID_TDMOUT_C_LRCLK 136 + +#endif /* __AXG_AUDIO_CLKC_BINDINGS_H */ Modified: stable/12/sys/gnu/dts/include/dt-bindings/clock/axg-clkc.h ============================================================================== --- stable/12/sys/gnu/dts/include/dt-bindings/clock/axg-clkc.h Mon Jan 14 06:34:54 2019 (r343011) +++ stable/12/sys/gnu/dts/include/dt-bindings/clock/axg-clkc.h Mon Jan 14 06:57:39 2019 (r343012) @@ -68,5 +68,9 @@ #define CLKID_SD_EMMC_B_CLK0 59 #define CLKID_SD_EMMC_C_CLK0 60 #define CLKID_HIFI_PLL 69 +#define CLKID_PCIE_CML_EN0 79 +#define CLKID_PCIE_CML_EN1 80 +#define CLKID_MIPI_ENABLE 81 +#define CLKID_GEN_CLK 84 #endif /* __AXG_CLKC_H */ Modified: stable/12/sys/gnu/dts/include/dt-bindings/clock/dra7.h ============================================================================== --- stable/12/sys/gnu/dts/include/dt-bindings/clock/dra7.h Mon Jan 14 06:34:54 2019 (r343011) +++ stable/12/sys/gnu/dts/include/dt-bindings/clock/dra7.h Mon Jan 14 06:57:39 2019 (r343012) @@ -168,5 +168,6 @@ #define DRA7_COUNTER_32K_CLKCTRL DRA7_CLKCTRL_INDEX(0x50) #define DRA7_UART10_CLKCTRL DRA7_CLKCTRL_INDEX(0x80) #define DRA7_DCAN1_CLKCTRL DRA7_CLKCTRL_INDEX(0x88) +#define DRA7_ADC_CLKCTRL DRA7_CLKCTRL_INDEX(0xa0) #endif Modified: stable/12/sys/gnu/dts/include/dt-bindings/clock/gxbb-clkc.h ============================================================================== --- stable/12/sys/gnu/dts/include/dt-bindings/clock/gxbb-clkc.h Mon Jan 14 06:34:54 2019 (r343011) +++ stable/12/sys/gnu/dts/include/dt-bindings/clock/gxbb-clkc.h Mon Jan 14 06:57:39 2019 (r343012) @@ -127,5 +127,6 @@ #define CLKID_VAPB 140 #define CLKID_VDEC_1 153 #define CLKID_VDEC_HEVC 156 +#define CLKID_GEN_CLK 159 #endif /* __GXBB_CLKC_H */ Modified: stable/12/sys/gnu/dts/include/dt-bindings/clock/imx6sll-clock.h ============================================================================== --- stable/12/sys/gnu/dts/include/dt-bindings/clock/imx6sll-clock.h Mon Jan 14 06:34:54 2019 (r343011) +++ stable/12/sys/gnu/dts/include/dt-bindings/clock/imx6sll-clock.h Mon Jan 14 06:57:39 2019 (r343012) @@ -197,6 +197,13 @@ #define IMX6SLL_CLK_EXTERN_AUDIO_PODF 171 #define IMX6SLL_CLK_EXTERN_AUDIO 172 -#define IMX6SLL_CLK_END 173 +#define IMX6SLL_CLK_GPIO1 173 +#define IMX6SLL_CLK_GPIO2 174 +#define IMX6SLL_CLK_GPIO3 175 +#define IMX6SLL_CLK_GPIO4 176 +#define IMX6SLL_CLK_GPIO5 177 +#define IMX6SLL_CLK_GPIO6 178 + +#define IMX6SLL_CLK_END 179 #endif /* __DT_BINDINGS_CLOCK_IMX6SLL_H */ Modified: stable/12/sys/gnu/dts/include/dt-bindings/clock/imx6ul-clock.h ============================================================================== --- stable/12/sys/gnu/dts/include/dt-bindings/clock/imx6ul-clock.h Mon Jan 14 06:34:54 2019 (r343011) +++ stable/12/sys/gnu/dts/include/dt-bindings/clock/imx6ul-clock.h Mon Jan 14 06:57:39 2019 (r343012) @@ -254,6 +254,12 @@ #define IMX6UL_CLK_CKO2_PODF 241 #define IMX6UL_CLK_CKO2 242 #define IMX6UL_CLK_CKO 243 -#define IMX6UL_CLK_END 244 +#define IMX6UL_CLK_GPIO1 244 +#define IMX6UL_CLK_GPIO2 245 +#define IMX6UL_CLK_GPIO3 246 +#define IMX6UL_CLK_GPIO4 247 +#define IMX6UL_CLK_GPIO5 248 + +#define IMX6UL_CLK_END 249 #endif /* __DT_BINDINGS_CLOCK_IMX6UL_H */ Copied: stable/12/sys/gnu/dts/include/dt-bindings/clock/maxim,max9485.h (from r342935, head/sys/gnu/dts/include/dt-bindings/clock/maxim,max9485.h) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/12/sys/gnu/dts/include/dt-bindings/clock/maxim,max9485.h Mon Jan 14 06:57:39 2019 (r343012, copy of r342935, head/sys/gnu/dts/include/dt-bindings/clock/maxim,max9485.h) @@ -0,0 +1,18 @@ +/* + * Copyright (C) 2018 Daniel Mack + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2 as + * published by the Free Software Foundation. + * + */ + +#ifndef __DT_BINDINGS_MAX9485_CLK_H +#define __DT_BINDINGS_MAX9485_CLK_H + +#define MAX9485_MCLKOUT 0 +#define MAX9485_CLKOUT 1 +#define MAX9485_CLKOUT1 2 +#define MAX9485_CLKOUT2 3 + +#endif /* __DT_BINDINGS_MAX9485_CLK_H */ Copied: stable/12/sys/gnu/dts/include/dt-bindings/clock/px30-cru.h (from r342935, head/sys/gnu/dts/include/dt-bindings/clock/px30-cru.h) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/12/sys/gnu/dts/include/dt-bindings/clock/px30-cru.h Mon Jan 14 06:57:39 2019 (r343012, copy of r342935, head/sys/gnu/dts/include/dt-bindings/clock/px30-cru.h) @@ -0,0 +1,389 @@ +/* SPDX-License-Identifier: GPL-2.0 */ + +#ifndef _DT_BINDINGS_CLK_ROCKCHIP_PX30_H +#define _DT_BINDINGS_CLK_ROCKCHIP_PX30_H + +/* core clocks */ +#define PLL_APLL 1 +#define PLL_DPLL 2 +#define PLL_CPLL 3 +#define PLL_NPLL 4 +#define APLL_BOOST_H 5 +#define APLL_BOOST_L 6 +#define ARMCLK 7 + +/* sclk gates (special clocks) */ +#define USB480M 14 +#define SCLK_PDM 15 +#define SCLK_I2S0_TX 16 +#define SCLK_I2S0_TX_OUT 17 +#define SCLK_I2S0_RX 18 +#define SCLK_I2S0_RX_OUT 19 +#define SCLK_I2S1 20 +#define SCLK_I2S1_OUT 21 +#define SCLK_I2S2 22 +#define SCLK_I2S2_OUT 23 +#define SCLK_UART1 24 +#define SCLK_UART2 25 +#define SCLK_UART3 26 +#define SCLK_UART4 27 +#define SCLK_UART5 28 +#define SCLK_I2C0 29 +#define SCLK_I2C1 30 +#define SCLK_I2C2 31 +#define SCLK_I2C3 32 +#define SCLK_I2C4 33 +#define SCLK_PWM0 34 +#define SCLK_PWM1 35 +#define SCLK_SPI0 36 +#define SCLK_SPI1 37 +#define SCLK_TIMER0 38 +#define SCLK_TIMER1 39 +#define SCLK_TIMER2 40 +#define SCLK_TIMER3 41 +#define SCLK_TIMER4 42 +#define SCLK_TIMER5 43 +#define SCLK_TSADC 44 +#define SCLK_SARADC 45 +#define SCLK_OTP 46 +#define SCLK_OTP_USR 47 +#define SCLK_CRYPTO 48 +#define SCLK_CRYPTO_APK 49 +#define SCLK_DDRC 50 +#define SCLK_ISP 51 +#define SCLK_CIF_OUT 52 +#define SCLK_RGA_CORE 53 +#define SCLK_VOPB_PWM 54 +#define SCLK_NANDC 55 +#define SCLK_SDIO 56 +#define SCLK_EMMC 57 +#define SCLK_SFC 58 +#define SCLK_SDMMC 59 +#define SCLK_OTG_ADP 60 +#define SCLK_GMAC_SRC 61 +#define SCLK_GMAC 62 +#define SCLK_GMAC_RX_TX 63 +#define SCLK_MAC_REF 64 +#define SCLK_MAC_REFOUT 65 +#define SCLK_MAC_OUT 66 +#define SCLK_SDMMC_DRV 67 +#define SCLK_SDMMC_SAMPLE 68 +#define SCLK_SDIO_DRV 69 +#define SCLK_SDIO_SAMPLE 70 +#define SCLK_EMMC_DRV 71 +#define SCLK_EMMC_SAMPLE 72 +#define SCLK_GPU 73 +#define SCLK_PVTM 74 +#define SCLK_CORE_VPU 75 +#define SCLK_GMAC_RMII 76 +#define SCLK_UART2_SRC 77 +#define SCLK_NANDC_DIV 78 +#define SCLK_NANDC_DIV50 79 +#define SCLK_SDIO_DIV 80 +#define SCLK_SDIO_DIV50 81 +#define SCLK_EMMC_DIV 82 +#define SCLK_EMMC_DIV50 83 +#define SCLK_DDRCLK 84 +#define SCLK_UART1_SRC 85 + +/* dclk gates */ +#define DCLK_VOPB 150 +#define DCLK_VOPL 151 + +/* aclk gates */ +#define ACLK_GPU 170 +#define ACLK_BUS_PRE 171 +#define ACLK_CRYPTO 172 +#define ACLK_VI_PRE 173 +#define ACLK_VO_PRE 174 +#define ACLK_VPU 175 +#define ACLK_PERI_PRE 176 +#define ACLK_GMAC 178 +#define ACLK_CIF 179 +#define ACLK_ISP 180 +#define ACLK_VOPB 181 +#define ACLK_VOPL 182 +#define ACLK_RGA 183 +#define ACLK_GIC 184 +#define ACLK_DCF 186 +#define ACLK_DMAC 187 +#define ACLK_BUS_SRC 188 +#define ACLK_PERI_SRC 189 + +/* hclk gates */ +#define HCLK_BUS_PRE 240 +#define HCLK_CRYPTO 241 +#define HCLK_VI_PRE 242 +#define HCLK_VO_PRE 243 +#define HCLK_VPU 244 +#define HCLK_PERI_PRE 245 +#define HCLK_MMC_NAND 246 +#define HCLK_SDMMC 247 +#define HCLK_USB 248 +#define HCLK_CIF 249 +#define HCLK_ISP 250 +#define HCLK_VOPB 251 +#define HCLK_VOPL 252 +#define HCLK_RGA 253 +#define HCLK_NANDC 254 +#define HCLK_SDIO 255 +#define HCLK_EMMC 256 +#define HCLK_SFC 257 +#define HCLK_OTG 258 +#define HCLK_HOST 259 +#define HCLK_HOST_ARB 260 +#define HCLK_PDM 261 +#define HCLK_I2S0 262 +#define HCLK_I2S1 263 +#define HCLK_I2S2 264 + +/* pclk gates */ +#define PCLK_BUS_PRE 320 +#define PCLK_DDR 321 +#define PCLK_VO_PRE 322 +#define PCLK_GMAC 323 +#define PCLK_MIPI_DSI 324 +#define PCLK_MIPIDSIPHY 325 +#define PCLK_MIPICSIPHY 326 +#define PCLK_USB_GRF 327 +#define PCLK_DCF 328 +#define PCLK_UART1 329 +#define PCLK_UART2 330 +#define PCLK_UART3 331 +#define PCLK_UART4 332 +#define PCLK_UART5 333 +#define PCLK_I2C0 334 +#define PCLK_I2C1 335 +#define PCLK_I2C2 336 +#define PCLK_I2C3 337 +#define PCLK_I2C4 338 +#define PCLK_PWM0 339 +#define PCLK_PWM1 340 +#define PCLK_SPI0 341 +#define PCLK_SPI1 342 +#define PCLK_SARADC 343 +#define PCLK_TSADC 344 +#define PCLK_TIMER 345 +#define PCLK_OTP_NS 346 +#define PCLK_WDT_NS 347 +#define PCLK_GPIO1 348 +#define PCLK_GPIO2 349 +#define PCLK_GPIO3 350 +#define PCLK_ISP 351 +#define PCLK_CIF 352 +#define PCLK_OTP_PHY 353 + +#define CLK_NR_CLKS (PCLK_OTP_PHY + 1) + +/* pmu-clocks indices */ + +#define PLL_GPLL 1 + +#define SCLK_RTC32K_PMU 4 +#define SCLK_WIFI_PMU 5 +#define SCLK_UART0_PMU 6 +#define SCLK_PVTM_PMU 7 +#define PCLK_PMU_PRE 8 +#define SCLK_REF24M_PMU 9 +#define SCLK_USBPHY_REF 10 +#define SCLK_MIPIDSIPHY_REF 11 + +#define XIN24M_DIV 12 + +#define PCLK_GPIO0_PMU 20 +#define PCLK_UART0_PMU 21 + +#define CLKPMU_NR_CLKS (PCLK_UART0_PMU + 1) + +/* soft-reset indices */ +#define SRST_CORE0_PO 0 +#define SRST_CORE1_PO 1 +#define SRST_CORE2_PO 2 +#define SRST_CORE3_PO 3 +#define SRST_CORE0 4 +#define SRST_CORE1 5 +#define SRST_CORE2 6 +#define SRST_CORE3 7 +#define SRST_CORE0_DBG 8 +#define SRST_CORE1_DBG 9 +#define SRST_CORE2_DBG 10 +#define SRST_CORE3_DBG 11 +#define SRST_TOPDBG 12 +#define SRST_CORE_NOC 13 +#define SRST_STRC_A 14 +#define SRST_L2C 15 + +#define SRST_DAP 16 +#define SRST_CORE_PVTM 17 +#define SRST_GPU 18 +#define SRST_GPU_NIU 19 +#define SRST_UPCTL2 20 +#define SRST_UPCTL2_A 21 +#define SRST_UPCTL2_P 22 +#define SRST_MSCH 23 +#define SRST_MSCH_P 24 +#define SRST_DDRMON_P 25 +#define SRST_DDRSTDBY_P 26 +#define SRST_DDRSTDBY 27 +#define SRST_DDRGRF_p 28 +#define SRST_AXI_SPLIT_A 29 +#define SRST_AXI_CMD_A 30 +#define SRST_AXI_CMD_P 31 + +#define SRST_DDRPHY 32 +#define SRST_DDRPHYDIV 33 +#define SRST_DDRPHY_P 34 +#define SRST_VPU_A 36 +#define SRST_VPU_NIU_A 37 +#define SRST_VPU_H 38 +#define SRST_VPU_NIU_H 39 +#define SRST_VI_NIU_A 40 +#define SRST_VI_NIU_H 41 +#define SRST_ISP_H 42 +#define SRST_ISP 43 +#define SRST_CIF_A 44 +#define SRST_CIF_H 45 +#define SRST_CIF_PCLKIN 46 +#define SRST_MIPICSIPHY_P 47 + +#define SRST_VO_NIU_A 48 +#define SRST_VO_NIU_H 49 +#define SRST_VO_NIU_P 50 +#define SRST_VOPB_A 51 +#define SRST_VOPB_H 52 +#define SRST_VOPB 53 +#define SRST_PWM_VOPB 54 +#define SRST_VOPL_A 55 +#define SRST_VOPL_H 56 +#define SRST_VOPL 57 +#define SRST_RGA_A 58 +#define SRST_RGA_H 59 +#define SRST_RGA 60 +#define SRST_MIPIDSI_HOST_P 61 +#define SRST_MIPIDSIPHY_P 62 +#define SRST_VPU_CORE 63 + +#define SRST_PERI_NIU_A 64 +#define SRST_USB_NIU_H 65 +#define SRST_USB2OTG_H 66 +#define SRST_USB2OTG 67 +#define SRST_USB2OTG_ADP 68 +#define SRST_USB2HOST_H 69 +#define SRST_USB2HOST_ARB_H 70 +#define SRST_USB2HOST_AUX_H 71 +#define SRST_USB2HOST_EHCI 72 +#define SRST_USB2HOST 73 +#define SRST_USBPHYPOR 74 +#define SRST_USBPHY_OTG_PORT 75 +#define SRST_USBPHY_HOST_PORT 76 +#define SRST_USBPHY_GRF 77 +#define SRST_CPU_BOOST_P 78 +#define SRST_CPU_BOOST 79 + +#define SRST_MMC_NAND_NIU_H 80 +#define SRST_SDIO_H 81 +#define SRST_EMMC_H 82 +#define SRST_SFC_H 83 +#define SRST_SFC 84 +#define SRST_SDCARD_NIU_H 85 +#define SRST_SDMMC_H 86 +#define SRST_NANDC_H 89 +#define SRST_NANDC 90 +#define SRST_GMAC_NIU_A 92 +#define SRST_GMAC_NIU_P 93 +#define SRST_GMAC_A 94 + +#define SRST_PMU_NIU_P 96 +#define SRST_PMU_SGRF_P 97 +#define SRST_PMU_GRF_P 98 +#define SRST_PMU 99 +#define SRST_PMU_MEM_P 100 +#define SRST_PMU_GPIO0_P 101 +#define SRST_PMU_UART0_P 102 +#define SRST_PMU_CRU_P 103 +#define SRST_PMU_PVTM 104 +#define SRST_PMU_UART 105 +#define SRST_PMU_NIU_H 106 +#define SRST_PMU_DDR_FAIL_SAVE 107 +#define SRST_PMU_CORE_PERF_A 108 +#define SRST_PMU_CORE_GRF_P 109 +#define SRST_PMU_GPU_PERF_A 110 +#define SRST_PMU_GPU_GRF_P 111 + +#define SRST_CRYPTO_NIU_A 112 +#define SRST_CRYPTO_NIU_H 113 +#define SRST_CRYPTO_A 114 +#define SRST_CRYPTO_H 115 +#define SRST_CRYPTO 116 +#define SRST_CRYPTO_APK 117 +#define SRST_BUS_NIU_H 120 +#define SRST_USB_NIU_P 121 +#define SRST_BUS_TOP_NIU_P 122 +#define SRST_INTMEM_A 123 +#define SRST_GIC_A 124 +#define SRST_ROM_H 126 +#define SRST_DCF_A 127 + +#define SRST_DCF_P 128 +#define SRST_PDM_H 129 +#define SRST_PDM 130 +#define SRST_I2S0_H 131 +#define SRST_I2S0_TX 132 +#define SRST_I2S1_H 133 +#define SRST_I2S1 134 +#define SRST_I2S2_H 135 +#define SRST_I2S2 136 +#define SRST_UART1_P 137 +#define SRST_UART1 138 +#define SRST_UART2_P 139 +#define SRST_UART2 140 +#define SRST_UART3_P 141 +#define SRST_UART3 142 +#define SRST_UART4_P 143 + +#define SRST_UART4 144 +#define SRST_UART5_P 145 +#define SRST_UART5 146 +#define SRST_I2C0_P 147 +#define SRST_I2C0 148 +#define SRST_I2C1_P 149 +#define SRST_I2C1 150 +#define SRST_I2C2_P 151 +#define SRST_I2C2 152 +#define SRST_I2C3_P 153 +#define SRST_I2C3 154 +#define SRST_PWM0_P 157 +#define SRST_PWM0 158 +#define SRST_PWM1_P 159 + +#define SRST_PWM1 160 +#define SRST_SPI0_P 161 +#define SRST_SPI0 162 +#define SRST_SPI1_P 163 +#define SRST_SPI1 164 +#define SRST_SARADC_P 165 +#define SRST_SARADC 166 +#define SRST_TSADC_P 167 +#define SRST_TSADC 168 +#define SRST_TIMER_P 169 +#define SRST_TIMER0 170 +#define SRST_TIMER1 171 +#define SRST_TIMER2 172 +#define SRST_TIMER3 173 +#define SRST_TIMER4 174 +#define SRST_TIMER5 175 + +#define SRST_OTP_NS_P 176 +#define SRST_OTP_NS_SBPI 177 +#define SRST_OTP_NS_USR 178 +#define SRST_OTP_PHY_P 179 +#define SRST_OTP_PHY 180 +#define SRST_WDT_NS_P 181 +#define SRST_GPIO1_P 182 +#define SRST_GPIO2_P 183 +#define SRST_GPIO3_P 184 +#define SRST_SGRF_P 185 +#define SRST_GRF_P 186 +#define SRST_I2S0_RX 191 + +#endif Modified: stable/12/sys/gnu/dts/include/dt-bindings/clock/pxa-clock.h ============================================================================== --- stable/12/sys/gnu/dts/include/dt-bindings/clock/pxa-clock.h Mon Jan 14 06:34:54 2019 (r343011) +++ stable/12/sys/gnu/dts/include/dt-bindings/clock/pxa-clock.h Mon Jan 14 06:57:39 2019 (r343012) @@ -72,6 +72,7 @@ #define CLK_USIM 58 #define CLK_USIM1 59 #define CLK_USMI0 60 -#define CLK_MAX 61 +#define CLK_OSC32k768 61 +#define CLK_MAX 62 #endif Copied: stable/12/sys/gnu/dts/include/dt-bindings/clock/qcom,dispcc-sdm845.h (from r342935, head/sys/gnu/dts/include/dt-bindings/clock/qcom,dispcc-sdm845.h) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/12/sys/gnu/dts/include/dt-bindings/clock/qcom,dispcc-sdm845.h Mon Jan 14 06:57:39 2019 (r343012, copy of r342935, head/sys/gnu/dts/include/dt-bindings/clock/qcom,dispcc-sdm845.h) @@ -0,0 +1,45 @@ +/* SPDX-License-Identifier: GPL-2.0 */ +/* + * Copyright (c) 2018, The Linux Foundation. All rights reserved. + */ + +#ifndef _DT_BINDINGS_CLK_SDM_DISP_CC_SDM845_H +#define _DT_BINDINGS_CLK_SDM_DISP_CC_SDM845_H + +/* DISP_CC clock registers */ +#define DISP_CC_MDSS_AHB_CLK 0 +#define DISP_CC_MDSS_AXI_CLK 1 +#define DISP_CC_MDSS_BYTE0_CLK 2 +#define DISP_CC_MDSS_BYTE0_CLK_SRC 3 +#define DISP_CC_MDSS_BYTE0_INTF_CLK 4 +#define DISP_CC_MDSS_BYTE1_CLK 5 +#define DISP_CC_MDSS_BYTE1_CLK_SRC 6 +#define DISP_CC_MDSS_BYTE1_INTF_CLK 7 +#define DISP_CC_MDSS_ESC0_CLK 8 +#define DISP_CC_MDSS_ESC0_CLK_SRC 9 +#define DISP_CC_MDSS_ESC1_CLK 10 +#define DISP_CC_MDSS_ESC1_CLK_SRC 11 +#define DISP_CC_MDSS_MDP_CLK 12 +#define DISP_CC_MDSS_MDP_CLK_SRC 13 +#define DISP_CC_MDSS_MDP_LUT_CLK 14 +#define DISP_CC_MDSS_PCLK0_CLK 15 +#define DISP_CC_MDSS_PCLK0_CLK_SRC 16 +#define DISP_CC_MDSS_PCLK1_CLK 17 +#define DISP_CC_MDSS_PCLK1_CLK_SRC 18 +#define DISP_CC_MDSS_ROT_CLK 19 +#define DISP_CC_MDSS_ROT_CLK_SRC 20 +#define DISP_CC_MDSS_RSCC_AHB_CLK 21 +#define DISP_CC_MDSS_RSCC_VSYNC_CLK 22 +#define DISP_CC_MDSS_VSYNC_CLK 23 +#define DISP_CC_MDSS_VSYNC_CLK_SRC 24 +#define DISP_CC_PLL0 25 +#define DISP_CC_MDSS_BYTE0_DIV_CLK_SRC 26 +#define DISP_CC_MDSS_BYTE1_DIV_CLK_SRC 27 + +/* DISP_CC Reset */ +#define DISP_CC_MDSS_RSCC_BCR 0 + +/* DISP_CC GDSCR */ +#define MDSS_GDSC 0 + +#endif Modified: stable/12/sys/gnu/dts/include/dt-bindings/clock/qcom,gcc-sdm845.h ============================================================================== --- stable/12/sys/gnu/dts/include/dt-bindings/clock/qcom,gcc-sdm845.h Mon Jan 14 06:34:54 2019 (r343011) +++ stable/12/sys/gnu/dts/include/dt-bindings/clock/qcom,gcc-sdm845.h Mon Jan 14 06:57:39 2019 (r343012) @@ -192,6 +192,8 @@ #define GCC_VS_CTRL_CLK_SRC 182 #define GCC_VSENSOR_CLK_SRC 183 #define GPLL4 184 +#define GCC_CPUSS_DVM_BUS_CLK 185 +#define GCC_CPUSS_GNOC_CLK 186 /* GCC Resets */ #define GCC_MMSS_BCR 0 Copied: stable/12/sys/gnu/dts/include/dt-bindings/clock/r9a06g032-sysctrl.h (from r342935, head/sys/gnu/dts/include/dt-bindings/clock/r9a06g032-sysctrl.h) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/12/sys/gnu/dts/include/dt-bindings/clock/r9a06g032-sysctrl.h Mon Jan 14 06:57:39 2019 (r343012, copy of r342935, head/sys/gnu/dts/include/dt-bindings/clock/r9a06g032-sysctrl.h) @@ -0,0 +1,148 @@ +/* SPDX-License-Identifier: GPL-2.0 */ +/* + * R9A06G032 sysctrl IDs + * + * Copyright (C) 2018 Renesas Electronics Europe Limited + * + * Michel Pollet , + */ + +#ifndef __DT_BINDINGS_R9A06G032_SYSCTRL_H__ +#define __DT_BINDINGS_R9A06G032_SYSCTRL_H__ + +#define R9A06G032_CLK_PLL_USB 1 +#define R9A06G032_CLK_48 1 /* AKA CLK_PLL_USB */ +#define R9A06G032_MSEBIS_CLK 3 /* AKA CLKOUT_D16 */ +#define R9A06G032_MSEBIM_CLK 3 /* AKA CLKOUT_D16 */ +#define R9A06G032_CLK_DDRPHY_PLLCLK 5 /* AKA CLKOUT_D1OR2 */ +#define R9A06G032_CLK50 6 /* AKA CLKOUT_D20 */ +#define R9A06G032_CLK25 7 /* AKA CLKOUT_D40 */ +#define R9A06G032_CLK125 9 /* AKA CLKOUT_D8 */ +#define R9A06G032_CLK_P5_PG1 17 /* AKA DIV_P5_PG */ +#define R9A06G032_CLK_REF_SYNC 21 /* AKA DIV_REF_SYNC */ +#define R9A06G032_CLK_25_PG4 26 +#define R9A06G032_CLK_25_PG5 27 +#define R9A06G032_CLK_25_PG6 28 +#define R9A06G032_CLK_25_PG7 29 +#define R9A06G032_CLK_25_PG8 30 +#define R9A06G032_CLK_ADC 31 +#define R9A06G032_CLK_ECAT100 32 +#define R9A06G032_CLK_HSR100 33 +#define R9A06G032_CLK_I2C0 34 +#define R9A06G032_CLK_I2C1 35 +#define R9A06G032_CLK_MII_REF 36 +#define R9A06G032_CLK_NAND 37 +#define R9A06G032_CLK_NOUSBP2_PG6 38 +#define R9A06G032_CLK_P1_PG2 39 +#define R9A06G032_CLK_P1_PG3 40 +#define R9A06G032_CLK_P1_PG4 41 +#define R9A06G032_CLK_P4_PG3 42 +#define R9A06G032_CLK_P4_PG4 43 +#define R9A06G032_CLK_P6_PG1 44 +#define R9A06G032_CLK_P6_PG2 45 +#define R9A06G032_CLK_P6_PG3 46 +#define R9A06G032_CLK_P6_PG4 47 +#define R9A06G032_CLK_PCI_USB 48 +#define R9A06G032_CLK_QSPI0 49 +#define R9A06G032_CLK_QSPI1 50 +#define R9A06G032_CLK_RGMII_REF 51 +#define R9A06G032_CLK_RMII_REF 52 +#define R9A06G032_CLK_SDIO0 53 +#define R9A06G032_CLK_SDIO1 54 +#define R9A06G032_CLK_SERCOS100 55 +#define R9A06G032_CLK_SLCD 56 +#define R9A06G032_CLK_SPI0 57 +#define R9A06G032_CLK_SPI1 58 +#define R9A06G032_CLK_SPI2 59 +#define R9A06G032_CLK_SPI3 60 +#define R9A06G032_CLK_SPI4 61 +#define R9A06G032_CLK_SPI5 62 +#define R9A06G032_CLK_SWITCH 63 +#define R9A06G032_HCLK_ECAT125 65 +#define R9A06G032_HCLK_PINCONFIG 66 +#define R9A06G032_HCLK_SERCOS 67 +#define R9A06G032_HCLK_SGPIO2 68 +#define R9A06G032_HCLK_SGPIO3 69 +#define R9A06G032_HCLK_SGPIO4 70 +#define R9A06G032_HCLK_TIMER0 71 +#define R9A06G032_HCLK_TIMER1 72 +#define R9A06G032_HCLK_USBF 73 +#define R9A06G032_HCLK_USBH 74 +#define R9A06G032_HCLK_USBPM 75 +#define R9A06G032_CLK_48_PG_F 76 +#define R9A06G032_CLK_48_PG4 77 +#define R9A06G032_CLK_DDRPHY_PCLK 81 /* AKA CLK_REF_SYNC_D4 */ +#define R9A06G032_CLK_FW 81 /* AKA CLK_REF_SYNC_D4 */ +#define R9A06G032_CLK_CRYPTO 81 /* AKA CLK_REF_SYNC_D4 */ +#define R9A06G032_CLK_A7MP 84 /* AKA DIV_CA7 */ +#define R9A06G032_HCLK_CAN0 85 +#define R9A06G032_HCLK_CAN1 86 +#define R9A06G032_HCLK_DELTASIGMA 87 +#define R9A06G032_HCLK_PWMPTO 88 +#define R9A06G032_HCLK_RSV 89 +#define R9A06G032_HCLK_SGPIO0 90 +#define R9A06G032_HCLK_SGPIO1 91 +#define R9A06G032_RTOS_MDC 92 +#define R9A06G032_CLK_CM3 93 +#define R9A06G032_CLK_DDRC 94 +#define R9A06G032_CLK_ECAT25 95 +#define R9A06G032_CLK_HSR50 96 +#define R9A06G032_CLK_HW_RTOS 97 +#define R9A06G032_CLK_SERCOS50 98 +#define R9A06G032_HCLK_ADC 99 +#define R9A06G032_HCLK_CM3 100 +#define R9A06G032_HCLK_CRYPTO_EIP150 101 +#define R9A06G032_HCLK_CRYPTO_EIP93 102 +#define R9A06G032_HCLK_DDRC 103 +#define R9A06G032_HCLK_DMA0 104 +#define R9A06G032_HCLK_DMA1 105 +#define R9A06G032_HCLK_GMAC0 106 +#define R9A06G032_HCLK_GMAC1 107 +#define R9A06G032_HCLK_GPIO0 108 +#define R9A06G032_HCLK_GPIO1 109 +#define R9A06G032_HCLK_GPIO2 110 +#define R9A06G032_HCLK_HSR 111 +#define R9A06G032_HCLK_I2C0 112 +#define R9A06G032_HCLK_I2C1 113 +#define R9A06G032_HCLK_LCD 114 +#define R9A06G032_HCLK_MSEBI_M 115 +#define R9A06G032_HCLK_MSEBI_S 116 +#define R9A06G032_HCLK_NAND 117 +#define R9A06G032_HCLK_PG_I 118 +#define R9A06G032_HCLK_PG19 119 +#define R9A06G032_HCLK_PG20 120 +#define R9A06G032_HCLK_PG3 121 +#define R9A06G032_HCLK_PG4 122 +#define R9A06G032_HCLK_QSPI0 123 +#define R9A06G032_HCLK_QSPI1 124 +#define R9A06G032_HCLK_ROM 125 +#define R9A06G032_HCLK_RTC 126 +#define R9A06G032_HCLK_SDIO0 127 +#define R9A06G032_HCLK_SDIO1 128 +#define R9A06G032_HCLK_SEMAP 129 +#define R9A06G032_HCLK_SPI0 130 +#define R9A06G032_HCLK_SPI1 131 +#define R9A06G032_HCLK_SPI2 132 +#define R9A06G032_HCLK_SPI3 133 +#define R9A06G032_HCLK_SPI4 134 +#define R9A06G032_HCLK_SPI5 135 +#define R9A06G032_HCLK_SWITCH 136 +#define R9A06G032_HCLK_SWITCH_RG 137 +#define R9A06G032_HCLK_UART0 138 +#define R9A06G032_HCLK_UART1 139 +#define R9A06G032_HCLK_UART2 140 +#define R9A06G032_HCLK_UART3 141 +#define R9A06G032_HCLK_UART4 142 +#define R9A06G032_HCLK_UART5 143 +#define R9A06G032_HCLK_UART6 144 +#define R9A06G032_HCLK_UART7 145 +#define R9A06G032_CLK_UART0 146 +#define R9A06G032_CLK_UART1 147 +#define R9A06G032_CLK_UART2 148 +#define R9A06G032_CLK_UART3 149 +#define R9A06G032_CLK_UART4 150 +#define R9A06G032_CLK_UART5 151 +#define R9A06G032_CLK_UART6 152 +#define R9A06G032_CLK_UART7 153 + +#endif /* __DT_BINDINGS_R9A06G032_SYSCTRL_H__ */ Copied: stable/12/sys/gnu/dts/include/dt-bindings/clock/rk3399-ddr.h (from r342935, head/sys/gnu/dts/include/dt-bindings/clock/rk3399-ddr.h) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/12/sys/gnu/dts/include/dt-bindings/clock/rk3399-ddr.h Mon Jan 14 06:57:39 2019 (r343012, copy of r342935, head/sys/gnu/dts/include/dt-bindings/clock/rk3399-ddr.h) @@ -0,0 +1,56 @@ +/* SPDX-License-Identifier: (GPL-2.0+ OR MIT) */ + +#ifndef DT_BINDINGS_DDR_H +#define DT_BINDINGS_DDR_H + +/* + * DDR3 SDRAM Standard Speed Bins include tCK, tRCD, tRP, tRAS and tRC for + * each corresponding bin. + */ + +/* DDR3-800 (5-5-5) */ +#define DDR3_800D 0 +/* DDR3-800 (6-6-6) */ +#define DDR3_800E 1 +/* DDR3-1066 (6-6-6) */ +#define DDR3_1066E 2 +/* DDR3-1066 (7-7-7) */ +#define DDR3_1066F 3 +/* DDR3-1066 (8-8-8) */ +#define DDR3_1066G 4 +/* DDR3-1333 (7-7-7) */ +#define DDR3_1333F 5 +/* DDR3-1333 (8-8-8) */ +#define DDR3_1333G 6 +/* DDR3-1333 (9-9-9) */ +#define DDR3_1333H 7 +/* DDR3-1333 (10-10-10) */ +#define DDR3_1333J 8 +/* DDR3-1600 (8-8-8) */ +#define DDR3_1600G 9 +/* DDR3-1600 (9-9-9) */ +#define DDR3_1600H 10 +/* DDR3-1600 (10-10-10) */ +#define DDR3_1600J 11 +/* DDR3-1600 (11-11-11) */ +#define DDR3_1600K 12 +/* DDR3-1600 (10-10-10) */ +#define DDR3_1866J 13 +/* DDR3-1866 (11-11-11) */ +#define DDR3_1866K 14 +/* DDR3-1866 (12-12-12) */ +#define DDR3_1866L 15 +/* DDR3-1866 (13-13-13) */ +#define DDR3_1866M 16 +/* DDR3-2133 (11-11-11) */ +#define DDR3_2133K 17 +/* DDR3-2133 (12-12-12) */ +#define DDR3_2133L 18 +/* DDR3-2133 (13-13-13) */ +#define DDR3_2133M 19 +/* DDR3-2133 (14-14-14) */ +#define DDR3_2133N 20 +/* DDR3 ATF default */ +#define DDR3_DEFAULT 21 + +#endif Modified: stable/12/sys/gnu/dts/include/dt-bindings/clock/sun8i-r40-ccu.h ============================================================================== --- stable/12/sys/gnu/dts/include/dt-bindings/clock/sun8i-r40-ccu.h Mon Jan 14 06:34:54 2019 (r343011) +++ stable/12/sys/gnu/dts/include/dt-bindings/clock/sun8i-r40-ccu.h Mon Jan 14 06:57:39 2019 (r343012) @@ -43,6 +43,10 @@ #ifndef _DT_BINDINGS_CLK_SUN8I_R40_H_ *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@freebsd.org Mon Jan 14 07:21:44 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 6FC331496233; Mon, 14 Jan 2019 07:21:44 +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 13E8773C98; Mon, 14 Jan 2019 07:21:44 +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 024DA27762; Mon, 14 Jan 2019 07:21:44 +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 x0E7LhK2063538; Mon, 14 Jan 2019 07:21:43 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x0E7LhKB063537; Mon, 14 Jan 2019 07:21:43 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201901140721.x0E7LhKB063537@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Mon, 14 Jan 2019 07:21:43 +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: r343013 - stable/12/sys/dev/ahci X-SVN-Group: stable-12 X-SVN-Commit-Author: kib X-SVN-Commit-Paths: stable/12/sys/dev/ahci X-SVN-Commit-Revision: 343013 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 13E8773C98 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.93 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_SHORT(-0.93)[-0.930,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_LONG(-1.00)[-0.998,0] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 14 Jan 2019 07:21:44 -0000 Author: kib Date: Mon Jan 14 07:21:43 2019 New Revision: 343013 URL: https://svnweb.freebsd.org/changeset/base/343013 Log: MFC r342826: Fix use of busdma(9) KPI in ahci(4). Modified: stable/12/sys/dev/ahci/ahci.c Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/dev/ahci/ahci.c ============================================================================== --- stable/12/sys/dev/ahci/ahci.c Mon Jan 14 06:57:39 2019 (r343012) +++ stable/12/sys/dev/ahci/ahci.c Mon Jan 14 07:21:43 2019 (r343013) @@ -940,18 +940,22 @@ ahci_dmainit(device_t dev) struct ahci_channel *ch = device_get_softc(dev); struct ahci_dc_cb_args dcba; size_t rfsize; + int error; /* Command area. */ - if (bus_dma_tag_create(bus_get_dma_tag(dev), 1024, 0, + error = bus_dma_tag_create(bus_get_dma_tag(dev), 1024, 0, BUS_SPACE_MAXADDR, BUS_SPACE_MAXADDR, NULL, NULL, AHCI_WORK_SIZE, 1, AHCI_WORK_SIZE, - 0, NULL, NULL, &ch->dma.work_tag)) + 0, NULL, NULL, &ch->dma.work_tag); + if (error != 0) goto error; - if (bus_dmamem_alloc(ch->dma.work_tag, (void **)&ch->dma.work, - BUS_DMA_ZERO, &ch->dma.work_map)) + error = bus_dmamem_alloc(ch->dma.work_tag, (void **)&ch->dma.work, + BUS_DMA_ZERO, &ch->dma.work_map); + if (error != 0) goto error; - if (bus_dmamap_load(ch->dma.work_tag, ch->dma.work_map, ch->dma.work, - AHCI_WORK_SIZE, ahci_dmasetupc_cb, &dcba, 0) || dcba.error) { + error = bus_dmamap_load(ch->dma.work_tag, ch->dma.work_map, ch->dma.work, + AHCI_WORK_SIZE, ahci_dmasetupc_cb, &dcba, BUS_DMA_NOWAIT); + if (error != 0 || (error = dcba.error) != 0) { bus_dmamem_free(ch->dma.work_tag, ch->dma.work, ch->dma.work_map); goto error; } @@ -961,33 +965,37 @@ ahci_dmainit(device_t dev) rfsize = 4096; else rfsize = 256; - if (bus_dma_tag_create(bus_get_dma_tag(dev), rfsize, 0, + error = bus_dma_tag_create(bus_get_dma_tag(dev), rfsize, 0, BUS_SPACE_MAXADDR, BUS_SPACE_MAXADDR, NULL, NULL, rfsize, 1, rfsize, - 0, NULL, NULL, &ch->dma.rfis_tag)) + 0, NULL, NULL, &ch->dma.rfis_tag); + if (error != 0) goto error; - if (bus_dmamem_alloc(ch->dma.rfis_tag, (void **)&ch->dma.rfis, 0, - &ch->dma.rfis_map)) + error = bus_dmamem_alloc(ch->dma.rfis_tag, (void **)&ch->dma.rfis, 0, + &ch->dma.rfis_map); + if (error != 0) goto error; - if (bus_dmamap_load(ch->dma.rfis_tag, ch->dma.rfis_map, ch->dma.rfis, - rfsize, ahci_dmasetupc_cb, &dcba, 0) || dcba.error) { + error = bus_dmamap_load(ch->dma.rfis_tag, ch->dma.rfis_map, ch->dma.rfis, + rfsize, ahci_dmasetupc_cb, &dcba, BUS_DMA_NOWAIT); + if (error != 0 || (error = dcba.error) != 0) { bus_dmamem_free(ch->dma.rfis_tag, ch->dma.rfis, ch->dma.rfis_map); goto error; } ch->dma.rfis_bus = dcba.maddr; /* Data area. */ - if (bus_dma_tag_create(bus_get_dma_tag(dev), 2, 0, + error = bus_dma_tag_create(bus_get_dma_tag(dev), 2, 0, BUS_SPACE_MAXADDR, BUS_SPACE_MAXADDR, NULL, NULL, AHCI_SG_ENTRIES * PAGE_SIZE * ch->numslots, AHCI_SG_ENTRIES, AHCI_PRD_MAX, - 0, busdma_lock_mutex, &ch->mtx, &ch->dma.data_tag)) { + 0, busdma_lock_mutex, &ch->mtx, &ch->dma.data_tag); + if (error != 0) goto error; - } return; error: - device_printf(dev, "WARNING - DMA initialization failed\n"); + device_printf(dev, "WARNING - DMA initialization failed, error %d\n", + error); ahci_dmafini(dev); } From owner-svn-src-all@freebsd.org Mon Jan 14 07:22:59 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 5AA6314962AC; Mon, 14 Jan 2019 07:22:59 +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 F1654742B6; Mon, 14 Jan 2019 07:22:58 +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 E0CB32779E; Mon, 14 Jan 2019 07:22:58 +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 x0E7MwUM064619; Mon, 14 Jan 2019 07:22:58 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x0E7Mwut064618; Mon, 14 Jan 2019 07:22:58 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201901140722.x0E7Mwut064618@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Mon, 14 Jan 2019 07:22:58 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r343014 - stable/11/sys/dev/ahci X-SVN-Group: stable-11 X-SVN-Commit-Author: kib X-SVN-Commit-Paths: stable/11/sys/dev/ahci X-SVN-Commit-Revision: 343014 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: F1654742B6 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.93 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_LONG(-1.00)[-0.998,0]; NEURAL_HAM_SHORT(-0.93)[-0.930,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 14 Jan 2019 07:22:59 -0000 Author: kib Date: Mon Jan 14 07:22:58 2019 New Revision: 343014 URL: https://svnweb.freebsd.org/changeset/base/343014 Log: MFC r342826: Fix use of busdma(9) KPI in ahci(4). Modified: stable/11/sys/dev/ahci/ahci.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/dev/ahci/ahci.c ============================================================================== --- stable/11/sys/dev/ahci/ahci.c Mon Jan 14 07:21:43 2019 (r343013) +++ stable/11/sys/dev/ahci/ahci.c Mon Jan 14 07:22:58 2019 (r343014) @@ -937,18 +937,22 @@ ahci_dmainit(device_t dev) struct ahci_channel *ch = device_get_softc(dev); struct ahci_dc_cb_args dcba; size_t rfsize; + int error; /* Command area. */ - if (bus_dma_tag_create(bus_get_dma_tag(dev), 1024, 0, + error = bus_dma_tag_create(bus_get_dma_tag(dev), 1024, 0, BUS_SPACE_MAXADDR, BUS_SPACE_MAXADDR, NULL, NULL, AHCI_WORK_SIZE, 1, AHCI_WORK_SIZE, - 0, NULL, NULL, &ch->dma.work_tag)) + 0, NULL, NULL, &ch->dma.work_tag); + if (error != 0) goto error; - if (bus_dmamem_alloc(ch->dma.work_tag, (void **)&ch->dma.work, - BUS_DMA_ZERO, &ch->dma.work_map)) + error = bus_dmamem_alloc(ch->dma.work_tag, (void **)&ch->dma.work, + BUS_DMA_ZERO, &ch->dma.work_map); + if (error != 0) goto error; - if (bus_dmamap_load(ch->dma.work_tag, ch->dma.work_map, ch->dma.work, - AHCI_WORK_SIZE, ahci_dmasetupc_cb, &dcba, 0) || dcba.error) { + error = bus_dmamap_load(ch->dma.work_tag, ch->dma.work_map, ch->dma.work, + AHCI_WORK_SIZE, ahci_dmasetupc_cb, &dcba, BUS_DMA_NOWAIT); + if (error != 0 || (error = dcba.error) != 0) { bus_dmamem_free(ch->dma.work_tag, ch->dma.work, ch->dma.work_map); goto error; } @@ -958,33 +962,37 @@ ahci_dmainit(device_t dev) rfsize = 4096; else rfsize = 256; - if (bus_dma_tag_create(bus_get_dma_tag(dev), rfsize, 0, + error = bus_dma_tag_create(bus_get_dma_tag(dev), rfsize, 0, BUS_SPACE_MAXADDR, BUS_SPACE_MAXADDR, NULL, NULL, rfsize, 1, rfsize, - 0, NULL, NULL, &ch->dma.rfis_tag)) + 0, NULL, NULL, &ch->dma.rfis_tag); + if (error != 0) goto error; - if (bus_dmamem_alloc(ch->dma.rfis_tag, (void **)&ch->dma.rfis, 0, - &ch->dma.rfis_map)) + error = bus_dmamem_alloc(ch->dma.rfis_tag, (void **)&ch->dma.rfis, 0, + &ch->dma.rfis_map); + if (error != 0) goto error; - if (bus_dmamap_load(ch->dma.rfis_tag, ch->dma.rfis_map, ch->dma.rfis, - rfsize, ahci_dmasetupc_cb, &dcba, 0) || dcba.error) { + error = bus_dmamap_load(ch->dma.rfis_tag, ch->dma.rfis_map, ch->dma.rfis, + rfsize, ahci_dmasetupc_cb, &dcba, BUS_DMA_NOWAIT); + if (error != 0 || (error = dcba.error) != 0) { bus_dmamem_free(ch->dma.rfis_tag, ch->dma.rfis, ch->dma.rfis_map); goto error; } ch->dma.rfis_bus = dcba.maddr; /* Data area. */ - if (bus_dma_tag_create(bus_get_dma_tag(dev), 2, 0, + error = bus_dma_tag_create(bus_get_dma_tag(dev), 2, 0, BUS_SPACE_MAXADDR, BUS_SPACE_MAXADDR, NULL, NULL, AHCI_SG_ENTRIES * PAGE_SIZE * ch->numslots, AHCI_SG_ENTRIES, AHCI_PRD_MAX, - 0, busdma_lock_mutex, &ch->mtx, &ch->dma.data_tag)) { + 0, busdma_lock_mutex, &ch->mtx, &ch->dma.data_tag); + if (error != 0) goto error; - } return; error: - device_printf(dev, "WARNING - DMA initialization failed\n"); + device_printf(dev, "WARNING - DMA initialization failed, error %d\n", + error); ahci_dmafini(dev); } From owner-svn-src-all@freebsd.org Mon Jan 14 07:24:51 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id EDF3D1496341; Mon, 14 Jan 2019 07:24:50 +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 8DE0B743FE; Mon, 14 Jan 2019 07:24:50 +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 5CF372779F; Mon, 14 Jan 2019 07:24:50 +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 x0E7Ooiv064748; Mon, 14 Jan 2019 07:24:50 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x0E7On8P064746; Mon, 14 Jan 2019 07:24:49 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201901140724.x0E7On8P064746@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Mon, 14 Jan 2019 07:24:49 +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: r343015 - in stable/12: lib/libc/sys sys/vm X-SVN-Group: stable-12 X-SVN-Commit-Author: kib X-SVN-Commit-Paths: in stable/12: lib/libc/sys sys/vm X-SVN-Commit-Revision: 343015 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 8DE0B743FE X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.93 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_SHORT(-0.93)[-0.930,0]; NEURAL_HAM_LONG(-1.00)[-0.998,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 14 Jan 2019 07:24:51 -0000 Author: kib Date: Mon Jan 14 07:24:49 2019 New Revision: 343015 URL: https://svnweb.freebsd.org/changeset/base/343015 Log: MFC r342853: Add a tunable which changes mincore(2) algorithm to only report data from the local mapping. Modified: stable/12/lib/libc/sys/mincore.2 stable/12/sys/vm/vm_mmap.c Directory Properties: stable/12/ (props changed) Modified: stable/12/lib/libc/sys/mincore.2 ============================================================================== --- stable/12/lib/libc/sys/mincore.2 Mon Jan 14 07:22:58 2019 (r343014) +++ stable/12/lib/libc/sys/mincore.2 Mon Jan 14 07:24:49 2019 (r343015) @@ -28,7 +28,7 @@ .\" @(#)mincore.2 8.1 (Berkeley) 6/9/93 .\" $FreeBSD$ .\" -.Dd June 1, 2018 +.Dd January 7, 2019 .Dt MINCORE 2 .Os .Sh NAME @@ -47,7 +47,8 @@ system call determines whether each of the pages in th .Fa addr and continuing for .Fa len -bytes is resident. +bytes is resident or mapped, depending on the value of sysctl +.Va vm.mincore_mapped . .\"The beginning address, .\".Fa addr , .\"is first rounded down to a multiple of the page size (see @@ -85,6 +86,18 @@ The only way to ensure that a page is resident is to l with the .Xr mlock 2 system call. +.Pp +If the +.Va vm.mincore_mapped +sysctl is set to a non-zero value (default), only the current process' +mappings of the pages in the specified virtual address range are examined. +This does not preclude the system from returning +.Dv MINCORE_REFERENCED_OTHER +and +.Dv MINCORE_MODIFIED_OTHER +statuses. +Otherwise, if the sysctl value is zero, all resident pages backing the +specified address range are examined, regardless of the mapping state. .Sh RETURN VALUES .Rv -std mincore .Sh ERRORS Modified: stable/12/sys/vm/vm_mmap.c ============================================================================== --- stable/12/sys/vm/vm_mmap.c Mon Jan 14 07:22:58 2019 (r343014) +++ stable/12/sys/vm/vm_mmap.c Mon Jan 14 07:24:49 2019 (r343015) @@ -97,6 +97,9 @@ __FBSDID("$FreeBSD$"); int old_mlock = 0; SYSCTL_INT(_vm, OID_AUTO, old_mlock, CTLFLAG_RWTUN, &old_mlock, 0, "Do not apply RLIMIT_MEMLOCK on mlockall"); +static int mincore_mapped = 1; +SYSCTL_INT(_vm, OID_AUTO, mincore_mapped, CTLFLAG_RWTUN, &mincore_mapped, 0, + "mincore reports mappings, not residency"); #ifdef MAP_32BIT #define MAP_32BIT_MAX_ADDR ((vm_offset_t)1 << 31) @@ -814,7 +817,16 @@ RestartScan: retry: m = NULL; mincoreinfo = pmap_mincore(pmap, addr, &locked_pa); - if (locked_pa != 0) { + if (mincore_mapped) { + /* + * We only care about this pmap's + * mapping of the page, if any. + */ + if (locked_pa != 0) { + vm_page_unlock(PHYS_TO_VM_PAGE( + locked_pa)); + } + } else if (locked_pa != 0) { /* * The page is mapped by this process but not * both accessed and modified. It is also From owner-svn-src-all@freebsd.org Mon Jan 14 07:25:46 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id EDF6414963B3; Mon, 14 Jan 2019 07:25:45 +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 8D84274538; Mon, 14 Jan 2019 07:25:45 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 6568C277A1; Mon, 14 Jan 2019 07:25:45 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x0E7PjM3064853; Mon, 14 Jan 2019 07:25:45 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x0E7Pine064851; Mon, 14 Jan 2019 07:25:44 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201901140725.x0E7Pine064851@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Mon, 14 Jan 2019 07:25:44 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r343016 - in stable/11: lib/libc/sys sys/vm X-SVN-Group: stable-11 X-SVN-Commit-Author: kib X-SVN-Commit-Paths: in stable/11: lib/libc/sys sys/vm X-SVN-Commit-Revision: 343016 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 8D84274538 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.93 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_SHORT(-0.93)[-0.930,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_LONG(-1.00)[-0.998,0] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 14 Jan 2019 07:25:46 -0000 Author: kib Date: Mon Jan 14 07:25:44 2019 New Revision: 343016 URL: https://svnweb.freebsd.org/changeset/base/343016 Log: MFC r342853: Add a tunable which changes mincore(2) algorithm to only report data from the local mapping. Modified: stable/11/lib/libc/sys/mincore.2 stable/11/sys/vm/vm_mmap.c Directory Properties: stable/11/ (props changed) Modified: stable/11/lib/libc/sys/mincore.2 ============================================================================== --- stable/11/lib/libc/sys/mincore.2 Mon Jan 14 07:24:49 2019 (r343015) +++ stable/11/lib/libc/sys/mincore.2 Mon Jan 14 07:25:44 2019 (r343016) @@ -28,7 +28,7 @@ .\" @(#)mincore.2 8.1 (Berkeley) 6/9/93 .\" $FreeBSD$ .\" -.Dd June 1, 2018 +.Dd January 7, 2019 .Dt MINCORE 2 .Os .Sh NAME @@ -47,7 +47,8 @@ system call determines whether each of the pages in th .Fa addr and continuing for .Fa len -bytes is resident. +bytes is resident or mapped, depending on the value of sysctl +.Va vm.mincore_mapped . .\"The beginning address, .\".Fa addr , .\"is first rounded down to a multiple of the page size (see @@ -85,6 +86,18 @@ The only way to ensure that a page is resident is to l with the .Xr mlock 2 system call. +.Pp +If the +.Va vm.mincore_mapped +sysctl is set to a non-zero value (default), only the current process' +mappings of the pages in the specified virtual address range are examined. +This does not preclude the system from returning +.Dv MINCORE_REFERENCED_OTHER +and +.Dv MINCORE_MODIFIED_OTHER +statuses. +Otherwise, if the sysctl value is zero, all resident pages backing the +specified address range are examined, regardless of the mapping state. .Sh RETURN VALUES .Rv -std mincore .Sh ERRORS Modified: stable/11/sys/vm/vm_mmap.c ============================================================================== --- stable/11/sys/vm/vm_mmap.c Mon Jan 14 07:24:49 2019 (r343015) +++ stable/11/sys/vm/vm_mmap.c Mon Jan 14 07:25:44 2019 (r343016) @@ -96,6 +96,9 @@ __FBSDID("$FreeBSD$"); int old_mlock = 0; SYSCTL_INT(_vm, OID_AUTO, old_mlock, CTLFLAG_RWTUN, &old_mlock, 0, "Do not apply RLIMIT_MEMLOCK on mlockall"); +static int mincore_mapped = 1; +SYSCTL_INT(_vm, OID_AUTO, mincore_mapped, CTLFLAG_RWTUN, &mincore_mapped, 0, + "mincore reports mappings, not residency"); #ifdef MAP_32BIT #define MAP_32BIT_MAX_ADDR ((vm_offset_t)1 << 31) @@ -814,7 +817,16 @@ RestartScan: retry: m = NULL; mincoreinfo = pmap_mincore(pmap, addr, &locked_pa); - if (locked_pa != 0) { + if (mincore_mapped) { + /* + * We only care about this pmap's + * mapping of the page, if any. + */ + if (locked_pa != 0) { + vm_page_unlock(PHYS_TO_VM_PAGE( + locked_pa)); + } + } else if (locked_pa != 0) { /* * The page is mapped by this process but not * both accessed and modified. It is also From owner-svn-src-all@freebsd.org Mon Jan 14 07:31:20 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 999841496771; Mon, 14 Jan 2019 07:31:20 +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 3C08F74918; Mon, 14 Jan 2019 07:31:20 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 23ED4277FA; Mon, 14 Jan 2019 07:31:20 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x0E7VKvP065141; Mon, 14 Jan 2019 07:31:20 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x0E7VKYY065140; Mon, 14 Jan 2019 07:31:20 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201901140731.x0E7VKYY065140@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Mon, 14 Jan 2019 07:31:20 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r343017 - head/sys/kern X-SVN-Group: head X-SVN-Commit-Author: kib X-SVN-Commit-Paths: head/sys/kern X-SVN-Commit-Revision: 343017 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 3C08F74918 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.93 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_SHORT(-0.94)[-0.937,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_LONG(-1.00)[-0.999,0] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 14 Jan 2019 07:31:20 -0000 Author: kib Date: Mon Jan 14 07:31:19 2019 New Revision: 343017 URL: https://svnweb.freebsd.org/changeset/base/343017 Log: Handle overflow in calculating max kmem size. vm_kmem_size is u_long, and it might be not capable of holding page count times PAGE_SIZE, even when scaled down by VM_KMEM_SIZE_SCALE. As bde reported, 12G PAE config ends up with zero for kmem size. Explicitly check for overflow and clamp kmem size at vm_kmem_size_max. If we end up at zero size because VM_KMEM_SIZE_MAX is not defined, panic with clear explanation rather then failing in a way which is hard to relate. Reported by: bde, pho Tested by: pho Reviewed by: markj Sponsored by: The FreeBSD Foundation MFC after: 1 week Differential revision: https://reviews.freebsd.org/D18767 Modified: head/sys/kern/kern_malloc.c Modified: head/sys/kern/kern_malloc.c ============================================================================== --- head/sys/kern/kern_malloc.c Mon Jan 14 07:25:44 2019 (r343016) +++ head/sys/kern/kern_malloc.c Mon Jan 14 07:31:19 2019 (r343017) @@ -920,13 +920,16 @@ kmeminit(void) * variable: */ if (vm_kmem_size == 0) { - vm_kmem_size = (mem_size / vm_kmem_size_scale) * PAGE_SIZE; - + vm_kmem_size = mem_size / vm_kmem_size_scale; + vm_kmem_size = vm_kmem_size * PAGE_SIZE < vm_kmem_size ? + vm_kmem_size_max : vm_kmem_size * PAGE_SIZE; if (vm_kmem_size_min > 0 && vm_kmem_size < vm_kmem_size_min) vm_kmem_size = vm_kmem_size_min; if (vm_kmem_size_max > 0 && vm_kmem_size >= vm_kmem_size_max) vm_kmem_size = vm_kmem_size_max; } + if (vm_kmem_size == 0) + panic("Tune VM_KMEM_SIZE_* for the platform"); /* * The amount of KVA space that is preallocated to the From owner-svn-src-all@freebsd.org Mon Jan 14 07:50:24 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 0B6971496E96; Mon, 14 Jan 2019 07:50:24 +0000 (UTC) (envelope-from avos@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 9D1C1751BD; Mon, 14 Jan 2019 07:50:23 +0000 (UTC) (envelope-from avos@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1: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 8508527B2E; Mon, 14 Jan 2019 07:50:23 +0000 (UTC) (envelope-from avos@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x0E7oN12075492; Mon, 14 Jan 2019 07:50:23 GMT (envelope-from avos@FreeBSD.org) Received: (from avos@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x0E7oNqE075491; Mon, 14 Jan 2019 07:50:23 GMT (envelope-from avos@FreeBSD.org) Message-Id: <201901140750.x0E7oNqE075491@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: avos set sender to avos@FreeBSD.org using -f From: Andriy Voskoboinyk Date: Mon, 14 Jan 2019 07:50: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: r343018 - stable/12/sys/net80211 X-SVN-Group: stable-12 X-SVN-Commit-Author: avos X-SVN-Commit-Paths: stable/12/sys/net80211 X-SVN-Commit-Revision: 343018 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 9D1C1751BD X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.92 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_LONG(-1.00)[-0.998,0]; NEURAL_HAM_SHORT(-0.93)[-0.927,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 14 Jan 2019 07:50:24 -0000 Author: avos Date: Mon Jan 14 07:50:23 2019 New Revision: 343018 URL: https://svnweb.freebsd.org/changeset/base/343018 Log: MFC r342883: net80211: fix panic when device is removed during initialization if_dead() is called during device detach - check if interface is still exists before trying to refresh vap MAC address (IF_LLADDR will trigger page fault otherwise). Modified: stable/12/sys/net80211/ieee80211_ioctl.c Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/net80211/ieee80211_ioctl.c ============================================================================== --- stable/12/sys/net80211/ieee80211_ioctl.c Mon Jan 14 07:31:19 2019 (r343017) +++ stable/12/sys/net80211/ieee80211_ioctl.c Mon Jan 14 07:50:23 2019 (r343018) @@ -3537,9 +3537,13 @@ ieee80211_ioctl(struct ifnet *ifp, u_long cmd, caddr_t /* * Check if the MAC address was changed * via SIOCSIFLLADDR ioctl. + * + * NB: device may be detached during initialization; + * use if_ioctl for existence check. */ if_addr_rlock(ifp); - if ((ifp->if_flags & IFF_UP) == 0 && + if (ifp->if_ioctl == ieee80211_ioctl && + (ifp->if_flags & IFF_UP) == 0 && !IEEE80211_ADDR_EQ(vap->iv_myaddr, IF_LLADDR(ifp))) IEEE80211_ADDR_COPY(vap->iv_myaddr, IF_LLADDR(ifp)); From owner-svn-src-all@freebsd.org Mon Jan 14 07:54:12 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id C339714970C4; Mon, 14 Jan 2019 07:54:12 +0000 (UTC) (envelope-from avos@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 695DC755BA; Mon, 14 Jan 2019 07:54:12 +0000 (UTC) (envelope-from avos@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1: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 5820C27CCE; Mon, 14 Jan 2019 07:54:12 +0000 (UTC) (envelope-from avos@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x0E7sCtD080382; Mon, 14 Jan 2019 07:54:12 GMT (envelope-from avos@FreeBSD.org) Received: (from avos@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x0E7sC9M080381; Mon, 14 Jan 2019 07:54:12 GMT (envelope-from avos@FreeBSD.org) Message-Id: <201901140754.x0E7sC9M080381@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: avos set sender to avos@FreeBSD.org using -f From: Andriy Voskoboinyk Date: Mon, 14 Jan 2019 07:54:12 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r343019 - stable/11/sys/net80211 X-SVN-Group: stable-11 X-SVN-Commit-Author: avos X-SVN-Commit-Paths: stable/11/sys/net80211 X-SVN-Commit-Revision: 343019 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 695DC755BA X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.92 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_SHORT(-0.93)[-0.927,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_LONG(-1.00)[-0.998,0] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 14 Jan 2019 07:54:12 -0000 Author: avos Date: Mon Jan 14 07:54:11 2019 New Revision: 343019 URL: https://svnweb.freebsd.org/changeset/base/343019 Log: MFC r342883: net80211: fix panic when device is removed during initialization if_dead() is called during device detach - check if interface is still exists before trying to refresh vap MAC address (IF_LLADDR will trigger page fault otherwise). Modified: stable/11/sys/net80211/ieee80211_ioctl.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/net80211/ieee80211_ioctl.c ============================================================================== --- stable/11/sys/net80211/ieee80211_ioctl.c Mon Jan 14 07:50:23 2019 (r343018) +++ stable/11/sys/net80211/ieee80211_ioctl.c Mon Jan 14 07:54:11 2019 (r343019) @@ -3394,9 +3394,13 @@ ieee80211_ioctl(struct ifnet *ifp, u_long cmd, caddr_t /* * Check if the MAC address was changed * via SIOCSIFLLADDR ioctl. + * + * NB: device may be detached during initialization; + * use if_ioctl for existence check. */ if_addr_rlock(ifp); - if ((ifp->if_flags & IFF_UP) == 0 && + if (ifp->if_ioctl == ieee80211_ioctl && + (ifp->if_flags & IFF_UP) == 0 && !IEEE80211_ADDR_EQ(vap->iv_myaddr, IF_LLADDR(ifp))) IEEE80211_ADDR_COPY(vap->iv_myaddr, IF_LLADDR(ifp)); From owner-svn-src-all@freebsd.org Mon Jan 14 08:23:48 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 8DEA21497C42; Mon, 14 Jan 2019 08:23:48 +0000 (UTC) (envelope-from lme@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 2FF167631B; Mon, 14 Jan 2019 08:23:48 +0000 (UTC) (envelope-from lme@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1: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 1B980251; Mon, 14 Jan 2019 08:23:48 +0000 (UTC) (envelope-from lme@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x0E8NmGx096243; Mon, 14 Jan 2019 08:23:48 GMT (envelope-from lme@FreeBSD.org) Received: (from lme@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x0E8Nmll096242; Mon, 14 Jan 2019 08:23:48 GMT (envelope-from lme@FreeBSD.org) Message-Id: <201901140823.x0E8Nmll096242@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: lme set sender to lme@FreeBSD.org using -f From: Lars Engels Date: Mon, 14 Jan 2019 08:23:48 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r343020 - head/usr.sbin/bluetooth/bluetooth-config X-SVN-Group: head X-SVN-Commit-Author: lme X-SVN-Commit-Paths: head/usr.sbin/bluetooth/bluetooth-config X-SVN-Commit-Revision: 343020 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 2FF167631B X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.96 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_LONG(-1.00)[-0.999,0]; NEURAL_HAM_SHORT(-0.96)[-0.965,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 14 Jan 2019 08:23:48 -0000 Author: lme (ports committer) Date: Mon Jan 14 08:23:47 2019 New Revision: 343020 URL: https://svnweb.freebsd.org/changeset/base/343020 Log: This new version of bluetooth-config.sh tries to follow the style of other shell scripts in base, removes the bogus "copyleft", adds the BeerWare license header and uses rc.subr(8) new 'enable' keyword for adding entries in rc.conf(5). Submitted by: erdgeist Approved by: bapt MFC after: 2 weeks Modified: head/usr.sbin/bluetooth/bluetooth-config/bluetooth-config.sh Modified: head/usr.sbin/bluetooth/bluetooth-config/bluetooth-config.sh ============================================================================== --- head/usr.sbin/bluetooth/bluetooth-config/bluetooth-config.sh Mon Jan 14 07:54:11 2019 (r343019) +++ head/usr.sbin/bluetooth/bluetooth-config/bluetooth-config.sh Mon Jan 14 08:23:47 2019 (r343020) @@ -1,9 +1,12 @@ #!/bin/sh #- -# Copyleft 2019 Dirk Engling +# ---------------------------------------------------------------------------- +# "THE BEER-WARE LICENSE" (Revision 42): +# wrote this file. As long as you retain this notice you +# can do whatever you want with this stuff. If we meet some day, and you think +# this stuff is worth it, you can buy me a beer in return Poul-Henning Kamp +# ---------------------------------------------------------------------------- # -# This script is released under the beerware license. -# # $FreeBSD$ # @@ -11,8 +14,6 @@ exerr () { echo -e "Error: $*" >&2 ; exit 1; } print_syntax () { echo -e "Syntax: $0 scan [-d device] [-n node]"; exit 1; } -# Assuming we are called to do the pair-new-device subcommand first - main() { unset node device started bdaddresses retry @@ -22,132 +23,140 @@ shift # Get command line options while getopts :d:n: arg; do - case ${arg} in - d) device="$OPTARG";; - n) node="$OPTARG";; - ?) print_syntax;; - esac + case ${arg} in + d) device="$OPTARG";; + n) node="$OPTARG";; + ?) print_syntax;; + esac done # No use running without super user rights -[ $( id -u ) -eq 0 ] || exerr "$0 must modify files that belong to root. Re-run as root." +if [ $( id -u ) -ne 0 ]; then + exerr "$0 must modify files that belong to root. Re-run as root." +fi -known_nodes=$(/usr/sbin/hccontrol read_node_list 2>/dev/null | \ - /usr/bin/tail -n +2 | /usr/bin/cut -d ' ' -f 1) +known_nodes=$( /usr/sbin/hccontrol read_node_list 2>/dev/null |\ + /usr/bin/tail -n +2 | /usr/bin/cut -d ' ' -f 1 ) # Check if netgraph knows about any HCI nodes if ! [ "${known_nodes}" ]; then - ng_nodes=$(/usr/sbin/ngctl list 2>/dev/null | \ - /usr/bin/grep -o "Name: .* Type: ubt" | /usr/bin/cut -d ' ' -f 2) + ng_nodes=$( /usr/sbin/ngctl list 2>/dev/null | \ + /usr/bin/grep -o "Name: .* Type: ubt" |/usr/bin/cut -d' ' -f2 ) - [ "${ng_nodes}" ] || exerr "No Bluetooth host controllers found." + [ "${ng_nodes}" ] || exerr "No Bluetooth host controllers found." - unset found - for n in ${ng_nodes}; do - if [ "${n}" = "${node%hci}" ]; then - # If we found the node but its stack is not set up, do it now - /usr/sbin/service bluetooth start ${node%hci} || exit 1 - found="YES" - fi - done + unset found + for n in ${ng_nodes}; do + if [ "${n}" = "${node%hci}" ]; then + # Found the node but its stack is not set up? Do it now. + /usr/sbin/service bluetooth start ${node%hci} || exit 1 + found="YES" + fi + done - # If we have Bluetooth controller nodes without a set up stack, - # ask the user if we shall start it up - if ! [ "${found}" ]; then - printf "No usable Bluetooth host controllers were found.\n" - printf "These host controllers exist in the system:\n %s" " ${ng_nodes}" - read -p "Choose a host controller to set up: [${ng_nodes%% *}]" node - : ${node:="${ng_nodes%% *}"} - /usr/sbin/service bluetooth start ${node} || exit 1 - fi + # If we have Bluetooth controller nodes without a set up stack, + # ask the user if we shall start it up + if ! [ "${found}" ]; then + printf "No usable Bluetooth host controllers were found.\n" + printf "These host controllers exist in the system:\n" + printf " %s\n" "${ng_nodes}" + prompt="Choose a host controller to set up: [${ng_nodes%% *}]" + read -p "${prompt}" node + : ${node:="${ng_nodes%% *}"} + /usr/sbin/service bluetooth start ${node} || exit 1 + fi - # Re-read known nodes - known_nodes=$(/usr/sbin/hccontrol read_node_list 2>/dev/null | \ - /usr/bin/tail -n +2 | /usr/bin/cut -d ' ' -f 1) - # check if we succeeded in bringing it up - [ "${known_nodes}" ] || exerr "Failed to set up Bluetooth stack" + # Re-read known nodes + known_nodes=$(/usr/sbin/hccontrol read_node_list 2>/dev/null | + /usr/bin/tail -n +2 | /usr/bin/cut -d ' ' -f 1 ) + + # check if we succeeded in bringing it up + [ "${known_nodes}" ] || exerr "Failed to set up Bluetooth stack" fi # if a node was requested on command line, check if it is there if [ "${node}" ]; then - unset found - for n in ${known_nodes}; do - [ "${n}" = "${node}" ] && found="YES" - [ "${n}" = "${node}hci" ] && node="${node}hci" && found="YES" - done - [ "${found}" ] || exerr "Node ${node} not found" + unset found + for n in ${known_nodes}; do + [ "${n}" = "${node}" ] && found="YES" + [ "${n}" = "${node}hci" ] && node="${node}hci" && found="YES" + done + [ "${found}" ] || exerr "Node ${node} not found" fi [ "${node}" ] && node="-n ${node}" while ! [ "${bdaddresses}" ]; do - retry=X${retry} - printf "Scanning for new Bluetooth devices (Attempt %d of 5) ... " ${#retry} - bdaddresses=$( /usr/sbin/hccontrol -N ${node} inquiry 2>/dev/null | \ - /usr/bin/grep -o "BD_ADDR: .*" | /usr/bin/cut -d ' ' -f 2 ) + retry=X${retry} + printf "Scanning for new Bluetooth devices (Attempt %d of 5) ... " \ + ${#retry} + bdaddresses=$( /usr/sbin/hccontrol -N ${node} inquiry 2>/dev/null | + /usr/bin/grep -o "BD_ADDR: .*" | /usr/bin/cut -d ' ' -f 2 ) - # Count entries and, if a device was requested on command line, - # try to find it - unset found count - for bdaddress in ${bdaddresses}; do - count=X${count} - if [ "${bdaddress}" = "${device}" ]; then - found=YES - bdaddresses="${device}" - count=X - break - fi - done + # Count entries and, if a device was requested on command line, + # try to find it + unset found count + for bdaddress in ${bdaddresses}; do + count=X${count} + if [ "${bdaddress}" = "${device}" ]; then + found=YES + bdaddresses="${device}" + count=X + break + fi + done - # If device was requested on command line but is not found, - # or no devices found at all, rescan until retry is exhausted - if ! [ "${found}" -o "${count}" -a -z "${device}" ]; then - printf "failed.\n" - if [ "${#retry}" -eq 5 ]; then - [ "${device}" ] && exerr "Device ${device} not found" - exerr "No new Bluetooth devices found" - fi - unset bdaddresses - sleep 2 - continue - fi + # If device was requested on command line but is not found, + # or no devices found at all, rescan until retry is exhausted + if ! [ "${found}" -o "${count}" -a -z "${device}" ]; then + printf "failed.\n" + if [ "${#retry}" -eq 5 ]; then + [ "${device}" ] && exerr "Device ${device} not found" + exerr "No new Bluetooth devices found" + fi + unset bdaddresses + sleep 2 + continue + fi - [ ${#count} -gt 1 ] && plural=s || plural='' - printf "done.\nFound %d new bluetooth device%s (scanning for names):\n" ${#count} ${plural} + [ ${#count} -gt 1 ] && plural=s || plural='' + printf "done.\nFound %d new bluetooth device%s " ${#count} ${plural} + printf "(now scanning for names):\n" - # Looping again for the faster feedback - unset count - for bdaddress in ${bdaddresses}; do - count=X${count} - bdname=$( /usr/bin/bthost -b "${bdaddress}" 2>/dev/null ) - friendlyname=$( /usr/sbin/hccontrol Remote_Name_Request ${bdaddress} 2> /dev/null | \ - /usr/bin/grep -o "Name: .*" | /usr/bin/cut -d ' ' -f 2- ) + # Looping again for the faster feedback + unset count + for bdaddress in ${bdaddresses}; do + count=X${count} + bdname=$( /usr/bin/bthost -b "${bdaddress}" 2>/dev/null ) + friendlyname=$( /usr/sbin/hccontrol Remote_Name_Request \ + ${bdaddress} 2> /dev/null | + /usr/bin/grep -o "Name: .*" |/usr/bin/cut -d ' ' -f 2- ) - # sdpcontrol should be able to pull vendor and product id via sdp - printf "[%2d] %s\t\"%s\" (%s)\n" ${#count} "${bdaddress}" "${friendlyname}" "${bdname}" + # sdpcontrol should be able to pull vendor + product id via sdp + printf "[%2d] %s\t\"%s\" (%s)\n" ${#count} "${bdaddress}" \ + "${friendlyname}" "${bdname}" - eval bdaddress_${#count}=\${bdaddress} - eval bdname_${#count}=\${bdname} - eval friendlyname_${#count}=\${friendlyname} - done + eval bdaddress_${#count}=\${bdaddress} + eval bdname_${#count}=\${bdname} + eval friendlyname_${#count}=\${friendlyname} + done - # If a device was pre-selected, do not query the user - [ "${device}" ] && topair=1 || unset topair + # If a device was pre-selected, do not query the user + [ "${device}" ] && topair=1 || unset topair - # Even if only one device was found, user may chose 0 to rescan - while ! [ "${topair}" ]; do - if [ ${#count} -eq 1 ]; then - read -p "Select device to pair with [1, or 0 to rescan]: " topair - else - read -p "Select device to pair with [1-${#count}, or 0 to rescan]: " topair - fi - if ! [ "${topair}" -ge 0 -a "${topair}" -le "${#count}" ] 2>/dev/null ; then - printf "Value out of range: %s.\n" {topair} - unset topair - fi - done + # Even if only one device was found, user may chose 0 to rescan + while ! [ "${topair}" ]; do + prompt="Select device to pair with [1" + [ ${#count} -gt 1 ] && prompt="${prompt}-${#count}" + read -p "${prompt}, or 0 to rescan]: " topair + if ! [ "${topair}" -ge 0 -a "${topair}" -le "${#count}" ] \ + 2>/dev/null ; then + printf "Value out of range: %s.\n" {topair} + unset topair + fi + done - [ "${topair}" -eq "0" ] && unset bdaddresses retry + [ "${topair}" -eq "0" ] && unset bdaddresses retry done eval bdaddress=\${bdaddress_${topair}} @@ -156,20 +165,24 @@ eval friendlyname=\${friendlyname_${topair}} # Do we need to add an entry to /etc/bluetooth/hosts? if ! [ "${bdname}" ]; then - printf "\nAdding device ${bdaddress} to /etc/bluetooth/hosts.\n" + printf "\nAdding device ${bdaddress} to /etc/bluetooth/hosts.\n" - while ! [ "${bdname}" ]; do - read -p "Enter friendly name. [${friendlyname}]: " REPLY - : ${REPLY:="${friendlyname}"} + while ! [ "${bdname}" ]; do + read -p "Enter friendly name. [${friendlyname}]: " _r + : ${_r:="${friendlyname}"} - if [ "${REPLY}" ]; then - # Remove white space and non-friendly characters - bdname=$( printf "%s" "${REPLY}" | tr -c '[:alnum:]-,.' _ ) - [ "${REPLY}" != "${bdname}" ] && printf "Notice: Using sanitized name \"%s\" in /etc/bluetooth/hosts.\n" "${bdname}" - fi - done + if [ "${_r}" ]; then + # Remove white space and non-friendly characters + bdname=$( printf "%s" "${_r}" | tr -c '[:alnum:]-,.' _ ) + if [ "${_r}" != "${bdname}" ]; then + printf "Notice: Using sanitized name" + printf "\"%s\" in /etc/bluetooth/hosts.\n" \ + "${bdname}" + fi + fi + done - printf "%s\t%s\n" "${bdaddress}" "${bdname}" >> /etc/bluetooth/hosts + printf "%s\t%s\n" "${bdaddress}" "${bdname}" >> /etc/bluetooth/hosts fi # If scanning for the name did not succeed, resort to bdname @@ -183,86 +196,109 @@ fi # Also we cannot really modify the PIN in an existing entry. So we # need to prompt the user to manually do it and restart this script if ! /usr/sbin/service hcsecd enabled; then - printf "\nWarning: hcsecd is not enabled.\nThis daemon manages pairing requests.\n" - read -p "Enable hcsecd? [yes]: " REPLY - case "${REPLY}" in no|n|NO|N|No|nO) ;; *) /usr/sbin/sysrc hcsecd_enable="YES";; esac + printf "\nWarning: hcsecd is not enabled.\n" + printf "This daemon manages pairing requests.\n" + read -p "Enable hcsecd? [yes]: " _r + case "${_r}" in + no|n|NO|N|No|nO) ;; + *) /usr/sbin/service hcsecd enable;; + esac fi + secd_config=$( /usr/sbin/sysrc -n hcsecd_config ) -secd_entries=$( /usr/bin/grep -Eo "bdaddr[[:space:]]+(${bdaddress}|${bdname})" ${secd_config} | awk '{ print $2; }' ) +secd_entries=$( /usr/bin/grep -Eo "bdaddr[[:space:]]+(${bdaddress}|${bdname})" \ + ${secd_config} | awk '{ print $2; }' ) if [ "${secd_entries}" ]; then - printf "\nWarning: An entry for device %s is already present in %s.\n" ${secd_entries} ${secd_config} - printf "To modify pairing information, edit this file and run\n service hcsecd restart\n" - read -p "Continue? [yes]: " REPLY - case "${REPLY}" in no|n|NO|N|No|nO) exit;; esac + printf "\nWarning: An entry for device %s is already present in %s.\n" \ + ${secd_entries} ${secd_config} + printf "To modify pairing information, edit this file and run\n" + printf " service hcsecd restart\n" + read -p "Continue? [yes]: " _r + case "${_r}" in no|n|NO|N|No|nO) exit;; esac else - printf "\nWriting pairing information description block to %s.\n" ${secd_config} - printf "(To get PIN, put device in pairing mode first.)\n" - read -p "Enter PIN [nopin]: " pin - [ "${pin}" ] && pin=\""${pin}"\" || pin="nopin" + printf "\nWriting pairing information description block to %s.\n" \ + ${secd_config} + printf "(To get PIN, put device in pairing mode first.)\n" + read -p "Enter PIN [nopin]: " pin + [ "${pin}" ] && pin=\""${pin}"\" || pin="nopin" - # Write out new hcsecd config block - printf "\ndevice {\n\tbdaddr\t%s;\n\tname\t\"%s\";\n\tkey\tnokey\;\n\tpin\t%s\;\n}\n" \ - "${bdaddress}" "${friendlyname}" "${pin}" >> ${secd_config} + # Write out new hcsecd config block + printf "\ndevice {\n\tbdaddr\t%s;\n\tname\t\"%s\";\n\tkey\tnokey\;\n\tpin\t%s\;\n}\n" \ + "${bdaddress}" "${friendlyname}" "${pin}" >> ${secd_config} - # ... and make daemon reload config, TODO: hcsecd should provide a reload hook - /usr/sbin/service hcsecd restart + # ... and make daemon reload config + # TODO: hcsecd should provide a reload hook + /usr/sbin/service hcsecd onerestart - # TODO: we should check if hcsecd succeeded pairing and revert to an old version - # of hcsecd.conf so we can undo adding the block above and retry with a new PIN - # also, if there's a way to force devices to re-pair, try this + # TODO: we should check if hcsecd succeeded pairing and revert to an + # old version of hcsecd.conf so we can undo adding the block above and + # retry with a new PIN + # also, if there's a way to force devices to re-pair, try this fi # now check for specific services to be provided by the device # first up: HID -if /usr/sbin/sdpcontrol -a "${bdaddress}" search HID | \ - /usr/bin/grep -q "^Record Handle: "; then +/usr/sbin/sdpcontrol -a "${bdaddress}" search HID | \ + /usr/bin/grep -q "^Record Handle: " || exit 0 - printf "\nThis device provides human interface device services.\n" - read -p "Set it up? [yes]: " REPLY - case "${REPLY}" in no|n|NO|N|No|nO) ;; - *) - if ! /usr/sbin/service bthidd enabled; then - printf "\nWarning: bthidd is not enabled." - printf "\nThis daemon manages Bluetooth HID devices.\n" - read -p "Enable bthidd? [yes]: " REPLY - case "${REPLY}" in no|n|NO|N|No|nO) ;; *) /usr/sbin/sysrc bthidd_enable="YES";; esac - fi +printf "\nThis device provides human interface device services.\n" +read -p "Set it up? [yes]: " _r +case "${_r}" in + no|n|NO|N|No|nO) exit 0;; + *);; +esac - # Check if bthidd already knows about this device - bthidd_known=$( /usr/sbin/bthidcontrol -a "${bdaddress}" known | \ - /usr/bin/grep "${bdaddress}" ) - if [ "${bthidd_known}" ]; then - printf "Notice: Device %s already known to bthidd.\n" "${bdaddress}" - else - bthidd_config=$( /usr/sbin/sysrc -n bthidd_config ) - printf "Writing HID descriptor block to %s ... " "${bthidd_config}" - /usr/sbin/bthidcontrol -a "${bdaddress}" query >> "${bthidd_config}" +# Here we have found an HID and were asked to set it up +# NOTE: look out for the two exit 0 above if you extend this script - # Re-read config to see if we succeeded adding the device - bthidd_known=$( /usr/sbin/bthidcontrol -a "${bdaddress}" known | \ - grep "${bdaddress}" ) - if ! [ "${bthidd_known}" ]; then - printf "failed.\n" - else - printf "success.\nTo re-read its config, bthidd must be restarted.\n" - printf "Warning: If a Bluetooth keyboard is being used, the connection might be lost.\n" - printf "It can be manually restarted later with\n service bthidd restart\n" - read -p "Restart bthidd now? [yes]: " REPLY - case "${REPLY}" in no|n|NO|N|No|nO) ;; *) /usr/sbin/service bthidd restart;; esac - fi - fi - ;; - esac +if ! /usr/sbin/service bthidd enabled; then + printf "\nWarning: bthidd is not enabled." + printf "\nThis daemon manages Bluetooth HID devices.\n" + read -p "Enable bthidd? [yes]: " _r + case "${_r}" in + no|n|NO|N|No|nO) ;; + *) /usr/sbin/service bthidd enable;; + esac fi +# Check if bthidd already knows about this device +bthidd_known=$( /usr/sbin/bthidcontrol -a "${bdaddress}" known | \ + /usr/bin/grep "${bdaddress}" ) + +if [ "${bthidd_known}" ]; then + printf "Notice: Device %s already known to bthidd.\n" "${bdaddress}" + return 0 +fi + +bthidd_config=$( /usr/sbin/sysrc -n bthidd_config ) +printf "Writing HID descriptor block to %s ... " "${bthidd_config}" +/usr/sbin/bthidcontrol -a "${bdaddress}" query >> "${bthidd_config}" + +# Re-read config to see if we succeeded adding the device +bthidd_known=$( /usr/sbin/bthidcontrol -a "${bdaddress}" known | \ + grep "${bdaddress}" ) +if ! [ "${bthidd_known}" ]; then + printf "failed.\n" +else + printf "success.\nTo re-read its config, bthidd must be restarted.\n" + printf "Warning: If a Bluetooth keyboard is being used, the connection" + printf "might be lost.\n" + printf "It can be manually restarted later with\n" + printf " service bthidd restart\n" + read -p "Restart bthidd now? [yes]: " _r + case "${_r}" in + no|n|NO|N|No|nO) ;; + *) /usr/sbin/service bthidd onerestart;; + esac +fi + } # After function definitions, main() can use them main "$@" - -exit +exit 0 # TODO # * If device is a keyboard, offer a text entry test field and if it does From owner-svn-src-all@freebsd.org Mon Jan 14 09:54:54 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id A0DDC149A374; Mon, 14 Jan 2019 09:54:54 +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 4462F811B1; Mon, 14 Jan 2019 09:54:54 +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 3705C11C6; Mon, 14 Jan 2019 09:54:54 +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 x0E9ssYN043438; Mon, 14 Jan 2019 09:54:54 GMT (envelope-from eugen@FreeBSD.org) Received: (from eugen@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x0E9sson043437; Mon, 14 Jan 2019 09:54:54 GMT (envelope-from eugen@FreeBSD.org) Message-Id: <201901140954.x0E9sson043437@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: eugen set sender to eugen@FreeBSD.org using -f From: Eugene Grosbein Date: Mon, 14 Jan 2019 09:54: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: r343021 - stable/12/sys/netgraph X-SVN-Group: stable-12 X-SVN-Commit-Author: eugen X-SVN-Commit-Paths: stable/12/sys/netgraph X-SVN-Commit-Revision: 343021 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 4462F811B1 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.95 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_LONG(-1.00)[-0.999,0]; NEURAL_HAM_SHORT(-0.95)[-0.948,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 14 Jan 2019 09:54:54 -0000 Author: eugen Date: Mon Jan 14 09:54:53 2019 New Revision: 343021 URL: https://svnweb.freebsd.org/changeset/base/343021 Log: MFC r340617,341006: unbreak ng_source(4) for 64-bit platforms Modified: stable/12/sys/netgraph/ng_source.c Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/netgraph/ng_source.c ============================================================================== --- stable/12/sys/netgraph/ng_source.c Mon Jan 14 08:23:47 2019 (r343020) +++ stable/12/sys/netgraph/ng_source.c Mon Jan 14 09:54:53 2019 (r343021) @@ -125,8 +125,16 @@ static int ng_source_dup_mod(sc_p, struct mbuf *, /* Parse type for timeval */ static const struct ng_parse_struct_field ng_source_timeval_type_fields[] = { +#ifdef __i386__ { "tv_sec", &ng_parse_int32_type }, +#else + { "tv_sec", &ng_parse_int64_type }, +#endif +#ifdef __LP64__ + { "tv_usec", &ng_parse_int64_type }, +#else { "tv_usec", &ng_parse_int32_type }, +#endif { NULL } }; const struct ng_parse_type ng_source_timeval_type = { From owner-svn-src-all@freebsd.org Mon Jan 14 09:57:37 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 76B39149A46D; Mon, 14 Jan 2019 09:57:37 +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 1C4BA8136E; Mon, 14 Jan 2019 09:57:37 +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 0DAFA11CA; Mon, 14 Jan 2019 09:57:37 +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 x0E9vaT4043622; Mon, 14 Jan 2019 09:57:36 GMT (envelope-from eugen@FreeBSD.org) Received: (from eugen@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x0E9vaHa043621; Mon, 14 Jan 2019 09:57:36 GMT (envelope-from eugen@FreeBSD.org) Message-Id: <201901140957.x0E9vaHa043621@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: eugen set sender to eugen@FreeBSD.org using -f From: Eugene Grosbein Date: Mon, 14 Jan 2019 09:57:36 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r343022 - stable/11/sys/netgraph X-SVN-Group: stable-11 X-SVN-Commit-Author: eugen X-SVN-Commit-Paths: stable/11/sys/netgraph X-SVN-Commit-Revision: 343022 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 1C4BA8136E X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.95 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_SHORT(-0.95)[-0.948,0]; NEURAL_HAM_LONG(-1.00)[-0.999,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 14 Jan 2019 09:57:37 -0000 Author: eugen Date: Mon Jan 14 09:57:36 2019 New Revision: 343022 URL: https://svnweb.freebsd.org/changeset/base/343022 Log: MFC r340617,341006: unbreak ng_source(4) for 64-bit platforms Modified: stable/11/sys/netgraph/ng_source.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/netgraph/ng_source.c ============================================================================== --- stable/11/sys/netgraph/ng_source.c Mon Jan 14 09:54:53 2019 (r343021) +++ stable/11/sys/netgraph/ng_source.c Mon Jan 14 09:57:36 2019 (r343022) @@ -125,8 +125,16 @@ static int ng_source_dup_mod(sc_p, struct mbuf *, /* Parse type for timeval */ static const struct ng_parse_struct_field ng_source_timeval_type_fields[] = { +#ifdef __i386__ { "tv_sec", &ng_parse_int32_type }, +#else + { "tv_sec", &ng_parse_int64_type }, +#endif +#ifdef __LP64__ + { "tv_usec", &ng_parse_int64_type }, +#else { "tv_usec", &ng_parse_int32_type }, +#endif { NULL } }; const struct ng_parse_type ng_source_timeval_type = { From owner-svn-src-all@freebsd.org Mon Jan 14 15:48:43 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id B39D114A39A6; Mon, 14 Jan 2019 15:48:43 +0000 (UTC) (envelope-from pfg@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 523B28EA07; Mon, 14 Jan 2019 15:48:43 +0000 (UTC) (envelope-from pfg@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id D064F4F8E; Mon, 14 Jan 2019 15:48:35 +0000 (UTC) (envelope-from pfg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x0EFmZIV032917; Mon, 14 Jan 2019 15:48:35 GMT (envelope-from pfg@FreeBSD.org) Received: (from pfg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x0EFmZRO032916; Mon, 14 Jan 2019 15:48:35 GMT (envelope-from pfg@FreeBSD.org) Message-Id: <201901141548.x0EFmZRO032916@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: pfg set sender to pfg@FreeBSD.org using -f From: "Pedro F. Giffuni" Date: Mon, 14 Jan 2019 15:48:35 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r343023 - head/lib/msun/src X-SVN-Group: head X-SVN-Commit-Author: pfg X-SVN-Commit-Paths: head/lib/msun/src X-SVN-Commit-Revision: 343023 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 523B28EA07 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.95 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_SHORT(-0.96)[-0.956,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_LONG(-1.00)[-0.999,0] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 14 Jan 2019 15:48:44 -0000 Author: pfg Date: Mon Jan 14 15:48:35 2019 New Revision: 343023 URL: https://svnweb.freebsd.org/changeset/base/343023 Log: msun: reduce diff between src/e_j0.c and src/e_j0f.c PR: 229501 MFC after: 1 week Modified: head/lib/msun/src/e_j0.c head/lib/msun/src/e_j0f.c Modified: head/lib/msun/src/e_j0.c ============================================================================== --- head/lib/msun/src/e_j0.c Mon Jan 14 09:57:36 2019 (r343022) +++ head/lib/msun/src/e_j0.c Mon Jan 14 15:48:35 2019 (r343023) @@ -80,7 +80,7 @@ S02 = 1.16926784663337450260e-04, /* 0x3F1EA6D2, 0xD S03 = 5.13546550207318111446e-07, /* 0x3EA13B54, 0xCE84D5A9 */ S04 = 1.16614003333790000205e-09; /* 0x3E1408BC, 0xF4745D8F */ -static const double zero = 0.0; +static const double zero = 0, qrtr = 0.25; double __ieee754_j0(double x) @@ -97,7 +97,7 @@ __ieee754_j0(double x) c = cos(x); ss = s-c; cc = s+c; - if(ix<0x7fe00000) { /* make sure x+x not overflow */ + if(ix<0x7fe00000) { /* Make sure x+x does not overflow. */ z = -cos(x+x); if ((s*c) Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 9D99814A495B; Mon, 14 Jan 2019 16:18:07 +0000 (UTC) (envelope-from freebsd@pdx.rh.CN85.dnsmgr.net) Received: from pdx.rh.CN85.dnsmgr.net (br1.CN84in.dnsmgr.net [69.59.192.140]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id DDFBD68233; Mon, 14 Jan 2019 16:18:06 +0000 (UTC) (envelope-from freebsd@pdx.rh.CN85.dnsmgr.net) Received: from pdx.rh.CN85.dnsmgr.net (localhost [127.0.0.1]) by pdx.rh.CN85.dnsmgr.net (8.13.3/8.13.3) with ESMTP id x0EGHwqx035749; Mon, 14 Jan 2019 08:17:58 -0800 (PST) (envelope-from freebsd@pdx.rh.CN85.dnsmgr.net) Received: (from freebsd@localhost) by pdx.rh.CN85.dnsmgr.net (8.13.3/8.13.3/Submit) id x0EGHwqQ035748; Mon, 14 Jan 2019 08:17:58 -0800 (PST) (envelope-from freebsd) From: "Rodney W. Grimes" Message-Id: <201901141617.x0EGHwqQ035748@pdx.rh.CN85.dnsmgr.net> Subject: Re: svn commit: r343011 - in head/kerberos5: lib/libasn1 lib/libgssapi_krb5 lib/libhdb lib/libheimntlm lib/libhx509 lib/libkadm5clnt lib/libkadm5srv lib/libkdc lib/libkrb5 lib/libwind libexec/digest-se... In-Reply-To: <201901140634.x0E6YscN038873@repo.freebsd.org> To: Takahashi Yoshihiro Date: Mon, 14 Jan 2019 08:17:58 -0800 (PST) CC: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Reply-To: rgrimes@freebsd.org X-Mailer: ELM [version 2.4ME+ PL121h (25)] MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=US-ASCII X-Rspamd-Queue-Id: DDFBD68233 X-Spamd-Bar: ------ Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-6.92 / 15.00]; NEURAL_HAM_MEDIUM(-1.00)[-1.000,0]; NEURAL_HAM_SHORT(-0.92)[-0.923,0]; REPLY(-4.00)[]; NEURAL_HAM_LONG(-1.00)[-1.000,0] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 14 Jan 2019 16:18:08 -0000 > Author: nyan > Date: Mon Jan 14 06:34:54 2019 > New Revision: 343011 > URL: https://svnweb.freebsd.org/changeset/base/343011 > > Log: > Use ${SRCTOP}/contrib/com_err/com_err.h instead of the installed com_err.h. > This fixes build when com_err.h is not installed. Isn't this the general state of affairs for almost all of the source tree? I would rather see this solved in a general way, rather than sprinkly all this -I${SRCTOP} all over in the tree. It use to be (and maybe still is) required that you run cd $DRCTOP && make includes if you expected new source code to compile. I expect this has changed, but the just of it should work in some aspect. Thanks, Rod > > PR: 234691 > MFC after: 1 week > > Modified: > head/kerberos5/lib/libasn1/Makefile > head/kerberos5/lib/libgssapi_krb5/Makefile > head/kerberos5/lib/libhdb/Makefile > head/kerberos5/lib/libheimntlm/Makefile > head/kerberos5/lib/libhx509/Makefile > head/kerberos5/lib/libkadm5clnt/Makefile > head/kerberos5/lib/libkadm5srv/Makefile > head/kerberos5/lib/libkdc/Makefile > head/kerberos5/lib/libkrb5/Makefile > head/kerberos5/lib/libwind/Makefile > head/kerberos5/libexec/digest-service/Makefile > head/kerberos5/libexec/hprop/Makefile > head/kerberos5/libexec/hpropd/Makefile > head/kerberos5/libexec/kadmind/Makefile > head/kerberos5/libexec/kdc/Makefile > head/kerberos5/usr.bin/hxtool/Makefile > head/kerberos5/usr.bin/kadmin/Makefile > head/kerberos5/usr.bin/string2key/Makefile > head/kerberos5/usr.bin/verify_krb5_conf/Makefile > head/kerberos5/usr.sbin/kstash/Makefile > > Modified: head/kerberos5/lib/libasn1/Makefile > ============================================================================== > --- head/kerberos5/lib/libasn1/Makefile Mon Jan 14 03:19:08 2019 (r343010) > +++ head/kerberos5/lib/libasn1/Makefile Mon Jan 14 06:34:54 2019 (r343011) > @@ -21,7 +21,8 @@ SRCS= asn1_err.c \ > timegm.c \ > ${GEN:S/.x$/.c/:S/.hx$/.h/} > > -CFLAGS+=-I${KRB5DIR}/lib/asn1 -I${KRB5DIR}/lib/roken -I. > +CFLAGS+=-I${KRB5DIR}/lib/asn1 -I${KRB5DIR}/lib/roken \ > + -I${SRCTOP}/contrib/com_err -I. > > GEN_RFC2459= asn1_rfc2459_asn1.x rfc2459_asn1.hx rfc2459_asn1-priv.hx > GEN_CMS= asn1_cms_asn1.x cms_asn1.hx cms_asn1-priv.hx > > Modified: head/kerberos5/lib/libgssapi_krb5/Makefile > ============================================================================== > --- head/kerberos5/lib/libgssapi_krb5/Makefile Mon Jan 14 03:19:08 2019 (r343010) > +++ head/kerberos5/lib/libgssapi_krb5/Makefile Mon Jan 14 06:34:54 2019 (r343011) > @@ -78,7 +78,9 @@ CFLAGS+=-I${KRB5DIR}/lib/gssapi/krb5 > CFLAGS+=-I${KRB5DIR}/lib/gssapi/gssapi > CFLAGS+=-I${KRB5DIR}/lib/krb5 > CFLAGS+=-I${KRB5DIR}/lib/asn1 > -CFLAGS+=-I${KRB5DIR}/lib/roken -I. > +CFLAGS+=-I${KRB5DIR}/lib/roken > +CFLAGS+=-I${SRCTOP}/contrib/com_err > +CFLAGS+=-I. > > .include > > > Modified: head/kerberos5/lib/libhdb/Makefile > ============================================================================== > --- head/kerberos5/lib/libhdb/Makefile Mon Jan 14 03:19:08 2019 (r343010) > +++ head/kerberos5/lib/libhdb/Makefile Mon Jan 14 06:34:54 2019 (r343011) > @@ -59,6 +59,7 @@ SRCS= common.c \ > CFLAGS+=-I${KRB5DIR}/lib/hdb -I${KRB5DIR}/lib/asn1 \ > -I${KRB5DIR}/lib/roken -I${SRCTOP}/contrib/sqlite3/ \ > -I${KRB5DIR}/lib/krb5 \ > + -I${SRCTOP}/contrib/com_err \ > -I. ${LDAPCFLAGS} > CFLAGS+=-DHDB_DB_DIR="\"/var/heimdal\"" > > > Modified: head/kerberos5/lib/libheimntlm/Makefile > ============================================================================== > --- head/kerberos5/lib/libheimntlm/Makefile Mon Jan 14 03:19:08 2019 (r343010) > +++ head/kerberos5/lib/libheimntlm/Makefile Mon Jan 14 06:34:54 2019 (r343011) > @@ -5,7 +5,8 @@ LDFLAGS= -Wl,--no-undefined > LIBADD= crypto com_err krb5 roken > SRCS= ntlm.c ntlm_err.c ntlm_err.h > INCS= heimntlm.h heimntlm-protos.h ntlm_err.h > -CFLAGS+=-I${KRB5DIR}/lib/ntlm -I${KRB5DIR}/lib/roken > +CFLAGS+=-I${KRB5DIR}/lib/ntlm -I${KRB5DIR}/lib/roken \ > + -I${SRCTOP}/contrib/com_err > VERSION_MAP= ${KRB5DIR}/lib/ntlm/version-script.map > > MAN= ntlm_buf.3 \ > > Modified: head/kerberos5/lib/libhx509/Makefile > ============================================================================== > --- head/kerberos5/lib/libhx509/Makefile Mon Jan 14 03:19:08 2019 (r343010) > +++ head/kerberos5/lib/libhx509/Makefile Mon Jan 14 06:34:54 2019 (r343011) > @@ -211,7 +211,9 @@ CFLAGS+=-I${KRB5DIR}/lib/hx509 > CFLAGS+=-I${KRB5DIR}/lib/hx509/ref > CFLAGS+=-I${KRB5DIR}/lib/asn1 > CFLAGS+=-I${KRB5DIR}/lib/wind > -CFLAGS+=-I${KRB5DIR}/lib/roken -I. > +CFLAGS+=-I${KRB5DIR}/lib/roken > +CFLAGS+=-I${SRCTOP}/contrib/com_err > +CFLAGS+=-I. > > GEN_OCSP= \ > asn1_OCSPBasicOCSPResponse.x \ > > Modified: head/kerberos5/lib/libkadm5clnt/Makefile > ============================================================================== > --- head/kerberos5/lib/libkadm5clnt/Makefile Mon Jan 14 03:19:08 2019 (r343010) > +++ head/kerberos5/lib/libkadm5clnt/Makefile Mon Jan 14 06:34:54 2019 (r343011) > @@ -34,7 +34,8 @@ SRCS= ad.c \ > rename_c.c \ > send_recv.c > > -CFLAGS+=-I${KRB5DIR}/lib/kadm5 -I${KRB5DIR}/lib/asn1 -I${KRB5DIR}/lib/roken -I. > +CFLAGS+=-I${KRB5DIR}/lib/kadm5 -I${KRB5DIR}/lib/asn1 -I${KRB5DIR}/lib/roken \ > + -I${SRCTOP}/contrib/com_err -I. > > .include > > > Modified: head/kerberos5/lib/libkadm5srv/Makefile > ============================================================================== > --- head/kerberos5/lib/libkadm5srv/Makefile Mon Jan 14 03:19:08 2019 (r343010) > +++ head/kerberos5/lib/libkadm5srv/Makefile Mon Jan 14 06:34:54 2019 (r343011) > @@ -35,7 +35,8 @@ SRCS= acl.c \ > set_keys.c \ > set_modifier.c > > -CFLAGS+=-I${KRB5DIR}/lib/kadm5 -I${KRB5DIR}/lib/asn1 -I${KRB5DIR}/lib/roken -I. > +CFLAGS+=-I${KRB5DIR}/lib/kadm5 -I${KRB5DIR}/lib/asn1 -I${KRB5DIR}/lib/roken \ > + -I${SRCTOP}/contrib/com_err -I. > > .include > > > Modified: head/kerberos5/lib/libkdc/Makefile > ============================================================================== > --- head/kerberos5/lib/libkdc/Makefile Mon Jan 14 03:19:08 2019 (r343010) > +++ head/kerberos5/lib/libkdc/Makefile Mon Jan 14 06:34:54 2019 (r343011) > @@ -28,7 +28,8 @@ SRCS= \ > CFLAGS+= -I${KRB5DIR}/lib/roken \ > -I${KRB5DIR}/lib/krb5 \ > -I${KRB5DIR}/lib/hdb \ > - -I${KRB5DIR}/kdc > + -I${KRB5DIR}/kdc \ > + -I${SRCTOP}/contrib/com_err > > .include > > > Modified: head/kerberos5/lib/libkrb5/Makefile > ============================================================================== > --- head/kerberos5/lib/libkrb5/Makefile Mon Jan 14 03:19:08 2019 (r343010) > +++ head/kerberos5/lib/libkrb5/Makefile Mon Jan 14 06:34:54 2019 (r343011) > @@ -621,7 +621,9 @@ CFLAGS+= -I${KRB5DIR}/lib/krb5 \ > -I${KRB5DIR}/lib/asn1 \ > -I${KRB5DIR}/lib/roken \ > -I${KRB5DIR}/lib/ipc \ > - -I${KRB5DIR}/base -I. > + -I${KRB5DIR}/base \ > + -I${SRCTOP}/contrib/com_err \ > + -I. > > .include > > > Modified: head/kerberos5/lib/libwind/Makefile > ============================================================================== > --- head/kerberos5/lib/libwind/Makefile Mon Jan 14 03:19:08 2019 (r343010) > +++ head/kerberos5/lib/libwind/Makefile Mon Jan 14 06:34:54 2019 (r343011) > @@ -27,7 +27,7 @@ SRCS= bidi.c \ > SRCS+= wind_err.c \ > wind_err.h > > -CFLAGS+=-I${KRB5DIR}/lib/roken -I. > +CFLAGS+=-I${KRB5DIR}/lib/roken -I${SRCTOP}/contrib/com_err -I. > > .include > > > Modified: head/kerberos5/libexec/digest-service/Makefile > ============================================================================== > --- head/kerberos5/libexec/digest-service/Makefile Mon Jan 14 03:19:08 2019 (r343010) > +++ head/kerberos5/libexec/digest-service/Makefile Mon Jan 14 06:34:54 2019 (r343011) > @@ -7,7 +7,8 @@ CFLAGS+= -I${KRB5DIR}/kdc \ > -I${KRB5DIR}/lib/krb5 \ > -I${KRB5DIR}/lib/ipc \ > -I${KRB5DIR}/lib/wind \ > - -I${KRB5DIR}/lib/roken > + -I${KRB5DIR}/lib/roken \ > + -I${SRCTOP}/contrib/com_err > LIBADD= hdb kdc heimipcs krb5 roken asn1 crypto vers heimntlm > LDFLAGS=${LDAPLDFLAGS} > > > Modified: head/kerberos5/libexec/hprop/Makefile > ============================================================================== > --- head/kerberos5/libexec/hprop/Makefile Mon Jan 14 03:19:08 2019 (r343010) > +++ head/kerberos5/libexec/hprop/Makefile Mon Jan 14 06:34:54 2019 (r343011) > @@ -9,6 +9,7 @@ CFLAGS+=-I${KRB5DIR}/lib/asn1 > CFLAGS+=-I${KRB5DIR}/lib/hx509 > CFLAGS+=-I${KRB5DIR}/lib/ntlm > CFLAGS+=-I${KRB5DIR}/kdc > +CFLAGS+=-I${SRCTOP}/contrib/com_err > CFLAGS+=-I${.OBJDIR:H:H}/lib/libkrb5 > LIBADD= hdb krb5 roken vers > DPADD= ${LDAPDPADD} > > Modified: head/kerberos5/libexec/hpropd/Makefile > ============================================================================== > --- head/kerberos5/libexec/hpropd/Makefile Mon Jan 14 03:19:08 2019 (r343010) > +++ head/kerberos5/libexec/hpropd/Makefile Mon Jan 14 06:34:54 2019 (r343011) > @@ -3,7 +3,7 @@ > PROG= hpropd > MAN= hpropd.8 > CFLAGS+=-I${KRB5DIR}/lib/roken -I${KRB5DIR}/lib/krb5 -I${KRB5DIR}/lib/asn1 \ > - -I${KRB5DIR}/kdc ${LDAPCFLAGS} > + -I${KRB5DIR}/kdc -I${SRCTOP}/contrib/com_err ${LDAPCFLAGS} > LIBADD= hdb krb5 roken vers > DPADD= ${LDAPDPADD} > LDADD= ${LDAPLDADD} > > Modified: head/kerberos5/libexec/kadmind/Makefile > ============================================================================== > --- head/kerberos5/libexec/kadmind/Makefile Mon Jan 14 03:19:08 2019 (r343010) > +++ head/kerberos5/libexec/kadmind/Makefile Mon Jan 14 06:34:54 2019 (r343011) > @@ -8,7 +8,7 @@ SRCS= rpc.c \ > kadm_conn.c > > CFLAGS+=-I${KRB5DIR}/lib/krb5 -I${KRB5DIR}/lib/asn1 -I${KRB5DIR}/lib/roken \ > - ${LDAPCFLAGS} > + -I${SRCTOP}/contrib/com_err ${LDAPCFLAGS} > LIBADD= kadm5srv gssapi hdb krb5 roken vers > DPADD= ${LDAPDPADD} > LDADD= ${LDAPLDADD} > > Modified: head/kerberos5/libexec/kdc/Makefile > ============================================================================== > --- head/kerberos5/libexec/kdc/Makefile Mon Jan 14 03:19:08 2019 (r343010) > +++ head/kerberos5/libexec/kdc/Makefile Mon Jan 14 06:34:54 2019 (r343011) > @@ -9,7 +9,7 @@ SRCS= config.c \ > main.c > > CFLAGS+=-I${KRB5DIR}/lib/krb5 -I${KRB5DIR}/lib/asn1 -I${KRB5DIR}/lib/roken \ > - -I${KRB5DIR}/kdc ${LDAPCFLAGS} > + -I${KRB5DIR}/kdc -I${SRCTOP}/contrib/com_err ${LDAPCFLAGS} > LIBADD= kdc hdb krb5 roken crypt vers > LDFLAGS=${LDAPLDFLAGS} > > > Modified: head/kerberos5/usr.bin/hxtool/Makefile > ============================================================================== > --- head/kerberos5/usr.bin/hxtool/Makefile Mon Jan 14 03:19:08 2019 (r343010) > +++ head/kerberos5/usr.bin/hxtool/Makefile Mon Jan 14 06:34:54 2019 (r343011) > @@ -5,7 +5,9 @@ MAN= > CFLAGS+= -I${KRB5DIR}/lib/hx509 \ > -I${KRB5DIR}/lib/asn1 \ > -I${KRB5DIR}/lib/roken \ > - -I${KRB5DIR}/lib/sl -I. > + -I${KRB5DIR}/lib/sl \ > + -I${SRCTOP}/contrib/com_err \ > + -I. > LIBADD= hx509 roken asn1 crypto sl vers edit > SRCS= hxtool.c hxtool-commands.c hxtool-commands.h > > > Modified: head/kerberos5/usr.bin/kadmin/Makefile > ============================================================================== > --- head/kerberos5/usr.bin/kadmin/Makefile Mon Jan 14 03:19:08 2019 (r343010) > +++ head/kerberos5/usr.bin/kadmin/Makefile Mon Jan 14 06:34:54 2019 (r343011) > @@ -25,7 +25,7 @@ SRCS= add_enctype.c \ > util.c > > CFLAGS+=-I${KRB5DIR}/lib/asn1 -I${KRB5DIR}/lib/krb5 -I${KRB5DIR}/lib/roken \ > - -I${KRB5DIR}/lib/sl -I. ${LDAPCFLAGS} > + -I${KRB5DIR}/lib/sl -I${SRCTOP}/contrib/com_err -I. ${LDAPCFLAGS} > LIBADD= kadm5clnt kadm5srv hdb krb5 roken vers sl asn1 crypto edit > DPADD= ${LDAPDPADD} > LDADD= ${LDAPLDADD} > > Modified: head/kerberos5/usr.bin/string2key/Makefile > ============================================================================== > --- head/kerberos5/usr.bin/string2key/Makefile Mon Jan 14 03:19:08 2019 (r343010) > +++ head/kerberos5/usr.bin/string2key/Makefile Mon Jan 14 06:34:54 2019 (r343011) > @@ -6,7 +6,8 @@ CFLAGS+= -I${KRB5DIR}/kdc \ > -I${KRB5DIR}/lib/asn1 \ > -I${KRB5DIR}/lib/krb5 \ > -I${KRB5DIR}/lib/roken \ > - -I${KRB5DIR}/lib/windc > + -I${KRB5DIR}/lib/windc \ > + -I${SRCTOP}/contrib/com_err > LIBADD= krb5 roken crypto vers > > .include > > Modified: head/kerberos5/usr.bin/verify_krb5_conf/Makefile > ============================================================================== > --- head/kerberos5/usr.bin/verify_krb5_conf/Makefile Mon Jan 14 03:19:08 2019 (r343010) > +++ head/kerberos5/usr.bin/verify_krb5_conf/Makefile Mon Jan 14 06:34:54 2019 (r343011) > @@ -2,7 +2,8 @@ > > PROG= verify_krb5_conf > MAN= verify_krb5_conf.8 > -CFLAGS+=-I${KRB5DIR}/lib/asn1 -I${KRB5DIR}/lib/krb5 -I${KRB5DIR}/lib/roken > +CFLAGS+=-I${KRB5DIR}/lib/asn1 -I${KRB5DIR}/lib/krb5 -I${KRB5DIR}/lib/roken \ > + -I${SRCTOP}/contrib/com_err > LIBADD= krb5 roken vers > > .include > > Modified: head/kerberos5/usr.sbin/kstash/Makefile > ============================================================================== > --- head/kerberos5/usr.sbin/kstash/Makefile Mon Jan 14 03:19:08 2019 (r343010) > +++ head/kerberos5/usr.sbin/kstash/Makefile Mon Jan 14 06:34:54 2019 (r343011) > @@ -3,7 +3,7 @@ > PROG= kstash > MAN= kstash.8 > CFLAGS+=-I${KRB5DIR}/lib/asn1 -I${KRB5DIR}/lib/krb5 -I${KRB5DIR}/lib/roken \ > - -I${KRB5DIR}/kdc ${LDAPCFLAGS} > + -I${KRB5DIR}/kdc -I${SRCTOP}/contrib/com_err ${LDAPCFLAGS} > LIBADD= hdb krb5 crypto vers > DPADD= ${LDAPDPADD} > LDADD= ${LDAPLDADD} > > -- Rod Grimes rgrimes@freebsd.org From owner-svn-src-all@freebsd.org Mon Jan 14 16:32:19 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 3F9CA14A5203; Mon, 14 Jan 2019 16:32:19 +0000 (UTC) (envelope-from freebsd@pdx.rh.CN85.dnsmgr.net) Received: from pdx.rh.CN85.dnsmgr.net (br1.CN84in.dnsmgr.net [69.59.192.140]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 891A86A57F; Mon, 14 Jan 2019 16:32:18 +0000 (UTC) (envelope-from freebsd@pdx.rh.CN85.dnsmgr.net) Received: from pdx.rh.CN85.dnsmgr.net (localhost [127.0.0.1]) by pdx.rh.CN85.dnsmgr.net (8.13.3/8.13.3) with ESMTP id x0EGWFGP035794; Mon, 14 Jan 2019 08:32:15 -0800 (PST) (envelope-from freebsd@pdx.rh.CN85.dnsmgr.net) Received: (from freebsd@localhost) by pdx.rh.CN85.dnsmgr.net (8.13.3/8.13.3/Submit) id x0EGWFud035793; Mon, 14 Jan 2019 08:32:15 -0800 (PST) (envelope-from freebsd) From: "Rodney W. Grimes" Message-Id: <201901141632.x0EGWFud035793@pdx.rh.CN85.dnsmgr.net> Subject: Re: svn commit: r343020 - head/usr.sbin/bluetooth/bluetooth-config In-Reply-To: <201901140823.x0E8Nmll096242@repo.freebsd.org> To: Lars Engels Date: Mon, 14 Jan 2019 08:32:15 -0800 (PST) CC: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Reply-To: rgrimes@freebsd.org X-Mailer: ELM [version 2.4ME+ PL121h (25)] MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=US-ASCII X-Rspamd-Queue-Id: 891A86A57F X-Spamd-Bar: ------ Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-6.93 / 15.00]; NEURAL_HAM_MEDIUM(-1.00)[-1.000,0]; NEURAL_HAM_SHORT(-0.93)[-0.925,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; REPLY(-4.00)[] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 14 Jan 2019 16:32:19 -0000 > Author: lme (ports committer) > Date: Mon Jan 14 08:23:47 2019 > New Revision: 343020 > URL: https://svnweb.freebsd.org/changeset/base/343020 > > Log: > This new version of bluetooth-config.sh tries to follow the style of other > shell scripts in base, removes the bogus "copyleft", adds the BeerWare license > header and uses rc.subr(8) new 'enable' keyword for adding entries in > rc.conf(5). > > Submitted by: erdgeist > Approved by: bapt > MFC after: 2 weeks > > Modified: > head/usr.sbin/bluetooth/bluetooth-config/bluetooth-config.sh > > Modified: head/usr.sbin/bluetooth/bluetooth-config/bluetooth-config.sh > ============================================================================== > --- head/usr.sbin/bluetooth/bluetooth-config/bluetooth-config.sh Mon Jan 14 07:54:11 2019 (r343019) > +++ head/usr.sbin/bluetooth/bluetooth-config/bluetooth-config.sh Mon Jan 14 08:23:47 2019 (r343020) > @@ -1,9 +1,12 @@ > #!/bin/sh > #- > -# Copyleft 2019 Dirk Engling > +# ---------------------------------------------------------------------------- > +# "THE BEER-WARE LICENSE" (Revision 42): > +# wrote this file. As long as you retain this notice you > +# can do whatever you want with this stuff. If we meet some day, and you think > +# this stuff is worth it, you can buy me a beer in return Poul-Henning Kamp > +# ---------------------------------------------------------------------------- Great step forward, but it needs a copyright, without one the Berne convention applies, and that just makes this a case of an undocumented copyright. I didnt think about that when you showed it with no copyright, there really should be one in every file to get out of that Berne "undocumented" state. Thanks, Rod > # > -# This script is released under the beerware license. > -# > # $FreeBSD$ > # > > @@ -11,8 +14,6 @@ > exerr () { echo -e "Error: $*" >&2 ; exit 1; } > print_syntax () { echo -e "Syntax: $0 scan [-d device] [-n node]"; exit 1; } > > -# Assuming we are called to do the pair-new-device subcommand first > - > main() { > unset node device started bdaddresses retry > > @@ -22,132 +23,140 @@ shift > > # Get command line options > while getopts :d:n: arg; do > - case ${arg} in > - d) device="$OPTARG";; > - n) node="$OPTARG";; > - ?) print_syntax;; > - esac > + case ${arg} in > + d) device="$OPTARG";; > + n) node="$OPTARG";; > + ?) print_syntax;; > + esac > done > > # No use running without super user rights > -[ $( id -u ) -eq 0 ] || exerr "$0 must modify files that belong to root. Re-run as root." > +if [ $( id -u ) -ne 0 ]; then > + exerr "$0 must modify files that belong to root. Re-run as root." > +fi > > -known_nodes=$(/usr/sbin/hccontrol read_node_list 2>/dev/null | \ > - /usr/bin/tail -n +2 | /usr/bin/cut -d ' ' -f 1) > +known_nodes=$( /usr/sbin/hccontrol read_node_list 2>/dev/null |\ > + /usr/bin/tail -n +2 | /usr/bin/cut -d ' ' -f 1 ) > > # Check if netgraph knows about any HCI nodes > if ! [ "${known_nodes}" ]; then > - ng_nodes=$(/usr/sbin/ngctl list 2>/dev/null | \ > - /usr/bin/grep -o "Name: .* Type: ubt" | /usr/bin/cut -d ' ' -f 2) > + ng_nodes=$( /usr/sbin/ngctl list 2>/dev/null | \ > + /usr/bin/grep -o "Name: .* Type: ubt" |/usr/bin/cut -d' ' -f2 ) > > - [ "${ng_nodes}" ] || exerr "No Bluetooth host controllers found." > + [ "${ng_nodes}" ] || exerr "No Bluetooth host controllers found." > > - unset found > - for n in ${ng_nodes}; do > - if [ "${n}" = "${node%hci}" ]; then > - # If we found the node but its stack is not set up, do it now > - /usr/sbin/service bluetooth start ${node%hci} || exit 1 > - found="YES" > - fi > - done > + unset found > + for n in ${ng_nodes}; do > + if [ "${n}" = "${node%hci}" ]; then > + # Found the node but its stack is not set up? Do it now. > + /usr/sbin/service bluetooth start ${node%hci} || exit 1 > + found="YES" > + fi > + done > > - # If we have Bluetooth controller nodes without a set up stack, > - # ask the user if we shall start it up > - if ! [ "${found}" ]; then > - printf "No usable Bluetooth host controllers were found.\n" > - printf "These host controllers exist in the system:\n %s" " ${ng_nodes}" > - read -p "Choose a host controller to set up: [${ng_nodes%% *}]" node > - : ${node:="${ng_nodes%% *}"} > - /usr/sbin/service bluetooth start ${node} || exit 1 > - fi > + # If we have Bluetooth controller nodes without a set up stack, > + # ask the user if we shall start it up > + if ! [ "${found}" ]; then > + printf "No usable Bluetooth host controllers were found.\n" > + printf "These host controllers exist in the system:\n" > + printf " %s\n" "${ng_nodes}" > + prompt="Choose a host controller to set up: [${ng_nodes%% *}]" > + read -p "${prompt}" node > + : ${node:="${ng_nodes%% *}"} > + /usr/sbin/service bluetooth start ${node} || exit 1 > + fi > > - # Re-read known nodes > - known_nodes=$(/usr/sbin/hccontrol read_node_list 2>/dev/null | \ > - /usr/bin/tail -n +2 | /usr/bin/cut -d ' ' -f 1) > - # check if we succeeded in bringing it up > - [ "${known_nodes}" ] || exerr "Failed to set up Bluetooth stack" > + # Re-read known nodes > + known_nodes=$(/usr/sbin/hccontrol read_node_list 2>/dev/null | > + /usr/bin/tail -n +2 | /usr/bin/cut -d ' ' -f 1 ) > + > + # check if we succeeded in bringing it up > + [ "${known_nodes}" ] || exerr "Failed to set up Bluetooth stack" > fi > > # if a node was requested on command line, check if it is there > if [ "${node}" ]; then > - unset found > - for n in ${known_nodes}; do > - [ "${n}" = "${node}" ] && found="YES" > - [ "${n}" = "${node}hci" ] && node="${node}hci" && found="YES" > - done > - [ "${found}" ] || exerr "Node ${node} not found" > + unset found > + for n in ${known_nodes}; do > + [ "${n}" = "${node}" ] && found="YES" > + [ "${n}" = "${node}hci" ] && node="${node}hci" && found="YES" > + done > + [ "${found}" ] || exerr "Node ${node} not found" > fi > > [ "${node}" ] && node="-n ${node}" > > while ! [ "${bdaddresses}" ]; do > - retry=X${retry} > - printf "Scanning for new Bluetooth devices (Attempt %d of 5) ... " ${#retry} > - bdaddresses=$( /usr/sbin/hccontrol -N ${node} inquiry 2>/dev/null | \ > - /usr/bin/grep -o "BD_ADDR: .*" | /usr/bin/cut -d ' ' -f 2 ) > + retry=X${retry} > + printf "Scanning for new Bluetooth devices (Attempt %d of 5) ... " \ > + ${#retry} > + bdaddresses=$( /usr/sbin/hccontrol -N ${node} inquiry 2>/dev/null | > + /usr/bin/grep -o "BD_ADDR: .*" | /usr/bin/cut -d ' ' -f 2 ) > > - # Count entries and, if a device was requested on command line, > - # try to find it > - unset found count > - for bdaddress in ${bdaddresses}; do > - count=X${count} > - if [ "${bdaddress}" = "${device}" ]; then > - found=YES > - bdaddresses="${device}" > - count=X > - break > - fi > - done > + # Count entries and, if a device was requested on command line, > + # try to find it > + unset found count > + for bdaddress in ${bdaddresses}; do > + count=X${count} > + if [ "${bdaddress}" = "${device}" ]; then > + found=YES > + bdaddresses="${device}" > + count=X > + break > + fi > + done > > - # If device was requested on command line but is not found, > - # or no devices found at all, rescan until retry is exhausted > - if ! [ "${found}" -o "${count}" -a -z "${device}" ]; then > - printf "failed.\n" > - if [ "${#retry}" -eq 5 ]; then > - [ "${device}" ] && exerr "Device ${device} not found" > - exerr "No new Bluetooth devices found" > - fi > - unset bdaddresses > - sleep 2 > - continue > - fi > + # If device was requested on command line but is not found, > + # or no devices found at all, rescan until retry is exhausted > + if ! [ "${found}" -o "${count}" -a -z "${device}" ]; then > + printf "failed.\n" > + if [ "${#retry}" -eq 5 ]; then > + [ "${device}" ] && exerr "Device ${device} not found" > + exerr "No new Bluetooth devices found" > + fi > + unset bdaddresses > + sleep 2 > + continue > + fi > > - [ ${#count} -gt 1 ] && plural=s || plural='' > - printf "done.\nFound %d new bluetooth device%s (scanning for names):\n" ${#count} ${plural} > + [ ${#count} -gt 1 ] && plural=s || plural='' > + printf "done.\nFound %d new bluetooth device%s " ${#count} ${plural} > + printf "(now scanning for names):\n" > > - # Looping again for the faster feedback > - unset count > - for bdaddress in ${bdaddresses}; do > - count=X${count} > - bdname=$( /usr/bin/bthost -b "${bdaddress}" 2>/dev/null ) > - friendlyname=$( /usr/sbin/hccontrol Remote_Name_Request ${bdaddress} 2> /dev/null | \ > - /usr/bin/grep -o "Name: .*" | /usr/bin/cut -d ' ' -f 2- ) > + # Looping again for the faster feedback > + unset count > + for bdaddress in ${bdaddresses}; do > + count=X${count} > + bdname=$( /usr/bin/bthost -b "${bdaddress}" 2>/dev/null ) > + friendlyname=$( /usr/sbin/hccontrol Remote_Name_Request \ > + ${bdaddress} 2> /dev/null | > + /usr/bin/grep -o "Name: .*" |/usr/bin/cut -d ' ' -f 2- ) > > - # sdpcontrol should be able to pull vendor and product id via sdp > - printf "[%2d] %s\t\"%s\" (%s)\n" ${#count} "${bdaddress}" "${friendlyname}" "${bdname}" > + # sdpcontrol should be able to pull vendor + product id via sdp > + printf "[%2d] %s\t\"%s\" (%s)\n" ${#count} "${bdaddress}" \ > + "${friendlyname}" "${bdname}" > > - eval bdaddress_${#count}=\${bdaddress} > - eval bdname_${#count}=\${bdname} > - eval friendlyname_${#count}=\${friendlyname} > - done > + eval bdaddress_${#count}=\${bdaddress} > + eval bdname_${#count}=\${bdname} > + eval friendlyname_${#count}=\${friendlyname} > + done > > - # If a device was pre-selected, do not query the user > - [ "${device}" ] && topair=1 || unset topair > + # If a device was pre-selected, do not query the user > + [ "${device}" ] && topair=1 || unset topair > > - # Even if only one device was found, user may chose 0 to rescan > - while ! [ "${topair}" ]; do > - if [ ${#count} -eq 1 ]; then > - read -p "Select device to pair with [1, or 0 to rescan]: " topair > - else > - read -p "Select device to pair with [1-${#count}, or 0 to rescan]: " topair > - fi > - if ! [ "${topair}" -ge 0 -a "${topair}" -le "${#count}" ] 2>/dev/null ; then > - printf "Value out of range: %s.\n" {topair} > - unset topair > - fi > - done > + # Even if only one device was found, user may chose 0 to rescan > + while ! [ "${topair}" ]; do > + prompt="Select device to pair with [1" > + [ ${#count} -gt 1 ] && prompt="${prompt}-${#count}" > + read -p "${prompt}, or 0 to rescan]: " topair > + if ! [ "${topair}" -ge 0 -a "${topair}" -le "${#count}" ] \ > + 2>/dev/null ; then > + printf "Value out of range: %s.\n" {topair} > + unset topair > + fi > + done > > - [ "${topair}" -eq "0" ] && unset bdaddresses retry > + [ "${topair}" -eq "0" ] && unset bdaddresses retry > done > > eval bdaddress=\${bdaddress_${topair}} > @@ -156,20 +165,24 @@ eval friendlyname=\${friendlyname_${topair}} > > # Do we need to add an entry to /etc/bluetooth/hosts? > if ! [ "${bdname}" ]; then > - printf "\nAdding device ${bdaddress} to /etc/bluetooth/hosts.\n" > + printf "\nAdding device ${bdaddress} to /etc/bluetooth/hosts.\n" > > - while ! [ "${bdname}" ]; do > - read -p "Enter friendly name. [${friendlyname}]: " REPLY > - : ${REPLY:="${friendlyname}"} > + while ! [ "${bdname}" ]; do > + read -p "Enter friendly name. [${friendlyname}]: " _r > + : ${_r:="${friendlyname}"} > > - if [ "${REPLY}" ]; then > - # Remove white space and non-friendly characters > - bdname=$( printf "%s" "${REPLY}" | tr -c '[:alnum:]-,.' _ ) > - [ "${REPLY}" != "${bdname}" ] && printf "Notice: Using sanitized name \"%s\" in /etc/bluetooth/hosts.\n" "${bdname}" > - fi > - done > + if [ "${_r}" ]; then > + # Remove white space and non-friendly characters > + bdname=$( printf "%s" "${_r}" | tr -c '[:alnum:]-,.' _ ) > + if [ "${_r}" != "${bdname}" ]; then > + printf "Notice: Using sanitized name" > + printf "\"%s\" in /etc/bluetooth/hosts.\n" \ > + "${bdname}" > + fi > + fi > + done > > - printf "%s\t%s\n" "${bdaddress}" "${bdname}" >> /etc/bluetooth/hosts > + printf "%s\t%s\n" "${bdaddress}" "${bdname}" >> /etc/bluetooth/hosts > fi > > # If scanning for the name did not succeed, resort to bdname > @@ -183,86 +196,109 @@ fi > # Also we cannot really modify the PIN in an existing entry. So we > # need to prompt the user to manually do it and restart this script > if ! /usr/sbin/service hcsecd enabled; then > - printf "\nWarning: hcsecd is not enabled.\nThis daemon manages pairing requests.\n" > - read -p "Enable hcsecd? [yes]: " REPLY > - case "${REPLY}" in no|n|NO|N|No|nO) ;; *) /usr/sbin/sysrc hcsecd_enable="YES";; esac > + printf "\nWarning: hcsecd is not enabled.\n" > + printf "This daemon manages pairing requests.\n" > + read -p "Enable hcsecd? [yes]: " _r > + case "${_r}" in > + no|n|NO|N|No|nO) ;; > + *) /usr/sbin/service hcsecd enable;; > + esac > fi > + > secd_config=$( /usr/sbin/sysrc -n hcsecd_config ) > -secd_entries=$( /usr/bin/grep -Eo "bdaddr[[:space:]]+(${bdaddress}|${bdname})" ${secd_config} | awk '{ print $2; }' ) > +secd_entries=$( /usr/bin/grep -Eo "bdaddr[[:space:]]+(${bdaddress}|${bdname})" \ > + ${secd_config} | awk '{ print $2; }' ) > > if [ "${secd_entries}" ]; then > - printf "\nWarning: An entry for device %s is already present in %s.\n" ${secd_entries} ${secd_config} > - printf "To modify pairing information, edit this file and run\n service hcsecd restart\n" > - read -p "Continue? [yes]: " REPLY > - case "${REPLY}" in no|n|NO|N|No|nO) exit;; esac > + printf "\nWarning: An entry for device %s is already present in %s.\n" \ > + ${secd_entries} ${secd_config} > + printf "To modify pairing information, edit this file and run\n" > + printf " service hcsecd restart\n" > + read -p "Continue? [yes]: " _r > + case "${_r}" in no|n|NO|N|No|nO) exit;; esac > else > - printf "\nWriting pairing information description block to %s.\n" ${secd_config} > - printf "(To get PIN, put device in pairing mode first.)\n" > - read -p "Enter PIN [nopin]: " pin > - [ "${pin}" ] && pin=\""${pin}"\" || pin="nopin" > + printf "\nWriting pairing information description block to %s.\n" \ > + ${secd_config} > + printf "(To get PIN, put device in pairing mode first.)\n" > + read -p "Enter PIN [nopin]: " pin > + [ "${pin}" ] && pin=\""${pin}"\" || pin="nopin" > > - # Write out new hcsecd config block > - printf "\ndevice {\n\tbdaddr\t%s;\n\tname\t\"%s\";\n\tkey\tnokey\;\n\tpin\t%s\;\n}\n" \ > - "${bdaddress}" "${friendlyname}" "${pin}" >> ${secd_config} > + # Write out new hcsecd config block > + printf "\ndevice {\n\tbdaddr\t%s;\n\tname\t\"%s\";\n\tkey\tnokey\;\n\tpin\t%s\;\n}\n" \ > + "${bdaddress}" "${friendlyname}" "${pin}" >> ${secd_config} > > - # ... and make daemon reload config, TODO: hcsecd should provide a reload hook > - /usr/sbin/service hcsecd restart > + # ... and make daemon reload config > + # TODO: hcsecd should provide a reload hook > + /usr/sbin/service hcsecd onerestart > > - # TODO: we should check if hcsecd succeeded pairing and revert to an old version > - # of hcsecd.conf so we can undo adding the block above and retry with a new PIN > - # also, if there's a way to force devices to re-pair, try this > + # TODO: we should check if hcsecd succeeded pairing and revert to an > + # old version of hcsecd.conf so we can undo adding the block above and > + # retry with a new PIN > + # also, if there's a way to force devices to re-pair, try this > fi > > # now check for specific services to be provided by the device > # first up: HID > > -if /usr/sbin/sdpcontrol -a "${bdaddress}" search HID | \ > - /usr/bin/grep -q "^Record Handle: "; then > +/usr/sbin/sdpcontrol -a "${bdaddress}" search HID | \ > + /usr/bin/grep -q "^Record Handle: " || exit 0 > > - printf "\nThis device provides human interface device services.\n" > - read -p "Set it up? [yes]: " REPLY > - case "${REPLY}" in no|n|NO|N|No|nO) ;; > - *) > - if ! /usr/sbin/service bthidd enabled; then > - printf "\nWarning: bthidd is not enabled." > - printf "\nThis daemon manages Bluetooth HID devices.\n" > - read -p "Enable bthidd? [yes]: " REPLY > - case "${REPLY}" in no|n|NO|N|No|nO) ;; *) /usr/sbin/sysrc bthidd_enable="YES";; esac > - fi > +printf "\nThis device provides human interface device services.\n" > +read -p "Set it up? [yes]: " _r > +case "${_r}" in > + no|n|NO|N|No|nO) exit 0;; > + *);; > +esac > > - # Check if bthidd already knows about this device > - bthidd_known=$( /usr/sbin/bthidcontrol -a "${bdaddress}" known | \ > - /usr/bin/grep "${bdaddress}" ) > - if [ "${bthidd_known}" ]; then > - printf "Notice: Device %s already known to bthidd.\n" "${bdaddress}" > - else > - bthidd_config=$( /usr/sbin/sysrc -n bthidd_config ) > - printf "Writing HID descriptor block to %s ... " "${bthidd_config}" > - /usr/sbin/bthidcontrol -a "${bdaddress}" query >> "${bthidd_config}" > +# Here we have found an HID and were asked to set it up > +# NOTE: look out for the two exit 0 above if you extend this script > > - # Re-read config to see if we succeeded adding the device > - bthidd_known=$( /usr/sbin/bthidcontrol -a "${bdaddress}" known | \ > - grep "${bdaddress}" ) > - if ! [ "${bthidd_known}" ]; then > - printf "failed.\n" > - else > - printf "success.\nTo re-read its config, bthidd must be restarted.\n" > - printf "Warning: If a Bluetooth keyboard is being used, the connection might be lost.\n" > - printf "It can be manually restarted later with\n service bthidd restart\n" > - read -p "Restart bthidd now? [yes]: " REPLY > - case "${REPLY}" in no|n|NO|N|No|nO) ;; *) /usr/sbin/service bthidd restart;; esac > - fi > - fi > - ;; > - esac > +if ! /usr/sbin/service bthidd enabled; then > + printf "\nWarning: bthidd is not enabled." > + printf "\nThis daemon manages Bluetooth HID devices.\n" > + read -p "Enable bthidd? [yes]: " _r > + case "${_r}" in > + no|n|NO|N|No|nO) ;; > + *) /usr/sbin/service bthidd enable;; > + esac > fi > > +# Check if bthidd already knows about this device > +bthidd_known=$( /usr/sbin/bthidcontrol -a "${bdaddress}" known | \ > + /usr/bin/grep "${bdaddress}" ) > + > +if [ "${bthidd_known}" ]; then > + printf "Notice: Device %s already known to bthidd.\n" "${bdaddress}" > + return 0 > +fi > + > +bthidd_config=$( /usr/sbin/sysrc -n bthidd_config ) > +printf "Writing HID descriptor block to %s ... " "${bthidd_config}" > +/usr/sbin/bthidcontrol -a "${bdaddress}" query >> "${bthidd_config}" > + > +# Re-read config to see if we succeeded adding the device > +bthidd_known=$( /usr/sbin/bthidcontrol -a "${bdaddress}" known | \ > + grep "${bdaddress}" ) > +if ! [ "${bthidd_known}" ]; then > + printf "failed.\n" > +else > + printf "success.\nTo re-read its config, bthidd must be restarted.\n" > + printf "Warning: If a Bluetooth keyboard is being used, the connection" > + printf "might be lost.\n" > + printf "It can be manually restarted later with\n" > + printf " service bthidd restart\n" > + read -p "Restart bthidd now? [yes]: " _r > + case "${_r}" in > + no|n|NO|N|No|nO) ;; > + *) /usr/sbin/service bthidd onerestart;; > + esac > +fi > + > } > > # After function definitions, main() can use them > main "$@" > - > -exit > +exit 0 > > # TODO > # * If device is a keyboard, offer a text entry test field and if it does > > -- Rod Grimes rgrimes@freebsd.org From owner-svn-src-all@freebsd.org Mon Jan 14 17:15:53 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 2FDE014A6C2F; Mon, 14 Jan 2019 17:15:53 +0000 (UTC) (envelope-from bapt@FreeBSD.org) Received: from smtp.freebsd.org (smtp.freebsd.org [96.47.72.83]) (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 "smtp.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id CAA646C677; Mon, 14 Jan 2019 17:15:52 +0000 (UTC) (envelope-from bapt@FreeBSD.org) Received: from ivaldir.etoilebsd.net (etoilebsd.net [178.32.217.76]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) (Authenticated sender: bapt) by smtp.freebsd.org (Postfix) with ESMTPSA id 6630C1C47B; Mon, 14 Jan 2019 17:15:52 +0000 (UTC) (envelope-from bapt@FreeBSD.org) Received: by ivaldir.etoilebsd.net (Postfix, from userid 1001) id 3C57D9784C; Mon, 14 Jan 2019 18:15:51 +0100 (CET) Date: Mon, 14 Jan 2019 18:15:51 +0100 From: Baptiste Daroussin To: rgrimes@freebsd.org Cc: Lars Engels , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r343020 - head/usr.sbin/bluetooth/bluetooth-config Message-ID: <20190114171550.ttxceuyepezanhz5@ivaldir.net> References: <201901140823.x0E8Nmll096242@repo.freebsd.org> <201901141632.x0EGWFud035793@pdx.rh.CN85.dnsmgr.net> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="vku2kgy2xltugn2x" Content-Disposition: inline In-Reply-To: <201901141632.x0EGWFud035793@pdx.rh.CN85.dnsmgr.net> User-Agent: NeoMutt/20180716 X-Rspamd-Queue-Id: CAA646C677 X-Spamd-Bar: ------ Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-6.97 / 15.00]; NEURAL_HAM_MEDIUM(-1.00)[-1.000,0]; NEURAL_HAM_SHORT(-0.97)[-0.975,0]; REPLY(-4.00)[]; NEURAL_HAM_LONG(-1.00)[-1.000,0] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 14 Jan 2019 17:15:53 -0000 --vku2kgy2xltugn2x Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Mon, Jan 14, 2019 at 08:32:15AM -0800, Rodney W. Grimes wrote: > > Author: lme (ports committer) > > Date: Mon Jan 14 08:23:47 2019 > > New Revision: 343020 > > URL: https://svnweb.freebsd.org/changeset/base/343020 > >=20 > > Log: > > This new version of bluetooth-config.sh tries to follow the style of = other > > shell scripts in base, removes the bogus "copyleft", adds the BeerWar= e license > > header and uses rc.subr(8) new 'enable' keyword for adding entries in > > rc.conf(5). > > =20 > > Submitted by: erdgeist > > Approved by: bapt > > MFC after: 2 weeks > >=20 > > Modified: > > head/usr.sbin/bluetooth/bluetooth-config/bluetooth-config.sh > >=20 > > Modified: head/usr.sbin/bluetooth/bluetooth-config/bluetooth-config.sh > > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D > > --- head/usr.sbin/bluetooth/bluetooth-config/bluetooth-config.sh Mon Ja= n 14 07:54:11 2019 (r343019) > > +++ head/usr.sbin/bluetooth/bluetooth-config/bluetooth-config.sh Mon Ja= n 14 08:23:47 2019 (r343020) > > @@ -1,9 +1,12 @@ > > #!/bin/sh > > #- > > -# Copyleft 2019 Dirk Engling > > +# --------------------------------------------------------------------= -------- > > +# "THE BEER-WARE LICENSE" (Revision 42): > > +# wrote this file. As long as you retain this = notice you > > +# can do whatever you want with this stuff. If we meet some day, and y= ou think > > +# this stuff is worth it, you can buy me a beer in return Poul-Henning= Kamp > > +# --------------------------------------------------------------------= -------- >=20 > Great step forward, but it needs a copyright, without one > the Berne convention applies, and that just makes this a > case of an undocumented copyright. I didnt think about that > when you showed it with no copyright, there really should be > one in every file to get out of that Berne "undocumented" state. >=20 None of the beerware code in base is following what you ask for. it is used= for ctm, fdwrite, ministat, recoverdisk, many places in the kernel etc. Best regards, Bapt --vku2kgy2xltugn2x Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAABCAAdFiEEgOTj3suS2urGXVU3Y4mL3PG3PloFAlw8w8QACgkQY4mL3PG3 PlrushAAqiqgKZGhgNy8A+w63Awfu03jDFv25hrE+JJAFwcPiUdI+LFZEUkncP1M Z6xgltmiRr6j1IX2KUULhht7GJ0ZPpOg1waBcSmj/kieYzW7BOrcLWj8nuAJ3lf1 KZf19gArcthir/fgYjEJ//UMMq9YR3ZreKnJ8HxYnwvmcXvYt1G5+Y/yjDRytOBq pmgLYs67DVJT2ICCUh1B3P4FM670/m065Q9i9e1TcNnOC//QcInOSlQIlGwbB+T1 3LxRgtMPa9Xzr7AjMmewfpYTqU3Zq+qgnkqRGyonB7JHKIRXDcEHpFT7QdFpXY4f 6/t4h0YYDfUwR/f9/Qpy4R5OuGGeKwtwF+mxG4wBtFDNPqgURf0nP/JwKopgoE5r HdvEWwh6wZz9HAYBw+B4Jp0VwBhLJYamne7/NzNrz3i1MFwfoPBpWxAR3XkIYYzA gF9czc4rwvvU5mu2uWKTa4oD+g7CR+zlpdrtwON6mqA6vkWzSxFPN9K8cHfBxnA5 3K+NWY7Do8qXVkoJQUMOZ06Q0Ub6M+qhZhRv1BWZGJeuqh9YarEaUevRlFKQCwEh 9A8pEtlEG6scPsoQnBdmTHO2NKu3gRIoiHv2cOpoRJnAkhEIu5choBHQg8pK2Xso DX099RYOO6yt6v6thjWV1vDFoW6UGF5HjhetX2zOc4AA76NJws0= =ID+5 -----END PGP SIGNATURE----- --vku2kgy2xltugn2x-- From owner-svn-src-all@freebsd.org Mon Jan 14 17:36:10 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 316DD148156F; Mon, 14 Jan 2019 17:36:10 +0000 (UTC) (envelope-from freebsd@pdx.rh.CN85.dnsmgr.net) Received: from pdx.rh.CN85.dnsmgr.net (br1.CN84in.dnsmgr.net [69.59.192.140]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 68FEC6D462; Mon, 14 Jan 2019 17:36:09 +0000 (UTC) (envelope-from freebsd@pdx.rh.CN85.dnsmgr.net) Received: from pdx.rh.CN85.dnsmgr.net (localhost [127.0.0.1]) by pdx.rh.CN85.dnsmgr.net (8.13.3/8.13.3) with ESMTP id x0EHa7iI036138; Mon, 14 Jan 2019 09:36:07 -0800 (PST) (envelope-from freebsd@pdx.rh.CN85.dnsmgr.net) Received: (from freebsd@localhost) by pdx.rh.CN85.dnsmgr.net (8.13.3/8.13.3/Submit) id x0EHa7KA036137; Mon, 14 Jan 2019 09:36:07 -0800 (PST) (envelope-from freebsd) From: "Rodney W. Grimes" Message-Id: <201901141736.x0EHa7KA036137@pdx.rh.CN85.dnsmgr.net> Subject: Re: svn commit: r343020 - head/usr.sbin/bluetooth/bluetooth-config In-Reply-To: <20190114171550.ttxceuyepezanhz5@ivaldir.net> To: Baptiste Daroussin Date: Mon, 14 Jan 2019 09:36:07 -0800 (PST) CC: rgrimes@FreeBSD.org, Lars Engels , src-committers@FreeBSD.org, svn-src-all@FreeBSD.org, svn-src-head@FreeBSD.org Reply-To: rgrimes@FreeBSD.org X-Mailer: ELM [version 2.4ME+ PL121h (25)] MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=US-ASCII X-Rspamd-Queue-Id: 68FEC6D462 X-Spamd-Bar: ------ Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-6.94 / 15.00]; NEURAL_HAM_MEDIUM(-1.00)[-1.000,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; REPLY(-4.00)[]; NEURAL_HAM_SHORT(-0.94)[-0.940,0] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 14 Jan 2019 17:36:10 -0000 > On Mon, Jan 14, 2019 at 08:32:15AM -0800, Rodney W. Grimes wrote: > > > Author: lme (ports committer) > > > Date: Mon Jan 14 08:23:47 2019 > > > New Revision: 343020 > > > URL: https://svnweb.freebsd.org/changeset/base/343020 > > > > > > Log: > > > This new version of bluetooth-config.sh tries to follow the style of other > > > shell scripts in base, removes the bogus "copyleft", adds the BeerWare license > > > header and uses rc.subr(8) new 'enable' keyword for adding entries in > > > rc.conf(5). > > > > > > Submitted by: erdgeist > > > Approved by: bapt > > > MFC after: 2 weeks > > > > > > Modified: > > > head/usr.sbin/bluetooth/bluetooth-config/bluetooth-config.sh > > > > > > Modified: head/usr.sbin/bluetooth/bluetooth-config/bluetooth-config.sh > > > ============================================================================== > > > --- head/usr.sbin/bluetooth/bluetooth-config/bluetooth-config.sh Mon Jan 14 07:54:11 2019 (r343019) > > > +++ head/usr.sbin/bluetooth/bluetooth-config/bluetooth-config.sh Mon Jan 14 08:23:47 2019 (r343020) > > > @@ -1,9 +1,12 @@ > > > #!/bin/sh > > > #- > > > -# Copyleft 2019 Dirk Engling > > > +# ---------------------------------------------------------------------------- > > > +# "THE BEER-WARE LICENSE" (Revision 42): > > > +# wrote this file. As long as you retain this notice you ^^^^^^^^^^^^^^^^^^^^^^ And if I had looked more carefully it clearly does document who the Berne copyright holder would be. Sorry for the noise, Rod > > > +# can do whatever you want with this stuff. If we meet some day, and you think > > > +# this stuff is worth it, you can buy me a beer in return Poul-Henning Kamp > > > +# ---------------------------------------------------------------------------- > > > > Great step forward, but it needs a copyright, without one > > the Berne convention applies, and that just makes this a > > case of an undocumented copyright. I didnt think about that > > when you showed it with no copyright, there really should be > > one in every file to get out of that Berne "undocumented" state. > > > > None of the beerware code in base is following what you ask for. it is used for > ctm, fdwrite, ministat, recoverdisk, many places in the kernel etc. > > Best regards, > Bapt -- Rod Grimes rgrimes@freebsd.org From owner-svn-src-all@freebsd.org Mon Jan 14 18:40:38 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 0BFC5148362E; Mon, 14 Jan 2019 18:40:38 +0000 (UTC) (envelope-from shurd@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 A4DAD6FD5F; Mon, 14 Jan 2019 18:40:37 +0000 (UTC) (envelope-from shurd@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1: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 957256CD7; Mon, 14 Jan 2019 18:40:37 +0000 (UTC) (envelope-from shurd@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x0EIebZ3022208; Mon, 14 Jan 2019 18:40:37 GMT (envelope-from shurd@FreeBSD.org) Received: (from shurd@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x0EIebEE022207; Mon, 14 Jan 2019 18:40:37 GMT (envelope-from shurd@FreeBSD.org) Message-Id: <201901141840.x0EIebEE022207@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: shurd set sender to shurd@FreeBSD.org using -f From: Stephen Hurd Date: Mon, 14 Jan 2019 18:40: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: r343024 - stable/12/sys/net X-SVN-Group: stable-12 X-SVN-Commit-Author: shurd X-SVN-Commit-Paths: stable/12/sys/net X-SVN-Commit-Revision: 343024 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: A4DAD6FD5F X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.94 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_SHORT(-0.94)[-0.939,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_LONG(-1.00)[-0.999,0] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 14 Jan 2019 18:40:38 -0000 Author: shurd Date: Mon Jan 14 18:40:37 2019 New Revision: 343024 URL: https://svnweb.freebsd.org/changeset/base/343024 Log: MFC r342855: Use iflib_if_init_locked() during resume instead of iflib_init_locked(). iflib_init_locked() assumes that iflib_stop() has been called, however, it is not called for suspend. iflib_if_init_locked() calls stop then init, so fixes the problem. This was causing errors after a resume from suspend. PR: 224059 Reported by: zeising Sponsored by: Limelight Networks Modified: stable/12/sys/net/iflib.c Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/net/iflib.c ============================================================================== --- stable/12/sys/net/iflib.c Mon Jan 14 15:48:35 2019 (r343023) +++ stable/12/sys/net/iflib.c Mon Jan 14 18:40:37 2019 (r343024) @@ -5118,7 +5118,7 @@ iflib_device_resume(device_t dev) CTX_LOCK(ctx); IFDI_RESUME(ctx); - iflib_init_locked(ctx); + iflib_if_init_locked(ctx); CTX_UNLOCK(ctx); for (int i = 0; i < NTXQSETS(ctx); i++, txq++) iflib_txq_check_drain(txq, IFLIB_RESTART_BUDGET); From owner-svn-src-all@freebsd.org Mon Jan 14 20:13:44 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 097591485F16; Mon, 14 Jan 2019 20:13:44 +0000 (UTC) (envelope-from cy.schubert@cschubert.com) Received: from smtp-out-so.shaw.ca (smtp-out-so.shaw.ca [64.59.136.137]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "Client", Issuer "CA" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id E908073B69; Mon, 14 Jan 2019 20:13:42 +0000 (UTC) (envelope-from cy.schubert@cschubert.com) Received: from spqr.komquats.com ([70.67.125.17]) by shaw.ca with ESMTPA id j8c8gnkSVnBo4j8c9gMkBX; Mon, 14 Jan 2019 13:13:41 -0700 X-Authority-Analysis: v=2.3 cv=J8fUEzvS c=1 sm=1 tr=0 a=VFtTW3WuZNDh6VkGe7fA3g==:117 a=VFtTW3WuZNDh6VkGe7fA3g==:17 a=kj9zAlcOel0A:10 a=3JhidrIBZZsA:10 a=iKhvJSA4AAAA:8 a=6I5d2MoRAAAA:8 a=YxBL1-UpAAAA:8 a=PBJgjM2NpsWgmWMOLkQA:9 a=CjuIK1q_8ugA:10 a=odh9cflL3HIXMm4fY7Wr:22 a=IjZwj45LgO3ly-622nXo:22 a=Ia-lj3WSrqcvXOmTRaiG:22 Received: from slippy.cwsent.com (slippy8 [10.2.2.6]) by spqr.komquats.com (Postfix) with ESMTPS id D2F816FC; Mon, 14 Jan 2019 12:13:48 -0800 (PST) Received: from slippy.cwsent.com (localhost [127.0.0.1]) by slippy.cwsent.com (8.15.2/8.15.2) with ESMTP id x0EKDd6B004744; Mon, 14 Jan 2019 12:13:39 -0800 (PST) (envelope-from Cy.Schubert@cschubert.com) Received: from slippy (cy@localhost) by slippy.cwsent.com (8.15.2/8.15.2/Submit) with ESMTP id x0EKDdsA004741; Mon, 14 Jan 2019 12:13:39 -0800 (PST) (envelope-from Cy.Schubert@cschubert.com) Message-Id: <201901142013.x0EKDdsA004741@slippy.cwsent.com> X-Authentication-Warning: slippy.cwsent.com: cy owned process doing -bs X-Mailer: exmh version 2.8.0 04/21/2012 with nmh-1.7.1 Reply-to: Cy Schubert From: Cy Schubert X-os: FreeBSD X-Sender: cy@cwsent.com X-URL: http://www.cschubert.com/ To: rgrimes@freebsd.org cc: Takahashi Yoshihiro , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r343011 - in head/kerberos5: lib/libasn1 lib/libgssapi_krb5 lib/libhdb lib/libheimntlm lib/libhx509 lib/libkadm5clnt lib/libkadm5srv lib/libkdc lib/libkrb5 lib/libwind libexec/digest-se... In-Reply-To: Message from "Rodney W. Grimes" of "Mon, 14 Jan 2019 08:17:58 -0800." <201901141617.x0EGHwqQ035748@pdx.rh.CN85.dnsmgr.net> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Date: Mon, 14 Jan 2019 12:13:39 -0800 X-CMAE-Envelope: MS4wfJGQiRdOE4ZZxesD6HfcudFKMnr+Jmh93UaXE6Ktcu8AB6ZaLFI23ad3l0DNWUNgcdX++y5tSaJUyZRCLGHa4O6YrRskvj56D2AC1uc+iBVnv+WqCt+j I0fSClMXtnO9xOt746xibAMhgHjPRP1ZPpYSDGt9ei8ytoT7twmhPGM4b6y1gYn8l0uxp0BX0ga0NwfSwIlZ4pWpOG/FSZRMWCwUxCwKf6TYJiTkurv/8uqr kexMthw+vjUwQZ1+SgkIL0xm90SafVLtMebbCX8JkQiaQsGacSYjdOOP//V0IvLme/25AvjoWXYYFemvZXISRA== X-Rspamd-Queue-Id: E908073B69 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.85 / 15.00]; RCVD_VIA_SMTP_AUTH(0.00)[]; HAS_REPLYTO(0.00)[Cy.Schubert@cschubert.com]; TO_DN_SOME(0.00)[]; MV_CASE(0.50)[]; HAS_XAW(0.00)[]; RCPT_COUNT_FIVE(0.00)[5]; LONG_SUBJ(1.52)[203]; MX_GOOD(-0.01)[cached: spqr.komquats.com]; NEURAL_HAM_SHORT(-0.94)[-0.938,0]; RECEIVED_SPAMHAUS_PBL(0.00)[17.125.67.70.zen.spamhaus.org : 127.0.0.11]; FROM_EQ_ENVFROM(0.00)[]; R_DKIM_NA(0.00)[]; ASN(0.00)[asn:6327, ipnet:64.59.128.0/20, country:CA]; MIME_TRACE(0.00)[0:+]; RCVD_IN_DNSWL_LOW(-0.10)[137.136.59.64.list.dnswl.org : 127.0.5.1]; ARC_NA(0.00)[]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; RCVD_COUNT_FIVE(0.00)[5]; REPLYTO_EQ_FROM(0.00)[]; RCVD_TLS_LAST(0.00)[]; FROM_HAS_DN(0.00)[]; TO_MATCH_ENVRCPT_ALL(0.00)[]; NEURAL_HAM_LONG(-1.00)[-0.999,0]; MIME_GOOD(-0.10)[text/plain]; IP_SCORE(-1.73)[ip: (-4.36), ipnet: 64.59.128.0/20(-2.36), asn: 6327(-1.82), country: CA(-0.09)]; R_SPF_NA(0.00)[] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 14 Jan 2019 20:13:44 -0000 In message <201901141617.x0EGHwqQ035748@pdx.rh.CN85.dnsmgr.net>, "Rodney W. Gri mes" writes: > > Author: nyan > > Date: Mon Jan 14 06:34:54 2019 > > New Revision: 343011 > > URL: https://svnweb.freebsd.org/changeset/base/343011 > > > > Log: > > Use ${SRCTOP}/contrib/com_err/com_err.h instead of the installed com_err. > h. > > This fixes build when com_err.h is not installed. > > Isn't this the general state of affairs for almost all > of the source tree? I would rather see this solved > in a general way, rather than sprinkly all this > -I${SRCTOP} all over in the tree. Agreed however in practice this is fixed when discovered while working on other issues/problems/projects. > > It use to be (and maybe still is) required that you run > cd $DRCTOP && make includes > if you expected new source code to compile. I expect > this has changed, but the just of it should work in > some aspect. This fixes the potential bug of requiring a header file to be installed. I suspect this to be an oversight at the time. Good that it's fixed now. -- Cheers, Cy Schubert FreeBSD UNIX: Web: http://www.FreeBSD.org The need of the many outweighs the greed of the few. From owner-svn-src-all@freebsd.org Mon Jan 14 20:31:30 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 451D61486F23; Mon, 14 Jan 2019 20:31:30 +0000 (UTC) (envelope-from freebsd@pdx.rh.CN85.dnsmgr.net) Received: from pdx.rh.CN85.dnsmgr.net (br1.CN84in.dnsmgr.net [69.59.192.140]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id D394475015; Mon, 14 Jan 2019 20:31:29 +0000 (UTC) (envelope-from freebsd@pdx.rh.CN85.dnsmgr.net) Received: from pdx.rh.CN85.dnsmgr.net (localhost [127.0.0.1]) by pdx.rh.CN85.dnsmgr.net (8.13.3/8.13.3) with ESMTP id x0EKVQSB036915; Mon, 14 Jan 2019 12:31:27 -0800 (PST) (envelope-from freebsd@pdx.rh.CN85.dnsmgr.net) Received: (from freebsd@localhost) by pdx.rh.CN85.dnsmgr.net (8.13.3/8.13.3/Submit) id x0EKVQSb036914; Mon, 14 Jan 2019 12:31:26 -0800 (PST) (envelope-from freebsd) From: "Rodney W. Grimes" Message-Id: <201901142031.x0EKVQSb036914@pdx.rh.CN85.dnsmgr.net> Subject: Re: svn commit: r343011 - in head/kerberos5: lib/libasn1 lib/libgssapi_krb5 lib/libhdb lib/libheimntlm lib/libhx509 lib/libkadm5clnt lib/libkadm5srv lib/libkdc lib/libkrb5 lib/libwind libexec/digest-se... In-Reply-To: <201901142013.x0EKDdsA004741@slippy.cwsent.com> To: Cy Schubert Date: Mon, 14 Jan 2019 12:31:26 -0800 (PST) CC: rgrimes@freebsd.org, Takahashi Yoshihiro , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Reply-To: rgrimes@freebsd.org X-Mailer: ELM [version 2.4ME+ PL121h (25)] MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=US-ASCII X-Rspamd-Queue-Id: D394475015 X-Spamd-Bar: ------ Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-6.97 / 15.00]; NEURAL_HAM_MEDIUM(-1.00)[-1.000,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; REPLY(-4.00)[]; NEURAL_HAM_SHORT(-0.97)[-0.970,0] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 14 Jan 2019 20:31:30 -0000 > In message <201901141617.x0EGHwqQ035748@pdx.rh.CN85.dnsmgr.net>, > "Rodney W. Gri > mes" writes: > > > Author: nyan > > > Date: Mon Jan 14 06:34:54 2019 > > > New Revision: 343011 > > > URL: https://svnweb.freebsd.org/changeset/base/343011 > > > > > > Log: > > > Use ${SRCTOP}/contrib/com_err/com_err.h instead of the installed com_err. > > h. > > > This fixes build when com_err.h is not installed. > > > > Isn't this the general state of affairs for almost all > > of the source tree? I would rather see this solved > > in a general way, rather than sprinkly all this > > -I${SRCTOP} all over in the tree. > > Agreed however in practice this is fixed when discovered while working > on other issues/problems/projects. This adds another special case that should not exist. > > > > It use to be (and maybe still is) required that you run > > cd $DRCTOP && make includes > > if you expected new source code to compile. I expect > > this has changed, but the just of it should work in > > some aspect. > > This fixes the potential bug of requiring a header file to be > installed. I suspect this to be an oversight at the time. > > Good that it's fixed now. Something is wrong, as infact com_err.h *IS* installed as /usr/include/com_err.h diff /usr/include/com_err.h /usr/src/contrib/com_err/com_err.h -- Rod Grimes rgrimes@freebsd.org From owner-svn-src-all@freebsd.org Mon Jan 14 21:14:31 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 6721A1487FE1; Mon, 14 Jan 2019 21:14:31 +0000 (UTC) (envelope-from yaneurabeya@gmail.com) Received: from mail-pf1-x434.google.com (mail-pf1-x434.google.com [IPv6:2607:f8b0:4864:20::434]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id C74C176567; Mon, 14 Jan 2019 21:14:30 +0000 (UTC) (envelope-from yaneurabeya@gmail.com) Received: by mail-pf1-x434.google.com with SMTP id h3so218399pfg.1; Mon, 14 Jan 2019 13:14:30 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:message-id:mime-version:subject:date:in-reply-to:cc:to :references; bh=fCSdsPrLH91KcgNFFqNS9d22ksh29iSW6iERDD015pg=; b=liYD0z4TLhbvS8XSZSg7kpfXZlww/AmK69+THLVdZWMdbyIbmebUXl/yW7F3dBUw+f mUwbKF80sxWWshnK/oTKWyFE++XmaLMBH1w1zXUmyfepy7XpjxKHGeX4rC1b15c+1rDP UBCM21HQtrOycNYt/pmUDLuSSFaJo7lxkyXm0V75lzdIwUdxUuu5T9hWsWAHNtZBJ6dx UpVo7IuC+IEJN9Gfx+pLnaNNDjVqU1kQtjQE3a+H7UV5M2Wyv02G2UpncOJsCUaYwBkz PoV9Vk21xxusTaKAUzhO81RRSTdp5RqDx511/K34gw6F9aXE8twQHvwhLlTPCCGok+zO XGCA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:message-id:mime-version:subject:date :in-reply-to:cc:to:references; bh=fCSdsPrLH91KcgNFFqNS9d22ksh29iSW6iERDD015pg=; b=F7RWqNXWwbJCO6YDtJ9nsyZYVHBVXhIKsAw9b6YJPW0CK7hic5txDRpe0+Pydl0ev/ H2+f/XVHKnLH9GaIin681n1+0/7r/fRRaQOcfAUECxwaJc1twsTapGD/y5ar5Cwehl6/ XJ76WTNAUyZkWbOAleVxfN5mXtidfeFf+zLdMlYBftLmMmq9wkl6zCZ4mydfxfUIvFTc 5PKd7xUqQVhwdiKIpOru9pjNx4VQX2SrNhtX+n96ekJ59BEiXYMaNcs5uhnmeau3NFRR oE3kFVx1Le/Kv5hu1ssF+Sno4rHqWzp6z9LvzJXqaEAbKEYYL9gVvWbMd8iAUBM0NFZ7 EtWg== X-Gm-Message-State: AJcUukeMeN6nj625WvN3beA8hYIdIs0Zs+lXKTtOJE3IZOGfW5m9+J30 vcMQ1S81Pyk8fz0JTf4ekei5SL+T X-Google-Smtp-Source: ALg8bN6M4RG+OO7Xu2uNrsDlVQofurU3VuXM0uUzdFi9Y6mGXaJOhZzBS6sU2UhI4EmuicuxIPmbMg== X-Received: by 2002:a62:184e:: with SMTP id 75mr494076pfy.28.1547500469248; Mon, 14 Jan 2019 13:14:29 -0800 (PST) Received: from [192.168.20.7] (c-73-19-52-228.hsd1.wa.comcast.net. [73.19.52.228]) by smtp.gmail.com with ESMTPSA id h79sm1740193pfj.186.2019.01.14.13.14.27 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 14 Jan 2019 13:14:28 -0800 (PST) From: Enji Cooper Message-Id: <67E1A06E-292E-4771-A604-46C60D899277@gmail.com> Content-Type: multipart/signed; boundary="Apple-Mail=_C85D2B5D-7546-4C1A-959C-253E6362636D"; protocol="application/pgp-signature"; micalg=pgp-sha256 Mime-Version: 1.0 (Mac OS X Mail 11.5 \(3445.9.1\)) Subject: Re: svn commit: r343011 - in head/kerberos5: lib/libasn1 lib/libgssapi_krb5 lib/libhdb lib/libheimntlm lib/libhx509 lib/libkadm5clnt lib/libkadm5srv lib/libkdc lib/libkrb5 lib/libwind libexec/digest-se... Date: Mon, 14 Jan 2019 13:14:26 -0800 In-Reply-To: <201901142031.x0EKVQSb036914@pdx.rh.CN85.dnsmgr.net> Cc: Cy Schubert , Takahashi Yoshihiro , src-committers , svn-src-all@freebsd.org, svn-src-head@freebsd.org To: rgrimes@freebsd.org References: <201901142031.x0EKVQSb036914@pdx.rh.CN85.dnsmgr.net> X-Mailer: Apple Mail (2.3445.9.1) X-Rspamd-Queue-Id: C74C176567 X-Spamd-Bar: ------ Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-6.95 / 15.00]; NEURAL_HAM_MEDIUM(-1.00)[-1.000,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; REPLY(-4.00)[]; NEURAL_HAM_SHORT(-0.95)[-0.954,0] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 14 Jan 2019 21:14:31 -0000 --Apple-Mail=_C85D2B5D-7546-4C1A-959C-253E6362636D Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=utf-8 > On Jan 14, 2019, at 12:31 PM, Rodney W. Grimes = wrote: >=20 >> In message <201901141617.x0EGHwqQ035748@pdx.rh.CN85.dnsmgr.net>, >> "Rodney W. Gri >> mes" writes: >>>> Author: nyan >>>> Date: Mon Jan 14 06:34:54 2019 >>>> New Revision: 343011 >>>> URL: https://svnweb.freebsd.org/changeset/base/343011 >>>>=20 >>>> Log: >>>> Use ${SRCTOP}/contrib/com_err/com_err.h instead of the installed = com_err. >>> h. >>>> This fixes build when com_err.h is not installed. >>>=20 >>> Isn't this the general state of affairs for almost all >>> of the source tree? I would rather see this solved >>> in a general way, rather than sprinkly all this >>> -I${SRCTOP} all over in the tree. >>=20 >> Agreed however in practice this is fixed when discovered while = working >> on other issues/problems/projects. >=20 > This adds another special case that should not exist. >=20 >>>=20 >>> It use to be (and maybe still is) required that you run >>> cd $DRCTOP && make includes >>> if you expected new source code to compile. I expect >>> this has changed, but the just of it should work in >>> some aspect. >>=20 >> This fixes the potential bug of requiring a header file to be >> installed. I suspect this to be an oversight at the time. >>=20 >> Good that it's fixed now. >=20 > Something is wrong, as infact com_err.h *IS* > installed as /usr/include/com_err.h >=20 > diff /usr/include/com_err.h /usr/src/contrib/com_err/com_err.h Hi Rod, In the full case, yes. It=E2=80=99s relying on the staging = process for buildworld, which builds and installs everything in one = phase as part of =E2=80=9Cmake libraries=E2=80=9D. The list of kerberos libraries which rely on libcom_err is = potentially incomplete, so there=E2=80=99s a chance that it=E2=80=99s = not installing the headers in time. I=E2=80=99ll leave it as an exercise to the reader (in part, = because I=E2=80=99d rather not spending time chasing down this issue, as = there are other bigger fish to fry), to find the underlying issue in = Makefile.inc1 (in my not so humble opinion, kerberos/lib is broken down = a bit too much in Makefile.inc1, which obfuscates dependencies, makes it = extremely easy to miss them when adding/accounting for libraries, and = also plugs too much knowledge into a separate location in the build = system, duplicating efforts). Cheers, -Enji 2734 _prebuild_libs=3D ${_kerberos5_lib_libasn1} \ 2735 ${_kerberos5_lib_libhdb} \ 2736 ${_kerberos5_lib_libheimbase} \ 2737 ${_kerberos5_lib_libheimntlm} \ 2738 ${_libsqlite3} \ 2739 ${_kerberos5_lib_libheimipcc} \ 2740 ${_kerberos5_lib_libhx509} = ${_kerberos5_lib_libkrb5} \ 2741 ${_kerberos5_lib_libroken} \ 2742 ${_kerberos5_lib_libwind} \ 2743 lib/libbz2 ${_libcom_err} lib/libcrypt \ =E2=80=A6 2878 .if ${MK_KERBEROS} !=3D "no" 2879 kerberos5/lib/libasn1__L: lib/libcom_err__L = kerberos5/lib/libroken__L 2880 kerberos5/lib/libhdb__L: kerberos5/lib/libasn1__L lib/libcom_err__L = \ 2881 kerberos5/lib/libkrb5__L kerberos5/lib/libroken__L \ 2882 kerberos5/lib/libwind__L lib/libsqlite3__L 2883 kerberos5/lib/libheimntlm__L: secure/lib/libcrypto__L = kerberos5/lib/libkrb5__L \ 2884 kerberos5/lib/libroken__L lib/libcom_err__L 2885 kerberos5/lib/libhx509__L: kerberos5/lib/libasn1__L = lib/libcom_err__L \ 2886 secure/lib/libcrypto__L kerberos5/lib/libroken__L = kerberos5/lib/libwind__L 2887 kerberos5/lib/libkrb5__L: kerberos5/lib/libasn1__L = lib/libcom_err__L \ 2888 lib/libcrypt__L secure/lib/libcrypto__L = kerberos5/lib/libhx509__L \ 2889 kerberos5/lib/libroken__L kerberos5/lib/libwind__L \ 2890 kerberos5/lib/libheimbase__L kerberos5/lib/libheimipcc__L 2891 kerberos5/lib/libroken__L: lib/libcrypt__L 2892 kerberos5/lib/libwind__L: kerberos5/lib/libroken__L = lib/libcom_err__L 2893 kerberos5/lib/libheimbase__L: lib/libthr__L 2894 kerberos5/lib/libheimipcc__L: kerberos5/lib/libroken__L = kerberos5/lib/libheimbase__L lib/libthr__L 2895 .endif ... 2903 .if ${MK_KERBEROS} !=3D "no" 2904 _kerberos5_lib=3D kerberos5/lib 2905 _kerberos5_lib_libasn1=3D kerberos5/lib/libasn1 2906 _kerberos5_lib_libhdb=3D kerberos5/lib/libhdb 2907 _kerberos5_lib_libheimbase=3D kerberos5/lib/libheimbase 2908 _kerberos5_lib_libkrb5=3D kerberos5/lib/libkrb5 2909 _kerberos5_lib_libhx509=3D kerberos5/lib/libhx509 2910 _kerberos5_lib_libroken=3D kerberos5/lib/libroken 2911 _kerberos5_lib_libheimntlm=3D kerberos5/lib/libheimntlm 2912 _libsqlite3=3D lib/libsqlite3 2913 _kerberos5_lib_libheimipcc=3D kerberos5/lib/libheimipcc 2914 _kerberos5_lib_libwind=3D kerberos5/lib/libwind 2915 _libcom_err=3D lib/libcom_err 2916 .endif ... 2949 .for _lib in ${_startup_libs} ${_prebuild_libs} ${_generic_libs} 2950 ${_lib}__L: .PHONY .MAKE 2951 .if !defined(_MKSHOWCONFIG) && exists(${.CURDIR}/${_lib}) 2952 ${_+_}@${ECHODIR} "=3D=3D=3D> ${_lib} (obj,all,install)"; \ 2953 cd ${.CURDIR}/${_lib}; \ 2954 if [ -z "${NO_OBJWALK}" ]; then ${MAKE} MK_TESTS=3Dno= DIRPRFX=3D${_lib}/ obj; fi; \ 2955 ${MAKE} MK_TESTS=3Dno DIRPRFX=3D${_lib}/ all; \ 2956 ${MAKE} MK_TESTS=3Dno DIRPRFX=3D${_lib}/ install 2957 .endif 2958 .endfor --Apple-Mail=_C85D2B5D-7546-4C1A-959C-253E6362636D Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename=signature.asc Content-Type: application/pgp-signature; name=signature.asc Content-Description: Message signed with OpenPGP -----BEGIN PGP SIGNATURE----- iQIzBAEBCAAdFiEEtvtxN6kOllEF3nmX5JFNMZeDGN4FAlw8+7IACgkQ5JFNMZeD GN7TwhAAkfVdOVYG1zUazOxs9lajlrH4nMRy4evgPHGToQTQ+7padZnljo6c3rRM 5iUHczEwWCf0JqzvE85uQUD/3KCT+ef09MD4F4avB5Y+K+39PlHJsPp0DINGZtsd O324/CgBJ3ipaYVQsDCks4lRY8itfsM2TctLCu9xcjf6DxFG9WmE7P73NpgAeDms PPzWeHy64uwS8pdMoMUypdjUuZ549OtHwBTbfYkTgbgTPNCfDlmOo3Ln7xr5Q5Gs 1ZzxJ7kvHKbhQHNCoDzeDwwgFLoZlJpFbwWCAjYFxwTgS5+UqUz8R+osbOEeWrI+ IkU0rBb8S1+B4FosOxnaH0PVNYpWHH94ltlhZaQrVZZyBaUA0KoiwCXuHrarYH3R csxb6eYk1mcmOD55UyNGhIhChgUym/YfrW5RmodbdMVNNWcr6R3gjayYBshVMvXw C8lr62dG9mKtO2KoBM0dE6uhC8/41OHlLvIY60mOQhzf15usDfdOy4slwy1oIf7I PKJDaPf30+ZpZ0LFlBuM4GrzRhAAmApDwKR6q4Byjq+D10x5R08bnDMrFNO4FqHE IyfX1ZQe34JiRmczr74TbDejQTcQzbNuiOd6nDRjmum/jX4AgoGfUvY85BPH7pIk 8pVQN/njDQhlTf8A4ZYNQLIcIlpz+AWiIMl4jKO+7hUGLS+gQAQ= =qmlq -----END PGP SIGNATURE----- --Apple-Mail=_C85D2B5D-7546-4C1A-959C-253E6362636D-- From owner-svn-src-all@freebsd.org Mon Jan 14 21:24:50 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 096541488394; Mon, 14 Jan 2019 21:24:50 +0000 (UTC) (envelope-from cy.schubert@cschubert.com) Received: from smtp-out-so.shaw.ca (smtp-out-so.shaw.ca [64.59.136.139]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "Client", Issuer "CA" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 23F9B76B26; Mon, 14 Jan 2019 21:24:48 +0000 (UTC) (envelope-from cy.schubert@cschubert.com) Received: from spqr.komquats.com ([70.67.125.17]) by shaw.ca with ESMTPA id j9iogw95g82Ycj9ipgxZPp; Mon, 14 Jan 2019 14:24:41 -0700 X-Authority-Analysis: v=2.3 cv=NNSrBHyg c=1 sm=1 tr=0 a=VFtTW3WuZNDh6VkGe7fA3g==:117 a=VFtTW3WuZNDh6VkGe7fA3g==:17 a=IkcTkHD0fZMA:10 a=3JhidrIBZZsA:10 a=iKhvJSA4AAAA:8 a=6I5d2MoRAAAA:8 a=YxBL1-UpAAAA:8 a=lz2pXyTTt24pO-65IhIA:9 a=QEXdDO2ut3YA:10 a=odh9cflL3HIXMm4fY7Wr:22 a=IjZwj45LgO3ly-622nXo:22 a=Ia-lj3WSrqcvXOmTRaiG:22 Received: from android-68f84e02b5988183.esitwifi.local (S0106788a207e2972.gv.shawcable.net [70.66.154.233]) by spqr.komquats.com (Postfix) with ESMTPSA id 6524E7A0; Mon, 14 Jan 2019 13:24:46 -0800 (PST) Date: Mon, 14 Jan 2019 13:24:14 -0800 User-Agent: K-9 Mail for Android In-Reply-To: <201901142031.x0EKVQSb036914@pdx.rh.CN85.dnsmgr.net> References: <201901142031.x0EKVQSb036914@pdx.rh.CN85.dnsmgr.net> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Subject: Re: svn commit: r343011 - in head/kerberos5: lib/libasn1 lib/libgssapi_krb5 lib/libhdb lib/libheimntlm lib/libhx509 lib/libkadm5clnt lib/libkadm5srv lib/libkdc lib/libkrb5 lib/libwind libexec/digest-se... To: rgrimes@freebsd.org,"Rodney W. Grimes" CC: Takahashi Yoshihiro , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org From: Cy Schubert Message-ID: <500EC03A-1DAB-45A6-9CA8-1DE960EB6E6D@cschubert.com> X-CMAE-Envelope: MS4wfLUEWHAgLlC2tiAAZ/tcyTUDT8SUo4OVwKWMhuQaEA7ta2g27Gun98QXr5L0GT4agzDPqYKDO15uwXaMloXU4T1spBi0iO/wFyfT25RSPoN3d0z+HaT0 alP5chacTE2pKbDc2FjwmAzphHjxVsBrsndUVy4ZFOuhqhqrx5cRGVfxN7EjkaZo16J73PCqBi+3GX6Qn5tqazWi5P/q4HHkkfBmTWQXpsvcjWGXtaj9N0T3 crbAfbrlcOobtBmQi3tpO+PMiL+vpRaspFfZr4rPVQkiUTXb1KUYKqfj0/1zNhQkcDVgCQoozVyuLHSi3NmVX5YTfCTZKLREGaTwPwAj+mQxqPpZ3zV4bi07 wdTQTKPx X-Rspamd-Queue-Id: 23F9B76B26 X-Spamd-Bar: ------ Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-6.97 / 15.00]; NEURAL_HAM_MEDIUM(-1.00)[-1.000,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; REPLY(-4.00)[]; NEURAL_HAM_SHORT(-0.97)[-0.972,0] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 14 Jan 2019 21:24:50 -0000 On January 14, 2019 12:31:26 PM PST, "Rodney W=2E Grimes" wrote: >> In message <201901141617=2Ex0EGHwqQ035748@pdx=2Erh=2ECN85=2Ednsmgr=2Ene= t>,=20 >> "Rodney W=2E Gri >> mes" writes: >> > > Author: nyan >> > > Date: Mon Jan 14 06:34:54 2019 >> > > New Revision: 343011 >> > > URL: https://svnweb=2Efreebsd=2Eorg/changeset/base/343011 >> > >=20 >> > > Log: >> > > Use ${SRCTOP}/contrib/com_err/com_err=2Eh instead of the >installed com_err=2E >> > h=2E >> > > This fixes build when com_err=2Eh is not installed=2E >> > >> > Isn't this the general state of affairs for almost all >> > of the source tree? I would rather see this solved >> > in a general way, rather than sprinkly all this >> > -I${SRCTOP} all over in the tree=2E >>=20 >> Agreed however in practice this is fixed when discovered while >working=20 >> on other issues/problems/projects=2E > >This adds another special case that should not exist=2E > >> > >> > It use to be (and maybe still is) required that you run >> > cd $DRCTOP && make includes >> > if you expected new source code to compile=2E I expect >> > this has changed, but the just of it should work in >> > some aspect=2E >>=20 >> This fixes the potential bug of requiring a header file to be=20 >> installed=2E I suspect this to be an oversight at the time=2E >>=20 >> Good that it's fixed now=2E > >Something is wrong, as infact com_err=2Eh *IS* >installed as /usr/include/com_err=2Eh > >diff /usr/include/com_err=2Eh /usr/src/contrib/com_err/com_err=2Eh This is the typical location krb5 puts this file=2E There is a project bra= nch that moves this file by making kerberos private=2E It's currently block= ed by a number of ports this breaks, most of which are addressed=2E=20 --=20 Pardon the typos and autocorrect, small keyboard in use=2E Cheers, Cy Schubert FreeBSD UNIX: Web: http://www=2EFreeBSD=2Eorg The need of the many outweighs the greed of the few=2E From owner-svn-src-all@freebsd.org Mon Jan 14 21:46:57 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 526E61488DFC; Mon, 14 Jan 2019 21:46:57 +0000 (UTC) (envelope-from gonzo@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 E4AA7778A0; Mon, 14 Jan 2019 21:46:56 +0000 (UTC) (envelope-from gonzo@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id D2B068CF0; Mon, 14 Jan 2019 21:46:56 +0000 (UTC) (envelope-from gonzo@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x0ELkuD2020973; Mon, 14 Jan 2019 21:46:56 GMT (envelope-from gonzo@FreeBSD.org) Received: (from gonzo@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x0ELkutw020972; Mon, 14 Jan 2019 21:46:56 GMT (envelope-from gonzo@FreeBSD.org) Message-Id: <201901142146.x0ELkutw020972@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gonzo set sender to gonzo@FreeBSD.org using -f From: Oleksandr Tymoshenko Date: Mon, 14 Jan 2019 21:46: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: r343025 - stable/12/sys/arm/mv X-SVN-Group: stable-12 X-SVN-Commit-Author: gonzo X-SVN-Commit-Paths: stable/12/sys/arm/mv X-SVN-Commit-Revision: 343025 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: E4AA7778A0 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.94 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_SHORT(-0.94)[-0.941,0]; NEURAL_HAM_LONG(-1.00)[-0.999,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 14 Jan 2019 21:46:57 -0000 Author: gonzo Date: Mon Jan 14 21:46:56 2019 New Revision: 343025 URL: https://svnweb.freebsd.org/changeset/base/343025 Log: MFC r341406, r342106 r341406: Fix PCI driver unload for Marvell PCI controller Add generic implementation for bus_deactivate_resource method. Without it bus_release_resource fails with "Failed to release active resource" message r342106: [mv_pci] Do not attempt to attach disabled PCI ports Fail probe for PCI port if the respective FDT node is not enabled Differential Revision: https://reviews.freebsd.org/D18385 Modified: stable/12/sys/arm/mv/mv_pci.c stable/12/sys/arm/mv/mv_pci_ctrl.c Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/arm/mv/mv_pci.c ============================================================================== --- stable/12/sys/arm/mv/mv_pci.c Mon Jan 14 18:40:37 2019 (r343024) +++ stable/12/sys/arm/mv/mv_pci.c Mon Jan 14 21:46:56 2019 (r343025) @@ -429,6 +429,9 @@ mv_pcib_probe(device_t self) OF_parent(node), "marvell,armada-370-pcie"))) return (ENXIO); + if (!ofw_bus_status_okay(self)) + return (ENXIO); + device_set_desc(self, "Marvell Integrated PCI/PCI-E Controller"); return (BUS_PROBE_DEFAULT); } Modified: stable/12/sys/arm/mv/mv_pci_ctrl.c ============================================================================== --- stable/12/sys/arm/mv/mv_pci_ctrl.c Mon Jan 14 18:40:37 2019 (r343024) +++ stable/12/sys/arm/mv/mv_pci_ctrl.c Mon Jan 14 21:46:56 2019 (r343025) @@ -97,6 +97,7 @@ static device_method_t mv_pcib_ctrl_methods[] = { DEVMETHOD(bus_alloc_resource, mv_pcib_ctrl_alloc_resource), DEVMETHOD(bus_release_resource, bus_generic_release_resource), DEVMETHOD(bus_activate_resource, bus_generic_activate_resource), + DEVMETHOD(bus_deactivate_resource, bus_generic_deactivate_resource), DEVMETHOD(bus_setup_intr, bus_generic_setup_intr), /* ofw_bus interface */ From owner-svn-src-all@freebsd.org Mon Jan 14 23:24:00 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 8ECDE148AB37; Mon, 14 Jan 2019 23:24:00 +0000 (UTC) (envelope-from glebius@freebsd.org) Received: from cell.glebi.us (glebi.us [198.45.61.253]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "cell.glebi.us", Issuer "cell.glebi.us" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id E3F6382442; Mon, 14 Jan 2019 23:23:59 +0000 (UTC) (envelope-from glebius@freebsd.org) Received: from cell.glebi.us (localhost [127.0.0.1]) by cell.glebi.us (8.15.2/8.15.2) with ESMTPS id x0ENNpf2043618 (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384 bits=256 verify=NO); Mon, 14 Jan 2019 15:23:51 -0800 (PST) (envelope-from glebius@freebsd.org) Received: (from glebius@localhost) by cell.glebi.us (8.15.2/8.15.2/Submit) id x0ENNpQR043617; Mon, 14 Jan 2019 15:23:51 -0800 (PST) (envelope-from glebius@freebsd.org) X-Authentication-Warning: cell.glebi.us: glebius set sender to glebius@freebsd.org using -f Date: Mon, 14 Jan 2019 15:23:51 -0800 From: Gleb Smirnoff To: "Jason A. Harmening" Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r343005 - head/sys/kern Message-ID: <20190114232351.GS18452@FreeBSD.org> References: <201901132033.x0DKXtin020499@repo.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <201901132033.x0DKXtin020499@repo.freebsd.org> User-Agent: Mutt/1.10.1 (2018-07-13) X-Rspamd-Queue-Id: E3F6382442 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.94 / 15.00]; local_wl_from(0.00)[freebsd.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_LONG(-1.00)[-0.999,0]; NEURAL_HAM_SHORT(-0.94)[-0.939,0]; ASN(0.00)[asn:2906, ipnet:198.45.48.0/20, country:US] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 14 Jan 2019 23:24:00 -0000 Jason, thanks a lot for fixing this. On Sun, Jan 13, 2019 at 08:33:55PM +0000, Jason A. Harmening wrote: J> Author: jah J> Date: Sun Jan 13 20:33:54 2019 J> New Revision: 343005 J> URL: https://svnweb.freebsd.org/changeset/base/343005 J> J> Log: J> Handle SIGIO for listening sockets J> J> r319722 separated struct socket and parts of the socket I/O path into J> listening-socket-specific and dataflow-socket-specific pieces. Listening J> socket connection notifications are now handled by solisten_wakeup() instead J> of sowakeup(), but solisten_wakeup() does not currently post SIGIO to the J> owning process. J> J> PR: 234258 J> Reported by: Kenneth Adelman J> MFC after: 1 week J> Differential Revision: https://reviews.freebsd.org/D18664 J> J> Modified: J> head/sys/kern/uipc_socket.c J> J> Modified: head/sys/kern/uipc_socket.c J> ============================================================================== J> --- head/sys/kern/uipc_socket.c Sun Jan 13 19:49:46 2019 (r343004) J> +++ head/sys/kern/uipc_socket.c Sun Jan 13 20:33:54 2019 (r343005) J> @@ -886,6 +886,8 @@ solisten_wakeup(struct socket *sol) J> } J> SOLISTEN_UNLOCK(sol); J> wakeup_one(&sol->sol_comp); J> + if ((sol->so_state & SS_ASYNC) && sol->so_sigio != NULL) J> + pgsigio(&sol->so_sigio, SIGIO, 0); J> } J> J> /* J> -- Gleb Smirnoff From owner-svn-src-all@freebsd.org Tue Jan 15 00:02:12 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id ADAAE148B8C8; Tue, 15 Jan 2019 00:02:11 +0000 (UTC) (envelope-from glebius@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 2E6CF837D9; Tue, 15 Jan 2019 00:02:07 +0000 (UTC) (envelope-from glebius@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 1ED9DA47C; Tue, 15 Jan 2019 00:02:07 +0000 (UTC) (envelope-from glebius@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x0F027V5092947; Tue, 15 Jan 2019 00:02:07 GMT (envelope-from glebius@FreeBSD.org) Received: (from glebius@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x0F026EW092943; Tue, 15 Jan 2019 00:02:06 GMT (envelope-from glebius@FreeBSD.org) Message-Id: <201901150002.x0F026EW092943@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: glebius set sender to glebius@FreeBSD.org using -f From: Gleb Smirnoff Date: Tue, 15 Jan 2019 00:02:06 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r343026 - in head: lib/libmemstat sys/vm X-SVN-Group: head X-SVN-Commit-Author: glebius X-SVN-Commit-Paths: in head: lib/libmemstat sys/vm X-SVN-Commit-Revision: 343026 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 2E6CF837D9 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.95 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_SHORT(-0.95)[-0.953,0]; NEURAL_HAM_LONG(-1.00)[-0.999,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 15 Jan 2019 00:02:12 -0000 Author: glebius Date: Tue Jan 15 00:02:06 2019 New Revision: 343026 URL: https://svnweb.freebsd.org/changeset/base/343026 Log: o Move zone limit from keg level up to zone level. This means that now two zones sharing a keg may have different limits. Now this is going to work: zone = uma_zcreate(); uma_zone_set_max(zone, limit); zone2 = uma_zsecond_create(zone); uma_zone_set_max(zone2, limit2); Kegs no longer have uk_maxpages field, but zones have uz_items. When set, it may be rounded up to minimum possible CPU bucket cache size. For small limits bucket cache can also be reconfigured to be smaller. Counter uz_items is updated whenever items transition from keg to a bucket cache or directly to a consumer. If zone has uz_maxitems set and it is reached, then we are going to sleep. o Since new limits don't play well with multi-keg zones, remove them. The idea of multi-keg zones was introduced exactly 10 years ago, and never have had a practical usage. In discussion with Jeff we came to a wild agreement that if we ever want to reintroduce the idea of a smart allocator that would be able to choose between two (or more) totally different backing stores, that choice should be made one level higher than UMA, e.g. in malloc(9) or in mget(), or whatever and choice should be controlled by the caller. o Sleeping code is improved to account number of sleepers and wake them one by one, to avoid thundering herd problem. o Flag UMA_ZONE_NOBUCKETCACHE removed, instead uma_zone_set_maxcache() KPI added. Having no bucket cache basically means setting maxcache to 0. o Now with many fields added and many removed (no multi-keg zones!) make sure that struct uma_zone is perfectly aligned. Reviewed by: markj, jeff Tested by: pho Differential Revision: https://reviews.freebsd.org/D17773 Modified: head/lib/libmemstat/memstat_uma.c head/sys/vm/uma.h head/sys/vm/uma_core.c head/sys/vm/uma_int.h head/sys/vm/vm_page.c Modified: head/lib/libmemstat/memstat_uma.c ============================================================================== --- head/lib/libmemstat/memstat_uma.c Mon Jan 14 21:46:56 2019 (r343025) +++ head/lib/libmemstat/memstat_uma.c Tue Jan 15 00:02:06 2019 (r343026) @@ -448,12 +448,7 @@ skip_percpu: mtp->mt_memalloced = mtp->mt_numallocs * mtp->mt_size; mtp->mt_memfreed = mtp->mt_numfrees * mtp->mt_size; mtp->mt_bytes = mtp->mt_memalloced - mtp->mt_memfreed; - if (kz.uk_ppera > 1) - mtp->mt_countlimit = kz.uk_maxpages / - kz.uk_ipers; - else - mtp->mt_countlimit = kz.uk_maxpages * - kz.uk_ipers; + mtp->mt_countlimit = uz.uz_max_items; mtp->mt_byteslimit = mtp->mt_countlimit * mtp->mt_size; mtp->mt_count = mtp->mt_numallocs - mtp->mt_numfrees; for (i = 0; i < ndomains; i++) { Modified: head/sys/vm/uma.h ============================================================================== --- head/sys/vm/uma.h Mon Jan 14 21:46:56 2019 (r343025) +++ head/sys/vm/uma.h Tue Jan 15 00:02:06 2019 (r343026) @@ -218,17 +218,6 @@ uma_zone_t uma_zsecond_create(char *name, uma_ctor cto uma_init zinit, uma_fini zfini, uma_zone_t master); /* - * Add a second master to a secondary zone. This provides multiple data - * backends for objects with the same size. Both masters must have - * compatible allocation flags. Presently, UMA_ZONE_MALLOC type zones are - * the only supported. - * - * Returns: - * Error on failure, 0 on success. - */ -int uma_zsecond_add(uma_zone_t zone, uma_zone_t master); - -/* * Create cache-only zones. * * This allows uma's per-cpu cache facilities to handle arbitrary @@ -285,10 +274,6 @@ uma_zone_t uma_zcache_create(char *name, int size, uma * NUMA aware Zone. Implements a best * effort first-touch policy. */ -#define UMA_ZONE_NOBUCKETCACHE 0x20000 /* - * Don't cache full buckets. Limit - * UMA to per-cpu state. - */ /* * These flags are shared between the keg and zone. In zones wishing to add @@ -510,6 +495,18 @@ int uma_zone_reserve_kva(uma_zone_t zone, int nitems); * int The effective value of nitems after rounding up based on page size */ int uma_zone_set_max(uma_zone_t zone, int nitems); + +/* + * Sets a high limit on the number of items allowed in zone's bucket cache + * + * Arguments: + * zone The zone to limit + * nitems The requested upper limit on the number of items allowed + * + * Returns: + * int The effective value of nitems set + */ +int uma_zone_set_maxcache(uma_zone_t zone, int nitems); /* * Obtains the effective limit on the number of items in a zone Modified: head/sys/vm/uma_core.c ============================================================================== --- head/sys/vm/uma_core.c Mon Jan 14 21:46:56 2019 (r343025) +++ head/sys/vm/uma_core.c Tue Jan 15 00:02:06 2019 (r343026) @@ -219,7 +219,12 @@ struct uma_bucket_zone bucket_zones[] = { /* * Flags and enumerations to be passed to internal functions. */ -enum zfreeskip { SKIP_NONE = 0, SKIP_DTOR, SKIP_FINI }; +enum zfreeskip { + SKIP_NONE = 0, + SKIP_CNT = 0x00000001, + SKIP_DTOR = 0x00010000, + SKIP_FINI = 0x00020000, +}; #define UMA_ANYDOMAIN -1 /* Special value for domain search. */ @@ -255,17 +260,17 @@ static void hash_free(struct uma_hash *hash); static void uma_timeout(void *); static void uma_startup3(void); static void *zone_alloc_item(uma_zone_t, void *, int, int); +static void *zone_alloc_item_locked(uma_zone_t, void *, int, int); static void zone_free_item(uma_zone_t, void *, void *, enum zfreeskip); static void bucket_enable(void); static void bucket_init(void); static uma_bucket_t bucket_alloc(uma_zone_t zone, void *, int); static void bucket_free(uma_zone_t zone, uma_bucket_t, void *); static void bucket_zone_drain(void); -static uma_bucket_t zone_alloc_bucket(uma_zone_t, void *, int, int); +static uma_bucket_t zone_alloc_bucket(uma_zone_t, void *, int, int, int); static uma_slab_t zone_fetch_slab(uma_zone_t, uma_keg_t, int, int); -static uma_slab_t zone_fetch_slab_multi(uma_zone_t, uma_keg_t, int, int); static void *slab_alloc_item(uma_keg_t keg, uma_slab_t slab); -static void slab_free_item(uma_keg_t keg, uma_slab_t slab, void *item); +static void slab_free_item(uma_zone_t zone, uma_slab_t slab, void *item); static uma_keg_t uma_kcreate(uma_zone_t zone, size_t size, uma_init uminit, uma_fini fini, int align, uint32_t flags); static int zone_import(uma_zone_t, void **, int, int, int); @@ -472,6 +477,7 @@ zone_try_fetch_bucket(uma_zone_t zone, uma_zone_domain zdom->uzd_nitems -= bucket->ub_cnt; if (ws && zdom->uzd_imin > zdom->uzd_nitems) zdom->uzd_imin = zdom->uzd_nitems; + zone->uz_bkt_count -= bucket->ub_cnt; } return (bucket); } @@ -482,11 +488,14 @@ zone_put_bucket(uma_zone_t zone, uma_zone_domain_t zdo { ZONE_LOCK_ASSERT(zone); + KASSERT(zone->uz_bkt_count < zone->uz_bkt_max, ("%s: zone %p overflow", + __func__, zone)); LIST_INSERT_HEAD(&zdom->uzd_buckets, bucket, ub_link); zdom->uzd_nitems += bucket->ub_cnt; if (ws && zdom->uzd_imax < zdom->uzd_nitems) zdom->uzd_imax = zdom->uzd_nitems; + zone->uz_bkt_count += bucket->ub_cnt; } static void @@ -509,15 +518,6 @@ zone_maxaction(uma_zone_t zone) taskqueue_enqueue(taskqueue_thread, &zone->uz_maxaction); } -static void -zone_foreach_keg(uma_zone_t zone, void (*kegfn)(uma_keg_t)) -{ - uma_klink_t klink; - - LIST_FOREACH(klink, &zone->uz_kegs, kl_link) - kegfn(klink->kl_keg); -} - /* * Routine called by timeout which is used to fire off some time interval * based calculations. (stats, hash size, etc.) @@ -562,8 +562,9 @@ zone_domain_update_wss(uma_zone_domain_t zdom) * Returns nothing. */ static void -keg_timeout(uma_keg_t keg) +zone_timeout(uma_zone_t zone) { + uma_keg_t keg = zone->uz_keg; KEG_LOCK(keg); /* @@ -601,20 +602,11 @@ keg_timeout(uma_keg_t keg) return; } } - KEG_UNLOCK(keg); -} -static void -zone_timeout(uma_zone_t zone) -{ - int i; - - zone_foreach_keg(zone, &keg_timeout); - - ZONE_LOCK(zone); - for (i = 0; i < vm_ndomains; i++) + for (int i = 0; i < vm_ndomains; i++) zone_domain_update_wss(&zone->uz_domain[i]); - ZONE_UNLOCK(zone); + + KEG_UNLOCK(keg); } /* @@ -744,6 +736,11 @@ bucket_drain(uma_zone_t zone, uma_bucket_t bucket) for (i = 0; i < bucket->ub_cnt; i++) zone->uz_fini(bucket->ub_bucket[i], zone->uz_size); zone->uz_release(zone->uz_arg, bucket->ub_bucket, bucket->ub_cnt); + ZONE_LOCK(zone); + zone->uz_items -= bucket->ub_cnt; + if (zone->uz_sleepers && zone->uz_items < zone->uz_max_items) + wakeup_one(zone); + ZONE_UNLOCK(zone); bucket->ub_cnt = 0; } @@ -1029,7 +1026,7 @@ zone_drain_wait(uma_zone_t zone, int waitok) * we're running. Normally the uma_rwlock would protect us but we * must be able to release and acquire the right lock for each keg. */ - zone_foreach_keg(zone, &keg_drain); + keg_drain(zone->uz_keg); ZONE_LOCK(zone); zone->uz_flags &= ~UMA_ZFLAG_DRAINING; wakeup(zone); @@ -1068,7 +1065,8 @@ keg_alloc_slab(uma_keg_t keg, uma_zone_t zone, int dom KASSERT(domain >= 0 && domain < vm_ndomains, ("keg_alloc_slab: domain %d out of range", domain)); - mtx_assert(&keg->uk_lock, MA_OWNED); + KEG_LOCK_ASSERT(keg); + MPASS(zone->uz_lockptr == &keg->uk_lock); allocf = keg->uk_allocf; KEG_UNLOCK(keg); @@ -1164,8 +1162,7 @@ startup_alloc(uma_zone_t zone, vm_size_t bytes, int do void *mem; int pages; - keg = zone_first_keg(zone); - + keg = zone->uz_keg; /* * If we are in BOOT_BUCKETS or higher, than switch to real * allocator. Zones with page sized slabs switch at BOOT_PAGEALLOC. @@ -1303,7 +1300,7 @@ noobj_alloc(uma_zone_t zone, vm_size_t bytes, int doma uma_keg_t keg; TAILQ_INIT(&alloctail); - keg = zone_first_keg(zone); + keg = zone->uz_keg; npages = howmany(bytes, PAGE_SIZE); while (npages > 0) { @@ -1525,8 +1522,6 @@ keg_large_init(uma_keg_t keg) { KASSERT(keg != NULL, ("Keg is null in keg_large_init")); - KASSERT((keg->uk_flags & UMA_ZFLAG_CACHEONLY) == 0, - ("keg_large_init: Cannot large-init a UMA_ZFLAG_CACHEONLY keg")); KASSERT((keg->uk_flags & UMA_ZONE_PCPU) == 0, ("%s: Cannot large-init a UMA_ZONE_PCPU keg", __func__)); @@ -1747,15 +1742,14 @@ zone_ctor(void *mem, int size, void *udata, int flags) zone->uz_sleeps = 0; zone->uz_count = 0; zone->uz_count_min = 0; + zone->uz_count_max = BUCKET_MAX; zone->uz_flags = 0; zone->uz_warning = NULL; /* The domain structures follow the cpu structures. */ zone->uz_domain = (struct uma_zone_domain *)&zone->uz_cpu[mp_ncpus]; + zone->uz_bkt_max = ULONG_MAX; timevalclear(&zone->uz_ratecheck); - keg = arg->keg; - ZONE_LOCK_INIT(zone, (arg->flags & UMA_ZONE_MTXCLASS)); - /* * This is a pure cache zone, no kegs. */ @@ -1768,6 +1762,7 @@ zone_ctor(void *mem, int size, void *udata, int flags) zone->uz_release = arg->release; zone->uz_arg = arg->arg; zone->uz_lockptr = &zone->uz_lock; + ZONE_LOCK_INIT(zone, (arg->flags & UMA_ZONE_MTXCLASS)); rw_wlock(&uma_rwlock); LIST_INSERT_HEAD(&uma_cachezones, zone, uz_link); rw_wunlock(&uma_rwlock); @@ -1780,6 +1775,7 @@ zone_ctor(void *mem, int size, void *udata, int flags) zone->uz_import = (uma_import)zone_import; zone->uz_release = (uma_release)zone_release; zone->uz_arg = zone; + keg = arg->keg; if (arg->flags & UMA_ZONE_SECONDARY) { KASSERT(arg->keg != NULL, ("Secondary zone on zero'd keg")); @@ -1818,12 +1814,7 @@ zone_ctor(void *mem, int size, void *udata, int flags) return (error); } - /* - * Link in the first keg. - */ - zone->uz_klink.kl_keg = keg; - LIST_INSERT_HEAD(&zone->uz_kegs, &zone->uz_klink, kl_link); - zone->uz_lockptr = &keg->uk_lock; + zone->uz_keg = keg; zone->uz_size = keg->uk_size; zone->uz_flags |= (keg->uk_flags & (UMA_ZONE_INHERIT | UMA_ZFLAG_INHERIT)); @@ -1889,12 +1880,10 @@ keg_dtor(void *arg, int size, void *udata) static void zone_dtor(void *arg, int size, void *udata) { - uma_klink_t klink; uma_zone_t zone; uma_keg_t keg; zone = (uma_zone_t)arg; - keg = zone_first_keg(zone); if (!(zone->uz_flags & UMA_ZFLAG_INTERNAL)) cache_drain(zone); @@ -1910,25 +1899,17 @@ zone_dtor(void *arg, int size, void *udata) */ zone_drain_wait(zone, M_WAITOK); /* - * Unlink all of our kegs. - */ - while ((klink = LIST_FIRST(&zone->uz_kegs)) != NULL) { - klink->kl_keg = NULL; - LIST_REMOVE(klink, kl_link); - if (klink == &zone->uz_klink) - continue; - free(klink, M_TEMP); - } - /* * We only destroy kegs from non secondary zones. */ - if (keg != NULL && (zone->uz_flags & UMA_ZONE_SECONDARY) == 0) { + if ((keg = zone->uz_keg) != NULL && + (zone->uz_flags & UMA_ZONE_SECONDARY) == 0) { rw_wlock(&uma_rwlock); LIST_REMOVE(keg, uk_link); rw_wunlock(&uma_rwlock); zone_free_item(kegs, keg, NULL, SKIP_NONE); } - ZONE_LOCK_FINI(zone); + if (zone->uz_lockptr == &zone->uz_lock) + ZONE_LOCK_FINI(zone); } /* @@ -2219,7 +2200,7 @@ uma_zsecond_create(char *name, uma_ctor ctor, uma_dtor uma_zone_t res; bool locked; - keg = zone_first_keg(master); + keg = master->uz_keg; memset(&args, 0, sizeof(args)); args.name = name; args.size = keg->uk_size; @@ -2263,90 +2244,11 @@ uma_zcache_create(char *name, int size, uma_ctor ctor, args.release = zrelease; args.arg = arg; args.align = 0; - args.flags = flags; + args.flags = flags | UMA_ZFLAG_CACHE; return (zone_alloc_item(zones, &args, UMA_ANYDOMAIN, M_WAITOK)); } -static void -zone_lock_pair(uma_zone_t a, uma_zone_t b) -{ - if (a < b) { - ZONE_LOCK(a); - mtx_lock_flags(b->uz_lockptr, MTX_DUPOK); - } else { - ZONE_LOCK(b); - mtx_lock_flags(a->uz_lockptr, MTX_DUPOK); - } -} - -static void -zone_unlock_pair(uma_zone_t a, uma_zone_t b) -{ - - ZONE_UNLOCK(a); - ZONE_UNLOCK(b); -} - -int -uma_zsecond_add(uma_zone_t zone, uma_zone_t master) -{ - uma_klink_t klink; - uma_klink_t kl; - int error; - - error = 0; - klink = malloc(sizeof(*klink), M_TEMP, M_WAITOK | M_ZERO); - - zone_lock_pair(zone, master); - /* - * zone must use vtoslab() to resolve objects and must already be - * a secondary. - */ - if ((zone->uz_flags & (UMA_ZONE_VTOSLAB | UMA_ZONE_SECONDARY)) - != (UMA_ZONE_VTOSLAB | UMA_ZONE_SECONDARY)) { - error = EINVAL; - goto out; - } - /* - * The new master must also use vtoslab(). - */ - if ((zone->uz_flags & UMA_ZONE_VTOSLAB) != UMA_ZONE_VTOSLAB) { - error = EINVAL; - goto out; - } - - /* - * The underlying object must be the same size. rsize - * may be different. - */ - if (master->uz_size != zone->uz_size) { - error = E2BIG; - goto out; - } - /* - * Put it at the end of the list. - */ - klink->kl_keg = zone_first_keg(master); - LIST_FOREACH(kl, &zone->uz_kegs, kl_link) { - if (LIST_NEXT(kl, kl_link) == NULL) { - LIST_INSERT_AFTER(kl, klink, kl_link); - break; - } - } - klink = NULL; - zone->uz_flags |= UMA_ZFLAG_MULTI; - zone->uz_slab = zone_fetch_slab_multi; - -out: - zone_unlock_pair(zone, master); - if (klink != NULL) - free(klink, M_TEMP); - - return (error); -} - - /* See uma.h */ void uma_zdestroy(uma_zone_t zone) @@ -2408,7 +2310,7 @@ uma_zalloc_arg(uma_zone_t zone, void *udata, int flags uma_bucket_t bucket; uma_cache_t cache; void *item; - int cpu, domain, lockfail; + int cpu, domain, lockfail, maxbucket; #ifdef INVARIANTS bool skipdbg; #endif @@ -2486,7 +2388,7 @@ zalloc_start: #endif zone->uz_ctor(item, zone->uz_size, udata, flags) != 0) { atomic_add_long(&zone->uz_fails, 1); - zone_free_item(zone, item, udata, SKIP_DTOR); + zone_free_item(zone, item, udata, SKIP_DTOR | SKIP_CNT); return (NULL); } #ifdef INVARIANTS @@ -2529,8 +2431,10 @@ zalloc_start: domain = UMA_ANYDOMAIN; /* Short-circuit for zones without buckets and low memory. */ - if (zone->uz_count == 0 || bucketdisable) + if (zone->uz_count == 0 || bucketdisable) { + ZONE_LOCK(zone); goto zalloc_item; + } /* * Attempt to retrieve the item from the per-CPU cache has failed, so @@ -2578,8 +2482,17 @@ zalloc_start: * We bump the uz count when the cache size is insufficient to * handle the working set. */ - if (lockfail && zone->uz_count < BUCKET_MAX) + if (lockfail && zone->uz_count < zone->uz_count_max) zone->uz_count++; + + if (zone->uz_max_items > 0) { + if (zone->uz_items >= zone->uz_max_items) + goto zalloc_item; + maxbucket = MIN(zone->uz_count, + zone->uz_max_items - zone->uz_items); + } else + maxbucket = zone->uz_count; + zone->uz_items += maxbucket; ZONE_UNLOCK(zone); /* @@ -2587,11 +2500,19 @@ zalloc_start: * works we'll restart the allocation from the beginning and it * will use the just filled bucket. */ - bucket = zone_alloc_bucket(zone, udata, domain, flags); + bucket = zone_alloc_bucket(zone, udata, domain, flags, maxbucket); CTR3(KTR_UMA, "uma_zalloc: zone %s(%p) bucket zone returned %p", zone->uz_name, zone, bucket); + ZONE_LOCK(zone); if (bucket != NULL) { - ZONE_LOCK(zone); + if (bucket->ub_cnt < maxbucket) { + MPASS(zone->uz_flags & UMA_ZFLAG_CACHE || + zone->uz_items >= maxbucket - bucket->ub_cnt); + zone->uz_items -= maxbucket - bucket->ub_cnt; + if (zone->uz_sleepers > 0 && + zone->uz_items < zone->uz_max_items) + wakeup_one(zone); + } critical_enter(); cpu = curcpu; cache = &zone->uz_cpu[cpu]; @@ -2606,7 +2527,7 @@ zalloc_start: domain == PCPU_GET(domain))) { cache->uc_allocbucket = bucket; zdom->uzd_imax += bucket->ub_cnt; - } else if ((zone->uz_flags & UMA_ZONE_NOBUCKETCACHE) != 0) { + } else if (zone->uz_bkt_count >= zone->uz_bkt_max) { critical_exit(); ZONE_UNLOCK(zone); bucket_drain(zone, bucket); @@ -2616,13 +2537,18 @@ zalloc_start: zone_put_bucket(zone, zdom, bucket, false); ZONE_UNLOCK(zone); goto zalloc_start; + } else { + zone->uz_items -= maxbucket; + if (zone->uz_sleepers > 0 && + zone->uz_items + 1 < zone->uz_max_items) + wakeup_one(zone); } /* * We may not be able to get a bucket so return an actual item. */ zalloc_item: - item = zone_alloc_item(zone, udata, domain, flags); + item = zone_alloc_item_locked(zone, udata, domain, flags); return (item); } @@ -2665,6 +2591,7 @@ keg_first_slab(uma_keg_t keg, int domain, bool rr) KASSERT(domain >= 0 && domain < vm_ndomains, ("keg_first_slab: domain %d out of range", domain)); + KEG_LOCK_ASSERT(keg); slab = NULL; start = domain; @@ -2690,7 +2617,7 @@ keg_fetch_free_slab(uma_keg_t keg, int domain, bool rr { uint32_t reserve; - mtx_assert(&keg->uk_lock, MA_OWNED); + KEG_LOCK_ASSERT(keg); reserve = (flags & M_USE_RESERVE) != 0 ? 0 : keg->uk_reserve; if (keg->uk_free <= reserve) @@ -2708,7 +2635,7 @@ keg_fetch_slab(uma_keg_t keg, uma_zone_t zone, int rdo bool rr; restart: - mtx_assert(&keg->uk_lock, MA_OWNED); + KEG_LOCK_ASSERT(keg); /* * Use the keg's policy if upper layers haven't already specified a @@ -2741,23 +2668,10 @@ restart: if (flags & M_NOVM) break; - if (keg->uk_maxpages && keg->uk_pages >= keg->uk_maxpages) { - keg->uk_flags |= UMA_ZFLAG_FULL; - /* - * If this is not a multi-zone, set the FULL bit. - * Otherwise slab_multi() takes care of it. - */ - if ((zone->uz_flags & UMA_ZFLAG_MULTI) == 0) { - zone->uz_flags |= UMA_ZFLAG_FULL; - zone_log_warning(zone); - zone_maxaction(zone); - } - if (flags & M_NOWAIT) - return (NULL); - zone->uz_sleeps++; - msleep(keg, &keg->uk_lock, PVM, "keglimit", 0); - continue; - } + KASSERT(zone->uz_max_items == 0 || + zone->uz_items <= zone->uz_max_items, + ("%s: zone %p overflow", __func__, zone)); + slab = keg_alloc_slab(keg, zone, domain, aflags); /* * If we got a slab here it's safe to mark it partially used @@ -2800,7 +2714,7 @@ zone_fetch_slab(uma_zone_t zone, uma_keg_t keg, int do uma_slab_t slab; if (keg == NULL) { - keg = zone_first_keg(zone); + keg = zone->uz_keg; KEG_LOCK(keg); } @@ -2815,87 +2729,6 @@ zone_fetch_slab(uma_zone_t zone, uma_keg_t keg, int do return (NULL); } -/* - * uma_zone_fetch_slab_multi: Fetches a slab from one available keg. Returns - * with the keg locked. On NULL no lock is held. - * - * The last pointer is used to seed the search. It is not required. - */ -static uma_slab_t -zone_fetch_slab_multi(uma_zone_t zone, uma_keg_t last, int domain, int rflags) -{ - uma_klink_t klink; - uma_slab_t slab; - uma_keg_t keg; - int flags; - int empty; - int full; - - /* - * Don't wait on the first pass. This will skip limit tests - * as well. We don't want to block if we can find a provider - * without blocking. - */ - flags = (rflags & ~M_WAITOK) | M_NOWAIT; - /* - * Use the last slab allocated as a hint for where to start - * the search. - */ - if (last != NULL) { - slab = keg_fetch_slab(last, zone, domain, flags); - if (slab) - return (slab); - KEG_UNLOCK(last); - } - /* - * Loop until we have a slab incase of transient failures - * while M_WAITOK is specified. I'm not sure this is 100% - * required but we've done it for so long now. - */ - for (;;) { - empty = 0; - full = 0; - /* - * Search the available kegs for slabs. Be careful to hold the - * correct lock while calling into the keg layer. - */ - LIST_FOREACH(klink, &zone->uz_kegs, kl_link) { - keg = klink->kl_keg; - KEG_LOCK(keg); - if ((keg->uk_flags & UMA_ZFLAG_FULL) == 0) { - slab = keg_fetch_slab(keg, zone, domain, flags); - if (slab) - return (slab); - } - if (keg->uk_flags & UMA_ZFLAG_FULL) - full++; - else - empty++; - KEG_UNLOCK(keg); - } - if (rflags & (M_NOWAIT | M_NOVM)) - break; - flags = rflags; - /* - * All kegs are full. XXX We can't atomically check all kegs - * and sleep so just sleep for a short period and retry. - */ - if (full && !empty) { - ZONE_LOCK(zone); - zone->uz_flags |= UMA_ZFLAG_FULL; - zone->uz_sleeps++; - zone_log_warning(zone); - zone_maxaction(zone); - msleep(zone, zone->uz_lockptr, PVM, - "zonelimit", hz/100); - zone->uz_flags &= ~UMA_ZFLAG_FULL; - ZONE_UNLOCK(zone); - continue; - } - } - return (NULL); -} - static void * slab_alloc_item(uma_keg_t keg, uma_slab_t slab) { @@ -2904,7 +2737,7 @@ slab_alloc_item(uma_keg_t keg, uma_slab_t slab) uint8_t freei; MPASS(keg == slab->us_keg); - mtx_assert(&keg->uk_lock, MA_OWNED); + KEG_LOCK_ASSERT(keg); freei = BIT_FFS(SLAB_SETSIZE, &slab->us_free) - 1; BIT_CLR(SLAB_SETSIZE, freei, &slab->us_free); @@ -2971,10 +2804,9 @@ zone_import(uma_zone_t zone, void **bucket, int max, i } static uma_bucket_t -zone_alloc_bucket(uma_zone_t zone, void *udata, int domain, int flags) +zone_alloc_bucket(uma_zone_t zone, void *udata, int domain, int flags, int max) { uma_bucket_t bucket; - int max; CTR1(KTR_UMA, "zone_alloc:_bucket domain %d)", domain); @@ -2983,7 +2815,6 @@ zone_alloc_bucket(uma_zone_t zone, void *udata, int do if (bucket == NULL) return (NULL); - max = MIN(bucket->ub_entries, zone->uz_count); bucket->ub_cnt = zone->uz_import(zone->uz_arg, bucket->ub_bucket, max, domain, flags); @@ -3038,13 +2869,45 @@ zone_alloc_bucket(uma_zone_t zone, void *udata, int do static void * zone_alloc_item(uma_zone_t zone, void *udata, int domain, int flags) { + + ZONE_LOCK(zone); + return (zone_alloc_item_locked(zone, udata, domain, flags)); +} + +/* + * Returns with zone unlocked. + */ +static void * +zone_alloc_item_locked(uma_zone_t zone, void *udata, int domain, int flags) +{ void *item; #ifdef INVARIANTS bool skipdbg; #endif - item = NULL; + ZONE_LOCK_ASSERT(zone); + if (zone->uz_max_items > 0 && zone->uz_items >= zone->uz_max_items) { + zone_log_warning(zone); + zone_maxaction(zone); + if (flags & M_NOWAIT) { + ZONE_UNLOCK(zone); + return (NULL); + } + zone->uz_sleeps++; + zone->uz_sleepers++; + while (zone->uz_items >= zone->uz_max_items) + mtx_sleep(zone, zone->uz_lockptr, PVM, "zonelimit", 0); + zone->uz_sleepers--; + if (zone->uz_sleepers > 0 && + zone->uz_items + 1 < zone->uz_max_items) + wakeup_one(zone); + } + + zone->uz_items++; + zone->uz_allocs++; + ZONE_UNLOCK(zone); + if (domain != UMA_ANYDOMAIN) { /* avoid allocs targeting empty domains */ if (VM_DOMAIN_EMPTY(domain)) @@ -3052,7 +2915,6 @@ zone_alloc_item(uma_zone_t zone, void *udata, int doma } if (zone->uz_import(zone->uz_arg, &item, 1, domain, flags) != 1) goto fail; - atomic_add_long(&zone->uz_allocs, 1); #ifdef INVARIANTS skipdbg = uma_dbg_zskip(zone, item); @@ -3065,7 +2927,7 @@ zone_alloc_item(uma_zone_t zone, void *udata, int doma */ if (zone->uz_init != NULL) { if (zone->uz_init(item, zone->uz_size, flags) != 0) { - zone_free_item(zone, item, udata, SKIP_FINI); + zone_free_item(zone, item, udata, SKIP_FINI | SKIP_CNT); goto fail; } } @@ -3075,7 +2937,7 @@ zone_alloc_item(uma_zone_t zone, void *udata, int doma zone->uz_dtor != trash_dtor) && #endif zone->uz_ctor(item, zone->uz_size, udata, flags) != 0) { - zone_free_item(zone, item, udata, SKIP_DTOR); + zone_free_item(zone, item, udata, SKIP_DTOR | SKIP_CNT); goto fail; } #ifdef INVARIANTS @@ -3091,9 +2953,13 @@ zone_alloc_item(uma_zone_t zone, void *udata, int doma return (item); fail: + ZONE_LOCK(zone); + zone->uz_items--; + zone->uz_allocs--; + ZONE_UNLOCK(zone); + atomic_add_long(&zone->uz_fails, 1); CTR2(KTR_UMA, "zone_alloc_item failed from %s(%p)", zone->uz_name, zone); - atomic_add_long(&zone->uz_fails, 1); return (NULL); } @@ -3104,7 +2970,8 @@ uma_zfree_arg(uma_zone_t zone, void *item, void *udata uma_cache_t cache; uma_bucket_t bucket; uma_zone_domain_t zdom; - int cpu, domain, lockfail; + int cpu, domain; + bool lockfail; #ifdef INVARIANTS bool skipdbg; #endif @@ -3150,7 +3017,7 @@ uma_zfree_arg(uma_zone_t zone, void *item, void *udata * The race here is acceptable. If we miss it we'll just have to wait * a little longer for the limits to be reset. */ - if (zone->uz_flags & UMA_ZFLAG_FULL) + if (zone->uz_sleepers > 0) goto zfree_item; /* @@ -3200,11 +3067,11 @@ zfree_start: if (zone->uz_count == 0 || bucketdisable) goto zfree_item; - lockfail = 0; + lockfail = false; if (ZONE_TRYLOCK(zone) == 0) { /* Record contention to size the buckets. */ ZONE_LOCK(zone); - lockfail = 1; + lockfail = true; } critical_enter(); cpu = curcpu; @@ -3233,9 +3100,9 @@ zfree_start: "uma_zfree: zone %s(%p) putting bucket %p on free list", zone->uz_name, zone, bucket); /* ub_cnt is pointing to the last free item */ - KASSERT(bucket->ub_cnt != 0, - ("uma_zfree: Attempting to insert an empty bucket onto the full list.\n")); - if ((zone->uz_flags & UMA_ZONE_NOBUCKETCACHE) != 0) { + KASSERT(bucket->ub_cnt == bucket->ub_entries, + ("uma_zfree: Attempting to insert not full bucket onto the full list.\n")); + if (zone->uz_bkt_count >= zone->uz_bkt_max) { ZONE_UNLOCK(zone); bucket_drain(zone, bucket); bucket_free(zone, bucket, udata); @@ -3248,7 +3115,7 @@ zfree_start: * We bump the uz count when the cache size is insufficient to * handle the working set. */ - if (lockfail && zone->uz_count < BUCKET_MAX) + if (lockfail && zone->uz_count < zone->uz_count_max) zone->uz_count++; ZONE_UNLOCK(zone); @@ -3279,8 +3146,6 @@ zfree_start: */ zfree_item: zone_free_item(zone, item, udata, SKIP_DTOR); - - return; } void @@ -3303,12 +3168,15 @@ uma_zfree_domain(uma_zone_t zone, void *item, void *ud } static void -slab_free_item(uma_keg_t keg, uma_slab_t slab, void *item) +slab_free_item(uma_zone_t zone, uma_slab_t slab, void *item) { + uma_keg_t keg; uma_domain_t dom; uint8_t freei; - mtx_assert(&keg->uk_lock, MA_OWNED); + keg = zone->uz_keg; + MPASS(zone->uz_lockptr == &keg->uk_lock); + KEG_LOCK_ASSERT(keg); MPASS(keg == slab->us_keg); dom = &keg->uk_domain[slab->us_domain]; @@ -3338,11 +3206,9 @@ zone_release(uma_zone_t zone, void **bucket, int cnt) uma_slab_t slab; uma_keg_t keg; uint8_t *mem; - int clearfull; int i; - clearfull = 0; - keg = zone_first_keg(zone); + keg = zone->uz_keg; KEG_LOCK(keg); for (i = 0; i < cnt; i++) { item = bucket[i]; @@ -3356,37 +3222,11 @@ zone_release(uma_zone_t zone, void **bucket, int cnt) } } else { slab = vtoslab((vm_offset_t)item); - if (slab->us_keg != keg) { - KEG_UNLOCK(keg); - keg = slab->us_keg; - KEG_LOCK(keg); - } + MPASS(slab->us_keg == keg); } - slab_free_item(keg, slab, item); - if (keg->uk_flags & UMA_ZFLAG_FULL) { - if (keg->uk_pages < keg->uk_maxpages) { - keg->uk_flags &= ~UMA_ZFLAG_FULL; - clearfull = 1; - } - - /* - * We can handle one more allocation. Since we're - * clearing ZFLAG_FULL, wake up all procs blocked - * on pages. This should be uncommon, so keeping this - * simple for now (rather than adding count of blocked - * threads etc). - */ - wakeup(keg); - } + slab_free_item(zone, slab, item); } KEG_UNLOCK(keg); - if (clearfull) { - ZONE_LOCK(zone); - zone->uz_flags &= ~UMA_ZFLAG_FULL; - wakeup(zone); - ZONE_UNLOCK(zone); - } - } /* @@ -3423,42 +3263,69 @@ zone_free_item(uma_zone_t zone, void *item, void *udat if (skip < SKIP_FINI && zone->uz_fini) zone->uz_fini(item, zone->uz_size); - atomic_add_long(&zone->uz_frees, 1); zone->uz_release(zone->uz_arg, &item, 1); + + if (skip & SKIP_CNT) + return; + + ZONE_LOCK(zone); + zone->uz_frees++; + zone->uz_items--; + if (zone->uz_sleepers > 0 && zone->uz_items < zone->uz_max_items) + wakeup_one(zone); + ZONE_UNLOCK(zone); } /* See uma.h */ int uma_zone_set_max(uma_zone_t zone, int nitems) { - uma_keg_t keg; + struct uma_bucket_zone *ubz; - keg = zone_first_keg(zone); - if (keg == NULL) - return (0); - KEG_LOCK(keg); - keg->uk_maxpages = (nitems / keg->uk_ipers) * keg->uk_ppera; - if (keg->uk_maxpages * keg->uk_ipers < nitems) - keg->uk_maxpages += keg->uk_ppera; - nitems = (keg->uk_maxpages / keg->uk_ppera) * keg->uk_ipers; - KEG_UNLOCK(keg); + /* + * If limit is very low we may need to limit how + * much items are allowed in CPU caches. + */ + ubz = &bucket_zones[0]; + for (; ubz->ubz_entries != 0; ubz++) + if (ubz->ubz_entries * 2 * mp_ncpus > nitems) + break; + if (ubz == &bucket_zones[0]) + nitems = ubz->ubz_entries * 2 * mp_ncpus; + else + ubz--; + ZONE_LOCK(zone); + zone->uz_count_max = zone->uz_count = ubz->ubz_entries; + if (zone->uz_count_min > zone->uz_count_max) + zone->uz_count_min = zone->uz_count_max; + zone->uz_max_items = nitems; + ZONE_UNLOCK(zone); + return (nitems); } /* See uma.h */ int +uma_zone_set_maxcache(uma_zone_t zone, int nitems) +{ + + ZONE_LOCK(zone); + zone->uz_bkt_max = nitems; + ZONE_UNLOCK(zone); + + return (nitems); +} + *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@freebsd.org Tue Jan 15 00:33:56 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 09AE2148C389; Tue, 15 Jan 2019 00:33:56 +0000 (UTC) (envelope-from jason.harmening@gmail.com) Received: from mail-it1-x12d.google.com (mail-it1-x12d.google.com [IPv6:2607:f8b0:4864:20::12d]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 8FA4C84CE3; Tue, 15 Jan 2019 00:33:55 +0000 (UTC) (envelope-from jason.harmening@gmail.com) Received: by mail-it1-x12d.google.com with SMTP id z7so2576026iti.0; Mon, 14 Jan 2019 16:33:55 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=kAsVfFsQGiloG+4s0Ooa/JA/N+AE/1J3AUEEvkwD4yw=; b=WtpFYL3A5emlPHYNKAeG+R3Uvcl60VtdHI8JlF3duNo/RaPvhYeHDw0OOuRHAb64xR sSQhmKqJMA52+mzAK89zofvTBz57EvL//VUKwMq4sxAc52DvFuQRQYKCsPQi2+vMWlU5 nE8pL6s3zTuU8M89SAOc5RUkEe+w7g/k29ogjLjPP9QrBur/T66l5DgCY7wtgaF85YNT U1SSe6mLrm1CWqB+zKe7oV98bnCVPWBbaCpt7GZ594Rzm0IYL1Na7ANSFolrOur5Jd9k 5kdX8+9XWtmKVYOm7f+YbQcQ1rKruPEe0tQGmSas0tp2Jy412sg+ZBoIe++Vy/8D+QiH Wcpw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=kAsVfFsQGiloG+4s0Ooa/JA/N+AE/1J3AUEEvkwD4yw=; b=m3PpCUbBQHnYX6AthtvMXqahYP27skPLcHfYcp//4/KHrjmPq8eZIeNKNg0bE6nSm6 hTpxI3dbexUmKZrHT5UKNHdNGrw4YwaBX63L8N/2zGVe3wqMSL7JB77pr8ZDJFu8xGWD HGNPkwKNsg+p/Y1kWw1kn/3O+F5e+00C3kUycJ1JEXgAceUtQwY2Fqj1WGsgLwUYQ79O hV7udedv2uerKzumbo+/rmiqWcqItgk4iAD1ng8ONueD4xvnWdKVxLRiqI6mrkQknv9V lNX6fBnt9oQXGsPoq7yQtuj0jsP6B6VkPfyGzAyLEPoUP+slOssiwU40+2GgMDBrl6FQ cy+Q== X-Gm-Message-State: AJcUukd7Z3VSGSX7TZGYS7wpKHv9rpj+TBBtWa5SRWmYN0dKLwd42J9L Ny3Qq2gAksb/au2na16P/VGrZrdWPyaMqPTjdpeg X-Google-Smtp-Source: ALg8bN6a/vNbcyJHHwl0l2vDU7fOnR2ujcv47UddBWswHH9XgNGRNymPl2z3Zz5eGz2J5lboNgEQSOxLIsU55bF+3dU= X-Received: by 2002:a02:84e1:: with SMTP id f88mr715327jai.107.1547512434568; Mon, 14 Jan 2019 16:33:54 -0800 (PST) MIME-Version: 1.0 References: <201901132033.x0DKXtin020499@repo.freebsd.org> <20190114232351.GS18452@FreeBSD.org> In-Reply-To: <20190114232351.GS18452@FreeBSD.org> From: Jason Harmening Date: Mon, 14 Jan 2019 16:33:43 -0800 Message-ID: Subject: Re: svn commit: r343005 - head/sys/kern To: Gleb Smirnoff Cc: "Jason A. Harmening" , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-Rspamd-Queue-Id: 8FA4C84CE3 X-Spamd-Bar: ------ Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-6.96 / 15.00]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_SHORT(-0.96)[-0.964,0]; REPLY(-4.00)[]; TAGGED_FROM(0.00)[]; NEURAL_HAM_LONG(-1.00)[-1.000,0] Content-Type: text/plain; charset="UTF-8" X-Content-Filtered-By: Mailman/MimeDel 2.1.29 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 15 Jan 2019 00:33:56 -0000 No problem! It was fun to dig into a part of the kernel I hadn't worked on before. On Mon, Jan 14, 2019 at 3:24 PM Gleb Smirnoff wrote: > Jason, > > thanks a lot for fixing this. > > On Sun, Jan 13, 2019 at 08:33:55PM +0000, Jason A. Harmening wrote: > J> Author: jah > J> Date: Sun Jan 13 20:33:54 2019 > J> New Revision: 343005 > J> URL: https://svnweb.freebsd.org/changeset/base/343005 > J> > J> Log: > J> Handle SIGIO for listening sockets > J> > J> r319722 separated struct socket and parts of the socket I/O path into > J> listening-socket-specific and dataflow-socket-specific pieces. > Listening > J> socket connection notifications are now handled by solisten_wakeup() > instead > J> of sowakeup(), but solisten_wakeup() does not currently post SIGIO to > the > J> owning process. > J> > J> PR: 234258 > J> Reported by: Kenneth Adelman > J> MFC after: 1 week > J> Differential Revision: https://reviews.freebsd.org/D18664 > J> > J> Modified: > J> head/sys/kern/uipc_socket.c > J> > J> Modified: head/sys/kern/uipc_socket.c > J> > ============================================================================== > J> --- head/sys/kern/uipc_socket.c Sun Jan 13 19:49:46 2019 > (r343004) > J> +++ head/sys/kern/uipc_socket.c Sun Jan 13 20:33:54 2019 > (r343005) > J> @@ -886,6 +886,8 @@ solisten_wakeup(struct socket *sol) > J> } > J> SOLISTEN_UNLOCK(sol); > J> wakeup_one(&sol->sol_comp); > J> + if ((sol->so_state & SS_ASYNC) && sol->so_sigio != NULL) > J> + pgsigio(&sol->so_sigio, SIGIO, 0); > J> } > J> > J> /* > J> > > -- > Gleb Smirnoff > From owner-svn-src-all@freebsd.org Tue Jan 15 00:35:21 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 04F43148C482; Tue, 15 Jan 2019 00:35:21 +0000 (UTC) (envelope-from glebius@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 9AEDD84E71; Tue, 15 Jan 2019 00:35:20 +0000 (UTC) (envelope-from glebius@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 8C513A9EB; Tue, 15 Jan 2019 00:35:20 +0000 (UTC) (envelope-from glebius@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x0F0ZKkD009895; Tue, 15 Jan 2019 00:35:20 GMT (envelope-from glebius@FreeBSD.org) Received: (from glebius@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x0F0ZK6d009893; Tue, 15 Jan 2019 00:35:20 GMT (envelope-from glebius@FreeBSD.org) Message-Id: <201901150035.x0F0ZK6d009893@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: glebius set sender to glebius@FreeBSD.org using -f From: Gleb Smirnoff Date: Tue, 15 Jan 2019 00:35:20 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r343027 - in head/sys: kern sys X-SVN-Group: head X-SVN-Commit-Author: glebius X-SVN-Commit-Paths: in head/sys: kern sys X-SVN-Commit-Revision: 343027 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 9AEDD84E71 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.96 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_LONG(-1.00)[-0.999,0]; NEURAL_HAM_SHORT(-0.97)[-0.966,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 15 Jan 2019 00:35:21 -0000 Author: glebius Date: Tue Jan 15 00:35:19 2019 New Revision: 343027 URL: https://svnweb.freebsd.org/changeset/base/343027 Log: Add flag LK_NEW for lockinit() that is converted to LO_NEW and passed down to lock_init(). This allows for lockinit() on a not prezeroed memory. Modified: head/sys/kern/kern_lock.c head/sys/sys/lockmgr.h Modified: head/sys/kern/kern_lock.c ============================================================================== --- head/sys/kern/kern_lock.c Tue Jan 15 00:02:06 2019 (r343026) +++ head/sys/kern/kern_lock.c Tue Jan 15 00:35:19 2019 (r343027) @@ -450,6 +450,8 @@ lockinit(struct lock *lk, int pri, const char *wmesg, iflags |= LO_QUIET; if (flags & LK_IS_VNODE) iflags |= LO_IS_VNODE; + if (flags & LK_NEW) + iflags |= LO_NEW; iflags |= flags & (LK_ADAPTIVE | LK_NOSHARE); lock_init(&lk->lock_object, &lock_class_lockmgr, wmesg, NULL, iflags); Modified: head/sys/sys/lockmgr.h ============================================================================== --- head/sys/sys/lockmgr.h Tue Jan 15 00:02:06 2019 (r343026) +++ head/sys/sys/lockmgr.h Tue Jan 15 00:35:19 2019 (r343027) @@ -143,7 +143,7 @@ _lockmgr_args_rw(struct lock *lk, u_int flags, struct /* * Flags for lockinit(). */ -#define LK_INIT_MASK 0x0000FF +#define LK_INIT_MASK 0x0001FF #define LK_CANRECURSE 0x000001 #define LK_NODUP 0x000002 #define LK_NOPROFILE 0x000004 @@ -152,6 +152,7 @@ _lockmgr_args_rw(struct lock *lk, u_int flags, struct #define LK_QUIET 0x000020 #define LK_ADAPTIVE 0x000040 #define LK_IS_VNODE 0x000080 /* Tell WITNESS about a VNODE lock */ +#define LK_NEW 0x000100 /* * Additional attributes to be used in lockmgr(). From owner-svn-src-all@freebsd.org Tue Jan 15 00:37:38 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id ECBBC148C536; Tue, 15 Jan 2019 00:37:37 +0000 (UTC) (envelope-from gonzo@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 9181E84FF5; Tue, 15 Jan 2019 00:37:37 +0000 (UTC) (envelope-from gonzo@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 7C3E8A9ED; Tue, 15 Jan 2019 00:37:37 +0000 (UTC) (envelope-from gonzo@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x0F0bbuT010027; Tue, 15 Jan 2019 00:37:37 GMT (envelope-from gonzo@FreeBSD.org) Received: (from gonzo@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x0F0bbxJ010026; Tue, 15 Jan 2019 00:37:37 GMT (envelope-from gonzo@FreeBSD.org) Message-Id: <201901150037.x0F0bbxJ010026@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gonzo set sender to gonzo@FreeBSD.org using -f From: Oleksandr Tymoshenko Date: Tue, 15 Jan 2019 00:37:37 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r343028 - head/sys/arm/mv X-SVN-Group: head X-SVN-Commit-Author: gonzo X-SVN-Commit-Paths: head/sys/arm/mv X-SVN-Commit-Revision: 343028 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 9181E84FF5 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.96 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_SHORT(-0.97)[-0.966,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_LONG(-1.00)[-0.999,0] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 15 Jan 2019 00:37:38 -0000 Author: gonzo Date: Tue Jan 15 00:37:37 2019 New Revision: 343028 URL: https://svnweb.freebsd.org/changeset/base/343028 Log: [mv_pci] Increase default PCI space size for mv_pci mv_pci driver reads PCI memory window layout from DTB data and if the data is incomplete falls back to default value. The value is too small to fit two PCI spaces for mwlwifi devices on WRT3200ACM so the resource allocation for them fails. Increase the default to 4Mb from 1Mb so the devices can be properly attached. MFC after: 1 week Modified: head/sys/arm/mv/mv_pci.c Modified: head/sys/arm/mv/mv_pci.c ============================================================================== --- head/sys/arm/mv/mv_pci.c Tue Jan 15 00:35:19 2019 (r343027) +++ head/sys/arm/mv/mv_pci.c Tue Jan 15 00:37:37 2019 (r343028) @@ -100,7 +100,7 @@ struct mv_pci_range { }; #define FDT_RANGES_CELLS ((3 + 3 + 2) * 2) -#define PCI_SPACE_LEN 0x00100000 +#define PCI_SPACE_LEN 0x00400000 static void mv_pci_range_dump(struct mv_pci_range *range) From owner-svn-src-all@freebsd.org Tue Jan 15 00:52:42 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 5D92F148CA06; Tue, 15 Jan 2019 00:52:42 +0000 (UTC) (envelope-from gonzo@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 01D318598C; Tue, 15 Jan 2019 00:52:42 +0000 (UTC) (envelope-from gonzo@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id DAA6AAD4F; Tue, 15 Jan 2019 00:52:41 +0000 (UTC) (envelope-from gonzo@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x0F0qf7j020568; Tue, 15 Jan 2019 00:52:41 GMT (envelope-from gonzo@FreeBSD.org) Received: (from gonzo@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x0F0qfLk020567; Tue, 15 Jan 2019 00:52:41 GMT (envelope-from gonzo@FreeBSD.org) Message-Id: <201901150052.x0F0qfLk020567@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gonzo set sender to gonzo@FreeBSD.org using -f From: Oleksandr Tymoshenko Date: Tue, 15 Jan 2019 00:52:41 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r343029 - head/sys/dev/led X-SVN-Group: head X-SVN-Commit-Author: gonzo X-SVN-Commit-Paths: head/sys/dev/led X-SVN-Commit-Revision: 343029 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 01D318598C X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.96 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_LONG(-1.00)[-0.999,0]; NEURAL_HAM_SHORT(-0.97)[-0.966,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 15 Jan 2019 00:52:42 -0000 Author: gonzo Date: Tue Jan 15 00:52:41 2019 New Revision: 343029 URL: https://svnweb.freebsd.org/changeset/base/343029 Log: [led] propagate error from set_led() to the caller Do not lose error condition by always returning 0 from set_led. None of the calls to set_led checks for return value at the moment so none of API consumers in base is affected. PR: 231567 Submitted by: Bertrand Petit MFC after: 1 week Modified: head/sys/dev/led/led.c Modified: head/sys/dev/led/led.c ============================================================================== --- head/sys/dev/led/led.c Tue Jan 15 00:37:37 2019 (r343028) +++ head/sys/dev/led/led.c Tue Jan 15 00:52:41 2019 (r343029) @@ -261,7 +261,7 @@ led_set(char const *name, char const *cmd) mtx_unlock(&led_mtx); if (sb != NULL) sbuf_delete(sb); - return (0); + return (error); } static struct cdevsw led_cdevsw = { From owner-svn-src-all@freebsd.org Tue Jan 15 01:02:21 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 53B28148D052; Tue, 15 Jan 2019 01:02:21 +0000 (UTC) (envelope-from glebius@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 007F3865C9; Tue, 15 Jan 2019 01:02:21 +0000 (UTC) (envelope-from glebius@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id E5AAEAEEE; Tue, 15 Jan 2019 01:02:20 +0000 (UTC) (envelope-from glebius@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x0F12KOh026660; Tue, 15 Jan 2019 01:02:20 GMT (envelope-from glebius@FreeBSD.org) Received: (from glebius@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x0F12Hlt025856; Tue, 15 Jan 2019 01:02:17 GMT (envelope-from glebius@FreeBSD.org) Message-Id: <201901150102.x0F12Hlt025856@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: glebius set sender to glebius@FreeBSD.org using -f From: Gleb Smirnoff Date: Tue, 15 Jan 2019 01:02:17 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r343030 - in head/sys: cam conf dev/md dev/nvme fs/fuse fs/nfsclient fs/smbfs kern sys ufs/ffs vm X-SVN-Group: head X-SVN-Commit-Author: glebius X-SVN-Commit-Paths: in head/sys: cam conf dev/md dev/nvme fs/fuse fs/nfsclient fs/smbfs kern sys ufs/ffs vm X-SVN-Commit-Revision: 343030 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 007F3865C9 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.97 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_SHORT(-0.97)[-0.971,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_LONG(-1.00)[-0.999,0] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 15 Jan 2019 01:02:21 -0000 Author: glebius Date: Tue Jan 15 01:02:16 2019 New Revision: 343030 URL: https://svnweb.freebsd.org/changeset/base/343030 Log: Allocate pager bufs from UMA instead of 80-ish mutex protected linked list. o In vm_pager_bufferinit() create pbuf_zone and start accounting on how many pbufs are we going to have set. In various subsystems that are going to utilize pbufs create private zones via call to pbuf_zsecond_create(). The latter calls uma_zsecond_create(), and sets a limit on created zone. After startup preallocate pbufs according to requirements of all pbuf zones. Subsystems that used to have a private limit with old allocator now have private pbuf zones: md(4), fusefs, NFS client, smbfs, VFS cluster, FFS, swap, vnode pager. The following subsystems use shared pbuf zone: cam(4), nvme(4), physio(9), aio(4). They should have their private limits, but changing that is out of scope of this commit. o Fetch tunable value of kern.nswbuf from init_param2() and while here move NSWBUF_MIN to opt_param.h and eliminate opt_swap.h, that was holding only this option. Default values aren't touched by this commit, but they probably should be reviewed wrt to modern hardware. This change removes a tight bottleneck from sendfile(2) operation, that uses pbufs in vnode pager. Other pagers also would benefit from faster allocation. Together with: gallatin Tested by: pho Modified: head/sys/cam/cam_periph.c head/sys/conf/options head/sys/dev/md/md.c head/sys/dev/nvme/nvme_ctrlr.c head/sys/fs/fuse/fuse_main.c head/sys/fs/fuse/fuse_vnops.c head/sys/fs/nfsclient/nfs_clbio.c head/sys/fs/nfsclient/nfs_clport.c head/sys/fs/smbfs/smbfs_io.c head/sys/fs/smbfs/smbfs_vfsops.c head/sys/kern/kern_physio.c head/sys/kern/subr_param.c head/sys/kern/vfs_aio.c head/sys/kern/vfs_bio.c head/sys/kern/vfs_cluster.c head/sys/sys/buf.h head/sys/ufs/ffs/ffs_rawread.c head/sys/vm/swap_pager.c head/sys/vm/vm_pager.c head/sys/vm/vnode_pager.c Modified: head/sys/cam/cam_periph.c ============================================================================== --- head/sys/cam/cam_periph.c Tue Jan 15 00:52:41 2019 (r343029) +++ head/sys/cam/cam_periph.c Tue Jan 15 01:02:16 2019 (r343030) @@ -936,7 +936,7 @@ cam_periph_mapmem(union ccb *ccb, struct cam_periph_ma /* * Get the buffer. */ - mapinfo->bp[i] = getpbuf(NULL); + mapinfo->bp[i] = uma_zalloc(pbuf_zone, M_WAITOK); /* put our pointer in the data slot */ mapinfo->bp[i]->b_data = *data_ptrs[i]; @@ -962,9 +962,9 @@ cam_periph_mapmem(union ccb *ccb, struct cam_periph_ma for (j = 0; j < i; ++j) { *data_ptrs[j] = mapinfo->bp[j]->b_caller1; vunmapbuf(mapinfo->bp[j]); - relpbuf(mapinfo->bp[j], NULL); + uma_zfree(pbuf_zone, mapinfo->bp[j]); } - relpbuf(mapinfo->bp[i], NULL); + uma_zfree(pbuf_zone, mapinfo->bp[i]); PRELE(curproc); return(EACCES); } @@ -1052,7 +1052,7 @@ cam_periph_unmapmem(union ccb *ccb, struct cam_periph_ vunmapbuf(mapinfo->bp[i]); /* release the buffer */ - relpbuf(mapinfo->bp[i], NULL); + uma_zfree(pbuf_zone, mapinfo->bp[i]); } /* allow ourselves to be swapped once again */ Modified: head/sys/conf/options ============================================================================== --- head/sys/conf/options Tue Jan 15 00:52:41 2019 (r343029) +++ head/sys/conf/options Tue Jan 15 01:02:16 2019 (r343030) @@ -187,7 +187,7 @@ NO_ADAPTIVE_SX NO_EVENTTIMERS opt_timer.h NO_OBSOLETE_CODE opt_global.h NO_SYSCTL_DESCR opt_global.h -NSWBUF_MIN opt_swap.h +NSWBUF_MIN opt_param.h MBUF_PACKET_ZONE_DISABLE opt_global.h PANIC_REBOOT_WAIT_TIME opt_panic.h PCI_HP opt_pci.h Modified: head/sys/dev/md/md.c ============================================================================== --- head/sys/dev/md/md.c Tue Jan 15 00:52:41 2019 (r343029) +++ head/sys/dev/md/md.c Tue Jan 15 01:02:16 2019 (r343030) @@ -231,7 +231,7 @@ static LIST_HEAD(, md_s) md_softc_list = LIST_HEAD_INI #define NMASK (NINDIR-1) static int nshift; -static int md_vnode_pbuf_freecnt; +static uma_zone_t md_pbuf_zone; struct indir { uintptr_t *array; @@ -962,7 +962,7 @@ mdstart_vnode(struct md_s *sc, struct bio *bp) auio.uio_iovcnt = piov - auio.uio_iov; piov = auio.uio_iov; } else if ((bp->bio_flags & BIO_UNMAPPED) != 0) { - pb = getpbuf(&md_vnode_pbuf_freecnt); + pb = uma_zalloc(md_pbuf_zone, M_WAITOK); bp->bio_resid = len; unmapped_step: npages = atop(min(MAXPHYS, round_page(len + (ma_offs & @@ -1013,7 +1013,7 @@ unmapped_step: if (len > 0) goto unmapped_step; } - relpbuf(pb, &md_vnode_pbuf_freecnt); + uma_zfree(md_pbuf_zone, pb); } free(piov, M_MD); @@ -2118,7 +2118,7 @@ g_md_init(struct g_class *mp __unused) sx_xunlock(&md_sx); } } - md_vnode_pbuf_freecnt = nswbuf / 10; + md_pbuf_zone = pbuf_zsecond_create("mdpbuf", nswbuf / 10); status_dev = make_dev(&mdctl_cdevsw, INT_MAX, UID_ROOT, GID_WHEEL, 0600, MDCTL_NAME); g_topology_lock(); @@ -2214,5 +2214,6 @@ g_md_fini(struct g_class *mp __unused) sx_destroy(&md_sx); if (status_dev != NULL) destroy_dev(status_dev); + uma_zdestroy(md_pbuf_zone); delete_unrhdr(md_uh); } Modified: head/sys/dev/nvme/nvme_ctrlr.c ============================================================================== --- head/sys/dev/nvme/nvme_ctrlr.c Tue Jan 15 00:52:41 2019 (r343029) +++ head/sys/dev/nvme/nvme_ctrlr.c Tue Jan 15 01:02:16 2019 (r343030) @@ -1052,7 +1052,7 @@ nvme_ctrlr_passthrough_cmd(struct nvme_controller *ctr * this passthrough command. */ PHOLD(curproc); - buf = getpbuf(NULL); + buf = uma_zalloc(pbuf_zone, M_WAITOK); buf->b_data = pt->buf; buf->b_bufsize = pt->len; buf->b_iocmd = pt->is_read ? BIO_READ : BIO_WRITE; @@ -1101,7 +1101,7 @@ nvme_ctrlr_passthrough_cmd(struct nvme_controller *ctr err: if (buf != NULL) { - relpbuf(buf, NULL); + uma_zfree(pbuf_zone, buf); PRELE(curproc); } Modified: head/sys/fs/fuse/fuse_main.c ============================================================================== --- head/sys/fs/fuse/fuse_main.c Tue Jan 15 00:52:41 2019 (r343029) +++ head/sys/fs/fuse/fuse_main.c Tue Jan 15 01:02:16 2019 (r343030) @@ -84,7 +84,7 @@ struct mtx fuse_mtx; extern struct vfsops fuse_vfsops; extern struct cdevsw fuse_cdevsw; extern struct vop_vector fuse_vnops; -extern int fuse_pbuf_freecnt; +extern uma_zone_t fuse_pbuf_zone; static struct vfsconf fuse_vfsconf = { .vfc_version = VFS_VERSION, @@ -122,7 +122,6 @@ fuse_loader(struct module *m, int what, void *arg) switch (what) { case MOD_LOAD: /* kldload */ - fuse_pbuf_freecnt = nswbuf / 2 + 1; mtx_init(&fuse_mtx, "fuse_mtx", NULL, MTX_DEF); err = fuse_device_init(); if (err) { @@ -130,6 +129,7 @@ fuse_loader(struct module *m, int what, void *arg) return (err); } fuse_ipc_init(); + fuse_pbuf_zone = pbuf_zsecond_create("fusepbuf", nswbuf / 2); /* vfs_modevent ignores its first arg */ if ((err = vfs_modevent(NULL, what, &fuse_vfsconf))) @@ -144,6 +144,7 @@ fuse_loader(struct module *m, int what, void *arg) if ((err = vfs_modevent(NULL, what, &fuse_vfsconf))) return (err); fuse_bringdown(eh_tag); + uma_zdestroy(fuse_pbuf_zone); break; default: return (EINVAL); Modified: head/sys/fs/fuse/fuse_vnops.c ============================================================================== --- head/sys/fs/fuse/fuse_vnops.c Tue Jan 15 00:52:41 2019 (r343029) +++ head/sys/fs/fuse/fuse_vnops.c Tue Jan 15 01:02:16 2019 (r343030) @@ -201,7 +201,7 @@ static int fuse_reclaim_revoked = 0; SYSCTL_INT(_vfs_fuse, OID_AUTO, reclaim_revoked, CTLFLAG_RW, &fuse_reclaim_revoked, 0, ""); -int fuse_pbuf_freecnt = -1; +uma_zone_t fuse_pbuf_zone; #define fuse_vm_page_lock(m) vm_page_lock((m)); #define fuse_vm_page_unlock(m) vm_page_unlock((m)); @@ -1824,7 +1824,7 @@ fuse_vnop_getpages(struct vop_getpages_args *ap) * We use only the kva address for the buffer, but this is extremely * convenient and fast. */ - bp = getpbuf(&fuse_pbuf_freecnt); + bp = uma_zalloc(fuse_pbuf_zone, M_WAITOK); kva = (vm_offset_t)bp->b_data; pmap_qenter(kva, pages, npages); @@ -1845,7 +1845,7 @@ fuse_vnop_getpages(struct vop_getpages_args *ap) error = fuse_io_dispatch(vp, &uio, IO_DIRECT, cred); pmap_qremove(kva, npages); - relpbuf(bp, &fuse_pbuf_freecnt); + uma_zfree(fuse_pbuf_zone, bp); if (error && (uio.uio_resid == count)) { FS_DEBUG("error %d\n", error); @@ -1958,7 +1958,7 @@ fuse_vnop_putpages(struct vop_putpages_args *ap) * We use only the kva address for the buffer, but this is extremely * convenient and fast. */ - bp = getpbuf(&fuse_pbuf_freecnt); + bp = uma_zalloc(fuse_pbuf_zone, M_WAITOK); kva = (vm_offset_t)bp->b_data; pmap_qenter(kva, pages, npages); @@ -1978,7 +1978,7 @@ fuse_vnop_putpages(struct vop_putpages_args *ap) error = fuse_io_dispatch(vp, &uio, IO_DIRECT, cred); pmap_qremove(kva, npages); - relpbuf(bp, &fuse_pbuf_freecnt); + uma_zfree(fuse_pbuf_zone, bp); if (!error) { int nwritten = round_page(count - uio.uio_resid) / PAGE_SIZE; Modified: head/sys/fs/nfsclient/nfs_clbio.c ============================================================================== --- head/sys/fs/nfsclient/nfs_clbio.c Tue Jan 15 00:52:41 2019 (r343029) +++ head/sys/fs/nfsclient/nfs_clbio.c Tue Jan 15 01:02:16 2019 (r343030) @@ -70,7 +70,7 @@ extern struct nfsmount *ncl_iodmount[NFS_MAXASYNCDAEMO extern int newnfs_directio_enable; extern int nfs_keep_dirty_on_error; -int ncl_pbuf_freecnt = -1; /* start out unlimited */ +uma_zone_t ncl_pbuf_zone; static struct buf *nfs_getcacheblk(struct vnode *vp, daddr_t bn, int size, struct thread *td); @@ -182,7 +182,7 @@ ncl_getpages(struct vop_getpages_args *ap) * We use only the kva address for the buffer, but this is extremely * convenient and fast. */ - bp = getpbuf(&ncl_pbuf_freecnt); + bp = uma_zalloc(ncl_pbuf_zone, M_WAITOK); kva = (vm_offset_t) bp->b_data; pmap_qenter(kva, pages, npages); @@ -203,7 +203,7 @@ ncl_getpages(struct vop_getpages_args *ap) error = ncl_readrpc(vp, &uio, cred); pmap_qremove(kva, npages); - relpbuf(bp, &ncl_pbuf_freecnt); + uma_zfree(ncl_pbuf_zone, bp); if (error && (uio.uio_resid == count)) { printf("ncl_getpages: error %d\n", error); @@ -793,7 +793,7 @@ do_sync: while (uiop->uio_resid > 0) { size = MIN(uiop->uio_resid, wsize); size = MIN(uiop->uio_iov->iov_len, size); - bp = getpbuf(&ncl_pbuf_freecnt); + bp = uma_zalloc(ncl_pbuf_zone, M_WAITOK); t_uio = malloc(sizeof(struct uio), M_NFSDIRECTIO, M_WAITOK); t_iov = malloc(sizeof(struct iovec), M_NFSDIRECTIO, M_WAITOK); t_iov->iov_base = malloc(size, M_NFSDIRECTIO, M_WAITOK); @@ -836,7 +836,7 @@ err_free: free(t_iov, M_NFSDIRECTIO); free(t_uio, M_NFSDIRECTIO); bp->b_vp = NULL; - relpbuf(bp, &ncl_pbuf_freecnt); + uma_zfree(ncl_pbuf_zone, bp); if (error == EINTR) return (error); goto do_sync; @@ -1571,7 +1571,7 @@ ncl_doio_directwrite(struct buf *bp) mtx_unlock(&np->n_mtx); } bp->b_vp = NULL; - relpbuf(bp, &ncl_pbuf_freecnt); + uma_zfree(ncl_pbuf_zone, bp); } /* Modified: head/sys/fs/nfsclient/nfs_clport.c ============================================================================== --- head/sys/fs/nfsclient/nfs_clport.c Tue Jan 15 00:52:41 2019 (r343029) +++ head/sys/fs/nfsclient/nfs_clport.c Tue Jan 15 01:02:16 2019 (r343030) @@ -79,7 +79,7 @@ extern struct vop_vector newnfs_vnodeops; extern struct vop_vector newnfs_fifoops; extern uma_zone_t newnfsnode_zone; extern struct buf_ops buf_ops_newnfs; -extern int ncl_pbuf_freecnt; +extern uma_zone_t ncl_pbuf_zone; extern short nfsv4_cbport; extern int nfscl_enablecallb; extern int nfs_numnfscbd; @@ -1023,7 +1023,7 @@ nfscl_init(void) return; inited = 1; nfscl_inited = 1; - ncl_pbuf_freecnt = nswbuf / 2 + 1; + ncl_pbuf_zone = pbuf_zsecond_create("nfspbuf", nswbuf / 2); } /* @@ -1357,6 +1357,7 @@ nfscl_modevent(module_t mod, int type, void *data) #if 0 ncl_call_invalcaches = NULL; nfsd_call_nfscl = NULL; + uma_zdestroy(ncl_pbuf_zone); /* and get rid of the mutexes */ mtx_destroy(&ncl_iod_mutex); loaded = 0; Modified: head/sys/fs/smbfs/smbfs_io.c ============================================================================== --- head/sys/fs/smbfs/smbfs_io.c Tue Jan 15 00:52:41 2019 (r343029) +++ head/sys/fs/smbfs/smbfs_io.c Tue Jan 15 01:02:16 2019 (r343030) @@ -63,7 +63,7 @@ /*#define SMBFS_RWGENERIC*/ -extern int smbfs_pbuf_freecnt; +extern uma_zone_t smbfs_pbuf_zone; static int smbfs_fastlookup = 1; @@ -468,7 +468,7 @@ smbfs_getpages(ap) scred = smbfs_malloc_scred(); smb_makescred(scred, td, cred); - bp = getpbuf(&smbfs_pbuf_freecnt); + bp = uma_zalloc(smbfs_pbuf_zone, M_WAITOK); kva = (vm_offset_t) bp->b_data; pmap_qenter(kva, pages, npages); @@ -490,7 +490,7 @@ smbfs_getpages(ap) smbfs_free_scred(scred); pmap_qremove(kva, npages); - relpbuf(bp, &smbfs_pbuf_freecnt); + uma_zfree(smbfs_pbuf_zone, bp); if (error && (uio.uio_resid == count)) { printf("smbfs_getpages: error %d\n",error); @@ -593,7 +593,7 @@ smbfs_putpages(ap) rtvals[i] = VM_PAGER_ERROR; } - bp = getpbuf(&smbfs_pbuf_freecnt); + bp = uma_zalloc(smbfs_pbuf_zone, M_WAITOK); kva = (vm_offset_t) bp->b_data; pmap_qenter(kva, pages, npages); @@ -621,7 +621,7 @@ smbfs_putpages(ap) pmap_qremove(kva, npages); - relpbuf(bp, &smbfs_pbuf_freecnt); + uma_zfree(smbfs_pbuf_zone, bp); if (error == 0) { vnode_pager_undirty_pages(pages, rtvals, count - uio.uio_resid, Modified: head/sys/fs/smbfs/smbfs_vfsops.c ============================================================================== --- head/sys/fs/smbfs/smbfs_vfsops.c Tue Jan 15 00:52:41 2019 (r343029) +++ head/sys/fs/smbfs/smbfs_vfsops.c Tue Jan 15 01:02:16 2019 (r343030) @@ -88,7 +88,7 @@ MODULE_DEPEND(smbfs, netsmb, NSMB_VERSION, NSMB_VERSIO MODULE_DEPEND(smbfs, libiconv, 1, 1, 2); MODULE_DEPEND(smbfs, libmchain, 1, 1, 1); -int smbfs_pbuf_freecnt = -1; /* start out unlimited */ +uma_zone_t smbfs_pbuf_zone; static int smbfs_cmount(struct mntarg *ma, void * data, uint64_t flags) @@ -367,7 +367,8 @@ smbfs_quotactl(mp, cmd, uid, arg) int smbfs_init(struct vfsconf *vfsp) { - smbfs_pbuf_freecnt = nswbuf / 2 + 1; + + smbfs_pbuf_zone = pbuf_zsecond_create("smbpbuf", nswbuf / 2); SMBVDEBUG("done.\n"); return 0; } @@ -377,6 +378,7 @@ int smbfs_uninit(struct vfsconf *vfsp) { + uma_zdestroy(smbfs_pbuf_zone); SMBVDEBUG("done.\n"); return 0; } Modified: head/sys/kern/kern_physio.c ============================================================================== --- head/sys/kern/kern_physio.c Tue Jan 15 00:52:41 2019 (r343029) +++ head/sys/kern/kern_physio.c Tue Jan 15 01:02:16 2019 (r343030) @@ -104,7 +104,7 @@ physio(struct cdev *dev, struct uio *uio, int ioflag) maxpages = btoc(MIN(uio->uio_resid, MAXPHYS)) + 1; pages = malloc(sizeof(*pages) * maxpages, M_DEVBUF, M_WAITOK); } else { - pbuf = getpbuf(NULL); + pbuf = uma_zalloc(pbuf_zone, M_WAITOK); sa = pbuf->b_data; maxpages = btoc(MAXPHYS); pages = pbuf->b_pages; @@ -220,7 +220,7 @@ physio(struct cdev *dev, struct uio *uio, int ioflag) } doerror: if (pbuf) - relpbuf(pbuf, NULL); + uma_zfree(pbuf_zone, pbuf); else if (pages) free(pages, M_DEVBUF); g_destroy_bio(bp); Modified: head/sys/kern/subr_param.c ============================================================================== --- head/sys/kern/subr_param.c Tue Jan 15 00:52:41 2019 (r343029) +++ head/sys/kern/subr_param.c Tue Jan 15 01:02:16 2019 (r343030) @@ -45,6 +45,7 @@ __FBSDID("$FreeBSD$"); #include #include +#include #include #include #include @@ -285,6 +286,15 @@ init_param2(long physpages) nbuf = NBUF; TUNABLE_INT_FETCH("kern.nbuf", &nbuf); TUNABLE_INT_FETCH("kern.bio_transient_maxcnt", &bio_transient_maxcnt); + + /* + * Physical buffers are pre-allocated buffers (struct buf) that + * are used as temporary holders for I/O, such as paging I/O. + */ + nswbuf = min(nbuf / 4, 256); + TUNABLE_INT_FETCH("kern.nswbuf", &nswbuf); + if (nswbuf < NSWBUF_MIN) + nswbuf = NSWBUF_MIN; /* * The default for maxpipekva is min(1/64 of the kernel address space, Modified: head/sys/kern/vfs_aio.c ============================================================================== --- head/sys/kern/vfs_aio.c Tue Jan 15 00:52:41 2019 (r343029) +++ head/sys/kern/vfs_aio.c Tue Jan 15 01:02:16 2019 (r343030) @@ -1267,7 +1267,7 @@ aio_qbio(struct proc *p, struct kaiocb *job) goto unref; } - job->pbuf = pbuf = (struct buf *)getpbuf(NULL); + job->pbuf = pbuf = uma_zalloc(pbuf_zone, M_WAITOK); BUF_KERNPROC(pbuf); AIO_LOCK(ki); ki->kaio_buffer_count++; @@ -1318,7 +1318,7 @@ doerror: AIO_LOCK(ki); ki->kaio_buffer_count--; AIO_UNLOCK(ki); - relpbuf(pbuf, NULL); + uma_zfree(pbuf_zone, pbuf); job->pbuf = NULL; } g_destroy_bio(bp); @@ -2344,7 +2344,7 @@ aio_biowakeup(struct bio *bp) ki = userp->p_aioinfo; if (job->pbuf) { pmap_qremove((vm_offset_t)job->pbuf->b_data, job->npages); - relpbuf(job->pbuf, NULL); + uma_zfree(pbuf_zone, job->pbuf); job->pbuf = NULL; atomic_subtract_int(&num_buf_aio, 1); AIO_LOCK(ki); Modified: head/sys/kern/vfs_bio.c ============================================================================== --- head/sys/kern/vfs_bio.c Tue Jan 15 00:52:41 2019 (r343029) +++ head/sys/kern/vfs_bio.c Tue Jan 15 01:02:16 2019 (r343030) @@ -86,7 +86,6 @@ __FBSDID("$FreeBSD$"); #include #include #include -#include "opt_swap.h" static MALLOC_DEFINE(M_BIOBUF, "biobuf", "BIO buffer"); @@ -1017,10 +1016,6 @@ bd_speedup(void) mtx_unlock(&bdlock); } -#ifndef NSWBUF_MIN -#define NSWBUF_MIN 16 -#endif - #ifdef __i386__ #define TRANSIENT_DENOM 5 #else @@ -1130,19 +1125,8 @@ kern_vfs_bio_buffer_alloc(caddr_t v, long physmem_est) } /* - * swbufs are used as temporary holders for I/O, such as paging I/O. - * We have no less then 16 and no more then 256. - */ - nswbuf = min(nbuf / 4, 256); - TUNABLE_INT_FETCH("kern.nswbuf", &nswbuf); - if (nswbuf < NSWBUF_MIN) - nswbuf = NSWBUF_MIN; - - /* * Reserve space for the buffer cache buffers */ - swbuf = (void *)v; - v = (caddr_t)(swbuf + nswbuf); buf = (void *)v; v = (caddr_t)(buf + nbuf); Modified: head/sys/kern/vfs_cluster.c ============================================================================== --- head/sys/kern/vfs_cluster.c Tue Jan 15 00:52:41 2019 (r343029) +++ head/sys/kern/vfs_cluster.c Tue Jan 15 01:02:16 2019 (r343030) @@ -63,7 +63,9 @@ SYSCTL_INT(_debug, OID_AUTO, rcluster, CTLFLAG_RW, &rc #endif static MALLOC_DEFINE(M_SEGMENT, "cl_savebuf", "cluster_save buffer"); +static uma_zone_t cluster_pbuf_zone; +static void cluster_init(void *); static struct cluster_save *cluster_collectbufs(struct vnode *vp, struct buf *last_bp, int gbflags); static struct buf *cluster_rbuild(struct vnode *vp, u_quad_t filesize, @@ -83,6 +85,15 @@ static int read_min = 1; SYSCTL_INT(_vfs, OID_AUTO, read_min, CTLFLAG_RW, &read_min, 0, "Cluster read min block count"); +SYSINIT(cluster, SI_SUB_CPU, SI_ORDER_ANY, cluster_init, NULL); + +static void +cluster_init(void *dummy) +{ + + cluster_pbuf_zone = pbuf_zsecond_create("clpbuf", nswbuf / 2); +} + /* * Read data to a buf, including read-ahead if we find this to be beneficial. * cluster_read replaces bread. @@ -372,7 +383,7 @@ cluster_rbuild(struct vnode *vp, u_quad_t filesize, da ((tbp->b_flags & B_VMIO) == 0) || (run <= 1) ) return tbp; - bp = trypbuf(&cluster_pbuf_freecnt); + bp = uma_zalloc(cluster_pbuf_zone, M_NOWAIT); if (bp == NULL) return tbp; @@ -603,7 +614,7 @@ cluster_callback(struct buf *bp) bufdone(tbp); } pbrelvp(bp); - relpbuf(bp, &cluster_pbuf_freecnt); + uma_zfree(cluster_pbuf_zone, bp); } /* @@ -856,9 +867,8 @@ cluster_wbuild(struct vnode *vp, long size, daddr_t st (tbp->b_bcount != tbp->b_bufsize) || (tbp->b_bcount != size) || (len == 1) || - ((bp = (vp->v_vflag & VV_MD) != 0 ? - trypbuf(&cluster_pbuf_freecnt) : - getpbuf(&cluster_pbuf_freecnt)) == NULL)) { + ((bp = uma_zalloc(cluster_pbuf_zone, + (vp->v_vflag & VV_MD) != 0 ? M_NOWAIT : M_WAITOK)) == NULL)) { totalwritten += tbp->b_bufsize; bawrite(tbp); ++start_lbn; Modified: head/sys/sys/buf.h ============================================================================== --- head/sys/sys/buf.h Tue Jan 15 00:52:41 2019 (r343029) +++ head/sys/sys/buf.h Tue Jan 15 01:02:16 2019 (r343030) @@ -44,6 +44,7 @@ #include #include #include +#include struct bio; struct buf; @@ -275,6 +276,11 @@ struct buf { #define PRINT_BUF_VFLAGS "\20\4bkgrderr\3bkgrdwait\2bkgrdinprog\1scanned" #ifdef _KERNEL + +#ifndef NSWBUF_MIN +#define NSWBUF_MIN 16 +#endif + /* * Buffer locking */ @@ -287,7 +293,7 @@ extern const char *buf_wmesg; /* Default buffer lock * Initialize a lock. */ #define BUF_LOCKINIT(bp) \ - lockinit(&(bp)->b_lock, PRIBIO + 4, buf_wmesg, 0, 0) + lockinit(&(bp)->b_lock, PRIBIO + 4, buf_wmesg, 0, LK_NEW) /* * * Get a lock sleeping non-interruptably until it becomes available. @@ -493,10 +499,6 @@ extern int bdwriteskip; extern int dirtybufferflushes; extern int altbufferflushes; extern int nswbuf; /* Number of swap I/O buffer headers. */ -extern int cluster_pbuf_freecnt; /* Number of pbufs for clusters */ -extern int vnode_pbuf_freecnt; /* Number of pbufs for vnode pager */ -extern int vnode_async_pbuf_freecnt; /* Number of pbufs for vnode pager, - asynchronous reads */ extern caddr_t unmapped_buf; /* Data address for unmapped buffers. */ static inline int @@ -537,7 +539,6 @@ void brelse(struct buf *); void bqrelse(struct buf *); int vfs_bio_awrite(struct buf *); void vfs_drain_busy_pages(struct buf *bp); -struct buf * getpbuf(int *); struct buf *incore(struct bufobj *, daddr_t); struct buf *gbincore(struct bufobj *, daddr_t); struct buf *getblk(struct vnode *, daddr_t, int, int, int, int); @@ -549,6 +550,9 @@ int bufwrite(struct buf *); void bufdone(struct buf *); void bd_speedup(void); +extern uma_zone_t pbuf_zone; +uma_zone_t pbuf_zsecond_create(char *name, int max); + int cluster_read(struct vnode *, u_quad_t, daddr_t, long, struct ucred *, long, int, int, struct buf **); int cluster_wbuild(struct vnode *, long, daddr_t, int, int); @@ -562,7 +566,6 @@ void vfs_busy_pages(struct buf *, int clear_modify); void vfs_unbusy_pages(struct buf *); int vmapbuf(struct buf *, int); void vunmapbuf(struct buf *); -void relpbuf(struct buf *, int *); void brelvp(struct buf *); void bgetvp(struct vnode *, struct buf *); void pbgetbo(struct bufobj *bo, struct buf *bp); @@ -571,7 +574,6 @@ void pbrelbo(struct buf *); void pbrelvp(struct buf *); int allocbuf(struct buf *bp, int size); void reassignbuf(struct buf *); -struct buf *trypbuf(int *); void bwait(struct buf *, u_char, const char *); void bdone(struct buf *); Modified: head/sys/ufs/ffs/ffs_rawread.c ============================================================================== --- head/sys/ufs/ffs/ffs_rawread.c Tue Jan 15 00:52:41 2019 (r343029) +++ head/sys/ufs/ffs/ffs_rawread.c Tue Jan 15 01:02:16 2019 (r343030) @@ -74,9 +74,7 @@ int ffs_rawread(struct vnode *vp, struct uio *uio, int SYSCTL_DECL(_vfs_ffs); -static int ffsrawbufcnt = 4; -SYSCTL_INT(_vfs_ffs, OID_AUTO, ffsrawbufcnt, CTLFLAG_RD, &ffsrawbufcnt, 0, - "Buffers available for raw reads"); +static uma_zone_t ffsraw_pbuf_zone; static int allowrawread = 1; SYSCTL_INT(_vfs_ffs, OID_AUTO, allowrawread, CTLFLAG_RW, &allowrawread, 0, @@ -90,7 +88,8 @@ static void ffs_rawread_setup(void *arg __unused) { - ffsrawbufcnt = (nswbuf > 100 ) ? (nswbuf - (nswbuf >> 4)) : nswbuf - 8; + ffsraw_pbuf_zone = pbuf_zsecond_create("ffsrawpbuf", + (nswbuf > 100 ) ? (nswbuf - (nswbuf >> 4)) : nswbuf - 8); } SYSINIT(ffs_raw, SI_SUB_VM_CONF, SI_ORDER_ANY, ffs_rawread_setup, NULL); @@ -296,8 +295,7 @@ ffs_rawread_main(struct vnode *vp, while (resid > 0) { if (bp == NULL) { /* Setup first read */ - /* XXX: Leave some bufs for swap */ - bp = getpbuf(&ffsrawbufcnt); + bp = uma_zalloc(ffsraw_pbuf_zone, M_WAITOK); pbgetvp(vp, bp); error = ffs_rawread_readahead(vp, udata, offset, resid, td, bp); @@ -305,9 +303,9 @@ ffs_rawread_main(struct vnode *vp, break; if (resid > bp->b_bufsize) { /* Setup fist readahead */ - /* XXX: Leave bufs for swap */ if (rawreadahead != 0) - nbp = trypbuf(&ffsrawbufcnt); + nbp = uma_zalloc(ffsraw_pbuf_zone, + M_NOWAIT); else nbp = NULL; if (nbp != NULL) { @@ -324,7 +322,8 @@ ffs_rawread_main(struct vnode *vp, nbp); if (nerror) { pbrelvp(nbp); - relpbuf(nbp, &ffsrawbufcnt); + uma_zfree(ffsraw_pbuf_zone, + nbp); nbp = NULL; } } @@ -365,7 +364,7 @@ ffs_rawread_main(struct vnode *vp, if (resid <= bp->b_bufsize) { /* No more readaheads */ pbrelvp(nbp); - relpbuf(nbp, &ffsrawbufcnt); + uma_zfree(ffsraw_pbuf_zone, nbp); nbp = NULL; } else { /* Setup next readahead */ nerror = ffs_rawread_readahead(vp, @@ -379,7 +378,7 @@ ffs_rawread_main(struct vnode *vp, nbp); if (nerror != 0) { pbrelvp(nbp); - relpbuf(nbp, &ffsrawbufcnt); + uma_zfree(ffsraw_pbuf_zone, nbp); nbp = NULL; } } @@ -395,13 +394,13 @@ ffs_rawread_main(struct vnode *vp, if (bp != NULL) { pbrelvp(bp); - relpbuf(bp, &ffsrawbufcnt); + uma_zfree(ffsraw_pbuf_zone, bp); } if (nbp != NULL) { /* Run down readahead buffer */ bwait(nbp, PRIBIO, "rawrd"); vunmapbuf(nbp); pbrelvp(nbp); - relpbuf(nbp, &ffsrawbufcnt); + uma_zfree(ffsraw_pbuf_zone, nbp); } if (error == 0) Modified: head/sys/vm/swap_pager.c ============================================================================== --- head/sys/vm/swap_pager.c Tue Jan 15 00:52:41 2019 (r343029) +++ head/sys/vm/swap_pager.c Tue Jan 15 01:02:16 2019 (r343030) @@ -71,7 +71,6 @@ #include __FBSDID("$FreeBSD$"); -#include "opt_swap.h" #include "opt_vm.h" #include @@ -324,9 +323,8 @@ swap_release_by_cred(vm_ooffset_t decr, struct ucred * static int swap_pager_full = 2; /* swap space exhaustion (task killing) */ static int swap_pager_almost_full = 1; /* swap space exhaustion (w/hysteresis)*/ -static int nsw_rcount; /* free read buffers */ -static int nsw_wcount_sync; /* limit write buffers / synchronous */ -static int nsw_wcount_async; /* limit write buffers / asynchronous */ +static struct mtx swbuf_mtx; /* to sync nsw_wcount_async */ +static int nsw_wcount_async; /* limit async write buffers */ static int nsw_wcount_async_max;/* assigned maximum */ static int nsw_cluster_max; /* maximum VOP I/O allowed */ @@ -352,6 +350,8 @@ static struct sx sw_alloc_sx; (&swap_pager_object_list[((int)(intptr_t)handle >> 4) & (NOBJLISTS-1)]) static struct pagerlst swap_pager_object_list[NOBJLISTS]; +static uma_zone_t swwbuf_zone; +static uma_zone_t swrbuf_zone; static uma_zone_t swblk_zone; static uma_zone_t swpctrie_zone; @@ -539,13 +539,13 @@ swap_pager_swap_init(void) */ nsw_cluster_max = min((MAXPHYS/PAGE_SIZE), MAX_PAGEOUT_CLUSTER); - mtx_lock(&pbuf_mtx); - nsw_rcount = (nswbuf + 1) / 2; - nsw_wcount_sync = (nswbuf + 3) / 4; nsw_wcount_async = 4; nsw_wcount_async_max = nsw_wcount_async; - mtx_unlock(&pbuf_mtx); + mtx_init(&swbuf_mtx, "async swbuf mutex", NULL, MTX_DEF); + swwbuf_zone = pbuf_zsecond_create("swwbuf", nswbuf / 4); + swrbuf_zone = pbuf_zsecond_create("swrbuf", nswbuf / 2); + /* * Initialize our zone, taking the user's requested size or * estimating the number we need based on the number of pages @@ -1205,7 +1205,7 @@ swap_pager_getpages(vm_object_t object, vm_page_t *ma, ("no swap blocking containing %p(%jx)", object, (uintmax_t)pindex)); VM_OBJECT_WUNLOCK(object); - bp = getpbuf(&nsw_rcount); + bp = uma_zalloc(swrbuf_zone, M_WAITOK); /* Pages cannot leave the object while busy. */ for (i = 0, p = bm; i < count; i++, p = TAILQ_NEXT(p, listq)) { MPASS(p->pindex == bm->pindex + i); @@ -1406,12 +1406,17 @@ swap_pager_putpages(vm_object_t object, vm_page_t *ma, * All I/O parameters have been satisfied, build the I/O * request and assign the swap space. */ - if (sync == TRUE) { - bp = getpbuf(&nsw_wcount_sync); - } else { - bp = getpbuf(&nsw_wcount_async); - bp->b_flags = B_ASYNC; + if (sync != TRUE) { + mtx_lock(&swbuf_mtx); + while (nsw_wcount_async == 0) + msleep(&nsw_wcount_async, &swbuf_mtx, PVM, + "swbufa", 0); + nsw_wcount_async--; + mtx_unlock(&swbuf_mtx); } + bp = uma_zalloc(swwbuf_zone, M_WAITOK); + if (sync != TRUE) + bp->b_flags = B_ASYNC; bp->b_flags |= B_PAGING; bp->b_iocmd = BIO_WRITE; @@ -1634,15 +1639,13 @@ swp_pager_async_iodone(struct buf *bp) /* * release the physical I/O buffer */ - relpbuf( - bp, - ((bp->b_iocmd == BIO_READ) ? &nsw_rcount : - ((bp->b_flags & B_ASYNC) ? - &nsw_wcount_async : - &nsw_wcount_sync - ) - ) - ); + if (bp->b_flags & B_ASYNC) { + mtx_lock(&swbuf_mtx); + if (++nsw_wcount_async == 1) + wakeup(&nsw_wcount_async); + mtx_unlock(&swbuf_mtx); + } + uma_zfree((bp->b_iocmd == BIO_READ) ? swrbuf_zone : swwbuf_zone, bp); } int @@ -2627,6 +2630,7 @@ swapgeom_done(struct bio *bp2) bp->b_ioflags |= BIO_ERROR; bp->b_resid = bp->b_bcount - bp2->bio_completed; bp->b_error = bp2->bio_error; + bp->b_caller1 = NULL; bufdone(bp); sp = bp2->bio_caller1; mtx_lock(&sw_dev_mtx); @@ -2666,6 +2670,7 @@ swapgeom_strategy(struct buf *bp, struct swdevt *sp) return; } + bp->b_caller1 = bio; bio->bio_caller1 = sp; bio->bio_caller2 = bp; bio->bio_cmd = bp->b_iocmd; @@ -2880,7 +2885,7 @@ sysctl_swap_async_max(SYSCTL_HANDLER_ARGS) if (new > nswbuf / 2 || new < 1) return (EINVAL); - mtx_lock(&pbuf_mtx); + mtx_lock(&swbuf_mtx); while (nsw_wcount_async_max != new) { /* * Adjust difference. If the current async count is too low, @@ -2895,11 +2900,11 @@ sysctl_swap_async_max(SYSCTL_HANDLER_ARGS) } else { nsw_wcount_async_max -= nsw_wcount_async; nsw_wcount_async = 0; - msleep(&nsw_wcount_async, &pbuf_mtx, PSWP, + msleep(&nsw_wcount_async, &swbuf_mtx, PSWP, "swpsysctl", 0); } } - mtx_unlock(&pbuf_mtx); + mtx_unlock(&swbuf_mtx); return (0); } Modified: head/sys/vm/vm_pager.c ============================================================================== --- head/sys/vm/vm_pager.c Tue Jan 15 00:52:41 2019 (r343029) +++ head/sys/vm/vm_pager.c Tue Jan 15 01:02:16 2019 (r343030) @@ -68,6 +68,8 @@ #include __FBSDID("$FreeBSD$"); +#include "opt_param.h" + #include #include #include @@ -85,11 +87,13 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include -int cluster_pbuf_freecnt = -1; /* unlimited to begin with */ +uma_zone_t pbuf_zone; +static int pbuf_init(void *, int, int); +static int pbuf_ctor(void *, int, void *, int); +static void pbuf_dtor(void *, int, void *); -struct buf *swbuf; - static int dead_pager_getpages(vm_object_t, vm_page_t *, int, int *, int *); static vm_object_t dead_pager_alloc(void *, vm_ooffset_t, vm_prot_t, vm_ooffset_t, struct ucred *); @@ -167,9 +171,6 @@ struct pagerops *pagertab[] = { * cleaning requests (NPENDINGIO == 64) * the maximum swap cluster size * (MAXPHYS == 64k) if you want to get the most efficiency. */ -struct mtx_padalign __exclusive_cache_line pbuf_mtx; -static TAILQ_HEAD(swqueue, buf) bswlist; -static int bswneeded; vm_offset_t swapbkva; /* swap buffers kva */ void @@ -177,7 +178,6 @@ vm_pager_init(void) { struct pagerops **pgops; - TAILQ_INIT(&bswlist); /* * Initialize known pagers */ @@ -186,30 +186,51 @@ vm_pager_init(void) (*(*pgops)->pgo_init)(); } +static int nswbuf_max; + void vm_pager_bufferinit(void) { - struct buf *bp; - int i; - mtx_init(&pbuf_mtx, "pbuf mutex", NULL, MTX_DEF); - bp = swbuf; + /* Main zone for paging bufs. */ + pbuf_zone = uma_zcreate("pbuf", sizeof(struct buf), + pbuf_ctor, pbuf_dtor, pbuf_init, NULL, UMA_ALIGN_CACHE, + UMA_ZONE_VM | UMA_ZONE_NOFREE); + /* Few systems may still use this zone directly, so it needs a limit. */ + nswbuf_max += uma_zone_set_max(pbuf_zone, NSWBUF_MIN); +} + +uma_zone_t +pbuf_zsecond_create(char *name, int max) +{ + uma_zone_t zone; + + zone = uma_zsecond_create(name, pbuf_ctor, pbuf_dtor, NULL, NULL, + pbuf_zone); /* - * Now set up swap and physical I/O buffer headers. + * uma_prealloc() rounds up to items per slab. If we would prealloc + * immediately on every pbuf_zsecond_create(), we may accumulate too + * much of difference between hard limit and prealloced items, which + * means wasted memory. */ - for (i = 0; i < nswbuf; i++, bp++) { - TAILQ_INSERT_HEAD(&bswlist, bp, b_freelist); - BUF_LOCKINIT(bp); - LIST_INIT(&bp->b_dep); - bp->b_rcred = bp->b_wcred = NOCRED; - bp->b_xflags = 0; - } + if (nswbuf_max > 0) + nswbuf_max += uma_zone_set_max(zone, max); + else + uma_prealloc(pbuf_zone, uma_zone_set_max(zone, max)); - cluster_pbuf_freecnt = nswbuf / 2; - vnode_pbuf_freecnt = nswbuf / 2 + 1; - vnode_async_pbuf_freecnt = nswbuf / 2; + return (zone); } +static void +pbuf_prealloc(void *arg __unused) +{ + + uma_prealloc(pbuf_zone, nswbuf_max); + nswbuf_max = -1; +} + +SYSINIT(pbuf, SI_SUB_KTHREAD_BUF, SI_ORDER_ANY, pbuf_prealloc, NULL); + /* * Allocate an instance of a pager of the given type. * Size, protection and offset parameters are passed in for pagers that @@ -347,111 +368,34 @@ vm_pager_object_lookup(struct pagerlst *pg_list, void return (object); } -/* - * initialize a physical buffer - */ - -/* - * XXX This probably belongs in vfs_bio.c - */ -static void -initpbuf(struct buf *bp) +static int +pbuf_ctor(void *mem, int size, void *arg, int flags) { + struct buf *bp = mem; - KASSERT(bp->b_bufobj == NULL, ("initpbuf with bufobj")); - KASSERT(bp->b_vp == NULL, ("initpbuf with vp")); + bp->b_vp = NULL; + bp->b_bufobj = NULL; + + /* copied from initpbuf() */ bp->b_rcred = NOCRED; bp->b_wcred = NOCRED; - bp->b_qindex = 0; /* On no queue (QUEUE_NONE) */ - bp->b_kvabase = (caddr_t)(MAXPHYS * (bp - swbuf)) + swapbkva; + bp->b_qindex = 0; /* On no queue (QUEUE_NONE) */ bp->b_data = bp->b_kvabase; - bp->b_kvasize = MAXPHYS; - bp->b_flags = 0; bp->b_xflags = 0; + bp->b_flags = 0; bp->b_ioflags = 0; bp->b_iodone = NULL; bp->b_error = 0; BUF_LOCK(bp, LK_EXCLUSIVE, NULL); - buf_track(bp, __func__); -} -/* - * allocate a physical buffer - * - * There are a limited number (nswbuf) of physical buffers. We need - * to make sure that no single subsystem is able to hog all of them, - * so each subsystem implements a counter which is typically initialized - * to 1/2 nswbuf. getpbuf() decrements this counter in allocation and - * increments it on release, and blocks if the counter hits zero. A - * subsystem may initialize the counter to -1 to disable the feature, - * but it must still be sure to match up all uses of getpbuf() with - * relpbuf() using the same variable. - * - * NOTE: pfreecnt can be NULL, but this 'feature' will be removed - * relatively soon when the rest of the subsystems get smart about it. XXX *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@freebsd.org Tue Jan 15 01:19:31 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id DE6C5148ECB5; Tue, 15 Jan 2019 01:19:30 +0000 (UTC) (envelope-from glebius@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 7EDE987BC5; Tue, 15 Jan 2019 01:19:30 +0000 (UTC) (envelope-from glebius@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 66E43B23B; Tue, 15 Jan 2019 01:19:30 +0000 (UTC) (envelope-from glebius@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x0F1JUJB032369; Tue, 15 Jan 2019 01:19:30 GMT (envelope-from glebius@FreeBSD.org) Received: (from glebius@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x0F1JUWD032367; Tue, 15 Jan 2019 01:19:30 GMT (envelope-from glebius@FreeBSD.org) Message-Id: <201901150119.x0F1JUWD032367@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: glebius set sender to glebius@FreeBSD.org using -f From: Gleb Smirnoff Date: Tue, 15 Jan 2019 01:19:30 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r343031 - in head: . share/man/man9 X-SVN-Group: head X-SVN-Commit-Author: glebius X-SVN-Commit-Paths: in head: . share/man/man9 X-SVN-Commit-Revision: 343031 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 7EDE987BC5 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.96 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_SHORT(-0.97)[-0.966,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_LONG(-1.00)[-0.999,0] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 15 Jan 2019 01:19:31 -0000 Author: glebius Date: Tue Jan 15 01:19:29 2019 New Revision: 343031 URL: https://svnweb.freebsd.org/changeset/base/343031 Log: Remove pbuf(9) manual page that is now nearly 100% outdated. Deleted: head/share/man/man9/pbuf.9 Modified: head/ObsoleteFiles.inc head/share/man/man9/Makefile Modified: head/ObsoleteFiles.inc ============================================================================== --- head/ObsoleteFiles.inc Tue Jan 15 01:02:16 2019 (r343030) +++ head/ObsoleteFiles.inc Tue Jan 15 01:19:29 2019 (r343031) @@ -38,6 +38,8 @@ # xargs -n1 | sort | uniq -d; # done +# 20190114: old pbuf allocator removed +OLD_FILES+=usr/share/man/man9/pbuf.9.gz # 20181219: ibcs removal OLD_FILES+=usr/share/examples/ibcs2/hello.uu OLD_FILES+=usr/share/examples/ibcs2/README Modified: head/share/man/man9/Makefile ============================================================================== --- head/share/man/man9/Makefile Tue Jan 15 01:02:16 2019 (r343030) +++ head/share/man/man9/Makefile Tue Jan 15 01:19:29 2019 (r343031) @@ -225,7 +225,6 @@ MAN= accept_filter.9 \ owll.9 \ own.9 \ panic.9 \ - pbuf.9 \ PCBGROUP.9 \ p_candebug.9 \ p_cansee.9 \ @@ -1576,9 +1575,6 @@ MLINKS+=osd.9 osd_call.9 \ osd.9 osd_register.9 \ osd.9 osd_set.9 MLINKS+=panic.9 vpanic.9 -MLINKS+=pbuf.9 getpbuf.9 \ - pbuf.9 relpbuf.9 \ - pbuf.9 trypbuf.9 MLINKS+=PCBGROUP.9 in_pcbgroup_byhash.9 \ PCBGROUP.9 in_pcbgroup_byinpcb.9 \ PCBGROUP.9 in_pcbgroup_destroy.9 \ From owner-svn-src-all@freebsd.org Tue Jan 15 01:57:48 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id E3CC0149389A; Tue, 15 Jan 2019 01:57:47 +0000 (UTC) (envelope-from avos@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 899368AB91; Tue, 15 Jan 2019 01:57:47 +0000 (UTC) (envelope-from avos@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1: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 583B6BCBD; Tue, 15 Jan 2019 01:57:47 +0000 (UTC) (envelope-from avos@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x0F1vlHo053079; Tue, 15 Jan 2019 01:57:47 GMT (envelope-from avos@FreeBSD.org) Received: (from avos@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x0F1vlAh053078; Tue, 15 Jan 2019 01:57:47 GMT (envelope-from avos@FreeBSD.org) Message-Id: <201901150157.x0F1vlAh053078@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: avos set sender to avos@FreeBSD.org using -f From: Andriy Voskoboinyk Date: Tue, 15 Jan 2019 01:57:47 +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: r343032 - in stable/12/sys/dev/rtwn/rtl8192c: . usb X-SVN-Group: stable-12 X-SVN-Commit-Author: avos X-SVN-Commit-Paths: in stable/12/sys/dev/rtwn/rtl8192c: . usb X-SVN-Commit-Revision: 343032 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 899368AB91 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.96 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_SHORT(-0.97)[-0.965,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_LONG(-1.00)[-0.999,0] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 15 Jan 2019 01:57:48 -0000 Author: avos Date: Tue Jan 15 01:57:46 2019 New Revision: 343032 URL: https://svnweb.freebsd.org/changeset/base/343032 Log: MFC r342912: rtwn_usb(4): add IQ calibration support for RTL8192CU The code is similar to the one for RTL8188E* and probably should be shared with RTL8188CE (needs to be tested). Was checked with RTL8188CUS, STA mode. Modified: stable/12/sys/dev/rtwn/rtl8192c/r92c_calib.c stable/12/sys/dev/rtwn/rtl8192c/usb/r92cu_attach.c Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/dev/rtwn/rtl8192c/r92c_calib.c ============================================================================== --- stable/12/sys/dev/rtwn/rtl8192c/r92c_calib.c Tue Jan 15 01:19:29 2019 (r343031) +++ stable/12/sys/dev/rtwn/rtl8192c/r92c_calib.c Tue Jan 15 01:57:46 2019 (r343032) @@ -46,16 +46,366 @@ __FBSDID("$FreeBSD$"); #include #include +#include #include #include +/* Registers to save and restore during IQ calibration. */ +struct r92c_iq_cal_reg_vals { + uint32_t adda[16]; + uint8_t txpause; + uint8_t bcn_ctrl[2]; + uint32_t gpio_muxcfg; + uint32_t cck0_afesetting; + uint32_t ofdm0_trxpathena; + uint32_t ofdm0_trmuxpar; + uint32_t fpga0_rfifacesw0; + uint32_t fpga0_rfifacesw1; + uint32_t fpga0_rfifaceoe0; + uint32_t fpga0_rfifaceoe1; + uint32_t config_ant0; + uint32_t config_ant1; +}; + +/* XXX TODO: merge */ +static int +r92c_iq_calib_chain(struct rtwn_softc *sc, int chain, uint16_t tx[2], + uint16_t rx[2]) +{ + uint32_t status; + + if (chain == 0) { /* IQ calibration for chain 0. */ + /* IQ calibration settings for chain 0. */ + rtwn_bb_write(sc, R92C_TX_IQK_TONE(0), 0x10008c1f); + rtwn_bb_write(sc, R92C_RX_IQK_TONE(0), 0x10008c1f); + rtwn_bb_write(sc, R92C_TX_IQK_PI(0), 0x82140102); + + if (sc->ntxchains > 1) { + rtwn_bb_write(sc, R92C_RX_IQK_PI(0), 0x28160202); + /* IQ calibration settings for chain 1. */ + rtwn_bb_write(sc, R92C_TX_IQK_TONE(1), 0x10008c22); + rtwn_bb_write(sc, R92C_RX_IQK_TONE(1), 0x10008c22); + rtwn_bb_write(sc, R92C_TX_IQK_PI(1), 0x82140102); + rtwn_bb_write(sc, R92C_RX_IQK_PI(1), 0x28160202); + } else + rtwn_bb_write(sc, R92C_RX_IQK_PI(0), 0x28160502); + + /* LO calibration settings. */ + rtwn_bb_write(sc, R92C_IQK_AGC_RSP, 0x001028d1); + /* We're doing LO and IQ calibration in one shot. */ + rtwn_bb_write(sc, R92C_IQK_AGC_PTS, 0xf9000000); + rtwn_bb_write(sc, R92C_IQK_AGC_PTS, 0xf8000000); + + } else { /* IQ calibration for chain 1. */ + /* We're doing LO and IQ calibration in one shot. */ + rtwn_bb_write(sc, R92C_IQK_AGC_CONT, 2); + rtwn_bb_write(sc, R92C_IQK_AGC_CONT, 0); + } + + /* Give LO and IQ calibrations the time to complete. */ + rtwn_delay(sc, 10000); + + /* Read IQ calibration status. */ + status = rtwn_bb_read(sc, R92C_RX_POWER_IQK_AFTER(0)); + + if (status & (1 << (28 + chain * 3))) + return (0); /* Tx failed. */ + /* Read Tx IQ calibration results. */ + tx[0] = MS(rtwn_bb_read(sc, R92C_TX_POWER_IQK_BEFORE(chain)), + R92C_POWER_IQK_RESULT); + tx[1] = MS(rtwn_bb_read(sc, R92C_TX_POWER_IQK_AFTER(chain)), + R92C_POWER_IQK_RESULT); + if (tx[0] == 0x142 || tx[1] == 0x042) + return (0); /* Tx failed. */ + + if (status & (1 << (27 + chain * 3))) + return (1); /* Rx failed. */ + /* Read Rx IQ calibration results. */ + rx[0] = MS(rtwn_bb_read(sc, R92C_RX_POWER_IQK_BEFORE(chain)), + R92C_POWER_IQK_RESULT); + rx[1] = MS(rtwn_bb_read(sc, R92C_RX_POWER_IQK_AFTER(chain)), + R92C_POWER_IQK_RESULT); + if (rx[0] == 0x132 || rx[1] == 0x036) + return (1); /* Rx failed. */ + + return (3); /* Both Tx and Rx succeeded. */ +} + +static void +r92c_iq_calib_run(struct rtwn_softc *sc, int n, uint16_t tx[2][2], + uint16_t rx[2][2], struct r92c_iq_cal_reg_vals *vals) +{ + /* Registers to save and restore during IQ calibration. */ + static const uint16_t reg_adda[16] = { + 0x85c, 0xe6c, 0xe70, 0xe74, + 0xe78, 0xe7c, 0xe80, 0xe84, + 0xe88, 0xe8c, 0xed0, 0xed4, + 0xed8, 0xedc, 0xee0, 0xeec + }; + int i, chain; + uint32_t hssi_param1; + + if (n == 0) { + for (i = 0; i < nitems(reg_adda); i++) + vals->adda[i] = rtwn_bb_read(sc, reg_adda[i]); + + vals->txpause = rtwn_read_1(sc, R92C_TXPAUSE); + vals->bcn_ctrl[0] = rtwn_read_1(sc, R92C_BCN_CTRL(0)); + vals->bcn_ctrl[1] = rtwn_read_1(sc, R92C_BCN_CTRL(1)); + vals->gpio_muxcfg = rtwn_read_4(sc, R92C_GPIO_MUXCFG); + } + + if (sc->ntxchains == 1) { + rtwn_bb_write(sc, reg_adda[0], 0x0b1b25a0); + for (i = 1; i < nitems(reg_adda); i++) + rtwn_bb_write(sc, reg_adda[i], 0x0bdb25a0); + } else { + for (i = 0; i < nitems(reg_adda); i++) + rtwn_bb_write(sc, reg_adda[i], 0x04db25a4); + } + + hssi_param1 = rtwn_bb_read(sc, R92C_HSSI_PARAM1(0)); + if (!(hssi_param1 & R92C_HSSI_PARAM1_PI)) { + rtwn_bb_write(sc, R92C_HSSI_PARAM1(0), + hssi_param1 | R92C_HSSI_PARAM1_PI); + rtwn_bb_write(sc, R92C_HSSI_PARAM1(1), + hssi_param1 | R92C_HSSI_PARAM1_PI); + } + + if (n == 0) { + vals->cck0_afesetting = rtwn_bb_read(sc, R92C_CCK0_AFESETTING); + vals->ofdm0_trxpathena = + rtwn_bb_read(sc, R92C_OFDM0_TRXPATHENA); + vals->ofdm0_trmuxpar = rtwn_bb_read(sc, R92C_OFDM0_TRMUXPAR); + vals->fpga0_rfifacesw0 = + rtwn_bb_read(sc, R92C_FPGA0_RFIFACESW(0)); + vals->fpga0_rfifacesw1 = + rtwn_bb_read(sc, R92C_FPGA0_RFIFACESW(1)); + vals->fpga0_rfifaceoe0 = + rtwn_bb_read(sc, R92C_FPGA0_RFIFACEOE(0)); + vals->fpga0_rfifaceoe1 = + rtwn_bb_read(sc, R92C_FPGA0_RFIFACEOE(1)); + vals->config_ant0 = rtwn_bb_read(sc, R92C_CONFIG_ANT(0)); + vals->config_ant1 = rtwn_bb_read(sc, R92C_CONFIG_ANT(1)); + } + + rtwn_bb_setbits(sc, R92C_CCK0_AFESETTING, 0, 0x0f000000); + rtwn_bb_write(sc, R92C_OFDM0_TRXPATHENA, 0x03a05600); + rtwn_bb_write(sc, R92C_OFDM0_TRMUXPAR, 0x000800e4); + rtwn_bb_write(sc, R92C_FPGA0_RFIFACESW(1), 0x22204000); + rtwn_bb_setbits(sc, R92C_FPGA0_RFIFACESW(0), 0, 0x04000400); + rtwn_bb_setbits(sc, R92C_FPGA0_RFIFACEOE(0), 0x400, 0); + rtwn_bb_setbits(sc, R92C_FPGA0_RFIFACEOE(1), 0x400, 0); + + if (sc->ntxchains > 1) { + rtwn_bb_write(sc, R92C_LSSI_PARAM(0), 0x00010000); + rtwn_bb_write(sc, R92C_LSSI_PARAM(1), 0x00010000); + } + + rtwn_write_1(sc, R92C_TXPAUSE, + R92C_TX_QUEUE_AC | R92C_TX_QUEUE_MGT | R92C_TX_QUEUE_HIGH); + rtwn_write_1(sc, R92C_BCN_CTRL(0), + vals->bcn_ctrl[0] & ~R92C_BCN_CTRL_EN_BCN); + rtwn_write_1(sc, R92C_BCN_CTRL(1), + vals->bcn_ctrl[1] & ~R92C_BCN_CTRL_EN_BCN); + rtwn_write_1(sc, R92C_GPIO_MUXCFG, + vals->gpio_muxcfg & ~R92C_GPIO_MUXCFG_ENBT); + + rtwn_bb_write(sc, R92C_CONFIG_ANT(0), 0x00080000); + if (sc->ntxchains > 1) + rtwn_bb_write(sc, R92C_CONFIG_ANT(1), 0x00080000); + + rtwn_bb_write(sc, R92C_FPGA0_IQK, 0x80800000); + rtwn_bb_write(sc, R92C_TX_IQK, 0x01007c00); + rtwn_bb_write(sc, R92C_RX_IQK, 0x01004800); + + for (chain = 0; chain < sc->ntxchains; chain++) { + if (chain > 0) { + /* Put chain 0 on standby. */ + rtwn_bb_write(sc, R92C_FPGA0_IQK, 0); + rtwn_bb_write(sc, R92C_LSSI_PARAM(0), 0x00010000); + rtwn_bb_write(sc, R92C_FPGA0_IQK, 0x80800000); + + /* Enable chain 1. */ + for (i = 0; i < nitems(reg_adda); i++) + rtwn_bb_write(sc, reg_adda[i], 0x0b1b25a4); + } + + /* Run IQ calibration twice. */ + for (i = 0; i < 2; i++) { + int ret; + + ret = r92c_iq_calib_chain(sc, chain, + tx[chain], rx[chain]); + if (ret == 0) { + RTWN_DPRINTF(sc, RTWN_DEBUG_CALIB, + "%s: chain %d: Tx failed.\n", + __func__, chain); + tx[chain][0] = 0xff; + tx[chain][1] = 0xff; + rx[chain][0] = 0xff; + rx[chain][1] = 0xff; + } else if (ret == 1) { + RTWN_DPRINTF(sc, RTWN_DEBUG_CALIB, + "%s: chain %d: Rx failed.\n", + __func__, chain); + rx[chain][0] = 0xff; + rx[chain][1] = 0xff; + } else if (ret == 3) { + RTWN_DPRINTF(sc, RTWN_DEBUG_CALIB, + "%s: chain %d: Both Tx and Rx " + "succeeded.\n", __func__, chain); + } + } + + RTWN_DPRINTF(sc, RTWN_DEBUG_CALIB, + "%s: results for run %d chain %d: tx[0] 0x%x, " + "tx[1] 0x%x, rx[0] 0x%x, rx[1] 0x%x\n", __func__, n, chain, + tx[chain][0], tx[chain][1], rx[chain][0], rx[chain][1]); + } + + rtwn_bb_write(sc, R92C_CCK0_AFESETTING, vals->cck0_afesetting); + rtwn_bb_write(sc, R92C_OFDM0_TRXPATHENA, vals->ofdm0_trxpathena); + rtwn_bb_write(sc, R92C_FPGA0_RFIFACESW(0), vals->fpga0_rfifacesw0); + rtwn_bb_write(sc, R92C_FPGA0_RFIFACESW(1), vals->fpga0_rfifacesw1); + rtwn_bb_write(sc, R92C_OFDM0_TRMUXPAR, vals->ofdm0_trmuxpar); + rtwn_bb_write(sc, R92C_FPGA0_RFIFACEOE(0), vals->fpga0_rfifaceoe0); + rtwn_bb_write(sc, R92C_FPGA0_RFIFACEOE(1), vals->fpga0_rfifaceoe1); + rtwn_bb_write(sc, R92C_CONFIG_ANT(0), vals->config_ant0); + rtwn_bb_write(sc, R92C_CONFIG_ANT(1), vals->config_ant1); + + rtwn_bb_write(sc, R92C_FPGA0_IQK, 0); + rtwn_bb_write(sc, R92C_LSSI_PARAM(0), 0x00032ed3); + if (sc->ntxchains > 1) + rtwn_bb_write(sc, R92C_LSSI_PARAM(1), 0x00032ed3); + + if (n != 0) { + if (!(hssi_param1 & R92C_HSSI_PARAM1_PI)) { + rtwn_bb_write(sc, R92C_HSSI_PARAM1(0), hssi_param1); + rtwn_bb_write(sc, R92C_HSSI_PARAM1(1), hssi_param1); + } + + for (i = 0; i < nitems(reg_adda); i++) + rtwn_bb_write(sc, reg_adda[i], vals->adda[i]); + + rtwn_write_1(sc, R92C_TXPAUSE, vals->txpause); + rtwn_write_1(sc, R92C_BCN_CTRL(0), vals->bcn_ctrl[0]); + rtwn_write_1(sc, R92C_BCN_CTRL(1), vals->bcn_ctrl[1]); + rtwn_write_4(sc, R92C_GPIO_MUXCFG, vals->gpio_muxcfg); + + rtwn_bb_write(sc, R92C_TX_IQK_TONE(0), 0x01008c00); + rtwn_bb_write(sc, R92C_RX_IQK_TONE(0), 0x01008c00); + } +} + +#define RTWN_IQ_CAL_MAX_TOLERANCE 5 +static int +r92c_iq_calib_compare_results(struct rtwn_softc *sc, uint16_t tx1[2][2], + uint16_t rx1[2][2], uint16_t tx2[2][2], uint16_t rx2[2][2]) +{ + int chain, i, tx_ok[2], rx_ok[2]; + + tx_ok[0] = tx_ok[1] = rx_ok[0] = rx_ok[1] = 0; + for (chain = 0; chain < sc->ntxchains; chain++) { + for (i = 0; i < 2; i++) { + if (tx1[chain][i] == 0xff || tx2[chain][i] == 0xff || + rx1[chain][i] == 0xff || rx2[chain][i] == 0xff) + continue; + + tx_ok[chain] = (abs(tx1[chain][i] - tx2[chain][i]) <= + RTWN_IQ_CAL_MAX_TOLERANCE); + + rx_ok[chain] = (abs(rx1[chain][i] - rx2[chain][i]) <= + RTWN_IQ_CAL_MAX_TOLERANCE); + } + } + + if (sc->ntxchains > 1) + return (tx_ok[0] && tx_ok[1] && rx_ok[0] && rx_ok[1]); + else + return (tx_ok[0] && rx_ok[0]); +} +#undef RTWN_IQ_CAL_MAX_TOLERANCE + +static void +r92c_iq_calib_write_results(struct rtwn_softc *sc, uint16_t tx[2], + uint16_t rx[2], int chain) +{ + uint32_t reg, val, x; + long y, tx_c; + + if (tx[0] == 0xff || tx[1] == 0xff) + return; + + reg = rtwn_bb_read(sc, R92C_OFDM0_TXIQIMBALANCE(chain)); + val = ((reg >> 22) & 0x3ff); + x = tx[0]; + if (x & 0x00000200) + x |= 0xfffffc00; + reg = (((x * val) >> 8) & 0x3ff); + rtwn_bb_setbits(sc, R92C_OFDM0_TXIQIMBALANCE(chain), 0x3ff, reg); + rtwn_bb_setbits(sc, R92C_OFDM0_ECCATHRESHOLD, 0x80000000, + ((x * val) & 0x80) << 24); + + y = tx[1]; + if (y & 0x00000200) + y |= 0xfffffc00; + tx_c = (y * val) >> 8; + rtwn_bb_setbits(sc, R92C_OFDM0_TXAFE(chain), 0xf0000000, + (tx_c & 0x3c0) << 22); + rtwn_bb_setbits(sc, R92C_OFDM0_TXIQIMBALANCE(chain), 0x003f0000, + (tx_c & 0x3f) << 16); + rtwn_bb_setbits(sc, R92C_OFDM0_ECCATHRESHOLD, 0x20000000, + ((y * val) & 0x80) << 22); + + if (rx[0] == 0xff || rx[1] == 0xff) + return; + + rtwn_bb_setbits(sc, R92C_OFDM0_RXIQIMBALANCE(chain), 0x3ff, + rx[0] & 0x3ff); + rtwn_bb_setbits(sc, R92C_OFDM0_RXIQIMBALANCE(chain), 0xfc00, + (rx[1] & 0x3f) << 10); + + if (chain == 0) { + rtwn_bb_setbits(sc, R92C_OFDM0_RXIQEXTANTA, 0xf0000000, + (rx[1] & 0x3c0) << 22); + } else { + rtwn_bb_setbits(sc, R92C_OFDM0_AGCRSSITABLE, 0xf000, + (rx[1] & 0x3c0) << 6); + } +} + +#define RTWN_IQ_CAL_NRUN 3 void r92c_iq_calib(struct rtwn_softc *sc) { - /* XXX TODO */ + struct r92c_iq_cal_reg_vals vals; + uint16_t tx[RTWN_IQ_CAL_NRUN][2][2], rx[RTWN_IQ_CAL_NRUN][2][2]; + int n, valid; + + valid = 0; + for (n = 0; n < RTWN_IQ_CAL_NRUN; n++) { + r92c_iq_calib_run(sc, n, tx[n], rx[n], &vals); + + if (n == 0) + continue; + + /* Valid results remain stable after consecutive runs. */ + valid = r92c_iq_calib_compare_results(sc, tx[n - 1], + rx[n - 1], tx[n], rx[n]); + if (valid) + break; + } + + if (valid) { + r92c_iq_calib_write_results(sc, tx[n][0], rx[n][0], 0); + if (sc->ntxchains > 1) + r92c_iq_calib_write_results(sc, tx[n][1], rx[n][1], 1); + } } +#undef RTWN_IQ_CAL_NRUN void r92c_lc_calib(struct rtwn_softc *sc) Modified: stable/12/sys/dev/rtwn/rtl8192c/usb/r92cu_attach.c ============================================================================== --- stable/12/sys/dev/rtwn/rtl8192c/usb/r92cu_attach.c Tue Jan 15 01:19:29 2019 (r343031) +++ stable/12/sys/dev/rtwn/rtl8192c/usb/r92cu_attach.c Tue Jan 15 01:57:46 2019 (r343032) @@ -187,7 +187,7 @@ r92cu_attach(struct rtwn_usb_softc *uc) sc->sc_llt_init = r92c_llt_init; sc->sc_set_page_size = r92c_set_page_size; sc->sc_lc_calib = r92c_lc_calib; - sc->sc_iq_calib = r92c_iq_calib; /* XXX TODO */ + sc->sc_iq_calib = r92c_iq_calib; sc->sc_read_chipid_vendor = r92c_read_chipid_vendor; sc->sc_adj_devcaps = r92cu_adj_devcaps; sc->sc_vap_preattach = rtwn_nop_softc_vap; From owner-svn-src-all@freebsd.org Tue Jan 15 02:05:52 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 4921514946DD; Tue, 15 Jan 2019 02:05:52 +0000 (UTC) (envelope-from avos@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 E13948B716; Tue, 15 Jan 2019 02:05:51 +0000 (UTC) (envelope-from avos@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1: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 A92A8BEB9; Tue, 15 Jan 2019 02:05:51 +0000 (UTC) (envelope-from avos@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x0F25pl8058120; Tue, 15 Jan 2019 02:05:51 GMT (envelope-from avos@FreeBSD.org) Received: (from avos@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x0F25pbK058119; Tue, 15 Jan 2019 02:05:51 GMT (envelope-from avos@FreeBSD.org) Message-Id: <201901150205.x0F25pbK058119@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: avos set sender to avos@FreeBSD.org using -f From: Andriy Voskoboinyk Date: Tue, 15 Jan 2019 02:05: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: r343033 - stable/12/sys/net80211 X-SVN-Group: stable-12 X-SVN-Commit-Author: avos X-SVN-Commit-Paths: stable/12/sys/net80211 X-SVN-Commit-Revision: 343033 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: E13948B716 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.96 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_SHORT(-0.96)[-0.964,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_LONG(-1.00)[-0.999,0] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 15 Jan 2019 02:05:52 -0000 Author: avos Date: Tue Jan 15 02:05:51 2019 New Revision: 343033 URL: https://svnweb.freebsd.org/changeset/base/343033 Log: MFC r342966: net80211: fix possible panic for some drivers after r342463 Check if rate control structures were allocated before trying to access them in various places; this was possible before on allocation failure (unlikely), but was revealed after r342211 where allocation was deferred. In case if driver uses wlan_amrr(4) and it is loaded it is possible to reproduce the panic via sysctl net.wlan..rate_stats (for wlan0 the number will be 0). Modified: stable/12/sys/net80211/ieee80211_amrr.c stable/12/sys/net80211/ieee80211_rssadapt.c Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/net80211/ieee80211_amrr.c ============================================================================== --- stable/12/sys/net80211/ieee80211_amrr.c Tue Jan 15 01:57:46 2019 (r343032) +++ stable/12/sys/net80211/ieee80211_amrr.c Tue Jan 15 02:05:51 2019 (r343033) @@ -104,6 +104,9 @@ amrr_setinterval(const struct ieee80211vap *vap, int m struct ieee80211_amrr *amrr = vap->iv_rs; int t; + if (!amrr) + return; + if (msecs < 100) msecs = 100; t = msecs_to_ticks(msecs); @@ -166,6 +169,12 @@ amrr_node_init(struct ieee80211_node *ni) struct ieee80211_amrr_node *amn; uint8_t rate; + if (!amrr) { + if_printf(vap->iv_ifp, "ratectl structure was not allocated, " + "per-node structure allocation skipped\n"); + return; + } + if (ni->ni_rctls == NULL) { ni->ni_rctls = amn = IEEE80211_MALLOC(sizeof(struct ieee80211_amrr_node), M_80211_RATECTL, IEEE80211_M_NOWAIT | IEEE80211_M_ZERO); @@ -327,10 +336,19 @@ static int amrr_rate(struct ieee80211_node *ni, void *arg __unused, uint32_t iarg __unused) { struct ieee80211_amrr_node *amn = ni->ni_rctls; - struct ieee80211_amrr *amrr = amn->amn_amrr; + struct ieee80211_amrr *amrr; const struct ieee80211_rateset *rs = NULL; int rix; + /* XXX should return -1 here, but drivers may not expect this... */ + if (!amn) + { + ni->ni_txrate = ni->ni_rates.rs_rates[0]; + return 0; + } + + amrr = amn->amn_amrr; + /* 11n or not? Pick the right rateset */ if (amrr_node_is_11n(ni)) { /* XXX ew */ @@ -369,6 +387,9 @@ amrr_tx_complete(const struct ieee80211_node *ni, struct ieee80211_amrr_node *amn = ni->ni_rctls; int retries; + if (!amn) + return; + retries = 0; if (status->flags & IEEE80211_RATECTL_STATUS_LONG_RETRY) retries = status->long_retries; @@ -386,6 +407,9 @@ amrr_tx_update_cb(void *arg, struct ieee80211_node *ni struct ieee80211_amrr_node *amn = ni->ni_rctls; int txcnt, success, retrycnt; + if (!amn) + return; + txcnt = stats->nframes; success = stats->nsuccess; retrycnt = 0; @@ -420,9 +444,12 @@ amrr_sysctl_interval(SYSCTL_HANDLER_ARGS) { struct ieee80211vap *vap = arg1; struct ieee80211_amrr *amrr = vap->iv_rs; - int msecs = ticks_to_msecs(amrr->amrr_interval); - int error; + int msecs, error; + if (!amrr) + return ENOMEM; + + msecs = ticks_to_msecs(amrr->amrr_interval); error = sysctl_handle_int(oidp, &msecs, 0, req); if (error || !req->newptr) return error; @@ -436,6 +463,9 @@ amrr_sysctlattach(struct ieee80211vap *vap, { struct ieee80211_amrr *amrr = vap->iv_rs; + if (!amrr) + return; + SYSCTL_ADD_PROC(ctx, SYSCTL_CHILDREN(tree), OID_AUTO, "amrr_rate_interval", CTLTYPE_INT | CTLFLAG_RW, vap, 0, amrr_sysctl_interval, "I", "amrr operation interval (ms)"); @@ -456,6 +486,9 @@ amrr_node_stats(struct ieee80211_node *ni, struct sbuf struct ieee80211_rateset *rs; /* XXX TODO: check locking? */ + + if (!amn) + return; /* XXX TODO: this should be a method */ if (amrr_node_is_11n(ni)) { Modified: stable/12/sys/net80211/ieee80211_rssadapt.c ============================================================================== --- stable/12/sys/net80211/ieee80211_rssadapt.c Tue Jan 15 01:57:46 2019 (r343032) +++ stable/12/sys/net80211/ieee80211_rssadapt.c Tue Jan 15 02:05:51 2019 (r343033) @@ -119,6 +119,9 @@ rssadapt_setinterval(const struct ieee80211vap *vap, i struct ieee80211_rssadapt *rs = vap->iv_rs; int t; + if (!rs) + return; + if (msecs < 100) msecs = 100; t = msecs_to_ticks(msecs); @@ -177,6 +180,12 @@ rssadapt_node_init(struct ieee80211_node *ni) struct ieee80211_rssadapt *rsa = vap->iv_rs; const struct ieee80211_rateset *rs = &ni->ni_rates; + if (!rsa) { + if_printf(vap->iv_ifp, "ratectl structure was not allocated, " + "per-node structure allocation skipped\n"); + return; + } + if (ni->ni_rctls == NULL) { ni->ni_rctls = ra = IEEE80211_MALLOC(sizeof(struct ieee80211_rssadapt_node), @@ -231,10 +240,18 @@ rssadapt_rate(struct ieee80211_node *ni, void *arg __u { struct ieee80211_rssadapt_node *ra = ni->ni_rctls; u_int pktlen = iarg; - const struct ieee80211_rateset *rs = &ra->ra_rates; + const struct ieee80211_rateset *rs; uint16_t (*thrs)[IEEE80211_RATE_SIZE]; int rix, rssi; + /* XXX should return -1 here, but drivers may not expect this... */ + if (!ra) + { + ni->ni_txrate = ni->ni_rates.rs_rates[0]; + return 0; + } + + rs = &ra->ra_rates; if ((ticks - ra->ra_ticks) > ra->ra_rs->interval) { rssadapt_updatestats(ra); ra->ra_ticks = ticks; @@ -320,6 +337,9 @@ rssadapt_tx_complete(const struct ieee80211_node *ni, struct ieee80211_rssadapt_node *ra = ni->ni_rctls; int pktlen, rssi; + if (!ra) + return; + if ((status->flags & (IEEE80211_RATECTL_STATUS_PKTLEN|IEEE80211_RATECTL_STATUS_RSSI)) != (IEEE80211_RATECTL_STATUS_PKTLEN|IEEE80211_RATECTL_STATUS_RSSI)) @@ -344,9 +364,12 @@ rssadapt_sysctl_interval(SYSCTL_HANDLER_ARGS) { struct ieee80211vap *vap = arg1; struct ieee80211_rssadapt *rs = vap->iv_rs; - int msecs = ticks_to_msecs(rs->interval); - int error; + int msecs, error; + if (!rs) + return ENOMEM; + + msecs = ticks_to_msecs(rs->interval); error = sysctl_handle_int(oidp, &msecs, 0, req); if (error || !req->newptr) return error; From owner-svn-src-all@freebsd.org Tue Jan 15 02:09:33 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 348CE1494E76; Tue, 15 Jan 2019 02:09:33 +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 CE3978BAA0; Tue, 15 Jan 2019 02:09:32 +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 BD30DBED8; Tue, 15 Jan 2019 02:09:32 +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 x0F29WXm058344; Tue, 15 Jan 2019 02:09:32 GMT (envelope-from markj@FreeBSD.org) Received: (from markj@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x0F29Wsp058343; Tue, 15 Jan 2019 02:09:32 GMT (envelope-from markj@FreeBSD.org) Message-Id: <201901150209.x0F29Wsp058343@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: markj set sender to markj@FreeBSD.org using -f From: Mark Johnston Date: Tue, 15 Jan 2019 02:09: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: r343034 - stable/12/share/termcap X-SVN-Group: stable-12 X-SVN-Commit-Author: markj X-SVN-Commit-Paths: stable/12/share/termcap X-SVN-Commit-Revision: 343034 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: CE3978BAA0 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.96 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_SHORT(-0.96)[-0.963,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_LONG(-1.00)[-0.999,0] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 15 Jan 2019 02:09:33 -0000 Author: markj Date: Tue Jan 15 02:09:32 2019 New Revision: 343034 URL: https://svnweb.freebsd.org/changeset/base/343034 Log: MFC r342863: Add termcap entries for TI Silent 703/707 terminals. PR: 234716 Modified: stable/12/share/termcap/termcap Directory Properties: stable/12/ (props changed) Modified: stable/12/share/termcap/termcap ============================================================================== --- stable/12/share/termcap/termcap Tue Jan 15 02:05:51 2019 (r343033) +++ stable/12/share/termcap/termcap Tue Jan 15 02:09:32 2019 (r343034) @@ -3531,6 +3531,20 @@ ti800|ti omni 800:\ ti931|ti 931:\ :al=\EN:am:bs:cd=\EJ:ce=\EI:cl=\EL:cm=\EY%+ %+ :co#80:dl=\EO:do=\EB:\ :eo:ho=\EH:li#24:ku=\EA:kd=\EB:kr=\EC:kl=\ED:mi:nd:sf=\Eb:sr=\Ea:up=\EA: +# From Robert Clausecker +# +# Terminal entries for the Texas Instruments 703/707 +# hardcopy terminals. +# +# The terminal can switch between 80 and 132 column mode +# using \EPC\\ and \EPD\\, but I don't think there is a +# capability for that. +ti703|ti707|Texas Instruments Silent 703/707, 80 cols:\ + :am:hc:os:xn:\ + :co#80:it#8:\ + :do=\n:le=\b:cr=\r:nd= :bl=^G:ta=\t:is=\EPC\\: +ti703-w|ti707-w|Texas Instruments Silent 703/707, 132 cols:\ + :co#132:is=\EPD\\:tc=ti703: # # -------------------------------- # # v: TELEVIDEO From owner-svn-src-all@freebsd.org Tue Jan 15 02:16:24 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 976971495D1B; Tue, 15 Jan 2019 02:16:24 +0000 (UTC) (envelope-from avos@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 384DF8C492; Tue, 15 Jan 2019 02:16:24 +0000 (UTC) (envelope-from avos@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1: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 28EDCC0E9; Tue, 15 Jan 2019 02:16:24 +0000 (UTC) (envelope-from avos@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x0F2GOXZ063980; Tue, 15 Jan 2019 02:16:24 GMT (envelope-from avos@FreeBSD.org) Received: (from avos@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x0F2GNC5063978; Tue, 15 Jan 2019 02:16:23 GMT (envelope-from avos@FreeBSD.org) Message-Id: <201901150216.x0F2GNC5063978@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: avos set sender to avos@FreeBSD.org using -f From: Andriy Voskoboinyk Date: Tue, 15 Jan 2019 02:16:23 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r343035 - stable/11/sys/net80211 X-SVN-Group: stable-11 X-SVN-Commit-Author: avos X-SVN-Commit-Paths: stable/11/sys/net80211 X-SVN-Commit-Revision: 343035 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 384DF8C492 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.95 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_SHORT(-0.95)[-0.955,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_LONG(-1.00)[-0.999,0] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 15 Jan 2019 02:16:24 -0000 Author: avos Date: Tue Jan 15 02:16:23 2019 New Revision: 343035 URL: https://svnweb.freebsd.org/changeset/base/343035 Log: MFC r342966: net80211: fix possible panic for some drivers after r342464 Check if rate control structures were allocated before trying to access them in various places; this was possible before on allocation failure (unlikely), but was revealed after r342211 where allocation was deferred. In case if driver uses wlan_amrr(4) and it is loaded it is possible to reproduce the panic via sysctl net.wlan..rate_stats (for wlan0 the number will be 0). The patch was adjusted a bit since file contents are different enough since r306591. Modified: stable/11/sys/net80211/ieee80211_amrr.c stable/11/sys/net80211/ieee80211_rssadapt.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/net80211/ieee80211_amrr.c ============================================================================== --- stable/11/sys/net80211/ieee80211_amrr.c Tue Jan 15 02:09:32 2019 (r343034) +++ stable/11/sys/net80211/ieee80211_amrr.c Tue Jan 15 02:16:23 2019 (r343035) @@ -104,6 +104,9 @@ amrr_setinterval(const struct ieee80211vap *vap, int m struct ieee80211_amrr *amrr = vap->iv_rs; int t; + if (!amrr) + return; + if (msecs < 100) msecs = 100; t = msecs_to_ticks(msecs); @@ -166,6 +169,12 @@ amrr_node_init(struct ieee80211_node *ni) struct ieee80211_amrr_node *amn; uint8_t rate; + if (!amrr) { + if_printf(vap->iv_ifp, "ratectl structure was not allocated, " + "per-node structure allocation skipped\n"); + return; + } + if (ni->ni_rctls == NULL) { ni->ni_rctls = amn = IEEE80211_MALLOC(sizeof(struct ieee80211_amrr_node), M_80211_RATECTL, IEEE80211_M_NOWAIT | IEEE80211_M_ZERO); @@ -327,10 +336,19 @@ static int amrr_rate(struct ieee80211_node *ni, void *arg __unused, uint32_t iarg __unused) { struct ieee80211_amrr_node *amn = ni->ni_rctls; - struct ieee80211_amrr *amrr = amn->amn_amrr; + struct ieee80211_amrr *amrr; const struct ieee80211_rateset *rs = NULL; int rix; + /* XXX should return -1 here, but drivers may not expect this... */ + if (!amn) + { + ni->ni_txrate = ni->ni_rates.rs_rates[0]; + return 0; + } + + amrr = amn->amn_amrr; + /* 11n or not? Pick the right rateset */ if (amrr_node_is_11n(ni)) { /* XXX ew */ @@ -370,6 +388,9 @@ amrr_tx_complete(const struct ieee80211vap *vap, struct ieee80211_amrr_node *amn = ni->ni_rctls; int retries = *(int *)arg1; + if (!amn) + return; + amn->amn_txcnt++; if (ok) amn->amn_success++; @@ -398,9 +419,12 @@ amrr_sysctl_interval(SYSCTL_HANDLER_ARGS) { struct ieee80211vap *vap = arg1; struct ieee80211_amrr *amrr = vap->iv_rs; - int msecs = ticks_to_msecs(amrr->amrr_interval); - int error; + int msecs, error; + if (!amrr) + return ENOMEM; + + msecs = ticks_to_msecs(amrr->amrr_interval); error = sysctl_handle_int(oidp, &msecs, 0, req); if (error || !req->newptr) return error; @@ -414,6 +438,9 @@ amrr_sysctlattach(struct ieee80211vap *vap, { struct ieee80211_amrr *amrr = vap->iv_rs; + if (!amrr) + return; + SYSCTL_ADD_PROC(ctx, SYSCTL_CHILDREN(tree), OID_AUTO, "amrr_rate_interval", CTLTYPE_INT | CTLFLAG_RW, vap, 0, amrr_sysctl_interval, "I", "amrr operation interval (ms)"); @@ -434,6 +461,9 @@ amrr_node_stats(struct ieee80211_node *ni, struct sbuf struct ieee80211_rateset *rs; /* XXX TODO: check locking? */ + + if (!amn) + return; /* XXX TODO: this should be a method */ if (amrr_node_is_11n(ni)) { Modified: stable/11/sys/net80211/ieee80211_rssadapt.c ============================================================================== --- stable/11/sys/net80211/ieee80211_rssadapt.c Tue Jan 15 02:09:32 2019 (r343034) +++ stable/11/sys/net80211/ieee80211_rssadapt.c Tue Jan 15 02:16:23 2019 (r343035) @@ -118,6 +118,9 @@ rssadapt_setinterval(const struct ieee80211vap *vap, i struct ieee80211_rssadapt *rs = vap->iv_rs; int t; + if (!rs) + return; + if (msecs < 100) msecs = 100; t = msecs_to_ticks(msecs); @@ -176,6 +179,12 @@ rssadapt_node_init(struct ieee80211_node *ni) struct ieee80211_rssadapt *rsa = vap->iv_rs; const struct ieee80211_rateset *rs = &ni->ni_rates; + if (!rsa) { + if_printf(vap->iv_ifp, "ratectl structure was not allocated, " + "per-node structure allocation skipped\n"); + return; + } + if (ni->ni_rctls == NULL) { ni->ni_rctls = ra = IEEE80211_MALLOC(sizeof(struct ieee80211_rssadapt_node), @@ -230,10 +239,18 @@ rssadapt_rate(struct ieee80211_node *ni, void *arg __u { struct ieee80211_rssadapt_node *ra = ni->ni_rctls; u_int pktlen = iarg; - const struct ieee80211_rateset *rs = &ra->ra_rates; + const struct ieee80211_rateset *rs; uint16_t (*thrs)[IEEE80211_RATE_SIZE]; int rix, rssi; + /* XXX should return -1 here, but drivers may not expect this... */ + if (!ra) + { + ni->ni_txrate = ni->ni_rates.rs_rates[0]; + return 0; + } + + rs = &ra->ra_rates; if ((ticks - ra->ra_ticks) > ra->ra_rs->interval) { rssadapt_updatestats(ra); ra->ra_ticks = ticks; @@ -319,6 +336,9 @@ rssadapt_tx_complete(const struct ieee80211vap *vap, struct ieee80211_rssadapt_node *ra = ni->ni_rctls; int pktlen = *(int *)arg1, rssi = *(int *)arg2; + if (!ra) + return; + if (success) { ra->ra_nok++; if ((ra->ra_rix + 1) < ra->ra_rates.rs_nrates && @@ -335,9 +355,12 @@ rssadapt_sysctl_interval(SYSCTL_HANDLER_ARGS) { struct ieee80211vap *vap = arg1; struct ieee80211_rssadapt *rs = vap->iv_rs; - int msecs = ticks_to_msecs(rs->interval); - int error; + int msecs, error; + if (!rs) + return ENOMEM; + + msecs = ticks_to_msecs(rs->interval); error = sysctl_handle_int(oidp, &msecs, 0, req); if (error || !req->newptr) return error; From owner-svn-src-all@freebsd.org Tue Jan 15 02:26:05 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id B9D8614970E0; Tue, 15 Jan 2019 02:26:04 +0000 (UTC) (envelope-from avos@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 5DD6D8D284; Tue, 15 Jan 2019 02:26:04 +0000 (UTC) (envelope-from avos@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1: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 4852FC2EF; Tue, 15 Jan 2019 02:26:04 +0000 (UTC) (envelope-from avos@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x0F2Q4ql068938; Tue, 15 Jan 2019 02:26:04 GMT (envelope-from avos@FreeBSD.org) Received: (from avos@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x0F2Q3lQ068936; Tue, 15 Jan 2019 02:26:03 GMT (envelope-from avos@FreeBSD.org) Message-Id: <201901150226.x0F2Q3lQ068936@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: avos set sender to avos@FreeBSD.org using -f From: Andriy Voskoboinyk Date: Tue, 15 Jan 2019 02:26:03 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r343036 - stable/10/sys/net80211 X-SVN-Group: stable-10 X-SVN-Commit-Author: avos X-SVN-Commit-Paths: stable/10/sys/net80211 X-SVN-Commit-Revision: 343036 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 5DD6D8D284 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.95 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_SHORT(-0.95)[-0.955,0]; NEURAL_HAM_LONG(-1.00)[-0.999,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 15 Jan 2019 02:26:05 -0000 Author: avos Date: Tue Jan 15 02:26:03 2019 New Revision: 343036 URL: https://svnweb.freebsd.org/changeset/base/343036 Log: MFC r342966: net80211: fix possible panic for some drivers after r342465 Check if rate control structures were allocated before trying to access them in various places; this was possible before on allocation failure (unlikely), but was revealed after r342211 where allocation was deferred. The patch was adjusted a bit since file contents are different enough since r306591. Also, 'rate_stats' sysctl is not available here, so the panic is unlikely to happen here even without this patch. Modified: stable/10/sys/net80211/ieee80211_amrr.c stable/10/sys/net80211/ieee80211_rssadapt.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/net80211/ieee80211_amrr.c ============================================================================== --- stable/10/sys/net80211/ieee80211_amrr.c Tue Jan 15 02:16:23 2019 (r343035) +++ stable/10/sys/net80211/ieee80211_amrr.c Tue Jan 15 02:26:03 2019 (r343036) @@ -98,6 +98,9 @@ amrr_setinterval(const struct ieee80211vap *vap, int m struct ieee80211_amrr *amrr = vap->iv_rs; int t; + if (!amrr) + return; + if (msecs < 100) msecs = 100; t = msecs_to_ticks(msecs); @@ -152,6 +155,12 @@ amrr_node_init(struct ieee80211_node *ni) struct ieee80211_amrr_node *amn; uint8_t rate; + if (!amrr) { + if_printf(vap->iv_ifp, "ratectl structure was not allocated, " + "per-node structure allocation skipped\n"); + return; + } + if (ni->ni_rctls == NULL) { ni->ni_rctls = amn = malloc(sizeof(struct ieee80211_amrr_node), M_80211_RATECTL, M_NOWAIT|M_ZERO); @@ -303,10 +312,19 @@ static int amrr_rate(struct ieee80211_node *ni, void *arg __unused, uint32_t iarg __unused) { struct ieee80211_amrr_node *amn = ni->ni_rctls; - struct ieee80211_amrr *amrr = amn->amn_amrr; + struct ieee80211_amrr *amrr; const struct ieee80211_rateset *rs = NULL; int rix; + /* XXX should return -1 here, but drivers may not expect this... */ + if (!amn) + { + ni->ni_txrate = ni->ni_rates.rs_rates[0]; + return 0; + } + + amrr = amn->amn_amrr; + /* 11n or not? Pick the right rateset */ if (amrr_node_is_11n(ni)) { /* XXX ew */ @@ -346,6 +364,9 @@ amrr_tx_complete(const struct ieee80211vap *vap, struct ieee80211_amrr_node *amn = ni->ni_rctls; int retries = *(int *)arg1; + if (!amn) + return; + amn->amn_txcnt++; if (ok) amn->amn_success++; @@ -374,9 +395,12 @@ amrr_sysctl_interval(SYSCTL_HANDLER_ARGS) { struct ieee80211vap *vap = arg1; struct ieee80211_amrr *amrr = vap->iv_rs; - int msecs = ticks_to_msecs(amrr->amrr_interval); - int error; + int msecs, error; + if (!amrr) + return ENOMEM; + + msecs = ticks_to_msecs(amrr->amrr_interval); error = sysctl_handle_int(oidp, &msecs, 0, req); if (error || !req->newptr) return error; @@ -389,6 +413,9 @@ amrr_sysctlattach(struct ieee80211vap *vap, struct sysctl_ctx_list *ctx, struct sysctl_oid *tree) { struct ieee80211_amrr *amrr = vap->iv_rs; + + if (!amrr) + return; SYSCTL_ADD_PROC(ctx, SYSCTL_CHILDREN(tree), OID_AUTO, "amrr_rate_interval", CTLTYPE_INT | CTLFLAG_RW, vap, Modified: stable/10/sys/net80211/ieee80211_rssadapt.c ============================================================================== --- stable/10/sys/net80211/ieee80211_rssadapt.c Tue Jan 15 02:16:23 2019 (r343035) +++ stable/10/sys/net80211/ieee80211_rssadapt.c Tue Jan 15 02:26:03 2019 (r343036) @@ -114,6 +114,9 @@ rssadapt_setinterval(const struct ieee80211vap *vap, i struct ieee80211_rssadapt *rs = vap->iv_rs; int t; + if (!rs) + return; + if (msecs < 100) msecs = 100; t = msecs_to_ticks(msecs); @@ -172,6 +175,12 @@ rssadapt_node_init(struct ieee80211_node *ni) struct ieee80211_rssadapt *rsa = vap->iv_rs; const struct ieee80211_rateset *rs = &ni->ni_rates; + if (!rsa) { + if_printf(vap->iv_ifp, "ratectl structure was not allocated, " + "per-node structure allocation skipped\n"); + return; + } + if (ni->ni_rctls == NULL) { ni->ni_rctls = ra = malloc(sizeof(struct ieee80211_rssadapt_node), @@ -226,10 +235,18 @@ rssadapt_rate(struct ieee80211_node *ni, void *arg __u { struct ieee80211_rssadapt_node *ra = ni->ni_rctls; u_int pktlen = iarg; - const struct ieee80211_rateset *rs = &ra->ra_rates; + const struct ieee80211_rateset *rs; uint16_t (*thrs)[IEEE80211_RATE_SIZE]; int rix, rssi; + /* XXX should return -1 here, but drivers may not expect this... */ + if (!ra) + { + ni->ni_txrate = ni->ni_rates.rs_rates[0]; + return 0; + } + + rs = &ra->ra_rates; if ((ticks - ra->ra_ticks) > ra->ra_rs->interval) { rssadapt_updatestats(ra); ra->ra_ticks = ticks; @@ -315,6 +332,9 @@ rssadapt_tx_complete(const struct ieee80211vap *vap, struct ieee80211_rssadapt_node *ra = ni->ni_rctls; int pktlen = *(int *)arg1, rssi = *(int *)arg2; + if (!ra) + return; + if (success) { ra->ra_nok++; if ((ra->ra_rix + 1) < ra->ra_rates.rs_nrates && @@ -331,9 +351,12 @@ rssadapt_sysctl_interval(SYSCTL_HANDLER_ARGS) { struct ieee80211vap *vap = arg1; struct ieee80211_rssadapt *rs = vap->iv_rs; - int msecs = ticks_to_msecs(rs->interval); - int error; + int msecs, error; + if (!rs) + return ENOMEM; + + msecs = ticks_to_msecs(rs->interval); error = sysctl_handle_int(oidp, &msecs, 0, req); if (error || !req->newptr) return error; From owner-svn-src-all@freebsd.org Tue Jan 15 03:43:47 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 5B254149B720; Tue, 15 Jan 2019 03:43:47 +0000 (UTC) (envelope-from glebius@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 EC1B66A28F; Tue, 15 Jan 2019 03:43:46 +0000 (UTC) (envelope-from glebius@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 8CC03D253; Tue, 15 Jan 2019 03:43:46 +0000 (UTC) (envelope-from glebius@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x0F3hkh4011544; Tue, 15 Jan 2019 03:43:46 GMT (envelope-from glebius@FreeBSD.org) Received: (from glebius@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x0F3hksk011543; Tue, 15 Jan 2019 03:43:46 GMT (envelope-from glebius@FreeBSD.org) Message-Id: <201901150343.x0F3hksk011543@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: glebius set sender to glebius@FreeBSD.org using -f From: Gleb Smirnoff Date: Tue, 15 Jan 2019 03:43:46 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r343037 - head/sys/vm X-SVN-Group: head X-SVN-Commit-Author: glebius X-SVN-Commit-Paths: head/sys/vm X-SVN-Commit-Revision: 343037 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: EC1B66A28F X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.97 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_SHORT(-0.97)[-0.973,0]; NEURAL_HAM_LONG(-1.00)[-0.999,0] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 15 Jan 2019 03:43:47 -0000 Author: glebius Date: Tue Jan 15 03:43:46 2019 New Revision: 343037 URL: https://svnweb.freebsd.org/changeset/base/343037 Log: Fix compilation on 32-bit. Modified: head/sys/vm/uma_core.c Modified: head/sys/vm/uma_core.c ============================================================================== --- head/sys/vm/uma_core.c Tue Jan 15 02:26:03 2019 (r343036) +++ head/sys/vm/uma_core.c Tue Jan 15 03:43:46 2019 (r343037) @@ -3758,8 +3758,8 @@ uma_print_zone(uma_zone_t zone) uma_cache_t cache; int i; - printf("zone: %s(%p) size %d maxitems %lu flags %#x\n", - zone->uz_name, zone, zone->uz_size, zone->uz_max_items, + printf("zone: %s(%p) size %d maxitems %ju flags %#x\n", + zone->uz_name, zone, zone->uz_size, (uintmax_t)zone->uz_max_items, zone->uz_flags); if (zone->uz_lockptr != &zone->uz_lock) uma_print_keg(zone->uz_keg); From owner-svn-src-all@freebsd.org Tue Jan 15 06:18:19 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id CD25B14A2242; Tue, 15 Jan 2019 06:18:19 +0000 (UTC) (envelope-from agapon@gmail.com) Received: from mail-lf1-f53.google.com (mail-lf1-f53.google.com [209.85.167.53]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 31E326FFD6; Tue, 15 Jan 2019 06:18:19 +0000 (UTC) (envelope-from agapon@gmail.com) Received: by mail-lf1-f53.google.com with SMTP id a16so1135083lfg.3; Mon, 14 Jan 2019 22:18:19 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:references:from:openpgp:autocrypt :message-id:date:user-agent:mime-version:in-reply-to :content-language:content-transfer-encoding; bh=RnwXeOBuDmmhLoUIRHpbCZ/jO14T58/SQDcFcGO0sPE=; b=LEm1rI+7iVw3Tis6u3Mz1GbOhwZuvT3rBiJitJJXDfvfM22Ka3O2ys6ub2ifmfVTx0 xQeYmInaDwsuW+fdjJVE/+IPbImwKSBKhAkizL2Rl8M2Ry5mp/abmsWprFNy04ChFqc0 1yE40c+vfFN1s5zrivQhepTUmJsJG39OCCDoEXxvBUPUfFcgbKbC7Kavfc/v6G8x6sdm QmMCHKKfaRvknNz1UNPry85j0Uoam37z30OZqdRWijnHIqAZ5xBSruuzYJFg07ZEurJr TfVqJERv6Tan+4j9ewKeYwlSroOl80gkkyHiQBfY+o3vfNIbdcW0JeNaMPuHPnQmILmI tasA== X-Gm-Message-State: AJcUukdO4SH3BqmpAdlOBpM9LtlJldjSSfQj+UZozFBoXNAVTnA5Q/9V B5nz5wdY4eHl8Jg3vLYqsRL3L1S1 X-Google-Smtp-Source: ALg8bN7Gl7enZpN6uMMrWaOyY3/dtmYqhnXayM6ZoveQK7r8+VPxnYlttXXbIFvgoSzlscAlkyTXvQ== X-Received: by 2002:a19:3fcf:: with SMTP id m198mr1519886lfa.106.1547533091349; Mon, 14 Jan 2019 22:18:11 -0800 (PST) Received: from [192.168.0.88] (east.meadow.volia.net. [93.72.151.96]) by smtp.googlemail.com with ESMTPSA id p186sm444834lfd.83.2019.01.14.22.18.09 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 14 Jan 2019 22:18:10 -0800 (PST) Subject: Re: svn commit: r343026 - in head: lib/libmemstat sys/vm To: Gleb Smirnoff , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org References: <201901150002.x0F026EW092943@repo.freebsd.org> From: Andriy Gapon Openpgp: preference=signencrypt Autocrypt: addr=avg@FreeBSD.org; prefer-encrypt=mutual; keydata= xsFNBFm4LIgBEADNB/3lT7f15UKeQ52xCFQx/GqHkSxEdVyLFZTmY3KyNPQGBtyvVyBfprJ7 mAeXZWfhat6cKNRAGZcL5EmewdQuUfQfBdYmKjbw3a9GFDsDNuhDA2QwFt8BmkiVMRYyvI7l N0eVzszWCUgdc3qqM6qqcgBaqsVmJluwpvwp4ZBXmch5BgDDDb1MPO8AZ2QZfIQmplkj8Y6Z AiNMknkmgaekIINSJX8IzRzKD5WwMsin70psE8dpL/iBsA2cpJGzWMObVTtCxeDKlBCNqM1i gTXta1ukdUT7JgLEFZk9ceYQQMJJtUwzWu1UHfZn0Fs29HTqawfWPSZVbulbrnu5q55R4PlQ /xURkWQUTyDpqUvb4JK371zhepXiXDwrrpnyyZABm3SFLkk2bHlheeKU6Yql4pcmSVym1AS4 dV8y0oHAfdlSCF6tpOPf2+K9nW1CFA8b/tw4oJBTtfZ1kxXOMdyZU5fiG7xb1qDgpQKgHUX8 7Rd2T1UVLVeuhYlXNw2F+a2ucY+cMoqz3LtpksUiBppJhw099gEXehcN2JbUZ2TueJdt1FdS ztnZmsHUXLxrRBtGwqnFL7GSd6snpGIKuuL305iaOGODbb9c7ne1JqBbkw1wh8ci6vvwGlzx rexzimRaBzJxlkjNfMx8WpCvYebGMydNoeEtkWldtjTNVsUAtQARAQABzR5BbmRyaXkgR2Fw b24gPGF2Z0BGcmVlQlNELm9yZz7CwZQEEwEIAD4WIQS+LEO7ngQnXA4Bjr538m7TUc1yjwUC WbgsiAIbIwUJBaOagAULCQgHAgYVCAkKCwIEFgIDAQIeAQIXgAAKCRB38m7TUc1yj+JAEACV l9AK/nOWAt/9cufV2fRj0hdOqB1aCshtSrwHk/exXsDa4/FkmegxXQGY+3GWX3deIyesbVRL rYdtdK0dqJyT1SBqXK1h3/at9rxr9GQA6KWOxTjUFURsU7ok/6SIlm8uLRPNKO+yq0GDjgaO LzN+xykuBA0FlhQAXJnpZLcVfPJdWv7sSHGedL5ln8P8rxR+XnmsA5TUaaPcbhTB+mG+iKFj GghASDSfGqLWFPBlX/fpXikBDZ1gvOr8nyMY9nXhgfXpq3B6QCRYKPy58ChrZ5weeJZ29b7/ QdEO8NFNWHjSD9meiLdWQaqo9Y7uUxN3wySc/YUZxtS0bhAd8zJdNPsJYG8sXgKjeBQMVGuT eCAJFEYJqbwWvIXMfVWop4+O4xB+z2YE3jAbG/9tB/GSnQdVSj3G8MS80iLS58frnt+RSEw/ psahrfh0dh6SFHttE049xYiC+cM8J27Aaf0i9RflyITq57NuJm+AHJoU9SQUkIF0nc6lfA+o JRiyRlHZHKoRQkIg4aiKaZSWjQYRl5Txl0IZUP1dSWMX4s3XTMurC/pnja45dge/4ESOtJ9R 8XuIWg45Oq6MeIWdjKddGhRj3OohsltKgkEU3eLKYtB6qRTQypHHUawCXz88uYt5e3w4V16H lCpSTZV/EVHnNe45FVBlvK7k7HFfDDkryM7BTQRZuCyIARAAlq0slcsVboY/+IUJdcbEiJRW be9HKVz4SUchq0z9MZPX/0dcnvz/gkyYA+OuM78dNS7Mbby5dTvOqfpLJfCuhaNYOhlE0wY+ 1T6Tf1f4c/uA3U/YiadukQ3+6TJuYGAdRZD5EqYFIkreARTVWg87N9g0fT9BEqLw9lJtEGDY EWUE7L++B8o4uu3LQFEYxcrb4K/WKmgtmFcm77s0IKDrfcX4doV92QTIpLiRxcOmCC/OCYuO jB1oaaqXQzZrCutXRK0L5XN1Y1PYjIrEzHMIXmCDlLYnpFkK+itlXwlE2ZQxkfMruCWdQXye syl2fynAe8hvp7Mms9qU2r2K9EcJiR5N1t1C2/kTKNUhcRv7Yd/vwusK7BqJbhlng5ZgRx0m WxdntU/JLEntz3QBsBsWM9Y9wf2V4tLv6/DuDBta781RsCB/UrU2zNuOEkSixlUiHxw1dccI 6CVlaWkkJBxmHX22GdDFrcjvwMNIbbyfQLuBq6IOh8nvu9vuItup7qemDG3Ms6TVwA7BD3j+ 3fGprtyW8Fd/RR2bW2+LWkMrqHffAr6Y6V3h5kd2G9Q8ZWpEJk+LG6Mk3fhZhmCnHhDu6CwN MeUvxXDVO+fqc3JjFm5OxhmfVeJKrbCEUJyM8ESWLoNHLqjywdZga4Q7P12g8DUQ1mRxYg/L HgZY3zfKOqcAEQEAAcLBfAQYAQgAJhYhBL4sQ7ueBCdcDgGOvnfybtNRzXKPBQJZuCyIAhsM BQkFo5qAAAoJEHfybtNRzXKPBVwQAKfFy9P7N3OsLDMB56A4Kf+ZT+d5cIx0Yiaf4n6w7m3i ImHHHk9FIetI4Xe54a2IXh4Bq5UkAGY0667eIs+Z1Ea6I2i27Sdo7DxGwq09Qnm/Y65ADvXs 3aBvokCcm7FsM1wky395m8xUos1681oV5oxgqeRI8/76qy0hD9WR65UW+HQgZRIcIjSel9vR XDaD2HLGPTTGr7u4v00UeTMs6qvPsa2PJagogrKY8RXdFtXvweQFz78NbXhluwix2Tb9ETPk LIpDrtzV73CaE2aqBG/KrboXT2C67BgFtnk7T7Y7iKq4/XvEdDWscz2wws91BOXuMMd4c/c4 OmGW9m3RBLufFrOag1q5yUS9QbFfyqL6dftJP3Zq/xe+mr7sbWbhPVCQFrH3r26mpmy841ym dwQnNcsbIGiBASBSKksOvIDYKa2Wy8htPmWFTEOPRpFXdGQ27awcjjnB42nngyCK5ukZDHi6 w0qK5DNQQCkiweevCIC6wc3p67jl1EMFY5+z+zdTPb3h7LeVnGqW0qBQl99vVFgzLxchKcl0 R/paSFgwqXCZhAKMuUHncJuynDOP7z5LirUeFI8qsBAJi1rXpQoLJTVcW72swZ42IdPiboqx NbTMiNOiE36GqMcTPfKylCbF45JNX4nF9ElM0E+Y8gi4cizJYBRr2FBJgay0b9Cp Message-ID: Date: Tue, 15 Jan 2019 08:18:08 +0200 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:52.0) Gecko/20100101 Thunderbird/52.7.0 MIME-Version: 1.0 In-Reply-To: <201901150002.x0F026EW092943@repo.freebsd.org> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit X-Rspamd-Queue-Id: 31E326FFD6 X-Spamd-Bar: ------ Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-6.96 / 15.00]; NEURAL_HAM_MEDIUM(-1.00)[-1.000,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; REPLY(-4.00)[]; NEURAL_HAM_SHORT(-0.96)[-0.957,0] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 15 Jan 2019 06:18:20 -0000 On 15/01/2019 02:02, Gleb Smirnoff wrote: > o Since new limits don't play well with multi-keg zones, remove them. The > idea of multi-keg zones was introduced exactly 10 years ago, and never > have had a practical usage. In discussion with Jeff we came to a wild > agreement that if we ever want to reintroduce the idea of a smart allocator > that would be able to choose between two (or more) totally different > backing stores, that choice should be made one level higher than UMA, > e.g. in malloc(9) or in mget(), or whatever and choice should be controlled > by the caller. I would make this a separate commit before the main change. But no troubles. Thank you for the change! -- Andriy Gapon From owner-svn-src-all@freebsd.org Tue Jan 15 06:44:38 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id D2C7014A3206; Tue, 15 Jan 2019 06:44:38 +0000 (UTC) (envelope-from delphij@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 7894D70E4B; Tue, 15 Jan 2019 06:44:38 +0000 (UTC) (envelope-from delphij@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 6AB1BF2ED; Tue, 15 Jan 2019 06:44:38 +0000 (UTC) (envelope-from delphij@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x0F6ico0005771; Tue, 15 Jan 2019 06:44:38 GMT (envelope-from delphij@FreeBSD.org) Received: (from delphij@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x0F6icDs005770; Tue, 15 Jan 2019 06:44:38 GMT (envelope-from delphij@FreeBSD.org) Message-Id: <201901150644.x0F6icDs005770@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: delphij set sender to delphij@FreeBSD.org using -f From: Xin LI Date: Tue, 15 Jan 2019 06:44:38 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r343038 - head/sys/kern X-SVN-Group: head X-SVN-Commit-Author: delphij X-SVN-Commit-Paths: head/sys/kern X-SVN-Commit-Revision: 343038 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 7894D70E4B X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.95 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_SHORT(-0.96)[-0.956,0]; NEURAL_HAM_LONG(-1.00)[-0.999,0] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 15 Jan 2019 06:44:39 -0000 Author: delphij Date: Tue Jan 15 06:44:37 2019 New Revision: 343038 URL: https://svnweb.freebsd.org/changeset/base/343038 Log: Use TD_IS_IDLETHREAD instead of unrolled version. MFC after: 2 weeks Modified: head/sys/kern/kern_ktr.c Modified: head/sys/kern/kern_ktr.c ============================================================================== --- head/sys/kern/kern_ktr.c Tue Jan 15 03:43:46 2019 (r343037) +++ head/sys/kern/kern_ktr.c Tue Jan 15 06:44:37 2019 (r343038) @@ -341,7 +341,7 @@ ktr_tracepoint(uint64_t mask, const char *file, int li #ifdef KTR_ALQ if (ktr_alq_enabled) { if (td->td_critnest == 0 && - (td->td_flags & TDF_IDLETD) == 0 && + (TD_IS_IDLETHREAD(td)) == 0 && td != ald_thread) { if (ktr_alq_max && ktr_alq_cnt > ktr_alq_max) goto done; From owner-svn-src-all@freebsd.org Tue Jan 15 06:50:53 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 0124114A3484; Tue, 15 Jan 2019 06:50:53 +0000 (UTC) (envelope-from delphij@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 96C9B71158; Tue, 15 Jan 2019 06:50:52 +0000 (UTC) (envelope-from delphij@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 30C74F419; Tue, 15 Jan 2019 06:50:52 +0000 (UTC) (envelope-from delphij@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x0F6oqXW006139; Tue, 15 Jan 2019 06:50:52 GMT (envelope-from delphij@FreeBSD.org) Received: (from delphij@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x0F6oqIQ006138; Tue, 15 Jan 2019 06:50:52 GMT (envelope-from delphij@FreeBSD.org) Message-Id: <201901150650.x0F6oqIQ006138@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: delphij set sender to delphij@FreeBSD.org using -f From: Xin LI Date: Tue, 15 Jan 2019 06:50:52 +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: r343039 - stable/12/lib/libutil X-SVN-Group: stable-12 X-SVN-Commit-Author: delphij X-SVN-Commit-Paths: stable/12/lib/libutil X-SVN-Commit-Revision: 343039 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 96C9B71158 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.95 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_SHORT(-0.95)[-0.952,0]; NEURAL_HAM_LONG(-1.00)[-0.999,0] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 15 Jan 2019 06:50:53 -0000 Author: delphij Date: Tue Jan 15 06:50:51 2019 New Revision: 343039 URL: https://svnweb.freebsd.org/changeset/base/343039 Log: MFC r342640: Ensure buffer is nul-terminated. Modified: stable/12/lib/libutil/quotafile.c Directory Properties: stable/12/ (props changed) Modified: stable/12/lib/libutil/quotafile.c ============================================================================== --- stable/12/lib/libutil/quotafile.c Tue Jan 15 06:44:37 2019 (r343038) +++ stable/12/lib/libutil/quotafile.c Tue Jan 15 06:50:51 2019 (r343039) @@ -103,7 +103,7 @@ hasquota(struct fstab *fs, int type, char *qfnamep, in return (0); } if (cp) { - strncpy(qfnamep, cp, qfbufsize); + strlcpy(qfnamep, cp, qfbufsize); } else { (void)snprintf(qfnamep, qfbufsize, "%s/%s.%s", fs->fs_file, QUOTAFILENAME, qfextension[type]); From owner-svn-src-all@freebsd.org Tue Jan 15 06:52:35 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id CE6FA14A36EB; Tue, 15 Jan 2019 06:52:35 +0000 (UTC) (envelope-from delphij@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 6D6257152C; Tue, 15 Jan 2019 06:52:35 +0000 (UTC) (envelope-from delphij@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 59AB5F49B; Tue, 15 Jan 2019 06:52:35 +0000 (UTC) (envelope-from delphij@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x0F6qZp2010981; Tue, 15 Jan 2019 06:52:35 GMT (envelope-from delphij@FreeBSD.org) Received: (from delphij@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x0F6qZUr010980; Tue, 15 Jan 2019 06:52:35 GMT (envelope-from delphij@FreeBSD.org) Message-Id: <201901150652.x0F6qZUr010980@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: delphij set sender to delphij@FreeBSD.org using -f From: Xin LI Date: Tue, 15 Jan 2019 06:52:35 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r343040 - stable/11/lib/libutil X-SVN-Group: stable-11 X-SVN-Commit-Author: delphij X-SVN-Commit-Paths: stable/11/lib/libutil X-SVN-Commit-Revision: 343040 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 6D6257152C X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.95 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_SHORT(-0.95)[-0.952,0]; NEURAL_HAM_LONG(-1.00)[-0.999,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 15 Jan 2019 06:52:36 -0000 Author: delphij Date: Tue Jan 15 06:52:34 2019 New Revision: 343040 URL: https://svnweb.freebsd.org/changeset/base/343040 Log: MFC r342640: Ensure buffer is nul-terminated. Modified: stable/11/lib/libutil/quotafile.c Directory Properties: stable/11/ (props changed) Modified: stable/11/lib/libutil/quotafile.c ============================================================================== --- stable/11/lib/libutil/quotafile.c Tue Jan 15 06:50:51 2019 (r343039) +++ stable/11/lib/libutil/quotafile.c Tue Jan 15 06:52:34 2019 (r343040) @@ -101,7 +101,7 @@ hasquota(struct fstab *fs, int type, char *qfnamep, in return (0); } if (cp) { - strncpy(qfnamep, cp, qfbufsize); + strlcpy(qfnamep, cp, qfbufsize); } else { (void)snprintf(qfnamep, qfbufsize, "%s/%s.%s", fs->fs_file, QUOTAFILENAME, qfextension[type]); From owner-svn-src-all@freebsd.org Tue Jan 15 08:59:52 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id A5F4B14A6BC7; Tue, 15 Jan 2019 08:59:52 +0000 (UTC) (envelope-from kp@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 47757758B1; Tue, 15 Jan 2019 08:59:52 +0000 (UTC) (envelope-from kp@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 383EB1891B; Tue, 15 Jan 2019 08:59:52 +0000 (UTC) (envelope-from kp@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x0F8xqeZ074681; Tue, 15 Jan 2019 08:59:52 GMT (envelope-from kp@FreeBSD.org) Received: (from kp@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x0F8xqqt074680; Tue, 15 Jan 2019 08:59:52 GMT (envelope-from kp@FreeBSD.org) Message-Id: <201901150859.x0F8xqqt074680@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kp set sender to kp@FreeBSD.org using -f From: Kristof Provost Date: Tue, 15 Jan 2019 08:59:52 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r343041 - head/sys/netpfil/pf X-SVN-Group: head X-SVN-Commit-Author: kp X-SVN-Commit-Paths: head/sys/netpfil/pf X-SVN-Commit-Revision: 343041 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 47757758B1 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.97 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_SHORT(-0.97)[-0.973,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_LONG(-1.00)[-0.999,0] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 15 Jan 2019 08:59:52 -0000 Author: kp Date: Tue Jan 15 08:59:51 2019 New Revision: 343041 URL: https://svnweb.freebsd.org/changeset/base/343041 Log: pf: silence a runtime warning Sometimes, for negated tables, pf can log 'pfr_update_stats: assertion failed'. This warning does not clarify anything for users, so silence it, just as OpenBSD has. PR: 234874 MFC after: 1 week Modified: head/sys/netpfil/pf/pf_table.c Modified: head/sys/netpfil/pf/pf_table.c ============================================================================== --- head/sys/netpfil/pf/pf_table.c Tue Jan 15 06:52:34 2019 (r343040) +++ head/sys/netpfil/pf/pf_table.c Tue Jan 15 08:59:51 2019 (r343041) @@ -51,6 +51,8 @@ __FBSDID("$FreeBSD$"); #include #include +#define DPFPRINTF(n, x) if (V_pf_status.debug >= (n)) printf x + #define ACCEPT_FLAGS(flags, oklist) \ do { \ if ((flags & ~(oklist)) & \ @@ -1992,7 +1994,8 @@ pfr_update_stats(struct pfr_ktable *kt, struct pf_addr } if ((ke == NULL || ke->pfrke_not) != notrule) { if (op_pass != PFR_OP_PASS) - printf("pfr_update_stats: assertion failed.\n"); + DPFPRINTF(PF_DEBUG_URGENT, + ("pfr_update_stats: assertion failed.\n")); op_pass = PFR_OP_XPASS; } kt->pfrkt_packets[dir_out][op_pass]++; From owner-svn-src-all@freebsd.org Tue Jan 15 09:48:19 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 3D8C61482987; Tue, 15 Jan 2019 09:48:19 +0000 (UTC) (envelope-from andrew@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 D6474772EA; Tue, 15 Jan 2019 09:48:18 +0000 (UTC) (envelope-from andrew@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1: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 C7A55191A4; Tue, 15 Jan 2019 09:48:18 +0000 (UTC) (envelope-from andrew@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x0F9mIqd001042; Tue, 15 Jan 2019 09:48:18 GMT (envelope-from andrew@FreeBSD.org) Received: (from andrew@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x0F9mIIS001041; Tue, 15 Jan 2019 09:48:18 GMT (envelope-from andrew@FreeBSD.org) Message-Id: <201901150948.x0F9mIIS001041@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: andrew set sender to andrew@FreeBSD.org using -f From: Andrew Turner Date: Tue, 15 Jan 2019 09:48:18 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r343042 - head/sys/arm64/arm64 X-SVN-Group: head X-SVN-Commit-Author: andrew X-SVN-Commit-Paths: head/sys/arm64/arm64 X-SVN-Commit-Revision: 343042 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: D6474772EA X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.97 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_LONG(-1.00)[-0.999,0]; NEURAL_HAM_SHORT(-0.97)[-0.970,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 15 Jan 2019 09:48:19 -0000 Author: andrew Date: Tue Jan 15 09:48:18 2019 New Revision: 343042 URL: https://svnweb.freebsd.org/changeset/base/343042 Log: Ensure the I-Cache is correctly handled in arm64_icache_sync_range The cache_handle_range macro to handle the arm64 instruction and data cache operations would return when it was complete. This causes problems for arm64_icache_sync_range and arm64_icache_sync_range_checked as they assume they can execute the i-cache handling instruction after it has been called. Fix this by making this assumption correct. While here add missing instruction barriers and adjust the style to match the rest of the assembly. Sponsored by: DARPA, AFRL Differential Revision: https://reviews.freebsd.org/D18838 Modified: head/sys/arm64/arm64/cpufunc_asm.S Modified: head/sys/arm64/arm64/cpufunc_asm.S ============================================================================== --- head/sys/arm64/arm64/cpufunc_asm.S Tue Jan 15 08:59:51 2019 (r343041) +++ head/sys/arm64/arm64/cpufunc_asm.S Tue Jan 15 09:48:18 2019 (r343042) @@ -77,7 +77,6 @@ __FBSDID("$FreeBSD$"); .if \ic != 0 isb .endif - ret .endm ENTRY(arm64_nullop) @@ -112,6 +111,7 @@ END(arm64_tlb_flushID) */ ENTRY(arm64_dcache_wb_range) cache_handle_range dcop = cvac + ret END(arm64_dcache_wb_range) /* @@ -119,6 +119,7 @@ END(arm64_dcache_wb_range) */ ENTRY(arm64_dcache_wbinv_range) cache_handle_range dcop = civac + ret END(arm64_dcache_wbinv_range) /* @@ -129,6 +130,7 @@ END(arm64_dcache_wbinv_range) */ ENTRY(arm64_dcache_inv_range) cache_handle_range dcop = ivac + ret END(arm64_dcache_inv_range) /* @@ -136,6 +138,7 @@ END(arm64_dcache_inv_range) */ ENTRY(arm64_idcache_wbinv_range) cache_handle_range dcop = civac, ic = 1, icop = ivau + ret END(arm64_idcache_wbinv_range) /* @@ -150,6 +153,8 @@ ENTRY(arm64_icache_sync_range) cache_handle_range dcop = cvau ic ialluis dsb ish + isb + ret END(arm64_icache_sync_range) /* @@ -161,7 +166,8 @@ ENTRY(arm64_icache_sync_range_checked) /* XXX: See comment in arm64_icache_sync_range */ cache_handle_range dcop = cvau ic ialluis - dsb ish + dsb ish + isb SET_FAULT_HANDLER(xzr, x6) mov x0, #0 ret From owner-svn-src-all@freebsd.org Tue Jan 15 15:35:15 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 527EE148DFA7; Tue, 15 Jan 2019 15:35:15 +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 EBCC68B9B9; Tue, 15 Jan 2019 15:35:14 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id DCE4B1CD16; Tue, 15 Jan 2019 15:35:14 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x0FFZEiF018788; Tue, 15 Jan 2019 15:35:14 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x0FFZE94018787; Tue, 15 Jan 2019 15:35:14 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <201901151535.x0FFZE94018787@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Tue, 15 Jan 2019 15:35:14 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r343043 - head/crypto/openssh X-SVN-Group: head X-SVN-Commit-Author: emaste X-SVN-Commit-Paths: head/crypto/openssh X-SVN-Commit-Revision: 343043 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: EBCC68B9B9 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.96 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_LONG(-1.00)[-0.999,0]; NEURAL_HAM_SHORT(-0.96)[-0.958,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 15 Jan 2019 15:35:15 -0000 Author: emaste Date: Tue Jan 15 15:35:14 2019 New Revision: 343043 URL: https://svnweb.freebsd.org/changeset/base/343043 Log: scp: disallow empty or current directory Obtained from: OpenBSD scp.c 1.198 Security: CVE-2018-20685 Sponsored by: The FreeBSD Foundation Modified: head/crypto/openssh/scp.c Modified: head/crypto/openssh/scp.c ============================================================================== --- head/crypto/openssh/scp.c Tue Jan 15 09:48:18 2019 (r343042) +++ head/crypto/openssh/scp.c Tue Jan 15 15:35:14 2019 (r343043) @@ -1106,7 +1106,8 @@ sink(int argc, char **argv) SCREWUP("size out of range"); size = (off_t)ull; - if ((strchr(cp, '/') != NULL) || (strcmp(cp, "..") == 0)) { + if (*cp == '\0' || strchr(cp, '/') != NULL || + strcmp(cp, ".") == 0 || strcmp(cp, "..") == 0) { run_err("error: unexpected filename: %s", cp); exit(1); } From owner-svn-src-all@freebsd.org Tue Jan 15 15:47:02 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id ACAA0148E3B0; Tue, 15 Jan 2019 15:47: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 49B478BFF2; Tue, 15 Jan 2019 15:47: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 36AE21CEBA; Tue, 15 Jan 2019 15:47: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 x0FFl2SN025256; Tue, 15 Jan 2019 15:47:02 GMT (envelope-from kevans@FreeBSD.org) Received: (from kevans@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x0FFl2XQ025255; Tue, 15 Jan 2019 15:47:02 GMT (envelope-from kevans@FreeBSD.org) Message-Id: <201901151547.x0FFl2XQ025255@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kevans set sender to kevans@FreeBSD.org using -f From: Kyle Evans Date: Tue, 15 Jan 2019 15:47:02 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r343044 - stable/11/sbin/newfs_msdos X-SVN-Group: stable-11 X-SVN-Commit-Author: kevans X-SVN-Commit-Paths: stable/11/sbin/newfs_msdos X-SVN-Commit-Revision: 343044 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 49B478BFF2 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.97 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_SHORT(-0.97)[-0.972,0]; NEURAL_HAM_LONG(-1.00)[-0.999,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 15 Jan 2019 15:47:02 -0000 Author: kevans Date: Tue Jan 15 15:47:01 2019 New Revision: 343044 URL: https://svnweb.freebsd.org/changeset/base/343044 Log: MFC r305074-r305075, r327275, r327570: newfs_msdos updates r305074: Remove CHS alignment. It's not needed and causes problems for the BBB boot partition. NetBSD removed it in 1.10 in their repo some time ago. r305075: The code only converts from bpbHugeSectors to bpbSectors if the sum of the hidden and huge sectors is less than or equal MAXU16. When formatting in Windows bpbSectors is still used for 63488 sectors and 2048 hidden (sum > MAXU16). The hidden sectors count is the number of sectors before the FAT16 Boot Record so it shouldn't affect the sector count. Attached patch (huge_sec_conversion.patch) to only check for bpb.bpbHugeSectors <= MAXU16 when converting to bpbSectors. r327275: Close fd and fd1 before returning now that we're done with them. r327570: Only call close if fd and fd1 are not -1. PR: 183234 Modified: stable/11/sbin/newfs_msdos/mkfs_msdos.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sbin/newfs_msdos/mkfs_msdos.c ============================================================================== --- stable/11/sbin/newfs_msdos/mkfs_msdos.c Tue Jan 15 15:35:14 2019 (r343043) +++ stable/11/sbin/newfs_msdos/mkfs_msdos.c Tue Jan 15 15:47:01 2019 (r343044) @@ -249,6 +249,7 @@ mkfs_msdos(const char *fname, const char *dtype, const img = NULL; rv = -1; + fd = fd1 = -1; if (o.block_size && o.sectors_per_cluster) { warnx("Cannot specify both block size and sectors per cluster"); @@ -315,15 +316,8 @@ mkfs_msdos(const char *fname, const char *dtype, const bpb.bpbHiddenSecs = o.hidden_sectors; if (!(o.floppy || (o.drive_heads && o.sectors_per_track && o.bytes_per_sector && o.size && o.hidden_sectors_set))) { - off_t delta; getdiskinfo(fd, fname, dtype, o.hidden_sectors_set, &bpb); bpb.bpbHugeSectors -= (o.offset / bpb.bpbBytesPerSec); - delta = bpb.bpbHugeSectors % bpb.bpbSecPerTrack; - if (delta != 0) { - warnx("trim %d sectors to adjust to a multiple of %d", - (int)delta, bpb.bpbSecPerTrack); - bpb.bpbHugeSectors -= delta; - } if (bpb.bpbSecPerClust == 0) { /* set defaults */ if (bpb.bpbHugeSectors <= 6000) /* about 3MB -> 512 bytes */ bpb.bpbSecPerClust = 1; @@ -598,7 +592,7 @@ mkfs_msdos(const char *fname, const char *dtype, const bpb.bpbMedia = !bpb.bpbHiddenSecs ? 0xf0 : 0xf8; if (fat == 32) bpb.bpbRootClust = RESFTE; - if (bpb.bpbHiddenSecs + bpb.bpbHugeSectors <= MAXU16) { + if (bpb.bpbHugeSectors <= MAXU16) { bpb.bpbSectors = bpb.bpbHugeSectors; bpb.bpbHugeSectors = 0; } @@ -758,6 +752,10 @@ mkfs_msdos(const char *fname, const char *dtype, const rv = 0; done: free(img); + if (fd != -1) + close(fd); + if (fd1 != -1) + close(fd1); return rv; } From owner-svn-src-all@freebsd.org Tue Jan 15 15:52:25 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id E819D148E5CF; Tue, 15 Jan 2019 15:52:24 +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 8744F8C3DE; Tue, 15 Jan 2019 15:52:24 +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 6B1731D054; Tue, 15 Jan 2019 15:52:24 +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 x0FFqOjH030618; Tue, 15 Jan 2019 15:52:24 GMT (envelope-from kevans@FreeBSD.org) Received: (from kevans@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x0FFqOHi030617; Tue, 15 Jan 2019 15:52:24 GMT (envelope-from kevans@FreeBSD.org) Message-Id: <201901151552.x0FFqOHi030617@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kevans set sender to kevans@FreeBSD.org using -f From: Kyle Evans Date: Tue, 15 Jan 2019 15:52: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: r343045 - in stable/12: libexec/rc share/man/man8 X-SVN-Group: stable-12 X-SVN-Commit-Author: kevans X-SVN-Commit-Paths: in stable/12: libexec/rc share/man/man8 X-SVN-Commit-Revision: 343045 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 8744F8C3DE X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.97 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_SHORT(-0.97)[-0.972,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_LONG(-1.00)[-0.999,0] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 15 Jan 2019 15:52:25 -0000 Author: kevans Date: Tue Jan 15 15:52:23 2019 New Revision: 343045 URL: https://svnweb.freebsd.org/changeset/base/343045 Log: MFC r342792, r342805: Provide rc_service variable for rc service scripts r342792: rc.subr: Provide rc_service variable for service scripts Some rc scripts in ports (e.g. uwsgi, apache, openvpn) allow for 'application profiles' that usually require the rc script to be invoked again for each active profile. Because there's no consistent way to determine the path because it differs between manual/service(8) invocations and /etc/rc invocations, this leads to patterns like these: - www/uwsgi hardcodes the script path - security/openvpn guesses either $_file or $0 based on $0 = /etc/rc Instead of forcing rc scripts to guess, provide an rc_service variable to the scripts that gets set appropriately both for direct execution or when a script is being executed via run_rc_script (e.g. /etc/rc). This is our analog of an OpenRC variable with the same name, different case (RC_SERVICE). r342805: rc.subr: Fix typo Originally intended as 'in case in needs to be re-invoked', but it was later decided (by myself) that 're-invoke itself' makes it more clear that the script is expected to use this in a way. PR: 234614 Modified: stable/12/libexec/rc/rc.subr stable/12/share/man/man8/rc.subr.8 Directory Properties: stable/12/ (props changed) Modified: stable/12/libexec/rc/rc.subr ============================================================================== --- stable/12/libexec/rc/rc.subr Tue Jan 15 15:47:01 2019 (r343044) +++ stable/12/libexec/rc/rc.subr Tue Jan 15 15:52:23 2019 (r343045) @@ -52,6 +52,14 @@ ID="/usr/bin/id" IDCMD="if [ -x $ID ]; then $ID -un; fi" PS="/bin/ps -ww" JID=0 +# rc_service provides the path to the service script that we are executing. +# This is not being set here in an execution context, necessarily, so it's +# really just a reasonable guess, and it will get overwritten later if +# we are executing from some other means than direct execution by service(8) +# or manual invocation of the service script. The prime example of this is +# during system startup, all rc scripts will be invoked via /etc/rc, so +# run_rc_script will overwrite rc_service with the file being sourced. +rc_service="$0" # # functions @@ -867,6 +875,9 @@ check_startmsgs() # by $flags from the environment. # This variable may be changed by the precmd method. # +# rc_service Path to the service being executed, in case the service +# needs to re-invoke itself. +# # rc_pid PID of command (if appropriate) # # rc_fast Not empty if "fast" was provided (q.v.) @@ -1370,6 +1381,7 @@ run_rc_script() required_vars eval unset ${_arg}_cmd ${_arg}_precmd ${_arg}_postcmd + rc_service="$_file" case "$_file" in /etc/rc.d/*.sh) # no longer allowed in the base warn "Ignoring old-style startup script $_file" Modified: stable/12/share/man/man8/rc.subr.8 ============================================================================== --- stable/12/share/man/man8/rc.subr.8 Tue Jan 15 15:47:01 2019 (r343044) +++ stable/12/share/man/man8/rc.subr.8 Tue Jan 15 15:52:23 2019 (r343045) @@ -29,7 +29,7 @@ .\" .\" $FreeBSD$ .\" -.Dd June 19, 2018 +.Dd January 15, 2019 .Dt RC.SUBR 8 .Os .Sh NAME @@ -763,7 +763,7 @@ The following variables are available to the methods as well as after .Ic run_rc_command has completed: -.Bl -tag -width ".Va rc_flags" -offset indent +.Bl -tag -width ".Va rc_service" -offset indent .It Va rc_arg Argument provided to .Ic run_rc_command , @@ -777,6 +777,8 @@ unless overridden by the environment variable This variable may be changed by the .Ar argument Ns Va _precmd method. +.It Va rc_service +Path to the service script being executed, in case it needs to re-invoke itself. .It Va rc_pid PID of .Va command From owner-svn-src-all@freebsd.org Tue Jan 15 16:07:12 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id EA16C148EA71; Tue, 15 Jan 2019 16:07:11 +0000 (UTC) (envelope-from gallatin@cs.duke.edu) Received: from duke.cs.duke.edu (duke.cs.duke.edu [152.3.140.1]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 8BDF68CB6F; Tue, 15 Jan 2019 16:07:11 +0000 (UTC) (envelope-from gallatin@cs.duke.edu) Received: from [192.168.200.4] (c-71-56-186-158.hsd1.va.comcast.net [71.56.186.158]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) (Authenticated sender: gallatin) by duke.cs.duke.edu (Postfix) with ESMTPSA id 4BEC72700225; Tue, 15 Jan 2019 11:07:05 -0500 (EST) DMARC-Filter: OpenDMARC Filter v1.3.1 duke.cs.duke.edu 4BEC72700225 DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=cs.duke.edu; s=mail0816; t=1547568425; bh=FXZKVWzfYOFV8bKjRehKMx1CjozMKn3KVRFNnvXBZYs=; h=Subject:To:From:Date:From; b=dyxb+QMLqs25MfJQ8fC2nzWzdrL9tWwbCLpoqb1Sq7Nm9FcdRFEgVL1CxKOWZAWIf eiT0mViUs5WDsvtsuo8cJun1zxKiD67g/HvSDsL6dNZh5Jx0srA+TR2ifsagHQ2jw5 MmMBqn1ZWp6LK0zccw+d6zRj6+dimFgSvHUon6t1dwEZySGBp7dfqeWxbxb8eACHMR 2+iW1j35MRcPO8WnGBAwbnyZYG89aXxQxq0YHy7kCsJiO3PYL4Yjc/9GMQehyWKTvq mcp8Nia3gMtZwen9oDClIAr3/m4B6QxbtywFu6VJfhjsYGKNz3FWp+oFgzD62L/EwQ di7jZ4AqBKyug== Subject: Re: svn commit: r343030 - in head/sys: cam conf dev/md dev/nvme fs/fuse fs/nfsclient fs/smbfs kern sys ufs/ffs vm To: Gleb Smirnoff , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org References: <201901150102.x0F12Hlt025856@repo.freebsd.org> From: Andrew Gallatin Message-ID: <9f0e56b9-387e-8374-2a63-5d7f407ee753@cs.duke.edu> Date: Tue, 15 Jan 2019 11:07:04 -0500 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:60.0) Gecko/20100101 Thunderbird/60.4.0 MIME-Version: 1.0 In-Reply-To: <201901150102.x0F12Hlt025856@repo.freebsd.org> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-Rspamd-Queue-Id: 8BDF68CB6F X-Spamd-Bar: ------ Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-6.90 / 15.00]; NEURAL_HAM_MEDIUM(-1.00)[-1.000,0]; NEURAL_HAM_SHORT(-0.90)[-0.905,0]; REPLY(-4.00)[]; NEURAL_HAM_LONG(-1.00)[-1.000,0] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 15 Jan 2019 16:07:12 -0000 On 1/14/19 8:02 PM, Gleb Smirnoff wrote: > Log: > Allocate pager bufs from UMA instead of 80-ish mutex protected linked list. <...> > Together with: gallatin Thank you so much for carrying this over the finish line! Drew From owner-svn-src-all@freebsd.org Tue Jan 15 16:12:48 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 31117148ED0A; Tue, 15 Jan 2019 16:12:48 +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 C2C068D076; Tue, 15 Jan 2019 16:12:47 +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 B2BBB1D3D2; Tue, 15 Jan 2019 16:12:47 +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 x0FGClNN043405; Tue, 15 Jan 2019 16:12:47 GMT (envelope-from kevans@FreeBSD.org) Received: (from kevans@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x0FGClh7043403; Tue, 15 Jan 2019 16:12:47 GMT (envelope-from kevans@FreeBSD.org) Message-Id: <201901151612.x0FGClh7043403@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kevans set sender to kevans@FreeBSD.org using -f From: Kyle Evans Date: Tue, 15 Jan 2019 16:12:47 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r343046 - in stable/11: etc share/man/man8 X-SVN-Group: stable-11 X-SVN-Commit-Author: kevans X-SVN-Commit-Paths: in stable/11: etc share/man/man8 X-SVN-Commit-Revision: 343046 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: C2C068D076 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.97 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_SHORT(-0.97)[-0.972,0]; NEURAL_HAM_LONG(-1.00)[-0.999,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 15 Jan 2019 16:12:48 -0000 Author: kevans Date: Tue Jan 15 16:12:47 2019 New Revision: 343046 URL: https://svnweb.freebsd.org/changeset/base/343046 Log: MFC r342792, r342805: Provide rc_service variable for rc service scripts r342792: rc.subr: Provide rc_service variable for service scripts Some rc scripts in ports (e.g. uwsgi, apache, openvpn) allow for 'application profiles' that usually require the rc script to be invoked again for each active profile. Because there's no consistent way to determine the path because it differs between manual/service(8) invocations and /etc/rc invocations, this leads to patterns like these: - www/uwsgi hardcodes the script path - security/openvpn guesses either $_file or $0 based on $0 = /etc/rc Instead of forcing rc scripts to guess, provide an rc_service variable to the scripts that gets set appropriately both for direct execution or when a script is being executed via run_rc_script (e.g. /etc/rc). This is our analog of an OpenRC variable with the same name, different case (RC_SERVICE). r342805: rc.subr: Fix typo Originally intended as 'in case in needs to be re-invoked', but it was later decided (by myself) that 're-invoke itself' makes it more clear that the script is expected to use this in a way. PR: 234614 Modified: stable/11/etc/rc.subr stable/11/share/man/man8/rc.subr.8 Directory Properties: stable/11/ (props changed) Modified: stable/11/etc/rc.subr ============================================================================== --- stable/11/etc/rc.subr Tue Jan 15 15:52:23 2019 (r343045) +++ stable/11/etc/rc.subr Tue Jan 15 16:12:47 2019 (r343046) @@ -52,6 +52,14 @@ ID="/usr/bin/id" IDCMD="if [ -x $ID ]; then $ID -un; fi" PS="/bin/ps -ww" JID=0 +# rc_service provides the path to the service script that we are executing. +# This is not being set here in an execution context, necessarily, so it's +# really just a reasonable guess, and it will get overwritten later if +# we are executing from some other means than direct execution by service(8) +# or manual invocation of the service script. The prime example of this is +# during system startup, all rc scripts will be invoked via /etc/rc, so +# run_rc_script will overwrite rc_service with the file being sourced. +rc_service="$0" # # functions @@ -863,6 +871,9 @@ check_startmsgs() # by $flags from the environment. # This variable may be changed by the precmd method. # +# rc_service Path to the service being executed, in case the service +# needs to re-invoke itself. +# # rc_pid PID of command (if appropriate) # # rc_fast Not empty if "fast" was provided (q.v.) @@ -1333,6 +1344,7 @@ run_rc_script() required_vars eval unset ${_arg}_cmd ${_arg}_precmd ${_arg}_postcmd + rc_service="$_file" case "$_file" in /etc/rc.d/*.sh) # no longer allowed in the base warn "Ignoring old-style startup script $_file" Modified: stable/11/share/man/man8/rc.subr.8 ============================================================================== --- stable/11/share/man/man8/rc.subr.8 Tue Jan 15 15:52:23 2019 (r343045) +++ stable/11/share/man/man8/rc.subr.8 Tue Jan 15 16:12:47 2019 (r343046) @@ -29,7 +29,7 @@ .\" .\" $FreeBSD$ .\" -.Dd February 4, 2016 +.Dd January 15, 2019 .Dt RC.SUBR 8 .Os .Sh NAME @@ -764,7 +764,7 @@ The following variables are available to the methods as well as after .Ic run_rc_command has completed: -.Bl -tag -width ".Va rc_flags" -offset indent +.Bl -tag -width ".Va rc_service" -offset indent .It Va rc_arg Argument provided to .Ic run_rc_command , @@ -778,6 +778,8 @@ unless overridden by the environment variable This variable may be changed by the .Ar argument Ns Va _precmd method. +.It Va rc_service +Path to the service script being executed, in case it needs to re-invoke itself. .It Va rc_pid PID of .Va command From owner-svn-src-all@freebsd.org Tue Jan 15 16:13:19 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id DA10D148ED67 for ; Tue, 15 Jan 2019 16:13:19 +0000 (UTC) (envelope-from pfg@FreeBSD.org) Received: from sonic314-19.consmr.mail.gq1.yahoo.com (sonic314-19.consmr.mail.gq1.yahoo.com [98.137.69.82]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 5F2C58D1B1 for ; Tue, 15 Jan 2019 16:13:19 +0000 (UTC) (envelope-from pfg@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1547568797; bh=SfZPHXFyGmLBit0PGzdur7uEovzt7RSExiRTT6VHRU0=; h=Subject:To:References:From:Date:In-Reply-To:From:Subject; b=iMtrqvKKKY8uCYGL7oGFF5Vm92mtLT6wK4E+U8rLo1xAntB6iMGTUBgQY4vsSp9nDB2QcU7g81MvPuFQXGOILautkLMgKfIwYsR5hwqeepvkHO8+bkt0hOleFnoazjPsNobx9C8nYzBDua/bumExpFSVNjNVVHUygtr8aX4P9MBagw4GNdOemEu48QSnxkgaJcn6XHTvqUlckPE16GKm2ZH2nm33f9Pfw8iVi4Hk0nsJrr13vVAqscxjvJnTXVdWazW3AiazAaoRIELyU3MegItP7TjXJXHma9G5umskqMClwbvY801l0NN1Q00chH1WAFqq8L8qTi/Mn2AtAGtdyQ== X-YMail-OSG: rjY2nf0VM1k0GpDhB9vXCEzhms2uaXMlkLZPBj6fHfGUHtQBfB2Qjzsh5IZKnyX bqR0k6kmdIo4PC16_vH1q3NwkshWNj3NbdOFhtPLLUYnrzDD0HcCjiJ5kU.Xcxrb_CVIamkHNmCJ 7kcEFR2ByNO45IgUz.gJLOGknfe.7AVHQP7I0R_3Q0_Zcqzohd67upZy9WrZXGkUFcniM_AyjGU9 WmYDHyYwG4HoKC.AfBHsPES5vZUobYMDT4S_FBrED__cruTLyPq_8rS_78srV3ui88xSw1BEuskd 46tWqWZbl95Y40J9eloIQYVvoFv1QLvCy4fOb03.tRpfSCItu3l4va7oCHY2q5aQXQjb5Ljt0qvh rZJci0N.M1Fsxe3cNQBQeEIwxCEby6Kxrp1Sr0oTi1UAv_CjaOl4t7xn4eKqFGk1U_NWladOtA22 XRhrikLWyfcsDOW.TW0907AibAKQq45TWl5jQhkORjUR7Rf.uoqFn9P52.xuJigevkEItCbIMon1 dqMv9gLGgXrITLeRH.TIpSDpBfM4j65m0R28DEbvl3scpDZvk6P82Wfzy9yQNipFPLHmnwcefM3J z9Tmh2_.tfjjeZh8kOIn1h4xPve8wm7y.0poYa9hk77ZrXN55KR7SK1NpD25Sjwe_ux4F1hJFvnS lVqf3TnNKMaMVP4QJ5i1eOksnJZY5oR1ebDqkMU7_Icgo6RkVDWMCcNDWA..x7xlHoU2ykn26bHc _To88eUk5MEUOnUwyemRYudJkL6eFnAC3UVHuapA0Adkgpb7aQrAJ7RJvuAWF22zK9H45dAcZLGp U9bYHHiChZG_fIIVF_LJNYuj6vPLzqCJJe6Vspk7ycAznuNYeQkgh1dpL6l2timIZO18QULxLIdr 2HGvsar6azofyfPFYW3lGla5.PujjzyX6E1f74aiuc6sfKYe5eUz37W2bFR31pbekNa2m0NAwF2P wkF_V6yvEEtTYh.FQ4Gy0tzgKpvc_y_XgX.84lMvh4P32l3euCI8mYymgNecJ5cCnD.VWqvgBrDv muEXZkGaY.W9vQ6frg302U9MADw6WyVzyPxC7Z3Y- Received: from sonic.gate.mail.ne1.yahoo.com by sonic314.consmr.mail.gq1.yahoo.com with HTTP; Tue, 15 Jan 2019 16:13:17 +0000 Received: from 181.52.72.201 (EHLO [192.168.0.5]) ([181.52.72.201]) by smtp421.mail.gq1.yahoo.com (Oath Hermes SMTP Server) with ESMTPA ID 7e659f2dd81bf65fdb5ef832c32cbbd5; Tue, 15 Jan 2019 16:13:17 +0000 (UTC) Subject: Re: svn commit: r343030 - in head/sys: cam conf dev/md dev/nvme fs/fuse fs/nfsclient fs/smbfs kern sys ufs/ffs vm To: Andrew Gallatin , Gleb Smirnoff , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org References: <201901150102.x0F12Hlt025856@repo.freebsd.org> <9f0e56b9-387e-8374-2a63-5d7f407ee753@cs.duke.edu> From: Pedro Giffuni Message-ID: Date: Tue, 15 Jan 2019 11:13:18 -0500 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:60.0) Gecko/20100101 Thunderbird/60.4.0 MIME-Version: 1.0 In-Reply-To: <9f0e56b9-387e-8374-2a63-5d7f407ee753@cs.duke.edu> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit Content-Language: en-US X-Rspamd-Queue-Id: 5F2C58D1B1 X-Spamd-Bar: ------ Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-6.99 / 15.00]; NEURAL_HAM_MEDIUM(-1.00)[-1.000,0]; NEURAL_HAM_SHORT(-0.99)[-0.987,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; REPLY(-4.00)[] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 15 Jan 2019 16:13:20 -0000 On 1/15/19 11:07 AM, Andrew Gallatin wrote: > On 1/14/19 8:02 PM, Gleb Smirnoff wrote: > >> Log: >>    Allocate pager bufs from UMA instead of 80-ish mutex protected >> linked list. > > <...> > >>    Together with:    gallatin > > Thank you so much for carrying this over the finish line! > > Drew > > It appears to be very impressive! Plans for MFC? Pedro. From owner-svn-src-all@freebsd.org Tue Jan 15 17:00:15 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id DF3911490327; Tue, 15 Jan 2019 17:00:15 +0000 (UTC) (envelope-from freebsd@pdx.rh.CN85.dnsmgr.net) Received: from pdx.rh.CN85.dnsmgr.net (br1.CN84in.dnsmgr.net [69.59.192.140]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 5E7E78EF2C; Tue, 15 Jan 2019 17:00:14 +0000 (UTC) (envelope-from freebsd@pdx.rh.CN85.dnsmgr.net) Received: from pdx.rh.CN85.dnsmgr.net (localhost [127.0.0.1]) by pdx.rh.CN85.dnsmgr.net (8.13.3/8.13.3) with ESMTP id x0FH0CIt041084; Tue, 15 Jan 2019 09:00:12 -0800 (PST) (envelope-from freebsd@pdx.rh.CN85.dnsmgr.net) Received: (from freebsd@localhost) by pdx.rh.CN85.dnsmgr.net (8.13.3/8.13.3/Submit) id x0FH0Crl041083; Tue, 15 Jan 2019 09:00:12 -0800 (PST) (envelope-from freebsd) From: "Rodney W. Grimes" Message-Id: <201901151700.x0FH0Crl041083@pdx.rh.CN85.dnsmgr.net> Subject: Re: svn commit: r343043 - head/crypto/openssh In-Reply-To: <201901151535.x0FFZE94018787@repo.freebsd.org> To: Ed Maste Date: Tue, 15 Jan 2019 09:00:12 -0800 (PST) CC: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Reply-To: rgrimes@freebsd.org X-Mailer: ELM [version 2.4ME+ PL121h (25)] MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=US-ASCII X-Rspamd-Queue-Id: 5E7E78EF2C X-Spamd-Bar: ------ Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-6.97 / 15.00]; NEURAL_HAM_MEDIUM(-1.00)[-1.000,0]; NEURAL_HAM_SHORT(-0.97)[-0.971,0]; REPLY(-4.00)[]; NEURAL_HAM_LONG(-1.00)[-1.000,0] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 15 Jan 2019 17:00:16 -0000 > Author: emaste > Date: Tue Jan 15 15:35:14 2019 > New Revision: 343043 > URL: https://svnweb.freebsd.org/changeset/base/343043 > > Log: > scp: disallow empty or current directory > > Obtained from: OpenBSD scp.c 1.198 > Security: CVE-2018-20685 > Sponsored by: The FreeBSD Foundation Can this be MFCed to 12, 11 and 10? > > Modified: > head/crypto/openssh/scp.c > > Modified: head/crypto/openssh/scp.c > ============================================================================== > --- head/crypto/openssh/scp.c Tue Jan 15 09:48:18 2019 (r343042) > +++ head/crypto/openssh/scp.c Tue Jan 15 15:35:14 2019 (r343043) > @@ -1106,7 +1106,8 @@ sink(int argc, char **argv) > SCREWUP("size out of range"); > size = (off_t)ull; > > - if ((strchr(cp, '/') != NULL) || (strcmp(cp, "..") == 0)) { > + if (*cp == '\0' || strchr(cp, '/') != NULL || > + strcmp(cp, ".") == 0 || strcmp(cp, "..") == 0) { > run_err("error: unexpected filename: %s", cp); > exit(1); > } > > -- Rod Grimes rgrimes@freebsd.org From owner-svn-src-all@freebsd.org Tue Jan 15 17:40:20 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 84FB11491555; Tue, 15 Jan 2019 17:40:20 +0000 (UTC) (envelope-from shurd@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 2C17168455; Tue, 15 Jan 2019 17:40:20 +0000 (UTC) (envelope-from shurd@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1: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 1B8751E1B2; Tue, 15 Jan 2019 17:40:20 +0000 (UTC) (envelope-from shurd@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x0FHeJKX094732; Tue, 15 Jan 2019 17:40:19 GMT (envelope-from shurd@FreeBSD.org) Received: (from shurd@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x0FHeJXc094731; Tue, 15 Jan 2019 17:40:19 GMT (envelope-from shurd@FreeBSD.org) Message-Id: <201901151740.x0FHeJXc094731@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: shurd set sender to shurd@FreeBSD.org using -f From: Stephen Hurd Date: Tue, 15 Jan 2019 17:40:19 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r343047 - head/sys/netinet X-SVN-Group: head X-SVN-Commit-Author: shurd X-SVN-Commit-Paths: head/sys/netinet X-SVN-Commit-Revision: 343047 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 2C17168455 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.98 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_LONG(-1.00)[-0.999,0]; NEURAL_HAM_SHORT(-0.98)[-0.977,0] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 15 Jan 2019 17:40:20 -0000 Author: shurd Date: Tue Jan 15 17:40:19 2019 New Revision: 343047 URL: https://svnweb.freebsd.org/changeset/base/343047 Log: Fix window update issue when scaling disabled When the TCP window scale option is not used, and the window opens up enough in one soreceive, a window update will not be sent. For example, if recwin == 65535, so->so_rcv.sb_hiwat >= 262144, and so->so_rcv.sb_hiwat <= 524272, the window update will never be sent. This is because recwin and adv are clamped to TCP_MAXWIN << tp->rcv_scale, and so will never be >= so->so_rcv.sb_hiwat / 4 or <= so->so_rcv.sb_hiwat / 8. This patch ensures a window update is sent if the window opens by TCP_MAXWIN << tp->rcv_scale, which should only happen when the window size goes from zero to the max expressible. This issue looks like it was introduced in r306769 when recwin was clamped to TCP_MAXWIN << tp->rcv_scale. MFC after: 1 week Sponsored by: Limelight Networks Differential Revision: https://reviews.freebsd.org/D18821 Modified: head/sys/netinet/tcp_output.c Modified: head/sys/netinet/tcp_output.c ============================================================================== --- head/sys/netinet/tcp_output.c Tue Jan 15 16:12:47 2019 (r343046) +++ head/sys/netinet/tcp_output.c Tue Jan 15 17:40:19 2019 (r343047) @@ -656,7 +656,8 @@ after_sack_rexmit: if (adv >= (int32_t)(2 * tp->t_maxseg) && (adv >= (int32_t)(so->so_rcv.sb_hiwat / 4) || recwin <= (so->so_rcv.sb_hiwat / 8) || - so->so_rcv.sb_hiwat <= 8 * tp->t_maxseg)) + so->so_rcv.sb_hiwat <= 8 * tp->t_maxseg || + adv >= TCP_MAXWIN << tp->rcv_scale)) goto send; if (2 * adv >= (int32_t)so->so_rcv.sb_hiwat) goto send; From owner-svn-src-all@freebsd.org Tue Jan 15 18:18:17 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id C68A9149204A; Tue, 15 Jan 2019 18:18:17 +0000 (UTC) (envelope-from glebius@freebsd.org) Received: from cell.glebi.us (glebi.us [198.45.61.253]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "cell.glebi.us", Issuer "cell.glebi.us" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 54D4B6AE2E; Tue, 15 Jan 2019 18:18:17 +0000 (UTC) (envelope-from glebius@freebsd.org) Received: from cell.glebi.us (localhost [127.0.0.1]) by cell.glebi.us (8.15.2/8.15.2) with ESMTPS id x0FIIC57048531 (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384 bits=256 verify=NO); Tue, 15 Jan 2019 10:18:12 -0800 (PST) (envelope-from glebius@freebsd.org) Received: (from glebius@localhost) by cell.glebi.us (8.15.2/8.15.2/Submit) id x0FIICFE048530; Tue, 15 Jan 2019 10:18:12 -0800 (PST) (envelope-from glebius@freebsd.org) X-Authentication-Warning: cell.glebi.us: glebius set sender to glebius@freebsd.org using -f Date: Tue, 15 Jan 2019 10:18:12 -0800 From: Gleb Smirnoff To: Pedro Giffuni Cc: Andrew Gallatin , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r343030 - in head/sys: cam conf dev/md dev/nvme fs/fuse fs/nfsclient fs/smbfs kern sys ufs/ffs vm Message-ID: <20190115181812.GY18452@FreeBSD.org> References: <201901150102.x0F12Hlt025856@repo.freebsd.org> <9f0e56b9-387e-8374-2a63-5d7f407ee753@cs.duke.edu> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: User-Agent: Mutt/1.10.1 (2018-07-13) X-Rspamd-Queue-Id: 54D4B6AE2E X-Spamd-Bar: ------ Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-6.95 / 15.00]; NEURAL_HAM_MEDIUM(-1.00)[-1.000,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; REPLY(-4.00)[]; NEURAL_HAM_SHORT(-0.95)[-0.948,0] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 15 Jan 2019 18:18:17 -0000 On Tue, Jan 15, 2019 at 11:13:18AM -0500, Pedro Giffuni wrote: P> >>    Allocate pager bufs from UMA instead of 80-ish mutex protected P> >> linked list. P> > P> >>    Together with:    gallatin P> > P> > Thank you so much for carrying this over the finish line! P> > P> It appears to be very impressive! Plans for MFC? Nope. I'm very conservative about stable branch being stable branch :) -- Gleb Smirnoff From owner-svn-src-all@freebsd.org Tue Jan 15 18:20:21 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 4E3AA1492118; Tue, 15 Jan 2019 18:20:21 +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 E45156AFC3; Tue, 15 Jan 2019 18:20:20 +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 D77301E88D; Tue, 15 Jan 2019 18:20:20 +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 x0FIKKic020114; Tue, 15 Jan 2019 18:20:20 GMT (envelope-from jhb@FreeBSD.org) Received: (from jhb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x0FIKKuS020113; Tue, 15 Jan 2019 18:20:20 GMT (envelope-from jhb@FreeBSD.org) Message-Id: <201901151820.x0FIKKuS020113@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jhb set sender to jhb@FreeBSD.org using -f From: John Baldwin Date: Tue, 15 Jan 2019 18:20:20 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r343048 - head X-SVN-Group: head X-SVN-Commit-Author: jhb X-SVN-Commit-Paths: head X-SVN-Commit-Revision: 343048 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: E45156AFC3 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.96 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_LONG(-1.00)[-0.999,0]; NEURAL_HAM_SHORT(-0.96)[-0.961,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 15 Jan 2019 18:20:21 -0000 Author: jhb Date: Tue Jan 15 18:20:20 2019 New Revision: 343048 URL: https://svnweb.freebsd.org/changeset/base/343048 Log: Update the note about the need for COMPAT_FREEBSD kernel options. Rather than mentioning the requirement for 4.x binaries but not explaining why (it was assuming an upgrade from 4.x to 5.0-current), explain when compat options are needed (for running existing host binaries) in a more general way while using a more modern example (COMPAT_FREEBSD11 for 11.x binaries). While here, explicitly mention that a GENERIC kernel should always work. Reported by: Robert Huff Reviewed by: imp MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D18740 Modified: head/UPDATING Modified: head/UPDATING ============================================================================== --- head/UPDATING Tue Jan 15 17:40:19 2019 (r343047) +++ head/UPDATING Tue Jan 15 18:20:20 2019 (r343048) @@ -1901,12 +1901,13 @@ COMMON ITEMS: can be deleted by "make delete-old-libs", but you have to make sure that no program is using those libraries anymore. - [8] In order to have a kernel that can run the 4.x binaries needed to - do an installworld, you must include the COMPAT_FREEBSD4 option in - your kernel. Failure to do so may leave you with a system that is - hard to boot to recover. A similar kernel option COMPAT_FREEBSD5 is - required to run the 5.x binaries on more recent kernels. And so on - for COMPAT_FREEBSD6 and COMPAT_FREEBSD7. + [8] The new kernel must be able to run existing binaries used by + an installworld. When upgrading across major versions, the new + kernel's configuration must include the correct COMPAT_FREEBSD + option for existing binaries (e.g. COMPAT_FREEBSD11 to run 11.x + binaries). Failure to do so may leave you with a system that is + hard to boot to recover. A GENERIC kernel will include suitable + compatibility options to run binaries from older branches. Make sure that you merge any new devices from GENERIC since the last time you updated your kernel config file. From owner-svn-src-all@freebsd.org Tue Jan 15 18:21:07 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 1642C14922DD; Tue, 15 Jan 2019 18:21:07 +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 ADA5F6B2A9; Tue, 15 Jan 2019 18:21:06 +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 A27E11E8B8; Tue, 15 Jan 2019 18:21:06 +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 x0FIL6qt023526; Tue, 15 Jan 2019 18:21:06 GMT (envelope-from kevans@FreeBSD.org) Received: (from kevans@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x0FIL6Ot023525; Tue, 15 Jan 2019 18:21:06 GMT (envelope-from kevans@FreeBSD.org) Message-Id: <201901151821.x0FIL6Ot023525@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kevans set sender to kevans@FreeBSD.org using -f From: Kyle Evans Date: Tue, 15 Jan 2019 18:21:06 +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: r343049 - stable/12/lib/libbe X-SVN-Group: stable-12 X-SVN-Commit-Author: kevans X-SVN-Commit-Paths: stable/12/lib/libbe X-SVN-Commit-Revision: 343049 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: ADA5F6B2A9 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.96 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_SHORT(-0.96)[-0.959,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_LONG(-1.00)[-0.999,0] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 15 Jan 2019 18:21:07 -0000 Author: kevans Date: Tue Jan 15 18:21:06 2019 New Revision: 343049 URL: https://svnweb.freebsd.org/changeset/base/343049 Log: MFC r342849: libbe(3): Don't allow bootfs to be destroyed Previously, the following sequence of events was feasible under some circumstance: bectl create test bectl activate test # the test BE dataset gets promoted and set as bootfs bectl destroy test I was unable to reproduce the destroy succeeding, but we should be rejecting this before it even gets to libzfs because it would leave the system in an inconsistent state. Forcing the user to be explicit as to which environment should be activated instead is much better. Modified: stable/12/lib/libbe/be.c Directory Properties: stable/12/ (props changed) Modified: stable/12/lib/libbe/be.c ============================================================================== --- stable/12/lib/libbe/be.c Tue Jan 15 18:20:20 2019 (r343048) +++ stable/12/lib/libbe/be.c Tue Jan 15 18:21:06 2019 (r343049) @@ -211,7 +211,8 @@ be_destroy(libbe_handle_t *lbh, const char *name, int if (!zfs_dataset_exists(lbh->lzh, path, ZFS_TYPE_FILESYSTEM)) return (set_error(lbh, BE_ERR_NOENT)); - if (strcmp(path, lbh->rootfs) == 0) + if (strcmp(path, lbh->rootfs) == 0 || + strcmp(path, lbh->bootfs) == 0) return (set_error(lbh, BE_ERR_DESTROYACT)); fs = zfs_open(lbh->lzh, p, ZFS_TYPE_FILESYSTEM); From owner-svn-src-all@freebsd.org Tue Jan 15 18:22:17 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 8AEBF149239C; Tue, 15 Jan 2019 18:22:17 +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 2BD746B4C4; Tue, 15 Jan 2019 18:22:17 +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 20F5A1EA32; Tue, 15 Jan 2019 18:22:17 +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 x0FIMH8N025445; Tue, 15 Jan 2019 18:22:17 GMT (envelope-from kevans@FreeBSD.org) Received: (from kevans@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x0FIMG9n025444; Tue, 15 Jan 2019 18:22:16 GMT (envelope-from kevans@FreeBSD.org) Message-Id: <201901151822.x0FIMG9n025444@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kevans set sender to kevans@FreeBSD.org using -f From: Kyle Evans Date: Tue, 15 Jan 2019 18:22:16 +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: r343050 - stable/12/usr.bin/grep X-SVN-Group: stable-12 X-SVN-Commit-Author: kevans X-SVN-Commit-Paths: stable/12/usr.bin/grep X-SVN-Commit-Revision: 343050 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 2BD746B4C4 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.96 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_SHORT(-0.96)[-0.959,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_LONG(-1.00)[-0.999,0] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 15 Jan 2019 18:22:17 -0000 Author: kevans Date: Tue Jan 15 18:22:16 2019 New Revision: 343050 URL: https://svnweb.freebsd.org/changeset/base/343050 Log: MFC r342874: Fix bsdgrep manpage clobbering grep(1) with default build The default build should install bsdgrep(1) and grep(1), with the latter being gnugrep(1). WITH_BSD_GREP flips this situation such that we have gnugrep(1) and grep(1), with the latter being bsdgrep(1). Changes to start installing the zgrep script out of usr.bin/grep inadvertently altered the default build such that grep(1) was being installed, and it was bsdgrep(1). Correct the typo. Modified: stable/12/usr.bin/grep/Makefile Directory Properties: stable/12/ (props changed) Modified: stable/12/usr.bin/grep/Makefile ============================================================================== --- stable/12/usr.bin/grep/Makefile Tue Jan 15 18:21:06 2019 (r343049) +++ stable/12/usr.bin/grep/Makefile Tue Jan 15 18:22:16 2019 (r343050) @@ -10,7 +10,7 @@ MAN1= grep.1 zgrep.1 .else PROG= bsdgrep CLEANFILES+= bsdgrep.1 -MAN1= grep.1 zgrep.1 +MAN1= bsdgrep.1 zgrep.1 bsdgrep.1: grep.1 ${CP} ${.ALLSRC} ${.TARGET} From owner-svn-src-all@freebsd.org Tue Jan 15 18:24:36 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 0AD8B149247B; Tue, 15 Jan 2019 18:24:36 +0000 (UTC) (envelope-from glebius@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 A1BD56B683; Tue, 15 Jan 2019 18:24:35 +0000 (UTC) (envelope-from glebius@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 8E5CD1EA56; Tue, 15 Jan 2019 18:24:35 +0000 (UTC) (envelope-from glebius@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x0FIOZOL025810; Tue, 15 Jan 2019 18:24:35 GMT (envelope-from glebius@FreeBSD.org) Received: (from glebius@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x0FIOYwP025806; Tue, 15 Jan 2019 18:24:34 GMT (envelope-from glebius@FreeBSD.org) Message-Id: <201901151824.x0FIOYwP025806@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: glebius set sender to glebius@FreeBSD.org using -f From: Gleb Smirnoff Date: Tue, 15 Jan 2019 18:24:34 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r343051 - in head/sys: compat/linuxkpi/common/src vm X-SVN-Group: head X-SVN-Commit-Author: glebius X-SVN-Commit-Paths: in head/sys: compat/linuxkpi/common/src vm X-SVN-Commit-Revision: 343051 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: A1BD56B683 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.96 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_SHORT(-0.96)[-0.964,0]; NEURAL_HAM_LONG(-1.00)[-0.999,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 15 Jan 2019 18:24:36 -0000 Author: glebius Date: Tue Jan 15 18:24:34 2019 New Revision: 343051 URL: https://svnweb.freebsd.org/changeset/base/343051 Log: Make uz_allocs, uz_frees and uz_fails counter(9). This removes some atomic updates and reduces amount of data protected by zone lock. During startup point these fields to EARLY_COUNTER. After startup allocate them for all early zones. Tested by: pho Modified: head/sys/compat/linuxkpi/common/src/linux_page.c head/sys/vm/uma_core.c head/sys/vm/uma_dbg.c head/sys/vm/uma_int.h Modified: head/sys/compat/linuxkpi/common/src/linux_page.c ============================================================================== --- head/sys/compat/linuxkpi/common/src/linux_page.c Tue Jan 15 18:22:16 2019 (r343050) +++ head/sys/compat/linuxkpi/common/src/linux_page.c Tue Jan 15 18:24:34 2019 (r343051) @@ -31,6 +31,7 @@ __FBSDID("$FreeBSD$"); #include #include +#include #include #include #include Modified: head/sys/vm/uma_core.c ============================================================================== --- head/sys/vm/uma_core.c Tue Jan 15 18:22:16 2019 (r343050) +++ head/sys/vm/uma_core.c Tue Jan 15 18:24:34 2019 (r343051) @@ -1715,6 +1715,15 @@ keg_ctor(void *mem, int size, void *udata, int flags) return (0); } +static void +zone_alloc_counters(uma_zone_t zone) +{ + + zone->uz_allocs = counter_u64_alloc(M_WAITOK); + zone->uz_frees = counter_u64_alloc(M_WAITOK); + zone->uz_fails = counter_u64_alloc(M_WAITOK); +} + /* * Zone header ctor. This initializes all fields, locks, etc. * @@ -1736,9 +1745,6 @@ zone_ctor(void *mem, int size, void *udata, int flags) zone->uz_slab = zone_fetch_slab; zone->uz_init = NULL; zone->uz_fini = NULL; - zone->uz_allocs = 0; - zone->uz_frees = 0; - zone->uz_fails = 0; zone->uz_sleeps = 0; zone->uz_count = 0; zone->uz_count_min = 0; @@ -1750,6 +1756,14 @@ zone_ctor(void *mem, int size, void *udata, int flags) zone->uz_bkt_max = ULONG_MAX; timevalclear(&zone->uz_ratecheck); + if (__predict_true(booted == BOOT_RUNNING)) + zone_alloc_counters(zone); + else { + zone->uz_allocs = EARLY_COUNTER; + zone->uz_frees = EARLY_COUNTER; + zone->uz_fails = EARLY_COUNTER; + } + /* * This is a pure cache zone, no kegs. */ @@ -1908,6 +1922,9 @@ zone_dtor(void *arg, int size, void *udata) rw_wunlock(&uma_rwlock); zone_free_item(kegs, keg, NULL, SKIP_NONE); } + counter_u64_free(zone->uz_allocs); + counter_u64_free(zone->uz_frees); + counter_u64_free(zone->uz_fails); if (zone->uz_lockptr == &zone->uz_lock) ZONE_LOCK_FINI(zone); } @@ -1928,12 +1945,19 @@ zone_foreach(void (*zfunc)(uma_zone_t)) uma_keg_t keg; uma_zone_t zone; - rw_rlock(&uma_rwlock); + /* + * Before BOOT_RUNNING we are guaranteed to be single + * threaded, so locking isn't needed. Startup functions + * are allowed to use M_WAITOK. + */ + if (__predict_true(booted == BOOT_RUNNING)) + rw_rlock(&uma_rwlock); LIST_FOREACH(keg, &uma_kegs, uk_link) { LIST_FOREACH(zone, &keg->uk_zones, uz_link) zfunc(zone); } - rw_runlock(&uma_rwlock); + if (__predict_true(booted == BOOT_RUNNING)) + rw_runlock(&uma_rwlock); } /* @@ -2109,6 +2133,7 @@ uma_startup3(void) uma_dbg_cnt = counter_u64_alloc(M_WAITOK); uma_skip_cnt = counter_u64_alloc(M_WAITOK); #endif + zone_foreach(zone_alloc_counters); callout_init(&uma_callout, 1); callout_reset(&uma_callout, UMA_TIMEOUT * hz, uma_timeout, NULL); booted = BOOT_RUNNING; @@ -2387,7 +2412,7 @@ zalloc_start: zone->uz_dtor != trash_dtor) && #endif zone->uz_ctor(item, zone->uz_size, udata, flags) != 0) { - atomic_add_long(&zone->uz_fails, 1); + counter_u64_add(zone->uz_fails, 1); zone_free_item(zone, item, udata, SKIP_DTOR | SKIP_CNT); return (NULL); } @@ -2845,7 +2870,7 @@ zone_alloc_bucket(uma_zone_t zone, void *udata, int do if (bucket->ub_cnt == 0) { bucket_free(zone, bucket, udata); - atomic_add_long(&zone->uz_fails, 1); + counter_u64_add(zone->uz_fails, 1); return (NULL); } @@ -2905,7 +2930,6 @@ zone_alloc_item_locked(uma_zone_t zone, void *udata, i } zone->uz_items++; - zone->uz_allocs++; ZONE_UNLOCK(zone); if (domain != UMA_ANYDOMAIN) { @@ -2947,6 +2971,7 @@ zone_alloc_item_locked(uma_zone_t zone, void *udata, i if (flags & M_ZERO) uma_zero_item(item, zone); + counter_u64_add(zone->uz_allocs, 1); CTR3(KTR_UMA, "zone_alloc_item item %p from %s(%p)", item, zone->uz_name, zone); @@ -2955,9 +2980,8 @@ zone_alloc_item_locked(uma_zone_t zone, void *udata, i fail: ZONE_LOCK(zone); zone->uz_items--; - zone->uz_allocs--; ZONE_UNLOCK(zone); - atomic_add_long(&zone->uz_fails, 1); + counter_u64_add(zone->uz_fails, 1); CTR2(KTR_UMA, "zone_alloc_item failed from %s(%p)", zone->uz_name, zone); return (NULL); @@ -3268,8 +3292,9 @@ zone_free_item(uma_zone_t zone, void *item, void *udat if (skip & SKIP_CNT) return; + counter_u64_add(zone->uz_frees, 1); + ZONE_LOCK(zone); - zone->uz_frees++; zone->uz_items--; if (zone->uz_sleepers > 0 && zone->uz_items < zone->uz_max_items) wakeup_one(zone); @@ -3358,7 +3383,8 @@ uma_zone_get_cur(uma_zone_t zone) u_int i; ZONE_LOCK(zone); - nitems = zone->uz_allocs - zone->uz_frees; + nitems = counter_u64_fetch(zone->uz_allocs) - + counter_u64_fetch(zone->uz_frees); CPU_FOREACH(i) { /* * See the comment in sysctl_vm_zone_stats() regarding the @@ -3801,8 +3827,8 @@ uma_zone_sumstat(uma_zone_t z, long *cachefreep, uint6 allocs += cache->uc_allocs; frees += cache->uc_frees; } - allocs += z->uz_allocs; - frees += z->uz_frees; + allocs += counter_u64_fetch(z->uz_allocs); + frees += counter_u64_fetch(z->uz_frees); sleeps += z->uz_sleeps; if (cachefreep != NULL) *cachefreep = cachefree; @@ -3895,9 +3921,9 @@ sysctl_vm_zone_stats(SYSCTL_HANDLER_ARGS) zdom = &z->uz_domain[i]; uth.uth_zone_free += zdom->uzd_nitems; } - uth.uth_allocs = z->uz_allocs; - uth.uth_frees = z->uz_frees; - uth.uth_fails = z->uz_fails; + uth.uth_allocs = counter_u64_fetch(z->uz_allocs); + uth.uth_frees = counter_u64_fetch(z->uz_frees); + uth.uth_fails = counter_u64_fetch(z->uz_fails); uth.uth_sleeps = z->uz_sleeps; /* * While it is not normally safe to access the cache @@ -4105,8 +4131,8 @@ DB_SHOW_COMMAND(uma, db_show_uma) LIST_FOREACH(kz, &uma_kegs, uk_link) { LIST_FOREACH(z, &kz->uk_zones, uz_link) { if (kz->uk_flags & UMA_ZFLAG_INTERNAL) { - allocs = z->uz_allocs; - frees = z->uz_frees; + allocs = counter_u64_fetch(z->uz_allocs); + frees = counter_u64_fetch(z->uz_frees); sleeps = z->uz_sleeps; cachefree = 0; } else Modified: head/sys/vm/uma_dbg.c ============================================================================== --- head/sys/vm/uma_dbg.c Tue Jan 15 18:22:16 2019 (r343050) +++ head/sys/vm/uma_dbg.c Tue Jan 15 18:24:34 2019 (r343051) @@ -40,6 +40,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include #include Modified: head/sys/vm/uma_int.h ============================================================================== --- head/sys/vm/uma_int.h Tue Jan 15 18:22:16 2019 (r343050) +++ head/sys/vm/uma_int.h Tue Jan 15 18:24:34 2019 (r343051) @@ -364,10 +364,10 @@ struct uma_zone { uint16_t uz_count_min; /* Minimal amount of items in bucket */ /* Offset 256, stats. */ - uint64_t uz_allocs UMA_ALIGN; /* Total number of allocations */ + counter_u64_t uz_allocs; /* Total number of allocations */ + counter_u64_t uz_frees; /* Total number of frees */ + counter_u64_t uz_fails; /* Total number of alloc failures */ uint64_t uz_sleeps; /* Total number of alloc sleeps */ - uint64_t uz_frees; /* Total number of frees */ - volatile u_long uz_fails; /* Total number of alloc failures */ /* * This HAS to be the last item because we adjust the zone size From owner-svn-src-all@freebsd.org Tue Jan 15 18:32:27 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 535D41492885; Tue, 15 Jan 2019 18:32:27 +0000 (UTC) (envelope-from glebius@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 EA61D6BE88; Tue, 15 Jan 2019 18:32:26 +0000 (UTC) (envelope-from glebius@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id DEA631EC0A; Tue, 15 Jan 2019 18:32:26 +0000 (UTC) (envelope-from glebius@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x0FIWQhI031089; Tue, 15 Jan 2019 18:32:26 GMT (envelope-from glebius@FreeBSD.org) Received: (from glebius@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x0FIWQrj031088; Tue, 15 Jan 2019 18:32:26 GMT (envelope-from glebius@FreeBSD.org) Message-Id: <201901151832.x0FIWQrj031088@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: glebius set sender to glebius@FreeBSD.org using -f From: Gleb Smirnoff Date: Tue, 15 Jan 2019 18:32:26 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r343052 - head/sys/vm X-SVN-Group: head X-SVN-Commit-Author: glebius X-SVN-Commit-Paths: head/sys/vm X-SVN-Commit-Revision: 343052 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: EA61D6BE88 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.96 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_LONG(-1.00)[-0.999,0]; NEURAL_HAM_SHORT(-0.96)[-0.964,0] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 15 Jan 2019 18:32:27 -0000 Author: glebius Date: Tue Jan 15 18:32:26 2019 New Revision: 343052 URL: https://svnweb.freebsd.org/changeset/base/343052 Log: Only do uz_items accounting for zones that have a limit set in uz_max_items. This reduces amount of locking required for these zones. Also, for cache only zones (UMA_ZFLAG_CACHE) accounting uz_items wasn't correct at all, since they may allocate items directly from their backing store and then free them via UMA underflowing uz_items. Tested by: pho Modified: head/sys/vm/uma_core.c Modified: head/sys/vm/uma_core.c ============================================================================== --- head/sys/vm/uma_core.c Tue Jan 15 18:24:34 2019 (r343051) +++ head/sys/vm/uma_core.c Tue Jan 15 18:32:26 2019 (r343052) @@ -736,11 +736,13 @@ bucket_drain(uma_zone_t zone, uma_bucket_t bucket) for (i = 0; i < bucket->ub_cnt; i++) zone->uz_fini(bucket->ub_bucket[i], zone->uz_size); zone->uz_release(zone->uz_arg, bucket->ub_bucket, bucket->ub_cnt); - ZONE_LOCK(zone); - zone->uz_items -= bucket->ub_cnt; - if (zone->uz_sleepers && zone->uz_items < zone->uz_max_items) - wakeup_one(zone); - ZONE_UNLOCK(zone); + if (zone->uz_max_items > 0) { + ZONE_LOCK(zone); + zone->uz_items -= bucket->ub_cnt; + if (zone->uz_sleepers && zone->uz_items < zone->uz_max_items) + wakeup_one(zone); + ZONE_UNLOCK(zone); + } bucket->ub_cnt = 0; } @@ -2515,9 +2517,9 @@ zalloc_start: goto zalloc_item; maxbucket = MIN(zone->uz_count, zone->uz_max_items - zone->uz_items); + zone->uz_items += maxbucket; } else maxbucket = zone->uz_count; - zone->uz_items += maxbucket; ZONE_UNLOCK(zone); /* @@ -2530,9 +2532,8 @@ zalloc_start: zone->uz_name, zone, bucket); ZONE_LOCK(zone); if (bucket != NULL) { - if (bucket->ub_cnt < maxbucket) { - MPASS(zone->uz_flags & UMA_ZFLAG_CACHE || - zone->uz_items >= maxbucket - bucket->ub_cnt); + if (zone->uz_max_items > 0 && bucket->ub_cnt < maxbucket) { + MPASS(zone->uz_items >= maxbucket - bucket->ub_cnt); zone->uz_items -= maxbucket - bucket->ub_cnt; if (zone->uz_sleepers > 0 && zone->uz_items < zone->uz_max_items) @@ -2562,7 +2563,7 @@ zalloc_start: zone_put_bucket(zone, zdom, bucket, false); ZONE_UNLOCK(zone); goto zalloc_start; - } else { + } else if (zone->uz_max_items > 0) { zone->uz_items -= maxbucket; if (zone->uz_sleepers > 0 && zone->uz_items + 1 < zone->uz_max_items) @@ -2912,24 +2913,25 @@ zone_alloc_item_locked(uma_zone_t zone, void *udata, i ZONE_LOCK_ASSERT(zone); - if (zone->uz_max_items > 0 && zone->uz_items >= zone->uz_max_items) { - zone_log_warning(zone); - zone_maxaction(zone); - if (flags & M_NOWAIT) { - ZONE_UNLOCK(zone); - return (NULL); + if (zone->uz_max_items > 0) { + if (zone->uz_items >= zone->uz_max_items) { + zone_log_warning(zone); + zone_maxaction(zone); + if (flags & M_NOWAIT) { + ZONE_UNLOCK(zone); + return (NULL); + } + zone->uz_sleeps++; + zone->uz_sleepers++; + while (zone->uz_items >= zone->uz_max_items) + mtx_sleep(zone, zone->uz_lockptr, PVM, "zonelimit", 0); + zone->uz_sleepers--; + if (zone->uz_sleepers > 0 && + zone->uz_items + 1 < zone->uz_max_items) + wakeup_one(zone); } - zone->uz_sleeps++; - zone->uz_sleepers++; - while (zone->uz_items >= zone->uz_max_items) - mtx_sleep(zone, zone->uz_lockptr, PVM, "zonelimit", 0); - zone->uz_sleepers--; - if (zone->uz_sleepers > 0 && - zone->uz_items + 1 < zone->uz_max_items) - wakeup_one(zone); + zone->uz_items++; } - - zone->uz_items++; ZONE_UNLOCK(zone); if (domain != UMA_ANYDOMAIN) { @@ -2978,9 +2980,11 @@ zone_alloc_item_locked(uma_zone_t zone, void *udata, i return (item); fail: - ZONE_LOCK(zone); - zone->uz_items--; - ZONE_UNLOCK(zone); + if (zone->uz_max_items > 0) { + ZONE_LOCK(zone); + zone->uz_items--; + ZONE_UNLOCK(zone); + } counter_u64_add(zone->uz_fails, 1); CTR2(KTR_UMA, "zone_alloc_item failed from %s(%p)", zone->uz_name, zone); @@ -3294,11 +3298,14 @@ zone_free_item(uma_zone_t zone, void *item, void *udat counter_u64_add(zone->uz_frees, 1); - ZONE_LOCK(zone); - zone->uz_items--; - if (zone->uz_sleepers > 0 && zone->uz_items < zone->uz_max_items) - wakeup_one(zone); - ZONE_UNLOCK(zone); + if (zone->uz_max_items > 0) { + ZONE_LOCK(zone); + zone->uz_items--; + if (zone->uz_sleepers > 0 && + zone->uz_items < zone->uz_max_items) + wakeup_one(zone); + ZONE_UNLOCK(zone); + } } /* See uma.h */ @@ -3902,8 +3909,11 @@ sysctl_vm_zone_stats(SYSCTL_HANDLER_ARGS) uth.uth_align = kz->uk_align; uth.uth_size = kz->uk_size; uth.uth_rsize = kz->uk_rsize; - uth.uth_pages += (z->uz_items / kz->uk_ipers) * - kz->uk_ppera; + if (z->uz_max_items > 0) + uth.uth_pages = (z->uz_items / kz->uk_ipers) * + kz->uk_ppera; + else + uth.uth_pages = kz->uk_pages; uth.uth_maxpages += (z->uz_max_items / kz->uk_ipers) * kz->uk_ppera; uth.uth_limit = z->uz_max_items; From owner-svn-src-all@freebsd.org Tue Jan 15 18:47:20 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 17BD41492F49; Tue, 15 Jan 2019 18:47:20 +0000 (UTC) (envelope-from glebius@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 B14C96C5ED; Tue, 15 Jan 2019 18:47:19 +0000 (UTC) (envelope-from glebius@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id A47F21EDCD; Tue, 15 Jan 2019 18:47:19 +0000 (UTC) (envelope-from glebius@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x0FIlJin038824; Tue, 15 Jan 2019 18:47:19 GMT (envelope-from glebius@FreeBSD.org) Received: (from glebius@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x0FIlJRe038823; Tue, 15 Jan 2019 18:47:19 GMT (envelope-from glebius@FreeBSD.org) Message-Id: <201901151847.x0FIlJRe038823@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: glebius set sender to glebius@FreeBSD.org using -f From: Gleb Smirnoff Date: Tue, 15 Jan 2019 18:47:19 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r343053 - head/lib/libmemstat X-SVN-Group: head X-SVN-Commit-Author: glebius X-SVN-Commit-Paths: head/lib/libmemstat X-SVN-Commit-Revision: 343053 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: B14C96C5ED X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.98 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_LONG(-1.00)[-0.999,0]; NEURAL_HAM_SHORT(-0.98)[-0.979,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 15 Jan 2019 18:47:20 -0000 Author: glebius Date: Tue Jan 15 18:47:19 2019 New Revision: 343053 URL: https://svnweb.freebsd.org/changeset/base/343053 Log: This was missed in r343051: make uz_allocs, uz_frees and uz_fails counter(9). Modified: head/lib/libmemstat/memstat_uma.c Modified: head/lib/libmemstat/memstat_uma.c ============================================================================== --- head/lib/libmemstat/memstat_uma.c Tue Jan 15 18:32:26 2019 (r343052) +++ head/lib/libmemstat/memstat_uma.c Tue Jan 15 18:47:19 2019 (r343053) @@ -29,6 +29,7 @@ */ #include +#include #include #include @@ -406,9 +407,12 @@ memstat_kvm_uma(struct memory_type_list *list, void *k * Reset the statistics on a current node. */ _memstat_mt_reset_stats(mtp, mp_maxid + 1); - mtp->mt_numallocs = uz.uz_allocs; - mtp->mt_numfrees = uz.uz_frees; - mtp->mt_failures = uz.uz_fails; + mtp->mt_numallocs = kvm_counter_u64_fetch(kvm, + (unsigned long )uz.uz_allocs); + mtp->mt_numfrees = kvm_counter_u64_fetch(kvm, + (unsigned long )uz.uz_frees); + mtp->mt_failures = kvm_counter_u64_fetch(kvm, + (unsigned long )uz.uz_fails); mtp->mt_sleeps = uz.uz_sleeps; if (kz.uk_flags & UMA_ZFLAG_INTERNAL) goto skip_percpu; From owner-svn-src-all@freebsd.org Tue Jan 15 18:49:32 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id EAC9B1492FE8; Tue, 15 Jan 2019 18:49:31 +0000 (UTC) (envelope-from glebius@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 91E276C79D; Tue, 15 Jan 2019 18:49:31 +0000 (UTC) (envelope-from glebius@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 85EEC1EDD1; Tue, 15 Jan 2019 18:49:31 +0000 (UTC) (envelope-from glebius@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x0FInVVV039171; Tue, 15 Jan 2019 18:49:31 GMT (envelope-from glebius@FreeBSD.org) Received: (from glebius@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x0FInV3R039170; Tue, 15 Jan 2019 18:49:31 GMT (envelope-from glebius@FreeBSD.org) Message-Id: <201901151849.x0FInV3R039170@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: glebius set sender to glebius@FreeBSD.org using -f From: Gleb Smirnoff Date: Tue, 15 Jan 2019 18:49:31 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r343054 - head/sys/vm X-SVN-Group: head X-SVN-Commit-Author: glebius X-SVN-Commit-Paths: head/sys/vm X-SVN-Commit-Revision: 343054 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 91E276C79D X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.98 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_LONG(-1.00)[-0.999,0]; NEURAL_HAM_SHORT(-0.98)[-0.979,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 15 Jan 2019 18:49:32 -0000 Author: glebius Date: Tue Jan 15 18:49:31 2019 New Revision: 343054 URL: https://svnweb.freebsd.org/changeset/base/343054 Log: Remove harmless leftover from code that cycles over zone's kegs. Just use + instead of +=. There is no functional change. Modified: head/sys/vm/uma_core.c Modified: head/sys/vm/uma_core.c ============================================================================== --- head/sys/vm/uma_core.c Tue Jan 15 18:47:19 2019 (r343053) +++ head/sys/vm/uma_core.c Tue Jan 15 18:49:31 2019 (r343054) @@ -3914,10 +3914,10 @@ sysctl_vm_zone_stats(SYSCTL_HANDLER_ARGS) kz->uk_ppera; else uth.uth_pages = kz->uk_pages; - uth.uth_maxpages += (z->uz_max_items / kz->uk_ipers) * + uth.uth_maxpages = (z->uz_max_items / kz->uk_ipers) * kz->uk_ppera; uth.uth_limit = z->uz_max_items; - uth.uth_keg_free += z->uz_keg->uk_free; + uth.uth_keg_free = z->uz_keg->uk_free; /* * A zone is secondary is it is not the first entry From owner-svn-src-all@freebsd.org Tue Jan 15 18:50:12 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 15D8B1493061; Tue, 15 Jan 2019 18:50:12 +0000 (UTC) (envelope-from glebius@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 A90956C904; Tue, 15 Jan 2019 18:50:11 +0000 (UTC) (envelope-from glebius@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 8C0301EDD8; Tue, 15 Jan 2019 18:50:11 +0000 (UTC) (envelope-from glebius@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x0FIoB9I039341; Tue, 15 Jan 2019 18:50:11 GMT (envelope-from glebius@FreeBSD.org) Received: (from glebius@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x0FIoBMd039340; Tue, 15 Jan 2019 18:50:11 GMT (envelope-from glebius@FreeBSD.org) Message-Id: <201901151850.x0FIoBMd039340@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: glebius set sender to glebius@FreeBSD.org using -f From: Gleb Smirnoff Date: Tue, 15 Jan 2019 18:50:11 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r343055 - head/sys/vm X-SVN-Group: head X-SVN-Commit-Author: glebius X-SVN-Commit-Paths: head/sys/vm X-SVN-Commit-Revision: 343055 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: A90956C904 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.98 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_SHORT(-0.98)[-0.979,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_LONG(-1.00)[-0.999,0] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 15 Jan 2019 18:50:12 -0000 Author: glebius Date: Tue Jan 15 18:50:11 2019 New Revision: 343055 URL: https://svnweb.freebsd.org/changeset/base/343055 Log: style(9): break long line. Modified: head/sys/vm/uma_core.c Modified: head/sys/vm/uma_core.c ============================================================================== --- head/sys/vm/uma_core.c Tue Jan 15 18:49:31 2019 (r343054) +++ head/sys/vm/uma_core.c Tue Jan 15 18:50:11 2019 (r343055) @@ -2924,7 +2924,8 @@ zone_alloc_item_locked(uma_zone_t zone, void *udata, i zone->uz_sleeps++; zone->uz_sleepers++; while (zone->uz_items >= zone->uz_max_items) - mtx_sleep(zone, zone->uz_lockptr, PVM, "zonelimit", 0); + mtx_sleep(zone, zone->uz_lockptr, PVM, + "zonelimit", 0); zone->uz_sleepers--; if (zone->uz_sleepers > 0 && zone->uz_items + 1 < zone->uz_max_items) From owner-svn-src-all@freebsd.org Tue Jan 15 18:53:46 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 44A5414932A3; Tue, 15 Jan 2019 18:53:46 +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 D95406CD2D; Tue, 15 Jan 2019 18:53:45 +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 CE5A21EF78; Tue, 15 Jan 2019 18:53:45 +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 x0FIrjaX044349; Tue, 15 Jan 2019 18:53:45 GMT (envelope-from jhb@FreeBSD.org) Received: (from jhb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x0FIrjWS044348; Tue, 15 Jan 2019 18:53:45 GMT (envelope-from jhb@FreeBSD.org) Message-Id: <201901151853.x0FIrjWS044348@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jhb set sender to jhb@FreeBSD.org using -f From: John Baldwin Date: Tue, 15 Jan 2019 18:53:45 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r343056 - head/sys/dev/cxgbe/crypto X-SVN-Group: head X-SVN-Commit-Author: jhb X-SVN-Commit-Paths: head/sys/dev/cxgbe/crypto X-SVN-Commit-Revision: 343056 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: D95406CD2D X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.98 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_SHORT(-0.98)[-0.979,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_LONG(-1.00)[-0.999,0] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 15 Jan 2019 18:53:46 -0000 Author: jhb Date: Tue Jan 15 18:53:45 2019 New Revision: 343056 URL: https://svnweb.freebsd.org/changeset/base/343056 Log: Reject new sessions if the necessary queues aren't initialized. ccr reuses the control queue and first rx queue from the first port on each adapter. The driver cannot send requests until those queues are initialized. Refuse to create sessions for now if the queues aren't ready. This is a workaround until cxgbe allocates one or more dedicated queues for ccr. PR: 233851 MFC after: 1 week Sponsored by: Chelsio Communications Differential Revision: https://reviews.freebsd.org/D18478 Modified: head/sys/dev/cxgbe/crypto/t4_crypto.c Modified: head/sys/dev/cxgbe/crypto/t4_crypto.c ============================================================================== --- head/sys/dev/cxgbe/crypto/t4_crypto.c Tue Jan 15 18:50:11 2019 (r343055) +++ head/sys/dev/cxgbe/crypto/t4_crypto.c Tue Jan 15 18:53:45 2019 (r343056) @@ -1652,12 +1652,6 @@ ccr_attach(device_t dev) struct ccr_softc *sc; int32_t cid; - /* - * TODO: Crypto requests will panic if the parent device isn't - * initialized so that the queues are up and running. Need to - * figure out how to handle that correctly, maybe just reject - * requests if the adapter isn't fully initialized? - */ sc = device_get_softc(dev); sc->dev = dev; sc->adapter = device_get_softc(device_get_parent(dev)); @@ -2058,6 +2052,16 @@ ccr_newsession(device_t dev, crypto_session_t cses, st } sc = device_get_softc(dev); + + /* + * XXX: Don't create a session if the queues aren't + * initialized. This is racy as the rxq can be destroyed by + * the associated VI detaching. Eventually ccr should use + * dedicated queues. + */ + if (sc->rxq->iq.adapter == NULL || sc->txq->adapter == NULL) + return (ENXIO); + mtx_lock(&sc->lock); if (sc->detaching) { mtx_unlock(&sc->lock); From owner-svn-src-all@freebsd.org Tue Jan 15 19:01:05 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 62EE51493617; Tue, 15 Jan 2019 19:01:05 +0000 (UTC) (envelope-from rgrimes@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 07CCA6D13B; Tue, 15 Jan 2019 19:01:05 +0000 (UTC) (envelope-from rgrimes@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1: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 F020C1F0C2; Tue, 15 Jan 2019 19:01:04 +0000 (UTC) (envelope-from rgrimes@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x0FJ14cf046597; Tue, 15 Jan 2019 19:01:04 GMT (envelope-from rgrimes@FreeBSD.org) Received: (from rgrimes@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x0FJ14w2046596; Tue, 15 Jan 2019 19:01:04 GMT (envelope-from rgrimes@FreeBSD.org) Message-Id: <201901151901.x0FJ14w2046596@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: rgrimes set sender to rgrimes@FreeBSD.org using -f From: "Rodney W. Grimes" Date: Tue, 15 Jan 2019 19:01:04 +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: r343057 - stable/12/usr.sbin/bhyve X-SVN-Group: stable-12 X-SVN-Commit-Author: rgrimes X-SVN-Commit-Paths: stable/12/usr.sbin/bhyve X-SVN-Commit-Revision: 343057 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 07CCA6D13B X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.98 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_SHORT(-0.98)[-0.978,0]; NEURAL_HAM_LONG(-1.00)[-0.999,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 15 Jan 2019 19:01:05 -0000 Author: rgrimes Date: Tue Jan 15 19:01:04 2019 New Revision: 343057 URL: https://svnweb.freebsd.org/changeset/base/343057 Log: MFC: r342944 Fix spelling of identifier Approved by: phk (mfc blanket) Modified: stable/12/usr.sbin/bhyve/bhyve.8 Directory Properties: stable/12/ (props changed) Modified: stable/12/usr.sbin/bhyve/bhyve.8 ============================================================================== --- stable/12/usr.sbin/bhyve/bhyve.8 Tue Jan 15 18:53:45 2019 (r343056) +++ stable/12/usr.sbin/bhyve/bhyve.8 Tue Jan 15 19:01:04 2019 (r343057) @@ -386,7 +386,7 @@ address and a VNC should listen on. The default is to listen on localhost IPv4 address and default VNC port 5900. An IPv6 address must be enclosed in square brackets and may contain an -optional zone identifer. +optional zone identifier. .It Ar width No and Ar height A display resolution, width and height, respectively. If not specified, a default resolution of 1024x768 pixels will be used. From owner-svn-src-all@freebsd.org Tue Jan 15 19:33:48 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 72F961493F6F; Tue, 15 Jan 2019 19:33:48 +0000 (UTC) (envelope-from glebius@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 122086E123; Tue, 15 Jan 2019 19:33:48 +0000 (UTC) (envelope-from glebius@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 000071F64F; Tue, 15 Jan 2019 19:33:47 +0000 (UTC) (envelope-from glebius@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x0FJXla2069320; Tue, 15 Jan 2019 19:33:47 GMT (envelope-from glebius@FreeBSD.org) Received: (from glebius@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x0FJXl8a069317; Tue, 15 Jan 2019 19:33:47 GMT (envelope-from glebius@FreeBSD.org) Message-Id: <201901151933.x0FJXl8a069317@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: glebius set sender to glebius@FreeBSD.org using -f From: Gleb Smirnoff Date: Tue, 15 Jan 2019 19:33:47 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r343058 - in head/sys: compat/linuxkpi/common/src vm X-SVN-Group: head X-SVN-Commit-Author: glebius X-SVN-Commit-Paths: in head/sys: compat/linuxkpi/common/src vm X-SVN-Commit-Revision: 343058 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 122086E123 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.98 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_SHORT(-0.98)[-0.979,0]; NEURAL_HAM_LONG(-1.00)[-0.999,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 15 Jan 2019 19:33:48 -0000 Author: glebius Date: Tue Jan 15 19:33:47 2019 New Revision: 343058 URL: https://svnweb.freebsd.org/changeset/base/343058 Log: Fix compilation failures on different arches that have vm_machdep.c not aware of counter_u64_t by including counter.h into uma_int.h. I'm not happy about this inclusion, but it fixes compilation ASAP. Modified: head/sys/compat/linuxkpi/common/src/linux_page.c head/sys/vm/uma_dbg.c head/sys/vm/uma_int.h Modified: head/sys/compat/linuxkpi/common/src/linux_page.c ============================================================================== --- head/sys/compat/linuxkpi/common/src/linux_page.c Tue Jan 15 19:01:04 2019 (r343057) +++ head/sys/compat/linuxkpi/common/src/linux_page.c Tue Jan 15 19:33:47 2019 (r343058) @@ -31,7 +31,6 @@ __FBSDID("$FreeBSD$"); #include #include -#include #include #include #include Modified: head/sys/vm/uma_dbg.c ============================================================================== --- head/sys/vm/uma_dbg.c Tue Jan 15 19:01:04 2019 (r343057) +++ head/sys/vm/uma_dbg.c Tue Jan 15 19:33:47 2019 (r343058) @@ -40,7 +40,6 @@ __FBSDID("$FreeBSD$"); #include #include #include -#include #include #include #include Modified: head/sys/vm/uma_int.h ============================================================================== --- head/sys/vm/uma_int.h Tue Jan 15 19:01:04 2019 (r343057) +++ head/sys/vm/uma_int.h Tue Jan 15 19:33:47 2019 (r343058) @@ -30,6 +30,7 @@ * */ +#include #include #include #include From owner-svn-src-all@freebsd.org Tue Jan 15 19:46:30 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id F067F14942B8; Tue, 15 Jan 2019 19:46:29 +0000 (UTC) (envelope-from chmeeedalf@gmail.com) Received: from mail-it1-x12c.google.com (mail-it1-x12c.google.com [IPv6:2607:f8b0:4864:20::12c]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 90B4D6E6B7; Tue, 15 Jan 2019 19:46:29 +0000 (UTC) (envelope-from chmeeedalf@gmail.com) Received: by mail-it1-x12c.google.com with SMTP id i145so7017947ita.4; Tue, 15 Jan 2019 11:46:29 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=date:from:to:cc:subject:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=AicBN51rp1HAvKqSXJM1Z/x/x8EvzD7e6iTB58Xxs2A=; b=jAacVt8E5i4Ll66ygMCw8cZBpavvhFulHRX3zNVQYv7Y2bObNc4MW2Z8CBMwfutccw cAQJyQO8OMuoWctc1utQ+PisQdkCgqUSpZdqBSpAkLaJEZqAMg4seunM4QyQhH7bCIhH 5uqfv+Zd5536TtG5sv/Fv96f+IwVK7P+xG+meJ9t+QkBCpeOL4DFsa37qCFMtfowiui9 eQoseank6tY8D3lu6ltSmn7MKs/47BpxWFd4gXMpaulNfhlzkIB2WJQN/aseiv/B1YL+ klM8mI8oq/wSuWLXktcCsSoKgmwoDh7OQ7zzH6T+kgUx316rss521kmxCPNbaiKBxsLv Zilg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=AicBN51rp1HAvKqSXJM1Z/x/x8EvzD7e6iTB58Xxs2A=; b=JTPBkc70Blq81m2w8GiJ+xdyD9Wt3XZ73OVx5AEY3zalz8wSnmZV36AR3b89QWqb5Y EJSIgLurrCCD31UE7lo88WcrH82dmTzFqxMhi08M2NMMXsuFwi6UbxYysXoAZQaEzndm Zb7FxMl9yRQUwVAAoOer3hGhMHnjNh7I/ojVEMChyoYbIa6GCNwI78fmXu4GvZ6qfS0l aQkwSad7sgdWntSyybopinxXr553TxC0wJzolsO4UADsU+ZcXL+8o60oAzsrMbneXfWX pZfNHNIU/uMpmq7k8yApbGXsw5l5V7t36FVun0n6XBMY1VJkYrdqsqv8X/zGEzZQSXX0 yn6A== X-Gm-Message-State: AJcUukd6QWg5YprNrbrwINEkbqC+aVRsPkbrJkJnPQd92XBQhB1TIpl7 53vdxUKKu/r1eW8hMgH2+Om9cxbvK/0= X-Google-Smtp-Source: ALg8bN763VYBpDdSFNGmpiBK9VwqoWGzFV9ZUuz687WisIdtOeZJKaKVSUG/Nk9SYcNwIiS8Q+r2aA== X-Received: by 2002:a24:248:: with SMTP id 69mr3504116itu.91.1547581588400; Tue, 15 Jan 2019 11:46:28 -0800 (PST) Received: from titan.knownspace (173-25-245-129.client.mchsi.com. [173.25.245.129]) by smtp.gmail.com with ESMTPSA id y76sm2090652ita.18.2019.01.15.11.46.27 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Tue, 15 Jan 2019 11:46:27 -0800 (PST) Date: Tue, 15 Jan 2019 13:46:23 -0600 From: Justin Hibbits To: Gleb Smirnoff Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r343058 - in head/sys: compat/linuxkpi/common/src vm Message-ID: <20190115134623.139064b2@titan.knownspace> In-Reply-To: <201901151933.x0FJXl8a069317@repo.freebsd.org> References: <201901151933.x0FJXl8a069317@repo.freebsd.org> X-Mailer: Claws Mail 3.17.3 (GTK+ 2.24.32; powerpc64-portbld-freebsd13.0) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Rspamd-Queue-Id: 90B4D6E6B7 X-Spamd-Bar: ------ Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-6.98 / 15.00]; NEURAL_HAM_MEDIUM(-1.00)[-1.000,0]; NEURAL_HAM_SHORT(-0.98)[-0.980,0]; REPLY(-4.00)[]; NEURAL_HAM_LONG(-1.00)[-1.000,0] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 15 Jan 2019 19:46:30 -0000 On Tue, 15 Jan 2019 19:33:47 +0000 (UTC) Gleb Smirnoff wrote: > Author: glebius > Date: Tue Jan 15 19:33:47 2019 > New Revision: 343058 > URL: https://svnweb.freebsd.org/changeset/base/343058 > > Log: > Fix compilation failures on different arches that have vm_machdep.c > not aware of counter_u64_t by including counter.h into uma_int.h. I'm > not happy about this inclusion, but it fixes compilation ASAP. > > Modified: > head/sys/compat/linuxkpi/common/src/linux_page.c > head/sys/vm/uma_dbg.c > head/sys/vm/uma_int.h > > Modified: head/sys/compat/linuxkpi/common/src/linux_page.c > ============================================================================== > --- head/sys/compat/linuxkpi/common/src/linux_page.c Tue Jan > 15 19:01:04 2019 (r343057) +++ > head/sys/compat/linuxkpi/common/src/linux_page.c Tue Jan 15 > 19:33:47 2019 (r343058) @@ -31,7 +31,6 @@ > __FBSDID("$FreeBSD$"); #include > #include > -#include > #include > #include > #include > > Modified: head/sys/vm/uma_dbg.c > ============================================================================== > --- head/sys/vm/uma_dbg.c Tue Jan 15 19:01:04 2019 > (r343057) +++ head/sys/vm/uma_dbg.c Tue Jan 15 19:33:47 > 2019 (r343058) @@ -40,7 +40,6 @@ __FBSDID("$FreeBSD$"); > #include > #include > #include > -#include > #include > #include > #include > > Modified: head/sys/vm/uma_int.h > ============================================================================== > --- head/sys/vm/uma_int.h Tue Jan 15 19:01:04 2019 > (r343057) +++ head/sys/vm/uma_int.h Tue Jan 15 19:33:47 > 2019 (r343058) @@ -30,6 +30,7 @@ > * > */ > > +#include > #include > #include > #include > Why not #include counter.h in the relevant vm_machdep.c files instead? - Justin From owner-svn-src-all@freebsd.org Tue Jan 15 20:06:20 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id AB2E61494B59; Tue, 15 Jan 2019 20:06:20 +0000 (UTC) (envelope-from glebius@freebsd.org) Received: from cell.glebi.us (glebi.us [198.45.61.253]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "cell.glebi.us", Issuer "cell.glebi.us" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 23D3E6F1EE; Tue, 15 Jan 2019 20:06:19 +0000 (UTC) (envelope-from glebius@freebsd.org) Received: from cell.glebi.us (localhost [127.0.0.1]) by cell.glebi.us (8.15.2/8.15.2) with ESMTPS id x0FK6H0M049313 (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384 bits=256 verify=NO); Tue, 15 Jan 2019 12:06:17 -0800 (PST) (envelope-from glebius@freebsd.org) Received: (from glebius@localhost) by cell.glebi.us (8.15.2/8.15.2/Submit) id x0FK6HoE049312; Tue, 15 Jan 2019 12:06:17 -0800 (PST) (envelope-from glebius@freebsd.org) X-Authentication-Warning: cell.glebi.us: glebius set sender to glebius@freebsd.org using -f Date: Tue, 15 Jan 2019 12:06:17 -0800 From: Gleb Smirnoff To: Justin Hibbits Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r343058 - in head/sys: compat/linuxkpi/common/src vm Message-ID: <20190115200617.GZ18452@FreeBSD.org> References: <201901151933.x0FJXl8a069317@repo.freebsd.org> <20190115134623.139064b2@titan.knownspace> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20190115134623.139064b2@titan.knownspace> User-Agent: Mutt/1.10.1 (2018-07-13) X-Rspamd-Queue-Id: 23D3E6F1EE X-Spamd-Bar: ------ Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-6.97 / 15.00]; NEURAL_HAM_MEDIUM(-1.00)[-1.000,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; REPLY(-4.00)[]; NEURAL_HAM_SHORT(-0.97)[-0.967,0] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 15 Jan 2019 20:06:20 -0000 On Tue, Jan 15, 2019 at 01:46:23PM -0600, Justin Hibbits wrote: J> Why not #include counter.h in the relevant vm_machdep.c files instead? This also is ugly :( Not sure more or less. Probably less, but I urged to plug all possible compilation failures at a time. What is ugly is that most files just need counter_u64_t size, and they don't use counter(9) KPI. The fact that vm_machdep or Linux KPI want to look into internal type uma_zone_t is also ugly. -- Gleb Smirnoff From owner-svn-src-all@freebsd.org Tue Jan 15 20:20:28 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 5F5D1149500A for ; Tue, 15 Jan 2019 20:20:28 +0000 (UTC) (envelope-from ian@freebsd.org) Received: from outbound1.eu.mailhop.org (outbound1.eu.mailhop.org [52.28.251.132]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id C22576F83E for ; Tue, 15 Jan 2019 20:20:27 +0000 (UTC) (envelope-from ian@freebsd.org) ARC-Seal: i=1; a=rsa-sha256; t=1547583619; cv=none; d=outbound.mailhop.org; s=arc-outbound20181012; b=G4VotBFlglDMG+RuU9SnaO+qztkJkMmymUnez8wo2BO3LTdwm3WKSk1xYTTdI10X3EkPunWZEfBc6 0AY8mCUNOjnjGj97WA+kUT5GvsTEdFJJF+BcItc6J7zP8XEW/FYbdzg94Jc2s0hN4eQaJE8pF+HVLw +hcp7GbJTpa+QGDoGLAcMhYXHt9bk17vjTlb97AMshfynscH62KyRzIcseuG3d4JNJ69eGKUmV1Nfg RCIpYNeWD1/DhKfSAg2sLKaizK19fTBJ5EPJ5pxfP+n+nbTciPthRD99XghbsHFo2yHj7muTdCJcnD p9m/jC51nOKNE3mOsXF30Tomo68d33Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=outbound.mailhop.org; s=arc-outbound20181012; h=content-transfer-encoding:mime-version:content-type:references:in-reply-to: date:cc:to:from:subject:message-id:dkim-signature:from; bh=GvdNdrm0KPcCpM2KH7WpCIrKZpr9Ylw+9v02wScWlI8=; b=ArYZ1PJX+a2gCDwVSWlmi7wP8F16/5nW1XcaSUoitqTmlfGnJuLR/mEyXYx/gCV/0+ykc7Efgs1Ss pMBOKfczKy0IF/l8ftRNkhOjUX36N5iDaR6jJjg9bXrzGqtivJdKRp6t/33Ek7G7Sax+E+2HgOdcHB w/Uvf03v5ZdudJ+UcaQg8TBripT46jib/x+h3A3bSx+z3KbQEm6NB3wFG1AF2WpI5P0oUPAE3oolI7 DtZ4tqBykDC0N5grcSqiV7vBgT6UO7kMvB7hI1i2V5qkkLYtL+uIAeQ79sTDawca+ggyAfo8q5ofgl +tm7SMqtQDIe2FDGGx4KF3aR9VOGwxg== ARC-Authentication-Results: i=1; outbound3.eu.mailhop.org; spf=softfail smtp.mailfrom=freebsd.org smtp.remote-ip=67.177.211.60; dmarc=none header.from=freebsd.org; arc=none header.oldest-pass=0; DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=outbound.mailhop.org; s=dkim-high; h=content-transfer-encoding:mime-version:content-type:references:in-reply-to: date:cc:to:from:subject:message-id:from; bh=GvdNdrm0KPcCpM2KH7WpCIrKZpr9Ylw+9v02wScWlI8=; b=Z+FBMr4R1WULJf3IfO8YcAfAGZ9lUEJePfXqhd/rE8QLjUjLzQRLjMsCNOSiAmoKM9NHDxV8QGTtF ZaEGWEL4dnmEDS9MVJqBygv8jC2vygpa315L/MWapJmY2+iVGcYnuVa67SQqLKpa3wyVk2LR59sG6F ahCgn4jQmq0yOGlfrZ1v3cF9r+Ua1jgcQLS7FKSD0bqnW1h5KgoJrrubCTKIpT3atZCURZVHLhYTEj ledgeWUaoQUOiF31vTxk1H642hFPYtjyWvBqyK/dnLICQNcAJv0Au/CgBQwMWX+qAtQ6ueqphW1VFA rHIx86RT4nxLGXNLmk0vrsqC0PK8Tdw== X-MHO-RoutePath: aGlwcGll X-MHO-User: f7e920e5-1902-11e9-8a28-a1efd8da9a94 X-Report-Abuse-To: https://support.duocircle.com/support/solutions/articles/5000540958-duocircle-standard-smtp-abuse-information X-Originating-IP: 67.177.211.60 X-Mail-Handler: DuoCircle Outbound SMTP Received: from ilsoft.org (unknown [67.177.211.60]) by outbound3.eu.mailhop.org (Halon) with ESMTPSA id f7e920e5-1902-11e9-8a28-a1efd8da9a94; Tue, 15 Jan 2019 20:20:16 +0000 (UTC) Received: from rev (rev [172.22.42.240]) by ilsoft.org (8.15.2/8.15.2) with ESMTP id x0FKKEeJ072390; Tue, 15 Jan 2019 13:20:14 -0700 (MST) (envelope-from ian@freebsd.org) Message-ID: <79ee763bb72a47f3e7888caf266174a62c23e532.camel@freebsd.org> Subject: Re: svn commit: r343058 - in head/sys: compat/linuxkpi/common/src vm From: Ian Lepore To: Gleb Smirnoff , Justin Hibbits Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Date: Tue, 15 Jan 2019 13:20:14 -0700 In-Reply-To: <20190115200617.GZ18452@FreeBSD.org> References: <201901151933.x0FJXl8a069317@repo.freebsd.org> <20190115134623.139064b2@titan.knownspace> <20190115200617.GZ18452@FreeBSD.org> Content-Type: text/plain; charset="UTF-8" X-Mailer: Evolution 3.28.5 FreeBSD GNOME Team Mime-Version: 1.0 Content-Transfer-Encoding: 7bit X-Rspamd-Queue-Id: C22576F83E X-Spamd-Bar: ------ Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-6.98 / 15.00]; NEURAL_HAM_MEDIUM(-1.00)[-1.000,0]; NEURAL_HAM_SHORT(-0.98)[-0.985,0]; REPLY(-4.00)[]; NEURAL_HAM_LONG(-1.00)[-1.000,0] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 15 Jan 2019 20:20:28 -0000 On Tue, 2019-01-15 at 12:06 -0800, Gleb Smirnoff wrote: > On Tue, Jan 15, 2019 at 01:46:23PM -0600, Justin Hibbits wrote: > J> Why not #include counter.h in the relevant vm_machdep.c files > instead? > > This also is ugly :( Not sure more or less. Probably less, but I > urged to plug all possible compilation failures at a time. > > What is ugly is that most files just need counter_u64_t size, > and they don't use counter(9) KPI. > > The fact that vm_machdep or Linux KPI want to look into internal > type uma_zone_t is also ugly. > Isn't the usual fix for this problem to create a __counter_u64_t in sys/types.h and use it in places where including the full header file is undesirable for some reason? -- Ian From owner-svn-src-all@freebsd.org Tue Jan 15 20:33:19 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 08F57149557F; Tue, 15 Jan 2019 20:33:19 +0000 (UTC) (envelope-from glebius@freebsd.org) Received: from cell.glebi.us (glebi.us [198.45.61.253]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "cell.glebi.us", Issuer "cell.glebi.us" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 8420A701A3; Tue, 15 Jan 2019 20:33:18 +0000 (UTC) (envelope-from glebius@freebsd.org) Received: from cell.glebi.us (localhost [127.0.0.1]) by cell.glebi.us (8.15.2/8.15.2) with ESMTPS id x0FKXGjo049440 (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384 bits=256 verify=NO); Tue, 15 Jan 2019 12:33:16 -0800 (PST) (envelope-from glebius@freebsd.org) Received: (from glebius@localhost) by cell.glebi.us (8.15.2/8.15.2/Submit) id x0FKXGHV049439; Tue, 15 Jan 2019 12:33:16 -0800 (PST) (envelope-from glebius@freebsd.org) X-Authentication-Warning: cell.glebi.us: glebius set sender to glebius@freebsd.org using -f Date: Tue, 15 Jan 2019 12:33:16 -0800 From: Gleb Smirnoff To: Ian Lepore Cc: Justin Hibbits , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r343058 - in head/sys: compat/linuxkpi/common/src vm Message-ID: <20190115203316.GA18452@FreeBSD.org> References: <201901151933.x0FJXl8a069317@repo.freebsd.org> <20190115134623.139064b2@titan.knownspace> <20190115200617.GZ18452@FreeBSD.org> <79ee763bb72a47f3e7888caf266174a62c23e532.camel@freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <79ee763bb72a47f3e7888caf266174a62c23e532.camel@freebsd.org> User-Agent: Mutt/1.10.1 (2018-07-13) X-Rspamd-Queue-Id: 8420A701A3 X-Spamd-Bar: ------ Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-6.97 / 15.00]; NEURAL_HAM_MEDIUM(-1.00)[-1.000,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; REPLY(-4.00)[]; NEURAL_HAM_SHORT(-0.97)[-0.968,0] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 15 Jan 2019 20:33:19 -0000 On Tue, Jan 15, 2019 at 01:20:14PM -0700, Ian Lepore wrote: I> On Tue, 2019-01-15 at 12:06 -0800, Gleb Smirnoff wrote: I> > On Tue, Jan 15, 2019 at 01:46:23PM -0600, Justin Hibbits wrote: I> > J> Why not #include counter.h in the relevant vm_machdep.c files I> > instead? I> > I> > This also is ugly :( Not sure more or less. Probably less, but I I> > urged to plug all possible compilation failures at a time. I> > I> > What is ugly is that most files just need counter_u64_t size, I> > and they don't use counter(9) KPI. I> > I> > The fact that vm_machdep or Linux KPI want to look into internal I> > type uma_zone_t is also ugly. I> > I> I> Isn't the usual fix for this problem to create a __counter_u64_t in I> sys/types.h and use it in places where including the full header file I> is undesirable for some reason? I'm inclined to this solution. Do you want to sign up as reviewer? :) -- Gleb Smirnoff From owner-svn-src-all@freebsd.org Tue Jan 15 21:04:04 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 874761496758; Tue, 15 Jan 2019 21:04:04 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from mail.baldwin.cx (bigwig.baldwin.cx [96.47.65.170]) (using TLSv1 with cipher DHE-RSA-CAMELLIA256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 281EC716C1; Tue, 15 Jan 2019 21:04:03 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from John-Baldwins-MacBook-Pro-3.local (ralph.baldwin.cx [66.234.199.215]) by mail.baldwin.cx (Postfix) with ESMTPSA id 6F47610AFCD; Tue, 15 Jan 2019 16:04:02 -0500 (EST) Subject: Re: svn commit: r343058 - in head/sys: compat/linuxkpi/common/src vm To: Gleb Smirnoff , Ian Lepore Cc: Justin Hibbits , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org References: <201901151933.x0FJXl8a069317@repo.freebsd.org> <20190115134623.139064b2@titan.knownspace> <20190115200617.GZ18452@FreeBSD.org> <79ee763bb72a47f3e7888caf266174a62c23e532.camel@freebsd.org> <20190115203316.GA18452@FreeBSD.org> From: John Baldwin Openpgp: preference=signencrypt Autocrypt: addr=jhb@FreeBSD.org; keydata= mQGiBETQ+XcRBADMFybiq69u+fJRy/0wzqTNS8jFfWaBTs5/OfcV7wWezVmf9sgwn8TW0Dk0 c9MBl0pz+H01dA2ZSGZ5fXlmFIsee1WEzqeJzpiwd/pejPgSzXB9ijbLHZ2/E0jhGBcVy5Yo /Tw5+U/+laeYKu2xb0XPvM0zMNls1ah5OnP9a6Ql6wCgupaoMySb7DXm2LHD1Z9jTsHcAQMD /1jzh2BoHriy/Q2s4KzzjVp/mQO5DSm2z14BvbQRcXU48oAosHA1u3Wrov6LfPY+0U1tG47X 1BGfnQH+rNAaH0livoSBQ0IPI/8WfIW7ub4qV6HYwWKVqkDkqwcpmGNDbz3gfaDht6nsie5Z pcuCcul4M9CW7Md6zzyvktjnbz61BADGDCopfZC4of0Z3Ka0u8Wik6UJOuqShBt1WcFS8ya1 oB4rc4tXfSHyMF63aPUBMxHR5DXeH+EO2edoSwViDMqWk1jTnYza51rbGY+pebLQOVOxAY7k do5Ordl3wklBPMVEPWoZ61SdbcjhHVwaC5zfiskcxj5wwXd2E9qYlBqRg7QeSm9obiBCYWxk d2luIDxqaGJARnJlZUJTRC5vcmc+iGAEExECACAFAkTQ+awCGwMGCwkIBwMCBBUCCAMEFgID AQIeAQIXgAAKCRBy3lIGd+N/BI6RAJ9S97fvbME+3hxzE3JUyUZ6vTewDACdE1stFuSfqMvM jomvZdYxIYyTUpC5Ag0ERND5ghAIAPwsO0B7BL+bz8sLlLoQktGxXwXQfS5cInvL17Dsgnr3 1AKa94j9EnXQyPEj7u0d+LmEe6CGEGDh1OcGFTMVrof2ZzkSy4+FkZwMKJpTiqeaShMh+Goj XlwIMDxyADYvBIg3eN5YdFKaPQpfgSqhT+7El7w+wSZZD8pPQuLAnie5iz9C8iKy4/cMSOrH YUK/tO+Nhw8Jjlw94Ik0T80iEhI2t+XBVjwdfjbq3HrJ0ehqdBwukyeJRYKmbn298KOFQVHO EVbHA4rF/37jzaMadK43FgJ0SAhPPF5l4l89z5oPu0b/+5e2inA3b8J3iGZxywjM+Csq1tqz hltEc7Q+E08AAwUIAL+15XH8bPbjNJdVyg2CMl10JNW2wWg2Q6qdljeaRqeR6zFus7EZTwtX sNzs5bP8y51PSUDJbeiy2RNCNKWFMndM22TZnk3GNG45nQd4OwYK0RZVrikalmJY5Q6m7Z16 4yrZgIXFdKj2t8F+x613/SJW1lIr9/bDp4U9tw0V1g3l2dFtD3p3ZrQ3hpoDtoK70ioIAjjH aIXIAcm3FGZFXy503DOA0KaTWwvOVdYCFLm3zWuSOmrX/GsEc7ovasOWwjPn878qVjbUKWwx Q4QkF4OhUV9zPtf9tDSAZ3x7QSwoKbCoRCZ/xbyTUPyQ1VvNy/mYrBcYlzHodsaqUDjHuW+I SQQYEQIACQUCRND5ggIbDAAKCRBy3lIGd+N/BCO8AJ9j1dWVQWxw/YdTbEyrRKOY8YZNwwCf afMAg8QvmOWnHx3wl8WslCaXaE8= Message-ID: Date: Tue, 15 Jan 2019 13:03:48 -0800 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.12; rv:60.0) Gecko/20100101 Thunderbird/60.4.0 MIME-Version: 1.0 In-Reply-To: <20190115203316.GA18452@FreeBSD.org> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 8bit X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.4.3 (mail.baldwin.cx); Tue, 15 Jan 2019 16:04:03 -0500 (EST) X-Virus-Scanned: clamav-milter 0.99.2 at mail.baldwin.cx X-Virus-Status: Clean X-Rspamd-Queue-Id: 281EC716C1 X-Spamd-Bar: ------ Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-6.95 / 15.00]; NEURAL_HAM_MEDIUM(-1.00)[-1.000,0]; NEURAL_HAM_SHORT(-0.95)[-0.946,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; REPLY(-4.00)[] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 15 Jan 2019 21:04:04 -0000 On 1/15/19 12:33 PM, Gleb Smirnoff wrote: > On Tue, Jan 15, 2019 at 01:20:14PM -0700, Ian Lepore wrote: > I> On Tue, 2019-01-15 at 12:06 -0800, Gleb Smirnoff wrote: > I> > On Tue, Jan 15, 2019 at 01:46:23PM -0600, Justin Hibbits wrote: > I> > J> Why not #include counter.h in the relevant vm_machdep.c files > I> > instead? > I> > > I> > This also is ugly :( Not sure more or less. Probably less, but I > I> > urged to plug all possible compilation failures at a time. > I> > > I> > What is ugly is that most files just need counter_u64_t size, > I> > and they don't use counter(9) KPI. > I> > > I> > The fact that vm_machdep or Linux KPI want to look into internal > I> > type uma_zone_t is also ugly. > I> > > I> > I> Isn't the usual fix for this problem to create a __counter_u64_t in > I> sys/types.h and use it in places where including the full header file > I> is undesirable for some reason? > > I'm inclined to this solution. Do you want to sign up as reviewer? :) I think normally we'd put the __counter_u64_t in sys/_types.h if we went that route. -- John Baldwin                                                                              From owner-svn-src-all@freebsd.org Tue Jan 15 21:06:59 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id A68A8149691A; Tue, 15 Jan 2019 21:06:59 +0000 (UTC) (envelope-from gonzo@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 4C386718F4; Tue, 15 Jan 2019 21:06:59 +0000 (UTC) (envelope-from gonzo@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 367D420593; Tue, 15 Jan 2019 21:06:59 +0000 (UTC) (envelope-from gonzo@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x0FL6x8P019402; Tue, 15 Jan 2019 21:06:59 GMT (envelope-from gonzo@FreeBSD.org) Received: (from gonzo@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x0FL6xn7019401; Tue, 15 Jan 2019 21:06:59 GMT (envelope-from gonzo@FreeBSD.org) Message-Id: <201901152106.x0FL6xn7019401@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gonzo set sender to gonzo@FreeBSD.org using -f From: Oleksandr Tymoshenko Date: Tue, 15 Jan 2019 21:06:59 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r343060 - head/sys/dev/drm X-SVN-Group: head X-SVN-Commit-Author: gonzo X-SVN-Commit-Paths: head/sys/dev/drm X-SVN-Commit-Revision: 343060 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 4C386718F4 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.97 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_SHORT(-0.97)[-0.969,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_LONG(-1.00)[-0.999,0] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 15 Jan 2019 21:06:59 -0000 Author: gonzo Date: Tue Jan 15 21:06:58 2019 New Revision: 343060 URL: https://svnweb.freebsd.org/changeset/base/343060 Log: [drm] Fix off-by-one error when accessing driver-specific ioctl handlers array PR: 231513 Submitted by: Young_X Approved by: imp MFC after: 1 week Modified: head/sys/dev/drm/drm_drv.c Modified: head/sys/dev/drm/drm_drv.c ============================================================================== --- head/sys/dev/drm/drm_drv.c Tue Jan 15 20:27:21 2019 (r343059) +++ head/sys/dev/drm/drm_drv.c Tue Jan 15 21:06:58 2019 (r343060) @@ -745,7 +745,7 @@ int drm_ioctl(struct cdev *kdev, u_long cmd, caddr_t d if (ioctl->func == NULL && nr >= DRM_COMMAND_BASE) { /* The array entries begin at DRM_COMMAND_BASE ioctl nr */ nr -= DRM_COMMAND_BASE; - if (nr > dev->driver->max_ioctl) { + if (nr >= dev->driver->max_ioctl) { DRM_DEBUG("Bad driver ioctl number, 0x%x (of 0x%x)\n", nr, dev->driver->max_ioctl); return EINVAL; From owner-svn-src-all@freebsd.org Tue Jan 15 21:07:41 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 69247149696D; Tue, 15 Jan 2019 21:07:41 +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 0F62671A4E; Tue, 15 Jan 2019 21:07:41 +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 03FBC20595; Tue, 15 Jan 2019 21:07:41 +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 x0FL7eNM019495; Tue, 15 Jan 2019 21:07:40 GMT (envelope-from jhb@FreeBSD.org) Received: (from jhb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x0FL7ecD019494; Tue, 15 Jan 2019 21:07:40 GMT (envelope-from jhb@FreeBSD.org) Message-Id: <201901152107.x0FL7ecD019494@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jhb set sender to jhb@FreeBSD.org using -f From: John Baldwin Date: Tue, 15 Jan 2019 21:07:40 +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: r343061 - in stable: 11/sys/dev/cxgbe 12/sys/dev/cxgbe X-SVN-Group: stable-12 X-SVN-Commit-Author: jhb X-SVN-Commit-Paths: in stable: 11/sys/dev/cxgbe 12/sys/dev/cxgbe X-SVN-Commit-Revision: 343061 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 0F62671A4E X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.97 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_SHORT(-0.97)[-0.967,0]; NEURAL_HAM_LONG(-1.00)[-0.999,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 15 Jan 2019 21:07:41 -0000 Author: jhb Date: Tue Jan 15 21:07:40 2019 New Revision: 343061 URL: https://svnweb.freebsd.org/changeset/base/343061 Log: MFC 340206: Treat the memory lengths for CHELSIO_T4_GET_MEM as unsigned. Previously attempts to read the MC region were failing since the length was greater than 2^31. Modified: stable/12/sys/dev/cxgbe/t4_main.c Directory Properties: stable/12/ (props changed) Changes in other areas also in this revision: Modified: stable/11/sys/dev/cxgbe/t4_main.c Directory Properties: stable/11/ (props changed) Modified: stable/12/sys/dev/cxgbe/t4_main.c ============================================================================== --- stable/12/sys/dev/cxgbe/t4_main.c Tue Jan 15 21:06:58 2019 (r343060) +++ stable/12/sys/dev/cxgbe/t4_main.c Tue Jan 15 21:07:40 2019 (r343061) @@ -527,9 +527,9 @@ struct intrs_and_queues { static void setup_memwin(struct adapter *); static void position_memwin(struct adapter *, int, uint32_t); -static int validate_mem_range(struct adapter *, uint32_t, int); +static int validate_mem_range(struct adapter *, uint32_t, uint32_t); static int fwmtype_to_hwmtype(int); -static int validate_mt_off_len(struct adapter *, int, uint32_t, int, +static int validate_mt_off_len(struct adapter *, int, uint32_t, uint32_t, uint32_t *); static int fixup_devlog_params(struct adapter *); static int cfg_itype_and_nqueues(struct adapter *, struct intrs_and_queues *); @@ -2816,14 +2816,14 @@ t4_range_cmp(const void *a, const void *b) * the card's address space. */ static int -validate_mem_range(struct adapter *sc, uint32_t addr, int len) +validate_mem_range(struct adapter *sc, uint32_t addr, uint32_t len) { struct t4_range mem_ranges[4], *r, *next; uint32_t em, addr_len; int i, n, remaining; /* Memory can only be accessed in naturally aligned 4 byte units */ - if (addr & 3 || len & 3 || len <= 0) + if (addr & 3 || len & 3 || len == 0) return (EINVAL); /* Enabled memories */ @@ -2962,7 +2962,7 @@ fwmtype_to_hwmtype(int mtype) * the start of the range is returned in addr. */ static int -validate_mt_off_len(struct adapter *sc, int mtype, uint32_t off, int len, +validate_mt_off_len(struct adapter *sc, int mtype, uint32_t off, uint32_t len, uint32_t *addr) { uint32_t em, addr_len, maddr; From owner-svn-src-all@freebsd.org Tue Jan 15 21:07:42 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id BF2EC1496971; Tue, 15 Jan 2019 21:07:41 +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 65D3D71A4F; Tue, 15 Jan 2019 21:07:41 +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 5923520596; Tue, 15 Jan 2019 21:07:41 +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 x0FL7fPm019501; Tue, 15 Jan 2019 21:07:41 GMT (envelope-from jhb@FreeBSD.org) Received: (from jhb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x0FL7fue019500; Tue, 15 Jan 2019 21:07:41 GMT (envelope-from jhb@FreeBSD.org) Message-Id: <201901152107.x0FL7fue019500@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jhb set sender to jhb@FreeBSD.org using -f From: John Baldwin Date: Tue, 15 Jan 2019 21:07:41 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r343061 - in stable: 11/sys/dev/cxgbe 12/sys/dev/cxgbe X-SVN-Group: stable-11 X-SVN-Commit-Author: jhb X-SVN-Commit-Paths: in stable: 11/sys/dev/cxgbe 12/sys/dev/cxgbe X-SVN-Commit-Revision: 343061 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 65D3D71A4F X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.97 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_SHORT(-0.97)[-0.967,0]; NEURAL_HAM_LONG(-1.00)[-0.999,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 15 Jan 2019 21:07:42 -0000 Author: jhb Date: Tue Jan 15 21:07:40 2019 New Revision: 343061 URL: https://svnweb.freebsd.org/changeset/base/343061 Log: MFC 340206: Treat the memory lengths for CHELSIO_T4_GET_MEM as unsigned. Previously attempts to read the MC region were failing since the length was greater than 2^31. Modified: stable/11/sys/dev/cxgbe/t4_main.c Directory Properties: stable/11/ (props changed) Changes in other areas also in this revision: Modified: stable/12/sys/dev/cxgbe/t4_main.c Directory Properties: stable/12/ (props changed) Modified: stable/11/sys/dev/cxgbe/t4_main.c ============================================================================== --- stable/11/sys/dev/cxgbe/t4_main.c Tue Jan 15 21:06:58 2019 (r343060) +++ stable/11/sys/dev/cxgbe/t4_main.c Tue Jan 15 21:07:40 2019 (r343061) @@ -523,9 +523,9 @@ static inline int read_via_memwin(struct adapter *, in int); static inline int write_via_memwin(struct adapter *, int, uint32_t, const uint32_t *, int); -static int validate_mem_range(struct adapter *, uint32_t, int); +static int validate_mem_range(struct adapter *, uint32_t, uint32_t); static int fwmtype_to_hwmtype(int); -static int validate_mt_off_len(struct adapter *, int, uint32_t, int, +static int validate_mt_off_len(struct adapter *, int, uint32_t, uint32_t, uint32_t *); static int fixup_devlog_params(struct adapter *); static int cfg_itype_and_nqueues(struct adapter *, struct intrs_and_queues *); @@ -2681,14 +2681,14 @@ t4_range_cmp(const void *a, const void *b) * the card's address space. */ static int -validate_mem_range(struct adapter *sc, uint32_t addr, int len) +validate_mem_range(struct adapter *sc, uint32_t addr, uint32_t len) { struct t4_range mem_ranges[4], *r, *next; uint32_t em, addr_len; int i, n, remaining; /* Memory can only be accessed in naturally aligned 4 byte units */ - if (addr & 3 || len & 3 || len <= 0) + if (addr & 3 || len & 3 || len == 0) return (EINVAL); /* Enabled memories */ @@ -2827,7 +2827,7 @@ fwmtype_to_hwmtype(int mtype) * the start of the range is returned in addr. */ static int -validate_mt_off_len(struct adapter *sc, int mtype, uint32_t off, int len, +validate_mt_off_len(struct adapter *sc, int mtype, uint32_t off, uint32_t len, uint32_t *addr) { uint32_t em, addr_len, maddr; From owner-svn-src-all@freebsd.org Tue Jan 15 21:33:28 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 0C994149796C; Tue, 15 Jan 2019 21:33:28 +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 A2AB9743DD; Tue, 15 Jan 2019 21:33:27 +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 948E420AB5; Tue, 15 Jan 2019 21:33:27 +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 x0FLXRNM038147; Tue, 15 Jan 2019 21:33:27 GMT (envelope-from jhb@FreeBSD.org) Received: (from jhb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x0FLXQaO038142; Tue, 15 Jan 2019 21:33:26 GMT (envelope-from jhb@FreeBSD.org) Message-Id: <201901152133.x0FLXQaO038142@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jhb set sender to jhb@FreeBSD.org using -f From: John Baldwin Date: Tue, 15 Jan 2019 21:33:26 +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: r343062 - in stable/12/sys/dev/cxgbe: . tom X-SVN-Group: stable-12 X-SVN-Commit-Author: jhb X-SVN-Commit-Paths: in stable/12/sys/dev/cxgbe: . tom X-SVN-Commit-Revision: 343062 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: A2AB9743DD X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.97 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_SHORT(-0.97)[-0.975,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_LONG(-1.00)[-0.999,0] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 15 Jan 2019 21:33:28 -0000 Author: jhb Date: Tue Jan 15 21:33:26 2019 New Revision: 343062 URL: https://svnweb.freebsd.org/changeset/base/343062 Log: MFC 340466,340473: Move the TLS key map into the adapter softc. 340466: Move the TLS key map into the adapter softc so non-TOE code can use it. 340473: Restore the header to fix build of cxgbe(4) TOM. vmem's are not just used for TLS memory in TOM and the #include actually predates the TLS code so should not have been removed when the TLS vmem moved in r340466. Modified: stable/12/sys/dev/cxgbe/adapter.h stable/12/sys/dev/cxgbe/t4_main.c stable/12/sys/dev/cxgbe/tom/t4_tls.c stable/12/sys/dev/cxgbe/tom/t4_tom.c stable/12/sys/dev/cxgbe/tom/t4_tom.h Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/dev/cxgbe/adapter.h ============================================================================== --- stable/12/sys/dev/cxgbe/adapter.h Tue Jan 15 21:07:40 2019 (r343061) +++ stable/12/sys/dev/cxgbe/adapter.h Tue Jan 15 21:33:26 2019 (r343062) @@ -41,6 +41,7 @@ #include #include #include +#include #include #include @@ -823,6 +824,7 @@ struct adapter { struct l2t_data *l2t; /* L2 table */ struct smt_data *smt; /* Source MAC Table */ struct tid_info tids; + vmem_t *key_map; uint8_t doorbells; int offload_map; /* ports with IFCAP_TOE enabled */ Modified: stable/12/sys/dev/cxgbe/t4_main.c ============================================================================== --- stable/12/sys/dev/cxgbe/t4_main.c Tue Jan 15 21:07:40 2019 (r343061) +++ stable/12/sys/dev/cxgbe/t4_main.c Tue Jan 15 21:33:26 2019 (r343062) @@ -1151,6 +1151,9 @@ t4_attach(device_t dev) #ifdef RATELIMIT t4_init_etid_table(sc); #endif + if (sc->vres.key.size != 0) + sc->key_map = vmem_create("T4TLS key map", sc->vres.key.start, + sc->vres.key.size, 8, 0, M_FIRSTFIT | M_WAITOK); /* * Second pass over the ports. This time we know the number of rx and @@ -1436,6 +1439,8 @@ t4_detach_common(device_t dev) #ifdef RATELIMIT t4_free_etid_table(sc); #endif + if (sc->key_map) + vmem_destroy(sc->key_map); #if defined(TCP_OFFLOAD) || defined(RATELIMIT) free(sc->sge.ofld_txq, M_CXGBE); Modified: stable/12/sys/dev/cxgbe/tom/t4_tls.c ============================================================================== --- stable/12/sys/dev/cxgbe/tom/t4_tls.c Tue Jan 15 21:07:40 2019 (r343061) +++ stable/12/sys/dev/cxgbe/tom/t4_tls.c Tue Jan 15 21:33:26 2019 (r343062) @@ -429,32 +429,13 @@ prepare_txkey_wr(struct tls_keyctx *kwr, struct tls_ke } /* TLS Key memory management */ -int -tls_init_kmap(struct adapter *sc, struct tom_data *td) -{ - - td->key_map = vmem_create("T4TLS key map", sc->vres.key.start, - sc->vres.key.size, 8, 0, M_FIRSTFIT | M_NOWAIT); - if (td->key_map == NULL) - return (ENOMEM); - return (0); -} - -void -tls_free_kmap(struct tom_data *td) -{ - - if (td->key_map != NULL) - vmem_destroy(td->key_map); -} - static int get_new_keyid(struct toepcb *toep, struct tls_key_context *k_ctx) { - struct tom_data *td = toep->td; + struct adapter *sc = td_adapter(toep->td); vmem_addr_t addr; - if (vmem_alloc(td->key_map, TLS_KEY_CONTEXT_SZ, M_NOWAIT | M_FIRSTFIT, + if (vmem_alloc(sc->key_map, TLS_KEY_CONTEXT_SZ, M_NOWAIT | M_FIRSTFIT, &addr) != 0) return (-1); @@ -464,9 +445,9 @@ get_new_keyid(struct toepcb *toep, struct tls_key_cont static void free_keyid(struct toepcb *toep, int keyid) { - struct tom_data *td = toep->td; + struct adapter *sc = td_adapter(toep->td); - vmem_free(td->key_map, keyid, TLS_KEY_CONTEXT_SZ); + vmem_free(sc->key_map, keyid, TLS_KEY_CONTEXT_SZ); } static void Modified: stable/12/sys/dev/cxgbe/tom/t4_tom.c ============================================================================== --- stable/12/sys/dev/cxgbe/tom/t4_tom.c Tue Jan 15 21:07:40 2019 (r343061) +++ stable/12/sys/dev/cxgbe/tom/t4_tom.c Tue Jan 15 21:33:26 2019 (r343062) @@ -1093,7 +1093,6 @@ free_tom_data(struct adapter *sc, struct tom_data *td) KASSERT(td->lctx_count == 0, ("%s: lctx hash table is not empty.", __func__)); - tls_free_kmap(td); t4_free_ppod_region(&td->pr); destroy_clip_table(sc, td); @@ -1372,12 +1371,6 @@ t4_tom_activate(struct adapter *sc) /* CLIP table for IPv6 offload */ init_clip_table(sc, td); - - if (sc->vres.key.size != 0) { - rc = tls_init_kmap(sc, td); - if (rc != 0) - goto done; - } /* toedev ops */ tod = &td->tod; Modified: stable/12/sys/dev/cxgbe/tom/t4_tom.h ============================================================================== --- stable/12/sys/dev/cxgbe/tom/t4_tom.h Tue Jan 15 21:07:40 2019 (r343061) +++ stable/12/sys/dev/cxgbe/tom/t4_tom.h Tue Jan 15 21:33:26 2019 (r343062) @@ -280,8 +280,6 @@ struct tom_data { struct ppod_region pr; - vmem_t *key_map; - struct mtx clip_table_lock; struct clip_head clip_table; int clip_gen; @@ -426,8 +424,6 @@ void t4_push_tls_records(struct adapter *, struct toep void t4_tls_mod_load(void); void t4_tls_mod_unload(void); void tls_establish(struct toepcb *); -void tls_free_kmap(struct tom_data *); -int tls_init_kmap(struct adapter *, struct tom_data *); void tls_init_toep(struct toepcb *); int tls_rx_key(struct toepcb *); void tls_stop_handshake_timer(struct toepcb *); From owner-svn-src-all@freebsd.org Tue Jan 15 21:40:51 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id D596B1497AF7; Tue, 15 Jan 2019 21:40:51 +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 7BAFF7464C; Tue, 15 Jan 2019 21:40:51 +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 6E0FF20ADB; Tue, 15 Jan 2019 21:40:51 +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 x0FLep7q041870; Tue, 15 Jan 2019 21:40:51 GMT (envelope-from jhb@FreeBSD.org) Received: (from jhb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x0FLepa0041869; Tue, 15 Jan 2019 21:40:51 GMT (envelope-from jhb@FreeBSD.org) Message-Id: <201901152140.x0FLepa0041869@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jhb set sender to jhb@FreeBSD.org using -f From: John Baldwin Date: Tue, 15 Jan 2019 21:40: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: r343063 - stable/12/sys/dev/cxgbe X-SVN-Group: stable-12 X-SVN-Commit-Author: jhb X-SVN-Commit-Paths: stable/12/sys/dev/cxgbe X-SVN-Commit-Revision: 343063 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 7BAFF7464C X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.97 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_SHORT(-0.97)[-0.974,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_LONG(-1.00)[-0.999,0] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 15 Jan 2019 21:40:52 -0000 Author: jhb Date: Tue Jan 15 21:40:51 2019 New Revision: 343063 URL: https://svnweb.freebsd.org/changeset/base/343063 Log: MFC 340468: Change the quantum for TLS key addresses to 32 bytes. The addresses passed when reading and writing keys are always shifted right by 5 as the memory locations are addressed in 32-byte chunks, so the quantum needs to be 32, not 8. Modified: stable/12/sys/dev/cxgbe/t4_main.c Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/dev/cxgbe/t4_main.c ============================================================================== --- stable/12/sys/dev/cxgbe/t4_main.c Tue Jan 15 21:33:26 2019 (r343062) +++ stable/12/sys/dev/cxgbe/t4_main.c Tue Jan 15 21:40:51 2019 (r343063) @@ -1153,7 +1153,7 @@ t4_attach(device_t dev) #endif if (sc->vres.key.size != 0) sc->key_map = vmem_create("T4TLS key map", sc->vres.key.start, - sc->vres.key.size, 8, 0, M_FIRSTFIT | M_WAITOK); + sc->vres.key.size, 32, 0, M_FIRSTFIT | M_WAITOK); /* * Second pass over the ports. This time we know the number of rx and From owner-svn-src-all@freebsd.org Tue Jan 15 21:43:19 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 9F12E1497D55; Tue, 15 Jan 2019 21:43:19 +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 43F5E749F4; Tue, 15 Jan 2019 21:43:19 +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 33BAD20C5F; Tue, 15 Jan 2019 21:43:19 +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 x0FLhJK2043708; Tue, 15 Jan 2019 21:43:19 GMT (envelope-from jhb@FreeBSD.org) Received: (from jhb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x0FLhJXl043707; Tue, 15 Jan 2019 21:43:19 GMT (envelope-from jhb@FreeBSD.org) Message-Id: <201901152143.x0FLhJXl043707@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jhb set sender to jhb@FreeBSD.org using -f From: John Baldwin Date: Tue, 15 Jan 2019 21:43:19 +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: r343064 - stable/12/sys/dev/cxgbe/tom X-SVN-Group: stable-12 X-SVN-Commit-Author: jhb X-SVN-Commit-Paths: stable/12/sys/dev/cxgbe/tom X-SVN-Commit-Revision: 343064 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 43F5E749F4 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.97 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_LONG(-1.00)[-0.999,0]; NEURAL_HAM_SHORT(-0.97)[-0.974,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 15 Jan 2019 21:43:19 -0000 Author: jhb Date: Tue Jan 15 21:43:18 2019 New Revision: 343064 URL: https://svnweb.freebsd.org/changeset/base/343064 Log: MFC 340469: Remove bogus roundup2() of the key programming work request header. The key context is always placed immediately after the work request header. The total work request length has to be rounded up by 16 however. Modified: stable/12/sys/dev/cxgbe/tom/t4_tls.c Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/dev/cxgbe/tom/t4_tls.c ============================================================================== --- stable/12/sys/dev/cxgbe/tom/t4_tls.c Tue Jan 15 21:40:51 2019 (r343063) +++ stable/12/sys/dev/cxgbe/tom/t4_tls.c Tue Jan 15 21:43:18 2019 (r343064) @@ -492,9 +492,9 @@ tls_program_key_id(struct toepcb *toep, struct tls_key struct tls_key_req *kwr; struct tls_keyctx *kctx; - kwrlen = roundup2(sizeof(*kwr), 16); + kwrlen = sizeof(*kwr); kctxlen = roundup2(sizeof(*kctx), 32); - len = kwrlen + kctxlen; + len = roundup2(kwrlen + kctxlen, 16); if (toep->txsd_avail == 0) return (EAGAIN); @@ -536,7 +536,6 @@ tls_program_key_id(struct toepcb *toep, struct tls_key kwr->sc_more = htobe32(V_ULPTX_CMD(ULP_TX_SC_IMM)); kwr->sc_len = htobe32(kctxlen); - /* XXX: This assumes that kwrlen == sizeof(*kwr). */ kctx = (struct tls_keyctx *)(kwr + 1); memset(kctx, 0, kctxlen); From owner-svn-src-all@freebsd.org Tue Jan 15 22:31:55 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 40195149900D; Tue, 15 Jan 2019 22:31:55 +0000 (UTC) (envelope-from bz@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 CBAB67687D; Tue, 15 Jan 2019 22:31:54 +0000 (UTC) (envelope-from bz@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id BF7A7214B5; Tue, 15 Jan 2019 22:31:54 +0000 (UTC) (envelope-from bz@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x0FMVsoB066978; Tue, 15 Jan 2019 22:31:54 GMT (envelope-from bz@FreeBSD.org) Received: (from bz@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x0FMVsrs066977; Tue, 15 Jan 2019 22:31:54 GMT (envelope-from bz@FreeBSD.org) Message-Id: <201901152231.x0FMVsrs066977@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bz set sender to bz@FreeBSD.org using -f From: "Bjoern A. Zeeb" Date: Tue, 15 Jan 2019 22:31:54 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r343065 - head/sys/dev/iwm X-SVN-Group: head X-SVN-Commit-Author: bz X-SVN-Commit-Paths: head/sys/dev/iwm X-SVN-Commit-Revision: 343065 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: CBAB67687D X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.95 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_SHORT(-0.96)[-0.955,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_LONG(-1.00)[-0.999,0] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 15 Jan 2019 22:31:55 -0000 Author: bz Date: Tue Jan 15 22:31:54 2019 New Revision: 343065 URL: https://svnweb.freebsd.org/changeset/base/343065 Log: With the sync from Dragonfly BSD in r318216 a bug slipped in (also still present upstream it seems). The tlv variable was changed to a pointer but the advancement of the data pointer was left as sizeof(tlv). While the sizeof the (now) pointer equals the sizeof 2 x uint32_t (size of the struct) on 64bit platforms, on 32bit platforms the size of the advancement of the data pointer was wrong leading to firmware load issues. Correctly advance the data pointer by the size of the structure and not by the size of a pointer. PR: 219683 Submitted by: waddlesplash gamil.com (Haiku) on irc MFC after: 1 week Modified: head/sys/dev/iwm/if_iwm.c Modified: head/sys/dev/iwm/if_iwm.c ============================================================================== --- head/sys/dev/iwm/if_iwm.c Tue Jan 15 21:43:18 2019 (r343064) +++ head/sys/dev/iwm/if_iwm.c Tue Jan 15 22:31:54 2019 (r343065) @@ -626,7 +626,7 @@ iwm_read_firmware(struct iwm_softc *sc, enum iwm_ucode goto parse_out; } len -= roundup2(tlv_len, 4); - data += sizeof(tlv) + roundup2(tlv_len, 4); + data += sizeof(*tlv) + roundup2(tlv_len, 4); switch ((int)tlv_type) { case IWM_UCODE_TLV_PROBE_MAX_LEN: From owner-svn-src-all@freebsd.org Tue Jan 15 23:35:54 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id C6B52149A8EF; Tue, 15 Jan 2019 23:35:54 +0000 (UTC) (envelope-from sjg@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 6AAA180A88; Tue, 15 Jan 2019 23:35:54 +0000 (UTC) (envelope-from sjg@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 5B97921EF9; Tue, 15 Jan 2019 23:35:54 +0000 (UTC) (envelope-from sjg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x0FNZsjA001229; Tue, 15 Jan 2019 23:35:54 GMT (envelope-from sjg@FreeBSD.org) Received: (from sjg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x0FNZscL001228; Tue, 15 Jan 2019 23:35:54 GMT (envelope-from sjg@FreeBSD.org) Message-Id: <201901152335.x0FNZscL001228@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: sjg set sender to sjg@FreeBSD.org using -f From: "Simon J. Gerraty" Date: Tue, 15 Jan 2019 23:35:54 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r343066 - head/share/mk X-SVN-Group: head X-SVN-Commit-Author: sjg X-SVN-Commit-Paths: head/share/mk X-SVN-Commit-Revision: 343066 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 6AAA180A88 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.95 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_SHORT(-0.96)[-0.955,0]; NEURAL_HAM_LONG(-1.00)[-0.999,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 15 Jan 2019 23:35:54 -0000 Author: sjg Date: Tue Jan 15 23:35:53 2019 New Revision: 343066 URL: https://svnweb.freebsd.org/changeset/base/343066 Log: Use .undef per variable Attempting to expand a variable to a list of vars to .undef does not actually work. Reviewed by: bdrewery Differential Revision: D17251 Modified: head/share/mk/dirdeps-options.mk Modified: head/share/mk/dirdeps-options.mk ============================================================================== --- head/share/mk/dirdeps-options.mk Tue Jan 15 22:31:54 2019 (r343065) +++ head/share/mk/dirdeps-options.mk Tue Jan 15 23:35:53 2019 (r343066) @@ -1,5 +1,5 @@ # $FreeBSD$ -# $Id: dirdeps-options.mk,v 1.8 2018/05/29 22:31:21 sjg Exp $ +# $Id: dirdeps-options.mk,v 1.9 2018/09/20 00:07:19 sjg Exp $ # # @(#) Copyright (c) 2018, Simon J. Gerraty # @@ -54,7 +54,8 @@ DIRDEPS += ${DIRDEPS.$o.${MK_$o:U}:U} DIRDEPS := ${DIRDEPS:O:u} # avoid cross contamination .for o in ${DIRDEPS_OPTIONS:tu} -.undef DIRDEPS.$o.yes DIRDEPS.$o.no +.undef DIRDEPS.$o.yes +.undef DIRDEPS.$o.no .endfor .else # whether options are enabled or not, From owner-svn-src-all@freebsd.org Tue Jan 15 23:37:50 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 8372E149A9CB; Tue, 15 Jan 2019 23:37:50 +0000 (UTC) (envelope-from sjg@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 28DD380C6B; Tue, 15 Jan 2019 23:37:50 +0000 (UTC) (envelope-from sjg@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 14C0621F00; Tue, 15 Jan 2019 23:37:50 +0000 (UTC) (envelope-from sjg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x0FNbncc001347; Tue, 15 Jan 2019 23:37:49 GMT (envelope-from sjg@FreeBSD.org) Received: (from sjg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x0FNbnsJ001345; Tue, 15 Jan 2019 23:37:49 GMT (envelope-from sjg@FreeBSD.org) Message-Id: <201901152337.x0FNbnsJ001345@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: sjg set sender to sjg@FreeBSD.org using -f From: "Simon J. Gerraty" Date: Tue, 15 Jan 2019 23:37:49 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r343067 - head/share/mk X-SVN-Group: head X-SVN-Commit-Author: sjg X-SVN-Commit-Paths: head/share/mk X-SVN-Commit-Revision: 343067 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 28DD380C6B X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.95 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_SHORT(-0.96)[-0.955,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_LONG(-1.00)[-0.999,0] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 15 Jan 2019 23:37:50 -0000 Author: sjg Date: Tue Jan 15 23:37:49 2019 New Revision: 343067 URL: https://svnweb.freebsd.org/changeset/base/343067 Log: Fix STAGE_DIR.* to handle indirect *DIR variables. bsd.{files,conf}.mk recently changed to allow *DIR to name a variable rather than a path. STAGE_DIR.* need to adapt. Reviewed by: bdrewery Differential Revision: D18847 Modified: head/share/mk/bsd.confs.mk head/share/mk/bsd.files.mk Modified: head/share/mk/bsd.confs.mk ============================================================================== --- head/share/mk/bsd.confs.mk Tue Jan 15 23:35:53 2019 (r343066) +++ head/share/mk/bsd.confs.mk Tue Jan 15 23:37:49 2019 (r343067) @@ -40,7 +40,6 @@ ${group}GRP?= ${SHAREGRP} ${group}MODE?= ${CONFMODE} ${group}DIR?= ${CONFDIR} STAGE_SETS+= ${group:C,[/*],_,g} -STAGE_DIR.${group:C,[/*],_,g}= ${STAGE_OBJTOP}${${group}DIR} . if defined(NO_ROOT) . if !defined(${group}TAGS) || ! ${${group}TAGS:Mpackage=*} @@ -65,6 +64,7 @@ DIRS+= ${group}DIR _${group}DIR= ${group}DIR . endif +STAGE_DIR.${group:C,[/*],_,g}= ${STAGE_OBJTOP}${${_${group}DIR}} . for cnf in ${${group}} ${group}OWN_${cnf}?= ${${group}OWN} @@ -119,7 +119,7 @@ INSTALL_COPY= -C STAGE_AS_SETS+= ${cnf:T} STAGE_AS_${cnf:T}= ${${group}NAME_${cnf:T}} # XXX {group}OWN,GRP,MODE -STAGE_DIR.${cnf:T}= ${STAGE_OBJTOP}${${group}DIR_${cnf:T}} +STAGE_DIR.${cnf:T}= ${STAGE_OBJTOP}${${_${group}DIR_${cnf}}} stage_as.${cnf:T}: ${cnf} realinstallconfig: installdirs-${_${group}DIR_${cnf}} _${group}INS_${cnf:T} Modified: head/share/mk/bsd.files.mk ============================================================================== --- head/share/mk/bsd.files.mk Tue Jan 15 23:35:53 2019 (r343066) +++ head/share/mk/bsd.files.mk Tue Jan 15 23:37:49 2019 (r343067) @@ -37,7 +37,6 @@ ${group}GRP= ${SHAREGRP} ${group}MODE?= ${SHAREMODE} ${group}DIR?= BINDIR STAGE_SETS+= ${group:C,[/*],_,g} -STAGE_DIR.${group:C,[/*],_,g}= ${STAGE_OBJTOP}${${group}DIR} .if defined(NO_ROOT) .if !defined(${group}TAGS) || ! ${${group}TAGS:Mpackage=*} @@ -57,6 +56,7 @@ DIRS+= ${group}DIR _${group}DIR= ${group}DIR .endif +STAGE_DIR.${group:C,[/*],_,g}= ${STAGE_OBJTOP}${${_${group}DIR}} .for file in ${${group}} ${group}OWN_${file}?= ${${group}OWN} @@ -100,7 +100,7 @@ ${group}NAME_${file}?= ${file:T} STAGE_AS_SETS+= ${file} STAGE_AS_${file}= ${${group}NAME_${file}} # XXX {group}OWN,GRP,MODE -STAGE_DIR.${file}= ${STAGE_OBJTOP}${${group}DIR_${file}} +STAGE_DIR.${file}= ${STAGE_OBJTOP}${${_${group}DIR_${file}}} stage_as.${file}: ${file} installfiles-${group}: _${group}INS1_${file} From owner-svn-src-all@freebsd.org Wed Jan 16 00:39:27 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id E14CE149C2D3; Wed, 16 Jan 2019 00:39:26 +0000 (UTC) (envelope-from araujo@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 8050C82FC9; Wed, 16 Jan 2019 00:39:26 +0000 (UTC) (envelope-from araujo@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1: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 6692D2293C; Wed, 16 Jan 2019 00:39:26 +0000 (UTC) (envelope-from araujo@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x0G0dQAa032307; Wed, 16 Jan 2019 00:39:26 GMT (envelope-from araujo@FreeBSD.org) Received: (from araujo@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x0G0dNFW032289; Wed, 16 Jan 2019 00:39:23 GMT (envelope-from araujo@FreeBSD.org) Message-Id: <201901160039.x0G0dNFW032289@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: araujo set sender to araujo@FreeBSD.org using -f From: Marcelo Araujo Date: Wed, 16 Jan 2019 00:39:23 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r343068 - head/usr.sbin/bhyve X-SVN-Group: head X-SVN-Commit-Author: araujo X-SVN-Commit-Paths: head/usr.sbin/bhyve X-SVN-Commit-Revision: 343068 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 8050C82FC9 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.98 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_SHORT(-0.98)[-0.984,0]; NEURAL_HAM_LONG(-1.00)[-0.999,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 16 Jan 2019 00:39:27 -0000 Author: araujo Date: Wed Jan 16 00:39:23 2019 New Revision: 343068 URL: https://svnweb.freebsd.org/changeset/base/343068 Log: Use capsicum_helpers(3) that allow us to simplify the code and its functions will return success when the kernel is built without support of the capability mode. It is important to note, that I'm taking a more conservative approach with these changes and it will be done in small steps. Reviewed by: jhb MFC after: 6 weeks Differential Revision: https://reviews.freebsd.org/D18744 Modified: head/usr.sbin/bhyve/bhyverun.c head/usr.sbin/bhyve/block_if.c head/usr.sbin/bhyve/consport.c head/usr.sbin/bhyve/dbgport.c head/usr.sbin/bhyve/gdb.c head/usr.sbin/bhyve/mevent.c head/usr.sbin/bhyve/pci_e82545.c head/usr.sbin/bhyve/pci_passthru.c head/usr.sbin/bhyve/pci_virtio_console.c head/usr.sbin/bhyve/pci_virtio_net.c head/usr.sbin/bhyve/pci_virtio_rnd.c head/usr.sbin/bhyve/rfb.c head/usr.sbin/bhyve/uart_emul.c Modified: head/usr.sbin/bhyve/bhyverun.c ============================================================================== --- head/usr.sbin/bhyve/bhyverun.c Tue Jan 15 23:37:49 2019 (r343067) +++ head/usr.sbin/bhyve/bhyverun.c Wed Jan 16 00:39:23 2019 (r343068) @@ -54,7 +54,6 @@ __FBSDID("$FreeBSD$"); #include #include #include -#include #include #include #include @@ -949,15 +948,13 @@ do_open(const char *vmname) #ifndef WITHOUT_CAPSICUM cap_rights_init(&rights, CAP_IOCTL, CAP_MMAP_RW); - if (cap_rights_limit(vm_get_device_fd(ctx), &rights) == -1 && - errno != ENOSYS) + if (caph_rights_limit(vm_get_device_fd(ctx), &rights) == -1) errx(EX_OSERR, "Unable to apply rights for sandbox"); vm_get_ioctls(&ncmds); cmds = vm_get_ioctls(NULL); if (cmds == NULL) errx(EX_OSERR, "out of memory"); - if (cap_ioctls_limit(vm_get_device_fd(ctx), cmds, ncmds) == -1 && - errno != ENOSYS) + if (caph_ioctls_limit(vm_get_device_fd(ctx), cmds, ncmds) == -1) errx(EX_OSERR, "Unable to apply rights for sandbox"); free((cap_ioctl_t *)cmds); #endif Modified: head/usr.sbin/bhyve/block_if.c ============================================================================== --- head/usr.sbin/bhyve/block_if.c Tue Jan 15 23:37:49 2019 (r343067) +++ head/usr.sbin/bhyve/block_if.c Wed Jan 16 00:39:23 2019 (r343068) @@ -42,6 +42,9 @@ __FBSDID("$FreeBSD$"); #include #include +#ifndef WITHOUT_CAPSICUM +#include +#endif #include #include #include @@ -473,7 +476,7 @@ blockif_open(const char *optstr, const char *ident) if (ro) cap_rights_clear(&rights, CAP_FSYNC, CAP_WRITE); - if (cap_rights_limit(fd, &rights) == -1 && errno != ENOSYS) + if (caph_rights_limit(fd, &rights) == -1) errx(EX_OSERR, "Unable to apply rights for sandbox"); #endif @@ -504,7 +507,7 @@ blockif_open(const char *optstr, const char *ident) psectsz = sbuf.st_blksize; #ifndef WITHOUT_CAPSICUM - if (cap_ioctls_limit(fd, cmds, nitems(cmds)) == -1 && errno != ENOSYS) + if (caph_ioctls_limit(fd, cmds, nitems(cmds)) == -1) errx(EX_OSERR, "Unable to apply rights for sandbox"); #endif Modified: head/usr.sbin/bhyve/consport.c ============================================================================== --- head/usr.sbin/bhyve/consport.c Tue Jan 15 23:37:49 2019 (r343067) +++ head/usr.sbin/bhyve/consport.c Wed Jan 16 00:39:23 2019 (r343068) @@ -37,6 +37,9 @@ __FBSDID("$FreeBSD$"); #endif #include +#ifndef WITHOUT_CAPSICUM +#include +#endif #include #include #include @@ -138,11 +141,9 @@ console_handler(struct vmctx *ctx, int vcpu, int in, i #ifndef WITHOUT_CAPSICUM cap_rights_init(&rights, CAP_EVENT, CAP_IOCTL, CAP_READ, CAP_WRITE); - if (cap_rights_limit(STDIN_FILENO, &rights) == -1 && - errno != ENOSYS) + if (caph_rights_limit(STDIN_FILENO, &rights) == -1) errx(EX_OSERR, "Unable to apply rights for sandbox"); - if (cap_ioctls_limit(STDIN_FILENO, cmds, nitems(cmds)) == -1 && - errno != ENOSYS) + if (caph_ioctls_limit(STDIN_FILENO, cmds, nitems(cmds)) == -1) errx(EX_OSERR, "Unable to apply rights for sandbox"); #endif ttyopen(); Modified: head/usr.sbin/bhyve/dbgport.c ============================================================================== --- head/usr.sbin/bhyve/dbgport.c Tue Jan 15 23:37:49 2019 (r343067) +++ head/usr.sbin/bhyve/dbgport.c Wed Jan 16 00:39:23 2019 (r343068) @@ -40,6 +40,9 @@ __FBSDID("$FreeBSD$"); #include #include +#ifndef WITHOUT_CAPSICUM +#include +#endif #include #include #include @@ -167,7 +170,7 @@ init_dbgport(int sport) #ifndef WITHOUT_CAPSICUM cap_rights_init(&rights, CAP_ACCEPT, CAP_READ, CAP_WRITE); - if (cap_rights_limit(listen_fd, &rights) == -1 && errno != ENOSYS) + if (caph_rights_limit(listen_fd, &rights) == -1) errx(EX_OSERR, "Unable to apply rights for sandbox"); #endif Modified: head/usr.sbin/bhyve/gdb.c ============================================================================== --- head/usr.sbin/bhyve/gdb.c Tue Jan 15 23:37:49 2019 (r343067) +++ head/usr.sbin/bhyve/gdb.c Wed Jan 16 00:39:23 2019 (r343068) @@ -1252,9 +1252,9 @@ limit_gdb_socket(int s) cap_rights_init(&rights, CAP_ACCEPT, CAP_EVENT, CAP_READ, CAP_WRITE, CAP_SETSOCKOPT, CAP_IOCTL); - if (cap_rights_limit(s, &rights) == -1 && errno != ENOSYS) + if (caph_rights_limit(s, &rights) == -1) errx(EX_OSERR, "Unable to apply rights for sandbox"); - if (cap_ioctls_limit(s, ioctls, nitems(ioctls)) == -1 && errno != ENOSYS) + if (caph_ioctls_limit(s, ioctls, nitems(ioctls)) == -1) errx(EX_OSERR, "Unable to apply rights for sandbox"); } #endif Modified: head/usr.sbin/bhyve/mevent.c ============================================================================== --- head/usr.sbin/bhyve/mevent.c Tue Jan 15 23:37:49 2019 (r343067) +++ head/usr.sbin/bhyve/mevent.c Wed Jan 16 00:39:23 2019 (r343068) @@ -37,6 +37,9 @@ __FBSDID("$FreeBSD$"); #include +#ifndef WITHOUT_CAPSICUM +#include +#endif #include #include #include @@ -420,7 +423,7 @@ mevent_dispatch(void) #ifndef WITHOUT_CAPSICUM cap_rights_init(&rights, CAP_KQUEUE); - if (cap_rights_limit(mfd, &rights) == -1 && errno != ENOSYS) + if (caph_rights_limit(mfd, &rights) == -1) errx(EX_OSERR, "Unable to apply rights for sandbox"); #endif @@ -437,9 +440,9 @@ mevent_dispatch(void) #ifndef WITHOUT_CAPSICUM cap_rights_init(&rights, CAP_EVENT, CAP_READ, CAP_WRITE); - if (cap_rights_limit(mevent_pipefd[0], &rights) == -1 && errno != ENOSYS) + if (caph_rights_limit(mevent_pipefd[0], &rights) == -1) errx(EX_OSERR, "Unable to apply rights for sandbox"); - if (cap_rights_limit(mevent_pipefd[1], &rights) == -1 && errno != ENOSYS) + if (caph_rights_limit(mevent_pipefd[1], &rights) == -1) errx(EX_OSERR, "Unable to apply rights for sandbox"); #endif Modified: head/usr.sbin/bhyve/pci_e82545.c ============================================================================== --- head/usr.sbin/bhyve/pci_e82545.c Tue Jan 15 23:37:49 2019 (r343067) +++ head/usr.sbin/bhyve/pci_e82545.c Wed Jan 16 00:39:23 2019 (r343068) @@ -43,6 +43,9 @@ __FBSDID("$FreeBSD$"); #include #include +#ifndef WITHOUT_CAPSICUM +#include +#endif #include #include #include @@ -2240,7 +2243,7 @@ e82545_open_tap(struct e82545_softc *sc, char *opts) #ifndef WITHOUT_CAPSICUM cap_rights_init(&rights, CAP_EVENT, CAP_READ, CAP_WRITE); - if (cap_rights_limit(sc->esc_tapfd, &rights) == -1 && errno != ENOSYS) + if (caph_rights_limit(sc->esc_tapfd, &rights) == -1) errx(EX_OSERR, "Unable to apply rights for sandbox"); #endif Modified: head/usr.sbin/bhyve/pci_passthru.c ============================================================================== --- head/usr.sbin/bhyve/pci_passthru.c Tue Jan 15 23:37:49 2019 (r343067) +++ head/usr.sbin/bhyve/pci_passthru.c Wed Jan 16 00:39:23 2019 (r343068) @@ -45,6 +45,9 @@ __FBSDID("$FreeBSD$"); #include +#ifndef WITHOUT_CAPSICUM +#include +#endif #include #include #include @@ -674,9 +677,9 @@ passthru_init(struct vmctx *ctx, struct pci_devinst *p } #ifndef WITHOUT_CAPSICUM - if (cap_rights_limit(pcifd, &rights) == -1 && errno != ENOSYS) + if (caph_rights_limit(pcifd, &rights) == -1) errx(EX_OSERR, "Unable to apply rights for sandbox"); - if (cap_ioctls_limit(pcifd, pci_ioctls, nitems(pci_ioctls)) == -1 && errno != ENOSYS) + if (caph_ioctls_limit(pcifd, pci_ioctls, nitems(pci_ioctls)) == -1) errx(EX_OSERR, "Unable to apply rights for sandbox"); #endif @@ -689,9 +692,9 @@ passthru_init(struct vmctx *ctx, struct pci_devinst *p } #ifndef WITHOUT_CAPSICUM - if (cap_rights_limit(iofd, &rights) == -1 && errno != ENOSYS) + if (caph_rights_limit(iofd, &rights) == -1) errx(EX_OSERR, "Unable to apply rights for sandbox"); - if (cap_ioctls_limit(iofd, io_ioctls, nitems(io_ioctls)) == -1 && errno != ENOSYS) + if (caph_ioctls_limit(iofd, io_ioctls, nitems(io_ioctls)) == -1) errx(EX_OSERR, "Unable to apply rights for sandbox"); #endif @@ -706,7 +709,7 @@ passthru_init(struct vmctx *ctx, struct pci_devinst *p #ifndef WITHOUT_CAPSICUM cap_rights_clear(&rights, CAP_IOCTL); cap_rights_set(&rights, CAP_MMAP_RW); - if (cap_rights_limit(memfd, &rights) == -1 && errno != ENOSYS) + if (caph_rights_limit(memfd, &rights) == -1) errx(EX_OSERR, "Unable to apply rights for sandbox"); #endif Modified: head/usr.sbin/bhyve/pci_virtio_console.c ============================================================================== --- head/usr.sbin/bhyve/pci_virtio_console.c Tue Jan 15 23:37:49 2019 (r343067) +++ head/usr.sbin/bhyve/pci_virtio_console.c Wed Jan 16 00:39:23 2019 (r343068) @@ -43,6 +43,9 @@ __FBSDID("$FreeBSD$"); #include #include +#ifndef WITHOUT_CAPSICUM +#include +#endif #include #include #include @@ -328,7 +331,7 @@ pci_vtcon_sock_add(struct pci_vtcon_softc *sc, const c #ifndef WITHOUT_CAPSICUM cap_rights_init(&rights, CAP_ACCEPT, CAP_EVENT, CAP_READ, CAP_WRITE); - if (cap_rights_limit(s, &rights) == -1 && errno != ENOSYS) + if (caph_rights_limit(s, &rights) == -1) errx(EX_OSERR, "Unable to apply rights for sandbox"); #endif Modified: head/usr.sbin/bhyve/pci_virtio_net.c ============================================================================== --- head/usr.sbin/bhyve/pci_virtio_net.c Tue Jan 15 23:37:49 2019 (r343067) +++ head/usr.sbin/bhyve/pci_virtio_net.c Wed Jan 16 00:39:23 2019 (r343068) @@ -46,6 +46,9 @@ __FBSDID("$FreeBSD$"); #endif #include +#ifndef WITHOUT_CAPSICUM +#include +#endif #include #include #include @@ -779,7 +782,7 @@ pci_vtnet_tap_setup(struct pci_vtnet_softc *sc, char * #ifndef WITHOUT_CAPSICUM cap_rights_init(&rights, CAP_EVENT, CAP_READ, CAP_WRITE); - if (cap_rights_limit(sc->vsc_tapfd, &rights) == -1 && errno != ENOSYS) + if (caph_rights_limit(sc->vsc_tapfd, &rights) == -1) errx(EX_OSERR, "Unable to apply rights for sandbox"); #endif Modified: head/usr.sbin/bhyve/pci_virtio_rnd.c ============================================================================== --- head/usr.sbin/bhyve/pci_virtio_rnd.c Tue Jan 15 23:37:49 2019 (r343067) +++ head/usr.sbin/bhyve/pci_virtio_rnd.c Wed Jan 16 00:39:23 2019 (r343068) @@ -43,6 +43,9 @@ __FBSDID("$FreeBSD$"); #include #include +#ifndef WITHOUT_CAPSICUM +#include +#endif #include #include #include @@ -158,7 +161,7 @@ pci_vtrnd_init(struct vmctx *ctx, struct pci_devinst * #ifndef WITHOUT_CAPSICUM cap_rights_init(&rights, CAP_READ); - if (cap_rights_limit(fd, &rights) == -1 && errno != ENOSYS) + if (caph_rights_limit(fd, &rights) == -1) errx(EX_OSERR, "Unable to apply rights for sandbox"); #endif Modified: head/usr.sbin/bhyve/rfb.c ============================================================================== --- head/usr.sbin/bhyve/rfb.c Tue Jan 15 23:37:49 2019 (r343067) +++ head/usr.sbin/bhyve/rfb.c Wed Jan 16 00:39:23 2019 (r343068) @@ -45,6 +45,9 @@ __FBSDID("$FreeBSD$"); #include #include +#ifndef WITHOUT_CAPSICUM +#include +#endif #include #include #include @@ -1024,7 +1027,7 @@ rfb_init(char *hostname, int port, int wait, char *pas #ifndef WITHOUT_CAPSICUM cap_rights_init(&rights, CAP_ACCEPT, CAP_EVENT, CAP_READ, CAP_WRITE); - if (cap_rights_limit(rc->sfd, &rights) == -1 && errno != ENOSYS) + if (caph_rights_limit(rc->sfd, &rights) == -1) errx(EX_OSERR, "Unable to apply rights for sandbox"); #endif Modified: head/usr.sbin/bhyve/uart_emul.c ============================================================================== --- head/usr.sbin/bhyve/uart_emul.c Tue Jan 15 23:37:49 2019 (r343067) +++ head/usr.sbin/bhyve/uart_emul.c Wed Jan 16 00:39:23 2019 (r343068) @@ -684,14 +684,12 @@ uart_set_backend(struct uart_softc *sc, const char *op #ifndef WITHOUT_CAPSICUM cap_rights_init(&rights, CAP_EVENT, CAP_IOCTL, CAP_READ, CAP_WRITE); - if (cap_rights_limit(sc->tty.fd, &rights) == -1 && - errno != ENOSYS) + if (caph_rights_limit(sc->tty.fd, &rights) == -1) errx(EX_OSERR, "Unable to apply rights for sandbox"); - if (cap_ioctls_limit(sc->tty.fd, cmds, nitems(cmds)) == -1 && - errno != ENOSYS) + if (caph_ioctls_limit(sc->tty.fd, cmds, nitems(cmds)) == -1) errx(EX_OSERR, "Unable to apply rights for sandbox"); if (!uart_stdio) { - if (caph_limit_stdin() == -1 && errno != ENOSYS) + if (caph_limit_stdin() == -1) errx(EX_OSERR, "Unable to apply rights for sandbox"); } From owner-svn-src-all@freebsd.org Wed Jan 16 01:08:36 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 6D8FB149CF09; Wed, 16 Jan 2019 01:08:36 +0000 (UTC) (envelope-from gonzo@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 0C00A83E1E; Wed, 16 Jan 2019 01:08:36 +0000 (UTC) (envelope-from gonzo@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id F028722E5B; Wed, 16 Jan 2019 01:08:35 +0000 (UTC) (envelope-from gonzo@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x0G18Z0W047885; Wed, 16 Jan 2019 01:08:35 GMT (envelope-from gonzo@FreeBSD.org) Received: (from gonzo@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x0G18ZRn047882; Wed, 16 Jan 2019 01:08:35 GMT (envelope-from gonzo@FreeBSD.org) Message-Id: <201901160108.x0G18ZRn047882@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gonzo set sender to gonzo@FreeBSD.org using -f From: Oleksandr Tymoshenko Date: Wed, 16 Jan 2019 01:08:35 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r343069 - in head/sys: arm64/conf dts/arm/overlays dts/arm64/overlays modules/dtb/rpi X-SVN-Group: head X-SVN-Commit-Author: gonzo X-SVN-Commit-Paths: in head/sys: arm64/conf dts/arm/overlays dts/arm64/overlays modules/dtb/rpi X-SVN-Commit-Revision: 343069 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 0C00A83E1E X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.95 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_SHORT(-0.95)[-0.952,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_LONG(-1.00)[-0.999,0] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 16 Jan 2019 01:08:36 -0000 Author: gonzo Date: Wed Jan 16 01:08:34 2019 New Revision: 343069 URL: https://svnweb.freebsd.org/changeset/base/343069 Log: [rpi] Reorganize spigen(4) overlays for Raspberry Pi - Remove CS=2 entry from spigen-rpi2 since it didn't work - Add spigen-rpi3 overlay for Raspberry Pi 3 - Enable rpi overlay modules for GENERIC kernel on aarch64 PR: 233489 Submitted by: bobf@mrp3.com Reviewed by: db MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D16088 Added: head/sys/dts/arm64/overlays/spigen-rpi3.dtso (contents, props changed) Modified: head/sys/arm64/conf/GENERIC head/sys/dts/arm/overlays/spigen-rpi2.dtso head/sys/modules/dtb/rpi/Makefile Modified: head/sys/arm64/conf/GENERIC ============================================================================== --- head/sys/arm64/conf/GENERIC Wed Jan 16 00:39:23 2019 (r343068) +++ head/sys/arm64/conf/GENERIC Wed Jan 16 01:08:34 2019 (r343069) @@ -296,4 +296,4 @@ options FDT device acpi # DTBs -makeoptions MODULES_EXTRA="dtb/allwinner dtb/rockchip" +makeoptions MODULES_EXTRA="dtb/allwinner dtb/rockchip dtb/rpi" Modified: head/sys/dts/arm/overlays/spigen-rpi2.dtso ============================================================================== --- head/sys/dts/arm/overlays/spigen-rpi2.dtso Wed Jan 16 00:39:23 2019 (r343068) +++ head/sys/dts/arm/overlays/spigen-rpi2.dtso Wed Jan 16 01:08:34 2019 (r343069) @@ -12,6 +12,7 @@ spigen0: spigen0 { compatible = "freebsd,spigen"; reg = <0>; + spi-max-frequency = <500000>; /* Req'd property, override with spi(8) */ status = "okay"; }; spigen1: spigen1 { @@ -20,20 +21,10 @@ spi-max-frequency = <500000>; /* Req'd property, override with spi(8) */ status = "okay"; }; - spigen2: spigen2 { - compatible = "freebsd,spigen"; - reg = <2>; - spi-max-frequency = <500000>; /* Req'd property, override with spi(8) */ - status = "okay"; - }; }; &{/soc/gpio@7e200000/spi0_cs_pins} { - brcm,pins = <8 7 16>; + brcm,pins = <8 7>; brcm,function = <4>; /* ALT0 */ -}; - -&{/soc/gpio@7e200000/spi0_gpio7} { - brcm,pins = <7 8 16 9 10 11>; }; Added: head/sys/dts/arm64/overlays/spigen-rpi3.dtso ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/dts/arm64/overlays/spigen-rpi3.dtso Wed Jan 16 01:08:34 2019 (r343069) @@ -0,0 +1,30 @@ +/* $FreeBSD$ */ + +/dts-v1/; +/plugin/; + +/ { + compatible = "brcm,bcm2837"; +}; + +&{/soc/spi@7e204000} { + status = "okay"; + spigen0: spigen0 { + compatible = "freebsd,spigen"; + reg = <0>; + spi-max-frequency = <500000>; /* Req'd property, override with spi(8) */ + status = "okay"; + }; + spigen1: spigen1 { + compatible = "freebsd,spigen"; + reg = <1>; + spi-max-frequency = <500000>; /* Req'd property, override with spi(8) */ + status = "okay"; + }; +}; + +&{/soc/gpio@7e200000/spi0_cs_pins} { + brcm,pins = <8 7>; + brcm,function = <4>; /* ALT0 */ +}; + Modified: head/sys/modules/dtb/rpi/Makefile ============================================================================== --- head/sys/modules/dtb/rpi/Makefile Wed Jan 16 00:39:23 2019 (r343068) +++ head/sys/modules/dtb/rpi/Makefile Wed Jan 16 01:08:34 2019 (r343069) @@ -1,7 +1,12 @@ # $FreeBSD$ # DTS files for the Raspberry Pi-B +.if ${MACHINE_ARCH:Marmv[67]*} != "" DTSO= \ spigen-rpi-b.dtso \ - spigen-rpi2.dtso \ + spigen-rpi2.dtso +.elif ${MACHINE_ARCH} == "aarch64" +DTSO= \ + spigen-rpi3.dtso +.endif .include From owner-svn-src-all@freebsd.org Wed Jan 16 01:32:43 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id EA404149D919; Wed, 16 Jan 2019 01:32:42 +0000 (UTC) (envelope-from cperciva@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 8FA2B84DBD; Wed, 16 Jan 2019 01:32:42 +0000 (UTC) (envelope-from cperciva@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 80A2023388; Wed, 16 Jan 2019 01:32:42 +0000 (UTC) (envelope-from cperciva@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x0G1Wg7a063757; Wed, 16 Jan 2019 01:32:42 GMT (envelope-from cperciva@FreeBSD.org) Received: (from cperciva@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x0G1Wg2M063756; Wed, 16 Jan 2019 01:32:42 GMT (envelope-from cperciva@FreeBSD.org) Message-Id: <201901160132.x0G1Wg2M063756@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: cperciva set sender to cperciva@FreeBSD.org using -f From: Colin Percival Date: Wed, 16 Jan 2019 01:32: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: r343070 - stable/12/release/tools X-SVN-Group: stable-12 X-SVN-Commit-Author: cperciva X-SVN-Commit-Paths: stable/12/release/tools X-SVN-Commit-Revision: 343070 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 8FA2B84DBD X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.94 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_SHORT(-0.95)[-0.946,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_LONG(-1.00)[-0.999,0] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 16 Jan 2019 01:32:43 -0000 Author: cperciva Date: Wed Jan 16 01:32:42 2019 New Revision: 343070 URL: https://svnweb.freebsd.org/changeset/base/343070 Log: MFC r342875: Turn off ec2_ephemeralswap for now PR: 234686 Modified: stable/12/release/tools/ec2.conf Directory Properties: stable/12/ (props changed) Modified: stable/12/release/tools/ec2.conf ============================================================================== --- stable/12/release/tools/ec2.conf Wed Jan 16 01:08:34 2019 (r343069) +++ stable/12/release/tools/ec2.conf Wed Jan 16 01:32:42 2019 (r343070) @@ -9,7 +9,7 @@ export VM_EXTRA_PACKAGES="ec2-scripts firstboot-freebsd-update firstboot-pkgs dual-dhclient amazon-ssm-agent" # Set to a list of third-party software to enable in rc.conf(5). -export VM_RC_LIST="ec2_configinit ec2_fetchkey ec2_ephemeralswap ec2_loghostkey firstboot_freebsd_update firstboot_pkgs ntpd" +export VM_RC_LIST="ec2_configinit ec2_fetchkey ec2_loghostkey firstboot_freebsd_update firstboot_pkgs ntpd" # Build with a 3 GB UFS partition; the growfs rc.d script will expand # the partition to fill the root disk after the EC2 instance is launched. From owner-svn-src-all@freebsd.org Wed Jan 16 01:54:05 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 33901149E34B; Wed, 16 Jan 2019 01:54:05 +0000 (UTC) (envelope-from mw@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 B3D21857DF; Wed, 16 Jan 2019 01:54:04 +0000 (UTC) (envelope-from mw@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1: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 A40DC236F7; Wed, 16 Jan 2019 01:54:04 +0000 (UTC) (envelope-from mw@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x0G1s4OB074244; Wed, 16 Jan 2019 01:54:04 GMT (envelope-from mw@FreeBSD.org) Received: (from mw@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x0G1s4WG074243; Wed, 16 Jan 2019 01:54:04 GMT (envelope-from mw@FreeBSD.org) Message-Id: <201901160154.x0G1s4WG074243@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mw set sender to mw@FreeBSD.org using -f From: Marcin Wojtas Date: Wed, 16 Jan 2019 01:54:04 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r343071 - vendor-sys/ena-com/dist X-SVN-Group: vendor-sys X-SVN-Commit-Author: mw X-SVN-Commit-Paths: vendor-sys/ena-com/dist X-SVN-Commit-Revision: 343071 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: B3D21857DF X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.95 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_LONG(-1.00)[-0.999,0]; NEURAL_HAM_SHORT(-0.95)[-0.950,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 16 Jan 2019 01:54:05 -0000 Author: mw Date: Wed Jan 16 01:54:04 2019 New Revision: 343071 URL: https://svnweb.freebsd.org/changeset/base/343071 Log: Suppress excessive print in ENA HAL In FreeBSD, this is normal situation that the Tx ring is being full. In that case, the packet is put back into drbr and the next attempt to send it is taken after the cleanup. Too much logs like this can cause system instability and even cause the device reset (because keep alive or cleanup could be missed). To fix that, the log level of this message is changed to debug. Submitted by: Michal Krawczyk Obtained from: Semihalf Sponsored by: Amazon, Inc. Modified: vendor-sys/ena-com/dist/ena_eth_com.c Modified: vendor-sys/ena-com/dist/ena_eth_com.c ============================================================================== --- vendor-sys/ena-com/dist/ena_eth_com.c Wed Jan 16 01:32:42 2019 (r343070) +++ vendor-sys/ena-com/dist/ena_eth_com.c Wed Jan 16 01:54:04 2019 (r343071) @@ -386,7 +386,7 @@ int ena_com_prepare_tx(struct ena_com_io_sq *io_sq, /* num_bufs +1 for potential meta desc */ if (!ena_com_sq_have_enough_space(io_sq, num_bufs + 1)) { - ena_trc_err("Not enough space in the tx queue\n"); + ena_trc_dbg("Not enough space in the tx queue\n"); return ENA_COM_NO_MEM; } From owner-svn-src-all@freebsd.org Wed Jan 16 01:58:22 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 5DCA5149E4EC; Wed, 16 Jan 2019 01:58:22 +0000 (UTC) (envelope-from mw@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 03FEF85A68; Wed, 16 Jan 2019 01:58:22 +0000 (UTC) (envelope-from mw@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1: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 D0D54236FB; Wed, 16 Jan 2019 01:58:21 +0000 (UTC) (envelope-from mw@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x0G1wLVC074475; Wed, 16 Jan 2019 01:58:21 GMT (envelope-from mw@FreeBSD.org) Received: (from mw@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x0G1wLYU074474; Wed, 16 Jan 2019 01:58:21 GMT (envelope-from mw@FreeBSD.org) Message-Id: <201901160158.x0G1wLYU074474@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mw set sender to mw@FreeBSD.org using -f From: Marcin Wojtas Date: Wed, 16 Jan 2019 01:58:21 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r343072 - vendor-sys/ena-com/1.1.4.6 X-SVN-Group: vendor-sys X-SVN-Commit-Author: mw X-SVN-Commit-Paths: vendor-sys/ena-com/1.1.4.6 X-SVN-Commit-Revision: 343072 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 03FEF85A68 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.95 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_SHORT(-0.95)[-0.949,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_LONG(-1.00)[-0.999,0] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 16 Jan 2019 01:58:22 -0000 Author: mw Date: Wed Jan 16 01:58:21 2019 New Revision: 343072 URL: https://svnweb.freebsd.org/changeset/base/343072 Log: Create 1.1.4.6 tag in ena-com Tag is added after applying fix to ENA HAL code in r343071. Obtained from: Semihalf Sponsored by: Amazon, Inc. Added: vendor-sys/ena-com/1.1.4.6/ - copied from r343071, vendor-sys/ena-com/dist/ From owner-svn-src-all@freebsd.org Wed Jan 16 02:05:43 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id CE05E149E96E; Wed, 16 Jan 2019 02:05:43 +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 762A085FC3; Wed, 16 Jan 2019 02:05:43 +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 50BF0238A3; Wed, 16 Jan 2019 02:05:43 +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 x0G25h9L079389; Wed, 16 Jan 2019 02:05:43 GMT (envelope-from cy@FreeBSD.org) Received: (from cy@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x0G25hkr079388; Wed, 16 Jan 2019 02:05:43 GMT (envelope-from cy@FreeBSD.org) Message-Id: <201901160205.x0G25hkr079388@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: cy set sender to cy@FreeBSD.org using -f From: Cy Schubert Date: Wed, 16 Jan 2019 02:05:43 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r343073 - head/contrib/ipfilter X-SVN-Group: head X-SVN-Commit-Author: cy X-SVN-Commit-Paths: head/contrib/ipfilter X-SVN-Commit-Revision: 343073 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 762A085FC3 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.95 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_LONG(-1.00)[-0.999,0]; NEURAL_HAM_SHORT(-0.95)[-0.949,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 16 Jan 2019 02:05:44 -0000 Author: cy Date: Wed Jan 16 02:05:42 2019 New Revision: 343073 URL: https://svnweb.freebsd.org/changeset/base/343073 Log: Remove an IRIX-only source file. MFC after: 1 week Deleted: head/contrib/ipfilter/mli_ipl.c From owner-svn-src-all@freebsd.org Wed Jan 16 02:13:24 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 486F5149EC03; Wed, 16 Jan 2019 02:13:24 +0000 (UTC) (envelope-from mw@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 D816386417; Wed, 16 Jan 2019 02:13:22 +0000 (UTC) (envelope-from mw@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1: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 AE12D23A5B; Wed, 16 Jan 2019 02:13:22 +0000 (UTC) (envelope-from mw@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x0G2DML6084507; Wed, 16 Jan 2019 02:13:22 GMT (envelope-from mw@FreeBSD.org) Received: (from mw@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x0G2DMtW084504; Wed, 16 Jan 2019 02:13:22 GMT (envelope-from mw@FreeBSD.org) Message-Id: <201901160213.x0G2DMtW084504@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mw set sender to mw@FreeBSD.org using -f From: Marcin Wojtas Date: Wed, 16 Jan 2019 02:13:22 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r343074 - in head/sys: contrib/ena-com dev/ena X-SVN-Group: head X-SVN-Commit-Author: mw X-SVN-Commit-Paths: in head/sys: contrib/ena-com dev/ena X-SVN-Commit-Revision: 343074 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: D816386417 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.97 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_LONG(-1.00)[-0.999,0]; NEURAL_HAM_SHORT(-0.97)[-0.972,0] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 16 Jan 2019 02:13:24 -0000 Author: mw Date: Wed Jan 16 02:13:21 2019 New Revision: 343074 URL: https://svnweb.freebsd.org/changeset/base/343074 Log: Suppress excessive error prints in ENA TX hotpath In FreeBSD, this is normal situation that the Tx ring is being full. In hat case, the packet is put back into drbr and the next attempt to send it is taken after the cleanup. Too much logs like this can cause system instability and even cause the device reset (because keep alive or cleanup could be missed). To fix that, the log level of this message is changed to debug. Upon this change upgrade the driver version to v0.8.2. Submitted by: Michal Krawczyk Obtained from: Semihalf Sponsored by: Amazon, Inc. Modified: head/sys/contrib/ena-com/ena_eth_com.c head/sys/dev/ena/ena.c head/sys/dev/ena/ena.h Directory Properties: head/sys/contrib/ena-com/ (props changed) Modified: head/sys/contrib/ena-com/ena_eth_com.c ============================================================================== --- head/sys/contrib/ena-com/ena_eth_com.c Wed Jan 16 02:05:42 2019 (r343073) +++ head/sys/contrib/ena-com/ena_eth_com.c Wed Jan 16 02:13:21 2019 (r343074) @@ -386,7 +386,7 @@ int ena_com_prepare_tx(struct ena_com_io_sq *io_sq, /* num_bufs +1 for potential meta desc */ if (!ena_com_sq_have_enough_space(io_sq, num_bufs + 1)) { - ena_trc_err("Not enough space in the tx queue\n"); + ena_trc_dbg("Not enough space in the tx queue\n"); return ENA_COM_NO_MEM; } Modified: head/sys/dev/ena/ena.c ============================================================================== --- head/sys/dev/ena/ena.c Wed Jan 16 02:05:42 2019 (r343073) +++ head/sys/dev/ena/ena.c Wed Jan 16 02:13:21 2019 (r343074) @@ -2813,7 +2813,7 @@ ena_xmit_mbuf(struct ena_ring *tx_ring, struct mbuf ** /* Prepare the packet's descriptors and send them to device */ rc = ena_com_prepare_tx(io_sq, &ena_tx_ctx, &nb_hw_desc); if (unlikely(rc != 0)) { - device_printf(adapter->pdev, "failed to prepare tx bufs\n"); + ena_trace(ENA_DBG | ENA_TXPTH, "failed to prepare tx bufs\n"); counter_u64_add(tx_ring->tx_stats.prepare_ctx_err, 1); goto dma_error; } Modified: head/sys/dev/ena/ena.h ============================================================================== --- head/sys/dev/ena/ena.h Wed Jan 16 02:05:42 2019 (r343073) +++ head/sys/dev/ena/ena.h Wed Jan 16 02:13:21 2019 (r343074) @@ -41,7 +41,7 @@ #define DRV_MODULE_VER_MAJOR 0 #define DRV_MODULE_VER_MINOR 8 -#define DRV_MODULE_VER_SUBMINOR 1 +#define DRV_MODULE_VER_SUBMINOR 2 #define DRV_MODULE_NAME "ena" From owner-svn-src-all@freebsd.org Wed Jan 16 02:19:06 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 291C0149ECDE; Wed, 16 Jan 2019 02:19:06 +0000 (UTC) (envelope-from cem@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 9969A865B3; Wed, 16 Jan 2019 02:19:05 +0000 (UTC) (envelope-from cem@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 87E2323A5D; Wed, 16 Jan 2019 02:19:05 +0000 (UTC) (envelope-from cem@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x0G2J5X8084789; Wed, 16 Jan 2019 02:19:05 GMT (envelope-from cem@FreeBSD.org) Received: (from cem@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x0G2J4WZ084786; Wed, 16 Jan 2019 02:19:04 GMT (envelope-from cem@FreeBSD.org) Message-Id: <201901160219.x0G2J4WZ084786@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: cem set sender to cem@FreeBSD.org using -f From: Conrad Meyer Date: Wed, 16 Jan 2019 02:19:04 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r343075 - in head/sys: amd64/vmm x86/x86 X-SVN-Group: head X-SVN-Commit-Author: cem X-SVN-Commit-Paths: in head/sys: amd64/vmm x86/x86 X-SVN-Commit-Revision: 343075 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 9969A865B3 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.97 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_SHORT(-0.97)[-0.973,0]; NEURAL_HAM_LONG(-1.00)[-0.999,0] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 16 Jan 2019 02:19:06 -0000 Author: cem Date: Wed Jan 16 02:19:04 2019 New Revision: 343075 URL: https://svnweb.freebsd.org/changeset/base/343075 Log: vmm(4): Take steps towards multicore bhyve AMD support vmm's CPUID emulation presented Intel topology information to the guest, but disabled AMD topology information and in some cases passed through garbage. I.e., CPUID leaves 0x8000_001[de] were passed through to the guest, but guest CPUs can migrate between host threads, so the information presented was not consistent. This could easily be observed with 'cpucontrol -i 0xfoo /dev/cpuctl0'. Slightly improve this situation by enabling the AMD topology feature flag and presenting at least the CPUID fields used by FreeBSD itself to probe topology on more modern AMD64 hardware (Family 15h+). Older stuff is probably less interesting. I have not been able to empirically confirm it is sufficient, but it should not regress anything either. Reviewed by: araujo (previous version) Relnotes: sure Modified: head/sys/amd64/vmm/x86.c head/sys/amd64/vmm/x86.h head/sys/x86/x86/mp_x86.c Modified: head/sys/amd64/vmm/x86.c ============================================================================== --- head/sys/amd64/vmm/x86.c Wed Jan 16 02:13:21 2019 (r343074) +++ head/sys/amd64/vmm/x86.c Wed Jan 16 02:19:04 2019 (r343075) @@ -136,18 +136,23 @@ x86_emulate_cpuid(struct vm *vm, int vcpu_id, case CPUID_8000_0008: cpuid_count(*eax, *ecx, regs); if (vmm_is_amd()) { + vm_get_topology(vm, &sockets, &cores, &threads, + &maxcpus); /* - * XXX this might appear silly because AMD - * cpus don't have threads. + * Here, width is ApicIdCoreIdSize, present on + * at least Family 15h and newer. It + * represents the "number of bits in the + * initial apicid that indicate thread id + * within a package." * - * However this matches the logical cpus as - * advertised by leaf 0x1 and will work even - * if threads is set incorrectly on an AMD host. + * Our topo_probe_amd() uses it for + * pkg_id_shift and other OSes may rely on it. */ - vm_get_topology(vm, &sockets, &cores, &threads, - &maxcpus); - logical_cpus = threads * cores; - regs[2] = logical_cpus - 1; + width = MIN(0xF, log2(threads * cores)); + if (width < 0x4) + width = 0; + logical_cpus = MIN(0xFF, threads * cores - 1); + regs[2] = (width << AMDID_COREID_SIZE_SHIFT) | logical_cpus; } break; @@ -155,9 +160,9 @@ x86_emulate_cpuid(struct vm *vm, int vcpu_id, cpuid_count(*eax, *ecx, regs); /* - * Hide SVM and Topology Extension features from guest. + * Hide SVM from guest. */ - regs[2] &= ~(AMDID2_SVM | AMDID2_TOPOLOGY); + regs[2] &= ~AMDID2_SVM; /* * Don't advertise extended performance counter MSRs @@ -219,6 +224,68 @@ x86_emulate_cpuid(struct vm *vm, int vcpu_id, regs[3] |= AMDPM_TSC_INVARIANT; break; + case CPUID_8000_001D: + /* AMD Cache topology, like 0000_0004 for Intel. */ + if (!vmm_is_amd()) + goto default_leaf; + + /* + * Similar to Intel, generate a ficticious cache + * topology for the guest with L3 shared by the + * package, and L1 and L2 local to a core. + */ + vm_get_topology(vm, &sockets, &cores, &threads, + &maxcpus); + switch (*ecx) { + case 0: + logical_cpus = threads; + level = 1; + func = 1; /* data cache */ + break; + case 1: + logical_cpus = threads; + level = 2; + func = 3; /* unified cache */ + break; + case 2: + logical_cpus = threads * cores; + level = 3; + func = 3; /* unified cache */ + break; + default: + logical_cpus = 0; + level = 0; + func = 0; + break; + } + + logical_cpus = MIN(0xfff, logical_cpus - 1); + regs[0] = (logical_cpus << 14) | (1 << 8) | + (level << 5) | func; + regs[1] = (func > 0) ? (CACHE_LINE_SIZE - 1) : 0; + regs[2] = 0; + regs[3] = 0; + break; + + case CPUID_8000_001E: + /* AMD Family 16h+ additional identifiers */ + if (!vmm_is_amd() || CPUID_TO_FAMILY(cpu_id) < 0x16) + goto default_leaf; + + vm_get_topology(vm, &sockets, &cores, &threads, + &maxcpus); + regs[0] = vcpu_id; + threads = MIN(0xFF, threads - 1); + regs[1] = (threads << 8) | + (vcpu_id >> log2(threads + 1)); + /* + * XXX Bhyve topology cannot yet represent >1 node per + * processor. + */ + regs[2] = 0; + regs[3] = 0; + break; + case CPUID_0000_0001: do_cpuid(1, regs); @@ -359,7 +426,7 @@ x86_emulate_cpuid(struct vm *vm, int vcpu_id, CPUID_STDEXT_AVX512F | CPUID_STDEXT_AVX512PF | CPUID_STDEXT_AVX512ER | - CPUID_STDEXT_AVX512CD); + CPUID_STDEXT_AVX512CD | CPUID_STDEXT_SHA); regs[2] = 0; regs[3] = 0; @@ -391,35 +458,42 @@ x86_emulate_cpuid(struct vm *vm, int vcpu_id, case CPUID_0000_000B: /* - * Processor topology enumeration + * Intel processor topology enumeration */ - vm_get_topology(vm, &sockets, &cores, &threads, - &maxcpus); - if (*ecx == 0) { - logical_cpus = threads; - width = log2(logical_cpus); - level = CPUID_TYPE_SMT; - x2apic_id = vcpu_id; - } + if (vmm_is_intel()) { + vm_get_topology(vm, &sockets, &cores, &threads, + &maxcpus); + if (*ecx == 0) { + logical_cpus = threads; + width = log2(logical_cpus); + level = CPUID_TYPE_SMT; + x2apic_id = vcpu_id; + } - if (*ecx == 1) { - logical_cpus = threads * cores; - width = log2(logical_cpus); - level = CPUID_TYPE_CORE; - x2apic_id = vcpu_id; - } + if (*ecx == 1) { + logical_cpus = threads * cores; + width = log2(logical_cpus); + level = CPUID_TYPE_CORE; + x2apic_id = vcpu_id; + } - if (!cpuid_leaf_b || *ecx >= 2) { - width = 0; - logical_cpus = 0; - level = 0; - x2apic_id = 0; - } + if (!cpuid_leaf_b || *ecx >= 2) { + width = 0; + logical_cpus = 0; + level = 0; + x2apic_id = 0; + } - regs[0] = width & 0x1f; - regs[1] = logical_cpus & 0xffff; - regs[2] = (level << 8) | (*ecx & 0xff); - regs[3] = x2apic_id; + regs[0] = width & 0x1f; + regs[1] = logical_cpus & 0xffff; + regs[2] = (level << 8) | (*ecx & 0xff); + regs[3] = x2apic_id; + } else { + regs[0] = 0; + regs[1] = 0; + regs[2] = 0; + regs[3] = 0; + } break; case CPUID_0000_000D: @@ -481,6 +555,7 @@ x86_emulate_cpuid(struct vm *vm, int vcpu_id, break; default: +default_leaf: /* * The leaf value has already been clamped so * simply pass this through, keeping count of Modified: head/sys/amd64/vmm/x86.h ============================================================================== --- head/sys/amd64/vmm/x86.h Wed Jan 16 02:13:21 2019 (r343074) +++ head/sys/amd64/vmm/x86.h Wed Jan 16 02:19:04 2019 (r343075) @@ -49,6 +49,8 @@ #define CPUID_8000_0006 (0x80000006) #define CPUID_8000_0007 (0x80000007) #define CPUID_8000_0008 (0x80000008) +#define CPUID_8000_001D (0x8000001D) +#define CPUID_8000_001E (0x8000001E) /* * CPUID instruction Fn0000_0001: Modified: head/sys/x86/x86/mp_x86.c ============================================================================== --- head/sys/x86/x86/mp_x86.c Wed Jan 16 02:13:21 2019 (r343074) +++ head/sys/x86/x86/mp_x86.c Wed Jan 16 02:19:04 2019 (r343075) @@ -235,6 +235,7 @@ add_deterministic_cache(int type, int level, int share * - BKDG For AMD Family 10h Processors (Publication # 31116) * - BKDG For AMD Family 15h Models 00h-0Fh Processors (Publication # 42301) * - BKDG For AMD Family 16h Models 00h-0Fh Processors (Publication # 48751) + * - PPR For AMD Family 17h Models 00h-0Fh Processors (Publication # 54945) */ static void topo_probe_amd(void) From owner-svn-src-all@freebsd.org Wed Jan 16 03:07:34 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id DFA9114A03EA; Wed, 16 Jan 2019 03:07:33 +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 84D2687F59; Wed, 16 Jan 2019 03:07:33 +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 5E4F1242DE; Wed, 16 Jan 2019 03:07:33 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x0G37XqL011720; Wed, 16 Jan 2019 03:07:33 GMT (envelope-from markj@FreeBSD.org) Received: (from markj@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x0G37XAv011719; Wed, 16 Jan 2019 03:07:33 GMT (envelope-from markj@FreeBSD.org) Message-Id: <201901160307.x0G37XAv011719@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: markj set sender to markj@FreeBSD.org using -f From: Mark Johnston Date: Wed, 16 Jan 2019 03:07:33 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r343076 - in stable: 11/sys/net 12/sys/net X-SVN-Group: stable-11 X-SVN-Commit-Author: markj X-SVN-Commit-Paths: in stable: 11/sys/net 12/sys/net X-SVN-Commit-Revision: 343076 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 84D2687F59 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.97 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_SHORT(-0.97)[-0.970,0]; NEURAL_HAM_LONG(-1.00)[-0.999,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 16 Jan 2019 03:07:34 -0000 Author: markj Date: Wed Jan 16 03:07:32 2019 New Revision: 343076 URL: https://svnweb.freebsd.org/changeset/base/343076 Log: MFC r342887: Stop setting if_linkmib in vlan(4) ifnets. PR: 219472 Modified: stable/11/sys/net/if_vlan.c Directory Properties: stable/11/ (props changed) Changes in other areas also in this revision: Modified: stable/12/sys/net/if_vlan.c Directory Properties: stable/12/ (props changed) Modified: stable/11/sys/net/if_vlan.c ============================================================================== --- stable/11/sys/net/if_vlan.c Wed Jan 16 02:19:04 2019 (r343075) +++ stable/11/sys/net/if_vlan.c Wed Jan 16 03:07:32 2019 (r343076) @@ -154,7 +154,7 @@ struct vlan_mc_entry { SLIST_ENTRY(vlan_mc_entry) mc_entries; }; -struct ifvlan { +struct ifvlan { struct ifvlantrunk *ifv_trunk; struct ifnet *ifv_ifp; #define TRUNK(ifv) ((ifv)->ifv_trunk) @@ -162,28 +162,19 @@ struct ifvlan { void *ifv_cookie; int ifv_pflags; /* special flags we have set on parent */ int ifv_capenable; - struct ifv_linkmib { - int ifvm_encaplen; /* encapsulation length */ - int ifvm_mtufudge; /* MTU fudged by this much */ - int ifvm_mintu; /* min transmission unit */ - uint16_t ifvm_proto; /* encapsulation ethertype */ - uint16_t ifvm_tag; /* tag to apply on packets leaving if */ - uint16_t ifvm_vid; /* VLAN ID */ - uint8_t ifvm_pcp; /* Priority Code Point (PCP). */ - } ifv_mib; + int ifv_encaplen; /* encapsulation length */ + int ifv_mtufudge; /* MTU fudged by this much */ + int ifv_mintu; /* min transmission unit */ + uint16_t ifv_proto; /* encapsulation ethertype */ + uint16_t ifv_tag; /* tag to apply on packets leaving if */ + uint16_t ifv_vid; /* VLAN ID */ + uint8_t ifv_pcp; /* Priority Code Point (PCP). */ struct task lladdr_task; SLIST_HEAD(, vlan_mc_entry) vlan_mc_listhead; #ifndef VLAN_ARRAY LIST_ENTRY(ifvlan) ifv_list; #endif }; -#define ifv_proto ifv_mib.ifvm_proto -#define ifv_tag ifv_mib.ifvm_tag -#define ifv_vid ifv_mib.ifvm_vid -#define ifv_pcp ifv_mib.ifvm_pcp -#define ifv_encaplen ifv_mib.ifvm_encaplen -#define ifv_mtufudge ifv_mib.ifvm_mtufudge -#define ifv_mintu ifv_mib.ifvm_mintu /* Special flags we should propagate to parent. */ static struct { @@ -1067,10 +1058,6 @@ vlan_clone_create(struct if_clone *ifc, char *name, si strlcpy(ifp->if_xname, name, IFNAMSIZ); ifp->if_dname = vlanname; ifp->if_dunit = unit; - /* NB: flags are not set here */ - ifp->if_linkmib = &ifv->ifv_mib; - ifp->if_linkmiblen = sizeof(ifv->ifv_mib); - /* NB: mtu is not set here */ ifp->if_init = vlan_init; ifp->if_transmit = vlan_transmit; From owner-svn-src-all@freebsd.org Wed Jan 16 03:07:34 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 33D2514A03EE; Wed, 16 Jan 2019 03:07:34 +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 CF30587F5B; Wed, 16 Jan 2019 03:07:33 +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 AAB9C242DF; Wed, 16 Jan 2019 03:07:33 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x0G37XFj011726; Wed, 16 Jan 2019 03:07:33 GMT (envelope-from markj@FreeBSD.org) Received: (from markj@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x0G37XG8011725; Wed, 16 Jan 2019 03:07:33 GMT (envelope-from markj@FreeBSD.org) Message-Id: <201901160307.x0G37XG8011725@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: markj set sender to markj@FreeBSD.org using -f From: Mark Johnston Date: Wed, 16 Jan 2019 03:07: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: r343076 - in stable: 11/sys/net 12/sys/net X-SVN-Group: stable-12 X-SVN-Commit-Author: markj X-SVN-Commit-Paths: in stable: 11/sys/net 12/sys/net X-SVN-Commit-Revision: 343076 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: CF30587F5B X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.97 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_SHORT(-0.97)[-0.970,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_LONG(-1.00)[-0.999,0] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 16 Jan 2019 03:07:34 -0000 Author: markj Date: Wed Jan 16 03:07:32 2019 New Revision: 343076 URL: https://svnweb.freebsd.org/changeset/base/343076 Log: MFC r342887: Stop setting if_linkmib in vlan(4) ifnets. PR: 219472 Modified: stable/12/sys/net/if_vlan.c Directory Properties: stable/12/ (props changed) Changes in other areas also in this revision: Modified: stable/11/sys/net/if_vlan.c Directory Properties: stable/11/ (props changed) Modified: stable/12/sys/net/if_vlan.c ============================================================================== --- stable/12/sys/net/if_vlan.c Wed Jan 16 02:19:04 2019 (r343075) +++ stable/12/sys/net/if_vlan.c Wed Jan 16 03:07:32 2019 (r343076) @@ -156,7 +156,7 @@ struct vlan_mc_entry { struct epoch_context mc_epoch_ctx; }; -struct ifvlan { +struct ifvlan { struct ifvlantrunk *ifv_trunk; struct ifnet *ifv_ifp; #define TRUNK(ifv) ((ifv)->ifv_trunk) @@ -164,28 +164,19 @@ struct ifvlan { void *ifv_cookie; int ifv_pflags; /* special flags we have set on parent */ int ifv_capenable; - struct ifv_linkmib { - int ifvm_encaplen; /* encapsulation length */ - int ifvm_mtufudge; /* MTU fudged by this much */ - int ifvm_mintu; /* min transmission unit */ - uint16_t ifvm_proto; /* encapsulation ethertype */ - uint16_t ifvm_tag; /* tag to apply on packets leaving if */ - uint16_t ifvm_vid; /* VLAN ID */ - uint8_t ifvm_pcp; /* Priority Code Point (PCP). */ - } ifv_mib; + int ifv_encaplen; /* encapsulation length */ + int ifv_mtufudge; /* MTU fudged by this much */ + int ifv_mintu; /* min transmission unit */ + uint16_t ifv_proto; /* encapsulation ethertype */ + uint16_t ifv_tag; /* tag to apply on packets leaving if */ + uint16_t ifv_vid; /* VLAN ID */ + uint8_t ifv_pcp; /* Priority Code Point (PCP). */ struct task lladdr_task; CK_SLIST_HEAD(, vlan_mc_entry) vlan_mc_listhead; #ifndef VLAN_ARRAY CK_SLIST_ENTRY(ifvlan) ifv_list; #endif }; -#define ifv_proto ifv_mib.ifvm_proto -#define ifv_tag ifv_mib.ifvm_tag -#define ifv_vid ifv_mib.ifvm_vid -#define ifv_pcp ifv_mib.ifvm_pcp -#define ifv_encaplen ifv_mib.ifvm_encaplen -#define ifv_mtufudge ifv_mib.ifvm_mtufudge -#define ifv_mintu ifv_mib.ifvm_mintu /* Special flags we should propagate to parent. */ static struct { @@ -1053,10 +1044,6 @@ vlan_clone_create(struct if_clone *ifc, char *name, si strlcpy(ifp->if_xname, name, IFNAMSIZ); ifp->if_dname = vlanname; ifp->if_dunit = unit; - /* NB: flags are not set here */ - ifp->if_linkmib = &ifv->ifv_mib; - ifp->if_linkmiblen = sizeof(ifv->ifv_mib); - /* NB: mtu is not set here */ ifp->if_init = vlan_init; ifp->if_transmit = vlan_transmit; From owner-svn-src-all@freebsd.org Wed Jan 16 03:46:28 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 1D77414A1259; Wed, 16 Jan 2019 03:46:28 +0000 (UTC) (envelope-from araujo@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 A93E38945B; Wed, 16 Jan 2019 03:46:27 +0000 (UTC) (envelope-from araujo@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1: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 99F8924A05; Wed, 16 Jan 2019 03:46:27 +0000 (UTC) (envelope-from araujo@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x0G3kR4g032139; Wed, 16 Jan 2019 03:46:27 GMT (envelope-from araujo@FreeBSD.org) Received: (from araujo@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x0G3kRCS032138; Wed, 16 Jan 2019 03:46:27 GMT (envelope-from araujo@FreeBSD.org) Message-Id: <201901160346.x0G3kRCS032138@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: araujo set sender to araujo@FreeBSD.org using -f From: Marcelo Araujo Date: Wed, 16 Jan 2019 03:46:27 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r343077 - head/usr.sbin/bhyve X-SVN-Group: head X-SVN-Commit-Author: araujo X-SVN-Commit-Paths: head/usr.sbin/bhyve X-SVN-Commit-Revision: 343077 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: A93E38945B X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.96 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_LONG(-1.00)[-0.999,0]; NEURAL_HAM_SHORT(-0.96)[-0.964,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 16 Jan 2019 03:46:28 -0000 Author: araujo Date: Wed Jan 16 03:46:27 2019 New Revision: 343077 URL: https://svnweb.freebsd.org/changeset/base/343077 Log: Fix broken uart on Win2016 guest. Obtained from: Joyent (commit/2bf1a940afbd1382faff159e7c93c72779ca10f4) MFC after: 3 weeks. Modified: head/usr.sbin/bhyve/uart_emul.c Modified: head/usr.sbin/bhyve/uart_emul.c ============================================================================== --- head/usr.sbin/bhyve/uart_emul.c Wed Jan 16 03:07:32 2019 (r343076) +++ head/usr.sbin/bhyve/uart_emul.c Wed Jan 16 03:46:27 2019 (r343077) @@ -431,6 +431,13 @@ uart_write(struct uart_softc *sc, int offset, uint8_t sc->thre_int_pending = true; break; case REG_IER: + /* Assert an interrupt if re-enabling the THRE intr, since we + * always report THRE as active in the status register. + */ + if ((sc->ier & IER_ETXRDY) == 0 && + (value & IER_ETXRDY) != 0) { + sc->thre_int_pending = true; + } /* * Apply mask so that bits 4-7 are 0 * Also enables bits 0-3 only if they're 1 From owner-svn-src-all@freebsd.org Wed Jan 16 03:52:44 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 82C1414A15A6; Wed, 16 Jan 2019 03:52:44 +0000 (UTC) (envelope-from jhibbits@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 25AD88995E; Wed, 16 Jan 2019 03:52:44 +0000 (UTC) (envelope-from jhibbits@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1: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 1409524BBE; Wed, 16 Jan 2019 03:52:44 +0000 (UTC) (envelope-from jhibbits@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x0G3qhgb037018; Wed, 16 Jan 2019 03:52:43 GMT (envelope-from jhibbits@FreeBSD.org) Received: (from jhibbits@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x0G3qh2Y037017; Wed, 16 Jan 2019 03:52:43 GMT (envelope-from jhibbits@FreeBSD.org) Message-Id: <201901160352.x0G3qh2Y037017@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jhibbits set sender to jhibbits@FreeBSD.org using -f From: Justin Hibbits Date: Wed, 16 Jan 2019 03:52:43 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r343078 - head/sys/powerpc/fpu X-SVN-Group: head X-SVN-Commit-Author: jhibbits X-SVN-Commit-Paths: head/sys/powerpc/fpu X-SVN-Commit-Revision: 343078 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 25AD88995E X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.96 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_SHORT(-0.96)[-0.964,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_LONG(-1.00)[-0.999,0] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 16 Jan 2019 03:52:44 -0000 Author: jhibbits Date: Wed Jan 16 03:52:43 2019 New Revision: 343078 URL: https://svnweb.freebsd.org/changeset/base/343078 Log: powerpc: Fix FPU fsqrt emulation special case results If fsqrts is emulated with +INF as its argument, the 0 return value causes a NULL pointer dereference, panicking the system. Follow the PowerISA and return +INF with no FP exception. MFC after: 1 week Modified: head/sys/powerpc/fpu/fpu_sqrt.c Modified: head/sys/powerpc/fpu/fpu_sqrt.c ============================================================================== --- head/sys/powerpc/fpu/fpu_sqrt.c Wed Jan 16 03:46:27 2019 (r343077) +++ head/sys/powerpc/fpu/fpu_sqrt.c Wed Jan 16 03:52:43 2019 (r343078) @@ -226,12 +226,12 @@ fpu_sqrt(struct fpemu *fe) return (x); } if (x->fp_sign) { + fe->fe_cx |= FPSCR_VXSQRT; return (fpu_newnan(fe)); } if (ISINF(x)) { - fe->fe_cx |= FPSCR_VXSQRT; - DUMPFPN(FPE_REG, 0); - return (0); + DUMPFPN(FPE_REG, x); + return (x); } /* From owner-svn-src-all@freebsd.org Wed Jan 16 04:01:31 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id CB8A414A1717; Wed, 16 Jan 2019 04:01:31 +0000 (UTC) (envelope-from gonzo@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 73A7D89E23; Wed, 16 Jan 2019 04:01:31 +0000 (UTC) (envelope-from gonzo@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 29E7624C20; Wed, 16 Jan 2019 04:01:31 +0000 (UTC) (envelope-from gonzo@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x0G41Vq7040460; Wed, 16 Jan 2019 04:01:31 GMT (envelope-from gonzo@FreeBSD.org) Received: (from gonzo@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x0G41Vmk040459; Wed, 16 Jan 2019 04:01:31 GMT (envelope-from gonzo@FreeBSD.org) Message-Id: <201901160401.x0G41Vmk040459@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gonzo set sender to gonzo@FreeBSD.org using -f From: Oleksandr Tymoshenko Date: Wed, 16 Jan 2019 04:01:31 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r343079 - stable/11/contrib/file/magic/Magdir X-SVN-Group: stable-11 X-SVN-Commit-Author: gonzo X-SVN-Commit-Paths: stable/11/contrib/file/magic/Magdir X-SVN-Commit-Revision: 343079 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 73A7D89E23 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.96 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_SHORT(-0.96)[-0.960,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_LONG(-1.00)[-0.999,0] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 16 Jan 2019 04:01:32 -0000 Author: gonzo Date: Wed Jan 16 04:01:30 2019 New Revision: 343079 URL: https://svnweb.freebsd.org/changeset/base/343079 Log: MFC r335675: Fix file(1) dumpdate reporting for dump(8) files Magic file for dump(8) had this dump and previous dump dates reversed. Fix order for all three flavours of the dump(8) format. This fix was committed to upstream repo as magic/Magdir/dump,v 1.17 and will be merged during next vendor import. PR: 223155 Modified: stable/11/contrib/file/magic/Magdir/dump Modified: stable/11/contrib/file/magic/Magdir/dump ============================================================================== --- stable/11/contrib/file/magic/Magdir/dump Wed Jan 16 03:52:43 2019 (r343078) +++ stable/11/contrib/file/magic/Magdir/dump Wed Jan 16 04:01:30 2019 (r343079) @@ -6,8 +6,8 @@ # We specify both byte orders in order to recognize byte-swapped dumps. # 0 name new-dump-be ->4 bedate x Previous dump %s, ->8 bedate x This dump %s, +>4 bedate x This dump %s, +>8 bedate x Previous dump %s, >12 belong >0 Volume %d, >692 belong 0 Level zero, type: >692 belong >0 Level %d, type: @@ -25,8 +25,8 @@ >888 belong >0 Flags %x 0 name old-dump-be -#>4 bedate x Previous dump %s, -#>8 bedate x This dump %s, +#>4 bedate x This dump %s, +#>8 bedate x Previous dump %s, >12 belong >0 Volume %d, >692 belong 0 Level zero, type: >692 belong >0 Level %d, type: @@ -44,8 +44,8 @@ >888 belong >0 Flags %x 0 name ufs2-dump-be ->896 beqdate x Previous dump %s, ->904 beqdate x This dump %s, +>896 beqdate x This dump %s, +>904 beqdate x Previous dump %s, >12 belong >0 Volume %d, >692 belong 0 Level zero, type: >692 belong >0 Level %d, type: From owner-svn-src-all@freebsd.org Wed Jan 16 04:02:09 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id BCB9514A1914; Wed, 16 Jan 2019 04:02:09 +0000 (UTC) (envelope-from glebius@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 611A389FCA; Wed, 16 Jan 2019 04:02:09 +0000 (UTC) (envelope-from glebius@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 559E224C54; Wed, 16 Jan 2019 04:02:09 +0000 (UTC) (envelope-from glebius@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x0G429Vv041352; Wed, 16 Jan 2019 04:02:09 GMT (envelope-from glebius@FreeBSD.org) Received: (from glebius@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x0G429dt041351; Wed, 16 Jan 2019 04:02:09 GMT (envelope-from glebius@FreeBSD.org) Message-Id: <201901160402.x0G429dt041351@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: glebius set sender to glebius@FreeBSD.org using -f From: Gleb Smirnoff Date: Wed, 16 Jan 2019 04:02:09 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r343080 - head/sys/vm X-SVN-Group: head X-SVN-Commit-Author: glebius X-SVN-Commit-Paths: head/sys/vm X-SVN-Commit-Revision: 343080 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 611A389FCA X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.96 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_SHORT(-0.96)[-0.964,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_LONG(-1.00)[-0.999,0] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 16 Jan 2019 04:02:09 -0000 Author: glebius Date: Wed Jan 16 04:02:08 2019 New Revision: 343080 URL: https://svnweb.freebsd.org/changeset/base/343080 Log: Whitespace. Modified: head/sys/vm/uma_int.h Modified: head/sys/vm/uma_int.h ============================================================================== --- head/sys/vm/uma_int.h Wed Jan 16 04:01:30 2019 (r343079) +++ head/sys/vm/uma_int.h Wed Jan 16 04:02:08 2019 (r343080) @@ -365,7 +365,7 @@ struct uma_zone { uint16_t uz_count_min; /* Minimal amount of items in bucket */ /* Offset 256, stats. */ - counter_u64_t uz_allocs; /* Total number of allocations */ + counter_u64_t uz_allocs; /* Total number of allocations */ counter_u64_t uz_frees; /* Total number of frees */ counter_u64_t uz_fails; /* Total number of alloc failures */ uint64_t uz_sleeps; /* Total number of alloc sleeps */ From owner-svn-src-all@freebsd.org Wed Jan 16 05:09:30 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 9987C14A32C2; Wed, 16 Jan 2019 05:09:30 +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 3C37E8C171; Wed, 16 Jan 2019 05:09:30 +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 2A3AF25786; Wed, 16 Jan 2019 05:09:30 +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 x0G59U4P074253; Wed, 16 Jan 2019 05:09:30 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x0G59U1h074252; Wed, 16 Jan 2019 05:09:30 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201901160509.x0G59U1h074252@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Wed, 16 Jan 2019 05:09:30 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r343081 - head/contrib/netbsd-tests/kernel X-SVN-Group: head X-SVN-Commit-Author: kib X-SVN-Commit-Paths: head/contrib/netbsd-tests/kernel X-SVN-Commit-Revision: 343081 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 3C37E8C171 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.98 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_SHORT(-0.98)[-0.979,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_LONG(-1.00)[-0.999,0] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 16 Jan 2019 05:09:30 -0000 Author: kib Date: Wed Jan 16 05:09:29 2019 New Revision: 343081 URL: https://svnweb.freebsd.org/changeset/base/343081 Log: Trim spaces at the end of lines. Reviewed by: markj, ngie Sponsored by: Mellanox Technologies MFC after: 1 week Differential revision: https://reviews.freebsd.org/D18837 Modified: head/contrib/netbsd-tests/kernel/t_sysv.c Modified: head/contrib/netbsd-tests/kernel/t_sysv.c ============================================================================== --- head/contrib/netbsd-tests/kernel/t_sysv.c Wed Jan 16 04:02:08 2019 (r343080) +++ head/contrib/netbsd-tests/kernel/t_sysv.c Wed Jan 16 05:09:29 2019 (r343081) @@ -840,9 +840,9 @@ sharer(void) ATF_TP_ADD_TCS(tp) { - ATF_TP_ADD_TC(tp, msg); - ATF_TP_ADD_TC(tp, sem); - ATF_TP_ADD_TC(tp, shm); + ATF_TP_ADD_TC(tp, msg); + ATF_TP_ADD_TC(tp, sem); + ATF_TP_ADD_TC(tp, shm); return atf_no_error(); } From owner-svn-src-all@freebsd.org Wed Jan 16 05:16:00 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id D9E0F14A3598; Wed, 16 Jan 2019 05:15:59 +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 813A18C6C9; Wed, 16 Jan 2019 05:15:59 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 741DA25967; Wed, 16 Jan 2019 05:15:59 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x0G5FxnF079447; Wed, 16 Jan 2019 05:15:59 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x0G5FwqA079441; Wed, 16 Jan 2019 05:15:58 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201901160515.x0G5FwqA079441@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Wed, 16 Jan 2019 05:15:58 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r343082 - in head: contrib/netbsd-tests/kernel lib/libc/sys sys/kern sys/sys sys/vm X-SVN-Group: head X-SVN-Commit-Author: kib X-SVN-Commit-Paths: in head: contrib/netbsd-tests/kernel lib/libc/sys sys/kern sys/sys sys/vm X-SVN-Commit-Revision: 343082 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 813A18C6C9 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.98 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_LONG(-1.00)[-0.999,0]; NEURAL_HAM_SHORT(-0.98)[-0.980,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 16 Jan 2019 05:16:00 -0000 Author: kib Date: Wed Jan 16 05:15:57 2019 New Revision: 343082 URL: https://svnweb.freebsd.org/changeset/base/343082 Log: Implement shmat(2) flag SHM_REMAP. Based on the description in Linux man page. Reviewed by: markj, ngie (previous version) Sponsored by: Mellanox Technologies MFC after: 1 week Differential revision: https://reviews.freebsd.org/D18837 Modified: head/contrib/netbsd-tests/kernel/t_sysv.c head/lib/libc/sys/shmat.2 head/sys/kern/sysv_shm.c head/sys/sys/shm.h head/sys/vm/vm_map.c head/sys/vm/vm_map.h Modified: head/contrib/netbsd-tests/kernel/t_sysv.c ============================================================================== --- head/contrib/netbsd-tests/kernel/t_sysv.c Wed Jan 16 05:09:29 2019 (r343081) +++ head/contrib/netbsd-tests/kernel/t_sysv.c Wed Jan 16 05:15:57 2019 (r343082) @@ -47,6 +47,7 @@ #include #include +#include #include #include #include @@ -772,19 +773,27 @@ ATF_TC_BODY(shm, tc) atf_tc_fail("sender: received unexpected signal"); } -ATF_TC_CLEANUP(shm, tc) +static void +shmid_cleanup(const char *name) { - int sender_shmid; + int shmid; /* * Remove the shared memory area if it exists. */ - sender_shmid = read_int("sender_shmid"); - if (sender_shmid != -1) - if (shmctl(sender_shmid, IPC_RMID, NULL) == -1) + shmid = read_int(name); + if (shmid != -1) { + if (shmctl(shmid, IPC_RMID, NULL) == -1) err(1, "shmctl IPC_RMID"); + } } +ATF_TC_CLEANUP(shm, tc) +{ + + shmid_cleanup("sender_shmid"); +} + void print_shmid_ds(struct shmid_ds *sp, mode_t mode) { @@ -837,12 +846,53 @@ sharer(void) exit(0); } +#ifdef SHM_REMAP +ATF_TC_WITH_CLEANUP(shm_remap); +ATF_TC_HEAD(shm_remap, tc) +{ + + atf_tc_set_md_var(tc, "descr", "Checks SHM_REMAP"); +} + +ATF_TC_BODY(shm_remap, tc) +{ + char *shm_buf; + int shmid_remap; + + pgsize = sysconf(_SC_PAGESIZE); + + shmkey = get_ftok(4160); + ATF_REQUIRE_MSG(shmkey != (key_t)-1, "get_ftok failed"); + + ATF_REQUIRE_MSG((shmid_remap = shmget(shmkey, pgsize, + IPC_CREAT | 0640)) != -1, "shmget: %d", errno); + write_int("shmid_remap", shmid_remap); + + ATF_REQUIRE_MSG((shm_buf = mmap(NULL, pgsize, PROT_READ | PROT_WRITE, + MAP_ANON | MAP_PRIVATE, -1, 0)) != MAP_FAILED, "mmap: %d", errno); + + ATF_REQUIRE_MSG(shmat(shmid_remap, shm_buf, 0) == (void *)-1, + "shmat without MAP_REMAP succeeded"); + ATF_REQUIRE_MSG(shmat(shmid_remap, shm_buf, SHM_REMAP) == shm_buf, + "shmat(SHM_REMAP): %d", errno); +} + +ATF_TC_CLEANUP(shm_remap, tc) +{ + + shmid_cleanup("shmid_remap"); +} +#endif /* SHM_REMAP */ + ATF_TP_ADD_TCS(tp) { ATF_TP_ADD_TC(tp, msg); ATF_TP_ADD_TC(tp, sem); ATF_TP_ADD_TC(tp, shm); +#ifdef SHM_REMAP + ATF_TP_ADD_TC(tp, shm_remap); +#endif return atf_no_error(); } Modified: head/lib/libc/sys/shmat.2 ============================================================================== --- head/lib/libc/sys/shmat.2 Wed Jan 16 05:09:29 2019 (r343081) +++ head/lib/libc/sys/shmat.2 Wed Jan 16 05:15:57 2019 (r343082) @@ -25,7 +25,7 @@ .\" .\" $FreeBSD$ .\" -.Dd January 25, 2018 +.Dd January 14, 2019 .Dt SHMAT 2 .Os .Sh NAME @@ -64,17 +64,38 @@ kernel. .It If .Fa addr -is nonzero and SHM_RND is not specified in +is nonzero and +.Va SHM_RND +is not specified in .Fa flag , the segment is attached the specified address. .It If .Fa addr -is specified and SHM_RND is specified, +is specified and +.Va SHM_RND +is specified, .Fa addr is rounded down to the nearest multiple of SHMLBA. .El .Pp +If the +.Va SHM_REMAP +flag is specified and the passed +.Fa addr +is not +.Dv NULL , +any existing mappings in the virtual addresses range are +cleared before the segment is attached. +If the flag is not specified, +.Fa addr +is not +.Dv NULL , +and the virtual address range contains +some pre-existing mappings, the +.Fn shmat +call fails. +.Pp The .Fn shmdt system call @@ -104,6 +125,14 @@ The .Fa addr argument was not an acceptable address. +.It Bq Er ENOMEM +The specified +.Fa addr +cannot be used for mapping, for instance due to the amount of available +space being smaller than the segment size, +or because pre-existing mappings are in the range and no +.Va SHM_REMAP +flag was provided. .It Bq Er EMFILE Failed to attach the shared memory segment because the per-process .Va kern.ipc.shmseg Modified: head/sys/kern/sysv_shm.c ============================================================================== --- head/sys/kern/sysv_shm.c Wed Jan 16 05:09:29 2019 (r343081) +++ head/sys/kern/sysv_shm.c Wed Jan 16 05:15:57 2019 (r343082) @@ -388,7 +388,7 @@ kern_shmat_locked(struct thread *td, int shmid, const vm_offset_t attach_va; vm_prot_t prot; vm_size_t size; - int error, i, rv; + int cow, error, find_space, i, rv; AUDIT_ARG_SVIPC_ID(shmid); AUDIT_ARG_VALUE(shmflg); @@ -427,6 +427,7 @@ kern_shmat_locked(struct thread *td, int shmid, const return (EMFILE); size = round_page(shmseg->u.shm_segsz); prot = VM_PROT_READ; + cow = MAP_INHERIT_SHARE | MAP_PREFAULT_PARTIAL; if ((shmflg & SHM_RDONLY) == 0) prot |= VM_PROT_WRITE; if (shmaddr != NULL) { @@ -436,6 +437,9 @@ kern_shmat_locked(struct thread *td, int shmid, const attach_va = (vm_offset_t)shmaddr; else return (EINVAL); + if ((shmflg & SHM_REMAP) != 0) + cow |= MAP_REMAP; + find_space = VMFS_NO_SPACE; } else { /* * This is just a hint to vm_map_find() about where to @@ -443,12 +447,12 @@ kern_shmat_locked(struct thread *td, int shmid, const */ attach_va = round_page((vm_offset_t)p->p_vmspace->vm_daddr + lim_max(td, RLIMIT_DATA)); + find_space = VMFS_OPTIMAL_SPACE; } vm_object_reference(shmseg->object); rv = vm_map_find(&p->p_vmspace->vm_map, shmseg->object, 0, &attach_va, - size, 0, shmaddr != NULL ? VMFS_NO_SPACE : VMFS_OPTIMAL_SPACE, - prot, prot, MAP_INHERIT_SHARE | MAP_PREFAULT_PARTIAL); + size, 0, find_space, prot, prot, cow); if (rv != KERN_SUCCESS) { vm_object_deallocate(shmseg->object); return (ENOMEM); Modified: head/sys/sys/shm.h ============================================================================== --- head/sys/sys/shm.h Wed Jan 16 05:09:29 2019 (r343081) +++ head/sys/sys/shm.h Wed Jan 16 05:15:57 2019 (r343082) @@ -52,6 +52,7 @@ #define SHM_RDONLY 010000 /* Attach read-only (else read-write) */ #define SHM_RND 020000 /* Round attach address to SHMLBA */ +#define SHM_REMAP 030000 /* Unmap before mapping */ #define SHMLBA PAGE_SIZE /* Segment low boundary address multiple */ /* "official" access mode definitions; somewhat braindead since you have Modified: head/sys/vm/vm_map.c ============================================================================== --- head/sys/vm/vm_map.c Wed Jan 16 05:09:29 2019 (r343081) +++ head/sys/vm/vm_map.c Wed Jan 16 05:15:57 2019 (r343082) @@ -1565,6 +1565,8 @@ vm_map_find(vm_map_t map, vm_object_t object, vm_ooffs KASSERT((cow & (MAP_STACK_GROWS_DOWN | MAP_STACK_GROWS_UP)) == 0 || object == NULL, ("vm_map_find: non-NULL backing object for stack")); + MPASS((cow & MAP_REMAP) == 0 || (find_space == VMFS_NO_SPACE && + (cow & (MAP_STACK_GROWS_DOWN | MAP_STACK_GROWS_UP)) == 0)); if (find_space == VMFS_OPTIMAL_SPACE && (object == NULL || (object->flags & OBJ_COLORED) == 0)) find_space = VMFS_ANY_SPACE; @@ -1595,6 +1597,14 @@ again: } goto done; } + } else if ((cow & MAP_REMAP) != 0) { + if (*addr < vm_map_min(map) || + *addr + length > vm_map_max(map) || + *addr + length <= length) { + rv = KERN_INVALID_ADDRESS; + goto done; + } + vm_map_delete(map, *addr, *addr + length); } if ((cow & (MAP_STACK_GROWS_DOWN | MAP_STACK_GROWS_UP)) != 0) { rv = vm_map_stack_locked(map, *addr, length, sgrowsiz, prot, Modified: head/sys/vm/vm_map.h ============================================================================== --- head/sys/vm/vm_map.h Wed Jan 16 05:09:29 2019 (r343081) +++ head/sys/vm/vm_map.h Wed Jan 16 05:15:57 2019 (r343082) @@ -342,6 +342,7 @@ long vmspace_resident_count(struct vmspace *vmspace); #define MAP_DISABLE_COREDUMP 0x0100 #define MAP_PREFAULT_MADVISE 0x0200 /* from (user) madvise request */ #define MAP_VN_WRITECOUNT 0x0400 +#define MAP_REMAP 0x0800 #define MAP_STACK_GROWS_DOWN 0x1000 #define MAP_STACK_GROWS_UP 0x2000 #define MAP_ACC_CHARGED 0x4000 From owner-svn-src-all@freebsd.org Wed Jan 16 05:17:25 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id CB9F314A361B; Wed, 16 Jan 2019 05:17:25 +0000 (UTC) (envelope-from kp@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 70B178C847; Wed, 16 Jan 2019 05:17:25 +0000 (UTC) (envelope-from kp@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 5EF952597B; Wed, 16 Jan 2019 05:17:25 +0000 (UTC) (envelope-from kp@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x0G5HPSh079552; Wed, 16 Jan 2019 05:17:25 GMT (envelope-from kp@FreeBSD.org) Received: (from kp@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x0G5HP8p079551; Wed, 16 Jan 2019 05:17:25 GMT (envelope-from kp@FreeBSD.org) Message-Id: <201901160517.x0G5HP8p079551@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kp set sender to kp@FreeBSD.org using -f From: Kristof Provost Date: Wed, 16 Jan 2019 05:17: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: r343083 - stable/12/sys/kern X-SVN-Group: stable-12 X-SVN-Commit-Author: kp X-SVN-Commit-Paths: stable/12/sys/kern X-SVN-Commit-Revision: 343083 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 70B178C847 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.97 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_LONG(-1.00)[-0.999,0]; NEURAL_HAM_SHORT(-0.98)[-0.977,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 16 Jan 2019 05:17:26 -0000 Author: kp Date: Wed Jan 16 05:17:24 2019 New Revision: 343083 URL: https://svnweb.freebsd.org/changeset/base/343083 Log: MFC r342591,342599: Make kernel print jail ID when logging a process exit Kernel now includes jail ID when logging a process exit. jid is 0 for unjailed processes. Submitted by: Marie Helene Kvello-Aune Relnotes: yes Sponsored by: Modirum MDPay Modified: stable/12/sys/kern/kern_sig.c Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/kern/kern_sig.c ============================================================================== --- stable/12/sys/kern/kern_sig.c Wed Jan 16 05:15:57 2019 (r343082) +++ stable/12/sys/kern/kern_sig.c Wed Jan 16 05:17:24 2019 (r343083) @@ -3098,8 +3098,9 @@ killproc(struct proc *p, char *why) PROC_LOCK_ASSERT(p, MA_OWNED); CTR3(KTR_PROC, "killproc: proc %p (pid %d, %s)", p, p->p_pid, p->p_comm); - log(LOG_ERR, "pid %d (%s), uid %d, was killed: %s\n", p->p_pid, - p->p_comm, p->p_ucred ? p->p_ucred->cr_uid : -1, why); + log(LOG_ERR, "pid %d (%s), jid %d, uid %d, was killed: %s\n", + p->p_pid, p->p_comm, p->p_ucred->cr_prison->pr_id, + p->p_ucred ? p->p_ucred->cr_uid : -1, why); proc_wkilled(p); kern_psignal(p, SIGKILL); } @@ -3142,8 +3143,9 @@ sigexit(struct thread *td, int sig) sig |= WCOREFLAG; if (kern_logsigexit) log(LOG_INFO, - "pid %d (%s), uid %d: exited on signal %d%s\n", - p->p_pid, p->p_comm, + "pid %d (%s), jid %d, uid %d: exited on " + "signal %d%s\n", p->p_pid, p->p_comm, + p->p_ucred->cr_prison->pr_id, td->td_ucred ? td->td_ucred->cr_uid : -1, sig &~ WCOREFLAG, sig & WCOREFLAG ? " (core dumped)" : ""); From owner-svn-src-all@freebsd.org Wed Jan 16 05:17:28 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 91CBD14A3646; Wed, 16 Jan 2019 05:17:28 +0000 (UTC) (envelope-from kp@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 3990D8C84B; Wed, 16 Jan 2019 05:17:28 +0000 (UTC) (envelope-from kp@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id ECDFC2597C; Wed, 16 Jan 2019 05:17:27 +0000 (UTC) (envelope-from kp@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x0G5HROp079601; Wed, 16 Jan 2019 05:17:27 GMT (envelope-from kp@FreeBSD.org) Received: (from kp@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x0G5HRB4079600; Wed, 16 Jan 2019 05:17:27 GMT (envelope-from kp@FreeBSD.org) Message-Id: <201901160517.x0G5HRB4079600@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kp set sender to kp@FreeBSD.org using -f From: Kristof Provost Date: Wed, 16 Jan 2019 05:17:27 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r343084 - stable/11/sys/kern X-SVN-Group: stable-11 X-SVN-Commit-Author: kp X-SVN-Commit-Paths: stable/11/sys/kern X-SVN-Commit-Revision: 343084 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 3990D8C84B X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.97 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_SHORT(-0.98)[-0.977,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_LONG(-1.00)[-0.999,0] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 16 Jan 2019 05:17:28 -0000 Author: kp Date: Wed Jan 16 05:17:27 2019 New Revision: 343084 URL: https://svnweb.freebsd.org/changeset/base/343084 Log: MFC r342591,342599: Make kernel print jail ID when logging a process exit Kernel now includes jail ID when logging a process exit. jid is 0 for unjailed processes. Submitted by: Marie Helene Kvello-Aune Relnotes: yes Sponsored by: Modirum MDPay Modified: stable/11/sys/kern/kern_sig.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/kern/kern_sig.c ============================================================================== --- stable/11/sys/kern/kern_sig.c Wed Jan 16 05:17:24 2019 (r343083) +++ stable/11/sys/kern/kern_sig.c Wed Jan 16 05:17:27 2019 (r343084) @@ -3109,8 +3109,9 @@ killproc(struct proc *p, char *why) PROC_LOCK_ASSERT(p, MA_OWNED); CTR3(KTR_PROC, "killproc: proc %p (pid %d, %s)", p, p->p_pid, p->p_comm); - log(LOG_ERR, "pid %d (%s), uid %d, was killed: %s\n", p->p_pid, - p->p_comm, p->p_ucred ? p->p_ucred->cr_uid : -1, why); + log(LOG_ERR, "pid %d (%s), jid %d, uid %d, was killed: %s\n", + p->p_pid, p->p_comm, p->p_ucred->cr_prison->pr_id, + p->p_ucred ? p->p_ucred->cr_uid : -1, why); proc_wkilled(p); kern_psignal(p, SIGKILL); } @@ -3152,8 +3153,9 @@ sigexit(struct thread *td, int sig) sig |= WCOREFLAG; if (kern_logsigexit) log(LOG_INFO, - "pid %d (%s), uid %d: exited on signal %d%s\n", - p->p_pid, p->p_comm, + "pid %d (%s), jid %d, uid %d: exited on " + "signal %d%s\n", p->p_pid, p->p_comm, + p->p_ucred->cr_prison->pr_id, td->td_ucred ? td->td_ucred->cr_uid : -1, sig &~ WCOREFLAG, sig & WCOREFLAG ? " (core dumped)" : ""); From owner-svn-src-all@freebsd.org Wed Jan 16 05:44:15 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 2F02814A3DA4; Wed, 16 Jan 2019 05:44:15 +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 C43CB8D9BE; Wed, 16 Jan 2019 05:44:14 +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 95FB725E69; Wed, 16 Jan 2019 05:44:14 +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 x0G5iE3X095382; Wed, 16 Jan 2019 05:44:14 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x0G5iErW095381; Wed, 16 Jan 2019 05:44:14 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201901160544.x0G5iErW095381@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Wed, 16 Jan 2019 05:44:14 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r343085 - head/sys/net X-SVN-Group: head X-SVN-Commit-Author: kib X-SVN-Commit-Paths: head/sys/net X-SVN-Commit-Revision: 343085 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: C43CB8D9BE X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.98 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_SHORT(-0.98)[-0.980,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_LONG(-1.00)[-0.999,0] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 16 Jan 2019 05:44:15 -0000 Author: kib Date: Wed Jan 16 05:44:14 2019 New Revision: 343085 URL: https://svnweb.freebsd.org/changeset/base/343085 Log: Improve iflib busdma(9) KPI use. - Specify BUS_DMA_NOWAIT for bus_dmamap_load() on rx refill, since callbacks are not supposed to be used. - Match tso/non-tso tags to corresponding tx map operations. Create separate tso maps for tx descriptors. In particular, do not use non-tso tag to load, unload, or destroy a map created with tso tag. - Add missed bus_dmamap_sync() calls. Submitted by: marius. Reported and tested by: pho Reviewed by: marius Sponsored by: The FreeBSD Foundation MFC after: 1 week Modified: head/sys/net/iflib.c Modified: head/sys/net/iflib.c ============================================================================== --- head/sys/net/iflib.c Wed Jan 16 05:17:27 2019 (r343084) +++ head/sys/net/iflib.c Wed Jan 16 05:44:14 2019 (r343085) @@ -282,6 +282,7 @@ typedef struct iflib_sw_rx_desc_array { typedef struct iflib_sw_tx_desc_array { bus_dmamap_t *ifsd_map; /* bus_dma maps for packet */ + bus_dmamap_t *ifsd_tso_map; /* bus_dma maps for TSO packet */ struct mbuf **ifsd_m; /* pkthdr mbufs */ } if_txsd_vec_t; @@ -1491,6 +1492,8 @@ iflib_fast_intr_rxtx(void *arg) ctx = rxq->ifr_ctx; + bus_dmamap_sync(rxq->ifr_ifdi->idi_tag, rxq->ifr_ifdi->idi_map, + BUS_DMASYNC_POSTREAD); if (!ctx->isc_txd_credits_update(ctx->ifc_softc, txqid, false)) { IFDI_TX_QUEUE_INTR_ENABLE(ctx, txqid); continue; @@ -1583,6 +1586,7 @@ iflib_txsd_alloc(iflib_txq_t txq) device_t dev = ctx->ifc_dev; bus_size_t tsomaxsize; int err, nsegments, ntsosegments; + bool tso; nsegments = scctx->isc_tx_nsegments; ntsosegments = scctx->isc_tx_tso_segments_max; @@ -1617,8 +1621,8 @@ iflib_txsd_alloc(iflib_txq_t txq) (uintmax_t)sctx->isc_tx_maxsize, nsegments, (uintmax_t)sctx->isc_tx_maxsegsize); goto fail; } - if ((if_getcapabilities(ctx->ifc_ifp) & IFCAP_TSO) && - (err = bus_dma_tag_create(bus_get_dma_tag(dev), + tso = (if_getcapabilities(ctx->ifc_ifp) & IFCAP_TSO) != 0; + if (tso && (err = bus_dma_tag_create(bus_get_dma_tag(dev), 1, 0, /* alignment, bounds */ BUS_SPACE_MAXADDR, /* lowaddr */ BUS_SPACE_MAXADDR, /* highaddr */ @@ -1631,7 +1635,6 @@ iflib_txsd_alloc(iflib_txq_t txq) NULL, /* lockfuncarg */ &txq->ift_tso_desc_tag))) { device_printf(dev,"Unable to allocate TX TSO DMA tag: %d\n", err); - goto fail; } if (!(txq->ift_sds.ifsd_m = @@ -1643,19 +1646,38 @@ iflib_txsd_alloc(iflib_txq_t txq) } /* Create the descriptor buffer dma maps */ - if (!(txq->ift_sds.ifsd_map = - (bus_dmamap_t *) malloc(sizeof(bus_dmamap_t) * scctx->isc_ntxd[txq->ift_br_offset], M_IFLIB, M_NOWAIT | M_ZERO))) { + if ((txq->ift_sds.ifsd_map = (bus_dmamap_t *)malloc( + sizeof(bus_dmamap_t) * scctx->isc_ntxd[txq->ift_br_offset], + M_IFLIB, M_NOWAIT | M_ZERO)) == NULL) { device_printf(dev, "Unable to allocate tx_buffer map memory\n"); err = ENOMEM; goto fail; } + if (tso && (txq->ift_sds.ifsd_tso_map = (bus_dmamap_t *)malloc( + sizeof(bus_dmamap_t) * scctx->isc_ntxd[txq->ift_br_offset], + M_IFLIB, M_NOWAIT | M_ZERO)) == NULL) { + device_printf(dev, "Unable to allocate TSO tx_buffer " + "map memory\n"); + err = ENOMEM; + goto fail; + } + for (int i = 0; i < scctx->isc_ntxd[txq->ift_br_offset]; i++) { - err = bus_dmamap_create(txq->ift_desc_tag, 0, &txq->ift_sds.ifsd_map[i]); + err = bus_dmamap_create(txq->ift_desc_tag, 0, + &txq->ift_sds.ifsd_map[i]); if (err != 0) { device_printf(dev, "Unable to create TX DMA map\n"); goto fail; } + if (!tso) + continue; + err = bus_dmamap_create(txq->ift_tso_desc_tag, 0, + &txq->ift_sds.ifsd_tso_map[i]); + if (err != 0) { + device_printf(dev, "Unable to create TSO TX DMA map\n"); + goto fail; + } } return (0); fail: @@ -1673,10 +1695,22 @@ iflib_txsd_destroy(if_ctx_t ctx, iflib_txq_t txq, int if (txq->ift_sds.ifsd_map != NULL) map = txq->ift_sds.ifsd_map[i]; if (map != NULL) { + bus_dmamap_sync(txq->ift_desc_tag, map, BUS_DMASYNC_POSTWRITE); bus_dmamap_unload(txq->ift_desc_tag, map); bus_dmamap_destroy(txq->ift_desc_tag, map); txq->ift_sds.ifsd_map[i] = NULL; } + + map = NULL; + if (txq->ift_sds.ifsd_tso_map != NULL) + map = txq->ift_sds.ifsd_tso_map[i]; + if (map != NULL) { + bus_dmamap_sync(txq->ift_tso_desc_tag, map, + BUS_DMASYNC_POSTWRITE); + bus_dmamap_unload(txq->ift_tso_desc_tag, map); + bus_dmamap_destroy(txq->ift_tso_desc_tag, map); + txq->ift_sds.ifsd_tso_map[i] = NULL; + } } static void @@ -1690,6 +1724,10 @@ iflib_txq_destroy(iflib_txq_t txq) free(txq->ift_sds.ifsd_map, M_IFLIB); txq->ift_sds.ifsd_map = NULL; } + if (txq->ift_sds.ifsd_tso_map != NULL) { + free(txq->ift_sds.ifsd_tso_map, M_IFLIB); + txq->ift_sds.ifsd_tso_map = NULL; + } if (txq->ift_sds.ifsd_m != NULL) { free(txq->ift_sds.ifsd_m, M_IFLIB); txq->ift_sds.ifsd_m = NULL; @@ -1715,11 +1753,15 @@ iflib_txsd_free(if_ctx_t ctx, iflib_txq_t txq, int i) if (txq->ift_sds.ifsd_map != NULL) { bus_dmamap_sync(txq->ift_desc_tag, - txq->ift_sds.ifsd_map[i], - BUS_DMASYNC_POSTWRITE); - bus_dmamap_unload(txq->ift_desc_tag, - txq->ift_sds.ifsd_map[i]); + txq->ift_sds.ifsd_map[i], BUS_DMASYNC_POSTWRITE); + bus_dmamap_unload(txq->ift_desc_tag, txq->ift_sds.ifsd_map[i]); } + if (txq->ift_sds.ifsd_tso_map != NULL) { + bus_dmamap_sync(txq->ift_tso_desc_tag, + txq->ift_sds.ifsd_tso_map[i], BUS_DMASYNC_POSTWRITE); + bus_dmamap_unload(txq->ift_tso_desc_tag, + txq->ift_sds.ifsd_tso_map[i]); + } m_free(*mp); DBG_COUNTER_INC(tx_frees); *mp = NULL; @@ -1926,10 +1968,8 @@ _iflib_fl_refill(if_ctx_t ctx, iflib_fl_t fl, int coun cb_arg.error = 0; MPASS(sd_map != NULL); err = bus_dmamap_load(fl->ifl_desc_tag, sd_map[frag_idx], - cl, fl->ifl_buf_size, _rxq_refill_cb, &cb_arg, 0); - bus_dmamap_sync(fl->ifl_desc_tag, sd_map[frag_idx], - BUS_DMASYNC_PREREAD); - + cl, fl->ifl_buf_size, _rxq_refill_cb, &cb_arg, + BUS_DMA_NOWAIT); if (err != 0 || cb_arg.error) { /* * !zone_pack ? @@ -1939,6 +1979,8 @@ _iflib_fl_refill(if_ctx_t ctx, iflib_fl_t fl, int coun break; } + bus_dmamap_sync(fl->ifl_desc_tag, sd_map[frag_idx], + BUS_DMASYNC_PREREAD); sd_ba[frag_idx] = bus_addr = cb_arg.seg.ds_addr; sd_cl[frag_idx] = cl; #if MEMORY_LOGGING @@ -2030,6 +2072,7 @@ static void iflib_fl_bufs_free(iflib_fl_t fl) { iflib_dma_info_t idi = fl->ifl_ifdi; + bus_dmamap_t sd_map; uint32_t i; for (i = 0; i < fl->ifl_size; i++) { @@ -2037,7 +2080,9 @@ iflib_fl_bufs_free(iflib_fl_t fl) caddr_t *sd_cl = &fl->ifl_sds.ifsd_cl[i]; if (*sd_cl != NULL) { - bus_dmamap_t sd_map = fl->ifl_sds.ifsd_map[i]; + sd_map = fl->ifl_sds.ifsd_map[i]; + bus_dmamap_sync(fl->ifl_desc_tag, sd_map, + BUS_DMASYNC_POSTREAD); bus_dmamap_unload(fl->ifl_desc_tag, sd_map); if (*sd_cl != NULL) uma_zfree(fl->ifl_zone, *sd_cl); @@ -2140,19 +2185,32 @@ static void iflib_rx_sds_free(iflib_rxq_t rxq) { iflib_fl_t fl; - int i; + int i, j; if (rxq->ifr_fl != NULL) { for (i = 0; i < rxq->ifr_nfl; i++) { fl = &rxq->ifr_fl[i]; if (fl->ifl_desc_tag != NULL) { + if (fl->ifl_sds.ifsd_map != NULL) { + for (j = 0; j < fl->ifl_size; i++) { + if (fl->ifl_sds.ifsd_map[i] == + NULL) + continue; + bus_dmamap_sync( + fl->ifl_desc_tag, + fl->ifl_sds.ifsd_map[i], + BUS_DMASYNC_POSTREAD); + bus_dmamap_unload( + fl->ifl_desc_tag, + fl->ifl_sds.ifsd_map[i]); + } + } bus_dma_tag_destroy(fl->ifl_desc_tag); fl->ifl_desc_tag = NULL; } free(fl->ifl_sds.ifsd_m, M_IFLIB); free(fl->ifl_sds.ifsd_cl, M_IFLIB); free(fl->ifl_sds.ifsd_ba, M_IFLIB); - /* XXX destroy maps first */ free(fl->ifl_sds.ifsd_map, M_IFLIB); fl->ifl_sds.ifsd_m = NULL; fl->ifl_sds.ifsd_cl = NULL; @@ -2430,11 +2488,10 @@ rxd_frag_to_sd(iflib_rxq_t rxq, if_rxd_frag_t irf, int map = fl->ifl_sds.ifsd_map[cidx]; di = fl->ifl_ifdi; next = (cidx + CACHE_LINE_SIZE) & (fl->ifl_size-1); - bus_dmamap_sync(di->idi_tag, di->idi_map, - BUS_DMASYNC_POSTREAD | BUS_DMASYNC_POSTWRITE); /* not valid assert if bxe really does SGE from non-contiguous elements */ MPASS(fl->ifl_cidx == cidx); + bus_dmamap_sync(fl->ifl_desc_tag, map, BUS_DMASYNC_POSTREAD); if (unload) bus_dmamap_unload(fl->ifl_desc_tag, map); fl->ifl_cidx = (fl->ifl_cidx + 1) & (fl->ifl_size-1); @@ -2442,7 +2499,7 @@ rxd_frag_to_sd(iflib_rxq_t rxq, if_rxd_frag_t irf, int fl->ifl_gen = 0; bus_dmamap_sync(fl->ifl_ifdi->idi_tag, fl->ifl_ifdi->idi_map, BUS_DMASYNC_PREREAD | BUS_DMASYNC_PREWRITE); - bit_clear(fl->ifl_rx_bitmap, cidx); + bit_clear(fl->ifl_rx_bitmap, cidx); } static struct mbuf * @@ -2519,6 +2576,9 @@ iflib_rxd_pkt_get(iflib_rxq_t rxq, if_rxd_info_t ri) m->m_data += 2; #endif memcpy(m->m_data, *sd.ifsd_cl, ri->iri_len); + bus_dmamap_sync(rxq->ifr_fl->ifl_desc_tag, + rxq->ifr_fl->ifl_sds.ifsd_map[ri->iri_frags[0].irf_idx], + BUS_DMASYNC_PREREAD); m->m_len = ri->iri_frags[0].irf_len; } else { m = assemble_segments(rxq, ri, &sd); @@ -2587,6 +2647,7 @@ iflib_rxeof(iflib_rxq_t rxq, qidx_t budget) if_ctx_t ctx = rxq->ifr_ctx; if_shared_ctx_t sctx = ctx->ifc_sctx; if_softc_ctx_t scctx = &ctx->ifc_softc_ctx; + iflib_dma_info_t di; int avail, i; qidx_t *cidxp; struct if_rxd_info ri; @@ -2631,6 +2692,9 @@ iflib_rxeof(iflib_rxq_t rxq, qidx_t budget) ri.iri_cidx = *cidxp; ri.iri_ifp = ifp; ri.iri_frags = rxq->ifr_frags; + di = rxq->ifr_fl[rxq->ifr_frags[0].irf_flid].ifl_ifdi; + bus_dmamap_sync(di->idi_tag, di->idi_map, + BUS_DMASYNC_POSTREAD | BUS_DMASYNC_POSTWRITE); err = ctx->isc_rxd_pkt_get(ctx->ifc_softc, &ri); if (err) @@ -3006,16 +3070,17 @@ iflib_remove_mbuf(iflib_txq_t txq) { int ntxd, pidx; struct mbuf *m, **ifsd_m; - bus_dmamap_t *ifsd_map; ifsd_m = txq->ift_sds.ifsd_m; ntxd = txq->ift_size; pidx = txq->ift_pidx & (ntxd - 1); ifsd_m = txq->ift_sds.ifsd_m; - ifsd_map = txq->ift_sds.ifsd_map; m = ifsd_m[pidx]; ifsd_m[pidx] = NULL; - bus_dmamap_unload(txq->ift_desc_tag, ifsd_map[pidx]); + bus_dmamap_unload(txq->ift_desc_tag, txq->ift_sds.ifsd_map[pidx]); + if (txq->ift_sds.ifsd_tso_map != NULL) + bus_dmamap_unload(txq->ift_tso_desc_tag, + txq->ift_sds.ifsd_tso_map[pidx]); #if MEMORY_LOGGING txq->ift_dequeued++; #endif @@ -3131,11 +3196,13 @@ iflib_encap(iflib_txq_t txq, struct mbuf **m_headp) if (m_head->m_pkthdr.csum_flags & CSUM_TSO) { desc_tag = txq->ift_tso_desc_tag; max_segs = scctx->isc_tx_tso_segments_max; + map = txq->ift_sds.ifsd_tso_map[pidx]; MPASS(desc_tag != NULL); MPASS(max_segs > 0); } else { desc_tag = txq->ift_desc_tag; max_segs = scctx->isc_tx_nsegments; + map = txq->ift_sds.ifsd_map[pidx]; } if ((sctx->isc_flags & IFLIB_NEED_ETHER_PAD) && __predict_false(m_head->m_pkthdr.len < scctx->isc_min_frame_size)) { @@ -3297,7 +3364,6 @@ iflib_tx_desc_free(iflib_txq_t txq, int n) { uint32_t qsize, cidx, mask, gen; struct mbuf *m, **ifsd_m; - bus_dmamap_t *ifsd_map; bool do_prefetch; cidx = txq->ift_cidx; @@ -3305,7 +3371,6 @@ iflib_tx_desc_free(iflib_txq_t txq, int n) qsize = txq->ift_size; mask = qsize-1; ifsd_m = txq->ift_sds.ifsd_m; - ifsd_map = txq->ift_sds.ifsd_map; do_prefetch = (txq->ift_ctx->ifc_flags & IFC_PREFETCH); while (n-- > 0) { @@ -3315,7 +3380,19 @@ iflib_tx_desc_free(iflib_txq_t txq, int n) } if ((m = ifsd_m[cidx]) != NULL) { prefetch(&ifsd_m[(cidx + CACHE_PTR_INCREMENT) & mask]); - bus_dmamap_unload(txq->ift_desc_tag, ifsd_map[cidx]); + if (m->m_pkthdr.csum_flags & CSUM_TSO) { + bus_dmamap_sync(txq->ift_tso_desc_tag, + txq->ift_sds.ifsd_tso_map[cidx], + BUS_DMASYNC_POSTWRITE); + bus_dmamap_unload(txq->ift_tso_desc_tag, + txq->ift_sds.ifsd_tso_map[cidx]); + } else { + bus_dmamap_sync(txq->ift_desc_tag, + txq->ift_sds.ifsd_map[cidx], + BUS_DMASYNC_POSTWRITE); + bus_dmamap_unload(txq->ift_desc_tag, + txq->ift_sds.ifsd_map[cidx]); + } /* XXX we don't support any drivers that batch packets yet */ MPASS(m->m_nextpkt == NULL); m_freem(m); @@ -3400,6 +3477,8 @@ iflib_txq_can_drain(struct ifmp_ring *r) iflib_txq_t txq = r->cookie; if_ctx_t ctx = txq->ift_ctx; + bus_dmamap_sync(txq->ift_ifdi->idi_tag, txq->ift_ifdi->idi_map, + BUS_DMASYNC_POSTREAD); return ((TXQ_AVAIL(txq) > MAX_TX_DESC(ctx) + 2) || ctx->isc_txd_credits_update(ctx->ifc_softc, txq->ift_id, false)); } @@ -3564,6 +3643,8 @@ _task_fn_tx(void *context) if (!(if_getdrvflags(ctx->ifc_ifp) & IFF_DRV_RUNNING)) return; if (if_getcapenable(ifp) & IFCAP_NETMAP) { + bus_dmamap_sync(txq->ift_ifdi->idi_tag, txq->ift_ifdi->idi_map, + BUS_DMASYNC_POSTREAD); if (ctx->isc_txd_credits_update(ctx->ifc_softc, txq->ift_id, false)) netmap_tx_irq(ifp, txq->ift_id); IFDI_TX_QUEUE_INTR_ENABLE(ctx, txq->ift_id); @@ -5817,6 +5898,8 @@ iflib_tx_credits_update(if_ctx_t ctx, iflib_txq_t txq) if (ctx->isc_txd_credits_update == NULL) return (0); + bus_dmamap_sync(txq->ift_ifdi->idi_tag, txq->ift_ifdi->idi_map, + BUS_DMASYNC_POSTREAD); if ((credits = ctx->isc_txd_credits_update(ctx->ifc_softc, txq->ift_id, true)) == 0) return (0); From owner-svn-src-all@freebsd.org Wed Jan 16 05:51:05 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id C689114A3F62; Wed, 16 Jan 2019 05:51:04 +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 682E18DE09; Wed, 16 Jan 2019 05:51:04 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 3B5FF25FB1; Wed, 16 Jan 2019 05:51:04 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x0G5p4FD095718; Wed, 16 Jan 2019 05:51:04 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x0G5p468095717; Wed, 16 Jan 2019 05:51:04 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201901160551.x0G5p468095717@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Wed, 16 Jan 2019 05:51:04 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r343086 - head/sys/x86/x86 X-SVN-Group: head X-SVN-Commit-Author: kib X-SVN-Commit-Paths: head/sys/x86/x86 X-SVN-Commit-Revision: 343086 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 682E18DE09 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.98 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_SHORT(-0.98)[-0.979,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_LONG(-1.00)[-0.999,0] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 16 Jan 2019 05:51:05 -0000 Author: kib Date: Wed Jan 16 05:51:03 2019 New Revision: 343086 URL: https://svnweb.freebsd.org/changeset/base/343086 Log: Remove unused prototype. Sponsored by: The FreeBSD Foundation MFC after: 1 week Modified: head/sys/x86/x86/busdma_bounce.c Modified: head/sys/x86/x86/busdma_bounce.c ============================================================================== --- head/sys/x86/x86/busdma_bounce.c Wed Jan 16 05:44:14 2019 (r343085) +++ head/sys/x86/x86/busdma_bounce.c Wed Jan 16 05:51:03 2019 (r343086) @@ -142,7 +142,6 @@ static bus_addr_t add_bounce_page(bus_dma_tag_t dmat, vm_offset_t vaddr, bus_addr_t addr1, bus_addr_t addr2, bus_size_t size); static void free_bounce_page(bus_dma_tag_t dmat, struct bounce_page *bpage); -int run_filter(bus_dma_tag_t dmat, bus_addr_t paddr); static void _bus_dmamap_count_pages(bus_dma_tag_t dmat, bus_dmamap_t map, pmap_t pmap, void *buf, bus_size_t buflen, int flags); From owner-svn-src-all@freebsd.org Wed Jan 16 06:10:56 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 2D5DF14A4465; Wed, 16 Jan 2019 06:10:56 +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 C8B848E742; Wed, 16 Jan 2019 06:10:55 +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 BBFC2261FC; Wed, 16 Jan 2019 06:10:55 +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 x0G6AtHN006350; Wed, 16 Jan 2019 06:10:55 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x0G6Atlp006349; Wed, 16 Jan 2019 06:10:55 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201901160610.x0G6Atlp006349@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Wed, 16 Jan 2019 06:10:55 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r343087 - head/sys/x86/x86 X-SVN-Group: head X-SVN-Commit-Author: kib X-SVN-Commit-Paths: head/sys/x86/x86 X-SVN-Commit-Revision: 343087 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: C8B848E742 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.97 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_SHORT(-0.97)[-0.967,0]; NEURAL_HAM_LONG(-1.00)[-0.999,0] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 16 Jan 2019 06:10:56 -0000 Author: kib Date: Wed Jan 16 06:10:55 2019 New Revision: 343087 URL: https://svnweb.freebsd.org/changeset/base/343087 Log: Style(9) fixes for x86/busdma_bounce.c. Remove extra parentheses. Adjust indents and lines fill. Sponsored by: The FreeBSD Foundation MFC after: 1 week Modified: head/sys/x86/x86/busdma_bounce.c Modified: head/sys/x86/x86/busdma_bounce.c ============================================================================== --- head/sys/x86/x86/busdma_bounce.c Wed Jan 16 05:51:03 2019 (r343086) +++ head/sys/x86/x86/busdma_bounce.c Wed Jan 16 06:10:55 2019 (r343087) @@ -137,19 +137,16 @@ static void init_bounce_pages(void *dummy); static int alloc_bounce_zone(bus_dma_tag_t dmat); static int alloc_bounce_pages(bus_dma_tag_t dmat, u_int numpages); static int reserve_bounce_pages(bus_dma_tag_t dmat, bus_dmamap_t map, - int commit); + int commit); static bus_addr_t add_bounce_page(bus_dma_tag_t dmat, bus_dmamap_t map, - vm_offset_t vaddr, bus_addr_t addr1, - bus_addr_t addr2, bus_size_t size); + vm_offset_t vaddr, bus_addr_t addr1, bus_addr_t addr2, bus_size_t size); static void free_bounce_page(bus_dma_tag_t dmat, struct bounce_page *bpage); static void _bus_dmamap_count_pages(bus_dma_tag_t dmat, bus_dmamap_t map, - pmap_t pmap, void *buf, bus_size_t buflen, - int flags); + pmap_t pmap, void *buf, bus_size_t buflen, int flags); static void _bus_dmamap_count_phys(bus_dma_tag_t dmat, bus_dmamap_t map, - vm_paddr_t buf, bus_size_t buflen, - int flags); + vm_paddr_t buf, bus_size_t buflen, int flags); static int _bus_dmamap_reserve_pages(bus_dma_tag_t dmat, bus_dmamap_t map, - int flags); + int flags); static int bounce_bus_dma_zone_setup(bus_dma_tag_t dmat) @@ -202,15 +199,15 @@ bounce_bus_dma_tag_create(bus_dma_tag_t parent, bus_si newtag->map_count = 0; newtag->segments = NULL; - if (parent != NULL && ((newtag->common.filter != NULL) || - ((parent->bounce_flags & BUS_DMA_COULD_BOUNCE) != 0))) + if (parent != NULL && (newtag->common.filter != NULL || + (parent->bounce_flags & BUS_DMA_COULD_BOUNCE) != 0)) newtag->bounce_flags |= BUS_DMA_COULD_BOUNCE; if (newtag->common.lowaddr < ptoa((vm_paddr_t)Maxmem) || newtag->common.alignment > 1) newtag->bounce_flags |= BUS_DMA_COULD_BOUNCE; - if (((newtag->bounce_flags & BUS_DMA_COULD_BOUNCE) != 0) && + if ((newtag->bounce_flags & BUS_DMA_COULD_BOUNCE) != 0 && (flags & BUS_DMA_ALLOCNOW) != 0) error = bounce_bus_dma_zone_setup(newtag); else @@ -309,7 +306,7 @@ bounce_bus_dmamap_create(bus_dma_tag_t dmat, int flags * exclusion region, a data alignment that is stricter than 1, and/or * an active address boundary. */ - if (dmat->bounce_flags & BUS_DMA_COULD_BOUNCE) { + if ((dmat->bounce_flags & BUS_DMA_COULD_BOUNCE) != 0) { /* Must bounce */ if (dmat->bounce_zone == NULL) { if ((error = alloc_bounce_zone(dmat)) != 0) @@ -448,14 +445,15 @@ bounce_bus_dmamem_alloc(bus_dma_tag_t dmat, void** vad * * In the meantime warn the user if malloc gets it wrong. */ - if ((dmat->common.maxsize <= PAGE_SIZE) && - (dmat->common.alignment <= dmat->common.maxsize) && + if (dmat->common.maxsize <= PAGE_SIZE && + dmat->common.alignment <= dmat->common.maxsize && dmat->common.lowaddr >= ptoa((vm_paddr_t)Maxmem) && attr == VM_MEMATTR_DEFAULT) { *vaddr = malloc_domainset(dmat->common.maxsize, M_DEVBUF, DOMAINSET_PREF(dmat->common.domain), mflags); } else if (dmat->common.nsegments >= - howmany(dmat->common.maxsize, MIN(dmat->common.maxsegsz, PAGE_SIZE)) && + howmany(dmat->common.maxsize, MIN(dmat->common.maxsegsz, + PAGE_SIZE)) && dmat->common.alignment <= PAGE_SIZE && (dmat->common.boundary % PAGE_SIZE) == 0) { /* Page-based multi-segment allocations allowed */ @@ -512,7 +510,7 @@ _bus_dmamap_count_phys(bus_dma_tag_t dmat, bus_dmamap_ bus_addr_t curaddr; bus_size_t sgsize; - if ((map != &nobounce_dmamap && map->pagesneeded == 0)) { + if (map != &nobounce_dmamap && map->pagesneeded == 0) { /* * Count the number of bounce pages * needed in order to complete this transfer @@ -541,7 +539,7 @@ _bus_dmamap_count_pages(bus_dma_tag_t dmat, bus_dmamap bus_addr_t paddr; bus_size_t sg_len; - if ((map != &nobounce_dmamap && map->pagesneeded == 0)) { + if (map != &nobounce_dmamap && map->pagesneeded == 0) { CTR4(KTR_BUSDMA, "lowaddr= %d Maxmem= %d, boundary= %d, " "alignment= %d", dmat->common.lowaddr, ptoa((vm_paddr_t)Maxmem), @@ -580,7 +578,7 @@ _bus_dmamap_count_ma(bus_dma_tag_t dmat, bus_dmamap_t int page_index; vm_paddr_t paddr; - if ((map != &nobounce_dmamap && map->pagesneeded == 0)) { + if (map != &nobounce_dmamap && map->pagesneeded == 0) { CTR4(KTR_BUSDMA, "lowaddr= %d Maxmem= %d, boundary= %d, " "alignment= %d", dmat->common.lowaddr, ptoa((vm_paddr_t)Maxmem), @@ -718,7 +716,7 @@ bounce_bus_dmamap_load_phys(bus_dma_tag_t dmat, bus_dm while (buflen > 0) { curaddr = buf; sgsize = MIN(buflen, dmat->common.maxsegsz); - if (((dmat->bounce_flags & BUS_DMA_COULD_BOUNCE) != 0) && + if ((dmat->bounce_flags & BUS_DMA_COULD_BOUNCE) != 0 && map->pagesneeded != 0 && bus_dma_run_filter(&dmat->common, curaddr)) { sgsize = MIN(sgsize, PAGE_SIZE - (curaddr & PAGE_MASK)); @@ -786,7 +784,7 @@ bounce_bus_dmamap_load_buffer(bus_dma_tag_t dmat, bus_ */ max_sgsize = MIN(buflen, dmat->common.maxsegsz); sgsize = PAGE_SIZE - (curaddr & PAGE_MASK); - if (((dmat->bounce_flags & BUS_DMA_COULD_BOUNCE) != 0) && + if ((dmat->bounce_flags & BUS_DMA_COULD_BOUNCE) != 0 && map->pagesneeded != 0 && bus_dma_run_filter(&dmat->common, curaddr)) { sgsize = roundup2(sgsize, dmat->common.alignment); @@ -853,7 +851,7 @@ bounce_bus_dmamap_load_ma(bus_dma_tag_t dmat, bus_dmam paddr = VM_PAGE_TO_PHYS(ma[page_index]) + ma_offs; max_sgsize = MIN(buflen, dmat->common.maxsegsz); sgsize = PAGE_SIZE - ma_offs; - if (((dmat->bounce_flags & BUS_DMA_COULD_BOUNCE) != 0) && + if ((dmat->bounce_flags & BUS_DMA_COULD_BOUNCE) != 0 && map->pagesneeded != 0 && bus_dma_run_filter(&dmat->common, paddr)) { sgsize = roundup2(sgsize, dmat->common.alignment); @@ -1066,9 +1064,9 @@ alloc_bounce_zone(bus_dma_tag_t dmat) /* Check to see if we already have a suitable zone */ STAILQ_FOREACH(bz, &bounce_zone_list, links) { - if ((dmat->common.alignment <= bz->alignment) && - (dmat->common.lowaddr >= bz->lowaddr) && - (dmat->common.domain == bz->domain)) { + if (dmat->common.alignment <= bz->alignment && + dmat->common.lowaddr >= bz->lowaddr && + dmat->common.domain == bz->domain) { dmat->bounce_zone = bz; return (0); } @@ -1196,7 +1194,7 @@ reserve_bounce_pages(bus_dma_tag_t dmat, bus_dmamap_t static bus_addr_t add_bounce_page(bus_dma_tag_t dmat, bus_dmamap_t map, vm_offset_t vaddr, - bus_addr_t addr1, bus_addr_t addr2, bus_size_t size) + bus_addr_t addr1, bus_addr_t addr2, bus_size_t size) { struct bounce_zone *bz; struct bounce_page *bpage; From owner-svn-src-all@freebsd.org Wed Jan 16 10:23:54 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 018DF148273A; Wed, 16 Jan 2019 10:23:54 +0000 (UTC) (envelope-from brde@optusnet.com.au) Received: from mail106.syd.optusnet.com.au (mail106.syd.optusnet.com.au [211.29.132.42]) by mx1.freebsd.org (Postfix) with ESMTP id 4D417955E6; Wed, 16 Jan 2019 10:23:52 +0000 (UTC) (envelope-from brde@optusnet.com.au) Received: from [192.168.0.102] (c110-21-101-228.carlnfd1.nsw.optusnet.com.au [110.21.101.228]) by mail106.syd.optusnet.com.au (Postfix) with ESMTPS id 818183CDA81; Wed, 16 Jan 2019 21:23:42 +1100 (AEDT) Date: Wed, 16 Jan 2019 21:23:38 +1100 (EST) From: Bruce Evans X-X-Sender: bde@besplex.bde.org To: Gleb Smirnoff cc: Justin Hibbits , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r343058 - in head/sys: compat/linuxkpi/common/src vm In-Reply-To: <20190115200617.GZ18452@FreeBSD.org> Message-ID: <20190116204533.X1031@besplex.bde.org> References: <201901151933.x0FJXl8a069317@repo.freebsd.org> <20190115134623.139064b2@titan.knownspace> <20190115200617.GZ18452@FreeBSD.org> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed X-Optus-CM-Score: 0 X-Optus-CM-Analysis: v=2.2 cv=FNpr/6gs c=1 sm=1 tr=0 a=PalzARQSbocsUSjMRkwAPg==:117 a=PalzARQSbocsUSjMRkwAPg==:17 a=kj9zAlcOel0A:10 a=66gzK4BooDlOObVp9BoA:9 a=CjuIK1q_8ugA:10 X-Rspamd-Queue-Id: 4D417955E6 X-Spamd-Bar: ------ Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-6.97 / 15.00]; NEURAL_HAM_MEDIUM(-1.00)[-1.000,0]; NEURAL_HAM_SHORT(-0.97)[-0.974,0]; REPLY(-4.00)[]; NEURAL_HAM_LONG(-1.00)[-1.000,0] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 16 Jan 2019 10:23:54 -0000 On Tue, 15 Jan 2019, Gleb Smirnoff wrote: > On Tue, Jan 15, 2019 at 01:46:23PM -0600, Justin Hibbits wrote: > J> Why not #include counter.h in the relevant vm_machdep.c files instead? > > This also is ugly :( Not sure more or less. Probably less, but I > urged to plug all possible compilation failures at a time. It is better, but it is a bug if vm_machdep.c files include uma's internal header. Perhaps Justin meant vm files other than vm_machdep.c. The only non-uma ones in vm/* chummy with uma's internals are memguard.c and vm_page.c. > What is ugly is that most files just need counter_u64_t size, > and they don't use counter(9) KPI. > > The fact that vm_machdep or Linux KPI want to look into internal > type uma_zone_t is also ugly. This is a bug in uma. style(9) forbids using typedefs for struct types and pointers to struct types, since these are usually just foot shooting. They usually give the opposite of opaque types, since the header that declarers them usually also declares lots of pollution and often declares the internals of the types that are supposed to be opaque. I, partially fixed this in my version about 15 years ago: XX Index: uma.h XX =================================================================== XX RCS file: /home/ncvs/src/sys/vm/uma.h,v XX retrieving revision 1.18 XX diff -u -2 -r1.18 uma.h XX --- uma.h 1 Jun 2004 01:36:26 -0000 1.18 XX +++ uma.h 1 Jun 2004 08:52:15 -0000 XX @@ -25,17 +25,21 @@ XX * XX * $FreeBSD: src/sys/vm/uma.h,v 1.18 2004/06/01 01:36:26 bmilekic Exp $ XX - * XX */ XX XX +#ifndef _VM_UMA_H_ XX +#define _VM_UMA_H_ XX + XX /* XX * uma.h - External definitions for the Universal Memory Allocator XX - * XX -*/ XX + */ XX XX -#ifndef VM_UMA_H XX -#define VM_UMA_H XX +#include XX XX -#include /* For NULL */ XX -#include /* For M_* */ XX +/* Shared with . */ XX +#define M_NOWAIT 0x0001 /* do not block */ XX +#define M_WAITOK 0x0002 /* do not block */ XX +#define M_ZERO 0x0100 /* bzero the allocation */ XX +#define M_NOVM 0x0200 /* don't ask VM for pages */ XX +#define M_USE_RESERVE 0x0400 /* can alloc out of reserve memory */ XX XX /* User visable parameters */ uma.h has grosser pollution for NULL and M_*. I don't like lots of little headers like sys/_null.h, but it may as well be used when it exists. Replicating the definitions of M_* is easier than replicating the definition of NULL. XX @@ -44,7 +48,6 @@ XX /* Types and type defs */ XX XX -struct uma_zone; XX /* Opaque type used as a handle to the zone */ XX -typedef struct uma_zone * uma_zone_t; XX +typedef struct uma_zone * uma_zone_t; /* XXX actually non-opaque. */ XX XX /* I didn't completely fix this. The full fix would remove the typedef. XX @@ -254,6 +257,8 @@ XX * returned if the zone is empty or the ctor failed. XX */ XX - XX +#ifndef _UMA_ZALLOC_ARG_DECLARED XX void *uma_zalloc_arg(uma_zone_t zone, void *arg, int flags); XX +#define _UMA_ZALLOC_ARG_DECLARED XX +#endif XX XX /* XX @@ -282,6 +287,8 @@ XX * Nothing. XX */ XX - XX +#ifndef _UMA_ZFREE_ARG_DECLARED XX void uma_zfree_arg(uma_zone_t zone, void *item, void *arg); XX +#define _UMA_ZFREE_ARG_DECLARED XX +#endif XX XX /* These ifdefs fix the largest source of pollution. The declarations are repeated in so that mbuf.h doesn't need to include . These functions aren't even inline, so calling them in inline functions in mbuf.h (and inlining these functions) is especially useless. I also fixed mbuf.h to not include . and are among the few files that I completed removal of pollution in 20-25 years ago. Now they are much more polluted than when I started cleaning them. mbuf.h now includes: sys/param.h, sys/systm.h (_KERNEL only), sys/queue.h (this is not considered pollution, and I didn't clean it), sys/_lock.h, sys/_mutex.h, machine/_limits.h (the last 3 are needed for too much inlining, but are not considered pollution). malloc.h now includes (in bogus order): sys/queue.h, sys/systm.h, vm/uma.h and its nested pollution (last 2 _KERNEL only), sys/lock.h (WITNESS only), sys/sdt.h (_KERNEL only, and not in the suckage section). XX @@ -504,3 +511,3 @@ XX u_int32_t *uma_find_refcnt(uma_zone_t zone, void *item); XX XX -#endif XX +#endif /* !_VM_UMA_H_ */ The patch is for a 2004 version. The current version starts with the same bugs and ends with 2 bugs in the fix for the missing comment. Bruce From owner-svn-src-all@freebsd.org Wed Jan 16 10:33:52 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id D52C91482FAE; Wed, 16 Jan 2019 10:33:52 +0000 (UTC) (envelope-from avos@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 4C28E95D6A; Wed, 16 Jan 2019 10:33:52 +0000 (UTC) (envelope-from avos@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1: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 3D034F85; Wed, 16 Jan 2019 10:33:52 +0000 (UTC) (envelope-from avos@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x0GAXqlS048014; Wed, 16 Jan 2019 10:33:52 GMT (envelope-from avos@FreeBSD.org) Received: (from avos@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x0GAXpTv048012; Wed, 16 Jan 2019 10:33:51 GMT (envelope-from avos@FreeBSD.org) Message-Id: <201901161033.x0GAXpTv048012@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: avos set sender to avos@FreeBSD.org using -f From: Andriy Voskoboinyk Date: Wed, 16 Jan 2019 10:33:51 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r343088 - in head/sys/dev: rtwn/usb usb X-SVN-Group: head X-SVN-Commit-Author: avos X-SVN-Commit-Paths: in head/sys/dev: rtwn/usb usb X-SVN-Commit-Revision: 343088 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 4C28E95D6A X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.97 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_SHORT(-0.98)[-0.975,0]; NEURAL_HAM_LONG(-1.00)[-0.999,0] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 16 Jan 2019 10:33:53 -0000 Author: avos Date: Wed Jan 16 10:33:51 2019 New Revision: 343088 URL: https://svnweb.freebsd.org/changeset/base/343088 Log: rtwn_usb(4): add new USB id for RTL8821AU Reported by: Mike Tancsa Tested by: Mike Tancsa MFC after: 3 days Modified: head/sys/dev/rtwn/usb/rtwn_usb_attach.h head/sys/dev/usb/usbdevs Modified: head/sys/dev/rtwn/usb/rtwn_usb_attach.h ============================================================================== --- head/sys/dev/rtwn/usb/rtwn_usb_attach.h Wed Jan 16 06:10:55 2019 (r343087) +++ head/sys/dev/rtwn/usb/rtwn_usb_attach.h Wed Jan 16 10:33:51 2019 (r343088) @@ -156,7 +156,8 @@ static const STRUCT_USB_HOST_ID rtwn_devs[] = { RTWN_RTL8821AU_DEV(EDIMAX, EW7811UTC_2), RTWN_RTL8821AU_DEV(HAWKING, HD65U), RTWN_RTL8821AU_DEV(MELCO, WIU2433DM), - RTWN_RTL8821AU_DEV(NETGEAR, A6100) + RTWN_RTL8821AU_DEV(NETGEAR, A6100), + RTWN_RTL8821AU_DEV(REALTEK, RTL8821AU) #undef RTWN_RTL8821AU_DEV }; Modified: head/sys/dev/usb/usbdevs ============================================================================== --- head/sys/dev/usb/usbdevs Wed Jan 16 06:10:55 2019 (r343087) +++ head/sys/dev/usb/usbdevs Wed Jan 16 10:33:51 2019 (r343088) @@ -3957,6 +3957,7 @@ product REALTEK RTL8187B_2 0x8198 RTL8187B Wireless Ad product REALTEK RTL8712 0x8712 RTL8712 product REALTEK RTL8713 0x8713 RTL8713 product REALTEK RTL8188CU_COMBO 0x8754 RTL8188CU +product REALTEK RTL8821AU 0xa811 RTL8821AU product REALTEK RTL8723BU 0xb720 RTL8723BU product REALTEK RTL8192SU 0xc512 RTL8192SU product REALTEK RTL8812AU 0x8812 RTL8812AU Wireless Adapter From owner-svn-src-all@freebsd.org Wed Jan 16 11:33:49 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id EBF051484756; Wed, 16 Jan 2019 11:33:48 +0000 (UTC) (envelope-from tuexen@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 9399897FE8; Wed, 16 Jan 2019 11:33:48 +0000 (UTC) (envelope-from tuexen@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1: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 80C9A19AC; Wed, 16 Jan 2019 11:33:48 +0000 (UTC) (envelope-from tuexen@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x0GBXmiH003396; Wed, 16 Jan 2019 11:33:48 GMT (envelope-from tuexen@FreeBSD.org) Received: (from tuexen@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x0GBXmmV003394; Wed, 16 Jan 2019 11:33:48 GMT (envelope-from tuexen@FreeBSD.org) Message-Id: <201901161133.x0GBXmmV003394@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: tuexen set sender to tuexen@FreeBSD.org using -f From: Michael Tuexen Date: Wed, 16 Jan 2019 11:33:48 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r343089 - head/sys/netinet X-SVN-Group: head X-SVN-Commit-Author: tuexen X-SVN-Commit-Paths: head/sys/netinet X-SVN-Commit-Revision: 343089 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 9399897FE8 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.96 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_SHORT(-0.96)[-0.965,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_LONG(-1.00)[-0.999,0] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 16 Jan 2019 11:33:49 -0000 Author: tuexen Date: Wed Jan 16 11:33:47 2019 New Revision: 343089 URL: https://svnweb.freebsd.org/changeset/base/343089 Log: Limit the user-controllable amount of memory the kernel allocates via IPPROTO_SCTP level socket options. This issue was found by running syzkaller. MFC after: 1 week Modified: head/sys/netinet/sctp_constants.h head/sys/netinet/sctp_usrreq.c Modified: head/sys/netinet/sctp_constants.h ============================================================================== --- head/sys/netinet/sctp_constants.h Wed Jan 16 10:33:51 2019 (r343088) +++ head/sys/netinet/sctp_constants.h Wed Jan 16 11:33:47 2019 (r343089) @@ -983,6 +983,9 @@ __FBSDID("$FreeBSD$"); ((((uint8_t *)&(a)->s_addr)[0] == 169) && \ (((uint8_t *)&(a)->s_addr)[1] == 254)) +/* Maximum size of optval for IPPROTO_SCTP level socket options. */ +#define SCTP_SOCKET_OPTION_LIMIT (64 * 1024) + #if defined(_KERNEL) #define SCTP_GETTIME_TIMEVAL(x) (getmicrouptime(x)) Modified: head/sys/netinet/sctp_usrreq.c ============================================================================== --- head/sys/netinet/sctp_usrreq.c Wed Jan 16 10:33:51 2019 (r343088) +++ head/sys/netinet/sctp_usrreq.c Wed Jan 16 11:33:47 2019 (r343089) @@ -6828,6 +6828,10 @@ sctp_ctloutput(struct socket *so, struct sockopt *sopt return (error); } optsize = sopt->sopt_valsize; + if (optsize > SCTP_SOCKET_OPTION_LIMIT) { + SCTP_LTRACE_ERR_RET(so->so_pcb, NULL, NULL, SCTP_FROM_SCTP_USRREQ, ENOBUFS); + return (ENOBUFS); + } if (optsize) { SCTP_MALLOC(optval, void *, optsize, SCTP_M_SOCKOPT); if (optval == NULL) { From owner-svn-src-all@freebsd.org Wed Jan 16 12:04:26 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 9E9171485E34; Wed, 16 Jan 2019 12:04:26 +0000 (UTC) (envelope-from bapt@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 41BA06A954; Wed, 16 Jan 2019 12:04:26 +0000 (UTC) (envelope-from bapt@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 3417E1EC8; Wed, 16 Jan 2019 12:04:26 +0000 (UTC) (envelope-from bapt@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x0GC4QVj019153; Wed, 16 Jan 2019 12:04:26 GMT (envelope-from bapt@FreeBSD.org) Received: (from bapt@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x0GC4PJp019148; Wed, 16 Jan 2019 12:04:25 GMT (envelope-from bapt@FreeBSD.org) Message-Id: <201901161204.x0GC4PJp019148@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bapt set sender to bapt@FreeBSD.org using -f From: Baptiste Daroussin Date: Wed, 16 Jan 2019 12:04: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: r343090 - stable/12/lib/libedit X-SVN-Group: stable-12 X-SVN-Commit-Author: bapt X-SVN-Commit-Paths: stable/12/lib/libedit X-SVN-Commit-Revision: 343090 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 41BA06A954 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.96 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_SHORT(-0.96)[-0.965,0]; NEURAL_HAM_LONG(-1.00)[-0.999,0] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 16 Jan 2019 12:04:26 -0000 Author: bapt Date: Wed Jan 16 12:04:24 2019 New Revision: 343090 URL: https://svnweb.freebsd.org/changeset/base/343090 Log: MFC r340933: libedit: improve multibyte support Until this commit libedit only supported UTF-8 for multibyte charset Improve it to support other multibyte charsets Tested with eucJP and SJIS charsets. Note that this change as been review and committed in upstream libedit as well via christos@NetBSD Submitted by: naito.yuichiro _at_ gmail.com Reviewed by: bapt, pfg, yuripv, 0mp Differential Revision: https://reviews.freebsd.org/D17903 Modified: stable/12/lib/libedit/chartype.c stable/12/lib/libedit/chartype.h stable/12/lib/libedit/el.c stable/12/lib/libedit/el.h stable/12/lib/libedit/read.c Directory Properties: stable/12/ (props changed) Modified: stable/12/lib/libedit/chartype.c ============================================================================== --- stable/12/lib/libedit/chartype.c Wed Jan 16 11:33:47 2019 (r343089) +++ stable/12/lib/libedit/chartype.c Wed Jan 16 12:04:24 2019 (r343090) @@ -37,6 +37,7 @@ __RCSID("$NetBSD: chartype.c,v 1.23 2016/02/28 23:02:2 __FBSDID("$FreeBSD$"); #include +#include #include #include @@ -182,17 +183,13 @@ ct_decode_argv(int argc, const char *argv[], ct_buffer protected size_t ct_enc_width(Char c) { - /* UTF-8 encoding specific values */ - if (c < 0x80) - return 1; - else if (c < 0x0800) - return 2; - else if (c < 0x10000) - return 3; - else if (c < 0x110000) - return 4; - else - return 0; /* not a valid codepoint */ + mbstate_t ps = (mbstate_t){{0}}; + size_t len; + char cbuf[MB_LEN_MAX]; + len = ct_wcrtomb(cbuf, c, &ps); + if (len == (size_t)-1) + return (0); + return (len); } protected ssize_t Modified: stable/12/lib/libedit/chartype.h ============================================================================== --- stable/12/lib/libedit/chartype.h Wed Jan 16 11:33:47 2019 (r343089) +++ stable/12/lib/libedit/chartype.h Wed Jan 16 12:04:24 2019 (r343090) @@ -56,6 +56,7 @@ #define ct_wctob wctob #define ct_wctomb wctomb +#define ct_wcrtomb wcrtomb #define ct_wctomb_reset wctomb(0,0) #define ct_wcstombs wcstombs #define ct_mbstowcs mbstowcs @@ -109,6 +110,7 @@ Width(wchar_t c) #define ct_wctob(w) ((int)(w)) #define ct_wctomb error +#define ct_wcrtomb error #define ct_wctomb_reset #define ct_wcstombs(a, b, c) (strncpy(a, b, c), strlen(a)) #define ct_mbstowcs(a, b, c) (strncpy(a, b, c), strlen(a)) Modified: stable/12/lib/libedit/el.c ============================================================================== --- stable/12/lib/libedit/el.c Wed Jan 16 11:33:47 2019 (r343089) +++ stable/12/lib/libedit/el.c Wed Jan 16 12:04:24 2019 (r343090) @@ -99,10 +99,6 @@ el_init_fd(const char *prog, FILE *fin, FILE *fout, FI * Initialize all the modules. Order is important!!! */ el->el_flags = 0; - if (setlocale(LC_CTYPE, NULL) != NULL){ - if (strcmp(nl_langinfo(CODESET), "UTF-8") == 0) - el->el_flags |= CHARSET_IS_UTF8; - } if (terminal_init(el) == -1) { el_free(el->el_prog); @@ -293,7 +289,7 @@ FUN(el,set)(EditLine *el, int op, ...) void *ptr = va_arg(ap, void *); rv = hist_set(el, func, ptr); - if (!(el->el_flags & CHARSET_IS_UTF8)) + if (MB_CUR_MAX == 1) el->el_flags &= ~NARROW_HISTORY; break; } Modified: stable/12/lib/libedit/el.h ============================================================================== --- stable/12/lib/libedit/el.h Wed Jan 16 11:33:47 2019 (r343089) +++ stable/12/lib/libedit/el.h Wed Jan 16 12:04:24 2019 (r343090) @@ -56,7 +56,6 @@ #define NO_TTY 0x02 #define EDIT_DISABLED 0x04 #define UNBUFFERED 0x08 -#define CHARSET_IS_UTF8 0x10 #define NARROW_HISTORY 0x40 typedef unsigned char el_action_t; /* Index to command array */ Modified: stable/12/lib/libedit/read.c ============================================================================== --- stable/12/lib/libedit/read.c Wed Jan 16 11:33:47 2019 (r343089) +++ stable/12/lib/libedit/read.c Wed Jan 16 12:04:24 2019 (r343090) @@ -363,13 +363,7 @@ read_char(EditLine *el, wchar_t *cp) goto again; } case (size_t)-2: - /* - * We don't support other multibyte charsets. - * The second condition shouldn't happen - * and is here merely for additional safety. - */ - if ((el->el_flags & CHARSET_IS_UTF8) == 0 || - cbp >= MB_LEN_MAX) { + if (cbp >= MB_LEN_MAX) { errno = EILSEQ; *cp = L'\0'; return -1; From owner-svn-src-all@freebsd.org Wed Jan 16 12:04:32 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 011171485E6C; Wed, 16 Jan 2019 12:04:32 +0000 (UTC) (envelope-from bapt@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 246456A980; Wed, 16 Jan 2019 12:04:31 +0000 (UTC) (envelope-from bapt@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 8CB6C1EC9; Wed, 16 Jan 2019 12:04:30 +0000 (UTC) (envelope-from bapt@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x0GC4U5N019202; Wed, 16 Jan 2019 12:04:30 GMT (envelope-from bapt@FreeBSD.org) Received: (from bapt@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x0GC4TGm019196; Wed, 16 Jan 2019 12:04:29 GMT (envelope-from bapt@FreeBSD.org) Message-Id: <201901161204.x0GC4TGm019196@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bapt set sender to bapt@FreeBSD.org using -f From: Baptiste Daroussin Date: Wed, 16 Jan 2019 12:04:29 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r343091 - stable/11/lib/libedit X-SVN-Group: stable-11 X-SVN-Commit-Author: bapt X-SVN-Commit-Paths: stable/11/lib/libedit X-SVN-Commit-Revision: 343091 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 246456A980 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.96 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_LONG(-1.00)[-0.999,0]; NEURAL_HAM_SHORT(-0.96)[-0.965,0] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 16 Jan 2019 12:04:32 -0000 Author: bapt Date: Wed Jan 16 12:04:29 2019 New Revision: 343091 URL: https://svnweb.freebsd.org/changeset/base/343091 Log: MFC r340933: libedit: improve multibyte support Until this commit libedit only supported UTF-8 for multibyte charset Improve it to support other multibyte charsets Tested with eucJP and SJIS charsets. Note that this change as been review and committed in upstream libedit as well via christos@NetBSD Submitted by: naito.yuichiro _at_ gmail.com Reviewed by: bapt, pfg, yuripv, 0mp Differential Revision: https://reviews.freebsd.org/D17903 Modified: stable/11/lib/libedit/chartype.c stable/11/lib/libedit/chartype.h stable/11/lib/libedit/el.c stable/11/lib/libedit/el.h stable/11/lib/libedit/read.c Directory Properties: stable/11/ (props changed) Modified: stable/11/lib/libedit/chartype.c ============================================================================== --- stable/11/lib/libedit/chartype.c Wed Jan 16 12:04:24 2019 (r343090) +++ stable/11/lib/libedit/chartype.c Wed Jan 16 12:04:29 2019 (r343091) @@ -37,6 +37,7 @@ __RCSID("$NetBSD: chartype.c,v 1.23 2016/02/28 23:02:2 __FBSDID("$FreeBSD$"); #include +#include #include #include @@ -182,17 +183,13 @@ ct_decode_argv(int argc, const char *argv[], ct_buffer protected size_t ct_enc_width(Char c) { - /* UTF-8 encoding specific values */ - if (c < 0x80) - return 1; - else if (c < 0x0800) - return 2; - else if (c < 0x10000) - return 3; - else if (c < 0x110000) - return 4; - else - return 0; /* not a valid codepoint */ + mbstate_t ps = (mbstate_t){{0}}; + size_t len; + char cbuf[MB_LEN_MAX]; + len = ct_wcrtomb(cbuf, c, &ps); + if (len == (size_t)-1) + return (0); + return (len); } protected ssize_t Modified: stable/11/lib/libedit/chartype.h ============================================================================== --- stable/11/lib/libedit/chartype.h Wed Jan 16 12:04:24 2019 (r343090) +++ stable/11/lib/libedit/chartype.h Wed Jan 16 12:04:29 2019 (r343091) @@ -56,6 +56,7 @@ #define ct_wctob wctob #define ct_wctomb wctomb +#define ct_wcrtomb wcrtomb #define ct_wctomb_reset wctomb(0,0) #define ct_wcstombs wcstombs #define ct_mbstowcs mbstowcs @@ -109,6 +110,7 @@ Width(wchar_t c) #define ct_wctob(w) ((int)(w)) #define ct_wctomb error +#define ct_wcrtomb error #define ct_wctomb_reset #define ct_wcstombs(a, b, c) (strncpy(a, b, c), strlen(a)) #define ct_mbstowcs(a, b, c) (strncpy(a, b, c), strlen(a)) Modified: stable/11/lib/libedit/el.c ============================================================================== --- stable/11/lib/libedit/el.c Wed Jan 16 12:04:24 2019 (r343090) +++ stable/11/lib/libedit/el.c Wed Jan 16 12:04:29 2019 (r343091) @@ -99,10 +99,6 @@ el_init_fd(const char *prog, FILE *fin, FILE *fout, FI * Initialize all the modules. Order is important!!! */ el->el_flags = 0; - if (setlocale(LC_CTYPE, NULL) != NULL){ - if (strcmp(nl_langinfo(CODESET), "UTF-8") == 0) - el->el_flags |= CHARSET_IS_UTF8; - } if (terminal_init(el) == -1) { el_free(el->el_prog); @@ -293,7 +289,7 @@ FUN(el,set)(EditLine *el, int op, ...) void *ptr = va_arg(ap, void *); rv = hist_set(el, func, ptr); - if (!(el->el_flags & CHARSET_IS_UTF8)) + if (MB_CUR_MAX == 1) el->el_flags &= ~NARROW_HISTORY; break; } Modified: stable/11/lib/libedit/el.h ============================================================================== --- stable/11/lib/libedit/el.h Wed Jan 16 12:04:24 2019 (r343090) +++ stable/11/lib/libedit/el.h Wed Jan 16 12:04:29 2019 (r343091) @@ -56,7 +56,6 @@ #define NO_TTY 0x02 #define EDIT_DISABLED 0x04 #define UNBUFFERED 0x08 -#define CHARSET_IS_UTF8 0x10 #define NARROW_HISTORY 0x40 typedef unsigned char el_action_t; /* Index to command array */ Modified: stable/11/lib/libedit/read.c ============================================================================== --- stable/11/lib/libedit/read.c Wed Jan 16 12:04:24 2019 (r343090) +++ stable/11/lib/libedit/read.c Wed Jan 16 12:04:29 2019 (r343091) @@ -363,13 +363,7 @@ read_char(EditLine *el, wchar_t *cp) goto again; } case (size_t)-2: - /* - * We don't support other multibyte charsets. - * The second condition shouldn't happen - * and is here merely for additional safety. - */ - if ((el->el_flags & CHARSET_IS_UTF8) == 0 || - cbp >= MB_LEN_MAX) { + if (cbp >= MB_LEN_MAX) { errno = EILSEQ; *cp = L'\0'; return -1; From owner-svn-src-all@freebsd.org Wed Jan 16 12:11:31 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id E33851486194; Wed, 16 Jan 2019 12:11:30 +0000 (UTC) (envelope-from avos@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 8984F6AF94; Wed, 16 Jan 2019 12:11:30 +0000 (UTC) (envelope-from avos@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1: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 7C2652020; Wed, 16 Jan 2019 12:11:30 +0000 (UTC) (envelope-from avos@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x0GCBUZf023612; Wed, 16 Jan 2019 12:11:30 GMT (envelope-from avos@FreeBSD.org) Received: (from avos@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x0GCBUhP023611; Wed, 16 Jan 2019 12:11:30 GMT (envelope-from avos@FreeBSD.org) Message-Id: <201901161211.x0GCBUhP023611@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: avos set sender to avos@FreeBSD.org using -f From: Andriy Voskoboinyk Date: Wed, 16 Jan 2019 12:11:30 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r343092 - in head/sys/dev/rtwn: rtl8192c rtl8812a X-SVN-Group: head X-SVN-Commit-Author: avos X-SVN-Commit-Paths: in head/sys/dev/rtwn: rtl8192c rtl8812a X-SVN-Commit-Revision: 343092 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 8984F6AF94 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.96 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_SHORT(-0.96)[-0.965,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_LONG(-1.00)[-0.999,0] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 16 Jan 2019 12:11:31 -0000 Author: avos Date: Wed Jan 16 12:11:29 2019 New Revision: 343092 URL: https://svnweb.freebsd.org/changeset/base/343092 Log: rtwn(4): clear 'basic' rate bit before calculating RTS/CTS rate. Rate tables have this bit set to indicate minimal set of basic rates; however, it overlappes with MCS bit, so rate2ridx() will treat them as an 11n rate. Due to the current rates setup the issue can be reproduced only in 5GHz band with 11n / protection enabled. Tested with RTL8821AU, HOSTAP mode. MFC after: 5 days Modified: head/sys/dev/rtwn/rtl8192c/r92c_tx.c head/sys/dev/rtwn/rtl8812a/r12a_tx.c Modified: head/sys/dev/rtwn/rtl8192c/r92c_tx.c ============================================================================== --- head/sys/dev/rtwn/rtl8192c/r92c_tx.c Wed Jan 16 12:04:29 2019 (r343091) +++ head/sys/dev/rtwn/rtl8192c/r92c_tx.c Wed Jan 16 12:11:29 2019 (r343092) @@ -103,7 +103,7 @@ r92c_tx_protection(struct rtwn_softc *sc, struct r92c_ rate = rtwn_ctl_mcsrate(ic->ic_rt, ridx); else rate = ieee80211_ctl_rate(ic->ic_rt, ridx2rate[ridx]); - ridx = rate2ridx(rate); + ridx = rate2ridx(IEEE80211_RV(rate)); txd->txdw4 |= htole32(SM(R92C_TXDW4_RTSRATE, ridx)); /* RTS rate fallback limit (max). */ Modified: head/sys/dev/rtwn/rtl8812a/r12a_tx.c ============================================================================== --- head/sys/dev/rtwn/rtl8812a/r12a_tx.c Wed Jan 16 12:04:29 2019 (r343091) +++ head/sys/dev/rtwn/rtl8812a/r12a_tx.c Wed Jan 16 12:11:29 2019 (r343092) @@ -111,7 +111,7 @@ r12a_tx_protection(struct rtwn_softc *sc, struct r12a_ rate = rtwn_ctl_mcsrate(ic->ic_rt, ridx); else rate = ieee80211_ctl_rate(ic->ic_rt, ridx2rate[ridx]); - ridx = rate2ridx(rate); + ridx = rate2ridx(IEEE80211_RV(rate)); txd->txdw4 |= htole32(SM(R12A_TXDW4_RTSRATE, ridx)); /* RTS rate fallback limit (max). */ From owner-svn-src-all@freebsd.org Wed Jan 16 12:12:41 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 7D54C148637D; Wed, 16 Jan 2019 12:12:41 +0000 (UTC) (envelope-from des@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 200286B1B0; Wed, 16 Jan 2019 12:12:41 +0000 (UTC) (envelope-from des@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1: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 123482071; Wed, 16 Jan 2019 12:12:41 +0000 (UTC) (envelope-from des@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x0GCCenw024505; Wed, 16 Jan 2019 12:12:40 GMT (envelope-from des@FreeBSD.org) Received: (from des@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x0GCCeRh024502; Wed, 16 Jan 2019 12:12:40 GMT (envelope-from des@FreeBSD.org) Message-Id: <201901161212.x0GCCeRh024502@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: des set sender to des@FreeBSD.org using -f From: =?UTF-8?Q?Dag-Erling_Sm=c3=b8rgrav?= Date: Wed, 16 Jan 2019 12:12:40 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r343093 - in head: include lib/libc/gen libexec/rtld-elf X-SVN-Group: head X-SVN-Commit-Author: des X-SVN-Commit-Paths: in head: include lib/libc/gen libexec/rtld-elf X-SVN-Commit-Revision: 343093 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 200286B1B0 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.96 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_LONG(-1.00)[-0.999,0]; NEURAL_HAM_SHORT(-0.97)[-0.966,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 16 Jan 2019 12:12:41 -0000 Author: des Date: Wed Jan 16 12:12:40 2019 New Revision: 343093 URL: https://svnweb.freebsd.org/changeset/base/343093 Log: Implement dlopenat(3). MFC after: 3 weeks Modified: head/include/dlfcn.h head/lib/libc/gen/dlopen.3 head/libexec/rtld-elf/rtld.c Modified: head/include/dlfcn.h ============================================================================== --- head/include/dlfcn.h Wed Jan 16 12:11:29 2019 (r343092) +++ head/include/dlfcn.h Wed Jan 16 12:12:40 2019 (r343093) @@ -120,6 +120,7 @@ void *dlopen(const char *, int); void *dlsym(void * __restrict, const char * __restrict); #if __BSD_VISIBLE +void *dlopenat(int, const char *, int); void *fdlopen(int, int); int dladdr(const void * __restrict, Dl_info * __restrict); dlfunc_t dlfunc(void * __restrict, const char * __restrict); Modified: head/lib/libc/gen/dlopen.3 ============================================================================== --- head/lib/libc/gen/dlopen.3 Wed Jan 16 12:11:29 2019 (r343092) +++ head/lib/libc/gen/dlopen.3 Wed Jan 16 12:12:40 2019 (r343093) @@ -32,11 +32,12 @@ .\" @(#) dlopen.3 1.6 90/01/31 SMI .\" $FreeBSD$ .\" -.Dd January 2, 2019 +.Dd January 15, 2019 .Dt DLOPEN 3 .Os .Sh NAME .Nm dlopen , +.Nm dlopenat , .Nm fdlopen , .Nm dlsym , .Nm dlvsym , @@ -51,6 +52,8 @@ .Ft void * .Fn dlopen "const char *path" "int mode" .Ft void * +.Fn dlopenat "int fd" "const char *path" "int mode" +.Ft void * .Fn fdlopen "int fd" "int mode" .Ft void * .Fn dlsym "void * restrict handle" "const char * restrict symbol" @@ -169,6 +172,24 @@ If fails, it returns a null pointer, and sets an error condition which may be interrogated with .Fn dlerror . +.Pp +The +.Fn dlopenat +function is equivalent to +.Fn dlopen +except in the case where the path specifies a relative path. +In this case the file to be opened is determined relative to the +directory associated with the file descriptor fd instead of the +current working directory. +If +.Fn dlopenat +is passed the special value +.Dv AT_FDCWD +in the +.Fa fd +parameter, the current working directory is used and the behavior is +identical to a call to +.Fn dlopen . .Pp The .Fn fdlopen Modified: head/libexec/rtld-elf/rtld.c ============================================================================== --- head/libexec/rtld-elf/rtld.c Wed Jan 16 12:11:29 2019 (r343092) +++ head/libexec/rtld-elf/rtld.c Wed Jan 16 12:12:40 2019 (r343093) @@ -93,8 +93,8 @@ static void digest_dynamic(Obj_Entry *, int); static Obj_Entry *digest_phdr(const Elf_Phdr *, int, caddr_t, const char *); static Obj_Entry *dlcheck(void *); static int dlclose_locked(void *, RtldLockState *); -static Obj_Entry *dlopen_object(const char *name, int fd, Obj_Entry *refobj, - int lo_flags, int mode, RtldLockState *lockstate); +static Obj_Entry *dlopen_object(int, const char *name, int fd, + Obj_Entry *refobj, int lo_flags, int mode, RtldLockState *lockstate); static Obj_Entry *do_load_object(int, const char *, char *, struct stat *, int); static int do_search_info(const Obj_Entry *obj, int, struct dl_serinfo *); static bool donelist_check(DoneList *, const Obj_Entry *); @@ -118,7 +118,7 @@ static void load_filtees(Obj_Entry *, int flags, RtldL static void unload_filtees(Obj_Entry *, RtldLockState *); static int load_needed_objects(Obj_Entry *, int); static int load_preload_objects(void); -static Obj_Entry *load_object(const char *, int fd, const Obj_Entry *, int); +static Obj_Entry *load_object(int, const char *, int, const Obj_Entry *, int); static void map_stacks_exec(RtldLockState *); static int obj_disable_relro(Obj_Entry *); static int obj_enforce_relro(Obj_Entry *); @@ -147,7 +147,7 @@ static int relocate_objects(Obj_Entry *, bool, Obj_Ent static int resolve_object_ifunc(Obj_Entry *, bool, int, RtldLockState *); static int rtld_dirname(const char *, char *); static int rtld_dirname_abs(const char *, char *); -static void *rtld_dlopen(const char *name, int fd, int mode); +static void *rtld_dlopen(int, const char *name, int fd, int mode); static void rtld_exit(void); static char *search_library_path(const char *, const char *, const char *, int *); @@ -231,6 +231,7 @@ extern Elf_Dyn _DYNAMIC; int dlclose(void *) __exported; char *dlerror(void) __exported; void *dlopen(const char *, int) __exported; +void *dlopenat(int, const char *, int) __exported; void *fdlopen(int, int) __exported; void *dlsym(void *, const char *) __exported; dlfunc_t dlfunc(void *, const char *) __exported; @@ -2292,8 +2293,8 @@ load_filtee1(Obj_Entry *obj, Needed_Entry *needed, int { for (; needed != NULL; needed = needed->next) { - needed->obj = dlopen_object(obj->strtab + needed->name, -1, obj, - flags, ((ld_loadfltr || obj->z_loadfltr) ? RTLD_NOW : RTLD_LAZY) | + needed->obj = dlopen_object(AT_FDCWD, obj->strtab + needed->name, -1, + obj, flags, ((ld_loadfltr || obj->z_loadfltr) ? RTLD_NOW : RTLD_LAZY) | RTLD_LOCAL, lockstate); } } @@ -2316,8 +2317,8 @@ process_needed(Obj_Entry *obj, Needed_Entry *needed, i Obj_Entry *obj1; for (; needed != NULL; needed = needed->next) { - obj1 = needed->obj = load_object(obj->strtab + needed->name, -1, obj, - flags & ~RTLD_LO_NOLOAD); + obj1 = needed->obj = load_object(AT_FDCWD, obj->strtab + needed->name, + -1, obj, flags & ~RTLD_LO_NOLOAD); if (obj1 == NULL && !ld_tracing && (flags & RTLD_LO_FILTEES) == 0) return (-1); } @@ -2360,7 +2361,7 @@ load_preload_objects(void) savech = p[len]; p[len] = '\0'; - obj = load_object(p, -1, NULL, 0); + obj = load_object(AT_FDCWD, p, -1, NULL, 0); if (obj == NULL) return -1; /* XXX - cleanup */ obj->z_interpose = true; @@ -2389,7 +2390,8 @@ printable_path(const char *path) * on failure. */ static Obj_Entry * -load_object(const char *name, int fd_u, const Obj_Entry *refobj, int flags) +load_object(int atfd, const char *name, int fd_u, const Obj_Entry *refobj, + int flags) { Obj_Entry *obj; int fd; @@ -2426,7 +2428,7 @@ load_object(const char *name, int fd_u, const Obj_Entr * To avoid a race, we open the file and use fstat() rather than * using stat(). */ - if ((fd = open(path, O_RDONLY | O_CLOEXEC | O_VERIFY)) == -1) { + if ((fd = openat(atfd, path, O_RDONLY | O_CLOEXEC | O_VERIFY)) == -1) { _rtld_error("Cannot open \"%s\"", path); free(path); return (NULL); @@ -3255,21 +3257,28 @@ dllockinit(void *context, } void * +dlopenat(int fd, const char *name, int mode) +{ + + return (rtld_dlopen(fd, name, -1, mode)); +} + +void * dlopen(const char *name, int mode) { - return (rtld_dlopen(name, -1, mode)); + return (rtld_dlopen(AT_FDCWD, name, -1, mode)); } void * fdlopen(int fd, int mode) { - return (rtld_dlopen(NULL, fd, mode)); + return (rtld_dlopen(AT_FDCWD, NULL, fd, mode)); } static void * -rtld_dlopen(const char *name, int fd, int mode) +rtld_dlopen(int atfd, const char *name, int fd, int mode) { RtldLockState lockstate; int lo_flags; @@ -3291,7 +3300,7 @@ rtld_dlopen(const char *name, int fd, int mode) if (ld_tracing != NULL) lo_flags |= RTLD_LO_TRACE; - return (dlopen_object(name, fd, obj_main, lo_flags, + return (dlopen_object(atfd, name, fd, obj_main, lo_flags, mode & (RTLD_MODEMASK | RTLD_GLOBAL), NULL)); } @@ -3306,8 +3315,8 @@ dlopen_cleanup(Obj_Entry *obj, RtldLockState *lockstat } static Obj_Entry * -dlopen_object(const char *name, int fd, Obj_Entry *refobj, int lo_flags, - int mode, RtldLockState *lockstate) +dlopen_object(int atfd, const char *name, int fd, Obj_Entry *refobj, + int lo_flags, int mode, RtldLockState *lockstate) { Obj_Entry *old_obj_tail; Obj_Entry *obj; @@ -3329,7 +3338,7 @@ dlopen_object(const char *name, int fd, Obj_Entry *ref obj = obj_main; obj->refcount++; } else { - obj = load_object(name, fd, refobj, lo_flags); + obj = load_object(atfd, name, fd, refobj, lo_flags); } if (obj) { From owner-svn-src-all@freebsd.org Wed Jan 16 12:33:08 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 1D0171486987; Wed, 16 Jan 2019 12:33:08 +0000 (UTC) (envelope-from avos@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 B8D9B6BAEC; Wed, 16 Jan 2019 12:33:07 +0000 (UTC) (envelope-from avos@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1: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 9146D23C2; Wed, 16 Jan 2019 12:33:07 +0000 (UTC) (envelope-from avos@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x0GCX7v5034927; Wed, 16 Jan 2019 12:33:07 GMT (envelope-from avos@FreeBSD.org) Received: (from avos@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x0GCX6nb034923; Wed, 16 Jan 2019 12:33:06 GMT (envelope-from avos@FreeBSD.org) Message-Id: <201901161233.x0GCX6nb034923@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: avos set sender to avos@FreeBSD.org using -f From: Andriy Voskoboinyk Date: Wed, 16 Jan 2019 12:33:06 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r343094 - head/sys/dev/iwn X-SVN-Group: head X-SVN-Commit-Author: avos X-SVN-Commit-Paths: head/sys/dev/iwn X-SVN-Commit-Revision: 343094 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: B8D9B6BAEC X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.99 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_SHORT(-0.99)[-0.987,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_LONG(-1.00)[-0.999,0] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 16 Jan 2019 12:33:08 -0000 Author: avos Date: Wed Jan 16 12:33:06 2019 New Revision: 343094 URL: https://svnweb.freebsd.org/changeset/base/343094 Log: iwn(4): (partially) rewrite A-MPDU Tx path Generic Tx stats fixes: - do not try to parse "aggregation status" for single frames; send them to iwn_tx_done() instead; - try to attach mbuf / node reference pair to reported BA events; allows to fix reported status for ieee80211_tx_complete() and ifnet counters (previously all A-MPDU frames were counted as failed - see PR 210211); requires few more firmware bug workarounds; - preserve short / long retry counters for wlan_amrr(4) (disabled for now - causes significant performance degradation). - Add new IWN_DEBUG_AMPDU debug category. - Add one more check into iwn_tx_data() to prevent aggregation ring overflow. - Workaround 'seqno % 256' != 'current Tx slot' case (until D9195 is not in the tree). - Improve watchdog timer updates (previously watchdog check was omitted when at least one frame was transmitted). - Stop Tx when memory leak in currently used ring was detected (unlikely to happen). - Few other minor fixes. Was previously tested with: - Intel 6205, STA mode (Tx aggregation behaves much better now). - Intel 4965AGN, STA mode (still unstable). PR: 192641, 210211 Reviewed by: adrian, dhw MFC after: 1 month Differential Revision: https://reviews.freebsd.org/D10728 Modified: head/sys/dev/iwn/if_iwn.c head/sys/dev/iwn/if_iwn_debug.h head/sys/dev/iwn/if_iwnreg.h head/sys/dev/iwn/if_iwnvar.h Modified: head/sys/dev/iwn/if_iwn.c ============================================================================== --- head/sys/dev/iwn/if_iwn.c Wed Jan 16 12:12:40 2019 (r343093) +++ head/sys/dev/iwn/if_iwn.c Wed Jan 16 12:33:06 2019 (r343094) @@ -168,6 +168,7 @@ static int iwn_alloc_tx_ring(struct iwn_softc *, struc int); static void iwn_reset_tx_ring(struct iwn_softc *, struct iwn_tx_ring *); static void iwn_free_tx_ring(struct iwn_softc *, struct iwn_tx_ring *); +static void iwn_check_tx_ring(struct iwn_softc *, int); static void iwn5000_ict_reset(struct iwn_softc *); static int iwn_read_eeprom(struct iwn_softc *, uint8_t macaddr[IEEE80211_ADDR_LEN]); @@ -199,6 +200,8 @@ static void iwn_calib_timeout(void *); static void iwn_rx_phy(struct iwn_softc *, struct iwn_rx_desc *); static void iwn_rx_done(struct iwn_softc *, struct iwn_rx_desc *, struct iwn_rx_data *); +static void iwn_agg_tx_complete(struct iwn_softc *, struct iwn_tx_ring *, + int, int, int); static void iwn_rx_compressed_ba(struct iwn_softc *, struct iwn_rx_desc *); static void iwn5000_rx_calib_results(struct iwn_softc *, struct iwn_rx_desc *); @@ -207,10 +210,13 @@ static void iwn4965_tx_done(struct iwn_softc *, struct struct iwn_rx_data *); static void iwn5000_tx_done(struct iwn_softc *, struct iwn_rx_desc *, struct iwn_rx_data *); +static void iwn_adj_ampdu_ptr(struct iwn_softc *, struct iwn_tx_ring *); static void iwn_tx_done(struct iwn_softc *, struct iwn_rx_desc *, int, int, uint8_t); -static void iwn_ampdu_tx_done(struct iwn_softc *, int, int, int, int, int, - void *); +static int iwn_ampdu_check_bitmap(uint64_t, int, int); +static int iwn_ampdu_index_check(struct iwn_softc *, struct iwn_tx_ring *, + uint64_t, int, int); +static void iwn_ampdu_tx_done(struct iwn_softc *, int, int, int, void *); static void iwn_cmd_done(struct iwn_softc *, struct iwn_rx_desc *); static void iwn_notif_intr(struct iwn_softc *); static void iwn_wakeup_intr(struct iwn_softc *); @@ -2075,6 +2081,8 @@ iwn_reset_tx_ring(struct iwn_softc *sc, struct iwn_tx_ ieee80211_free_node(data->ni); data->ni = NULL; } + data->remapped = 0; + data->long_retries = 0; } /* Clear TX descriptors. */ memset(ring->desc, 0, ring->desc_dma.size); @@ -2114,6 +2122,42 @@ iwn_free_tx_ring(struct iwn_softc *sc, struct iwn_tx_r } static void +iwn_check_tx_ring(struct iwn_softc *sc, int qid) +{ + struct iwn_tx_ring *ring = &sc->txq[qid]; + + KASSERT(ring->queued >= 0, ("%s: ring->queued (%d) for queue %d < 0!", + __func__, ring->queued, qid)); + + if (qid >= sc->firstaggqueue) { + struct iwn_ops *ops = &sc->ops; + struct ieee80211_tx_ampdu *tap = sc->qid2tap[qid]; + + if (ring->queued == 0 && !IEEE80211_AMPDU_RUNNING(tap)) { + uint16_t ssn = tap->txa_start & 0xfff; + uint8_t tid = tap->txa_tid; + int *res = tap->txa_private; + + iwn_nic_lock(sc); + ops->ampdu_tx_stop(sc, qid, tid, ssn); + iwn_nic_unlock(sc); + + sc->qid2tap[qid] = NULL; + free(res, M_DEVBUF); + } + } + + if (ring->queued < IWN_TX_RING_LOMARK) { + sc->qfullmsk &= ~(1 << qid); + + if (ring->queued == 0) + sc->sc_tx_timer = 0; + else + sc->sc_tx_timer = 5; + } +} + +static void iwn5000_ict_reset(struct iwn_softc *sc) { /* Disable interrupts. */ @@ -3169,104 +3213,129 @@ iwn_rx_done(struct iwn_softc *sc, struct iwn_rx_desc * } -/* Process an incoming Compressed BlockAck. */ static void -iwn_rx_compressed_ba(struct iwn_softc *sc, struct iwn_rx_desc *desc) +iwn_agg_tx_complete(struct iwn_softc *sc, struct iwn_tx_ring *ring, int tid, + int idx, int success) { struct ieee80211_ratectl_tx_status *txs = &sc->sc_txs; - struct iwn_ops *ops = &sc->ops; + struct iwn_tx_data *data = &ring->data[idx]; struct iwn_node *wn; + struct mbuf *m; struct ieee80211_node *ni; + + KASSERT(data->ni != NULL, ("idx %d: no node", idx)); + KASSERT(data->m != NULL, ("idx %d: no mbuf", idx)); + + /* Unmap and free mbuf. */ + bus_dmamap_sync(ring->data_dmat, data->map, + BUS_DMASYNC_POSTWRITE); + bus_dmamap_unload(ring->data_dmat, data->map); + m = data->m, data->m = NULL; + ni = data->ni, data->ni = NULL; + wn = (void *)ni; + +#if 0 + /* XXX causes significant performance degradation. */ + txs->flags = IEEE80211_RATECTL_STATUS_SHORT_RETRY | + IEEE80211_RATECTL_STATUS_LONG_RETRY; + txs->long_retries = data->long_retries - 1; +#else + txs->flags = IEEE80211_RATECTL_STATUS_SHORT_RETRY; +#endif + txs->short_retries = wn->agg[tid].short_retries; + if (success) + txs->status = IEEE80211_RATECTL_TX_SUCCESS; + else + txs->status = IEEE80211_RATECTL_TX_FAIL_UNSPECIFIED; + + wn->agg[tid].short_retries = 0; + data->long_retries = 0; + + DPRINTF(sc, IWN_DEBUG_AMPDU, "%s: freeing m %p ni %p idx %d qid %d\n", + __func__, m, ni, idx, ring->qid); + ieee80211_ratectl_tx_complete(ni, txs); + ieee80211_tx_complete(ni, m, !success); +} + +/* Process an incoming Compressed BlockAck. */ +static void +iwn_rx_compressed_ba(struct iwn_softc *sc, struct iwn_rx_desc *desc) +{ + struct iwn_tx_ring *ring; + struct iwn_tx_data *data; + struct iwn_node *wn; struct iwn_compressed_ba *ba = (struct iwn_compressed_ba *)(desc + 1); - struct iwn_tx_ring *txq; - struct iwn_tx_data *txdata; struct ieee80211_tx_ampdu *tap; - struct mbuf *m; uint64_t bitmap; - uint16_t ssn; uint8_t tid; - int i, lastidx, qid, *res, shift; - int tx_ok = 0, tx_err = 0; + int i, qid, shift; + int tx_ok = 0; - DPRINTF(sc, IWN_DEBUG_TRACE | IWN_DEBUG_XMIT, "->%s begin\n", __func__); + DPRINTF(sc, IWN_DEBUG_TRACE, "->%s begin\n", __func__); qid = le16toh(ba->qid); - txq = &sc->txq[ba->qid]; - tap = sc->qid2tap[ba->qid]; + tap = sc->qid2tap[qid]; + ring = &sc->txq[qid]; tid = tap->txa_tid; wn = (void *)tap->txa_ni; - res = NULL; - ssn = 0; - if (!IEEE80211_AMPDU_RUNNING(tap)) { - res = tap->txa_private; - ssn = tap->txa_start & 0xfff; - } + DPRINTF(sc, IWN_DEBUG_AMPDU, "%s: qid %d tid %d seq %04X ssn %04X\n" + "bitmap: ba %016jX wn %016jX, start %d\n", + __func__, qid, tid, le16toh(ba->seq), le16toh(ba->ssn), + (uintmax_t)le64toh(ba->bitmap), (uintmax_t)wn->agg[tid].bitmap, + wn->agg[tid].startidx); - for (lastidx = le16toh(ba->ssn) & 0xff; txq->read != lastidx;) { - txdata = &txq->data[txq->read]; - - /* Unmap and free mbuf. */ - bus_dmamap_sync(txq->data_dmat, txdata->map, - BUS_DMASYNC_POSTWRITE); - bus_dmamap_unload(txq->data_dmat, txdata->map); - m = txdata->m, txdata->m = NULL; - ni = txdata->ni, txdata->ni = NULL; - - KASSERT(ni != NULL, ("no node")); - KASSERT(m != NULL, ("no mbuf")); - - DPRINTF(sc, IWN_DEBUG_XMIT, "%s: freeing m=%p\n", __func__, m); - ieee80211_tx_complete(ni, m, 1); - - txq->queued--; - txq->read = (txq->read + 1) % IWN_TX_RING_COUNT; - } - - if (txq->queued == 0 && res != NULL) { - iwn_nic_lock(sc); - ops->ampdu_tx_stop(sc, qid, tid, ssn); - iwn_nic_unlock(sc); - sc->qid2tap[qid] = NULL; - free(res, M_DEVBUF); - return; - } - if (wn->agg[tid].bitmap == 0) return; shift = wn->agg[tid].startidx - ((le16toh(ba->seq) >> 4) & 0xff); - if (shift < 0) + if (shift <= -64) shift += 0x100; - if (wn->agg[tid].nframes > (64 - shift)) - return; - /* - * Walk the bitmap and calculate how many successful and failed - * attempts are made. + * Walk the bitmap and calculate how many successful attempts + * are made. * * Yes, the rate control code doesn't know these are A-MPDU - * subframes and that it's okay to fail some of these. + * subframes; due to that long_retries stats are not used here. */ - ni = tap->txa_ni; - bitmap = (le64toh(ba->bitmap) >> shift) & wn->agg[tid].bitmap; - for (i = 0; bitmap; i++) { - txs->flags = 0; /* XXX TODO */ - if ((bitmap & 1) == 0) { - tx_err ++; - txs->status = IEEE80211_RATECTL_TX_FAIL_UNSPECIFIED; - } else { - tx_ok ++; - txs->status = IEEE80211_RATECTL_TX_SUCCESS; + bitmap = le64toh(ba->bitmap); + if (shift >= 0) + bitmap >>= shift; + else + bitmap <<= -shift; + bitmap &= wn->agg[tid].bitmap; + wn->agg[tid].bitmap = 0; + + for (i = wn->agg[tid].startidx; + bitmap; + bitmap >>= 1, i = (i + 1) % IWN_TX_RING_COUNT) { + if ((bitmap & 1) == 0) + continue; + + data = &ring->data[i]; + if (__predict_false(data->m == NULL)) { + /* + * There is no frame; skip this entry. + * + * NB: it is "ok" to have both + * 'tx done' + 'compressed BA' replies for frame + * with STATE_SCD_QUERY status. + */ + DPRINTF(sc, IWN_DEBUG_AMPDU, + "%s: ring %d: no entry %d\n", __func__, qid, i); + continue; } - ieee80211_ratectl_tx_complete(ni, txs); - bitmap >>= 1; + + tx_ok++; + iwn_agg_tx_complete(sc, ring, tid, i, 1); } - DPRINTF(sc, IWN_DEBUG_TRACE | IWN_DEBUG_XMIT, - "->%s: end; %d ok; %d err\n",__func__, tx_ok, tx_err); + ring->queued -= tx_ok; + iwn_check_tx_ring(sc, qid); + DPRINTF(sc, IWN_DEBUG_TRACE | IWN_DEBUG_AMPDU, + "->%s: end; %d ok\n",__func__, tx_ok); } /* @@ -3514,9 +3583,9 @@ iwn4965_tx_done(struct iwn_softc *sc, struct iwn_rx_de stat->rate, le16toh(stat->duration), le32toh(stat->status)); - if (qid >= sc->firstaggqueue) { - iwn_ampdu_tx_done(sc, qid, desc->idx, stat->nframes, - stat->rtsfailcnt, stat->ackfailcnt, &stat->status); + if (qid >= sc->firstaggqueue && stat->nframes != 1) { + iwn_ampdu_tx_done(sc, qid, stat->nframes, stat->rtsfailcnt, + &stat->status); } else { iwn_tx_done(sc, desc, stat->rtsfailcnt, stat->ackfailcnt, le32toh(stat->status) & 0xff); @@ -3544,15 +3613,32 @@ iwn5000_tx_done(struct iwn_softc *sc, struct iwn_rx_de iwn5000_reset_sched(sc, qid, desc->idx); #endif - if (qid >= sc->firstaggqueue) { - iwn_ampdu_tx_done(sc, qid, desc->idx, stat->nframes, - stat->rtsfailcnt, stat->ackfailcnt, &stat->status); + if (qid >= sc->firstaggqueue && stat->nframes != 1) { + iwn_ampdu_tx_done(sc, qid, stat->nframes, stat->rtsfailcnt, + &stat->status); } else { iwn_tx_done(sc, desc, stat->rtsfailcnt, stat->ackfailcnt, le16toh(stat->status) & 0xff); } } +static void +iwn_adj_ampdu_ptr(struct iwn_softc *sc, struct iwn_tx_ring *ring) +{ + int i; + + for (i = ring->read; i != ring->cur; i = (i + 1) % IWN_TX_RING_COUNT) { + struct iwn_tx_data *data = &ring->data[i]; + + if (data->m != NULL) + break; + + data->remapped = 0; + } + + ring->read = i; +} + /* * Adapter-independent backend for TX_DONE firmware notifications. */ @@ -3566,7 +3652,18 @@ iwn_tx_done(struct iwn_softc *sc, struct iwn_rx_desc * struct mbuf *m; struct ieee80211_node *ni; + if (__predict_false(data->m == NULL && + ring->qid >= sc->firstaggqueue)) { + /* + * There is no frame; skip this entry. + */ + DPRINTF(sc, IWN_DEBUG_AMPDU, "%s: ring %d: no entry %d\n", + __func__, ring->qid, desc->idx); + return; + } + KASSERT(data->ni != NULL, ("no node")); + KASSERT(data->m != NULL, ("no mbuf")); DPRINTF(sc, IWN_DEBUG_TRACE, "->%s begin\n", __func__); @@ -3576,7 +3673,20 @@ iwn_tx_done(struct iwn_softc *sc, struct iwn_rx_desc * m = data->m, data->m = NULL; ni = data->ni, data->ni = NULL; + data->long_retries = 0; + + if (ring->qid >= sc->firstaggqueue) + iwn_adj_ampdu_ptr(sc, ring); + /* + * XXX f/w may hang (device timeout) when desc->idx - ring->read == 64 + * (aggregation queues only). + */ + + ring->queued--; + iwn_check_tx_ring(sc, ring->qid); + + /* * Update rate control statistics for the node. */ txs->flags = IEEE80211_RATECTL_STATUS_SHORT_RETRY | @@ -3624,10 +3734,6 @@ iwn_tx_done(struct iwn_softc *sc, struct iwn_rx_desc * ieee80211_tx_complete(ni, m, (status & IWN_TX_FAIL) != 0); - sc->sc_tx_timer = 0; - if (--ring->queued < IWN_TX_RING_LOMARK) - sc->qfullmsk &= ~(1 << ring->qid); - DPRINTF(sc, IWN_DEBUG_TRACE, "->%s: end\n",__func__); } @@ -3664,148 +3770,218 @@ iwn_cmd_done(struct iwn_softc *sc, struct iwn_rx_desc wakeup(&ring->desc[desc->idx]); } +static int +iwn_ampdu_check_bitmap(uint64_t bitmap, int start, int idx) +{ + int bit, shift; + + bit = idx - start; + shift = 0; + if (bit >= 64) { + shift = 0x100 - bit; + bit = 0; + } else if (bit <= -64) + bit = 0x100 + bit; + else if (bit < 0) { + shift = -bit; + bit = 0; + } + + if (bit - shift >= 64) + return (0); + + return ((bitmap & (1ULL << (bit - shift))) != 0); +} + +/* + * Firmware bug workaround: in case if 'retries' counter + * overflows 'seqno' field will be incremented: + * status|sequence|status|sequence|status|sequence + * 0000 0A48 0001 0A49 0000 0A6A + * 1000 0A48 1000 0A49 1000 0A6A + * 2000 0A48 2000 0A49 2000 0A6A + * ... + * E000 0A48 E000 0A49 E000 0A6A + * F000 0A48 F000 0A49 F000 0A6A + * 0000 0A49 0000 0A49 0000 0A6B + * 1000 0A49 1000 0A49 1000 0A6B + * ... + * D000 0A49 D000 0A49 D000 0A6B + * E000 0A49 E001 0A49 E000 0A6B + * F000 0A49 F001 0A49 F000 0A6B + * 0000 0A4A 0000 0A4B 0000 0A6A + * 1000 0A4A 1000 0A4B 1000 0A6A + * ... + * + * Odd 'seqno' numbers are incremened by 2 every 2 overflows. + * For even 'seqno' % 4 != 0 overflow is cyclic (0 -> +1 -> 0). + * Not checked with nretries >= 64. + * + */ +static int +iwn_ampdu_index_check(struct iwn_softc *sc, struct iwn_tx_ring *ring, + uint64_t bitmap, int start, int idx) +{ + struct ieee80211com *ic = &sc->sc_ic; + struct iwn_tx_data *data; + int diff, min_retries, max_retries, new_idx, loop_end; + + new_idx = idx - IWN_LONG_RETRY_LIMIT_LOG; + if (new_idx < 0) + new_idx += IWN_TX_RING_COUNT; + + /* + * Corner case: check if retry count is not too big; + * reset device otherwise. + */ + if (!iwn_ampdu_check_bitmap(bitmap, start, new_idx)) { + data = &ring->data[new_idx]; + if (data->long_retries > IWN_LONG_RETRY_LIMIT) { + device_printf(sc->sc_dev, + "%s: retry count (%d) for idx %d/%d overflow, " + "resetting...\n", __func__, data->long_retries, + ring->qid, new_idx); + ieee80211_restart_all(ic); + return (-1); + } + } + + /* Correct index if needed. */ + loop_end = idx; + do { + data = &ring->data[new_idx]; + diff = idx - new_idx; + if (diff < 0) + diff += IWN_TX_RING_COUNT; + + min_retries = IWN_LONG_RETRY_FW_OVERFLOW * diff; + if ((new_idx % 2) == 0) + max_retries = IWN_LONG_RETRY_FW_OVERFLOW * (diff + 1); + else + max_retries = IWN_LONG_RETRY_FW_OVERFLOW * (diff + 2); + + if (!iwn_ampdu_check_bitmap(bitmap, start, new_idx) && + ((data->long_retries >= min_retries && + data->long_retries < max_retries) || + (diff == 1 && + (new_idx & 0x03) == 0x02 && + data->long_retries >= IWN_LONG_RETRY_FW_OVERFLOW))) { + DPRINTF(sc, IWN_DEBUG_AMPDU, + "%s: correcting index %d -> %d in queue %d" + " (retries %d)\n", __func__, idx, new_idx, + ring->qid, data->long_retries); + return (new_idx); + } + + new_idx = (new_idx + 1) % IWN_TX_RING_COUNT; + } while (new_idx != loop_end); + + return (idx); +} + static void -iwn_ampdu_tx_done(struct iwn_softc *sc, int qid, int idx, int nframes, - int rtsfailcnt, int ackfailcnt, void *stat) +iwn_ampdu_tx_done(struct iwn_softc *sc, int qid, int nframes, int rtsfailcnt, + void *stat) { - struct iwn_ops *ops = &sc->ops; struct iwn_tx_ring *ring = &sc->txq[qid]; - struct ieee80211_ratectl_tx_status *txs = &sc->sc_txs; + struct ieee80211_tx_ampdu *tap = sc->qid2tap[qid]; + struct iwn_node *wn = (void *)tap->txa_ni; struct iwn_tx_data *data; - struct mbuf *m; - struct iwn_node *wn; - struct ieee80211_node *ni; - struct ieee80211_tx_ampdu *tap; - uint64_t bitmap; - uint32_t *status = stat; + uint64_t bitmap = 0; uint16_t *aggstatus = stat; - uint16_t ssn; - uint8_t tid; - int bit, i, lastidx, *res, seqno, shift, start; + uint8_t tid = tap->txa_tid; + int bit, i, idx, shift, start, tx_err; - /* XXX TODO: status is le16 field! Grr */ - DPRINTF(sc, IWN_DEBUG_TRACE, "->%s begin\n", __func__); - DPRINTF(sc, IWN_DEBUG_XMIT, "%s: nframes=%d, status=0x%08x\n", - __func__, - nframes, - *status); - tap = sc->qid2tap[qid]; - tid = tap->txa_tid; - wn = (void *)tap->txa_ni; - ni = tap->txa_ni; + start = le16toh(*(aggstatus + nframes * 2)) & 0xff; - /* - * XXX TODO: ACK and RTS failures would be nice here! - */ + for (i = 0; i < nframes; i++) { + uint16_t status = le16toh(aggstatus[i * 2]); - /* - * A-MPDU single frame status - if we failed to transmit it - * in A-MPDU, then it may be a permanent failure. - * - * XXX TODO: check what the Linux iwlwifi driver does here; - * there's some permanent and temporary failures that may be - * handled differently. - */ - if (nframes == 1) { - txs->flags = IEEE80211_RATECTL_STATUS_SHORT_RETRY | - IEEE80211_RATECTL_STATUS_LONG_RETRY; - txs->short_retries = rtsfailcnt; - txs->long_retries = ackfailcnt; - if ((*status & 0xff) != 1 && (*status & 0xff) != 2) { -#ifdef NOT_YET - printf("ieee80211_send_bar()\n"); -#endif + if (status & IWN_AGG_TX_STATE_IGNORE_MASK) + continue; + + idx = le16toh(aggstatus[i * 2 + 1]) & 0xff; + data = &ring->data[idx]; + if (data->remapped) { + idx = iwn_ampdu_index_check(sc, ring, bitmap, start, idx); + if (idx == -1) { + /* skip error (device will be restarted anyway). */ + continue; + } + + /* Index may have changed. */ + data = &ring->data[idx]; + } + + /* + * XXX Sometimes (rarely) some frames are excluded from events. + * XXX Due to that long_retries counter may be wrong. + */ + data->long_retries &= ~0x0f; + data->long_retries += IWN_AGG_TX_TRY_COUNT(status) + 1; + + if (data->long_retries >= IWN_LONG_RETRY_FW_OVERFLOW) { + int diff, wrong_idx; + + diff = data->long_retries / IWN_LONG_RETRY_FW_OVERFLOW; + wrong_idx = (idx + diff) % IWN_TX_RING_COUNT; + /* - * If we completely fail a transmit, make sure a - * notification is pushed up to the rate control - * layer. + * Mark the entry so the above code will check it + * next time. */ - /* XXX */ - txs->status = IEEE80211_RATECTL_TX_FAIL_UNSPECIFIED; - } else { + ring->data[wrong_idx].remapped = 1; + } + + if (status & IWN_AGG_TX_STATE_UNDERRUN_MSK) { /* - * If nframes=1, then we won't be getting a BA for - * this frame. Ensure that we correctly update the - * rate control code with how many retries were - * needed to send it. + * NB: count retries but postpone - it was not + * transmitted. */ - txs->status = IEEE80211_RATECTL_TX_SUCCESS; + continue; } - ieee80211_ratectl_tx_complete(ni, txs); - } - bitmap = 0; - start = idx; - for (i = 0; i < nframes; i++) { - if (le16toh(aggstatus[i * 2]) & 0xc) - continue; - - idx = le16toh(aggstatus[2*i + 1]) & 0xff; bit = idx - start; shift = 0; if (bit >= 64) { - shift = 0x100 - idx + start; + shift = 0x100 - bit; bit = 0; - start = idx; } else if (bit <= -64) - bit = 0x100 - start + idx; + bit = 0x100 + bit; else if (bit < 0) { - shift = start - idx; - start = idx; + shift = -bit; bit = 0; } bitmap = bitmap << shift; bitmap |= 1ULL << bit; } - tap = sc->qid2tap[qid]; - tid = tap->txa_tid; - wn = (void *)tap->txa_ni; - wn->agg[tid].bitmap = bitmap; wn->agg[tid].startidx = start; - wn->agg[tid].nframes = nframes; + wn->agg[tid].bitmap = bitmap; + wn->agg[tid].short_retries = rtsfailcnt; - res = NULL; - ssn = 0; - if (!IEEE80211_AMPDU_RUNNING(tap)) { - res = tap->txa_private; - ssn = tap->txa_start & 0xfff; - } + DPRINTF(sc, IWN_DEBUG_AMPDU, "%s: nframes %d start %d bitmap %016jX\n", + __func__, nframes, start, (uintmax_t)bitmap); - /* This is going nframes DWORDS into the descriptor? */ - seqno = le32toh(*(status + nframes)) & 0xfff; - for (lastidx = (seqno & 0xff); ring->read != lastidx;) { - data = &ring->data[ring->read]; + i = ring->read; - /* Unmap and free mbuf. */ - bus_dmamap_sync(ring->data_dmat, data->map, - BUS_DMASYNC_POSTWRITE); - bus_dmamap_unload(ring->data_dmat, data->map); - m = data->m, data->m = NULL; - ni = data->ni, data->ni = NULL; + for (tx_err = 0; + i != wn->agg[tid].startidx; + i = (i + 1) % IWN_TX_RING_COUNT) { + data = &ring->data[i]; + data->remapped = 0; + if (data->m == NULL) + continue; - KASSERT(ni != NULL, ("no node")); - KASSERT(m != NULL, ("no mbuf")); - DPRINTF(sc, IWN_DEBUG_XMIT, "%s: freeing m=%p\n", __func__, m); - ieee80211_tx_complete(ni, m, 1); - - ring->queued--; - ring->read = (ring->read + 1) % IWN_TX_RING_COUNT; + tx_err++; + iwn_agg_tx_complete(sc, ring, tid, i, 0); } - if (ring->queued == 0 && res != NULL) { - iwn_nic_lock(sc); - ops->ampdu_tx_stop(sc, qid, tid, ssn); - iwn_nic_unlock(sc); - sc->qid2tap[qid] = NULL; - free(res, M_DEVBUF); - return; - } + ring->read = wn->agg[tid].startidx; + ring->queued -= tx_err; - sc->sc_tx_timer = 0; - if (ring->queued < IWN_TX_RING_LOMARK) - sc->qfullmsk &= ~(1 << ring->qid); + iwn_check_tx_ring(sc, qid); DPRINTF(sc, IWN_DEBUG_TRACE, "->%s: end\n",__func__); } @@ -4369,7 +4545,7 @@ iwn_tx_data(struct iwn_softc *sc, struct mbuf *m, stru struct ieee80211_frame *wh; struct ieee80211_key *k = NULL; uint32_t flags; - uint16_t seqno, qos; + uint16_t qos; uint8_t tid, type; int ac, totlen, rate; @@ -4411,25 +4587,17 @@ iwn_tx_data(struct iwn_softc *sc, struct mbuf *m, stru */ ac = M_WME_GETAC(m); - seqno = ni->ni_txseqs[tid]; if (m->m_flags & M_AMPDU_MPDU) { struct ieee80211_tx_ampdu *tap = &ni->ni_tx_ampdu[ac]; - if (!IEEE80211_AMPDU_RUNNING(tap)) { + if (!IEEE80211_AMPDU_RUNNING(tap)) return (EINVAL); - } - /* - * Queue this frame to the hardware ring that we've - * negotiated AMPDU TX on. - * - * Note that the sequence number must match the TX slot - * being used! - */ + /* NB: clear Fragment Number field. */ + /* XXX move this to net80211 */ + *(uint16_t *)wh->i_seq = 0; + ac = *(int *)tap->txa_private; - *(uint16_t *)wh->i_seq = - htole16(seqno << IEEE80211_SEQ_SEQ_SHIFT); - ni->ni_txseqs[tid]++; } /* Encrypt the frame if need be. */ @@ -4498,15 +4666,42 @@ iwn_tx_data(struct iwn_softc *sc, struct mbuf *m, stru } ring = &sc->txq[ac]; - if ((m->m_flags & M_AMPDU_MPDU) != 0 && - (seqno % 256) != ring->cur) { - device_printf(sc->sc_dev, - "%s: m=%p: seqno (%d) (%d) != ring index (%d) !\n", - __func__, - m, - seqno, - seqno % 256, - ring->cur); + if (m->m_flags & M_AMPDU_MPDU) { + uint16_t seqno = ni->ni_txseqs[tid]; + + if (ring->queued > IWN_TX_RING_COUNT / 2 && + (ring->cur + 1) % IWN_TX_RING_COUNT == ring->read) { + DPRINTF(sc, IWN_DEBUG_AMPDU, "%s: no more space " + "(queued %d) left in %d queue!\n", + __func__, ring->queued, ac); + return (ENOBUFS); + } + + /* + * Queue this frame to the hardware ring that we've + * negotiated AMPDU TX on. + * + * Note that the sequence number must match the TX slot + * being used! + */ + if ((seqno % 256) != ring->cur) { + device_printf(sc->sc_dev, + "%s: m=%p: seqno (%d) (%d) != ring index (%d) !\n", + __func__, + m, + seqno, + seqno % 256, + ring->cur); + + /* XXX until D9195 will not be committed */ + ni->ni_txseqs[tid] &= ~0xff; + ni->ni_txseqs[tid] += ring->cur; + seqno = ni->ni_txseqs[tid]; + } + + *(uint16_t *)wh->i_seq = + htole16(seqno << IEEE80211_SEQ_SEQ_SHIFT); + ni->ni_txseqs[tid]++; } /* Prepare TX firmware command. */ @@ -4667,6 +4862,13 @@ iwn_tx_cmd(struct iwn_softc *sc, struct mbuf *m, struc desc = &ring->desc[ring->cur]; data = &ring->data[ring->cur]; + + if (__predict_false(data->m != NULL || data->ni != NULL)) { + device_printf(sc->sc_dev, "%s: ni (%p) or m (%p) for idx %d " + "in queue %d is not NULL!\n", __func__, data->ni, data->m, + ring->cur, ring->qid); + return EIO; + } /* Prepare TX firmware command. */ cmd = &ring->cmd[ring->cur]; Modified: head/sys/dev/iwn/if_iwn_debug.h ============================================================================== --- head/sys/dev/iwn/if_iwn_debug.h Wed Jan 16 12:12:40 2019 (r343093) +++ head/sys/dev/iwn/if_iwn_debug.h Wed Jan 16 12:33:06 2019 (r343094) @@ -44,6 +44,7 @@ enum { IWN_DEBUG_PWRSAVE = 0x00004000, /* Power save operations */ IWN_DEBUG_SCAN = 0x00008000, /* Scan related operations */ IWN_DEBUG_STATS = 0x00010000, /* Statistics updates */ + IWN_DEBUG_AMPDU = 0x00020000, /* A-MPDU specific Tx */ IWN_DEBUG_REGISTER = 0x20000000, /* print chipset register */ IWN_DEBUG_TRACE = 0x40000000, /* Print begin and start driver function */ IWN_DEBUG_FATAL = 0x80000000, /* fatal errors */ Modified: head/sys/dev/iwn/if_iwnreg.h ============================================================================== --- head/sys/dev/iwn/if_iwnreg.h Wed Jan 16 12:12:40 2019 (r343093) +++ head/sys/dev/iwn/if_iwnreg.h Wed Jan 16 12:33:06 2019 (r343094) @@ -1378,10 +1378,17 @@ struct iwn_ucode_info { #define IWN_AGG_TX_STATUS_MSK 0x00000fff #define IWN_AGG_TX_TRY_MSK 0x0000f000 +#define IWN_AGG_TX_TRY_POS 12 +#define IWN_AGG_TX_TRY_COUNT(status) \ + (((status) & IWN_AGG_TX_TRY_MSK) >> IWN_AGG_TX_TRY_POS) #define IWN_AGG_TX_STATE_LAST_SENT_MSK \ (IWN_AGG_TX_STATE_LAST_SENT_TTL_MSK | \ IWN_AGG_TX_STATE_LAST_SENT_TRY_CNT_MSK) + +#define IWN_AGG_TX_STATE_IGNORE_MASK \ + (IWN_AGG_TX_STATE_FEW_BYTES_MSK | \ + IWN_AGG_TX_STATE_ABORT_MSK) /* # tx attempts for first frame in aggregation */ #define IWN_AGG_TX_STATE_TRY_CNT_POS 12 Modified: head/sys/dev/iwn/if_iwnvar.h ============================================================================== --- head/sys/dev/iwn/if_iwnvar.h Wed Jan 16 12:12:40 2019 (r343093) +++ head/sys/dev/iwn/if_iwnvar.h Wed Jan 16 12:33:06 2019 (r343094) @@ -100,6 +100,11 @@ struct iwn_tx_data { bus_addr_t scratch_paddr; struct mbuf *m; struct ieee80211_node *ni; + unsigned int remapped:1; + unsigned int long_retries:7; +#define IWN_LONG_RETRY_FW_OVERFLOW 0x10 +#define IWN_LONG_RETRY_LIMIT_LOG 7 +#define IWN_LONG_RETRY_LIMIT ((1 << IWN_LONG_RETRY_LIMIT_LOG) - 3) }; struct iwn_tx_ring { @@ -138,8 +143,8 @@ struct iwn_node { uint8_t id; struct { uint64_t bitmap; + int short_retries; int startidx; - int nframes; } agg[IEEE80211_TID_SIZE]; }; From owner-svn-src-all@freebsd.org Wed Jan 16 12:48:59 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id A6F1A1487023; Wed, 16 Jan 2019 12:48:59 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from kib.kiev.ua (kib.kiev.ua [IPv6:2001:470:d5e7:1::1]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id D30CF6C3D6; Wed, 16 Jan 2019 12:48:58 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from tom.home (kib@localhost [127.0.0.1]) by kib.kiev.ua (8.15.2/8.15.2) with ESMTPS id x0GCmo1U036514 (version=TLSv1.2 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Wed, 16 Jan 2019 14:48:53 +0200 (EET) (envelope-from kostikbel@gmail.com) DKIM-Filter: OpenDKIM Filter v2.10.3 kib.kiev.ua x0GCmo1U036514 Received: (from kostik@localhost) by tom.home (8.15.2/8.15.2/Submit) id x0GCmn0b036513; Wed, 16 Jan 2019 14:48:50 +0200 (EET) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: tom.home: kostik set sender to kostikbel@gmail.com using -f Date: Wed, 16 Jan 2019 14:48:49 +0200 From: Konstantin Belousov To: Dag-Erling =?utf-8?B?U23DuHJncmF2?= Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r343093 - in head: include lib/libc/gen libexec/rtld-elf Message-ID: <20190116124849.GI26174@kib.kiev.ua> References: <201901161212.x0GCCeRh024502@repo.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <201901161212.x0GCCeRh024502@repo.freebsd.org> User-Agent: Mutt/1.11.2 (2019-01-07) X-Spam-Status: No, score=-1.0 required=5.0 tests=ALL_TRUSTED,BAYES_00, DKIM_ADSP_CUSTOM_MED,FORGED_GMAIL_RCVD,FREEMAIL_FROM, NML_ADSP_CUSTOM_MED autolearn=no autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on tom.home X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 16 Jan 2019 12:48:59 -0000 On Wed, Jan 16, 2019 at 12:12:40PM +0000, Dag-Erling Smørgrav wrote: > Author: des > Date: Wed Jan 16 12:12:40 2019 > New Revision: 343093 > URL: https://svnweb.freebsd.org/changeset/base/343093 > > Log: > Implement dlopenat(3). > > MFC after: 3 weeks > > Modified: > head/include/dlfcn.h > head/lib/libc/gen/dlopen.3 > head/libexec/rtld-elf/rtld.c > It is non-functional: - The new symbol is not exported from rtld, so it cannot be referenced at runtime. - libc does not provide stubs for static linker and statically linked binaries, so nothing can be linked against it. That said, why is it useful to have this function when we already have fdlopen(3) ? From owner-svn-src-all@freebsd.org Wed Jan 16 14:42:34 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 8929D148AA2D; Wed, 16 Jan 2019 14:42: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 279A470749; Wed, 16 Jan 2019 14:42: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 1A70D3BDB; Wed, 16 Jan 2019 14:42: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 x0GEgX9k002395; Wed, 16 Jan 2019 14:42:33 GMT (envelope-from kevans@FreeBSD.org) Received: (from kevans@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x0GEgX1x002394; Wed, 16 Jan 2019 14:42:33 GMT (envelope-from kevans@FreeBSD.org) Message-Id: <201901161442.x0GEgX1x002394@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kevans set sender to kevans@FreeBSD.org using -f From: Kyle Evans Date: Wed, 16 Jan 2019 14:42:33 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r343095 - head/sys/arm/allwinner X-SVN-Group: head X-SVN-Commit-Author: kevans X-SVN-Commit-Paths: head/sys/arm/allwinner X-SVN-Commit-Revision: 343095 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 279A470749 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.97 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_SHORT(-0.97)[-0.972,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_LONG(-1.00)[-0.999,0] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 16 Jan 2019 14:42:34 -0000 Author: kevans Date: Wed Jan 16 14:42:33 2019 New Revision: 343095 URL: https://svnweb.freebsd.org/changeset/base/343095 Log: awg: Move MAC soft reset to awg_init_locked to avoid soft reset timeout From NetBSD: Since the MAC can get stuck in reset state with no link, ignore reset timeouts and continue with initializing the device. Fixes "soft reset timeout" issue at boot with no network cable plugged in. awg_init may be called multiple times throughout normal interface usage, so the tx/rx descriptor base address registers must be written after each MAC reset and are moved as such. This problem has been observed on FreeBSD, H3/H2+ devices with an internal PHY (includes OrangePi R1, OrangePi One at least). Reviewed by: manu, ganbold Obtained from: NetBSD MFC after: 2 weeks Differential Revision: https://reviews.freebsd.org/D18844 Modified: head/sys/arm/allwinner/if_awg.c Modified: head/sys/arm/allwinner/if_awg.c ============================================================================== --- head/sys/arm/allwinner/if_awg.c Wed Jan 16 12:33:06 2019 (r343094) +++ head/sys/arm/allwinner/if_awg.c Wed Jan 16 14:42:33 2019 (r343095) @@ -750,6 +750,31 @@ awg_disable_intr(struct awg_softc *sc) WR4(sc, EMAC_INT_EN, 0); } +static int +awg_reset(struct awg_softc *sc) +{ + int retry; + + /* Soft reset all registers and logic */ + WR4(sc, EMAC_BASIC_CTL_1, BASIC_CTL_SOFT_RST); + + /* Wait for soft reset bit to self-clear */ + for (retry = SOFT_RST_RETRY; retry > 0; retry--) { + if ((RD4(sc, EMAC_BASIC_CTL_1) & BASIC_CTL_SOFT_RST) == 0) + break; + DELAY(10); + } + if (retry == 0) { + device_printf(sc->dev, "soft reset timed out\n"); +#ifdef AWG_DEBUG + awg_dump_regs(sc->dev); +#endif + return (ETIMEDOUT); + } + + return (0); +} + static void awg_init_locked(struct awg_softc *sc) { @@ -765,6 +790,12 @@ awg_init_locked(struct awg_softc *sc) if (if_getdrvflags(ifp) & IFF_DRV_RUNNING) return; + awg_reset(sc); + + /* Write transmit and receive descriptor base address registers */ + WR4(sc, EMAC_TX_DMA_LIST, sc->tx.desc_ring_paddr); + WR4(sc, EMAC_RX_DMA_LIST, sc->rx.desc_ring_paddr); + awg_setup_rxfilter(sc); /* Configure DMA burst length and priorities */ @@ -1653,40 +1684,6 @@ awg_phy_reset(device_t dev) return (0); } -static int -awg_reset(device_t dev) -{ - struct awg_softc *sc; - int retry; - - sc = device_get_softc(dev); - - /* Reset PHY if necessary */ - if (awg_phy_reset(dev) != 0) { - device_printf(dev, "failed to reset PHY\n"); - return (ENXIO); - } - - /* Soft reset all registers and logic */ - WR4(sc, EMAC_BASIC_CTL_1, BASIC_CTL_SOFT_RST); - - /* Wait for soft reset bit to self-clear */ - for (retry = SOFT_RST_RETRY; retry > 0; retry--) { - if ((RD4(sc, EMAC_BASIC_CTL_1) & BASIC_CTL_SOFT_RST) == 0) - break; - DELAY(10); - } - if (retry == 0) { - device_printf(dev, "soft reset timed out\n"); -#ifdef AWG_DEBUG - awg_dump_regs(dev); -#endif - return (ETIMEDOUT); - } - - return (0); -} - static void awg_dmamap_cb(void *arg, bus_dma_segment_t *segs, int nseg, int error) { @@ -1840,10 +1837,6 @@ awg_setup_dma(device_t dev) bus_dmamap_sync(sc->rx.desc_tag, sc->rx.desc_map, BUS_DMASYNC_PREWRITE); - /* Write transmit and receive descriptor base address registers */ - WR4(sc, EMAC_TX_DMA_LIST, sc->tx.desc_ring_paddr); - WR4(sc, EMAC_RX_DMA_LIST, sc->rx.desc_ring_paddr); - return (0); } @@ -1888,10 +1881,12 @@ awg_attach(device_t dev) /* Read MAC address before resetting the chip */ awg_get_eaddr(dev, eaddr); - /* Soft reset EMAC core */ - error = awg_reset(dev); - if (error != 0) + /* Reset PHY if necessary */ + error = awg_phy_reset(dev); + if (error != 0) { + device_printf(dev, "failed to reset PHY\n"); return (error); + } /* Setup DMA descriptors */ error = awg_setup_dma(dev); From owner-svn-src-all@freebsd.org Wed Jan 16 15:12:20 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 8F8E8148BBCC; Wed, 16 Jan 2019 15:12:20 +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 4A2D971BEE; Wed, 16 Jan 2019 15:12:20 +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 3C902413B; Wed, 16 Jan 2019 15:12:20 +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 x0GFCKuI018341; Wed, 16 Jan 2019 15:12:20 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x0GFCKK1018340; Wed, 16 Jan 2019 15:12:20 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <201901161512.x0GFCKK1018340@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Wed, 16 Jan 2019 15: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: r343096 - stable/12/crypto/openssh X-SVN-Group: stable-12 X-SVN-Commit-Author: emaste X-SVN-Commit-Paths: stable/12/crypto/openssh X-SVN-Commit-Revision: 343096 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 4A2D971BEE X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.95 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_SHORT(-0.95)[-0.950,0]; NEURAL_HAM_LONG(-1.00)[-0.999,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 16 Jan 2019 15:12:20 -0000 Author: emaste Date: Wed Jan 16 15:12:19 2019 New Revision: 343096 URL: https://svnweb.freebsd.org/changeset/base/343096 Log: MFC r343043: scp: disallow empty or current directory Obtained from: OpenBSD scp.c 1.198 Security: CVE-2018-20685 Sponsored by: The FreeBSD Foundation Modified: stable/12/crypto/openssh/scp.c Directory Properties: stable/12/ (props changed) Modified: stable/12/crypto/openssh/scp.c ============================================================================== --- stable/12/crypto/openssh/scp.c Wed Jan 16 14:42:33 2019 (r343095) +++ stable/12/crypto/openssh/scp.c Wed Jan 16 15:12:19 2019 (r343096) @@ -1106,7 +1106,8 @@ sink(int argc, char **argv) SCREWUP("size out of range"); size = (off_t)ull; - if ((strchr(cp, '/') != NULL) || (strcmp(cp, "..") == 0)) { + if (*cp == '\0' || strchr(cp, '/') != NULL || + strcmp(cp, ".") == 0 || strcmp(cp, "..") == 0) { run_err("error: unexpected filename: %s", cp); exit(1); } From owner-svn-src-all@freebsd.org Wed Jan 16 15:15:05 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 24208148BFC8; Wed, 16 Jan 2019 15:15:05 +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 B61DC71F8A; Wed, 16 Jan 2019 15:15:04 +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 A8A67414C; Wed, 16 Jan 2019 15:15:04 +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 x0GFF45g018631; Wed, 16 Jan 2019 15:15:04 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x0GFF4Jt018630; Wed, 16 Jan 2019 15:15:04 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <201901161515.x0GFF4Jt018630@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Wed, 16 Jan 2019 15:15:04 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r343097 - stable/11/crypto/openssh X-SVN-Group: stable-11 X-SVN-Commit-Author: emaste X-SVN-Commit-Paths: stable/11/crypto/openssh X-SVN-Commit-Revision: 343097 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: B61DC71F8A X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.95 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_SHORT(-0.95)[-0.950,0]; NEURAL_HAM_LONG(-1.00)[-0.999,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 16 Jan 2019 15:15:05 -0000 Author: emaste Date: Wed Jan 16 15:15:04 2019 New Revision: 343097 URL: https://svnweb.freebsd.org/changeset/base/343097 Log: MFC r343043: scp: disallow empty or current directory Obtained from: OpenBSD scp.c 1.198 Security: CVE-2018-20685 Sponsored by: The FreeBSD Foundation Modified: stable/11/crypto/openssh/scp.c Directory Properties: stable/11/ (props changed) Modified: stable/11/crypto/openssh/scp.c ============================================================================== --- stable/11/crypto/openssh/scp.c Wed Jan 16 15:12:19 2019 (r343096) +++ stable/11/crypto/openssh/scp.c Wed Jan 16 15:15:04 2019 (r343097) @@ -1047,7 +1047,8 @@ sink(int argc, char **argv) size = size * 10 + (*cp++ - '0'); if (*cp++ != ' ') SCREWUP("size not delimited"); - if ((strchr(cp, '/') != NULL) || (strcmp(cp, "..") == 0)) { + if (*cp == '\0' || strchr(cp, '/') != NULL || + strcmp(cp, ".") == 0 || strcmp(cp, "..") == 0) { run_err("error: unexpected filename: %s", cp); exit(1); } From owner-svn-src-all@freebsd.org Wed Jan 16 15:19:10 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id AA2F2148C248; Wed, 16 Jan 2019 15:19:10 +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 51A847224D; Wed, 16 Jan 2019 15:19:10 +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 3F770414D; Wed, 16 Jan 2019 15:19:10 +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 x0GFJAqf018835; Wed, 16 Jan 2019 15:19:10 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x0GFJAtg018834; Wed, 16 Jan 2019 15:19:10 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <201901161519.x0GFJAtg018834@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Wed, 16 Jan 2019 15:19:10 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r343098 - stable/10/crypto/openssh X-SVN-Group: stable-10 X-SVN-Commit-Author: emaste X-SVN-Commit-Paths: stable/10/crypto/openssh X-SVN-Commit-Revision: 343098 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 51A847224D X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.95 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_LONG(-1.00)[-0.999,0]; NEURAL_HAM_SHORT(-0.95)[-0.950,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 16 Jan 2019 15:19:10 -0000 Author: emaste Date: Wed Jan 16 15:19:09 2019 New Revision: 343098 URL: https://svnweb.freebsd.org/changeset/base/343098 Log: MFC r343043: scp: disallow empty or current directory Obtained from: OpenBSD scp.c 1.198 Security: CVE-2018-20685 Sponsored by: The FreeBSD Foundation Modified: stable/10/crypto/openssh/scp.c Directory Properties: stable/10/ (props changed) Modified: stable/10/crypto/openssh/scp.c ============================================================================== --- stable/10/crypto/openssh/scp.c Wed Jan 16 15:15:04 2019 (r343097) +++ stable/10/crypto/openssh/scp.c Wed Jan 16 15:19:09 2019 (r343098) @@ -1048,7 +1048,8 @@ sink(int argc, char **argv) size = size * 10 + (*cp++ - '0'); if (*cp++ != ' ') SCREWUP("size not delimited"); - if ((strchr(cp, '/') != NULL) || (strcmp(cp, "..") == 0)) { + if (*cp == '\0' || strchr(cp, '/') != NULL || + strcmp(cp, ".") == 0 || strcmp(cp, "..") == 0) { run_err("error: unexpected filename: %s", cp); exit(1); } From owner-svn-src-all@freebsd.org Wed Jan 16 15:49:35 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 147AE148CAD0 for ; Wed, 16 Jan 2019 15:49:35 +0000 (UTC) (envelope-from ian@freebsd.org) Received: from outbound3d.ore.mailhop.org (outbound3d.ore.mailhop.org [54.186.57.195]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 82EDE7314C for ; Wed, 16 Jan 2019 15:49:34 +0000 (UTC) (envelope-from ian@freebsd.org) ARC-Seal: i=1; a=rsa-sha256; t=1547652751; cv=none; d=outbound.mailhop.org; s=arc-outbound20181012; b=QI+1ra049tWPKVNACCg26DLSBJKQ/rigc2eHhIelXfDxnR13I+VL2j1MDw+vLn099E0OL8DRdlxMD l/fJXn+dOi/rKaQlbbDi4SGqnmmRcHiuM1y1L+EdMNlF2B17FhR87kOFdW8b5qZfzb0pw/6knxI4UP kpTElvtRXWTG+P0mSZOlkl0i2JnC0/5VpyM5N5jA4Ayjen2O7e0hRID9dQ2H59DxtPBkc6TbsvBttr hLhko2SNUmNIjNZY8sZNLH1QsFcnXMuSKrEpu61fOalwrHJ+QdhChdvtW5JxLizkmGXPMrp9nxSAdV 3XbkePeUvSjZxqAqfpKlgGvJlDn0BkA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=outbound.mailhop.org; s=arc-outbound20181012; h=content-transfer-encoding:mime-version:content-type:references:in-reply-to: date:cc:to:from:subject:message-id:dkim-signature:from; bh=yAC8gX5qGWhxdWU0hKZhTTczYvKmL+gAY2fQsFsM/is=; b=qAGLqaZ4yt60wYqO5WBGFUBqLIi/yB4MLgO0KUk3D6QKyPWhLjlayE3RUlddGko/N3+5L0JtsQ0O2 QVCDi6pkn06pnxszlGtK911jyY762/NgA1IMG/z+O/rPe0vYJB+Z0BSFTMyzih76IW1Yu3yyCzVBD6 sTKKbBqnS3MSw4N2TJj6I4KDsoQgRLOC37otC9KIgsRcXXTEAoKPMIHv+onzoZ3U5hp+3OYljTQHi/ CqqK8+gjcUC6CMDgw+hJ6rWu7Z8lGBqPPOf+0TA6R556GXvqSOJIMKoXHrmzTl6Z9pc9PWu+m1yOu/ GgwvHSYLZs9PZsOUca/S05bzIUHVb1g== ARC-Authentication-Results: i=1; outbound3.ore.mailhop.org; spf=softfail smtp.mailfrom=freebsd.org smtp.remote-ip=67.177.211.60; dmarc=none header.from=freebsd.org; arc=none header.oldest-pass=0; DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=outbound.mailhop.org; s=dkim-high; h=content-transfer-encoding:mime-version:content-type:references:in-reply-to: date:cc:to:from:subject:message-id:from; bh=yAC8gX5qGWhxdWU0hKZhTTczYvKmL+gAY2fQsFsM/is=; b=Ucts5aWcpB3WKJtLTVJyTsR39vbkbszqqaso71VKvDrgaYHVRJc8qV6IsiXGVO54UyTKGySUMM59E pwmwt98suz/8L0qQ8LfwmVN7FxwEJTTZJ3vRVEc0rvTfQeqHF6L6J5HEL18Jv6AW2itR6n901THCrp XGXiQrRG0qa65X28MJWGSxwm2u3gs1To9xOBnmQ7cn38lRrW9jM/tdBMAwH2S/ad8FPnCJLHy2htr8 d0J9R1JnlqCxvnNGIPjP6TMKf8a/WuV0zapr2P+NyYCeyOd1MJu3ephKLylxJGNm8hFrnnJRNumRDP H8TGBfA8OzpbMBlSklBPV4jiKgzuPrQ== X-MHO-RoutePath: aGlwcGll X-MHO-User: ef4683c3-19a3-11e9-a59a-7b143e15dabc X-Report-Abuse-To: https://support.duocircle.com/support/solutions/articles/5000540958-duocircle-standard-smtp-abuse-information X-Originating-IP: 67.177.211.60 X-Mail-Handler: DuoCircle Outbound SMTP Received: from ilsoft.org (unknown [67.177.211.60]) by outbound3.ore.mailhop.org (Halon) with ESMTPSA id ef4683c3-19a3-11e9-a59a-7b143e15dabc; Wed, 16 Jan 2019 15:32:30 +0000 (UTC) Received: from rev (rev [172.22.42.240]) by ilsoft.org (8.15.2/8.15.2) with ESMTP id x0GFXMKI074617; Wed, 16 Jan 2019 08:33:22 -0700 (MST) (envelope-from ian@freebsd.org) Message-ID: <604708565c923c1fdba0924ccc497ee5cb6595d8.camel@freebsd.org> Subject: Re: svn commit: r343058 - in head/sys: compat/linuxkpi/common/src vm From: Ian Lepore To: Gleb Smirnoff Cc: Justin Hibbits , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Date: Wed, 16 Jan 2019 08:33:22 -0700 In-Reply-To: <20190115203316.GA18452@FreeBSD.org> References: <201901151933.x0FJXl8a069317@repo.freebsd.org> <20190115134623.139064b2@titan.knownspace> <20190115200617.GZ18452@FreeBSD.org> <79ee763bb72a47f3e7888caf266174a62c23e532.camel@freebsd.org> <20190115203316.GA18452@FreeBSD.org> Content-Type: text/plain; charset="UTF-8" X-Mailer: Evolution 3.28.5 FreeBSD GNOME Team Mime-Version: 1.0 Content-Transfer-Encoding: 7bit X-Rspamd-Queue-Id: 82EDE7314C X-Spamd-Bar: ------ Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-6.99 / 15.00]; NEURAL_HAM_MEDIUM(-1.00)[-1.000,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; REPLY(-4.00)[]; NEURAL_HAM_SHORT(-0.99)[-0.989,0] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 16 Jan 2019 15:49:35 -0000 On Tue, 2019-01-15 at 12:33 -0800, Gleb Smirnoff wrote: > On Tue, Jan 15, 2019 at 01:20:14PM -0700, Ian Lepore wrote: > I> On Tue, 2019-01-15 at 12:06 -0800, Gleb Smirnoff wrote: > I> > On Tue, Jan 15, 2019 at 01:46:23PM -0600, Justin Hibbits wrote: > I> > J> Why not #include counter.h in the relevant vm_machdep.c files > I> > instead? > I> > > I> > This also is ugly :( Not sure more or less. Probably less, but I > I> > urged to plug all possible compilation failures at a time. > I> > > I> > What is ugly is that most files just need counter_u64_t size, > I> > and they don't use counter(9) KPI. > I> > > I> > The fact that vm_machdep or Linux KPI want to look into internal > I> > type uma_zone_t is also ugly. > I> > > I> > I> Isn't the usual fix for this problem to create a __counter_u64_t > in > I> sys/types.h and use it in places where including the full header > file > I> is undesirable for some reason? > > I'm inclined to this solution. Do you want to sign up as reviewer? :) > I can barely keep up with reading all my freebsd-related email these days, I'd better not commit to a review that I may not actually get around to. :/ -- Ian From owner-svn-src-all@freebsd.org Wed Jan 16 19:20:15 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 6BB6A1492450; Wed, 16 Jan 2019 19:20:15 +0000 (UTC) (envelope-from shurd@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 12C4082F7F; Wed, 16 Jan 2019 19:20:15 +0000 (UTC) (envelope-from shurd@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1: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 0256269A7; Wed, 16 Jan 2019 19:20:15 +0000 (UTC) (envelope-from shurd@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x0GJKEO2045809; Wed, 16 Jan 2019 19:20:14 GMT (envelope-from shurd@FreeBSD.org) Received: (from shurd@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x0GJKEgm045808; Wed, 16 Jan 2019 19:20:14 GMT (envelope-from shurd@FreeBSD.org) Message-Id: <201901161920.x0GJKEgm045808@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: shurd set sender to shurd@FreeBSD.org using -f From: Stephen Hurd Date: Wed, 16 Jan 2019 19:20:14 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r343099 - stable/11/sys/net X-SVN-Group: stable-11 X-SVN-Commit-Author: shurd X-SVN-Commit-Paths: stable/11/sys/net X-SVN-Commit-Revision: 343099 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 12C4082F7F X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.98 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_LONG(-1.00)[-0.999,0]; NEURAL_HAM_SHORT(-0.98)[-0.978,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 16 Jan 2019 19:20:15 -0000 Author: shurd Date: Wed Jan 16 19:20:14 2019 New Revision: 343099 URL: https://svnweb.freebsd.org/changeset/base/343099 Log: MFC r342855: Use iflib_if_init_locked() during resume instead of iflib_init_locked(). iflib_init_locked() assumes that iflib_stop() has been called, however, it is not called for suspend. iflib_if_init_locked() calls stop then init, so fixes the problem. This was causing errors after a resume from suspend. PR: 224059 Reported by: zeising Sponsored by: Limelight Networks Modified: stable/11/sys/net/iflib.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/net/iflib.c ============================================================================== --- stable/11/sys/net/iflib.c Wed Jan 16 15:19:09 2019 (r343098) +++ stable/11/sys/net/iflib.c Wed Jan 16 19:20:14 2019 (r343099) @@ -4540,7 +4540,7 @@ iflib_device_resume(device_t dev) CTX_LOCK(ctx); IFDI_RESUME(ctx); - iflib_init_locked(ctx); + iflib_if_init_locked(ctx); CTX_UNLOCK(ctx); for (int i = 0; i < NTXQSETS(ctx); i++, txq++) iflib_txq_check_drain(txq, IFLIB_RESTART_BUDGET); From owner-svn-src-all@freebsd.org Wed Jan 16 20:14:18 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id F05C71494071; Wed, 16 Jan 2019 20:14:17 +0000 (UTC) (envelope-from glebius@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 61D8B8593B; Wed, 16 Jan 2019 20:14:17 +0000 (UTC) (envelope-from glebius@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 331C273B0; Wed, 16 Jan 2019 20:14:17 +0000 (UTC) (envelope-from glebius@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x0GKEHw2078221; Wed, 16 Jan 2019 20:14:17 GMT (envelope-from glebius@FreeBSD.org) Received: (from glebius@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x0GKEG9w078218; Wed, 16 Jan 2019 20:14:16 GMT (envelope-from glebius@FreeBSD.org) Message-Id: <201901162014.x0GKEG9w078218@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: glebius set sender to glebius@FreeBSD.org using -f From: Gleb Smirnoff Date: Wed, 16 Jan 2019 20:14:16 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r343100 - head/sys/vm X-SVN-Group: head X-SVN-Commit-Author: glebius X-SVN-Commit-Paths: head/sys/vm X-SVN-Commit-Revision: 343100 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 61D8B8593B X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.96 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_SHORT(-0.96)[-0.964,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_LONG(-1.00)[-0.999,0] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 16 Jan 2019 20:14:18 -0000 Author: glebius Date: Wed Jan 16 20:14:16 2019 New Revision: 343100 URL: https://svnweb.freebsd.org/changeset/base/343100 Log: Do not reserve KVA for paging bufs in vm_ksubmap_init(), since now they allocate it in pbuf_init(). This should have been done together with r343030. Modified: head/sys/vm/vm_init.c head/sys/vm/vm_kern.h head/sys/vm/vm_pager.c Modified: head/sys/vm/vm_init.c ============================================================================== --- head/sys/vm/vm_init.c Wed Jan 16 19:20:14 2019 (r343099) +++ head/sys/vm/vm_init.c Wed Jan 16 20:14:16 2019 (r343100) @@ -221,11 +221,9 @@ again: panic("startup: table size inconsistency"); /* - * Allocate the clean map to hold all of the paging and I/O virtual - * memory. + * Allocate the clean map to hold all of I/O virtual memory. */ - size = (long)nbuf * BKVASIZE + (long)nswbuf * MAXPHYS + - (long)bio_transient_maxcnt * MAXPHYS; + size = (long)nbuf * BKVASIZE + (long)bio_transient_maxcnt * MAXPHYS; kmi->clean_sva = firstaddr = kva_alloc(size); kmi->clean_eva = firstaddr + size; @@ -240,13 +238,6 @@ again: kmi->buffer_eva = kmi->buffer_sva + size; vmem_init(buffer_arena, "buffer arena", kmi->buffer_sva, size, PAGE_SIZE, (mp_ncpus > 4) ? BKVASIZE * 8 : 0, 0); - firstaddr += size; - - /* - * Now swap kva. - */ - swapbkva = firstaddr; - size = (long)nswbuf * MAXPHYS; firstaddr += size; /* Modified: head/sys/vm/vm_kern.h ============================================================================== --- head/sys/vm/vm_kern.h Wed Jan 16 19:20:14 2019 (r343099) +++ head/sys/vm/vm_kern.h Wed Jan 16 20:14:16 2019 (r343100) @@ -74,7 +74,6 @@ extern struct vmem *kmem_arena; extern struct vmem *buffer_arena; extern struct vmem *transient_arena; extern struct vmem *memguard_arena; -extern vm_offset_t swapbkva; extern u_long vm_kmem_size; extern u_int exec_map_entries; extern u_int exec_map_entry_size; Modified: head/sys/vm/vm_pager.c ============================================================================== --- head/sys/vm/vm_pager.c Wed Jan 16 19:20:14 2019 (r343099) +++ head/sys/vm/vm_pager.c Wed Jan 16 20:14:16 2019 (r343100) @@ -163,16 +163,6 @@ struct pagerops *pagertab[] = { &mgtdevicepagerops, /* OBJT_MGTDEVICE */ }; -/* - * Kernel address space for mapping pages. - * Used by pagers where KVAs are needed for IO. - * - * XXX needs to be large enough to support the number of pending async - * cleaning requests (NPENDINGIO == 64) * the maximum swap cluster size - * (MAXPHYS == 64k) if you want to get the most efficiency. - */ -vm_offset_t swapbkva; /* swap buffers kva */ - void vm_pager_init(void) { From owner-svn-src-all@freebsd.org Wed Jan 16 20:20:39 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 3B06414941BC; Wed, 16 Jan 2019 20:20:39 +0000 (UTC) (envelope-from glebius@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 D32C185BFA; Wed, 16 Jan 2019 20:20:38 +0000 (UTC) (envelope-from glebius@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id B5DBB73BC; Wed, 16 Jan 2019 20:20:38 +0000 (UTC) (envelope-from glebius@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x0GKKclS078698; Wed, 16 Jan 2019 20:20:38 GMT (envelope-from glebius@FreeBSD.org) Received: (from glebius@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x0GKKcCP078696; Wed, 16 Jan 2019 20:20:38 GMT (envelope-from glebius@FreeBSD.org) Message-Id: <201901162020.x0GKKcCP078696@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: glebius set sender to glebius@FreeBSD.org using -f From: Gleb Smirnoff Date: Wed, 16 Jan 2019 20:20:38 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r343101 - head/sys/kern X-SVN-Group: head X-SVN-Commit-Author: glebius X-SVN-Commit-Paths: head/sys/kern X-SVN-Commit-Revision: 343101 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: D32C185BFA X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.96 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_SHORT(-0.96)[-0.961,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_LONG(-1.00)[-0.999,0] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 16 Jan 2019 20:20:39 -0000 Author: glebius Date: Wed Jan 16 20:20:38 2019 New Revision: 343101 URL: https://svnweb.freebsd.org/changeset/base/343101 Log: Fix mistake in r343030: move nswbuf calculation back to kern_vfs_bio_buffer_alloc(), because in init_param2() nbuf isn't really initialized yet. Pointed out by: bde Modified: head/sys/kern/subr_param.c head/sys/kern/vfs_bio.c Modified: head/sys/kern/subr_param.c ============================================================================== --- head/sys/kern/subr_param.c Wed Jan 16 20:14:16 2019 (r343100) +++ head/sys/kern/subr_param.c Wed Jan 16 20:20:38 2019 (r343101) @@ -291,10 +291,7 @@ init_param2(long physpages) * Physical buffers are pre-allocated buffers (struct buf) that * are used as temporary holders for I/O, such as paging I/O. */ - nswbuf = min(nbuf / 4, 256); TUNABLE_INT_FETCH("kern.nswbuf", &nswbuf); - if (nswbuf < NSWBUF_MIN) - nswbuf = NSWBUF_MIN; /* * The default for maxpipekva is min(1/64 of the kernel address space, Modified: head/sys/kern/vfs_bio.c ============================================================================== --- head/sys/kern/vfs_bio.c Wed Jan 16 20:14:16 2019 (r343100) +++ head/sys/kern/vfs_bio.c Wed Jan 16 20:20:38 2019 (r343101) @@ -1124,6 +1124,12 @@ kern_vfs_bio_buffer_alloc(caddr_t v, long physmem_est) nbuf = buf_sz / BKVASIZE; } + if (nswbuf == 0) { + nswbuf = min(nbuf / 4, 256); + if (nswbuf < NSWBUF_MIN) + nswbuf = NSWBUF_MIN; + } + /* * Reserve space for the buffer cache buffers */ From owner-svn-src-all@freebsd.org Wed Jan 16 20:38:18 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 85AC11494876; Wed, 16 Jan 2019 20:38:18 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.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 2C96086583; Wed, 16 Jan 2019 20:38:18 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id EB60E7713; Wed, 16 Jan 2019 20:38:17 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x0GKcHjO088961; Wed, 16 Jan 2019 20:38:17 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x0GKcHoU088960; Wed, 16 Jan 2019 20:38:17 GMT (envelope-from dim@FreeBSD.org) Message-Id: <201901162038.x0GKcHoU088960@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Wed, 16 Jan 2019 20:38:17 +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: r343102 - in stable: 11/contrib/llvm/lib/Transforms/Vectorize 12/contrib/llvm/lib/Transforms/Vectorize X-SVN-Group: stable-12 X-SVN-Commit-Author: dim X-SVN-Commit-Paths: in stable: 11/contrib/llvm/lib/Transforms/Vectorize 12/contrib/llvm/lib/Transforms/Vectorize X-SVN-Commit-Revision: 343102 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 2C96086583 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.96 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_SHORT(-0.96)[-0.961,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_LONG(-1.00)[-0.999,0] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 16 Jan 2019 20:38:18 -0000 Author: dim Date: Wed Jan 16 20:38:17 2019 New Revision: 343102 URL: https://svnweb.freebsd.org/changeset/base/343102 Log: Pull in r337861 from upstream llvm trunk (by Hideki Saito): [LV] Fix for PR38110, LV encountered llvm_unreachable() Summary: truncateToMinimalBitWidths() doesn't handle all Instructions and the worst case is compiler crash via llvm_unreachable(). Fix is to add a case to handle PHINode and changed the worst case to NO-OP (from compiler crash). Reviewers: sbaranga, mssimpso, hsaito Reviewed By: hsaito Subscribers: llvm-commits Differential Revision: https://reviews.llvm.org/D49461 This should fix "Unhandled instruction type!" (if assertions are enabled) or segmentation faults (if assertions are disabled) when compiling certain versions of the net-p2p/gtk-gnutella port. Direct commit to stable/11 and stable/12, since head already has this fix. Reported by: Jamie Landeg-Jones PR: 234987 Modified: stable/12/contrib/llvm/lib/Transforms/Vectorize/LoopVectorize.cpp Changes in other areas also in this revision: Modified: stable/11/contrib/llvm/lib/Transforms/Vectorize/LoopVectorize.cpp Modified: stable/12/contrib/llvm/lib/Transforms/Vectorize/LoopVectorize.cpp ============================================================================== --- stable/12/contrib/llvm/lib/Transforms/Vectorize/LoopVectorize.cpp Wed Jan 16 20:20:38 2019 (r343101) +++ stable/12/contrib/llvm/lib/Transforms/Vectorize/LoopVectorize.cpp Wed Jan 16 20:38:17 2019 (r343102) @@ -4088,7 +4088,7 @@ void InnerLoopVectorizer::truncateToMinimalBitwidths() SI->getOperand(1), VectorType::get(ScalarTruncatedTy, Elements1)); NewI = B.CreateShuffleVector(O0, O1, SI->getMask()); - } else if (isa(I)) { + } else if (isa(I) || isa(I)) { // Don't do anything with the operands, just extend the result. continue; } else if (auto *IE = dyn_cast(I)) { @@ -4103,7 +4103,8 @@ void InnerLoopVectorizer::truncateToMinimalBitwidths() EE->getOperand(0), VectorType::get(ScalarTruncatedTy, Elements)); NewI = B.CreateExtractElement(O0, EE->getOperand(2)); } else { - llvm_unreachable("Unhandled instruction type!"); + // If we don't know what to do, be conservative and don't do anything. + continue; } // Lastly, extend the result. From owner-svn-src-all@freebsd.org Wed Jan 16 20:38:18 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id B63581494878; Wed, 16 Jan 2019 20:38:18 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.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 5DC3E86586; Wed, 16 Jan 2019 20:38:18 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4AB387714; Wed, 16 Jan 2019 20:38:18 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x0GKcIRN088967; Wed, 16 Jan 2019 20:38:18 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x0GKcIAk088966; Wed, 16 Jan 2019 20:38:18 GMT (envelope-from dim@FreeBSD.org) Message-Id: <201901162038.x0GKcIAk088966@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Wed, 16 Jan 2019 20:38:18 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r343102 - in stable: 11/contrib/llvm/lib/Transforms/Vectorize 12/contrib/llvm/lib/Transforms/Vectorize X-SVN-Group: stable-11 X-SVN-Commit-Author: dim X-SVN-Commit-Paths: in stable: 11/contrib/llvm/lib/Transforms/Vectorize 12/contrib/llvm/lib/Transforms/Vectorize X-SVN-Commit-Revision: 343102 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 5DC3E86586 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.96 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_SHORT(-0.96)[-0.961,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_LONG(-1.00)[-0.999,0] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 16 Jan 2019 20:38:19 -0000 Author: dim Date: Wed Jan 16 20:38:17 2019 New Revision: 343102 URL: https://svnweb.freebsd.org/changeset/base/343102 Log: Pull in r337861 from upstream llvm trunk (by Hideki Saito): [LV] Fix for PR38110, LV encountered llvm_unreachable() Summary: truncateToMinimalBitWidths() doesn't handle all Instructions and the worst case is compiler crash via llvm_unreachable(). Fix is to add a case to handle PHINode and changed the worst case to NO-OP (from compiler crash). Reviewers: sbaranga, mssimpso, hsaito Reviewed By: hsaito Subscribers: llvm-commits Differential Revision: https://reviews.llvm.org/D49461 This should fix "Unhandled instruction type!" (if assertions are enabled) or segmentation faults (if assertions are disabled) when compiling certain versions of the net-p2p/gtk-gnutella port. Direct commit to stable/11 and stable/12, since head already has this fix. Reported by: Jamie Landeg-Jones PR: 234987 Modified: stable/11/contrib/llvm/lib/Transforms/Vectorize/LoopVectorize.cpp Changes in other areas also in this revision: Modified: stable/12/contrib/llvm/lib/Transforms/Vectorize/LoopVectorize.cpp Modified: stable/11/contrib/llvm/lib/Transforms/Vectorize/LoopVectorize.cpp ============================================================================== --- stable/11/contrib/llvm/lib/Transforms/Vectorize/LoopVectorize.cpp Wed Jan 16 20:20:38 2019 (r343101) +++ stable/11/contrib/llvm/lib/Transforms/Vectorize/LoopVectorize.cpp Wed Jan 16 20:38:17 2019 (r343102) @@ -4088,7 +4088,7 @@ void InnerLoopVectorizer::truncateToMinimalBitwidths() SI->getOperand(1), VectorType::get(ScalarTruncatedTy, Elements1)); NewI = B.CreateShuffleVector(O0, O1, SI->getMask()); - } else if (isa(I)) { + } else if (isa(I) || isa(I)) { // Don't do anything with the operands, just extend the result. continue; } else if (auto *IE = dyn_cast(I)) { @@ -4103,7 +4103,8 @@ void InnerLoopVectorizer::truncateToMinimalBitwidths() EE->getOperand(0), VectorType::get(ScalarTruncatedTy, Elements)); NewI = B.CreateExtractElement(O0, EE->getOperand(2)); } else { - llvm_unreachable("Unhandled instruction type!"); + // If we don't know what to do, be conservative and don't do anything. + continue; } // Lastly, extend the result. From owner-svn-src-all@freebsd.org Wed Jan 16 20:46:41 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 212B81494ECD; Wed, 16 Jan 2019 20:46:41 +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 B73A786DA1; Wed, 16 Jan 2019 20:46:40 +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 8949278C7; Wed, 16 Jan 2019 20:46:40 +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 x0GKkeiu094440; Wed, 16 Jan 2019 20:46:40 GMT (envelope-from cy@FreeBSD.org) Received: (from cy@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x0GKkeBw094439; Wed, 16 Jan 2019 20:46:40 GMT (envelope-from cy@FreeBSD.org) Message-Id: <201901162046.x0GKkeBw094439@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: cy set sender to cy@FreeBSD.org using -f From: Cy Schubert Date: Wed, 16 Jan 2019 20:46:40 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r343103 - head/contrib/ipfilter X-SVN-Group: head X-SVN-Commit-Author: cy X-SVN-Commit-Paths: head/contrib/ipfilter X-SVN-Commit-Revision: 343103 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: B73A786DA1 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.96 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_SHORT(-0.96)[-0.959,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_LONG(-1.00)[-0.999,0] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 16 Jan 2019 20:46:41 -0000 Author: cy Date: Wed Jan 16 20:46:39 2019 New Revision: 343103 URL: https://svnweb.freebsd.org/changeset/base/343103 Log: Remove redundant ipfilter version of pcap-bpf.h. As of r214535 it was no longer needed. MFC after: 1 week Deleted: head/contrib/ipfilter/pcap-bpf.h From owner-svn-src-all@freebsd.org Wed Jan 16 21:13:51 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 64FEA1495F75; Wed, 16 Jan 2019 21:13:51 +0000 (UTC) (envelope-from gonzo@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 0907A87F80; Wed, 16 Jan 2019 21:13:51 +0000 (UTC) (envelope-from gonzo@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id B7D9A7DCA; Wed, 16 Jan 2019 21:13:50 +0000 (UTC) (envelope-from gonzo@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x0GLDoT3010110; Wed, 16 Jan 2019 21:13:50 GMT (envelope-from gonzo@FreeBSD.org) Received: (from gonzo@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x0GLDorU010109; Wed, 16 Jan 2019 21:13:50 GMT (envelope-from gonzo@FreeBSD.org) Message-Id: <201901162113.x0GLDorU010109@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gonzo set sender to gonzo@FreeBSD.org using -f From: Oleksandr Tymoshenko Date: Wed, 16 Jan 2019 21:13:50 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r343104 - head/sys/arm/mv X-SVN-Group: head X-SVN-Commit-Author: gonzo X-SVN-Commit-Paths: head/sys/arm/mv X-SVN-Commit-Revision: 343104 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 0907A87F80 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.96 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_SHORT(-0.96)[-0.961,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_LONG(-1.00)[-0.999,0] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 16 Jan 2019 21:13:51 -0000 Author: gonzo Date: Wed Jan 16 21:13:50 2019 New Revision: 343104 URL: https://svnweb.freebsd.org/changeset/base/343104 Log: [mv] Fix invalid condition in fdt_fixup_ranges Add parentheses to perform assignment before comparison. The prior condition worked because fdt_parent_addr_cells returns 1 for the DTB on which fdt_fixup_ranges is called and accidentally par_addr_cells ends up to be set to the same value. PR: 210705 Submitted by: David Binderman MFC after: 1 week Modified: head/sys/arm/mv/mv_common.c Modified: head/sys/arm/mv/mv_common.c ============================================================================== --- head/sys/arm/mv/mv_common.c Wed Jan 16 20:46:39 2019 (r343103) +++ head/sys/arm/mv/mv_common.c Wed Jan 16 21:13:50 2019 (r343104) @@ -2935,7 +2935,7 @@ fdt_fixup_ranges(phandle_t root) /* Fix-up SoC ranges according to real fdt_immr_pa */ if ((node = fdt_find_compatible(root, "simple-bus", 1)) != 0) { if (fdt_addrsize_cells(node, &addr_cells, &size_cells) == 0 && - (par_addr_cells = fdt_parent_addr_cells(node) <= 2)) { + ((par_addr_cells = fdt_parent_addr_cells(node)) <= 2)) { tuple_size = sizeof(pcell_t) * (par_addr_cells + addr_cells + size_cells); len = OF_getprop(node, "ranges", ranges, From owner-svn-src-all@freebsd.org Wed Jan 16 21:59:19 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id D03821496C39; Wed, 16 Jan 2019 21:59:19 +0000 (UTC) (envelope-from jilles@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.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 6B9F18933B; Wed, 16 Jan 2019 21:59:19 +0000 (UTC) (envelope-from jilles@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 5CB4F84DD; Wed, 16 Jan 2019 21:59:19 +0000 (UTC) (envelope-from jilles@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x0GLxJkj031322; Wed, 16 Jan 2019 21:59:19 GMT (envelope-from jilles@FreeBSD.org) Received: (from jilles@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x0GLxJaA031321; Wed, 16 Jan 2019 21:59:19 GMT (envelope-from jilles@FreeBSD.org) Message-Id: <201901162159.x0GLxJaA031321@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jilles set sender to jilles@FreeBSD.org using -f From: Jilles Tjoelker Date: Wed, 16 Jan 2019 21:59:19 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r343105 - head/lib/libedit X-SVN-Group: head X-SVN-Commit-Author: jilles X-SVN-Commit-Paths: head/lib/libedit X-SVN-Commit-Revision: 343105 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 6B9F18933B X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.95 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_LONG(-1.00)[-0.999,0]; NEURAL_HAM_SHORT(-0.95)[-0.949,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 16 Jan 2019 21:59:20 -0000 Author: jilles Date: Wed Jan 16 21:59:18 2019 New Revision: 343105 URL: https://svnweb.freebsd.org/changeset/base/343105 Log: libedit: Avoid out of bounds read in 'bind' command This is CVS revision 1.31 from NetBSD lib/libedit/chartype.c: Make sure that argv is NULL terminated since functions like tty_stty rely on it to be so (Gerry Swinslow) This broke when the wide-character support was enabled in libedit. The conversion from multibyte to wide-character did not supply the apparently expected terminating NULL in the new argv array. PR: 233343 Submitted by: Yuichiro NAITO Obtained from: NetBSD MFC after: 1 week Modified: head/lib/libedit/chartype.c Modified: head/lib/libedit/chartype.c ============================================================================== --- head/lib/libedit/chartype.c Wed Jan 16 21:13:50 2019 (r343104) +++ head/lib/libedit/chartype.c Wed Jan 16 21:59:18 2019 (r343105) @@ -157,7 +157,7 @@ ct_decode_argv(int argc, const char *argv[], ct_buffer if (ct_conv_wbuff_resize(conv, bufspace + CT_BUFSIZ) == -1) return NULL; - wargv = el_malloc((size_t)argc * sizeof(*wargv)); + wargv = el_malloc((size_t)(argc + 1) * sizeof(*wargv)); for (i = 0, p = conv->wbuff; i < argc; ++i) { if (!argv[i]) { /* don't pass null pointers to mbstowcs */ @@ -175,6 +175,7 @@ ct_decode_argv(int argc, const char *argv[], ct_buffer bufspace -= (size_t)bytes; p += bytes; } + wargv[i] = NULL; return wargv; } From owner-svn-src-all@freebsd.org Wed Jan 16 22:29:35 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 49E8314978B3; Wed, 16 Jan 2019 22:29:35 +0000 (UTC) (envelope-from gonzo@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 DEBAF8A330; Wed, 16 Jan 2019 22:29:34 +0000 (UTC) (envelope-from gonzo@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id C0CA789F0; Wed, 16 Jan 2019 22:29:34 +0000 (UTC) (envelope-from gonzo@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x0GMTYqk046944; Wed, 16 Jan 2019 22:29:34 GMT (envelope-from gonzo@FreeBSD.org) Received: (from gonzo@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x0GMTY0U046942; Wed, 16 Jan 2019 22:29:34 GMT (envelope-from gonzo@FreeBSD.org) Message-Id: <201901162229.x0GMTY0U046942@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gonzo set sender to gonzo@FreeBSD.org using -f From: Oleksandr Tymoshenko Date: Wed, 16 Jan 2019 22:29:34 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r343106 - in head/sys/dev/usb: . quirk X-SVN-Group: head X-SVN-Commit-Author: gonzo X-SVN-Commit-Paths: in head/sys/dev/usb: . quirk X-SVN-Commit-Revision: 343106 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: DEBAF8A330 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.95 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_SHORT(-0.95)[-0.949,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_LONG(-1.00)[-0.999,0] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 16 Jan 2019 22:29:35 -0000 Author: gonzo Date: Wed Jan 16 22:29:34 2019 New Revision: 343106 URL: https://svnweb.freebsd.org/changeset/base/343106 Log: [usb] Add quirk for SmartG2 USB memory key PR: 167001 Submitted by: Daan Vreeken [PA4DAN] MFC after: 1 week Modified: head/sys/dev/usb/quirk/usb_quirk.c head/sys/dev/usb/usbdevs Modified: head/sys/dev/usb/quirk/usb_quirk.c ============================================================================== --- head/sys/dev/usb/quirk/usb_quirk.c Wed Jan 16 21:59:18 2019 (r343105) +++ head/sys/dev/usb/quirk/usb_quirk.c Wed Jan 16 22:29:34 2019 (r343106) @@ -498,6 +498,7 @@ static struct usb_quirk_entry usb_quirks[USB_DEV_QUIRK USB_QUIRK(VIALABS, USB30SATABRIDGE, 0x0000, 0xffff, UQ_MSC_NO_SYNC_CACHE), USB_QUIRK(QUALCOMMINC, ZTE_MF730M, 0x0000, 0xffff, UQ_MSC_NO_GETMAXLUN, UQ_MSC_NO_INQUIRY, UQ_CFG_INDEX_0), + USB_QUIRK(SMART2, G2MEMKEY, 0x0000, 0xffff, UQ_MSC_NO_INQUIRY), /* Non-standard USB MIDI devices */ USB_QUIRK(ROLAND, UM1, 0x0000, 0xffff, UQ_AU_VENDOR_CLASS), USB_QUIRK(ROLAND, SC8850, 0x0000, 0xffff, UQ_AU_VENDOR_CLASS), Modified: head/sys/dev/usb/usbdevs ============================================================================== --- head/sys/dev/usb/usbdevs Wed Jan 16 21:59:18 2019 (r343105) +++ head/sys/dev/usb/usbdevs Wed Jan 16 22:29:34 2019 (r343106) @@ -561,6 +561,7 @@ vendor NETAC 0x0dd8 Netac vendor SITECOMEU 0x0df6 Sitecom Europe vendor MOBILEACTION 0x0df7 Mobile Action vendor AMIGO 0x0e0b Amigo Technology +vendor SMART2 0x0e39 Smart Modular Technologies vendor SPEEDDRAGON 0x0e55 Speed Dragon Multimedia vendor HAWKING 0x0e66 Hawking vendor FOSSIL 0x0e67 Fossil, Inc @@ -4372,6 +4373,9 @@ product SKANHEX SX_520Z 0x5200 SX 520z Camera /* Smart Technologies products */ product SMART PL2303 0x2303 Serial adapter + +/* Smart Modular Technologies products */ +product SMART2 G2MEMKEY 0x1700 G2 Memory Key /* SmartBridges products */ product SMARTBRIDGES SMARTLINK 0x0001 SmartLink USB Ethernet From owner-svn-src-all@freebsd.org Thu Jan 17 04:51:06 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id AED2414A77F6; Thu, 17 Jan 2019 04:51:06 +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 50A6A71B81; Thu, 17 Jan 2019 04:51:06 +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 365A0D22C; Thu, 17 Jan 2019 04:51:06 +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 x0H4p6vP047421; Thu, 17 Jan 2019 04:51:06 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x0H4p6n4047420; Thu, 17 Jan 2019 04:51:06 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201901170451.x0H4p6n4047420@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Thu, 17 Jan 2019 04:51:06 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r343107 - head/sys/kern X-SVN-Group: head X-SVN-Commit-Author: kib X-SVN-Commit-Paths: head/sys/kern X-SVN-Commit-Revision: 343107 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 50A6A71B81 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.97 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_SHORT(-0.97)[-0.970,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_LONG(-1.00)[-0.999,0] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 17 Jan 2019 04:51:06 -0000 Author: kib Date: Thu Jan 17 04:51:05 2019 New Revision: 343107 URL: https://svnweb.freebsd.org/changeset/base/343107 Log: Re-wrap long line after r341827. Sponsored by: The FreeBSD Foundation MFC after: 3 days Modified: head/sys/kern/kern_fork.c Modified: head/sys/kern/kern_fork.c ============================================================================== --- head/sys/kern/kern_fork.c Wed Jan 16 22:29:34 2019 (r343106) +++ head/sys/kern/kern_fork.c Thu Jan 17 04:51:05 2019 (r343107) @@ -882,7 +882,9 @@ fork1(struct thread *td, struct fork_req *fr) * processes; don't let root exceed the limit. */ nprocs_new = atomic_fetchadd_int(&nprocs, 1) + 1; - if ((nprocs_new >= maxproc - 10 && priv_check_cred(td->td_ucred, PRIV_MAXPROC) != 0) || nprocs_new >= maxproc) { + if ((nprocs_new >= maxproc - 10 && + priv_check_cred(td->td_ucred, PRIV_MAXPROC) != 0) || + nprocs_new >= maxproc) { error = EAGAIN; sx_xlock(&allproc_lock); if (ppsratecheck(&lastfail, &curfail, 1)) { From owner-svn-src-all@freebsd.org Thu Jan 17 05:15:26 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 61AB51481726; Thu, 17 Jan 2019 05:15:26 +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 07B5D72856; Thu, 17 Jan 2019 05:15:26 +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 D2AFFD720; Thu, 17 Jan 2019 05:15:25 +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 x0H5FP47061634; Thu, 17 Jan 2019 05:15:25 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x0H5FPag061633; Thu, 17 Jan 2019 05:15:25 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201901170515.x0H5FPag061633@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Thu, 17 Jan 2019 05:15:25 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r343108 - head/sys/amd64/vmm/intel X-SVN-Group: head X-SVN-Commit-Author: kib X-SVN-Commit-Paths: head/sys/amd64/vmm/intel X-SVN-Commit-Revision: 343108 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 07B5D72856 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.97 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_SHORT(-0.97)[-0.972,0]; NEURAL_HAM_LONG(-1.00)[-0.999,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 17 Jan 2019 05:15:26 -0000 Author: kib Date: Thu Jan 17 05:15:25 2019 New Revision: 343108 URL: https://svnweb.freebsd.org/changeset/base/343108 Log: Trim whitespace at EoL, use tabs instead of spaces for indent. PR: 235004 Submitted by: Jose Luis Duran MFC after: 3 days Modified: head/sys/amd64/vmm/intel/vmx.c Modified: head/sys/amd64/vmm/intel/vmx.c ============================================================================== --- head/sys/amd64/vmm/intel/vmx.c Thu Jan 17 04:51:05 2019 (r343107) +++ head/sys/amd64/vmm/intel/vmx.c Thu Jan 17 05:15:25 2019 (r343108) @@ -81,7 +81,7 @@ __FBSDID("$FreeBSD$"); (PROCBASED_INT_WINDOW_EXITING | \ PROCBASED_NMI_WINDOW_EXITING) -#define PROCBASED_CTLS_ONE_SETTING \ +#define PROCBASED_CTLS_ONE_SETTING \ (PROCBASED_SECONDARY_CONTROLS | \ PROCBASED_MWAIT_EXITING | \ PROCBASED_MONITOR_EXITING | \ @@ -428,7 +428,7 @@ vmx_allow_x2apic_msrs(struct vmx *vmx) for (i = 0; i < 8; i++) error += guest_msr_ro(vmx, MSR_APIC_TMR0 + i); - + for (i = 0; i < 8; i++) error += guest_msr_ro(vmx, MSR_APIC_IRR0 + i); @@ -576,7 +576,7 @@ vmx_disable(void *arg __unused) static int vmx_cleanup(void) { - + if (pirvec >= 0) lapic_ipi_free(pirvec); @@ -1097,7 +1097,7 @@ static int vmx_handle_cpuid(struct vm *vm, int vcpu, struct vmxctx *vmxctx) { int handled, func; - + func = vmxctx->guest_rax; handled = x86_emulate_cpuid(vm, vcpu, @@ -3096,7 +3096,7 @@ vmx_get_intr_shadow(struct vmx *vmx, int vcpu, int run uint64_t gi; int error; - error = vmcs_getreg(&vmx->vmcs[vcpu], running, + error = vmcs_getreg(&vmx->vmcs[vcpu], running, VMCS_IDENT(VMCS_GUEST_INTERRUPTIBILITY), &gi); *retval = (gi & HWINTR_BLOCKING) ? 1 : 0; return (error); @@ -3140,8 +3140,8 @@ vmx_shadow_reg(int reg) switch (reg) { case VM_REG_GUEST_CR0: shreg = VMCS_CR0_SHADOW; - break; - case VM_REG_GUEST_CR4: + break; + case VM_REG_GUEST_CR4: shreg = VMCS_CR4_SHADOW; break; default: @@ -3212,7 +3212,7 @@ vmx_setreg(void *arg, int vcpu, int reg, uint64_t val) if (shadow > 0) { /* * Store the unmodified value in the shadow - */ + */ error = vmcs_setreg(&vmx->vmcs[vcpu], running, VMCS_IDENT(shadow), val); } @@ -3395,7 +3395,7 @@ vmx_setcap(void *arg, int vcpu, int type, int val) } } - return (retval); + return (retval); } struct vlapic_vtx { @@ -3698,7 +3698,7 @@ vmx_vlapic_init(void *arg, int vcpuid) struct vmx *vmx; struct vlapic *vlapic; struct vlapic_vtx *vlapic_vtx; - + vmx = arg; vlapic = malloc(sizeof(struct vlapic_vtx), M_VLAPIC, M_WAITOK | M_ZERO); From owner-svn-src-all@freebsd.org Thu Jan 17 06:22:15 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 8FF8F1484E25; Thu, 17 Jan 2019 06:22:15 +0000 (UTC) (envelope-from gonzo@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 35B8D75626; Thu, 17 Jan 2019 06:22:15 +0000 (UTC) (envelope-from gonzo@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 2988BE2CC; Thu, 17 Jan 2019 06:22:15 +0000 (UTC) (envelope-from gonzo@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x0H6MFS2097996; Thu, 17 Jan 2019 06:22:15 GMT (envelope-from gonzo@FreeBSD.org) Received: (from gonzo@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x0H6MFMT097995; Thu, 17 Jan 2019 06:22:15 GMT (envelope-from gonzo@FreeBSD.org) Message-Id: <201901170622.x0H6MFMT097995@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gonzo set sender to gonzo@FreeBSD.org using -f From: Oleksandr Tymoshenko Date: Thu, 17 Jan 2019 06:22:15 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r343109 - head/tools/build/mk X-SVN-Group: head X-SVN-Commit-Author: gonzo X-SVN-Commit-Paths: head/tools/build/mk X-SVN-Commit-Revision: 343109 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 35B8D75626 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.96 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_SHORT(-0.96)[-0.958,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_LONG(-1.00)[-0.999,0] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 17 Jan 2019 06:22:15 -0000 Author: gonzo Date: Thu Jan 17 06:22:14 2019 New Revision: 343109 URL: https://svnweb.freebsd.org/changeset/base/343109 Log: Add optional obsolete files for the installworld without sendmail Add two more entries for WITHOUT_SENDMAIL install. The /var/spool/clientmqueue entry would be deleted only if there are no files/dirs in it, so the content generated during previous lifecycle of the system is safe PR: 228484 Submitted by: Dmitry Wagin MFC after: 1 week Modified: head/tools/build/mk/OptionalObsoleteFiles.inc Modified: head/tools/build/mk/OptionalObsoleteFiles.inc ============================================================================== --- head/tools/build/mk/OptionalObsoleteFiles.inc Thu Jan 17 05:15:25 2019 (r343108) +++ head/tools/build/mk/OptionalObsoleteFiles.inc Thu Jan 17 06:22:14 2019 (r343109) @@ -7354,6 +7354,7 @@ OLD_FILES+=usr/share/man/man8/rtquery.8.gz .endif .if ${MK_SENDMAIL} == no +OLD_FILES+=etc/mtree/BSD.sendmail.dist OLD_FILES+=etc/newsyslog.conf.d/sendmail.conf OLD_FILES+=etc/periodic/daily/150.clean-hoststat OLD_FILES+=etc/periodic/daily/440.status-mailq @@ -7592,6 +7593,7 @@ OLD_FILES+=usr/share/sendmail/cf/siteconfig/uucp.ucbva OLD_DIRS+=usr/share/sendmail/cf/siteconfig OLD_DIRS+=usr/share/sendmail/cf OLD_DIRS+=usr/share/sendmail +OLD_DIRS+=var/spool/clientmqueue .endif .if ${MK_SERVICESDB} == no From owner-svn-src-all@freebsd.org Thu Jan 17 06:34:41 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id D184514857E4; Thu, 17 Jan 2019 06:34:40 +0000 (UTC) (envelope-from gonzo@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 7C24276054; Thu, 17 Jan 2019 06:34:40 +0000 (UTC) (envelope-from gonzo@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4FA47E498; Thu, 17 Jan 2019 06:34:40 +0000 (UTC) (envelope-from gonzo@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x0H6YetI003659; Thu, 17 Jan 2019 06:34:40 GMT (envelope-from gonzo@FreeBSD.org) Received: (from gonzo@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x0H6YeO5003658; Thu, 17 Jan 2019 06:34:40 GMT (envelope-from gonzo@FreeBSD.org) Message-Id: <201901170634.x0H6YeO5003658@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gonzo set sender to gonzo@FreeBSD.org using -f From: Oleksandr Tymoshenko Date: Thu, 17 Jan 2019 06:34:40 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r343110 - head/tools/build/mk X-SVN-Group: head X-SVN-Commit-Author: gonzo X-SVN-Commit-Paths: head/tools/build/mk X-SVN-Commit-Revision: 343110 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 7C24276054 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.96 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_SHORT(-0.96)[-0.962,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_LONG(-1.00)[-0.999,0] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 17 Jan 2019 06:34:41 -0000 Author: gonzo Date: Thu Jan 17 06:34:39 2019 New Revision: 343110 URL: https://svnweb.freebsd.org/changeset/base/343110 Log: Fix conditional obsolete files entry for WITHOUT_EXAMPLES Add all the files under /usr/share/examples to the MK_EXAMPLES section. OLD_DIRS entries are not removed if they're not empty so prior to this change WITHOUT_EXAMPLES didn't have significant effect on the updated system. PR: 228484 Submitted by: Dmitry Wagin (original patch) MFC after: 1 week Modified: head/tools/build/mk/OptionalObsoleteFiles.inc Modified: head/tools/build/mk/OptionalObsoleteFiles.inc ============================================================================== --- head/tools/build/mk/OptionalObsoleteFiles.inc Thu Jan 17 06:22:14 2019 (r343109) +++ head/tools/build/mk/OptionalObsoleteFiles.inc Thu Jan 17 06:34:39 2019 (r343110) @@ -2303,22 +2303,274 @@ OLD_FILES+=usr/share/nls/uk_UA.KOI8-U/ee.cat .endif .if ${MK_EXAMPLES} == no +OLD_FILES+=usr/share/examples/BSD_daemon/FreeBSD.pfa +OLD_FILES+=usr/share/examples/BSD_daemon/README +OLD_FILES+=usr/share/examples/BSD_daemon/beastie.eps +OLD_FILES+=usr/share/examples/BSD_daemon/beastie.fig +OLD_FILES+=usr/share/examples/BSD_daemon/eps.patch +OLD_FILES+=usr/share/examples/BSD_daemon/poster.sh +OLD_FILES+=usr/share/examples/FreeBSD_version/FreeBSD_version.c +OLD_FILES+=usr/share/examples/FreeBSD_version/Makefile +OLD_FILES+=usr/share/examples/FreeBSD_version/README +OLD_FILES+=usr/share/examples/IPv6/USAGE +OLD_FILES+=usr/share/examples/bhyve/vmrun.sh +OLD_FILES+=usr/share/examples/bootforth/README +OLD_FILES+=usr/share/examples/bootforth/boot.4th +OLD_FILES+=usr/share/examples/bootforth/frames.4th +OLD_FILES+=usr/share/examples/bootforth/loader.rc +OLD_FILES+=usr/share/examples/bootforth/menu.4th +OLD_FILES+=usr/share/examples/bootforth/menuconf.4th +OLD_FILES+=usr/share/examples/bootforth/screen.4th +OLD_FILES+=usr/share/examples/bsdconfig/add_some_packages.sh +OLD_FILES+=usr/share/examples/bsdconfig/browse_packages_http.sh +OLD_FILES+=usr/share/examples/bsdconfig/bsdconfigrc +OLD_FILES+=usr/share/examples/csh/dot.cshrc +OLD_FILES+=usr/share/examples/diskless/ME +OLD_FILES+=usr/share/examples/diskless/README.BOOTP +OLD_FILES+=usr/share/examples/diskless/README.TEMPLATING +OLD_FILES+=usr/share/examples/diskless/clone_root +OLD_FILES+=usr/share/examples/dma/mailer.conf +OLD_FILES+=usr/share/examples/drivers/README +OLD_FILES+=usr/share/examples/drivers/make_device_driver.sh +OLD_FILES+=usr/share/examples/drivers/make_pseudo_driver.sh +OLD_FILES+=usr/share/examples/dwatch/profile_template +OLD_FILES+=usr/share/examples/etc/README.examples +OLD_FILES+=usr/share/examples/etc/bsd-style-copyright +OLD_FILES+=usr/share/examples/etc/group +OLD_FILES+=usr/share/examples/etc/login.access +OLD_FILES+=usr/share/examples/etc/make.conf +OLD_FILES+=usr/share/examples/etc/rc.bsdextended +OLD_FILES+=usr/share/examples/etc/rc.firewall +OLD_FILES+=usr/share/examples/etc/rc.sendmail +OLD_FILES+=usr/share/examples/etc/termcap.small +OLD_FILES+=usr/share/examples/etc/wpa_supplicant.conf +OLD_FILES+=usr/share/examples/find_interface/Makefile +OLD_FILES+=usr/share/examples/find_interface/README +OLD_FILES+=usr/share/examples/find_interface/find_interface.c +OLD_FILES+=usr/share/examples/hast/ucarp.sh +OLD_FILES+=usr/share/examples/hast/ucarp_down.sh +OLD_FILES+=usr/share/examples/hast/ucarp_up.sh +OLD_FILES+=usr/share/examples/hast/vip-down.sh +OLD_FILES+=usr/share/examples/hast/vip-up.sh +OLD_FILES+=usr/share/examples/hostapd/hostapd.conf +OLD_FILES+=usr/share/examples/hostapd/hostapd.eap_user +OLD_FILES+=usr/share/examples/hostapd/hostapd.wpa_psk +OLD_FILES+=usr/share/examples/indent/indent.pro +OLD_FILES+=usr/share/examples/ipfilter/BASIC.NAT +OLD_FILES+=usr/share/examples/ipfilter/BASIC_1.FW +OLD_FILES+=usr/share/examples/ipfilter/BASIC_2.FW +OLD_FILES+=usr/share/examples/ipfilter/README +OLD_FILES+=usr/share/examples/ipfilter/example.1 +OLD_FILES+=usr/share/examples/ipfilter/example.10 +OLD_FILES+=usr/share/examples/ipfilter/example.11 +OLD_FILES+=usr/share/examples/ipfilter/example.12 +OLD_FILES+=usr/share/examples/ipfilter/example.13 +OLD_FILES+=usr/share/examples/ipfilter/example.14 +OLD_FILES+=usr/share/examples/ipfilter/example.2 +OLD_FILES+=usr/share/examples/ipfilter/example.3 +OLD_FILES+=usr/share/examples/ipfilter/example.4 +OLD_FILES+=usr/share/examples/ipfilter/example.5 +OLD_FILES+=usr/share/examples/ipfilter/example.6 +OLD_FILES+=usr/share/examples/ipfilter/example.7 +OLD_FILES+=usr/share/examples/ipfilter/example.8 +OLD_FILES+=usr/share/examples/ipfilter/example.9 +OLD_FILES+=usr/share/examples/ipfilter/example.sr +OLD_FILES+=usr/share/examples/ipfilter/examples.txt +OLD_FILES+=usr/share/examples/ipfilter/firewall +OLD_FILES+=usr/share/examples/ipfilter/firewall.1 +OLD_FILES+=usr/share/examples/ipfilter/firewall.2 +OLD_FILES+=usr/share/examples/ipfilter/ftp-proxy +OLD_FILES+=usr/share/examples/ipfilter/ftppxy +OLD_FILES+=usr/share/examples/ipfilter/ipf-howto.txt +OLD_FILES+=usr/share/examples/ipfilter/ipf.conf.permissive +OLD_FILES+=usr/share/examples/ipfilter/ipf.conf.restrictive +OLD_FILES+=usr/share/examples/ipfilter/ipf.conf.sample +OLD_FILES+=usr/share/examples/ipfilter/ipnat.conf.sample +OLD_FILES+=usr/share/examples/ipfilter/mkfilters +OLD_FILES+=usr/share/examples/ipfilter/nat-setup +OLD_FILES+=usr/share/examples/ipfilter/nat.eg +OLD_FILES+=usr/share/examples/ipfilter/rules.txt +OLD_FILES+=usr/share/examples/ipfilter/server +OLD_FILES+=usr/share/examples/ipfilter/tcpstate +OLD_FILES+=usr/share/examples/ipfw/change_rules.sh +OLD_FILES+=usr/share/examples/jails/README +OLD_FILES+=usr/share/examples/jails/VIMAGE +OLD_FILES+=usr/share/examples/jails/jail.xxx.conf +OLD_FILES+=usr/share/examples/jails/jib +OLD_FILES+=usr/share/examples/jails/jng +OLD_FILES+=usr/share/examples/jails/rc.conf.jails +OLD_FILES+=usr/share/examples/jails/rcjail.xxx.conf +OLD_FILES+=usr/share/examples/kld/Makefile +OLD_FILES+=usr/share/examples/kld/cdev/Makefile +OLD_FILES+=usr/share/examples/kld/cdev/README +OLD_FILES+=usr/share/examples/kld/cdev/module/Makefile +OLD_FILES+=usr/share/examples/kld/cdev/module/cdev.c +OLD_FILES+=usr/share/examples/kld/cdev/module/cdev.h +OLD_FILES+=usr/share/examples/kld/cdev/module/cdevmod.c +OLD_FILES+=usr/share/examples/kld/cdev/test/Makefile +OLD_FILES+=usr/share/examples/kld/cdev/test/testcdev.c +OLD_FILES+=usr/share/examples/kld/dyn_sysctl/Makefile +OLD_FILES+=usr/share/examples/kld/dyn_sysctl/README +OLD_FILES+=usr/share/examples/kld/dyn_sysctl/dyn_sysctl.c +OLD_FILES+=usr/share/examples/kld/firmware/Makefile +OLD_FILES+=usr/share/examples/kld/firmware/README +OLD_FILES+=usr/share/examples/kld/firmware/fwconsumer/Makefile +OLD_FILES+=usr/share/examples/kld/firmware/fwconsumer/fw_consumer.c +OLD_FILES+=usr/share/examples/kld/firmware/fwimage/Makefile +OLD_FILES+=usr/share/examples/kld/firmware/fwimage/firmware.img.uu +OLD_FILES+=usr/share/examples/kld/khelp/Makefile +OLD_FILES+=usr/share/examples/kld/khelp/README +OLD_FILES+=usr/share/examples/kld/khelp/h_example.c +OLD_FILES+=usr/share/examples/kld/syscall/Makefile +OLD_FILES+=usr/share/examples/kld/syscall/module/Makefile +OLD_FILES+=usr/share/examples/kld/syscall/module/syscall.c +OLD_FILES+=usr/share/examples/kld/syscall/test/Makefile +OLD_FILES+=usr/share/examples/kld/syscall/test/call.c +OLD_FILES+=usr/share/examples/libusb20/Makefile +OLD_FILES+=usr/share/examples/libusb20/README +OLD_FILES+=usr/share/examples/libusb20/bulk.c +OLD_FILES+=usr/share/examples/libusb20/control.c +OLD_FILES+=usr/share/examples/libusb20/util.c +OLD_FILES+=usr/share/examples/libusb20/util.h +OLD_FILES+=usr/share/examples/libvgl/Makefile +OLD_FILES+=usr/share/examples/libvgl/demo.c +OLD_FILES+=usr/share/examples/mdoc/POSIX-copyright +OLD_FILES+=usr/share/examples/mdoc/deshallify.sh +OLD_FILES+=usr/share/examples/mdoc/example.1 +OLD_FILES+=usr/share/examples/mdoc/example.3 +OLD_FILES+=usr/share/examples/mdoc/example.4 +OLD_FILES+=usr/share/examples/mdoc/example.9 +OLD_FILES+=usr/share/examples/netgraph/ether.bridge +OLD_FILES+=usr/share/examples/netgraph/frame_relay +OLD_FILES+=usr/share/examples/netgraph/ngctl +OLD_FILES+=usr/share/examples/netgraph/raw +OLD_FILES+=usr/share/examples/netgraph/udp.tunnel +OLD_FILES+=usr/share/examples/netgraph/virtual.chain +OLD_FILES+=usr/share/examples/netgraph/virtual.lan +OLD_FILES+=usr/share/examples/pc-sysinstall/README +OLD_FILES+=usr/share/examples/pc-sysinstall/pc-autoinstall.conf +OLD_FILES+=usr/share/examples/pc-sysinstall/pcinstall.cfg.fbsd-netinstall +OLD_FILES+=usr/share/examples/pc-sysinstall/pcinstall.cfg.geli +OLD_FILES+=usr/share/examples/pc-sysinstall/pcinstall.cfg.gmirror +OLD_FILES+=usr/share/examples/pc-sysinstall/pcinstall.cfg.netinstall +OLD_FILES+=usr/share/examples/pc-sysinstall/pcinstall.cfg.restore +OLD_FILES+=usr/share/examples/pc-sysinstall/pcinstall.cfg.rsync +OLD_FILES+=usr/share/examples/pc-sysinstall/pcinstall.cfg.upgrade +OLD_FILES+=usr/share/examples/pc-sysinstall/pcinstall.cfg.zfs +OLD_FILES+=usr/share/examples/perfmon/Makefile +OLD_FILES+=usr/share/examples/perfmon/README +OLD_FILES+=usr/share/examples/perfmon/perfmon.c +OLD_FILES+=usr/share/examples/pf/ackpri +OLD_FILES+=usr/share/examples/pf/faq-example1 +OLD_FILES+=usr/share/examples/pf/faq-example2 +OLD_FILES+=usr/share/examples/pf/faq-example3 +OLD_FILES+=usr/share/examples/pf/pf.conf +OLD_FILES+=usr/share/examples/pf/queue1 +OLD_FILES+=usr/share/examples/pf/queue2 +OLD_FILES+=usr/share/examples/pf/queue3 +OLD_FILES+=usr/share/examples/pf/queue4 +OLD_FILES+=usr/share/examples/pf/spamd +OLD_FILES+=usr/share/examples/ppi/Makefile +OLD_FILES+=usr/share/examples/ppi/ppilcd.c +OLD_FILES+=usr/share/examples/ppp/chap-auth +OLD_FILES+=usr/share/examples/ppp/login-auth +OLD_FILES+=usr/share/examples/ppp/ppp.conf.sample +OLD_FILES+=usr/share/examples/ppp/ppp.conf.span-isp +OLD_FILES+=usr/share/examples/ppp/ppp.conf.span-isp.working +OLD_FILES+=usr/share/examples/ppp/ppp.linkdown.sample +OLD_FILES+=usr/share/examples/ppp/ppp.linkdown.span-isp +OLD_FILES+=usr/share/examples/ppp/ppp.linkdown.span-isp.working +OLD_FILES+=usr/share/examples/ppp/ppp.linkup.sample +OLD_FILES+=usr/share/examples/ppp/ppp.linkup.span-isp +OLD_FILES+=usr/share/examples/ppp/ppp.linkup.span-isp.working +OLD_FILES+=usr/share/examples/ppp/ppp.secret.sample +OLD_FILES+=usr/share/examples/ppp/ppp.secret.span-isp +OLD_FILES+=usr/share/examples/ppp/ppp.secret.span-isp.working +OLD_FILES+=usr/share/examples/printing/diablo-if-net +OLD_FILES+=usr/share/examples/printing/hpdf +OLD_FILES+=usr/share/examples/printing/hpif +OLD_FILES+=usr/share/examples/printing/hpof +OLD_FILES+=usr/share/examples/printing/hprf +OLD_FILES+=usr/share/examples/printing/hpvf +OLD_FILES+=usr/share/examples/printing/if-simple +OLD_FILES+=usr/share/examples/printing/if-simpleX +OLD_FILES+=usr/share/examples/printing/ifhp +OLD_FILES+=usr/share/examples/printing/make-ps-header +OLD_FILES+=usr/share/examples/printing/netprint +OLD_FILES+=usr/share/examples/printing/psdf +OLD_FILES+=usr/share/examples/printing/psdfX +OLD_FILES+=usr/share/examples/printing/psif +OLD_FILES+=usr/share/examples/printing/pstf +OLD_FILES+=usr/share/examples/printing/pstfX +OLD_FILES+=usr/share/examples/scsi_target/Makefile +OLD_FILES+=usr/share/examples/scsi_target/scsi_cmds.c +OLD_FILES+=usr/share/examples/scsi_target/scsi_target.8 +OLD_FILES+=usr/share/examples/scsi_target/scsi_target.c +OLD_FILES+=usr/share/examples/scsi_target/scsi_target.h +OLD_FILES+=usr/share/examples/ses/Makefile +OLD_FILES+=usr/share/examples/ses/Makefile.inc +OLD_FILES+=usr/share/examples/ses/getencstat/Makefile +OLD_FILES+=usr/share/examples/ses/getencstat/getencstat.0 +OLD_FILES+=usr/share/examples/ses/sesd/Makefile +OLD_FILES+=usr/share/examples/ses/sesd/sesd.0 +OLD_FILES+=usr/share/examples/ses/setencstat/Makefile +OLD_FILES+=usr/share/examples/ses/setencstat/setencstat.0 +OLD_FILES+=usr/share/examples/ses/setobjstat/Makefile +OLD_FILES+=usr/share/examples/ses/setobjstat/setobjstat.0 +OLD_FILES+=usr/share/examples/ses/srcs/chpmon.c +OLD_FILES+=usr/share/examples/ses/srcs/eltsub.c +OLD_FILES+=usr/share/examples/ses/srcs/eltsub.h +OLD_FILES+=usr/share/examples/ses/srcs/getencstat.c +OLD_FILES+=usr/share/examples/ses/srcs/getnobj.c +OLD_FILES+=usr/share/examples/ses/srcs/getobjmap.c +OLD_FILES+=usr/share/examples/ses/srcs/getobjstat.c +OLD_FILES+=usr/share/examples/ses/srcs/inienc.c +OLD_FILES+=usr/share/examples/ses/srcs/sesd.c +OLD_FILES+=usr/share/examples/ses/srcs/setencstat.c +OLD_FILES+=usr/share/examples/ses/srcs/setobjstat.c +OLD_FILES+=usr/share/examples/smbfs/dot.nsmbrc +OLD_FILES+=usr/share/examples/smbfs/print/lj6l +OLD_FILES+=usr/share/examples/smbfs/print/ljspool +OLD_FILES+=usr/share/examples/smbfs/print/printcap.sample +OLD_FILES+=usr/share/examples/smbfs/print/tolj +OLD_FILES+=usr/share/examples/sunrpc/Makefile +OLD_FILES+=usr/share/examples/sunrpc/dir/Makefile +OLD_FILES+=usr/share/examples/sunrpc/dir/dir.x +OLD_FILES+=usr/share/examples/sunrpc/dir/dir_proc.c +OLD_FILES+=usr/share/examples/sunrpc/dir/rls.c +OLD_FILES+=usr/share/examples/sunrpc/msg/Makefile +OLD_FILES+=usr/share/examples/sunrpc/msg/msg.x +OLD_FILES+=usr/share/examples/sunrpc/msg/msg_proc.c +OLD_FILES+=usr/share/examples/sunrpc/msg/printmsg.c +OLD_FILES+=usr/share/examples/sunrpc/msg/rprintmsg.c +OLD_FILES+=usr/share/examples/sunrpc/sort/Makefile +OLD_FILES+=usr/share/examples/sunrpc/sort/rsort.c +OLD_FILES+=usr/share/examples/sunrpc/sort/sort.x +OLD_FILES+=usr/share/examples/sunrpc/sort/sort_proc.c +OLD_FILES+=usr/share/examples/tcsh/complete.tcsh +OLD_FILES+=usr/share/examples/tcsh/csh-mode.el +OLD_FILES+=usr/share/examples/uefisign/uefikeys +OLD_FILES+=usr/share/examples/ypldap/ypldap.conf OLD_DIRS+=usr/share/examples OLD_DIRS+=usr/share/examples/BSD_daemon OLD_DIRS+=usr/share/examples/FreeBSD_version OLD_DIRS+=usr/share/examples/IPv6 +OLD_DIRS+=usr/share/examples/bhyve OLD_DIRS+=usr/share/examples/bootforth OLD_DIRS+=usr/share/examples/bsdconfig OLD_DIRS+=usr/share/examples/csh OLD_DIRS+=usr/share/examples/diskless OLD_DIRS+=usr/share/examples/dma OLD_DIRS+=usr/share/examples/drivers +OLD_DIRS+=usr/share/examples/dwatch OLD_DIRS+=usr/share/examples/etc OLD_DIRS+=usr/share/examples/etc/defaults OLD_DIRS+=usr/share/examples/find_interface OLD_DIRS+=usr/share/examples/hast OLD_DIRS+=usr/share/examples/ibcs2 +OLD_DIRS+=usr/share/examples/hostapd OLD_DIRS+=usr/share/examples/indent +OLD_DIRS+=usr/share/examples/ipfilter OLD_DIRS+=usr/share/examples/ipfw OLD_DIRS+=usr/share/examples/jails OLD_DIRS+=usr/share/examples/kld @@ -2337,7 +2589,9 @@ OLD_DIRS+=usr/share/examples/libusb20 OLD_DIRS+=usr/share/examples/libvgl OLD_DIRS+=usr/share/examples/mdoc OLD_DIRS+=usr/share/examples/netgraph +OLD_DIRS+=usr/share/examples/pc-sysinstall OLD_DIRS+=usr/share/examples/perfmon +OLD_DIRS+=usr/share/examples/pf OLD_DIRS+=usr/share/examples/ppi OLD_DIRS+=usr/share/examples/ppp OLD_DIRS+=usr/share/examples/printing From owner-svn-src-all@freebsd.org Thu Jan 17 06:35:49 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 1883114858B0; Thu, 17 Jan 2019 06:35:49 +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 B905D761F3; Thu, 17 Jan 2019 06:35:48 +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 99320E49A; Thu, 17 Jan 2019 06:35:48 +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 x0H6Zms4003784; Thu, 17 Jan 2019 06:35:48 GMT (envelope-from mckusick@FreeBSD.org) Received: (from mckusick@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x0H6ZjEs003767; Thu, 17 Jan 2019 06:35:45 GMT (envelope-from mckusick@FreeBSD.org) Message-Id: <201901170635.x0H6ZjEs003767@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mckusick set sender to mckusick@FreeBSD.org using -f From: Kirk McKusick Date: Thu, 17 Jan 2019 06:35:45 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r343111 - in head: cddl/lib/libdtrace contrib/libc++/include contrib/libxo/tests/gettext contrib/libxo/tests/gettext/po/pig_latin contrib/openbsm/libbsm contrib/openbsm/sys/bsm lib/libc... X-SVN-Group: head X-SVN-Commit-Author: mckusick X-SVN-Commit-Paths: in head: cddl/lib/libdtrace contrib/libc++/include contrib/libxo/tests/gettext contrib/libxo/tests/gettext/po/pig_latin contrib/openbsm/libbsm contrib/openbsm/sys/bsm lib/libc/gen lib/libc/nls lib/lib... X-SVN-Commit-Revision: 343111 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: B905D761F3 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.96 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_SHORT(-0.96)[-0.962,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_LONG(-1.00)[-0.999,0] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 17 Jan 2019 06:35:49 -0000 Author: mckusick Date: Thu Jan 17 06:35:45 2019 New Revision: 343111 URL: https://svnweb.freebsd.org/changeset/base/343111 Log: Create new EINTEGRITY error with message "Integrity check failed". An integrity check such as a check-hash or a cross-correlation failed. The integrity error falls between EINVAL that identifies errors in parameters to a system call and EIO that identifies errors with the underlying storage media. EINTEGRITY is typically raised by intermediate kernel layers such as a filesystem or an in-kernel GEOM subsystem when they detect inconsistencies. Uses include allowing the mount(8) command to return a different exit value to automate the running of fsck(8) during a system boot. These changes make no use of the new error, they just add it. Later commits will be made for the use of the new error number and it will be added to additional manual pages as appropriate. Reviewed by: gnn, dim, brueffer, imp Discussed with: kib, cem, emaste, ed, jilles Differential Revision: https://reviews.freebsd.org/D18765 Modified: head/cddl/lib/libdtrace/errno.d head/contrib/libc++/include/__errc head/contrib/libc++/include/errno.h head/contrib/libxo/tests/gettext/po/pig_latin/strerror.po head/contrib/libxo/tests/gettext/strerror.pot head/contrib/openbsm/libbsm/bsm_errno.c head/contrib/openbsm/sys/bsm/audit_errno.h head/lib/libc/gen/errlst.c head/lib/libc/nls/C.msg head/lib/libc/sys/intro.2 head/stand/liblua/lerrno.c head/sys/bsm/audit_errno.h head/sys/compat/cloudabi/cloudabi_errno.c head/sys/compat/linux/linux_errno.inc head/sys/security/audit/bsm_errno.c head/sys/sys/errno.h Modified: head/cddl/lib/libdtrace/errno.d ============================================================================== --- head/cddl/lib/libdtrace/errno.d Thu Jan 17 06:34:39 2019 (r343110) +++ head/cddl/lib/libdtrace/errno.d Thu Jan 17 06:35:45 2019 (r343111) @@ -225,7 +225,9 @@ inline int ENOTRECOVERABLE = 95; #pragma D binding "1.13" ENOTRECOVERABLE inline int EOWNERDEAD = 96; #pragma D binding "1.13" EOWNERDEAD -inline int ELAST = 96; +inline int EINTEGRITY = 96; +#pragma D binding "1.13" EINTEGRITY +inline int ELAST = 97; #pragma D binding "1.0" ELAST inline int ERESTART = -1; #pragma D binding "1.0" ERESTART @@ -340,6 +342,7 @@ inline string strerror[int errno] = errno == ECAPMODE ? "Not permitted in capability mode" : errno == ENOTRECOVERABLE ? "State not recoverable" : errno == EOWNERDEAD ? "Previous owner died" : + errno == EINTEGRITY ? "Integrity check failed" : errno == ERESTART ? "restart syscall" : errno == EJUSTRETURN ? "don't modify regs, just return" : errno == ENOIOCTL ? "ioctl not handled by this layer" : Modified: head/contrib/libc++/include/__errc ============================================================================== --- head/contrib/libc++/include/__errc Thu Jan 17 06:34:39 2019 (r343110) +++ head/contrib/libc++/include/__errc Thu Jan 17 06:35:45 2019 (r343111) @@ -46,6 +46,7 @@ enum class errc identifier_removed, // EIDRM illegal_byte_sequence, // EILSEQ inappropriate_io_control_operation, // ENOTTY + integrity_check_failed, // EINTEGRITY interrupted, // EINTR invalid_argument, // EINVAL invalid_seek, // ESPIPE @@ -143,6 +144,7 @@ _LIBCPP_DECLARE_STRONG_ENUM(errc) identifier_removed = EIDRM, illegal_byte_sequence = EILSEQ, inappropriate_io_control_operation = ENOTTY, + integrity_check_failed = EINTEGRITY, interrupted = EINTR, invalid_argument = EINVAL, invalid_seek = ESPIPE, Modified: head/contrib/libc++/include/errno.h ============================================================================== --- head/contrib/libc++/include/errno.h Thu Jan 17 06:34:39 2019 (r343110) +++ head/contrib/libc++/include/errno.h Thu Jan 17 06:35:45 2019 (r343111) @@ -33,49 +33,72 @@ Macros: #ifdef __cplusplus -#if !defined(EOWNERDEAD) || !defined(ENOTRECOVERABLE) +#if !defined(EOWNERDEAD) || !defined(ENOTRECOVERABLE) || !defined(EINTEGRITY) #ifdef ELAST static const int __elast1 = ELAST+1; static const int __elast2 = ELAST+2; +static const int __elast2 = ELAST+3; #else static const int __elast1 = 104; static const int __elast2 = 105; +static const int __elast2 = 106; #endif -#ifdef ENOTRECOVERABLE +#if !defined(EOWNERDEAD) && !defined(ENOTRECOVERABLE) && !defined(EINTEGRITY) +#define ENOTRECOVERABLE __elast1 +#define EOWNERDEAD __elast2 +#define EINTEGRITY __elast3 +#ifdef ELAST +#undef ELAST +#define ELAST EINTEGRITY +#elif !defined(EOWNERDEAD) && !defined(ENOTRECOVERABLE) && defined(EINTEGRITY) +#define ENOTRECOVERABLE __elast1 +#define EOWNERDEAD __elast2 +#ifdef ELAST +#undef ELAST +#define ELAST EOWNERDEAD + +#elif !defined(EOWNERDEAD) && defined(ENOTRECOVERABLE) && !defined(EINTEGRITY) #define EOWNERDEAD __elast1 +#define EINTEGRITY __elast2 +#ifdef ELAST +#undef ELAST +#define ELAST EINTEGRITY +#elif !defined(EOWNERDEAD) && defined(ENOTRECOVERABLE) && defined(EINTEGRITY) +#define EOWNERDEAD __elast1 #ifdef ELAST #undef ELAST #define ELAST EOWNERDEAD -#endif -#elif defined(EOWNERDEAD) +#elif defined(EOWNERDEAD) && !defined(ENOTRECOVERABLE) && !defined(EINTEGRITY) +#define ENOTRECOVERABLE __elast1 +#define EINTEGRITY __elast2 +#ifdef ELAST +#undef ELAST +#define ELAST EINTEGRITY +#elif defined(EOWNERDEAD) && !defined(ENOTRECOVERABLE) && defined(EINTEGRITY) #define ENOTRECOVERABLE __elast1 #ifdef ELAST #undef ELAST #define ELAST ENOTRECOVERABLE -#endif -#else // defined(EOWNERDEAD) - -#define EOWNERDEAD __elast1 -#define ENOTRECOVERABLE __elast2 +#elif defined(EOWNERDEAD) && defined(ENOTRECOVERABLE) && !defined(EINTEGRITY) +#define EINTEGRITY __elast1 #ifdef ELAST #undef ELAST -#define ELAST ENOTRECOVERABLE -#endif +#define ELAST EINTEGRITY -#endif // defined(EOWNERDEAD) +#endif // !defined(OWNERDEAD) && !defined(NOTRECOVERABLE) && !defined(INTEGRITY) -#endif // !defined(EOWNERDEAD) || !defined(ENOTRECOVERABLE) +#endif // !defined(OWNERDEAD) || !defined(NOTRECOVERABLE) || !defined(INTEGRITY) // supply errno values likely to be missing, particularly on Windows @@ -391,6 +414,10 @@ static const int __elast2 = 105; #ifndef EMLINK #define EMLINK 9979 +#endif + +#ifndef EINTEGRITY +#define EINTEGRITY 9980 #endif #endif // __cplusplus Modified: head/contrib/libxo/tests/gettext/po/pig_latin/strerror.po ============================================================================== --- head/contrib/libxo/tests/gettext/po/pig_latin/strerror.po Thu Jan 17 06:34:39 2019 (r343110) +++ head/contrib/libxo/tests/gettext/po/pig_latin/strerror.po Thu Jan 17 06:35:45 2019 (r343111) @@ -457,3 +457,7 @@ msgstr "Atestay otnay ecoverableray" # 96 - EOWNERDEAD msgid "Previous owner died" msgstr "Eviouspray ownerway iedday" + +# 97 - EINTEGRITY +msgid "Integrity check failed" +msgstr "integrityyay eckchay ailedfay" Modified: head/contrib/libxo/tests/gettext/strerror.pot ============================================================================== --- head/contrib/libxo/tests/gettext/strerror.pot Thu Jan 17 06:34:39 2019 (r343110) +++ head/contrib/libxo/tests/gettext/strerror.pot Thu Jan 17 06:35:45 2019 (r343111) @@ -466,3 +466,7 @@ msgstr "" # 96 - EOWNERDEAD msgid "Previous owner died" msgstr "" + +# 97 - EINTEGRITY +msgid "Integrity check failed" +msgstr "" Modified: head/contrib/openbsm/libbsm/bsm_errno.c ============================================================================== --- head/contrib/openbsm/libbsm/bsm_errno.c Thu Jan 17 06:34:39 2019 (r343110) +++ head/contrib/openbsm/libbsm/bsm_errno.c Thu Jan 17 06:35:45 2019 (r343111) @@ -239,6 +239,13 @@ static const struct bsm_errno bsm_errnos[] = { ERRNO_NO_LOCAL_MAPPING, #endif ES("Process died with the lock") }, + { BSM_ERRNO_EINTEGRITY, +#ifdef EINTEGRITY + EINTEGRITY, +#else + ERRNO_NO_LOCAL_MAPPING, +#endif + ES("Integrity check failed") }, { BSM_ERRNO_ENOTRECOVERABLE, #ifdef ENOTRECOVERABLE ENOTRECOVERABLE, Modified: head/contrib/openbsm/sys/bsm/audit_errno.h ============================================================================== --- head/contrib/openbsm/sys/bsm/audit_errno.h Thu Jan 17 06:34:39 2019 (r343110) +++ head/contrib/openbsm/sys/bsm/audit_errno.h Thu Jan 17 06:35:45 2019 (r343111) @@ -204,6 +204,7 @@ #define BSM_ERRNO_EKEYREJECTED 222 /* Linux-specific. */ #define BSM_ERRNO_ENOTCAPABLE 223 /* FreeBSD-specific. */ #define BSM_ERRNO_ECAPMODE 224 /* FreeBSD-specific. */ +#define BSM_ERRNO_EINTEGRITY 225 /* FreeBSD-specific. */ /* * In the event that OpenBSM doesn't have a file representation of a local Modified: head/lib/libc/gen/errlst.c ============================================================================== --- head/lib/libc/gen/errlst.c Thu Jan 17 06:34:39 2019 (r343110) +++ head/lib/libc/gen/errlst.c Thu Jan 17 06:35:45 2019 (r343111) @@ -158,12 +158,12 @@ const char *const sys_errlist[] = { "Not permitted in capability mode", /* 94 - ECAPMODE */ "State not recoverable", /* 95 - ENOTRECOVERABLE */ "Previous owner died", /* 96 - EOWNERDEAD */ + "Integrity check failed", /* 97 - EINTEGRITY */ /* * Reserved space in sys_errlist, take the next slot for a next error code. * Reserve prevents the array size from changing for some time. */ - __uprefix, /* 97 */ __uprefix, /* 98 */ __uprefix, /* 99 */ __uprefix, /* 100 */ Modified: head/lib/libc/nls/C.msg ============================================================================== --- head/lib/libc/nls/C.msg Thu Jan 17 06:34:39 2019 (r343110) +++ head/lib/libc/nls/C.msg Thu Jan 17 06:35:45 2019 (r343111) @@ -197,6 +197,8 @@ $ ENOTRECOVERABLE 95 State not recoverable $ EOWNERDEAD 96 Previous owner died +$ EINTEGRITY +97 Integrity check failed $ $ strsignal() support catalog $ Modified: head/lib/libc/sys/intro.2 ============================================================================== --- head/lib/libc/sys/intro.2 Thu Jan 17 06:34:39 2019 (r343110) +++ head/lib/libc/sys/intro.2 Thu Jan 17 06:35:45 2019 (r343111) @@ -472,6 +472,20 @@ The system call or operation is not permitted for capa The state protected by a robust mutex is not recoverable. .It Er 96 EOWNERDEAD Em "Previous owner died" . The owner of a robust mutex terminated while holding the mutex lock. +.It Er 97 EINTEGRITY Em "Integrity check failed" . +An integrity check such as a check-hash or a cross-correlation failed. +The integrity error falls between +.Er EINVAL +that identifies errors in parameters to a system call and +.Er EIO +that identifies errors with the underlying storage media. +It is typically raised by intermediate kernel layers such as a +filesystem or an in-kernel GEOM subsystem when they detect inconsistencies. +Uses include allowing the +.Xr mount 8 +command to return a different exit value to automate the running of +.Xr fsck 8 +during a system boot. .El .Sh DEFINITIONS .Bl -tag -width Ds Modified: head/stand/liblua/lerrno.c ============================================================================== --- head/stand/liblua/lerrno.c Thu Jan 17 06:34:39 2019 (r343110) +++ head/stand/liblua/lerrno.c Thu Jan 17 06:35:45 2019 (r343111) @@ -146,6 +146,7 @@ static const struct err_name_number { ENTRY(ECAPMODE), ENTRY(ENOTRECOVERABLE), ENTRY(EOWNERDEAD), + ENTRY(EINTEGRITY), ENTRY(ELAST), ENTRY(ERESTART), ENTRY(EJUSTRETURN), Modified: head/sys/bsm/audit_errno.h ============================================================================== --- head/sys/bsm/audit_errno.h Thu Jan 17 06:34:39 2019 (r343110) +++ head/sys/bsm/audit_errno.h Thu Jan 17 06:35:45 2019 (r343111) @@ -208,6 +208,7 @@ #define BSM_ERRNO_EKEYREJECTED 222 /* Linux-specific. */ #define BSM_ERRNO_ENOTCAPABLE 223 /* FreeBSD-specific. */ #define BSM_ERRNO_ECAPMODE 224 /* FreeBSD-specific. */ +#define BSM_ERRNO_EINTEGRITY 225 /* FreeBSD-specific. */ /* * In the event that OpenBSM doesn't have a file representation of a local Modified: head/sys/compat/cloudabi/cloudabi_errno.c ============================================================================== --- head/sys/compat/cloudabi/cloudabi_errno.c Thu Jan 17 06:34:39 2019 (r343110) +++ head/sys/compat/cloudabi/cloudabi_errno.c Thu Jan 17 06:35:45 2019 (r343111) @@ -63,6 +63,7 @@ cloudabi_convert_errno(int error) [EIDRM] = CLOUDABI_EIDRM, [EILSEQ] = CLOUDABI_EILSEQ, [EINPROGRESS] = CLOUDABI_EINPROGRESS, + [EINTEGRITY] = CLOUDABI_EINVAL, [EINTR] = CLOUDABI_EINTR, [EINVAL] = CLOUDABI_EINVAL, [EIO] = CLOUDABI_EIO, Modified: head/sys/compat/linux/linux_errno.inc ============================================================================== --- head/sys/compat/linux/linux_errno.inc Thu Jan 17 06:34:39 2019 (r343110) +++ head/sys/compat/linux/linux_errno.inc Thu Jan 17 06:35:45 2019 (r343111) @@ -142,7 +142,8 @@ const int linux_errtbl[ELAST + 1] = { -1, /* ECAPMODE -> EPERM */ -131, /* ENOTRECOVERABLE */ -130, /* EOWNERDEAD */ + -22, /* EINTEGRITY -> EINVAL */ }; -_Static_assert(ELAST == 96, +_Static_assert(ELAST == 97, "missing errno entries in linux_errtbl"); Modified: head/sys/security/audit/bsm_errno.c ============================================================================== --- head/sys/security/audit/bsm_errno.c Thu Jan 17 06:34:39 2019 (r343110) +++ head/sys/security/audit/bsm_errno.c Thu Jan 17 06:35:45 2019 (r343111) @@ -243,6 +243,13 @@ static const struct bsm_errno bsm_errnos[] = { ERRNO_NO_LOCAL_MAPPING, #endif ES("Process died with the lock") }, + { BSM_ERRNO_EINTEGRITY, +#ifdef EINTEGRITY + EINTEGRITY, +#else + ERRNO_NO_LOCAL_MAPPING, +#endif + ES("Integrity check failed") }, { BSM_ERRNO_ENOTRECOVERABLE, #ifdef ENOTRECOVERABLE ENOTRECOVERABLE, Modified: head/sys/sys/errno.h ============================================================================== --- head/sys/sys/errno.h Thu Jan 17 06:34:39 2019 (r343110) +++ head/sys/sys/errno.h Thu Jan 17 06:35:45 2019 (r343111) @@ -180,10 +180,11 @@ __END_DECLS #define ECAPMODE 94 /* Not permitted in capability mode */ #define ENOTRECOVERABLE 95 /* State not recoverable */ #define EOWNERDEAD 96 /* Previous owner died */ +#define EINTEGRITY 97 /* Integrity check failed */ #endif /* _POSIX_SOURCE */ #ifndef _POSIX_SOURCE -#define ELAST 96 /* Must be equal largest errno */ +#define ELAST 97 /* Must be equal largest errno */ #endif /* _POSIX_SOURCE */ #if defined(_KERNEL) || defined(_WANT_KERNEL_ERRNO) From owner-svn-src-all@freebsd.org Thu Jan 17 07:07:40 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id EFA3A14863DD for ; Thu, 17 Jan 2019 07:07:39 +0000 (UTC) (envelope-from oliver.pinter@hardenedbsd.org) Received: from mail-qk1-x72f.google.com (mail-qk1-x72f.google.com [IPv6:2607:f8b0:4864:20::72f]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 833E4770AD for ; Thu, 17 Jan 2019 07:07:39 +0000 (UTC) (envelope-from oliver.pinter@hardenedbsd.org) Received: by mail-qk1-x72f.google.com with SMTP id q1so5406059qkf.13 for ; Wed, 16 Jan 2019 23:07:39 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=hardenedbsd.org; s=google; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=zb7ITq9cCfqEw59hAAkIy7bDwZMGBVLJSgTcfFDerYQ=; b=DocWam9cIQ7Sfc78RMP6rmXppFa4m6Hx+DiIH1ajrRnu87xaKNUnDhIKVw2etZABFj yezGf5iakarZx9XGtlpiYWTvY9nRiWbgM91NsiIlygZvSuS44yROH/KLKR8c8GED9VYL EOojjP1wleD9FhKamqhqJIl2gXhbef8iWHce+GTNyijo+RogTlHudAnXvqKlRWDhff+l B4h1tfU4nHFMe5PDTdi5O90cEmzs8UfGpdc6DJJAU3DlcpWMcMC3xS4tade3WA7/e09w Ia76122uEBwz0nAKbTIX7pI7/Qa3XfbKEkcs/UJerNPPuSo2PxzOf4FgzXb8emBJI/QK ysAA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=zb7ITq9cCfqEw59hAAkIy7bDwZMGBVLJSgTcfFDerYQ=; b=bGjLOY5Lej5ak5FuvoR8A87Npcjc2ZIeJWLCGEtQAPemFDFi4b51x47D08VQD0+hEi +fmC7qpcdoiXDEThl9QnLPKm3lPK0Msbgz32QTrg1Kqk4WVZoI/JabauaVTpO7WvqYng LVmpirkFhn8UmgJ2Ddt2qjaSYixR3vbYxx/RCzCbGIUDgn3g8brV0WtBskzBpvM9I4jy PaajKdov9yCQjUIQWxgy0X1Gn9dfLC4xqxCsmoZvpNud2/D5w8V0zC7MFxgi5NJ2ZkvR O0NhNo77vH12xt23aqLfaWparAW0yuhkv2/6A4wEwVMIt+dTHMKlma47t5x5GDGAq844 XiKQ== X-Gm-Message-State: AJcUuke6+IVf1YmDPwynojxqNhXDIAAbA7viMjOBFS7lgfVYfV+Wtcby sLaLpYvNR4w80pVFLqM90EPs6/4vJ/oxZ5p/VjB/og== X-Google-Smtp-Source: ALg8bN6zNForQS8P01R0ncQFYRblTtApCnNvldqtiZsK04dBDe25tLquiv8UpFabprlTLApy0nkMaUcUYf2il1OC3is= X-Received: by 2002:a37:bdc6:: with SMTP id n189mr9653918qkf.330.1547708858824; Wed, 16 Jan 2019 23:07:38 -0800 (PST) MIME-Version: 1.0 Received: by 2002:a0c:b542:0:0:0:0:0 with HTTP; Wed, 16 Jan 2019 23:07:38 -0800 (PST) In-Reply-To: <201901170635.x0H6ZjEs003767@repo.freebsd.org> References: <201901170635.x0H6ZjEs003767@repo.freebsd.org> From: Oliver Pinter Date: Thu, 17 Jan 2019 08:07:38 +0100 Message-ID: Subject: Re: svn commit: r343111 - in head: cddl/lib/libdtrace contrib/libc++/include contrib/libxo/tests/gettext contrib/libxo/tests/gettext/po/pig_latin contrib/openbsm/libbsm contrib/openbsm/sys/bsm lib/libc... To: Kirk McKusick Cc: "src-committers@freebsd.org" , "svn-src-all@freebsd.org" , "svn-src-head@freebsd.org" X-Rspamd-Queue-Id: 833E4770AD X-Spamd-Bar: ------ Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-7.00 / 15.00]; NEURAL_HAM_MEDIUM(-1.00)[-1.000,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; REPLY(-4.00)[]; NEURAL_HAM_SHORT(-1.00)[-0.995,0] Content-Type: text/plain; charset="UTF-8" X-Content-Filtered-By: Mailman/MimeDel 2.1.29 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 17 Jan 2019 07:07:40 -0000 On Thursday, January 17, 2019, Kirk McKusick wrote: > Author: mckusick > Date: Thu Jan 17 06:35:45 2019 > New Revision: 343111 > URL: https://svnweb.freebsd.org/changeset/base/343111 > > Log: > Create new EINTEGRITY error with message "Integrity check failed". > > An integrity check such as a check-hash or a cross-correlation failed. > The integrity error falls between EINVAL that identifies errors in > parameters to a system call and EIO that identifies errors with the > underlying storage media. EINTEGRITY is typically raised by intermediate > kernel layers such as a filesystem or an in-kernel GEOM subsystem when > they detect inconsistencies. Uses include allowing the mount(8) command > to return a different exit value to automate the running of fsck(8) > during a system boot. > > These changes make no use of the new error, they just add it. Later > commits will be made for the use of the new error number and it will > be added to additional manual pages as appropriate. > > Reviewed by: gnn, dim, brueffer, imp > Discussed with: kib, cem, emaste, ed, jilles > Differential Revision: https://reviews.freebsd.org/D18765 > > Modified: > head/cddl/lib/libdtrace/errno.d > head/contrib/libc++/include/__errc > head/contrib/libc++/include/errno.h > head/contrib/libxo/tests/gettext/po/pig_latin/strerror.po > head/contrib/libxo/tests/gettext/strerror.pot > head/contrib/openbsm/libbsm/bsm_errno.c > head/contrib/openbsm/sys/bsm/audit_errno.h > head/lib/libc/gen/errlst.c > head/lib/libc/nls/C.msg > head/lib/libc/sys/intro.2 > head/stand/liblua/lerrno.c > head/sys/bsm/audit_errno.h > head/sys/compat/cloudabi/cloudabi_errno.c > head/sys/compat/linux/linux_errno.inc > head/sys/security/audit/bsm_errno.c > head/sys/sys/errno.h > > Modified: head/cddl/lib/libdtrace/errno.d > ============================================================ > ================== > --- head/cddl/lib/libdtrace/errno.d Thu Jan 17 06:34:39 2019 > (r343110) > +++ head/cddl/lib/libdtrace/errno.d Thu Jan 17 06:35:45 2019 > (r343111) > @@ -225,7 +225,9 @@ inline int ENOTRECOVERABLE = 95; > #pragma D binding "1.13" ENOTRECOVERABLE > inline int EOWNERDEAD = 96; > #pragma D binding "1.13" EOWNERDEAD > -inline int ELAST = 96; > +inline int EINTEGRITY = 96; > +#pragma D binding "1.13" EINTEGRITY > +inline int ELAST = 97; > #pragma D binding "1.0" ELAST > inline int ERESTART = -1; > #pragma D binding "1.0" ERESTART > @@ -340,6 +342,7 @@ inline string strerror[int errno] = > errno == ECAPMODE ? "Not permitted in capability mode" > : > errno == ENOTRECOVERABLE ? "State not recoverable" : > errno == EOWNERDEAD ? "Previous owner died" : > + errno == EINTEGRITY ? "Integrity check failed" : > errno == ERESTART ? "restart syscall" : > errno == EJUSTRETURN ? "don't modify regs, just return" : > errno == ENOIOCTL ? "ioctl not handled by this layer" : > > Modified: head/contrib/libc++/include/__errc > ============================================================ > ================== > --- head/contrib/libc++/include/__errc Thu Jan 17 06:34:39 2019 > (r343110) > +++ head/contrib/libc++/include/__errc Thu Jan 17 06:35:45 2019 > (r343111) > @@ -46,6 +46,7 @@ enum class errc > identifier_removed, // EIDRM > illegal_byte_sequence, // EILSEQ > inappropriate_io_control_operation, // ENOTTY > + integrity_check_failed, // EINTEGRITY > interrupted, // EINTR > invalid_argument, // EINVAL > invalid_seek, // ESPIPE > @@ -143,6 +144,7 @@ _LIBCPP_DECLARE_STRONG_ENUM(errc) > identifier_removed = EIDRM, > illegal_byte_sequence = EILSEQ, > inappropriate_io_control_operation = ENOTTY, > + integrity_check_failed = EINTEGRITY, > interrupted = EINTR, > invalid_argument = EINVAL, > invalid_seek = ESPIPE, > > Modified: head/contrib/libc++/include/errno.h > ============================================================ > ================== > --- head/contrib/libc++/include/errno.h Thu Jan 17 06:34:39 2019 > (r343110) > +++ head/contrib/libc++/include/errno.h Thu Jan 17 06:35:45 2019 > (r343111) > @@ -33,49 +33,72 @@ Macros: > > #ifdef __cplusplus > > -#if !defined(EOWNERDEAD) || !defined(ENOTRECOVERABLE) > +#if !defined(EOWNERDEAD) || !defined(ENOTRECOVERABLE) || > !defined(EINTEGRITY) > > #ifdef ELAST > > static const int __elast1 = ELAST+1; > static const int __elast2 = ELAST+2; > +static const int __elast2 = ELAST+3; I think this should be __elast3 > > #else > > static const int __elast1 = 104; > static const int __elast2 = 105; > +static const int __elast2 = 106; And here too > > #endif > > -#ifdef ENOTRECOVERABLE > +#if !defined(EOWNERDEAD) && !defined(ENOTRECOVERABLE) && > !defined(EINTEGRITY) > +#define ENOTRECOVERABLE __elast1 > +#define EOWNERDEAD __elast2 > +#define EINTEGRITY __elast3 > +#ifdef ELAST > +#undef ELAST > +#define ELAST EINTEGRITY > > +#elif !defined(EOWNERDEAD) && !defined(ENOTRECOVERABLE) && > defined(EINTEGRITY) > +#define ENOTRECOVERABLE __elast1 > +#define EOWNERDEAD __elast2 > +#ifdef ELAST > +#undef ELAST > +#define ELAST EOWNERDEAD > + > +#elif !defined(EOWNERDEAD) && defined(ENOTRECOVERABLE) && > !defined(EINTEGRITY) > #define EOWNERDEAD __elast1 > +#define EINTEGRITY __elast2 > +#ifdef ELAST > +#undef ELAST > +#define ELAST EINTEGRITY > > +#elif !defined(EOWNERDEAD) && defined(ENOTRECOVERABLE) && > defined(EINTEGRITY) > +#define EOWNERDEAD __elast1 > #ifdef ELAST > #undef ELAST > #define ELAST EOWNERDEAD > -#endif > > -#elif defined(EOWNERDEAD) > +#elif defined(EOWNERDEAD) && !defined(ENOTRECOVERABLE) && > !defined(EINTEGRITY) > +#define ENOTRECOVERABLE __elast1 > +#define EINTEGRITY __elast2 > +#ifdef ELAST > +#undef ELAST > +#define ELAST EINTEGRITY > > +#elif defined(EOWNERDEAD) && !defined(ENOTRECOVERABLE) && > defined(EINTEGRITY) > #define ENOTRECOVERABLE __elast1 > #ifdef ELAST > #undef ELAST > #define ELAST ENOTRECOVERABLE > -#endif > > -#else // defined(EOWNERDEAD) > - > -#define EOWNERDEAD __elast1 > -#define ENOTRECOVERABLE __elast2 > +#elif defined(EOWNERDEAD) && defined(ENOTRECOVERABLE) && > !defined(EINTEGRITY) > +#define EINTEGRITY __elast1 > #ifdef ELAST > #undef ELAST > -#define ELAST ENOTRECOVERABLE > -#endif > +#define ELAST EINTEGRITY > > -#endif // defined(EOWNERDEAD) > +#endif // !defined(OWNERDEAD) && !defined(NOTRECOVERABLE) && > !defined(INTEGRITY) > > -#endif // !defined(EOWNERDEAD) || !defined(ENOTRECOVERABLE) > +#endif // !defined(OWNERDEAD) || !defined(NOTRECOVERABLE) || > !defined(INTEGRITY) > > // supply errno values likely to be missing, particularly on Windows > > @@ -391,6 +414,10 @@ static const int __elast2 = 105; > > #ifndef EMLINK > #define EMLINK 9979 > +#endif > + > +#ifndef EINTEGRITY > +#define EINTEGRITY 9980 > #endif > > #endif // __cplusplus > > Modified: head/contrib/libxo/tests/gettext/po/pig_latin/strerror.po > ============================================================ > ================== > --- head/contrib/libxo/tests/gettext/po/pig_latin/strerror.po Thu Jan > 17 06:34:39 2019 (r343110) > +++ head/contrib/libxo/tests/gettext/po/pig_latin/strerror.po Thu Jan > 17 06:35:45 2019 (r343111) > @@ -457,3 +457,7 @@ msgstr "Atestay otnay ecoverableray" > # 96 - EOWNERDEAD > msgid "Previous owner died" > msgstr "Eviouspray ownerway iedday" > + > +# 97 - EINTEGRITY > +msgid "Integrity check failed" > +msgstr "integrityyay eckchay ailedfay" > > Modified: head/contrib/libxo/tests/gettext/strerror.pot > ============================================================ > ================== > --- head/contrib/libxo/tests/gettext/strerror.pot Thu Jan 17 > 06:34:39 2019 (r343110) > +++ head/contrib/libxo/tests/gettext/strerror.pot Thu Jan 17 > 06:35:45 2019 (r343111) > @@ -466,3 +466,7 @@ msgstr "" > # 96 - EOWNERDEAD > msgid "Previous owner died" > msgstr "" > + > +# 97 - EINTEGRITY > +msgid "Integrity check failed" > +msgstr "" > > Modified: head/contrib/openbsm/libbsm/bsm_errno.c > ============================================================ > ================== > --- head/contrib/openbsm/libbsm/bsm_errno.c Thu Jan 17 06:34:39 2019 > (r343110) > +++ head/contrib/openbsm/libbsm/bsm_errno.c Thu Jan 17 06:35:45 2019 > (r343111) > @@ -239,6 +239,13 @@ static const struct bsm_errno bsm_errnos[] = { > ERRNO_NO_LOCAL_MAPPING, > #endif > ES("Process died with the lock") }, > + { BSM_ERRNO_EINTEGRITY, > +#ifdef EINTEGRITY > + EINTEGRITY, > +#else > + ERRNO_NO_LOCAL_MAPPING, > +#endif > + ES("Integrity check failed") }, > { BSM_ERRNO_ENOTRECOVERABLE, > #ifdef ENOTRECOVERABLE > ENOTRECOVERABLE, > > Modified: head/contrib/openbsm/sys/bsm/audit_errno.h > ============================================================ > ================== > --- head/contrib/openbsm/sys/bsm/audit_errno.h Thu Jan 17 06:34:39 2019 > (r343110) > +++ head/contrib/openbsm/sys/bsm/audit_errno.h Thu Jan 17 06:35:45 2019 > (r343111) > @@ -204,6 +204,7 @@ > #define BSM_ERRNO_EKEYREJECTED 222 /* Linux-specific. > */ > #define BSM_ERRNO_ENOTCAPABLE 223 /* > FreeBSD-specific. */ > #define BSM_ERRNO_ECAPMODE 224 /* > FreeBSD-specific. */ > +#define BSM_ERRNO_EINTEGRITY 225 /* > FreeBSD-specific. */ > > /* > * In the event that OpenBSM doesn't have a file representation of a local > > Modified: head/lib/libc/gen/errlst.c > ============================================================ > ================== > --- head/lib/libc/gen/errlst.c Thu Jan 17 06:34:39 2019 (r343110) > +++ head/lib/libc/gen/errlst.c Thu Jan 17 06:35:45 2019 (r343111) > @@ -158,12 +158,12 @@ const char *const sys_errlist[] = { > "Not permitted in capability mode", /* 94 - ECAPMODE */ > "State not recoverable", /* 95 - ENOTRECOVERABLE */ > "Previous owner died", /* 96 - EOWNERDEAD */ > + "Integrity check failed", /* 97 - EINTEGRITY */ > > /* > * Reserved space in sys_errlist, take the next slot for a next error > code. > * Reserve prevents the array size from changing for some time. > */ > - __uprefix, /* 97 */ > __uprefix, /* 98 */ > __uprefix, /* 99 */ > __uprefix, /* 100 */ > > Modified: head/lib/libc/nls/C.msg > ============================================================ > ================== > --- head/lib/libc/nls/C.msg Thu Jan 17 06:34:39 2019 (r343110) > +++ head/lib/libc/nls/C.msg Thu Jan 17 06:35:45 2019 (r343111) > @@ -197,6 +197,8 @@ $ ENOTRECOVERABLE > 95 State not recoverable > $ EOWNERDEAD > 96 Previous owner died > +$ EINTEGRITY > +97 Integrity check failed > $ > $ strsignal() support catalog > $ > > Modified: head/lib/libc/sys/intro.2 > ============================================================ > ================== > --- head/lib/libc/sys/intro.2 Thu Jan 17 06:34:39 2019 (r343110) > +++ head/lib/libc/sys/intro.2 Thu Jan 17 06:35:45 2019 (r343111) > @@ -472,6 +472,20 @@ The system call or operation is not permitted for capa > The state protected by a robust mutex is not recoverable. > .It Er 96 EOWNERDEAD Em "Previous owner died" . > The owner of a robust mutex terminated while holding the mutex lock. > +.It Er 97 EINTEGRITY Em "Integrity check failed" . > +An integrity check such as a check-hash or a cross-correlation failed. > +The integrity error falls between > +.Er EINVAL > +that identifies errors in parameters to a system call and > +.Er EIO > +that identifies errors with the underlying storage media. > +It is typically raised by intermediate kernel layers such as a > +filesystem or an in-kernel GEOM subsystem when they detect > inconsistencies. > +Uses include allowing the > +.Xr mount 8 > +command to return a different exit value to automate the running of > +.Xr fsck 8 > +during a system boot. > .El > .Sh DEFINITIONS > .Bl -tag -width Ds > > Modified: head/stand/liblua/lerrno.c > ============================================================ > ================== > --- head/stand/liblua/lerrno.c Thu Jan 17 06:34:39 2019 (r343110) > +++ head/stand/liblua/lerrno.c Thu Jan 17 06:35:45 2019 (r343111) > @@ -146,6 +146,7 @@ static const struct err_name_number { > ENTRY(ECAPMODE), > ENTRY(ENOTRECOVERABLE), > ENTRY(EOWNERDEAD), > + ENTRY(EINTEGRITY), > ENTRY(ELAST), > ENTRY(ERESTART), > ENTRY(EJUSTRETURN), > > Modified: head/sys/bsm/audit_errno.h > ============================================================ > ================== > --- head/sys/bsm/audit_errno.h Thu Jan 17 06:34:39 2019 (r343110) > +++ head/sys/bsm/audit_errno.h Thu Jan 17 06:35:45 2019 (r343111) > @@ -208,6 +208,7 @@ > #define BSM_ERRNO_EKEYREJECTED 222 /* Linux-specific. > */ > #define BSM_ERRNO_ENOTCAPABLE 223 /* > FreeBSD-specific. */ > #define BSM_ERRNO_ECAPMODE 224 /* > FreeBSD-specific. */ > +#define BSM_ERRNO_EINTEGRITY 225 /* > FreeBSD-specific. */ > > /* > * In the event that OpenBSM doesn't have a file representation of a local > > Modified: head/sys/compat/cloudabi/cloudabi_errno.c > ============================================================ > ================== > --- head/sys/compat/cloudabi/cloudabi_errno.c Thu Jan 17 06:34:39 2019 > (r343110) > +++ head/sys/compat/cloudabi/cloudabi_errno.c Thu Jan 17 06:35:45 2019 > (r343111) > @@ -63,6 +63,7 @@ cloudabi_convert_errno(int error) > [EIDRM] = CLOUDABI_EIDRM, > [EILSEQ] = CLOUDABI_EILSEQ, > [EINPROGRESS] = CLOUDABI_EINPROGRESS, > + [EINTEGRITY] = CLOUDABI_EINVAL, > [EINTR] = CLOUDABI_EINTR, > [EINVAL] = CLOUDABI_EINVAL, > [EIO] = CLOUDABI_EIO, > > Modified: head/sys/compat/linux/linux_errno.inc > ============================================================ > ================== > --- head/sys/compat/linux/linux_errno.inc Thu Jan 17 06:34:39 2019 > (r343110) > +++ head/sys/compat/linux/linux_errno.inc Thu Jan 17 06:35:45 2019 > (r343111) > @@ -142,7 +142,8 @@ const int linux_errtbl[ELAST + 1] = { > -1, /* ECAPMODE -> EPERM */ > -131, /* ENOTRECOVERABLE */ > -130, /* EOWNERDEAD */ > + -22, /* EINTEGRITY -> EINVAL */ > }; > > -_Static_assert(ELAST == 96, > +_Static_assert(ELAST == 97, > "missing errno entries in linux_errtbl"); > > Modified: head/sys/security/audit/bsm_errno.c > ============================================================ > ================== > --- head/sys/security/audit/bsm_errno.c Thu Jan 17 06:34:39 2019 > (r343110) > +++ head/sys/security/audit/bsm_errno.c Thu Jan 17 06:35:45 2019 > (r343111) > @@ -243,6 +243,13 @@ static const struct bsm_errno bsm_errnos[] = { > ERRNO_NO_LOCAL_MAPPING, > #endif > ES("Process died with the lock") }, > + { BSM_ERRNO_EINTEGRITY, > +#ifdef EINTEGRITY > + EINTEGRITY, > +#else > + ERRNO_NO_LOCAL_MAPPING, > +#endif > + ES("Integrity check failed") }, > { BSM_ERRNO_ENOTRECOVERABLE, > #ifdef ENOTRECOVERABLE > ENOTRECOVERABLE, > > Modified: head/sys/sys/errno.h > ============================================================ > ================== > --- head/sys/sys/errno.h Thu Jan 17 06:34:39 2019 (r343110) > +++ head/sys/sys/errno.h Thu Jan 17 06:35:45 2019 (r343111) > @@ -180,10 +180,11 @@ __END_DECLS > #define ECAPMODE 94 /* Not permitted in > capability mode */ > #define ENOTRECOVERABLE 95 /* State not recoverable */ > #define EOWNERDEAD 96 /* Previous owner died */ > +#define EINTEGRITY 97 /* Integrity check failed > */ > #endif /* _POSIX_SOURCE */ > > #ifndef _POSIX_SOURCE > -#define ELAST 96 /* Must be equal largest > errno */ > +#define ELAST 97 /* Must be equal largest > errno */ > #endif /* _POSIX_SOURCE */ > > #if defined(_KERNEL) || defined(_WANT_KERNEL_ERRNO) > _______________________________________________ > svn-src-head@freebsd.org mailing list > https://lists.freebsd.org/mailman/listinfo/svn-src-head > To unsubscribe, send any mail to "svn-src-head-unsubscribe@freebsd.org" > From owner-svn-src-all@freebsd.org Thu Jan 17 07:29:00 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 84F841486A40; Thu, 17 Jan 2019 07:29:00 +0000 (UTC) (envelope-from ml@vishwin.info) Received: from varun.vishwin.info (varun.vishwin.info [46.101.93.59]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "varun.vishwin.info", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 8B22F77994; Thu, 17 Jan 2019 07:28:59 +0000 (UTC) (envelope-from ml@vishwin.info) Received: from varun.vishwin.info (fd35:9eae:7575::2 [IPv6:fd35:9eae:7575::2]) by varun.vishwin.info (OpenSMTPD) with ESMTP id 10f924d9; Thu, 17 Jan 2019 02:28:48 -0500 (EST) Received: from [IPv6:2001:470:8:6ca:cad7:19ff:fec0:a06d] (2001:470:8:6ca:cad7:19ff:fec0:a06d [IPv6:2001:470:8:6ca:cad7:19ff:fec0:a06d]) by varun.vishwin.info (OpenSMTPD) with ESMTPSA id 048d658c TLS version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128 verify=NO; Thu, 17 Jan 2019 02:28:48 -0500 (EST) Subject: Re: svn commit: r343111 - in head: cddl/lib/libdtrace contrib/libc++/include contrib/libxo/tests/gettext contrib/libxo/tests/gettext/po/pig_latin contrib/openbsm/libbsm contrib/openbsm/sys/bsm lib/libc... To: Kirk McKusick References: <201901170635.x0H6ZjEs003767@repo.freebsd.org> Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org From: Charlie Li Openpgp: preference=signencrypt Autocrypt: addr=ml@vishwin.info; keydata= mQINBFt7iHUBEADCorTixbMGuHd9WYSKCELlv/TFcRtvpHUw/n9LtXzKixUUwl7iuMFMYTz3 QXePX0Twq4jCQYySfcxWbPkLsSYlPOkaGQ+XytfmIHoqG5ba4i1fp+F41is0oCtLt1+oL84j NKUd13em/JWd+PJeQbSTVnHbT2yaAi7vqWw5WKVaMExjfPGU5TArV46wSRU6Zuy1ZX66q0q5 dPzeBdeKYWJE8aGtyi3pYUpKUOX4gxiNetf6leDFZ4OsexWaRdU0n8fId5d1qwjAE3lOwV5z 0Ilt8t4iXtX3JL3DAQyLZIeXHIg9O3rrpPMXQWSp2/5g39PohNk7farbhcpIKxuDN+L5N6U9 OxNHBSCv9FGDO4R/mw3YwJCovDzsF7RSyXQDIY36yjdh2uTLZ0uD5Ci/DPmJUySFLRvpqWnQ M7V5cYhdqDfcElGpRbi8JZQVYRJjvI5Jj0byG98KeaD0YFxKqmmm+Oh+xWXE7xt/DsBoZeZJ BFP84LvFbwQqprvI+sg+1z2+JIgNbYwl8VaYzfyGnqTEXTOsQYEKTdKA9MODSAsN31MlQICe CIHZV+OwOqH1KQ/mZp59AnpXAmj4T94bnahE9yJtVW/qglX/nTeFNUdu5MyEgkeB0x7mx+t0 3hE20yp/NbyvG1T/o53NHwHiURC/8Fxd1NWPZ6n4X8npQn6iyQARAQABtDJDaGFybGllIExp IChtYWlsaW5nIGxpc3RzL0dNQU5FKSA8bWxAdmlzaHdpbi5pbmZvPokCTgQTAQgAOBYhBP9/ wqq+WvuNT2xG/o5weN7yA6tsBQJbe4q8AhsjBQsJCAcCBhUKCQgLAgQWAgMBAh4BAheAAAoJ EI5weN7yA6ts4z8P/jJ4Sb5i4hcC2yAdPv4UK6jT0NKbB8omp3Gha5le4+RzabPoUrhG1uOp 6gSmmBU1dgMOq6vCzeCx3tW0TJaBnjIYciYAnQYUIJlgDOHYz05tMqE89BZJFdiFoMpGYgzZ 02AWXaDXVRGViQlKKyopMIiJ5JPgjxuFWfSoH6qMvR4Vm8PrLkTiY0kea2lSXkE8I9hYdFST SSm6dxbaEGApawdFegz7eSTIefQ4K8y5/H0YtWmOObMYYX0aLN31OAdCot+1M2TT1OnEfLM+ sWpD3C3l5F2OWREHKrq+Ma3tI4MiZQDNvzRQ9mkpU3mZIHixRQfhsaMj5PmF7GC8aacYlbO0 b0o1xUlPqD8tKIscPO2E2iujs38g/3Dt7Oyhb95CyTjiVbORajUEisM01cKS+RjskvH2VW72 mIq+YjorwhTzikhqgWoEtKMrkac9KMYM26kNy6I4YtZp1aIIv8tx4Y3tV/h3e6jZM7oMQZC7 x0oFlxfApJKtLyQPtRBXC96GaBM/kuqtwHYdQScWeP+ujp0hjj6+SfaJcxlYs3cyoETzNIew mYNZ3PGBpJYsapXdbNqbQHFarhIH9B1pgrNLqe1sa/+3xoQ7SORK93g2bCvKzaakgsa2soYH y4CksAPZ9PYyVFuOXiiygcWwdqylzPxwXg8vp5QGXD4ZkJ7aZd5wuQINBFt7iHUBEADXZe2B xvCTsh2xGL/uxMUqzveqgUWr4NRbAxtK4g5pbDkn2dn6i+v2CReVrH7F/ffmEnSIi0HwuEDs P3APjCOuaYGOHAruNi+2CFvwEfowdYRYPkP3G3jsI7ijxWLWb8Xg6UrGgOoiEfqfreA15I1p fOoOlmhSwvrYpf6wopRR2P9f+jPdfBdYJv+sQiAAwxbtAVy5AEnOQeC7r2hRIiSLiPWaEAyI FsZ7F9LV1xN+ksCv166MM0c7DmvtojhwDyru6zxh8MtvLzuE+VKu1MpzGRtrCt0U2zoo2sS+ CCReFjEaqbhnQUieLFpq+WiKYF/WruS9UzQACCyaR155L/pPNufvVYG4RbRWARxJIFLV2/sN +CZ5B6JKa/QO/HaVm/k/ozhD+mVIDPuFVcvoQgqW3AlSNjxF7vMNs9/uMmVsSBZsvFGGUaHk zCs1dsy3orKANFwPI4+ePGDT4gJdtDI8qKruNljb9D/Hw/TzE3HyxQo9j5cToblBWiFB97ct P2zXkoz7VSvi/ceFt+0e1NbWJPrQeTJT2pEIkkLXU6AfvCt+K5wbf95AqAGC+x8oMPfqsmax CmQ7T+SSnpH4LMtvLdc+usVglMKvTx7lBYoo93I28CG7JCPbstvsSE3F7eGalX6WXHRpo323 Uz5Bnzx9qYw6AiWns2HW4Wv9zlYZlQARAQABiQI2BBgBCAAgFiEE/3/Cqr5a+41PbEb+jnB4 3vIDq2wFAlt7iHUCGwwACgkQjnB43vIDq2xMZw//asEi+B4qKyZlBCfuQk4fCCapeD83kCvA 8fd4ImbOY1lZQiU5nKUDYq1iGTNnkbeuwv8EyYy5hFRs8klS6RolKoV6nUToBZg8LxJ5qSG7 VlsrxrIEjgpmY/7c9BhLS0rIyXFf5C335L+1xCpLfWYyCZxWFWEqLwytaNj6DukX4uQFhxwe 42IY0hybyYw8dMgpTvYBGIbcO0etGDix/nCqA6LvbbvuMEd0MEbDRjusK8yxoabcbgawzCPh 7jsfo8AU5Yrs7r2a68ujnSgw3auQ+L70Ao+LxZyuKey2V4QbIQjKC5FqANCNk/mBf1eTm+RL r7EyAq3v6Tv4PeNYqVZHob1TQLIqZUmh42rAdR0ugUPeXLCPBP2+j5ypviBAqdmwDWyz9Y68 SngRo1JHskcU5jlfwA1CCI/EuGtsjsU8ZcrDdjucKlwiXMWmHpQv2OE1HC+hDcZ9nSwXQmCk BJ2tLg3cWae30vqVzeqsivEM+kONjBwMRQGXSyn+muOHeB0Leqz3FnRE1ZZ1Spya9G/ZIOSt UPDeJD1aExla5BgGYZoxWLKlrpauOOVVOOpl+1nKrK2cfC6jU8D+otwX+9RSfRAcU8gPHz/J NKqLD/FPA+44XHOceMlVvEQQbQfmuat6HVnRZ4zCxJuMLcQR/5kjf1CkXBUgbykPBcU4KV+G MXM= Message-ID: Date: Thu, 17 Jan 2019 02:28:42 -0500 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:60.0) Gecko/20100101 Thunderbird/60.4.0 MIME-Version: 1.0 In-Reply-To: <201901170635.x0H6ZjEs003767@repo.freebsd.org> Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="Q2upOuXpe7R55pKKabqPaXmZDRS9SjAAP" X-Rspamd-Queue-Id: 8B22F77994 X-Spamd-Bar: ------ X-Spamd-Result: default: False [-6.99 / 15.00]; NEURAL_HAM_MEDIUM(-1.00)[-1.000,0]; NEURAL_HAM_SHORT(-0.99)[-0.991,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; REPLY(-4.00)[] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 17 Jan 2019 07:29:00 -0000 This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --Q2upOuXpe7R55pKKabqPaXmZDRS9SjAAP Content-Type: multipart/mixed; boundary="1McyOKagBQ2yGiA1WxTMzE6saaDEJ8U4b"; protected-headers="v1" From: Charlie Li To: Kirk McKusick Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Message-ID: Subject: Re: svn commit: r343111 - in head: cddl/lib/libdtrace contrib/libc++/include contrib/libxo/tests/gettext contrib/libxo/tests/gettext/po/pig_latin contrib/openbsm/libbsm contrib/openbsm/sys/bsm lib/libc... References: <201901170635.x0H6ZjEs003767@repo.freebsd.org> In-Reply-To: <201901170635.x0H6ZjEs003767@repo.freebsd.org> --1McyOKagBQ2yGiA1WxTMzE6saaDEJ8U4b Content-Type: text/plain; charset=utf-8 Content-Language: en-GB-large Content-Transfer-Encoding: quoted-printable On 17/01/2019 01:35, Kirk McKusick wrote: > Modified: head/contrib/libc++/include/errno.h > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D > --- head/contrib/libc++/include/errno.h Thu Jan 17 06:34:39 2019 (r3431= 10) > +++ head/contrib/libc++/include/errno.h Thu Jan 17 06:35:45 2019 (r3431= 11) > @@ -33,49 +33,72 @@ Macros: > =20 > #ifdef __cplusplus > =20 > -#if !defined(EOWNERDEAD) || !defined(ENOTRECOVERABLE) > +#if !defined(EOWNERDEAD) || !defined(ENOTRECOVERABLE) || !defined(EINT= EGRITY) > =20 > #ifdef ELAST > =20 > static const int __elast1 =3D ELAST+1; > static const int __elast2 =3D ELAST+2; > +static const int __elast2 =3D ELAST+3; > =20 > #else > =20 > static const int __elast1 =3D 104; > static const int __elast2 =3D 105; > +static const int __elast2 =3D 106; > =20 > #endif > =20 > -#ifdef ENOTRECOVERABLE > +#if !defined(EOWNERDEAD) && !defined(ENOTRECOVERABLE) && !defined(EINT= EGRITY) > +#define ENOTRECOVERABLE __elast1 > +#define EOWNERDEAD __elast2 > +#define EINTEGRITY __elast3 > +#ifdef ELAST > +#undef ELAST > +#define ELAST EINTEGRITY > =20 > +#elif !defined(EOWNERDEAD) && !defined(ENOTRECOVERABLE) && defined(EIN= TEGRITY) > +#define ENOTRECOVERABLE __elast1 > +#define EOWNERDEAD __elast2 > +#ifdef ELAST > +#undef ELAST > +#define ELAST EOWNERDEAD > + > +#elif !defined(EOWNERDEAD) && defined(ENOTRECOVERABLE) && !defined(EIN= TEGRITY) > #define EOWNERDEAD __elast1 > +#define EINTEGRITY __elast2 > +#ifdef ELAST > +#undef ELAST > +#define ELAST EINTEGRITY > =20 > +#elif !defined(EOWNERDEAD) && defined(ENOTRECOVERABLE) && defined(EINT= EGRITY) > +#define EOWNERDEAD __elast1 > #ifdef ELAST > #undef ELAST > #define ELAST EOWNERDEAD > -#endif > =20 > -#elif defined(EOWNERDEAD) > +#elif defined(EOWNERDEAD) && !defined(ENOTRECOVERABLE) && !defined(EIN= TEGRITY) > +#define ENOTRECOVERABLE __elast1 > +#define EINTEGRITY __elast2 > +#ifdef ELAST > +#undef ELAST > +#define ELAST EINTEGRITY > =20 > +#elif defined(EOWNERDEAD) && !defined(ENOTRECOVERABLE) && defined(EINT= EGRITY) > #define ENOTRECOVERABLE __elast1 > #ifdef ELAST > #undef ELAST > #define ELAST ENOTRECOVERABLE > -#endif > =20 > -#else // defined(EOWNERDEAD) > - > -#define EOWNERDEAD __elast1 > -#define ENOTRECOVERABLE __elast2 > +#elif defined(EOWNERDEAD) && defined(ENOTRECOVERABLE) && !defined(EINT= EGRITY) > +#define EINTEGRITY __elast1 > #ifdef ELAST > #undef ELAST > -#define ELAST ENOTRECOVERABLE > -#endif > +#define ELAST EINTEGRITY > =20 > -#endif // defined(EOWNERDEAD) > +#endif // !defined(OWNERDEAD) && !defined(NOTRECOVERABLE) && !defined(= INTEGRITY) > =20 > -#endif // !defined(EOWNERDEAD) || !defined(ENOTRECOVERABLE) > +#endif // !defined(OWNERDEAD) || !defined(NOTRECOVERABLE) || !defined(= INTEGRITY) > =20 > // supply errno values likely to be missing, particularly on Windows > =20 > @@ -391,6 +414,10 @@ static const int __elast2 =3D 105; > =20 > #ifndef EMLINK > #define EMLINK 9979 > +#endif > + > +#ifndef EINTEGRITY > +#define EINTEGRITY 9980 > #endif > =20 > #endif // __cplusplus >=20 The build errors out as Clang complains about all of these conditional directives being unterminated. --- algorithm.o --- In file included from /usr/src/contrib/libc++/src/algorithm.cpp:11: In file included from /usr/src/contrib/libc++/include/random:1646: In file included from /usr/src/contrib/libc++/include/istream:163: In file included from /usr/src/contrib/libc++/include/ostream:138: In file included from /usr/src/contrib/libc++/include/ios:216: In file included from /usr/src/contrib/libc++/include/__locale:18: In file included from /usr/src/contrib/libc++/include/mutex:191: In file included from /usr/src/contrib/libc++/include/__mutex_base:16: In file included from /usr/src/contrib/libc++/include/system_error:146: In file included from /usr/src/contrib/libc++/include/__errc:106: In file included from /usr/src/contrib/libc++/include/cerrno:27: /usr/src/contrib/libc++/include/errno.h:70:2: error: unterminated conditional directive #ifdef ELAST ^ /usr/src/contrib/libc++/include/errno.h:63:2: error: unterminated conditional directive #ifdef ELAST ^ /usr/src/contrib/libc++/include/errno.h:56:2: error: unterminated conditional directive #ifdef ELAST ^ /usr/src/contrib/libc++/include/errno.h:52:2: error: unterminated conditional directive #if !defined(EOWNERDEAD) && !defined(ENOTRECOVERABLE) && !defined(EINTEGRITY) ^ /usr/src/contrib/libc++/include/errno.h:36:2: error: unterminated conditional directive #if !defined(EOWNERDEAD) || !defined(ENOTRECOVERABLE) || !defined(EINTEGRITY) ^ /usr/src/contrib/libc++/include/errno.h:34:2: error: unterminated conditional directive #ifdef __cplusplus ^ /usr/src/contrib/libc++/include/errno.h:11:2: error: unterminated conditional directive #ifndef _LIBCPP_ERRNO_H ^ In file included from /usr/src/contrib/libc++/src/algorithm.cpp:11: In file included from /usr/src/contrib/libc++/include/random:1646: In file included from /usr/src/contrib/libc++/include/istream:163: In file included from /usr/src/contrib/libc++/include/ostream:138: In file included from /usr/src/contrib/libc++/include/ios:216: In file included from /usr/src/contrib/libc++/include/__locale:18: In file included from /usr/src/contrib/libc++/include/mutex:191: In file included from /usr/src/contrib/libc++/include/__mutex_base:17: In file included from /usr/src/contrib/libc++/include/__threading_support:16: /usr/src/contrib/libc++/include/errno.h:70:2: error: unterminated conditional directive #ifdef ELAST ^ /usr/src/contrib/libc++/include/errno.h:63:2: error: unterminated conditional directive #ifdef ELAST ^ /usr/src/contrib/libc++/include/errno.h:56:2: error: unterminated conditional directive #ifdef ELAST ^ /usr/src/contrib/libc++/include/errno.h:52:2: error: unterminated conditional directive #if !defined(EOWNERDEAD) && !defined(ENOTRECOVERABLE) && !defined(EINTEGRITY) ^ /usr/src/contrib/libc++/include/errno.h:36:2: error: unterminated conditional directive #if !defined(EOWNERDEAD) || !defined(ENOTRECOVERABLE) || !defined(EINTEGRITY) ^ /usr/src/contrib/libc++/include/errno.h:34:2: error: unterminated conditional directive #ifdef __cplusplus ^ /usr/src/contrib/libc++/include/errno.h:11:2: error: unterminated conditional directive #ifndef _LIBCPP_ERRNO_H ^ 14 errors generated. *** [algorithm.o] Error code 1 --=20 Charlie Li Can't think of a witty .sigline today=E2=80=A6 (This email address is for mailing list use only; replace local-part with vishwin for off-list communication) --1McyOKagBQ2yGiA1WxTMzE6saaDEJ8U4b-- --Q2upOuXpe7R55pKKabqPaXmZDRS9SjAAP Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAEBCAAdFiEE/3/Cqr5a+41PbEb+jnB43vIDq2wFAlxALq8ACgkQjnB43vID q2wxMw/+JnbbIe1+oh92c5TghzCLDTtu1ghOVda2gqsHuuo+pXc4G467/POU/w99 tIOtaeLYZTov9nhDn2gYJ0OQivU++jt10fCfFCy2wRnaWNs2ttygn8hA6TfB3Kxd 05QM3ZoHgX34kkPT+ZDe48ah1iAKOAw5Vnptcdih8ughdEl/49gHLhPOdWHSaDEE ZzXVa66Zx4ci9lr4vsSlKq7RnEBfZZ9Hp1j25R58to8TlmJUUyImbWEFYoqpLx+z 0P01LZxGoYgRdbnE1u32N2Zfutb92qtfb9YOcYRqHKnYO2M2cDF78C96B+DlcJkY rdixlROov+2J8TyhISZimKxnzQciZGbY2JmjRnHlruM50hz3PcXsrEwhQ+PFPxFi uKv7hztuUwtr4a3pn/s1mqQvjDZXVxHNqX1qR41ZyKrqcZF2Cef3FK+APZTnNZ5s 5kRR+S3Ikz+/mAQblJ1csopIn5rAfICJsW7Ax5a0KxT2mrDlsncvVcrZAirbvJVW Q7G7oGPWL4e5DyMRNedF/2xwiuX/Ma3og8P1A8uJNqsmgBDY+tF/wzBAqwLhuWII TrAiCEDgy9uBd7dFb5cpN6ndXhrFC5kxXXNECZx3dfvtDzq37VrQ4qQh7G3pp2mS 5A8QN++fWpdYkVAxLBKVfpTPSqGexIkRc6bOj4B8ursXw4uILqA= =fAUg -----END PGP SIGNATURE----- --Q2upOuXpe7R55pKKabqPaXmZDRS9SjAAP-- From owner-svn-src-all@freebsd.org Thu Jan 17 14:09:56 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id C4369149770B; Thu, 17 Jan 2019 14:09:56 +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 695CE8FC3E; Thu, 17 Jan 2019 14:09:56 +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 4A80E1B34F; Thu, 17 Jan 2019 14:09:56 +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 x0HE9u8f040666; Thu, 17 Jan 2019 14:09:56 GMT (envelope-from eugen@FreeBSD.org) Received: (from eugen@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x0HE9ubv040665; Thu, 17 Jan 2019 14:09:56 GMT (envelope-from eugen@FreeBSD.org) Message-Id: <201901171409.x0HE9ubv040665@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: eugen set sender to eugen@FreeBSD.org using -f From: Eugene Grosbein Date: Thu, 17 Jan 2019 14:09:56 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r343112 - head/usr.sbin/jail X-SVN-Group: head X-SVN-Commit-Author: eugen X-SVN-Commit-Paths: head/usr.sbin/jail X-SVN-Commit-Revision: 343112 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 695CE8FC3E X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.96 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_SHORT(-0.97)[-0.966,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_LONG(-1.00)[-0.999,0] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 17 Jan 2019 14:09:56 -0000 Author: eugen Date: Thu Jan 17 14:09:55 2019 New Revision: 343112 URL: https://svnweb.freebsd.org/changeset/base/343112 Log: jail(8): stop crashing with SIGSEGV inside run_command() function while processing not entirely correct jail.conf(5) file having something like "ip4.addr = 127.0.0.1;" and no "ip4 = ...;" so extrap variable stays NULL. Reported by: marck MFC after: 1 month Modified: head/usr.sbin/jail/command.c Modified: head/usr.sbin/jail/command.c ============================================================================== --- head/usr.sbin/jail/command.c Thu Jan 17 06:35:45 2019 (r343111) +++ head/usr.sbin/jail/command.c Thu Jan 17 14:09:55 2019 (r343112) @@ -374,7 +374,7 @@ run_command(struct cfjail *j) argc = 4; } - if (!down) { + if (!down && extrap != NULL) { for (cs = strtok(extrap, " "); cs; cs = strtok(NULL, " ")) { size_t len = strlen(cs) + 1; From owner-svn-src-all@freebsd.org Thu Jan 17 15:35:12 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id EB3B2149A720; Thu, 17 Jan 2019 15:35:11 +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 857856CDAF; Thu, 17 Jan 2019 15:35:11 +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 684F01C315; Thu, 17 Jan 2019 15:35:05 +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 x0HFZ5Bx087840; Thu, 17 Jan 2019 15:35:05 GMT (envelope-from mckusick@FreeBSD.org) Received: (from mckusick@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x0HFZ564087839; Thu, 17 Jan 2019 15:35:05 GMT (envelope-from mckusick@FreeBSD.org) Message-Id: <201901171535.x0HFZ564087839@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mckusick set sender to mckusick@FreeBSD.org using -f From: Kirk McKusick Date: Thu, 17 Jan 2019 15:35:05 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r343113 - head/contrib/libc++/include X-SVN-Group: head X-SVN-Commit-Author: mckusick X-SVN-Commit-Paths: head/contrib/libc++/include X-SVN-Commit-Revision: 343113 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 857856CDAF X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.95 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_SHORT(-0.95)[-0.953,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_LONG(-1.00)[-0.999,0] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 17 Jan 2019 15:35:12 -0000 Author: mckusick Date: Thu Jan 17 15:35:04 2019 New Revision: 343113 URL: https://svnweb.freebsd.org/changeset/base/343113 Log: Fix #if defined broken in -r343111 Pointy-hat-to: mckusick Modified: head/contrib/libc++/include/errno.h Modified: head/contrib/libc++/include/errno.h ============================================================================== --- head/contrib/libc++/include/errno.h Thu Jan 17 14:09:55 2019 (r343112) +++ head/contrib/libc++/include/errno.h Thu Jan 17 15:35:04 2019 (r343113) @@ -35,7 +35,7 @@ Macros: #if !defined(EOWNERDEAD) || !defined(ENOTRECOVERABLE) || !defined(EINTEGRITY) -#ifdef ELAST +#if defined(ELAST) static const int __elast1 = ELAST+1; static const int __elast2 = ELAST+2; @@ -53,46 +53,46 @@ static const int __elast2 = 106; #define ENOTRECOVERABLE __elast1 #define EOWNERDEAD __elast2 #define EINTEGRITY __elast3 -#ifdef ELAST +#if defined(ELAST) #undef ELAST #define ELAST EINTEGRITY #elif !defined(EOWNERDEAD) && !defined(ENOTRECOVERABLE) && defined(EINTEGRITY) #define ENOTRECOVERABLE __elast1 #define EOWNERDEAD __elast2 -#ifdef ELAST +#if defined(ELAST) #undef ELAST #define ELAST EOWNERDEAD #elif !defined(EOWNERDEAD) && defined(ENOTRECOVERABLE) && !defined(EINTEGRITY) #define EOWNERDEAD __elast1 #define EINTEGRITY __elast2 -#ifdef ELAST +#if defined(ELAST) #undef ELAST #define ELAST EINTEGRITY #elif !defined(EOWNERDEAD) && defined(ENOTRECOVERABLE) && defined(EINTEGRITY) #define EOWNERDEAD __elast1 -#ifdef ELAST +#if defined(ELAST) #undef ELAST #define ELAST EOWNERDEAD #elif defined(EOWNERDEAD) && !defined(ENOTRECOVERABLE) && !defined(EINTEGRITY) #define ENOTRECOVERABLE __elast1 #define EINTEGRITY __elast2 -#ifdef ELAST +#if defined(ELAST) #undef ELAST #define ELAST EINTEGRITY #elif defined(EOWNERDEAD) && !defined(ENOTRECOVERABLE) && defined(EINTEGRITY) #define ENOTRECOVERABLE __elast1 -#ifdef ELAST +#if defined(ELAST) #undef ELAST #define ELAST ENOTRECOVERABLE #elif defined(EOWNERDEAD) && defined(ENOTRECOVERABLE) && !defined(EINTEGRITY) #define EINTEGRITY __elast1 -#ifdef ELAST +#if defined(ELAST) #undef ELAST #define ELAST EINTEGRITY From owner-svn-src-all@freebsd.org Thu Jan 17 15:42:11 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 7DC54149AB6F; Thu, 17 Jan 2019 15:42:11 +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 23BD46D7DA; Thu, 17 Jan 2019 15:42:11 +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 127C01C3A1; Thu, 17 Jan 2019 15:42:11 +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 x0HFgAFJ093100; Thu, 17 Jan 2019 15:42:10 GMT (envelope-from mckusick@FreeBSD.org) Received: (from mckusick@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x0HFgAJi093099; Thu, 17 Jan 2019 15:42:10 GMT (envelope-from mckusick@FreeBSD.org) Message-Id: <201901171542.x0HFgAJi093099@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mckusick set sender to mckusick@FreeBSD.org using -f From: Kirk McKusick Date: Thu, 17 Jan 2019 15:42:10 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r343114 - head/contrib/libc++/include X-SVN-Group: head X-SVN-Commit-Author: mckusick X-SVN-Commit-Paths: head/contrib/libc++/include X-SVN-Commit-Revision: 343114 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 23BD46D7DA X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.97 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_LONG(-1.00)[-0.999,0]; NEURAL_HAM_SHORT(-0.97)[-0.971,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 17 Jan 2019 15:42:11 -0000 Author: mckusick Date: Thu Jan 17 15:42:10 2019 New Revision: 343114 URL: https://svnweb.freebsd.org/changeset/base/343114 Log: Proper definition of elast3. Reported by: Oliver Pinter Modified: head/contrib/libc++/include/errno.h Modified: head/contrib/libc++/include/errno.h ============================================================================== --- head/contrib/libc++/include/errno.h Thu Jan 17 15:35:04 2019 (r343113) +++ head/contrib/libc++/include/errno.h Thu Jan 17 15:42:10 2019 (r343114) @@ -39,13 +39,13 @@ Macros: static const int __elast1 = ELAST+1; static const int __elast2 = ELAST+2; -static const int __elast2 = ELAST+3; +static const int __elast3 = ELAST+3; #else static const int __elast1 = 104; static const int __elast2 = 105; -static const int __elast2 = 106; +static const int __elast3 = 106; #endif From owner-svn-src-all@freebsd.org Thu Jan 17 15:51:32 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id D1FD5149B2D5; Thu, 17 Jan 2019 15:51:32 +0000 (UTC) (envelope-from mckusick@mckusick.com) Received: from chez.mckusick.com (chez.mckusick.com [70.36.157.235]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4B3C46DDB1; Thu, 17 Jan 2019 15:51:32 +0000 (UTC) (envelope-from mckusick@mckusick.com) Received: from chez.mckusick.com (localhost [IPv6:::1]) by chez.mckusick.com (8.15.2/8.15.2) with ESMTP id x0HFxtkO022937; Thu, 17 Jan 2019 07:59:55 -0800 (PST) (envelope-from mckusick@mckusick.com) Message-Id: <201901171559.x0HFxtkO022937@chez.mckusick.com> From: Kirk McKusick To: Oliver Pinter Subject: Re: svn commit: r343111 - in head: cddl/lib/libdtrace contrib/libc++/include contrib/libxo/tests/gettext contrib/libxo/tests/gettext/po/pig_latin contrib/openbsm/libbsm contrib/openbsm/sys/bsm lib/libc... cc: "src-committers@freebsd.org" , "svn-src-all@freebsd.org" , "svn-src-head@freebsd.org" X-URL: http://WWW.McKusick.COM/ Reply-To: Kirk McKusick In-reply-to: Comments: In-reply-to Oliver Pinter message dated "Thu, 17 Jan 2019 08:07:38 +0100." MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <22935.1547740795.1@chez.mckusick.com> Date: Thu, 17 Jan 2019 07:59:55 -0800 X-Spam-Status: No, score=-1.4 required=5.0 tests=BAYES_00,MISSING_MID, UNPARSEABLE_RELAY autolearn=no autolearn_force=no version=3.4.1 X-Spam-Checker-Version: SpamAssassin 3.4.1 (2015-04-28) on chez.mckusick.com X-Rspamd-Queue-Id: 4B3C46DDB1 X-Spamd-Bar: ------ Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-6.97 / 15.00]; NEURAL_HAM_MEDIUM(-1.00)[-1.000,0]; NEURAL_HAM_SHORT(-0.97)[-0.967,0]; REPLY(-4.00)[]; NEURAL_HAM_LONG(-1.00)[-1.000,0] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 17 Jan 2019 15:51:33 -0000 Thanks for your pointer to the problem. Now fixed in -r343113. Kirk McKusick From owner-svn-src-all@freebsd.org Thu Jan 17 15:53:22 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 98CE3149B399; Thu, 17 Jan 2019 15:53:22 +0000 (UTC) (envelope-from mckusick@mckusick.com) Received: from chez.mckusick.com (chez.mckusick.com [70.36.157.235]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id EE0496E146; Thu, 17 Jan 2019 15:53:21 +0000 (UTC) (envelope-from mckusick@mckusick.com) Received: from chez.mckusick.com (localhost [IPv6:::1]) by chez.mckusick.com (8.15.2/8.15.2) with ESMTP id x0HG1vBc023006; Thu, 17 Jan 2019 08:01:57 -0800 (PST) (envelope-from mckusick@mckusick.com) Message-Id: <201901171601.x0HG1vBc023006@chez.mckusick.com> From: Kirk McKusick To: Charlie Li Subject: Re: svn commit: r343111 - in head: cddl/lib/libdtrace contrib/libc++/include contrib/libxo/tests/gettext contrib/libxo/tests/gettext/po/pig_latin contrib/openbsm/libbsm contrib/openbsm/sys/bsm lib/libc... cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-URL: http://WWW.McKusick.COM/ Reply-To: Kirk McKusick In-reply-to: Comments: In-reply-to Charlie Li message dated "Thu, 17 Jan 2019 02:28:42 -0500." MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <23004.1547740917.1@chez.mckusick.com> Date: Thu, 17 Jan 2019 08:01:57 -0800 X-Spam-Status: No, score=-1.4 required=5.0 tests=BAYES_00,MISSING_MID, UNPARSEABLE_RELAY autolearn=no autolearn_force=no version=3.4.1 X-Spam-Checker-Version: SpamAssassin 3.4.1 (2015-04-28) on chez.mckusick.com X-Rspamd-Queue-Id: EE0496E146 X-Spamd-Bar: ------ Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-6.97 / 15.00]; NEURAL_HAM_MEDIUM(-1.00)[-1.000,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; REPLY(-4.00)[]; NEURAL_HAM_SHORT(-0.97)[-0.967,0] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 17 Jan 2019 15:53:22 -0000 Thanks for your analysis. Now fixed in -r343113. Kirk McKusick From owner-svn-src-all@freebsd.org Thu Jan 17 15:59:53 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id E8505149B582; Thu, 17 Jan 2019 15:59:52 +0000 (UTC) (envelope-from mckusick@mckusick.com) Received: from chez.mckusick.com (chez.mckusick.com [70.36.157.235]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 59AF56E3D7; Thu, 17 Jan 2019 15:59:52 +0000 (UTC) (envelope-from mckusick@mckusick.com) Received: from chez.mckusick.com (localhost [IPv6:::1]) by chez.mckusick.com (8.15.2/8.15.2) with ESMTP id x0HG8SCv023111; Thu, 17 Jan 2019 08:08:28 -0800 (PST) (envelope-from mckusick@mckusick.com) Message-Id: <201901171608.x0HG8SCv023111@chez.mckusick.com> From: Kirk McKusick To: Oliver Pinter Subject: Re: svn commit: r343111 - in head: cddl/lib/libdtrace contrib/libc++/include contrib/libxo/tests/gettext contrib/libxo/tests/gettext/po/pig_latin contrib/openbsm/libbsm contrib/openbsm/sys/bsm lib/libc... cc: "src-committers@freebsd.org" , "svn-src-all@freebsd.org" , "svn-src-head@freebsd.org" X-URL: http://WWW.McKusick.COM/ Reply-To: Kirk McKusick In-reply-to: Comments: In-reply-to Oliver Pinter message dated "Thu, 17 Jan 2019 08:07:38 +0100." MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <23109.1547741308.1@chez.mckusick.com> Date: Thu, 17 Jan 2019 08:08:28 -0800 X-Spam-Status: No, score=-1.4 required=5.0 tests=BAYES_00,MISSING_MID, UNPARSEABLE_RELAY autolearn=no autolearn_force=no version=3.4.1 X-Spam-Checker-Version: SpamAssassin 3.4.1 (2015-04-28) on chez.mckusick.com X-Rspamd-Queue-Id: 59AF56E3D7 X-Spamd-Bar: ------ Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-6.97 / 15.00]; NEURAL_HAM_MEDIUM(-1.00)[-1.000,0]; NEURAL_HAM_SHORT(-0.97)[-0.967,0]; REPLY(-4.00)[]; NEURAL_HAM_LONG(-1.00)[-1.000,0] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 17 Jan 2019 15:59:53 -0000 Per my previous email, it is fixed in -r343114 not -r343113. Kirk McKusick From owner-svn-src-all@freebsd.org Thu Jan 17 16:27:01 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id D1B37149C5F4; Thu, 17 Jan 2019 16:27:00 +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 EC8606F980; Thu, 17 Jan 2019 16:26:59 +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 741D41CBD7; Thu, 17 Jan 2019 16:26:59 +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 x0HGQxEn014738; Thu, 17 Jan 2019 16:26:59 GMT (envelope-from mckusick@FreeBSD.org) Received: (from mckusick@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x0HGQxV6014737; Thu, 17 Jan 2019 16:26:59 GMT (envelope-from mckusick@FreeBSD.org) Message-Id: <201901171626.x0HGQxV6014737@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mckusick set sender to mckusick@FreeBSD.org using -f From: Kirk McKusick Date: Thu, 17 Jan 2019 16:26:59 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r343115 - head/contrib/libc++/include X-SVN-Group: head X-SVN-Commit-Author: mckusick X-SVN-Commit-Paths: head/contrib/libc++/include X-SVN-Commit-Revision: 343115 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: EC8606F980 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.97 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_LONG(-1.00)[-0.999,0]; NEURAL_HAM_SHORT(-0.97)[-0.971,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 17 Jan 2019 16:27:01 -0000 Author: mckusick Date: Thu Jan 17 16:26:59 2019 New Revision: 343115 URL: https://svnweb.freebsd.org/changeset/base/343115 Log: Truely fix #if defined broken in -r343111 Pointy-hat-to: mckusick Modified: head/contrib/libc++/include/errno.h Modified: head/contrib/libc++/include/errno.h ============================================================================== --- head/contrib/libc++/include/errno.h Thu Jan 17 15:42:10 2019 (r343114) +++ head/contrib/libc++/include/errno.h Thu Jan 17 16:26:59 2019 (r343115) @@ -56,6 +56,7 @@ static const int __elast3 = 106; #if defined(ELAST) #undef ELAST #define ELAST EINTEGRITY +#endif #elif !defined(EOWNERDEAD) && !defined(ENOTRECOVERABLE) && defined(EINTEGRITY) #define ENOTRECOVERABLE __elast1 @@ -63,6 +64,7 @@ static const int __elast3 = 106; #if defined(ELAST) #undef ELAST #define ELAST EOWNERDEAD +#endif #elif !defined(EOWNERDEAD) && defined(ENOTRECOVERABLE) && !defined(EINTEGRITY) #define EOWNERDEAD __elast1 @@ -70,12 +72,14 @@ static const int __elast3 = 106; #if defined(ELAST) #undef ELAST #define ELAST EINTEGRITY +#endif #elif !defined(EOWNERDEAD) && defined(ENOTRECOVERABLE) && defined(EINTEGRITY) #define EOWNERDEAD __elast1 #if defined(ELAST) #undef ELAST #define ELAST EOWNERDEAD +#endif #elif defined(EOWNERDEAD) && !defined(ENOTRECOVERABLE) && !defined(EINTEGRITY) #define ENOTRECOVERABLE __elast1 @@ -83,18 +87,21 @@ static const int __elast3 = 106; #if defined(ELAST) #undef ELAST #define ELAST EINTEGRITY +#endif #elif defined(EOWNERDEAD) && !defined(ENOTRECOVERABLE) && defined(EINTEGRITY) #define ENOTRECOVERABLE __elast1 #if defined(ELAST) #undef ELAST #define ELAST ENOTRECOVERABLE +#endif #elif defined(EOWNERDEAD) && defined(ENOTRECOVERABLE) && !defined(EINTEGRITY) #define EINTEGRITY __elast1 #if defined(ELAST) #undef ELAST #define ELAST EINTEGRITY +#endif #endif // !defined(OWNERDEAD) && !defined(NOTRECOVERABLE) && !defined(INTEGRITY) From owner-svn-src-all@freebsd.org Thu Jan 17 16:50:52 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 4CDAE149CF63; Thu, 17 Jan 2019 16:50:52 +0000 (UTC) (envelope-from des@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 DFFCB706E6; Thu, 17 Jan 2019 16:50:51 +0000 (UTC) (envelope-from des@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1: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 C59731CF52; Thu, 17 Jan 2019 16:50:51 +0000 (UTC) (envelope-from des@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x0HGopil026447; Thu, 17 Jan 2019 16:50:51 GMT (envelope-from des@FreeBSD.org) Received: (from des@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x0HGopPY026445; Thu, 17 Jan 2019 16:50:51 GMT (envelope-from des@FreeBSD.org) Message-Id: <201901171650.x0HGopPY026445@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: des set sender to des@FreeBSD.org using -f From: =?UTF-8?Q?Dag-Erling_Sm=c3=b8rgrav?= Date: Thu, 17 Jan 2019 16:50:51 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r343116 - in head: include lib/libc/gen libexec/rtld-elf X-SVN-Group: head X-SVN-Commit-Author: des X-SVN-Commit-Paths: in head: include lib/libc/gen libexec/rtld-elf X-SVN-Commit-Revision: 343116 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: DFFCB706E6 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.96 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_SHORT(-0.97)[-0.965,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_LONG(-1.00)[-0.999,0] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 17 Jan 2019 16:50:52 -0000 Author: des Date: Thu Jan 17 16:50:50 2019 New Revision: 343116 URL: https://svnweb.freebsd.org/changeset/base/343116 Log: Revert r343093 until I can address the issues raised by kib@. Modified: head/include/dlfcn.h head/lib/libc/gen/dlopen.3 head/libexec/rtld-elf/rtld.c Modified: head/include/dlfcn.h ============================================================================== --- head/include/dlfcn.h Thu Jan 17 16:26:59 2019 (r343115) +++ head/include/dlfcn.h Thu Jan 17 16:50:50 2019 (r343116) @@ -120,7 +120,6 @@ void *dlopen(const char *, int); void *dlsym(void * __restrict, const char * __restrict); #if __BSD_VISIBLE -void *dlopenat(int, const char *, int); void *fdlopen(int, int); int dladdr(const void * __restrict, Dl_info * __restrict); dlfunc_t dlfunc(void * __restrict, const char * __restrict); Modified: head/lib/libc/gen/dlopen.3 ============================================================================== --- head/lib/libc/gen/dlopen.3 Thu Jan 17 16:26:59 2019 (r343115) +++ head/lib/libc/gen/dlopen.3 Thu Jan 17 16:50:50 2019 (r343116) @@ -32,12 +32,11 @@ .\" @(#) dlopen.3 1.6 90/01/31 SMI .\" $FreeBSD$ .\" -.Dd January 15, 2019 +.Dd January 2, 2019 .Dt DLOPEN 3 .Os .Sh NAME .Nm dlopen , -.Nm dlopenat , .Nm fdlopen , .Nm dlsym , .Nm dlvsym , @@ -52,8 +51,6 @@ .Ft void * .Fn dlopen "const char *path" "int mode" .Ft void * -.Fn dlopenat "int fd" "const char *path" "int mode" -.Ft void * .Fn fdlopen "int fd" "int mode" .Ft void * .Fn dlsym "void * restrict handle" "const char * restrict symbol" @@ -172,24 +169,6 @@ If fails, it returns a null pointer, and sets an error condition which may be interrogated with .Fn dlerror . -.Pp -The -.Fn dlopenat -function is equivalent to -.Fn dlopen -except in the case where the path specifies a relative path. -In this case the file to be opened is determined relative to the -directory associated with the file descriptor fd instead of the -current working directory. -If -.Fn dlopenat -is passed the special value -.Dv AT_FDCWD -in the -.Fa fd -parameter, the current working directory is used and the behavior is -identical to a call to -.Fn dlopen . .Pp The .Fn fdlopen Modified: head/libexec/rtld-elf/rtld.c ============================================================================== --- head/libexec/rtld-elf/rtld.c Thu Jan 17 16:26:59 2019 (r343115) +++ head/libexec/rtld-elf/rtld.c Thu Jan 17 16:50:50 2019 (r343116) @@ -93,8 +93,8 @@ static void digest_dynamic(Obj_Entry *, int); static Obj_Entry *digest_phdr(const Elf_Phdr *, int, caddr_t, const char *); static Obj_Entry *dlcheck(void *); static int dlclose_locked(void *, RtldLockState *); -static Obj_Entry *dlopen_object(int, const char *name, int fd, - Obj_Entry *refobj, int lo_flags, int mode, RtldLockState *lockstate); +static Obj_Entry *dlopen_object(const char *name, int fd, Obj_Entry *refobj, + int lo_flags, int mode, RtldLockState *lockstate); static Obj_Entry *do_load_object(int, const char *, char *, struct stat *, int); static int do_search_info(const Obj_Entry *obj, int, struct dl_serinfo *); static bool donelist_check(DoneList *, const Obj_Entry *); @@ -118,7 +118,7 @@ static void load_filtees(Obj_Entry *, int flags, RtldL static void unload_filtees(Obj_Entry *, RtldLockState *); static int load_needed_objects(Obj_Entry *, int); static int load_preload_objects(void); -static Obj_Entry *load_object(int, const char *, int, const Obj_Entry *, int); +static Obj_Entry *load_object(const char *, int fd, const Obj_Entry *, int); static void map_stacks_exec(RtldLockState *); static int obj_disable_relro(Obj_Entry *); static int obj_enforce_relro(Obj_Entry *); @@ -147,7 +147,7 @@ static int relocate_objects(Obj_Entry *, bool, Obj_Ent static int resolve_object_ifunc(Obj_Entry *, bool, int, RtldLockState *); static int rtld_dirname(const char *, char *); static int rtld_dirname_abs(const char *, char *); -static void *rtld_dlopen(int, const char *name, int fd, int mode); +static void *rtld_dlopen(const char *name, int fd, int mode); static void rtld_exit(void); static char *search_library_path(const char *, const char *, const char *, int *); @@ -231,7 +231,6 @@ extern Elf_Dyn _DYNAMIC; int dlclose(void *) __exported; char *dlerror(void) __exported; void *dlopen(const char *, int) __exported; -void *dlopenat(int, const char *, int) __exported; void *fdlopen(int, int) __exported; void *dlsym(void *, const char *) __exported; dlfunc_t dlfunc(void *, const char *) __exported; @@ -2293,8 +2292,8 @@ load_filtee1(Obj_Entry *obj, Needed_Entry *needed, int { for (; needed != NULL; needed = needed->next) { - needed->obj = dlopen_object(AT_FDCWD, obj->strtab + needed->name, -1, - obj, flags, ((ld_loadfltr || obj->z_loadfltr) ? RTLD_NOW : RTLD_LAZY) | + needed->obj = dlopen_object(obj->strtab + needed->name, -1, obj, + flags, ((ld_loadfltr || obj->z_loadfltr) ? RTLD_NOW : RTLD_LAZY) | RTLD_LOCAL, lockstate); } } @@ -2317,8 +2316,8 @@ process_needed(Obj_Entry *obj, Needed_Entry *needed, i Obj_Entry *obj1; for (; needed != NULL; needed = needed->next) { - obj1 = needed->obj = load_object(AT_FDCWD, obj->strtab + needed->name, - -1, obj, flags & ~RTLD_LO_NOLOAD); + obj1 = needed->obj = load_object(obj->strtab + needed->name, -1, obj, + flags & ~RTLD_LO_NOLOAD); if (obj1 == NULL && !ld_tracing && (flags & RTLD_LO_FILTEES) == 0) return (-1); } @@ -2361,7 +2360,7 @@ load_preload_objects(void) savech = p[len]; p[len] = '\0'; - obj = load_object(AT_FDCWD, p, -1, NULL, 0); + obj = load_object(p, -1, NULL, 0); if (obj == NULL) return -1; /* XXX - cleanup */ obj->z_interpose = true; @@ -2390,8 +2389,7 @@ printable_path(const char *path) * on failure. */ static Obj_Entry * -load_object(int atfd, const char *name, int fd_u, const Obj_Entry *refobj, - int flags) +load_object(const char *name, int fd_u, const Obj_Entry *refobj, int flags) { Obj_Entry *obj; int fd; @@ -2428,7 +2426,7 @@ load_object(int atfd, const char *name, int fd_u, cons * To avoid a race, we open the file and use fstat() rather than * using stat(). */ - if ((fd = openat(atfd, path, O_RDONLY | O_CLOEXEC | O_VERIFY)) == -1) { + if ((fd = open(path, O_RDONLY | O_CLOEXEC | O_VERIFY)) == -1) { _rtld_error("Cannot open \"%s\"", path); free(path); return (NULL); @@ -3257,28 +3255,21 @@ dllockinit(void *context, } void * -dlopenat(int fd, const char *name, int mode) -{ - - return (rtld_dlopen(fd, name, -1, mode)); -} - -void * dlopen(const char *name, int mode) { - return (rtld_dlopen(AT_FDCWD, name, -1, mode)); + return (rtld_dlopen(name, -1, mode)); } void * fdlopen(int fd, int mode) { - return (rtld_dlopen(AT_FDCWD, NULL, fd, mode)); + return (rtld_dlopen(NULL, fd, mode)); } static void * -rtld_dlopen(int atfd, const char *name, int fd, int mode) +rtld_dlopen(const char *name, int fd, int mode) { RtldLockState lockstate; int lo_flags; @@ -3300,7 +3291,7 @@ rtld_dlopen(int atfd, const char *name, int fd, int mo if (ld_tracing != NULL) lo_flags |= RTLD_LO_TRACE; - return (dlopen_object(atfd, name, fd, obj_main, lo_flags, + return (dlopen_object(name, fd, obj_main, lo_flags, mode & (RTLD_MODEMASK | RTLD_GLOBAL), NULL)); } @@ -3315,8 +3306,8 @@ dlopen_cleanup(Obj_Entry *obj, RtldLockState *lockstat } static Obj_Entry * -dlopen_object(int atfd, const char *name, int fd, Obj_Entry *refobj, - int lo_flags, int mode, RtldLockState *lockstate) +dlopen_object(const char *name, int fd, Obj_Entry *refobj, int lo_flags, + int mode, RtldLockState *lockstate) { Obj_Entry *old_obj_tail; Obj_Entry *obj; @@ -3338,7 +3329,7 @@ dlopen_object(int atfd, const char *name, int fd, Obj_ obj = obj_main; obj->refcount++; } else { - obj = load_object(atfd, name, fd, refobj, lo_flags); + obj = load_object(name, fd, refobj, lo_flags); } if (obj) { From owner-svn-src-all@freebsd.org Thu Jan 17 17:05:32 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id D3DE4149D93E; Thu, 17 Jan 2019 17:05:31 +0000 (UTC) (envelope-from agapon@gmail.com) Received: from mail-lf1-f51.google.com (mail-lf1-f51.google.com [209.85.167.51]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 3087A713AA; Thu, 17 Jan 2019 17:05:31 +0000 (UTC) (envelope-from agapon@gmail.com) Received: by mail-lf1-f51.google.com with SMTP id v5so8349008lfe.7; Thu, 17 Jan 2019 09:05:31 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:references:from:openpgp:autocrypt :message-id:date:user-agent:mime-version:in-reply-to :content-language:content-transfer-encoding; bh=xSMv7QmJUM4uBJmuhKnfDUjpJgiGYPJ1JfBhcAtwzBY=; b=MfHZnNTVIXfsm4mowdXqaSTAZPrdFbUj/TdhorUJFsfjx9wkbG3bbqqP07IeKPv5zN gXcMUOUE9jsj+iyZ2JGl9sK1Ki7P9/hYrlP6/G5Ki11VWnw70rpKSMQ8sBMxjjf1NQ2A LvUXq5Wzd73oP6lf1laZ/BIZD09FgpIrS+8e2IPxApbHP4qGCO4YruuwjGyB2YB/DB25 YFwakfwBRiZ/ktvmGmAEjr4Ijh/k80jwfHqNxCzErl0PN/BvfksRzvbcOkl1TeVOPD4Y 786cQGxL6zuNCPurCu+HUm3zyqH8biEaxVPWAdKITZqS3fRGAyZK7jcYdeB1ewUJvtGK yy2w== X-Gm-Message-State: AJcUukdBLFKHSksfz5UBpb/KRA32mCLHZq/2FrEy7kxWYBbMBGFjBHii yIwMipsD8Diy6men9FJEgBppVsKS X-Google-Smtp-Source: ALg8bN7ozQ+PrjHBF89fJW8AxtJLi2WWTiNxT0s07Qq3B0A4C06v1VVcpbIkGT3U8jpa6EC0/VeQGA== X-Received: by 2002:a19:a84e:: with SMTP id r75mr10991383lfe.45.1547744723407; Thu, 17 Jan 2019 09:05:23 -0800 (PST) Received: from [192.168.0.88] (east.meadow.volia.net. [93.72.151.96]) by smtp.googlemail.com with ESMTPSA id h203sm395256lfe.44.2019.01.17.09.05.21 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 17 Jan 2019 09:05:22 -0800 (PST) Subject: Re: svn commit: r343113 - head/contrib/libc++/include To: Kirk McKusick , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org References: <201901171535.x0HFZ564087839@repo.freebsd.org> From: Andriy Gapon Openpgp: preference=signencrypt Autocrypt: addr=avg@FreeBSD.org; prefer-encrypt=mutual; keydata= xsFNBFm4LIgBEADNB/3lT7f15UKeQ52xCFQx/GqHkSxEdVyLFZTmY3KyNPQGBtyvVyBfprJ7 mAeXZWfhat6cKNRAGZcL5EmewdQuUfQfBdYmKjbw3a9GFDsDNuhDA2QwFt8BmkiVMRYyvI7l N0eVzszWCUgdc3qqM6qqcgBaqsVmJluwpvwp4ZBXmch5BgDDDb1MPO8AZ2QZfIQmplkj8Y6Z AiNMknkmgaekIINSJX8IzRzKD5WwMsin70psE8dpL/iBsA2cpJGzWMObVTtCxeDKlBCNqM1i gTXta1ukdUT7JgLEFZk9ceYQQMJJtUwzWu1UHfZn0Fs29HTqawfWPSZVbulbrnu5q55R4PlQ /xURkWQUTyDpqUvb4JK371zhepXiXDwrrpnyyZABm3SFLkk2bHlheeKU6Yql4pcmSVym1AS4 dV8y0oHAfdlSCF6tpOPf2+K9nW1CFA8b/tw4oJBTtfZ1kxXOMdyZU5fiG7xb1qDgpQKgHUX8 7Rd2T1UVLVeuhYlXNw2F+a2ucY+cMoqz3LtpksUiBppJhw099gEXehcN2JbUZ2TueJdt1FdS ztnZmsHUXLxrRBtGwqnFL7GSd6snpGIKuuL305iaOGODbb9c7ne1JqBbkw1wh8ci6vvwGlzx rexzimRaBzJxlkjNfMx8WpCvYebGMydNoeEtkWldtjTNVsUAtQARAQABzR5BbmRyaXkgR2Fw b24gPGF2Z0BGcmVlQlNELm9yZz7CwZQEEwEIAD4WIQS+LEO7ngQnXA4Bjr538m7TUc1yjwUC WbgsiAIbIwUJBaOagAULCQgHAgYVCAkKCwIEFgIDAQIeAQIXgAAKCRB38m7TUc1yj+JAEACV l9AK/nOWAt/9cufV2fRj0hdOqB1aCshtSrwHk/exXsDa4/FkmegxXQGY+3GWX3deIyesbVRL rYdtdK0dqJyT1SBqXK1h3/at9rxr9GQA6KWOxTjUFURsU7ok/6SIlm8uLRPNKO+yq0GDjgaO LzN+xykuBA0FlhQAXJnpZLcVfPJdWv7sSHGedL5ln8P8rxR+XnmsA5TUaaPcbhTB+mG+iKFj GghASDSfGqLWFPBlX/fpXikBDZ1gvOr8nyMY9nXhgfXpq3B6QCRYKPy58ChrZ5weeJZ29b7/ QdEO8NFNWHjSD9meiLdWQaqo9Y7uUxN3wySc/YUZxtS0bhAd8zJdNPsJYG8sXgKjeBQMVGuT eCAJFEYJqbwWvIXMfVWop4+O4xB+z2YE3jAbG/9tB/GSnQdVSj3G8MS80iLS58frnt+RSEw/ psahrfh0dh6SFHttE049xYiC+cM8J27Aaf0i9RflyITq57NuJm+AHJoU9SQUkIF0nc6lfA+o JRiyRlHZHKoRQkIg4aiKaZSWjQYRl5Txl0IZUP1dSWMX4s3XTMurC/pnja45dge/4ESOtJ9R 8XuIWg45Oq6MeIWdjKddGhRj3OohsltKgkEU3eLKYtB6qRTQypHHUawCXz88uYt5e3w4V16H lCpSTZV/EVHnNe45FVBlvK7k7HFfDDkryM7BTQRZuCyIARAAlq0slcsVboY/+IUJdcbEiJRW be9HKVz4SUchq0z9MZPX/0dcnvz/gkyYA+OuM78dNS7Mbby5dTvOqfpLJfCuhaNYOhlE0wY+ 1T6Tf1f4c/uA3U/YiadukQ3+6TJuYGAdRZD5EqYFIkreARTVWg87N9g0fT9BEqLw9lJtEGDY EWUE7L++B8o4uu3LQFEYxcrb4K/WKmgtmFcm77s0IKDrfcX4doV92QTIpLiRxcOmCC/OCYuO jB1oaaqXQzZrCutXRK0L5XN1Y1PYjIrEzHMIXmCDlLYnpFkK+itlXwlE2ZQxkfMruCWdQXye syl2fynAe8hvp7Mms9qU2r2K9EcJiR5N1t1C2/kTKNUhcRv7Yd/vwusK7BqJbhlng5ZgRx0m WxdntU/JLEntz3QBsBsWM9Y9wf2V4tLv6/DuDBta781RsCB/UrU2zNuOEkSixlUiHxw1dccI 6CVlaWkkJBxmHX22GdDFrcjvwMNIbbyfQLuBq6IOh8nvu9vuItup7qemDG3Ms6TVwA7BD3j+ 3fGprtyW8Fd/RR2bW2+LWkMrqHffAr6Y6V3h5kd2G9Q8ZWpEJk+LG6Mk3fhZhmCnHhDu6CwN MeUvxXDVO+fqc3JjFm5OxhmfVeJKrbCEUJyM8ESWLoNHLqjywdZga4Q7P12g8DUQ1mRxYg/L HgZY3zfKOqcAEQEAAcLBfAQYAQgAJhYhBL4sQ7ueBCdcDgGOvnfybtNRzXKPBQJZuCyIAhsM BQkFo5qAAAoJEHfybtNRzXKPBVwQAKfFy9P7N3OsLDMB56A4Kf+ZT+d5cIx0Yiaf4n6w7m3i ImHHHk9FIetI4Xe54a2IXh4Bq5UkAGY0667eIs+Z1Ea6I2i27Sdo7DxGwq09Qnm/Y65ADvXs 3aBvokCcm7FsM1wky395m8xUos1681oV5oxgqeRI8/76qy0hD9WR65UW+HQgZRIcIjSel9vR XDaD2HLGPTTGr7u4v00UeTMs6qvPsa2PJagogrKY8RXdFtXvweQFz78NbXhluwix2Tb9ETPk LIpDrtzV73CaE2aqBG/KrboXT2C67BgFtnk7T7Y7iKq4/XvEdDWscz2wws91BOXuMMd4c/c4 OmGW9m3RBLufFrOag1q5yUS9QbFfyqL6dftJP3Zq/xe+mr7sbWbhPVCQFrH3r26mpmy841ym dwQnNcsbIGiBASBSKksOvIDYKa2Wy8htPmWFTEOPRpFXdGQ27awcjjnB42nngyCK5ukZDHi6 w0qK5DNQQCkiweevCIC6wc3p67jl1EMFY5+z+zdTPb3h7LeVnGqW0qBQl99vVFgzLxchKcl0 R/paSFgwqXCZhAKMuUHncJuynDOP7z5LirUeFI8qsBAJi1rXpQoLJTVcW72swZ42IdPiboqx NbTMiNOiE36GqMcTPfKylCbF45JNX4nF9ElM0E+Y8gi4cizJYBRr2FBJgay0b9Cp Message-ID: <99fd64c3-b3b3-fd50-6370-224a329a3340@FreeBSD.org> Date: Thu, 17 Jan 2019 19:05:20 +0200 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:52.0) Gecko/20100101 Thunderbird/52.7.0 MIME-Version: 1.0 In-Reply-To: <201901171535.x0HFZ564087839@repo.freebsd.org> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit X-Rspamd-Queue-Id: 3087A713AA X-Spamd-Bar: ------ Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-6.97 / 15.00]; NEURAL_HAM_MEDIUM(-1.00)[-1.000,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; REPLY(-4.00)[]; NEURAL_HAM_SHORT(-0.97)[-0.972,0] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 17 Jan 2019 17:05:32 -0000 On 17/01/2019 17:35, Kirk McKusick wrote: > -#ifdef ELAST > +#if defined(ELAST) I think that these are exactly the same, so not sure what the change does. -- Andriy Gapon From owner-svn-src-all@freebsd.org Thu Jan 17 17:36:19 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 2CAC5149E6CE; Thu, 17 Jan 2019 17:36:19 +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 C758372A02; Thu, 17 Jan 2019 17:36:18 +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 906A51D7D9; Thu, 17 Jan 2019 17:36:18 +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 x0HHaImd052706; Thu, 17 Jan 2019 17:36:18 GMT (envelope-from markj@FreeBSD.org) Received: (from markj@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x0HHaIad052705; Thu, 17 Jan 2019 17:36:18 GMT (envelope-from markj@FreeBSD.org) Message-Id: <201901171736.x0HHaIad052705@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: markj set sender to markj@FreeBSD.org using -f From: Mark Johnston Date: Thu, 17 Jan 2019 17:36:18 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r343117 - head/usr.bin/cmp X-SVN-Group: head X-SVN-Commit-Author: markj X-SVN-Commit-Paths: head/usr.bin/cmp X-SVN-Commit-Revision: 343117 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: C758372A02 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.96 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_SHORT(-0.96)[-0.964,0]; NEURAL_HAM_LONG(-1.00)[-0.999,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 17 Jan 2019 17:36:19 -0000 Author: markj Date: Thu Jan 17 17:36:18 2019 New Revision: 343117 URL: https://svnweb.freebsd.org/changeset/base/343117 Log: Fix handling of rights on stdio streams. - Limit rights on stdio before opening input files. Otherwise, open() may return one of the standard descriptors and we end up limiting rights such that we cannot read from one of the input files. - Use caph_limit_stdio(), which suppresses EBADF, to ensure that we don't emit an error if one of the stdio streams is closed. - Don't bother further limiting rights on stdin when stdin isn't going to be used. Doing so correctly requires checking for a number of edge cases, and it doesn't provide any significant benefit. PR: 234885 Reviewed by: oshogbo MFC after: 3 days Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D18860 Modified: head/usr.bin/cmp/cmp.c Modified: head/usr.bin/cmp/cmp.c ============================================================================== --- head/usr.bin/cmp/cmp.c Thu Jan 17 16:50:50 2019 (r343116) +++ head/usr.bin/cmp/cmp.c Thu Jan 17 17:36:18 2019 (r343117) @@ -116,14 +116,16 @@ main(int argc, char *argv[]) if (argc < 2 || argc > 4) usage(); + if (caph_limit_stdio() == -1) + err(ERR_EXIT, "failed to limit stdio"); + /* Backward compatibility -- handle "-" meaning stdin. */ special = 0; if (strcmp(file1 = argv[0], "-") == 0) { special = 1; - fd1 = 0; + fd1 = STDIN_FILENO; file1 = "stdin"; - } - else if ((fd1 = open(file1, oflag, 0)) < 0 && errno != EMLINK) { + } else if ((fd1 = open(file1, oflag, 0)) < 0 && errno != EMLINK) { if (!sflag) err(ERR_EXIT, "%s", file1); else @@ -134,10 +136,9 @@ main(int argc, char *argv[]) errx(ERR_EXIT, "standard input may only be specified once"); special = 1; - fd2 = 0; + fd2 = STDIN_FILENO; file2 = "stdin"; - } - else if ((fd2 = open(file2, oflag, 0)) < 0 && errno != EMLINK) { + } else if ((fd2 = open(file2, oflag, 0)) < 0 && errno != EMLINK) { if (!sflag) err(ERR_EXIT, "%s", file2); else @@ -174,16 +175,6 @@ main(int argc, char *argv[]) err(ERR_EXIT, "unable to limit fcntls for %s", file1); if (caph_fcntls_limit(fd2, fcntls) < 0) err(ERR_EXIT, "unable to limit fcntls for %s", file2); - - if (!special) { - cap_rights_init(&rights); - if (caph_rights_limit(STDIN_FILENO, &rights) < 0) { - err(ERR_EXIT, "unable to limit stdio"); - } - } - - if (caph_limit_stdout() == -1 || caph_limit_stderr() == -1) - err(ERR_EXIT, "unable to limit stdio"); caph_cache_catpages(); From owner-svn-src-all@freebsd.org Thu Jan 17 18:08:01 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 53E15149F509; Thu, 17 Jan 2019 18:08:01 +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 EEEA273C52; Thu, 17 Jan 2019 18:08:00 +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 E13C71DCF8; Thu, 17 Jan 2019 18:08:00 +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 x0HI80En068567; Thu, 17 Jan 2019 18:08:00 GMT (envelope-from eugen@FreeBSD.org) Received: (from eugen@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x0HI80jC068564; Thu, 17 Jan 2019 18:08:00 GMT (envelope-from eugen@FreeBSD.org) Message-Id: <201901171808.x0HI80jC068564@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: eugen set sender to eugen@FreeBSD.org using -f From: Eugene Grosbein Date: Thu, 17 Jan 2019 18:08:00 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r343118 - in head/usr.sbin: . trim X-SVN-Group: head X-SVN-Commit-Author: eugen X-SVN-Commit-Paths: in head/usr.sbin: . trim X-SVN-Commit-Revision: 343118 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: EEEA273C52 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.98 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_LONG(-1.00)[-0.999,0]; NEURAL_HAM_SHORT(-0.98)[-0.979,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 17 Jan 2019 18:08:01 -0000 Author: eugen Date: Thu Jan 17 18:07:59 2019 New Revision: 343118 URL: https://svnweb.freebsd.org/changeset/base/343118 Log: Re-add new small tool trim(8) to delete contents for blocks on devices using wear-leveling algorithms as a few weeks passed after review and discussion of trim(8) ceased and we still have no utility to perform the job. Reviewed by: hackers@ MFC after: 2 weeks Added: head/usr.sbin/trim/ head/usr.sbin/trim/Makefile (contents, props changed) head/usr.sbin/trim/trim.8 (contents, props changed) head/usr.sbin/trim/trim.c (contents, props changed) Modified: head/usr.sbin/Makefile Modified: head/usr.sbin/Makefile ============================================================================== --- head/usr.sbin/Makefile Thu Jan 17 17:36:18 2019 (r343117) +++ head/usr.sbin/Makefile Thu Jan 17 18:07:59 2019 (r343118) @@ -92,6 +92,7 @@ SUBDIR= adduser \ tcpdrop \ tcpdump \ traceroute \ + trim \ trpt \ tzsetup \ ugidfw \ Added: head/usr.sbin/trim/Makefile ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/usr.sbin/trim/Makefile Thu Jan 17 18:07:59 2019 (r343118) @@ -0,0 +1,8 @@ +# $FreeBSD$ + +PROG= trim +MAN= trim.8 +LIBADD= util +LDFLAGS= -lutil + +.include Added: head/usr.sbin/trim/trim.8 ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/usr.sbin/trim/trim.8 Thu Jan 17 18:07:59 2019 (r343118) @@ -0,0 +1,167 @@ +.\" +.\" Copyright (c) 2019 Eugene Grosbein . +.\" All rights reserved. +.\" +.\" Redistribution and use in source and binary forms, with or without +.\" modification, are permitted provided that the following conditions +.\" are met: +.\" 1. Redistributions of source code must retain the above copyright +.\" notice, this list of conditions and the following disclaimer. +.\" 2. Redistributions in binary form must reproduce the above copyright +.\" notice, this list of conditions and the following disclaimer in the +.\" documentation and/or other materials provided with the distribution. +.\" +.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND +.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE +.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +.\" SUCH DAMAGE. +.\" +.\" $FreeBSD$ +.\" +.Dd January 18, 2019 +.Dt TRIM 8 +.Os +.Sh NAME +.Nm trim +.Nd erase device blocks that have no needed contents +.Sh SYNOPSIS +.Nm +.Op Fl Nfqv +.Fl [ [lo] Xo +.Bk -words +.Sm off +.Ar offset +.Op Cm K | k | M | m | G | g | T | t ] +.Sm on +.Xc +.Ek +.Bk -words +.Op Fl r Ar rfile +.Ek +.Ar device ... +.Sh DESCRIPTION +The +.Nm +utility erases specified region of the device. +It is mostly relevant for storage that implement trim (like flash based, +or thinly provisioned storage). +.Sy All erased data is lost. +.Pp +The following options are available: +.Bl -tag -width indent +.It Fl N +Do not actually erase anything but show what it would do (dry run). +Implies +.Fl v . +This is the default. Overrides +.Fl f . +.It Fl f +Perform the operation. Overrides +.Fl N . +.It Fl l Xo +.Sm off +.Ar offset +.Op Cm K | k | M | m | G | g | T | t +.Sm on +.Xc +.It Fl o Xo +.Sm off +.Ar offset +.Op Cm K | k | M | m | G | g | T | t +.Sm on +.Xc +Specify the length +.Fl l +of the region to trim or its offset +.Fl o +from the beginning of the device. +.Sy The whole device is erased by default +unless one or both of these options are presented. +.Pp +The argument may be suffixed with one of +.Cm K , +.Cm M , +.Cm G +or +.Cm T +(either upper or lower case) to indicate a multiple of +Kilobytes, Megabytes, Gigabytes or Terabytes +respectively. +.It Fl q +Do not output anything except of possible error messages (quiet mode). +Overrides +.Fl v . +.It Fl r Ar rfile +Uses the length of given +.Ar rfile +as length of the region to erase. +.Sy The whole device is erased by default. +.It Fl v +Show offset and length of actual region being erased, in bytes. +.El +.Pp +Later options override previous ones. +.Pp +Note that actual success of the operation depends of underlying +device driver such as +.Xr ada 4 , +.Xr da 4 +and others. +Refer to corresponding manual pages for detail on possible caveats +in low level support for ATA TRIM or SCSI UNMAP commands. +.Sh EXIT STATUS +.Ex -std +If the final erase operation fails for an argument, the +.Nm +utility returns exit code 1. +It can also return one of the exit codes defined in +.Xr sysexits 3 , +as follows: +.Bl -tag -width ".Dv EX_UNAVAILABLE" +.It Dv EX_USAGE +The specified offset or length of the region is incorrect. +.It Dv EX_OSERR +There is no enough memory to proceed. +.It Dv EX_NOINPUT +The specified +.Ar rfile +cannot be opened (perhaps, it does not exist). +.It Dv EX_IOERR +The specified +.Ar rfile +cannot be examined for its size due to some system input/output error. +.It Dv EX_DATAERR +The specified +.Ar rfile +is not regular file, directory nor special device, so its size +cannot be examined. +.It Dv EX_UNAVAILABLE +The specified +.Ar rfile +is special device file not supporting DIOCGMEDIASIZE +.Xr ioctl 2 +(probably not a disk), so its size cannot be examined. +.El +.Sh SEE ALSO +.Xr ada 4 , +.Xr da 4 , +.Xr ioctl 2 , +.Xr nda 4 , +.Xr sysexits 3 +.Sh HISTORY +The +.Nm +utility first appeared in +.Fx 12.1 . +.Sh AUTHORS +The +.Nm +utility was written by +.An Eugene Grosbein Aq Mt eugen@FreeBSD.org . Added: head/usr.sbin/trim/trim.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/usr.sbin/trim/trim.c Thu Jan 17 18:07:59 2019 (r343118) @@ -0,0 +1,210 @@ +/*- + * SPDX-License-Identifier: BSD-2-Clause-FreeBSD + * + * Copyright (c) 2019 Eugene Grosbein . + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + * + */ + +#include +#include +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include +__FBSDID("$FreeBSD$"); + +static off_t getsize(const char *path); +static int opendev(const char *path, int flags); +static int trim(const char *path, off_t offset, off_t length, bool dryrun, bool verbose); +static void usage(const char *name); + +int +main(int argc, char **argv) +{ + off_t offset, length; + uint64_t usz; + int ch, error; + bool dryrun, verbose; + char *fname, *name; + + error = 0; + length = offset = 0; + name = argv[0]; + dryrun = verbose = true; + + while ((ch = getopt(argc, argv, "Nfl:o:qr:v")) != -1) + switch (ch) { + case 'N': + dryrun = true; + verbose = true; + break; + case 'f': + dryrun = false; + break; + case 'l': + case 'o': + if (expand_number(optarg, &usz) == -1 || + (off_t)usz < 0 || (usz == 0 && ch == 'l')) + errx(EX_USAGE, + "invalid %s of the region: %s", + ch == 'o' ? "offset" : "length", + optarg); + if (ch == 'o') + offset = (off_t)usz; + else + length = (off_t)usz; + break; + case 'q': + verbose = false; + break; + case 'r': + if ((length = getsize(optarg)) == 0) + errx(EX_USAGE, + "invalid zero length reference file" + " for the region: %s", optarg); + break; + case 'v': + verbose = true; + break; + default: + usage(name); + /* NOTREACHED */ + } + + argv += optind; + argc -= optind; + + if (argc < 1) + usage(name); + + while ((fname = *argv++) != NULL) + if (trim(fname, offset, length, dryrun, verbose) < 0) + error++; + + return (error ? EXIT_FAILURE : EXIT_SUCCESS); +} + +static int +opendev(const char *path, int flags) +{ + int fd; + char *tstr; + + if ((fd = open(path, flags)) < 0) { + if (errno == ENOENT && path[0] != '/') { + if (asprintf(&tstr, "%s%s", _PATH_DEV, path) < 0) + errx(EX_OSERR, "no memory"); + fd = open(tstr, flags); + free(tstr); + } + } + + if (fd < 0) + err(EX_NOINPUT, "open failed: %s", path); + + return (fd); +} + +static off_t +getsize(const char *path) +{ + struct stat sb; + off_t mediasize; + int fd; + + fd = opendev(path, O_RDONLY | O_DIRECT); + + if (fstat(fd, &sb) < 0) + err(EX_IOERR, "fstat failed: %s", path); + + if (S_ISREG(sb.st_mode) || S_ISDIR(sb.st_mode)) { + close(fd); + return (sb.st_size); + } + + if (!S_ISCHR(sb.st_mode) && !S_ISBLK(sb.st_mode)) + errx(EX_DATAERR, + "invalid type of the file " + "(not regular, directory nor special device): %s", + path); + + if (ioctl(fd, DIOCGMEDIASIZE, &mediasize) < 0) + err(EX_UNAVAILABLE, + "ioctl(DIOCGMEDIASIZE) failed, probably not a disk: " + "%s", path); + + close(fd); + return (mediasize); +} + +static int +trim(const char *path, off_t offset, off_t length, bool dryrun, bool verbose) +{ + off_t arg[2]; + int error, fd; + + if (length == 0) + length = getsize(path); + + if (verbose) + printf("trim %s offset %ju length %ju\n", + path, (uintmax_t)offset, (uintmax_t)length); + + if (dryrun) { + printf("dry run: add -f to actually perform the operation\n"); + return (0); + } + + fd = opendev(path, O_WRONLY | O_DIRECT); + arg[0] = offset; + arg[1] = length; + + error = ioctl(fd, DIOCGDELETE, arg); + if (error < 0) + warn("ioctl(DIOCGDELETE) failed: %s", path); + + close(fd); + return (error); +} + +static void +usage(const char *name) +{ + (void)fprintf(stderr, + "usage: %s [-[lo] offset[K|k|M|m|G|g|T|t]] [-r rfile] [-Nfqv] device ...\n", + name); + exit(EX_USAGE); +} From owner-svn-src-all@freebsd.org Thu Jan 17 18:51:57 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 3F51A14A10DA; Thu, 17 Jan 2019 18: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 D406975BE3; Thu, 17 Jan 2019 18:51:56 +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 BC7791E5AC; Thu, 17 Jan 2019 18:51:56 +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 x0HIpuqG094283; Thu, 17 Jan 2019 18:51:56 GMT (envelope-from kevans@FreeBSD.org) Received: (from kevans@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x0HIpucZ094282; Thu, 17 Jan 2019 18:51:56 GMT (envelope-from kevans@FreeBSD.org) Message-Id: <201901171851.x0HIpucZ094282@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kevans set sender to kevans@FreeBSD.org using -f From: Kyle Evans Date: Thu, 17 Jan 2019 18:51:56 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r343119 - head/sys/arm/allwinner X-SVN-Group: head X-SVN-Commit-Author: kevans X-SVN-Commit-Paths: head/sys/arm/allwinner X-SVN-Commit-Revision: 343119 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: D406975BE3 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.98 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_SHORT(-0.98)[-0.978,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_LONG(-1.00)[-0.999,0] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 17 Jan 2019 18:51:57 -0000 Author: kevans Date: Thu Jan 17 18:51:56 2019 New Revision: 343119 URL: https://svnweb.freebsd.org/changeset/base/343119 Log: Revert r343095 This was intended to fix the soft reset timeout on boot for OrangePi One/R1 with internal PHY, but seems to cause other problems later on due to soft resetting around some state changes that may or may not make the NIC non-functional. Reverting this for now while a better solution is sought out. Modified: head/sys/arm/allwinner/if_awg.c Modified: head/sys/arm/allwinner/if_awg.c ============================================================================== --- head/sys/arm/allwinner/if_awg.c Thu Jan 17 18:07:59 2019 (r343118) +++ head/sys/arm/allwinner/if_awg.c Thu Jan 17 18:51:56 2019 (r343119) @@ -750,31 +750,6 @@ awg_disable_intr(struct awg_softc *sc) WR4(sc, EMAC_INT_EN, 0); } -static int -awg_reset(struct awg_softc *sc) -{ - int retry; - - /* Soft reset all registers and logic */ - WR4(sc, EMAC_BASIC_CTL_1, BASIC_CTL_SOFT_RST); - - /* Wait for soft reset bit to self-clear */ - for (retry = SOFT_RST_RETRY; retry > 0; retry--) { - if ((RD4(sc, EMAC_BASIC_CTL_1) & BASIC_CTL_SOFT_RST) == 0) - break; - DELAY(10); - } - if (retry == 0) { - device_printf(sc->dev, "soft reset timed out\n"); -#ifdef AWG_DEBUG - awg_dump_regs(sc->dev); -#endif - return (ETIMEDOUT); - } - - return (0); -} - static void awg_init_locked(struct awg_softc *sc) { @@ -790,12 +765,6 @@ awg_init_locked(struct awg_softc *sc) if (if_getdrvflags(ifp) & IFF_DRV_RUNNING) return; - awg_reset(sc); - - /* Write transmit and receive descriptor base address registers */ - WR4(sc, EMAC_TX_DMA_LIST, sc->tx.desc_ring_paddr); - WR4(sc, EMAC_RX_DMA_LIST, sc->rx.desc_ring_paddr); - awg_setup_rxfilter(sc); /* Configure DMA burst length and priorities */ @@ -1684,6 +1653,40 @@ awg_phy_reset(device_t dev) return (0); } +static int +awg_reset(device_t dev) +{ + struct awg_softc *sc; + int retry; + + sc = device_get_softc(dev); + + /* Reset PHY if necessary */ + if (awg_phy_reset(dev) != 0) { + device_printf(dev, "failed to reset PHY\n"); + return (ENXIO); + } + + /* Soft reset all registers and logic */ + WR4(sc, EMAC_BASIC_CTL_1, BASIC_CTL_SOFT_RST); + + /* Wait for soft reset bit to self-clear */ + for (retry = SOFT_RST_RETRY; retry > 0; retry--) { + if ((RD4(sc, EMAC_BASIC_CTL_1) & BASIC_CTL_SOFT_RST) == 0) + break; + DELAY(10); + } + if (retry == 0) { + device_printf(dev, "soft reset timed out\n"); +#ifdef AWG_DEBUG + awg_dump_regs(dev); +#endif + return (ETIMEDOUT); + } + + return (0); +} + static void awg_dmamap_cb(void *arg, bus_dma_segment_t *segs, int nseg, int error) { @@ -1837,6 +1840,10 @@ awg_setup_dma(device_t dev) bus_dmamap_sync(sc->rx.desc_tag, sc->rx.desc_map, BUS_DMASYNC_PREWRITE); + /* Write transmit and receive descriptor base address registers */ + WR4(sc, EMAC_TX_DMA_LIST, sc->tx.desc_ring_paddr); + WR4(sc, EMAC_RX_DMA_LIST, sc->rx.desc_ring_paddr); + return (0); } @@ -1881,12 +1888,10 @@ awg_attach(device_t dev) /* Read MAC address before resetting the chip */ awg_get_eaddr(dev, eaddr); - /* Reset PHY if necessary */ - error = awg_phy_reset(dev); - if (error != 0) { - device_printf(dev, "failed to reset PHY\n"); + /* Soft reset EMAC core */ + error = awg_reset(dev); + if (error != 0) return (error); - } /* Setup DMA descriptors */ error = awg_setup_dma(dev); From owner-svn-src-all@freebsd.org Thu Jan 17 19:14:04 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 1CAA914A1E1A; Thu, 17 Jan 2019 19:14:04 +0000 (UTC) (envelope-from mckusick@mckusick.com) Received: from chez.mckusick.com (chez.mckusick.com [70.36.157.235]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id D8BA776984; Thu, 17 Jan 2019 19:14:02 +0000 (UTC) (envelope-from mckusick@mckusick.com) Received: from chez.mckusick.com (localhost [IPv6:::1]) by chez.mckusick.com (8.15.2/8.15.2) with ESMTP id x0HJMYaq029738; Thu, 17 Jan 2019 11:22:34 -0800 (PST) (envelope-from mckusick@mckusick.com) Message-Id: <201901171922.x0HJMYaq029738@chez.mckusick.com> From: Kirk McKusick To: Andriy Gapon Subject: Re: svn commit: r343113 - head/contrib/libc++/include cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-URL: http://WWW.McKusick.COM/ Reply-To: Kirk McKusick In-reply-to: <99fd64c3-b3b3-fd50-6370-224a329a3340@FreeBSD.org> Comments: In-reply-to Andriy Gapon message dated "Thu, 17 Jan 2019 19:05:20 +0200." MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <29736.1547752954.1@chez.mckusick.com> Date: Thu, 17 Jan 2019 11:22:34 -0800 X-Spam-Status: No, score=-1.4 required=5.0 tests=BAYES_00,MISSING_MID, UNPARSEABLE_RELAY autolearn=no autolearn_force=no version=3.4.1 X-Spam-Checker-Version: SpamAssassin 3.4.1 (2015-04-28) on chez.mckusick.com X-Rspamd-Queue-Id: D8BA776984 X-Spamd-Bar: ------ Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-6.94 / 15.00]; NEURAL_HAM_MEDIUM(-1.00)[-1.000,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; REPLY(-4.00)[]; NEURAL_HAM_SHORT(-0.94)[-0.945,0] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 17 Jan 2019 19:14:04 -0000 > From: Andriy Gapon > Date: Thu, 17 Jan 2019 19:05:20 +0200 > To: Kirk McKusick , src-committers@freebsd.org, > svn-src-all@freebsd.org, svn-src-head@freebsd.org > Subject: Re: svn commit: r343113 - head/contrib/libc++/include > > On 17/01/2019 17:35, Kirk McKusick wrote: >> -#ifdef ELAST >> +#if defined(ELAST) > > I think that these are exactly the same, so not sure what the change does. > > -- > Andriy Gapon It was suggested to me that Clang was 'strict' and that it would kick out the first form. That proved to not be true. To compound my goof, I missed the actual fix when I did the commit, so had to do -r343115 to get the needed part of the fix in place. I should learn to have my morning coffee *before* commiting anything. Kirk McKusick From owner-svn-src-all@freebsd.org Thu Jan 17 19:44:48 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 9296D14A455D; Thu, 17 Jan 2019 19:44:48 +0000 (UTC) (envelope-from cem@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 3341280B3F; Thu, 17 Jan 2019 19:44:48 +0000 (UTC) (envelope-from cem@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 2557C1EEE4; Thu, 17 Jan 2019 19:44:48 +0000 (UTC) (envelope-from cem@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x0HJim3e023237; Thu, 17 Jan 2019 19:44:48 GMT (envelope-from cem@FreeBSD.org) Received: (from cem@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x0HJilaa023236; Thu, 17 Jan 2019 19:44:47 GMT (envelope-from cem@FreeBSD.org) Message-Id: <201901171944.x0HJilaa023236@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: cem set sender to cem@FreeBSD.org using -f From: Conrad Meyer Date: Thu, 17 Jan 2019 19:44:47 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r343120 - in head/sys/x86: include x86 X-SVN-Group: head X-SVN-Commit-Author: cem X-SVN-Commit-Paths: in head/sys/x86: include x86 X-SVN-Commit-Revision: 343120 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 3341280B3F X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.96 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_LONG(-1.00)[-0.999,0]; NEURAL_HAM_SHORT(-0.96)[-0.965,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 17 Jan 2019 19:44:48 -0000 Author: cem Date: Thu Jan 17 19:44:47 2019 New Revision: 343120 URL: https://svnweb.freebsd.org/changeset/base/343120 Log: Add definitions for AMD Spectre/Meltdown CPUID information No functional change, aside from printing recognized bits in CPU identification. The bits are documented in 111006-B "Indirect Branch Control Extension"[1] and 124441 "Speculative Store Bypass Disable."[2] Notably missing (left as future work): * Integration with hw.spec_store_bypass_disable and hw_ssb_active flag, which are currently Intel-specific * Integration with hw_ibrs_active global flag, which are currently Intel-specific * SSB_NO integration in hw_ssb_recalculate() * Bhyve integration (PR 235010) [1]: https://developer.amd.com/wp-content/resources/111006-B_AMD64TechnologyIndirectBranchControlExtenstion_WP_7-18Update_FNL.pdf [2]: https://developer.amd.com/wp-content/resources/124441_AMD64_SpeculativeStoreBypassDisable_Whitepaper_final.pdf PR: 235010 (related, but does not fix) MFC after: a week Modified: head/sys/x86/include/specialreg.h head/sys/x86/x86/identcpu.c Modified: head/sys/x86/include/specialreg.h ============================================================================== --- head/sys/x86/include/specialreg.h Thu Jan 17 18:51:56 2019 (r343119) +++ head/sys/x86/include/specialreg.h Thu Jan 17 19:44:47 2019 (r343120) @@ -374,6 +374,17 @@ #define AMDFEID_CLZERO 0x00000001 #define AMDFEID_IRPERF 0x00000002 #define AMDFEID_XSAVEERPTR 0x00000004 +#define AMDFEID_IBPB 0x00001000 +#define AMDFEID_IBRS 0x00004000 +#define AMDFEID_STIBP 0x00008000 +/* The below are only defined if the corresponding base feature above exists. */ +#define AMDFEID_IBRS_ALWAYSON 0x00010000 +#define AMDFEID_STIBP_ALWAYSON 0x00020000 +#define AMDFEID_PREFER_IBRS 0x00040000 +#define AMDFEID_SSBD 0x01000000 +/* SSBD via MSRC001_011F instead of MSR 0x48: */ +#define AMDFEID_VIRT_SSBD 0x02000000 +#define AMDFEID_SSB_NO 0x04000000 /* * AMD extended function 8000_0008h ecx info @@ -719,6 +730,10 @@ /* * IA32_SPEC_CTRL and IA32_PRED_CMD MSRs are described in the Intel' * document 336996-001 Speculative Execution Side Channel Mitigations. + * + * AMD uses the same MSRs and bit definitions, as described in 111006-B + * "Indirect Branch Control Extension" and 124441 "Speculative Store Bypass + * Disable." */ /* MSR IA32_SPEC_CTRL */ #define IA32_SPEC_CTRL_IBRS 0x00000001 Modified: head/sys/x86/x86/identcpu.c ============================================================================== --- head/sys/x86/x86/identcpu.c Thu Jan 17 18:51:56 2019 (r343119) +++ head/sys/x86/x86/identcpu.c Thu Jan 17 19:44:47 2019 (r343120) @@ -1021,13 +1021,34 @@ printcpuinfo(void) } if (amd_extended_feature_extensions != 0) { + u_int amd_fe_masked; + + amd_fe_masked = amd_extended_feature_extensions; + if ((amd_fe_masked & AMDFEID_IBRS) == 0) + amd_fe_masked &= + ~(AMDFEID_IBRS_ALWAYSON | + AMDFEID_PREFER_IBRS); + if ((amd_fe_masked & AMDFEID_STIBP) == 0) + amd_fe_masked &= + ~AMDFEID_STIBP_ALWAYSON; + printf("\n " "AMD Extended Feature Extensions ID EBX=" - "0x%b", amd_extended_feature_extensions, + "0x%b", amd_fe_masked, "\020" "\001CLZERO" "\002IRPerf" - "\003XSaveErPtr"); + "\003XSaveErPtr" + "\015IBPB" + "\017IBRS" + "\020STIBP" + "\021IBRS_ALWAYSON" + "\022STIBP_ALWAYSON" + "\023PREFER_IBRS" + "\031SSBD" + "\032VIRT_SSBD" + "\033SSB_NO" + ); } if (via_feature_rng != 0 || via_feature_xcrypt != 0) From owner-svn-src-all@freebsd.org Thu Jan 17 20:01:07 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id C5D8C14A4DC7; Thu, 17 Jan 2019 20:01:07 +0000 (UTC) (envelope-from trasz@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 657C281882; Thu, 17 Jan 2019 20:01:07 +0000 (UTC) (envelope-from trasz@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 556A91F105; Thu, 17 Jan 2019 20:01:07 +0000 (UTC) (envelope-from trasz@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x0HK17Vl030529; Thu, 17 Jan 2019 20:01:07 GMT (envelope-from trasz@FreeBSD.org) Received: (from trasz@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x0HK17GI030507; Thu, 17 Jan 2019 20:01:07 GMT (envelope-from trasz@FreeBSD.org) Message-Id: <201901172001.x0HK17GI030507@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: trasz set sender to trasz@FreeBSD.org using -f From: Edward Tomasz Napierala Date: Thu, 17 Jan 2019 20:01:07 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r343121 - head/usr.sbin/nscd X-SVN-Group: head X-SVN-Commit-Author: trasz X-SVN-Commit-Paths: head/usr.sbin/nscd X-SVN-Commit-Revision: 343121 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 657C281882 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.96 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_SHORT(-0.96)[-0.963,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_LONG(-1.00)[-0.999,0] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 17 Jan 2019 20:01:07 -0000 Author: trasz Date: Thu Jan 17 20:01:06 2019 New Revision: 343121 URL: https://svnweb.freebsd.org/changeset/base/343121 Log: Workaround for nscd(8) failure with large entries. It fixes a case where eg a 2KB group entry would take several seconds to complete with cache enabled in nsswitch.conf. MFC after: 2 weeks Sponsored by: Chalmers University of Technology Differential Revision: https://reviews.freebsd.org/D18392 Modified: head/usr.sbin/nscd/nscd.c Modified: head/usr.sbin/nscd/nscd.c ============================================================================== --- head/usr.sbin/nscd/nscd.c Thu Jan 17 19:44:47 2019 (r343120) +++ head/usr.sbin/nscd/nscd.c Thu Jan 17 20:01:06 2019 (r343121) @@ -405,6 +405,12 @@ process_socket_event(struct kevent *event_data, struct * process_socket_event). */ if (qstate->kevent_watermark > MAX_SOCKET_IO_SIZE) { +#if 0 + /* + * XXX: Uncommenting this code makes nscd(8) fail for + * entries larger than a few kB, causing few second + * worth of delay for each call to retrieve them. + */ if (qstate->io_buffer != NULL) free(qstate->io_buffer); @@ -421,6 +427,7 @@ process_socket_event(struct kevent *event_data, struct if (qstate->kevent_filter == EVFILT_READ) qstate->use_alternate_io = 1; +#endif qstate->io_buffer_watermark = MAX_SOCKET_IO_SIZE; EV_SET(&eventlist[1], event_data->ident, From owner-svn-src-all@freebsd.org Thu Jan 17 20:22:38 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id D201514A570C; Thu, 17 Jan 2019 20:22:37 +0000 (UTC) (envelope-from cy.schubert@cschubert.com) Received: from smtp-out-no.shaw.ca (smtp-out-no.shaw.ca [64.59.134.12]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "Client", Issuer "CA" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 70BB982744; Thu, 17 Jan 2019 20:22:36 +0000 (UTC) (envelope-from cy.schubert@cschubert.com) Received: from spqr.komquats.com ([70.67.125.17]) by shaw.ca with ESMTPA id kEBFg7s8vMRX3kEBGgn8vn; Thu, 17 Jan 2019 13:22:28 -0700 X-Authority-Analysis: v=2.3 cv=TL87tGta c=1 sm=1 tr=0 a=VFtTW3WuZNDh6VkGe7fA3g==:117 a=VFtTW3WuZNDh6VkGe7fA3g==:17 a=kj9zAlcOel0A:10 a=3JhidrIBZZsA:10 a=6I5d2MoRAAAA:8 a=YxBL1-UpAAAA:8 a=sMp5GC8IKM9tDUOlDx8A:9 a=CjuIK1q_8ugA:10 a=IjZwj45LgO3ly-622nXo:22 a=Ia-lj3WSrqcvXOmTRaiG:22 Received: from slippy.cwsent.com (slippy8 [10.2.2.6]) by spqr.komquats.com (Postfix) with ESMTPS id 218272D5A; Thu, 17 Jan 2019 12:22:41 -0800 (PST) Received: from slippy.cwsent.com (localhost [127.0.0.1]) by slippy.cwsent.com (8.15.2/8.15.2) with ESMTP id x0HKMNKc062563; Thu, 17 Jan 2019 12:22:23 -0800 (PST) (envelope-from Cy.Schubert@cschubert.com) Received: from slippy (cy@localhost) by slippy.cwsent.com (8.15.2/8.15.2/Submit) with ESMTP id x0HKMN2Z062553; Thu, 17 Jan 2019 12:22:23 -0800 (PST) (envelope-from Cy.Schubert@cschubert.com) Message-Id: <201901172022.x0HKMN2Z062553@slippy.cwsent.com> X-Authentication-Warning: slippy.cwsent.com: cy owned process doing -bs X-Mailer: exmh version 2.8.0 04/21/2012 with nmh-1.7.1 Reply-to: Cy Schubert From: Cy Schubert X-os: FreeBSD X-Sender: cy@cwsent.com X-URL: http://www.cschubert.com/ To: Eugene Grosbein cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r343118 - in head/usr.sbin: . trim In-Reply-To: Message from Eugene Grosbein of "Thu, 17 Jan 2019 18:08:00 +0000." <201901171808.x0HI80jC068564@repo.freebsd.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Date: Thu, 17 Jan 2019 12:22:23 -0800 X-CMAE-Envelope: MS4wfJw+b7MPLX8MThg0WeBOl02j4JxK+ZW+2s9Dx0MNiC1NJvbRiI5906dw7mLxHh0V4HsXUHzM/I5qwZMRZkCKziyUFBfnFL6ZOLx4TKOT4iIl+gcXNv4D 5hPsrUO4dpvP6lNlIKWUFtpOP6FgqgsTvLUKVwty40y4DvPP4hJpfUkoM8haLJQf83DVuS4jnlVJzqMHXNR/erqSnVG1CUKQrvrrC1EJ0Tml0Or8ChqCHIAU pNA25sh05wvrapuUrPFSYNQW/4j6PBntbYcB1YHnsWuofnDo7OVOKdIaHmhK2hYb X-Rspamd-Queue-Id: 70BB982744 X-Spamd-Bar: ---- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-4.51 / 15.00]; ARC_NA(0.00)[]; RCVD_VIA_SMTP_AUTH(0.00)[]; RCVD_COUNT_FIVE(0.00)[5]; RECEIVED_SPAMHAUS_PBL(0.00)[17.125.67.70.zen.spamhaus.org : 127.0.0.11]; FROM_HAS_DN(0.00)[]; RCPT_COUNT_THREE(0.00)[4]; MV_CASE(0.50)[]; TO_MATCH_ENVRCPT_ALL(0.00)[]; MIME_GOOD(-0.10)[text/plain]; HAS_XAW(0.00)[]; HAS_REPLYTO(0.00)[Cy.Schubert@cschubert.com]; TO_DN_SOME(0.00)[]; REPLYTO_EQ_FROM(0.00)[]; IP_SCORE(-1.87)[ip: (-5.07), ipnet: 64.59.128.0/20(-2.38), asn: 6327(-1.84), country: CA(-0.09)]; MX_GOOD(-0.01)[cached: spqr.komquats.com]; NEURAL_HAM_SHORT(-0.93)[-0.925,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; NEURAL_HAM_MEDIUM(-1.00)[-1.000,0]; R_SPF_NA(0.00)[]; FROM_EQ_ENVFROM(0.00)[]; R_DKIM_NA(0.00)[]; MIME_TRACE(0.00)[0:+]; ASN(0.00)[asn:6327, ipnet:64.59.128.0/20, country:CA]; RCVD_TLS_LAST(0.00)[]; RCVD_IN_DNSWL_LOW(-0.10)[12.134.59.64.list.dnswl.org : 127.0.5.1] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 17 Jan 2019 20:22:38 -0000 In message <201901171808.x0HI80jC068564@repo.freebsd.org>, Eugene Grosbein writ es: > Author: eugen > Date: Thu Jan 17 18:07:59 2019 > New Revision: 343118 > URL: https://svnweb.freebsd.org/changeset/base/343118 > > Log: > Re-add new small tool trim(8) to delete contents for blocks > on devices using wear-leveling algorithms as a few weeks passed > after review and discussion of trim(8) ceased and > we still have no utility to perform the job. > > Reviewed by: hackers@ > MFC after: 2 weeks > > Added: > head/usr.sbin/trim/ > head/usr.sbin/trim/Makefile (contents, props changed) > head/usr.sbin/trim/trim.8 (contents, props changed) > head/usr.sbin/trim/trim.c (contents, props changed) > Modified: > head/usr.sbin/Makefile > This is wrong. IIRC there was discussion that this should be in dd(1). Why not submit a revision to add the functionality to dd? -- Cheers, Cy Schubert FreeBSD UNIX: Web: http://www.FreeBSD.org The need of the many outweighs the greed of the few. From owner-svn-src-all@freebsd.org Thu Jan 17 20:23:31 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 11CB614A574B; Thu, 17 Jan 2019 20:23:31 +0000 (UTC) (envelope-from cse.cem@gmail.com) Received: from mail-io1-f43.google.com (mail-io1-f43.google.com [209.85.166.43]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id A10158288A; Thu, 17 Jan 2019 20:23:30 +0000 (UTC) (envelope-from cse.cem@gmail.com) Received: by mail-io1-f43.google.com with SMTP id k2so8891728iog.7; Thu, 17 Jan 2019 12:23:30 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:reply-to :from:date:message-id:subject:to:cc; bh=TDR5HjotlZVa0sGWU+Ukmj2szL1Gg9Yp7K8DE/Myt2I=; b=DuIOFU0izcj4jnzxeBoBp2ZLfjGbxL25lbE4cdPRZlCB4wg0KqazIvN8f6ipoBUvlK ers/JmJLdrdiihSZWbZklL6hOvbnF1uaGtONH1xPdUjG7U3pAWxGoJ8qu6G3jNloyA4a YN0soBFHD6XYgNV1qA0tpsdkvEcQb4Or9OIGtIs+fiQaQI8rwmo5qSbQzmH5fpttADnI CmLOpFIfd6XBk7AIlsJbA8z9cDaqu1T/732fAIiSqfGJA+sPlWYnPGwIhKlEXzgiX2Mf 7VJJUF1jwuqipxQfHpkGRVTTrpxj/7xYAjsjDslvcmQdRbLzUr7lo8VE1185ZQGBofz7 VyTQ== X-Gm-Message-State: AJcUukdmMS4Th11SIg9kGPRq1vKNiSGX5gregehu36Ay6ZP9kJ6lxY64 ND8nt5fZmKATfKXduLq9OGCVf/5y X-Google-Smtp-Source: ALg8bN5w7ksAYH29gmtvAkvWm6Ll1njWAfmcpT1dibSGB8kijlLQyVvqihqxPoe0gsviAFA0OpxNOQ== X-Received: by 2002:a5e:8817:: with SMTP id l23mr7930263ioj.272.1547756603596; Thu, 17 Jan 2019 12:23:23 -0800 (PST) Received: from mail-it1-f182.google.com (mail-it1-f182.google.com. [209.85.166.182]) by smtp.gmail.com with ESMTPSA id e22sm913976iod.47.2019.01.17.12.23.23 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 17 Jan 2019 12:23:23 -0800 (PST) Received: by mail-it1-f182.google.com with SMTP id g76so3496235itg.2; Thu, 17 Jan 2019 12:23:23 -0800 (PST) X-Received: by 2002:a02:a791:: with SMTP id e17mr9672631jaj.104.1547756603121; Thu, 17 Jan 2019 12:23:23 -0800 (PST) MIME-Version: 1.0 References: <201901171808.x0HI80jC068564@repo.freebsd.org> In-Reply-To: <201901171808.x0HI80jC068564@repo.freebsd.org> Reply-To: cem@freebsd.org From: Conrad Meyer Date: Thu, 17 Jan 2019 12:23:12 -0800 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: svn commit: r343118 - in head/usr.sbin: . trim To: Eugene Grosbein Cc: src-committers , svn-src-all@freebsd.org, svn-src-head@freebsd.org Content-Type: text/plain; charset="UTF-8" X-Rspamd-Queue-Id: A10158288A X-Spamd-Bar: ------ Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-6.96 / 15.00]; NEURAL_HAM_MEDIUM(-1.00)[-1.000,0]; NEURAL_HAM_SHORT(-0.96)[-0.965,0]; REPLY(-4.00)[]; TAGGED_FROM(0.00)[]; NEURAL_HAM_LONG(-1.00)[-1.000,0] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 17 Jan 2019 20:23:31 -0000 Please back it out; stop attributing code review to "hackers@," which can not (it's a list, not individuals) and did not review this changeset; and put it on phabricator for actual review. I think summary backout is warranted on the basis of your handling of this last time around and lack of attempt to solicit review for this time. On Thu, Jan 17, 2019 at 10:08 AM Eugene Grosbein wrote: > > Author: eugen > Date: Thu Jan 17 18:07:59 2019 > New Revision: 343118 > URL: https://svnweb.freebsd.org/changeset/base/343118 > > Log: > Re-add new small tool trim(8) to delete contents for blocks > on devices using wear-leveling algorithms as a few weeks passed > after review and discussion of trim(8) ceased and > we still have no utility to perform the job. > > Reviewed by: hackers@ > MFC after: 2 weeks > > Added: > head/usr.sbin/trim/ > head/usr.sbin/trim/Makefile (contents, props changed) > head/usr.sbin/trim/trim.8 (contents, props changed) > head/usr.sbin/trim/trim.c (contents, props changed) > Modified: > head/usr.sbin/Makefile > > Modified: head/usr.sbin/Makefile > ============================================================================== > --- head/usr.sbin/Makefile Thu Jan 17 17:36:18 2019 (r343117) > +++ head/usr.sbin/Makefile Thu Jan 17 18:07:59 2019 (r343118) > @@ -92,6 +92,7 @@ SUBDIR= adduser \ > tcpdrop \ > tcpdump \ > traceroute \ > + trim \ > trpt \ > tzsetup \ > ugidfw \ > > Added: head/usr.sbin/trim/Makefile > ============================================================================== > --- /dev/null 00:00:00 1970 (empty, because file is newly added) > +++ head/usr.sbin/trim/Makefile Thu Jan 17 18:07:59 2019 (r343118) > @@ -0,0 +1,8 @@ > +# $FreeBSD$ > + > +PROG= trim > +MAN= trim.8 > +LIBADD= util > +LDFLAGS= -lutil > + > +.include > > Added: head/usr.sbin/trim/trim.8 > ============================================================================== > --- /dev/null 00:00:00 1970 (empty, because file is newly added) > +++ head/usr.sbin/trim/trim.8 Thu Jan 17 18:07:59 2019 (r343118) > @@ -0,0 +1,167 @@ > +.\" > +.\" Copyright (c) 2019 Eugene Grosbein . > +.\" All rights reserved. > +.\" > +.\" Redistribution and use in source and binary forms, with or without > +.\" modification, are permitted provided that the following conditions > +.\" are met: > +.\" 1. Redistributions of source code must retain the above copyright > +.\" notice, this list of conditions and the following disclaimer. > +.\" 2. Redistributions in binary form must reproduce the above copyright > +.\" notice, this list of conditions and the following disclaimer in the > +.\" documentation and/or other materials provided with the distribution. > +.\" > +.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND > +.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE > +.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE > +.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE > +.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL > +.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS > +.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) > +.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT > +.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY > +.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF > +.\" SUCH DAMAGE. > +.\" > +.\" $FreeBSD$ > +.\" > +.Dd January 18, 2019 > +.Dt TRIM 8 > +.Os > +.Sh NAME > +.Nm trim > +.Nd erase device blocks that have no needed contents > +.Sh SYNOPSIS > +.Nm > +.Op Fl Nfqv > +.Fl [ [lo] Xo > +.Bk -words > +.Sm off > +.Ar offset > +.Op Cm K | k | M | m | G | g | T | t ] > +.Sm on > +.Xc > +.Ek > +.Bk -words > +.Op Fl r Ar rfile > +.Ek > +.Ar device ... > +.Sh DESCRIPTION > +The > +.Nm > +utility erases specified region of the device. > +It is mostly relevant for storage that implement trim (like flash based, > +or thinly provisioned storage). > +.Sy All erased data is lost. > +.Pp > +The following options are available: > +.Bl -tag -width indent > +.It Fl N > +Do not actually erase anything but show what it would do (dry run). > +Implies > +.Fl v . > +This is the default. Overrides > +.Fl f . > +.It Fl f > +Perform the operation. Overrides > +.Fl N . > +.It Fl l Xo > +.Sm off > +.Ar offset > +.Op Cm K | k | M | m | G | g | T | t > +.Sm on > +.Xc > +.It Fl o Xo > +.Sm off > +.Ar offset > +.Op Cm K | k | M | m | G | g | T | t > +.Sm on > +.Xc > +Specify the length > +.Fl l > +of the region to trim or its offset > +.Fl o > +from the beginning of the device. > +.Sy The whole device is erased by default > +unless one or both of these options are presented. > +.Pp > +The argument may be suffixed with one of > +.Cm K , > +.Cm M , > +.Cm G > +or > +.Cm T > +(either upper or lower case) to indicate a multiple of > +Kilobytes, Megabytes, Gigabytes or Terabytes > +respectively. > +.It Fl q > +Do not output anything except of possible error messages (quiet mode). > +Overrides > +.Fl v . > +.It Fl r Ar rfile > +Uses the length of given > +.Ar rfile > +as length of the region to erase. > +.Sy The whole device is erased by default. > +.It Fl v > +Show offset and length of actual region being erased, in bytes. > +.El > +.Pp > +Later options override previous ones. > +.Pp > +Note that actual success of the operation depends of underlying > +device driver such as > +.Xr ada 4 , > +.Xr da 4 > +and others. > +Refer to corresponding manual pages for detail on possible caveats > +in low level support for ATA TRIM or SCSI UNMAP commands. > +.Sh EXIT STATUS > +.Ex -std > +If the final erase operation fails for an argument, the > +.Nm > +utility returns exit code 1. > +It can also return one of the exit codes defined in > +.Xr sysexits 3 , > +as follows: > +.Bl -tag -width ".Dv EX_UNAVAILABLE" > +.It Dv EX_USAGE > +The specified offset or length of the region is incorrect. > +.It Dv EX_OSERR > +There is no enough memory to proceed. > +.It Dv EX_NOINPUT > +The specified > +.Ar rfile > +cannot be opened (perhaps, it does not exist). > +.It Dv EX_IOERR > +The specified > +.Ar rfile > +cannot be examined for its size due to some system input/output error. > +.It Dv EX_DATAERR > +The specified > +.Ar rfile > +is not regular file, directory nor special device, so its size > +cannot be examined. > +.It Dv EX_UNAVAILABLE > +The specified > +.Ar rfile > +is special device file not supporting DIOCGMEDIASIZE > +.Xr ioctl 2 > +(probably not a disk), so its size cannot be examined. > +.El > +.Sh SEE ALSO > +.Xr ada 4 , > +.Xr da 4 , > +.Xr ioctl 2 , > +.Xr nda 4 , > +.Xr sysexits 3 > +.Sh HISTORY > +The > +.Nm > +utility first appeared in > +.Fx 12.1 . > +.Sh AUTHORS > +The > +.Nm > +utility was written by > +.An Eugene Grosbein Aq Mt eugen@FreeBSD.org . > > Added: head/usr.sbin/trim/trim.c > ============================================================================== > --- /dev/null 00:00:00 1970 (empty, because file is newly added) > +++ head/usr.sbin/trim/trim.c Thu Jan 17 18:07:59 2019 (r343118) > @@ -0,0 +1,210 @@ > +/*- > + * SPDX-License-Identifier: BSD-2-Clause-FreeBSD > + * > + * Copyright (c) 2019 Eugene Grosbein . > + * All rights reserved. > + * > + * Redistribution and use in source and binary forms, with or without > + * modification, are permitted provided that the following conditions > + * are met: > + * 1. Redistributions of source code must retain the above copyright > + * notice, this list of conditions and the following disclaimer. > + * 2. Redistributions in binary form must reproduce the above copyright > + * notice, this list of conditions and the following disclaimer in the > + * documentation and/or other materials provided with the distribution. > + * > + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND > + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE > + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE > + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE > + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL > + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS > + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) > + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT > + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY > + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF > + * SUCH DAMAGE. > + * > + */ > + > +#include > +#include > +#include > + > +#include > +#include > +#include > +#include > +#include > +#include > +#include > +#include > +#include > +#include > +#include > + > +#include > +__FBSDID("$FreeBSD$"); > + > +static off_t getsize(const char *path); > +static int opendev(const char *path, int flags); > +static int trim(const char *path, off_t offset, off_t length, bool dryrun, bool verbose); > +static void usage(const char *name); > + > +int > +main(int argc, char **argv) > +{ > + off_t offset, length; > + uint64_t usz; > + int ch, error; > + bool dryrun, verbose; > + char *fname, *name; > + > + error = 0; > + length = offset = 0; > + name = argv[0]; > + dryrun = verbose = true; > + > + while ((ch = getopt(argc, argv, "Nfl:o:qr:v")) != -1) > + switch (ch) { > + case 'N': > + dryrun = true; > + verbose = true; > + break; > + case 'f': > + dryrun = false; > + break; > + case 'l': > + case 'o': > + if (expand_number(optarg, &usz) == -1 || > + (off_t)usz < 0 || (usz == 0 && ch == 'l')) > + errx(EX_USAGE, > + "invalid %s of the region: %s", > + ch == 'o' ? "offset" : "length", > + optarg); > + if (ch == 'o') > + offset = (off_t)usz; > + else > + length = (off_t)usz; > + break; > + case 'q': > + verbose = false; > + break; > + case 'r': > + if ((length = getsize(optarg)) == 0) > + errx(EX_USAGE, > + "invalid zero length reference file" > + " for the region: %s", optarg); > + break; > + case 'v': > + verbose = true; > + break; > + default: > + usage(name); > + /* NOTREACHED */ > + } > + > + argv += optind; > + argc -= optind; > + > + if (argc < 1) > + usage(name); > + > + while ((fname = *argv++) != NULL) > + if (trim(fname, offset, length, dryrun, verbose) < 0) > + error++; > + > + return (error ? EXIT_FAILURE : EXIT_SUCCESS); > +} > + > +static int > +opendev(const char *path, int flags) > +{ > + int fd; > + char *tstr; > + > + if ((fd = open(path, flags)) < 0) { > + if (errno == ENOENT && path[0] != '/') { > + if (asprintf(&tstr, "%s%s", _PATH_DEV, path) < 0) > + errx(EX_OSERR, "no memory"); > + fd = open(tstr, flags); > + free(tstr); > + } > + } > + > + if (fd < 0) > + err(EX_NOINPUT, "open failed: %s", path); > + > + return (fd); > +} > + > +static off_t > +getsize(const char *path) > +{ > + struct stat sb; > + off_t mediasize; > + int fd; > + > + fd = opendev(path, O_RDONLY | O_DIRECT); > + > + if (fstat(fd, &sb) < 0) > + err(EX_IOERR, "fstat failed: %s", path); > + > + if (S_ISREG(sb.st_mode) || S_ISDIR(sb.st_mode)) { > + close(fd); > + return (sb.st_size); > + } > + > + if (!S_ISCHR(sb.st_mode) && !S_ISBLK(sb.st_mode)) > + errx(EX_DATAERR, > + "invalid type of the file " > + "(not regular, directory nor special device): %s", > + path); > + > + if (ioctl(fd, DIOCGMEDIASIZE, &mediasize) < 0) > + err(EX_UNAVAILABLE, > + "ioctl(DIOCGMEDIASIZE) failed, probably not a disk: " > + "%s", path); > + > + close(fd); > + return (mediasize); > +} > + > +static int > +trim(const char *path, off_t offset, off_t length, bool dryrun, bool verbose) > +{ > + off_t arg[2]; > + int error, fd; > + > + if (length == 0) > + length = getsize(path); > + > + if (verbose) > + printf("trim %s offset %ju length %ju\n", > + path, (uintmax_t)offset, (uintmax_t)length); > + > + if (dryrun) { > + printf("dry run: add -f to actually perform the operation\n"); > + return (0); > + } > + > + fd = opendev(path, O_WRONLY | O_DIRECT); > + arg[0] = offset; > + arg[1] = length; > + > + error = ioctl(fd, DIOCGDELETE, arg); > + if (error < 0) > + warn("ioctl(DIOCGDELETE) failed: %s", path); > + > + close(fd); > + return (error); > +} > + > +static void > +usage(const char *name) > +{ > + (void)fprintf(stderr, > + "usage: %s [-[lo] offset[K|k|M|m|G|g|T|t]] [-r rfile] [-Nfqv] device ...\n", > + name); > + exit(EX_USAGE); > +} > From owner-svn-src-all@freebsd.org Thu Jan 17 20:47:07 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 2D7A214A6529; Thu, 17 Jan 2019 20:47:07 +0000 (UTC) (envelope-from cy.schubert@cschubert.com) Received: from smtp-out-no.shaw.ca (smtp-out-no.shaw.ca [64.59.134.13]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "Client", Issuer "CA" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id E8CC083861; Thu, 17 Jan 2019 20:47:05 +0000 (UTC) (envelope-from cy.schubert@cschubert.com) Received: from spqr.komquats.com ([70.67.125.17]) by shaw.ca with ESMTPA id kEYzg8581MRX3kEZ1gnFpu; Thu, 17 Jan 2019 13:46:59 -0700 X-Authority-Analysis: v=2.3 cv=TL87tGta c=1 sm=1 tr=0 a=VFtTW3WuZNDh6VkGe7fA3g==:117 a=VFtTW3WuZNDh6VkGe7fA3g==:17 a=kj9zAlcOel0A:10 a=3JhidrIBZZsA:10 a=xfDLHkLGAAAA:8 a=YxBL1-UpAAAA:8 a=6I5d2MoRAAAA:8 a=-PYHFkKkSge0k5BvVXoA:9 a=CjuIK1q_8ugA:10 a=UJ0tAi3fqDAA:10 a=IfaqVvZgccqrtc8gcwf2:22 a=Ia-lj3WSrqcvXOmTRaiG:22 a=IjZwj45LgO3ly-622nXo:22 Received: from slippy.cwsent.com (slippy8 [10.2.2.6]) by spqr.komquats.com (Postfix) with ESMTPS id 7FC692E68; Thu, 17 Jan 2019 12:47:14 -0800 (PST) Received: from slippy.cwsent.com (localhost [127.0.0.1]) by slippy.cwsent.com (8.15.2/8.15.2) with ESMTP id x0HKkvUH011505; Thu, 17 Jan 2019 12:46:57 -0800 (PST) (envelope-from Cy.Schubert@cschubert.com) Received: from slippy (cy@localhost) by slippy.cwsent.com (8.15.2/8.15.2/Submit) with ESMTP id x0HKkvWs011502; Thu, 17 Jan 2019 12:46:57 -0800 (PST) (envelope-from Cy.Schubert@cschubert.com) Message-Id: <201901172046.x0HKkvWs011502@slippy.cwsent.com> X-Authentication-Warning: slippy.cwsent.com: cy owned process doing -bs X-Mailer: exmh version 2.8.0 04/21/2012 with nmh-1.7.1 Reply-to: Cy Schubert From: Cy Schubert X-os: FreeBSD X-Sender: cy@cwsent.com X-URL: http://www.cschubert.com/ To: cem@freebsd.org cc: Cy Schubert , src-committers , svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r343118 - in head/usr.sbin: . trim In-Reply-To: Message from Conrad Meyer of "Thu, 17 Jan 2019 12:24:33 -0800." Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Date: Thu, 17 Jan 2019 12:46:57 -0800 X-CMAE-Envelope: MS4wfIXGrbhTrq3wOkRWBo/+3OdBTmFdvURdlBDCHQZPZ6rrFAv5/bmWjuolfDU1jmOoalq9PJUCfdXjfRDPMj7Pfji9J/BkM6aO0XzhlJh9GMKSmZEEoUvd kC3NV2cWEU/omNKt8gmRoqtNnNYy6/Lxxg092QVLBKGurRZNo0sMToF5P9s/vXrLjMp2H0voAmnwmFlokL5Oc7+lMRwRVCICcMTzqAqh1osFD1f1otGm97g3 xJPrHkO6pgFRgJIzJivJC5/d0PhQlq5C9xrQr4j5c+pDWbkUWVzLL+TPTj1sd1Ga X-Rspamd-Queue-Id: E8CC083861 X-Spamd-Bar: ---- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-4.67 / 15.00]; ARC_NA(0.00)[]; RCVD_VIA_SMTP_AUTH(0.00)[]; RCVD_COUNT_FIVE(0.00)[5]; RECEIVED_SPAMHAUS_PBL(0.00)[17.125.67.70.zen.spamhaus.org : 127.0.0.11]; FROM_HAS_DN(0.00)[]; TO_DN_SOME(0.00)[]; MV_CASE(0.50)[]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; MIME_GOOD(-0.10)[text/plain]; HAS_XAW(0.00)[]; HAS_REPLYTO(0.00)[Cy.Schubert@cschubert.com]; RCPT_COUNT_FIVE(0.00)[5]; REPLYTO_EQ_FROM(0.00)[]; TO_MATCH_ENVRCPT_SOME(0.00)[]; MX_GOOD(-0.01)[cached: spqr.komquats.com]; NEURAL_HAM_SHORT(-0.95)[-0.954,0]; NEURAL_HAM_MEDIUM(-1.00)[-1.000,0]; R_SPF_NA(0.00)[]; FROM_EQ_ENVFROM(0.00)[]; R_DKIM_NA(0.00)[]; MIME_TRACE(0.00)[0:+]; ASN(0.00)[asn:6327, ipnet:64.59.128.0/20, country:CA]; RCVD_TLS_LAST(0.00)[]; IP_SCORE(-2.01)[ip: (-5.76), ipnet: 64.59.128.0/20(-2.37), asn: 6327(-1.83), country: CA(-0.09)]; RCVD_IN_DNSWL_LOW(-0.10)[13.134.59.64.list.dnswl.org : 127.0.5.1] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 17 Jan 2019 20:47:07 -0000 In message , Conrad Meyer writes: > On Thu, Jan 17, 2019 at 12:22 PM Cy Schubert wrot > e: > > This is wrong. IIRC there was discussion that this should be in dd(1). > > Why not submit a revision to add the functionality to dd? > > Well, it's wrong, but not because we need another weird dd mode. dd > is hard enough to use already. I've never found dd confusing. What's wrong conv=erase? If it must stay, sderase is a better name. That's really what it does. Ports maybe? -- Cheers, Cy Schubert FreeBSD UNIX: Web: http://www.FreeBSD.org The need of the many outweighs the greed of the few. From owner-svn-src-all@freebsd.org Thu Jan 17 21:15:02 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id D952B14A729B; Thu, 17 Jan 2019 21:15:02 +0000 (UTC) (envelope-from eugen@freebsd.org) Received: from hz.grosbein.net (hz.grosbein.net [IPv6:2a01:4f8:d12:604::2]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "hz.grosbein.net", Issuer "hz.grosbein.net" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 6191784AD6; Thu, 17 Jan 2019 21:15:02 +0000 (UTC) (envelope-from eugen@freebsd.org) Received: from eg.sd.rdtc.ru (eg.sd.rdtc.ru [IPv6:2a03:3100:c:13:0:0:0:5]) by hz.grosbein.net (8.15.2/8.15.2) with ESMTPS id x0HLEk36079146 (version=TLSv1.2 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 17 Jan 2019 22:14:51 +0100 (CET) (envelope-from eugen@freebsd.org) X-Envelope-From: eugen@freebsd.org X-Envelope-To: Cy.Schubert@cschubert.com Received: from [10.58.0.4] ([10.58.0.4]) by eg.sd.rdtc.ru (8.15.2/8.15.2) with ESMTPS id x0HLEj7N060560 (version=TLSv1.2 cipher=DHE-RSA-AES128-SHA bits=128 verify=NOT); Fri, 18 Jan 2019 04:14:46 +0700 (+07) (envelope-from eugen@freebsd.org) Subject: Re: svn commit: r343118 - in head/usr.sbin: . trim To: Cy Schubert References: <201901172022.x0HKMN2Z062553@slippy.cwsent.com> Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org From: Eugene Grosbein Message-ID: <8f78a51b-51a6-08fd-7e49-dd00aaa54c6c@freebsd.org> Date: Fri, 18 Jan 2019 04:14:39 +0700 User-Agent: Mozilla/5.0 (Windows NT 6.3; WOW64; rv:45.0) Gecko/20100101 Thunderbird/45.8.0 MIME-Version: 1.0 In-Reply-To: <201901172022.x0HKMN2Z062553@slippy.cwsent.com> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-1.6 required=5.0 tests=BAYES_00,SPF_SOFTFAIL autolearn=no autolearn_force=no version=3.4.2 X-Spam-Report: * -2.3 BAYES_00 BODY: Bayes spam probability is 0 to 1% * [score: 0.0000] * 0.7 SPF_SOFTFAIL SPF: sender does not match SPF record (softfail) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on hz.grosbein.net X-Rspamd-Queue-Id: 6191784AD6 X-Spamd-Bar: ------ Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-6.99 / 15.00]; NEURAL_HAM_MEDIUM(-1.00)[-1.000,0]; NEURAL_HAM_SHORT(-0.99)[-0.993,0]; REPLY(-4.00)[]; NEURAL_HAM_LONG(-1.00)[-1.000,0] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 17 Jan 2019 21:15:03 -0000 18.01.2019 3:22, Cy Schubert wrote: > This is wrong. IIRC there was discussion that this should be in dd(1). > Why not submit a revision to add the functionality to dd? There is already https://reviews.freebsd.org/D18382 that had no code updates over 6 weeks and latest revision needs a fix as it is broken. Also, dd cannot be used to trim whole several devices with one invocation like "trim ada ada1 ada2". From owner-svn-src-all@freebsd.org Thu Jan 17 21:16:17 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id BB04A14A7380; Thu, 17 Jan 2019 21:16:17 +0000 (UTC) (envelope-from eugen@freebsd.org) Received: from hz.grosbein.net (hz.grosbein.net [IPv6:2a01:4f8:d12:604::2]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "hz.grosbein.net", Issuer "hz.grosbein.net" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 3E8C584C8B; Thu, 17 Jan 2019 21:16:17 +0000 (UTC) (envelope-from eugen@freebsd.org) Received: from eg.sd.rdtc.ru (eg.sd.rdtc.ru [IPv6:2a03:3100:c:13:0:0:0:5]) by hz.grosbein.net (8.15.2/8.15.2) with ESMTPS id x0HLGAA7079184 (version=TLSv1.2 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 17 Jan 2019 22:16:11 +0100 (CET) (envelope-from eugen@freebsd.org) X-Envelope-From: eugen@freebsd.org X-Envelope-To: cem@freebsd.org Received: from [10.58.0.4] ([10.58.0.4]) by eg.sd.rdtc.ru (8.15.2/8.15.2) with ESMTPS id x0HLG9ll060573 (version=TLSv1.2 cipher=DHE-RSA-AES128-SHA bits=128 verify=NOT); Fri, 18 Jan 2019 04:16:10 +0700 (+07) (envelope-from eugen@freebsd.org) Subject: Re: svn commit: r343118 - in head/usr.sbin: . trim To: cem@freebsd.org References: <201901171808.x0HI80jC068564@repo.freebsd.org> Cc: src-committers , svn-src-all@freebsd.org, svn-src-head@freebsd.org From: Eugene Grosbein Message-ID: <2d239dc0-915c-2d2b-0936-a40af5e9ead9@freebsd.org> Date: Fri, 18 Jan 2019 04:16:03 +0700 User-Agent: Mozilla/5.0 (Windows NT 6.3; WOW64; rv:45.0) Gecko/20100101 Thunderbird/45.8.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-1.6 required=5.0 tests=BAYES_00,SPF_SOFTFAIL autolearn=no autolearn_force=no version=3.4.2 X-Spam-Report: * -2.3 BAYES_00 BODY: Bayes spam probability is 0 to 1% * [score: 0.0000] * 0.7 SPF_SOFTFAIL SPF: sender does not match SPF record (softfail) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on hz.grosbein.net X-Rspamd-Queue-Id: 3E8C584C8B X-Spamd-Bar: ------ Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-7.00 / 15.00]; NEURAL_HAM_MEDIUM(-1.00)[-1.000,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; REPLY(-4.00)[]; NEURAL_HAM_SHORT(-1.00)[-0.997,0] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 17 Jan 2019 21:16:17 -0000 18.01.2019 3:23, Conrad Meyer пишет: > Please back it out; stop attributing code review to "hackers@," which > can not (it's a list, not individuals) and did not review this > changeset; and put it on phabricator for actual review. There is already https://reviews.freebsd.org/D18380 by imp and there were over 6 weeks since it had an update. Newly committed code has most of its changes. From owner-svn-src-all@freebsd.org Thu Jan 17 21:26:21 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 05EB614A7B03; Thu, 17 Jan 2019 21:26:21 +0000 (UTC) (envelope-from cse.cem@gmail.com) Received: from mail-io1-f53.google.com (mail-io1-f53.google.com [209.85.166.53]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 80610854C2; Thu, 17 Jan 2019 21:26:20 +0000 (UTC) (envelope-from cse.cem@gmail.com) Received: by mail-io1-f53.google.com with SMTP id f4so9072896ion.2; Thu, 17 Jan 2019 13:26:20 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:reply-to :from:date:message-id:subject:to:cc; bh=70WQDS+Uf8BrJNcn0lLkDaAEnlOi5kF1R1H9Dk0X+lE=; b=k/jhAKxZdMsnzvaAk7fwItWAywexSn3Mj3/FqC1CpuVNDF8vsAZleKskN7/Sbdcx9U JA59mZBy5N/z3gJBeX109rCQmJ3lvACcgMc8zqeFEnZwVVMItgkojsnJj98JjMKvFC3Q Xq3HAXRS430xEbZwHpv9jhAu0iUXFnTZ1XN6CiCtf++N5NaJ3qSK3QunsPlRywjbTrq+ x/01lG3NRN4R7TAqIlvfDFAXq9R2TiqDX1bz51zxbLwx9QlAnmT9I6qOJvArQCP36KuO kDfr9Y2BddB2y0FVA6JPRHik6Qy1T4wnrQKbmE83oFA2MFwY3zDpNVXWnmyHhZIWiafv bWyw== X-Gm-Message-State: AJcUukcErKx2Uhjlw/6GCBoAobcfWLDv/WaJ1l28BlZlXONEdGLuLeSA L09Qs5wB7dH0GC2G0hzq3vdeNNeC X-Google-Smtp-Source: ALg8bN71zBnpHYDewBN4dYPsq/qiO/mD49W/iaOikLsJszd9akL2ZhBqOY9BTjc6mL9NeN+e2bpliA== X-Received: by 2002:a5d:9405:: with SMTP id v5mr8971003ion.250.1547756684226; Thu, 17 Jan 2019 12:24:44 -0800 (PST) Received: from mail-it1-f170.google.com (mail-it1-f170.google.com. [209.85.166.170]) by smtp.gmail.com with ESMTPSA id n4sm963501iog.36.2019.01.17.12.24.44 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 17 Jan 2019 12:24:44 -0800 (PST) Received: by mail-it1-f170.google.com with SMTP id a6so2918373itl.4; Thu, 17 Jan 2019 12:24:44 -0800 (PST) X-Received: by 2002:a24:b64a:: with SMTP id d10mr9533778itj.149.1547756683927; Thu, 17 Jan 2019 12:24:43 -0800 (PST) MIME-Version: 1.0 References: <201901171808.x0HI80jC068564@repo.freebsd.org> <201901172022.x0HKMN2Z062553@slippy.cwsent.com> In-Reply-To: <201901172022.x0HKMN2Z062553@slippy.cwsent.com> Reply-To: cem@freebsd.org From: Conrad Meyer Date: Thu, 17 Jan 2019 12:24:33 -0800 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: svn commit: r343118 - in head/usr.sbin: . trim To: Cy Schubert Cc: src-committers , svn-src-all@freebsd.org, svn-src-head@freebsd.org Content-Type: text/plain; charset="UTF-8" X-Rspamd-Queue-Id: 80610854C2 X-Spamd-Bar: ------ Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-6.98 / 15.00]; NEURAL_HAM_MEDIUM(-1.00)[-1.000,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; REPLY(-4.00)[]; NEURAL_HAM_SHORT(-0.98)[-0.983,0]; TAGGED_FROM(0.00)[] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 17 Jan 2019 21:26:21 -0000 On Thu, Jan 17, 2019 at 12:22 PM Cy Schubert wrote: > This is wrong. IIRC there was discussion that this should be in dd(1). > Why not submit a revision to add the functionality to dd? Well, it's wrong, but not because we need another weird dd mode. dd is hard enough to use already. From owner-svn-src-all@freebsd.org Thu Jan 17 21:38:59 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id D351314A806A; Thu, 17 Jan 2019 21:38:58 +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 705A185C7E; Thu, 17 Jan 2019 21:38:58 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 5DE2C2029F; Thu, 17 Jan 2019 21:38:58 +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 x0HLcw7e082955; Thu, 17 Jan 2019 21:38:58 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x0HLcwBp082954; Thu, 17 Jan 2019 21:38:58 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <201901172138.x0HLcwBp082954@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Thu, 17 Jan 2019 21:38:58 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r343122 - head/usr.sbin/freebsd-update X-SVN-Group: head X-SVN-Commit-Author: emaste X-SVN-Commit-Paths: head/usr.sbin/freebsd-update X-SVN-Commit-Revision: 343122 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 705A185C7E X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.98 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_SHORT(-0.98)[-0.981,0]; NEURAL_HAM_LONG(-1.00)[-0.999,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 17 Jan 2019 21:38:59 -0000 Author: emaste Date: Thu Jan 17 21:38:57 2019 New Revision: 343122 URL: https://svnweb.freebsd.org/changeset/base/343122 Log: freebsd-update: Clarify unsupported release upgrade error message Notify users that upgrading from -CURRENT or -STABLE is unsupported by freebsd-update. Also ensure --currently-running provides a correctly formatted release (as done by -r). PR: 234771 Submitted by: Gerald Aryeetey Reported by: yuri Reviewed by: bcran MFC after: 1 month Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D18803 Modified: head/usr.sbin/freebsd-update/freebsd-update.sh Modified: head/usr.sbin/freebsd-update/freebsd-update.sh ============================================================================== --- head/usr.sbin/freebsd-update/freebsd-update.sh Thu Jan 17 20:01:06 2019 (r343121) +++ head/usr.sbin/freebsd-update/freebsd-update.sh Thu Jan 17 21:38:57 2019 (r343122) @@ -304,6 +304,14 @@ config_TargetRelease () { fi } +# Pretend current release is FreeBSD $1 +config_SourceRelease () { + UNAME_r=$1 + if echo ${UNAME_r} | grep -qE '^[0-9.]+$'; then + UNAME_r="${UNAME_r}-RELEASE" + fi +} + # Define what happens to output of utilities config_VerboseLevel () { if [ -z ${VERBOSELEVEL} ]; then @@ -442,7 +450,8 @@ parse_cmdline () { NOTTYOK=1 ;; --currently-running) - shift; export UNAME_r="$1" + shift + config_SourceRelease $1 || usage ;; # Configuration file equivalents @@ -657,6 +666,18 @@ fetchupgrade_check_params () { ARCH=`uname -m` FETCHDIR=${RELNUM}/${ARCH} PATCHDIR=${RELNUM}/${ARCH}/bp + + # Disallow upgrade from a version that is not `-RELEASE` + if ! echo "${RELNUM}" | grep -qE -- "-RELEASE$"; then + echo -n "`basename $0`: " + cat <<- EOF + Cannot upgrade from a version that is not a '-RELEASE' using `basename $0`. + Instead, FreeBSD can be directly upgraded by source or upgraded to a + RELEASE/RELENG version prior to running `basename $0`. + EOF + echo "System version: ${RELNUM}" + exit 1 + fi # Figure out what directory contains the running kernel BOOTFILE=`sysctl -n kern.bootfile` From owner-svn-src-all@freebsd.org Thu Jan 17 21:46:40 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 4A8DD14A8718; Thu, 17 Jan 2019 21:46:40 +0000 (UTC) (envelope-from delphij@gmail.com) Received: from mail-it1-x129.google.com (mail-it1-x129.google.com [IPv6:2607:f8b0:4864:20::129]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id CD6F886424; Thu, 17 Jan 2019 21:46:39 +0000 (UTC) (envelope-from delphij@gmail.com) Received: by mail-it1-x129.google.com with SMTP id p197so3252910itp.0; Thu, 17 Jan 2019 13:46:39 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=o0o9D8q16UHlXu7NXZdRIsVH1MB5D4+h7OQpd2pjvq0=; b=L4LtqQQwdWm4Kth8KDdseyhE/qiJhYZfZrKl+fB7AGU1O5v4U7jeziKVIAiy6ptPM8 n6C9Csw02y9tnMcwKP2rLZUYG1mfYoiBPZ37JxWKIO7/nc/AEZNK+GBpHdiq4qV7VYKR zw6p529rsEjWNlNy81+RRXv+ehgYpG/NS3H/8IIa/8snoeQd4KZCF5diwhNyE9lDdX5Z 8j2zZsjotrQzPungXPN/nRxsZyQ13VCoJ9m+QgKPUPS7pa4Hjm8oca8h8aVbawc6/LIN Wv9/HIcFpnzvEjKHlZQfgpgQpyf4rw/rX+db4cG2QNTNF7ROfv1KabvEerelWqneJHi8 J9ow== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=o0o9D8q16UHlXu7NXZdRIsVH1MB5D4+h7OQpd2pjvq0=; b=s/W4im1X0AbRr9SpxKzVmXkRSVF7innlDzlC7wCDVkCkLEjHlxifROB0UDM/mrsOLG EUrMArxTF+e+NlQ2Et7qmfvxgwI5WW42j1iopeLxAfvD2j9rnHzJK/UWDOLq/WUwMY6Y jtj3A2G2Bx7HwWL7vUYe0lu2hxxPZeKJAoqdnqs/X2rNnVauyL5wD406guUjLshDJCqJ WiibuoR80lNNi941pJVFJy46KcZ40CVFMalSyA1lokdFfvd7yzlTt705s7n5gDktuZ0U iWpyPvScX75X144RXIXlU4Hl/7YZI92WN7+owwhaPzT9qCrS7jlEUVkPWURSaeDo1Q9J 7Ozw== X-Gm-Message-State: AJcUukeIMT+AYuOG5/S1qZaaIQx8zBOJI5nlVsl1W8GPK1zBRMXZC1Rr v0LF5kGszDTOy2rYoVcfMhRTM6dZbS43dO76REidfw== X-Google-Smtp-Source: ALg8bN41QHOg2yno1gsJSC32nDeGQycKby+VLzM/SZu7mnnnSXtmN6F15NVPdIBv4CBDpy9xR8b2mTbnQIHvu77uwGY= X-Received: by 2002:a05:660c:91:: with SMTP id t17mr974504itj.41.1547761598593; Thu, 17 Jan 2019 13:46:38 -0800 (PST) MIME-Version: 1.0 References: <201901172138.x0HLcwBp082954@repo.freebsd.org> In-Reply-To: <201901172138.x0HLcwBp082954@repo.freebsd.org> From: Xin LI Date: Thu, 17 Jan 2019 13:46:27 -0800 Message-ID: Subject: Re: svn commit: r343122 - head/usr.sbin/freebsd-update To: Ed Maste Cc: "src-committers@freebsd.org" , "svn-src-all@freebsd.org" , "svn-src-head@freebsd.org" X-Rspamd-Queue-Id: CD6F886424 X-Spamd-Bar: ------ Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-6.97 / 15.00]; NEURAL_HAM_MEDIUM(-1.00)[-1.000,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; REPLY(-4.00)[]; NEURAL_HAM_SHORT(-0.97)[-0.971,0] Content-Type: text/plain; charset="UTF-8" X-Content-Filtered-By: Mailman/MimeDel 2.1.29 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 17 Jan 2019 21:46:40 -0000 On Thu, Jan 17, 2019 at 1:39 PM Ed Maste wrote: > Author: emaste > Date: Thu Jan 17 21:38:57 2019 > New Revision: 343122 > URL: https://svnweb.freebsd.org/changeset/base/343122 > > Log: > freebsd-update: Clarify unsupported release upgrade error message > > Notify users that upgrading from -CURRENT or -STABLE is unsupported by > freebsd-update. > > Also ensure --currently-running provides a correctly formatted release > (as done by -r). > > PR: 234771 > Submitted by: Gerald Aryeetey > Reported by: yuri > Reviewed by: bcran > MFC after: 1 month > Sponsored by: The FreeBSD Foundation > Differential Revision: https://reviews.freebsd.org/D18803 > > Modified: > head/usr.sbin/freebsd-update/freebsd-update.sh > > Modified: head/usr.sbin/freebsd-update/freebsd-update.sh > > ============================================================================== > --- head/usr.sbin/freebsd-update/freebsd-update.sh Thu Jan 17 > 20:01:06 2019 (r343121) > +++ head/usr.sbin/freebsd-update/freebsd-update.sh Thu Jan 17 > 21:38:57 2019 (r343122) > @@ -304,6 +304,14 @@ config_TargetRelease () { > fi > } > > +# Pretend current release is FreeBSD $1 > +config_SourceRelease () { > + UNAME_r=$1 > + if echo ${UNAME_r} | grep -qE '^[0-9.]+$'; then > + UNAME_r="${UNAME_r}-RELEASE" > + fi > +} > + > # Define what happens to output of utilities > config_VerboseLevel () { > if [ -z ${VERBOSELEVEL} ]; then > @@ -442,7 +450,8 @@ parse_cmdline () { > NOTTYOK=1 > ;; > --currently-running) > - shift; export UNAME_r="$1" > + shift > + config_SourceRelease $1 || usage > ;; > > # Configuration file equivalents > @@ -657,6 +666,18 @@ fetchupgrade_check_params () { > ARCH=`uname -m` > FETCHDIR=${RELNUM}/${ARCH} > PATCHDIR=${RELNUM}/${ARCH}/bp > + > + # Disallow upgrade from a version that is not `-RELEASE` > + if ! echo "${RELNUM}" | grep -qE -- "-RELEASE$"; then > + echo -n "`basename $0`: " > + cat <<- EOF > + Cannot upgrade from a version that is not a > '-RELEASE' using `basename $0`. > + Instead, FreeBSD can be directly upgraded by > source or upgraded to a > + RELEASE/RELENG version prior to running `basename > $0`. > + EOF > + echo "System version: ${RELNUM}" > + exit 1 > + fi > I think this would break upgrading from e.g. -BETA or -RC, which is supported? Cheers, From owner-svn-src-all@freebsd.org Thu Jan 17 21:52:42 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id AC80B14A8A5D; Thu, 17 Jan 2019 21:52:42 +0000 (UTC) (envelope-from tsoome@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 510358694B; Thu, 17 Jan 2019 21:52:42 +0000 (UTC) (envelope-from tsoome@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1: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 40E282065A; Thu, 17 Jan 2019 21:52:42 +0000 (UTC) (envelope-from tsoome@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x0HLqgPk093274; Thu, 17 Jan 2019 21:52:42 GMT (envelope-from tsoome@FreeBSD.org) Received: (from tsoome@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x0HLqgcI093273; Thu, 17 Jan 2019 21:52:42 GMT (envelope-from tsoome@FreeBSD.org) Message-Id: <201901172152.x0HLqgcI093273@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: tsoome set sender to tsoome@FreeBSD.org using -f From: Toomas Soome Date: Thu, 17 Jan 2019 21:52:42 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r343123 - head/stand/libsa/zfs X-SVN-Group: head X-SVN-Commit-Author: tsoome X-SVN-Commit-Paths: head/stand/libsa/zfs X-SVN-Commit-Revision: 343123 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 510358694B X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.98 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_SHORT(-0.98)[-0.981,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_LONG(-1.00)[-0.999,0] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 17 Jan 2019 21:52:42 -0000 Author: tsoome Date: Thu Jan 17 21:52:41 2019 New Revision: 343123 URL: https://svnweb.freebsd.org/changeset/base/343123 Log: loader should ignore active multi_vdev_crash_dump feature on zpool Since the loader zfs reader does not need to read the dump zvol, we can just enable the feature. illumos issue #9051 https://www.illumos.org/issues/9051 MFC after: 2 weeks Modified: head/stand/libsa/zfs/zfsimpl.c Modified: head/stand/libsa/zfs/zfsimpl.c ============================================================================== --- head/stand/libsa/zfs/zfsimpl.c Thu Jan 17 21:38:57 2019 (r343122) +++ head/stand/libsa/zfs/zfsimpl.c Thu Jan 17 21:52:41 2019 (r343123) @@ -62,6 +62,7 @@ static const char *features_for_read[] = { "org.illumos:sha512", "org.illumos:skein", "org.zfsonlinux:large_dnode", + "com.joyent:multi_vdev_crash_dump", NULL }; From owner-svn-src-all@freebsd.org Thu Jan 17 22:00:03 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 7083A14A8C74; Thu, 17 Jan 2019 22:00:03 +0000 (UTC) (envelope-from tsoome@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 16BE386C41; Thu, 17 Jan 2019 22:00:03 +0000 (UTC) (envelope-from tsoome@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1: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 073C620686; Thu, 17 Jan 2019 22:00:03 +0000 (UTC) (envelope-from tsoome@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x0HM02eZ093735; Thu, 17 Jan 2019 22:00:02 GMT (envelope-from tsoome@FreeBSD.org) Received: (from tsoome@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x0HM02O8093734; Thu, 17 Jan 2019 22:00:02 GMT (envelope-from tsoome@FreeBSD.org) Message-Id: <201901172200.x0HM02O8093734@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: tsoome set sender to tsoome@FreeBSD.org using -f From: Toomas Soome Date: Thu, 17 Jan 2019 22:00:02 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r343124 - head/stand/libsa X-SVN-Group: head X-SVN-Commit-Author: tsoome X-SVN-Commit-Paths: head/stand/libsa X-SVN-Commit-Revision: 343124 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 16BE386C41 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.98 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_SHORT(-0.98)[-0.981,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_LONG(-1.00)[-0.999,0] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 17 Jan 2019 22:00:03 -0000 Author: tsoome Date: Thu Jan 17 22:00:02 2019 New Revision: 343124 URL: https://svnweb.freebsd.org/changeset/base/343124 Log: libsa: add asprintf() asprintf() is a nice tool for string processing. MFC after: 2 weeks Modified: head/stand/libsa/printf.c head/stand/libsa/stand.h Modified: head/stand/libsa/printf.c ============================================================================== --- head/stand/libsa/printf.c Thu Jan 17 21:52:41 2019 (r343123) +++ head/stand/libsa/printf.c Thu Jan 17 22:00:02 2019 (r343124) @@ -122,6 +122,34 @@ snprint_func(int ch, void *arg) } int +asprintf(char **buf, const char *cfmt, ...) +{ + int retval; + struct print_buf arg; + va_list ap; + + *buf = NULL; + va_start(ap, cfmt); + retval = kvprintf(cfmt, NULL, NULL, 10, ap); + va_end(ap); + if (retval <= 0) + return (-1); + + arg.size = retval + 1; + arg.buf = *buf = malloc(arg.size); + if (*buf == NULL) + return (-1); + + va_start(ap, cfmt); + retval = kvprintf(cfmt, &snprint_func, &arg, 10, ap); + va_end(ap); + + if (arg.size >= 1) + *(arg.buf)++ = 0; + return (retval); +} + +int snprintf(char *buf, size_t size, const char *cfmt, ...) { int retval; Modified: head/stand/libsa/stand.h ============================================================================== --- head/stand/libsa/stand.h Thu Jan 17 21:52:41 2019 (r343123) +++ head/stand/libsa/stand.h Thu Jan 17 22:00:02 2019 (r343124) @@ -268,6 +268,7 @@ extern void *reallocf(void *ptr, size_t size); extern void mallocstats(void); extern int printf(const char *fmt, ...) __printflike(1, 2); +extern int asprintf(char **buf, const char *cfmt, ...) __printflike(2, 3); extern int sprintf(char *buf, const char *cfmt, ...) __printflike(2, 3); extern int snprintf(char *buf, size_t size, const char *cfmt, ...) __printflike(3, 4); extern int vprintf(const char *fmt, __va_list); From owner-svn-src-all@freebsd.org Thu Jan 17 22:32:41 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 332C81481D0D for ; Thu, 17 Jan 2019 22:32:41 +0000 (UTC) (envelope-from sobomax@sippysoft.com) Received: from mail-ot1-f53.google.com (mail-ot1-f53.google.com [209.85.210.53]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id BBB9888234 for ; Thu, 17 Jan 2019 22:32:40 +0000 (UTC) (envelope-from sobomax@sippysoft.com) Received: by mail-ot1-f53.google.com with SMTP id f18so12637516otl.11 for ; Thu, 17 Jan 2019 14:32:40 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=nG9CR3hjUxDG1YaytjKZIvtz/e+badylI/o7xv6jhCM=; b=axjQg1zHI6DyCawHIeNLz4UKFhm5NuYQyJf7zRrtrCNwodgsq3pZexVMB2w4YHvVUZ 0g2Qu/gdVWus47tlbVP+bkv2irMQYtqkLAID/OShr7KPB5Ek+0BqlYHOywehRc93PdzT DSAsJ8OA7fxGr56+WQWsu/EH5HoEp6NWzCxB1cL7YwFgk1GJLUSBlY/o2To40V5LgbUh 9JgRBJOJRG/kcVEgkCJ9W29CTkU5fGVC6lqGfeHaCAJZ7P/L7Usqn7yYEY8e+cW9Mimq rgRhPBoxSzoIPsQxJYbU/mMFUzH46rMltuRA/TfmwTLr4c7640oBPLfB8CWB8Vv8B+6/ 1Rwg== X-Gm-Message-State: AJcUukdIXhYxJdr022S48vQb6md2EsT4WUMoqj4MoQfXTXQ1bTnbNfci ovOThLmMUNOs2siwC7Ua4V1voxUaDWFJMzYQfUBcgw== X-Google-Smtp-Source: ALg8bN4PUKalXUJcV+dGUgyJvfNShsPm3nePw+1PKU1AqvLrspbggIY6nshy26Ag/ETXhmG7Qte91lWwYeYaOsHzIKo= X-Received: by 2002:a9d:8c6:: with SMTP id 64mr10277608otf.168.1547763919710; Thu, 17 Jan 2019 14:25:19 -0800 (PST) MIME-Version: 1.0 References: <201901172046.x0HKkvWs011502@slippy.cwsent.com> In-Reply-To: <201901172046.x0HKkvWs011502@slippy.cwsent.com> From: Maxim Sobolev Date: Thu, 17 Jan 2019 14:25:07 -0800 Message-ID: Subject: Re: svn commit: r343118 - in head/usr.sbin: . trim To: Cy Schubert Cc: "Conrad E. Meyer" , src-committers , svn-src-all@freebsd.org, svn-src-head@freebsd.org X-Rspamd-Queue-Id: BBB9888234 X-Spamd-Bar: ------ Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-6.99 / 15.00]; NEURAL_HAM_MEDIUM(-1.00)[-1.000,0]; NEURAL_HAM_SHORT(-0.99)[-0.988,0]; REPLY(-4.00)[]; NEURAL_HAM_LONG(-1.00)[-1.000,0] Content-Type: text/plain; charset="UTF-8" X-Content-Filtered-By: Mailman/MimeDel 2.1.29 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 17 Jan 2019 22:32:41 -0000 What I think we really need is some way to easily porti-ze useful stuff that would otherwise go into /usr/[s]bin, so adding things would be just as easy as hooking up SUBDIR into usr.[s]bin/Makefile. Yes, I know, this is topic almost as old as the FreeBSD Project itself, but perhaps we just did not approach it the right way. It was always the idea that we would just move bunch of stuff from src/usr.[s]bin repo into ports/. Which brings several important question such as "who is to host the distfile"? "where sources hosted", "who is to update the port when changes happen?" etc. Perhaps even by forking the whole ports idea into a smaller closely-guarged subset. Something like a new baseports repository, which might have structure like baseports/usr.bin/xxx, baseports/usr.sbin/yyy etc. Then add some automagic glue to kick in on every commit and transfer this into valid ports, which is going to be packaged by the poudriere and such. This way we could reduce amount of port-foo average src committer needs in order to maintain code. I am almost tempted to sit and write something over the next weekend or few of thereofs. Using usr.sbin/trim as an example. -Max On Thu, Jan 17, 2019 at 12:47 PM Cy Schubert wrote: > In message il.com> > , Conrad Meyer writes: > > On Thu, Jan 17, 2019 at 12:22 PM Cy Schubert > wrot > > e: > > > This is wrong. IIRC there was discussion that this should be in dd(1). > > > Why not submit a revision to add the functionality to dd? > > > > Well, it's wrong, but not because we need another weird dd mode. dd > > is hard enough to use already. > > I've never found dd confusing. What's wrong conv=erase? > > If it must stay, sderase is a better name. That's really what it does. > > Ports maybe? > > > -- > Cheers, > Cy Schubert > FreeBSD UNIX: Web: http://www.FreeBSD.org > > The need of the many outweighs the greed of the few. > > > > From owner-svn-src-all@freebsd.org Thu Jan 17 22:41:08 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 4F7CC148225D; Thu, 17 Jan 2019 22:41:08 +0000 (UTC) (envelope-from cse.cem@gmail.com) Received: from mail-it1-f194.google.com (mail-it1-f194.google.com [209.85.166.194]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 75126889DC; Thu, 17 Jan 2019 22:41:07 +0000 (UTC) (envelope-from cse.cem@gmail.com) Received: by mail-it1-f194.google.com with SMTP id m8so2149066itk.0; Thu, 17 Jan 2019 14:41:07 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:reply-to :from:date:message-id:subject:to:cc; bh=MMDgv0itVnEGq7M1krxYnqYLTYTsE1087q5pQbjjYnw=; b=YJ62j3iHD9V1815eiUWHZsXdNuha6DX6u/eXk4TvJw3WyIewcO4o7BqVrE3P+3DiLJ RF9we2evlXBiAHKn7MP+Fd1aUD3sSq98nyi4VCRH83g6VcSrwq7uxihQlvnnWq6CgqWt 537W2eRZA7yqp8WRfUUXfiwK8pLuZ5DE0Niov6jBCJJnzk7BlUK9/eiZBhmSFfszhd3P MlzdZe1430edsBn3CRcC3fLZT3nsYFuXzMvgZUdV1zWbnYXEAYqBS9f3NoBdD6BEQIUH oR1IHJrQbjB4ZGVT3IIMLp37FS4pj7x4G/C4q/pFy6ubUaBONVikDyz0hJzEsz0N6+fn 9lTA== X-Gm-Message-State: AJcUukdy+wwy2FrNWjh8PumDlTJ+X3X/YbXP1mEcM/EUWVZhTcC2wVlm 3VM2/NIoIxMiv8M2SYxkTRw8fsy6 X-Google-Smtp-Source: ALg8bN6jzUeC6vinmnPhWN2uhW150eQge3JqQkXsm1Vo09dQ7hcUJ+A5+nQx2+9yN1pTWPCCtF0R9A== X-Received: by 2002:a24:22c6:: with SMTP id o189mr8632098ito.86.1547764424995; Thu, 17 Jan 2019 14:33:44 -0800 (PST) Received: from mail-io1-f46.google.com (mail-io1-f46.google.com. [209.85.166.46]) by smtp.gmail.com with ESMTPSA id o16sm1343476ito.19.2019.01.17.14.33.44 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 17 Jan 2019 14:33:44 -0800 (PST) Received: by mail-io1-f46.google.com with SMTP id m19so9193126ioh.3; Thu, 17 Jan 2019 14:33:44 -0800 (PST) X-Received: by 2002:a6b:6111:: with SMTP id v17mr9489803iob.107.1547764424349; Thu, 17 Jan 2019 14:33:44 -0800 (PST) MIME-Version: 1.0 References: <201901150102.x0F12Hlt025856@repo.freebsd.org> In-Reply-To: <201901150102.x0F12Hlt025856@repo.freebsd.org> Reply-To: cem@freebsd.org From: Conrad Meyer Date: Thu, 17 Jan 2019 14:33:33 -0800 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: svn commit: r343030 - in head/sys: cam conf dev/md dev/nvme fs/fuse fs/nfsclient fs/smbfs kern sys ufs/ffs vm To: Gleb Smirnoff Cc: src-committers , svn-src-all@freebsd.org, svn-src-head@freebsd.org Content-Type: text/plain; charset="UTF-8" X-Rspamd-Queue-Id: 75126889DC X-Spamd-Bar: ---- Authentication-Results: mx1.freebsd.org; spf=pass (mx1.freebsd.org: domain of csecem@gmail.com designates 209.85.166.194 as permitted sender) smtp.mailfrom=csecem@gmail.com X-Spamd-Result: default: False [-4.03 / 15.00]; RCVD_VIA_SMTP_AUTH(0.00)[]; HAS_REPLYTO(0.00)[cem@freebsd.org]; TO_DN_SOME(0.00)[]; R_SPF_ALLOW(-0.20)[+ip4:209.85.128.0/17]; REPLYTO_ADDR_EQ_FROM(0.00)[]; RCVD_COUNT_THREE(0.00)[4]; MX_GOOD(-0.01)[cached: alt3.gmail-smtp-in.l.google.com]; NEURAL_HAM_SHORT(-0.89)[-0.889,0]; FORGED_SENDER(0.30)[cem@freebsd.org,csecem@gmail.com]; R_DKIM_NA(0.00)[]; FREEMAIL_ENVFROM(0.00)[gmail.com]; ASN(0.00)[asn:15169, ipnet:209.85.128.0/17, country:US]; FROM_NEQ_ENVFROM(0.00)[cem@freebsd.org,csecem@gmail.com]; TAGGED_FROM(0.00)[]; ARC_NA(0.00)[]; NEURAL_HAM_MEDIUM(-1.00)[-1.000,0]; MIME_TRACE(0.00)[0:+]; FROM_HAS_DN(0.00)[]; TO_MATCH_ENVRCPT_ALL(0.00)[]; RCPT_COUNT_THREE(0.00)[4]; MIME_GOOD(-0.10)[text/plain]; RCVD_TLS_LAST(0.00)[]; DMARC_NA(0.00)[freebsd.org]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; IP_SCORE(-1.13)[ipnet: 209.85.128.0/17(-3.74), asn: 15169(-1.82), country: US(-0.08)]; RCVD_IN_DNSWL_NONE(0.00)[194.166.85.209.list.dnswl.org : 127.0.5.0]; RWL_MAILSPIKE_POSSIBLE(0.00)[194.166.85.209.rep.mailspike.net : 127.0.0.17] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 17 Jan 2019 22:41:08 -0000 On WITNESS builds after this change and all followup fixes I can see (@ r343108), I get a new warning: Sleeping on "pageprocwait" with the following non-sleepable locks held: exclusive sleep mutex pbuf (UMA zone) r = 0 (0xfffff80003033e00) locked @ .../sys/vm/uma_core.c:1139 stack backtrace: #0 0xffffffff80c0a164 at witness_debugger.part.14+0xa4 #1 0xffffffff80c0d465 at witness_warn+0x285 #2 0xffffffff80baa3b9 at _sleep+0x59 #3 0xffffffff80f03c73 at vm_wait_doms+0x103 #4 0xffffffff80eeb8e5 at vm_domainset_iter_policy+0x55 #5 0xffffffff80eeab59 at uma_prealloc+0xc9 #6 0xffffffff80f0d643 at pbuf_zsecond_create+0x63 #7 0xffffffff80ee2c9f at swap_pager_swap_init+0x5f #8 0xffffffff80f0cf57 at vm_pageout+0x27 For what it's worth, this is a bhyve guest with vm.ndomains 1. (The bhyve host has 2 domains, but I don't see how that would be relevant.) Best, Conrad On Mon, Jan 14, 2019 at 5:02 PM Gleb Smirnoff wrote: > > Author: glebius > Date: Tue Jan 15 01:02:16 2019 > New Revision: 343030 > URL: https://svnweb.freebsd.org/changeset/base/343030 > > Log: > Allocate pager bufs from UMA instead of 80-ish mutex protected linked list. > > o In vm_pager_bufferinit() create pbuf_zone and start accounting on how many > pbufs are we going to have set. > In various subsystems that are going to utilize pbufs create private zones > via call to pbuf_zsecond_create(). The latter calls uma_zsecond_create(), > and sets a limit on created zone. After startup preallocate pbufs according > to requirements of all pbuf zones. > > Subsystems that used to have a private limit with old allocator now have > private pbuf zones: md(4), fusefs, NFS client, smbfs, VFS cluster, FFS, > swap, vnode pager. > > The following subsystems use shared pbuf zone: cam(4), nvme(4), physio(9), > aio(4). They should have their private limits, but changing that is out of > scope of this commit. > > o Fetch tunable value of kern.nswbuf from init_param2() and while here move > NSWBUF_MIN to opt_param.h and eliminate opt_swap.h, that was holding only > this option. > Default values aren't touched by this commit, but they probably should be > reviewed wrt to modern hardware. > > This change removes a tight bottleneck from sendfile(2) operation, that > uses pbufs in vnode pager. Other pagers also would benefit from faster > allocation. > > Together with: gallatin > Tested by: pho > > Modified: > head/sys/cam/cam_periph.c > head/sys/conf/options > head/sys/dev/md/md.c > head/sys/dev/nvme/nvme_ctrlr.c > head/sys/fs/fuse/fuse_main.c > head/sys/fs/fuse/fuse_vnops.c > head/sys/fs/nfsclient/nfs_clbio.c > head/sys/fs/nfsclient/nfs_clport.c > head/sys/fs/smbfs/smbfs_io.c > head/sys/fs/smbfs/smbfs_vfsops.c > head/sys/kern/kern_physio.c > head/sys/kern/subr_param.c > head/sys/kern/vfs_aio.c > head/sys/kern/vfs_bio.c > head/sys/kern/vfs_cluster.c > head/sys/sys/buf.h > head/sys/ufs/ffs/ffs_rawread.c > head/sys/vm/swap_pager.c > head/sys/vm/vm_pager.c > head/sys/vm/vnode_pager.c > > Modified: head/sys/cam/cam_periph.c > ============================================================================== > --- head/sys/cam/cam_periph.c Tue Jan 15 00:52:41 2019 (r343029) > +++ head/sys/cam/cam_periph.c Tue Jan 15 01:02:16 2019 (r343030) > @@ -936,7 +936,7 @@ cam_periph_mapmem(union ccb *ccb, struct cam_periph_ma > /* > * Get the buffer. > */ > - mapinfo->bp[i] = getpbuf(NULL); > + mapinfo->bp[i] = uma_zalloc(pbuf_zone, M_WAITOK); > > /* put our pointer in the data slot */ > mapinfo->bp[i]->b_data = *data_ptrs[i]; > @@ -962,9 +962,9 @@ cam_periph_mapmem(union ccb *ccb, struct cam_periph_ma > for (j = 0; j < i; ++j) { > *data_ptrs[j] = mapinfo->bp[j]->b_caller1; > vunmapbuf(mapinfo->bp[j]); > - relpbuf(mapinfo->bp[j], NULL); > + uma_zfree(pbuf_zone, mapinfo->bp[j]); > } > - relpbuf(mapinfo->bp[i], NULL); > + uma_zfree(pbuf_zone, mapinfo->bp[i]); > PRELE(curproc); > return(EACCES); > } > @@ -1052,7 +1052,7 @@ cam_periph_unmapmem(union ccb *ccb, struct cam_periph_ > vunmapbuf(mapinfo->bp[i]); > > /* release the buffer */ > - relpbuf(mapinfo->bp[i], NULL); > + uma_zfree(pbuf_zone, mapinfo->bp[i]); > } > > /* allow ourselves to be swapped once again */ > > Modified: head/sys/conf/options > ============================================================================== > --- head/sys/conf/options Tue Jan 15 00:52:41 2019 (r343029) > +++ head/sys/conf/options Tue Jan 15 01:02:16 2019 (r343030) > @@ -187,7 +187,7 @@ NO_ADAPTIVE_SX > NO_EVENTTIMERS opt_timer.h > NO_OBSOLETE_CODE opt_global.h > NO_SYSCTL_DESCR opt_global.h > -NSWBUF_MIN opt_swap.h > +NSWBUF_MIN opt_param.h > MBUF_PACKET_ZONE_DISABLE opt_global.h > PANIC_REBOOT_WAIT_TIME opt_panic.h > PCI_HP opt_pci.h > > Modified: head/sys/dev/md/md.c > ============================================================================== > --- head/sys/dev/md/md.c Tue Jan 15 00:52:41 2019 (r343029) > +++ head/sys/dev/md/md.c Tue Jan 15 01:02:16 2019 (r343030) > @@ -231,7 +231,7 @@ static LIST_HEAD(, md_s) md_softc_list = LIST_HEAD_INI > #define NMASK (NINDIR-1) > static int nshift; > > -static int md_vnode_pbuf_freecnt; > +static uma_zone_t md_pbuf_zone; > > struct indir { > uintptr_t *array; > @@ -962,7 +962,7 @@ mdstart_vnode(struct md_s *sc, struct bio *bp) > auio.uio_iovcnt = piov - auio.uio_iov; > piov = auio.uio_iov; > } else if ((bp->bio_flags & BIO_UNMAPPED) != 0) { > - pb = getpbuf(&md_vnode_pbuf_freecnt); > + pb = uma_zalloc(md_pbuf_zone, M_WAITOK); > bp->bio_resid = len; > unmapped_step: > npages = atop(min(MAXPHYS, round_page(len + (ma_offs & > @@ -1013,7 +1013,7 @@ unmapped_step: > if (len > 0) > goto unmapped_step; > } > - relpbuf(pb, &md_vnode_pbuf_freecnt); > + uma_zfree(md_pbuf_zone, pb); > } > > free(piov, M_MD); > @@ -2118,7 +2118,7 @@ g_md_init(struct g_class *mp __unused) > sx_xunlock(&md_sx); > } > } > - md_vnode_pbuf_freecnt = nswbuf / 10; > + md_pbuf_zone = pbuf_zsecond_create("mdpbuf", nswbuf / 10); > status_dev = make_dev(&mdctl_cdevsw, INT_MAX, UID_ROOT, GID_WHEEL, > 0600, MDCTL_NAME); > g_topology_lock(); > @@ -2214,5 +2214,6 @@ g_md_fini(struct g_class *mp __unused) > sx_destroy(&md_sx); > if (status_dev != NULL) > destroy_dev(status_dev); > + uma_zdestroy(md_pbuf_zone); > delete_unrhdr(md_uh); > } > > Modified: head/sys/dev/nvme/nvme_ctrlr.c > ============================================================================== > --- head/sys/dev/nvme/nvme_ctrlr.c Tue Jan 15 00:52:41 2019 (r343029) > +++ head/sys/dev/nvme/nvme_ctrlr.c Tue Jan 15 01:02:16 2019 (r343030) > @@ -1052,7 +1052,7 @@ nvme_ctrlr_passthrough_cmd(struct nvme_controller *ctr > * this passthrough command. > */ > PHOLD(curproc); > - buf = getpbuf(NULL); > + buf = uma_zalloc(pbuf_zone, M_WAITOK); > buf->b_data = pt->buf; > buf->b_bufsize = pt->len; > buf->b_iocmd = pt->is_read ? BIO_READ : BIO_WRITE; > @@ -1101,7 +1101,7 @@ nvme_ctrlr_passthrough_cmd(struct nvme_controller *ctr > > err: > if (buf != NULL) { > - relpbuf(buf, NULL); > + uma_zfree(pbuf_zone, buf); > PRELE(curproc); > } > > > Modified: head/sys/fs/fuse/fuse_main.c > ============================================================================== > --- head/sys/fs/fuse/fuse_main.c Tue Jan 15 00:52:41 2019 (r343029) > +++ head/sys/fs/fuse/fuse_main.c Tue Jan 15 01:02:16 2019 (r343030) > @@ -84,7 +84,7 @@ struct mtx fuse_mtx; > extern struct vfsops fuse_vfsops; > extern struct cdevsw fuse_cdevsw; > extern struct vop_vector fuse_vnops; > -extern int fuse_pbuf_freecnt; > +extern uma_zone_t fuse_pbuf_zone; > > static struct vfsconf fuse_vfsconf = { > .vfc_version = VFS_VERSION, > @@ -122,7 +122,6 @@ fuse_loader(struct module *m, int what, void *arg) > > switch (what) { > case MOD_LOAD: /* kldload */ > - fuse_pbuf_freecnt = nswbuf / 2 + 1; > mtx_init(&fuse_mtx, "fuse_mtx", NULL, MTX_DEF); > err = fuse_device_init(); > if (err) { > @@ -130,6 +129,7 @@ fuse_loader(struct module *m, int what, void *arg) > return (err); > } > fuse_ipc_init(); > + fuse_pbuf_zone = pbuf_zsecond_create("fusepbuf", nswbuf / 2); > > /* vfs_modevent ignores its first arg */ > if ((err = vfs_modevent(NULL, what, &fuse_vfsconf))) > @@ -144,6 +144,7 @@ fuse_loader(struct module *m, int what, void *arg) > if ((err = vfs_modevent(NULL, what, &fuse_vfsconf))) > return (err); > fuse_bringdown(eh_tag); > + uma_zdestroy(fuse_pbuf_zone); > break; > default: > return (EINVAL); > > Modified: head/sys/fs/fuse/fuse_vnops.c > ============================================================================== > --- head/sys/fs/fuse/fuse_vnops.c Tue Jan 15 00:52:41 2019 (r343029) > +++ head/sys/fs/fuse/fuse_vnops.c Tue Jan 15 01:02:16 2019 (r343030) > @@ -201,7 +201,7 @@ static int fuse_reclaim_revoked = 0; > SYSCTL_INT(_vfs_fuse, OID_AUTO, reclaim_revoked, CTLFLAG_RW, > &fuse_reclaim_revoked, 0, ""); > > -int fuse_pbuf_freecnt = -1; > +uma_zone_t fuse_pbuf_zone; > > #define fuse_vm_page_lock(m) vm_page_lock((m)); > #define fuse_vm_page_unlock(m) vm_page_unlock((m)); > @@ -1824,7 +1824,7 @@ fuse_vnop_getpages(struct vop_getpages_args *ap) > * We use only the kva address for the buffer, but this is extremely > * convenient and fast. > */ > - bp = getpbuf(&fuse_pbuf_freecnt); > + bp = uma_zalloc(fuse_pbuf_zone, M_WAITOK); > > kva = (vm_offset_t)bp->b_data; > pmap_qenter(kva, pages, npages); > @@ -1845,7 +1845,7 @@ fuse_vnop_getpages(struct vop_getpages_args *ap) > error = fuse_io_dispatch(vp, &uio, IO_DIRECT, cred); > pmap_qremove(kva, npages); > > - relpbuf(bp, &fuse_pbuf_freecnt); > + uma_zfree(fuse_pbuf_zone, bp); > > if (error && (uio.uio_resid == count)) { > FS_DEBUG("error %d\n", error); > @@ -1958,7 +1958,7 @@ fuse_vnop_putpages(struct vop_putpages_args *ap) > * We use only the kva address for the buffer, but this is extremely > * convenient and fast. > */ > - bp = getpbuf(&fuse_pbuf_freecnt); > + bp = uma_zalloc(fuse_pbuf_zone, M_WAITOK); > > kva = (vm_offset_t)bp->b_data; > pmap_qenter(kva, pages, npages); > @@ -1978,7 +1978,7 @@ fuse_vnop_putpages(struct vop_putpages_args *ap) > error = fuse_io_dispatch(vp, &uio, IO_DIRECT, cred); > > pmap_qremove(kva, npages); > - relpbuf(bp, &fuse_pbuf_freecnt); > + uma_zfree(fuse_pbuf_zone, bp); > > if (!error) { > int nwritten = round_page(count - uio.uio_resid) / PAGE_SIZE; > > Modified: head/sys/fs/nfsclient/nfs_clbio.c > ============================================================================== > --- head/sys/fs/nfsclient/nfs_clbio.c Tue Jan 15 00:52:41 2019 (r343029) > +++ head/sys/fs/nfsclient/nfs_clbio.c Tue Jan 15 01:02:16 2019 (r343030) > @@ -70,7 +70,7 @@ extern struct nfsmount *ncl_iodmount[NFS_MAXASYNCDAEMO > extern int newnfs_directio_enable; > extern int nfs_keep_dirty_on_error; > > -int ncl_pbuf_freecnt = -1; /* start out unlimited */ > +uma_zone_t ncl_pbuf_zone; > > static struct buf *nfs_getcacheblk(struct vnode *vp, daddr_t bn, int size, > struct thread *td); > @@ -182,7 +182,7 @@ ncl_getpages(struct vop_getpages_args *ap) > * We use only the kva address for the buffer, but this is extremely > * convenient and fast. > */ > - bp = getpbuf(&ncl_pbuf_freecnt); > + bp = uma_zalloc(ncl_pbuf_zone, M_WAITOK); > > kva = (vm_offset_t) bp->b_data; > pmap_qenter(kva, pages, npages); > @@ -203,7 +203,7 @@ ncl_getpages(struct vop_getpages_args *ap) > error = ncl_readrpc(vp, &uio, cred); > pmap_qremove(kva, npages); > > - relpbuf(bp, &ncl_pbuf_freecnt); > + uma_zfree(ncl_pbuf_zone, bp); > > if (error && (uio.uio_resid == count)) { > printf("ncl_getpages: error %d\n", error); > @@ -793,7 +793,7 @@ do_sync: > while (uiop->uio_resid > 0) { > size = MIN(uiop->uio_resid, wsize); > size = MIN(uiop->uio_iov->iov_len, size); > - bp = getpbuf(&ncl_pbuf_freecnt); > + bp = uma_zalloc(ncl_pbuf_zone, M_WAITOK); > t_uio = malloc(sizeof(struct uio), M_NFSDIRECTIO, M_WAITOK); > t_iov = malloc(sizeof(struct iovec), M_NFSDIRECTIO, M_WAITOK); > t_iov->iov_base = malloc(size, M_NFSDIRECTIO, M_WAITOK); > @@ -836,7 +836,7 @@ err_free: > free(t_iov, M_NFSDIRECTIO); > free(t_uio, M_NFSDIRECTIO); > bp->b_vp = NULL; > - relpbuf(bp, &ncl_pbuf_freecnt); > + uma_zfree(ncl_pbuf_zone, bp); > if (error == EINTR) > return (error); > goto do_sync; > @@ -1571,7 +1571,7 @@ ncl_doio_directwrite(struct buf *bp) > mtx_unlock(&np->n_mtx); > } > bp->b_vp = NULL; > - relpbuf(bp, &ncl_pbuf_freecnt); > + uma_zfree(ncl_pbuf_zone, bp); > } > > /* > > Modified: head/sys/fs/nfsclient/nfs_clport.c > ============================================================================== > --- head/sys/fs/nfsclient/nfs_clport.c Tue Jan 15 00:52:41 2019 (r343029) > +++ head/sys/fs/nfsclient/nfs_clport.c Tue Jan 15 01:02:16 2019 (r343030) > @@ -79,7 +79,7 @@ extern struct vop_vector newnfs_vnodeops; > extern struct vop_vector newnfs_fifoops; > extern uma_zone_t newnfsnode_zone; > extern struct buf_ops buf_ops_newnfs; > -extern int ncl_pbuf_freecnt; > +extern uma_zone_t ncl_pbuf_zone; > extern short nfsv4_cbport; > extern int nfscl_enablecallb; > extern int nfs_numnfscbd; > @@ -1023,7 +1023,7 @@ nfscl_init(void) > return; > inited = 1; > nfscl_inited = 1; > - ncl_pbuf_freecnt = nswbuf / 2 + 1; > + ncl_pbuf_zone = pbuf_zsecond_create("nfspbuf", nswbuf / 2); > } > > /* > @@ -1357,6 +1357,7 @@ nfscl_modevent(module_t mod, int type, void *data) > #if 0 > ncl_call_invalcaches = NULL; > nfsd_call_nfscl = NULL; > + uma_zdestroy(ncl_pbuf_zone); > /* and get rid of the mutexes */ > mtx_destroy(&ncl_iod_mutex); > loaded = 0; > > Modified: head/sys/fs/smbfs/smbfs_io.c > ============================================================================== > --- head/sys/fs/smbfs/smbfs_io.c Tue Jan 15 00:52:41 2019 (r343029) > +++ head/sys/fs/smbfs/smbfs_io.c Tue Jan 15 01:02:16 2019 (r343030) > @@ -63,7 +63,7 @@ > > /*#define SMBFS_RWGENERIC*/ > > -extern int smbfs_pbuf_freecnt; > +extern uma_zone_t smbfs_pbuf_zone; > > static int smbfs_fastlookup = 1; > > @@ -468,7 +468,7 @@ smbfs_getpages(ap) > scred = smbfs_malloc_scred(); > smb_makescred(scred, td, cred); > > - bp = getpbuf(&smbfs_pbuf_freecnt); > + bp = uma_zalloc(smbfs_pbuf_zone, M_WAITOK); > > kva = (vm_offset_t) bp->b_data; > pmap_qenter(kva, pages, npages); > @@ -490,7 +490,7 @@ smbfs_getpages(ap) > smbfs_free_scred(scred); > pmap_qremove(kva, npages); > > - relpbuf(bp, &smbfs_pbuf_freecnt); > + uma_zfree(smbfs_pbuf_zone, bp); > > if (error && (uio.uio_resid == count)) { > printf("smbfs_getpages: error %d\n",error); > @@ -593,7 +593,7 @@ smbfs_putpages(ap) > rtvals[i] = VM_PAGER_ERROR; > } > > - bp = getpbuf(&smbfs_pbuf_freecnt); > + bp = uma_zalloc(smbfs_pbuf_zone, M_WAITOK); > > kva = (vm_offset_t) bp->b_data; > pmap_qenter(kva, pages, npages); > @@ -621,7 +621,7 @@ smbfs_putpages(ap) > > pmap_qremove(kva, npages); > > - relpbuf(bp, &smbfs_pbuf_freecnt); > + uma_zfree(smbfs_pbuf_zone, bp); > > if (error == 0) { > vnode_pager_undirty_pages(pages, rtvals, count - uio.uio_resid, > > Modified: head/sys/fs/smbfs/smbfs_vfsops.c > ============================================================================== > --- head/sys/fs/smbfs/smbfs_vfsops.c Tue Jan 15 00:52:41 2019 (r343029) > +++ head/sys/fs/smbfs/smbfs_vfsops.c Tue Jan 15 01:02:16 2019 (r343030) > @@ -88,7 +88,7 @@ MODULE_DEPEND(smbfs, netsmb, NSMB_VERSION, NSMB_VERSIO > MODULE_DEPEND(smbfs, libiconv, 1, 1, 2); > MODULE_DEPEND(smbfs, libmchain, 1, 1, 1); > > -int smbfs_pbuf_freecnt = -1; /* start out unlimited */ > +uma_zone_t smbfs_pbuf_zone; > > static int > smbfs_cmount(struct mntarg *ma, void * data, uint64_t flags) > @@ -367,7 +367,8 @@ smbfs_quotactl(mp, cmd, uid, arg) > int > smbfs_init(struct vfsconf *vfsp) > { > - smbfs_pbuf_freecnt = nswbuf / 2 + 1; > + > + smbfs_pbuf_zone = pbuf_zsecond_create("smbpbuf", nswbuf / 2); > SMBVDEBUG("done.\n"); > return 0; > } > @@ -377,6 +378,7 @@ int > smbfs_uninit(struct vfsconf *vfsp) > { > > + uma_zdestroy(smbfs_pbuf_zone); > SMBVDEBUG("done.\n"); > return 0; > } > > Modified: head/sys/kern/kern_physio.c > ============================================================================== > --- head/sys/kern/kern_physio.c Tue Jan 15 00:52:41 2019 (r343029) > +++ head/sys/kern/kern_physio.c Tue Jan 15 01:02:16 2019 (r343030) > @@ -104,7 +104,7 @@ physio(struct cdev *dev, struct uio *uio, int ioflag) > maxpages = btoc(MIN(uio->uio_resid, MAXPHYS)) + 1; > pages = malloc(sizeof(*pages) * maxpages, M_DEVBUF, M_WAITOK); > } else { > - pbuf = getpbuf(NULL); > + pbuf = uma_zalloc(pbuf_zone, M_WAITOK); > sa = pbuf->b_data; > maxpages = btoc(MAXPHYS); > pages = pbuf->b_pages; > @@ -220,7 +220,7 @@ physio(struct cdev *dev, struct uio *uio, int ioflag) > } > doerror: > if (pbuf) > - relpbuf(pbuf, NULL); > + uma_zfree(pbuf_zone, pbuf); > else if (pages) > free(pages, M_DEVBUF); > g_destroy_bio(bp); > > Modified: head/sys/kern/subr_param.c > ============================================================================== > --- head/sys/kern/subr_param.c Tue Jan 15 00:52:41 2019 (r343029) > +++ head/sys/kern/subr_param.c Tue Jan 15 01:02:16 2019 (r343030) > @@ -45,6 +45,7 @@ __FBSDID("$FreeBSD$"); > > #include > #include > +#include > #include > #include > #include > @@ -285,6 +286,15 @@ init_param2(long physpages) > nbuf = NBUF; > TUNABLE_INT_FETCH("kern.nbuf", &nbuf); > TUNABLE_INT_FETCH("kern.bio_transient_maxcnt", &bio_transient_maxcnt); > + > + /* > + * Physical buffers are pre-allocated buffers (struct buf) that > + * are used as temporary holders for I/O, such as paging I/O. > + */ > + nswbuf = min(nbuf / 4, 256); > + TUNABLE_INT_FETCH("kern.nswbuf", &nswbuf); > + if (nswbuf < NSWBUF_MIN) > + nswbuf = NSWBUF_MIN; > > /* > * The default for maxpipekva is min(1/64 of the kernel address space, > > Modified: head/sys/kern/vfs_aio.c > ============================================================================== > --- head/sys/kern/vfs_aio.c Tue Jan 15 00:52:41 2019 (r343029) > +++ head/sys/kern/vfs_aio.c Tue Jan 15 01:02:16 2019 (r343030) > @@ -1267,7 +1267,7 @@ aio_qbio(struct proc *p, struct kaiocb *job) > goto unref; > } > > - job->pbuf = pbuf = (struct buf *)getpbuf(NULL); > + job->pbuf = pbuf = uma_zalloc(pbuf_zone, M_WAITOK); > BUF_KERNPROC(pbuf); > AIO_LOCK(ki); > ki->kaio_buffer_count++; > @@ -1318,7 +1318,7 @@ doerror: > AIO_LOCK(ki); > ki->kaio_buffer_count--; > AIO_UNLOCK(ki); > - relpbuf(pbuf, NULL); > + uma_zfree(pbuf_zone, pbuf); > job->pbuf = NULL; > } > g_destroy_bio(bp); > @@ -2344,7 +2344,7 @@ aio_biowakeup(struct bio *bp) > ki = userp->p_aioinfo; > if (job->pbuf) { > pmap_qremove((vm_offset_t)job->pbuf->b_data, job->npages); > - relpbuf(job->pbuf, NULL); > + uma_zfree(pbuf_zone, job->pbuf); > job->pbuf = NULL; > atomic_subtract_int(&num_buf_aio, 1); > AIO_LOCK(ki); > > Modified: head/sys/kern/vfs_bio.c > ============================================================================== > --- head/sys/kern/vfs_bio.c Tue Jan 15 00:52:41 2019 (r343029) > +++ head/sys/kern/vfs_bio.c Tue Jan 15 01:02:16 2019 (r343030) > @@ -86,7 +86,6 @@ __FBSDID("$FreeBSD$"); > #include > #include > #include > -#include "opt_swap.h" > > static MALLOC_DEFINE(M_BIOBUF, "biobuf", "BIO buffer"); > > @@ -1017,10 +1016,6 @@ bd_speedup(void) > mtx_unlock(&bdlock); > } > > -#ifndef NSWBUF_MIN > -#define NSWBUF_MIN 16 > -#endif > - > #ifdef __i386__ > #define TRANSIENT_DENOM 5 > #else > @@ -1130,19 +1125,8 @@ kern_vfs_bio_buffer_alloc(caddr_t v, long physmem_est) > } > > /* > - * swbufs are used as temporary holders for I/O, such as paging I/O. > - * We have no less then 16 and no more then 256. > - */ > - nswbuf = min(nbuf / 4, 256); > - TUNABLE_INT_FETCH("kern.nswbuf", &nswbuf); > - if (nswbuf < NSWBUF_MIN) > - nswbuf = NSWBUF_MIN; > - > - /* > * Reserve space for the buffer cache buffers > */ > - swbuf = (void *)v; > - v = (caddr_t)(swbuf + nswbuf); > buf = (void *)v; > v = (caddr_t)(buf + nbuf); > > > Modified: head/sys/kern/vfs_cluster.c > ============================================================================== > --- head/sys/kern/vfs_cluster.c Tue Jan 15 00:52:41 2019 (r343029) > +++ head/sys/kern/vfs_cluster.c Tue Jan 15 01:02:16 2019 (r343030) > @@ -63,7 +63,9 @@ SYSCTL_INT(_debug, OID_AUTO, rcluster, CTLFLAG_RW, &rc > #endif > > static MALLOC_DEFINE(M_SEGMENT, "cl_savebuf", "cluster_save buffer"); > +static uma_zone_t cluster_pbuf_zone; > > +static void cluster_init(void *); > static struct cluster_save *cluster_collectbufs(struct vnode *vp, > struct buf *last_bp, int gbflags); > static struct buf *cluster_rbuild(struct vnode *vp, u_quad_t filesize, > @@ -83,6 +85,15 @@ static int read_min = 1; > SYSCTL_INT(_vfs, OID_AUTO, read_min, CTLFLAG_RW, &read_min, 0, > "Cluster read min block count"); > > +SYSINIT(cluster, SI_SUB_CPU, SI_ORDER_ANY, cluster_init, NULL); > + > +static void > +cluster_init(void *dummy) > +{ > + > + cluster_pbuf_zone = pbuf_zsecond_create("clpbuf", nswbuf / 2); > +} > + > /* > * Read data to a buf, including read-ahead if we find this to be beneficial. > * cluster_read replaces bread. > @@ -372,7 +383,7 @@ cluster_rbuild(struct vnode *vp, u_quad_t filesize, da > ((tbp->b_flags & B_VMIO) == 0) || (run <= 1) ) > return tbp; > > - bp = trypbuf(&cluster_pbuf_freecnt); > + bp = uma_zalloc(cluster_pbuf_zone, M_NOWAIT); > if (bp == NULL) > return tbp; > > @@ -603,7 +614,7 @@ cluster_callback(struct buf *bp) > bufdone(tbp); > } > pbrelvp(bp); > - relpbuf(bp, &cluster_pbuf_freecnt); > + uma_zfree(cluster_pbuf_zone, bp); > } > > /* > @@ -856,9 +867,8 @@ cluster_wbuild(struct vnode *vp, long size, daddr_t st > (tbp->b_bcount != tbp->b_bufsize) || > (tbp->b_bcount != size) || > (len == 1) || > - ((bp = (vp->v_vflag & VV_MD) != 0 ? > - trypbuf(&cluster_pbuf_freecnt) : > - getpbuf(&cluster_pbuf_freecnt)) == NULL)) { > + ((bp = uma_zalloc(cluster_pbuf_zone, > + (vp->v_vflag & VV_MD) != 0 ? M_NOWAIT : M_WAITOK)) == NULL)) { > totalwritten += tbp->b_bufsize; > bawrite(tbp); > ++start_lbn; > > Modified: head/sys/sys/buf.h > ============================================================================== > --- head/sys/sys/buf.h Tue Jan 15 00:52:41 2019 (r343029) > +++ head/sys/sys/buf.h Tue Jan 15 01:02:16 2019 (r343030) > @@ -44,6 +44,7 @@ > #include > #include > #include > +#include > > struct bio; > struct buf; > @@ -275,6 +276,11 @@ struct buf { > #define PRINT_BUF_VFLAGS "\20\4bkgrderr\3bkgrdwait\2bkgrdinprog\1scanned" > > #ifdef _KERNEL > + > +#ifndef NSWBUF_MIN > +#define NSWBUF_MIN 16 > +#endif > + > /* > * Buffer locking > */ > @@ -287,7 +293,7 @@ extern const char *buf_wmesg; /* Default buffer lock > * Initialize a lock. > */ > #define BUF_LOCKINIT(bp) \ > - lockinit(&(bp)->b_lock, PRIBIO + 4, buf_wmesg, 0, 0) > + lockinit(&(bp)->b_lock, PRIBIO + 4, buf_wmesg, 0, LK_NEW) > /* > * > * Get a lock sleeping non-interruptably until it becomes available. > @@ -493,10 +499,6 @@ extern int bdwriteskip; > extern int dirtybufferflushes; > extern int altbufferflushes; > extern int nswbuf; /* Number of swap I/O buffer headers. */ > -extern int cluster_pbuf_freecnt; /* Number of pbufs for clusters */ > -extern int vnode_pbuf_freecnt; /* Number of pbufs for vnode pager */ > -extern int vnode_async_pbuf_freecnt; /* Number of pbufs for vnode pager, > - asynchronous reads */ > extern caddr_t unmapped_buf; /* Data address for unmapped buffers. */ > > static inline int > @@ -537,7 +539,6 @@ void brelse(struct buf *); > void bqrelse(struct buf *); > int vfs_bio_awrite(struct buf *); > void vfs_drain_busy_pages(struct buf *bp); > -struct buf * getpbuf(int *); > struct buf *incore(struct bufobj *, daddr_t); > struct buf *gbincore(struct bufobj *, daddr_t); > struct buf *getblk(struct vnode *, daddr_t, int, int, int, int); > @@ -549,6 +550,9 @@ int bufwrite(struct buf *); > void bufdone(struct buf *); > void bd_speedup(void); > > +extern uma_zone_t pbuf_zone; > +uma_zone_t pbuf_zsecond_create(char *name, int max); > + > int cluster_read(struct vnode *, u_quad_t, daddr_t, long, > struct ucred *, long, int, int, struct buf **); > int cluster_wbuild(struct vnode *, long, daddr_t, int, int); > @@ -562,7 +566,6 @@ void vfs_busy_pages(struct buf *, int clear_modify); > void vfs_unbusy_pages(struct buf *); > int vmapbuf(struct buf *, int); > void vunmapbuf(struct buf *); > -void relpbuf(struct buf *, int *); > void brelvp(struct buf *); > void bgetvp(struct vnode *, struct buf *); > void pbgetbo(struct bufobj *bo, struct buf *bp); > @@ -571,7 +574,6 @@ void pbrelbo(struct buf *); > void pbrelvp(struct buf *); > int allocbuf(struct buf *bp, int size); > void reassignbuf(struct buf *); > -struct buf *trypbuf(int *); > void bwait(struct buf *, u_char, const char *); > void bdone(struct buf *); > > > Modified: head/sys/ufs/ffs/ffs_rawread.c > ============================================================================== > --- head/sys/ufs/ffs/ffs_rawread.c Tue Jan 15 00:52:41 2019 (r343029) > +++ head/sys/ufs/ffs/ffs_rawread.c Tue Jan 15 01:02:16 2019 (r343030) > @@ -74,9 +74,7 @@ int ffs_rawread(struct vnode *vp, struct uio *uio, int > > SYSCTL_DECL(_vfs_ffs); > > -static int ffsrawbufcnt = 4; > -SYSCTL_INT(_vfs_ffs, OID_AUTO, ffsrawbufcnt, CTLFLAG_RD, &ffsrawbufcnt, 0, > - "Buffers available for raw reads"); > +static uma_zone_t ffsraw_pbuf_zone; > > static int allowrawread = 1; > SYSCTL_INT(_vfs_ffs, OID_AUTO, allowrawread, CTLFLAG_RW, &allowrawread, 0, > @@ -90,7 +88,8 @@ static void > ffs_rawread_setup(void *arg __unused) > { > > - ffsrawbufcnt = (nswbuf > 100 ) ? (nswbuf - (nswbuf >> 4)) : nswbuf - 8; > + ffsraw_pbuf_zone = pbuf_zsecond_create("ffsrawpbuf", > + (nswbuf > 100 ) ? (nswbuf - (nswbuf >> 4)) : nswbuf - 8); > } > SYSINIT(ffs_raw, SI_SUB_VM_CONF, SI_ORDER_ANY, ffs_rawread_setup, NULL); > > @@ -296,8 +295,7 @@ ffs_rawread_main(struct vnode *vp, > while (resid > 0) { > > if (bp == NULL) { /* Setup first read */ > - /* XXX: Leave some bufs for swap */ > - bp = getpbuf(&ffsrawbufcnt); > + bp = uma_zalloc(ffsraw_pbuf_zone, M_WAITOK); > pbgetvp(vp, bp); > error = ffs_rawread_readahead(vp, udata, offset, > resid, td, bp); > @@ -305,9 +303,9 @@ ffs_rawread_main(struct vnode *vp, > break; > > if (resid > bp->b_bufsize) { /* Setup fist readahead */ > - /* XXX: Leave bufs for swap */ > if (rawreadahead != 0) > - nbp = trypbuf(&ffsrawbufcnt); > + nbp = uma_zalloc(ffsraw_pbuf_zone, > + M_NOWAIT); > else > nbp = NULL; > if (nbp != NULL) { > @@ -324,7 +322,8 @@ ffs_rawread_main(struct vnode *vp, > nbp); > if (nerror) { > pbrelvp(nbp); > - relpbuf(nbp, &ffsrawbufcnt); > + uma_zfree(ffsraw_pbuf_zone, > + nbp); > nbp = NULL; > } > } > @@ -365,7 +364,7 @@ ffs_rawread_main(struct vnode *vp, > > if (resid <= bp->b_bufsize) { /* No more readaheads */ > pbrelvp(nbp); > - relpbuf(nbp, &ffsrawbufcnt); > + uma_zfree(ffsraw_pbuf_zone, nbp); > nbp = NULL; > } else { /* Setup next readahead */ > nerror = ffs_rawread_readahead(vp, > @@ -379,7 +378,7 @@ ffs_rawread_main(struct vnode *vp, > nbp); > if (nerror != 0) { > pbrelvp(nbp); > - relpbuf(nbp, &ffsrawbufcnt); > + uma_zfree(ffsraw_pbuf_zone, nbp); > nbp = NULL; > } > } > @@ -395,13 +394,13 @@ ffs_rawread_main(struct vnode *vp, > > if (bp != NULL) { > pbrelvp(bp); > - relpbuf(bp, &ffsrawbufcnt); > + uma_zfree(ffsraw_pbuf_zone, bp); > } > if (nbp != NULL) { /* Run down readahead buffer */ > bwait(nbp, PRIBIO, "rawrd"); > vunmapbuf(nbp); > pbrelvp(nbp); > - relpbuf(nbp, &ffsrawbufcnt); > + uma_zfree(ffsraw_pbuf_zone, nbp); > } > > if (error == 0) > > Modified: head/sys/vm/swap_pager.c > ============================================================================== > --- head/sys/vm/swap_pager.c Tue Jan 15 00:52:41 2019 (r343029) > +++ head/sys/vm/swap_pager.c Tue Jan 15 01:02:16 2019 (r343030) > @@ -71,7 +71,6 @@ > #include > __FBSDID("$FreeBSD$"); > > -#include "opt_swap.h" > #include "opt_vm.h" > > #include > @@ -324,9 +323,8 @@ swap_release_by_cred(vm_ooffset_t decr, struct ucred * > > static int swap_pager_full = 2; /* swap space exhaustion (task killing) */ > static int swap_pager_almost_full = 1; /* swap space exhaustion (w/hysteresis)*/ > -static int nsw_rcount; /* free read buffers */ > -static int nsw_wcount_sync; /* limit write buffers / synchronous */ > -static int nsw_wcount_async; /* limit write buffers / asynchronous */ > +static struct mtx swbuf_mtx; /* to sync nsw_wcount_async */ > +static int nsw_wcount_async; /* limit async write buffers */ > static int nsw_wcount_async_max;/* assigned maximum */ > static int nsw_cluster_max; /* maximum VOP I/O allowed */ > > @@ -352,6 +350,8 @@ static struct sx sw_alloc_sx; > (&swap_pager_object_list[((int)(intptr_t)handle >> 4) & (NOBJLISTS-1)]) > > static struct pagerlst swap_pager_object_list[NOBJLISTS]; > +static uma_zone_t swwbuf_zone; > +static uma_zone_t swrbuf_zone; > static uma_zone_t swblk_zone; > static uma_zone_t swpctrie_zone; > > @@ -539,13 +539,13 @@ swap_pager_swap_init(void) > */ > nsw_cluster_max = min((MAXPHYS/PAGE_SIZE), MAX_PAGEOUT_CLUSTER); > > - mtx_lock(&pbuf_mtx); > - nsw_rcount = (nswbuf + 1) / 2; > - nsw_wcount_sync = (nswbuf + 3) / 4; > nsw_wcount_async = 4; > nsw_wcount_async_max = nsw_wcount_async; > - mtx_unlock(&pbuf_mtx); > + mtx_init(&swbuf_mtx, "async swbuf mutex", NULL, MTX_DEF); > > + swwbuf_zone = pbuf_zsecond_create("swwbuf", nswbuf / 4); > + swrbuf_zone = pbuf_zsecond_create("swrbuf", nswbuf / 2); > + > /* > * Initialize our zone, taking the user's requested size or > * estimating the number we need based on the number of pages > @@ -1205,7 +1205,7 @@ swap_pager_getpages(vm_object_t object, vm_page_t *ma, > ("no swap blocking containing %p(%jx)", object, (uintmax_t)pindex)); > > VM_OBJECT_WUNLOCK(object); > - bp = getpbuf(&nsw_rcount); > + bp = uma_zalloc(swrbuf_zone, M_WAITOK); > /* Pages cannot leave the object while busy. */ > for (i = 0, p = bm; i < count; i++, p = TAILQ_NEXT(p, listq)) { > MPASS(p->pindex == bm->pindex + i); > @@ -1406,12 +1406,17 @@ swap_pager_putpages(vm_object_t object, vm_page_t *ma, > * All I/O parameters have been satisfied, build the I/O > * request and assign the swap space. > */ > - if (sync == TRUE) { > - bp = getpbuf(&nsw_wcount_sync); > - } else { > - bp = getpbuf(&nsw_wcount_async); > - bp->b_flags = B_ASYNC; > + if (sync != TRUE) { > + mtx_lock(&swbuf_mtx); > + while (nsw_wcount_async == 0) > + msleep(&nsw_wcount_async, &swbuf_mtx, PVM, > + "swbufa", 0); > + nsw_wcount_async--; > + mtx_unlock(&swbuf_mtx); > } > + bp = uma_zalloc(swwbuf_zone, M_WAITOK); > + if (sync != TRUE) > + bp->b_flags = B_ASYNC; > bp->b_flags |= B_PAGING; > bp->b_iocmd = BIO_WRITE; > > @@ -1634,15 +1639,13 @@ swp_pager_async_iodone(struct buf *bp) > /* > * release the physical I/O buffer > */ > - relpbuf( > - bp, > - ((bp->b_iocmd == BIO_READ) ? &nsw_rcount : > - ((bp->b_flags & B_ASYNC) ? > - &nsw_wcount_async : > - &nsw_wcount_sync > - ) > - ) > - ); > + if (bp->b_flags & B_ASYNC) { > + mtx_lock(&swbuf_mtx); > + if (++nsw_wcount_async == 1) > + wakeup(&nsw_wcount_async); > + mtx_unlock(&swbuf_mtx); > + } > + uma_zfree((bp->b_iocmd == BIO_READ) ? swrbuf_zone : swwbuf_zone, bp); > } > > int > @@ -2627,6 +2630,7 @@ swapgeom_done(struct bio *bp2) > bp->b_ioflags |= BIO_ERROR; > bp->b_resid = bp->b_bcount - bp2->bio_completed; > bp->b_error = bp2->bio_error; > + bp->b_caller1 = NULL; > bufdone(bp); > sp = bp2->bio_caller1; > mtx_lock(&sw_dev_mtx); > @@ -2666,6 +2670,7 @@ swapgeom_strategy(struct buf *bp, struct swdevt *sp) > return; > } > > + bp->b_caller1 = bio; > bio->bio_caller1 = sp; > bio->bio_caller2 = bp; > bio->bio_cmd = bp->b_iocmd; > @@ -2880,7 +2885,7 @@ sysctl_swap_async_max(SYSCTL_HANDLER_ARGS) > if (new > nswbuf / 2 || new < 1) > return (EINVAL); > > - mtx_lock(&pbuf_mtx); > + mtx_lock(&swbuf_mtx); > while (nsw_wcount_async_max != new) { > /* > * Adjust difference. If the current async count is too low, > @@ -2895,11 +2900,11 @@ sysctl_swap_async_max(SYSCTL_HANDLER_ARGS) > } else { > nsw_wcount_async_max -= nsw_wcount_async; > nsw_wcount_async = 0; > - msleep(&nsw_wcount_async, &pbuf_mtx, PSWP, > + msleep(&nsw_wcount_async, &swbuf_mtx, PSWP, > "swpsysctl", 0); > } > } > - mtx_unlock(&pbuf_mtx); > + mtx_unlock(&swbuf_mtx); > > return (0); > } > > Modified: head/sys/vm/vm_pager.c > ============================================================================== > --- head/sys/vm/vm_pager.c Tue Jan 15 00:52:41 2019 (r343029) > +++ head/sys/vm/vm_pager.c Tue Jan 15 01:02:16 2019 (r343030) > @@ -68,6 +68,8 @@ > #include > __FBSDID("$FreeBSD$"); > > +#include "opt_param.h" > + > #include > #include > #include > @@ -85,11 +87,13 @@ __FBSDID("$FreeBSD$"); > #include > #include > #include > +#include > > -int cluster_pbuf_freecnt = -1; /* unlimited to begin with */ > +uma_zone_t pbuf_zone; > +static int pbuf_init(void *, int, int); > +static int pbuf_ctor(void *, int, void *, int); > +static void pbuf_dtor(void *, int, void *); > > -struct buf *swbuf; > - > static int dead_pager_getpages(vm_object_t, vm_page_t *, int, int *, int *); > static vm_object_t dead_pager_alloc(void *, vm_ooffset_t, vm_prot_t, > vm_ooffset_t, struct ucred *); > @@ -167,9 +171,6 @@ struct pagerops *pagertab[] = { > * cleaning requests (NPENDINGIO == 64) * the maximum swap cluster size > * (MAXPHYS == 64k) if you want to get the most efficiency. > */ > -struct mtx_padalign __exclusive_cache_line pbuf_mtx; > -static TAILQ_HEAD(swqueue, buf) bswlist; > -static int bswneeded; > vm_offset_t swapbkva; /* swap buffers kva */ > > void > @@ -177,7 +178,6 @@ vm_pager_init(void) > { > struct pagerops **pgops; > > - TAILQ_INIT(&bswlist); > /* > * Initialize known pagers > */ > @@ -186,30 +186,51 @@ vm_pager_init(void) > (*(*pgops)->pgo_init)(); > } > > +static int nswbuf_max; > + > void > vm_pager_bufferinit(void) > { > - struct buf *bp; > - int i; > > - mtx_init(&pbuf_mtx, "pbuf mutex", NULL, MTX_DEF); > - bp = swbuf; > + /* Main zone for paging bufs. */ > + pbuf_zone = uma_zcreate("pbuf", sizeof(struct buf), > + pbuf_ctor, pbuf_dtor, pbuf_init, NULL, UMA_ALIGN_CACHE, > + UMA_ZONE_VM | UMA_ZONE_NOFREE); > + /* Few systems may still use this zone directly, so it needs a limit. */ > + nswbuf_max += uma_zone_set_max(pbuf_zone, NSWBUF_MIN); > +} > + > +uma_zone_t > +pbuf_zsecond_create(char *name, int max) > +{ > + uma_zone_t zone; > + > + zone = uma_zsecond_create(name, pbuf_ctor, pbuf_dtor, NULL, NULL, > + pbuf_zone); > /* > - * Now set up swap and physical I/O buffer headers. > + * uma_prealloc() rounds up to items per slab. If we would prealloc > + * immediately on every pbuf_zsecond_create(), we may accumulate too > + * much of difference between hard limit and prealloced items, which > + * means wasted memory. > */ > - for (i = 0; i < nswbuf; i++, bp++) { > - TAILQ_INSERT_HEAD(&bswlist, bp, b_freelist); > - BUF_LOCKINIT(bp); > - LIST_INIT(&bp->b_dep); > - bp->b_rcred = bp->b_wcred = NOCRED; > - bp->b_xflags = 0; > - } > + if (nswbuf_max > 0) > + nswbuf_max += uma_zone_set_max(zone, max); > + else > + uma_prealloc(pbuf_zone, uma_zone_set_max(zone, max)); > > - cluster_pbuf_freecnt = nswbuf / 2; > - vnode_pbuf_freecnt = nswbuf / 2 + 1; > - vnode_async_pbuf_freecnt = nswbuf / 2; > + return (zone); > } > > +static void > +pbuf_prealloc(void *arg __unused) > +{ > + > + uma_prealloc(pbuf_zone, nswbuf_max); > + nswbuf_max = -1; > +} > + > +SYSINIT(pbuf, SI_SUB_KTHREAD_BUF, SI_ORDER_ANY, pbuf_prealloc, NULL); > + > /* > * Allocate an instance of a pager of the given type. > * Size, protection and offset parameters are passed in for pagers that > @@ -347,111 +368,34 @@ vm_pager_object_lookup(struct pagerlst *pg_list, void > return (object); > } > > -/* > - * initialize a physical buffer > - */ > - > -/* > - * XXX This probably belongs in vfs_bio.c > - */ > -static void > -initpbuf(struct buf *bp) > +static int > +pbuf_ctor(void *mem, int size, void *arg, int flags) > { > + struct buf *bp = mem; > > - KASSERT(bp->b_bufobj == NULL, ("initpbuf with bufobj")); > - KASSERT(bp->b_vp == NULL, ("initpbuf with vp")); > + bp->b_vp = NULL; > + bp->b_bufobj = NULL; > + > + /* copied from initpbuf() */ > bp->b_rcred = NOCRED; > bp->b_wcred = NOCRED; > - bp->b_qindex = 0; /* On no queue (QUEUE_NONE) */ > - bp->b_kvabase = (caddr_t)(MAXPHYS * (bp - swbuf)) + swapbkva; > + bp->b_qindex = 0; /* On no queue (QUEUE_NONE) */ > bp->b_data = bp->b_kvabase; > - bp->b_kvasize = MAXPHYS; > - bp->b_flags = 0; > bp->b_xflags = 0; > + bp->b_flags = 0; > bp->b_ioflags = 0; > bp->b_iodone = NULL; > bp->b_error = 0; > BUF_LOCK(bp, LK_EXCLUSIVE, NULL); > - buf_track(bp, __func__); > -} > > -/* > - * allocate a physical buffer > - * > - * There are a limited number (nswbuf) of physical buffers. We need > - * to make sure that no single subsystem is able to hog all of them, > - * so each subsystem implements a counter which is typically initialized > - * to 1/2 nswbuf. getpbuf() decrements this counter in allocation and > - * increments it on release, and blocks if the counter hits zero. A > - * subsystem may initialize the counter to -1 to disable the feature, > - * but it must still be sure to match up all uses of getpbuf() with > - * relpbuf() using the same variable. > - * > - * NOTE: pfreecnt can be NULL, but this 'feature' will be removed > - * relatively soon when the rest of the subsystems get smart about it. XXX > > *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** > From owner-svn-src-all@freebsd.org Thu Jan 17 22:41:08 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 3AFF0148225C; Thu, 17 Jan 2019 22:41:08 +0000 (UTC) (envelope-from carpeddiem@gmail.com) Received: from mail-io1-f54.google.com (mail-io1-f54.google.com [209.85.166.54]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id D1F1B889E1; Thu, 17 Jan 2019 22:41:07 +0000 (UTC) (envelope-from carpeddiem@gmail.com) Received: by mail-io1-f54.google.com with SMTP id g8so9215327iok.4; Thu, 17 Jan 2019 14:41:07 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=fvADXouP4pgcCvLdrgD1eS3rq+3uIXnz+zjvchfFV5M=; b=aidGT6zBWlSVdNoafIvVauVKqlwBzDZrig8LlIkKSk6JFHUaQ8oPwHDJtyftz7u8xF lMYXGWmZoJ4nqOtHFfNpRx1lyobAAQtdAMBnTOQ+Jaevu2sx54ihhuVPbTBcALyn3jhV pyarMxK8/NjqlChZLoTBXgH8OOjonmk7GxCdWaK/yrgCABXUmEnWJmoQVHZwdF2A0lSM DztZ+rUgq4jH4VFUkRMJPN/40nbY43qhMZ8ouWwCL7rXo5Z7tVy9Vwlj8+c3S871inKW Qf7VGj4L0W+yTQ+DuP/XNdIjWisrJbJHgDc5LKVzpLqg42TeShvxKSgeTGQ7UBcAKcD+ F8rA== X-Gm-Message-State: AJcUukcQR7nwgtMC3uo8Y4GV/OwvB3DNU46c8XJyhMXE6S8q9VPDCbwL UtrBDMotGSQVRoA08VZOBlB0iiz2MXfp8vuM3JM= X-Google-Smtp-Source: ALg8bN65UtD6cvgnSdCmmBFiO+WDLWu4wI36EWDCnBN3Mh6zCkmx59wXO922BhV88mFvQ1001QegDQo36uxA93iPNLw= X-Received: by 2002:a6b:fe13:: with SMTP id x19mr7667594ioh.294.1547764384384; Thu, 17 Jan 2019 14:33:04 -0800 (PST) MIME-Version: 1.0 References: <201901172138.x0HLcwBp082954@repo.freebsd.org> In-Reply-To: From: Ed Maste Date: Thu, 17 Jan 2019 17:32:52 -0500 Message-ID: Subject: Re: svn commit: r343122 - head/usr.sbin/freebsd-update To: Xin LI Cc: "src-committers@freebsd.org" , "svn-src-all@freebsd.org" , "svn-src-head@freebsd.org" Content-Type: text/plain; charset="UTF-8" X-Rspamd-Queue-Id: D1F1B889E1 X-Spamd-Bar: ------ Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-6.93 / 15.00]; NEURAL_HAM_MEDIUM(-1.00)[-1.000,0]; NEURAL_HAM_SHORT(-0.93)[-0.928,0]; REPLY(-4.00)[]; NEURAL_HAM_LONG(-1.00)[-1.000,0] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 17 Jan 2019 22:41:08 -0000 On Thu, 17 Jan 2019 at 16:46, Xin LI wrote: > > On Thu, Jan 17, 2019 at 1:39 PM Ed Maste wrote: >> >> Author: emaste >> Date: Thu Jan 17 21:38:57 2019 >> New Revision: 343122 >> URL: https://svnweb.freebsd.org/changeset/base/343122 >> >> Log: >> freebsd-update: Clarify unsupported release upgrade error message > > I think this would break upgrading from e.g. -BETA or -RC, which is supported? Indeed, followup coming shortly. From owner-svn-src-all@freebsd.org Thu Jan 17 22:42:07 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id A3CBD148235D; Thu, 17 Jan 2019 22:42:07 +0000 (UTC) (envelope-from yaneurabeya@gmail.com) Received: from mail-pf1-x42b.google.com (mail-pf1-x42b.google.com [IPv6:2607:f8b0:4864:20::42b]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 2028B88D22; Thu, 17 Jan 2019 22:42:07 +0000 (UTC) (envelope-from yaneurabeya@gmail.com) Received: by mail-pf1-x42b.google.com with SMTP id z9so5542701pfi.2; Thu, 17 Jan 2019 14:42:07 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:message-id:mime-version:subject:date:in-reply-to:cc:to :references; bh=SzzKjqQHsR533bgl0deVFjugbvZDMIN4uGzcj7mWG7c=; b=DlaaF13HNgj+dBrckJI5RcF9RhYN/nEEegfCq+Bhyry3dvpAa5fqg9QRAP7nf7+5TI PhVYxow3JP8MeFxQ1HqK/O4Zyc8cRBUljmqyd0E4kl8kPC15mPP+NCUpErbYSVRycEgd 0hBL5Sb3UXXaQo6Fa+xzZzbphtZ94y7w7etOWAr2R7acltvJvh8vb7cu4oPT3tSzGfWJ Niv3Z5UqL2Cxe8adcbWzOvvUIVrWKuq3s2lQN8Gc2HXAVfL31O6mSu94cVJaS57+RwBm NxLdPwdjkbhBx0DLXdGuybNc9jNdgi7xYrmkuMYRcULPSbx9NaXOdKUlRUCEErGSgJJS Bpfg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:message-id:mime-version:subject:date :in-reply-to:cc:to:references; bh=SzzKjqQHsR533bgl0deVFjugbvZDMIN4uGzcj7mWG7c=; b=icSpj6UERem5m9NdBfJ1KS9R1YaXm6Gpq+aQPLq1vtpe8zg5aL8Ar1ttIuIpfdRup1 rzfTz3VVCa4s+7y+wg08N/OxtfJcMKJJZbXgl7u0lh07wqKq1XReCFPD70YWea17/yrx OhUgJ02YTpE/Klcrlgf9+D2jNGJrybLv+ngj52hYw3B2PWFnK9IfPY71jd5JjoCCSt+V 3UhKr8w+IOTvtepHMixIVdgVhZI3y5QFdJJEzGq6KpUjE+XE+hSq6+TaQb93dPSXfr6N VH7Y6Td118i7l6usFcYBQJ4fe2B+3+TVmtl+VW2vbYhMWrmH7eCy30qPNdw6U/STbVx1 RZMA== X-Gm-Message-State: AJcUukdQtZs82u7yGROUSeHPxyfj4SrJxfonfretLDe3v53B5Kc+s8hf jQB3vOtgU7Pu8VRgJXTapXQWEbGN X-Google-Smtp-Source: ALg8bN4ilXWkBcJFwBQieuoXYHuFKS2rja3R8yTAKhXkXV8dDyOKkEaiNs9S9tvU4O4ANLGWrBe4Tw== X-Received: by 2002:a63:ce50:: with SMTP id r16mr15001119pgi.217.1547764925698; Thu, 17 Jan 2019 14:42:05 -0800 (PST) Received: from [10.252.30.249] ([198.134.98.50]) by smtp.gmail.com with ESMTPSA id 62sm2909282pgc.61.2019.01.17.14.42.04 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 17 Jan 2019 14:42:04 -0800 (PST) From: Enji Cooper Message-Id: Content-Type: multipart/signed; boundary="Apple-Mail=_6CB1620B-6707-4F06-B7FF-9F1ECBA36F56"; protocol="application/pgp-signature"; micalg=pgp-sha256 Mime-Version: 1.0 (Mac OS X Mail 11.5 \(3445.9.1\)) Subject: Re: svn commit: r343118 - in head/usr.sbin: . trim Date: Thu, 17 Jan 2019 14:42:04 -0800 In-Reply-To: Cc: Cy Schubert , "Conrad E. Meyer" , src-committers , svn-src-all@freebsd.org, svn-src-head@freebsd.org To: Maxim Sobolev References: <201901172046.x0HKkvWs011502@slippy.cwsent.com> X-Mailer: Apple Mail (2.3445.9.1) X-Rspamd-Queue-Id: 2028B88D22 X-Spamd-Bar: ------ Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-6.97 / 15.00]; NEURAL_HAM_MEDIUM(-1.00)[-1.000,0]; NEURAL_HAM_SHORT(-0.97)[-0.975,0]; REPLY(-4.00)[]; NEURAL_HAM_LONG(-1.00)[-1.000,0] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 17 Jan 2019 22:42:07 -0000 --Apple-Mail=_6CB1620B-6707-4F06-B7FF-9F1ECBA36F56 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=utf-8 > On Jan 17, 2019, at 2:25 PM, Maxim Sobolev = wrote: >=20 > What I think we really need is some way to easily porti-ze useful = stuff that would otherwise go into /usr/[s]bin, so adding things would = be just as easy as hooking up SUBDIR into usr.[s]bin/Makefile. Yes, I = know, this is topic almost as old as the FreeBSD Project itself, but = perhaps we just did not approach it the right way. It was always the = idea that we would just move bunch of stuff from src/usr.[s]bin repo = into ports/. Which brings several important question such as "who is to = host the distfile"? "where sources hosted", "who is to update the port = when changes happen?" etc. Projects like this could be hosted on GitHub. Ports supports GitHub out = of the box, so this seems like a low barrier for entry (the bonus of = doing this is that the projects could potentially be used by other = non-FreeBSD projects, and contributed by others outside the FreeBSD = project; the downside is having to deal with FreeBSD CI, as Travis CI = only supports Linux (IIRC making Travis support FreeBSD is a non-trivial = project, but it=E2=80=99s likely a very worthwhile goal, as it would = make it easier to catch issues upfront with third-party projects that = FreeBSD consumes, like llvm), enforcing style (can be done with git = commit hooks and GitHub checks), etc. I would really like to do these = things because it=E2=80=99s difficult getting folks to support FreeBSD = in third-party projects as-is. Lowering the barrier of entry would allow = FreeBSD and its developers to better scale (and make FreeBSD more of a = first-class OS). > Perhaps even by forking the whole ports idea into a smaller = closely-guarged subset. Something like a new baseports repository, which = might have structure like baseports/usr.bin/xxx, baseports/usr.sbin/yyy = etc. Then add some automagic glue to kick in on every commit and = transfer this into valid ports, which is going to be packaged by the = poudriere and such. This way we could reduce amount of port-foo average = src committer needs in order to maintain code. I am almost tempted to = sit and write something over the next weekend or few of thereofs. Using = usr.sbin/trim as an example. Please see my above comment. Cheers! -Enji --Apple-Mail=_6CB1620B-6707-4F06-B7FF-9F1ECBA36F56 Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename=signature.asc Content-Type: application/pgp-signature; name=signature.asc Content-Description: Message signed with OpenPGP -----BEGIN PGP SIGNATURE----- iQIzBAEBCAAdFiEEtvtxN6kOllEF3nmX5JFNMZeDGN4FAlxBBLwACgkQ5JFNMZeD GN5Oog//eg4gG5Onqnn9+CKOMxhk+ELELTyd4gb2Yx81EmpBdHpusExAI8eZfhzQ e5Grt7jipkNeqPUaLlEmRGBbYSHbq7mE2tHQ8SIkLdWHt72YZ2Rco43TbXlmzzIF ka+A1A+6jkBPk1qez1RHYoMs2F3jdND+1SvGnwAqWeMklMD9RAfy0QCFe3uh87cZ sApG8b8zzn7hk3VTGn1pJJzKZGZUOCYxBrZcO6zckEdiqoLmMPsCcRHG3/xJ7jRW MyiblPqeKdNMEXPzKmO/RRb5Dbjq2hXbrKWI0HCb8EwKt8KUCOWSIy+C7OLBxlQS ArpJA+xo8zVvMitb+kekxupjfYBZlPBDOV2aSQLCXAZj4jQI9hqRQOqYBw0Kt72q FH5HjteRrcIdaamrHt6lRvYPBe4SBWvd7jomFhxCiWSg+jvx0rC9zFC+4uSzqEsr v16ZLSmnPP0e5OltgGP0JM7fNkMxhU2o9VVglaR3OhhuouvXml4iXGncsdoIeeEn E9qNm6xW5GnPdu81CRgtpOAQ6JHbJ2/rYcgPt7SAiVh3Qm2RNFyLbGcWXYTo5Pgv sCEwhR2ENCgwpqpFSHkKB0wpWE3ZskTjMFhvirDYm91R/6NRuEPc5k8gpMEOOKii E8Mbb2Y/pTd4iK8O01wL4dPkFfLkWZsNBP6n5ootb1hI7iKmKjE= =RYxu -----END PGP SIGNATURE----- --Apple-Mail=_6CB1620B-6707-4F06-B7FF-9F1ECBA36F56-- From owner-svn-src-all@freebsd.org Thu Jan 17 22:43:31 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 3FCD01482623; Thu, 17 Jan 2019 22:43:31 +0000 (UTC) (envelope-from cse.cem@gmail.com) Received: from mail-it1-f176.google.com (mail-it1-f176.google.com [209.85.166.176]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id BE68989082; Thu, 17 Jan 2019 22:43:30 +0000 (UTC) (envelope-from cse.cem@gmail.com) Received: by mail-it1-f176.google.com with SMTP id m62so4072615ith.5; Thu, 17 Jan 2019 14:43:30 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:reply-to :from:date:message-id:subject:to:cc:content-transfer-encoding; bh=0Ie4QDBR9bkWLCtsoaBF64uD85dS5Hw31mojuNcIinQ=; b=ntiFCRzuK/nCJsBmOhocOwh2Ps78nK2O0WPQJlKp3bdmVr2YIM19OuQGRDlJeeHcXA UD7KWgKCr6PtoE9J2QZXFTwKXJfKF+Vv1yG9ouqofB/43nBtcTb3GlDkg2derVGQJ7hE 6eI5tpTsn+ooku8N8rS1Jil8Pq24YhW35yl5mggf5no+tOXH5qmQF/W2BYUFiyO2PU6m Fr0AL9TVT0j/6+UPcEeVaA6R1o/79Yk1uPnRB5qnaqoi8oSaLRd3ZrWApr6/yVt2hEFl J+y3SOIh8Y2GeFRHSDkc5usR9x9bS6KGxqc/Lt8OT1BB3O1sgrEA3uZ1H9lsosa/CKZN rETA== X-Gm-Message-State: AJcUukfxJC5EYiOtc4x7vEMD/9LQCRLUcyAaLc1dsWR/6RW7lS/rcUWo vF1mHZSvynwQipjcKmsyBgMPQe3+ X-Google-Smtp-Source: ALg8bN46bsSikaFfJRk5wUSPBE45S7K3Wep/WWDv6YG5p/jGhqofcVmqlu+WtqP/WRGK9T3bBAhufg== X-Received: by 2002:a24:2104:: with SMTP id e4mr9090720ita.59.1547761548205; Thu, 17 Jan 2019 13:45:48 -0800 (PST) Received: from mail-io1-f49.google.com (mail-io1-f49.google.com. [209.85.166.49]) by smtp.gmail.com with ESMTPSA id y5sm940866ioj.9.2019.01.17.13.45.47 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 17 Jan 2019 13:45:47 -0800 (PST) Received: by mail-io1-f49.google.com with SMTP id b23so9062063ios.10; Thu, 17 Jan 2019 13:45:47 -0800 (PST) X-Received: by 2002:a6b:6111:: with SMTP id v17mr9388524iob.107.1547761547775; Thu, 17 Jan 2019 13:45:47 -0800 (PST) MIME-Version: 1.0 References: <201901171808.x0HI80jC068564@repo.freebsd.org> <2d239dc0-915c-2d2b-0936-a40af5e9ead9@freebsd.org> In-Reply-To: <2d239dc0-915c-2d2b-0936-a40af5e9ead9@freebsd.org> Reply-To: cem@freebsd.org From: Conrad Meyer Date: Thu, 17 Jan 2019 13:45:36 -0800 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: svn commit: r343118 - in head/usr.sbin: . trim To: Eugene Grosbein Cc: src-committers , svn-src-all@freebsd.org, svn-src-head@freebsd.org Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Rspamd-Queue-Id: BE68989082 X-Spamd-Bar: ------ Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-6.97 / 15.00]; NEURAL_HAM_MEDIUM(-1.00)[-1.000,0]; NEURAL_HAM_SHORT(-0.97)[-0.974,0]; REPLY(-4.00)[]; TAGGED_FROM(0.00)[]; NEURAL_HAM_LONG(-1.00)[-1.000,0] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 17 Jan 2019 22:43:31 -0000 On Thu, Jan 17, 2019 at 1:16 PM Eugene Grosbein wrote: > > 18.01.2019 3:23, Conrad Meyer =D0=BF=D0=B8=D1=88=D0=B5=D1=82: > > > Please back it out; stop attributing code review to "hackers@," which > > can not (it's a list, not individuals) and did not review this > > changeset; and put it on phabricator for actual review. > > There is already https://reviews.freebsd.org/D18380 by imp > and there were over 6 weeks since it had an update. > Newly committed code has most of its changes. Your response does not address *any* of the above concerns. It's just unrelated. The review you linked to isn't one you submitted for this change; it's Warner's, and that one stalled because you were such a jerk to him last time that he needed time off from you. If you want to socialize, revive, or expedite someone else's review, maybe add a new comment to the review, or post a discussion hackers@, or something like that. You still can't attribute code review to hackers@, especially as no such review happened. Conrad From owner-svn-src-all@freebsd.org Thu Jan 17 23:18:52 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id EE2A01483552 for ; Thu, 17 Jan 2019 23:18:51 +0000 (UTC) (envelope-from sobomax@sippysoft.com) Received: from mail-oi1-f180.google.com (mail-oi1-f180.google.com [209.85.167.180]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 8A59F8A26E for ; Thu, 17 Jan 2019 23:18:51 +0000 (UTC) (envelope-from sobomax@sippysoft.com) Received: by mail-oi1-f180.google.com with SMTP id i6so7586914oia.6 for ; Thu, 17 Jan 2019 15:18:51 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=HALbC2X3d6Vh62ZWNRm+ai/mxF5pQFs2pByi+RlNRzw=; b=g+ah3WAT9dJr8YOdOnHfBo/UrFT/1hRndidLCcLaaCKcIGZgz/v8u4FenzIDOwHUEH F52djfafGkVl2fXQ6R7rij3EYQzm0JVypmOoM5wpu2G8N9zj7u/LL1lR9ugOxRXyRLZ5 A+Bs/EuOyNyLA5AN+X6eWIHeeI3zKnPvbsuTXHxqnWCRhI2KOPd0UK52FSOjUQHZcxub mMnMfc+Ii6LtFJi9nA8+tW56iR/z0GVT6DWMg2VkZtDHS+cQXqgV7oMIBYVLTMr257H7 yfUbKVNuJJq7oyLUIKyVyl8CiKAiaVx7KTjpRcWn7xr6CBMmYd7u9oDvOSKfThGb6fHd UBEQ== X-Gm-Message-State: AJcUukevyaWgjlGmsTeHU1PZv/kVIy1E3gCRx4y+vbAKp2h0fqb4z1rA Mv+GJEXgQ+nhhFMvAuBdvcqPCzkBHiFtZl6zaHEW1g== X-Google-Smtp-Source: ALg8bN7SIF70e3ZzTiGwy3FtwmD6iFowOqS1ihQE7SuKxfDZRBzQsE6JA7L1FBtLO6kQyHS72NnId+MfRxgM5V+5wOw= X-Received: by 2002:aca:c003:: with SMTP id q3mr8343031oif.119.1547767129870; Thu, 17 Jan 2019 15:18:49 -0800 (PST) MIME-Version: 1.0 References: <201901172046.x0HKkvWs011502@slippy.cwsent.com> In-Reply-To: From: Maxim Sobolev Date: Thu, 17 Jan 2019 15:18:39 -0800 Message-ID: Subject: Packaging base system (again) [Was: svn commit: r343118 - in head/usr.sbin: . trim] To: Enji Cooper Cc: src-committers , svn-src-all@freebsd.org, svn-src-head@freebsd.org X-Rspamd-Queue-Id: 8A59F8A26E X-Spamd-Bar: ------ Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-6.97 / 15.00]; NEURAL_HAM_MEDIUM(-1.00)[-1.000,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; REPLY(-4.00)[]; NEURAL_HAM_SHORT(-0.97)[-0.967,0] Content-Type: text/plain; charset="UTF-8" X-Content-Filtered-By: Mailman/MimeDel 2.1.29 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 17 Jan 2019 23:18:52 -0000 On Thu, Jan 17, 2019 at 2:42 PM Enji Cooper wrote: > > Perhaps even by forking the whole ports idea into a smaller > closely-guarged subset. Something like a new baseports repository, which > might have structure like baseports/usr.bin/xxx, baseports/usr.sbin/yyy > etc. Then add some automagic glue to kick in on every commit and transfer > this into valid ports, which is going to be packaged by the poudriere and > such. This way we could reduce amount of port-foo average src committer > needs in order to maintain code. I am almost tempted to sit and write > something over the next weekend or few of thereofs. Using usr.sbin/trim as > an example. > > Please see my above comment. > Well, I don't think your comment really addresses my concerns here. Correct me if I am wrong, but you seem suggesting that every src developer would also need some external account (github in this example) to maintain his or her chunk of code independently of everyone else's. This is pretty much a no-go from starters. There are also many more major issues with such approach, such as completely different branching model for src and ports as an example. ports is a good framework in general, for maintaining software produced by external entities. I don't feel it's very appropriate for maintaining software produced by the Project itself, though, due to complexity inherited with that. We need something simpler and more self-consistent, at the same time I see no reasons why it could not utilize some if not all tooling with we build around ports/Mk over the years. IMHO. -Max From owner-svn-src-all@freebsd.org Thu Jan 17 23:21:03 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 7FC6314836A2; Thu, 17 Jan 2019 23:21:03 +0000 (UTC) (envelope-from cem@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 27B1B8A462; Thu, 17 Jan 2019 23:21:03 +0000 (UTC) (envelope-from cem@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 0D46121483; Thu, 17 Jan 2019 23:21:03 +0000 (UTC) (envelope-from cem@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x0HNL2cX036089; Thu, 17 Jan 2019 23:21:02 GMT (envelope-from cem@FreeBSD.org) Received: (from cem@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x0HNL2f4036088; Thu, 17 Jan 2019 23:21:02 GMT (envelope-from cem@FreeBSD.org) Message-Id: <201901172321.x0HNL2f4036088@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: cem set sender to cem@FreeBSD.org using -f From: Conrad Meyer Date: Thu, 17 Jan 2019 23:21:02 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r343125 - head/sys/dev/ioat X-SVN-Group: head X-SVN-Commit-Author: cem X-SVN-Commit-Paths: head/sys/dev/ioat X-SVN-Commit-Revision: 343125 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 27B1B8A462 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.96 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_SHORT(-0.97)[-0.966,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_LONG(-1.00)[-0.999,0] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 17 Jan 2019 23:21:03 -0000 Author: cem Date: Thu Jan 17 23:21:02 2019 New Revision: 343125 URL: https://svnweb.freebsd.org/changeset/base/343125 Log: ioat(4): Set __result_use_check on ioat_acquire_reserve Even M_WAITOK callers must check for failure. For example, if the device is quiescing, either due to automatic error-recovery induced reset, or due to administrative detach, the routine will return ENXIO and the acquire reference will not be held. So, there is no mode in which it is safe to assume the routine succeeds without checking. Sponsored by: Dell EMC Isilon Modified: head/sys/dev/ioat/ioat.h Modified: head/sys/dev/ioat/ioat.h ============================================================================== --- head/sys/dev/ioat/ioat.h Thu Jan 17 22:00:02 2019 (r343124) +++ head/sys/dev/ioat/ioat.h Thu Jan 17 23:21:02 2019 (r343125) @@ -173,7 +173,8 @@ void ioat_release(bus_dmaengine_t dmaengine); * * On failure, the caller does not hold the dmaengine. */ -int ioat_acquire_reserve(bus_dmaengine_t dmaengine, unsigned n, int mflags); +int ioat_acquire_reserve(bus_dmaengine_t dmaengine, unsigned n, int mflags) + __result_use_check; /* * Issue a blockfill operation. The 64-bit pattern 'fillpattern' is written to From owner-svn-src-all@freebsd.org Thu Jan 17 23:22:57 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 471C41483939; Thu, 17 Jan 2019 23:22:57 +0000 (UTC) (envelope-from brooks@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 B79C08A87B; Thu, 17 Jan 2019 23:22:56 +0000 (UTC) (envelope-from brooks@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1: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 A8F33215FB; Thu, 17 Jan 2019 23:22:56 +0000 (UTC) (envelope-from brooks@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x0HNMuGu040235; Thu, 17 Jan 2019 23:22:56 GMT (envelope-from brooks@FreeBSD.org) Received: (from brooks@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x0HNMu9h040234; Thu, 17 Jan 2019 23:22:56 GMT (envelope-from brooks@FreeBSD.org) Message-Id: <201901172322.x0HNMu9h040234@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: brooks set sender to brooks@FreeBSD.org using -f From: Brooks Davis Date: Thu, 17 Jan 2019 23:22: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: r343126 - stable/12/sys/sys X-SVN-Group: stable-12 X-SVN-Commit-Author: brooks X-SVN-Commit-Paths: stable/12/sys/sys X-SVN-Commit-Revision: 343126 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: B79C08A87B X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.96 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_SHORT(-0.96)[-0.963,0]; NEURAL_HAM_LONG(-1.00)[-0.999,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 17 Jan 2019 23:22:57 -0000 Author: brooks Date: Thu Jan 17 23:22:56 2019 New Revision: 343126 URL: https://svnweb.freebsd.org/changeset/base/343126 Log: MFC r342398: Enable sys/random.h #include from C++ And bump __FreeBSD_version, just in case. PR: 234180 Submitted by: Ralf van der Enden Modified: stable/12/sys/sys/param.h stable/12/sys/sys/random.h Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/sys/param.h ============================================================================== --- stable/12/sys/sys/param.h Thu Jan 17 23:21:02 2019 (r343125) +++ stable/12/sys/sys/param.h Thu Jan 17 23:22:56 2019 (r343126) @@ -60,7 +60,7 @@ * in the range 5 to 9. */ #undef __FreeBSD_version -#define __FreeBSD_version 1200501 /* Master, propagated to newvers */ +#define __FreeBSD_version 1200502 /* Master, propagated to newvers */ /* * __FreeBSD_kernel__ indicates that this system uses the kernel of FreeBSD, Modified: stable/12/sys/sys/random.h ============================================================================== --- stable/12/sys/sys/random.h Thu Jan 17 23:21:02 2019 (r343125) +++ stable/12/sys/sys/random.h Thu Jan 17 23:22:56 2019 (r343126) @@ -157,6 +157,9 @@ void random_harvest_deregister_source(enum random_entr #define GRND_NONBLOCK 0x1 #define GRND_RANDOM 0x2 + +__BEGIN_DECLS ssize_t getrandom(void *buf, size_t buflen, unsigned int flags); +__END_DECLS #endif /* _SYS_RANDOM_H_ */ From owner-svn-src-all@freebsd.org Fri Jan 18 00:08:38 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 6C1FB1485089; Fri, 18 Jan 2019 00:08:38 +0000 (UTC) (envelope-from freebsd@pdx.rh.CN85.dnsmgr.net) Received: from pdx.rh.CN85.dnsmgr.net (br1.CN84in.dnsmgr.net [69.59.192.140]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id D54788C4C2; Fri, 18 Jan 2019 00:08:37 +0000 (UTC) (envelope-from freebsd@pdx.rh.CN85.dnsmgr.net) Received: from pdx.rh.CN85.dnsmgr.net (localhost [127.0.0.1]) by pdx.rh.CN85.dnsmgr.net (8.13.3/8.13.3) with ESMTP id x0I08Tjs052764; Thu, 17 Jan 2019 16:08:29 -0800 (PST) (envelope-from freebsd@pdx.rh.CN85.dnsmgr.net) Received: (from freebsd@localhost) by pdx.rh.CN85.dnsmgr.net (8.13.3/8.13.3/Submit) id x0I08THg052763; Thu, 17 Jan 2019 16:08:29 -0800 (PST) (envelope-from freebsd) From: "Rodney W. Grimes" Message-Id: <201901180008.x0I08THg052763@pdx.rh.CN85.dnsmgr.net> Subject: Re: svn commit: r343118 - in head/usr.sbin: . trim In-Reply-To: To: Maxim Sobolev Date: Thu, 17 Jan 2019 16:08:29 -0800 (PST) CC: Cy Schubert , "Conrad E. Meyer" , src-committers , svn-src-all@freebsd.org, svn-src-head@freebsd.org Reply-To: rgrimes@freebsd.org X-Mailer: ELM [version 2.4ME+ PL121h (25)] MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=US-ASCII X-Rspamd-Queue-Id: D54788C4C2 X-Spamd-Bar: ------ Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-6.95 / 15.00]; NEURAL_HAM_MEDIUM(-1.00)[-1.000,0]; NEURAL_HAM_SHORT(-0.95)[-0.954,0]; REPLY(-4.00)[]; NEURAL_HAM_LONG(-1.00)[-1.000,0] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 18 Jan 2019 00:08:38 -0000 > What I think we really need is some way to easily porti-ze useful stuff > that would otherwise go into /usr/[s]bin, so adding things would be just as > easy as hooking up SUBDIR into usr.[s]bin/Makefile. Yes, I know, this is > topic almost as old as the FreeBSD Project itself, but perhaps we just did > not approach it the right way. It was always the idea that we would just > move bunch of stuff from src/usr.[s]bin repo into ports/. Which brings > several important question such as "who is to host the distfile"? "where > sources hosted", "who is to update the port when changes happen?" etc. > > Perhaps even by forking the whole ports idea into a smaller closely-guarged > subset. Something like a new baseports repository, which might have > structure like baseports/usr.bin/xxx, baseports/usr.sbin/yyy etc. Then add > some automagic glue to kick in on every commit and transfer this into valid > ports, which is going to be packaged by the poudriere and such. This way we > could reduce amount of port-foo average src committer needs in order to > maintain code. I am almost tempted to sit and write something over the next > weekend or few of thereofs. Using usr.sbin/trim as an example. Couldnt the "distribution" just live as files commited into the ports tree as a "work" hierarcy and the top level file be marked as no fetch. We use to stick small stuff in ports by putting there files in files/ and having that work IIRC. I really really dislike the idea of putting stuff from base in external repositories and then fetching them, something just feels fundementally wrong about that. > -Max > > On Thu, Jan 17, 2019 at 12:47 PM Cy Schubert > wrote: > > > In message > il.com> > > , Conrad Meyer writes: > > > On Thu, Jan 17, 2019 at 12:22 PM Cy Schubert > > wrot > > > e: > > > > This is wrong. IIRC there was discussion that this should be in dd(1). > > > > Why not submit a revision to add the functionality to dd? > > > > > > Well, it's wrong, but not because we need another weird dd mode. dd > > > is hard enough to use already. > > > > I've never found dd confusing. What's wrong conv=erase? > > > > If it must stay, sderase is a better name. That's really what it does. > > > > Ports maybe? > > > > > > -- > > Cheers, > > Cy Schubert > > FreeBSD UNIX: Web: http://www.FreeBSD.org > > > > The need of the many outweighs the greed of the few. > > > > > > > > -- Rod Grimes rgrimes@freebsd.org From owner-svn-src-all@freebsd.org Fri Jan 18 00:12:36 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id E35601485340 for ; Fri, 18 Jan 2019 00:12:35 +0000 (UTC) (envelope-from kevin.bowling@kev009.com) Received: from mail-it1-x132.google.com (mail-it1-x132.google.com [IPv6:2607:f8b0:4864:20::132]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 7E6A58C8FE for ; Fri, 18 Jan 2019 00:12:35 +0000 (UTC) (envelope-from kevin.bowling@kev009.com) Received: by mail-it1-x132.google.com with SMTP id z7so4371465iti.0 for ; Thu, 17 Jan 2019 16:12:35 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kev009.com; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=R2ek3BtAJjNbrFlYaNXLeYo/CdRPnLa8OPk9Wpgm/Uo=; b=NBzngUZ81IGJ1uz5QtdN3p0wHb4vo1+I4DjLj3+aHqJ0uh02NyLtOs1KpLgShVy/80 hvdXvtOrjM1uC8a6UHmsLGxvRna13URNNn8EQ+12OUce1Z7h4+pEF24Rv5u2T3tS1Hl5 IE3lV0LQ6d1zsKngK82MJQBdbpgmpUtcei8ww= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=R2ek3BtAJjNbrFlYaNXLeYo/CdRPnLa8OPk9Wpgm/Uo=; b=W+n2fEndfGe+nqe0/uRqwMqxH5zN5I//aRSnzTWtMbxyKp3ogdjAW9S2q0Mzpv4u56 sOjyZh+hES1a0QnYurYdDtLCUbUZzeZNE/nGhVkwsNl7+0TObWkoe0TprU3d5+c05Sdo h1h/RvBE8H9SWp6aSr8CSECL+cYJ+dX3AO/uqxP05BV9di84kHrTEtSK/AfoztDc6PHG K3qWd8d04EjaWgsMkG/UWnm3CGNE7igmnzlpnhjQk1bdjUKjfmNYiBKRP/XrepBAehMB BE9MkmgeSn+cEjJfJ97+py/Slb5m9MRtpXgnuzmzMDkOJTfLWDk/8ie5rOj7lLklfRUH iPAQ== X-Gm-Message-State: AJcUukckyLpKHgB0NSuSXrO6ucEw1lvFaZsBmsB5aFZEnTAShRiFcGpt 2/iry/Tj+Ft4Z8UafASGiiYeWRaD/xzuCpqYG8kXVw== X-Google-Smtp-Source: ALg8bN7zlzj8rFyig/DyECqHBSj5op07xpOIrqRFKZ1TCV/0f6JX2db4dAaoqgb/S41X116cmfMkHkShFbpw8bqY65c= X-Received: by 2002:a02:f42:: with SMTP id h63mr9500495jad.133.1547770354652; Thu, 17 Jan 2019 16:12:34 -0800 (PST) MIME-Version: 1.0 References: <201901172321.x0HNL2f4036088@repo.freebsd.org> In-Reply-To: <201901172321.x0HNL2f4036088@repo.freebsd.org> From: Kevin Bowling Date: Thu, 17 Jan 2019 17:12:23 -0700 Message-ID: Subject: Re: svn commit: r343125 - head/sys/dev/ioat To: Conrad Meyer Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-Rspamd-Queue-Id: 7E6A58C8FE X-Spamd-Bar: ------ Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-6.97 / 15.00]; NEURAL_HAM_MEDIUM(-1.00)[-1.000,0]; NEURAL_HAM_SHORT(-0.97)[-0.967,0]; REPLY(-4.00)[]; NEURAL_HAM_LONG(-1.00)[-1.000,0] Content-Type: text/plain; charset="UTF-8" X-Content-Filtered-By: Mailman/MimeDel 2.1.29 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 18 Jan 2019 00:12:36 -0000 Out of curiosity are you using this driver? Any performance data? On Thu, Jan 17, 2019 at 4:21 PM Conrad Meyer wrote: > Author: cem > Date: Thu Jan 17 23:21:02 2019 > New Revision: 343125 > URL: https://svnweb.freebsd.org/changeset/base/343125 > > Log: > ioat(4): Set __result_use_check on ioat_acquire_reserve > > Even M_WAITOK callers must check for failure. For example, if the > device is > quiescing, either due to automatic error-recovery induced reset, or due > to > administrative detach, the routine will return ENXIO and the acquire > reference will not be held. So, there is no mode in which it is safe to > assume the routine succeeds without checking. > > Sponsored by: Dell EMC Isilon > > Modified: > head/sys/dev/ioat/ioat.h > > Modified: head/sys/dev/ioat/ioat.h > > ============================================================================== > --- head/sys/dev/ioat/ioat.h Thu Jan 17 22:00:02 2019 (r343124) > +++ head/sys/dev/ioat/ioat.h Thu Jan 17 23:21:02 2019 (r343125) > @@ -173,7 +173,8 @@ void ioat_release(bus_dmaengine_t dmaengine); > * > * On failure, the caller does not hold the dmaengine. > */ > -int ioat_acquire_reserve(bus_dmaengine_t dmaengine, unsigned n, int > mflags); > +int ioat_acquire_reserve(bus_dmaengine_t dmaengine, unsigned n, int > mflags) > + __result_use_check; > > /* > * Issue a blockfill operation. The 64-bit pattern 'fillpattern' is > written to > _______________________________________________ > svn-src-head@freebsd.org mailing list > https://lists.freebsd.org/mailman/listinfo/svn-src-head > To unsubscribe, send any mail to "svn-src-head-unsubscribe@freebsd.org" > From owner-svn-src-all@freebsd.org Fri Jan 18 00:26:26 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 6A15E14859C9; Fri, 18 Jan 2019 00:26:26 +0000 (UTC) (envelope-from gonzo@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 10A348D318; Fri, 18 Jan 2019 00:26:26 +0000 (UTC) (envelope-from gonzo@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id E7D7D2207F; Fri, 18 Jan 2019 00:26:25 +0000 (UTC) (envelope-from gonzo@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x0I0QPgU073260; Fri, 18 Jan 2019 00:26:25 GMT (envelope-from gonzo@FreeBSD.org) Received: (from gonzo@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x0I0QPOV073259; Fri, 18 Jan 2019 00:26:25 GMT (envelope-from gonzo@FreeBSD.org) Message-Id: <201901180026.x0I0QPOV073259@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gonzo set sender to gonzo@FreeBSD.org using -f From: Oleksandr Tymoshenko Date: Fri, 18 Jan 2019 00:26:25 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r343127 - head/usr.bin/compress X-SVN-Group: head X-SVN-Commit-Author: gonzo X-SVN-Commit-Paths: head/usr.bin/compress X-SVN-Commit-Revision: 343127 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 10A348D318 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.98 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_SHORT(-0.98)[-0.983,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_LONG(-1.00)[-0.999,0] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 18 Jan 2019 00:26:26 -0000 Author: gonzo Date: Fri Jan 18 00:26:25 2019 New Revision: 343127 URL: https://svnweb.freebsd.org/changeset/base/343127 Log: Fix descriptor/memory leak in compress(1) code This is mostly a style fix since the code in question is not called multiple times and doesn't have cummulative effect. PR: 204953 Submitted by: David Binderman MFC after: 1 week Modified: head/usr.bin/compress/compress.c Modified: head/usr.bin/compress/compress.c ============================================================================== --- head/usr.bin/compress/compress.c Thu Jan 17 23:22:56 2019 (r343126) +++ head/usr.bin/compress/compress.c Fri Jan 18 00:26:25 2019 (r343127) @@ -322,6 +322,8 @@ decompress(const char *in, const char *out, int bits) if ((ofp = fopen(out, "w")) == NULL || (nr != 0 && fwrite(buf, 1, nr, ofp) != nr)) { cwarn("%s", out); + if (ofp) + (void)fclose(ofp); (void)fclose(ifp); return; } From owner-svn-src-all@freebsd.org Fri Jan 18 00:39:18 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 87CAD1486635; Fri, 18 Jan 2019 00:39:18 +0000 (UTC) (envelope-from gonzo@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 2D6758DCCE; Fri, 18 Jan 2019 00:39:18 +0000 (UTC) (envelope-from gonzo@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 1548E2222F; Fri, 18 Jan 2019 00:39:18 +0000 (UTC) (envelope-from gonzo@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x0I0dHbK078684; Fri, 18 Jan 2019 00:39:17 GMT (envelope-from gonzo@FreeBSD.org) Received: (from gonzo@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x0I0dHuC078683; Fri, 18 Jan 2019 00:39:17 GMT (envelope-from gonzo@FreeBSD.org) Message-Id: <201901180039.x0I0dHuC078683@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gonzo set sender to gonzo@FreeBSD.org using -f From: Oleksandr Tymoshenko Date: Fri, 18 Jan 2019 00:39:17 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r343128 - head/tools/build/mk X-SVN-Group: head X-SVN-Commit-Author: gonzo X-SVN-Commit-Paths: head/tools/build/mk X-SVN-Commit-Revision: 343128 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 2D6758DCCE X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.98 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_LONG(-1.00)[-0.999,0]; NEURAL_HAM_SHORT(-0.98)[-0.983,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 18 Jan 2019 00:39:18 -0000 Author: gonzo Date: Fri Jan 18 00:39:17 2019 New Revision: 343128 URL: https://svnweb.freebsd.org/changeset/base/343128 Log: Add ypldap to the list of conditional obsolete files ypldap should be removed during delete-old if WITHOUT_NIS flag is enabled PR: 230727 Submitted by: Dmitry Wagin MFC after: 1 week Modified: head/tools/build/mk/OptionalObsoleteFiles.inc Modified: head/tools/build/mk/OptionalObsoleteFiles.inc ============================================================================== --- head/tools/build/mk/OptionalObsoleteFiles.inc Fri Jan 18 00:26:25 2019 (r343127) +++ head/tools/build/mk/OptionalObsoleteFiles.inc Fri Jan 18 00:39:17 2019 (r343128) @@ -6522,6 +6522,7 @@ OLD_FILES+=usr/bin/ypcat OLD_FILES+=usr/bin/ypchfn OLD_FILES+=usr/bin/ypchpass OLD_FILES+=usr/bin/ypchsh +OLD_FILES+=usr/bin/ypldap OLD_FILES+=usr/bin/ypmatch OLD_FILES+=usr/bin/yppasswd OLD_FILES+=usr/bin/ypwhich From owner-svn-src-all@freebsd.org Fri Jan 18 00:39:47 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 0F8F514866CC for ; Fri, 18 Jan 2019 00:39:47 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: from mail-qk1-x72f.google.com (mail-qk1-x72f.google.com [IPv6:2607:f8b0:4864:20::72f]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 9D46A8DE12 for ; Fri, 18 Jan 2019 00:39:46 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: by mail-qk1-x72f.google.com with SMTP id q1so7120051qkf.13 for ; Thu, 17 Jan 2019 16:39:46 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bsdimp-com.20150623.gappssmtp.com; s=20150623; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=esWXdcvVsrAGIE27FKVpJZHn8ai99wulOljeiG0A4hE=; b=MB+uFc0ShVBU6OuM3Z245TOXnd9qQ2risCBgwrX2GhjWPOr3/I2xPDuiQK4X95JZXK Pt+Po+5lqD9Na1zmV4707+UMAFJQ5m2j+WYZWojVYxgGrn1UsouDLnJyTNZ0QGVCIxbr +6c/GXwlTa3cX9M/2h7yKn8N07J0eZFxNRtC02yXZs4W/SBeBuueU9hUPg7/8AeQFZ1Q Qv3oa88AQSNhquglPTxHW02X7Kiv8IMlvrvASRZ1fW6qmHEEplTuV6HjcjrlkeICyhdp auJDdXj9uPv/06kR57gkfuzEATb6encxMMy/EPZdXizi+j5FMp915mXrSEBJUe/jMUD2 bhdg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=esWXdcvVsrAGIE27FKVpJZHn8ai99wulOljeiG0A4hE=; b=i7LdKHJQ4EM80syxq1NUP9xR7PHPM2yOrUqQBEoqSu2cz9RzECRKe0/7r7iJhKqSEz 5WeUb4eUMAnKHQY0PfFU8z4lFNiKyVN+7gwmuD/3HJFyZLo6v60oN6pryTsi963G8q1r XZ6qfVZJW+U8NnfHONSW2UGWqIyAnqFzlUqiyuFsY2d07Pdu6AMQVauZATYRWR7A/OaT pk+Av/d/3HwHZsf+8TmC0129ZgxKhH6k/xAqGFuBYDYXt07cKiPnWcDgEX3jarZZnNNS 27GAfWCVzWDvWuQdY/fO7l+Pcb7lkxHPT3FK8GybR0ojO4OfDfr1OyvnbtPYGRahjQC0 1GQg== X-Gm-Message-State: AJcUukfB9zyn6rxlVknYKriaZJ9/qZpHyNkVSu2FzpNmQx7s+3FO5DxN QGXrPU0vXjxz35t3i6JA4IYIHtcE4NEywgriGvOyvw== X-Google-Smtp-Source: ALg8bN5rXZ7c0lV0FONfR0gt8lCYBhgfcga9vtib+FmWJqP4h10cIGUdaS0w6ezjWiZt8wV+PREdhy8C+EEfnDm26qk= X-Received: by 2002:a37:6e86:: with SMTP id j128mr13493133qkc.46.1547771985956; Thu, 17 Jan 2019 16:39:45 -0800 (PST) MIME-Version: 1.0 References: <201901171808.x0HI80jC068564@repo.freebsd.org> <2d239dc0-915c-2d2b-0936-a40af5e9ead9@freebsd.org> In-Reply-To: <2d239dc0-915c-2d2b-0936-a40af5e9ead9@freebsd.org> From: Warner Losh Date: Thu, 17 Jan 2019 17:39:34 -0700 Message-ID: Subject: Re: svn commit: r343118 - in head/usr.sbin: . trim To: Eugene Grosbein Cc: "Conrad E. Meyer" , src-committers , svn-src-all@freebsd.org, svn-src-head@freebsd.org X-Rspamd-Queue-Id: 9D46A8DE12 X-Spamd-Bar: ------ Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-6.98 / 15.00]; NEURAL_HAM_MEDIUM(-1.00)[-1.000,0]; NEURAL_HAM_SHORT(-0.98)[-0.983,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; REPLY(-4.00)[] Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Content-Filtered-By: Mailman/MimeDel 2.1.29 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 18 Jan 2019 00:39:47 -0000 On Thu, Jan 17, 2019 at 2:16 PM Eugene Grosbein wrote: > 18.01.2019 3:23, Conrad Meyer =D0=BF=D0=B8=D1=88=D0=B5=D1=82: > > > Please back it out; stop attributing code review to "hackers@," which > > can not (it's a list, not individuals) and did not review this > > changeset; and put it on phabricator for actual review. > > There is already https://reviews.freebsd.org/D18380 by imp > and there were over 6 weeks since it had an update. > Newly committed code has most of its changes. > You hijacked that review. Don't you dare use it as evidence of consent to the sh*t you just pulled. Back it out, do a proper review. This one was not proper, nor was it complete. Don't go using my name to support a program I've come to think is a really bad idea. Warner From owner-svn-src-all@freebsd.org Fri Jan 18 00:42:06 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 1D3EF148690E for ; Fri, 18 Jan 2019 00:42:06 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: from mail-qk1-x744.google.com (mail-qk1-x744.google.com [IPv6:2607:f8b0:4864:20::744]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 732228E2D7 for ; Fri, 18 Jan 2019 00:42:05 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: by mail-qk1-x744.google.com with SMTP id 189so7149573qkj.8 for ; Thu, 17 Jan 2019 16:42:05 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bsdimp-com.20150623.gappssmtp.com; s=20150623; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=00MgM50rGdtSbWiq9CVjIX9gdy0oZkLGdwOCLIaKpm4=; b=Ez2C2Mn9Rp7hvS5MWLqqMw9ZT8VpbrxBio2a0S0B5THZrUsv0eb+pjxmhKPdhXSk2E Z8nGpNNi4W9JoNUlF+sRrpX3wGTMx0jOt1vLLLWPVK4ddmwJHpeAlHzO9h1fYKIoPk3g iJYVCNaw992826b8ueXhZwXyeTbMcEoA+WcD1kAK27JFbgvL9M88tT11Ssf3SlKnXUMk iXKPnou3K2I8WcqAkgCeRMkmXraJFha/gZ8Ijkxc1nGbHUV+cs37OonBU6wyS7YUf1p7 6nI9pTEm9u4Fsjz14MS5QxEQp3QT3veOFYPhC3ySSc8HyUtm8ho6WEW2a9EjD6IGVhzI PsFQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=00MgM50rGdtSbWiq9CVjIX9gdy0oZkLGdwOCLIaKpm4=; b=s6lWKQOsESs726B9es4IKsyratZnu0d2Vf00D7/1nuURclHwxFlrYqWu3zdDpAI8NY qtf/ZFJ8q7v5QYCQh81uxxrJJ1BvB5x7SnSeOtorRUnrWjNST9FJZuvHEz6RcZhwG+zE X7jYloe1kd3o/E/xsTE+AsTnDze1hEsAuGQ5o/MtVIqkWCTVg1sIs0Rq0nsDm7fnDq9P 76QWxA9KrkfmktF6yml+SCuGKDYXqzktzJGe/4jPXalobuA+pf1YldLK/b+ee/QGHTzx peOYC8abjsvJLil6995Gx450I86pHuGp3myyQ1X9fFU9anXBMz/oPn7Ix9Qu2ZOvrIsh rLTQ== X-Gm-Message-State: AJcUukccjXFqabOwyVh+uemlN73/w67MbVv9DZbytwp4vQrudKxvjBjg 9wRJvYn2beZsDc4eBxkhYPVwvTM6NX9GtlKoX0MnSA== X-Google-Smtp-Source: ALg8bN6lyQM0IiSuyLciyPsuS/EmvaBHDbrVBozquuAT0gIcrD3C3J6xlEnFJrB/qMZ/AM1cHlu0BKdYRn7ZPV1glgM= X-Received: by 2002:a37:6c05:: with SMTP id h5mr13072995qkc.175.1547772124804; Thu, 17 Jan 2019 16:42:04 -0800 (PST) MIME-Version: 1.0 References: <201901171808.x0HI80jC068564@repo.freebsd.org> <2d239dc0-915c-2d2b-0936-a40af5e9ead9@freebsd.org> In-Reply-To: From: Warner Losh Date: Thu, 17 Jan 2019 17:41:53 -0700 Message-ID: Subject: Re: svn commit: r343118 - in head/usr.sbin: . trim To: "Conrad E. Meyer" Cc: Eugene Grosbein , src-committers , svn-src-all@freebsd.org, svn-src-head@freebsd.org X-Rspamd-Queue-Id: 732228E2D7 X-Spamd-Bar: ------ Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-6.98 / 15.00]; NEURAL_HAM_MEDIUM(-1.00)[-1.000,0]; NEURAL_HAM_SHORT(-0.98)[-0.983,0]; REPLY(-4.00)[]; NEURAL_HAM_LONG(-1.00)[-1.000,0] Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Content-Filtered-By: Mailman/MimeDel 2.1.29 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 18 Jan 2019 00:42:06 -0000 On Thu, Jan 17, 2019 at 3:43 PM Conrad Meyer wrote: > On Thu, Jan 17, 2019 at 1:16 PM Eugene Grosbein wrote= : > > > > 18.01.2019 3:23, Conrad Meyer =D0=BF=D0=B8=D1=88=D0=B5=D1=82: > > > > > Please back it out; stop attributing code review to "hackers@," which > > > can not (it's a list, not individuals) and did not review this > > > changeset; and put it on phabricator for actual review. > > > > There is already https://reviews.freebsd.org/D18380 by imp > > and there were over 6 weeks since it had an update. > > Newly committed code has most of its changes. > > Your response does not address *any* of the above concerns. It's just > unrelated. > Yes. > The review you linked to isn't one you submitted for this change; it's > Warner's, and that one stalled because you were such a jerk to him > last time that he needed time off from you. > I abandoned it because dd is the better way to go because it can transfer images with 0's and TRIM the zero'd pages (and only the zero'd pages). Sure dd is hard to use, but it's not that hard to use. > If you want to socialize, revive, or expedite someone else's review, > maybe add a new comment to the review, or post a discussion hackers@, > or something like that. You still can't attribute code review to > hackers@, especially as no such review happened. > I think it should be backed out. Especially since it hijacks my work and my name to try to ram it into the tree. I'm very much not amused. Warner From owner-svn-src-all@freebsd.org Fri Jan 18 00:48:54 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 0FA961486DFB; Fri, 18 Jan 2019 00:48:54 +0000 (UTC) (envelope-from freebsd@pdx.rh.CN85.dnsmgr.net) Received: from pdx.rh.CN85.dnsmgr.net (br1.CN84in.dnsmgr.net [69.59.192.140]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 6ACE78E73C; Fri, 18 Jan 2019 00:48:53 +0000 (UTC) (envelope-from freebsd@pdx.rh.CN85.dnsmgr.net) Received: from pdx.rh.CN85.dnsmgr.net (localhost [127.0.0.1]) by pdx.rh.CN85.dnsmgr.net (8.13.3/8.13.3) with ESMTP id x0I0moQ6052936; Thu, 17 Jan 2019 16:48:50 -0800 (PST) (envelope-from freebsd@pdx.rh.CN85.dnsmgr.net) Received: (from freebsd@localhost) by pdx.rh.CN85.dnsmgr.net (8.13.3/8.13.3/Submit) id x0I0mois052935; Thu, 17 Jan 2019 16:48:50 -0800 (PST) (envelope-from freebsd) From: "Rodney W. Grimes" Message-Id: <201901180048.x0I0mois052935@pdx.rh.CN85.dnsmgr.net> Subject: Re: svn commit: r343118 - in head/usr.sbin: . trim In-Reply-To: To: Warner Losh Date: Thu, 17 Jan 2019 16:48:50 -0800 (PST) CC: "Conrad E. Meyer" , Eugene Grosbein , src-committers , svn-src-all@freebsd.org, svn-src-head@freebsd.org Reply-To: rgrimes@freebsd.org X-Mailer: ELM [version 2.4ME+ PL121h (25)] MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=US-ASCII X-Rspamd-Queue-Id: 6ACE78E73C X-Spamd-Bar: ------ Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-6.98 / 15.00]; NEURAL_HAM_MEDIUM(-1.00)[-1.000,0]; NEURAL_HAM_SHORT(-0.98)[-0.978,0]; REPLY(-4.00)[]; NEURAL_HAM_LONG(-1.00)[-1.000,0] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 18 Jan 2019 00:48:54 -0000 > On Thu, Jan 17, 2019 at 3:43 PM Conrad Meyer wrote: > > > On Thu, Jan 17, 2019 at 1:16 PM Eugene Grosbein wrote: > > > > > > 18.01.2019 3:23, Conrad Meyer ?????: > > > > > > > Please back it out; stop attributing code review to "hackers@," which > > > > can not (it's a list, not individuals) and did not review this > > > > changeset; and put it on phabricator for actual review. > > > > > > There is already https://reviews.freebsd.org/D18380 by imp > > > and there were over 6 weeks since it had an update. > > > Newly committed code has most of its changes. > > > > Your response does not address *any* of the above concerns. It's just > > unrelated. > > > > Yes. > > > > The review you linked to isn't one you submitted for this change; it's > > Warner's, and that one stalled because you were such a jerk to him > > last time that he needed time off from you. > > > > I abandoned it because dd is the better way to go because it can transfer > images with 0's and TRIM the zero'd pages (and only the zero'd pages). Sure > dd is hard to use, but it's not that hard to use. I strongly disagree that dd is the proper place for this tool, dd is far to easy a way to destroy data when trying to do this type of operation and should be the last choice for implementing what is normally a very safe thing to do. And as eugene points out dd can not easily be made to do "trim ada0 ada1 ada4" which is probably the far more common use of this command. dd's ability to do sparse(ing) of a file should NOT be overloaded with a device layer block trimming function. > > > > If you want to socialize, revive, or expedite someone else's review, > > maybe add a new comment to the review, or post a discussion hackers@, > > or something like that. You still can't attribute code review to > > hackers@, especially as no such review happened. > > > > I think it should be backed out. Especially since it hijacks my work and my > name to try to ram it into the tree. > > I'm very much not amused. Nor am I with some of the reactoin to the commit :-( -- Rod Grimes rgrimes@freebsd.org From owner-svn-src-all@freebsd.org Fri Jan 18 00:49:12 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 6C6A91486EB4; Fri, 18 Jan 2019 00:49:12 +0000 (UTC) (envelope-from cse.cem@gmail.com) Received: from mail-it1-f176.google.com (mail-it1-f176.google.com [209.85.166.176]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 073E98E896; Fri, 18 Jan 2019 00:49:11 +0000 (UTC) (envelope-from cse.cem@gmail.com) Received: by mail-it1-f176.google.com with SMTP id g85so4454767ita.3; Thu, 17 Jan 2019 16:49:11 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:reply-to :from:date:message-id:subject:to:cc; bh=4BR2P7GqZ2ZwmMeqZvweeD6syBbdydmbE0YX2Zch3Yc=; b=RDUnkBF2nMtSw7VpqB0IH0uTxL6Uy9f+DE6KC893G7UM30gv4MGZkXRLvWbXoQoTkB ntqJ8lV4b4fqQdfbwyx6HYIsG9nvh2LFbNqtLtbAkCoI1JXzGfB3HAGNOSJgGS45TrAF rtQ0IEROtGa4Chu9igfj2IDdCh9WeYU7UdASP8wSq5SAzV3wJ/WqPTnsrSRcBqgIwdco Jwg9umfcxftH/vX7nsNeKADngsXTTvTKIBXTzG5H6izo2xA5M02db0UrzbaNC2NlMiFc LGEUsFLxgl+DgilNMciJEOyQOEZ4wP2o6b7cpexSaf3i/hHYXdP8pcsO/FTqDt/Bdw9j TdwQ== X-Gm-Message-State: AJcUukdjmpxfwrarTLmgzfnk+LsN/knISMH0XQHfi0nFjxa95oP7Zzqw giisoiwtwmBqFX0nYxbFeYVtpM5I X-Google-Smtp-Source: ALg8bN4xcxDGgSPZBJyjvkcmKHfl98KJkW5ZCoi0pOzgpY19tldKGIKntmAjf93Y2jYuqGIANJPJYQ== X-Received: by 2002:a02:781e:: with SMTP id p30mr9899245jac.85.1547772209229; Thu, 17 Jan 2019 16:43:29 -0800 (PST) Received: from mail-io1-f42.google.com (mail-io1-f42.google.com. [209.85.166.42]) by smtp.gmail.com with ESMTPSA id v3sm1189205ioj.79.2019.01.17.16.43.28 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 17 Jan 2019 16:43:28 -0800 (PST) Received: by mail-io1-f42.google.com with SMTP id k7so9404137iob.6; Thu, 17 Jan 2019 16:43:28 -0800 (PST) X-Received: by 2002:a5e:8d04:: with SMTP id m4mr8534997ioj.233.1547772208763; Thu, 17 Jan 2019 16:43:28 -0800 (PST) MIME-Version: 1.0 References: <201901172321.x0HNL2f4036088@repo.freebsd.org> In-Reply-To: Reply-To: cem@freebsd.org From: Conrad Meyer Date: Thu, 17 Jan 2019 16:43:17 -0800 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: svn commit: r343125 - head/sys/dev/ioat To: Kevin Bowling Cc: src-committers , svn-src-all@freebsd.org, svn-src-head@freebsd.org Content-Type: text/plain; charset="UTF-8" X-Rspamd-Queue-Id: 073E98E896 X-Spamd-Bar: ------ Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-6.99 / 15.00]; NEURAL_HAM_MEDIUM(-1.00)[-1.000,0]; NEURAL_HAM_SHORT(-0.99)[-0.989,0]; REPLY(-4.00)[]; TAGGED_FROM(0.00)[]; NEURAL_HAM_LONG(-1.00)[-1.000,0] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 18 Jan 2019 00:49:12 -0000 On Thu, Jan 17, 2019 at 4:12 PM Kevin Bowling wrote: > > Out of curiosity are you using this driver? Any performance data? Yep. I don't have any hard numbers on hand but my recollection is it caps out at about 5 GB/s, total, on Broadwell. Our workload with it is predominantly unmapped 8kB copies but includes some 512 byte copies as well. My recollection is that the channels are logical and share a single DMA engine, so there's not much reason to use more than one of them. It may improve on future microarchs but I can't speak to those. Cheers, Conrad From owner-svn-src-all@freebsd.org Fri Jan 18 00:55:08 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 24EE214873CD for ; Fri, 18 Jan 2019 00:55:08 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: from mail-qt1-x843.google.com (mail-qt1-x843.google.com [IPv6:2607:f8b0:4864:20::843]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id AF8258EDF2 for ; Fri, 18 Jan 2019 00:55:07 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: by mail-qt1-x843.google.com with SMTP id p17so13545081qtl.5 for ; Thu, 17 Jan 2019 16:55:07 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bsdimp-com.20150623.gappssmtp.com; s=20150623; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=PR3u1wr566KY7MQkkxUo7MWbtVG3BC78LZ12uiAS1SE=; b=pIdxLxue1wm6F+xQfDIWL7heHo9L02Lm6DNMr5I5W2BrihVZ74bjzT0Q0ZvcKt6Z1i xWt3k5zBpq5roMTgW0J9timOBTc+4e3Q8NN74BsYSHUn2EpaAwpIgUtjmIYUsBnBNzOm gkVG6xysYK9vx8mgy+CQCsWJRNoDVj7fZ0J0qGVaNDI1PAq882rQ0JFmJ46sZtQg1Bv9 qgUGoxrwdJYmSakBnUsneS01OafaE88lUZRiNICQEtS1vKRqqRjJlGWiyFE2SwJri65d eTQ0jMSAu/FCnlxrKPH1a1jxbEaULye2gzsf69pkAOoPQDSaA/uHH+CVyO603cxVQl9d DCAg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=PR3u1wr566KY7MQkkxUo7MWbtVG3BC78LZ12uiAS1SE=; b=NtEZDdL+ClTCvvmfI5Y1kYtzRkKAFez+A04eRLD/bambBnkNK0sNhpz+vaT2S/PaIv FJVq1DE3FR1xFuj6UcuHZGxjwVJ3LaCzqgdPmeK3eOAevBLupSHnhmYkE+DRjkjVdQ2X pz4IRFR1O69jVcsU+qblQrV6dYeof9Ajj41KP5vhNA4WbZcX3AcMdHI/r0HOfQ0/PxCy gCdD+0TDLNjeNs7p0zTm63GOtzPHmerTCZIluXq9buAJI8peWpsvzROAQXIUdx1LXFPR QCRYe96itmUbI2ZTq2C1HQm9wjdsDWl1j3Bhvwc9mzeHZjRzqu9IDi4ngeWm9ZeBYegP V1jQ== X-Gm-Message-State: AJcUukcdUVSknyHNt1LnWkFbnHV5h3JEGM3Oaf+Jd4Gi5CffOuUYMpF2 rmhsWkAY4boGiOU6ZW4WxtT1QV9GG5xk8khzQlkxZA== X-Google-Smtp-Source: ALg8bN5lWRv1uXJgmldsa0ZMwTe9PlLrF/i3ORvT7ZJoYFemoWW/mOa0X/qSQgsEySZhzPgu4w2e+lp1cduAudG2DEk= X-Received: by 2002:ac8:42c1:: with SMTP id g1mr14016764qtm.118.1547772907060; Thu, 17 Jan 2019 16:55:07 -0800 (PST) MIME-Version: 1.0 References: <201901180048.x0I0mois052935@pdx.rh.CN85.dnsmgr.net> In-Reply-To: <201901180048.x0I0mois052935@pdx.rh.CN85.dnsmgr.net> From: Warner Losh Date: Thu, 17 Jan 2019 17:54:56 -0700 Message-ID: Subject: Re: svn commit: r343118 - in head/usr.sbin: . trim To: "Rodney W. Grimes" Cc: "Conrad E. Meyer" , Eugene Grosbein , src-committers , svn-src-all@freebsd.org, svn-src-head@freebsd.org X-Rspamd-Queue-Id: AF8258EDF2 X-Spamd-Bar: ------ Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-6.98 / 15.00]; NEURAL_HAM_MEDIUM(-1.00)[-1.000,0]; NEURAL_HAM_SHORT(-0.98)[-0.984,0]; REPLY(-4.00)[]; NEURAL_HAM_LONG(-1.00)[-1.000,0] Content-Type: text/plain; charset="UTF-8" X-Content-Filtered-By: Mailman/MimeDel 2.1.29 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 18 Jan 2019 00:55:08 -0000 On Thu, Jan 17, 2019 at 5:48 PM Rodney W. Grimes < freebsd@pdx.rh.cn85.dnsmgr.net> wrote: > > On Thu, Jan 17, 2019 at 3:43 PM Conrad Meyer wrote: > > > > > On Thu, Jan 17, 2019 at 1:16 PM Eugene Grosbein > wrote: > > > > > > > > 18.01.2019 3:23, Conrad Meyer ?????: > > > > > > > > > Please back it out; stop attributing code review to "hackers@," > which > > > > > can not (it's a list, not individuals) and did not review this > > > > > changeset; and put it on phabricator for actual review. > > > > > > > > There is already https://reviews.freebsd.org/D18380 by imp > > > > and there were over 6 weeks since it had an update. > > > > Newly committed code has most of its changes. > > > > > > Your response does not address *any* of the above concerns. It's just > > > unrelated. > > > > > > > Yes. > > > > > > > The review you linked to isn't one you submitted for this change; it's > > > Warner's, and that one stalled because you were such a jerk to him > > > last time that he needed time off from you. > > > > > > > I abandoned it because dd is the better way to go because it can transfer > > images with 0's and TRIM the zero'd pages (and only the zero'd pages). > Sure > > dd is hard to use, but it's not that hard to use. > > I strongly disagree that dd is the proper place for this tool, > dd is far to easy a way to destroy data when trying to do this > type of operation and should be the last choice for implementing > what is normally a very safe thing to do. > > And as eugene points out dd can not easily be made > to do "trim ada0 ada1 ada4" which is probably the > far more common use of this command > for i in ada0 ada1 ada4; do dd of=/dev/$i if=/dev/zero conv=trim &; done; wait if that's your objection. It's a weak counter argument, but this really isn't the place for the debate. > dd's ability to do sparse(ing) of a file should NOT be > overloaded with a device layer block trimming function. > It's not overloaded. You have to specifically ask for the conversion. It's the right place for it. > > > > > > > If you want to socialize, revive, or expedite someone else's review, > > > maybe add a new comment to the review, or post a discussion hackers@, > > > or something like that. You still can't attribute code review to > > > hackers@, especially as no such review happened. > > > > > > > I think it should be backed out. Especially since it hijacks my work and > my > > name to try to ram it into the tree. > > > > I'm very much not amused. > > Nor am I with some of the reactoin to the commit :-( > I'm sorry, but I fire back when people abuse me. Especially when it's a repeat offender who clearly didn't internalize the feedback given the first time. Warner From owner-svn-src-all@freebsd.org Fri Jan 18 02:37:33 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 3740B148A896; Fri, 18 Jan 2019 02:37:33 +0000 (UTC) (envelope-from cy.schubert@cschubert.com) Received: from smtp-out-so.shaw.ca (smtp-out-so.shaw.ca [64.59.136.137]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "Client", Issuer "CA" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 6B2386BF1E; Fri, 18 Jan 2019 02:37:31 +0000 (UTC) (envelope-from cy.schubert@cschubert.com) Received: from spqr.komquats.com ([70.67.125.17]) by shaw.ca with ESMTPA id kK2BgPfKM82YckK2CgARKP; Thu, 17 Jan 2019 19:37:29 -0700 X-Authority-Analysis: v=2.3 cv=NNSrBHyg c=1 sm=1 tr=0 a=VFtTW3WuZNDh6VkGe7fA3g==:117 a=VFtTW3WuZNDh6VkGe7fA3g==:17 a=kj9zAlcOel0A:10 a=3JhidrIBZZsA:10 a=iKhvJSA4AAAA:8 a=YxBL1-UpAAAA:8 a=6I5d2MoRAAAA:8 a=sohWm2Wet7b4VzDZGNkA:9 a=CjuIK1q_8ugA:10 a=odh9cflL3HIXMm4fY7Wr:22 a=Ia-lj3WSrqcvXOmTRaiG:22 a=IjZwj45LgO3ly-622nXo:22 Received: from slippy.cwsent.com (slippy [10.1.1.91]) by spqr.komquats.com (Postfix) with ESMTPS id 1C5FB380D; Thu, 17 Jan 2019 18:37:44 -0800 (PST) Received: from slippy.cwsent.com (localhost [127.0.0.1]) by slippy.cwsent.com (8.15.2/8.15.2) with ESMTP id x0I2bPI6053196; Thu, 17 Jan 2019 18:37:25 -0800 (PST) (envelope-from Cy.Schubert@cschubert.com) Received: from slippy (cy@localhost) by slippy.cwsent.com (8.15.2/8.15.2/Submit) with ESMTP id x0I2bP5m053193; Thu, 17 Jan 2019 18:37:25 -0800 (PST) (envelope-from Cy.Schubert@cschubert.com) Message-Id: <201901180237.x0I2bP5m053193@slippy.cwsent.com> X-Authentication-Warning: slippy.cwsent.com: cy owned process doing -bs X-Mailer: exmh version 2.8.0 04/21/2012 with nmh-1.7.1 Reply-to: Cy Schubert From: Cy Schubert X-os: FreeBSD X-Sender: cy@cwsent.com X-URL: http://www.cschubert.com/ To: rgrimes@freebsd.org cc: Maxim Sobolev , Cy Schubert , "Conrad E. Meyer" , src-committers , svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r343118 - in head/usr.sbin: . trim In-Reply-To: Message from "Rodney W. Grimes" of "Thu, 17 Jan 2019 16:08:29 -0800." <201901180008.x0I08THg052763@pdx.rh.CN85.dnsmgr.net> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Date: Thu, 17 Jan 2019 18:37:25 -0800 X-CMAE-Envelope: MS4wfPVfLNZCySeXRvKg8rEKd7XHBsCPGBwWYysn4D1SFD2c9PK5GJxidq+n1cgXWkUdQBly4G7GVlWsC71+1jpcvfUKBx9UMU6C9hQo/robIkVMiSVCrSvO yytqQLhx5047oN5GNBv+PLoC5dVNkVxdzAX1BSJNSO5KJHhpaYYajCvQ1jSzcNaNlIh+IzXaQtsqQ/i0V4aECAsQloYK3Dp6ifoN25lhJxfpqatiiUWdqNA/ 1dsEiOXicKLcjvW++N2PelZXWi+4D35ux+6XbJv/loVI68cpnFqdlnfyHSG1pR9YSrRHTij8mILqpU+UcyVgiNzAqXXzXAwbC9NWBJkF1C1nBcxhw6+Kib6Y NWCxADag X-Rspamd-Queue-Id: 6B2386BF1E X-Spamd-Bar: ---- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-4.47 / 15.00]; ARC_NA(0.00)[]; RCVD_VIA_SMTP_AUTH(0.00)[]; RCVD_COUNT_FIVE(0.00)[5]; HAS_REPLYTO(0.00)[Cy.Schubert@cschubert.com]; FROM_HAS_DN(0.00)[]; TO_DN_SOME(0.00)[]; MV_CASE(0.50)[]; IP_SCORE(-1.78)[ip: (-4.63), ipnet: 64.59.128.0/20(-2.37), asn: 6327(-1.83), country: CA(-0.09)]; MIME_GOOD(-0.10)[text/plain]; HAS_XAW(0.00)[]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; REPLYTO_EQ_FROM(0.00)[]; TO_MATCH_ENVRCPT_SOME(0.00)[]; MX_GOOD(-0.01)[cached: spqr.komquats.com]; NEURAL_HAM_SHORT(-0.97)[-0.974,0]; RCPT_COUNT_SEVEN(0.00)[7]; NEURAL_HAM_MEDIUM(-1.00)[-1.000,0]; R_SPF_NA(0.00)[]; RECEIVED_SPAMHAUS_PBL(0.00)[17.125.67.70.zen.spamhaus.org : 127.0.0.11]; FROM_EQ_ENVFROM(0.00)[]; R_DKIM_NA(0.00)[]; ASN(0.00)[asn:6327, ipnet:64.59.128.0/20, country:CA]; MIME_TRACE(0.00)[0:+]; RCVD_TLS_LAST(0.00)[]; RCVD_IN_DNSWL_LOW(-0.10)[137.136.59.64.list.dnswl.org : 127.0.5.1] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 18 Jan 2019 02:37:33 -0000 In message <201901180008.x0I08THg052763@pdx.rh.CN85.dnsmgr.net>, "Rodney W. Gri mes" writes: > > What I think we really need is some way to easily porti-ze useful stuff > > that would otherwise go into /usr/[s]bin, so adding things would be just as > > easy as hooking up SUBDIR into usr.[s]bin/Makefile. Yes, I know, this is > > topic almost as old as the FreeBSD Project itself, but perhaps we just did > > not approach it the right way. It was always the idea that we would just > > move bunch of stuff from src/usr.[s]bin repo into ports/. Which brings > > several important question such as "who is to host the distfile"? "where > > sources hosted", "who is to update the port when changes happen?" etc. > > > > Perhaps even by forking the whole ports idea into a smaller closely-guarged > > subset. Something like a new baseports repository, which might have > > structure like baseports/usr.bin/xxx, baseports/usr.sbin/yyy etc. Then add > > some automagic glue to kick in on every commit and transfer this into valid > > ports, which is going to be packaged by the poudriere and such. This way we > > could reduce amount of port-foo average src committer needs in order to > > maintain code. I am almost tempted to sit and write something over the next > > weekend or few of thereofs. Using usr.sbin/trim as an example. > > Couldnt the "distribution" just live as files commited into > the ports tree as a "work" hierarcy and the top level file > be marked as no fetch. We use to stick small stuff in ports > by putting there files in files/ and having that work IIRC. If it must live in one of our repositories, then a users, projects or other hierarchy in ports might be acceptable. However there would be too great a temptation to fork a random piece of software on the internet. baseports/usr.bin/whatever doesn't make much sense. If it's in ports it should use the ports infrastructure and install in $LOCALBASE. If it's in ports, it's not in base and should not be installed outside of $LOCALBASE. If it's to be installed in for instance, /usr/bin, then it must live in usr.bin. > > I really really dislike the idea of putting stuff from base in > external repositories and then fetching them, something just > feels fundementally wrong about that. Trim should not be in base/. If it's in ports it should be installed in $LOCALBASE not outside it. The point is, trim should not be in base. It should not live in /usr/src nor should it be installed outside of $LOCALBASE. If anything, as is it could be a port. It should not live in a user or project branch of base nor should it be sourced out of some hypothetical quasi FreeBSD source repository in ports or any other FreeBSD repo for that matter. It doesn't belong here at all. It's function can however be provided by dd. -- Cheers, Cy Schubert FreeBSD UNIX: Web: http://www.FreeBSD.org The need of the many outweighs the greed of the few. From owner-svn-src-all@freebsd.org Fri Jan 18 02:41:09 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 85136148AA80; Fri, 18 Jan 2019 02:41:09 +0000 (UTC) (envelope-from cy.schubert@cschubert.com) Received: from smtp-out-so.shaw.ca (smtp-out-so.shaw.ca [64.59.136.137]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "Client", Issuer "CA" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 824426C279; Fri, 18 Jan 2019 02:41:08 +0000 (UTC) (envelope-from cy.schubert@cschubert.com) Received: from spqr.komquats.com ([70.67.125.17]) by shaw.ca with ESMTPA id kK5hgPgqN82YckK5jgARqO; Thu, 17 Jan 2019 19:41:07 -0700 X-Authority-Analysis: v=2.3 cv=NNSrBHyg c=1 sm=1 tr=0 a=VFtTW3WuZNDh6VkGe7fA3g==:117 a=VFtTW3WuZNDh6VkGe7fA3g==:17 a=kj9zAlcOel0A:10 a=3JhidrIBZZsA:10 a=pGLkceISAAAA:8 a=6I5d2MoRAAAA:8 a=YxBL1-UpAAAA:8 a=VC6dibHgwd1Umev_L9gA:9 a=CjuIK1q_8ugA:10 a=IjZwj45LgO3ly-622nXo:22 a=Ia-lj3WSrqcvXOmTRaiG:22 Received: from slippy.cwsent.com (slippy [10.1.1.91]) by spqr.komquats.com (Postfix) with ESMTPS id 0618A382A; Thu, 17 Jan 2019 18:41:23 -0800 (PST) Received: from slippy.cwsent.com (localhost [127.0.0.1]) by slippy.cwsent.com (8.15.2/8.15.2) with ESMTP id x0I2f515057062; Thu, 17 Jan 2019 18:41:05 -0800 (PST) (envelope-from Cy.Schubert@cschubert.com) Received: from slippy (cy@localhost) by slippy.cwsent.com (8.15.2/8.15.2/Submit) with ESMTP id x0I2f5wO057051; Thu, 17 Jan 2019 18:41:05 -0800 (PST) (envelope-from Cy.Schubert@cschubert.com) Message-Id: <201901180241.x0I2f5wO057051@slippy.cwsent.com> X-Authentication-Warning: slippy.cwsent.com: cy owned process doing -bs X-Mailer: exmh version 2.8.0 04/21/2012 with nmh-1.7.1 Reply-to: Cy Schubert From: Cy Schubert X-os: FreeBSD X-Sender: cy@cwsent.com X-URL: http://www.cschubert.com/ To: Enji Cooper cc: Maxim Sobolev , Cy Schubert , "Conrad E. Meyer" , src-committers , svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r343118 - in head/usr.sbin: . trim In-Reply-To: Message from Enji Cooper of "Thu, 17 Jan 2019 14:42:04 -0800." Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Date: Thu, 17 Jan 2019 18:41:05 -0800 X-CMAE-Envelope: MS4wfFC3kqow5XAF1uflEJ7j44LDb4dyYbIK3puaDxQxYfQU1HpFyQIHO9p2lhr33hgJYGVQ69wMfiMDJT0yjjIveOyO9ZUwN+HCy78ROHCffewwioOL1SAg QqhS9wblrIQHJk8en3/YgnR6CY0nTa2EGho847s7QfzwMJ/+kxzuvrSUqJuWPMvPxt3YLaOzeoVPC802QOJBBNSEqVeQAGPrrpiXPtamL//1GDucfSe5WmiX 1+q6qOjgsnMAMg+t9hjF/uT0gdzvZYgHg4OIj53k3eh5mI3sRUA4U1MrRTcaQsrnBhVTzWcGyytesoN322uHvdnOrqUPlZR8KPtFceFk8FmQw0bJkZ1UNX2Q RPtKf7rK X-Rspamd-Queue-Id: 824426C279 X-Spamd-Bar: ---- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-4.45 / 15.00]; RCVD_VIA_SMTP_AUTH(0.00)[]; HAS_REPLYTO(0.00)[Cy.Schubert@cschubert.com]; TO_DN_SOME(0.00)[]; MV_CASE(0.50)[]; HAS_XAW(0.00)[]; MX_GOOD(-0.01)[cached: spqr.komquats.com]; NEURAL_HAM_SHORT(-0.98)[-0.975,0]; RCPT_COUNT_SEVEN(0.00)[7]; FREEMAIL_TO(0.00)[gmail.com]; RCVD_IN_DNSWL_LOW(-0.10)[137.136.59.64.list.dnswl.org : 127.0.5.1]; FROM_EQ_ENVFROM(0.00)[]; R_DKIM_NA(0.00)[]; ASN(0.00)[asn:6327, ipnet:64.59.128.0/20, country:CA]; MIME_TRACE(0.00)[0:+]; RECEIVED_SPAMHAUS_PBL(0.00)[17.125.67.70.zen.spamhaus.org : 127.0.0.11]; ARC_NA(0.00)[]; NEURAL_HAM_MEDIUM(-1.00)[-1.000,0]; RCVD_COUNT_FIVE(0.00)[5]; REPLYTO_EQ_FROM(0.00)[]; RCVD_TLS_LAST(0.00)[]; FROM_HAS_DN(0.00)[]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; MIME_GOOD(-0.10)[text/plain]; IP_SCORE(-1.76)[ip: (-4.54), ipnet: 64.59.128.0/20(-2.36), asn: 6327(-1.82), country: CA(-0.09)]; TO_MATCH_ENVRCPT_SOME(0.00)[]; R_SPF_NA(0.00)[] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 18 Jan 2019 02:41:09 -0000 In message , Enji Cooper writes : > > > --Apple-Mail=_6CB1620B-6707-4F06-B7FF-9F1ECBA36F56 > Content-Transfer-Encoding: quoted-printable > Content-Type: text/plain; > charset=utf-8 > > > > On Jan 17, 2019, at 2:25 PM, Maxim Sobolev = > wrote: > >=20 > > What I think we really need is some way to easily porti-ze useful = > stuff that would otherwise go into /usr/[s]bin, so adding things would = > be just as easy as hooking up SUBDIR into usr.[s]bin/Makefile. Yes, I = > know, this is topic almost as old as the FreeBSD Project itself, but = > perhaps we just did not approach it the right way. It was always the = > idea that we would just move bunch of stuff from src/usr.[s]bin repo = > into ports/. Which brings several important question such as "who is to = > host the distfile"? "where sources hosted", "who is to update the port = > when changes happen?" etc. > > Projects like this could be hosted on GitHub. Ports supports GitHub out = > of the box, so this seems like a low barrier for entry (the bonus of = > doing this is that the projects could potentially be used by other = > non-FreeBSD projects, and contributed by others outside the FreeBSD = > project; the downside is having to deal with FreeBSD CI, as Travis CI = > only supports Linux (IIRC making Travis support FreeBSD is a non-trivial = > project, but it=E2=80=99s likely a very worthwhile goal, as it would = > make it easier to catch issues upfront with third-party projects that = > FreeBSD consumes, like llvm), enforcing style (can be done with git = > commit hooks and GitHub checks), etc. I would really like to do these = > things because it=E2=80=99s difficult getting folks to support FreeBSD = > in third-party projects as-is. Lowering the barrier of entry would allow = > FreeBSD and its developers to better scale (and make FreeBSD more of a = > first-class OS). Yes. -- Cheers, Cy Schubert FreeBSD UNIX: Web: http://www.FreeBSD.org The need of the many outweighs the greed of the few. From owner-svn-src-all@freebsd.org Fri Jan 18 02:53:15 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id BB556148B17D; Fri, 18 Jan 2019 02:53:14 +0000 (UTC) (envelope-from cy.schubert@cschubert.com) Received: from smtp-out-so.shaw.ca (smtp-out-so.shaw.ca [64.59.136.139]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "Client", Issuer "CA" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 44AC96C92C; Fri, 18 Jan 2019 02:53:13 +0000 (UTC) (envelope-from cy.schubert@cschubert.com) Received: from spqr.komquats.com ([70.67.125.17]) by shaw.ca with ESMTPA id kKHOgPlxo82YckKHQgATR2; Thu, 17 Jan 2019 19:53:12 -0700 X-Authority-Analysis: v=2.3 cv=NNSrBHyg c=1 sm=1 tr=0 a=VFtTW3WuZNDh6VkGe7fA3g==:117 a=VFtTW3WuZNDh6VkGe7fA3g==:17 a=kj9zAlcOel0A:10 a=3JhidrIBZZsA:10 a=xfDLHkLGAAAA:8 a=YxBL1-UpAAAA:8 a=6I5d2MoRAAAA:8 a=1grL2wql0I3dgmcLu_sA:9 a=CjuIK1q_8ugA:10 a=IfaqVvZgccqrtc8gcwf2:22 a=Ia-lj3WSrqcvXOmTRaiG:22 a=IjZwj45LgO3ly-622nXo:22 Received: from slippy.cwsent.com (slippy [10.1.1.91]) by spqr.komquats.com (Postfix) with ESMTPS id 2FB58386A; Thu, 17 Jan 2019 18:53:27 -0800 (PST) Received: from slippy.cwsent.com (localhost [127.0.0.1]) by slippy.cwsent.com (8.15.2/8.15.2) with ESMTP id x0I2r9UZ068960; Thu, 17 Jan 2019 18:53:09 -0800 (PST) (envelope-from Cy.Schubert@cschubert.com) Received: from slippy (cy@localhost) by slippy.cwsent.com (8.15.2/8.15.2/Submit) with ESMTP id x0I2r9Jw068957; Thu, 17 Jan 2019 18:53:09 -0800 (PST) (envelope-from Cy.Schubert@cschubert.com) Message-Id: <201901180253.x0I2r9Jw068957@slippy.cwsent.com> X-Authentication-Warning: slippy.cwsent.com: cy owned process doing -bs X-Mailer: exmh version 2.8.0 04/21/2012 with nmh-1.7.1 Reply-to: Cy Schubert From: Cy Schubert X-os: FreeBSD X-Sender: cy@cwsent.com X-URL: http://www.cschubert.com/ To: Maxim Sobolev cc: Cy Schubert , "Conrad E. Meyer" , src-committers , svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r343118 - in head/usr.sbin: . trim In-Reply-To: Message from Maxim Sobolev of "Thu, 17 Jan 2019 14:25:07 -0800." Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Date: Thu, 17 Jan 2019 18:53:09 -0800 X-CMAE-Envelope: MS4wfE7+i2sgIC4R673SOybF69mufQnDz1SrepRnQwaWwrZ04mE2eHZ8JGvG4zgfCEeUhaAG6FDugO0PoGrnNdsLPAcqm1zYfTLTbpDKnAY3lCMtqgNUjjal 0XF3GJTglytaAFuNv6Dama33rs2DrGo3poNAgNLqDTacXxJ35g1OkrapwOp1RiZlMmdznFck/1Johk8CxvYbklKEMMFeYqOe2kOTUlcPw2orW4pcdqlo5S+3 w1RwDGpgszBjA381qKAoeuQVhFzBR1N2yAd9U3vysBEB9fBSTjnJRRjvCrO0O41KskP0f3swsXPgRSFMXv7J8w== X-Rspamd-Queue-Id: 44AC96C92C X-Spamd-Bar: ---- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-4.33 / 15.00]; RCVD_VIA_SMTP_AUTH(0.00)[]; HAS_REPLYTO(0.00)[Cy.Schubert@cschubert.com]; TO_DN_SOME(0.00)[]; MV_CASE(0.50)[]; HAS_XAW(0.00)[]; RCPT_COUNT_FIVE(0.00)[6]; MX_GOOD(-0.01)[cached: spqr.komquats.com]; NEURAL_HAM_SHORT(-0.99)[-0.992,0]; FROM_EQ_ENVFROM(0.00)[]; R_DKIM_NA(0.00)[]; MIME_TRACE(0.00)[0:+]; ASN(0.00)[asn:6327, ipnet:64.59.128.0/20, country:CA]; RCVD_TLS_LAST(0.00)[]; RCVD_IN_DNSWL_LOW(-0.10)[139.136.59.64.list.dnswl.org : 127.0.5.1]; ARC_NA(0.00)[]; NEURAL_HAM_MEDIUM(-1.00)[-1.000,0]; RCVD_COUNT_FIVE(0.00)[5]; RECEIVED_SPAMHAUS_PBL(0.00)[17.125.67.70.zen.spamhaus.org : 127.0.0.11]; FROM_HAS_DN(0.00)[]; REPLYTO_EQ_FROM(0.00)[]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; MIME_GOOD(-0.10)[text/plain]; IP_SCORE(-1.63)[ip: (-3.89), ipnet: 64.59.128.0/20(-2.35), asn: 6327(-1.81), country: CA(-0.09)]; TO_MATCH_ENVRCPT_SOME(0.00)[]; R_SPF_NA(0.00)[] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 18 Jan 2019 02:53:15 -0000 In message , Maxim Sobolev writes: > > What I think we really need is some way to easily porti-ze useful stuff > that would otherwise go into /usr/[s]bin, so adding things would be just as > easy as hooking up SUBDIR into usr.[s]bin/Makefile. Yes, I know, this is > topic almost as old as the FreeBSD Project itself, but perhaps we just did > not approach it the right way. It was always the idea that we would just > move bunch of stuff from src/usr.[s]bin repo into ports/. Which brings > several important question such as "who is to host the distfile"? "where > sources hosted", "who is to update the port when changes happen?" etc. pkgbase might address some of the above. Ports and base might install in a homogeneous manner. > > Perhaps even by forking the whole ports idea into a smaller closely-guarged > subset. Something like a new baseports repository, which might have > structure like baseports/usr.bin/xxx, baseports/usr.sbin/yyy etc. Then add > some automagic glue to kick in on every commit and transfer this into valid > ports, which is going to be packaged by the poudriere and such. This way we > could reduce amount of port-foo average src committer needs in order to > maintain code. I am almost tempted to sit and write something over the next > weekend or few of thereofs. Using usr.sbin/trim as an example. If it's external it should should live in ports and be installed in $LOCALBASE. A quasi src repo in ports to install software outside of $LOCALBASE doesn't make any sense. ALso see my comment about pkgbase. I expect pkgbase to homogenize base and ports into a seamless install. Alternatively pkgbase and ports could use different package repos. For example when I was an MVS sysprog, MVS and JES were installed in one repo while CICS and IMS were installed each in their own repos. That was site specific but not out of the realm of possibilities here either. -- Cheers, Cy Schubert FreeBSD UNIX: Web: http://www.FreeBSD.org The need of the many outweighs the greed of the few. From owner-svn-src-all@freebsd.org Fri Jan 18 04:23:53 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 23129148E34F; Fri, 18 Jan 2019 04:23:53 +0000 (UTC) (envelope-from gonzo@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 BE5EB74F27; Fri, 18 Jan 2019 04:23:52 +0000 (UTC) (envelope-from gonzo@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id AEC3C24FB5; Fri, 18 Jan 2019 04:23:52 +0000 (UTC) (envelope-from gonzo@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x0I4NqOq098903; Fri, 18 Jan 2019 04:23:52 GMT (envelope-from gonzo@FreeBSD.org) Received: (from gonzo@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x0I4NqL9098902; Fri, 18 Jan 2019 04:23:52 GMT (envelope-from gonzo@FreeBSD.org) Message-Id: <201901180423.x0I4NqL9098902@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gonzo set sender to gonzo@FreeBSD.org using -f From: Oleksandr Tymoshenko Date: Fri, 18 Jan 2019 04:23:52 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r343129 - head/sys/cam/ata X-SVN-Group: head X-SVN-Commit-Author: gonzo X-SVN-Commit-Paths: head/sys/cam/ata X-SVN-Commit-Revision: 343129 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: BE5EB74F27 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.96 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_SHORT(-0.96)[-0.962,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_LONG(-1.00)[-0.999,0] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 18 Jan 2019 04:23:53 -0000 Author: gonzo Date: Fri Jan 18 04:23:52 2019 New Revision: 343129 URL: https://svnweb.freebsd.org/changeset/base/343129 Log: [ata] Add workaround for KingDian S200 SSD crash on receiving TRIM command - Add ADA_Q_NO_TRIM quirk to be used with the device that falsely advertise TRIM support - Add ADA_Q_NO_TRIM entry for KingDian S200 SSD PR: 222802 Submitted by: Bertrand Petit MFC after: 1 week Modified: head/sys/cam/ata/ata_da.c Modified: head/sys/cam/ata/ata_da.c ============================================================================== --- head/sys/cam/ata/ata_da.c Fri Jan 18 00:39:17 2019 (r343128) +++ head/sys/cam/ata/ata_da.c Fri Jan 18 04:23:52 2019 (r343129) @@ -118,7 +118,8 @@ typedef enum { ADA_Q_4K = 0x01, ADA_Q_NCQ_TRIM_BROKEN = 0x02, ADA_Q_LOG_BROKEN = 0x04, - ADA_Q_SMR_DM = 0x08 + ADA_Q_SMR_DM = 0x08, + ADA_Q_NO_TRIM = 0x10 } ada_quirks; #define ADA_Q_BIT_STRING \ @@ -126,7 +127,8 @@ typedef enum { "\0014K" \ "\002NCQ_TRIM_BROKEN" \ "\003LOG_BROKEN" \ - "\004SMR_DM" + "\004SMR_DM" \ + "\005NO_TRIM" typedef enum { ADA_CCB_RAHEAD = 0x01, @@ -543,6 +545,14 @@ static struct ada_quirk_entry ada_quirk_table[] = }, { /* + * KingDian S200 60GB P0921B + * Trimming crash the SSD + */ + { T_DIRECT, SIP_MEDIA_FIXED, "*", "KingDian S200 *", "*" }, + /*quirks*/ADA_Q_NO_TRIM + }, + { + /* * Kingston E100 Series SSDs * 4k optimised & trim only works in 4k requests + 4k aligned */ @@ -1810,6 +1820,10 @@ adaregister(struct cam_periph *periph, void *arg) softc->disk->d_flags = DISKFLAG_DIRECT_COMPLETION | DISKFLAG_CANZONE; if (softc->flags & ADA_FLAG_CAN_FLUSHCACHE) softc->disk->d_flags |= DISKFLAG_CANFLUSHCACHE; + /* Device lies about TRIM capability. */ + if ((softc->quirks & ADA_Q_NO_TRIM) && + (softc->flags & ADA_FLAG_CAN_TRIM)) + softc->flags &= ~ADA_FLAG_CAN_TRIM; if (softc->flags & ADA_FLAG_CAN_TRIM) { softc->disk->d_flags |= DISKFLAG_CANDELETE; softc->disk->d_delmaxsize = softc->params.secsize * From owner-svn-src-all@freebsd.org Fri Jan 18 08:19:55 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 1D3BA149350A; Fri, 18 Jan 2019 08:19:55 +0000 (UTC) (envelope-from kp@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 A91AC82D08; Fri, 18 Jan 2019 08:19:54 +0000 (UTC) (envelope-from kp@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 8AA8C2767A; Fri, 18 Jan 2019 08:19:54 +0000 (UTC) (envelope-from kp@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x0I8JsMv018874; Fri, 18 Jan 2019 08:19:54 GMT (envelope-from kp@FreeBSD.org) Received: (from kp@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x0I8Jski018873; Fri, 18 Jan 2019 08:19:54 GMT (envelope-from kp@FreeBSD.org) Message-Id: <201901180819.x0I8Jski018873@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kp set sender to kp@FreeBSD.org using -f From: Kristof Provost Date: Fri, 18 Jan 2019 08:19:54 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r343130 - head/sys/netpfil/pf X-SVN-Group: head X-SVN-Commit-Author: kp X-SVN-Commit-Paths: head/sys/netpfil/pf X-SVN-Commit-Revision: 343130 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: A91AC82D08 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.98 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_SHORT(-0.98)[-0.982,0]; NEURAL_HAM_LONG(-1.00)[-0.999,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 18 Jan 2019 08:19:55 -0000 Author: kp Date: Fri Jan 18 08:19:54 2019 New Revision: 343130 URL: https://svnweb.freebsd.org/changeset/base/343130 Log: pf: fix pfsync breaking carp Fix missing initialisation of sc_flags into a valid sync state on clone which breaks carp in pfsync. This regression was introduce by r342051. PR: 235005 Submitted by: smh@FreeBSD.org Pointy hat to: kp MFC after: 3 days Differential Revision: https://reviews.freebsd.org/D18882 Modified: head/sys/netpfil/pf/if_pfsync.c Modified: head/sys/netpfil/pf/if_pfsync.c ============================================================================== --- head/sys/netpfil/pf/if_pfsync.c Fri Jan 18 04:23:52 2019 (r343129) +++ head/sys/netpfil/pf/if_pfsync.c Fri Jan 18 08:19:54 2019 (r343130) @@ -335,6 +335,7 @@ pfsync_clone_create(struct if_clone *ifc, int unit, ca pfsync_buckets = mp_ncpus * 2; sc = malloc(sizeof(struct pfsync_softc), M_PFSYNC, M_WAITOK | M_ZERO); + sc->sc_flags |= PFSYNCF_OK; sc->sc_maxupdates = 128; ifp = sc->sc_ifp = if_alloc(IFT_PFSYNC); From owner-svn-src-all@freebsd.org Fri Jan 18 08:43:44 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id E28711493BC0; Fri, 18 Jan 2019 08:43:43 +0000 (UTC) (envelope-from hselasky@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 757B2838B5; Fri, 18 Jan 2019 08:43:43 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1: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 6454527B89; Fri, 18 Jan 2019 08:43:43 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x0I8hhoA033776; Fri, 18 Jan 2019 08:43:43 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x0I8hhu7033775; Fri, 18 Jan 2019 08:43:43 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201901180843.x0I8hhu7033775@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Fri, 18 Jan 2019 08:43:43 +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: r343131 - stable/12/sys/dev/usb X-SVN-Group: stable-12 X-SVN-Commit-Author: hselasky X-SVN-Commit-Paths: stable/12/sys/dev/usb X-SVN-Commit-Revision: 343131 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 757B2838B5 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.94 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_SHORT(-0.94)[-0.943,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_LONG(-1.00)[-0.999,0] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 18 Jan 2019 08:43:44 -0000 Author: hselasky Date: Fri Jan 18 08:43:42 2019 New Revision: 343131 URL: https://svnweb.freebsd.org/changeset/base/343131 Log: MFC r342730: Improve USB generic debug messages. Print process ID and name when opening and closing usb/ugenX.Y character device nodes. Sponsored by: Mellanox Technologies Modified: stable/12/sys/dev/usb/usb_generic.c Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/dev/usb/usb_generic.c ============================================================================== --- stable/12/sys/dev/usb/usb_generic.c Fri Jan 18 08:19:54 2019 (r343130) +++ stable/12/sys/dev/usb/usb_generic.c Fri Jan 18 08:43:42 2019 (r343131) @@ -183,7 +183,8 @@ ugen_open(struct usb_fifo *f, int fflags) struct usb_endpoint_descriptor *ed = ep->edesc; uint8_t type; - DPRINTFN(6, "flag=0x%x\n", fflags); + DPRINTFN(1, "flag=0x%x pid=%d name=%s\n", fflags, + curthread->td_proc->p_pid, curthread->td_proc->p_comm); mtx_lock(f->priv_mtx); switch (usbd_get_speed(f->udev)) { @@ -213,7 +214,9 @@ ugen_open(struct usb_fifo *f, int fflags) static void ugen_close(struct usb_fifo *f, int fflags) { - DPRINTFN(6, "flag=0x%x\n", fflags); + + DPRINTFN(1, "flag=0x%x pid=%d name=%s\n", fflags, + curthread->td_proc->p_pid, curthread->td_proc->p_comm); /* cleanup */ From owner-svn-src-all@freebsd.org Fri Jan 18 08:44:51 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id E3B081493C51; Fri, 18 Jan 2019 08:44:50 +0000 (UTC) (envelope-from hselasky@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 8915683A11; Fri, 18 Jan 2019 08:44:50 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1: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 78B4127B8C; Fri, 18 Jan 2019 08:44:50 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x0I8ioe0033905; Fri, 18 Jan 2019 08:44:50 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x0I8iob8033904; Fri, 18 Jan 2019 08:44:50 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201901180844.x0I8iob8033904@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Fri, 18 Jan 2019 08:44:50 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r343132 - stable/11/sys/dev/usb X-SVN-Group: stable-11 X-SVN-Commit-Author: hselasky X-SVN-Commit-Paths: stable/11/sys/dev/usb X-SVN-Commit-Revision: 343132 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 8915683A11 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.94 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_LONG(-1.00)[-0.999,0]; NEURAL_HAM_SHORT(-0.94)[-0.943,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 18 Jan 2019 08:44:51 -0000 Author: hselasky Date: Fri Jan 18 08:44:50 2019 New Revision: 343132 URL: https://svnweb.freebsd.org/changeset/base/343132 Log: MFC r342730: Improve USB generic debug messages. Print process ID and name when opening and closing usb/ugenX.Y character device nodes. Sponsored by: Mellanox Technologies Modified: stable/11/sys/dev/usb/usb_generic.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/dev/usb/usb_generic.c ============================================================================== --- stable/11/sys/dev/usb/usb_generic.c Fri Jan 18 08:43:42 2019 (r343131) +++ stable/11/sys/dev/usb/usb_generic.c Fri Jan 18 08:44:50 2019 (r343132) @@ -181,7 +181,8 @@ ugen_open(struct usb_fifo *f, int fflags) struct usb_endpoint_descriptor *ed = ep->edesc; uint8_t type; - DPRINTFN(6, "flag=0x%x\n", fflags); + DPRINTFN(1, "flag=0x%x pid=%d name=%s\n", fflags, + curthread->td_proc->p_pid, curthread->td_proc->p_comm); mtx_lock(f->priv_mtx); switch (usbd_get_speed(f->udev)) { @@ -211,7 +212,9 @@ ugen_open(struct usb_fifo *f, int fflags) static void ugen_close(struct usb_fifo *f, int fflags) { - DPRINTFN(6, "flag=0x%x\n", fflags); + + DPRINTFN(1, "flag=0x%x pid=%d name=%s\n", fflags, + curthread->td_proc->p_pid, curthread->td_proc->p_comm); /* cleanup */ From owner-svn-src-all@freebsd.org Fri Jan 18 08:45:57 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id A428C1493CF8; Fri, 18 Jan 2019 08:45:57 +0000 (UTC) (envelope-from hselasky@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 41AF783B6C; Fri, 18 Jan 2019 08:45:57 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1: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 321C627B8E; Fri, 18 Jan 2019 08:45:57 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x0I8jvTs034017; Fri, 18 Jan 2019 08:45:57 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x0I8jvZ6034016; Fri, 18 Jan 2019 08:45:57 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201901180845.x0I8jvZ6034016@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Fri, 18 Jan 2019 08:45:57 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r343133 - stable/10/sys/dev/usb X-SVN-Group: stable-10 X-SVN-Commit-Author: hselasky X-SVN-Commit-Paths: stable/10/sys/dev/usb X-SVN-Commit-Revision: 343133 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 41AF783B6C X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.94 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_SHORT(-0.94)[-0.943,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_LONG(-1.00)[-0.999,0] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 18 Jan 2019 08:45:57 -0000 Author: hselasky Date: Fri Jan 18 08:45:56 2019 New Revision: 343133 URL: https://svnweb.freebsd.org/changeset/base/343133 Log: MFC r342730: Improve USB generic debug messages. Print process ID and name when opening and closing usb/ugenX.Y character device nodes. Sponsored by: Mellanox Technologies Modified: stable/10/sys/dev/usb/usb_generic.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/usb/usb_generic.c ============================================================================== --- stable/10/sys/dev/usb/usb_generic.c Fri Jan 18 08:44:50 2019 (r343132) +++ stable/10/sys/dev/usb/usb_generic.c Fri Jan 18 08:45:56 2019 (r343133) @@ -182,7 +182,8 @@ ugen_open(struct usb_fifo *f, int fflags) struct usb_endpoint_descriptor *ed = ep->edesc; uint8_t type; - DPRINTFN(6, "flag=0x%x\n", fflags); + DPRINTFN(1, "flag=0x%x pid=%d name=%s\n", fflags, + curthread->td_proc->p_pid, curthread->td_proc->p_comm); mtx_lock(f->priv_mtx); switch (usbd_get_speed(f->udev)) { @@ -212,7 +213,9 @@ ugen_open(struct usb_fifo *f, int fflags) static void ugen_close(struct usb_fifo *f, int fflags) { - DPRINTFN(6, "flag=0x%x\n", fflags); + + DPRINTFN(1, "flag=0x%x pid=%d name=%s\n", fflags, + curthread->td_proc->p_pid, curthread->td_proc->p_comm); /* cleanup */ From owner-svn-src-all@freebsd.org Fri Jan 18 08:47:49 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 96CCD1493DA6; Fri, 18 Jan 2019 08:47:49 +0000 (UTC) (envelope-from hselasky@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 39A7C83CD2; Fri, 18 Jan 2019 08:47:49 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1: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 1C9C427B8F; Fri, 18 Jan 2019 08:47:49 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x0I8lmJa034151; Fri, 18 Jan 2019 08:47:48 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x0I8lms0034149; Fri, 18 Jan 2019 08:47:48 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201901180847.x0I8lms0034149@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Fri, 18 Jan 2019 08:47:48 +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: r343134 - stable/12/sys/dev/usb X-SVN-Group: stable-12 X-SVN-Commit-Author: hselasky X-SVN-Commit-Paths: stable/12/sys/dev/usb X-SVN-Commit-Revision: 343134 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 39A7C83CD2 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.94 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_LONG(-1.00)[-0.999,0]; NEURAL_HAM_SHORT(-0.95)[-0.945,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 18 Jan 2019 08:47:49 -0000 Author: hselasky Date: Fri Jan 18 08:47:48 2019 New Revision: 343134 URL: https://svnweb.freebsd.org/changeset/base/343134 Log: MFC r342778: Reduce timeout for reading the USB HUB port status to 1000ms and try to filter out dead USB HUB devices by implementing an error counter, so that the USB enumeration thread does not spend all its time reading from non-responding devices, blocking user-space access in the end. Tested by: Matthias Apitz Sponsored by: Mellanox Technologies Modified: stable/12/sys/dev/usb/usb_hub.c stable/12/sys/dev/usb/usb_request.c Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/dev/usb/usb_hub.c ============================================================================== --- stable/12/sys/dev/usb/usb_hub.c Fri Jan 18 08:45:56 2019 (r343133) +++ stable/12/sys/dev/usb/usb_hub.c Fri Jan 18 08:47:48 2019 (r343134) @@ -129,6 +129,8 @@ struct uhub_softc { int sc_disable_enumeration; int sc_disable_port_power; #endif + uint8_t sc_usb_port_errors; /* error counter */ +#define UHUB_USB_PORT_ERRORS_MAX 4 uint8_t sc_flags; #define UHUB_FLAG_DID_EXPLORE 0x01 }; @@ -587,13 +589,25 @@ uhub_read_port_status(struct uhub_softc *sc, uint8_t p struct usb_port_status ps; usb_error_t err; + if (sc->sc_usb_port_errors >= UHUB_USB_PORT_ERRORS_MAX) { + DPRINTFN(4, "port %d, HUB looks dead, too many errors\n", portno); + sc->sc_st.port_status = 0; + sc->sc_st.port_change = 0; + return (USB_ERR_TIMEOUT); + } + err = usbd_req_get_port_status( sc->sc_udev, NULL, &ps, portno); - /* update status regardless of error */ - - sc->sc_st.port_status = UGETW(ps.wPortStatus); - sc->sc_st.port_change = UGETW(ps.wPortChange); + if (err == 0) { + sc->sc_st.port_status = UGETW(ps.wPortStatus); + sc->sc_st.port_change = UGETW(ps.wPortChange); + sc->sc_usb_port_errors = 0; + } else { + sc->sc_st.port_status = 0; + sc->sc_st.port_change = 0; + sc->sc_usb_port_errors++; + } /* debugging print */ Modified: stable/12/sys/dev/usb/usb_request.c ============================================================================== --- stable/12/sys/dev/usb/usb_request.c Fri Jan 18 08:45:56 2019 (r343133) +++ stable/12/sys/dev/usb/usb_request.c Fri Jan 18 08:47:48 2019 (r343134) @@ -1601,8 +1601,9 @@ usbd_req_get_port_status(struct usb_device *udev, stru USETW(req.wValue, 0); req.wIndex[0] = port; req.wIndex[1] = 0; - USETW(req.wLength, sizeof *ps); - return (usbd_do_request(udev, mtx, &req, ps)); + USETW(req.wLength, sizeof(*ps)); + + return (usbd_do_request_flags(udev, mtx, &req, ps, 0, NULL, 1000)); } /*------------------------------------------------------------------------* From owner-svn-src-all@freebsd.org Fri Jan 18 08:48:31 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 3DA731493E11; Fri, 18 Jan 2019 08:48:31 +0000 (UTC) (envelope-from hselasky@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 D599D83E04; Fri, 18 Jan 2019 08:48:30 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1: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 AEA8E27B90; Fri, 18 Jan 2019 08:48:30 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x0I8mU77034242; Fri, 18 Jan 2019 08:48:30 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x0I8mUFW034240; Fri, 18 Jan 2019 08:48:30 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201901180848.x0I8mUFW034240@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Fri, 18 Jan 2019 08:48:30 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r343135 - stable/11/sys/dev/usb X-SVN-Group: stable-11 X-SVN-Commit-Author: hselasky X-SVN-Commit-Paths: stable/11/sys/dev/usb X-SVN-Commit-Revision: 343135 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: D599D83E04 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.94 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_SHORT(-0.95)[-0.945,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_LONG(-1.00)[-0.999,0] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 18 Jan 2019 08:48:31 -0000 Author: hselasky Date: Fri Jan 18 08:48:30 2019 New Revision: 343135 URL: https://svnweb.freebsd.org/changeset/base/343135 Log: MFC r342778: Reduce timeout for reading the USB HUB port status to 1000ms and try to filter out dead USB HUB devices by implementing an error counter, so that the USB enumeration thread does not spend all its time reading from non-responding devices, blocking user-space access in the end. Tested by: Matthias Apitz Sponsored by: Mellanox Technologies Modified: stable/11/sys/dev/usb/usb_hub.c stable/11/sys/dev/usb/usb_request.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/dev/usb/usb_hub.c ============================================================================== --- stable/11/sys/dev/usb/usb_hub.c Fri Jan 18 08:47:48 2019 (r343134) +++ stable/11/sys/dev/usb/usb_hub.c Fri Jan 18 08:48:30 2019 (r343135) @@ -127,6 +127,8 @@ struct uhub_softc { int sc_disable_enumeration; int sc_disable_port_power; #endif + uint8_t sc_usb_port_errors; /* error counter */ +#define UHUB_USB_PORT_ERRORS_MAX 4 uint8_t sc_flags; #define UHUB_FLAG_DID_EXPLORE 0x01 }; @@ -585,13 +587,25 @@ uhub_read_port_status(struct uhub_softc *sc, uint8_t p struct usb_port_status ps; usb_error_t err; + if (sc->sc_usb_port_errors >= UHUB_USB_PORT_ERRORS_MAX) { + DPRINTFN(4, "port %d, HUB looks dead, too many errors\n", portno); + sc->sc_st.port_status = 0; + sc->sc_st.port_change = 0; + return (USB_ERR_TIMEOUT); + } + err = usbd_req_get_port_status( sc->sc_udev, NULL, &ps, portno); - /* update status regardless of error */ - - sc->sc_st.port_status = UGETW(ps.wPortStatus); - sc->sc_st.port_change = UGETW(ps.wPortChange); + if (err == 0) { + sc->sc_st.port_status = UGETW(ps.wPortStatus); + sc->sc_st.port_change = UGETW(ps.wPortChange); + sc->sc_usb_port_errors = 0; + } else { + sc->sc_st.port_status = 0; + sc->sc_st.port_change = 0; + sc->sc_usb_port_errors++; + } /* debugging print */ Modified: stable/11/sys/dev/usb/usb_request.c ============================================================================== --- stable/11/sys/dev/usb/usb_request.c Fri Jan 18 08:47:48 2019 (r343134) +++ stable/11/sys/dev/usb/usb_request.c Fri Jan 18 08:48:30 2019 (r343135) @@ -1595,8 +1595,9 @@ usbd_req_get_port_status(struct usb_device *udev, stru USETW(req.wValue, 0); req.wIndex[0] = port; req.wIndex[1] = 0; - USETW(req.wLength, sizeof *ps); - return (usbd_do_request(udev, mtx, &req, ps)); + USETW(req.wLength, sizeof(*ps)); + + return (usbd_do_request_flags(udev, mtx, &req, ps, 0, NULL, 1000)); } /*------------------------------------------------------------------------* From owner-svn-src-all@freebsd.org Fri Jan 18 08:49:11 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 5CB851493EAE; Fri, 18 Jan 2019 08:49:11 +0000 (UTC) (envelope-from hselasky@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 DB87783F4C; Fri, 18 Jan 2019 08:49:10 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1: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 CDB2827B92; Fri, 18 Jan 2019 08:49:10 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x0I8nAdg034331; Fri, 18 Jan 2019 08:49:10 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x0I8nAH1034329; Fri, 18 Jan 2019 08:49:10 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201901180849.x0I8nAH1034329@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Fri, 18 Jan 2019 08:49:10 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r343136 - stable/10/sys/dev/usb X-SVN-Group: stable-10 X-SVN-Commit-Author: hselasky X-SVN-Commit-Paths: stable/10/sys/dev/usb X-SVN-Commit-Revision: 343136 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: DB87783F4C X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.94 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_LONG(-1.00)[-0.999,0]; NEURAL_HAM_SHORT(-0.95)[-0.945,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 18 Jan 2019 08:49:11 -0000 Author: hselasky Date: Fri Jan 18 08:49:10 2019 New Revision: 343136 URL: https://svnweb.freebsd.org/changeset/base/343136 Log: MFC r342778: Reduce timeout for reading the USB HUB port status to 1000ms and try to filter out dead USB HUB devices by implementing an error counter, so that the USB enumeration thread does not spend all its time reading from non-responding devices, blocking user-space access in the end. Tested by: Matthias Apitz Sponsored by: Mellanox Technologies Modified: stable/10/sys/dev/usb/usb_hub.c stable/10/sys/dev/usb/usb_request.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/usb/usb_hub.c ============================================================================== --- stable/10/sys/dev/usb/usb_hub.c Fri Jan 18 08:48:30 2019 (r343135) +++ stable/10/sys/dev/usb/usb_hub.c Fri Jan 18 08:49:10 2019 (r343136) @@ -130,6 +130,8 @@ struct uhub_softc { int sc_disable_enumeration; int sc_disable_port_power; #endif + uint8_t sc_usb_port_errors; /* error counter */ +#define UHUB_USB_PORT_ERRORS_MAX 4 uint8_t sc_flags; #define UHUB_FLAG_DID_EXPLORE 0x01 }; @@ -588,13 +590,25 @@ uhub_read_port_status(struct uhub_softc *sc, uint8_t p struct usb_port_status ps; usb_error_t err; + if (sc->sc_usb_port_errors >= UHUB_USB_PORT_ERRORS_MAX) { + DPRINTFN(4, "port %d, HUB looks dead, too many errors\n", portno); + sc->sc_st.port_status = 0; + sc->sc_st.port_change = 0; + return (USB_ERR_TIMEOUT); + } + err = usbd_req_get_port_status( sc->sc_udev, NULL, &ps, portno); - /* update status regardless of error */ - - sc->sc_st.port_status = UGETW(ps.wPortStatus); - sc->sc_st.port_change = UGETW(ps.wPortChange); + if (err == 0) { + sc->sc_st.port_status = UGETW(ps.wPortStatus); + sc->sc_st.port_change = UGETW(ps.wPortChange); + sc->sc_usb_port_errors = 0; + } else { + sc->sc_st.port_status = 0; + sc->sc_st.port_change = 0; + sc->sc_usb_port_errors++; + } /* debugging print */ Modified: stable/10/sys/dev/usb/usb_request.c ============================================================================== --- stable/10/sys/dev/usb/usb_request.c Fri Jan 18 08:48:30 2019 (r343135) +++ stable/10/sys/dev/usb/usb_request.c Fri Jan 18 08:49:10 2019 (r343136) @@ -1595,8 +1595,9 @@ usbd_req_get_port_status(struct usb_device *udev, stru USETW(req.wValue, 0); req.wIndex[0] = port; req.wIndex[1] = 0; - USETW(req.wLength, sizeof *ps); - return (usbd_do_request(udev, mtx, &req, ps)); + USETW(req.wLength, sizeof(*ps)); + + return (usbd_do_request_flags(udev, mtx, &req, ps, 0, NULL, 1000)); } /*------------------------------------------------------------------------* From owner-svn-src-all@freebsd.org Fri Jan 18 08:55:27 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 8D9EE14946B9; Fri, 18 Jan 2019 08:55:27 +0000 (UTC) (envelope-from hselasky@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 3041184778; Fri, 18 Jan 2019 08:55:27 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1: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 108B427D34; Fri, 18 Jan 2019 08:55:27 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x0I8tQvv039594; Fri, 18 Jan 2019 08:55:26 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x0I8tQF6039593; Fri, 18 Jan 2019 08:55:26 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201901180855.x0I8tQF6039593@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Fri, 18 Jan 2019 08:55:26 +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: r343137 - stable/12/sys/netinet6 X-SVN-Group: stable-12 X-SVN-Commit-Author: hselasky X-SVN-Commit-Paths: stable/12/sys/netinet6 X-SVN-Commit-Revision: 343137 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 3041184778 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.97 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_SHORT(-0.98)[-0.975,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_LONG(-1.00)[-0.999,0] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 18 Jan 2019 08:55:27 -0000 Author: hselasky Date: Fri Jan 18 08:55:26 2019 New Revision: 343137 URL: https://svnweb.freebsd.org/changeset/base/343137 Log: MFC r342884: Fix loopback traffic when using non-lo0 link local IPv6 addresses. The loopback interface can only receive packets with a single scope ID, namely the scope ID of the loopback interface itself. To mitigate this packets which use the scope ID are appearing as received by the real network interface, see "origifp" in the patch. The current code would drop packets which are designated for loopback which use a link-local scope ID in the destination address or source address, because they won't match the lo0's scope ID. To fix this restore the network interface pointer from the scope ID in the destination address for the problematic cases. See comments added in patch for a more detailed description. This issue was introduced with route caching by karels@ . Reviewed by: bz (network) Differential Revision: https://reviews.freebsd.org/D18769 Sponsored by: Mellanox Technologies Modified: stable/12/sys/netinet6/ip6_output.c Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/netinet6/ip6_output.c ============================================================================== --- stable/12/sys/netinet6/ip6_output.c Fri Jan 18 08:49:10 2019 (r343136) +++ stable/12/sys/netinet6/ip6_output.c Fri Jan 18 08:55:26 2019 (r343137) @@ -571,52 +571,72 @@ again: counter_u64_add(rt->rt_pksent, 1); } - - /* - * The outgoing interface must be in the zone of source and - * destination addresses. - */ - origifp = ifp; - + /* Setup data structures for scope ID checks. */ src0 = ip6->ip6_src; - if (in6_setscope(&src0, origifp, &zone)) - goto badscope; bzero(&src_sa, sizeof(src_sa)); src_sa.sin6_family = AF_INET6; src_sa.sin6_len = sizeof(src_sa); src_sa.sin6_addr = ip6->ip6_src; - if (sa6_recoverscope(&src_sa) || zone != src_sa.sin6_scope_id) - goto badscope; dst0 = ip6->ip6_dst; - if (in6_setscope(&dst0, origifp, &zone)) - goto badscope; /* re-initialize to be sure */ bzero(&dst_sa, sizeof(dst_sa)); dst_sa.sin6_family = AF_INET6; dst_sa.sin6_len = sizeof(dst_sa); dst_sa.sin6_addr = ip6->ip6_dst; - if (sa6_recoverscope(&dst_sa) || zone != dst_sa.sin6_scope_id) { - goto badscope; - } - /* We should use ia_ifp to support the case of - * sending packets to an address of our own. - */ - if (ia != NULL && ia->ia_ifp) - ifp = ia->ia_ifp; + /* Check for valid scope ID. */ + if (in6_setscope(&src0, ifp, &zone) == 0 && + sa6_recoverscope(&src_sa) == 0 && zone == src_sa.sin6_scope_id && + in6_setscope(&dst0, ifp, &zone) == 0 && + sa6_recoverscope(&dst_sa) == 0 && zone == dst_sa.sin6_scope_id) { + /* + * The outgoing interface is in the zone of the source + * and destination addresses. + * + * Because the loopback interface cannot receive + * packets with a different scope ID than its own, + * there is a trick is to pretend the outgoing packet + * was received by the real network interface, by + * setting "origifp" different from "ifp". This is + * only allowed when "ifp" is a loopback network + * interface. Refer to code in nd6_output_ifp() for + * more details. + */ + origifp = ifp; + + /* + * We should use ia_ifp to support the case of sending + * packets to an address of our own. + */ + if (ia != NULL && ia->ia_ifp) + ifp = ia->ia_ifp; - /* scope check is done. */ - goto routefound; + } else if ((ifp->if_flags & IFF_LOOPBACK) == 0 || + sa6_recoverscope(&src_sa) != 0 || + sa6_recoverscope(&dst_sa) != 0 || + dst_sa.sin6_scope_id == 0 || + (src_sa.sin6_scope_id != 0 && + src_sa.sin6_scope_id != dst_sa.sin6_scope_id) || + (origifp = ifnet_byindex(dst_sa.sin6_scope_id)) == NULL) { + /* + * If the destination network interface is not a + * loopback interface, or the destination network + * address has no scope ID, or the source address has + * a scope ID set which is different from the + * destination address one, or there is no network + * interface representing this scope ID, the address + * pair is considered invalid. + */ + IP6STAT_INC(ip6s_badscope); + in6_ifstat_inc(ifp, ifs6_out_discard); + if (error == 0) + error = EHOSTUNREACH; /* XXX */ + goto bad; + } - badscope: - IP6STAT_INC(ip6s_badscope); - in6_ifstat_inc(origifp, ifs6_out_discard); - if (error == 0) - error = EHOSTUNREACH; /* XXX */ - goto bad; + /* All scope ID checks are successful. */ - routefound: if (rt && !IN6_IS_ADDR_MULTICAST(&ip6->ip6_dst)) { if (opt && opt->ip6po_nextroute.ro_rt) { /* From owner-svn-src-all@freebsd.org Fri Jan 18 08:57:24 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 3B52B1494754; Fri, 18 Jan 2019 08:57:24 +0000 (UTC) (envelope-from hselasky@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 D38EE848E9; Fri, 18 Jan 2019 08:57:23 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1: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 C058327D35; Fri, 18 Jan 2019 08:57:23 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x0I8vNNm039726; Fri, 18 Jan 2019 08:57:23 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x0I8vNVR039725; Fri, 18 Jan 2019 08:57:23 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201901180857.x0I8vNVR039725@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Fri, 18 Jan 2019 08:57:23 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r343138 - stable/11/sys/netinet6 X-SVN-Group: stable-11 X-SVN-Commit-Author: hselasky X-SVN-Commit-Paths: stable/11/sys/netinet6 X-SVN-Commit-Revision: 343138 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: D38EE848E9 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.97 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_SHORT(-0.98)[-0.975,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_LONG(-1.00)[-0.999,0] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 18 Jan 2019 08:57:24 -0000 Author: hselasky Date: Fri Jan 18 08:57:23 2019 New Revision: 343138 URL: https://svnweb.freebsd.org/changeset/base/343138 Log: MFC r342884: Fix loopback traffic when using non-lo0 link local IPv6 addresses. The loopback interface can only receive packets with a single scope ID, namely the scope ID of the loopback interface itself. To mitigate this packets which use the scope ID are appearing as received by the real network interface, see "origifp" in the patch. The current code would drop packets which are designated for loopback which use a link-local scope ID in the destination address or source address, because they won't match the lo0's scope ID. To fix this restore the network interface pointer from the scope ID in the destination address for the problematic cases. See comments added in patch for a more detailed description. This issue was introduced with route caching by karels@ . Reviewed by: bz (network) Differential Revision: https://reviews.freebsd.org/D18769 Sponsored by: Mellanox Technologies Modified: stable/11/sys/netinet6/ip6_output.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/netinet6/ip6_output.c ============================================================================== --- stable/11/sys/netinet6/ip6_output.c Fri Jan 18 08:55:26 2019 (r343137) +++ stable/11/sys/netinet6/ip6_output.c Fri Jan 18 08:57:23 2019 (r343138) @@ -576,52 +576,72 @@ again: counter_u64_add(rt->rt_pksent, 1); } - - /* - * The outgoing interface must be in the zone of source and - * destination addresses. - */ - origifp = ifp; - + /* Setup data structures for scope ID checks. */ src0 = ip6->ip6_src; - if (in6_setscope(&src0, origifp, &zone)) - goto badscope; bzero(&src_sa, sizeof(src_sa)); src_sa.sin6_family = AF_INET6; src_sa.sin6_len = sizeof(src_sa); src_sa.sin6_addr = ip6->ip6_src; - if (sa6_recoverscope(&src_sa) || zone != src_sa.sin6_scope_id) - goto badscope; dst0 = ip6->ip6_dst; - if (in6_setscope(&dst0, origifp, &zone)) - goto badscope; /* re-initialize to be sure */ bzero(&dst_sa, sizeof(dst_sa)); dst_sa.sin6_family = AF_INET6; dst_sa.sin6_len = sizeof(dst_sa); dst_sa.sin6_addr = ip6->ip6_dst; - if (sa6_recoverscope(&dst_sa) || zone != dst_sa.sin6_scope_id) { - goto badscope; - } - /* We should use ia_ifp to support the case of - * sending packets to an address of our own. - */ - if (ia != NULL && ia->ia_ifp) - ifp = ia->ia_ifp; + /* Check for valid scope ID. */ + if (in6_setscope(&src0, ifp, &zone) == 0 && + sa6_recoverscope(&src_sa) == 0 && zone == src_sa.sin6_scope_id && + in6_setscope(&dst0, ifp, &zone) == 0 && + sa6_recoverscope(&dst_sa) == 0 && zone == dst_sa.sin6_scope_id) { + /* + * The outgoing interface is in the zone of the source + * and destination addresses. + * + * Because the loopback interface cannot receive + * packets with a different scope ID than its own, + * there is a trick is to pretend the outgoing packet + * was received by the real network interface, by + * setting "origifp" different from "ifp". This is + * only allowed when "ifp" is a loopback network + * interface. Refer to code in nd6_output_ifp() for + * more details. + */ + origifp = ifp; + + /* + * We should use ia_ifp to support the case of sending + * packets to an address of our own. + */ + if (ia != NULL && ia->ia_ifp) + ifp = ia->ia_ifp; - /* scope check is done. */ - goto routefound; + } else if ((ifp->if_flags & IFF_LOOPBACK) == 0 || + sa6_recoverscope(&src_sa) != 0 || + sa6_recoverscope(&dst_sa) != 0 || + dst_sa.sin6_scope_id == 0 || + (src_sa.sin6_scope_id != 0 && + src_sa.sin6_scope_id != dst_sa.sin6_scope_id) || + (origifp = ifnet_byindex(dst_sa.sin6_scope_id)) == NULL) { + /* + * If the destination network interface is not a + * loopback interface, or the destination network + * address has no scope ID, or the source address has + * a scope ID set which is different from the + * destination address one, or there is no network + * interface representing this scope ID, the address + * pair is considered invalid. + */ + IP6STAT_INC(ip6s_badscope); + in6_ifstat_inc(ifp, ifs6_out_discard); + if (error == 0) + error = EHOSTUNREACH; /* XXX */ + goto bad; + } - badscope: - IP6STAT_INC(ip6s_badscope); - in6_ifstat_inc(origifp, ifs6_out_discard); - if (error == 0) - error = EHOSTUNREACH; /* XXX */ - goto bad; + /* All scope ID checks are successful. */ - routefound: if (rt && !IN6_IS_ADDR_MULTICAST(&ip6->ip6_dst)) { if (opt && opt->ip6po_nextroute.ro_rt) { /* From owner-svn-src-all@freebsd.org Fri Jan 18 08:58:13 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id D0A2914947C8; Fri, 18 Jan 2019 08:58:13 +0000 (UTC) (envelope-from eugen@freebsd.org) Received: from hz.grosbein.net (hz.grosbein.net [IPv6:2a01:4f8:d12:604::2]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "hz.grosbein.net", Issuer "hz.grosbein.net" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 536C884A2F; Fri, 18 Jan 2019 08:58:13 +0000 (UTC) (envelope-from eugen@freebsd.org) Received: from eg.sd.rdtc.ru (eg.sd.rdtc.ru [IPv6:2a03:3100:c:13:0:0:0:5]) by hz.grosbein.net (8.15.2/8.15.2) with ESMTPS id x0I8w1u0085847 (version=TLSv1.2 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Fri, 18 Jan 2019 09:58:04 +0100 (CET) (envelope-from eugen@freebsd.org) X-Envelope-From: eugen@freebsd.org X-Envelope-To: cem@freebsd.org Received: from [10.58.0.4] ([10.58.0.4]) by eg.sd.rdtc.ru (8.15.2/8.15.2) with ESMTPS id x0I8vxsX064930 (version=TLSv1.2 cipher=DHE-RSA-AES128-SHA bits=128 verify=NOT); Fri, 18 Jan 2019 15:58:00 +0700 (+07) (envelope-from eugen@freebsd.org) Subject: Re: svn commit: r343118 - in head/usr.sbin: . trim To: cem@freebsd.org References: <201901171808.x0HI80jC068564@repo.freebsd.org> <2d239dc0-915c-2d2b-0936-a40af5e9ead9@freebsd.org> Cc: src-committers , svn-src-all@freebsd.org, svn-src-head@freebsd.org From: Eugene Grosbein Message-ID: Date: Fri, 18 Jan 2019 15:57:54 +0700 User-Agent: Mozilla/5.0 (Windows NT 6.3; WOW64; rv:45.0) Gecko/20100101 Thunderbird/45.8.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-1.6 required=5.0 tests=BAYES_00,SPF_SOFTFAIL autolearn=no autolearn_force=no version=3.4.2 X-Spam-Report: * -2.3 BAYES_00 BODY: Bayes spam probability is 0 to 1% * [score: 0.0000] * 0.7 SPF_SOFTFAIL SPF: sender does not match SPF record (softfail) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on hz.grosbein.net X-Rspamd-Queue-Id: 536C884A2F X-Spamd-Bar: ------ Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-6.99 / 15.00]; NEURAL_HAM_MEDIUM(-1.00)[-1.000,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; REPLY(-4.00)[]; NEURAL_HAM_SHORT(-0.99)[-0.991,0] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 18 Jan 2019 08:58:14 -0000 18.01.2019 4:45, Conrad Meyer wrote: >>> Please back it out; stop attributing code review to "hackers@," which >>> can not (it's a list, not individuals) and did not review this >>> changeset; and put it on phabricator for actual review. >> >> There is already https://reviews.freebsd.org/D18380 by imp >> and there were over 6 weeks since it had an update. >> Newly committed code has most of its changes. > > Your response does not address *any* of the above concerns. It's just > unrelated. > > The review you linked to isn't one you submitted for this change; This is a review still. > it's Warner's, and that one stalled because you were such a jerk to him This is not true. > last time that he needed time off from you. Please do not speak for him. > If you want to socialize, revive, or expedite someone else's review, > maybe add a new comment to the review, I did. > or post a discussion hackers@, I did. > or something like that. You still can't attribute code review to > hackers@, especially as no such review happened. It happened a week before I make first commit, in a way. I cannot make people do a review if they do not want to review. And we still had no utility to do the job. From owner-svn-src-all@freebsd.org Fri Jan 18 08:59:01 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 7B38A149485B; Fri, 18 Jan 2019 08:59:01 +0000 (UTC) (envelope-from hselasky@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 1A91384BC9; Fri, 18 Jan 2019 08:59:01 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1: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 EC23327D36; Fri, 18 Jan 2019 08:59:00 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x0I8x0sN039848; Fri, 18 Jan 2019 08:59:00 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x0I8x0m8039847; Fri, 18 Jan 2019 08:59:00 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201901180859.x0I8x0m8039847@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Fri, 18 Jan 2019 08:59:00 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r343139 - stable/10/sys/netinet6 X-SVN-Group: stable-10 X-SVN-Commit-Author: hselasky X-SVN-Commit-Paths: stable/10/sys/netinet6 X-SVN-Commit-Revision: 343139 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 1A91384BC9 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.97 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_LONG(-1.00)[-0.999,0]; NEURAL_HAM_SHORT(-0.98)[-0.975,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 18 Jan 2019 08:59:01 -0000 Author: hselasky Date: Fri Jan 18 08:59:00 2019 New Revision: 343139 URL: https://svnweb.freebsd.org/changeset/base/343139 Log: MFC r342884: Fix loopback traffic when using non-lo0 link local IPv6 addresses. The loopback interface can only receive packets with a single scope ID, namely the scope ID of the loopback interface itself. To mitigate this packets which use the scope ID are appearing as received by the real network interface, see "origifp" in the patch. The current code would drop packets which are designated for loopback which use a link-local scope ID in the destination address or source address, because they won't match the lo0's scope ID. To fix this restore the network interface pointer from the scope ID in the destination address for the problematic cases. See comments added in patch for a more detailed description. This issue was introduced with route caching by karels@ . Reviewed by: bz (network) Differential Revision: https://reviews.freebsd.org/D18769 Sponsored by: Mellanox Technologies Modified: stable/10/sys/netinet6/ip6_output.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/netinet6/ip6_output.c ============================================================================== --- stable/10/sys/netinet6/ip6_output.c Fri Jan 18 08:57:23 2019 (r343138) +++ stable/10/sys/netinet6/ip6_output.c Fri Jan 18 08:59:00 2019 (r343139) @@ -565,52 +565,72 @@ again: counter_u64_add(rt->rt_pksent, 1); } - - /* - * The outgoing interface must be in the zone of source and - * destination addresses. - */ - origifp = ifp; - + /* Setup data structures for scope ID checks. */ src0 = ip6->ip6_src; - if (in6_setscope(&src0, origifp, &zone)) - goto badscope; bzero(&src_sa, sizeof(src_sa)); src_sa.sin6_family = AF_INET6; src_sa.sin6_len = sizeof(src_sa); src_sa.sin6_addr = ip6->ip6_src; - if (sa6_recoverscope(&src_sa) || zone != src_sa.sin6_scope_id) - goto badscope; dst0 = ip6->ip6_dst; - if (in6_setscope(&dst0, origifp, &zone)) - goto badscope; /* re-initialize to be sure */ bzero(&dst_sa, sizeof(dst_sa)); dst_sa.sin6_family = AF_INET6; dst_sa.sin6_len = sizeof(dst_sa); dst_sa.sin6_addr = ip6->ip6_dst; - if (sa6_recoverscope(&dst_sa) || zone != dst_sa.sin6_scope_id) { - goto badscope; - } - /* We should use ia_ifp to support the case of - * sending packets to an address of our own. - */ - if (ia != NULL && ia->ia_ifp) - ifp = ia->ia_ifp; + /* Check for valid scope ID. */ + if (in6_setscope(&src0, ifp, &zone) == 0 && + sa6_recoverscope(&src_sa) == 0 && zone == src_sa.sin6_scope_id && + in6_setscope(&dst0, ifp, &zone) == 0 && + sa6_recoverscope(&dst_sa) == 0 && zone == dst_sa.sin6_scope_id) { + /* + * The outgoing interface is in the zone of the source + * and destination addresses. + * + * Because the loopback interface cannot receive + * packets with a different scope ID than its own, + * there is a trick is to pretend the outgoing packet + * was received by the real network interface, by + * setting "origifp" different from "ifp". This is + * only allowed when "ifp" is a loopback network + * interface. Refer to code in nd6_output_ifp() for + * more details. + */ + origifp = ifp; + + /* + * We should use ia_ifp to support the case of sending + * packets to an address of our own. + */ + if (ia != NULL && ia->ia_ifp) + ifp = ia->ia_ifp; - /* scope check is done. */ - goto routefound; + } else if ((ifp->if_flags & IFF_LOOPBACK) == 0 || + sa6_recoverscope(&src_sa) != 0 || + sa6_recoverscope(&dst_sa) != 0 || + dst_sa.sin6_scope_id == 0 || + (src_sa.sin6_scope_id != 0 && + src_sa.sin6_scope_id != dst_sa.sin6_scope_id) || + (origifp = ifnet_byindex(dst_sa.sin6_scope_id)) == NULL) { + /* + * If the destination network interface is not a + * loopback interface, or the destination network + * address has no scope ID, or the source address has + * a scope ID set which is different from the + * destination address one, or there is no network + * interface representing this scope ID, the address + * pair is considered invalid. + */ + IP6STAT_INC(ip6s_badscope); + in6_ifstat_inc(ifp, ifs6_out_discard); + if (error == 0) + error = EHOSTUNREACH; /* XXX */ + goto bad; + } - badscope: - IP6STAT_INC(ip6s_badscope); - in6_ifstat_inc(origifp, ifs6_out_discard); - if (error == 0) - error = EHOSTUNREACH; /* XXX */ - goto bad; + /* All scope ID checks are successful. */ - routefound: if (rt && !IN6_IS_ADDR_MULTICAST(&ip6->ip6_dst)) { if (opt && opt->ip6po_nextroute.ro_rt) { /* From owner-svn-src-all@freebsd.org Fri Jan 18 09:00:07 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 658781494B42; Fri, 18 Jan 2019 09:00:07 +0000 (UTC) (envelope-from eugen@freebsd.org) Received: from hz.grosbein.net (hz.grosbein.net [IPv6:2a01:4f8:d12:604::2]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "hz.grosbein.net", Issuer "hz.grosbein.net" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id DE59584DD6; Fri, 18 Jan 2019 09:00:06 +0000 (UTC) (envelope-from eugen@freebsd.org) Received: from eg.sd.rdtc.ru (eg.sd.rdtc.ru [IPv6:2a03:3100:c:13:0:0:0:5]) by hz.grosbein.net (8.15.2/8.15.2) with ESMTPS id x0I8xrZt085873 (version=TLSv1.2 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Fri, 18 Jan 2019 09:59:54 +0100 (CET) (envelope-from eugen@freebsd.org) X-Envelope-From: eugen@freebsd.org X-Envelope-To: imp@bsdimp.com Received: from [10.58.0.4] ([10.58.0.4]) by eg.sd.rdtc.ru (8.15.2/8.15.2) with ESMTPS id x0I8xr0T064953 (version=TLSv1.2 cipher=DHE-RSA-AES128-SHA bits=128 verify=NOT); Fri, 18 Jan 2019 15:59:53 +0700 (+07) (envelope-from eugen@freebsd.org) Subject: Re: svn commit: r343118 - in head/usr.sbin: . trim To: Warner Losh , "Rodney W. Grimes" References: <201901180048.x0I0mois052935@pdx.rh.CN85.dnsmgr.net> Cc: "Conrad E. Meyer" , src-committers , svn-src-all@freebsd.org, svn-src-head@freebsd.org From: Eugene Grosbein Message-ID: Date: Fri, 18 Jan 2019 15:59:47 +0700 User-Agent: Mozilla/5.0 (Windows NT 6.3; WOW64; rv:45.0) Gecko/20100101 Thunderbird/45.8.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-1.6 required=5.0 tests=BAYES_00,SPF_SOFTFAIL autolearn=no autolearn_force=no version=3.4.2 X-Spam-Report: * -2.3 BAYES_00 BODY: Bayes spam probability is 0 to 1% * [score: 0.0000] * 0.7 SPF_SOFTFAIL SPF: sender does not match SPF record (softfail) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on hz.grosbein.net X-Rspamd-Queue-Id: DE59584DD6 X-Spamd-Bar: ------ Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-6.99 / 15.00]; NEURAL_HAM_MEDIUM(-1.00)[-1.000,0]; NEURAL_HAM_SHORT(-0.99)[-0.994,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; REPLY(-4.00)[] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 18 Jan 2019 09:00:07 -0000 18.01.2019 7:54, Warner Losh wrote: > On Thu, Jan 17, 2019 at 5:48 PM Rodney W. Grimes > wrote: > > I'm sorry, but I fire back when people abuse me. Sorry, I did not mean to. And I still do not understand how do I abuse you now. From owner-svn-src-all@freebsd.org Fri Jan 18 09:06:06 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 318791494E3C; Fri, 18 Jan 2019 09:06:06 +0000 (UTC) (envelope-from eugen@freebsd.org) Received: from hz.grosbein.net (hz.grosbein.net [IPv6:2a01:4f8:d12:604::2]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "hz.grosbein.net", Issuer "hz.grosbein.net" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id AB37285487; Fri, 18 Jan 2019 09:06:05 +0000 (UTC) (envelope-from eugen@freebsd.org) Received: from eg.sd.rdtc.ru (eg.sd.rdtc.ru [IPv6:2a03:3100:c:13:0:0:0:5]) by hz.grosbein.net (8.15.2/8.15.2) with ESMTPS id x0I95wsP085978 (version=TLSv1.2 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Fri, 18 Jan 2019 10:05:59 +0100 (CET) (envelope-from eugen@freebsd.org) X-Envelope-From: eugen@freebsd.org X-Envelope-To: imp@bsdimp.com Received: from [10.58.0.4] ([10.58.0.4]) by eg.sd.rdtc.ru (8.15.2/8.15.2) with ESMTPS id x0I95vTP065002 (version=TLSv1.2 cipher=DHE-RSA-AES128-SHA bits=128 verify=NOT); Fri, 18 Jan 2019 16:05:57 +0700 (+07) (envelope-from eugen@freebsd.org) Subject: Re: svn commit: r343118 - in head/usr.sbin: . trim To: Warner Losh References: <201901171808.x0HI80jC068564@repo.freebsd.org> <2d239dc0-915c-2d2b-0936-a40af5e9ead9@freebsd.org> Cc: "Conrad E. Meyer" , src-committers , svn-src-all@freebsd.org, svn-src-head@freebsd.org From: Eugene Grosbein Message-ID: <4b204e03-48fd-07ae-45ae-70c5e03442c2@freebsd.org> Date: Fri, 18 Jan 2019 16:05:52 +0700 User-Agent: Mozilla/5.0 (Windows NT 6.3; WOW64; rv:45.0) Gecko/20100101 Thunderbird/45.8.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-1.6 required=5.0 tests=BAYES_00,SPF_SOFTFAIL autolearn=no autolearn_force=no version=3.4.2 X-Spam-Report: * -2.3 BAYES_00 BODY: Bayes spam probability is 0 to 1% * [score: 0.0000] * 0.7 SPF_SOFTFAIL SPF: sender does not match SPF record (softfail) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on hz.grosbein.net X-Rspamd-Queue-Id: AB37285487 X-Spamd-Bar: ------ Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-6.99 / 15.00]; NEURAL_HAM_MEDIUM(-1.00)[-1.000,0]; NEURAL_HAM_SHORT(-0.99)[-0.990,0]; REPLY(-4.00)[]; NEURAL_HAM_LONG(-1.00)[-1.000,0] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 18 Jan 2019 09:06:06 -0000 18.01.2019 7:39, Warner Losh wrote: > You hijacked that review. Don't you dare use it as evidence of consent to the sh*t you just pulled. > > Back it out, do a proper review. This one was not proper, nor was it complete. Don't go using my name to support a program I've come to think is a really bad idea. I do not see how I "hijacked" it this time. And I do not understand how another review would help as there is clearly no one wishing to review the code anymore. I really hope this is not some kind of bureaucracy or cargo cult for sake of formal procedures but mis-understanding at my side. Please explain. From owner-svn-src-all@freebsd.org Fri Jan 18 09:17:23 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 6509514951DD; Fri, 18 Jan 2019 09:17:23 +0000 (UTC) (envelope-from eugen@grosbein.net) Received: from hz.grosbein.net (hz.grosbein.net [IPv6:2a01:4f8:d12:604::2]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "hz.grosbein.net", Issuer "hz.grosbein.net" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id D246085B48; Fri, 18 Jan 2019 09:17:22 +0000 (UTC) (envelope-from eugen@grosbein.net) Received: from eg.sd.rdtc.ru (eg.sd.rdtc.ru [IPv6:2a03:3100:c:13:0:0:0:5]) by hz.grosbein.net (8.15.2/8.15.2) with ESMTPS id x0I9HA6d086105 (version=TLSv1.2 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Fri, 18 Jan 2019 10:17:11 +0100 (CET) (envelope-from eugen@grosbein.net) X-Envelope-From: eugen@grosbein.net X-Envelope-To: sobomax@freebsd.org Received: from [10.58.0.4] ([10.58.0.4]) by eg.sd.rdtc.ru (8.15.2/8.15.2) with ESMTPS id x0I9HAXe065048 (version=TLSv1.2 cipher=DHE-RSA-AES128-SHA bits=128 verify=NOT); Fri, 18 Jan 2019 16:17:10 +0700 (+07) (envelope-from eugen@grosbein.net) Subject: Re: svn commit: r343118 - in head/usr.sbin: . trim To: Maxim Sobolev , Cy Schubert References: <201901172046.x0HKkvWs011502@slippy.cwsent.com> Cc: "Conrad E. Meyer" , src-committers , svn-src-all@freebsd.org, svn-src-head@freebsd.org From: Eugene Grosbein Message-ID: <81bb343b-ad8a-371d-d94f-f72c8dbce754@grosbein.net> Date: Fri, 18 Jan 2019 16:17:04 +0700 User-Agent: Mozilla/5.0 (Windows NT 6.3; WOW64; rv:45.0) Gecko/20100101 Thunderbird/45.8.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=0.3 required=5.0 tests=BAYES_00,LOCAL_FROM,SPF_PASS autolearn=no autolearn_force=no version=3.4.2 X-Spam-Report: * -2.3 BAYES_00 BODY: Bayes spam probability is 0 to 1% * [score: 0.0000] * -0.0 SPF_PASS SPF: sender matches SPF record * 2.6 LOCAL_FROM From my domains X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on hz.grosbein.net X-Rspamd-Queue-Id: D246085B48 X-Spamd-Bar: ------ Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-7.00 / 15.00]; NEURAL_HAM_MEDIUM(-1.00)[-1.000,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; REPLY(-4.00)[]; NEURAL_HAM_SHORT(-1.00)[-0.998,0] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 18 Jan 2019 09:17:23 -0000 18.01.2019 5:25, Maxim Sobolev wrote: > Using usr.sbin/trim as an example. We still lack a command usable at installation stage (escape to shell) to trim a device or partition dedicated to ZFS Cache/ZFS Intention Log/zvol any other use when ports/packages are not yet available. From owner-svn-src-all@freebsd.org Fri Jan 18 09:41:19 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id EEE201495C19; Fri, 18 Jan 2019 09:41:18 +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 94F8D86ABD; Fri, 18 Jan 2019 09:41:18 +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 8702948F; Fri, 18 Jan 2019 09:41:18 +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 x0I9fI4u062449; Fri, 18 Jan 2019 09:41:18 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x0I9fHok062443; Fri, 18 Jan 2019 09:41:17 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201901180941.x0I9fHok062443@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Fri, 18 Jan 2019 09:41:17 +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: r343140 - stable/12/usr.sbin/cpucontrol X-SVN-Group: stable-12 X-SVN-Commit-Author: kib X-SVN-Commit-Paths: stable/12/usr.sbin/cpucontrol X-SVN-Commit-Revision: 343140 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 94F8D86ABD X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.93 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_SHORT(-0.94)[-0.936,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_LONG(-1.00)[-0.999,0] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 18 Jan 2019 09:41:19 -0000 Author: kib Date: Fri Jan 18 09:41:17 2019 New Revision: 343140 URL: https://svnweb.freebsd.org/changeset/base/343140 Log: MFC r340421 (by cem), r342934: cpucontrol(8): De-duplicate common update logic. Modified: stable/12/usr.sbin/cpucontrol/amd.c stable/12/usr.sbin/cpucontrol/amd10h.c stable/12/usr.sbin/cpucontrol/cpucontrol.c stable/12/usr.sbin/cpucontrol/cpucontrol.h stable/12/usr.sbin/cpucontrol/intel.c stable/12/usr.sbin/cpucontrol/via.c Directory Properties: stable/12/ (props changed) Modified: stable/12/usr.sbin/cpucontrol/amd.c ============================================================================== --- stable/12/usr.sbin/cpucontrol/amd.c Fri Jan 18 08:59:00 2019 (r343139) +++ stable/12/usr.sbin/cpucontrol/amd.c Fri Jan 18 09:41:17 2019 (r343140) @@ -73,16 +73,16 @@ amd_probe(int fd) } void -amd_update(const char *dev, const char *path) +amd_update(const struct ucode_update_params *params) { - int fd, devfd; + int devfd; unsigned int i; - struct stat st; - uint32_t *fw_image; - amd_fw_header_t *fw_header; + const char *dev, *path; + const uint32_t *fw_image; + const amd_fw_header_t *fw_header; uint32_t sum; uint32_t signature; - uint32_t *fw_data; + const uint32_t *fw_data; size_t fw_size; cpuctl_cpuid_args_t idargs = { .level = 1, /* Request signature. */ @@ -90,16 +90,14 @@ amd_update(const char *dev, const char *path) cpuctl_update_args_t args; int error; + dev = params->dev_path; + path = params->fw_path; + devfd = params->devfd; + fw_image = params->fwimage; + assert(path); assert(dev); - fd = -1; - fw_image = MAP_FAILED; - devfd = open(dev, O_RDWR); - if (devfd < 0) { - WARN(0, "could not open %s for writing", dev); - return; - } error = ioctl(devfd, CPUCTL_CPUID, &idargs); if (error < 0) { WARN(0, "ioctl()"); @@ -115,37 +113,18 @@ amd_update(const char *dev, const char *path) /* * Open the firmware file. */ - fd = open(path, O_RDONLY, 0); - if (fd < 0) { - WARN(0, "open(%s)", path); - goto fail; - } - error = fstat(fd, &st); - if (error != 0) { - WARN(0, "fstat(%s)", path); - goto fail; - } - if (st.st_size < 0 || (unsigned)st.st_size < sizeof(*fw_header)) { + if (params->fwsize < sizeof(*fw_header)) { WARNX(2, "file too short: %s", path); goto fail; } - /* - * mmap the whole image. - */ - fw_image = (uint32_t *)mmap(NULL, st.st_size, PROT_READ, - MAP_PRIVATE, fd, 0); - if (fw_image == MAP_FAILED) { - WARN(0, "mmap(%s)", path); - goto fail; - } - fw_header = (amd_fw_header_t *)fw_image; + fw_header = (const amd_fw_header_t *)fw_image; if ((fw_header->magic >> 8) != AMD_MAGIC) { WARNX(2, "%s is not a valid amd firmware: version mismatch", path); goto fail; } - fw_data = (uint32_t *)(fw_header + 1); - fw_size = (st.st_size - sizeof(*fw_header)) / sizeof(uint32_t); + fw_data = (const uint32_t *)(fw_header + 1); + fw_size = (params->fwsize - sizeof(*fw_header)) / sizeof(uint32_t); /* * Check the primary checksum. @@ -160,8 +139,8 @@ amd_update(const char *dev, const char *path) if (signature == fw_header->signature) { fprintf(stderr, "%s: updating cpu %s... ", path, dev); - args.data = fw_image; - args.size = st.st_size; + args.data = __DECONST(void *, fw_image); + args.size = params->fwsize; error = ioctl(devfd, CPUCTL_UPDATE, &args); if (error < 0) { fprintf(stderr, "failed.\n"); @@ -172,12 +151,5 @@ amd_update(const char *dev, const char *path) } fail: - if (fd >= 0) - close(fd); - if (devfd >= 0) - close(devfd); - if (fw_image != MAP_FAILED) - if(munmap(fw_image, st.st_size) != 0) - warn("munmap(%s)", path); return; } Modified: stable/12/usr.sbin/cpucontrol/amd10h.c ============================================================================== --- stable/12/usr.sbin/cpucontrol/amd10h.c Fri Jan 18 08:59:00 2019 (r343139) +++ stable/12/usr.sbin/cpucontrol/amd10h.c Fri Jan 18 09:41:17 2019 (r343140) @@ -88,9 +88,8 @@ amd10h_probe(int fd) * source code. */ void -amd10h_update(const char *dev, const char *path) +amd10h_update(const struct ucode_update_params *params) { - struct stat st; cpuctl_cpuid_args_t idargs; cpuctl_msr_args_t msrargs; cpuctl_update_args_t args; @@ -100,27 +99,27 @@ amd10h_update(const char *dev, const char *path) const section_header_t *section_header; const container_header_t *container_header; const uint8_t *fw_data; - uint8_t *fw_image; + const uint8_t *fw_image; + const char *dev, *path; size_t fw_size; size_t selected_size; uint32_t revision; uint32_t new_rev; uint32_t signature; uint16_t equiv_id; - int fd, devfd; + int devfd; unsigned int i; int error; + dev = params->dev_path; + path = params->fw_path; + devfd = params->devfd; + fw_image = params->fwimage; + fw_size = params->fwsize; + assert(path); assert(dev); - fd = -1; - fw_image = MAP_FAILED; - devfd = open(dev, O_RDWR); - if (devfd < 0) { - WARN(0, "could not open %s for writing", dev); - return; - } idargs.level = 1; error = ioctl(devfd, CPUCTL_CPUID, &idargs); if (error < 0) { @@ -149,33 +148,15 @@ amd10h_update(const char *dev, const char *path) * Open the firmware file. */ WARNX(1, "checking %s for update.", path); - fd = open(path, O_RDONLY, 0); - if (fd < 0) { - WARN(0, "open(%s)", path); - goto done; - } - error = fstat(fd, &st); - if (error != 0) { - WARN(0, "fstat(%s)", path); - goto done; - } - if (st.st_size < 0 || (size_t)st.st_size < + if (fw_size < (sizeof(*container_header) + sizeof(*section_header))) { WARNX(2, "file too short: %s", path); goto done; } - fw_size = st.st_size; /* * mmap the whole image. */ - fw_image = (uint8_t *)mmap(NULL, st.st_size, PROT_READ, - MAP_PRIVATE, fd, 0); - if (fw_image == MAP_FAILED) { - WARN(0, "mmap(%s)", path); - goto done; - } - fw_data = fw_image; container_header = (const container_header_t *)fw_data; if (container_header->magic != AMD_10H_MAGIC) { @@ -306,12 +287,5 @@ amd10h_update(const char *dev, const char *path) WARNX(0, "revision after update %#x", new_rev); done: - if (fd >= 0) - close(fd); - if (devfd >= 0) - close(devfd); - if (fw_image != MAP_FAILED) - if (munmap(fw_image, st.st_size) != 0) - warn("munmap(%s)", path); return; } Modified: stable/12/usr.sbin/cpucontrol/cpucontrol.c ============================================================================== --- stable/12/usr.sbin/cpucontrol/cpucontrol.c Fri Jan 18 08:59:00 2019 (r343139) +++ stable/12/usr.sbin/cpucontrol/cpucontrol.c Fri Jan 18 09:41:17 2019 (r343140) @@ -34,18 +34,20 @@ __FBSDID("$FreeBSD$"); #include +#include +#include +#include +#include #include #include #include #include -#include -#include #include -#include #include #include #include +#include #include #include #include @@ -74,16 +76,6 @@ int verbosity_level = 0; #define HIGH(val) (uint32_t)(((val) >> 32) & 0xffffffff) #define LOW(val) (uint32_t)((val) & 0xffffffff) -/* - * Macros for freeing SLISTs, probably must be in /sys/queue.h - */ -#define SLIST_FREE(head, field, freef) do { \ - typeof(SLIST_FIRST(head)) __elm0; \ - typeof(SLIST_FIRST(head)) __elm; \ - SLIST_FOREACH_SAFE(__elm, (head), field, __elm0) \ - (void)(freef)(__elm); \ -} while(0); - struct datadir { const char *path; SLIST_ENTRY(datadir) next; @@ -102,7 +94,6 @@ static struct ucode_handler { #define NHANDLERS (sizeof(handlers) / sizeof(*handlers)) static void usage(void); -static int isdir(const char *path); static int do_cpuid(const char *cmdarg, const char *dev); static int do_cpuid_count(const char *cmdarg, const char *dev); static int do_msr(const char *cmdarg, const char *dev); @@ -123,20 +114,6 @@ usage(void) } static int -isdir(const char *path) -{ - int error; - struct stat st; - - error = stat(path, &st); - if (error < 0) { - WARN(0, "stat(%s)", path); - return (error); - } - return (st.st_mode & S_IFDIR); -} - -static int do_cpuid(const char *cmdarg, const char *dev) { unsigned int level; @@ -361,16 +338,79 @@ do_eval_cpu_features(const char *dev) } static int +try_a_fw_image(const char *dev_path, int devfd, int fwdfd, const char *dpath, + const char *fname, struct ucode_handler *handler) +{ + struct ucode_update_params parm; + struct stat st; + char *fw_path; + void *fw_map; + int fwfd, rc; + + rc = 0; + fw_path = NULL; + fw_map = MAP_FAILED; + fwfd = openat(fwdfd, fname, O_RDONLY); + if (fwfd < 0) { + WARN(0, "openat(%s, %s)", dpath, fname); + goto out; + } + + rc = asprintf(&fw_path, "%s/%s", dpath, fname); + if (rc == -1) { + WARNX(0, "out of memory"); + rc = ENOMEM; + goto out; + } + + rc = fstat(fwfd, &st); + if (rc != 0) { + WARN(0, "fstat(%s)", fw_path); + rc = 0; + goto out; + } + if (!S_ISREG(st.st_mode)) + goto out; + if (st.st_size <= 0) { + WARN(0, "%s: empty", fw_path); + goto out; + } + + fw_map = mmap(NULL, st.st_size, PROT_READ, MAP_PRIVATE, fwfd, 0); + if (fw_map == MAP_FAILED) { + WARN(0, "mmap(%s)", fw_path); + goto out; + } + + + memset(&parm, 0, sizeof(parm)); + parm.devfd = devfd; + parm.fwimage = fw_map; + parm.fwsize = st.st_size; + parm.dev_path = dev_path; + parm.fw_path = fw_path; + + handler->update(&parm); + +out: + if (fw_map != MAP_FAILED) + munmap(fw_map, st.st_size); + free(fw_path); + if (fwfd >= 0) + close(fwfd); + return (rc); +} + +static int do_update(const char *dev) { - int fd; + int fd, fwdfd; unsigned int i; int error; struct ucode_handler *handler; struct datadir *dir; DIR *dirp; struct dirent *direntry; - char buf[MAXPATHLEN]; fd = open(dev, O_RDONLY); if (fd < 0) { @@ -379,7 +419,7 @@ do_update(const char *dev) } /* - * Find the appropriate handler for device. + * Find the appropriate handler for CPU. */ for (i = 0; i < NHANDLERS; i++) if (handlers[i].probe(fd) == 0) @@ -387,39 +427,54 @@ do_update(const char *dev) if (i < NHANDLERS) handler = &handlers[i]; else { - WARNX(0, "cannot find the appropriate handler for device"); + WARNX(0, "cannot find the appropriate handler for %s", dev); close(fd); return (1); } close(fd); + fd = open(dev, O_RDWR); + if (fd < 0) { + WARN(0, "error opening %s for writing", dev); + return (1); + } + /* * Process every image in specified data directories. */ SLIST_FOREACH(dir, &datadirs, next) { - dirp = opendir(dir->path); - if (dirp == NULL) { - WARNX(1, "skipping directory %s: not accessible", dir->path); + fwdfd = open(dir->path, O_RDONLY); + if (fwdfd < 0) { + WARN(1, "skipping directory %s: not accessible", dir->path); continue; } + dirp = fdopendir(fwdfd); + if (dirp == NULL) { + WARNX(0, "out of memory"); + close(fwdfd); + close(fd); + return (1); + } + while ((direntry = readdir(dirp)) != NULL) { if (direntry->d_namlen == 0) continue; - error = snprintf(buf, sizeof(buf), "%s/%s", dir->path, - direntry->d_name); - if ((unsigned)error >= sizeof(buf)) - WARNX(0, "skipping %s, buffer too short", - direntry->d_name); - if (isdir(buf) != 0) { - WARNX(2, "skipping %s: is a directory", buf); + if (direntry->d_type == DT_DIR) continue; + + error = try_a_fw_image(dev, fd, fwdfd, dir->path, + direntry->d_name, handler); + if (error != 0) { + closedir(dirp); + close(fd); + return (1); } - handler->update(dev, buf); } error = closedir(dirp); if (error != 0) WARN(0, "closedir(%s)", dir->path); } + close(fd); return (0); } @@ -441,6 +496,7 @@ datadir_add(const char *path) int main(int argc, char *argv[]) { + struct datadir *elm; int c, flags; const char *cmdarg; const char *dev; @@ -511,6 +567,9 @@ main(int argc, char *argv[]) default: usage(); /* Only one command can be selected. */ } - SLIST_FREE(&datadirs, next, free); + while ((elm = SLIST_FIRST(&datadirs)) != NULL) { + SLIST_REMOVE_HEAD(&datadirs, next); + free(elm); + } return (error == 0 ? 0 : 1); } Modified: stable/12/usr.sbin/cpucontrol/cpucontrol.h ============================================================================== --- stable/12/usr.sbin/cpucontrol/cpucontrol.h Fri Jan 18 08:59:00 2019 (r343139) +++ stable/12/usr.sbin/cpucontrol/cpucontrol.h Fri Jan 18 09:41:17 2019 (r343140) @@ -30,8 +30,17 @@ #ifndef CPUCONTROL_H #define CPUCONTROL_H +#include + typedef int ucode_probe_t(int fd); -typedef void ucode_update_t(const char *dev, const char *image); +struct ucode_update_params { + int devfd; /* RDWR handle to cpucontrol device */ + const void *fwimage; /* READ mapping of firmware image */ + size_t fwsize; /* Non-zero size of firmware image */ + const char *dev_path; /* cpucontrol device path, for logging */ + const char *fw_path; /* firmware image path, for logging */ +}; +typedef void ucode_update_t(const struct ucode_update_params *params); extern int verbosity_level; Modified: stable/12/usr.sbin/cpucontrol/intel.c ============================================================================== --- stable/12/usr.sbin/cpucontrol/intel.c Fri Jan 18 08:59:00 2019 (r343139) +++ stable/12/usr.sbin/cpucontrol/intel.c Fri Jan 18 09:41:17 2019 (r343140) @@ -76,23 +76,23 @@ intel_probe(int fd) } void -intel_update(const char *dev, const char *path) +intel_update(const struct ucode_update_params *params) { - int fd, devfd; - struct stat st; - uint32_t *fw_image; + int devfd; + const char *dev, *path; + const uint32_t *fw_image; int have_ext_table; uint32_t sum; unsigned int i; size_t payload_size; - intel_fw_header_t *fw_header; - intel_cpu_signature_t *ext_table; - intel_ext_header_t *ext_header; + const intel_fw_header_t *fw_header; + const intel_cpu_signature_t *ext_table; + const intel_ext_header_t *ext_header; uint32_t sig, signature, flags; int32_t revision; ssize_t ext_size; size_t ext_table_size; - void *fw_data; + const void *fw_data; size_t data_size, total_size; cpuctl_msr_args_t msrargs = { .msr = MSR_BIOS_SIGN, @@ -104,18 +104,17 @@ intel_update(const char *dev, const char *path) cpuctl_update_args_t args; int error; + dev = params->dev_path; + path = params->fw_path; + devfd = params->devfd; + fw_image = params->fwimage; + assert(path); assert(dev); - fd = -1; - fw_image = MAP_FAILED; ext_table = NULL; ext_header = NULL; - devfd = open(dev, O_RDWR); - if (devfd < 0) { - WARN(0, "could not open %s for writing", dev); - return; - } + error = ioctl(devfd, CPUCTL_WRMSR, &msrargs); if (error < 0) { WARN(0, "ioctl(%s)", dev); @@ -151,31 +150,12 @@ intel_update(const char *dev, const char *path) /* * Open firmware image. */ - fd = open(path, O_RDONLY, 0); - if (fd < 0) { - WARN(0, "open(%s)", path); - goto fail; - } - error = fstat(fd, &st); - if (error != 0) { - WARN(0, "fstat(%s)", path); - goto fail; - } - if (st.st_size < 0 || (unsigned)st.st_size < sizeof(*fw_header)) { + if (params->fwsize < sizeof(*fw_header)) { WARNX(2, "file too short: %s", path); goto fail; } - /* - * mmap the whole image. - */ - fw_image = (uint32_t *)mmap(NULL, st.st_size, PROT_READ, - MAP_PRIVATE, fd, 0); - if (fw_image == MAP_FAILED) { - WARN(0, "mmap(%s)", path); - goto fail; - } - fw_header = (intel_fw_header_t *)fw_image; + fw_header = (const intel_fw_header_t *)fw_image; if (fw_header->header_version != INTEL_HEADER_VERSION || fw_header->loader_revision != INTEL_LOADER_REVISION) { WARNX(2, "%s is not a valid intel firmware: version mismatch", @@ -193,7 +173,7 @@ intel_update(const char *dev, const char *path) total_size = data_size + sizeof(*fw_header); else total_size = fw_header->total_size; - if (total_size > (unsigned)st.st_size || st.st_size < 0) { + if (total_size > params->fwsize) { WARNX(2, "file too short: %s", path); goto fail; } @@ -204,7 +184,7 @@ intel_update(const char *dev, const char *path) */ sum = 0; for (i = 0; i < (payload_size / sizeof(uint32_t)); i++) - sum += *((uint32_t *)fw_image + i); + sum += *((const uint32_t *)fw_image + i); if (sum != 0) { WARNX(2, "%s: update data checksum invalid", path); goto fail; @@ -217,9 +197,9 @@ intel_update(const char *dev, const char *path) have_ext_table = 0; if (ext_size > (signed)sizeof(*ext_header)) { - ext_header = - (intel_ext_header_t *)((char *)fw_image + payload_size); - ext_table = (intel_cpu_signature_t *)(ext_header + 1); + ext_header = (const intel_ext_header_t *) + ((const char *)fw_image + payload_size); + ext_table = (const intel_cpu_signature_t *)(ext_header + 1); /* * Check the extended table size. @@ -236,7 +216,7 @@ intel_update(const char *dev, const char *path) */ sum = 0; for (i = 0; i < (ext_table_size / sizeof(uint32_t)); i++) - sum += *((uint32_t *)ext_header + i); + sum += *((const uint32_t *)ext_header + i); if (sum != 0) { WARNX(2, "%s: extended signature table checksum invalid", @@ -273,7 +253,7 @@ matched: } fprintf(stderr, "%s: updating cpu %s from rev %#x to rev %#x... ", path, dev, revision, fw_header->revision); - args.data = fw_data; + args.data = __DECONST(void *, fw_data); args.size = data_size; error = ioctl(devfd, CPUCTL_UPDATE, &args); if (error < 0) { @@ -286,11 +266,5 @@ matched: fprintf(stderr, "done.\n"); fail: - if (fw_image != MAP_FAILED) - if (munmap(fw_image, st.st_size) != 0) - warn("munmap(%s)", path); - if (devfd >= 0) - close(devfd); - if (fd >= 0) - close(fd); + return; } Modified: stable/12/usr.sbin/cpucontrol/via.c ============================================================================== --- stable/12/usr.sbin/cpucontrol/via.c Fri Jan 18 08:59:00 2019 (r343139) +++ stable/12/usr.sbin/cpucontrol/via.c Fri Jan 18 09:41:17 2019 (r343140) @@ -76,18 +76,18 @@ via_probe(int fd) } void -via_update(const char *dev, const char *path) +via_update(const struct ucode_update_params *params) { - int fd, devfd; - struct stat st; - uint32_t *fw_image; + int devfd; + const char *dev, *path; + const uint32_t *fw_image; uint32_t sum; unsigned int i; size_t payload_size; - via_fw_header_t *fw_header; + const via_fw_header_t *fw_header; uint32_t signature; int32_t revision; - void *fw_data; + const void *fw_data; size_t data_size, total_size; cpuctl_msr_args_t msrargs = { .msr = MSR_IA32_PLATFORM_ID, @@ -98,17 +98,14 @@ via_update(const char *dev, const char *path) cpuctl_update_args_t args; int error; + dev = params->dev_path; + path = params->fw_path; + devfd = params->devfd; + fw_image = params->fwimage; + assert(path); assert(dev); - fd = -1; - devfd = -1; - fw_image = MAP_FAILED; - devfd = open(dev, O_RDWR); - if (devfd < 0) { - WARN(0, "could not open %s for writing", dev); - return; - } error = ioctl(devfd, CPUCTL_CPUID, &idargs); if (error < 0) { WARN(0, "ioctl(%s)", dev); @@ -134,34 +131,13 @@ via_update(const char *dev, const char *path) WARNX(2, "found cpu type %#x family %#x model %#x stepping %#x.", (signature >> 12) & 0x03, (signature >> 8) & 0x0f, (signature >> 4) & 0x0f, (signature >> 0) & 0x0f); - /* - * Open firmware image. - */ - fd = open(path, O_RDONLY, 0); - if (fd < 0) { - WARN(0, "open(%s)", path); - goto fail; - } - error = fstat(fd, &st); - if (error != 0) { - WARN(0, "fstat(%s)", path); - goto fail; - } - if (st.st_size < 0 || (unsigned)st.st_size < sizeof(*fw_header)) { + + if (params->fwsize < sizeof(*fw_header)) { WARNX(2, "file too short: %s", path); goto fail; } - /* - * mmap the whole image. - */ - fw_image = (uint32_t *)mmap(NULL, st.st_size, PROT_READ, - MAP_PRIVATE, fd, 0); - if (fw_image == MAP_FAILED) { - WARN(0, "mmap(%s)", path); - goto fail; - } - fw_header = (via_fw_header_t *)fw_image; + fw_header = (const via_fw_header_t *)fw_image; if (fw_header->signature != VIA_HEADER_SIGNATURE || fw_header->loader_revision != VIA_LOADER_REVISION) { WARNX(2, "%s is not a valid via firmware: version mismatch", @@ -170,7 +146,7 @@ via_update(const char *dev, const char *path) } data_size = fw_header->data_size; total_size = fw_header->total_size; - if (total_size > (unsigned)st.st_size || st.st_size < 0) { + if (total_size > params->fwsize) { WARNX(2, "file too short: %s", path); goto fail; } @@ -181,7 +157,7 @@ via_update(const char *dev, const char *path) */ sum = 0; for (i = 0; i < (payload_size / sizeof(uint32_t)); i++) - sum += *((uint32_t *)fw_image + i); + sum += *((const uint32_t *)fw_image + i); if (sum != 0) { WARNX(2, "%s: update data checksum invalid", path); goto fail; @@ -202,25 +178,18 @@ via_update(const char *dev, const char *path) } fprintf(stderr, "%s: updating cpu %s from rev %#x to rev %#x... ", path, dev, revision, fw_header->revision); - args.data = fw_data; + args.data = __DECONST(void *, fw_data); args.size = data_size; error = ioctl(devfd, CPUCTL_UPDATE, &args); if (error < 0) { error = errno; - fprintf(stderr, "failed.\n"); + fprintf(stderr, "failed.\n"); errno = error; - WARN(0, "ioctl()"); - goto fail; + WARN(0, "ioctl()"); + goto fail; } fprintf(stderr, "done.\n"); fail: - if (fw_image != MAP_FAILED) - if (munmap(fw_image, st.st_size) != 0) - warn("munmap(%s)", path); - if (devfd >= 0) - close(devfd); - if (fd >= 0) - close(fd); return; } From owner-svn-src-all@freebsd.org Fri Jan 18 09:54:29 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 9810514962D2; Fri, 18 Jan 2019 09:54:29 +0000 (UTC) (envelope-from ae@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 361AE87448; Fri, 18 Jan 2019 09:54:29 +0000 (UTC) (envelope-from ae@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 2548F79F; Fri, 18 Jan 2019 09:54:29 +0000 (UTC) (envelope-from ae@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x0I9sSjw070638; Fri, 18 Jan 2019 09:54:29 GMT (envelope-from ae@FreeBSD.org) Received: (from ae@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x0I9sSSZ070637; Fri, 18 Jan 2019 09:54:28 GMT (envelope-from ae@FreeBSD.org) Message-Id: <201901180954.x0I9sSSZ070637@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ae set sender to ae@FreeBSD.org using -f From: "Andrey V. Elsukov" Date: Fri, 18 Jan 2019 09:54: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: r343141 - stable/12/sys/netpfil/ipfw X-SVN-Group: stable-12 X-SVN-Commit-Author: ae X-SVN-Commit-Paths: stable/12/sys/netpfil/ipfw X-SVN-Commit-Revision: 343141 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 361AE87448 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.95 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_LONG(-1.00)[-0.999,0]; NEURAL_HAM_SHORT(-0.95)[-0.952,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 18 Jan 2019 09:54:29 -0000 Author: ae Date: Fri Jan 18 09:54:28 2019 New Revision: 343141 URL: https://svnweb.freebsd.org/changeset/base/343141 Log: MFC r342925: Relax requirement to packet size of CARP protocol and remove version check. CARP shares protocol number 112 with VRRP (RFC 5798). And the size of VRRP packet may be smaller than CARP. ipfw_chk() does m_pullup() to at least sizeof(struct carp_header) and can fail when packet is VRRP. This leads to packet drop and message about failed pullup attempt. Also, RFC 5798 defines version 3 of VRRP protocol, this version number also unsupported by CARP and such check leads to packet drop. carp_input() does its own checks for protocol version and packet size, so we can remove these checks to be able pass VRRP packets. PR: 234207 Modified: stable/12/sys/netpfil/ipfw/ip_fw2.c Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/netpfil/ipfw/ip_fw2.c ============================================================================== --- stable/12/sys/netpfil/ipfw/ip_fw2.c Fri Jan 18 09:41:17 2019 (r343140) +++ stable/12/sys/netpfil/ipfw/ip_fw2.c Fri Jan 18 09:54:28 2019 (r343141) @@ -1597,12 +1597,10 @@ do { \ break; case IPPROTO_CARP: - PULLUP_TO(hlen, ulp, struct carp_header); - if (((struct carp_header *)ulp)->carp_version != - CARP_VERSION) - return (IP_FW_DENY); - if (((struct carp_header *)ulp)->carp_type != - CARP_ADVERTISEMENT) + PULLUP_TO(hlen, ulp, offsetof( + struct carp_header, carp_counter)); + if (CARP_ADVERTISEMENT != + ((struct carp_header *)ulp)->carp_type) return (IP_FW_DENY); break; From owner-svn-src-all@freebsd.org Fri Jan 18 09:57:04 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 93A8F1496476; Fri, 18 Jan 2019 09:57:04 +0000 (UTC) (envelope-from ae@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 3AA63876E8; Fri, 18 Jan 2019 09:57:04 +0000 (UTC) (envelope-from ae@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 2E0C37A3; Fri, 18 Jan 2019 09:57:04 +0000 (UTC) (envelope-from ae@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x0I9v377070880; Fri, 18 Jan 2019 09:57:03 GMT (envelope-from ae@FreeBSD.org) Received: (from ae@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x0I9v3nP070879; Fri, 18 Jan 2019 09:57:03 GMT (envelope-from ae@FreeBSD.org) Message-Id: <201901180957.x0I9v3nP070879@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ae set sender to ae@FreeBSD.org using -f From: "Andrey V. Elsukov" Date: Fri, 18 Jan 2019 09:57:03 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r343142 - stable/11/sys/netpfil/ipfw X-SVN-Group: stable-11 X-SVN-Commit-Author: ae X-SVN-Commit-Paths: stable/11/sys/netpfil/ipfw X-SVN-Commit-Revision: 343142 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 3AA63876E8 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.95 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_SHORT(-0.95)[-0.952,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_LONG(-1.00)[-0.999,0] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 18 Jan 2019 09:57:04 -0000 Author: ae Date: Fri Jan 18 09:57:03 2019 New Revision: 343142 URL: https://svnweb.freebsd.org/changeset/base/343142 Log: MFC 342925: Relax requirement to packet size of CARP protocol and remove version check. CARP shares protocol number 112 with VRRP (RFC 5798). And the size of VRRP packet may be smaller than CARP. ipfw_chk() does m_pullup() to at least sizeof(struct carp_header) and can fail when packet is VRRP. This leads to packet drop and message about failed pullup attempt. Also, RFC 5798 defines version 3 of VRRP protocol, this version number also unsupported by CARP and such check leads to packet drop. carp_input() does its own checks for protocol version and packet size, so we can remove these checks to be able pass VRRP packets. PR: 234207 Modified: stable/11/sys/netpfil/ipfw/ip_fw2.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/netpfil/ipfw/ip_fw2.c ============================================================================== --- stable/11/sys/netpfil/ipfw/ip_fw2.c Fri Jan 18 09:54:28 2019 (r343141) +++ stable/11/sys/netpfil/ipfw/ip_fw2.c Fri Jan 18 09:57:03 2019 (r343142) @@ -1595,12 +1595,10 @@ do { \ break; case IPPROTO_CARP: - PULLUP_TO(hlen, ulp, struct carp_header); - if (((struct carp_header *)ulp)->carp_version != - CARP_VERSION) - return (IP_FW_DENY); - if (((struct carp_header *)ulp)->carp_type != - CARP_ADVERTISEMENT) + PULLUP_TO(hlen, ulp, offsetof( + struct carp_header, carp_counter)); + if (CARP_ADVERTISEMENT != + ((struct carp_header *)ulp)->carp_type) return (IP_FW_DENY); break; From owner-svn-src-all@freebsd.org Fri Jan 18 10:31:40 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id EC066149736B; Fri, 18 Jan 2019 10:31:39 +0000 (UTC) (envelope-from des@des.no) Received: from smtp.des.no (smtp.des.no [194.63.250.102]) by mx1.freebsd.org (Postfix) with ESMTP id 173E688B36; Fri, 18 Jan 2019 10:31:39 +0000 (UTC) (envelope-from des@des.no) Received: from next.des.no (smtp.des.no [194.63.250.102]) by smtp.des.no (Postfix) with ESMTP id 2408723FD1; Fri, 18 Jan 2019 10:31:38 +0000 (UTC) Received: by next.des.no (Postfix, from userid 1001) id DEAA18464; Fri, 18 Jan 2019 11:31:38 +0100 (CET) From: =?utf-8?Q?Dag-Erling_Sm=C3=B8rgrav?= To: Xin LI Cc: Ed Maste , "src-committers\@freebsd.org" , "svn-src-all\@freebsd.org" , "svn-src-head\@freebsd.org" Subject: Re: svn commit: r343122 - head/usr.sbin/freebsd-update In-Reply-To: (Xin LI's message of "Thu, 17 Jan 2019 13:46:27 -0800") References: <201901172138.x0HLcwBp082954@repo.freebsd.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.1 (berkeley-unix) Date: Fri, 18 Jan 2019 11:31:38 +0100 Message-ID: <86won22r5h.fsf@next.des.no> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Rspamd-Queue-Id: 173E688B36 X-Spamd-Bar: ------ Authentication-Results: mx1.freebsd.org; spf=pass (mx1.freebsd.org: domain of des@des.no designates 194.63.250.102 as permitted sender) smtp.mailfrom=des@des.no X-Spamd-Result: default: False [-6.26 / 15.00]; ARC_NA(0.00)[]; NEURAL_HAM_MEDIUM(-1.00)[-1.000,0]; FROM_HAS_DN(0.00)[]; R_SPF_ALLOW(-0.20)[+mx]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; MIME_GOOD(-0.10)[text/plain]; DMARC_NA(0.00)[des.no]; RCPT_COUNT_FIVE(0.00)[5]; TO_MATCH_ENVRCPT_SOME(0.00)[]; TO_DN_ALL(0.00)[]; MX_GOOD(-0.01)[cached: smtp.des.no]; NEURAL_HAM_SHORT(-0.77)[-0.768,0]; IP_SCORE(-3.28)[ip: (-8.67), ipnet: 194.63.250.0/24(-4.33), asn: 12996(-3.39), country: NO(-0.01)]; FREEMAIL_TO(0.00)[gmail.com]; RCVD_NO_TLS_LAST(0.10)[]; FROM_EQ_ENVFROM(0.00)[]; R_DKIM_NA(0.00)[]; MIME_TRACE(0.00)[0:+]; ASN(0.00)[asn:12996, ipnet:194.63.250.0/24, country:NO]; RCVD_COUNT_TWO(0.00)[2] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 18 Jan 2019 10:31:40 -0000 Xin LI writes: > I think this would break upgrading from e.g. -BETA or -RC, which is suppo= rted? Upgrading from -ALPHA is also supported. Furthermore, expr(1) is a better way of handling this than echo | grep, even if it only supports basic REs; they are sufficient for this purpose. DES --=20 Dag-Erling Sm=C3=B8rgrav - des@des.no From owner-svn-src-all@freebsd.org Fri Jan 18 10:45:29 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 0F1B71497A76; Fri, 18 Jan 2019 10:45:29 +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 8E16F89519; Fri, 18 Jan 2019 10:45: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 66CA91014; Fri, 18 Jan 2019 10:45: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 x0IAjSGE097379; Fri, 18 Jan 2019 10:45:28 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x0IAjSmw097377; Fri, 18 Jan 2019 10:45:28 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201901181045.x0IAjSmw097377@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Fri, 18 Jan 2019 10:45:28 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r343143 - head/sys/dev/nvdimm X-SVN-Group: head X-SVN-Commit-Author: kib X-SVN-Commit-Paths: head/sys/dev/nvdimm X-SVN-Commit-Revision: 343143 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 8E16F89519 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.95 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_LONG(-1.00)[-0.999,0]; NEURAL_HAM_SHORT(-0.95)[-0.948,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 18 Jan 2019 10:45:29 -0000 Author: kib Date: Fri Jan 18 10:45:27 2019 New Revision: 343143 URL: https://svnweb.freebsd.org/changeset/base/343143 Log: nvdimm: add a driver for the NVDIMM root device The NVDIMM root device is parent to the individual ACPI NVDIMM devices. Add a driver for the NVDIMM root device that can own enumeration of NVDIMM devices as well as NVDIMM SPA ranges that the system has. Submitted by: D Scott Phillips Sponsored by: Intel Corporation MFC after: 1 week Differential revision: https://reviews.freebsd.org/D18346 Modified: head/sys/dev/nvdimm/nvdimm.c head/sys/dev/nvdimm/nvdimm_var.h Modified: head/sys/dev/nvdimm/nvdimm.c ============================================================================== --- head/sys/dev/nvdimm/nvdimm.c Fri Jan 18 09:57:03 2019 (r343142) +++ head/sys/dev/nvdimm/nvdimm.c Fri Jan 18 10:45:27 2019 (r343143) @@ -1,6 +1,7 @@ /*- * Copyright (c) 2017 The FreeBSD Foundation * All rights reserved. + * Copyright (c) 2018, 2019 Intel Corporation * * This software was developed by Konstantin Belousov * under sponsorship from the FreeBSD Foundation. @@ -51,28 +52,27 @@ __FBSDID("$FreeBSD$"); ACPI_MODULE_NAME("NVDIMM") static devclass_t nvdimm_devclass; -static device_t *nvdimm_devs; -static int nvdimm_devcnt; +static devclass_t nvdimm_root_devclass; MALLOC_DEFINE(M_NVDIMM, "nvdimm", "NVDIMM driver memory"); struct nvdimm_dev * nvdimm_find_by_handle(nfit_handle_t nv_handle) { - device_t dev; - struct nvdimm_dev *res, *nv; - int i; + struct nvdimm_dev *res; + device_t *dimms; + int i, error, num_dimms; res = NULL; - for (i = 0; i < nvdimm_devcnt; i++) { - dev = nvdimm_devs[i]; - if (dev == NULL) - continue; - nv = device_get_softc(dev); - if (nv->nv_handle == nv_handle) { - res = nv; + error = devclass_get_devices(nvdimm_devclass, &dimms, &num_dimms); + if (error != 0) + return (NULL); + for (i = 0; i < num_dimms; i++) { + if (nvdimm_root_get_device_handle(dimms[i]) == nv_handle) { + res = device_get_softc(dimms[i]); break; } } + free(dimms, M_TEMP); return (res); } @@ -89,8 +89,8 @@ nvdimm_parse_flush_addr(void *nfitsubtbl, void *arg) return (0); MPASS(nv->nv_flush_addr == NULL && nv->nv_flush_addr_cnt == 0); - nv->nv_flush_addr = malloc(nfitflshaddr->HintCount * sizeof(uint64_t *), - M_NVDIMM, M_WAITOK); + nv->nv_flush_addr = mallocarray(nfitflshaddr->HintCount, + sizeof(uint64_t *), M_NVDIMM, M_WAITOK); for (i = 0; i < nfitflshaddr->HintCount; i++) nv->nv_flush_addr[i] = (uint64_t *)nfitflshaddr->HintAddress[i]; nv->nv_flush_addr_cnt = nfitflshaddr->HintCount; @@ -169,206 +169,166 @@ nvdimm_iterate_nfit(ACPI_TABLE_NFIT *nfitbl, enum Acpi return (error); } -static ACPI_STATUS -nvdimm_walk_dev(ACPI_HANDLE handle, UINT32 level, void *ctx, void **st) +static int +nvdimm_probe(device_t dev) { - ACPI_STATUS status; - struct nvdimm_ns_walk_ctx *wctx; - wctx = ctx; - status = wctx->func(handle, wctx->arg); - return_ACPI_STATUS(status); + return (BUS_PROBE_NOWILDCARD); } -static ACPI_STATUS -nvdimm_walk_root(ACPI_HANDLE handle, UINT32 level, void *ctx, void **st) +static int +nvdimm_attach(device_t dev) { + struct nvdimm_dev *nv; + ACPI_TABLE_NFIT *nfitbl; + ACPI_HANDLE handle; ACPI_STATUS status; - if (!acpi_MatchHid(handle, "ACPI0012")) - return_ACPI_STATUS(AE_OK); - status = AcpiWalkNamespace(ACPI_TYPE_DEVICE, handle, 100, - nvdimm_walk_dev, NULL, ctx, NULL); - if (ACPI_FAILURE(status)) - return_ACPI_STATUS(status); - return_ACPI_STATUS(AE_CTRL_TERMINATE); + nv = device_get_softc(dev); + handle = nvdimm_root_get_acpi_handle(dev); + if (handle == NULL) + return (EINVAL); + nv->nv_dev = dev; + nv->nv_handle = nvdimm_root_get_device_handle(dev); + + status = AcpiGetTable(ACPI_SIG_NFIT, 1, (ACPI_TABLE_HEADER **)&nfitbl); + if (ACPI_FAILURE(status)) { + if (bootverbose) + device_printf(dev, "cannot get NFIT\n"); + return (ENXIO); + } + nvdimm_iterate_nfit(nfitbl, ACPI_NFIT_TYPE_FLUSH_ADDRESS, + nvdimm_parse_flush_addr, nv); + AcpiPutTable(&nfitbl->Header); + return (0); } -static ACPI_STATUS -nvdimm_foreach_acpi(ACPI_STATUS (*func)(ACPI_HANDLE, void *), void *arg) +static int +nvdimm_detach(device_t dev) { - struct nvdimm_ns_walk_ctx wctx; - ACPI_STATUS status; + struct nvdimm_dev *nv; - wctx.func = func; - wctx.arg = arg; - status = AcpiWalkNamespace(ACPI_TYPE_DEVICE, ACPI_ROOT_OBJECT, 100, - nvdimm_walk_root, NULL, &wctx, NULL); - return_ACPI_STATUS(status); + nv = device_get_softc(dev); + free(nv->nv_flush_addr, M_NVDIMM); + return (0); } -static ACPI_STATUS -nvdimm_count_devs(ACPI_HANDLE handle __unused, void *arg) +static int +nvdimm_suspend(device_t dev) { - int *cnt; - cnt = arg; - (*cnt)++; + return (0); +} - ACPI_BUFFER name; - ACPI_STATUS status; - if (bootverbose) { - name.Length = ACPI_ALLOCATE_BUFFER; - status = AcpiGetName(handle, ACPI_FULL_PATHNAME, &name); - if (ACPI_FAILURE(status)) - return_ACPI_STATUS(status); - printf("nvdimm: enumerated %s\n", (char *)name.Pointer); - AcpiOsFree(name.Pointer); - } +static int +nvdimm_resume(device_t dev) +{ - return_ACPI_STATUS(AE_OK); + return (0); } -struct nvdimm_create_dev_arg { - device_t acpi0; - int *cnt; -}; - static ACPI_STATUS -nvdimm_create_dev(ACPI_HANDLE handle, void *arg) +nvdimm_root_create_dev(ACPI_HANDLE handle, UINT32 nesting_level, void *context, + void **return_value) { - struct nvdimm_create_dev_arg *narg; - device_t child; - int idx; + ACPI_STATUS status; + ACPI_DEVICE_INFO *device_info; + device_t parent, child; + uintptr_t *ivars; - narg = arg; - idx = *(narg->cnt); - child = device_find_child(narg->acpi0, "nvdimm", idx); - if (child == NULL) - child = BUS_ADD_CHILD(narg->acpi0, 1, "nvdimm", idx); + parent = context; + child = BUS_ADD_CHILD(parent, 100, "nvdimm", -1); if (child == NULL) { - if (bootverbose) - device_printf(narg->acpi0, - "failed to create nvdimm%d\n", idx); + device_printf(parent, "failed to create nvdimm\n"); return_ACPI_STATUS(AE_ERROR); } - acpi_set_handle(child, handle); - KASSERT(nvdimm_devs[idx] == NULL, ("nvdimm_devs[%d] not NULL", idx)); - nvdimm_devs[idx] = child; - - (*(narg->cnt))++; - return_ACPI_STATUS(AE_OK); -} - -static bool -nvdimm_init(void) -{ - ACPI_STATUS status; - - if (nvdimm_devcnt != 0) - return (true); - if (acpi_disabled("nvdimm")) - return (false); - status = nvdimm_foreach_acpi(nvdimm_count_devs, &nvdimm_devcnt); + status = AcpiGetObjectInfo(handle, &device_info); if (ACPI_FAILURE(status)) { - if (bootverbose) - printf("nvdimm_init: count failed\n"); - return (false); + device_printf(parent, "failed to get nvdimm device info\n"); + return_ACPI_STATUS(AE_ERROR); } - nvdimm_devs = malloc(nvdimm_devcnt * sizeof(device_t), M_NVDIMM, - M_WAITOK | M_ZERO); - return (true); + ivars = mallocarray(NVDIMM_ROOT_IVAR_MAX - 1, sizeof(uintptr_t), + M_NVDIMM, M_ZERO | M_WAITOK); + device_set_ivars(child, ivars); + nvdimm_root_set_acpi_handle(child, handle); + nvdimm_root_set_device_handle(child, device_info->Address); + return_ACPI_STATUS(AE_OK); } -static void -nvdimm_identify(driver_t *driver, device_t parent) -{ - struct nvdimm_create_dev_arg narg; - ACPI_STATUS status; - int i; +static char *nvdimm_root_id[] = {"ACPI0012", NULL}; - if (!nvdimm_init()) - return; - narg.acpi0 = parent; - narg.cnt = &i; - i = 0; - status = nvdimm_foreach_acpi(nvdimm_create_dev, &narg); - if (ACPI_FAILURE(status) && bootverbose) - printf("nvdimm_identify: create failed\n"); -} - static int -nvdimm_probe(device_t dev) +nvdimm_root_probe(device_t dev) { + int rv; - return (BUS_PROBE_NOWILDCARD); + if (acpi_disabled("nvdimm")) + return (ENXIO); + rv = ACPI_ID_PROBE(device_get_parent(dev), dev, nvdimm_root_id, NULL); + if (rv <= 0) + device_set_desc(dev, "ACPI NVDIMM root device"); + + return (rv); } static int -nvdimm_attach(device_t dev) +nvdimm_root_attach(device_t dev) { - struct nvdimm_dev *nv; - ACPI_TABLE_NFIT *nfitbl; ACPI_HANDLE handle; ACPI_STATUS status; - int i; + int error; - nv = device_get_softc(dev); handle = acpi_get_handle(dev); - if (handle == NULL) - return (EINVAL); - nv->nv_dev = dev; - for (i = 0; i < nvdimm_devcnt; i++) { - if (nvdimm_devs[i] == dev) { - nv->nv_devs_idx = i; - break; - } - } - MPASS(i < nvdimm_devcnt); - if (ACPI_FAILURE(acpi_GetInteger(handle, "_ADR", &nv->nv_handle))) { - device_printf(dev, "cannot get handle\n"); - return (ENXIO); - } - - status = AcpiGetTable(ACPI_SIG_NFIT, 1, (ACPI_TABLE_HEADER **)&nfitbl); - if (ACPI_FAILURE(status)) { - if (bootverbose) - device_printf(dev, "cannot get NFIT\n"); - return (ENXIO); - } - nvdimm_iterate_nfit(nfitbl, ACPI_NFIT_TYPE_FLUSH_ADDRESS, - nvdimm_parse_flush_addr, nv); - AcpiPutTable(&nfitbl->Header); - return (0); + status = AcpiWalkNamespace(ACPI_TYPE_DEVICE, handle, 1, + nvdimm_root_create_dev, NULL, dev, NULL); + if (ACPI_FAILURE(status)) + device_printf(dev, "failed adding children\n"); + error = bus_generic_attach(dev); + return (error); } static int -nvdimm_detach(device_t dev) +nvdimm_root_detach(device_t dev) { - struct nvdimm_dev *nv; + device_t *children; + int i, error, num_children; - nv = device_get_softc(dev); - nvdimm_devs[nv->nv_devs_idx] = NULL; - free(nv->nv_flush_addr, M_NVDIMM); - return (0); + error = bus_generic_detach(dev); + if (error != 0) + return (error); + error = device_get_children(dev, &children, &num_children); + if (error != 0) + return (error); + for (i = 0; i < num_children; i++) + free(device_get_ivars(children[i]), M_NVDIMM); + free(children, M_TEMP); + error = device_delete_children(dev); + return (error); } static int -nvdimm_suspend(device_t dev) +nvdimm_root_read_ivar(device_t dev, device_t child, int index, + uintptr_t *result) { + if (index < 0 || index >= NVDIMM_ROOT_IVAR_MAX) + return (ENOENT); + *result = ((uintptr_t *)device_get_ivars(child))[index]; return (0); } static int -nvdimm_resume(device_t dev) +nvdimm_root_write_ivar(device_t dev, device_t child, int index, + uintptr_t value) { + if (index < 0 || index >= NVDIMM_ROOT_IVAR_MAX) + return (ENOENT); + ((uintptr_t *)device_get_ivars(child))[index] = value; return (0); } static device_method_t nvdimm_methods[] = { - DEVMETHOD(device_identify, nvdimm_identify), DEVMETHOD(device_probe, nvdimm_probe), DEVMETHOD(device_attach, nvdimm_attach), DEVMETHOD(device_detach, nvdimm_detach), @@ -383,41 +343,22 @@ static driver_t nvdimm_driver = { sizeof(struct nvdimm_dev), }; -static void -nvdimm_fini(void) -{ +static device_method_t nvdimm_root_methods[] = { + DEVMETHOD(device_probe, nvdimm_root_probe), + DEVMETHOD(device_attach, nvdimm_root_attach), + DEVMETHOD(device_detach, nvdimm_root_detach), + DEVMETHOD(bus_add_child, bus_generic_add_child), + DEVMETHOD(bus_read_ivar, nvdimm_root_read_ivar), + DEVMETHOD(bus_write_ivar, nvdimm_root_write_ivar), + DEVMETHOD_END +}; - free(nvdimm_devs, M_NVDIMM); - nvdimm_devs = NULL; - nvdimm_devcnt = 0; -} +static driver_t nvdimm_root_driver = { + "nvdimm_root", + nvdimm_root_methods, +}; -static int -nvdimm_modev(struct module *mod, int what, void *arg) -{ - int error; - - switch (what) { - case MOD_LOAD: - error = 0; - break; - - case MOD_UNLOAD: - nvdimm_fini(); - error = 0; - break; - - case MOD_QUIESCE: - error = 0; - break; - - default: - error = EOPNOTSUPP; - break; - } - - return (error); -} - -DRIVER_MODULE(nvdimm, acpi, nvdimm_driver, nvdimm_devclass, nvdimm_modev, NULL); +DRIVER_MODULE(nvdimm_root, acpi, nvdimm_root_driver, nvdimm_root_devclass, NULL, + NULL); +DRIVER_MODULE(nvdimm, nvdimm_root, nvdimm_driver, nvdimm_devclass, NULL, NULL); MODULE_DEPEND(nvdimm, acpi, 1, 1, 1); Modified: head/sys/dev/nvdimm/nvdimm_var.h ============================================================================== --- head/sys/dev/nvdimm/nvdimm_var.h Fri Jan 18 09:57:03 2019 (r343142) +++ head/sys/dev/nvdimm/nvdimm_var.h Fri Jan 18 10:45:27 2019 (r343143) @@ -1,6 +1,7 @@ /*- * Copyright (c) 2017 The FreeBSD Foundation * All rights reserved. + * Copyright (c) 2018, 2019 Intel Corporation * * This software was developed by Konstantin Belousov * under sponsorship from the FreeBSD Foundation. @@ -34,12 +35,20 @@ typedef uint32_t nfit_handle_t; +enum nvdimm_root_ivar { + NVDIMM_ROOT_IVAR_ACPI_HANDLE, + NVDIMM_ROOT_IVAR_DEVICE_HANDLE, + NVDIMM_ROOT_IVAR_MAX, +}; +__BUS_ACCESSOR(nvdimm_root, acpi_handle, NVDIMM_ROOT, ACPI_HANDLE, ACPI_HANDLE) +__BUS_ACCESSOR(nvdimm_root, device_handle, NVDIMM_ROOT, DEVICE_HANDLE, + nfit_handle_t) + struct nvdimm_dev { device_t nv_dev; nfit_handle_t nv_handle; uint64_t **nv_flush_addr; int nv_flush_addr_cnt; - int nv_devs_idx; }; enum SPA_mapping_type { @@ -72,11 +81,6 @@ struct SPA_mapping { struct vm_object *spa_obj; bool spa_g_proc_run; bool spa_g_proc_exiting; -}; - -struct nvdimm_ns_walk_ctx { - ACPI_STATUS (*func)(ACPI_HANDLE, void *); - void *arg; }; extern struct SPA_mapping *spa_mappings; From owner-svn-src-all@freebsd.org Fri Jan 18 10:54:37 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 859711497E31; Fri, 18 Jan 2019 10:54:37 +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 2388889AC5; Fri, 18 Jan 2019 10:54:37 +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 C8A0B11D4; Fri, 18 Jan 2019 10:54:36 +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 x0IAsaZo002454; Fri, 18 Jan 2019 10:54:36 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x0IAsaM5002453; Fri, 18 Jan 2019 10:54:36 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201901181054.x0IAsaM5002453@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Fri, 18 Jan 2019 10:54:36 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r343144 - head/sys/dev/nvdimm X-SVN-Group: head X-SVN-Commit-Author: kib X-SVN-Commit-Paths: head/sys/dev/nvdimm X-SVN-Commit-Revision: 343144 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 2388889AC5 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.95 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_LONG(-1.00)[-0.999,0]; NEURAL_HAM_SHORT(-0.95)[-0.948,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 18 Jan 2019 10:54:37 -0000 Author: kib Date: Fri Jan 18 10:54:36 2019 New Revision: 343144 URL: https://svnweb.freebsd.org/changeset/base/343144 Log: nvdimm: initialize SPA uuids statically. The SPA ids are published numbers, so it's safe (if not a bit annoying) to copy them into a source file. Submitted by: D Scott Phillips Sponsored by: Intel Corporation MFC after: 1 week Differential revision: https://reviews.freebsd.org/D18733 Modified: head/sys/dev/nvdimm/nvdimm_spa.c head/sys/dev/nvdimm/nvdimm_var.h Modified: head/sys/dev/nvdimm/nvdimm_spa.c ============================================================================== --- head/sys/dev/nvdimm/nvdimm_spa.c Fri Jan 18 10:45:27 2019 (r343143) +++ head/sys/dev/nvdimm/nvdimm_spa.c Fri Jan 18 10:54:36 2019 (r343144) @@ -1,6 +1,7 @@ /*- * Copyright (c) 2017, 2018 The FreeBSD Foundation * All rights reserved. + * Copyright (c) 2018, 2019 Intel Corporation * * This software was developed by Konstantin Belousov * under sponsorship from the FreeBSD Foundation. @@ -64,6 +65,23 @@ __FBSDID("$FreeBSD$"); #include #include +#define UUID_INITIALIZER_VOLATILE_MEMORY \ + {0x7305944f,0xfdda,0x44e3,0xb1,0x6c,{0x3f,0x22,0xd2,0x52,0xe5,0xd0}} +#define UUID_INITIALIZER_PERSISTENT_MEMORY \ + {0x66f0d379,0xb4f3,0x4074,0xac,0x43,{0x0d,0x33,0x18,0xb7,0x8c,0xdb}} +#define UUID_INITIALIZER_CONTROL_REGION \ + {0x92f701f6,0x13b4,0x405d,0x91,0x0b,{0x29,0x93,0x67,0xe8,0x23,0x4c}} +#define UUID_INITIALIZER_DATA_REGION \ + {0x91af0530,0x5d86,0x470e,0xa6,0xb0,{0x0a,0x2d,0xb9,0x40,0x82,0x49}} +#define UUID_INITIALIZER_VOLATILE_VIRTUAL_DISK \ + {0x77ab535a,0x45fc,0x624b,0x55,0x60,{0xf7,0xb2,0x81,0xd1,0xf9,0x6e}} +#define UUID_INITIALIZER_VOLATILE_VIRTUAL_CD \ + {0x3d5abd30,0x4175,0x87ce,0x6d,0x64,{0xd2,0xad,0xe5,0x23,0xc4,0xbb}} +#define UUID_INITIALIZER_PERSISTENT_VIRTUAL_DISK \ + {0x5cea02c9,0x4d07,0x69d3,0x26,0x9f,{0x44,0x96,0xfb,0xe0,0x96,0xf9}} +#define UUID_INITIALIZER_PERSISTENT_VIRTUAL_CD \ + {0x08018188,0x42cd,0xbb48,0x10,0x0f,{0x53,0x87,0xd5,0x3d,0xed,0x3d}} + struct SPA_mapping *spa_mappings; int spa_mappings_cnt; @@ -79,52 +97,64 @@ nvdimm_spa_count(void *nfitsubtbl __unused, void *arg) static struct nvdimm_SPA_uuid_list_elm { const char *u_name; - const char *u_id_str; struct uuid u_id; const bool u_usr_acc; } nvdimm_SPA_uuid_list[] = { [SPA_TYPE_VOLATILE_MEMORY] = { .u_name = "VOLA MEM ", - .u_id_str = UUID_VOLATILE_MEMORY, + .u_id = UUID_INITIALIZER_VOLATILE_MEMORY, .u_usr_acc = true, }, [SPA_TYPE_PERSISTENT_MEMORY] = { .u_name = "PERS MEM", - .u_id_str = UUID_PERSISTENT_MEMORY, + .u_id = UUID_INITIALIZER_PERSISTENT_MEMORY, .u_usr_acc = true, }, [SPA_TYPE_CONTROL_REGION] = { .u_name = "CTRL RG ", - .u_id_str = UUID_CONTROL_REGION, + .u_id = UUID_INITIALIZER_CONTROL_REGION, .u_usr_acc = false, }, [SPA_TYPE_DATA_REGION] = { .u_name = "DATA RG ", - .u_id_str = UUID_DATA_REGION, + .u_id = UUID_INITIALIZER_DATA_REGION, .u_usr_acc = true, }, [SPA_TYPE_VOLATILE_VIRTUAL_DISK] = { .u_name = "VIRT DSK", - .u_id_str = UUID_VOLATILE_VIRTUAL_DISK, + .u_id = UUID_INITIALIZER_VOLATILE_VIRTUAL_DISK, .u_usr_acc = true, }, [SPA_TYPE_VOLATILE_VIRTUAL_CD] = { .u_name = "VIRT CD ", - .u_id_str = UUID_VOLATILE_VIRTUAL_CD, + .u_id = UUID_INITIALIZER_VOLATILE_VIRTUAL_CD, .u_usr_acc = true, }, [SPA_TYPE_PERSISTENT_VIRTUAL_DISK] = { .u_name = "PV DSK ", - .u_id_str = UUID_PERSISTENT_VIRTUAL_DISK, + .u_id = UUID_INITIALIZER_PERSISTENT_VIRTUAL_DISK, .u_usr_acc = true, }, [SPA_TYPE_PERSISTENT_VIRTUAL_CD] = { .u_name = "PV CD ", - .u_id_str = UUID_PERSISTENT_VIRTUAL_CD, + .u_id = UUID_INITIALIZER_PERSISTENT_VIRTUAL_CD, .u_usr_acc = true, }, }; +enum SPA_mapping_type +nvdimm_spa_type_from_uuid(struct uuid *uuid) +{ + int j; + + for (j = 0; j < nitems(nvdimm_SPA_uuid_list); j++) { + if (uuidcmp(uuid, &nvdimm_SPA_uuid_list[j].u_id) != 0) + continue; + return (j); + } + return (SPA_TYPE_UNKNOWN); +} + static vm_memattr_t nvdimm_spa_memattr(struct SPA_mapping *spa) { @@ -539,48 +569,30 @@ nvdimm_spa_parse(void *nfitsubtbl, void *arg) { ACPI_NFIT_SYSTEM_ADDRESS *nfitaddr; struct SPA_mapping *spa; - int error, *i, j; + enum SPA_mapping_type spa_type; + int error, *i; i = arg; - spa = &spa_mappings[*i]; + spa = &spa_mappings[(*i)++]; nfitaddr = nfitsubtbl; - - for (j = 0; j < nitems(nvdimm_SPA_uuid_list); j++) { - /* XXXKIB: is ACPI UUID representation compatible ? */ - if (uuidcmp((struct uuid *)&nfitaddr->RangeGuid, - &nvdimm_SPA_uuid_list[j].u_id) != 0) - continue; - error = nvdimm_spa_init_one(spa, nfitaddr, j); - if (error != 0) - nvdimm_spa_fini_one(spa); - break; - } - if (j == nitems(nvdimm_SPA_uuid_list) && bootverbose) { + spa_type = nvdimm_spa_type_from_uuid( + (struct uuid *)&nfitaddr->RangeGuid); + if (spa_type == SPA_TYPE_UNKNOWN) { printf("Unknown SPA UUID %d ", nfitaddr->RangeIndex); printf_uuid((struct uuid *)&nfitaddr->RangeGuid); printf("\n"); + return (0); } - (*i)++; + error = nvdimm_spa_init_one(spa, nfitaddr, spa_type); + if (error != 0) + nvdimm_spa_fini_one(spa); return (0); } static int nvdimm_spa_init1(ACPI_TABLE_NFIT *nfitbl) { - struct nvdimm_SPA_uuid_list_elm *sle; int error, i; - - for (i = 0; i < nitems(nvdimm_SPA_uuid_list); i++) { - sle = &nvdimm_SPA_uuid_list[i]; - error = parse_uuid(sle->u_id_str, &sle->u_id); - if (error != 0) { - if (bootverbose) - printf("nvdimm_identify: error %d parsing " - "known SPA UUID %d %s\n", error, i, - sle->u_id_str); - return (error); - } - } error = nvdimm_iterate_nfit(nfitbl, ACPI_NFIT_TYPE_SYSTEM_ADDRESS, nvdimm_spa_count, &spa_mappings_cnt); Modified: head/sys/dev/nvdimm/nvdimm_var.h ============================================================================== --- head/sys/dev/nvdimm/nvdimm_var.h Fri Jan 18 10:45:27 2019 (r343143) +++ head/sys/dev/nvdimm/nvdimm_var.h Fri Jan 18 10:54:36 2019 (r343144) @@ -60,6 +60,7 @@ enum SPA_mapping_type { SPA_TYPE_VOLATILE_VIRTUAL_CD = 5, SPA_TYPE_PERSISTENT_VIRTUAL_DISK= 6, SPA_TYPE_PERSISTENT_VIRTUAL_CD = 7, + SPA_TYPE_UNKNOWN = 127, }; struct SPA_mapping { @@ -88,6 +89,7 @@ extern int spa_mappings_cnt; MALLOC_DECLARE(M_NVDIMM); +enum SPA_mapping_type nvdimm_spa_type_from_uuid(struct uuid *); struct nvdimm_dev *nvdimm_find_by_handle(nfit_handle_t nv_handle); int nvdimm_iterate_nfit(ACPI_TABLE_NFIT *nfitbl, enum AcpiNfitType type, int (*cb)(void *, void *), void *arg); From owner-svn-src-all@freebsd.org Fri Jan 18 12:54:47 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 175BC149C952; Fri, 18 Jan 2019 12:54:47 +0000 (UTC) (envelope-from cy.schubert@cschubert.com) Received: from smtp-out-so.shaw.ca (smtp-out-so.shaw.ca [64.59.136.139]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "Client", Issuer "CA" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id EF17A8E5B8; Fri, 18 Jan 2019 12:54:44 +0000 (UTC) (envelope-from cy.schubert@cschubert.com) Received: from spqr.komquats.com ([70.67.125.17]) by shaw.ca with ESMTPA id kTfUgSwn182YckTfVgBLjj; Fri, 18 Jan 2019 05:54:42 -0700 X-Authority-Analysis: v=2.3 cv=NNSrBHyg c=1 sm=1 tr=0 a=VFtTW3WuZNDh6VkGe7fA3g==:117 a=VFtTW3WuZNDh6VkGe7fA3g==:17 a=kj9zAlcOel0A:10 a=3JhidrIBZZsA:10 a=H0GPC0OhAAAA:8 a=YxBL1-UpAAAA:8 a=6I5d2MoRAAAA:8 a=sYRoXnj-x_WCtMZ0wH8A:9 a=CjuIK1q_8ugA:10 a=KczGKrPSgCPlefTG41c3:22 a=Ia-lj3WSrqcvXOmTRaiG:22 a=IjZwj45LgO3ly-622nXo:22 Received: from slippy.cwsent.com (slippy [10.1.1.91]) by spqr.komquats.com (Postfix) with ESMTPS id AEC79501; Fri, 18 Jan 2019 04:54:57 -0800 (PST) Received: from slippy.cwsent.com (localhost [127.0.0.1]) by slippy.cwsent.com (8.15.2/8.15.2) with ESMTP id x0ICscDO076363; Fri, 18 Jan 2019 04:54:38 -0800 (PST) (envelope-from Cy.Schubert@cschubert.com) Received: from slippy (cy@localhost) by slippy.cwsent.com (8.15.2/8.15.2/Submit) with ESMTP id x0ICsbBb076360; Fri, 18 Jan 2019 04:54:38 -0800 (PST) (envelope-from Cy.Schubert@cschubert.com) Message-Id: <201901181254.x0ICsbBb076360@slippy.cwsent.com> X-Authentication-Warning: slippy.cwsent.com: cy owned process doing -bs X-Mailer: exmh version 2.8.0 04/21/2012 with nmh-1.7.1 Reply-to: Cy Schubert From: Cy Schubert X-os: FreeBSD X-Sender: cy@cwsent.com X-URL: http://www.cschubert.com/ To: Eugene Grosbein cc: Maxim Sobolev , Cy Schubert , "Conrad E. Meyer" , src-committers , svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r343118 - in head/usr.sbin: . trim In-Reply-To: Message from Eugene Grosbein of "Fri, 18 Jan 2019 16:17:04 +0700." <81bb343b-ad8a-371d-d94f-f72c8dbce754@grosbein.net> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Date: Fri, 18 Jan 2019 04:54:37 -0800 X-CMAE-Envelope: MS4wfAzaY0CbMzeRET55Lrz1ShmVY1f1Xw/nJBtpGjOcchdFXAJzH2C6t8dOOcf8T4rsz8LWxNAcMYAx6W8rfHJ1wGk0zcYocV6BWkuH9V3Hc5HIZVfnnWKo JHOO2ZbunFMIFQah9Dy9F6SAL2zxhtpdpZKPfwtfaZZcH0+I803LQkBvwngI5yuL1pv8/apk6axKr/JblzJriaVSm693lSX0ntUdGZ+8pJF1IalcIoqPWnBc xWbtmRdXeIiSuQ3UYFJBZuzqtwCzMjtz2Jk4reBjKk/ldA3RKCKFP/yOhmHAjY/3h3BpbFt1YqKQqTWENbcTQAA6r0yFGd3PkMrt+tY+jWfLqpMgvxWm9CQf AnneQeOs X-Rspamd-Queue-Id: EF17A8E5B8 X-Spamd-Bar: ---- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-4.30 / 15.00]; ARC_NA(0.00)[]; RCVD_VIA_SMTP_AUTH(0.00)[]; RCVD_COUNT_FIVE(0.00)[5]; RECEIVED_SPAMHAUS_PBL(0.00)[17.125.67.70.zen.spamhaus.org : 127.0.0.11]; FROM_HAS_DN(0.00)[]; TO_DN_SOME(0.00)[]; MV_CASE(0.50)[]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; MIME_GOOD(-0.10)[text/plain]; HAS_XAW(0.00)[]; HAS_REPLYTO(0.00)[Cy.Schubert@cschubert.com]; REPLYTO_EQ_FROM(0.00)[]; TO_MATCH_ENVRCPT_SOME(0.00)[]; MX_GOOD(-0.01)[spqr.komquats.com]; NEURAL_HAM_SHORT(-0.98)[-0.979,0]; RCPT_COUNT_SEVEN(0.00)[7]; NEURAL_HAM_MEDIUM(-1.00)[-1.000,0]; R_SPF_NA(0.00)[]; RCVD_IN_DNSWL_LOW(-0.10)[139.136.59.64.list.dnswl.org : 127.0.5.1]; R_DKIM_NA(0.00)[]; MIME_TRACE(0.00)[0:+]; ASN(0.00)[asn:6327, ipnet:64.59.128.0/20, country:CA]; RCVD_TLS_LAST(0.00)[]; IP_SCORE(-1.61)[ip: (-3.81), ipnet: 64.59.128.0/20(-2.36), asn: 6327(-1.82), country: CA(-0.09)]; FROM_EQ_ENVFROM(0.00)[] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 18 Jan 2019 12:54:47 -0000 In message <81bb343b-ad8a-371d-d94f-f72c8dbce754@grosbein.net>, Eugene Grosbein writes: > 18.01.2019 5:25, Maxim Sobolev wrote: > > > Using usr.sbin/trim as an example. > > We still lack a command usable at installation stage (escape to shell) to tri > m a device or partition > dedicated to ZFS Cache/ZFS Intention Log/zvol any other use when ports/packag > es are not yet available. OK, I will put a review together for dd. Do you realize that what you just said? Your statement is inconsistent with where trim is installed? Then it should have been installed in /sbin not where you put it. I don't want to start yet another bikeshed arguing the merits of this or that -- I'm intentionally being vague here because I really don't want to stat a different bikeshed thread. But suffice it to say, dd is the place for it because it lives in /bin and dd is already included in /rescue. Everything about trim is wrong, even where it is put. -- Cheers, Cy Schubert FreeBSD UNIX: Web: http://www.FreeBSD.org The need of the many outweighs the greed of the few. From owner-svn-src-all@freebsd.org Fri Jan 18 13:29:15 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id D6CFB149D693 for ; Fri, 18 Jan 2019 13:29:14 +0000 (UTC) (envelope-from bounce-702255-20-7355-svn-src-all=freebsd.org@s1.csa2.acemsa5.com) Received: from s1.csa2.acemsa5.com (s1.csa2.acemsa5.com [192.92.97.99]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 1A7508F673 for ; Fri, 18 Jan 2019 13:29:14 +0000 (UTC) (envelope-from bounce-702255-20-7355-svn-src-all=freebsd.org@s1.csa2.acemsa5.com) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; s=dk; d=s1.csa2.acemsa5.com; h=To:From:Reply-To:Subject:Date:MIME-Version:Content-Type: Content-Transfer-Encoding:Sender:List-Unsubscribe:Message-ID; i=vectorart68102.activehosted.com@s1.csa2.acemsa5.com; bh=psnBaZZ2LtksJ7B2/Zb6fjgk0TSH+GfjMCcadzloM/4=; b=x6Yn/b6RUYd9QR4izfVH4JyeqKg6RWAz5OdoODq/2BL+yW3YXJxGB1GErtsuwROn9HPWreuwU/fg fCUAT/DdAuM9al2XAfxi3TYP1Afu+xAan2h2Ewrkv1r9wAsy+J8NaroXtgIrxCoC8wn912t6EsK3 /UsiYtZCw92Gw9ynTGE= Received: by s1.csa2.acemsa5.com id h87aak2gcosg for ; Fri, 18 Jan 2019 07:29:09 -0600 (envelope-from ) To: From: "VECTORART" Reply-To: reply-vectorart68102.activehosted.20.141.7355@s1.csa2.acemsa5.com Subject: =?utf-8?Q?Friday_for_you_|_Fast_and_Affordable,_USA_Bas?= =?utf-8?Q?e=E2=80=8E?= Date: Fri, 18 Jan 2019 07:18:57 -0600 MIME-Version: 1.0 Sender: X-Sender: X-Report-Abuse: Please report abuse to abuse@activecampaign.com X-mid: c3ZuLXNyYy1hbGxAZnJlZWJzZC5vcmcgLCBjMjAgLCBtMTQxICwgczE2 Message-ID: <20190118132909.27432.1267509666.swift@vectorart68102.activehosted.com> X-Rspamd-Queue-Id: 1A7508F673 X-Spamd-Bar: +++++ Authentication-Results: mx1.freebsd.org; dkim=pass header.d=s1.csa2.acemsa5.com header.s=dk header.b=x6Yn/b6R; spf=pass (mx1.freebsd.org: domain of bounce-702255-20-7355-svn-src-all=freebsd.org@s1.csa2.acemsa5.com designates 192.92.97.99 as permitted sender) smtp.mailfrom=bounce-702255-20-7355-svn-src-all=freebsd.org@s1.csa2.acemsa5.com X-Spamd-Result: default: False [5.77 / 15.00]; HAS_REPLYTO(0.00)[reply-vectorart68102.activehosted.20.141.7355@s1.csa2.acemsa5.com]; R_SPF_ALLOW(-0.20)[+ip4:192.92.97.0/24]; ZERO_FONT(1.00)[35]; TO_DN_NONE(0.00)[]; DKIM_TRACE(0.00)[s1.csa2.acemsa5.com:+]; MX_GOOD(-0.01)[cached: s1.csa2.acemsa5.com]; FORGED_SENDER(0.00)[Mark@vectorart.co,bounce-702255-20-7355-svn-src-all=freebsd.org@s1.csa2.acemsa5.com]; MIME_TRACE(0.00)[0:+,1:+]; RCVD_TLS_LAST(0.00)[]; ASN(0.00)[asn:32475, ipnet:192.92.97.0/24, country:US]; FROM_NEQ_ENVFROM(0.00)[Mark@vectorart.co,bounce-702255-20-7355-svn-src-all=freebsd.org@s1.csa2.acemsa5.com]; ARC_NA(0.00)[]; R_DKIM_ALLOW(-0.20)[s1.csa2.acemsa5.com:s=dk]; FROM_HAS_DN(0.00)[]; TO_MATCH_ENVRCPT_ALL(0.00)[]; NEURAL_SPAM_SHORT(0.48)[0.480,0]; R_BAD_CTE_7BIT(1.05)[7bit,utf8]; PREVIOUSLY_DELIVERED(0.00)[svn-src-all@freebsd.org]; DMARC_NA(0.00)[vectorart.co]; MIME_GOOD(-0.10)[multipart/alternative,text/plain]; RCPT_COUNT_ONE(0.00)[1]; FORGED_SENDER_VERP_SRS(0.00)[]; MANY_INVISIBLE_PARTS(1.00)[10]; REPLYTO_DOM_NEQ_FROM_DOM(0.00)[]; HAS_LIST_UNSUB(-0.01)[]; HTML_SHORT_LINK_IMG_2(1.00)[]; NEURAL_SPAM_LONG(0.96)[0.961,0]; ENVFROM_VERP(0.00)[]; IP_SCORE(-0.17)[asn: 32475(-0.77), country: US(-0.08)]; NEURAL_SPAM_MEDIUM(0.97)[0.970,0]; RCVD_COUNT_TWO(0.00)[2] Content-Type: text/plain; charset=utf-8 X-Content-Filtered-By: Mailman/MimeDel 2.1.29 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 18 Jan 2019 13:29:15 -0000 http://vectorart68102.acemlnb.com/lt.php?s=081de164462b5a71484a5660e7b63974&i=20A141A1A221 Running Out Of Time? | Fast 24HR Free Rush 24 Hour Greetings from Team Vector Art! A team or Promotional Products specialists of Vector, Total Creative Solution's & Digitizing Team. Am opportunity to work on Virtual Proof / Mock up & also do Recreation work for Spotlight Promotions. We can take care of custom products, promotional flyers, seasonal banners and many more. For Digitizing we charge only $1.00 for 1000 stitches and provide 2 pages of PDF of each file, so before digitizing you can see the quality of it. We are a team of expert Graphic artist and are currently working for major promotional product business in USA and Canada. We work on pay per job basis or on a fix package and complete unlimited jobs monthly. We provide monthly Invoice with completed job details for the month. You can register to our portal http://vectorart68102.acemlnb.com/lt.php?s=081de164462b5a71484a5660e7b63974&i=20A141A1A231 !Upload the Job! Appreciate your Time. Call for a Free Quote:    +1 (769) 307-0113  Website: www.vectorart.co PPAI # 707243     UPIC V707243      DC #812930 - From VECTOR ART. http://vectorart68102.acemlnb.com/lt.php?s=081de164462b5a71484a5660e7b63974&i=20A141A1A225   http://vectorart68102.acemlnb.com/lt.php?s=081de164462b5a71484a5660e7b63974&i=20A141A1A225   http://vectorart68102.acemlnb.com/lt.php?s=081de164462b5a71484a5660e7b63974&i=20A141A1A226   http://vectorart68102.acemlnb.com/lt.php?s=081de164462b5a71484a5660e7b63974&i=20A141A1A227   http://vectorart68102.acemlnb.com/lt.php?s=081de164462b5a71484a5660e7b63974&i=20A141A1A228   http://vectorart68102.acemlnb.com/lt.php?s=081de164462b5a71484a5660e7b63974&i=20A141A1A229   http://vectorart68102.acemlnb.com/lt.php?s=081de164462b5a71484a5660e7b63974&i=20A141A1A225   http://vectorart68102.acemlnb.com/lt.php?s=081de164462b5a71484a5660e7b63974&i=20A141A1A225   http://vectorart68102.acemlnb.com/lt.php?s=081de164462b5a71484a5660e7b63974&i=20A141A1A225   http://vectorart68102.acemlnb.com/lt.php?s=081de164462b5a71484a5660e7b63974&i=20A141A1A225   http://vectorart68102.acemlnb.com/lt.php?s=081de164462b5a71484a5660e7b63974&i=20A141A1A230   mailto:info@vectorart.co _________________ Sent to svn-src-all@freebsd.org Unsubscribe: http://vectorart68102.acemlnb.com/proc.php?nl=1&c=20&m=141&s=081de164462b5a71484a5660e7b63974&act=unsub Vector Art, HEAD-QUARTERS IN US #201, 7902, Charles , Annandale, VA 22003, United States From owner-svn-src-all@freebsd.org Fri Jan 18 13:35:08 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 42B5C149DD3C; Fri, 18 Jan 2019 13:35:08 +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 DD3008FBFA; Fri, 18 Jan 2019 13:35:07 +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 CBE1E2E04; Fri, 18 Jan 2019 13:35:07 +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 x0IDZ7N0085625; Fri, 18 Jan 2019 13:35:07 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x0IDZ71B085622; Fri, 18 Jan 2019 13:35:07 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201901181335.x0IDZ71B085622@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Fri, 18 Jan 2019 13:35:07 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r343145 - head/sys/vm X-SVN-Group: head X-SVN-Commit-Author: kib X-SVN-Commit-Paths: head/sys/vm X-SVN-Commit-Revision: 343145 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: DD3008FBFA X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.96 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_SHORT(-0.97)[-0.966,0]; NEURAL_HAM_LONG(-1.00)[-0.999,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 18 Jan 2019 13:35:08 -0000 Author: kib Date: Fri Jan 18 13:35:06 2019 New Revision: 343145 URL: https://svnweb.freebsd.org/changeset/base/343145 Log: MI VM: Make it possible to set size of superpage at boot instead of compile time. In order to allow single kernel to use PAE pagetables on i386 if hardware supports it, and fall back to classic two-level paging structures if not, superpage code should be able to adopt to either 2M or 4M superpages size. There I make MI VM structures large enough to track the biggest possible superpage, by allowing architecture to define VM_NFREEORDER_MAX and VM_LEVEL_0_ORDER_MAX constants. Corresponding VM_NFREEORDER and VM_LEVEL_0_ORDER symbols can be defined as runtime values and must be less than the _MAX constants. If architecture does not define _MAXs, it is assumed that _MAX == normal constant. Reviewed by: markj Tested by: pho (as part of the larger patch) Sponsored by: The FreeBSD Foundation MFC after: 1 week Differential revision: https://reviews.freebsd.org/D18853 Modified: head/sys/vm/vm_phys.c head/sys/vm/vm_phys.h head/sys/vm/vm_reserv.c Modified: head/sys/vm/vm_phys.c ============================================================================== --- head/sys/vm/vm_phys.c Fri Jan 18 10:54:36 2019 (r343144) +++ head/sys/vm/vm_phys.c Fri Jan 18 13:35:06 2019 (r343145) @@ -106,7 +106,8 @@ static struct rwlock_padalign vm_phys_fictitious_reg_l MALLOC_DEFINE(M_FICT_PAGES, "vm_fictitious", "Fictitious VM pages"); static struct vm_freelist __aligned(CACHE_LINE_SIZE) - vm_phys_free_queues[MAXMEMDOM][VM_NFREELIST][VM_NFREEPOOL][VM_NFREEORDER]; + vm_phys_free_queues[MAXMEMDOM][VM_NFREELIST][VM_NFREEPOOL] + [VM_NFREEORDER_MAX]; static int __read_mostly vm_nfreelists; Modified: head/sys/vm/vm_phys.h ============================================================================== --- head/sys/vm/vm_phys.h Fri Jan 18 10:54:36 2019 (r343144) +++ head/sys/vm/vm_phys.h Fri Jan 18 13:35:06 2019 (r343145) @@ -42,6 +42,10 @@ #ifdef _KERNEL +#ifndef VM_NFREEORDER_MAX +#define VM_NFREEORDER_MAX VM_NFREEORDER +#endif + /* Domains must be dense (non-sparse) and zero-based. */ struct mem_affinity { vm_paddr_t start; @@ -63,7 +67,7 @@ struct vm_phys_seg { vm_paddr_t end; vm_page_t first_page; int domain; - struct vm_freelist (*free_queues)[VM_NFREEPOOL][VM_NFREEORDER]; + struct vm_freelist (*free_queues)[VM_NFREEPOOL][VM_NFREEORDER_MAX]; }; extern struct vm_phys_seg vm_phys_segs[]; Modified: head/sys/vm/vm_reserv.c ============================================================================== --- head/sys/vm/vm_reserv.c Fri Jan 18 10:54:36 2019 (r343144) +++ head/sys/vm/vm_reserv.c Fri Jan 18 13:35:06 2019 (r343145) @@ -77,10 +77,15 @@ __FBSDID("$FreeBSD$"); #if VM_NRESERVLEVEL > 0 +#ifndef VM_LEVEL_0_ORDER_MAX +#define VM_LEVEL_0_ORDER_MAX VM_LEVEL_0_ORDER +#endif + /* * The number of small pages that are contained in a level 0 reservation */ #define VM_LEVEL_0_NPAGES (1 << VM_LEVEL_0_ORDER) +#define VM_LEVEL_0_NPAGES_MAX (1 << VM_LEVEL_0_ORDER_MAX) /* * The number of bits by which a physical address is shifted to obtain the @@ -114,6 +119,7 @@ typedef u_long popmap_t; * The number of population map entries in a reservation */ #define NPOPMAP howmany(VM_LEVEL_0_NPAGES, NBPOPMAP) +#define NPOPMAP_MAX howmany(VM_LEVEL_0_NPAGES_MAX, NBPOPMAP) /* * Number of elapsed ticks before we update the LRU queue position. Used @@ -191,7 +197,7 @@ struct vm_reserv { uint16_t popcnt; /* (r) # of pages in use */ int lasttick; /* (r) last pop update tick. */ char inpartpopq; /* (d) */ - popmap_t popmap[NPOPMAP]; /* (r) bit vector, used pages */ + popmap_t popmap[NPOPMAP_MAX]; /* (r) bit vector, used pages */ }; #define vm_reserv_lockptr(rv) (&(rv)->lock) From owner-svn-src-all@freebsd.org Fri Jan 18 13:38:57 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id AAB58149DE60; Fri, 18 Jan 2019 13:38:57 +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 519178FE51; Fri, 18 Jan 2019 13:38:57 +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 452342E3A; Fri, 18 Jan 2019 13:38:57 +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 x0IDcvEA085828; Fri, 18 Jan 2019 13:38:57 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x0IDcuND085826; Fri, 18 Jan 2019 13:38:56 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201901181338.x0IDcuND085826@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Fri, 18 Jan 2019 13:38:56 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r343146 - in head/sys/x86: include x86 X-SVN-Group: head X-SVN-Commit-Author: kib X-SVN-Commit-Paths: in head/sys/x86: include x86 X-SVN-Commit-Revision: 343146 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 519178FE51 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.96 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_LONG(-1.00)[-0.999,0]; NEURAL_HAM_SHORT(-0.97)[-0.966,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 18 Jan 2019 13:38:57 -0000 Author: kib Date: Fri Jan 18 13:38:56 2019 New Revision: 343146 URL: https://svnweb.freebsd.org/changeset/base/343146 Log: x86 busdma: fix mis-use of bus_addr_t where vm_paddr_t is assumed. Right now bus_addr_t and vm_paddr_t are always aliased to the same underlying integer type on x86, which makes the interchange hard to detect. Shortly, i386 kernel would use uint64_t for vm_paddr_t to enable automatic use of PAE paging structures if hardware allows it, while bus_addr_t would be extended to 64bit only when PAE option is specified. Fix all places that were identified as using bus_addr_t while page address was assumed. This was performed by testing the complete PAE merging patch on machine with > 4G of RAM enabled. Reviewed by: markj Tested by: pho Sponsored by: The FreeBSD Foundation MFC after: 2 weeks Differential revision: https://reviews.freebsd.org/D18854 Modified: head/sys/x86/include/busdma_impl.h head/sys/x86/x86/busdma_bounce.c head/sys/x86/x86/busdma_machdep.c Modified: head/sys/x86/include/busdma_impl.h ============================================================================== --- head/sys/x86/include/busdma_impl.h Fri Jan 18 13:35:06 2019 (r343145) +++ head/sys/x86/include/busdma_impl.h Fri Jan 18 13:38:56 2019 (r343146) @@ -87,7 +87,7 @@ struct bus_dma_impl { }; void bus_dma_dflt_lock(void *arg, bus_dma_lock_op_t op); -int bus_dma_run_filter(struct bus_dma_tag_common *dmat, bus_addr_t paddr); +int bus_dma_run_filter(struct bus_dma_tag_common *dmat, vm_paddr_t paddr); int common_bus_dma_tag_create(struct bus_dma_tag_common *parent, bus_size_t alignment, bus_addr_t boundary, bus_addr_t lowaddr, bus_addr_t highaddr, Modified: head/sys/x86/x86/busdma_bounce.c ============================================================================== --- head/sys/x86/x86/busdma_bounce.c Fri Jan 18 13:35:06 2019 (r343145) +++ head/sys/x86/x86/busdma_bounce.c Fri Jan 18 13:38:56 2019 (r343146) @@ -139,7 +139,7 @@ static int alloc_bounce_pages(bus_dma_tag_t dmat, u_in static int reserve_bounce_pages(bus_dma_tag_t dmat, bus_dmamap_t map, int commit); static bus_addr_t add_bounce_page(bus_dma_tag_t dmat, bus_dmamap_t map, - vm_offset_t vaddr, bus_addr_t addr1, bus_addr_t addr2, bus_size_t size); + vm_offset_t vaddr, vm_paddr_t addr1, vm_paddr_t addr2, bus_size_t size); static void free_bounce_page(bus_dma_tag_t dmat, struct bounce_page *bpage); static void _bus_dmamap_count_pages(bus_dma_tag_t dmat, bus_dmamap_t map, pmap_t pmap, void *buf, bus_size_t buflen, int flags); @@ -507,7 +507,7 @@ static void _bus_dmamap_count_phys(bus_dma_tag_t dmat, bus_dmamap_t map, vm_paddr_t buf, bus_size_t buflen, int flags) { - bus_addr_t curaddr; + vm_paddr_t curaddr; bus_size_t sgsize; if (map != &nobounce_dmamap && map->pagesneeded == 0) { @@ -536,7 +536,7 @@ _bus_dmamap_count_pages(bus_dma_tag_t dmat, bus_dmamap { vm_offset_t vaddr; vm_offset_t vendaddr; - bus_addr_t paddr; + vm_paddr_t paddr; bus_size_t sg_len; if (map != &nobounce_dmamap && map->pagesneeded == 0) { @@ -643,12 +643,19 @@ _bus_dmamap_reserve_pages(bus_dma_tag_t dmat, bus_dmam * Add a single contiguous physical range to the segment list. */ static int -_bus_dmamap_addseg(bus_dma_tag_t dmat, bus_dmamap_t map, bus_addr_t curaddr, +_bus_dmamap_addseg(bus_dma_tag_t dmat, bus_dmamap_t map, vm_paddr_t curaddr, bus_size_t sgsize, bus_dma_segment_t *segs, int *segp) { bus_addr_t baddr, bmask; int seg; + KASSERT(curaddr <= BUS_SPACE_MAXADDR, + ("ds_addr %#jx > BUS_SPACE_MAXADDR %#jx; dmat %p fl %#x low %#jx " + "hi %#jx", + (uintmax_t)curaddr, (uintmax_t)BUS_SPACE_MAXADDR, + dmat, dmat->bounce_flags, (uintmax_t)dmat->common.lowaddr, + (uintmax_t)dmat->common.highaddr)); + /* * Make sure we don't cross any boundaries. */ @@ -695,7 +702,7 @@ bounce_bus_dmamap_load_phys(bus_dma_tag_t dmat, bus_dm int *segp) { bus_size_t sgsize; - bus_addr_t curaddr; + vm_paddr_t curaddr; int error; if (map == NULL) @@ -747,7 +754,7 @@ bounce_bus_dmamap_load_buffer(bus_dma_tag_t dmat, bus_ int *segp) { bus_size_t sgsize, max_sgsize; - bus_addr_t curaddr; + vm_paddr_t curaddr; vm_offset_t kvaddr, vaddr; int error; @@ -1194,7 +1201,7 @@ reserve_bounce_pages(bus_dma_tag_t dmat, bus_dmamap_t static bus_addr_t add_bounce_page(bus_dma_tag_t dmat, bus_dmamap_t map, vm_offset_t vaddr, - bus_addr_t addr1, bus_addr_t addr2, bus_size_t size) + vm_paddr_t addr1, vm_paddr_t addr2, bus_size_t size) { struct bounce_zone *bz; struct bounce_page *bpage; Modified: head/sys/x86/x86/busdma_machdep.c ============================================================================== --- head/sys/x86/x86/busdma_machdep.c Fri Jan 18 13:35:06 2019 (r343145) +++ head/sys/x86/x86/busdma_machdep.c Fri Jan 18 13:38:56 2019 (r343146) @@ -99,14 +99,15 @@ bus_dma_dflt_lock(void *arg, bus_dma_lock_op_t op) * to check for a match, if there is no filter callback then assume a match. */ int -bus_dma_run_filter(struct bus_dma_tag_common *tc, bus_addr_t paddr) +bus_dma_run_filter(struct bus_dma_tag_common *tc, vm_paddr_t paddr) { int retval; retval = 0; do { - if (((paddr > tc->lowaddr && paddr <= tc->highaddr) || - ((paddr & (tc->alignment - 1)) != 0)) && + if ((paddr >= BUS_SPACE_MAXADDR || + (paddr > tc->lowaddr && paddr <= tc->highaddr) || + (paddr & (tc->alignment - 1)) != 0) && (tc->filter == NULL || (*tc->filter)(tc->filterarg, paddr) != 0)) retval = 1; From owner-svn-src-all@freebsd.org Fri Jan 18 13:43:12 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 777BE149E2AD; Fri, 18 Jan 2019 13:43:12 +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 1A73290470; Fri, 18 Jan 2019 13:43:12 +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 0F7712FEB; Fri, 18 Jan 2019 13:43:12 +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 x0IDhB1A090774; Fri, 18 Jan 2019 13:43:11 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x0IDhBdp090773; Fri, 18 Jan 2019 13:43:11 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201901181343.x0IDhBdp090773@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Fri, 18 Jan 2019 13:43:11 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r343147 - head/sys/x86/x86 X-SVN-Group: head X-SVN-Commit-Author: kib X-SVN-Commit-Paths: head/sys/x86/x86 X-SVN-Commit-Revision: 343147 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 1A73290470 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.96 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_SHORT(-0.96)[-0.964,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_LONG(-1.00)[-0.999,0] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 18 Jan 2019 13:43:12 -0000 Author: kib Date: Fri Jan 18 13:43:11 2019 New Revision: 343147 URL: https://svnweb.freebsd.org/changeset/base/343147 Log: i386/PAE busdma: allow more bounce pages. If i386 has more than 4G of memory, allow the same number of busdma bounce pages as for amd64. In fact, in this case bouncing sometimes is much heavier than on amd64. Reviewed by: markj Tested by: pho Sponsored by: The FreeBSD Foundation MFC after: 2 weeks Differential revision: https://reviews.freebsd.org/D18854 Modified: head/sys/x86/x86/busdma_bounce.c Modified: head/sys/x86/x86/busdma_bounce.c ============================================================================== --- head/sys/x86/x86/busdma_bounce.c Fri Jan 18 13:38:56 2019 (r343146) +++ head/sys/x86/x86/busdma_bounce.c Fri Jan 18 13:43:11 2019 (r343147) @@ -57,7 +57,7 @@ __FBSDID("$FreeBSD$"); #include #ifdef __i386__ -#define MAX_BPAGES 512 +#define MAX_BPAGES (Maxmem > atop(0x100000000ULL) ? 8192 : 512) #else #define MAX_BPAGES 8192 #endif From owner-svn-src-all@freebsd.org Fri Jan 18 14:54:16 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 2FE0C14A1080; Fri, 18 Jan 2019 14:54:16 +0000 (UTC) (envelope-from freebsd@pdx.rh.CN85.dnsmgr.net) Received: from pdx.rh.CN85.dnsmgr.net (br1.CN84in.dnsmgr.net [69.59.192.140]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 7E828931DC; Fri, 18 Jan 2019 14:54:15 +0000 (UTC) (envelope-from freebsd@pdx.rh.CN85.dnsmgr.net) Received: from pdx.rh.CN85.dnsmgr.net (localhost [127.0.0.1]) by pdx.rh.CN85.dnsmgr.net (8.13.3/8.13.3) with ESMTP id x0IEsB7t055785; Fri, 18 Jan 2019 06:54:11 -0800 (PST) (envelope-from freebsd@pdx.rh.CN85.dnsmgr.net) Received: (from freebsd@localhost) by pdx.rh.CN85.dnsmgr.net (8.13.3/8.13.3/Submit) id x0IEsAWh055784; Fri, 18 Jan 2019 06:54:10 -0800 (PST) (envelope-from freebsd) From: "Rodney W. Grimes" Message-Id: <201901181454.x0IEsAWh055784@pdx.rh.CN85.dnsmgr.net> Subject: Re: svn commit: r343118 - in head/usr.sbin: . trim In-Reply-To: <201901181254.x0ICsbBb076360@slippy.cwsent.com> To: Cy Schubert Date: Fri, 18 Jan 2019 06:54:10 -0800 (PST) CC: Eugene Grosbein , Maxim Sobolev , "Conrad E. Meyer" , src-committers , svn-src-all@freebsd.org, svn-src-head@freebsd.org Reply-To: rgrimes@freebsd.org X-Mailer: ELM [version 2.4ME+ PL121h (25)] MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=US-ASCII X-Rspamd-Queue-Id: 7E828931DC X-Spamd-Bar: ------ Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-6.93 / 15.00]; NEURAL_HAM_MEDIUM(-1.00)[-1.000,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; REPLY(-4.00)[]; NEURAL_HAM_SHORT(-0.93)[-0.933,0] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 18 Jan 2019 14:54:16 -0000 > In message <81bb343b-ad8a-371d-d94f-f72c8dbce754@grosbein.net>, Eugene > Grosbein > writes: > > 18.01.2019 5:25, Maxim Sobolev wrote: > > > > > Using usr.sbin/trim as an example. > > > > We still lack a command usable at installation stage (escape to shell) to tri > > m a device or partition > > dedicated to ZFS Cache/ZFS Intention Log/zvol any other use when ports/packag > > es are not yet available. > > OK, I will put a review together for dd. Ignoring all the hyperbola below, here is what your looking for: https://reviews.freebsd.org/D18382 > > Do you realize that what you just said? Your statement is inconsistent > with where trim is installed? Then it should have been installed in > /sbin not where you put it. I don't want to start yet another bikeshed > arguing the merits of this or that -- I'm intentionally being vague > here because I really don't want to stat a different bikeshed thread. > But suffice it to say, dd is the place for it because it lives in /bin > and dd is already included in /rescue. > > Everything about trim is wrong, even where it is put. -- Rod Grimes rgrimes@freebsd.org From owner-svn-src-all@freebsd.org Fri Jan 18 15:11:23 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id BEAF414A15E6; Fri, 18 Jan 2019 15:11:23 +0000 (UTC) (envelope-from eugen@grosbein.net) Received: from hz.grosbein.net (hz.grosbein.net [IPv6:2a01:4f8:d12:604::2]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "hz.grosbein.net", Issuer "hz.grosbein.net" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4747293B13; Fri, 18 Jan 2019 15:11:23 +0000 (UTC) (envelope-from eugen@grosbein.net) Received: from eg.sd.rdtc.ru (eg.sd.rdtc.ru [IPv6:2a03:3100:c:13:0:0:0:5]) by hz.grosbein.net (8.15.2/8.15.2) with ESMTPS id x0IFB7UE089201 (version=TLSv1.2 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Fri, 18 Jan 2019 16:11:07 +0100 (CET) (envelope-from eugen@grosbein.net) X-Envelope-From: eugen@grosbein.net X-Envelope-To: Cy.Schubert@cschubert.com Received: from eg.sd.rdtc.ru (eugen@localhost [127.0.0.1]) by eg.sd.rdtc.ru (8.15.2/8.15.2) with ESMTP id x0IFB6x5067968; Fri, 18 Jan 2019 22:11:06 +0700 (+07) (envelope-from eugen@grosbein.net) Subject: Re: svn commit: r343118 - in head/usr.sbin: . trim To: Cy Schubert References: <201901181254.x0ICsbBb076360@slippy.cwsent.com> Cc: Maxim Sobolev , "Conrad E. Meyer" , src-committers , svn-src-all@freebsd.org, svn-src-head@freebsd.org From: Eugene Grosbein Message-ID: <5C41EC89.9000900@grosbein.net> Date: Fri, 18 Jan 2019 22:11:05 +0700 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:38.0) Gecko/20100101 Thunderbird/38.4.0 MIME-Version: 1.0 In-Reply-To: <201901181254.x0ICsbBb076360@slippy.cwsent.com> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=0.3 required=5.0 tests=BAYES_00,LOCAL_FROM,SPF_PASS autolearn=no autolearn_force=no version=3.4.2 X-Spam-Report: * -2.3 BAYES_00 BODY: Bayes spam probability is 0 to 1% * [score: 0.0000] * -0.0 SPF_PASS SPF: sender matches SPF record * 2.6 LOCAL_FROM From my domains X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on hz.grosbein.net X-Rspamd-Queue-Id: 4747293B13 X-Spamd-Bar: ------ Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-6.98 / 15.00]; NEURAL_HAM_MEDIUM(-1.00)[-1.000,0]; NEURAL_HAM_SHORT(-0.98)[-0.983,0]; REPLY(-4.00)[]; NEURAL_HAM_LONG(-1.00)[-1.000,0] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 18 Jan 2019 15:11:23 -0000 On 18.01.2019 19:54, Cy Schubert wrote: > In message <81bb343b-ad8a-371d-d94f-f72c8dbce754@grosbein.net>, Eugene > Grosbein > writes: >> 18.01.2019 5:25, Maxim Sobolev wrote: >> >>> Using usr.sbin/trim as an example. >> >> We still lack a command usable at installation stage (escape to shell) to tri >> m a device or partition >> dedicated to ZFS Cache/ZFS Intention Log/zvol any other use when ports/packag >> es are not yet available. > > OK, I will put a review together for dd. > > Do you realize that what you just said? Your statement is inconsistent > with where trim is installed? Then it should have been installed in > /sbin not where you put it. I don't want to start yet another bikeshed > arguing the merits of this or that -- I'm intentionally being vague > here because I really don't want to stat a different bikeshed thread. > But suffice it to say, dd is the place for it because it lives in /bin > and dd is already included in /rescue. Modern FreeBSD installation media have usr/bin and usr/sbin ready for shell session as they contain live system. I'm not against dd conv=trim but it has different usage pattern and it is not easy replacement for trim(8). From owner-svn-src-all@freebsd.org Fri Jan 18 15:58:34 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 0417014A293A; Fri, 18 Jan 2019 15:58:34 +0000 (UTC) (envelope-from dab@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 5D08495496; Fri, 18 Jan 2019 15:58:33 +0000 (UTC) (envelope-from dab@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1: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 50A214951; Fri, 18 Jan 2019 15:58:33 +0000 (UTC) (envelope-from dab@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x0IFwXGE058703; Fri, 18 Jan 2019 15:58:33 GMT (envelope-from dab@FreeBSD.org) Received: (from dab@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x0IFwWM1058701; Fri, 18 Jan 2019 15:58:32 GMT (envelope-from dab@FreeBSD.org) Message-Id: <201901181558.x0IFwWM1058701@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dab set sender to dab@FreeBSD.org using -f From: David Bright Date: Fri, 18 Jan 2019 15:58: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: r343148 - stable/12/sys/dev/asmc X-SVN-Group: stable-12 X-SVN-Commit-Author: dab X-SVN-Commit-Paths: stable/12/sys/dev/asmc X-SVN-Commit-Revision: 343148 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 5D08495496 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.94 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_SHORT(-0.94)[-0.939,0]; NEURAL_HAM_LONG(-1.00)[-0.999,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 18 Jan 2019 15:58:34 -0000 Author: dab Date: Fri Jan 18 15:58:32 2019 New Revision: 343148 URL: https://svnweb.freebsd.org/changeset/base/343148 Log: MFC r342770: asmc: Patch to add MacBook Pro 9,2 support PR: 211513 Submitted by: William Theesfeld Jr Reported by: William Theesfeld Jr Modified: stable/12/sys/dev/asmc/asmc.c stable/12/sys/dev/asmc/asmcvar.h Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/dev/asmc/asmc.c ============================================================================== --- stable/12/sys/dev/asmc/asmc.c Fri Jan 18 13:43:11 2019 (r343147) +++ stable/12/sys/dev/asmc/asmc.c Fri Jan 18 15:58:32 2019 (r343148) @@ -231,6 +231,12 @@ struct asmc_model asmc_models[] = { }, { + "MacBookPro9,2", "Apple SMC MacBook Pro (mid 2012)", + ASMC_SMS_FUNCS_DISABLED, ASMC_FAN_FUNCS, ASMC_LIGHT_FUNCS, + ASMC_MBP9_TEMPS, ASMC_MBP9_TEMPNAMES, ASMC_MBP9_TEMPDESCS + }, + + { "MacBookPro11,2", "Apple SMC MacBook Pro Retina Core i7 (2013/2014)", ASMC_SMS_FUNCS_DISABLED, ASMC_FAN_FUNCS2, ASMC_LIGHT_FUNCS, ASMC_MBP112_TEMPS, ASMC_MBP112_TEMPNAMES, ASMC_MBP112_TEMPDESCS Modified: stable/12/sys/dev/asmc/asmcvar.h ============================================================================== --- stable/12/sys/dev/asmc/asmcvar.h Fri Jan 18 13:43:11 2019 (r343147) +++ stable/12/sys/dev/asmc/asmcvar.h Fri Jan 18 15:58:32 2019 (r343148) @@ -257,6 +257,27 @@ struct asmc_softc { "TMBS", "TP0P", "TPCD", "TW0P", "Th1H", \ "Th2H", "Tm0P", "Ts0P", "Ts0S" } +#define ASMC_MBP9_TEMPS { "Ts0P", "Ts0S", "TA0P", "TB1T", "TB2T", \ + "TB0T", "TC1C", "TC2C", "TC0E", "TC0F", \ + "TC0J", "TC0P", "TCFC", "TCGC", "TCSA", \ + "TCTD", "TCXC", "TG1D", "TM0P", "TM0S", \ + "TPCD", NULL } + +#define ASMC_MBP9_TEMPNAMES { "Ts0P", "Ts0S", "TA0P", "TB1T", "TB2T", \ + "TB0T", "TC1C", "TC2C", "TC0E", "TC0F", \ + "TC0J", "TC0P", "TCFC", "TCGC", "TCSA", \ + "TCTD", "TCXC", "TG1D", "TM0P", "TM0S", \ + "TPCD" } + +#define ASMC_MBP9_TEMPDESCS { "Palm Rest", "Memory Proximity", "Airflow 1", \ + "Battery 1", "Battery 2", "Battery TS_MAX", \ + "CPU Core 1", "CPU Core 2", "CPU1", "CPU1", \ + "TC0J", "CPU 1 Proximity", "TCFC", \ + "PECI GPU", "PECI SA", "TCTD", "PECI CPU", \ + "GPU Die", "Memory Bank A1", "Memory Module A1", \ + "PCH Die" } + + #define ASMC_MBP112_TEMPS { "TB0T", "TB1T", "TB2T", "TBXT", "TC0E", \ "TC0F", "TC0P", "TC1C", "TC2C", "TC3C", \ "TC4C", "TCFC", "TCGC", "TCSA", "TCTD", \ From owner-svn-src-all@freebsd.org Fri Jan 18 15:59:51 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 08FC214A2A47; Fri, 18 Jan 2019 15:59:51 +0000 (UTC) (envelope-from dab@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 A40E99562C; Fri, 18 Jan 2019 15:59:50 +0000 (UTC) (envelope-from dab@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1: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 98C084953; Fri, 18 Jan 2019 15:59:50 +0000 (UTC) (envelope-from dab@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x0IFxo4s058819; Fri, 18 Jan 2019 15:59:50 GMT (envelope-from dab@FreeBSD.org) Received: (from dab@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x0IFxoWh058817; Fri, 18 Jan 2019 15:59:50 GMT (envelope-from dab@FreeBSD.org) Message-Id: <201901181559.x0IFxoWh058817@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dab set sender to dab@FreeBSD.org using -f From: David Bright Date: Fri, 18 Jan 2019 15:59:50 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r343149 - stable/11/sys/dev/asmc X-SVN-Group: stable-11 X-SVN-Commit-Author: dab X-SVN-Commit-Paths: stable/11/sys/dev/asmc X-SVN-Commit-Revision: 343149 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: A40E99562C X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.94 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_SHORT(-0.94)[-0.941,0]; NEURAL_HAM_LONG(-1.00)[-0.999,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 18 Jan 2019 15:59:51 -0000 Author: dab Date: Fri Jan 18 15:59:49 2019 New Revision: 343149 URL: https://svnweb.freebsd.org/changeset/base/343149 Log: MFC r342770: asmc: Patch to add MacBook Pro 9,2 support PR: 211513 Submitted by: William Theesfeld Jr Reported by: William Theesfeld Jr Modified: stable/11/sys/dev/asmc/asmc.c stable/11/sys/dev/asmc/asmcvar.h Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/dev/asmc/asmc.c ============================================================================== --- stable/11/sys/dev/asmc/asmc.c Fri Jan 18 15:58:32 2019 (r343148) +++ stable/11/sys/dev/asmc/asmc.c Fri Jan 18 15:59:49 2019 (r343149) @@ -234,6 +234,12 @@ struct asmc_model asmc_models[] = { }, { + "MacBookPro9,2", "Apple SMC MacBook Pro (mid 2012)", + ASMC_SMS_FUNCS_DISABLED, ASMC_FAN_FUNCS, ASMC_LIGHT_FUNCS, + ASMC_MBP9_TEMPS, ASMC_MBP9_TEMPNAMES, ASMC_MBP9_TEMPDESCS + }, + + { "MacBookPro11,2", "Apple SMC MacBook Pro Retina Core i7 (2013/2014)", ASMC_SMS_FUNCS_DISABLED, ASMC_FAN_FUNCS2, ASMC_LIGHT_FUNCS, ASMC_MBP112_TEMPS, ASMC_MBP112_TEMPNAMES, ASMC_MBP112_TEMPDESCS Modified: stable/11/sys/dev/asmc/asmcvar.h ============================================================================== --- stable/11/sys/dev/asmc/asmcvar.h Fri Jan 18 15:58:32 2019 (r343148) +++ stable/11/sys/dev/asmc/asmcvar.h Fri Jan 18 15:59:49 2019 (r343149) @@ -255,6 +255,27 @@ struct asmc_softc { "TMBS", "TP0P", "TPCD", "TW0P", "Th1H", \ "Th2H", "Tm0P", "Ts0P", "Ts0S" } +#define ASMC_MBP9_TEMPS { "Ts0P", "Ts0S", "TA0P", "TB1T", "TB2T", \ + "TB0T", "TC1C", "TC2C", "TC0E", "TC0F", \ + "TC0J", "TC0P", "TCFC", "TCGC", "TCSA", \ + "TCTD", "TCXC", "TG1D", "TM0P", "TM0S", \ + "TPCD", NULL } + +#define ASMC_MBP9_TEMPNAMES { "Ts0P", "Ts0S", "TA0P", "TB1T", "TB2T", \ + "TB0T", "TC1C", "TC2C", "TC0E", "TC0F", \ + "TC0J", "TC0P", "TCFC", "TCGC", "TCSA", \ + "TCTD", "TCXC", "TG1D", "TM0P", "TM0S", \ + "TPCD" } + +#define ASMC_MBP9_TEMPDESCS { "Palm Rest", "Memory Proximity", "Airflow 1", \ + "Battery 1", "Battery 2", "Battery TS_MAX", \ + "CPU Core 1", "CPU Core 2", "CPU1", "CPU1", \ + "TC0J", "CPU 1 Proximity", "TCFC", \ + "PECI GPU", "PECI SA", "TCTD", "PECI CPU", \ + "GPU Die", "Memory Bank A1", "Memory Module A1", \ + "PCH Die" } + + #define ASMC_MBP112_TEMPS { "TB0T", "TB1T", "TB2T", "TBXT", "TC0E", \ "TC0F", "TC0P", "TC1C", "TC2C", "TC3C", \ "TC4C", "TCFC", "TCGC", "TCSA", "TCTD", \ From owner-svn-src-all@freebsd.org Fri Jan 18 16:04:01 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 0DEB714A2FBE; Fri, 18 Jan 2019 16:04:01 +0000 (UTC) (envelope-from dab@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 A711095C0F; Fri, 18 Jan 2019 16:04:00 +0000 (UTC) (envelope-from dab@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1: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 742BF4AF7; Fri, 18 Jan 2019 16:04:00 +0000 (UTC) (envelope-from dab@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x0IG40v6063597; Fri, 18 Jan 2019 16:04:00 GMT (envelope-from dab@FreeBSD.org) Received: (from dab@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x0IG40LN063596; Fri, 18 Jan 2019 16:04:00 GMT (envelope-from dab@FreeBSD.org) Message-Id: <201901181604.x0IG40LN063596@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dab set sender to dab@FreeBSD.org using -f From: David Bright Date: Fri, 18 Jan 2019 16:04: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: r343150 - stable/12/sys/dev/asmc X-SVN-Group: stable-12 X-SVN-Commit-Author: dab X-SVN-Commit-Paths: stable/12/sys/dev/asmc X-SVN-Commit-Revision: 343150 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: A711095C0F X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.94 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_LONG(-1.00)[-0.999,0]; NEURAL_HAM_SHORT(-0.94)[-0.941,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 18 Jan 2019 16:04:01 -0000 Author: dab Date: Fri Jan 18 16:03:59 2019 New Revision: 343150 URL: https://svnweb.freebsd.org/changeset/base/343150 Log: MFC r342822: asmc: Add support for Mac mini 4,1 (Mid-2010) Modified: stable/12/sys/dev/asmc/asmc.c stable/12/sys/dev/asmc/asmcvar.h Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/dev/asmc/asmc.c ============================================================================== --- stable/12/sys/dev/asmc/asmc.c Fri Jan 18 15:59:49 2019 (r343149) +++ stable/12/sys/dev/asmc/asmc.c Fri Jan 18 16:03:59 2019 (r343150) @@ -151,6 +151,8 @@ static struct asmc_model *asmc_match(device_t dev); asmc_mbp_sysctl_light_right, \ asmc_mbp_sysctl_light_control +#define ASMC_LIGHT_FUNCS_DISABLED NULL, NULL, NULL + struct asmc_model asmc_models[] = { { "MacBook1,1", "Apple SMC MacBook Core Duo", @@ -264,6 +266,15 @@ struct asmc_model asmc_models[] = { ASMC_FAN_FUNCS, NULL, NULL, NULL, ASMC_MM31_TEMPS, ASMC_MM31_TEMPNAMES, ASMC_MM31_TEMPDESCS + }, + + /* The Mac Mini 4,1 (Mid-2010) has no SMS */ + { + "Macmini4,1", "Apple SMC Mac mini 4,1 (Mid-2010)", + ASMC_SMS_FUNCS_DISABLED, + ASMC_FAN_FUNCS, + ASMC_LIGHT_FUNCS_DISABLED, + ASMC_MM41_TEMPS, ASMC_MM41_TEMPNAMES, ASMC_MM41_TEMPDESCS }, /* The Mac Mini 5,2 has no SMS */ Modified: stable/12/sys/dev/asmc/asmcvar.h ============================================================================== --- stable/12/sys/dev/asmc/asmcvar.h Fri Jan 18 15:59:49 2019 (r343149) +++ stable/12/sys/dev/asmc/asmcvar.h Fri Jan 18 16:03:59 2019 (r343150) @@ -360,6 +360,27 @@ struct asmc_softc { "Northbridge Proximity Temperature", \ "Wireless Module Proximity Temperature", } +#define ASMC_MM41_TEMPS { "TA0P", "TC0D", "TC0G", "TC0H", "TC0P", \ + "TC0p", "TCPG", "TH0G", "TH0P", "TH0p", \ + "TM0G", "TM0P", "TM0p", "TN0D", "TN0G", \ + "TN0P", "TN0p", "TN1D", "TN1E", "TN1F", \ + "TN1G", "TN1S", "TNPG", "TO0P", "TO0p", \ + "TW0P", "Tm0P", "Tp0C", NULL } + +#define ASMC_MM41_TEMPNAMES { "TA0P", "TC0D", "TC0G", "TC0H", "TC0P", \ + "TC0p", "TCPG", "TH0G", "TH0P", "TH0p", \ + "TM0G", "TM0P", "TM0p", "TN0D", "TN0G", \ + "TN0P", "TN0p", "TN1D", "TN1E", "TN1F", \ + "TN1G", "TN1S", "TNPG", "TO0P", "TO0p", \ + "TW0P", "Tm0P", "Tp0C", NULL } + +#define ASMC_MM41_TEMPDESCS { "TA0P", "TC0D", "TC0G", "TC0H", "TC0P", \ + "TC0p", "TCPG", "TH0G", "TH0P", "TH0p", \ + "TM0G", "TM0P", "TM0p", "TN0D", "TN0G", \ + "TN0P", "TN0p", "TN1D", "TN1E", "TN1F", \ + "TN1G", "TN1S", "TNPG", "TO0P", "TO0p", \ + "TW0P", "Tm0P", "Tp0C", NULL } + #define ASMC_MM52_TEMPS { "TA0P", "TA1P", \ "TC0D", "TC0P", \ "TG0D", "TG1D", \ From owner-svn-src-all@freebsd.org Fri Jan 18 16:04:37 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id A189C14A300D; Fri, 18 Jan 2019 16:04:37 +0000 (UTC) (envelope-from dab@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 43C6795D2F; Fri, 18 Jan 2019 16:04:37 +0000 (UTC) (envelope-from dab@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1: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 155984AF8; Fri, 18 Jan 2019 16:04:37 +0000 (UTC) (envelope-from dab@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x0IG4anX063671; Fri, 18 Jan 2019 16:04:36 GMT (envelope-from dab@FreeBSD.org) Received: (from dab@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x0IG4a6x063669; Fri, 18 Jan 2019 16:04:36 GMT (envelope-from dab@FreeBSD.org) Message-Id: <201901181604.x0IG4a6x063669@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dab set sender to dab@FreeBSD.org using -f From: David Bright Date: Fri, 18 Jan 2019 16:04:36 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r343151 - stable/11/sys/dev/asmc X-SVN-Group: stable-11 X-SVN-Commit-Author: dab X-SVN-Commit-Paths: stable/11/sys/dev/asmc X-SVN-Commit-Revision: 343151 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 43C6795D2F X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.94 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_SHORT(-0.94)[-0.941,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_LONG(-1.00)[-0.999,0] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 18 Jan 2019 16:04:38 -0000 Author: dab Date: Fri Jan 18 16:04:36 2019 New Revision: 343151 URL: https://svnweb.freebsd.org/changeset/base/343151 Log: MFC r342822: asmc: Add support for Mac mini 4,1 (Mid-2010) Modified: stable/11/sys/dev/asmc/asmc.c stable/11/sys/dev/asmc/asmcvar.h Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/dev/asmc/asmc.c ============================================================================== --- stable/11/sys/dev/asmc/asmc.c Fri Jan 18 16:03:59 2019 (r343150) +++ stable/11/sys/dev/asmc/asmc.c Fri Jan 18 16:04:36 2019 (r343151) @@ -154,6 +154,8 @@ static struct asmc_model *asmc_match(device_t dev); asmc_mbp_sysctl_light_right, \ asmc_mbp_sysctl_light_control +#define ASMC_LIGHT_FUNCS_DISABLED NULL, NULL, NULL + struct asmc_model asmc_models[] = { { "MacBook1,1", "Apple SMC MacBook Core Duo", @@ -267,6 +269,15 @@ struct asmc_model asmc_models[] = { ASMC_FAN_FUNCS, NULL, NULL, NULL, ASMC_MM31_TEMPS, ASMC_MM31_TEMPNAMES, ASMC_MM31_TEMPDESCS + }, + + /* The Mac Mini 4,1 (Mid-2010) has no SMS */ + { + "Macmini4,1", "Apple SMC Mac mini 4,1 (Mid-2010)", + ASMC_SMS_FUNCS_DISABLED, + ASMC_FAN_FUNCS, + ASMC_LIGHT_FUNCS_DISABLED, + ASMC_MM41_TEMPS, ASMC_MM41_TEMPNAMES, ASMC_MM41_TEMPDESCS }, /* The Mac Mini 5,2 has no SMS */ Modified: stable/11/sys/dev/asmc/asmcvar.h ============================================================================== --- stable/11/sys/dev/asmc/asmcvar.h Fri Jan 18 16:03:59 2019 (r343150) +++ stable/11/sys/dev/asmc/asmcvar.h Fri Jan 18 16:04:36 2019 (r343151) @@ -358,6 +358,27 @@ struct asmc_softc { "Northbridge Proximity Temperature", \ "Wireless Module Proximity Temperature", } +#define ASMC_MM41_TEMPS { "TA0P", "TC0D", "TC0G", "TC0H", "TC0P", \ + "TC0p", "TCPG", "TH0G", "TH0P", "TH0p", \ + "TM0G", "TM0P", "TM0p", "TN0D", "TN0G", \ + "TN0P", "TN0p", "TN1D", "TN1E", "TN1F", \ + "TN1G", "TN1S", "TNPG", "TO0P", "TO0p", \ + "TW0P", "Tm0P", "Tp0C", NULL } + +#define ASMC_MM41_TEMPNAMES { "TA0P", "TC0D", "TC0G", "TC0H", "TC0P", \ + "TC0p", "TCPG", "TH0G", "TH0P", "TH0p", \ + "TM0G", "TM0P", "TM0p", "TN0D", "TN0G", \ + "TN0P", "TN0p", "TN1D", "TN1E", "TN1F", \ + "TN1G", "TN1S", "TNPG", "TO0P", "TO0p", \ + "TW0P", "Tm0P", "Tp0C", NULL } + +#define ASMC_MM41_TEMPDESCS { "TA0P", "TC0D", "TC0G", "TC0H", "TC0P", \ + "TC0p", "TCPG", "TH0G", "TH0P", "TH0p", \ + "TM0G", "TM0P", "TM0p", "TN0D", "TN0G", \ + "TN0P", "TN0p", "TN1D", "TN1E", "TN1F", \ + "TN1G", "TN1S", "TNPG", "TO0P", "TO0p", \ + "TW0P", "Tm0P", "Tp0C", NULL } + #define ASMC_MM52_TEMPS { "TA0P", "TA1P", \ "TC0D", "TC0P", \ "TG0D", "TG1D", \ From owner-svn-src-all@freebsd.org Fri Jan 18 17:33:02 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 8139114A502D for ; Fri, 18 Jan 2019 17:33:02 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: from mail-qk1-x733.google.com (mail-qk1-x733.google.com [IPv6:2607:f8b0:4864:20::733]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 1BF7769EAC for ; Fri, 18 Jan 2019 17:33:02 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: by mail-qk1-x733.google.com with SMTP id w204so8514516qka.2 for ; Fri, 18 Jan 2019 09:33:02 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bsdimp-com.20150623.gappssmtp.com; s=20150623; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=fnZDPTFOEjHODZS2rK/9THBHr+oAEwiJOZwtV/PxZKY=; b=WmoBIfkDmFL9hYYz7AognLdM7Gu/37TIX/4i4X6gY9Fy/UaXeAGyRG9nRBSvQUg6od RZFvdHo6p9Tj968Yc/Ea1brPNfldi0Gkk/jTcyHskL45wxjYbm+R/sLA8VnyfAOpDTOr tJou1O9uepJ0mZmd975XQXTakvA6wvpYrfyfeVUkPJOwRxlO30kKfeNZi/AD1DqtcE1y ah9xEzuitNPkOWYOVyEqWbjToKlVBFUZ+t3TvHdqKWDAqgnatJIevJdLAdbqSky/Flka KfI2mYqrhmMDtvJ2kZn/ko+iiZvgQ85Bumoe7KcVmX8gzTZBlkts1xRUH+vpEz/jiayP cw7w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=fnZDPTFOEjHODZS2rK/9THBHr+oAEwiJOZwtV/PxZKY=; b=SDpTT+Zk1T1fPnhcgufLif3SZt/cqs3y/IAWiPFer8SRMXRHtH4b1tjfDe3BzqQZmi xIXkWKSAvkIMYY3UaURheDGExcahMSZ4PkpeoS9FDMSddTTa0MqkkFYR7mpJt/DAWjlj E9Q2pAkJ4Gq5srjHJzL6dp0++LrZdtmb/7aoIAb4ulQwRkBkg+7vbQvNyJRG+6a5zlGH GCyMrKarIrC/NncmcAQoBRhfWg7uXPpbNmTRQuPaeMxWWx9S/abtn27xFjX/snD/HQ8V qSO48jRP6WwqBuJYNTpbSzZvGsWaYXOxtrf2q9p0LlETenZDJrmGsVsjLDkyznhfKQVa +AQQ== X-Gm-Message-State: AJcUukdqT7MwDd4uvCjWTlU1RuShTLgWkSjMltjAXmDM5ilQMG9LrzJ3 83uSpV7nAw6VHYh1LE4YOtXpVhx7glHlLkpWOH8//Q== X-Google-Smtp-Source: ALg8bN6eA4JSAXRqHmqtiPGfJBovas/F7beUcI8mrsXE29OVC10VAlDKQ8CagPHjFIGCJWcwEypvfDJVZ2A+BIoJNYo= X-Received: by 2002:a37:6e86:: with SMTP id j128mr16404614qkc.46.1547832781311; Fri, 18 Jan 2019 09:33:01 -0800 (PST) MIME-Version: 1.0 References: <201901171808.x0HI80jC068564@repo.freebsd.org> <2d239dc0-915c-2d2b-0936-a40af5e9ead9@freebsd.org> <4b204e03-48fd-07ae-45ae-70c5e03442c2@freebsd.org> In-Reply-To: <4b204e03-48fd-07ae-45ae-70c5e03442c2@freebsd.org> From: Warner Losh Date: Fri, 18 Jan 2019 10:32:50 -0700 Message-ID: Subject: Re: svn commit: r343118 - in head/usr.sbin: . trim To: Eugene Grosbein Cc: "Conrad E. Meyer" , src-committers , svn-src-all@freebsd.org, svn-src-head@freebsd.org X-Rspamd-Queue-Id: 1BF7769EAC X-Spamd-Bar: ------ Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-6.97 / 15.00]; NEURAL_HAM_MEDIUM(-1.00)[-1.000,0]; NEURAL_HAM_SHORT(-0.97)[-0.971,0]; REPLY(-4.00)[]; NEURAL_HAM_LONG(-1.00)[-1.000,0] Content-Type: text/plain; charset="UTF-8" X-Content-Filtered-By: Mailman/MimeDel 2.1.29 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 18 Jan 2019 17:33:02 -0000 On Fri, Jan 18, 2019 at 2:06 AM Eugene Grosbein wrote: > 18.01.2019 7:39, Warner Losh wrote: > > > You hijacked that review. Don't you dare use it as evidence of consent > to the sh*t you just pulled. > > > > Back it out, do a proper review. This one was not proper, nor was it > complete. Don't go using my name to support a program I've come to think is > a really bad idea. > > I do not see how I "hijacked" it this time. > > And I do not understand how another review would help as there is clearly > no one wishing to review the code anymore. > I really hope this is not some kind of bureaucracy or cargo cult for sake > of formal procedures > but mis-understanding at my side. Please explain. > I created the review and was revising it. You committed it out from under me. That's quite rude in this community and really really bothers me. That's why I'm so mad and using such strong language. Warner From owner-svn-src-all@freebsd.org Fri Jan 18 17:41:46 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 2C63E14A543B; Fri, 18 Jan 2019 17:41:46 +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 C7D5B6A5E0; Fri, 18 Jan 2019 17:41:45 +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 BA9055AF4; Fri, 18 Jan 2019 17:41:45 +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 x0IHfjNk014632; Fri, 18 Jan 2019 17:41:45 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x0IHfjs6014631; Fri, 18 Jan 2019 17:41:45 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <201901181741.x0IHfjs6014631@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Fri, 18 Jan 2019 17:41:45 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r343152 - head/usr.sbin/freebsd-update X-SVN-Group: head X-SVN-Commit-Author: emaste X-SVN-Commit-Paths: head/usr.sbin/freebsd-update X-SVN-Commit-Revision: 343152 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: C7D5B6A5E0 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.96 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_SHORT(-0.96)[-0.963,0]; NEURAL_HAM_LONG(-1.00)[-0.999,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 18 Jan 2019 17:41:46 -0000 Author: emaste Date: Fri Jan 18 17:41:45 2019 New Revision: 343152 URL: https://svnweb.freebsd.org/changeset/base/343152 Log: freebsd-update: Use BASEDIR when checking for src component src could potentially be installed under the based dir and not under the root or vice versa. PR: 224048 Submitted by: Gerald Aryeetey Reviewed by: delphij MFC after: 1 month Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D18849 Modified: head/usr.sbin/freebsd-update/freebsd-update.sh Modified: head/usr.sbin/freebsd-update/freebsd-update.sh ============================================================================== --- head/usr.sbin/freebsd-update/freebsd-update.sh Fri Jan 18 16:04:36 2019 (r343151) +++ head/usr.sbin/freebsd-update/freebsd-update.sh Fri Jan 18 17:41:45 2019 (r343152) @@ -221,7 +221,7 @@ config_KeepModifiedMetadata () { config_Components () { for C in $@; do if [ "$C" = "src" ]; then - if [ -e /usr/src/COPYRIGHT ]; then + if [ -e "${BASEDIR}/usr/src/COPYRIGHT" ]; then COMPONENTS="${COMPONENTS} ${C}" else echo "src component not installed, skipped" From owner-svn-src-all@freebsd.org Fri Jan 18 17:51:20 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 77CB014A595E; Fri, 18 Jan 2019 17:51:20 +0000 (UTC) (envelope-from freebsd@pdx.rh.CN85.dnsmgr.net) Received: from pdx.rh.CN85.dnsmgr.net (br1.CN84in.dnsmgr.net [69.59.192.140]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id EBEC06AD60; Fri, 18 Jan 2019 17:51:19 +0000 (UTC) (envelope-from freebsd@pdx.rh.CN85.dnsmgr.net) Received: from pdx.rh.CN85.dnsmgr.net (localhost [127.0.0.1]) by pdx.rh.CN85.dnsmgr.net (8.13.3/8.13.3) with ESMTP id x0IHpAJ4056606; Fri, 18 Jan 2019 09:51:10 -0800 (PST) (envelope-from freebsd@pdx.rh.CN85.dnsmgr.net) Received: (from freebsd@localhost) by pdx.rh.CN85.dnsmgr.net (8.13.3/8.13.3/Submit) id x0IHpAkU056605; Fri, 18 Jan 2019 09:51:10 -0800 (PST) (envelope-from freebsd) From: "Rodney W. Grimes" Message-Id: <201901181751.x0IHpAkU056605@pdx.rh.CN85.dnsmgr.net> Subject: Re: svn commit: r343152 - head/usr.sbin/freebsd-update In-Reply-To: <201901181741.x0IHfjs6014631@repo.freebsd.org> To: Ed Maste Date: Fri, 18 Jan 2019 09:51:10 -0800 (PST) CC: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Reply-To: rgrimes@freebsd.org X-Mailer: ELM [version 2.4ME+ PL121h (25)] MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=US-ASCII X-Rspamd-Queue-Id: EBEC06AD60 X-Spamd-Bar: ------ Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-6.96 / 15.00]; NEURAL_HAM_MEDIUM(-1.00)[-1.000,0]; NEURAL_HAM_SHORT(-0.96)[-0.956,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; REPLY(-4.00)[] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 18 Jan 2019 17:51:20 -0000 > Author: emaste > Date: Fri Jan 18 17:41:45 2019 > New Revision: 343152 > URL: https://svnweb.freebsd.org/changeset/base/343152 > > Log: > freebsd-update: Use BASEDIR when checking for src component > > src could potentially be installed under the based dir > and not under the root or vice versa. > > PR: 224048 > Submitted by: Gerald Aryeetey > Reviewed by: delphij > MFC after: 1 month > Sponsored by: The FreeBSD Foundation > Differential Revision: https://reviews.freebsd.org/D18849 > > Modified: > head/usr.sbin/freebsd-update/freebsd-update.sh > > Modified: head/usr.sbin/freebsd-update/freebsd-update.sh > ============================================================================== > --- head/usr.sbin/freebsd-update/freebsd-update.sh Fri Jan 18 16:04:36 2019 (r343151) > +++ head/usr.sbin/freebsd-update/freebsd-update.sh Fri Jan 18 17:41:45 2019 (r343152) > @@ -221,7 +221,7 @@ config_KeepModifiedMetadata () { > config_Components () { > for C in $@; do > if [ "$C" = "src" ]; then > - if [ -e /usr/src/COPYRIGHT ]; then > + if [ -e "${BASEDIR}/usr/src/COPYRIGHT" ]; then > COMPONENTS="${COMPONENTS} ${C}" > else > echo "src component not installed, skipped" > Since your in here fixing... there is a false positive on the detection of what is installed when we zero the size of a set, ie, now that doc.txz is a 0 size set it always thinks you have doc installed due to rounding errors in the calculation that says you have x% of this installed. -- Rod Grimes rgrimes@freebsd.org From owner-svn-src-all@freebsd.org Fri Jan 18 18:22:47 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id D86A814A6D2C; Fri, 18 Jan 2019 18:22:47 +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 7CC7B6CA12; Fri, 18 Jan 2019 18:22:47 +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 7224C6375; Fri, 18 Jan 2019 18:22:47 +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 x0IIMlXG036432; Fri, 18 Jan 2019 18:22:47 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x0IIMlBp036431; Fri, 18 Jan 2019 18:22:47 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <201901181822.x0IIMlBp036431@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Fri, 18 Jan 2019 18:22:47 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r343153 - head/usr.sbin/freebsd-update X-SVN-Group: head X-SVN-Commit-Author: emaste X-SVN-Commit-Paths: head/usr.sbin/freebsd-update X-SVN-Commit-Revision: 343153 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 7CC7B6CA12 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.95 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_SHORT(-0.95)[-0.953,0]; NEURAL_HAM_LONG(-1.00)[-0.999,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 18 Jan 2019 18:22:48 -0000 Author: emaste Date: Fri Jan 18 18:22:47 2019 New Revision: 343153 URL: https://svnweb.freebsd.org/changeset/base/343153 Log: freebsd-update.8: mandoc -Tlint fixes PR: 185389 Reported by: bcr MFC after: 3 days Sponsored by: The FreeBSD Foundation Modified: head/usr.sbin/freebsd-update/freebsd-update.8 Modified: head/usr.sbin/freebsd-update/freebsd-update.8 ============================================================================== --- head/usr.sbin/freebsd-update/freebsd-update.8 Fri Jan 18 17:41:45 2019 (r343152) +++ head/usr.sbin/freebsd-update/freebsd-update.8 Fri Jan 18 18:22:47 2019 (r343153) @@ -27,7 +27,7 @@ .\" .Dd June 14, 2017 .Dt FREEBSD-UPDATE 8 -.Os FreeBSD +.Os .Sh NAME .Nm freebsd-update .Nd fetch and install binary updates to FreeBSD @@ -47,9 +47,12 @@ The .Nm tool is used to fetch, install, and rollback binary -updates to the FreeBSD base system. +updates to the +.Fx +base system. Note that updates are only available if they are being built for the -FreeBSD release and architecture being used; in particular, the +.Fx +release and architecture being used; in particular, the .Fx Security Team only builds updates for releases shipped in binary form by the From owner-svn-src-all@freebsd.org Fri Jan 18 18:33:11 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 1388F14A7460; Fri, 18 Jan 2019 18:33:11 +0000 (UTC) (envelope-from cy.schubert@cschubert.com) Received: from smtp-out-so.shaw.ca (smtp-out-so.shaw.ca [64.59.136.138]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "Client", Issuer "CA" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 563EC6D430; Fri, 18 Jan 2019 18:33:09 +0000 (UTC) (envelope-from cy.schubert@cschubert.com) Received: from spqr.komquats.com ([70.67.125.17]) by shaw.ca with ESMTPA id kYwugSKt1nBo4kYwvgc8Ls; Fri, 18 Jan 2019 11:33:02 -0700 X-Authority-Analysis: v=2.3 cv=J8fUEzvS c=1 sm=1 tr=0 a=VFtTW3WuZNDh6VkGe7fA3g==:117 a=VFtTW3WuZNDh6VkGe7fA3g==:17 a=IkcTkHD0fZMA:10 a=3JhidrIBZZsA:10 a=H0GPC0OhAAAA:8 a=YxBL1-UpAAAA:8 a=6I5d2MoRAAAA:8 a=XzW2ZnVlJkLzrLaYYeEA:9 a=QEXdDO2ut3YA:10 a=KczGKrPSgCPlefTG41c3:22 a=Ia-lj3WSrqcvXOmTRaiG:22 a=IjZwj45LgO3ly-622nXo:22 Received: from android-68f84e02b5988183.esitwifi.local (S0106788a207e2972.gv.shawcable.net [70.66.154.233]) by spqr.komquats.com (Postfix) with ESMTPSA id 2957C437; Fri, 18 Jan 2019 10:33:18 -0800 (PST) Date: Fri, 18 Jan 2019 10:32:36 -0800 User-Agent: K-9 Mail for Android In-Reply-To: <5C41EC89.9000900@grosbein.net> References: <201901181254.x0ICsbBb076360@slippy.cwsent.com> <5C41EC89.9000900@grosbein.net> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Subject: Re: svn commit: r343118 - in head/usr.sbin: . trim To: Eugene Grosbein CC: Maxim Sobolev , "Conrad E. Meyer" , src-committers , svn-src-all@freebsd.org, svn-src-head@freebsd.org From: Cy Schubert Message-ID: X-CMAE-Envelope: MS4wfHdsYnCRnezpvRWyeNPNC1C4JzR3+w3+6lnnxw80noyzJ4J28lWEm22KWTCdyNHhF5d67WK16bukzSgje4g2u452KYbN76+8hBtB6mCmamnIz097wlae Bu2nGf9kFbGPryzoB8Jq0zHLqdTb8Opm4glsSUwbCYWHza6wxbw83jLhk0ofzIjoztgcPEXX3ss+rCeNGDO+LVUL2W5xEiayujUthkmmJiSxVt9wb6LDgTBW K5fs++1fF9yGjdI8TSix0VuWT9R5w9sv6VM7OEV8pwiwF+3EfaZrmHowf3eP/ZGOLlFJlxG5SKzb6MPTJRpRHDfYckRuA7lAcNu+pMF0Aky18Oq88g8o8k7G TTGdX4uj X-Rspamd-Queue-Id: 563EC6D430 X-Spamd-Bar: ------ Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-6.97 / 15.00]; NEURAL_HAM_MEDIUM(-1.00)[-1.000,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; REPLY(-4.00)[]; NEURAL_HAM_SHORT(-0.97)[-0.967,0] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 18 Jan 2019 18:33:11 -0000 On January 18, 2019 7:11:05 AM PST, Eugene Grosbein = wrote: >On 18=2E01=2E2019 19:54, Cy Schubert wrote: > >> In message <81bb343b-ad8a-371d-d94f-f72c8dbce754@grosbein=2Enet>, >Eugene=20 >> Grosbein >> writes: >>> 18=2E01=2E2019 5:25, Maxim Sobolev wrote: >>> >>>> Using usr=2Esbin/trim as an example=2E=20 >>> >>> We still lack a command usable at installation stage (escape to >shell) to tri >>> m a device or partition >>> dedicated to ZFS Cache/ZFS Intention Log/zvol any other use when >ports/packag >>> es are not yet available=2E >>=20 >> OK, I will put a review together for dd=2E >>=20 >> Do you realize that what you just said? Your statement is >inconsistent=20 >> with where trim is installed? Then it should have been installed in=20 >> /sbin not where you put it=2E I don't want to start yet another >bikeshed=20 >> arguing the merits of this or that -- I'm intentionally being vague=20 >> here because I really don't want to stat a different bikeshed thread=2E > >> But suffice it to say, dd is the place for it because it lives in >/bin=20 >> and dd is already included in /rescue=2E > >Modern FreeBSD installation media have usr/bin and usr/sbin ready for >shell session >as they contain live system=2E I'm not against dd conv=3Dtrim but it has >different usage pattern >and it is not easy replacement for trim(8)=2E What do you not understand? We do not want it in base without a proper rev= iew=2E This second attempt at commit without a proper review is IMO disresp= ectful=2E Remove it now and submit a proper review=2E --=20 Pardon the typos and autocorrect, small keyboard in use=2E Cheers, Cy Schubert FreeBSD UNIX: Web: http://www=2EFreeBSD=2Eorg The need of the many outweighs the greed of the few=2E From owner-svn-src-all@freebsd.org Fri Jan 18 20:35:25 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id BB68B1481860; Fri, 18 Jan 2019 20:35:25 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.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 637D47261A; Fri, 18 Jan 2019 20:35:25 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 593AD7B5B; Fri, 18 Jan 2019 20:35:25 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x0IKZPNP008210; Fri, 18 Jan 2019 20:35:25 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x0IKZPKN008209; Fri, 18 Jan 2019 20:35:25 GMT (envelope-from dim@FreeBSD.org) Message-Id: <201901182035.x0IKZPKN008209@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Fri, 18 Jan 2019 20:35:25 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r343154 - head X-SVN-Group: head X-SVN-Commit-Author: dim X-SVN-Commit-Paths: head X-SVN-Commit-Revision: 343154 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 637D47261A X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.97 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_SHORT(-0.97)[-0.974,0]; NEURAL_HAM_LONG(-1.00)[-0.999,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 18 Jan 2019 20:35:25 -0000 Author: dim Date: Fri Jan 18 20:35:24 2019 New Revision: 343154 URL: https://svnweb.freebsd.org/changeset/base/343154 Log: Remove leading slash from OLD_DIRS assignment in ObsoleteFiles.inc. The "make delete-old" mechanism will already take care of such prefixes, and this prevents a double leading slash from being displayed. Modified: head/ObsoleteFiles.inc Modified: head/ObsoleteFiles.inc ============================================================================== --- head/ObsoleteFiles.inc Fri Jan 18 18:22:47 2019 (r343153) +++ head/ObsoleteFiles.inc Fri Jan 18 20:35:24 2019 (r343154) @@ -828,7 +828,7 @@ OLD_FILES+=tests/sys/geom/class/eli/integrity_hmac_tes OLD_FILES+=tests/sys/geom/class/eli/onetime_a_test.sh OLD_FILES+=tests/sys/geom/class/eli/onetime_d_test.sh # 20171230: Remove /etc/skel from mtree -OLD_DIRS+=/etc/skel +OLD_DIRS+=etc/skel # 20171208: Remove basename_r(3) OLD_FILES+=usr/share/man/man3/basename_r.3.gz # 20171204: Move fdformat man page from volume 1 to volume 8. From owner-svn-src-all@freebsd.org Fri Jan 18 20:59:07 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id C17971482193; Fri, 18 Jan 2019 20:59:07 +0000 (UTC) (envelope-from wulf@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 67F9D73229; Fri, 18 Jan 2019 20:59:07 +0000 (UTC) (envelope-from wulf@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1: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 446557EF0; Fri, 18 Jan 2019 20:59:07 +0000 (UTC) (envelope-from wulf@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x0IKx7nO018548; Fri, 18 Jan 2019 20:59:07 GMT (envelope-from wulf@FreeBSD.org) Received: (from wulf@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x0IKx6df018546; Fri, 18 Jan 2019 20:59:06 GMT (envelope-from wulf@FreeBSD.org) Message-Id: <201901182059.x0IKx6df018546@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: wulf set sender to wulf@FreeBSD.org using -f From: Vladimir Kondratyev Date: Fri, 18 Jan 2019 20:59:06 +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: r343155 - stable/12/sys/dev/usb/input X-SVN-Group: stable-12 X-SVN-Commit-Author: wulf X-SVN-Commit-Paths: stable/12/sys/dev/usb/input X-SVN-Commit-Revision: 343155 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 67F9D73229 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.97 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_SHORT(-0.97)[-0.971,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_LONG(-1.00)[-0.999,0] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 18 Jan 2019 20:59:08 -0000 Author: wulf Date: Fri Jan 18 20:59:06 2019 New Revision: 343155 URL: https://svnweb.freebsd.org/changeset/base/343155 Log: MFC r340338: wmt(4): Add PNP record so it could be picked by devd/devmatch. Fix uhid(4) conflict with blacklisting of multitouch HID-usages in uhid(4) probe handler. Reviewed by: imp Differential Revision: https://reviews.freebsd.org/D17689 Modified: stable/12/sys/dev/usb/input/uhid.c stable/12/sys/dev/usb/input/wmt.c Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/dev/usb/input/uhid.c ============================================================================== --- stable/12/sys/dev/usb/input/uhid.c Fri Jan 18 20:35:24 2019 (r343154) +++ stable/12/sys/dev/usb/input/uhid.c Fri Jan 18 20:59:06 2019 (r343155) @@ -675,6 +675,8 @@ uhid_probe(device_t dev) { struct usb_attach_arg *uaa = device_get_ivars(dev); int error; + void *buf; + uint16_t len; DPRINTFN(11, "\n"); @@ -700,6 +702,25 @@ uhid_probe(device_t dev) ((uaa->info.bInterfaceProtocol == UIPROTO_MOUSE) && !usb_test_quirk(uaa, UQ_UMS_IGNORE)))) return (ENXIO); + + /* Check for mandatory multitouch usages to give wmt(4) a chance */ + if (!usb_test_quirk(uaa, UQ_WMT_IGNORE)) { + error = usbd_req_get_hid_desc(uaa->device, NULL, + &buf, &len, M_USBDEV, uaa->info.bIfaceIndex); + /* Let HID decscriptor-less devices to be handled at attach */ + if (!error) { + if (hid_locate(buf, len, + HID_USAGE2(HUP_DIGITIZERS, HUD_CONTACT_MAX), + hid_feature, 0, NULL, NULL, NULL) && + hid_locate(buf, len, + HID_USAGE2(HUP_DIGITIZERS, HUD_CONTACTID), + hid_input, 0, NULL, NULL, NULL)) { + free(buf, M_USBDEV); + return (ENXIO); + } + free(buf, M_USBDEV); + } + } return (BUS_PROBE_GENERIC); } Modified: stable/12/sys/dev/usb/input/wmt.c ============================================================================== --- stable/12/sys/dev/usb/input/wmt.c Fri Jan 18 20:35:24 2019 (r343154) +++ stable/12/sys/dev/usb/input/wmt.c Fri Jan 18 20:59:06 2019 (r343155) @@ -856,6 +856,12 @@ wmt_cont_max_parse(struct wmt_softc *sc, const void *r } } +static const STRUCT_USB_HOST_ID wmt_devs[] = { + /* generic HID class w/o boot interface */ + {USB_IFACE_CLASS(UICLASS_HID), + USB_IFACE_SUBCLASS(0),}, +}; + static devclass_t wmt_devclass; static device_method_t wmt_methods[] = { @@ -876,3 +882,4 @@ DRIVER_MODULE(wmt, uhub, wmt_driver, wmt_devclass, NUL MODULE_DEPEND(wmt, usb, 1, 1, 1); MODULE_DEPEND(wmt, evdev, 1, 1, 1); MODULE_VERSION(wmt, 1); +USB_PNP_HOST_INFO(wmt_devs); From owner-svn-src-all@freebsd.org Fri Jan 18 21:00:55 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id B233F14822B1; Fri, 18 Jan 2019 21:00:55 +0000 (UTC) (envelope-from gonzo@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 52EB6733EE; Fri, 18 Jan 2019 21:00:55 +0000 (UTC) (envelope-from gonzo@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4080A7F07; Fri, 18 Jan 2019 21:00:55 +0000 (UTC) (envelope-from gonzo@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x0IL0t0h021782; Fri, 18 Jan 2019 21:00:55 GMT (envelope-from gonzo@FreeBSD.org) Received: (from gonzo@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x0IL0se9021761; Fri, 18 Jan 2019 21:00:54 GMT (envelope-from gonzo@FreeBSD.org) Message-Id: <201901182100.x0IL0se9021761@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gonzo set sender to gonzo@FreeBSD.org using -f From: Oleksandr Tymoshenko Date: Fri, 18 Jan 2019 21:00:54 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r343156 - in head/sys/dev/usb: . quirk X-SVN-Group: head X-SVN-Commit-Author: gonzo X-SVN-Commit-Paths: in head/sys/dev/usb: . quirk X-SVN-Commit-Revision: 343156 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 52EB6733EE X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.97 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_SHORT(-0.98)[-0.976,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_LONG(-1.00)[-0.999,0] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 18 Jan 2019 21:00:55 -0000 Author: gonzo Date: Fri Jan 18 21:00:54 2019 New Revision: 343156 URL: https://svnweb.freebsd.org/changeset/base/343156 Log: [usb] Add HID_IGNORE quirks for multiple UPS devices Without HID_IGNORE quirk enabled these models appear in the system as a uhid devices while NUT (Network UPS Tool) expects them to be ugen. PR: 131521 Submitted by: Naoyuki Tai , John Bayly MFC after: 1 week Modified: head/sys/dev/usb/quirk/usb_quirk.c head/sys/dev/usb/usbdevs Modified: head/sys/dev/usb/quirk/usb_quirk.c ============================================================================== --- head/sys/dev/usb/quirk/usb_quirk.c Fri Jan 18 20:59:06 2019 (r343155) +++ head/sys/dev/usb/quirk/usb_quirk.c Fri Jan 18 21:00:54 2019 (r343156) @@ -110,8 +110,19 @@ static struct usb_quirk_entry usb_quirks[USB_DEV_QUIRK USB_QUIRK(XEROX, WCM15, 0x0000, 0xffff, UQ_BROKEN_BIDIR), /* Devices which should be ignored by uhid */ USB_QUIRK(APC, UPS, 0x0000, 0xffff, UQ_HID_IGNORE), + USB_QUIRK(BELKIN, F6H375USB, 0x0000, 0xffff, UQ_HID_IGNORE), USB_QUIRK(BELKIN, F6C550AVR, 0x0000, 0xffff, UQ_HID_IGNORE), + USB_QUIRK(BELKIN, F6C1250TWRK, 0x0000, 0xffff, UQ_HID_IGNORE), + USB_QUIRK(BELKIN, F6C1500TWRK, 0x0000, 0xffff, UQ_HID_IGNORE), + USB_QUIRK(BELKIN, F6C900UNV, 0x0000, 0xffff, UQ_HID_IGNORE), + USB_QUIRK(BELKIN, F6C100UNV, 0x0000, 0xffff, UQ_HID_IGNORE), + USB_QUIRK(BELKIN, F6C120UNV, 0x0000, 0xffff, UQ_HID_IGNORE), + USB_QUIRK(BELKIN, F6C800UNV, 0x0000, 0xffff, UQ_HID_IGNORE), + USB_QUIRK(BELKIN, F6C1100UNV, 0x0000, 0xffff, UQ_HID_IGNORE), + USB_QUIRK(CYBERPOWER, BC900D, 0x0000, 0xffff, UQ_HID_IGNORE), USB_QUIRK(CYBERPOWER, 1500CAVRLCD, 0x0000, 0xffff, UQ_HID_IGNORE), + USB_QUIRK(CYBERPOWER, OR2200LCDRM2U, 0x0000, 0xffff, UQ_HID_IGNORE), + USB_QUIRK(DELL2, VARIOUS_UPS, 0x0000, 0xffff, UQ_HID_IGNORE), USB_QUIRK(CYPRESS, SILVERSHIELD, 0x0000, 0xffff, UQ_HID_IGNORE), USB_QUIRK(DELORME, EARTHMATE, 0x0000, 0xffff, UQ_HID_IGNORE), USB_QUIRK(DREAMLINK, DL100B, 0x0000, 0xffff, UQ_HID_IGNORE), @@ -119,8 +130,26 @@ static struct usb_quirk_entry usb_quirks[USB_DEV_QUIRK USB_QUIRK(ITUNERNET, USBLCD4X20, 0x0000, 0xffff, UQ_HID_IGNORE), USB_QUIRK(LIEBERT, POWERSURE_PXT, 0x0000, 0xffff, UQ_HID_IGNORE), USB_QUIRK(LIEBERT2, PSI1000, 0x0000, 0xffff, UQ_HID_IGNORE), + USB_QUIRK(LIEBERT2, POWERSURE_PSA, 0x0000, 0xffff, UQ_HID_IGNORE), USB_QUIRK(MGE, UPS1, 0x0000, 0xffff, UQ_HID_IGNORE), USB_QUIRK(MGE, UPS2, 0x0000, 0xffff, UQ_HID_IGNORE), + USB_QUIRK(POWERCOM, IMPERIAL_SERIES, 0x0000, 0xffff, UQ_HID_IGNORE), + USB_QUIRK(POWERCOM, SMART_KING_PRO, 0x0000, 0xffff, UQ_HID_IGNORE), + USB_QUIRK(POWERCOM, WOW, 0x0000, 0xffff, UQ_HID_IGNORE), + USB_QUIRK(POWERCOM, VANGUARD, 0x0000, 0xffff, UQ_HID_IGNORE), + USB_QUIRK(POWERCOM, BLACK_KNIGHT_PRO, 0x0000, 0xffff, UQ_HID_IGNORE), + USB_QUIRK(TRIPPLITE2, AVR550U, 0x0000, 0xffff, UQ_HID_IGNORE), + USB_QUIRK(TRIPPLITE2, AVR750U, 0x0000, 0xffff, UQ_HID_IGNORE), + USB_QUIRK(TRIPPLITE2, ECO550UPS, 0x0000, 0xffff, UQ_HID_IGNORE), + USB_QUIRK(TRIPPLITE2, T750_INTL, 0x0000, 0xffff, UQ_HID_IGNORE), + USB_QUIRK(TRIPPLITE2, RT_2200_INTL, 0x0000, 0xffff, UQ_HID_IGNORE), + USB_QUIRK(TRIPPLITE2, OMNI1000LCD, 0x0000, 0xffff, UQ_HID_IGNORE), + USB_QUIRK(TRIPPLITE2, OMNI900LCD, 0x0000, 0xffff, UQ_HID_IGNORE), + USB_QUIRK(TRIPPLITE2, SMART_2200RMXL2U, 0x0000, 0xffff, UQ_HID_IGNORE), + USB_QUIRK(TRIPPLITE2, UPS_3014, 0x0000, 0xffff, UQ_HID_IGNORE), + USB_QUIRK(TRIPPLITE2, SU1500RTXL2UA, 0x0000, 0xffff, UQ_HID_IGNORE), + USB_QUIRK(TRIPPLITE2, SU6000RT4U, 0x0000, 0xffff, UQ_HID_IGNORE), + USB_QUIRK(TRIPPLITE2, SU1500RTXL2UA_2, 0x0000, 0xffff, UQ_HID_IGNORE), USB_QUIRK(APPLE, IPHONE, 0x0000, 0xffff, UQ_HID_IGNORE), USB_QUIRK(APPLE, IPHONE_3G, 0x0000, 0xffff, UQ_HID_IGNORE), USB_QUIRK(MEGATEC, UPS, 0x0000, 0xffff, UQ_HID_IGNORE), Modified: head/sys/dev/usb/usbdevs ============================================================================== --- head/sys/dev/usb/usbdevs Fri Jan 18 20:59:06 2019 (r343155) +++ head/sys/dev/usb/usbdevs Fri Jan 18 21:00:54 2019 (r343156) @@ -140,6 +140,7 @@ vendor SANYO 0x0474 Sanyo Electric vendor SEAGATE 0x0477 Seagate vendor CONNECTIX 0x0478 Connectix vendor SEMTECH 0x047a Semtech +vendor DELL2 0x047c Dell vendor KENSINGTON 0x047d Kensington vendor LUCENT 0x047e Lucent vendor PLANTRONICS 0x047f Plantronics @@ -554,6 +555,7 @@ vendor ACDC 0x0d7e American Computer & Digital Compon vendor CMEDIA 0x0d8c CMEDIA vendor CONCEPTRONIC 0x0d8e Conceptronic vendor SKANHEX 0x0d96 Skanhex Technology, Inc. +vendor POWERCOM 0x0d9f PowerCOM vendor MSI 0x0db0 Micro Star International vendor ELCON 0x0db7 ELCON Systemtechnik vendor UNKNOWN4 0x0dcd Unknown vendor @@ -1366,8 +1368,16 @@ product BELKIN USB2LAN 0x0121 USB to LAN product BELKIN F5U208 0x0208 F5U208 VideoBus II product BELKIN F5U237 0x0237 F5U237 USB 2.0 7-Port Hub product BELKIN F5U257 0x0257 F5U257 Serial +product BELKIN F6H375USB 0x0375 F6H375-USB product BELKIN F5U409 0x0409 F5U409 Serial product BELKIN F6C550AVR 0x0551 F6C550-AVR UPS +product BELKIN F6C1250TWRK 0x0750 F6C1250-TW-RK +product BELKIN F6C1500TWRK 0x0751 F6C1500-TW-RK +product BELKIN F6C900UNV 0x0900 F6C900-UNV +product BELKIN F6C100UNV 0x0910 F6C100-UNV +product BELKIN F6C120UNV 0x0912 F6C120-UNV UPS +product BELKIN F6C800UNV 0x0980 F6C800-UNV +product BELKIN F6C1100UNV 0x1100 F6C1100-UNV, F6C1200-UNV product BELKIN F5U120 0x1203 F5U120-PC Hub product BELKIN RTL8188CU 0x1102 RTL8188CU Wireless Adapter product BELKIN F9L1103 0x1103 F9L1103 Wireless Adapter @@ -1601,7 +1611,9 @@ product CURITEL UM150 0x3711 EVDO modem product CURITEL UM175 0x3714 EVDO modem /* CyberPower products */ -product CYBERPOWER 1500CAVRLCD 0x0501 1500CAVRLCD +product CYBERPOWER BC900D 0x0005 900AVR/BC900D, CP1200AVR/BC1200D +product CYBERPOWER 1500CAVRLCD 0x0501 1500CAVRLCD +product CYBERPOWER OR2200LCDRM2U 0x0601 OR2200LCDRM2U /* CyberTAN Technology products */ product CYBERTAN TG54USB 0x1666 TG54USB @@ -1653,6 +1665,7 @@ product DELL U5730 0x8180 Dell 5730 3G product DELL U5730_2 0x8181 Dell 5730 3G product DELL U5730_3 0x8182 Dell 5730 3G product DELL DW700 0x9500 Dell DW700 GPS +product DELL2 VARIOUS_UPS 0xffff Various UPS Models /* Delorme Paublishing products */ product DELORME EARTHMATE 0x0100 Earthmate GPS @@ -2401,6 +2414,8 @@ product HP 930C 0x1204 DeskJet 930c product HP3 RTL8188CU 0x1629 RTL8188CU product HP P2000U 0x1801 Inkjet P-2000U product HP HS2300 0x1e1d HS2300 HSDPA (aka MC8775) +product HP T500 0x1f01 T500 +product HP T750 0x1f02 T750 product HP 640C 0x2004 DeskJet 640c product HP 4670V 0x3005 ScanJet 4670v product HP P1100 0x3102 Photosmart P1100 @@ -2777,6 +2792,7 @@ product LEXMARK S2450 0x0009 Optra S 2450 /* Liebert products */ product LIEBERT POWERSURE_PXT 0xffff PowerSure Personal XT +product LIEBERT2 POWERSURE_PSA 0x0001 PowerSure PSA UPS product LIEBERT2 PSI1000 0x0004 UPS PSI 1000 FW:08 /* Link Instruments Inc. products */ @@ -3702,6 +3718,13 @@ product PLOYTEC SPL_CRIMSON_1 0xc150 SPL Crimson Revis product PLX TESTBOARD 0x9060 test board product PLX CA42 0xac70 CA-42 +/* PowerCOM products */ +product POWERCOM IMPERIAL_SERIES 0x00a2 IMPERIAL Series +product POWERCOM SMART_KING_PRO 0x00a3 Smart KING Pro +product POWERCOM WOW 0x00a4 WOW +product POWERCOM VANGUARD 0x00a5 Vanguard +product POWERCOM BLACK_KNIGHT_PRO 0x00a6 Black Knight Pro + /* PNY products */ product PNY ATTACHE2 0x0010 USB 2.0 Flash Drive @@ -4642,7 +4665,20 @@ product TRENDNET RTL8188CU 0x648b RTL8188CU product TRENDNET TEW805UB 0x805b TEW-805UB /* Tripp-Lite products */ -product TRIPPLITE U209 0x2008 Serial +product TRIPPLITE U209 0x2008 Serial +product TRIPPLITE2 OMNIVS1000 0x0001 OMNIVS1000, SMART550USB +product TRIPPLITE2 AVR550U 0x1003 AVR550U +product TRIPPLITE2 AVR750U 0x1007 AVR750U +product TRIPPLITE2 ECO550UPS 0x1008 ECO550UPS +product TRIPPLITE2 T750_INTL 0x1f06 T750 INTL +product TRIPPLITE2 RT_2200_INTL 0x1f0a R/T 2200 INTL +product TRIPPLITE2 OMNI1000LCD 0x2005 OMNI1000LCD +product TRIPPLITE2 OMNI900LCD 0x2007 OMNI900LCD +product TRIPPLITE2 SMART_2200RMXL2U 0x3012 smart2200RMXL2U +product TRIPPLITE2 UPS_3014 0x3014 Unknown UPS +product TRIPPLITE2 SU1500RTXL2UA 0x4001 SmartOnline SU1500RTXL2UA +product TRIPPLITE2 SU6000RT4U 0x4002 SmartOnline SU6000RT4U +product TRIPPLITE2 SU1500RTXL2UA_2 0x4003 SmartOnline SU1500RTXL2UA /* Trumpion products */ product TRUMPION T33520 0x1001 T33520 USB Flash Card Controller From owner-svn-src-all@freebsd.org Fri Jan 18 21:11:04 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id DECDE148289B; Fri, 18 Jan 2019 21:11:03 +0000 (UTC) (envelope-from wulf@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 6330473BE7; Fri, 18 Jan 2019 21:11:03 +0000 (UTC) (envelope-from wulf@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1: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 552EC8100; Fri, 18 Jan 2019 21:11:03 +0000 (UTC) (envelope-from wulf@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x0ILB3MB024080; Fri, 18 Jan 2019 21:11:03 GMT (envelope-from wulf@FreeBSD.org) Received: (from wulf@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x0ILB2RH024078; Fri, 18 Jan 2019 21:11:02 GMT (envelope-from wulf@FreeBSD.org) Message-Id: <201901182111.x0ILB2RH024078@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: wulf set sender to wulf@FreeBSD.org using -f From: Vladimir Kondratyev Date: Fri, 18 Jan 2019 21:11: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: r343157 - stable/12/sys/dev/atkbdc X-SVN-Group: stable-12 X-SVN-Commit-Author: wulf X-SVN-Commit-Paths: stable/12/sys/dev/atkbdc X-SVN-Commit-Revision: 343157 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 6330473BE7 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.97 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_SHORT(-0.97)[-0.972,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_LONG(-1.00)[-0.999,0] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 18 Jan 2019 21:11:04 -0000 Author: wulf Date: Fri Jan 18 21:11:02 2019 New Revision: 343157 URL: https://svnweb.freebsd.org/changeset/base/343157 Log: MFC r340912,r340913: psm(4): Revert r328640 and add minimal support for active AUX port multiplexers Active PS/2 multiplexing is a method for attaching up to four PS/2 pointing devices to a computer. Enabling of multiplexed mode allows commands to be directed to individual devices using routing prefixes. Multiplexed mode reports input with each byte tagged to identify its source. This method differs from one currently supported by psm(4) where so called guest device (trackpoint) is attached to special interface located on the host device (touchpad) and latter performs guest protocol conversion to special encapsulation packet format. At present time active PS/2 multiplexing is used in some models of HP laptops e.g. EliteBook 8560w, 9470m. Enabling of absolute operation mode on such touchpads is connected with following problems: 1. Touchpad's port priority is lower than trackpoint's. That blocks information queries thus prevents touchpad detection and configuration. 2. Touchpad and trackpoint have different protocol packet sizes and sync bytes. As PS/2 usage is on decline only minimal possible set of changes to support Synaptics touchpad and generic mouses is implemented. Active multiplexing mode is enabled only at probe stage to scan through attached PS/2 devices to query and configure Synaptics touchpad. After touchpad has been configured, mux is switched back to legacy (hidden multiplexing) mode to perform normal interrupt-driven input data processing. Overflow bit values rather than tags are used to separate packets produced by different devices. Switching back to legacy mode allows to avoid psm(4) and atkbd(4) rework to support 4 instances of mouse driver. Note: While in hidden multiplexing mode KBC does some editing of the packet stream. It remembers the button bits from the last packet received from each device, and replaces the button bits of every packet with the logical OR of all devices’ most recent button bits. This sort of button crosstalk results in spurious button events which are inhibitted with various tricks. E.g. trackpoint middle button events are suppressed while trackpad surface is touched and touchpad left and right button events are suppressed if corresponding trackpoint buttons are pressed. PR: 231058 Reported by: Michael Figiel Tested by: Michael Figiel Modified: stable/12/sys/dev/atkbdc/atkbdc.c stable/12/sys/dev/atkbdc/atkbdcreg.h stable/12/sys/dev/atkbdc/psm.c Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/dev/atkbdc/atkbdc.c ============================================================================== --- stable/12/sys/dev/atkbdc/atkbdc.c Fri Jan 18 21:00:54 2019 (r343156) +++ stable/12/sys/dev/atkbdc/atkbdc.c Fri Jan 18 21:11:02 2019 (r343157) @@ -296,6 +296,7 @@ atkbdc_setup(atkbdc_softc_t *sc, bus_space_tag_t tag, sc->lock = FALSE; sc->kbd.head = sc->kbd.tail = 0; sc->aux.head = sc->aux.tail = 0; + sc->aux_mux_enabled = FALSE; #if KBDIO_DEBUG >= 2 sc->kbd.call_count = 0; sc->kbd.qcount = sc->kbd.max_qcount = 0; @@ -639,7 +640,12 @@ write_kbd_command(KBDC p, int c) int write_aux_command(KBDC p, int c) { - if (!write_controller_command(p, KBDC_WRITE_TO_AUX)) + int f; + + f = aux_mux_is_enabled(p) ? + KBDC_WRITE_TO_AUX_MUX + kbdcp(p)->aux_mux_port : KBDC_WRITE_TO_AUX; + + if (!write_controller_command(p, f)) return FALSE; return write_controller_data(p, c); } @@ -1200,4 +1206,79 @@ set_controller_command_byte(KBDC p, int mask, int comm command); return TRUE; +} + +/* + * Rudimentary support for active PS/2 AUX port multiplexing. + * Only write commands can be routed to a selected AUX port. + * Source port of data processed by read commands is totally ignored. + */ +static int +set_aux_mux_state(KBDC p, int enabled) +{ + int command, version; + + if (write_controller_command(p, KBDC_FORCE_AUX_OUTPUT) == 0 || + write_controller_data(p, 0xF0) == 0 || + read_controller_data(p) != 0xF0) + return (-1); + + if (write_controller_command(p, KBDC_FORCE_AUX_OUTPUT) == 0 || + write_controller_data(p, 0x56) == 0 || + read_controller_data(p) != 0x56) + return (-1); + + command = enabled ? 0xa4 : 0xa5; + if (write_controller_command(p, KBDC_FORCE_AUX_OUTPUT) == 0 || + write_controller_data(p, command) == 0 || + (version = read_controller_data(p)) == command) + return (-1); + + return (version); +} + +int +set_active_aux_mux_port(KBDC p, int port) +{ + + if (!aux_mux_is_enabled(p)) + return (FALSE); + + if (port < 0 || port >= KBDC_AUX_MUX_NUM_PORTS) + return (FALSE); + + kbdcp(p)->aux_mux_port = port; + + return (TRUE); +} + +/* Checks for active multiplexing support and enables it */ +int +enable_aux_mux(KBDC p) +{ + int version; + + version = set_aux_mux_state(p, TRUE); + if (version >= 0) { + kbdcp(p)->aux_mux_enabled = TRUE; + set_active_aux_mux_port(p, 0); + } + + return (version); +} + +int +disable_aux_mux(KBDC p) +{ + + kbdcp(p)->aux_mux_enabled = FALSE; + + return (set_aux_mux_state(p, FALSE)); +} + +int +aux_mux_is_enabled(KBDC p) +{ + + return (kbdcp(p)->aux_mux_enabled); } Modified: stable/12/sys/dev/atkbdc/atkbdcreg.h ============================================================================== --- stable/12/sys/dev/atkbdc/atkbdcreg.h Fri Jan 18 21:00:54 2019 (r343156) +++ stable/12/sys/dev/atkbdc/atkbdcreg.h Fri Jan 18 21:11:02 2019 (r343157) @@ -51,6 +51,8 @@ /* controller commands (sent to KBD_COMMAND_PORT) */ #define KBDC_SET_COMMAND_BYTE 0x0060 #define KBDC_GET_COMMAND_BYTE 0x0020 +#define KBDC_WRITE_TO_AUX_MUX 0x0090 +#define KBDC_FORCE_AUX_OUTPUT 0x00d3 #define KBDC_WRITE_TO_AUX 0x00d4 #define KBDC_DISABLE_AUX_PORT 0x00a7 #define KBDC_ENABLE_AUX_PORT 0x00a8 @@ -209,6 +211,8 @@ typedef struct atkbdc_softc { #define KBDC_QUIRK_IGNORE_PROBE_RESULT (1 << 1) #define KBDC_QUIRK_RESET_AFTER_PROBE (1 << 2) #define KBDC_QUIRK_SETLEDS_ON_INIT (1 << 3) + int aux_mux_enabled; /* active PS/2 multiplexing is enabled */ + int aux_mux_port; /* current aux mux port */ } atkbdc_softc_t; enum kbdc_device_ivar { @@ -223,6 +227,8 @@ typedef caddr_t KBDC; #define KBDC_RID_KBD 0 #define KBDC_RID_AUX 1 +#define KBDC_AUX_MUX_NUM_PORTS 4 + /* function prototypes */ atkbdc_softc_t *atkbdc_get_softc(int unit); @@ -267,6 +273,11 @@ void kbdc_set_device_mask(KBDC kbdc, int mask); int get_controller_command_byte(KBDC kbdc); int set_controller_command_byte(KBDC kbdc, int command, int flag); + +int set_active_aux_mux_port(KBDC p, int port); +int enable_aux_mux(KBDC p); +int disable_aux_mux(KBDC p); +int aux_mux_is_enabled(KBDC p); #endif /* _KERNEL */ Modified: stable/12/sys/dev/atkbdc/psm.c ============================================================================== --- stable/12/sys/dev/atkbdc/psm.c Fri Jan 18 21:00:54 2019 (r343156) +++ stable/12/sys/dev/atkbdc/psm.c Fri Jan 18 21:11:02 2019 (r343157) @@ -136,7 +136,6 @@ struct psmcpnp_softc { enum { PSMCPNP_GENERIC, PSMCPNP_FORCEPAD, - PSMCPNP_HPSYN81, } type; /* Based on PnP ID */ }; @@ -151,6 +150,9 @@ struct psmcpnp_softc { #define PSM_LEVEL_MIN PSM_LEVEL_BASE #define PSM_LEVEL_MAX PSM_LEVEL_NATIVE +/* Active PS/2 multiplexing */ +#define PSM_NOMUX (-1) + /* Logitech PS2++ protocol */ #define MOUSE_PS2PLUS_CHECKBITS(b) \ ((((b[2] & 0x03) << 2) | 0x02) == (b[1] & 0x0f)) @@ -175,15 +177,6 @@ typedef struct packetbuf { #define PSM_PACKETQUEUE 128 #endif -/* - * Typical bezel limits. Taken from 'Synaptics - * PS/2 TouchPad Interfacing Guide' p.3.2.3. - */ -#define SYNAPTICS_DEFAULT_MAX_X 5472 -#define SYNAPTICS_DEFAULT_MAX_Y 4448 -#define SYNAPTICS_DEFAULT_MIN_X 1472 -#define SYNAPTICS_DEFAULT_MIN_Y 1408 - typedef struct synapticsinfo { struct sysctl_ctx_list sysctl_ctx; struct sysctl_oid *sysctl_tree; @@ -448,6 +441,11 @@ struct psm_softc { /* Driver status information */ int cmdcount; struct sigio *async; /* Processes waiting for SIGIO */ int extended_buttons; + int muxport; /* MUX port with attached Synaptics */ + u_char muxsave[3]; /* 3->6 byte proto conversion buffer */ + int muxtpbuttons; /* Touchpad button state */ + int muxmsbuttons; /* Mouse (trackpoint) button state */ + struct timeval muxmidtimeout; /* middle button supression timeout */ #ifdef EVDEV_SUPPORT struct evdev_dev *evdev_a; /* Absolute reporting device */ struct evdev_dev *evdev_r; /* Relative reporting device */ @@ -613,6 +611,7 @@ static void proc_mmanplus(struct psm_softc *, packetbu mousestatus_t *, int *, int *, int *); static int proc_synaptics(struct psm_softc *, packetbuf_t *, mousestatus_t *, int *, int *, int *); +static int proc_synaptics_mux(struct psm_softc *, packetbuf_t *); static void proc_versapad(struct psm_softc *, packetbuf_t *, mousestatus_t *, int *, int *, int *); static int proc_elantech(struct psm_softc *, packetbuf_t *, @@ -642,6 +641,7 @@ static probefunc_t enable_4dmouse; static probefunc_t enable_4dplus; static probefunc_t enable_mmanplus; static probefunc_t enable_synaptics; +static probefunc_t enable_synaptics_mux; static probefunc_t enable_trackpoint; static probefunc_t enable_versapad; static probefunc_t enable_elantech; @@ -662,6 +662,8 @@ static struct { * WARNING: the order of probe is very important. Don't mess it * unless you know what you are doing. */ + { MOUSE_MODEL_SYNAPTICS, /* Synaptics Touchpad on Active Mux */ + 0x00, MOUSE_PS2_PACKETSIZE, enable_synaptics_mux }, { MOUSE_MODEL_NET, /* Genius NetMouse */ 0x08, MOUSE_PS2INTELLI_PACKETSIZE, enable_gmouse }, { MOUSE_MODEL_NETSCROLL, /* Genius NetScroll */ @@ -1092,6 +1094,7 @@ static int doopen(struct psm_softc *sc, int command_byte) { int stat[3]; + int mux_enabled = FALSE; /* * FIXME: Synaptics TouchPad seems to go back to Relative Mode with @@ -1106,16 +1109,27 @@ doopen(struct psm_softc *sc, int command_byte) * doesn't show any evidence of such a command. */ if (sc->hw.model == MOUSE_MODEL_SYNAPTICS) { + if (sc->muxport != PSM_NOMUX) { + mux_enabled = enable_aux_mux(sc->kbdc) >= 0; + if (mux_enabled) + set_active_aux_mux_port(sc->kbdc, sc->muxport); + else + log(LOG_ERR, "psm%d: failed to enable " + "active multiplexing mode.\n", + sc->unit); + } mouse_ext_command(sc->kbdc, 1); get_mouse_status(sc->kbdc, stat, 0, 3); if ((SYNAPTICS_VERSION_GE(sc->synhw, 7, 5) || - stat[1] == 0x46 || stat[1] == 0x47) && + stat[1] == 0x47) && stat[2] == 0x40) { synaptics_set_mode(sc, synaptics_preferred_mode(sc)); VLOG(5, (LOG_DEBUG, "psm%d: Synaptis Absolute Mode " "hopefully restored\n", sc->unit)); } + if (mux_enabled) + disable_aux_mux(sc->kbdc); } /* @@ -1364,6 +1378,7 @@ psmprobe(device_t dev) #endif #endif /* PSM_HOOKRESUME | PSM_HOOKAPM */ sc->flags = 0; + sc->muxport = PSM_NOMUX; if (bootverbose) ++verbose; @@ -1833,7 +1848,7 @@ psm_register_synaptics(device_t dev) evdev_support_key(evdev_a, BTN_0 + i); error = evdev_register_mtx(evdev_a, &Giant); - if (!error && sc->synhw.capPassthrough) { + if (!error && (sc->synhw.capPassthrough || sc->muxport != PSM_NOMUX)) { guest_model = sc->tpinfo.sysctl_tree != NULL ? MOUSE_MODEL_TRACKPOINT : MOUSE_MODEL_GENERIC; error = psm_register(dev, guest_model); @@ -2941,6 +2956,9 @@ psmintr(void *arg) int c; packetbuf_t *pb; + if (aux_mux_is_enabled(sc->kbdc)) + VLOG(2, (LOG_DEBUG, "psmintr: active multiplexing mode is not " + "supported!\n")); /* read until there is nothing to read */ while((c = read_aux_data_no_wait(sc->kbdc)) != -1) { @@ -3292,7 +3310,7 @@ proc_synaptics(struct psm_softc *sc, packetbuf_t *pb, * Handle packets from the guest device. See: * Synaptics PS/2 TouchPad Interfacing Guide, Section 5.1 */ - if (sc->synhw.capPassthrough) { + if (sc->synhw.capPassthrough || sc->muxport != PSM_NOMUX) { *x = ((pb->ipacket[1] & 0x10) ? pb->ipacket[4] - 256 : pb->ipacket[4]); *y = ((pb->ipacket[1] & 0x20) ? @@ -3592,6 +3610,83 @@ SYNAPTICS_END: } static int +proc_synaptics_mux(struct psm_softc *sc, packetbuf_t *pb) +{ + int butt; + + /* + * Convert 3-byte interleaved mixture of Synaptics and generic mouse + * packets into plain 6-byte Synaptics packet protocol. + * While in hidden multiplexing mode KBC does some editing of the + * packet stream. It remembers the button bits from the last packet + * received from each device, and replaces the button bits of every + * packet with the logical OR of all devices’ most recent button bits. + * This button crosstalk should be filtered out as Synaptics and + * generic mouse encode middle button presses in a different way. + */ + switch (pb->ipacket[0] & 0xc0) { + case 0x80: /* First 3 bytes of Synaptics packet */ + bcopy(pb->ipacket, sc->muxsave, 3); + /* Compute middle mouse button supression timeout. */ + sc->muxmidtimeout.tv_sec = 0; + sc->muxmidtimeout.tv_usec = 50000; /* ~2-3 ints */ + timevaladd(&sc->muxmidtimeout, &sc->lastsoftintr); + return (1); + + case 0xc0: /* Second 3 bytes of Synaptics packet */ + /* Join two 3-bytes absolute packets */ + bcopy(pb->ipacket, pb->ipacket + 3, 3); + bcopy(sc->muxsave, pb->ipacket, 3); + /* Prefer trackpoint buttons over touchpad's */ + pb->ipacket[0] &= ~(0x08 | sc->muxmsbuttons); + pb->ipacket[3] &= ~(0x08 | sc->muxmsbuttons); + butt = (pb->ipacket[3] & 0x03) << 2 | (pb->ipacket[0] & 0x03); + /* Add hysteresis to remove spurious middle button events */ + if (butt != sc->muxtpbuttons && sc->fpcount < 1) { + pb->ipacket[0] &= 0xfc; + pb->ipacket[0] |= sc->muxtpbuttons & 0x03; + pb->ipacket[3] &= 0xfc; + pb->ipacket[3] |= sc->muxtpbuttons >> 2 & 0x03; + ++sc->fpcount; + } else { + sc->fpcount = 0; + sc->muxtpbuttons = butt; + } + /* Filter out impossible w induced by middle trackpoint btn */ + if (sc->synhw.capExtended && !sc->synhw.capPassthrough && + (pb->ipacket[0] & 0x34) == 0x04 && + (pb->ipacket[3] & 0x04) == 0x04) { + pb->ipacket[0] &= 0xfb; + pb->ipacket[3] &= 0xfb; + } + sc->muxsave[0] &= 0x30; + break; + + default: /* Generic mouse (Trackpoint) packet */ + /* Filter out middle button events induced by some w values */ + if (sc->muxmsbuttons & 0x03 || pb->ipacket[0] & 0x03 || + (timevalcmp(&sc->lastsoftintr, &sc->muxmidtimeout, <=) && + (sc->muxsave[0] & 0x30 || sc->muxsave[2] > 8))) + pb->ipacket[0] &= 0xfb; + sc->muxmsbuttons = pb->ipacket[0] & 0x07; + /* Convert to Synaptics pass-through protocol */ + pb->ipacket[4] = pb->ipacket[1]; + pb->ipacket[5] = pb->ipacket[2]; + pb->ipacket[1] = pb->ipacket[0]; + pb->ipacket[2] = 0; + pb->ipacket[0] = 0x84 | (sc->muxtpbuttons & 0x03); + pb->ipacket[3] = 0xc4 | (sc->muxtpbuttons >> 2 & 0x03); + } + + VLOG(4, (LOG_DEBUG, "synaptics: %02x %02x %02x %02x %02x %02x\n", + pb->ipacket[0], pb->ipacket[1], pb->ipacket[2], + pb->ipacket[3], pb->ipacket[4], pb->ipacket[5])); + + pb->inputbytes = MOUSE_SYNAPTICS_PACKETSIZE; + return (0); +} + +static int psmpalmdetect(struct psm_softc *sc, finger_t *f, int nfingers) { if (!( @@ -4929,6 +5024,10 @@ psmsoftintr(void *arg) break; case MOUSE_MODEL_SYNAPTICS: + if (pb->inputbytes == MOUSE_PS2_PACKETSIZE) + if (proc_synaptics_mux(sc, pb)) + goto next; + if (proc_synaptics(sc, pb, &ms, &x, &y, &z) != 0) { VLOG(3, (LOG_DEBUG, "synaptics: " "packet rejected\n")); @@ -6039,7 +6138,61 @@ synaptics_set_mode(struct psm_softc *sc, int mode_byte } } +/* + * AUX MUX detection code should be placed at very beginning of probe sequence + * at least before 4-byte protocol mouse probes e.g. MS IntelliMouse probe as + * latter can trigger switching the MUX to incompatible state. + */ static int +enable_synaptics_mux(struct psm_softc *sc, enum probearg arg) +{ + KBDC kbdc = sc->kbdc; + int port, version; + int probe = FALSE; + int active_ports_count = 0; + int active_ports_mask = 0; + + version = enable_aux_mux(kbdc); + if (version == -1) + return (FALSE); + + for (port = 0; port < KBDC_AUX_MUX_NUM_PORTS; port++) { + VLOG(3, (LOG_DEBUG, "aux_mux: ping port %d\n", port)); + set_active_aux_mux_port(kbdc, port); + if (enable_aux_dev(kbdc) && disable_aux_dev(kbdc)) { + active_ports_count++; + active_ports_mask |= 1 << port; + } + } + + if (verbose >= 2) + printf("Active Multiplexing PS/2 controller v%d.%d with %d " + "active port(s)\n", version >> 4 & 0x0f, version & 0x0f, + active_ports_count); + + /* psm has a special support for GenMouse + SynTouchpad combination */ + if (active_ports_count >= 2) { + for (port = 0; port < KBDC_AUX_MUX_NUM_PORTS; port++) { + if ((active_ports_mask & 1 << port) == 0) + continue; + VLOG(3, (LOG_DEBUG, "aux_mux: probe port %d\n", port)); + set_active_aux_mux_port(kbdc, port); + probe = enable_synaptics(sc, arg); + if (probe) { + if (arg == PROBE) + sc->muxport = port; + break; + } + } + } + + /* IRQ handler does not support active multiplexing mode */ + disable_aux_mux(kbdc); + + return (probe); +} + +static int enable_synaptics(struct psm_softc *sc, enum probearg arg) { device_t psmcpnp; @@ -6047,7 +6200,7 @@ enable_synaptics(struct psm_softc *sc, enum probearg a KBDC kbdc = sc->kbdc; synapticshw_t synhw; int status[3]; - int buttons, middle_byte; + int buttons; VLOG(3, (LOG_DEBUG, "synaptics: BEGIN init\n")); @@ -6064,8 +6217,7 @@ enable_synaptics(struct psm_softc *sc, enum probearg a return (FALSE); if (get_mouse_status(kbdc, status, 0, 3) != 3) return (FALSE); - middle_byte = status[1]; - if (middle_byte != 0x46 && middle_byte != 0x47) + if (status[1] != 0x47) return (FALSE); bzero(&synhw, sizeof(synhw)); @@ -6076,15 +6228,7 @@ enable_synaptics(struct psm_softc *sc, enum probearg a printf("Synaptics Touchpad v%d.%d\n", synhw.infoMajor, synhw.infoMinor); - /* - * Most synaptics touchpads return 0x47 in middle byte in responce to - * identify command as stated in p.4.4 of "Synaptics PS/2 TouchPad - * Interfacing Guide" and we only support v4.0 or better. But some - * devices return 0x46 here and have a different numbering scheme. - * In the case of 0x46, we allow versions as low as v2.0 - */ - if ((middle_byte == 0x47 && synhw.infoMajor < 4) || - (middle_byte == 0x46 && synhw.infoMajor < 2)) { + if (synhw.infoMajor < 4) { printf(" Unsupported (pre-v4) Touchpad detected\n"); return (FALSE); } @@ -6125,7 +6269,7 @@ enable_synaptics(struct psm_softc *sc, enum probearg a return (FALSE); if (get_mouse_status(kbdc, status, 0, 3) != 3) return (FALSE); - if (!SYNAPTICS_VERSION_GE(synhw, 7, 5) && status[1] != middle_byte) { + if (!SYNAPTICS_VERSION_GE(synhw, 7, 5) && status[1] != 0x47) { printf(" Failed to read extended capability bits\n"); return (FALSE); } @@ -6134,29 +6278,10 @@ enable_synaptics(struct psm_softc *sc, enum probearg a sc->unit); psmcpnp_sc = (psmcpnp != NULL) ? device_get_softc(psmcpnp) : NULL; - /* - * Set conservative defaults for 0x46 middle byte touchpads - * as ExtendedQueries return bogus data. - */ - if (middle_byte == 0x46) { - synhw.capExtended = 1; - synhw.capPalmDetect = 1; - synhw.capPassthrough = 1; - synhw.capMultiFinger = 1; - synhw.maximumXCoord = SYNAPTICS_DEFAULT_MAX_X; - synhw.maximumYCoord = SYNAPTICS_DEFAULT_MAX_Y; - synhw.minimumXCoord = SYNAPTICS_DEFAULT_MIN_X; - synhw.minimumYCoord = SYNAPTICS_DEFAULT_MIN_Y; - /* Enable multitouch mode for HW v8.1 devices */ - if (psmcpnp_sc != NULL && - psmcpnp_sc->type == PSMCPNP_HPSYN81) - synhw.capReportsV = 1; - } else - synhw.capExtended = (status[0] & 0x80) != 0; - /* Set the different capabilities when they exist. */ buttons = 0; - if (synhw.capExtended && middle_byte == 0x47) { + synhw.capExtended = (status[0] & 0x80) != 0; + if (synhw.capExtended) { synhw.nExtendedQueries = (status[0] & 0x70) >> 4; synhw.capMiddle = (status[0] & 0x04) != 0; synhw.capPassthrough = (status[2] & 0x80) != 0; @@ -6278,8 +6403,12 @@ enable_synaptics(struct psm_softc *sc, enum probearg a synhw.maximumYCoord = (status[2] << 5) | ((status[1] & 0xf0) >> 3); } else { - synhw.maximumXCoord = SYNAPTICS_DEFAULT_MAX_X; - synhw.maximumYCoord = SYNAPTICS_DEFAULT_MAX_Y; + /* + * Typical bezel limits. Taken from 'Synaptics + * PS/2 * TouchPad Interfacing Guide' p.3.2.3. + */ + synhw.maximumXCoord = 5472; + synhw.maximumYCoord = 4448; } if (synhw.capReportsMin) { @@ -6295,8 +6424,12 @@ enable_synaptics(struct psm_softc *sc, enum probearg a synhw.minimumYCoord = (status[2] << 5) | ((status[1] & 0xf0) >> 3); } else { - synhw.minimumXCoord = SYNAPTICS_DEFAULT_MIN_X; - synhw.minimumYCoord = SYNAPTICS_DEFAULT_MIN_Y; + /* + * Typical bezel limits. Taken from 'Synaptics + * PS/2 * TouchPad Interfacing Guide' p.3.2.3. + */ + synhw.minimumXCoord = 1472; + synhw.minimumYCoord = 1408; } /* @@ -6382,7 +6515,7 @@ enable_synaptics(struct psm_softc *sc, enum probearg a return (FALSE); if (get_mouse_status(kbdc, status, 0, 3) != 3) return (FALSE); - if (!SYNAPTICS_VERSION_GE(synhw, 7, 5) && status[1] != middle_byte) { + if (!SYNAPTICS_VERSION_GE(synhw, 7, 5) && status[1] != 0x47) { printf(" Failed to read mode byte\n"); return (FALSE); } @@ -7205,12 +7338,6 @@ static struct isa_pnp_id forcepad_ids[] = { { 0 } }; -/* List of HW v8.1 synaptics touchpads erroneously detected as HW v2.0 */ -static struct isa_pnp_id hpsyn81_ids[] = { - { 0x9e012e4f, "HP PS/2 trackpad port" }, /* SYN019E, EB 9470 */ - { 0 } -}; - static int create_a_copy(device_t atkbdc, device_t me) { @@ -7244,8 +7371,6 @@ psmcpnp_probe(device_t dev) if (ISA_PNP_PROBE(device_get_parent(dev), dev, forcepad_ids) == 0) sc->type = PSMCPNP_FORCEPAD; - else if(ISA_PNP_PROBE(device_get_parent(dev), dev, hpsyn81_ids) == 0) - sc->type = PSMCPNP_HPSYN81; else if (ISA_PNP_PROBE(device_get_parent(dev), dev, psmcpnp_ids) == 0) sc->type = PSMCPNP_GENERIC; else From owner-svn-src-all@freebsd.org Fri Jan 18 21:12:01 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 2D5CC1482AE9; Fri, 18 Jan 2019 21:12:01 +0000 (UTC) (envelope-from wulf@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 D2C49743D3; Fri, 18 Jan 2019 21:12:00 +0000 (UTC) (envelope-from wulf@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1: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 C8626824F; Fri, 18 Jan 2019 21:12:00 +0000 (UTC) (envelope-from wulf@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x0ILC0JD028295; Fri, 18 Jan 2019 21:12:00 GMT (envelope-from wulf@FreeBSD.org) Received: (from wulf@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x0ILC0hr028292; Fri, 18 Jan 2019 21:12:00 GMT (envelope-from wulf@FreeBSD.org) Message-Id: <201901182112.x0ILC0hr028292@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: wulf set sender to wulf@FreeBSD.org using -f From: Vladimir Kondratyev Date: Fri, 18 Jan 2019 21:12:00 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r343158 - stable/11/sys/dev/atkbdc X-SVN-Group: stable-11 X-SVN-Commit-Author: wulf X-SVN-Commit-Paths: stable/11/sys/dev/atkbdc X-SVN-Commit-Revision: 343158 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: D2C49743D3 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.97 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_SHORT(-0.97)[-0.972,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_LONG(-1.00)[-0.999,0] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 18 Jan 2019 21:12:01 -0000 Author: wulf Date: Fri Jan 18 21:12:00 2019 New Revision: 343158 URL: https://svnweb.freebsd.org/changeset/base/343158 Log: MFC r340912,r340913: psm(4): Revert r328640 and add minimal support for active AUX port multiplexers Active PS/2 multiplexing is a method for attaching up to four PS/2 pointing devices to a computer. Enabling of multiplexed mode allows commands to be directed to individual devices using routing prefixes. Multiplexed mode reports input with each byte tagged to identify its source. This method differs from one currently supported by psm(4) where so called guest device (trackpoint) is attached to special interface located on the host device (touchpad) and latter performs guest protocol conversion to special encapsulation packet format. At present time active PS/2 multiplexing is used in some models of HP laptops e.g. EliteBook 8560w, 9470m. Enabling of absolute operation mode on such touchpads is connected with following problems: 1. Touchpad's port priority is lower than trackpoint's. That blocks information queries thus prevents touchpad detection and configuration. 2. Touchpad and trackpoint have different protocol packet sizes and sync bytes. As PS/2 usage is on decline only minimal possible set of changes to support Synaptics touchpad and generic mouses is implemented. Active multiplexing mode is enabled only at probe stage to scan through attached PS/2 devices to query and configure Synaptics touchpad. After touchpad has been configured, mux is switched back to legacy (hidden multiplexing) mode to perform normal interrupt-driven input data processing. Overflow bit values rather than tags are used to separate packets produced by different devices. Switching back to legacy mode allows to avoid psm(4) and atkbd(4) rework to support 4 instances of mouse driver. Note: While in hidden multiplexing mode KBC does some editing of the packet stream. It remembers the button bits from the last packet received from each device, and replaces the button bits of every packet with the logical OR of all devices’ most recent button bits. This sort of button crosstalk results in spurious button events which are inhibitted with various tricks. E.g. trackpoint middle button events are suppressed while trackpad surface is touched and touchpad left and right button events are suppressed if corresponding trackpoint buttons are pressed. PR: 231058 Reported by: Michael Figiel Tested by: Michael Figiel Modified: stable/11/sys/dev/atkbdc/atkbdc.c stable/11/sys/dev/atkbdc/atkbdcreg.h stable/11/sys/dev/atkbdc/psm.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/dev/atkbdc/atkbdc.c ============================================================================== --- stable/11/sys/dev/atkbdc/atkbdc.c Fri Jan 18 21:11:02 2019 (r343157) +++ stable/11/sys/dev/atkbdc/atkbdc.c Fri Jan 18 21:12:00 2019 (r343158) @@ -294,6 +294,7 @@ atkbdc_setup(atkbdc_softc_t *sc, bus_space_tag_t tag, sc->lock = FALSE; sc->kbd.head = sc->kbd.tail = 0; sc->aux.head = sc->aux.tail = 0; + sc->aux_mux_enabled = FALSE; #if KBDIO_DEBUG >= 2 sc->kbd.call_count = 0; sc->kbd.qcount = sc->kbd.max_qcount = 0; @@ -637,7 +638,12 @@ write_kbd_command(KBDC p, int c) int write_aux_command(KBDC p, int c) { - if (!write_controller_command(p, KBDC_WRITE_TO_AUX)) + int f; + + f = aux_mux_is_enabled(p) ? + KBDC_WRITE_TO_AUX_MUX + kbdcp(p)->aux_mux_port : KBDC_WRITE_TO_AUX; + + if (!write_controller_command(p, f)) return FALSE; return write_controller_data(p, c); } @@ -1198,4 +1204,79 @@ set_controller_command_byte(KBDC p, int mask, int comm command); return TRUE; +} + +/* + * Rudimentary support for active PS/2 AUX port multiplexing. + * Only write commands can be routed to a selected AUX port. + * Source port of data processed by read commands is totally ignored. + */ +static int +set_aux_mux_state(KBDC p, int enabled) +{ + int command, version; + + if (write_controller_command(p, KBDC_FORCE_AUX_OUTPUT) == 0 || + write_controller_data(p, 0xF0) == 0 || + read_controller_data(p) != 0xF0) + return (-1); + + if (write_controller_command(p, KBDC_FORCE_AUX_OUTPUT) == 0 || + write_controller_data(p, 0x56) == 0 || + read_controller_data(p) != 0x56) + return (-1); + + command = enabled ? 0xa4 : 0xa5; + if (write_controller_command(p, KBDC_FORCE_AUX_OUTPUT) == 0 || + write_controller_data(p, command) == 0 || + (version = read_controller_data(p)) == command) + return (-1); + + return (version); +} + +int +set_active_aux_mux_port(KBDC p, int port) +{ + + if (!aux_mux_is_enabled(p)) + return (FALSE); + + if (port < 0 || port >= KBDC_AUX_MUX_NUM_PORTS) + return (FALSE); + + kbdcp(p)->aux_mux_port = port; + + return (TRUE); +} + +/* Checks for active multiplexing support and enables it */ +int +enable_aux_mux(KBDC p) +{ + int version; + + version = set_aux_mux_state(p, TRUE); + if (version >= 0) { + kbdcp(p)->aux_mux_enabled = TRUE; + set_active_aux_mux_port(p, 0); + } + + return (version); +} + +int +disable_aux_mux(KBDC p) +{ + + kbdcp(p)->aux_mux_enabled = FALSE; + + return (set_aux_mux_state(p, FALSE)); +} + +int +aux_mux_is_enabled(KBDC p) +{ + + return (kbdcp(p)->aux_mux_enabled); } Modified: stable/11/sys/dev/atkbdc/atkbdcreg.h ============================================================================== --- stable/11/sys/dev/atkbdc/atkbdcreg.h Fri Jan 18 21:11:02 2019 (r343157) +++ stable/11/sys/dev/atkbdc/atkbdcreg.h Fri Jan 18 21:12:00 2019 (r343158) @@ -49,6 +49,8 @@ /* controller commands (sent to KBD_COMMAND_PORT) */ #define KBDC_SET_COMMAND_BYTE 0x0060 #define KBDC_GET_COMMAND_BYTE 0x0020 +#define KBDC_WRITE_TO_AUX_MUX 0x0090 +#define KBDC_FORCE_AUX_OUTPUT 0x00d3 #define KBDC_WRITE_TO_AUX 0x00d4 #define KBDC_DISABLE_AUX_PORT 0x00a7 #define KBDC_ENABLE_AUX_PORT 0x00a8 @@ -207,6 +209,8 @@ typedef struct atkbdc_softc { #define KBDC_QUIRK_IGNORE_PROBE_RESULT (1 << 1) #define KBDC_QUIRK_RESET_AFTER_PROBE (1 << 2) #define KBDC_QUIRK_SETLEDS_ON_INIT (1 << 3) + int aux_mux_enabled; /* active PS/2 multiplexing is enabled */ + int aux_mux_port; /* current aux mux port */ } atkbdc_softc_t; enum kbdc_device_ivar { @@ -221,6 +225,8 @@ typedef caddr_t KBDC; #define KBDC_RID_KBD 0 #define KBDC_RID_AUX 1 +#define KBDC_AUX_MUX_NUM_PORTS 4 + /* function prototypes */ atkbdc_softc_t *atkbdc_get_softc(int unit); @@ -265,6 +271,11 @@ void kbdc_set_device_mask(KBDC kbdc, int mask); int get_controller_command_byte(KBDC kbdc); int set_controller_command_byte(KBDC kbdc, int command, int flag); + +int set_active_aux_mux_port(KBDC p, int port); +int enable_aux_mux(KBDC p); +int disable_aux_mux(KBDC p); +int aux_mux_is_enabled(KBDC p); #endif /* _KERNEL */ Modified: stable/11/sys/dev/atkbdc/psm.c ============================================================================== --- stable/11/sys/dev/atkbdc/psm.c Fri Jan 18 21:11:02 2019 (r343157) +++ stable/11/sys/dev/atkbdc/psm.c Fri Jan 18 21:12:00 2019 (r343158) @@ -136,7 +136,6 @@ struct psmcpnp_softc { enum { PSMCPNP_GENERIC, PSMCPNP_FORCEPAD, - PSMCPNP_HPSYN81, } type; /* Based on PnP ID */ }; @@ -151,6 +150,9 @@ struct psmcpnp_softc { #define PSM_LEVEL_MIN PSM_LEVEL_BASE #define PSM_LEVEL_MAX PSM_LEVEL_NATIVE +/* Active PS/2 multiplexing */ +#define PSM_NOMUX (-1) + /* Logitech PS2++ protocol */ #define MOUSE_PS2PLUS_CHECKBITS(b) \ ((((b[2] & 0x03) << 2) | 0x02) == (b[1] & 0x0f)) @@ -175,15 +177,6 @@ typedef struct packetbuf { #define PSM_PACKETQUEUE 128 #endif -/* - * Typical bezel limits. Taken from 'Synaptics - * PS/2 TouchPad Interfacing Guide' p.3.2.3. - */ -#define SYNAPTICS_DEFAULT_MAX_X 5472 -#define SYNAPTICS_DEFAULT_MAX_Y 4448 -#define SYNAPTICS_DEFAULT_MIN_X 1472 -#define SYNAPTICS_DEFAULT_MIN_Y 1408 - typedef struct synapticsinfo { struct sysctl_ctx_list sysctl_ctx; struct sysctl_oid *sysctl_tree; @@ -448,6 +441,11 @@ struct psm_softc { /* Driver status information */ int cmdcount; struct sigio *async; /* Processes waiting for SIGIO */ int extended_buttons; + int muxport; /* MUX port with attached Synaptics */ + u_char muxsave[3]; /* 3->6 byte proto conversion buffer */ + int muxtpbuttons; /* Touchpad button state */ + int muxmsbuttons; /* Mouse (trackpoint) button state */ + struct timeval muxmidtimeout; /* middle button supression timeout */ #ifdef EVDEV_SUPPORT struct evdev_dev *evdev_a; /* Absolute reporting device */ struct evdev_dev *evdev_r; /* Relative reporting device */ @@ -613,6 +611,7 @@ static void proc_mmanplus(struct psm_softc *, packetbu mousestatus_t *, int *, int *, int *); static int proc_synaptics(struct psm_softc *, packetbuf_t *, mousestatus_t *, int *, int *, int *); +static int proc_synaptics_mux(struct psm_softc *, packetbuf_t *); static void proc_versapad(struct psm_softc *, packetbuf_t *, mousestatus_t *, int *, int *, int *); static int proc_elantech(struct psm_softc *, packetbuf_t *, @@ -642,6 +641,7 @@ static probefunc_t enable_4dmouse; static probefunc_t enable_4dplus; static probefunc_t enable_mmanplus; static probefunc_t enable_synaptics; +static probefunc_t enable_synaptics_mux; static probefunc_t enable_trackpoint; static probefunc_t enable_versapad; static probefunc_t enable_elantech; @@ -662,6 +662,8 @@ static struct { * WARNING: the order of probe is very important. Don't mess it * unless you know what you are doing. */ + { MOUSE_MODEL_SYNAPTICS, /* Synaptics Touchpad on Active Mux */ + 0x00, MOUSE_PS2_PACKETSIZE, enable_synaptics_mux }, { MOUSE_MODEL_NET, /* Genius NetMouse */ 0x08, MOUSE_PS2INTELLI_PACKETSIZE, enable_gmouse }, { MOUSE_MODEL_NETSCROLL, /* Genius NetScroll */ @@ -1089,6 +1091,7 @@ static int doopen(struct psm_softc *sc, int command_byte) { int stat[3]; + int mux_enabled = FALSE; /* * FIXME: Synaptics TouchPad seems to go back to Relative Mode with @@ -1103,16 +1106,27 @@ doopen(struct psm_softc *sc, int command_byte) * doesn't show any evidence of such a command. */ if (sc->hw.model == MOUSE_MODEL_SYNAPTICS) { + if (sc->muxport != PSM_NOMUX) { + mux_enabled = enable_aux_mux(sc->kbdc) >= 0; + if (mux_enabled) + set_active_aux_mux_port(sc->kbdc, sc->muxport); + else + log(LOG_ERR, "psm%d: failed to enable " + "active multiplexing mode.\n", + sc->unit); + } mouse_ext_command(sc->kbdc, 1); get_mouse_status(sc->kbdc, stat, 0, 3); if ((SYNAPTICS_VERSION_GE(sc->synhw, 7, 5) || - stat[1] == 0x46 || stat[1] == 0x47) && + stat[1] == 0x47) && stat[2] == 0x40) { synaptics_set_mode(sc, synaptics_preferred_mode(sc)); VLOG(5, (LOG_DEBUG, "psm%d: Synaptis Absolute Mode " "hopefully restored\n", sc->unit)); } + if (mux_enabled) + disable_aux_mux(sc->kbdc); } /* @@ -1361,6 +1375,7 @@ psmprobe(device_t dev) #endif #endif /* PSM_HOOKRESUME | PSM_HOOKAPM */ sc->flags = 0; + sc->muxport = PSM_NOMUX; if (bootverbose) ++verbose; @@ -1830,7 +1845,7 @@ psm_register_synaptics(device_t dev) evdev_support_key(evdev_a, BTN_0 + i); error = evdev_register_mtx(evdev_a, &Giant); - if (!error && sc->synhw.capPassthrough) { + if (!error && (sc->synhw.capPassthrough || sc->muxport != PSM_NOMUX)) { guest_model = sc->tpinfo.sysctl_tree != NULL ? MOUSE_MODEL_TRACKPOINT : MOUSE_MODEL_GENERIC; error = psm_register(dev, guest_model); @@ -2950,6 +2965,9 @@ psmintr(void *arg) int c; packetbuf_t *pb; + if (aux_mux_is_enabled(sc->kbdc)) + VLOG(2, (LOG_DEBUG, "psmintr: active multiplexing mode is not " + "supported!\n")); /* read until there is nothing to read */ while((c = read_aux_data_no_wait(sc->kbdc)) != -1) { @@ -3301,7 +3319,7 @@ proc_synaptics(struct psm_softc *sc, packetbuf_t *pb, * Handle packets from the guest device. See: * Synaptics PS/2 TouchPad Interfacing Guide, Section 5.1 */ - if (sc->synhw.capPassthrough) { + if (sc->synhw.capPassthrough || sc->muxport != PSM_NOMUX) { *x = ((pb->ipacket[1] & 0x10) ? pb->ipacket[4] - 256 : pb->ipacket[4]); *y = ((pb->ipacket[1] & 0x20) ? @@ -3601,6 +3619,83 @@ SYNAPTICS_END: } static int +proc_synaptics_mux(struct psm_softc *sc, packetbuf_t *pb) +{ + int butt; + + /* + * Convert 3-byte interleaved mixture of Synaptics and generic mouse + * packets into plain 6-byte Synaptics packet protocol. + * While in hidden multiplexing mode KBC does some editing of the + * packet stream. It remembers the button bits from the last packet + * received from each device, and replaces the button bits of every + * packet with the logical OR of all devices’ most recent button bits. + * This button crosstalk should be filtered out as Synaptics and + * generic mouse encode middle button presses in a different way. + */ + switch (pb->ipacket[0] & 0xc0) { + case 0x80: /* First 3 bytes of Synaptics packet */ + bcopy(pb->ipacket, sc->muxsave, 3); + /* Compute middle mouse button supression timeout. */ + sc->muxmidtimeout.tv_sec = 0; + sc->muxmidtimeout.tv_usec = 50000; /* ~2-3 ints */ + timevaladd(&sc->muxmidtimeout, &sc->lastsoftintr); + return (1); + + case 0xc0: /* Second 3 bytes of Synaptics packet */ + /* Join two 3-bytes absolute packets */ + bcopy(pb->ipacket, pb->ipacket + 3, 3); + bcopy(sc->muxsave, pb->ipacket, 3); + /* Prefer trackpoint buttons over touchpad's */ + pb->ipacket[0] &= ~(0x08 | sc->muxmsbuttons); + pb->ipacket[3] &= ~(0x08 | sc->muxmsbuttons); + butt = (pb->ipacket[3] & 0x03) << 2 | (pb->ipacket[0] & 0x03); + /* Add hysteresis to remove spurious middle button events */ + if (butt != sc->muxtpbuttons && sc->fpcount < 1) { + pb->ipacket[0] &= 0xfc; + pb->ipacket[0] |= sc->muxtpbuttons & 0x03; + pb->ipacket[3] &= 0xfc; + pb->ipacket[3] |= sc->muxtpbuttons >> 2 & 0x03; + ++sc->fpcount; + } else { + sc->fpcount = 0; + sc->muxtpbuttons = butt; + } + /* Filter out impossible w induced by middle trackpoint btn */ + if (sc->synhw.capExtended && !sc->synhw.capPassthrough && + (pb->ipacket[0] & 0x34) == 0x04 && + (pb->ipacket[3] & 0x04) == 0x04) { + pb->ipacket[0] &= 0xfb; + pb->ipacket[3] &= 0xfb; + } + sc->muxsave[0] &= 0x30; + break; + + default: /* Generic mouse (Trackpoint) packet */ + /* Filter out middle button events induced by some w values */ + if (sc->muxmsbuttons & 0x03 || pb->ipacket[0] & 0x03 || + (timevalcmp(&sc->lastsoftintr, &sc->muxmidtimeout, <=) && + (sc->muxsave[0] & 0x30 || sc->muxsave[2] > 8))) + pb->ipacket[0] &= 0xfb; + sc->muxmsbuttons = pb->ipacket[0] & 0x07; + /* Convert to Synaptics pass-through protocol */ + pb->ipacket[4] = pb->ipacket[1]; + pb->ipacket[5] = pb->ipacket[2]; + pb->ipacket[1] = pb->ipacket[0]; + pb->ipacket[2] = 0; + pb->ipacket[0] = 0x84 | (sc->muxtpbuttons & 0x03); + pb->ipacket[3] = 0xc4 | (sc->muxtpbuttons >> 2 & 0x03); + } + + VLOG(4, (LOG_DEBUG, "synaptics: %02x %02x %02x %02x %02x %02x\n", + pb->ipacket[0], pb->ipacket[1], pb->ipacket[2], + pb->ipacket[3], pb->ipacket[4], pb->ipacket[5])); + + pb->inputbytes = MOUSE_SYNAPTICS_PACKETSIZE; + return (0); +} + +static int psmpalmdetect(struct psm_softc *sc, finger_t *f, int nfingers) { if (!( @@ -4935,6 +5030,10 @@ psmsoftintr(void *arg) break; case MOUSE_MODEL_SYNAPTICS: + if (pb->inputbytes == MOUSE_PS2_PACKETSIZE) + if (proc_synaptics_mux(sc, pb)) + goto next; + if (proc_synaptics(sc, pb, &ms, &x, &y, &z) != 0) { VLOG(3, (LOG_DEBUG, "synaptics: " "packet rejected\n")); @@ -6045,7 +6144,61 @@ synaptics_set_mode(struct psm_softc *sc, int mode_byte } } +/* + * AUX MUX detection code should be placed at very beginning of probe sequence + * at least before 4-byte protocol mouse probes e.g. MS IntelliMouse probe as + * latter can trigger switching the MUX to incompatible state. + */ static int +enable_synaptics_mux(struct psm_softc *sc, enum probearg arg) +{ + KBDC kbdc = sc->kbdc; + int port, version; + int probe = FALSE; + int active_ports_count = 0; + int active_ports_mask = 0; + + version = enable_aux_mux(kbdc); + if (version == -1) + return (FALSE); + + for (port = 0; port < KBDC_AUX_MUX_NUM_PORTS; port++) { + VLOG(3, (LOG_DEBUG, "aux_mux: ping port %d\n", port)); + set_active_aux_mux_port(kbdc, port); + if (enable_aux_dev(kbdc) && disable_aux_dev(kbdc)) { + active_ports_count++; + active_ports_mask |= 1 << port; + } + } + + if (verbose >= 2) + printf("Active Multiplexing PS/2 controller v%d.%d with %d " + "active port(s)\n", version >> 4 & 0x0f, version & 0x0f, + active_ports_count); + + /* psm has a special support for GenMouse + SynTouchpad combination */ + if (active_ports_count >= 2) { + for (port = 0; port < KBDC_AUX_MUX_NUM_PORTS; port++) { + if ((active_ports_mask & 1 << port) == 0) + continue; + VLOG(3, (LOG_DEBUG, "aux_mux: probe port %d\n", port)); + set_active_aux_mux_port(kbdc, port); + probe = enable_synaptics(sc, arg); + if (probe) { + if (arg == PROBE) + sc->muxport = port; + break; + } + } + } + + /* IRQ handler does not support active multiplexing mode */ + disable_aux_mux(kbdc); + + return (probe); +} + +static int enable_synaptics(struct psm_softc *sc, enum probearg arg) { device_t psmcpnp; @@ -6053,7 +6206,7 @@ enable_synaptics(struct psm_softc *sc, enum probearg a KBDC kbdc = sc->kbdc; synapticshw_t synhw; int status[3]; - int buttons, middle_byte; + int buttons; VLOG(3, (LOG_DEBUG, "synaptics: BEGIN init\n")); @@ -6070,8 +6223,7 @@ enable_synaptics(struct psm_softc *sc, enum probearg a return (FALSE); if (get_mouse_status(kbdc, status, 0, 3) != 3) return (FALSE); - middle_byte = status[1]; - if (middle_byte != 0x46 && middle_byte != 0x47) + if (status[1] != 0x47) return (FALSE); bzero(&synhw, sizeof(synhw)); @@ -6082,15 +6234,7 @@ enable_synaptics(struct psm_softc *sc, enum probearg a printf("Synaptics Touchpad v%d.%d\n", synhw.infoMajor, synhw.infoMinor); - /* - * Most synaptics touchpads return 0x47 in middle byte in responce to - * identify command as stated in p.4.4 of "Synaptics PS/2 TouchPad - * Interfacing Guide" and we only support v4.0 or better. But some - * devices return 0x46 here and have a different numbering scheme. - * In the case of 0x46, we allow versions as low as v2.0 - */ - if ((middle_byte == 0x47 && synhw.infoMajor < 4) || - (middle_byte == 0x46 && synhw.infoMajor < 2)) { + if (synhw.infoMajor < 4) { printf(" Unsupported (pre-v4) Touchpad detected\n"); return (FALSE); } @@ -6131,7 +6275,7 @@ enable_synaptics(struct psm_softc *sc, enum probearg a return (FALSE); if (get_mouse_status(kbdc, status, 0, 3) != 3) return (FALSE); - if (!SYNAPTICS_VERSION_GE(synhw, 7, 5) && status[1] != middle_byte) { + if (!SYNAPTICS_VERSION_GE(synhw, 7, 5) && status[1] != 0x47) { printf(" Failed to read extended capability bits\n"); return (FALSE); } @@ -6140,29 +6284,10 @@ enable_synaptics(struct psm_softc *sc, enum probearg a sc->unit); psmcpnp_sc = (psmcpnp != NULL) ? device_get_softc(psmcpnp) : NULL; - /* - * Set conservative defaults for 0x46 middle byte touchpads - * as ExtendedQueries return bogus data. - */ - if (middle_byte == 0x46) { - synhw.capExtended = 1; - synhw.capPalmDetect = 1; - synhw.capPassthrough = 1; - synhw.capMultiFinger = 1; - synhw.maximumXCoord = SYNAPTICS_DEFAULT_MAX_X; - synhw.maximumYCoord = SYNAPTICS_DEFAULT_MAX_Y; - synhw.minimumXCoord = SYNAPTICS_DEFAULT_MIN_X; - synhw.minimumYCoord = SYNAPTICS_DEFAULT_MIN_Y; - /* Enable multitouch mode for HW v8.1 devices */ - if (psmcpnp_sc != NULL && - psmcpnp_sc->type == PSMCPNP_HPSYN81) - synhw.capReportsV = 1; - } else - synhw.capExtended = (status[0] & 0x80) != 0; - /* Set the different capabilities when they exist. */ buttons = 0; - if (synhw.capExtended && middle_byte == 0x47) { + synhw.capExtended = (status[0] & 0x80) != 0; + if (synhw.capExtended) { synhw.nExtendedQueries = (status[0] & 0x70) >> 4; synhw.capMiddle = (status[0] & 0x04) != 0; synhw.capPassthrough = (status[2] & 0x80) != 0; @@ -6284,8 +6409,12 @@ enable_synaptics(struct psm_softc *sc, enum probearg a synhw.maximumYCoord = (status[2] << 5) | ((status[1] & 0xf0) >> 3); } else { - synhw.maximumXCoord = SYNAPTICS_DEFAULT_MAX_X; - synhw.maximumYCoord = SYNAPTICS_DEFAULT_MAX_Y; + /* + * Typical bezel limits. Taken from 'Synaptics + * PS/2 * TouchPad Interfacing Guide' p.3.2.3. + */ + synhw.maximumXCoord = 5472; + synhw.maximumYCoord = 4448; } if (synhw.capReportsMin) { @@ -6301,8 +6430,12 @@ enable_synaptics(struct psm_softc *sc, enum probearg a synhw.minimumYCoord = (status[2] << 5) | ((status[1] & 0xf0) >> 3); } else { - synhw.minimumXCoord = SYNAPTICS_DEFAULT_MIN_X; - synhw.minimumYCoord = SYNAPTICS_DEFAULT_MIN_Y; + /* + * Typical bezel limits. Taken from 'Synaptics + * PS/2 * TouchPad Interfacing Guide' p.3.2.3. + */ + synhw.minimumXCoord = 1472; + synhw.minimumYCoord = 1408; } /* @@ -6388,7 +6521,7 @@ enable_synaptics(struct psm_softc *sc, enum probearg a return (FALSE); if (get_mouse_status(kbdc, status, 0, 3) != 3) return (FALSE); - if (!SYNAPTICS_VERSION_GE(synhw, 7, 5) && status[1] != middle_byte) { + if (!SYNAPTICS_VERSION_GE(synhw, 7, 5) && status[1] != 0x47) { printf(" Failed to read mode byte\n"); return (FALSE); } @@ -7211,12 +7344,6 @@ static struct isa_pnp_id forcepad_ids[] = { { 0 } }; -/* List of HW v8.1 synaptics touchpads erroneously detected as HW v2.0 */ -static struct isa_pnp_id hpsyn81_ids[] = { - { 0x9e012e4f, "HP PS/2 trackpad port" }, /* SYN019E, EB 9470 */ - { 0 } -}; - static int create_a_copy(device_t atkbdc, device_t me) { @@ -7250,8 +7377,6 @@ psmcpnp_probe(device_t dev) if (ISA_PNP_PROBE(device_get_parent(dev), dev, forcepad_ids) == 0) sc->type = PSMCPNP_FORCEPAD; - else if(ISA_PNP_PROBE(device_get_parent(dev), dev, hpsyn81_ids) == 0) - sc->type = PSMCPNP_HPSYN81; else if (ISA_PNP_PROBE(device_get_parent(dev), dev, psmcpnp_ids) == 0) sc->type = PSMCPNP_GENERIC; else From owner-svn-src-all@freebsd.org Fri Jan 18 21:25:11 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 3B3A1148324E; Fri, 18 Jan 2019 21:25:11 +0000 (UTC) (envelope-from wulf@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 CBF0174D62; Fri, 18 Jan 2019 21:25:10 +0000 (UTC) (envelope-from wulf@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1: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 BA59A8429; Fri, 18 Jan 2019 21:25:10 +0000 (UTC) (envelope-from wulf@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x0ILPA3Z035578; Fri, 18 Jan 2019 21:25:10 GMT (envelope-from wulf@FreeBSD.org) Received: (from wulf@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x0ILPAj7035577; Fri, 18 Jan 2019 21:25:10 GMT (envelope-from wulf@FreeBSD.org) Message-Id: <201901182125.x0ILPAj7035577@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: wulf set sender to wulf@FreeBSD.org using -f From: Vladimir Kondratyev Date: Fri, 18 Jan 2019 21:25:10 +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: r343159 - stable/12/sys/dev/evdev X-SVN-Group: stable-12 X-SVN-Commit-Author: wulf X-SVN-Commit-Paths: stable/12/sys/dev/evdev X-SVN-Commit-Revision: 343159 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: CBF0174D62 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.94 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_SHORT(-0.94)[-0.942,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_LONG(-1.00)[-0.999,0] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 18 Jan 2019 21:25:11 -0000 Author: wulf Date: Fri Jan 18 21:25:10 2019 New Revision: 343159 URL: https://svnweb.freebsd.org/changeset/base/343159 Log: MFC r340926: evdev: Fix pause key release event in AT keyboard set 1 to evdev xlat-or. Modified: stable/12/sys/dev/evdev/evdev_utils.c Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/dev/evdev/evdev_utils.c ============================================================================== --- stable/12/sys/dev/evdev/evdev_utils.c Fri Jan 18 21:12:00 2019 (r343158) +++ stable/12/sys/dev/evdev/evdev_utils.c Fri Jan 18 21:25:10 2019 (r343159) @@ -250,12 +250,15 @@ evdev_scancode2key(int *state, int scancode) */ *state = 0; if ((scancode & 0x7f) == 0x1D) - *state = 0x1D; + *state = scancode; return (NONE); /* NOT REACHED */ case 0x1D: /* pause / break */ + case 0x9D: + if ((*state ^ scancode) & 0x80) + return (NONE); *state = 0; - if (scancode != 0x45) + if ((scancode & 0x7f) != 0x45) return (NONE); keycode = KEY_PAUSE; break; From owner-svn-src-all@freebsd.org Fri Jan 18 21:25:46 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id DB32814832DF; Fri, 18 Jan 2019 21:25:46 +0000 (UTC) (envelope-from wulf@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 822EE74E9F; Fri, 18 Jan 2019 21:25:46 +0000 (UTC) (envelope-from wulf@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1: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 75CCA842D; Fri, 18 Jan 2019 21:25:46 +0000 (UTC) (envelope-from wulf@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x0ILPkBm035653; Fri, 18 Jan 2019 21:25:46 GMT (envelope-from wulf@FreeBSD.org) Received: (from wulf@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x0ILPkgx035652; Fri, 18 Jan 2019 21:25:46 GMT (envelope-from wulf@FreeBSD.org) Message-Id: <201901182125.x0ILPkgx035652@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: wulf set sender to wulf@FreeBSD.org using -f From: Vladimir Kondratyev Date: Fri, 18 Jan 2019 21:25:46 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r343160 - stable/11/sys/dev/evdev X-SVN-Group: stable-11 X-SVN-Commit-Author: wulf X-SVN-Commit-Paths: stable/11/sys/dev/evdev X-SVN-Commit-Revision: 343160 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 822EE74E9F X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.94 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_SHORT(-0.94)[-0.942,0]; NEURAL_HAM_LONG(-1.00)[-0.999,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 18 Jan 2019 21:25:47 -0000 Author: wulf Date: Fri Jan 18 21:25:46 2019 New Revision: 343160 URL: https://svnweb.freebsd.org/changeset/base/343160 Log: MFC r340926: evdev: Fix pause key release event in AT keyboard set 1 to evdev xlat-or. Modified: stable/11/sys/dev/evdev/evdev_utils.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/dev/evdev/evdev_utils.c ============================================================================== --- stable/11/sys/dev/evdev/evdev_utils.c Fri Jan 18 21:25:10 2019 (r343159) +++ stable/11/sys/dev/evdev/evdev_utils.c Fri Jan 18 21:25:46 2019 (r343160) @@ -252,12 +252,15 @@ evdev_scancode2key(int *state, int scancode) */ *state = 0; if ((scancode & 0x7f) == 0x1D) - *state = 0x1D; + *state = scancode; return (NONE); /* NOT REACHED */ case 0x1D: /* pause / break */ + case 0x9D: + if ((*state ^ scancode) & 0x80) + return (NONE); *state = 0; - if (scancode != 0x45) + if ((scancode & 0x7f) != 0x45) return (NONE); keycode = KEY_PAUSE; break; From owner-svn-src-all@freebsd.org Fri Jan 18 21:30:08 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 15C7D148353C; Fri, 18 Jan 2019 21:30:08 +0000 (UTC) (envelope-from brooks@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 B31187519F; Fri, 18 Jan 2019 21:30:07 +0000 (UTC) (envelope-from brooks@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1: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 A98EB8434; Fri, 18 Jan 2019 21:30:07 +0000 (UTC) (envelope-from brooks@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x0ILU7r7035932; Fri, 18 Jan 2019 21:30:07 GMT (envelope-from brooks@FreeBSD.org) Received: (from brooks@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x0ILU6Yg035928; Fri, 18 Jan 2019 21:30:06 GMT (envelope-from brooks@FreeBSD.org) Message-Id: <201901182130.x0ILU6Yg035928@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: brooks set sender to brooks@FreeBSD.org using -f From: Brooks Davis Date: Fri, 18 Jan 2019 21:30:06 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r343161 - in head: include/protocols libexec/talkd usr.bin/talk X-SVN-Group: head X-SVN-Commit-Author: brooks X-SVN-Commit-Paths: in head: include/protocols libexec/talkd usr.bin/talk X-SVN-Commit-Revision: 343161 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: B31187519F X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.95 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_SHORT(-0.95)[-0.951,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_LONG(-1.00)[-0.999,0] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 18 Jan 2019 21:30:08 -0000 Author: brooks Date: Fri Jan 18 21:30:06 2019 New Revision: 343161 URL: https://svnweb.freebsd.org/changeset/base/343161 Log: Use a private definition of osockaddr rather then relying on type namespace polution in sys/socket.h. Also remove support for operation on 4.3BSD. PR: 224529 Differential Revision: https://reviews.freebsd.org/D14505 Modified: head/include/protocols/talkd.h head/libexec/talkd/talkd.c head/usr.bin/talk/invite.c head/usr.bin/talk/look_up.c Modified: head/include/protocols/talkd.h ============================================================================== --- head/include/protocols/talkd.h Fri Jan 18 21:25:46 2019 (r343160) +++ head/include/protocols/talkd.h Fri Jan 18 21:30:06 2019 (r343161) @@ -55,6 +55,15 @@ */ /* + * The talk protocol embeds a 4.3BSD sockaddr. Define our own version + * rather then relying on namespace polution in kernel headers. + */ +struct tsockaddr { + unsigned short sa_family; + char sa_data[14]; +}; + +/* * Client->server request message format. */ typedef struct { @@ -63,8 +72,8 @@ typedef struct { u_char answer; /* not used */ u_char pad; u_int32_t id_num; /* message id */ - struct osockaddr addr; /* old (4.3) style */ - struct osockaddr ctl_addr; /* old (4.3) style */ + struct tsockaddr addr; /* old (4.3) style */ + struct tsockaddr ctl_addr; /* old (4.3) style */ int32_t pid; /* caller's process id */ #define NAME_SIZE 12 char l_name[NAME_SIZE];/* caller's name */ @@ -82,7 +91,7 @@ typedef struct { u_char answer; /* respose to request message, see below */ u_char pad; u_int32_t id_num; /* message id */ - struct osockaddr addr; /* address for establishing conversation */ + struct tsockaddr addr; /* address for establishing conversation */ } CTL_RESPONSE; #define TALK_VERSION 1 /* protocol version */ Modified: head/libexec/talkd/talkd.c ============================================================================== --- head/libexec/talkd/talkd.c Fri Jan 18 21:25:46 2019 (r343160) +++ head/libexec/talkd/talkd.c Fri Jan 18 21:30:06 2019 (r343161) @@ -114,7 +114,8 @@ main(int argc, char *argv[]) continue; } lastmsgtime = time(0); - (void)memcpy(&ctl_addr, &mp->ctl_addr, sizeof(ctl_addr)); + (void)memcpy(&ctl_addr.sa_data, &mp->ctl_addr.sa_data, + sizeof(ctl_addr.sa_data)); ctl_addr.sa_family = ntohs(mp->ctl_addr.sa_family); ctl_addr.sa_len = sizeof(ctl_addr); process_request(mp, &response); Modified: head/usr.bin/talk/invite.c ============================================================================== --- head/usr.bin/talk/invite.c Fri Jan 18 21:25:46 2019 (r343160) +++ head/usr.bin/talk/invite.c Fri Jan 18 21:30:06 2019 (r343161) @@ -77,13 +77,9 @@ invite_remote(void) itimer.it_interval = itimer.it_value; if (listen(sockt, 5) != 0) p_error("Error on attempt to listen for caller"); -#ifdef MSG_EOR /* copy new style sockaddr to old, swap family (short in old) */ - msg.addr = *(struct osockaddr *)&my_addr; /* XXX new to old style*/ + msg.addr = *(struct tsockaddr *)&my_addr; msg.addr.sa_family = htons(my_addr.sin_family); -#else - msg.addr = *(struct sockaddr *)&my_addr; -#endif msg.id_num = htonl(-1); /* an impossible id_num */ invitation_waiting = 1; announce_invite(); Modified: head/usr.bin/talk/look_up.c ============================================================================== --- head/usr.bin/talk/look_up.c Fri Jan 18 21:25:46 2019 (r343160) +++ head/usr.bin/talk/look_up.c Fri Jan 18 21:30:06 2019 (r343161) @@ -59,13 +59,9 @@ check_local(void) struct sockaddr addr; /* the rest of msg was set up in get_names */ -#ifdef MSG_EOR /* copy new style sockaddr to old, swap family (short in old) */ - msg.ctl_addr = *(struct osockaddr *)&ctl_addr; + msg.ctl_addr = *(struct tsockaddr *)&ctl_addr; msg.ctl_addr.sa_family = htons(ctl_addr.sin_family); -#else - msg.ctl_addr = *(struct sockaddr *)&ctl_addr; -#endif /* must be initiating a talk */ if (!look_for_invite(rp)) return (0); From owner-svn-src-all@freebsd.org Fri Jan 18 21:46:40 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id D4DF41484698; Fri, 18 Jan 2019 21:46:39 +0000 (UTC) (envelope-from brooks@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 7B66B76001; Fri, 18 Jan 2019 21:46:39 +0000 (UTC) (envelope-from brooks@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1: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 686AC8796; Fri, 18 Jan 2019 21:46:39 +0000 (UTC) (envelope-from brooks@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x0ILkdW9046380; Fri, 18 Jan 2019 21:46:39 GMT (envelope-from brooks@FreeBSD.org) Received: (from brooks@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x0ILkdoJ046379; Fri, 18 Jan 2019 21:46:39 GMT (envelope-from brooks@FreeBSD.org) Message-Id: <201901182146.x0ILkdoJ046379@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: brooks set sender to brooks@FreeBSD.org using -f From: Brooks Davis Date: Fri, 18 Jan 2019 21:46:39 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r343162 - head/sys/netinet X-SVN-Group: head X-SVN-Commit-Author: brooks X-SVN-Commit-Paths: head/sys/netinet X-SVN-Commit-Revision: 343162 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 7B66B76001 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.95 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_SHORT(-0.95)[-0.949,0]; NEURAL_HAM_LONG(-1.00)[-0.999,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 18 Jan 2019 21:46:40 -0000 Author: brooks Date: Fri Jan 18 21:46:38 2019 New Revision: 343162 URL: https://svnweb.freebsd.org/changeset/base/343162 Log: Make SIFTR work again after r342125 (D18443). Correct a logic error. Only disable when already enabled or enable when disabled. Submitted by: Richard Scheffenegger Reviewed by: Cheng Cui Obtained from: Cheng Cui MFC after: 3 days Differential Revision: https://reviews.freebsd.org/D18885 Modified: head/sys/netinet/siftr.c Modified: head/sys/netinet/siftr.c ============================================================================== --- head/sys/netinet/siftr.c Fri Jan 18 21:30:06 2019 (r343161) +++ head/sys/netinet/siftr.c Fri Jan 18 21:46:38 2019 (r343162) @@ -1219,7 +1219,7 @@ siftr_manage_ops(uint8_t action) if ((s = sbuf_new(NULL, NULL, 200, SBUF_AUTOEXTEND)) == NULL) return (-1); - if (action == SIFTR_ENABLE) { + if (action == SIFTR_ENABLE && siftr_pkt_manager_thr == NULL) { /* * Create our alq * XXX: We should abort if alq_open fails! @@ -1424,7 +1424,8 @@ siftr_manage_ops(uint8_t action) alq_close(siftr_alq); siftr_alq = NULL; - } + } else + error = EINVAL; sbuf_delete(s); @@ -1445,13 +1446,15 @@ siftr_sysctl_enabled_handler(SYSCTL_HANDLER_ARGS) new = siftr_enabled; error = sysctl_handle_int(oidp, &new, 0, req); - if (error != 0 && req->newptr != NULL) { + if (error == 0 && req->newptr != NULL) { if (new > 1) return (EINVAL); else if (new != siftr_enabled) { - error = siftr_manage_ops(new); - if (error != 0) + if ((error = siftr_manage_ops(new)) == 0) { + siftr_enabled = new; + } else { siftr_manage_ops(SIFTR_DISABLE); + } } } @@ -1462,7 +1465,9 @@ siftr_sysctl_enabled_handler(SYSCTL_HANDLER_ARGS) static void siftr_shutdown_handler(void *arg) { - siftr_manage_ops(SIFTR_DISABLE); + if (siftr_enabled == 1) { + siftr_manage_ops(SIFTR_DISABLE); + } } From owner-svn-src-all@freebsd.org Fri Jan 18 22:20:30 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 50499148533B; Fri, 18 Jan 2019 22:20:30 +0000 (UTC) (envelope-from wulf@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 E71E27711A; Fri, 18 Jan 2019 22:20:29 +0000 (UTC) (envelope-from wulf@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1: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 DAD638CD9; Fri, 18 Jan 2019 22:20:29 +0000 (UTC) (envelope-from wulf@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x0IMKTu5062451; Fri, 18 Jan 2019 22:20:29 GMT (envelope-from wulf@FreeBSD.org) Received: (from wulf@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x0IMKTAh062449; Fri, 18 Jan 2019 22:20:29 GMT (envelope-from wulf@FreeBSD.org) Message-Id: <201901182220.x0IMKTAh062449@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: wulf set sender to wulf@FreeBSD.org using -f From: Vladimir Kondratyev Date: Fri, 18 Jan 2019 22:20:29 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r343163 - in head/sys: dev/atkbdc sys X-SVN-Group: head X-SVN-Commit-Author: wulf X-SVN-Commit-Paths: in head/sys: dev/atkbdc sys X-SVN-Commit-Revision: 343163 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: E71E27711A X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.95 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_LONG(-1.00)[-0.999,0]; NEURAL_HAM_SHORT(-0.95)[-0.951,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 18 Jan 2019 22:20:30 -0000 Author: wulf Date: Fri Jan 18 22:20:29 2019 New Revision: 343163 URL: https://svnweb.freebsd.org/changeset/base/343163 Log: psm(4): detect Lenovo top-button clickpads libinput has special handling for Lenovo ThinkPad *40 series, where it treats clicks on the top button area as if they came from the TrackPoint: https://wayland.freedesktop.org/libinput/doc/latest/t440-support.html Detect these devices and set the corresponding evdev property. Submitted by: Greg V MFC after: 2 weeks Differential Revision: https://reviews.freebsd.org/D18676 Modified: head/sys/dev/atkbdc/psm.c head/sys/sys/mouse.h Modified: head/sys/dev/atkbdc/psm.c ============================================================================== --- head/sys/dev/atkbdc/psm.c Fri Jan 18 21:46:38 2019 (r343162) +++ head/sys/dev/atkbdc/psm.c Fri Jan 18 22:20:29 2019 (r343163) @@ -136,6 +136,7 @@ struct psmcpnp_softc { enum { PSMCPNP_GENERIC, PSMCPNP_FORCEPAD, + PSMCPNP_TOPBUTTONPAD, } type; /* Based on PnP ID */ }; @@ -1826,6 +1827,8 @@ psm_register_synaptics(device_t dev) evdev_support_prop(evdev_a, INPUT_PROP_SEMI_MT); if (sc->synhw.capClickPad) evdev_support_prop(evdev_a, INPUT_PROP_BUTTONPAD); + if (sc->synhw.capClickPad && sc->synhw.topButtonPad) + evdev_support_prop(evdev_a, INPUT_PROP_TOPBUTTONPAD); evdev_support_key(evdev_a, BTN_TOUCH); evdev_support_nfingers(evdev_a, 3); psm_support_abs_bulk(evdev_a, synaptics_absinfo_st); @@ -5711,7 +5714,7 @@ synaptics_sysctl_create_softbuttons_tree(struct psm_so */ /* hw.psm.synaptics.softbuttons_y */ - sc->syninfo.softbuttons_y = 1700; + sc->syninfo.softbuttons_y = sc->synhw.topButtonPad ? -1700 : 1700; SYSCTL_ADD_PROC(&sc->syninfo.sysctl_ctx, SYSCTL_CHILDREN(sc->syninfo.sysctl_tree), OID_AUTO, "softbuttons_y", CTLTYPE_INT|CTLFLAG_RW|CTLFLAG_ANYBODY, @@ -6441,6 +6444,9 @@ enable_synaptics(struct psm_softc *sc, enum probearg a case PSMCPNP_FORCEPAD: synhw.forcePad = 1; break; + case PSMCPNP_TOPBUTTONPAD: + synhw.topButtonPad = 1; + break; default: break; } @@ -6483,8 +6489,11 @@ enable_synaptics(struct psm_softc *sc, enum probearg a synhw.minimumYCoord); } if (synhw.capClickPad) { + printf(" Clickpad capabilities:\n"); printf(" forcePad: %d\n", synhw.forcePad); + printf(" topButtonPad: %d\n", + synhw.topButtonPad); } } buttons += synhw.capClickPad; @@ -7332,6 +7341,44 @@ static struct isa_pnp_id psmcpnp_ids[] = { }; /* _HID list for quirk detection. Any device below has _CID from psmcpnp_ids */ +static struct isa_pnp_id topbtpad_ids[] = { + { 0x1700ae30, "Lenovo PS/2 clickpad port" }, /* LEN0017, ThinkPad */ + { 0x1800ae30, "Lenovo PS/2 clickpad port" }, /* LEN0018, ThinkPad */ + { 0x1900ae30, "Lenovo PS/2 clickpad port" }, /* LEN0019, ThinkPad */ + { 0x2300ae30, "Lenovo PS/2 clickpad port" }, /* LEN0023, ThinkPad */ + { 0x2a00ae30, "Lenovo PS/2 clickpad port" }, /* LEN002a, ThinkPad */ + { 0x2b00ae30, "Lenovo PS/2 clickpad port" }, /* LEN002b, ThinkPad */ + { 0x2c00ae30, "Lenovo PS/2 clickpad port" }, /* LEN002c, ThinkPad */ + { 0x2d00ae30, "Lenovo PS/2 clickpad port" }, /* LEN002d, ThinkPad */ + { 0x2e00ae30, "Lenovo PS/2 clickpad port" }, /* LEN002e, ThinkPad */ + { 0x3300ae30, "Lenovo PS/2 clickpad port" }, /* LEN0033, ThinkPad */ + { 0x3400ae30, "Lenovo PS/2 clickpad port" }, /* LEN0034, ThinkPad */ + { 0x3500ae30, "Lenovo PS/2 clickpad port" }, /* LEN0035, ThinkPad */ + { 0x3600ae30, "Lenovo PS/2 clickpad port" }, /* LEN0036, ThinkPad */ + { 0x3700ae30, "Lenovo PS/2 clickpad port" }, /* LEN0037, ThinkPad */ + { 0x3800ae30, "Lenovo PS/2 clickpad port" }, /* LEN0038, ThinkPad */ + { 0x3900ae30, "Lenovo PS/2 clickpad port" }, /* LEN0039, ThinkPad */ + { 0x4100ae30, "Lenovo PS/2 clickpad port" }, /* LEN0041, ThinkPad */ + { 0x4200ae30, "Lenovo PS/2 clickpad port" }, /* LEN0042, ThinkPad */ + { 0x4500ae30, "Lenovo PS/2 clickpad port" }, /* LEN0045, ThinkPad */ + { 0x4700ae30, "Lenovo PS/2 clickpad port" }, /* LEN0047, ThinkPad */ + { 0x4900ae30, "Lenovo PS/2 clickpad port" }, /* LEN0049, ThinkPad */ + { 0x0020ae30, "Lenovo PS/2 clickpad port" }, /* LEN2000, ThinkPad */ + { 0x0120ae30, "Lenovo PS/2 clickpad port" }, /* LEN2001, ThinkPad */ + { 0x0220ae30, "Lenovo PS/2 clickpad port" }, /* LEN2002, ThinkPad */ + { 0x0320ae30, "Lenovo PS/2 clickpad port" }, /* LEN2003, ThinkPad */ + { 0x0420ae30, "Lenovo PS/2 clickpad port" }, /* LEN2004, ThinkPad */ + { 0x0520ae30, "Lenovo PS/2 clickpad port" }, /* LEN2005, ThinkPad */ + { 0x0620ae30, "Lenovo PS/2 clickpad port" }, /* LEN2006, ThinkPad */ + { 0x0720ae30, "Lenovo PS/2 clickpad port" }, /* LEN2007, ThinkPad */ + { 0x0820ae30, "Lenovo PS/2 clickpad port" }, /* LEN2008, ThinkPad */ + { 0x0920ae30, "Lenovo PS/2 clickpad port" }, /* LEN2009, ThinkPad */ + { 0x0a20ae30, "Lenovo PS/2 clickpad port" }, /* LEN200a, ThinkPad */ + { 0x0b20ae30, "Lenovo PS/2 clickpad port" }, /* LEN200b, ThinkPad */ + { 0 } +}; + +/* _HID list for quirk detection. Any device below has _CID from psmcpnp_ids */ static struct isa_pnp_id forcepad_ids[] = { { 0x0d302e4f, "HP PS/2 forcepad port" }, /* SYN300D, EB 1040 */ { 0x14302e4f, "HP PS/2 forcepad port" }, /* SYN3014, EB 1040 */ @@ -7371,6 +7418,8 @@ psmcpnp_probe(device_t dev) if (ISA_PNP_PROBE(device_get_parent(dev), dev, forcepad_ids) == 0) sc->type = PSMCPNP_FORCEPAD; + else if (ISA_PNP_PROBE(device_get_parent(dev), dev, topbtpad_ids) == 0) + sc->type = PSMCPNP_TOPBUTTONPAD; else if (ISA_PNP_PROBE(device_get_parent(dev), dev, psmcpnp_ids) == 0) sc->type = PSMCPNP_GENERIC; else Modified: head/sys/sys/mouse.h ============================================================================== --- head/sys/sys/mouse.h Fri Jan 18 21:46:38 2019 (r343162) +++ head/sys/sys/mouse.h Fri Jan 18 22:20:29 2019 (r343163) @@ -136,6 +136,7 @@ typedef struct synapticshw { int infoXupmm; int infoYupmm; int forcePad; + int topButtonPad; } synapticshw_t; /* iftype */ From owner-svn-src-all@freebsd.org Fri Jan 18 22:31:15 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id ECA0D14855D2; Fri, 18 Jan 2019 22:31:14 +0000 (UTC) (envelope-from carpeddiem@gmail.com) Received: from mail-io1-f42.google.com (mail-io1-f42.google.com [209.85.166.42]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 8D7247761D; Fri, 18 Jan 2019 22:31:14 +0000 (UTC) (envelope-from carpeddiem@gmail.com) Received: by mail-io1-f42.google.com with SMTP id g8so12097617iok.4; Fri, 18 Jan 2019 14:31:14 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=xkJTxEJnjHWEuaQr4SShwcfuVgyenKqtIZtBWqhfDPU=; b=S3GsHMLKxvF6OwvEETTq28zjDXkkM7vNh8PqjC35RdNPvUMHdhQD62Y9HvzJcdu9RR ISTReDE+nXua7KLKDlJj9rI3HPpZ2NmZPiTFQs8BWJyhApA0crD39yQJuGMPg4HVZLlj ogiEUvvoeqtxZbvNtWQzIBDtK440zqTTphj+6erSqMLASxhNwdeOiJVjqSjE/hN/J1BQ eQciGanJ07ojju4ylzZ2p0ZJAC9bYiX+YVoxaM/osL41fC/o2AW31sC25uT4JwKR+DpH m7xK0vHJ4W7TNMdca8avTjzE2pj0TE1uQbQobfbYBn+bF+claP9M2000cfi8RBku7Fjz fxWg== X-Gm-Message-State: AJcUukdRVX77OuVv+4Yb4NjJqYcXmrscbHQLAXJbbQXoaQ383jtG/qI0 PFHQNLfrQSP2Q6PuK5qrzTQkdlFob5YRgWR6wN+KlQ== X-Google-Smtp-Source: ALg8bN4zWoXF22tF61I6NFKU+SI1LiLNa8rnM7vvLo5mqwYaMP9ir7fipm/YyWluZG2P21QcHQlZIBR4cNTYB279ID4= X-Received: by 2002:a5d:878d:: with SMTP id f13mr6357440ion.239.1547850667626; Fri, 18 Jan 2019 14:31:07 -0800 (PST) MIME-Version: 1.0 References: <201901181741.x0IHfjs6014631@repo.freebsd.org> <201901181751.x0IHpAkU056605@pdx.rh.CN85.dnsmgr.net> In-Reply-To: <201901181751.x0IHpAkU056605@pdx.rh.CN85.dnsmgr.net> From: Ed Maste Date: Fri, 18 Jan 2019 17:30:54 -0500 Message-ID: Subject: Re: svn commit: r343152 - head/usr.sbin/freebsd-update To: "Rodney W. Grimes" Cc: src-committers , svn-src-all@freebsd.org, svn-src-head@freebsd.org Content-Type: text/plain; charset="UTF-8" X-Rspamd-Queue-Id: 8D7247761D X-Spamd-Bar: ------ Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-6.95 / 15.00]; NEURAL_HAM_MEDIUM(-1.00)[-1.000,0]; NEURAL_HAM_SHORT(-0.95)[-0.950,0]; REPLY(-4.00)[]; NEURAL_HAM_LONG(-1.00)[-1.000,0] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 18 Jan 2019 22:31:15 -0000 On Fri, 18 Jan 2019 at 12:51, Rodney W. Grimes wrote: > > Since your in here fixing... there is a false positive on the > detection of what is installed when we zero the size of a set, > ie, now that doc.txz is a 0 size set it always thinks you have > doc installed due to rounding errors in the calculation that > says you have x% of this installed. Hi Rod, I'm not sure exactly what you mean here - could you clarify, or create a PR with the details? From owner-svn-src-all@freebsd.org Fri Jan 18 22:54:39 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 37F4E14863DF; Fri, 18 Jan 2019 22:54:39 +0000 (UTC) (envelope-from freebsd@pdx.rh.CN85.dnsmgr.net) Received: from pdx.rh.CN85.dnsmgr.net (br1.CN84in.dnsmgr.net [69.59.192.140]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id AD33080765; Fri, 18 Jan 2019 22:54:38 +0000 (UTC) (envelope-from freebsd@pdx.rh.CN85.dnsmgr.net) Received: from pdx.rh.CN85.dnsmgr.net (localhost [127.0.0.1]) by pdx.rh.CN85.dnsmgr.net (8.13.3/8.13.3) with ESMTP id x0IMsY90057816; Fri, 18 Jan 2019 14:54:35 -0800 (PST) (envelope-from freebsd@pdx.rh.CN85.dnsmgr.net) Received: (from freebsd@localhost) by pdx.rh.CN85.dnsmgr.net (8.13.3/8.13.3/Submit) id x0IMsYYW057815; Fri, 18 Jan 2019 14:54:34 -0800 (PST) (envelope-from freebsd) From: "Rodney W. Grimes" Message-Id: <201901182254.x0IMsYYW057815@pdx.rh.CN85.dnsmgr.net> Subject: Re: svn commit: r343152 - head/usr.sbin/freebsd-update In-Reply-To: To: Ed Maste Date: Fri, 18 Jan 2019 14:54:34 -0800 (PST) CC: "Rodney W. Grimes" , src-committers , svn-src-all@freebsd.org, svn-src-head@freebsd.org Reply-To: rgrimes@freebsd.org X-Mailer: ELM [version 2.4ME+ PL121h (25)] MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=US-ASCII X-Rspamd-Queue-Id: AD33080765 X-Spamd-Bar: ------ Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-6.98 / 15.00]; NEURAL_HAM_MEDIUM(-1.00)[-1.000,0]; NEURAL_HAM_SHORT(-0.98)[-0.976,0]; REPLY(-4.00)[]; NEURAL_HAM_LONG(-1.00)[-1.000,0] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 18 Jan 2019 22:54:39 -0000 > On Fri, 18 Jan 2019 at 12:51, Rodney W. Grimes > wrote: > > > > Since your in here fixing... there is a false positive on the > > detection of what is installed when we zero the size of a set, > > ie, now that doc.txz is a 0 size set it always thinks you have > > doc installed due to rounding errors in the calculation that > > says you have x% of this installed. > > Hi Rod, I'm not sure exactly what you mean here - could you clarify, > or create a PR with the details? During the 12.0 release cycle the doc.txz part of the system went away, we put up an empty tar ball, when freebsd-update evaluates if you have installed this component it says you have, even though you have not. This is caused by function: upgrade_guess_components () { when it does this: join -t ' ' -1 2 -2 2 compfreq.present compfreq.total | while read S P T; do if [ ${P} -gt `expr ${T} / 2` ]; then echo ${S} fi done > comp.present When expr ${T} the count of items in the set is 0 all things are -gt 0 and so it says the component is present. This is an incorrect false positive. > > -- Rod Grimes rgrimes@freebsd.org From owner-svn-src-all@freebsd.org Fri Jan 18 23:00:53 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id AF64314868DA; Fri, 18 Jan 2019 23:00:53 +0000 (UTC) (envelope-from marck@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 5494180CD8; Fri, 18 Jan 2019 23:00:53 +0000 (UTC) (envelope-from marck@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1: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 49EC693C6; Fri, 18 Jan 2019 23:00:53 +0000 (UTC) (envelope-from marck@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x0IN0rks086110; Fri, 18 Jan 2019 23:00:53 GMT (envelope-from marck@FreeBSD.org) Received: (from marck@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x0IN0r84086109; Fri, 18 Jan 2019 23:00:53 GMT (envelope-from marck@FreeBSD.org) Message-Id: <201901182300.x0IN0r84086109@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: marck set sender to marck@FreeBSD.org using -f From: Dmitry Morozovsky Date: Fri, 18 Jan 2019 23:00:53 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r343164 - head/usr.sbin/jail X-SVN-Group: head X-SVN-Commit-Author: marck X-SVN-Commit-Paths: head/usr.sbin/jail X-SVN-Commit-Revision: 343164 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 5494180CD8 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.96 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_SHORT(-0.96)[-0.965,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_LONG(-1.00)[-0.999,0] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 18 Jan 2019 23:00:53 -0000 Author: marck (doc committer) Date: Fri Jan 18 23:00:52 2019 New Revision: 343164 URL: https://svnweb.freebsd.org/changeset/base/343164 Log: Clarify error messages a bit. X-Found-With: r343112 MFC after: 1 month Modified: head/usr.sbin/jail/command.c Modified: head/usr.sbin/jail/command.c ============================================================================== --- head/usr.sbin/jail/command.c Fri Jan 18 22:20:29 2019 (r343163) +++ head/usr.sbin/jail/command.c Fri Jan 18 23:00:52 2019 (r343164) @@ -497,7 +497,7 @@ run_command(struct cfjail *j) argv = alloca(7 * sizeof(char *)); path = string_param(j->intparams[KP_PATH]); if (path == NULL) { - jail_warnx(j, "mount.devfs: no path"); + jail_warnx(j, "mount.devfs: no jail root path defined"); return -1; } devpath = alloca(strlen(path) + 5); @@ -528,7 +528,7 @@ run_command(struct cfjail *j) argv = alloca(7 * sizeof(char *)); path = string_param(j->intparams[KP_PATH]); if (path == NULL) { - jail_warnx(j, "mount.fdescfs: no path"); + jail_warnx(j, "mount.fdescfs: no jail root path defined"); return -1; } devpath = alloca(strlen(path) + 8); @@ -554,7 +554,7 @@ run_command(struct cfjail *j) argv = alloca(7 * sizeof(char *)); path = string_param(j->intparams[KP_PATH]); if (path == NULL) { - jail_warnx(j, "mount.procfs: no path"); + jail_warnx(j, "mount.procfs: no jail root path defined"); return -1; } devpath = alloca(strlen(path) + 6); From owner-svn-src-all@freebsd.org Fri Jan 18 23:26:31 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id DF6A61487149; Fri, 18 Jan 2019 23:26:31 +0000 (UTC) (envelope-from jhibbits@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 8247F818D6; Fri, 18 Jan 2019 23:26:31 +0000 (UTC) (envelope-from jhibbits@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1: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 6FF00988E; Fri, 18 Jan 2019 23:26:31 +0000 (UTC) (envelope-from jhibbits@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x0INQVJ9000129; Fri, 18 Jan 2019 23:26:31 GMT (envelope-from jhibbits@FreeBSD.org) Received: (from jhibbits@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x0INQV5l000128; Fri, 18 Jan 2019 23:26:31 GMT (envelope-from jhibbits@FreeBSD.org) Message-Id: <201901182326.x0INQV5l000128@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jhibbits set sender to jhibbits@FreeBSD.org using -f From: Justin Hibbits Date: Fri, 18 Jan 2019 23:26:31 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r343165 - head/usr.bin/top X-SVN-Group: head X-SVN-Commit-Author: jhibbits X-SVN-Commit-Paths: head/usr.bin/top X-SVN-Commit-Revision: 343165 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 8247F818D6 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.96 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_LONG(-1.00)[-0.999,0]; NEURAL_HAM_SHORT(-0.96)[-0.965,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 18 Jan 2019 23:26:32 -0000 Author: jhibbits Date: Fri Jan 18 23:26:31 2019 New Revision: 343165 URL: https://svnweb.freebsd.org/changeset/base/343165 Log: Fix top(1) long options handling getopt_long(3) requires the long options be terminated by a NULL block. Without the terminator, an invalid long option results in a segmentation fault. Reported by: Brandon Bergren MFC after: 1 week Modified: head/usr.bin/top/top.c Modified: head/usr.bin/top/top.c ============================================================================== --- head/usr.bin/top/top.c Fri Jan 18 23:00:52 2019 (r343164) +++ head/usr.bin/top/top.c Fri Jan 18 23:26:31 2019 (r343165) @@ -110,7 +110,8 @@ static const struct option longopts[] = { { "uids", no_argument, NULL, 'u' }, { "version", no_argument, NULL, 'v' }, { "swap", no_argument, NULL, 'w' }, - { "system-idle-procs", no_argument, NULL, 'z' } + { "system-idle-procs", no_argument, NULL, 'z' }, + { NULL, 0, NULL, 0 } }; static void From owner-svn-src-all@freebsd.org Fri Jan 18 23:54:52 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 2725D1487C0B; Fri, 18 Jan 2019 23:54:52 +0000 (UTC) (envelope-from cem@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 C0DB182880; Fri, 18 Jan 2019 23:54:51 +0000 (UTC) (envelope-from cem@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id B06339D92; Fri, 18 Jan 2019 23:54:51 +0000 (UTC) (envelope-from cem@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x0INspXw015767; Fri, 18 Jan 2019 23:54:51 GMT (envelope-from cem@FreeBSD.org) Received: (from cem@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x0INspeZ015766; Fri, 18 Jan 2019 23:54:51 GMT (envelope-from cem@FreeBSD.org) Message-Id: <201901182354.x0INspeZ015766@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: cem set sender to cem@FreeBSD.org using -f From: Conrad Meyer Date: Fri, 18 Jan 2019 23:54:51 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r343166 - head/sys/amd64/vmm X-SVN-Group: head X-SVN-Commit-Author: cem X-SVN-Commit-Paths: head/sys/amd64/vmm X-SVN-Commit-Revision: 343166 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: C0DB182880 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.96 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_LONG(-1.00)[-0.999,0]; NEURAL_HAM_SHORT(-0.96)[-0.965,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 18 Jan 2019 23:54:52 -0000 Author: cem Date: Fri Jan 18 23:54:51 2019 New Revision: 343166 URL: https://svnweb.freebsd.org/changeset/base/343166 Log: vmm(4): Mask Spectre feature bits on AMD hosts For parity with Intel hosts, which already mask out the CPUID feature bits that indicate the presence of the SPEC_CTRL MSR, do the same on AMD. Eventually we may want to have a better support story for guests, but for now, limit the damage of incorrectly indicating an MSR we do not yet support. Eventually, we may want a generic CPUID override system for administrators, or for minimum supported feature set in heterogenous environments with failover. That is a much larger scope effort than this bug fix. PR: 235010 Reported by: Rys Sommefeldt Sponsored by: Dell EMC Isilon Modified: head/sys/amd64/vmm/x86.c Modified: head/sys/amd64/vmm/x86.c ============================================================================== --- head/sys/amd64/vmm/x86.c Fri Jan 18 23:26:31 2019 (r343165) +++ head/sys/amd64/vmm/x86.c Fri Jan 18 23:54:51 2019 (r343166) @@ -136,6 +136,14 @@ x86_emulate_cpuid(struct vm *vm, int vcpu_id, case CPUID_8000_0008: cpuid_count(*eax, *ecx, regs); if (vmm_is_amd()) { + /* + * As on Intel (0000_0007:0, EDX), mask out + * unsupported or unsafe AMD extended features + * (8000_0008 EBX). + */ + regs[1] &= (AMDFEID_CLZERO | AMDFEID_IRPERF | + AMDFEID_XSAVEERPTR); + vm_get_topology(vm, &sockets, &cores, &threads, &maxcpus); /* From owner-svn-src-all@freebsd.org Sat Jan 19 01:08:51 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id CD5441489D79; Sat, 19 Jan 2019 01:08:51 +0000 (UTC) (envelope-from freebsd@pdx.rh.CN85.dnsmgr.net) Received: from pdx.rh.CN85.dnsmgr.net (br1.CN84in.dnsmgr.net [69.59.192.140]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 21CD185283; Sat, 19 Jan 2019 01:08:50 +0000 (UTC) (envelope-from freebsd@pdx.rh.CN85.dnsmgr.net) Received: from pdx.rh.CN85.dnsmgr.net (localhost [127.0.0.1]) by pdx.rh.CN85.dnsmgr.net (8.13.3/8.13.3) with ESMTP id x0J18kXl058216; Fri, 18 Jan 2019 17:08:46 -0800 (PST) (envelope-from freebsd@pdx.rh.CN85.dnsmgr.net) Received: (from freebsd@localhost) by pdx.rh.CN85.dnsmgr.net (8.13.3/8.13.3/Submit) id x0J18isQ058215; Fri, 18 Jan 2019 17:08:44 -0800 (PST) (envelope-from freebsd) From: "Rodney W. Grimes" Message-Id: <201901190108.x0J18isQ058215@pdx.rh.CN85.dnsmgr.net> Subject: Re: svn commit: r343166 - head/sys/amd64/vmm In-Reply-To: <201901182354.x0INspeZ015766@repo.freebsd.org> To: Conrad Meyer Date: Fri, 18 Jan 2019 17:08:44 -0800 (PST) CC: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Reply-To: rgrimes@freebsd.org X-Mailer: ELM [version 2.4ME+ PL121h (25)] MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=US-ASCII X-Rspamd-Queue-Id: 21CD185283 X-Spamd-Bar: ------ Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-6.97 / 15.00]; NEURAL_HAM_MEDIUM(-1.00)[-1.000,0]; NEURAL_HAM_SHORT(-0.97)[-0.971,0]; REPLY(-4.00)[]; NEURAL_HAM_LONG(-1.00)[-1.000,0] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 19 Jan 2019 01:08:52 -0000 > Author: cem > Date: Fri Jan 18 23:54:51 2019 > New Revision: 343166 > URL: https://svnweb.freebsd.org/changeset/base/343166 > > Log: > vmm(4): Mask Spectre feature bits on AMD hosts > > For parity with Intel hosts, which already mask out the CPUID feature > bits that indicate the presence of the SPEC_CTRL MSR, do the same on > AMD. > > Eventually we may want to have a better support story for guests, but > for now, limit the damage of incorrectly indicating an MSR we do not yet > support. > > Eventually, we may want a generic CPUID override system for > administrators, or for minimum supported feature set in heterogenous > environments with failover. That is a much larger scope effort than > this bug fix. This area has a MAINTAINERS line, could you please respect it. > PR: 235010 > Reported by: Rys Sommefeldt > Sponsored by: Dell EMC Isilon > > Modified: > head/sys/amd64/vmm/x86.c > > Modified: head/sys/amd64/vmm/x86.c > ============================================================================== > --- head/sys/amd64/vmm/x86.c Fri Jan 18 23:26:31 2019 (r343165) > +++ head/sys/amd64/vmm/x86.c Fri Jan 18 23:54:51 2019 (r343166) > @@ -136,6 +136,14 @@ x86_emulate_cpuid(struct vm *vm, int vcpu_id, > case CPUID_8000_0008: > cpuid_count(*eax, *ecx, regs); > if (vmm_is_amd()) { > + /* > + * As on Intel (0000_0007:0, EDX), mask out > + * unsupported or unsafe AMD extended features > + * (8000_0008 EBX). > + */ > + regs[1] &= (AMDFEID_CLZERO | AMDFEID_IRPERF | > + AMDFEID_XSAVEERPTR); > + > vm_get_topology(vm, &sockets, &cores, &threads, > &maxcpus); > /* > > -- Rod Grimes rgrimes@freebsd.org From owner-svn-src-all@freebsd.org Sat Jan 19 04:54:13 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id A818A14960B2; Sat, 19 Jan 2019 04:54:13 +0000 (UTC) (envelope-from jhibbits@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 4DE648DE8F; Sat, 19 Jan 2019 04:54:13 +0000 (UTC) (envelope-from jhibbits@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1: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 370C0DAF2; Sat, 19 Jan 2019 04:54:13 +0000 (UTC) (envelope-from jhibbits@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x0J4sDxt076385; Sat, 19 Jan 2019 04:54:13 GMT (envelope-from jhibbits@FreeBSD.org) Received: (from jhibbits@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x0J4sDiV076384; Sat, 19 Jan 2019 04:54:13 GMT (envelope-from jhibbits@FreeBSD.org) Message-Id: <201901190454.x0J4sDiV076384@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jhibbits set sender to jhibbits@FreeBSD.org using -f From: Justin Hibbits Date: Sat, 19 Jan 2019 04:54:13 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r343168 - head/sys/contrib/ncsw/user/env X-SVN-Group: head X-SVN-Commit-Author: jhibbits X-SVN-Commit-Paths: head/sys/contrib/ncsw/user/env X-SVN-Commit-Revision: 343168 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 4DE648DE8F X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.97 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_LONG(-1.00)[-0.999,0]; NEURAL_HAM_SHORT(-0.98)[-0.976,0] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 19 Jan 2019 04:54:13 -0000 Author: jhibbits Date: Sat Jan 19 04:54:12 2019 New Revision: 343168 URL: https://svnweb.freebsd.org/changeset/base/343168 Log: powerpc/dpaa: Handle DMAP virtual addresses in DPAA sendfile(2) appears to now use DMAP wherever possible. These addresses are not managed by pmap, so pmap_kextract() returns a 0 physical address, causing failure. This change fixes nginx running on P5020 SoC. MFC after: 3 weeks Modified: head/sys/contrib/ncsw/user/env/xx.c Modified: head/sys/contrib/ncsw/user/env/xx.c ============================================================================== --- head/sys/contrib/ncsw/user/env/xx.c Sat Jan 19 04:47:19 2019 (r343167) +++ head/sys/contrib/ncsw/user/env/xx.c Sat Jan 19 04:54:12 2019 (r343168) @@ -701,7 +701,12 @@ XX_VirtToPhys(void *addr) return (XX_PInfo.portal_ci_pa[QM_PORTAL][cpu] + (vm_offset_t)addr - XX_PInfo.portal_ci_va[QM_PORTAL]); - paddr = pmap_kextract((vm_offset_t)addr); + if (PMAP_HAS_DMAP && (vm_offset_t)addr >= DMAP_BASE_ADDRESS && + (vm_offset_t)addr <= DMAP_MAX_ADDRESS) + return (DMAP_TO_PHYS((vm_offset_t)addr)); + else + paddr = pmap_kextract((vm_offset_t)addr); + if (paddr == 0) printf("NetCommSW: " "Unable to translate virtual address %p!\n", addr); @@ -756,6 +761,9 @@ XX_PhysToVirt(physAddress_t addr) if (pv != NULL) return ((void *)(pv->pv_va + ((vm_offset_t)addr & PAGE_MASK))); + + if (PMAP_HAS_DMAP) + return ((void *)PHYS_TO_DMAP(addr)); printf("NetCommSW: " "Unable to translate physical address 0x%09jx!\n", (uintmax_t)addr); From owner-svn-src-all@freebsd.org Sat Jan 19 04:47:20 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 404651495B83; Sat, 19 Jan 2019 04:47:20 +0000 (UTC) (envelope-from jhibbits@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 D5A228D947; Sat, 19 Jan 2019 04:47:19 +0000 (UTC) (envelope-from jhibbits@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1: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 C895FD925; Sat, 19 Jan 2019 04:47:19 +0000 (UTC) (envelope-from jhibbits@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x0J4lJW0071539; Sat, 19 Jan 2019 04:47:19 GMT (envelope-from jhibbits@FreeBSD.org) Received: (from jhibbits@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x0J4lJnP071537; Sat, 19 Jan 2019 04:47:19 GMT (envelope-from jhibbits@FreeBSD.org) Message-Id: <201901190447.x0J4lJnP071537@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jhibbits set sender to jhibbits@FreeBSD.org using -f From: Justin Hibbits Date: Sat, 19 Jan 2019 04:47:19 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r343167 - in head/sys/powerpc: powerpc pseries X-SVN-Group: head X-SVN-Commit-Author: jhibbits X-SVN-Commit-Paths: in head/sys/powerpc: powerpc pseries X-SVN-Commit-Revision: 343167 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: D5A228D947 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.97 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_LONG(-1.00)[-0.999,0]; NEURAL_HAM_SHORT(-0.98)[-0.976,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 19 Jan 2019 04:47:20 -0000 Author: jhibbits Date: Sat Jan 19 04:47:19 2019 New Revision: 343167 URL: https://svnweb.freebsd.org/changeset/base/343167 Log: powerpc: Fix opaque irq data initialization The powerpc_intr structure is not zero-initialized, so on an invariants build would panic in the xics driver with an invalid pointer. Also fix the xics driver to share the private data setup code between xics_enable() and xics_bind(). Reported by: Leonardo Bianconi Modified: head/sys/powerpc/powerpc/intr_machdep.c head/sys/powerpc/pseries/xics.c Modified: head/sys/powerpc/powerpc/intr_machdep.c ============================================================================== --- head/sys/powerpc/powerpc/intr_machdep.c Fri Jan 18 23:54:51 2019 (r343166) +++ head/sys/powerpc/powerpc/intr_machdep.c Sat Jan 19 04:47:19 2019 (r343167) @@ -209,6 +209,7 @@ intr_lookup(u_int irq) i->event = NULL; i->cntp = NULL; + i->priv = NULL; i->trig = INTR_TRIGGER_CONFORM; i->pol = INTR_POLARITY_CONFORM; i->irq = irq; Modified: head/sys/powerpc/pseries/xics.c ============================================================================== --- head/sys/powerpc/pseries/xics.c Fri Jan 18 23:54:51 2019 (r343166) +++ head/sys/powerpc/pseries/xics.c Sat Jan 19 04:47:19 2019 (r343167) @@ -295,6 +295,20 @@ xics_attach(device_t dev) return (0); } +static __inline struct xicp_intvec * +xicp_setup_priv(struct xicp_softc *sc, u_int irq, void **priv) +{ + if (*priv == NULL) { + KASSERT(sc->nintvecs + 1 < nitems(sc->intvecs), + ("Too many XICP interrupts")); + mtx_lock(&sc->sc_mtx); + *priv = &sc->intvecs[sc->nintvecs++]; + mtx_unlock(&sc->sc_mtx); + } + + return (*priv); +} + /* * PIC I/F methods. */ @@ -311,11 +325,8 @@ xicp_bind(device_t dev, u_int irq, cpuset_t cpumask, v if (irq == MAX_XICP_IRQS) return; - if (*priv == NULL) - *priv = &sc->intvecs[sc->nintvecs++]; + iv = xicp_setup_priv(sc, irq, priv); - iv = *priv; - /* * This doesn't appear to actually support affinity groups, so pick a * random CPU. @@ -426,14 +437,7 @@ xicp_enable(device_t dev, u_int irq, u_int vector, voi /* Bind to this CPU to start: distrib. ID is last entry in gserver# */ cpu = PCPU_GET(hwref); - if (*priv == NULL) { - KASSERT(sc->nintvecs + 1 < nitems(sc->intvecs), - ("Too many XICP interrupts")); - mtx_lock(&sc->sc_mtx); - *priv = &sc->intvecs[sc->nintvecs++]; - mtx_unlock(&sc->sc_mtx); - } - intr = *priv; + intr = xicp_setup_priv(sc, irq, priv); intr->irq = irq; intr->vector = vector; From owner-svn-src-all@freebsd.org Sat Jan 19 05:20:32 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id CC3FA1496E68; Sat, 19 Jan 2019 05:20:32 +0000 (UTC) (envelope-from jhibbits@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 70E868EA51; Sat, 19 Jan 2019 05:20:32 +0000 (UTC) (envelope-from jhibbits@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1: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 64B0EDEA9; Sat, 19 Jan 2019 05:20:32 +0000 (UTC) (envelope-from jhibbits@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x0J5KWh5087348; Sat, 19 Jan 2019 05:20:32 GMT (envelope-from jhibbits@FreeBSD.org) Received: (from jhibbits@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x0J5KWUu087347; Sat, 19 Jan 2019 05:20:32 GMT (envelope-from jhibbits@FreeBSD.org) Message-Id: <201901190520.x0J5KWUu087347@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jhibbits set sender to jhibbits@FreeBSD.org using -f From: Justin Hibbits Date: Sat, 19 Jan 2019 05:20:32 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r343169 - head/sys/contrib/ncsw/user/env X-SVN-Group: head X-SVN-Commit-Author: jhibbits X-SVN-Commit-Paths: head/sys/contrib/ncsw/user/env X-SVN-Commit-Revision: 343169 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 70E868EA51 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.97 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_SHORT(-0.98)[-0.976,0]; NEURAL_HAM_LONG(-1.00)[-0.999,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 19 Jan 2019 05:20:33 -0000 Author: jhibbits Date: Sat Jan 19 05:20:31 2019 New Revision: 343169 URL: https://svnweb.freebsd.org/changeset/base/343169 Log: dpaa: fix 32-bit build Book-E powerpc uses 64-bit vm_paddr_t, and 32-bit powerpc has 32-bit pointers, so gcc errors with cast to pointer from integer of different size. As this will not actually be used in reality anyway, simply quiet the warning by casting through uintptr_t. MFC after: 3 weeks MFC with: r343168 Modified: head/sys/contrib/ncsw/user/env/xx.c Modified: head/sys/contrib/ncsw/user/env/xx.c ============================================================================== --- head/sys/contrib/ncsw/user/env/xx.c Sat Jan 19 04:54:12 2019 (r343168) +++ head/sys/contrib/ncsw/user/env/xx.c Sat Jan 19 05:20:31 2019 (r343169) @@ -763,7 +763,7 @@ XX_PhysToVirt(physAddress_t addr) return ((void *)(pv->pv_va + ((vm_offset_t)addr & PAGE_MASK))); if (PMAP_HAS_DMAP) - return ((void *)PHYS_TO_DMAP(addr)); + return ((void *)(uintptr_t)PHYS_TO_DMAP(addr)); printf("NetCommSW: " "Unable to translate physical address 0x%09jx!\n", (uintmax_t)addr); From owner-svn-src-all@freebsd.org Sat Jan 19 10:05:40 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 6E80A14A0F4C; Sat, 19 Jan 2019 10:05:39 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.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 301AF71B38; Sat, 19 Jan 2019 10:05:38 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 0B0201910D; Sat, 19 Jan 2019 10:05:38 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x0JA5cQw041117; Sat, 19 Jan 2019 10:05:38 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x0JA5asp041107; Sat, 19 Jan 2019 10:05:36 GMT (envelope-from dim@FreeBSD.org) Message-Id: <201901191005.x0JA5asp041107@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Sat, 19 Jan 2019 10:05:36 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r343177 - in vendor/libc++/dist: . benchmarks cmake/Modules docs docs/DesignDocs fuzzing include include/experimental include/support/win32 lib lib/abi src src/experimental src/experime... X-SVN-Group: vendor X-SVN-Commit-Author: dim X-SVN-Commit-Paths: in vendor/libc++/dist: . benchmarks cmake/Modules docs docs/DesignDocs fuzzing include include/experimental include/support/win32 lib lib/abi src src/experimental src/experimental/filesystem src/files... X-SVN-Commit-Revision: 343177 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 301AF71B38 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.98 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-1.000,0]; NEURAL_HAM_SHORT(-0.98)[-0.985,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 19 Jan 2019 10:05:40 -0000 Author: dim Date: Sat Jan 19 10:05:35 2019 New Revision: 343177 URL: https://svnweb.freebsd.org/changeset/base/343177 Log: Vendor import of libc++ trunk r351319 (just before the release_80 branch point): https://llvm.org/svn/llvm-project/libcxx/trunk@351319 Added: vendor/libc++/dist/benchmarks/CartesianBenchmarks.hpp vendor/libc++/dist/benchmarks/algorithms.partition_point.bench.cpp vendor/libc++/dist/benchmarks/function.bench.cpp vendor/libc++/dist/benchmarks/lit.cfg.py vendor/libc++/dist/benchmarks/lit.site.cfg.py.in vendor/libc++/dist/benchmarks/ordered_set.bench.cpp vendor/libc++/dist/docs/DesignDocs/FeatureTestMacros.rst vendor/libc++/dist/docs/FeatureTestMacroTable.rst vendor/libc++/dist/docs/ReleaseNotes.rst vendor/libc++/dist/include/bit vendor/libc++/dist/test/libcxx/algorithms/alg.modifying.operations/alg.random.shuffle/random_shuffle.depr_in_cxx14.fail.cpp vendor/libc++/dist/test/libcxx/algorithms/half_positive.pass.cpp vendor/libc++/dist/test/libcxx/containers/sequences/deque/pop_back_empty.pass.cpp vendor/libc++/dist/test/libcxx/containers/sequences/vector/pop_back_empty.pass.cpp vendor/libc++/dist/test/libcxx/containers/sequences/vector/vector.cons/ vendor/libc++/dist/test/libcxx/containers/sequences/vector/vector.cons/construct_iter_iter.pass.cpp vendor/libc++/dist/test/libcxx/containers/sequences/vector/vector.cons/construct_iter_iter_alloc.pass.cpp vendor/libc++/dist/test/libcxx/depr/depr.auto.ptr/auto.ptr/auto_ptr.depr_in_cxx11.fail.cpp vendor/libc++/dist/test/libcxx/depr/depr.function.objects/adaptors.depr_in_cxx11.fail.cpp vendor/libc++/dist/test/libcxx/diagnostics/enable_nodiscard.fail.cpp vendor/libc++/dist/test/libcxx/diagnostics/enable_nodiscard_disable_after_cxx17.fail.cpp vendor/libc++/dist/test/libcxx/diagnostics/enable_nodiscard_disable_nodiscard_ext.fail.cpp vendor/libc++/dist/test/libcxx/diagnostics/nodiscard_aftercxx17.fail.cpp vendor/libc++/dist/test/libcxx/diagnostics/nodiscard_aftercxx17.pass.cpp vendor/libc++/dist/test/libcxx/diagnostics/nodiscard_extensions.fail.cpp vendor/libc++/dist/test/libcxx/diagnostics/nodiscard_extensions.pass.cpp vendor/libc++/dist/test/libcxx/experimental/diagnostics/ vendor/libc++/dist/test/libcxx/experimental/diagnostics/syserr/ vendor/libc++/dist/test/libcxx/experimental/diagnostics/syserr/use_header_warning.fail.cpp vendor/libc++/dist/test/libcxx/experimental/diagnostics/syserr/version.pass.cpp vendor/libc++/dist/test/libcxx/experimental/numerics/ vendor/libc++/dist/test/libcxx/experimental/numerics/numeric.ops/ vendor/libc++/dist/test/libcxx/experimental/numerics/numeric.ops/use_header_warning.fail.cpp vendor/libc++/dist/test/libcxx/experimental/numerics/numeric.ops/version.pass.cpp vendor/libc++/dist/test/libcxx/experimental/strings/ vendor/libc++/dist/test/libcxx/experimental/strings/string.view/ vendor/libc++/dist/test/libcxx/experimental/strings/string.view/use_header_warning.fail.cpp vendor/libc++/dist/test/libcxx/experimental/strings/string.view/version.pass.cpp vendor/libc++/dist/test/libcxx/experimental/utilities/any/ vendor/libc++/dist/test/libcxx/experimental/utilities/any/use_header_warning.fail.cpp vendor/libc++/dist/test/libcxx/experimental/utilities/any/version.pass.cpp vendor/libc++/dist/test/libcxx/experimental/utilities/optional/ vendor/libc++/dist/test/libcxx/experimental/utilities/optional/use_header_warning.fail.cpp vendor/libc++/dist/test/libcxx/experimental/utilities/optional/version.pass.cpp vendor/libc++/dist/test/libcxx/experimental/utilities/ratio/ vendor/libc++/dist/test/libcxx/experimental/utilities/ratio/use_header_warning.fail.cpp vendor/libc++/dist/test/libcxx/experimental/utilities/ratio/version.pass.cpp vendor/libc++/dist/test/libcxx/experimental/utilities/time/ vendor/libc++/dist/test/libcxx/experimental/utilities/time/use_header_warning.fail.cpp vendor/libc++/dist/test/libcxx/experimental/utilities/time/version.pass.cpp vendor/libc++/dist/test/libcxx/experimental/utilities/tuple/ vendor/libc++/dist/test/libcxx/experimental/utilities/tuple/use_header_warning.fail.cpp vendor/libc++/dist/test/libcxx/experimental/utilities/tuple/version.pass.cpp vendor/libc++/dist/test/libcxx/input.output/file.streams/fstreams/fstream.close.pass.cpp vendor/libc++/dist/test/libcxx/language.support/support.dynamic/libcpp_deallocate.sh.cpp vendor/libc++/dist/test/libcxx/libcpp_alignof.pass.cpp vendor/libc++/dist/test/libcxx/memory/aligned_allocation_macro.pass.cpp vendor/libc++/dist/test/libcxx/strings/basic.string/string.modifiers/resize_default_initialized.pass.cpp vendor/libc++/dist/test/libcxx/utilities/optional/optional.object/triviality.abi.pass.cpp vendor/libc++/dist/test/libcxx/utilities/utility/pairs/pairs.pair/U_V.pass.cpp vendor/libc++/dist/test/libcxx/utilities/utility/pairs/pairs.pair/const_first_const_second.pass.cpp vendor/libc++/dist/test/libcxx/utilities/utility/pairs/pairs.pair/const_pair_U_V.pass.cpp vendor/libc++/dist/test/libcxx/utilities/utility/pairs/pairs.pair/default.pass.cpp vendor/libc++/dist/test/libcxx/utilities/utility/pairs/pairs.pair/piecewise.pass.cpp vendor/libc++/dist/test/libcxx/utilities/utility/pairs/pairs.pair/rv_pair_U_V.pass.cpp vendor/libc++/dist/test/std/algorithms/alg.sorting/alg.min.max/requires_forward_iterator.fail.cpp vendor/libc++/dist/test/std/containers/associative/map/map.erasure/ vendor/libc++/dist/test/std/containers/associative/map/map.erasure/erase_if.pass.cpp vendor/libc++/dist/test/std/containers/associative/map/map.modifiers/merge.pass.cpp vendor/libc++/dist/test/std/containers/associative/multimap/multimap.erasure/ vendor/libc++/dist/test/std/containers/associative/multimap/multimap.erasure/erase_if.pass.cpp vendor/libc++/dist/test/std/containers/associative/multimap/multimap.modifiers/merge.pass.cpp vendor/libc++/dist/test/std/containers/associative/multiset/insert_emplace_allocator_requirements.pass.cpp vendor/libc++/dist/test/std/containers/associative/multiset/merge.pass.cpp vendor/libc++/dist/test/std/containers/associative/multiset/multiset.erasure/ vendor/libc++/dist/test/std/containers/associative/multiset/multiset.erasure/erase_if.pass.cpp vendor/libc++/dist/test/std/containers/associative/set/merge.pass.cpp vendor/libc++/dist/test/std/containers/associative/set/set.erasure/ vendor/libc++/dist/test/std/containers/associative/set/set.erasure/erase_if.pass.cpp vendor/libc++/dist/test/std/containers/sequences/deque/deque.erasure/ vendor/libc++/dist/test/std/containers/sequences/deque/deque.erasure/erase.pass.cpp vendor/libc++/dist/test/std/containers/sequences/deque/deque.erasure/erase_if.pass.cpp vendor/libc++/dist/test/std/containers/sequences/deque/deque.modifiers/clear.pass.cpp vendor/libc++/dist/test/std/containers/sequences/forwardlist/forwardlist.erasure/ vendor/libc++/dist/test/std/containers/sequences/forwardlist/forwardlist.erasure/erase.pass.cpp vendor/libc++/dist/test/std/containers/sequences/forwardlist/forwardlist.erasure/erase_if.pass.cpp vendor/libc++/dist/test/std/containers/sequences/list/list.erasure/ vendor/libc++/dist/test/std/containers/sequences/list/list.erasure/erase.pass.cpp vendor/libc++/dist/test/std/containers/sequences/list/list.erasure/erase_if.pass.cpp vendor/libc++/dist/test/std/containers/sequences/vector/vector.erasure/ vendor/libc++/dist/test/std/containers/sequences/vector/vector.erasure/erase.pass.cpp vendor/libc++/dist/test/std/containers/sequences/vector/vector.erasure/erase_if.pass.cpp vendor/libc++/dist/test/std/containers/unord/unord.map/erase_if.pass.cpp vendor/libc++/dist/test/std/containers/unord/unord.map/unord.map.modifiers/merge.pass.cpp vendor/libc++/dist/test/std/containers/unord/unord.multimap/erase_if.pass.cpp vendor/libc++/dist/test/std/containers/unord/unord.multimap/unord.multimap.modifiers/merge.pass.cpp vendor/libc++/dist/test/std/containers/unord/unord.multiset/erase_if.pass.cpp vendor/libc++/dist/test/std/containers/unord/unord.multiset/insert_emplace_allocator_requirements.pass.cpp vendor/libc++/dist/test/std/containers/unord/unord.multiset/merge.pass.cpp vendor/libc++/dist/test/std/containers/unord/unord.set/erase_if.pass.cpp vendor/libc++/dist/test/std/containers/unord/unord.set/merge.pass.cpp vendor/libc++/dist/test/std/depr/depr.lib.binders/depr.lib.bind.1st/bind1st.depr_in_cxx11.fail.cpp vendor/libc++/dist/test/std/depr/depr.lib.binders/depr.lib.bind.2nd/bind2nd.depr_in_cxx11.fail.cpp vendor/libc++/dist/test/std/depr/depr.lib.binders/depr.lib.binder.1st/binder1st.depr_in_cxx11.fail.cpp vendor/libc++/dist/test/std/depr/depr.lib.binders/depr.lib.binder.2nd/binder2nd.depr_in_cxx11.fail.cpp vendor/libc++/dist/test/std/input.output/filesystems/class.path/path.nonmember/append_op.fail.cpp vendor/libc++/dist/test/std/input.output/filesystems/class.path/path.nonmember/comparison_ops.fail.cpp vendor/libc++/dist/test/std/iterators/iterator.primitives/iterator.traits/empty.fail.cpp vendor/libc++/dist/test/std/language.support/support.dynamic/new.delete/new.delete.array/new_size.sh.cpp vendor/libc++/dist/test/std/language.support/support.dynamic/new.delete/new.delete.array/new_size_align.sh.cpp vendor/libc++/dist/test/std/language.support/support.dynamic/new.delete/new.delete.array/new_size_align_nothrow.sh.cpp vendor/libc++/dist/test/std/language.support/support.dynamic/new.delete/new.delete.array/new_size_nothrow.sh.cpp vendor/libc++/dist/test/std/language.support/support.dynamic/new.delete/new.delete.single/new_size_align.sh.cpp vendor/libc++/dist/test/std/language.support/support.dynamic/new.delete/new.delete.single/new_size_align_nothrow.sh.cpp vendor/libc++/dist/test/std/language.support/support.limits/support.limits.general/ vendor/libc++/dist/test/std/language.support/support.limits/support.limits.general/algorithm.version.pass.cpp vendor/libc++/dist/test/std/language.support/support.limits/support.limits.general/any.version.pass.cpp vendor/libc++/dist/test/std/language.support/support.limits/support.limits.general/array.version.pass.cpp vendor/libc++/dist/test/std/language.support/support.limits/support.limits.general/atomic.version.pass.cpp vendor/libc++/dist/test/std/language.support/support.limits/support.limits.general/bit.version.pass.cpp vendor/libc++/dist/test/std/language.support/support.limits/support.limits.general/charconv.pass.cpp vendor/libc++/dist/test/std/language.support/support.limits/support.limits.general/chrono.version.pass.cpp vendor/libc++/dist/test/std/language.support/support.limits/support.limits.general/cmath.version.pass.cpp vendor/libc++/dist/test/std/language.support/support.limits/support.limits.general/compare.version.pass.cpp vendor/libc++/dist/test/std/language.support/support.limits/support.limits.general/complex.version.pass.cpp vendor/libc++/dist/test/std/language.support/support.limits/support.limits.general/concepts.version.pass.cpp vendor/libc++/dist/test/std/language.support/support.limits/support.limits.general/cstddef.version.pass.cpp vendor/libc++/dist/test/std/language.support/support.limits/support.limits.general/deque.version.pass.cpp vendor/libc++/dist/test/std/language.support/support.limits/support.limits.general/exception.version.pass.cpp vendor/libc++/dist/test/std/language.support/support.limits/support.limits.general/execution.version.pass.cpp vendor/libc++/dist/test/std/language.support/support.limits/support.limits.general/filesystem.version.pass.cpp vendor/libc++/dist/test/std/language.support/support.limits/support.limits.general/forward_list.version.pass.cpp vendor/libc++/dist/test/std/language.support/support.limits/support.limits.general/functional.version.pass.cpp vendor/libc++/dist/test/std/language.support/support.limits/support.limits.general/generate_feature_test_macro_components.py (contents, props changed) vendor/libc++/dist/test/std/language.support/support.limits/support.limits.general/iomanip.version.pass.cpp vendor/libc++/dist/test/std/language.support/support.limits/support.limits.general/istream.version.pass.cpp vendor/libc++/dist/test/std/language.support/support.limits/support.limits.general/iterator.version.pass.cpp vendor/libc++/dist/test/std/language.support/support.limits/support.limits.general/limits.version.pass.cpp vendor/libc++/dist/test/std/language.support/support.limits/support.limits.general/list.version.pass.cpp vendor/libc++/dist/test/std/language.support/support.limits/support.limits.general/locale.version.pass.cpp vendor/libc++/dist/test/std/language.support/support.limits/support.limits.general/map.version.pass.cpp vendor/libc++/dist/test/std/language.support/support.limits/support.limits.general/memory.version.pass.cpp vendor/libc++/dist/test/std/language.support/support.limits/support.limits.general/memory_resource.version.pass.cpp vendor/libc++/dist/test/std/language.support/support.limits/support.limits.general/mutex.version.pass.cpp vendor/libc++/dist/test/std/language.support/support.limits/support.limits.general/new.version.pass.cpp vendor/libc++/dist/test/std/language.support/support.limits/support.limits.general/numeric.version.pass.cpp vendor/libc++/dist/test/std/language.support/support.limits/support.limits.general/optional.version.pass.cpp vendor/libc++/dist/test/std/language.support/support.limits/support.limits.general/ostream.version.pass.cpp vendor/libc++/dist/test/std/language.support/support.limits/support.limits.general/regex.version.pass.cpp vendor/libc++/dist/test/std/language.support/support.limits/support.limits.general/scoped_allocator.version.pass.cpp vendor/libc++/dist/test/std/language.support/support.limits/support.limits.general/set.version.pass.cpp vendor/libc++/dist/test/std/language.support/support.limits/support.limits.general/shared_mutex.version.pass.cpp vendor/libc++/dist/test/std/language.support/support.limits/support.limits.general/string.version.pass.cpp vendor/libc++/dist/test/std/language.support/support.limits/support.limits.general/string_view.version.pass.cpp vendor/libc++/dist/test/std/language.support/support.limits/support.limits.general/tuple.version.pass.cpp vendor/libc++/dist/test/std/language.support/support.limits/support.limits.general/type_traits.version.pass.cpp vendor/libc++/dist/test/std/language.support/support.limits/support.limits.general/unordered_map.version.pass.cpp vendor/libc++/dist/test/std/language.support/support.limits/support.limits.general/unordered_set.version.pass.cpp vendor/libc++/dist/test/std/language.support/support.limits/support.limits.general/utility.version.pass.cpp vendor/libc++/dist/test/std/language.support/support.limits/support.limits.general/variant.version.pass.cpp vendor/libc++/dist/test/std/language.support/support.limits/support.limits.general/vector.version.pass.cpp vendor/libc++/dist/test/std/language.support/support.limits/support.limits.general/version.version.pass.cpp vendor/libc++/dist/test/std/numerics/rand/rand.eng/rand.eng.mers/ctor_sseq_all_zero.pass.cpp vendor/libc++/dist/test/std/re/re.alg/re.alg.match/inverted_character_classes.pass.cpp vendor/libc++/dist/test/std/re/re.results/re.results.const/copy.pass.cpp vendor/libc++/dist/test/std/re/re.results/re.results.const/copy_assign.pass.cpp vendor/libc++/dist/test/std/re/re.results/re.results.const/move.pass.cpp vendor/libc++/dist/test/std/re/re.results/re.results.const/move_assign.pass.cpp vendor/libc++/dist/test/std/strings/char.traits/char.traits.specializations/char.traits.specializations.char8_t/ vendor/libc++/dist/test/std/strings/char.traits/char.traits.specializations/char.traits.specializations.char8_t/assign2.pass.cpp vendor/libc++/dist/test/std/strings/char.traits/char.traits.specializations/char.traits.specializations.char8_t/assign3.pass.cpp vendor/libc++/dist/test/std/strings/char.traits/char.traits.specializations/char.traits.specializations.char8_t/compare.pass.cpp vendor/libc++/dist/test/std/strings/char.traits/char.traits.specializations/char.traits.specializations.char8_t/copy.pass.cpp vendor/libc++/dist/test/std/strings/char.traits/char.traits.specializations/char.traits.specializations.char8_t/eof.pass.cpp vendor/libc++/dist/test/std/strings/char.traits/char.traits.specializations/char.traits.specializations.char8_t/eq.pass.cpp vendor/libc++/dist/test/std/strings/char.traits/char.traits.specializations/char.traits.specializations.char8_t/eq_int_type.pass.cpp vendor/libc++/dist/test/std/strings/char.traits/char.traits.specializations/char.traits.specializations.char8_t/find.pass.cpp vendor/libc++/dist/test/std/strings/char.traits/char.traits.specializations/char.traits.specializations.char8_t/length.pass.cpp vendor/libc++/dist/test/std/strings/char.traits/char.traits.specializations/char.traits.specializations.char8_t/lt.pass.cpp vendor/libc++/dist/test/std/strings/char.traits/char.traits.specializations/char.traits.specializations.char8_t/move.pass.cpp vendor/libc++/dist/test/std/strings/char.traits/char.traits.specializations/char.traits.specializations.char8_t/not_eof.pass.cpp vendor/libc++/dist/test/std/strings/char.traits/char.traits.specializations/char.traits.specializations.char8_t/to_char_type.pass.cpp vendor/libc++/dist/test/std/strings/char.traits/char.traits.specializations/char.traits.specializations.char8_t/to_int_type.pass.cpp vendor/libc++/dist/test/std/strings/char.traits/char.traits.specializations/char.traits.specializations.char8_t/types.pass.cpp vendor/libc++/dist/test/std/strings/strings.erasure/ vendor/libc++/dist/test/std/strings/strings.erasure/erase.pass.cpp vendor/libc++/dist/test/std/strings/strings.erasure/erase_if.pass.cpp vendor/libc++/dist/test/std/thread/futures/futures.async/async_race.38682.pass.cpp vendor/libc++/dist/test/std/utilities/function.objects/negators/binary_negate.depr_in_cxx17.fail.cpp vendor/libc++/dist/test/std/utilities/function.objects/negators/not1.depr_in_cxx17.fail.cpp vendor/libc++/dist/test/std/utilities/function.objects/negators/not2.depr_in_cxx17.fail.cpp vendor/libc++/dist/test/std/utilities/function.objects/negators/unary_negate.depr_in_cxx17.fail.cpp vendor/libc++/dist/test/std/utilities/function.objects/refwrap/unwrap_ref_decay.pass.cpp vendor/libc++/dist/test/std/utilities/function.objects/refwrap/unwrap_reference.pass.cpp vendor/libc++/dist/test/std/utilities/meta/meta.trans/meta.trans.other/type_identity.pass.cpp vendor/libc++/dist/test/std/utilities/optional/optional.object/special_members.pass.cpp vendor/libc++/dist/test/std/utilities/optional/optional.object/triviality.pass.cpp vendor/libc++/dist/test/std/utilities/time/days.pass.cpp vendor/libc++/dist/test/std/utilities/time/months.pass.cpp vendor/libc++/dist/test/std/utilities/time/time.cal/ vendor/libc++/dist/test/std/utilities/time/time.cal/euclidian.h vendor/libc++/dist/test/std/utilities/time/time.cal/nothing_to_do.pass.cpp vendor/libc++/dist/test/std/utilities/time/time.cal/time.cal.day/ vendor/libc++/dist/test/std/utilities/time/time.cal/time.cal.day/time.cal.day.members/ vendor/libc++/dist/test/std/utilities/time/time.cal/time.cal.day/time.cal.day.members/ctor.pass.cpp vendor/libc++/dist/test/std/utilities/time/time.cal/time.cal.day/time.cal.day.members/decrement.pass.cpp vendor/libc++/dist/test/std/utilities/time/time.cal/time.cal.day/time.cal.day.members/increment.pass.cpp vendor/libc++/dist/test/std/utilities/time/time.cal/time.cal.day/time.cal.day.members/ok.pass.cpp vendor/libc++/dist/test/std/utilities/time/time.cal/time.cal.day/time.cal.day.members/plus_minus_equal.pass.cpp vendor/libc++/dist/test/std/utilities/time/time.cal/time.cal.day/time.cal.day.nonmembers/ vendor/libc++/dist/test/std/utilities/time/time.cal/time.cal.day/time.cal.day.nonmembers/comparisons.pass.cpp vendor/libc++/dist/test/std/utilities/time/time.cal/time.cal.day/time.cal.day.nonmembers/literals.fail.cpp vendor/libc++/dist/test/std/utilities/time/time.cal/time.cal.day/time.cal.day.nonmembers/literals.pass.cpp vendor/libc++/dist/test/std/utilities/time/time.cal/time.cal.day/time.cal.day.nonmembers/minus.pass.cpp vendor/libc++/dist/test/std/utilities/time/time.cal/time.cal.day/time.cal.day.nonmembers/plus.pass.cpp vendor/libc++/dist/test/std/utilities/time/time.cal/time.cal.day/time.cal.day.nonmembers/streaming.pass.cpp vendor/libc++/dist/test/std/utilities/time/time.cal/time.cal.day/types.pass.cpp vendor/libc++/dist/test/std/utilities/time/time.cal/time.cal.last/ vendor/libc++/dist/test/std/utilities/time/time.cal/time.cal.last/types.pass.cpp vendor/libc++/dist/test/std/utilities/time/time.cal/time.cal.md/ vendor/libc++/dist/test/std/utilities/time/time.cal/time.cal.md/time.cal.md.members/ vendor/libc++/dist/test/std/utilities/time/time.cal/time.cal.md/time.cal.md.members/ctor.pass.cpp vendor/libc++/dist/test/std/utilities/time/time.cal/time.cal.md/time.cal.md.members/day.pass.cpp vendor/libc++/dist/test/std/utilities/time/time.cal/time.cal.md/time.cal.md.members/month.pass.cpp vendor/libc++/dist/test/std/utilities/time/time.cal/time.cal.md/time.cal.md.members/ok.pass.cpp vendor/libc++/dist/test/std/utilities/time/time.cal/time.cal.md/time.cal.md.nonmembers/ vendor/libc++/dist/test/std/utilities/time/time.cal/time.cal.md/time.cal.md.nonmembers/comparisons.pass.cpp vendor/libc++/dist/test/std/utilities/time/time.cal/time.cal.md/time.cal.md.nonmembers/streaming.pass.cpp vendor/libc++/dist/test/std/utilities/time/time.cal/time.cal.md/types.pass.cpp vendor/libc++/dist/test/std/utilities/time/time.cal/time.cal.mdlast/ vendor/libc++/dist/test/std/utilities/time/time.cal/time.cal.mdlast/comparisons.pass.cpp vendor/libc++/dist/test/std/utilities/time/time.cal/time.cal.mdlast/ctor.pass.cpp vendor/libc++/dist/test/std/utilities/time/time.cal/time.cal.mdlast/month.pass.cpp vendor/libc++/dist/test/std/utilities/time/time.cal/time.cal.mdlast/ok.pass.cpp vendor/libc++/dist/test/std/utilities/time/time.cal/time.cal.mdlast/streaming.pass.cpp vendor/libc++/dist/test/std/utilities/time/time.cal/time.cal.mdlast/types.pass.cpp vendor/libc++/dist/test/std/utilities/time/time.cal/time.cal.month/ vendor/libc++/dist/test/std/utilities/time/time.cal/time.cal.month/time.cal.month.members/ vendor/libc++/dist/test/std/utilities/time/time.cal/time.cal.month/time.cal.month.members/ctor.pass.cpp vendor/libc++/dist/test/std/utilities/time/time.cal/time.cal.month/time.cal.month.members/decrement.pass.cpp vendor/libc++/dist/test/std/utilities/time/time.cal/time.cal.month/time.cal.month.members/increment.pass.cpp vendor/libc++/dist/test/std/utilities/time/time.cal/time.cal.month/time.cal.month.members/ok.pass.cpp vendor/libc++/dist/test/std/utilities/time/time.cal/time.cal.month/time.cal.month.members/plus_minus_equal.pass.cpp vendor/libc++/dist/test/std/utilities/time/time.cal/time.cal.month/time.cal.month.nonmembers/ vendor/libc++/dist/test/std/utilities/time/time.cal/time.cal.month/time.cal.month.nonmembers/comparisons.pass.cpp vendor/libc++/dist/test/std/utilities/time/time.cal/time.cal.month/time.cal.month.nonmembers/literals.pass.cpp vendor/libc++/dist/test/std/utilities/time/time.cal/time.cal.month/time.cal.month.nonmembers/minus.pass.cpp vendor/libc++/dist/test/std/utilities/time/time.cal/time.cal.month/time.cal.month.nonmembers/plus.pass.cpp vendor/libc++/dist/test/std/utilities/time/time.cal/time.cal.month/time.cal.month.nonmembers/streaming.pass.cpp vendor/libc++/dist/test/std/utilities/time/time.cal/time.cal.month/types.pass.cpp vendor/libc++/dist/test/std/utilities/time/time.cal/time.cal.mwd/ vendor/libc++/dist/test/std/utilities/time/time.cal/time.cal.mwd/time.cal.mwd.members/ vendor/libc++/dist/test/std/utilities/time/time.cal/time.cal.mwd/time.cal.mwd.members/ctor.pass.cpp vendor/libc++/dist/test/std/utilities/time/time.cal/time.cal.mwd/time.cal.mwd.members/month.pass.cpp vendor/libc++/dist/test/std/utilities/time/time.cal/time.cal.mwd/time.cal.mwd.members/ok.pass.cpp vendor/libc++/dist/test/std/utilities/time/time.cal/time.cal.mwd/time.cal.mwd.members/weekday_indexed.pass.cpp vendor/libc++/dist/test/std/utilities/time/time.cal/time.cal.mwd/time.cal.mwd.nonmembers/ vendor/libc++/dist/test/std/utilities/time/time.cal/time.cal.mwd/time.cal.mwd.nonmembers/comparisons.pass.cpp vendor/libc++/dist/test/std/utilities/time/time.cal/time.cal.mwd/time.cal.mwd.nonmembers/streaming.pass.cpp vendor/libc++/dist/test/std/utilities/time/time.cal/time.cal.mwd/types.pass.cpp vendor/libc++/dist/test/std/utilities/time/time.cal/time.cal.mwdlast/ vendor/libc++/dist/test/std/utilities/time/time.cal/time.cal.mwdlast/time.cal.mwdlast.members/ vendor/libc++/dist/test/std/utilities/time/time.cal/time.cal.mwdlast/time.cal.mwdlast.members/ctor.pass.cpp vendor/libc++/dist/test/std/utilities/time/time.cal/time.cal.mwdlast/time.cal.mwdlast.members/month.pass.cpp vendor/libc++/dist/test/std/utilities/time/time.cal/time.cal.mwdlast/time.cal.mwdlast.members/ok.pass.cpp vendor/libc++/dist/test/std/utilities/time/time.cal/time.cal.mwdlast/time.cal.mwdlast.members/weekday_last.pass.cpp vendor/libc++/dist/test/std/utilities/time/time.cal/time.cal.mwdlast/time.cal.mwdlast.nonmembers/ vendor/libc++/dist/test/std/utilities/time/time.cal/time.cal.mwdlast/time.cal.mwdlast.nonmembers/comparisons.pass.cpp vendor/libc++/dist/test/std/utilities/time/time.cal/time.cal.mwdlast/time.cal.mwdlast.nonmembers/streaming.pass.cpp vendor/libc++/dist/test/std/utilities/time/time.cal/time.cal.mwdlast/types.pass.cpp vendor/libc++/dist/test/std/utilities/time/time.cal/time.cal.operators/ vendor/libc++/dist/test/std/utilities/time/time.cal/time.cal.operators/month_day.pass.cpp vendor/libc++/dist/test/std/utilities/time/time.cal/time.cal.operators/month_day_last.pass.cpp vendor/libc++/dist/test/std/utilities/time/time.cal/time.cal.operators/month_weekday.pass.cpp vendor/libc++/dist/test/std/utilities/time/time.cal/time.cal.operators/month_weekday_last.pass.cpp vendor/libc++/dist/test/std/utilities/time/time.cal/time.cal.operators/year_month.pass.cpp vendor/libc++/dist/test/std/utilities/time/time.cal/time.cal.operators/year_month_day.pass.cpp vendor/libc++/dist/test/std/utilities/time/time.cal/time.cal.operators/year_month_day_last.pass.cpp vendor/libc++/dist/test/std/utilities/time/time.cal/time.cal.operators/year_month_weekday.pass.cpp vendor/libc++/dist/test/std/utilities/time/time.cal/time.cal.operators/year_month_weekday_last.pass.cpp vendor/libc++/dist/test/std/utilities/time/time.cal/time.cal.wdidx/ vendor/libc++/dist/test/std/utilities/time/time.cal/time.cal.wdidx/time.cal.wdidx.members/ vendor/libc++/dist/test/std/utilities/time/time.cal/time.cal.wdidx/time.cal.wdidx.members/ctor.pass.cpp vendor/libc++/dist/test/std/utilities/time/time.cal/time.cal.wdidx/time.cal.wdidx.members/index.pass.cpp vendor/libc++/dist/test/std/utilities/time/time.cal/time.cal.wdidx/time.cal.wdidx.members/ok.pass.cpp vendor/libc++/dist/test/std/utilities/time/time.cal/time.cal.wdidx/time.cal.wdidx.members/weekday.pass.cpp vendor/libc++/dist/test/std/utilities/time/time.cal/time.cal.wdidx/time.cal.wdidx.nonmembers/ vendor/libc++/dist/test/std/utilities/time/time.cal/time.cal.wdidx/time.cal.wdidx.nonmembers/comparisons.pass.cpp vendor/libc++/dist/test/std/utilities/time/time.cal/time.cal.wdidx/time.cal.wdidx.nonmembers/streaming.pass.cpp vendor/libc++/dist/test/std/utilities/time/time.cal/time.cal.wdidx/types.pass.cpp vendor/libc++/dist/test/std/utilities/time/time.cal/time.cal.wdlast/ vendor/libc++/dist/test/std/utilities/time/time.cal/time.cal.wdlast/time.cal.wdlast.members/ vendor/libc++/dist/test/std/utilities/time/time.cal/time.cal.wdlast/time.cal.wdlast.members/ctor.pass.cpp vendor/libc++/dist/test/std/utilities/time/time.cal/time.cal.wdlast/time.cal.wdlast.members/ok.pass.cpp vendor/libc++/dist/test/std/utilities/time/time.cal/time.cal.wdlast/time.cal.wdlast.members/weekday.pass.cpp vendor/libc++/dist/test/std/utilities/time/time.cal/time.cal.wdlast/time.cal.wdlast.nonmembers/ vendor/libc++/dist/test/std/utilities/time/time.cal/time.cal.wdlast/time.cal.wdlast.nonmembers/comparisons.pass.cpp vendor/libc++/dist/test/std/utilities/time/time.cal/time.cal.wdlast/time.cal.wdlast.nonmembers/streaming.pass.cpp vendor/libc++/dist/test/std/utilities/time/time.cal/time.cal.wdlast/types.pass.cpp vendor/libc++/dist/test/std/utilities/time/time.cal/time.cal.weekday/ vendor/libc++/dist/test/std/utilities/time/time.cal/time.cal.weekday/time.cal.weekday.members/ vendor/libc++/dist/test/std/utilities/time/time.cal/time.cal.weekday/time.cal.weekday.members/ctor.local_days.pass.cpp vendor/libc++/dist/test/std/utilities/time/time.cal/time.cal.weekday/time.cal.weekday.members/ctor.pass.cpp vendor/libc++/dist/test/std/utilities/time/time.cal/time.cal.weekday/time.cal.weekday.members/ctor.sys_days.pass.cpp vendor/libc++/dist/test/std/utilities/time/time.cal/time.cal.weekday/time.cal.weekday.members/decrement.pass.cpp vendor/libc++/dist/test/std/utilities/time/time.cal/time.cal.weekday/time.cal.weekday.members/increment.pass.cpp vendor/libc++/dist/test/std/utilities/time/time.cal/time.cal.weekday/time.cal.weekday.members/ok.pass.cpp vendor/libc++/dist/test/std/utilities/time/time.cal/time.cal.weekday/time.cal.weekday.members/operator[].pass.cpp vendor/libc++/dist/test/std/utilities/time/time.cal/time.cal.weekday/time.cal.weekday.members/plus_minus_equal.pass.cpp vendor/libc++/dist/test/std/utilities/time/time.cal/time.cal.weekday/time.cal.weekday.nonmembers/ vendor/libc++/dist/test/std/utilities/time/time.cal/time.cal.weekday/time.cal.weekday.nonmembers/comparisons.pass.cpp vendor/libc++/dist/test/std/utilities/time/time.cal/time.cal.weekday/time.cal.weekday.nonmembers/literals.pass.cpp vendor/libc++/dist/test/std/utilities/time/time.cal/time.cal.weekday/time.cal.weekday.nonmembers/minus.pass.cpp vendor/libc++/dist/test/std/utilities/time/time.cal/time.cal.weekday/time.cal.weekday.nonmembers/plus.pass.cpp vendor/libc++/dist/test/std/utilities/time/time.cal/time.cal.weekday/time.cal.weekday.nonmembers/streaming.pass.cpp vendor/libc++/dist/test/std/utilities/time/time.cal/time.cal.weekday/types.pass.cpp vendor/libc++/dist/test/std/utilities/time/time.cal/time.cal.year/ vendor/libc++/dist/test/std/utilities/time/time.cal/time.cal.year/time.cal.year.members/ vendor/libc++/dist/test/std/utilities/time/time.cal/time.cal.year/time.cal.year.members/ctor.pass.cpp vendor/libc++/dist/test/std/utilities/time/time.cal/time.cal.year/time.cal.year.members/decrement.pass.cpp vendor/libc++/dist/test/std/utilities/time/time.cal/time.cal.year/time.cal.year.members/increment.pass.cpp vendor/libc++/dist/test/std/utilities/time/time.cal/time.cal.year/time.cal.year.members/is_leap.pass.cpp vendor/libc++/dist/test/std/utilities/time/time.cal/time.cal.year/time.cal.year.members/ok.pass.cpp vendor/libc++/dist/test/std/utilities/time/time.cal/time.cal.year/time.cal.year.members/plus_minus.pass.cpp vendor/libc++/dist/test/std/utilities/time/time.cal/time.cal.year/time.cal.year.members/plus_minus_equal.pass.cpp vendor/libc++/dist/test/std/utilities/time/time.cal/time.cal.year/time.cal.year.nonmembers/ vendor/libc++/dist/test/std/utilities/time/time.cal/time.cal.year/time.cal.year.nonmembers/comparisons.pass.cpp vendor/libc++/dist/test/std/utilities/time/time.cal/time.cal.year/time.cal.year.nonmembers/literals.fail.cpp vendor/libc++/dist/test/std/utilities/time/time.cal/time.cal.year/time.cal.year.nonmembers/literals.pass.cpp vendor/libc++/dist/test/std/utilities/time/time.cal/time.cal.year/time.cal.year.nonmembers/minus.pass.cpp vendor/libc++/dist/test/std/utilities/time/time.cal/time.cal.year/time.cal.year.nonmembers/plus.pass.cpp vendor/libc++/dist/test/std/utilities/time/time.cal/time.cal.year/time.cal.year.nonmembers/streaming.pass.cpp vendor/libc++/dist/test/std/utilities/time/time.cal/time.cal.year/types.pass.cpp vendor/libc++/dist/test/std/utilities/time/time.cal/time.cal.ym/ vendor/libc++/dist/test/std/utilities/time/time.cal/time.cal.ym/time.cal.ym.members/ vendor/libc++/dist/test/std/utilities/time/time.cal/time.cal.ym/time.cal.ym.members/ctor.pass.cpp vendor/libc++/dist/test/std/utilities/time/time.cal/time.cal.ym/time.cal.ym.members/month.pass.cpp vendor/libc++/dist/test/std/utilities/time/time.cal/time.cal.ym/time.cal.ym.members/ok.pass.cpp vendor/libc++/dist/test/std/utilities/time/time.cal/time.cal.ym/time.cal.ym.members/plus_minus_equal_month.pass.cpp vendor/libc++/dist/test/std/utilities/time/time.cal/time.cal.ym/time.cal.ym.members/plus_minus_equal_year.pass.cpp vendor/libc++/dist/test/std/utilities/time/time.cal/time.cal.ym/time.cal.ym.members/year.pass.cpp vendor/libc++/dist/test/std/utilities/time/time.cal/time.cal.ym/time.cal.ym.nonmembers/ vendor/libc++/dist/test/std/utilities/time/time.cal/time.cal.ym/time.cal.ym.nonmembers/comparisons.pass.cpp vendor/libc++/dist/test/std/utilities/time/time.cal/time.cal.ym/time.cal.ym.nonmembers/minus.pass.cpp vendor/libc++/dist/test/std/utilities/time/time.cal/time.cal.ym/time.cal.ym.nonmembers/plus.pass.cpp vendor/libc++/dist/test/std/utilities/time/time.cal/time.cal.ym/time.cal.ym.nonmembers/streaming.pass.cpp vendor/libc++/dist/test/std/utilities/time/time.cal/time.cal.ym/types.pass.cpp vendor/libc++/dist/test/std/utilities/time/time.cal/time.cal.ymd/ vendor/libc++/dist/test/std/utilities/time/time.cal/time.cal.ymd/time.cal.ymd.members/ vendor/libc++/dist/test/std/utilities/time/time.cal/time.cal.ymd/time.cal.ymd.members/ctor.local_days.pass.cpp vendor/libc++/dist/test/std/utilities/time/time.cal/time.cal.ymd/time.cal.ymd.members/ctor.pass.cpp vendor/libc++/dist/test/std/utilities/time/time.cal/time.cal.ymd/time.cal.ymd.members/ctor.sys_days.pass.cpp vendor/libc++/dist/test/std/utilities/time/time.cal/time.cal.ymd/time.cal.ymd.members/ctor.year_month_day_last.pass.cpp vendor/libc++/dist/test/std/utilities/time/time.cal/time.cal.ymd/time.cal.ymd.members/day.pass.cpp vendor/libc++/dist/test/std/utilities/time/time.cal/time.cal.ymd/time.cal.ymd.members/month.pass.cpp vendor/libc++/dist/test/std/utilities/time/time.cal/time.cal.ymd/time.cal.ymd.members/ok.pass.cpp vendor/libc++/dist/test/std/utilities/time/time.cal/time.cal.ymd/time.cal.ymd.members/op.local_days.pass.cpp vendor/libc++/dist/test/std/utilities/time/time.cal/time.cal.ymd/time.cal.ymd.members/op.sys_days.pass.cpp vendor/libc++/dist/test/std/utilities/time/time.cal/time.cal.ymd/time.cal.ymd.members/plus_minus_equal_month.pass.cpp vendor/libc++/dist/test/std/utilities/time/time.cal/time.cal.ymd/time.cal.ymd.members/plus_minus_equal_year.pass.cpp vendor/libc++/dist/test/std/utilities/time/time.cal/time.cal.ymd/time.cal.ymd.members/year.pass.cpp vendor/libc++/dist/test/std/utilities/time/time.cal/time.cal.ymd/time.cal.ymd.nonmembers/ vendor/libc++/dist/test/std/utilities/time/time.cal/time.cal.ymd/time.cal.ymd.nonmembers/comparisons.pass.cpp vendor/libc++/dist/test/std/utilities/time/time.cal/time.cal.ymd/time.cal.ymd.nonmembers/minus.pass.cpp vendor/libc++/dist/test/std/utilities/time/time.cal/time.cal.ymd/time.cal.ymd.nonmembers/plus.pass.cpp vendor/libc++/dist/test/std/utilities/time/time.cal/time.cal.ymd/time.cal.ymd.nonmembers/streaming.pass.cpp vendor/libc++/dist/test/std/utilities/time/time.cal/time.cal.ymd/types.pass.cpp vendor/libc++/dist/test/std/utilities/time/time.cal/time.cal.ymdlast/ vendor/libc++/dist/test/std/utilities/time/time.cal/time.cal.ymdlast/time.cal.ymdlast.members/ vendor/libc++/dist/test/std/utilities/time/time.cal/time.cal.ymdlast/time.cal.ymdlast.members/ctor.pass.cpp vendor/libc++/dist/test/std/utilities/time/time.cal/time.cal.ymdlast/time.cal.ymdlast.members/day.pass.cpp vendor/libc++/dist/test/std/utilities/time/time.cal/time.cal.ymdlast/time.cal.ymdlast.members/month.pass.cpp vendor/libc++/dist/test/std/utilities/time/time.cal/time.cal.ymdlast/time.cal.ymdlast.members/month_day_last.pass.cpp vendor/libc++/dist/test/std/utilities/time/time.cal/time.cal.ymdlast/time.cal.ymdlast.members/ok.pass.cpp vendor/libc++/dist/test/std/utilities/time/time.cal/time.cal.ymdlast/time.cal.ymdlast.members/op_local_days.pass.cpp vendor/libc++/dist/test/std/utilities/time/time.cal/time.cal.ymdlast/time.cal.ymdlast.members/op_sys_days.pass.cpp vendor/libc++/dist/test/std/utilities/time/time.cal/time.cal.ymdlast/time.cal.ymdlast.members/plus_minus_equal_month.pass.cpp vendor/libc++/dist/test/std/utilities/time/time.cal/time.cal.ymdlast/time.cal.ymdlast.members/plus_minus_equal_year.pass.cpp vendor/libc++/dist/test/std/utilities/time/time.cal/time.cal.ymdlast/time.cal.ymdlast.members/year.pass.cpp vendor/libc++/dist/test/std/utilities/time/time.cal/time.cal.ymdlast/time.cal.ymdlast.nonmembers/ vendor/libc++/dist/test/std/utilities/time/time.cal/time.cal.ymdlast/time.cal.ymdlast.nonmembers/comparisons.pass.cpp vendor/libc++/dist/test/std/utilities/time/time.cal/time.cal.ymdlast/time.cal.ymdlast.nonmembers/minus.pass.cpp vendor/libc++/dist/test/std/utilities/time/time.cal/time.cal.ymdlast/time.cal.ymdlast.nonmembers/plus.pass.cpp vendor/libc++/dist/test/std/utilities/time/time.cal/time.cal.ymdlast/time.cal.ymdlast.nonmembers/streaming.pass.cpp vendor/libc++/dist/test/std/utilities/time/time.cal/time.cal.ymwd/ vendor/libc++/dist/test/std/utilities/time/time.cal/time.cal.ymwd/time.cal.ymwd.members/ vendor/libc++/dist/test/std/utilities/time/time.cal/time.cal.ymwd/time.cal.ymwd.members/ctor.local_days.pass.cpp vendor/libc++/dist/test/std/utilities/time/time.cal/time.cal.ymwd/time.cal.ymwd.members/ctor.pass.cpp vendor/libc++/dist/test/std/utilities/time/time.cal/time.cal.ymwd/time.cal.ymwd.members/ctor.sys_days.pass.cpp vendor/libc++/dist/test/std/utilities/time/time.cal/time.cal.ymwd/time.cal.ymwd.members/index.pass.cpp vendor/libc++/dist/test/std/utilities/time/time.cal/time.cal.ymwd/time.cal.ymwd.members/month.pass.cpp vendor/libc++/dist/test/std/utilities/time/time.cal/time.cal.ymwd/time.cal.ymwd.members/ok.pass.cpp vendor/libc++/dist/test/std/utilities/time/time.cal/time.cal.ymwd/time.cal.ymwd.members/op.local_days.pass.cpp vendor/libc++/dist/test/std/utilities/time/time.cal/time.cal.ymwd/time.cal.ymwd.members/op.sys_days.pass.cpp vendor/libc++/dist/test/std/utilities/time/time.cal/time.cal.ymwd/time.cal.ymwd.members/plus_minus_equal_month.pass.cpp vendor/libc++/dist/test/std/utilities/time/time.cal/time.cal.ymwd/time.cal.ymwd.members/plus_minus_equal_year.pass.cpp vendor/libc++/dist/test/std/utilities/time/time.cal/time.cal.ymwd/time.cal.ymwd.members/weekday.pass.cpp vendor/libc++/dist/test/std/utilities/time/time.cal/time.cal.ymwd/time.cal.ymwd.members/weekday_indexed.pass.cpp vendor/libc++/dist/test/std/utilities/time/time.cal/time.cal.ymwd/time.cal.ymwd.members/year.pass.cpp vendor/libc++/dist/test/std/utilities/time/time.cal/time.cal.ymwd/time.cal.ymwd.nonmembers/ vendor/libc++/dist/test/std/utilities/time/time.cal/time.cal.ymwd/time.cal.ymwd.nonmembers/comparisons.pass.cpp vendor/libc++/dist/test/std/utilities/time/time.cal/time.cal.ymwd/time.cal.ymwd.nonmembers/minus.pass.cpp vendor/libc++/dist/test/std/utilities/time/time.cal/time.cal.ymwd/time.cal.ymwd.nonmembers/plus.pass.cpp vendor/libc++/dist/test/std/utilities/time/time.cal/time.cal.ymwd/time.cal.ymwd.nonmembers/streaming.pass.cpp vendor/libc++/dist/test/std/utilities/time/time.cal/time.cal.ymwd/types.pass.cpp vendor/libc++/dist/test/std/utilities/time/time.cal/time.cal.ymwdlast/ vendor/libc++/dist/test/std/utilities/time/time.cal/time.cal.ymwdlast/time.cal.ymwdlast.members/ vendor/libc++/dist/test/std/utilities/time/time.cal/time.cal.ymwdlast/time.cal.ymwdlast.members/ctor.pass.cpp vendor/libc++/dist/test/std/utilities/time/time.cal/time.cal.ymwdlast/time.cal.ymwdlast.members/month.pass.cpp vendor/libc++/dist/test/std/utilities/time/time.cal/time.cal.ymwdlast/time.cal.ymwdlast.members/ok.pass.cpp vendor/libc++/dist/test/std/utilities/time/time.cal/time.cal.ymwdlast/time.cal.ymwdlast.members/op_local_days.pass.cpp vendor/libc++/dist/test/std/utilities/time/time.cal/time.cal.ymwdlast/time.cal.ymwdlast.members/op_sys_days.pass.cpp vendor/libc++/dist/test/std/utilities/time/time.cal/time.cal.ymwdlast/time.cal.ymwdlast.members/plus_minus_equal_month.pass.cpp vendor/libc++/dist/test/std/utilities/time/time.cal/time.cal.ymwdlast/time.cal.ymwdlast.members/plus_minus_equal_year.pass.cpp vendor/libc++/dist/test/std/utilities/time/time.cal/time.cal.ymwdlast/time.cal.ymwdlast.members/weekday.pass.cpp vendor/libc++/dist/test/std/utilities/time/time.cal/time.cal.ymwdlast/time.cal.ymwdlast.members/year.pass.cpp vendor/libc++/dist/test/std/utilities/time/time.cal/time.cal.ymwdlast/time.cal.ymwdlast.nonmembers/ vendor/libc++/dist/test/std/utilities/time/time.cal/time.cal.ymwdlast/time.cal.ymwdlast.nonmembers/comparisons.pass.cpp vendor/libc++/dist/test/std/utilities/time/time.cal/time.cal.ymwdlast/time.cal.ymwdlast.nonmembers/minus.pass.cpp vendor/libc++/dist/test/std/utilities/time/time.cal/time.cal.ymwdlast/time.cal.ymwdlast.nonmembers/plus.pass.cpp vendor/libc++/dist/test/std/utilities/time/time.cal/time.cal.ymwdlast/time.cal.ymwdlast.nonmembers/streaming.pass.cpp vendor/libc++/dist/test/std/utilities/time/time.cal/time.cal.ymwdlast/types.pass.cpp vendor/libc++/dist/test/std/utilities/time/time.clock/time.clock.file/ vendor/libc++/dist/test/std/utilities/time/time.clock/time.clock.file/consistency.pass.cpp vendor/libc++/dist/test/std/utilities/time/time.clock/time.clock.file/file_time.pass.cpp vendor/libc++/dist/test/std/utilities/time/time.clock/time.clock.file/now.pass.cpp vendor/libc++/dist/test/std/utilities/time/time.clock/time.clock.file/rep_signed.pass.cpp vendor/libc++/dist/test/std/utilities/time/time.clock/time.clock.system/local_time.types.pass.cpp vendor/libc++/dist/test/std/utilities/time/time.clock/time.clock.system/sys.time.types.pass.cpp vendor/libc++/dist/test/std/utilities/time/weeks.pass.cpp vendor/libc++/dist/test/std/utilities/time/years.pass.cpp vendor/libc++/dist/test/std/utilities/variant/variant.relops/relops_bool_conv.fail.cpp vendor/libc++/dist/test/support/truncate_fp.h vendor/libc++/dist/utils/ci/ vendor/libc++/dist/utils/ci/macos-backdeployment.sh (contents, props changed) vendor/libc++/dist/utils/ci/macos-trunk.sh (contents, props changed) vendor/libc++/dist/utils/docker/ vendor/libc++/dist/utils/docker/build_docker_image.sh (contents, props changed) vendor/libc++/dist/utils/docker/debian9/ vendor/libc++/dist/utils/docker/debian9/Dockerfile vendor/libc++/dist/utils/docker/scripts/ vendor/libc++/dist/utils/docker/scripts/build_gcc.sh (contents, props changed) vendor/libc++/dist/utils/docker/scripts/build_install_llvm.sh (contents, props changed) vendor/libc++/dist/utils/docker/scripts/checkout_git.sh (contents, props changed) vendor/libc++/dist/utils/docker/scripts/docker_start_buildbots.sh (contents, props changed) vendor/libc++/dist/utils/docker/scripts/install_clang_packages.sh (contents, props changed) vendor/libc++/dist/utils/docker/scripts/run_buildbot.sh (contents, props changed) vendor/libc++/dist/utils/google-benchmark/.clang-format vendor/libc++/dist/utils/google-benchmark/.travis-libcxx-setup.sh vendor/libc++/dist/utils/google-benchmark/.travis.yml vendor/libc++/dist/utils/google-benchmark/.ycm_extra_conf.py vendor/libc++/dist/utils/google-benchmark/WORKSPACE vendor/libc++/dist/utils/google-benchmark/appveyor.yml vendor/libc++/dist/utils/google-benchmark/mingw.py vendor/libc++/dist/utils/google-benchmark/src/benchmark_api_internal.cc vendor/libc++/dist/utils/google-benchmark/src/benchmark_runner.cc vendor/libc++/dist/utils/google-benchmark/src/benchmark_runner.h vendor/libc++/dist/utils/google-benchmark/test/AssemblyTests.cmake vendor/libc++/dist/utils/google-benchmark/test/display_aggregates_only_test.cc vendor/libc++/dist/utils/google-benchmark/test/memory_manager_test.cc vendor/libc++/dist/utils/google-benchmark/test/report_aggregates_only_test.cc vendor/libc++/dist/utils/google-benchmark/test/user_counters_thousands_test.cc vendor/libc++/dist/utils/libcxx/test/googlebenchmark.py Deleted: vendor/libc++/dist/include/experimental/dynarray vendor/libc++/dist/src/experimental/filesystem/ vendor/libc++/dist/test/libcxx/containers/sequences/list/list.special/ vendor/libc++/dist/test/libcxx/depr/depr.function.objects/depr.adaptors/ vendor/libc++/dist/test/libcxx/diagnostics/nodiscard.fail.cpp vendor/libc++/dist/test/libcxx/experimental/containers/ vendor/libc++/dist/test/libcxx/experimental/filesystem/class.directory_entry/ vendor/libc++/dist/test/libcxx/experimental/filesystem/class.path/ vendor/libc++/dist/test/libcxx/language.support/support.dynamic/alloc.errors/ vendor/libc++/dist/test/libcxx/test/ vendor/libc++/dist/test/libcxx/thread/thread.mutex/thread.lock/ vendor/libc++/dist/test/libcxx/type_traits/is_floating_point.pass.cpp vendor/libc++/dist/test/libcxx/utilities/variant/variant.variant/variant.assign/ vendor/libc++/dist/test/libcxx/utilities/variant/variant.variant/variant.ctor/ vendor/libc++/dist/test/std/containers/associative/multiset/insert_allocator_requirements.pass.cpp vendor/libc++/dist/test/std/containers/unord/unord.multiset/insert_allocator_requirements.pass.cpp vendor/libc++/dist/test/std/containers/views/span.comparison/ vendor/libc++/dist/test/std/experimental/filesystem/Inputs/ vendor/libc++/dist/test/std/experimental/filesystem/class.directory_entry/ vendor/libc++/dist/test/std/experimental/filesystem/class.directory_iterator/ vendor/libc++/dist/test/std/experimental/filesystem/class.file_status/ vendor/libc++/dist/test/std/experimental/filesystem/class.filesystem_error/ vendor/libc++/dist/test/std/experimental/filesystem/class.path/ vendor/libc++/dist/test/std/experimental/filesystem/class.rec.dir.itr/ vendor/libc++/dist/test/std/experimental/filesystem/fs.enum/ vendor/libc++/dist/test/std/experimental/filesystem/fs.error.report/ vendor/libc++/dist/test/std/experimental/filesystem/fs.filesystem.synopsis/ vendor/libc++/dist/test/std/experimental/filesystem/fs.op.funcs/ vendor/libc++/dist/test/std/input.output/file.streams/c.files/no.global.filesystem.namespace/ vendor/libc++/dist/test/std/language.support/support.dynamic/new.delete/new.delete.array/new_size.fail.cpp vendor/libc++/dist/test/std/language.support/support.dynamic/new.delete/new.delete.array/new_size_align.fail.cpp vendor/libc++/dist/test/std/language.support/support.dynamic/new.delete/new.delete.array/new_size_align_nothrow.fail.cpp vendor/libc++/dist/test/std/language.support/support.dynamic/new.delete/new.delete.array/new_size_nothrow.fail.cpp vendor/libc++/dist/test/std/language.support/support.dynamic/new.delete/new.delete.single/new_size_align.fail.cpp vendor/libc++/dist/test/std/language.support/support.dynamic/new.delete/new.delete.single/new_size_align_nothrow.fail.cpp vendor/libc++/dist/test/std/utilities/memory/unique.ptr/unique.ptr.create/ vendor/libc++/dist/test/std/utilities/memory/unique.ptr/unique.ptr.dltr/ vendor/libc++/dist/test/std/utilities/memory/unique.ptr/unique.ptr.runtime/ vendor/libc++/dist/test/std/utilities/memory/unique.ptr/unique.ptr.single/ vendor/libc++/dist/test/std/utilities/optional/optional.object/optional.object.ctor/copy.fail.cpp vendor/libc++/dist/test/std/utilities/optional/optional.object/special_member_gen.pass.cpp vendor/libc++/dist/utils/gen_link_script/ vendor/libc++/dist/utils/google-benchmark/tools/compare_bench.py vendor/libc++/dist/utils/not/ vendor/libc++/dist/utils/sym_check/ Modified: vendor/libc++/dist/CMakeLists.txt vendor/libc++/dist/LICENSE.TXT vendor/libc++/dist/appveyor-reqs-install.cmd vendor/libc++/dist/appveyor.yml vendor/libc++/dist/benchmarks/CMakeLists.txt vendor/libc++/dist/benchmarks/algorithms.bench.cpp vendor/libc++/dist/benchmarks/string.bench.cpp vendor/libc++/dist/benchmarks/stringstream.bench.cpp vendor/libc++/dist/benchmarks/unordered_set_operations.bench.cpp vendor/libc++/dist/cmake/Modules/HandleCompilerRT.cmake vendor/libc++/dist/cmake/Modules/HandleLibCXXABI.cmake vendor/libc++/dist/cmake/Modules/HandleLibcxxFlags.cmake vendor/libc++/dist/docs/BuildingLibcxx.rst vendor/libc++/dist/docs/DesignDocs/AvailabilityMarkup.rst vendor/libc++/dist/docs/DesignDocs/CapturingConfigInfo.rst vendor/libc++/dist/docs/DesignDocs/VisibilityMacros.rst vendor/libc++/dist/docs/TestingLibcxx.rst vendor/libc++/dist/docs/UsingLibcxx.rst vendor/libc++/dist/docs/conf.py vendor/libc++/dist/docs/index.rst vendor/libc++/dist/fuzzing/fuzzing.cpp vendor/libc++/dist/include/CMakeLists.txt vendor/libc++/dist/include/__bit_reference vendor/libc++/dist/include/__config vendor/libc++/dist/include/__config_site.in vendor/libc++/dist/include/__debug vendor/libc++/dist/include/__functional_base vendor/libc++/dist/include/__hash_table vendor/libc++/dist/include/__libcpp_version vendor/libc++/dist/include/__locale vendor/libc++/dist/include/__mutex_base vendor/libc++/dist/include/__node_handle vendor/libc++/dist/include/__sso_allocator vendor/libc++/dist/include/__string vendor/libc++/dist/include/__threading_support vendor/libc++/dist/include/__tree vendor/libc++/dist/include/__tuple vendor/libc++/dist/include/algorithm vendor/libc++/dist/include/any vendor/libc++/dist/include/array vendor/libc++/dist/include/atomic vendor/libc++/dist/include/bitset vendor/libc++/dist/include/charconv vendor/libc++/dist/include/chrono vendor/libc++/dist/include/cmath vendor/libc++/dist/include/complex vendor/libc++/dist/include/cstddef vendor/libc++/dist/include/cstdlib vendor/libc++/dist/include/ctime vendor/libc++/dist/include/deque vendor/libc++/dist/include/exception vendor/libc++/dist/include/experimental/any vendor/libc++/dist/include/experimental/chrono vendor/libc++/dist/include/experimental/coroutine vendor/libc++/dist/include/experimental/memory_resource vendor/libc++/dist/include/experimental/numeric vendor/libc++/dist/include/experimental/optional vendor/libc++/dist/include/experimental/ratio vendor/libc++/dist/include/experimental/string_view vendor/libc++/dist/include/experimental/system_error vendor/libc++/dist/include/experimental/tuple vendor/libc++/dist/include/filesystem vendor/libc++/dist/include/forward_list vendor/libc++/dist/include/fstream vendor/libc++/dist/include/functional vendor/libc++/dist/include/future vendor/libc++/dist/include/iomanip vendor/libc++/dist/include/iosfwd vendor/libc++/dist/include/istream vendor/libc++/dist/include/iterator vendor/libc++/dist/include/limits vendor/libc++/dist/include/list vendor/libc++/dist/include/locale vendor/libc++/dist/include/map vendor/libc++/dist/include/memory vendor/libc++/dist/include/module.modulemap vendor/libc++/dist/include/mutex vendor/libc++/dist/include/new vendor/libc++/dist/include/numeric vendor/libc++/dist/include/optional vendor/libc++/dist/include/ostream vendor/libc++/dist/include/random vendor/libc++/dist/include/regex vendor/libc++/dist/include/scoped_allocator vendor/libc++/dist/include/set vendor/libc++/dist/include/shared_mutex vendor/libc++/dist/include/span vendor/libc++/dist/include/sstream vendor/libc++/dist/include/stddef.h vendor/libc++/dist/include/stdexcept vendor/libc++/dist/include/streambuf vendor/libc++/dist/include/string vendor/libc++/dist/include/string_view vendor/libc++/dist/include/support/win32/locale_win32.h vendor/libc++/dist/include/thread vendor/libc++/dist/include/tuple vendor/libc++/dist/include/type_traits vendor/libc++/dist/include/typeinfo vendor/libc++/dist/include/unordered_map vendor/libc++/dist/include/unordered_set vendor/libc++/dist/include/utility vendor/libc++/dist/include/valarray vendor/libc++/dist/include/variant vendor/libc++/dist/include/vector vendor/libc++/dist/include/version vendor/libc++/dist/lib/CMakeLists.txt vendor/libc++/dist/lib/abi/CHANGELOG.TXT vendor/libc++/dist/lib/abi/CMakeLists.txt vendor/libc++/dist/lib/abi/x86_64-apple-darwin.v1.abilist vendor/libc++/dist/lib/abi/x86_64-apple-darwin.v2.abilist vendor/libc++/dist/lib/abi/x86_64-unknown-linux-gnu.v1.abilist vendor/libc++/dist/lib/libc++abi2.exp vendor/libc++/dist/src/experimental/memory_resource.cpp vendor/libc++/dist/src/filesystem/filesystem_common.h vendor/libc++/dist/src/filesystem/operations.cpp vendor/libc++/dist/src/future.cpp vendor/libc++/dist/src/iostream.cpp vendor/libc++/dist/src/new.cpp vendor/libc++/dist/src/support/runtime/exception_fallback.ipp vendor/libc++/dist/src/support/runtime/exception_glibcxx.ipp vendor/libc++/dist/src/support/runtime/exception_libcxxrt.ipp vendor/libc++/dist/src/support/runtime/exception_msvc.ipp vendor/libc++/dist/src/thread.cpp vendor/libc++/dist/test/CMakeLists.txt vendor/libc++/dist/test/libcxx/algorithms/alg.modifying.operations/alg.random.shuffle/random_shuffle.cxx1z.pass.cpp vendor/libc++/dist/test/libcxx/algorithms/debug_less.pass.cpp vendor/libc++/dist/test/libcxx/containers/associative/non_const_comparator.fail.cpp vendor/libc++/dist/test/libcxx/containers/sequences/vector/db_back.pass.cpp vendor/libc++/dist/test/libcxx/containers/sequences/vector/db_cback.pass.cpp vendor/libc++/dist/test/libcxx/containers/sequences/vector/db_cfront.pass.cpp vendor/libc++/dist/test/libcxx/containers/sequences/vector/db_cindex.pass.cpp vendor/libc++/dist/test/libcxx/containers/sequences/vector/db_front.pass.cpp vendor/libc++/dist/test/libcxx/containers/sequences/vector/db_index.pass.cpp vendor/libc++/dist/test/libcxx/containers/sequences/vector/db_iterators_2.pass.cpp vendor/libc++/dist/test/libcxx/containers/sequences/vector/db_iterators_3.pass.cpp vendor/libc++/dist/test/libcxx/containers/sequences/vector/db_iterators_4.pass.cpp vendor/libc++/dist/test/libcxx/containers/sequences/vector/db_iterators_5.pass.cpp vendor/libc++/dist/test/libcxx/containers/sequences/vector/db_iterators_6.pass.cpp vendor/libc++/dist/test/libcxx/containers/sequences/vector/db_iterators_7.pass.cpp vendor/libc++/dist/test/libcxx/containers/sequences/vector/db_iterators_8.pass.cpp vendor/libc++/dist/test/libcxx/containers/unord/non_const_comparator.fail.cpp vendor/libc++/dist/test/libcxx/containers/unord/unord.map/db_iterators_7.pass.cpp vendor/libc++/dist/test/libcxx/containers/unord/unord.map/db_iterators_8.pass.cpp vendor/libc++/dist/test/libcxx/containers/unord/unord.map/db_local_iterators_7.pass.cpp vendor/libc++/dist/test/libcxx/containers/unord/unord.map/db_local_iterators_8.pass.cpp vendor/libc++/dist/test/libcxx/depr/depr.function.objects/depr.adaptors.cxx1z.pass.cpp vendor/libc++/dist/test/libcxx/diagnostics/nodiscard.pass.cpp vendor/libc++/dist/test/libcxx/double_include.sh.cpp vendor/libc++/dist/test/libcxx/experimental/memory/memory.polymorphic.allocator.class/memory.polymorphic.allocator.mem/construct_piecewise_pair.pass.cpp vendor/libc++/dist/test/libcxx/experimental/memory/memory.resource.adaptor/memory.resource.adaptor.mem/db_deallocate.pass.cpp vendor/libc++/dist/test/libcxx/language.support/cxa_deleted_virtual.pass.cpp vendor/libc++/dist/test/libcxx/language.support/has_c11_features.pass.cpp vendor/libc++/dist/test/libcxx/language.support/support.dynamic/new_faligned_allocation.sh.cpp vendor/libc++/dist/test/libcxx/min_max_macros.sh.cpp vendor/libc++/dist/test/libcxx/strings/basic.string/string.modifiers/erase_iter_db1.pass.cpp vendor/libc++/dist/test/libcxx/strings/basic.string/string.modifiers/erase_iter_db2.pass.cpp vendor/libc++/dist/test/libcxx/strings/basic.string/string.modifiers/erase_iter_iter_db1.pass.cpp vendor/libc++/dist/test/libcxx/strings/basic.string/string.modifiers/erase_iter_iter_db2.pass.cpp vendor/libc++/dist/test/libcxx/strings/basic.string/string.modifiers/erase_iter_iter_db3.pass.cpp vendor/libc++/dist/test/libcxx/strings/basic.string/string.modifiers/erase_iter_iter_db4.pass.cpp vendor/libc++/dist/test/libcxx/thread/thread.mutex/thread_safety_lock_guard.pass.cpp vendor/libc++/dist/test/libcxx/thread/thread.threads/thread.thread.this/sleep_for.pass.cpp vendor/libc++/dist/test/libcxx/utilities/utility/pairs/pairs.pair/non_trivial_copy_move_ABI.pass.cpp vendor/libc++/dist/test/libcxx/utilities/utility/pairs/pairs.pair/pair.tuple_element.fail.cpp vendor/libc++/dist/test/libcxx/utilities/utility/pairs/pairs.pair/trivial_copy_move_ABI.pass.cpp vendor/libc++/dist/test/libcxx/utilities/variant/variant.variant/variant.helper/variant_alternative.fail.cpp vendor/libc++/dist/test/libcxx/utilities/variant/variant.variant/variant_size.pass.cpp vendor/libc++/dist/test/std/algorithms/alg.modifying.operations/alg.random.sample/sample.fail.cpp vendor/libc++/dist/test/std/algorithms/alg.nonmodifying/alg.find.end/find_end_pred.pass.cpp vendor/libc++/dist/test/std/algorithms/alg.nonmodifying/alg.is_permutation/is_permutation_pred.pass.cpp vendor/libc++/dist/test/std/atomics/atomics.lockfree/isalwayslockfree.pass.cpp vendor/libc++/dist/test/std/containers/Emplaceable.h vendor/libc++/dist/test/std/containers/associative/map/map.access/at.pass.cpp vendor/libc++/dist/test/std/containers/associative/map/map.access/index_key.pass.cpp vendor/libc++/dist/test/std/containers/associative/map/map.access/index_rv_key.pass.cpp vendor/libc++/dist/test/std/containers/associative/map/map.access/max_size.pass.cpp vendor/libc++/dist/test/std/containers/associative/map/map.modifiers/clear.pass.cpp vendor/libc++/dist/test/std/containers/associative/multimap/max_size.pass.cpp vendor/libc++/dist/test/std/containers/associative/multimap/multimap.modifiers/clear.pass.cpp vendor/libc++/dist/test/std/containers/associative/multiset/clear.pass.cpp vendor/libc++/dist/test/std/containers/associative/multiset/max_size.pass.cpp vendor/libc++/dist/test/std/containers/associative/set/clear.pass.cpp vendor/libc++/dist/test/std/containers/associative/set/max_size.pass.cpp vendor/libc++/dist/test/std/containers/container.adaptors/queue/queue.defn/emplace.pass.cpp vendor/libc++/dist/test/std/containers/container.adaptors/stack/stack.defn/emplace.pass.cpp vendor/libc++/dist/test/std/containers/container.node/node_handle.pass.cpp vendor/libc++/dist/test/std/containers/map_allocator_requirement_test_templates.h vendor/libc++/dist/test/std/containers/sequences/array/array.data/data.pass.cpp vendor/libc++/dist/test/std/containers/sequences/array/array.data/data_const.pass.cpp vendor/libc++/dist/test/std/containers/sequences/array/array.tuple/get.fail.cpp vendor/libc++/dist/test/std/containers/sequences/array/array.tuple/tuple_element.fail.cpp vendor/libc++/dist/test/std/containers/sequences/array/begin.pass.cpp vendor/libc++/dist/test/std/containers/sequences/array/compare.pass.cpp vendor/libc++/dist/test/std/containers/sequences/array/size_and_alignment.pass.cpp vendor/libc++/dist/test/std/containers/sequences/deque/deque.capacity/max_size.pass.cpp vendor/libc++/dist/test/std/containers/sequences/deque/deque.modifiers/erase_iter.pass.cpp vendor/libc++/dist/test/std/containers/sequences/deque/deque.modifiers/erase_iter_iter.pass.cpp vendor/libc++/dist/test/std/containers/sequences/forwardlist/forwardlist.modifiers/clear.pass.cpp vendor/libc++/dist/test/std/containers/sequences/forwardlist/forwardlist.modifiers/resize_size_value.pass.cpp vendor/libc++/dist/test/std/containers/sequences/forwardlist/max_size.pass.cpp vendor/libc++/dist/test/std/containers/sequences/list/list.capacity/max_size.pass.cpp vendor/libc++/dist/test/std/containers/sequences/list/list.cons/input_iterator.pass.cpp vendor/libc++/dist/test/std/containers/sequences/list/list.modifiers/clear.pass.cpp vendor/libc++/dist/test/std/containers/sequences/list/list.ops/merge.pass.cpp vendor/libc++/dist/test/std/containers/sequences/list/list.ops/merge_comp.pass.cpp vendor/libc++/dist/test/std/containers/sequences/vector.bool/construct_default.pass.cpp vendor/libc++/dist/test/std/containers/sequences/vector.bool/default_noexcept.pass.cpp vendor/libc++/dist/test/std/containers/sequences/vector.bool/move.pass.cpp vendor/libc++/dist/test/std/containers/sequences/vector/vector.capacity/max_size.pass.cpp vendor/libc++/dist/test/std/containers/sequences/vector/vector.cons/construct_iter_iter.pass.cpp vendor/libc++/dist/test/std/containers/sequences/vector/vector.cons/construct_iter_iter_alloc.pass.cpp vendor/libc++/dist/test/std/containers/sequences/vector/vector.cons/default_noexcept.pass.cpp vendor/libc++/dist/test/std/containers/sequences/vector/vector.cons/move.pass.cpp vendor/libc++/dist/test/std/containers/sequences/vector/vector.modifiers/clear.pass.cpp vendor/libc++/dist/test/std/containers/sequences/vector/vector.modifiers/insert_iter_iter_iter.pass.cpp vendor/libc++/dist/test/std/containers/set_allocator_requirement_test_templates.h vendor/libc++/dist/test/std/containers/unord/unord.map/compare.pass.cpp vendor/libc++/dist/test/std/containers/unord/unord.map/max_size.pass.cpp vendor/libc++/dist/test/std/containers/unord/unord.map/unord.map.cnstr/assign_copy.pass.cpp vendor/libc++/dist/test/std/containers/unord/unord.map/unord.map.cnstr/assign_init.pass.cpp vendor/libc++/dist/test/std/containers/unord/unord.map/unord.map.cnstr/assign_move.pass.cpp vendor/libc++/dist/test/std/containers/unord/unord.map/unord.map.cnstr/init.pass.cpp vendor/libc++/dist/test/std/containers/unord/unord.map/unord.map.cnstr/range.pass.cpp vendor/libc++/dist/test/std/containers/unord/unord.map/unord.map.elem/at.pass.cpp vendor/libc++/dist/test/std/containers/unord/unord.map/unord.map.elem/index.pass.cpp vendor/libc++/dist/test/std/containers/unord/unord.map/unord.map.modifiers/clear.pass.cpp vendor/libc++/dist/test/std/containers/unord/unord.multimap/equal_range_const.pass.cpp vendor/libc++/dist/test/std/containers/unord/unord.multimap/equal_range_non_const.pass.cpp vendor/libc++/dist/test/std/containers/unord/unord.multimap/local_iterators.pass.cpp vendor/libc++/dist/test/std/containers/unord/unord.multimap/max_size.pass.cpp vendor/libc++/dist/test/std/containers/unord/unord.multimap/rehash.pass.cpp vendor/libc++/dist/test/std/containers/unord/unord.multimap/reserve.pass.cpp vendor/libc++/dist/test/std/containers/unord/unord.multimap/swap_member.pass.cpp vendor/libc++/dist/test/std/containers/unord/unord.multimap/unord.multimap.cnstr/assign_copy.pass.cpp vendor/libc++/dist/test/std/containers/unord/unord.multimap/unord.multimap.cnstr/assign_init.pass.cpp vendor/libc++/dist/test/std/containers/unord/unord.multimap/unord.multimap.cnstr/assign_move.pass.cpp vendor/libc++/dist/test/std/containers/unord/unord.multimap/unord.multimap.cnstr/init.pass.cpp vendor/libc++/dist/test/std/containers/unord/unord.multimap/unord.multimap.cnstr/range.pass.cpp vendor/libc++/dist/test/std/containers/unord/unord.multimap/unord.multimap.modifiers/clear.pass.cpp vendor/libc++/dist/test/std/containers/unord/unord.multiset/clear.pass.cpp vendor/libc++/dist/test/std/containers/unord/unord.multiset/erase_range.pass.cpp vendor/libc++/dist/test/std/containers/unord/unord.multiset/max_size.pass.cpp vendor/libc++/dist/test/std/containers/unord/unord.multiset/unord.multiset.cnstr/assign_copy.pass.cpp vendor/libc++/dist/test/std/containers/unord/unord.multiset/unord.multiset.cnstr/assign_init.pass.cpp vendor/libc++/dist/test/std/containers/unord/unord.multiset/unord.multiset.cnstr/assign_move.pass.cpp vendor/libc++/dist/test/std/containers/unord/unord.multiset/unord.multiset.cnstr/init.pass.cpp vendor/libc++/dist/test/std/containers/unord/unord.multiset/unord.multiset.cnstr/range.pass.cpp vendor/libc++/dist/test/std/containers/unord/unord.set/clear.pass.cpp vendor/libc++/dist/test/std/containers/unord/unord.set/erase_range.pass.cpp vendor/libc++/dist/test/std/containers/unord/unord.set/max_size.pass.cpp vendor/libc++/dist/test/std/containers/unord/unord.set/unord.set.cnstr/assign_copy.pass.cpp vendor/libc++/dist/test/std/containers/unord/unord.set/unord.set.cnstr/assign_init.pass.cpp vendor/libc++/dist/test/std/containers/unord/unord.set/unord.set.cnstr/assign_move.pass.cpp vendor/libc++/dist/test/std/containers/unord/unord.set/unord.set.cnstr/init.pass.cpp vendor/libc++/dist/test/std/containers/unord/unord.set/unord.set.cnstr/range.pass.cpp vendor/libc++/dist/test/std/containers/views/span.cons/array.fail.cpp vendor/libc++/dist/test/std/containers/views/span.cons/array.pass.cpp vendor/libc++/dist/test/std/containers/views/span.cons/assign.pass.cpp vendor/libc++/dist/test/std/containers/views/span.cons/container.fail.cpp vendor/libc++/dist/test/std/containers/views/span.cons/container.pass.cpp vendor/libc++/dist/test/std/containers/views/span.cons/copy.pass.cpp vendor/libc++/dist/test/std/containers/views/span.cons/deduct.pass.cpp vendor/libc++/dist/test/std/containers/views/span.cons/default.fail.cpp vendor/libc++/dist/test/std/containers/views/span.cons/default.pass.cpp vendor/libc++/dist/test/std/containers/views/span.cons/ptr_len.fail.cpp vendor/libc++/dist/test/std/containers/views/span.cons/ptr_len.pass.cpp vendor/libc++/dist/test/std/containers/views/span.cons/ptr_ptr.fail.cpp vendor/libc++/dist/test/std/containers/views/span.cons/ptr_ptr.pass.cpp vendor/libc++/dist/test/std/containers/views/span.cons/span.fail.cpp vendor/libc++/dist/test/std/containers/views/span.cons/span.pass.cpp vendor/libc++/dist/test/std/containers/views/span.cons/stdarray.pass.cpp vendor/libc++/dist/test/std/containers/views/span.elem/data.pass.cpp vendor/libc++/dist/test/std/containers/views/span.elem/op_idx.pass.cpp vendor/libc++/dist/test/std/containers/views/span.iterators/begin.pass.cpp vendor/libc++/dist/test/std/containers/views/span.iterators/end.pass.cpp vendor/libc++/dist/test/std/containers/views/span.iterators/rbegin.pass.cpp vendor/libc++/dist/test/std/containers/views/span.iterators/rend.pass.cpp vendor/libc++/dist/test/std/containers/views/span.objectrep/as_bytes.pass.cpp vendor/libc++/dist/test/std/containers/views/span.objectrep/as_writeable_bytes.fail.cpp vendor/libc++/dist/test/std/containers/views/span.objectrep/as_writeable_bytes.pass.cpp vendor/libc++/dist/test/std/containers/views/span.obs/empty.pass.cpp vendor/libc++/dist/test/std/containers/views/span.obs/size.pass.cpp vendor/libc++/dist/test/std/containers/views/span.obs/size_bytes.pass.cpp vendor/libc++/dist/test/std/containers/views/span.sub/first.pass.cpp vendor/libc++/dist/test/std/containers/views/span.sub/last.pass.cpp vendor/libc++/dist/test/std/containers/views/span.sub/subspan.pass.cpp vendor/libc++/dist/test/std/containers/views/types.pass.cpp vendor/libc++/dist/test/std/depr/depr.c.headers/float_h.pass.cpp vendor/libc++/dist/test/std/depr/depr.c.headers/math_h.pass.cpp vendor/libc++/dist/test/std/depr/depr.c.headers/stdlib_h.pass.cpp vendor/libc++/dist/test/std/depr/depr.c.headers/uchar_h.pass.cpp vendor/libc++/dist/test/std/depr/depr.str.strstreams/depr.strstreambuf/depr.strstreambuf.members/overflow.pass.cpp vendor/libc++/dist/test/std/experimental/simd/simd.access/default.pass.cpp vendor/libc++/dist/test/std/input.output/filesystems/class.directory_iterator/directory_iterator.members/increment.pass.cpp vendor/libc++/dist/test/std/input.output/filesystems/class.directory_iterator/directory_iterator.nonmembers/begin_end.pass.cpp vendor/libc++/dist/test/std/input.output/filesystems/class.path/path.member/path.compare.pass.cpp vendor/libc++/dist/test/std/input.output/filesystems/class.path/path.member/path.gen/lexically_relative_and_proximate.pass.cpp vendor/libc++/dist/test/std/input.output/filesystems/class.path/path.nonmember/append_op.pass.cpp vendor/libc++/dist/test/std/input.output/filesystems/class.rec.dir.itr/rec.dir.itr.members/increment.pass.cpp vendor/libc++/dist/test/std/input.output/filesystems/class.rec.dir.itr/rec.dir.itr.nonmembers/begin_end.pass.cpp vendor/libc++/dist/test/std/input.output/filesystems/fs.op.funcs/fs.op.last_write_time/last_write_time.pass.cpp vendor/libc++/dist/test/std/input.output/filesystems/fs.op.funcs/fs.op.permissions/permissions.pass.cpp vendor/libc++/dist/test/std/input.output/filesystems/fs.op.funcs/fs.op.proximate/proximate.pass.cpp vendor/libc++/dist/test/std/input.output/filesystems/fs.op.funcs/fs.op.relative/relative.pass.cpp vendor/libc++/dist/test/std/input.output/iostream.format/ext.manip/get_money.pass.cpp vendor/libc++/dist/test/std/input.output/iostream.format/ext.manip/get_time.pass.cpp vendor/libc++/dist/test/std/input.output/iostream.format/ext.manip/put_money.pass.cpp vendor/libc++/dist/test/std/input.output/iostream.format/ext.manip/put_time.pass.cpp vendor/libc++/dist/test/std/input.output/iostream.format/input.streams/istream.formatted/istream.formatted.arithmetic/int.pass.cpp vendor/libc++/dist/test/std/input.output/iostream.format/input.streams/istream.formatted/istream.formatted.arithmetic/short.pass.cpp vendor/libc++/dist/test/std/input.output/iostream.format/input.streams/istream.formatted/istream_extractors/signed_char_pointer.pass.cpp vendor/libc++/dist/test/std/input.output/iostream.format/input.streams/istream.formatted/istream_extractors/unsigned_char_pointer.pass.cpp vendor/libc++/dist/test/std/input.output/iostream.format/input.streams/istream.formatted/istream_extractors/wchar_t_pointer.pass.cpp vendor/libc++/dist/test/std/input.output/iostream.format/input.streams/istream.rvalue/rvalue.pass.cpp vendor/libc++/dist/test/std/input.output/iostream.format/input.streams/istream.unformatted/get.pass.cpp vendor/libc++/dist/test/std/input.output/iostream.format/input.streams/istream.unformatted/get_chart.pass.cpp vendor/libc++/dist/test/std/input.output/iostream.format/input.streams/istream.unformatted/get_pointer_size.pass.cpp vendor/libc++/dist/test/std/input.output/iostream.format/input.streams/istream.unformatted/get_pointer_size_chart.pass.cpp vendor/libc++/dist/test/std/input.output/iostream.format/input.streams/istream.unformatted/getline_pointer_size.pass.cpp vendor/libc++/dist/test/std/input.output/iostream.format/input.streams/istream.unformatted/getline_pointer_size_chart.pass.cpp vendor/libc++/dist/test/std/input.output/iostream.format/input.streams/istream.unformatted/ignore_0xff.pass.cpp vendor/libc++/dist/test/std/input.output/iostream.format/input.streams/istream.unformatted/read.pass.cpp vendor/libc++/dist/test/std/input.output/iostream.format/input.streams/istream.unformatted/readsome.pass.cpp vendor/libc++/dist/test/std/input.output/iostream.format/input.streams/istream.unformatted/seekg.pass.cpp vendor/libc++/dist/test/std/input.output/iostream.format/input.streams/istream.unformatted/seekg_off.pass.cpp vendor/libc++/dist/test/std/input.output/iostream.format/output.streams/ostream.formatted/ostream.inserters.arithmetic/minmax_showbase.pass.cpp vendor/libc++/dist/test/std/input.output/iostream.format/std.manip/resetiosflags.pass.cpp vendor/libc++/dist/test/std/input.output/iostream.format/std.manip/setbase.pass.cpp vendor/libc++/dist/test/std/input.output/iostream.format/std.manip/setfill.pass.cpp vendor/libc++/dist/test/std/input.output/iostream.format/std.manip/setiosflags.pass.cpp vendor/libc++/dist/test/std/input.output/iostream.format/std.manip/setprecision.pass.cpp vendor/libc++/dist/test/std/input.output/iostream.format/std.manip/setw.pass.cpp vendor/libc++/dist/test/std/input.output/iostreams.base/ios/basic.ios.members/narrow.pass.cpp vendor/libc++/dist/test/std/iterators/iterator.primitives/iterator.traits/iterator.pass.cpp vendor/libc++/dist/test/std/language.support/cmp/cmp.partialord/partialord.pass.cpp vendor/libc++/dist/test/std/language.support/cmp/cmp.strongord/strongord.pass.cpp vendor/libc++/dist/test/std/language.support/cmp/cmp.weakord/weakord.pass.cpp vendor/libc++/dist/test/std/language.support/support.dynamic/new.delete/new.delete.array/delete_align_val_t_replace.pass.cpp vendor/libc++/dist/test/std/language.support/support.dynamic/new.delete/new.delete.array/new_align_val_t.pass.cpp vendor/libc++/dist/test/std/language.support/support.dynamic/new.delete/new.delete.array/new_align_val_t_nothrow.pass.cpp vendor/libc++/dist/test/std/language.support/support.dynamic/new.delete/new.delete.array/new_align_val_t_nothrow_replace.pass.cpp vendor/libc++/dist/test/std/language.support/support.dynamic/new.delete/new.delete.array/sized_delete_array_fsizeddeallocation.sh.cpp vendor/libc++/dist/test/std/language.support/support.dynamic/new.delete/new.delete.single/delete_align_val_t_replace.pass.cpp vendor/libc++/dist/test/std/language.support/support.dynamic/new.delete/new.delete.single/new_align_val_t.pass.cpp vendor/libc++/dist/test/std/language.support/support.dynamic/new.delete/new.delete.single/new_align_val_t_nothrow.pass.cpp vendor/libc++/dist/test/std/language.support/support.dynamic/new.delete/new.delete.single/new_align_val_t_nothrow_replace.pass.cpp vendor/libc++/dist/test/std/language.support/support.dynamic/new.delete/new.delete.single/sized_delete_fsizeddeallocation.sh.cpp vendor/libc++/dist/test/std/language.support/support.dynamic/ptr.launder/launder.types.fail.cpp vendor/libc++/dist/test/std/language.support/support.exception/uncaught/uncaught_exceptions.pass.cpp vendor/libc++/dist/test/std/language.support/support.limits/c.limits/cfloat.pass.cpp vendor/libc++/dist/test/std/language.support/support.limits/limits/numeric.limits.members/const_data_members.pass.cpp vendor/libc++/dist/test/std/language.support/support.limits/limits/numeric.limits.members/denorm_min.pass.cpp vendor/libc++/dist/test/std/language.support/support.limits/limits/numeric.limits.members/digits.pass.cpp vendor/libc++/dist/test/std/language.support/support.limits/limits/numeric.limits.members/digits10.pass.cpp vendor/libc++/dist/test/std/language.support/support.limits/limits/numeric.limits.members/epsilon.pass.cpp vendor/libc++/dist/test/std/language.support/support.limits/limits/numeric.limits.members/has_denorm.pass.cpp vendor/libc++/dist/test/std/language.support/support.limits/limits/numeric.limits.members/has_denorm_loss.pass.cpp vendor/libc++/dist/test/std/language.support/support.limits/limits/numeric.limits.members/has_infinity.pass.cpp vendor/libc++/dist/test/std/language.support/support.limits/limits/numeric.limits.members/has_quiet_NaN.pass.cpp vendor/libc++/dist/test/std/language.support/support.limits/limits/numeric.limits.members/has_signaling_NaN.pass.cpp vendor/libc++/dist/test/std/language.support/support.limits/limits/numeric.limits.members/infinity.pass.cpp vendor/libc++/dist/test/std/language.support/support.limits/limits/numeric.limits.members/is_bounded.pass.cpp vendor/libc++/dist/test/std/language.support/support.limits/limits/numeric.limits.members/is_exact.pass.cpp vendor/libc++/dist/test/std/language.support/support.limits/limits/numeric.limits.members/is_iec559.pass.cpp vendor/libc++/dist/test/std/language.support/support.limits/limits/numeric.limits.members/is_integer.pass.cpp vendor/libc++/dist/test/std/language.support/support.limits/limits/numeric.limits.members/is_modulo.pass.cpp vendor/libc++/dist/test/std/language.support/support.limits/limits/numeric.limits.members/is_signed.pass.cpp vendor/libc++/dist/test/std/language.support/support.limits/limits/numeric.limits.members/lowest.pass.cpp vendor/libc++/dist/test/std/language.support/support.limits/limits/numeric.limits.members/max.pass.cpp vendor/libc++/dist/test/std/language.support/support.limits/limits/numeric.limits.members/max_digits10.pass.cpp vendor/libc++/dist/test/std/language.support/support.limits/limits/numeric.limits.members/max_exponent.pass.cpp vendor/libc++/dist/test/std/language.support/support.limits/limits/numeric.limits.members/max_exponent10.pass.cpp vendor/libc++/dist/test/std/language.support/support.limits/limits/numeric.limits.members/min.pass.cpp vendor/libc++/dist/test/std/language.support/support.limits/limits/numeric.limits.members/min_exponent.pass.cpp vendor/libc++/dist/test/std/language.support/support.limits/limits/numeric.limits.members/min_exponent10.pass.cpp vendor/libc++/dist/test/std/language.support/support.limits/limits/numeric.limits.members/quiet_NaN.pass.cpp vendor/libc++/dist/test/std/language.support/support.limits/limits/numeric.limits.members/radix.pass.cpp vendor/libc++/dist/test/std/language.support/support.limits/limits/numeric.limits.members/round_error.pass.cpp vendor/libc++/dist/test/std/language.support/support.limits/limits/numeric.limits.members/round_style.pass.cpp vendor/libc++/dist/test/std/language.support/support.limits/limits/numeric.limits.members/signaling_NaN.pass.cpp vendor/libc++/dist/test/std/language.support/support.limits/limits/numeric.limits.members/tinyness_before.pass.cpp vendor/libc++/dist/test/std/language.support/support.limits/limits/numeric.limits.members/traps.pass.cpp vendor/libc++/dist/test/std/language.support/support.runtime/cstdlib.pass.cpp vendor/libc++/dist/test/std/language.support/support.runtime/ctime.pass.cpp vendor/libc++/dist/test/std/language.support/support.start.term/quick_exit.pass.cpp vendor/libc++/dist/test/std/language.support/support.start.term/quick_exit_check1.fail.cpp vendor/libc++/dist/test/std/language.support/support.start.term/quick_exit_check2.fail.cpp vendor/libc++/dist/test/std/localization/locale.categories/category.collate/locale.collate.byname/transform.pass.cpp vendor/libc++/dist/test/std/localization/locale.categories/category.ctype/locale.codecvt/locale.codecvt.members/wchar_t_out.pass.cpp vendor/libc++/dist/test/std/localization/locale.categories/category.monetary/locale.money.get/locale.money.get.members/get_long_double_fr_FR.pass.cpp vendor/libc++/dist/test/std/localization/locale.categories/category.monetary/locale.money.get/locale.money.get.members/get_long_double_ru_RU.pass.cpp vendor/libc++/dist/test/std/localization/locale.categories/category.monetary/locale.money.get/locale.money.get.members/get_long_double_zh_CN.pass.cpp vendor/libc++/dist/test/std/localization/locale.categories/category.monetary/locale.money.put/locale.money.put.members/put_long_double_fr_FR.pass.cpp vendor/libc++/dist/test/std/localization/locale.categories/category.monetary/locale.money.put/locale.money.put.members/put_long_double_ru_RU.pass.cpp vendor/libc++/dist/test/std/localization/locale.categories/category.monetary/locale.money.put/locale.money.put.members/put_long_double_zh_CN.pass.cpp vendor/libc++/dist/test/std/localization/locale.categories/category.monetary/locale.moneypunct.byname/curr_symbol.pass.cpp vendor/libc++/dist/test/std/localization/locale.categories/category.monetary/locale.moneypunct.byname/grouping.pass.cpp vendor/libc++/dist/test/std/localization/locale.categories/category.monetary/locale.moneypunct.byname/neg_format.pass.cpp vendor/libc++/dist/test/std/localization/locale.categories/category.monetary/locale.moneypunct.byname/pos_format.pass.cpp vendor/libc++/dist/test/std/localization/locale.categories/category.monetary/locale.moneypunct.byname/thousands_sep.pass.cpp vendor/libc++/dist/test/std/localization/locale.categories/category.numeric/locale.num.get/facet.num.get.members/get_long.pass.cpp vendor/libc++/dist/test/std/localization/locale.categories/category.numeric/locale.num.get/facet.num.get.members/test_min_max.pass.cpp vendor/libc++/dist/test/std/localization/locale.categories/category.numeric/locale.num.get/facet.num.get.members/test_neg_one.pass.cpp vendor/libc++/dist/test/std/localization/locale.categories/category.time/locale.time.get.byname/get_date.pass.cpp vendor/libc++/dist/test/std/localization/locale.categories/category.time/locale.time.get.byname/get_date_wide.pass.cpp vendor/libc++/dist/test/std/localization/locale.categories/category.time/locale.time.get.byname/get_one.pass.cpp vendor/libc++/dist/test/std/localization/locale.categories/category.time/locale.time.get.byname/get_one_wide.pass.cpp vendor/libc++/dist/test/std/localization/locale.categories/category.time/locale.time.put.byname/put1.pass.cpp vendor/libc++/dist/test/std/localization/locale.categories/facet.numpunct/locale.numpunct.byname/grouping.pass.cpp vendor/libc++/dist/test/std/localization/locale.categories/facet.numpunct/locale.numpunct.byname/thousands_sep.pass.cpp vendor/libc++/dist/test/std/localization/locales/locale/locale.cons/char_pointer.pass.cpp vendor/libc++/dist/test/std/localization/locales/locale/locale.cons/locale_char_pointer_cat.pass.cpp vendor/libc++/dist/test/std/localization/locales/locale/locale.cons/locale_locale_cat.pass.cpp vendor/libc++/dist/test/std/localization/locales/locale/locale.cons/locale_string_cat.pass.cpp vendor/libc++/dist/test/std/numerics/c.math/cmath.pass.cpp vendor/libc++/dist/test/std/numerics/complex.number/complex.ops/stream_input.pass.cpp vendor/libc++/dist/test/std/numerics/rand/rand.util/rand.util.canonical/generate_canonical.pass.cpp vendor/libc++/dist/test/std/re/re.alg/re.alg.match/basic.pass.cpp vendor/libc++/dist/test/std/re/re.alg/re.alg.match/ecma.pass.cpp vendor/libc++/dist/test/std/re/re.alg/re.alg.match/extended.pass.cpp vendor/libc++/dist/test/std/re/re.alg/re.alg.match/parse_curly_brackets.pass.cpp vendor/libc++/dist/test/std/re/re.alg/re.alg.search/awk.pass.cpp vendor/libc++/dist/test/std/re/re.alg/re.alg.search/basic.pass.cpp vendor/libc++/dist/test/std/re/re.alg/re.alg.search/ecma.pass.cpp vendor/libc++/dist/test/std/re/re.alg/re.alg.search/extended.pass.cpp vendor/libc++/dist/test/std/re/re.alg/re.alg.search/invert_neg_word_search.pass.cpp vendor/libc++/dist/test/std/re/re.grammar/excessive_brace_count.pass.cpp vendor/libc++/dist/test/std/re/re.traits/lookup_collatename.pass.cpp vendor/libc++/dist/test/std/re/re.traits/transform.pass.cpp vendor/libc++/dist/test/std/re/re.traits/transform_primary.pass.cpp vendor/libc++/dist/test/std/re/re.traits/translate_nocase.pass.cpp vendor/libc++/dist/test/std/strings/basic.string.hash/enabled_hashes.pass.cpp vendor/libc++/dist/test/std/strings/basic.string.hash/strings.pass.cpp vendor/libc++/dist/test/std/strings/basic.string.literals/literal.pass.cpp vendor/libc++/dist/test/std/strings/basic.string/string.capacity/over_max_size.pass.cpp vendor/libc++/dist/test/std/strings/basic.string/string.capacity/reserve.pass.cpp vendor/libc++/dist/test/std/strings/basic.string/string.cons/string_view_deduction.pass.cpp vendor/libc++/dist/test/std/strings/basic.string/string.cons/string_view_size_size_deduction.fail.cpp vendor/libc++/dist/test/std/strings/basic.string/string.cons/string_view_size_size_deduction.pass.cpp vendor/libc++/dist/test/std/strings/basic.string/string.iterators/iterators.pass.cpp vendor/libc++/dist/test/std/strings/c.strings/cctype.pass.cpp vendor/libc++/dist/test/std/strings/c.strings/cstring.pass.cpp vendor/libc++/dist/test/std/strings/c.strings/cuchar.pass.cpp vendor/libc++/dist/test/std/strings/c.strings/cwchar.pass.cpp vendor/libc++/dist/test/std/strings/c.strings/cwctype.pass.cpp vendor/libc++/dist/test/std/strings/string.classes/typedefs.pass.cpp vendor/libc++/dist/test/std/strings/string.conversions/stod.pass.cpp vendor/libc++/dist/test/std/strings/string.conversions/stof.pass.cpp vendor/libc++/dist/test/std/strings/string.conversions/stoi.pass.cpp vendor/libc++/dist/test/std/strings/string.conversions/stol.pass.cpp vendor/libc++/dist/test/std/strings/string.conversions/stoll.pass.cpp vendor/libc++/dist/test/std/strings/string.conversions/stoul.pass.cpp vendor/libc++/dist/test/std/strings/string.conversions/stoull.pass.cpp vendor/libc++/dist/test/std/strings/string.conversions/to_string.pass.cpp vendor/libc++/dist/test/std/strings/string.conversions/to_wstring.pass.cpp vendor/libc++/dist/test/std/strings/string.view/string.view.capacity/capacity.pass.cpp vendor/libc++/dist/test/std/strings/string.view/string.view.cons/assign.pass.cpp vendor/libc++/dist/test/std/strings/string.view/string.view.cons/default.pass.cpp vendor/libc++/dist/test/std/strings/string.view/string.view.cons/from_string.pass.cpp vendor/libc++/dist/test/std/strings/string.view/string.view.hash/enabled_hashes.pass.cpp vendor/libc++/dist/test/std/strings/string.view/string.view.hash/string_view.pass.cpp vendor/libc++/dist/test/std/strings/string.view/string.view.iterators/begin.pass.cpp vendor/libc++/dist/test/std/strings/string.view/string.view.iterators/end.pass.cpp vendor/libc++/dist/test/std/strings/string.view/string.view.iterators/rbegin.pass.cpp vendor/libc++/dist/test/std/strings/string.view/string.view.iterators/rend.pass.cpp vendor/libc++/dist/test/std/strings/string.view/string.view.ops/compare.pointer_size.pass.cpp vendor/libc++/dist/test/std/strings/string.view/string.view.ops/compare.size_size_sv.pass.cpp vendor/libc++/dist/test/std/strings/string.view/string.view.ops/compare.size_size_sv_pointer_size.pass.cpp vendor/libc++/dist/test/std/strings/string.view/string.view.ops/compare.size_size_sv_size_size.pass.cpp vendor/libc++/dist/test/std/strings/string.view/string.view.ops/copy.pass.cpp vendor/libc++/dist/test/std/strings/string.view/string_view.literals/literal.pass.cpp vendor/libc++/dist/test/std/strings/string.view/types.pass.cpp vendor/libc++/dist/test/std/thread/futures/futures.shared_future/wait_until.pass.cpp vendor/libc++/dist/test/std/thread/thread.condition/thread.condition.condvar/wait_for.pass.cpp vendor/libc++/dist/test/std/thread/thread.condition/thread.condition.condvarany/notify_one.pass.cpp vendor/libc++/dist/test/std/thread/thread.mutex/thread.lock/thread.lock.guard/adopt_lock.pass.cpp vendor/libc++/dist/test/std/thread/thread.mutex/thread.lock/thread.lock.guard/mutex.pass.cpp vendor/libc++/dist/test/std/thread/thread.mutex/thread.lock/thread.lock.shared/thread.lock.shared.cons/mutex_try_to_lock.pass.cpp vendor/libc++/dist/test/std/thread/thread.mutex/thread.lock/thread.lock.unique/thread.lock.unique.cons/mutex.pass.cpp vendor/libc++/dist/test/std/thread/thread.mutex/thread.lock/thread.lock.unique/thread.lock.unique.locking/lock.pass.cpp vendor/libc++/dist/test/std/thread/thread.threads/thread.thread.class/thread.thread.constr/F.pass.cpp vendor/libc++/dist/test/std/thread/thread.threads/thread.thread.this/sleep_until.pass.cpp vendor/libc++/dist/test/std/utilities/any/any.class/any.assign/copy.pass.cpp vendor/libc++/dist/test/std/utilities/any/any.class/any.assign/move.pass.cpp vendor/libc++/dist/test/std/utilities/any/any.class/any.assign/value.pass.cpp vendor/libc++/dist/test/std/utilities/any/any.class/any.cons/copy.pass.cpp vendor/libc++/dist/test/std/utilities/any/any.class/any.cons/in_place_type.pass.cpp vendor/libc++/dist/test/std/utilities/any/any.class/any.cons/move.pass.cpp vendor/libc++/dist/test/std/utilities/any/any.class/any.cons/value.pass.cpp vendor/libc++/dist/test/std/utilities/any/any.class/any.modifiers/emplace.pass.cpp vendor/libc++/dist/test/std/utilities/any/any.class/any.modifiers/reset.pass.cpp vendor/libc++/dist/test/std/utilities/any/any.class/any.modifiers/swap.pass.cpp vendor/libc++/dist/test/std/utilities/any/any.nonmembers/any.cast/any_cast_pointer.pass.cpp vendor/libc++/dist/test/std/utilities/any/any.nonmembers/any.cast/any_cast_reference.pass.cpp vendor/libc++/dist/test/std/utilities/any/any.nonmembers/any.cast/any_cast_request_invalid_value_category.fail.cpp vendor/libc++/dist/test/std/utilities/any/any.nonmembers/any.cast/const_correctness.fail.cpp vendor/libc++/dist/test/std/utilities/any/any.nonmembers/any.cast/not_copy_constructible.fail.cpp vendor/libc++/dist/test/std/utilities/any/any.nonmembers/make_any.pass.cpp vendor/libc++/dist/test/std/utilities/any/any.nonmembers/swap.pass.cpp vendor/libc++/dist/test/std/utilities/charconv/charconv.from.chars/integral.pass.cpp vendor/libc++/dist/test/std/utilities/charconv/charconv.to.chars/integral.pass.cpp vendor/libc++/dist/test/std/utilities/function.objects/bind/func.bind/func.bind.bind/nested.pass.cpp vendor/libc++/dist/test/std/utilities/function.objects/func.wrap/func.wrap.func/func.wrap.func.con/copy_move.pass.cpp vendor/libc++/dist/test/std/utilities/function.objects/refwrap/type_properties.pass.cpp vendor/libc++/dist/test/std/utilities/memory/allocator.traits/allocator.traits.members/destroy.pass.cpp vendor/libc++/dist/test/std/utilities/memory/allocator.traits/allocator.traits.members/max_size.pass.cpp vendor/libc++/dist/test/std/utilities/memory/default.allocator/allocator.members/allocate.pass.cpp vendor/libc++/dist/test/std/utilities/memory/pointer.traits/pointer.traits.functions/pointer_to.pass.cpp vendor/libc++/dist/test/std/utilities/memory/pointer.traits/pointer_to.pass.cpp vendor/libc++/dist/test/std/utilities/memory/storage.iterator/raw_storage_iterator.base.pass.cpp vendor/libc++/dist/test/std/utilities/memory/storage.iterator/raw_storage_iterator.pass.cpp vendor/libc++/dist/test/std/utilities/memory/util.smartptr/util.smartptr.shared/util.smartptr.shared.create/allocate_shared.pass.cpp vendor/libc++/dist/test/std/utilities/memory/util.smartptr/util.smartptr.shared/util.smartptr.shared.create/make_shared.pass.cpp vendor/libc++/dist/test/std/utilities/meta/meta.trans/meta.trans.other/aligned_storage.pass.cpp vendor/libc++/dist/test/std/utilities/meta/meta.type.synop/endian.pass.cpp vendor/libc++/dist/test/std/utilities/meta/meta.unary.prop.query/alignment_of.pass.cpp vendor/libc++/dist/test/std/utilities/meta/meta.unary/meta.unary.cat/is_integral.pass.cpp vendor/libc++/dist/test/std/utilities/meta/meta.unary/meta.unary.prop/is_nothrow_default_constructible.pass.cpp vendor/libc++/dist/test/std/utilities/optional/optional.bad_optional_access/default.pass.cpp vendor/libc++/dist/test/std/utilities/optional/optional.bad_optional_access/derive.pass.cpp vendor/libc++/dist/test/std/utilities/optional/optional.object/optional.object.assign/copy.pass.cpp vendor/libc++/dist/test/std/utilities/optional/optional.object/optional.object.assign/move.pass.cpp vendor/libc++/dist/test/std/utilities/optional/optional.object/optional.object.ctor/U.pass.cpp vendor/libc++/dist/test/std/utilities/optional/optional.object/optional.object.ctor/const_T.pass.cpp vendor/libc++/dist/test/std/utilities/optional/optional.object/optional.object.ctor/copy.pass.cpp vendor/libc++/dist/test/std/utilities/optional/optional.object/optional.object.ctor/move.pass.cpp vendor/libc++/dist/test/std/utilities/optional/optional.object/optional.object.ctor/rvalue_T.pass.cpp vendor/libc++/dist/test/std/utilities/optional/optional.object/optional.object.observe/value.pass.cpp vendor/libc++/dist/test/std/utilities/optional/optional.object/optional.object.observe/value_const.pass.cpp vendor/libc++/dist/test/std/utilities/optional/optional.object/optional.object.observe/value_const_rvalue.pass.cpp vendor/libc++/dist/test/std/utilities/optional/optional.object/optional.object.observe/value_rvalue.pass.cpp vendor/libc++/dist/test/std/utilities/optional/optional.specalg/make_optional.pass.cpp vendor/libc++/dist/test/std/utilities/template.bitset/bitset.members/flip_one.pass.cpp vendor/libc++/dist/test/std/utilities/template.bitset/bitset.members/reset_one.pass.cpp vendor/libc++/dist/test/std/utilities/template.bitset/bitset.members/set_one.pass.cpp vendor/libc++/dist/test/std/utilities/template.bitset/bitset.members/test.pass.cpp vendor/libc++/dist/test/std/utilities/template.bitset/includes.pass.cpp vendor/libc++/dist/test/std/utilities/time/date.time/ctime.pass.cpp vendor/libc++/dist/test/std/utilities/time/time.clock/time.clock.hires/consistency.pass.cpp vendor/libc++/dist/test/std/utilities/time/time.clock/time.clock.steady/consistency.pass.cpp vendor/libc++/dist/test/std/utilities/time/time.clock/time.clock.system/consistency.pass.cpp vendor/libc++/dist/test/std/utilities/time/time.duration/time.duration.literals/literals.pass.cpp vendor/libc++/dist/test/std/utilities/time/time.duration/time.duration.literals/literals1.pass.cpp vendor/libc++/dist/test/std/utilities/time/time.duration/time.duration.nonmember/op_divide_duration.pass.cpp vendor/libc++/dist/test/std/utilities/time/time.duration/time.duration.special/max.pass.cpp vendor/libc++/dist/test/std/utilities/time/time.duration/time.duration.special/min.pass.cpp vendor/libc++/dist/test/std/utilities/time/time.duration/time.duration.special/zero.pass.cpp vendor/libc++/dist/test/std/utilities/time/time.point/time.point.arithmetic/op_+=.pass.cpp vendor/libc++/dist/test/std/utilities/time/time.point/time.point.arithmetic/op_-=.pass.cpp vendor/libc++/dist/test/std/utilities/time/time.point/time.point.special/max.pass.cpp vendor/libc++/dist/test/std/utilities/time/time.point/time.point.special/min.pass.cpp vendor/libc++/dist/test/std/utilities/time/time.traits/time.traits.duration_values/max.pass.cpp vendor/libc++/dist/test/std/utilities/time/time.traits/time.traits.duration_values/min.pass.cpp vendor/libc++/dist/test/std/utilities/time/time.traits/time.traits.duration_values/zero.pass.cpp vendor/libc++/dist/test/std/utilities/tuple/tuple.tuple/TupleFunction.pass.cpp vendor/libc++/dist/test/std/utilities/tuple/tuple.tuple/tuple.assign/move.pass.cpp vendor/libc++/dist/test/std/utilities/tuple/tuple.tuple/tuple.cnstr/PR20855_tuple_ref_binding_diagnostics.pass.cpp vendor/libc++/dist/test/std/utilities/tuple/tuple.tuple/tuple.helper/tuple_size_incomplete.fail.cpp vendor/libc++/dist/test/std/utilities/tuple/tuple.tuple/tuple.helper/tuple_size_incomplete.pass.cpp vendor/libc++/dist/test/std/utilities/tuple/tuple.tuple/tuple.helper/tuple_size_structured_bindings.pass.cpp vendor/libc++/dist/test/std/utilities/type.index/type.index.hash/hash.pass.cpp vendor/libc++/dist/test/std/utilities/utility/pairs/pairs.pair/piecewise.pass.cpp vendor/libc++/dist/test/std/utilities/variant/variant.bad_variant_access/bad_variant_access.pass.cpp vendor/libc++/dist/test/std/utilities/variant/variant.get/get_index.pass.cpp vendor/libc++/dist/test/std/utilities/variant/variant.get/get_type.pass.cpp vendor/libc++/dist/test/std/utilities/variant/variant.relops/relops.pass.cpp vendor/libc++/dist/test/std/utilities/variant/variant.variant/variant.assign/T.pass.cpp vendor/libc++/dist/test/std/utilities/variant/variant.variant/variant.assign/copy.pass.cpp vendor/libc++/dist/test/std/utilities/variant/variant.variant/variant.assign/move.pass.cpp vendor/libc++/dist/test/std/utilities/variant/variant.variant/variant.ctor/T.pass.cpp vendor/libc++/dist/test/std/utilities/variant/variant.variant/variant.ctor/copy.pass.cpp vendor/libc++/dist/test/std/utilities/variant/variant.variant/variant.ctor/default.pass.cpp vendor/libc++/dist/test/std/utilities/variant/variant.variant/variant.ctor/in_place_index_args.pass.cpp vendor/libc++/dist/test/std/utilities/variant/variant.variant/variant.ctor/in_place_index_init_list_args.pass.cpp vendor/libc++/dist/test/std/utilities/variant/variant.variant/variant.ctor/in_place_type_args.pass.cpp vendor/libc++/dist/test/std/utilities/variant/variant.variant/variant.ctor/in_place_type_init_list_args.pass.cpp vendor/libc++/dist/test/std/utilities/variant/variant.variant/variant.ctor/move.pass.cpp vendor/libc++/dist/test/std/utilities/variant/variant.variant/variant.mod/emplace_index_args.pass.cpp vendor/libc++/dist/test/std/utilities/variant/variant.variant/variant.mod/emplace_index_init_list_args.pass.cpp vendor/libc++/dist/test/std/utilities/variant/variant.variant/variant.mod/emplace_type_args.pass.cpp vendor/libc++/dist/test/std/utilities/variant/variant.variant/variant.mod/emplace_type_init_list_args.pass.cpp vendor/libc++/dist/test/std/utilities/variant/variant.variant/variant.status/index.pass.cpp vendor/libc++/dist/test/std/utilities/variant/variant.variant/variant.status/valueless_by_exception.pass.cpp vendor/libc++/dist/test/std/utilities/variant/variant.variant/variant.swap/swap.pass.cpp vendor/libc++/dist/test/std/utilities/variant/variant.visit/visit.pass.cpp vendor/libc++/dist/test/support/any_helpers.h vendor/libc++/dist/test/support/archetypes.hpp vendor/libc++/dist/test/support/archetypes.ipp vendor/libc++/dist/test/support/counting_predicates.hpp vendor/libc++/dist/test/support/filesystem_dynamic_test_helper.py vendor/libc++/dist/test/support/filesystem_test_helper.hpp vendor/libc++/dist/test/support/min_allocator.h vendor/libc++/dist/test/support/nasty_macros.hpp vendor/libc++/dist/test/support/poisoned_hash_helper.hpp vendor/libc++/dist/test/support/test_comparisons.h vendor/libc++/dist/test/support/test_macros.h vendor/libc++/dist/test/support/unique_ptr_test_helper.h vendor/libc++/dist/utils/google-benchmark/.gitignore vendor/libc++/dist/utils/google-benchmark/AUTHORS vendor/libc++/dist/utils/google-benchmark/CMakeLists.txt vendor/libc++/dist/utils/google-benchmark/CONTRIBUTORS vendor/libc++/dist/utils/google-benchmark/README.md vendor/libc++/dist/utils/google-benchmark/cmake/CXXFeatureCheck.cmake vendor/libc++/dist/utils/google-benchmark/cmake/GetGitVersion.cmake vendor/libc++/dist/utils/google-benchmark/cmake/HandleGTest.cmake vendor/libc++/dist/utils/google-benchmark/docs/tools.md vendor/libc++/dist/utils/google-benchmark/include/benchmark/benchmark.h vendor/libc++/dist/utils/google-benchmark/src/benchmark.cc vendor/libc++/dist/utils/google-benchmark/src/benchmark_api_internal.h vendor/libc++/dist/utils/google-benchmark/src/benchmark_register.cc vendor/libc++/dist/utils/google-benchmark/src/colorprint.cc vendor/libc++/dist/utils/google-benchmark/src/complexity.cc vendor/libc++/dist/utils/google-benchmark/src/console_reporter.cc vendor/libc++/dist/utils/google-benchmark/src/csv_reporter.cc vendor/libc++/dist/utils/google-benchmark/src/cycleclock.h vendor/libc++/dist/utils/google-benchmark/src/internal_macros.h vendor/libc++/dist/utils/google-benchmark/src/json_reporter.cc vendor/libc++/dist/utils/google-benchmark/src/reporter.cc vendor/libc++/dist/utils/google-benchmark/src/sleep.cc vendor/libc++/dist/utils/google-benchmark/src/statistics.cc vendor/libc++/dist/utils/google-benchmark/src/string_util.h vendor/libc++/dist/utils/google-benchmark/src/sysinfo.cc vendor/libc++/dist/utils/google-benchmark/src/thread_manager.h vendor/libc++/dist/utils/google-benchmark/src/timers.cc vendor/libc++/dist/utils/google-benchmark/test/CMakeLists.txt vendor/libc++/dist/utils/google-benchmark/test/complexity_test.cc vendor/libc++/dist/utils/google-benchmark/test/output_test.h vendor/libc++/dist/utils/google-benchmark/test/output_test_helper.cc vendor/libc++/dist/utils/google-benchmark/test/register_benchmark_test.cc vendor/libc++/dist/utils/google-benchmark/test/reporter_output_test.cc vendor/libc++/dist/utils/google-benchmark/test/skip_with_error_test.cc vendor/libc++/dist/utils/google-benchmark/test/string_util_gtest.cc vendor/libc++/dist/utils/google-benchmark/test/user_counters_tabular_test.cc vendor/libc++/dist/utils/google-benchmark/test/user_counters_test.cc vendor/libc++/dist/utils/google-benchmark/tools/compare.py vendor/libc++/dist/utils/google-benchmark/tools/gbench/Inputs/test3_run0.json vendor/libc++/dist/utils/google-benchmark/tools/gbench/Inputs/test3_run1.json vendor/libc++/dist/utils/google-benchmark/tools/gbench/report.py vendor/libc++/dist/utils/google-benchmark/tools/gbench/util.py vendor/libc++/dist/utils/libcxx/test/config.py vendor/libc++/dist/utils/libcxx/test/format.py vendor/libc++/dist/utils/libcxx/test/target_info.py vendor/libc++/dist/www/cxx1y_status.html vendor/libc++/dist/www/cxx1z_status.html vendor/libc++/dist/www/cxx2a_status.html vendor/libc++/dist/www/index.html vendor/libc++/dist/www/upcoming_meeting.html Modified: vendor/libc++/dist/CMakeLists.txt ============================================================================== --- vendor/libc++/dist/CMakeLists.txt Sat Jan 19 10:05:15 2019 (r343176) +++ vendor/libc++/dist/CMakeLists.txt Sat Jan 19 10:05:35 2019 (r343177) @@ -27,7 +27,7 @@ if (CMAKE_SOURCE_DIR STREQUAL CMAKE_CURRENT_SOURCE_DIR project(libcxx CXX C) set(PACKAGE_NAME libcxx) - set(PACKAGE_VERSION 7.0.0svn) + set(PACKAGE_VERSION 8.0.0svn) set(PACKAGE_STRING "${PACKAGE_NAME} ${PACKAGE_VERSION}") set(PACKAGE_BUGREPORT "llvm-bugs@lists.llvm.org") @@ -50,9 +50,14 @@ MACRO_ENSURE_OUT_OF_SOURCE_BUILD( "${PROJECT_NAME} requires an out of source build. Please create a separate build directory and run 'cmake /path/to/${PROJECT_NAME} [options]' there." ) +if("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang" AND "${CMAKE_CXX_SIMULATE_ID}" STREQUAL "MSVC") + message(STATUS "Configuring for clang-cl") + set(LIBCXX_TARGETING_CLANG_CL ON) +endif() if (MSVC) set(LIBCXX_TARGETING_MSVC ON) + message(STATUS "Configuring for MSVC") else() set(LIBCXX_TARGETING_MSVC OFF) endif() @@ -77,7 +82,12 @@ option(LIBCXX_ENABLE_FILESYSTEM "Build filesystem as p option(LIBCXX_INCLUDE_TESTS "Build the libc++ tests." ${LLVM_INCLUDE_TESTS}) # Benchmark options ----------------------------------------------------------- -option(LIBCXX_INCLUDE_BENCHMARKS "Build the libc++ benchmarks and their dependancies" ON) +option(LIBCXX_INCLUDE_BENCHMARKS "Build the libc++ benchmarks and their dependencies" ON) + +set(LIBCXX_BENCHMARK_TEST_ARGS_DEFAULT --benchmark_min_time=0.01) +set(LIBCXX_BENCHMARK_TEST_ARGS "${LIBCXX_BENCHMARK_TEST_ARGS_DEFAULT}" CACHE STRING + "Arguments to pass when running the benchmarks using check-cxx-benchmarks") + set(LIBCXX_BENCHMARK_NATIVE_STDLIB "" CACHE STRING "Build the benchmarks against the specified native STL. The value must be one of libc++/libstdc++") @@ -111,15 +121,12 @@ cmake_dependent_option(LIBCXX_INSTALL_FILESYSTEM_LIBRA "Install libc++fs.a" ON "LIBCXX_ENABLE_FILESYSTEM;LIBCXX_INSTALL_LIBRARY" OFF) -if (FUCHSIA) - set(DEFAULT_ABI_VERSION 2) -else() - set(DEFAULT_ABI_VERSION 1) -endif() -set(LIBCXX_ABI_VERSION ${DEFAULT_ABI_VERSION} CACHE STRING "ABI version of libc++.") +set(LIBCXX_ABI_VERSION "1" CACHE STRING "ABI version of libc++. Can be either 1 or 2, where 2 is currently not stable. Defaults to 1.") +set(LIBCXX_ABI_NAMESPACE "" CACHE STRING "The inline ABI namespace used by libc++. It defaults to __n where `n` is the current ABI version.") option(LIBCXX_ABI_UNSTABLE "Unstable ABI of libc++." OFF) option(LIBCXX_ABI_FORCE_ITANIUM "Ignore auto-detection and force use of the Itanium ABI.") option(LIBCXX_ABI_FORCE_MICROSOFT "Ignore auto-detection and force use of the Microsoft ABI.") +option(LIBCXX_HIDE_FROM_ABI_PER_TU_BY_DEFAULT "Enable per TU ABI insulation by default. To be used by vendors." OFF) set(LIBCXX_ABI_DEFINES "" CACHE STRING "A semicolon separated list of ABI macros to define in the site config header.") option(LIBCXX_USE_COMPILER_RT "Use compiler-rt instead of libgcc" OFF) @@ -175,7 +182,7 @@ cmake_dependent_option(LIBCXX_STATICALLY_LINK_ABI_IN_S cmake_dependent_option(LIBCXX_STATICALLY_LINK_ABI_IN_SHARED_LIBRARY "Statically link the ABI library to shared library" ON - "LIBCXX_ENABLE_STATIC_ABI_LIBRARY;LIBCXX_ENABLE_STATIC" OFF) + "LIBCXX_ENABLE_STATIC_ABI_LIBRARY;LIBCXX_ENABLE_SHARED" OFF) # Generate and install a linker script inplace of libc++.so. The linker script # will link libc++ to the correct ABI library. This option is on by default @@ -276,6 +283,9 @@ endif() option(LIBCXX_CONFIGURE_IDE "Configure libcxx for use within an IDE" ${LIBCXX_CONFIGURE_IDE_DEFAULT}) +option(LIBCXX_HERMETIC_STATIC_LIBRARY + "Do not export any symbols from the static library." OFF) + #=============================================================================== # Check option configurations #=============================================================================== @@ -502,14 +512,16 @@ remove_flags(-Wno-pedantic -pedantic-errors -pedantic) # Required flags ============================================================== set(LIBCXX_STANDARD_VER c++11 CACHE INTERNAL "internal option to change build dialect") -if (LIBCXX_HAS_MUSL_LIBC) +if (LIBCXX_HAS_MUSL_LIBC OR LIBCXX_TARGETING_CLANG_CL) # musl's pthread implementations uses volatile types in their structs which is # not a constexpr in C++11 but is in C++14, so we use C++14 with musl. set(LIBCXX_STANDARD_VER c++14 CACHE INTERNAL "internal option to change build dialect") endif() add_compile_flags_if_supported(-std=${LIBCXX_STANDARD_VER}) +add_compile_flags_if_supported("/std:${LIBCXX_STANDARD_VER}") mangle_name("LIBCXX_SUPPORTS_STD_EQ_${LIBCXX_STANDARD_VER}_FLAG" SUPPORTS_DIALECT_NAME) -if(NOT ${SUPPORTS_DIALECT_NAME}) +mangle_name("LIBCXX_SUPPORTS_STD_COLON_${LIBCXX_STANDARD_VER}_FLAG" SUPPORTS_DIALECT_NAME_MSVC) +if(NOT ${SUPPORTS_DIALECT_NAME} AND NOT ${SUPPORTS_DIALECT_NAME_MSVC}) if(NOT "${CMAKE_CXX_COMPILER_ID}" STREQUAL "MSVC" AND NOT "${CMAKE_CXX_SIMULATE_ID}" STREQUAL "MSVC") message(FATAL_ERROR "C++11 or greater is required but the compiler does not support ${LIBCXX_STANDARD_VER}") endif() @@ -544,11 +556,29 @@ add_definitions(-D_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER) add_compile_flags_if_supported( -Wall -Wextra -W -Wwrite-strings -Wno-unused-parameter -Wno-long-long - -Werror=return-type) + -Werror=return-type -Wextra-semi) if ("${CMAKE_CXX_COMPILER_ID}" MATCHES "Clang") add_compile_flags_if_supported( -Wno-user-defined-literals -Wno-covered-switch-default) + if (LIBCXX_TARGETING_CLANG_CL) + add_compile_flags_if_supported( + -Wno-c++98-compat + -Wno-c++98-compat-pedantic + -Wno-c++11-compat + -Wno-undef + -Wno-reserved-id-macro + -Wno-gnu-include-next + -Wno-gcc-compat # For ignoring "'diagnose_if' is a clang extension" warnings + -Wno-zero-as-null-pointer-constant # FIXME: Remove this and fix all occurrences. + -Wno-deprecated-dynamic-exception-spec # For auto_ptr + -Wno-sign-conversion + -Wno-old-style-cast + -Wno-deprecated # FIXME: Remove this and fix all occurrences. + -Wno-shift-sign-overflow # FIXME: Why do we need this with clang-cl but not clang? + -Wno-double-promotion # FIXME: remove me + ) + endif() elseif("${CMAKE_CXX_COMPILER_ID}" MATCHES "GNU") add_compile_flags_if_supported( -Wno-literal-suffix @@ -621,47 +651,67 @@ endif() # Sanitizer flags ============================================================= -# Configure for sanitizers. If LIBCXX_STANDALONE_BUILD then we have to do -# the flag translation ourselves. Othewise LLVM's CMakeList.txt will handle it. -if (LIBCXX_STANDALONE_BUILD) - set(LLVM_USE_SANITIZER "" CACHE STRING - "Define the sanitizer used to build the library and tests") +function(get_sanitizer_flags OUT_VAR USE_SANITIZER) + set(SANITIZER_FLAGS) + set(USE_SANITIZER "${USE_SANITIZER}") # NOTE: LLVM_USE_SANITIZER checks for a UNIX like system instead of MSVC. # But we don't have LLVM_ON_UNIX so checking for MSVC is the best we can do. - if (LLVM_USE_SANITIZER AND NOT MSVC) - add_flags_if_supported("-fno-omit-frame-pointer") - add_flags_if_supported("-gline-tables-only") + if (USE_SANITIZER AND NOT MSVC) + append_flags_if_supported(SANITIZER_FLAGS "-fno-omit-frame-pointer") + append_flags_if_supported(SANITIZER_FLAGS "-gline-tables-only") if (NOT uppercase_CMAKE_BUILD_TYPE STREQUAL "DEBUG" AND - NOT uppercase_CMAKE_BUILD_TYPE STREQUAL "RELWITHDEBINFO") - add_flags_if_supported("-gline-tables-only") + NOT uppercase_CMAKE_BUILD_TYPE STREQUAL "RELWITHDEBINFO") + append_flags_if_supported(SANITIZER_FLAGS "-gline-tables-only") endif() - if (LLVM_USE_SANITIZER STREQUAL "Address") - add_flags("-fsanitize=address") - elseif (LLVM_USE_SANITIZER MATCHES "Memory(WithOrigins)?") - add_flags(-fsanitize=memory) - if (LLVM_USE_SANITIZER STREQUAL "MemoryWithOrigins") - add_flags("-fsanitize-memory-track-origins") + if (USE_SANITIZER STREQUAL "Address") + append_flags(SANITIZER_FLAGS "-fsanitize=address") + elseif (USE_SANITIZER MATCHES "Memory(WithOrigins)?") + append_flags(SANITIZER_FLAGS -fsanitize=memory) + if (USE_SANITIZER STREQUAL "MemoryWithOrigins") + append_flags(SANITIZER_FLAGS "-fsanitize-memory-track-origins") endif() - elseif (LLVM_USE_SANITIZER STREQUAL "Undefined") - add_flags("-fsanitize=undefined -fno-sanitize=vptr,function -fno-sanitize-recover=all") - elseif (LLVM_USE_SANITIZER STREQUAL "Thread") - add_flags(-fsanitize=thread) + elseif (USE_SANITIZER STREQUAL "Undefined") + append_flags(SANITIZER_FLAGS "-fsanitize=undefined -fno-sanitize=vptr,function -fno-sanitize-recover=all") + elseif (USE_SANITIZER STREQUAL "Thread") + append_flags(SANITIZER_FLAGS -fsanitize=thread) else() - message(WARNING "Unsupported value of LLVM_USE_SANITIZER: ${LLVM_USE_SANITIZER}") + message(WARNING "Unsupported value of LLVM_USE_SANITIZER: ${USE_SANITIZER}") endif() - elseif(LLVM_USE_SANITIZER AND MSVC) + elseif(USE_SANITIZER AND MSVC) message(WARNING "LLVM_USE_SANITIZER is not supported on this platform.") endif() + set(${OUT_VAR} "${SANITIZER_FLAGS}" PARENT_SCOPE) +endfunction() + +# Configure for sanitizers. If LIBCXX_STANDALONE_BUILD then we have to do +# the flag translation ourselves. Othewise LLVM's CMakeList.txt will handle it. +if (LIBCXX_STANDALONE_BUILD) + set(LLVM_USE_SANITIZER "" CACHE STRING + "Define the sanitizer used to build the library and tests") endif() +get_sanitizer_flags(SANITIZER_FLAGS "${LLVM_USE_SANITIZER}") +if (LIBCXX_STANDALONE_BUILD AND SANITIZER_FLAGS) + add_flags(${SANITIZER_FLAGS}) +endif() # Configuration file flags ===================================================== -if (NOT LIBCXX_ABI_VERSION EQUAL DEFAULT_ABI_VERSION) +if (NOT LIBCXX_ABI_VERSION EQUAL 1) config_define(${LIBCXX_ABI_VERSION} _LIBCPP_ABI_VERSION) endif() +if (NOT LIBCXX_ABI_NAMESPACE STREQUAL "") + if (NOT LIBCXX_ABI_NAMESPACE MATCHES "__.*") + message(WARNING "LIBCXX_ABI_NAMESPACE must be a reserved identifier.") + endif() + if (LIBCXX_ABI_NAMESPACE MATCHES "__[0-9]+$") + message(FATAL_ERROR "LIBCXX_ABI_NAMESPACE '${LIBCXX_ABI_NAMESPACE}' is reserved for use by libc++.") + endif() + config_define(${LIBCXX_ABI_NAMESPACE} _LIBCPP_ABI_NAMESPACE) +endif() config_define_if(LIBCXX_ABI_UNSTABLE _LIBCPP_ABI_UNSTABLE) config_define_if(LIBCXX_ABI_FORCE_ITANIUM _LIBCPP_ABI_FORCE_ITANIUM) config_define_if(LIBCXX_ABI_FORCE_MICROSOFT _LIBCPP_ABI_FORCE_MICROSOFT) +config_define_if(LIBCXX_HIDE_FROM_ABI_PER_TU_BY_DEFAULT _LIBCPP_HIDE_FROM_ABI_PER_TU_BY_DEFAULT) config_define_if_not(LIBCXX_ENABLE_GLOBAL_FILESYSTEM_NAMESPACE _LIBCPP_HAS_NO_GLOBAL_FILESYSTEM_NAMESPACE) config_define_if_not(LIBCXX_ENABLE_STDIN _LIBCPP_HAS_NO_STDIN) @@ -724,6 +774,18 @@ include_directories(include) add_subdirectory(include) add_subdirectory(lib) +set(LIBCXX_TEST_DEPS "") + +if (LIBCXX_ENABLE_EXPERIMENTAL_LIBRARY) + list(APPEND LIBCXX_TEST_DEPS cxx_experimental) +endif() +if (LIBCXX_ENABLE_FILESYSTEM) + list(APPEND LIBCXX_TEST_DEPS cxx_filesystem) +endif() + +if (LIBCXX_BUILD_EXTERNAL_THREAD_LIBRARY) + list(APPEND LIBCXX_TEST_DEPS cxx_external_threads) +endif() if (LIBCXX_INCLUDE_BENCHMARKS) add_subdirectory(benchmarks) Modified: vendor/libc++/dist/LICENSE.TXT ============================================================================== --- vendor/libc++/dist/LICENSE.TXT Sat Jan 19 10:05:15 2019 (r343176) +++ vendor/libc++/dist/LICENSE.TXT Sat Jan 19 10:05:35 2019 (r343177) @@ -14,7 +14,7 @@ Full text of the relevant licenses is included below. University of Illinois/NCSA Open Source License -Copyright (c) 2009-2017 by the contributors listed in CREDITS.TXT +Copyright (c) 2009-2019 by the contributors listed in CREDITS.TXT All rights reserved. Modified: vendor/libc++/dist/appveyor-reqs-install.cmd ============================================================================== --- vendor/libc++/dist/appveyor-reqs-install.cmd Sat Jan 19 10:05:15 2019 (r343176) +++ vendor/libc++/dist/appveyor-reqs-install.cmd Sat Jan 19 10:05:35 2019 (r343177) @@ -9,7 +9,7 @@ cd C:\projects\deps :: Setup Compiler ::########################################################################### if NOT EXIST llvm-installer.exe ( - appveyor DownloadFile http://prereleases.llvm.org/win-snapshots/LLVM-7.0.0-r325576-win32.exe -FileName llvm-installer.exe + appveyor DownloadFile https://prereleases.llvm.org/win-snapshots/LLVM-8.0.0-r345380-win32.exe -FileName llvm-installer.exe ) if "%CLANG_VERSION%"=="ToT" ( START /WAIT llvm-installer.exe /S /D=C:\"Program Files\LLVM" Modified: vendor/libc++/dist/appveyor.yml ============================================================================== --- vendor/libc++/dist/appveyor.yml Sat Jan 19 10:05:15 2019 (r343176) +++ vendor/libc++/dist/appveyor.yml Sat Jan 19 10:05:35 2019 (r343177) @@ -19,14 +19,6 @@ environment: MAKE_PROGRAM: ninja APPVEYOR_SAVE_CACHE_ON_ERROR: true - APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2015 - CMAKE_OPTIONS: -DCMAKE_C_COMPILER=clang-cl.exe -DCMAKE_CXX_COMPILER=clang-cl.exe - CLANG_VERSION: 4 - MSVC_SETUP_PATH: C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\vcvarsall.bat - MSVC_SETUP_ARG: x86_amd64 - GENERATOR: Ninja - MAKE_PROGRAM: ninja - APPVEYOR_SAVE_CACHE_ON_ERROR: true - - APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2015 MINGW_PATH: C:\mingw-w64\i686-6.3.0-posix-dwarf-rt_v5-rev1\mingw32\bin GENERATOR: MinGW Makefiles MAKE_PROGRAM: mingw32-make Modified: vendor/libc++/dist/benchmarks/CMakeLists.txt ============================================================================== --- vendor/libc++/dist/benchmarks/CMakeLists.txt Sat Jan 19 10:05:15 2019 (r343176) +++ vendor/libc++/dist/benchmarks/CMakeLists.txt Sat Jan 19 10:05:35 2019 (r343177) @@ -11,17 +11,21 @@ set(BENCHMARK_LIBCXX_COMPILE_FLAGS -isystem ${LIBCXX_SOURCE_DIR}/include -L${LIBCXX_LIBRARY_DIR} -Wl,-rpath,${LIBCXX_LIBRARY_DIR} + ${SANITIZER_FLAGS} ) if (DEFINED LIBCXX_CXX_ABI_LIBRARY_PATH) list(APPEND BENCHMARK_LIBCXX_COMPILE_FLAGS -L${LIBCXX_CXX_ABI_LIBRARY_PATH} -Wl,-rpath,${LIBCXX_CXX_ABI_LIBRARY_PATH}) endif() +if (LIBCXX_NEEDS_SITE_CONFIG) + list(APPEND BENCHMARK_LIBCXX_COMPILE_FLAGS -include "${LIBCXX_BINARY_DIR}/__config_site") +endif() split_list(BENCHMARK_LIBCXX_COMPILE_FLAGS) ExternalProject_Add(google-benchmark-libcxx EXCLUDE_FROM_ALL ON - DEPENDS cxx + DEPENDS cxx cxx-headers PREFIX benchmark-libcxx SOURCE_DIR ${LIBCXX_SOURCE_DIR}/utils/google-benchmark INSTALL_DIR ${CMAKE_CURRENT_BINARY_DIR}/benchmark-libcxx @@ -67,8 +71,19 @@ add_custom_target(cxx-benchmarks) set(BENCHMARK_OUTPUT_DIR ${CMAKE_CURRENT_BINARY_DIR}) set(BENCHMARK_LIBCXX_INSTALL ${CMAKE_CURRENT_BINARY_DIR}/benchmark-libcxx) set(BENCHMARK_NATIVE_INSTALL ${CMAKE_CURRENT_BINARY_DIR}/benchmark-native) + +check_flag_supported("-std=c++17") +mangle_name("LIBCXX_SUPPORTS_STD_EQ_c++17_FLAG" BENCHMARK_SUPPORTS_STD_CXX17_FLAG) +if (${BENCHMARK_SUPPORTS_STD_CXX17_FLAG}) + set(BENCHMARK_DIALECT_FLAG "-std=c++17") +else() + # If the compiler doesn't support -std=c++17, attempt to fall back to -std=c++1z while still + # requiring C++17 language features. + set(BENCHMARK_DIALECT_FLAG "-std=c++1z") +endif() + set(BENCHMARK_TEST_COMPILE_FLAGS - -std=c++17 -O2 + ${BENCHMARK_DIALECT_FLAG} -O2 -I${BENCHMARK_LIBCXX_INSTALL}/include -I${LIBCXX_SOURCE_DIR}/test/support ) @@ -76,11 +91,18 @@ set(BENCHMARK_TEST_LIBCXX_COMPILE_FLAGS -nostdinc++ -isystem ${LIBCXX_SOURCE_DIR}/include ${BENCHMARK_TEST_COMPILE_FLAGS} + ${SANITIZER_FLAGS} -Wno-user-defined-literals ) +if (LIBCXX_NEEDS_SITE_CONFIG) + list(APPEND BENCHMARK_TEST_LIBCXX_COMPILE_FLAGS + -include "${LIBCXX_BINARY_DIR}/__config_site") +endif() + set(BENCHMARK_TEST_LIBCXX_LINK_FLAGS -nodefaultlibs -L${BENCHMARK_LIBCXX_INSTALL}/lib/ + ${SANITIZER_FLAGS} ) set(BENCHMARK_TEST_NATIVE_COMPILE_FLAGS ${BENCHMARK_NATIVE_TARGET_FLAGS} @@ -95,10 +117,25 @@ split_list(BENCHMARK_TEST_LIBCXX_COMPILE_FLAGS) split_list(BENCHMARK_TEST_LIBCXX_LINK_FLAGS) split_list(BENCHMARK_TEST_NATIVE_COMPILE_FLAGS) split_list(BENCHMARK_TEST_NATIVE_LINK_FLAGS) -macro(add_benchmark_test name source_file) + +if (LIBCXX_BENCHMARK_NATIVE_STDLIB STREQUAL "libstdc++") + find_library(LIBSTDCXX_FILESYSTEM_TEST stdc++fs + PATHS ${LIBCXX_BENCHMARK_NATIVE_GCC_TOOLCHAIN} + PATH_SUFFIXES lib lib64 + DOC "The libstdc++ filesystem library used by the benchmarks" + ) + if (NOT "${LIBSTDCXX_FILESYSTEM_TEST}" STREQUAL "LIBSTDCXX_FILESYSTEM_TEST-NOTFOUND") + set(LIBSTDCXX_FILESYSTEM_LIB "stdc++fs") + endif() +endif() + +set(libcxx_benchmark_targets) + +function(add_benchmark_test name source_file) set(libcxx_target ${name}_libcxx) + list(APPEND libcxx_benchmark_targets ${libcxx_target}) add_executable(${libcxx_target} EXCLUDE_FROM_ALL ${source_file}) - add_dependencies(${libcxx_target} cxx google-benchmark-libcxx) + add_dependencies(${libcxx_target} cxx cxx-headers google-benchmark-libcxx) add_dependencies(cxx-benchmarks ${libcxx_target}) if (LIBCXX_ENABLE_SHARED) target_link_libraries(${libcxx_target} cxx_shared) @@ -108,7 +145,13 @@ macro(add_benchmark_test name source_file) if (TARGET cxx_experimental) target_link_libraries(${libcxx_target} cxx_experimental) endif() + if (TARGET cxx_filesystem) + target_link_libraries(${libcxx_target} cxx_filesystem) + endif() target_link_libraries(${libcxx_target} -lbenchmark) + if (LLVM_USE_SANITIZER) + target_link_libraries(${libcxx_target} -ldl) + endif() set_target_properties(${libcxx_target} PROPERTIES OUTPUT_NAME "${name}.libcxx.out" @@ -116,15 +159,19 @@ macro(add_benchmark_test name source_file) COMPILE_FLAGS "${BENCHMARK_TEST_LIBCXX_COMPILE_FLAGS}" LINK_FLAGS "${BENCHMARK_TEST_LIBCXX_LINK_FLAGS}") if (LIBCXX_BENCHMARK_NATIVE_STDLIB) + if (LIBCXX_BENCHMARK_NATIVE_STDLIB STREQUAL "libstdc++" AND NOT DEFINED LIBSTDCXX_FILESYSTEM_LIB + AND "${name}" STREQUAL "filesystem") + return() + endif() set(native_target ${name}_native) add_executable(${native_target} EXCLUDE_FROM_ALL ${source_file}) add_dependencies(${native_target} google-benchmark-native google-benchmark-libcxx) target_link_libraries(${native_target} -lbenchmark) if (LIBCXX_BENCHMARK_NATIVE_STDLIB STREQUAL "libstdc++") - target_link_libraries(${native_target} -lstdc++fs) + target_link_libraries(${native_target} ${LIBSTDCXX_FILESYSTEM_LIB}) elseif (LIBCXX_BENCHMARK_NATIVE_STDLIB STREQUAL "libc++") - target_link_libraries(${native_target} -lc++experimental) + target_link_libraries(${native_target} -lc++fs -lc++experimental) endif() if (LIBCXX_HAS_PTHREAD_LIB) target_link_libraries(${native_target} -pthread) @@ -138,7 +185,7 @@ macro(add_benchmark_test name source_file) COMPILE_FLAGS "${BENCHMARK_TEST_NATIVE_COMPILE_FLAGS}" LINK_FLAGS "${BENCHMARK_TEST_NATIVE_LINK_FLAGS}") endif() -endmacro() +endfunction() #============================================================================== @@ -155,3 +202,23 @@ foreach(test_path ${BENCHMARK_TESTS}) endif() add_benchmark_test(${test_name} ${test_file}) endforeach() + +if (LIBCXX_INCLUDE_TESTS) + include(AddLLVM) + + if (NOT DEFINED LIBCXX_TEST_DEPS) + message(FATAL_ERROR "Expected LIBCXX_TEST_DEPS to be defined") + endif() + + configure_lit_site_cfg( + ${CMAKE_CURRENT_SOURCE_DIR}/lit.site.cfg.py.in + ${CMAKE_CURRENT_BINARY_DIR}/lit.site.cfg.py) + + set(BENCHMARK_LIT_ARGS "--show-all --show-xfail --show-unsupported ${LIT_ARGS_DEFAULT}") + + add_lit_target(check-cxx-benchmarks + "Running libcxx benchmarks tests" + ${CMAKE_CURRENT_BINARY_DIR} + DEPENDS cxx-benchmarks ${LIBCXX_TEST_DEPS} + ARGS ${BENCHMARK_LIT_ARGS}) +endif() Added: vendor/libc++/dist/benchmarks/CartesianBenchmarks.hpp ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ vendor/libc++/dist/benchmarks/CartesianBenchmarks.hpp Sat Jan 19 10:05:35 2019 (r343177) @@ -0,0 +1,135 @@ +//===----------------------------------------------------------------------===// +// +// The LLVM Compiler Infrastructure +// +// This file is dual licensed under the MIT and the University of Illinois Open +// Source Licenses. See LICENSE.TXT for details. +// +//===----------------------------------------------------------------------===// + + +#include +#include +#include +#include + +#include "benchmark/benchmark.h" +#include "test_macros.h" + +namespace internal { + +template +struct EnumValue : std::integral_constant(I)> { + static std::string name() { return std::string("_") + D::Names[I]; } +}; + +template +constexpr auto makeEnumValueTuple(std::index_sequence) { + return std::make_tuple(EnumValue{}...); +} + +template +static auto skip(const B& Bench, int) -> decltype(Bench.skip()) { + return Bench.skip(); +} +template +static auto skip(const B& Bench, char) { + return false; +} + +template +void makeBenchmarkFromValuesImpl(const Args& A, std::index_sequence) { + for (auto& V : A) { + B Bench{std::get(V)...}; + if (!internal::skip(Bench, 0)) { + benchmark::RegisterBenchmark(Bench.name().c_str(), + [=](benchmark::State& S) { Bench.run(S); }); + } + } +} + +template +void makeBenchmarkFromValues(const std::vector >& A) { + makeBenchmarkFromValuesImpl(A, std::index_sequence_for()); +} + +template