From owner-svn-src-all@freebsd.org Sun Mar 1 12:34:29 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 686E526F742; Sun, 1 Mar 2020 12:34:29 +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 48VjQD57vFz4Q3h; Sun, 1 Mar 2020 12:34:28 +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 67B9139F3; Sun, 1 Mar 2020 12:34:28 +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 021CYSMB001468; Sun, 1 Mar 2020 12:34:28 GMT (envelope-from tuexen@FreeBSD.org) Received: (from tuexen@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 021CYSNI001467; Sun, 1 Mar 2020 12:34:28 GMT (envelope-from tuexen@FreeBSD.org) Message-Id: <202003011234.021CYSNI001467@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: tuexen set sender to tuexen@FreeBSD.org using -f From: Michael Tuexen Date: Sun, 1 Mar 2020 12:34:28 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r358482 - head/sys/netinet X-SVN-Group: head X-SVN-Commit-Author: tuexen X-SVN-Commit-Paths: head/sys/netinet X-SVN-Commit-Revision: 358482 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages 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, 01 Mar 2020 12:34:29 -0000 Author: tuexen Date: Sun Mar 1 12:34:27 2020 New Revision: 358482 URL: https://svnweb.freebsd.org/changeset/base/358482 Log: Remove stale definitions. The removed definitions are not used right now and are incompatible with the correct ones in RFC 3168. Submitted by: Richard Scheffenegger Differential Revision: https://reviews.freebsd.org/D23903 Modified: head/sys/netinet/ip6.h Modified: head/sys/netinet/ip6.h ============================================================================== --- head/sys/netinet/ip6.h Sun Mar 1 08:53:45 2020 (r358481) +++ head/sys/netinet/ip6.h Sun Mar 1 12:34:27 2020 (r358482) @@ -105,11 +105,6 @@ struct ip6_hdr { #endif /* LITTLE_ENDIAN */ #endif #define IPV6_FLOWLABEL_LEN 20 -#if 1 -/* ECN bits proposed by Sally Floyd */ -#define IP6TOS_CE 0x01 /* congestion experienced */ -#define IP6TOS_ECT 0x02 /* ECN-capable transport */ -#endif /* * Extension Headers From owner-svn-src-all@freebsd.org Sun Mar 1 13:12:05 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 36EBD24058A; Sun, 1 Mar 2020 13:12:05 +0000 (UTC) (envelope-from tijl@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 48VkFc6dlYz3FjF; Sun, 1 Mar 2020 13:12:04 +0000 (UTC) (envelope-from tijl@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id CA8F341FA; Sun, 1 Mar 2020 13:12:04 +0000 (UTC) (envelope-from tijl@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 021DC4f3022405; Sun, 1 Mar 2020 13:12:04 GMT (envelope-from tijl@FreeBSD.org) Received: (from tijl@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 021DC4vh022404; Sun, 1 Mar 2020 13:12:04 GMT (envelope-from tijl@FreeBSD.org) Message-Id: <202003011312.021DC4vh022404@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: tijl set sender to tijl@FreeBSD.org using -f From: Tijl Coosemans Date: Sun, 1 Mar 2020 13:12:04 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r358483 - head/sys/compat/linux X-SVN-Group: head X-SVN-Commit-Author: tijl X-SVN-Commit-Paths: head/sys/compat/linux X-SVN-Commit-Revision: 358483 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages 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, 01 Mar 2020 13:12:05 -0000 Author: tijl Date: Sun Mar 1 13:12:04 2020 New Revision: 358483 URL: https://svnweb.freebsd.org/changeset/base/358483 Log: linuxulator: Map scheduler priorities to Linux priorities. On Linux the valid range of priorities for the SCHED_FIFO and SCHED_RR scheduling policies is [1,99]. For SCHED_OTHER the single valid priority is 0. On FreeBSD it is [0,31] for all policies. Programs are supposed to query the valid range using sched_get_priority_(min|max), but of course some programs assume the Linux values are valid. This commit adds a tunable compat.linux.map_sched_prio. When enabled sched_get_priority_(min|max) return the Linux values and sched_setscheduler and sched_(get|set)param translate between FreeBSD and Linux values. Because there are more Linux levels than FreeBSD levels, multiple Linux levels map to a single FreeBSD level, which means pre-emption might not happen as it does on Linux, so the tunable allows to disable this behaviour. It is enabled by default because I think it is unlikely that anyone runs real-time software under Linux emulation on FreeBSD that critically relies on correct pre-emption. This fixes FMOD, a commercial sound library used by several games. PR: 240043 Tested by: Alex S Reviewed by: dchagin MFC after: 2 weeks Differential Revision: https://reviews.freebsd.org/D23790 Modified: head/sys/compat/linux/linux_misc.c head/sys/compat/linux/linux_misc.h Modified: head/sys/compat/linux/linux_misc.c ============================================================================== --- head/sys/compat/linux/linux_misc.c Sun Mar 1 12:34:27 2020 (r358482) +++ head/sys/compat/linux/linux_misc.c Sun Mar 1 13:12:04 2020 (r358483) @@ -144,6 +144,11 @@ struct l_pselect6arg { l_size_t ss_len; }; +static bool map_sched_prio = true; +SYSCTL_BOOL(_compat_linux, OID_AUTO, map_sched_prio, CTLFLAG_RDTUN, + &map_sched_prio, 0, "Map scheduler priorities to Linux priorities " + "(not POSIX compliant)"); + static int linux_utimensat_nsec_valid(l_long); @@ -1419,6 +1424,33 @@ linux_sched_setscheduler(struct thread *td, if (error) return (error); + if (map_sched_prio) { + switch (policy) { + case SCHED_OTHER: + if (sched_param.sched_priority != 0) + return (EINVAL); + + sched_param.sched_priority = + PRI_MAX_TIMESHARE - PRI_MIN_TIMESHARE; + break; + case SCHED_FIFO: + case SCHED_RR: + if (sched_param.sched_priority < 1 || + sched_param.sched_priority >= LINUX_MAX_RT_PRIO) + return (EINVAL); + + /* + * Map [1, LINUX_MAX_RT_PRIO - 1] to + * [0, RTP_PRIO_MAX - RTP_PRIO_MIN] (rounding down). + */ + sched_param.sched_priority = + (sched_param.sched_priority - 1) * + (RTP_PRIO_MAX - RTP_PRIO_MIN + 1) / + (LINUX_MAX_RT_PRIO - 1); + break; + } + } + tdt = linux_tdfind(td, args->pid, -1); if (tdt == NULL) return (ESRCH); @@ -1462,6 +1494,20 @@ linux_sched_get_priority_max(struct thread *td, { struct sched_get_priority_max_args bsd; + if (map_sched_prio) { + switch (args->policy) { + case LINUX_SCHED_OTHER: + td->td_retval[0] = 0; + return (0); + case LINUX_SCHED_FIFO: + case LINUX_SCHED_RR: + td->td_retval[0] = LINUX_MAX_RT_PRIO - 1; + return (0); + default: + return (EINVAL); + } + } + switch (args->policy) { case LINUX_SCHED_OTHER: bsd.policy = SCHED_OTHER; @@ -1484,6 +1530,20 @@ linux_sched_get_priority_min(struct thread *td, { struct sched_get_priority_min_args bsd; + if (map_sched_prio) { + switch (args->policy) { + case LINUX_SCHED_OTHER: + td->td_retval[0] = 0; + return (0); + case LINUX_SCHED_FIFO: + case LINUX_SCHED_RR: + td->td_retval[0] = 1; + return (0); + default: + return (EINVAL); + } + } + switch (args->policy) { case LINUX_SCHED_OTHER: bsd.policy = SCHED_OTHER; @@ -1864,7 +1924,7 @@ linux_sched_setparam(struct thread *td, { struct sched_param sched_param; struct thread *tdt; - int error; + int error, policy; error = copyin(uap->param, &sched_param, sizeof(sched_param)); if (error) @@ -1874,8 +1934,41 @@ linux_sched_setparam(struct thread *td, if (tdt == NULL) return (ESRCH); + if( map_sched_prio ) { + error = kern_sched_getscheduler(td, tdt, &policy); + if (error) + goto out; + + switch (policy) { + case SCHED_OTHER: + if (sched_param.sched_priority != 0) { + error = EINVAL; + goto out; + } + sched_param.sched_priority = + PRI_MAX_TIMESHARE - PRI_MIN_TIMESHARE; + break; + case SCHED_FIFO: + case SCHED_RR: + if (sched_param.sched_priority < 1 || + sched_param.sched_priority >= LINUX_MAX_RT_PRIO) { + error = EINVAL; + goto out; + } + /* + * Map [1, LINUX_MAX_RT_PRIO - 1] to + * [0, RTP_PRIO_MAX - RTP_PRIO_MIN] (rounding down). + */ + sched_param.sched_priority = + (sched_param.sched_priority - 1) * + (RTP_PRIO_MAX - RTP_PRIO_MIN + 1) / + (LINUX_MAX_RT_PRIO - 1); + break; + } + } + error = kern_sched_setparam(td, tdt, &sched_param); - PROC_UNLOCK(tdt->td_proc); +out: PROC_UNLOCK(tdt->td_proc); return (error); } @@ -1885,17 +1978,45 @@ linux_sched_getparam(struct thread *td, { struct sched_param sched_param; struct thread *tdt; - int error; + int error, policy; tdt = linux_tdfind(td, uap->pid, -1); if (tdt == NULL) return (ESRCH); error = kern_sched_getparam(td, tdt, &sched_param); - PROC_UNLOCK(tdt->td_proc); - if (error == 0) - error = copyout(&sched_param, uap->param, - sizeof(sched_param)); + if (error) { + PROC_UNLOCK(tdt->td_proc); + return (error); + } + + if (map_sched_prio) { + error = kern_sched_getscheduler(td, tdt, &policy); + PROC_UNLOCK(tdt->td_proc); + if (error) + return (error); + + switch (policy) { + case SCHED_OTHER: + sched_param.sched_priority = 0; + break; + case SCHED_FIFO: + case SCHED_RR: + /* + * Map [0, RTP_PRIO_MAX - RTP_PRIO_MIN] to + * [1, LINUX_MAX_RT_PRIO - 1] (rounding up). + */ + sched_param.sched_priority = + (sched_param.sched_priority * + (LINUX_MAX_RT_PRIO - 1) + + (RTP_PRIO_MAX - RTP_PRIO_MIN - 1)) / + (RTP_PRIO_MAX - RTP_PRIO_MIN) + 1; + break; + } + } else + PROC_UNLOCK(tdt->td_proc); + + error = copyout(&sched_param, uap->param, sizeof(sched_param)); return (error); } Modified: head/sys/compat/linux/linux_misc.h ============================================================================== --- head/sys/compat/linux/linux_misc.h Sun Mar 1 12:34:27 2020 (r358482) +++ head/sys/compat/linux/linux_misc.h Sun Mar 1 13:12:04 2020 (r358483) @@ -105,6 +105,8 @@ extern const char *linux_kplatform; #define LINUX_SCHED_FIFO 1 #define LINUX_SCHED_RR 2 +#define LINUX_MAX_RT_PRIO 100 + struct l_new_utsname { char sysname[LINUX_MAX_UTSNAME]; char nodename[LINUX_MAX_UTSNAME]; From owner-svn-src-all@freebsd.org Sun Mar 1 16:45:55 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 969632454B0; Sun, 1 Mar 2020 16:45:55 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.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 48Vq0M1sY0z49DY; Sun, 1 Mar 2020 16:45:55 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id ADE836875; Sun, 1 Mar 2020 16:45:54 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 021GjsCo051330; Sun, 1 Mar 2020 16:45:54 GMT (envelope-from imp@FreeBSD.org) Received: (from imp@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 021GjsiG051329; Sun, 1 Mar 2020 16:45:54 GMT (envelope-from imp@FreeBSD.org) Message-Id: <202003011645.021GjsiG051329@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: imp set sender to imp@FreeBSD.org using -f From: Warner Losh Date: Sun, 1 Mar 2020 16:45:54 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r358484 - head/sys/dev/al_eth X-SVN-Group: head X-SVN-Commit-Author: imp X-SVN-Commit-Paths: head/sys/dev/al_eth X-SVN-Commit-Revision: 358484 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages 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, 01 Mar 2020 16:45:55 -0000 Author: imp Date: Sun Mar 1 16:45:54 2020 New Revision: 358484 URL: https://svnweb.freebsd.org/changeset/base/358484 Log: Remove FreeBSD 7 conditional code... We've had a lot of other changes since then and al_eth appears only in the Annapurna ARM designs which arrived in the tree after that. Modified: head/sys/dev/al_eth/al_eth.c Modified: head/sys/dev/al_eth/al_eth.c ============================================================================== --- head/sys/dev/al_eth/al_eth.c Sun Mar 1 13:12:04 2020 (r358483) +++ head/sys/dev/al_eth/al_eth.c Sun Mar 1 16:45:54 2020 (r358484) @@ -1639,10 +1639,8 @@ al_eth_rx_recv_work(void *arg, int pending) al_eth_rx_checksum(rx_ring->adapter, hal_pkt, mbuf); } -#if __FreeBSD_version >= 800000 mbuf->m_pkthdr.flowid = qid; M_HASHTYPE_SET(mbuf, M_HASHTYPE_OPAQUE); -#endif /* * LRO is only for IP/TCP packets and TCP checksum of the packet From owner-svn-src-all@freebsd.org Sun Mar 1 17:27:26 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 28C9C246842; Sun, 1 Mar 2020 17:27:26 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.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 48VqwF6r16z4bqP; Sun, 1 Mar 2020 17:27:25 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 97BA36FDC; Sun, 1 Mar 2020 17:27:25 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 021HRPmL076501; Sun, 1 Mar 2020 17:27:25 GMT (envelope-from imp@FreeBSD.org) Received: (from imp@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 021HRPvd076500; Sun, 1 Mar 2020 17:27:25 GMT (envelope-from imp@FreeBSD.org) Message-Id: <202003011727.021HRPvd076500@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: imp set sender to imp@FreeBSD.org using -f From: Warner Losh Date: Sun, 1 Mar 2020 17:27:25 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r358485 - head/sys/dev/ale X-SVN-Group: head X-SVN-Commit-Author: imp X-SVN-Commit-Paths: head/sys/dev/ale X-SVN-Commit-Revision: 358485 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages 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, 01 Mar 2020 17:27:26 -0000 Author: imp Date: Sun Mar 1 17:27:25 2020 New Revision: 358485 URL: https://svnweb.freebsd.org/changeset/base/358485 Log: Remove compatibility code for changing sysctl definitions for pre FreeBSD 9 versions. These are just noise these days. Modified: head/sys/dev/ale/if_ale.c Modified: head/sys/dev/ale/if_ale.c ============================================================================== --- head/sys/dev/ale/if_ale.c Sun Mar 1 16:45:54 2020 (r358484) +++ head/sys/dev/ale/if_ale.c Sun Mar 1 17:27:25 2020 (r358485) @@ -767,16 +767,8 @@ ale_detach(device_t dev) #define ALE_SYSCTL_STAT_ADD32(c, h, n, p, d) \ SYSCTL_ADD_UINT(c, h, OID_AUTO, n, CTLFLAG_RD, p, 0, d) -#if __FreeBSD_version >= 900030 #define ALE_SYSCTL_STAT_ADD64(c, h, n, p, d) \ SYSCTL_ADD_UQUAD(c, h, OID_AUTO, n, CTLFLAG_RD, p, d) -#elif __FreeBSD_version > 800000 -#define ALE_SYSCTL_STAT_ADD64(c, h, n, p, d) \ - SYSCTL_ADD_QUAD(c, h, OID_AUTO, n, CTLFLAG_RD, p, d) -#else -#define ALE_SYSCTL_STAT_ADD64(c, h, n, p, d) \ - SYSCTL_ADD_ULONG(c, h, OID_AUTO, n, CTLFLAG_RD, p, d) -#endif static void ale_sysctl_node(struct ale_softc *sc) From owner-svn-src-all@freebsd.org Sun Mar 1 17:27:32 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 222A1246878; Sun, 1 Mar 2020 17:27:32 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.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 48VqwM5yGDz4c6C; Sun, 1 Mar 2020 17:27:31 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 1A2336FDD; Sun, 1 Mar 2020 17:27:31 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 021HRUuv076650; Sun, 1 Mar 2020 17:27:30 GMT (envelope-from imp@FreeBSD.org) Received: (from imp@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 021HRU5G076569; Sun, 1 Mar 2020 17:27:30 GMT (envelope-from imp@FreeBSD.org) Message-Id: <202003011727.021HRU5G076569@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: imp set sender to imp@FreeBSD.org using -f From: Warner Losh Date: Sun, 1 Mar 2020 17:27:30 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r358486 - head/sys/dev/bce X-SVN-Group: head X-SVN-Commit-Author: imp X-SVN-Commit-Paths: head/sys/dev/bce X-SVN-Commit-Revision: 358486 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages 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, 01 Mar 2020 17:27:32 -0000 Author: imp Date: Sun Mar 1 17:27:30 2020 New Revision: 358486 URL: https://svnweb.freebsd.org/changeset/base/358486 Log: Remove all the compatibility hacks for systems that predate FreeBSD 8. Some of these look to be cut and pasted from other drivers since this driver was committed to FreeBSD 7-current and MFC'd to FreeBSD 6. The ones for FreeBSD 4 and 5 likely never were working... Modified: head/sys/dev/bce/if_bce.c head/sys/dev/bce/if_bcereg.h Modified: head/sys/dev/bce/if_bce.c ============================================================================== --- head/sys/dev/bce/if_bce.c Sun Mar 1 17:27:25 2020 (r358485) +++ head/sys/dev/bce/if_bce.c Sun Mar 1 17:27:30 2020 (r358486) @@ -1407,14 +1407,8 @@ bce_attach(device_t dev) ifp->if_capabilities = BCE_IF_CAPABILITIES; } -#if __FreeBSD_version >= 800505 - /* - * Introducing IFCAP_LINKSTATE didn't bump __FreeBSD_version - * so it's approximate value. - */ if ((sc->bce_phy_flags & BCE_PHY_REMOTE_CAP_FLAG) != 0) ifp->if_capabilities |= IFCAP_LINKSTATE; -#endif ifp->if_capenable = ifp->if_capabilities; @@ -1490,13 +1484,8 @@ bce_attach(device_t dev) /* Attach to the Ethernet interface list. */ ether_ifattach(ifp, sc->eaddr); -#if __FreeBSD_version < 500000 - callout_init(&sc->bce_tick_callout); - callout_init(&sc->bce_pulse_callout); -#else callout_init_mtx(&sc->bce_tick_callout, &sc->bce_mtx, 0); callout_init_mtx(&sc->bce_pulse_callout, &sc->bce_mtx, 0); -#endif /* Hookup IRQ last. */ rc = bus_setup_intr(dev, sc->bce_res_irq, INTR_TYPE_NET | INTR_MPSAFE, @@ -6801,14 +6790,9 @@ bce_rx_intr(struct bce_softc *sc) DBRUN(sc->vlan_tagged_frames_rcvd++); if (ifp->if_capenable & IFCAP_VLAN_HWTAGGING) { DBRUN(sc->vlan_tagged_frames_stripped++); -#if __FreeBSD_version < 700000 - VLAN_INPUT_TAG(ifp, m0, - l2fhdr->l2_fhdr_vlan_tag, continue); -#else m0->m_pkthdr.ether_vtag = l2fhdr->l2_fhdr_vlan_tag; m0->m_flags |= M_VLANTAG; -#endif } else { /* * bce(4) controllers can't disable VLAN Modified: head/sys/dev/bce/if_bcereg.h ============================================================================== --- head/sys/dev/bce/if_bcereg.h Sun Mar 1 17:27:25 2020 (r358485) +++ head/sys/dev/bce/if_bcereg.h Sun Mar 1 17:27:30 2020 (r358486) @@ -490,18 +490,6 @@ default: DBPRINT(sc, BCE_INSANE_PHY, \ #endif /* BCE_DEBUG */ -#if __FreeBSD_version < 800054 -#if defined(__i386__) || defined(__amd64__) -#define mb() __asm volatile("mfence" ::: "memory") -#define wmb() __asm volatile("sfence" ::: "memory") -#define rmb() __asm volatile("lfence" ::: "memory") -#else -#define mb() -#define rmb() -#define wmb() -#endif -#endif - /****************************************************************************/ /* Device identification definitions. */ /****************************************************************************/ @@ -577,7 +565,6 @@ struct bce_type { /****************************************************************************/ /* Byte order conversions. */ /****************************************************************************/ -#if __FreeBSD_version >= 500000 #define bce_htobe16(x) htobe16(x) #define bce_htobe32(x) htobe32(x) #define bce_htobe64(x) htobe64(x) @@ -591,23 +578,7 @@ struct bce_type { #define bce_le16toh(x) le16toh(x) #define bce_le32toh(x) le32toh(x) #define bce_le64toh(x) le64toh(x) -#else -#define bce_htobe16(x) (x) -#define bce_htobe32(x) (x) -#define bce_htobe64(x) (x) -#define bce_htole16(x) (x) -#define bce_htole32(x) (x) -#define bce_htole64(x) (x) -#define bce_be16toh(x) (x) -#define bce_be32toh(x) (x) -#define bce_be64toh(x) (x) -#define bce_le16toh(x) (x) -#define bce_le32toh(x) (x) -#define bce_le64toh(x) (x) -#endif - - /****************************************************************************/ /* NVRAM Access */ /****************************************************************************/ @@ -6336,14 +6307,9 @@ struct fw_info { #define BCE_IF_HWASSIST (CSUM_TCP | CSUM_UDP) #endif -#if __FreeBSD_version < 700000 -#define BCE_IF_CAPABILITIES (IFCAP_VLAN_MTU | \ - IFCAP_VLAN_HWTAGGING | IFCAP_HWCSUM | IFCAP_JUMBO_MTU) -#else #define BCE_IF_CAPABILITIES (IFCAP_VLAN_MTU | \ IFCAP_VLAN_HWTAGGING | IFCAP_HWCSUM | \ IFCAP_JUMBO_MTU | IFCAP_VLAN_HWCSUM) -#endif #define BCE_MIN_MTU 60 #define BCE_MIN_ETHER_MTU 64 From owner-svn-src-all@freebsd.org Sun Mar 1 17:27:37 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 5494E2468CE; Sun, 1 Mar 2020 17:27:37 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.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 48VqwS6dcZz4cJl; Sun, 1 Mar 2020 17:27:36 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 15F136FDF; Sun, 1 Mar 2020 17:27:36 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 021HRZ29076739; Sun, 1 Mar 2020 17:27:35 GMT (envelope-from imp@FreeBSD.org) Received: (from imp@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 021HRZex076736; Sun, 1 Mar 2020 17:27:35 GMT (envelope-from imp@FreeBSD.org) Message-Id: <202003011727.021HRZex076736@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: imp set sender to imp@FreeBSD.org using -f From: Warner Losh Date: Sun, 1 Mar 2020 17:27:35 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r358487 - head/sys/dev/isci X-SVN-Group: head X-SVN-Commit-Author: imp X-SVN-Commit-Paths: head/sys/dev/isci X-SVN-Commit-Revision: 358487 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages 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, 01 Mar 2020 17:27:37 -0000 Author: imp Date: Sun Mar 1 17:27:35 2020 New Revision: 358487 URL: https://svnweb.freebsd.org/changeset/base/358487 Log: Remove support for FreeBSD 8 systems. These workarounds and ways of rescanning devices are no longer done. Modified: head/sys/dev/isci/isci.h head/sys/dev/isci/isci_controller.c head/sys/dev/isci/isci_io_request.c Modified: head/sys/dev/isci/isci.h ============================================================================== --- head/sys/dev/isci/isci.h Sun Mar 1 17:27:30 2020 (r358486) +++ head/sys/dev/isci/isci.h Sun Mar 1 17:27:35 2020 (r358487) @@ -303,10 +303,8 @@ void isci_request_construct(struct ISCI_REQUEST *reque void isci_io_request_execute_scsi_io(union ccb *ccb, struct ISCI_CONTROLLER *controller); -#if __FreeBSD_version >= 900026 void isci_io_request_execute_smp_io( union ccb *ccb, struct ISCI_CONTROLLER *controller); -#endif void isci_io_request_timeout(void *); Modified: head/sys/dev/isci/isci_controller.c ============================================================================== --- head/sys/dev/isci/isci_controller.c Sun Mar 1 17:27:30 2020 (r358486) +++ head/sys/dev/isci/isci_controller.c Sun Mar 1 17:27:35 2020 (r358487) @@ -583,21 +583,6 @@ void isci_controller_domain_discovery_complete( /* Unfreeze simq to allow initial scan to proceed. */ xpt_release_simq(isci_controller->sim, TRUE); -#if __FreeBSD_version < 800000 - /* When driver is loaded after boot, we need to - * explicitly rescan here for versions <8.0, because - * CAM only automatically scans new buses at boot - * time. - */ - union ccb *ccb = xpt_alloc_ccb_nowait(); - - xpt_create_path(&ccb->ccb_h.path, NULL, - cam_sim_path(isci_controller->sim), - CAM_TARGET_WILDCARD, CAM_LUN_WILDCARD); - - xpt_rescan(ccb); -#endif - if (next_index < driver->controller_count) { /* There are more controllers that need to * start. So start the next one. @@ -689,9 +674,7 @@ void isci_action(struct cam_sim *sim, union ccb *ccb) cpi->hba_eng_cnt = 0; cpi->max_target = SCI_MAX_REMOTE_DEVICES - 1; cpi->max_lun = ISCI_MAX_LUN; -#if __FreeBSD_version >= 800102 cpi->maxio = isci_io_request_get_max_io_size(); -#endif cpi->unit_number = cam_sim_unit(sim); cpi->bus_id = bus; cpi->initiator_id = SCI_MAX_REMOTE_DEVICES; @@ -752,11 +735,9 @@ void isci_action(struct cam_sim *sim, union ccb *ccb) } isci_io_request_execute_scsi_io(ccb, controller); break; -#if __FreeBSD_version >= 900026 case XPT_SMP_IO: isci_io_request_execute_smp_io(ccb, controller); break; -#endif case XPT_SET_TRAN_SETTINGS: ccb->ccb_h.status &= ~CAM_STATUS_MASK; ccb->ccb_h.status |= CAM_REQ_CMP; Modified: head/sys/dev/isci/isci_io_request.c ============================================================================== --- head/sys/dev/isci/isci_io_request.c Sun Mar 1 17:27:30 2020 (r358486) +++ head/sys/dev/isci/isci_io_request.c Sun Mar 1 17:27:35 2020 (r358487) @@ -102,7 +102,6 @@ isci_io_request_complete(SCI_CONTROLLER_HANDLE_T scif_ switch (completion_status) { case SCI_IO_SUCCESS: case SCI_IO_SUCCESS_COMPLETE_BEFORE_START: -#if __FreeBSD_version >= 900026 if (ccb->ccb_h.func_code == XPT_SMP_IO) { void *smp_response = scif_io_request_get_response_iu_address( @@ -111,7 +110,6 @@ isci_io_request_complete(SCI_CONTROLLER_HANDLE_T scif_ memcpy(ccb->smpio.smp_response, smp_response, ccb->smpio.smp_response_len); } -#endif ccb->ccb_h.status |= CAM_REQ_CMP; break; @@ -802,7 +800,6 @@ isci_io_request_timeout(void *arg) mtx_unlock(&controller->lock); } -#if __FreeBSD_version >= 900026 /** * @brief This callback method gets the size of and pointer to the buffer * (if any) containing the request buffer for an SMP request. @@ -990,4 +987,3 @@ isci_io_request_execute_smp_io(union ccb *ccb, SBT_1MS * ccb->ccb_h.timeout, 0, isci_io_request_timeout, request, 0); } -#endif From owner-svn-src-all@freebsd.org Sun Mar 1 17:46:29 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id EAD3D246FAA; Sun, 1 Mar 2020 17:46:29 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.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 48VrLF5YkQz4Srm; Sun, 1 Mar 2020 17:46:29 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 3C2B47377; Sun, 1 Mar 2020 17:46:29 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 021HkTRj088683; Sun, 1 Mar 2020 17:46:29 GMT (envelope-from imp@FreeBSD.org) Received: (from imp@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 021HkSsl088681; Sun, 1 Mar 2020 17:46:28 GMT (envelope-from imp@FreeBSD.org) Message-Id: <202003011746.021HkSsl088681@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: imp set sender to imp@FreeBSD.org using -f From: Warner Losh Date: Sun, 1 Mar 2020 17:46:28 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r358488 - head/sys/dev/bxe X-SVN-Group: head X-SVN-Commit-Author: imp X-SVN-Commit-Paths: head/sys/dev/bxe X-SVN-Commit-Revision: 358488 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages 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, 01 Mar 2020 17:46:30 -0000 Author: imp Date: Sun Mar 1 17:46:28 2020 New Revision: 358488 URL: https://svnweb.freebsd.org/changeset/base/358488 Log: Remove FreeBSD 7-10 support from bxe driver. Use new PCIER and PCIEM names in the driver rather than relying on old, compat shims. Modified: head/sys/dev/bxe/bxe.c head/sys/dev/bxe/bxe.h Modified: head/sys/dev/bxe/bxe.c ============================================================================== --- head/sys/dev/bxe/bxe.c Sun Mar 1 17:27:35 2020 (r358487) +++ head/sys/dev/bxe/bxe.c Sun Mar 1 17:46:28 2020 (r358488) @@ -13261,8 +13261,8 @@ bxe_pcie_capability_read(struct bxe_softc *sc, static uint8_t bxe_is_pcie_pending(struct bxe_softc *sc) { - return (bxe_pcie_capability_read(sc, PCIR_EXPRESS_DEVICE_STA, 2) & - PCIM_EXP_STA_TRANSACTION_PND); + return (bxe_pcie_capability_read(sc, PCIER_DEVICE_STA, 2) & + PCIEM_STA_TRANSACTION_PND); } /* @@ -13286,7 +13286,7 @@ bxe_probe_pci_caps(struct bxe_softc *sc) } } - link_status = bxe_pcie_capability_read(sc, PCIR_EXPRESS_LINK_STA, 2); + link_status = bxe_pcie_capability_read(sc, PCIER_LINK_STA, 2); /* handle PCIe 2.0 workarounds for 57710 */ if (CHIP_IS_E1(sc)) { @@ -13296,16 +13296,16 @@ bxe_probe_pci_caps(struct bxe_softc *sc) /* workaround for 57710 errata E4_57710_27488 */ sc->devinfo.pcie_link_width = - ((link_status & PCIM_LINK_STA_WIDTH) >> 4); + ((link_status & PCIEM_LINK_STA_WIDTH) >> 4); if (sc->devinfo.pcie_link_speed > 1) { sc->devinfo.pcie_link_width = - ((link_status & PCIM_LINK_STA_WIDTH) >> 4) >> 1; + ((link_status & PCIEM_LINK_STA_WIDTH) >> 4) >> 1; } } else { sc->devinfo.pcie_link_speed = - (link_status & PCIM_LINK_STA_SPEED); + (link_status & PCIEM_LINK_STA_SPEED); sc->devinfo.pcie_link_width = - ((link_status & PCIM_LINK_STA_WIDTH) >> 4); + ((link_status & PCIEM_LINK_STA_WIDTH) >> 4); } BLOGD(sc, DBG_LOAD, "PCIe link speed=%d width=%d\n", @@ -16746,14 +16746,14 @@ bxe_init_pxp(struct bxe_softc *sc) uint16_t devctl; int r_order, w_order; - devctl = bxe_pcie_capability_read(sc, PCIR_EXPRESS_DEVICE_CTL, 2); + devctl = bxe_pcie_capability_read(sc, PCIER_DEVICE_CTL, 2); BLOGD(sc, DBG_LOAD, "read 0x%08x from devctl\n", devctl); - w_order = ((devctl & PCIM_EXP_CTL_MAX_PAYLOAD) >> 5); + w_order = ((devctl & PCIEM_CTL_MAX_PAYLOAD) >> 5); if (sc->mrrs == -1) { - r_order = ((devctl & PCIM_EXP_CTL_MAX_READ_REQUEST) >> 12); + r_order = ((devctl & PCIEM_CTL_MAX_READ_REQUEST) >> 12); } else { BLOGD(sc, DBG_LOAD, "forcing read order to %d\n", sc->mrrs); r_order = sc->mrrs; Modified: head/sys/dev/bxe/bxe.h ============================================================================== --- head/sys/dev/bxe/bxe.h Sun Mar 1 17:27:35 2020 (r358487) +++ head/sys/dev/bxe/bxe.h Sun Mar 1 17:46:28 2020 (r358488) @@ -117,34 +117,6 @@ __FBSDID("$FreeBSD$"); #define VF_MAC_CREDIT_CNT 0 #define VF_VLAN_CREDIT_CNT (0) -#if __FreeBSD_version < 800054 -#if defined(__i386__) || defined(__amd64__) -#define mb() __asm volatile("mfence;" : : : "memory") -#define wmb() __asm volatile("sfence;" : : : "memory") -#define rmb() __asm volatile("lfence;" : : : "memory") -static __inline void prefetch(void *x) -{ - __asm volatile("prefetcht0 %0" :: "m" (*(unsigned long *)x)); -} -#else -#define mb() -#define rmb() -#define wmb() -#define prefetch(x) -#endif -#endif - -#if __FreeBSD_version >= 1000000 -#define PCIR_EXPRESS_DEVICE_STA PCIER_DEVICE_STA -#define PCIM_EXP_STA_TRANSACTION_PND PCIEM_STA_TRANSACTION_PND -#define PCIR_EXPRESS_LINK_STA PCIER_LINK_STA -#define PCIM_LINK_STA_WIDTH PCIEM_LINK_STA_WIDTH -#define PCIM_LINK_STA_SPEED PCIEM_LINK_STA_SPEED -#define PCIR_EXPRESS_DEVICE_CTL PCIER_DEVICE_CTL -#define PCIM_EXP_CTL_MAX_PAYLOAD PCIEM_CTL_MAX_PAYLOAD -#define PCIM_EXP_CTL_MAX_READ_REQUEST PCIEM_CTL_MAX_READ_REQUEST -#endif - #ifndef ARRAY_SIZE #define ARRAY_SIZE(arr) (sizeof(arr) / sizeof((arr)[0])) #endif @@ -708,10 +680,8 @@ struct bxe_fastpath { //uint8_t segs; -#if __FreeBSD_version >= 800000 #define BXE_BR_SIZE 4096 struct buf_ring *tx_br; -#endif }; /* struct bxe_fastpath */ /* sriov XXX */ @@ -2300,16 +2270,8 @@ void bxe_dump_mem(struct bxe_softc *sc, char *tag, void bxe_dump_mbuf_data(struct bxe_softc *sc, char *pTag, struct mbuf *m, uint8_t contents); -#if __FreeBSD_version >= 800000 -#if (__FreeBSD_version >= 1001513 && __FreeBSD_version < 1100000) ||\ - __FreeBSD_version >= 1100048 #define BXE_SET_FLOWID(m) M_HASHTYPE_SET(m, M_HASHTYPE_OPAQUE) #define BXE_VALID_FLOWID(m) (M_HASHTYPE_GET(m) != M_HASHTYPE_NONE) -#else -#define BXE_VALID_FLOWID(m) ((m->m_flags & M_FLOWID) != 0) -#define BXE_SET_FLOWID(m) m->m_flags |= M_FLOWID -#endif -#endif /* #if __FreeBSD_version >= 800000 */ /***********/ /* INLINES */ From owner-svn-src-all@freebsd.org Sun Mar 1 18:02:00 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 96797247655; Sun, 1 Mar 2020 18:02:00 +0000 (UTC) (envelope-from scottl@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 48Vrh83Yrdz43x8; Sun, 1 Mar 2020 18:02:00 +0000 (UTC) (envelope-from scottl@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 74EA9771C; Sun, 1 Mar 2020 18:02:00 +0000 (UTC) (envelope-from scottl@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 021I20wR099268; Sun, 1 Mar 2020 18:02:00 GMT (envelope-from scottl@FreeBSD.org) Received: (from scottl@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 021I20Io099267; Sun, 1 Mar 2020 18:02:00 GMT (envelope-from scottl@FreeBSD.org) Message-Id: <202003011802.021I20Io099267@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: scottl set sender to scottl@FreeBSD.org using -f From: Scott Long Date: Sun, 1 Mar 2020 18:02: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: r358489 - stable/12/sys/cam/ata X-SVN-Group: stable-12 X-SVN-Commit-Author: scottl X-SVN-Commit-Paths: stable/12/sys/cam/ata X-SVN-Commit-Revision: 358489 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages 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, 01 Mar 2020 18:02:00 -0000 Author: scottl Date: Sun Mar 1 18:02:00 2020 New Revision: 358489 URL: https://svnweb.freebsd.org/changeset/base/358489 Log: Add a quirk for the WDC Green series of SSDs to disable NCQ TRIM, as this avoids silent data corruption. PR: 225666 Submitted by: anders lundgren Modified: stable/12/sys/cam/ata/ata_da.c Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/cam/ata/ata_da.c ============================================================================== --- stable/12/sys/cam/ata/ata_da.c Sun Mar 1 17:46:28 2020 (r358488) +++ stable/12/sys/cam/ata/ata_da.c Sun Mar 1 18:02:00 2020 (r358489) @@ -782,6 +782,11 @@ static struct ada_quirk_entry ada_quirk_table[] = /*quirks*/ADA_Q_SMR_DM }, { + /* WD Green SSD */ + { T_DIRECT, SIP_MEDIA_FIXED, "*", "WDC WDS?????G0*", "*" }, + /*quirks*/ADA_Q_4K | ADA_Q_NCQ_TRIM_BROKEN + }, + { /* Default */ { T_ANY, SIP_MEDIA_REMOVABLE|SIP_MEDIA_FIXED, From owner-svn-src-all@freebsd.org Sun Mar 1 18:03:09 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id B78BD2477BE; Sun, 1 Mar 2020 18:03:09 +0000 (UTC) (envelope-from scottl@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 48VrjT4DwZz44Xd; Sun, 1 Mar 2020 18:03:09 +0000 (UTC) (envelope-from scottl@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 8C968775D; Sun, 1 Mar 2020 18:03:09 +0000 (UTC) (envelope-from scottl@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 021I39U3000850; Sun, 1 Mar 2020 18:03:09 GMT (envelope-from scottl@FreeBSD.org) Received: (from scottl@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 021I39WZ000849; Sun, 1 Mar 2020 18:03:09 GMT (envelope-from scottl@FreeBSD.org) Message-Id: <202003011803.021I39WZ000849@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: scottl set sender to scottl@FreeBSD.org using -f From: Scott Long Date: Sun, 1 Mar 2020 18:03:09 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r358490 - stable/11/sys/cam/ata X-SVN-Group: stable-11 X-SVN-Commit-Author: scottl X-SVN-Commit-Paths: stable/11/sys/cam/ata X-SVN-Commit-Revision: 358490 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages 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, 01 Mar 2020 18:03:09 -0000 Author: scottl Date: Sun Mar 1 18:03:09 2020 New Revision: 358490 URL: https://svnweb.freebsd.org/changeset/base/358490 Log: Add a quirk for the WDC Green series of SSDs to disable NCQ TRIM, as this avoids silent data corruption. PR: 225666 Submitted by: anders lundgren Modified: stable/11/sys/cam/ata/ata_da.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/cam/ata/ata_da.c ============================================================================== --- stable/11/sys/cam/ata/ata_da.c Sun Mar 1 18:02:00 2020 (r358489) +++ stable/11/sys/cam/ata/ata_da.c Sun Mar 1 18:03:09 2020 (r358490) @@ -776,6 +776,11 @@ static struct ada_quirk_entry ada_quirk_table[] = /*quirks*/ADA_Q_SMR_DM }, { + /* WD Green SSD */ + { T_DIRECT, SIP_MEDIA_FIXED, "*", "WDC WDS?????G0*", "*" }, + /*quirks*/ADA_Q_4K | ADA_Q_NCQ_TRIM_BROKEN + }, + { /* Default */ { T_ANY, SIP_MEDIA_REMOVABLE|SIP_MEDIA_FIXED, From owner-svn-src-all@freebsd.org Sun Mar 1 18:17:54 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 1904B247F62; Sun, 1 Mar 2020 18:17:54 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.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 48Vs2T0gV4z4c9d; Sun, 1 Mar 2020 18:17:53 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 60F697944; Sun, 1 Mar 2020 18:17:52 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 021IHq5u007725; Sun, 1 Mar 2020 18:17:52 GMT (envelope-from imp@FreeBSD.org) Received: (from imp@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 021IHqww007722; Sun, 1 Mar 2020 18:17:52 GMT (envelope-from imp@FreeBSD.org) Message-Id: <202003011817.021IHqww007722@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: imp set sender to imp@FreeBSD.org using -f From: Warner Losh Date: Sun, 1 Mar 2020 18:17:52 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r358491 - head/sys/dev/bxe X-SVN-Group: head X-SVN-Commit-Author: imp X-SVN-Commit-Paths: head/sys/dev/bxe X-SVN-Commit-Revision: 358491 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages 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, 01 Mar 2020 18:17:54 -0000 Author: imp Date: Sun Mar 1 18:17:51 2020 New Revision: 358491 URL: https://svnweb.freebsd.org/changeset/base/358491 Log: Finish removing support from old versions Eliminate code for old versions, inline pci_find_cap instead of relying on compat ifdef. This commit should have been combined with r358488 before pushing it in. Modified: head/sys/dev/bxe/bxe.c Modified: head/sys/dev/bxe/bxe.c ============================================================================== --- head/sys/dev/bxe/bxe.c Sun Mar 1 18:03:09 2020 (r358490) +++ head/sys/dev/bxe/bxe.c Sun Mar 1 18:17:51 2020 (r358491) @@ -59,14 +59,6 @@ __FBSDID("$FreeBSD$"); #define CSUM_UDP_IPV6 0 #endif -/* - * pci_find_cap was added in r219865. Re-define this at pci_find_extcap - * for older kernels that don't include this changeset. - */ -#if __FreeBSD_version < 900035 -#define pci_find_cap pci_find_extcap -#endif - #define BXE_DEF_SB_ATT_IDX 0x0001 #define BXE_DEF_SB_IDX 0x0002 @@ -3106,11 +3098,9 @@ bxe_tpa_stop(struct bxe_softc *sc, /* assign packet to this interface interface */ if_setrcvif(m, ifp); -#if __FreeBSD_version >= 800000 /* specify what RSS queue was used for this flow */ m->m_pkthdr.flowid = fp->index; BXE_SET_FLOWID(m); -#endif if_inc_counter(ifp, IFCOUNTER_IPACKETS, 1); fp->eth_q_stats.rx_tpa_pkts++; @@ -3395,11 +3385,9 @@ bxe_rxeof(struct bxe_softc *sc, m->m_flags |= M_VLANTAG; } -#if __FreeBSD_version >= 800000 /* specify what RSS queue was used for this flow */ m->m_pkthdr.flowid = fp->index; BXE_SET_FLOWID(m); -#endif next_rx: @@ -4749,7 +4737,6 @@ bxe_dump_mbuf(struct bxe_softc *sc, while (m) { -#if __FreeBSD_version >= 1000000 BLOGD(sc, DBG_MBUF, "%02d: mbuf=%p m_len=%d m_flags=0x%b m_data=%p\n", i, m, m->m_len, m->m_flags, M_FLAG_BITS, m->m_data); @@ -4760,27 +4747,7 @@ bxe_dump_mbuf(struct bxe_softc *sc, i, m->m_pkthdr.len, m->m_flags, M_FLAG_BITS, (int)m->m_pkthdr.csum_flags, CSUM_BITS); } -#else - BLOGD(sc, DBG_MBUF, - "%02d: mbuf=%p m_len=%d m_flags=0x%b m_data=%p\n", - i, m, m->m_len, m->m_flags, - "\20\1M_EXT\2M_PKTHDR\3M_EOR\4M_RDONLY", m->m_data); - if (m->m_flags & M_PKTHDR) { - BLOGD(sc, DBG_MBUF, - "%02d: - m_pkthdr: tot_len=%d flags=0x%b csum_flags=%b\n", - i, m->m_pkthdr.len, m->m_flags, - "\20\12M_BCAST\13M_MCAST\14M_FRAG" - "\15M_FIRSTFRAG\16M_LASTFRAG\21M_VLANTAG" - "\22M_PROMISC\23M_NOFREE", - (int)m->m_pkthdr.csum_flags, - "\20\1CSUM_IP\2CSUM_TCP\3CSUM_UDP\4CSUM_IP_FRAGS" - "\5CSUM_FRAGMENT\6CSUM_TSO\11CSUM_IP_CHECKED" - "\12CSUM_IP_VALID\13CSUM_DATA_VALID" - "\14CSUM_PSEUDO_HDR"); - } -#endif /* #if __FreeBSD_version >= 1000000 */ - if (m->m_flags & M_EXT) { switch (m->m_ext.ext_type) { case EXT_CLUSTER: type = "EXT_CLUSTER"; break; @@ -5163,9 +5130,7 @@ bxe_tx_encap(struct bxe_fastpath *fp, struct mbuf **m_ sc = fp->sc; -#if __FreeBSD_version >= 800000 M_ASSERTPKTHDR(*m_head); -#endif /* #if __FreeBSD_version >= 800000 */ m0 = *m_head; rc = defragged = nbds = ovlan = vlan_off = total_pkt_size = 0; @@ -5671,8 +5636,6 @@ bxe_tx_start(if_t ifp) BXE_FP_TX_UNLOCK(fp); } -#if __FreeBSD_version >= 901504 - static int bxe_tx_mq_start_locked(struct bxe_softc *sc, if_t ifp, @@ -5860,8 +5823,6 @@ bxe_mq_flush(struct ifnet *ifp) if_qflush(ifp); } -#endif /* FreeBSD_version >= 901504 */ - static uint16_t bxe_cid_ilt_lines(struct bxe_softc *sc) { @@ -6221,7 +6182,6 @@ bxe_free_fp_buffers(struct bxe_softc *sc) for (i = 0; i < sc->num_queues; i++) { fp = &sc->fp[i]; -#if __FreeBSD_version >= 901504 if (fp->tx_br != NULL) { /* just in case bxe_mq_flush() wasn't called */ if (mtx_initialized(&fp->tx_mtx)) { @@ -6233,7 +6193,6 @@ bxe_free_fp_buffers(struct bxe_softc *sc) BXE_FP_TX_UNLOCK(fp); } } -#endif /* free all RX buffers */ bxe_free_rx_bd_chain(fp); @@ -11315,9 +11274,7 @@ bxe_get_q_flags(struct bxe_softc *sc, if (if_getcapenable(sc->ifp) & IFCAP_LRO) { bxe_set_bit(ECORE_Q_FLG_TPA, &flags); -#if __FreeBSD_version >= 800000 bxe_set_bit(ECORE_Q_FLG_TPA_IPV6, &flags); -#endif } if (leading) { @@ -13065,13 +13022,8 @@ bxe_init_ifnet(struct bxe_softc *sc) if_setioctlfn(ifp, bxe_ioctl); if_setstartfn(ifp, bxe_tx_start); if_setgetcounterfn(ifp, bxe_get_counter); -#if __FreeBSD_version >= 901504 if_settransmitfn(ifp, bxe_tx_mq_start); if_setqflushfn(ifp, bxe_mq_flush); -#endif -#ifdef FreeBSD8_0 - if_settimer(ifp, 0); -#endif if_setinitfn(ifp, bxe_init); if_setmtu(ifp, sc->mtu); if_sethwassist(ifp, (CSUM_IP | @@ -13082,15 +13034,8 @@ bxe_init_ifnet(struct bxe_softc *sc) CSUM_UDP_IPV6)); capabilities = -#if __FreeBSD_version < 700000 (IFCAP_VLAN_MTU | IFCAP_VLAN_HWTAGGING | - IFCAP_HWCSUM | - IFCAP_JUMBO_MTU | - IFCAP_LRO); -#else - (IFCAP_VLAN_MTU | - IFCAP_VLAN_HWTAGGING | IFCAP_VLAN_HWTSO | IFCAP_VLAN_HWFILTER | IFCAP_VLAN_HWCSUM | @@ -13100,7 +13045,6 @@ bxe_init_ifnet(struct bxe_softc *sc) IFCAP_TSO4 | IFCAP_TSO6 | IFCAP_WOL_MAGIC); -#endif if_setcapabilitiesbit(ifp, capabilities, 0); /* XXX */ if_setcapenable(ifp, if_getcapabilities(ifp)); if_setbaudrate(ifp, IF_Gbps(10)); @@ -16107,7 +16051,6 @@ bxe_add_sysctls(struct bxe_softc *sc) sc->debug = bxe_debug; -#if __FreeBSD_version >= 900000 SYSCTL_ADD_STRING(ctx, children, OID_AUTO, "bc_version", CTLFLAG_RD, sc->devinfo.bc_ver_str, 0, "bootcode version"); @@ -16126,26 +16069,6 @@ bxe_add_sysctls(struct bxe_softc *sc) SYSCTL_ADD_ULONG(ctx, children, OID_AUTO, "debug", CTLFLAG_RW, &sc->debug, "debug logging mode"); -#else - SYSCTL_ADD_STRING(ctx, children, OID_AUTO, "bc_version", - CTLFLAG_RD, &sc->devinfo.bc_ver_str, 0, - "bootcode version"); - SYSCTL_ADD_STRING(ctx, children, OID_AUTO, "fw_version", - CTLFLAG_RD, &sc->fw_ver_str, 0, - "firmware version"); - SYSCTL_ADD_STRING(ctx, children, OID_AUTO, "mf_mode", - CTLFLAG_RD, &sc->mf_mode_str, 0, - "multifunction mode"); - SYSCTL_ADD_STRING(ctx, children, OID_AUTO, "mac_addr", - CTLFLAG_RD, &sc->mac_addr_str, 0, - "mac address"); - SYSCTL_ADD_STRING(ctx, children, OID_AUTO, "pci_link", - CTLFLAG_RD, &sc->pci_link_str, 0, - "pci link status"); - SYSCTL_ADD_UINT(ctx, children, OID_AUTO, "debug", - CTLFLAG_RW, &sc->debug, 0, - "debug logging mode"); -#endif /* #if __FreeBSD_version >= 900000 */ sc->trigger_grcdump = 0; SYSCTL_ADD_UINT(ctx, children, OID_AUTO, "trigger_grcdump", @@ -16206,8 +16129,6 @@ bxe_add_sysctls(struct bxe_softc *sc) static int bxe_alloc_buf_rings(struct bxe_softc *sc) { -#if __FreeBSD_version >= 901504 - int i; struct bxe_fastpath *fp; @@ -16220,15 +16141,13 @@ bxe_alloc_buf_rings(struct bxe_softc *sc) if (fp->tx_br == NULL) return (-1); } -#endif + return (0); } static void bxe_free_buf_rings(struct bxe_softc *sc) { -#if __FreeBSD_version >= 901504 - int i; struct bxe_fastpath *fp; @@ -16241,8 +16160,6 @@ bxe_free_buf_rings(struct bxe_softc *sc) fp->tx_br = NULL; } } - -#endif } static void From owner-svn-src-all@freebsd.org Sun Mar 1 18:17:59 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 6AFBE247FBA; Sun, 1 Mar 2020 18:17:59 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.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 48Vs2Z4ln9z4cPG; Sun, 1 Mar 2020 18:17:58 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 8E7167946; Sun, 1 Mar 2020 18:17:57 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 021IHv1Z007899; Sun, 1 Mar 2020 18:17:57 GMT (envelope-from imp@FreeBSD.org) Received: (from imp@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 021IHv7D007898; Sun, 1 Mar 2020 18:17:57 GMT (envelope-from imp@FreeBSD.org) Message-Id: <202003011817.021IHv7D007898@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: imp set sender to imp@FreeBSD.org using -f From: Warner Losh Date: Sun, 1 Mar 2020 18:17:57 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r358492 - head/sys/dev/cxgb X-SVN-Group: head X-SVN-Commit-Author: imp X-SVN-Commit-Paths: head/sys/dev/cxgb X-SVN-Commit-Revision: 358492 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages 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, 01 Mar 2020 18:17:59 -0000 Author: imp Date: Sun Mar 1 18:17:56 2020 New Revision: 358492 URL: https://svnweb.freebsd.org/changeset/base/358492 Log: Remove conditional code for FreeBSD 8 and earlier frmo cxgb. Modified: head/sys/dev/cxgb/cxgb_osdep.h head/sys/dev/cxgb/cxgb_sge.c Modified: head/sys/dev/cxgb/cxgb_osdep.h ============================================================================== --- head/sys/dev/cxgb/cxgb_osdep.h Sun Mar 1 18:17:51 2020 (r358491) +++ head/sys/dev/cxgb/cxgb_osdep.h Sun Mar 1 18:17:56 2020 (r358492) @@ -70,36 +70,10 @@ struct t3_mbuf_hdr { } while (0) #endif -#if __FreeBSD_version < 800054 -#if defined (__GNUC__) - #if #cpu(i386) || defined __i386 || defined i386 || defined __i386__ || #cpu(x86_64) || defined __x86_64__ - #define mb() __asm__ __volatile__ ("mfence;": : :"memory") - #define wmb() __asm__ __volatile__ ("sfence;": : :"memory") - #define rmb() __asm__ __volatile__ ("lfence;": : :"memory") - #elif #cpu(sparc64) || defined sparc64 || defined __sparcv9 - #define mb() __asm__ __volatile__ ("membar #MemIssue": : :"memory") - #define wmb() mb() - #define rmb() mb() - #elif #cpu(sparc) || defined sparc || defined __sparc__ - #define mb() __asm__ __volatile__ ("stbar;": : :"memory") - #define wmb() mb() - #define rmb() mb() -#else - #define wmb() mb() - #define rmb() mb() - #define mb() /* XXX just to make this compile */ - #endif -#else - #error "unknown compiler" -#endif -#endif - /* * Workaround for weird Chelsio issue */ -#if __FreeBSD_version > 700029 #define PRIV_SUPPORTED -#endif #define CXGB_TX_CLEANUP_THRESHOLD 32 Modified: head/sys/dev/cxgb/cxgb_sge.c ============================================================================== --- head/sys/dev/cxgb/cxgb_sge.c Sun Mar 1 18:17:51 2020 (r358491) +++ head/sys/dev/cxgb/cxgb_sge.c Sun Mar 1 18:17:56 2020 (r358492) @@ -559,7 +559,6 @@ t3_sge_prep(adapter_t *adap, struct sge_params *p) use_16k = cxgb_use_16k_clusters != -1 ? cxgb_use_16k_clusters : is_offload(adap); -#if __FreeBSD_version >= 700111 if (use_16k) { jumbo_q_size = min(nmbjumbo16/(3*nqsets), JUMBO_Q_SIZE); jumbo_buf_size = MJUM16BYTES; @@ -567,10 +566,6 @@ t3_sge_prep(adapter_t *adap, struct sge_params *p) jumbo_q_size = min(nmbjumbo9/(3*nqsets), JUMBO_Q_SIZE); jumbo_buf_size = MJUM9BYTES; } -#else - jumbo_q_size = min(nmbjumbop/(3*nqsets), JUMBO_Q_SIZE); - jumbo_buf_size = MJUMPAGESIZE; -#endif while (!powerof2(jumbo_q_size)) jumbo_q_size--; From owner-svn-src-all@freebsd.org Sun Mar 1 18:18:04 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 9BD72248009; Sun, 1 Mar 2020 18:18:04 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.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 48Vs2g6D3nz4cdG; Sun, 1 Mar 2020 18:18:03 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 3C8737948; Sun, 1 Mar 2020 18:18:03 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 021II3Zc008097; Sun, 1 Mar 2020 18:18:03 GMT (envelope-from imp@FreeBSD.org) Received: (from imp@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 021II2B3008090; Sun, 1 Mar 2020 18:18:02 GMT (envelope-from imp@FreeBSD.org) Message-Id: <202003011818.021II2B3008090@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: imp set sender to imp@FreeBSD.org using -f From: Warner Losh Date: Sun, 1 Mar 2020 18:18:02 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r358493 - head/sys/dev/iscsi_initiator X-SVN-Group: head X-SVN-Commit-Author: imp X-SVN-Commit-Paths: head/sys/dev/iscsi_initiator X-SVN-Commit-Revision: 358493 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages 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, 01 Mar 2020 18:18:04 -0000 Author: imp Date: Sun Mar 1 18:18:01 2020 New Revision: 358493 URL: https://svnweb.freebsd.org/changeset/base/358493 Log: Remove support for FreeBSD 4-7 from the iscsi initiator. Also, inline/remove now empty or trivial macros. CAM has evolved enough this code couldn't work there anyway, and the API sweeep commits made since then were made unconditional. Modified: head/sys/dev/iscsi_initiator/isc_cam.c head/sys/dev/iscsi_initiator/isc_sm.c head/sys/dev/iscsi_initiator/isc_soc.c head/sys/dev/iscsi_initiator/isc_subr.c head/sys/dev/iscsi_initiator/iscsi_subr.c head/sys/dev/iscsi_initiator/iscsivar.h Modified: head/sys/dev/iscsi_initiator/isc_cam.c ============================================================================== --- head/sys/dev/iscsi_initiator/isc_cam.c Sun Mar 1 18:17:56 2020 (r358492) +++ head/sys/dev/iscsi_initiator/isc_cam.c Sun Mar 1 18:18:01 2020 (r358493) @@ -37,10 +37,8 @@ __FBSDID("$FreeBSD$"); #include #include #include -#if __FreeBSD_version >= 700000 #include #include -#endif #include #include #include @@ -93,16 +91,12 @@ static __inline int _scsi_encap(struct cam_sim *sim, union ccb *ccb) { int ret; - -#if __FreeBSD_version < 700000 - ret = scsi_encap(sim, ccb); -#else isc_session_t *sp = cam_sim_softc(sim); mtx_unlock(&sp->cam_mtx); ret = scsi_encap(sim, ccb); mtx_lock(&sp->cam_mtx); -#endif + return ret; } @@ -260,11 +254,7 @@ ic_action(struct cam_sim *sim, union ccb *ccb) ccb_h->status = CAM_REQ_INVALID; break; } -#if __FreeBSD_version < 700000 - XPT_DONE(sp, ccb); -#else xpt_done(ccb); -#endif return; } @@ -297,7 +287,6 @@ ic_destroy(isc_session_t *sp ) if(sp->cam_path != NULL) { sdebug(2, "name=%s unit=%d", cam_sim_name(sp->cam_sim), cam_sim_unit(sp->cam_sim)); - CAM_LOCK(sp); #if 0 xpt_async(AC_LOST_DEVICE, sp->cam_path, NULL); #else @@ -307,7 +296,6 @@ ic_destroy(isc_session_t *sp ) xpt_bus_deregister(cam_sim_path(sp->cam_sim)); cam_sim_free(sp->cam_sim, TRUE /*free_devq*/); - CAM_UNLOCK(sp); sdebug(2, "done"); } } @@ -323,42 +311,28 @@ ic_init(isc_session_t *sp) if((devq = cam_simq_alloc(256)) == NULL) return ENOMEM; -#if __FreeBSD_version >= 700000 mtx_init(&sp->cam_mtx, "isc-cam", NULL, MTX_DEF); -#else - isp->cam_mtx = Giant; -#endif sim = cam_sim_alloc(ic_action, ic_poll, "iscsi", sp, sp->sid, // unit -#if __FreeBSD_version >= 700000 &sp->cam_mtx, -#endif 1, // max_dev_transactions 0, // max_tagged_dev_transactions devq); if(sim == NULL) { cam_simq_free(devq); -#if __FreeBSD_version >= 700000 mtx_destroy(&sp->cam_mtx); -#endif return ENXIO; } - CAM_LOCK(sp); if(xpt_bus_register(sim, -#if __FreeBSD_version >= 700000 NULL, -#endif 0/*bus_number*/) != CAM_SUCCESS) { cam_sim_free(sim, /*free_devq*/TRUE); - CAM_UNLOCK(sp); -#if __FreeBSD_version >= 700000 mtx_destroy(&sp->cam_mtx); -#endif return ENXIO; } sp->cam_sim = sim; @@ -366,13 +340,9 @@ ic_init(isc_session_t *sp) CAM_TARGET_WILDCARD, CAM_LUN_WILDCARD) != CAM_REQ_CMP) { xpt_bus_deregister(cam_sim_path(sp->cam_sim)); cam_sim_free(sim, /*free_devq*/TRUE); - CAM_UNLOCK(sp); -#if __FreeBSD_version >= 700000 mtx_destroy(&sp->cam_mtx); -#endif return ENXIO; } - CAM_UNLOCK(sp); sdebug(1, "cam subsystem initialized"); Modified: head/sys/dev/iscsi_initiator/isc_sm.c ============================================================================== --- head/sys/dev/iscsi_initiator/isc_sm.c Sun Mar 1 18:17:56 2020 (r358492) +++ head/sys/dev/iscsi_initiator/isc_sm.c Sun Mar 1 18:18:01 2020 (r358493) @@ -514,7 +514,7 @@ proc_out(isc_session_t *sp) if(pq->ccb) { xdebug("back to cam"); pq->ccb->ccb_h.status |= CAM_REQUEUE_REQ; // some better error? - XPT_DONE(sp, pq->ccb); + xpt_done(sp, pq->ccb); pdu_free(sp->isc, pq); } else @@ -571,17 +571,11 @@ ism_out(void *vp) wakeup(&sp->soc); wakeup(sp); // XXX: do we need this one? -#if __FreeBSD_version >= 700000 destroy_dev(sp->dev); -#endif debug(3, "terminated sp=%p sp->sid=%d", sp, sp->sid); -#if __FreeBSD_version >= 800000 kproc_exit(0); -#else - kthread_exit(0); -#endif } #if 0 @@ -712,10 +706,6 @@ ism_stop(isc_session_t *sp) sc->nsess--; mtx_unlock(&sc->isc_mtx); -#if __FreeBSD_version < 700000 - destroy_dev(sp->dev); -#endif - mtx_destroy(&sp->rsp_mtx); mtx_destroy(&sp->rsv_mtx); mtx_destroy(&sp->hld_mtx); @@ -756,9 +746,5 @@ ism_start(isc_session_t *sp) debug(4, "starting ism_proc: sp->sid=%d", sp->sid); -#if __FreeBSD_version >= 800000 return kproc_create(ism_out, sp, &sp->stp, 0, 0, "isc_out %d", sp->sid); -#else - return kthread_create(ism_out, sp, &sp->stp, 0, 0, "isc_out %d", sp->sid); -#endif -} +a} Modified: head/sys/dev/iscsi_initiator/isc_soc.c ============================================================================== --- head/sys/dev/iscsi_initiator/isc_soc.c Sun Mar 1 18:17:56 2020 (r358492) +++ head/sys/dev/iscsi_initiator/isc_soc.c Sun Mar 1 18:18:01 2020 (r358493) @@ -338,21 +338,13 @@ so_getbhs(isc_session_t *sp) if(error) debug(2, -#if __FreeBSD_version > 800000 "error=%d so_error=%d uio->uio_resid=%zd iov.iov_len=%zd", -#else - "error=%d so_error=%d uio->uio_resid=%d iov.iov_len=%zd", -#endif error, sp->soc->so_error, uio->uio_resid, iov->iov_len); if(!error && (uio->uio_resid > 0)) { error = EPIPE; // was EAGAIN debug(2, -#if __FreeBSD_version > 800000 "error=%d so_error=%d uio->uio_resid=%zd iov.iov_len=%zd so_state=%x", -#else - "error=%d so_error=%d uio->uio_resid=%d iov.iov_len=%zd so_state=%x", -#endif error, sp->soc->so_error, uio->uio_resid, iov->iov_len, sp->soc->so_state); } @@ -411,11 +403,7 @@ so_recv(isc_session_t *sp, pduq_t *pq) // XXX: this needs work! it hangs iscontrol if(error || uio->uio_resid) { debug(2, -#if __FreeBSD_version > 800000 "len=%d error=%d uio->uio_resid=%zd", -#else - "len=%d error=%d uio->uio_resid=%d", -#endif len, error, uio->uio_resid); goto out; } @@ -648,11 +636,7 @@ isc_in(void *vp) mtx_unlock(&sp->io_mtx); sdebug(2, "dropped ISC_CON_RUNNING"); -#if __FreeBSD_version >= 800000 kproc_exit(0); -#else - kthread_exit(0); -#endif } void @@ -692,10 +676,5 @@ isc_start_receiver(isc_session_t *sp) debug_called(8); sp->flags |= ISC_CON_RUN | ISC_LINK_UP; -#if __FreeBSD_version >= 800000 - kproc_create -#else - kthread_create -#endif - (isc_in, sp, &sp->soc_proc, 0, 0, "isc_in %d", sp->sid); + kproc_create(isc_in, sp, &sp->soc_proc, 0, 0, "isc_in %d", sp->sid); } Modified: head/sys/dev/iscsi_initiator/isc_subr.c ============================================================================== --- head/sys/dev/iscsi_initiator/isc_subr.c Sun Mar 1 18:17:56 2020 (r358492) +++ head/sys/dev/iscsi_initiator/isc_subr.c Sun Mar 1 18:18:01 2020 (r358493) @@ -81,104 +81,6 @@ i_strdupin(char *s, size_t maxlen) return q; } -#if __FreeBSD_version < 800000 -/*****************************************************************/ -/* */ -/* CRC LOOKUP TABLE */ -/* ================ */ -/* The following CRC lookup table was generated automagically */ -/* by the Rocksoft^tm Model CRC Algorithm Table Generation */ -/* Program V1.0 using the following model parameters: */ -/* */ -/* Width : 4 bytes. */ -/* Poly : 0x1EDC6F41L */ -/* Reverse : TRUE. */ -/* */ -/* For more information on the Rocksoft^tm Model CRC Algorithm, */ -/* see the document titled "A Painless Guide to CRC Error */ -/* Detection Algorithms" by Ross Williams */ -/* (ross@guest.adelaide.edu.au.). This document is likely to be */ -/* in the FTP archive "ftp.adelaide.edu.au/pub/rocksoft". */ -/* */ -/*****************************************************************/ - -static uint32_t crc32Table[256] = { - 0x00000000L, 0xF26B8303L, 0xE13B70F7L, 0x1350F3F4L, - 0xC79A971FL, 0x35F1141CL, 0x26A1E7E8L, 0xD4CA64EBL, - 0x8AD958CFL, 0x78B2DBCCL, 0x6BE22838L, 0x9989AB3BL, - 0x4D43CFD0L, 0xBF284CD3L, 0xAC78BF27L, 0x5E133C24L, - 0x105EC76FL, 0xE235446CL, 0xF165B798L, 0x030E349BL, - 0xD7C45070L, 0x25AFD373L, 0x36FF2087L, 0xC494A384L, - 0x9A879FA0L, 0x68EC1CA3L, 0x7BBCEF57L, 0x89D76C54L, - 0x5D1D08BFL, 0xAF768BBCL, 0xBC267848L, 0x4E4DFB4BL, - 0x20BD8EDEL, 0xD2D60DDDL, 0xC186FE29L, 0x33ED7D2AL, - 0xE72719C1L, 0x154C9AC2L, 0x061C6936L, 0xF477EA35L, - 0xAA64D611L, 0x580F5512L, 0x4B5FA6E6L, 0xB93425E5L, - 0x6DFE410EL, 0x9F95C20DL, 0x8CC531F9L, 0x7EAEB2FAL, - 0x30E349B1L, 0xC288CAB2L, 0xD1D83946L, 0x23B3BA45L, - 0xF779DEAEL, 0x05125DADL, 0x1642AE59L, 0xE4292D5AL, - 0xBA3A117EL, 0x4851927DL, 0x5B016189L, 0xA96AE28AL, - 0x7DA08661L, 0x8FCB0562L, 0x9C9BF696L, 0x6EF07595L, - 0x417B1DBCL, 0xB3109EBFL, 0xA0406D4BL, 0x522BEE48L, - 0x86E18AA3L, 0x748A09A0L, 0x67DAFA54L, 0x95B17957L, - 0xCBA24573L, 0x39C9C670L, 0x2A993584L, 0xD8F2B687L, - 0x0C38D26CL, 0xFE53516FL, 0xED03A29BL, 0x1F682198L, - 0x5125DAD3L, 0xA34E59D0L, 0xB01EAA24L, 0x42752927L, - 0x96BF4DCCL, 0x64D4CECFL, 0x77843D3BL, 0x85EFBE38L, - 0xDBFC821CL, 0x2997011FL, 0x3AC7F2EBL, 0xC8AC71E8L, - 0x1C661503L, 0xEE0D9600L, 0xFD5D65F4L, 0x0F36E6F7L, - 0x61C69362L, 0x93AD1061L, 0x80FDE395L, 0x72966096L, - 0xA65C047DL, 0x5437877EL, 0x4767748AL, 0xB50CF789L, - 0xEB1FCBADL, 0x197448AEL, 0x0A24BB5AL, 0xF84F3859L, - 0x2C855CB2L, 0xDEEEDFB1L, 0xCDBE2C45L, 0x3FD5AF46L, - 0x7198540DL, 0x83F3D70EL, 0x90A324FAL, 0x62C8A7F9L, - 0xB602C312L, 0x44694011L, 0x5739B3E5L, 0xA55230E6L, - 0xFB410CC2L, 0x092A8FC1L, 0x1A7A7C35L, 0xE811FF36L, - 0x3CDB9BDDL, 0xCEB018DEL, 0xDDE0EB2AL, 0x2F8B6829L, - 0x82F63B78L, 0x709DB87BL, 0x63CD4B8FL, 0x91A6C88CL, - 0x456CAC67L, 0xB7072F64L, 0xA457DC90L, 0x563C5F93L, - 0x082F63B7L, 0xFA44E0B4L, 0xE9141340L, 0x1B7F9043L, - 0xCFB5F4A8L, 0x3DDE77ABL, 0x2E8E845FL, 0xDCE5075CL, - 0x92A8FC17L, 0x60C37F14L, 0x73938CE0L, 0x81F80FE3L, - 0x55326B08L, 0xA759E80BL, 0xB4091BFFL, 0x466298FCL, - 0x1871A4D8L, 0xEA1A27DBL, 0xF94AD42FL, 0x0B21572CL, - 0xDFEB33C7L, 0x2D80B0C4L, 0x3ED04330L, 0xCCBBC033L, - 0xA24BB5A6L, 0x502036A5L, 0x4370C551L, 0xB11B4652L, - 0x65D122B9L, 0x97BAA1BAL, 0x84EA524EL, 0x7681D14DL, - 0x2892ED69L, 0xDAF96E6AL, 0xC9A99D9EL, 0x3BC21E9DL, - 0xEF087A76L, 0x1D63F975L, 0x0E330A81L, 0xFC588982L, - 0xB21572C9L, 0x407EF1CAL, 0x532E023EL, 0xA145813DL, - 0x758FE5D6L, 0x87E466D5L, 0x94B49521L, 0x66DF1622L, - 0x38CC2A06L, 0xCAA7A905L, 0xD9F75AF1L, 0x2B9CD9F2L, - 0xFF56BD19L, 0x0D3D3E1AL, 0x1E6DCDEEL, 0xEC064EEDL, - 0xC38D26C4L, 0x31E6A5C7L, 0x22B65633L, 0xD0DDD530L, - 0x0417B1DBL, 0xF67C32D8L, 0xE52CC12CL, 0x1747422FL, - 0x49547E0BL, 0xBB3FFD08L, 0xA86F0EFCL, 0x5A048DFFL, - 0x8ECEE914L, 0x7CA56A17L, 0x6FF599E3L, 0x9D9E1AE0L, - 0xD3D3E1ABL, 0x21B862A8L, 0x32E8915CL, 0xC083125FL, - 0x144976B4L, 0xE622F5B7L, 0xF5720643L, 0x07198540L, - 0x590AB964L, 0xAB613A67L, 0xB831C993L, 0x4A5A4A90L, - 0x9E902E7BL, 0x6CFBAD78L, 0x7FAB5E8CL, 0x8DC0DD8FL, - 0xE330A81AL, 0x115B2B19L, 0x020BD8EDL, 0xF0605BEEL, - 0x24AA3F05L, 0xD6C1BC06L, 0xC5914FF2L, 0x37FACCF1L, - 0x69E9F0D5L, 0x9B8273D6L, 0x88D28022L, 0x7AB90321L, - 0xAE7367CAL, 0x5C18E4C9L, 0x4F48173DL, 0xBD23943EL, - 0xF36E6F75L, 0x0105EC76L, 0x12551F82L, 0xE03E9C81L, - 0x34F4F86AL, 0xC69F7B69L, 0xD5CF889DL, 0x27A40B9EL, - 0x79B737BAL, 0x8BDCB4B9L, 0x988C474DL, 0x6AE7C44EL, - 0xBE2DA0A5L, 0x4C4623A6L, 0x5F16D052L, 0xAD7D5351L -}; - -static __inline int -calculate_crc32c(uint32_t crc, const void *buf, size_t size) -{ - const uint8_t *p = buf; - - while (size--) - crc = crc32Table[(crc ^ *p++) & 0xff] ^ (crc >> 8); - return crc; -} -#endif static uint32_t i_crc32c(const void *buf, size_t size, uint32_t crc) Modified: head/sys/dev/iscsi_initiator/iscsi_subr.c ============================================================================== --- head/sys/dev/iscsi_initiator/iscsi_subr.c Sun Mar 1 18:17:56 2020 (r358492) +++ head/sys/dev/iscsi_initiator/iscsi_subr.c Sun Mar 1 18:18:01 2020 (r358493) @@ -106,11 +106,7 @@ iscsi_r2t(isc_session_t *sp, pduq_t *opq, pduq_t *pq) while((wpq = pdu_alloc(sp->isc, M_NOWAIT)) == NULL) { sdebug(2, "waiting..."); -#if __FreeBSD_version >= 700000 pause("isc_r2t", 5*hz); -#else - tsleep(sp->isc, 0, "isc_r2t", 5*hz); -#endif } } cmd = &wpq->pdu.ipdu.data_out; @@ -252,7 +248,7 @@ _scsi_done(isc_session_t *sp, u_int response, u_int st } sdebug(5, "ccb_h->status=%x", ccb_h->status); - XPT_DONE(sp, ccb); + xpt_done(sp, ccb); } /* @@ -412,7 +408,7 @@ iscsi_reject(isc_session_t *sp, pduq_t *opq, pduq_t *p debug_called(8); //XXX: check RFC 10.17.1 (page 176) ccb->ccb_h.status = CAM_REQ_ABORTED; - XPT_DONE(sp, ccb); + xpt_done(sp, ccb); pdu_free(sp->isc, opq); } @@ -471,11 +467,7 @@ scsi_encap(struct cam_sim *sim, union ccb *ccb) sp->isc->npdu_max, sp->isc->npdu_alloc); while((pq = pdu_alloc(sp->isc, M_NOWAIT)) == NULL) { sdebug(2, "waiting..."); -#if __FreeBSD_version >= 700000 pause("isc_encap", 5*hz); -#else - tsleep(sp->isc, 0, "isc_encap", 5*hz); -#endif } } cmd = &pq->pdu.ipdu.scsi_req; Modified: head/sys/dev/iscsi_initiator/iscsivar.h ============================================================================== --- head/sys/dev/iscsi_initiator/iscsivar.h Sun Mar 1 18:17:56 2020 (r358492) +++ head/sys/dev/iscsi_initiator/iscsivar.h Sun Mar 1 18:18:01 2020 (r358493) @@ -268,39 +268,6 @@ int iscsi_requeue(isc_session_t *sp); /* | inlines */ -#ifdef _CAM_CAM_XPT_SIM_H - -#if __FreeBSD_version < 600000 -#define CAM_LOCK(arg) -#define CAM_ULOCK(arg) - -static __inline void -XPT_DONE(isc_session_t *sp, union ccb *ccb) -{ - mtx_lock(&Giant); - xpt_done(ccb); - mtx_unlock(&Giant); -} -#elif __FreeBSD_version >= 700000 -#define CAM_LOCK(arg) mtx_lock(&arg->cam_mtx) -#define CAM_UNLOCK(arg) mtx_unlock(&arg->cam_mtx) - -static __inline void -XPT_DONE(isc_session_t *sp, union ccb *ccb) -{ - CAM_LOCK(sp); - xpt_done(ccb); - CAM_UNLOCK(sp); -} -#else -//__FreeBSD_version >= 600000 -#define CAM_LOCK(arg) -#define CAM_UNLOCK(arg) -#define XPT_DONE(ignore, arg) xpt_done(arg) -#endif - -#endif /* _CAM_CAM_XPT_SIM_H */ - static __inline pduq_t * pdu_alloc(struct isc_softc *isc, int wait) { From owner-svn-src-all@freebsd.org Sun Mar 1 18:18:09 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 83C7624805C; Sun, 1 Mar 2020 18:18:09 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.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 48Vs2m5Wb4z4cpf; Sun, 1 Mar 2020 18:18:08 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id D6C5D794A; Sun, 1 Mar 2020 18:18:07 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 021II7Dm008273; Sun, 1 Mar 2020 18:18:07 GMT (envelope-from imp@FreeBSD.org) Received: (from imp@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 021II7m8008272; Sun, 1 Mar 2020 18:18:07 GMT (envelope-from imp@FreeBSD.org) Message-Id: <202003011818.021II7m8008272@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: imp set sender to imp@FreeBSD.org using -f From: Warner Losh Date: Sun, 1 Mar 2020 18:18:07 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r358494 - head/sys/dev/virtio X-SVN-Group: head X-SVN-Commit-Author: imp X-SVN-Commit-Paths: head/sys/dev/virtio X-SVN-Commit-Revision: 358494 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages 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, 01 Mar 2020 18:18:09 -0000 Author: imp Date: Sun Mar 1 18:18:07 2020 New Revision: 358494 URL: https://svnweb.freebsd.org/changeset/base/358494 Log: Remove FreeBSD 8 support from virtio. The sbuf API has evolved since 8, as have many others. The other API sweeps didn't make the changes conditional, so this is now noise. Modified: head/sys/dev/virtio/virtio.c Modified: head/sys/dev/virtio/virtio.c ============================================================================== --- head/sys/dev/virtio/virtio.c Sun Mar 1 18:18:01 2020 (r358493) +++ head/sys/dev/virtio/virtio.c Sun Mar 1 18:18:07 2020 (r358494) @@ -157,12 +157,7 @@ virtio_describe(device_t dev, const char *msg, if (n > 0) sbuf_cat(&sb, ">"); -#if __FreeBSD_version < 900020 - sbuf_finish(&sb); - if (sbuf_overflowed(&sb) == 0) -#else if (sbuf_finish(&sb) == 0) -#endif device_printf(dev, "%s\n", sbuf_data(&sb)); sbuf_delete(&sb); From owner-svn-src-all@freebsd.org Sun Mar 1 18:18:14 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id F3F742480C9; Sun, 1 Mar 2020 18:18:13 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.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 48Vs2s0zlQz4d1J; Sun, 1 Mar 2020 18:18:13 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 54900794B; Sun, 1 Mar 2020 18:18:12 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 021IICO0008428; Sun, 1 Mar 2020 18:18:12 GMT (envelope-from imp@FreeBSD.org) Received: (from imp@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 021IICEM008427; Sun, 1 Mar 2020 18:18:12 GMT (envelope-from imp@FreeBSD.org) Message-Id: <202003011818.021IICEM008427@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: imp set sender to imp@FreeBSD.org using -f From: Warner Losh Date: Sun, 1 Mar 2020 18:18:12 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r358495 - head/sys/dev/xen/netback X-SVN-Group: head X-SVN-Commit-Author: imp X-SVN-Commit-Paths: head/sys/dev/xen/netback X-SVN-Commit-Revision: 358495 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages 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, 01 Mar 2020 18:18:14 -0000 Author: imp Date: Sun Mar 1 18:18:11 2020 New Revision: 358495 URL: https://svnweb.freebsd.org/changeset/base/358495 Log: Remove noise that once upon a time allowed netback to build on FreeBSD 6. The network layer has evolved since then, and this won't compile there. Modified: head/sys/dev/xen/netback/netback.c Modified: head/sys/dev/xen/netback/netback.c ============================================================================== --- head/sys/dev/xen/netback/netback.c Sun Mar 1 18:18:07 2020 (r358494) +++ head/sys/dev/xen/netback/netback.c Sun Mar 1 18:18:11 2020 (r358495) @@ -67,9 +67,7 @@ __FBSDID("$FreeBSD$"); #include #include #include -#if __FreeBSD_version >= 700000 #include -#endif #include #include #include From owner-svn-src-all@freebsd.org Sun Mar 1 18:56:00 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 4FCB2249B2D; Sun, 1 Mar 2020 18:56:00 +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 48VstS0Qsjz3QbG; Sun, 1 Mar 2020 18:56:00 +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 F21BA8156; Sun, 1 Mar 2020 18:55:59 +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 021ItxE6034959; Sun, 1 Mar 2020 18:55:59 GMT (envelope-from delphij@FreeBSD.org) Received: (from delphij@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 021Itxvd034957; Sun, 1 Mar 2020 18:55:59 GMT (envelope-from delphij@FreeBSD.org) Message-Id: <202003011855.021Itxvd034957@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: delphij set sender to delphij@FreeBSD.org using -f From: Xin LI Date: Sun, 1 Mar 2020 18:55:59 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r358496 - head/sys/dev/iscsi_initiator X-SVN-Group: head X-SVN-Commit-Author: delphij X-SVN-Commit-Paths: head/sys/dev/iscsi_initiator X-SVN-Commit-Revision: 358496 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages 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, 01 Mar 2020 18:56:00 -0000 Author: delphij Date: Sun Mar 1 18:55:59 2020 New Revision: 358496 URL: https://svnweb.freebsd.org/changeset/base/358496 Log: Fix build. Modified: head/sys/dev/iscsi_initiator/isc_sm.c head/sys/dev/iscsi_initiator/iscsi_subr.c Modified: head/sys/dev/iscsi_initiator/isc_sm.c ============================================================================== --- head/sys/dev/iscsi_initiator/isc_sm.c Sun Mar 1 18:18:11 2020 (r358495) +++ head/sys/dev/iscsi_initiator/isc_sm.c Sun Mar 1 18:55:59 2020 (r358496) @@ -514,7 +514,7 @@ proc_out(isc_session_t *sp) if(pq->ccb) { xdebug("back to cam"); pq->ccb->ccb_h.status |= CAM_REQUEUE_REQ; // some better error? - xpt_done(sp, pq->ccb); + xpt_done(pq->ccb); pdu_free(sp->isc, pq); } else @@ -747,4 +747,4 @@ ism_start(isc_session_t *sp) debug(4, "starting ism_proc: sp->sid=%d", sp->sid); return kproc_create(ism_out, sp, &sp->stp, 0, 0, "isc_out %d", sp->sid); -a} +} Modified: head/sys/dev/iscsi_initiator/iscsi_subr.c ============================================================================== --- head/sys/dev/iscsi_initiator/iscsi_subr.c Sun Mar 1 18:18:11 2020 (r358495) +++ head/sys/dev/iscsi_initiator/iscsi_subr.c Sun Mar 1 18:55:59 2020 (r358496) @@ -248,7 +248,7 @@ _scsi_done(isc_session_t *sp, u_int response, u_int st } sdebug(5, "ccb_h->status=%x", ccb_h->status); - xpt_done(sp, ccb); + xpt_done(ccb); } /* @@ -408,7 +408,7 @@ iscsi_reject(isc_session_t *sp, pduq_t *opq, pduq_t *p debug_called(8); //XXX: check RFC 10.17.1 (page 176) ccb->ccb_h.status = CAM_REQ_ABORTED; - xpt_done(sp, ccb); + xpt_done(ccb); pdu_free(sp->isc, opq); } From owner-svn-src-all@freebsd.org Sun Mar 1 19:15:05 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 2C2FF24A10E; Sun, 1 Mar 2020 19:15:05 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.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 48VtJS5F7hz4X12; Sun, 1 Mar 2020 19:15:04 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 7EB6C8500; Sun, 1 Mar 2020 19:15:04 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 021JF4ai047052; Sun, 1 Mar 2020 19:15:04 GMT (envelope-from imp@FreeBSD.org) Received: (from imp@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 021JF3bW047048; Sun, 1 Mar 2020 19:15:03 GMT (envelope-from imp@FreeBSD.org) Message-Id: <202003011915.021JF3bW047048@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: imp set sender to imp@FreeBSD.org using -f From: Warner Losh Date: Sun, 1 Mar 2020 19:15:03 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r358497 - in head: . share/man/man4 sys/conf sys/dev/bktr sys/modules sys/modules/bktr sys/modules/bktr/bktr sys/modules/bktr/bktr_mem sys/sys X-SVN-Group: head X-SVN-Commit-Author: imp X-SVN-Commit-Paths: in head: . share/man/man4 sys/conf sys/dev/bktr sys/modules sys/modules/bktr sys/modules/bktr/bktr sys/modules/bktr/bktr_mem sys/sys X-SVN-Commit-Revision: 358497 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages 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, 01 Mar 2020 19:15:05 -0000 Author: imp Date: Sun Mar 1 19:15:03 2020 New Revision: 358497 URL: https://svnweb.freebsd.org/changeset/base/358497 Log: Remove bktr(4) Remove the brooktree driver as discussed on arch@. Bump FreeBSD version to 1300082, though I doubt anything will care. Relnote: yes Deleted: head/share/man/man4/bktr.4 head/sys/dev/bktr/CHANGELOG.TXT head/sys/dev/bktr/bktr_audio.c head/sys/dev/bktr/bktr_audio.h head/sys/dev/bktr/bktr_card.c head/sys/dev/bktr/bktr_card.h head/sys/dev/bktr/bktr_core.c head/sys/dev/bktr/bktr_core.h head/sys/dev/bktr/bktr_i2c.c head/sys/dev/bktr/bktr_i2c.h head/sys/dev/bktr/bktr_mem.c head/sys/dev/bktr/bktr_mem.h head/sys/dev/bktr/bktr_os.c head/sys/dev/bktr/bktr_os.h head/sys/dev/bktr/bktr_reg.h head/sys/dev/bktr/bktr_tuner.c head/sys/dev/bktr/bktr_tuner.h head/sys/dev/bktr/ioctl_bt848.h head/sys/dev/bktr/ioctl_meteor.h head/sys/dev/bktr/msp34xx.c head/sys/modules/bktr/Makefile head/sys/modules/bktr/Makefile.inc head/sys/modules/bktr/bktr/Makefile head/sys/modules/bktr/bktr_mem/Makefile Modified: head/UPDATING head/share/man/man4/Makefile head/sys/conf/files head/sys/modules/Makefile head/sys/sys/param.h Modified: head/UPDATING ============================================================================== --- head/UPDATING Sun Mar 1 18:55:59 2020 (r358496) +++ head/UPDATING Sun Mar 1 19:15:03 2020 (r358497) @@ -26,6 +26,9 @@ NOTE TO PEOPLE WHO THINK THAT FreeBSD 13.x IS SLOW: disable the most expensive debugging functionality run "ln -s 'abort:false,junk:false' /etc/malloc.conf".) +20200301: + Removed brooktree driver (bktr.4) from the tree. + 20200229: The WITH_GPL_DTC option has been removed. The BSD-licenced device tree compiler in usr.bin/dtc is used on all architectures which use dtc, and Modified: head/share/man/man4/Makefile ============================================================================== --- head/share/man/man4/Makefile Sun Mar 1 18:55:59 2020 (r358496) +++ head/share/man/man4/Makefile Sun Mar 1 19:15:03 2020 (r358497) @@ -79,7 +79,6 @@ MAN= aac.4 \ bhnd_pmu.4 \ bhndb.4 \ bhndb_pci.4 \ - bktr.4 \ blackhole.4 \ bnxt.4 \ bpf.4 \ @@ -601,7 +600,6 @@ MLINKS+=axe.4 if_axe.4 MLINKS+=bce.4 if_bce.4 MLINKS+=bfe.4 if_bfe.4 MLINKS+=bge.4 if_bge.4 -MLINKS+=bktr.4 brooktree.4 MLINKS+=bnxt.4 if_bnxt.4 MLINKS+=bridge.4 if_bridge.4 MLINKS+=bwi.4 if_bwi.4 Modified: head/sys/conf/files ============================================================================== --- head/sys/conf/files Sun Mar 1 18:55:59 2020 (r358496) +++ head/sys/conf/files Sun Mar 1 19:15:03 2020 (r358497) @@ -1335,13 +1335,6 @@ dev/bhnd/siba/siba_bhndb.c optional siba bhnd bhndb dev/bhnd/siba/siba_erom.c optional siba bhnd dev/bhnd/siba/siba_subr.c optional siba bhnd # -dev/bktr/bktr_audio.c optional bktr pci -dev/bktr/bktr_card.c optional bktr pci -dev/bktr/bktr_core.c optional bktr pci -dev/bktr/bktr_i2c.c optional bktr pci smbus -dev/bktr/bktr_os.c optional bktr pci -dev/bktr/bktr_tuner.c optional bktr pci -dev/bktr/msp34xx.c optional bktr pci dev/bnxt/bnxt_hwrm.c optional bnxt iflib pci dev/bnxt/bnxt_sysctl.c optional bnxt iflib pci dev/bnxt/bnxt_txrx.c optional bnxt iflib pci Modified: head/sys/modules/Makefile ============================================================================== --- head/sys/modules/Makefile Sun Mar 1 18:55:59 2020 (r358496) +++ head/sys/modules/Makefile Sun Mar 1 19:15:03 2020 (r358497) @@ -67,7 +67,6 @@ SUBDIR= \ bhnd \ ${_bxe} \ ${_bios} \ - ${_bktr} \ ${_blake2} \ bnxt \ bridgestp \ @@ -583,7 +582,6 @@ _agp= agp _an= an _aout= aout _bios= bios -_bktr= bktr .if ${MK_SOURCELESS_UCODE} != "no" _bxe= bxe .endif Modified: head/sys/sys/param.h ============================================================================== --- head/sys/sys/param.h Sun Mar 1 18:55:59 2020 (r358496) +++ head/sys/sys/param.h Sun Mar 1 19:15:03 2020 (r358497) @@ -60,7 +60,7 @@ * in the range 5 to 9. */ #undef __FreeBSD_version -#define __FreeBSD_version 1300081 /* Master, propagated to newvers */ +#define __FreeBSD_version 1300082 /* Master, propagated to newvers */ /* * __FreeBSD_kernel__ indicates that this system uses the kernel of FreeBSD, From owner-svn-src-all@freebsd.org Sun Mar 1 20:19:39 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 3B6FC24B7FE; Sun, 1 Mar 2020 20:19:39 +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 48Vvky6tRxz44T7; Sun, 1 Mar 2020 20:19:38 +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 C3F138FF3; Sun, 1 Mar 2020 20:19:38 +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 021KJcu8083068; Sun, 1 Mar 2020 20:19:38 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 021KJcIC083067; Sun, 1 Mar 2020 20:19:38 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <202003012019.021KJcIC083067@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Sun, 1 Mar 2020 20:19:38 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r358498 - head/tools/tools/controlelf X-SVN-Group: head X-SVN-Commit-Author: emaste X-SVN-Commit-Paths: head/tools/tools/controlelf X-SVN-Commit-Revision: 358498 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages 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, 01 Mar 2020 20:19:39 -0000 Author: emaste Date: Sun Mar 1 20:19:38 2020 New Revision: 358498 URL: https://svnweb.freebsd.org/changeset/base/358498 Log: controlelf: fix indentation for larger flags Sponsored by: The FreeBSD Foundation Modified: head/tools/tools/controlelf/controlelf.c Modified: head/tools/tools/controlelf/controlelf.c ============================================================================== --- head/tools/tools/controlelf/controlelf.c Sun Mar 1 19:15:03 2020 (r358497) +++ head/tools/tools/controlelf/controlelf.c Sun Mar 1 20:19:38 2020 (r358498) @@ -273,7 +273,7 @@ print_features(void) printf("Known features are:\n"); for (i = 0; i < nitems(featurelist); ++i) - printf("%s\t\t %s\n", featurelist[i].alias, + printf("%-16s%s\n", featurelist[i].alias, featurelist[i].desc); } @@ -289,7 +289,7 @@ print_file_features(Elf *elf, int phcount, int fd, cha printf("File '%s' features:\n", filename); for (i = 0; i < nitems(featurelist); ++i) { - printf("%s\t\t'%s' is ", featurelist[i].alias, + printf("%-16s'%s' is ", featurelist[i].alias, featurelist[i].desc); if ((featurelist[i].value & features) == 0) From owner-svn-src-all@freebsd.org Sun Mar 1 20:23:55 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id C9C8A24BAA2 for ; Sun, 1 Mar 2020 20:23:55 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: from mail-qk1-x72e.google.com (mail-qk1-x72e.google.com [IPv6:2607:f8b0:4864:20::72e]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1O1" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 48Vvqt3JWHz4GcF for ; Sun, 1 Mar 2020 20:23:54 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: by mail-qk1-x72e.google.com with SMTP id u124so8140702qkh.13 for ; Sun, 01 Mar 2020 12:23:54 -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=so2ELDTt4IihVyXaLxkOY0aKxRtO5juM+nd46W/m1no=; b=EEupJ5k+S8o0cRLSBL3bSHZku3pAIB4UiMykmsZID1CVwRZPIsMUwsVUQz90lVOQZG UxtTID/T0jCuyuJwXJmm8HSfpgNozpz6RDI1jgk7vB45ROQVh1rRGlKqTi4yC/Tpe98m lElLswCoHj/T2m5Uq4LBKEQOM6jIgXTT8Mh43+J8xmAjMAqC9Xy/g1DKmTvlRU1Otlg0 WSMPSg1OZyQGjAw3QBKsSQhwICWn0WSyOuUEYgiX7/a8b6NZd24sr9dqmV+FKKy/2Q/p DU7WhlMT5cPGLr9Nqa5rEAP+qiPEQ0VGV/kwu5ECU/k9BpFTJULQG/4uHsTYvku6JGEq 6XpA== 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=so2ELDTt4IihVyXaLxkOY0aKxRtO5juM+nd46W/m1no=; b=VQ7a28uCftzlIlz5srGBOLJIOVkIuv1sXLFF+/aVEmcKBeTs+JfAlRSEoYd+ERb7ji Obum5XVArIuJCZxrWQem+63NPZ5GiRtGsHh+bIfu06YGlYYghvcBRfdmkj9hw6J9c9/n hB1ZNMKk93kzXjUkpRLwiR+FHjnmxd+VTNbWyDzT2RYHzJHNMxlU5AGJU9qeCJUmz8go oJYPrzagMK+OK3fypO/312DNoVq28PZhA93k+T0UfnADUfTGWhuzqHzoADT/tZhLwa1Y DfX4sGSpqQ08nq2iwanMRwvvbvfo3Hv6HNyZmDfxPUBwGj4/dvq4l7dRFyYRfwScKGUh AJ9A== X-Gm-Message-State: APjAAAVHYYfbqNpPifuo59y+GYfRdi8vfcIsrjzt/45YtMFVbQAWxa/c XsbOXqB6A8OLDLfa80HRAnL8N+wtf6+KlquIj1j8ehIP X-Google-Smtp-Source: APXvYqzrp3zVZVukopCRpnY+15XuXnCC8XBwL2SW4Gzg6aVcY5oxLaMsfBWrkSn8qdlooAZ5Dp/aV7J8xOo3Yxfy2Do= X-Received: by 2002:a37:993:: with SMTP id 141mr12204351qkj.240.1583094232934; Sun, 01 Mar 2020 12:23:52 -0800 (PST) MIME-Version: 1.0 References: <202003011915.021JF3bW047048@repo.freebsd.org> In-Reply-To: <202003011915.021JF3bW047048@repo.freebsd.org> From: Warner Losh Date: Sun, 1 Mar 2020 13:23:42 -0700 Message-ID: Subject: Re: svn commit: r358497 - in head: . share/man/man4 sys/conf sys/dev/bktr sys/modules sys/modules/bktr sys/modules/bktr/bktr sys/modules/bktr/bktr_mem sys/sys To: Warner Losh Cc: src-committers , svn-src-all , svn-src-head X-Rspamd-Queue-Id: 48Vvqt3JWHz4GcF X-Spamd-Bar: --- Authentication-Results: mx1.freebsd.org; dkim=pass header.d=bsdimp-com.20150623.gappssmtp.com header.s=20150623 header.b=EEupJ5k+; dmarc=none; spf=none (mx1.freebsd.org: domain of wlosh@bsdimp.com has no SPF policy when checking 2607:f8b0:4864:20::72e) smtp.mailfrom=wlosh@bsdimp.com X-Spamd-Result: default: False [-3.54 / 15.00]; ARC_NA(0.00)[]; NEURAL_HAM_MEDIUM(-0.99)[-0.995,0]; R_DKIM_ALLOW(-0.20)[bsdimp-com.20150623.gappssmtp.com:s=20150623]; FROM_HAS_DN(0.00)[]; RCPT_COUNT_THREE(0.00)[4]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; MIME_GOOD(-0.10)[multipart/alternative,text/plain]; PREVIOUSLY_DELIVERED(0.00)[svn-src-all@freebsd.org]; DMARC_NA(0.00)[bsdimp.com]; URI_COUNT_ODD(1.00)[3]; TO_MATCH_ENVRCPT_SOME(0.00)[]; TO_DN_ALL(0.00)[]; DKIM_TRACE(0.00)[bsdimp-com.20150623.gappssmtp.com:+]; RCVD_IN_DNSWL_NONE(0.00)[e.2.7.0.0.0.0.0.0.0.0.0.0.0.0.0.0.2.0.0.4.6.8.4.0.b.8.f.7.0.6.2.list.dnswl.org : 127.0.5.0]; R_SPF_NA(0.00)[]; FORGED_SENDER(0.30)[imp@bsdimp.com,wlosh@bsdimp.com]; MIME_TRACE(0.00)[0:+,1:+,2:~]; IP_SCORE(-2.54)[ip: (-9.12), ipnet: 2607:f8b0::/32(-1.88), asn: 15169(-1.67), country: US(-0.05)]; ASN(0.00)[asn:15169, ipnet:2607:f8b0::/32, country:US]; FROM_NEQ_ENVFROM(0.00)[imp@bsdimp.com,wlosh@bsdimp.com]; RCVD_TLS_ALL(0.00)[]; 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: Sun, 01 Mar 2020 20:23:55 -0000 This broke installworld... Testing a fix now... Today is not my day :( Warner On Sun, Mar 1, 2020 at 12:15 PM Warner Losh wrote: > Author: imp > Date: Sun Mar 1 19:15:03 2020 > New Revision: 358497 > URL: https://svnweb.freebsd.org/changeset/base/358497 > > Log: > Remove bktr(4) > > Remove the brooktree driver as discussed on arch@. Bump FreeBSD version > to > 1300082, though I doubt anything will care. > > Relnote: yes > > Deleted: > head/share/man/man4/bktr.4 > head/sys/dev/bktr/CHANGELOG.TXT > head/sys/dev/bktr/bktr_audio.c > head/sys/dev/bktr/bktr_audio.h > head/sys/dev/bktr/bktr_card.c > head/sys/dev/bktr/bktr_card.h > head/sys/dev/bktr/bktr_core.c > head/sys/dev/bktr/bktr_core.h > head/sys/dev/bktr/bktr_i2c.c > head/sys/dev/bktr/bktr_i2c.h > head/sys/dev/bktr/bktr_mem.c > head/sys/dev/bktr/bktr_mem.h > head/sys/dev/bktr/bktr_os.c > head/sys/dev/bktr/bktr_os.h > head/sys/dev/bktr/bktr_reg.h > head/sys/dev/bktr/bktr_tuner.c > head/sys/dev/bktr/bktr_tuner.h > head/sys/dev/bktr/ioctl_bt848.h > head/sys/dev/bktr/ioctl_meteor.h > head/sys/dev/bktr/msp34xx.c > head/sys/modules/bktr/Makefile > head/sys/modules/bktr/Makefile.inc > head/sys/modules/bktr/bktr/Makefile > head/sys/modules/bktr/bktr_mem/Makefile > Modified: > head/UPDATING > head/share/man/man4/Makefile > head/sys/conf/files > head/sys/modules/Makefile > head/sys/sys/param.h > > Modified: head/UPDATING > > ============================================================================== > --- head/UPDATING Sun Mar 1 18:55:59 2020 (r358496) > +++ head/UPDATING Sun Mar 1 19:15:03 2020 (r358497) > @@ -26,6 +26,9 @@ NOTE TO PEOPLE WHO THINK THAT FreeBSD 13.x IS SLOW: > disable the most expensive debugging functionality run > "ln -s 'abort:false,junk:false' /etc/malloc.conf".) > > +20200301: > + Removed brooktree driver (bktr.4) from the tree. > + > 20200229: > The WITH_GPL_DTC option has been removed. The BSD-licenced device > tree > compiler in usr.bin/dtc is used on all architectures which use > dtc, and > > Modified: head/share/man/man4/Makefile > > ============================================================================== > --- head/share/man/man4/Makefile Sun Mar 1 18:55:59 2020 > (r358496) > +++ head/share/man/man4/Makefile Sun Mar 1 19:15:03 2020 > (r358497) > @@ -79,7 +79,6 @@ MAN= aac.4 \ > bhnd_pmu.4 \ > bhndb.4 \ > bhndb_pci.4 \ > - bktr.4 \ > blackhole.4 \ > bnxt.4 \ > bpf.4 \ > @@ -601,7 +600,6 @@ MLINKS+=axe.4 if_axe.4 > MLINKS+=bce.4 if_bce.4 > MLINKS+=bfe.4 if_bfe.4 > MLINKS+=bge.4 if_bge.4 > -MLINKS+=bktr.4 brooktree.4 > MLINKS+=bnxt.4 if_bnxt.4 > MLINKS+=bridge.4 if_bridge.4 > MLINKS+=bwi.4 if_bwi.4 > > Modified: head/sys/conf/files > > ============================================================================== > --- head/sys/conf/files Sun Mar 1 18:55:59 2020 (r358496) > +++ head/sys/conf/files Sun Mar 1 19:15:03 2020 (r358497) > @@ -1335,13 +1335,6 @@ dev/bhnd/siba/siba_bhndb.c optional > siba bhnd bhndb > dev/bhnd/siba/siba_erom.c optional siba bhnd > dev/bhnd/siba/siba_subr.c optional siba bhnd > # > -dev/bktr/bktr_audio.c optional bktr pci > -dev/bktr/bktr_card.c optional bktr pci > -dev/bktr/bktr_core.c optional bktr pci > -dev/bktr/bktr_i2c.c optional bktr pci smbus > -dev/bktr/bktr_os.c optional bktr pci > -dev/bktr/bktr_tuner.c optional bktr pci > -dev/bktr/msp34xx.c optional bktr pci > dev/bnxt/bnxt_hwrm.c optional bnxt iflib pci > dev/bnxt/bnxt_sysctl.c optional bnxt iflib pci > dev/bnxt/bnxt_txrx.c optional bnxt iflib pci > > Modified: head/sys/modules/Makefile > > ============================================================================== > --- head/sys/modules/Makefile Sun Mar 1 18:55:59 2020 (r358496) > +++ head/sys/modules/Makefile Sun Mar 1 19:15:03 2020 (r358497) > @@ -67,7 +67,6 @@ SUBDIR= \ > bhnd \ > ${_bxe} \ > ${_bios} \ > - ${_bktr} \ > ${_blake2} \ > bnxt \ > bridgestp \ > @@ -583,7 +582,6 @@ _agp= agp > _an= an > _aout= aout > _bios= bios > -_bktr= bktr > .if ${MK_SOURCELESS_UCODE} != "no" > _bxe= bxe > .endif > > Modified: head/sys/sys/param.h > > ============================================================================== > --- head/sys/sys/param.h Sun Mar 1 18:55:59 2020 (r358496) > +++ head/sys/sys/param.h Sun Mar 1 19:15:03 2020 (r358497) > @@ -60,7 +60,7 @@ > * in the range 5 to 9. > */ > #undef __FreeBSD_version > -#define __FreeBSD_version 1300081 /* Master, propagated to newvers */ > +#define __FreeBSD_version 1300082 /* Master, propagated to newvers */ > > /* > * __FreeBSD_kernel__ indicates that this system uses the kernel of > FreeBSD, > From owner-svn-src-all@freebsd.org Sun Mar 1 20:25:58 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id A262124BB72; Sun, 1 Mar 2020 20:25: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 48VvtG2bNcz4M3V; Sun, 1 Mar 2020 20:25: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 492FE91B6; Sun, 1 Mar 2020 20:25: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 021KPwXv088701; Sun, 1 Mar 2020 20:25:58 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 021KPw4F088700; Sun, 1 Mar 2020 20:25:58 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <202003012025.021KPw4F088700@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Sun, 1 Mar 2020 20:25:57 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r358499 - head/contrib/elftoolchain/readelf X-SVN-Group: head X-SVN-Commit-Author: emaste X-SVN-Commit-Paths: head/contrib/elftoolchain/readelf X-SVN-Commit-Revision: 358499 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages 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, 01 Mar 2020 20:25:58 -0000 Author: emaste Date: Sun Mar 1 20:25:57 2020 New Revision: 358499 URL: https://svnweb.freebsd.org/changeset/base/358499 Log: readelf: add PROTMAX_DISABLE and STKGAP_DISABLE From r349609 (PROTMAX_DISABLE) and r354790 (STKGAP_DISABLE). Commited upstream (in a slightly different form) as r3831. Sponsored by: The FreeBSD Foundation Modified: head/contrib/elftoolchain/readelf/readelf.c Modified: head/contrib/elftoolchain/readelf/readelf.c ============================================================================== --- head/contrib/elftoolchain/readelf/readelf.c Sun Mar 1 20:19:38 2020 (r358498) +++ head/contrib/elftoolchain/readelf/readelf.c Sun Mar 1 20:25:57 2020 (r358499) @@ -3669,6 +3669,8 @@ dump_notes(struct readelf *re) static struct flag_desc note_feature_ctl_flags[] = { { NT_FREEBSD_FCTL_ASLR_DISABLE, "ASLR_DISABLE" }, + { NT_FREEBSD_FCTL_PROTMAX_DISABLE, "PROTMAX_DISABLE" }, + { NT_FREEBSD_FCTL_STKGAP_DISABLE, "STKGAP_DISABLE" }, { 0, NULL } }; From owner-svn-src-all@freebsd.org Sun Mar 1 20:37:45 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 8A71D24BE75; Sun, 1 Mar 2020 20:37:45 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.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 48Vw7r5wfZz3JRn; Sun, 1 Mar 2020 20:37:44 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id A5BDF937B; Sun, 1 Mar 2020 20:37:44 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 021Kbi4q095082; Sun, 1 Mar 2020 20:37:44 GMT (envelope-from imp@FreeBSD.org) Received: (from imp@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 021KbhtQ095074; Sun, 1 Mar 2020 20:37:43 GMT (envelope-from imp@FreeBSD.org) Message-Id: <202003012037.021KbhtQ095074@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: imp set sender to imp@FreeBSD.org using -f From: Warner Losh Date: Sun, 1 Mar 2020 20:37:43 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r358500 - in head: . etc/mtree include sys/conf sys/i386/include sys/powerpc/conf X-SVN-Group: head X-SVN-Commit-Author: imp X-SVN-Commit-Paths: in head: . etc/mtree include sys/conf sys/i386/include sys/powerpc/conf X-SVN-Commit-Revision: 358500 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages 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, 01 Mar 2020 20:37:45 -0000 Author: imp Date: Sun Mar 1 20:37:42 2020 New Revision: 358500 URL: https://svnweb.freebsd.org/changeset/base/358500 Log: Finish removal of bktr Remove the old ioctl .h files Remove copying/linking ioctl .h files in instasllworld Remove bktr from lint Add now-removed files with ObsoleteFiles Deleted: head/sys/i386/include/ioctl_bt848.h head/sys/i386/include/ioctl_meteor.h Modified: head/ObsoleteFiles.inc head/etc/mtree/BSD.include.dist head/include/Makefile head/sys/conf/NOTES head/sys/conf/options head/sys/powerpc/conf/NOTES Modified: head/ObsoleteFiles.inc ============================================================================== --- head/ObsoleteFiles.inc Sun Mar 1 20:25:57 2020 (r358499) +++ head/ObsoleteFiles.inc Sun Mar 1 20:37:42 2020 (r358500) @@ -36,6 +36,15 @@ # xargs -n1 | sort | uniq -d; # done +# 20200301: bktr removed +OLD_DIRS+=usr/include/dev/bktr +OLD_FILES+=usr/include/dev/bktr/ioctl_bktr.h +OLD_FILES+=usr/include/dev/bktr/ioctl_meteor.h +.if ${TARGET_ARCH} == "i386" +OLD_FILES+=usr/include/machine/ioctl_bktr.h +OLD_FILES+=usr/include/machine/ioctl_meteor.h +.endif +OLD_FILES+=usr/share/man/man4/bktr.4.gz # 20200229: GCC 4.2.1 removed .if !defined(WITH_PORT_BASE_GCC) OLD_FILES+=usr/bin/g++ Modified: head/etc/mtree/BSD.include.dist ============================================================================== --- head/etc/mtree/BSD.include.dist Sun Mar 1 20:25:57 2020 (r358499) +++ head/etc/mtree/BSD.include.dist Sun Mar 1 20:37:42 2020 (r358500) @@ -46,8 +46,6 @@ .. an .. - bktr - .. ciss .. evdev Modified: head/include/Makefile ============================================================================== --- head/include/Makefile Sun Mar 1 20:25:57 2020 (r358499) +++ head/include/Makefile Sun Mar 1 20:37:42 2020 (r358500) @@ -43,7 +43,7 @@ LDIRS= bsm cam geom net net80211 netgraph netinet neti netipsec netsmb nfs nfsclient nfsserver sys vm LSUBDIRS= cam/ata cam/mmc cam/nvme cam/scsi \ - dev/acpica dev/agp dev/an dev/bktr dev/ciss dev/filemon dev/firewire \ + dev/acpica dev/agp dev/an dev/ciss dev/filemon dev/firewire \ dev/hwpmc dev/hyperv \ dev/ic dev/iicbus dev/io dev/mfi dev/mmc dev/nvme \ dev/ofw dev/pbio dev/pci ${_dev_powermac_nvram} dev/ppbus dev/pwm \ @@ -158,7 +158,7 @@ copies: .PHONY .META done; \ fi .endfor -.for i in ${LDIRS} ${LSUBDIRS:Ndev/agp:Ndev/acpica:Ndev/bktr:Ndev/evdev:Ndev/hyperv:Ndev/pci:Ndev/veriexec} ${LSUBSUBDIRS} +.for i in ${LDIRS} ${LSUBDIRS:Ndev/agp:Ndev/acpica:Ndev/evdev:Ndev/hyperv:Ndev/pci:Ndev/veriexec} ${LSUBSUBDIRS} cd ${SRCTOP}/sys; \ ${INSTALL} -C ${TAG_ARGS} -o ${BINOWN} -g ${BINGRP} -m 444 $i/*.h \ ${SDESTDIR}${INCLUDEDIR}/$i @@ -171,9 +171,6 @@ copies: .PHONY .META cd ${SRCTOP}/sys/dev/agp; \ ${INSTALL} -C ${TAG_ARGS} -o ${BINOWN} -g ${BINGRP} -m 444 agpreg.h \ ${SDESTDIR}${INCLUDEDIR}/dev/agp - cd ${SRCTOP}/sys/dev/bktr; \ - ${INSTALL} -C ${TAG_ARGS} -o ${BINOWN} -g ${BINGRP} -m 444 ioctl_*.h \ - ${SDESTDIR}${INCLUDEDIR}/dev/bktr cd ${SRCTOP}/sys/dev/evdev; \ ${INSTALL} -C ${TAG_ARGS} -o ${BINOWN} -g ${BINGRP} -m 444 input.h \ ${SDESTDIR}${INCLUDEDIR}/dev/evdev; \ @@ -261,7 +258,7 @@ symlinks: .PHONY .META ${INSTALL_SYMLINK} ${TAG_ARGS} ../../../sys/$i/$$h ${SDESTDIR}${INCLUDEDIR}/$i; \ done .endfor -.for i in ${LSUBDIRS:Ndev/agp:Ndev/acpica:Ndev/bktr:Ndev/evdev:Ndev/hyperv:Ndev/pci:Ndev/veriexec} +.for i in ${LSUBDIRS:Ndev/agp:Ndev/acpica:Ndev/evdev:Ndev/hyperv:Ndev/pci:Ndev/veriexec} cd ${SRCTOP}/sys/$i; \ for h in *.h; do \ ${INSTALL_SYMLINK} ${TAG_ARGS} ../../../../sys/$i/$$h ${SDESTDIR}${INCLUDEDIR}/$i; \ @@ -276,11 +273,6 @@ symlinks: .PHONY .META for h in agpreg.h; do \ ${INSTALL_SYMLINK} ${TAG_ARGS} ../../../../sys/dev/agp/$$h \ ${SDESTDIR}${INCLUDEDIR}/dev/agp; \ - done - cd ${SRCTOP}/sys/dev/bktr; \ - for h in ioctl_*.h; do \ - ${INSTALL_SYMLINK} ${TAG_ARGS} ../../../../sys/dev/bktr/$$h \ - ${SDESTDIR}${INCLUDEDIR}/dev/bktr; \ done cd ${SRCTOP}/sys/dev/evdev; \ for h in input.h input-event-codes.h uinput.h; do \ Modified: head/sys/conf/NOTES ============================================================================== --- head/sys/conf/NOTES Sun Mar 1 20:25:57 2020 (r358499) +++ head/sys/conf/NOTES Sun Mar 1 20:37:42 2020 (r358500) @@ -2172,73 +2172,11 @@ options SND_OLDSTEREO # # Miscellaneous hardware: # -# bktr: Brooktree bt848/848a/849a/878/879 video capture and TV Tuner board # cmx: OmniKey CardMan 4040 pccard smartcard reader device cmx # -# The 'bktr' device is a PCI video capture device using the Brooktree -# bt848/bt848a/bt849a/bt878/bt879 chipset. When used with a TV Tuner it forms a -# TV card, e.g. Miro PC/TV, Hauppauge WinCast/TV WinTV, VideoLogic Captivator, -# Intel Smart Video III, AverMedia, IMS Turbo, FlyVideo. -# -# options OVERRIDE_CARD=xxx -# options OVERRIDE_TUNER=xxx -# options OVERRIDE_MSP=1 -# options OVERRIDE_DBX=1 -# These options can be used to override the auto detection -# The current values for xxx are found in src/sys/dev/bktr/bktr_card.h -# Using sysctl(8) run-time overrides on a per-card basis can be made -# -# options BROOKTREE_SYSTEM_DEFAULT=BROOKTREE_PAL -# or -# options BROOKTREE_SYSTEM_DEFAULT=BROOKTREE_NTSC -# Specifies the default video capture mode. -# This is required for Dual Crystal (28&35MHz) boards where PAL is used -# to prevent hangs during initialization, e.g. VideoLogic Captivator PCI. -# -# options BKTR_USE_PLL -# This is required for PAL or SECAM boards with a 28MHz crystal and no 35MHz -# crystal, e.g. some new Bt878 cards. -# -# options BKTR_GPIO_ACCESS -# This enables IOCTLs which give user level access to the GPIO port. -# -# options BKTR_NO_MSP_RESET -# Prevents the MSP34xx reset. Good if you initialize the MSP in another OS first -# -# options BKTR_430_FX_MODE -# Switch Bt878/879 cards into Intel 430FX chipset compatibility mode. -# -# options BKTR_SIS_VIA_MODE -# Switch Bt878/879 cards into SIS/VIA chipset compatibility mode which is -# needed for some old SiS and VIA chipset motherboards. -# This also allows Bt878/879 chips to work on old OPTi (<1997) chipset -# motherboards and motherboards with bad or incomplete PCI 2.1 support. -# As a rough guess, old = before 1998 -# -# options BKTR_NEW_MSP34XX_DRIVER -# Use new, more complete initialization scheme for the msp34* soundchip. -# Should fix stereo autodetection if the old driver does only output -# mono sound. - -# -# options BKTR_USE_FREEBSD_SMBUS -# Compile with FreeBSD SMBus implementation -# -# Brooktree driver has been ported to the new I2C framework. Thus, -# you'll need to have the following 3 lines in the kernel config. -# device smbus -# device iicbus -# device iicbb -# device iicsmb -# The iic and smb devices are only needed if you want to control other -# I2C slaves connected to the external connector of some cards. -# -device bktr - -# # PC Card/PCMCIA and Cardbus # # cbb: pci/cardbus bridge implementing YENTA interface @@ -2271,7 +2209,6 @@ device sdhci # # Supported SMB interfaces: # iicsmb I2C to SMB bridge with any iicbus interface -# bktr brooktree848 I2C hardware interface # intpm Intel PIIX4 (82371AB, 82443MX) Power Management Unit # alpm Acer Aladdin-IV/V/Pro2 Power Management Unit # ichsmb Intel ICH SMBus controller chips (82801AA, 82801AB, 82801BA) @@ -2312,11 +2249,8 @@ device jedec_dimm # iicsmb i2c to smb bridge. Allow i2c i/o with smb commands. # iicoc simple polling driver for OpenCores I2C controller # -# Supported interfaces: -# bktr brooktree848 I2C software interface -# # Other: -# iicbb generic I2C bit-banging code (needed by lpbb, bktr) +# iicbb generic I2C bit-banging code (needed by lpbb) # device iicbus # Bus support, required for ic/iic/iicsmb below. device iicbb # bitbang driver; implements i2c on a pair of gpio pins Modified: head/sys/conf/options ============================================================================== --- head/sys/conf/options Sun Mar 1 20:25:57 2020 (r358499) +++ head/sys/conf/options Sun Mar 1 20:37:42 2020 (r358500) @@ -645,27 +645,6 @@ NFS_DEBUG opt_nfs.h # TMPFS options TMPFS_PAGES_MINRESERVED opt_tmpfs.h -# For the Bt848/Bt848A/Bt849/Bt878/Bt879 driver -OVERRIDE_CARD opt_bktr.h -OVERRIDE_TUNER opt_bktr.h -OVERRIDE_DBX opt_bktr.h -OVERRIDE_MSP opt_bktr.h -BROOKTREE_SYSTEM_DEFAULT opt_bktr.h -BROOKTREE_ALLOC_PAGES opt_bktr.h -BKTR_OVERRIDE_CARD opt_bktr.h -BKTR_OVERRIDE_TUNER opt_bktr.h -BKTR_OVERRIDE_DBX opt_bktr.h -BKTR_OVERRIDE_MSP opt_bktr.h -BKTR_SYSTEM_DEFAULT opt_bktr.h -BKTR_ALLOC_PAGES opt_bktr.h -BKTR_USE_PLL opt_bktr.h -BKTR_GPIO_ACCESS opt_bktr.h -BKTR_NO_MSP_RESET opt_bktr.h -BKTR_430_FX_MODE opt_bktr.h -BKTR_SIS_VIA_MODE opt_bktr.h -BKTR_USE_FREEBSD_SMBUS opt_bktr.h -BKTR_NEW_MSP34XX_DRIVER opt_bktr.h - # Options for uart(4) UART_PPS_ON_CTS opt_uart.h UART_POLL_FREQ opt_uart.h Modified: head/sys/powerpc/conf/NOTES ============================================================================== --- head/sys/powerpc/conf/NOTES Sun Mar 1 20:25:57 2020 (r358499) +++ head/sys/powerpc/conf/NOTES Sun Mar 1 20:37:42 2020 (r358500) @@ -72,7 +72,6 @@ device adm1030 # Apple G4 MDD fan controller ##################################################################### # Devices we don't want to deal with -nodevice bktr nodevice ccr nodevice cxgbe # XXX: builds on powerpc64 only. nodevice cxgbev From owner-svn-src-all@freebsd.org Sun Mar 1 21:25:45 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id E11E724E6DD; Sun, 1 Mar 2020 21:25:45 +0000 (UTC) (envelope-from markjdb@gmail.com) Received: from mail-qk1-x744.google.com (mail-qk1-x744.google.com [IPv6:2607:f8b0:4864:20::744]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1O1" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 48VxCD0dYSz4D3D; Sun, 1 Mar 2020 21:25:43 +0000 (UTC) (envelope-from markjdb@gmail.com) Received: by mail-qk1-x744.google.com with SMTP id p62so5543748qkb.0; Sun, 01 Mar 2020 13:25:43 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=4rL2QP/EfFgR9rSwEwTKa284KgKHwHCOEGFSe4rlJn4=; b=PHqtntCl4tt7kW5nkd9owRzJiYFSt0/tI8z04vgqcbQfrx3XNTBad3QpCPGKQaGnWu TFHR5f2hz0ndEmqVeYQ9LFLEKpoB8m258qeEAYbAl0N7/kKjX4Wv+8EWDMF0uIlcRxHK BjorC556ampAPm/AitG3UgRGF3/cA1O0bBNEtEVsFpTcESqHs0crIAnFwlsk9O3hqVZ7 HKwr6NF7Z22enwEu2ikijCkdmP+uR4wnRKnPVlDKNEk/nxeEJ++4e+hIk2OynVtJ1Wnj Tk1hrtpB98LZ0ujapTANErMcf+AkA5kydr9VHyBDJ0opC7h13QQVuUjURKwO4O3u5jxb CDqA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:date:from:to:cc:subject:message-id :references:mime-version:content-disposition:in-reply-to; bh=4rL2QP/EfFgR9rSwEwTKa284KgKHwHCOEGFSe4rlJn4=; b=ELzKmlGBjv8jMck5eeRniGdBIrLtyj54nABqovxDgXCbLrvqb5kkUkC02Jx0diIAxF xf+G6SiatdsChtqNPX9CleohYoiqWjyE6/R9KYZNAGXfzGuBpFD+ho/6kDkv31UwS7V3 I+PYHVMrGQpICKAMzmH9XAuYPcsJktovtoaUJ4hu0n7k8VFYnZQkpD9Hh4pJXjQ/bbyR bkncSKICAHFER8665Ta+U16c8u/0mGUS8wX9uUgtBN4RQENR40sl4wJ0vsYgquPpSiAK /zemuHo5xYvyhalTvg8ONfWOLZg9GKFBle1swafxqxgTKpS3uP2stvCAGkfRzE/Zn8xu YFCQ== X-Gm-Message-State: APjAAAV+SO4rXAX9xNPAV/GEwzMnleRgYNO5zdVS+0IWmdGTC1tOriZg NuYxHFugXzhoW+26ADRSjchLdpdc X-Google-Smtp-Source: APXvYqy/cSOuOsNtbrCjeArmcMgvI8S4iTODRjpHaX9gdw033FYVMQtOHQga9bVrCf8d295uInBtiA== X-Received: by 2002:a37:a8c3:: with SMTP id r186mr13176613qke.37.1583097943057; Sun, 01 Mar 2020 13:25:43 -0800 (PST) Received: from raichu (toroon0560w-lp130-11-70-50-21-248.dsl.bell.ca. [70.50.21.248]) by smtp.gmail.com with ESMTPSA id u49sm7846859qtj.42.2020.03.01.13.25.41 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 01 Mar 2020 13:25:42 -0800 (PST) Sender: Mark Johnston Date: Sun, 1 Mar 2020 16:25:37 -0500 From: Mark Johnston To: Emmanuel Vadot Cc: Jeff Roberson , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org, Jan Beich Subject: Re: svn commit: r358363 - head/sys/vm Message-ID: <20200301212537.GA33873@raichu> References: <202002270237.01R2bRLJ023799@repo.freebsd.org> <20200229212411.1e6aed2d49d6644937b78452@bidouilliste.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20200229212411.1e6aed2d49d6644937b78452@bidouilliste.com> X-Rspamd-Queue-Id: 48VxCD0dYSz4D3D X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org; dkim=pass header.d=gmail.com header.s=20161025 header.b=PHqtntCl; dmarc=none; spf=pass (mx1.freebsd.org: domain of markjdb@gmail.com designates 2607:f8b0:4864:20::744 as permitted sender) smtp.mailfrom=markjdb@gmail.com X-Spamd-Result: default: False [-2.08 / 15.00]; ARC_NA(0.00)[]; RCVD_VIA_SMTP_AUTH(0.00)[]; R_DKIM_ALLOW(-0.20)[gmail.com:s=20161025]; NEURAL_HAM_MEDIUM(-0.99)[-0.994,0]; FROM_HAS_DN(0.00)[]; TO_DN_SOME(0.00)[]; R_SPF_ALLOW(-0.20)[+ip6:2607:f8b0:4000::/36]; NEURAL_HAM_LONG(-1.00)[-0.999,0]; MIME_GOOD(-0.10)[text/plain]; MIME_TRACE(0.00)[0:+]; DMARC_NA(0.00)[freebsd.org]; RCPT_COUNT_FIVE(0.00)[6]; RCVD_COUNT_THREE(0.00)[3]; TO_MATCH_ENVRCPT_SOME(0.00)[]; DKIM_TRACE(0.00)[gmail.com:+]; RCVD_IN_DNSWL_NONE(0.00)[4.4.7.0.0.0.0.0.0.0.0.0.0.0.0.0.0.2.0.0.4.6.8.4.0.b.8.f.7.0.6.2.list.dnswl.org : 127.0.5.0]; IP_SCORE(-0.39)[ip: (1.63), ipnet: 2607:f8b0::/32(-1.88), asn: 15169(-1.67), country: US(-0.05)]; FORGED_SENDER(0.30)[markj@freebsd.org,markjdb@gmail.com]; MID_RHS_NOT_FQDN(0.50)[]; FREEMAIL_ENVFROM(0.00)[gmail.com]; ASN(0.00)[asn:15169, ipnet:2607:f8b0::/32, country:US]; FROM_NEQ_ENVFROM(0.00)[markj@freebsd.org,markjdb@gmail.com]; RCVD_TLS_ALL(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: Sun, 01 Mar 2020 21:25:46 -0000 On Sat, Feb 29, 2020 at 09:24:11PM +0100, Emmanuel Vadot wrote: > > Hi Jeff, > > On Thu, 27 Feb 2020 02:37:27 +0000 (UTC) > Jeff Roberson wrote: > > > Author: jeff > > Date: Thu Feb 27 02:37:27 2020 > > New Revision: 358363 > > URL: https://svnweb.freebsd.org/changeset/base/358363 > > > > Log: > > Add unlocked grab* function variants that use lockless radix code to > > lookup pages. These variants will fall back to their locked counterparts > > if the page is not present. > > > > Discussed with: kib, markj > > Differential Revision: https://reviews.freebsd.org/D23449 > > > > Modified: > > head/sys/vm/vm_page.c > > head/sys/vm/vm_page.h > > > > We're (jbeich@ and me) seeing wired memory leak since this commit. > A simple way to reproduce is to have drm-kmod (either 4.16 or 5.0) and > liba-intel-driver/libva-intel-media-driver and start mpv in a loop : > > while mpv --hwdec=vaapi --start=10.0 --end=10.1 /path/to/file ; do > done > > Reverting this commit on one of my test machine shows that this is the > culprit. > If you need anymore info/debug let me know. > > Thanks. Could you give this patch a try? diff --git a/sys/vm/vm_page.c b/sys/vm/vm_page.c index 9d50881ed27e..41e7a5bb3099 100644 --- a/sys/vm/vm_page.c +++ b/sys/vm/vm_page.c @@ -4535,7 +4535,8 @@ vm_page_grab_valid(vm_page_t *mp, vm_object_t object, vm_pindex_t pindex, int al (VM_ALLOC_NOWAIT | VM_ALLOC_WAITFAIL | VM_ALLOC_ZERO)) == 0, ("vm_page_grab_valid: Invalid flags 0x%X", allocflags)); VM_OBJECT_ASSERT_WLOCKED(object); - pflags = allocflags & ~(VM_ALLOC_NOBUSY | VM_ALLOC_SBUSY); + pflags = allocflags & ~(VM_ALLOC_NOBUSY | VM_ALLOC_SBUSY | + VM_ALLOC_WIRED); pflags |= VM_ALLOC_WAITFAIL; retrylookup: From owner-svn-src-all@freebsd.org Sun Mar 1 21:49:17 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 51EA724EDFF; Sun, 1 Mar 2020 21:49:17 +0000 (UTC) (envelope-from mjg@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 48VxkP0NL2z4GQf; Sun, 1 Mar 2020 21:49:17 +0000 (UTC) (envelope-from mjg@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id CE65AA1E6; Sun, 1 Mar 2020 21:49:16 +0000 (UTC) (envelope-from mjg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 021LnGnu037194; Sun, 1 Mar 2020 21:49:16 GMT (envelope-from mjg@FreeBSD.org) Received: (from mjg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 021LnGI1037193; Sun, 1 Mar 2020 21:49:16 GMT (envelope-from mjg@FreeBSD.org) Message-Id: <202003012149.021LnGI1037193@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mjg set sender to mjg@FreeBSD.org using -f From: Mateusz Guzik Date: Sun, 1 Mar 2020 21:49:16 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r358501 - head/sys/vm X-SVN-Group: head X-SVN-Commit-Author: mjg X-SVN-Commit-Paths: head/sys/vm X-SVN-Commit-Revision: 358501 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages 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, 01 Mar 2020 21:49:17 -0000 Author: mjg Date: Sun Mar 1 21:49:16 2020 New Revision: 358501 URL: https://svnweb.freebsd.org/changeset/base/358501 Log: vm: add debug to uma_zone_set_smr Reviewed by: markj, rlibby Differential Revision: https://reviews.freebsd.org/D23902 Modified: head/sys/vm/uma_core.c Modified: head/sys/vm/uma_core.c ============================================================================== --- head/sys/vm/uma_core.c Sun Mar 1 20:37:42 2020 (r358500) +++ head/sys/vm/uma_core.c Sun Mar 1 21:49:16 2020 (r358501) @@ -4659,6 +4659,9 @@ uma_zone_set_smr(uma_zone_t zone, smr_t smr) ZONE_ASSERT_COLD(zone); + KASSERT(smr != NULL, ("Got NULL smr")); + KASSERT((zone->uz_flags & UMA_ZONE_SMR) == 0, + ("zone %p (%s) already uses SMR", zone, zone->uz_name)); zone->uz_flags |= UMA_ZONE_SMR; zone->uz_smr = smr; zone_update_caches(zone); From owner-svn-src-all@freebsd.org Sun Mar 1 21:50:14 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 3A6D624EEBD; Sun, 1 Mar 2020 21:50:14 +0000 (UTC) (envelope-from mjg@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 48VxlT53G5z4JMD; Sun, 1 Mar 2020 21:50:13 +0000 (UTC) (envelope-from mjg@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 7055EA1EE; Sun, 1 Mar 2020 21:50:13 +0000 (UTC) (envelope-from mjg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 021LoDc9037317; Sun, 1 Mar 2020 21:50:13 GMT (envelope-from mjg@FreeBSD.org) Received: (from mjg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 021LoDtn037316; Sun, 1 Mar 2020 21:50:13 GMT (envelope-from mjg@FreeBSD.org) Message-Id: <202003012150.021LoDtn037316@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mjg set sender to mjg@FreeBSD.org using -f From: Mateusz Guzik Date: Sun, 1 Mar 2020 21:50:13 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r358502 - head/sys/kern X-SVN-Group: head X-SVN-Commit-Author: mjg X-SVN-Commit-Paths: head/sys/kern X-SVN-Commit-Revision: 358502 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages 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, 01 Mar 2020 21:50:14 -0000 Author: mjg Date: Sun Mar 1 21:50:13 2020 New Revision: 358502 URL: https://svnweb.freebsd.org/changeset/base/358502 Log: fd: make fgetvp_rights work without the filedesc lock Reviewed by: kib Differential Revision: https://reviews.freebsd.org/D23883 Modified: head/sys/kern/kern_descrip.c Modified: head/sys/kern/kern_descrip.c ============================================================================== --- head/sys/kern/kern_descrip.c Sun Mar 1 21:49:16 2020 (r358501) +++ head/sys/kern/kern_descrip.c Sun Mar 1 21:50:13 2020 (r358502) @@ -3028,13 +3028,11 @@ int fgetvp_rights(struct thread *td, int fd, cap_rights_t *needrightsp, struct filecaps *havecaps, struct vnode **vpp) { - struct filedesc *fdp; struct filecaps caps; struct file *fp; int error; - fdp = td->td_proc->p_fd; - error = fget_cap_locked(fdp, fd, needrightsp, &fp, &caps); + error = fget_cap(td, fd, needrightsp, &fp, &caps); if (error != 0) return (error); if (fp->f_ops == &badfileops) { @@ -3049,10 +3047,12 @@ fgetvp_rights(struct thread *td, int fd, cap_rights_t *havecaps = caps; *vpp = fp->f_vnode; vrefact(*vpp); + fdrop(fp, td); return (0); out: filecaps_free(&caps); + fdrop(fp, td); return (error); } From owner-svn-src-all@freebsd.org Sun Mar 1 21:53:49 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 83FA024F4F3; Sun, 1 Mar 2020 21:53:49 +0000 (UTC) (envelope-from mjg@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 48Vxqd0qskz4R3F; Sun, 1 Mar 2020 21:53:49 +0000 (UTC) (envelope-from mjg@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id EBBE0A3B3; Sun, 1 Mar 2020 21:53:48 +0000 (UTC) (envelope-from mjg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 021LrmN6043500; Sun, 1 Mar 2020 21:53:48 GMT (envelope-from mjg@FreeBSD.org) Received: (from mjg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 021LrkJe043469; Sun, 1 Mar 2020 21:53:46 GMT (envelope-from mjg@FreeBSD.org) Message-Id: <202003012153.021LrkJe043469@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mjg set sender to mjg@FreeBSD.org using -f From: Mateusz Guzik Date: Sun, 1 Mar 2020 21:53:46 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r358503 - in head: lib/libprocstat sys/compat/linprocfs sys/kern sys/security/audit sys/sys sys/ufs/ffs X-SVN-Group: head X-SVN-Commit-Author: mjg X-SVN-Commit-Paths: in head: lib/libprocstat sys/compat/linprocfs sys/kern sys/security/audit sys/sys sys/ufs/ffs X-SVN-Commit-Revision: 358503 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages 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, 01 Mar 2020 21:53:49 -0000 Author: mjg Date: Sun Mar 1 21:53:46 2020 New Revision: 358503 URL: https://svnweb.freebsd.org/changeset/base/358503 Log: fd: move vnodes out of filedesc into a dedicated structure The new structure is copy-on-write. With the assumption that path lookups are significantly more frequent than chdirs and chrooting this is a win. This provides stable root and jail root vnodes without the need to reference them on lookup, which in turn means less work on globally shared structures. Note this also happens to fix a bug where jail vnode was never referenced, meaning subsequent access on lookup could run into use-after-free. Reviewed by: kib Differential Revision: https://reviews.freebsd.org/D23884 Modified: head/lib/libprocstat/libprocstat.c head/sys/compat/linprocfs/linprocfs.c head/sys/kern/kern_descrip.c head/sys/kern/kern_linker.c head/sys/kern/vfs_cache.c head/sys/kern/vfs_lookup.c head/sys/kern/vfs_mountroot.c head/sys/security/audit/audit_bsm_klib.c head/sys/sys/filedesc.h head/sys/ufs/ffs/ffs_alloc.c Modified: head/lib/libprocstat/libprocstat.c ============================================================================== --- head/lib/libprocstat/libprocstat.c Sun Mar 1 21:50:13 2020 (r358502) +++ head/lib/libprocstat/libprocstat.c Sun Mar 1 21:53:46 2020 (r358503) @@ -459,6 +459,7 @@ procstat_getfiles_kvm(struct procstat *procstat, struc { struct file file; struct filedesc filed; + struct pwd pwd; struct vm_map_entry vmentry; struct vm_object object; struct vmspace vmspace; @@ -473,6 +474,7 @@ procstat_getfiles_kvm(struct procstat *procstat, struc int i, fflags; int prot, type; unsigned int nfiles; + bool haspwd; assert(procstat); kd = procstat->kd; @@ -485,6 +487,15 @@ procstat_getfiles_kvm(struct procstat *procstat, struc warnx("can't read filedesc at %p", (void *)kp->ki_fd); return (NULL); } + haspwd = false; + if (filed.fd_pwd != NULL) { + if (!kvm_read_all(kd, (unsigned long)filed.fd_pwd, &pwd, + sizeof(pwd))) { + warnx("can't read fd_pwd at %p", (void *)filed.fd_pwd); + return (NULL); + } + haspwd = true; + } /* * Allocate list head. @@ -495,25 +506,27 @@ procstat_getfiles_kvm(struct procstat *procstat, struc STAILQ_INIT(head); /* root directory vnode, if one. */ - if (filed.fd_rdir) { - entry = filestat_new_entry(filed.fd_rdir, PS_FST_TYPE_VNODE, -1, - PS_FST_FFLAG_READ, PS_FST_UFLAG_RDIR, 0, 0, NULL, NULL); - if (entry != NULL) - STAILQ_INSERT_TAIL(head, entry, next); - } - /* current working directory vnode. */ - if (filed.fd_cdir) { - entry = filestat_new_entry(filed.fd_cdir, PS_FST_TYPE_VNODE, -1, - PS_FST_FFLAG_READ, PS_FST_UFLAG_CDIR, 0, 0, NULL, NULL); - if (entry != NULL) - STAILQ_INSERT_TAIL(head, entry, next); - } - /* jail root, if any. */ - if (filed.fd_jdir) { - entry = filestat_new_entry(filed.fd_jdir, PS_FST_TYPE_VNODE, -1, - PS_FST_FFLAG_READ, PS_FST_UFLAG_JAIL, 0, 0, NULL, NULL); - if (entry != NULL) - STAILQ_INSERT_TAIL(head, entry, next); + if (haspwd) { + if (pwd.pwd_rdir) { + entry = filestat_new_entry(pwd.pwd_rdir, PS_FST_TYPE_VNODE, -1, + PS_FST_FFLAG_READ, PS_FST_UFLAG_RDIR, 0, 0, NULL, NULL); + if (entry != NULL) + STAILQ_INSERT_TAIL(head, entry, next); + } + /* current working directory vnode. */ + if (pwd.pwd_cdir) { + entry = filestat_new_entry(pwd.pwd_cdir, PS_FST_TYPE_VNODE, -1, + PS_FST_FFLAG_READ, PS_FST_UFLAG_CDIR, 0, 0, NULL, NULL); + if (entry != NULL) + STAILQ_INSERT_TAIL(head, entry, next); + } + /* jail root, if any. */ + if (pwd.pwd_jdir) { + entry = filestat_new_entry(pwd.pwd_jdir, PS_FST_TYPE_VNODE, -1, + PS_FST_FFLAG_READ, PS_FST_UFLAG_JAIL, 0, 0, NULL, NULL); + if (entry != NULL) + STAILQ_INSERT_TAIL(head, entry, next); + } } /* ktrace vnode, if one */ if (kp->ki_tracep) { Modified: head/sys/compat/linprocfs/linprocfs.c ============================================================================== --- head/sys/compat/linprocfs/linprocfs.c Sun Mar 1 21:50:13 2020 (r358502) +++ head/sys/compat/linprocfs/linprocfs.c Sun Mar 1 21:53:46 2020 (r358503) @@ -1028,23 +1028,16 @@ linprocfs_doprocstatus(PFS_FILL_ARGS) static int linprocfs_doproccwd(PFS_FILL_ARGS) { - struct filedesc *fdp; - struct vnode *vp; + struct pwd *pwd; char *fullpath = "unknown"; char *freepath = NULL; - fdp = p->p_fd; - FILEDESC_SLOCK(fdp); - vp = fdp->fd_cdir; - if (vp != NULL) - VREF(vp); - FILEDESC_SUNLOCK(fdp); - vn_fullpath(td, vp, &fullpath, &freepath); - if (vp != NULL) - vrele(vp); + pwd = pwd_hold(td); + vn_fullpath(td, pwd->pwd_cdir, &fullpath, &freepath); sbuf_printf(sb, "%s", fullpath); if (freepath) free(freepath, M_TEMP); + pwd_drop(pwd); return (0); } @@ -1054,23 +1047,18 @@ linprocfs_doproccwd(PFS_FILL_ARGS) static int linprocfs_doprocroot(PFS_FILL_ARGS) { - struct filedesc *fdp; + struct pwd *pwd; struct vnode *vp; char *fullpath = "unknown"; char *freepath = NULL; - fdp = p->p_fd; - FILEDESC_SLOCK(fdp); - vp = jailed(p->p_ucred) ? fdp->fd_jdir : fdp->fd_rdir; - if (vp != NULL) - VREF(vp); - FILEDESC_SUNLOCK(fdp); + pwd = pwd_hold(td); + vp = jailed(p->p_ucred) ? pwd->pwd_jdir : pwd->pwd_rdir; vn_fullpath(td, vp, &fullpath, &freepath); - if (vp != NULL) - vrele(vp); sbuf_printf(sb, "%s", fullpath); if (freepath) free(freepath, M_TEMP); + pwd_drop(pwd); return (0); } Modified: head/sys/kern/kern_descrip.c ============================================================================== --- head/sys/kern/kern_descrip.c Sun Mar 1 21:50:13 2020 (r358502) +++ head/sys/kern/kern_descrip.c Sun Mar 1 21:53:46 2020 (r358503) @@ -91,6 +91,7 @@ __FBSDID("$FreeBSD$"); #include static MALLOC_DEFINE(M_FILEDESC, "filedesc", "Open file descriptor table"); +static MALLOC_DEFINE(M_PWD, "pwd", "Descriptor table vnodes"); static MALLOC_DEFINE(M_FILEDESC_TO_LEADER, "filedesc_to_leader", "file desc to leader structures"); static MALLOC_DEFINE(M_SIGIO, "sigio", "sigio structures"); @@ -116,6 +117,8 @@ static void filecaps_copy_finish(const struct filecaps static u_long *filecaps_free_prep(struct filecaps *fcaps); static void filecaps_free_finish(u_long *ioctls); +static struct pwd *pwd_alloc(void); + /* * Each process has: * @@ -314,24 +317,6 @@ fdfree(struct filedesc *fdp, int fd) fdunused(fdp, fd); } -void -pwd_ensure_dirs(void) -{ - struct filedesc *fdp; - - fdp = curproc->p_fd; - FILEDESC_XLOCK(fdp); - if (fdp->fd_cdir == NULL) { - fdp->fd_cdir = rootvnode; - vrefact(rootvnode); - } - if (fdp->fd_rdir == NULL) { - fdp->fd_rdir = rootvnode; - vrefact(rootvnode); - } - FILEDESC_XUNLOCK(fdp); -} - /* * System calls on descriptors. */ @@ -2014,22 +1999,16 @@ fdinit(struct filedesc *fdp, bool prepfiles) newfdp->fd_files = (struct fdescenttbl *)&newfdp0->fd_dfiles; newfdp->fd_files->fdt_nfiles = NDFILE; - if (fdp == NULL) + if (fdp == NULL) { + newfdp->fd_pwd = pwd_alloc(); return (newfdp); + } if (prepfiles && fdp->fd_lastfile >= newfdp->fd_nfiles) fdgrowtable(newfdp, fdp->fd_lastfile + 1); FILEDESC_SLOCK(fdp); - newfdp->fd_cdir = fdp->fd_cdir; - if (newfdp->fd_cdir) - vrefact(newfdp->fd_cdir); - newfdp->fd_rdir = fdp->fd_rdir; - if (newfdp->fd_rdir) - vrefact(newfdp->fd_rdir); - newfdp->fd_jdir = fdp->fd_jdir; - if (newfdp->fd_jdir) - vrefact(newfdp->fd_jdir); + newfdp->fd_pwd = pwd_hold_filedesc(fdp); if (!prepfiles) { FILEDESC_SUNLOCK(fdp); @@ -2327,7 +2306,7 @@ fdescfree(struct thread *td) { struct proc *p; struct filedesc *fdp; - struct vnode *cdir, *jdir, *rdir; + struct pwd *pwd; p = td->td_proc; fdp = p->p_fd; @@ -2349,20 +2328,11 @@ fdescfree(struct thread *td) return; FILEDESC_XLOCK(fdp); - cdir = fdp->fd_cdir; - fdp->fd_cdir = NULL; - rdir = fdp->fd_rdir; - fdp->fd_rdir = NULL; - jdir = fdp->fd_jdir; - fdp->fd_jdir = NULL; + pwd = fdp->fd_pwd; + pwd_set(fdp, NULL); FILEDESC_XUNLOCK(fdp); - if (cdir != NULL) - vrele(cdir); - if (rdir != NULL) - vrele(rdir); - if (jdir != NULL) - vrele(jdir); + pwd_drop(pwd); fdescfree_fds(td, fdp, 1); } @@ -2371,13 +2341,7 @@ void fdescfree_remapped(struct filedesc *fdp) { - if (fdp->fd_cdir != NULL) - vrele(fdp->fd_cdir); - if (fdp->fd_rdir != NULL) - vrele(fdp->fd_rdir); - if (fdp->fd_jdir != NULL) - vrele(fdp->fd_jdir); - + pwd_drop(fdp->fd_pwd); fdescfree_fds(curthread, fdp, 0); } @@ -3287,37 +3251,117 @@ chroot_refuse_vdir_fds(struct filedesc *fdp) return (0); } +static void +pwd_fill(struct pwd *oldpwd, struct pwd *newpwd) +{ + + if (newpwd->pwd_cdir == NULL && oldpwd->pwd_cdir != NULL) { + vrefact(oldpwd->pwd_cdir); + newpwd->pwd_cdir = oldpwd->pwd_cdir; + } + + if (newpwd->pwd_rdir == NULL && oldpwd->pwd_rdir != NULL) { + vrefact(oldpwd->pwd_rdir); + newpwd->pwd_rdir = oldpwd->pwd_rdir; + } + + if (newpwd->pwd_jdir == NULL && oldpwd->pwd_jdir != NULL) { + vrefact(oldpwd->pwd_jdir); + newpwd->pwd_jdir = oldpwd->pwd_jdir; + } +} + +struct pwd * +pwd_hold_filedesc(struct filedesc *fdp) +{ + struct pwd *pwd; + + FILEDESC_LOCK_ASSERT(fdp); + pwd = fdp->fd_pwd; + if (pwd != NULL) + refcount_acquire(&pwd->pwd_refcount); + return (pwd); +} + +struct pwd * +pwd_hold(struct thread *td) +{ + struct filedesc *fdp; + struct pwd *pwd; + + fdp = td->td_proc->p_fd; + + FILEDESC_SLOCK(fdp); + pwd = fdp->fd_pwd; + MPASS(pwd != NULL); + refcount_acquire(&pwd->pwd_refcount); + FILEDESC_SUNLOCK(fdp); + return (pwd); +} + +static struct pwd * +pwd_alloc(void) +{ + struct pwd *pwd; + + pwd = malloc(sizeof(*pwd), M_PWD, M_WAITOK | M_ZERO); + refcount_init(&pwd->pwd_refcount, 1); + return (pwd); +} + +void +pwd_drop(struct pwd *pwd) +{ + + if (!refcount_release(&pwd->pwd_refcount)) + return; + + if (pwd->pwd_cdir != NULL) + vrele(pwd->pwd_cdir); + if (pwd->pwd_rdir != NULL) + vrele(pwd->pwd_rdir); + if (pwd->pwd_jdir != NULL) + vrele(pwd->pwd_jdir); + free(pwd, M_PWD); +} + /* - * Common routine for kern_chroot() and jail_attach(). The caller is - * responsible for invoking priv_check() and mac_vnode_check_chroot() to - * authorize this operation. - */ +* Common routine for kern_chroot() and jail_attach(). The caller is +* responsible for invoking priv_check() and mac_vnode_check_chroot() to +* authorize this operation. +*/ int pwd_chroot(struct thread *td, struct vnode *vp) { struct filedesc *fdp; - struct vnode *oldvp; + struct pwd *newpwd, *oldpwd; int error; fdp = td->td_proc->p_fd; + newpwd = pwd_alloc(); FILEDESC_XLOCK(fdp); + oldpwd = fdp->fd_pwd; if (chroot_allow_open_directories == 0 || - (chroot_allow_open_directories == 1 && fdp->fd_rdir != rootvnode)) { + (chroot_allow_open_directories == 1 && + oldpwd->pwd_rdir != rootvnode)) { error = chroot_refuse_vdir_fds(fdp); if (error != 0) { FILEDESC_XUNLOCK(fdp); + pwd_drop(newpwd); return (error); } } - oldvp = fdp->fd_rdir; + vrefact(vp); - fdp->fd_rdir = vp; - if (fdp->fd_jdir == NULL) { + newpwd->pwd_rdir = vp; + if (oldpwd->pwd_jdir == NULL) { vrefact(vp); - fdp->fd_jdir = vp; + newpwd->pwd_jdir = vp; } + pwd_fill(oldpwd, newpwd); + pwd_set(fdp, newpwd); FILEDESC_XUNLOCK(fdp); - vrele(oldvp); + pwd_drop(oldpwd); return (0); } @@ -3325,18 +3369,53 @@ void pwd_chdir(struct thread *td, struct vnode *vp) { struct filedesc *fdp; - struct vnode *oldvp; + struct pwd *newpwd, *oldpwd; + VNPASS(vp->v_usecount > 0, vp); + + newpwd = pwd_alloc(); fdp = td->td_proc->p_fd; FILEDESC_XLOCK(fdp); - VNASSERT(vp->v_usecount > 0, vp, - ("chdir to a vnode with zero usecount")); - oldvp = fdp->fd_cdir; - fdp->fd_cdir = vp; + oldpwd = fdp->fd_pwd; + newpwd->pwd_cdir = vp; + pwd_fill(oldpwd, newpwd); + pwd_set(fdp, newpwd); FILEDESC_XUNLOCK(fdp); - vrele(oldvp); + pwd_drop(oldpwd); } +void +pwd_ensure_dirs(void) +{ + struct filedesc *fdp; + struct pwd *oldpwd, *newpwd; + + fdp = curproc->p_fd; + FILEDESC_XLOCK(fdp); + oldpwd = fdp->fd_pwd; + if (oldpwd->pwd_cdir != NULL && oldpwd->pwd_rdir != NULL) { + FILEDESC_XUNLOCK(fdp); + return; + } + FILEDESC_XUNLOCK(fdp); + + newpwd = pwd_alloc(); + FILEDESC_XLOCK(fdp); + oldpwd = fdp->fd_pwd; + pwd_fill(oldpwd, newpwd); + if (newpwd->pwd_cdir == NULL) { + vrefact(rootvnode); + newpwd->pwd_cdir = rootvnode; + } + if (newpwd->pwd_rdir == NULL) { + vrefact(rootvnode); + newpwd->pwd_rdir = rootvnode; + } + pwd_set(fdp, newpwd); + FILEDESC_XUNLOCK(fdp); + pwd_drop(oldpwd); +} + /* * Scan all active processes and prisons to see if any of them have a current * or root directory of `olddp'. If so, replace them with the new mount point. @@ -3345,6 +3424,7 @@ void mountcheckdirs(struct vnode *olddp, struct vnode *newdp) { struct filedesc *fdp; + struct pwd *newpwd, *oldpwd; struct prison *pr; struct proc *p; int nrele; @@ -3352,6 +3432,7 @@ mountcheckdirs(struct vnode *olddp, struct vnode *newd if (vrefcnt(olddp) == 1) return; nrele = 0; + newpwd = pwd_alloc(); sx_slock(&allproc_lock); FOREACH_PROC_IN_SYSTEM(p) { PROC_LOCK(p); @@ -3360,25 +3441,36 @@ mountcheckdirs(struct vnode *olddp, struct vnode *newd if (fdp == NULL) continue; FILEDESC_XLOCK(fdp); - if (fdp->fd_cdir == olddp) { + oldpwd = fdp->fd_pwd; + if (oldpwd == NULL || + (oldpwd->pwd_cdir != olddp && + oldpwd->pwd_rdir != olddp && + oldpwd->pwd_jdir != olddp)) { + FILEDESC_XUNLOCK(fdp); + fddrop(fdp); + continue; + } + if (oldpwd->pwd_cdir == olddp) { vrefact(newdp); - fdp->fd_cdir = newdp; - nrele++; + newpwd->pwd_cdir = newdp; } - if (fdp->fd_rdir == olddp) { + if (oldpwd->pwd_rdir == olddp) { vrefact(newdp); - fdp->fd_rdir = newdp; - nrele++; + newpwd->pwd_rdir = newdp; } - if (fdp->fd_jdir == olddp) { + if (oldpwd->pwd_jdir == olddp) { vrefact(newdp); - fdp->fd_jdir = newdp; - nrele++; + newpwd->pwd_jdir = newdp; } + pwd_fill(oldpwd, newpwd); + pwd_set(fdp, newpwd); FILEDESC_XUNLOCK(fdp); + pwd_drop(oldpwd); fddrop(fdp); + newpwd = pwd_alloc(); } sx_sunlock(&allproc_lock); + pwd_drop(newpwd); if (rootvnode == olddp) { vrefact(newdp); rootvnode = newdp; @@ -3714,6 +3806,7 @@ kern_proc_filedesc_out(struct proc *p, struct sbuf *s struct filedesc *fdp; struct export_fd_buf *efbuf; struct vnode *cttyvp, *textvp, *tracevp; + struct pwd *pwd; int error, i; cap_rights_t rights; @@ -3754,21 +3847,25 @@ kern_proc_filedesc_out(struct proc *p, struct sbuf *s goto fail; efbuf->fdp = fdp; FILEDESC_SLOCK(fdp); - /* working directory */ - if (fdp->fd_cdir != NULL) { - vrefact(fdp->fd_cdir); - export_vnode_to_sb(fdp->fd_cdir, KF_FD_TYPE_CWD, FREAD, efbuf); + pwd = pwd_hold_filedesc(fdp); + if (pwd != NULL) { + /* working directory */ + if (pwd->pwd_cdir != NULL) { + vrefact(pwd->pwd_cdir); + export_vnode_to_sb(pwd->pwd_cdir, KF_FD_TYPE_CWD, FREAD, efbuf); + } + /* root directory */ + if (pwd->pwd_rdir != NULL) { + vrefact(pwd->pwd_rdir); + export_vnode_to_sb(pwd->pwd_rdir, KF_FD_TYPE_ROOT, FREAD, efbuf); + } + /* jail directory */ + if (pwd->pwd_jdir != NULL) { + vrefact(pwd->pwd_jdir); + export_vnode_to_sb(pwd->pwd_jdir, KF_FD_TYPE_JAIL, FREAD, efbuf); + } + pwd_drop(pwd); } - /* root directory */ - if (fdp->fd_rdir != NULL) { - vrefact(fdp->fd_rdir); - export_vnode_to_sb(fdp->fd_rdir, KF_FD_TYPE_ROOT, FREAD, efbuf); - } - /* jail directory */ - if (fdp->fd_jdir != NULL) { - vrefact(fdp->fd_jdir); - export_vnode_to_sb(fdp->fd_jdir, KF_FD_TYPE_JAIL, FREAD, efbuf); - } for (i = 0; fdp->fd_refcnt > 0 && i <= fdp->fd_lastfile; i++) { if ((fp = fdp->fd_ofiles[i].fde_file) == NULL) continue; @@ -3882,6 +3979,7 @@ sysctl_kern_proc_ofiledesc(SYSCTL_HANDLER_ARGS) struct kinfo_ofile *okif; struct kinfo_file *kif; struct filedesc *fdp; + struct pwd *pwd; int error, i, *name; struct file *fp; struct proc *p; @@ -3897,15 +3995,19 @@ sysctl_kern_proc_ofiledesc(SYSCTL_HANDLER_ARGS) kif = malloc(sizeof(*kif), M_TEMP, M_WAITOK); okif = malloc(sizeof(*okif), M_TEMP, M_WAITOK); FILEDESC_SLOCK(fdp); - if (fdp->fd_cdir != NULL) - export_vnode_for_osysctl(fdp->fd_cdir, KF_FD_TYPE_CWD, kif, - okif, fdp, req); - if (fdp->fd_rdir != NULL) - export_vnode_for_osysctl(fdp->fd_rdir, KF_FD_TYPE_ROOT, kif, - okif, fdp, req); - if (fdp->fd_jdir != NULL) - export_vnode_for_osysctl(fdp->fd_jdir, KF_FD_TYPE_JAIL, kif, - okif, fdp, req); + pwd = pwd_hold_filedesc(fdp); + if (pwd != NULL) { + if (pwd->pwd_cdir != NULL) + export_vnode_for_osysctl(pwd->pwd_cdir, KF_FD_TYPE_CWD, kif, + okif, fdp, req); + if (pwd->pwd_rdir != NULL) + export_vnode_for_osysctl(pwd->pwd_rdir, KF_FD_TYPE_ROOT, kif, + okif, fdp, req); + if (pwd->pwd_jdir != NULL) + export_vnode_for_osysctl(pwd->pwd_jdir, KF_FD_TYPE_JAIL, kif, + okif, fdp, req); + pwd_drop(pwd); + } for (i = 0; fdp->fd_refcnt > 0 && i <= fdp->fd_lastfile; i++) { if ((fp = fdp->fd_ofiles[i].fde_file) == NULL) continue; @@ -3973,6 +4075,7 @@ kern_proc_cwd_out(struct proc *p, struct sbuf *sb, ss { struct filedesc *fdp; struct export_fd_buf *efbuf; + struct vnode *cdir; int error; PROC_LOCK_ASSERT(p, MA_OWNED); @@ -3988,12 +4091,12 @@ kern_proc_cwd_out(struct proc *p, struct sbuf *sb, ss efbuf->remainder = maxlen; FILEDESC_SLOCK(fdp); - if (fdp->fd_cdir == NULL) + cdir = fdp->fd_pwd->pwd_cdir; + if (cdir == NULL) { error = EINVAL; - else { - vrefact(fdp->fd_cdir); - error = export_vnode_to_sb(fdp->fd_cdir, KF_FD_TYPE_CWD, - FREAD, efbuf); + } else { + vrefact(cdir); + error = export_vnode_to_sb(cdir, KF_FD_TYPE_CWD, FREAD, efbuf); } FILEDESC_SUNLOCK(fdp); fddrop(fdp); Modified: head/sys/kern/kern_linker.c ============================================================================== --- head/sys/kern/kern_linker.c Sun Mar 1 21:50:13 2020 (r358502) +++ head/sys/kern/kern_linker.c Sun Mar 1 21:53:46 2020 (r358503) @@ -2085,14 +2085,14 @@ linker_load_module(const char *kldname, const char *mo KASSERT(verinfo == NULL, ("linker_load_module: verinfo" " is not NULL")); /* check if root file system is not mounted */ - if (rootvnode == NULL || curproc->p_fd->fd_rdir == NULL) + if (rootvnode == NULL || curproc->p_fd->fd_pwd->pwd_rdir == NULL) return (ENXIO); pathname = linker_search_kld(kldname); } else { if (modlist_lookup2(modname, verinfo) != NULL) return (EEXIST); /* check if root file system is not mounted */ - if (rootvnode == NULL || curproc->p_fd->fd_rdir == NULL) + if (rootvnode == NULL || curproc->p_fd->fd_pwd->pwd_rdir == NULL) return (ENXIO); if (kldname != NULL) pathname = strdup(kldname, M_LINKER); Modified: head/sys/kern/vfs_cache.c ============================================================================== --- head/sys/kern/vfs_cache.c Sun Mar 1 21:50:13 2020 (r358502) +++ head/sys/kern/vfs_cache.c Sun Mar 1 21:53:46 2020 (r358503) @@ -2196,20 +2196,12 @@ sys___getcwd(struct thread *td, struct __getcwd_args * int vn_getcwd(struct thread *td, char *buf, char **retbuf, size_t *buflen) { - struct filedesc *fdp; - struct vnode *cdir, *rdir; + struct pwd *pwd; int error; - fdp = td->td_proc->p_fd; - FILEDESC_SLOCK(fdp); - cdir = fdp->fd_cdir; - vrefact(cdir); - rdir = fdp->fd_rdir; - vrefact(rdir); - FILEDESC_SUNLOCK(fdp); - error = vn_fullpath_any(td, cdir, rdir, buf, retbuf, buflen); - vrele(rdir); - vrele(cdir); + pwd = pwd_hold(td); + error = vn_fullpath_any(td, pwd->pwd_cdir, pwd->pwd_rdir, buf, retbuf, buflen); + pwd_drop(pwd); #ifdef KTRACE if (KTRPOINT(curthread, KTR_NAMEI) && error == 0) @@ -2256,9 +2248,8 @@ sys___realpathat(struct thread *td, struct __realpatha int vn_fullpath(struct thread *td, struct vnode *vn, char **retbuf, char **freebuf) { + struct pwd *pwd; char *buf; - struct filedesc *fdp; - struct vnode *rdir; size_t buflen; int error; @@ -2267,13 +2258,9 @@ vn_fullpath(struct thread *td, struct vnode *vn, char buflen = MAXPATHLEN; buf = malloc(buflen, M_TEMP, M_WAITOK); - fdp = td->td_proc->p_fd; - FILEDESC_SLOCK(fdp); - rdir = fdp->fd_rdir; - vrefact(rdir); - FILEDESC_SUNLOCK(fdp); - error = vn_fullpath_any(td, vn, rdir, buf, retbuf, &buflen); - vrele(rdir); + pwd = pwd_hold(td); + error = vn_fullpath_any(td, vn, pwd->pwd_rdir, buf, retbuf, &buflen); + pwd_drop(pwd); if (!error) *freebuf = buf; @@ -2541,8 +2528,7 @@ vn_fullpath_hardlink(struct thread *td, struct nameida char **freebuf, size_t *buflen) { char *buf, *tmpbuf; - struct filedesc *fdp; - struct vnode *rdir; + struct pwd *pwd; struct componentname *cnp; struct vnode *vp; size_t addend; @@ -2557,11 +2543,7 @@ vn_fullpath_hardlink(struct thread *td, struct nameida slash_prefixed = false; buf = malloc(*buflen, M_TEMP, M_WAITOK); - fdp = td->td_proc->p_fd; - FILEDESC_SLOCK(fdp); - rdir = fdp->fd_rdir; - vrefact(rdir); - FILEDESC_SUNLOCK(fdp); + pwd = pwd_hold(td); addend = 0; vp = ndp->ni_vp; @@ -2582,16 +2564,17 @@ vn_fullpath_hardlink(struct thread *td, struct nameida } vref(vp); - error = vn_fullpath_dir(td, vp, rdir, buf, retbuf, buflen, slash_prefixed, addend); + error = vn_fullpath_dir(td, vp, pwd->pwd_rdir, buf, retbuf, buflen, + slash_prefixed, addend); if (error != 0) goto out_bad; - vrele(rdir); + pwd_drop(pwd); *freebuf = buf; return (0); out_bad: - vrele(rdir); + pwd_drop(pwd); free(buf, M_TEMP); return (error); } Modified: head/sys/kern/vfs_lookup.c ============================================================================== --- head/sys/kern/vfs_lookup.c Sun Mar 1 21:50:13 2020 (r358502) +++ head/sys/kern/vfs_lookup.c Sun Mar 1 21:53:46 2020 (r358503) @@ -303,7 +303,6 @@ namei_handle_root(struct nameidata *ndp, struct vnode int namei(struct nameidata *ndp) { - struct filedesc *fdp; /* pointer to file descriptor state */ char *cp; /* pointer into pathname argument */ struct vnode *dp; /* the directory we are searching */ struct iovec aiov; /* uio for reading symbolic links */ @@ -311,6 +310,7 @@ namei(struct nameidata *ndp) struct file *dfp; struct thread *td; struct proc *p; + struct pwd *pwd; cap_rights_t rights; struct filecaps dirfd_caps; struct uio auio; @@ -327,7 +327,6 @@ namei(struct nameidata *ndp) ("namei: flags contaminated with nameiops")); MPASS(ndp->ni_startdir == NULL || ndp->ni_startdir->v_type == VDIR || ndp->ni_startdir->v_type == VBAD); - fdp = p->p_fd; TAILQ_INIT(&ndp->ni_cap_tracker); ndp->ni_lcf = 0; @@ -395,13 +394,13 @@ namei(struct nameidata *ndp) /* * Get starting point for the translation. */ - FILEDESC_SLOCK(fdp); + pwd = pwd_hold(td); /* * The reference on ni_rootdir is acquired in the block below to avoid * back-to-back atomics for absolute lookups. */ - ndp->ni_rootdir = fdp->fd_rdir; - ndp->ni_topdir = fdp->fd_jdir; + ndp->ni_rootdir = pwd->pwd_rdir; + ndp->ni_topdir = pwd->pwd_jdir; startdir_used = 0; dp = NULL; @@ -422,7 +421,7 @@ namei(struct nameidata *ndp) dp = ndp->ni_startdir; startdir_used = 1; } else if (ndp->ni_dirfd == AT_FDCWD) { - dp = fdp->fd_cdir; + dp = pwd->pwd_cdir; if (dp == ndp->ni_rootdir) { vrefactn(dp, 2); } else { @@ -442,7 +441,7 @@ namei(struct nameidata *ndp) * Effectively inlined fgetvp_rights, because we need to * inspect the file as well as grabbing the vnode. */ - error = fget_cap_locked(fdp, ndp->ni_dirfd, &rights, + error = fget_cap(td, ndp->ni_dirfd, &rights, &dfp, &ndp->ni_filecaps); if (error != 0) { /* @@ -450,16 +449,19 @@ namei(struct nameidata *ndp) * or capability-related, both of which can be * safely returned to the caller. */ - } else if (dfp->f_ops == &badfileops) { - error = EBADF; - } else if (dfp->f_vnode == NULL) { - error = ENOTDIR; } else { - dp = dfp->f_vnode; - vrefact(dp); + if (dfp->f_ops == &badfileops) { + error = EBADF; + } else if (dfp->f_vnode == NULL) { + error = ENOTDIR; + } else { + dp = dfp->f_vnode; + vrefact(dp); - if ((dfp->f_flag & FSEARCH) != 0) - cnp->cn_flags |= NOEXECCHECK; + if ((dfp->f_flag & FSEARCH) != 0) + cnp->cn_flags |= NOEXECCHECK; + } + fdrop(dfp, td); } #ifdef CAPABILITIES /* @@ -481,7 +483,7 @@ namei(struct nameidata *ndp) } if (error == 0 && (cnp->cn_flags & BENEATH) != 0) { if (ndp->ni_dirfd == AT_FDCWD) { - ndp->ni_beneath_latch = fdp->fd_cdir; + ndp->ni_beneath_latch = pwd->pwd_cdir; vrefact(ndp->ni_beneath_latch); } else { rights = ndp->ni_rightsneeded; @@ -496,7 +498,6 @@ namei(struct nameidata *ndp) if (error == 0) ndp->ni_lcf |= NI_LCF_LATCH; } - FILEDESC_SUNLOCK(fdp); /* * If we are auditing the kernel pathname, save the user pathname. */ @@ -542,6 +543,7 @@ namei(struct nameidata *ndp) nameicap_cleanup(ndp, true); SDT_PROBE2(vfs, namei, lookup, return, error, (error == 0 ? ndp->ni_vp : NULL)); + pwd_drop(pwd); return (error); } if (ndp->ni_loopcnt++ >= MAXSYMLINKS) { @@ -617,6 +619,7 @@ out: namei_cleanup_cnp(cnp); nameicap_cleanup(ndp, true); SDT_PROBE2(vfs, namei, lookup, return, error, NULL); + pwd_drop(pwd); return (error); } Modified: head/sys/kern/vfs_mountroot.c ============================================================================== --- head/sys/kern/vfs_mountroot.c Sun Mar 1 21:50:13 2020 (r358502) +++ head/sys/kern/vfs_mountroot.c Sun Mar 1 21:53:46 2020 (r358503) @@ -237,27 +237,13 @@ root_mounted(void) static void set_rootvnode(void) { - struct proc *p; if (VFS_ROOT(TAILQ_FIRST(&mountlist), LK_EXCLUSIVE, &rootvnode)) panic("set_rootvnode: Cannot find root vnode"); VOP_UNLOCK(rootvnode); - p = curthread->td_proc; - FILEDESC_XLOCK(p->p_fd); - - if (p->p_fd->fd_cdir != NULL) - vrele(p->p_fd->fd_cdir); - p->p_fd->fd_cdir = rootvnode; - VREF(rootvnode); - - if (p->p_fd->fd_rdir != NULL) - vrele(p->p_fd->fd_rdir); - p->p_fd->fd_rdir = rootvnode; - VREF(rootvnode); - - FILEDESC_XUNLOCK(p->p_fd); + pwd_ensure_dirs(); } static int Modified: head/sys/security/audit/audit_bsm_klib.c ============================================================================== --- head/sys/security/audit/audit_bsm_klib.c Sun Mar 1 21:50:13 2020 (r358502) +++ head/sys/security/audit/audit_bsm_klib.c Sun Mar 1 21:53:46 2020 (r358503) @@ -493,38 +493,35 @@ void audit_canon_path(struct thread *td, int dirfd, char *path, char *cpath) { struct vnode *cdir, *rdir; - struct filedesc *fdp; + struct pwd *pwd; cap_rights_t rights; int error; + bool vrele_cdir; WITNESS_WARN(WARN_GIANTOK | WARN_SLEEPOK, NULL, "%s: at %s:%d", __func__, __FILE__, __LINE__); - rdir = cdir = NULL; - fdp = td->td_proc->p_fd; - FILEDESC_SLOCK(fdp); - if (*path == '/') { - rdir = fdp->fd_rdir; - vrefact(rdir); - } else { + pwd = pwd_hold(td); + rdir = pwd->pwd_rdir; + cdir = NULL; + vrele_cdir = false; + if (*path != '/') { if (dirfd == AT_FDCWD) { - cdir = fdp->fd_cdir; - vrefact(cdir); + cdir = pwd->pwd_cdir; } else { error = fgetvp(td, dirfd, cap_rights_init(&rights), &cdir); if (error != 0) { - FILEDESC_SUNLOCK(fdp); cpath[0] = '\0'; + pwd_drop(pwd); return; } + vrele_cdir = true; } } - FILEDESC_SUNLOCK(fdp); audit_canon_path_vp(td, rdir, cdir, path, cpath); - if (rdir != NULL) - vrele(rdir); - if (cdir != NULL) + pwd_drop(pwd); + if (vrele_cdir) vrele(cdir); } Modified: head/sys/sys/filedesc.h ============================================================================== --- head/sys/sys/filedesc.h Sun Mar 1 21:50:13 2020 (r358502) +++ head/sys/sys/filedesc.h Sun Mar 1 21:53:46 2020 (r358503) @@ -76,11 +76,16 @@ struct fdescenttbl { */ #define NDSLOTTYPE u_long +struct pwd { + volatile u_int pwd_refcount; + struct vnode *pwd_cdir; /* current directory */ + struct vnode *pwd_rdir; /* root directory */ + struct vnode *pwd_jdir; /* jail root directory */ +}; + struct filedesc { struct fdescenttbl *fd_files; /* open files table */ - struct vnode *fd_cdir; /* current directory */ - struct vnode *fd_rdir; /* root directory */ - struct vnode *fd_jdir; /* jail root directory */ + struct pwd *fd_pwd; /* directories */ NDSLOTTYPE *fd_map; /* bitmap of free fds */ int fd_lastfile; /* high-water mark of fd_ofiles */ int fd_freefile; /* approx. next free file */ @@ -252,6 +257,17 @@ fd_modified(struct filedesc *fdp, int fd, seqc_t seqc) void pwd_chdir(struct thread *td, struct vnode *vp); int pwd_chroot(struct thread *td, struct vnode *vp); void pwd_ensure_dirs(void); + +struct pwd *pwd_hold_filedesc(struct filedesc *fdp); +struct pwd *pwd_hold(struct thread *td); +void pwd_drop(struct pwd *pwd); +static inline void +pwd_set(struct filedesc *fdp, struct pwd *newpwd) +{ + + FILEDESC_XLOCK_ASSERT(fdp); + fdp->fd_pwd = newpwd; +} #endif /* _KERNEL */ Modified: head/sys/ufs/ffs/ffs_alloc.c ============================================================================== --- head/sys/ufs/ffs/ffs_alloc.c Sun Mar 1 21:50:13 2020 (r358502) +++ head/sys/ufs/ffs/ffs_alloc.c Sun Mar 1 21:53:46 2020 (r358503) @@ -3190,6 +3190,7 @@ sysctl_ffs_fsck(SYSCTL_HANDLER_ARGS) struct inode *ip, *dp; struct mount *mp; struct fs *fs; + struct pwd *pwd; ufs2_daddr_t blkno; long blkcnt, blksize; u_long key; @@ -3448,11 +3449,11 @@ sysctl_ffs_fsck(SYSCTL_HANDLER_ARGS) /* * Now we get and lock the child directory containing "..". */ - FILEDESC_SLOCK(td->td_proc->p_fd); - dvp = td->td_proc->p_fd->fd_cdir; *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@freebsd.org Sun Mar 1 21:54:29 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id AD9BF24F5C2; Sun, 1 Mar 2020 21:54:29 +0000 (UTC) (envelope-from mjg@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 48VxrN5z9jz4S3K; Sun, 1 Mar 2020 21:54:28 +0000 (UTC) (envelope-from mjg@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 8320CA3B7; Sun, 1 Mar 2020 21:54:28 +0000 (UTC) (envelope-from mjg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 021LsSCU043582; Sun, 1 Mar 2020 21:54:28 GMT (envelope-from mjg@FreeBSD.org) Received: (from mjg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 021LsS7X043581; Sun, 1 Mar 2020 21:54:28 GMT (envelope-from mjg@FreeBSD.org) Message-Id: <202003012154.021LsS7X043581@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mjg set sender to mjg@FreeBSD.org using -f From: Mateusz Guzik Date: Sun, 1 Mar 2020 21:54:28 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r358504 - head/sys/kern X-SVN-Group: head X-SVN-Commit-Author: mjg X-SVN-Commit-Paths: head/sys/kern X-SVN-Commit-Revision: 358504 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages 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, 01 Mar 2020 21:54:29 -0000 Author: mjg Date: Sun Mar 1 21:54:28 2020 New Revision: 358504 URL: https://svnweb.freebsd.org/changeset/base/358504 Log: vfs: stop taking additional refs on root vnode during lookup They are spurious since introduction of struct pwd, which provides them implicitly. Reviewed by: kib Differential Revision: https://reviews.freebsd.org/D23885 Modified: head/sys/kern/vfs_lookup.c Modified: head/sys/kern/vfs_lookup.c ============================================================================== --- head/sys/kern/vfs_lookup.c Sun Mar 1 21:53:46 2020 (r358503) +++ head/sys/kern/vfs_lookup.c Sun Mar 1 21:54:28 2020 (r358504) @@ -254,7 +254,7 @@ namei_cleanup_cnp(struct componentname *cnp) } static int -namei_handle_root(struct nameidata *ndp, struct vnode **dpp, u_int n) +namei_handle_root(struct nameidata *ndp, struct vnode **dpp) { struct componentname *cnp; @@ -276,7 +276,7 @@ namei_handle_root(struct nameidata *ndp, struct vnode ndp->ni_pathlen--; } *dpp = ndp->ni_rootdir; - vrefactn(*dpp, n); + vrefact(*dpp); return (0); } @@ -407,29 +407,15 @@ namei(struct nameidata *ndp) cnp->cn_nameptr = cnp->cn_pnbuf; if (cnp->cn_pnbuf[0] == '/') { ndp->ni_resflags |= NIRES_ABS; - error = namei_handle_root(ndp, &dp, 2); - if (error != 0) { - /* - * Simplify error handling, we should almost never be - * here. - */ - vrefact(ndp->ni_rootdir); - } + error = namei_handle_root(ndp, &dp); } else { if (ndp->ni_startdir != NULL) { - vrefact(ndp->ni_rootdir); dp = ndp->ni_startdir; startdir_used = 1; } else if (ndp->ni_dirfd == AT_FDCWD) { dp = pwd->pwd_cdir; - if (dp == ndp->ni_rootdir) { - vrefactn(dp, 2); - } else { - vrefact(ndp->ni_rootdir); - vrefact(dp); - } + vrefact(dp); } else { - vrefact(ndp->ni_rootdir); rights = ndp->ni_rightsneeded; cap_rights_set_one(&rights, CAP_LOOKUP); @@ -530,7 +516,6 @@ namei(struct nameidata *ndp) * If not a symbolic link, we're done. */ if ((cnp->cn_flags & ISSYMLINK) == 0) { - vrele(ndp->ni_rootdir); if ((cnp->cn_flags & (SAVENAME | SAVESTART)) == 0) { namei_cleanup_cnp(cnp); } else @@ -605,7 +590,7 @@ namei(struct nameidata *ndp) cnp->cn_nameptr = cnp->cn_pnbuf; if (*(cnp->cn_nameptr) == '/') { vrele(dp); - error = namei_handle_root(ndp, &dp, 1); + error = namei_handle_root(ndp, &dp); if (error != 0) goto out; } @@ -614,7 +599,6 @@ namei(struct nameidata *ndp) ndp->ni_vp = NULL; vrele(ndp->ni_dvp); out: - vrele(ndp->ni_rootdir); MPASS(error != 0); namei_cleanup_cnp(cnp); nameicap_cleanup(ndp, true); From owner-svn-src-all@freebsd.org Sun Mar 1 21:58:19 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id D206524F7B9; Sun, 1 Mar 2020 21:58:19 +0000 (UTC) (envelope-from jbeich@freebsd.org) Received: from freefall.freebsd.org (freefall.freebsd.org [96.47.72.132]) (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 "freefall.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 48Vxwq4hGBz4XrL; Sun, 1 Mar 2020 21:58:19 +0000 (UTC) (envelope-from jbeich@freebsd.org) Received: by freefall.freebsd.org (Postfix, from userid 1354) id 7314C9757; Sun, 1 Mar 2020 21:58:19 +0000 (UTC) From: Jan Beich To: Mark Johnston Cc: Emmanuel Vadot , Jeff Roberson , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r358363 - head/sys/vm References: <202002270237.01R2bRLJ023799@repo.freebsd.org> <20200229212411.1e6aed2d49d6644937b78452@bidouilliste.com> <20200301212537.GA33873@raichu> Date: Sun, 01 Mar 2020 22:58:17 +0100 In-Reply-To: <20200301212537.GA33873@raichu> (Mark Johnston's message of "Sun, 1 Mar 2020 16:25:37 -0500") Message-ID: MIME-Version: 1.0 Content-Type: text/plain X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages 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, 01 Mar 2020 21:58:19 -0000 Mark Johnston writes: > On Sat, Feb 29, 2020 at 09:24:11PM +0100, Emmanuel Vadot wrote: > >> >> Hi Jeff, >> >> On Thu, 27 Feb 2020 02:37:27 +0000 (UTC) >> Jeff Roberson wrote: >> >> > Author: jeff >> > Date: Thu Feb 27 02:37:27 2020 >> > New Revision: 358363 >> > URL: https://svnweb.freebsd.org/changeset/base/358363 >> > >> > Log: >> > Add unlocked grab* function variants that use lockless radix code to >> > lookup pages. These variants will fall back to their locked counterparts >> > if the page is not present. >> > >> > Discussed with: kib, markj >> > Differential Revision: https://reviews.freebsd.org/D23449 >> > >> > Modified: >> > head/sys/vm/vm_page.c >> > head/sys/vm/vm_page.h >> > >> >> We're (jbeich@ and me) seeing wired memory leak since this commit. >> A simple way to reproduce is to have drm-kmod (either 4.16 or 5.0) and >> liba-intel-driver/libva-intel-media-driver and start mpv in a loop : >> >> while mpv --hwdec=vaapi --start=10.0 --end=10.1 /path/to/file ; do >> done >> >> Reverting this commit on one of my test machine shows that this is the >> culprit. >> If you need anymore info/debug let me know. >> >> Thanks. > > Could you give this patch a try? > > diff --git a/sys/vm/vm_page.c b/sys/vm/vm_page.c > index 9d50881ed27e..41e7a5bb3099 100644 > --- a/sys/vm/vm_page.c > +++ b/sys/vm/vm_page.c > @@ -4535,7 +4535,8 @@ vm_page_grab_valid(vm_page_t *mp, vm_object_t object, vm_pindex_t pindex, int al > (VM_ALLOC_NOWAIT | VM_ALLOC_WAITFAIL | VM_ALLOC_ZERO)) == 0, > ("vm_page_grab_valid: Invalid flags 0x%X", allocflags)); > VM_OBJECT_ASSERT_WLOCKED(object); > - pflags = allocflags & ~(VM_ALLOC_NOBUSY | VM_ALLOC_SBUSY); > + pflags = allocflags & ~(VM_ALLOC_NOBUSY | VM_ALLOC_SBUSY | > + VM_ALLOC_WIRED); > pflags |= VM_ALLOC_WAITFAIL; > > retrylookup: I confirm, the patch fixes the issue. After trying to reproduce for a few minutes Wired doesn't grow several times larger than ARC Total. Mem: 1151M Active, 300M Inact, 41M Laundry, 3417M Wired, 57G Free ARC: 2020M Total, 861M MFU, 992M MRU, 3512K Anon, 23M Header, 140M Other 711M Compressed, 1311M Uncompressed, 1.84:1 Ratio From owner-svn-src-all@freebsd.org Sun Mar 1 22:09:12 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id A3DEE24FF2D; Sun, 1 Mar 2020 22:09:12 +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 48Vy9N36qmz3Hg6; Sun, 1 Mar 2020 22:09:12 +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 588D0A5B4; Sun, 1 Mar 2020 22:09:12 +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 021M9Cd0049660; Sun, 1 Mar 2020 22:09:12 GMT (envelope-from markj@FreeBSD.org) Received: (from markj@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 021M9CM3049659; Sun, 1 Mar 2020 22:09:12 GMT (envelope-from markj@FreeBSD.org) Message-Id: <202003012209.021M9CM3049659@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: markj set sender to markj@FreeBSD.org using -f From: Mark Johnston Date: Sun, 1 Mar 2020 22:09:12 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r358505 - head/sys/vm X-SVN-Group: head X-SVN-Commit-Author: markj X-SVN-Commit-Paths: head/sys/vm X-SVN-Commit-Revision: 358505 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages 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, 01 Mar 2020 22:09:12 -0000 Author: markj Date: Sun Mar 1 22:09:11 2020 New Revision: 358505 URL: https://svnweb.freebsd.org/changeset/base/358505 Log: Avoid doubly wiring a newly allocated page in vm_page_grab_valid(). This fixes a regression from r358363. Reported by: manu, jbeich Tested by: jbeich Modified: head/sys/vm/vm_page.c Modified: head/sys/vm/vm_page.c ============================================================================== --- head/sys/vm/vm_page.c Sun Mar 1 21:54:28 2020 (r358504) +++ head/sys/vm/vm_page.c Sun Mar 1 22:09:11 2020 (r358505) @@ -4535,7 +4535,8 @@ vm_page_grab_valid(vm_page_t *mp, vm_object_t object, (VM_ALLOC_NOWAIT | VM_ALLOC_WAITFAIL | VM_ALLOC_ZERO)) == 0, ("vm_page_grab_valid: Invalid flags 0x%X", allocflags)); VM_OBJECT_ASSERT_WLOCKED(object); - pflags = allocflags & ~(VM_ALLOC_NOBUSY | VM_ALLOC_SBUSY); + pflags = allocflags & ~(VM_ALLOC_NOBUSY | VM_ALLOC_SBUSY | + VM_ALLOC_WIRED); pflags |= VM_ALLOC_WAITFAIL; retrylookup: From owner-svn-src-all@freebsd.org Sun Mar 1 22:10:37 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id C69FD24FFED; Sun, 1 Mar 2020 22:10:37 +0000 (UTC) (envelope-from grog@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 48VyC148ZXz3LqR; Sun, 1 Mar 2020 22:10:37 +0000 (UTC) (envelope-from grog@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 6E6B1A5C2; Sun, 1 Mar 2020 22:10:37 +0000 (UTC) (envelope-from grog@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 021MAbPT049808; Sun, 1 Mar 2020 22:10:37 GMT (envelope-from grog@FreeBSD.org) Received: (from grog@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 021MAbZT049807; Sun, 1 Mar 2020 22:10:37 GMT (envelope-from grog@FreeBSD.org) Message-Id: <202003012210.021MAbZT049807@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: grog set sender to grog@FreeBSD.org using -f From: Greg Lehey Date: Sun, 1 Mar 2020 22:10:37 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r358506 - head/usr.bin/calendar/calendars X-SVN-Group: head X-SVN-Commit-Author: grog X-SVN-Commit-Paths: head/usr.bin/calendar/calendars X-SVN-Commit-Revision: 358506 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages 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, 01 Mar 2020 22:10:37 -0000 Author: grog Date: Sun Mar 1 22:10:37 2020 New Revision: 358506 URL: https://svnweb.freebsd.org/changeset/base/358506 Log: Remove comment about Blackthorn winds, apparently imported from 4.4BSD Lite. Nowadays it's trivial to find the explanation, such as at https://www.deseret.com/2000/2/27/19493013/blackthorn-winds-make-bushes-bud. It doesn't seem appropriate to replace it with an explanation. Modified: head/usr.bin/calendar/calendars/calendar.history Modified: head/usr.bin/calendar/calendars/calendar.history ============================================================================== --- head/usr.bin/calendar/calendars/calendar.history Sun Mar 1 22:09:11 2020 (r358505) +++ head/usr.bin/calendar/calendars/calendar.history Sun Mar 1 22:10:37 2020 (r358506) @@ -70,7 +70,7 @@ 02/29 French and Indian raid on Deerfield MA, 1704 03/01 Sarah Goode, Sarah Osborne, and Tituba arrested for witchcraft in Salem, Massachusetts, 1692 -03/02 Blackthorn winds (New England) (Does anyone know what this is?) +03/02 Blackthorn winds (New England) 03/04 First meeting of Congress, 1789, in N.Y.C. 03/13 "Striptease" introduced, Paris, 1894 03/14 Teddy Roosevelt excludes Japanese laborers from continental US, 1907 From owner-svn-src-all@freebsd.org Sun Mar 1 22:10:53 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id CB6F325003E; Sun, 1 Mar 2020 22:10:53 +0000 (UTC) (envelope-from markjdb@gmail.com) Received: from mail-qt1-x841.google.com (mail-qt1-x841.google.com [IPv6:2607:f8b0:4864:20::841]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1O1" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 48VyCK2s9cz3MQF; Sun, 1 Mar 2020 22:10:53 +0000 (UTC) (envelope-from markjdb@gmail.com) Received: by mail-qt1-x841.google.com with SMTP id v22so2610818qtp.10; Sun, 01 Mar 2020 14:10:53 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=tbIZi4rxEzwy1XLFVcv+DE+zH44CJZnzsWhr0vmRRn8=; b=p4icAgZBc1CN6wNPmQFO2E9nIK58lszTTBXdq/P8zbkBw/lQY1++/cK3ytJhR2n26K o7Sa0rdVq509Sion44sMa/50jvMyf89j63/gPGhNmYGGfyZFYClwmb6xqa7uDPZPfWIh XWB2Z15AutaUX46u0zTbh06F+IADKZFJ9JkQuxyYZr6l2sABUV62rhieFWZiAr3x/LpQ ZygwVafofhmhJ6qcg9PTkKapaNuTDd81XfIWWW+WGepRtkI8ALRL9NS9CQN99xJhtGNh vjwrAin+ZBh7tnEnASEMDYSFb0xVD4bZJ+7o0T+uBDbGnaBBc3yPeXBc1Uqv2qCBnKu7 kU1A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:date:from:to:cc:subject:message-id :references:mime-version:content-disposition:in-reply-to; bh=tbIZi4rxEzwy1XLFVcv+DE+zH44CJZnzsWhr0vmRRn8=; b=WrKqvlegnP8JHa4KPUPA4YGMuxoN2u/YCCYYPuwmwo6g1mDLQk/kALDBaoYAHXFF1j p+xt6gCNMBAJZ7rVKltzulvq6hzTqQSIfKxAWaQZt0Xko8ddCwfXJ1o+M4rzlSgm5W4L AvVVW+Kmk82tHR13oNyXMajUG4PkK2iFK6j9riOxgqk9m+ivTUiRLs0TXy6d4exMYjQy INuUbqIau+4vukehdu0XKxWkaWgwtWoAqYj3Mk/khniQcGMMJytAtvb5kdP8KDUgQc6+ BGicSgHj4ulVKgI/BXJaOOwWf/zzwqmBp8L6jx60R+b6aGKEtRADUhpSxT8MvUofOZPz 3N5Q== X-Gm-Message-State: APjAAAURplYmUqJ8j35pbkEPBsTzhiKhCQFMCEWPCmK7AbjnjJT53+lh M1TbnoyAjLMt/BZo2FxPGIWI5gRY X-Google-Smtp-Source: APXvYqw6r9hpb34D6sqJEP2GB12ZrodBUYrkxMDhgA6YjNDCtf10AY3AkFtTJC4hei9ZtRLvRTJGPA== X-Received: by 2002:ac8:1673:: with SMTP id x48mr13099523qtk.201.1583100652250; Sun, 01 Mar 2020 14:10:52 -0800 (PST) Received: from raichu (toroon0560w-lp130-11-70-50-21-248.dsl.bell.ca. [70.50.21.248]) by smtp.gmail.com with ESMTPSA id f12sm738616qkm.13.2020.03.01.14.10.51 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 01 Mar 2020 14:10:51 -0800 (PST) Sender: Mark Johnston Date: Sun, 1 Mar 2020 17:10:49 -0500 From: Mark Johnston To: Jan Beich Cc: Emmanuel Vadot , Jeff Roberson , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r358363 - head/sys/vm Message-ID: <20200301221049.GB33873@raichu> References: <202002270237.01R2bRLJ023799@repo.freebsd.org> <20200229212411.1e6aed2d49d6644937b78452@bidouilliste.com> <20200301212537.GA33873@raichu> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Rspamd-Queue-Id: 48VyCK2s9cz3MQF X-Spamd-Bar: ----- Authentication-Results: mx1.freebsd.org; none X-Spamd-Result: default: False [-5.99 / 15.00]; NEURAL_HAM_MEDIUM(-0.99)[-0.989,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: Sun, 01 Mar 2020 22:10:53 -0000 On Sun, Mar 01, 2020 at 10:58:17PM +0100, Jan Beich wrote: > Mark Johnston writes: > > > On Sat, Feb 29, 2020 at 09:24:11PM +0100, Emmanuel Vadot wrote: > > > >> > >> Hi Jeff, > >> > >> On Thu, 27 Feb 2020 02:37:27 +0000 (UTC) > >> Jeff Roberson wrote: > >> > >> > Author: jeff > >> > Date: Thu Feb 27 02:37:27 2020 > >> > New Revision: 358363 > >> > URL: https://svnweb.freebsd.org/changeset/base/358363 > >> > > >> > Log: > >> > Add unlocked grab* function variants that use lockless radix code to > >> > lookup pages. These variants will fall back to their locked counterparts > >> > if the page is not present. > >> > > >> > Discussed with: kib, markj > >> > Differential Revision: https://reviews.freebsd.org/D23449 > >> > > >> > Modified: > >> > head/sys/vm/vm_page.c > >> > head/sys/vm/vm_page.h > >> > > >> > >> We're (jbeich@ and me) seeing wired memory leak since this commit. > >> A simple way to reproduce is to have drm-kmod (either 4.16 or 5.0) and > >> liba-intel-driver/libva-intel-media-driver and start mpv in a loop : > >> > >> while mpv --hwdec=vaapi --start=10.0 --end=10.1 /path/to/file ; do > >> done > >> > >> Reverting this commit on one of my test machine shows that this is the > >> culprit. > >> If you need anymore info/debug let me know. > >> > >> Thanks. > > > > Could you give this patch a try? > > > > diff --git a/sys/vm/vm_page.c b/sys/vm/vm_page.c > > index 9d50881ed27e..41e7a5bb3099 100644 > > --- a/sys/vm/vm_page.c > > +++ b/sys/vm/vm_page.c > > @@ -4535,7 +4535,8 @@ vm_page_grab_valid(vm_page_t *mp, vm_object_t object, vm_pindex_t pindex, int al > > (VM_ALLOC_NOWAIT | VM_ALLOC_WAITFAIL | VM_ALLOC_ZERO)) == 0, > > ("vm_page_grab_valid: Invalid flags 0x%X", allocflags)); > > VM_OBJECT_ASSERT_WLOCKED(object); > > - pflags = allocflags & ~(VM_ALLOC_NOBUSY | VM_ALLOC_SBUSY); > > + pflags = allocflags & ~(VM_ALLOC_NOBUSY | VM_ALLOC_SBUSY | > > + VM_ALLOC_WIRED); > > pflags |= VM_ALLOC_WAITFAIL; > > > > retrylookup: > > I confirm, the patch fixes the issue. After trying to reproduce for a > few minutes Wired doesn't grow several times larger than ARC Total. Thanks, committed in r358505. From owner-svn-src-all@freebsd.org Sun Mar 1 23:01:38 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 29A7F250FF4; Sun, 1 Mar 2020 23:01:38 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.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 48VzKt0Pqqz47CN; Sun, 1 Mar 2020 23:01:38 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 07AE3B065; Sun, 1 Mar 2020 23:01:38 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 021N1bnV084002; Sun, 1 Mar 2020 23:01:37 GMT (envelope-from imp@FreeBSD.org) Received: (from imp@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 021N1biZ084001; Sun, 1 Mar 2020 23:01:37 GMT (envelope-from imp@FreeBSD.org) Message-Id: <202003012301.021N1biZ084001@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: imp set sender to imp@FreeBSD.org using -f From: Warner Losh Date: Sun, 1 Mar 2020 23:01:37 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r358507 - head/sys/nlm X-SVN-Group: head X-SVN-Commit-Author: imp X-SVN-Commit-Paths: head/sys/nlm X-SVN-Commit-Revision: 358507 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages 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, 01 Mar 2020 23:01:38 -0000 Author: imp Date: Sun Mar 1 23:01:37 2020 New Revision: 358507 URL: https://svnweb.freebsd.org/changeset/base/358507 Log: Remove stale FreeBSD_version checks. Modified: head/sys/nlm/nlm_prot_impl.c Modified: head/sys/nlm/nlm_prot_impl.c ============================================================================== --- head/sys/nlm/nlm_prot_impl.c Sun Mar 1 22:10:37 2020 (r358506) +++ head/sys/nlm/nlm_prot_impl.c Sun Mar 1 23:01:37 2020 (r358507) @@ -40,9 +40,7 @@ __FBSDID("$FreeBSD$"); #include #include #include -#if __FreeBSD_version >= 700000 #include -#endif #include #include #include @@ -1688,11 +1686,7 @@ sys_nlm_syscall(struct thread *td, struct nlm_syscall_ { int error; -#if __FreeBSD_version >= 700000 error = priv_check(td, PRIV_NFS_LOCKD); -#else - error = suser(td); -#endif if (error) return (error); @@ -1797,11 +1791,7 @@ nlm_get_vfs_state(struct nlm_host *host, struct svc_re goto out; } -#if __FreeBSD_version < 800011 - VOP_UNLOCK(vs->vs_vp, 0, curthread); -#else VOP_UNLOCK(vs->vs_vp); -#endif vs->vs_vnlocked = FALSE; out: From owner-svn-src-all@freebsd.org Sun Mar 1 23:01:47 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id C3A4E251073; Sun, 1 Mar 2020 23:01:47 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.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 48VzL34sFfz47Ht; Sun, 1 Mar 2020 23:01:47 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 9E1E3B073; Sun, 1 Mar 2020 23:01:47 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 021N1l5h084794; Sun, 1 Mar 2020 23:01:47 GMT (envelope-from imp@FreeBSD.org) Received: (from imp@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 021N1ljn084793; Sun, 1 Mar 2020 23:01:47 GMT (envelope-from imp@FreeBSD.org) Message-Id: <202003012301.021N1ljn084793@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: imp set sender to imp@FreeBSD.org using -f From: Warner Losh Date: Sun, 1 Mar 2020 23:01:47 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r358508 - head/sys/cam/ctl X-SVN-Group: head X-SVN-Commit-Author: imp X-SVN-Commit-Paths: head/sys/cam/ctl X-SVN-Commit-Revision: 358508 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages 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, 01 Mar 2020 23:01:47 -0000 Author: imp Date: Sun Mar 1 23:01:47 2020 New Revision: 358508 URL: https://svnweb.freebsd.org/changeset/base/358508 Log: Remove pre-FreeBSD 11 compat code. Modified: head/sys/cam/ctl/ctl_ha.c Modified: head/sys/cam/ctl/ctl_ha.c ============================================================================== --- head/sys/cam/ctl/ctl_ha.c Sun Mar 1 23:01:37 2020 (r358507) +++ head/sys/cam/ctl/ctl_ha.c Sun Mar 1 23:01:47 2020 (r358508) @@ -66,68 +66,6 @@ __FBSDID("$FreeBSD$"); #include #include -#if (__FreeBSD_version < 1100000) -struct mbufq { - struct mbuf *head; - struct mbuf *tail; -}; - -static void -mbufq_init(struct mbufq *q, int limit) -{ - - q->head = q->tail = NULL; -} - -static void -mbufq_drain(struct mbufq *q) -{ - struct mbuf *m; - - while ((m = q->head) != NULL) { - q->head = m->m_nextpkt; - m_freem(m); - } - q->tail = NULL; -} - -static struct mbuf * -mbufq_dequeue(struct mbufq *q) -{ - struct mbuf *m; - - m = q->head; - if (m) { - if (q->tail == m) - q->tail = NULL; - q->head = m->m_nextpkt; - m->m_nextpkt = NULL; - } - return (m); -} - -static void -mbufq_enqueue(struct mbufq *q, struct mbuf *m) -{ - - m->m_nextpkt = NULL; - if (q->tail) - q->tail->m_nextpkt = m; - else - q->head = m; - q->tail = m; -} - -static u_int -sbavail(struct sockbuf *sb) -{ - return (sb->sb_cc); -} - -#if (__FreeBSD_version < 1000000) -#define mtodo(m, o) ((void *)(((m)->m_data) + (o))) -#endif -#endif struct ha_msg_wire { uint32_t channel; From owner-svn-src-all@freebsd.org Sun Mar 1 23:01:52 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 468952511FA; Sun, 1 Mar 2020 23:01:52 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.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 48VzL810dMz47Mp; Sun, 1 Mar 2020 23:01:52 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 1AD0CB07B; Sun, 1 Mar 2020 23:01:52 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 021N1pcr084847; Sun, 1 Mar 2020 23:01:51 GMT (envelope-from imp@FreeBSD.org) Received: (from imp@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 021N1pFm084846; Sun, 1 Mar 2020 23:01:51 GMT (envelope-from imp@FreeBSD.org) Message-Id: <202003012301.021N1pFm084846@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: imp set sender to imp@FreeBSD.org using -f From: Warner Losh Date: Sun, 1 Mar 2020 23:01:51 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r358509 - head/sys/rpc X-SVN-Group: head X-SVN-Commit-Author: imp X-SVN-Commit-Paths: head/sys/rpc X-SVN-Commit-Revision: 358509 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages 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, 01 Mar 2020 23:01:52 -0000 Author: imp Date: Sun Mar 1 23:01:51 2020 New Revision: 358509 URL: https://svnweb.freebsd.org/changeset/base/358509 Log: Remove obsolete old-freebsd version compat shim. Modified: head/sys/rpc/rpc_generic.c Modified: head/sys/rpc/rpc_generic.c ============================================================================== --- head/sys/rpc/rpc_generic.c Sun Mar 1 23:01:47 2020 (r358508) +++ head/sys/rpc/rpc_generic.c Sun Mar 1 23:01:51 2020 (r358509) @@ -67,10 +67,6 @@ __FBSDID("$FreeBSD$"); extern u_long sb_max_adj; /* not defined in socketvar.h */ -#if __FreeBSD_version < 700000 -#define strrchr rindex -#endif - /* Provide an entry point hook for the rpcsec_gss module. */ struct rpc_gss_entries rpc_gss_entries; From owner-svn-src-all@freebsd.org Mon Mar 2 00:23:32 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 159D8253A62; Mon, 2 Mar 2020 00:23:32 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.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 48W18M6bLSz4DTX; Mon, 2 Mar 2020 00:23:31 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id DBCA6C111; Mon, 2 Mar 2020 00:23:31 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 0220NV3P032262; Mon, 2 Mar 2020 00:23:31 GMT (envelope-from imp@FreeBSD.org) Received: (from imp@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 0220NVFo032261; Mon, 2 Mar 2020 00:23:31 GMT (envelope-from imp@FreeBSD.org) Message-Id: <202003020023.0220NVFo032261@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: imp set sender to imp@FreeBSD.org using -f From: Warner Losh Date: Mon, 2 Mar 2020 00:23:31 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r358510 - head/sys/conf X-SVN-Group: head X-SVN-Commit-Author: imp X-SVN-Commit-Paths: head/sys/conf X-SVN-Commit-Revision: 358510 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages 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, 02 Mar 2020 00:23:32 -0000 Author: imp Date: Mon Mar 2 00:23:31 2020 New Revision: 358510 URL: https://svnweb.freebsd.org/changeset/base/358510 Log: Remove BROOKTREE_ALLOC_PAGES now that bktr is now gone. Modified: head/sys/conf/NOTES Modified: head/sys/conf/NOTES ============================================================================== --- head/sys/conf/NOTES Sun Mar 1 23:01:51 2020 (r358509) +++ head/sys/conf/NOTES Mon Mar 2 00:23:31 2020 (r358510) @@ -2755,11 +2755,6 @@ options RACCT options RCTL # Yet more undocumented options for linting. -# BKTR_ALLOC_PAGES has no effect except to cause warnings, and -# BROOKTREE_ALLOC_PAGES hasn't actually been superseded by it, since the -# driver still mostly spells this option BROOKTREE_ALLOC_PAGES. -##options BKTR_ALLOC_PAGES=(217*4+1) -options BROOKTREE_ALLOC_PAGES=(217*4+1) options MAXFILES=999 # Random number generator From owner-svn-src-all@freebsd.org Mon Mar 2 02:12:58 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id BEBF8255FBD; Mon, 2 Mar 2020 02:12:58 +0000 (UTC) (envelope-from mm@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 48W3Zf5PR0z3y9R; Mon, 2 Mar 2020 02:12:58 +0000 (UTC) (envelope-from mm@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 9AA37D4F7; Mon, 2 Mar 2020 02:12:58 +0000 (UTC) (envelope-from mm@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 0222Cwbj097846; Mon, 2 Mar 2020 02:12:58 GMT (envelope-from mm@FreeBSD.org) Received: (from mm@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 0222CrZ0097819; Mon, 2 Mar 2020 02:12:53 GMT (envelope-from mm@FreeBSD.org) Message-Id: <202003020212.0222CrZ0097819@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mm set sender to mm@FreeBSD.org using -f From: Martin Matuska Date: Mon, 2 Mar 2020 02:12:53 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r358511 - in vendor/libarchive/dist: . .github/workflows build build/ci/cirrus_ci build/ci/github_actions build/release cpio cpio/test libarchive libarchive/test X-SVN-Group: vendor X-SVN-Commit-Author: mm X-SVN-Commit-Paths: in vendor/libarchive/dist: . .github/workflows build build/ci/cirrus_ci build/ci/github_actions build/release cpio cpio/test libarchive libarchive/test X-SVN-Commit-Revision: 358511 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages 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, 02 Mar 2020 02:12:58 -0000 Author: mm Date: Mon Mar 2 02:12:53 2020 New Revision: 358511 URL: https://svnweb.freebsd.org/changeset/base/358511 Log: Update vendor/libarchive/dist to git 85b9f665b6a2d4397fdd38992152d011265e374b Relevant vendor changes: Issue #1257: Add testcase for ZIPX files with LZMA_STREAM_END marker PR #1331: cpio.5: fix hard link description Issue #1335: archive_read.c: fix UBSan warning about undefined behavior Issue #1338: XAR reader: fix UBSan warning about undefined behavior Issue #1339: bsdcpio_test: fix datatype in from_hex() Issue #1341: Safe writes: delete temporary file if rename fails Added: vendor/libarchive/dist/build/ci/cirrus_ci/Dockerfile.fc31 - copied, changed from r358510, vendor/libarchive/dist/build/ci/cirrus_ci/Dockerfile.fc30 vendor/libarchive/dist/build/ci/cirrus_ci/Dockerfile.fc31.distcheck - copied, changed from r358510, vendor/libarchive/dist/build/ci/cirrus_ci/Dockerfile.fc30.distcheck vendor/libarchive/dist/libarchive/test/test_read_format_zip_lzma_stream_end.zipx.uu Deleted: vendor/libarchive/dist/build/ci/cirrus_ci/Dockerfile.fc30 vendor/libarchive/dist/build/ci/cirrus_ci/Dockerfile.fc30.distcheck Modified: vendor/libarchive/dist/.cirrus.yml vendor/libarchive/dist/.github/workflows/ci.yml vendor/libarchive/dist/CMakeLists.txt vendor/libarchive/dist/Makefile.am vendor/libarchive/dist/build/ci/cirrus_ci/ci.sh vendor/libarchive/dist/build/ci/github_actions/ci.cmd vendor/libarchive/dist/build/release/Dockerfile vendor/libarchive/dist/build/version vendor/libarchive/dist/configure.ac vendor/libarchive/dist/cpio/cpio.c vendor/libarchive/dist/cpio/cpio.h vendor/libarchive/dist/cpio/test/test_format_newc.c vendor/libarchive/dist/libarchive/archive.h vendor/libarchive/dist/libarchive/archive_entry.h vendor/libarchive/dist/libarchive/archive_read.c vendor/libarchive/dist/libarchive/archive_read_open_filename.c vendor/libarchive/dist/libarchive/archive_read_support_format_xar.c vendor/libarchive/dist/libarchive/archive_write_disk_posix.c vendor/libarchive/dist/libarchive/archive_write_disk_windows.c vendor/libarchive/dist/libarchive/archive_write_set_format.c vendor/libarchive/dist/libarchive/archive_write_set_format_xar.c vendor/libarchive/dist/libarchive/cpio.5 vendor/libarchive/dist/libarchive/test/test_read_format_zip.c Modified: vendor/libarchive/dist/.cirrus.yml ============================================================================== --- vendor/libarchive/dist/.cirrus.yml Mon Mar 2 00:23:31 2020 (r358510) +++ vendor/libarchive/dist/.cirrus.yml Mon Mar 2 02:12:53 2020 (r358511) @@ -26,27 +26,6 @@ FreeBSD_task: install_script: - ./build/ci/build.sh -a install -Fedora_30_task: - container: - dockerfile: build/ci/cirrus_ci/Dockerfile.fc30 - env: - matrix: - - BS: autotools - - BS: cmake - matrix: - - CRYPTO: mbedtls - - CRYPTO: nettle - - CRYPTO: openssl - configure_script: - - ./build/ci/build.sh -a autogen - - ./build/ci/build.sh -a configure - build_script: - - ./build/ci/build.sh -a build - test_script: - - ./build/ci/build.sh -a test - install_script: - - ./build/ci/build.sh -a install - Windows_Cygwin_task: windows_container: image: cirrusci/windowsservercore:2019 Modified: vendor/libarchive/dist/.github/workflows/ci.yml ============================================================================== --- vendor/libarchive/dist/.github/workflows/ci.yml Mon Mar 2 00:23:31 2020 (r358510) +++ vendor/libarchive/dist/.github/workflows/ci.yml Mon Mar 2 02:12:53 2020 (r358511) @@ -51,7 +51,7 @@ jobs: steps: - uses: actions/checkout@master - name: Install dependencies - run: sudo apt-get install -y build-essential cmake libssl-dev nettle-dev libmbedtls-dev libacl1-dev libbz2-dev liblzma-dev libzip-dev liblz4-dev libzstd-dev lzop + run: sudo apt-get install -y build-essential cmake libssl-dev nettle-dev libmbedtls-dev libacl1-dev libbz2-dev liblzma-dev liblz4-dev libzstd-dev lzop - name: Autogen run: ./build/ci/build.sh -a autogen env: @@ -87,7 +87,7 @@ jobs: steps: - uses: actions/checkout@master - name: Install dependencies - run: sudo apt-get install -y build-essential cmake libssl-dev libacl1-dev libbz2-dev liblzma-dev libzip-dev liblz4-dev libzstd-dev lzop groff ghostscript + run: sudo apt-get install -y build-essential cmake libssl-dev libacl1-dev libbz2-dev liblzma-dev liblz4-dev libzstd-dev lzop groff ghostscript - name: Autogen run: ./build/ci/build.sh -a autogen - name: Configure Modified: vendor/libarchive/dist/CMakeLists.txt ============================================================================== --- vendor/libarchive/dist/CMakeLists.txt Mon Mar 2 00:23:31 2020 (r358510) +++ vendor/libarchive/dist/CMakeLists.txt Mon Mar 2 02:12:53 2020 (r358511) @@ -18,7 +18,7 @@ endif() # RelWithDebInfo : Release build with Debug Info # MinSizeRel : Release Min Size build IF(NOT CMAKE_BUILD_TYPE) - SET(CMAKE_BUILD_TYPE "Release" CACHE STRING "Build Type" FORCE) + SET(CMAKE_BUILD_TYPE "Debug" CACHE STRING "Build Type" FORCE) ENDIF(NOT CMAKE_BUILD_TYPE) # Set a value type to properly display CMAKE_BUILD_TYPE on GUI if the # value type is "UNINITIALIZED". Modified: vendor/libarchive/dist/Makefile.am ============================================================================== --- vendor/libarchive/dist/Makefile.am Mon Mar 2 00:23:31 2020 (r358510) +++ vendor/libarchive/dist/Makefile.am Mon Mar 2 02:12:53 2020 (r358511) @@ -915,6 +915,7 @@ libarchive_test_EXTRA_DIST=\ libarchive/test/test_read_format_zip_lzma.zipx.uu \ libarchive/test/test_read_format_zip_lzma_alone_leak.zipx.uu \ libarchive/test/test_read_format_zip_lzma_multi.zipx.uu \ + libarchive/test/test_read_format_zip_lzma_stream_end.zipx.uu \ libarchive/test/test_read_format_zip_jar.jar.uu \ libarchive/test/test_read_format_zip_mac_metadata.zip.uu \ libarchive/test/test_read_format_zip_malformed1.zip.uu \ Copied and modified: vendor/libarchive/dist/build/ci/cirrus_ci/Dockerfile.fc31 (from r358510, vendor/libarchive/dist/build/ci/cirrus_ci/Dockerfile.fc30) ============================================================================== --- vendor/libarchive/dist/build/ci/cirrus_ci/Dockerfile.fc30 Mon Mar 2 00:23:31 2020 (r358510, copy source) +++ vendor/libarchive/dist/build/ci/cirrus_ci/Dockerfile.fc31 Mon Mar 2 02:12:53 2020 (r358511) @@ -1,3 +1,3 @@ -FROM fedora:30 +FROM fedora:31 -RUN dnf -y install make cmake gcc gcc-c++ kernel-devel automake libtool bison sharutils pkgconf libacl-devel libasan librichacl-devel bzip2-devel libzip-devel zlib-devel xz-devel lz4-devel libzstd-devel openssl-devel nettle-devel mbedtls-devel +RUN dnf -y install make cmake gcc gcc-c++ kernel-devel automake libtool bison sharutils pkgconf libacl-devel libasan librichacl-devel bzip2-devel zlib-devel xz-devel lz4-devel libzstd-devel openssl-devel nettle-devel mbedtls-devel Copied and modified: vendor/libarchive/dist/build/ci/cirrus_ci/Dockerfile.fc31.distcheck (from r358510, vendor/libarchive/dist/build/ci/cirrus_ci/Dockerfile.fc30.distcheck) ============================================================================== --- vendor/libarchive/dist/build/ci/cirrus_ci/Dockerfile.fc30.distcheck Mon Mar 2 00:23:31 2020 (r358510, copy source) +++ vendor/libarchive/dist/build/ci/cirrus_ci/Dockerfile.fc31.distcheck Mon Mar 2 02:12:53 2020 (r358511) @@ -1,3 +1,3 @@ -FROM fedora:30 +FROM fedora:31 -RUN dnf -y install make cmake gcc gcc-c++ kernel-devel automake libtool bison sharutils pkgconf libacl-devel libasan librichacl-devel bzip2-devel libzip-devel zlib-devel xz-devel lz4-devel libzstd-devel openssl-devel groff ghostscript xz zip +RUN dnf -y install make cmake gcc gcc-c++ kernel-devel automake libtool bison sharutils pkgconf libacl-devel libasan librichacl-devel bzip2-devel zlib-devel xz-devel lz4-devel libzstd-devel openssl-devel groff ghostscript xz zip Modified: vendor/libarchive/dist/build/ci/cirrus_ci/ci.sh ============================================================================== --- vendor/libarchive/dist/build/ci/cirrus_ci/ci.sh Mon Mar 2 00:23:31 2020 (r358510) +++ vendor/libarchive/dist/build/ci/cirrus_ci/ci.sh Mon Mar 2 02:12:53 2020 (r358511) @@ -5,7 +5,9 @@ then if [ "${UNAME}" = "FreeBSD" ] then set -x -e + env ASSUME_ALWAYS_YES=yes pkg bootstrap -f sed -i.bak -e 's,pkg+http://pkg.FreeBSD.org/\${ABI}/quarterly,pkg+http://pkg.FreeBSD.org/\${ABI}/latest,' /etc/pkg/FreeBSD.conf + pkg update mount -u -o acls / mkdir /tmp_acl_nfsv4 MD=`mdconfig -a -t swap -s 128M` @@ -27,10 +29,10 @@ then if [ -f "/etc/debian_version" ] then apt-get -y update - apt-get -y install build-essential locales automake libtool bison sharutils pkgconf libacl1-dev libbz2-dev libzip-dev zlib1g-dev liblzma-dev liblz4-dev libzstd-dev libssl-dev lrzip cmake + apt-get -y install build-essential locales automake libtool bison sharutils pkgconf libacl1-dev libbz2-dev zlib1g-dev liblzma-dev liblz4-dev libzstd-dev libssl-dev lrzip cmake elif [ -f "/etc/fedora-release" ] then - dnf -y install make cmake gcc gcc-c++ kernel-devel automake libtool bison sharutils pkgconf libacl-devel librichacl-devel bzip2-devel libzip-devel zlib-devel xz-devel lz4-devel libzstd-devel openssl-devel + dnf -y install make cmake gcc gcc-c++ kernel-devel automake libtool bison sharutils pkgconf libacl-devel librichacl-devel bzip2-devel zlib-devel xz-devel lz4-devel libzstd-devel openssl-devel fi fi elif [ "$1" = "test" ] Modified: vendor/libarchive/dist/build/ci/github_actions/ci.cmd ============================================================================== --- vendor/libarchive/dist/build/ci/github_actions/ci.cmd Mon Mar 2 00:23:31 2020 (r358510) +++ vendor/libarchive/dist/build/ci/github_actions/ci.cmd Mon Mar 2 02:12:53 2020 (r358511) @@ -1,6 +1,7 @@ @ECHO OFF SET ZLIB_VERSION=1.2.11 SET BZIP2_VERSION=b7a672291188a6469f71dd13ad14f2f9a7344fc8 +SET XZ_VERSION=292a5c0f9c9b3a66f5a5c652dc46381836d4537f IF NOT "%BE%"=="mingw-gcc" ( IF NOT "%BE%"=="msvc" ( ECHO Environment variable BE must be mingw-gcc or msvc @@ -19,17 +20,29 @@ IF "%1"=="deplibs" ( ) CD build_ci\libs IF NOT EXIST zlib-%ZLIB_VERSION%.zip ( - curl -L -o zlib-%ZLIB_VERSION%.zip https://github.com/libarchive/zlib/archive/v%ZLIB_VERSION%.zip + ECHO Downloading https://github.com/libarchive/zlib/archive/v%ZLIB_VERSION%.zip + curl -L -o zlib-%ZLIB_VERSION%.zip https://github.com/libarchive/zlib/archive/v%ZLIB_VERSION%.zip || EXIT /b 1 ) IF NOT EXIST zlib-%ZLIB_VERSION% ( - tar -x -f zlib-%ZLIB_VERSION%.zip + ECHO Unpacking zlib-%ZLIB_VERSION%.zip + C:\windows\system32\tar.exe -x -f zlib-%ZLIB_VERSION%.zip || EXIT /b 1 ) IF NOT EXIST bzip2-%BZIP2_VERSION%.zip ( - curl -L -o bzip2-%BZIP2_VERSION%.zip https://github.com/libarchive/bzip2/archive/%BZIP2_VERSION%.zip + echo Downloading https://github.com/libarchive/bzip2/archive/%BZIP2_VERSION%.zip + curl -L -o bzip2-%BZIP2_VERSION%.zip https://github.com/libarchive/bzip2/archive/%BZIP2_VERSION%.zip || EXIT /b 1 ) IF NOT EXIST bzip2-%BZIP2_VERSION% ( - tar -x -f bzip2-%BZIP2_VERSION%.zip + echo Unpacking bzip2-%BZIP2_VERSION%.zip + C:\windows\system32\tar.exe -x -f bzip2-%BZIP2_VERSION%.zip || EXIT /b 1 ) + IF NOT EXIST xz-%XZ_VERSION%.zip ( + echo Downloading https://github.com/libarchive/xz/archive/%XZ_VERSION%.zip + curl -L -o xz-%XZ_VERSION%.zip https://github.com/libarchive/xz/archive/%XZ_VERSION%.zip || EXIT /b 1 + ) + IF NOT EXIST xz-%XZ_VERSION% ( + echo Unpacking xz-%XZ_VERSION%.zip + C:\windows\system32\tar.exe -x -f xz-%XZ_VERSION%.zip || EXIT /b 1 + ) CD zlib-%ZLIB_VERSION% IF "%BE%"=="mingw-gcc" ( SET PATH=%MINGWPATH% @@ -58,16 +71,27 @@ IF "%1"=="deplibs" ( cmake --build . --target INSTALL --config Release || EXIT /b 1 ) CD .. + CD xz-%XZ_VERSION% + IF "%BE%"=="mingw-gcc" ( + SET PATH=%MINGWPATH% + cmake -G "MinGW Makefiles" -D CMAKE_BUILD_TYPE="Release" . || EXIT /b 1 + mingw32-make || EXIT /b 1 + mingw32-make install || EXIT /b 1 + ) ELSE IF "%BE%"=="msvc" ( + cmake -G "Visual Studio 16 2019" -D CMAKE_BUILD_TYPE="Release" . || EXIT /b 1 + cmake --build . --target ALL_BUILD --config Release || EXIT /b 1 + cmake --build . --target INSTALL --config Release || EXIT /b 1 + ) ) ELSE IF "%1%"=="configure" ( IF "%BE%"=="mingw-gcc" ( SET PATH=%MINGWPATH% MKDIR build_ci\cmake CD build_ci\cmake - cmake -G "MinGW Makefiles" -D ZLIB_LIBRARY="C:/Program Files (x86)/zlib/lib/libzlibstatic.a" -D ZLIB_INCLUDE_DIR="C:/Program Files (x86)/zlib/include" -D BZIP2_LIBRARIES="C:/Program Files (x86)/bzip2/lib/libbz2.a" -D BZIP2_INCLUDE_DIR="C:/Program Files (x86)/bzip2/include" ..\.. || EXIT /b 1 + cmake -G "MinGW Makefiles" -D ZLIB_LIBRARY="C:/Program Files (x86)/zlib/lib/libzlibstatic.a" -D ZLIB_INCLUDE_DIR="C:/Program Files (x86)/zlib/include" -D BZIP2_LIBRARIES="C:/Program Files (x86)/bzip2/lib/libbz2.a" -D BZIP2_INCLUDE_DIR="C:/Program Files (x86)/bzip2/include" -D LIBLZMA_LIBRARY="C:/Program Files (x86)/xz/lib/liblzma.a" -D LIBLZMA_INCLUDE_DIR="C:/Program Files (x86)/xz/include" ..\.. || EXIT /b 1 ) ELSE IF "%BE%"=="msvc" ( MKDIR build_ci\cmake CD build_ci\cmake - cmake -G "Visual Studio 16 2019" -D CMAKE_BUILD_TYPE="Release" -D ZLIB_LIBRARY="C:/Program Files (x86)/zlib/lib/zlibstatic.lib" -D ZLIB_INCLUDE_DIR="C:/Program Files (x86)/zlib/include" -D BZIP2_LIBRARIES="C:/Program Files (x86)/bzip2/lib/bz2.lib" -D BZIP2_INCLUDE_DIR="C:/Program Files (x86)/bzip2/include" ..\.. || EXIT /b 1 + cmake -G "Visual Studio 16 2019" -D CMAKE_BUILD_TYPE="Release" -D ZLIB_LIBRARY="C:/Program Files (x86)/zlib/lib/zlibstatic.lib" -D ZLIB_INCLUDE_DIR="C:/Program Files (x86)/zlib/include" -D BZIP2_LIBRARIES="C:/Program Files (x86)/bzip2/lib/bz2.lib" -D BZIP2_INCLUDE_DIR="C:/Program Files (x86)/bzip2/include" -D LIBLZMA_LIBRARY="C:/Program Files (x86)/xz/lib/liblzma.lib" -D LIBLZMA_INCLUDE_DIR="C:/Program Files (x86)/xz/include" ..\.. || EXIT /b 1 ) ) ELSE IF "%1%"=="build" ( IF "%BE%"=="mingw-gcc" ( @@ -100,7 +124,7 @@ IF "%1"=="deplibs" ( cmake --build . --target INSTALL --config Release || EXIT /b 1 ) ) ELSE IF "%1"=="artifact" ( - tar -c -C "C:\Program Files (x86)" --format=zip -f libarchive.zip libarchive + C:\windows\system32\tar.exe -c -C "C:\Program Files (x86)" --format=zip -f libarchive.zip libarchive ) ELSE ( ECHO "Usage: %0% deplibs|configure|build|test|install|artifact" @EXIT /b 0 Modified: vendor/libarchive/dist/build/release/Dockerfile ============================================================================== --- vendor/libarchive/dist/build/release/Dockerfile Mon Mar 2 00:23:31 2020 (r358510) +++ vendor/libarchive/dist/build/release/Dockerfile Mon Mar 2 02:12:53 2020 (r358511) @@ -1,5 +1,5 @@ FROM ubuntu:18.04 -RUN apt-get update && apt-get install -y build-essential autoconf automake libtool pkg-config cmake libssl-dev libacl1-dev libbz2-dev liblzma-dev libzip-dev liblz4-dev libzstd-dev lzop groff ghostscript bsdmainutils zip +RUN apt-get update && apt-get install -y build-essential autoconf automake libtool pkg-config cmake libssl-dev libacl1-dev libbz2-dev liblzma-dev liblz4-dev libzstd-dev lzop groff ghostscript bsdmainutils zip ADD . $HOME/libarchive/ ADD "http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess;hb=HEAD" $HOME/libarchive/build/autoconf/config.guess ADD "http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub;hb=HEAD" $HOME/libarchive/build/autoconf/config.sub Modified: vendor/libarchive/dist/build/version ============================================================================== --- vendor/libarchive/dist/build/version Mon Mar 2 00:23:31 2020 (r358510) +++ vendor/libarchive/dist/build/version Mon Mar 2 02:12:53 2020 (r358511) @@ -1 +1 @@ -3004002 +3004003dev Modified: vendor/libarchive/dist/configure.ac ============================================================================== --- vendor/libarchive/dist/configure.ac Mon Mar 2 00:23:31 2020 (r358510) +++ vendor/libarchive/dist/configure.ac Mon Mar 2 02:12:53 2020 (r358511) @@ -4,8 +4,8 @@ dnl First, define all of the version numbers up front. dnl In particular, this allows the version macro to be used in AC_INIT dnl These first two version numbers are updated automatically on each release. -m4_define([LIBARCHIVE_VERSION_S],[3.4.2]) -m4_define([LIBARCHIVE_VERSION_N],[3004002]) +m4_define([LIBARCHIVE_VERSION_S],[3.4.3dev]) +m4_define([LIBARCHIVE_VERSION_N],[3004003]) dnl bsdtar and bsdcpio versioning tracks libarchive m4_define([BSDTAR_VERSION_S],LIBARCHIVE_VERSION_S()) Modified: vendor/libarchive/dist/cpio/cpio.c ============================================================================== --- vendor/libarchive/dist/cpio/cpio.c Mon Mar 2 00:23:31 2020 (r358510) +++ vendor/libarchive/dist/cpio/cpio.c Mon Mar 2 02:12:53 2020 (r358511) @@ -737,7 +737,7 @@ file_to_archive(struct cpio *cpio, const char *srcpath */ destpath = srcpath; if (cpio->destdir) { - len = strlen(cpio->destdir) + strlen(srcpath) + 8; + len = cpio->destdir_len + strlen(srcpath) + 8; if (len >= cpio->pass_destpath_alloc) { while (len >= cpio->pass_destpath_alloc) { cpio->pass_destpath_alloc += 512; @@ -1228,15 +1228,14 @@ mode_pass(struct cpio *cpio, const char *destdir) struct lafe_line_reader *lr; const char *p; int r; - size_t destdir_len; /* Ensure target dir has a trailing '/' to simplify path surgery. */ - destdir_len = strlen(destdir); - cpio->destdir = malloc(destdir_len + 8); - memcpy(cpio->destdir, destdir, destdir_len); - if (destdir_len == 0 || destdir[destdir_len - 1] != '/') - cpio->destdir[destdir_len++] = '/'; - cpio->destdir[destdir_len++] = '\0'; + cpio->destdir_len = strlen(destdir); + cpio->destdir = malloc(cpio->destdir_len + 8); + memcpy(cpio->destdir, destdir, cpio->destdir_len); + if (cpio->destdir_len == 0 || destdir[cpio->destdir_len - 1] != '/') + cpio->destdir[cpio->destdir_len++] = '/'; + cpio->destdir[cpio->destdir_len] = '\0'; cpio->archive = archive_write_disk_new(); if (cpio->archive == NULL) Modified: vendor/libarchive/dist/cpio/cpio.h ============================================================================== --- vendor/libarchive/dist/cpio/cpio.h Mon Mar 2 00:23:31 2020 (r358510) +++ vendor/libarchive/dist/cpio/cpio.h Mon Mar 2 02:12:53 2020 (r358511) @@ -64,6 +64,7 @@ struct cpio { int option_numeric_uid_gid; /* -n */ int option_rename; /* -r */ char *destdir; + size_t destdir_len; size_t pass_destpath_alloc; char *pass_destpath; int uid_override; Modified: vendor/libarchive/dist/cpio/test/test_format_newc.c ============================================================================== --- vendor/libarchive/dist/cpio/test/test_format_newc.c Mon Mar 2 00:23:31 2020 (r358510) +++ vendor/libarchive/dist/cpio/test/test_format_newc.c Mon Mar 2 02:12:53 2020 (r358511) @@ -49,10 +49,11 @@ is_hex(const char *p, size_t l) return (1); } -static int +/* Convert up to 8 hex characters to unsigned 32-bit decimal integer */ +static uint32_t from_hex(const char *p, size_t l) { - int r = 0; + uint32_t r = 0; while (l > 0) { r *= 16; @@ -82,11 +83,11 @@ DEFINE_TEST(test_format_newc) { FILE *list; int r; - int devmajor, devminor, ino, gid; - int uid = -1; + uint32_t devmajor, devminor, ino, gid, uid; time_t t, t2, now; char *p, *e; - size_t s, fs, ns; + size_t s; + uint64_t fs, ns; char result[1024]; assertUmask(0); @@ -199,9 +200,11 @@ DEFINE_TEST(test_format_newc) #else assertEqualInt(0x81a4, from_hex(e + 14, 8)); /* Mode */ #endif - if (uid < 0) - uid = from_hex(e + 22, 8); +#if defined(_WIN32) + uid = from_hex(e + 22, 8); +#else assertEqualInt(from_hex(e + 22, 8), uid); /* uid */ +#endif gid = from_hex(e + 30, 8); /* gid */ assertEqualMem(e + 38, "00000003", 8); /* nlink */ t = from_hex(e + 46, 8); /* mtime */ @@ -215,14 +218,14 @@ DEFINE_TEST(test_format_newc) " first appearance should be empty, so this file size\n" " field should be zero"); assertEqualInt(0, from_hex(e + 54, 8)); /* File size */ - fs = from_hex(e + 54, 8); + fs = (uint64_t)from_hex(e + 54, 8); fs += PAD(fs, 4); devmajor = from_hex(e + 62, 8); /* devmajor */ devminor = from_hex(e + 70, 8); /* devminor */ assert(is_hex(e + 78, 8)); /* rdevmajor */ assert(is_hex(e + 86, 8)); /* rdevminor */ assertEqualMem(e + 94, "00000006", 8); /* Name size */ - ns = from_hex(e + 94, 8); + ns = (uint64_t)from_hex(e + 94, 8); ns += PAD(ns + 2, 4); assertEqualInt(0, from_hex(e + 102, 8)); /* check field */ assertEqualMem(e + 110, "file1\0", 6); /* Name contents */ @@ -249,14 +252,14 @@ DEFINE_TEST(test_format_newc) " at t2=%#08jx", (intmax_t)t, (intmax_t)t2); assert(t2 == t || t2 == t + 1); /* Almost same as first entry. */ assertEqualMem(e + 54, "00000005", 8); /* File size */ - fs = from_hex(e + 54, 8); + fs = (uint64_t)from_hex(e + 54, 8); fs += PAD(fs, 4); assertEqualInt(devmajor, from_hex(e + 62, 8)); /* devmajor */ assertEqualInt(devminor, from_hex(e + 70, 8)); /* devminor */ assert(is_hex(e + 78, 8)); /* rdevmajor */ assert(is_hex(e + 86, 8)); /* rdevminor */ assertEqualMem(e + 94, "00000008", 8); /* Name size */ - ns = from_hex(e + 94, 8); + ns = (uint64_t)from_hex(e + 94, 8); ns += PAD(ns + 2, 4); assertEqualInt(0, from_hex(e + 102, 8)); /* check field */ assertEqualMem(e + 110, "symlink\0\0\0", 10); /* Name contents */ @@ -285,14 +288,14 @@ DEFINE_TEST(test_format_newc) "t2=%#08jx", (intmax_t)t, (intmax_t)t2); assert(t2 == t || t2 == t + 1); /* Almost same as first entry. */ assertEqualMem(e + 54, "00000000", 8); /* File size */ - fs = from_hex(e + 54, 8); + fs = (uint64_t)from_hex(e + 54, 8); fs += PAD(fs, 4); assertEqualInt(devmajor, from_hex(e + 62, 8)); /* devmajor */ assertEqualInt(devminor, from_hex(e + 70, 8)); /* devminor */ assert(is_hex(e + 78, 8)); /* rdevmajor */ assert(is_hex(e + 86, 8)); /* rdevminor */ assertEqualMem(e + 94, "00000004", 8); /* Name size */ - ns = from_hex(e + 94, 8); + ns = (uint64_t)from_hex(e + 94, 8); ns += PAD(ns + 2, 4); assertEqualInt(0, from_hex(e + 102, 8)); /* check field */ assertEqualMem(e + 110, "dir\0\0\0", 6); /* Name contents */ @@ -319,14 +322,14 @@ DEFINE_TEST(test_format_newc) "t2=%#08jx", (intmax_t)t, (intmax_t)t2); assert(t2 == t || t2 == t + 1); /* Almost same as first entry. */ assertEqualInt(10, from_hex(e + 54, 8)); /* File size */ - fs = from_hex(e + 54, 8); + fs = (uint64_t)from_hex(e + 54, 8); fs += PAD(fs, 4); assertEqualInt(devmajor, from_hex(e + 62, 8)); /* devmajor */ assertEqualInt(devminor, from_hex(e + 70, 8)); /* devminor */ assert(is_hex(e + 78, 8)); /* rdevmajor */ assert(is_hex(e + 86, 8)); /* rdevminor */ assertEqualMem(e + 94, "00000009", 8); /* Name size */ - ns = from_hex(e + 94, 8); + ns = (uint64_t)from_hex(e + 94, 8); ns += PAD(ns + 2, 4); assertEqualInt(0, from_hex(e + 102, 8)); /* check field */ assertEqualMem(e + 110, "hardlink\0\0", 10); /* Name contents */ Modified: vendor/libarchive/dist/libarchive/archive.h ============================================================================== --- vendor/libarchive/dist/libarchive/archive.h Mon Mar 2 00:23:31 2020 (r358510) +++ vendor/libarchive/dist/libarchive/archive.h Mon Mar 2 02:12:53 2020 (r358511) @@ -36,7 +36,7 @@ * assert that ARCHIVE_VERSION_NUMBER >= 2012108. */ /* Note: Compiler will complain if this does not match archive_entry.h! */ -#define ARCHIVE_VERSION_NUMBER 3004002 +#define ARCHIVE_VERSION_NUMBER 3004003 #include #include /* for wchar_t */ @@ -155,7 +155,7 @@ __LA_DECL int archive_version_number(void); /* * Textual name/version of the library, useful for version displays. */ -#define ARCHIVE_VERSION_ONLY_STRING "3.4.2" +#define ARCHIVE_VERSION_ONLY_STRING "3.4.3dev" #define ARCHIVE_VERSION_STRING "libarchive " ARCHIVE_VERSION_ONLY_STRING __LA_DECL const char * archive_version_string(void); Modified: vendor/libarchive/dist/libarchive/archive_entry.h ============================================================================== --- vendor/libarchive/dist/libarchive/archive_entry.h Mon Mar 2 00:23:31 2020 (r358510) +++ vendor/libarchive/dist/libarchive/archive_entry.h Mon Mar 2 02:12:53 2020 (r358511) @@ -30,7 +30,7 @@ #define ARCHIVE_ENTRY_H_INCLUDED /* Note: Compiler will complain if this does not match archive.h! */ -#define ARCHIVE_VERSION_NUMBER 3004002 +#define ARCHIVE_VERSION_NUMBER 3004003 /* * Note: archive_entry.h is for use outside of libarchive; the Modified: vendor/libarchive/dist/libarchive/archive_read.c ============================================================================== --- vendor/libarchive/dist/libarchive/archive_read.c Mon Mar 2 00:23:31 2020 (r358510) +++ vendor/libarchive/dist/libarchive/archive_read.c Mon Mar 2 02:12:53 2020 (r358511) @@ -892,15 +892,16 @@ archive_read_data(struct archive *_a, void *buff, size len = a->read_data_remaining; if (len > s) len = s; - if (len) + if (len) { memcpy(dest, a->read_data_block, len); - s -= len; - a->read_data_block += len; - a->read_data_remaining -= len; - a->read_data_output_offset += len; - a->read_data_offset += len; - dest += len; - bytes_read += len; + s -= len; + a->read_data_block += len; + a->read_data_remaining -= len; + a->read_data_output_offset += len; + a->read_data_offset += len; + dest += len; + bytes_read += len; + } } } a->read_data_is_posix_read = 0; Modified: vendor/libarchive/dist/libarchive/archive_read_open_filename.c ============================================================================== --- vendor/libarchive/dist/libarchive/archive_read_open_filename.c Mon Mar 2 00:23:31 2020 (r358510) +++ vendor/libarchive/dist/libarchive/archive_read_open_filename.c Mon Mar 2 02:12:53 2020 (r358511) @@ -221,7 +221,9 @@ file_open(struct archive *a, void *client_data) struct read_file_data *mine = (struct read_file_data *)client_data; void *buffer; const char *filename = NULL; +#if defined(_WIN32) && !defined(__CYGWIN__) const wchar_t *wfilename = NULL; +#endif int fd = -1; int is_disk_like = 0; #if defined(__FreeBSD__) || defined(__FreeBSD_kernel__) @@ -281,10 +283,12 @@ file_open(struct archive *a, void *client_data) #endif } if (fstat(fd, &st) != 0) { +#if defined(_WIN32) && !defined(__CYGWIN__) if (mine->filename_type == FNT_WCS) archive_set_error(a, errno, "Can't stat '%S'", wfilename); else +#endif archive_set_error(a, errno, "Can't stat '%s'", filename); goto fail; Modified: vendor/libarchive/dist/libarchive/archive_read_support_format_xar.c ============================================================================== --- vendor/libarchive/dist/libarchive/archive_read_support_format_xar.c Mon Mar 2 00:23:31 2020 (r358510) +++ vendor/libarchive/dist/libarchive/archive_read_support_format_xar.c Mon Mar 2 02:12:53 2020 (r358511) @@ -458,6 +458,11 @@ archive_read_support_format_xar(struct archive *_a) return (ARCHIVE_FATAL); } + /* initialize xar->file_queue */ + xar->file_queue.allocated = 0; + xar->file_queue.used = 0; + xar->file_queue.files = NULL; + r = __archive_read_register_format(a, xar, "xar", @@ -1221,10 +1226,12 @@ heap_add_entry(struct archive_read *a, /* Expand our pending files list as necessary. */ if (heap->used >= heap->allocated) { struct xar_file **new_pending_files; - int new_size = heap->allocated * 2; + int new_size; if (heap->allocated < 1024) new_size = 1024; + else + new_size = heap->allocated * 2; /* Overflow might keep us from growing the list. */ if (new_size <= heap->allocated) { archive_set_error(&a->archive, @@ -1238,9 +1245,11 @@ heap_add_entry(struct archive_read *a, ENOMEM, "Out of memory"); return (ARCHIVE_FATAL); } - memcpy(new_pending_files, heap->files, - heap->allocated * sizeof(new_pending_files[0])); - free(heap->files); + if (heap->allocated) { + memcpy(new_pending_files, heap->files, + heap->allocated * sizeof(new_pending_files[0])); + free(heap->files); + } heap->files = new_pending_files; heap->allocated = new_size; } Modified: vendor/libarchive/dist/libarchive/archive_write_disk_posix.c ============================================================================== --- vendor/libarchive/dist/libarchive/archive_write_disk_posix.c Mon Mar 2 00:23:31 2020 (r358510) +++ vendor/libarchive/dist/libarchive/archive_write_disk_posix.c Mon Mar 2 02:12:53 2020 (r358511) @@ -1654,6 +1654,7 @@ _archive_write_disk_finish_entry(struct archive *_a) { struct archive_write_disk *a = (struct archive_write_disk *)_a; int ret = ARCHIVE_OK; + int oerrno; archive_check_magic(&a->archive, ARCHIVE_WRITE_DISK_MAGIC, ARCHIVE_STATE_HEADER | ARCHIVE_STATE_DATA, @@ -1855,8 +1856,11 @@ finish_metadata: a->fd = -1; if (a->tmpname) { if (rename(a->tmpname, a->name) == -1) { + oerrno = errno; + unlink(a->tmpname); + errno = oerrno; archive_set_error(&a->archive, errno, - "rename failed"); + "Failed to safe write"); ret = ARCHIVE_FATAL; } a->tmpname = NULL; Modified: vendor/libarchive/dist/libarchive/archive_write_disk_windows.c ============================================================================== --- vendor/libarchive/dist/libarchive/archive_write_disk_windows.c Mon Mar 2 00:23:31 2020 (r358510) +++ vendor/libarchive/dist/libarchive/archive_write_disk_windows.c Mon Mar 2 02:12:53 2020 (r358511) @@ -1174,6 +1174,7 @@ _archive_write_disk_finish_entry(struct archive *_a) { struct archive_write_disk *a = (struct archive_write_disk *)_a; int ret = ARCHIVE_OK; + int oerrno; archive_check_magic(&a->archive, ARCHIVE_WRITE_DISK_MAGIC, ARCHIVE_STATE_HEADER | ARCHIVE_STATE_DATA, @@ -1281,8 +1282,11 @@ _archive_write_disk_finish_entry(struct archive *_a) /* Windows does not support atomic rename */ disk_unlink(a->name); if (_wrename(a->tmpname, a->name) != 0) { + oerrno = errno; + disk_unlink(a->tmpname); + errno = oerrno; archive_set_error(&a->archive, errno, - "rename failed"); + "Failed to safe write"); ret = ARCHIVE_FATAL; } a->tmpname = NULL; Modified: vendor/libarchive/dist/libarchive/archive_write_set_format.c ============================================================================== --- vendor/libarchive/dist/libarchive/archive_write_set_format.c Mon Mar 2 00:23:31 2020 (r358510) +++ vendor/libarchive/dist/libarchive/archive_write_set_format.c Mon Mar 2 02:12:53 2020 (r358511) @@ -82,7 +82,7 @@ void __archive_write_entry_filetype_unsupported(struct archive *a, struct archive_entry *entry, const char *format) { - char *name = NULL; + const char *name = NULL; switch (archive_entry_filetype(entry)) { /* Modified: vendor/libarchive/dist/libarchive/archive_write_set_format_xar.c ============================================================================== --- vendor/libarchive/dist/libarchive/archive_write_set_format_xar.c Mon Mar 2 00:23:31 2020 (r358510) +++ vendor/libarchive/dist/libarchive/archive_write_set_format_xar.c Mon Mar 2 02:12:53 2020 (r358511) @@ -681,7 +681,8 @@ xar_write_data(struct archive_write *a, const void *bu { struct xar *xar; enum la_zaction run; - size_t size, rsize; + size_t size = 0; + size_t rsize; int r; xar = (struct xar *)a->format_data; Modified: vendor/libarchive/dist/libarchive/cpio.5 ============================================================================== --- vendor/libarchive/dist/libarchive/cpio.5 Mon Mar 2 00:23:31 2020 (r358510) +++ vendor/libarchive/dist/libarchive/cpio.5 Mon Mar 2 02:12:53 2020 (r358511) @@ -244,7 +244,7 @@ Note that this format supports only 4 gigabyte files ( older ASCII format, which supports 8 gigabyte files). .Pp In this format, hardlinked files are handled by setting the -filesize to zero for each entry except the last one that +filesize to zero for each entry except the first one that appears in the archive. .Ss New CRC Format The CRC format is identical to the new ASCII format described Modified: vendor/libarchive/dist/libarchive/test/test_read_format_zip.c ============================================================================== --- vendor/libarchive/dist/libarchive/test/test_read_format_zip.c Mon Mar 2 00:23:31 2020 (r358510) +++ vendor/libarchive/dist/libarchive/test/test_read_format_zip.c Mon Mar 2 02:12:53 2020 (r358511) @@ -916,3 +916,53 @@ DEFINE_TEST(test_read_format_zip_lzma_alone_leak) * suite under Valgrind or ASan, the test runner won't return with * exit code 0 in case if a memory leak. */ } + +DEFINE_TEST(test_read_format_zip_lzma_stream_end) +{ + const char *refname = "test_read_format_zip_lzma_stream_end.zipx"; + struct archive *a; + struct archive_entry *ae; + + assert((a = archive_read_new()) != NULL); + if (ARCHIVE_OK != archive_read_support_filter_lzma(a)) { + skipping("lzma reading not fully supported on this platform"); + assertEqualInt(ARCHIVE_OK, archive_read_free(a)); + return; + } + extract_reference_file(refname); + + assertEqualIntA(a, ARCHIVE_OK, archive_read_support_format_zip(a)); + assertEqualIntA(a, ARCHIVE_OK, archive_read_open_filename(a, refname, 37)); + assertEqualIntA(a, ARCHIVE_OK, archive_read_next_header(a, &ae)); + assertEqualString("ZIP 6.3 (lzma)", archive_format_name(a)); + assertEqualString("vimrc", archive_entry_pathname(ae)); + assertEqualIntA(a, 0, extract_one(a, ae, 0xBA8E3BAA)); + assertEqualIntA(a, ARCHIVE_EOF, archive_read_next_header(a, &ae)); + assertEqualIntA(a, ARCHIVE_OK, archive_read_close(a)); + assertEqualIntA(a, ARCHIVE_OK, archive_read_free(a)); +} + +DEFINE_TEST(test_read_format_zip_lzma_stream_end_blockread) +{ + const char *refname = "test_read_format_zip_lzma_stream_end.zipx"; + struct archive *a; + struct archive_entry *ae; + + assert((a = archive_read_new()) != NULL); + if (ARCHIVE_OK != archive_read_support_filter_lzma(a)) { + skipping("lzma reading not fully supported on this platform"); + assertEqualInt(ARCHIVE_OK, archive_read_free(a)); + return; + } + extract_reference_file(refname); + + assertEqualIntA(a, ARCHIVE_OK, archive_read_support_format_zip(a)); + assertEqualIntA(a, ARCHIVE_OK, archive_read_open_filename(a, refname, 37)); + assertEqualIntA(a, ARCHIVE_OK, archive_read_next_header(a, &ae)); + assertEqualString("ZIP 6.3 (lzma)", archive_format_name(a)); + assertEqualString("vimrc", archive_entry_pathname(ae)); + assertEqualIntA(a, 0, extract_one_using_blocks(a, 13, 0xBA8E3BAA)); + assertEqualIntA(a, ARCHIVE_EOF, archive_read_next_header(a, &ae)); + assertEqualIntA(a, ARCHIVE_OK, archive_read_close(a)); + assertEqualIntA(a, ARCHIVE_OK, archive_read_free(a)); +} Added: vendor/libarchive/dist/libarchive/test/test_read_format_zip_lzma_stream_end.zipx.uu ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ vendor/libarchive/dist/libarchive/test/test_read_format_zip_lzma_stream_end.zipx.uu Mon Mar 2 02:12:53 2020 (r358511) @@ -0,0 +1,19 @@ +begin 664 test_read_format_zip_lzma_stream_end.zipx +M4$L#!#\``@`.`#TQD4VJ.XZZ/@(``)`#```%````=FEM)82Q1PWAL +M+U`,N0L_$]^&650C/X$D6#4QFD$\A/"_![4!O/5O/!KH`WCQ*4?T2*]4P#/D +M0'9I?EZG=N69Z0V;H0I=CP*$?".I\ +MGMG/80.A'^W>R4J'S/CZ%P`8`>F=R>R&R$2T@EM#X)"OQH1?A7,`:4IU9WV! +M#2W*DXT',;.4YIN4A:-X)O=IREL201ZSOC=YSAU[C4-::/YV8\)%"L17+>VC +M%/'B]ZCQN$2(Q*9*\KJZ`Y131`]5C&G';@1S-QES_RZF!2OX45@58+??ES%( +MUJ<(\`11M$NO)HK#/MK-9RT"15.2I:IZN8VTM1_?$G\L#BH67]$S%[4 +M%C-$\Q<+./&HV](4,7)OL-@C^M0F"2O!0N$OHOW54H87^QLBQVH*D%A<#SI% +M/#+-5U(W';:KC)RE>0Y^5YI!RECQNR"R4.UW9IR!@:B!UB8?_D5$FT8YCJHJ +M2[2"-&-_D2BJ6#XK[6G=%K"%;'^-+0]FHCY4ER#`^ Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id E3170256732; Mon, 2 Mar 2020 02:36:42 +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 48W4625f1tz3KFD; Mon, 2 Mar 2020 02:36:42 +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 AEAF5D8AB; Mon, 2 Mar 2020 02:36:42 +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 0222agtu010108; Mon, 2 Mar 2020 02:36:42 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 0222af3O010104; Mon, 2 Mar 2020 02:36:41 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <202003020236.0222af3O010104@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Mon, 2 Mar 2020 02:36:41 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r358512 - in head: tools/tools/controlelf usr.bin usr.bin/elfctl X-SVN-Group: head X-SVN-Commit-Author: emaste X-SVN-Commit-Paths: in head: tools/tools/controlelf usr.bin usr.bin/elfctl X-SVN-Commit-Revision: 358512 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages 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, 02 Mar 2020 02:36:43 -0000 Author: emaste Date: Mon Mar 2 02:36:41 2020 New Revision: 358512 URL: https://svnweb.freebsd.org/changeset/base/358512 Log: Move ELF feature note tool to usr.bin/elfctl elfctl is a tool for modifying the NT_FREEBSD_FEATURE_CTL ELF note, which contains a set of flags for enabling or disabling vulnerability mitigations and other features. Reviewed by: csjp, kib MFC after: 2 weeks Relnotes: Yes Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D23910 Added: head/usr.bin/elfctl/ - copied from r358511, head/tools/tools/controlelf/ head/usr.bin/elfctl/elfctl.1 - copied, changed from r358469, head/tools/tools/controlelf/controlelf.1 head/usr.bin/elfctl/elfctl.c - copied unchanged from r358511, head/tools/tools/controlelf/controlelf.c Deleted: head/tools/tools/controlelf/ head/usr.bin/elfctl/controlelf.1 head/usr.bin/elfctl/controlelf.c Modified: head/usr.bin/Makefile head/usr.bin/elfctl/Makefile Modified: head/usr.bin/Makefile ============================================================================== --- head/usr.bin/Makefile Mon Mar 2 02:12:53 2020 (r358511) +++ head/usr.bin/Makefile Mon Mar 2 02:36:41 2020 (r358512) @@ -31,6 +31,7 @@ SUBDIR= alias \ diff \ dirname \ du \ + elfctl \ elfdump \ enigma \ env \ Modified: head/usr.bin/elfctl/Makefile ============================================================================== --- head/tools/tools/controlelf/Makefile Mon Mar 2 02:12:53 2020 (r358511) +++ head/usr.bin/elfctl/Makefile Mon Mar 2 02:36:41 2020 (r358512) @@ -2,13 +2,10 @@ ELFTCDIR= ${SRCTOP}/contrib/elftoolchain -PROG= controlelf -SRCS= controlelf.c +PROG= elfctl LIBADD= elftc elf CFLAGS+=-I${ELFTCDIR}/libelftc -I${ELFTCDIR}/common - -WARNS?= 6 .include Copied and modified: head/usr.bin/elfctl/elfctl.1 (from r358469, head/tools/tools/controlelf/controlelf.1) ============================================================================== --- head/tools/tools/controlelf/controlelf.1 Sat Feb 29 17:24:02 2020 (r358469, copy source) +++ head/usr.bin/elfctl/elfctl.1 Mon Mar 2 02:36:41 2020 (r358512) @@ -26,11 +26,11 @@ .\" .\" $FreeBSD$ .\" -.Dd September 27, 2019 -.Dt CONTROLELF 1 +.Dd March 1, 2020 +.Dt ELFCTL 1 .Os .Sh NAME -.Nm controlelf +.Nm elfctl .Nd change an ELF binary's feature control note .Sh SYNOPSIS .Nm @@ -79,8 +79,8 @@ of the .Nm command: .Bd -literal -offset indent -controlelf file -controlelf -e +aslr file +elfctl file +elfctl -e +aslr file .Ed .Sh HISTORY .Nm Copied: head/usr.bin/elfctl/elfctl.c (from r358511, head/tools/tools/controlelf/controlelf.c) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/usr.bin/elfctl/elfctl.c Mon Mar 2 02:36:41 2020 (r358512, copy of r358511, head/tools/tools/controlelf/controlelf.c) @@ -0,0 +1,392 @@ +/*- + * SPDX-License-Identifier: BSD-2-Clause-FreeBSD + * + * Copyright (c) 2019 The FreeBSD Foundation. + * + * This software was developed by Bora Ozarslan 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: + * 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 "_elftc.h" + +__FBSDID("$FreeBSD$"); + +static bool convert_to_feature_val(char *, u_int32_t *); +static bool edit_file_features(Elf *, int, int, char *); +static bool get_file_features(Elf *, int, int, u_int32_t *, u_int64_t *); +static void print_features(void); +static bool print_file_features(Elf *, int, int, char *); +static void usage(void); + +struct ControlFeatures { + const char *alias; + unsigned long value; + const char *desc; +}; + +static struct ControlFeatures featurelist[] = { + { "aslr", NT_FREEBSD_FCTL_ASLR_DISABLE, "Disable ASLR" }, + { "protmax", NT_FREEBSD_FCTL_PROTMAX_DISABLE, + "Disable implicit PROT_MAX" }, + { "stackgap", NT_FREEBSD_FCTL_STKGAP_DISABLE, "Disable stack gap" }, +}; + +static struct option long_opts[] = { + { "help", no_argument, NULL, 'h' }, + { NULL, 0, NULL, 0 } +}; + +#if BYTE_ORDER == LITTLE_ENDIAN +#define SUPPORTED_ENDIAN ELFDATA2LSB +#else +#define SUPPORTED_ENDIAN ELFDATA2MSB +#endif + +int +main(int argc, char **argv) +{ + GElf_Ehdr ehdr; + Elf *elf; + Elf_Kind kind; + int ch, fd, editfeatures, retval; + char *features; + bool lflag; + + lflag = 0; + editfeatures = 0; + retval = 0; + + if (elf_version(EV_CURRENT) == EV_NONE) + errx(EXIT_FAILURE, "elf_version error"); + + while ((ch = getopt_long(argc, argv, "hle:", long_opts, NULL)) != -1) { + switch (ch) { + case 'l': + print_features(); + lflag = true; + break; + case 'e': + features = optarg; + editfeatures = 1; + break; + case 'h': + default: + usage(); + } + } + argc -= optind; + argv += optind; + if (argc == 0) { + if (lflag) + exit(0); + else { + warnx("no file(s) specified"); + usage(); + } + } + + while (argc) { + elf = NULL; + + if ((fd = open(argv[0], + editfeatures ? O_RDWR : O_RDONLY, 0)) < 0) { + warn("error opening file %s", argv[0]); + retval = 1; + goto fail; + } + + if ((elf = elf_begin(fd, ELF_C_READ, NULL)) == NULL) { + warnx("elf_begin failed: %s", elf_errmsg(-1)); + retval = 1; + goto fail; + } + + if ((kind = elf_kind(elf)) != ELF_K_ELF) { + if (kind == ELF_K_AR) + warnx("file '%s' is an archive", argv[0]); + else + warnx("file '%s' is not an ELF file", argv[0]); + retval = 1; + goto fail; + } + + if (gelf_getehdr(elf, &ehdr) == NULL) { + warnx("gelf_getehdr: %s", elf_errmsg(-1)); + retval = 1; + goto fail; + } + /* + * XXX need to support cross-endian operation, but for now + * exit on error rather than misbehaving. + */ + if (ehdr.e_ident[EI_DATA] != SUPPORTED_ENDIAN) { + warnx("file endianness must match host"); + retval = 1; + goto fail; + } + + if (!editfeatures) { + if (!print_file_features(elf, ehdr.e_phnum, fd, + argv[0])) { + retval = 1; + goto fail; + } + } else if (!edit_file_features(elf, ehdr.e_phnum, fd, + features)) { + retval = 1; + goto fail; + } +fail: + if (elf != NULL) + elf_end(elf); + + if (fd >= 0) + close(fd); + + argc--; + argv++; + } + + return (retval); +} + +#define USAGE_MESSAGE \ + "\ +Usage: %s [options] file...\n\ + Set or display the control features for an ELF object.\n\n\ + Supported options are:\n\ + -l List known control features.\n\ + -e [+-=]feature,list Edit features from a comma separated list.\n\ + -h | --help Print a usage message and exit.\n" + +static void +usage(void) +{ + + fprintf(stderr, USAGE_MESSAGE, ELFTC_GETPROGNAME()); + exit(1); +} + +static bool +convert_to_feature_val(char *feature_str, u_int32_t *feature_val) +{ + char *feature; + int i, len; + u_int32_t input; + char operation; + + input = 0; + operation = *feature_str; + feature_str++; + len = nitems(featurelist); + while ((feature = strsep(&feature_str, ",")) != NULL) { + for (i = 0; i < len; ++i) { + if (strcmp(featurelist[i].alias, feature) == 0) { + input |= featurelist[i].value; + break; + } + } + if (i == len) { + warnx("%s is not a valid feature", feature); + return (false); + } + } + + if (operation == '+') { + *feature_val |= input; + } else if (operation == '=') { + *feature_val = input; + } else if (operation == '-') { + *feature_val &= ~input; + } else { + warnx("'%c' not an operator - use '+', '-', '='", + feature_str[0]); + return (false); + } + return (true); +} + +static bool +edit_file_features(Elf *elf, int phcount, int fd, char *val) +{ + u_int32_t features; + u_int64_t off; + + if (!get_file_features(elf, phcount, fd, &features, &off)) { + warnx("NT_FREEBSD_FEATURE_CTL note not found"); + return (false); + } + + if (!convert_to_feature_val(val, &features)) + return (false); + + if (lseek(fd, off, SEEK_SET) == -1 || + write(fd, &features, sizeof(features)) < + (ssize_t)sizeof(features)) { + warnx("error writing feature value"); + return (false); + } + return (true); +} + +static void +print_features(void) +{ + size_t i; + + printf("Known features are:\n"); + for (i = 0; i < nitems(featurelist); ++i) + printf("%-16s%s\n", featurelist[i].alias, + featurelist[i].desc); +} + +static bool +print_file_features(Elf *elf, int phcount, int fd, char *filename) +{ + u_int32_t features; + unsigned long i; + + if (!get_file_features(elf, phcount, fd, &features, NULL)) { + return (false); + } + + printf("File '%s' features:\n", filename); + for (i = 0; i < nitems(featurelist); ++i) { + printf("%-16s'%s' is ", featurelist[i].alias, + featurelist[i].desc); + + if ((featurelist[i].value & features) == 0) + printf("un"); + + printf("set.\n"); + } + return (true); +} + +static bool +get_file_features(Elf *elf, int phcount, int fd, u_int32_t *features, + u_int64_t *off) +{ + GElf_Phdr phdr; + Elf_Note note; + unsigned long read_total; + int namesz, descsz, i; + char *name; + ssize_t size; + + /* + * Go through each program header to find one that is of type PT_NOTE + * and has a note for feature control. + */ + for (i = 0; i < phcount; ++i) { + if (gelf_getphdr(elf, i, &phdr) == NULL) { + warnx("gelf_getphdr failed: %s", elf_errmsg(-1)); + return (false); + } + + if (phdr.p_type != PT_NOTE) + continue; + + if (lseek(fd, phdr.p_offset, SEEK_SET) < 0) { + warn("lseek() failed:"); + return (false); + } + + read_total = 0; + while (read_total < phdr.p_filesz) { + size = read(fd, ¬e, sizeof(note)); + if (size < (ssize_t)sizeof(note)) { + warn("read() failed:"); + return (false); + } + read_total += sizeof(note); + + /* + * XXX: Name and descriptor are 4 byte aligned, however, + * the size given doesn't include the padding. + */ + namesz = roundup2(note.n_namesz, 4); + name = malloc(namesz); + if (name == NULL) { + warn("malloc() failed."); + return (false); + } + descsz = roundup2(note.n_descsz, 4); + size = read(fd, name, namesz); + read_total += namesz; + + if (note.n_namesz != 8 || + strncmp("FreeBSD", name, 7) != 0 || + note.n_type != NT_FREEBSD_FEATURE_CTL) { + /* Not the right note. Skip the description */ + if (lseek(fd, descsz, SEEK_CUR) < 0) { + warn("lseek() failed."); + free(name); + return (false); + } + read_total += descsz; + free(name); + continue; + } + + if (note.n_descsz < sizeof(u_int32_t)) { + warnx("Feature descriptor can't " + "be less than 4 bytes"); + free(name); + return (false); + } + + /* + * XXX: For now we look at only 4 bytes of the + * descriptor. This should respect descsz. + */ + if (note.n_descsz > sizeof(u_int32_t)) + warnx("Feature note is bigger than expected"); + read(fd, features, sizeof(u_int32_t)); + if (off != NULL) + *off = phdr.p_offset + read_total; + free(name); + return (true); + } + } + + warnx("NT_FREEBSD_FEATURE_CTL note not found"); + return (false); +} From owner-svn-src-all@freebsd.org Mon Mar 2 02:44:22 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id AD3AC256AE7; Mon, 2 Mar 2020 02:44:22 +0000 (UTC) (envelope-from philip@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 48W4Gt3DCbz3yQB; Mon, 2 Mar 2020 02:44:22 +0000 (UTC) (envelope-from philip@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id BB405DA89; Mon, 2 Mar 2020 02:44:21 +0000 (UTC) (envelope-from philip@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 0222iLv2016174; Mon, 2 Mar 2020 02:44:21 GMT (envelope-from philip@FreeBSD.org) Received: (from philip@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 0222iLTm016173; Mon, 2 Mar 2020 02:44:21 GMT (envelope-from philip@FreeBSD.org) Message-Id: <202003020244.0222iLTm016173@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: philip set sender to philip@FreeBSD.org using -f From: Philip Paeps Date: Mon, 2 Mar 2020 02:44:21 +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: r358513 - in stable/12/usr.sbin/bsdconfig: include share/media X-SVN-Group: stable-12 X-SVN-Commit-Author: philip X-SVN-Commit-Paths: in stable/12/usr.sbin/bsdconfig: include share/media X-SVN-Commit-Revision: 358513 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages 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, 02 Mar 2020 02:44:22 -0000 Author: philip Date: Mon Mar 2 02:44:21 2020 New Revision: 358513 URL: https://svnweb.freebsd.org/changeset/base/358513 Log: MFC r358418: bsdconfig: remove the Italian mirror ftp.it.FreeBSD.org has been down for several years. PR: 244481 Reported by: xgeoplasma6@gmail.com Modified: stable/12/usr.sbin/bsdconfig/include/messages.subr stable/12/usr.sbin/bsdconfig/share/media/ftp.subr Directory Properties: stable/12/ (props changed) Modified: stable/12/usr.sbin/bsdconfig/include/messages.subr ============================================================================== --- stable/12/usr.sbin/bsdconfig/include/messages.subr Mon Mar 2 02:36:41 2020 (r358512) +++ stable/12/usr.sbin/bsdconfig/include/messages.subr Mon Mar 2 02:44:21 2020 (r358513) @@ -201,7 +201,6 @@ msg_ipv6_ready="IPv6 ready" msg_irc_desc="Internet Relay Chat utilities." msg_ireland="Ireland" msg_israel="Israel" -msg_italy="Italy" msg_japan="Japan" msg_japanese_desc="Ported software for the Japanese market." msg_java_desc="Java language support." Modified: stable/12/usr.sbin/bsdconfig/share/media/ftp.subr ============================================================================== --- stable/12/usr.sbin/bsdconfig/share/media/ftp.subr Mon Mar 2 02:36:41 2020 (r358512) +++ stable/12/usr.sbin/bsdconfig/share/media/ftp.subr Mon Mar 2 02:44:21 2020 (r358513) @@ -127,7 +127,6 @@ f_dialog_menu_media_ftp() ' $msg_greece #2' 'ftp2.gr.freebsd.org' '$msg_ireland' 'ftp3.ie.freebsd.org' '$msg_israel' 'ftp.il.freebsd.org' - '$msg_italy' 'ftp.it.freebsd.org' '$msg_japan' 'ftp.jp.freebsd.org' ' $msg_japan #2' 'ftp2.jp.freebsd.org' ' $msg_japan #3' 'ftp3.jp.freebsd.org' From owner-svn-src-all@freebsd.org Mon Mar 2 02:45:53 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 657DB256BB3; Mon, 2 Mar 2020 02:45:53 +0000 (UTC) (envelope-from philip@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 48W4Jd1VFrz42qN; Mon, 2 Mar 2020 02:45:53 +0000 (UTC) (envelope-from philip@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 1540FDA8F; Mon, 2 Mar 2020 02:45:53 +0000 (UTC) (envelope-from philip@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 0222jqoJ016308; Mon, 2 Mar 2020 02:45:52 GMT (envelope-from philip@FreeBSD.org) Received: (from philip@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 0222jquk016307; Mon, 2 Mar 2020 02:45:52 GMT (envelope-from philip@FreeBSD.org) Message-Id: <202003020245.0222jquk016307@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: philip set sender to philip@FreeBSD.org using -f From: Philip Paeps Date: Mon, 2 Mar 2020 02:45: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: r358514 - stable/12/usr.sbin/bsdinstall/scripts X-SVN-Group: stable-12 X-SVN-Commit-Author: philip X-SVN-Commit-Paths: stable/12/usr.sbin/bsdinstall/scripts X-SVN-Commit-Revision: 358514 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages 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, 02 Mar 2020 02:45:53 -0000 Author: philip Date: Mon Mar 2 02:45:52 2020 New Revision: 358514 URL: https://svnweb.freebsd.org/changeset/base/358514 Log: MFC r358419: bsdinstall: remove the Italian mirror ftp.it.FreeBSD.org has been down for several years. PR: 244481 Reported by: xgeoplasma6@gmail.com Modified: stable/12/usr.sbin/bsdinstall/scripts/mirrorselect Directory Properties: stable/12/ (props changed) Modified: stable/12/usr.sbin/bsdinstall/scripts/mirrorselect ============================================================================== --- stable/12/usr.sbin/bsdinstall/scripts/mirrorselect Mon Mar 2 02:44:21 2020 (r358513) +++ stable/12/usr.sbin/bsdinstall/scripts/mirrorselect Mon Mar 2 02:45:52 2020 (r358514) @@ -89,7 +89,6 @@ MIRROR=`dialog --backtitle "FreeBSD Installer" \ ftp://ftp2.gr.freebsd.org "Greece #2"\ ftp://ftp3.ie.freebsd.org "Ireland #3"\ ftp://ftp.il.freebsd.org "Israel"\ - ftp://ftp.it.freebsd.org "Italy"\ ftp://ftp.jp.freebsd.org "Japan"\ ftp://ftp2.jp.freebsd.org "Japan #2"\ ftp://ftp3.jp.freebsd.org "Japan #3"\ From owner-svn-src-all@freebsd.org Mon Mar 2 02:45:58 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id A7DAA256BEA; Mon, 2 Mar 2020 02:45:58 +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 48W4Jk2NHHz432f; Mon, 2 Mar 2020 02:45:58 +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 000F0DA91; Mon, 2 Mar 2020 02:45:57 +0000 (UTC) (envelope-from kevans@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 0222jvod016373; Mon, 2 Mar 2020 02:45:57 GMT (envelope-from kevans@FreeBSD.org) Received: (from kevans@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 0222jvg5016372; Mon, 2 Mar 2020 02:45:57 GMT (envelope-from kevans@FreeBSD.org) Message-Id: <202003020245.0222jvg5016372@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kevans set sender to kevans@FreeBSD.org using -f From: Kyle Evans Date: Mon, 2 Mar 2020 02:45:57 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r358515 - head/sys/net X-SVN-Group: head X-SVN-Commit-Author: kevans X-SVN-Commit-Paths: head/sys/net X-SVN-Commit-Revision: 358515 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages 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, 02 Mar 2020 02:45:58 -0000 Author: kevans Date: Mon Mar 2 02:45:57 2020 New Revision: 358515 URL: https://svnweb.freebsd.org/changeset/base/358515 Log: if_edsc: generate an arbitrary MAC address When generating an cloned interface instance in edsc_clone_create(), generate a MAC address from the FF OUI with ether_gen_addr(). This allows us to have unique local-link addresses. Previously, the MAC address was zero. Submitted by: Neel Chauhan Differential Revision: https://reviews.freebsd.org/D23842 Modified: head/sys/net/if_edsc.c Modified: head/sys/net/if_edsc.c ============================================================================== --- head/sys/net/if_edsc.c Mon Mar 2 02:45:52 2020 (r358514) +++ head/sys/net/if_edsc.c Mon Mar 2 02:45:57 2020 (r358515) @@ -98,7 +98,7 @@ edsc_clone_create(struct if_clone *ifc, int unit, cadd { struct edsc_softc *sc; struct ifnet *ifp; - static u_char eaddr[ETHER_ADDR_LEN]; /* 0:0:0:0:0:0 */ + struct ether_addr eaddr; /* * Allocate soft and ifnet structures. Link each to the other. @@ -149,11 +149,15 @@ edsc_clone_create(struct if_clone *ifc, int unit, cadd ifp->if_snd.ifq_maxlen = ifqmaxlen; /* + * Generate an arbitrary MAC address for the cloned interface. + */ + ether_gen_addr(ifp, &eaddr); + + /* * Do ifnet initializations common to all Ethernet drivers * and attach to the network interface framework. - * TODO: Pick a non-zero link level address. */ - ether_ifattach(ifp, eaddr); + ether_ifattach(ifp, eaddr.octet); /* * Now we can mark the interface as running, i.e., ready From owner-svn-src-all@freebsd.org Mon Mar 2 02:47:12 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id F20D5256CA9; Mon, 2 Mar 2020 02:47:12 +0000 (UTC) (envelope-from philip@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 48W4L84CXZz45hr; Mon, 2 Mar 2020 02:47:12 +0000 (UTC) (envelope-from philip@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 53A6CDAC0; Mon, 2 Mar 2020 02:47:12 +0000 (UTC) (envelope-from philip@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 0222lC6a016482; Mon, 2 Mar 2020 02:47:12 GMT (envelope-from philip@FreeBSD.org) Received: (from philip@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 0222lCuI016480; Mon, 2 Mar 2020 02:47:12 GMT (envelope-from philip@FreeBSD.org) Message-Id: <202003020247.0222lCuI016480@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: philip set sender to philip@FreeBSD.org using -f From: Philip Paeps Date: Mon, 2 Mar 2020 02:47:11 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r358516 - in stable/11/usr.sbin/bsdconfig: include share/media X-SVN-Group: stable-11 X-SVN-Commit-Author: philip X-SVN-Commit-Paths: in stable/11/usr.sbin/bsdconfig: include share/media X-SVN-Commit-Revision: 358516 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages 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, 02 Mar 2020 02:47:13 -0000 Author: philip Date: Mon Mar 2 02:47:11 2020 New Revision: 358516 URL: https://svnweb.freebsd.org/changeset/base/358516 Log: MFC r358418: bsdconfig: remove the Italian mirror ftp.it.FreeBSD.org has been down for several years. PR: 244481 Reported by: xgeoplasma6@gmail.com Modified: stable/11/usr.sbin/bsdconfig/include/messages.subr stable/11/usr.sbin/bsdconfig/share/media/ftp.subr Directory Properties: stable/11/ (props changed) Modified: stable/11/usr.sbin/bsdconfig/include/messages.subr ============================================================================== --- stable/11/usr.sbin/bsdconfig/include/messages.subr Mon Mar 2 02:45:57 2020 (r358515) +++ stable/11/usr.sbin/bsdconfig/include/messages.subr Mon Mar 2 02:47:11 2020 (r358516) @@ -201,7 +201,6 @@ msg_ipv6_ready="IPv6 ready" msg_irc_desc="Internet Relay Chat utilities." msg_ireland="Ireland" msg_israel="Israel" -msg_italy="Italy" msg_japan="Japan" msg_japanese_desc="Ported software for the Japanese market." msg_java_desc="Java language support." Modified: stable/11/usr.sbin/bsdconfig/share/media/ftp.subr ============================================================================== --- stable/11/usr.sbin/bsdconfig/share/media/ftp.subr Mon Mar 2 02:45:57 2020 (r358515) +++ stable/11/usr.sbin/bsdconfig/share/media/ftp.subr Mon Mar 2 02:47:11 2020 (r358516) @@ -127,7 +127,6 @@ f_dialog_menu_media_ftp() ' $msg_greece #2' 'ftp2.gr.freebsd.org' '$msg_ireland' 'ftp3.ie.freebsd.org' '$msg_israel' 'ftp.il.freebsd.org' - '$msg_italy' 'ftp.it.freebsd.org' '$msg_japan' 'ftp.jp.freebsd.org' ' $msg_japan #2' 'ftp2.jp.freebsd.org' ' $msg_japan #3' 'ftp3.jp.freebsd.org' From owner-svn-src-all@freebsd.org Mon Mar 2 02:47:57 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id C93C3256D32; Mon, 2 Mar 2020 02:47:57 +0000 (UTC) (envelope-from philip@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 48W4M10Fkyz47PS; Mon, 2 Mar 2020 02:47:56 +0000 (UTC) (envelope-from philip@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id D553DDAC5; Mon, 2 Mar 2020 02:47:56 +0000 (UTC) (envelope-from philip@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 0222lu5g016578; Mon, 2 Mar 2020 02:47:56 GMT (envelope-from philip@FreeBSD.org) Received: (from philip@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 0222luGf016577; Mon, 2 Mar 2020 02:47:56 GMT (envelope-from philip@FreeBSD.org) Message-Id: <202003020247.0222luGf016577@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: philip set sender to philip@FreeBSD.org using -f From: Philip Paeps Date: Mon, 2 Mar 2020 02:47:56 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r358517 - stable/11/usr.sbin/bsdinstall/scripts X-SVN-Group: stable-11 X-SVN-Commit-Author: philip X-SVN-Commit-Paths: stable/11/usr.sbin/bsdinstall/scripts X-SVN-Commit-Revision: 358517 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages 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, 02 Mar 2020 02:47:57 -0000 Author: philip Date: Mon Mar 2 02:47:56 2020 New Revision: 358517 URL: https://svnweb.freebsd.org/changeset/base/358517 Log: MFC r358419: bsdinstall: remove the Italian mirror ftp.it.FreeBSD.org has been down for several years. PR: 244481 Reported by: xgeoplasma6@gmail.com Modified: stable/11/usr.sbin/bsdinstall/scripts/mirrorselect Directory Properties: stable/11/ (props changed) Modified: stable/11/usr.sbin/bsdinstall/scripts/mirrorselect ============================================================================== --- stable/11/usr.sbin/bsdinstall/scripts/mirrorselect Mon Mar 2 02:47:11 2020 (r358516) +++ stable/11/usr.sbin/bsdinstall/scripts/mirrorselect Mon Mar 2 02:47:56 2020 (r358517) @@ -89,7 +89,6 @@ MIRROR=`dialog --backtitle "FreeBSD Installer" \ ftp://ftp2.gr.freebsd.org "Greece #2"\ ftp://ftp3.ie.freebsd.org "Ireland #3"\ ftp://ftp.il.freebsd.org "Israel"\ - ftp://ftp.it.freebsd.org "Italy"\ ftp://ftp.jp.freebsd.org "Japan"\ ftp://ftp2.jp.freebsd.org "Japan #2"\ ftp://ftp3.jp.freebsd.org "Japan #3"\ From owner-svn-src-all@freebsd.org Mon Mar 2 04:22:40 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 33EBC258FC4; Mon, 2 Mar 2020 04:22:40 +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 48W6SH4xxmz4jDk; Mon, 2 Mar 2020 04:22:39 +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 383CBEDA2; Mon, 2 Mar 2020 04:22:39 +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 0224Mdv7076914; Mon, 2 Mar 2020 04:22:39 GMT (envelope-from kevans@FreeBSD.org) Received: (from kevans@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 0224Mdfa076913; Mon, 2 Mar 2020 04:22:39 GMT (envelope-from kevans@FreeBSD.org) Message-Id: <202003020422.0224Mdfa076913@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kevans set sender to kevans@FreeBSD.org using -f From: Kyle Evans Date: Mon, 2 Mar 2020 04:22:39 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r358518 - head/usr.bin/elfctl X-SVN-Group: head X-SVN-Commit-Author: kevans X-SVN-Commit-Paths: head/usr.bin/elfctl X-SVN-Commit-Revision: 358518 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages 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, 02 Mar 2020 04:22:40 -0000 Author: kevans Date: Mon Mar 2 04:22:38 2020 New Revision: 358518 URL: https://svnweb.freebsd.org/changeset/base/358518 Log: elfctl: initialize features GCC points out a couple levels down in convert_to_features that this may be used uninitialized. Indeed, this is true- initialize it to NULL so that we at least deref a null pointer. Modified: head/usr.bin/elfctl/elfctl.c Modified: head/usr.bin/elfctl/elfctl.c ============================================================================== --- head/usr.bin/elfctl/elfctl.c Mon Mar 2 02:47:56 2020 (r358517) +++ head/usr.bin/elfctl/elfctl.c Mon Mar 2 04:22:38 2020 (r358518) @@ -92,6 +92,7 @@ main(int argc, char **argv) lflag = 0; editfeatures = 0; retval = 0; + features = NULL; if (elf_version(EV_CURRENT) == EV_NONE) errx(EXIT_FAILURE, "elf_version error"); From owner-svn-src-all@freebsd.org Mon Mar 2 07:11:38 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 5446E25C14D; Mon, 2 Mar 2020 07:11:38 +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 48WBCG1Yw3z3JM4; Mon, 2 Mar 2020 07:11: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 2ECCB18B18; Mon, 2 Mar 2020 07:11: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 0227Bc0i080142; Mon, 2 Mar 2020 07:11:38 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 0227Bb5E080140; Mon, 2 Mar 2020 07:11:37 GMT (envelope-from dim@FreeBSD.org) Message-Id: <202003020711.0227Bb5E080140@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Mon, 2 Mar 2020 07:11: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: r358527 - in stable/12: . share/mk X-SVN-Group: stable-12 X-SVN-Commit-Author: dim X-SVN-Commit-Paths: in stable/12: . share/mk X-SVN-Commit-Revision: 358527 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages 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, 02 Mar 2020 07:11:38 -0000 Author: dim Date: Mon Mar 2 07:11:37 2020 New Revision: 358527 URL: https://svnweb.freebsd.org/changeset/base/358527 Log: MFC r358132: Take LINKER_FREEBSD_VERSION from numerical field after dash Summary: With COMPILER_FREEBSD_VERSION, we use a numeric value that we bump each time we make a change that requires re-bootstrapping, but with the linker variant, we instead take the entire part after "FreeBSD", as in this example version output: LLD 9.0.1 (FreeBSD c1a0a213378a458fbea1a5c77b315c7dce08fd05-1300006) (compatible with GNU linkers) E.g., LINKER_FREEBSD_VERSION is currently being set to "c1a0a213378a458fbea1a5c77b315c7dce08fd05-1300006". This means that *any* new upstream lld version will cause re-bootstrapping. We should only look at the numerical field we append after a dash instead. This review attempts to make it so. The only thing I am not happy about is the post-processing of awk output in Makefile.inc1. I notice that our awk does not have gensub(), so it can't substitute a numbered sub-regex with \1, \2, etc. Suggestions welcome. :) Differential Revision: https://reviews.freebsd.org/D23691 Modified: stable/12/Makefile.inc1 stable/12/share/mk/bsd.linker.mk Directory Properties: stable/12/ (props changed) Modified: stable/12/Makefile.inc1 ============================================================================== --- stable/12/Makefile.inc1 Mon Mar 2 06:35:26 2020 (r358526) +++ stable/12/Makefile.inc1 Mon Mar 2 07:11:37 2020 (r358527) @@ -280,9 +280,10 @@ WANT_LINKER_TYPE= !make(test-system-compiler) .if ${WANT_LINKER_TYPE} == "lld" WANT_LINKER_FREEBSD_VERSION_FILE= lib/clang/include/VCSVersion.inc -WANT_LINKER_FREEBSD_VERSION!= \ +_WANT_LINKER_FREEBSD_VERSION!= \ awk '$$2 == "LLD_REVISION" {gsub(/"/, "", $$3); print $$3}' \ ${SRCDIR}/${WANT_LINKER_FREEBSD_VERSION_FILE} || echo unknown +WANT_LINKER_FREEBSD_VERSION=${_WANT_LINKER_FREEBSD_VERSION:C/.*-(.*)/\1/} WANT_LINKER_VERSION_FILE= lib/clang/include/lld/Common/Version.inc WANT_LINKER_VERSION!= \ awk '$$2 == "LLD_VERSION" {split($$3, a, "."); print a[1] * 10000 + a[2] * 100 + a[3]}' \ Modified: stable/12/share/mk/bsd.linker.mk ============================================================================== --- stable/12/share/mk/bsd.linker.mk Mon Mar 2 06:35:26 2020 (r358526) +++ stable/12/share/mk/bsd.linker.mk Mon Mar 2 07:11:37 2020 (r358527) @@ -63,9 +63,11 @@ _v= ${_ld_version:M[1-9]*.[0-9]*:[1]} .elif ${_ld_version:[1]} == "LLD" ${X_}LINKER_TYPE= lld _v= ${_ld_version:[2]} -${X_}LINKER_FREEBSD_VERSION!= \ - ${${ld}} --version | \ - awk '$$3 ~ /FreeBSD/ {print substr($$4, 1, length($$4)-1)}' +.if ${_ld_version:[3]} == "(FreeBSD" +${X_}LINKER_FREEBSD_VERSION:= ${_ld_version:[4]:C/.*-(.*)\)/\1/} +.else +${X_}LINKER_FREEBSD_VERSION= 0 +.endif .else .warning Unknown linker from ${ld}=${${ld}}: ${_ld_version}, defaulting to bfd ${X_}LINKER_TYPE= bfd From owner-svn-src-all@freebsd.org Mon Mar 2 07:13:00 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id B302325C347; Mon, 2 Mar 2020 07:13:00 +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 48WBDr4MX9z3KdB; Mon, 2 Mar 2020 07:13:00 +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 8F10418C93; Mon, 2 Mar 2020 07:13:00 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 0227D0HF080337; Mon, 2 Mar 2020 07:13:00 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 0227D0ig080336; Mon, 2 Mar 2020 07:13:00 GMT (envelope-from dim@FreeBSD.org) Message-Id: <202003020713.0227D0ig080336@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Mon, 2 Mar 2020 07:13: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: r358528 - stable/12/etc/mtree X-SVN-Group: stable-12 X-SVN-Commit-Author: dim X-SVN-Commit-Paths: stable/12/etc/mtree X-SVN-Commit-Revision: 358528 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages 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, 02 Mar 2020 07:13:00 -0000 Author: dim Date: Mon Mar 2 07:13:00 2020 New Revision: 358528 URL: https://svnweb.freebsd.org/changeset/base/358528 Log: MFC r357929: Remove /usr/include/ssp from BSD.include.dist after r356356 This avoids having to delete it every time with "make delete-old". PR: 242950 Modified: stable/12/etc/mtree/BSD.include.dist Directory Properties: stable/12/ (props changed) Modified: stable/12/etc/mtree/BSD.include.dist ============================================================================== --- stable/12/etc/mtree/BSD.include.dist Mon Mar 2 07:11:37 2020 (r358527) +++ stable/12/etc/mtree/BSD.include.dist Mon Mar 2 07:13:00 2020 (r358528) @@ -361,8 +361,6 @@ mac_veriexec .. .. - ssp - .. sys disk .. From owner-svn-src-all@freebsd.org Mon Mar 2 08:31:00 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id EF6AA25E287; Mon, 2 Mar 2020 08:31:00 +0000 (UTC) (envelope-from mm@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 48WCyr68Bmz3Qfl; Mon, 2 Mar 2020 08:31:00 +0000 (UTC) (envelope-from mm@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id CD8C61995E; Mon, 2 Mar 2020 08:31:00 +0000 (UTC) (envelope-from mm@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 0228V0ld024419; Mon, 2 Mar 2020 08:31:00 GMT (envelope-from mm@FreeBSD.org) Received: (from mm@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 0228V0X2024417; Mon, 2 Mar 2020 08:31:00 GMT (envelope-from mm@FreeBSD.org) Message-Id: <202003020831.0228V0X2024417@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mm set sender to mm@FreeBSD.org using -f From: Martin Matuska Date: Mon, 2 Mar 2020 08:31:00 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r358532 - vendor/libarchive/dist/libarchive X-SVN-Group: vendor X-SVN-Commit-Author: mm X-SVN-Commit-Paths: vendor/libarchive/dist/libarchive X-SVN-Commit-Revision: 358532 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages 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, 02 Mar 2020 08:31:01 -0000 Author: mm Date: Mon Mar 2 08:30:59 2020 New Revision: 358532 URL: https://svnweb.freebsd.org/changeset/base/358532 Log: Update vendor/libarchive/dist to git f001f3b0e6a66a7eb989ed3783791c0316831202 Relevant vendor changes: Issue #1341: Safe writes: improve error handling Modified: vendor/libarchive/dist/libarchive/archive_util.c vendor/libarchive/dist/libarchive/archive_write_disk_posix.c vendor/libarchive/dist/libarchive/archive_write_disk_windows.c Modified: vendor/libarchive/dist/libarchive/archive_util.c ============================================================================== --- vendor/libarchive/dist/libarchive/archive_util.c Mon Mar 2 07:40:08 2020 (r358531) +++ vendor/libarchive/dist/libarchive/archive_util.c Mon Mar 2 08:30:59 2020 (r358532) @@ -365,6 +365,7 @@ __archive_mktempx(const char *tmpdir, wchar_t *templat } fd = _open_osfhandle((intptr_t)h, _O_BINARY | _O_RDWR); if (fd == -1) { + la_dosmaperr(GetLastError()); CloseHandle(h); goto exit_tmpfile; } else Modified: vendor/libarchive/dist/libarchive/archive_write_disk_posix.c ============================================================================== --- vendor/libarchive/dist/libarchive/archive_write_disk_posix.c Mon Mar 2 07:40:08 2020 (r358531) +++ vendor/libarchive/dist/libarchive/archive_write_disk_posix.c Mon Mar 2 08:30:59 2020 (r358532) @@ -1654,7 +1654,6 @@ _archive_write_disk_finish_entry(struct archive *_a) { struct archive_write_disk *a = (struct archive_write_disk *)_a; int ret = ARCHIVE_OK; - int oerrno; archive_check_magic(&a->archive, ARCHIVE_WRITE_DISK_MAGIC, ARCHIVE_STATE_HEADER | ARCHIVE_STATE_DATA, @@ -1856,12 +1855,10 @@ finish_metadata: a->fd = -1; if (a->tmpname) { if (rename(a->tmpname, a->name) == -1) { - oerrno = errno; - unlink(a->tmpname); - errno = oerrno; archive_set_error(&a->archive, errno, - "Failed to safe write"); - ret = ARCHIVE_FATAL; + "Failed to rename temporary file"); + ret = ARCHIVE_FAILED; + unlink(a->tmpname); } a->tmpname = NULL; } @@ -2148,8 +2145,11 @@ restore_entry(struct archive_write_disk *a) if ((a->flags & ARCHIVE_EXTRACT_SAFE_WRITES) && S_ISREG(a->st.st_mode)) { /* Use a temporary file to extract */ - if ((a->fd = la_mktemp(a)) == -1) + if ((a->fd = la_mktemp(a)) == -1) { + archive_set_error(&a->archive, errno, + "Can't create temporary file"); return ARCHIVE_FAILED; + } a->pst = NULL; en = 0; } else { Modified: vendor/libarchive/dist/libarchive/archive_write_disk_windows.c ============================================================================== --- vendor/libarchive/dist/libarchive/archive_write_disk_windows.c Mon Mar 2 07:40:08 2020 (r358531) +++ vendor/libarchive/dist/libarchive/archive_write_disk_windows.c Mon Mar 2 08:30:59 2020 (r358532) @@ -549,6 +549,8 @@ la_mktemp(struct archive_write_disk *a) a->tmpname = a->_tmpname_data.s; fd = __archive_mkstemp(a->tmpname); + if (fd == -1) + return -1; mode = a->mode & 0777 & ~a->user_umask; if (la_chmod(a->tmpname, mode) == -1) { @@ -1174,7 +1176,6 @@ _archive_write_disk_finish_entry(struct archive *_a) { struct archive_write_disk *a = (struct archive_write_disk *)_a; int ret = ARCHIVE_OK; - int oerrno; archive_check_magic(&a->archive, ARCHIVE_WRITE_DISK_MAGIC, ARCHIVE_STATE_HEADER | ARCHIVE_STATE_DATA, @@ -1282,12 +1283,11 @@ _archive_write_disk_finish_entry(struct archive *_a) /* Windows does not support atomic rename */ disk_unlink(a->name); if (_wrename(a->tmpname, a->name) != 0) { - oerrno = errno; - disk_unlink(a->tmpname); - errno = oerrno; + la_dosmaperr(GetLastError()); archive_set_error(&a->archive, errno, - "Failed to safe write"); - ret = ARCHIVE_FATAL; + "Failed to rename temporary file"); + ret = ARCHIVE_FAILED; + disk_unlink(a->tmpname); } a->tmpname = NULL; } @@ -1577,12 +1577,17 @@ restore_entry(struct archive_write_disk *a) S_ISREG(st_mode)) { int fd = la_mktemp(a); - if (fd == -1) + if (fd == -1) { + la_dosmaperr(GetLastError()); + archive_set_error(&a->archive, errno, + "Can't create temporary file"); return (ARCHIVE_FAILED); + } a->fh = (HANDLE)_get_osfhandle(fd); - if (a->fh == INVALID_HANDLE_VALUE) + if (a->fh == INVALID_HANDLE_VALUE) { + la_dosmaperr(GetLastError()); return (ARCHIVE_FAILED); - + } a->pst = NULL; en = 0; } else { From owner-svn-src-all@freebsd.org Mon Mar 2 08:45:02 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 43D8725EE7A; Mon, 2 Mar 2020 08:45:02 +0000 (UTC) (envelope-from mm@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 48WDH21CPJz4GP3; Mon, 2 Mar 2020 08:45:02 +0000 (UTC) (envelope-from mm@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 115CB19CE2; Mon, 2 Mar 2020 08:45:02 +0000 (UTC) (envelope-from mm@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 0228j1LW035214; Mon, 2 Mar 2020 08:45:01 GMT (envelope-from mm@FreeBSD.org) Received: (from mm@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 0228ixLj035186; Mon, 2 Mar 2020 08:44:59 GMT (envelope-from mm@FreeBSD.org) Message-Id: <202003020844.0228ixLj035186@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mm set sender to mm@FreeBSD.org using -f From: Martin Matuska Date: Mon, 2 Mar 2020 08:44:59 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r358533 - in head: contrib/libarchive/cpio contrib/libarchive/cpio/test contrib/libarchive/libarchive contrib/libarchive/libarchive/test lib/libarchive/tests X-SVN-Group: head X-SVN-Commit-Author: mm X-SVN-Commit-Paths: in head: contrib/libarchive/cpio contrib/libarchive/cpio/test contrib/libarchive/libarchive contrib/libarchive/libarchive/test lib/libarchive/tests X-SVN-Commit-Revision: 358533 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages 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, 02 Mar 2020 08:45:02 -0000 Author: mm Date: Mon Mar 2 08:44:58 2020 New Revision: 358533 URL: https://svnweb.freebsd.org/changeset/base/358533 Log: MFV r358511,r358532: Sync libarchive with vendor. Relevant vendor changes: Issue #1257: Add testcase for ZIPX files with LZMA_STREAM_END marker PR #1331: cpio.5: fix hard link description Issue #1335: archive_read.c: fix UBSan warning about undefined behavior Issue #1338: XAR reader: fix UBSan warning about undefined behavior Issue #1339: bsdcpio_test: fix datatype in from_hex() Issue #1341: Safe writes: delete temporary file if rename fails. Issue #1341: Safe writes: improve error handling MFC after: 1 week Added: head/contrib/libarchive/libarchive/test/test_read_format_zip_lzma_stream_end.zipx.uu - copied unchanged from r358511, vendor/libarchive/dist/libarchive/test/test_read_format_zip_lzma_stream_end.zipx.uu Modified: head/contrib/libarchive/cpio/cpio.c head/contrib/libarchive/cpio/cpio.h head/contrib/libarchive/cpio/test/test_format_newc.c head/contrib/libarchive/libarchive/archive_read.c head/contrib/libarchive/libarchive/archive_read_open_filename.c head/contrib/libarchive/libarchive/archive_read_support_format_xar.c head/contrib/libarchive/libarchive/archive_util.c head/contrib/libarchive/libarchive/archive_write_disk_posix.c head/contrib/libarchive/libarchive/archive_write_set_format_xar.c head/contrib/libarchive/libarchive/cpio.5 head/contrib/libarchive/libarchive/test/test_read_format_zip.c head/lib/libarchive/tests/Makefile Directory Properties: head/contrib/libarchive/ (props changed) Modified: head/contrib/libarchive/cpio/cpio.c ============================================================================== --- head/contrib/libarchive/cpio/cpio.c Mon Mar 2 08:30:59 2020 (r358532) +++ head/contrib/libarchive/cpio/cpio.c Mon Mar 2 08:44:58 2020 (r358533) @@ -737,7 +737,7 @@ file_to_archive(struct cpio *cpio, const char *srcpath */ destpath = srcpath; if (cpio->destdir) { - len = strlen(cpio->destdir) + strlen(srcpath) + 8; + len = cpio->destdir_len + strlen(srcpath) + 8; if (len >= cpio->pass_destpath_alloc) { while (len >= cpio->pass_destpath_alloc) { cpio->pass_destpath_alloc += 512; @@ -1228,15 +1228,14 @@ mode_pass(struct cpio *cpio, const char *destdir) struct lafe_line_reader *lr; const char *p; int r; - size_t destdir_len; /* Ensure target dir has a trailing '/' to simplify path surgery. */ - destdir_len = strlen(destdir); - cpio->destdir = malloc(destdir_len + 8); - memcpy(cpio->destdir, destdir, destdir_len); - if (destdir_len == 0 || destdir[destdir_len - 1] != '/') - cpio->destdir[destdir_len++] = '/'; - cpio->destdir[destdir_len++] = '\0'; + cpio->destdir_len = strlen(destdir); + cpio->destdir = malloc(cpio->destdir_len + 8); + memcpy(cpio->destdir, destdir, cpio->destdir_len); + if (cpio->destdir_len == 0 || destdir[cpio->destdir_len - 1] != '/') + cpio->destdir[cpio->destdir_len++] = '/'; + cpio->destdir[cpio->destdir_len] = '\0'; cpio->archive = archive_write_disk_new(); if (cpio->archive == NULL) Modified: head/contrib/libarchive/cpio/cpio.h ============================================================================== --- head/contrib/libarchive/cpio/cpio.h Mon Mar 2 08:30:59 2020 (r358532) +++ head/contrib/libarchive/cpio/cpio.h Mon Mar 2 08:44:58 2020 (r358533) @@ -64,6 +64,7 @@ struct cpio { int option_numeric_uid_gid; /* -n */ int option_rename; /* -r */ char *destdir; + size_t destdir_len; size_t pass_destpath_alloc; char *pass_destpath; int uid_override; Modified: head/contrib/libarchive/cpio/test/test_format_newc.c ============================================================================== --- head/contrib/libarchive/cpio/test/test_format_newc.c Mon Mar 2 08:30:59 2020 (r358532) +++ head/contrib/libarchive/cpio/test/test_format_newc.c Mon Mar 2 08:44:58 2020 (r358533) @@ -49,10 +49,11 @@ is_hex(const char *p, size_t l) return (1); } -static int +/* Convert up to 8 hex characters to unsigned 32-bit decimal integer */ +static uint32_t from_hex(const char *p, size_t l) { - int r = 0; + uint32_t r = 0; while (l > 0) { r *= 16; @@ -82,11 +83,11 @@ DEFINE_TEST(test_format_newc) { FILE *list; int r; - int devmajor, devminor, ino, gid; - int uid = -1; + uint32_t devmajor, devminor, ino, gid, uid; time_t t, t2, now; char *p, *e; - size_t s, fs, ns; + size_t s; + uint64_t fs, ns; char result[1024]; assertUmask(0); @@ -199,9 +200,11 @@ DEFINE_TEST(test_format_newc) #else assertEqualInt(0x81a4, from_hex(e + 14, 8)); /* Mode */ #endif - if (uid < 0) - uid = from_hex(e + 22, 8); +#if defined(_WIN32) + uid = from_hex(e + 22, 8); +#else assertEqualInt(from_hex(e + 22, 8), uid); /* uid */ +#endif gid = from_hex(e + 30, 8); /* gid */ assertEqualMem(e + 38, "00000003", 8); /* nlink */ t = from_hex(e + 46, 8); /* mtime */ @@ -215,14 +218,14 @@ DEFINE_TEST(test_format_newc) " first appearance should be empty, so this file size\n" " field should be zero"); assertEqualInt(0, from_hex(e + 54, 8)); /* File size */ - fs = from_hex(e + 54, 8); + fs = (uint64_t)from_hex(e + 54, 8); fs += PAD(fs, 4); devmajor = from_hex(e + 62, 8); /* devmajor */ devminor = from_hex(e + 70, 8); /* devminor */ assert(is_hex(e + 78, 8)); /* rdevmajor */ assert(is_hex(e + 86, 8)); /* rdevminor */ assertEqualMem(e + 94, "00000006", 8); /* Name size */ - ns = from_hex(e + 94, 8); + ns = (uint64_t)from_hex(e + 94, 8); ns += PAD(ns + 2, 4); assertEqualInt(0, from_hex(e + 102, 8)); /* check field */ assertEqualMem(e + 110, "file1\0", 6); /* Name contents */ @@ -249,14 +252,14 @@ DEFINE_TEST(test_format_newc) " at t2=%#08jx", (intmax_t)t, (intmax_t)t2); assert(t2 == t || t2 == t + 1); /* Almost same as first entry. */ assertEqualMem(e + 54, "00000005", 8); /* File size */ - fs = from_hex(e + 54, 8); + fs = (uint64_t)from_hex(e + 54, 8); fs += PAD(fs, 4); assertEqualInt(devmajor, from_hex(e + 62, 8)); /* devmajor */ assertEqualInt(devminor, from_hex(e + 70, 8)); /* devminor */ assert(is_hex(e + 78, 8)); /* rdevmajor */ assert(is_hex(e + 86, 8)); /* rdevminor */ assertEqualMem(e + 94, "00000008", 8); /* Name size */ - ns = from_hex(e + 94, 8); + ns = (uint64_t)from_hex(e + 94, 8); ns += PAD(ns + 2, 4); assertEqualInt(0, from_hex(e + 102, 8)); /* check field */ assertEqualMem(e + 110, "symlink\0\0\0", 10); /* Name contents */ @@ -285,14 +288,14 @@ DEFINE_TEST(test_format_newc) "t2=%#08jx", (intmax_t)t, (intmax_t)t2); assert(t2 == t || t2 == t + 1); /* Almost same as first entry. */ assertEqualMem(e + 54, "00000000", 8); /* File size */ - fs = from_hex(e + 54, 8); + fs = (uint64_t)from_hex(e + 54, 8); fs += PAD(fs, 4); assertEqualInt(devmajor, from_hex(e + 62, 8)); /* devmajor */ assertEqualInt(devminor, from_hex(e + 70, 8)); /* devminor */ assert(is_hex(e + 78, 8)); /* rdevmajor */ assert(is_hex(e + 86, 8)); /* rdevminor */ assertEqualMem(e + 94, "00000004", 8); /* Name size */ - ns = from_hex(e + 94, 8); + ns = (uint64_t)from_hex(e + 94, 8); ns += PAD(ns + 2, 4); assertEqualInt(0, from_hex(e + 102, 8)); /* check field */ assertEqualMem(e + 110, "dir\0\0\0", 6); /* Name contents */ @@ -319,14 +322,14 @@ DEFINE_TEST(test_format_newc) "t2=%#08jx", (intmax_t)t, (intmax_t)t2); assert(t2 == t || t2 == t + 1); /* Almost same as first entry. */ assertEqualInt(10, from_hex(e + 54, 8)); /* File size */ - fs = from_hex(e + 54, 8); + fs = (uint64_t)from_hex(e + 54, 8); fs += PAD(fs, 4); assertEqualInt(devmajor, from_hex(e + 62, 8)); /* devmajor */ assertEqualInt(devminor, from_hex(e + 70, 8)); /* devminor */ assert(is_hex(e + 78, 8)); /* rdevmajor */ assert(is_hex(e + 86, 8)); /* rdevminor */ assertEqualMem(e + 94, "00000009", 8); /* Name size */ - ns = from_hex(e + 94, 8); + ns = (uint64_t)from_hex(e + 94, 8); ns += PAD(ns + 2, 4); assertEqualInt(0, from_hex(e + 102, 8)); /* check field */ assertEqualMem(e + 110, "hardlink\0\0", 10); /* Name contents */ Modified: head/contrib/libarchive/libarchive/archive_read.c ============================================================================== --- head/contrib/libarchive/libarchive/archive_read.c Mon Mar 2 08:30:59 2020 (r358532) +++ head/contrib/libarchive/libarchive/archive_read.c Mon Mar 2 08:44:58 2020 (r358533) @@ -892,15 +892,16 @@ archive_read_data(struct archive *_a, void *buff, size len = a->read_data_remaining; if (len > s) len = s; - if (len) + if (len) { memcpy(dest, a->read_data_block, len); - s -= len; - a->read_data_block += len; - a->read_data_remaining -= len; - a->read_data_output_offset += len; - a->read_data_offset += len; - dest += len; - bytes_read += len; + s -= len; + a->read_data_block += len; + a->read_data_remaining -= len; + a->read_data_output_offset += len; + a->read_data_offset += len; + dest += len; + bytes_read += len; + } } } a->read_data_is_posix_read = 0; Modified: head/contrib/libarchive/libarchive/archive_read_open_filename.c ============================================================================== --- head/contrib/libarchive/libarchive/archive_read_open_filename.c Mon Mar 2 08:30:59 2020 (r358532) +++ head/contrib/libarchive/libarchive/archive_read_open_filename.c Mon Mar 2 08:44:58 2020 (r358533) @@ -221,7 +221,9 @@ file_open(struct archive *a, void *client_data) struct read_file_data *mine = (struct read_file_data *)client_data; void *buffer; const char *filename = NULL; +#if defined(_WIN32) && !defined(__CYGWIN__) const wchar_t *wfilename = NULL; +#endif int fd = -1; int is_disk_like = 0; #if defined(__FreeBSD__) || defined(__FreeBSD_kernel__) @@ -281,10 +283,12 @@ file_open(struct archive *a, void *client_data) #endif } if (fstat(fd, &st) != 0) { +#if defined(_WIN32) && !defined(__CYGWIN__) if (mine->filename_type == FNT_WCS) archive_set_error(a, errno, "Can't stat '%S'", wfilename); else +#endif archive_set_error(a, errno, "Can't stat '%s'", filename); goto fail; Modified: head/contrib/libarchive/libarchive/archive_read_support_format_xar.c ============================================================================== --- head/contrib/libarchive/libarchive/archive_read_support_format_xar.c Mon Mar 2 08:30:59 2020 (r358532) +++ head/contrib/libarchive/libarchive/archive_read_support_format_xar.c Mon Mar 2 08:44:58 2020 (r358533) @@ -458,6 +458,11 @@ archive_read_support_format_xar(struct archive *_a) return (ARCHIVE_FATAL); } + /* initialize xar->file_queue */ + xar->file_queue.allocated = 0; + xar->file_queue.used = 0; + xar->file_queue.files = NULL; + r = __archive_read_register_format(a, xar, "xar", @@ -1221,10 +1226,12 @@ heap_add_entry(struct archive_read *a, /* Expand our pending files list as necessary. */ if (heap->used >= heap->allocated) { struct xar_file **new_pending_files; - int new_size = heap->allocated * 2; + int new_size; if (heap->allocated < 1024) new_size = 1024; + else + new_size = heap->allocated * 2; /* Overflow might keep us from growing the list. */ if (new_size <= heap->allocated) { archive_set_error(&a->archive, @@ -1238,9 +1245,11 @@ heap_add_entry(struct archive_read *a, ENOMEM, "Out of memory"); return (ARCHIVE_FATAL); } - memcpy(new_pending_files, heap->files, - heap->allocated * sizeof(new_pending_files[0])); - free(heap->files); + if (heap->allocated) { + memcpy(new_pending_files, heap->files, + heap->allocated * sizeof(new_pending_files[0])); + free(heap->files); + } heap->files = new_pending_files; heap->allocated = new_size; } Modified: head/contrib/libarchive/libarchive/archive_util.c ============================================================================== --- head/contrib/libarchive/libarchive/archive_util.c Mon Mar 2 08:30:59 2020 (r358532) +++ head/contrib/libarchive/libarchive/archive_util.c Mon Mar 2 08:44:58 2020 (r358533) @@ -365,6 +365,7 @@ __archive_mktempx(const char *tmpdir, wchar_t *templat } fd = _open_osfhandle((intptr_t)h, _O_BINARY | _O_RDWR); if (fd == -1) { + la_dosmaperr(GetLastError()); CloseHandle(h); goto exit_tmpfile; } else Modified: head/contrib/libarchive/libarchive/archive_write_disk_posix.c ============================================================================== --- head/contrib/libarchive/libarchive/archive_write_disk_posix.c Mon Mar 2 08:30:59 2020 (r358532) +++ head/contrib/libarchive/libarchive/archive_write_disk_posix.c Mon Mar 2 08:44:58 2020 (r358533) @@ -1856,8 +1856,9 @@ finish_metadata: if (a->tmpname) { if (rename(a->tmpname, a->name) == -1) { archive_set_error(&a->archive, errno, - "rename failed"); - ret = ARCHIVE_FATAL; + "Failed to rename temporary file"); + ret = ARCHIVE_FAILED; + unlink(a->tmpname); } a->tmpname = NULL; } @@ -2144,8 +2145,11 @@ restore_entry(struct archive_write_disk *a) if ((a->flags & ARCHIVE_EXTRACT_SAFE_WRITES) && S_ISREG(a->st.st_mode)) { /* Use a temporary file to extract */ - if ((a->fd = la_mktemp(a)) == -1) + if ((a->fd = la_mktemp(a)) == -1) { + archive_set_error(&a->archive, errno, + "Can't create temporary file"); return ARCHIVE_FAILED; + } a->pst = NULL; en = 0; } else { Modified: head/contrib/libarchive/libarchive/archive_write_set_format_xar.c ============================================================================== --- head/contrib/libarchive/libarchive/archive_write_set_format_xar.c Mon Mar 2 08:30:59 2020 (r358532) +++ head/contrib/libarchive/libarchive/archive_write_set_format_xar.c Mon Mar 2 08:44:58 2020 (r358533) @@ -681,7 +681,8 @@ xar_write_data(struct archive_write *a, const void *bu { struct xar *xar; enum la_zaction run; - size_t size, rsize; + size_t size = 0; + size_t rsize; int r; xar = (struct xar *)a->format_data; Modified: head/contrib/libarchive/libarchive/cpio.5 ============================================================================== --- head/contrib/libarchive/libarchive/cpio.5 Mon Mar 2 08:30:59 2020 (r358532) +++ head/contrib/libarchive/libarchive/cpio.5 Mon Mar 2 08:44:58 2020 (r358533) @@ -244,7 +244,7 @@ Note that this format supports only 4 gigabyte files ( older ASCII format, which supports 8 gigabyte files). .Pp In this format, hardlinked files are handled by setting the -filesize to zero for each entry except the last one that +filesize to zero for each entry except the first one that appears in the archive. .Ss New CRC Format The CRC format is identical to the new ASCII format described Modified: head/contrib/libarchive/libarchive/test/test_read_format_zip.c ============================================================================== --- head/contrib/libarchive/libarchive/test/test_read_format_zip.c Mon Mar 2 08:30:59 2020 (r358532) +++ head/contrib/libarchive/libarchive/test/test_read_format_zip.c Mon Mar 2 08:44:58 2020 (r358533) @@ -916,3 +916,53 @@ DEFINE_TEST(test_read_format_zip_lzma_alone_leak) * suite under Valgrind or ASan, the test runner won't return with * exit code 0 in case if a memory leak. */ } + +DEFINE_TEST(test_read_format_zip_lzma_stream_end) +{ + const char *refname = "test_read_format_zip_lzma_stream_end.zipx"; + struct archive *a; + struct archive_entry *ae; + + assert((a = archive_read_new()) != NULL); + if (ARCHIVE_OK != archive_read_support_filter_lzma(a)) { + skipping("lzma reading not fully supported on this platform"); + assertEqualInt(ARCHIVE_OK, archive_read_free(a)); + return; + } + extract_reference_file(refname); + + assertEqualIntA(a, ARCHIVE_OK, archive_read_support_format_zip(a)); + assertEqualIntA(a, ARCHIVE_OK, archive_read_open_filename(a, refname, 37)); + assertEqualIntA(a, ARCHIVE_OK, archive_read_next_header(a, &ae)); + assertEqualString("ZIP 6.3 (lzma)", archive_format_name(a)); + assertEqualString("vimrc", archive_entry_pathname(ae)); + assertEqualIntA(a, 0, extract_one(a, ae, 0xBA8E3BAA)); + assertEqualIntA(a, ARCHIVE_EOF, archive_read_next_header(a, &ae)); + assertEqualIntA(a, ARCHIVE_OK, archive_read_close(a)); + assertEqualIntA(a, ARCHIVE_OK, archive_read_free(a)); +} + +DEFINE_TEST(test_read_format_zip_lzma_stream_end_blockread) +{ + const char *refname = "test_read_format_zip_lzma_stream_end.zipx"; + struct archive *a; + struct archive_entry *ae; + + assert((a = archive_read_new()) != NULL); + if (ARCHIVE_OK != archive_read_support_filter_lzma(a)) { + skipping("lzma reading not fully supported on this platform"); + assertEqualInt(ARCHIVE_OK, archive_read_free(a)); + return; + } + extract_reference_file(refname); + + assertEqualIntA(a, ARCHIVE_OK, archive_read_support_format_zip(a)); + assertEqualIntA(a, ARCHIVE_OK, archive_read_open_filename(a, refname, 37)); + assertEqualIntA(a, ARCHIVE_OK, archive_read_next_header(a, &ae)); + assertEqualString("ZIP 6.3 (lzma)", archive_format_name(a)); + assertEqualString("vimrc", archive_entry_pathname(ae)); + assertEqualIntA(a, 0, extract_one_using_blocks(a, 13, 0xBA8E3BAA)); + assertEqualIntA(a, ARCHIVE_EOF, archive_read_next_header(a, &ae)); + assertEqualIntA(a, ARCHIVE_OK, archive_read_close(a)); + assertEqualIntA(a, ARCHIVE_OK, archive_read_free(a)); +} Copied: head/contrib/libarchive/libarchive/test/test_read_format_zip_lzma_stream_end.zipx.uu (from r358511, vendor/libarchive/dist/libarchive/test/test_read_format_zip_lzma_stream_end.zipx.uu) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/contrib/libarchive/libarchive/test/test_read_format_zip_lzma_stream_end.zipx.uu Mon Mar 2 08:44:58 2020 (r358533, copy of r358511, vendor/libarchive/dist/libarchive/test/test_read_format_zip_lzma_stream_end.zipx.uu) @@ -0,0 +1,19 @@ +begin 664 test_read_format_zip_lzma_stream_end.zipx +M4$L#!#\``@`.`#TQD4VJ.XZZ/@(``)`#```%````=FEM)82Q1PWAL +M+U`,N0L_$]^&650C/X$D6#4QFD$\A/"_![4!O/5O/!KH`WCQ*4?T2*]4P#/D +M0'9I?EZG=N69Z0V;H0I=CP*$?".I\ +MGMG/80.A'^W>R4J'S/CZ%P`8`>F=R>R&R$2T@EM#X)"OQH1?A7,`:4IU9WV! +M#2W*DXT',;.4YIN4A:-X)O=IREL201ZSOC=YSAU[C4-::/YV8\)%"L17+>VC +M%/'B]ZCQN$2(Q*9*\KJZ`Y131`]5C&G';@1S-QES_RZF!2OX45@58+??ES%( +MUJ<(\`11M$NO)HK#/MK-9RT"15.2I:IZN8VTM1_?$G\L#BH67]$S%[4 +M%C-$\Q<+./&HV](4,7)OL-@C^M0F"2O!0N$OHOW54H87^QLBQVH*D%A<#SI% +M/#+-5U(W';:KC)RE>0Y^5YI!RECQNR"R4.UW9IR!@:B!UB8?_D5$FT8YCJHJ +M2[2"-&-_D2BJ6#XK[6G=%K"%;'^-+0]FHCY4ER#`^ Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id A4B3225EEE8; Mon, 2 Mar 2020 08:45:34 +0000 (UTC) (envelope-from melifaro@ipfw.ru) Received: from forward501p.mail.yandex.net (forward501p.mail.yandex.net [77.88.28.111]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 48WDHb2g4hz4GqW; Mon, 2 Mar 2020 08:45:30 +0000 (UTC) (envelope-from melifaro@ipfw.ru) Received: from mxback28o.mail.yandex.net (mxback28o.mail.yandex.net [IPv6:2a02:6b8:0:1a2d::79]) by forward501p.mail.yandex.net (Yandex) with ESMTP id D3F6D3500771; Mon, 2 Mar 2020 11:45:27 +0300 (MSK) Received: from localhost (localhost [::1]) by mxback28o.mail.yandex.net (mxback/Yandex) with ESMTP id SVxI2ozUCe-jRF8ce70; Mon, 02 Mar 2020 11:45:27 +0300 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ipfw.ru; s=mail; t=1583138727; bh=LV5uAEYnYdJ3hMK4jAgIZC3CxlXJi3Ia0sHhCWA6e2Y=; h=References:Date:Message-Id:Subject:In-Reply-To:To:From; b=pb8F+YywLdXWGJdWFhX2RulZBXT/LcqMGkx4FTPJuK874XoTJy1NOaSUScVsbyVne DXfsV+pvXqK/00iCCKGzvQPRNSCAFOwdxwtGrXXJscFwAeQUhi1ikvij+Rc6OpXXbn 07RNE1vUmN4n+qo0sb8DBhOWiro2SyH9oKw1Ix0U= Received: by sas1-c7aad230fe87.qloud-c.yandex.net with HTTP; Mon, 02 Mar 2020 11:45:27 +0300 From: Alexander V. Chernikov To: Ryan Libby , "src-committers@freebsd.org" , "svn-src-all@freebsd.org" , "svn-src-head@freebsd.org" In-Reply-To: <202002281832.01SIWaEL071685@repo.freebsd.org> References: <202002281832.01SIWaEL071685@repo.freebsd.org> Subject: Re: svn commit: r358439 - head/sys/amd64/include MIME-Version: 1.0 X-Mailer: Yamail [ http://yandex.ru ] 5.0 Date: Mon, 02 Mar 2020 08:45:27 +0000 Message-Id: <5767791583138727@sas1-c7aad230fe87.qloud-c.yandex.net> Content-Transfer-Encoding: 8bit Content-Type: text/plain; charset=utf-8 X-Rspamd-Queue-Id: 48WDHb2g4hz4GqW X-Spamd-Bar: ------ Authentication-Results: mx1.freebsd.org; dkim=pass header.d=ipfw.ru header.s=mail header.b=pb8F+Yyw; dmarc=none; spf=pass (mx1.freebsd.org: domain of melifaro@ipfw.ru designates 77.88.28.111 as permitted sender) smtp.mailfrom=melifaro@ipfw.ru X-Spamd-Result: default: False [-6.28 / 15.00]; ARC_NA(0.00)[]; TO_DN_EQ_ADDR_SOME(0.00)[]; R_DKIM_ALLOW(-0.20)[ipfw.ru:s=mail]; NEURAL_HAM_MEDIUM(-0.99)[-0.992,0]; FROM_HAS_DN(0.00)[]; RCPT_COUNT_THREE(0.00)[4]; R_SPF_ALLOW(-0.20)[+ip4:77.88.0.0/18]; TO_MATCH_ENVRCPT_ALL(0.00)[]; MIME_GOOD(-0.10)[text/plain]; DMARC_NA(0.00)[ipfw.ru]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; TO_DN_SOME(0.00)[]; RCVD_COUNT_THREE(0.00)[3]; IP_SCORE(-3.69)[ip: (-9.77), ipnet: 77.88.0.0/18(-4.85), asn: 13238(-3.84), country: RU(0.01)]; DKIM_TRACE(0.00)[ipfw.ru:+]; RCVD_IN_DNSWL_LOW(-0.10)[111.28.88.77.list.dnswl.org : 127.0.5.1]; FROM_EQ_ENVFROM(0.00)[]; MIME_TRACE(0.00)[0:+]; ASN(0.00)[asn:13238, ipnet:77.88.0.0/18, country:RU]; RCVD_TLS_LAST(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, 02 Mar 2020 08:45:34 -0000 28.02.2020, 18:32, "Ryan Libby" : > Author: rlibby > Date: Fri Feb 28 18:32:36 2020 > New Revision: 358439 > URL: https://svnweb.freebsd.org/changeset/base/358439 > > Log: >   amd64 atomic.h: minor codegen optimization in flag access > >   Previously the pattern to extract status flags from inline assembly >   blocks was to use setcc in the block to write the flag to a register. >   This was suboptimal in a few ways: >    - It would lead to code like: sete %cl; test %cl; jne, i.e. a flag >      would just be loaded into a register and then reloaded to a flag. >    - The setcc would force the block to use an additional register. >    - If the client code didn't care for the flag value then the setcc >      would be entirely pointless but could not be eliminated by the >      optimizer. > >   A more modern inline asm construct (since gcc 6 and clang 9) allows for This effectively restricts kernel builds by all older compilers. Is there any chance of making it conditional depending on the compiler version/features? >   "flag output operands", where a C variable can be written directly from >   a flag. The optimizer can then use this to produce direct code where >   the flag does not take a trip through a register. > >   In practice this makes each affected operation sequence shorter by five >   bytes of instructions. It's unlikely this has a measurable performance >   impact. > >   Reviewed by: kib, markj, mjg >   Sponsored by: Dell EMC Isilon >   Differential Revision: https://reviews.freebsd.org/D23869 > > Modified: >   head/sys/amd64/include/atomic.h > > Modified: head/sys/amd64/include/atomic.h > ============================================================================== > --- head/sys/amd64/include/atomic.h Fri Feb 28 17:41:46 2020 (r358438) > +++ head/sys/amd64/include/atomic.h Fri Feb 28 18:32:36 2020 (r358439) > @@ -201,9 +201,8 @@ atomic_cmpset_##TYPE(volatile u_##TYPE *dst, u_##TYPE >          __asm __volatile( \ >          " " MPLOCKED " " \ >          " cmpxchg %3,%1 ; " \ > - " sete %0 ; " \ >          "# atomic_cmpset_" #TYPE " " \ > - : "=q" (res), /* 0 */ \ > + : "=@cce" (res), /* 0 */ \ >            "+m" (*dst), /* 1 */ \ >            "+a" (expect) /* 2 */ \ >          : "r" (src) /* 3 */ \ > @@ -219,9 +218,8 @@ atomic_fcmpset_##TYPE(volatile u_##TYPE *dst, u_##TYPE >          __asm __volatile( \ >          " " MPLOCKED " " \ >          " cmpxchg %3,%1 ; " \ > - " sete %0 ; " \ >          "# atomic_fcmpset_" #TYPE " " \ > - : "=q" (res), /* 0 */ \ > + : "=@cce" (res), /* 0 */ \ >            "+m" (*dst), /* 1 */ \ >            "+a" (*expect) /* 2 */ \ >          : "r" (src) /* 3 */ \ > @@ -278,9 +276,8 @@ atomic_testandset_int(volatile u_int *p, u_int v) >          __asm __volatile( >          " " MPLOCKED " " >          " btsl %2,%1 ; " > - " setc %0 ; " >          "# atomic_testandset_int" > - : "=q" (res), /* 0 */ > + : "=@ccc" (res), /* 0 */ >            "+m" (*p) /* 1 */ >          : "Ir" (v & 0x1f) /* 2 */ >          : "cc"); > @@ -295,9 +292,8 @@ atomic_testandset_long(volatile u_long *p, u_int v) >          __asm __volatile( >          " " MPLOCKED " " >          " btsq %2,%1 ; " > - " setc %0 ; " >          "# atomic_testandset_long" > - : "=q" (res), /* 0 */ > + : "=@ccc" (res), /* 0 */ >            "+m" (*p) /* 1 */ >          : "Jr" ((u_long)(v & 0x3f)) /* 2 */ >          : "cc"); > @@ -312,9 +308,8 @@ atomic_testandclear_int(volatile u_int *p, u_int v) >          __asm __volatile( >          " " MPLOCKED " " >          " btrl %2,%1 ; " > - " setc %0 ; " >          "# atomic_testandclear_int" > - : "=q" (res), /* 0 */ > + : "=@ccc" (res), /* 0 */ >            "+m" (*p) /* 1 */ >          : "Ir" (v & 0x1f) /* 2 */ >          : "cc"); > @@ -329,9 +324,8 @@ atomic_testandclear_long(volatile u_long *p, u_int v) >          __asm __volatile( >          " " MPLOCKED " " >          " btrq %2,%1 ; " > - " setc %0 ; " >          "# atomic_testandclear_long" > - : "=q" (res), /* 0 */ > + : "=@ccc" (res), /* 0 */ >            "+m" (*p) /* 1 */ >          : "Jr" ((u_long)(v & 0x3f)) /* 2 */ >          : "cc"); From owner-svn-src-all@freebsd.org Mon Mar 2 09:09:18 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id A85FC25FAA7; Mon, 2 Mar 2020 09:09:18 +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 48WDq161NBz3NRX; Mon, 2 Mar 2020 09:09:17 +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 1E74D1A0A8; Mon, 2 Mar 2020 09:09:17 +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 02299G68048014; Mon, 2 Mar 2020 09:09:16 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 02299G0S048013; Mon, 2 Mar 2020 09:09:16 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <202003020909.02299G0S048013@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Mon, 2 Mar 2020 09:09: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: r358534 - stable/12/sys/dev/acpica X-SVN-Group: stable-12 X-SVN-Commit-Author: hselasky X-SVN-Commit-Paths: stable/12/sys/dev/acpica X-SVN-Commit-Revision: 358534 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages 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, 02 Mar 2020 09:09:18 -0000 Author: hselasky Date: Mon Mar 2 09:09:16 2020 New Revision: 358534 URL: https://svnweb.freebsd.org/changeset/base/358534 Log: MFC r358219 and r358270: Make sure the ACPI lid state is updated during boot and after resume. While at it update the sysctl(9) description for the lid state. Always check return value from acpi_GetInteger(). If a failure happens reading the lid state, assume the lid is opened. Differential Revision: https://reviews.freebsd.org/D23724 PR: 240881 Submitted by: Yuri Pankov Sponsored by: Mellanox Technologies Modified: stable/12/sys/dev/acpica/acpi_lid.c Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/dev/acpica/acpi_lid.c ============================================================================== --- stable/12/sys/dev/acpica/acpi_lid.c Mon Mar 2 08:44:58 2020 (r358533) +++ stable/12/sys/dev/acpica/acpi_lid.c Mon Mar 2 09:09:16 2020 (r358534) @@ -84,6 +84,27 @@ static devclass_t acpi_lid_devclass; DRIVER_MODULE(acpi_lid, acpi, acpi_lid_driver, acpi_lid_devclass, 0, 0); MODULE_DEPEND(acpi_lid, acpi, 1, 1, 1); +static void +acpi_lid_status_update(struct acpi_lid_softc *sc) +{ + ACPI_STATUS status; + int lid_status; + + ACPI_FUNCTION_TRACE((char *)(uintptr_t)__func__); + + /* + * Evaluate _LID and check the return value, update lid status. + * Zero: The lid is closed + * Non-zero: The lid is open + */ + status = acpi_GetInteger(sc->lid_handle, "_LID", &lid_status); + if (ACPI_FAILURE(status)) + lid_status = 1; /* assume lid is opened */ + + /* range check value */ + sc->lid_status = lid_status ? 1 : 0; +} + static int acpi_lid_probe(device_t dev) { @@ -122,13 +143,16 @@ acpi_lid_attach(device_t dev) if (acpi_parse_prw(sc->lid_handle, &prw) == 0) AcpiEnableGpe(prw.gpe_handle, prw.gpe_bit); + /* Get the initial lid status */ + acpi_lid_status_update(sc); + /* * Export the lid status */ SYSCTL_ADD_INT(device_get_sysctl_ctx(dev), SYSCTL_CHILDREN(device_get_sysctl_tree(dev)), OID_AUTO, "state", CTLFLAG_RD, &sc->lid_status, 0, - "Device set to wake the system"); + "Device state (0 = closed, 1 = open)"); return (0); } @@ -142,6 +166,13 @@ acpi_lid_suspend(device_t dev) static int acpi_lid_resume(device_t dev) { + struct acpi_lid_softc *sc; + + sc = device_get_softc(dev); + + /* Update lid status, if any */ + acpi_lid_status_update(sc); + return (0); } @@ -150,21 +181,14 @@ acpi_lid_notify_status_changed(void *arg) { struct acpi_lid_softc *sc; struct acpi_softc *acpi_sc; - ACPI_STATUS status; ACPI_FUNCTION_TRACE((char *)(uintptr_t)__func__); sc = (struct acpi_lid_softc *)arg; ACPI_SERIAL_BEGIN(lid); - /* - * Evaluate _LID and check the return value, update lid status. - * Zero: The lid is closed - * Non-zero: The lid is open - */ - status = acpi_GetInteger(sc->lid_handle, "_LID", &sc->lid_status); - if (ACPI_FAILURE(status)) - goto out; + /* Update lid status, if any */ + acpi_lid_status_update(sc); acpi_sc = acpi_device_get_parent_softc(sc->lid_dev); if (acpi_sc == NULL) From owner-svn-src-all@freebsd.org Mon Mar 2 09:13:30 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 4268E25FF6E; Mon, 2 Mar 2020 09:13:30 +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 48WDvr3l8nz3x0H; Mon, 2 Mar 2020 09:13: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 3AFDF1A26F; Mon, 2 Mar 2020 09:13: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 0229DRCx053849; Mon, 2 Mar 2020 09:13:27 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 0229DRfU053848; Mon, 2 Mar 2020 09:13:27 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <202003020913.0229DRfU053848@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Mon, 2 Mar 2020 09:13: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: r358535 - stable/11/sys/dev/acpica X-SVN-Group: stable-11 X-SVN-Commit-Author: hselasky X-SVN-Commit-Paths: stable/11/sys/dev/acpica X-SVN-Commit-Revision: 358535 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages 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, 02 Mar 2020 09:13:30 -0000 Author: hselasky Date: Mon Mar 2 09:13:26 2020 New Revision: 358535 URL: https://svnweb.freebsd.org/changeset/base/358535 Log: MFC r315166: Export the actual LID state via sysctl. This allows more complex policies about when to suspend based on other events happening AND the lid being closed through the use of clever devd or other scripts. Modified: stable/11/sys/dev/acpica/acpi_lid.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/dev/acpica/acpi_lid.c ============================================================================== --- stable/11/sys/dev/acpica/acpi_lid.c Mon Mar 2 09:09:16 2020 (r358534) +++ stable/11/sys/dev/acpica/acpi_lid.c Mon Mar 2 09:13:26 2020 (r358535) @@ -122,6 +122,14 @@ acpi_lid_attach(device_t dev) if (acpi_parse_prw(sc->lid_handle, &prw) == 0) AcpiEnableGpe(prw.gpe_handle, prw.gpe_bit); + /* + * Export the lid status + */ + SYSCTL_ADD_INT(device_get_sysctl_ctx(dev), + SYSCTL_CHILDREN(device_get_sysctl_tree(dev)), OID_AUTO, + "state", CTLFLAG_RD, &sc->lid_status, 0, + "Device set to wake the system"); + return (0); } From owner-svn-src-all@freebsd.org Mon Mar 2 09:16:51 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 07CF41A814E; Mon, 2 Mar 2020 09:16:51 +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 48WDzj53DWz40jk; Mon, 2 Mar 2020 09:16: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 2614A1A272; Mon, 2 Mar 2020 09:16: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 0229Gmg9054519; Mon, 2 Mar 2020 09:16:48 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 0229Gmka054518; Mon, 2 Mar 2020 09:16:48 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <202003020916.0229Gmka054518@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Mon, 2 Mar 2020 09:16:48 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r358536 - stable/11/sys/dev/acpica X-SVN-Group: stable-11 X-SVN-Commit-Author: hselasky X-SVN-Commit-Paths: stable/11/sys/dev/acpica X-SVN-Commit-Revision: 358536 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages 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, 02 Mar 2020 09:16:51 -0000 Author: hselasky Date: Mon Mar 2 09:16:48 2020 New Revision: 358536 URL: https://svnweb.freebsd.org/changeset/base/358536 Log: MFC r358219 and r358270: Make sure the ACPI lid state is updated during boot and after resume. While at it update the sysctl(9) description for the lid state. Always check return value from acpi_GetInteger(). If a failure happens reading the lid state, assume the lid is opened. Differential Revision: https://reviews.freebsd.org/D23724 PR: 240881 Submitted by: Yuri Pankov Sponsored by: Mellanox Technologies Modified: stable/11/sys/dev/acpica/acpi_lid.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/dev/acpica/acpi_lid.c ============================================================================== --- stable/11/sys/dev/acpica/acpi_lid.c Mon Mar 2 09:13:26 2020 (r358535) +++ stable/11/sys/dev/acpica/acpi_lid.c Mon Mar 2 09:16:48 2020 (r358536) @@ -84,6 +84,27 @@ static devclass_t acpi_lid_devclass; DRIVER_MODULE(acpi_lid, acpi, acpi_lid_driver, acpi_lid_devclass, 0, 0); MODULE_DEPEND(acpi_lid, acpi, 1, 1, 1); +static void +acpi_lid_status_update(struct acpi_lid_softc *sc) +{ + ACPI_STATUS status; + int lid_status; + + ACPI_FUNCTION_TRACE((char *)(uintptr_t)__func__); + + /* + * Evaluate _LID and check the return value, update lid status. + * Zero: The lid is closed + * Non-zero: The lid is open + */ + status = acpi_GetInteger(sc->lid_handle, "_LID", &lid_status); + if (ACPI_FAILURE(status)) + lid_status = 1; /* assume lid is opened */ + + /* range check value */ + sc->lid_status = lid_status ? 1 : 0; +} + static int acpi_lid_probe(device_t dev) { @@ -122,13 +143,16 @@ acpi_lid_attach(device_t dev) if (acpi_parse_prw(sc->lid_handle, &prw) == 0) AcpiEnableGpe(prw.gpe_handle, prw.gpe_bit); + /* Get the initial lid status */ + acpi_lid_status_update(sc); + /* * Export the lid status */ SYSCTL_ADD_INT(device_get_sysctl_ctx(dev), SYSCTL_CHILDREN(device_get_sysctl_tree(dev)), OID_AUTO, "state", CTLFLAG_RD, &sc->lid_status, 0, - "Device set to wake the system"); + "Device state (0 = closed, 1 = open)"); return (0); } @@ -142,6 +166,13 @@ acpi_lid_suspend(device_t dev) static int acpi_lid_resume(device_t dev) { + struct acpi_lid_softc *sc; + + sc = device_get_softc(dev); + + /* Update lid status, if any */ + acpi_lid_status_update(sc); + return (0); } @@ -150,21 +181,14 @@ acpi_lid_notify_status_changed(void *arg) { struct acpi_lid_softc *sc; struct acpi_softc *acpi_sc; - ACPI_STATUS status; ACPI_FUNCTION_TRACE((char *)(uintptr_t)__func__); sc = (struct acpi_lid_softc *)arg; ACPI_SERIAL_BEGIN(lid); - /* - * Evaluate _LID and check the return value, update lid status. - * Zero: The lid is closed - * Non-zero: The lid is open - */ - status = acpi_GetInteger(sc->lid_handle, "_LID", &sc->lid_status); - if (ACPI_FAILURE(status)) - goto out; + /* Update lid status, if any */ + acpi_lid_status_update(sc); acpi_sc = acpi_device_get_parent_softc(sc->lid_dev); if (acpi_sc == NULL) From owner-svn-src-all@freebsd.org Mon Mar 2 09:45:08 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 432061A8C40; Mon, 2 Mar 2020 09:45:08 +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 48WFcL6PbXz3CcP; Mon, 2 Mar 2020 09:45:06 +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 CF5441A7F7; Mon, 2 Mar 2020 09:45:06 +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 0229j6q0072819; Mon, 2 Mar 2020 09:45:06 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 0229j6q0072818; Mon, 2 Mar 2020 09:45:06 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <202003020945.0229j6q0072818@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Mon, 2 Mar 2020 09:45:06 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r358537 - head/sys/dev/acpica X-SVN-Group: head X-SVN-Commit-Author: hselasky X-SVN-Commit-Paths: head/sys/dev/acpica X-SVN-Commit-Revision: 358537 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages 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, 02 Mar 2020 09:45:08 -0000 Author: hselasky Date: Mon Mar 2 09:45:06 2020 New Revision: 358537 URL: https://svnweb.freebsd.org/changeset/base/358537 Log: Expose the ACPI power button, sleep button and LID state as evdev's. This allows libinput to disable touchpads when the lid is closed and various desktop environments can show power-off dialogs when the power button is pressed. While the latter is doable with devd a cross-platform solution is nicer. Submitted by: Greg V Differential Revision: https://reviews.freebsd.org/D23863 MFC after: 1 week Sponsored by: Mellanox Technologies Modified: head/sys/dev/acpica/acpi_button.c head/sys/dev/acpica/acpi_lid.c Modified: head/sys/dev/acpica/acpi_button.c ============================================================================== --- head/sys/dev/acpica/acpi_button.c Mon Mar 2 09:16:48 2020 (r358536) +++ head/sys/dev/acpica/acpi_button.c Mon Mar 2 09:45:06 2020 (r358537) @@ -30,6 +30,7 @@ __FBSDID("$FreeBSD$"); #include "opt_acpi.h" +#include "opt_evdev.h" #include #include #include @@ -40,6 +41,11 @@ __FBSDID("$FreeBSD$"); #include +#ifdef EVDEV_SUPPORT +#include +#include +#endif + /* Hooks for the ACPI CA debugging infrastructure */ #define _COMPONENT ACPI_BUTTON ACPI_MODULE_NAME("BUTTON") @@ -51,6 +57,9 @@ struct acpi_button_softc { #define ACPI_POWER_BUTTON 0 #define ACPI_SLEEP_BUTTON 1 boolean_t fixed; +#ifdef EVDEV_SUPPORT + struct evdev_dev *button_evdev; +#endif }; #define ACPI_NOTIFY_BUTTON_PRESSED_FOR_SLEEP 0x80 @@ -142,6 +151,20 @@ acpi_button_attach(device_t dev) event = (sc->button_type == ACPI_SLEEP_BUTTON) ? ACPI_EVENT_SLEEP_BUTTON : ACPI_EVENT_POWER_BUTTON; +#ifdef EVDEV_SUPPORT + sc->button_evdev = evdev_alloc(); + evdev_set_name(sc->button_evdev, device_get_desc(dev)); + evdev_set_phys(sc->button_evdev, device_get_nameunit(dev)); + evdev_set_id(sc->button_evdev, BUS_HOST, 0, 0, 1); + evdev_support_event(sc->button_evdev, EV_SYN); + evdev_support_event(sc->button_evdev, EV_KEY); + evdev_support_key(sc->button_evdev, + (sc->button_type == ACPI_SLEEP_BUTTON) ? KEY_SLEEP : KEY_POWER); + + if (evdev_register(sc->button_evdev)) + return (ENXIO); +#endif + /* * Install the new handler. We could remove any fixed handlers added * from the FADT once we have a duplicate from the AML but some systems @@ -248,6 +271,9 @@ static void acpi_button_notify_handler(ACPI_HANDLE h, UINT32 notify, void *context) { struct acpi_button_softc *sc; +#ifdef EVDEV_SUPPORT + uint16_t key; +#endif ACPI_FUNCTION_TRACE_U32((char *)(uintptr_t)__func__, notify); @@ -263,6 +289,14 @@ acpi_button_notify_handler(ACPI_HANDLE h, UINT32 notif device_printf(sc->button_dev, "unknown notify %#x\n", notify); break; } + +#ifdef EVDEV_SUPPORT + key = (sc->button_type == ACPI_SLEEP_BUTTON) ? KEY_SLEEP : KEY_POWER; + evdev_push_key(sc->button_evdev, key, 1); + evdev_sync(sc->button_evdev); + evdev_push_key(sc->button_evdev, key, 0); + evdev_sync(sc->button_evdev); +#endif } static ACPI_STATUS Modified: head/sys/dev/acpica/acpi_lid.c ============================================================================== --- head/sys/dev/acpica/acpi_lid.c Mon Mar 2 09:16:48 2020 (r358536) +++ head/sys/dev/acpica/acpi_lid.c Mon Mar 2 09:45:06 2020 (r358537) @@ -31,6 +31,7 @@ __FBSDID("$FreeBSD$"); #include "opt_acpi.h" +#include "opt_evdev.h" #include #include #include @@ -43,6 +44,11 @@ __FBSDID("$FreeBSD$"); #include +#ifdef EVDEV_SUPPORT +#include +#include +#endif + /* Hooks for the ACPI CA debugging infrastructure */ #define _COMPONENT ACPI_BUTTON ACPI_MODULE_NAME("LID") @@ -51,6 +57,9 @@ struct acpi_lid_softc { device_t lid_dev; ACPI_HANDLE lid_handle; int lid_status; /* open or closed */ +#ifdef EVDEV_SUPPORT + struct evdev_dev *lid_evdev; +#endif }; ACPI_HANDLE acpi_lid_handle; @@ -104,6 +113,12 @@ acpi_lid_status_update(struct acpi_lid_softc *sc) /* range check value */ sc->lid_status = lid_status ? 1 : 0; + +#ifdef EVDEV_SUPPORT + /* Notify evdev about lid status */ + evdev_push_sw(sc->lid_evdev, SW_LID, lid_status ? 0 : 1); + evdev_sync(sc->lid_evdev); +#endif } static int @@ -131,6 +146,20 @@ acpi_lid_attach(device_t dev) sc = device_get_softc(dev); sc->lid_dev = dev; acpi_lid_handle = sc->lid_handle = acpi_get_handle(dev); + +#ifdef EVDEV_SUPPORT + /* Register evdev device before initial status update */ + sc->lid_evdev = evdev_alloc(); + evdev_set_name(sc->lid_evdev, device_get_desc(dev)); + evdev_set_phys(sc->lid_evdev, device_get_nameunit(dev)); + evdev_set_id(sc->lid_evdev, BUS_HOST, 0, 0, 1); + evdev_support_event(sc->lid_evdev, EV_SYN); + evdev_support_event(sc->lid_evdev, EV_SW); + evdev_support_sw(sc->lid_evdev, SW_LID); + + if (evdev_register(sc->lid_evdev)) + return (ENXIO); +#endif /* * If a system does not get lid events, it may make sense to change From owner-svn-src-all@freebsd.org Mon Mar 2 13:11:55 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id B01FC1AE34B; Mon, 2 Mar 2020 13:11:55 +0000 (UTC) (envelope-from carpeddiem@gmail.com) Received: from mail-io1-f47.google.com (mail-io1-f47.google.com [209.85.166.47]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1O1" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 48WLBy4fm5z4PCl; Mon, 2 Mar 2020 13:11:54 +0000 (UTC) (envelope-from carpeddiem@gmail.com) Received: by mail-io1-f47.google.com with SMTP id m22so5053915ioj.7; Mon, 02 Mar 2020 05:11:54 -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=FCy1AEYtH3GvAwTDryhWo5F+/c0qQrNYEBCPjIQ8iJM=; b=QqYok49GqnDqDAMMYRa3NVbBg3a0KX1OVNW/4N9LwOC4W6PcDPyp+HzmSshvftr6jX GQ/XI1QOkXm8WLxCLaK9EDr2G+8/suQSIhm8LkvsZVz2c+6YML9hrY3scYv0nsGNyhjw WCAOtAxNAsgzHK3PAfVpbp2XsF0HOEJlglJjAd3ogE5mw5M4XlhZ7s8M3KXmYrHlTi9Z RWNa1KRQL1s5+AkzOC+DCZQKXMmxxeIQ1eAH9hGS2OppDaZgRd4Kn+iWemljXbDuRkGn m4xFbudnVbTciLUQNkpk7rQecrmbFSqrPfdsXQtbVZPL/3TnvZpKN7Hq2z99dFWKIS8n CbLw== X-Gm-Message-State: APjAAAXpQi0oD6ylb3YUbaMytVrDvkp1W+sZf93DzhKXroql0prueJbW kqknAhhm+6fJ3UyWa8aeTlkPld2KlSzo1qcMpQUA9K7f X-Google-Smtp-Source: APXvYqzZjR4Ue1Ksp7C8JxLVr0VbUH0bxun/BazvZ2h8hHQLGUyaNn/noWagzKdVi+jVxbBo3R7v4vHfLx/oXht5djc= X-Received: by 2002:a6b:400b:: with SMTP id k11mr13083675ioa.256.1583154712503; Mon, 02 Mar 2020 05:11:52 -0800 (PST) MIME-Version: 1.0 References: <202003020422.0224Mdfa076913@repo.freebsd.org> In-Reply-To: <202003020422.0224Mdfa076913@repo.freebsd.org> From: Ed Maste Date: Sun, 1 Mar 2020 22:28:35 -0500 Message-ID: Subject: Re: svn commit: r358518 - head/usr.bin/elfctl To: Kyle Evans Cc: src-committers , svn-src-all , svn-src-head Content-Type: text/plain; charset="UTF-8" X-Rspamd-Queue-Id: 48WLBy4fm5z4PCl X-Spamd-Bar: ----- Authentication-Results: mx1.freebsd.org; none X-Spamd-Result: default: False [-6.00 / 15.00]; NEURAL_HAM_MEDIUM(-1.00)[-0.998,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, 02 Mar 2020 13:11:55 -0000 On Sun, 1 Mar 2020 at 23:22, Kyle Evans wrote: > > Author: kevans > Date: Mon Mar 2 04:22:38 2020 > New Revision: 358518 > URL: https://svnweb.freebsd.org/changeset/base/358518 > > Log: > elfctl: initialize features > > GCC points out a couple levels down in convert_to_features that this may be > used uninitialized. Indeed, this is true- initialize it to NULL so that we > at least deref a null pointer. Note that features is only used in the case that editfeatures = 1, so I believe this is a false positive from GCC. But, thank you for fixing the warning / build. This code code definitely use some style(9) and tidying; I'll try to get to that shortly. From owner-svn-src-all@freebsd.org Mon Mar 2 13:12:46 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 324DD1AE578; Mon, 2 Mar 2020 13:12:46 +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 48WLCx4ndFz4Qy8; Mon, 2 Mar 2020 13:12:45 +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 83C311CE2F; Mon, 2 Mar 2020 13:12:45 +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 022DCjtJ004084; Mon, 2 Mar 2020 13:12:45 GMT (envelope-from bz@FreeBSD.org) Received: (from bz@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 022DCjhb004083; Mon, 2 Mar 2020 13:12:45 GMT (envelope-from bz@FreeBSD.org) Message-Id: <202003021312.022DCjhb004083@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bz set sender to bz@FreeBSD.org using -f From: "Bjoern A. Zeeb" Date: Mon, 2 Mar 2020 13:12:45 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r358538 - stable/12/sys/netinet6 X-SVN-Group: stable-12 X-SVN-Commit-Author: bz X-SVN-Commit-Paths: stable/12/sys/netinet6 X-SVN-Commit-Revision: 358538 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages 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, 02 Mar 2020 13:12:46 -0000 Author: bz Date: Mon Mar 2 13:12:45 2020 New Revision: 358538 URL: https://svnweb.freebsd.org/changeset/base/358538 Log: MFC r358071: ip6_output: update comments. Clear up some comments and improve to panic messages. No functional changes. 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 Mon Mar 2 09:45:06 2020 (r358537) +++ stable/12/sys/netinet6/ip6_output.c Mon Mar 2 13:12:45 2020 (r358538) @@ -179,7 +179,9 @@ static int copypktopts(struct ip6_pktopts *, struct ip do {\ if (m) {\ if (!hdrsplit) \ - panic("assumption failed: hdr not split"); \ + panic("%s:%d: assumption failed: "\ + "hdr not split: hdrsplit %d exthdrs %p",\ + __func__, __LINE__, hdrsplit, &exthdrs);\ *mtod((m), u_char *) = *(p);\ *(p) = (i);\ p = mtod((m), u_char *);\ @@ -277,8 +279,9 @@ ip6_fragment(struct ifnet *ifp, struct mbuf *m0, int h } /* - * IP6 output. The packet in mbuf chain m contains a skeletal IP6 - * header (with pri, len, nxt, hlim, src, dst). + * IP6 output. + * The packet in mbuf chain m contains a skeletal IP6 header (with pri, len, + * nxt, hlim, src, dst). * This function may modify ver and hlim only. * The mbuf chain containing the packet will be freed. * The mbuf opt, if present, will not be freed. @@ -286,9 +289,8 @@ ip6_fragment(struct ifnet *ifp, struct mbuf *m0, int h * skipped and ro->ro_rt would be used. If ro is present but ro->ro_rt is NULL, * then result of route lookup is stored in ro->ro_rt. * - * type of "mtu": rt_mtu is u_long, ifnet.ifr_mtu is int, and - * nd_ifinfo.linkmtu is u_int32_t. so we use u_long to hold largest one, - * which is rt_mtu. + * Type of "mtu": rt_mtu is u_long, ifnet.ifr_mtu is int, and nd_ifinfo.linkmtu + * is uint32_t. So we use u_long to hold largest one, which is rt_mtu. * * ifpp - XXX: just for statistics */ @@ -329,7 +331,7 @@ ip6_output(struct mbuf *m0, struct ip6_pktopts *opt, INP_LOCK_ASSERT(inp); M_SETFIB(m, inp->inp_inc.inc_fibnum); if ((flags & IP_NODEFAULTFLOWID) == 0) { - /* unconditionally set flowid */ + /* Unconditionally set flowid. */ m->m_pkthdr.flowid = inp->inp_flowid; M_HASHTYPE_SET(m, inp->inp_flowtype); } @@ -352,12 +354,12 @@ ip6_output(struct mbuf *m0, struct ip6_pktopts *opt, bzero(&exthdrs, sizeof(exthdrs)); if (opt) { - /* Hop-by-Hop options header */ + /* Hop-by-Hop options header. */ MAKE_EXTHDR(opt->ip6po_hbh, &exthdrs.ip6e_hbh); - /* Destination options header(1st part) */ + /* Destination options header (1st part). */ if (opt->ip6po_rthdr) { /* - * Destination options header(1st part) + * Destination options header (1st part). * This only makes sense with a routing header. * See Section 9.2 of RFC 3542. * Disabling this part just for MIP6 convenience is @@ -368,9 +370,9 @@ ip6_output(struct mbuf *m0, struct ip6_pktopts *opt, */ MAKE_EXTHDR(opt->ip6po_dest1, &exthdrs.ip6e_dest1); } - /* Routing header */ + /* Routing header. */ MAKE_EXTHDR(opt->ip6po_rthdr, &exthdrs.ip6e_rthdr); - /* Destination options header(2nd part) */ + /* Destination options header (2nd part). */ MAKE_EXTHDR(opt->ip6po_dest2, &exthdrs.ip6e_dest2); } @@ -387,7 +389,7 @@ ip6_output(struct mbuf *m0, struct ip6_pktopts *opt, optlen += exthdrs.ip6e_rthdr->m_len; unfragpartlen = optlen + sizeof(struct ip6_hdr); - /* NOTE: we don't add AH/ESP length here (done in ip6_ipsec_output) */ + /* NOTE: we don't add AH/ESP length here (done in ip6_ipsec_output). */ if (exthdrs.ip6e_dest2) optlen += exthdrs.ip6e_dest2->m_len; @@ -406,7 +408,7 @@ ip6_output(struct mbuf *m0, struct ip6_pktopts *opt, ip6 = mtod(m, struct ip6_hdr *); - /* adjust mbuf packet header length */ + /* Adjust mbuf packet header length. */ m->m_pkthdr.len += optlen; plen = m->m_pkthdr.len - sizeof(*ip6); @@ -420,7 +422,7 @@ ip6_output(struct mbuf *m0, struct ip6_pktopts *opt, m = exthdrs.ip6e_ip6; hdrsplit++; } - /* adjust pointer */ + /* Adjust pointer. */ ip6 = mtod(m, struct ip6_hdr *); if ((error = ip6_insert_jumboopt(&exthdrs, plen)) != 0) goto freehdrs; @@ -432,26 +434,29 @@ ip6_output(struct mbuf *m0, struct ip6_pktopts *opt, * Concatenate headers and fill in next header fields. * Here we have, on "m" * IPv6 payload - * and we insert headers accordingly. Finally, we should be getting: - * IPv6 hbh dest1 rthdr ah* [esp* dest2 payload] + * and we insert headers accordingly. + * Finally, we should be getting: + * IPv6 hbh dest1 rthdr ah* [esp* dest2 payload]. * - * during the header composing process, "m" points to IPv6 header. - * "mprev" points to an extension header prior to esp. + * During the header composing process "m" points to IPv6 + * header. "mprev" points to an extension header prior to esp. */ u_char *nexthdrp = &ip6->ip6_nxt; mprev = m; /* - * we treat dest2 specially. this makes IPsec processing - * much easier. the goal here is to make mprev point the + * We treat dest2 specially. This makes IPsec processing + * much easier. The goal here is to make mprev point the * mbuf prior to dest2. * - * result: IPv6 dest2 payload + * Result: IPv6 dest2 payload. * m and mprev will point to IPv6 header. */ if (exthdrs.ip6e_dest2) { if (!hdrsplit) - panic("assumption failed: hdr not split"); + panic("%s:%d: assumption failed: " + "hdr not split: hdrsplit %d exthdrs %p", + __func__, __LINE__, hdrsplit, &exthdrs); exthdrs.ip6e_dest2->m_next = m->m_next; m->m_next = exthdrs.ip6e_dest2; *mtod(exthdrs.ip6e_dest2, u_char *) = ip6->ip6_nxt; @@ -459,7 +464,7 @@ ip6_output(struct mbuf *m0, struct ip6_pktopts *opt, } /* - * result: IPv6 hbh dest1 rthdr dest2 payload + * Result: IPv6 hbh dest1 rthdr dest2 payload. * m will point to IPv6 header. mprev will point to the * extension header prior to dest2 (rthdr in the above case). */ @@ -469,15 +474,13 @@ ip6_output(struct mbuf *m0, struct ip6_pktopts *opt, MAKE_CHAIN(exthdrs.ip6e_rthdr, mprev, nexthdrp, IPPROTO_ROUTING); - /* - * If there is a routing header, discard the packet. - */ + /* If there is a routing header, discard the packet. */ if (exthdrs.ip6e_rthdr) { error = EINVAL; goto bad; } - /* Source address validation */ + /* Source address validation. */ if (IN6_IS_ADDR_UNSPECIFIED(&ip6->ip6_src) && (flags & IPV6_UNSPECSRC) == 0) { error = EOPNOTSUPP; @@ -492,9 +495,7 @@ ip6_output(struct mbuf *m0, struct ip6_pktopts *opt, IP6STAT_INC(ip6s_localout); - /* - * Route packet. - */ + /* Route packet. */ if (ro == NULL) { ro = &ip6route; bzero((caddr_t)ro, sizeof(*ro)); @@ -506,9 +507,9 @@ ip6_output(struct mbuf *m0, struct ip6_pktopts *opt, fibnum = (inp != NULL) ? inp->inp_inc.inc_fibnum : M_GETFIB(m); again: /* - * if specified, try to fill in the traffic class field. - * do not override if a non-zero value is already set. - * we check the diffserv field and the ecn field separately. + * If specified, try to fill in the traffic class field. + * Do not override if a non-zero value is already set. + * We check the diffserv field and the ECN field separately. */ if (opt && opt->ip6po_tclass >= 0) { int mask = 0; @@ -521,7 +522,7 @@ again: ip6->ip6_flow |= htonl((opt->ip6po_tclass & mask) << 20); } - /* fill in or override the hop limit field, if necessary. */ + /* Fill in or override the hop limit field, if necessary. */ if (opt && opt->ip6po_hlim != -1) ip6->ip6_hlim = opt->ip6po_hlim & 0xff; else if (IN6_IS_ADDR_MULTICAST(&ip6->ip6_dst)) { @@ -533,7 +534,7 @@ again: /* * Validate route against routing table additions; * a better/more specific route might have been added. - * Make sure address family is set in route. + * Make sure that the address family is set in route. */ if (inp) { ro->ro_dst.sin6_family = AF_INET6; @@ -564,15 +565,13 @@ again: } if (rt == NULL) { /* - * If in6_selectroute() does not return a route entry, + * If in6_selectroute() does not return a route entry * dst may not have been updated. */ *dst = dst_sa; /* XXX */ } - /* - * then rt (for unicast) and ifp must be non-NULL valid values. - */ + /* Then rt (for unicast) and ifp must be non-NULL valid values. */ if ((flags & IPV6_FORWARDING) == 0) { /* XXX: the FORWARDING flag can be set for mrouting. */ in6_ifstat_inc(ifp, ifs6_out_request); @@ -590,7 +589,7 @@ again: src_sa.sin6_addr = ip6->ip6_src; dst0 = ip6->ip6_dst; - /* re-initialize to be sure */ + /* Re-initialize to be sure. */ bzero(&dst_sa, sizeof(dst_sa)); dst_sa.sin6_family = AF_INET6; dst_sa.sin6_len = sizeof(dst_sa); @@ -607,7 +606,7 @@ again: * * 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 + * there is a trick 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 @@ -645,7 +644,6 @@ again: error = EHOSTUNREACH; /* XXX */ goto bad; } - /* All scope ID checks are successful. */ if (rt && !IN6_IS_ADDR_MULTICAST(&ip6->ip6_dst)) { @@ -662,13 +660,12 @@ again: } if (!IN6_IS_ADDR_MULTICAST(&ip6->ip6_dst)) { - m->m_flags &= ~(M_BCAST | M_MCAST); /* just in case */ + m->m_flags &= ~(M_BCAST | M_MCAST); /* Just in case. */ } else { m->m_flags = (m->m_flags & ~M_BCAST) | M_MCAST; in6_ifstat_inc(ifp, ifs6_out_mcast); - /* - * Confirm that the outgoing interface supports multicast. - */ + + /* Confirm that the outgoing interface supports multicast. */ if (!(ifp->if_flags & IFF_MULTICAST)) { IP6STAT_INC(ip6s_noroute); in6_ifstat_inc(ifp, ifs6_out_discard); @@ -763,8 +760,8 @@ again: } /* - * clear embedded scope identifiers if necessary. - * in6_clearscope will touch the addresses only when necessary. + * Clear embedded scope identifiers if necessary. + * in6_clearscope() will touch the addresses only when necessary. */ in6_clearscope(&ip6->ip6_src); in6_clearscope(&ip6->ip6_dst); @@ -794,7 +791,7 @@ again: if (ip6_process_hopopts(m, (u_int8_t *)(hbh + 1), ((hbh->ip6h_len + 1) << 3) - sizeof(struct ip6_hbh), &dummy, &plen) < 0) { - /* m was already freed at this point */ + /* m was already freed at this point. */ error = EINVAL;/* better error? */ goto done; } @@ -881,7 +878,7 @@ passout: * Send the packet to the outgoing interface. * If necessary, do IPv6 fragmentation before sending. * - * the logic here is rather complex: + * The logic here is rather complex: * 1: normal case (dontfrag == 0, alwaysfrag == 0) * 1-a: send as is if tlen <= path mtu * 1-b: fragment if tlen > path mtu @@ -894,7 +891,7 @@ passout: * always fragment * * 4: if dontfrag == 1 && alwaysfrag == 1 - * error, as we cannot handle this conflicting request + * error, as we cannot handle this conflicting request. */ sw_csum = m->m_pkthdr.csum_flags; if (!hdrsplit) { @@ -925,12 +922,12 @@ passout: dontfrag = 1; else dontfrag = 0; - if (dontfrag && alwaysfrag) { /* case 4 */ - /* conflicting request - can't transmit */ + if (dontfrag && alwaysfrag) { /* Case 4. */ + /* Conflicting request - can't transmit. */ error = EMSGSIZE; goto bad; } - if (dontfrag && tlen > IN6_LINKMTU(ifp) && !tso) { /* case 2-b */ + if (dontfrag && tlen > IN6_LINKMTU(ifp) && !tso) { /* Case 2-b. */ /* * Even if the DONTFRAG option is specified, we cannot send the * packet when the data length is larger than the MTU of the @@ -945,10 +942,8 @@ passout: goto bad; } - /* - * transmit packet without fragmentation - */ - if (dontfrag || (!alwaysfrag && tlen <= mtu)) { /* case 1-a and 2-a */ + /* Transmit packet without fragmentation. */ + if (dontfrag || (!alwaysfrag && tlen <= mtu)) { /* Cases 1-a and 2-a. */ struct in6_ifaddr *ia6; ip6 = mtod(m, struct ip6_hdr *); @@ -981,16 +976,14 @@ passout: goto done; } - /* - * try to fragment the packet. case 1-b and 3 - */ + /* Try to fragment the packet. Cases 1-b and 3. */ if (mtu < IPV6_MMTU) { - /* path MTU cannot be less than IPV6_MMTU */ + /* Path MTU cannot be less than IPV6_MMTU. */ error = EMSGSIZE; in6_ifstat_inc(ifp, ifs6_out_fragfail); goto bad; } else if (ip6->ip6_plen == 0) { - /* jumbo payload cannot be fragmented */ + /* Jumbo payload cannot be fragmented. */ error = EMSGSIZE; in6_ifstat_inc(ifp, ifs6_out_fragfail); goto bad; @@ -1059,9 +1052,7 @@ passout: in6_ifstat_inc(ifp, ifs6_out_fragok); } - /* - * Remove leading garbages. - */ + /* Remove leading garbage. */ sendorfree: m = m0->m_nextpkt; m0->m_nextpkt = 0; @@ -1107,7 +1098,7 @@ done: return (error); freehdrs: - m_freem(exthdrs.ip6e_hbh); /* m_freem will check if mbuf is 0 */ + m_freem(exthdrs.ip6e_hbh); /* m_freem() checks if mbuf is NULL. */ m_freem(exthdrs.ip6e_dest1); m_freem(exthdrs.ip6e_rthdr); m_freem(exthdrs.ip6e_dest2); From owner-svn-src-all@freebsd.org Mon Mar 2 13:13:43 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 3D6D61AE627; Mon, 2 Mar 2020 13:13:43 +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 48WLF26bPgz4SlD; Mon, 2 Mar 2020 13:13:42 +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 97A0F1CE30; Mon, 2 Mar 2020 13:13:42 +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 022DDgbY004262; Mon, 2 Mar 2020 13:13:42 GMT (envelope-from bz@FreeBSD.org) Received: (from bz@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 022DDgfS004261; Mon, 2 Mar 2020 13:13:42 GMT (envelope-from bz@FreeBSD.org) Message-Id: <202003021313.022DDgfS004261@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bz set sender to bz@FreeBSD.org using -f From: "Bjoern A. Zeeb" Date: Mon, 2 Mar 2020 13:13:42 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r358539 - stable/11/sys/netinet6 X-SVN-Group: stable-11 X-SVN-Commit-Author: bz X-SVN-Commit-Paths: stable/11/sys/netinet6 X-SVN-Commit-Revision: 358539 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages 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, 02 Mar 2020 13:13:43 -0000 Author: bz Date: Mon Mar 2 13:13:42 2020 New Revision: 358539 URL: https://svnweb.freebsd.org/changeset/base/358539 Log: MFC r358071: ip6_output: update comments. Clear up some comments and improve to panic messages. No functional changes. 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 Mon Mar 2 13:12:45 2020 (r358538) +++ stable/11/sys/netinet6/ip6_output.c Mon Mar 2 13:13:42 2020 (r358539) @@ -180,7 +180,9 @@ static int copypktopts(struct ip6_pktopts *, struct ip do {\ if (m) {\ if (!hdrsplit) \ - panic("assumption failed: hdr not split"); \ + panic("%s:%d: assumption failed: "\ + "hdr not split: hdrsplit %d exthdrs %p",\ + __func__, __LINE__, hdrsplit, &exthdrs);\ *mtod((m), u_char *) = *(p);\ *(p) = (i);\ p = mtod((m), u_char *);\ @@ -278,8 +280,9 @@ ip6_fragment(struct ifnet *ifp, struct mbuf *m0, int h } /* - * IP6 output. The packet in mbuf chain m contains a skeletal IP6 - * header (with pri, len, nxt, hlim, src, dst). + * IP6 output. + * The packet in mbuf chain m contains a skeletal IP6 header (with pri, len, + * nxt, hlim, src, dst). * This function may modify ver and hlim only. * The mbuf chain containing the packet will be freed. * The mbuf opt, if present, will not be freed. @@ -287,9 +290,8 @@ ip6_fragment(struct ifnet *ifp, struct mbuf *m0, int h * skipped and ro->ro_rt would be used. If ro is present but ro->ro_rt is NULL, * then result of route lookup is stored in ro->ro_rt. * - * type of "mtu": rt_mtu is u_long, ifnet.ifr_mtu is int, and - * nd_ifinfo.linkmtu is u_int32_t. so we use u_long to hold largest one, - * which is rt_mtu. + * Type of "mtu": rt_mtu is u_long, ifnet.ifr_mtu is int, and nd_ifinfo.linkmtu + * is uint32_t. So we use u_long to hold largest one, which is rt_mtu. * * ifpp - XXX: just for statistics */ @@ -330,7 +332,7 @@ ip6_output(struct mbuf *m0, struct ip6_pktopts *opt, INP_LOCK_ASSERT(inp); M_SETFIB(m, inp->inp_inc.inc_fibnum); if ((flags & IP_NODEFAULTFLOWID) == 0) { - /* unconditionally set flowid */ + /* Unconditionally set flowid. */ m->m_pkthdr.flowid = inp->inp_flowid; M_HASHTYPE_SET(m, inp->inp_flowtype); } @@ -353,12 +355,12 @@ ip6_output(struct mbuf *m0, struct ip6_pktopts *opt, bzero(&exthdrs, sizeof(exthdrs)); if (opt) { - /* Hop-by-Hop options header */ + /* Hop-by-Hop options header. */ MAKE_EXTHDR(opt->ip6po_hbh, &exthdrs.ip6e_hbh); - /* Destination options header(1st part) */ + /* Destination options header (1st part). */ if (opt->ip6po_rthdr) { /* - * Destination options header(1st part) + * Destination options header (1st part). * This only makes sense with a routing header. * See Section 9.2 of RFC 3542. * Disabling this part just for MIP6 convenience is @@ -369,9 +371,9 @@ ip6_output(struct mbuf *m0, struct ip6_pktopts *opt, */ MAKE_EXTHDR(opt->ip6po_dest1, &exthdrs.ip6e_dest1); } - /* Routing header */ + /* Routing header. */ MAKE_EXTHDR(opt->ip6po_rthdr, &exthdrs.ip6e_rthdr); - /* Destination options header(2nd part) */ + /* Destination options header (2nd part). */ MAKE_EXTHDR(opt->ip6po_dest2, &exthdrs.ip6e_dest2); } @@ -388,7 +390,7 @@ ip6_output(struct mbuf *m0, struct ip6_pktopts *opt, optlen += exthdrs.ip6e_rthdr->m_len; unfragpartlen = optlen + sizeof(struct ip6_hdr); - /* NOTE: we don't add AH/ESP length here (done in ip6_ipsec_output) */ + /* NOTE: we don't add AH/ESP length here (done in ip6_ipsec_output). */ if (exthdrs.ip6e_dest2) optlen += exthdrs.ip6e_dest2->m_len; @@ -407,7 +409,7 @@ ip6_output(struct mbuf *m0, struct ip6_pktopts *opt, ip6 = mtod(m, struct ip6_hdr *); - /* adjust mbuf packet header length */ + /* Adjust mbuf packet header length. */ m->m_pkthdr.len += optlen; plen = m->m_pkthdr.len - sizeof(*ip6); @@ -421,7 +423,7 @@ ip6_output(struct mbuf *m0, struct ip6_pktopts *opt, m = exthdrs.ip6e_ip6; hdrsplit++; } - /* adjust pointer */ + /* Adjust pointer. */ ip6 = mtod(m, struct ip6_hdr *); if ((error = ip6_insert_jumboopt(&exthdrs, plen)) != 0) goto freehdrs; @@ -433,26 +435,29 @@ ip6_output(struct mbuf *m0, struct ip6_pktopts *opt, * Concatenate headers and fill in next header fields. * Here we have, on "m" * IPv6 payload - * and we insert headers accordingly. Finally, we should be getting: - * IPv6 hbh dest1 rthdr ah* [esp* dest2 payload] + * and we insert headers accordingly. + * Finally, we should be getting: + * IPv6 hbh dest1 rthdr ah* [esp* dest2 payload]. * - * during the header composing process, "m" points to IPv6 header. - * "mprev" points to an extension header prior to esp. + * During the header composing process "m" points to IPv6 + * header. "mprev" points to an extension header prior to esp. */ u_char *nexthdrp = &ip6->ip6_nxt; mprev = m; /* - * we treat dest2 specially. this makes IPsec processing - * much easier. the goal here is to make mprev point the + * We treat dest2 specially. This makes IPsec processing + * much easier. The goal here is to make mprev point the * mbuf prior to dest2. * - * result: IPv6 dest2 payload + * Result: IPv6 dest2 payload. * m and mprev will point to IPv6 header. */ if (exthdrs.ip6e_dest2) { if (!hdrsplit) - panic("assumption failed: hdr not split"); + panic("%s:%d: assumption failed: " + "hdr not split: hdrsplit %d exthdrs %p", + __func__, __LINE__, hdrsplit, &exthdrs); exthdrs.ip6e_dest2->m_next = m->m_next; m->m_next = exthdrs.ip6e_dest2; *mtod(exthdrs.ip6e_dest2, u_char *) = ip6->ip6_nxt; @@ -460,7 +465,7 @@ ip6_output(struct mbuf *m0, struct ip6_pktopts *opt, } /* - * result: IPv6 hbh dest1 rthdr dest2 payload + * Result: IPv6 hbh dest1 rthdr dest2 payload. * m will point to IPv6 header. mprev will point to the * extension header prior to dest2 (rthdr in the above case). */ @@ -470,15 +475,13 @@ ip6_output(struct mbuf *m0, struct ip6_pktopts *opt, MAKE_CHAIN(exthdrs.ip6e_rthdr, mprev, nexthdrp, IPPROTO_ROUTING); - /* - * If there is a routing header, discard the packet. - */ + /* If there is a routing header, discard the packet. */ if (exthdrs.ip6e_rthdr) { error = EINVAL; goto bad; } - /* Source address validation */ + /* Source address validation. */ if (IN6_IS_ADDR_UNSPECIFIED(&ip6->ip6_src) && (flags & IPV6_UNSPECSRC) == 0) { error = EOPNOTSUPP; @@ -493,9 +496,7 @@ ip6_output(struct mbuf *m0, struct ip6_pktopts *opt, IP6STAT_INC(ip6s_localout); - /* - * Route packet. - */ + /* Route packet. */ if (ro == NULL) { ro = &ip6route; bzero((caddr_t)ro, sizeof(*ro)); @@ -511,9 +512,9 @@ ip6_output(struct mbuf *m0, struct ip6_pktopts *opt, fibnum = (inp != NULL) ? inp->inp_inc.inc_fibnum : M_GETFIB(m); again: /* - * if specified, try to fill in the traffic class field. - * do not override if a non-zero value is already set. - * we check the diffserv field and the ecn field separately. + * If specified, try to fill in the traffic class field. + * Do not override if a non-zero value is already set. + * We check the diffserv field and the ECN field separately. */ if (opt && opt->ip6po_tclass >= 0) { int mask = 0; @@ -526,7 +527,7 @@ again: ip6->ip6_flow |= htonl((opt->ip6po_tclass & mask) << 20); } - /* fill in or override the hop limit field, if necessary. */ + /* Fill in or override the hop limit field, if necessary. */ if (opt && opt->ip6po_hlim != -1) ip6->ip6_hlim = opt->ip6po_hlim & 0xff; else if (IN6_IS_ADDR_MULTICAST(&ip6->ip6_dst)) { @@ -538,7 +539,7 @@ again: /* * Validate route against routing table additions; * a better/more specific route might have been added. - * Make sure address family is set in route. + * Make sure that the address family is set in route. */ if (inp) { ro->ro_dst.sin6_family = AF_INET6; @@ -569,15 +570,13 @@ again: } if (rt == NULL) { /* - * If in6_selectroute() does not return a route entry, + * If in6_selectroute() does not return a route entry * dst may not have been updated. */ *dst = dst_sa; /* XXX */ } - /* - * then rt (for unicast) and ifp must be non-NULL valid values. - */ + /* Then rt (for unicast) and ifp must be non-NULL valid values. */ if ((flags & IPV6_FORWARDING) == 0) { /* XXX: the FORWARDING flag can be set for mrouting. */ in6_ifstat_inc(ifp, ifs6_out_request); @@ -595,7 +594,7 @@ again: src_sa.sin6_addr = ip6->ip6_src; dst0 = ip6->ip6_dst; - /* re-initialize to be sure */ + /* Re-initialize to be sure. */ bzero(&dst_sa, sizeof(dst_sa)); dst_sa.sin6_family = AF_INET6; dst_sa.sin6_len = sizeof(dst_sa); @@ -612,7 +611,7 @@ again: * * 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 + * there is a trick 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 @@ -650,7 +649,6 @@ again: error = EHOSTUNREACH; /* XXX */ goto bad; } - /* All scope ID checks are successful. */ if (rt && !IN6_IS_ADDR_MULTICAST(&ip6->ip6_dst)) { @@ -667,13 +665,12 @@ again: } if (!IN6_IS_ADDR_MULTICAST(&ip6->ip6_dst)) { - m->m_flags &= ~(M_BCAST | M_MCAST); /* just in case */ + m->m_flags &= ~(M_BCAST | M_MCAST); /* Just in case. */ } else { m->m_flags = (m->m_flags & ~M_BCAST) | M_MCAST; in6_ifstat_inc(ifp, ifs6_out_mcast); - /* - * Confirm that the outgoing interface supports multicast. - */ + + /* Confirm that the outgoing interface supports multicast. */ if (!(ifp->if_flags & IFF_MULTICAST)) { IP6STAT_INC(ip6s_noroute); in6_ifstat_inc(ifp, ifs6_out_discard); @@ -768,8 +765,8 @@ again: } /* - * clear embedded scope identifiers if necessary. - * in6_clearscope will touch the addresses only when necessary. + * Clear embedded scope identifiers if necessary. + * in6_clearscope() will touch the addresses only when necessary. */ in6_clearscope(&ip6->ip6_src); in6_clearscope(&ip6->ip6_dst); @@ -799,7 +796,7 @@ again: if (ip6_process_hopopts(m, (u_int8_t *)(hbh + 1), ((hbh->ip6h_len + 1) << 3) - sizeof(struct ip6_hbh), &dummy, &plen) < 0) { - /* m was already freed at this point */ + /* m was already freed at this point. */ error = EINVAL;/* better error? */ goto done; } @@ -892,7 +889,7 @@ passout: * Send the packet to the outgoing interface. * If necessary, do IPv6 fragmentation before sending. * - * the logic here is rather complex: + * The logic here is rather complex: * 1: normal case (dontfrag == 0, alwaysfrag == 0) * 1-a: send as is if tlen <= path mtu * 1-b: fragment if tlen > path mtu @@ -905,7 +902,7 @@ passout: * always fragment * * 4: if dontfrag == 1 && alwaysfrag == 1 - * error, as we cannot handle this conflicting request + * error, as we cannot handle this conflicting request. */ sw_csum = m->m_pkthdr.csum_flags; if (!hdrsplit) { @@ -936,12 +933,12 @@ passout: dontfrag = 1; else dontfrag = 0; - if (dontfrag && alwaysfrag) { /* case 4 */ - /* conflicting request - can't transmit */ + if (dontfrag && alwaysfrag) { /* Case 4. */ + /* Conflicting request - can't transmit. */ error = EMSGSIZE; goto bad; } - if (dontfrag && tlen > IN6_LINKMTU(ifp) && !tso) { /* case 2-b */ + if (dontfrag && tlen > IN6_LINKMTU(ifp) && !tso) { /* Case 2-b. */ /* * Even if the DONTFRAG option is specified, we cannot send the * packet when the data length is larger than the MTU of the @@ -956,10 +953,8 @@ passout: goto bad; } - /* - * transmit packet without fragmentation - */ - if (dontfrag || (!alwaysfrag && tlen <= mtu)) { /* case 1-a and 2-a */ + /* Transmit packet without fragmentation. */ + if (dontfrag || (!alwaysfrag && tlen <= mtu)) { /* Cases 1-a and 2-a. */ struct in6_ifaddr *ia6; ip6 = mtod(m, struct ip6_hdr *); @@ -976,16 +971,14 @@ passout: goto done; } - /* - * try to fragment the packet. case 1-b and 3 - */ + /* Try to fragment the packet. Cases 1-b and 3. */ if (mtu < IPV6_MMTU) { - /* path MTU cannot be less than IPV6_MMTU */ + /* Path MTU cannot be less than IPV6_MMTU. */ error = EMSGSIZE; in6_ifstat_inc(ifp, ifs6_out_fragfail); goto bad; } else if (ip6->ip6_plen == 0) { - /* jumbo payload cannot be fragmented */ + /* Jumbo payload cannot be fragmented. */ error = EMSGSIZE; in6_ifstat_inc(ifp, ifs6_out_fragfail); goto bad; @@ -1054,9 +1047,7 @@ passout: in6_ifstat_inc(ifp, ifs6_out_fragok); } - /* - * Remove leading garbages. - */ + /* Remove leading garbage. */ sendorfree: m = m0->m_nextpkt; m0->m_nextpkt = 0; @@ -1091,7 +1082,7 @@ done: return (error); freehdrs: - m_freem(exthdrs.ip6e_hbh); /* m_freem will check if mbuf is 0 */ + m_freem(exthdrs.ip6e_hbh); /* m_freem() checks if mbuf is NULL. */ m_freem(exthdrs.ip6e_dest1); m_freem(exthdrs.ip6e_rthdr); m_freem(exthdrs.ip6e_dest2); From owner-svn-src-all@freebsd.org Mon Mar 2 13:16:19 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 387531AE6EB; Mon, 2 Mar 2020 13:16:19 +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 48WLJ26xPWz4YWS; Mon, 2 Mar 2020 13:16:18 +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 A24231CE32; Mon, 2 Mar 2020 13:16:18 +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 022DGIlE004714; Mon, 2 Mar 2020 13:16:18 GMT (envelope-from bz@FreeBSD.org) Received: (from bz@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 022DGImd004713; Mon, 2 Mar 2020 13:16:18 GMT (envelope-from bz@FreeBSD.org) Message-Id: <202003021316.022DGImd004713@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bz set sender to bz@FreeBSD.org using -f From: "Bjoern A. Zeeb" Date: Mon, 2 Mar 2020 13:16:18 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r358540 - stable/12/sys/netinet6 X-SVN-Group: stable-12 X-SVN-Commit-Author: bz X-SVN-Commit-Paths: stable/12/sys/netinet6 X-SVN-Commit-Revision: 358540 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages 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, 02 Mar 2020 13:16:19 -0000 Author: bz Date: Mon Mar 2 13:16:18 2020 New Revision: 358540 URL: https://svnweb.freebsd.org/changeset/base/358540 Log: MFC r358167,358311: ip6_output: improve extension header handling Move IPv6 source address checks from after extension header heandling to the top of the function. If we do not pass these checks there is no reason to do a lot of work upfront. Fold extension header preparations and length calculations together into a single branch and macro rather than doing them sequentially. Likewise move extension header concatination into a single branch block only doing it if we recorded any extension header length length. Sponsored by: Netflix (partially, originally) 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 Mon Mar 2 13:13:42 2020 (r358539) +++ stable/12/sys/netinet6/ip6_output.c Mon Mar 2 13:16:18 2020 (r358540) @@ -154,10 +154,10 @@ static int copypktopts(struct ip6_pktopts *, struct ip /* - * Make an extension header from option data. hp is the source, and - * mp is the destination. + * Make an extension header from option data. hp is the source, + * mp is the destination, and _ol is the optlen. */ -#define MAKE_EXTHDR(hp, mp) \ +#define MAKE_EXTHDR(hp, mp, _ol) \ do { \ if (hp) { \ struct ip6_ext *eh = (struct ip6_ext *)(hp); \ @@ -165,6 +165,7 @@ static int copypktopts(struct ip6_pktopts *, struct ip ((eh)->ip6e_len + 1) << 3); \ if (error) \ goto freehdrs; \ + (_ol) += (*(mp))->m_len; \ } \ } while (/*CONSTCOND*/ 0) @@ -305,22 +306,23 @@ ip6_output(struct mbuf *m0, struct ip6_pktopts *opt, struct ip6_hdr *ip6; struct ifnet *ifp, *origifp; struct mbuf *m = m0; - struct mbuf *mprev = NULL; + struct mbuf *mprev; int hlen, tlen, len; struct route_in6 ip6route; struct rtentry *rt = NULL; struct sockaddr_in6 *dst, src_sa, dst_sa; struct in6_addr odst; + u_char *nexthdrp; int error = 0; struct in6_ifaddr *ia = NULL; u_long mtu; int alwaysfrag, dontfrag; - u_int32_t optlen = 0, plen = 0, unfragpartlen = 0; + u_int32_t optlen, plen = 0, unfragpartlen; struct ip6_exthdrs exthdrs; struct in6_addr src0, dst0; u_int32_t zone; struct route_in6 *ro_pmtu = NULL; - int hdrsplit = 0; + bool hdrsplit; int sw_csum, tso; int needfiblookup; uint32_t fibnum; @@ -352,13 +354,50 @@ ip6_output(struct mbuf *m0, struct ip6_pktopts *opt, } #endif /* IPSEC */ + /* Source address validation. */ + ip6 = mtod(m, struct ip6_hdr *); + if (IN6_IS_ADDR_UNSPECIFIED(&ip6->ip6_src) && + (flags & IPV6_UNSPECSRC) == 0) { + error = EOPNOTSUPP; + IP6STAT_INC(ip6s_badscope); + goto bad; + } + if (IN6_IS_ADDR_MULTICAST(&ip6->ip6_src)) { + error = EOPNOTSUPP; + IP6STAT_INC(ip6s_badscope); + goto bad; + } + + /* + * If we are given packet options to add extension headers prepare them. + * Calculate the total length of the extension header chain. + * Keep the length of the unfragmentable part for fragmentation. + */ bzero(&exthdrs, sizeof(exthdrs)); + optlen = 0; + unfragpartlen = sizeof(struct ip6_hdr); if (opt) { /* Hop-by-Hop options header. */ - MAKE_EXTHDR(opt->ip6po_hbh, &exthdrs.ip6e_hbh); + MAKE_EXTHDR(opt->ip6po_hbh, &exthdrs.ip6e_hbh, optlen); + /* Destination options header (1st part). */ if (opt->ip6po_rthdr) { +#ifndef RTHDR_SUPPORT_IMPLEMENTED /* + * If there is a routing header, discard the packet + * right away here. RH0/1 are obsolete and we do not + * currently support RH2/3/4. + * People trying to use RH253/254 may want to disable + * this check. + * The moment we do support any routing header (again) + * this block should check the routing type more + * selectively. + */ + error = EINVAL; + goto bad; +#endif + + /* * Destination options header (1st part). * This only makes sense with a routing header. * See Section 9.2 of RFC 3542. @@ -368,46 +407,38 @@ ip6_output(struct mbuf *m0, struct ip6_pktopts *opt, * options, which might automatically be inserted in * the kernel. */ - MAKE_EXTHDR(opt->ip6po_dest1, &exthdrs.ip6e_dest1); + MAKE_EXTHDR(opt->ip6po_dest1, &exthdrs.ip6e_dest1, + optlen); } /* Routing header. */ - MAKE_EXTHDR(opt->ip6po_rthdr, &exthdrs.ip6e_rthdr); + MAKE_EXTHDR(opt->ip6po_rthdr, &exthdrs.ip6e_rthdr, optlen); + + unfragpartlen += optlen; + + /* + * NOTE: we don't add AH/ESP length here (done in + * ip6_ipsec_output()). + */ + /* Destination options header (2nd part). */ - MAKE_EXTHDR(opt->ip6po_dest2, &exthdrs.ip6e_dest2); + MAKE_EXTHDR(opt->ip6po_dest2, &exthdrs.ip6e_dest2, optlen); } /* - * Calculate the total length of the extension header chain. - * Keep the length of the unfragmentable part for fragmentation. - */ - optlen = 0; - if (exthdrs.ip6e_hbh) - optlen += exthdrs.ip6e_hbh->m_len; - if (exthdrs.ip6e_dest1) - optlen += exthdrs.ip6e_dest1->m_len; - if (exthdrs.ip6e_rthdr) - optlen += exthdrs.ip6e_rthdr->m_len; - unfragpartlen = optlen + sizeof(struct ip6_hdr); - - /* NOTE: we don't add AH/ESP length here (done in ip6_ipsec_output). */ - if (exthdrs.ip6e_dest2) - optlen += exthdrs.ip6e_dest2->m_len; - - /* * If there is at least one extension header, * separate IP6 header from the payload. */ - if (optlen && !hdrsplit) { + hdrsplit = false; + if (optlen) { if ((error = ip6_splithdr(m, &exthdrs)) != 0) { m = NULL; goto freehdrs; } m = exthdrs.ip6e_ip6; - hdrsplit++; + ip6 = mtod(m, struct ip6_hdr *); + hdrsplit = true; } - ip6 = mtod(m, struct ip6_hdr *); - /* Adjust mbuf packet header length. */ m->m_pkthdr.len += optlen; plen = m->m_pkthdr.len - sizeof(*ip6); @@ -420,77 +451,59 @@ ip6_output(struct mbuf *m0, struct ip6_pktopts *opt, goto freehdrs; } m = exthdrs.ip6e_ip6; - hdrsplit++; + ip6 = mtod(m, struct ip6_hdr *); + hdrsplit = true; } - /* Adjust pointer. */ - ip6 = mtod(m, struct ip6_hdr *); if ((error = ip6_insert_jumboopt(&exthdrs, plen)) != 0) goto freehdrs; ip6->ip6_plen = 0; } else ip6->ip6_plen = htons(plen); + nexthdrp = &ip6->ip6_nxt; - /* - * Concatenate headers and fill in next header fields. - * Here we have, on "m" - * IPv6 payload - * and we insert headers accordingly. - * Finally, we should be getting: - * IPv6 hbh dest1 rthdr ah* [esp* dest2 payload]. - * - * During the header composing process "m" points to IPv6 - * header. "mprev" points to an extension header prior to esp. - */ - u_char *nexthdrp = &ip6->ip6_nxt; - mprev = m; + if (optlen) { + /* + * Concatenate headers and fill in next header fields. + * Here we have, on "m" + * IPv6 payload + * and we insert headers accordingly. + * Finally, we should be getting: + * IPv6 hbh dest1 rthdr ah* [esp* dest2 payload]. + * + * During the header composing process "m" points to IPv6 + * header. "mprev" points to an extension header prior to esp. + */ + mprev = m; - /* - * We treat dest2 specially. This makes IPsec processing - * much easier. The goal here is to make mprev point the - * mbuf prior to dest2. - * - * Result: IPv6 dest2 payload. - * m and mprev will point to IPv6 header. - */ - if (exthdrs.ip6e_dest2) { - if (!hdrsplit) - panic("%s:%d: assumption failed: " - "hdr not split: hdrsplit %d exthdrs %p", - __func__, __LINE__, hdrsplit, &exthdrs); - exthdrs.ip6e_dest2->m_next = m->m_next; - m->m_next = exthdrs.ip6e_dest2; - *mtod(exthdrs.ip6e_dest2, u_char *) = ip6->ip6_nxt; - ip6->ip6_nxt = IPPROTO_DSTOPTS; - } + /* + * We treat dest2 specially. This makes IPsec processing + * much easier. The goal here is to make mprev point the + * mbuf prior to dest2. + * + * Result: IPv6 dest2 payload. + * m and mprev will point to IPv6 header. + */ + if (exthdrs.ip6e_dest2) { + if (!hdrsplit) + panic("%s:%d: assumption failed: " + "hdr not split: hdrsplit %d exthdrs %p", + __func__, __LINE__, hdrsplit, &exthdrs); + exthdrs.ip6e_dest2->m_next = m->m_next; + m->m_next = exthdrs.ip6e_dest2; + *mtod(exthdrs.ip6e_dest2, u_char *) = ip6->ip6_nxt; + ip6->ip6_nxt = IPPROTO_DSTOPTS; + } - /* - * Result: IPv6 hbh dest1 rthdr dest2 payload. - * m will point to IPv6 header. mprev will point to the - * extension header prior to dest2 (rthdr in the above case). - */ - MAKE_CHAIN(exthdrs.ip6e_hbh, mprev, nexthdrp, IPPROTO_HOPOPTS); - MAKE_CHAIN(exthdrs.ip6e_dest1, mprev, nexthdrp, - IPPROTO_DSTOPTS); - MAKE_CHAIN(exthdrs.ip6e_rthdr, mprev, nexthdrp, - IPPROTO_ROUTING); - - /* If there is a routing header, discard the packet. */ - if (exthdrs.ip6e_rthdr) { - error = EINVAL; - goto bad; - } - - /* Source address validation. */ - if (IN6_IS_ADDR_UNSPECIFIED(&ip6->ip6_src) && - (flags & IPV6_UNSPECSRC) == 0) { - error = EOPNOTSUPP; - IP6STAT_INC(ip6s_badscope); - goto bad; - } - if (IN6_IS_ADDR_MULTICAST(&ip6->ip6_src)) { - error = EOPNOTSUPP; - IP6STAT_INC(ip6s_badscope); - goto bad; + /* + * Result: IPv6 hbh dest1 rthdr dest2 payload. + * m will point to IPv6 header. mprev will point to the + * extension header prior to dest2 (rthdr in the above case). + */ + MAKE_CHAIN(exthdrs.ip6e_hbh, mprev, nexthdrp, IPPROTO_HOPOPTS); + MAKE_CHAIN(exthdrs.ip6e_dest1, mprev, nexthdrp, + IPPROTO_DSTOPTS); + MAKE_CHAIN(exthdrs.ip6e_rthdr, mprev, nexthdrp, + IPPROTO_ROUTING); } IP6STAT_INC(ip6s_localout); From owner-svn-src-all@freebsd.org Mon Mar 2 13:16:42 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 8506A1AE793; Mon, 2 Mar 2020 13:16:42 +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 48WLJV1rlbz4ZKn; Mon, 2 Mar 2020 13:16:42 +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 440B41CE54; Mon, 2 Mar 2020 13:16:41 +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 022DGfio004810; Mon, 2 Mar 2020 13:16:41 GMT (envelope-from bz@FreeBSD.org) Received: (from bz@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 022DGfxO004809; Mon, 2 Mar 2020 13:16:41 GMT (envelope-from bz@FreeBSD.org) Message-Id: <202003021316.022DGfxO004809@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bz set sender to bz@FreeBSD.org using -f From: "Bjoern A. Zeeb" Date: Mon, 2 Mar 2020 13:16: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: r358541 - stable/11/sys/netinet6 X-SVN-Group: stable-11 X-SVN-Commit-Author: bz X-SVN-Commit-Paths: stable/11/sys/netinet6 X-SVN-Commit-Revision: 358541 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages 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, 02 Mar 2020 13:16:42 -0000 Author: bz Date: Mon Mar 2 13:16:40 2020 New Revision: 358541 URL: https://svnweb.freebsd.org/changeset/base/358541 Log: MFC r358167,358311: ip6_output: improve extension header handling Move IPv6 source address checks from after extension header heandling to the top of the function. If we do not pass these checks there is no reason to do a lot of work upfront. Fold extension header preparations and length calculations together into a single branch and macro rather than doing them sequentially. Likewise move extension header concatination into a single branch block only doing it if we recorded any extension header length length. Sponsored by: Netflix (partially, originally) 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 Mon Mar 2 13:16:18 2020 (r358540) +++ stable/11/sys/netinet6/ip6_output.c Mon Mar 2 13:16:40 2020 (r358541) @@ -155,10 +155,10 @@ static int copypktopts(struct ip6_pktopts *, struct ip /* - * Make an extension header from option data. hp is the source, and - * mp is the destination. + * Make an extension header from option data. hp is the source, + * mp is the destination, and _ol is the optlen. */ -#define MAKE_EXTHDR(hp, mp) \ +#define MAKE_EXTHDR(hp, mp, _ol) \ do { \ if (hp) { \ struct ip6_ext *eh = (struct ip6_ext *)(hp); \ @@ -166,6 +166,7 @@ static int copypktopts(struct ip6_pktopts *, struct ip ((eh)->ip6e_len + 1) << 3); \ if (error) \ goto freehdrs; \ + (_ol) += (*(mp))->m_len; \ } \ } while (/*CONSTCOND*/ 0) @@ -306,22 +307,23 @@ ip6_output(struct mbuf *m0, struct ip6_pktopts *opt, struct ip6_hdr *ip6; struct ifnet *ifp, *origifp; struct mbuf *m = m0; - struct mbuf *mprev = NULL; + struct mbuf *mprev; int hlen, tlen, len; struct route_in6 ip6route; struct rtentry *rt = NULL; struct sockaddr_in6 *dst, src_sa, dst_sa; struct in6_addr odst; + u_char *nexthdrp; int error = 0; struct in6_ifaddr *ia = NULL; u_long mtu; int alwaysfrag, dontfrag; - u_int32_t optlen = 0, plen = 0, unfragpartlen = 0; + u_int32_t optlen, plen = 0, unfragpartlen; struct ip6_exthdrs exthdrs; struct in6_addr src0, dst0; u_int32_t zone; struct route_in6 *ro_pmtu = NULL; - int hdrsplit = 0; + bool hdrsplit; int sw_csum, tso; int needfiblookup; uint32_t fibnum; @@ -353,13 +355,50 @@ ip6_output(struct mbuf *m0, struct ip6_pktopts *opt, } #endif /* IPSEC */ + /* Source address validation. */ + ip6 = mtod(m, struct ip6_hdr *); + if (IN6_IS_ADDR_UNSPECIFIED(&ip6->ip6_src) && + (flags & IPV6_UNSPECSRC) == 0) { + error = EOPNOTSUPP; + IP6STAT_INC(ip6s_badscope); + goto bad; + } + if (IN6_IS_ADDR_MULTICAST(&ip6->ip6_src)) { + error = EOPNOTSUPP; + IP6STAT_INC(ip6s_badscope); + goto bad; + } + + /* + * If we are given packet options to add extension headers prepare them. + * Calculate the total length of the extension header chain. + * Keep the length of the unfragmentable part for fragmentation. + */ bzero(&exthdrs, sizeof(exthdrs)); + optlen = 0; + unfragpartlen = sizeof(struct ip6_hdr); if (opt) { /* Hop-by-Hop options header. */ - MAKE_EXTHDR(opt->ip6po_hbh, &exthdrs.ip6e_hbh); + MAKE_EXTHDR(opt->ip6po_hbh, &exthdrs.ip6e_hbh, optlen); + /* Destination options header (1st part). */ if (opt->ip6po_rthdr) { +#ifndef RTHDR_SUPPORT_IMPLEMENTED /* + * If there is a routing header, discard the packet + * right away here. RH0/1 are obsolete and we do not + * currently support RH2/3/4. + * People trying to use RH253/254 may want to disable + * this check. + * The moment we do support any routing header (again) + * this block should check the routing type more + * selectively. + */ + error = EINVAL; + goto bad; +#endif + + /* * Destination options header (1st part). * This only makes sense with a routing header. * See Section 9.2 of RFC 3542. @@ -369,46 +408,38 @@ ip6_output(struct mbuf *m0, struct ip6_pktopts *opt, * options, which might automatically be inserted in * the kernel. */ - MAKE_EXTHDR(opt->ip6po_dest1, &exthdrs.ip6e_dest1); + MAKE_EXTHDR(opt->ip6po_dest1, &exthdrs.ip6e_dest1, + optlen); } /* Routing header. */ - MAKE_EXTHDR(opt->ip6po_rthdr, &exthdrs.ip6e_rthdr); + MAKE_EXTHDR(opt->ip6po_rthdr, &exthdrs.ip6e_rthdr, optlen); + + unfragpartlen += optlen; + + /* + * NOTE: we don't add AH/ESP length here (done in + * ip6_ipsec_output()). + */ + /* Destination options header (2nd part). */ - MAKE_EXTHDR(opt->ip6po_dest2, &exthdrs.ip6e_dest2); + MAKE_EXTHDR(opt->ip6po_dest2, &exthdrs.ip6e_dest2, optlen); } /* - * Calculate the total length of the extension header chain. - * Keep the length of the unfragmentable part for fragmentation. - */ - optlen = 0; - if (exthdrs.ip6e_hbh) - optlen += exthdrs.ip6e_hbh->m_len; - if (exthdrs.ip6e_dest1) - optlen += exthdrs.ip6e_dest1->m_len; - if (exthdrs.ip6e_rthdr) - optlen += exthdrs.ip6e_rthdr->m_len; - unfragpartlen = optlen + sizeof(struct ip6_hdr); - - /* NOTE: we don't add AH/ESP length here (done in ip6_ipsec_output). */ - if (exthdrs.ip6e_dest2) - optlen += exthdrs.ip6e_dest2->m_len; - - /* * If there is at least one extension header, * separate IP6 header from the payload. */ - if (optlen && !hdrsplit) { + hdrsplit = false; + if (optlen) { if ((error = ip6_splithdr(m, &exthdrs)) != 0) { m = NULL; goto freehdrs; } m = exthdrs.ip6e_ip6; - hdrsplit++; + ip6 = mtod(m, struct ip6_hdr *); + hdrsplit = true; } - ip6 = mtod(m, struct ip6_hdr *); - /* Adjust mbuf packet header length. */ m->m_pkthdr.len += optlen; plen = m->m_pkthdr.len - sizeof(*ip6); @@ -421,77 +452,59 @@ ip6_output(struct mbuf *m0, struct ip6_pktopts *opt, goto freehdrs; } m = exthdrs.ip6e_ip6; - hdrsplit++; + ip6 = mtod(m, struct ip6_hdr *); + hdrsplit = true; } - /* Adjust pointer. */ - ip6 = mtod(m, struct ip6_hdr *); if ((error = ip6_insert_jumboopt(&exthdrs, plen)) != 0) goto freehdrs; ip6->ip6_plen = 0; } else ip6->ip6_plen = htons(plen); + nexthdrp = &ip6->ip6_nxt; - /* - * Concatenate headers and fill in next header fields. - * Here we have, on "m" - * IPv6 payload - * and we insert headers accordingly. - * Finally, we should be getting: - * IPv6 hbh dest1 rthdr ah* [esp* dest2 payload]. - * - * During the header composing process "m" points to IPv6 - * header. "mprev" points to an extension header prior to esp. - */ - u_char *nexthdrp = &ip6->ip6_nxt; - mprev = m; + if (optlen) { + /* + * Concatenate headers and fill in next header fields. + * Here we have, on "m" + * IPv6 payload + * and we insert headers accordingly. + * Finally, we should be getting: + * IPv6 hbh dest1 rthdr ah* [esp* dest2 payload]. + * + * During the header composing process "m" points to IPv6 + * header. "mprev" points to an extension header prior to esp. + */ + mprev = m; - /* - * We treat dest2 specially. This makes IPsec processing - * much easier. The goal here is to make mprev point the - * mbuf prior to dest2. - * - * Result: IPv6 dest2 payload. - * m and mprev will point to IPv6 header. - */ - if (exthdrs.ip6e_dest2) { - if (!hdrsplit) - panic("%s:%d: assumption failed: " - "hdr not split: hdrsplit %d exthdrs %p", - __func__, __LINE__, hdrsplit, &exthdrs); - exthdrs.ip6e_dest2->m_next = m->m_next; - m->m_next = exthdrs.ip6e_dest2; - *mtod(exthdrs.ip6e_dest2, u_char *) = ip6->ip6_nxt; - ip6->ip6_nxt = IPPROTO_DSTOPTS; - } + /* + * We treat dest2 specially. This makes IPsec processing + * much easier. The goal here is to make mprev point the + * mbuf prior to dest2. + * + * Result: IPv6 dest2 payload. + * m and mprev will point to IPv6 header. + */ + if (exthdrs.ip6e_dest2) { + if (!hdrsplit) + panic("%s:%d: assumption failed: " + "hdr not split: hdrsplit %d exthdrs %p", + __func__, __LINE__, hdrsplit, &exthdrs); + exthdrs.ip6e_dest2->m_next = m->m_next; + m->m_next = exthdrs.ip6e_dest2; + *mtod(exthdrs.ip6e_dest2, u_char *) = ip6->ip6_nxt; + ip6->ip6_nxt = IPPROTO_DSTOPTS; + } - /* - * Result: IPv6 hbh dest1 rthdr dest2 payload. - * m will point to IPv6 header. mprev will point to the - * extension header prior to dest2 (rthdr in the above case). - */ - MAKE_CHAIN(exthdrs.ip6e_hbh, mprev, nexthdrp, IPPROTO_HOPOPTS); - MAKE_CHAIN(exthdrs.ip6e_dest1, mprev, nexthdrp, - IPPROTO_DSTOPTS); - MAKE_CHAIN(exthdrs.ip6e_rthdr, mprev, nexthdrp, - IPPROTO_ROUTING); - - /* If there is a routing header, discard the packet. */ - if (exthdrs.ip6e_rthdr) { - error = EINVAL; - goto bad; - } - - /* Source address validation. */ - if (IN6_IS_ADDR_UNSPECIFIED(&ip6->ip6_src) && - (flags & IPV6_UNSPECSRC) == 0) { - error = EOPNOTSUPP; - IP6STAT_INC(ip6s_badscope); - goto bad; - } - if (IN6_IS_ADDR_MULTICAST(&ip6->ip6_src)) { - error = EOPNOTSUPP; - IP6STAT_INC(ip6s_badscope); - goto bad; + /* + * Result: IPv6 hbh dest1 rthdr dest2 payload. + * m will point to IPv6 header. mprev will point to the + * extension header prior to dest2 (rthdr in the above case). + */ + MAKE_CHAIN(exthdrs.ip6e_hbh, mprev, nexthdrp, IPPROTO_HOPOPTS); + MAKE_CHAIN(exthdrs.ip6e_dest1, mprev, nexthdrp, + IPPROTO_DSTOPTS); + MAKE_CHAIN(exthdrs.ip6e_rthdr, mprev, nexthdrp, + IPPROTO_ROUTING); } IP6STAT_INC(ip6s_localout); From owner-svn-src-all@freebsd.org Mon Mar 2 13:23:29 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id B39691AEA52; Mon, 2 Mar 2020 13:23:29 +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 48WLSK3Q6Fz3PjM; Mon, 2 Mar 2020 13:23:29 +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 4D0091D01A; Mon, 2 Mar 2020 13:23:29 +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 022DNTBO011366; Mon, 2 Mar 2020 13:23:29 GMT (envelope-from bz@FreeBSD.org) Received: (from bz@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 022DNT7j011365; Mon, 2 Mar 2020 13:23:29 GMT (envelope-from bz@FreeBSD.org) Message-Id: <202003021323.022DNT7j011365@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bz set sender to bz@FreeBSD.org using -f From: "Bjoern A. Zeeb" Date: Mon, 2 Mar 2020 13:23:29 +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: r358542 - stable/12/sys/netinet6 X-SVN-Group: stable-12 X-SVN-Commit-Author: bz X-SVN-Commit-Paths: stable/12/sys/netinet6 X-SVN-Commit-Revision: 358542 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages 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, 02 Mar 2020 13:23:29 -0000 Author: bz Date: Mon Mar 2 13:23:28 2020 New Revision: 358542 URL: https://svnweb.freebsd.org/changeset/base/358542 Log: MFC r358427: initialize oifp to avoid bogus results/panics in edge cases In certain cases (probably not during normal operation but observed in the lab during development) ip6_ouput() could return without error and ifpp (&oifp) not updated. Given oifp was never initialized we would take the later branch as oifp was not NULL, and when calling icmp6_ifstat_inc() we would panic dereferencing a garbage pointer. For code stability initialize oifp to NULL before first use to always have a deterministic value and not rely on a called function to behave and always and for ever do the work for us as we hope for. Sponsored by: Netflix Modified: stable/12/sys/netinet6/mld6.c Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/netinet6/mld6.c ============================================================================== --- stable/12/sys/netinet6/mld6.c Mon Mar 2 13:16:40 2020 (r358541) +++ stable/12/sys/netinet6/mld6.c Mon Mar 2 13:23:28 2020 (r358542) @@ -3155,6 +3155,7 @@ mld_dispatch_packet(struct mbuf *m) mld = (struct mld_hdr *)(mtod(md, uint8_t *) + off); type = mld->mld_type; + oifp = NULL; error = ip6_output(m0, &mld_po, NULL, IPV6_UNSPECSRC, &im6o, &oifp, NULL); if (error) { From owner-svn-src-all@freebsd.org Mon Mar 2 13:23:52 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id D463D1AEAD0; Mon, 2 Mar 2020 13:23:52 +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 48WLSm1phmz3QWJ; Mon, 2 Mar 2020 13:23:52 +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 E49DA1D01B; Mon, 2 Mar 2020 13:23:51 +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 022DNpxp011464; Mon, 2 Mar 2020 13:23:51 GMT (envelope-from bz@FreeBSD.org) Received: (from bz@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 022DNpuC011463; Mon, 2 Mar 2020 13:23:51 GMT (envelope-from bz@FreeBSD.org) Message-Id: <202003021323.022DNpuC011463@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bz set sender to bz@FreeBSD.org using -f From: "Bjoern A. Zeeb" Date: Mon, 2 Mar 2020 13:23:51 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r358543 - stable/11/sys/netinet6 X-SVN-Group: stable-11 X-SVN-Commit-Author: bz X-SVN-Commit-Paths: stable/11/sys/netinet6 X-SVN-Commit-Revision: 358543 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages 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, 02 Mar 2020 13:23:53 -0000 Author: bz Date: Mon Mar 2 13:23:51 2020 New Revision: 358543 URL: https://svnweb.freebsd.org/changeset/base/358543 Log: MFC r358427: initialize oifp to avoid bogus results/panics in edge cases In certain cases (probably not during normal operation but observed in the lab during development) ip6_ouput() could return without error and ifpp (&oifp) not updated. Given oifp was never initialized we would take the later branch as oifp was not NULL, and when calling icmp6_ifstat_inc() we would panic dereferencing a garbage pointer. For code stability initialize oifp to NULL before first use to always have a deterministic value and not rely on a called function to behave and always and for ever do the work for us as we hope for. Sponsored by: Netflix Modified: stable/11/sys/netinet6/mld6.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/netinet6/mld6.c ============================================================================== --- stable/11/sys/netinet6/mld6.c Mon Mar 2 13:23:28 2020 (r358542) +++ stable/11/sys/netinet6/mld6.c Mon Mar 2 13:23:51 2020 (r358543) @@ -3124,6 +3124,7 @@ mld_dispatch_packet(struct mbuf *m) mld = (struct mld_hdr *)(mtod(md, uint8_t *) + off); type = mld->mld_type; + oifp = NULL; error = ip6_output(m0, &mld_po, NULL, IPV6_UNSPECSRC, &im6o, &oifp, NULL); if (error) { From owner-svn-src-all@freebsd.org Mon Mar 2 14:04:10 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 1F75D1AFBEB; Mon, 2 Mar 2020 14:04: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 48WMMG0747z3Jbd; Mon, 2 Mar 2020 14:04: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 D98281D77F; Mon, 2 Mar 2020 14:04:09 +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 022E49Ir035966; Mon, 2 Mar 2020 14:04:09 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 022E490h035965; Mon, 2 Mar 2020 14:04:09 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <202003021404.022E490h035965@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Mon, 2 Mar 2020 14:04:09 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r358544 - head/contrib/libstdc++ X-SVN-Group: head X-SVN-Commit-Author: emaste X-SVN-Commit-Paths: head/contrib/libstdc++ X-SVN-Commit-Revision: 358544 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages 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, 02 Mar 2020 14:04:10 -0000 Author: emaste Date: Mon Mar 2 14:04:09 2020 New Revision: 358544 URL: https://svnweb.freebsd.org/changeset/base/358544 Log: Remove old contrib/libstdc++, unused since r358454 Sponsored by: The FreeBSD Foundation Deleted: head/contrib/libstdc++/ From owner-svn-src-all@freebsd.org Mon Mar 2 14:06:14 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 5FFDC1AFCAB; Mon, 2 Mar 2020 14:06:14 +0000 (UTC) (envelope-from rene@freebsd.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2610:1c1:1:6074::16:84]) (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 "freefall.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 48WMPf1wxpz3KR8; Mon, 2 Mar 2020 14:06:14 +0000 (UTC) (envelope-from rene@freebsd.org) Received: by freefall.freebsd.org (Postfix, from userid 1185) id D9E714EF2; Mon, 2 Mar 2020 14:05:28 +0000 (UTC) Date: Mon, 2 Mar 2020 14:05:28 +0000 From: Rene Ladan To: Warner Losh Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r358497 - in head: . share/man/man4 sys/conf sys/dev/bktr sys/modules sys/modules/bktr sys/modules/bktr/bktr sys/modules/bktr/bktr_mem sys/sys Message-ID: <20200302140528.GA41796@freefall.freebsd.org> References: <202003011915.021JF3bW047048@repo.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <202003011915.021JF3bW047048@repo.freebsd.org> X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages 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, 02 Mar 2020 14:06:14 -0000 On Sun, Mar 01, 2020 at 07:15:03PM +0000, Warner Losh wrote: > Author: imp > Date: Sun Mar 1 19:15:03 2020 > New Revision: 358497 > URL: https://svnweb.freebsd.org/changeset/base/358497 > > Log: > Remove bktr(4) > > Remove the brooktree driver as discussed on arch@. Bump FreeBSD version to > 1300082, though I doubt anything will care. > > Relnote: yes > > Deleted: > head/share/man/man4/bktr.4 > head/sys/dev/bktr/CHANGELOG.TXT > head/sys/dev/bktr/bktr_audio.c > head/sys/dev/bktr/bktr_audio.h > head/sys/dev/bktr/bktr_card.c > head/sys/dev/bktr/bktr_card.h > head/sys/dev/bktr/bktr_core.c > head/sys/dev/bktr/bktr_core.h > head/sys/dev/bktr/bktr_i2c.c > head/sys/dev/bktr/bktr_i2c.h > head/sys/dev/bktr/bktr_mem.c > head/sys/dev/bktr/bktr_mem.h > head/sys/dev/bktr/bktr_os.c > head/sys/dev/bktr/bktr_os.h > head/sys/dev/bktr/bktr_reg.h > head/sys/dev/bktr/bktr_tuner.c > head/sys/dev/bktr/bktr_tuner.h > head/sys/dev/bktr/ioctl_bt848.h > head/sys/dev/bktr/ioctl_meteor.h > head/sys/dev/bktr/msp34xx.c > head/sys/modules/bktr/Makefile > head/sys/modules/bktr/Makefile.inc > head/sys/modules/bktr/bktr/Makefile > head/sys/modules/bktr/bktr_mem/Makefile > Modified: > head/UPDATING > head/share/man/man4/Makefile > head/sys/conf/files > head/sys/modules/Makefile > head/sys/sys/param.h > Hmm, /usr/src/share/man/man4/meteor.4 is still present, should that file be removed too? René From owner-svn-src-all@freebsd.org Mon Mar 2 14:06:51 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 486121AFD4A; Mon, 2 Mar 2020 14:06:51 +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 48WMQM0LTQz3LmK; Mon, 2 Mar 2020 14:06:51 +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 C260C1D780; Mon, 2 Mar 2020 14:06:50 +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 022E6oZm036138; Mon, 2 Mar 2020 14:06:50 GMT (envelope-from andrew@FreeBSD.org) Received: (from andrew@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 022E6o4w036137; Mon, 2 Mar 2020 14:06:50 GMT (envelope-from andrew@FreeBSD.org) Message-Id: <202003021406.022E6o4w036137@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: andrew set sender to andrew@FreeBSD.org using -f From: Andrew Turner Date: Mon, 2 Mar 2020 14:06:50 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r358545 - 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: 358545 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages 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, 02 Mar 2020 14:06:51 -0000 Author: andrew Date: Mon Mar 2 14:06:50 2020 New Revision: 358545 URL: https://svnweb.freebsd.org/changeset/base/358545 Log: Generate the offsets for struct arm64_bootparams and use it in locore.S This removes one place with hard coded offsets in locore.S Sponsored by: Innovate UK Modified: head/sys/arm64/arm64/genassym.c head/sys/arm64/arm64/locore.S Modified: head/sys/arm64/arm64/genassym.c ============================================================================== --- head/sys/arm64/arm64/genassym.c Mon Mar 2 14:04:09 2020 (r358544) +++ head/sys/arm64/arm64/genassym.c Mon Mar 2 14:06:50 2020 (r358545) @@ -34,7 +34,17 @@ __FBSDID("$FreeBSD$"); #include #include +#include #include + +/* Sizeof arm64_bootparams, rounded to keep stack alignment */ +ASSYM(BOOTPARAMS_SIZE, roundup2(sizeof(struct arm64_bootparams), + STACKALIGNBYTES + 1)); +ASSYM(BP_MODULEP, offsetof(struct arm64_bootparams, modulep)); +ASSYM(BP_KERN_L1PT, offsetof(struct arm64_bootparams, kern_l1pt)); +ASSYM(BP_KERN_DELTA, offsetof(struct arm64_bootparams, kern_delta)); +ASSYM(BP_KERN_STACK, offsetof(struct arm64_bootparams, kern_stack)); +ASSYM(BP_KERN_L0PT, offsetof(struct arm64_bootparams,kern_l0pt)); ASSYM(TDF_ASTPENDING, TDF_ASTPENDING); ASSYM(TDF_NEEDRESCHED, TDF_NEEDRESCHED); Modified: head/sys/arm64/arm64/locore.S ============================================================================== --- head/sys/arm64/arm64/locore.S Mon Mar 2 14:04:09 2020 (r358544) +++ head/sys/arm64/arm64/locore.S Mon Mar 2 14:06:50 2020 (r358545) @@ -153,18 +153,18 @@ virtdone: sub x26, x26, x29 sub x24, x24, x29 - sub sp, sp, #(64 * 4) + sub sp, sp, #BOOTPARAMS_SIZE mov x0, sp /* Degate the delda so it is VA -> PA */ neg x29, x29 - str x1, [x0] /* modulep */ - str x26, [x0, 8] /* kern_l1pt */ - str x29, [x0, 16] /* kern_delta */ + str x1, [x0, #BP_MODULEP] + str x26, [x0, #BP_KERN_L1PT] + str x29, [x0, #BP_KERN_DELTA] adr x25, initstack - str x25, [x0, 24] /* kern_stack */ - str x24, [x0, 32] /* kern_l0pt */ + str x25, [x0, #BP_KERN_STACK] + str x24, [x0, #BP_KERN_L0PT] /* trace back starts here */ mov fp, #0 From owner-svn-src-all@freebsd.org Mon Mar 2 14:34:28 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 2C3F02506C5; Mon, 2 Mar 2020 14:34:28 +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 48WN2C3mZHz479v; Mon, 2 Mar 2020 14:34:27 +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 594161DD00; Mon, 2 Mar 2020 14:34:27 +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 022EYRLd054355; Mon, 2 Mar 2020 14:34:27 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 022EYRR4054354; Mon, 2 Mar 2020 14:34:27 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <202003021434.022EYRR4054354@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Mon, 2 Mar 2020 14:34:27 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r358546 - head/usr.bin/elfctl X-SVN-Group: head X-SVN-Commit-Author: emaste X-SVN-Commit-Paths: head/usr.bin/elfctl X-SVN-Commit-Revision: 358546 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages 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, 02 Mar 2020 14:34:28 -0000 Author: emaste Date: Mon Mar 2 14:34:26 2020 New Revision: 358546 URL: https://svnweb.freebsd.org/changeset/base/358546 Log: elfctl: tiny style(9) cleanup, use bool where appropriate Modified: head/usr.bin/elfctl/elfctl.c Modified: head/usr.bin/elfctl/elfctl.c ============================================================================== --- head/usr.bin/elfctl/elfctl.c Mon Mar 2 14:06:50 2020 (r358545) +++ head/usr.bin/elfctl/elfctl.c Mon Mar 2 14:34:26 2020 (r358546) @@ -85,12 +85,12 @@ main(int argc, char **argv) GElf_Ehdr ehdr; Elf *elf; Elf_Kind kind; - int ch, fd, editfeatures, retval; + int ch, fd, retval; char *features; - bool lflag; + bool editfeatures, lflag; lflag = 0; - editfeatures = 0; + editfeatures = false; retval = 0; features = NULL; @@ -105,7 +105,7 @@ main(int argc, char **argv) break; case 'e': features = optarg; - editfeatures = 1; + editfeatures = true; break; case 'h': default: From owner-svn-src-all@freebsd.org Mon Mar 2 14:36:17 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 78EF925075D; Mon, 2 Mar 2020 14:36:17 +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 48WN4K06gTz4CLS; Mon, 2 Mar 2020 14:36:17 +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 5C7671DD13; Mon, 2 Mar 2020 14:36:16 +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 022EaG0Q054495; Mon, 2 Mar 2020 14:36:16 GMT (envelope-from andrew@FreeBSD.org) Received: (from andrew@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 022EaGkD054494; Mon, 2 Mar 2020 14:36:16 GMT (envelope-from andrew@FreeBSD.org) Message-Id: <202003021436.022EaGkD054494@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: andrew set sender to andrew@FreeBSD.org using -f From: Andrew Turner Date: Mon, 2 Mar 2020 14:36:16 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r358547 - 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: 358547 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages 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, 02 Mar 2020 14:36:17 -0000 Author: andrew Date: Mon Mar 2 14:36:15 2020 New Revision: 358547 URL: https://svnweb.freebsd.org/changeset/base/358547 Log: Add a space missed in r358545 Sponsored by: Innovate UK Modified: head/sys/arm64/arm64/genassym.c Modified: head/sys/arm64/arm64/genassym.c ============================================================================== --- head/sys/arm64/arm64/genassym.c Mon Mar 2 14:34:26 2020 (r358546) +++ head/sys/arm64/arm64/genassym.c Mon Mar 2 14:36:15 2020 (r358547) @@ -44,7 +44,7 @@ ASSYM(BP_MODULEP, offsetof(struct arm64_bootparams, mo ASSYM(BP_KERN_L1PT, offsetof(struct arm64_bootparams, kern_l1pt)); ASSYM(BP_KERN_DELTA, offsetof(struct arm64_bootparams, kern_delta)); ASSYM(BP_KERN_STACK, offsetof(struct arm64_bootparams, kern_stack)); -ASSYM(BP_KERN_L0PT, offsetof(struct arm64_bootparams,kern_l0pt)); +ASSYM(BP_KERN_L0PT, offsetof(struct arm64_bootparams, kern_l0pt)); ASSYM(TDF_ASTPENDING, TDF_ASTPENDING); ASSYM(TDF_NEEDRESCHED, TDF_NEEDRESCHED); From owner-svn-src-all@freebsd.org Mon Mar 2 15:30:55 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 5AF0F251A95; Mon, 2 Mar 2020 15:30:55 +0000 (UTC) (envelope-from kaktus@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 48WPHL1wmzz3xRh; Mon, 2 Mar 2020 15:30:54 +0000 (UTC) (envelope-from kaktus@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 3348B1E7A1; Mon, 2 Mar 2020 15:30:54 +0000 (UTC) (envelope-from kaktus@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 022FUsDH084517; Mon, 2 Mar 2020 15:30:54 GMT (envelope-from kaktus@FreeBSD.org) Received: (from kaktus@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 022FUqT5084509; Mon, 2 Mar 2020 15:30:52 GMT (envelope-from kaktus@FreeBSD.org) Message-Id: <202003021530.022FUqT5084509@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kaktus set sender to kaktus@FreeBSD.org using -f From: Pawel Biernacki Date: Mon, 2 Mar 2020 15:30:52 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r358548 - head/sys/kern X-SVN-Group: head X-SVN-Commit-Author: kaktus X-SVN-Commit-Paths: head/sys/kern X-SVN-Commit-Revision: 358548 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages 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, 02 Mar 2020 15:30:55 -0000 Author: kaktus Date: Mon Mar 2 15:30:52 2020 New Revision: 358548 URL: https://svnweb.freebsd.org/changeset/base/358548 Log: sys/: Document few more sysctls. Submitted by: Antranig Vartanian Reviewed by: kaktus Commented by: jhb Approved by: kib (mentor) Sponsored by: illuria security Differential Revision: https://reviews.freebsd.org/D23759 Modified: head/sys/kern/kern_exec.c head/sys/kern/kern_shutdown.c head/sys/kern/kern_synch.c head/sys/kern/kern_umtx.c head/sys/kern/sched_4bsd.c head/sys/kern/sched_ule.c head/sys/kern/subr_kobj.c Modified: head/sys/kern/kern_exec.c ============================================================================== --- head/sys/kern/kern_exec.c Mon Mar 2 14:36:15 2020 (r358547) +++ head/sys/kern/kern_exec.c Mon Mar 2 15:30:52 2020 (r358548) @@ -123,18 +123,22 @@ static int do_execve(struct thread *td, struct image_a /* XXX This should be vm_size_t. */ SYSCTL_PROC(_kern, KERN_PS_STRINGS, ps_strings, CTLTYPE_ULONG|CTLFLAG_RD| - CTLFLAG_CAPRD|CTLFLAG_MPSAFE, NULL, 0, sysctl_kern_ps_strings, "LU", ""); + CTLFLAG_CAPRD|CTLFLAG_MPSAFE, NULL, 0, sysctl_kern_ps_strings, "LU", + "Location of process' ps_strings structure"); /* XXX This should be vm_size_t. */ SYSCTL_PROC(_kern, KERN_USRSTACK, usrstack, CTLTYPE_ULONG|CTLFLAG_RD| - CTLFLAG_CAPRD|CTLFLAG_MPSAFE, NULL, 0, sysctl_kern_usrstack, "LU", ""); + CTLFLAG_CAPRD|CTLFLAG_MPSAFE, NULL, 0, sysctl_kern_usrstack, "LU", + "Top of process stack"); SYSCTL_PROC(_kern, OID_AUTO, stackprot, CTLTYPE_INT|CTLFLAG_RD|CTLFLAG_MPSAFE, - NULL, 0, sysctl_kern_stackprot, "I", ""); + NULL, 0, sysctl_kern_stackprot, "I", + "Stack memory permissions"); u_long ps_arg_cache_limit = PAGE_SIZE / 16; SYSCTL_ULONG(_kern, OID_AUTO, ps_arg_cache_limit, CTLFLAG_RW, - &ps_arg_cache_limit, 0, ""); + &ps_arg_cache_limit, 0, + "Process' command line characters cache limit"); static int disallow_high_osrel; SYSCTL_INT(_kern, OID_AUTO, disallow_high_osrel, CTLFLAG_RW, Modified: head/sys/kern/kern_shutdown.c ============================================================================== --- head/sys/kern/kern_shutdown.c Mon Mar 2 14:36:15 2020 (r358547) +++ head/sys/kern/kern_shutdown.c Mon Mar 2 15:30:52 2020 (r358548) @@ -167,7 +167,8 @@ static int show_busybufs; static int show_busybufs = 1; #endif SYSCTL_INT(_kern_shutdown, OID_AUTO, show_busybufs, CTLFLAG_RW, - &show_busybufs, 0, ""); + &show_busybufs, 0, + "Show busy buffers during shutdown"); int suspend_blocked = 0; SYSCTL_INT(_kern, OID_AUTO, suspend_blocked, CTLFLAG_RW, Modified: head/sys/kern/kern_synch.c ============================================================================== --- head/sys/kern/kern_synch.c Mon Mar 2 14:36:15 2020 (r358547) +++ head/sys/kern/kern_synch.c Mon Mar 2 15:30:52 2020 (r358548) @@ -94,7 +94,8 @@ static fixpt_t cexp[3] = { }; /* kernel uses `FSCALE', userland (SHOULD) use kern.fscale */ -SYSCTL_INT(_kern, OID_AUTO, fscale, CTLFLAG_RD, SYSCTL_NULL_INT_PTR, FSCALE, ""); +SYSCTL_INT(_kern, OID_AUTO, fscale, CTLFLAG_RD, SYSCTL_NULL_INT_PTR, FSCALE, + "Fixed-point scale factor used for calculating load average values"); static void loadav(void *arg); Modified: head/sys/kern/kern_umtx.c ============================================================================== --- head/sys/kern/kern_umtx.c Mon Mar 2 14:36:15 2020 (r358547) +++ head/sys/kern/kern_umtx.c Mon Mar 2 15:30:52 2020 (r358548) @@ -240,7 +240,7 @@ SYSCTL_INT(_kern_ipc, OID_AUTO, umtx_vnode_persistent, static int umtx_max_rb = 1000; SYSCTL_INT(_kern_ipc, OID_AUTO, umtx_max_robust, CTLFLAG_RWTUN, &umtx_max_rb, 0, - ""); + "Maximum number of robust mutexes allowed for each thread"); static uma_zone_t umtx_pi_zone; static struct umtxq_chain umtxq_chains[2][UMTX_CHAINS]; Modified: head/sys/kern/sched_4bsd.c ============================================================================== --- head/sys/kern/sched_4bsd.c Mon Mar 2 14:36:15 2020 (r358547) +++ head/sys/kern/sched_4bsd.c Mon Mar 2 15:30:52 2020 (r358548) @@ -437,7 +437,8 @@ maybe_preempt(struct thread *td) /* decay 95% of `ts_pctcpu' in 60 seconds; see CCPU_SHIFT before changing */ static fixpt_t ccpu = 0.95122942450071400909 * FSCALE; /* exp(-1/20) */ -SYSCTL_UINT(_kern, OID_AUTO, ccpu, CTLFLAG_RD, &ccpu, 0, ""); +SYSCTL_UINT(_kern, OID_AUTO, ccpu, CTLFLAG_RD, &ccpu, 0, + "Decay factor used for updating %CPU"); /* * If `ccpu' is not equal to `exp(-1/20)' and you still want to use the Modified: head/sys/kern/sched_ule.c ============================================================================== --- head/sys/kern/sched_ule.c Mon Mar 2 14:36:15 2020 (r358547) +++ head/sys/kern/sched_ule.c Mon Mar 2 15:30:52 2020 (r358548) @@ -3128,4 +3128,5 @@ SYSCTL_PROC(_kern_sched, OID_AUTO, topology_spec, CTLT /* ps compat. All cpu percentages from ULE are weighted. */ static int ccpu = 0; -SYSCTL_INT(_kern, OID_AUTO, ccpu, CTLFLAG_RD, &ccpu, 0, ""); +SYSCTL_INT(_kern, OID_AUTO, ccpu, CTLFLAG_RD, &ccpu, 0, + "Decay factor used for updating %CPU in 4BSD scheduler"); Modified: head/sys/kern/subr_kobj.c ============================================================================== --- head/sys/kern/subr_kobj.c Mon Mar 2 14:36:15 2020 (r358547) +++ head/sys/kern/subr_kobj.c Mon Mar 2 15:30:52 2020 (r358548) @@ -67,7 +67,8 @@ static int kobj_next_id = 1; #define KOBJ_ASSERT(what) mtx_assert(&kobj_mtx, what); SYSCTL_INT(_kern, OID_AUTO, kobj_methodcount, CTLFLAG_RD, - &kobj_next_id, 0, ""); + &kobj_next_id, 0, + "Number of kernel object methods registered"); static void kobj_init_mutex(void *arg) From owner-svn-src-all@freebsd.org Mon Mar 2 15:55:58 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id ED6C7252066; Mon, 2 Mar 2020 15:55:58 +0000 (UTC) (envelope-from freebsd@gndrsh.dnsmgr.net) Received: from gndrsh.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 48WPrG2Mc5z45RZ; Mon, 2 Mar 2020 15:55:57 +0000 (UTC) (envelope-from freebsd@gndrsh.dnsmgr.net) Received: from gndrsh.dnsmgr.net (localhost [127.0.0.1]) by gndrsh.dnsmgr.net (8.13.3/8.13.3) with ESMTP id 022FtmaI027231; Mon, 2 Mar 2020 07:55:48 -0800 (PST) (envelope-from freebsd@gndrsh.dnsmgr.net) Received: (from freebsd@localhost) by gndrsh.dnsmgr.net (8.13.3/8.13.3/Submit) id 022FtmS2027230; Mon, 2 Mar 2020 07:55:48 -0800 (PST) (envelope-from freebsd) From: "Rodney W. Grimes" Message-Id: <202003021555.022FtmS2027230@gndrsh.dnsmgr.net> Subject: Re: svn commit: r358497 - in head: . share/man/man4 sys/conf sys/dev/bktr sys/modules sys/modules/bktr sys/modules/bktr/bktr sys/modules/bktr/bktr_mem sys/sys In-Reply-To: <20200302140528.GA41796@freefall.freebsd.org> To: Rene Ladan Date: Mon, 2 Mar 2020 07:55:48 -0800 (PST) CC: Warner Losh , 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: 48WPrG2Mc5z45RZ X-Spamd-Bar: ----- Authentication-Results: mx1.freebsd.org; none X-Spamd-Result: default: False [-5.92 / 15.00]; NEURAL_HAM_MEDIUM(-0.92)[-0.924,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, 02 Mar 2020 15:55:59 -0000 [ Charset ISO-8859-1 unsupported, converting... ] > On Sun, Mar 01, 2020 at 07:15:03PM +0000, Warner Losh wrote: > > Author: imp > > Date: Sun Mar 1 19:15:03 2020 > > New Revision: 358497 > > URL: https://svnweb.freebsd.org/changeset/base/358497 > > > > Log: > > Remove bktr(4) > > > > Remove the brooktree driver as discussed on arch@. Bump FreeBSD version to > > 1300082, though I doubt anything will care. > > > > Relnote: yes > > > > Deleted: > > head/share/man/man4/bktr.4 > > head/sys/dev/bktr/CHANGELOG.TXT > > head/sys/dev/bktr/bktr_audio.c > > head/sys/dev/bktr/bktr_audio.h > > head/sys/dev/bktr/bktr_card.c > > head/sys/dev/bktr/bktr_card.h > > head/sys/dev/bktr/bktr_core.c > > head/sys/dev/bktr/bktr_core.h > > head/sys/dev/bktr/bktr_i2c.c > > head/sys/dev/bktr/bktr_i2c.h > > head/sys/dev/bktr/bktr_mem.c > > head/sys/dev/bktr/bktr_mem.h > > head/sys/dev/bktr/bktr_os.c > > head/sys/dev/bktr/bktr_os.h > > head/sys/dev/bktr/bktr_reg.h > > head/sys/dev/bktr/bktr_tuner.c > > head/sys/dev/bktr/bktr_tuner.h > > head/sys/dev/bktr/ioctl_bt848.h > > head/sys/dev/bktr/ioctl_meteor.h > > head/sys/dev/bktr/msp34xx.c > > head/sys/modules/bktr/Makefile > > head/sys/modules/bktr/Makefile.inc > > head/sys/modules/bktr/bktr/Makefile > > head/sys/modules/bktr/bktr_mem/Makefile > > Modified: > > head/UPDATING > > head/share/man/man4/Makefile > > head/sys/conf/files > > head/sys/modules/Makefile > > head/sys/sys/param.h > > > Hmm, /usr/src/share/man/man4/meteor.4 is still present, > should that file be removed too? > > Ren? And there is also /usr/src/sys/i386/include/ioctl_meteor.h -- Rod Grimes rgrimes@freebsd.org From owner-svn-src-all@freebsd.org Mon Mar 2 15:58:54 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id C06A02521A4; Mon, 2 Mar 2020 15:58:54 +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 48WPvb4T7Dz49V8; Mon, 2 Mar 2020 15:58:51 +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 2D3DD1EBE7; Mon, 2 Mar 2020 15:58:51 +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 022FwojF002411; Mon, 2 Mar 2020 15:58:50 GMT (envelope-from kevans@FreeBSD.org) Received: (from kevans@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 022FwosY002410; Mon, 2 Mar 2020 15:58:50 GMT (envelope-from kevans@FreeBSD.org) Message-Id: <202003021558.022FwosY002410@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kevans set sender to kevans@FreeBSD.org using -f From: Kyle Evans Date: Mon, 2 Mar 2020 15:58:50 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r358549 - head/release/packages X-SVN-Group: head X-SVN-Commit-Author: kevans X-SVN-Commit-Paths: head/release/packages X-SVN-Commit-Revision: 358549 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages 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, 02 Mar 2020 15:58:55 -0000 Author: kevans Date: Mon Mar 2 15:58:50 2020 New Revision: 358549 URL: https://svnweb.freebsd.org/changeset/base/358549 Log: pkgbase: remove logic for _profile packages We don't produce these anymore as of r356797, remove the remnant in generate-ucl.sh that accounted for them. This isn't strictly necessary, but future work is needed for the various packages that can be generated on a lib build. Namely, we may produce -development packages for private/internal libs that should be installed but won't have the base FreeBSD-libfoo pkg to depend on because it's internal (e.g. liby, libpmcstat, libifconfig) but we want the headers installed. It may be a better move to just shove these into -runtime-development instead, but if not then we've just simplified the cases that need to take private/internal libs into account. Modified: head/release/packages/generate-ucl.sh Modified: head/release/packages/generate-ucl.sh ============================================================================== --- head/release/packages/generate-ucl.sh Mon Mar 2 15:30:52 2020 (r358548) +++ head/release/packages/generate-ucl.sh Mon Mar 2 15:58:50 2020 (r358549) @@ -71,11 +71,6 @@ main() { _descr="32-bit Libraries, Debugging Symbols" pkgdeps="${outname}" ;; - *_lib32_profile) - outname="${outname%%_lib32_profile}" - _descr="32-bit Libraries, Profiling" - pkgdeps="${outname}" - ;; *_lib32) outname="${outname%%_lib32}" _descr="32-bit Libraries" @@ -84,11 +79,6 @@ main() { *_development) outname="${outname%%_development}" _descr="Development Files" - pkgdeps="${outname}" - ;; - *_profile) - outname="${outname%%_profile}" - _descr="Profiling Libraries" pkgdeps="${outname}" ;; *_debug) From owner-svn-src-all@freebsd.org Mon Mar 2 16:11:27 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id BD0D42528F1; Mon, 2 Mar 2020 16:11:27 +0000 (UTC) (envelope-from luporl@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 48WQB65htBz4L2K; Mon, 2 Mar 2020 16:11:26 +0000 (UTC) (envelope-from luporl@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id EA10C1EF23; Mon, 2 Mar 2020 16:11:25 +0000 (UTC) (envelope-from luporl@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 022GBPbo012939; Mon, 2 Mar 2020 16:11:25 GMT (envelope-from luporl@FreeBSD.org) Received: (from luporl@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 022GBPl6012938; Mon, 2 Mar 2020 16:11:25 GMT (envelope-from luporl@FreeBSD.org) Message-Id: <202003021611.022GBPl6012938@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: luporl set sender to luporl@FreeBSD.org using -f From: Leandro Lupori Date: Mon, 2 Mar 2020 16:11:25 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r358550 - head/sys/dev/aacraid X-SVN-Group: head X-SVN-Commit-Author: luporl X-SVN-Commit-Paths: head/sys/dev/aacraid X-SVN-Commit-Revision: 358550 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages 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, 02 Mar 2020 16:11:27 -0000 Author: luporl Date: Mon Mar 2 16:11:25 2020 New Revision: 358550 URL: https://svnweb.freebsd.org/changeset/base/358550 Log: [aacraid] Prevent sense data from causing a buffer overflow This issue was observed on a PowerPC64 machine with an Adaptec RAID Controller with PCI device ID 0x028d, where sense data was causing a buffer overflow because of wrong max sense length logic. Reviewed by: emaste Differential Revision: https://reviews.freebsd.org/D23667 Modified: head/sys/dev/aacraid/aacraid_cam.c Modified: head/sys/dev/aacraid/aacraid_cam.c ============================================================================== --- head/sys/dev/aacraid/aacraid_cam.c Mon Mar 2 15:58:50 2020 (r358549) +++ head/sys/dev/aacraid/aacraid_cam.c Mon Mar 2 16:11:25 2020 (r358550) @@ -1182,7 +1182,7 @@ aac_cam_complete(struct aac_command *cm) scsi_sense_len) ? scsi_sense_len : srbr->sense_len; bcopy(&srbr->sense[0], &ccb->csio.sense_data, - srbr->sense_len); + sense_len); ccb->csio.sense_len = sense_len; ccb->ccb_h.status |= CAM_AUTOSNS_VALID; // scsi_sense_print(&ccb->csio); From owner-svn-src-all@freebsd.org Mon Mar 2 16:56:33 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 042CF253B0A; Mon, 2 Mar 2020 16:56:33 +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 48WRB85StNz45fy; Mon, 2 Mar 2020 16:56: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 9E98B1F6F9; Mon, 2 Mar 2020 16:56: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 022GuWdR038946; Mon, 2 Mar 2020 16:56:32 GMT (envelope-from jhibbits@FreeBSD.org) Received: (from jhibbits@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 022GuW1E038945; Mon, 2 Mar 2020 16:56:32 GMT (envelope-from jhibbits@FreeBSD.org) Message-Id: <202003021656.022GuW1E038945@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jhibbits set sender to jhibbits@FreeBSD.org using -f From: Justin Hibbits Date: Mon, 2 Mar 2020 16:56: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: r358551 - stable/12/sys/dev/uart X-SVN-Group: stable-12 X-SVN-Commit-Author: jhibbits X-SVN-Commit-Paths: stable/12/sys/dev/uart X-SVN-Commit-Revision: 358551 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages 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, 02 Mar 2020 16:56:33 -0000 Author: jhibbits Date: Mon Mar 2 16:56:32 2020 New Revision: 358551 URL: https://svnweb.freebsd.org/changeset/base/358551 Log: MFC r358431: Add Denverton UART PCI ID Sponsored by: Juniper Networks, Inc Modified: stable/12/sys/dev/uart/uart_bus_pci.c Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/dev/uart/uart_bus_pci.c ============================================================================== --- stable/12/sys/dev/uart/uart_bus_pci.c Mon Mar 2 16:11:25 2020 (r358550) +++ stable/12/sys/dev/uart/uart_bus_pci.c Mon Mar 2 16:56:32 2020 (r358551) @@ -133,6 +133,7 @@ static const struct pci_id pci_ns8250_ids[] = { { 0x8086, 0x0f0c, 0xffff, 0, "Intel ValleyView LPIO1 HSUART#2", 0x10, 24 * DEFAULT_RCLK, 2 }, { 0x8086, 0x108f, 0xffff, 0, "Intel AMT - SOL", 0x10 }, +{ 0x8086, 0x19d8, 0xffff, 0, "Intel Denverton UART", 0x10 }, { 0x8086, 0x1c3d, 0xffff, 0, "Intel AMT - KT Controller", 0x10 }, { 0x8086, 0x1d3d, 0xffff, 0, "Intel C600/X79 Series Chipset KT Controller", 0x10 }, { 0x8086, 0x1e3d, 0xffff, 0, "Intel Panther Point KT Controller", 0x10 }, From owner-svn-src-all@freebsd.org Mon Mar 2 17:14:10 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id CD5A32543DB; Mon, 2 Mar 2020 17:14:10 +0000 (UTC) (envelope-from rlibby@gmail.com) Received: from mail-qk1-f170.google.com (mail-qk1-f170.google.com [209.85.222.170]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1O1" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 48WRZT558Jz4TLT; Mon, 2 Mar 2020 17:14:08 +0000 (UTC) (envelope-from rlibby@gmail.com) Received: by mail-qk1-f170.google.com with SMTP id f198so347975qke.11; Mon, 02 Mar 2020 09:14:08 -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=w89quh4wCTdw71ykhoeqdQ/aHSiVp/DT1bqd2gyMc8E=; b=c3kcn8QfnjngIeiNw0ooViThuKp0DgA94+s1kfMEvtJOnbZtAagpi5jyoCe3b060e0 luaXcGnOpP9D6FjfMwy4jYV3I0NUvpJ1cBo9Wl7ZL4ow8tFN7ZjeObdkWNgIWiisklDh 9nyOeQxmJL+9zKRRfrJOtlkDalHl+UBymsps2uF3LER01L7OuPrqUzmEYdjQ/9RzpzFi b7b268m4gjvYBtVjEB7V6gSjnX5HIaV/XMbboYkpE3789Vh07pXkcUVfQrSgHwcDwyT0 nEFL14MaaJpiMWGVfuAJCd93FTNgZLcdxTIMx0SUYaJ6xQaEoF/Ffx13M+zXv27KhZbu DaJg== X-Gm-Message-State: ANhLgQ2SGKVvWyZ2TgtNidLvaeiCJ1FGlKIQSTMkGsflmYU4G+ih2ytv t6muxAZtG1ddk0TxUZhU7h0BtncE X-Google-Smtp-Source: ADFU+vvmUJQRs+bvsFUewEOJCey1FEKWcKf2yrjeZSvVwf7U64tEe2ObtMTFecgr8OgKUaftQh+UQg== X-Received: by 2002:a37:b86:: with SMTP id 128mr304568qkl.154.1583169244936; Mon, 02 Mar 2020 09:14:04 -0800 (PST) Received: from mail-qk1-f175.google.com (mail-qk1-f175.google.com. [209.85.222.175]) by smtp.gmail.com with ESMTPSA id i28sm11001074qtc.57.2020.03.02.09.14.04 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 02 Mar 2020 09:14:04 -0800 (PST) Received: by mail-qk1-f175.google.com with SMTP id u124so333978qkh.13; Mon, 02 Mar 2020 09:14:04 -0800 (PST) X-Received: by 2002:a05:620a:2116:: with SMTP id l22mr241302qkl.311.1583169244181; Mon, 02 Mar 2020 09:14:04 -0800 (PST) MIME-Version: 1.0 References: <202002281832.01SIWaEL071685@repo.freebsd.org> <5767791583138727@sas1-c7aad230fe87.qloud-c.yandex.net> In-Reply-To: <5767791583138727@sas1-c7aad230fe87.qloud-c.yandex.net> From: Ryan Libby Date: Mon, 2 Mar 2020 09:13:53 -0800 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: svn commit: r358439 - head/sys/amd64/include To: "Alexander V. Chernikov" 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: 48WRZT558Jz4TLT X-Spamd-Bar: --- Authentication-Results: mx1.freebsd.org; dkim=none; dmarc=none; spf=pass (mx1.freebsd.org: domain of rlibby@gmail.com designates 209.85.222.170 as permitted sender) smtp.mailfrom=rlibby@gmail.com X-Spamd-Result: default: False [-3.45 / 15.00]; ARC_NA(0.00)[]; TO_DN_EQ_ADDR_SOME(0.00)[]; RCVD_TLS_ALL(0.00)[]; FROM_HAS_DN(0.00)[]; RCPT_COUNT_THREE(0.00)[4]; R_SPF_ALLOW(-0.20)[+ip4:209.85.128.0/17:c]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; MIME_GOOD(-0.10)[text/plain]; DMARC_NA(0.00)[freebsd.org]; RCVD_VIA_SMTP_AUTH(0.00)[]; TO_DN_SOME(0.00)[]; RCVD_COUNT_THREE(0.00)[4]; TO_MATCH_ENVRCPT_SOME(0.00)[]; RCVD_IN_DNSWL_NONE(0.00)[170.222.85.209.list.dnswl.org : 127.0.5.0]; NEURAL_HAM_MEDIUM(-1.00)[-1.000,0]; IP_SCORE(-1.45)[ip: (-2.54), ipnet: 209.85.128.0/17(-2.99), asn: 15169(-1.66), country: US(-0.05)]; FORGED_SENDER(0.30)[rlibby@freebsd.org,rlibby@gmail.com]; RWL_MAILSPIKE_POSSIBLE(0.00)[170.222.85.209.rep.mailspike.net : 127.0.0.17]; MIME_TRACE(0.00)[0:+]; 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)[rlibby@freebsd.org,rlibby@gmail.com] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages 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, 02 Mar 2020 17:14:10 -0000 On Mon, Mar 2, 2020 at 12:45 AM Alexander V. Chernikov wrote: > > 28.02.2020, 18:32, "Ryan Libby" : > > Author: rlibby > > Date: Fri Feb 28 18:32:36 2020 > > New Revision: 358439 > > URL: https://svnweb.freebsd.org/changeset/base/358439 > > > > Log: > > amd64 atomic.h: minor codegen optimization in flag access > > > > Previously the pattern to extract status flags from inline assembly > > blocks was to use setcc in the block to write the flag to a register. > > This was suboptimal in a few ways: > > - It would lead to code like: sete %cl; test %cl; jne, i.e. a flag > > would just be loaded into a register and then reloaded to a flag. > > - The setcc would force the block to use an additional register. > > - If the client code didn't care for the flag value then the setcc > > would be entirely pointless but could not be eliminated by the > > optimizer. > > > > A more modern inline asm construct (since gcc 6 and clang 9) allows for > This effectively restricts kernel builds by all older compilers. > Is there any chance of making it conditional depending on the compiler version/features? Yes, it is possible to test for __GCC_ASM_FLAG_OUTPUTS__. It is more maintenance effort going forward. If building current with an old cross compiler is an important scenario, we can either revert this and the following revision or work up a patch to make it conditional. I'll see what that might look like. > > "flag output operands", where a C variable can be written directly from > > a flag. The optimizer can then use this to produce direct code where > > the flag does not take a trip through a register. > > > > In practice this makes each affected operation sequence shorter by five > > bytes of instructions. It's unlikely this has a measurable performance > > impact. > > > > Reviewed by: kib, markj, mjg > > Sponsored by: Dell EMC Isilon > > Differential Revision: https://reviews.freebsd.org/D23869 > > > > Modified: > > head/sys/amd64/include/atomic.h > > > > Modified: head/sys/amd64/include/atomic.h > > ============================================================================== > > --- head/sys/amd64/include/atomic.h Fri Feb 28 17:41:46 2020 (r358438) > > +++ head/sys/amd64/include/atomic.h Fri Feb 28 18:32:36 2020 (r358439) > > @@ -201,9 +201,8 @@ atomic_cmpset_##TYPE(volatile u_##TYPE *dst, u_##TYPE > > __asm __volatile( \ > > " " MPLOCKED " " \ > > " cmpxchg %3,%1 ; " \ > > - " sete %0 ; " \ > > "# atomic_cmpset_" #TYPE " " \ > > - : "=q" (res), /* 0 */ \ > > + : "=@cce" (res), /* 0 */ \ > > "+m" (*dst), /* 1 */ \ > > "+a" (expect) /* 2 */ \ > > : "r" (src) /* 3 */ \ > > @@ -219,9 +218,8 @@ atomic_fcmpset_##TYPE(volatile u_##TYPE *dst, u_##TYPE > > __asm __volatile( \ > > " " MPLOCKED " " \ > > " cmpxchg %3,%1 ; " \ > > - " sete %0 ; " \ > > "# atomic_fcmpset_" #TYPE " " \ > > - : "=q" (res), /* 0 */ \ > > + : "=@cce" (res), /* 0 */ \ > > "+m" (*dst), /* 1 */ \ > > "+a" (*expect) /* 2 */ \ > > : "r" (src) /* 3 */ \ > > @@ -278,9 +276,8 @@ atomic_testandset_int(volatile u_int *p, u_int v) > > __asm __volatile( > > " " MPLOCKED " " > > " btsl %2,%1 ; " > > - " setc %0 ; " > > "# atomic_testandset_int" > > - : "=q" (res), /* 0 */ > > + : "=@ccc" (res), /* 0 */ > > "+m" (*p) /* 1 */ > > : "Ir" (v & 0x1f) /* 2 */ > > : "cc"); > > @@ -295,9 +292,8 @@ atomic_testandset_long(volatile u_long *p, u_int v) > > __asm __volatile( > > " " MPLOCKED " " > > " btsq %2,%1 ; " > > - " setc %0 ; " > > "# atomic_testandset_long" > > - : "=q" (res), /* 0 */ > > + : "=@ccc" (res), /* 0 */ > > "+m" (*p) /* 1 */ > > : "Jr" ((u_long)(v & 0x3f)) /* 2 */ > > : "cc"); > > @@ -312,9 +308,8 @@ atomic_testandclear_int(volatile u_int *p, u_int v) > > __asm __volatile( > > " " MPLOCKED " " > > " btrl %2,%1 ; " > > - " setc %0 ; " > > "# atomic_testandclear_int" > > - : "=q" (res), /* 0 */ > > + : "=@ccc" (res), /* 0 */ > > "+m" (*p) /* 1 */ > > : "Ir" (v & 0x1f) /* 2 */ > > : "cc"); > > @@ -329,9 +324,8 @@ atomic_testandclear_long(volatile u_long *p, u_int v) > > __asm __volatile( > > " " MPLOCKED " " > > " btrq %2,%1 ; " > > - " setc %0 ; " > > "# atomic_testandclear_long" > > - : "=q" (res), /* 0 */ > > + : "=@ccc" (res), /* 0 */ > > "+m" (*p) /* 1 */ > > : "Jr" ((u_long)(v & 0x3f)) /* 2 */ > > : "cc"); From owner-svn-src-all@freebsd.org Mon Mar 2 18:06:03 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 7141C255E60; Mon, 2 Mar 2020 18:06:03 +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 48WSkM2S06z4DQX; Mon, 2 Mar 2020 18:06:03 +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 4F02B203B9; Mon, 2 Mar 2020 18:06:03 +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 022I636T080674; Mon, 2 Mar 2020 18:06:03 GMT (envelope-from jhibbits@FreeBSD.org) Received: (from jhibbits@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 022I63nL080673; Mon, 2 Mar 2020 18:06:03 GMT (envelope-from jhibbits@FreeBSD.org) Message-Id: <202003021806.022I63nL080673@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jhibbits set sender to jhibbits@FreeBSD.org using -f From: Justin Hibbits Date: Mon, 2 Mar 2020 18:06: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: r358552 - stable/11/sys/dev/uart X-SVN-Group: stable-11 X-SVN-Commit-Author: jhibbits X-SVN-Commit-Paths: stable/11/sys/dev/uart X-SVN-Commit-Revision: 358552 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages 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, 02 Mar 2020 18:06:03 -0000 Author: jhibbits Date: Mon Mar 2 18:06:02 2020 New Revision: 358552 URL: https://svnweb.freebsd.org/changeset/base/358552 Log: MFC r358431: Add Denverton UART PCI ID Sponsored by: Juniper Networks, Inc Modified: stable/11/sys/dev/uart/uart_bus_pci.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/dev/uart/uart_bus_pci.c ============================================================================== --- stable/11/sys/dev/uart/uart_bus_pci.c Mon Mar 2 16:56:32 2020 (r358551) +++ stable/11/sys/dev/uart/uart_bus_pci.c Mon Mar 2 18:06:02 2020 (r358552) @@ -128,6 +128,7 @@ static const struct pci_id pci_ns8250_ids[] = { { 0x8086, 0x0f0c, 0xffff, 0, "Intel ValleyView LPIO1 HSUART#2", 0x10, 24 * DEFAULT_RCLK, 2 }, { 0x8086, 0x108f, 0xffff, 0, "Intel AMT - SOL", 0x10 }, +{ 0x8086, 0x19d8, 0xffff, 0, "Intel Denverton UART", 0x10 }, { 0x8086, 0x1c3d, 0xffff, 0, "Intel AMT - KT Controller", 0x10 }, { 0x8086, 0x1d3d, 0xffff, 0, "Intel C600/X79 Series Chipset KT Controller", 0x10 }, { 0x8086, 0x1e3d, 0xffff, 0, "Intel Panther Point KT Controller", 0x10 }, From owner-svn-src-all@freebsd.org Mon Mar 2 18:27:05 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 83C68256A7B; Mon, 2 Mar 2020 18:27:05 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from kib.kiev.ua (kib.kiev.ua [IPv6:2001:470:d5e7:1::1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 48WTBc2Q7Qz4q4M; Mon, 2 Mar 2020 18:27:04 +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 022IQrDO031971 (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384 bits=256 verify=NO); Mon, 2 Mar 2020 20:26:56 +0200 (EET) (envelope-from kostikbel@gmail.com) DKIM-Filter: OpenDKIM Filter v2.10.3 kib.kiev.ua 022IQrDO031971 Received: (from kostik@localhost) by tom.home (8.15.2/8.15.2/Submit) id 022IQr8M031970; Mon, 2 Mar 2020 20:26:53 +0200 (EET) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: tom.home: kostik set sender to kostikbel@gmail.com using -f Date: Mon, 2 Mar 2020 20:26:53 +0200 From: Konstantin Belousov To: "Alexander V. Chernikov" Cc: Ryan Libby , "src-committers@freebsd.org" , "svn-src-all@freebsd.org" , "svn-src-head@freebsd.org" Subject: Re: svn commit: r358439 - head/sys/amd64/include Message-ID: <20200302182653.GQ29554@kib.kiev.ua> References: <202002281832.01SIWaEL071685@repo.freebsd.org> <5767791583138727@sas1-c7aad230fe87.qloud-c.yandex.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: 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.4 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on tom.home X-Rspamd-Queue-Id: 48WTBc2Q7Qz4q4M X-Spamd-Bar: ----- Authentication-Results: mx1.freebsd.org; none X-Spamd-Result: default: False [-5.98 / 15.00]; NEURAL_HAM_MEDIUM(-0.98)[-0.983,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, 02 Mar 2020 18:27:05 -0000 On Mon, Mar 02, 2020 at 09:13:53AM -0800, Ryan Libby wrote: > On Mon, Mar 2, 2020 at 12:45 AM Alexander V. Chernikov wrote: > > > > 28.02.2020, 18:32, "Ryan Libby" : > > > Author: rlibby > > > Date: Fri Feb 28 18:32:36 2020 > > > New Revision: 358439 > > > URL: https://svnweb.freebsd.org/changeset/base/358439 > > > > > > Log: > > > amd64 atomic.h: minor codegen optimization in flag access > > > > > > Previously the pattern to extract status flags from inline assembly > > > blocks was to use setcc in the block to write the flag to a register. > > > This was suboptimal in a few ways: > > > - It would lead to code like: sete %cl; test %cl; jne, i.e. a flag > > > would just be loaded into a register and then reloaded to a flag. > > > - The setcc would force the block to use an additional register. > > > - If the client code didn't care for the flag value then the setcc > > > would be entirely pointless but could not be eliminated by the > > > optimizer. > > > > > > A more modern inline asm construct (since gcc 6 and clang 9) allows for > > This effectively restricts kernel builds by all older compilers. > > Is there any chance of making it conditional depending on the compiler version/features? What is the older compiler you need to use for base system ? And why ? > > Yes, it is possible to test for __GCC_ASM_FLAG_OUTPUTS__. It is more > maintenance effort going forward. If building current with an old cross > compiler is an important scenario, we can either revert this and the > following revision or work up a patch to make it conditional. I'll see > what that might look like. From owner-svn-src-all@freebsd.org Mon Mar 2 18:40:40 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 01455256E5F; Mon, 2 Mar 2020 18:40:40 +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 48WTVH66m6z3LZL; Mon, 2 Mar 2020 18:40:39 +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 3CDA920953; Mon, 2 Mar 2020 18:40:39 +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 022Iedql000272; Mon, 2 Mar 2020 18:40:39 GMT (envelope-from kevans@FreeBSD.org) Received: (from kevans@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 022IeYak098618; Mon, 2 Mar 2020 18:40:34 GMT (envelope-from kevans@FreeBSD.org) Message-Id: <202003021840.022IeYak098618@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kevans set sender to kevans@FreeBSD.org using -f From: Kyle Evans Date: Mon, 2 Mar 2020 18:40:34 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r358553 - head/usr.bin/hexdump/tests X-SVN-Group: head X-SVN-Commit-Author: kevans X-SVN-Commit-Paths: head/usr.bin/hexdump/tests X-SVN-Commit-Revision: 358553 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages 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, 02 Mar 2020 18:40:40 -0000 Author: kevans Date: Mon Mar 2 18:40:34 2020 New Revision: 358553 URL: https://svnweb.freebsd.org/changeset/base/358553 Log: hexdump: tests: take into account byte order Hexdump test was failling on big endian systems when testing decimal, octal and hexa outputs as the tests were designed on a little endian system. This revision adds the two distinct flavors of output expected and determines at runtime which to compare against. Submitted by: Renato Riolino MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D23191 Added: head/usr.bin/hexdump/tests/d_hexdump_dflag_a_eb.out (contents, props changed) head/usr.bin/hexdump/tests/d_hexdump_dflag_a_el.out - copied unchanged from r358552, head/usr.bin/hexdump/tests/d_hexdump_dflag_a.out head/usr.bin/hexdump/tests/d_hexdump_dflag_b_eb.out (contents, props changed) head/usr.bin/hexdump/tests/d_hexdump_dflag_b_el.out - copied unchanged from r358552, head/usr.bin/hexdump/tests/d_hexdump_dflag_b.out head/usr.bin/hexdump/tests/d_hexdump_dflag_c_eb.out (contents, props changed) - copied, changed from r358552, head/usr.bin/hexdump/tests/d_hexdump_dflag_c.out head/usr.bin/hexdump/tests/d_hexdump_dflag_c_el.out - copied unchanged from r358552, head/usr.bin/hexdump/tests/d_hexdump_dflag_c.out head/usr.bin/hexdump/tests/d_hexdump_oflag_a_eb.out (contents, props changed) head/usr.bin/hexdump/tests/d_hexdump_oflag_a_el.out - copied unchanged from r358552, head/usr.bin/hexdump/tests/d_hexdump_oflag_a.out head/usr.bin/hexdump/tests/d_hexdump_oflag_b_eb.out (contents, props changed) head/usr.bin/hexdump/tests/d_hexdump_oflag_b_el.out - copied unchanged from r358552, head/usr.bin/hexdump/tests/d_hexdump_oflag_b.out head/usr.bin/hexdump/tests/d_hexdump_oflag_c_eb.out (contents, props changed) - copied, changed from r358552, head/usr.bin/hexdump/tests/d_hexdump_oflag_c.out head/usr.bin/hexdump/tests/d_hexdump_oflag_c_el.out - copied unchanged from r358552, head/usr.bin/hexdump/tests/d_hexdump_oflag_c.out head/usr.bin/hexdump/tests/d_hexdump_xflag_a_eb.out (contents, props changed) head/usr.bin/hexdump/tests/d_hexdump_xflag_a_el.out - copied unchanged from r358552, head/usr.bin/hexdump/tests/d_hexdump_xflag_a.out head/usr.bin/hexdump/tests/d_hexdump_xflag_b_eb.out (contents, props changed) head/usr.bin/hexdump/tests/d_hexdump_xflag_b_el.out - copied unchanged from r358552, head/usr.bin/hexdump/tests/d_hexdump_xflag_b.out head/usr.bin/hexdump/tests/d_hexdump_xflag_c_eb.out (contents, props changed) - copied, changed from r358552, head/usr.bin/hexdump/tests/d_hexdump_xflag_c.out head/usr.bin/hexdump/tests/d_hexdump_xflag_c_el.out - copied unchanged from r358552, head/usr.bin/hexdump/tests/d_hexdump_xflag_c.out Deleted: head/usr.bin/hexdump/tests/d_hexdump_dflag_a.out head/usr.bin/hexdump/tests/d_hexdump_dflag_b.out head/usr.bin/hexdump/tests/d_hexdump_dflag_c.out head/usr.bin/hexdump/tests/d_hexdump_oflag_a.out head/usr.bin/hexdump/tests/d_hexdump_oflag_b.out head/usr.bin/hexdump/tests/d_hexdump_oflag_c.out head/usr.bin/hexdump/tests/d_hexdump_xflag_a.out head/usr.bin/hexdump/tests/d_hexdump_xflag_b.out head/usr.bin/hexdump/tests/d_hexdump_xflag_c.out Modified: head/usr.bin/hexdump/tests/Makefile head/usr.bin/hexdump/tests/hexdump_test.sh Modified: head/usr.bin/hexdump/tests/Makefile ============================================================================== --- head/usr.bin/hexdump/tests/Makefile Mon Mar 2 18:06:02 2020 (r358552) +++ head/usr.bin/hexdump/tests/Makefile Mon Mar 2 18:40:34 2020 (r358553) @@ -13,20 +13,29 @@ ${PACKAGE}FILES+= d_hexdump_bflag_c.out ${PACKAGE}FILES+= d_hexdump_cflag_a.out ${PACKAGE}FILES+= d_hexdump_cflag_b.out ${PACKAGE}FILES+= d_hexdump_cflag_c.out -${PACKAGE}FILES+= d_hexdump_dflag_a.out -${PACKAGE}FILES+= d_hexdump_dflag_b.out -${PACKAGE}FILES+= d_hexdump_dflag_c.out +${PACKAGE}FILES+= d_hexdump_dflag_a_el.out +${PACKAGE}FILES+= d_hexdump_dflag_b_el.out +${PACKAGE}FILES+= d_hexdump_dflag_c_el.out +${PACKAGE}FILES+= d_hexdump_dflag_a_eb.out +${PACKAGE}FILES+= d_hexdump_dflag_b_eb.out +${PACKAGE}FILES+= d_hexdump_dflag_c_eb.out ${PACKAGE}FILES+= d_hexdump_nflag_a.out -${PACKAGE}FILES+= d_hexdump_oflag_a.out -${PACKAGE}FILES+= d_hexdump_oflag_b.out -${PACKAGE}FILES+= d_hexdump_oflag_c.out +${PACKAGE}FILES+= d_hexdump_oflag_a_el.out +${PACKAGE}FILES+= d_hexdump_oflag_b_el.out +${PACKAGE}FILES+= d_hexdump_oflag_c_el.out +${PACKAGE}FILES+= d_hexdump_oflag_a_eb.out +${PACKAGE}FILES+= d_hexdump_oflag_b_eb.out +${PACKAGE}FILES+= d_hexdump_oflag_c_eb.out ${PACKAGE}FILES+= d_hexdump_sflag_a.out ${PACKAGE}FILES+= d_hexdump_UCflag_a.out ${PACKAGE}FILES+= d_hexdump_UCflag_b.out ${PACKAGE}FILES+= d_hexdump_UCflag_c.out -${PACKAGE}FILES+= d_hexdump_xflag_a.out -${PACKAGE}FILES+= d_hexdump_xflag_b.out -${PACKAGE}FILES+= d_hexdump_xflag_c.out +${PACKAGE}FILES+= d_hexdump_xflag_a_el.out +${PACKAGE}FILES+= d_hexdump_xflag_b_el.out +${PACKAGE}FILES+= d_hexdump_xflag_c_el.out +${PACKAGE}FILES+= d_hexdump_xflag_a_eb.out +${PACKAGE}FILES+= d_hexdump_xflag_b_eb.out +${PACKAGE}FILES+= d_hexdump_xflag_c_eb.out ${PACKAGE}FILES+= d_od_cflag_a.out ${PACKAGE}FILES+= d_od_cflag_b.out Added: head/usr.bin/hexdump/tests/d_hexdump_dflag_a_eb.out ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/usr.bin/hexdump/tests/d_hexdump_dflag_a_eb.out Mon Mar 2 18:40:34 2020 (r358553) @@ -0,0 +1,2 @@ +0000000 21605 29556 02560 +0000005 Copied: head/usr.bin/hexdump/tests/d_hexdump_dflag_a_el.out (from r358552, head/usr.bin/hexdump/tests/d_hexdump_dflag_a.out) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/usr.bin/hexdump/tests/d_hexdump_dflag_a_el.out Mon Mar 2 18:40:34 2020 (r358553, copy of r358552, head/usr.bin/hexdump/tests/d_hexdump_dflag_a.out) @@ -0,0 +1,2 @@ +0000000 25940 29811 00010 +0000005 Added: head/usr.bin/hexdump/tests/d_hexdump_dflag_b_eb.out ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/usr.bin/hexdump/tests/d_hexdump_dflag_b_eb.out Mon Mar 2 18:40:34 2020 (r358553) @@ -0,0 +1,4 @@ +0000000 21608 25888 29045 26979 27424 25202 28535 28192 +0000010 26223 30752 27253 28016 25956 08303 30309 29216 +0000020 29800 25888 25196 30053 08296 28533 29541 02570 +0000030 Copied: head/usr.bin/hexdump/tests/d_hexdump_dflag_b_el.out (from r358552, head/usr.bin/hexdump/tests/d_hexdump_dflag_b.out) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/usr.bin/hexdump/tests/d_hexdump_dflag_b_el.out Mon Mar 2 18:40:34 2020 (r358553, copy of r358552, head/usr.bin/hexdump/tests/d_hexdump_dflag_b.out) @@ -0,0 +1,4 @@ +0000000 26708 08293 30065 25449 08299 29282 30575 08302 +0000010 28518 08312 30058 28781 25701 28448 25974 08306 +0000020 26740 08293 27746 25973 26656 30063 25971 02570 +0000030 Copied and modified: head/usr.bin/hexdump/tests/d_hexdump_dflag_c_eb.out (from r358552, head/usr.bin/hexdump/tests/d_hexdump_dflag_c.out) ============================================================================== --- head/usr.bin/hexdump/tests/d_hexdump_dflag_c.out Mon Mar 2 18:06:02 2020 (r358552, copy source) +++ head/usr.bin/hexdump/tests/d_hexdump_dflag_c_eb.out Mon Mar 2 18:40:34 2020 (r358553) @@ -1,4 +1,4 @@ 0000000 16705 16705 16705 16705 16705 16705 16705 16705 * -0000020 16705 16705 16705 02625 +0000020 16705 16705 16705 16650 0000028 Copied: head/usr.bin/hexdump/tests/d_hexdump_dflag_c_el.out (from r358552, head/usr.bin/hexdump/tests/d_hexdump_dflag_c.out) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/usr.bin/hexdump/tests/d_hexdump_dflag_c_el.out Mon Mar 2 18:40:34 2020 (r358553, copy of r358552, head/usr.bin/hexdump/tests/d_hexdump_dflag_c.out) @@ -0,0 +1,4 @@ +0000000 16705 16705 16705 16705 16705 16705 16705 16705 +* +0000020 16705 16705 16705 02625 +0000028 Added: head/usr.bin/hexdump/tests/d_hexdump_oflag_a_eb.out ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/usr.bin/hexdump/tests/d_hexdump_oflag_a_eb.out Mon Mar 2 18:40:34 2020 (r358553) @@ -0,0 +1,2 @@ +0000000 052145 071564 005000 +0000005 Copied: head/usr.bin/hexdump/tests/d_hexdump_oflag_a_el.out (from r358552, head/usr.bin/hexdump/tests/d_hexdump_oflag_a.out) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/usr.bin/hexdump/tests/d_hexdump_oflag_a_el.out Mon Mar 2 18:40:34 2020 (r358553, copy of r358552, head/usr.bin/hexdump/tests/d_hexdump_oflag_a.out) @@ -0,0 +1,2 @@ +0000000 062524 072163 000012 +0000005 Added: head/usr.bin/hexdump/tests/d_hexdump_oflag_b_eb.out ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/usr.bin/hexdump/tests/d_hexdump_oflag_b_eb.out Mon Mar 2 18:40:34 2020 (r358553) @@ -0,0 +1,4 @@ +0000000 052150 062440 070565 064543 065440 061162 067567 067040 +0000010 063157 074040 065165 066560 062544 020157 073145 071040 +0000020 072150 062440 061154 072545 020150 067565 071545 005012 +0000030 Copied: head/usr.bin/hexdump/tests/d_hexdump_oflag_b_el.out (from r358552, head/usr.bin/hexdump/tests/d_hexdump_oflag_b.out) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/usr.bin/hexdump/tests/d_hexdump_oflag_b_el.out Mon Mar 2 18:40:34 2020 (r358553, copy of r358552, head/usr.bin/hexdump/tests/d_hexdump_oflag_b.out) @@ -0,0 +1,4 @@ +0000000 064124 020145 072561 061551 020153 071142 073557 020156 +0000010 067546 020170 072552 070155 062145 067440 062566 020162 +0000020 064164 020145 066142 062565 064040 072557 062563 005012 +0000030 Copied and modified: head/usr.bin/hexdump/tests/d_hexdump_oflag_c_eb.out (from r358552, head/usr.bin/hexdump/tests/d_hexdump_oflag_c.out) ============================================================================== --- head/usr.bin/hexdump/tests/d_hexdump_oflag_c.out Mon Mar 2 18:06:02 2020 (r358552, copy source) +++ head/usr.bin/hexdump/tests/d_hexdump_oflag_c_eb.out Mon Mar 2 18:40:34 2020 (r358553) @@ -1,4 +1,4 @@ 0000000 040501 040501 040501 040501 040501 040501 040501 040501 * -0000020 040501 040501 040501 005101 +0000020 040501 040501 040501 040412 0000028 Copied: head/usr.bin/hexdump/tests/d_hexdump_oflag_c_el.out (from r358552, head/usr.bin/hexdump/tests/d_hexdump_oflag_c.out) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/usr.bin/hexdump/tests/d_hexdump_oflag_c_el.out Mon Mar 2 18:40:34 2020 (r358553, copy of r358552, head/usr.bin/hexdump/tests/d_hexdump_oflag_c.out) @@ -0,0 +1,4 @@ +0000000 040501 040501 040501 040501 040501 040501 040501 040501 +* +0000020 040501 040501 040501 005101 +0000028 Added: head/usr.bin/hexdump/tests/d_hexdump_xflag_a_eb.out ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/usr.bin/hexdump/tests/d_hexdump_xflag_a_eb.out Mon Mar 2 18:40:34 2020 (r358553) @@ -0,0 +1,2 @@ +0000000 5465 7374 0a00 +0000005 Copied: head/usr.bin/hexdump/tests/d_hexdump_xflag_a_el.out (from r358552, head/usr.bin/hexdump/tests/d_hexdump_xflag_a.out) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/usr.bin/hexdump/tests/d_hexdump_xflag_a_el.out Mon Mar 2 18:40:34 2020 (r358553, copy of r358552, head/usr.bin/hexdump/tests/d_hexdump_xflag_a.out) @@ -0,0 +1,2 @@ +0000000 6554 7473 000a +0000005 Added: head/usr.bin/hexdump/tests/d_hexdump_xflag_b_eb.out ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/usr.bin/hexdump/tests/d_hexdump_xflag_b_eb.out Mon Mar 2 18:40:34 2020 (r358553) @@ -0,0 +1,4 @@ +0000000 5468 6520 7175 6963 6b20 6272 6f77 6e20 +0000010 666f 7820 6a75 6d70 6564 206f 7665 7220 +0000020 7468 6520 626c 7565 2068 6f75 7365 0a0a +0000030 Copied: head/usr.bin/hexdump/tests/d_hexdump_xflag_b_el.out (from r358552, head/usr.bin/hexdump/tests/d_hexdump_xflag_b.out) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/usr.bin/hexdump/tests/d_hexdump_xflag_b_el.out Mon Mar 2 18:40:34 2020 (r358553, copy of r358552, head/usr.bin/hexdump/tests/d_hexdump_xflag_b.out) @@ -0,0 +1,4 @@ +0000000 6854 2065 7571 6369 206b 7262 776f 206e +0000010 6f66 2078 756a 706d 6465 6f20 6576 2072 +0000020 6874 2065 6c62 6575 6820 756f 6573 0a0a +0000030 Copied and modified: head/usr.bin/hexdump/tests/d_hexdump_xflag_c_eb.out (from r358552, head/usr.bin/hexdump/tests/d_hexdump_xflag_c.out) ============================================================================== --- head/usr.bin/hexdump/tests/d_hexdump_xflag_c.out Mon Mar 2 18:06:02 2020 (r358552, copy source) +++ head/usr.bin/hexdump/tests/d_hexdump_xflag_c_eb.out Mon Mar 2 18:40:34 2020 (r358553) @@ -1,4 +1,4 @@ 0000000 4141 4141 4141 4141 4141 4141 4141 4141 * -0000020 4141 4141 4141 0a41 +0000020 4141 4141 4141 410a 0000028 Copied: head/usr.bin/hexdump/tests/d_hexdump_xflag_c_el.out (from r358552, head/usr.bin/hexdump/tests/d_hexdump_xflag_c.out) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/usr.bin/hexdump/tests/d_hexdump_xflag_c_el.out Mon Mar 2 18:40:34 2020 (r358553, copy of r358552, head/usr.bin/hexdump/tests/d_hexdump_xflag_c.out) @@ -0,0 +1,4 @@ +0000000 4141 4141 4141 4141 4141 4141 4141 4141 +* +0000020 4141 4141 4141 0a41 +0000028 Modified: head/usr.bin/hexdump/tests/hexdump_test.sh ============================================================================== --- head/usr.bin/hexdump/tests/hexdump_test.sh Mon Mar 2 18:06:02 2020 (r358552) +++ head/usr.bin/hexdump/tests/hexdump_test.sh Mon Mar 2 18:40:34 2020 (r358553) @@ -26,6 +26,12 @@ # # $FreeBSD$ +ENDIAN=el +ret=$(echo I | tr -d "[:space:]" | od -to2 | head -n1 | awk '{print $2}' | cut -c6) +if [ "$ret" = "0" ]; then + ENDIAN=eb +fi + atf_test_case b_flag b_flag_head() { @@ -93,11 +99,11 @@ d_flag_head() } d_flag_body() { - atf_check -o file:"$(atf_get_srcdir)/d_hexdump_dflag_a.out" \ + atf_check -o file:"$(atf_get_srcdir)/d_hexdump_dflag_a_$ENDIAN.out" \ hexdump -d "$(atf_get_srcdir)/d_hexdump_a.in" - atf_check -o file:"$(atf_get_srcdir)/d_hexdump_dflag_b.out" \ + atf_check -o file:"$(atf_get_srcdir)/d_hexdump_dflag_b_$ENDIAN.out" \ hexdump -d "$(atf_get_srcdir)/d_hexdump_b.in" - atf_check -o file:"$(atf_get_srcdir)/d_hexdump_dflag_c.out" \ + atf_check -o file:"$(atf_get_srcdir)/d_hexdump_dflag_c_$ENDIAN.out" \ hexdump -d "$(atf_get_srcdir)/d_hexdump_c.in" } @@ -120,11 +126,11 @@ o_flag_head() } o_flag_body() { - atf_check -o file:"$(atf_get_srcdir)/d_hexdump_oflag_a.out" \ + atf_check -o file:"$(atf_get_srcdir)/d_hexdump_oflag_a_$ENDIAN.out" \ hexdump -o "$(atf_get_srcdir)/d_hexdump_a.in" - atf_check -o file:"$(atf_get_srcdir)/d_hexdump_oflag_b.out" \ + atf_check -o file:"$(atf_get_srcdir)/d_hexdump_oflag_b_$ENDIAN.out" \ hexdump -o "$(atf_get_srcdir)/d_hexdump_b.in" - atf_check -o file:"$(atf_get_srcdir)/d_hexdump_oflag_c.out" \ + atf_check -o file:"$(atf_get_srcdir)/d_hexdump_oflag_c_$ENDIAN.out" \ hexdump -o "$(atf_get_srcdir)/d_hexdump_c.in" } @@ -168,11 +174,11 @@ x_flag_head() } x_flag_body() { - atf_check -o file:"$(atf_get_srcdir)/d_hexdump_xflag_a.out" \ + atf_check -o file:"$(atf_get_srcdir)/d_hexdump_xflag_a_$ENDIAN.out" \ hexdump -x "$(atf_get_srcdir)/d_hexdump_a.in" - atf_check -o file:"$(atf_get_srcdir)/d_hexdump_xflag_b.out" \ + atf_check -o file:"$(atf_get_srcdir)/d_hexdump_xflag_b_$ENDIAN.out" \ hexdump -x "$(atf_get_srcdir)/d_hexdump_b.in" - atf_check -o file:"$(atf_get_srcdir)/d_hexdump_xflag_c.out" \ + atf_check -o file:"$(atf_get_srcdir)/d_hexdump_xflag_c_$ENDIAN.out" \ hexdump -x "$(atf_get_srcdir)/d_hexdump_c.in" } From owner-svn-src-all@freebsd.org Mon Mar 2 20:14:28 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id F380625985B; Mon, 2 Mar 2020 20:14:28 +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 48WWZX57Nxz44S4; Mon, 2 Mar 2020 20:14:28 +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 921F221B9A; Mon, 2 Mar 2020 20:14:28 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 022KESBb058145; Mon, 2 Mar 2020 20:14:28 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 022KERkt058142; Mon, 2 Mar 2020 20:14:27 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <202003022014.022KERkt058142@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Mon, 2 Mar 2020 20:14:27 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r358554 - in head: share/man/man4/man4.i386 sys/dev/ctau sys/dev/cx X-SVN-Group: head X-SVN-Commit-Author: emaste X-SVN-Commit-Paths: in head: share/man/man4/man4.i386 sys/dev/ctau sys/dev/cx X-SVN-Commit-Revision: 358554 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages 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, 02 Mar 2020 20:14:29 -0000 Author: emaste Date: Mon Mar 2 20:14:27 2020 New Revision: 358554 URL: https://svnweb.freebsd.org/changeset/base/358554 Log: Add deprecation notices to ctau and cx drivers These support outdated or obsolete ISA WAN (T1/E1) sync serial cards, and these drivers haven't really been touched (other than in tree-wide sweeps to keep them building) for 15+ years. Related PCI devices ce and cp are still in the tree, with deprecation proposed in D23928. MFC after: 1 week Relnotes: Yes Sponsored by: The FreeBSD Foundation Modified: head/share/man/man4/man4.i386/ctau.4 head/share/man/man4/man4.i386/cx.4 head/sys/dev/ctau/if_ct.c head/sys/dev/cx/if_cx.c Modified: head/share/man/man4/man4.i386/ctau.4 ============================================================================== --- head/share/man/man4/man4.i386/ctau.4 Mon Mar 2 18:40:34 2020 (r358553) +++ head/share/man/man4/man4.i386/ctau.4 Mon Mar 2 20:14:27 2020 (r358554) @@ -13,7 +13,7 @@ .\" Cronyx Id: ct.4,v 1.1.2.6 2004/06/21 17:56:40 rik Exp $ .\" $FreeBSD$ .\" -.Dd September 6, 2004 +.Dd March 2, 2020 .Dt CTAU 4 i386 .Os .Sh NAME @@ -33,6 +33,12 @@ In .Cd hint.ctau.0.port="0x240" .Cd hint.ctau.0.irq="15" .Cd hint.ctau.0.drq="7" +.Sh DEPRECATION NOTICE +The +.Nm +driver is not present in +.Fx 13.0 +and later. .Sh DESCRIPTION The .Nm Modified: head/share/man/man4/man4.i386/cx.4 ============================================================================== --- head/share/man/man4/man4.i386/cx.4 Mon Mar 2 18:40:34 2020 (r358553) +++ head/share/man/man4/man4.i386/cx.4 Mon Mar 2 20:14:27 2020 (r358554) @@ -13,7 +13,7 @@ .\" Cronyx Id: cx.4,v 1.1.2.6 2004/06/21 17:56:40 rik Exp $ .\" $FreeBSD$ .\" -.Dd July 16, 2005 +.Dd March 2, 2020 .Dt CX 4 i386 .Os .Sh NAME @@ -45,6 +45,12 @@ In .Cd hint.cx.0.port="0x240" .Cd hint.cx.0.irq="15" .Cd hint.cx.0.drq="7" +.Sh DEPRECATION NOTICE +The +.Nm +driver is not present in +.Fx 13.0 +and later. .Sh DESCRIPTION The .Nm Modified: head/sys/dev/ctau/if_ct.c ============================================================================== --- head/sys/dev/ctau/if_ct.c Mon Mar 2 18:40:34 2020 (r358553) +++ head/sys/dev/ctau/if_ct.c Mon Mar 2 20:14:27 2020 (r358554) @@ -748,6 +748,7 @@ static int ct_attach (device_t dev) } splx (s); + gone_in_dev(dev, 13, "sync serial (T1/E1) ISA card drivers"); return 0; } Modified: head/sys/dev/cx/if_cx.c ============================================================================== --- head/sys/dev/cx/if_cx.c Mon Mar 2 18:40:34 2020 (r358553) +++ head/sys/dev/cx/if_cx.c Mon Mar 2 20:14:27 2020 (r358554) @@ -871,6 +871,7 @@ static int cx_attach (device_t dev) } splx (s); + gone_in_dev(dev, 13, "sync serial (T1/E1) ISA card drivers"); return 0; } From owner-svn-src-all@freebsd.org Mon Mar 2 21:19:52 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id C476225AE5B; Mon, 2 Mar 2020 21:19:52 +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 48WY202qM8z4KP7; Mon, 2 Mar 2020 21:19:52 +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 0A1862269F; Mon, 2 Mar 2020 21:19:52 +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 022LJpDU094870; Mon, 2 Mar 2020 21:19:51 GMT (envelope-from manu@FreeBSD.org) Received: (from manu@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 022LJpAW094869; Mon, 2 Mar 2020 21:19:51 GMT (envelope-from manu@FreeBSD.org) Message-Id: <202003022119.022LJpAW094869@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: manu set sender to manu@FreeBSD.org using -f From: Emmanuel Vadot Date: Mon, 2 Mar 2020 21:19:51 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r358555 - head/sys/dev/cpufreq X-SVN-Group: head X-SVN-Commit-Author: manu X-SVN-Commit-Paths: head/sys/dev/cpufreq X-SVN-Commit-Revision: 358555 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages 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, 02 Mar 2020 21:19:52 -0000 Author: manu Date: Mon Mar 2 21:19:51 2020 New Revision: 358555 URL: https://svnweb.freebsd.org/changeset/base/358555 Log: cpufreq_dt: Improve multiple opp support When looking for cpu with the same OPP starts from the root /cpus node so each instance of cpufreq_dt will now each cpu with the same operating point. Also test that the node we are testing have the property "device_type" set to be equal to "cpu". While here add more debug printfs (off by defaults). MFC after: 2 weeks Modified: head/sys/dev/cpufreq/cpufreq_dt.c Modified: head/sys/dev/cpufreq/cpufreq_dt.c ============================================================================== --- head/sys/dev/cpufreq/cpufreq_dt.c Mon Mar 2 20:14:27 2020 (r358554) +++ head/sys/dev/cpufreq/cpufreq_dt.c Mon Mar 2 21:19:51 2020 (r358555) @@ -81,6 +81,7 @@ struct cpufreq_dt_softc { struct cpufreq_dt_opp *opp; ssize_t nopp; + int cpu; cpuset_t cpus; }; @@ -169,6 +170,13 @@ cpufreq_dt_set(device_t dev, const struct cf_setting * sc = device_get_softc(dev); + DEBUG(dev, "Working on cpu %d\n", sc->cpu); + DEBUG(dev, "We have %d cpu on this dev\n", CPU_COUNT(&sc->cpus)); + if (!CPU_ISSET(sc->cpu, &sc->cpus)) { + DEBUG(dev, "Not for this CPU\n"); + return (0); + } + if (clk_get_freq(sc->clk, &freq) != 0) { device_printf(dev, "Can't get current clk freq\n"); return (ENXIO); @@ -190,7 +198,6 @@ cpufreq_dt_set(device_t dev, const struct cf_setting * return (ENOENT); } uvolt = copp->uvolt_target; - } opp = cpufreq_dt_find_opp(sc->dev, set->freq * 1000000); @@ -449,14 +456,16 @@ cpufreq_dt_attach(device_t dev) int cpu; uint64_t freq; int rv = 0; + char device_type[16]; enum opp_version version; sc = device_get_softc(dev); sc->dev = dev; node = ofw_bus_get_node(device_get_parent(dev)); - cpu = device_get_unit(device_get_parent(dev)); + sc->cpu = device_get_unit(device_get_parent(dev)); - if (cpu >= mp_ncpus) { + DEBUG(dev, "cpu=%d\n", sc->cpu); + if (sc->cpu >= mp_ncpus) { device_printf(dev, "Not attaching as cpu is not present\n"); return (ENXIO); } @@ -502,7 +511,18 @@ cpufreq_dt_attach(device_t dev) * Find all CPUs that share the same opp table */ CPU_ZERO(&sc->cpus); - for (cnode = node; cnode > 0; cnode = OF_peer(cnode), cpu++) { + cnode = OF_parent(node); + for (cpu = 0, cnode = OF_child(cnode); cnode > 0; cnode = OF_peer(cnode)) { + if (OF_getprop(cnode, "device_type", device_type, sizeof(device_type)) <= 0) + continue; + if (strcmp(device_type, "cpu") != 0) + continue; + if (cpu == sc->cpu) { + DEBUG(dev, "Skipping our cpu\n"); + cpu++; + continue; + } + DEBUG(dev, "Testing CPU %d\n", cpu); copp = -1; if (version == OPP_V1) OF_getencprop(cnode, "operating-points", &copp, @@ -510,8 +530,11 @@ cpufreq_dt_attach(device_t dev) else if (version == OPP_V2) OF_getencprop(cnode, "operating-points-v2", &copp, sizeof(copp)); - if (opp == copp) + if (opp == copp) { + DEBUG(dev, "CPU %d is using the same opp as this one (%d)\n", cpu, sc->cpu); CPU_SET(cpu, &sc->cpus); + } + cpu++; } if (clk_get_freq(sc->clk, &freq) == 0) From owner-svn-src-all@freebsd.org Mon Mar 2 22:06:43 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 627AE25C0F7; Mon, 2 Mar 2020 22:06:43 +0000 (UTC) (envelope-from jhb@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 48WZ431hDbz3PMZ; Mon, 2 Mar 2020 22:06:43 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from John-Baldwins-MacBook-Pro-7.local (ralph.baldwin.cx [66.234.199.215]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client did not present a certificate) (Authenticated sender: jhb) by smtp.freebsd.org (Postfix) with ESMTPSA id A39FD2F894; Mon, 2 Mar 2020 22:06:42 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Subject: Re: svn commit: r358486 - head/sys/dev/bce To: Warner Losh , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org References: <202003011727.021HRU5G076569@repo.freebsd.org> From: John Baldwin 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: <81a089ea-d8a4-9f4b-dc24-3a7bd7e4cbba@FreeBSD.org> Date: Mon, 2 Mar 2020 14:06:40 -0800 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.12; rv:68.0) Gecko/20100101 Thunderbird/68.4.2 MIME-Version: 1.0 In-Reply-To: <202003011727.021HRU5G076569@repo.freebsd.org> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages 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, 02 Mar 2020 22:06:43 -0000 On 3/1/20 9:27 AM, Warner Losh wrote: > Author: imp > Date: Sun Mar 1 17:27:30 2020 > New Revision: 358486 > URL: https://svnweb.freebsd.org/changeset/base/358486 > > Log: > Remove all the compatibility hacks for systems that predate FreeBSD 8. Some of > these look to be cut and pasted from other drivers since this driver was > committed to FreeBSD 7-current and MFC'd to FreeBSD 6. The ones for FreeBSD 4 > and 5 likely never were working... You'd be surprised. I had to backport this to 4.x for Y!BSD, so I do suspect the 4.x bits worked fine. Good to clean out the cruft regardless. -- John Baldwin From owner-svn-src-all@freebsd.org Mon Mar 2 22:19:33 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id A677625C436; Mon, 2 Mar 2020 22:19:33 +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 48WZLs2qxzz4R1K; Mon, 2 Mar 2020 22:19:33 +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 3B6AA231C4; Mon, 2 Mar 2020 22:19:33 +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 022MJXB7030304; Mon, 2 Mar 2020 22:19:33 GMT (envelope-from jhb@FreeBSD.org) Received: (from jhb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 022MJUOk030293; Mon, 2 Mar 2020 22:19:30 GMT (envelope-from jhb@FreeBSD.org) Message-Id: <202003022219.022MJUOk030293@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jhb set sender to jhb@FreeBSD.org using -f From: John Baldwin Date: Mon, 2 Mar 2020 22:19:30 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r358556 - in head: libexec/tftpd libexec/tftpd/tests usr.bin/tftp X-SVN-Group: head X-SVN-Commit-Author: jhb X-SVN-Commit-Paths: in head: libexec/tftpd libexec/tftpd/tests usr.bin/tftp X-SVN-Commit-Revision: 358556 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages 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, 02 Mar 2020 22:19:33 -0000 Author: jhb Date: Mon Mar 2 22:19:30 2020 New Revision: 358556 URL: https://svnweb.freebsd.org/changeset/base/358556 Log: Add support for the TFTP windowsize option described in RFC 7440. The windowsize option permits multiple blocks to be transmitted before the receiver sends an ACK improving throughput for larger files. Reviewed by: asomers MFC after: 2 weeks Sponsored by: DARPA Differential Revision: https://reviews.freebsd.org/D23836 Modified: head/libexec/tftpd/tests/functional.c head/libexec/tftpd/tftp-file.c head/libexec/tftpd/tftp-file.h head/libexec/tftpd/tftp-options.c head/libexec/tftpd/tftp-options.h head/libexec/tftpd/tftp-transfer.c head/libexec/tftpd/tftp-utils.c head/libexec/tftpd/tftp-utils.h head/libexec/tftpd/tftpd.8 head/usr.bin/tftp/main.c head/usr.bin/tftp/tftp.1 Modified: head/libexec/tftpd/tests/functional.c ============================================================================== --- head/libexec/tftpd/tests/functional.c Mon Mar 2 21:19:51 2020 (r358555) +++ head/libexec/tftpd/tests/functional.c Mon Mar 2 22:19:30 2020 (r358556) @@ -38,6 +38,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include @@ -89,6 +90,13 @@ recv_ack(uint16_t blocknum) RECV(hdr, NULL, 0); } +static void +recv_oack(const char *options, size_t options_len) +{ + char hdr[] = {0, 6}; + RECV(hdr, options, options_len); +} + /* * Receive a data packet from tftpd * @param blocknum Expected block number to be received @@ -159,6 +167,11 @@ send_ack(uint16_t blocknum) } +/* + * build an option string + */ +#define OPTION_STR(name, value) name "\000" value "\000" + /* * send a read request to tftpd. * @param filename filename as a string, absolute or relative @@ -166,6 +179,11 @@ send_ack(uint16_t blocknum) */ #define SEND_RRQ(filename, mode) SEND_STR("\0\001" filename "\0" mode "\0") +/* + * send a read request with options + */ +#define SEND_RRQ_OPT(filename, mode, options) SEND_STR("\0\001" filename "\0" mode "\000" options) + /* * send a write request to tftpd. * @param filename filename as a string, absolute or relative @@ -173,6 +191,11 @@ send_ack(uint16_t blocknum) */ #define SEND_WRQ(filename, mode) SEND_STR("\0\002" filename "\0" mode "\0") +/* + * send a write request with options + */ +#define SEND_WRQ_OPT(filename, mode, options) SEND_STR("\0\002" filename "\0" mode "\000" options) + /* Define a test case, for both IPv4 and IPv6 */ #define TFTPD_TC_DEFINE(name, head, ...) \ static void \ @@ -573,6 +596,32 @@ TFTPD_TC_DEFINE(rrq_medium,) } /* + * Read a medium file with a window size of 2. + */ +TFTPD_TC_DEFINE(rrq_medium_window,) +{ + int fd; + size_t i; + uint32_t contents[192]; + char options[] = OPTION_STR("windowsize", "2"); + + for (i = 0; i < nitems(contents); i++) + contents[i] = i; + + fd = open("medium.txt", O_RDWR | O_CREAT, 0644); + ATF_REQUIRE(fd >= 0); + write_all(fd, contents, sizeof(contents)); + close(fd); + + SEND_RRQ_OPT("medium.txt", "octet", OPTION_STR("windowsize", "2")); + recv_oack(options, sizeof(options) - 1); + send_ack(0); + recv_data(1, (const char*)&contents[0], 512); + recv_data(2, (const char*)&contents[128], 256); + send_ack(2); +} + +/* * Read a file in netascii format */ TFTPD_TC_DEFINE(rrq_netascii,) @@ -652,6 +701,59 @@ TFTPD_TC_DEFINE(rrq_small,) } /* + * Read a file following the example in RFC 7440. + */ +TFTPD_TC_DEFINE(rrq_window_rfc7440,) +{ + int fd; + size_t i; + char options[] = OPTION_STR("windowsize", "4"); + alignas(uint32_t) char contents[13 * 512 - 4]; + uint32_t *u32p; + + u32p = (uint32_t *)contents; + for (i = 0; i < sizeof(contents) / sizeof(uint32_t); i++) + u32p[i] = i; + + fd = open("rfc7440.txt", O_RDWR | O_CREAT, 0644); + ATF_REQUIRE(fd >= 0); + write_all(fd, contents, sizeof(contents)); + close(fd); + + SEND_RRQ_OPT("rfc7440.txt", "octet", OPTION_STR("windowsize", "4")); + recv_oack(options, sizeof(options) - 1); + send_ack(0); + recv_data(1, &contents[0 * 512], 512); + recv_data(2, &contents[1 * 512], 512); + recv_data(3, &contents[2 * 512], 512); + recv_data(4, &contents[3 * 512], 512); + send_ack(4); + recv_data(5, &contents[4 * 512], 512); + recv_data(6, &contents[5 * 512], 512); + recv_data(7, &contents[6 * 512], 512); + recv_data(8, &contents[7 * 512], 512); + + /* ACK 5 as if 6-8 were dropped. */ + send_ack(5); + recv_data(6, &contents[5 * 512], 512); + recv_data(7, &contents[6 * 512], 512); + recv_data(8, &contents[7 * 512], 512); + recv_data(9, &contents[8 * 512], 512); + send_ack(9); + recv_data(10, &contents[9 * 512], 512); + recv_data(11, &contents[10 * 512], 512); + recv_data(12, &contents[11 * 512], 512); + recv_data(13, &contents[12 * 512], 508); + + /* Drop ACK and after timeout receive 10-13. */ + recv_data(10, &contents[9 * 512], 512); + recv_data(11, &contents[10 * 512], 512); + recv_data(12, &contents[11 * 512], 512); + recv_data(13, &contents[12 * 512], 508); + send_ack(13); +} + +/* * Try to transfer a file with an unknown mode. */ TFTPD_TC_DEFINE(unknown_modes,) @@ -872,6 +974,38 @@ TFTPD_TC_DEFINE(wrq_medium,) } /* + * Write a medium file with a window size of 2. + */ +TFTPD_TC_DEFINE(wrq_medium_window,) +{ + int fd; + size_t i; + ssize_t r; + uint32_t contents[192]; + char buffer[1024]; + char options[] = OPTION_STR("windowsize", "2"); + + for (i = 0; i < nitems(contents); i++) + contents[i] = i; + + fd = open("medium.txt", O_RDWR | O_CREAT, 0666); + ATF_REQUIRE(fd >= 0); + close(fd); + + SEND_WRQ_OPT("medium.txt", "octet", OPTION_STR("windowsize", "2")); + recv_oack(options, sizeof(options) - 1); + send_data(1, (const char*)&contents[0], 512); + send_data(2, (const char*)&contents[128], 256); + recv_ack(2); + + fd = open("medium.txt", O_RDONLY); + ATF_REQUIRE(fd >= 0); + r = read(fd, buffer, sizeof(buffer)); + close(fd); + require_bufeq((const char*)contents, 768, buffer, r); +} + +/* * Write a file in netascii format */ TFTPD_TC_DEFINE(wrq_netascii,) @@ -965,7 +1099,71 @@ TFTPD_TC_DEFINE(wrq_truncate,) ATF_REQUIRE_EQ(sb.st_size, 0); } +/* + * Write a file following the example in RFC 7440. + */ +TFTPD_TC_DEFINE(wrq_window_rfc7440,) +{ + int fd; + size_t i; + ssize_t r; + char options[] = OPTION_STR("windowsize", "4"); + alignas(uint32_t) char contents[13 * 512 - 4]; + char buffer[sizeof(contents)]; + uint32_t *u32p; + u32p = (uint32_t *)contents; + for (i = 0; i < sizeof(contents) / sizeof(uint32_t); i++) + u32p[i] = i; + + fd = open("rfc7440.txt", O_RDWR | O_CREAT, 0666); + ATF_REQUIRE(fd >= 0); + close(fd); + + SEND_WRQ_OPT("rfc7440.txt", "octet", OPTION_STR("windowsize", "4")); + recv_oack(options, sizeof(options) - 1); + send_data(1, &contents[0 * 512], 512); + send_data(2, &contents[1 * 512], 512); + send_data(3, &contents[2 * 512], 512); + send_data(4, &contents[3 * 512], 512); + recv_ack(4); + send_data(5, &contents[4 * 512], 512); + + /* Drop 6-8. */ + recv_ack(5); + send_data(6, &contents[5 * 512], 512); + send_data(7, &contents[6 * 512], 512); + send_data(8, &contents[7 * 512], 512); + send_data(9, &contents[8 * 512], 512); + recv_ack(9); + + /* Drop 11. */ + send_data(10, &contents[9 * 512], 512); + send_data(12, &contents[11 * 512], 512); + + /* + * We can't send 13 here as tftpd has probably already seen 12 + * and sent the ACK of 10 if running locally. While it would + * recover by sending another ACK of 10, our state machine + * would be out of sync. + */ + + /* Ignore ACK for 10 and resend 10-13. */ + recv_ack(10); + send_data(10, &contents[9 * 512], 512); + send_data(11, &contents[10 * 512], 512); + send_data(12, &contents[11 * 512], 512); + send_data(13, &contents[12 * 512], 508); + recv_ack(13); + + fd = open("rfc7440.txt", O_RDONLY); + ATF_REQUIRE(fd >= 0); + r = read(fd, buffer, sizeof(buffer)); + close(fd); + require_bufeq(contents, sizeof(contents), buffer, r); +} + + /* * Main */ @@ -981,10 +1179,12 @@ ATF_TP_ADD_TCS(tp) TFTPD_TC_ADD(tp, rrq_eaccess); TFTPD_TC_ADD(tp, rrq_empty); TFTPD_TC_ADD(tp, rrq_medium); + TFTPD_TC_ADD(tp, rrq_medium_window); TFTPD_TC_ADD(tp, rrq_netascii); TFTPD_TC_ADD(tp, rrq_nonexistent); TFTPD_TC_ADD(tp, rrq_path_max); TFTPD_TC_ADD(tp, rrq_small); + TFTPD_TC_ADD(tp, rrq_window_rfc7440); TFTPD_TC_ADD(tp, unknown_modes); TFTPD_TC_ADD(tp, unknown_opcode); TFTPD_TC_ADD(tp, w_flag); @@ -994,10 +1194,12 @@ ATF_TP_ADD_TCS(tp) TFTPD_TC_ADD(tp, wrq_eaccess); TFTPD_TC_ADD(tp, wrq_eaccess_world_readable); TFTPD_TC_ADD(tp, wrq_medium); + TFTPD_TC_ADD(tp, wrq_medium_window); TFTPD_TC_ADD(tp, wrq_netascii); TFTPD_TC_ADD(tp, wrq_nonexistent); TFTPD_TC_ADD(tp, wrq_small); TFTPD_TC_ADD(tp, wrq_truncate); + TFTPD_TC_ADD(tp, wrq_window_rfc7440); return (atf_no_error()); } Modified: head/libexec/tftpd/tftp-file.c ============================================================================== --- head/libexec/tftpd/tftp-file.c Mon Mar 2 21:19:51 2020 (r358555) +++ head/libexec/tftpd/tftp-file.c Mon Mar 2 22:19:30 2020 (r358556) @@ -214,6 +214,20 @@ write_close(void) return 0; } +off_t +tell_file(void) +{ + + return ftello(file); +} + +int +seek_file(off_t offset) +{ + + return fseeko(file, offset, SEEK_SET); +} + int read_init(int fd, FILE *f, const char *mode) { Modified: head/libexec/tftpd/tftp-file.h ============================================================================== --- head/libexec/tftpd/tftp-file.h Mon Mar 2 21:19:51 2020 (r358555) +++ head/libexec/tftpd/tftp-file.h Mon Mar 2 22:19:30 2020 (r358556) @@ -36,4 +36,7 @@ int read_init(int fd, FILE *f, const char *mode); size_t read_file(char *buffer, int count); int read_close(void); +int seek_file(off_t offset); +off_t tell_file(void); + int synchnet(int peer); Modified: head/libexec/tftpd/tftp-options.c ============================================================================== --- head/libexec/tftpd/tftp-options.c Mon Mar 2 21:19:51 2020 (r358555) +++ head/libexec/tftpd/tftp-options.c Mon Mar 2 22:19:30 2020 (r358556) @@ -56,6 +56,7 @@ struct options options[] = { { "blksize", NULL, NULL, option_blksize, 1 }, { "blksize2", NULL, NULL, option_blksize2, 0 }, { "rollover", NULL, NULL, option_rollover, 0 }, + { "windowsize", NULL, NULL, option_windowsize, 1 }, { NULL, NULL, NULL, NULL, 0 } }; @@ -271,6 +272,41 @@ option_blksize2(int peer __unused) if (debug&DEBUG_OPTIONS) tftp_log(LOG_DEBUG, "Setting blksize2 to '%s'", options[OPT_BLKSIZE2].o_reply); + + return (0); +} + +int +option_windowsize(int peer) +{ + int size; + + if (options[OPT_WINDOWSIZE].o_request == NULL) + return (0); + + size = atoi(options[OPT_WINDOWSIZE].o_request); + if (size < WINDOWSIZE_MIN || size > WINDOWSIZE_MAX) { + if (acting_as_client) { + tftp_log(LOG_ERR, + "Invalid windowsize (%d blocks), aborting", + size); + send_error(peer, EBADOP); + return (1); + } else { + tftp_log(LOG_WARNING, + "Invalid windowsize (%d blocks), ignoring request", + size); + return (0); + } + } + + /* XXX: Should force a windowsize of 1 for non-seekable files. */ + asprintf(&options[OPT_WINDOWSIZE].o_reply, "%d", size); + windowsize = size; + + if (debug&DEBUG_OPTIONS) + tftp_log(LOG_DEBUG, "Setting windowsize to '%s'", + options[OPT_WINDOWSIZE].o_reply); return (0); } Modified: head/libexec/tftpd/tftp-options.h ============================================================================== --- head/libexec/tftpd/tftp-options.h Mon Mar 2 21:19:51 2020 (r358555) +++ head/libexec/tftpd/tftp-options.h Mon Mar 2 22:19:30 2020 (r358556) @@ -42,6 +42,7 @@ int option_timeout(int peer); int option_blksize(int peer); int option_blksize2(int peer); int option_rollover(int peer); +int option_windowsize(int peer); extern int options_extra_enabled; extern int options_rfc_enabled; @@ -61,4 +62,5 @@ enum opt_enum { OPT_BLKSIZE, OPT_BLKSIZE2, OPT_ROLLOVER, + OPT_WINDOWSIZE, }; Modified: head/libexec/tftpd/tftp-transfer.c ============================================================================== --- head/libexec/tftpd/tftp-transfer.c Mon Mar 2 21:19:51 2020 (r358555) +++ head/libexec/tftpd/tftp-transfer.c Mon Mar 2 22:19:30 2020 (r358556) @@ -48,6 +48,12 @@ __FBSDID("$FreeBSD$"); #include "tftp-options.h" #include "tftp-transfer.h" +struct block_data { + off_t offset; + uint16_t block; + int size; +}; + /* * Send a file via the TFTP data session. */ @@ -55,54 +61,73 @@ void tftp_send(int peer, uint16_t *block, struct tftp_stats *ts) { struct tftphdr *rp; - int size, n_data, n_ack, try; - uint16_t oldblock; + int size, n_data, n_ack, sendtry, acktry; + u_int i, j; + uint16_t oldblock, windowblock; char sendbuffer[MAXPKTSIZE]; char recvbuffer[MAXPKTSIZE]; + struct block_data window[WINDOWSIZE_MAX]; rp = (struct tftphdr *)recvbuffer; *block = 1; ts->amount = 0; + windowblock = 0; + acktry = 0; do { +read_block: if (debug&DEBUG_SIMPLE) - tftp_log(LOG_DEBUG, "Sending block %d", *block); + tftp_log(LOG_DEBUG, "Sending block %d (window block %d)", + *block, windowblock); + window[windowblock].offset = tell_file(); + window[windowblock].block = *block; size = read_file(sendbuffer, segsize); if (size < 0) { tftp_log(LOG_ERR, "read_file returned %d", size); send_error(peer, errno + 100); goto abort; } + window[windowblock].size = size; + windowblock++; - for (try = 0; ; try++) { + for (sendtry = 0; ; sendtry++) { n_data = send_data(peer, *block, sendbuffer, size); - if (n_data > 0) { - if (try == maxtimeouts) { - tftp_log(LOG_ERR, - "Cannot send DATA packet #%d, " - "giving up", *block); - return; - } + if (n_data == 0) + break; + + if (sendtry == maxtimeouts) { tftp_log(LOG_ERR, - "Cannot send DATA packet #%d, trying again", - *block); - continue; + "Cannot send DATA packet #%d, " + "giving up", *block); + return; } + tftp_log(LOG_ERR, + "Cannot send DATA packet #%d, trying again", + *block); + } + /* Only check for ACK for last block in window. */ + if (windowblock == windowsize || size != segsize) { n_ack = receive_packet(peer, recvbuffer, MAXPKTSIZE, NULL, timeoutpacket); if (n_ack < 0) { if (n_ack == RP_TIMEOUT) { - if (try == maxtimeouts) { + if (acktry == maxtimeouts) { tftp_log(LOG_ERR, "Timeout #%d send ACK %d " - "giving up", try, *block); + "giving up", acktry, *block); return; } tftp_log(LOG_WARNING, "Timeout #%d on ACK %d", - try, *block); - continue; + acktry, *block); + + acktry++; + ts->retries++; + seek_file(window[0].offset); + *block = window[0].block; + windowblock = 0; + goto read_block; } /* Either read failure or ERROR packet */ @@ -112,18 +137,60 @@ tftp_send(int peer, uint16_t *block, struct tftp_stats goto abort; } if (rp->th_opcode == ACK) { - ts->blocks++; - if (rp->th_block == *block) { - ts->amount += size; - break; + /* + * Look for the ACKed block in our open + * window. + */ + for (i = 0; i < windowblock; i++) { + if (rp->th_block == window[i].block) + break; } - /* Re-synchronize with the other side */ - (void) synchnet(peer); - if (rp->th_block == (*block - 1)) { + if (i == windowblock) { + /* Did not recognize ACK. */ + if (debug&DEBUG_SIMPLE) + tftp_log(LOG_DEBUG, + "ACK %d out of window", + rp->th_block); + + /* Re-synchronize with the other side */ + (void) synchnet(peer); + + /* Resend the current window. */ ts->retries++; - continue; + seek_file(window[0].offset); + *block = window[0].block; + windowblock = 0; + goto read_block; } + + /* ACKed at least some data. */ + acktry = 0; + for (j = 0; j <= i; j++) { + if (debug&DEBUG_SIMPLE) + tftp_log(LOG_DEBUG, + "ACKed block %d", + window[j].block); + ts->blocks++; + ts->amount += window[j].size; + } + + /* + * Partial ACK. Rewind state to first + * un-ACKed block. + */ + if (i + 1 != windowblock) { + if (debug&DEBUG_SIMPLE) + tftp_log(LOG_DEBUG, + "Partial ACK"); + seek_file(window[i + 1].offset); + *block = window[i + 1].block; + windowblock = 0; + ts->retries++; + goto read_block; + } + + windowblock = 0; } } @@ -161,31 +228,35 @@ tftp_receive(int peer, uint16_t *block, struct tftp_st struct tftphdr *firstblock, size_t fb_size) { struct tftphdr *rp; - uint16_t oldblock; - int n_data, n_ack, writesize, i, retry; + uint16_t oldblock, windowstart; + int n_data, n_ack, writesize, i, retry, windowblock; char recvbuffer[MAXPKTSIZE]; ts->amount = 0; + windowblock = 0; if (firstblock != NULL) { writesize = write_file(firstblock->th_data, fb_size); ts->amount += writesize; - for (i = 0; ; i++) { - n_ack = send_ack(peer, *block); - if (n_ack > 0) { - if (i == maxtimeouts) { + windowblock++; + if (windowsize == 1 || fb_size != segsize) { + for (i = 0; ; i++) { + n_ack = send_ack(peer, *block); + if (n_ack > 0) { + if (i == maxtimeouts) { + tftp_log(LOG_ERR, + "Cannot send ACK packet #%d, " + "giving up", *block); + return; + } tftp_log(LOG_ERR, - "Cannot send ACK packet #%d, " - "giving up", *block); - return; + "Cannot send ACK packet #%d, trying again", + *block); + continue; } - tftp_log(LOG_ERR, - "Cannot send ACK packet #%d, trying again", - *block); - continue; - } - break; + break; + } } if (fb_size != segsize) { @@ -216,7 +287,8 @@ tftp_receive(int peer, uint16_t *block, struct tftp_st for (retry = 0; ; retry++) { if (debug&DEBUG_SIMPLE) tftp_log(LOG_DEBUG, - "Receiving DATA block %d", *block); + "Receiving DATA block %d (window block %d)", + *block, windowblock); n_data = receive_packet(peer, recvbuffer, MAXPKTSIZE, NULL, timeoutpacket); @@ -232,6 +304,7 @@ tftp_receive(int peer, uint16_t *block, struct tftp_st "Timeout #%d on DATA block %d", retry, *block); send_ack(peer, oldblock); + windowblock = 0; continue; } @@ -247,19 +320,42 @@ tftp_receive(int peer, uint16_t *block, struct tftp_st if (rp->th_block == *block) break; + /* + * Ignore duplicate blocks within the + * window. + * + * This does not handle duplicate + * blocks during a rollover as + * gracefully, but that should still + * recover eventually. + */ + if (*block > windowsize) + windowstart = *block - windowsize; + else + windowstart = 0; + if (rp->th_block > windowstart && + rp->th_block < *block) { + if (debug&DEBUG_SIMPLE) + tftp_log(LOG_DEBUG, + "Ignoring duplicate DATA block %d", + rp->th_block); + windowblock++; + retry = 0; + continue; + } + tftp_log(LOG_WARNING, "Expected DATA block %d, got block %d", *block, rp->th_block); /* Re-synchronize with the other side */ (void) synchnet(peer); - if (rp->th_block == (*block-1)) { - tftp_log(LOG_INFO, "Trying to sync"); - *block = oldblock; - ts->retries++; - goto send_ack; /* rexmit */ - } + tftp_log(LOG_INFO, "Trying to sync"); + *block = oldblock; + ts->retries++; + goto send_ack; /* rexmit */ + } else { tftp_log(LOG_WARNING, "Expected DATA block, got %s block", @@ -282,7 +378,11 @@ tftp_receive(int peer, uint16_t *block, struct tftp_st if (n_data != segsize) write_close(); } + windowblock++; + /* Only send ACKs for the last block in the window. */ + if (windowblock < windowsize && n_data == segsize) + continue; send_ack: for (i = 0; ; i++) { n_ack = send_ack(peer, *block); @@ -301,6 +401,9 @@ send_ack: continue; } + if (debug&DEBUG_SIMPLE) + tftp_log(LOG_DEBUG, "Sent ACK for %d", *block); + windowblock = 0; break; } gettimeofday(&(ts->tstop), NULL); Modified: head/libexec/tftpd/tftp-utils.c ============================================================================== --- head/libexec/tftpd/tftp-utils.c Mon Mar 2 21:19:51 2020 (r358555) +++ head/libexec/tftpd/tftp-utils.c Mon Mar 2 22:19:30 2020 (r358556) @@ -51,6 +51,7 @@ int timeoutnetwork = MAX_TIMEOUTS * TIMEOUT; int maxtimeouts = MAX_TIMEOUTS; uint16_t segsize = SEGSIZE; uint16_t pktsize = SEGSIZE + 4; +uint16_t windowsize = WINDOWSIZE; int acting_as_client; Modified: head/libexec/tftpd/tftp-utils.h ============================================================================== --- head/libexec/tftpd/tftp-utils.h Mon Mar 2 21:19:51 2020 (r358555) +++ head/libexec/tftpd/tftp-utils.h Mon Mar 2 22:19:30 2020 (r358556) @@ -46,6 +46,11 @@ __FBSDID("$FreeBSD$"); #define TIMEOUT_MAX 255 /* Maximum timeout value */ #define MIN_TIMEOUTS 3 +/* For the windowsize option */ +#define WINDOWSIZE 1 +#define WINDOWSIZE_MIN 1 +#define WINDOWSIZE_MAX 65535 + extern int timeoutpacket; extern int timeoutnetwork; extern int maxtimeouts; @@ -53,6 +58,7 @@ int settimeouts(int timeoutpacket, int timeoutnetwork, extern uint16_t segsize; extern uint16_t pktsize; +extern uint16_t windowsize; extern int acting_as_client; Modified: head/libexec/tftpd/tftpd.8 ============================================================================== --- head/libexec/tftpd/tftpd.8 Mon Mar 2 21:19:51 2020 (r358555) +++ head/libexec/tftpd/tftpd.8 Mon Mar 2 22:19:30 2020 (r358556) @@ -28,7 +28,7 @@ .\" @(#)tftpd.8 8.1 (Berkeley) 6/4/93 .\" $FreeBSD$ .\" -.Dd June 22, 2011 +.Dd March 2, 2020 .Dt TFTPD 8 .Os .Sh NAME @@ -245,6 +245,9 @@ The following RFC's are supported: .Rs .%T RFC 2349: TFTP Timeout Interval and Transfer Size Options .Re +.Rs +.%T RFC 7440: TFTP Windowsize Option +.Re .Pp The non-standard .Cm rollover @@ -291,6 +294,9 @@ Edwin Groothuis performed a major and .Xr tftp 1 code to support RFC2348. +.Pp +Support for the windowsize option (RFC7440) was introduced in +.Fx 13.0 . .Sh NOTES Files larger than 33,553,919 octets (65535 blocks, last one <512 octets) cannot be correctly transferred without client and server Modified: head/usr.bin/tftp/main.c ============================================================================== --- head/usr.bin/tftp/main.c Mon Mar 2 21:19:51 2020 (r358555) +++ head/usr.bin/tftp/main.c Mon Mar 2 22:19:30 2020 (r358556) @@ -114,6 +114,7 @@ static void setblocksize2(int, char **); static void setoptions(int, char **); static void setrollover(int, char **); static void setpacketdrop(int, char **); +static void setwindowsize(int, char **); static void command(bool, EditLine *, History *, HistEvent *) __dead2; static const char *command_prompt(void); @@ -158,6 +159,7 @@ static struct cmd cmdtab[] = { "enable or disable RFC2347 style options" }, { "help", help, "print help information" }, { "packetdrop", setpacketdrop, "artificial packetloss feature" }, + { "windowsize", setwindowsize, "set windowsize[*]" }, { "?", help, "print help information" }, { NULL, NULL, NULL } }; @@ -1068,4 +1070,28 @@ setpacketdrop(int argc, char *argv[]) printf("Randomly %d in 100 packets will be dropped\n", packetdroppercentage); +} + +static void +setwindowsize(int argc, char *argv[]) +{ + + if (!options_rfc_enabled) + printf("RFC2347 style options are not enabled " + "(but proceeding anyway)\n"); + + if (argc != 1) { + int size = atoi(argv[1]); + + if (size < WINDOWSIZE_MIN || size > WINDOWSIZE_MAX) { + printf("Windowsize should be between %d and %d " + "blocks.\n", WINDOWSIZE_MIN, WINDOWSIZE_MAX); + return; + } else { + asprintf(&options[OPT_WINDOWSIZE].o_request, "%d", + size); + } + } + printf("Windowsize is now %s blocks.\n", + options[OPT_WINDOWSIZE].o_request); } Modified: head/usr.bin/tftp/tftp.1 ============================================================================== --- head/usr.bin/tftp/tftp.1 Mon Mar 2 21:19:51 2020 (r358555) +++ head/usr.bin/tftp/tftp.1 Mon Mar 2 22:19:30 2020 (r358556) @@ -28,7 +28,7 @@ .\" @(#)tftp.1 8.2 (Berkeley) 4/18/94 .\" $FreeBSD$ .\" -.Dd Aug 22, 2018 +.Dd March 2, 2020 .Dt TFTP 1 .Os .Sh NAME @@ -216,6 +216,14 @@ Toggle packet tracing. .Pp .It Cm verbose Toggle verbose mode. +.Pp +.It Cm windowsize Op Ar size +Sets the TFTP windowsize option in TFTP Read Request or Write Request packets to +.Op Ar size +blocks as specified in RFC 7440. +Valid values are between 1 and 65535. +If no windowsize is specified, +then the default windowsize of 1 block will be used. .El .Sh SEE ALSO .Xr tftpd 8 @@ -235,6 +243,9 @@ The following RFC's are supported: .Re .Rs .%T RFC 3617: Uniform Resource Identifier (URI) Scheme and Applicability Statement for the Trivial File Transfer Protocol (TFTP) +.Re +.Rs +.%T RFC 7440: TFTP Windowsize Option .Re .Pp The non-standard From owner-svn-src-all@freebsd.org Mon Mar 2 22:54:33 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 9B82925D0B7; Mon, 2 Mar 2020 22:54:33 +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 48Wb7F1518z41sp; Mon, 2 Mar 2020 22:54:32 +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 B421F2391A; Mon, 2 Mar 2020 22:54:32 +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 022MsWD9053903; Mon, 2 Mar 2020 22:54:32 GMT (envelope-from bz@FreeBSD.org) Received: (from bz@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 022MsWea053902; Mon, 2 Mar 2020 22:54:32 GMT (envelope-from bz@FreeBSD.org) Message-Id: <202003022254.022MsWea053902@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bz set sender to bz@FreeBSD.org using -f From: "Bjoern A. Zeeb" Date: Mon, 2 Mar 2020 22:54: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: r358557 - stable/12/sys/netinet6 X-SVN-Group: stable-12 X-SVN-Commit-Author: bz X-SVN-Commit-Paths: stable/12/sys/netinet6 X-SVN-Commit-Revision: 358557 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages 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, 02 Mar 2020 22:54:33 -0000 Author: bz Date: Mon Mar 2 22:54:32 2020 New Revision: 358557 URL: https://svnweb.freebsd.org/changeset/base/358557 Log: MFC r358297: Fix IPv6 checksums when exthdrs are present. In two places in ip6_output we are doing (delayed) checksum calculations. The initial logic came from SCTP in r205075,205104 and later I copied and adjusted it for the TCP|UDP case in r235958. The problem was that the original SCTP offsets were already wrong for any case with extension headers present given IPv6 extension headers are not part of the pseudo checksum calculations. The later changes do not help in case there is checksum offloading as for extension headers (incl. fragments) we do currrently never offload as we have no infrastructure to know whether the NIC can handle these cases. Correct the offsets for delayed checksum calculations and properly handle mbuf flags. In addition harmonize the almost identical duplicate code. While here eliminate the now unneeded variable hlen and add an always missing mtod() call in the 1-b and 3 cases after the introduction of the mb_unmapped_to_ext() calls. [Keep code in sync with head] Reported by: Francis Dupont (fdupont isc.org) PR: 243675 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 Mon Mar 2 22:19:30 2020 (r358556) +++ stable/12/sys/netinet6/ip6_output.c Mon Mar 2 22:54:32 2020 (r358557) @@ -208,6 +208,36 @@ in6_delayed_cksum(struct mbuf *m, uint32_t plen, u_sho *(u_short *)mtodo(m, offset) = csum; } +static int +ip6_output_delayed_csum(struct mbuf *m, struct ifnet *ifp, int csum_flags, + int plen, int optlen, bool frag __unused) +{ + + KASSERT((plen >= optlen), ("%s:%d: plen %d < optlen %d, m %p, ifp %p " + "csum_flags %#x frag %d\n", + __func__, __LINE__, plen, optlen, m, ifp, csum_flags, frag)); + + if ((csum_flags & CSUM_DELAY_DATA_IPV6) || +#ifdef SCTP + (csum_flags & CSUM_SCTP_IPV6) || +#endif + false) { + if (csum_flags & CSUM_DELAY_DATA_IPV6) { + in6_delayed_cksum(m, plen - optlen, + sizeof(struct ip6_hdr) + optlen); + m->m_pkthdr.csum_flags &= ~CSUM_DELAY_DATA_IPV6; + } +#ifdef SCTP + if (csum_flags & CSUM_SCTP_IPV6) { + sctp_delayed_cksum(m, sizeof(struct ip6_hdr) + optlen); + m->m_pkthdr.csum_flags &= ~CSUM_SCTP_IPV6; + } +#endif + } + + return (0); +} + int ip6_fragment(struct ifnet *ifp, struct mbuf *m0, int hlen, u_char nextproto, int fraglen , uint32_t id) @@ -307,7 +337,7 @@ ip6_output(struct mbuf *m0, struct ip6_pktopts *opt, struct ifnet *ifp, *origifp; struct mbuf *m = m0; struct mbuf *mprev; - int hlen, tlen, len; + int tlen, len; struct route_in6 ip6route; struct rtentry *rt = NULL; struct sockaddr_in6 *dst, src_sa, dst_sa; @@ -918,17 +948,10 @@ passout: * XXX-BZ Need a framework to know when the NIC can handle it, even * with ext. hdrs. */ - if (sw_csum & CSUM_DELAY_DATA_IPV6) { - sw_csum &= ~CSUM_DELAY_DATA_IPV6; - in6_delayed_cksum(m, plen, sizeof(struct ip6_hdr)); - } -#ifdef SCTP - if (sw_csum & CSUM_SCTP_IPV6) { - sw_csum &= ~CSUM_SCTP_IPV6; - sctp_delayed_cksum(m, sizeof(struct ip6_hdr)); - } -#endif - m->m_pkthdr.csum_flags &= ifp->if_hwassist; + error = ip6_output_delayed_csum(m, ifp, sw_csum, plen, optlen, false); + if (error != 0) + goto bad; + /* XXX-BZ m->m_pkthdr.csum_flags &= ~ifp->if_hwassist; */ tlen = m->m_pkthdr.len; if ((opt && (opt->ip6po_flags & IP6PO_DONTFRAG)) || tso) @@ -1008,11 +1031,10 @@ passout: * fragment if possible. * Must be able to put at least 8 bytes per fragment. */ - hlen = unfragpartlen; if (mtu > IPV6_MAXPACKET) mtu = IPV6_MAXPACKET; - len = (mtu - hlen - sizeof(struct ip6_frag)) & ~7; + len = (mtu - unfragpartlen - sizeof(struct ip6_frag)) & ~7; if (len < 8) { error = EMSGSIZE; in6_ifstat_inc(ifp, ifs6_out_fragfail); @@ -1024,16 +1046,11 @@ passout: * fragmented packets, then do it here. * XXX-BZ handle the hw offloading case. Need flags. */ - if (m->m_pkthdr.csum_flags & CSUM_DELAY_DATA_IPV6) { - in6_delayed_cksum(m, plen, hlen); - m->m_pkthdr.csum_flags &= ~CSUM_DELAY_DATA_IPV6; - } -#ifdef SCTP - if (m->m_pkthdr.csum_flags & CSUM_SCTP_IPV6) { - sctp_delayed_cksum(m, hlen); - m->m_pkthdr.csum_flags &= ~CSUM_SCTP_IPV6; - } -#endif + error = ip6_output_delayed_csum(m, ifp, m->m_pkthdr.csum_flags, + plen, optlen, true); + if (error != 0) + goto bad; + /* * Change the next header field of the last header in the * unfragmentable part. @@ -1048,6 +1065,7 @@ passout: nextproto = *mtod(exthdrs.ip6e_hbh, u_char *); *mtod(exthdrs.ip6e_hbh, u_char *) = IPPROTO_FRAGMENT; } else { + ip6 = mtod(m, struct ip6_hdr *); nextproto = ip6->ip6_nxt; ip6->ip6_nxt = IPPROTO_FRAGMENT; } @@ -1059,7 +1077,8 @@ passout: */ m0 = m; id = htonl(ip6_randomid()); - if ((error = ip6_fragment(ifp, m, hlen, nextproto, len, id))) + error = ip6_fragment(ifp, m, unfragpartlen, nextproto,len, id); + if (error != 0) goto sendorfree; in6_ifstat_inc(ifp, ifs6_out_fragok); From owner-svn-src-all@freebsd.org Mon Mar 2 23:24:55 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id ACD3D25DA5D; Mon, 2 Mar 2020 23:24:55 +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 48WbpH1zphz4gBk; Mon, 2 Mar 2020 23:24:55 +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 2D78023EA5; Mon, 2 Mar 2020 23:24:55 +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 022NOtGf071591; Mon, 2 Mar 2020 23:24:55 GMT (envelope-from cy@FreeBSD.org) Received: (from cy@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 022NOsMB071584; Mon, 2 Mar 2020 23:24:54 GMT (envelope-from cy@FreeBSD.org) Message-Id: <202003022324.022NOsMB071584@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: cy set sender to cy@FreeBSD.org using -f From: Cy Schubert Date: Mon, 2 Mar 2020 23:24:54 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r358558 - head/sys/contrib/ipfilter/netinet X-SVN-Group: head X-SVN-Commit-Author: cy X-SVN-Commit-Paths: head/sys/contrib/ipfilter/netinet X-SVN-Commit-Revision: 358558 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages 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, 02 Mar 2020 23:24:55 -0000 Author: cy Date: Mon Mar 2 23:24:53 2020 New Revision: 358558 URL: https://svnweb.freebsd.org/changeset/base/358558 Log: Continuing the effort started in r343701, #ifdef cleanup, checking for __FreeBSD_version > 3.0 and 5.0 is redundant. MFC after: 3 days Modified: head/sys/contrib/ipfilter/netinet/ip_compat.h head/sys/contrib/ipfilter/netinet/ip_fil.h head/sys/contrib/ipfilter/netinet/ip_proxy.c head/sys/contrib/ipfilter/netinet/ip_state.c head/sys/contrib/ipfilter/netinet/ip_sync.c Modified: head/sys/contrib/ipfilter/netinet/ip_compat.h ============================================================================== --- head/sys/contrib/ipfilter/netinet/ip_compat.h Mon Mar 2 22:54:32 2020 (r358557) +++ head/sys/contrib/ipfilter/netinet/ip_compat.h Mon Mar 2 23:24:53 2020 (r358558) @@ -126,7 +126,7 @@ * There may be other, safe, kernels but this is not extensively tested yet. */ # define HAVE_M_PULLDOWN -# if !defined(IPFILTER_LKM) && (__FreeBSD_version >= 300000) +# if !defined(IPFILTER_LKM) && defined(__FreeBSD_version) # include "opt_ipfilter.h" # endif # define COPYIN(a,b,c) copyin((caddr_t)(a), (caddr_t)(b), (c)) Modified: head/sys/contrib/ipfilter/netinet/ip_fil.h ============================================================================== --- head/sys/contrib/ipfilter/netinet/ip_fil.h Mon Mar 2 22:54:32 2020 (r358557) +++ head/sys/contrib/ipfilter/netinet/ip_fil.h Mon Mar 2 23:24:53 2020 (r358558) @@ -1420,8 +1420,7 @@ typedef struct ipftune { ** HPUX Port */ -#if !defined(CDEV_MAJOR) && defined (__FreeBSD_version) && \ - (__FreeBSD_version >= 220000) +#if !defined(CDEV_MAJOR) && defined (__FreeBSD_version) # define CDEV_MAJOR 79 #endif Modified: head/sys/contrib/ipfilter/netinet/ip_proxy.c ============================================================================== --- head/sys/contrib/ipfilter/netinet/ip_proxy.c Mon Mar 2 22:54:32 2020 (r358557) +++ head/sys/contrib/ipfilter/netinet/ip_proxy.c Mon Mar 2 23:24:53 2020 (r358558) @@ -51,7 +51,7 @@ # include # include #endif -#if __FreeBSD_version >= 300000 +#ifdef __FreeBSD_version # include #endif #include Modified: head/sys/contrib/ipfilter/netinet/ip_state.c ============================================================================== --- head/sys/contrib/ipfilter/netinet/ip_state.c Mon Mar 2 22:54:32 2020 (r358557) +++ head/sys/contrib/ipfilter/netinet/ip_state.c Mon Mar 2 23:24:53 2020 (r358558) @@ -82,7 +82,7 @@ #ifdef USE_INET6 #include #endif -#if FREEBSD_GE_REV(300000) +#ifdef __FreeBSD_version # include # if defined(_KERNEL) && !defined(IPFILTER_LKM) # include @@ -307,7 +307,7 @@ ipf_state_seed_alloc(u_int state_size, u_int state_max /* * XXX - ipf_state_seed[X] should be a random number of sorts. */ -#if FREEBSD_GE_REV(400000) +#ifdef __FreeBSD_version state_seed[i] = arc4random(); #else state_seed[i] = ((u_long)state_seed + i) * state_size; Modified: head/sys/contrib/ipfilter/netinet/ip_sync.c ============================================================================== --- head/sys/contrib/ipfilter/netinet/ip_sync.c Mon Mar 2 22:54:32 2020 (r358557) +++ head/sys/contrib/ipfilter/netinet/ip_sync.c Mon Mar 2 23:24:53 2020 (r358558) @@ -30,7 +30,7 @@ # include # endif # include -# if __FreeBSD_version >= 500000 +# ifdef __FreeBSD_version # include # endif #endif From owner-svn-src-all@freebsd.org Mon Mar 2 23:24:59 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 951C625DA85; Mon, 2 Mar 2020 23:24:59 +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 48WbpM2Shlz4gMs; Mon, 2 Mar 2020 23:24:59 +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 EF8E023EA6; Mon, 2 Mar 2020 23:24:58 +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 022NOwJl071639; Mon, 2 Mar 2020 23:24:58 GMT (envelope-from cy@FreeBSD.org) Received: (from cy@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 022NOw77071638; Mon, 2 Mar 2020 23:24:58 GMT (envelope-from cy@FreeBSD.org) Message-Id: <202003022324.022NOw77071638@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: cy set sender to cy@FreeBSD.org using -f From: Cy Schubert Date: Mon, 2 Mar 2020 23:24:58 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r358559 - head/sys/contrib/ipfilter/netinet X-SVN-Group: head X-SVN-Commit-Author: cy X-SVN-Commit-Paths: head/sys/contrib/ipfilter/netinet X-SVN-Commit-Revision: 358559 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages 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, 02 Mar 2020 23:24:59 -0000 Author: cy Date: Mon Mar 2 23:24:58 2020 New Revision: 358559 URL: https://svnweb.freebsd.org/changeset/base/358559 Log: Remove the now unused FREEBSD_GE_REV, FREEBSD_GT_REV, and FREEBSD_LT_REV macros. MFC after: 3 days Modified: head/sys/contrib/ipfilter/netinet/ip_compat.h Modified: head/sys/contrib/ipfilter/netinet/ip_compat.h ============================================================================== --- head/sys/contrib/ipfilter/netinet/ip_compat.h Mon Mar 2 23:24:53 2020 (r358558) +++ head/sys/contrib/ipfilter/netinet/ip_compat.h Mon Mar 2 23:24:58 2020 (r358559) @@ -89,12 +89,6 @@ (__NetBSD_Version__ > (x))) #define NETBSD_LT_REV(x) (defined(__NetBSD_Version__) && \ (__NetBSD_Version__ < (x))) -#define FREEBSD_GE_REV(x) (defined(__FreeBSD_version) && \ - (__FreeBSD_version >= (x))) -#define FREEBSD_GT_REV(x) (defined(__FreeBSD_version) && \ - (__FreeBSD_version > (x))) -#define FREEBSD_LT_REV(x) (defined(__FreeBSD_version) && \ - (__FreeBSD_version < (x))) #define BSD_GE_YEAR(x) (defined(BSD) && (BSD >= (x))) #define BSD_GT_YEAR(x) (defined(BSD) && (BSD > (x))) #define BSD_LT_YEAR(x) (defined(BSD) && (BSD < (x))) From owner-svn-src-all@freebsd.org Mon Mar 2 23:25:04 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 3745425DAAA; Mon, 2 Mar 2020 23:25:04 +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 48WbpS04WGz4gZc; Mon, 2 Mar 2020 23:25:04 +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 1AEC123EA7; Mon, 2 Mar 2020 23:25:03 +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 022NP2iu071702; Mon, 2 Mar 2020 23:25:02 GMT (envelope-from cy@FreeBSD.org) Received: (from cy@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 022NP2g2071700; Mon, 2 Mar 2020 23:25:02 GMT (envelope-from cy@FreeBSD.org) Message-Id: <202003022325.022NP2g2071700@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: cy set sender to cy@FreeBSD.org using -f From: Cy Schubert Date: Mon, 2 Mar 2020 23:25:02 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r358560 - head/sys/contrib/ipfilter/netinet X-SVN-Group: head X-SVN-Commit-Author: cy X-SVN-Commit-Paths: head/sys/contrib/ipfilter/netinet X-SVN-Commit-Revision: 358560 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages 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, 02 Mar 2020 23:25:04 -0000 Author: cy Date: Mon Mar 2 23:25:02 2020 New Revision: 358560 URL: https://svnweb.freebsd.org/changeset/base/358560 Log: Retire macros: BSD_GE_YEAR BSD_GT_YEAR BSD_LT_YEAR MFC after: 3 days Modified: head/sys/contrib/ipfilter/netinet/ip_compat.h head/sys/contrib/ipfilter/netinet/ip_nat.c head/sys/contrib/ipfilter/netinet/ip_sync.c Modified: head/sys/contrib/ipfilter/netinet/ip_compat.h ============================================================================== --- head/sys/contrib/ipfilter/netinet/ip_compat.h Mon Mar 2 23:24:58 2020 (r358559) +++ head/sys/contrib/ipfilter/netinet/ip_compat.h Mon Mar 2 23:25:02 2020 (r358560) @@ -89,9 +89,6 @@ (__NetBSD_Version__ > (x))) #define NETBSD_LT_REV(x) (defined(__NetBSD_Version__) && \ (__NetBSD_Version__ < (x))) -#define BSD_GE_YEAR(x) (defined(BSD) && (BSD >= (x))) -#define BSD_GT_YEAR(x) (defined(BSD) && (BSD > (x))) -#define BSD_LT_YEAR(x) (defined(BSD) && (BSD < (x))) /* ----------------------------------------------------------------------- */ @@ -439,7 +436,7 @@ extern mb_t *allocmbt(size_t); * On BSD's use quad_t as a guarantee for getting at least a 64bit sized * object. */ -#if !defined(__amd64__) && BSD_GT_YEAR(199306) +#if !defined(__amd64__) && !SOLARIS # define USE_QUAD_T # define U_QUAD_T unsigned long long # define QUAD_T long long @@ -733,7 +730,7 @@ typedef struct tcpiphdr tcpiphdr_t; #define TCPF_ALL (TH_FIN|TH_SYN|TH_RST|TH_PUSH|TH_ACK|TH_URG|\ TH_ECN|TH_CWR) -#if BSD_GE_YEAR(199306) && !defined(m_act) +#if !SOLARIS && !defined(m_act) # define m_act m_nextpkt #endif Modified: head/sys/contrib/ipfilter/netinet/ip_nat.c ============================================================================== --- head/sys/contrib/ipfilter/netinet/ip_nat.c Mon Mar 2 23:24:58 2020 (r358559) +++ head/sys/contrib/ipfilter/netinet/ip_nat.c Mon Mar 2 23:25:02 2020 (r358560) @@ -1010,7 +1010,7 @@ ipf_nat_ioctl(softc, data, cmd, mode, uid, ctx) ipnat_t natd; SPL_INT(s); -#if BSD_GE_YEAR(199306) && defined(_KERNEL) +#if !SOLARIS && defined(_KERNEL) # if NETBSD_GE_REV(399002000) if ((mode & FWRITE) && kauth_authorize_network(curlwp->l_cred, KAUTH_NETWORK_FIREWALL, Modified: head/sys/contrib/ipfilter/netinet/ip_sync.c ============================================================================== --- head/sys/contrib/ipfilter/netinet/ip_sync.c Mon Mar 2 23:24:58 2020 (r358559) +++ head/sys/contrib/ipfilter/netinet/ip_sync.c Mon Mar 2 23:25:02 2020 (r358560) @@ -437,7 +437,7 @@ ipf_sync_write(softc, uio) int err = 0; -# if BSD_GE_YEAR(199306) || defined(__FreeBSD__) +# if defined(__NetBSD__) || defined(__FreeBSD__) uio->uio_rw = UIO_WRITE; # endif @@ -585,7 +585,7 @@ ipf_sync_read(softc, uio) return EINVAL; } -# if BSD_GE_YEAR(199306) || defined(__FreeBSD__) +# if defined(__NetBSD__) || defined(__FreeBSD__) uio->uio_rw = UIO_READ; # endif From owner-svn-src-all@freebsd.org Mon Mar 2 23:37:50 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 614A425DE67; Mon, 2 Mar 2020 23:37:50 +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 48Wc5B0XYYz3xqS; Mon, 2 Mar 2020 23:37:50 +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 EF59424078; Mon, 2 Mar 2020 23:37:49 +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 022NbnDO078090; Mon, 2 Mar 2020 23:37:49 GMT (envelope-from cem@FreeBSD.org) Received: (from cem@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 022NblgD078080; Mon, 2 Mar 2020 23:37:47 GMT (envelope-from cem@FreeBSD.org) Message-Id: <202003022337.022NblgD078080@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: cem set sender to cem@FreeBSD.org using -f From: Conrad Meyer Date: Mon, 2 Mar 2020 23:37:47 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r358561 - in head: . share/man/man5 share/man/man7 tools/build/options tools/tools/nanobsd/dhcpd tools/tools/nanobsd/embedded usr.bin usr.bin/calendar usr.bin/calendar/calendars usr.bin... X-SVN-Group: head X-SVN-Commit-Author: cem X-SVN-Commit-Paths: in head: . share/man/man5 share/man/man7 tools/build/options tools/tools/nanobsd/dhcpd tools/tools/nanobsd/embedded usr.bin usr.bin/calendar usr.bin/calendar/calendars usr.bin/calendar/calendars/de_AT... X-SVN-Commit-Revision: 358561 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages 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, 02 Mar 2020 23:37:50 -0000 Author: cem Date: Mon Mar 2 23:37:47 2020 New Revision: 358561 URL: https://svnweb.freebsd.org/changeset/base/358561 Log: Fix typo in r278616 FreeBSD isn't an encyclopedia. Deleted: head/tools/build/options/WITHOUT_CALENDAR head/usr.bin/calendar/Makefile head/usr.bin/calendar/Makefile.depend head/usr.bin/calendar/calendar.1 head/usr.bin/calendar/calendar.c head/usr.bin/calendar/calendar.h head/usr.bin/calendar/calendars/calendar.all head/usr.bin/calendar/calendars/calendar.australia head/usr.bin/calendar/calendars/calendar.birthday head/usr.bin/calendar/calendars/calendar.brazilian head/usr.bin/calendar/calendars/calendar.christian head/usr.bin/calendar/calendars/calendar.computer head/usr.bin/calendar/calendars/calendar.croatian head/usr.bin/calendar/calendars/calendar.dutch head/usr.bin/calendar/calendars/calendar.french head/usr.bin/calendar/calendars/calendar.german head/usr.bin/calendar/calendars/calendar.history head/usr.bin/calendar/calendars/calendar.holiday head/usr.bin/calendar/calendars/calendar.hungarian head/usr.bin/calendar/calendars/calendar.judaic head/usr.bin/calendar/calendars/calendar.lotr head/usr.bin/calendar/calendars/calendar.music head/usr.bin/calendar/calendars/calendar.newzealand head/usr.bin/calendar/calendars/calendar.russian head/usr.bin/calendar/calendars/calendar.southafrica head/usr.bin/calendar/calendars/calendar.ukrainian head/usr.bin/calendar/calendars/calendar.usholiday head/usr.bin/calendar/calendars/calendar.world head/usr.bin/calendar/calendars/de_AT.ISO_8859-15/ head/usr.bin/calendar/calendars/de_DE.ISO8859-1/ head/usr.bin/calendar/calendars/fr_FR.ISO8859-1/ head/usr.bin/calendar/calendars/hr_HR.ISO8859-2/ head/usr.bin/calendar/calendars/hu_HU.ISO8859-2/ head/usr.bin/calendar/calendars/pt_BR.ISO8859-1/ head/usr.bin/calendar/calendars/pt_BR.UTF-8/ head/usr.bin/calendar/calendars/ru_RU.KOI8-R/ head/usr.bin/calendar/calendars/ru_RU.UTF-8/ head/usr.bin/calendar/calendars/uk_UA.KOI8-U/ head/usr.bin/calendar/dates.c head/usr.bin/calendar/day.c head/usr.bin/calendar/events.c head/usr.bin/calendar/io.c head/usr.bin/calendar/locale.c head/usr.bin/calendar/ostern.c head/usr.bin/calendar/parsedata.c head/usr.bin/calendar/paskha.c head/usr.bin/calendar/pathnames.h head/usr.bin/calendar/pom.c head/usr.bin/calendar/sunpos.c head/usr.bin/calendar/tests/ head/usr.sbin/periodic/etc/daily/300.calendar Modified: head/ObsoleteFiles.inc head/share/man/man5/periodic.conf.5 head/share/man/man5/src.conf.5 head/share/man/man7/hier.7 head/tools/tools/nanobsd/dhcpd/common head/tools/tools/nanobsd/embedded/common head/usr.bin/Makefile head/usr.bin/leave/leave.1 head/usr.sbin/periodic/etc/daily/Makefile head/usr.sbin/periodic/periodic.conf Modified: head/ObsoleteFiles.inc ============================================================================== --- head/ObsoleteFiles.inc Mon Mar 2 23:25:02 2020 (r358560) +++ head/ObsoleteFiles.inc Mon Mar 2 23:37:47 2020 (r358561) @@ -36,6 +36,11 @@ # xargs -n1 | sort | uniq -d; # done +# 20200302: calendar(1) removed +OLD_DIRS+=usr/share/calendar +OLD_FILES+=usr/bin/calendar +OLD_FILES+=usr/share/man/man1/calendar.1.gz + # 20200301: bktr removed OLD_DIRS+=usr/include/dev/bktr OLD_FILES+=usr/include/dev/bktr/ioctl_bktr.h Modified: head/share/man/man5/periodic.conf.5 ============================================================================== --- head/share/man/man5/periodic.conf.5 Mon Mar 2 23:25:02 2020 (r358560) +++ head/share/man/man5/periodic.conf.5 Mon Mar 2 23:37:47 2020 (r358561) @@ -273,13 +273,6 @@ Set to if you want the .Pa /etc/mail/aliases file backed up and modifications to be displayed in your daily output. -.It Va daily_calendar_enable -.Pq Vt bool -Set to -.Dq Li YES -if you want to run -.Nm calendar Fl a -daily. .It Va daily_accounting_enable .Pq Vt bool Set to @@ -970,7 +963,6 @@ is shared or distributed. .El .Sh SEE ALSO .Xr apropos 1 , -.Xr calendar 1 , .Xr df 1 , .Xr diff 1 , .Xr gzip 1 , Modified: head/share/man/man5/src.conf.5 ============================================================================== --- head/share/man/man5/src.conf.5 Mon Mar 2 23:25:02 2020 (r358560) +++ head/share/man/man5/src.conf.5 Mon Mar 2 23:37:47 2020 (r358561) @@ -271,9 +271,6 @@ is set explicitly) .El .It Va WITHOUT_BZIP2_SUPPORT Set to build some programs without optional bzip2 support. -.It Va WITHOUT_CALENDAR -Set to not build -.Xr calendar 1 . .It Va WITHOUT_CAPSICUM Set to not build Capsicum support into system programs. When set, it enforces these options: Modified: head/share/man/man7/hier.7 ============================================================================== --- head/share/man/man7/hier.7 Mon Mar 2 23:25:02 2020 (r358560) +++ head/share/man/man7/hier.7 Mon Mar 2 23:37:47 2020 (r358561) @@ -442,10 +442,6 @@ system daemons & system utilities (executed by users) architecture-independent files .Pp .Bl -tag -width Fl -compact -.It Pa calendar/ -a variety of pre-fab calendar files; -see -.Xr calendar 1 .It Pa dict/ word lists; see Modified: head/tools/tools/nanobsd/dhcpd/common ============================================================================== --- head/tools/tools/nanobsd/dhcpd/common Mon Mar 2 23:25:02 2020 (r358560) +++ head/tools/tools/nanobsd/dhcpd/common Mon Mar 2 23:37:47 2020 (r358561) @@ -104,7 +104,6 @@ WITHOUT_ACPI=true WITHOUT_ATM=true WITHOUT_AUDIT=true WITHOUT_BLUETOOTH=true -WITHOUT_CALENDAR=true WITHOUT_DICT=true WITHOUT_EXAMPLES=true WITHOUT_GAMES=true Modified: head/tools/tools/nanobsd/embedded/common ============================================================================== --- head/tools/tools/nanobsd/embedded/common Mon Mar 2 23:25:02 2020 (r358560) +++ head/tools/tools/nanobsd/embedded/common Mon Mar 2 23:37:47 2020 (r358561) @@ -135,7 +135,6 @@ WITHOUT_ACPI=true WITHOUT_ATM=true WITHOUT_AUDIT=true WITHOUT_BLUETOOTH=true -WITHOUT_CALENDAR=true WITHOUT_DICT=true WITHOUT_EXAMPLES=true WITHOUT_GAMES=true Modified: head/usr.bin/Makefile ============================================================================== --- head/usr.bin/Makefile Mon Mar 2 23:25:02 2020 (r358560) +++ head/usr.bin/Makefile Mon Mar 2 23:37:47 2020 (r358561) @@ -195,7 +195,6 @@ SUBDIR.${MK_AT}+= at SUBDIR.${MK_ATM}+= atm SUBDIR.${MK_BLUETOOTH}+= bluetooth SUBDIR.${MK_BSD_CPIO}+= cpio -SUBDIR.${MK_CALENDAR}+= calendar SUBDIR.${MK_CLANG}+= clang SUBDIR.${MK_DIALOG}+= dpv SUBDIR.${MK_EE}+= ee Modified: head/usr.bin/leave/leave.1 ============================================================================== --- head/usr.bin/leave/leave.1 Mon Mar 2 23:25:02 2020 (r358560) +++ head/usr.bin/leave/leave.1 Mon Mar 2 23:37:47 2020 (r358561) @@ -87,8 +87,6 @@ To get rid of you should either log off or use .Ql kill \-s KILL giving its process id. -.Sh SEE ALSO -.Xr calendar 1 .Sh HISTORY The .Nm Modified: head/usr.sbin/periodic/etc/daily/Makefile ============================================================================== --- head/usr.sbin/periodic/etc/daily/Makefile Mon Mar 2 23:25:02 2020 (r358560) +++ head/usr.sbin/periodic/etc/daily/Makefile Mon Mar 2 23:37:47 2020 (r358561) @@ -33,10 +33,6 @@ ACCTMODE= ${BINMODE} ACCTPACKAGE= acct .endif -.if ${MK_CALENDAR} != "no" -CONFS+= 300.calendar -.endif - .if ${MK_MAIL} != "no" CONFS+= 130.clean-msgs .endif Modified: head/usr.sbin/periodic/periodic.conf ============================================================================== --- head/usr.sbin/periodic/periodic.conf Mon Mar 2 23:25:02 2020 (r358560) +++ head/usr.sbin/periodic/periodic.conf Mon Mar 2 23:37:47 2020 (r358561) @@ -77,9 +77,6 @@ daily_backup_passwd_enable="YES" # Backup passwd & g # 210.backup-aliases daily_backup_aliases_enable="YES" # Backup mail aliases -# 300.calendar -daily_calendar_enable="NO" # Run calendar -a - # 310.accounting daily_accounting_enable="YES" # Rotate acct files daily_accounting_compress="NO" # Gzip rotated files From owner-svn-src-all@freebsd.org Tue Mar 3 00:04:25 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 565DD25ED3C; Tue, 3 Mar 2020 00:04:25 +0000 (UTC) (envelope-from oliver.pntr@gmail.com) Received: from mail-yw1-xc32.google.com (mail-yw1-xc32.google.com [IPv6:2607:f8b0:4864:20::c32]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1O1" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 48Wcgq6Qqfz41X2; Tue, 3 Mar 2020 00:04:23 +0000 (UTC) (envelope-from oliver.pntr@gmail.com) Received: by mail-yw1-xc32.google.com with SMTP id t192so1689851ywe.7; Mon, 02 Mar 2020 16:04:23 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=9QrMbnkHS7UQzBL0wN4nWPCPiGcBUYJrTBHejSKthj4=; b=kp+3zruu3ZmyhZB/l0vp2i5eprM1qzXMFAOeoNU4t6ukDfvB12int/RyiSLWzgyf6h rgsylUCPe9vIMT25yMH6QCbRuON0DB3H1V8/62StE/RLLUXVUtpfp84hdAbTpSShGtyd 5mgLi+6m/Nb0r4TdxD3dpH5nx+DD4e3SwVjmqbdlARPs0b+m6dUdd/iQHVbPHLQGTaL9 iOSX7wmSL0w/h90VKfGklBVwUNJUYKDV9tdqrMiNWQiOOEiPkJuD6ZYYiNSKGYd0mcgQ 8IBYY8YcHKIu1FEI/beJC9oV8kLoKkI1xmnz22XFPyFnKIJ8WXNk2LSeI2wbdhnfzqbj 6ulw== 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=9QrMbnkHS7UQzBL0wN4nWPCPiGcBUYJrTBHejSKthj4=; b=AFcTO6x6URQd6qgavc/6WoUeScST4aiU/XI4gUuZhUrk2fe/ulxFY8GzWDeuT50tTR 46uHz/iQGAmCIKiRhdbLdK1IaOjOefD4Fejy/p4m+sWs5RSy48W0p3PqRHcywn7+GbKb KC4nIRTbAGbKgfROxRQCI0m9dzDk/APU+JTPNlu/KlaRwvFZWk2h+cYmwNinK+USHBfE edD+HPDjFfQzv4mQfyNsK+7kZxz/2o86lY9E6xjAHLFBWbHZ3nbYMqj75R2xV+VuGVaL 9Wdm3csFleZ0xgqZDBuuNJ4BVqbZQRyghfxANLpLoPPhT8zi/gErAx1lS7Kibi4UJjdr rpjg== X-Gm-Message-State: ANhLgQ2IXYt6nxfKpEsEr9IjSEdxohVt+0z5D9VxN8kt3WKYVJBLD62o lWoNJ0+Rlbrp4VjFDWRw2OGG9TvM1tVW4J7rLQHsD3sR X-Google-Smtp-Source: ADFU+vsLy2mTEhx3Bl16hVQcPxN3xyvLDnUf3qgLQK0zGLscnngQg9c7OPqWQlj36nV/kK7LZf1YNGx5PZkMc9V9R5o= X-Received: by 2002:a25:785:: with SMTP id 127mr1565229ybh.405.1583193861653; Mon, 02 Mar 2020 16:04:21 -0800 (PST) MIME-Version: 1.0 Received: by 2002:a25:698b:0:0:0:0:0 with HTTP; Mon, 2 Mar 2020 16:04:20 -0800 (PST) In-Reply-To: <202003022337.022NblgD078080@repo.freebsd.org> References: <202003022337.022NblgD078080@repo.freebsd.org> From: Oliver Pinter Date: Tue, 3 Mar 2020 01:04:20 +0100 Message-ID: Subject: Re: svn commit: r358561 - in head: . share/man/man5 share/man/man7 tools/build/options tools/tools/nanobsd/dhcpd tools/tools/nanobsd/embedded usr.bin usr.bin/calendar usr.bin/calendar/calendars usr.bin... To: Conrad Meyer Cc: "src-committers@freebsd.org" , "svn-src-all@freebsd.org" , "svn-src-head@freebsd.org" X-Rspamd-Queue-Id: 48Wcgq6Qqfz41X2 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org; dkim=pass header.d=gmail.com header.s=20161025 header.b=kp+3zruu; dmarc=pass (policy=none) header.from=gmail.com; spf=pass (mx1.freebsd.org: domain of oliverpntr@gmail.com designates 2607:f8b0:4864:20::c32 as permitted sender) smtp.mailfrom=oliverpntr@gmail.com X-Spamd-Result: default: False [-3.00 / 15.00]; ARC_NA(0.00)[]; TO_DN_EQ_ADDR_SOME(0.00)[]; R_DKIM_ALLOW(-0.20)[gmail.com:s=20161025]; NEURAL_HAM_MEDIUM(-1.00)[-1.000,0]; FROM_HAS_DN(0.00)[]; RCPT_COUNT_THREE(0.00)[4]; R_SPF_ALLOW(-0.20)[+ip6:2607:f8b0:4000::/36]; FREEMAIL_FROM(0.00)[gmail.com]; MIME_GOOD(-0.10)[multipart/alternative,text/plain]; TO_MATCH_ENVRCPT_ALL(0.00)[]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; TO_DN_SOME(0.00)[]; IP_SCORE_FREEMAIL(0.00)[]; IP_SCORE(0.00)[ip: (-8.78), ipnet: 2607:f8b0::/32(-1.86), asn: 15169(-1.66), country: US(-0.05)]; DKIM_TRACE(0.00)[gmail.com:+]; DMARC_POLICY_ALLOW(-0.50)[gmail.com,none]; RCVD_IN_DNSWL_NONE(0.00)[2.3.c.0.0.0.0.0.0.0.0.0.0.0.0.0.0.2.0.0.4.6.8.4.0.b.8.f.7.0.6.2.list.dnswl.org : 127.0.5.0]; RCVD_COUNT_TWO(0.00)[2]; FROM_EQ_ENVFROM(0.00)[]; MIME_TRACE(0.00)[0:+,1:+,2:~]; FREEMAIL_ENVFROM(0.00)[gmail.com]; ASN(0.00)[asn:15169, ipnet:2607:f8b0::/32, country:US]; TAGGED_FROM(0.00)[]; RCVD_TLS_ALL(0.00)[]; DWL_DNSWL_NONE(0.00)[gmail.com.dwl.dnswl.org : 127.0.5.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, 03 Mar 2020 00:04:25 -0000 On Tuesday, March 3, 2020, Conrad Meyer wrote: > Author: cem > Date: Mon Mar 2 23:37:47 2020 > New Revision: 358561 > URL: https://svnweb.freebsd.org/changeset/base/358561 > > Log: > Fix typo in r278616 Umm, this commit isn't really just a typo fix. Please revert it. > > FreeBSD isn't an encyclopedia. > > Deleted: > head/tools/build/options/WITHOUT_CALENDAR > head/usr.bin/calendar/Makefile > head/usr.bin/calendar/Makefile.depend > head/usr.bin/calendar/calendar.1 > head/usr.bin/calendar/calendar.c > head/usr.bin/calendar/calendar.h > head/usr.bin/calendar/calendars/calendar.all > head/usr.bin/calendar/calendars/calendar.australia > head/usr.bin/calendar/calendars/calendar.birthday > head/usr.bin/calendar/calendars/calendar.brazilian > head/usr.bin/calendar/calendars/calendar.christian > head/usr.bin/calendar/calendars/calendar.computer > head/usr.bin/calendar/calendars/calendar.croatian > head/usr.bin/calendar/calendars/calendar.dutch > head/usr.bin/calendar/calendars/calendar.french > head/usr.bin/calendar/calendars/calendar.german > head/usr.bin/calendar/calendars/calendar.history > head/usr.bin/calendar/calendars/calendar.holiday > head/usr.bin/calendar/calendars/calendar.hungarian > head/usr.bin/calendar/calendars/calendar.judaic > head/usr.bin/calendar/calendars/calendar.lotr > head/usr.bin/calendar/calendars/calendar.music > head/usr.bin/calendar/calendars/calendar.newzealand > head/usr.bin/calendar/calendars/calendar.russian > head/usr.bin/calendar/calendars/calendar.southafrica > head/usr.bin/calendar/calendars/calendar.ukrainian > head/usr.bin/calendar/calendars/calendar.usholiday > head/usr.bin/calendar/calendars/calendar.world > head/usr.bin/calendar/calendars/de_AT.ISO_8859-15/ > head/usr.bin/calendar/calendars/de_DE.ISO8859-1/ > head/usr.bin/calendar/calendars/fr_FR.ISO8859-1/ > head/usr.bin/calendar/calendars/hr_HR.ISO8859-2/ > head/usr.bin/calendar/calendars/hu_HU.ISO8859-2/ > head/usr.bin/calendar/calendars/pt_BR.ISO8859-1/ > head/usr.bin/calendar/calendars/pt_BR.UTF-8/ > head/usr.bin/calendar/calendars/ru_RU.KOI8-R/ > head/usr.bin/calendar/calendars/ru_RU.UTF-8/ > head/usr.bin/calendar/calendars/uk_UA.KOI8-U/ > head/usr.bin/calendar/dates.c > head/usr.bin/calendar/day.c > head/usr.bin/calendar/events.c > head/usr.bin/calendar/io.c > head/usr.bin/calendar/locale.c > head/usr.bin/calendar/ostern.c > head/usr.bin/calendar/parsedata.c > head/usr.bin/calendar/paskha.c > head/usr.bin/calendar/pathnames.h > head/usr.bin/calendar/pom.c > head/usr.bin/calendar/sunpos.c > head/usr.bin/calendar/tests/ > head/usr.sbin/periodic/etc/daily/300.calendar > Modified: > head/ObsoleteFiles.inc > head/share/man/man5/periodic.conf.5 > head/share/man/man5/src.conf.5 > head/share/man/man7/hier.7 > head/tools/tools/nanobsd/dhcpd/common > head/tools/tools/nanobsd/embedded/common > head/usr.bin/Makefile > head/usr.bin/leave/leave.1 > head/usr.sbin/periodic/etc/daily/Makefile > head/usr.sbin/periodic/periodic.conf > > Modified: head/ObsoleteFiles.inc > ============================================================ > ================== > --- head/ObsoleteFiles.inc Mon Mar 2 23:25:02 2020 (r358560) > +++ head/ObsoleteFiles.inc Mon Mar 2 23:37:47 2020 (r358561) > @@ -36,6 +36,11 @@ > # xargs -n1 | sort | uniq -d; > # done > > +# 20200302: calendar(1) removed > +OLD_DIRS+=usr/share/calendar > +OLD_FILES+=usr/bin/calendar > +OLD_FILES+=usr/share/man/man1/calendar.1.gz > + > # 20200301: bktr removed > OLD_DIRS+=usr/include/dev/bktr > OLD_FILES+=usr/include/dev/bktr/ioctl_bktr.h > > Modified: head/share/man/man5/periodic.conf.5 > ============================================================ > ================== > --- head/share/man/man5/periodic.conf.5 Mon Mar 2 23:25:02 2020 > (r358560) > +++ head/share/man/man5/periodic.conf.5 Mon Mar 2 23:37:47 2020 > (r358561) > @@ -273,13 +273,6 @@ Set to > if you want the > .Pa /etc/mail/aliases > file backed up and modifications to be displayed in your daily output. > -.It Va daily_calendar_enable > -.Pq Vt bool > -Set to > -.Dq Li YES > -if you want to run > -.Nm calendar Fl a > -daily. > .It Va daily_accounting_enable > .Pq Vt bool > Set to > @@ -970,7 +963,6 @@ is shared or distributed. > .El > .Sh SEE ALSO > .Xr apropos 1 , > -.Xr calendar 1 , > .Xr df 1 , > .Xr diff 1 , > .Xr gzip 1 , > > Modified: head/share/man/man5/src.conf.5 > ============================================================ > ================== > --- head/share/man/man5/src.conf.5 Mon Mar 2 23:25:02 2020 > (r358560) > +++ head/share/man/man5/src.conf.5 Mon Mar 2 23:37:47 2020 > (r358561) > @@ -271,9 +271,6 @@ is set explicitly) > .El > .It Va WITHOUT_BZIP2_SUPPORT > Set to build some programs without optional bzip2 support. > -.It Va WITHOUT_CALENDAR > -Set to not build > -.Xr calendar 1 . > .It Va WITHOUT_CAPSICUM > Set to not build Capsicum support into system programs. > When set, it enforces these options: > > Modified: head/share/man/man7/hier.7 > ============================================================ > ================== > --- head/share/man/man7/hier.7 Mon Mar 2 23:25:02 2020 (r358560) > +++ head/share/man/man7/hier.7 Mon Mar 2 23:37:47 2020 (r358561) > @@ -442,10 +442,6 @@ system daemons & system utilities (executed by users) > architecture-independent files > .Pp > .Bl -tag -width Fl -compact > -.It Pa calendar/ > -a variety of pre-fab calendar files; > -see > -.Xr calendar 1 > .It Pa dict/ > word lists; > see > > Modified: head/tools/tools/nanobsd/dhcpd/common > ============================================================ > ================== > --- head/tools/tools/nanobsd/dhcpd/common Mon Mar 2 23:25:02 2020 > (r358560) > +++ head/tools/tools/nanobsd/dhcpd/common Mon Mar 2 23:37:47 2020 > (r358561) > @@ -104,7 +104,6 @@ WITHOUT_ACPI=true > WITHOUT_ATM=true > WITHOUT_AUDIT=true > WITHOUT_BLUETOOTH=true > -WITHOUT_CALENDAR=true > WITHOUT_DICT=true > WITHOUT_EXAMPLES=true > WITHOUT_GAMES=true > > Modified: head/tools/tools/nanobsd/embedded/common > ============================================================ > ================== > --- head/tools/tools/nanobsd/embedded/common Mon Mar 2 23:25:02 2020 > (r358560) > +++ head/tools/tools/nanobsd/embedded/common Mon Mar 2 23:37:47 2020 > (r358561) > @@ -135,7 +135,6 @@ WITHOUT_ACPI=true > WITHOUT_ATM=true > WITHOUT_AUDIT=true > WITHOUT_BLUETOOTH=true > -WITHOUT_CALENDAR=true > WITHOUT_DICT=true > WITHOUT_EXAMPLES=true > WITHOUT_GAMES=true > > Modified: head/usr.bin/Makefile > ============================================================ > ================== > --- head/usr.bin/Makefile Mon Mar 2 23:25:02 2020 (r358560) > +++ head/usr.bin/Makefile Mon Mar 2 23:37:47 2020 (r358561) > @@ -195,7 +195,6 @@ SUBDIR.${MK_AT}+= at > SUBDIR.${MK_ATM}+= atm > SUBDIR.${MK_BLUETOOTH}+= bluetooth > SUBDIR.${MK_BSD_CPIO}+= cpio > -SUBDIR.${MK_CALENDAR}+= calendar > SUBDIR.${MK_CLANG}+= clang > SUBDIR.${MK_DIALOG}+= dpv > SUBDIR.${MK_EE}+= ee > > Modified: head/usr.bin/leave/leave.1 > ============================================================ > ================== > --- head/usr.bin/leave/leave.1 Mon Mar 2 23:25:02 2020 (r358560) > +++ head/usr.bin/leave/leave.1 Mon Mar 2 23:37:47 2020 (r358561) > @@ -87,8 +87,6 @@ To get rid of > you should either log off or use > .Ql kill \-s KILL > giving its process id. > -.Sh SEE ALSO > -.Xr calendar 1 > .Sh HISTORY > The > .Nm > > Modified: head/usr.sbin/periodic/etc/daily/Makefile > ============================================================ > ================== > --- head/usr.sbin/periodic/etc/daily/Makefile Mon Mar 2 23:25:02 2020 > (r358560) > +++ head/usr.sbin/periodic/etc/daily/Makefile Mon Mar 2 23:37:47 2020 > (r358561) > @@ -33,10 +33,6 @@ ACCTMODE= ${BINMODE} > ACCTPACKAGE= acct > .endif > > -.if ${MK_CALENDAR} != "no" > -CONFS+= 300.calendar > -.endif > - > .if ${MK_MAIL} != "no" > CONFS+= 130.clean-msgs > .endif > > Modified: head/usr.sbin/periodic/periodic.conf > ============================================================ > ================== > --- head/usr.sbin/periodic/periodic.conf Mon Mar 2 23:25:02 2020 > (r358560) > +++ head/usr.sbin/periodic/periodic.conf Mon Mar 2 23:37:47 2020 > (r358561) > @@ -77,9 +77,6 @@ daily_backup_passwd_enable="YES" # > Backup passwd & g > # 210.backup-aliases > daily_backup_aliases_enable="YES" # Backup mail > aliases > > -# 300.calendar > -daily_calendar_enable="NO" # Run calendar -a > - > # 310.accounting > daily_accounting_enable="YES" # Rotate acct files > daily_accounting_compress="NO" # Gzip rotated > files > _______________________________________________ > 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 Tue Mar 3 00:05:06 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 09C1D25EECB; Tue, 3 Mar 2020 00:05:06 +0000 (UTC) (envelope-from freebsd@gndrsh.dnsmgr.net) Received: from gndrsh.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 48Wchb4T6Kz42c2; Tue, 3 Mar 2020 00:05:03 +0000 (UTC) (envelope-from freebsd@gndrsh.dnsmgr.net) Received: from gndrsh.dnsmgr.net (localhost [127.0.0.1]) by gndrsh.dnsmgr.net (8.13.3/8.13.3) with ESMTP id 023050Yb029049; Mon, 2 Mar 2020 16:05:00 -0800 (PST) (envelope-from freebsd@gndrsh.dnsmgr.net) Received: (from freebsd@localhost) by gndrsh.dnsmgr.net (8.13.3/8.13.3/Submit) id 023050xE029048; Mon, 2 Mar 2020 16:05:00 -0800 (PST) (envelope-from freebsd) From: "Rodney W. Grimes" Message-Id: <202003030005.023050xE029048@gndrsh.dnsmgr.net> Subject: Re: svn commit: r358561 - in head: . share/man/man5 share/man/man7 tools/build/options tools/tools/nanobsd/dhcpd tools/tools/nanobsd/embedded usr.bin usr.bin/calendar usr.bin/calendar/calendars usr.bin... In-Reply-To: <202003022337.022NblgD078080@repo.freebsd.org> To: Conrad Meyer Date: Mon, 2 Mar 2020 16:04:59 -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: 48Wchb4T6Kz42c2 X-Spamd-Bar: + Authentication-Results: mx1.freebsd.org; dkim=none; dmarc=none; spf=none (mx1.freebsd.org: domain of freebsd@gndrsh.dnsmgr.net has no SPF policy when checking 69.59.192.140) smtp.mailfrom=freebsd@gndrsh.dnsmgr.net X-Spamd-Result: default: False [1.64 / 15.00]; ARC_NA(0.00)[]; HAS_REPLYTO(0.00)[rgrimes@freebsd.org]; FROM_HAS_DN(0.00)[]; RCPT_COUNT_THREE(0.00)[4]; TO_MATCH_ENVRCPT_ALL(0.00)[]; MIME_GOOD(-0.10)[text/plain]; RCVD_TLS_LAST(0.00)[]; DMARC_NA(0.00)[dnsmgr.net]; TO_DN_SOME(0.00)[]; REPLYTO_DOM_NEQ_FROM_DOM(0.00)[]; AUTH_NA(1.00)[]; NEURAL_SPAM_MEDIUM(0.61)[0.612,0]; IP_SCORE(0.03)[ip: (0.13), ipnet: 69.59.192.0/19(0.07), asn: 13868(0.03), country: US(-0.05)]; NEURAL_SPAM_LONG(0.09)[0.092,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:13868, ipnet:69.59.192.0/19, country:US]; MID_RHS_MATCH_FROM(0.00)[]; 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: Tue, 03 Mar 2020 00:05:06 -0000 [ Charset UTF-8 unsupported, converting... ] > Author: cem > Date: Mon Mar 2 23:37:47 2020 > New Revision: 358561 > URL: https://svnweb.freebsd.org/changeset/base/358561 > > Log: > Fix typo in r278616 > > FreeBSD isn't an encyclopedia. Hang on here, you just removed a base system tool without any discussion.. ??? This is far more than a typo fix. > > Deleted: > head/tools/build/options/WITHOUT_CALENDAR > head/usr.bin/calendar/Makefile > head/usr.bin/calendar/Makefile.depend > head/usr.bin/calendar/calendar.1 > head/usr.bin/calendar/calendar.c > head/usr.bin/calendar/calendar.h > head/usr.bin/calendar/calendars/calendar.all > head/usr.bin/calendar/calendars/calendar.australia > head/usr.bin/calendar/calendars/calendar.birthday > head/usr.bin/calendar/calendars/calendar.brazilian > head/usr.bin/calendar/calendars/calendar.christian > head/usr.bin/calendar/calendars/calendar.computer > head/usr.bin/calendar/calendars/calendar.croatian > head/usr.bin/calendar/calendars/calendar.dutch > head/usr.bin/calendar/calendars/calendar.french > head/usr.bin/calendar/calendars/calendar.german > head/usr.bin/calendar/calendars/calendar.history > head/usr.bin/calendar/calendars/calendar.holiday > head/usr.bin/calendar/calendars/calendar.hungarian > head/usr.bin/calendar/calendars/calendar.judaic > head/usr.bin/calendar/calendars/calendar.lotr > head/usr.bin/calendar/calendars/calendar.music > head/usr.bin/calendar/calendars/calendar.newzealand > head/usr.bin/calendar/calendars/calendar.russian > head/usr.bin/calendar/calendars/calendar.southafrica > head/usr.bin/calendar/calendars/calendar.ukrainian > head/usr.bin/calendar/calendars/calendar.usholiday > head/usr.bin/calendar/calendars/calendar.world > head/usr.bin/calendar/calendars/de_AT.ISO_8859-15/ > head/usr.bin/calendar/calendars/de_DE.ISO8859-1/ > head/usr.bin/calendar/calendars/fr_FR.ISO8859-1/ > head/usr.bin/calendar/calendars/hr_HR.ISO8859-2/ > head/usr.bin/calendar/calendars/hu_HU.ISO8859-2/ > head/usr.bin/calendar/calendars/pt_BR.ISO8859-1/ > head/usr.bin/calendar/calendars/pt_BR.UTF-8/ > head/usr.bin/calendar/calendars/ru_RU.KOI8-R/ > head/usr.bin/calendar/calendars/ru_RU.UTF-8/ > head/usr.bin/calendar/calendars/uk_UA.KOI8-U/ > head/usr.bin/calendar/dates.c > head/usr.bin/calendar/day.c > head/usr.bin/calendar/events.c > head/usr.bin/calendar/io.c > head/usr.bin/calendar/locale.c > head/usr.bin/calendar/ostern.c > head/usr.bin/calendar/parsedata.c > head/usr.bin/calendar/paskha.c > head/usr.bin/calendar/pathnames.h > head/usr.bin/calendar/pom.c > head/usr.bin/calendar/sunpos.c > head/usr.bin/calendar/tests/ > head/usr.sbin/periodic/etc/daily/300.calendar > Modified: > head/ObsoleteFiles.inc > head/share/man/man5/periodic.conf.5 > head/share/man/man5/src.conf.5 > head/share/man/man7/hier.7 > head/tools/tools/nanobsd/dhcpd/common > head/tools/tools/nanobsd/embedded/common > head/usr.bin/Makefile > head/usr.bin/leave/leave.1 > head/usr.sbin/periodic/etc/daily/Makefile > head/usr.sbin/periodic/periodic.conf > > Modified: head/ObsoleteFiles.inc > ============================================================================== > --- head/ObsoleteFiles.inc Mon Mar 2 23:25:02 2020 (r358560) > +++ head/ObsoleteFiles.inc Mon Mar 2 23:37:47 2020 (r358561) > @@ -36,6 +36,11 @@ > # xargs -n1 | sort | uniq -d; > # done > > +# 20200302: calendar(1) removed > +OLD_DIRS+=usr/share/calendar > +OLD_FILES+=usr/bin/calendar > +OLD_FILES+=usr/share/man/man1/calendar.1.gz > + > # 20200301: bktr removed > OLD_DIRS+=usr/include/dev/bktr > OLD_FILES+=usr/include/dev/bktr/ioctl_bktr.h > > Modified: head/share/man/man5/periodic.conf.5 > ============================================================================== > --- head/share/man/man5/periodic.conf.5 Mon Mar 2 23:25:02 2020 (r358560) > +++ head/share/man/man5/periodic.conf.5 Mon Mar 2 23:37:47 2020 (r358561) > @@ -273,13 +273,6 @@ Set to > if you want the > .Pa /etc/mail/aliases > file backed up and modifications to be displayed in your daily output. > -.It Va daily_calendar_enable > -.Pq Vt bool > -Set to > -.Dq Li YES > -if you want to run > -.Nm calendar Fl a > -daily. > .It Va daily_accounting_enable > .Pq Vt bool > Set to > @@ -970,7 +963,6 @@ is shared or distributed. > .El > .Sh SEE ALSO > .Xr apropos 1 , > -.Xr calendar 1 , > .Xr df 1 , > .Xr diff 1 , > .Xr gzip 1 , > > Modified: head/share/man/man5/src.conf.5 > ============================================================================== > --- head/share/man/man5/src.conf.5 Mon Mar 2 23:25:02 2020 (r358560) > +++ head/share/man/man5/src.conf.5 Mon Mar 2 23:37:47 2020 (r358561) > @@ -271,9 +271,6 @@ is set explicitly) > .El > .It Va WITHOUT_BZIP2_SUPPORT > Set to build some programs without optional bzip2 support. > -.It Va WITHOUT_CALENDAR > -Set to not build > -.Xr calendar 1 . > .It Va WITHOUT_CAPSICUM > Set to not build Capsicum support into system programs. > When set, it enforces these options: > > Modified: head/share/man/man7/hier.7 > ============================================================================== > --- head/share/man/man7/hier.7 Mon Mar 2 23:25:02 2020 (r358560) > +++ head/share/man/man7/hier.7 Mon Mar 2 23:37:47 2020 (r358561) > @@ -442,10 +442,6 @@ system daemons & system utilities (executed by users) > architecture-independent files > .Pp > .Bl -tag -width Fl -compact > -.It Pa calendar/ > -a variety of pre-fab calendar files; > -see > -.Xr calendar 1 > .It Pa dict/ > word lists; > see > > Modified: head/tools/tools/nanobsd/dhcpd/common > ============================================================================== > --- head/tools/tools/nanobsd/dhcpd/common Mon Mar 2 23:25:02 2020 (r358560) > +++ head/tools/tools/nanobsd/dhcpd/common Mon Mar 2 23:37:47 2020 (r358561) > @@ -104,7 +104,6 @@ WITHOUT_ACPI=true > WITHOUT_ATM=true > WITHOUT_AUDIT=true > WITHOUT_BLUETOOTH=true > -WITHOUT_CALENDAR=true > WITHOUT_DICT=true > WITHOUT_EXAMPLES=true > WITHOUT_GAMES=true > > Modified: head/tools/tools/nanobsd/embedded/common > ============================================================================== > --- head/tools/tools/nanobsd/embedded/common Mon Mar 2 23:25:02 2020 (r358560) > +++ head/tools/tools/nanobsd/embedded/common Mon Mar 2 23:37:47 2020 (r358561) > @@ -135,7 +135,6 @@ WITHOUT_ACPI=true > WITHOUT_ATM=true > WITHOUT_AUDIT=true > WITHOUT_BLUETOOTH=true > -WITHOUT_CALENDAR=true > WITHOUT_DICT=true > WITHOUT_EXAMPLES=true > WITHOUT_GAMES=true > > Modified: head/usr.bin/Makefile > ============================================================================== > --- head/usr.bin/Makefile Mon Mar 2 23:25:02 2020 (r358560) > +++ head/usr.bin/Makefile Mon Mar 2 23:37:47 2020 (r358561) > @@ -195,7 +195,6 @@ SUBDIR.${MK_AT}+= at > SUBDIR.${MK_ATM}+= atm > SUBDIR.${MK_BLUETOOTH}+= bluetooth > SUBDIR.${MK_BSD_CPIO}+= cpio > -SUBDIR.${MK_CALENDAR}+= calendar > SUBDIR.${MK_CLANG}+= clang > SUBDIR.${MK_DIALOG}+= dpv > SUBDIR.${MK_EE}+= ee > > Modified: head/usr.bin/leave/leave.1 > ============================================================================== > --- head/usr.bin/leave/leave.1 Mon Mar 2 23:25:02 2020 (r358560) > +++ head/usr.bin/leave/leave.1 Mon Mar 2 23:37:47 2020 (r358561) > @@ -87,8 +87,6 @@ To get rid of > you should either log off or use > .Ql kill \-s KILL > giving its process id. > -.Sh SEE ALSO > -.Xr calendar 1 > .Sh HISTORY > The > .Nm > > Modified: head/usr.sbin/periodic/etc/daily/Makefile > ============================================================================== > --- head/usr.sbin/periodic/etc/daily/Makefile Mon Mar 2 23:25:02 2020 (r358560) > +++ head/usr.sbin/periodic/etc/daily/Makefile Mon Mar 2 23:37:47 2020 (r358561) > @@ -33,10 +33,6 @@ ACCTMODE= ${BINMODE} > ACCTPACKAGE= acct > .endif > > -.if ${MK_CALENDAR} != "no" > -CONFS+= 300.calendar > -.endif > - > .if ${MK_MAIL} != "no" > CONFS+= 130.clean-msgs > .endif > > Modified: head/usr.sbin/periodic/periodic.conf > ============================================================================== > --- head/usr.sbin/periodic/periodic.conf Mon Mar 2 23:25:02 2020 (r358560) > +++ head/usr.sbin/periodic/periodic.conf Mon Mar 2 23:37:47 2020 (r358561) > @@ -77,9 +77,6 @@ daily_backup_passwd_enable="YES" # Backup passwd & g > # 210.backup-aliases > daily_backup_aliases_enable="YES" # Backup mail aliases > > -# 300.calendar > -daily_calendar_enable="NO" # Run calendar -a > - > # 310.accounting > daily_accounting_enable="YES" # Rotate acct files > daily_accounting_compress="NO" # Gzip rotated files > -- Rod Grimes rgrimes@freebsd.org From owner-svn-src-all@freebsd.org Tue Mar 3 00:05:27 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 0BECC25EF8B for ; Tue, 3 Mar 2020 00:05:27 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: from mail-qk1-x731.google.com (mail-qk1-x731.google.com [IPv6:2607:f8b0:4864:20::731]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1O1" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 48Wcj205LFz42w8 for ; Tue, 3 Mar 2020 00:05:25 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: by mail-qk1-x731.google.com with SMTP id u124so1636506qkh.13 for ; Mon, 02 Mar 2020 16:05:25 -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=ElsqFDcoxvGJZ8xhQDF0k8xyuDtqnYn99s6nuzd4Czs=; b=aQ279dqylyHjzQffLMZgMJ6CBq9Rkh/okOaPPvYLIYSIuR300DNCdx7a9SVsUkma7w NuTGsPPwTdLOdQeL7PL6B26dupLBxD3c8BNQBOaff47JX43auu8azyvFQ+q0xfvoqOV3 A0q3MUWGBEs8W4HkAybH3nvqsuO93ElzlVvgvIe93TqYVq5fDS2upT+XCvf/80YyHfcf M/73sR3sNY7/fuFVyUghCsQv5U6PC4M3byZsVNDxnstUFmEz6LD5l4I+n4ekwnKXlSTt RaF5+VImRfLCLKI+AOeaPBO85P2TZYwyOUuTKh9C2rUDCedZZx6FSw8K1pA0vAmzOfKU qbJg== 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=ElsqFDcoxvGJZ8xhQDF0k8xyuDtqnYn99s6nuzd4Czs=; b=gXDby9poChQ9OXcaQLb4TiosM00Cg6BPaVco5Ahq2TyhW/StIFyaO0z1fAlmrWCWny jnUGGtsEfGBqmQsNBk9zF6FUkga2UA+dBBSc9bRNJyiTR/U4TEDHHlgeGtEGtWg5huyM 2IHPUCw5JxC/rUQXM9W3vx60YvisiZPeegWFtvg8X7nyYy7F2d+8mdp+koDxp1oTijuR M1EClg6XxEdPzplXhGSXEtdhF5mEiOGvTbaynLx2xzVIhMMk7YUuOPf5LNAWMS+DLXt3 vwFv03Vd18l/n/TgDIG4oEhtY93la9S5C73qgHpnHlxQM/bmPGnsQs069wyo7cr/Rrjf Zz/A== X-Gm-Message-State: ANhLgQ0O4qgZuKA91459PsPhM+N9U0QjXISDOoCWgFPaSmkmgLF1t5My U4zUjpy3/p2gxrEo9lZjP1ZVDjnRb4MMraXk6HZ7XQ== X-Google-Smtp-Source: ADFU+vu7O/ZJHyWoUh+ddADDagP370/S/KWzaAGgkC4lalxKT4BW4ANWOiGKc9mRCskJMUNc3CTEaabtWnkiH/McIwQ= X-Received: by 2002:a37:993:: with SMTP id 141mr1587748qkj.240.1583193924788; Mon, 02 Mar 2020 16:05:24 -0800 (PST) MIME-Version: 1.0 References: <202003022337.022NblgD078080@repo.freebsd.org> In-Reply-To: <202003022337.022NblgD078080@repo.freebsd.org> From: Warner Losh Date: Mon, 2 Mar 2020 17:05:13 -0700 Message-ID: Subject: Re: svn commit: r358561 - in head: . share/man/man5 share/man/man7 tools/build/options tools/tools/nanobsd/dhcpd tools/tools/nanobsd/embedded usr.bin usr.bin/calendar usr.bin/calendar/calendars usr.bin... To: Conrad Meyer Cc: src-committers , svn-src-all , svn-src-head X-Rspamd-Queue-Id: 48Wcj205LFz42w8 X-Spamd-Bar: --- Authentication-Results: mx1.freebsd.org; dkim=pass header.d=bsdimp-com.20150623.gappssmtp.com header.s=20150623 header.b=aQ279dqy; dmarc=none; spf=none (mx1.freebsd.org: domain of wlosh@bsdimp.com has no SPF policy when checking 2607:f8b0:4864:20::731) smtp.mailfrom=wlosh@bsdimp.com X-Spamd-Result: default: False [-3.54 / 15.00]; ARC_NA(0.00)[]; NEURAL_HAM_MEDIUM(-1.00)[-0.995,0]; R_DKIM_ALLOW(-0.20)[bsdimp-com.20150623.gappssmtp.com:s=20150623]; FROM_HAS_DN(0.00)[]; RCPT_COUNT_THREE(0.00)[4]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; MIME_GOOD(-0.10)[multipart/alternative,text/plain]; PREVIOUSLY_DELIVERED(0.00)[svn-src-all@freebsd.org]; DMARC_NA(0.00)[bsdimp.com]; URI_COUNT_ODD(1.00)[3]; TO_MATCH_ENVRCPT_SOME(0.00)[]; TO_DN_ALL(0.00)[]; DKIM_TRACE(0.00)[bsdimp-com.20150623.gappssmtp.com:+]; RCVD_IN_DNSWL_NONE(0.00)[1.3.7.0.0.0.0.0.0.0.0.0.0.0.0.0.0.2.0.0.4.6.8.4.0.b.8.f.7.0.6.2.list.dnswl.org : 127.0.5.0]; R_SPF_NA(0.00)[]; FORGED_SENDER(0.30)[imp@bsdimp.com,wlosh@bsdimp.com]; MIME_TRACE(0.00)[0:+,1:+,2:~]; IP_SCORE(-2.54)[ip: (-9.15), ipnet: 2607:f8b0::/32(-1.86), asn: 15169(-1.66), country: US(-0.05)]; ASN(0.00)[asn:15169, ipnet:2607:f8b0::/32, country:US]; FROM_NEQ_ENVFROM(0.00)[imp@bsdimp.com,wlosh@bsdimp.com]; RCVD_TLS_ALL(0.00)[]; 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: Tue, 03 Mar 2020 00:05:27 -0000 Can you point me at the discussion where this was decided? Warner On Mon, Mar 2, 2020 at 4:38 PM Conrad Meyer wrote: > Author: cem > Date: Mon Mar 2 23:37:47 2020 > New Revision: 358561 > URL: https://svnweb.freebsd.org/changeset/base/358561 > > Log: > Fix typo in r278616 > > FreeBSD isn't an encyclopedia. > > Deleted: > head/tools/build/options/WITHOUT_CALENDAR > head/usr.bin/calendar/Makefile > head/usr.bin/calendar/Makefile.depend > head/usr.bin/calendar/calendar.1 > head/usr.bin/calendar/calendar.c > head/usr.bin/calendar/calendar.h > head/usr.bin/calendar/calendars/calendar.all > head/usr.bin/calendar/calendars/calendar.australia > head/usr.bin/calendar/calendars/calendar.birthday > head/usr.bin/calendar/calendars/calendar.brazilian > head/usr.bin/calendar/calendars/calendar.christian > head/usr.bin/calendar/calendars/calendar.computer > head/usr.bin/calendar/calendars/calendar.croatian > head/usr.bin/calendar/calendars/calendar.dutch > head/usr.bin/calendar/calendars/calendar.french > head/usr.bin/calendar/calendars/calendar.german > head/usr.bin/calendar/calendars/calendar.history > head/usr.bin/calendar/calendars/calendar.holiday > head/usr.bin/calendar/calendars/calendar.hungarian > head/usr.bin/calendar/calendars/calendar.judaic > head/usr.bin/calendar/calendars/calendar.lotr > head/usr.bin/calendar/calendars/calendar.music > head/usr.bin/calendar/calendars/calendar.newzealand > head/usr.bin/calendar/calendars/calendar.russian > head/usr.bin/calendar/calendars/calendar.southafrica > head/usr.bin/calendar/calendars/calendar.ukrainian > head/usr.bin/calendar/calendars/calendar.usholiday > head/usr.bin/calendar/calendars/calendar.world > head/usr.bin/calendar/calendars/de_AT.ISO_8859-15/ > head/usr.bin/calendar/calendars/de_DE.ISO8859-1/ > head/usr.bin/calendar/calendars/fr_FR.ISO8859-1/ > head/usr.bin/calendar/calendars/hr_HR.ISO8859-2/ > head/usr.bin/calendar/calendars/hu_HU.ISO8859-2/ > head/usr.bin/calendar/calendars/pt_BR.ISO8859-1/ > head/usr.bin/calendar/calendars/pt_BR.UTF-8/ > head/usr.bin/calendar/calendars/ru_RU.KOI8-R/ > head/usr.bin/calendar/calendars/ru_RU.UTF-8/ > head/usr.bin/calendar/calendars/uk_UA.KOI8-U/ > head/usr.bin/calendar/dates.c > head/usr.bin/calendar/day.c > head/usr.bin/calendar/events.c > head/usr.bin/calendar/io.c > head/usr.bin/calendar/locale.c > head/usr.bin/calendar/ostern.c > head/usr.bin/calendar/parsedata.c > head/usr.bin/calendar/paskha.c > head/usr.bin/calendar/pathnames.h > head/usr.bin/calendar/pom.c > head/usr.bin/calendar/sunpos.c > head/usr.bin/calendar/tests/ > head/usr.sbin/periodic/etc/daily/300.calendar > Modified: > head/ObsoleteFiles.inc > head/share/man/man5/periodic.conf.5 > head/share/man/man5/src.conf.5 > head/share/man/man7/hier.7 > head/tools/tools/nanobsd/dhcpd/common > head/tools/tools/nanobsd/embedded/common > head/usr.bin/Makefile > head/usr.bin/leave/leave.1 > head/usr.sbin/periodic/etc/daily/Makefile > head/usr.sbin/periodic/periodic.conf > > Modified: head/ObsoleteFiles.inc > > ============================================================================== > --- head/ObsoleteFiles.inc Mon Mar 2 23:25:02 2020 (r358560) > +++ head/ObsoleteFiles.inc Mon Mar 2 23:37:47 2020 (r358561) > @@ -36,6 +36,11 @@ > # xargs -n1 | sort | uniq -d; > # done > > +# 20200302: calendar(1) removed > +OLD_DIRS+=usr/share/calendar > +OLD_FILES+=usr/bin/calendar > +OLD_FILES+=usr/share/man/man1/calendar.1.gz > + > # 20200301: bktr removed > OLD_DIRS+=usr/include/dev/bktr > OLD_FILES+=usr/include/dev/bktr/ioctl_bktr.h > > Modified: head/share/man/man5/periodic.conf.5 > > ============================================================================== > --- head/share/man/man5/periodic.conf.5 Mon Mar 2 23:25:02 2020 > (r358560) > +++ head/share/man/man5/periodic.conf.5 Mon Mar 2 23:37:47 2020 > (r358561) > @@ -273,13 +273,6 @@ Set to > if you want the > .Pa /etc/mail/aliases > file backed up and modifications to be displayed in your daily output. > -.It Va daily_calendar_enable > -.Pq Vt bool > -Set to > -.Dq Li YES > -if you want to run > -.Nm calendar Fl a > -daily. > .It Va daily_accounting_enable > .Pq Vt bool > Set to > @@ -970,7 +963,6 @@ is shared or distributed. > .El > .Sh SEE ALSO > .Xr apropos 1 , > -.Xr calendar 1 , > .Xr df 1 , > .Xr diff 1 , > .Xr gzip 1 , > > Modified: head/share/man/man5/src.conf.5 > > ============================================================================== > --- head/share/man/man5/src.conf.5 Mon Mar 2 23:25:02 2020 > (r358560) > +++ head/share/man/man5/src.conf.5 Mon Mar 2 23:37:47 2020 > (r358561) > @@ -271,9 +271,6 @@ is set explicitly) > .El > .It Va WITHOUT_BZIP2_SUPPORT > Set to build some programs without optional bzip2 support. > -.It Va WITHOUT_CALENDAR > -Set to not build > -.Xr calendar 1 . > .It Va WITHOUT_CAPSICUM > Set to not build Capsicum support into system programs. > When set, it enforces these options: > > Modified: head/share/man/man7/hier.7 > > ============================================================================== > --- head/share/man/man7/hier.7 Mon Mar 2 23:25:02 2020 (r358560) > +++ head/share/man/man7/hier.7 Mon Mar 2 23:37:47 2020 (r358561) > @@ -442,10 +442,6 @@ system daemons & system utilities (executed by users) > architecture-independent files > .Pp > .Bl -tag -width Fl -compact > -.It Pa calendar/ > -a variety of pre-fab calendar files; > -see > -.Xr calendar 1 > .It Pa dict/ > word lists; > see > > Modified: head/tools/tools/nanobsd/dhcpd/common > > ============================================================================== > --- head/tools/tools/nanobsd/dhcpd/common Mon Mar 2 23:25:02 2020 > (r358560) > +++ head/tools/tools/nanobsd/dhcpd/common Mon Mar 2 23:37:47 2020 > (r358561) > @@ -104,7 +104,6 @@ WITHOUT_ACPI=true > WITHOUT_ATM=true > WITHOUT_AUDIT=true > WITHOUT_BLUETOOTH=true > -WITHOUT_CALENDAR=true > WITHOUT_DICT=true > WITHOUT_EXAMPLES=true > WITHOUT_GAMES=true > > Modified: head/tools/tools/nanobsd/embedded/common > > ============================================================================== > --- head/tools/tools/nanobsd/embedded/common Mon Mar 2 23:25:02 2020 > (r358560) > +++ head/tools/tools/nanobsd/embedded/common Mon Mar 2 23:37:47 2020 > (r358561) > @@ -135,7 +135,6 @@ WITHOUT_ACPI=true > WITHOUT_ATM=true > WITHOUT_AUDIT=true > WITHOUT_BLUETOOTH=true > -WITHOUT_CALENDAR=true > WITHOUT_DICT=true > WITHOUT_EXAMPLES=true > WITHOUT_GAMES=true > > Modified: head/usr.bin/Makefile > > ============================================================================== > --- head/usr.bin/Makefile Mon Mar 2 23:25:02 2020 (r358560) > +++ head/usr.bin/Makefile Mon Mar 2 23:37:47 2020 (r358561) > @@ -195,7 +195,6 @@ SUBDIR.${MK_AT}+= at > SUBDIR.${MK_ATM}+= atm > SUBDIR.${MK_BLUETOOTH}+= bluetooth > SUBDIR.${MK_BSD_CPIO}+= cpio > -SUBDIR.${MK_CALENDAR}+= calendar > SUBDIR.${MK_CLANG}+= clang > SUBDIR.${MK_DIALOG}+= dpv > SUBDIR.${MK_EE}+= ee > > Modified: head/usr.bin/leave/leave.1 > > ============================================================================== > --- head/usr.bin/leave/leave.1 Mon Mar 2 23:25:02 2020 (r358560) > +++ head/usr.bin/leave/leave.1 Mon Mar 2 23:37:47 2020 (r358561) > @@ -87,8 +87,6 @@ To get rid of > you should either log off or use > .Ql kill \-s KILL > giving its process id. > -.Sh SEE ALSO > -.Xr calendar 1 > .Sh HISTORY > The > .Nm > > Modified: head/usr.sbin/periodic/etc/daily/Makefile > > ============================================================================== > --- head/usr.sbin/periodic/etc/daily/Makefile Mon Mar 2 23:25:02 2020 > (r358560) > +++ head/usr.sbin/periodic/etc/daily/Makefile Mon Mar 2 23:37:47 2020 > (r358561) > @@ -33,10 +33,6 @@ ACCTMODE= ${BINMODE} > ACCTPACKAGE= acct > .endif > > -.if ${MK_CALENDAR} != "no" > -CONFS+= 300.calendar > -.endif > - > .if ${MK_MAIL} != "no" > CONFS+= 130.clean-msgs > .endif > > Modified: head/usr.sbin/periodic/periodic.conf > > ============================================================================== > --- head/usr.sbin/periodic/periodic.conf Mon Mar 2 23:25:02 2020 > (r358560) > +++ head/usr.sbin/periodic/periodic.conf Mon Mar 2 23:37:47 2020 > (r358561) > @@ -77,9 +77,6 @@ daily_backup_passwd_enable="YES" # > Backup passwd & g > # 210.backup-aliases > daily_backup_aliases_enable="YES" # Backup mail > aliases > > -# 300.calendar > -daily_calendar_enable="NO" # Run calendar -a > - > # 310.accounting > daily_accounting_enable="YES" # Rotate acct files > daily_accounting_compress="NO" # Gzip rotated > files > From owner-svn-src-all@freebsd.org Tue Mar 3 00:08:23 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 75CFF25F247; Tue, 3 Mar 2020 00:08:23 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from smtp.freebsd.org (smtp.freebsd.org [IPv6:2610:1c1:1:606c::24b:4]) (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 48WcmR2P7bz44Z2; Tue, 3 Mar 2020 00:08:23 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from John-Baldwins-MacBook-Pro-7.local (ralph.baldwin.cx [66.234.199.215]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client did not present a certificate) (Authenticated sender: jhb) by smtp.freebsd.org (Postfix) with ESMTPSA id C65A191D; Tue, 3 Mar 2020 00:08:22 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Subject: Re: svn commit: r358561 - in head: . share/man/man5 share/man/man7 tools/build/options tools/tools/nanobsd/dhcpd tools/tools/nanobsd/embedded usr.bin usr.bin/calendar usr.bin/calendar/calendars usr.bin... To: Conrad Meyer , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org References: <202003022337.022NblgD078080@repo.freebsd.org> From: John Baldwin 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: <1b74fdca-71ce-39af-6533-398c26e61677@FreeBSD.org> Date: Mon, 2 Mar 2020 16:08:21 -0800 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.12; rv:68.0) Gecko/20100101 Thunderbird/68.4.2 MIME-Version: 1.0 In-Reply-To: <202003022337.022NblgD078080@repo.freebsd.org> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages 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, 03 Mar 2020 00:08:23 -0000 On 3/2/20 3:37 PM, Conrad Meyer wrote: > Author: cem > Date: Mon Mar 2 23:37:47 2020 > New Revision: 358561 > URL: https://svnweb.freebsd.org/changeset/base/358561 > > Log: > Fix typo in r278616 > > FreeBSD isn't an encyclopedia. This isn't a helpful log message, and you didn't post this for review, etc. I actually use calendar in my .login, so it's not completely unused. It was a conscious decision, not a typo to keep calendar(1), and not one for you to unilaterally revisit without at least some discussion. I don't think we've had any calendar CVEs or that it's been a maintenance burden? -- John Baldwin From owner-svn-src-all@freebsd.org Tue Mar 3 00:20:12 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 4148225FAF1; Tue, 3 Mar 2020 00:20:12 +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 48Wd240b17z4CZK; Tue, 3 Mar 2020 00:20:12 +0000 (UTC) (envelope-from cem@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id F40D224840; Tue, 3 Mar 2020 00:20:11 +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 0230KBFQ002397; Tue, 3 Mar 2020 00:20:11 GMT (envelope-from cem@FreeBSD.org) Received: (from cem@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 0230K9h2002380; Tue, 3 Mar 2020 00:20:09 GMT (envelope-from cem@FreeBSD.org) Message-Id: <202003030020.0230K9h2002380@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: cem set sender to cem@FreeBSD.org using -f From: Conrad Meyer Date: Tue, 3 Mar 2020 00:20:09 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r358562 - in head: . share/man/man5 share/man/man7 tools/build/options tools/tools/nanobsd/dhcpd tools/tools/nanobsd/embedded usr.bin usr.bin/calendar usr.bin/calendar/calendars usr.bin... X-SVN-Group: head X-SVN-Commit-Author: cem X-SVN-Commit-Paths: in head: . share/man/man5 share/man/man7 tools/build/options tools/tools/nanobsd/dhcpd tools/tools/nanobsd/embedded usr.bin usr.bin/calendar usr.bin/calendar/calendars usr.bin/calendar/calendars/de_AT... X-SVN-Commit-Revision: 358562 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages 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, 03 Mar 2020 00:20:12 -0000 Author: cem Date: Tue Mar 3 00:20:08 2020 New Revision: 358562 URL: https://svnweb.freebsd.org/changeset/base/358562 Log: Add extremely useful calendar(1) application to FreeBSD It does extremely useful things like execute sendmail and spew dubiously accurate factoids. From the feedback, it seems like it is an essential utility in a modern unix and not at all a useless bikeshed. How do those Linux people live without it? Reverts r358561. Added: head/tools/build/options/WITHOUT_CALENDAR - copied unchanged from r358560, head/tools/build/options/WITHOUT_CALENDAR head/usr.bin/calendar/Makefile - copied unchanged from r358560, head/usr.bin/calendar/Makefile head/usr.bin/calendar/Makefile.depend - copied unchanged from r358560, head/usr.bin/calendar/Makefile.depend head/usr.bin/calendar/calendar.1 - copied unchanged from r358560, head/usr.bin/calendar/calendar.1 head/usr.bin/calendar/calendar.c - copied unchanged from r358560, head/usr.bin/calendar/calendar.c head/usr.bin/calendar/calendar.h - copied unchanged from r358560, head/usr.bin/calendar/calendar.h head/usr.bin/calendar/calendars/calendar.all - copied unchanged from r358560, head/usr.bin/calendar/calendars/calendar.all head/usr.bin/calendar/calendars/calendar.australia - copied unchanged from r358560, head/usr.bin/calendar/calendars/calendar.australia head/usr.bin/calendar/calendars/calendar.birthday - copied unchanged from r358560, head/usr.bin/calendar/calendars/calendar.birthday head/usr.bin/calendar/calendars/calendar.brazilian - copied unchanged from r358560, head/usr.bin/calendar/calendars/calendar.brazilian head/usr.bin/calendar/calendars/calendar.christian - copied unchanged from r358560, head/usr.bin/calendar/calendars/calendar.christian head/usr.bin/calendar/calendars/calendar.computer - copied unchanged from r358560, head/usr.bin/calendar/calendars/calendar.computer head/usr.bin/calendar/calendars/calendar.croatian - copied unchanged from r358560, head/usr.bin/calendar/calendars/calendar.croatian head/usr.bin/calendar/calendars/calendar.dutch - copied unchanged from r358560, head/usr.bin/calendar/calendars/calendar.dutch head/usr.bin/calendar/calendars/calendar.french - copied unchanged from r358560, head/usr.bin/calendar/calendars/calendar.french head/usr.bin/calendar/calendars/calendar.german - copied unchanged from r358560, head/usr.bin/calendar/calendars/calendar.german head/usr.bin/calendar/calendars/calendar.history - copied unchanged from r358560, head/usr.bin/calendar/calendars/calendar.history head/usr.bin/calendar/calendars/calendar.holiday - copied unchanged from r358560, head/usr.bin/calendar/calendars/calendar.holiday head/usr.bin/calendar/calendars/calendar.hungarian - copied unchanged from r358560, head/usr.bin/calendar/calendars/calendar.hungarian head/usr.bin/calendar/calendars/calendar.judaic - copied unchanged from r358560, head/usr.bin/calendar/calendars/calendar.judaic head/usr.bin/calendar/calendars/calendar.lotr - copied unchanged from r358560, head/usr.bin/calendar/calendars/calendar.lotr head/usr.bin/calendar/calendars/calendar.music - copied unchanged from r358560, head/usr.bin/calendar/calendars/calendar.music head/usr.bin/calendar/calendars/calendar.newzealand - copied unchanged from r358560, head/usr.bin/calendar/calendars/calendar.newzealand head/usr.bin/calendar/calendars/calendar.russian - copied unchanged from r358560, head/usr.bin/calendar/calendars/calendar.russian head/usr.bin/calendar/calendars/calendar.southafrica - copied unchanged from r358560, head/usr.bin/calendar/calendars/calendar.southafrica head/usr.bin/calendar/calendars/calendar.ukrainian - copied unchanged from r358560, head/usr.bin/calendar/calendars/calendar.ukrainian head/usr.bin/calendar/calendars/calendar.usholiday - copied unchanged from r358560, head/usr.bin/calendar/calendars/calendar.usholiday head/usr.bin/calendar/calendars/calendar.world - copied unchanged from r358560, head/usr.bin/calendar/calendars/calendar.world head/usr.bin/calendar/calendars/de_AT.ISO_8859-15/ - copied from r358560, head/usr.bin/calendar/calendars/de_AT.ISO_8859-15/ head/usr.bin/calendar/calendars/de_DE.ISO8859-1/ - copied from r358560, head/usr.bin/calendar/calendars/de_DE.ISO8859-1/ head/usr.bin/calendar/calendars/fr_FR.ISO8859-1/ - copied from r358560, head/usr.bin/calendar/calendars/fr_FR.ISO8859-1/ head/usr.bin/calendar/calendars/hr_HR.ISO8859-2/ - copied from r358560, head/usr.bin/calendar/calendars/hr_HR.ISO8859-2/ head/usr.bin/calendar/calendars/hu_HU.ISO8859-2/ - copied from r358560, head/usr.bin/calendar/calendars/hu_HU.ISO8859-2/ head/usr.bin/calendar/calendars/pt_BR.ISO8859-1/ - copied from r358560, head/usr.bin/calendar/calendars/pt_BR.ISO8859-1/ head/usr.bin/calendar/calendars/pt_BR.UTF-8/ - copied from r358560, head/usr.bin/calendar/calendars/pt_BR.UTF-8/ head/usr.bin/calendar/calendars/ru_RU.KOI8-R/ - copied from r358560, head/usr.bin/calendar/calendars/ru_RU.KOI8-R/ head/usr.bin/calendar/calendars/ru_RU.UTF-8/ - copied from r358560, head/usr.bin/calendar/calendars/ru_RU.UTF-8/ head/usr.bin/calendar/calendars/uk_UA.KOI8-U/ - copied from r358560, head/usr.bin/calendar/calendars/uk_UA.KOI8-U/ head/usr.bin/calendar/dates.c - copied unchanged from r358560, head/usr.bin/calendar/dates.c head/usr.bin/calendar/day.c - copied unchanged from r358560, head/usr.bin/calendar/day.c head/usr.bin/calendar/events.c - copied unchanged from r358560, head/usr.bin/calendar/events.c head/usr.bin/calendar/io.c - copied unchanged from r358560, head/usr.bin/calendar/io.c head/usr.bin/calendar/locale.c - copied unchanged from r358560, head/usr.bin/calendar/locale.c head/usr.bin/calendar/ostern.c - copied unchanged from r358560, head/usr.bin/calendar/ostern.c head/usr.bin/calendar/parsedata.c - copied unchanged from r358560, head/usr.bin/calendar/parsedata.c head/usr.bin/calendar/paskha.c - copied unchanged from r358560, head/usr.bin/calendar/paskha.c head/usr.bin/calendar/pathnames.h - copied unchanged from r358560, head/usr.bin/calendar/pathnames.h head/usr.bin/calendar/pom.c - copied unchanged from r358560, head/usr.bin/calendar/pom.c head/usr.bin/calendar/sunpos.c - copied unchanged from r358560, head/usr.bin/calendar/sunpos.c head/usr.bin/calendar/tests/ - copied from r358560, head/usr.bin/calendar/tests/ head/usr.sbin/periodic/etc/daily/300.calendar - copied unchanged from r358560, head/usr.sbin/periodic/etc/daily/300.calendar Modified: head/ObsoleteFiles.inc head/share/man/man5/periodic.conf.5 head/share/man/man5/src.conf.5 head/share/man/man7/hier.7 head/tools/tools/nanobsd/dhcpd/common head/tools/tools/nanobsd/embedded/common head/usr.bin/Makefile head/usr.bin/leave/leave.1 head/usr.sbin/periodic/etc/daily/Makefile head/usr.sbin/periodic/periodic.conf Modified: head/ObsoleteFiles.inc ============================================================================== --- head/ObsoleteFiles.inc Mon Mar 2 23:37:47 2020 (r358561) +++ head/ObsoleteFiles.inc Tue Mar 3 00:20:08 2020 (r358562) @@ -36,11 +36,6 @@ # xargs -n1 | sort | uniq -d; # done -# 20200302: calendar(1) removed -OLD_DIRS+=usr/share/calendar -OLD_FILES+=usr/bin/calendar -OLD_FILES+=usr/share/man/man1/calendar.1.gz - # 20200301: bktr removed OLD_DIRS+=usr/include/dev/bktr OLD_FILES+=usr/include/dev/bktr/ioctl_bktr.h Modified: head/share/man/man5/periodic.conf.5 ============================================================================== --- head/share/man/man5/periodic.conf.5 Mon Mar 2 23:37:47 2020 (r358561) +++ head/share/man/man5/periodic.conf.5 Tue Mar 3 00:20:08 2020 (r358562) @@ -273,6 +273,13 @@ Set to if you want the .Pa /etc/mail/aliases file backed up and modifications to be displayed in your daily output. +.It Va daily_calendar_enable +.Pq Vt bool +Set to +.Dq Li YES +if you want to run +.Nm calendar Fl a +daily. .It Va daily_accounting_enable .Pq Vt bool Set to @@ -963,6 +970,7 @@ is shared or distributed. .El .Sh SEE ALSO .Xr apropos 1 , +.Xr calendar 1 , .Xr df 1 , .Xr diff 1 , .Xr gzip 1 , Modified: head/share/man/man5/src.conf.5 ============================================================================== --- head/share/man/man5/src.conf.5 Mon Mar 2 23:37:47 2020 (r358561) +++ head/share/man/man5/src.conf.5 Tue Mar 3 00:20:08 2020 (r358562) @@ -271,6 +271,9 @@ is set explicitly) .El .It Va WITHOUT_BZIP2_SUPPORT Set to build some programs without optional bzip2 support. +.It Va WITHOUT_CALENDAR +Set to not build +.Xr calendar 1 . .It Va WITHOUT_CAPSICUM Set to not build Capsicum support into system programs. When set, it enforces these options: Modified: head/share/man/man7/hier.7 ============================================================================== --- head/share/man/man7/hier.7 Mon Mar 2 23:37:47 2020 (r358561) +++ head/share/man/man7/hier.7 Tue Mar 3 00:20:08 2020 (r358562) @@ -442,6 +442,10 @@ system daemons & system utilities (executed by users) architecture-independent files .Pp .Bl -tag -width Fl -compact +.It Pa calendar/ +a variety of pre-fab calendar files; +see +.Xr calendar 1 .It Pa dict/ word lists; see Copied: head/tools/build/options/WITHOUT_CALENDAR (from r358560, head/tools/build/options/WITHOUT_CALENDAR) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/tools/build/options/WITHOUT_CALENDAR Tue Mar 3 00:20:08 2020 (r358562, copy of r358560, head/tools/build/options/WITHOUT_CALENDAR) @@ -0,0 +1,3 @@ +.\" $FreeBSD$ +Set to not build +.Xr calendar 1 . Modified: head/tools/tools/nanobsd/dhcpd/common ============================================================================== --- head/tools/tools/nanobsd/dhcpd/common Mon Mar 2 23:37:47 2020 (r358561) +++ head/tools/tools/nanobsd/dhcpd/common Tue Mar 3 00:20:08 2020 (r358562) @@ -104,6 +104,7 @@ WITHOUT_ACPI=true WITHOUT_ATM=true WITHOUT_AUDIT=true WITHOUT_BLUETOOTH=true +WITHOUT_CALENDAR=true WITHOUT_DICT=true WITHOUT_EXAMPLES=true WITHOUT_GAMES=true Modified: head/tools/tools/nanobsd/embedded/common ============================================================================== --- head/tools/tools/nanobsd/embedded/common Mon Mar 2 23:37:47 2020 (r358561) +++ head/tools/tools/nanobsd/embedded/common Tue Mar 3 00:20:08 2020 (r358562) @@ -135,6 +135,7 @@ WITHOUT_ACPI=true WITHOUT_ATM=true WITHOUT_AUDIT=true WITHOUT_BLUETOOTH=true +WITHOUT_CALENDAR=true WITHOUT_DICT=true WITHOUT_EXAMPLES=true WITHOUT_GAMES=true Modified: head/usr.bin/Makefile ============================================================================== --- head/usr.bin/Makefile Mon Mar 2 23:37:47 2020 (r358561) +++ head/usr.bin/Makefile Tue Mar 3 00:20:08 2020 (r358562) @@ -195,6 +195,7 @@ SUBDIR.${MK_AT}+= at SUBDIR.${MK_ATM}+= atm SUBDIR.${MK_BLUETOOTH}+= bluetooth SUBDIR.${MK_BSD_CPIO}+= cpio +SUBDIR.${MK_CALENDAR}+= calendar SUBDIR.${MK_CLANG}+= clang SUBDIR.${MK_DIALOG}+= dpv SUBDIR.${MK_EE}+= ee Copied: head/usr.bin/calendar/Makefile (from r358560, head/usr.bin/calendar/Makefile) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/usr.bin/calendar/Makefile Tue Mar 3 00:20:08 2020 (r358562, copy of r358560, head/usr.bin/calendar/Makefile) @@ -0,0 +1,117 @@ +# @(#)Makefile 8.1 (Berkeley) 6/6/93 +# $FreeBSD$ + +.include + +PROG= calendar +SRCS= calendar.c locale.c events.c dates.c parsedata.c io.c day.c \ + ostern.c paskha.c pom.c sunpos.c +LIBADD= m util +INTER= de_AT.ISO_8859-15 de_DE.ISO8859-1 fr_FR.ISO8859-1 \ + hr_HR.ISO8859-2 hu_HU.ISO8859-2 pt_BR.ISO8859-1 \ + pt_BR.UTF-8 ru_RU.KOI8-R ru_RU.UTF-8 uk_UA.KOI8-U +DE_LINKS= de_DE.ISO8859-15 +FR_LINKS= fr_FR.ISO8859-15 + +.if ${MK_ICONV} == "yes" +CFLAGS+= -DWITH_ICONV +.endif + +FILESGROUPS+= CALS +CALS= calendars/calendar.all \ + calendars/calendar.australia \ + calendars/calendar.birthday \ + calendars/calendar.brazilian \ + calendars/calendar.christian \ + calendars/calendar.computer \ + calendars/calendar.croatian \ + calendars/calendar.dutch \ + calendars/calendar.freebsd \ + calendars/calendar.french \ + calendars/calendar.german \ + calendars/calendar.history \ + calendars/calendar.holiday \ + calendars/calendar.hungarian \ + calendars/calendar.judaic \ + calendars/calendar.lotr \ + calendars/calendar.music \ + calendars/calendar.newzealand \ + calendars/calendar.russian \ + calendars/calendar.southafrica \ + calendars/calendar.ukrainian \ + calendars/calendar.usholiday \ + calendars/calendar.world +CALSDIR= ${SHAREDIR}/calendar + +CAL_de_AT.ISO_8859-15= calendar.feiertag + +CAL_de_DE.ISO8859-1= calendar.all \ + calendar.feiertag \ + calendar.geschichte \ + calendar.kirche \ + calendar.literatur \ + calendar.musik \ + calendar.wissenschaft + +CAL_fr_FR.ISO8859-1= calendar.all \ + calendar.fetes \ + calendar.french \ + calendar.jferies \ + calendar.proverbes + +CAL_hr_HR.ISO8859-2= calendar.all \ + calendar.praznici + +CAL_hu_HU.ISO8859-2= calendar.all \ + calendar.nevnapok \ + calendar.unnepek + +CAL_pt_BR.ISO8859-1= calendar.all \ + calendar.commemorative \ + calendar.holidays \ + calendar.mcommemorative + +CAL_pt_BR.UTF-8= calendar.all \ + calendar.commemorative \ + calendar.holidays \ + calendar.mcommemorative + +CAL_ru_RU.KOI8-R= calendar.all \ + calendar.common \ + calendar.holiday \ + calendar.military \ + calendar.orthodox \ + calendar.pagan + +CAL_ru_RU.UTF-8= calendar.all \ + calendar.common \ + calendar.holiday \ + calendar.military \ + calendar.orthodox \ + calendar.pagan + +CAL_uk_UA.KOI8-U= calendar.all \ + calendar.holiday \ + calendar.misc \ + calendar.orthodox + +.for lang in ${INTER} +FILESGROUPS+= CALS_${lang} +CALS_${lang}DIR= ${SHAREDIR}/calendar/${lang} +.for file in ${CAL_${lang}} +CALS_${lang}+= ${file:S@^@calendars/${lang}/@} +.endfor +.endfor + + +.for link in ${DE_LINKS} +SYMLINKS+= de_DE.ISO8859-1 ${SHAREDIR}/calendar/${link} +.endfor +.for link in ${FR_LINKS} +SYMLINKS+= fr_FR.ISO8859-1 ${SHAREDIR}/calendar/${link} +.endfor + +HAS_TESTS= +SUBDIR.${MK_TESTS}+= tests + +.include Copied: head/usr.bin/calendar/Makefile.depend (from r358560, head/usr.bin/calendar/Makefile.depend) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/usr.bin/calendar/Makefile.depend Tue Mar 3 00:20:08 2020 (r358562, copy of r358560, head/usr.bin/calendar/Makefile.depend) @@ -0,0 +1,18 @@ +# $FreeBSD$ +# Autogenerated - do NOT edit! + +DIRDEPS = \ + gnu/lib/csu \ + include \ + include/xlocale \ + lib/${CSU_DIR} \ + lib/libc \ + lib/libcompiler_rt \ + lib/msun \ + + +.include + +.if ${DEP_RELDIR} == ${_DEP_RELDIR} +# local dependencies - needed for -jN in clean tree +.endif Copied: head/usr.bin/calendar/calendar.1 (from r358560, head/usr.bin/calendar/calendar.1) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/usr.bin/calendar/calendar.1 Tue Mar 3 00:20:08 2020 (r358562, copy of r358560, head/usr.bin/calendar/calendar.1) @@ -0,0 +1,333 @@ +.\" Copyright (c) 1989, 1990, 1993 +.\" The Regents of the University of California. 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. +.\" 3. Neither the name of the University nor the names of its contributors +.\" may be used to endorse or promote products derived from this software +.\" without specific prior written permission. +.\" +.\" THIS SOFTWARE IS PROVIDED BY THE REGENTS 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 REGENTS 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. +.\" +.\" @(#)calendar.1 8.1 (Berkeley) 6/29/93 +.\" $FreeBSD$ +.\" +.Dd July 24, 2016 +.Dt CALENDAR 1 +.Os +.Sh NAME +.Nm calendar +.Nd reminder service +.Sh SYNOPSIS +.Nm +.Op Fl A Ar num +.Op Fl a +.Op Fl B Ar num +.Op Fl D Ar moon|sun +.Op Fl d +.Op Fl F Ar friday +.Op Fl f Ar calendarfile +.Op Fl l Ar longitude +.Oo +.Bk -words +.Fl t Ar dd Ns +.Sm off +.Op . Ar mm Op . Ar year +.Sm on +.Ek +.Oc +.Op Fl U Ar UTC-offset +.Op Fl W Ar num +.Sh DESCRIPTION +The +.Nm +utility checks the current directory for a file named +.Pa calendar +and displays lines that fall into the specified date range. +On the day before a weekend (normally Friday), events for the next +three days are displayed. +.Pp +The following options are available: +.Bl -tag -width Ds +.It Fl A Ar num +Print lines from today and the next +.Ar num +days (forward, future). +.It Fl a +Process the ``calendar'' files of all users and mail the results +to them. +This requires super-user privileges. +.It Fl B Ar num +Print lines from today and the previous +.Ar num +days (backward, past). +.It Fl D Ar moon|sun +Print UTC offset, longitude and moon or sun information. +.It Fl d +Debug option: print current date information. +.It Fl F Ar friday +Specify which day of the week is ``Friday'' (the day before the +weekend begins). +Default is 5. +.It Fl f Pa calendarfile +Use +.Pa calendarfile +as the default calendar file. +.It Fl l Ar longitude +Perform lunar and solar calculations from this longitude. +If neither longitude nor UTC offset is specified, the calculations will +be based on the difference between UTC time and localtime. +If both are specified, UTC offset overrides longitude. +.It Xo Fl t +.Sm off +.Ar dd +.Op . Ar mm Op . Ar year +.Sm on +.Xc +For test purposes only: set date directly to argument values. +.It Fl U Ar UTC-offset +Perform lunar and solar calculations from this UTC offset. +If neither UTC offset nor longitude is specified, the calculations +will be based on the difference between UTC time and localtime. +If both are specified, UTC offset overrides longitude. +.It Fl W Ar num +Print lines from today and the next +.Ar num +days (forward, future). +Ignore weekends when calculating the number of days. +.El +.Sh FILE FORMAT +To handle calendars in your national code table you can specify +.Dq LANG= +in the calendar file as early as possible. +.Pp +To handle the local name of sequences, you can specify them as: +.Dq SEQUENCE= +in the calendar file as early as possible. +.Pp +The names of the following special days are recognized: +.Bl -tag -width 123456789012345 -compact +.It Easter +Catholic Easter. +.It Paskha +Orthodox Easter. +.It NewMoon +The lunar New Moon. +.It FullMoon +The lunar Full Moon. +.It MarEquinox +The solar equinox in March. +.It JunSolstice +The solar solstice in June. +.It SepEquinox +The solar equinox in September. +.It DecSolstice +The solar solstice in December. +.It ChineseNewYear +The first day of the Chinese year. +.El +These names may be reassigned to their local names via an assignment +like +.Dq Easter=Pasen +in the calendar file. +.Pp +Other lines should begin with a month and day. +They may be entered in almost any format, either numeric or as character +strings. +If the proper locale is set, national month and weekday +names can be used. +A single asterisk (``*'') matches every month. +A day without a month matches that day of every week. +A month without a day matches the first of that month. +Two numbers default to the month followed by the day. +Lines with leading tabs default to the last entered date, allowing +multiple line specifications for a single date. +.Pp +The names of the recognized special days may be followed by a +positive or negative integer, like: +.Dq Easter+3 +or +.Dq Paskha-4 . +.Pp +Weekdays may be followed by ``-4'' ...\& ``+5'' (aliases for +last, first, second, third, fourth) for moving events like +``the last Monday in April''. +.Pp +By convention, dates followed by an asterisk are not fixed, i.e., change +from year to year. +.Pp +Day descriptions start after the first character in the line; +if the line does not contain a character, it is not displayed. +If the first character in the line is a character, it is treated as +a continuation of the previous line. +.Pp +The +.Nm +file is preprocessed by a limited subset of +.Xr cpp 1 +internally, allowing the inclusion of shared files such as +lists of company holidays or meetings. +This limited subset consists of \fB#include #ifndef #endif\fR and \fB#define\fR. +If the shared file is not referenced by a full pathname, +.Xr calendar 1 +searches in the current (or home) directory first, and then in the +directory +.Pa /usr/share/calendar . +Empty lines and lines protected by the C commenting syntax +.Pq Li /* ... */ +are ignored. +.Pp +Some possible calendar entries ( characters highlighted by +\fB\et\fR sequence) +.Bd -unfilled -offset indent +LANG=C +Easter=Ostern + +#include +#include + +6/15\fB\et\fRJune 15 (if ambiguous, will default to month/day). +Jun. 15\fB\et\fRJune 15. +15 June\fB\et\fRJune 15. +Thursday\fB\et\fREvery Thursday. +June\fB\et\fREvery June 1st. +15 *\fB\et\fR15th of every month. +2010/4/15\fB\et\fR15 April 2010 + +May Sun+2\fB\et\fRsecond Sunday in May (Muttertag) +04/SunLast\fB\et\fRlast Sunday in April, +\fB\et\fRsummer time in Europe +Easter\fB\et\fREaster +Ostern-2\fB\et\fRGood Friday (2 days before Easter) +Paskha\fB\et\fROrthodox Easter + +.Ed +.Sh FILES +.Bl -tag -width calendar.christian -compact +.It Pa calendar +file in current directory. +.It Pa ~/.calendar +.Pa calendar +HOME directory. +A chdir is done into this directory if it exists. +.It Pa ~/.calendar/calendar +calendar file to use if no calendar file exists in the current directory. +.It Pa ~/.calendar/nomail +do not send mail if this file exists. +.El +.Pp +The following default calendar files are provided in +.Pa /usr/share/calendar: +.Pp +.Bl -tag -width calendar.southafrica -compact +.It Pa calendar.all +File which includes all the default files. +.It Pa calendar.australia +Calendar of events in Australia. +.It Pa calendar.birthday +Births and deaths of famous (and not-so-famous) people. +.It Pa calendar.christian +Christian holidays. +This calendar should be updated yearly by the local system administrator +so that roving holidays are set correctly for the current year. +.It Pa calendar.computer +Days of special significance to computer people. +.It Pa calendar.croatian +Calendar of events in Croatia. +.It Pa calendar.dutch +Calendar of events in the Netherlands. +.It Pa calendar.freebsd +Birthdays of +.Fx +committers. +.It Pa calendar.french +Calendar of events in France. +.It Pa calendar.german +Calendar of events in Germany. +.It Pa calendar.history +Everything else, mostly U.S.\& historical events. +.It Pa calendar.holiday +Other holidays, including the not-well-known, obscure, and +.Em really +obscure. +.It Pa calendar.judaic +Jewish holidays. +The entries for this calendar have been obtained from the port +deskutils/hebcal. +.It Pa calendar.music +Musical events, births, and deaths. +Strongly oriented toward rock 'n' roll. +.It Pa calendar.newzealand +Calendar of events in New Zealand. +.It Pa calendar.russian +Russian calendar. +.It Pa calendar.southafrica +Calendar of events in South Africa. +.It Pa calendar.usholiday +U.S.\& holidays. +This calendar should be updated yearly by the local system administrator +so that roving holidays are set correctly for the current year. +.It Pa calendar.world +Includes all calendar files except for national files. +.El +.Sh COMPATIBILITY +The +.Nm +program previously selected lines which had the correct date anywhere +in the line. +This is no longer true, the date is only recognized when it occurs +at the beginning of a line. +.Sh SEE ALSO +.Xr at 1 , +.Xr mail 1 , +.Xr cron 8 +.Sh HISTORY +A +.Nm +command appeared in +.At v7 . +.Sh NOTES +Chinese New Year is calculated at 120 degrees east of Greenwich, +which roughly corresponds with the east coast of China. +For people west of China, this might result that the start of Chinese +New Year and the day of the related new moon might differ. +.Pp +The phases of the moon and the longitude of the sun are calculated +against the local position which corresponds with 30 degrees times +the time-difference towards Greenwich. +.Pp +The new and full moons are happening on the day indicated: They +might happen in the time period in the early night or in the late +evening. +It does not indicate that they are starting in the night on that date. +.Pp +Because of minor differences between the output of the formulas +used and other sources on the Internet, Druids and Werewolves should +double-check the start and end time of solar and lunar events. +.Sh BUGS +The +.Nm +internal cpp does not correctly do #ifndef and will discard the rest +of the file if a #ifndef is triggered. +It also has a maximum of 50 include file and/or 100 #defines +and only recognises #include, #define and +#ifndef. +.Pp +There is no possibility to properly specify the local position +needed for solar and lunar calculations. Copied: head/usr.bin/calendar/calendar.c (from r358560, head/usr.bin/calendar/calendar.c) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/usr.bin/calendar/calendar.c Tue Mar 3 00:20:08 2020 (r358562, copy of r358560, head/usr.bin/calendar/calendar.c) @@ -0,0 +1,258 @@ +/*- + * SPDX-License-Identifier: BSD-3-Clause + * + * Copyright (c) 1989, 1993, 1994 + * The Regents of the University of California. 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. + * 3. Neither the name of the University nor the names of its contributors + * may be used to endorse or promote products derived from this software + * without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE REGENTS 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 REGENTS 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. + */ + +#ifndef lint +static const char copyright[] = +"@(#) Copyright (c) 1989, 1993\n\ + The Regents of the University of California. All rights reserved.\n"; +#endif + +#if 0 +#ifndef lint +static char sccsid[] = "@(#)calendar.c 8.3 (Berkeley) 3/25/94"; +#endif +#endif + +#include +__FBSDID("$FreeBSD$"); + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include "calendar.h" + +#define UTCOFFSET_NOTSET 100 /* Expected between -24 and +24 */ +#define LONGITUDE_NOTSET 1000 /* Expected between -360 and +360 */ + +struct passwd *pw; +int doall = 0; +int debug = 0; +static char *DEBUG = NULL; +static time_t f_time = 0; +double UTCOffset = UTCOFFSET_NOTSET; +int EastLongitude = LONGITUDE_NOTSET; +#ifdef WITH_ICONV +const char *outputEncoding = NULL; +#endif + +static void usage(void) __dead2; + +int +main(int argc, char *argv[]) +{ + int f_dayAfter = 0; /* days after current date */ + int f_dayBefore = 0; /* days before current date */ + int Friday = 5; /* day before weekend */ + + int ch; + struct tm tp1, tp2; + + (void)setlocale(LC_ALL, ""); + + while ((ch = getopt(argc, argv, "-A:aB:D:dF:f:l:t:U:W:?")) != -1) + switch (ch) { + case '-': /* backward contemptible */ + case 'a': + if (getuid()) { + errno = EPERM; + err(1, NULL); + } + doall = 1; + break; + + case 'W': /* we don't need no steenking Fridays */ + Friday = -1; + /* FALLTHROUGH */ + + case 'A': /* days after current date */ + f_dayAfter = atoi(optarg); + if (f_dayAfter < 0) + errx(1, "number of days must be positive"); + break; + + case 'B': /* days before current date */ + f_dayBefore = atoi(optarg); + if (f_dayBefore < 0) + errx(1, "number of days must be positive"); + break; + + case 'D': /* debug output of sun and moon info */ + DEBUG = optarg; + break; + + case 'd': /* debug output of current date */ + debug = 1; + break; + + case 'F': /* Change the time: When does weekend start? */ + Friday = atoi(optarg); + break; + + case 'f': /* other calendar file */ + calendarFile = optarg; + break; + + case 'l': /* Change longitudal position */ + EastLongitude = strtol(optarg, NULL, 10); + break; + + case 't': /* other date, for tests */ + f_time = Mktime(optarg); + break; + + case 'U': /* Change UTC offset */ + UTCOffset = strtod(optarg, NULL); + break; + + case '?': + default: + usage(); + } + + argc -= optind; + argv += optind; + + if (argc) + usage(); + + /* use current time */ + if (f_time <= 0) + (void)time(&f_time); + + /* if not set, determine where I could be */ + { + if (UTCOffset == UTCOFFSET_NOTSET && + EastLongitude == LONGITUDE_NOTSET) { + /* Calculate on difference between here and UTC */ + time_t t; + struct tm tm; + long utcoffset, hh, mm, ss; + double uo; + + time(&t); + localtime_r(&t, &tm); + utcoffset = tm.tm_gmtoff; + /* seconds -> hh:mm:ss */ + hh = utcoffset / SECSPERHOUR; + utcoffset %= SECSPERHOUR; + mm = utcoffset / SECSPERMINUTE; + utcoffset %= SECSPERMINUTE; + ss = utcoffset; + + /* hh:mm:ss -> hh.mmss */ + uo = mm + (100.0 * (ss / 60.0)); + uo /= 60.0 / 100.0; + uo = hh + uo / 100; + + UTCOffset = uo; + EastLongitude = UTCOffset * 15; + } else if (UTCOffset == UTCOFFSET_NOTSET) { + /* Base on information given */ + UTCOffset = EastLongitude / 15; + } else if (EastLongitude == LONGITUDE_NOTSET) { + /* Base on information given */ + EastLongitude = UTCOffset * 15; + } + } + + settimes(f_time, f_dayBefore, f_dayAfter, Friday, &tp1, &tp2); + generatedates(&tp1, &tp2); + + /* + * FROM now on, we are working in UTC. + * This will only affect moon and sun related events anyway. + */ + if (setenv("TZ", "UTC", 1) != 0) + errx(1, "setenv: %s", strerror(errno)); + tzset(); + + if (debug) + dumpdates(); + + if (DEBUG != NULL) { + dodebug(DEBUG); + exit(0); + } + + if (doall) + while ((pw = getpwent()) != NULL) { + pid_t pid; + + if (chdir(pw->pw_dir) == -1) + continue; + pid = fork(); + if (pid < 0) + err(1, "fork"); + if (pid == 0) { + login_cap_t *lc; + + lc = login_getpwclass(pw); + if (setusercontext(lc, pw, pw->pw_uid, + LOGIN_SETALL) != 0) + errx(1, "setusercontext"); + cal(); + exit(0); + } + } + else { +#ifdef WITH_ICONV + /* Save the information about the encoding used in the terminal. */ + outputEncoding = strdup(nl_langinfo(CODESET)); + if (outputEncoding == NULL) + errx(1, "cannot allocate memory"); +#endif + cal(); + } + exit(0); +} + + +static void __dead2 +usage(void) +{ + + fprintf(stderr, "%s\n%s\n%s\n", + "usage: calendar [-A days] [-a] [-B days] [-D sun|moon] [-d]", + " [-F friday] [-f calendarfile] [-l longitude]", + " [-t dd[.mm[.year]]] [-U utcoffset] [-W days]" + ); + exit(1); +} Copied: head/usr.bin/calendar/calendar.h (from r358560, head/usr.bin/calendar/calendar.h) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/usr.bin/calendar/calendar.h Tue Mar 3 00:20:08 2020 (r358562, copy of r358560, head/usr.bin/calendar/calendar.h) @@ -0,0 +1,206 @@ +/*- + * SPDX-License-Identifier: BSD-3-Clause + * + * Copyright (c) 1989, 1993, 1994 + * The Regents of the University of California. 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. + * 3. Neither the name of the University nor the names of its contributors + * may be used to endorse or promote products derived from this software + * without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE REGENTS 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 REGENTS 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$ + */ + +#include +#include + +#define SECSPERDAY (24 * 60 * 60) +#define SECSPERHOUR (60 * 60) +#define SECSPERMINUTE (60) +#define MINSPERHOUR (60) +#define HOURSPERDAY (24) +#define FSECSPERDAY (24.0 * 60.0 * 60.0) +#define FSECSPERHOUR (60.0 * 60.0) +#define FSECSPERMINUTE (60.0) +#define FMINSPERHOUR (60.0) +#define FHOURSPERDAY (24.0) + +#define DAYSPERYEAR 365 +#define DAYSPERLEAPYEAR 366 + +/* Not yet categorized */ + +extern struct passwd *pw; +extern int doall; +extern time_t t1, t2; +extern const char *calendarFile; +extern int yrdays; +extern struct fixs neaster, npaskha, ncny, nfullmoon, nnewmoon; +extern struct fixs nmarequinox, nsepequinox, njunsolstice, ndecsolstice; +extern double UTCOffset; +extern int EastLongitude; +#ifdef WITH_ICONV +extern const char *outputEncoding; +#endif + +#define isleap(y) ((((y) % 4) == 0 && ((y) % 100) != 0) || ((y) % 400) == 0) + +/* Flags to determine the returned values by determinestyle() in parsedata.c */ +#define F_NONE 0x00000 +#define F_MONTH 0x00001 +#define F_DAYOFWEEK 0x00002 +#define F_DAYOFMONTH 0x00004 +#define F_MODIFIERINDEX 0x00008 +#define F_MODIFIEROFFSET 0x00010 +#define F_SPECIALDAY 0x00020 +#define F_ALLMONTH 0x00040 +#define F_ALLDAY 0x00080 +#define F_VARIABLE 0x00100 +#define F_EASTER 0x00200 +#define F_CNY 0x00400 +#define F_PASKHA 0x00800 +#define F_NEWMOON 0x01000 +#define F_FULLMOON 0x02000 +#define F_MAREQUINOX 0x04000 +#define F_SEPEQUINOX 0x08000 +#define F_JUNSOLSTICE 0x10000 +#define F_DECSOLSTICE 0x20000 +#define F_YEAR 0x40000 + +#define STRING_EASTER "Easter" +#define STRING_PASKHA "Paskha" +#define STRING_CNY "ChineseNewYear" +#define STRING_NEWMOON "NewMoon" +#define STRING_FULLMOON "FullMoon" +#define STRING_MAREQUINOX "MarEquinox" +#define STRING_SEPEQUINOX "SepEquinox" +#define STRING_JUNSOLSTICE "JunSolstice" +#define STRING_DECSOLSTICE "DecSolstice" + +#define MAXCOUNT 125 /* Random number of maximum number of + * repeats of an event. Should be 52 + * (number of weeks per year), if you + * want to show two years then it + * should be 104. If you are seeing + * more than this you are using this + * program wrong. + */ + +/* + * All the astronomical calculations are carried out for the meridian 120 + * degrees east of Greenwich. + */ +#define UTCOFFSET_CNY 8.0 + +extern int debug; /* show parsing of the input */ +extern int year1, year2; + +/* events.c */ +/* + * Event sorting related functions: + * - Use event_add() to create a new event + * - Use event_continue() to add more text to the last added event + * - Use event_print_all() to display them in time chronological order + */ +struct event *event_add(int, int, int, char *, int, char *, char *); +void event_continue(struct event *events, char *txt); +void event_print_all(FILE *fp); +struct event { + int year; + int month; + int day; + int var; + char *date; + char *text; + char *extra; + struct event *next; +}; + +/* locale.c */ + +struct fixs { + char *name; + size_t len; +}; + +extern const char *days[]; +extern const char *fdays[]; +extern const char *fmonths[]; +extern const char *months[]; +extern const char *sequences[]; +extern struct fixs fndays[8]; /* full national days names */ +extern struct fixs fnmonths[13]; /* full national months names */ +extern struct fixs ndays[8]; /* short national days names */ +extern struct fixs nmonths[13]; /* short national month names */ +extern struct fixs nsequences[10]; + +void setnnames(void); +void setnsequences(char *); + +/* day.c */ *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@freebsd.org Tue Mar 3 00:28:39 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id A436A25FF94; Tue, 3 Mar 2020 00:28:39 +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 48WdCp3qJlz4Rn7; Tue, 3 Mar 2020 00:28:38 +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 3077B24A12; Tue, 3 Mar 2020 00:28:38 +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 0230SbGt008455; Tue, 3 Mar 2020 00:28:37 GMT (envelope-from markj@FreeBSD.org) Received: (from markj@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 0230Sb5X008454; Tue, 3 Mar 2020 00:28:37 GMT (envelope-from markj@FreeBSD.org) Message-Id: <202003030028.0230Sb5X008454@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: markj set sender to markj@FreeBSD.org using -f From: Mark Johnston Date: Tue, 3 Mar 2020 00:28:37 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r358563 - head/sys/kern X-SVN-Group: head X-SVN-Commit-Author: markj X-SVN-Commit-Paths: head/sys/kern X-SVN-Commit-Revision: 358563 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages 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, 03 Mar 2020 00:28:39 -0000 Author: markj Date: Tue Mar 3 00:28:37 2020 New Revision: 358563 URL: https://svnweb.freebsd.org/changeset/base/358563 Log: Fix the malloc type used in sys_shm_unlink() after r354808. PR: 244563 Reported by: swills Modified: head/sys/kern/uipc_shm.c Modified: head/sys/kern/uipc_shm.c ============================================================================== --- head/sys/kern/uipc_shm.c Tue Mar 3 00:20:08 2020 (r358562) +++ head/sys/kern/uipc_shm.c Tue Mar 3 00:28:37 2020 (r358563) @@ -961,7 +961,7 @@ sys_shm_unlink(struct thread *td, struct shm_unlink_ar sx_xlock(&shm_dict_lock); error = shm_remove(path, fnv, td->td_ucred); sx_xunlock(&shm_dict_lock); - free(path, M_TEMP); + free(path, M_SHMFD); return (error); } From owner-svn-src-all@freebsd.org Tue Mar 3 00:41:00 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 7FEFD2607B5; Tue, 3 Mar 2020 00:41:00 +0000 (UTC) (envelope-from steffen@sdaoden.eu) Received: from sdaoden.eu (sdaoden.eu [217.144.132.164]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 48WdV416W4z3xNx; Tue, 3 Mar 2020 00:40:59 +0000 (UTC) (envelope-from steffen@sdaoden.eu) Received: by sdaoden.eu (Postfix, from userid 1000) id 8DF2616054; Tue, 3 Mar 2020 01:40:52 +0100 (CET) Date: Tue, 03 Mar 2020 01:40:51 +0100 From: Steffen Nurpmeso To: Conrad Meyer Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r358562 - in head: . share/man/man5 share/man/man7 tools/build/options tools/tools/nanobsd/dhcpd tools/tools/nanobsd/embedded usr.bin usr.bin/calendar usr.bin/calendar/calendars usr.bin... Message-ID: <20200303004051.AtRkN%steffen@sdaoden.eu> In-Reply-To: <202003030020.0230K9h2002380@repo.freebsd.org> References: <202003030020.0230K9h2002380@repo.freebsd.org> Mail-Followup-To: Conrad Meyer , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org User-Agent: s-nail v14.9.17-52-g56288e6a OpenPGP: id=EE19E1C1F2F7054F8D3954D8308964B51883A0DD; url=https://ftp.sdaoden.eu/steffen.asc; preference=signencrypt BlahBlahBlah: Any stupid boy can crush a beetle. But all the professors in the world can make no bugs. X-Rspamd-Queue-Id: 48WdV416W4z3xNx X-Spamd-Bar: ----- Authentication-Results: mx1.freebsd.org; none X-Spamd-Result: default: False [-5.86 / 15.00]; NEURAL_HAM_MEDIUM(-0.86)[-0.862,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, 03 Mar 2020 00:41:00 -0000 Conrad Meyer wrote in <202003030020.0230K9h2002380@repo.freebsd.org>: |Author: cem |Date: Tue Mar 3 00:20:08 2020 |New Revision: 358562 |URL: https://svnweb.freebsd.org/changeset/base/358562 | |Log: | Add extremely useful calendar(1) application to FreeBSD | | It does extremely useful things like execute sendmail and spew dubiously | accurate factoids. | | From the feedback, it seems like it is an essential utility in a \ | modern unix | and not at all a useless bikeshed. How do those Linux people live \ | without it? They install the portable version as a package. --steffen | |Der Kragenbaer, The moon bear, |der holt sich munter he cheerfully and one by one |einen nach dem anderen runter wa.ks himself off |(By Robert Gernhardt) From owner-svn-src-all@freebsd.org Tue Mar 3 01:46:37 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 44CC426262A; Tue, 3 Mar 2020 01:46:37 +0000 (UTC) (envelope-from csjp@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 48Wfxm6jvgz4421; Tue, 3 Mar 2020 01:46:36 +0000 (UTC) (envelope-from csjp@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id A1216258DC; Tue, 3 Mar 2020 01:46:36 +0000 (UTC) (envelope-from csjp@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 0231kaC7055916; Tue, 3 Mar 2020 01:46:36 GMT (envelope-from csjp@FreeBSD.org) Received: (from csjp@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 0231kaod055915; Tue, 3 Mar 2020 01:46:36 GMT (envelope-from csjp@FreeBSD.org) Message-Id: <202003030146.0231kaod055915@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: csjp set sender to csjp@FreeBSD.org using -f From: "Christian S.J. Peron" Date: Tue, 3 Mar 2020 01:46:36 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r358564 - head/sys/security/audit X-SVN-Group: head X-SVN-Commit-Author: csjp X-SVN-Commit-Paths: head/sys/security/audit X-SVN-Commit-Revision: 358564 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages 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, 03 Mar 2020 01:46:37 -0000 Author: csjp Date: Tue Mar 3 01:46:35 2020 New Revision: 358564 URL: https://svnweb.freebsd.org/changeset/base/358564 Log: In r358471, we interrupted the case block that would eventually lead to the path related tokens not being processed. Restore this behavior and and move AUE_JAIL_SET in this block, as it may conditionally contain a path token. Discovered by: kevans PR: 244537 Reviewed by: kevans Differential Revision: https://reviews.freebsd.org/D23929 Modified: head/sys/security/audit/audit_bsm.c Modified: head/sys/security/audit/audit_bsm.c ============================================================================== --- head/sys/security/audit/audit_bsm.c Tue Mar 3 00:28:37 2020 (r358563) +++ head/sys/security/audit/audit_bsm.c Tue Mar 3 01:46:35 2020 (r358564) @@ -803,25 +803,26 @@ kaudit_to_bsm(struct kaudit_record *kar, struct au_rec UPATH1_VNODE1_TOKENS; break; - case AUE_CHDIR: - case AUE_CHROOT: - case AUE_FSTATAT: - case AUE_FUTIMESAT: - case AUE_GETATTRLIST: - case AUE_JAIL: - break; - /* * NB: We may want to verify that the appropriate * audit args are being processed here, but I think * a bit analysis is required. + * + * Process AUE_JAIL_SET in the next block so we can pickup any path + * related tokens that might exist. */ case AUE_JAIL_GET: - case AUE_JAIL_SET: case AUE_JAIL_ATTACH: case AUE_JAIL_REMOVE: break; + case AUE_JAIL_SET: + case AUE_CHDIR: + case AUE_CHROOT: + case AUE_FSTATAT: + case AUE_FUTIMESAT: + case AUE_GETATTRLIST: + case AUE_JAIL: case AUE_LUTIMES: case AUE_NFS_GETFH: case AUE_LGETFH: From owner-svn-src-all@freebsd.org Tue Mar 3 03:22:01 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id DBDB6263CBA; Tue, 3 Mar 2020 03:22:01 +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 48Wj3s3d6gz4ZG0; Tue, 3 Mar 2020 03:22:01 +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 6EE6B26B45; Tue, 3 Mar 2020 03:22:01 +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 0233M1mW013442; Tue, 3 Mar 2020 03:22:01 GMT (envelope-from jhibbits@FreeBSD.org) Received: (from jhibbits@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 0233M1uZ013441; Tue, 3 Mar 2020 03:22:01 GMT (envelope-from jhibbits@FreeBSD.org) Message-Id: <202003030322.0233M1uZ013441@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jhibbits set sender to jhibbits@FreeBSD.org using -f From: Justin Hibbits Date: Tue, 3 Mar 2020 03:22:01 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r358565 - head/sys/powerpc/powernv X-SVN-Group: head X-SVN-Commit-Author: jhibbits X-SVN-Commit-Paths: head/sys/powerpc/powernv X-SVN-Commit-Revision: 358565 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages 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, 03 Mar 2020 03:22:02 -0000 Author: jhibbits Date: Tue Mar 3 03:22:00 2020 New Revision: 358565 URL: https://svnweb.freebsd.org/changeset/base/358565 Log: powerpc/powernv: powernv_node_numa_domain() fix non-NUMA case If NUMA is not enabled in the kernel config, or is disabled at boot, this function should just return domain 0 regardless of what's in the device tree. Fixes a panic in iflib with NUMA disabled. Reported by: luporl Modified: head/sys/powerpc/powernv/platform_powernv.c Modified: head/sys/powerpc/powernv/platform_powernv.c ============================================================================== --- head/sys/powerpc/powernv/platform_powernv.c Tue Mar 3 01:46:35 2020 (r358564) +++ head/sys/powerpc/powernv/platform_powernv.c Tue Mar 3 03:22:00 2020 (r358565) @@ -517,6 +517,12 @@ powernv_node_numa_domain(platform_t platform, phandle_ cell_t associativity[5]; int i, res; +#ifndef NUMA + return (0); +#endif + if (vm_ndomains == 1) + return (0); + res = OF_getencprop(node, "ibm,associativity", associativity, sizeof(associativity)); From owner-svn-src-all@freebsd.org Tue Mar 3 03:38:39 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 45680264069; Tue, 3 Mar 2020 03:38:39 +0000 (UTC) (envelope-from pfg@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 48WjR2723Pz43PM; Tue, 3 Mar 2020 03:38:38 +0000 (UTC) (envelope-from pfg@FreeBSD.org) Received: from [192.168.0.3] (unknown [181.52.72.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client did not present a certificate) (Authenticated sender: pfg) by smtp.freebsd.org (Postfix) with ESMTPSA id 5055C222F; Tue, 3 Mar 2020 03:38:38 +0000 (UTC) (envelope-from pfg@FreeBSD.org) Subject: Re: svn commit: r358561 - in head: . share/man/man5 share/man/man7 tools/build/options tools/tools/nanobsd/dhcpd tools/tools/nanobsd/embedded usr.bin usr.bin/calendar usr.bin/calendar/calendars usr.bin... To: Conrad Meyer , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org References: <202003022337.022NblgD078080@repo.freebsd.org> From: Pedro Giffuni Organization: FreeBSD Message-ID: <2f8d3ed6-4290-36fe-26b2-a34ebcb87d56@FreeBSD.org> Date: Mon, 2 Mar 2020 22:38:39 -0500 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:68.0) Gecko/20100101 Thunderbird/68.5.0 MIME-Version: 1.0 In-Reply-To: <202003022337.022NblgD078080@repo.freebsd.org> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Content-Language: en-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, 03 Mar 2020 03:38:39 -0000 On 02/03/2020 18:37, Conrad Meyer wrote: > Author: cem > Date: Mon Mar 2 23:37:47 2020 > New Revision: 358561 > URL: https://svnweb.freebsd.org/changeset/base/358561 > > Log: > Fix typo in r278616 > > FreeBSD isn't an encyclopedia. Wow, that was weird ... thank you for reverting. Pedro. > Deleted: > head/tools/build/options/WITHOUT_CALENDAR > head/usr.bin/calendar/Makefile > head/usr.bin/calendar/Makefile.depend > head/usr.bin/calendar/calendar.1 > head/usr.bin/calendar/calendar.c > head/usr.bin/calendar/calendar.h > head/usr.bin/calendar/calendars/calendar.all > head/usr.bin/calendar/calendars/calendar.australia > head/usr.bin/calendar/calendars/calendar.birthday > head/usr.bin/calendar/calendars/calendar.brazilian > head/usr.bin/calendar/calendars/calendar.christian > head/usr.bin/calendar/calendars/calendar.computer > head/usr.bin/calendar/calendars/calendar.croatian > head/usr.bin/calendar/calendars/calendar.dutch > head/usr.bin/calendar/calendars/calendar.french > head/usr.bin/calendar/calendars/calendar.german > head/usr.bin/calendar/calendars/calendar.history > head/usr.bin/calendar/calendars/calendar.holiday > head/usr.bin/calendar/calendars/calendar.hungarian > head/usr.bin/calendar/calendars/calendar.judaic > head/usr.bin/calendar/calendars/calendar.lotr > head/usr.bin/calendar/calendars/calendar.music > head/usr.bin/calendar/calendars/calendar.newzealand > head/usr.bin/calendar/calendars/calendar.russian > head/usr.bin/calendar/calendars/calendar.southafrica > head/usr.bin/calendar/calendars/calendar.ukrainian > head/usr.bin/calendar/calendars/calendar.usholiday > head/usr.bin/calendar/calendars/calendar.world > head/usr.bin/calendar/calendars/de_AT.ISO_8859-15/ > head/usr.bin/calendar/calendars/de_DE.ISO8859-1/ > head/usr.bin/calendar/calendars/fr_FR.ISO8859-1/ > head/usr.bin/calendar/calendars/hr_HR.ISO8859-2/ > head/usr.bin/calendar/calendars/hu_HU.ISO8859-2/ > head/usr.bin/calendar/calendars/pt_BR.ISO8859-1/ > head/usr.bin/calendar/calendars/pt_BR.UTF-8/ > head/usr.bin/calendar/calendars/ru_RU.KOI8-R/ > head/usr.bin/calendar/calendars/ru_RU.UTF-8/ > head/usr.bin/calendar/calendars/uk_UA.KOI8-U/ > head/usr.bin/calendar/dates.c > head/usr.bin/calendar/day.c > head/usr.bin/calendar/events.c > head/usr.bin/calendar/io.c > head/usr.bin/calendar/locale.c > head/usr.bin/calendar/ostern.c > head/usr.bin/calendar/parsedata.c > head/usr.bin/calendar/paskha.c > head/usr.bin/calendar/pathnames.h > head/usr.bin/calendar/pom.c > head/usr.bin/calendar/sunpos.c > head/usr.bin/calendar/tests/ > head/usr.sbin/periodic/etc/daily/300.calendar > Modified: > head/ObsoleteFiles.inc > head/share/man/man5/periodic.conf.5 > head/share/man/man5/src.conf.5 > head/share/man/man7/hier.7 > head/tools/tools/nanobsd/dhcpd/common > head/tools/tools/nanobsd/embedded/common > head/usr.bin/Makefile > head/usr.bin/leave/leave.1 > head/usr.sbin/periodic/etc/daily/Makefile > head/usr.sbin/periodic/periodic.conf > > Modified: head/ObsoleteFiles.inc > ============================================================================== > --- head/ObsoleteFiles.inc Mon Mar 2 23:25:02 2020 (r358560) > +++ head/ObsoleteFiles.inc Mon Mar 2 23:37:47 2020 (r358561) > @@ -36,6 +36,11 @@ > # xargs -n1 | sort | uniq -d; > # done > > +# 20200302: calendar(1) removed > +OLD_DIRS+=usr/share/calendar > +OLD_FILES+=usr/bin/calendar > +OLD_FILES+=usr/share/man/man1/calendar.1.gz > + > # 20200301: bktr removed > OLD_DIRS+=usr/include/dev/bktr > OLD_FILES+=usr/include/dev/bktr/ioctl_bktr.h > > Modified: head/share/man/man5/periodic.conf.5 > ============================================================================== > --- head/share/man/man5/periodic.conf.5 Mon Mar 2 23:25:02 2020 (r358560) > +++ head/share/man/man5/periodic.conf.5 Mon Mar 2 23:37:47 2020 (r358561) > @@ -273,13 +273,6 @@ Set to > if you want the > .Pa /etc/mail/aliases > file backed up and modifications to be displayed in your daily output. > -.It Va daily_calendar_enable > -.Pq Vt bool > -Set to > -.Dq Li YES > -if you want to run > -.Nm calendar Fl a > -daily. > .It Va daily_accounting_enable > .Pq Vt bool > Set to > @@ -970,7 +963,6 @@ is shared or distributed. > .El > .Sh SEE ALSO > .Xr apropos 1 , > -.Xr calendar 1 , > .Xr df 1 , > .Xr diff 1 , > .Xr gzip 1 , > > Modified: head/share/man/man5/src.conf.5 > ============================================================================== > --- head/share/man/man5/src.conf.5 Mon Mar 2 23:25:02 2020 (r358560) > +++ head/share/man/man5/src.conf.5 Mon Mar 2 23:37:47 2020 (r358561) > @@ -271,9 +271,6 @@ is set explicitly) > .El > .It Va WITHOUT_BZIP2_SUPPORT > Set to build some programs without optional bzip2 support. > -.It Va WITHOUT_CALENDAR > -Set to not build > -.Xr calendar 1 . > .It Va WITHOUT_CAPSICUM > Set to not build Capsicum support into system programs. > When set, it enforces these options: > > Modified: head/share/man/man7/hier.7 > ============================================================================== > --- head/share/man/man7/hier.7 Mon Mar 2 23:25:02 2020 (r358560) > +++ head/share/man/man7/hier.7 Mon Mar 2 23:37:47 2020 (r358561) > @@ -442,10 +442,6 @@ system daemons & system utilities (executed by users) > architecture-independent files > .Pp > .Bl -tag -width Fl -compact > -.It Pa calendar/ > -a variety of pre-fab calendar files; > -see > -.Xr calendar 1 > .It Pa dict/ > word lists; > see > > Modified: head/tools/tools/nanobsd/dhcpd/common > ============================================================================== > --- head/tools/tools/nanobsd/dhcpd/common Mon Mar 2 23:25:02 2020 (r358560) > +++ head/tools/tools/nanobsd/dhcpd/common Mon Mar 2 23:37:47 2020 (r358561) > @@ -104,7 +104,6 @@ WITHOUT_ACPI=true > WITHOUT_ATM=true > WITHOUT_AUDIT=true > WITHOUT_BLUETOOTH=true > -WITHOUT_CALENDAR=true > WITHOUT_DICT=true > WITHOUT_EXAMPLES=true > WITHOUT_GAMES=true > > Modified: head/tools/tools/nanobsd/embedded/common > ============================================================================== > --- head/tools/tools/nanobsd/embedded/common Mon Mar 2 23:25:02 2020 (r358560) > +++ head/tools/tools/nanobsd/embedded/common Mon Mar 2 23:37:47 2020 (r358561) > @@ -135,7 +135,6 @@ WITHOUT_ACPI=true > WITHOUT_ATM=true > WITHOUT_AUDIT=true > WITHOUT_BLUETOOTH=true > -WITHOUT_CALENDAR=true > WITHOUT_DICT=true > WITHOUT_EXAMPLES=true > WITHOUT_GAMES=true > > Modified: head/usr.bin/Makefile > ============================================================================== > --- head/usr.bin/Makefile Mon Mar 2 23:25:02 2020 (r358560) > +++ head/usr.bin/Makefile Mon Mar 2 23:37:47 2020 (r358561) > @@ -195,7 +195,6 @@ SUBDIR.${MK_AT}+= at > SUBDIR.${MK_ATM}+= atm > SUBDIR.${MK_BLUETOOTH}+= bluetooth > SUBDIR.${MK_BSD_CPIO}+= cpio > -SUBDIR.${MK_CALENDAR}+= calendar > SUBDIR.${MK_CLANG}+= clang > SUBDIR.${MK_DIALOG}+= dpv > SUBDIR.${MK_EE}+= ee > > Modified: head/usr.bin/leave/leave.1 > ============================================================================== > --- head/usr.bin/leave/leave.1 Mon Mar 2 23:25:02 2020 (r358560) > +++ head/usr.bin/leave/leave.1 Mon Mar 2 23:37:47 2020 (r358561) > @@ -87,8 +87,6 @@ To get rid of > you should either log off or use > .Ql kill \-s KILL > giving its process id. > -.Sh SEE ALSO > -.Xr calendar 1 > .Sh HISTORY > The > .Nm > > Modified: head/usr.sbin/periodic/etc/daily/Makefile > ============================================================================== > --- head/usr.sbin/periodic/etc/daily/Makefile Mon Mar 2 23:25:02 2020 (r358560) > +++ head/usr.sbin/periodic/etc/daily/Makefile Mon Mar 2 23:37:47 2020 (r358561) > @@ -33,10 +33,6 @@ ACCTMODE= ${BINMODE} > ACCTPACKAGE= acct > .endif > > -.if ${MK_CALENDAR} != "no" > -CONFS+= 300.calendar > -.endif > - > .if ${MK_MAIL} != "no" > CONFS+= 130.clean-msgs > .endif > > Modified: head/usr.sbin/periodic/periodic.conf > ============================================================================== > --- head/usr.sbin/periodic/periodic.conf Mon Mar 2 23:25:02 2020 (r358560) > +++ head/usr.sbin/periodic/periodic.conf Mon Mar 2 23:37:47 2020 (r358561) > @@ -77,9 +77,6 @@ daily_backup_passwd_enable="YES" # Backup passwd & g > # 210.backup-aliases > daily_backup_aliases_enable="YES" # Backup mail aliases > > -# 300.calendar > -daily_calendar_enable="NO" # Run calendar -a > - > # 310.accounting > daily_accounting_enable="YES" # Rotate acct files > daily_accounting_compress="NO" # Gzip rotated files From owner-svn-src-all@freebsd.org Tue Mar 3 08:24:09 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id D2C77268232; Tue, 3 Mar 2020 08:24:09 +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 48WqmT4CVKz4YXj; Tue, 3 Mar 2020 08:24:09 +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 81D9F229A; Tue, 3 Mar 2020 08:24:09 +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 0238O9Vo093825; Tue, 3 Mar 2020 08:24:09 GMT (envelope-from bz@FreeBSD.org) Received: (from bz@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 0238O917093824; Tue, 3 Mar 2020 08:24:09 GMT (envelope-from bz@FreeBSD.org) Message-Id: <202003030824.0238O917093824@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bz set sender to bz@FreeBSD.org using -f From: "Bjoern A. Zeeb" Date: Tue, 3 Mar 2020 08:24:09 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r358566 - stable/11/sys/netinet6 X-SVN-Group: stable-11 X-SVN-Commit-Author: bz X-SVN-Commit-Paths: stable/11/sys/netinet6 X-SVN-Commit-Revision: 358566 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages 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, 03 Mar 2020 08:24:09 -0000 Author: bz Date: Tue Mar 3 08:24:09 2020 New Revision: 358566 URL: https://svnweb.freebsd.org/changeset/base/358566 Log: MFC r358297: Fix IPv6 checksums when exthdrs are present. In two places in ip6_output we are doing (delayed) checksum calculations. The initial logic came from SCTP in r205075,205104 and later I copied and adjusted it for the TCP|UDP case in r235958. The problem was that the original SCTP offsets were already wrong for any case with extension headers present given IPv6 extension headers are not part of the pseudo checksum calculations. The later changes do not help in case there is checksum offloading as for extension headers (incl. fragments) we do currrently never offload as we have no infrastructure to know whether the NIC can handle these cases. Correct the offsets for delayed checksum calculations and properly handle mbuf flags. In addition harmonize the almost identical duplicate code. While here eliminate the now unneeded variable hlen and add an always missing mtod() call in the 1-b and 3 cases after the introduction of the mb_unmapped_to_ext() calls. [Keep code in sync with head] Reported by: Francis Dupont (fdupont isc.org) PR: 243675 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 Tue Mar 3 03:22:00 2020 (r358565) +++ stable/11/sys/netinet6/ip6_output.c Tue Mar 3 08:24:09 2020 (r358566) @@ -209,6 +209,36 @@ in6_delayed_cksum(struct mbuf *m, uint32_t plen, u_sho *(u_short *)mtodo(m, offset) = csum; } +static int +ip6_output_delayed_csum(struct mbuf *m, struct ifnet *ifp, int csum_flags, + int plen, int optlen, bool frag __unused) +{ + + KASSERT((plen >= optlen), ("%s:%d: plen %d < optlen %d, m %p, ifp %p " + "csum_flags %#x frag %d\n", + __func__, __LINE__, plen, optlen, m, ifp, csum_flags, frag)); + + if ((csum_flags & CSUM_DELAY_DATA_IPV6) || +#ifdef SCTP + (csum_flags & CSUM_SCTP_IPV6) || +#endif + false) { + if (csum_flags & CSUM_DELAY_DATA_IPV6) { + in6_delayed_cksum(m, plen - optlen, + sizeof(struct ip6_hdr) + optlen); + m->m_pkthdr.csum_flags &= ~CSUM_DELAY_DATA_IPV6; + } +#ifdef SCTP + if (csum_flags & CSUM_SCTP_IPV6) { + sctp_delayed_cksum(m, sizeof(struct ip6_hdr) + optlen); + m->m_pkthdr.csum_flags &= ~CSUM_SCTP_IPV6; + } +#endif + } + + return (0); +} + int ip6_fragment(struct ifnet *ifp, struct mbuf *m0, int hlen, u_char nextproto, int mtu, uint32_t id) @@ -308,7 +338,7 @@ ip6_output(struct mbuf *m0, struct ip6_pktopts *opt, struct ifnet *ifp, *origifp; struct mbuf *m = m0; struct mbuf *mprev; - int hlen, tlen, len; + int tlen, len; struct route_in6 ip6route; struct rtentry *rt = NULL; struct sockaddr_in6 *dst, src_sa, dst_sa; @@ -929,17 +959,10 @@ passout: * XXX-BZ Need a framework to know when the NIC can handle it, even * with ext. hdrs. */ - if (sw_csum & CSUM_DELAY_DATA_IPV6) { - sw_csum &= ~CSUM_DELAY_DATA_IPV6; - in6_delayed_cksum(m, plen, sizeof(struct ip6_hdr)); - } -#ifdef SCTP - if (sw_csum & CSUM_SCTP_IPV6) { - sw_csum &= ~CSUM_SCTP_IPV6; - sctp_delayed_cksum(m, sizeof(struct ip6_hdr)); - } -#endif - m->m_pkthdr.csum_flags &= ifp->if_hwassist; + error = ip6_output_delayed_csum(m, ifp, sw_csum, plen, optlen, false); + if (error != 0) + goto bad; + /* XXX-BZ m->m_pkthdr.csum_flags &= ~ifp->if_hwassist; */ tlen = m->m_pkthdr.len; if ((opt && (opt->ip6po_flags & IP6PO_DONTFRAG)) || tso) @@ -1003,11 +1026,10 @@ passout: * fragment if possible. * Must be able to put at least 8 bytes per fragment. */ - hlen = unfragpartlen; if (mtu > IPV6_MAXPACKET) mtu = IPV6_MAXPACKET; - len = (mtu - hlen - sizeof(struct ip6_frag)) & ~7; + len = (mtu - unfragpartlen - sizeof(struct ip6_frag)) & ~7; if (len < 8) { error = EMSGSIZE; in6_ifstat_inc(ifp, ifs6_out_fragfail); @@ -1019,16 +1041,11 @@ passout: * fragmented packets, then do it here. * XXX-BZ handle the hw offloading case. Need flags. */ - if (m->m_pkthdr.csum_flags & CSUM_DELAY_DATA_IPV6) { - in6_delayed_cksum(m, plen, hlen); - m->m_pkthdr.csum_flags &= ~CSUM_DELAY_DATA_IPV6; - } -#ifdef SCTP - if (m->m_pkthdr.csum_flags & CSUM_SCTP_IPV6) { - sctp_delayed_cksum(m, hlen); - m->m_pkthdr.csum_flags &= ~CSUM_SCTP_IPV6; - } -#endif + error = ip6_output_delayed_csum(m, ifp, m->m_pkthdr.csum_flags, + plen, optlen, true); + if (error != 0) + goto bad; + /* * Change the next header field of the last header in the * unfragmentable part. @@ -1043,6 +1060,7 @@ passout: nextproto = *mtod(exthdrs.ip6e_hbh, u_char *); *mtod(exthdrs.ip6e_hbh, u_char *) = IPPROTO_FRAGMENT; } else { + ip6 = mtod(m, struct ip6_hdr *); nextproto = ip6->ip6_nxt; ip6->ip6_nxt = IPPROTO_FRAGMENT; } @@ -1054,7 +1072,8 @@ passout: */ m0 = m; id = htonl(ip6_randomid()); - if ((error = ip6_fragment(ifp, m, hlen, nextproto, len, id))) + error = ip6_fragment(ifp, m, unfragpartlen, nextproto,len, id); + if (error != 0) goto sendorfree; in6_ifstat_inc(ifp, ifs6_out_fragok); From owner-svn-src-all@freebsd.org Tue Mar 3 08:28:18 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 1E3882682C6; Tue, 3 Mar 2020 08:28:18 +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 48WqsF608Xz3Fnm; Tue, 3 Mar 2020 08:28:17 +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 94B0922A4; Tue, 3 Mar 2020 08:28:17 +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 0238SHJM094067; Tue, 3 Mar 2020 08:28:17 GMT (envelope-from andrew@FreeBSD.org) Received: (from andrew@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 0238SGwR094063; Tue, 3 Mar 2020 08:28:16 GMT (envelope-from andrew@FreeBSD.org) Message-Id: <202003030828.0238SGwR094063@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: andrew set sender to andrew@FreeBSD.org using -f From: Andrew Turner Date: Tue, 3 Mar 2020 08:28:16 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r358567 - in head/sys/arm64: arm64 include X-SVN-Group: head X-SVN-Commit-Author: andrew X-SVN-Commit-Paths: in head/sys/arm64: arm64 include X-SVN-Commit-Revision: 358567 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages 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, 03 Mar 2020 08:28:18 -0000 Author: andrew Date: Tue Mar 3 08:28:16 2020 New Revision: 358567 URL: https://svnweb.freebsd.org/changeset/base/358567 Log: Store the boot exception level on arm64 so it can be queried later A hypervisor, e.g. bhyve, will need to know what exception levelthe kernel was in when it started booting. If it was EL2 we can then enable said hypervisor. Store the boot exception level and allow the kernel to later query it. Obtained from: https://github.com/FreeBSD-UPB/freebsd (earlier version) Sponsored by: Innovate UK Modified: head/sys/arm64/arm64/genassym.c head/sys/arm64/arm64/locore.S head/sys/arm64/arm64/machdep.c head/sys/arm64/include/machdep.h Modified: head/sys/arm64/arm64/genassym.c ============================================================================== --- head/sys/arm64/arm64/genassym.c Tue Mar 3 08:24:09 2020 (r358566) +++ head/sys/arm64/arm64/genassym.c Tue Mar 3 08:28:16 2020 (r358567) @@ -45,6 +45,7 @@ ASSYM(BP_KERN_L1PT, offsetof(struct arm64_bootparams, ASSYM(BP_KERN_DELTA, offsetof(struct arm64_bootparams, kern_delta)); ASSYM(BP_KERN_STACK, offsetof(struct arm64_bootparams, kern_stack)); ASSYM(BP_KERN_L0PT, offsetof(struct arm64_bootparams, kern_l0pt)); +ASSYM(BP_BOOT_EL, offsetof(struct arm64_bootparams, boot_el)); ASSYM(TDF_ASTPENDING, TDF_ASTPENDING); ASSYM(TDF_NEEDRESCHED, TDF_NEEDRESCHED); Modified: head/sys/arm64/arm64/locore.S ============================================================================== --- head/sys/arm64/arm64/locore.S Tue Mar 3 08:24:09 2020 (r358566) +++ head/sys/arm64/arm64/locore.S Tue Mar 3 08:28:16 2020 (r358567) @@ -165,6 +165,7 @@ virtdone: adr x25, initstack str x25, [x0, #BP_KERN_STACK] str x24, [x0, #BP_KERN_L0PT] + str x23, [x0, #BP_BOOT_EL] /* trace back starts here */ mov fp, #0 @@ -227,9 +228,9 @@ END(mpentry) * registers and drop to EL1. */ drop_to_el1: - mrs x1, CurrentEL - lsr x1, x1, #2 - cmp x1, #0x2 + mrs x23, CurrentEL + lsr x23, x23, #2 + cmp x23, #0x2 b.eq 1f ret 1: Modified: head/sys/arm64/arm64/machdep.c ============================================================================== --- head/sys/arm64/arm64/machdep.c Tue Mar 3 08:24:09 2020 (r358566) +++ head/sys/arm64/arm64/machdep.c Tue Mar 3 08:28:16 2020 (r358567) @@ -109,6 +109,7 @@ static struct trapframe proc0_tf; int early_boot = 1; int cold = 1; +static int boot_el; struct kva_md_info kmi; @@ -162,6 +163,13 @@ pan_enable(void) } } +bool +has_hyp(void) +{ + + return (boot_el == 2); +} + static void cpu_startup(void *dummy) { @@ -1089,6 +1097,8 @@ initarm(struct arm64_bootparams *abp) vm_offset_t lastaddr; caddr_t kmdp; bool valid; + + boot_el = abp->boot_el; /* Parse loader or FDT boot parametes. Determine last used address. */ lastaddr = parse_boot_param(abp); Modified: head/sys/arm64/include/machdep.h ============================================================================== --- head/sys/arm64/include/machdep.h Tue Mar 3 08:24:09 2020 (r358566) +++ head/sys/arm64/include/machdep.h Tue Mar 3 08:28:16 2020 (r358567) @@ -35,6 +35,8 @@ struct arm64_bootparams { uint64_t kern_delta; vm_offset_t kern_stack; vm_offset_t kern_l0pt; /* L1 page table for the kernel */ + int boot_el; /* EL the kernel booted from */ + int pad; }; enum arm64_bus { @@ -46,6 +48,7 @@ enum arm64_bus { extern enum arm64_bus arm64_bus_method; void dbg_init(void); +bool has_hyp(void); void initarm(struct arm64_bootparams *); vm_offset_t parse_boot_param(struct arm64_bootparams *abp); #ifdef FDT From owner-svn-src-all@freebsd.org Tue Mar 3 09:45:17 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id AAB79269D9E; Tue, 3 Mar 2020 09:45:17 +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 48WsZ51YKzz4J5y; Tue, 3 Mar 2020 09:45:17 +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 AB0B13140; Tue, 3 Mar 2020 09:45:16 +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 0239jGTe041835; Tue, 3 Mar 2020 09:45:16 GMT (envelope-from bz@FreeBSD.org) Received: (from bz@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 0239jG1A041833; Tue, 3 Mar 2020 09:45:16 GMT (envelope-from bz@FreeBSD.org) Message-Id: <202003030945.0239jG1A041833@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bz set sender to bz@FreeBSD.org using -f From: "Bjoern A. Zeeb" Date: Tue, 3 Mar 2020 09:45:16 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r358568 - head/sys/netinet6 X-SVN-Group: head X-SVN-Commit-Author: bz X-SVN-Commit-Paths: head/sys/netinet6 X-SVN-Commit-Revision: 358568 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages 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, 03 Mar 2020 09:45:17 -0000 Author: bz Date: Tue Mar 3 09:45:16 2020 New Revision: 358568 URL: https://svnweb.freebsd.org/changeset/base/358568 Log: fib6_rte_to_nh_*: return a link-local gw address with scope embedded In fib6_rte_to_nh_* when returning a link-local gateway address currently we do clear the scope. That could be recovered using the ifp returned as well, but the code in general seems to expect a link-local address with scope embeedded as otherwise the "dst" (gw) passed to the output routines will not include scope and not send the packet out (the right interface). Do not clear the scope when returning a link-local address and allow packets to go out (the right interface). Remove the (now) extra scope recovery in the IPv6 fast-fwd code. Sponsored by: Netflix Reviewed by: melifaro, ae MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D23872 Modified: head/sys/netinet6/in6_fib.c head/sys/netinet6/ip6_fastfwd.c Modified: head/sys/netinet6/in6_fib.c ============================================================================== --- head/sys/netinet6/in6_fib.c Tue Mar 3 08:28:16 2020 (r358567) +++ head/sys/netinet6/in6_fib.c Tue Mar 3 09:45:16 2020 (r358568) @@ -115,9 +115,9 @@ fib6_rte_to_nh_basic(struct rtentry *rte, const struct pnh6->nh_mtu = min(rte->rt_mtu, IN6_LINKMTU(rte->rt_ifp)); if (rte->rt_flags & RTF_GATEWAY) { + /* Return address with embedded scope. */ gw = (struct sockaddr_in6 *)rte->rt_gateway; pnh6->nh_addr = gw->sin6_addr; - in6_clearscope(&pnh6->nh_addr); } else pnh6->nh_addr = *dst; /* Set flags */ @@ -143,9 +143,9 @@ fib6_rte_to_nh_extended(struct rtentry *rte, const str pnh6->nh_mtu = min(rte->rt_mtu, IN6_LINKMTU(rte->rt_ifp)); if (rte->rt_flags & RTF_GATEWAY) { + /* Return address with embedded scope. */ gw = (struct sockaddr_in6 *)rte->rt_gateway; pnh6->nh_addr = gw->sin6_addr; - in6_clearscope(&pnh6->nh_addr); } else pnh6->nh_addr = *dst; /* Set flags */ Modified: head/sys/netinet6/ip6_fastfwd.c ============================================================================== --- head/sys/netinet6/ip6_fastfwd.c Tue Mar 3 08:28:16 2020 (r358567) +++ head/sys/netinet6/ip6_fastfwd.c Tue Mar 3 09:45:16 2020 (r358568) @@ -274,14 +274,7 @@ passout: m_clrprotoflags(m); /* Avoid confusing lower layers. */ IP_PROBE(send, NULL, NULL, ip6, nh.nh_ifp, NULL, ip6); - /* - * XXX: we need to use destination address with embedded scope - * zone id, because LLTABLE uses such form of addresses for lookup. - */ dst.sin6_addr = nh.nh_addr; - if (IN6_IS_SCOPE_LINKLOCAL(&dst.sin6_addr)) - dst.sin6_addr.s6_addr16[1] = htons(nh.nh_ifp->if_index & 0xffff); - error = (*nh.nh_ifp->if_output)(nh.nh_ifp, m, (struct sockaddr *)&dst, NULL); if (error != 0) { From owner-svn-src-all@freebsd.org Tue Mar 3 09:50:34 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 9F38626A05A; Tue, 3 Mar 2020 09:50:34 +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 48WshB2vsjz4X3Z; Tue, 3 Mar 2020 09:50:34 +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 44DF6327D; Tue, 3 Mar 2020 09:50:34 +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 0239oYek042140; Tue, 3 Mar 2020 09:50:34 GMT (envelope-from bz@FreeBSD.org) Received: (from bz@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 0239oXBU042139; Tue, 3 Mar 2020 09:50:33 GMT (envelope-from bz@FreeBSD.org) Message-Id: <202003030950.0239oXBU042139@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bz set sender to bz@FreeBSD.org using -f From: "Bjoern A. Zeeb" Date: Tue, 3 Mar 2020 09:50:33 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r358569 - head/sys/netinet6 X-SVN-Group: head X-SVN-Commit-Author: bz X-SVN-Commit-Paths: head/sys/netinet6 X-SVN-Commit-Revision: 358569 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages 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, 03 Mar 2020 09:50:34 -0000 Author: bz Date: Tue Mar 3 09:50:33 2020 New Revision: 358569 URL: https://svnweb.freebsd.org/changeset/base/358569 Log: in6_fib: return nh_ia in the ext interface as we do for IPv4 Like for IPv4 add nh_ia to the ext interface and return rt_ifa in order to be used for, e.g., packet/octets accounting purposes. Reviewed by: melifaro MFC after: 1 week Sponsored by: Netflix Differential Revision: https://reviews.freebsd.org/D23873 Modified: head/sys/netinet6/in6_fib.c head/sys/netinet6/in6_fib.h Modified: head/sys/netinet6/in6_fib.c ============================================================================== --- head/sys/netinet6/in6_fib.c Tue Mar 3 09:45:16 2020 (r358568) +++ head/sys/netinet6/in6_fib.c Tue Mar 3 09:50:33 2020 (r358569) @@ -75,6 +75,8 @@ static void fib6_rte_to_nh_basic(struct rtentry *rte, static struct ifnet *fib6_get_ifaifp(struct rtentry *rte); #define RNTORT(p) ((struct rtentry *)(p)) +#define ifatoia6(ifa) ((struct in6_ifaddr *)(ifa)) + CHK_STRUCT_ROUTE_COMPAT(struct route_in6, ro_dst); /* @@ -153,6 +155,7 @@ fib6_rte_to_nh_extended(struct rtentry *rte, const str gw = (struct sockaddr_in6 *)rt_key(rte); if (IN6_IS_ADDR_UNSPECIFIED(&gw->sin6_addr)) pnh6->nh_flags |= NHF_DEFAULT; + pnh6->nh_ia = ifatoia6(rte->rt_ifa); } /* Modified: head/sys/netinet6/in6_fib.h ============================================================================== --- head/sys/netinet6/in6_fib.h Tue Mar 3 09:45:16 2020 (r358568) +++ head/sys/netinet6/in6_fib.h Tue Mar 3 09:50:33 2020 (r358569) @@ -41,14 +41,15 @@ struct nhop6_basic { struct in6_addr nh_addr; /* GW/DST IPv4 address */ }; -/* Does not differ from nhop6_basic */ +/* Extended nexthop info used for control protocols. */ struct nhop6_extended { struct ifnet *nh_ifp; /* Logical egress interface */ + struct in6_ifaddr *nh_ia; /* Associated address. */ uint16_t nh_mtu; /* nexthop mtu */ uint16_t nh_flags; /* nhop flags */ uint8_t spare[4]; struct in6_addr nh_addr; /* GW/DST IPv6 address */ - uint64_t spare2[2]; + uint64_t spare2[1]; }; int fib6_lookup_nh_basic(uint32_t fibnum, const struct in6_addr *dst, From owner-svn-src-all@freebsd.org Tue Mar 3 09:51:54 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 7298226A244; Tue, 3 Mar 2020 09:51:54 +0000 (UTC) (envelope-from 0mp@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 48Wsjk1z2nz4Ztb; Tue, 3 Mar 2020 09:51:54 +0000 (UTC) (envelope-from 0mp@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 2CDA032FB; Tue, 3 Mar 2020 09:51:54 +0000 (UTC) (envelope-from 0mp@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 0239ps2k045940; Tue, 3 Mar 2020 09:51:54 GMT (envelope-from 0mp@FreeBSD.org) Received: (from 0mp@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 0239pssc045939; Tue, 3 Mar 2020 09:51:54 GMT (envelope-from 0mp@FreeBSD.org) Message-Id: <202003030951.0239pssc045939@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: 0mp set sender to 0mp@FreeBSD.org using -f From: Mateusz Piotrowski <0mp@FreeBSD.org> Date: Tue, 3 Mar 2020 09:51:54 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r358570 - head/lib/libc/sys X-SVN-Group: head X-SVN-Commit-Author: 0mp X-SVN-Commit-Paths: head/lib/libc/sys X-SVN-Commit-Revision: 358570 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages 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, 03 Mar 2020 09:51:54 -0000 Author: 0mp (doc,ports committer) Date: Tue Mar 3 09:51:53 2020 New Revision: 358570 URL: https://svnweb.freebsd.org/changeset/base/358570 Log: thr_self.2: Fix some typos in the thread identifier range Reported by: kaktus Approved by: bcr (mentor) Differential Revision: https://reviews.freebsd.org/D23936 Modified: head/lib/libc/sys/thr_self.2 Modified: head/lib/libc/sys/thr_self.2 ============================================================================== --- head/lib/libc/sys/thr_self.2 Tue Mar 3 09:50:33 2020 (r358569) +++ head/lib/libc/sys/thr_self.2 Tue Mar 3 09:51:53 2020 (r358570) @@ -28,7 +28,7 @@ .\" .\" $FreeBSD$ .\" -.Dd June 1, 2016 +.Dd March 3, 2020 .Dt THR_SELF 2 .Os .Sh NAME @@ -49,7 +49,7 @@ kernel-scheduled thread in the variable pointed by the .Pp The thread identifier is an integer in the range from .Dv PID_MAX + 2 -(10002) to +(100001) to .Dv INT_MAX . The thread identifier is guaranteed to be unique at any given time, for each running thread in the system. From owner-svn-src-all@freebsd.org Tue Mar 3 11:32:48 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 85A2A26C6F9; Tue, 3 Mar 2020 11:32:48 +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 48Wvy82S0kz4L9D; Tue, 3 Mar 2020 11:32:48 +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 F0063482B; Tue, 3 Mar 2020 11:32:47 +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 023BWlhq007910; Tue, 3 Mar 2020 11:32:47 GMT (envelope-from bz@FreeBSD.org) Received: (from bz@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 023BWlik007909; Tue, 3 Mar 2020 11:32:47 GMT (envelope-from bz@FreeBSD.org) Message-Id: <202003031132.023BWlik007909@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bz set sender to bz@FreeBSD.org using -f From: "Bjoern A. Zeeb" Date: Tue, 3 Mar 2020 11:32:47 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r358572 - head/sys/netinet6 X-SVN-Group: head X-SVN-Commit-Author: bz X-SVN-Commit-Paths: head/sys/netinet6 X-SVN-Commit-Revision: 358572 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages 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, 03 Mar 2020 11:32:48 -0000 Author: bz Date: Tue Mar 3 11:32:47 2020 New Revision: 358572 URL: https://svnweb.freebsd.org/changeset/base/358572 Log: ip6_output: use new routing KPI when not passed a cached route Implement the equivalent of r347375 (IPv4) for the IPv6 output path. In IPv6 we get passed a cached route (and inp) by udp6_output() depending on whether we acquired a write lock on the INP. In case we neither bind nor connect a first UDP packet would come in with a cached route (wlocked) and all further packets would not. In case we bind and do not connect we never write-lock the inp. When we do not pass in a cached route, rather than providing the storage for a route locally and pass it over the old lookup code and down the stack, use the new route lookup KPI and acquire all details we need to send the packet. Compared to the IPv4 code the IPv6 code has a couple of possible complications: given an option with a routing hdr/caching route there, and path mtu (ro_pmtu) case which now equally has to deal with the possibility of having a route which is NULL passed in, and the fwd_tag in case a firewall changes the next hop (something to factor out in the future). Sponsored by: Netflix Reviewed by: glebius MFC after: 2 weeks Differential Revision: https://reviews.freebsd.org/D23886 Modified: head/sys/netinet6/ip6_output.c Modified: head/sys/netinet6/ip6_output.c ============================================================================== --- head/sys/netinet6/ip6_output.c Tue Mar 3 10:02:58 2020 (r358571) +++ head/sys/netinet6/ip6_output.c Tue Mar 3 11:32:47 2020 (r358572) @@ -424,12 +424,12 @@ ip6_output(struct mbuf *m0, struct ip6_pktopts *opt, struct ifnet *ifp, *origifp; struct mbuf *m = m0; struct mbuf *mprev; - int tlen, len; - struct route_in6 ip6route; - struct rtentry *rt = NULL; - struct sockaddr_in6 *dst, src_sa, dst_sa; + struct route_in6 *ro_pmtu; + struct rtentry *rt; + struct sockaddr_in6 *dst, sin6, src_sa, dst_sa; struct in6_addr odst; u_char *nexthdrp; + int tlen, len; int error = 0; struct in6_ifaddr *ia = NULL; u_long mtu; @@ -438,7 +438,6 @@ ip6_output(struct mbuf *m0, struct ip6_pktopts *opt, struct ip6_exthdrs exthdrs; struct in6_addr src0, dst0; u_int32_t zone; - struct route_in6 *ro_pmtu = NULL; bool hdrsplit; int sw_csum, tso; int needfiblookup; @@ -631,15 +630,15 @@ ip6_output(struct mbuf *m0, struct ip6_pktopts *opt, IP6STAT_INC(ip6s_localout); /* Route packet. */ - if (ro == NULL) { - ro = &ip6route; - bzero((caddr_t)ro, sizeof(*ro)); - } ro_pmtu = ro; if (opt && opt->ip6po_rthdr) ro = &opt->ip6po_route; - dst = (struct sockaddr_in6 *)&ro->ro_dst; + if (ro != NULL) + dst = (struct sockaddr_in6 *)&ro->ro_dst; + else + dst = &sin6; fibnum = (inp != NULL) ? inp->inp_inc.inc_fibnum : M_GETFIB(m); + again: /* * If specified, try to fill in the traffic class field. @@ -666,55 +665,127 @@ again: else ip6->ip6_hlim = V_ip6_defmcasthlim; } + + if (ro == NULL || ro->ro_rt == NULL) { + bzero(dst, sizeof(*dst)); + dst->sin6_family = AF_INET6; + dst->sin6_len = sizeof(*dst); + dst->sin6_addr = ip6->ip6_dst; + } /* - * Validate route against routing table additions; - * a better/more specific route might have been added. + * Validate route against routing table changes. * Make sure that the address family is set in route. */ - if (inp) { - ro->ro_dst.sin6_family = AF_INET6; - RT_VALIDATE((struct route *)ro, &inp->inp_rt_cookie, fibnum); - } - if (ro->ro_rt && fwd_tag == NULL && (ro->ro_rt->rt_flags & RTF_UP) && - ro->ro_dst.sin6_family == AF_INET6 && - IN6_ARE_ADDR_EQUAL(&ro->ro_dst.sin6_addr, &ip6->ip6_dst)) { - rt = ro->ro_rt; - ifp = ro->ro_rt->rt_ifp; + rt = NULL; + ifp = NULL; + mtu = 0; + if (ro != NULL) { + if (ro->ro_rt != NULL && inp != NULL) { + ro->ro_dst.sin6_family = AF_INET6; /* XXX KASSERT? */ + RT_VALIDATE((struct route *)ro, &inp->inp_rt_cookie, + fibnum); + } + if (ro->ro_rt != NULL && fwd_tag == NULL && + ((ro->ro_rt->rt_flags & RTF_UP) == 0 || + ro->ro_rt->rt_ifp == NULL || + !RT_LINK_IS_UP(ro->ro_rt->rt_ifp) || + ro->ro_dst.sin6_family != AF_INET6 || + !IN6_ARE_ADDR_EQUAL(&ro->ro_dst.sin6_addr, &ip6->ip6_dst))) + RO_INVALIDATE_CACHE(ro); + + if (ro->ro_rt != NULL && fwd_tag == NULL && + (ro->ro_rt->rt_flags & RTF_UP) && + ro->ro_dst.sin6_family == AF_INET6 && + IN6_ARE_ADDR_EQUAL(&ro->ro_dst.sin6_addr, &ip6->ip6_dst)) { + rt = ro->ro_rt; + ifp = ro->ro_rt->rt_ifp; + } else { + if (ro->ro_lle) + LLE_FREE(ro->ro_lle); /* zeros ro_lle */ + ro->ro_lle = NULL; + if (fwd_tag == NULL) { + 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; + } + error = in6_selectroute_fib(&dst_sa, opt, im6o, ro, &ifp, + &rt, fibnum); + if (error != 0) { + IP6STAT_INC(ip6s_noroute); + if (ifp != NULL) + in6_ifstat_inc(ifp, ifs6_out_discard); + goto bad; + } + if (ifp != NULL) + mtu = ifp->if_mtu; + } + if (rt == NULL) { + /* + * If in6_selectroute() does not return a route entry + * dst may not have been updated. + */ + *dst = dst_sa; /* XXX */ + } else { + if (rt->rt_flags & RTF_HOST) + mtu = rt->rt_mtu; + ia = (struct in6_ifaddr *)(rt->rt_ifa); + counter_u64_add(rt->rt_pksent, 1); + } } else { - if (ro->ro_lle) - LLE_FREE(ro->ro_lle); /* zeros ro_lle */ - ro->ro_lle = NULL; + struct nhop6_extended nh6; + struct in6_addr kdst; + uint32_t scopeid; + if (fwd_tag == NULL) { 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; } - error = in6_selectroute_fib(&dst_sa, opt, im6o, ro, &ifp, - &rt, fibnum); + + if (IN6_IS_ADDR_MULTICAST(&dst_sa.sin6_addr) && + im6o != NULL && + (ifp = im6o->im6o_multicast_ifp) != NULL) { + /* We do not need a route lookup. */ + *dst = dst_sa; /* XXX */ + goto nonh6lookup; + } + + in6_splitscope(&dst_sa.sin6_addr, &kdst, &scopeid); + + if (IN6_IS_ADDR_MC_LINKLOCAL(&dst_sa.sin6_addr) || + IN6_IS_ADDR_MC_NODELOCAL(&dst_sa.sin6_addr)) { + if (scopeid > 0) { + ifp = in6_getlinkifnet(scopeid); + *dst = dst_sa; /* XXX */ + goto nonh6lookup; + } + } + + error = fib6_lookup_nh_ext(fibnum, &kdst, scopeid, NHR_REF, 0, + &nh6); if (error != 0) { - if (ifp != NULL) - in6_ifstat_inc(ifp, ifs6_out_discard); + IP6STAT_INC(ip6s_noroute); + /* No ifp in6_ifstat_inc(ifp, ifs6_out_discard); */ + error = EHOSTUNREACH;; goto bad; } + + ifp = nh6.nh_ifp; + mtu = nh6.nh_mtu; + dst->sin6_addr = nh6.nh_addr; + ia = nh6.nh_ia; + fib6_free_nh_ext(fibnum, &nh6); +nonh6lookup: + ; } - if (rt == NULL) { - /* - * If in6_selectroute() does not return a route entry - * dst may not have been updated. - */ - *dst = dst_sa; /* XXX */ - } /* Then rt (for unicast) and ifp must be non-NULL valid values. */ if ((flags & IPV6_FORWARDING) == 0) { /* XXX: the FORWARDING flag can be set for mrouting. */ in6_ifstat_inc(ifp, ifs6_out_request); } - if (rt != NULL) { - ia = (struct in6_ifaddr *)(rt->rt_ifa); - counter_u64_add(rt->rt_pksent, 1); - } /* Setup data structures for scope ID checks. */ src0 = ip6->ip6_src; @@ -869,6 +940,9 @@ again: if ((error = ip6_getpmtu(ro_pmtu, ro != ro_pmtu, ifp, &ip6->ip6_dst, &mtu, &alwaysfrag, fibnum, *nexthdrp)) != 0) goto bad; + KASSERT(mtu > 0, ("%s:%d: mtu %ld, ro_pmtu %p ro %p ifp %p " + "alwaysfrag %d fibnum %u\n", __func__, __LINE__, mtu, ro_pmtu, ro, + ifp, alwaysfrag, fibnum)); /* * The caller of this function may specify to use the minimum MTU @@ -972,7 +1046,8 @@ again: error = netisr_queue(NETISR_IPV6, m); goto done; } else { - RO_INVALIDATE_CACHE(ro); + if (ro != NULL) + RO_INVALIDATE_CACHE(ro); needfiblookup = 1; /* Redo the routing table lookup. */ } } @@ -980,7 +1055,8 @@ again: if (fibnum != M_GETFIB(m)) { m->m_flags |= M_SKIP_FIREWALL; fibnum = M_GETFIB(m); - RO_INVALIDATE_CACHE(ro); + if (ro != NULL) + RO_INVALIDATE_CACHE(ro); needfiblookup = 1; } if (needfiblookup) @@ -1005,7 +1081,10 @@ again: /* Or forward to some other address? */ if ((m->m_flags & M_IP6_NEXTHOP) && (fwd_tag = m_tag_find(m, PACKET_TAG_IPFORWARD, NULL)) != NULL) { - dst = (struct sockaddr_in6 *)&ro->ro_dst; + if (ro != NULL) + dst = (struct sockaddr_in6 *)&ro->ro_dst; + else + dst = &sin6; bcopy((fwd_tag+1), &dst_sa, sizeof(struct sockaddr_in6)); m->m_flags |= M_SKIP_FIREWALL; m->m_flags &= ~M_IP6_NEXTHOP; @@ -1188,8 +1267,6 @@ sendorfree: IP6STAT_INC(ip6s_fragmented); done: - if (ro == &ip6route) - RO_RTFREE(ro); return (error); freehdrs: @@ -1405,22 +1482,25 @@ ip6_getpmtu(struct route_in6 *ro_pmtu, int do_lookup, struct nhop6_basic nh6; struct in6_addr kdst; uint32_t scopeid; - struct sockaddr_in6 *sa6_dst; + struct sockaddr_in6 *sa6_dst, sin6; u_long mtu; mtu = 0; - if (do_lookup) { + if (ro_pmtu == NULL || do_lookup) { /* * Here ro_pmtu has final destination address, while * ro might represent immediate destination. * Use ro_pmtu destination since mtu might differ. */ - sa6_dst = (struct sockaddr_in6 *)&ro_pmtu->ro_dst; - if (!IN6_ARE_ADDR_EQUAL(&sa6_dst->sin6_addr, dst)) - ro_pmtu->ro_mtu = 0; + if (ro_pmtu != NULL) { + sa6_dst = (struct sockaddr_in6 *)&ro_pmtu->ro_dst; + if (!IN6_ARE_ADDR_EQUAL(&sa6_dst->sin6_addr, dst)) + ro_pmtu->ro_mtu = 0; + } else + sa6_dst = &sin6; - if (ro_pmtu->ro_mtu == 0) { + if (ro_pmtu == NULL || ro_pmtu->ro_mtu == 0) { bzero(sa6_dst, sizeof(*sa6_dst)); sa6_dst->sin6_family = AF_INET6; sa6_dst->sin6_len = sizeof(struct sockaddr_in6); @@ -1428,14 +1508,16 @@ ip6_getpmtu(struct route_in6 *ro_pmtu, int do_lookup, in6_splitscope(dst, &kdst, &scopeid); if (fib6_lookup_nh_basic(fibnum, &kdst, scopeid, 0, 0, - &nh6) == 0) - ro_pmtu->ro_mtu = nh6.nh_mtu; - } - - mtu = ro_pmtu->ro_mtu; + &nh6) == 0) { + mtu = nh6.nh_mtu; + if (ro_pmtu != NULL) + ro_pmtu->ro_mtu = mtu; + } + } else + mtu = ro_pmtu->ro_mtu; } - if (ro_pmtu->ro_rt) + if (ro_pmtu != NULL && ro_pmtu->ro_rt != NULL) mtu = ro_pmtu->ro_rt->rt_mtu; return (ip6_calcmtu(ifp, dst, mtu, mtup, alwaysfragp, proto)); From owner-svn-src-all@freebsd.org Tue Mar 3 12:50:47 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 5ACC226E97B; Tue, 3 Mar 2020 12:50:47 +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 48Wxh65R4vz4TMT; Tue, 3 Mar 2020 12:50:46 +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 560955635; Tue, 3 Mar 2020 12:50:46 +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 023Cok4c049786; Tue, 3 Mar 2020 12:50:46 GMT (envelope-from andrew@FreeBSD.org) Received: (from andrew@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 023CojOv049785; Tue, 3 Mar 2020 12:50:45 GMT (envelope-from andrew@FreeBSD.org) Message-Id: <202003031250.023CojOv049785@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: andrew set sender to andrew@FreeBSD.org using -f From: Andrew Turner Date: Tue, 3 Mar 2020 12:50:45 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r358573 - in head/sys/arm64: arm64 include X-SVN-Group: head X-SVN-Commit-Author: andrew X-SVN-Commit-Paths: in head/sys/arm64: arm64 include X-SVN-Commit-Revision: 358573 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages 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, 03 Mar 2020 12:50:47 -0000 Author: andrew Date: Tue Mar 3 12:50:45 2020 New Revision: 358573 URL: https://svnweb.freebsd.org/changeset/base/358573 Log: Fix the spelling of the VIPT cache type field Sponsored by: Innovate UK Modified: head/sys/arm64/arm64/identcpu.c head/sys/arm64/include/armreg.h Modified: head/sys/arm64/arm64/identcpu.c ============================================================================== --- head/sys/arm64/arm64/identcpu.c Tue Mar 3 11:32:47 2020 (r358572) +++ head/sys/arm64/arm64/identcpu.c Tue Mar 3 12:50:45 2020 (r358573) @@ -1105,8 +1105,8 @@ print_ctr_fields(struct sbuf *sb, uint64_t reg, void * case CTR_L1IP_AIVIVT: sbuf_printf(sb, "AIVIVT"); break; - case CTR_L1IP_VIVT: - sbuf_printf(sb, "VIVT"); + case CTR_L1IP_VIPT: + sbuf_printf(sb, "VIPT"); break; case CTR_L1IP_PIPT: sbuf_printf(sb, "PIPT"); Modified: head/sys/arm64/include/armreg.h ============================================================================== --- head/sys/arm64/include/armreg.h Tue Mar 3 11:32:47 2020 (r358572) +++ head/sys/arm64/include/armreg.h Tue Mar 3 12:50:45 2020 (r358573) @@ -109,7 +109,7 @@ #define CTR_L1IP_VAL(reg) ((reg) & CTR_L1IP_MASK) #define CTR_L1IP_VPIPT (0 << CTR_L1IP_SHIFT) #define CTR_L1IP_AIVIVT (1 << CTR_L1IP_SHIFT) -#define CTR_L1IP_VIVT (2 << CTR_L1IP_SHIFT) +#define CTR_L1IP_VIPT (2 << CTR_L1IP_SHIFT) #define CTR_L1IP_PIPT (3 << CTR_L1IP_SHIFT) #define CTR_ILINE_SHIFT 0 #define CTR_ILINE_MASK (0xf << CTR_ILINE_SHIFT) From owner-svn-src-all@freebsd.org Tue Mar 3 13:25:10 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 2309F26FC0D; Tue, 3 Mar 2020 13:25:10 +0000 (UTC) (envelope-from 0mp@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 48WyRn2Fr6z4Y1Q; Tue, 3 Mar 2020 13:25:09 +0000 (UTC) (envelope-from 0mp@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 179F75C84; Tue, 3 Mar 2020 13:25:09 +0000 (UTC) (envelope-from 0mp@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 023DP8gm074267; Tue, 3 Mar 2020 13:25:08 GMT (envelope-from 0mp@FreeBSD.org) Received: (from 0mp@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 023DP8YN074266; Tue, 3 Mar 2020 13:25:08 GMT (envelope-from 0mp@FreeBSD.org) Message-Id: <202003031325.023DP8YN074266@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: 0mp set sender to 0mp@FreeBSD.org using -f From: Mateusz Piotrowski <0mp@FreeBSD.org> Date: Tue, 3 Mar 2020 13:25:08 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r358574 - head/usr.sbin/powerd X-SVN-Group: head X-SVN-Commit-Author: 0mp X-SVN-Commit-Paths: head/usr.sbin/powerd X-SVN-Commit-Revision: 358574 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages 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, 03 Mar 2020 13:25:10 -0000 Author: 0mp (doc,ports committer) Date: Tue Mar 3 13:25:08 2020 New Revision: 358574 URL: https://svnweb.freebsd.org/changeset/base/358574 Log: powerd.8: Improve style & fix typos - Sort options. - Do not use macros (like .Ar) to specify width for Bl (macros within that string are not expanded). - Use Cm instead of Ar for mode names. - Fix some typos reported by mandoc. - Move the documentation of the PID file from the -P flag description to the FILES section. Approved by: bcr (mentor) Differential Revision: https://reviews.freebsd.org/D23941 Modified: head/usr.sbin/powerd/powerd.8 Modified: head/usr.sbin/powerd/powerd.8 ============================================================================== --- head/usr.sbin/powerd/powerd.8 Tue Mar 3 12:50:45 2020 (r358573) +++ head/usr.sbin/powerd/powerd.8 Tue Mar 3 13:25:08 2020 (r358574) @@ -24,7 +24,7 @@ .\" .\" $FreeBSD$ .\" -.Dd January 6, 2019 +.Dd March 3, 2020 .Dt POWERD 8 .Os .Sh NAME @@ -35,12 +35,12 @@ .Op Fl a Ar mode .Op Fl b Ar mode .Op Fl i Ar percent -.Op Fl m Ar freq .Op Fl M Ar freq +.Op Fl m Ar freq .Op Fl N .Op Fl n Ar mode -.Op Fl p Ar ival .Op Fl P Ar pidfile +.Op Fl p Ar ival .Op Fl r Ar percent .Op Fl s Ar source .Op Fl v @@ -51,42 +51,42 @@ utility monitors the system state and sets various pow accordingly. It offers power-saving modes that can be individually selected for operation on AC power or batteries. -.Bl -tag -width ".Ar hiadaptive" -.It Ar maximum +.Bl -tag -width "hiadaptive" +.It Cm maximum Choose the highest performance values. May be abbreviated as -.Ar max . -.It Ar minimum +.Cm max . +.It Cm minimum Choose the lowest performance values to get the most power savings. May be abbreviated as -.Ar min . -.It Ar adaptive +.Cm min . +.It Cm adaptive Attempt to strike a balance by degrading performance when the system appears idle and increasing it when the system is busy. It offers a good balance between a small performance loss for greatly increased power savings. May be abbreviated as -.Ar adp . -.It Ar hiadaptive +.Cm adp . +.It Cm hiadaptive Like -.Ar adaptive +.Cm adaptive mode, but tuned for systems where performance and interactivity are more important than power consumption. It increases frequency faster, reduces frequency less aggressively, and will maintain full frequency for longer. May be abbreviated as -.Ar hadp . +.Cm hadp . .El .Pp The default mode is -.Ar adaptive +.Cm adaptive for battery power and -.Ar hiadaptive +.Cm hiadaptive for the rest. .Pp .Nm recognizes these runtime options: -.Bl -tag -width ".Fl r Ar percent" +.Bl -tag -width "-r percent" .It Fl a Ar mode Selects the .Ar mode @@ -99,26 +99,24 @@ to use while on battery power. Specifies the CPU load percent level when adaptive mode should begin to degrade performance to save power. The default is 50% or lower. -.It Fl m Ar freq -Specifies the minimum frequency to throttle down to. .It Fl M Ar freq Specifies the maximum frequency to throttle up to. +.It Fl m Ar freq +Specifies the minimum frequency to throttle down to. .It Fl N Treat "nice" time as idle for the purpose of load calculation; -i.e. do not increase the CPU frequency if the CPU is only busy +i.e., do not increase the CPU frequency if the CPU is only busy with "nice" processes. .It Fl n Ar mode Selects the .Ar mode to use normally when the AC line state is unknown. +.It Fl P Ar pidfile +Specifies an alternative file in which the process ID should be stored. .It Fl p Ar ival Specifies a different polling interval (in milliseconds) for AC line state and system idle levels. The default is 250 ms. -.It Fl P Ar pidfile -Specifies an alternative file in which the process ID should be stored. -The default is -.Pa /var/run/powerd.pid . .It Fl r Ar percent Specifies the CPU load percent level where adaptive mode should consider the CPU running and increase performance. @@ -136,6 +134,11 @@ Verbose mode. Messages about power changes will be printed to stdout and .Nm will operate in the foreground. +.El +.Sh FILES +.Bl -tag -width "/var/run/powerd.pid" +.It Pa /var/run/powerd.pid +The default PID file. .El .Sh SEE ALSO .Xr acpi 4 , From owner-svn-src-all@freebsd.org Tue Mar 3 13:48:13 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id B14992502C1; Tue, 3 Mar 2020 13:48:13 +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 48WyyP43Nqz4bwn; Tue, 3 Mar 2020 13:48:13 +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 547F0604F; Tue, 3 Mar 2020 13:48:13 +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 023DmCIo086079; Tue, 3 Mar 2020 13:48:12 GMT (envelope-from bz@FreeBSD.org) Received: (from bz@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 023DmCWl086076; Tue, 3 Mar 2020 13:48:12 GMT (envelope-from bz@FreeBSD.org) Message-Id: <202003031348.023DmCWl086076@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bz set sender to bz@FreeBSD.org using -f From: "Bjoern A. Zeeb" Date: Tue, 3 Mar 2020 13:48:12 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r358575 - head/sys/netinet6 X-SVN-Group: head X-SVN-Commit-Author: bz X-SVN-Commit-Paths: head/sys/netinet6 X-SVN-Commit-Revision: 358575 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages 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, 03 Mar 2020 13:48:13 -0000 Author: bz Date: Tue Mar 3 13:48:12 2020 New Revision: 358575 URL: https://svnweb.freebsd.org/changeset/base/358575 Log: ip6: retire in6_selectroute_fib() as promised 8 years ago In r231852 I added in6_selectroute_fib() as a compat function with the fibnum as an extra argument compared to in6_selectroute() to keep the KPI stable. Way too late retire this function again and add the fib to in6_selectroute() which also only has a single consumer now and was an orphan function before. Modified: head/sys/netinet6/in6_src.c head/sys/netinet6/ip6_output.c head/sys/netinet6/ip6_var.h Modified: head/sys/netinet6/in6_src.c ============================================================================== --- head/sys/netinet6/in6_src.c Tue Mar 3 13:25:08 2020 (r358574) +++ head/sys/netinet6/in6_src.c Tue Mar 3 13:48:12 2020 (r358575) @@ -640,10 +640,10 @@ selectroute(struct sockaddr_in6 *dstsock, struct ip6_p if (dstsock->sin6_addr.s6_addr32[0] == 0 && dstsock->sin6_addr.s6_addr32[1] == 0 && !IN6_IS_ADDR_LOOPBACK(&dstsock->sin6_addr)) { - printf("in6_selectroute: strange destination %s\n", + printf("%s: strange destination %s\n", __func__, ip6_sprintf(ip6buf, &dstsock->sin6_addr)); } else { - printf("in6_selectroute: destination = %s%%%d\n", + printf("%s: destination = %s%%%d\n", __func__, ip6_sprintf(ip6buf, &dstsock->sin6_addr), dstsock->sin6_scope_id); /* for debug */ } @@ -895,33 +895,16 @@ in6_selectif(struct sockaddr_in6 *dstsock, struct ip6_ return (0); } -/* - * Public wrapper function to selectroute(). - * - * XXX-BZ in6_selectroute() should and will grow the FIB argument. The - * in6_selectroute_fib() function is only there for backward compat on stable. - */ +/* Public wrapper function to selectroute(). */ int in6_selectroute(struct sockaddr_in6 *dstsock, struct ip6_pktopts *opts, struct ip6_moptions *mopts, struct route_in6 *ro, - struct ifnet **retifp, struct rtentry **retrt) -{ - - return (selectroute(dstsock, opts, mopts, ro, retifp, - retrt, 0, RT_DEFAULT_FIB)); -} - -#ifndef BURN_BRIDGES -int -in6_selectroute_fib(struct sockaddr_in6 *dstsock, struct ip6_pktopts *opts, - struct ip6_moptions *mopts, struct route_in6 *ro, struct ifnet **retifp, struct rtentry **retrt, u_int fibnum) { return (selectroute(dstsock, opts, mopts, ro, retifp, retrt, 0, fibnum)); } -#endif /* * Default hop limit selection. The precedence is as follows: Modified: head/sys/netinet6/ip6_output.c ============================================================================== --- head/sys/netinet6/ip6_output.c Tue Mar 3 13:25:08 2020 (r358574) +++ head/sys/netinet6/ip6_output.c Tue Mar 3 13:48:12 2020 (r358575) @@ -709,7 +709,7 @@ again: dst_sa.sin6_len = sizeof(dst_sa); dst_sa.sin6_addr = ip6->ip6_dst; } - error = in6_selectroute_fib(&dst_sa, opt, im6o, ro, &ifp, + error = in6_selectroute(&dst_sa, opt, im6o, ro, &ifp, &rt, fibnum); if (error != 0) { IP6STAT_INC(ip6s_noroute); Modified: head/sys/netinet6/ip6_var.h ============================================================================== --- head/sys/netinet6/ip6_var.h Tue Mar 3 13:25:08 2020 (r358574) +++ head/sys/netinet6/ip6_var.h Tue Mar 3 13:48:12 2020 (r358575) @@ -416,10 +416,7 @@ int in6_selectsrc_addr(uint32_t, const struct in6_addr uint32_t, struct ifnet *, struct in6_addr *, int *); int in6_selectroute(struct sockaddr_in6 *, struct ip6_pktopts *, struct ip6_moptions *, struct route_in6 *, struct ifnet **, - struct rtentry **); -int in6_selectroute_fib(struct sockaddr_in6 *, struct ip6_pktopts *, - struct ip6_moptions *, struct route_in6 *, struct ifnet **, - struct rtentry **, u_int); + struct rtentry **, u_int); u_int32_t ip6_randomid(void); u_int32_t ip6_randomflowlabel(void); void in6_delayed_cksum(struct mbuf *m, uint32_t plen, u_short offset); From owner-svn-src-all@freebsd.org Tue Mar 3 14:07:46 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id A8870250A5A; Tue, 3 Mar 2020 14:07:46 +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 48WzNx6fmZz3R0n; Tue, 3 Mar 2020 14:07:45 +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 85D796409; Tue, 3 Mar 2020 14:07:44 +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 023E7iwO098045; Tue, 3 Mar 2020 14:07:44 GMT (envelope-from bz@FreeBSD.org) Received: (from bz@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 023E7iB9098044; Tue, 3 Mar 2020 14:07:44 GMT (envelope-from bz@FreeBSD.org) Message-Id: <202003031407.023E7iB9098044@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bz set sender to bz@FreeBSD.org using -f From: "Bjoern A. Zeeb" Date: Tue, 3 Mar 2020 14:07:44 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r358576 - head/sys/kern X-SVN-Group: head X-SVN-Commit-Author: bz X-SVN-Commit-Paths: head/sys/kern X-SVN-Commit-Revision: 358576 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages 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, 03 Mar 2020 14:07:46 -0000 Author: bz Date: Tue Mar 3 14:07:44 2020 New Revision: 358576 URL: https://svnweb.freebsd.org/changeset/base/358576 Log: upic_ktrls: make RSS compile again here The results of ktls_get_cpu() are stored in u_int and NETISR_CPUID_NONE requires u_int. Adjust uint16_t to uint_t in order to make RSS kernels compile some more again. HPTS still has to be fixed, which is a bit more complicated. Reviewed by: jhb, gallatin, rrs Differential Revision: https://reviews.freebsd.org/D23726 Modified: head/sys/kern/uipc_ktls.c Modified: head/sys/kern/uipc_ktls.c ============================================================================== --- head/sys/kern/uipc_ktls.c Tue Mar 3 13:48:12 2020 (r358575) +++ head/sys/kern/uipc_ktls.c Tue Mar 3 14:07:44 2020 (r358576) @@ -299,11 +299,11 @@ ktls_crypto_backend_deregister(struct ktls_crypto_back } #if defined(INET) || defined(INET6) -static uint16_t +static u_int ktls_get_cpu(struct socket *so) { struct inpcb *inp; - uint16_t cpuid; + u_int cpuid; inp = sotoinpcb(so); #ifdef RSS From owner-svn-src-all@freebsd.org Tue Mar 3 14:15:32 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id C3B812510EB; Tue, 3 Mar 2020 14:15:32 +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 48WzYw27CYz43QR; Tue, 3 Mar 2020 14:15:31 +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 CDF1A662F; Tue, 3 Mar 2020 14:15:30 +0000 (UTC) (envelope-from bz@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 023EFUp5004157; Tue, 3 Mar 2020 14:15:30 GMT (envelope-from bz@FreeBSD.org) Received: (from bz@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 023EFUTE004156; Tue, 3 Mar 2020 14:15:30 GMT (envelope-from bz@FreeBSD.org) Message-Id: <202003031415.023EFUTE004156@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bz set sender to bz@FreeBSD.org using -f From: "Bjoern A. Zeeb" Date: Tue, 3 Mar 2020 14:15:30 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r358577 - head/sys/netinet X-SVN-Group: head X-SVN-Commit-Author: bz X-SVN-Commit-Paths: head/sys/netinet X-SVN-Commit-Revision: 358577 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages 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, 03 Mar 2020 14:15:33 -0000 Author: bz Date: Tue Mar 3 14:15:30 2020 New Revision: 358577 URL: https://svnweb.freebsd.org/changeset/base/358577 Log: tcp_hpts: make RSS kernel compile again. Add proper #includes, and #ifdefs and some style fixes to make RSS kernels compile again. There are still possible issues with uin16_t vs. uint_t cpuid which I am not going near. Reviewed by: gallatin Differential Revision: https://reviews.freebsd.org/D23726 Modified: head/sys/netinet/tcp_hpts.c Modified: head/sys/netinet/tcp_hpts.c ============================================================================== --- head/sys/netinet/tcp_hpts.c Tue Mar 3 14:07:44 2020 (r358576) +++ head/sys/netinet/tcp_hpts.c Tue Mar 3 14:15:30 2020 (r358577) @@ -28,7 +28,9 @@ __FBSDID("$FreeBSD$"); #include "opt_inet.h" #include "opt_inet6.h" +#include "opt_rss.h" #include "opt_tcpdebug.h" + /** * Some notes about usage. * @@ -151,6 +153,11 @@ __FBSDID("$FreeBSD$"); #include #include +#ifdef RSS +#include +#include +#endif + #define TCPSTATES /* for logging */ #include @@ -180,7 +187,6 @@ __FBSDID("$FreeBSD$"); #include #endif -#include "opt_rss.h" MALLOC_DEFINE(M_TCPHPTS, "tcp_hpts", "TCP hpts"); #ifdef RSS @@ -1151,9 +1157,10 @@ hpts_random_cpu(struct inpcb *inp){ } static uint16_t -hpts_cpuid(struct inpcb *inp){ +hpts_cpuid(struct inpcb *inp) +{ u_int cpuid; -#ifdef NUMA +#if !defined(RSS) && defined(NUMA) struct hpts_domain_info *di; #endif @@ -1167,7 +1174,7 @@ hpts_cpuid(struct inpcb *inp){ return (inp->inp_hpts_cpu); } /* If one is set the other must be the same */ -#ifdef RSS +#ifdef RSS cpuid = rss_hash2cpuid(inp->inp_flowid, inp->inp_flowtype); if (cpuid == NETISR_CPUID_NONE) return (hpts_random_cpu(inp)); From owner-svn-src-all@freebsd.org Tue Mar 3 14:58:55 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 228DA2521E8; Tue, 3 Mar 2020 14:58:55 +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 48X0Wy65Ttz3Q0j; Tue, 3 Mar 2020 14:58:54 +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 78FA46DEC; Tue, 3 Mar 2020 14:58:54 +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 023EwsxS028216; Tue, 3 Mar 2020 14:58:54 GMT (envelope-from fsu@FreeBSD.org) Received: (from fsu@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 023Ewr6l028214; Tue, 3 Mar 2020 14:58:53 GMT (envelope-from fsu@FreeBSD.org) Message-Id: <202003031458.023Ewr6l028214@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: fsu set sender to fsu@FreeBSD.org using -f From: Fedor Uporov Date: Tue, 3 Mar 2020 14:58:53 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r358578 - stable/12/sys/fs/ext2fs X-SVN-Group: stable-12 X-SVN-Commit-Author: fsu X-SVN-Commit-Paths: stable/12/sys/fs/ext2fs X-SVN-Commit-Revision: 358578 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages 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, 03 Mar 2020 14:58:55 -0000 Author: fsu Date: Tue Mar 3 14:58:53 2020 New Revision: 358578 URL: https://svnweb.freebsd.org/changeset/base/358578 Log: MFC r358073: Add a EXT2FS-specific implementation for lseek(SEEK_DATA). Reviewed by: pfg MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D23605 Modified: stable/12/sys/fs/ext2fs/ext2_bmap.c stable/12/sys/fs/ext2fs/ext2_extern.h stable/12/sys/fs/ext2fs/ext2_vnops.c Modified: stable/12/sys/fs/ext2fs/ext2_bmap.c ============================================================================== --- stable/12/sys/fs/ext2fs/ext2_bmap.c Tue Mar 3 14:15:30 2020 (r358577) +++ stable/12/sys/fs/ext2fs/ext2_bmap.c Tue Mar 3 14:58:53 2020 (r358578) @@ -139,6 +139,47 @@ ext4_bmapext(struct vnode *vp, int32_t bn, int64_t *bn return (error); } +static int +readindir(struct vnode *vp, e2fs_lbn_t lbn, e2fs_daddr_t daddr, struct buf **bpp) +{ + struct buf *bp; + struct mount *mp; + struct ext2mount *ump; + int error; + + mp = vp->v_mount; + ump = VFSTOEXT2(mp); + + bp = getblk(vp, lbn, mp->mnt_stat.f_iosize, 0, 0, 0); + if ((bp->b_flags & B_CACHE) == 0) { + KASSERT(daddr != 0, + ("readindir: indirect block not in cache")); + + bp->b_blkno = blkptrtodb(ump, daddr); + bp->b_iocmd = BIO_READ; + bp->b_flags &= ~B_INVAL; + bp->b_ioflags &= ~BIO_ERROR; + vfs_busy_pages(bp, 0); + bp->b_iooffset = dbtob(bp->b_blkno); + bstrategy(bp); +#ifdef RACCT + if (racct_enable) { + PROC_LOCK(curproc); + racct_add_buf(curproc, bp, 0); + PROC_UNLOCK(curproc); + } +#endif + curthread->td_ru.ru_inblock++; + error = bufwait(bp); + if (error != 0) { + brelse(bp); + return (error); + } + } + *bpp = bp; + return (0); +} + /* * Indirect blocks are now on the vnode for the file. They are given negative * logical block numbers. Indirect blocks are addressed by the negative @@ -228,35 +269,10 @@ ext2_bmaparray(struct vnode *vp, daddr_t bn, daddr_t * */ if (bp) bqrelse(bp); + error = readindir(vp, metalbn, daddr, &bp); + if (error != 0) + return (error); - bp = getblk(vp, metalbn, bsize, 0, 0, 0); - if ((bp->b_flags & B_CACHE) == 0) { -#ifdef INVARIANTS - if (!daddr) - panic("ext2_bmaparray: indirect block not in cache"); -#endif - bp->b_blkno = blkptrtodb(ump, daddr); - bp->b_iocmd = BIO_READ; - bp->b_flags &= ~B_INVAL; - bp->b_ioflags &= ~BIO_ERROR; - vfs_busy_pages(bp, 0); - bp->b_iooffset = dbtob(bp->b_blkno); - bstrategy(bp); -#ifdef RACCT - if (racct_enable) { - PROC_LOCK(curproc); - racct_add_buf(curproc, bp, 0); - PROC_UNLOCK(curproc); - } -#endif - curthread->td_ru.ru_inblock++; - error = bufwait(bp); - if (error) { - brelse(bp); - return (error); - } - } - daddr = ((e2fs_daddr_t *)bp->b_data)[ap->in_off]; if (num == 1 && daddr && runp) { for (bn = ap->in_off + 1; @@ -294,6 +310,107 @@ ext2_bmaparray(struct vnode *vp, daddr_t bn, daddr_t * *bnp = -1; } return (0); +} + +static e2fs_lbn_t +lbn_count(struct ext2mount *ump, int level) + +{ + e2fs_lbn_t blockcnt; + + for (blockcnt = 1; level > 0; level--) + blockcnt *= MNINDIR(ump); + return (blockcnt); +} + +int +ext2_bmap_seekdata(struct vnode *vp, off_t *offp) +{ + struct buf *bp; + struct indir a[EXT2_NIADDR + 1], *ap; + struct inode *ip; + struct mount *mp; + struct ext2mount *ump; + e2fs_daddr_t bn, daddr, nextbn; + uint64_t bsize; + off_t numblks; + int error, num, num1, off; + + bp = NULL; + error = 0; + ip = VTOI(vp); + mp = vp->v_mount; + ump = VFSTOEXT2(mp); + + if (vp->v_type != VREG || (ip->i_flags & SF_SNAPSHOT) != 0) + return (EINVAL); + if (*offp < 0 || *offp >= ip->i_size) + return (ENXIO); + + bsize = mp->mnt_stat.f_iosize; + for (bn = *offp / bsize, numblks = howmany(ip->i_size, bsize); + bn < numblks; bn = nextbn) { + if (bn < EXT2_NDADDR) { + daddr = ip->i_db[bn]; + if (daddr != 0) + break; + nextbn = bn + 1; + continue; + } + + ap = a; + error = ext2_getlbns(vp, bn, ap, &num); + if (error != 0) + break; + MPASS(num >= 2); + daddr = ip->i_ib[ap->in_off]; + ap++, num--; + for (nextbn = EXT2_NDADDR, num1 = num - 1; num1 > 0; num1--) + nextbn += lbn_count(ump, num1); + if (daddr == 0) { + nextbn += lbn_count(ump, num); + continue; + } + + for (; daddr != 0 && num > 0; ap++, num--) { + if (bp != NULL) + bqrelse(bp); + error = readindir(vp, ap->in_lbn, daddr, &bp); + if (error != 0) + return (error); + + /* + * Scan the indirect block until we find a non-zero + * pointer. + */ + off = ap->in_off; + do { + daddr = ((e2fs_daddr_t *)bp->b_data)[off]; + } while (daddr == 0 && ++off < MNINDIR(ump)); + nextbn += off * lbn_count(ump, num - 1); + + /* + * We need to recompute the LBNs of indirect + * blocks, so restart with the updated block offset. + */ + if (off != ap->in_off) + break; + } + if (num == 0) { + /* + * We found a data block. + */ + bn = nextbn; + break; + } + } + if (bp != NULL) + bqrelse(bp); + if (bn >= numblks) + error = ENXIO; + if (error == 0 && *offp < bn * bsize) + *offp = bn * bsize; + return (error); } /* Modified: stable/12/sys/fs/ext2fs/ext2_extern.h ============================================================================== --- stable/12/sys/fs/ext2fs/ext2_extern.h Tue Mar 3 14:15:30 2020 (r358577) +++ stable/12/sys/fs/ext2fs/ext2_extern.h Tue Mar 3 14:58:53 2020 (r358578) @@ -64,6 +64,7 @@ e4fs_daddr_t ext2_blkpref(struct inode *, e2fs_lbn_t, int ext2_bmap(struct vop_bmap_args *); int ext2_bmaparray(struct vnode *, daddr_t, daddr_t *, int *, int *); int ext4_bmapext(struct vnode *, int32_t, int64_t *, int *, int *); +int ext2_bmap_seekdata(struct vnode *, off_t *); void ext2_clusteracct(struct m_ext2fs *, char *, int, e4fs_daddr_t, int); void ext2_dirbad(struct inode *ip, doff_t offset, char *how); int ext2_ei2i(struct ext2fs_dinode *, struct inode *); Modified: stable/12/sys/fs/ext2fs/ext2_vnops.c ============================================================================== --- stable/12/sys/fs/ext2fs/ext2_vnops.c Tue Mar 3 14:15:30 2020 (r358577) +++ stable/12/sys/fs/ext2fs/ext2_vnops.c Tue Mar 3 14:58:53 2020 (r358578) @@ -2155,11 +2155,24 @@ ext2_read(struct vop_read_args *ap) static int ext2_ioctl(struct vop_ioctl_args *ap) { + struct vnode *vp; + int error; + vp = ap->a_vp; switch (ap->a_command) { case FIOSEEKDATA: + if (!(VTOI(vp)->i_flag & IN_E4EXTENTS)) { + error = vn_lock(vp, LK_SHARED); + if (error == 0) { + error = ext2_bmap_seekdata(vp, + (off_t *)ap->a_data); + VOP_UNLOCK(vp, 0); + } else + error = EBADF; + return (error); + } case FIOSEEKHOLE: - return (vn_bmap_seekhole(ap->a_vp, ap->a_command, + return (vn_bmap_seekhole(vp, ap->a_command, (off_t *)ap->a_data, ap->a_cred)); default: return (ENOTTY); From owner-svn-src-all@freebsd.org Tue Mar 3 15:02:09 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 36CFD252459; Tue, 3 Mar 2020 15:02:09 +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 48X0bj0jmfz3ylX; Tue, 3 Mar 2020 15:02:09 +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 136536FA1; Tue, 3 Mar 2020 15:02:09 +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 023F28RW033312; Tue, 3 Mar 2020 15:02:08 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 023F27tF033304; Tue, 3 Mar 2020 15:02:07 GMT (envelope-from kib@FreeBSD.org) Message-Id: <202003031502.023F27tF033304@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Tue, 3 Mar 2020 15:02: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: r358579 - in stable/12/sys: amd64/amd64 dev/cpuctl i386/i386 x86/acpica x86/include x86/x86 X-SVN-Group: stable-12 X-SVN-Commit-Author: kib X-SVN-Commit-Paths: in stable/12/sys: amd64/amd64 dev/cpuctl i386/i386 x86/acpica x86/include x86/x86 X-SVN-Commit-Revision: 358579 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages 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, 03 Mar 2020 15:02:09 -0000 Author: kib Date: Tue Mar 3 15:02:07 2020 New Revision: 358579 URL: https://svnweb.freebsd.org/changeset/base/358579 Log: MFC r358315: Fix IBRS for machines with IBRS_ALL capability. Modified: stable/12/sys/amd64/amd64/initcpu.c stable/12/sys/amd64/amd64/support.S stable/12/sys/dev/cpuctl/cpuctl.c stable/12/sys/i386/i386/support.s stable/12/sys/x86/acpica/acpi_wakeup.c stable/12/sys/x86/include/x86_var.h stable/12/sys/x86/x86/cpu_machdep.c Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/amd64/amd64/initcpu.c ============================================================================== --- stable/12/sys/amd64/amd64/initcpu.c Tue Mar 3 14:58:53 2020 (r358578) +++ stable/12/sys/amd64/amd64/initcpu.c Tue Mar 3 15:02:07 2020 (r358579) @@ -255,7 +255,7 @@ initializecpu(void) wrmsr(MSR_EFER, msr); pg_nx = PG_NX; } - hw_ibrs_recalculate(); + hw_ibrs_recalculate(false); hw_ssb_recalculate(false); amd64_syscall_ret_flush_l1d_recalc(); switch (cpu_vendor_id) { Modified: stable/12/sys/amd64/amd64/support.S ============================================================================== --- stable/12/sys/amd64/amd64/support.S Tue Mar 3 14:58:53 2020 (r358578) +++ stable/12/sys/amd64/amd64/support.S Tue Mar 3 15:02:07 2020 (r358579) @@ -1547,7 +1547,7 @@ handle_ibrs_\l: /* all callers already saved %rax, %rdx, and %rcx */ ENTRY(handle_ibrs_entry) - cmpb $0,hw_ibrs_active(%rip) + cmpb $0,hw_ibrs_ibpb_active(%rip) je 1f movl $MSR_IA32_SPEC_CTRL,%ecx rdmsr Modified: stable/12/sys/dev/cpuctl/cpuctl.c ============================================================================== --- stable/12/sys/dev/cpuctl/cpuctl.c Tue Mar 3 14:58:53 2020 (r358578) +++ stable/12/sys/dev/cpuctl/cpuctl.c Tue Mar 3 15:02:07 2020 (r358579) @@ -538,8 +538,8 @@ cpuctl_do_eval_cpu_features(int cpu, struct thread *td set_cpu(cpu, td); identify_cpu1(); identify_cpu2(); - hw_ibrs_recalculate(); restore_cpu(oldcpu, is_bound, td); + hw_ibrs_recalculate(true); hw_ssb_recalculate(true); #ifdef __amd64__ amd64_syscall_ret_flush_l1d_recalc(); Modified: stable/12/sys/i386/i386/support.s ============================================================================== --- stable/12/sys/i386/i386/support.s Tue Mar 3 14:58:53 2020 (r358578) +++ stable/12/sys/i386/i386/support.s Tue Mar 3 15:02:07 2020 (r358579) @@ -446,7 +446,7 @@ msr_onfault: ret ENTRY(handle_ibrs_entry) - cmpb $0,hw_ibrs_active + cmpb $0,hw_ibrs_ibpb_active je 1f movl $MSR_IA32_SPEC_CTRL,%ecx rdmsr Modified: stable/12/sys/x86/acpica/acpi_wakeup.c ============================================================================== --- stable/12/sys/x86/acpica/acpi_wakeup.c Tue Mar 3 14:58:53 2020 (r358578) +++ stable/12/sys/x86/acpica/acpi_wakeup.c Tue Mar 3 15:02:07 2020 (r358579) @@ -245,7 +245,7 @@ acpi_sleep_machdep(struct acpi_softc *sc, int state) } #endif #ifdef __amd64__ - hw_ibrs_active = 0; + hw_ibrs_ibpb_active = 0; hw_ssb_active = 0; cpu_stdext_feature3 = 0; CPU_FOREACH(i) { Modified: stable/12/sys/x86/include/x86_var.h ============================================================================== --- stable/12/sys/x86/include/x86_var.h Tue Mar 3 14:58:53 2020 (r358578) +++ stable/12/sys/x86/include/x86_var.h Tue Mar 3 15:02:07 2020 (r358579) @@ -84,7 +84,7 @@ extern int use_xsave; extern uint64_t xsave_mask; extern u_int max_apic_id; extern int pti; -extern int hw_ibrs_active; +extern int hw_ibrs_ibpb_active; extern int hw_mds_disable; extern int hw_ssb_active; extern int x86_taa_enable; @@ -141,7 +141,7 @@ int is_physical_memory(vm_paddr_t addr); int isa_nmi(int cd); void handle_ibrs_entry(void); void handle_ibrs_exit(void); -void hw_ibrs_recalculate(void); +void hw_ibrs_recalculate(bool all_cpus); void hw_mds_recalculate(void); void hw_ssb_recalculate(bool all_cpus); void x86_taa_recalculate(void); Modified: stable/12/sys/x86/x86/cpu_machdep.c ============================================================================== --- stable/12/sys/x86/x86/cpu_machdep.c Tue Mar 3 14:58:53 2020 (r358578) +++ stable/12/sys/x86/x86/cpu_machdep.c Tue Mar 3 15:02:07 2020 (r358579) @@ -855,23 +855,27 @@ nmi_handle_intr(u_int type, struct trapframe *frame) nmi_call_kdb(PCPU_GET(cpuid), type, frame); } -int hw_ibrs_active; +static int hw_ibrs_active; +int hw_ibrs_ibpb_active; int hw_ibrs_disable = 1; SYSCTL_INT(_hw, OID_AUTO, ibrs_active, CTLFLAG_RD, &hw_ibrs_active, 0, "Indirect Branch Restricted Speculation active"); void -hw_ibrs_recalculate(void) +hw_ibrs_recalculate(bool for_all_cpus) { if ((cpu_ia32_arch_caps & IA32_ARCH_CAP_IBRS_ALL) != 0) { - x86_msr_op(MSR_IA32_SPEC_CTRL, MSR_OP_LOCAL | - (hw_ibrs_disable ? MSR_OP_ANDNOT : MSR_OP_OR), + x86_msr_op(MSR_IA32_SPEC_CTRL, (for_all_cpus ? + MSR_OP_RENDEZVOUS : MSR_OP_LOCAL) | + (hw_ibrs_disable != 0 ? MSR_OP_ANDNOT : MSR_OP_OR), IA32_SPEC_CTRL_IBRS); - return; + hw_ibrs_active = hw_ibrs_disable == 0; + hw_ibrs_ibpb_active = 0; + } else { + hw_ibrs_active = hw_ibrs_ibpb_active = (cpu_stdext_feature3 & + CPUID_STDEXT3_IBPB) != 0 && !hw_ibrs_disable; } - hw_ibrs_active = (cpu_stdext_feature3 & CPUID_STDEXT3_IBPB) != 0 && - !hw_ibrs_disable; } static int @@ -884,7 +888,7 @@ hw_ibrs_disable_handler(SYSCTL_HANDLER_ARGS) if (error != 0 || req->newptr == NULL) return (error); hw_ibrs_disable = val != 0; - hw_ibrs_recalculate(); + hw_ibrs_recalculate(true); return (0); } SYSCTL_PROC(_hw, OID_AUTO, ibrs_disable, CTLTYPE_INT | CTLFLAG_RWTUN | From owner-svn-src-all@freebsd.org Tue Mar 3 15:05:14 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 8A64E252549; Tue, 3 Mar 2020 15:05:14 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 48X0gG3DKdz41Bd; Tue, 3 Mar 2020 15:05:14 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 6845B6FC4; Tue, 3 Mar 2020 15:05:14 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 023F5EBd034317; Tue, 3 Mar 2020 15:05:14 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 023F5EMj034316; Tue, 3 Mar 2020 15:05:14 GMT (envelope-from mav@FreeBSD.org) Message-Id: <202003031505.023F5EMj034316@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Tue, 3 Mar 2020 15:05:14 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r358580 - head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs X-SVN-Group: head X-SVN-Commit-Author: mav X-SVN-Commit-Paths: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs X-SVN-Commit-Revision: 358580 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages 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, 03 Mar 2020 15:05:14 -0000 Author: mav Date: Tue Mar 3 15:05:13 2020 New Revision: 358580 URL: https://svnweb.freebsd.org/changeset/base/358580 Log: Increase number of write completion threads, matching ZoL. Our iSCSI benchmarks on a large 80-core system show that previous limit of 8 threads can be a bottleneck. At some points this change increases write IOPS by as much as 50%. I am still not sure that so many threads is really required, but we tested lower amounts and got no significant benefits, while latencies were a bit worse, so decided to not diverge. MFC after: 1 week Sponsored by: iXsystems, Inc. Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa.c Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa.c ============================================================================== --- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa.c Tue Mar 3 15:02:07 2020 (r358579) +++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa.c Tue Mar 3 15:05:13 2020 (r358580) @@ -157,7 +157,7 @@ const zio_taskq_info_t zio_taskqs[ZIO_TYPES][ZIO_TASKQ /* ISSUE ISSUE_HIGH INTR INTR_HIGH */ { ZTI_ONE, ZTI_NULL, ZTI_ONE, ZTI_NULL }, /* NULL */ { ZTI_N(8), ZTI_NULL, ZTI_P(12, 8), ZTI_NULL }, /* READ */ - { ZTI_BATCH, ZTI_N(5), ZTI_N(8), ZTI_N(5) }, /* WRITE */ + { ZTI_BATCH, ZTI_N(5), ZTI_P(12, 8), ZTI_N(5) }, /* WRITE */ { ZTI_P(12, 8), ZTI_NULL, ZTI_ONE, ZTI_NULL }, /* FREE */ { ZTI_ONE, ZTI_NULL, ZTI_ONE, ZTI_NULL }, /* CLAIM */ { ZTI_ONE, ZTI_NULL, ZTI_ONE, ZTI_NULL }, /* IOCTL */ From owner-svn-src-all@freebsd.org Tue Mar 3 15:07:51 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 7B847252769; Tue, 3 Mar 2020 15:07:51 +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 48X0kF6m9sz43HV; Tue, 3 Mar 2020 15:07:49 +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 9A35E6FD5; Tue, 3 Mar 2020 15:07:49 +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 023F7nbG034483; Tue, 3 Mar 2020 15:07:49 GMT (envelope-from markj@FreeBSD.org) Received: (from markj@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 023F7mlo034480; Tue, 3 Mar 2020 15:07:48 GMT (envelope-from markj@FreeBSD.org) Message-Id: <202003031507.023F7mlo034480@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: markj set sender to markj@FreeBSD.org using -f From: Mark Johnston Date: Tue, 3 Mar 2020 15:07: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: r358581 - in stable/12: lib/libkvm sys/vm X-SVN-Group: stable-12 X-SVN-Commit-Author: markj X-SVN-Commit-Paths: in stable/12: lib/libkvm sys/vm X-SVN-Commit-Revision: 358581 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages 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, 03 Mar 2020 15:07:51 -0000 Author: markj Date: Tue Mar 3 15:07:48 2020 New Revision: 358581 URL: https://svnweb.freebsd.org/changeset/base/358581 Log: MFC r358026: Remove swblk_t. Modified: stable/12/lib/libkvm/kvm_getswapinfo.c stable/12/sys/vm/swap_pager.c stable/12/sys/vm/swap_pager.h Directory Properties: stable/12/ (props changed) Modified: stable/12/lib/libkvm/kvm_getswapinfo.c ============================================================================== --- stable/12/lib/libkvm/kvm_getswapinfo.c Tue Mar 3 15:05:13 2020 (r358580) +++ stable/12/lib/libkvm/kvm_getswapinfo.c Tue Mar 3 15:07:48 2020 (r358581) @@ -115,8 +115,7 @@ int kvm_getswapinfo_kvm(kvm_t *kd, struct kvm_swap *swap_ary, int swap_max, int flags) { - int i; - swblk_t ttl; + int i, ttl; TAILQ_HEAD(, swdevt) swtailq; struct swdevt *sp, swinfo; struct kvm_swap tot; @@ -167,8 +166,7 @@ int kvm_getswapinfo_sysctl(kvm_t *kd, struct kvm_swap *swap_ary, int swap_max, int flags) { - int ti; - swblk_t ttl; + int ti, ttl; size_t mibi, len; int soid[SWI_MAXMIB]; struct xswdev xsd; Modified: stable/12/sys/vm/swap_pager.c ============================================================================== --- stable/12/sys/vm/swap_pager.c Tue Mar 3 15:05:13 2020 (r358580) +++ stable/12/sys/vm/swap_pager.c Tue Mar 3 15:07:48 2020 (r358581) @@ -2284,7 +2284,7 @@ swaponsomething(struct vnode *vp, void *id, u_long nbl sw_strategy_t *strategy, sw_close_t *close, dev_t dev, int flags) { struct swdevt *sp, *tsp; - swblk_t dvbase; + daddr_t dvbase; u_long mblocks; /* Modified: stable/12/sys/vm/swap_pager.h ============================================================================== --- stable/12/sys/vm/swap_pager.h Tue Mar 3 15:05:13 2020 (r358580) +++ stable/12/sys/vm/swap_pager.h Tue Mar 3 15:07:48 2020 (r358581) @@ -38,14 +38,9 @@ */ #ifndef _VM_SWAP_PAGER_H_ -#define _VM_SWAP_PAGER_H_ 1 +#define _VM_SWAP_PAGER_H_ -typedef int32_t swblk_t; /* - * swap offset. This is the type used to - * address the "virtual swap device" and - * therefore the maximum swap space is - * 2^32 pages. - */ +#include struct buf; struct swdevt; @@ -62,8 +57,8 @@ struct swdevt { dev_t sw_dev; struct vnode *sw_vp; void *sw_id; - swblk_t sw_first; - swblk_t sw_end; + __daddr_t sw_first; + __daddr_t sw_end; struct blist *sw_blist; TAILQ_ENTRY(swdevt) sw_list; sw_strategy_t *sw_strategy; From owner-svn-src-all@freebsd.org Tue Mar 3 15:12:02 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id D7F77252C8D; Tue, 3 Mar 2020 15:12:02 +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 48X0q656vVz4BF5; Tue, 3 Mar 2020 15:12:02 +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 9441B7196; Tue, 3 Mar 2020 15:12:02 +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 023FC2Rk038972; Tue, 3 Mar 2020 15:12:02 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 023FC133038966; Tue, 3 Mar 2020 15:12:01 GMT (envelope-from kib@FreeBSD.org) Message-Id: <202003031512.023FC133038966@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Tue, 3 Mar 2020 15:12:01 +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: r358582 - in stable/11/sys: amd64/amd64 dev/cpuctl x86/acpica x86/include x86/x86 X-SVN-Group: stable-11 X-SVN-Commit-Author: kib X-SVN-Commit-Paths: in stable/11/sys: amd64/amd64 dev/cpuctl x86/acpica x86/include x86/x86 X-SVN-Commit-Revision: 358582 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages 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, 03 Mar 2020 15:12:03 -0000 Author: kib Date: Tue Mar 3 15:12:00 2020 New Revision: 358582 URL: https://svnweb.freebsd.org/changeset/base/358582 Log: MFC r358315: Fix IBRS for machines with IBRS_ALL capability. Modified: stable/11/sys/amd64/amd64/initcpu.c stable/11/sys/amd64/amd64/support.S stable/11/sys/dev/cpuctl/cpuctl.c stable/11/sys/x86/acpica/acpi_wakeup.c stable/11/sys/x86/include/x86_var.h stable/11/sys/x86/x86/cpu_machdep.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/amd64/amd64/initcpu.c ============================================================================== --- stable/11/sys/amd64/amd64/initcpu.c Tue Mar 3 15:07:48 2020 (r358581) +++ stable/11/sys/amd64/amd64/initcpu.c Tue Mar 3 15:12:00 2020 (r358582) @@ -245,7 +245,7 @@ initializecpu(void) wrmsr(MSR_EFER, msr); pg_nx = PG_NX; } - hw_ibrs_recalculate(); + hw_ibrs_recalculate(false); hw_ssb_recalculate(false); switch (cpu_vendor_id) { case CPU_VENDOR_AMD: Modified: stable/11/sys/amd64/amd64/support.S ============================================================================== --- stable/11/sys/amd64/amd64/support.S Tue Mar 3 15:07:48 2020 (r358581) +++ stable/11/sys/amd64/amd64/support.S Tue Mar 3 15:12:00 2020 (r358582) @@ -851,7 +851,7 @@ handle_ibrs_\l: /* all callers already saved %rax, %rdx, and %rcx */ ENTRY(handle_ibrs_entry) - cmpb $0,hw_ibrs_active(%rip) + cmpb $0,hw_ibrs_ibpb_active(%rip) je 1f movl $MSR_IA32_SPEC_CTRL,%ecx rdmsr Modified: stable/11/sys/dev/cpuctl/cpuctl.c ============================================================================== --- stable/11/sys/dev/cpuctl/cpuctl.c Tue Mar 3 15:07:48 2020 (r358581) +++ stable/11/sys/dev/cpuctl/cpuctl.c Tue Mar 3 15:12:00 2020 (r358582) @@ -536,8 +536,8 @@ cpuctl_do_eval_cpu_features(int cpu, struct thread *td set_cpu(cpu, td); identify_cpu1(); identify_cpu2(); - hw_ibrs_recalculate(); restore_cpu(oldcpu, is_bound, td); + hw_ibrs_recalculate(true); hw_ssb_recalculate(true); #ifdef __amd64__ pmap_allow_2m_x_ept_recalculate(); Modified: stable/11/sys/x86/acpica/acpi_wakeup.c ============================================================================== --- stable/11/sys/x86/acpica/acpi_wakeup.c Tue Mar 3 15:07:48 2020 (r358581) +++ stable/11/sys/x86/acpica/acpi_wakeup.c Tue Mar 3 15:12:00 2020 (r358582) @@ -227,7 +227,7 @@ acpi_sleep_machdep(struct acpi_softc *sc, int state) } #endif #ifdef __amd64__ - hw_ibrs_active = 0; + hw_ibrs_ibpb_active = 0; hw_ssb_active = 0; cpu_stdext_feature3 = 0; CPU_FOREACH(i) { Modified: stable/11/sys/x86/include/x86_var.h ============================================================================== --- stable/11/sys/x86/include/x86_var.h Tue Mar 3 15:07:48 2020 (r358581) +++ stable/11/sys/x86/include/x86_var.h Tue Mar 3 15:12:00 2020 (r358582) @@ -82,7 +82,7 @@ extern int _ugssel; extern int use_xsave; extern uint64_t xsave_mask; extern int pti; -extern int hw_ibrs_active; +extern int hw_ibrs_ibpb_active; extern int hw_mds_disable; extern int hw_ssb_active; extern int x86_taa_enable; @@ -135,7 +135,7 @@ int is_physical_memory(vm_paddr_t addr); int isa_nmi(int cd); void handle_ibrs_entry(void); void handle_ibrs_exit(void); -void hw_ibrs_recalculate(void); +void hw_ibrs_recalculate(bool all_cpus); void hw_mds_recalculate(void); void hw_ssb_recalculate(bool all_cpus); void x86_taa_recalculate(void); Modified: stable/11/sys/x86/x86/cpu_machdep.c ============================================================================== --- stable/11/sys/x86/x86/cpu_machdep.c Tue Mar 3 15:07:48 2020 (r358581) +++ stable/11/sys/x86/x86/cpu_machdep.c Tue Mar 3 15:12:00 2020 (r358582) @@ -885,23 +885,27 @@ nmi_handle_intr(u_int type, struct trapframe *frame) nmi_call_kdb(PCPU_GET(cpuid), type, frame); } -int hw_ibrs_active; +static int hw_ibrs_active; +int hw_ibrs_ibpb_active; int hw_ibrs_disable = 1; SYSCTL_INT(_hw, OID_AUTO, ibrs_active, CTLFLAG_RD, &hw_ibrs_active, 0, "Indirect Branch Restricted Speculation active"); void -hw_ibrs_recalculate(void) +hw_ibrs_recalculate(bool for_all_cpus) { if ((cpu_ia32_arch_caps & IA32_ARCH_CAP_IBRS_ALL) != 0) { - x86_msr_op(MSR_IA32_SPEC_CTRL, MSR_OP_LOCAL | - (hw_ibrs_disable ? MSR_OP_ANDNOT : MSR_OP_OR), + x86_msr_op(MSR_IA32_SPEC_CTRL, (for_all_cpus ? + MSR_OP_RENDEZVOUS : MSR_OP_LOCAL) | + (hw_ibrs_disable != 0 ? MSR_OP_ANDNOT : MSR_OP_OR), IA32_SPEC_CTRL_IBRS); - return; + hw_ibrs_active = hw_ibrs_disable == 0; + hw_ibrs_ibpb_active = 0; + } else { + hw_ibrs_active = hw_ibrs_ibpb_active = (cpu_stdext_feature3 & + CPUID_STDEXT3_IBPB) != 0 && !hw_ibrs_disable; } - hw_ibrs_active = (cpu_stdext_feature3 & CPUID_STDEXT3_IBPB) != 0 && - !hw_ibrs_disable; } static int @@ -914,7 +918,7 @@ hw_ibrs_disable_handler(SYSCTL_HANDLER_ARGS) if (error != 0 || req->newptr == NULL) return (error); hw_ibrs_disable = val != 0; - hw_ibrs_recalculate(); + hw_ibrs_recalculate(true); return (0); } SYSCTL_PROC(_hw, OID_AUTO, ibrs_disable, CTLTYPE_INT | CTLFLAG_RWTUN | From owner-svn-src-all@freebsd.org Tue Mar 3 15:25:03 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 4BAB3253499; Tue, 3 Mar 2020 15:25:03 +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 48X1663QvXz4Tvk; Tue, 3 Mar 2020 15:25:02 +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 24F2B73A3; Tue, 3 Mar 2020 15:25:02 +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 023FP2fx046603; Tue, 3 Mar 2020 15:25:02 GMT (envelope-from andrew@FreeBSD.org) Received: (from andrew@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 023FP1vu046599; Tue, 3 Mar 2020 15:25:01 GMT (envelope-from andrew@FreeBSD.org) Message-Id: <202003031525.023FP1vu046599@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: andrew set sender to andrew@FreeBSD.org using -f From: Andrew Turner Date: Tue, 3 Mar 2020 15:25:01 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r358583 - in head/sys/arm64: arm64 include X-SVN-Group: head X-SVN-Commit-Author: andrew X-SVN-Commit-Paths: in head/sys/arm64: arm64 include X-SVN-Commit-Revision: 358583 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages 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, 03 Mar 2020 15:25:03 -0000 Author: andrew Date: Tue Mar 3 15:25:01 2020 New Revision: 358583 URL: https://svnweb.freebsd.org/changeset/base/358583 Log: Move the arm64 cache identification to identcpu.c This allows us to call it on a per-CPU basis and to warn if the details are different across CPUs. While here read the L1 I-Cache type and store this for use later by pmap. Sponsored by: Innovate UK Modified: head/sys/arm64/arm64/identcpu.c head/sys/arm64/arm64/machdep.c head/sys/arm64/include/cpu.h head/sys/arm64/include/cpufunc.h Modified: head/sys/arm64/arm64/identcpu.c ============================================================================== --- head/sys/arm64/arm64/identcpu.c Tue Mar 3 15:12:00 2020 (r358582) +++ head/sys/arm64/arm64/identcpu.c Tue Mar 3 15:25:01 2020 (r358583) @@ -965,6 +965,13 @@ update_user_regs(u_int cpu) extern u_long elf_hwcap; bool __read_frequently lse_supported = false; +bool __read_frequently icache_alising = false; +bool __read_frequently icache_vmid = false; + +int64_t dcache_line_size; /* The minimum D cache line size */ +int64_t icache_line_size; /* The minimum I cache line size */ +int64_t idcache_line_size; /* The minimum cache line size */ + static void identify_cpu_sysinit(void *dummy __unused) { @@ -1309,6 +1316,46 @@ print_cpu_features(u_int cpu) } void +identify_cache(uint64_t ctr) +{ + + /* Identify the L1 cache type */ + switch (CTR_L1IP_VAL(ctr)) { + case CTR_L1IP_PIPT: + break; + case CTR_L1IP_VPIPT: + icache_vmid = true; + break; + default: + case CTR_L1IP_VIPT: + icache_alising = true; + break; + } + + if (dcache_line_size == 0) { + KASSERT(icache_line_size == 0, ("%s: i-cacheline size set: %ld", + __func__, icache_line_size)); + + /* Get the D cache line size */ + dcache_line_size = CTR_DLINE_SIZE(ctr); + /* And the same for the I cache */ + icache_line_size = CTR_ILINE_SIZE(ctr); + + idcache_line_size = MIN(dcache_line_size, icache_line_size); + } + + if (dcache_line_size != CTR_DLINE_SIZE(ctr)) { + printf("WARNING: D-cacheline size mismatch %ld != %d\n", + dcache_line_size, CTR_DLINE_SIZE(ctr)); + } + + if (icache_line_size != CTR_ILINE_SIZE(ctr)) { + printf("WARNING: I-cacheline size mismatch %ld != %d\n", + icache_line_size, CTR_ILINE_SIZE(ctr)); + } +} + +void identify_cpu(void) { u_int midr; @@ -1429,8 +1476,14 @@ identify_cpu(void) if (cpu_desc[cpu].id_aa64pfr1 != cpu_desc[0].id_aa64pfr1) cpu_print_regs |= PRINT_ID_AA64_PFR1; - if (cpu_desc[cpu].ctr != cpu_desc[0].ctr) + if (cpu_desc[cpu].ctr != cpu_desc[0].ctr) { + /* + * If the cache type register is different we may + * have a different l1 cache type. + */ + identify_cache(cpu_desc[cpu].ctr); cpu_print_regs |= PRINT_CTR_EL0; + } /* Wake up the other CPUs */ atomic_store_rel_int(&ident_lock, 0); Modified: head/sys/arm64/arm64/machdep.c ============================================================================== --- head/sys/arm64/arm64/machdep.c Tue Mar 3 15:12:00 2020 (r358582) +++ head/sys/arm64/arm64/machdep.c Tue Mar 3 15:25:01 2020 (r358583) @@ -113,9 +113,6 @@ static int boot_el; struct kva_md_info kmi; -int64_t dcache_line_size; /* The minimum D cache line size */ -int64_t icache_line_size; /* The minimum I cache line size */ -int64_t idcache_line_size; /* The minimum cache line size */ int64_t dczva_line_size; /* The size of cache line the dc zva zeroes */ int has_pan; @@ -1056,17 +1053,9 @@ static void cache_setup(void) { int dczva_line_shift; - uint32_t ctr_el0; uint32_t dczid_el0; - ctr_el0 = READ_SPECIALREG(ctr_el0); - - /* Get the D cache line size */ - dcache_line_size = CTR_DLINE_SIZE(ctr_el0); - /* And the same for the I cache */ - icache_line_size = CTR_ILINE_SIZE(ctr_el0); - - idcache_line_size = MIN(dcache_line_size, icache_line_size); + identify_cache(READ_SPECIALREG(ctr_el0)); dczid_el0 = READ_SPECIALREG(dczid_el0); Modified: head/sys/arm64/include/cpu.h ============================================================================== --- head/sys/arm64/include/cpu.h Tue Mar 3 15:12:00 2020 (r358582) +++ head/sys/arm64/include/cpu.h Tue Mar 3 15:25:01 2020 (r358583) @@ -166,6 +166,7 @@ extern uint64_t __cpu_affinity[]; void cpu_halt(void) __dead2; void cpu_reset(void) __dead2; void fork_trampoline(void); +void identify_cache(uint64_t); void identify_cpu(void); void install_cpu_errata(void); void swi_vm(void *v); Modified: head/sys/arm64/include/cpufunc.h ============================================================================== --- head/sys/arm64/include/cpufunc.h Tue Mar 3 15:12:00 2020 (r358582) +++ head/sys/arm64/include/cpufunc.h Tue Mar 3 15:25:01 2020 (r358583) @@ -199,6 +199,9 @@ invalidate_local_icache(void) "isb \n"); } +extern bool icache_alising; +extern bool icache_vmid; + extern int64_t dcache_line_size; extern int64_t icache_line_size; extern int64_t idcache_line_size; From owner-svn-src-all@freebsd.org Tue Mar 3 15:31:41 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id D47652536C7; Tue, 3 Mar 2020 15:31:41 +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 48X1Fn38vCz3HtZ; Tue, 3 Mar 2020 15:31:41 +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 347567527; Tue, 3 Mar 2020 15:31:41 +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 023FVfu7047605; Tue, 3 Mar 2020 15:31:41 GMT (envelope-from andrew@FreeBSD.org) Received: (from andrew@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 023FVeCT047604; Tue, 3 Mar 2020 15:31:40 GMT (envelope-from andrew@FreeBSD.org) Message-Id: <202003031531.023FVeCT047604@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: andrew set sender to andrew@FreeBSD.org using -f From: Andrew Turner Date: Tue, 3 Mar 2020 15:31:40 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r358584 - in head/sys/arm64: arm64 include X-SVN-Group: head X-SVN-Commit-Author: andrew X-SVN-Commit-Paths: in head/sys/arm64: arm64 include X-SVN-Commit-Revision: 358584 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages 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, 03 Mar 2020 15:31:41 -0000 Author: andrew Date: Tue Mar 3 15:31:40 2020 New Revision: 358584 URL: https://svnweb.freebsd.org/changeset/base/358584 Log: Fix the spelling of aliasing. Sponsored by: Innovate UK Modified: head/sys/arm64/arm64/identcpu.c head/sys/arm64/include/cpufunc.h Modified: head/sys/arm64/arm64/identcpu.c ============================================================================== --- head/sys/arm64/arm64/identcpu.c Tue Mar 3 15:25:01 2020 (r358583) +++ head/sys/arm64/arm64/identcpu.c Tue Mar 3 15:31:40 2020 (r358584) @@ -965,7 +965,7 @@ update_user_regs(u_int cpu) extern u_long elf_hwcap; bool __read_frequently lse_supported = false; -bool __read_frequently icache_alising = false; +bool __read_frequently icache_aliasing = false; bool __read_frequently icache_vmid = false; int64_t dcache_line_size; /* The minimum D cache line size */ @@ -1328,7 +1328,7 @@ identify_cache(uint64_t ctr) break; default: case CTR_L1IP_VIPT: - icache_alising = true; + icache_aliasing = true; break; } Modified: head/sys/arm64/include/cpufunc.h ============================================================================== --- head/sys/arm64/include/cpufunc.h Tue Mar 3 15:25:01 2020 (r358583) +++ head/sys/arm64/include/cpufunc.h Tue Mar 3 15:31:40 2020 (r358584) @@ -199,7 +199,7 @@ invalidate_local_icache(void) "isb \n"); } -extern bool icache_alising; +extern bool icache_aliasing; extern bool icache_vmid; extern int64_t dcache_line_size; From owner-svn-src-all@freebsd.org Tue Mar 3 15:33:44 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 60E20253AB3; Tue, 3 Mar 2020 15:33:44 +0000 (UTC) (envelope-from melifaro@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 48X1J80P46z3MQm; Tue, 3 Mar 2020 15:33:44 +0000 (UTC) (envelope-from melifaro@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id D8BDB758B; Tue, 3 Mar 2020 15:33:43 +0000 (UTC) (envelope-from melifaro@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 023FXh08052517; Tue, 3 Mar 2020 15:33:43 GMT (envelope-from melifaro@FreeBSD.org) Received: (from melifaro@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 023FXhKb052515; Tue, 3 Mar 2020 15:33:43 GMT (envelope-from melifaro@FreeBSD.org) Message-Id: <202003031533.023FXhKb052515@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: melifaro set sender to melifaro@FreeBSD.org using -f From: "Alexander V. Chernikov" Date: Tue, 3 Mar 2020 15:33:43 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r358585 - in head: sys/net tests/sys/netinet tests/sys/netinet6 X-SVN-Group: head X-SVN-Commit-Author: melifaro X-SVN-Commit-Paths: in head: sys/net tests/sys/netinet tests/sys/netinet6 X-SVN-Commit-Revision: 358585 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages 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, 03 Mar 2020 15:33:44 -0000 Author: melifaro Date: Tue Mar 3 15:33:43 2020 New Revision: 358585 URL: https://svnweb.freebsd.org/changeset/base/358585 Log: Fix dynamic redrects by adding forgotten RTF_HOST flag. Improve tests to verify the generated route flags. Reported by: jtl MFC after: 2 weeks Modified: head/sys/net/route.c head/tests/sys/netinet/redirect.sh head/tests/sys/netinet6/redirect.sh Modified: head/sys/net/route.c ============================================================================== --- head/sys/net/route.c Tue Mar 3 15:31:40 2020 (r358584) +++ head/sys/net/route.c Tue Mar 3 15:33:43 2020 (r358585) @@ -632,7 +632,7 @@ rib_add_redirect(u_int fibnum, struct sockaddr *dst, s info.rti_info[RTAX_GATEWAY] = gateway; info.rti_ifa = ifa; info.rti_ifp = ifp; - info.rti_flags = flags | RTF_DYNAMIC; + info.rti_flags = flags | RTF_HOST | RTF_DYNAMIC; /* Setup route metrics to define expire time. */ bzero(&rti_rmx, sizeof(rti_rmx)); Modified: head/tests/sys/netinet/redirect.sh ============================================================================== --- head/tests/sys/netinet/redirect.sh Tue Mar 3 15:31:40 2020 (r358584) +++ head/tests/sys/netinet/redirect.sh Tue Mar 3 15:33:43 2020 (r358585) @@ -92,9 +92,8 @@ valid_redirect_body() { --route ${dst_addr4} --gw ${new_rtr_ip} \ --iface ${epair}a - count=`jexec ${jname} route -n get -4 ${dst_addr4} | grep destination | grep -c ${dst_addr4}` - # Verify redirect got installed - atf_check_equal "1" "${count}" + atf_check -o match:"destination: ${dst_addr4}\$" jexec ${jname} route -n get -4 ${dst_addr4} + atf_check -o match:'flags: ' jexec ${jname} route -n get -4 ${dst_addr4} } valid_redirect_cleanup() { Modified: head/tests/sys/netinet6/redirect.sh ============================================================================== --- head/tests/sys/netinet6/redirect.sh Tue Mar 3 15:31:40 2020 (r358584) +++ head/tests/sys/netinet6/redirect.sh Tue Mar 3 15:33:43 2020 (r358585) @@ -94,9 +94,9 @@ valid_redirect_body() { --route ${dst_addr6} --gw ${new_rtr_ll_ip} \ --iface ${epair}a - count=`jexec ${jname} route -n get -6 ${dst_addr6} | grep destination | grep -c ${dst_addr6}` # Verify redirect got installed - atf_check_equal "1" "${count}" + atf_check -o match:"destination: ${dst_addr6}\$" jexec ${jname} route -n get -6 ${dst_addr6} + atf_check -o match:'flags: ' jexec ${jname} route -n get -6 ${dst_addr6} } valid_redirect_cleanup() { From owner-svn-src-all@freebsd.org Tue Mar 3 15:49:34 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id EA8EA254107; Tue, 3 Mar 2020 15:49:34 +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 48X1fQ5xMhz4Xvl; Tue, 3 Mar 2020 15:49:34 +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 B4A8A7797; Tue, 3 Mar 2020 15:49:34 +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 023FnY0Z059047; Tue, 3 Mar 2020 15:49:34 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 023FnYCR059046; Tue, 3 Mar 2020 15:49:34 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <202003031549.023FnYCR059046@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Tue, 3 Mar 2020 15:49:34 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r358586 - head/sys/compat/linuxkpi/common/src X-SVN-Group: head X-SVN-Commit-Author: hselasky X-SVN-Commit-Paths: head/sys/compat/linuxkpi/common/src X-SVN-Commit-Revision: 358586 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages 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, 03 Mar 2020 15:49:35 -0000 Author: hselasky Date: Tue Mar 3 15:49:34 2020 New Revision: 358586 URL: https://svnweb.freebsd.org/changeset/base/358586 Log: When closing a LinuxKPI file always use the real release function to avoid resource leakage when destroying a LinuxKPI character device. Submitted by: Andrew Boyer Reviewed by: kib@ PR: 244572 MFC after: 1 week Sponsored by: Mellanox Technologies Modified: head/sys/compat/linuxkpi/common/src/linux_compat.c Modified: head/sys/compat/linuxkpi/common/src/linux_compat.c ============================================================================== --- head/sys/compat/linuxkpi/common/src/linux_compat.c Tue Mar 3 15:33:43 2020 (r358585) +++ head/sys/compat/linuxkpi/common/src/linux_compat.c Tue Mar 3 15:49:34 2020 (r358586) @@ -1490,6 +1490,7 @@ static int linux_file_close(struct file *file, struct thread *td) { struct linux_file *filp; + int (*release)(struct inode *, struct linux_file *); const struct file_operations *fop; struct linux_cdev *ldev; int error; @@ -1507,8 +1508,13 @@ linux_file_close(struct file *file, struct thread *td) linux_set_current(td); linux_poll_wait_dequeue(filp); linux_get_fop(filp, &fop, &ldev); - if (fop->release != NULL) - error = -OPW(file, td, fop->release(filp->f_vnode, filp)); + /* + * Always use the real release function, if any, to avoid + * leaking device resources: + */ + release = filp->f_op->release; + if (release != NULL) + error = -OPW(file, td, release(filp->f_vnode, filp)); funsetown(&filp->f_sigio); if (filp->f_vnode != NULL) vdrop(filp->f_vnode); From owner-svn-src-all@freebsd.org Tue Mar 3 16:25:30 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id D0F11254F5A; Tue, 3 Mar 2020 16:25:30 +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 48X2Rs5jXXz3Fnn; Tue, 3 Mar 2020 16:25:29 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 2D1A07F78; Tue, 3 Mar 2020 16:25:28 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 023GPS3f082616; Tue, 3 Mar 2020 16:25:28 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 023GPSW4082615; Tue, 3 Mar 2020 16:25:28 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <202003031625.023GPSW4082615@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Tue, 3 Mar 2020 16:25: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: r358587 - stable/12/contrib/elftoolchain/addr2line X-SVN-Group: stable-12 X-SVN-Commit-Author: emaste X-SVN-Commit-Paths: stable/12/contrib/elftoolchain/addr2line X-SVN-Commit-Revision: 358587 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages 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, 03 Mar 2020 16:25:31 -0000 Author: emaste Date: Tue Mar 3 16:25:28 2020 New Revision: 358587 URL: https://svnweb.freebsd.org/changeset/base/358587 Log: MFC r357844: addr2line: Handle DW_AT_ranges in compile units Based on original submission by Marat Radchenko in ELF Tool Chain ticket #545, rebased and updated by Tiger Gao. Also r357862, use stdbool.h header for bool PR: 217736 Submitted by: Marat Radchenko Submitted by: Tiger Gao Sponsored by: The FreeBSD Foundation Modified: stable/12/contrib/elftoolchain/addr2line/addr2line.c Directory Properties: stable/12/ (props changed) Modified: stable/12/contrib/elftoolchain/addr2line/addr2line.c ============================================================================== --- stable/12/contrib/elftoolchain/addr2line/addr2line.c Tue Mar 3 15:49:34 2020 (r358586) +++ stable/12/contrib/elftoolchain/addr2line/addr2line.c Tue Mar 3 16:25:28 2020 (r358587) @@ -65,6 +65,7 @@ struct CU { Dwarf_Signed nsrcfiles; STAILQ_HEAD(, Func) funclist; Dwarf_Die die; + Dwarf_Debug dbg; }; static struct option longopts[] = { @@ -345,7 +346,8 @@ cont_search: collect_func(dbg, ret_die, parent, cu); /* Cleanup */ - dwarf_dealloc(dbg, die, DW_DLA_DIE); + if (die != cu->die) + dwarf_dealloc(dbg, die, DW_DLA_DIE); if (abst_die != NULL) dwarf_dealloc(dbg, abst_die, DW_DLA_DIE); @@ -411,6 +413,102 @@ culookup(Dwarf_Unsigned addr) return (NULL); } +/* + * Check whether addr falls into range(s) of current CU, and save current CU + * to lookup tree if so. + */ +static int +check_range(Dwarf_Debug dbg, Dwarf_Die die, Dwarf_Unsigned addr, + struct CU **cu) +{ + Dwarf_Error de; + Dwarf_Unsigned addr_base, lopc, hipc; + Dwarf_Off ranges_off; + Dwarf_Signed ranges_cnt; + Dwarf_Ranges *ranges; + int i, ret; + bool in_range; + + addr_base = 0; + ranges = NULL; + ranges_cnt = 0; + in_range = false; + + ret = dwarf_attrval_unsigned(die, DW_AT_ranges, &ranges_off, &de); + if (ret == DW_DLV_NO_ENTRY) { + if (dwarf_attrval_unsigned(die, DW_AT_low_pc, &lopc, &de) == + DW_DLV_OK) { + if (lopc == curlopc) + return (DW_DLV_ERROR); + if (dwarf_attrval_unsigned(die, DW_AT_high_pc, &hipc, + &de) == DW_DLV_OK) { + /* + * Check if the address falls into the PC + * range of this CU. + */ + if (handle_high_pc(die, lopc, &hipc) != + DW_DLV_OK) + return (DW_DLV_ERROR); + } else { + /* Assume ~0ULL if DW_AT_high_pc not present */ + hipc = ~0ULL; + } + + if (addr >= lopc && addr < hipc) { + in_range = true; + } + } + } else if (ret == DW_DLV_OK) { + ret = dwarf_get_ranges(dbg, ranges_off, &ranges, + &ranges_cnt, NULL, &de); + if (ret != DW_DLV_OK) + return (ret); + + if (!ranges || ranges_cnt <= 0) + return (DW_DLV_ERROR); + + for (i = 0; i < ranges_cnt; i++) { + if (ranges[i].dwr_type == DW_RANGES_END) + return (DW_DLV_NO_ENTRY); + + if (ranges[i].dwr_type == + DW_RANGES_ADDRESS_SELECTION) { + addr_base = ranges[i].dwr_addr2; + continue; + } + + /* DW_RANGES_ENTRY */ + lopc = ranges[i].dwr_addr1 + addr_base; + hipc = ranges[i].dwr_addr2 + addr_base; + + if (lopc == curlopc) + return (DW_DLV_ERROR); + + if (addr >= lopc && addr < hipc){ + in_range = true; + break; + } + } + } else { + return (DW_DLV_ERROR); + } + + if (in_range) { + if ((*cu = calloc(1, sizeof(struct CU))) == NULL) + err(EXIT_FAILURE, "calloc"); + (*cu)->lopc = lopc; + (*cu)->hipc = hipc; + (*cu)->die = die; + (*cu)->dbg = dbg; + STAILQ_INIT(&(*cu)->funclist); + RB_INSERT(cutree, &cuhead, *cu); + curlopc = lopc; + return (DW_DLV_OK); + } else { + return (DW_DLV_NO_ENTRY); + } +} + static void translate(Dwarf_Debug dbg, Elf *e, const char* addrstr) { @@ -418,10 +516,9 @@ translate(Dwarf_Debug dbg, Elf *e, const char* addrstr Dwarf_Line *lbuf; Dwarf_Error de; Dwarf_Half tag; - Dwarf_Unsigned lopc, hipc, addr, lineno, plineno; + Dwarf_Unsigned addr, lineno, plineno; Dwarf_Signed lcount; Dwarf_Addr lineaddr, plineaddr; - Dwarf_Off off; struct CU *cu; struct Func *f; const char *funcname; @@ -439,6 +536,7 @@ translate(Dwarf_Debug dbg, Elf *e, const char* addrstr cu = culookup(addr); if (cu != NULL) { die = cu->die; + dbg = cu->dbg; goto status_ok; } @@ -477,44 +575,11 @@ translate(Dwarf_Debug dbg, Elf *e, const char* addrstr warnx("could not find DW_TAG_compile_unit die"); goto next_cu; } - if (dwarf_attrval_unsigned(die, DW_AT_low_pc, &lopc, &de) == - DW_DLV_OK) { - if (lopc == curlopc) - goto out; - if (dwarf_attrval_unsigned(die, DW_AT_high_pc, &hipc, - &de) == DW_DLV_OK) { - /* - * Check if the address falls into the PC - * range of this CU. - */ - if (handle_high_pc(die, lopc, &hipc) != - DW_DLV_OK) - goto out; - } else { - /* Assume ~0ULL if DW_AT_high_pc not present */ - hipc = ~0ULL; - } - - if (dwarf_dieoffset(die, &off, &de) != DW_DLV_OK) { - warnx("dwarf_dieoffset failed: %s", - dwarf_errmsg(de)); - goto out; - } - - if (addr >= lopc && addr < hipc) { - if ((cu = calloc(1, sizeof(*cu))) == NULL) - err(EXIT_FAILURE, "calloc"); - cu->off = off; - cu->lopc = lopc; - cu->hipc = hipc; - cu->die = die; - STAILQ_INIT(&cu->funclist); - RB_INSERT(cutree, &cuhead, cu); - - curlopc = lopc; - break; - } - } + ret = check_range(dbg, die, addr, &cu); + if (ret == DW_DLV_OK) + break; + if (ret == DW_DLV_ERROR) + goto out; next_cu: if (die != NULL) { dwarf_dealloc(dbg, die, DW_DLA_DIE); From owner-svn-src-all@freebsd.org Tue Mar 3 17:30:14 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id DDB4F256601; Tue, 3 Mar 2020 17:30:14 +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 48X3tZ4DfBz4CdC; Tue, 3 Mar 2020 17:30: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 796C78A99; Tue, 3 Mar 2020 17:30: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 023HUE2X019176; Tue, 3 Mar 2020 17:30:14 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 023HUEoK019175; Tue, 3 Mar 2020 17:30:14 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <202003031730.023HUEoK019175@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Tue, 3 Mar 2020 17:30:14 +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: r358588 - stable/12/lib/libc/sys X-SVN-Group: stable-12 X-SVN-Commit-Author: emaste X-SVN-Commit-Paths: stable/12/lib/libc/sys X-SVN-Commit-Revision: 358588 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages 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, 03 Mar 2020 17:30:15 -0000 Author: emaste Date: Tue Mar 3 17:30:13 2020 New Revision: 358588 URL: https://svnweb.freebsd.org/changeset/base/358588 Log: MFC r358344: mprotect.2: sort errors alphabetically Modified: stable/12/lib/libc/sys/mprotect.2 Directory Properties: stable/12/ (props changed) Modified: stable/12/lib/libc/sys/mprotect.2 ============================================================================== --- stable/12/lib/libc/sys/mprotect.2 Tue Mar 3 16:25:28 2020 (r358587) +++ stable/12/lib/libc/sys/mprotect.2 Tue Mar 3 17:30:13 2020 (r358588) @@ -72,18 +72,18 @@ The .Fn mprotect system call will fail if: .Bl -tag -width Er -.It Bq Er EINVAL -The virtual address range specified by the -.Fa addr -and -.Fa len -arguments is not valid. .It Bq Er EACCES The calling process was not allowed to change the protection to the value specified by the .Fa prot argument. +.It Bq Er EINVAL +The virtual address range specified by the +.Fa addr +and +.Fa len +arguments is not valid. .El .Sh SEE ALSO .Xr madvise 2 , From owner-svn-src-all@freebsd.org Tue Mar 3 17:35:18 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id C32DC256AC0; Tue, 3 Mar 2020 17:35:18 +0000 (UTC) (envelope-from olivier@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 48X40P0P2Mz4KVN; Tue, 3 Mar 2020 17:35:16 +0000 (UTC) (envelope-from olivier@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4583F8CA3; Tue, 3 Mar 2020 17:35:16 +0000 (UTC) (envelope-from olivier@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 023HZF2E025264; Tue, 3 Mar 2020 17:35:15 GMT (envelope-from olivier@FreeBSD.org) Received: (from olivier@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 023HZFcW025263; Tue, 3 Mar 2020 17:35:15 GMT (envelope-from olivier@FreeBSD.org) Message-Id: <202003031735.023HZFcW025263@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: olivier set sender to olivier@FreeBSD.org using -f From: Olivier Cochard Date: Tue, 3 Mar 2020 17:35:15 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r358589 - head/tests/sys/net X-SVN-Group: head X-SVN-Commit-Author: olivier X-SVN-Commit-Paths: head/tests/sys/net X-SVN-Commit-Revision: 358589 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages 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, 03 Mar 2020 17:35:18 -0000 Author: olivier (ports committer) Date: Tue Mar 3 17:35:15 2020 New Revision: 358589 URL: https://svnweb.freebsd.org/changeset/base/358589 Log: Skip if_epair regression test if module doesn't exist Approved by: kp Sponsored by: Netflix Differential Revision: https://reviews.freebsd.org/D23876 Modified: head/tests/sys/net/Makefile head/tests/sys/net/if_epair.c Modified: head/tests/sys/net/Makefile ============================================================================== --- head/tests/sys/net/Makefile Tue Mar 3 17:30:13 2020 (r358588) +++ head/tests/sys/net/Makefile Tue Mar 3 17:35:15 2020 (r358589) @@ -22,6 +22,8 @@ TEST_METADATA+= is_exclusive=true MAN= PROGS+= randsleep +CFLAGS+= -I${.CURDIR:H:H} + WARNS?= 6 .include Modified: head/tests/sys/net/if_epair.c ============================================================================== --- head/tests/sys/net/if_epair.c Tue Mar 3 17:30:13 2020 (r358588) +++ head/tests/sys/net/if_epair.c Tue Mar 3 17:35:15 2020 (r358589) @@ -40,6 +40,7 @@ #include #include +#include "freebsd_test_suite/macros.h" ATF_TC(params); ATF_TC_HEAD(params, tc) @@ -52,9 +53,8 @@ ATF_TC_BODY(params, tc) struct ifreq ifr; int s; - s = kldload("if_epair"); - if (s == -1 && errno != EEXIST) - atf_tc_fail("Failed to load if_epair"); + kldload("if_epair"); + ATF_REQUIRE_KERNEL_MODULE("if_epair"); s = socket(AF_INET, SOCK_DGRAM, 0); if (s < 0) From owner-svn-src-all@freebsd.org Tue Mar 3 17:40:31 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 8CFB2256EB2; Tue, 3 Mar 2020 17:40:31 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.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 48X46Q3dwxz4Qmm; Tue, 3 Mar 2020 17:40:30 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 6BE5A8CC1; Tue, 3 Mar 2020 17:40:30 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 023HeUIJ025566; Tue, 3 Mar 2020 17:40:30 GMT (envelope-from imp@FreeBSD.org) Received: (from imp@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 023HeUbL025565; Tue, 3 Mar 2020 17:40:30 GMT (envelope-from imp@FreeBSD.org) Message-Id: <202003031740.023HeUbL025565@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: imp set sender to imp@FreeBSD.org using -f From: Warner Losh Date: Tue, 3 Mar 2020 17:40:30 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r358590 - head/sys/cam X-SVN-Group: head X-SVN-Commit-Author: imp X-SVN-Commit-Paths: head/sys/cam X-SVN-Commit-Revision: 358590 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages 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, 03 Mar 2020 17:40:31 -0000 Author: imp Date: Tue Mar 3 17:40:29 2020 New Revision: 358590 URL: https://svnweb.freebsd.org/changeset/base/358590 Log: Get rid of silly /* FALLTHROUGH */ lines Consistently omit /* FALLTHROUGH */ when we have a case statement that does nothing. Since compilers don't warn about stacked case statements, and we were inconsistent, resolve by removing extras. Modified: head/sys/cam/cam_xpt.c Modified: head/sys/cam/cam_xpt.c ============================================================================== --- head/sys/cam/cam_xpt.c Tue Mar 3 17:35:15 2020 (r358589) +++ head/sys/cam/cam_xpt.c Tue Mar 3 17:40:29 2020 (r358590) @@ -2686,11 +2686,8 @@ xpt_action_default(union ccb *start_ccb) start_ccb->ataio.resid = 0; /* FALLTHROUGH */ case XPT_NVME_IO: - /* FALLTHROUGH */ case XPT_NVME_ADMIN: - /* FALLTHROUGH */ case XPT_MMC_IO: - /* FALLTHROUGH */ case XPT_RESET_DEV: case XPT_ENG_EXEC: case XPT_SMP_IO: From owner-svn-src-all@freebsd.org Tue Mar 3 18:01:03 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id E1C5B2578F8; Tue, 3 Mar 2020 18:01:03 +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 48X4Z75kFCz4HM7; Tue, 3 Mar 2020 18:01:03 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id BFA2D91A9; Tue, 3 Mar 2020 18:01:03 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 023I130I037709; Tue, 3 Mar 2020 18:01:03 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 023I132H037708; Tue, 3 Mar 2020 18:01:03 GMT (envelope-from dim@FreeBSD.org) Message-Id: <202003031801.023I132H037708@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Tue, 3 Mar 2020 18:01:03 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r358591 - in stable: 11/sys/arm/arm 12/sys/arm/arm X-SVN-Group: stable-12 X-SVN-Commit-Author: dim X-SVN-Commit-Paths: in stable: 11/sys/arm/arm 12/sys/arm/arm X-SVN-Commit-Revision: 358591 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages 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, 03 Mar 2020 18:01:04 -0000 Author: dim Date: Tue Mar 3 18:01:03 2020 New Revision: 358591 URL: https://svnweb.freebsd.org/changeset/base/358591 Log: MFC r358407: Merge r358406 from the clang1000-import branch: Fix the following -Werror warning from clang 10.0.0: sys/arm/arm/identcpu-v6.c:227:5: error: misleading indentation; statement is not part of the previous 'if' [-Werror,-Wmisleading-indentation] if (val & CPUV7_CT_CTYPE_RA) ^ sys/arm/arm/identcpu-v6.c:225:4: note: previous statement is here if (val & CPUV7_CT_CTYPE_WB) ^ This was due to an accidentally inserted tab before the if statement. Modified: stable/12/sys/arm/arm/identcpu-v6.c Directory Properties: stable/12/ (props changed) Changes in other areas also in this revision: Modified: stable/11/sys/arm/arm/identcpu-v6.c Directory Properties: stable/11/ (props changed) Modified: stable/12/sys/arm/arm/identcpu-v6.c ============================================================================== --- stable/12/sys/arm/arm/identcpu-v6.c Tue Mar 3 17:40:29 2020 (r358590) +++ stable/12/sys/arm/arm/identcpu-v6.c Tue Mar 3 18:01:03 2020 (r358591) @@ -224,7 +224,7 @@ print_v7_cache(void ) printf(" WT"); if (val & CPUV7_CT_CTYPE_WB) printf(" WB"); - if (val & CPUV7_CT_CTYPE_RA) + if (val & CPUV7_CT_CTYPE_RA) printf(" Read-Alloc"); if (val & CPUV7_CT_CTYPE_WA) printf(" Write-Alloc"); From owner-svn-src-all@freebsd.org Tue Mar 3 18:01:04 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 2B15A2578FE; Tue, 3 Mar 2020 18:01:04 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.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 48X4Z80Pswz4HMJ; Tue, 3 Mar 2020 18:01:04 +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 071F091AC; Tue, 3 Mar 2020 18:01:04 +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 023I139h037715; Tue, 3 Mar 2020 18:01:03 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 023I132m037714; Tue, 3 Mar 2020 18:01:03 GMT (envelope-from dim@FreeBSD.org) Message-Id: <202003031801.023I132m037714@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Tue, 3 Mar 2020 18:01: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: r358591 - in stable: 11/sys/arm/arm 12/sys/arm/arm X-SVN-Group: stable-11 X-SVN-Commit-Author: dim X-SVN-Commit-Paths: in stable: 11/sys/arm/arm 12/sys/arm/arm X-SVN-Commit-Revision: 358591 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages 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, 03 Mar 2020 18:01:04 -0000 Author: dim Date: Tue Mar 3 18:01:03 2020 New Revision: 358591 URL: https://svnweb.freebsd.org/changeset/base/358591 Log: MFC r358407: Merge r358406 from the clang1000-import branch: Fix the following -Werror warning from clang 10.0.0: sys/arm/arm/identcpu-v6.c:227:5: error: misleading indentation; statement is not part of the previous 'if' [-Werror,-Wmisleading-indentation] if (val & CPUV7_CT_CTYPE_RA) ^ sys/arm/arm/identcpu-v6.c:225:4: note: previous statement is here if (val & CPUV7_CT_CTYPE_WB) ^ This was due to an accidentally inserted tab before the if statement. Modified: stable/11/sys/arm/arm/identcpu-v6.c Directory Properties: stable/11/ (props changed) Changes in other areas also in this revision: Modified: stable/12/sys/arm/arm/identcpu-v6.c Directory Properties: stable/12/ (props changed) Modified: stable/11/sys/arm/arm/identcpu-v6.c ============================================================================== --- stable/11/sys/arm/arm/identcpu-v6.c Tue Mar 3 17:40:29 2020 (r358590) +++ stable/11/sys/arm/arm/identcpu-v6.c Tue Mar 3 18:01:03 2020 (r358591) @@ -206,7 +206,7 @@ print_v7_cache(void ) printf(" WT"); if (val & CPUV7_CT_CTYPE_WB) printf(" WB"); - if (val & CPUV7_CT_CTYPE_RA) + if (val & CPUV7_CT_CTYPE_RA) printf(" Read-Alloc"); if (val & CPUV7_CT_CTYPE_WA) printf(" Write-Alloc"); From owner-svn-src-all@freebsd.org Tue Mar 3 18:05:12 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 4F0F8257A56; Tue, 3 Mar 2020 18:05:12 +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 48X4fw1R5pz4KYw; Tue, 3 Mar 2020 18:05:12 +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 2A9839247; Tue, 3 Mar 2020 18:05:12 +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 023I5C4S042977; Tue, 3 Mar 2020 18:05:12 GMT (envelope-from brooks@FreeBSD.org) Received: (from brooks@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 023I5BIP042976; Tue, 3 Mar 2020 18:05:11 GMT (envelope-from brooks@FreeBSD.org) Message-Id: <202003031805.023I5BIP042976@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: brooks set sender to brooks@FreeBSD.org using -f From: Brooks Davis Date: Tue, 3 Mar 2020 18:05:11 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r358592 - head/sys/net X-SVN-Group: head X-SVN-Commit-Author: brooks X-SVN-Commit-Paths: head/sys/net X-SVN-Commit-Revision: 358592 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages 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, 03 Mar 2020 18:05:12 -0000 Author: brooks Date: Tue Mar 3 18:05:11 2020 New Revision: 358592 URL: https://svnweb.freebsd.org/changeset/base/358592 Log: Expose ifr_buffer_get_(buffer|length) outside if.c. This is a preparatory commit for D23933. Reviewed by: jhb Modified: head/sys/net/if.c head/sys/net/if_var.h Modified: head/sys/net/if.c ============================================================================== --- head/sys/net/if.c Tue Mar 3 18:01:03 2020 (r358591) +++ head/sys/net/if.c Tue Mar 3 18:05:11 2020 (r358592) @@ -2414,7 +2414,7 @@ ifunit(const char *name) return (ifp); } -static void * +void * ifr_buffer_get_buffer(void *data) { union ifreq_union *ifrup; @@ -2442,7 +2442,7 @@ ifr_buffer_set_buffer_null(void *data) ifrup->ifr.ifr_ifru.ifru_buffer.buffer = NULL; } -static size_t +size_t ifr_buffer_get_length(void *data) { union ifreq_union *ifrup; Modified: head/sys/net/if_var.h ============================================================================== --- head/sys/net/if_var.h Tue Mar 3 18:01:03 2020 (r358591) +++ head/sys/net/if_var.h Tue Mar 3 18:05:11 2020 (r358592) @@ -784,6 +784,8 @@ int if_hw_tsomax_update(if_t ifp, struct ifnet_hw_tsom /* accessors for struct ifreq */ void *ifr_data_get_ptr(void *ifrp); +void *ifr_buffer_get_buffer(void *data); +size_t ifr_buffer_get_length(void *data); int ifhwioctl(u_long, struct ifnet *, caddr_t, struct thread *); From owner-svn-src-all@freebsd.org Tue Mar 3 18:58:44 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 3AFF025949C; Tue, 3 Mar 2020 18:58:44 +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 48X5rg70Pmz3x18; Tue, 3 Mar 2020 18:58:43 +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 D28449C86; Tue, 3 Mar 2020 18:58:43 +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 023Iwhek078309; Tue, 3 Mar 2020 18:58:43 GMT (envelope-from brooks@FreeBSD.org) Received: (from brooks@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 023IwhVT078308; Tue, 3 Mar 2020 18:58:43 GMT (envelope-from brooks@FreeBSD.org) Message-Id: <202003031858.023IwhVT078308@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: brooks set sender to brooks@FreeBSD.org using -f From: Brooks Davis Date: Tue, 3 Mar 2020 18:58:43 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r358593 - head/sys/dev/mxge X-SVN-Group: head X-SVN-Commit-Author: brooks X-SVN-Commit-Paths: head/sys/dev/mxge X-SVN-Commit-Revision: 358593 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages 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, 03 Mar 2020 18:58:44 -0000 Author: brooks Date: Tue Mar 3 18:58:43 2020 New Revision: 358593 URL: https://svnweb.freebsd.org/changeset/base/358593 Log: Use ifr_data_get_ptr() consistently. Modified: head/sys/dev/mxge/if_mxge.c Modified: head/sys/dev/mxge/if_mxge.c ============================================================================== --- head/sys/dev/mxge/if_mxge.c Tue Mar 3 18:05:11 2020 (r358592) +++ head/sys/dev/mxge/if_mxge.c Tue Mar 3 18:58:43 2020 (r358593) @@ -4326,7 +4326,7 @@ mxge_ioctl(struct ifnet *ifp, u_long command, caddr_t err = mxge_fetch_i2c(sc, &i2c); mtx_unlock(&sc->driver_mtx); if (err == 0) - err = copyout(&i2c, ifr->ifr_ifru.ifru_data, + err = copyout(&i2c, ifr_data_get_ptr(ifr), sizeof(i2c)); break; default: From owner-svn-src-all@freebsd.org Tue Mar 3 22:14:25 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 40EC925D19F; Tue, 3 Mar 2020 22:14:25 +0000 (UTC) (envelope-from vangyzen@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 48XBBS6S2bz45cR; Tue, 3 Mar 2020 22:14:24 +0000 (UTC) (envelope-from vangyzen@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 97636C2AC; Tue, 3 Mar 2020 22:14:24 +0000 (UTC) (envelope-from vangyzen@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 023MEOPY096909; Tue, 3 Mar 2020 22:14:24 GMT (envelope-from vangyzen@FreeBSD.org) Received: (from vangyzen@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 023MEOc4096908; Tue, 3 Mar 2020 22:14:24 GMT (envelope-from vangyzen@FreeBSD.org) Message-Id: <202003032214.023MEOc4096908@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: vangyzen set sender to vangyzen@FreeBSD.org using -f From: Eric van Gyzen Date: Tue, 3 Mar 2020 22:14:24 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r358594 - head/sbin/dumpon X-SVN-Group: head X-SVN-Commit-Author: vangyzen X-SVN-Commit-Paths: head/sbin/dumpon X-SVN-Commit-Revision: 358594 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages 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, 03 Mar 2020 22:14:25 -0000 Author: vangyzen Date: Tue Mar 3 22:14:23 2020 New Revision: 358594 URL: https://svnweb.freebsd.org/changeset/base/358594 Log: dumpon: skip size check if using zstd As with gzip, let the dump device be smaller than physical memory when using zstd and full dumps. Also print the error message if the size check fails, even if -v is not specified. Failing silently is not friendly. Reviewed by: cem markj MFC after: 2 weeks Sponsored by: Dell EMC Isilon Differential Revision: https://reviews.freebsd.org/D23923 Modified: head/sbin/dumpon/dumpon.c Modified: head/sbin/dumpon/dumpon.c ============================================================================== --- head/sbin/dumpon/dumpon.c Tue Mar 3 18:58:43 2020 (r358593) +++ head/sbin/dumpon/dumpon.c Tue Mar 3 22:14:23 2020 (r358594) @@ -203,11 +203,8 @@ check_size(int fd, const char *fn) err(EX_OSERR, "can't get memory size"); if (ioctl(fd, DIOCGMEDIASIZE, &mediasize) != 0) err(EX_OSERR, "%s: can't get size", fn); - if ((uintmax_t)mediasize < (uintmax_t)physmem) { - if (verbose) - printf("%s is smaller than physical memory\n", fn); - exit(EX_IOERR); - } + if ((uintmax_t)mediasize < (uintmax_t)physmem) + errx(EX_IOERR, "%s is smaller than physical memory", fn); } #ifdef HAVE_CRYPTO @@ -495,7 +492,7 @@ main(int argc, char *argv[]) usage(); fd = opendumpdev(dev, dumpdev); - if (!netdump && !gzip && !rflag) + if (!netdump && !gzip && !zstd && !rflag) check_size(fd, dumpdev); kdap = &ndconf; From owner-svn-src-all@freebsd.org Tue Mar 3 22:23:57 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 84FB125D6AC; Tue, 3 Mar 2020 22:23:57 +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 48XBPT12Q6z4JG9; Tue, 3 Mar 2020 22:23:57 +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 0B098C49D; Tue, 3 Mar 2020 22:23:57 +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 023MNuQP002959; Tue, 3 Mar 2020 22:23:56 GMT (envelope-from jhibbits@FreeBSD.org) Received: (from jhibbits@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 023MNuvX002958; Tue, 3 Mar 2020 22:23:56 GMT (envelope-from jhibbits@FreeBSD.org) Message-Id: <202003032223.023MNuvX002958@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jhibbits set sender to jhibbits@FreeBSD.org using -f From: Justin Hibbits Date: Tue, 3 Mar 2020 22:23:56 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r358595 - head/sys/dev/ismt X-SVN-Group: head X-SVN-Commit-Author: jhibbits X-SVN-Commit-Paths: head/sys/dev/ismt X-SVN-Commit-Revision: 358595 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages 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, 03 Mar 2020 22:23:57 -0000 Author: jhibbits Date: Tue Mar 3 22:23:56 2020 New Revision: 358595 URL: https://svnweb.freebsd.org/changeset/base/358595 Log: Add Atom C3000 (Denverton) SMT PCI ID MFC after: 3 days Sponsored by: Juniper Networks, Inc Modified: head/sys/dev/ismt/ismt.c Modified: head/sys/dev/ismt/ismt.c ============================================================================== --- head/sys/dev/ismt/ismt.c Tue Mar 3 22:14:23 2020 (r358594) +++ head/sys/dev/ismt/ismt.c Tue Mar 3 22:23:56 2020 (r358595) @@ -717,6 +717,7 @@ fail: #define ID_INTEL_S1200_SMT0 0x0c598086 #define ID_INTEL_S1200_SMT1 0x0c5a8086 #define ID_INTEL_C2000_SMT 0x1f158086 +#define ID_INTEL_C3000_SMT 0x19ac8086 static int ismt_probe(device_t dev) @@ -732,6 +733,9 @@ ismt_probe(device_t dev) break; case ID_INTEL_C2000_SMT: desc = "Atom Processor C2000 SMBus 2.0"; + break; + case ID_INTEL_C3000_SMT: + desc = "Atom Processor C3000 SMBus 2.0"; break; default: return (ENXIO); From owner-svn-src-all@freebsd.org Tue Mar 3 23:15:31 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id A7D5B25E27A; Tue, 3 Mar 2020 23:15:31 +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 48XCXz2ZSLz40vY; Tue, 3 Mar 2020 23:15:31 +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 1F3D4CDB2; Tue, 3 Mar 2020 23:15:31 +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 023NFUOM033017; Tue, 3 Mar 2020 23:15:30 GMT (envelope-from cem@FreeBSD.org) Received: (from cem@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 023NFUIP033016; Tue, 3 Mar 2020 23:15:30 GMT (envelope-from cem@FreeBSD.org) Message-Id: <202003032315.023NFUIP033016@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: cem set sender to cem@FreeBSD.org using -f From: Conrad Meyer Date: Tue, 3 Mar 2020 23:15:30 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r358596 - head/sys/sys X-SVN-Group: head X-SVN-Commit-Author: cem X-SVN-Commit-Paths: head/sys/sys X-SVN-Commit-Revision: 358596 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages 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, 03 Mar 2020 23:15:31 -0000 Author: cem Date: Tue Mar 3 23:15:30 2020 New Revision: 358596 URL: https://svnweb.freebsd.org/changeset/base/358596 Log: sys/signalvar.h: Fix opposite boolean sense in comment Correct the sense of the comment describing sigsetmasked() to match the code. It was exactly backwards. While here, convert the type/values of the predicate from pre-C99 int/1/0 to bool/true/false. No functional change. Modified: head/sys/sys/signalvar.h Modified: head/sys/sys/signalvar.h ============================================================================== --- head/sys/sys/signalvar.h Tue Mar 3 22:23:56 2020 (r358595) +++ head/sys/sys/signalvar.h Tue Mar 3 23:15:30 2020 (r358596) @@ -282,20 +282,20 @@ extern bool sigfastblock_fetch_always; (!SIGISEMPTY((td)->td_proc->p_siglist) && \ !sigsetmasked(&(td)->td_proc->p_siglist, &(td)->td_sigmask))) /* - * Return the value of the pseudo-expression ((*set & ~*mask) != 0). This + * Return the value of the pseudo-expression ((*set & ~*mask) == 0). This * is an optimized version of SIGISEMPTY() on a temporary variable * containing SIGSETNAND(*set, *mask). */ -static __inline int +static __inline bool sigsetmasked(sigset_t *set, sigset_t *mask) { int i; for (i = 0; i < _SIG_WORDS; i++) { if (set->__bits[i] & ~mask->__bits[i]) - return (0); + return (false); } - return (1); + return (true); } #define ksiginfo_init(ksi) \ From owner-svn-src-all@freebsd.org Wed Mar 4 00:22:52 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id F27B925F6E1; Wed, 4 Mar 2020 00:22:51 +0000 (UTC) (envelope-from chs@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 48XF2g3yBFz3ytv; Wed, 4 Mar 2020 00:22:51 +0000 (UTC) (envelope-from chs@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 50A23DA98; Wed, 4 Mar 2020 00:22:51 +0000 (UTC) (envelope-from chs@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 0240Mp5G074187; Wed, 4 Mar 2020 00:22:51 GMT (envelope-from chs@FreeBSD.org) Received: (from chs@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 0240Mpm6074186; Wed, 4 Mar 2020 00:22:51 GMT (envelope-from chs@FreeBSD.org) Message-Id: <202003040022.0240Mpm6074186@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: chs set sender to chs@FreeBSD.org using -f From: Chuck Silvers Date: Wed, 4 Mar 2020 00:22:51 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r358597 - head/sys/kern X-SVN-Group: head X-SVN-Commit-Author: chs X-SVN-Commit-Paths: head/sys/kern X-SVN-Commit-Revision: 358597 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages 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, 04 Mar 2020 00:22:52 -0000 Author: chs Date: Wed Mar 4 00:22:50 2020 New Revision: 358597 URL: https://svnweb.freebsd.org/changeset/base/358597 Log: if vm_pager_get_pages_async() returns an error, release the sfio->nios refcount that we took earlier that represents the I/O that ended up not being started. Reviewed by: glebius Approved by: imp (mentor) Sponsored by: Netflix Modified: head/sys/kern/kern_sendfile.c Modified: head/sys/kern/kern_sendfile.c ============================================================================== --- head/sys/kern/kern_sendfile.c Tue Mar 3 23:15:30 2020 (r358596) +++ head/sys/kern/kern_sendfile.c Wed Mar 4 00:22:50 2020 (r358597) @@ -454,6 +454,7 @@ sendfile_swapin(vm_object_t obj, struct sf_io *sfio, i __func__, pa, j)); vm_page_unwire(pa[j], PQ_INACTIVE); } + refcount_release(&sfio->nios); return (EIO); } From owner-svn-src-all@freebsd.org Wed Mar 4 01:56:17 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 1190A2616BF for ; Wed, 4 Mar 2020 01:56:17 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: from mail-qv1-xf34.google.com (mail-qv1-xf34.google.com [IPv6:2607:f8b0:4864:20::f34]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1O1" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 48XH6R5ZXcz3PYQ for ; Wed, 4 Mar 2020 01:56:15 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: by mail-qv1-xf34.google.com with SMTP id r15so116333qve.3 for ; Tue, 03 Mar 2020 17:56:15 -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=Hf6gsG4xjkVc4NP/m/dsrcvp0SifAiHYNnXcICVRTko=; b=EsyOVZYZ8GHlu07edYt47RnwSNftIANMy8kw5gITz87xkC3/haxOArf7OOUxTP0c1y lPuWGMCvwkfjJdR+AwxkEFD0rzwDbeKaiauvEKyHntCmKXyyaprZNqyFvkWgwgtu/joD CMmm43v202UtehJ1l33JYLENM6paKJjgQaY0t38AY1GOdgA2OnzTc/s2uuz2VgW9UydL WzOyKT/RzY9TcjkAYPn/z5SY5741weV6DiKHZhuJ2Bg1MEGz8d3AnDLnmRDBSgr4626X GVQt0OeChy6oCftwyWVVQzNLBXFf2GRERdnVt1WDHoCvys80soxSsGjIUCPduYdBqSvN asVg== 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=Hf6gsG4xjkVc4NP/m/dsrcvp0SifAiHYNnXcICVRTko=; b=I6C/MuPI08K990/MxIaSob3LKulb36pbRAqbt/C1Nb4+qjtkmnJY+17j1fmzq5B05p vqnRd4Fd8Yql8IWtbnEZ+O/KVN/bCgzM8lFuF/wSeJrBKH701qZMcXaQMB3f0tgU7e8A n8HyI5Eu/IEnOmbkUmZkeSPHXyyKlSLe1ikI2KsQl3umup3QB21Y0uxyGHhUEhfZBxvG 3TYDU9XHxUPavGEtR+0+hD4VyBQ94oOeqdcnNJ10kMzq1/Nrctb7I8L8NcHj+r0JkM/r XJXvIzIMaT8GzXpBsOSyejUKOsVd21rRalgbhPZVXv4/lqgn7IH7erkD1zA6PcLuK2vf 8ctg== X-Gm-Message-State: ANhLgQ1cj8NEklSDq7QwHnW4+yEsxXXTfwXnUJo3YET7aHBeLiLCuvMA PRLBNbKLm9a0rLgsrclgkzJitcprJDrCUhlHC46lSg== X-Google-Smtp-Source: ADFU+vvJZDTqE/1m7gj2Cofddfoiaf15eWAUB1rk9SFLAi/a+EH15jJcFQf5pNn0/HYkjR3Lie9Cg8k/z+eBCHcDEyk= X-Received: by 2002:ad4:4e88:: with SMTP id dy8mr343652qvb.118.1583286974349; Tue, 03 Mar 2020 17:56:14 -0800 (PST) MIME-Version: 1.0 References: <202003011727.021HRU5G076569@repo.freebsd.org> <81a089ea-d8a4-9f4b-dc24-3a7bd7e4cbba@FreeBSD.org> In-Reply-To: <81a089ea-d8a4-9f4b-dc24-3a7bd7e4cbba@FreeBSD.org> From: Warner Losh Date: Tue, 3 Mar 2020 18:56:03 -0700 Message-ID: Subject: Re: svn commit: r358486 - head/sys/dev/bce To: John Baldwin Cc: Warner Losh , src-committers , svn-src-all , svn-src-head X-Rspamd-Queue-Id: 48XH6R5ZXcz3PYQ X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org; dkim=pass header.d=bsdimp-com.20150623.gappssmtp.com header.s=20150623 header.b=EsyOVZYZ; dmarc=none; spf=none (mx1.freebsd.org: domain of wlosh@bsdimp.com has no SPF policy when checking 2607:f8b0:4864:20::f34) smtp.mailfrom=wlosh@bsdimp.com X-Spamd-Result: default: False [-2.91 / 15.00]; ARC_NA(0.00)[]; NEURAL_HAM_MEDIUM(-1.00)[-0.996,0]; R_DKIM_ALLOW(-0.20)[bsdimp-com.20150623.gappssmtp.com:s=20150623]; FROM_HAS_DN(0.00)[]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; MIME_GOOD(-0.10)[multipart/alternative,text/plain]; PREVIOUSLY_DELIVERED(0.00)[svn-src-all@freebsd.org]; DMARC_NA(0.00)[bsdimp.com]; URI_COUNT_ODD(1.00)[3]; RCPT_COUNT_FIVE(0.00)[5]; TO_MATCH_ENVRCPT_SOME(0.00)[]; TO_DN_ALL(0.00)[]; DKIM_TRACE(0.00)[bsdimp-com.20150623.gappssmtp.com:+]; RCVD_IN_DNSWL_NONE(0.00)[4.3.f.0.0.0.0.0.0.0.0.0.0.0.0.0.0.2.0.0.4.6.8.4.0.b.8.f.7.0.6.2.list.dnswl.org : 127.0.5.0]; R_SPF_NA(0.00)[]; FORGED_SENDER(0.30)[imp@bsdimp.com,wlosh@bsdimp.com]; MIME_TRACE(0.00)[0:+,1:+,2:~]; IP_SCORE(-1.91)[ip: (-6.00), ipnet: 2607:f8b0::/32(-1.86), asn: 15169(-1.66), country: US(-0.05)]; ASN(0.00)[asn:15169, ipnet:2607:f8b0::/32, country:US]; FROM_NEQ_ENVFROM(0.00)[imp@bsdimp.com,wlosh@bsdimp.com]; RCVD_TLS_ALL(0.00)[]; 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: Wed, 04 Mar 2020 01:56:17 -0000 On Mon, Mar 2, 2020 at 3:06 PM John Baldwin wrote: > On 3/1/20 9:27 AM, Warner Losh wrote: > > Author: imp > > Date: Sun Mar 1 17:27:30 2020 > > New Revision: 358486 > > URL: https://svnweb.freebsd.org/changeset/base/358486 > > > > Log: > > Remove all the compatibility hacks for systems that predate FreeBSD 8. > Some of > > these look to be cut and pasted from other drivers since this driver > was > > committed to FreeBSD 7-current and MFC'd to FreeBSD 6. The ones for > FreeBSD 4 > > and 5 likely never were working... > > You'd be surprised. I had to backport this to 4.x for Y!BSD, so I do > suspect > the 4.x bits worked fine. Good to clean out the cruft regardless. > The more you know... the more you think a good stiff drink is in order :) Warner From owner-svn-src-all@freebsd.org Wed Mar 4 04:36:51 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 9C34026496F; Wed, 4 Mar 2020 04:36:51 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 48XLgl0hCdz4tyc; Wed, 4 Mar 2020 04:36:51 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id CB02A188C6; Wed, 4 Mar 2020 04:36:50 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 0244aora024355; Wed, 4 Mar 2020 04:36:50 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 0244aoo1024354; Wed, 4 Mar 2020 04:36:50 GMT (envelope-from mav@FreeBSD.org) Message-Id: <202003040436.0244aoo1024354@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Wed, 4 Mar 2020 04:36: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: r358598 - stable/12/sys/cddl/contrib/opensolaris/uts/common/fs/zfs X-SVN-Group: stable-12 X-SVN-Commit-Author: mav X-SVN-Commit-Paths: stable/12/sys/cddl/contrib/opensolaris/uts/common/fs/zfs X-SVN-Commit-Revision: 358598 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages 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, 04 Mar 2020 04:36:51 -0000 Author: mav Date: Wed Mar 4 04:36:50 2020 New Revision: 358598 URL: https://svnweb.freebsd.org/changeset/base/358598 Log: MFC r358336: MFZoL: Fix txg_sync_thread hang in scan_exec_io() When scn->scn_maxinflight_bytes has not been initialized it's possible to hang on the condition variable in scan_exec_io(). This issue was uncovered by ztest and is only possible when deduplication is enabled through the following call path. txg_sync_thread() spa_sync() ddt_sync_table() ddt_sync_entry() dsl_scan_ddt_entry() dsl_scan_scrub_cb() dsl_scan_enqueuei() scan_exec_io() cv_wait() Resolve the issue by always initializing scn_maxinflight_bytes to a reasonable minimum value. This value will be recalculated in dsl_scan_sync() to pick up changes to zfs_scan_vdev_limit and the addition/removal of vdevs. Reviewed-by: Tom Caputi Reviewed by: George Melikov Signed-off-by: Brian Behlendorf Closes #7098 zfsonlinux/zfs@f90a30ad1b32a971f62a540f8944e42f99b254ce Modified: stable/12/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_scan.c Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_scan.c ============================================================================== --- stable/12/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_scan.c Wed Mar 4 00:22:50 2020 (r358597) +++ stable/12/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_scan.c Wed Mar 4 04:36:50 2020 (r358598) @@ -125,6 +125,7 @@ static boolean_t scan_ds_queue_contains(dsl_scan_t *sc static void scan_ds_queue_insert(dsl_scan_t *scn, uint64_t dsobj, uint64_t txg); static void scan_ds_queue_remove(dsl_scan_t *scn, uint64_t dsobj); static void scan_ds_queue_sync(dsl_scan_t *scn, dmu_tx_t *tx); +static uint64_t dsl_scan_count_leaves(vdev_t *vd); extern int zfs_vdev_async_write_active_min_dirty_percent; @@ -439,6 +440,14 @@ dsl_scan_init(dsl_pool_t *dp, uint64_t txg) scn->scn_async_destroying = spa_feature_is_active(dp->dp_spa, SPA_FEATURE_ASYNC_DESTROY); + /* + * Calculate the max number of in-flight bytes for pool-wide + * scanning operations (minimum 1MB). Limits for the issuing + * phase are done per top-level vdev and are handled separately. + */ + scn->scn_maxinflight_bytes = MAX(zfs_scan_vdev_limit * + dsl_scan_count_leaves(spa->spa_root_vdev), 1ULL << 20); + bcopy(&scn->scn_phys, &scn->scn_phys_cached, sizeof (scn->scn_phys)); avl_create(&scn->scn_queue, scan_ds_queue_compare, sizeof (scan_ds_t), offsetof(scan_ds_t, sds_node)); @@ -2350,7 +2359,7 @@ dsl_scan_ddt_entry(dsl_scan_t *scn, enum zio_checksum zbookmark_phys_t zb = { 0 }; int p; - if (scn->scn_phys.scn_state != DSS_SCANNING) + if (!dsl_scan_is_running(scn)) return; for (p = 0; p < DDT_PHYS_TYPES; p++, ddp++) { @@ -3333,7 +3342,7 @@ dsl_scan_sync(dsl_pool_t *dp, dmu_tx_t *tx) uint64_t nr_leaves = dsl_scan_count_leaves(spa->spa_root_vdev); /* - * Calculate the max number of in-flight bytes for pool-wide + * Recalculate the max number of in-flight bytes for pool-wide * scanning operations (minimum 1MB). Limits for the issuing * phase are done per top-level vdev and are handled separately. */ @@ -3652,6 +3661,8 @@ dsl_scan_scrub_done(zio_t *zio) dsl_scan_io_queue_t *queue = zio->io_private; abd_free(zio->io_abd); + + ASSERT3U(scn->scn_maxinflight_bytes, >, 0); if (queue == NULL) { mutex_enter(&spa->spa_scrub_lock); From owner-svn-src-all@freebsd.org Wed Mar 4 04:38:33 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 3E8F4264B89; Wed, 4 Mar 2020 04:38:33 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 48XLjg67PNz3D7R; Wed, 4 Mar 2020 04:38:31 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id D81EB188CC; Wed, 4 Mar 2020 04:38:30 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 0244cUI5024496; Wed, 4 Mar 2020 04:38:30 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 0244cUZP024495; Wed, 4 Mar 2020 04:38:30 GMT (envelope-from mav@FreeBSD.org) Message-Id: <202003040438.0244cUZP024495@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Wed, 4 Mar 2020 04:38:30 +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: r358599 - stable/12/sys/cddl/contrib/opensolaris/uts/common/fs/zfs X-SVN-Group: stable-12 X-SVN-Commit-Author: mav X-SVN-Commit-Paths: stable/12/sys/cddl/contrib/opensolaris/uts/common/fs/zfs X-SVN-Commit-Revision: 358599 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages 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, 04 Mar 2020 04:38:33 -0000 Author: mav Date: Wed Mar 4 04:38:30 2020 New Revision: 358599 URL: https://svnweb.freebsd.org/changeset/base/358599 Log: MFC r358340: Fix patch mismerge in r358336. Modified: stable/12/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_scan.c Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_scan.c ============================================================================== --- stable/12/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_scan.c Wed Mar 4 04:36:50 2020 (r358598) +++ stable/12/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_scan.c Wed Mar 4 04:38:30 2020 (r358599) @@ -3662,8 +3662,6 @@ dsl_scan_scrub_done(zio_t *zio) abd_free(zio->io_abd); - ASSERT3U(scn->scn_maxinflight_bytes, >, 0); - if (queue == NULL) { mutex_enter(&spa->spa_scrub_lock); ASSERT3U(spa->spa_scrub_inflight, >=, BP_GET_PSIZE(bp)); @@ -3700,6 +3698,8 @@ scan_exec_io(dsl_pool_t *dp, const blkptr_t *bp, int z size_t size = BP_GET_PSIZE(bp); abd_t *data = abd_alloc_for_io(size, B_FALSE); unsigned int scan_delay = 0; + + ASSERT3U(scn->scn_maxinflight_bytes, >, 0); if (queue == NULL) { mutex_enter(&spa->spa_scrub_lock); From owner-svn-src-all@freebsd.org Wed Mar 4 04:39:35 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id CA1FF264C7B; Wed, 4 Mar 2020 04:39:35 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 48XLkv24Ppz3Gbw; Wed, 4 Mar 2020 04:39:35 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id E98DC188D2; Wed, 4 Mar 2020 04:39:34 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 0244dYiA024598; Wed, 4 Mar 2020 04:39:34 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 0244dYWT024597; Wed, 4 Mar 2020 04:39:34 GMT (envelope-from mav@FreeBSD.org) Message-Id: <202003040439.0244dYWT024597@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Wed, 4 Mar 2020 04:39:34 +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: r358600 - stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs X-SVN-Group: stable-11 X-SVN-Commit-Author: mav X-SVN-Commit-Paths: stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs X-SVN-Commit-Revision: 358600 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages 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, 04 Mar 2020 04:39:35 -0000 Author: mav Date: Wed Mar 4 04:39:34 2020 New Revision: 358600 URL: https://svnweb.freebsd.org/changeset/base/358600 Log: MFC r358336, r358340: MFZoL: Fix txg_sync_thread hang in scan_exec_io() When scn->scn_maxinflight_bytes has not been initialized it's possible to hang on the condition variable in scan_exec_io(). This issue was uncovered by ztest and is only possible when deduplication is enabled through the following call path. txg_sync_thread() spa_sync() ddt_sync_table() ddt_sync_entry() dsl_scan_ddt_entry() dsl_scan_scrub_cb() dsl_scan_enqueuei() scan_exec_io() cv_wait() Resolve the issue by always initializing scn_maxinflight_bytes to a reasonable minimum value. This value will be recalculated in dsl_scan_sync() to pick up changes to zfs_scan_vdev_limit and the addition/removal of vdevs. Reviewed-by: Tom Caputi Reviewed by: George Melikov Signed-off-by: Brian Behlendorf Closes #7098 zfsonlinux/zfs@f90a30ad1b32a971f62a540f8944e42f99b254ce Modified: stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_scan.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_scan.c ============================================================================== --- stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_scan.c Wed Mar 4 04:38:30 2020 (r358599) +++ stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_scan.c Wed Mar 4 04:39:34 2020 (r358600) @@ -125,6 +125,7 @@ static boolean_t scan_ds_queue_contains(dsl_scan_t *sc static void scan_ds_queue_insert(dsl_scan_t *scn, uint64_t dsobj, uint64_t txg); static void scan_ds_queue_remove(dsl_scan_t *scn, uint64_t dsobj); static void scan_ds_queue_sync(dsl_scan_t *scn, dmu_tx_t *tx); +static uint64_t dsl_scan_count_leaves(vdev_t *vd); extern int zfs_vdev_async_write_active_min_dirty_percent; @@ -439,6 +440,14 @@ dsl_scan_init(dsl_pool_t *dp, uint64_t txg) scn->scn_async_destroying = spa_feature_is_active(dp->dp_spa, SPA_FEATURE_ASYNC_DESTROY); + /* + * Calculate the max number of in-flight bytes for pool-wide + * scanning operations (minimum 1MB). Limits for the issuing + * phase are done per top-level vdev and are handled separately. + */ + scn->scn_maxinflight_bytes = MAX(zfs_scan_vdev_limit * + dsl_scan_count_leaves(spa->spa_root_vdev), 1ULL << 20); + bcopy(&scn->scn_phys, &scn->scn_phys_cached, sizeof (scn->scn_phys)); avl_create(&scn->scn_queue, scan_ds_queue_compare, sizeof (scan_ds_t), offsetof(scan_ds_t, sds_node)); @@ -2346,7 +2355,7 @@ dsl_scan_ddt_entry(dsl_scan_t *scn, enum zio_checksum zbookmark_phys_t zb = { 0 }; int p; - if (scn->scn_phys.scn_state != DSS_SCANNING) + if (!dsl_scan_is_running(scn)) return; for (p = 0; p < DDT_PHYS_TYPES; p++, ddp++) { @@ -3329,7 +3338,7 @@ dsl_scan_sync(dsl_pool_t *dp, dmu_tx_t *tx) uint64_t nr_leaves = dsl_scan_count_leaves(spa->spa_root_vdev); /* - * Calculate the max number of in-flight bytes for pool-wide + * Recalculate the max number of in-flight bytes for pool-wide * scanning operations (minimum 1MB). Limits for the issuing * phase are done per top-level vdev and are handled separately. */ @@ -3685,6 +3694,8 @@ scan_exec_io(dsl_pool_t *dp, const blkptr_t *bp, int z size_t size = BP_GET_PSIZE(bp); abd_t *data = abd_alloc_for_io(size, B_FALSE); unsigned int scan_delay = 0; + + ASSERT3U(scn->scn_maxinflight_bytes, >, 0); if (queue == NULL) { mutex_enter(&spa->spa_scrub_lock); From owner-svn-src-all@freebsd.org Wed Mar 4 04:40:36 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id EE03E264D33; Wed, 4 Mar 2020 04:40:36 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 48XLm41RHFz3JnZ; Wed, 4 Mar 2020 04:40:36 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id EBE37188EF; Wed, 4 Mar 2020 04:40:35 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 0244eZak025381; Wed, 4 Mar 2020 04:40:35 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 0244eZtv025380; Wed, 4 Mar 2020 04:40:35 GMT (envelope-from mav@FreeBSD.org) Message-Id: <202003040440.0244eZtv025380@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Wed, 4 Mar 2020 04:40:35 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r358601 - stable/12/sys/cddl/contrib/opensolaris/uts/common/fs/zfs X-SVN-Group: stable-12 X-SVN-Commit-Author: mav X-SVN-Commit-Paths: stable/12/sys/cddl/contrib/opensolaris/uts/common/fs/zfs X-SVN-Commit-Revision: 358601 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages 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, 04 Mar 2020 04:40:37 -0000 Author: mav Date: Wed Mar 4 04:40:35 2020 New Revision: 358601 URL: https://svnweb.freebsd.org/changeset/base/358601 Log: MFC r358337: MFZoL: Fix 2 small bugs with cached dsl_scan_phys_t This patch corrects 2 small bugs where scn->scn_phys_cached was not properly updated to match the primary copy when it needed to be. The first resulted in the pause state not being properly updated and the second resulted in the cached version being completely zeroed even if the primary was not. Reviewed-by: Brian Behlendorf Reviewed-by: Serapheim Dimitropoulos Reviewed-by: Matthew Ahrens Signed-off-by: Tom Caputi Closes #8010 zfsonlinux/zfs@8cb119e3dc0ac6c90b1517fbadc021b7e9741fc6 Modified: stable/12/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_scan.c Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_scan.c ============================================================================== --- stable/12/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_scan.c Wed Mar 4 04:39:34 2020 (r358600) +++ stable/12/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_scan.c Wed Mar 4 04:40:35 2020 (r358601) @@ -448,7 +448,6 @@ dsl_scan_init(dsl_pool_t *dp, uint64_t txg) scn->scn_maxinflight_bytes = MAX(zfs_scan_vdev_limit * dsl_scan_count_leaves(spa->spa_root_vdev), 1ULL << 20); - bcopy(&scn->scn_phys, &scn->scn_phys_cached, sizeof (scn->scn_phys)); avl_create(&scn->scn_queue, scan_ds_queue_compare, sizeof (scan_ds_t), offsetof(scan_ds_t, sds_node)); avl_create(&scn->scn_prefetch_queue, scan_prefetch_queue_compare, @@ -506,6 +505,8 @@ dsl_scan_init(dsl_pool_t *dp, uint64_t txg) } } + bcopy(&scn->scn_phys, &scn->scn_phys_cached, sizeof (scn->scn_phys)); + /* reload the queue into the in-core state */ if (scn->scn_phys.scn_queue_obj != 0) { zap_cursor_t zc; @@ -928,6 +929,7 @@ dsl_scrub_pause_resume_sync(void *arg, dmu_tx_t *tx) /* can't pause a scrub when there is no in-progress scrub */ spa->spa_scan_pass_scrub_pause = gethrestime_sec(); scn->scn_phys.scn_flags |= DSF_SCRUB_PAUSED; + scn->scn_phys_cached.scn_flags |= DSF_SCRUB_PAUSED; dsl_scan_sync_state(scn, tx, SYNC_CACHED); spa_event_notify(spa, NULL, NULL, ESC_ZFS_SCRUB_PAUSED); } else { @@ -942,6 +944,7 @@ dsl_scrub_pause_resume_sync(void *arg, dmu_tx_t *tx) gethrestime_sec() - spa->spa_scan_pass_scrub_pause; spa->spa_scan_pass_scrub_pause = 0; scn->scn_phys.scn_flags &= ~DSF_SCRUB_PAUSED; + scn->scn_phys_cached.scn_flags &= ~DSF_SCRUB_PAUSED; dsl_scan_sync_state(scn, tx, SYNC_CACHED); } } From owner-svn-src-all@freebsd.org Wed Mar 4 04:40:55 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 29632264D94; Wed, 4 Mar 2020 04:40:55 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 48XLmQ6x3Qz3KTG; Wed, 4 Mar 2020 04:40:54 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id BBC1418A01; Wed, 4 Mar 2020 04:40:54 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 0244esPB025451; Wed, 4 Mar 2020 04:40:54 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 0244esOD025450; Wed, 4 Mar 2020 04:40:54 GMT (envelope-from mav@FreeBSD.org) Message-Id: <202003040440.0244esOD025450@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Wed, 4 Mar 2020 04:40:54 +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: r358602 - stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs X-SVN-Group: stable-11 X-SVN-Commit-Author: mav X-SVN-Commit-Paths: stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs X-SVN-Commit-Revision: 358602 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages 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, 04 Mar 2020 04:40:55 -0000 Author: mav Date: Wed Mar 4 04:40:54 2020 New Revision: 358602 URL: https://svnweb.freebsd.org/changeset/base/358602 Log: MFC r358337: MFZoL: Fix 2 small bugs with cached dsl_scan_phys_t This patch corrects 2 small bugs where scn->scn_phys_cached was not properly updated to match the primary copy when it needed to be. The first resulted in the pause state not being properly updated and the second resulted in the cached version being completely zeroed even if the primary was not. Reviewed-by: Brian Behlendorf Reviewed-by: Serapheim Dimitropoulos Reviewed-by: Matthew Ahrens Signed-off-by: Tom Caputi Closes #8010 zfsonlinux/zfs@8cb119e3dc0ac6c90b1517fbadc021b7e9741fc6 Modified: stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_scan.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_scan.c ============================================================================== --- stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_scan.c Wed Mar 4 04:40:35 2020 (r358601) +++ stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_scan.c Wed Mar 4 04:40:54 2020 (r358602) @@ -448,7 +448,6 @@ dsl_scan_init(dsl_pool_t *dp, uint64_t txg) scn->scn_maxinflight_bytes = MAX(zfs_scan_vdev_limit * dsl_scan_count_leaves(spa->spa_root_vdev), 1ULL << 20); - bcopy(&scn->scn_phys, &scn->scn_phys_cached, sizeof (scn->scn_phys)); avl_create(&scn->scn_queue, scan_ds_queue_compare, sizeof (scan_ds_t), offsetof(scan_ds_t, sds_node)); avl_create(&scn->scn_prefetch_queue, scan_prefetch_queue_compare, @@ -506,6 +505,8 @@ dsl_scan_init(dsl_pool_t *dp, uint64_t txg) } } + bcopy(&scn->scn_phys, &scn->scn_phys_cached, sizeof (scn->scn_phys)); + /* reload the queue into the in-core state */ if (scn->scn_phys.scn_queue_obj != 0) { zap_cursor_t zc; @@ -928,6 +929,7 @@ dsl_scrub_pause_resume_sync(void *arg, dmu_tx_t *tx) /* can't pause a scrub when there is no in-progress scrub */ spa->spa_scan_pass_scrub_pause = gethrestime_sec(); scn->scn_phys.scn_flags |= DSF_SCRUB_PAUSED; + scn->scn_phys_cached.scn_flags |= DSF_SCRUB_PAUSED; dsl_scan_sync_state(scn, tx, SYNC_CACHED); spa_event_notify(spa, NULL, NULL, ESC_ZFS_SCRUB_PAUSED); } else { @@ -942,6 +944,7 @@ dsl_scrub_pause_resume_sync(void *arg, dmu_tx_t *tx) gethrestime_sec() - spa->spa_scan_pass_scrub_pause; spa->spa_scan_pass_scrub_pause = 0; scn->scn_phys.scn_flags &= ~DSF_SCRUB_PAUSED; + scn->scn_phys_cached.scn_flags &= ~DSF_SCRUB_PAUSED; dsl_scan_sync_state(scn, tx, SYNC_CACHED); } } From owner-svn-src-all@freebsd.org Wed Mar 4 04:41:50 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id CB048264E2A; Wed, 4 Mar 2020 04:41:50 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 48XLnV0tHnz3MVs; Wed, 4 Mar 2020 04:41:50 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id BD20B18A66; Wed, 4 Mar 2020 04:41:49 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 0244fns3025546; Wed, 4 Mar 2020 04:41:49 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 0244fnfO025545; Wed, 4 Mar 2020 04:41:49 GMT (envelope-from mav@FreeBSD.org) Message-Id: <202003040441.0244fnfO025545@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Wed, 4 Mar 2020 04:41: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: r358603 - stable/12/sys/cddl/contrib/opensolaris/uts/common/fs/zfs X-SVN-Group: stable-12 X-SVN-Commit-Author: mav X-SVN-Commit-Paths: stable/12/sys/cddl/contrib/opensolaris/uts/common/fs/zfs X-SVN-Commit-Revision: 358603 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages 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, 04 Mar 2020 04:41:50 -0000 Author: mav Date: Wed Mar 4 04:41:49 2020 New Revision: 358603 URL: https://svnweb.freebsd.org/changeset/base/358603 Log: MFC r358339: MFZoL: Fix issue with scanning dedup blocks as scan ends This patch fixes an issue discovered by ztest where dsl_scan_ddt_entry() could add I/Os to the dsl scan queues between when the scan had finished all required work and when the scan was marked as complete. This caused the scan to spin indefinitely without ending. Reviewed-by: Brian Behlendorf Reviewed-by: Serapheim Dimitropoulos Reviewed-by: Matthew Ahrens Signed-off-by: Tom Caputi Closes #8010 zfsonlinux/zfs@5e0bd0ae056e26de36dee3c199c6fcff8f14ee15 Modified: stable/12/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_scan.c Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_scan.c ============================================================================== --- stable/12/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_scan.c Wed Mar 4 04:40:54 2020 (r358602) +++ stable/12/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_scan.c Wed Mar 4 04:41:49 2020 (r358603) @@ -2365,6 +2365,20 @@ dsl_scan_ddt_entry(dsl_scan_t *scn, enum zio_checksum if (!dsl_scan_is_running(scn)) return; + /* + * This function is special because it is the only thing + * that can add scan_io_t's to the vdev scan queues from + * outside dsl_scan_sync(). For the most part this is ok + * as long as it is called from within syncing context. + * However, dsl_scan_sync() expects that no new sio's will + * be added between when all the work for a scan is done + * and the next txg when the scan is actually marked as + * completed. This check ensures we do not issue new sio's + * during this period. + */ + if (scn->scn_done_txg != 0) + return; + for (p = 0; p < DDT_PHYS_TYPES; p++, ddp++) { if (ddp->ddp_phys_birth == 0 || ddp->ddp_phys_birth > scn->scn_phys.scn_max_txg) @@ -3416,6 +3430,8 @@ dsl_scan_sync(dsl_pool_t *dp, dmu_tx_t *tx) (longlong_t)tx->tx_txg); } } else if (scn->scn_is_sorted && scn->scn_bytes_pending != 0) { + ASSERT(scn->scn_clearing); + /* need to issue scrubbing IOs from per-vdev queues */ scn->scn_zio_root = zio_root(dp->dp_spa, NULL, NULL, ZIO_FLAG_CANFAIL); From owner-svn-src-all@freebsd.org Wed Mar 4 04:42:11 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 03734264FA2; Wed, 4 Mar 2020 04:42:11 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 48XLnt0Bgjz3NJ1; Wed, 4 Mar 2020 04:42:10 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id E6B9A18A83; Wed, 4 Mar 2020 04:42:09 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 0244g9LG028595; Wed, 4 Mar 2020 04:42:09 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 0244g9ca028594; Wed, 4 Mar 2020 04:42:09 GMT (envelope-from mav@FreeBSD.org) Message-Id: <202003040442.0244g9ca028594@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Wed, 4 Mar 2020 04:42:09 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r358604 - stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs X-SVN-Group: stable-11 X-SVN-Commit-Author: mav X-SVN-Commit-Paths: stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs X-SVN-Commit-Revision: 358604 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages 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, 04 Mar 2020 04:42:11 -0000 Author: mav Date: Wed Mar 4 04:42:09 2020 New Revision: 358604 URL: https://svnweb.freebsd.org/changeset/base/358604 Log: MFC r358339: MFZoL: Fix issue with scanning dedup blocks as scan ends This patch fixes an issue discovered by ztest where dsl_scan_ddt_entry() could add I/Os to the dsl scan queues between when the scan had finished all required work and when the scan was marked as complete. This caused the scan to spin indefinitely without ending. Reviewed-by: Brian Behlendorf Reviewed-by: Serapheim Dimitropoulos Reviewed-by: Matthew Ahrens Signed-off-by: Tom Caputi Closes #8010 zfsonlinux/zfs@5e0bd0ae056e26de36dee3c199c6fcff8f14ee15 Modified: stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_scan.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_scan.c ============================================================================== --- stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_scan.c Wed Mar 4 04:41:49 2020 (r358603) +++ stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_scan.c Wed Mar 4 04:42:09 2020 (r358604) @@ -2361,6 +2361,20 @@ dsl_scan_ddt_entry(dsl_scan_t *scn, enum zio_checksum if (!dsl_scan_is_running(scn)) return; + /* + * This function is special because it is the only thing + * that can add scan_io_t's to the vdev scan queues from + * outside dsl_scan_sync(). For the most part this is ok + * as long as it is called from within syncing context. + * However, dsl_scan_sync() expects that no new sio's will + * be added between when all the work for a scan is done + * and the next txg when the scan is actually marked as + * completed. This check ensures we do not issue new sio's + * during this period. + */ + if (scn->scn_done_txg != 0) + return; + for (p = 0; p < DDT_PHYS_TYPES; p++, ddp++) { if (ddp->ddp_phys_birth == 0 || ddp->ddp_phys_birth > scn->scn_phys.scn_max_txg) @@ -3412,6 +3426,8 @@ dsl_scan_sync(dsl_pool_t *dp, dmu_tx_t *tx) (longlong_t)tx->tx_txg); } } else if (scn->scn_is_sorted && scn->scn_bytes_pending != 0) { + ASSERT(scn->scn_clearing); + /* need to issue scrubbing IOs from per-vdev queues */ scn->scn_zio_root = zio_root(dp->dp_spa, NULL, NULL, ZIO_FLAG_CANFAIL); From owner-svn-src-all@freebsd.org Wed Mar 4 04:42:57 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 7E115265034; Wed, 4 Mar 2020 04:42:57 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 48XLpn1yVjz3Q40; Wed, 4 Mar 2020 04:42:57 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 2687418AA8; Wed, 4 Mar 2020 04:42:57 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 0244guUZ030454; Wed, 4 Mar 2020 04:42:56 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 0244gu3H030453; Wed, 4 Mar 2020 04:42:56 GMT (envelope-from mav@FreeBSD.org) Message-Id: <202003040442.0244gu3H030453@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Wed, 4 Mar 2020 04:42: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: r358605 - stable/12/sys/cddl/contrib/opensolaris/uts/common/fs/zfs X-SVN-Group: stable-12 X-SVN-Commit-Author: mav X-SVN-Commit-Paths: stable/12/sys/cddl/contrib/opensolaris/uts/common/fs/zfs X-SVN-Commit-Revision: 358605 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages 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, 04 Mar 2020 04:42:57 -0000 Author: mav Date: Wed Mar 4 04:42:56 2020 New Revision: 358605 URL: https://svnweb.freebsd.org/changeset/base/358605 Log: MFC r358342: MFZoL: Fix resilver writes in vdev_indirect_io_start This patch addresses an issue found in ztest where resilver write zios that were passed to an indirect vdev would end up being handled as though they were resilver read zios. This caused issues where the zio->io_abd would be both read to and written from at the same time, causing asserts to fail. Reviewed-by: Brian Behlendorf Reviewed by: Matt Ahrens Reviewed-by: Serapheim Dimitropoulos Signed-off-by: Tom Caputi Closes #8193 zfsonlinux/zfs@5aa95ba0d3502779695341b5f55fa5ba1d3330ff Modified: stable/12/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_indirect.c Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_indirect.c ============================================================================== --- stable/12/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_indirect.c Wed Mar 4 04:42:09 2020 (r358604) +++ stable/12/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_indirect.c Wed Mar 4 04:42:56 2020 (r358605) @@ -1246,6 +1246,8 @@ vdev_indirect_read_all(zio_t *zio) { indirect_vsd_t *iv = zio->io_vsd; + ASSERT3U(zio->io_type, ==, ZIO_TYPE_READ); + for (indirect_split_t *is = list_head(&iv->iv_splits); is != NULL; is = list_next(&iv->iv_splits, is)) { for (int i = 0; i < is->is_children; i++) { @@ -1335,7 +1337,8 @@ vdev_indirect_io_start(zio_t *zio) vdev_indirect_child_io_done, zio)); } else { iv->iv_split_block = B_TRUE; - if (zio->io_flags & (ZIO_FLAG_SCRUB | ZIO_FLAG_RESILVER)) { + if (zio->io_type == ZIO_TYPE_READ && + zio->io_flags & (ZIO_FLAG_SCRUB | ZIO_FLAG_RESILVER)) { /* * Read all copies. Note that for simplicity, * we don't bother consulting the DTL in the @@ -1344,13 +1347,17 @@ vdev_indirect_io_start(zio_t *zio) vdev_indirect_read_all(zio); } else { /* - * Read one copy of each split segment, from the - * top-level vdev. Since we don't know the - * checksum of each split individually, the child - * zio can't ensure that we get the right data. - * E.g. if it's a mirror, it will just read from a - * random (healthy) leaf vdev. We have to verify - * the checksum in vdev_indirect_io_done(). + * If this is a read zio, we read one copy of each + * split segment, from the top-level vdev. Since + * we don't know the checksum of each split + * individually, the child zio can't ensure that + * we get the right data. E.g. if it's a mirror, + * it will just read from a random (healthy) leaf + * vdev. We have to verify the checksum in + * vdev_indirect_io_done(). + * + * For write zios, the vdev code will ensure we write + * to all children. */ for (indirect_split_t *is = list_head(&iv->iv_splits); is != NULL; is = list_next(&iv->iv_splits, is)) { From owner-svn-src-all@freebsd.org Wed Mar 4 04:43:25 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 061DF2650A4; Wed, 4 Mar 2020 04:43:25 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 48XLqJ0LdLz3R2x; Wed, 4 Mar 2020 04:43:23 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 865CA18AAA; Wed, 4 Mar 2020 04:43:23 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 0244hNZ6030532; Wed, 4 Mar 2020 04:43:23 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 0244hNlc030531; Wed, 4 Mar 2020 04:43:23 GMT (envelope-from mav@FreeBSD.org) Message-Id: <202003040443.0244hNlc030531@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Wed, 4 Mar 2020 04:43: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: r358606 - stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs X-SVN-Group: stable-11 X-SVN-Commit-Author: mav X-SVN-Commit-Paths: stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs X-SVN-Commit-Revision: 358606 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages 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, 04 Mar 2020 04:43:25 -0000 Author: mav Date: Wed Mar 4 04:43:23 2020 New Revision: 358606 URL: https://svnweb.freebsd.org/changeset/base/358606 Log: MFC r358342: MFZoL: Fix resilver writes in vdev_indirect_io_start This patch addresses an issue found in ztest where resilver write zios that were passed to an indirect vdev would end up being handled as though they were resilver read zios. This caused issues where the zio->io_abd would be both read to and written from at the same time, causing asserts to fail. Reviewed-by: Brian Behlendorf Reviewed by: Matt Ahrens Reviewed-by: Serapheim Dimitropoulos Signed-off-by: Tom Caputi Closes #8193 zfsonlinux/zfs@5aa95ba0d3502779695341b5f55fa5ba1d3330ff Modified: stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_indirect.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_indirect.c ============================================================================== --- stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_indirect.c Wed Mar 4 04:42:56 2020 (r358605) +++ stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_indirect.c Wed Mar 4 04:43:23 2020 (r358606) @@ -1222,6 +1222,8 @@ vdev_indirect_read_all(zio_t *zio) { indirect_vsd_t *iv = zio->io_vsd; + ASSERT3U(zio->io_type, ==, ZIO_TYPE_READ); + for (indirect_split_t *is = list_head(&iv->iv_splits); is != NULL; is = list_next(&iv->iv_splits, is)) { for (int i = 0; i < is->is_children; i++) { @@ -1310,7 +1312,8 @@ vdev_indirect_io_start(zio_t *zio) vdev_indirect_child_io_done, zio)); } else { iv->iv_split_block = B_TRUE; - if (zio->io_flags & (ZIO_FLAG_SCRUB | ZIO_FLAG_RESILVER)) { + if (zio->io_type == ZIO_TYPE_READ && + zio->io_flags & (ZIO_FLAG_SCRUB | ZIO_FLAG_RESILVER)) { /* * Read all copies. Note that for simplicity, * we don't bother consulting the DTL in the @@ -1319,13 +1322,17 @@ vdev_indirect_io_start(zio_t *zio) vdev_indirect_read_all(zio); } else { /* - * Read one copy of each split segment, from the - * top-level vdev. Since we don't know the - * checksum of each split individually, the child - * zio can't ensure that we get the right data. - * E.g. if it's a mirror, it will just read from a - * random (healthy) leaf vdev. We have to verify - * the checksum in vdev_indirect_io_done(). + * If this is a read zio, we read one copy of each + * split segment, from the top-level vdev. Since + * we don't know the checksum of each split + * individually, the child zio can't ensure that + * we get the right data. E.g. if it's a mirror, + * it will just read from a random (healthy) leaf + * vdev. We have to verify the checksum in + * vdev_indirect_io_done(). + * + * For write zios, the vdev code will ensure we write + * to all children. */ for (indirect_split_t *is = list_head(&iv->iv_splits); is != NULL; is = list_next(&iv->iv_splits, is)) { From owner-svn-src-all@freebsd.org Wed Mar 4 04:44:09 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id E2158265124; Wed, 4 Mar 2020 04:44:09 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 48XLr93MPQz3y1h; Wed, 4 Mar 2020 04:44:09 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 1253618AAD; Wed, 4 Mar 2020 04:44:09 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 0244i8CH030645; Wed, 4 Mar 2020 04:44:08 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 0244i8os030644; Wed, 4 Mar 2020 04:44:08 GMT (envelope-from mav@FreeBSD.org) Message-Id: <202003040444.0244i8os030644@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Wed, 4 Mar 2020 04:44:08 +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: r358607 - stable/12/sys/cddl/contrib/opensolaris/uts/common/fs/zfs X-SVN-Group: stable-12 X-SVN-Commit-Author: mav X-SVN-Commit-Paths: stable/12/sys/cddl/contrib/opensolaris/uts/common/fs/zfs X-SVN-Commit-Revision: 358607 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages 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, 04 Mar 2020 04:44:10 -0000 Author: mav Date: Wed Mar 4 04:44:08 2020 New Revision: 358607 URL: https://svnweb.freebsd.org/changeset/base/358607 Log: MFC r358357: MFZoL: Relax restriction on zfs_ioc_next_obj() iteration Per the documentation for dnode_next_offset in dnode.c, the "txg" parameter specifies a lower bound on which transaction the dnode can be found in. We are interested in all dnodes that are removed between the first and last transaction in the snapshot. It doesn't need to be created in that snapshot to correspond to a removed file. In fact, the behavior of zfs diff in the test case exactly matches this: the transaction that created the data that was deleted in snapshot "2" was produced before, in snapshot "1", definitely predating the first transaction in snapshot "2". Signed-off-by: Brian Behlendorf Signed-off-by: Tim Chase Closes #2081 zfsonlinux/zfs@7290cd3c4ed19fb3f75b8133db2e36afcdd24beb Modified: stable/12/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ioctl.c Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ioctl.c ============================================================================== --- stable/12/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ioctl.c Wed Mar 4 04:43:23 2020 (r358606) +++ stable/12/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ioctl.c Wed Mar 4 04:44:08 2020 (r358607) @@ -5537,8 +5537,7 @@ zfs_ioc_next_obj(zfs_cmd_t *zc) if (error != 0) return (error); - error = dmu_object_next(os, &zc->zc_obj, B_FALSE, - dsl_dataset_phys(os->os_dsl_dataset)->ds_prev_snap_txg); + error = dmu_object_next(os, &zc->zc_obj, B_FALSE, 0); dmu_objset_rele(os, FTAG); return (error); From owner-svn-src-all@freebsd.org Wed Mar 4 04:44:34 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 3C476265194; Wed, 4 Mar 2020 04:44:34 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 48XLrf0Kw9z3yym; Wed, 4 Mar 2020 04:44:34 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id BC05A18AAF; Wed, 4 Mar 2020 04:44:33 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 0244iX2U030719; Wed, 4 Mar 2020 04:44:33 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 0244iXhJ030718; Wed, 4 Mar 2020 04:44:33 GMT (envelope-from mav@FreeBSD.org) Message-Id: <202003040444.0244iXhJ030718@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Wed, 4 Mar 2020 04:44: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: r358608 - stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs X-SVN-Group: stable-11 X-SVN-Commit-Author: mav X-SVN-Commit-Paths: stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs X-SVN-Commit-Revision: 358608 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages 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, 04 Mar 2020 04:44:34 -0000 Author: mav Date: Wed Mar 4 04:44:33 2020 New Revision: 358608 URL: https://svnweb.freebsd.org/changeset/base/358608 Log: MFC r358357: MFZoL: Relax restriction on zfs_ioc_next_obj() iteration Per the documentation for dnode_next_offset in dnode.c, the "txg" parameter specifies a lower bound on which transaction the dnode can be found in. We are interested in all dnodes that are removed between the first and last transaction in the snapshot. It doesn't need to be created in that snapshot to correspond to a removed file. In fact, the behavior of zfs diff in the test case exactly matches this: the transaction that created the data that was deleted in snapshot "2" was produced before, in snapshot "1", definitely predating the first transaction in snapshot "2". Signed-off-by: Brian Behlendorf Signed-off-by: Tim Chase Closes #2081 zfsonlinux/zfs@7290cd3c4ed19fb3f75b8133db2e36afcdd24beb Modified: stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ioctl.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ioctl.c ============================================================================== --- stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ioctl.c Wed Mar 4 04:44:08 2020 (r358607) +++ stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ioctl.c Wed Mar 4 04:44:33 2020 (r358608) @@ -5481,8 +5481,7 @@ zfs_ioc_next_obj(zfs_cmd_t *zc) if (error != 0) return (error); - error = dmu_object_next(os, &zc->zc_obj, B_FALSE, - dsl_dataset_phys(os->os_dsl_dataset)->ds_prev_snap_txg); + error = dmu_object_next(os, &zc->zc_obj, B_FALSE, 0); dmu_objset_rele(os, FTAG); return (error); From owner-svn-src-all@freebsd.org Wed Mar 4 09:08:39 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 2924F269883; Wed, 4 Mar 2020 09:08:39 +0000 (UTC) (envelope-from gbergling@gmail.com) Received: from mail-wm1-x330.google.com (mail-wm1-x330.google.com [IPv6:2a00:1450:4864:20::330]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1O1" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 48XSjF62p9z4Yx1; Wed, 4 Mar 2020 09:08:32 +0000 (UTC) (envelope-from gbergling@gmail.com) Received: by mail-wm1-x330.google.com with SMTP id i9so1049374wml.4; Wed, 04 Mar 2020 01:08:32 -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=KbhrU8NwVdY6XeMpYwt5Tuk/RTW9DAth3K7KtOkb53Y=; b=EvOkz6omIIWil0eUFVpqu/2cKarAeAPrHAC6JfM0KnFHaU41A7g8T1jYjlW2Iue3M3 gbalFjPIybrsgg8l/ohU4YiHDQbyXcQnFB+JcJQS9u6WjugZBbXu5Vr7kf25dpXL1u7G IMIQ8rS5+bwqKdd68FtkHpK9oIOAfkMrEmmrUcv3c9F+vDaNGx+dV8Pjjvv7+L/0o9Hy Ef4aE9PhOiCHmqx52gUaYp34jvdQerOowh+HmOp9dyZMHSYpxBW7cXpodj1ndkiwtEJJ 6PhxY2KKVvXexYfcPn6wMWPvqIb4XcqmL8w80XxRA2/AMsHc4bTWqzNFpsEioIWkMUc7 yVVA== 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=KbhrU8NwVdY6XeMpYwt5Tuk/RTW9DAth3K7KtOkb53Y=; b=Xf1hqfhZ2pjYlRUO7ghSgYZp9dKR20zeBojXi3w7RZ+NFyUuYF6XeRy9LkEPnrALFz D3rn27DpCMoN/J966tRfBSW5WljaVDdEvg2jw0tuv9ww6nBM/w7GVR0u0tlrk3Czqm9i zyP7Tv3vkYy+rCIU03aCOdB6q/I4viZVx6U6j6NXpPQX066XhesVjZoS9MDwLEnzjNN6 eGLZIv9i9w2bmS7SS6XZ/Wbk1KjkoXltxPvI6tPzSOZYg1tufH2z2yJ0HQ5y1a11t6a3 zy+ko+8U6QDDkciWp03fDeVQpwVsOBfEzxFCkzjFPXEenDtRMak7i1y1WWiy2XlU7u3I tWqQ== X-Gm-Message-State: ANhLgQ2Sz4j2WCihZWLy5cymGB5sRAaktC44pDEV68bUWMUYAzpkAP1e W296KJLP9/6Ctlv+ADzBN5vYJn8tRh4= X-Google-Smtp-Source: ADFU+vswZLgItXPMNQ3DJ0bcrcUbtu7e01eRed3AVUbDsmm+k8ZILvzzcnCVK/rDBVp+ITD5qimBCA== X-Received: by 2002:a1c:4e03:: with SMTP id g3mr2624325wmh.22.1583312909011; Wed, 04 Mar 2020 01:08:29 -0800 (PST) Received: from [10.0.1.111] (p4FD3AF8F.dip0.t-ipconnect.de. [79.211.175.143]) by smtp.gmail.com with ESMTPSA id n13sm3127002wmd.21.2020.03.04.01.08.27 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 04 Mar 2020 01:08:27 -0800 (PST) From: Gordon Bergling Message-Id: Mime-Version: 1.0 (Mac OS X Mail 13.0 \(3608.60.0.2.5\)) Subject: Re: svn commit: r358562 - in head: . share/man/man5 share/man/man7 tools/build/options tools/tools/nanobsd/dhcpd tools/tools/nanobsd/embedded usr.bin usr.bin/calendar usr.bin/calendar/calendars usr.bin... Date: Wed, 4 Mar 2020 10:08:25 +0100 In-Reply-To: <202003030020.0230K9h2002380@repo.freebsd.org> Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org To: Conrad Meyer References: <202003030020.0230K9h2002380@repo.freebsd.org> X-Mailer: Apple Mail (2.3608.60.0.2.5) X-Rspamd-Queue-Id: 48XSjF62p9z4Yx1 X-Spamd-Bar: - Authentication-Results: mx1.freebsd.org; dkim=pass header.d=gmail.com header.s=20161025 header.b=EvOkz6om; dmarc=pass (policy=none) header.from=gmail.com; spf=pass (mx1.freebsd.org: domain of gbergling@gmail.com designates 2a00:1450:4864:20::330 as permitted sender) smtp.mailfrom=gbergling@gmail.com X-Spamd-Result: default: False [-1.49 / 15.00]; RCVD_VIA_SMTP_AUTH(0.00)[]; TO_DN_SOME(0.00)[]; R_SPF_ALLOW(-0.20)[+ip6:2a00:1450:4000::/36:c]; FREEMAIL_FROM(0.00)[gmail.com]; MV_CASE(0.50)[]; URI_COUNT_ODD(1.00)[19]; RCVD_COUNT_THREE(0.00)[3]; DKIM_TRACE(0.00)[gmail.com:+]; DMARC_POLICY_ALLOW(-0.50)[gmail.com,none]; FROM_EQ_ENVFROM(0.00)[]; IP_SCORE(0.00)[ip: (-9.11), ipnet: 2a00:1450::/32(-2.40), asn: 15169(-1.66), country: US(-0.05)]; MIME_TRACE(0.00)[0:+,1:+,2:~]; FREEMAIL_ENVFROM(0.00)[gmail.com]; ASN(0.00)[asn:15169, ipnet:2a00:1450::/32, country:US]; MID_RHS_MATCH_FROM(0.00)[]; DWL_DNSWL_NONE(0.00)[gmail.com.dwl.dnswl.org : 127.0.5.0]; ARC_NA(0.00)[]; NEURAL_HAM_MEDIUM(-0.99)[-0.995,0]; R_DKIM_ALLOW(-0.20)[gmail.com:s=20161025]; FROM_HAS_DN(0.00)[]; RCPT_COUNT_THREE(0.00)[4]; TO_MATCH_ENVRCPT_ALL(0.00)[]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; MIME_GOOD(-0.10)[multipart/alternative,text/plain]; IP_SCORE_FREEMAIL(0.00)[]; RCVD_IN_DNSWL_NONE(0.00)[0.3.3.0.0.0.0.0.0.0.0.0.0.0.0.0.0.2.0.0.4.6.8.4.0.5.4.1.0.0.a.2.list.dnswl.org : 127.0.5.0]; RCVD_TLS_ALL(0.00)[] Content-Type: text/plain; charset=us-ascii 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: Wed, 04 Mar 2020 09:08:39 -0000 Thanks for the revert. I handcrafted https://reviews.freebsd.org/D23581 = a while ago, and this took me two = days. Gordon > Am 03.03.2020 um 01:20 schrieb Conrad Meyer : >=20 > Author: cem > Date: Tue Mar 3 00:20:08 2020 > New Revision: 358562 > URL: https://svnweb.freebsd.org/changeset/base/358562 >=20 > Log: > Add extremely useful calendar(1) application to FreeBSD >=20 > It does extremely useful things like execute sendmail and spew = dubiously > accurate factoids. >=20 > =46rom the feedback, it seems like it is an essential utility in a = modern unix > and not at all a useless bikeshed. How do those Linux people live = without it? > Reverts r358561. >=20 > Added: > head/tools/build/options/WITHOUT_CALENDAR > - copied unchanged from r358560, = head/tools/build/options/WITHOUT_CALENDAR > head/usr.bin/calendar/Makefile > - copied unchanged from r358560, head/usr.bin/calendar/Makefile > head/usr.bin/calendar/Makefile.depend > - copied unchanged from r358560, = head/usr.bin/calendar/Makefile.depend > head/usr.bin/calendar/calendar.1 > - copied unchanged from r358560, head/usr.bin/calendar/calendar.1 > head/usr.bin/calendar/calendar.c > - copied unchanged from r358560, head/usr.bin/calendar/calendar.c > head/usr.bin/calendar/calendar.h > - copied unchanged from r358560, head/usr.bin/calendar/calendar.h > head/usr.bin/calendar/calendars/calendar.all > - copied unchanged from r358560, = head/usr.bin/calendar/calendars/calendar.all > head/usr.bin/calendar/calendars/calendar.australia > - copied unchanged from r358560, = head/usr.bin/calendar/calendars/calendar.australia > head/usr.bin/calendar/calendars/calendar.birthday > - copied unchanged from r358560, = head/usr.bin/calendar/calendars/calendar.birthday > head/usr.bin/calendar/calendars/calendar.brazilian > - copied unchanged from r358560, = head/usr.bin/calendar/calendars/calendar.brazilian > head/usr.bin/calendar/calendars/calendar.christian > - copied unchanged from r358560, = head/usr.bin/calendar/calendars/calendar.christian > head/usr.bin/calendar/calendars/calendar.computer > - copied unchanged from r358560, = head/usr.bin/calendar/calendars/calendar.computer > head/usr.bin/calendar/calendars/calendar.croatian > - copied unchanged from r358560, = head/usr.bin/calendar/calendars/calendar.croatian > head/usr.bin/calendar/calendars/calendar.dutch > - copied unchanged from r358560, = head/usr.bin/calendar/calendars/calendar.dutch > head/usr.bin/calendar/calendars/calendar.french > - copied unchanged from r358560, = head/usr.bin/calendar/calendars/calendar.french > head/usr.bin/calendar/calendars/calendar.german > - copied unchanged from r358560, = head/usr.bin/calendar/calendars/calendar.german > head/usr.bin/calendar/calendars/calendar.history > - copied unchanged from r358560, = head/usr.bin/calendar/calendars/calendar.history > head/usr.bin/calendar/calendars/calendar.holiday > - copied unchanged from r358560, = head/usr.bin/calendar/calendars/calendar.holiday > head/usr.bin/calendar/calendars/calendar.hungarian > - copied unchanged from r358560, = head/usr.bin/calendar/calendars/calendar.hungarian > head/usr.bin/calendar/calendars/calendar.judaic > - copied unchanged from r358560, = head/usr.bin/calendar/calendars/calendar.judaic > head/usr.bin/calendar/calendars/calendar.lotr > - copied unchanged from r358560, = head/usr.bin/calendar/calendars/calendar.lotr > head/usr.bin/calendar/calendars/calendar.music > - copied unchanged from r358560, = head/usr.bin/calendar/calendars/calendar.music > head/usr.bin/calendar/calendars/calendar.newzealand > - copied unchanged from r358560, = head/usr.bin/calendar/calendars/calendar.newzealand > head/usr.bin/calendar/calendars/calendar.russian > - copied unchanged from r358560, = head/usr.bin/calendar/calendars/calendar.russian > head/usr.bin/calendar/calendars/calendar.southafrica > - copied unchanged from r358560, = head/usr.bin/calendar/calendars/calendar.southafrica > head/usr.bin/calendar/calendars/calendar.ukrainian > - copied unchanged from r358560, = head/usr.bin/calendar/calendars/calendar.ukrainian > head/usr.bin/calendar/calendars/calendar.usholiday > - copied unchanged from r358560, = head/usr.bin/calendar/calendars/calendar.usholiday > head/usr.bin/calendar/calendars/calendar.world > - copied unchanged from r358560, = head/usr.bin/calendar/calendars/calendar.world > head/usr.bin/calendar/calendars/de_AT.ISO_8859-15/ > - copied from r358560, = head/usr.bin/calendar/calendars/de_AT.ISO_8859-15/ > head/usr.bin/calendar/calendars/de_DE.ISO8859-1/ > - copied from r358560, = head/usr.bin/calendar/calendars/de_DE.ISO8859-1/ > head/usr.bin/calendar/calendars/fr_FR.ISO8859-1/ > - copied from r358560, = head/usr.bin/calendar/calendars/fr_FR.ISO8859-1/ > head/usr.bin/calendar/calendars/hr_HR.ISO8859-2/ > - copied from r358560, = head/usr.bin/calendar/calendars/hr_HR.ISO8859-2/ > head/usr.bin/calendar/calendars/hu_HU.ISO8859-2/ > - copied from r358560, = head/usr.bin/calendar/calendars/hu_HU.ISO8859-2/ > head/usr.bin/calendar/calendars/pt_BR.ISO8859-1/ > - copied from r358560, = head/usr.bin/calendar/calendars/pt_BR.ISO8859-1/ > head/usr.bin/calendar/calendars/pt_BR.UTF-8/ > - copied from r358560, = head/usr.bin/calendar/calendars/pt_BR.UTF-8/ > head/usr.bin/calendar/calendars/ru_RU.KOI8-R/ > - copied from r358560, = head/usr.bin/calendar/calendars/ru_RU.KOI8-R/ > head/usr.bin/calendar/calendars/ru_RU.UTF-8/ > - copied from r358560, = head/usr.bin/calendar/calendars/ru_RU.UTF-8/ > head/usr.bin/calendar/calendars/uk_UA.KOI8-U/ > - copied from r358560, = head/usr.bin/calendar/calendars/uk_UA.KOI8-U/ > head/usr.bin/calendar/dates.c > - copied unchanged from r358560, head/usr.bin/calendar/dates.c > head/usr.bin/calendar/day.c > - copied unchanged from r358560, head/usr.bin/calendar/day.c > head/usr.bin/calendar/events.c > - copied unchanged from r358560, head/usr.bin/calendar/events.c > head/usr.bin/calendar/io.c > - copied unchanged from r358560, head/usr.bin/calendar/io.c > head/usr.bin/calendar/locale.c > - copied unchanged from r358560, head/usr.bin/calendar/locale.c > head/usr.bin/calendar/ostern.c > - copied unchanged from r358560, head/usr.bin/calendar/ostern.c > head/usr.bin/calendar/parsedata.c > - copied unchanged from r358560, head/usr.bin/calendar/parsedata.c > head/usr.bin/calendar/paskha.c > - copied unchanged from r358560, head/usr.bin/calendar/paskha.c > head/usr.bin/calendar/pathnames.h > - copied unchanged from r358560, head/usr.bin/calendar/pathnames.h > head/usr.bin/calendar/pom.c > - copied unchanged from r358560, head/usr.bin/calendar/pom.c > head/usr.bin/calendar/sunpos.c > - copied unchanged from r358560, head/usr.bin/calendar/sunpos.c > head/usr.bin/calendar/tests/ > - copied from r358560, head/usr.bin/calendar/tests/ > head/usr.sbin/periodic/etc/daily/300.calendar > - copied unchanged from r358560, = head/usr.sbin/periodic/etc/daily/300.calendar > Modified: > head/ObsoleteFiles.inc > head/share/man/man5/periodic.conf.5 > head/share/man/man5/src.conf.5 > head/share/man/man7/hier.7 > head/tools/tools/nanobsd/dhcpd/common > head/tools/tools/nanobsd/embedded/common > head/usr.bin/Makefile > head/usr.bin/leave/leave.1 > head/usr.sbin/periodic/etc/daily/Makefile > head/usr.sbin/periodic/periodic.conf >=20 > Modified: head/ObsoleteFiles.inc > = =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=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/ObsoleteFiles.inc Mon Mar 2 23:37:47 2020 = (r358561) > +++ head/ObsoleteFiles.inc Tue Mar 3 00:20:08 2020 = (r358562) > @@ -36,11 +36,6 @@ > # xargs -n1 | sort | uniq -d; > # done >=20 > -# 20200302: calendar(1) removed > -OLD_DIRS+=3Dusr/share/calendar > -OLD_FILES+=3Dusr/bin/calendar > -OLD_FILES+=3Dusr/share/man/man1/calendar.1.gz > - > # 20200301: bktr removed > OLD_DIRS+=3Dusr/include/dev/bktr > OLD_FILES+=3Dusr/include/dev/bktr/ioctl_bktr.h >=20 > Modified: head/share/man/man5/periodic.conf.5 > = =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=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/share/man/man5/periodic.conf.5 Mon Mar 2 23:37:47 2020 = (r358561) > +++ head/share/man/man5/periodic.conf.5 Tue Mar 3 00:20:08 2020 = (r358562) > @@ -273,6 +273,13 @@ Set to > if you want the > .Pa /etc/mail/aliases > file backed up and modifications to be displayed in your daily output. > +.It Va daily_calendar_enable > +.Pq Vt bool > +Set to > +.Dq Li YES > +if you want to run > +.Nm calendar Fl a > +daily. > .It Va daily_accounting_enable > .Pq Vt bool > Set to > @@ -963,6 +970,7 @@ is shared or distributed. > .El > .Sh SEE ALSO > .Xr apropos 1 , > +.Xr calendar 1 , > .Xr df 1 , > .Xr diff 1 , > .Xr gzip 1 , >=20 > Modified: head/share/man/man5/src.conf.5 > = =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=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/share/man/man5/src.conf.5 Mon Mar 2 23:37:47 2020 = (r358561) > +++ head/share/man/man5/src.conf.5 Tue Mar 3 00:20:08 2020 = (r358562) > @@ -271,6 +271,9 @@ is set explicitly) > .El > .It Va WITHOUT_BZIP2_SUPPORT > Set to build some programs without optional bzip2 support. > +.It Va WITHOUT_CALENDAR > +Set to not build > +.Xr calendar 1 . > .It Va WITHOUT_CAPSICUM > Set to not build Capsicum support into system programs. > When set, it enforces these options: >=20 > Modified: head/share/man/man7/hier.7 > = =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=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/share/man/man7/hier.7 Mon Mar 2 23:37:47 2020 = (r358561) > +++ head/share/man/man7/hier.7 Tue Mar 3 00:20:08 2020 = (r358562) > @@ -442,6 +442,10 @@ system daemons & system utilities (executed by = users) > architecture-independent files > .Pp > .Bl -tag -width Fl -compact > +.It Pa calendar/ > +a variety of pre-fab calendar files; > +see > +.Xr calendar 1 > .It Pa dict/ > word lists; > see >=20 > Copied: head/tools/build/options/WITHOUT_CALENDAR (from r358560, = head/tools/build/options/WITHOUT_CALENDAR) > = =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D > --- /dev/null 00:00:00 1970 (empty, because file is newly added) > +++ head/tools/build/options/WITHOUT_CALENDAR Tue Mar 3 00:20:08 2020 = (r358562, copy of r358560, head/tools/build/options/WITHOUT_CALENDAR) > @@ -0,0 +1,3 @@ > +.\" $FreeBSD$ > +Set to not build > +.Xr calendar 1 . >=20 > Modified: head/tools/tools/nanobsd/dhcpd/common > = =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=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/tools/tools/nanobsd/dhcpd/common Mon Mar 2 23:37:47 2020 = (r358561) > +++ head/tools/tools/nanobsd/dhcpd/common Tue Mar 3 00:20:08 2020 = (r358562) > @@ -104,6 +104,7 @@ WITHOUT_ACPI=3Dtrue > WITHOUT_ATM=3Dtrue > WITHOUT_AUDIT=3Dtrue > WITHOUT_BLUETOOTH=3Dtrue > +WITHOUT_CALENDAR=3Dtrue > WITHOUT_DICT=3Dtrue > WITHOUT_EXAMPLES=3Dtrue > WITHOUT_GAMES=3Dtrue >=20 > Modified: head/tools/tools/nanobsd/embedded/common > = =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=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/tools/tools/nanobsd/embedded/common Mon Mar 2 23:37:47 2020 = (r358561) > +++ head/tools/tools/nanobsd/embedded/common Tue Mar 3 00:20:08 2020 = (r358562) > @@ -135,6 +135,7 @@ WITHOUT_ACPI=3Dtrue > WITHOUT_ATM=3Dtrue > WITHOUT_AUDIT=3Dtrue > WITHOUT_BLUETOOTH=3Dtrue > +WITHOUT_CALENDAR=3Dtrue > WITHOUT_DICT=3Dtrue > WITHOUT_EXAMPLES=3Dtrue > WITHOUT_GAMES=3Dtrue >=20 > Modified: head/usr.bin/Makefile > = =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D > --- head/usr.bin/Makefile Mon Mar 2 23:37:47 2020 = (r358561) > +++ head/usr.bin/Makefile Tue Mar 3 00:20:08 2020 = (r358562) > @@ -195,6 +195,7 @@ SUBDIR.${MK_AT}+=3D at > SUBDIR.${MK_ATM}+=3D atm > SUBDIR.${MK_BLUETOOTH}+=3D bluetooth > SUBDIR.${MK_BSD_CPIO}+=3D cpio > +SUBDIR.${MK_CALENDAR}+=3D calendar > SUBDIR.${MK_CLANG}+=3D clang > SUBDIR.${MK_DIALOG}+=3D dpv > SUBDIR.${MK_EE}+=3D ee >=20 > Copied: head/usr.bin/calendar/Makefile (from r358560, = head/usr.bin/calendar/Makefile) > = =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D > --- /dev/null 00:00:00 1970 (empty, because file is newly added) > +++ head/usr.bin/calendar/Makefile Tue Mar 3 00:20:08 2020 = (r358562, copy of r358560, head/usr.bin/calendar/Makefile) > @@ -0,0 +1,117 @@ > +# @(#)Makefile 8.1 (Berkeley) 6/6/93 > +# $FreeBSD$ > + > +.include > + > +PROG=3D calendar > +SRCS=3D calendar.c locale.c events.c dates.c parsedata.c io.c = day.c \ > + ostern.c paskha.c pom.c sunpos.c > +LIBADD=3D m util > +INTER=3D de_AT.ISO_8859-15 de_DE.ISO8859-1 fr_FR.ISO8859-1 \ > + hr_HR.ISO8859-2 hu_HU.ISO8859-2 pt_BR.ISO8859-1 \ > + pt_BR.UTF-8 ru_RU.KOI8-R ru_RU.UTF-8 uk_UA.KOI8-U > +DE_LINKS=3D de_DE.ISO8859-15 > +FR_LINKS=3D fr_FR.ISO8859-15 > + > +.if ${MK_ICONV} =3D=3D "yes" > +CFLAGS+=3D -DWITH_ICONV > +.endif > + > +FILESGROUPS+=3D CALS > +CALS=3D calendars/calendar.all \ > + calendars/calendar.australia \ > + calendars/calendar.birthday \ > + calendars/calendar.brazilian \ > + calendars/calendar.christian \ > + calendars/calendar.computer \ > + calendars/calendar.croatian \ > + calendars/calendar.dutch \ > + calendars/calendar.freebsd \ > + calendars/calendar.french \ > + calendars/calendar.german \ > + calendars/calendar.history \ > + calendars/calendar.holiday \ > + calendars/calendar.hungarian \ > + calendars/calendar.judaic \ > + calendars/calendar.lotr \ > + calendars/calendar.music \ > + calendars/calendar.newzealand \ > + calendars/calendar.russian \ > + calendars/calendar.southafrica \ > + calendars/calendar.ukrainian \ > + calendars/calendar.usholiday \ > + calendars/calendar.world > +CALSDIR=3D ${SHAREDIR}/calendar > + > +CAL_de_AT.ISO_8859-15=3D calendar.feiertag > + > +CAL_de_DE.ISO8859-1=3D calendar.all \ > + calendar.feiertag \ > + calendar.geschichte \ > + calendar.kirche \ > + calendar.literatur \ > + calendar.musik \ > + calendar.wissenschaft > + > +CAL_fr_FR.ISO8859-1=3D calendar.all \ > + calendar.fetes \ > + calendar.french \ > + calendar.jferies \ > + calendar.proverbes > + > +CAL_hr_HR.ISO8859-2=3D calendar.all \ > + calendar.praznici > + > +CAL_hu_HU.ISO8859-2=3D calendar.all \ > + calendar.nevnapok \ > + calendar.unnepek > + > +CAL_pt_BR.ISO8859-1=3D calendar.all \ > + calendar.commemorative \ > + calendar.holidays \ > + calendar.mcommemorative > + > +CAL_pt_BR.UTF-8=3D calendar.all \ > + calendar.commemorative \ > + calendar.holidays \ > + calendar.mcommemorative > + > +CAL_ru_RU.KOI8-R=3D calendar.all \ > + calendar.common \ > + calendar.holiday \ > + calendar.military \ > + calendar.orthodox \ > + calendar.pagan > + > +CAL_ru_RU.UTF-8=3D calendar.all \ > + calendar.common \ > + calendar.holiday \ > + calendar.military \ > + calendar.orthodox \ > + calendar.pagan > + > +CAL_uk_UA.KOI8-U=3D calendar.all \ > + calendar.holiday \ > + calendar.misc \ > + calendar.orthodox > + > +.for lang in ${INTER} > +FILESGROUPS+=3D CALS_${lang} > +CALS_${lang}DIR=3D ${SHAREDIR}/calendar/${lang} > +.for file in ${CAL_${lang}} > +CALS_${lang}+=3D ${file:S@^@calendars/${lang}/@} > +.endfor > +.endfor > + > + > +.for link in ${DE_LINKS} > +SYMLINKS+=3D de_DE.ISO8859-1 ${SHAREDIR}/calendar/${link} > +.endfor > +.for link in ${FR_LINKS} > +SYMLINKS+=3D fr_FR.ISO8859-1 ${SHAREDIR}/calendar/${link} > +.endfor > + > +HAS_TESTS=3D > +SUBDIR.${MK_TESTS}+=3D tests > + > +.include >=20 > Copied: head/usr.bin/calendar/Makefile.depend (from r358560, = head/usr.bin/calendar/Makefile.depend) > = =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D > --- /dev/null 00:00:00 1970 (empty, because file is newly added) > +++ head/usr.bin/calendar/Makefile.depend Tue Mar 3 00:20:08 2020 = (r358562, copy of r358560, head/usr.bin/calendar/Makefile.depend) > @@ -0,0 +1,18 @@ > +# $FreeBSD$ > +# Autogenerated - do NOT edit! > + > +DIRDEPS =3D \ > + gnu/lib/csu \ > + include \ > + include/xlocale \ > + lib/${CSU_DIR} \ > + lib/libc \ > + lib/libcompiler_rt \ > + lib/msun \ > + > + > +.include > + > +.if ${DEP_RELDIR} =3D=3D ${_DEP_RELDIR} > +# local dependencies - needed for -jN in clean tree > +.endif >=20 > Copied: head/usr.bin/calendar/calendar.1 (from r358560, = head/usr.bin/calendar/calendar.1) > = =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D > --- /dev/null 00:00:00 1970 (empty, because file is newly added) > +++ head/usr.bin/calendar/calendar.1 Tue Mar 3 00:20:08 2020 = (r358562, copy of r358560, head/usr.bin/calendar/calendar.1) > @@ -0,0 +1,333 @@ > +.\" Copyright (c) 1989, 1990, 1993 > +.\" The Regents of the University of California. 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. > +.\" 3. Neither the name of the University nor the names of its = contributors > +.\" may be used to endorse or promote products derived from this = software > +.\" without specific prior written permission. > +.\" > +.\" THIS SOFTWARE IS PROVIDED BY THE REGENTS 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 REGENTS 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. > +.\" > +.\" @(#)calendar.1 8.1 (Berkeley) 6/29/93 > +.\" $FreeBSD$ > +.\" > +.Dd July 24, 2016 > +.Dt CALENDAR 1 > +.Os > +.Sh NAME > +.Nm calendar > +.Nd reminder service > +.Sh SYNOPSIS > +.Nm > +.Op Fl A Ar num > +.Op Fl a > +.Op Fl B Ar num > +.Op Fl D Ar moon|sun > +.Op Fl d > +.Op Fl F Ar friday > +.Op Fl f Ar calendarfile > +.Op Fl l Ar longitude > +.Oo > +.Bk -words > +.Fl t Ar dd Ns > +.Sm off > +.Op . Ar mm Op . Ar year > +.Sm on > +.Ek > +.Oc > +.Op Fl U Ar UTC-offset > +.Op Fl W Ar num > +.Sh DESCRIPTION > +The > +.Nm > +utility checks the current directory for a file named > +.Pa calendar > +and displays lines that fall into the specified date range. > +On the day before a weekend (normally Friday), events for the next > +three days are displayed. > +.Pp > +The following options are available: > +.Bl -tag -width Ds > +.It Fl A Ar num > +Print lines from today and the next > +.Ar num > +days (forward, future). > +.It Fl a > +Process the ``calendar'' files of all users and mail the results > +to them. > +This requires super-user privileges. > +.It Fl B Ar num > +Print lines from today and the previous > +.Ar num > +days (backward, past). > +.It Fl D Ar moon|sun > +Print UTC offset, longitude and moon or sun information. > +.It Fl d > +Debug option: print current date information. > +.It Fl F Ar friday > +Specify which day of the week is ``Friday'' (the day before the > +weekend begins). > +Default is 5. > +.It Fl f Pa calendarfile > +Use > +.Pa calendarfile > +as the default calendar file. > +.It Fl l Ar longitude > +Perform lunar and solar calculations from this longitude. > +If neither longitude nor UTC offset is specified, the calculations = will > +be based on the difference between UTC time and localtime. > +If both are specified, UTC offset overrides longitude. > +.It Xo Fl t > +.Sm off > +.Ar dd > +.Op . Ar mm Op . Ar year > +.Sm on > +.Xc > +For test purposes only: set date directly to argument values. > +.It Fl U Ar UTC-offset > +Perform lunar and solar calculations from this UTC offset. > +If neither UTC offset nor longitude is specified, the calculations > +will be based on the difference between UTC time and localtime. > +If both are specified, UTC offset overrides longitude. > +.It Fl W Ar num > +Print lines from today and the next > +.Ar num > +days (forward, future). > +Ignore weekends when calculating the number of days. > +.El > +.Sh FILE FORMAT > +To handle calendars in your national code table you can specify > +.Dq LANG=3D > +in the calendar file as early as possible. > +.Pp > +To handle the local name of sequences, you can specify them as: > +.Dq SEQUENCE=3D > +in the calendar file as early as possible. > +.Pp > +The names of the following special days are recognized: > +.Bl -tag -width 123456789012345 -compact > +.It Easter > +Catholic Easter. > +.It Paskha > +Orthodox Easter. > +.It NewMoon > +The lunar New Moon. > +.It FullMoon > +The lunar Full Moon. > +.It MarEquinox > +The solar equinox in March. > +.It JunSolstice > +The solar solstice in June. > +.It SepEquinox > +The solar equinox in September. > +.It DecSolstice > +The solar solstice in December. > +.It ChineseNewYear > +The first day of the Chinese year. > +.El > +These names may be reassigned to their local names via an assignment > +like > +.Dq Easter=3DPasen > +in the calendar file. > +.Pp > +Other lines should begin with a month and day. > +They may be entered in almost any format, either numeric or as = character > +strings. > +If the proper locale is set, national month and weekday > +names can be used. > +A single asterisk (``*'') matches every month. > +A day without a month matches that day of every week. > +A month without a day matches the first of that month. > +Two numbers default to the month followed by the day. > +Lines with leading tabs default to the last entered date, allowing > +multiple line specifications for a single date. > +.Pp > +The names of the recognized special days may be followed by a > +positive or negative integer, like: > +.Dq Easter+3 > +or > +.Dq Paskha-4 . > +.Pp > +Weekdays may be followed by ``-4'' ...\& ``+5'' (aliases for > +last, first, second, third, fourth) for moving events like > +``the last Monday in April''. > +.Pp > +By convention, dates followed by an asterisk are not fixed, i.e., = change > +from year to year. > +.Pp > +Day descriptions start after the first character in the line; > +if the line does not contain a character, it is not displayed. > +If the first character in the line is a character, it is = treated as > +a continuation of the previous line. > +.Pp > +The > +.Nm > +file is preprocessed by a limited subset of > +.Xr cpp 1 > +internally, allowing the inclusion of shared files such as > +lists of company holidays or meetings. > +This limited subset consists of \fB#include #ifndef #endif\fR and = \fB#define\fR. > +If the shared file is not referenced by a full pathname, > +.Xr calendar 1 > +searches in the current (or home) directory first, and then in the > +directory > +.Pa /usr/share/calendar . > +Empty lines and lines protected by the C commenting syntax > +.Pq Li /* ... */ > +are ignored. > +.Pp > +Some possible calendar entries ( characters highlighted by > +\fB\et\fR sequence) > +.Bd -unfilled -offset indent > +LANG=3DC > +Easter=3DOstern > + > +#include > +#include > + > +6/15\fB\et\fRJune 15 (if ambiguous, will default to month/day). > +Jun. 15\fB\et\fRJune 15. > +15 June\fB\et\fRJune 15. > +Thursday\fB\et\fREvery Thursday. > +June\fB\et\fREvery June 1st. > +15 *\fB\et\fR15th of every month. > +2010/4/15\fB\et\fR15 April 2010 > + > +May Sun+2\fB\et\fRsecond Sunday in May (Muttertag) > +04/SunLast\fB\et\fRlast Sunday in April, > +\fB\et\fRsummer time in Europe > +Easter\fB\et\fREaster > +Ostern-2\fB\et\fRGood Friday (2 days before Easter) > +Paskha\fB\et\fROrthodox Easter > + > +.Ed > +.Sh FILES > +.Bl -tag -width calendar.christian -compact > +.It Pa calendar > +file in current directory. > +.It Pa ~/.calendar > +.Pa calendar > +HOME directory. > +A chdir is done into this directory if it exists. > +.It Pa ~/.calendar/calendar > +calendar file to use if no calendar file exists in the current = directory. > +.It Pa ~/.calendar/nomail > +do not send mail if this file exists. > +.El > +.Pp > +The following default calendar files are provided in > +.Pa /usr/share/calendar: > +.Pp > +.Bl -tag -width calendar.southafrica -compact > +.It Pa calendar.all > +File which includes all the default files. > +.It Pa calendar.australia > +Calendar of events in Australia. > +.It Pa calendar.birthday > +Births and deaths of famous (and not-so-famous) people. > +.It Pa calendar.christian > +Christian holidays. > +This calendar should be updated yearly by the local system = administrator > +so that roving holidays are set correctly for the current year. > +.It Pa calendar.computer > +Days of special significance to computer people. > +.It Pa calendar.croatian > +Calendar of events in Croatia. > +.It Pa calendar.dutch > +Calendar of events in the Netherlands. > +.It Pa calendar.freebsd > +Birthdays of > +.Fx > +committers. > +.It Pa calendar.french > +Calendar of events in France. > +.It Pa calendar.german > +Calendar of events in Germany. > +.It Pa calendar.history > +Everything else, mostly U.S.\& historical events. > +.It Pa calendar.holiday > +Other holidays, including the not-well-known, obscure, and > +.Em really > +obscure. > +.It Pa calendar.judaic > +Jewish holidays. > +The entries for this calendar have been obtained from the port > +deskutils/hebcal. > +.It Pa calendar.music > +Musical events, births, and deaths. > +Strongly oriented toward rock 'n' roll. > +.It Pa calendar.newzealand > +Calendar of events in New Zealand. > +.It Pa calendar.russian > +Russian calendar. > +.It Pa calendar.southafrica > +Calendar of events in South Africa. > +.It Pa calendar.usholiday > +U.S.\& holidays. > +This calendar should be updated yearly by the local system = administrator > +so that roving holidays are set correctly for the current year. > +.It Pa calendar.world > +Includes all calendar files except for national files. > +.El > +.Sh COMPATIBILITY > +The > +.Nm > +program previously selected lines which had the correct date anywhere > +in the line. > +This is no longer true, the date is only recognized when it occurs > +at the beginning of a line. > +.Sh SEE ALSO > +.Xr at 1 , > +.Xr mail 1 , > +.Xr cron 8 > +.Sh HISTORY > +A > +.Nm > +command appeared in > +.At v7 . > +.Sh NOTES > +Chinese New Year is calculated at 120 degrees east of Greenwich, > +which roughly corresponds with the east coast of China. > +For people west of China, this might result that the start of Chinese > +New Year and the day of the related new moon might differ. > +.Pp > +The phases of the moon and the longitude of the sun are calculated > +against the local position which corresponds with 30 degrees times > +the time-difference towards Greenwich. > +.Pp > +The new and full moons are happening on the day indicated: They > +might happen in the time period in the early night or in the late > +evening. > +It does not indicate that they are starting in the night on that = date. > +.Pp > +Because of minor differences between the output of the formulas > +used and other sources on the Internet, Druids and Werewolves should > +double-check the start and end time of solar and lunar events. > +.Sh BUGS > +The > +.Nm > +internal cpp does not correctly do #ifndef and will discard the rest > +of the file if a #ifndef is triggered. > +It also has a maximum of 50 include file and/or 100 #defines > +and only recognises #include, #define and > +#ifndef. > +.Pp > +There is no possibility to properly specify the local position > +needed for solar and lunar calculations. >=20 > Copied: head/usr.bin/calendar/calendar.c (from r358560, = head/usr.bin/calendar/calendar.c) > = =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D > --- /dev/null 00:00:00 1970 (empty, because file is newly added) > +++ head/usr.bin/calendar/calendar.c Tue Mar 3 00:20:08 2020 = (r358562, copy of r358560, head/usr.bin/calendar/calendar.c) > @@ -0,0 +1,258 @@ > +/*- > + * SPDX-License-Identifier: BSD-3-Clause > + * > + * Copyright (c) 1989, 1993, 1994 > + * The Regents of the University of California. 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. > + * 3. Neither the name of the University nor the names of its = contributors > + * may be used to endorse or promote products derived from this = software > + * without specific prior written permission. > + * > + * THIS SOFTWARE IS PROVIDED BY THE REGENTS 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 REGENTS 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. > + */ > + > +#ifndef lint > +static const char copyright[] =3D > +"@(#) Copyright (c) 1989, 1993\n\ > + The Regents of the University of California. All rights = reserved.\n"; > +#endif > + > +#if 0 > +#ifndef lint > +static char sccsid[] =3D "@(#)calendar.c 8.3 (Berkeley) 3/25/94"; > +#endif > +#endif > + > +#include > +__FBSDID("$FreeBSD$"); > + > +#include > +#include > +#include > +#include > +#include > +#include > +#include > +#include > +#include > +#include > +#include > +#include > + > +#include "calendar.h" > + > +#define UTCOFFSET_NOTSET 100 /* Expected between -24 = and +24 */ > +#define LONGITUDE_NOTSET 1000 /* Expected between -360 = and +360 */ > + > +struct passwd *pw; > +int doall =3D 0; > +int debug =3D 0; > +static char *DEBUG =3D NULL; > +static time_t f_time =3D 0; > +double UTCOffset =3D UTCOFFSET_NOTSET; > +int EastLongitude =3D LONGITUDE_NOTSET; > +#ifdef WITH_ICONV > +const char *outputEncoding =3D NULL; > +#endif > + > +static void usage(void) __dead2; > + > +int > +main(int argc, char *argv[]) > +{ > + int f_dayAfter =3D 0; /* days after current = date */ > + int f_dayBefore =3D 0; /* days before current date */ > + int Friday =3D 5; /* day before weekend */ > + > + int ch; > + struct tm tp1, tp2; > + > + (void)setlocale(LC_ALL, ""); > + > + while ((ch =3D getopt(argc, argv, "-A:aB:D:dF:f:l:t:U:W:?")) !=3D = -1) > + switch (ch) { > + case '-': /* backward contemptible */ > + case 'a': > + if (getuid()) { > + errno =3D EPERM; > + err(1, NULL); > + } > + doall =3D 1; > + break; > + > + case 'W': /* we don't need no steenking Fridays */ > + Friday =3D -1; > + /* FALLTHROUGH */ > + > + case 'A': /* days after current date */ > + f_dayAfter =3D atoi(optarg); > + if (f_dayAfter < 0) > + errx(1, "number of days must be = positive"); > + break; > + > + case 'B': /* days before current date */ > + f_dayBefore =3D atoi(optarg); > + if (f_dayBefore < 0) > + errx(1, "number of days must be = positive"); > + break; > + > + case 'D': /* debug output of sun and moon info */ > + DEBUG =3D optarg; > + break; > + > + case 'd': /* debug output of current date */ > + debug =3D 1; > + break; > + > + case 'F': /* Change the time: When does weekend start? = */ > + Friday =3D atoi(optarg); > + break; > + > + case 'f': /* other calendar file */ > + calendarFile =3D optarg; > + break; > + > + case 'l': /* Change longitudal position */ > + EastLongitude =3D strtol(optarg, NULL, 10); > + break; > + > + case 't': /* other date, for tests */ > + f_time =3D Mktime(optarg); > + break; > + > + case 'U': /* Change UTC offset */ > + UTCOffset =3D strtod(optarg, NULL); > + break; > + > + case '?': > + default: > + usage(); > + } > + > + argc -=3D optind; > + argv +=3D optind; > + > + if (argc) > + usage(); > + > + /* use current time */ > + if (f_time <=3D 0) > + (void)time(&f_time); > + > + /* if not set, determine where I could be */ > + { > + if (UTCOffset =3D=3D UTCOFFSET_NOTSET && > + EastLongitude =3D=3D LONGITUDE_NOTSET) { > + /* Calculate on difference between here and UTC = */ > + time_t t; > + struct tm tm; > + long utcoffset, hh, mm, ss; > + double uo; > + > + time(&t); > + localtime_r(&t, &tm); > + utcoffset =3D tm.tm_gmtoff; > + /* seconds -> hh:mm:ss */ > + hh =3D utcoffset / SECSPERHOUR; > + utcoffset %=3D SECSPERHOUR; > + mm =3D utcoffset / SECSPERMINUTE; > + utcoffset %=3D SECSPERMINUTE; > + ss =3D utcoffset; > + > + /* hh:mm:ss -> hh.mmss */ > + uo =3D mm + (100.0 * (ss / 60.0)); > + uo /=3D 60.0 / 100.0; > + uo =3D hh + uo / 100; > + > + UTCOffset =3D uo; > + EastLongitude =3D UTCOffset * 15; > + } else if (UTCOffset =3D=3D UTCOFFSET_NOTSET) { > + /* Base on information given */ > + UTCOffset =3D EastLongitude / 15; > + } else if (EastLongitude =3D=3D LONGITUDE_NOTSET) { > + /* Base on information given */ > + EastLongitude =3D UTCOffset * 15; > + } > + } > + > + settimes(f_time, f_dayBefore, f_dayAfter, Friday, &tp1, &tp2); > + generatedates(&tp1, &tp2); > + > + /* > + * FROM now on, we are working in UTC. > + * This will only affect moon and sun related events anyway. > + */ > + if (setenv("TZ", "UTC", 1) !=3D 0) > + errx(1, "setenv: %s", strerror(errno)); > + tzset(); > + > + if (debug) > + dumpdates(); > + > + if (DEBUG !=3D NULL) { > + dodebug(DEBUG); > + exit(0); > + } > + > + if (doall) > + while ((pw =3D getpwent()) !=3D NULL) { > + pid_t pid; > + > + if (chdir(pw->pw_dir) =3D=3D -1) > + continue; > + pid =3D fork(); > + if (pid < 0) > + err(1, "fork"); > + if (pid =3D=3D 0) { > + login_cap_t *lc; > + > + lc =3D login_getpwclass(pw); > + if (setusercontext(lc, pw, pw->pw_uid, > + LOGIN_SETALL) !=3D 0) > + errx(1, "setusercontext"); > + cal(); > + exit(0); > + } > + } > + else { > +#ifdef WITH_ICONV > + /* Save the information about the encoding used in the = terminal. */ > + outputEncoding =3D strdup(nl_langinfo(CODESET)); > + if (outputEncoding =3D=3D NULL) > + errx(1, "cannot allocate memory"); > +#endif > + cal(); > + } > + exit(0); > +} > + > + > +static void __dead2 > +usage(void) > +{ > + > + fprintf(stderr, "%s\n%s\n%s\n", > + "usage: calendar [-A days] [-a] [-B days] [-D sun|moon] = [-d]", > + " [-F friday] [-f calendarfile] [-l = longitude]", > + " [-t dd[.mm[.year]]] [-U utcoffset] [-W = days]" > + ); > + exit(1); > +} >=20 > Copied: head/usr.bin/calendar/calendar.h (from r358560, = head/usr.bin/calendar/calendar.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 > --- /dev/null 00:00:00 1970 (empty, because file is newly added) > +++ head/usr.bin/calendar/calendar.h Tue Mar 3 00:20:08 2020 = (r358562, copy of r358560, head/usr.bin/calendar/calendar.h) > @@ -0,0 +1,206 @@ > +/*- > + * SPDX-License-Identifier: BSD-3-Clause > + * > + * Copyright (c) 1989, 1993, 1994 > + * The Regents of the University of California. 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. > + * 3. Neither the name of the University nor the names of its = contributors > + * may be used to endorse or promote products derived from this = software > + * without specific prior written permission. > + * > + * THIS SOFTWARE IS PROVIDED BY THE REGENTS 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 REGENTS 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$ > + */ > + > +#include > +#include > + > +#define SECSPERDAY (24 * 60 * 60) > +#define SECSPERHOUR (60 * 60) > +#define SECSPERMINUTE (60) > +#define MINSPERHOUR (60) > +#define HOURSPERDAY (24) > +#define FSECSPERDAY (24.0 * 60.0 * 60.0) > +#define FSECSPERHOUR (60.0 * 60.0) > +#define FSECSPERMINUTE (60.0) > +#define FMINSPERHOUR (60.0) > +#define FHOURSPERDAY (24.0) > + > +#define DAYSPERYEAR 365 > +#define DAYSPERLEAPYEAR 366 > + > +/* Not yet categorized */ > + > +extern struct passwd *pw; > +extern int doall; > +extern time_t t1, t2; > +extern const char *calendarFile; > +extern int yrdays; > +extern struct fixs neaster, npaskha, ncny, nfullmoon, nnewmoon; > +extern struct fixs nmarequinox, nsepequinox, njunsolstice, = ndecsolstice; > +extern double UTCOffset; > +extern int EastLongitude; > +#ifdef WITH_ICONV > +extern const char *outputEncoding; > +#endif > + > +#define isleap(y) ((((y) % 4) =3D=3D 0 && ((y) % 100) !=3D 0) || ((y) = % 400) =3D=3D 0) > + > +/* Flags to determine the returned values by determinestyle() in = parsedata.c */ > +#define F_NONE 0x00000 > +#define F_MONTH 0x00001 > +#define F_DAYOFWEEK 0x00002 > +#define F_DAYOFMONTH 0x00004 > +#define F_MODIFIERINDEX 0x00008 > +#define F_MODIFIEROFFSET 0x00010 > +#define F_SPECIALDAY 0x00020 > +#define F_ALLMONTH 0x00040 > +#define F_ALLDAY 0x00080 > +#define F_VARIABLE 0x00100 > +#define F_EASTER 0x00200 > +#define F_CNY 0x00400 > +#define F_PASKHA 0x00800 > +#define F_NEWMOON 0x01000 > +#define F_FULLMOON 0x02000 > +#define F_MAREQUINOX 0x04000 > +#define F_SEPEQUINOX 0x08000 > +#define F_JUNSOLSTICE 0x10000 > +#define F_DECSOLSTICE 0x20000 > +#define F_YEAR 0x40000 > + > +#define STRING_EASTER "Easter" > +#define STRING_PASKHA "Paskha" > +#define STRING_CNY "ChineseNewYear" > +#define STRING_NEWMOON "NewMoon" > +#define STRING_FULLMOON "FullMoon" > +#define STRING_MAREQUINOX "MarEquinox" > +#define STRING_SEPEQUINOX "SepEquinox" > +#define STRING_JUNSOLSTICE "JunSolstice" > +#define STRING_DECSOLSTICE "DecSolstice" > + > +#define MAXCOUNT 125 /* Random number of = maximum number of > + * repeats of an event. Should = be 52 > + * (number of weeks per year), = if you > + * want to show two years then = it > + * should be 104. If you are = seeing > + * more than this you are using = this > + * program wrong. > + */ > + > +/* > + * All the astronomical calculations are carried out for the meridian = 120 > + * degrees east of Greenwich. > + */ > +#define UTCOFFSET_CNY 8.0 > + > +extern int debug; /* show parsing of the input */ > +extern int year1, year2; > + > +/* events.c */ > +/* > + * Event sorting related functions: > + * - Use event_add() to create a new event > + * - Use event_continue() to add more text to the last added event > + * - Use event_print_all() to display them in time chronological = order > + */ > +struct event *event_add(int, int, int, char *, int, char *, char *); > +void event_continue(struct event *events, char *txt); > +void event_print_all(FILE *fp); > +struct event { > + int year; > + int month; > + int day; > + int var; > + char *date; > + char *text; > + char *extra; > + struct event *next; > +}; > + > +/* locale.c */ > + > +struct fixs { > + char *name; > + size_t len; > +}; > + > +extern const char *days[]; > +extern const char *fdays[]; > +extern const char *fmonths[]; > +extern const char *months[]; > +extern const char *sequences[]; > +extern struct fixs fndays[8]; /* full national days = names */ > +extern struct fixs fnmonths[13]; /* full national months names */ > +extern struct fixs ndays[8]; /* short national days names */ > +extern struct fixs nmonths[13]; /* short national month = names */ > +extern struct fixs nsequences[10]; > + > +void setnnames(void); > +void setnsequences(char *); > + > +/* day.c */ >=20 > *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** > _______________________________________________ > 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 Wed Mar 4 09:46:44 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 2906A26A311; Wed, 4 Mar 2020 09:46:44 +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 48XTYH5drrz4sqP; Wed, 4 Mar 2020 09:46: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 79BC21C167; Wed, 4 Mar 2020 09:46: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 0249khWW010100; Wed, 4 Mar 2020 09:46:43 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 0249khoT010099; Wed, 4 Mar 2020 09:46:43 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <202003040946.0249khoT010099@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Wed, 4 Mar 2020 09:46:43 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r358609 - head/sys/dev/usb/input X-SVN-Group: head X-SVN-Commit-Author: hselasky X-SVN-Commit-Paths: head/sys/dev/usb/input X-SVN-Commit-Revision: 358609 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages 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, 04 Mar 2020 09:46:44 -0000 Author: hselasky Date: Wed Mar 4 09:46:42 2020 New Revision: 358609 URL: https://svnweb.freebsd.org/changeset/base/358609 Log: Restart the USB keyboard repeat timer at every valid key-press. This fixes a regression issue after r357861. Reported by: James Wright PR: 224592 PR: 233884 MFC after: 3 days Sponsored by: Mellanox Technologies Modified: head/sys/dev/usb/input/ukbd.c Modified: head/sys/dev/usb/input/ukbd.c ============================================================================== --- head/sys/dev/usb/input/ukbd.c Wed Mar 4 04:44:33 2020 (r358608) +++ head/sys/dev/usb/input/ukbd.c Wed Mar 4 09:46:42 2020 (r358609) @@ -522,15 +522,9 @@ ukbd_interrupt(struct ukbd_softc *sc) if (ukbd_is_modifier_key(key)) continue; - /* - * Check for first new key and set - * initial delay and [re]start timer: - */ - if (sc->sc_repeat_key == 0) { - sc->sc_co_basetime = sbinuptime(); - sc->sc_delay = sc->sc_kbd.kb_delay1; - ukbd_start_timer(sc); - } + sc->sc_co_basetime = sbinuptime(); + sc->sc_delay = sc->sc_kbd.kb_delay1; + ukbd_start_timer(sc); /* set repeat time for last key */ sc->sc_repeat_time = now + sc->sc_kbd.kb_delay1; From owner-svn-src-all@freebsd.org Wed Mar 4 11:27:13 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id E161426C1B7; Wed, 4 Mar 2020 11:27:13 +0000 (UTC) (envelope-from madpilot@FreeBSD.org) Received: from smtp.freebsd.org (smtp.freebsd.org [IPv6:2610:1c1:1:606c::24b:4]) (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 48XWnF1TFLz3NX3; Wed, 4 Mar 2020 11:27:13 +0000 (UTC) (envelope-from madpilot@FreeBSD.org) Received: from marvin.madpilot.net (host146-240-dynamic.10-87-r.retail.telecomitalia.it [87.10.240.146]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client did not present a certificate) (Authenticated sender: madpilot/mail) by smtp.freebsd.org (Postfix) with ESMTPSA id 11BD110741; Wed, 4 Mar 2020 11:27:11 +0000 (UTC) (envelope-from madpilot@FreeBSD.org) Subject: Re: svn commit: r358439 - head/sys/amd64/include To: Ryan Libby , "Alexander V. Chernikov" Cc: "svn-src-head@freebsd.org" , "svn-src-all@freebsd.org" , "src-committers@freebsd.org" , vbox@FreeBSD.org References: <202002281832.01SIWaEL071685@repo.freebsd.org> <5767791583138727@sas1-c7aad230fe87.qloud-c.yandex.net> From: Guido Falsi Message-ID: <3d54ebc3-a511-a239-136d-c0f638a69351@FreeBSD.org> Date: Wed, 4 Mar 2020 12:27:08 +0100 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:68.0) Gecko/20100101 Thunderbird/68.5.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages 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, 04 Mar 2020 11:27:14 -0000 On 02/03/20 18:13, Ryan Libby wrote: > On Mon, Mar 2, 2020 at 12:45 AM Alexander V. Chernikov wrote: >> >> 28.02.2020, 18:32, "Ryan Libby" : >>> Author: rlibby >>> Date: Fri Feb 28 18:32:36 2020 >>> New Revision: 358439 >>> URL: https://svnweb.freebsd.org/changeset/base/358439 >>> >>> Log: >>> amd64 atomic.h: minor codegen optimization in flag access >>> >>> Previously the pattern to extract status flags from inline assembly >>> blocks was to use setcc in the block to write the flag to a register. >>> This was suboptimal in a few ways: >>> - It would lead to code like: sete %cl; test %cl; jne, i.e. a flag >>> would just be loaded into a register and then reloaded to a flag. >>> - The setcc would force the block to use an additional register. >>> - If the client code didn't care for the flag value then the setcc >>> would be entirely pointless but could not be eliminated by the >>> optimizer. >>> >>> A more modern inline asm construct (since gcc 6 and clang 9) allows for >> This effectively restricts kernel builds by all older compilers. >> Is there any chance of making it conditional depending on the compiler version/features? > > Yes, it is possible to test for __GCC_ASM_FLAG_OUTPUTS__. It is more > maintenance effort going forward. If building current with an old cross > compiler is an important scenario, we can either revert this and the > following revision or work up a patch to make it conditional. I'll see > what that might look like. > Actually this causes emulators/virtualbox-ose port to fail to build: In file included from /usr/src/sys/sys/systm.h:44: /usr/include/machine/atomic.h:230:1: error: invalid output constraint '=@cce' in asm ATOMIC_CMPSET(char); ^ /usr/include/machine/atomic.h:205:4: note: expanded from macro 'ATOMIC_CMPSET' : "=@cce" (res), /* 0 */ \ ^ /usr/include/machine/atomic.h:230:1: error: invalid output constraint '=@cce' in asm (and so on) the virtualbox-ose port is forced to use an older clang version due to crashes when compiled with newer ones. Not sure whose responsibility is to fix this. Should I file a bug report on bugzilla? -- Guido Falsi From owner-svn-src-all@freebsd.org Wed Mar 4 11:28:52 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 3A1AC26C25C; Wed, 4 Mar 2020 11:28:52 +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 48XWq80vPsz3Pxj; Wed, 4 Mar 2020 11:28:51 +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 AB20D1D3E5; Wed, 4 Mar 2020 11:28:50 +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 024BSoVV069885; Wed, 4 Mar 2020 11:28:50 GMT (envelope-from bapt@FreeBSD.org) Received: (from bapt@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 024BSnVe069881; Wed, 4 Mar 2020 11:28:49 GMT (envelope-from bapt@FreeBSD.org) Message-Id: <202003041128.024BSnVe069881@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bapt set sender to bapt@FreeBSD.org using -f From: Baptiste Daroussin Date: Wed, 4 Mar 2020 11:28: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: r358610 - in stable/12/usr.bin/diff: . tests X-SVN-Group: stable-12 X-SVN-Commit-Author: bapt X-SVN-Commit-Paths: in stable/12/usr.bin/diff: . tests X-SVN-Commit-Revision: 358610 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages 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, 04 Mar 2020 11:28:52 -0000 Author: bapt Date: Wed Mar 4 11:28:49 2020 New Revision: 358610 URL: https://svnweb.freebsd.org/changeset/base/358610 Log: MFC r357648: diff: implement -y (--side-by-side) along with -W and --suppress-common-lines PR: 219933 Submitted by: fehmi noyan isi Modified: stable/12/usr.bin/diff/diff.1 stable/12/usr.bin/diff/diff.c stable/12/usr.bin/diff/diff.h stable/12/usr.bin/diff/diffreg.c stable/12/usr.bin/diff/tests/diff_test.sh Directory Properties: stable/12/ (props changed) Modified: stable/12/usr.bin/diff/diff.1 ============================================================================== --- stable/12/usr.bin/diff/diff.1 Wed Mar 4 09:46:42 2020 (r358609) +++ stable/12/usr.bin/diff/diff.1 Wed Mar 4 11:28:49 2020 (r358610) @@ -30,7 +30,7 @@ .\" @(#)diff.1 8.1 (Berkeley) 6/30/93 .\" $FreeBSD$ .\" -.Dd August 18, 2018 +.Dd February 07, 2020 .Dt DIFF 1 .Os .Sh NAME @@ -41,7 +41,7 @@ .Op Fl aBbdipTtw .Oo .Fl c | e | f | -.Fl n | q | u +.Fl n | q | u | y .Oc .Op Fl -brief .Op Fl -changed-group-format Ar GFMT @@ -182,6 +182,21 @@ .Op Fl x Ar pattern | Fl -exclude Ar pattern .Ek .Ar dir1 dir2 +.Nm diff +.Op Fl aBbditwW +.Op --expand-tabs +.Op --ignore-all-blanks +.Op --ignore-blank-lines +.Op --ignore-case +.Op --minimal +.Op --no-ignore-file-name-case +.Op --strip-trailing-cr +.Op --suppress-common-lines +.Op --tabsize +.Op --text +.Op --width +.Fl y | Fl -side-by-side +.Ar file1 file2 .Sh DESCRIPTION The .Nm @@ -284,7 +299,21 @@ However, unlike with .Fl c , all lines to be changed (added and/or removed) are present in a single section. +.It Fl y Fl -side-by-side +Output in two columns with a marker between them. The marker can be one +of the following: +.Pp +.Bl -tag -width Ds -offset indent -compact +.It space +Corresponding lines are identical. +.It '|' +Corresponding lines are different. +.It '<' +Files differ and only the first file contains the line. +.It '>' +Files differ and only the second file contains the line. .El +.El .Pp Comparison options: .Bl -tag -width Ds @@ -362,6 +391,10 @@ E.g., .Dq if (\ \&a == b \&) will compare equal to .Dq if(a==b) . +.It Fl W Ar number Fl -width Ar number +Output at most +.Ar number +columns when using side by side format. The default value is 130. .It Fl -changed-group-format Ar GFMT Format input groups in the provided .Pp @@ -382,7 +415,9 @@ default diff output stub option for compatibility with GNU diff .It Fl -strip-trailing-cr strip carriage return on input files -.It Fl tabsize Ar number +.It Fl -suppress-common-lines +Do not output common lines when using the side by side format +.It Fl -tabsize Ar number Number of spaces representing a tab (default 8) .El .Pp Modified: stable/12/usr.bin/diff/diff.c ============================================================================== --- stable/12/usr.bin/diff/diff.c Wed Mar 4 09:46:42 2020 (r358609) +++ stable/12/usr.bin/diff/diff.c Wed Mar 4 11:28:49 2020 (r358610) @@ -37,16 +37,16 @@ __FBSDID("$FreeBSD$"); #include "diff.h" #include "xmalloc.h" -int lflag, Nflag, Pflag, rflag, sflag, Tflag, cflag; -int diff_format, diff_context, status, ignore_file_case; -int tabsize = 8; +int lflag, Nflag, Pflag, rflag, sflag, Tflag, cflag, Wflag; +int diff_format, diff_context, status, ignore_file_case, suppress_common; +int tabsize = 8, width = 130; char *start, *ifdefname, *diffargs, *label[2], *ignore_pats; char *group_format = NULL; struct stat stb1, stb2; struct excludes *excludes_list; regex_t ignore_re; -#define OPTIONS "0123456789aBbC:cdD:efHhI:iL:lnNPpqrS:sTtU:uwX:x:" +#define OPTIONS "0123456789aBbC:cdD:efHhI:iL:lnNPpqrS:sTtU:uwW:X:x:y" enum { OPT_TSIZE = CHAR_MAX + 1, OPT_STRIPCR, @@ -55,6 +55,7 @@ enum { OPT_NORMAL, OPT_HORIZON_LINES, OPT_CHANGED_GROUP_FORMAT, + OPT_SUPPRESS_COMMON, }; static struct option longopts[] = { @@ -83,8 +84,10 @@ static struct option longopts[] = { { "initial-tab", no_argument, 0, 'T' }, { "unified", optional_argument, 0, 'U' }, { "ignore-all-space", no_argument, 0, 'w' }, + { "width", required_argument, 0, 'W' }, { "exclude", required_argument, 0, 'x' }, { "exclude-from", required_argument, 0, 'X' }, + { "side-by-side", no_argument, NULL, 'y' }, { "ignore-file-name-case", no_argument, NULL, OPT_IGN_FN_CASE }, { "horizon-lines", required_argument, NULL, OPT_HORIZON_LINES }, { "no-ignore-file-name-case", no_argument, NULL, OPT_NO_IGN_FN_CASE }, @@ -92,6 +95,7 @@ static struct option longopts[] = { { "strip-trailing-cr", no_argument, NULL, OPT_STRIPCR }, { "tabsize", optional_argument, NULL, OPT_TSIZE }, { "changed-group-format", required_argument, NULL, OPT_CHANGED_GROUP_FORMAT}, + { "suppress-common-lines", no_argument, NULL, OPT_SUPPRESS_COMMON }, { NULL, 0, 0, '\0'} }; @@ -230,12 +234,23 @@ main(int argc, char **argv) case 'w': dflags |= D_IGNOREBLANKS; break; + case 'W': + Wflag = 1; + width = (int) strtonum(optarg, 1, INT_MAX, &errstr); + if (errstr) { + warnx("Invalid argument for width"); + usage(); + } + break; case 'X': read_excludes_file(optarg); break; case 'x': push_excludes(optarg); break; + case 'y': + diff_format = D_SIDEBYSIDE; + break; case OPT_CHANGED_GROUP_FORMAT: diff_format = D_GFORMAT; group_format = optarg; @@ -261,6 +276,9 @@ main(int argc, char **argv) case OPT_STRIPCR: dflags |= D_STRIPCR; break; + case OPT_SUPPRESS_COMMON: + suppress_common = 1; + break; default: usage(); break; @@ -464,7 +482,12 @@ usage(void) " -U number file1 file2\n" " diff [-aBbdilNPprsTtw] [-c | -e | -f | -n | -q | -u] [--ignore-case]\n" " [--no-ignore-case] [--normal] [--tabsize] [-I pattern] [-L label]\n" - " [-S name] [-X file] [-x pattern] dir1 dir2\n"); + " [-S name] [-X file] [-x pattern] dir1 dir2\n" + " diff [-aBbditwW] [--expand-tabs] [--ignore-all-blanks]\n" + " [--ignore-blank-lines] [--ignore-case] [--minimal]\n" + " [--no-ignore-file-name-case] [--strip-trailing-cr]\n" + " [--suppress-common-lines] [--tabsize] [--text] [--width]\n" + " -y | --side-by-side file1 file2\n"); exit(2); } Modified: stable/12/usr.bin/diff/diff.h ============================================================================== --- stable/12/usr.bin/diff/diff.h Wed Mar 4 09:46:42 2020 (r358609) +++ stable/12/usr.bin/diff/diff.h Wed Mar 4 11:28:49 2020 (r358610) @@ -48,6 +48,7 @@ lines and no trailing . */ #define D_BRIEF 6 /* Say if the files differ */ #define D_GFORMAT 7 /* Diff with defined changed group format */ +#define D_SIDEBYSIDE 8 /* Side by side */ /* * Output flags @@ -85,9 +86,10 @@ struct excludes { struct excludes *next; }; -extern int lflag, Nflag, Pflag, rflag, sflag, Tflag, cflag; +extern int lflag, Nflag, Pflag, rflag, sflag, Tflag, cflag, Wflag; extern int diff_format, diff_context, status, ignore_file_case; -extern int tabsize; +extern int suppress_common; +extern int tabsize, width; extern char *start, *ifdefname, *diffargs, *label[2], *ignore_pats; extern char *group_format; extern struct stat stb1, stb2; Modified: stable/12/usr.bin/diff/diffreg.c ============================================================================== --- stable/12/usr.bin/diff/diffreg.c Wed Mar 4 09:46:42 2020 (r358609) +++ stable/12/usr.bin/diff/diffreg.c Wed Mar 4 11:28:49 2020 (r358610) @@ -181,6 +181,7 @@ struct context_vec { }; #define diff_output printf +#define MIN_PAD 1 static FILE *opentemp(const char *); static void output(char *, FILE *, char *, FILE *, int); static void check(FILE *, FILE *, int); @@ -196,6 +197,7 @@ static void unsort(struct line *, int, int *); static void change(char *, FILE *, char *, FILE *, int, int, int, int, int *); static void sort(struct line *, int); static void print_header(const char *, const char *); +static void print_space(int, int, int); static bool ignoreline_pattern(char *); static bool ignoreline(char *, bool); static int asciifile(FILE *); @@ -220,6 +222,8 @@ static int len[2]; static int pref, suff; /* length of prefix and suffix */ static int slen[2]; static int anychange; +static int hw, padding; /* half width and padding */ +static int edoffset; static long *ixnew; /* will be overlaid on file[1] */ static long *ixold; /* will be overlaid on klist */ static struct cand *clist; /* merely a free storage pot for candidates */ @@ -263,6 +267,22 @@ diffreg(char *file1, char *file2, int flags, int capsi lastline = 0; lastmatchline = 0; context_vec_ptr = context_vec_start - 1; + + /* + * hw excludes padding and make sure when -t is not used, + * the second column always starts from the closest tab stop + */ + if (diff_format == D_SIDEBYSIDE) { + hw = width >> 1; + padding = tabsize - (hw % tabsize); + if ((flags & D_EXPANDTABS) != 0 || (padding % tabsize == 0)) + padding = MIN_PAD; + + hw = (width >> 1) - + ((padding == MIN_PAD) ? (padding << 1) : padding) - 1; + } + + if (flags & D_IGNORECASE) chrtran = cup2low; else @@ -865,7 +885,7 @@ skipline(FILE *f) static void output(char *file1, FILE *f1, char *file2, FILE *f2, int flags) { - int m, i0, i1, j0, j1; + int i, j, m, i0, i1, j0, j1, nc; rewind(f1); rewind(f2); @@ -874,15 +894,55 @@ output(char *file1, FILE *f1, char *file2, FILE *f2, i J[m + 1] = len[1] + 1; if (diff_format != D_EDIT) { for (i0 = 1; i0 <= m; i0 = i1 + 1) { - while (i0 <= m && J[i0] == J[i0 - 1] + 1) + while (i0 <= m && J[i0] == J[i0 - 1] + 1){ + if (diff_format == D_SIDEBYSIDE && + suppress_common != 1) { + nc = fetch(ixold, i0, i0, f1, '\0', + 1, flags); + print_space(nc, + (hw - nc) + (padding << 1) + 1, + flags); + fetch(ixnew, J[i0], J[i0], f2, '\0', + 0, flags); + diff_output("\n"); + } i0++; + } j0 = J[i0 - 1] + 1; i1 = i0 - 1; while (i1 < m && J[i1 + 1] == 0) i1++; j1 = J[i1 + 1] - 1; J[i1] = j1; - change(file1, f1, file2, f2, i0, i1, j0, j1, &flags); + + /* + * When using side-by-side, lines from both of the + * files are printed. The algorithm used by diff(1) + * identifies the ranges in which two files differ. + * See the change() function below. + * The for loop below consumes the shorter range, + * whereas one of the while loops deals with the + * longer one. + */ + if (diff_format == D_SIDEBYSIDE) { + for (i=i0, j=j0; i<=i1 && j<=j1; i++, j++) + change(file1, f1, file2, f2, i, i, + j, j, &flags); + + while (i <= i1) { + change(file1, f1, file2, f2, + i, i, j+1, j, &flags); + i++; + } + + while (j <= j1) { + change(file1, f1, file2, f2, + i+1, i, j, j, &flags); + j++; + } + } else + change(file1, f1, file2, f2, i0, i1, j0, + j1, &flags); } } else { for (i0 = m; i0 >= 1; i0 = i1 - 1) { @@ -987,7 +1047,7 @@ change(char *file1, FILE *f1, char *file2, FILE *f2, i { static size_t max_context = 64; long curpos; - int i, nc, f; + int i, nc; const char *walk; bool skip_blanks; @@ -1116,27 +1176,38 @@ proceed: diff_output("%c", *walk); } } + if (diff_format == D_SIDEBYSIDE) { + if (a > b) { + print_space(0, hw + padding , *pflags); + } else { + nc = fetch(ixold, a, b, f1, '\0', 1, *pflags); + print_space(nc, hw - nc + padding, *pflags); + } + diff_output("%c", (a>b)? '>' : ((c>d)? '<' : '|')); + print_space(hw + padding + 1 , padding, *pflags); + fetch(ixnew, c, d, f2, '\0', 0, *pflags); + diff_output("\n"); + } if (diff_format == D_NORMAL || diff_format == D_IFDEF) { fetch(ixold, a, b, f1, '<', 1, *pflags); if (a <= b && c <= d && diff_format == D_NORMAL) diff_output("---\n"); } - f = 0; - if (diff_format != D_GFORMAT) - f = fetch(ixnew, c, d, f2, diff_format == D_NORMAL ? '>' : '\0', 0, *pflags); - if (f != 0 && diff_format == D_EDIT) { + if (diff_format != D_GFORMAT && diff_format != D_SIDEBYSIDE) + fetch(ixnew, c, d, f2, diff_format == D_NORMAL ? '>' : '\0', 0, *pflags); + if (edoffset != 0 && diff_format == D_EDIT) { /* - * A non-zero return value for D_EDIT indicates that the + * A non-zero edoffset value for D_EDIT indicates that the * last line printed was a bare dot (".") that has been * escaped as ".." to prevent ed(1) from misinterpreting * it. We have to add a substitute command to change this * back and restart where we left off. */ diff_output(".\n"); - diff_output("%ds/.//\n", a + f - 1); - b = a + f - 1; + diff_output("%ds/.//\n", a + edoffset - 1); + b = a + edoffset - 1; a = b + 1; - c += f; + c += edoffset; goto restart; } if ((diff_format == D_EDIT || diff_format == D_REVERSE) && c <= d) @@ -1150,9 +1221,10 @@ proceed: static int fetch(long *f, int a, int b, FILE *lb, int ch, int oldfile, int flags) { - int i, j, c, lastc, col, nc; - int newcol; + int i, j, c, lastc, col, nc, newcol; + edoffset = 0; + nc = 0; /* * When doing #ifdef's, copy down to current line * if this is the first file, so that stuff makes it to output. @@ -1180,12 +1252,15 @@ fetch(long *f, int a, int b, FILE *lb, int ch, int old } for (i = a; i <= b; i++) { fseek(lb, f[i - 1], SEEK_SET); - nc = f[i] - f[i - 1]; - if ((diff_format != D_IFDEF && diff_format != D_GFORMAT) && + nc = (f[i] - f[i - 1]); + if (diff_format == D_SIDEBYSIDE && hw < nc) + nc = hw; + if ((diff_format != D_IFDEF && diff_format != D_GFORMAT) && ch != '\0') { diff_output("%c", ch); - if (Tflag && (diff_format == D_NORMAL || diff_format == D_CONTEXT - || diff_format == D_UNIFIED)) + if (Tflag && (diff_format == D_NORMAL || + diff_format == D_CONTEXT || + diff_format == D_UNIFIED)) diff_output("\t"); else if (diff_format != D_UNIFIED) diff_output(" "); @@ -1193,38 +1268,68 @@ fetch(long *f, int a, int b, FILE *lb, int ch, int old col = 0; for (j = 0, lastc = '\0'; j < nc; j++, lastc = c) { if ((c = getc(lb)) == EOF) { - if (diff_format == D_EDIT || diff_format == D_REVERSE || + if (diff_format == D_EDIT || + diff_format == D_REVERSE || diff_format == D_NREVERSE) warnx("No newline at end of file"); else diff_output("\n\\ No newline at end of " "file\n"); - return (0); + return col; } - if (c == '\t' && (flags & D_EXPANDTABS)) { - newcol = ((col/tabsize)+1)*tabsize; - do { - diff_output(" "); - } while (++col < newcol); + /* + * when using --side-by-side, col needs to be increased + * in any case to keep the columns aligned + */ + if (c == '\t') { + if (flags & D_EXPANDTABS) { + newcol = ((col/tabsize)+1)*tabsize; + do { + if (diff_format == D_SIDEBYSIDE) + j++; + diff_output(" "); + } while (++col < newcol && j < nc); + } else { + if (diff_format == D_SIDEBYSIDE) { + if ((j + tabsize) > nc) { + diff_output("%*s", + nc - j,""); + j = col = nc; + } else { + diff_output("\t"); + col += tabsize - 1; + j += tabsize - 1; + } + } else { + diff_output("\t"); + col++; + } + } } else { if (diff_format == D_EDIT && j == 1 && c == '\n' && lastc == '.') { /* * Don't print a bare "." line * since that will confuse ed(1). - * Print ".." instead and return, - * giving the caller an offset - * from which to restart. + * Print ".." instead and set the, + * global variable edoffset to an + * offset from which to restart. + * The caller must check the value + * of edoffset */ diff_output(".\n"); - return (i - a + 1); + edoffset = i - a + 1; + return edoffset; } - diff_output("%c", c); - col++; + /* when side-by-side, do not print a newline */ + if (diff_format != D_SIDEBYSIDE || c != '\n') { + diff_output("%c", c); + col++; + } } } } - return (0); + return col; } /* @@ -1577,4 +1682,26 @@ print_header(const char *file1, const char *file2) else diff_output("%s %s\t%s\n", diff_format == D_CONTEXT ? "---" : "+++", file2, buf2); -} +} + +/* + * Prints n number of space characters either by using tab + * or single space characters. + * nc is the preceding number of characters + */ +static void +print_space(int nc, int n, int flags) { + int i, col; + + col = n; + if ((flags & D_EXPANDTABS) == 0) { + /* first tabstop may be closer than tabsize */ + i = tabsize - (nc % tabsize); + while (col >= tabsize) { + diff_output("\t"); + col -= i; + i = tabsize; + } + } + diff_output("%*s", col, ""); +} \ No newline at end of file Modified: stable/12/usr.bin/diff/tests/diff_test.sh ============================================================================== --- stable/12/usr.bin/diff/tests/diff_test.sh Wed Mar 4 09:46:42 2020 (r358609) +++ stable/12/usr.bin/diff/tests/diff_test.sh Wed Mar 4 11:28:49 2020 (r358610) @@ -103,8 +103,6 @@ group_format_body() side_by_side_body() { - atf_expect_fail "--side-by-side not currently implemented (bug # 219933)" - atf_check -o save:A printf "A\nB\nC\n" atf_check -o save:B printf "D\nB\nE\n" From owner-svn-src-all@freebsd.org Wed Mar 4 11:30:10 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 9623026C2E8; Wed, 4 Mar 2020 11:30:10 +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 48XWrf1Tg6z3R8M; Wed, 4 Mar 2020 11:30:10 +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 0A3921D421; Wed, 4 Mar 2020 11:30:08 +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 024BU8cv070035; Wed, 4 Mar 2020 11:30:08 GMT (envelope-from bapt@FreeBSD.org) Received: (from bapt@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 024BU8cq070034; Wed, 4 Mar 2020 11:30:08 GMT (envelope-from bapt@FreeBSD.org) Message-Id: <202003041130.024BU8cq070034@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bapt set sender to bapt@FreeBSD.org using -f From: Baptiste Daroussin Date: Wed, 4 Mar 2020 11:30:08 +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: r358611 - stable/12/share/misc X-SVN-Group: stable-12 X-SVN-Commit-Author: bapt X-SVN-Commit-Paths: stable/12/share/misc X-SVN-Commit-Revision: 358611 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages 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, 04 Mar 2020 11:30:11 -0000 Author: bapt Date: Wed Mar 4 11:30:08 2020 New Revision: 358611 URL: https://svnweb.freebsd.org/changeset/base/358611 Log: MFC r358378: Update pci_vendors to 2020.02.22 Modified: stable/12/share/misc/pci_vendors Directory Properties: stable/12/ (props changed) Modified: stable/12/share/misc/pci_vendors ============================================================================== --- stable/12/share/misc/pci_vendors Wed Mar 4 11:28:49 2020 (r358610) +++ stable/12/share/misc/pci_vendors Wed Mar 4 11:30:08 2020 (r358611) @@ -2,8 +2,8 @@ # List of PCI ID's # -# Version: 2019.01.29 -# Date: 2019-01-29 03:15:01 +# Version: 2020.02.22 +# Date: 2020-02-22 03:15:04 # # Maintained by Albert Pool, Martin Mares, and other volunteers from # the PCI ID Project at https://pci-ids.ucw.cz/. @@ -14,6 +14,10 @@ # This file can be distributed under either the GNU General Public License # (version 2 or higher) or the 3-clause BSD License. # +# The database is a compilation of factual data, and as such the copyright +# only covers the aggregation and formatting. The copyright is held by +# Martin Mares and Albert Pool. +# # Vendors, devices and subsystems. Please keep sorted. @@ -64,6 +68,7 @@ # 018a is not LevelOne but there is a board misprogrammed 018a LevelOne 0106 FPC-0106TX misprogrammed [RTL81xx] +01de Oxide Computer Company # 021b is not Compaq but there is a board misprogrammed 021b Compaq Computer Corporation 8139 HNE-300 (RealTek RTL8139c) [iPaq Networking] @@ -92,6 +97,7 @@ 6663 Butane II (MPEG2 encoder board) 6666 MediaPress (MPEG2 encoder board) 07d1 D-Link System Inc +0824 T1042 [Freescale] 0925 VIA Technologies, Inc. (Wrong ID) 0a89 BREA Technologies Inc 0b0b Rhino Equipment Corp. @@ -220,8 +226,7 @@ 0eac SHF Communication Technologies AG 0008 Ethernet Powerlink Managing Node 01 0f62 Acrox Technologies Co., Ltd. -# Formerly NCR -1000 LSI Logic / Symbios Logic +1000 Broadcom / LSI 0001 53c810 1000 1000 LSI53C810AE PCI to SCSI I/O Processor 0002 53c820 @@ -266,7 +271,10 @@ 0013 53c875a 1000 1000 LSI53C875A PCI to Ultra SCSI Controller 0014 MegaRAID Tri-Mode SAS3516 + 1028 1f3a PERC H745 Adapter + 1028 1f3b PERC H745 Front 1028 1fd4 PERC H745P MX + 1137 020e UCSC-RAID-M5 12G Modular RAID Controller 1d49 0602 ThinkSystem RAID 930-16i 4GB Flash PCIe 12Gb Adapter 1d49 0604 ThinkSystem RAID 930-8e 4GB Flash PCIe 12Gb Adapter 1d49 0607 ThinkSystem RAID 930-16i 8GB Flash PCIe 12Gb Adapter @@ -274,6 +282,8 @@ 8086 9460 RAID Controller RSP3TD160F 8086 9480 RAID Controller RSP3MD088F 0015 MegaRAID Tri-Mode SAS3416 + 1028 1f3c PERC H345 Adapter + 1028 1f3d PERC H345 Front 1d49 0503 ThinkSystem RAID 530-16i PCIe 12Gb Adapter 0016 MegaRAID Tri-Mode SAS3508 1028 1fc9 PERC H840 Adapter @@ -401,7 +411,7 @@ 8086 3510 RMS25PB080 RAID Controller 8086 3511 RMS25PB040 RAID Controller 8086 3512 RMT3PB080 RAID Controller - 8086 3513 RMS25CB080 RAID Controller + 8086 3513 Integrated RAID Module RMS25CB080 8086 3514 RMS25CB040 RAID Controller 8086 351c RMS25PB080N RAID Controller 8086 351d RMS25CB080N RAID Controller @@ -428,6 +438,8 @@ 1028 1fd1 PERC H730P MX 17aa 1052 ThinkServer RAID 720i 17aa 1053 ThinkServer RAID 720ix + 1bd4 0014 6G SAS3108 2G + 1bd4 0015 6G SAS3108 4G 1d49 0600 ThinkSystem RAID 730-8i 1GB Cache PCIe 12Gb Adapter 1d49 0608 ThinkSystem RAID 730-8i 2GB Flash PCIe 12Gb Adapter 1d49 0609 ThinkSystem RAID 730-8i 4GB Flash PCIe 12Gb Adapter @@ -480,14 +492,18 @@ 0062 SAS1078 PCI-Express Fusion-MPT SAS 1000 0062 SAS1078 PCI-Express Fusion-MPT SAS 0064 SAS2116 PCI-Express Fusion-MPT SAS-2 [Meteor] + 1000 3030 9200-16e 6Gb/s SAS/SATA PCIe x8 External HBA 1000 30c0 SAS 9201-16i + 1000 30d0 9201-16e 6Gb/s SAS/SATA PCIe x8 External HBA 0065 SAS2116 PCI-Express Fusion-MPT SAS-2 [Meteor] 006e SAS2308 PCI-Express Fusion-MPT SAS-2 0070 SAS2004 PCI-Express Fusion-MPT SAS-2 [Spitfire] 1000 3010 SAS9211-4i + 1014 040e ServeRAID H1110 0071 MR SAS HBA 2004 0072 SAS2008 PCI-Express Fusion-MPT SAS-2 [Falcon] 1000 3040 9210-8i + 1000 3080 9200-8e [LSI SAS 6Gb/s SAS/SATA PCIe x8 External HBA] 1000 30b0 9200-8e [LSI SAS 6Gb/s SAS/SATA PCIe x8 External HBA] 1028 1f1c 6Gbps SAS HBA Adapter 1028 1f1d PERC H200 Adapter @@ -495,6 +511,12 @@ 1028 1f1f PERC H200 Modular 1028 1f20 PERC H200 Embedded 1028 1f22 PERC H200 Internal Tape Adapter +# Fujitsu D2607 SAS2008 HBA controller + 1734 1177 HBA Ctrl SAS 6G 0/1 [D2607] + 1bd4 000d 6G SAS2008IT + 1bd4 000e 6G SAS2008IR + 1bd4 000f 6G SAS2008IT SA5248 + 1bd4 0010 6G SAS2008IR SA5248 8086 350f RMS2LL040 RAID Controller 8086 3700 SSD 910 Series 0073 MegaRAID SAS 2008 [Falcon] @@ -502,6 +524,7 @@ 1000 9241 MegaRAID SAS 9240-4i 1000 92a0 MegaRAID SAS 9220-8i 1014 03b1 ServeRAID M1015 SAS/SATA Controller + 1014 040d ServeRAID M1115 SAS/SATA Controller 1028 1f4e PERC H310 Adapter 1028 1f4f PERC H310 Integrated 1028 1f50 PERC H310 Mini Blades @@ -594,10 +617,16 @@ 15d9 0691 Onboard SAS2308 PCI-Express Fusion-MPT SAS-2 0087 SAS2308 PCI-Express Fusion-MPT SAS-2 1000 3020 9207-8i SAS2.1 HBA + 1000 3030 SAS9207-4i4e 1000 3040 9207-8e SAS2.1 HBA 1000 3050 SAS9217-8i + 1000 3060 SAS9217-4i4e 1014 0472 N2125 External Host Bus Adapter + 1590 0041 H220i + 1590 0042 H221 / 9207-8e 1590 0044 H220i + 1bd4 0009 6G SAS2308IR + 1bd4 000a 6G SAS2308IT 8086 3000 RS25GB008 RAID Controller 8086 3060 RS25FB044 RAID Controller 8086 3516 RMS25JB080 RAID Controller @@ -624,10 +653,26 @@ 1028 1f53 HBA330 Mini 1028 1fd2 HBA330 MX 1028 1fd3 HBA330 MMZ +# Supermicro AOC-S3008L-L8e uses 0808 for their SAS3008 SAS controller + 15d9 0808 AOC-S3008L-L8e + 1bd4 000b 12G SAS3008IR + 1bd4 000c 12G SAS3008IT 1bd4 0011 Inspur 12Gb 8i-3008 IT SAS HBA + 1bd4 0012 12Gb SAS3008IR UDM + 1bd4 0026 12G SAS3008IT RACK + 1bd4 0027 12G SAS3008IMR RACK + 1bd4 0028 12G SAS3008IR RACK 00ab SAS3516 Fusion-MPT Tri-Mode RAID On Chip (ROC) +# 8 Internal and 8 External port channel 9400 HBA + 1000 3040 HBA 9400-8i8e 8086 3530 Integrated RAID Module RMSP3JD160J 00ac SAS3416 Fusion-MPT Tri-Mode I/O Controller Chip (IOC) +# Channel 16 internal port HBA + 1000 3000 HBA 9400-16i +# Channel 16 external port HBA + 1000 3020 HBA 9400-16e + 1028 1fe3 HBA345 Adapter + 1028 1fe4 HBA345 Front 1d49 0201 ThinkSystem 430-16i SAS/SATA 12Gb HBA 1d49 0203 ThinkSystem 430-16e SAS/SATA 12Gb HBA 8086 3000 RAID Controller RSP3QD160J @@ -635,6 +680,8 @@ 00ae SAS3508 Fusion-MPT Tri-Mode RAID On Chip (ROC) 00af SAS3408 Fusion-MPT Tri-Mode I/O Controller Chip (IOC) 1000 3010 HBA 9400-8i +# 9400 Channel 8 external port HBA + 1000 3030 HBA 9400-8e 1d49 0200 ThinkSystem 430-8i SAS/SATA 12Gb HBA 1d49 0202 ThinkSystem 430-8e SAS/SATA 12Gb HBA 1d49 0204 ThinkSystem 430-8i SAS/SATA 12Gb Dense HBA @@ -656,16 +703,57 @@ 00cf MegaRAID SAS-3 3324 [Intruder] 1000 9370 MegaRAID SAS 9361-24i 00d0 SAS3716 Fusion-MPT Tri-Mode RAID Controller Chip (ROC) +# 9405W 16 internal port channel HBA + 1000 3050 HBA 9405W-16i +# 9405W 8 internal and 8 external port channel HBA + 1000 3070 HBA 9405W-8i8e 00d1 SAS3616 Fusion-MPT Tri-Mode I/O Controller Chip (IOC) +# 9405W 16 external port Channel HBA + 1000 3080 HBA 9405W-16e +# 9405W 16 internal port Channel HBA + 1000 3090 HBA 9405W-16i 00d3 MegaRAID Tri-Mode SAS3716W 00e0 Fusion-MPT 12GSAS/PCIe Unsupported SAS39xx 00e1 Fusion-MPT 12GSAS/PCIe SAS39xx 00e2 Fusion-MPT 12GSAS/PCIe Secure SAS39xx 00e3 Fusion-MPT 12GSAS/PCIe Unsupported SAS39xx 00e4 Fusion-MPT 12GSAS/PCIe Unsupported SAS38xx +# Invalid part + 1028 200b HBA355i Adapter Invalid +# Invalid part + 1028 200c HBA355i Front Invalid +# Invalid part + 1028 200d HBA355e Adapter Invalid +# Invalid part + 1028 200e HBA350i MX Invalid +# Soft Secure 00e5 Fusion-MPT 12GSAS/PCIe SAS38xx +# Soft Secure + 1028 200b HBA355i Adapter +# Soft Secure + 1028 200c HBA355i Front +# Soft Secure + 1028 200d HBA355e Adapter +# Soft Secure + 1028 200e HBA350i MX + 1d49 0205 ThinkSystem 440-16i SAS/SATA PCIe Gen4 12Gb Internal HBA + 1d49 0206 ThinkSystem 440-16e SAS/SATA PCIe Gen4 12Gb HBA 00e6 Fusion-MPT 12GSAS/PCIe Secure SAS38xx + 1028 200b HBA355i Adapter + 1028 200c HBA355i Front + 1028 200d HBA355e Adapter + 1028 200e HBA355i MX + 1d49 0205 ThinkSystem 440-16i SAS/SATA PCIe Gen4 12Gb Internal HBA + 1d49 0206 ThinkSystem 440-16e SAS/SATA PCIe Gen4 12Gb HBA 00e7 Fusion-MPT 12GSAS/PCIe Unsupported SAS38xx +# Tampered part + 1028 200b HBA355i Adapter Tampered +# Tampered part + 1028 200c HBA355i Front Tampered +# Tampered part + 1028 200d HBA355e Adapter Tampered +# Tampered part + 1028 200e HBA350i MX Tampered 02b0 Virtual Endpoint on PCIe Switch 1d49 0001 ThinkSystem 1610-4P NVMe Switch Adapter 1d49 0002 ThinkSystem 810-4P NVMe Switch Adapter @@ -742,9 +830,37 @@ 0901 61C102 1000 63C815 10e0 MegaRAID 12GSAS/PCIe Unsupported SAS39xx + 1028 1ae0 PERC H755 Adapter - Invalid Device + 1028 1ae1 PERC H755 Front - Invalid Device + 1028 1ae2 PERC H755N Front - Invalid Device + 1028 1ae3 PERC H755 MX - Invalid Device 10e1 MegaRAID 12GSAS/PCIe SAS39xx + 1028 1ae0 PERC H755 Adapter + 1028 1ae1 PERC H755 Front + 1028 1ae2 PERC H755N Front + 1028 1ae3 PERC H755 MX + 1d49 060a ThinkSystem RAID 940-8i 4GB Flash PCIe Gen4 12Gb Adapter + 1d49 060b ThinkSystem RAID 940-8i 8GB Flash PCIe Gen4 12Gb Adapter + 1d49 060c ThinkSystem RAID 940-16i 8GB Flash PCIe Gen4 12Gb Adapter + 1d49 060d ThinkSystem RAID 940-16i 8GB Flash PCIe Gen4 12Gb Internal Adapter + 1d49 060e ThinkSystem RAID 940-32i 8GB Flash PCIe Gen4 12Gb Adapter + 1d49 060f ThinkSystem RAID 940-8e 4GB Flash PCIe Gen4 12Gb Adapter 10e2 MegaRAID 12GSAS/PCIe Secure SAS39xx + 1028 1ae0 PERC H755 Adapter + 1028 1ae1 PERC H755 Front + 1028 1ae2 PERC H755N Front + 1028 1ae3 PERC H755 MX + 1d49 060a ThinkSystem RAID 940-8i 4GB Flash PCIe Gen4 12Gb Adapter + 1d49 060b ThinkSystem RAID 940-8i 8GB Flash PCIe Gen4 12Gb Adapter + 1d49 060c ThinkSystem RAID 940-16i 8GB Flash PCIe Gen4 12Gb Adapter + 1d49 060d ThinkSystem RAID 940-16i 8GB Flash PCIe Gen4 12Gb Internal Adapter + 1d49 060e ThinkSystem RAID 940-32i 8GB Flash PCIe Gen4 12Gb Adapter + 1d49 060f ThinkSystem RAID 940-8e 4GB Flash PCIe Gen4 12Gb Adapter 10e3 MegaRAID 12GSAS/PCIe Unsupported SAS39xx + 1028 1ae0 PERC H755 Adapter - Tampered Device + 1028 1ae1 PERC H755 Front - Tampered Device + 1028 1ae2 PERC H755N Front - Tampered Device + 1028 1ae3 PERC H755 MX - Tampered Device 10e4 MegaRAID 12GSAS/PCIe Unsupported SAS38xx 10e5 MegaRAID 12GSAS/PCIe SAS38xx 10e6 MegaRAID 12GSAS/PCIe Secure SAS38xx @@ -781,7 +897,9 @@ 1306 Kaveri 1307 Kaveri 1308 Kaveri HDMI/DP Audio Controller + 17aa 3988 Z50-75 1309 Kaveri [Radeon R6/R7 Graphics] + 17aa 3830 Z50-75 130a Kaveri [Radeon R6 Graphics] 130b Kaveri [Radeon R4 Graphics] 130c Kaveri [Radeon R7 Graphics] @@ -802,16 +920,22 @@ 131c Kaveri [Radeon R7 Graphics] 131d Kaveri [Radeon R6 Graphics] 13e9 Ariel + 1478 Navi 10 XL Upstream Port of PCI Express Switch + 1479 Navi 10 XL Downstream Port of PCI Express Switch 154c Kryptos 154e Garfield 1551 Arlene 1552 Pooky 1561 Anubis 15d8 Picasso + 103c 8615 Pavilion Laptop 15-cw1xxx 15dd Raven Ridge [Radeon Vega Series / Radeon Vega Mobile Series] 103c 83c6 Radeon Vega 8 Mobile 1458 d000 Radeon RX Vega 11 - 15de Raven Ridge HDMI/DP Audio Controller + 15de Raven/Raven2/Fenghuang HDMI/DP Audio Controller + 103c 8615 Pavilion Laptop 15-cw1xxx + 15df Raven/Raven2/Fenghuang/Renoir Cryptographic Coprocessor + 103c 8615 Pavilion Laptop 15-cw1xxx 15ff Fenghuang [Zhongshan Subor Z+] 1607 Arden 1636 Renoir @@ -986,7 +1110,7 @@ 4382 SB600 AC97 Audio 4383 SBx00 Azalia (Intel HDA) 1019 2120 A785GM-M - 103c 1611 Pavilion DM1Z-3000 + 103c 1611 Pavilion dm1z-3000 103c 280a DC5750 Microtower 1043 8230 M3A78-EH Motherboard 1043 836c M4A785TD Motherboard @@ -1060,6 +1184,7 @@ 1458 b002 GA-MA770-DS3rev2.0 Motherboard 1849 4390 Motherboard (one of many) 4391 SB7x0/SB8x0/SB9x0 SATA Controller [AHCI mode] + 103c 1609 ProLiant MicroServer N36L 103c 1611 Pavilion DM1Z-3000 1043 82ef M3A78-EH Motherboard 1043 8443 M5A88-V EVO @@ -1073,6 +1198,7 @@ 4395 SB8x0/SB9x0 SATA Controller [Storage mode] 4396 SB7x0/SB8x0/SB9x0 USB EHCI Controller 1019 2120 A785GM-M + 103c 1609 ProLiant MicroServer N36L 103c 1611 Pavilion DM1Z-3000 1043 82ef M3A78-EH Motherboard 1043 8443 M5A88-V EVO @@ -1081,6 +1207,7 @@ 174b 1001 PURE Fusion Mini 4397 SB7x0/SB8x0/SB9x0 USB OHCI0 Controller 1019 2120 A785GM-M + 103c 1609 ProLiant MicroServer N36L 103c 1611 Pavilion DM1Z-3000 1043 82ef M3A78-EH Motherboard 1043 8443 M5A88-V EVO @@ -1101,10 +1228,12 @@ 439c SB7x0/SB8x0/SB9x0 IDE Controller 1002 4392 MSI MS-7713 motherboard 1019 2120 A785GM-M + 103c 1609 ProLiant MicroServer N36L 1043 82ef M3A78-EH Motherboard 105b 0e13 N15235/A74MX mainboard / AMD SB700 439d SB7x0/SB8x0/SB9x0 LPC host controller 1019 2120 A785GM-M + 103c 1609 ProLiant MicroServer N36L 103c 1611 Pavilion DM1Z-3000 1043 82ef M3A78-EH Motherboard 1043 8443 M5A88-V EVO @@ -1214,6 +1343,44 @@ 4857 Xilleon 225 USB for X225 4858 Xilleon 225 DAIO-0 for X225 4859 Xilleon 225 DAIO-1 for X225 + 4860 Xilleon 210 HBIU for X210 + 4861 Xilleon 210 IDE for X210 + 4862 Xilleon 210 USB for X210 + 4863 Xilleon 210 DAIO-0 for X210 + 4864 Xilleon 210 DAIO-1 for X210 + 4865 Xilleon 226 HBIU for X226 + 4866 Xilleon 226 IDE for X226 + 4867 Xilleon 226 USB for X226 + 4868 Xilleon 226 DAIO-0 for X226 + 4869 Xilleon 226 DAIO-1 for X226 + 486a Xilleon 240S HBIU for X240S + 486b Xilleon 240H HBIU for X240H + 486c Xilleon 240S USB for X240S + 486d Xilleon 240H USB for X240H + 486e Xilleon 250 USB 1.1 for X250 + 486f Xilleon 260 USB 1.1 for X260 + 4870 Xilleon 250 HBIU for X250 + 4871 Xilleon 250 IDE for X250 + 4872 Xilleon 234/235 HBIU for X234/X235 + 4873 Xilleon 244/245 HBIU for X244/X245 + 4874 Xilleon 234/235 USB 1.1 for X234/X235 + 4875 Xilleon 260 HBIU for X260 + 4876 Xilleon 260 IDE for X260 + 4877 Xilleon 244/245 USB 1.1 for X244/X245 + 4878 Xilleon 270 HBIU for X270 + 487b Xilleon 242 HBIU for X242 + 487d Xilleon 242 USB 1.1 for X242 + 4880 Xilleon 254 HBIU for X254 + 4881 Xilleon 254 USB 1.1 for X254 + 4882 Xilleon 255 HBIU for X255 + 4883 Xilleon 255 USB 1.1 for X255 + 4884 Xilleon 243 HBIU for X243 + 4885 Xilleon 243 USB 1.1 for X243 + 4886 Xilleon 233 HBIU for X233 + 4887 Xilleon 233 USB 1.1 for X233 + 4888 Xilleon 143 HBIU for X143 + 4889 Xilleon 143 HBIU for X143L + 488a Xilleon 143 HBIU for X143S 4966 RV250 [Radeon 9000 Series] 10f1 0002 RV250 If [Tachyon G9000 PRO] 148c 2039 RV250 If [Radeon 9000 Pro "Evil Commando"] @@ -1443,9 +1610,9 @@ 1002 0028 Rage 128 AIW 1002 0029 Rage 128 AIW 1002 0068 Rage 128 AIW - 5246 Rage 4 [Rage Fury/Xpert 128/Xpert 2000 AGP] + 5246 Rage 128 (Rage 4) series 1002 0004 Magnum/Xpert 128/Xpert 99 - 1002 0008 Magnum/Xpert128/X99/Xpert2000 + 1002 0008 Rage 128 AGP 2x 1002 0028 Rage 128 AIW AGP 1002 0044 Rage Fury/Xpert 128/Xpert 2000 1002 0068 Rage 128 AIW AGP @@ -1688,8 +1855,6 @@ 103c 1952 ProBook 455 G1 6601 Mars [Radeon HD 8730M] 103c 2100 FirePro M4100 - 6602 Mars - 6603 Mars 6604 Opal XT [Radeon R7 M265/M365X/M465] 1025 0776 Aspire V5 Radeon R7 M265 103c 8006 FirePro M4170 @@ -1715,6 +1880,7 @@ 1642 3f09 Radeon R7 350 6611 Oland [Radeon HD 8570 / R7 240/340 OEM] 1028 210b Radeon R5 240 OEM + 1642 1869 AMD Radeon 520 174b 4248 Radeon R7 240 OEM 174b a240 Radeon R7 240 OEM 174b d340 Radeon R7 340 OEM @@ -1722,9 +1888,6 @@ 6613 Oland PRO [Radeon R7 240/340] 148c 7340 Radeon R7 340 1682 7240 R7 240 2048 MB - 6620 Mars - 6621 Mars PRO - 6623 Mars 6631 Oland 6640 Saturn XT [FirePro M6100] 106b 014b Tropo XT [Radeon R9 M380 Mac Edition] @@ -1783,7 +1946,7 @@ 17aa 3805 Radeon HD 8570M 6664 Jet XT [Radeon R5 M240] 6665 Jet PRO [Radeon R5 M230 / R7 M260DX / Radeon 520 Mobile] - 17aa 1309 Radeon R7 M260DX + 17aa 1309 Z50-75 Radeon R7 M260DX 17aa 368f Radeon R5 A230 6667 Jet ULT [Radeon R5 M230] 666f Sun LE [Radeon HD 8550M / R5 M230] @@ -2412,18 +2575,22 @@ 1462 3413 Radeon RX 480 Gaming X 8GB 1462 3416 Radeon RX 570 1462 3418 Radeon RX 580 Armor 4G OC - 148c 2372 Radeon RX 480 + 1462 341e Radeon RX 570 Armor 4G OC + 1462 8a92 Radeon RX 580 + 148c 2372 Radeon RX 480 [Red Dragon] 148c 2373 Radeon RX 470 1682 9470 Radeon RX 470 1682 9480 Radeon RX 480 1682 9588 Radeon RX 580 XTR + 1682 c570 Radeon RX 570 174b e347 Radeon RX 470/480 174b e349 Radeon RX 470 1787 a470 Radeon RX 470 1787 a480 Radeon RX 480 1849 5001 Phantom Gaming X RX 580 OC + 1849 5030 Phantom Gaming D Radeon RX580 8G OC 1da2 e353 Radeon RX 570 Pulse 4GB - 1da2 e366 Nitro+ Radeon RX 570/580 + 1da2 e366 Nitro+ Radeon RX 570/580/590 67e0 Baffin [Radeon Pro WX 4170] 103c 8270 Radeon Pro WX 4170 103c 8272 Radeon Pro WX 4170 @@ -2441,6 +2608,8 @@ 67e9 Baffin [Polaris11] 67eb Baffin [Radeon Pro V5300X] 67ef Baffin [Radeon RX 460/560D / Pro 450/455/460/555/555X/560/560X] + 1028 1703 RX 560D OEM OC 2 GB + 103c 3421 Radeon RX 460 106b 0160 Radeon Pro 460 106b 0166 Radeon Pro 455 106b 0167 Radeon Pro 450 @@ -2456,6 +2625,7 @@ 1028 1726 Radeon RX 560DX 103c 8479 Radeon RX 560X Mobile 1043 04bc Radeon RX 560 + 1043 052f Radeon RX 560 1458 22ed Radeon RX 560 148c 2381 Radeon RX 560 1682 9560 Radeon RX 560 @@ -2679,6 +2849,8 @@ 6868 Vega 10 [Radeon PRO WX 8100/8200] 686c Vega 10 [Radeon Instinct MI25 MxGPU] 687f Vega 10 XL/XT [Radeon RX Vega 56/64] + 1002 0b36 RX Vega64 + 1002 6b76 RX Vega56 6880 Lexington [Radeon HD 6550M] 103c 163c Pavilion dv6 Radeon HD 6550M 6888 Cypress XT [FirePro V8800] @@ -3146,12 +3318,13 @@ 174b e180 Radeon HD 7350 17af 3015 Radeon HD 7350 68fe Cedar LE - 6900 Topaz XT [Radeon R7 M260/M265 / M340/M360 / M440/M445] + 6900 Topaz XT [Radeon R7 M260/M265 / M340/M360 / M440/M445 / 530/535 / 620/625 Mobile] 1025 1056 Radeon R7 M360 / R8 M365DX 1028 0640 Radeon R7 M260/M265 1028 0643 Radeon R7 M260/M265 1028 067f Radeon R7 M260 1028 0767 Radeon R7 M445 + 1028 0810 Radeon 530 1028 130a Radeon R7 M260 103c 2263 Radeon R7 M260 103c 2269 Radeon R7 M260 @@ -3198,12 +3371,12 @@ 694e Polaris 22 XL [Radeon RX Vega M GL] 694f Polaris 22 MGL XL [Radeon Pro WX Vega M GL] 6980 Polaris12 - 6981 Polaris12 + 6981 Lexa XT [Radeon PRO WX 3200] 6985 Lexa XT [Radeon PRO WX 3100] 6986 Polaris12 - 6987 Lexa [Radeon E9171 MCM] + 6987 Lexa [Radeon 540X/550X/630 / RX 640 / E9171 MCM] 6995 Lexa XT [Radeon PRO WX 2100] - 699f Lexa PRO [Radeon RX 550/550X] + 699f Lexa PRO [Radeon 540/540X/550/550X / RX 540X/550/550X] 1028 1720 Radeon RX 550X 148c 2380 Lexa XL [Radeon RX 550] 1da2 e367 Lexa PRO [Radeon RX 550] @@ -3356,7 +3529,12 @@ 1043 04a0 Radeon R9 FURY X 174b e329 Radeon R9 FURY 7310 Navi 10 - 731f Navi 10 + 7312 Navi 10 [Radeon Pro W5700] + 731f Navi 10 [Radeon RX 5600 OEM/5600 XT / 5700/5700 XT] + 7340 Navi 14 [Radeon RX 5500/5500M / Pro 5500M] + 7341 Navi 14 [Radeon Pro W5500] + 7347 Navi 14 [Radeon Pro W5500M] + 734f Navi 14 [Radeon Pro W5300M] 7833 RS350 Host Bridge 7834 RS350 [Radeon 9100 PRO/XT IGP] 7835 RS350M [Mobility Radeon 9000 IGP] @@ -3570,16 +3748,16 @@ 9613 RS780MC [Mobility Radeon HD 3100] 9614 RS780D [Radeon HD 3300] 9616 RS780L [Radeon 3000] - 9640 BeaverCreek [Radeon HD 6550D] - 9641 BeaverCreek [Radeon HD 6620G] - 9642 Sumo [Radeon HD 6370D] - 9643 Sumo [Radeon HD 6380G] - 9644 Sumo [Radeon HD 6410D] - 9645 Sumo [Radeon HD 6410D] - 9647 BeaverCreek [Radeon HD 6520G] + 9640 Sumo [Radeon HD 6550D] + 9641 Sumo [Radeon HD 6620G] + 9642 SuperSumo [Radeon HD 6370D] + 9643 SuperSumo [Radeon HD 6380G] + 9644 SuperSumo [Radeon HD 6410D] + 9645 SuperSumo [Radeon HD 6410D] + 9647 Sumo [Radeon HD 6520G] 9648 Sumo [Radeon HD 6480G] - 9649 Sumo [Radeon HD 6480G] - 964a BeaverCreek [Radeon HD 6530D] + 9649 SuperSumo [Radeon HD 6480G] + 964a Sumo [Radeon HD 6530D] 964b Sumo 964c Sumo 964e Sumo @@ -3592,6 +3770,7 @@ 1019 2120 A785GM-M 1043 83a2 M4A785TD Motherboard 9712 RS880M [Mobility Radeon HD 4225/4250] + 103c 1609 ProLiant MicroServer N36L 9713 RS880M [Mobility Radeon HD 4100] 9714 RS880 [Radeon HD 4290] 9715 RS880 [Radeon HD 4250] @@ -3610,6 +3789,7 @@ 9830 Kabini [Radeon HD 8400 / R3 Series] 9831 Kabini [Radeon HD 8400E] 9832 Kabini [Radeon HD 8330] + 1849 9832 QC5000-ITX/PH 9833 Kabini [Radeon HD 8330E] 9834 Kabini [Radeon HD 8210] 9835 Kabini [Radeon HD 8310E] @@ -3619,6 +3799,7 @@ 9839 Kabini [Radeon HD 8180] 983d Temash [Radeon HD 8250/8280G] 9840 Kabini HDMI/DP Audio + 1849 9840 QC5000-ITX/PH 9850 Mullins [Radeon R3 Graphics] 9851 Mullins [Radeon R4/R5 Graphics] 1179 f928 Beema [Radeon R5 Graphics] @@ -3682,9 +3863,10 @@ 991e Bishop 9920 Liverpool [Playstation 4 APU] 9921 Liverpool HDMI/DP Audio Controller - 9922 Starship + 9922 Starshp 9923 Starsha2 [Kingston/Clayton] 9924 Gladius + 9925 Kingston/Clayton/Jupiter/Gladius/Montego HDMI Controller 9926 Jupiter 9990 Trinity 2 [Radeon HD 7520G] 9991 Trinity 2 [Radeon HD 7540D] @@ -3698,7 +3880,7 @@ 9999 Richland [Radeon HD 8510G] 999a Richland [Radeon HD 8410G] 999b Richland [Radeon HD 8310G] - 999c Richland + 999c Richland [Radeon HD 8650D] # AMD Quad-Core A8-Series APU A8-6500T with Radeon HD 8550D 999d Richland [Radeon HD 8550D] 99a0 Trinity 2 [Radeon HD 7520G] @@ -3732,7 +3914,8 @@ aa98 Caicos HDMI Audio [Radeon HD 6450 / 7450/8450/8490 OEM / R5 230/235/235X OEM] 174b aa98 Radeon HD 6450 1GB DDR3 aaa0 Tahiti HDMI Audio [Radeon HD 7870 XT / 7950/7970] - aab0 Cape Verde/Pitcairn HDMI Audio [Radeon HD 7700/7800 Series] + aab0 Oland/Hainan/Cape Verde/Pitcairn HDMI Audio [Radeon HD 7000 Series] + aab8 Tiran HDMI Audio aac0 Tobago HDMI Audio [Radeon R7 360 / R9 360 OEM] aac8 Hawaii HDMI Audio [Radeon R9 290/290X / 390/390X] aad8 Tonga HDMI Audio [Radeon R9 285/380] @@ -4274,6 +4457,35 @@ 1302 Family 11h Processor DRAM Controller 1303 Family 11h Processor Miscellaneous Control 1304 Family 11h Processor Link Control + 1305 Griffin Function 5 + 1306 Griffin Function 6 + 1307 Griffin Function 7 + 1308 Kaveri Audio Controller + 1314 Wrestler/Bheem/Ontario/Krishna Audio Controller + 13e0 Ariel Root Complex + 13e1 Ariel IOMMU + 13e2 Ariel PCIe Dummy Host Bridge + 13e3 Ariel PCIe GPP Bridge + 13e4 Ariel PCIe Dummy Host Bridge + 13e5 Ariel Internal PCIe GPP Bridge 0 to Bus A + 13e6 Ariel Internal PCIe GPP Bridge 0 to Bus B + 13e7 Ariel SMBus Controller + 13e8 Ariel LPC Bridge + 13e9 Ariel Internal GPU + 13ea Ariel HD Audio Controller + 13eb Ariel HD Audio Coprocessor + 13ec Ariel Cryptographic Coprocessor + 13ed Ariel USB 3.1 Type C: Gen2 x 1port + DP Alt Mode + 13ee Ariel USB 3.1 Type A: Gen2 x 2 ports + 13ef Ariel ZCN/MP4 + 13f0 Ariel Device 24: Function 0 + 13f1 Ariel Device 24: Function 1 + 13f2 Ariel Device 24: Function 2 + 13f3 Ariel Device 24: Function 3 + 13f4 Ariel Device 24: Function 4 + 13f5 Ariel Device 24: Function 5 + 13f6 Ariel Device 24: Function 6 + 13f7 Ariel Device 24: Function 7 1400 Family 15h (Models 10h-1fh) Processor Function 0 1401 Family 15h (Models 10h-1fh) Processor Function 1 1402 Family 15h (Models 10h-1fh) Processor Function 2 @@ -4301,26 +4513,51 @@ 1422 Family 15h (Models 30h-3fh) Processor Root Complex 1423 Family 15h (Models 30h-3fh) I/O Memory Management Unit 1424 Family 15h (Models 30h-3fh) Processor Root Port + 1425 Kaveri P2P Bridge for GFX PCIe Port [1:0] 1426 Family 15h (Models 30h-3fh) Processor Root Port - 142e Liverpool Processor Function 0 - 142f Liverpool Processor Function 1 - 1430 Liverpool Processor Function 2 - 1431 Liverpool Processor Function 3 - 1432 Liverpool Processor Function 4 + 142e Liverpool Processor HT configuration + 142f Liverpool Processor Address Maps + 1430 Liverpool Processor DRAM configuration + 1431 Liverpool Processor Misc configuration + 1432 Liverpool Processor PM configuration + 1433 Liverpool Processor NB Performance Monitor + 1434 Liverpool Processor SPLL Configuration 1436 Liverpool Processor Root Complex 1437 Liverpool I/O Memory Management Unit - 1438 Liverpool Processor Root Port + 1438 Liverpool UMI PCIe Dummy Host Bridge 1439 Family 16h Processor Functions 5:1 + 143a Kingston/Clayton/Gladius/Montego Root Complex + 143b Kingston/Clayton/Gladius/Montego P2P Bridge for UMI Link + 1440 Matisse Device 24: Function 0 + 1441 Matisse Device 24: Function 1 + 1442 Matisse Device 24: Function 2 + 1443 Matisse Device 24: Function 3 + 1444 Matisse Device 24: Function 4 + 1445 Matisse Device 24: Function 5 + 1446 Matisse Device 24: Function 6 + 1447 Matisse Device 24: Function 7 + 1448 Renoir Device 24: Function 0 + 1449 Renoir Device 24: Function 1 + 144a Renoir Device 24: Function 2 + 144b Renoir Device 24: Function 3 + 144c Renoir Device 24: Function 4 + 144d Renoir Device 24: Function 5 + 144e Renoir Device 24: Function 6 + 144f Renoir Device 24: Function 7 1450 Family 17h (Models 00h-0fh) Root Complex 1451 Family 17h (Models 00h-0fh) I/O Memory Management Unit 1452 Family 17h (Models 00h-1fh) PCIe Dummy Host Bridge 1453 Family 17h (Models 00h-0fh) PCIe GPP Bridge 1454 Family 17h (Models 00h-0fh) Internal PCIe GPP Bridge 0 to Bus B + 1455 Zeppelin/Renoir PCIe Dummy Function 1456 Family 17h (Models 00h-0fh) Platform Security Processor 1457 Family 17h (Models 00h-0fh) HD Audio Controller + 145a Zeppelin/Raven/Raven2 PCIe Dummy Function 145b Zeppelin Non-Transparent Bridge 145c Family 17h (Models 00h-0fh) USB 3.0 Host Controller - 145f USB 3.0 Host controller + 145d Zeppelin Switch Upstream (PCIE SW.US) + 145e Zeppelin Switch Downstream (PCIE SW.DS) + 145f Zeppelin USB 3.0 Host controller 1460 Family 17h (Models 00h-0fh) Data Fabric: Device 18h; Function 0 1461 Family 17h (Models 00h-0fh) Data Fabric: Device 18h; Function 1 1462 Family 17h (Models 00h-0fh) Data Fabric: Device 18h; Function 2 @@ -4329,6 +4566,39 @@ 1465 Family 17h (Models 00h-0fh) Data Fabric: Device 18h; Function 5 1466 Family 17h (Models 00h-0fh) Data Fabric: Device 18h; Function 6 1467 Family 17h (Models 00h-0fh) Data Fabric: Device 18h; Function 7 + 1468 Zeppelin Cryptographic Coprocessor NTBCCP + 1480 Starship/Matisse Root Complex + 1462 7c37 X570-A PRO motherboard + 1481 Starship/Matisse IOMMU + 1482 Starship/Matisse PCIe Dummy Host Bridge + 1483 Starship/Matisse GPP Bridge + 1484 Starship/Matisse Internal PCIe GPP Bridge 0 to bus[E:B] + 1485 Starship/Matisse Reserved SPP + 1486 Starship/Matisse Cryptographic Coprocessor PSPCPP + 1487 Starship/Matisse HD Audio Controller + 1462 9c37 X570-A PRO motherboard + 1488 Starship Reserved SSP + 1489 Starship Reserved SSP + 148a Starship/Matisse PCIe Dummy Function + 148b Starship/Matisse Non-Transparent Bridge + 148c Starship USB 3.0 Host Controller + 148d Starship/Matisse Switch Upstream (PCIE SW.US) + 148e Starship/Matisse Switch Downstream (PCIE SW.DS) + 148f Starship Reserved SSP + 1490 Starship Device 24; Function 0 + 1491 Starship Device 24; Function 1 + 1492 Starship Device 24; Function 2 + 1493 Starship Device 24; Function 3 + 1494 Starship Device 24; Function 4 + 1495 Starship Device 24; Function 5 + 1496 Starship Device 24; Function 6 + 1497 Starship Device 24; Function 7 + 1498 Starship/Matisse PTDMA + 1499 Starship/Matisse NVMe + 149a Starship PCIe GPP Bridge [1:0] + 149b Starship Reserved SSP + 149c Matisse USB 3.0 Host Controller + 1462 7c37 X570-A PRO motherboard 1510 Family 14h Processor Root Complex 174b 1001 PURE Fusion Mini 1512 Family 14h Processor Root Port @@ -4343,8 +4613,33 @@ 1534 Family 16h Processor Function 4 1535 Family 16h Processor Function 5 1536 Family 16h Processor Root Complex + 1849 1536 QC5000-ITX/PH + 1537 Kabini/Mullins PSP-Platform Security Processor 1538 Family 16h Processor Function 0 + 1539 Kabini P2P Bridge for PCIe Ports[4:0] + 1540 Kryptos/Cato/Garfield/Garfield+/Arlene/Pooky HT Configuration + 1541 Kryptos/Cato/Garfield/Garfield+/Arlene/Pooky Address Maps + 1542 Kryptos/Cato/Garfield/Garfield+/Arlene/Pooky DRAM Configuration + 1543 Kryptos/Cato/Garfield/Garfield+/Arlene/Pooky Miscellaneous Configuration + 1544 Kryptos/Cato/Garfield/Garfield+/Arlene/Pooky PM Configuration + 1545 Kryptos/Cato/Garfield/Garfield+/Arlene/Pooky NB Performance Monitor + 1546 Kryptos/Cato/Garfield/Garfield+/Arlene/Pooky Root Complex + 1547 Kryptos/Cato/Garfield/Garfield+/Arlene/Pooky IOMMU + 1548 Kryptos/Cato/Garfield/Garfield+/Arlene/Pooky UMI PCIe Dummy Host Bridge + 1549 Kryptos/Cato/Garfield/Garfield+ P2P Bridge for PCIe Port [3:0] + 154a Kryptos/Cato/Garfield/Garfield+/Arlene/Pooky Audio Processor + 154b Kryptos/Cato/Garfield/Garfield+/Arlene/Pooky Security Processor + 154d Kryptos/Cato/Garfield/Garfield+/Arlene/Pooky/Anubis HDMI Controller + 154f Anubis Audio Processor + 1550 Garfield+/Arlene/Pooky/Anubis SPLL Configuration + 1553 Arlene/Pooky P2P Bridge for PCIE (3:0) + 155b Anubis Root Complex + 155c Anubis IOMMU + 155d Anubis UMI PCIe Dummy Bridge + 155e Anubis P2P Bridge for PCIe Ports [4:0] + 1560 Anubis Security Processor 1566 Family 16h (Models 30h-3fh) Processor Root Complex + 1567 Mullins IOMMU 156b Family 16h (Models 30h-3fh) Host Bridge 1570 Family 15h (Models 60h-6fh) Processor Function 0 1571 Family 15h (Models 60h-6fh) Processor Function 1 @@ -4354,29 +4649,132 @@ 1575 Family 15h (Models 60h-6fh) Processor Function 5 1576 Family 15h (Models 60h-6fh) Processor Root Complex 1577 Family 15h (Models 60h-6fh) I/O Memory Management Unit + 1578 Carrizo Platform Security Processor + 1579 Carrizo Audio Processor 157a Family 15h (Models 60h-6fh) Audio Controller 157b Family 15h (Models 60h-6fh) Host Bridge 157c Family 15h (Models 60h-6fh) Processor Root Port + 157d Carrizo Audio Dummy Host Bridge + 157e Carrizo Audio Controller 1580 Family 16h (Models 30h-3fh) Processor Function 0 1581 Family 16h (Models 30h-3fh) Processor Function 1 1582 Family 16h (Models 30h-3fh) Processor Function 2 1583 Family 16h (Models 30h-3fh) Processor Function 3 1584 Family 16h (Models 30h-3fh) Processor Function 4 1585 Family 16h (Models 30h-3fh) Processor Function 5 + 1590 Amur/Nolan HT Configuration + 1591 Amur/Nolan Address Maps + 1592 Amur/Nolan DRAM Configuration + 1593 Amur/Nolan Miscellaneous Configuration + 1594 Amur/Nolan PM Configuration + 1595 Amur/Nolan NB Performance Monitor + 1596 Amur/Nolan Root Complex + 1597 Amur/Nolan IOMMU + 1598 Amur/Nolan Platform Security Processor + 1599 Amur/Nolan PCIe Dummy Host Bridge + 159d Amur Function 6: Gasket + 15b0 Stoney HT Configuration + 15b1 Stoney Address Maps + 15b2 Stoney DRAM Configuration + 15b3 Stoney Miscellaneous Configuration + 15b4 Stoney PM Configuration + 15b5 Stoney NB Performance Monitor + 15bc Stoney PCIe [GFX,GPP] Bridge [4:0] + 15be Stoney Audio Processor + 15d0 Raven/Raven2 Root Complex + 103c 8615 Pavilion Laptop 15-cw1xxx + 15d1 Raven/Raven2 IOMMU + 103c 8615 Pavilion Laptop 15-cw1xxx + 15d2 Raven/Raven2 PCIe Dummy Host Bridge + 15d3 Raven/Raven2 PCIe GPP Bridge [6:0] + 15d4 FireFlight USB 3.1 + 15d5 FireFlight USB 3.1 + 15da Raven/Raven2 PCIe Dummy Host Bridge + 15db Raven/Raven2 Internal PCIe GPP Bridge 0 to Bus A + 15dc Raven/Raven2 Internal PCIe GPP Bridge 0 to Bus B + 15de Raven/Raven2/FireFlight HD Audio Controller 15df Family 17h (Models 10h-1fh) Platform Security Processor + 15e0 Raven USB 3.1 + 103c 8615 Pavilion Laptop 15-cw1xxx + 15e1 Raven USB 3.1 + 103c 8615 Pavilion Laptop 15-cw1xxx + 15e2 Raven/Raven2/FireFlight/Renoir Audio Processor 15e3 Family 17h (Models 10h-1fh) HD Audio Controller + 103c 8615 Pavilion Laptop 15-cw1xxx + 15e4 Raven/Raven2/Renoir Sensor Fusion Hub + 15e5 Raven2 USB 3.1 + 15e6 Raven/Raven2/Renoir Non-Sensor Fusion Hub KMDF driver + 1022 15e4 Raven/Raven2/Renoir Sensor Fusion Hub + 15e8 Raven/Raven2 Device 24: Function 0 + 15e9 Raven/Raven2 Device 24: Function 1 + 15ea Raven/Raven2 Device 24: Function 2 + 15eb Raven/Raven2 Device 24: Function 3 + 15ec Raven/Raven2 Device 24: Function 4 + 15ed Raven/Raven2 Device 24: Function 5 + 15ee Raven/Raven2 Device 24: Function 6 + 15ef Raven/Raven2 Device 24: Function 7 + 15f0 FireFlight Device 24: Function 0 + 15f1 FireFlight Device 24: Function 1 + 15f2 FireFlight Device 24: Function 2 + 15f3 FireFlight Device 24: Function 3 + 15f4 FireFlight Device 24: Function 4 + 15f5 FireFlight Device 24: Function 5 + 15f6 FireFlight Device 24: Function 6 + 15f7 FireFlight Device 24: Function 7 + 15f8 FireFlight Root Complex + 15f9 FireFlight IOMMU + 15fa FireFlight PCIe Dummy Host Bridge + 15fb FireFlight PCIe GPP Bride 3:0 + 15fc FireFlight PCIe Dummy Host Bridge + 15fd FireFlight Internal PCIe GPP Bridge 0 to Bus A + 15fe FireFlight Internal PCIe GPP Bridge 0 to Bus B + 15ff FireFlight Bus A; Device 0: Function 0: Internal GPU 1600 Family 15h Processor Function 0 1601 Family 15h Processor Function 1 1602 Family 15h Processor Function 2 1603 Family 15h Processor Function 3 1604 Family 15h Processor Function 4 1605 Family 15h Processor Function 5 + 1606 Arden Security Processor + 1608 Arden Device 18h: Function 0 + 1609 Arden Device 18h: Function 1 + 160a Arden Device 18h: Function 2 + 160b Arden Device 18h: Function 3 + 160c Arden Device 18h: Function 4 + 160d Arden Device 18h: Function 5 + 160e Arden Device 18h: Function 6 + 160f Arden Device 18h: Function 7 + 1620 Anubis HT Configuration + 1621 Anubis Address Maps + 1622 Anubis DRAM Configuration + 1623 Anubis Miscellaneous Configuration + 1624 Anubis PM Configuration + 1625 Anubis NB Performance Monitor + 1626 Arden Root Complex + 1627 Arden IOMMU + 1628 Arden PCIe Dummy Host Bridge + 1629 Arden PCIe GPP Bridge + 162a Arden Internal PCIe GPP Bridge 0 to bus X + 162b Arden PCIe Non-Transparent Bridge + 1630 Renoir Root Complex + 1631 Renoir IOMMU + 1632 Renoir PCIe Dummy Host Bridge + 1633 Renoir PCIe GPP Bridge + 1634 Renoir PCIe GPP Bridge + 1635 Renoir Internal PCIe GPP Bridge to Bus + 1637 Renoir HD Audio Controller + 1639 Renoir USB 3.1 + 1641 Renoir 10GbE Controller Port 0 (XGBE0/1) + 1642 Renoir WLAN + 1643 Renoir BT + 1644 Renoir I2S 1700 Family 12h/14h Processor Function 0 1701 Family 12h/14h Processor Function 1 1702 Family 12h/14h Processor Function 2 1703 Family 12h/14h Processor Function 3 1704 Family 12h/14h Processor Function 4 1705 Family 12h Processor Root Complex + 1706 Llano P2P Bridge to external GPU 1707 Family 12h Processor Root Port 1708 Family 12h Processor Root Port 1709 Family 12h Processor Root Port @@ -4450,6 +4848,9 @@ 43c7 400 Series Chipset PCIe Port 43c8 400 Series Chipset SATA Controller 43d5 400 Series Chipset USB 3.1 XHCI Controller + 57a3 Matisse PCIe GPP Bridge + 57a4 Matisse PCIe GPP Bridge + 57ad Matisse Switch Upstream 7006 AMD-751 [Irongate] System Controller 7007 AMD-751 [Irongate] AGP Bridge 700a AMD-IGR4 AGP Host to PCI Bridge @@ -4508,6 +4909,8 @@ 7801 FCH SATA Controller [AHCI mode] 103c 168b ProBook 4535s Notebook 103c 194e ProBook 455 G1 Notebook + 17aa 3988 Z50-75 + 1849 7801 QC5000-ITX/PH 7802 FCH SATA Controller [RAID mode] 7803 FCH SATA Controller [RAID mode] 7804 FCH SATA Controller [AHCI mode] @@ -4517,37 +4920,57 @@ 7807 FCH USB OHCI Controller 103c 194e ProBook 455 G1 Notebook 103c 1985 Pavilion 17-e163sg Notebook PC + 17aa 3988 Z50-75 + 1849 7807 QC5000-ITX/PH 7808 FCH USB EHCI Controller 103c 194e ProBook 455 G1 Notebook 103c 1985 Pavilion 17-e163sg Notebook PC + 17aa 3988 Z50-75 + 1849 7808 QC5000-ITX/PH 7809 FCH USB OHCI Controller 103c 194e ProBook 455 G1 Notebook + 17aa 3988 Z50-75 + 780a Kabini/Mullins SATA Raid/AHCI Mode (DotHill driver) 780b FCH SMBus Controller 103c 194e ProBook 455 G1 Notebook 103c 1985 Pavilion 17-e163sg Notebook PC + 17aa 3988 Z50-75 + 1849 780b QC5000-ITX/PH 780c FCH IDE Controller 780d FCH Azalia Controller 103c 194e ProBook 455 G1 Notebook 103c 1985 Pavilion 17-e163sg Notebook PC 1043 8444 F2A85-M Series + 17aa 3988 Z50-75 + 1849 8892 QC5000-ITX/PH 780e FCH LPC Bridge 103c 194e ProBook 455 G1 Notebook 103c 1985 Pavilion 17-e163sg Notebook PC + 17aa 3988 Z50-75 + 1849 780e QC5000-ITX/PH 780f FCH PCI Bridge 7812 FCH USB XHCI Controller 7813 FCH SD Flash Controller 7814 FCH USB XHCI Controller 103c 194e ProBook 455 G1 Notebook 103c 1985 Pavilion 17-e163sg Notebook PC + 17aa 3988 Z50-75 + 1849 7814 QC5000-ITX/PH 7900 FCH SATA Controller [IDE mode] 7901 FCH SATA Controller [AHCI mode] + 103c 8615 Pavilion Laptop 15-cw1xxx + 1462 7c37 X570-A PRO motherboard 7902 FCH SATA Controller [RAID mode] 7903 FCH SATA Controller [RAID mode] 7904 FCH SATA Controller [AHCI mode] 7906 FCH SD Flash Controller 7908 FCH USB EHCI Controller 790b FCH SMBus Controller + 103c 8615 Pavilion Laptop 15-cw1xxx + 1462 7c37 X570-A PRO motherboard *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@freebsd.org Wed Mar 4 11:32:33 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 4178626C4B8; Wed, 4 Mar 2020 11:32:33 +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 48XWvN2l3dz3ygx; Wed, 4 Mar 2020 11:32:32 +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 E5DB01D5DF; Wed, 4 Mar 2020 11:32:31 +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 024BWVax075344; Wed, 4 Mar 2020 11:32:31 GMT (envelope-from bapt@FreeBSD.org) Received: (from bapt@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 024BWVTJ075343; Wed, 4 Mar 2020 11:32:31 GMT (envelope-from bapt@FreeBSD.org) Message-Id: <202003041132.024BWVTJ075343@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bapt set sender to bapt@FreeBSD.org using -f From: Baptiste Daroussin Date: Wed, 4 Mar 2020 11:32: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: r358612 - stable/11/share/misc X-SVN-Group: stable-11 X-SVN-Commit-Author: bapt X-SVN-Commit-Paths: stable/11/share/misc X-SVN-Commit-Revision: 358612 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages 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, 04 Mar 2020 11:32:33 -0000 Author: bapt Date: Wed Mar 4 11:32:31 2020 New Revision: 358612 URL: https://svnweb.freebsd.org/changeset/base/358612 Log: MFC r358378: Update pci_vendors to 2020.02.22 Modified: stable/11/share/misc/pci_vendors Directory Properties: stable/11/ (props changed) Modified: stable/11/share/misc/pci_vendors ============================================================================== --- stable/11/share/misc/pci_vendors Wed Mar 4 11:30:08 2020 (r358611) +++ stable/11/share/misc/pci_vendors Wed Mar 4 11:32:31 2020 (r358612) @@ -2,8 +2,8 @@ # List of PCI ID's # -# Version: 2019.01.29 -# Date: 2019-01-29 03:15:01 +# Version: 2020.02.22 +# Date: 2020-02-22 03:15:04 # # Maintained by Albert Pool, Martin Mares, and other volunteers from # the PCI ID Project at https://pci-ids.ucw.cz/. @@ -14,6 +14,10 @@ # This file can be distributed under either the GNU General Public License # (version 2 or higher) or the 3-clause BSD License. # +# The database is a compilation of factual data, and as such the copyright +# only covers the aggregation and formatting. The copyright is held by +# Martin Mares and Albert Pool. +# # Vendors, devices and subsystems. Please keep sorted. @@ -64,6 +68,7 @@ # 018a is not LevelOne but there is a board misprogrammed 018a LevelOne 0106 FPC-0106TX misprogrammed [RTL81xx] +01de Oxide Computer Company # 021b is not Compaq but there is a board misprogrammed 021b Compaq Computer Corporation 8139 HNE-300 (RealTek RTL8139c) [iPaq Networking] @@ -92,6 +97,7 @@ 6663 Butane II (MPEG2 encoder board) 6666 MediaPress (MPEG2 encoder board) 07d1 D-Link System Inc +0824 T1042 [Freescale] 0925 VIA Technologies, Inc. (Wrong ID) 0a89 BREA Technologies Inc 0b0b Rhino Equipment Corp. @@ -220,8 +226,7 @@ 0eac SHF Communication Technologies AG 0008 Ethernet Powerlink Managing Node 01 0f62 Acrox Technologies Co., Ltd. -# Formerly NCR -1000 LSI Logic / Symbios Logic +1000 Broadcom / LSI 0001 53c810 1000 1000 LSI53C810AE PCI to SCSI I/O Processor 0002 53c820 @@ -266,7 +271,10 @@ 0013 53c875a 1000 1000 LSI53C875A PCI to Ultra SCSI Controller 0014 MegaRAID Tri-Mode SAS3516 + 1028 1f3a PERC H745 Adapter + 1028 1f3b PERC H745 Front 1028 1fd4 PERC H745P MX + 1137 020e UCSC-RAID-M5 12G Modular RAID Controller 1d49 0602 ThinkSystem RAID 930-16i 4GB Flash PCIe 12Gb Adapter 1d49 0604 ThinkSystem RAID 930-8e 4GB Flash PCIe 12Gb Adapter 1d49 0607 ThinkSystem RAID 930-16i 8GB Flash PCIe 12Gb Adapter @@ -274,6 +282,8 @@ 8086 9460 RAID Controller RSP3TD160F 8086 9480 RAID Controller RSP3MD088F 0015 MegaRAID Tri-Mode SAS3416 + 1028 1f3c PERC H345 Adapter + 1028 1f3d PERC H345 Front 1d49 0503 ThinkSystem RAID 530-16i PCIe 12Gb Adapter 0016 MegaRAID Tri-Mode SAS3508 1028 1fc9 PERC H840 Adapter @@ -401,7 +411,7 @@ 8086 3510 RMS25PB080 RAID Controller 8086 3511 RMS25PB040 RAID Controller 8086 3512 RMT3PB080 RAID Controller - 8086 3513 RMS25CB080 RAID Controller + 8086 3513 Integrated RAID Module RMS25CB080 8086 3514 RMS25CB040 RAID Controller 8086 351c RMS25PB080N RAID Controller 8086 351d RMS25CB080N RAID Controller @@ -428,6 +438,8 @@ 1028 1fd1 PERC H730P MX 17aa 1052 ThinkServer RAID 720i 17aa 1053 ThinkServer RAID 720ix + 1bd4 0014 6G SAS3108 2G + 1bd4 0015 6G SAS3108 4G 1d49 0600 ThinkSystem RAID 730-8i 1GB Cache PCIe 12Gb Adapter 1d49 0608 ThinkSystem RAID 730-8i 2GB Flash PCIe 12Gb Adapter 1d49 0609 ThinkSystem RAID 730-8i 4GB Flash PCIe 12Gb Adapter @@ -480,14 +492,18 @@ 0062 SAS1078 PCI-Express Fusion-MPT SAS 1000 0062 SAS1078 PCI-Express Fusion-MPT SAS 0064 SAS2116 PCI-Express Fusion-MPT SAS-2 [Meteor] + 1000 3030 9200-16e 6Gb/s SAS/SATA PCIe x8 External HBA 1000 30c0 SAS 9201-16i + 1000 30d0 9201-16e 6Gb/s SAS/SATA PCIe x8 External HBA 0065 SAS2116 PCI-Express Fusion-MPT SAS-2 [Meteor] 006e SAS2308 PCI-Express Fusion-MPT SAS-2 0070 SAS2004 PCI-Express Fusion-MPT SAS-2 [Spitfire] 1000 3010 SAS9211-4i + 1014 040e ServeRAID H1110 0071 MR SAS HBA 2004 0072 SAS2008 PCI-Express Fusion-MPT SAS-2 [Falcon] 1000 3040 9210-8i + 1000 3080 9200-8e [LSI SAS 6Gb/s SAS/SATA PCIe x8 External HBA] 1000 30b0 9200-8e [LSI SAS 6Gb/s SAS/SATA PCIe x8 External HBA] 1028 1f1c 6Gbps SAS HBA Adapter 1028 1f1d PERC H200 Adapter @@ -495,6 +511,12 @@ 1028 1f1f PERC H200 Modular 1028 1f20 PERC H200 Embedded 1028 1f22 PERC H200 Internal Tape Adapter +# Fujitsu D2607 SAS2008 HBA controller + 1734 1177 HBA Ctrl SAS 6G 0/1 [D2607] + 1bd4 000d 6G SAS2008IT + 1bd4 000e 6G SAS2008IR + 1bd4 000f 6G SAS2008IT SA5248 + 1bd4 0010 6G SAS2008IR SA5248 8086 350f RMS2LL040 RAID Controller 8086 3700 SSD 910 Series 0073 MegaRAID SAS 2008 [Falcon] @@ -502,6 +524,7 @@ 1000 9241 MegaRAID SAS 9240-4i 1000 92a0 MegaRAID SAS 9220-8i 1014 03b1 ServeRAID M1015 SAS/SATA Controller + 1014 040d ServeRAID M1115 SAS/SATA Controller 1028 1f4e PERC H310 Adapter 1028 1f4f PERC H310 Integrated 1028 1f50 PERC H310 Mini Blades @@ -594,10 +617,16 @@ 15d9 0691 Onboard SAS2308 PCI-Express Fusion-MPT SAS-2 0087 SAS2308 PCI-Express Fusion-MPT SAS-2 1000 3020 9207-8i SAS2.1 HBA + 1000 3030 SAS9207-4i4e 1000 3040 9207-8e SAS2.1 HBA 1000 3050 SAS9217-8i + 1000 3060 SAS9217-4i4e 1014 0472 N2125 External Host Bus Adapter + 1590 0041 H220i + 1590 0042 H221 / 9207-8e 1590 0044 H220i + 1bd4 0009 6G SAS2308IR + 1bd4 000a 6G SAS2308IT 8086 3000 RS25GB008 RAID Controller 8086 3060 RS25FB044 RAID Controller 8086 3516 RMS25JB080 RAID Controller @@ -624,10 +653,26 @@ 1028 1f53 HBA330 Mini 1028 1fd2 HBA330 MX 1028 1fd3 HBA330 MMZ +# Supermicro AOC-S3008L-L8e uses 0808 for their SAS3008 SAS controller + 15d9 0808 AOC-S3008L-L8e + 1bd4 000b 12G SAS3008IR + 1bd4 000c 12G SAS3008IT 1bd4 0011 Inspur 12Gb 8i-3008 IT SAS HBA + 1bd4 0012 12Gb SAS3008IR UDM + 1bd4 0026 12G SAS3008IT RACK + 1bd4 0027 12G SAS3008IMR RACK + 1bd4 0028 12G SAS3008IR RACK 00ab SAS3516 Fusion-MPT Tri-Mode RAID On Chip (ROC) +# 8 Internal and 8 External port channel 9400 HBA + 1000 3040 HBA 9400-8i8e 8086 3530 Integrated RAID Module RMSP3JD160J 00ac SAS3416 Fusion-MPT Tri-Mode I/O Controller Chip (IOC) +# Channel 16 internal port HBA + 1000 3000 HBA 9400-16i +# Channel 16 external port HBA + 1000 3020 HBA 9400-16e + 1028 1fe3 HBA345 Adapter + 1028 1fe4 HBA345 Front 1d49 0201 ThinkSystem 430-16i SAS/SATA 12Gb HBA 1d49 0203 ThinkSystem 430-16e SAS/SATA 12Gb HBA 8086 3000 RAID Controller RSP3QD160J @@ -635,6 +680,8 @@ 00ae SAS3508 Fusion-MPT Tri-Mode RAID On Chip (ROC) 00af SAS3408 Fusion-MPT Tri-Mode I/O Controller Chip (IOC) 1000 3010 HBA 9400-8i +# 9400 Channel 8 external port HBA + 1000 3030 HBA 9400-8e 1d49 0200 ThinkSystem 430-8i SAS/SATA 12Gb HBA 1d49 0202 ThinkSystem 430-8e SAS/SATA 12Gb HBA 1d49 0204 ThinkSystem 430-8i SAS/SATA 12Gb Dense HBA @@ -656,16 +703,57 @@ 00cf MegaRAID SAS-3 3324 [Intruder] 1000 9370 MegaRAID SAS 9361-24i 00d0 SAS3716 Fusion-MPT Tri-Mode RAID Controller Chip (ROC) +# 9405W 16 internal port channel HBA + 1000 3050 HBA 9405W-16i +# 9405W 8 internal and 8 external port channel HBA + 1000 3070 HBA 9405W-8i8e 00d1 SAS3616 Fusion-MPT Tri-Mode I/O Controller Chip (IOC) +# 9405W 16 external port Channel HBA + 1000 3080 HBA 9405W-16e +# 9405W 16 internal port Channel HBA + 1000 3090 HBA 9405W-16i 00d3 MegaRAID Tri-Mode SAS3716W 00e0 Fusion-MPT 12GSAS/PCIe Unsupported SAS39xx 00e1 Fusion-MPT 12GSAS/PCIe SAS39xx 00e2 Fusion-MPT 12GSAS/PCIe Secure SAS39xx 00e3 Fusion-MPT 12GSAS/PCIe Unsupported SAS39xx 00e4 Fusion-MPT 12GSAS/PCIe Unsupported SAS38xx +# Invalid part + 1028 200b HBA355i Adapter Invalid +# Invalid part + 1028 200c HBA355i Front Invalid +# Invalid part + 1028 200d HBA355e Adapter Invalid +# Invalid part + 1028 200e HBA350i MX Invalid +# Soft Secure 00e5 Fusion-MPT 12GSAS/PCIe SAS38xx +# Soft Secure + 1028 200b HBA355i Adapter +# Soft Secure + 1028 200c HBA355i Front +# Soft Secure + 1028 200d HBA355e Adapter +# Soft Secure + 1028 200e HBA350i MX + 1d49 0205 ThinkSystem 440-16i SAS/SATA PCIe Gen4 12Gb Internal HBA + 1d49 0206 ThinkSystem 440-16e SAS/SATA PCIe Gen4 12Gb HBA 00e6 Fusion-MPT 12GSAS/PCIe Secure SAS38xx + 1028 200b HBA355i Adapter + 1028 200c HBA355i Front + 1028 200d HBA355e Adapter + 1028 200e HBA355i MX + 1d49 0205 ThinkSystem 440-16i SAS/SATA PCIe Gen4 12Gb Internal HBA + 1d49 0206 ThinkSystem 440-16e SAS/SATA PCIe Gen4 12Gb HBA 00e7 Fusion-MPT 12GSAS/PCIe Unsupported SAS38xx +# Tampered part + 1028 200b HBA355i Adapter Tampered +# Tampered part + 1028 200c HBA355i Front Tampered +# Tampered part + 1028 200d HBA355e Adapter Tampered +# Tampered part + 1028 200e HBA350i MX Tampered 02b0 Virtual Endpoint on PCIe Switch 1d49 0001 ThinkSystem 1610-4P NVMe Switch Adapter 1d49 0002 ThinkSystem 810-4P NVMe Switch Adapter @@ -742,9 +830,37 @@ 0901 61C102 1000 63C815 10e0 MegaRAID 12GSAS/PCIe Unsupported SAS39xx + 1028 1ae0 PERC H755 Adapter - Invalid Device + 1028 1ae1 PERC H755 Front - Invalid Device + 1028 1ae2 PERC H755N Front - Invalid Device + 1028 1ae3 PERC H755 MX - Invalid Device 10e1 MegaRAID 12GSAS/PCIe SAS39xx + 1028 1ae0 PERC H755 Adapter + 1028 1ae1 PERC H755 Front + 1028 1ae2 PERC H755N Front + 1028 1ae3 PERC H755 MX + 1d49 060a ThinkSystem RAID 940-8i 4GB Flash PCIe Gen4 12Gb Adapter + 1d49 060b ThinkSystem RAID 940-8i 8GB Flash PCIe Gen4 12Gb Adapter + 1d49 060c ThinkSystem RAID 940-16i 8GB Flash PCIe Gen4 12Gb Adapter + 1d49 060d ThinkSystem RAID 940-16i 8GB Flash PCIe Gen4 12Gb Internal Adapter + 1d49 060e ThinkSystem RAID 940-32i 8GB Flash PCIe Gen4 12Gb Adapter + 1d49 060f ThinkSystem RAID 940-8e 4GB Flash PCIe Gen4 12Gb Adapter 10e2 MegaRAID 12GSAS/PCIe Secure SAS39xx + 1028 1ae0 PERC H755 Adapter + 1028 1ae1 PERC H755 Front + 1028 1ae2 PERC H755N Front + 1028 1ae3 PERC H755 MX + 1d49 060a ThinkSystem RAID 940-8i 4GB Flash PCIe Gen4 12Gb Adapter + 1d49 060b ThinkSystem RAID 940-8i 8GB Flash PCIe Gen4 12Gb Adapter + 1d49 060c ThinkSystem RAID 940-16i 8GB Flash PCIe Gen4 12Gb Adapter + 1d49 060d ThinkSystem RAID 940-16i 8GB Flash PCIe Gen4 12Gb Internal Adapter + 1d49 060e ThinkSystem RAID 940-32i 8GB Flash PCIe Gen4 12Gb Adapter + 1d49 060f ThinkSystem RAID 940-8e 4GB Flash PCIe Gen4 12Gb Adapter 10e3 MegaRAID 12GSAS/PCIe Unsupported SAS39xx + 1028 1ae0 PERC H755 Adapter - Tampered Device + 1028 1ae1 PERC H755 Front - Tampered Device + 1028 1ae2 PERC H755N Front - Tampered Device + 1028 1ae3 PERC H755 MX - Tampered Device 10e4 MegaRAID 12GSAS/PCIe Unsupported SAS38xx 10e5 MegaRAID 12GSAS/PCIe SAS38xx 10e6 MegaRAID 12GSAS/PCIe Secure SAS38xx @@ -781,7 +897,9 @@ 1306 Kaveri 1307 Kaveri 1308 Kaveri HDMI/DP Audio Controller + 17aa 3988 Z50-75 1309 Kaveri [Radeon R6/R7 Graphics] + 17aa 3830 Z50-75 130a Kaveri [Radeon R6 Graphics] 130b Kaveri [Radeon R4 Graphics] 130c Kaveri [Radeon R7 Graphics] @@ -802,16 +920,22 @@ 131c Kaveri [Radeon R7 Graphics] 131d Kaveri [Radeon R6 Graphics] 13e9 Ariel + 1478 Navi 10 XL Upstream Port of PCI Express Switch + 1479 Navi 10 XL Downstream Port of PCI Express Switch 154c Kryptos 154e Garfield 1551 Arlene 1552 Pooky 1561 Anubis 15d8 Picasso + 103c 8615 Pavilion Laptop 15-cw1xxx 15dd Raven Ridge [Radeon Vega Series / Radeon Vega Mobile Series] 103c 83c6 Radeon Vega 8 Mobile 1458 d000 Radeon RX Vega 11 - 15de Raven Ridge HDMI/DP Audio Controller + 15de Raven/Raven2/Fenghuang HDMI/DP Audio Controller + 103c 8615 Pavilion Laptop 15-cw1xxx + 15df Raven/Raven2/Fenghuang/Renoir Cryptographic Coprocessor + 103c 8615 Pavilion Laptop 15-cw1xxx 15ff Fenghuang [Zhongshan Subor Z+] 1607 Arden 1636 Renoir @@ -986,7 +1110,7 @@ 4382 SB600 AC97 Audio 4383 SBx00 Azalia (Intel HDA) 1019 2120 A785GM-M - 103c 1611 Pavilion DM1Z-3000 + 103c 1611 Pavilion dm1z-3000 103c 280a DC5750 Microtower 1043 8230 M3A78-EH Motherboard 1043 836c M4A785TD Motherboard @@ -1060,6 +1184,7 @@ 1458 b002 GA-MA770-DS3rev2.0 Motherboard 1849 4390 Motherboard (one of many) 4391 SB7x0/SB8x0/SB9x0 SATA Controller [AHCI mode] + 103c 1609 ProLiant MicroServer N36L 103c 1611 Pavilion DM1Z-3000 1043 82ef M3A78-EH Motherboard 1043 8443 M5A88-V EVO @@ -1073,6 +1198,7 @@ 4395 SB8x0/SB9x0 SATA Controller [Storage mode] 4396 SB7x0/SB8x0/SB9x0 USB EHCI Controller 1019 2120 A785GM-M + 103c 1609 ProLiant MicroServer N36L 103c 1611 Pavilion DM1Z-3000 1043 82ef M3A78-EH Motherboard 1043 8443 M5A88-V EVO @@ -1081,6 +1207,7 @@ 174b 1001 PURE Fusion Mini 4397 SB7x0/SB8x0/SB9x0 USB OHCI0 Controller 1019 2120 A785GM-M + 103c 1609 ProLiant MicroServer N36L 103c 1611 Pavilion DM1Z-3000 1043 82ef M3A78-EH Motherboard 1043 8443 M5A88-V EVO @@ -1101,10 +1228,12 @@ 439c SB7x0/SB8x0/SB9x0 IDE Controller 1002 4392 MSI MS-7713 motherboard 1019 2120 A785GM-M + 103c 1609 ProLiant MicroServer N36L 1043 82ef M3A78-EH Motherboard 105b 0e13 N15235/A74MX mainboard / AMD SB700 439d SB7x0/SB8x0/SB9x0 LPC host controller 1019 2120 A785GM-M + 103c 1609 ProLiant MicroServer N36L 103c 1611 Pavilion DM1Z-3000 1043 82ef M3A78-EH Motherboard 1043 8443 M5A88-V EVO @@ -1214,6 +1343,44 @@ 4857 Xilleon 225 USB for X225 4858 Xilleon 225 DAIO-0 for X225 4859 Xilleon 225 DAIO-1 for X225 + 4860 Xilleon 210 HBIU for X210 + 4861 Xilleon 210 IDE for X210 + 4862 Xilleon 210 USB for X210 + 4863 Xilleon 210 DAIO-0 for X210 + 4864 Xilleon 210 DAIO-1 for X210 + 4865 Xilleon 226 HBIU for X226 + 4866 Xilleon 226 IDE for X226 + 4867 Xilleon 226 USB for X226 + 4868 Xilleon 226 DAIO-0 for X226 + 4869 Xilleon 226 DAIO-1 for X226 + 486a Xilleon 240S HBIU for X240S + 486b Xilleon 240H HBIU for X240H + 486c Xilleon 240S USB for X240S + 486d Xilleon 240H USB for X240H + 486e Xilleon 250 USB 1.1 for X250 + 486f Xilleon 260 USB 1.1 for X260 + 4870 Xilleon 250 HBIU for X250 + 4871 Xilleon 250 IDE for X250 + 4872 Xilleon 234/235 HBIU for X234/X235 + 4873 Xilleon 244/245 HBIU for X244/X245 + 4874 Xilleon 234/235 USB 1.1 for X234/X235 + 4875 Xilleon 260 HBIU for X260 + 4876 Xilleon 260 IDE for X260 + 4877 Xilleon 244/245 USB 1.1 for X244/X245 + 4878 Xilleon 270 HBIU for X270 + 487b Xilleon 242 HBIU for X242 + 487d Xilleon 242 USB 1.1 for X242 + 4880 Xilleon 254 HBIU for X254 + 4881 Xilleon 254 USB 1.1 for X254 + 4882 Xilleon 255 HBIU for X255 + 4883 Xilleon 255 USB 1.1 for X255 + 4884 Xilleon 243 HBIU for X243 + 4885 Xilleon 243 USB 1.1 for X243 + 4886 Xilleon 233 HBIU for X233 + 4887 Xilleon 233 USB 1.1 for X233 + 4888 Xilleon 143 HBIU for X143 + 4889 Xilleon 143 HBIU for X143L + 488a Xilleon 143 HBIU for X143S 4966 RV250 [Radeon 9000 Series] 10f1 0002 RV250 If [Tachyon G9000 PRO] 148c 2039 RV250 If [Radeon 9000 Pro "Evil Commando"] @@ -1443,9 +1610,9 @@ 1002 0028 Rage 128 AIW 1002 0029 Rage 128 AIW 1002 0068 Rage 128 AIW - 5246 Rage 4 [Rage Fury/Xpert 128/Xpert 2000 AGP] + 5246 Rage 128 (Rage 4) series 1002 0004 Magnum/Xpert 128/Xpert 99 - 1002 0008 Magnum/Xpert128/X99/Xpert2000 + 1002 0008 Rage 128 AGP 2x 1002 0028 Rage 128 AIW AGP 1002 0044 Rage Fury/Xpert 128/Xpert 2000 1002 0068 Rage 128 AIW AGP @@ -1688,8 +1855,6 @@ 103c 1952 ProBook 455 G1 6601 Mars [Radeon HD 8730M] 103c 2100 FirePro M4100 - 6602 Mars - 6603 Mars 6604 Opal XT [Radeon R7 M265/M365X/M465] 1025 0776 Aspire V5 Radeon R7 M265 103c 8006 FirePro M4170 @@ -1715,6 +1880,7 @@ 1642 3f09 Radeon R7 350 6611 Oland [Radeon HD 8570 / R7 240/340 OEM] 1028 210b Radeon R5 240 OEM + 1642 1869 AMD Radeon 520 174b 4248 Radeon R7 240 OEM 174b a240 Radeon R7 240 OEM 174b d340 Radeon R7 340 OEM @@ -1722,9 +1888,6 @@ 6613 Oland PRO [Radeon R7 240/340] 148c 7340 Radeon R7 340 1682 7240 R7 240 2048 MB - 6620 Mars - 6621 Mars PRO - 6623 Mars 6631 Oland 6640 Saturn XT [FirePro M6100] 106b 014b Tropo XT [Radeon R9 M380 Mac Edition] @@ -1783,7 +1946,7 @@ 17aa 3805 Radeon HD 8570M 6664 Jet XT [Radeon R5 M240] 6665 Jet PRO [Radeon R5 M230 / R7 M260DX / Radeon 520 Mobile] - 17aa 1309 Radeon R7 M260DX + 17aa 1309 Z50-75 Radeon R7 M260DX 17aa 368f Radeon R5 A230 6667 Jet ULT [Radeon R5 M230] 666f Sun LE [Radeon HD 8550M / R5 M230] @@ -2412,18 +2575,22 @@ 1462 3413 Radeon RX 480 Gaming X 8GB 1462 3416 Radeon RX 570 1462 3418 Radeon RX 580 Armor 4G OC - 148c 2372 Radeon RX 480 + 1462 341e Radeon RX 570 Armor 4G OC + 1462 8a92 Radeon RX 580 + 148c 2372 Radeon RX 480 [Red Dragon] 148c 2373 Radeon RX 470 1682 9470 Radeon RX 470 1682 9480 Radeon RX 480 1682 9588 Radeon RX 580 XTR + 1682 c570 Radeon RX 570 174b e347 Radeon RX 470/480 174b e349 Radeon RX 470 1787 a470 Radeon RX 470 1787 a480 Radeon RX 480 1849 5001 Phantom Gaming X RX 580 OC + 1849 5030 Phantom Gaming D Radeon RX580 8G OC 1da2 e353 Radeon RX 570 Pulse 4GB - 1da2 e366 Nitro+ Radeon RX 570/580 + 1da2 e366 Nitro+ Radeon RX 570/580/590 67e0 Baffin [Radeon Pro WX 4170] 103c 8270 Radeon Pro WX 4170 103c 8272 Radeon Pro WX 4170 @@ -2441,6 +2608,8 @@ 67e9 Baffin [Polaris11] 67eb Baffin [Radeon Pro V5300X] 67ef Baffin [Radeon RX 460/560D / Pro 450/455/460/555/555X/560/560X] + 1028 1703 RX 560D OEM OC 2 GB + 103c 3421 Radeon RX 460 106b 0160 Radeon Pro 460 106b 0166 Radeon Pro 455 106b 0167 Radeon Pro 450 @@ -2456,6 +2625,7 @@ 1028 1726 Radeon RX 560DX 103c 8479 Radeon RX 560X Mobile 1043 04bc Radeon RX 560 + 1043 052f Radeon RX 560 1458 22ed Radeon RX 560 148c 2381 Radeon RX 560 1682 9560 Radeon RX 560 @@ -2679,6 +2849,8 @@ 6868 Vega 10 [Radeon PRO WX 8100/8200] 686c Vega 10 [Radeon Instinct MI25 MxGPU] 687f Vega 10 XL/XT [Radeon RX Vega 56/64] + 1002 0b36 RX Vega64 + 1002 6b76 RX Vega56 6880 Lexington [Radeon HD 6550M] 103c 163c Pavilion dv6 Radeon HD 6550M 6888 Cypress XT [FirePro V8800] @@ -3146,12 +3318,13 @@ 174b e180 Radeon HD 7350 17af 3015 Radeon HD 7350 68fe Cedar LE - 6900 Topaz XT [Radeon R7 M260/M265 / M340/M360 / M440/M445] + 6900 Topaz XT [Radeon R7 M260/M265 / M340/M360 / M440/M445 / 530/535 / 620/625 Mobile] 1025 1056 Radeon R7 M360 / R8 M365DX 1028 0640 Radeon R7 M260/M265 1028 0643 Radeon R7 M260/M265 1028 067f Radeon R7 M260 1028 0767 Radeon R7 M445 + 1028 0810 Radeon 530 1028 130a Radeon R7 M260 103c 2263 Radeon R7 M260 103c 2269 Radeon R7 M260 @@ -3198,12 +3371,12 @@ 694e Polaris 22 XL [Radeon RX Vega M GL] 694f Polaris 22 MGL XL [Radeon Pro WX Vega M GL] 6980 Polaris12 - 6981 Polaris12 + 6981 Lexa XT [Radeon PRO WX 3200] 6985 Lexa XT [Radeon PRO WX 3100] 6986 Polaris12 - 6987 Lexa [Radeon E9171 MCM] + 6987 Lexa [Radeon 540X/550X/630 / RX 640 / E9171 MCM] 6995 Lexa XT [Radeon PRO WX 2100] - 699f Lexa PRO [Radeon RX 550/550X] + 699f Lexa PRO [Radeon 540/540X/550/550X / RX 540X/550/550X] 1028 1720 Radeon RX 550X 148c 2380 Lexa XL [Radeon RX 550] 1da2 e367 Lexa PRO [Radeon RX 550] @@ -3356,7 +3529,12 @@ 1043 04a0 Radeon R9 FURY X 174b e329 Radeon R9 FURY 7310 Navi 10 - 731f Navi 10 + 7312 Navi 10 [Radeon Pro W5700] + 731f Navi 10 [Radeon RX 5600 OEM/5600 XT / 5700/5700 XT] + 7340 Navi 14 [Radeon RX 5500/5500M / Pro 5500M] + 7341 Navi 14 [Radeon Pro W5500] + 7347 Navi 14 [Radeon Pro W5500M] + 734f Navi 14 [Radeon Pro W5300M] 7833 RS350 Host Bridge 7834 RS350 [Radeon 9100 PRO/XT IGP] 7835 RS350M [Mobility Radeon 9000 IGP] @@ -3570,16 +3748,16 @@ 9613 RS780MC [Mobility Radeon HD 3100] 9614 RS780D [Radeon HD 3300] 9616 RS780L [Radeon 3000] - 9640 BeaverCreek [Radeon HD 6550D] - 9641 BeaverCreek [Radeon HD 6620G] - 9642 Sumo [Radeon HD 6370D] - 9643 Sumo [Radeon HD 6380G] - 9644 Sumo [Radeon HD 6410D] - 9645 Sumo [Radeon HD 6410D] - 9647 BeaverCreek [Radeon HD 6520G] + 9640 Sumo [Radeon HD 6550D] + 9641 Sumo [Radeon HD 6620G] + 9642 SuperSumo [Radeon HD 6370D] + 9643 SuperSumo [Radeon HD 6380G] + 9644 SuperSumo [Radeon HD 6410D] + 9645 SuperSumo [Radeon HD 6410D] + 9647 Sumo [Radeon HD 6520G] 9648 Sumo [Radeon HD 6480G] - 9649 Sumo [Radeon HD 6480G] - 964a BeaverCreek [Radeon HD 6530D] + 9649 SuperSumo [Radeon HD 6480G] + 964a Sumo [Radeon HD 6530D] 964b Sumo 964c Sumo 964e Sumo @@ -3592,6 +3770,7 @@ 1019 2120 A785GM-M 1043 83a2 M4A785TD Motherboard 9712 RS880M [Mobility Radeon HD 4225/4250] + 103c 1609 ProLiant MicroServer N36L 9713 RS880M [Mobility Radeon HD 4100] 9714 RS880 [Radeon HD 4290] 9715 RS880 [Radeon HD 4250] @@ -3610,6 +3789,7 @@ 9830 Kabini [Radeon HD 8400 / R3 Series] 9831 Kabini [Radeon HD 8400E] 9832 Kabini [Radeon HD 8330] + 1849 9832 QC5000-ITX/PH 9833 Kabini [Radeon HD 8330E] 9834 Kabini [Radeon HD 8210] 9835 Kabini [Radeon HD 8310E] @@ -3619,6 +3799,7 @@ 9839 Kabini [Radeon HD 8180] 983d Temash [Radeon HD 8250/8280G] 9840 Kabini HDMI/DP Audio + 1849 9840 QC5000-ITX/PH 9850 Mullins [Radeon R3 Graphics] 9851 Mullins [Radeon R4/R5 Graphics] 1179 f928 Beema [Radeon R5 Graphics] @@ -3682,9 +3863,10 @@ 991e Bishop 9920 Liverpool [Playstation 4 APU] 9921 Liverpool HDMI/DP Audio Controller - 9922 Starship + 9922 Starshp 9923 Starsha2 [Kingston/Clayton] 9924 Gladius + 9925 Kingston/Clayton/Jupiter/Gladius/Montego HDMI Controller 9926 Jupiter 9990 Trinity 2 [Radeon HD 7520G] 9991 Trinity 2 [Radeon HD 7540D] @@ -3698,7 +3880,7 @@ 9999 Richland [Radeon HD 8510G] 999a Richland [Radeon HD 8410G] 999b Richland [Radeon HD 8310G] - 999c Richland + 999c Richland [Radeon HD 8650D] # AMD Quad-Core A8-Series APU A8-6500T with Radeon HD 8550D 999d Richland [Radeon HD 8550D] 99a0 Trinity 2 [Radeon HD 7520G] @@ -3732,7 +3914,8 @@ aa98 Caicos HDMI Audio [Radeon HD 6450 / 7450/8450/8490 OEM / R5 230/235/235X OEM] 174b aa98 Radeon HD 6450 1GB DDR3 aaa0 Tahiti HDMI Audio [Radeon HD 7870 XT / 7950/7970] - aab0 Cape Verde/Pitcairn HDMI Audio [Radeon HD 7700/7800 Series] + aab0 Oland/Hainan/Cape Verde/Pitcairn HDMI Audio [Radeon HD 7000 Series] + aab8 Tiran HDMI Audio aac0 Tobago HDMI Audio [Radeon R7 360 / R9 360 OEM] aac8 Hawaii HDMI Audio [Radeon R9 290/290X / 390/390X] aad8 Tonga HDMI Audio [Radeon R9 285/380] @@ -4274,6 +4457,35 @@ 1302 Family 11h Processor DRAM Controller 1303 Family 11h Processor Miscellaneous Control 1304 Family 11h Processor Link Control + 1305 Griffin Function 5 + 1306 Griffin Function 6 + 1307 Griffin Function 7 + 1308 Kaveri Audio Controller + 1314 Wrestler/Bheem/Ontario/Krishna Audio Controller + 13e0 Ariel Root Complex + 13e1 Ariel IOMMU + 13e2 Ariel PCIe Dummy Host Bridge + 13e3 Ariel PCIe GPP Bridge + 13e4 Ariel PCIe Dummy Host Bridge + 13e5 Ariel Internal PCIe GPP Bridge 0 to Bus A + 13e6 Ariel Internal PCIe GPP Bridge 0 to Bus B + 13e7 Ariel SMBus Controller + 13e8 Ariel LPC Bridge + 13e9 Ariel Internal GPU + 13ea Ariel HD Audio Controller + 13eb Ariel HD Audio Coprocessor + 13ec Ariel Cryptographic Coprocessor + 13ed Ariel USB 3.1 Type C: Gen2 x 1port + DP Alt Mode + 13ee Ariel USB 3.1 Type A: Gen2 x 2 ports + 13ef Ariel ZCN/MP4 + 13f0 Ariel Device 24: Function 0 + 13f1 Ariel Device 24: Function 1 + 13f2 Ariel Device 24: Function 2 + 13f3 Ariel Device 24: Function 3 + 13f4 Ariel Device 24: Function 4 + 13f5 Ariel Device 24: Function 5 + 13f6 Ariel Device 24: Function 6 + 13f7 Ariel Device 24: Function 7 1400 Family 15h (Models 10h-1fh) Processor Function 0 1401 Family 15h (Models 10h-1fh) Processor Function 1 1402 Family 15h (Models 10h-1fh) Processor Function 2 @@ -4301,26 +4513,51 @@ 1422 Family 15h (Models 30h-3fh) Processor Root Complex 1423 Family 15h (Models 30h-3fh) I/O Memory Management Unit 1424 Family 15h (Models 30h-3fh) Processor Root Port + 1425 Kaveri P2P Bridge for GFX PCIe Port [1:0] 1426 Family 15h (Models 30h-3fh) Processor Root Port - 142e Liverpool Processor Function 0 - 142f Liverpool Processor Function 1 - 1430 Liverpool Processor Function 2 - 1431 Liverpool Processor Function 3 - 1432 Liverpool Processor Function 4 + 142e Liverpool Processor HT configuration + 142f Liverpool Processor Address Maps + 1430 Liverpool Processor DRAM configuration + 1431 Liverpool Processor Misc configuration + 1432 Liverpool Processor PM configuration + 1433 Liverpool Processor NB Performance Monitor + 1434 Liverpool Processor SPLL Configuration 1436 Liverpool Processor Root Complex 1437 Liverpool I/O Memory Management Unit - 1438 Liverpool Processor Root Port + 1438 Liverpool UMI PCIe Dummy Host Bridge 1439 Family 16h Processor Functions 5:1 + 143a Kingston/Clayton/Gladius/Montego Root Complex + 143b Kingston/Clayton/Gladius/Montego P2P Bridge for UMI Link + 1440 Matisse Device 24: Function 0 + 1441 Matisse Device 24: Function 1 + 1442 Matisse Device 24: Function 2 + 1443 Matisse Device 24: Function 3 + 1444 Matisse Device 24: Function 4 + 1445 Matisse Device 24: Function 5 + 1446 Matisse Device 24: Function 6 + 1447 Matisse Device 24: Function 7 + 1448 Renoir Device 24: Function 0 + 1449 Renoir Device 24: Function 1 + 144a Renoir Device 24: Function 2 + 144b Renoir Device 24: Function 3 + 144c Renoir Device 24: Function 4 + 144d Renoir Device 24: Function 5 + 144e Renoir Device 24: Function 6 + 144f Renoir Device 24: Function 7 1450 Family 17h (Models 00h-0fh) Root Complex 1451 Family 17h (Models 00h-0fh) I/O Memory Management Unit 1452 Family 17h (Models 00h-1fh) PCIe Dummy Host Bridge 1453 Family 17h (Models 00h-0fh) PCIe GPP Bridge 1454 Family 17h (Models 00h-0fh) Internal PCIe GPP Bridge 0 to Bus B + 1455 Zeppelin/Renoir PCIe Dummy Function 1456 Family 17h (Models 00h-0fh) Platform Security Processor 1457 Family 17h (Models 00h-0fh) HD Audio Controller + 145a Zeppelin/Raven/Raven2 PCIe Dummy Function 145b Zeppelin Non-Transparent Bridge 145c Family 17h (Models 00h-0fh) USB 3.0 Host Controller - 145f USB 3.0 Host controller + 145d Zeppelin Switch Upstream (PCIE SW.US) + 145e Zeppelin Switch Downstream (PCIE SW.DS) + 145f Zeppelin USB 3.0 Host controller 1460 Family 17h (Models 00h-0fh) Data Fabric: Device 18h; Function 0 1461 Family 17h (Models 00h-0fh) Data Fabric: Device 18h; Function 1 1462 Family 17h (Models 00h-0fh) Data Fabric: Device 18h; Function 2 @@ -4329,6 +4566,39 @@ 1465 Family 17h (Models 00h-0fh) Data Fabric: Device 18h; Function 5 1466 Family 17h (Models 00h-0fh) Data Fabric: Device 18h; Function 6 1467 Family 17h (Models 00h-0fh) Data Fabric: Device 18h; Function 7 + 1468 Zeppelin Cryptographic Coprocessor NTBCCP + 1480 Starship/Matisse Root Complex + 1462 7c37 X570-A PRO motherboard + 1481 Starship/Matisse IOMMU + 1482 Starship/Matisse PCIe Dummy Host Bridge + 1483 Starship/Matisse GPP Bridge + 1484 Starship/Matisse Internal PCIe GPP Bridge 0 to bus[E:B] + 1485 Starship/Matisse Reserved SPP + 1486 Starship/Matisse Cryptographic Coprocessor PSPCPP + 1487 Starship/Matisse HD Audio Controller + 1462 9c37 X570-A PRO motherboard + 1488 Starship Reserved SSP + 1489 Starship Reserved SSP + 148a Starship/Matisse PCIe Dummy Function + 148b Starship/Matisse Non-Transparent Bridge + 148c Starship USB 3.0 Host Controller + 148d Starship/Matisse Switch Upstream (PCIE SW.US) + 148e Starship/Matisse Switch Downstream (PCIE SW.DS) + 148f Starship Reserved SSP + 1490 Starship Device 24; Function 0 + 1491 Starship Device 24; Function 1 + 1492 Starship Device 24; Function 2 + 1493 Starship Device 24; Function 3 + 1494 Starship Device 24; Function 4 + 1495 Starship Device 24; Function 5 + 1496 Starship Device 24; Function 6 + 1497 Starship Device 24; Function 7 + 1498 Starship/Matisse PTDMA + 1499 Starship/Matisse NVMe + 149a Starship PCIe GPP Bridge [1:0] + 149b Starship Reserved SSP + 149c Matisse USB 3.0 Host Controller + 1462 7c37 X570-A PRO motherboard 1510 Family 14h Processor Root Complex 174b 1001 PURE Fusion Mini 1512 Family 14h Processor Root Port @@ -4343,8 +4613,33 @@ 1534 Family 16h Processor Function 4 1535 Family 16h Processor Function 5 1536 Family 16h Processor Root Complex + 1849 1536 QC5000-ITX/PH + 1537 Kabini/Mullins PSP-Platform Security Processor 1538 Family 16h Processor Function 0 + 1539 Kabini P2P Bridge for PCIe Ports[4:0] + 1540 Kryptos/Cato/Garfield/Garfield+/Arlene/Pooky HT Configuration + 1541 Kryptos/Cato/Garfield/Garfield+/Arlene/Pooky Address Maps + 1542 Kryptos/Cato/Garfield/Garfield+/Arlene/Pooky DRAM Configuration + 1543 Kryptos/Cato/Garfield/Garfield+/Arlene/Pooky Miscellaneous Configuration + 1544 Kryptos/Cato/Garfield/Garfield+/Arlene/Pooky PM Configuration + 1545 Kryptos/Cato/Garfield/Garfield+/Arlene/Pooky NB Performance Monitor + 1546 Kryptos/Cato/Garfield/Garfield+/Arlene/Pooky Root Complex + 1547 Kryptos/Cato/Garfield/Garfield+/Arlene/Pooky IOMMU + 1548 Kryptos/Cato/Garfield/Garfield+/Arlene/Pooky UMI PCIe Dummy Host Bridge + 1549 Kryptos/Cato/Garfield/Garfield+ P2P Bridge for PCIe Port [3:0] + 154a Kryptos/Cato/Garfield/Garfield+/Arlene/Pooky Audio Processor + 154b Kryptos/Cato/Garfield/Garfield+/Arlene/Pooky Security Processor + 154d Kryptos/Cato/Garfield/Garfield+/Arlene/Pooky/Anubis HDMI Controller + 154f Anubis Audio Processor + 1550 Garfield+/Arlene/Pooky/Anubis SPLL Configuration + 1553 Arlene/Pooky P2P Bridge for PCIE (3:0) + 155b Anubis Root Complex + 155c Anubis IOMMU + 155d Anubis UMI PCIe Dummy Bridge + 155e Anubis P2P Bridge for PCIe Ports [4:0] + 1560 Anubis Security Processor 1566 Family 16h (Models 30h-3fh) Processor Root Complex + 1567 Mullins IOMMU 156b Family 16h (Models 30h-3fh) Host Bridge 1570 Family 15h (Models 60h-6fh) Processor Function 0 1571 Family 15h (Models 60h-6fh) Processor Function 1 @@ -4354,29 +4649,132 @@ 1575 Family 15h (Models 60h-6fh) Processor Function 5 1576 Family 15h (Models 60h-6fh) Processor Root Complex 1577 Family 15h (Models 60h-6fh) I/O Memory Management Unit + 1578 Carrizo Platform Security Processor + 1579 Carrizo Audio Processor 157a Family 15h (Models 60h-6fh) Audio Controller 157b Family 15h (Models 60h-6fh) Host Bridge 157c Family 15h (Models 60h-6fh) Processor Root Port + 157d Carrizo Audio Dummy Host Bridge + 157e Carrizo Audio Controller 1580 Family 16h (Models 30h-3fh) Processor Function 0 1581 Family 16h (Models 30h-3fh) Processor Function 1 1582 Family 16h (Models 30h-3fh) Processor Function 2 1583 Family 16h (Models 30h-3fh) Processor Function 3 1584 Family 16h (Models 30h-3fh) Processor Function 4 1585 Family 16h (Models 30h-3fh) Processor Function 5 + 1590 Amur/Nolan HT Configuration + 1591 Amur/Nolan Address Maps + 1592 Amur/Nolan DRAM Configuration + 1593 Amur/Nolan Miscellaneous Configuration + 1594 Amur/Nolan PM Configuration + 1595 Amur/Nolan NB Performance Monitor + 1596 Amur/Nolan Root Complex + 1597 Amur/Nolan IOMMU + 1598 Amur/Nolan Platform Security Processor + 1599 Amur/Nolan PCIe Dummy Host Bridge + 159d Amur Function 6: Gasket + 15b0 Stoney HT Configuration + 15b1 Stoney Address Maps + 15b2 Stoney DRAM Configuration + 15b3 Stoney Miscellaneous Configuration + 15b4 Stoney PM Configuration + 15b5 Stoney NB Performance Monitor + 15bc Stoney PCIe [GFX,GPP] Bridge [4:0] + 15be Stoney Audio Processor + 15d0 Raven/Raven2 Root Complex + 103c 8615 Pavilion Laptop 15-cw1xxx + 15d1 Raven/Raven2 IOMMU + 103c 8615 Pavilion Laptop 15-cw1xxx + 15d2 Raven/Raven2 PCIe Dummy Host Bridge + 15d3 Raven/Raven2 PCIe GPP Bridge [6:0] + 15d4 FireFlight USB 3.1 + 15d5 FireFlight USB 3.1 + 15da Raven/Raven2 PCIe Dummy Host Bridge + 15db Raven/Raven2 Internal PCIe GPP Bridge 0 to Bus A + 15dc Raven/Raven2 Internal PCIe GPP Bridge 0 to Bus B + 15de Raven/Raven2/FireFlight HD Audio Controller 15df Family 17h (Models 10h-1fh) Platform Security Processor + 15e0 Raven USB 3.1 + 103c 8615 Pavilion Laptop 15-cw1xxx + 15e1 Raven USB 3.1 + 103c 8615 Pavilion Laptop 15-cw1xxx + 15e2 Raven/Raven2/FireFlight/Renoir Audio Processor 15e3 Family 17h (Models 10h-1fh) HD Audio Controller + 103c 8615 Pavilion Laptop 15-cw1xxx + 15e4 Raven/Raven2/Renoir Sensor Fusion Hub + 15e5 Raven2 USB 3.1 + 15e6 Raven/Raven2/Renoir Non-Sensor Fusion Hub KMDF driver + 1022 15e4 Raven/Raven2/Renoir Sensor Fusion Hub + 15e8 Raven/Raven2 Device 24: Function 0 + 15e9 Raven/Raven2 Device 24: Function 1 + 15ea Raven/Raven2 Device 24: Function 2 + 15eb Raven/Raven2 Device 24: Function 3 + 15ec Raven/Raven2 Device 24: Function 4 + 15ed Raven/Raven2 Device 24: Function 5 + 15ee Raven/Raven2 Device 24: Function 6 + 15ef Raven/Raven2 Device 24: Function 7 + 15f0 FireFlight Device 24: Function 0 + 15f1 FireFlight Device 24: Function 1 + 15f2 FireFlight Device 24: Function 2 + 15f3 FireFlight Device 24: Function 3 + 15f4 FireFlight Device 24: Function 4 + 15f5 FireFlight Device 24: Function 5 + 15f6 FireFlight Device 24: Function 6 + 15f7 FireFlight Device 24: Function 7 + 15f8 FireFlight Root Complex + 15f9 FireFlight IOMMU + 15fa FireFlight PCIe Dummy Host Bridge + 15fb FireFlight PCIe GPP Bride 3:0 + 15fc FireFlight PCIe Dummy Host Bridge + 15fd FireFlight Internal PCIe GPP Bridge 0 to Bus A + 15fe FireFlight Internal PCIe GPP Bridge 0 to Bus B + 15ff FireFlight Bus A; Device 0: Function 0: Internal GPU 1600 Family 15h Processor Function 0 1601 Family 15h Processor Function 1 1602 Family 15h Processor Function 2 1603 Family 15h Processor Function 3 1604 Family 15h Processor Function 4 1605 Family 15h Processor Function 5 + 1606 Arden Security Processor + 1608 Arden Device 18h: Function 0 + 1609 Arden Device 18h: Function 1 + 160a Arden Device 18h: Function 2 + 160b Arden Device 18h: Function 3 + 160c Arden Device 18h: Function 4 + 160d Arden Device 18h: Function 5 + 160e Arden Device 18h: Function 6 + 160f Arden Device 18h: Function 7 + 1620 Anubis HT Configuration + 1621 Anubis Address Maps + 1622 Anubis DRAM Configuration + 1623 Anubis Miscellaneous Configuration + 1624 Anubis PM Configuration + 1625 Anubis NB Performance Monitor + 1626 Arden Root Complex + 1627 Arden IOMMU + 1628 Arden PCIe Dummy Host Bridge + 1629 Arden PCIe GPP Bridge + 162a Arden Internal PCIe GPP Bridge 0 to bus X + 162b Arden PCIe Non-Transparent Bridge + 1630 Renoir Root Complex + 1631 Renoir IOMMU + 1632 Renoir PCIe Dummy Host Bridge + 1633 Renoir PCIe GPP Bridge + 1634 Renoir PCIe GPP Bridge + 1635 Renoir Internal PCIe GPP Bridge to Bus + 1637 Renoir HD Audio Controller + 1639 Renoir USB 3.1 + 1641 Renoir 10GbE Controller Port 0 (XGBE0/1) + 1642 Renoir WLAN + 1643 Renoir BT + 1644 Renoir I2S 1700 Family 12h/14h Processor Function 0 1701 Family 12h/14h Processor Function 1 1702 Family 12h/14h Processor Function 2 1703 Family 12h/14h Processor Function 3 1704 Family 12h/14h Processor Function 4 1705 Family 12h Processor Root Complex + 1706 Llano P2P Bridge to external GPU 1707 Family 12h Processor Root Port 1708 Family 12h Processor Root Port 1709 Family 12h Processor Root Port @@ -4450,6 +4848,9 @@ 43c7 400 Series Chipset PCIe Port 43c8 400 Series Chipset SATA Controller 43d5 400 Series Chipset USB 3.1 XHCI Controller + 57a3 Matisse PCIe GPP Bridge + 57a4 Matisse PCIe GPP Bridge + 57ad Matisse Switch Upstream 7006 AMD-751 [Irongate] System Controller 7007 AMD-751 [Irongate] AGP Bridge 700a AMD-IGR4 AGP Host to PCI Bridge @@ -4508,6 +4909,8 @@ 7801 FCH SATA Controller [AHCI mode] 103c 168b ProBook 4535s Notebook 103c 194e ProBook 455 G1 Notebook + 17aa 3988 Z50-75 + 1849 7801 QC5000-ITX/PH 7802 FCH SATA Controller [RAID mode] 7803 FCH SATA Controller [RAID mode] 7804 FCH SATA Controller [AHCI mode] @@ -4517,37 +4920,57 @@ 7807 FCH USB OHCI Controller 103c 194e ProBook 455 G1 Notebook 103c 1985 Pavilion 17-e163sg Notebook PC + 17aa 3988 Z50-75 + 1849 7807 QC5000-ITX/PH 7808 FCH USB EHCI Controller 103c 194e ProBook 455 G1 Notebook 103c 1985 Pavilion 17-e163sg Notebook PC + 17aa 3988 Z50-75 + 1849 7808 QC5000-ITX/PH 7809 FCH USB OHCI Controller 103c 194e ProBook 455 G1 Notebook + 17aa 3988 Z50-75 + 780a Kabini/Mullins SATA Raid/AHCI Mode (DotHill driver) 780b FCH SMBus Controller 103c 194e ProBook 455 G1 Notebook 103c 1985 Pavilion 17-e163sg Notebook PC + 17aa 3988 Z50-75 + 1849 780b QC5000-ITX/PH 780c FCH IDE Controller 780d FCH Azalia Controller 103c 194e ProBook 455 G1 Notebook 103c 1985 Pavilion 17-e163sg Notebook PC 1043 8444 F2A85-M Series + 17aa 3988 Z50-75 + 1849 8892 QC5000-ITX/PH 780e FCH LPC Bridge 103c 194e ProBook 455 G1 Notebook 103c 1985 Pavilion 17-e163sg Notebook PC + 17aa 3988 Z50-75 + 1849 780e QC5000-ITX/PH 780f FCH PCI Bridge 7812 FCH USB XHCI Controller 7813 FCH SD Flash Controller 7814 FCH USB XHCI Controller 103c 194e ProBook 455 G1 Notebook 103c 1985 Pavilion 17-e163sg Notebook PC + 17aa 3988 Z50-75 + 1849 7814 QC5000-ITX/PH 7900 FCH SATA Controller [IDE mode] 7901 FCH SATA Controller [AHCI mode] + 103c 8615 Pavilion Laptop 15-cw1xxx + 1462 7c37 X570-A PRO motherboard 7902 FCH SATA Controller [RAID mode] 7903 FCH SATA Controller [RAID mode] 7904 FCH SATA Controller [AHCI mode] 7906 FCH SD Flash Controller 7908 FCH USB EHCI Controller 790b FCH SMBus Controller + 103c 8615 Pavilion Laptop 15-cw1xxx + 1462 7c37 X570-A PRO motherboard *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@freebsd.org Wed Mar 4 12:21:40 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 269DB26D638; Wed, 4 Mar 2020 12:21:40 +0000 (UTC) (envelope-from luporl@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 48XY026vmgz4P5V; Wed, 4 Mar 2020 12:21:38 +0000 (UTC) (envelope-from luporl@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id C91E21DD9A; Wed, 4 Mar 2020 12:21:38 +0000 (UTC) (envelope-from luporl@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 024CLcHd002099; Wed, 4 Mar 2020 12:21:38 GMT (envelope-from luporl@FreeBSD.org) Received: (from luporl@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 024CLcpb002035; Wed, 4 Mar 2020 12:21:38 GMT (envelope-from luporl@FreeBSD.org) Message-Id: <202003041221.024CLcpb002035@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: luporl set sender to luporl@FreeBSD.org using -f From: Leandro Lupori Date: Wed, 4 Mar 2020 12:21:38 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r358613 - head/sys/dev/aacraid X-SVN-Group: head X-SVN-Commit-Author: luporl X-SVN-Commit-Paths: head/sys/dev/aacraid X-SVN-Commit-Revision: 358613 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages 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, 04 Mar 2020 12:21:40 -0000 Author: luporl Date: Wed Mar 4 12:21:38 2020 New Revision: 358613 URL: https://svnweb.freebsd.org/changeset/base/358613 Log: [aacraid] Add missing unmap call for SYNC mode This issue was observed on a PowerPC64 machine with an Adaptec RAID Controller with PCI device ID 0x028d. After several read/write operations, the kernel was panic'ing in bus_dmamap_sync(). This was due to a missing aac_unmap_command() in the SYNC path. PR: 237463 Reviewed by: jhibbits Differential Revision: https://reviews.freebsd.org/D23668 Modified: head/sys/dev/aacraid/aacraid.c Modified: head/sys/dev/aacraid/aacraid.c ============================================================================== --- head/sys/dev/aacraid/aacraid.c Wed Mar 4 11:32:31 2020 (r358612) +++ head/sys/dev/aacraid/aacraid.c Wed Mar 4 12:21:38 2020 (r358613) @@ -903,6 +903,7 @@ aacraid_new_intr_type1(void *arg) if (mode & AAC_INT_MODE_SYNC) { if (sc->aac_sync_cm) { cm = sc->aac_sync_cm; + aac_unmap_command(cm); cm->cm_flags |= AAC_CMD_COMPLETED; /* is there a completion handler? */ if (cm->cm_complete != NULL) { From owner-svn-src-all@freebsd.org Wed Mar 4 12:22:54 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 5FAA226D815; Wed, 4 Mar 2020 12:22:54 +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 48XY1T6dDTz4QcL; Wed, 4 Mar 2020 12:22:53 +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 D12F51DF12; Wed, 4 Mar 2020 12:22:53 +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 024CMr3a005135; Wed, 4 Mar 2020 12:22:53 GMT (envelope-from tuexen@FreeBSD.org) Received: (from tuexen@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 024CMrKK005134; Wed, 4 Mar 2020 12:22:53 GMT (envelope-from tuexen@FreeBSD.org) Message-Id: <202003041222.024CMrKK005134@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: tuexen set sender to tuexen@FreeBSD.org using -f From: Michael Tuexen Date: Wed, 4 Mar 2020 12:22:53 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r358614 - head/sys/netinet X-SVN-Group: head X-SVN-Commit-Author: tuexen X-SVN-Commit-Paths: head/sys/netinet X-SVN-Commit-Revision: 358614 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages 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, 04 Mar 2020 12:22:54 -0000 Author: tuexen Date: Wed Mar 4 12:22:53 2020 New Revision: 358614 URL: https://svnweb.freebsd.org/changeset/base/358614 Log: Don't send an uninitilised traffic class in the IPv6 header, when sending a TCP segment from the TCP SYN cache (like a SYN-ACK). This fix initialises it to zero. This is correct for the ECN bits, but is does not honor the DSCP what an application might have set via the IPPROTO_IPV6 level socket options IPV6_TCLASS. That will be fixed separately. Reviewed by: Richard Scheffenegger MFC after: 3 days Sponsored by: Netflix, Inc. Differential Revision: https://reviews.freebsd.org/D23900 Modified: head/sys/netinet/tcp_syncache.c Modified: head/sys/netinet/tcp_syncache.c ============================================================================== --- head/sys/netinet/tcp_syncache.c Wed Mar 4 12:21:38 2020 (r358613) +++ head/sys/netinet/tcp_syncache.c Wed Mar 4 12:22:53 2020 (r358614) @@ -1794,7 +1794,8 @@ syncache_respond(struct syncache *sc, const struct mbu ip6->ip6_dst = sc->sc_inc.inc6_faddr; ip6->ip6_plen = htons(tlen - hlen); /* ip6_hlim is set after checksum */ - ip6->ip6_flow &= ~IPV6_FLOWLABEL_MASK; + /* Zero out traffic class and flow label. */ + ip6->ip6_flow &= ~IPV6_FLOWINFO_MASK; ip6->ip6_flow |= sc->sc_flowlabel; th = (struct tcphdr *)(ip6 + 1); From owner-svn-src-all@freebsd.org Wed Mar 4 13:58:35 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 8508C26F31A; Wed, 4 Mar 2020 13:58:35 +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 48Xb7v1D9vz4RHK; Wed, 4 Mar 2020 13:58:35 +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 1DE801EFC7; Wed, 4 Mar 2020 13:58:35 +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 024DwYnJ058741; Wed, 4 Mar 2020 13:58:34 GMT (envelope-from cy@FreeBSD.org) Received: (from cy@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 024DwYEQ058740; Wed, 4 Mar 2020 13:58:34 GMT (envelope-from cy@FreeBSD.org) Message-Id: <202003041358.024DwYEQ058740@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: cy set sender to cy@FreeBSD.org using -f From: Cy Schubert Date: Wed, 4 Mar 2020 13:58:34 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-svnadmin@freebsd.org Subject: svn commit: r358615 - svnadmin/conf X-SVN-Group: svnadmin X-SVN-Commit-Author: cy X-SVN-Commit-Paths: svnadmin/conf X-SVN-Commit-Revision: 358615 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages 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, 04 Mar 2020 13:58:35 -0000 Author: cy Date: Wed Mar 4 13:58:34 2020 New Revision: 358615 URL: https://svnweb.freebsd.org/changeset/base/358615 Log: Prepare for import of ntp-ntp-4.2.8p14. Modified: svnadmin/conf/sizelimit.conf Modified: svnadmin/conf/sizelimit.conf ============================================================================== --- svnadmin/conf/sizelimit.conf Wed Mar 4 12:22:53 2020 (r358614) +++ svnadmin/conf/sizelimit.conf Wed Mar 4 13:58:34 2020 (r358615) @@ -16,6 +16,7 @@ # First field is username, second field is the raised limit required. achim bapt +cy davidcs dim 20480000 imp From owner-svn-src-all@freebsd.org Wed Mar 4 14:01:54 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 702FB26F521; Wed, 4 Mar 2020 14:01:54 +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 48XbCk38Hjz4WVb; Wed, 4 Mar 2020 14:01:54 +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 4DC8B1F14F; Wed, 4 Mar 2020 14:01:54 +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 024E1s18063503; Wed, 4 Mar 2020 14:01:54 GMT (envelope-from cy@FreeBSD.org) Received: (from cy@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 024DxTaK058826; Wed, 4 Mar 2020 13:59:29 GMT (envelope-from cy@FreeBSD.org) Message-Id: <202003041359.024DxTaK058826@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: cy set sender to cy@FreeBSD.org using -f From: Cy Schubert Date: Wed, 4 Mar 2020 13:59:29 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r358616 - in vendor/ntp/dist: . html html/drivers include libntp libparse ntpd ntpdate ntpdc ntpq ntpsnmpd parseutil ports/winnt/vs2005 ports/winnt/vs2008/libntp ports/winnt/vs2013/libn... X-SVN-Group: vendor X-SVN-Commit-Author: cy X-SVN-Commit-Paths: in vendor/ntp/dist: . html html/drivers include libntp libparse ntpd ntpdate ntpdc ntpq ntpsnmpd parseutil ports/winnt/vs2005 ports/winnt/vs2008/libntp ports/winnt/vs2013/libntp ports/winnt/vs2015/lib... X-SVN-Commit-Revision: 358616 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages 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, 04 Mar 2020 14:01:54 -0000 Author: cy Date: Wed Mar 4 13:59:29 2020 New Revision: 358616 URL: https://svnweb.freebsd.org/changeset/base/358616 Log: Import ntp-4.2.8p14. Added: vendor/ntp/dist/include/ntp_calgps.h (contents, props changed) vendor/ntp/dist/include/ntp_psl.h (contents, props changed) vendor/ntp/dist/include/timexsup.h (contents, props changed) vendor/ntp/dist/libntp/ntp_calgps.c (contents, props changed) vendor/ntp/dist/libntp/timespecops.c (contents, props changed) vendor/ntp/dist/libntp/timexsup.c (contents, props changed) vendor/ntp/dist/ntpd/psl0.conf (contents, props changed) vendor/ntp/dist/ntpd/psl1.conf (contents, props changed) vendor/ntp/dist/ntpd/psl2.conf (contents, props changed) Modified: vendor/ntp/dist/COPYRIGHT vendor/ntp/dist/ChangeLog vendor/ntp/dist/CommitLog vendor/ntp/dist/NEWS vendor/ntp/dist/config.h.in vendor/ntp/dist/configure vendor/ntp/dist/configure.ac vendor/ntp/dist/html/accopt.html vendor/ntp/dist/html/clockopt.html vendor/ntp/dist/html/confopt.html vendor/ntp/dist/html/copyright.html vendor/ntp/dist/html/discipline.html vendor/ntp/dist/html/drivers/driver20.html vendor/ntp/dist/html/drivers/driver29.html vendor/ntp/dist/html/miscopt.html vendor/ntp/dist/include/Makefile.am vendor/ntp/dist/include/Makefile.in vendor/ntp/dist/include/ntp.h vendor/ntp/dist/include/ntp_calendar.h vendor/ntp/dist/include/ntp_config.h vendor/ntp/dist/include/ntp_control.h vendor/ntp/dist/include/ntp_fp.h vendor/ntp/dist/include/ntp_io.h vendor/ntp/dist/include/ntp_refclock.h vendor/ntp/dist/include/ntp_request.h vendor/ntp/dist/include/ntp_stdlib.h vendor/ntp/dist/include/ntp_syslog.h vendor/ntp/dist/include/ntpd.h vendor/ntp/dist/include/timespecops.h vendor/ntp/dist/libntp/Makefile.am vendor/ntp/dist/libntp/Makefile.in vendor/ntp/dist/libntp/decodenetnum.c vendor/ntp/dist/libntp/dofptoa.c vendor/ntp/dist/libntp/dolfptoa.c vendor/ntp/dist/libntp/mstolfp.c vendor/ntp/dist/libntp/msyslog.c vendor/ntp/dist/libntp/ntp_calendar.c vendor/ntp/dist/libntp/recvbuff.c vendor/ntp/dist/libntp/statestr.c vendor/ntp/dist/libntp/systime.c vendor/ntp/dist/libparse/Makefile.am vendor/ntp/dist/libparse/Makefile.in vendor/ntp/dist/libparse/clk_rawdcf.c vendor/ntp/dist/ntpd/Makefile.am vendor/ntp/dist/ntpd/Makefile.in vendor/ntp/dist/ntpd/cmd_args.c vendor/ntp/dist/ntpd/complete.conf.in vendor/ntp/dist/ntpd/invoke-ntp.conf.texi vendor/ntp/dist/ntpd/invoke-ntp.keys.texi vendor/ntp/dist/ntpd/invoke-ntpd.texi vendor/ntp/dist/ntpd/keyword-gen-utd vendor/ntp/dist/ntpd/keyword-gen.c vendor/ntp/dist/ntpd/ntp.conf.5man vendor/ntp/dist/ntpd/ntp.conf.5mdoc vendor/ntp/dist/ntpd/ntp.conf.def vendor/ntp/dist/ntpd/ntp.conf.html vendor/ntp/dist/ntpd/ntp.conf.man.in vendor/ntp/dist/ntpd/ntp.conf.mdoc.in vendor/ntp/dist/ntpd/ntp.keys.5man vendor/ntp/dist/ntpd/ntp.keys.5mdoc vendor/ntp/dist/ntpd/ntp.keys.html vendor/ntp/dist/ntpd/ntp.keys.man.in vendor/ntp/dist/ntpd/ntp.keys.mdoc.in vendor/ntp/dist/ntpd/ntp_config.c vendor/ntp/dist/ntpd/ntp_control.c vendor/ntp/dist/ntpd/ntp_io.c vendor/ntp/dist/ntpd/ntp_keyword.h vendor/ntp/dist/ntpd/ntp_leapsec.c vendor/ntp/dist/ntpd/ntp_leapsec.h vendor/ntp/dist/ntpd/ntp_loopfilter.c vendor/ntp/dist/ntpd/ntp_parser.c vendor/ntp/dist/ntpd/ntp_parser.h vendor/ntp/dist/ntpd/ntp_parser.y vendor/ntp/dist/ntpd/ntp_peer.c vendor/ntp/dist/ntpd/ntp_proto.c vendor/ntp/dist/ntpd/ntp_refclock.c vendor/ntp/dist/ntpd/ntp_request.c vendor/ntp/dist/ntpd/ntp_restrict.c vendor/ntp/dist/ntpd/ntp_scanner.c vendor/ntp/dist/ntpd/ntp_util.c vendor/ntp/dist/ntpd/ntpd-opts.c vendor/ntp/dist/ntpd/ntpd-opts.h vendor/ntp/dist/ntpd/ntpd.1ntpdman vendor/ntp/dist/ntpd/ntpd.1ntpdmdoc vendor/ntp/dist/ntpd/ntpd.c vendor/ntp/dist/ntpd/ntpd.html vendor/ntp/dist/ntpd/ntpd.man.in vendor/ntp/dist/ntpd/ntpd.mdoc.in vendor/ntp/dist/ntpd/refclock_gpsdjson.c vendor/ntp/dist/ntpd/refclock_jupiter.c vendor/ntp/dist/ntpd/refclock_nmea.c vendor/ntp/dist/ntpd/refclock_oncore.c vendor/ntp/dist/ntpd/refclock_palisade.c vendor/ntp/dist/ntpd/refclock_palisade.h vendor/ntp/dist/ntpd/refclock_parse.c vendor/ntp/dist/ntpd/refclock_zyfer.c vendor/ntp/dist/ntpdate/ntpdate.c vendor/ntp/dist/ntpdc/invoke-ntpdc.texi vendor/ntp/dist/ntpdc/layout.std vendor/ntp/dist/ntpdc/ntpdc-opts.c vendor/ntp/dist/ntpdc/ntpdc-opts.h vendor/ntp/dist/ntpdc/ntpdc.1ntpdcman vendor/ntp/dist/ntpdc/ntpdc.1ntpdcmdoc vendor/ntp/dist/ntpdc/ntpdc.c vendor/ntp/dist/ntpdc/ntpdc.html vendor/ntp/dist/ntpdc/ntpdc.man.in vendor/ntp/dist/ntpdc/ntpdc.mdoc.in vendor/ntp/dist/ntpdc/ntpdc_ops.c vendor/ntp/dist/ntpq/Makefile.am vendor/ntp/dist/ntpq/Makefile.in vendor/ntp/dist/ntpq/invoke-ntpq.texi vendor/ntp/dist/ntpq/ntpq-opts.c vendor/ntp/dist/ntpq/ntpq-opts.h vendor/ntp/dist/ntpq/ntpq-subs.c vendor/ntp/dist/ntpq/ntpq.1ntpqman vendor/ntp/dist/ntpq/ntpq.1ntpqmdoc vendor/ntp/dist/ntpq/ntpq.c vendor/ntp/dist/ntpq/ntpq.h vendor/ntp/dist/ntpq/ntpq.html vendor/ntp/dist/ntpq/ntpq.man.in vendor/ntp/dist/ntpq/ntpq.mdoc.in vendor/ntp/dist/ntpsnmpd/invoke-ntpsnmpd.texi vendor/ntp/dist/ntpsnmpd/ntpsnmpd-opts.c vendor/ntp/dist/ntpsnmpd/ntpsnmpd-opts.h vendor/ntp/dist/ntpsnmpd/ntpsnmpd.1ntpsnmpdman vendor/ntp/dist/ntpsnmpd/ntpsnmpd.1ntpsnmpdmdoc vendor/ntp/dist/ntpsnmpd/ntpsnmpd.html vendor/ntp/dist/ntpsnmpd/ntpsnmpd.man.in vendor/ntp/dist/ntpsnmpd/ntpsnmpd.mdoc.in vendor/ntp/dist/packageinfo.sh vendor/ntp/dist/parseutil/dcfd.c vendor/ntp/dist/ports/winnt/vs2005/libntp.vcproj vendor/ntp/dist/ports/winnt/vs2008/libntp/libntp.vcproj vendor/ntp/dist/ports/winnt/vs2013/libntp/libntp.vcxproj vendor/ntp/dist/ports/winnt/vs2013/libntp/libntp.vcxproj.filters vendor/ntp/dist/ports/winnt/vs2015/libntp/libntp.vcxproj vendor/ntp/dist/ports/winnt/vs2015/libntp/libntp.vcxproj.filters vendor/ntp/dist/scripts/build/mkver.in vendor/ntp/dist/scripts/calc_tickadj/calc_tickadj-opts vendor/ntp/dist/scripts/calc_tickadj/calc_tickadj.1calc_tickadjman vendor/ntp/dist/scripts/calc_tickadj/calc_tickadj.1calc_tickadjmdoc vendor/ntp/dist/scripts/calc_tickadj/calc_tickadj.html vendor/ntp/dist/scripts/calc_tickadj/calc_tickadj.man.in vendor/ntp/dist/scripts/calc_tickadj/calc_tickadj.mdoc.in vendor/ntp/dist/scripts/calc_tickadj/invoke-calc_tickadj.texi vendor/ntp/dist/scripts/invoke-plot_summary.texi vendor/ntp/dist/scripts/invoke-summary.texi vendor/ntp/dist/scripts/ntp-wait/invoke-ntp-wait.texi vendor/ntp/dist/scripts/ntp-wait/ntp-wait-opts vendor/ntp/dist/scripts/ntp-wait/ntp-wait.1ntp-waitman vendor/ntp/dist/scripts/ntp-wait/ntp-wait.1ntp-waitmdoc vendor/ntp/dist/scripts/ntp-wait/ntp-wait.html vendor/ntp/dist/scripts/ntp-wait/ntp-wait.man.in vendor/ntp/dist/scripts/ntp-wait/ntp-wait.mdoc.in vendor/ntp/dist/scripts/ntpsweep/invoke-ntpsweep.texi vendor/ntp/dist/scripts/ntpsweep/ntpsweep-opts vendor/ntp/dist/scripts/ntpsweep/ntpsweep.1ntpsweepman vendor/ntp/dist/scripts/ntpsweep/ntpsweep.1ntpsweepmdoc vendor/ntp/dist/scripts/ntpsweep/ntpsweep.html vendor/ntp/dist/scripts/ntpsweep/ntpsweep.man.in vendor/ntp/dist/scripts/ntpsweep/ntpsweep.mdoc.in vendor/ntp/dist/scripts/ntptrace/invoke-ntptrace.texi vendor/ntp/dist/scripts/ntptrace/ntptrace-opts vendor/ntp/dist/scripts/ntptrace/ntptrace.1ntptraceman vendor/ntp/dist/scripts/ntptrace/ntptrace.1ntptracemdoc vendor/ntp/dist/scripts/ntptrace/ntptrace.html vendor/ntp/dist/scripts/ntptrace/ntptrace.man.in vendor/ntp/dist/scripts/ntptrace/ntptrace.mdoc.in vendor/ntp/dist/scripts/plot_summary-opts vendor/ntp/dist/scripts/plot_summary.1plot_summaryman vendor/ntp/dist/scripts/plot_summary.1plot_summarymdoc vendor/ntp/dist/scripts/plot_summary.html vendor/ntp/dist/scripts/plot_summary.man.in vendor/ntp/dist/scripts/plot_summary.mdoc.in vendor/ntp/dist/scripts/summary-opts vendor/ntp/dist/scripts/summary.1summaryman vendor/ntp/dist/scripts/summary.1summarymdoc vendor/ntp/dist/scripts/summary.html vendor/ntp/dist/scripts/summary.man.in vendor/ntp/dist/scripts/summary.mdoc.in vendor/ntp/dist/scripts/update-leap/invoke-update-leap.texi vendor/ntp/dist/scripts/update-leap/update-leap-opts vendor/ntp/dist/scripts/update-leap/update-leap.1update-leapman vendor/ntp/dist/scripts/update-leap/update-leap.1update-leapmdoc vendor/ntp/dist/scripts/update-leap/update-leap.html vendor/ntp/dist/scripts/update-leap/update-leap.man.in vendor/ntp/dist/scripts/update-leap/update-leap.mdoc.in vendor/ntp/dist/sntp/COPYRIGHT vendor/ntp/dist/sntp/configure vendor/ntp/dist/sntp/configure.ac vendor/ntp/dist/sntp/crypto.c vendor/ntp/dist/sntp/include/copyright.def vendor/ntp/dist/sntp/include/version.def vendor/ntp/dist/sntp/include/version.texi vendor/ntp/dist/sntp/invoke-sntp.texi vendor/ntp/dist/sntp/libevent/build-aux/ar-lib vendor/ntp/dist/sntp/libevent/build-aux/compile vendor/ntp/dist/sntp/libevent/build-aux/config.guess vendor/ntp/dist/sntp/libevent/build-aux/config.sub vendor/ntp/dist/sntp/libevent/build-aux/depcomp vendor/ntp/dist/sntp/libevent/build-aux/install-sh vendor/ntp/dist/sntp/libevent/build-aux/missing vendor/ntp/dist/sntp/libevent/build-aux/test-driver vendor/ntp/dist/sntp/libevent/build-aux/ylwrap vendor/ntp/dist/sntp/libevent/test/regress.gen.c vendor/ntp/dist/sntp/libevent/test/regress.gen.h vendor/ntp/dist/sntp/libopts/m4/libopts.m4 vendor/ntp/dist/sntp/m4/ntp_problemtests.m4 vendor/ntp/dist/sntp/m4/version.m4 vendor/ntp/dist/sntp/main.c vendor/ntp/dist/sntp/networking.c vendor/ntp/dist/sntp/scm-rev vendor/ntp/dist/sntp/sntp-opts.c vendor/ntp/dist/sntp/sntp-opts.h vendor/ntp/dist/sntp/sntp.1sntpman vendor/ntp/dist/sntp/sntp.1sntpmdoc vendor/ntp/dist/sntp/sntp.html vendor/ntp/dist/sntp/sntp.man.in vendor/ntp/dist/sntp/sntp.mdoc.in vendor/ntp/dist/sntp/tests/run-crypto.c vendor/ntp/dist/sntp/tests/run-keyFile.c vendor/ntp/dist/sntp/tests/run-kodDatabase.c vendor/ntp/dist/sntp/tests/run-kodFile.c vendor/ntp/dist/sntp/tests/run-networking.c vendor/ntp/dist/sntp/tests/run-packetHandling.c vendor/ntp/dist/sntp/tests/run-packetProcessing.c vendor/ntp/dist/sntp/tests/run-t-log.c vendor/ntp/dist/sntp/tests/run-utilities.c vendor/ntp/dist/sntp/tests/testconf.yml vendor/ntp/dist/sntp/version.c vendor/ntp/dist/tests/bug-2803/run-bug-2803.c vendor/ntp/dist/tests/bug-2803/testconf.yml vendor/ntp/dist/tests/libntp/calendar.c vendor/ntp/dist/tests/libntp/decodenetnum.c vendor/ntp/dist/tests/libntp/lfptostr.c vendor/ntp/dist/tests/libntp/refidsmear.c vendor/ntp/dist/tests/libntp/run-a_md5encrypt.c vendor/ntp/dist/tests/libntp/run-atoint.c vendor/ntp/dist/tests/libntp/run-atouint.c vendor/ntp/dist/tests/libntp/run-authkeys.c vendor/ntp/dist/tests/libntp/run-buftvtots.c vendor/ntp/dist/tests/libntp/run-calendar.c vendor/ntp/dist/tests/libntp/run-caljulian.c vendor/ntp/dist/tests/libntp/run-caltontp.c vendor/ntp/dist/tests/libntp/run-calyearstart.c vendor/ntp/dist/tests/libntp/run-clocktime.c vendor/ntp/dist/tests/libntp/run-decodenetnum.c vendor/ntp/dist/tests/libntp/run-hextoint.c vendor/ntp/dist/tests/libntp/run-hextolfp.c vendor/ntp/dist/tests/libntp/run-humandate.c vendor/ntp/dist/tests/libntp/run-lfpfunc.c vendor/ntp/dist/tests/libntp/run-lfptostr.c vendor/ntp/dist/tests/libntp/run-modetoa.c vendor/ntp/dist/tests/libntp/run-msyslog.c vendor/ntp/dist/tests/libntp/run-netof.c vendor/ntp/dist/tests/libntp/run-numtoa.c vendor/ntp/dist/tests/libntp/run-numtohost.c vendor/ntp/dist/tests/libntp/run-octtoint.c vendor/ntp/dist/tests/libntp/run-prettydate.c vendor/ntp/dist/tests/libntp/run-recvbuff.c vendor/ntp/dist/tests/libntp/run-refidsmear.c vendor/ntp/dist/tests/libntp/run-refnumtoa.c vendor/ntp/dist/tests/libntp/run-sbprintf.c vendor/ntp/dist/tests/libntp/run-sfptostr.c vendor/ntp/dist/tests/libntp/run-socktoa.c vendor/ntp/dist/tests/libntp/run-ssl_init.c vendor/ntp/dist/tests/libntp/run-statestr.c vendor/ntp/dist/tests/libntp/run-strtolfp.c vendor/ntp/dist/tests/libntp/run-timespecops.c vendor/ntp/dist/tests/libntp/run-timevalops.c vendor/ntp/dist/tests/libntp/run-tsafememcmp.c vendor/ntp/dist/tests/libntp/run-tstotv.c vendor/ntp/dist/tests/libntp/run-tvtots.c vendor/ntp/dist/tests/libntp/run-uglydate.c vendor/ntp/dist/tests/libntp/run-vi64ops.c vendor/ntp/dist/tests/libntp/run-ymd2yd.c vendor/ntp/dist/tests/libntp/sockaddrtest.c vendor/ntp/dist/tests/libntp/socktoa.c vendor/ntp/dist/tests/libntp/testconf.yml vendor/ntp/dist/tests/ntpd/run-leapsec.c vendor/ntp/dist/tests/ntpd/run-ntp_prio_q.c vendor/ntp/dist/tests/ntpd/run-ntp_restrict.c vendor/ntp/dist/tests/ntpd/run-rc_cmdlength.c vendor/ntp/dist/tests/ntpd/run-t-ntp_scanner.c vendor/ntp/dist/tests/ntpd/run-t-ntp_signd.c vendor/ntp/dist/tests/ntpd/t-ntp_scanner.c vendor/ntp/dist/tests/ntpd/testconf.yml vendor/ntp/dist/tests/ntpq/run-t-ntpq.c vendor/ntp/dist/tests/ntpq/testconf.yml vendor/ntp/dist/tests/sandbox/run-modetoa.c vendor/ntp/dist/tests/sandbox/run-uglydate.c vendor/ntp/dist/tests/sandbox/run-ut-2803.c vendor/ntp/dist/tests/sandbox/testconf.yml vendor/ntp/dist/tests/sec-2853/run-sec-2853.c vendor/ntp/dist/tests/sec-2853/testconf.yml vendor/ntp/dist/util/invoke-ntp-keygen.texi vendor/ntp/dist/util/ntp-keygen-opts.c vendor/ntp/dist/util/ntp-keygen-opts.h vendor/ntp/dist/util/ntp-keygen.1ntp-keygenman vendor/ntp/dist/util/ntp-keygen.1ntp-keygenmdoc vendor/ntp/dist/util/ntp-keygen.html vendor/ntp/dist/util/ntp-keygen.man.in vendor/ntp/dist/util/ntp-keygen.mdoc.in vendor/ntp/dist/util/ntptime.c Modified: vendor/ntp/dist/COPYRIGHT ============================================================================== --- vendor/ntp/dist/COPYRIGHT Wed Mar 4 13:58:34 2020 (r358615) +++ vendor/ntp/dist/COPYRIGHT Wed Mar 4 13:59:29 2020 (r358616) @@ -3,7 +3,7 @@ This file is automatically generated from html/copyrig jpg "Clone me," says Dolly sheepishly. - Last update: 2-Jan-2017 11:58 UTC + Last update: 4-Feb-2020 23:47 UTC __________________________________________________________________ The following copyright notice applies to all files collectively called @@ -32,7 +32,7 @@ This file is automatically generated from html/copyrig Burnicki is: *********************************************************************** * * -* Copyright (c) Network Time Foundation 2011-2017 * +* Copyright (c) Network Time Foundation 2011-2020 * * * * All Rights Reserved * * * Modified: vendor/ntp/dist/ChangeLog ============================================================================== --- vendor/ntp/dist/ChangeLog Wed Mar 4 13:58:34 2020 (r358615) +++ vendor/ntp/dist/ChangeLog Wed Mar 4 13:59:29 2020 (r358616) @@ -1,4 +1,100 @@ --- +(4.2.8p14) 2020/03/03 Released by Harlan Stenn + +* [Sec 3610] process_control() should bail earlier on short packets. stenn@ + - Reported by Philippe Antoine +* [Sec 3596] Highly predictable timestamp attack. + - Reported by Miroslav Lichvar +* [Sec 3592] DoS attack on client ntpd + - Reported by Miroslav Lichvar +* [Bug 3637] Emit the version of ntpd in saveconfig. stenn@ +* [Bug 3636] NMEA: combine time/date from multiple sentences +* [Bug 3635] Make leapsecond file hash check optional +* [Bug 3634] Typo in discipline.html, reported by Jason Harrison. stenn@ +* [Bug 3628] raw DCF decoding - improve robustness with Zeller's congruence + - implement Zeller's congruence in libparse and libntp +* [Bug 3627] SIGSEGV on FreeBSD-12 with stack limit and stack gap + - integrated patch by Cy Schubert +* [Bug 3620] memory leak in ntpq sysinfo + - applied patch by Gerry Garvey +* [Bug 3619] Honour drefid setting in cooked mode and sysinfo + - applied patch by Gerry Garvey +* [Bug 3617] Add support for ACE III and Copernicus II receivers + - integrated patch by Richard Steedman +* [Bug 3615] accelerate refclock startup +* [Bug 3613] Propagate noselect to mobilized pool servers + - Reported by Martin Burnicki +* [Bug 3612] Use-of-uninitialized-value in receive function + - Reported by Philippe Antoine +* [Bug 3611] NMEA time interpreted incorrectly + - officially document new "trust date" mode bit for NMEA driver + - restore the (previously undocumented) "trust date" feature lost with [bug 3577] +* [Bug 3609] Fixing wrong falseticker in case of non-statistic jitter + - mostly based on a patch by Michael Haardt, implementing 'fudge minjitter' +* [Bug 3608] libparse fails to compile on S11.4SRU13 and later + - removed ffs() and fls() prototypes as per Brian Utterback +* [Bug 3604] Wrong param byte order passing into record_raw_stats() in + ntp_io.c + - fixed byte and paramter order as suggested by wei6410@sina.com +* [Bug 3601] Tests fail to link on platforms with ntp_cv_gc_sections_runs=no +* [Bug 3599] Build fails on linux-m68k due to alignment issues + - added padding as suggested by John Paul Adrian Glaubitz +* [Bug 3594] ntpd discards messages coming through nmead +* [Bug 3593] ntpd discards silently nmea messages after the 5th string +* [Bug 3590] Update refclock_oncore.c to the new GPS date API +* [Bug 3585] Unity tests mix buffered and unbuffered output + - stdout+stderr are set to line buffered during test setup now +* [Bug 3583] synchronization error + - set clock to base date if system time is before that limit +* [Bug 3582] gpsdjson refclock fudgetime1 adjustment is doubled +* [Bug 3580] Possible bug ntpq-subs (NULL dereference in dogetassoc) + - Reported by Paulo Neves +* [Bug 3577] Update refclock_zyfer.c to the new GPS date API + - also updates for refclock_nmea.c and refclock_jupiter.c +* [Bug 3576] New GPS date function API +* [Bug 3573] nptdate: missleading error message +* [Bug 3570] NMEA driver docs: talker ID not mentioned, typo +* [Bug 3569] cleanup MOD_NANO/STA_NANO handling for 'ntpadjtimex()' + - sidekick: service port resolution in 'ntpdate' +* [Bug 3550] Reproducible build: Respect SOURCE_DATE_EPOCH + - applied patch by Douglas Royds +* [Bug 3542] ntpdc monlist parameters cannot be set +* [Bug 3533] ntpdc peer_info ipv6 issues + - applied patch by Gerry Garvey +* [Bug 3531] make check: test-decodenetnum fails + - try to harden 'decodenetnum()' against 'getaddrinfo()' errors + - fix wrong cond-compile tests in unit tests +* [Bug 3517] Reducing build noise +* [Bug 3516] Require tooling from this decade + - patch by Philipp Prindeville +* [Bug 3515] Refactor ntpdmain() dispatcher loop and group common code + - patch by Philipp Prindeville +* [Bug 3511] Get rid of AC_LANG_SOURCE() warnings + - patch by Philipp Prindeville +* [Bug 3510] Flatten out the #ifdef nesting in ntpdmain() + - partial application of patch by Philipp Prindeville +* [Bug 3491] Signed values of LFP datatypes should always display a sign + - applied patch by Gerry Garvey & fixed unit tests +* [Bug 3490] Patch to support Trimble Resolution Receivers + - applied (modified) patch by Richard Steedman +* [Bug 3473] RefID of refclocks should always be text format + - applied patch by Gerry Garvey (with minor formatting changes) +* [Bug 3132] Building 4.2.8p8 with disabled local libopts fails + - applied patch by Miroslav Lichvar +* [Bug 3094] ntpd trying to listen for broadcasts on a completely ipv6 network + +* [Bug 2420] ntpd doesn't run and exits with retval 0 when invalid user + is specified with -u + - monitor daemon child startup & propagate exit codes +* [Bug 1433] runtime check whether the kernel really supports capabilities + - (modified) patch by Kurt Roeckx +* Clean up sntp/networking.c:sendpkt() error message. +* Provide more detail on unrecognized config file parser tokens. +* Startup log improvements. +* Update the copyright year. +* html/confopt.html: cleanup. + +--- (4.2.8p13) 2019/03/07 Released by Harlan Stenn * [Sec 3565] Crafted null dereference attack in authenticated Modified: vendor/ntp/dist/CommitLog ============================================================================== --- vendor/ntp/dist/CommitLog Wed Mar 4 13:58:34 2020 (r358615) +++ vendor/ntp/dist/CommitLog Wed Mar 4 13:59:29 2020 (r358616) @@ -1,10 +1,3065 @@ -ChangeSet@1.3849, 2019-02-20 17:13:36-08:00, harlan@ntp-build.tal1.ntfo.org +ChangeSet@1.3896, 2020-03-03 17:42:43-08:00, ntpreleng@ntp-build.tal1.ntfo.org + NTP_4_2_8P14 + TAG: NTP_4_2_8P14 + + ChangeLog@1.1974 +1 -1 + NTP_4_2_8P14 + + ntpd/invoke-ntp.conf.texi@1.221 +1 -1 + NTP_4_2_8P14 + + ntpd/invoke-ntp.keys.texi@1.206 +1 -1 + NTP_4_2_8P14 + + ntpd/invoke-ntpd.texi@1.520 +2 -2 + NTP_4_2_8P14 + + ntpd/ntp.conf.5man@1.255 +2 -2 + NTP_4_2_8P14 + + ntpd/ntp.conf.5mdoc@1.255 +1 -1 + NTP_4_2_8P14 + + ntpd/ntp.conf.html@1.203 +1 -1 + NTP_4_2_8P14 + + ntpd/ntp.conf.man.in@1.255 +2 -2 + NTP_4_2_8P14 + + ntpd/ntp.conf.mdoc.in@1.255 +1 -1 + NTP_4_2_8P14 + + ntpd/ntp.keys.5man@1.240 +2 -2 + NTP_4_2_8P14 + + ntpd/ntp.keys.5mdoc@1.240 +1 -1 + NTP_4_2_8P14 + + ntpd/ntp.keys.html@1.201 +1 -1 + NTP_4_2_8P14 + + ntpd/ntp.keys.man.in@1.240 +2 -2 + NTP_4_2_8P14 + + ntpd/ntp.keys.mdoc.in@1.240 +1 -1 + NTP_4_2_8P14 + + ntpd/ntpd-opts.c@1.543 +7 -7 + NTP_4_2_8P14 + + ntpd/ntpd-opts.h@1.542 +3 -3 + NTP_4_2_8P14 + + ntpd/ntpd.1ntpdman@1.349 +2 -2 + NTP_4_2_8P14 + + ntpd/ntpd.1ntpdmdoc@1.349 +1 -1 + NTP_4_2_8P14 + + ntpd/ntpd.html@1.194 +2 -2 + NTP_4_2_8P14 + + ntpd/ntpd.man.in@1.349 +2 -2 + NTP_4_2_8P14 + + ntpd/ntpd.mdoc.in@1.349 +1 -1 + NTP_4_2_8P14 + + ntpdc/invoke-ntpdc.texi@1.517 +2 -2 + NTP_4_2_8P14 + + ntpdc/ntpdc-opts.c@1.536 +7 -7 + NTP_4_2_8P14 + + ntpdc/ntpdc-opts.h@1.535 +3 -3 + NTP_4_2_8P14 + + ntpdc/ntpdc.1ntpdcman@1.348 +2 -2 + NTP_4_2_8P14 + + ntpdc/ntpdc.1ntpdcmdoc@1.348 +1 -1 + NTP_4_2_8P14 + + ntpdc/ntpdc.html@1.363 +2 -2 + NTP_4_2_8P14 + + ntpdc/ntpdc.man.in@1.348 +2 -2 + NTP_4_2_8P14 + + ntpdc/ntpdc.mdoc.in@1.348 +1 -1 + NTP_4_2_8P14 + + ntpq/invoke-ntpq.texi@1.527 +2 -2 + NTP_4_2_8P14 + + ntpq/ntpq-opts.c@1.545 +7 -7 + NTP_4_2_8P14 + + ntpq/ntpq-opts.h@1.543 +3 -3 + NTP_4_2_8P14 + + ntpq/ntpq.1ntpqman@1.355 +2 -2 + NTP_4_2_8P14 + + ntpq/ntpq.1ntpqmdoc@1.355 +1 -1 + NTP_4_2_8P14 + + ntpq/ntpq.html@1.194 +2 -2 + NTP_4_2_8P14 + + ntpq/ntpq.man.in@1.355 +2 -2 + NTP_4_2_8P14 + + ntpq/ntpq.mdoc.in@1.355 +1 -1 + NTP_4_2_8P14 + + ntpsnmpd/invoke-ntpsnmpd.texi@1.519 +1 -1 + NTP_4_2_8P14 + + ntpsnmpd/ntpsnmpd-opts.c@1.538 +7 -7 + NTP_4_2_8P14 + + ntpsnmpd/ntpsnmpd-opts.h@1.537 +3 -3 + NTP_4_2_8P14 + + ntpsnmpd/ntpsnmpd.1ntpsnmpdman@1.348 +2 -2 + NTP_4_2_8P14 + + ntpsnmpd/ntpsnmpd.1ntpsnmpdmdoc@1.348 +1 -1 + NTP_4_2_8P14 + + ntpsnmpd/ntpsnmpd.html@1.187 +1 -1 + NTP_4_2_8P14 + + ntpsnmpd/ntpsnmpd.man.in@1.348 +2 -2 + NTP_4_2_8P14 + + ntpsnmpd/ntpsnmpd.mdoc.in@1.348 +1 -1 + NTP_4_2_8P14 + + packageinfo.sh@1.544 +1 -1 + NTP_4_2_8P14 + + scripts/calc_tickadj/calc_tickadj.1calc_tickadjman@1.109 +2 -2 + NTP_4_2_8P14 + + scripts/calc_tickadj/calc_tickadj.1calc_tickadjmdoc@1.110 +1 -1 + NTP_4_2_8P14 + + scripts/calc_tickadj/calc_tickadj.html@1.110 +1 -1 + NTP_4_2_8P14 + + scripts/calc_tickadj/calc_tickadj.man.in@1.108 +2 -2 + NTP_4_2_8P14 + + scripts/calc_tickadj/calc_tickadj.mdoc.in@1.110 +1 -1 + NTP_4_2_8P14 + + scripts/calc_tickadj/invoke-calc_tickadj.texi@1.113 +1 -1 + NTP_4_2_8P14 + + scripts/invoke-plot_summary.texi@1.131 +2 -2 + NTP_4_2_8P14 + + scripts/invoke-summary.texi@1.130 +2 -2 + NTP_4_2_8P14 + + scripts/ntp-wait/invoke-ntp-wait.texi@1.341 +2 -2 + NTP_4_2_8P14 + + scripts/ntp-wait/ntp-wait-opts@1.77 +2 -2 + NTP_4_2_8P14 + + scripts/ntp-wait/ntp-wait.1ntp-waitman@1.337 +2 -2 + NTP_4_2_8P14 + + scripts/ntp-wait/ntp-wait.1ntp-waitmdoc@1.338 +1 -1 + NTP_4_2_8P14 + + scripts/ntp-wait/ntp-wait.html@1.359 +2 -2 + NTP_4_2_8P14 + + scripts/ntp-wait/ntp-wait.man.in@1.337 +2 -2 + NTP_4_2_8P14 + + scripts/ntp-wait/ntp-wait.mdoc.in@1.338 +1 -1 + NTP_4_2_8P14 + + scripts/ntpsweep/invoke-ntpsweep.texi@1.128 +2 -2 + NTP_4_2_8P14 + + scripts/ntpsweep/ntpsweep-opts@1.79 +2 -2 + NTP_4_2_8P14 + + scripts/ntpsweep/ntpsweep.1ntpsweepman@1.116 +2 -2 + NTP_4_2_8P14 + + scripts/ntpsweep/ntpsweep.1ntpsweepmdoc@1.116 +1 -1 + NTP_4_2_8P14 + + scripts/ntpsweep/ntpsweep.html@1.131 +2 -2 + NTP_4_2_8P14 + + scripts/ntpsweep/ntpsweep.man.in@1.116 +2 -2 + NTP_4_2_8P14 + + scripts/ntpsweep/ntpsweep.mdoc.in@1.117 +1 -1 + NTP_4_2_8P14 + + scripts/ntptrace/invoke-ntptrace.texi@1.130 +2 -2 + NTP_4_2_8P14 + + scripts/ntptrace/ntptrace-opts@1.79 +2 -2 + NTP_4_2_8P14 + + scripts/ntptrace/ntptrace.1ntptraceman@1.116 +2 -2 + NTP_4_2_8P14 + + scripts/ntptrace/ntptrace.1ntptracemdoc@1.117 +1 -1 + NTP_4_2_8P14 + + scripts/ntptrace/ntptrace.html@1.132 +2 -2 + NTP_4_2_8P14 + + scripts/ntptrace/ntptrace.man.in@1.116 +2 -2 + NTP_4_2_8P14 + + scripts/ntptrace/ntptrace.mdoc.in@1.118 +1 -1 + NTP_4_2_8P14 + + scripts/plot_summary-opts@1.80 +2 -2 + NTP_4_2_8P14 + + scripts/plot_summary.1plot_summaryman@1.129 +2 -2 + NTP_4_2_8P14 + + scripts/plot_summary.1plot_summarymdoc@1.129 +1 -1 + NTP_4_2_8P14 + + scripts/plot_summary.html@1.134 +2 -2 + NTP_4_2_8P14 + + scripts/plot_summary.man.in@1.129 +2 -2 + NTP_4_2_8P14 + + scripts/plot_summary.mdoc.in@1.129 +1 -1 + NTP_4_2_8P14 + + scripts/summary-opts@1.79 +2 -2 + NTP_4_2_8P14 + + scripts/summary.1summaryman@1.128 +2 -2 + NTP_4_2_8P14 + + scripts/summary.1summarymdoc@1.128 +1 -1 + NTP_4_2_8P14 + + scripts/summary.html@1.133 +2 -2 + NTP_4_2_8P14 + + scripts/summary.man.in@1.128 +2 -2 + NTP_4_2_8P14 + + scripts/summary.mdoc.in@1.128 +1 -1 + NTP_4_2_8P14 + + scripts/update-leap/invoke-update-leap.texi@1.29 +1 -1 + NTP_4_2_8P14 + + scripts/update-leap/update-leap-opts@1.30 +2 -2 + NTP_4_2_8P14 + + scripts/update-leap/update-leap.1update-leapman@1.29 +2 -2 + NTP_4_2_8P14 + + scripts/update-leap/update-leap.1update-leapmdoc@1.29 +1 -1 + NTP_4_2_8P14 + + scripts/update-leap/update-leap.html@1.30 +1 -1 + NTP_4_2_8P14 + + scripts/update-leap/update-leap.man.in@1.29 +2 -2 + NTP_4_2_8P14 + + scripts/update-leap/update-leap.mdoc.in@1.29 +1 -1 + NTP_4_2_8P14 + + sntp/invoke-sntp.texi@1.519 +2 -2 + NTP_4_2_8P14 + + sntp/sntp-opts.c@1.539 +7 -7 + NTP_4_2_8P14 + + sntp/sntp-opts.h@1.537 +3 -3 + NTP_4_2_8P14 + + sntp/sntp.1sntpman@1.354 +2 -2 + NTP_4_2_8P14 + + sntp/sntp.1sntpmdoc@1.354 +1 -1 + NTP_4_2_8P14 + + sntp/sntp.html@1.535 +2 -2 + NTP_4_2_8P14 + + sntp/sntp.man.in@1.354 +2 -2 + NTP_4_2_8P14 + + sntp/sntp.mdoc.in@1.354 +1 -1 + NTP_4_2_8P14 + + util/invoke-ntp-keygen.texi@1.522 +2 -2 + NTP_4_2_8P14 + + util/ntp-keygen-opts.c@1.541 +7 -7 + NTP_4_2_8P14 + + util/ntp-keygen-opts.h@1.539 +3 -3 + NTP_4_2_8P14 + + util/ntp-keygen.1ntp-keygenman@1.350 +2 -2 + NTP_4_2_8P14 + + util/ntp-keygen.1ntp-keygenmdoc@1.350 +1 -1 + NTP_4_2_8P14 + + util/ntp-keygen.html@1.195 +2 -2 + NTP_4_2_8P14 + + util/ntp-keygen.man.in@1.350 +2 -2 + NTP_4_2_8P14 + + util/ntp-keygen.mdoc.in@1.350 +1 -1 + NTP_4_2_8P14 + +ChangeSet@1.3895, 2020-03-03 17:09:57-08:00, ntpreleng@ntp-build.tal1.ntfo.org + quiet some debug messages + + ntpd/ntp_config.c@1.375 +0 -2 + quiet some debug messages + + ntpd/ntp_peer.c@1.166 +2 -0 + quiet some debug messages + +ChangeSet@1.3894, 2020-03-03 16:49:54-08:00, ntpreleng@ntp-build.tal1.ntfo.org + NTP_4_2_8P13 + TAG: NTP_4_2_8P13 + + ChangeLog@1.1973 +1 -0 + NTP_4_2_8P13 + + ntpd/invoke-ntp.conf.texi@1.220 +31 -7 + NTP_4_2_8P13 + + ntpd/invoke-ntp.keys.texi@1.205 +1 -1 + NTP_4_2_8P13 + + ntpd/invoke-ntpd.texi@1.519 +3 -3 + NTP_4_2_8P13 + + ntpd/ntp.conf.5man@1.254 +34 -9 + NTP_4_2_8P13 + + ntpd/ntp.conf.5mdoc@1.254 +41 -6 + NTP_4_2_8P13 + + ntpd/ntp.conf.html@1.202 +33 -7 + NTP_4_2_8P13 + + ntpd/ntp.conf.man.in@1.254 +34 -9 + NTP_4_2_8P13 + + ntpd/ntp.conf.mdoc.in@1.254 +41 -6 + NTP_4_2_8P13 + + ntpd/ntp.keys.5man@1.239 +2 -2 + NTP_4_2_8P13 + + ntpd/ntp.keys.5mdoc@1.239 +3 -3 + NTP_4_2_8P13 + + ntpd/ntp.keys.man.in@1.239 +2 -2 + NTP_4_2_8P13 + + ntpd/ntp.keys.mdoc.in@1.239 +3 -3 + NTP_4_2_8P13 + + ntpd/ntpd-opts.c@1.542 +2 -2 + NTP_4_2_8P13 + + ntpd/ntpd-opts.h@1.541 +3 -3 + NTP_4_2_8P13 + + ntpd/ntpd.1ntpdman@1.348 +2 -2 + NTP_4_2_8P13 + + ntpd/ntpd.1ntpdmdoc@1.348 +2 -2 + NTP_4_2_8P13 + + ntpd/ntpd.man.in@1.348 +2 -2 + NTP_4_2_8P13 + + ntpd/ntpd.mdoc.in@1.348 +2 -2 + NTP_4_2_8P13 + + ntpdc/invoke-ntpdc.texi@1.516 +1 -1 + NTP_4_2_8P13 + + ntpdc/ntpdc-opts.c@1.535 +2 -2 + NTP_4_2_8P13 + + ntpdc/ntpdc-opts.h@1.534 +3 -3 + NTP_4_2_8P13 + + ntpdc/ntpdc.1ntpdcman@1.347 +2 -2 + NTP_4_2_8P13 + + ntpdc/ntpdc.1ntpdcmdoc@1.347 +2 -2 + NTP_4_2_8P13 + + ntpdc/ntpdc.html@1.362 +408 -353 + NTP_4_2_8P13 + + ntpdc/ntpdc.man.in@1.347 +2 -2 + NTP_4_2_8P13 + + ntpdc/ntpdc.mdoc.in@1.347 +2 -2 + NTP_4_2_8P13 + + ntpq/invoke-ntpq.texi@1.526 +1 -1 + NTP_4_2_8P13 + + ntpq/ntpq-opts.c@1.544 +2 -2 + NTP_4_2_8P13 + + ntpq/ntpq-opts.h@1.542 +3 -3 + NTP_4_2_8P13 + + ntpq/ntpq.1ntpqman@1.354 +2 -2 + NTP_4_2_8P13 + + ntpq/ntpq.1ntpqmdoc@1.354 +2 -2 + NTP_4_2_8P13 + + ntpq/ntpq.html@1.193 +1 -1 + NTP_4_2_8P13 + + ntpq/ntpq.man.in@1.354 +2 -2 + NTP_4_2_8P13 + + ntpq/ntpq.mdoc.in@1.354 +2 -2 + NTP_4_2_8P13 + + ntpsnmpd/invoke-ntpsnmpd.texi@1.518 +1 -1 + NTP_4_2_8P13 + + ntpsnmpd/ntpsnmpd-opts.c@1.537 +2 -2 + NTP_4_2_8P13 + + ntpsnmpd/ntpsnmpd-opts.h@1.536 +3 -3 + NTP_4_2_8P13 + + ntpsnmpd/ntpsnmpd.1ntpsnmpdman@1.347 +2 -2 + NTP_4_2_8P13 + + ntpsnmpd/ntpsnmpd.1ntpsnmpdmdoc@1.347 +2 -2 + NTP_4_2_8P13 + + ntpsnmpd/ntpsnmpd.man.in@1.347 +2 -2 + NTP_4_2_8P13 + + ntpsnmpd/ntpsnmpd.mdoc.in@1.347 +2 -2 + NTP_4_2_8P13 + + scripts/calc_tickadj/calc_tickadj.1calc_tickadjman@1.108 +2 -2 + NTP_4_2_8P13 + + scripts/calc_tickadj/calc_tickadj.1calc_tickadjmdoc@1.109 +2 -2 + NTP_4_2_8P13 + + scripts/calc_tickadj/calc_tickadj.html@1.109 +172 -128 + NTP_4_2_8P13 + + scripts/calc_tickadj/calc_tickadj.man.in@1.107 +2 -2 + NTP_4_2_8P13 + + scripts/calc_tickadj/calc_tickadj.mdoc.in@1.109 +2 -2 + NTP_4_2_8P13 + + scripts/calc_tickadj/invoke-calc_tickadj.texi@1.112 +2 -2 + NTP_4_2_8P13 + + scripts/invoke-plot_summary.texi@1.130 +2 -2 + NTP_4_2_8P13 + + scripts/invoke-summary.texi@1.129 +2 -2 + NTP_4_2_8P13 + + scripts/ntp-wait/invoke-ntp-wait.texi@1.340 +2 -2 + NTP_4_2_8P13 + + scripts/ntp-wait/ntp-wait-opts@1.76 +2 -2 + NTP_4_2_8P13 + + scripts/ntp-wait/ntp-wait.1ntp-waitman@1.336 +2 -2 + NTP_4_2_8P13 + + scripts/ntp-wait/ntp-wait.1ntp-waitmdoc@1.337 +2 -2 + NTP_4_2_8P13 + + scripts/ntp-wait/ntp-wait.html@1.358 +181 -152 + NTP_4_2_8P13 + + scripts/ntp-wait/ntp-wait.man.in@1.336 +2 -2 + NTP_4_2_8P13 + + scripts/ntp-wait/ntp-wait.mdoc.in@1.337 +2 -2 + NTP_4_2_8P13 + + scripts/ntpsweep/invoke-ntpsweep.texi@1.127 +2 -2 + NTP_4_2_8P13 + + scripts/ntpsweep/ntpsweep-opts@1.78 +2 -2 + NTP_4_2_8P13 + + scripts/ntpsweep/ntpsweep.1ntpsweepman@1.115 +2 -2 + NTP_4_2_8P13 + + scripts/ntpsweep/ntpsweep.1ntpsweepmdoc@1.115 +2 -2 + NTP_4_2_8P13 + + scripts/ntpsweep/ntpsweep.html@1.130 +188 -152 + NTP_4_2_8P13 + + scripts/ntpsweep/ntpsweep.man.in@1.115 +2 -2 + NTP_4_2_8P13 + + scripts/ntpsweep/ntpsweep.mdoc.in@1.116 +2 -2 + NTP_4_2_8P13 + + scripts/ntptrace/invoke-ntptrace.texi@1.129 +2 -2 + NTP_4_2_8P13 + + scripts/ntptrace/ntptrace-opts@1.78 +2 -2 + NTP_4_2_8P13 + + scripts/ntptrace/ntptrace.1ntptraceman@1.115 +2 -2 + NTP_4_2_8P13 + + scripts/ntptrace/ntptrace.1ntptracemdoc@1.116 +2 -2 + NTP_4_2_8P13 + + scripts/ntptrace/ntptrace.html@1.131 +179 -129 + NTP_4_2_8P13 + + scripts/ntptrace/ntptrace.man.in@1.115 +2 -2 + NTP_4_2_8P13 + + scripts/ntptrace/ntptrace.mdoc.in@1.117 +2 -2 + NTP_4_2_8P13 + + scripts/plot_summary-opts@1.79 +2 -2 + NTP_4_2_8P13 + + scripts/plot_summary.1plot_summaryman@1.128 +2 -2 + NTP_4_2_8P13 + + scripts/plot_summary.1plot_summarymdoc@1.128 +2 -2 + NTP_4_2_8P13 + + scripts/plot_summary.html@1.133 +203 -161 + NTP_4_2_8P13 + + scripts/plot_summary.man.in@1.128 +2 -2 + NTP_4_2_8P13 + + scripts/plot_summary.mdoc.in@1.128 +2 -2 + NTP_4_2_8P13 + + scripts/summary-opts@1.78 +2 -2 + NTP_4_2_8P13 + + scripts/summary.1summaryman@1.127 +2 -2 + NTP_4_2_8P13 + + scripts/summary.1summarymdoc@1.127 +2 -2 + NTP_4_2_8P13 + + scripts/summary.html@1.132 +184 -136 + NTP_4_2_8P13 + + scripts/summary.man.in@1.127 +2 -2 + NTP_4_2_8P13 + + scripts/summary.mdoc.in@1.127 +2 -2 + NTP_4_2_8P13 + + scripts/update-leap/invoke-update-leap.texi@1.28 +1 -1 + NTP_4_2_8P13 + + scripts/update-leap/update-leap-opts@1.29 +2 -2 + NTP_4_2_8P13 + + scripts/update-leap/update-leap.1update-leapman@1.28 +2 -2 + NTP_4_2_8P13 + + scripts/update-leap/update-leap.1update-leapmdoc@1.28 +2 -2 + NTP_4_2_8P13 + + scripts/update-leap/update-leap.html@1.29 +1 -1 + NTP_4_2_8P13 + + scripts/update-leap/update-leap.man.in@1.28 +2 -2 + NTP_4_2_8P13 + + scripts/update-leap/update-leap.mdoc.in@1.28 +2 -2 + NTP_4_2_8P13 + + sntp/invoke-sntp.texi@1.518 +1 -1 + NTP_4_2_8P13 + + sntp/sntp-opts.c@1.538 +2 -2 + NTP_4_2_8P13 + + sntp/sntp-opts.h@1.536 +3 -3 + NTP_4_2_8P13 + + sntp/sntp.1sntpman@1.353 +2 -2 + NTP_4_2_8P13 + + sntp/sntp.1sntpmdoc@1.353 +2 -2 + NTP_4_2_8P13 + + sntp/sntp.html@1.534 +472 -418 + NTP_4_2_8P13 + + sntp/sntp.man.in@1.353 +2 -2 + NTP_4_2_8P13 + + sntp/sntp.mdoc.in@1.353 +2 -2 + NTP_4_2_8P13 + + util/invoke-ntp-keygen.texi@1.521 +1 -1 + NTP_4_2_8P13 + + util/ntp-keygen-opts.c@1.540 +2 -2 + NTP_4_2_8P13 + + util/ntp-keygen-opts.h@1.538 +3 -3 + NTP_4_2_8P13 + + util/ntp-keygen.1ntp-keygenman@1.349 +2 -2 + NTP_4_2_8P13 + + util/ntp-keygen.1ntp-keygenmdoc@1.349 +2 -2 + NTP_4_2_8P13 + + util/ntp-keygen.html@1.194 +1 -1 + NTP_4_2_8P13 + + util/ntp-keygen.man.in@1.349 +2 -2 + NTP_4_2_8P13 + + util/ntp-keygen.mdoc.in@1.349 +2 -2 + NTP_4_2_8P13 + +ChangeSet@1.3893, 2020-03-03 16:25:14-08:00, ntpreleng@ntp-build.tal1.ntfo.org + Replace line with head -1 + + scripts/build/addChangeLogTag@1.6 +1 -1 + Replace line with head -1 + +ChangeSet@1.3892, 2020-03-03 16:05:38-08:00, ntpreleng@ntp-build.tal1.ntfo.org + provide get_pollskew() for simulator + + ntpd/ntp_config.c@1.374 +2 -2 + provide get_pollskew() for simulator + +ChangeSet@1.3844.24.1, 2020-03-03 03:30:13-08:00, ntpreleng@ntp-build.tal1.ntfo.org + NTP_4_2_8P13 + TAG: NTP_4_2_8P13 (currently on 1.3894) + + BitKeeper/triggers/2mirrors@1.11 +6 -2 + NTP_4_2_8P13 + + ntpd/ntpd-opts.c@1.539.1.1 +1 -1 + NTP_4_2_8P13 + + ntpd/ntpd-opts.h@1.538.1.1 +1 -1 + NTP_4_2_8P13 + + ntpd/ntpd.html@1.193 +3 -3 + NTP_4_2_8P13 + + ntpd/ntpdsim-opts.c@1.29 +372 -340 + NTP_4_2_8P13 + + ntpd/ntpdsim-opts.h@1.29 +44 -37 + NTP_4_2_8P13 + + ntpdc/ntpdc-opts.c@1.532.1.1 +1 -1 + NTP_4_2_8P13 + + ntpdc/ntpdc-opts.h@1.531.1.1 +1 -1 + NTP_4_2_8P13 + + ntpq/ntpq-opts.c@1.541.1.1 +1 -1 + NTP_4_2_8P13 + + ntpq/ntpq-opts.h@1.539.1.1 +1 -1 + NTP_4_2_8P13 + + ntpq/ntpq.html@1.192 +1 -1 + NTP_4_2_8P13 + + ntpsnmpd/ntpsnmpd-opts.c@1.534.1.1 +1 -1 + NTP_4_2_8P13 + + ntpsnmpd/ntpsnmpd-opts.h@1.533.1.1 +1 -1 + NTP_4_2_8P13 + + scripts/calc_tickadj/calc_tickadj-opts@1.10 +2 -2 + NTP_4_2_8P13 + + scripts/ntp-wait/invoke-ntp-wait.texi@1.337.1.1 +1 -1 + NTP_4_2_8P13 + + scripts/ntp-wait/ntp-wait-opts@1.73.1.1 +1 -1 + NTP_4_2_8P13 + + scripts/ntpsweep/ntpsweep-opts@1.75.1.1 +1 -1 + NTP_4_2_8P13 + + scripts/ntptrace/invoke-ntptrace.texi@1.126.1.1 +1 -1 + NTP_4_2_8P13 + + scripts/ntptrace/ntptrace-opts@1.75.1.1 +1 -1 + NTP_4_2_8P13 + + scripts/plot_summary-opts@1.76.1.1 +1 -1 + NTP_4_2_8P13 + + scripts/summary-opts@1.75.1.1 +1 -1 + NTP_4_2_8P13 + + scripts/update-leap/update-leap-opts@1.26.1.1 +1 -1 + NTP_4_2_8P13 + + sntp/sntp-opts.c@1.535.1.1 +1 -1 + NTP_4_2_8P13 + + sntp/sntp-opts.h@1.533.1.1 +1 -1 + NTP_4_2_8P13 + + util/ntp-keygen-opts.c@1.537.1.1 +1 -1 + NTP_4_2_8P13 + + util/ntp-keygen-opts.h@1.535.1.1 +1 -1 + NTP_4_2_8P13 + + util/ntp-keygen.html@1.193 +1 -1 + NTP_4_2_8P13 + +ChangeSet@1.3888, 2020-03-03 07:26:56+00:00, stenn@psp-deb1.ntp.org + cleanup + + NEWS@1.197.1.3 +3 -2 + cleanup + +ChangeSet@1.3887, 2020-02-18 05:11:26+00:00, stenn@psp-deb1.ntp.org + Cleanup distcheck psl* files + + ntpd/Makefile.am@1.138 +11 -0 + Cleanup distcheck psl* files + +ChangeSet@1.3886, 2020-02-18 05:10:35+00:00, stenn@psp-deb1.ntp.org + Distribute ntp_calgps.h + + include/Makefile.am@1.58 +1 -0 + Distribute ntp_calgps.h + +ChangeSet@1.3885, 2020-02-18 03:32:51+00:00, stenn@psp-deb1.ntp.org + Update the NEWS file for p14 + + NEWS@1.197.1.2 +107 -0 + Update the NEWS file for p14 + +ChangeSet@1.3884, 2020-02-17 11:05:46+00:00, stenn@psp-deb1.ntp.org + merge cleanup + + ntpd/ntp_proto.c@1.432 +1 -1 + merge cleanup + +ChangeSet@1.3881, 2020-02-17 08:50:00+00:00, stenn@psp-deb1.ntp.org + update + + ntpd/ntp_keyword.h@1.38 +545 -539 + update + +ChangeSet@1.3880, 2020-02-17 08:48:45+00:00, stenn@psp-deb1.ntp.org + Startp logging improvements. + Bug3596. + + html/accopt.html@1.48 +7 -2 + cleanup. + bug3596: document 'serverresponse fuzz' + + html/confopt.html@1.64.1.1 +22 -9 + Cleanup. + + Bug 3596: document xmtnonce + + html/miscopt.html@1.93 +19 -1 + Cleanup. + + bug3596: document pollskewlist + + include/Makefile.am@1.57 +1 -0 + pollskew upodates + + include/ntp.h@1.232 +8 -2 + bug3596 chagnes: + - srvfuzrft patches + - pollskew updates + - xmtnonce + + include/ntp_config.h@1.89 +27 -20 + bug3596 updates: + - pollskewlist + - srvfuzrft patches + + include/ntp_psl.h@1.1 +17 -0 + BitKeeper file include/ntp_psl.h + --- + bug3596 + + include/ntp_psl.h@1.0 +0 -0 + + include/ntp_request.h@1.54 +2 -1 + srvfuzrft patches + + include/ntp_stdlib.h@1.88 +1 -1 + randomizepoll/server response fuzz reftime fixes + + include/ntpd.h@1.207 +1 -1 + bug3596 cleanup + + libntp/statestr.c@1.31 +12 -5 + bug3596 srvrspfuz fixes + + ntpd/Makefile.am@1.137 +37 -7 + bug3596 pollskewlist changes + + ntpd/complete.conf.in@1.37 +4 -2 + bug3596: randompoll, pollskew xmtnonce + + ntpd/keyword-gen-utd@1.35 +1 -1 + Keyword table updates + + ntpd/keyword-gen.c@1.42 +3 -3 + bug3596: serverresponse fuzz, pollskewlist, xmtnonce + + ntpd/ntp.conf.def@1.34 +40 -4 + Cleanup. + bug3596: xmtnonce, serverresponse fuzz, pollskewlist, + + ntpd/ntp_config.c@1.373 +250 -26 + bug3596: serverresponse fuzz, pollskewlist, xmtnonce + + ntpd/ntp_loopfilter.c@1.195 +1 -1 + pollskew upodates + + ntpd/ntp_parser.c@1.117 +1298 -1283 + bug3596 *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@freebsd.org Wed Mar 4 14:03:54 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 9B68D26F5BC; Wed, 4 Mar 2020 14:03:54 +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 48XbG23hXXz4XPx; Wed, 4 Mar 2020 14:03:54 +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 5FBF01F18C; Wed, 4 Mar 2020 14:03:54 +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 024E3smn064276; Wed, 4 Mar 2020 14:03:54 GMT (envelope-from cy@FreeBSD.org) Received: (from cy@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 024E3s2o064275; Wed, 4 Mar 2020 14:03:54 GMT (envelope-from cy@FreeBSD.org) Message-Id: <202003041403.024E3s2o064275@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: cy set sender to cy@FreeBSD.org using -f From: Cy Schubert Date: Wed, 4 Mar 2020 14:03:54 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r358617 - vendor/ntp/4.2.8p14 X-SVN-Group: vendor X-SVN-Commit-Author: cy X-SVN-Commit-Paths: vendor/ntp/4.2.8p14 X-SVN-Commit-Revision: 358617 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages 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, 04 Mar 2020 14:03:54 -0000 Author: cy Date: Wed Mar 4 14:03:53 2020 New Revision: 358617 URL: https://svnweb.freebsd.org/changeset/base/358617 Log: Tag ntp-4.2.8p14. Added: vendor/ntp/4.2.8p14/ - copied from r358616, vendor/ntp/dist/ From owner-svn-src-all@freebsd.org Wed Mar 4 14:04:00 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 80B9626F5DF; Wed, 4 Mar 2020 14:04:00 +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 48XbG82x2Vz4XT1; Wed, 4 Mar 2020 14:04:00 +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 600081F18D; Wed, 4 Mar 2020 14:04:00 +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 024E40fe064328; Wed, 4 Mar 2020 14:04:00 GMT (envelope-from cy@FreeBSD.org) Received: (from cy@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 024E4034064327; Wed, 4 Mar 2020 14:04:00 GMT (envelope-from cy@FreeBSD.org) Message-Id: <202003041404.024E4034064327@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: cy set sender to cy@FreeBSD.org using -f From: Cy Schubert Date: Wed, 4 Mar 2020 14:04:00 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-svnadmin@freebsd.org Subject: svn commit: r358618 - svnadmin/conf X-SVN-Group: svnadmin X-SVN-Commit-Author: cy X-SVN-Commit-Paths: svnadmin/conf X-SVN-Commit-Revision: 358618 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages 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, 04 Mar 2020 14:04:00 -0000 Author: cy Date: Wed Mar 4 14:03:59 2020 New Revision: 358618 URL: https://svnweb.freebsd.org/changeset/base/358618 Log: Vendor import of ntp-4.2.8p14 is now complete. Modified: svnadmin/conf/sizelimit.conf Modified: svnadmin/conf/sizelimit.conf ============================================================================== --- svnadmin/conf/sizelimit.conf Wed Mar 4 14:03:53 2020 (r358617) +++ svnadmin/conf/sizelimit.conf Wed Mar 4 14:03:59 2020 (r358618) @@ -16,7 +16,6 @@ # First field is username, second field is the raised limit required. achim bapt -cy davidcs dim 20480000 imp From owner-svn-src-all@freebsd.org Wed Mar 4 14:56:34 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 9AC692706D6; Wed, 4 Mar 2020 14:56:34 +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 48XcQp0km9z4Lhr; Wed, 4 Mar 2020 14:56:33 +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 A4DDA1FAE4; Wed, 4 Mar 2020 14:56: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 024EuW6w094172; Wed, 4 Mar 2020 14:56:32 GMT (envelope-from jhibbits@FreeBSD.org) Received: (from jhibbits@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 024EuWA6094171; Wed, 4 Mar 2020 14:56:32 GMT (envelope-from jhibbits@FreeBSD.org) Message-Id: <202003041456.024EuWA6094171@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jhibbits set sender to jhibbits@FreeBSD.org using -f From: Justin Hibbits Date: Wed, 4 Mar 2020 14:56:32 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r358619 - head/share/man/man4 X-SVN-Group: head X-SVN-Commit-Author: jhibbits X-SVN-Commit-Paths: head/share/man/man4 X-SVN-Commit-Revision: 358619 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages 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, 04 Mar 2020 14:56:34 -0000 Author: jhibbits Date: Wed Mar 4 14:56:32 2020 New Revision: 358619 URL: https://svnweb.freebsd.org/changeset/base/358619 Log: Update ismt(4) man page for r358595. Submitted by: Dmitry Luhtionov X-MFC-With: r358595 Sponsored by: Juniper Networks, Inc Modified: head/share/man/man4/ismt.4 Modified: head/share/man/man4/ismt.4 ============================================================================== --- head/share/man/man4/ismt.4 Wed Mar 4 14:03:59 2020 (r358618) +++ head/share/man/man4/ismt.4 Wed Mar 4 14:56:32 2020 (r358619) @@ -33,7 +33,7 @@ .\" .\" $FreeBSD$ .\" -.Dd January 11, 2016 +.Dd March 4, 2020 .Dt ISMT 4 .Os .Sh NAME @@ -46,7 +46,7 @@ .Cd device ismt .Sh DESCRIPTION This driver provides access to the SMBus 2.0 controller device contained -in the Intel Atom S1200 and C2000 CPUs. +in the Intel Atom S1200, C2000 and C3000 CPUs. .Sh SEE ALSO .Xr ichsmb 4 , .Xr smb 4 , From owner-svn-src-all@freebsd.org Wed Mar 4 15:03:11 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id AE9CA270A55; Wed, 4 Mar 2020 15:03:11 +0000 (UTC) (envelope-from madpilot@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 48XcZR49NLz4RYT; Wed, 4 Mar 2020 15:03:11 +0000 (UTC) (envelope-from madpilot@FreeBSD.org) Received: from marvin.madpilot.net (host146-240-dynamic.10-87-r.retail.telecomitalia.it [87.10.240.146]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client did not present a certificate) (Authenticated sender: madpilot/mail) by smtp.freebsd.org (Postfix) with ESMTPSA id BCD1712147; Wed, 4 Mar 2020 15:03:10 +0000 (UTC) (envelope-from madpilot@FreeBSD.org) Subject: Re: svn commit: r358439 - head/sys/amd64/include From: Guido Falsi To: Ryan Libby , "Alexander V. Chernikov" Cc: "svn-src-head@freebsd.org" , "svn-src-all@freebsd.org" , "src-committers@freebsd.org" , vbox@FreeBSD.org References: <202002281832.01SIWaEL071685@repo.freebsd.org> <5767791583138727@sas1-c7aad230fe87.qloud-c.yandex.net> <3d54ebc3-a511-a239-136d-c0f638a69351@FreeBSD.org> Autocrypt: addr=madpilot@FreeBSD.org; keydata= mQENBE+G+l0BCADi/WBQ0aRJfnE7LBPsM0G3m/m3Yx7OPu4iYFvS84xawmRHtCNjWIntsxuX fptkmEo3Rsw816WUrek8dxoUAYdHd+EcpBcnnDzfDH5LW/TZ4gbrFezrHPdRp7wdxi23GN80 qPwHEwXuF0X4Wy5V0OO8B6VT/nA0ADYnBDhXS52HGIJ/GCUjgqJn+phDTdCFLvrSFdmgx4Wl c0W5Z1p5cmDF9l8L/hc959AeyNf7I9dXnjekGM9gVv7UDUYzCifR3U8T0fnfdMmS8NeI9NC+ wuREpRO4lKOkTnj9TtQJRiptlhcHQiAlG1cFqs7EQo57Tqq6cxD1FycZJLuC32bGbgalABEB AAG0Ikd1aWRvIEZhbHNpIDxtYWRwaWxvdEBGcmVlQlNELm9yZz6JATYEEwEIACACGwMCHgEC F4AFAlLvzwUFCwkIBwMFFQoJCAsEFgIDAQAKCRAa5oYOVsvSk6EzCAC4ovSo6XF4x0spuKmp RzVuZ5ywqCJAfRIrJHpW8HjSPkcUYwmXVOE3zjul9j2C2eHPPGobEDN5FqovAtzb7HdYGGcU aUdhDApUMMRVkzflwb23C/CI1RBcZxjC0noajSKgbIHx4+Afg6CFMgpngq+NJwEaaVrKlYzq G+KcfeVKAdwlWHJOgQJIEylUtwtBqXx/iJDrGwKO5A6a1uSEZrZfuwjSh8cBqoUfIwLZUIFE HBjHa8pUkp8mWx7JaZ19vBF6pDpPVZSoLSg8stWd1DPesn/qySYgtSGSY6hpWABVF98HRsBG +VXlHtqCaB0j0cGCDhCpHQUI10oGGc8k4zcvuQINBFMQe0EBEAChYaw3HqD3SvyBw0pqI+kk GIrLzO1XYXJXkuxPQ6BAFbe8jG3+h22zFU02OnJL8E1kLLMsCwVzVasYHOFiyY831IYHn/lh O+TN/lhWJTlUCxmWP8xFYJmta2mJzhzQDs3hyw5hF422T+rxgHg8gWxn0D6RO6hmGe7m3k91 8EDvj5JXAq7zj49mT3AMRjUtsVVPy8zjagqyaizCUiHAnbG4kj+BuT5wxR7TKJGk2OjhK/Dh EHzgHq4XB1Gv8+1LvGLZmqih/kBpBP1hIGkakok579CTkw/g8XoWqr6Cjz2fvtjaQmTBwdou gP8Yn5kMBIiIxF7XLngUc5DVEJMYamcktd0q4aHC/cnbWlTwc2WrQBI1AwxCZgDC1RbOOan8 oTIjWqRyaNp9zFvxOaJqgrxJA3Vl/3p9z+witk3pnmg4ITLIJDSmsf89MDaOVGQpDjzs9MaT YlIpTlW5Lns2WTYOue+NanntpX14UCGmeusk+4aYXPzf89zyALS3s3uLtVUdhFwLmdrFgHZS gjU5STLGlP8e9AVddVnf8qZ1czOvHX3UCCAI9YjBQA/5VxpRFJil4OTr9lUA5U57UKGpwmKw IPvArbT8468nYC2Rat4a7UJn3NLHucr9Vh0uvfgbFDhtPUb72sFA2cVI1tfZMnjfUx2jUYKM N5ErgK1Kes0piQARAQABiQEfBBgBCAAJBQJTEHtBAhsMAAoJEBrmhg5Wy9KTDecIAOGwpF/6 sBFQtOk6HkegtqbrZklkDIKQ2qq7+uR7m6PkBpoNj+HsE2EEOIOqGFktN6h8alVVoSs+xY36 1fnR/Kmwi30oCHL3QYWu2shmVa7IrjCyhm8N+n3JpGT6Ugznx3D9Fx/GfrvQlo9MVJE8QJWf +4uoGElKRtiVjbXZhP1/FVRMl7rAi8MtCtASOtAP+HUUyF9wuECqyd2W1F3oM+9Mp4x3/pUD GfSGSgEqETLkuRaMz0Iemm75sGRD3X+SPa4lBJc7x66ifAcdLdz7o3aLYfsjR6Zwca7TvC5E Ha0OfD9EsHGiF9909lPaRvG4buWFUfPBUPDkNHBLDwaQ53K5AQ0ET4b6XQEIALHepqzqtRkm cJc0bHDUGvVtlgf904+DjeDy9nvQfoXPZU/58tswd2oF7ucG7F088MYCaUE+4TR5AknJFvfI dx0YxX4WTzQoCJ7lBrI3DclYLkIfv+O3JIaYdLO1PugeMjbiIqkGZOJqPFoAjY9WCIoVZhlh LIAzsDGmo2w2GdK9f9xpCpWIzl3lLk/1oKLq60keaGSVTQP5OF9h+zNyVK9QUnN9i+wSbfDO wJ7bpepNeydC/BppLy701LUEzvqfg2EDJ2tp4A9z2wL0EXGxBp5IPQAa3RBdFqeBsfoBhlrM hSpR7z3TLYFgMtybEvq0GqRui6Ft8lCacKRKQPOinQcAEQEAAYkBHwQoAQgACQUCUxB9DQId AQAKCRAa5oYOVsvSkzGXCADErInRheCqYxnCs4ZDStLBKXr3HpUOg84E+5HF7qui0OmDq26H 9vyj4Bonvf06BWXyVx/MxORnn6pCrx2W2LLFopRb5CPdBfZ9d/JBttOTQf9s5WkG++P7/WTF yV3IqZyMfk9rTjAgYByVONSDCZgfjX0beQOgg8rSXYVsaqabBKOY48v+7STNTZ+OxvO7QFfK lTVLc20us3Z2xweFtgScAjm21b/HqS94bvy+Xn1do9rUm1U5sryvwpWDAanbVKN7j1++Rhfy rmAwjj9QUwOc85s6eDzFXfoJh3DIAmSmOpb3BLXYuRSyNMHtpHGPH3z7zNnejDYRbBi2lSPe SdKKiQEfBBgBAgAJBQJPhvpdAhsMAAoJEBrmhg5Wy9KTNfEH/R0zTYbvDdCEirZkfJYD4Sbr vPazhGvCihGra+H0O4C/oZmDhKmf8hy3D0LxsWwJS0exdEoXirwBJOAdWhcBlCz6NEs7jtHf 1rVTBGxmveSU5v+pn4spljJVn/FInw9TAys8z0ezptMm3qDzPEv0UE26FFNVi6cHeJoPaVSZ StMa+eRjkhzX+Ju0vj9ZL5d8YJhI9eM1TKvciQTVhZbECuXIon4e7BaX7sVnRFW7YCHcacyJ ii10iwNLzq6CgL8RUxgawat78VenlJmisneR221no5mn2NbmuXXJ3sPZcaVii3apAtu1bdAp Lvi7U2N99uVfgQoZ3MDXCSUuyDJgc+s= Message-ID: <6e71c270-0662-64dd-9591-4a8aef986c8c@FreeBSD.org> Date: Wed, 4 Mar 2020 16:03:08 +0100 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:68.0) Gecko/20100101 Thunderbird/68.5.0 MIME-Version: 1.0 In-Reply-To: <3d54ebc3-a511-a239-136d-c0f638a69351@FreeBSD.org> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages 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, 04 Mar 2020 15:03:11 -0000 On 04/03/20 12:27, Guido Falsi wrote: > > Actually this causes emulators/virtualbox-ose port to fail to build: > > In file included from /usr/src/sys/sys/systm.h:44: > /usr/include/machine/atomic.h:230:1: error: invalid output constraint > '=@cce' in asm > ATOMIC_CMPSET(char); > ^ > /usr/include/machine/atomic.h:205:4: note: expanded from macro > 'ATOMIC_CMPSET' > : "=@cce" (res), /* 0 */ \ > ^ > /usr/include/machine/atomic.h:230:1: error: invalid output constraint > '=@cce' in asm > > (and so on) > > > the virtualbox-ose port is forced to use an older clang version due to > crashes when compiled with newer ones. > > Not sure whose responsibility is to fix this. > > Should I file a bug report on bugzilla? > Adding: .if ${.CURDIR:M*emulators/virtualbox-ose} USE_GCC=9 .endif to make.conf seems to be a good workaround. Writing this here for the record. -- Guido Falsi From owner-svn-src-all@freebsd.org Wed Mar 4 16:21:01 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 16466272915; Wed, 4 Mar 2020 16:21:01 +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 48XfJD5zcwz44DQ; Wed, 4 Mar 2020 16:21:00 +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 364E420A6E; Wed, 4 Mar 2020 16:21:00 +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 024GL0FW047496; Wed, 4 Mar 2020 16:21:00 GMT (envelope-from bz@FreeBSD.org) Received: (from bz@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 024GKx3w047490; Wed, 4 Mar 2020 16:20:59 GMT (envelope-from bz@FreeBSD.org) Message-Id: <202003041620.024GKx3w047490@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bz set sender to bz@FreeBSD.org using -f From: "Bjoern A. Zeeb" Date: Wed, 4 Mar 2020 16:20:59 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r358620 - in head: sys/netinet usr.bin/netstat X-SVN-Group: head X-SVN-Commit-Author: bz X-SVN-Commit-Paths: in head: sys/netinet usr.bin/netstat X-SVN-Commit-Revision: 358620 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages 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, 04 Mar 2020 16:21:01 -0000 Author: bz Date: Wed Mar 4 16:20:59 2020 New Revision: 358620 URL: https://svnweb.freebsd.org/changeset/base/358620 Log: Add new ICMPv6 counters for Anti-DoS limits. Add four new counters for ND6 related Anti-DoS measures. We split these out into a separate upfront commit so that we only change the struct size one time. Implementations using them will follow. PR: 157410 Reviewed by: melifaro MFC after: 2 weeks X-MFC: cannot really MFC this without breaking netstat Sponsored by: Netflix (initially) Differential Revision: https://reviews.freebsd.org/D22711 Modified: head/sys/netinet/icmp6.h head/usr.bin/netstat/inet6.c Modified: head/sys/netinet/icmp6.h ============================================================================== --- head/sys/netinet/icmp6.h Wed Mar 4 14:56:32 2020 (r358619) +++ head/sys/netinet/icmp6.h Wed Mar 4 16:20:59 2020 (r358620) @@ -635,6 +635,10 @@ struct icmp6stat { uint64_t icp6s_badrs; /* bad router solicitation */ uint64_t icp6s_badra; /* bad router advertisement */ uint64_t icp6s_badredirect; /* bad redirect message */ + uint64_t icp6s_overflowdefrtr; /* Too many default routers. */ + uint64_t icp6s_overflowprfx; /* Too many prefixes. */ + uint64_t icp6s_overflownndp; /* Too many neighbour entries. */ + uint64_t icp6s_overflowredirect;/* Too many redirects. */ }; #ifdef _KERNEL Modified: head/usr.bin/netstat/inet6.c ============================================================================== --- head/usr.bin/netstat/inet6.c Wed Mar 4 14:56:32 2020 (r358619) +++ head/usr.bin/netstat/inet6.c Wed Mar 4 16:20:59 2020 (r358620) @@ -1055,6 +1055,14 @@ icmp6_stats(u_long off, const char *name, int af1 __un "{N:/bad router advertisement message%s}\n"); p(icp6s_badredirect, "\t{:bad-redirect/%ju} " "{N:/bad redirect message%s}\n"); + p(icp6s_overflowdefrtr, "\t{:default-routers-overflows/%ju} " + "{N:/default routers overflow%s}\n"); + p(icp6s_overflowprfx, "\t{:prefixes-overflows/%ju} " + "{N:/prefix overflow%s}\n"); + p(icp6s_overflownndp, "\t{:neighbour-entries-overflows/%ju} " + "{N:/neighbour entries overflow%s}\n"); + p(icp6s_overflowredirect, "\t{:redirect-overflows/%ju} " + "{N:/redirect overflow%s}\n"); xo_close_container("errors"); p(icp6s_pmtuchg, "\t{:path-mtu-changes/%ju} {N:/path MTU change%s}\n"); #undef p From owner-svn-src-all@freebsd.org Wed Mar 4 16:41:26 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id C7F64272E74; Wed, 4 Mar 2020 16:41:26 +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 48Xfln6kdrz40k6; Wed, 4 Mar 2020 16:41:25 +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 B334120E8B; Wed, 4 Mar 2020 16:41:25 +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 024GfPB5058467; Wed, 4 Mar 2020 16:41:25 GMT (envelope-from tuexen@FreeBSD.org) Received: (from tuexen@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 024GfPhV058466; Wed, 4 Mar 2020 16:41:25 GMT (envelope-from tuexen@FreeBSD.org) Message-Id: <202003041641.024GfPhV058466@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: tuexen set sender to tuexen@FreeBSD.org using -f From: Michael Tuexen Date: Wed, 4 Mar 2020 16:41:25 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r358621 - head/sys/netinet X-SVN-Group: head X-SVN-Commit-Author: tuexen X-SVN-Commit-Paths: head/sys/netinet X-SVN-Commit-Revision: 358621 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages 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, 04 Mar 2020 16:41:26 -0000 Author: tuexen Date: Wed Mar 4 16:41:25 2020 New Revision: 358621 URL: https://svnweb.freebsd.org/changeset/base/358621 Log: When using automatically generated flow labels and using TCP SYN cookies, use the same flow label for the segments sent during the handshake and after the handshake. This fixes a bug by making sure that sc_flowlabel is always stored in network byte order. Reviewed by: bz@ MFC after: 3 days Sponsored by: Netflix, Inc. Differential Revision: https://reviews.freebsd.org/D23957 Modified: head/sys/netinet/tcp_syncache.c Modified: head/sys/netinet/tcp_syncache.c ============================================================================== --- head/sys/netinet/tcp_syncache.c Wed Mar 4 16:20:59 2020 (r358620) +++ head/sys/netinet/tcp_syncache.c Wed Mar 4 16:41:25 2020 (r358621) @@ -2224,7 +2224,8 @@ syncookie_lookup(struct in_conninfo *inc, struct synca #ifdef INET6 case INC_ISIPV6: if (sotoinpcb(lso)->inp_flags & IN6P_AUTOFLOWLABEL) - sc->sc_flowlabel = sc->sc_iss & IPV6_FLOWLABEL_MASK; + sc->sc_flowlabel = + htonl(sc->sc_iss) & IPV6_FLOWLABEL_MASK; break; #endif } From owner-svn-src-all@freebsd.org Wed Mar 4 16:53:50 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 64C77273325; Wed, 4 Mar 2020 16:53:50 +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 48Xg260xW3z4Yng; Wed, 4 Mar 2020 16:53:50 +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 D602B211EB; Wed, 4 Mar 2020 16:53:49 +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 024Grn3f069613; Wed, 4 Mar 2020 16:53:49 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 024GrnN2069612; Wed, 4 Mar 2020 16:53:49 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <202003041653.024GrnN2069612@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Wed, 4 Mar 2020 16:53:49 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r358622 - head/usr.bin/elfctl X-SVN-Group: head X-SVN-Commit-Author: emaste X-SVN-Commit-Paths: head/usr.bin/elfctl X-SVN-Commit-Revision: 358622 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages 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, 04 Mar 2020 16:53:50 -0000 Author: emaste Date: Wed Mar 4 16:53:49 2020 New Revision: 358622 URL: https://svnweb.freebsd.org/changeset/base/358622 Log: elfctl: style(9): use C99 uintX_t types Sponsored by: The FreeBSD Foundation Modified: head/usr.bin/elfctl/elfctl.c Modified: head/usr.bin/elfctl/elfctl.c ============================================================================== --- head/usr.bin/elfctl/elfctl.c Wed Mar 4 16:41:25 2020 (r358621) +++ head/usr.bin/elfctl/elfctl.c Wed Mar 4 16:53:49 2020 (r358622) @@ -48,9 +48,9 @@ __FBSDID("$FreeBSD$"); -static bool convert_to_feature_val(char *, u_int32_t *); +static bool convert_to_feature_val(char *, uint32_t *); static bool edit_file_features(Elf *, int, int, char *); -static bool get_file_features(Elf *, int, int, u_int32_t *, u_int64_t *); +static bool get_file_features(Elf *, int, int, uint32_t *, uint64_t *); static void print_features(void); static bool print_file_features(Elf *, int, int, char *); static void usage(void); @@ -206,11 +206,11 @@ usage(void) } static bool -convert_to_feature_val(char *feature_str, u_int32_t *feature_val) +convert_to_feature_val(char *feature_str, uint32_t *feature_val) { char *feature; int i, len; - u_int32_t input; + uint32_t input; char operation; input = 0; @@ -247,8 +247,8 @@ convert_to_feature_val(char *feature_str, u_int32_t *f static bool edit_file_features(Elf *elf, int phcount, int fd, char *val) { - u_int32_t features; - u_int64_t off; + uint32_t features; + uint64_t off; if (!get_file_features(elf, phcount, fd, &features, &off)) { warnx("NT_FREEBSD_FEATURE_CTL note not found"); @@ -281,7 +281,7 @@ print_features(void) static bool print_file_features(Elf *elf, int phcount, int fd, char *filename) { - u_int32_t features; + uint32_t features; unsigned long i; if (!get_file_features(elf, phcount, fd, &features, NULL)) { @@ -302,8 +302,8 @@ print_file_features(Elf *elf, int phcount, int fd, cha } static bool -get_file_features(Elf *elf, int phcount, int fd, u_int32_t *features, - u_int64_t *off) +get_file_features(Elf *elf, int phcount, int fd, uint32_t *features, + uint64_t *off) { GElf_Phdr phdr; Elf_Note note; @@ -367,7 +367,7 @@ get_file_features(Elf *elf, int phcount, int fd, u_int continue; } - if (note.n_descsz < sizeof(u_int32_t)) { + if (note.n_descsz < sizeof(uint32_t)) { warnx("Feature descriptor can't " "be less than 4 bytes"); free(name); @@ -378,9 +378,9 @@ get_file_features(Elf *elf, int phcount, int fd, u_int * XXX: For now we look at only 4 bytes of the * descriptor. This should respect descsz. */ - if (note.n_descsz > sizeof(u_int32_t)) + if (note.n_descsz > sizeof(uint32_t)) warnx("Feature note is bigger than expected"); - read(fd, features, sizeof(u_int32_t)); + read(fd, features, sizeof(uint32_t)); if (off != NULL) *off = phdr.p_offset + read_total; free(name); From owner-svn-src-all@freebsd.org Wed Mar 4 16:57:24 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 6235727345F; Wed, 4 Mar 2020 16:57:24 +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 48Xg6D18YFz3FVN; Wed, 4 Mar 2020 16:57:24 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id D96DD211FF; Wed, 4 Mar 2020 16:57:23 +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 024GvNkf069987; Wed, 4 Mar 2020 16:57:23 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 024GvNJh069986; Wed, 4 Mar 2020 16:57:23 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <202003041657.024GvNJh069986@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Wed, 4 Mar 2020 16:57:23 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r358623 - head/usr.bin/elfctl X-SVN-Group: head X-SVN-Commit-Author: emaste X-SVN-Commit-Paths: head/usr.bin/elfctl X-SVN-Commit-Revision: 358623 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages 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, 04 Mar 2020 16:57:24 -0000 Author: emaste Date: Wed Mar 4 16:57:23 2020 New Revision: 358623 URL: https://svnweb.freebsd.org/changeset/base/358623 Log: elfctl: check read return value CID: 1420212, 1420213 Reported by: Coverity Scan Sponsored by: The FreeBSD Foundation Modified: head/usr.bin/elfctl/elfctl.c Modified: head/usr.bin/elfctl/elfctl.c ============================================================================== --- head/usr.bin/elfctl/elfctl.c Wed Mar 4 16:53:49 2020 (r358622) +++ head/usr.bin/elfctl/elfctl.c Wed Mar 4 16:57:23 2020 (r358623) @@ -310,7 +310,6 @@ get_file_features(Elf *elf, int phcount, int fd, uint3 unsigned long read_total; int namesz, descsz, i; char *name; - ssize_t size; /* * Go through each program header to find one that is of type PT_NOTE @@ -332,9 +331,9 @@ get_file_features(Elf *elf, int phcount, int fd, uint3 read_total = 0; while (read_total < phdr.p_filesz) { - size = read(fd, ¬e, sizeof(note)); - if (size < (ssize_t)sizeof(note)) { - warn("read() failed:"); + if (read(fd, ¬e, sizeof(note)) < + (ssize_t)sizeof(note)) { + warnx("elf note header too short"); return (false); } read_total += sizeof(note); @@ -350,7 +349,10 @@ get_file_features(Elf *elf, int phcount, int fd, uint3 return (false); } descsz = roundup2(note.n_descsz, 4); - size = read(fd, name, namesz); + if (read(fd, name, namesz) < namesz) { + warnx("elf note name too short"); + return (false); + } read_total += namesz; if (note.n_namesz != 8 || @@ -380,7 +382,11 @@ get_file_features(Elf *elf, int phcount, int fd, uint3 */ if (note.n_descsz > sizeof(uint32_t)) warnx("Feature note is bigger than expected"); - read(fd, features, sizeof(uint32_t)); + if (read(fd, features, sizeof(uint32_t)) < + (ssize_t)sizeof(uint32_t)) { + warnx("feature note data too short"); + return (false); + } if (off != NULL) *off = phdr.p_offset + read_total; free(name); From owner-svn-src-all@freebsd.org Wed Mar 4 17:13:37 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 87CE7273C55; Wed, 4 Mar 2020 17:13: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 48XgSw6dwGz44mk; Wed, 4 Mar 2020 17:13:36 +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 6DFF1215CB; Wed, 4 Mar 2020 17:13: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 024HDapm081587; Wed, 4 Mar 2020 17:13:36 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 024HDZs5081584; Wed, 4 Mar 2020 17:13:35 GMT (envelope-from kib@FreeBSD.org) Message-Id: <202003041713.024HDZs5081584@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Wed, 4 Mar 2020 17:13:35 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r358624 - in head/sys/dev/mlx5: . mlx5_en mlx5_ib X-SVN-Group: head X-SVN-Commit-Author: kib X-SVN-Commit-Paths: in head/sys/dev/mlx5: . mlx5_en mlx5_ib X-SVN-Commit-Revision: 358624 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages 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, 04 Mar 2020 17:13:37 -0000 Author: kib Date: Wed Mar 4 17:13:35 2020 New Revision: 358624 URL: https://svnweb.freebsd.org/changeset/base/358624 Log: mlx5en: Support 50GBase-KR4 media type in mlx5en driver. Submitted by: Adam Peace Reviewed by: hselasky Sponsored by: Mellanox Technologies MFC after: 1 week Modified: head/sys/dev/mlx5/mlx5_en/mlx5_en_main.c head/sys/dev/mlx5/mlx5_ib/mlx5_ib_main.c head/sys/dev/mlx5/port.h Modified: head/sys/dev/mlx5/mlx5_en/mlx5_en_main.c ============================================================================== --- head/sys/dev/mlx5/mlx5_en/mlx5_en_main.c Wed Mar 4 16:57:23 2020 (r358623) +++ head/sys/dev/mlx5/mlx5_en/mlx5_en_main.c Wed Mar 4 17:13:35 2020 (r358624) @@ -171,6 +171,10 @@ static const struct media mlx5e_mode_table[MLX5E_LINK_ .subtype = IFM_50G_KR2, .baudrate = IF_Gbps(50ULL), }, + [MLX5E_50GBASE_KR4][MLX5E_KR4] = { + .subtype = IFM_50G_KR4, + .baudrate = IF_Gbps(50ULL), + }, }; static const struct media mlx5e_ext_mode_table[MLX5E_EXT_LINK_SPEEDS_NUMBER][MLX5E_LINK_MODES_NUMBER] = { @@ -317,6 +321,10 @@ static const struct media mlx5e_ext_mode_table[MLX5E_E }, [MLX5E_50GAUI_2_LAUI_2_50GBASE_CR2_KR2][MLX5E_KR2] = { .subtype = IFM_50G_KR2, + .baudrate = IF_Gbps(50ULL), + }, + [MLX5E_50GAUI_2_LAUI_2_50GBASE_CR2_KR2][MLX5E_KR4] = { + .subtype = IFM_50G_KR4, .baudrate = IF_Gbps(50ULL), }, [MLX5E_50GAUI_2_LAUI_2_50GBASE_CR2_KR2][MLX5E_SR2] = { Modified: head/sys/dev/mlx5/mlx5_ib/mlx5_ib_main.c ============================================================================== --- head/sys/dev/mlx5/mlx5_ib/mlx5_ib_main.c Wed Mar 4 16:57:23 2020 (r358623) +++ head/sys/dev/mlx5/mlx5_ib/mlx5_ib_main.c Wed Mar 4 17:13:35 2020 (r358624) @@ -199,6 +199,7 @@ static int translate_eth_proto_oper(u32 eth_proto_oper break; case MLX5E_PROT_MASK(MLX5E_50GBASE_CR2): case MLX5E_PROT_MASK(MLX5E_50GBASE_KR2): + case MLX5E_PROT_MASK(MLX5E_50GBASE_KR4): case MLX5E_PROT_MASK(MLX5E_50GBASE_SR2): *active_width = IB_WIDTH_1X; *active_speed = IB_SPEED_HDR; Modified: head/sys/dev/mlx5/port.h ============================================================================== --- head/sys/dev/mlx5/port.h Wed Mar 4 16:57:23 2020 (r358623) +++ head/sys/dev/mlx5/port.h Wed Mar 4 17:13:35 2020 (r358624) @@ -95,6 +95,7 @@ enum mlx5e_link_speed { MLX5E_40GBASE_SR4 = 15, MLX5E_40GBASE_LR4_ER4 = 16, MLX5E_50GBASE_SR2 = 18, + MLX5E_50GBASE_KR4 = 19, MLX5E_100GBASE_CR4 = 20, MLX5E_100GBASE_SR4 = 21, MLX5E_100GBASE_KR4 = 22, From owner-svn-src-all@freebsd.org Wed Mar 4 17:17:03 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 468C0273F4B; Wed, 4 Mar 2020 17:17:03 +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 48XgXv06cWz4BmR; Wed, 4 Mar 2020 17:17:03 +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 DFDF8215D0; Wed, 4 Mar 2020 17:17:02 +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 024HH2g6081811; Wed, 4 Mar 2020 17:17:02 GMT (envelope-from bz@FreeBSD.org) Received: (from bz@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 024HH2eC081810; Wed, 4 Mar 2020 17:17:02 GMT (envelope-from bz@FreeBSD.org) Message-Id: <202003041717.024HH2eC081810@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bz set sender to bz@FreeBSD.org using -f From: "Bjoern A. Zeeb" Date: Wed, 4 Mar 2020 17:17:02 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r358625 - head/sys/net X-SVN-Group: head X-SVN-Commit-Author: bz X-SVN-Commit-Paths: head/sys/net X-SVN-Commit-Revision: 358625 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages 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, 04 Mar 2020 17:17:03 -0000 Author: bz Date: Wed Mar 4 17:17:02 2020 New Revision: 358625 URL: https://svnweb.freebsd.org/changeset/base/358625 Log: Implement optional table entry limits for if_llatbl. Implement counting of table entries linked on a per-table base with an optional (if set > 0) limit of the maximum number of table entries. For that the public lltable_link_entry() and lltable_unlink_entry() functions as well as the internal function pointers change from void to having an int return type. Given no consumer currently sets the new llt_maxentries this can be committed on its own. The moment we make use of the table limits, the callers of the link function must check the return value as it can change and entries might not be added. Adjustments for IPv6 (and possibly IPv4) will follow. Sponsored by: Netflix (originally) Reviewed by: melifaro MFC after: 2 weeks Differential Revision: https://reviews.freebsd.org/D22713 Modified: head/sys/net/if_llatbl.c head/sys/net/if_llatbl.h Modified: head/sys/net/if_llatbl.c ============================================================================== --- head/sys/net/if_llatbl.c Wed Mar 4 17:13:35 2020 (r358624) +++ head/sys/net/if_llatbl.c Wed Mar 4 17:17:02 2020 (r358625) @@ -153,17 +153,29 @@ htable_foreach_lle(struct lltable *llt, llt_foreach_cb return (error); } -static void +/* + * The htable_[un]link_entry() functions return: + * 0 if the entry was (un)linked already and nothing changed, + * 1 if the entry was added/removed to/from the table, and + * -1 on error (e.g., not being able to add the entry due to limits reached). + * While the "unlink" operation should never error, callers of + * lltable_link_entry() need to check for errors and handle them. + */ +static int htable_link_entry(struct lltable *llt, struct llentry *lle) { struct llentries *lleh; uint32_t hashidx; if ((lle->la_flags & LLE_LINKED) != 0) - return; + return (0); IF_AFDATA_WLOCK_ASSERT(llt->llt_ifp); + if (llt->llt_maxentries > 0 && + llt->llt_entries >= llt->llt_maxentries) + return (-1); + hashidx = llt->llt_hash(lle, llt->llt_hsize); lleh = &llt->lle_head[hashidx]; @@ -171,22 +183,33 @@ htable_link_entry(struct lltable *llt, struct llentry lle->lle_head = lleh; lle->la_flags |= LLE_LINKED; CK_LIST_INSERT_HEAD(lleh, lle, lle_next); + llt->llt_entries++; + + return (1); } -static void +static int htable_unlink_entry(struct llentry *lle) { + struct lltable *llt; if ((lle->la_flags & LLE_LINKED) == 0) - return; + return (0); - IF_AFDATA_WLOCK_ASSERT(lle->lle_tbl->llt_ifp); + llt = lle->lle_tbl; + IF_AFDATA_WLOCK_ASSERT(llt->llt_ifp); + KASSERT(llt->llt_entries > 0, ("%s: lltable %p (%s) entries %d <= 0", + __func__, llt, if_name(llt->llt_ifp), llt->llt_entries)); + CK_LIST_REMOVE(lle, lle_next); lle->la_flags &= ~(LLE_VALID | LLE_LINKED); #if 0 lle->lle_tbl = NULL; lle->lle_head = NULL; #endif + llt->llt_entries--; + + return (1); } struct prefix_match_data { @@ -483,6 +506,9 @@ lltable_free(struct lltable *llt) llentry_free(lle); } + KASSERT(llt->llt_entries == 0, ("%s: lltable %p (%s) entires not 0: %d", + __func__, llt, llt->llt_ifp->if_xname, llt->llt_entries)); + llt->llt_free_tbl(llt); } @@ -608,18 +634,18 @@ lltable_free_entry(struct lltable *llt, struct llentry llt->llt_free_entry(llt, lle); } -void +int lltable_link_entry(struct lltable *llt, struct llentry *lle) { - llt->llt_link_entry(llt, lle); + return (llt->llt_link_entry(llt, lle)); } -void +int lltable_unlink_entry(struct lltable *llt, struct llentry *lle) { - llt->llt_unlink_entry(lle); + return (llt->llt_unlink_entry(lle)); } void Modified: head/sys/net/if_llatbl.h ============================================================================== --- head/sys/net/if_llatbl.h Wed Mar 4 17:13:35 2020 (r358624) +++ head/sys/net/if_llatbl.h Wed Mar 4 17:17:02 2020 (r358625) @@ -151,8 +151,8 @@ typedef int (llt_match_prefix_t)(const struct sockaddr typedef void (llt_free_entry_t)(struct lltable *, struct llentry *); typedef void (llt_fill_sa_entry_t)(const struct llentry *, struct sockaddr *); typedef void (llt_free_tbl_t)(struct lltable *); -typedef void (llt_link_entry_t)(struct lltable *, struct llentry *); -typedef void (llt_unlink_entry_t)(struct llentry *); +typedef int (llt_link_entry_t)(struct lltable *, struct llentry *); +typedef int (llt_unlink_entry_t)(struct llentry *); typedef void (llt_mark_used_t)(struct llentry *); typedef int (llt_foreach_cb_t)(struct lltable *, struct llentry *, void *); @@ -162,6 +162,8 @@ struct lltable { SLIST_ENTRY(lltable) llt_link; int llt_af; int llt_hsize; + int llt_entries; + int llt_maxentries; struct llentries *lle_head; struct ifnet *llt_ifp; @@ -230,8 +232,8 @@ struct llentry *lltable_alloc_entry(struct lltable *ll void lltable_free_entry(struct lltable *llt, struct llentry *lle); int lltable_delete_addr(struct lltable *llt, u_int flags, const struct sockaddr *l3addr); -void lltable_link_entry(struct lltable *llt, struct llentry *lle); -void lltable_unlink_entry(struct lltable *llt, struct llentry *lle); +int lltable_link_entry(struct lltable *llt, struct llentry *lle); +int lltable_unlink_entry(struct lltable *llt, struct llentry *lle); void lltable_fill_sa_entry(const struct llentry *lle, struct sockaddr *sa); struct ifnet *lltable_get_ifp(const struct lltable *llt); int lltable_get_af(const struct lltable *llt); From owner-svn-src-all@freebsd.org Wed Mar 4 17:17:39 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 306B8273FBA; Wed, 4 Mar 2020 17:17:39 +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 48XgYZ3TsXz4Cm2; Wed, 4 Mar 2020 17:17:38 +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 1B4D6215FA; Wed, 4 Mar 2020 17:17:38 +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 024HHbrV081882; Wed, 4 Mar 2020 17:17:37 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 024HHbj8081881; Wed, 4 Mar 2020 17:17:37 GMT (envelope-from kib@FreeBSD.org) Message-Id: <202003041717.024HHbj8081881@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Wed, 4 Mar 2020 17:17: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: r358626 - stable/12/sys/net X-SVN-Group: stable-12 X-SVN-Commit-Author: kib X-SVN-Commit-Paths: stable/12/sys/net X-SVN-Commit-Revision: 358626 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages 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, 04 Mar 2020 17:17:39 -0000 Author: kib Date: Wed Mar 4 17:17:37 2020 New Revision: 358626 URL: https://svnweb.freebsd.org/changeset/base/358626 Log: MFC r357763: if_media.c: use __FBSDID(). Sponsored by: Mellanox Technologies Modified: stable/12/sys/net/if_media.c Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/net/if_media.c ============================================================================== --- stable/12/sys/net/if_media.c Wed Mar 4 17:17:02 2020 (r358625) +++ stable/12/sys/net/if_media.c Wed Mar 4 17:17:37 2020 (r358626) @@ -1,5 +1,4 @@ /* $NetBSD: if_media.c,v 1.1 1997/03/17 02:55:15 thorpej Exp $ */ -/* $FreeBSD$ */ /*- * SPDX-License-Identifier: BSD-4-Clause @@ -47,6 +46,9 @@ * Many thanks to Matt Thomas for providing the information necessary * to implement this interface. */ + +#include +__FBSDID("$FreeBSD$"); #include "opt_ifmedia.h" From owner-svn-src-all@freebsd.org Wed Mar 4 17:19:26 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id AC95A274074; Wed, 4 Mar 2020 17:19: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 48Xgbf28gxz4HZZ; Wed, 4 Mar 2020 17:19: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 11764215FF; Wed, 4 Mar 2020 17:19:26 +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 024HJPSu082015; Wed, 4 Mar 2020 17:19:25 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 024HJPn8082014; Wed, 4 Mar 2020 17:19:25 GMT (envelope-from kib@FreeBSD.org) Message-Id: <202003041719.024HJPn8082014@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Wed, 4 Mar 2020 17:19: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: r358627 - stable/12/sys/net X-SVN-Group: stable-12 X-SVN-Commit-Author: kib X-SVN-Commit-Paths: stable/12/sys/net X-SVN-Commit-Revision: 358627 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages 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, 04 Mar 2020 17:19:26 -0000 Author: kib Date: Wed Mar 4 17:19:25 2020 New Revision: 358627 URL: https://svnweb.freebsd.org/changeset/base/358627 Log: MFC r357764: if_media.c: staticize and constify ifmedia description structures used under IFMEDIA_DEBUG. Modified: stable/12/sys/net/if_media.c Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/net/if_media.c ============================================================================== --- stable/12/sys/net/if_media.c Wed Mar 4 17:17:37 2020 (r358626) +++ stable/12/sys/net/if_media.c Wed Mar 4 17:19:25 2020 (r358627) @@ -392,44 +392,47 @@ ifmedia_baudrate(int mword) } #ifdef IFMEDIA_DEBUG -struct ifmedia_description ifm_type_descriptions[] = +static const struct ifmedia_description ifm_type_descriptions[] = IFM_TYPE_DESCRIPTIONS; -struct ifmedia_description ifm_subtype_ethernet_descriptions[] = +static const struct ifmedia_description ifm_subtype_ethernet_descriptions[] = IFM_SUBTYPE_ETHERNET_DESCRIPTIONS; -struct ifmedia_description ifm_subtype_ethernet_option_descriptions[] = +static const struct ifmedia_description + ifm_subtype_ethernet_option_descriptions[] = IFM_SUBTYPE_ETHERNET_OPTION_DESCRIPTIONS; -struct ifmedia_description ifm_subtype_ieee80211_descriptions[] = +static const struct ifmedia_description ifm_subtype_ieee80211_descriptions[] = IFM_SUBTYPE_IEEE80211_DESCRIPTIONS; -struct ifmedia_description ifm_subtype_ieee80211_option_descriptions[] = +static const struct ifmedia_description + ifm_subtype_ieee80211_option_descriptions[] = IFM_SUBTYPE_IEEE80211_OPTION_DESCRIPTIONS; -struct ifmedia_description ifm_subtype_ieee80211_mode_descriptions[] = +static const struct ifmedia_description + ifm_subtype_ieee80211_mode_descriptions[] = IFM_SUBTYPE_IEEE80211_MODE_DESCRIPTIONS; -struct ifmedia_description ifm_subtype_atm_descriptions[] = +static const struct ifmedia_description ifm_subtype_atm_descriptions[] = IFM_SUBTYPE_ATM_DESCRIPTIONS; -struct ifmedia_description ifm_subtype_atm_option_descriptions[] = +static const struct ifmedia_description ifm_subtype_atm_option_descriptions[] = IFM_SUBTYPE_ATM_OPTION_DESCRIPTIONS; -struct ifmedia_description ifm_subtype_shared_descriptions[] = +static const struct ifmedia_description ifm_subtype_shared_descriptions[] = IFM_SUBTYPE_SHARED_DESCRIPTIONS; -struct ifmedia_description ifm_shared_option_descriptions[] = +static const struct ifmedia_description ifm_shared_option_descriptions[] = IFM_SHARED_OPTION_DESCRIPTIONS; struct ifmedia_type_to_subtype { - struct ifmedia_description *subtypes; - struct ifmedia_description *options; - struct ifmedia_description *modes; + const struct ifmedia_description *subtypes; + const struct ifmedia_description *options; + const struct ifmedia_description *modes; }; /* must be in the same order as IFM_TYPE_DESCRIPTIONS */ -struct ifmedia_type_to_subtype ifmedia_types_to_subtypes[] = { +static const struct ifmedia_type_to_subtype ifmedia_types_to_subtypes[] = { { &ifm_subtype_ethernet_descriptions[0], &ifm_subtype_ethernet_option_descriptions[0], @@ -454,8 +457,8 @@ static void ifmedia_printword(ifmw) int ifmw; { - struct ifmedia_description *desc; - struct ifmedia_type_to_subtype *ttos; + const struct ifmedia_description *desc; + const struct ifmedia_type_to_subtype *ttos; int seen_option = 0; /* Find the top-level interface type. */ From owner-svn-src-all@freebsd.org Wed Mar 4 17:21:50 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 2FDD5274132; Wed, 4 Mar 2020 17:21: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 48XgfP6rWcz4P1P; Wed, 4 Mar 2020 17:21:49 +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 CF35D21783; Wed, 4 Mar 2020 17:21:49 +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 024HLnmJ087310; Wed, 4 Mar 2020 17:21:49 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 024HLnKc087308; Wed, 4 Mar 2020 17:21:49 GMT (envelope-from kib@FreeBSD.org) Message-Id: <202003041721.024HLnKc087308@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Wed, 4 Mar 2020 17:21: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: r358628 - stable/12/sys/net X-SVN-Group: stable-12 X-SVN-Commit-Author: kib X-SVN-Commit-Paths: stable/12/sys/net X-SVN-Commit-Revision: 358628 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages 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, 04 Mar 2020 17:21:50 -0000 Author: kib Date: Wed Mar 4 17:21:49 2020 New Revision: 358628 URL: https://svnweb.freebsd.org/changeset/base/358628 Log: MFC r357765: if_media.h: Add 50G KR4 ethernet media type. Modified: stable/12/sys/net/ieee8023ad_lacp.c stable/12/sys/net/if_media.h Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/net/ieee8023ad_lacp.c ============================================================================== --- stable/12/sys/net/ieee8023ad_lacp.c Wed Mar 4 17:19:25 2020 (r358627) +++ stable/12/sys/net/ieee8023ad_lacp.c Wed Mar 4 17:21:49 2020 (r358628) @@ -1153,6 +1153,7 @@ lacp_compose_key(struct lacp_port *lp) case IFM_50G_PCIE: case IFM_50G_CR2: case IFM_50G_KR2: + case IFM_50G_KR4: case IFM_50G_SR2: case IFM_50G_LR2: case IFM_50G_LAUI2_AC: Modified: stable/12/sys/net/if_media.h ============================================================================== --- stable/12/sys/net/if_media.h Wed Mar 4 17:19:25 2020 (r358627) +++ stable/12/sys/net/if_media.h Wed Mar 4 17:21:49 2020 (r358628) @@ -258,6 +258,7 @@ uint64_t ifmedia_baudrate(int); #define IFM_400G_DR4 IFM_X(115) /* 400GBase-DR4 */ #define IFM_400G_AUI8_AC IFM_X(116) /* 400G-AUI8 active copper/optical */ #define IFM_400G_AUI8 IFM_X(117) /* 400G-AUI8 */ +#define IFM_50G_KR4 IFM_X(118) /* 50GBase-KR4 */ /* * Please update ieee8023ad_lacp.c:lacp_compose_key() @@ -484,6 +485,7 @@ struct ifmedia_description { { IFM_25G_SR, "25GBase-SR" }, \ { IFM_50G_CR2, "50GBase-CR2" }, \ { IFM_50G_KR2, "50GBase-KR2" }, \ + { IFM_50G_KR4, "50GBase-KR4" }, \ { IFM_25G_LR, "25GBase-LR" }, \ { IFM_10G_AOC, "10GBase-AOC" }, \ { IFM_25G_ACC, "25GBase-ACC" }, \ @@ -827,6 +829,7 @@ struct ifmedia_baudrate { { IFM_ETHER | IFM_25G_SR, IF_Gbps(25ULL) }, \ { IFM_ETHER | IFM_50G_CR2, IF_Gbps(50ULL) }, \ { IFM_ETHER | IFM_50G_KR2, IF_Gbps(50ULL) }, \ + { IFM_ETHER | IFM_50G_KR4, IF_Gbps(50ULL) }, \ { IFM_ETHER | IFM_25G_LR, IF_Gbps(25ULL) }, \ { IFM_ETHER | IFM_10G_AOC, IF_Gbps(10ULL) }, \ { IFM_ETHER | IFM_25G_ACC, IF_Gbps(25ULL) }, \ From owner-svn-src-all@freebsd.org Wed Mar 4 17:23:22 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id ABB2A274324; Wed, 4 Mar 2020 17:23:22 +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 48XghB2jlxz4SSL; Wed, 4 Mar 2020 17:23:22 +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 E1A47217D1; Wed, 4 Mar 2020 17:23:21 +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 024HNLaw088178; Wed, 4 Mar 2020 17:23:21 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 024HNLtZ088171; Wed, 4 Mar 2020 17:23:21 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <202003041723.024HNLtZ088171@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Wed, 4 Mar 2020 17:23:21 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r358629 - head/sys/dev/sound/pcm X-SVN-Group: head X-SVN-Commit-Author: hselasky X-SVN-Commit-Paths: head/sys/dev/sound/pcm X-SVN-Commit-Revision: 358629 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages 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, 04 Mar 2020 17:23:22 -0000 Author: hselasky Date: Wed Mar 4 17:23:20 2020 New Revision: 358629 URL: https://svnweb.freebsd.org/changeset/base/358629 Log: Implement a detaching flag for the sound(4) subsystem to take appropriate actions when we are trying to detach an audio device, but cannot because someone is using it. This avoids applications having to wait for the DSP read data timeout before they receive any error indication. Tested with virtual_oss(8). Remove some unused definitions while at it. PR: 194727 MFC after: 1 week Sponsored by: Mellanox Technologies Modified: head/sys/dev/sound/pcm/dsp.c head/sys/dev/sound/pcm/mixer.c head/sys/dev/sound/pcm/sound.c head/sys/dev/sound/pcm/sound.h Modified: head/sys/dev/sound/pcm/dsp.c ============================================================================== --- head/sys/dev/sound/pcm/dsp.c Wed Mar 4 17:21:49 2020 (r358628) +++ head/sys/dev/sound/pcm/dsp.c Wed Mar 4 17:23:20 2020 (r358629) @@ -460,7 +460,7 @@ dsp_open(struct cdev *i_dev, int flags, int mode, stru return (ENODEV); d = dsp_get_info(i_dev); - if (!PCM_REGISTERED(d)) + if (PCM_DETACHING(d) || !PCM_REGISTERED(d)) return (EBADF); PCM_GIANT_ENTER(d); @@ -830,7 +830,7 @@ dsp_io_ops(struct cdev *i_dev, struct uio *buf) ("%s(): io train wreck!", __func__)); d = dsp_get_info(i_dev); - if (!DSP_REGISTERED(d, i_dev)) + if (PCM_DETACHING(d) || !DSP_REGISTERED(d, i_dev)) return (EBADF); PCM_GIANT_ENTER(d); @@ -1075,7 +1075,7 @@ dsp_ioctl(struct cdev *i_dev, u_long cmd, caddr_t arg, int *arg_i, ret, tmp; d = dsp_get_info(i_dev); - if (!DSP_REGISTERED(d, i_dev)) + if (PCM_DETACHING(d) || !DSP_REGISTERED(d, i_dev)) return (EBADF); PCM_GIANT_ENTER(d); @@ -2170,9 +2170,11 @@ dsp_poll(struct cdev *i_dev, int events, struct thread int ret, e; d = dsp_get_info(i_dev); - if (!DSP_REGISTERED(d, i_dev)) - return (EBADF); - + if (PCM_DETACHING(d) || !DSP_REGISTERED(d, i_dev)) { + /* XXX many clients don't understand POLLNVAL */ + return (events & (POLLHUP | POLLPRI | POLLIN | + POLLRDNORM | POLLOUT | POLLWRNORM)); + } PCM_GIANT_ENTER(d); wrch = NULL; @@ -2246,7 +2248,7 @@ dsp_mmap_single(struct cdev *i_dev, vm_ooffset_t *offs return (EINVAL); d = dsp_get_info(i_dev); - if (!DSP_REGISTERED(d, i_dev)) + if (PCM_DETACHING(d) || !DSP_REGISTERED(d, i_dev)) return (EINVAL); PCM_GIANT_ENTER(d); Modified: head/sys/dev/sound/pcm/mixer.c ============================================================================== --- head/sys/dev/sound/pcm/mixer.c Wed Mar 4 17:21:49 2020 (r358628) +++ head/sys/dev/sound/pcm/mixer.c Wed Mar 4 17:23:20 2020 (r358629) @@ -153,7 +153,7 @@ mixer_set_softpcmvol(struct snd_mixer *m, struct sndde struct pcm_channel *c; int dropmtx, acquiremtx; - if (!PCM_REGISTERED(d)) + if (PCM_DETACHING(d) || !PCM_REGISTERED(d)) return (EINVAL); if (mtx_owned(m->lock)) @@ -206,7 +206,7 @@ mixer_set_eq(struct snd_mixer *m, struct snddev_info * else return (EINVAL); - if (!PCM_REGISTERED(d)) + if (PCM_DETACHING(d) || !PCM_REGISTERED(d)) return (EINVAL); if (mtx_owned(m->lock)) @@ -1046,7 +1046,7 @@ mixer_open(struct cdev *i_dev, int flags, int mode, st m = i_dev->si_drv1; d = device_get_softc(m->dev); - if (!PCM_REGISTERED(d)) + if (PCM_DETACHING(d) || !PCM_REGISTERED(d)) return (EBADF); /* XXX Need Giant magic entry ??? */ @@ -1202,7 +1202,7 @@ mixer_ioctl(struct cdev *i_dev, u_long cmd, caddr_t ar return (EBADF); d = device_get_softc(((struct snd_mixer *)i_dev->si_drv1)->dev); - if (!PCM_REGISTERED(d)) + if (PCM_DETACHING(d) || !PCM_REGISTERED(d)) return (EBADF); PCM_GIANT_ENTER(d); @@ -1411,7 +1411,7 @@ mixer_oss_mixerinfo(struct cdev *i_dev, oss_mixerinfo for (i = 0; pcm_devclass != NULL && i < devclass_get_maxunit(pcm_devclass); i++) { d = devclass_get_softc(pcm_devclass, i); - if (!PCM_REGISTERED(d)) + if (PCM_DETACHING(d) || !PCM_REGISTERED(d)) continue; /* XXX Need Giant magic entry */ Modified: head/sys/dev/sound/pcm/sound.c ============================================================================== --- head/sys/dev/sound/pcm/sound.c Wed Mar 4 17:21:49 2020 (r358628) +++ head/sys/dev/sound/pcm/sound.c Wed Mar 4 17:23:20 2020 (r358629) @@ -1162,6 +1162,8 @@ pcm_unregister(device_t dev) PCM_LOCK(d); PCM_WAIT(d); + d->flags |= SD_F_DETACHING; + if (d->inprog != 0) { device_printf(dev, "unregister: operation in progress\n"); PCM_UNLOCK(d); Modified: head/sys/dev/sound/pcm/sound.h ============================================================================== --- head/sys/dev/sound/pcm/sound.h Wed Mar 4 17:21:49 2020 (r358628) +++ head/sys/dev/sound/pcm/sound.h Wed Mar 4 17:23:20 2020 (r358629) @@ -131,15 +131,8 @@ struct snd_mixer; #define SD_F_SIMPLEX 0x00000001 #define SD_F_AUTOVCHAN 0x00000002 #define SD_F_SOFTPCMVOL 0x00000004 -/* - * Obsolete due to better matrixing - */ -#if 0 -#define SD_F_PSWAPLR 0x00000008 -#define SD_F_RSWAPLR 0x00000010 -#endif #define SD_F_DYING 0x00000008 -#define SD_F_SUICIDE 0x00000010 +#define SD_F_DETACHING 0x00000010 #define SD_F_BUSY 0x00000020 #define SD_F_MPSAFE 0x00000040 #define SD_F_REGISTERED 0x00000080 @@ -165,7 +158,7 @@ struct snd_mixer; "\002AUTOVCHAN" \ "\003SOFTPCMVOL" \ "\004DYING" \ - "\005SUICIDE" \ + "\005DETACHING" \ "\006BUSY" \ "\007MPSAFE" \ "\010REGISTERED" \ @@ -183,6 +176,8 @@ struct snd_mixer; !((x)->flags & SD_F_DYING)) #define PCM_REGISTERED(x) (PCM_ALIVE(x) && \ ((x)->flags & SD_F_REGISTERED)) + +#define PCM_DETACHING(x) ((x)->flags & SD_F_DETACHING) /* many variables should be reduced to a range. Here define a macro */ #define RANGE(var, low, high) (var) = \ From owner-svn-src-all@freebsd.org Wed Mar 4 17:27:11 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 50B3E274444; Wed, 4 Mar 2020 17:27:11 +0000 (UTC) (envelope-from rlibby@gmail.com) Received: from mail-qt1-f193.google.com (mail-qt1-f193.google.com [209.85.160.193]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1O1" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 48XgmZ5B9hz4dKb; Wed, 4 Mar 2020 17:27:10 +0000 (UTC) (envelope-from rlibby@gmail.com) Received: by mail-qt1-f193.google.com with SMTP id h16so1945043qtr.11; Wed, 04 Mar 2020 09:27:10 -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=+JhsfjFtzvfhY2IQ+wD7u7y8Uft+M34GGxsIluYbpIc=; b=E4wEVN6WahmrF5q7E7bJ/M3g3ZAa85hvP8tJZayRcwvX0CBRARV8owMnQChwJ4SnuL odVi6k5uRGcOP7WhwYsFGWQmybpIcrXd+jY68FG9W/4JniyBhaIWbcywZ9X1uER9Sx+Z +/9waqfiwj5/jEkLdRl+Pn5SS1V6TZ8pVZOu5ku45tPEX6F9rI/CnR1SV72M5Rx43mAq 1uccQ4H0zYeBEsKoK44zpG5NmEE9c+sbvIjOr6sk+pkUBfjg9nEzI9o/+XW3dootHcHl XZFjS2gs89Ide9hMosg29WSWPTWyIYqZyiWJ7pyeRi/Ik8St3gYEYncEMyxuYDQ3wVmv dhAA== X-Gm-Message-State: ANhLgQ0TQcw5avg57Jht22nxYJoW9VnuhfWfj7Ua4HqaaFLFrCR4tl9z P4WiyBaq9mNMfOuQTb6OCJnPULDQSnU= X-Google-Smtp-Source: ADFU+vsDb96ClaaawpkgS9S4UiiYub/+qEilSCqSjBhpC0EoP3AGkg/0At1X5crZV4Fp8mNJIlpuzg== X-Received: by 2002:ac8:6899:: with SMTP id m25mr3215818qtq.93.1583342828479; Wed, 04 Mar 2020 09:27:08 -0800 (PST) Received: from mail-qk1-f176.google.com (mail-qk1-f176.google.com. [209.85.222.176]) by smtp.gmail.com with ESMTPSA id a187sm14376346qkc.61.2020.03.04.09.27.08 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 04 Mar 2020 09:27:08 -0800 (PST) Received: by mail-qk1-f176.google.com with SMTP id b5so2407142qkh.8; Wed, 04 Mar 2020 09:27:08 -0800 (PST) X-Received: by 2002:a37:b984:: with SMTP id j126mr3770242qkf.3.1583342827765; Wed, 04 Mar 2020 09:27:07 -0800 (PST) MIME-Version: 1.0 References: <202002281832.01SIWaEL071685@repo.freebsd.org> <5767791583138727@sas1-c7aad230fe87.qloud-c.yandex.net> <3d54ebc3-a511-a239-136d-c0f638a69351@FreeBSD.org> In-Reply-To: <3d54ebc3-a511-a239-136d-c0f638a69351@FreeBSD.org> From: Ryan Libby Date: Wed, 4 Mar 2020 09:26:56 -0800 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: svn commit: r358439 - head/sys/amd64/include To: Guido Falsi Cc: "Alexander V. Chernikov" , "svn-src-head@freebsd.org" , "svn-src-all@freebsd.org" , "src-committers@freebsd.org" , vbox@freebsd.org Content-Type: text/plain; charset="UTF-8" X-Rspamd-Queue-Id: 48XgmZ5B9hz4dKb X-Spamd-Bar: ----- Authentication-Results: mx1.freebsd.org; none X-Spamd-Result: default: False [-5.71 / 15.00]; NEURAL_HAM_MEDIUM(-0.71)[-0.715,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, 04 Mar 2020 17:27:11 -0000 On Wed, Mar 4, 2020 at 3:27 AM Guido Falsi wrote: > > On 02/03/20 18:13, Ryan Libby wrote: > > On Mon, Mar 2, 2020 at 12:45 AM Alexander V. Chernikov wrote: > >> > >> 28.02.2020, 18:32, "Ryan Libby" : > >>> Author: rlibby > >>> Date: Fri Feb 28 18:32:36 2020 > >>> New Revision: 358439 > >>> URL: https://svnweb.freebsd.org/changeset/base/358439 > >>> > >>> Log: > >>> amd64 atomic.h: minor codegen optimization in flag access > >>> > >>> Previously the pattern to extract status flags from inline assembly > >>> blocks was to use setcc in the block to write the flag to a register. > >>> This was suboptimal in a few ways: > >>> - It would lead to code like: sete %cl; test %cl; jne, i.e. a flag > >>> would just be loaded into a register and then reloaded to a flag. > >>> - The setcc would force the block to use an additional register. > >>> - If the client code didn't care for the flag value then the setcc > >>> would be entirely pointless but could not be eliminated by the > >>> optimizer. > >>> > >>> A more modern inline asm construct (since gcc 6 and clang 9) allows for > >> This effectively restricts kernel builds by all older compilers. > >> Is there any chance of making it conditional depending on the compiler version/features? > > > > Yes, it is possible to test for __GCC_ASM_FLAG_OUTPUTS__. It is more > > maintenance effort going forward. If building current with an old cross > > compiler is an important scenario, we can either revert this and the > > following revision or work up a patch to make it conditional. I'll see > > what that might look like. > > > > Actually this causes emulators/virtualbox-ose port to fail to build: > > In file included from /usr/src/sys/sys/systm.h:44: > /usr/include/machine/atomic.h:230:1: error: invalid output constraint > '=@cce' in asm > ATOMIC_CMPSET(char); > ^ > /usr/include/machine/atomic.h:205:4: note: expanded from macro > 'ATOMIC_CMPSET' > : "=@cce" (res), /* 0 */ \ > ^ > /usr/include/machine/atomic.h:230:1: error: invalid output constraint > '=@cce' in asm > > (and so on) > > > the virtualbox-ose port is forced to use an older clang version due to > crashes when compiled with newer ones. > > Not sure whose responsibility is to fix this. > > Should I file a bug report on bugzilla? > > -- > Guido Falsi We've discussed whether to provide compatibility code for older compilers here: https://reviews.freebsd.org/D23937 There's a bug tracking virtualbox-ose being pinned to an old compiler here: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=236616 I see you have commented on that bug. From owner-svn-src-all@freebsd.org Wed Mar 4 17:43:09 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id CF032274901; Wed, 4 Mar 2020 17:43:09 +0000 (UTC) (envelope-from steffen@sdaoden.eu) Received: from sdaoden.eu (sdaoden.eu [217.144.132.164]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 48Xh701BRdz4MxN; Wed, 4 Mar 2020 17:43:08 +0000 (UTC) (envelope-from steffen@sdaoden.eu) Received: by sdaoden.eu (Postfix, from userid 1000) id 81FDC16054; Wed, 4 Mar 2020 18:43:00 +0100 (CET) Date: Wed, 04 Mar 2020 18:43:00 +0100 From: Steffen Nurpmeso To: Gordon Bergling Cc: Conrad Meyer , svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r358562 - in head: . share/man/man5 share/man/man7 tools/build/options tools/tools/nanobsd/dhcpd tools/tools/nanobsd/embedded usr.bin usr.bin/calendar usr.bin/calendar/calendars usr.bin... Message-ID: <20200304174300.oD1Or%steffen@sdaoden.eu> In-Reply-To: References: <202003030020.0230K9h2002380@repo.freebsd.org> Mail-Followup-To: Gordon Bergling , Conrad Meyer , svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org User-Agent: s-nail v14.9.17-52-g56288e6a OpenPGP: id=EE19E1C1F2F7054F8D3954D8308964B51883A0DD; url=https://ftp.sdaoden.eu/steffen.asc; preference=signencrypt BlahBlahBlah: Any stupid boy can crush a beetle. But all the professors in the world can make no bugs. X-Rspamd-Queue-Id: 48Xh701BRdz4MxN X-Spamd-Bar: / Authentication-Results: mx1.freebsd.org; dkim=none; dmarc=none; spf=pass (mx1.freebsd.org: domain of steffen@sdaoden.eu designates 217.144.132.164 as permitted sender) smtp.mailfrom=steffen@sdaoden.eu X-Spamd-Result: default: False [0.27 / 15.00]; ARC_NA(0.00)[]; NEURAL_HAM_MEDIUM(-0.27)[-0.272,0]; FROM_HAS_DN(0.00)[]; TO_DN_SOME(0.00)[]; R_SPF_ALLOW(-0.20)[+a]; NEURAL_HAM_LONG(-0.47)[-0.467,0]; MIME_GOOD(-0.10)[text/plain]; DMARC_NA(0.00)[sdaoden.eu]; RCPT_COUNT_FIVE(0.00)[5]; TO_MATCH_ENVRCPT_SOME(0.00)[]; MID_CONTAINS_FROM(1.00)[]; FREEMAIL_TO(0.00)[gmail.com]; RCVD_COUNT_ZERO(0.00)[0]; FROM_EQ_ENVFROM(0.00)[]; R_DKIM_NA(0.00)[]; MIME_TRACE(0.00)[0:+]; ASN(0.00)[asn:15987, ipnet:217.144.128.0/20, country:DE]; IP_SCORE(0.31)[asn: 15987(1.56), country: DE(-0.02)] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages 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, 04 Mar 2020 17:43:09 -0000 Hello Gordon. Gordon Bergling wrote in : |Thanks for the revert. I handcrafted https://reviews.freebsd.org/D23581 \ | a while ago, and this took me \ |two days. This is tremendous! Your work is exactly what i planned to do somewhen in the near future! The calendar port is a bit out of date and will get some love soon. (I want to merge all calendars from FreeBSD, NetBSD and OpenBSD plus some more, but that needs some time.) (2020-02-14) Thanks a lot for that, i will steal it!! Ciao, --steffen | |Der Kragenbaer, The moon bear, |der holt sich munter he cheerfully and one by one |einen nach dem anderen runter wa.ks himself off |(By Robert Gernhardt) From owner-svn-src-all@freebsd.org Wed Mar 4 17:55:58 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id E9DC3274B6E; Wed, 4 Mar 2020 17:55:58 +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 48XhPn6D9Rz3xy5; Wed, 4 Mar 2020 17:55:57 +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 A3A9921DBF; Wed, 4 Mar 2020 17:55:57 +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 024Htv2S006307; Wed, 4 Mar 2020 17:55:57 GMT (envelope-from brooks@FreeBSD.org) Received: (from brooks@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 024Htvv5006306; Wed, 4 Mar 2020 17:55:57 GMT (envelope-from brooks@FreeBSD.org) Message-Id: <202003041755.024Htvv5006306@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: brooks set sender to brooks@FreeBSD.org using -f From: Brooks Davis Date: Wed, 4 Mar 2020 17:55:57 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r358630 - head/sys/dev/bnxt X-SVN-Group: head X-SVN-Commit-Author: brooks X-SVN-Commit-Paths: head/sys/dev/bnxt X-SVN-Commit-Revision: 358630 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages 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, 04 Mar 2020 17:55:59 -0000 Author: brooks Date: Wed Mar 4 17:55:57 2020 New Revision: 358630 URL: https://svnweb.freebsd.org/changeset/base/358630 Log: bnxt(4): Fix ioctls when user addresses are inaccessable. Check copyin's error code (differ adding copyout checks at this time). Don't directly access user memory in the switch statement. Since bnxt_ioctl_data isn't all that big, use a stack allocation. Reviewed by: jhb MFC after: 3 days Sponsored by: DARPA Differential Revision: https://reviews.freebsd.org/D23933 Modified: head/sys/dev/bnxt/if_bnxt.c Modified: head/sys/dev/bnxt/if_bnxt.c ============================================================================== --- head/sys/dev/bnxt/if_bnxt.c Wed Mar 4 17:23:20 2020 (r358629) +++ head/sys/dev/bnxt/if_bnxt.c Wed Mar 4 17:55:57 2020 (r358630) @@ -1650,25 +1650,26 @@ bnxt_priv_ioctl(if_ctx_t ctx, u_long command, caddr_t { struct bnxt_softc *softc = iflib_get_softc(ctx); struct ifreq *ifr = (struct ifreq *)data; - struct ifreq_buffer *ifbuf = &ifr->ifr_ifru.ifru_buffer; - struct bnxt_ioctl_header *ioh = - (struct bnxt_ioctl_header *)(ifbuf->buffer); + struct bnxt_ioctl_header *ioh; + size_t iol; int rc = ENOTSUP; - struct bnxt_ioctl_data *iod = NULL; + struct bnxt_ioctl_data iod_storage, *iod = &iod_storage; + switch (command) { case SIOCGPRIVATE_0: if ((rc = priv_check(curthread, PRIV_DRIVER)) != 0) goto exit; - iod = malloc(ifbuf->length, M_DEVBUF, M_NOWAIT | M_ZERO); - if (!iod) { - rc = ENOMEM; + ioh = ifr_buffer_get_buffer(ifr); + iol = ifr_buffer_get_length(ifr); + if (iol > sizeof(iod_storage)) + return (EINVAL); + + if ((rc = copyin(ioh, iod, iol)) != 0) goto exit; - } - copyin(ioh, iod, ifbuf->length); - switch (ioh->type) { + switch (iod->hdr.type) { case BNXT_HWRM_NVM_FIND_DIR_ENTRY: { struct bnxt_ioctl_hwrm_nvm_find_dir_entry *find = @@ -1686,7 +1687,7 @@ bnxt_priv_ioctl(if_ctx_t ctx, u_long command, caddr_t } else { iod->hdr.rc = 0; - copyout(iod, ioh, ifbuf->length); + copyout(iod, ioh, iol); } rc = 0; @@ -1726,7 +1727,7 @@ bnxt_priv_ioctl(if_ctx_t ctx, u_long command, caddr_t remain -= csize; } if (iod->hdr.rc == 0) - copyout(iod, ioh, ifbuf->length); + copyout(iod, ioh, iol); iflib_dma_free(&dma_data); rc = 0; @@ -1746,7 +1747,7 @@ bnxt_priv_ioctl(if_ctx_t ctx, u_long command, caddr_t } else { iod->hdr.rc = 0; - copyout(iod, ioh, ifbuf->length); + copyout(iod, ioh, iol); } rc = 0; @@ -1766,7 +1767,7 @@ bnxt_priv_ioctl(if_ctx_t ctx, u_long command, caddr_t } else { iod->hdr.rc = 0; - copyout(iod, ioh, ifbuf->length); + copyout(iod, ioh, iol); } rc = 0; @@ -1788,7 +1789,7 @@ bnxt_priv_ioctl(if_ctx_t ctx, u_long command, caddr_t } else { iod->hdr.rc = 0; - copyout(iod, ioh, ifbuf->length); + copyout(iod, ioh, iol); } rc = 0; @@ -1807,7 +1808,7 @@ bnxt_priv_ioctl(if_ctx_t ctx, u_long command, caddr_t } else { iod->hdr.rc = 0; - copyout(iod, ioh, ifbuf->length); + copyout(iod, ioh, iol); } rc = 0; @@ -1827,7 +1828,7 @@ bnxt_priv_ioctl(if_ctx_t ctx, u_long command, caddr_t } else { iod->hdr.rc = 0; - copyout(iod, ioh, ifbuf->length); + copyout(iod, ioh, iol); } rc = 0; @@ -1854,7 +1855,7 @@ bnxt_priv_ioctl(if_ctx_t ctx, u_long command, caddr_t copyout(dma_data.idi_vaddr, get->data, get->entry_length * get->entries); iod->hdr.rc = 0; - copyout(iod, ioh, ifbuf->length); + copyout(iod, ioh, iol); } iflib_dma_free(&dma_data); @@ -1875,7 +1876,7 @@ bnxt_priv_ioctl(if_ctx_t ctx, u_long command, caddr_t } else { iod->hdr.rc = 0; - copyout(iod, ioh, ifbuf->length); + copyout(iod, ioh, iol); } rc = 0; @@ -1897,7 +1898,7 @@ bnxt_priv_ioctl(if_ctx_t ctx, u_long command, caddr_t } else { iod->hdr.rc = 0; - copyout(iod, ioh, ifbuf->length); + copyout(iod, ioh, iol); } rc = 0; @@ -1916,7 +1917,7 @@ bnxt_priv_ioctl(if_ctx_t ctx, u_long command, caddr_t } else { iod->hdr.rc = 0; - copyout(iod, ioh, ifbuf->length); + copyout(iod, ioh, iol); } rc = 0; @@ -1937,7 +1938,7 @@ bnxt_priv_ioctl(if_ctx_t ctx, u_long command, caddr_t } else { iod->hdr.rc = 0; - copyout(iod, ioh, ifbuf->length); + copyout(iod, ioh, iol); } rc = 0; @@ -1958,7 +1959,7 @@ bnxt_priv_ioctl(if_ctx_t ctx, u_long command, caddr_t } else { iod->hdr.rc = 0; - copyout(iod, ioh, ifbuf->length); + copyout(iod, ioh, iol); } rc = 0; @@ -1969,8 +1970,6 @@ bnxt_priv_ioctl(if_ctx_t ctx, u_long command, caddr_t } exit: - if (iod) - free(iod, M_DEVBUF); return rc; } From owner-svn-src-all@freebsd.org Wed Mar 4 18:21:35 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 20BD82754D4; Wed, 4 Mar 2020 18:21:35 +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 48XhzK3jlrz3Gbk; Wed, 4 Mar 2020 18:21:32 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id CFE042225C; Wed, 4 Mar 2020 18:21:31 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 024ILV8x021462; Wed, 4 Mar 2020 18:21:31 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 024ILVPO021459; Wed, 4 Mar 2020 18:21:31 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <202003041821.024ILVPO021459@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Wed, 4 Mar 2020 18:21:31 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r358631 - in head: contrib/elftoolchain/readelf sys/sys usr.bin/elfctl X-SVN-Group: head X-SVN-Commit-Author: emaste X-SVN-Commit-Paths: in head: contrib/elftoolchain/readelf sys/sys usr.bin/elfctl X-SVN-Commit-Revision: 358631 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages 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, 04 Mar 2020 18:21:35 -0000 Author: emaste Date: Wed Mar 4 18:21:30 2020 New Revision: 358631 URL: https://svnweb.freebsd.org/changeset/base/358631 Log: Reserve WXNEEDED ELF feature control flag This will be used to tag binaries that require W+X mappings, in advance of the ability to prevent W^X in mmap/mprotect. There is still some discussion about the flag's name, but the ABI won't change even if the name does (as kib pointed out in the review). Reviewed by: csjp, kib Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D23909 Modified: head/contrib/elftoolchain/readelf/readelf.c head/sys/sys/elf_common.h head/usr.bin/elfctl/elfctl.c Modified: head/contrib/elftoolchain/readelf/readelf.c ============================================================================== --- head/contrib/elftoolchain/readelf/readelf.c Wed Mar 4 17:55:57 2020 (r358630) +++ head/contrib/elftoolchain/readelf/readelf.c Wed Mar 4 18:21:30 2020 (r358631) @@ -3671,6 +3671,7 @@ static struct flag_desc note_feature_ctl_flags[] = { { NT_FREEBSD_FCTL_ASLR_DISABLE, "ASLR_DISABLE" }, { NT_FREEBSD_FCTL_PROTMAX_DISABLE, "PROTMAX_DISABLE" }, { NT_FREEBSD_FCTL_STKGAP_DISABLE, "STKGAP_DISABLE" }, + { NT_FREEBSD_FCTL_WXNEEDED, "WXNEEDED" }, { 0, NULL } }; Modified: head/sys/sys/elf_common.h ============================================================================== --- head/sys/sys/elf_common.h Wed Mar 4 17:55:57 2020 (r358630) +++ head/sys/sys/elf_common.h Wed Mar 4 18:21:30 2020 (r358631) @@ -790,6 +790,7 @@ typedef struct { #define NT_FREEBSD_FCTL_ASLR_DISABLE 0x00000001 #define NT_FREEBSD_FCTL_PROTMAX_DISABLE 0x00000002 #define NT_FREEBSD_FCTL_STKGAP_DISABLE 0x00000004 +#define NT_FREEBSD_FCTL_WXNEEDED 0x00000008 /* Values for n_type. Used in core files. */ #define NT_PRSTATUS 1 /* Process status. */ Modified: head/usr.bin/elfctl/elfctl.c ============================================================================== --- head/usr.bin/elfctl/elfctl.c Wed Mar 4 17:55:57 2020 (r358630) +++ head/usr.bin/elfctl/elfctl.c Wed Mar 4 18:21:30 2020 (r358631) @@ -66,6 +66,7 @@ static struct ControlFeatures featurelist[] = { { "protmax", NT_FREEBSD_FCTL_PROTMAX_DISABLE, "Disable implicit PROT_MAX" }, { "stackgap", NT_FREEBSD_FCTL_STKGAP_DISABLE, "Disable stack gap" }, + { "wxneeded", NT_FREEBSD_FCTL_WXNEEDED, "Requires W+X mappings" }, }; static struct option long_opts[] = { From owner-svn-src-all@freebsd.org Wed Mar 4 18:28:05 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id AFE6127566D; Wed, 4 Mar 2020 18:28:05 +0000 (UTC) (envelope-from brooks@spindle.one-eyed-alien.net) Received: from spindle.one-eyed-alien.net (spindle.one-eyed-alien.net [199.48.129.229]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 48Xj6r1G7Bz3Nb2; Wed, 4 Mar 2020 18:28:04 +0000 (UTC) (envelope-from brooks@spindle.one-eyed-alien.net) Received: by spindle.one-eyed-alien.net (Postfix, from userid 3001) id A25F53C0199; Wed, 4 Mar 2020 18:28:01 +0000 (UTC) Date: Wed, 4 Mar 2020 18:28:01 +0000 From: Brooks Davis To: Guido Falsi Cc: Ryan Libby , "Alexander V. Chernikov" , "svn-src-head@freebsd.org" , "svn-src-all@freebsd.org" , "src-committers@freebsd.org" , vbox@FreeBSD.org Subject: Re: svn commit: r358439 - head/sys/amd64/include Message-ID: <20200304182801.GA95422@spindle.one-eyed-alien.net> References: <202002281832.01SIWaEL071685@repo.freebsd.org> <5767791583138727@sas1-c7aad230fe87.qloud-c.yandex.net> <3d54ebc3-a511-a239-136d-c0f638a69351@FreeBSD.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="BXVAT5kNtrzKuDFl" Content-Disposition: inline In-Reply-To: <3d54ebc3-a511-a239-136d-c0f638a69351@FreeBSD.org> User-Agent: Mutt/1.9.4 (2018-02-28) X-Rspamd-Queue-Id: 48Xj6r1G7Bz3Nb2 X-Spamd-Bar: ---- Authentication-Results: mx1.freebsd.org; none X-Spamd-Result: default: False [-4.49 / 15.00]; REPLY(-4.00)[]; NEURAL_SPAM_MEDIUM(0.51)[0.510,0]; 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, 04 Mar 2020 18:28:05 -0000 --BXVAT5kNtrzKuDFl Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Wed, Mar 04, 2020 at 12:27:08PM +0100, Guido Falsi wrote: > On 02/03/20 18:13, Ryan Libby wrote: > > On Mon, Mar 2, 2020 at 12:45 AM Alexander V. Chernikov wrote: > >> > >> 28.02.2020, 18:32, "Ryan Libby" : > >>> Author: rlibby > >>> Date: Fri Feb 28 18:32:36 2020 > >>> New Revision: 358439 > >>> URL: https://svnweb.freebsd.org/changeset/base/358439 > >>> > >>> Log: > >>> amd64 atomic.h: minor codegen optimization in flag access > >>> > >>> Previously the pattern to extract status flags from inline assembly > >>> blocks was to use setcc in the block to write the flag to a registe= r. > >>> This was suboptimal in a few ways: > >>> - It would lead to code like: sete %cl; test %cl; jne, i.e. a flag > >>> would just be loaded into a register and then reloaded to a flag. > >>> - The setcc would force the block to use an additional register. > >>> - If the client code didn't care for the flag value then the setcc > >>> would be entirely pointless but could not be eliminated by the > >>> optimizer. > >>> > >>> A more modern inline asm construct (since gcc 6 and clang 9) allows= for > >> This effectively restricts kernel builds by all older compilers. > >> Is there any chance of making it conditional depending on the compiler= version/features? > >=20 > > Yes, it is possible to test for __GCC_ASM_FLAG_OUTPUTS__. It is more > > maintenance effort going forward. If building current with an old cross > > compiler is an important scenario, we can either revert this and the > > following revision or work up a patch to make it conditional. I'll see > > what that might look like. > >=20 >=20 > Actually this causes emulators/virtualbox-ose port to fail to build: >=20 > In file included from /usr/src/sys/sys/systm.h:44: > /usr/include/machine/atomic.h:230:1: error: invalid output constraint > '=3D@cce' in asm > ATOMIC_CMPSET(char); > ^ > /usr/include/machine/atomic.h:205:4: note: expanded from macro > 'ATOMIC_CMPSET' > : "=3D@cce" (res), /* 0 */ \ > ^ > /usr/include/machine/atomic.h:230:1: error: invalid output constraint > '=3D@cce' in asm >=20 > (and so on) >=20 >=20 > the virtualbox-ose port is forced to use an older clang version due to > crashes when compiled with newer ones. >=20 > Not sure whose responsibility is to fix this. I suspect that now that we don't care about gcc 4.2.1, we should restructure machine/atomic.h to use __atomic compiler builtins in nearly all cases. We could then conditionalize small sets of mircooptimized assembly versions based on the availability of compiler features if they add any value. On CheriBSD we've switched the RISC-V to use the C versions and are overdue to do the same to MIPS. Reworking things to make this the default would decrease our maintenance burden and it seems unlikely that most of our platforms would benefit from handcode assembly (given the general level of optimization in our lower-tier platforms). -- Brooks --BXVAT5kNtrzKuDFl Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQEcBAEBAgAGBQJeX/MwAAoJEKzQXbSebgfANZEH/2FpA8Ft7xKiaPRT6Bol7o9x l9TMA1FppM58LEHjDF1VySrWvJfkFJTqsx3X6xdByjabTV51KqrPfjupBCV+9T/3 pN7goV9AC43Y8ZhqkIlgz/nGGy547gEEtTV36wRzMRFLx8MhiehlYisUoi87DYZh wQ/XYep8/XKc0Z7HnaxgRWE8mnoUCvyHG52bMMmnCPa/gjLf/klj5nL+XEKucONi QFxedNSBp4CiyR4KjBodMR5WXsWsvFLb4WuZeMdW75A+mE1rN+6/a+vIVg7xQVOr VTUHhPov6Giv11oUIHlWOk12uTh0Wky8cbyvNFPfVPvAnS6HJ8ScQhWkSqG0qvY= =2Yo5 -----END PGP SIGNATURE----- --BXVAT5kNtrzKuDFl-- From owner-svn-src-all@freebsd.org Wed Mar 4 18:38:11 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 47E662759B3; Wed, 4 Mar 2020 18:38:11 +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 48XjLV3xx4z43W4; Wed, 4 Mar 2020 18:38:10 +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 5E0862259B; Wed, 4 Mar 2020 18:38:10 +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 024IcADw030872; Wed, 4 Mar 2020 18:38:10 GMT (envelope-from tsoome@FreeBSD.org) Received: (from tsoome@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 024Ic9fA030868; Wed, 4 Mar 2020 18:38:09 GMT (envelope-from tsoome@FreeBSD.org) Message-Id: <202003041838.024Ic9fA030868@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: tsoome set sender to tsoome@FreeBSD.org using -f From: Toomas Soome Date: Wed, 4 Mar 2020 18:38:09 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r358632 - in head/stand/i386: gptboot isoboot X-SVN-Group: head X-SVN-Commit-Author: tsoome X-SVN-Commit-Paths: in head/stand/i386: gptboot isoboot X-SVN-Commit-Revision: 358632 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages 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, 04 Mar 2020 18:38:11 -0000 Author: tsoome Date: Wed Mar 4 18:38:09 2020 New Revision: 358632 URL: https://svnweb.freebsd.org/changeset/base/358632 Log: loader: crc32 is provided by libsa Seems like leftover from moving crc32.c to libsa. Modified: head/stand/i386/gptboot/Makefile head/stand/i386/isoboot/Makefile Modified: head/stand/i386/gptboot/Makefile ============================================================================== --- head/stand/i386/gptboot/Makefile Wed Mar 4 18:21:30 2020 (r358631) +++ head/stand/i386/gptboot/Makefile Wed Mar 4 18:38:09 2020 (r358632) @@ -53,13 +53,13 @@ gptldr.bin: gptldr.out gptldr.out: gptldr.o ${LD} ${LD_FLAGS} -e start -Ttext ${ORG1} -o ${.TARGET} gptldr.o -CLEANFILES+= gptboot.bin gptboot.out gptboot.o sio.o crc32.o drv.o \ +CLEANFILES+= gptboot.bin gptboot.out gptboot.o sio.o drv.o \ cons.o ${OPENCRYPTO_XTS} gptboot.bin: gptboot.out ${OBJCOPY} -S -O binary gptboot.out ${.TARGET} -gptboot.out: ${BTXCRT} gptboot.o sio.o crc32.o drv.o cons.o ${OPENCRYPTO_XTS} +gptboot.out: ${BTXCRT} gptboot.o sio.o drv.o cons.o ${OPENCRYPTO_XTS} ${LD} ${LD_FLAGS} -Ttext ${ORG2} -o ${.TARGET} ${.ALLSRC} ${LIBSA32} .include Modified: head/stand/i386/isoboot/Makefile ============================================================================== --- head/stand/i386/isoboot/Makefile Wed Mar 4 18:21:30 2020 (r358631) +++ head/stand/i386/isoboot/Makefile Wed Mar 4 18:38:09 2020 (r358632) @@ -55,13 +55,13 @@ gptldr.bin: gptldr.out gptldr.out: gptldr.o ${LD} ${LD_FLAGS} -e start -Ttext ${ORG1} -o ${.TARGET} gptldr.o -CLEANFILES+= isoboot.bin isoboot.out isoboot.o sio.o crc32.o drv.o \ +CLEANFILES+= isoboot.bin isoboot.out isoboot.o sio.o drv.o \ cons.o ${OPENCRYPTO_XTS} isoboot.bin: isoboot.out ${OBJCOPY} -S -O binary isoboot.out ${.TARGET} -isoboot.out: ${BTXCRT} isoboot.o sio.o crc32.o drv.o cons.o ${OPENCRYPTO_XTS} +isoboot.out: ${BTXCRT} isoboot.o sio.o drv.o cons.o ${OPENCRYPTO_XTS} ${LD} ${LD_FLAGS} -Ttext ${ORG2} -o ${.TARGET} ${.ALLSRC} ${LIBSA32} .include From owner-svn-src-all@freebsd.org Wed Mar 4 18:49:14 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 01D07275C59; Wed, 4 Mar 2020 18:49:13 +0000 (UTC) (envelope-from rlibby@gmail.com) Received: from mail-qk1-f193.google.com (mail-qk1-f193.google.com [209.85.222.193]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1O1" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 48XjbF28bzz4Sg1; Wed, 4 Mar 2020 18:49:13 +0000 (UTC) (envelope-from rlibby@gmail.com) Received: by mail-qk1-f193.google.com with SMTP id j7so2449536qkd.5; Wed, 04 Mar 2020 10:49:13 -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=7/JKXD33FfO7O2i4fd06ltBtMN47rKz8oO0ClBGerbA=; b=Qq1xtd1IhHE85+JBYjiMCiwIXXviTQhRIxVBXokmvzpsrDgHyb3eg6eP1+cJLTr912 yVK7zmHnERTx+tngocfMFKsGbS0olDLzyQWMrGMCeXHKrnFMC1LhKvXvlt0P7piMnStL e4vmQrme9zjXCSkFbtCZtnXLVOViA27a/z0OiCGK9hok38/DbNOI2+G3GkRnBVMnywGr icyW3UD9G23vYElHzC5/jjeMAlK9V2ZGBwbbHYwFn+u9KFvzCNZCZCcQ2l9rruWOiiO/ pFdEGW0SZZOihvLx97aVGbaEd523jJ7/aUBowiZarbbfzVULwncCVAtJ7X+guOy54MPJ +Z4g== X-Gm-Message-State: ANhLgQ0ZO67sb7QTZ+3/wJIMm9tpH1lWaoTDXV4roAlzHaJJxBUX/x9r hxGcaBXxfkBzyHrQ2mP+QuOKl9WsbCM= X-Google-Smtp-Source: ADFU+vtX38GQD2oGx8aUhOHmNa1kvl3SFqkQdWNoHG7oHGSuQB801JY5JgxiC2QSqEo+soKTbbD1Kg== X-Received: by 2002:a05:620a:4f7:: with SMTP id b23mr4476794qkh.258.1583347751338; Wed, 04 Mar 2020 10:49:11 -0800 (PST) Received: from mail-qv1-f51.google.com (mail-qv1-f51.google.com. [209.85.219.51]) by smtp.gmail.com with ESMTPSA id h9sm14526890qtq.61.2020.03.04.10.49.11 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 04 Mar 2020 10:49:11 -0800 (PST) Received: by mail-qv1-f51.google.com with SMTP id u10so1268675qvi.2; Wed, 04 Mar 2020 10:49:11 -0800 (PST) X-Received: by 2002:a05:6214:8b:: with SMTP id n11mr3309011qvr.72.1583347750710; Wed, 04 Mar 2020 10:49:10 -0800 (PST) MIME-Version: 1.0 References: <202002281832.01SIWaEL071685@repo.freebsd.org> <5767791583138727@sas1-c7aad230fe87.qloud-c.yandex.net> <3d54ebc3-a511-a239-136d-c0f638a69351@FreeBSD.org> <20200304182801.GA95422@spindle.one-eyed-alien.net> In-Reply-To: <20200304182801.GA95422@spindle.one-eyed-alien.net> From: Ryan Libby Date: Wed, 4 Mar 2020 10:48:59 -0800 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: svn commit: r358439 - head/sys/amd64/include To: Brooks Davis Cc: Guido Falsi , "Alexander V. Chernikov" , "svn-src-head@freebsd.org" , "svn-src-all@freebsd.org" , "src-committers@freebsd.org" , vbox@freebsd.org Content-Type: text/plain; charset="UTF-8" X-Rspamd-Queue-Id: 48XjbF28bzz4Sg1 X-Spamd-Bar: ----- Authentication-Results: mx1.freebsd.org; none X-Spamd-Result: default: False [-5.72 / 15.00]; NEURAL_HAM_MEDIUM(-0.72)[-0.723,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: Wed, 04 Mar 2020 18:49:14 -0000 On Wed, Mar 4, 2020 at 10:28 AM Brooks Davis wrote: > > On Wed, Mar 04, 2020 at 12:27:08PM +0100, Guido Falsi wrote: > > On 02/03/20 18:13, Ryan Libby wrote: > > > On Mon, Mar 2, 2020 at 12:45 AM Alexander V. Chernikov wrote: > > >> > > >> 28.02.2020, 18:32, "Ryan Libby" : > > >>> Author: rlibby > > >>> Date: Fri Feb 28 18:32:36 2020 > > >>> New Revision: 358439 > > >>> URL: https://svnweb.freebsd.org/changeset/base/358439 > > >>> > > >>> Log: > > >>> amd64 atomic.h: minor codegen optimization in flag access > > >>> > > >>> Previously the pattern to extract status flags from inline assembly > > >>> blocks was to use setcc in the block to write the flag to a register. > > >>> This was suboptimal in a few ways: > > >>> - It would lead to code like: sete %cl; test %cl; jne, i.e. a flag > > >>> would just be loaded into a register and then reloaded to a flag. > > >>> - The setcc would force the block to use an additional register. > > >>> - If the client code didn't care for the flag value then the setcc > > >>> would be entirely pointless but could not be eliminated by the > > >>> optimizer. > > >>> > > >>> A more modern inline asm construct (since gcc 6 and clang 9) allows for > > >> This effectively restricts kernel builds by all older compilers. > > >> Is there any chance of making it conditional depending on the compiler version/features? > > > > > > Yes, it is possible to test for __GCC_ASM_FLAG_OUTPUTS__. It is more > > > maintenance effort going forward. If building current with an old cross > > > compiler is an important scenario, we can either revert this and the > > > following revision or work up a patch to make it conditional. I'll see > > > what that might look like. > > > > > > > Actually this causes emulators/virtualbox-ose port to fail to build: > > > > In file included from /usr/src/sys/sys/systm.h:44: > > /usr/include/machine/atomic.h:230:1: error: invalid output constraint > > '=@cce' in asm > > ATOMIC_CMPSET(char); > > ^ > > /usr/include/machine/atomic.h:205:4: note: expanded from macro > > 'ATOMIC_CMPSET' > > : "=@cce" (res), /* 0 */ \ > > ^ > > /usr/include/machine/atomic.h:230:1: error: invalid output constraint > > '=@cce' in asm > > > > (and so on) > > > > > > the virtualbox-ose port is forced to use an older clang version due to > > crashes when compiled with newer ones. > > > > Not sure whose responsibility is to fix this. > > I suspect that now that we don't care about gcc 4.2.1, we should > restructure machine/atomic.h to use __atomic compiler builtins in nearly > all cases. We could then conditionalize small sets of mircooptimized > assembly versions based on the availability of compiler features if they > add any value. > > On CheriBSD we've switched the RISC-V to use the C versions and are > overdue to do the same to MIPS. Reworking things to make this the > default would decrease our maintenance burden and it seems unlikely that > most of our platforms would benefit from handcode assembly (given the > general level of optimization in our lower-tier platforms). > > -- Brooks There's further discussion on that topic in the original review (D23869) and in D23661. From owner-svn-src-all@freebsd.org Wed Mar 4 19:52:01 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id E7F472771AA; Wed, 4 Mar 2020 19:52:01 +0000 (UTC) (envelope-from mjg@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 48Xkzh74BDz4R3w; Wed, 4 Mar 2020 19:52:00 +0000 (UTC) (envelope-from mjg@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id B202623479; Wed, 4 Mar 2020 19:52:00 +0000 (UTC) (envelope-from mjg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 024Jq0aG081252; Wed, 4 Mar 2020 19:52:00 GMT (envelope-from mjg@FreeBSD.org) Received: (from mjg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 024Jq0Zq081251; Wed, 4 Mar 2020 19:52:00 GMT (envelope-from mjg@FreeBSD.org) Message-Id: <202003041952.024Jq0Zq081251@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mjg set sender to mjg@FreeBSD.org using -f From: Mateusz Guzik Date: Wed, 4 Mar 2020 19:52:00 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r358633 - head/sys/fs/nullfs X-SVN-Group: head X-SVN-Commit-Author: mjg X-SVN-Commit-Paths: head/sys/fs/nullfs X-SVN-Commit-Revision: 358633 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages 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, 04 Mar 2020 19:52:02 -0000 Author: mjg Date: Wed Mar 4 19:52:00 2020 New Revision: 358633 URL: https://svnweb.freebsd.org/changeset/base/358633 Log: nullfs: don't pre lock exclusive in nullfs_root Reviewed by: kib Differential Revision: https://reviews.freebsd.org/D23955 Modified: head/sys/fs/nullfs/null_vfsops.c Modified: head/sys/fs/nullfs/null_vfsops.c ============================================================================== --- head/sys/fs/nullfs/null_vfsops.c Wed Mar 4 18:38:09 2020 (r358632) +++ head/sys/fs/nullfs/null_vfsops.c Wed Mar 4 19:52:00 2020 (r358633) @@ -281,13 +281,10 @@ nullfs_root(mp, flags, vpp) NULLFSDEBUG("nullfs_root(mp = %p, vp = %p)\n", mp, mntdata->nullm_lowerrootvp); - error = vget(mntdata->nullm_lowerrootvp, (flags & ~LK_TYPE_MASK) | - LK_EXCLUSIVE, curthread); + error = vget(mntdata->nullm_lowerrootvp, flags, curthread); if (error == 0) { error = null_nodeget(mp, mntdata->nullm_lowerrootvp, &vp); if (error == 0) { - if ((flags & LK_TYPE_MASK) == LK_SHARED) - vn_lock(vp, LK_DOWNGRADE | LK_RETRY); *vpp = vp; } } From owner-svn-src-all@freebsd.org Wed Mar 4 19:52:35 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id C990F277253; Wed, 4 Mar 2020 19:52:35 +0000 (UTC) (envelope-from mjg@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 48Xl0M3ZbYz4SLV; Wed, 4 Mar 2020 19:52:35 +0000 (UTC) (envelope-from mjg@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 49CE8234B2; Wed, 4 Mar 2020 19:52:35 +0000 (UTC) (envelope-from mjg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 024JqZp6081318; Wed, 4 Mar 2020 19:52:35 GMT (envelope-from mjg@FreeBSD.org) Received: (from mjg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 024JqZb4081317; Wed, 4 Mar 2020 19:52:35 GMT (envelope-from mjg@FreeBSD.org) Message-Id: <202003041952.024JqZb4081317@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mjg set sender to mjg@FreeBSD.org using -f From: Mateusz Guzik Date: Wed, 4 Mar 2020 19:52:35 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r358634 - head/sys/kern X-SVN-Group: head X-SVN-Commit-Author: mjg X-SVN-Commit-Paths: head/sys/kern X-SVN-Commit-Revision: 358634 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages 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, 04 Mar 2020 19:52:35 -0000 Author: mjg Date: Wed Mar 4 19:52:34 2020 New Revision: 358634 URL: https://svnweb.freebsd.org/changeset/base/358634 Log: execve: use LOCKSHARED when looking up the interpreter Reviewed by: kib Differential Revision: https://reviews.freebsd.org/D23956 Modified: head/sys/kern/kern_exec.c Modified: head/sys/kern/kern_exec.c ============================================================================== --- head/sys/kern/kern_exec.c Wed Mar 4 19:52:00 2020 (r358633) +++ head/sys/kern/kern_exec.c Wed Mar 4 19:52:34 2020 (r358634) @@ -648,8 +648,8 @@ interpret: free(imgp->freepath, M_TEMP); imgp->freepath = NULL; /* set new name to that of the interpreter */ - NDINIT(&nd, LOOKUP, ISOPEN | LOCKLEAF | FOLLOW | SAVENAME, - UIO_SYSSPACE, imgp->interpreter_name, td); + NDINIT(&nd, LOOKUP, ISOPEN | LOCKLEAF | LOCKSHARED | FOLLOW | + SAVENAME, UIO_SYSSPACE, imgp->interpreter_name, td); args->fname = imgp->interpreter_name; goto interpret; } From owner-svn-src-all@freebsd.org Wed Mar 4 20:01:04 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 6C88B2774B7; Wed, 4 Mar 2020 20:01:04 +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 48XlB82KY7z3KQ5; Wed, 4 Mar 2020 20:01:04 +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 4B15A23502; Wed, 4 Mar 2020 20:01:04 +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 024K14IT083300; Wed, 4 Mar 2020 20:01:04 GMT (envelope-from manu@FreeBSD.org) Received: (from manu@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 024K13cB083298; Wed, 4 Mar 2020 20:01:03 GMT (envelope-from manu@FreeBSD.org) Message-Id: <202003042001.024K13cB083298@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: manu set sender to manu@FreeBSD.org using -f From: Emmanuel Vadot Date: Wed, 4 Mar 2020 20:01:03 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r358635 - head/sys/dev/mmc/host X-SVN-Group: head X-SVN-Commit-Author: manu X-SVN-Commit-Paths: head/sys/dev/mmc/host X-SVN-Commit-Revision: 358635 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages 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, 04 Mar 2020 20:01:04 -0000 Author: manu Date: Wed Mar 4 20:01:03 2020 New Revision: 358635 URL: https://svnweb.freebsd.org/changeset/base/358635 Log: dwmmc: Rework the DMA engine Each segment can be up to 4096 bytes in chain structure according to the RK3399 TRM Part 2. Set the buffers in full ring where the last one point to the first one. Correctly reports the MMC_IVAR_MAX_DATA. Use CACHE_LINE_SIZE for bus_dma alignment. MFC after: 1 month Differential Revision: https://reviews.freebsd.org/D23894 Modified: head/sys/dev/mmc/host/dwmmc.c head/sys/dev/mmc/host/dwmmc_hisi.c head/sys/dev/mmc/host/dwmmc_var.h Modified: head/sys/dev/mmc/host/dwmmc.c ============================================================================== --- head/sys/dev/mmc/host/dwmmc.c Wed Mar 4 19:52:34 2020 (r358634) +++ head/sys/dev/mmc/host/dwmmc.c Wed Mar 4 20:01:03 2020 (r358635) @@ -99,16 +99,15 @@ __FBSDID("$FreeBSD$"); #define DWMMC_ERR_FLAGS (DWMMC_DATA_ERR_FLAGS | DWMMC_CMD_ERR_FLAGS \ |SDMMC_INTMASK_HLE) -#define DES0_DIC (1 << 1) -#define DES0_LD (1 << 2) -#define DES0_FS (1 << 3) -#define DES0_CH (1 << 4) -#define DES0_ER (1 << 5) -#define DES0_CES (1 << 30) -#define DES0_OWN (1 << 31) +#define DES0_DIC (1 << 1) /* Disable Interrupt on Completion */ +#define DES0_LD (1 << 2) /* Last Descriptor */ +#define DES0_FS (1 << 3) /* First Descriptor */ +#define DES0_CH (1 << 4) /* second address CHained */ +#define DES0_ER (1 << 5) /* End of Ring */ +#define DES0_CES (1 << 30) /* Card Error Summary */ +#define DES0_OWN (1 << 31) /* OWN */ -#define DES1_BS1_MASK 0xfff -#define DES1_BS1_SHIFT 0 +#define DES1_BS1_MASK 0x1fff struct idmac_desc { uint32_t des0; /* control */ @@ -117,9 +116,10 @@ struct idmac_desc { uint32_t des3; /* buf2 phys addr or next descr */ }; -#define DESC_MAX 256 -#define DESC_SIZE (sizeof(struct idmac_desc) * DESC_MAX) +#define IDMAC_DESC_SEGS (PAGE_SIZE / (sizeof(struct idmac_desc))) +#define IDMAC_DESC_SIZE (sizeof(struct idmac_desc) * IDMAC_DESC_SEGS) #define DEF_MSIZE 0x2 /* Burst size of multiple transaction */ +#define IDMAC_MAX_SIZE 4096 static void dwmmc_next_operation(struct dwmmc_softc *); static int dwmmc_setup_bus(struct dwmmc_softc *, int); @@ -162,7 +162,7 @@ dwmmc_ring_setup(void *arg, bus_dma_segment_t *segs, i for (idx = 0; idx < nsegs; idx++) { sc->desc_ring[idx].des0 = (DES0_OWN | DES0_DIC | DES0_CH); - sc->desc_ring[idx].des1 = segs[idx].ds_len; + sc->desc_ring[idx].des1 = segs[idx].ds_len & DES1_BS1_MASK; sc->desc_ring[idx].des2 = segs[idx].ds_addr; if (idx == 0) @@ -213,8 +213,8 @@ dma_setup(struct dwmmc_softc *sc) BUS_SPACE_MAXADDR_32BIT, /* lowaddr */ BUS_SPACE_MAXADDR, /* highaddr */ NULL, NULL, /* filter, filterarg */ - DESC_SIZE, 1, /* maxsize, nsegments */ - DESC_SIZE, /* maxsegsize */ + IDMAC_DESC_SIZE, 1, /* maxsize, nsegments */ + IDMAC_DESC_SIZE, /* maxsegsize */ 0, /* flags */ NULL, NULL, /* lockfunc, lockarg */ &sc->desc_tag); @@ -234,7 +234,7 @@ dma_setup(struct dwmmc_softc *sc) } error = bus_dmamap_load(sc->desc_tag, sc->desc_map, - sc->desc_ring, DESC_SIZE, dwmmc_get1paddr, + sc->desc_ring, IDMAC_DESC_SIZE, dwmmc_get1paddr, &sc->desc_ring_paddr, 0); if (error != 0) { device_printf(sc->dev, @@ -242,23 +242,25 @@ dma_setup(struct dwmmc_softc *sc) return (1); } - for (idx = 0; idx < sc->desc_count; idx++) { + for (idx = 0; idx < IDMAC_DESC_SEGS; idx++) { sc->desc_ring[idx].des0 = DES0_CH; sc->desc_ring[idx].des1 = 0; - nidx = (idx + 1) % sc->desc_count; + nidx = (idx + 1) % IDMAC_DESC_SEGS; sc->desc_ring[idx].des3 = sc->desc_ring_paddr + \ (nidx * sizeof(struct idmac_desc)); } + sc->desc_ring[idx - 1].des3 = sc->desc_ring_paddr; + sc->desc_ring[idx - 1].des0 |= DES0_ER; error = bus_dma_tag_create( bus_get_dma_tag(sc->dev), /* Parent tag. */ - 4096, 0, /* alignment, boundary */ + CACHE_LINE_SIZE, 0, /* alignment, boundary */ BUS_SPACE_MAXADDR_32BIT, /* lowaddr */ BUS_SPACE_MAXADDR, /* highaddr */ NULL, NULL, /* filter, filterarg */ - sc->desc_count * MMC_SECTOR_SIZE, /* maxsize */ - sc->desc_count, /* nsegments */ - MMC_SECTOR_SIZE, /* maxsegsize */ + IDMAC_MAX_SIZE * IDMAC_DESC_SEGS, /* maxsize */ + IDMAC_DESC_SEGS, /* nsegments */ + IDMAC_MAX_SIZE, /* maxsegsize */ 0, /* flags */ NULL, NULL, /* lockfunc, lockarg */ &sc->buf_tag); @@ -664,9 +666,6 @@ dwmmc_attach(device_t dev) device_printf(dev, "Hardware version ID is %04x\n", READ4(sc, SDMMC_VERID) & 0xffff); - if (sc->desc_count == 0) - sc->desc_count = DESC_MAX; - /* XXX: we support operation for slot index 0 only */ slot = 0; if (sc->pwren_inverted) { @@ -1278,7 +1277,7 @@ dwmmc_read_ivar(device_t bus, device_t child, int whic *(int *)result = sc->host.caps; break; case MMCBR_IVAR_MAX_DATA: - *(int *)result = sc->desc_count - 1; + *(int *)result = (IDMAC_MAX_SIZE * IDMAC_DESC_SEGS) / MMC_SECTOR_SIZE; break; case MMCBR_IVAR_TIMING: *(int *)result = sc->host.ios.timing; Modified: head/sys/dev/mmc/host/dwmmc_hisi.c ============================================================================== --- head/sys/dev/mmc/host/dwmmc_hisi.c Wed Mar 4 19:52:34 2020 (r358634) +++ head/sys/dev/mmc/host/dwmmc_hisi.c Wed Mar 4 20:01:03 2020 (r358635) @@ -79,7 +79,6 @@ hisi_dwmmc_attach(device_t dev) * DMA when the controller is not cache-coherent on arm64. */ sc->use_pio = 1; - sc->desc_count = 1; return (dwmmc_attach(dev)); } Modified: head/sys/dev/mmc/host/dwmmc_var.h ============================================================================== --- head/sys/dev/mmc/host/dwmmc_var.h Wed Mar 4 19:52:34 2020 (r358634) +++ head/sys/dev/mmc/host/dwmmc_var.h Wed Mar 4 20:01:03 2020 (r358635) @@ -60,7 +60,6 @@ struct dwmmc_softc { uint32_t use_auto_stop; uint32_t use_pio; uint32_t pwren_inverted; - u_int desc_count; device_t child; struct task card_task; /* Card presence check task */ struct timeout_task card_delayed_task;/* Card insert delayed task */ From owner-svn-src-all@freebsd.org Wed Mar 4 20:22:07 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 3EC46277D80; Wed, 4 Mar 2020 20:22:07 +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 48XlfQ2X4Mz4Ydp; Wed, 4 Mar 2020 20:22:06 +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 C9D1A23A3A; Wed, 4 Mar 2020 20:22:05 +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 024KM5cV098659; Wed, 4 Mar 2020 20:22:05 GMT (envelope-from manu@FreeBSD.org) Received: (from manu@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 024KM3vL098644; Wed, 4 Mar 2020 20:22:03 GMT (envelope-from manu@FreeBSD.org) Message-Id: <202003042022.024KM3vL098644@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: manu set sender to manu@FreeBSD.org using -f From: Emmanuel Vadot Date: Wed, 4 Mar 2020 20:22:03 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r358636 - in stable/12/sys/gnu/dts: arm arm64/allwinner arm64/altera arm64/amlogic arm64/arm arm64/bitmain arm64/broadcom/stingray arm64/freescale arm64/intel arm64/marvell arm64/mediat... X-SVN-Group: stable-12 X-SVN-Commit-Author: manu X-SVN-Commit-Paths: in stable/12/sys/gnu/dts: arm arm64/allwinner arm64/altera arm64/amlogic arm64/arm arm64/bitmain arm64/broadcom/stingray arm64/freescale arm64/intel arm64/marvell arm64/mediatek arm64/nvidia arm64/qco... X-SVN-Commit-Revision: 358636 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages 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, 04 Mar 2020 20:22:07 -0000 Author: manu Date: Wed Mar 4 20:22:02 2020 New Revision: 358636 URL: https://svnweb.freebsd.org/changeset/base/358636 Log: MFC r355187: Import DTS files from Linux 5.4 Added: stable/12/sys/gnu/dts/arm/aspeed-ast2600-evb.dts - copied unchanged from r355187, head/sys/gnu/dts/arm/aspeed-ast2600-evb.dts stable/12/sys/gnu/dts/arm/aspeed-bmc-facebook-minipack.dts - copied unchanged from r355187, head/sys/gnu/dts/arm/aspeed-bmc-facebook-minipack.dts stable/12/sys/gnu/dts/arm/aspeed-bmc-facebook-wedge100.dts - copied unchanged from r355187, head/sys/gnu/dts/arm/aspeed-bmc-facebook-wedge100.dts stable/12/sys/gnu/dts/arm/aspeed-bmc-facebook-wedge40.dts - copied unchanged from r355187, head/sys/gnu/dts/arm/aspeed-bmc-facebook-wedge40.dts stable/12/sys/gnu/dts/arm/aspeed-bmc-lenovo-hr855xg2.dts - copied unchanged from r355187, head/sys/gnu/dts/arm/aspeed-bmc-lenovo-hr855xg2.dts stable/12/sys/gnu/dts/arm/aspeed-bmc-opp-mihawk.dts - copied unchanged from r355187, head/sys/gnu/dts/arm/aspeed-bmc-opp-mihawk.dts stable/12/sys/gnu/dts/arm/aspeed-g6-pinctrl.dtsi - copied unchanged from r355187, head/sys/gnu/dts/arm/aspeed-g6-pinctrl.dtsi stable/12/sys/gnu/dts/arm/aspeed-g6.dtsi - copied unchanged from r355187, head/sys/gnu/dts/arm/aspeed-g6.dtsi stable/12/sys/gnu/dts/arm/imx6ul-kontron-n6310-s-43.dts - copied unchanged from r355187, head/sys/gnu/dts/arm/imx6ul-kontron-n6310-s-43.dts stable/12/sys/gnu/dts/arm/imx6ul-kontron-n6310-s.dts - copied unchanged from r355187, head/sys/gnu/dts/arm/imx6ul-kontron-n6310-s.dts stable/12/sys/gnu/dts/arm/imx6ul-kontron-n6310-som.dtsi - copied unchanged from r355187, head/sys/gnu/dts/arm/imx6ul-kontron-n6310-som.dtsi stable/12/sys/gnu/dts/arm/imx6ul-phytec-phycore-som.dtsi - copied unchanged from r355187, head/sys/gnu/dts/arm/imx6ul-phytec-phycore-som.dtsi stable/12/sys/gnu/dts/arm/imx6ul-phytec-segin-ff-rdk-nand.dts - copied unchanged from r355187, head/sys/gnu/dts/arm/imx6ul-phytec-segin-ff-rdk-nand.dts stable/12/sys/gnu/dts/arm/imx6ul-phytec-segin-peb-eval-01.dtsi - copied unchanged from r355187, head/sys/gnu/dts/arm/imx6ul-phytec-segin-peb-eval-01.dtsi stable/12/sys/gnu/dts/arm/imx6ul-phytec-segin.dtsi - copied unchanged from r355187, head/sys/gnu/dts/arm/imx6ul-phytec-segin.dtsi stable/12/sys/gnu/dts/arm/imx6ull-phytec-phycore-som.dtsi - copied unchanged from r355187, head/sys/gnu/dts/arm/imx6ull-phytec-phycore-som.dtsi stable/12/sys/gnu/dts/arm/imx6ull-phytec-segin-ff-rdk-emmc.dts - copied unchanged from r355187, head/sys/gnu/dts/arm/imx6ull-phytec-segin-ff-rdk-emmc.dts stable/12/sys/gnu/dts/arm/imx6ull-phytec-segin-ff-rdk-nand.dts - copied unchanged from r355187, head/sys/gnu/dts/arm/imx6ull-phytec-segin-ff-rdk-nand.dts stable/12/sys/gnu/dts/arm/imx6ull-phytec-segin-lc-rdk-nand.dts - copied unchanged from r355187, head/sys/gnu/dts/arm/imx6ull-phytec-segin-lc-rdk-nand.dts stable/12/sys/gnu/dts/arm/imx6ull-phytec-segin-peb-eval-01.dtsi - copied unchanged from r355187, head/sys/gnu/dts/arm/imx6ull-phytec-segin-peb-eval-01.dtsi stable/12/sys/gnu/dts/arm/imx6ull-phytec-segin.dtsi - copied unchanged from r355187, head/sys/gnu/dts/arm/imx6ull-phytec-segin.dtsi stable/12/sys/gnu/dts/arm/imx7d-zii-rmu2.dts - copied unchanged from r355187, head/sys/gnu/dts/arm/imx7d-zii-rmu2.dts stable/12/sys/gnu/dts/arm/mmp2-olpc-xo-1-75.dts - copied unchanged from r355187, head/sys/gnu/dts/arm/mmp2-olpc-xo-1-75.dts stable/12/sys/gnu/dts/arm/mt7629-rfb.dts - copied unchanged from r355187, head/sys/gnu/dts/arm/mt7629-rfb.dts stable/12/sys/gnu/dts/arm/mt7629.dtsi - copied unchanged from r355187, head/sys/gnu/dts/arm/mt7629.dtsi stable/12/sys/gnu/dts/arm/rk3229-xms6.dts - copied unchanged from r355187, head/sys/gnu/dts/arm/rk3229-xms6.dts stable/12/sys/gnu/dts/arm/rk3288-veyron-edp.dtsi - copied unchanged from r355187, head/sys/gnu/dts/arm/rk3288-veyron-edp.dtsi stable/12/sys/gnu/dts/arm/rk3288-veyron-fievel.dts - copied unchanged from r355187, head/sys/gnu/dts/arm/rk3288-veyron-fievel.dts stable/12/sys/gnu/dts/arm/rk3288-veyron-tiger.dts - copied unchanged from r355187, head/sys/gnu/dts/arm/rk3288-veyron-tiger.dts stable/12/sys/gnu/dts/arm/ste-ab8500.dtsi - copied unchanged from r355187, head/sys/gnu/dts/arm/ste-ab8500.dtsi stable/12/sys/gnu/dts/arm/sun8i-s3-lichee-zero-plus.dts - copied unchanged from r355187, head/sys/gnu/dts/arm/sun8i-s3-lichee-zero-plus.dts stable/12/sys/gnu/dts/arm/sun8i-v3.dtsi - copied unchanged from r355187, head/sys/gnu/dts/arm/sun8i-v3.dtsi stable/12/sys/gnu/dts/arm64/allwinner/sun50i-a64-olinuxino-emmc.dts - copied unchanged from r355187, head/sys/gnu/dts/arm64/allwinner/sun50i-a64-olinuxino-emmc.dts stable/12/sys/gnu/dts/arm64/allwinner/sun50i-h6-tanix-tx6.dts - copied unchanged from r355187, head/sys/gnu/dts/arm64/allwinner/sun50i-h6-tanix-tx6.dts stable/12/sys/gnu/dts/arm64/amlogic/meson-g12-common.dtsi - copied unchanged from r355187, head/sys/gnu/dts/arm64/amlogic/meson-g12-common.dtsi stable/12/sys/gnu/dts/arm64/amlogic/meson-g12b-a311d-khadas-vim3.dts - copied unchanged from r355187, head/sys/gnu/dts/arm64/amlogic/meson-g12b-a311d-khadas-vim3.dts stable/12/sys/gnu/dts/arm64/amlogic/meson-g12b-a311d.dtsi - copied unchanged from r355187, head/sys/gnu/dts/arm64/amlogic/meson-g12b-a311d.dtsi stable/12/sys/gnu/dts/arm64/amlogic/meson-g12b-khadas-vim3.dtsi - copied unchanged from r355187, head/sys/gnu/dts/arm64/amlogic/meson-g12b-khadas-vim3.dtsi stable/12/sys/gnu/dts/arm64/amlogic/meson-g12b-s922x-khadas-vim3.dts - copied unchanged from r355187, head/sys/gnu/dts/arm64/amlogic/meson-g12b-s922x-khadas-vim3.dts stable/12/sys/gnu/dts/arm64/amlogic/meson-g12b-s922x.dtsi - copied unchanged from r355187, head/sys/gnu/dts/arm64/amlogic/meson-g12b-s922x.dtsi stable/12/sys/gnu/dts/arm64/amlogic/meson-khadas-vim3.dtsi - copied unchanged from r355187, head/sys/gnu/dts/arm64/amlogic/meson-khadas-vim3.dtsi stable/12/sys/gnu/dts/arm64/amlogic/meson-sm1-khadas-vim3l.dts - copied unchanged from r355187, head/sys/gnu/dts/arm64/amlogic/meson-sm1-khadas-vim3l.dts stable/12/sys/gnu/dts/arm64/amlogic/meson-sm1-sei610.dts - copied unchanged from r355187, head/sys/gnu/dts/arm64/amlogic/meson-sm1-sei610.dts stable/12/sys/gnu/dts/arm64/amlogic/meson-sm1.dtsi - copied unchanged from r355187, head/sys/gnu/dts/arm64/amlogic/meson-sm1.dtsi stable/12/sys/gnu/dts/arm64/freescale/fsl-ls1046a-frwy.dts - copied unchanged from r355187, head/sys/gnu/dts/arm64/freescale/fsl-ls1046a-frwy.dts stable/12/sys/gnu/dts/arm64/freescale/imx8mn-ddr4-evk.dts - copied unchanged from r355187, head/sys/gnu/dts/arm64/freescale/imx8mn-ddr4-evk.dts stable/12/sys/gnu/dts/arm64/freescale/imx8mn.dtsi - copied unchanged from r355187, head/sys/gnu/dts/arm64/freescale/imx8mn.dtsi stable/12/sys/gnu/dts/arm64/freescale/imx8mq-hummingboard-pulse.dts - copied unchanged from r355187, head/sys/gnu/dts/arm64/freescale/imx8mq-hummingboard-pulse.dts stable/12/sys/gnu/dts/arm64/freescale/imx8mq-nitrogen.dts - copied unchanged from r355187, head/sys/gnu/dts/arm64/freescale/imx8mq-nitrogen.dts stable/12/sys/gnu/dts/arm64/freescale/imx8mq-pico-pi.dts - copied unchanged from r355187, head/sys/gnu/dts/arm64/freescale/imx8mq-pico-pi.dts stable/12/sys/gnu/dts/arm64/freescale/imx8mq-sr-som.dtsi - copied unchanged from r355187, head/sys/gnu/dts/arm64/freescale/imx8mq-sr-som.dtsi stable/12/sys/gnu/dts/arm64/freescale/imx8qxp-ai_ml.dts - copied unchanged from r355187, head/sys/gnu/dts/arm64/freescale/imx8qxp-ai_ml.dts stable/12/sys/gnu/dts/arm64/marvell/armada-3720-turris-mox.dts - copied unchanged from r355187, head/sys/gnu/dts/arm64/marvell/armada-3720-turris-mox.dts stable/12/sys/gnu/dts/arm64/qcom/msm8916-longcheer-l8150.dts - copied unchanged from r355187, head/sys/gnu/dts/arm64/qcom/msm8916-longcheer-l8150.dts stable/12/sys/gnu/dts/arm64/qcom/msm8916-samsung-a2015-common.dtsi - copied unchanged from r355187, head/sys/gnu/dts/arm64/qcom/msm8916-samsung-a2015-common.dtsi stable/12/sys/gnu/dts/arm64/qcom/msm8916-samsung-a3u-eur.dts - copied unchanged from r355187, head/sys/gnu/dts/arm64/qcom/msm8916-samsung-a3u-eur.dts stable/12/sys/gnu/dts/arm64/qcom/msm8916-samsung-a5u-eur.dts - copied unchanged from r355187, head/sys/gnu/dts/arm64/qcom/msm8916-samsung-a5u-eur.dts stable/12/sys/gnu/dts/arm64/qcom/msm8998-asus-novago-tp370ql.dts - copied unchanged from r355187, head/sys/gnu/dts/arm64/qcom/msm8998-asus-novago-tp370ql.dts stable/12/sys/gnu/dts/arm64/qcom/msm8998-clamshell.dtsi - copied unchanged from r355187, head/sys/gnu/dts/arm64/qcom/msm8998-clamshell.dtsi stable/12/sys/gnu/dts/arm64/qcom/msm8998-hp-envy-x2.dts - copied unchanged from r355187, head/sys/gnu/dts/arm64/qcom/msm8998-hp-envy-x2.dts stable/12/sys/gnu/dts/arm64/qcom/msm8998-lenovo-miix-630.dts - copied unchanged from r355187, head/sys/gnu/dts/arm64/qcom/msm8998-lenovo-miix-630.dts stable/12/sys/gnu/dts/arm64/qcom/pm8150.dtsi - copied unchanged from r355187, head/sys/gnu/dts/arm64/qcom/pm8150.dtsi stable/12/sys/gnu/dts/arm64/qcom/pm8150b.dtsi - copied unchanged from r355187, head/sys/gnu/dts/arm64/qcom/pm8150b.dtsi stable/12/sys/gnu/dts/arm64/qcom/pm8150l.dtsi - copied unchanged from r355187, head/sys/gnu/dts/arm64/qcom/pm8150l.dtsi stable/12/sys/gnu/dts/arm64/qcom/sdm850-lenovo-yoga-c630.dts - copied unchanged from r355187, head/sys/gnu/dts/arm64/qcom/sdm850-lenovo-yoga-c630.dts stable/12/sys/gnu/dts/arm64/qcom/sm8150-mtp.dts - copied unchanged from r355187, head/sys/gnu/dts/arm64/qcom/sm8150-mtp.dts stable/12/sys/gnu/dts/arm64/qcom/sm8150.dtsi - copied unchanged from r355187, head/sys/gnu/dts/arm64/qcom/sm8150.dtsi stable/12/sys/gnu/dts/arm64/rockchip/rk3399-leez-p710.dts - copied unchanged from r355187, head/sys/gnu/dts/arm64/rockchip/rk3399-leez-p710.dts stable/12/sys/gnu/dts/include/dt-bindings/bus/moxtet.h - copied unchanged from r355187, head/sys/gnu/dts/include/dt-bindings/bus/moxtet.h stable/12/sys/gnu/dts/include/dt-bindings/clock/ast2600-clock.h - copied unchanged from r355187, head/sys/gnu/dts/include/dt-bindings/clock/ast2600-clock.h stable/12/sys/gnu/dts/include/dt-bindings/clock/imx8mn-clock.h - copied unchanged from r355187, head/sys/gnu/dts/include/dt-bindings/clock/imx8mn-clock.h stable/12/sys/gnu/dts/include/dt-bindings/clock/ingenic,tcu.h - copied unchanged from r355187, head/sys/gnu/dts/include/dt-bindings/clock/ingenic,tcu.h stable/12/sys/gnu/dts/include/dt-bindings/clock/mt6779-clk.h - copied unchanged from r355187, head/sys/gnu/dts/include/dt-bindings/clock/mt6779-clk.h stable/12/sys/gnu/dts/include/dt-bindings/clock/qcom,gcc-sm8150.h - copied unchanged from r355187, head/sys/gnu/dts/include/dt-bindings/clock/qcom,gcc-sm8150.h stable/12/sys/gnu/dts/include/dt-bindings/clock/rk3308-cru.h - copied unchanged from r355187, head/sys/gnu/dts/include/dt-bindings/clock/rk3308-cru.h stable/12/sys/gnu/dts/include/dt-bindings/gce/mt8183-gce.h - copied unchanged from r355187, head/sys/gnu/dts/include/dt-bindings/gce/mt8183-gce.h stable/12/sys/gnu/dts/include/dt-bindings/interconnect/qcom,qcs404.h - copied unchanged from r355187, head/sys/gnu/dts/include/dt-bindings/interconnect/qcom,qcs404.h stable/12/sys/gnu/dts/include/dt-bindings/memory/mt8183-larb-port.h - copied unchanged from r355187, head/sys/gnu/dts/include/dt-bindings/memory/mt8183-larb-port.h stable/12/sys/gnu/dts/include/dt-bindings/phy/phy-lantiq-vrx200-pcie.h - copied unchanged from r355187, head/sys/gnu/dts/include/dt-bindings/phy/phy-lantiq-vrx200-pcie.h stable/12/sys/gnu/dts/include/dt-bindings/power/meson-g12a-power.h - copied unchanged from r355187, head/sys/gnu/dts/include/dt-bindings/power/meson-g12a-power.h stable/12/sys/gnu/dts/include/dt-bindings/power/meson-sm1-power.h - copied unchanged from r355187, head/sys/gnu/dts/include/dt-bindings/power/meson-sm1-power.h stable/12/sys/gnu/dts/include/dt-bindings/regulator/active-semi,8865-regulator.h - copied unchanged from r355187, head/sys/gnu/dts/include/dt-bindings/regulator/active-semi,8865-regulator.h stable/12/sys/gnu/dts/include/dt-bindings/reset-controller/ - copied from r355187, head/sys/gnu/dts/include/dt-bindings/reset-controller/ stable/12/sys/gnu/dts/include/dt-bindings/reset/amlogic,meson-g12a-audio-reset.h - copied unchanged from r355187, head/sys/gnu/dts/include/dt-bindings/reset/amlogic,meson-g12a-audio-reset.h stable/12/sys/gnu/dts/include/dt-bindings/reset/mt7629-resets.h - copied unchanged from r355187, head/sys/gnu/dts/include/dt-bindings/reset/mt7629-resets.h stable/12/sys/gnu/dts/include/dt-bindings/soc/ti,sci_pm_domain.h - copied unchanged from r355187, head/sys/gnu/dts/include/dt-bindings/soc/ti,sci_pm_domain.h Deleted: stable/12/sys/gnu/dts/arm/imx6ul-phytec-pcl063.dtsi stable/12/sys/gnu/dts/arm/imx6ul-phytec-peb-eval-01.dtsi stable/12/sys/gnu/dts/arm/imx6ul-phytec-phyboard-segin-full.dts stable/12/sys/gnu/dts/arm/imx6ul-phytec-phyboard-segin.dtsi stable/12/sys/gnu/dts/arm/rk3288-fennec.dts Modified: stable/12/sys/gnu/dts/arm/am335x-boneblue.dts stable/12/sys/gnu/dts/arm/am335x-cm-t335.dts stable/12/sys/gnu/dts/arm/am335x-icev2.dts stable/12/sys/gnu/dts/arm/am33xx-l4.dtsi stable/12/sys/gnu/dts/arm/am3517-evm.dts stable/12/sys/gnu/dts/arm/am3517.dtsi stable/12/sys/gnu/dts/arm/am3874-iceboard.dts stable/12/sys/gnu/dts/arm/am4372.dtsi stable/12/sys/gnu/dts/arm/am437x-l4.dtsi stable/12/sys/gnu/dts/arm/aspeed-ast2500-evb.dts stable/12/sys/gnu/dts/arm/aspeed-bmc-facebook-tiogapass.dts stable/12/sys/gnu/dts/arm/aspeed-bmc-inspur-fp5280g2.dts stable/12/sys/gnu/dts/arm/aspeed-bmc-opp-swift.dts stable/12/sys/gnu/dts/arm/aspeed-bmc-opp-vesnin.dts stable/12/sys/gnu/dts/arm/aspeed-g4.dtsi stable/12/sys/gnu/dts/arm/aspeed-g5.dtsi stable/12/sys/gnu/dts/arm/at91-ariag25.dts stable/12/sys/gnu/dts/arm/at91-ariettag25.dts stable/12/sys/gnu/dts/arm/at91-cosino.dtsi stable/12/sys/gnu/dts/arm/at91-cosino_mega2560.dts stable/12/sys/gnu/dts/arm/at91-kizboxmini.dts stable/12/sys/gnu/dts/arm/at91sam9261ek.dts stable/12/sys/gnu/dts/arm/at91sam9263ek.dts stable/12/sys/gnu/dts/arm/at91sam9g15.dtsi stable/12/sys/gnu/dts/arm/at91sam9g15ek.dts stable/12/sys/gnu/dts/arm/at91sam9g25ek.dts stable/12/sys/gnu/dts/arm/at91sam9g35ek.dts stable/12/sys/gnu/dts/arm/at91sam9m10g45ek.dts stable/12/sys/gnu/dts/arm/at91sam9rlek.dts stable/12/sys/gnu/dts/arm/at91sam9x25ek.dts stable/12/sys/gnu/dts/arm/at91sam9x35ek.dts stable/12/sys/gnu/dts/arm/at91sam9x5.dtsi stable/12/sys/gnu/dts/arm/at91sam9x5_lcd.dtsi stable/12/sys/gnu/dts/arm/at91sam9x5dm.dtsi stable/12/sys/gnu/dts/arm/at91sam9x5ek.dtsi stable/12/sys/gnu/dts/arm/bcm2835-rpi-a-plus.dts stable/12/sys/gnu/dts/arm/bcm2835-rpi-a.dts stable/12/sys/gnu/dts/arm/bcm2835-rpi-b-plus.dts stable/12/sys/gnu/dts/arm/bcm2835-rpi-b-rev2.dts stable/12/sys/gnu/dts/arm/bcm2835-rpi-b.dts stable/12/sys/gnu/dts/arm/bcm2835-rpi-cm1-io1.dts stable/12/sys/gnu/dts/arm/bcm2835-rpi-cm1.dtsi stable/12/sys/gnu/dts/arm/bcm2835-rpi-zero-w.dts stable/12/sys/gnu/dts/arm/bcm2835-rpi-zero.dts stable/12/sys/gnu/dts/arm/bcm2835-rpi.dtsi stable/12/sys/gnu/dts/arm/bcm2836-rpi-2-b.dts stable/12/sys/gnu/dts/arm/bcm2837-rpi-3-a-plus.dts stable/12/sys/gnu/dts/arm/bcm2837-rpi-3-b-plus.dts stable/12/sys/gnu/dts/arm/bcm2837-rpi-3-b.dts stable/12/sys/gnu/dts/arm/bcm2837-rpi-cm3-io3.dts stable/12/sys/gnu/dts/arm/bcm2837-rpi-cm3.dtsi stable/12/sys/gnu/dts/arm/bcm283x.dtsi stable/12/sys/gnu/dts/arm/da850-evm.dts stable/12/sys/gnu/dts/arm/dra7-l4.dtsi stable/12/sys/gnu/dts/arm/ep7211-edb7211.dts stable/12/sys/gnu/dts/arm/exynos3250.dtsi stable/12/sys/gnu/dts/arm/exynos4.dtsi stable/12/sys/gnu/dts/arm/exynos4210-universal_c210.dts stable/12/sys/gnu/dts/arm/exynos4412-itop-elite.dts stable/12/sys/gnu/dts/arm/exynos4412-itop-scp-core.dtsi stable/12/sys/gnu/dts/arm/exynos4412-odroidu3.dts stable/12/sys/gnu/dts/arm/exynos4412-odroidx.dts stable/12/sys/gnu/dts/arm/exynos4412-origen.dts stable/12/sys/gnu/dts/arm/exynos5250-arndale.dts stable/12/sys/gnu/dts/arm/exynos5250-snow-common.dtsi stable/12/sys/gnu/dts/arm/exynos5250.dtsi stable/12/sys/gnu/dts/arm/exynos5420-peach-pit.dts stable/12/sys/gnu/dts/arm/exynos5420.dtsi stable/12/sys/gnu/dts/arm/exynos54xx.dtsi stable/12/sys/gnu/dts/arm/exynos5800-peach-pi.dts stable/12/sys/gnu/dts/arm/exynos5800.dtsi stable/12/sys/gnu/dts/arm/gemini-dlink-dir-685.dts stable/12/sys/gnu/dts/arm/gemini-nas4220b.dts stable/12/sys/gnu/dts/arm/gemini-sl93512r.dts stable/12/sys/gnu/dts/arm/imx25-eukrea-mbimxsd25-baseboard-cmo-qvga.dts stable/12/sys/gnu/dts/arm/imx25-eukrea-mbimxsd25-baseboard-dvi-svga.dts stable/12/sys/gnu/dts/arm/imx25-eukrea-mbimxsd25-baseboard-dvi-vga.dts stable/12/sys/gnu/dts/arm/imx25-pdk.dts stable/12/sys/gnu/dts/arm/imx27-apf27dev.dts stable/12/sys/gnu/dts/arm/imx27-eukrea-mbimxsd27-baseboard.dts stable/12/sys/gnu/dts/arm/imx27-phytec-phycard-s-rdk.dts stable/12/sys/gnu/dts/arm/imx27-phytec-phycore-rdk.dts stable/12/sys/gnu/dts/arm/imx53-m53menlo.dts stable/12/sys/gnu/dts/arm/imx6-logicpd-baseboard.dtsi stable/12/sys/gnu/dts/arm/imx6-logicpd-som.dtsi stable/12/sys/gnu/dts/arm/imx6qdl-colibri.dtsi stable/12/sys/gnu/dts/arm/imx6qdl-nit6xlite.dtsi stable/12/sys/gnu/dts/arm/imx6qdl-phytec-pbab01.dtsi stable/12/sys/gnu/dts/arm/imx6qdl-sabreauto.dtsi stable/12/sys/gnu/dts/arm/imx6qdl-wandboard.dtsi stable/12/sys/gnu/dts/arm/imx6qdl.dtsi stable/12/sys/gnu/dts/arm/imx6sl.dtsi stable/12/sys/gnu/dts/arm/imx6sll.dtsi stable/12/sys/gnu/dts/arm/imx6sx.dtsi stable/12/sys/gnu/dts/arm/imx6ul-opos6uldev.dts stable/12/sys/gnu/dts/arm/imx6ul.dtsi stable/12/sys/gnu/dts/arm/imx7-colibri.dtsi stable/12/sys/gnu/dts/arm/imx7d-cl-som-imx7.dts stable/12/sys/gnu/dts/arm/imx7d-zii-rpu2.dts stable/12/sys/gnu/dts/arm/imx7d.dtsi stable/12/sys/gnu/dts/arm/imx7s.dtsi stable/12/sys/gnu/dts/arm/imx7ulp.dtsi stable/12/sys/gnu/dts/arm/kirkwood-ts219.dtsi stable/12/sys/gnu/dts/arm/logicpd-som-lv.dtsi stable/12/sys/gnu/dts/arm/logicpd-torpedo-baseboard.dtsi stable/12/sys/gnu/dts/arm/logicpd-torpedo-som.dtsi stable/12/sys/gnu/dts/arm/ls1021a.dtsi stable/12/sys/gnu/dts/arm/meson8b-ec100.dts stable/12/sys/gnu/dts/arm/meson8b-mxq.dts stable/12/sys/gnu/dts/arm/meson8b-odroidc1.dts stable/12/sys/gnu/dts/arm/meson8b.dtsi stable/12/sys/gnu/dts/arm/mmp2.dtsi stable/12/sys/gnu/dts/arm/nspire-classic.dtsi stable/12/sys/gnu/dts/arm/nspire-cx.dts stable/12/sys/gnu/dts/arm/nspire.dtsi stable/12/sys/gnu/dts/arm/omap3-gta04.dtsi stable/12/sys/gnu/dts/arm/omap3-n950-n9.dtsi stable/12/sys/gnu/dts/arm/omap34xx.dtsi stable/12/sys/gnu/dts/arm/omap36xx.dtsi stable/12/sys/gnu/dts/arm/omap4-droid4-xt894.dts stable/12/sys/gnu/dts/arm/omap4-l4-abe.dtsi stable/12/sys/gnu/dts/arm/omap4-l4.dtsi stable/12/sys/gnu/dts/arm/omap4-panda-common.dtsi stable/12/sys/gnu/dts/arm/omap4-sdp.dts stable/12/sys/gnu/dts/arm/omap4-var-som-om44-wlan.dtsi stable/12/sys/gnu/dts/arm/omap4.dtsi stable/12/sys/gnu/dts/arm/omap5-board-common.dtsi stable/12/sys/gnu/dts/arm/omap5.dtsi stable/12/sys/gnu/dts/arm/omap54xx-clocks.dtsi stable/12/sys/gnu/dts/arm/r8a77470.dtsi stable/12/sys/gnu/dts/arm/r8a7779.dtsi stable/12/sys/gnu/dts/arm/rk3036.dtsi stable/12/sys/gnu/dts/arm/rk3288-evb.dtsi stable/12/sys/gnu/dts/arm/rk3288-tinker.dtsi stable/12/sys/gnu/dts/arm/rk3288-veyron-chromebook.dtsi stable/12/sys/gnu/dts/arm/rk3288-veyron-jaq.dts stable/12/sys/gnu/dts/arm/rk3288-veyron-jerry.dts stable/12/sys/gnu/dts/arm/rk3288-veyron-minnie.dts stable/12/sys/gnu/dts/arm/rk3288-veyron-pinky.dts stable/12/sys/gnu/dts/arm/rk3288-veyron-speedy.dts stable/12/sys/gnu/dts/arm/rk3288-veyron.dtsi stable/12/sys/gnu/dts/arm/socfpga.dtsi stable/12/sys/gnu/dts/arm/socfpga_arria10.dtsi stable/12/sys/gnu/dts/arm/socfpga_arria10_socdk_nand.dts stable/12/sys/gnu/dts/arm/socfpga_cyclone5_vining_fpga.dts stable/12/sys/gnu/dts/arm/ste-dbx5x0.dtsi stable/12/sys/gnu/dts/arm/ste-href-ab8500.dtsi stable/12/sys/gnu/dts/arm/ste-href-family-pinctrl.dtsi stable/12/sys/gnu/dts/arm/ste-href-stuib.dtsi stable/12/sys/gnu/dts/arm/ste-href.dtsi stable/12/sys/gnu/dts/arm/ste-hrefprev60-stuib.dts stable/12/sys/gnu/dts/arm/ste-hrefv60plus-stuib.dts stable/12/sys/gnu/dts/arm/ste-nomadik-nhk15.dts stable/12/sys/gnu/dts/arm/ste-snowball.dts stable/12/sys/gnu/dts/arm/stm32429i-eval.dts stable/12/sys/gnu/dts/arm/stm32f429.dtsi stable/12/sys/gnu/dts/arm/stm32f746.dtsi stable/12/sys/gnu/dts/arm/stm32h743i-eval.dts stable/12/sys/gnu/dts/arm/stm32mp157-pinctrl.dtsi stable/12/sys/gnu/dts/arm/stm32mp157a-dk1.dts stable/12/sys/gnu/dts/arm/stm32mp157c-ed1.dts stable/12/sys/gnu/dts/arm/stm32mp157c-ev1.dts stable/12/sys/gnu/dts/arm/stm32mp157c.dtsi stable/12/sys/gnu/dts/arm/sun4i-a10-a1000.dts stable/12/sys/gnu/dts/arm/sun4i-a10-ba10-tvbox.dts stable/12/sys/gnu/dts/arm/sun4i-a10-cubieboard.dts stable/12/sys/gnu/dts/arm/sun4i-a10-hackberry.dts stable/12/sys/gnu/dts/arm/sun4i-a10-itead-iteaduino-plus.dts stable/12/sys/gnu/dts/arm/sun4i-a10-jesurun-q5.dts stable/12/sys/gnu/dts/arm/sun4i-a10-marsboard.dts stable/12/sys/gnu/dts/arm/sun4i-a10-olinuxino-lime.dts stable/12/sys/gnu/dts/arm/sun4i-a10-pcduino.dts stable/12/sys/gnu/dts/arm/sun4i-a10.dtsi stable/12/sys/gnu/dts/arm/sun5i-a10s-olinuxino-micro.dts stable/12/sys/gnu/dts/arm/sun5i-a10s-wobo-i5.dts stable/12/sys/gnu/dts/arm/sun5i-a13-q8-tablet.dts stable/12/sys/gnu/dts/arm/sun5i.dtsi stable/12/sys/gnu/dts/arm/sun6i-a31-colombus.dts stable/12/sys/gnu/dts/arm/sun6i-a31-hummingbird.dts stable/12/sys/gnu/dts/arm/sun6i-a31-i7.dts stable/12/sys/gnu/dts/arm/sun6i-a31-m9.dts stable/12/sys/gnu/dts/arm/sun6i-a31-mele-a1000g-quad.dts stable/12/sys/gnu/dts/arm/sun6i-a31.dtsi stable/12/sys/gnu/dts/arm/sun6i-a31s-cs908.dts stable/12/sys/gnu/dts/arm/sun6i-a31s-sina31s.dts stable/12/sys/gnu/dts/arm/sun6i-a31s-sinovoip-bpi-m2.dts stable/12/sys/gnu/dts/arm/sun7i-a20-bananapi-m1-plus.dts stable/12/sys/gnu/dts/arm/sun7i-a20-bananapi.dts stable/12/sys/gnu/dts/arm/sun7i-a20-bananapro.dts stable/12/sys/gnu/dts/arm/sun7i-a20-cubieboard2.dts stable/12/sys/gnu/dts/arm/sun7i-a20-cubietruck.dts stable/12/sys/gnu/dts/arm/sun7i-a20-hummingbird.dts stable/12/sys/gnu/dts/arm/sun7i-a20-i12-tvbox.dts stable/12/sys/gnu/dts/arm/sun7i-a20-icnova-swac.dts stable/12/sys/gnu/dts/arm/sun7i-a20-itead-ibox.dts stable/12/sys/gnu/dts/arm/sun7i-a20-lamobo-r1.dts stable/12/sys/gnu/dts/arm/sun7i-a20-m3.dts stable/12/sys/gnu/dts/arm/sun7i-a20-olimex-som-evb.dts stable/12/sys/gnu/dts/arm/sun7i-a20-olimex-som204-evb.dts stable/12/sys/gnu/dts/arm/sun7i-a20-olinuxino-lime.dts stable/12/sys/gnu/dts/arm/sun7i-a20-olinuxino-lime2.dts stable/12/sys/gnu/dts/arm/sun7i-a20-olinuxino-micro.dts stable/12/sys/gnu/dts/arm/sun7i-a20-orangepi-mini.dts stable/12/sys/gnu/dts/arm/sun7i-a20-orangepi.dts stable/12/sys/gnu/dts/arm/sun7i-a20-pcduino3-nano.dts stable/12/sys/gnu/dts/arm/sun7i-a20-pcduino3.dts stable/12/sys/gnu/dts/arm/sun7i-a20-wits-pro-a20-dkt.dts stable/12/sys/gnu/dts/arm/sun7i-a20.dtsi stable/12/sys/gnu/dts/arm/sun8i-a23-a33.dtsi stable/12/sys/gnu/dts/arm/sun8i-a23-ippo-q8h-v1.2.dts stable/12/sys/gnu/dts/arm/sun8i-a23-ippo-q8h-v5.dts stable/12/sys/gnu/dts/arm/sun8i-a23-q8-tablet.dts stable/12/sys/gnu/dts/arm/sun8i-a83t-cubietruck-plus.dts stable/12/sys/gnu/dts/arm/sun8i-a83t-tbs-a711.dts stable/12/sys/gnu/dts/arm/sun8i-a83t.dtsi stable/12/sys/gnu/dts/arm/sun8i-r40.dtsi stable/12/sys/gnu/dts/arm/sun8i-v3s.dtsi stable/12/sys/gnu/dts/arm/sun9i-a80-cubieboard4.dts stable/12/sys/gnu/dts/arm/sun9i-a80-optimus.dts stable/12/sys/gnu/dts/arm/sun9i-a80.dtsi stable/12/sys/gnu/dts/arm/sunxi-h3-h5.dtsi stable/12/sys/gnu/dts/arm/vexpress-v2m-rs1.dtsi stable/12/sys/gnu/dts/arm/vexpress-v2m.dtsi stable/12/sys/gnu/dts/arm/vf610-zii-cfu1.dts stable/12/sys/gnu/dts/arm/vf610-zii-scu4-aib.dts stable/12/sys/gnu/dts/arm/vf610-zii-spb4.dts stable/12/sys/gnu/dts/arm64/allwinner/sun50i-a64-orangepi-win.dts stable/12/sys/gnu/dts/arm64/allwinner/sun50i-a64-pine64-plus.dts stable/12/sys/gnu/dts/arm64/allwinner/sun50i-a64-pinebook.dts stable/12/sys/gnu/dts/arm64/allwinner/sun50i-a64-sopine-baseboard.dts stable/12/sys/gnu/dts/arm64/allwinner/sun50i-a64.dtsi stable/12/sys/gnu/dts/arm64/allwinner/sun50i-h6-beelink-gs1.dts stable/12/sys/gnu/dts/arm64/allwinner/sun50i-h6-orangepi-3.dts stable/12/sys/gnu/dts/arm64/allwinner/sun50i-h6-orangepi.dtsi stable/12/sys/gnu/dts/arm64/allwinner/sun50i-h6-pine-h64.dts stable/12/sys/gnu/dts/arm64/allwinner/sun50i-h6.dtsi stable/12/sys/gnu/dts/arm64/altera/socfpga_stratix10.dtsi stable/12/sys/gnu/dts/arm64/amlogic/meson-axg.dtsi stable/12/sys/gnu/dts/arm64/amlogic/meson-g12a-sei510.dts stable/12/sys/gnu/dts/arm64/amlogic/meson-g12a-u200.dts stable/12/sys/gnu/dts/arm64/amlogic/meson-g12a-x96-max.dts stable/12/sys/gnu/dts/arm64/amlogic/meson-g12a.dtsi stable/12/sys/gnu/dts/arm64/amlogic/meson-g12b-odroid-n2.dts stable/12/sys/gnu/dts/arm64/amlogic/meson-g12b.dtsi stable/12/sys/gnu/dts/arm64/amlogic/meson-gx.dtsi stable/12/sys/gnu/dts/arm64/amlogic/meson-gxbb-nanopi-k2.dts stable/12/sys/gnu/dts/arm64/amlogic/meson-gxbb-nexbox-a95x.dts stable/12/sys/gnu/dts/arm64/amlogic/meson-gxbb-odroidc2.dts stable/12/sys/gnu/dts/arm64/amlogic/meson-gxbb-p201.dts stable/12/sys/gnu/dts/arm64/amlogic/meson-gxbb-p20x.dtsi stable/12/sys/gnu/dts/arm64/amlogic/meson-gxbb-wetek-hub.dts stable/12/sys/gnu/dts/arm64/amlogic/meson-gxbb-wetek-play2.dts stable/12/sys/gnu/dts/arm64/amlogic/meson-gxbb.dtsi stable/12/sys/gnu/dts/arm64/amlogic/meson-gxl-s905w-tx3-mini.dts stable/12/sys/gnu/dts/arm64/amlogic/meson-gxl-s905x-hwacom-amazetv.dts stable/12/sys/gnu/dts/arm64/amlogic/meson-gxl-s905x-khadas-vim.dts stable/12/sys/gnu/dts/arm64/amlogic/meson-gxl-s905x-nexbox-a95x.dts stable/12/sys/gnu/dts/arm64/amlogic/meson-gxl.dtsi stable/12/sys/gnu/dts/arm64/amlogic/meson-gxm-khadas-vim2.dts stable/12/sys/gnu/dts/arm64/amlogic/meson-gxm.dtsi stable/12/sys/gnu/dts/arm64/arm/fvp-base-revc.dts stable/12/sys/gnu/dts/arm64/arm/rtsm_ve-motherboard.dtsi stable/12/sys/gnu/dts/arm64/arm/vexpress-v2m-rs1.dtsi stable/12/sys/gnu/dts/arm64/bitmain/bm1880.dtsi stable/12/sys/gnu/dts/arm64/broadcom/stingray/stingray-pinctrl.dtsi stable/12/sys/gnu/dts/arm64/broadcom/stingray/stingray.dtsi stable/12/sys/gnu/dts/arm64/freescale/fsl-ls1012a.dtsi stable/12/sys/gnu/dts/arm64/freescale/fsl-ls1028a-qds.dts stable/12/sys/gnu/dts/arm64/freescale/fsl-ls1028a-rdb.dts stable/12/sys/gnu/dts/arm64/freescale/fsl-ls1028a.dtsi stable/12/sys/gnu/dts/arm64/freescale/fsl-ls1043a.dtsi stable/12/sys/gnu/dts/arm64/freescale/fsl-ls1046a.dtsi stable/12/sys/gnu/dts/arm64/freescale/fsl-ls1088a-qds.dts stable/12/sys/gnu/dts/arm64/freescale/fsl-ls1088a.dtsi stable/12/sys/gnu/dts/arm64/freescale/fsl-ls208xa.dtsi stable/12/sys/gnu/dts/arm64/freescale/fsl-lx2160a.dtsi stable/12/sys/gnu/dts/arm64/freescale/imx8mm-evk.dts stable/12/sys/gnu/dts/arm64/freescale/imx8mm.dtsi stable/12/sys/gnu/dts/arm64/freescale/imx8mq-evk.dts stable/12/sys/gnu/dts/arm64/freescale/imx8mq-librem5-devkit.dts stable/12/sys/gnu/dts/arm64/freescale/imx8mq-zii-ultra.dtsi stable/12/sys/gnu/dts/arm64/freescale/imx8mq.dtsi stable/12/sys/gnu/dts/arm64/freescale/imx8qxp-mek.dts stable/12/sys/gnu/dts/arm64/freescale/imx8qxp.dtsi stable/12/sys/gnu/dts/arm64/intel/socfpga_agilex.dtsi stable/12/sys/gnu/dts/arm64/marvell/armada-37xx.dtsi stable/12/sys/gnu/dts/arm64/marvell/armada-7040-db.dts stable/12/sys/gnu/dts/arm64/marvell/armada-8040-clearfog-gt-8k.dts stable/12/sys/gnu/dts/arm64/marvell/armada-8040-db.dts stable/12/sys/gnu/dts/arm64/marvell/armada-8040-mcbin.dtsi stable/12/sys/gnu/dts/arm64/marvell/armada-ap806-quad.dtsi stable/12/sys/gnu/dts/arm64/marvell/armada-ap806.dtsi stable/12/sys/gnu/dts/arm64/marvell/armada-cp110.dtsi stable/12/sys/gnu/dts/arm64/mediatek/mt7622-bananapi-bpi-r64.dts stable/12/sys/gnu/dts/arm64/mediatek/mt7622.dtsi stable/12/sys/gnu/dts/arm64/mediatek/mt8183-evb.dts stable/12/sys/gnu/dts/arm64/mediatek/mt8183.dtsi stable/12/sys/gnu/dts/arm64/nvidia/tegra194-p2888.dtsi stable/12/sys/gnu/dts/arm64/nvidia/tegra194-p2972-0000.dts stable/12/sys/gnu/dts/arm64/nvidia/tegra194.dtsi stable/12/sys/gnu/dts/arm64/qcom/msm8996.dtsi stable/12/sys/gnu/dts/arm64/qcom/msm8998.dtsi stable/12/sys/gnu/dts/arm64/qcom/pm8998.dtsi stable/12/sys/gnu/dts/arm64/qcom/pms405.dtsi stable/12/sys/gnu/dts/arm64/qcom/qcs404-evb.dtsi stable/12/sys/gnu/dts/arm64/qcom/qcs404.dtsi stable/12/sys/gnu/dts/arm64/qcom/sdm845-cheza.dtsi stable/12/sys/gnu/dts/arm64/qcom/sdm845-db845c.dts stable/12/sys/gnu/dts/arm64/qcom/sdm845-mtp.dts stable/12/sys/gnu/dts/arm64/qcom/sdm845.dtsi stable/12/sys/gnu/dts/arm64/renesas/hihope-common.dtsi stable/12/sys/gnu/dts/arm64/renesas/hihope-rzg2-ex.dtsi stable/12/sys/gnu/dts/arm64/renesas/r8a774a1.dtsi stable/12/sys/gnu/dts/arm64/renesas/r8a774c0-cat874.dts stable/12/sys/gnu/dts/arm64/renesas/r8a774c0.dtsi stable/12/sys/gnu/dts/arm64/renesas/r8a7795-es1-salvator-x.dts stable/12/sys/gnu/dts/arm64/renesas/r8a7795-es1.dtsi stable/12/sys/gnu/dts/arm64/renesas/r8a7795-salvator-x.dts stable/12/sys/gnu/dts/arm64/renesas/r8a7795-salvator-xs.dts stable/12/sys/gnu/dts/arm64/renesas/r8a7795.dtsi stable/12/sys/gnu/dts/arm64/renesas/r8a7796-salvator-x.dts stable/12/sys/gnu/dts/arm64/renesas/r8a7796-salvator-xs.dts stable/12/sys/gnu/dts/arm64/renesas/r8a7796.dtsi stable/12/sys/gnu/dts/arm64/renesas/r8a77965-salvator-x.dts stable/12/sys/gnu/dts/arm64/renesas/r8a77965-salvator-xs.dts stable/12/sys/gnu/dts/arm64/renesas/r8a77965.dtsi stable/12/sys/gnu/dts/arm64/renesas/r8a77970-eagle.dts stable/12/sys/gnu/dts/arm64/renesas/r8a77970-v3msk.dts stable/12/sys/gnu/dts/arm64/renesas/r8a77970.dtsi stable/12/sys/gnu/dts/arm64/renesas/r8a77980-condor.dts stable/12/sys/gnu/dts/arm64/renesas/r8a77980-v3hsk.dts stable/12/sys/gnu/dts/arm64/renesas/r8a77980.dtsi stable/12/sys/gnu/dts/arm64/renesas/r8a77990-ebisu.dts stable/12/sys/gnu/dts/arm64/renesas/r8a77990.dtsi stable/12/sys/gnu/dts/arm64/renesas/r8a77995-draak.dts stable/12/sys/gnu/dts/arm64/renesas/r8a77995.dtsi stable/12/sys/gnu/dts/arm64/renesas/salvator-common.dtsi stable/12/sys/gnu/dts/arm64/renesas/ulcb-kf.dtsi stable/12/sys/gnu/dts/arm64/renesas/ulcb.dtsi stable/12/sys/gnu/dts/arm64/rockchip/rk3328-rock64.dts stable/12/sys/gnu/dts/arm64/rockchip/rk3328.dtsi stable/12/sys/gnu/dts/arm64/rockchip/rk3399-gru-kevin.dts stable/12/sys/gnu/dts/arm64/rockchip/rk3399-hugsun-x99.dts stable/12/sys/gnu/dts/arm64/rockchip/rk3399-rockpro64.dts stable/12/sys/gnu/dts/arm64/ti/k3-am65-main.dtsi stable/12/sys/gnu/dts/arm64/ti/k3-am65-mcu.dtsi stable/12/sys/gnu/dts/arm64/ti/k3-am65-wakeup.dtsi stable/12/sys/gnu/dts/arm64/ti/k3-am65.dtsi stable/12/sys/gnu/dts/arm64/ti/k3-am654-base-board.dts stable/12/sys/gnu/dts/arm64/ti/k3-j721e-common-proc-board.dts stable/12/sys/gnu/dts/arm64/ti/k3-j721e-main.dtsi stable/12/sys/gnu/dts/arm64/ti/k3-j721e-mcu-wakeup.dtsi stable/12/sys/gnu/dts/arm64/ti/k3-j721e.dtsi stable/12/sys/gnu/dts/include/dt-bindings/bus/ti-sysc.h stable/12/sys/gnu/dts/include/dt-bindings/clock/bcm2835.h stable/12/sys/gnu/dts/include/dt-bindings/clock/g12a-clkc.h stable/12/sys/gnu/dts/include/dt-bindings/clock/imx8-clock.h stable/12/sys/gnu/dts/include/dt-bindings/clock/jz4740-cgu.h stable/12/sys/gnu/dts/include/dt-bindings/clock/mt8183-clk.h stable/12/sys/gnu/dts/include/dt-bindings/clock/omap5.h stable/12/sys/gnu/dts/include/dt-bindings/clock/qcom,gcc-qcs404.h stable/12/sys/gnu/dts/include/dt-bindings/clock/sun8i-v3s-ccu.h stable/12/sys/gnu/dts/include/dt-bindings/leds/common.h stable/12/sys/gnu/dts/include/dt-bindings/pinctrl/k3.h stable/12/sys/gnu/dts/include/dt-bindings/reset/amlogic,meson-gxbb-reset.h stable/12/sys/gnu/dts/include/dt-bindings/reset/amlogic,meson8b-reset.h stable/12/sys/gnu/dts/include/dt-bindings/reset/hisi,hi6220-resets.h stable/12/sys/gnu/dts/include/dt-bindings/reset/imx8mq-reset.h stable/12/sys/gnu/dts/include/dt-bindings/reset/sun8i-v3s-ccu.h Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/gnu/dts/arm/am335x-boneblue.dts ============================================================================== --- stable/12/sys/gnu/dts/arm/am335x-boneblue.dts Wed Mar 4 20:01:03 2020 (r358635) +++ stable/12/sys/gnu/dts/arm/am335x-boneblue.dts Wed Mar 4 20:22:02 2020 (r358636) @@ -5,23 +5,13 @@ /dts-v1/; #include "am33xx.dtsi" +#include "am335x-osd335x-common.dtsi" #include / { model = "TI AM335x BeagleBone Blue"; compatible = "ti,am335x-bone-blue", "ti,am33xx"; - cpus { - cpu@0 { - cpu0-supply = <&dcdc2_reg>; - }; - }; - - memory@80000000 { - device_type = "memory"; - reg = <0x80000000 0x20000000>; /* 512 MB */ - }; - chosen { stdout-path = &uart0; }; @@ -142,13 +132,6 @@ >; }; - i2c0_pins: pinmux_i2c0_pins { - pinctrl-single,pins = < - AM33XX_PADCONF(AM335X_PIN_I2C0_SDA, PIN_INPUT_PULLUP, MUX_MODE0) /* (C17) I2C0_SDA.I2C0_SDA */ - AM33XX_PADCONF(AM335X_PIN_I2C0_SCL, PIN_INPUT_PULLUP, MUX_MODE0) /* (C16) I2C0_SCL.I2C0_SCL */ - >; - }; - i2c2_pins: pinmux_i2c2_pins { pinctrl-single,pins = < AM33XX_PADCONF(AM335X_PIN_UART1_CTSN, PIN_INPUT_PULLUP, MUX_MODE3) /* (D18) uart1_ctsn.I2C2_SDA */ @@ -328,16 +311,6 @@ }; &i2c0 { - pinctrl-names = "default"; - pinctrl-0 = <&i2c0_pins>; - - status = "okay"; - clock-frequency = <400000>; - - tps: tps@24 { - reg = <0x24>; - }; - baseboard_eeprom: baseboard_eeprom@50 { compatible = "atmel,24c256"; reg = <0x50>; @@ -381,66 +354,13 @@ /include/ "tps65217.dtsi" &tps { - interrupts = <7>; /* NMI */ - interrupt-parent = <&intc>; + /delete-property/ ti,pmic-shutdown-controller; charger { interrupts = <0>, <1>; interrupt-names = "USB", "AC"; status = "okay"; }; - - pwrbutton { - interrupts = <2>; - status = "okay"; - }; - - regulators { - dcdc1_reg: regulator@0 { - regulator-name = "vdds_dpr"; - regulator-always-on; - }; - - dcdc2_reg: regulator@1 { - /* VDD_MPU voltage limits 0.95V - 1.26V with +/-4% tolerance */ - regulator-name = "vdd_mpu"; - regulator-min-microvolt = <925000>; - regulator-max-microvolt = <1351500>; - regulator-boot-on; - regulator-always-on; - }; - - dcdc3_reg: regulator@2 { - /* VDD_CORE voltage limits 0.95V - 1.1V with +/-4% tolerance */ - regulator-name = "vdd_core"; - regulator-min-microvolt = <925000>; - regulator-max-microvolt = <1150000>; - regulator-boot-on; - regulator-always-on; - }; - - ldo1_reg: regulator@3 { - regulator-name = "vio,vrtc,vdds"; - regulator-always-on; - }; - - ldo2_reg: regulator@4 { - regulator-name = "vdd_3v3aux"; - regulator-always-on; - }; - - ldo3_reg: regulator@5 { - regulator-name = "vdd_1v8"; - regulator-min-microvolt = <1800000>; - regulator-max-microvolt = <1800000>; - regulator-always-on; - }; - - ldo4_reg: regulator@6 { - regulator-name = "vdd_3v3a"; - regulator-always-on; - }; - }; }; &mmc1 { @@ -500,14 +420,6 @@ compatible = "ti,wl1835-st"; enable-gpios = <&gpio0 28 GPIO_ACTIVE_HIGH>; }; -}; - -&aes { - status = "okay"; -}; - -&sham { - status = "okay"; }; &rtc { Modified: stable/12/sys/gnu/dts/arm/am335x-cm-t335.dts ============================================================================== --- stable/12/sys/gnu/dts/arm/am335x-cm-t335.dts Wed Mar 4 20:01:03 2020 (r358635) +++ stable/12/sys/gnu/dts/arm/am335x-cm-t335.dts Wed Mar 4 20:22:02 2020 (r358636) @@ -44,7 +44,6 @@ regulator-name = "vwlan_fixed"; gpio = <&gpio0 20 GPIO_ACTIVE_HIGH>; /* gpio0_20 */ enable-active-high; - regulator-boot-off; }; backlight { Modified: stable/12/sys/gnu/dts/arm/am335x-icev2.dts ============================================================================== --- stable/12/sys/gnu/dts/arm/am335x-icev2.dts Wed Mar 4 20:01:03 2020 (r358635) +++ stable/12/sys/gnu/dts/arm/am335x-icev2.dts Wed Mar 4 20:22:02 2020 (r358636) @@ -432,7 +432,7 @@ pinctrl-0 = <&mmc0_pins_default>; }; -&gpio0 { +&gpio0_target { /* Do not idle the GPIO used for holding the VTT regulator */ ti,no-reset-on-init; ti,no-idle-on-init; Modified: stable/12/sys/gnu/dts/arm/am33xx-l4.dtsi ============================================================================== --- stable/12/sys/gnu/dts/arm/am33xx-l4.dtsi Wed Mar 4 20:01:03 2020 (r358635) +++ stable/12/sys/gnu/dts/arm/am33xx-l4.dtsi Wed Mar 4 20:22:02 2020 (r358636) @@ -127,7 +127,7 @@ ranges = <0x0 0x5000 0x1000>; }; - target-module@7000 { /* 0x44e07000, ap 14 20.0 */ + gpio0_target: target-module@7000 { /* 0x44e07000, ap 14 20.0 */ compatible = "ti,sysc-omap2", "ti,sysc"; ti,hwmods = "gpio1"; reg = <0x7000 0x4>, @@ -673,7 +673,6 @@ target-module@100000 { /* 0x4a100000, ap 3 08.0 */ compatible = "ti,sysc-omap4-simple", "ti,sysc"; - ti,hwmods = "cpgmac0"; reg = <0x101200 0x4>, <0x101208 0x4>, <0x101204 0x4>; @@ -719,9 +718,10 @@ davinci_mdio: mdio@1000 { compatible = "ti,cpsw-mdio","ti,davinci_mdio"; + clocks = <&cpsw_125mhz_clkctrl AM3_CPSW_125MHZ_CPGMAC0_CLKCTRL 0>; + clock-names = "fck"; #address-cells = <1>; #size-cells = <0>; - ti,hwmods = "davinci_mdio"; bus_freq = <1000000>; reg = <0x1000 0x100>; status = "disabled"; @@ -2038,7 +2038,9 @@ reg = <0xe000 0x4>, <0xe054 0x4>; reg-names = "rev", "sysc"; - ti,sysc-midle ; + ti,sysc-midle = , + , + ; ti,sysc-sidle = , , ; Modified: stable/12/sys/gnu/dts/arm/am3517-evm.dts ============================================================================== --- stable/12/sys/gnu/dts/arm/am3517-evm.dts Wed Mar 4 20:01:03 2020 (r358635) +++ stable/12/sys/gnu/dts/arm/am3517-evm.dts Wed Mar 4 20:22:02 2020 (r358636) @@ -124,10 +124,11 @@ }; lcd0: display@0 { - compatible = "panel-dpi"; + /* This isn't the exact LCD, but the timings meet spec */ + /* To make it work, set CONFIG_OMAP2_DSS_MIN_FCK_PER_PCK=4 */ + compatible = "newhaven,nhd-4.3-480272ef-atxl"; label = "15"; - status = "okay"; - pinctrl-names = "default"; + backlight = <&bl>; enable-gpios = <&gpio6 16 GPIO_ACTIVE_HIGH>; /* gpio176, lcd INI */ vcc-supply = <&vdd_io_reg>; @@ -135,22 +136,6 @@ lcd_in: endpoint { remote-endpoint = <&dpi_out>; }; - }; - - panel-timing { - clock-frequency = <9000000>; - hactive = <480>; - vactive = <272>; - hfront-porch = <3>; - hback-porch = <2>; - hsync-len = <42>; - vback-porch = <3>; - vfront-porch = <4>; - vsync-len = <11>; - hsync-active = <0>; - vsync-active = <0>; - de-active = <1>; - pixelclk-active = <1>; }; }; Modified: stable/12/sys/gnu/dts/arm/am3517.dtsi ============================================================================== --- stable/12/sys/gnu/dts/arm/am3517.dtsi Wed Mar 4 20:01:03 2020 (r358635) +++ stable/12/sys/gnu/dts/arm/am3517.dtsi Wed Mar 4 20:22:02 2020 (r358636) @@ -88,6 +88,30 @@ interrupts = <24>; clocks = <&hecc_ck>; }; + + /* + * On am3517 the OCP registers do not seem to be accessible + * similar to the omap34xx. Maybe SGX is permanently set to + * "OCP bypass mode", or maybe there is OCP_SYSCONFIG that is + * write-only at 0x50000e10. We detect SGX based on the SGX + * revision register instead of the unreadable OCP revision + * register. + */ + sgx_module: target-module@50000000 { + compatible = "ti,sysc-omap2", "ti,sysc"; + reg = <0x50000014 0x4>; + reg-names = "rev"; + clocks = <&sgx_fck>, <&sgx_ick>; + clock-names = "fck", "ick"; + #address-cells = <1>; + #size-cells = <1>; + ranges = <0 0x50000000 0x4000>; + + /* + * Closed source PowerVR driver, no child device + * binding or driver in mainline + */ + }; }; }; Modified: stable/12/sys/gnu/dts/arm/am3874-iceboard.dts ============================================================================== --- stable/12/sys/gnu/dts/arm/am3874-iceboard.dts Wed Mar 4 20:01:03 2020 (r358635) +++ stable/12/sys/gnu/dts/arm/am3874-iceboard.dts Wed Mar 4 20:22:02 2020 (r358636) @@ -111,13 +111,13 @@ reg = <0x70>; #address-cells = <1>; #size-cells = <0>; + i2c-mux-idle-disconnect; i2c@0 { /* FMC A */ #address-cells = <1>; #size-cells = <0>; reg = <0>; - i2c-mux-idle-disconnect; }; i2c@1 { @@ -125,7 +125,6 @@ #address-cells = <1>; #size-cells = <0>; reg = <1>; - i2c-mux-idle-disconnect; }; i2c@2 { @@ -133,7 +132,6 @@ #address-cells = <1>; #size-cells = <0>; reg = <2>; - i2c-mux-idle-disconnect; }; i2c@3 { @@ -141,7 +139,6 @@ #address-cells = <1>; #size-cells = <0>; reg = <3>; - i2c-mux-idle-disconnect; }; i2c@4 { @@ -149,14 +146,12 @@ #address-cells = <1>; #size-cells = <0>; reg = <4>; - i2c-mux-idle-disconnect; }; i2c@5 { #address-cells = <1>; #size-cells = <0>; reg = <5>; - i2c-mux-idle-disconnect; ina230@40 { compatible = "ti,ina230"; reg = <0x40>; shunt-resistor = <5000>; }; ina230@41 { compatible = "ti,ina230"; reg = <0x41>; shunt-resistor = <5000>; }; @@ -182,14 +177,12 @@ #address-cells = <1>; #size-cells = <0>; reg = <6>; - i2c-mux-idle-disconnect; }; i2c@7 { #address-cells = <1>; #size-cells = <0>; reg = <7>; - i2c-mux-idle-disconnect; u41: pca9575@20 { compatible = "nxp,pca9575"; Modified: stable/12/sys/gnu/dts/arm/am4372.dtsi ============================================================================== --- stable/12/sys/gnu/dts/arm/am4372.dtsi Wed Mar 4 20:01:03 2020 (r358635) +++ stable/12/sys/gnu/dts/arm/am4372.dtsi Wed Mar 4 20:22:02 2020 (r358636) @@ -337,6 +337,8 @@ ti,hwmods = "dss_dispc"; clocks = <&disp_clk>; clock-names = "fck"; + + max-memory-bandwidth = <230000000>; }; rfbi: rfbi@4832a800 { Modified: stable/12/sys/gnu/dts/arm/am437x-l4.dtsi ============================================================================== --- stable/12/sys/gnu/dts/arm/am437x-l4.dtsi Wed Mar 4 20:01:03 2020 (r358635) +++ stable/12/sys/gnu/dts/arm/am437x-l4.dtsi Wed Mar 4 20:22:02 2020 (r358636) @@ -512,7 +512,6 @@ target-module@100000 { /* 0x4a100000, ap 3 04.0 */ compatible = "ti,sysc-omap4-simple", "ti,sysc"; - ti,hwmods = "cpgmac0"; reg = <0x101200 0x4>, <0x101208 0x4>, <0x101204 0x4>; @@ -559,11 +558,10 @@ davinci_mdio: mdio@1000 { compatible = "ti,am4372-mdio","ti,cpsw-mdio","ti,davinci_mdio"; reg = <0x1000 0x100>; + clocks = <&cpsw_125mhz_clkctrl AM4_CPSW_125MHZ_CPGMAC0_CLKCTRL 0>; + clock-names = "fck"; #address-cells = <1>; #size-cells = <0>; - clocks = <&cpsw_125mhz_gclk>; - clock-names = "fck"; - ti,hwmods = "davinci_mdio"; bus_freq = <1000000>; status = "disabled"; }; Modified: stable/12/sys/gnu/dts/arm/aspeed-ast2500-evb.dts ============================================================================== --- stable/12/sys/gnu/dts/arm/aspeed-ast2500-evb.dts Wed Mar 4 20:01:03 2020 (r358635) +++ stable/12/sys/gnu/dts/arm/aspeed-ast2500-evb.dts Wed Mar 4 20:22:02 2020 (r358636) @@ -94,6 +94,17 @@ }; }; +&sdmmc { + status = "okay"; +}; + +&sdhci0 { + status = "okay"; + + pinctrl-names = "default"; + pinctrl-0 = <&pinctrl_sd1_default>; +}; + /* * Enable port A as device (via the virtual hub) and port B as * host by default on the eval board. This can be easily changed Copied: stable/12/sys/gnu/dts/arm/aspeed-ast2600-evb.dts (from r355187, head/sys/gnu/dts/arm/aspeed-ast2600-evb.dts) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/12/sys/gnu/dts/arm/aspeed-ast2600-evb.dts Wed Mar 4 20:22:02 2020 (r358636, copy of r355187, head/sys/gnu/dts/arm/aspeed-ast2600-evb.dts) @@ -0,0 +1,80 @@ +// SPDX-License-Identifier: GPL-2.0-or-later +// Copyright 2019 IBM Corp. + +/dts-v1/; + +#include "aspeed-g6.dtsi" + +/ { + model = "AST2600 EVB"; + compatible = "aspeed,ast2600"; + + aliases { + serial4 = &uart5; + }; + + chosen { + bootargs = "console=ttyS4,115200n8"; + }; + + memory@80000000 { + device_type = "memory"; + reg = <0x80000000 0x80000000>; + }; +}; + +&mdio1 { + status = "okay"; + + ethphy1: ethernet-phy@0 { + compatible = "ethernet-phy-ieee802.3-c22"; + reg = <0>; + }; +}; + +&mdio2 { + status = "okay"; + + ethphy2: ethernet-phy@0 { + compatible = "ethernet-phy-ieee802.3-c22"; + reg = <0>; + }; +}; + +&mdio3 { + status = "okay"; + + ethphy3: ethernet-phy@0 { + compatible = "ethernet-phy-ieee802.3-c22"; + reg = <0>; + }; +}; + +&mac1 { + status = "okay"; + + phy-mode = "rgmii"; + phy-handle = <ðphy1>; +}; + +&mac2 { + status = "okay"; + + phy-mode = "rgmii"; + phy-handle = <ðphy2>; +}; + +&mac3 { + status = "okay"; + + phy-mode = "rgmii"; + phy-handle = <ðphy3>; +}; + +&emmc { + status = "okay"; +}; + +&rtc { + status = "okay"; +}; Copied: stable/12/sys/gnu/dts/arm/aspeed-bmc-facebook-minipack.dts (from r355187, head/sys/gnu/dts/arm/aspeed-bmc-facebook-minipack.dts) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/12/sys/gnu/dts/arm/aspeed-bmc-facebook-minipack.dts Wed Mar 4 20:22:02 2020 (r358636, copy of r355187, head/sys/gnu/dts/arm/aspeed-bmc-facebook-minipack.dts) @@ -0,0 +1,429 @@ +// SPDX-License-Identifier: GPL-2.0+ +// Copyright (c) 2018 Facebook Inc. +/dts-v1/; + +#include "aspeed-g5.dtsi" + +/ { + model = "Facebook Minipack 100 BMC"; + compatible = "facebook,minipack-bmc", "aspeed,ast2500"; + + aliases { + /* + * Override the default serial aliases to avoid breaking + * the legacy applications. + */ + serial0 = &uart5; + serial1 = &uart1; + serial2 = &uart2; + serial3 = &uart3; + serial4 = &uart4; + + /* + * i2c switch 2-0070, pca9548, 8 child channels assigned + * with bus number 16-23. + */ + i2c16 = &imux16; + i2c17 = &imux17; + i2c18 = &imux18; + i2c19 = &imux19; + i2c20 = &imux20; + i2c21 = &imux21; + i2c22 = &imux22; + i2c23 = &imux23; + + /* + * i2c switch 8-0070, pca9548, 8 child channels assigned + * with bus number 24-31. + */ + i2c24 = &imux24; + i2c25 = &imux25; + i2c26 = &imux26; + i2c27 = &imux27; + i2c28 = &imux28; + i2c29 = &imux29; + i2c30 = &imux30; + i2c31 = &imux31; + + /* + * i2c switch 9-0070, pca9548, 8 child channels assigned + * with bus number 32-39. + */ + i2c32 = &imux32; + i2c33 = &imux33; + i2c34 = &imux34; + i2c35 = &imux35; + i2c36 = &imux36; + i2c37 = &imux37; + i2c38 = &imux38; + i2c39 = &imux39; + + /* + * i2c switch 11-0070, pca9548, 8 child channels assigned + * with bus number 40-47. + */ + i2c40 = &imux40; + i2c41 = &imux41; + i2c42 = &imux42; + i2c43 = &imux43; + i2c44 = &imux44; + i2c45 = &imux45; + i2c46 = &imux46; + i2c47 = &imux47; + }; + + chosen { + stdout-path = &uart1; + bootargs = "debug console=ttyS1,9600n8 root=/dev/ram rw"; + }; + + memory@80000000 { + reg = <0x80000000 0x20000000>; + }; +}; + +&wdt1 { + status = "okay"; + aspeed,reset-type = "system"; +}; + +&wdt2 { + status = "okay"; + aspeed,reset-type = "system"; +}; + +&fmc { + status = "okay"; + flash@0 { + status = "okay"; + m25p,fast-read; + label = "bmc"; +#include "facebook-bmc-flash-layout.dtsi" + }; +}; + +&uart1 { + status = "okay"; + pinctrl-names = "default"; + pinctrl-0 = <&pinctrl_txd1_default + &pinctrl_rxd1_default + &pinctrl_ncts1_default + &pinctrl_ndsr1_default + &pinctrl_ndtr1_default + &pinctrl_nrts1_default>; +}; + +&uart2 { + status = "okay"; + pinctrl-names = "default"; + pinctrl-0 = <&pinctrl_txd2_default + &pinctrl_rxd2_default>; +}; + +&uart3 { + status = "okay"; + pinctrl-names = "default"; + pinctrl-0 = <&pinctrl_txd3_default + &pinctrl_rxd3_default>; +}; + +&uart4 { + status = "okay"; + pinctrl-names = "default"; + pinctrl-0 = <&pinctrl_txd4_default + &pinctrl_rxd4_default>; +}; + +&uart5 { + status = "okay"; +}; + +&mac1 { + status = "okay"; + no-hw-checksum; + pinctrl-names = "default"; + pinctrl-0 = <&pinctrl_rgmii2_default &pinctrl_mdio2_default>; +}; + +&i2c0 { + status = "okay"; + bus-frequency = <400000>; + multi-master; +}; + +&i2c1 { + status = "okay"; +}; + +&i2c2 { + status = "okay"; + + i2c-switch@70 { + compatible = "nxp,pca9548"; + #address-cells = <1>; + #size-cells = <0>; + reg = <0x70>; + + imux16: i2c@0 { + #address-cells = <1>; + #size-cells = <0>; + reg = <0>; + }; + + imux17: i2c@1 { + #address-cells = <1>; + #size-cells = <0>; + reg = <1>; + }; + + imux18: i2c@2 { + #address-cells = <1>; + #size-cells = <0>; + reg = <2>; + }; + + imux19: i2c@3 { + #address-cells = <1>; + #size-cells = <0>; + reg = <3>; + }; + + imux20: i2c@4 { + #address-cells = <1>; + #size-cells = <0>; + reg = <4>; + }; + + imux21: i2c@5 { + #address-cells = <1>; + #size-cells = <0>; + reg = <5>; + }; + + imux22: i2c@6 { + #address-cells = <1>; + #size-cells = <0>; + reg = <6>; + }; + + imux23: i2c@7 { + #address-cells = <1>; + #size-cells = <0>; + reg = <7>; + }; + }; +}; + +&i2c3 { + status = "okay"; +}; + +&i2c4 { + status = "okay"; + multi-master; +}; + +&i2c5 { + status = "okay"; +}; + +&i2c6 { + status = "okay"; +}; + +&i2c7 { + status = "okay"; +}; + +&i2c8 { + status = "okay"; + + i2c-switch@70 { + compatible = "nxp,pca9548"; + #address-cells = <1>; + #size-cells = <0>; + reg = <0x70>; + + imux24: i2c@0 { + #address-cells = <1>; + #size-cells = <0>; + reg = <0>; + }; + + imux25: i2c@1 { + #address-cells = <1>; + #size-cells = <0>; + reg = <1>; + }; + + imux26: i2c@2 { + #address-cells = <1>; + #size-cells = <0>; + reg = <2>; + }; + + imux27: i2c@3 { + #address-cells = <1>; + #size-cells = <0>; + reg = <3>; + }; + + imux28: i2c@4 { + #address-cells = <1>; + #size-cells = <0>; + reg = <4>; + }; + + imux29: i2c@5 { + #address-cells = <1>; + #size-cells = <0>; + reg = <5>; + }; + + imux30: i2c@6 { + #address-cells = <1>; + #size-cells = <0>; + reg = <6>; + }; + + imux31: i2c@7 { + #address-cells = <1>; + #size-cells = <0>; + reg = <7>; + }; + }; +}; + +&i2c9 { + status = "okay"; + + i2c-switch@70 { + compatible = "nxp,pca9548"; + #address-cells = <1>; + #size-cells = <0>; + reg = <0x70>; + + imux32: i2c@0 { + #address-cells = <1>; + #size-cells = <0>; + reg = <0>; + }; + + imux33: i2c@1 { + #address-cells = <1>; + #size-cells = <0>; + reg = <1>; + }; + + imux34: i2c@2 { + #address-cells = <1>; + #size-cells = <0>; + reg = <2>; + }; + + imux35: i2c@3 { + #address-cells = <1>; + #size-cells = <0>; + reg = <3>; + }; + + imux36: i2c@4 { + #address-cells = <1>; + #size-cells = <0>; + reg = <4>; + }; + + imux37: i2c@5 { + #address-cells = <1>; + #size-cells = <0>; + reg = <5>; + }; + + imux38: i2c@6 { + #address-cells = <1>; + #size-cells = <0>; + reg = <6>; + }; + + imux39: i2c@7 { + #address-cells = <1>; + #size-cells = <0>; + reg = <7>; + }; + }; +}; + +&i2c10 { + status = "okay"; +}; + +&i2c11 { + status = "okay"; + + i2c-switch@70 { + compatible = "nxp,pca9548"; + #address-cells = <1>; + #size-cells = <0>; + reg = <0x70>; + + imux40: i2c@0 { + #address-cells = <1>; + #size-cells = <0>; + reg = <0>; + }; + + imux41: i2c@1 { + #address-cells = <1>; + #size-cells = <0>; + reg = <1>; + }; + + imux42: i2c@2 { + #address-cells = <1>; + #size-cells = <0>; + reg = <2>; + }; + + imux43: i2c@3 { + #address-cells = <1>; + #size-cells = <0>; + reg = <3>; + }; + + imux44: i2c@4 { + #address-cells = <1>; + #size-cells = <0>; + reg = <4>; + }; + + imux45: i2c@5 { + #address-cells = <1>; + #size-cells = <0>; + reg = <5>; + }; + + imux46: i2c@6 { + #address-cells = <1>; + #size-cells = <0>; + reg = <6>; + }; + + imux47: i2c@7 { + #address-cells = <1>; + #size-cells = <0>; + reg = <7>; + }; + }; +}; + +&i2c12 { + status = "okay"; +}; + +&i2c13 { + status = "okay"; +}; + +&vhub { + status = "okay"; +}; Modified: stable/12/sys/gnu/dts/arm/aspeed-bmc-facebook-tiogapass.dts ============================================================================== --- stable/12/sys/gnu/dts/arm/aspeed-bmc-facebook-tiogapass.dts Wed Mar 4 20:01:03 2020 (r358635) +++ stable/12/sys/gnu/dts/arm/aspeed-bmc-facebook-tiogapass.dts Wed Mar 4 20:22:02 2020 (r358636) @@ -12,6 +12,27 @@ aliases { serial0 = &uart1; serial4 = &uart5; + + /* + * Hardcode the bus number of i2c switches' channels to + * avoid breaking the legacy applications. + */ + i2c16 = &imux16; + i2c17 = &imux17; + i2c18 = &imux18; + i2c19 = &imux19; + i2c20 = &imux20; + i2c21 = &imux21; + i2c22 = &imux22; + i2c23 = &imux23; + i2c24 = &imux24; + i2c25 = &imux25; + i2c26 = &imux26; + i2c27 = &imux27; + i2c28 = &imux28; + i2c29 = &imux29; + i2c30 = &imux30; + i2c31 = &imux31; }; chosen { stdout-path = &uart5; @@ -25,13 +46,9 @@ iio-hwmon { compatible = "iio-hwmon"; io-channels = <&adc 0>, <&adc 1>, <&adc 2>, <&adc 3>, - <&adc 4>, <&adc 5>, <&adc 6>; + <&adc 4>, <&adc 5>, <&adc 6>, <&adc 7>; }; - iio-hwmon-battery { - compatible = "iio-hwmon"; - io-channels = <&adc 7>; - }; }; &fmc { @@ -124,6 +141,215 @@ &i2c1 { status = "okay"; //X24 Riser + i2c-switch@71 { + compatible = "nxp,pca9544"; + #address-cells = <1>; + #size-cells = <0>; + reg = <0x71>; + + imux16: i2c@0 { + #address-cells = <1>; + #size-cells = <0>; + reg = <0>; + + ina230@45 { + compatible = "ti,ina230"; + reg = <0x45>; + }; + + tmp75@48 { + compatible = "ti,tmp75"; + reg = <0x48>; + }; + + tmp421@49 { + compatible = "ti,tmp75"; + reg = <0x49>; + }; + + eeprom@50 { + compatible = "atmel,24c64"; + reg = <0x50>; + pagesize = <32>; + }; + + i2c-switch@73 { *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@freebsd.org Wed Mar 4 20:29:50 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 7D18D277F7B; Wed, 4 Mar 2020 20:29:50 +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 48XlqL23t7z3P4M; Wed, 4 Mar 2020 20:29:50 +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 0171C23A83; Wed, 4 Mar 2020 20:29:50 +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 024KTnlT099758; Wed, 4 Mar 2020 20:29:49 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 024KTnYZ099757; Wed, 4 Mar 2020 20:29:49 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <202003042029.024KTnYZ099757@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Wed, 4 Mar 2020 20:29:49 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r358637 - head/contrib/elftoolchain/readelf X-SVN-Group: head X-SVN-Commit-Author: emaste X-SVN-Commit-Paths: head/contrib/elftoolchain/readelf X-SVN-Commit-Revision: 358637 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages 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, 04 Mar 2020 20:29:50 -0000 Author: emaste Date: Wed Mar 4 20:29:49 2020 New Revision: 358637 URL: https://svnweb.freebsd.org/changeset/base/358637 Log: readelf: check note namesz and descsz Previously corrupt note namesz or descsz (perhaps caused by readelf's current lack of endian support for notes) resulted in a crash. Check that namesz and descsz do not extend beyond the end of the buffer before trying to access name and desc data. Reported by: jhb MFC after: 3 days Sponsored by: The FreeBSD Foundation Modified: head/contrib/elftoolchain/readelf/readelf.c Modified: head/contrib/elftoolchain/readelf/readelf.c ============================================================================== --- head/contrib/elftoolchain/readelf/readelf.c Wed Mar 4 20:22:02 2020 (r358636) +++ head/contrib/elftoolchain/readelf/readelf.c Wed Mar 4 20:29:49 2020 (r358637) @@ -3740,6 +3740,10 @@ dump_notes_content(struct readelf *re, const char *buf } note = (Elf_Note *)(uintptr_t) buf; buf += sizeof(Elf_Note); + if (buf + roundup2(note->n_namesz, 4) > end) { + warnx("invalid note header name"); + return; + } name = buf; buf += roundup2(note->n_namesz, 4); /* @@ -3759,6 +3763,10 @@ dump_notes_content(struct readelf *re, const char *buf printf(" %-13s %#010jx", name, (uintmax_t) note->n_descsz); printf(" %s\n", note_type(name, re->ehdr.e_type, note->n_type)); + if (buf + roundup2(note->n_descsz, 4) > end) { + warnx("invalid note header desc"); + return; + } dump_notes_data(re, name, note->n_type, buf, note->n_descsz); buf += roundup2(note->n_descsz, 4); } From owner-svn-src-all@freebsd.org Wed Mar 4 20:30:12 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 45D55277FCD; Wed, 4 Mar 2020 20:30:12 +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 48Xlql3s5zz3PqW; Wed, 4 Mar 2020 20:30:11 +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 7F31923A87; Wed, 4 Mar 2020 20:30:11 +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 024KUBEI099865; Wed, 4 Mar 2020 20:30:11 GMT (envelope-from manu@FreeBSD.org) Received: (from manu@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 024KUBBK099864; Wed, 4 Mar 2020 20:30:11 GMT (envelope-from manu@FreeBSD.org) Message-Id: <202003042030.024KUBBK099864@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: manu set sender to manu@FreeBSD.org using -f From: Emmanuel Vadot Date: Wed, 4 Mar 2020 20:30: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: r358638 - stable/12/sys/dev/cpufreq X-SVN-Group: stable-12 X-SVN-Commit-Author: manu X-SVN-Commit-Paths: stable/12/sys/dev/cpufreq X-SVN-Commit-Revision: 358638 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages 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, 04 Mar 2020 20:30:12 -0000 Author: manu Date: Wed Mar 4 20:30:11 2020 New Revision: 358638 URL: https://svnweb.freebsd.org/changeset/base/358638 Log: MFC r355360-r355361 r355360: cpufreq_dt: Do not attach the device if the cpu isn't present If we boot with hw.ncpu=X (available on arm and arm64 at least) we shouldn't attach the cpufreq driver as cf_set_method will try to get the cpuid and it doesn't exists. This solves cpufreq panicing on RockChip RK3399 when booting with hw.ncpu=4 r355361: cpufreq_dt: Do not fetch again hw.ncpu MD code already set the global variable mp_ncpus according to the tunable hw.ncpu so use the global variable directly. Reported by: ian Modified: stable/12/sys/dev/cpufreq/cpufreq_dt.c Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/dev/cpufreq/cpufreq_dt.c ============================================================================== --- stable/12/sys/dev/cpufreq/cpufreq_dt.c Wed Mar 4 20:29:49 2020 (r358637) +++ stable/12/sys/dev/cpufreq/cpufreq_dt.c Wed Mar 4 20:30:11 2020 (r358638) @@ -455,7 +455,13 @@ cpufreq_dt_attach(device_t dev) sc = device_get_softc(dev); sc->dev = dev; node = ofw_bus_get_node(device_get_parent(dev)); + cpu = device_get_unit(device_get_parent(dev)); + if (cpu >= mp_ncpus) { + device_printf(dev, "Not attaching as cpu is not present\n"); + return (ENXIO); + } + if (regulator_get_by_ofw_property(dev, node, "cpu-supply", &sc->reg) != 0) { if (regulator_get_by_ofw_property(dev, node, @@ -497,7 +503,6 @@ cpufreq_dt_attach(device_t dev) * Find all CPUs that share the same opp table */ CPU_ZERO(&sc->cpus); - cpu = device_get_unit(device_get_parent(dev)); for (cnode = node; cnode > 0; cnode = OF_peer(cnode), cpu++) { copp = -1; if (version == OPP_V1) From owner-svn-src-all@freebsd.org Wed Mar 4 20:41:46 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 99C9D2507F9; Wed, 4 Mar 2020 20: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 48Xm561XM5z4J52; Wed, 4 Mar 2020 20:41:46 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 234D323CF4; Wed, 4 Mar 2020 20:41:46 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 024KfjHN010689; Wed, 4 Mar 2020 20:41:45 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 024KfjNw010688; Wed, 4 Mar 2020 20:41:45 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <202003042041.024KfjNw010688@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Wed, 4 Mar 2020 20:41:45 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r358639 - head/contrib/elftoolchain/readelf X-SVN-Group: head X-SVN-Commit-Author: emaste X-SVN-Commit-Paths: head/contrib/elftoolchain/readelf X-SVN-Commit-Revision: 358639 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages 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, 04 Mar 2020 20:41:46 -0000 Author: emaste Date: Wed Mar 4 20:41:45 2020 New Revision: 358639 URL: https://svnweb.freebsd.org/changeset/base/358639 Log: readelf: simplify namesz / descsz checks MFC after: 3 days Sponsored by: The FreeBSD Foundation Modified: head/contrib/elftoolchain/readelf/readelf.c Modified: head/contrib/elftoolchain/readelf/readelf.c ============================================================================== --- head/contrib/elftoolchain/readelf/readelf.c Wed Mar 4 20:30:11 2020 (r358638) +++ head/contrib/elftoolchain/readelf/readelf.c Wed Mar 4 20:41:45 2020 (r358639) @@ -3728,6 +3728,7 @@ dump_notes_content(struct readelf *re, const char *buf { Elf_Note *note; const char *end, *name; + uint32_t namesz, descsz; printf("\nNotes at offset %#010jx with length %#010jx:\n", (uintmax_t) off, (uintmax_t) sz); @@ -3739,13 +3740,16 @@ dump_notes_content(struct readelf *re, const char *buf return; } note = (Elf_Note *)(uintptr_t) buf; - buf += sizeof(Elf_Note); - if (buf + roundup2(note->n_namesz, 4) > end) { - warnx("invalid note header name"); + namesz = roundup2(note->n_namesz, 4); + descsz = roundup2(note->n_descsz, 4); + if (namesz < note->n_namesz || descsz < note->n_descsz || + buf + namesz + descsz > end) { + warnx("invalid note header"); return; } + buf += sizeof(Elf_Note); name = buf; - buf += roundup2(note->n_namesz, 4); + buf += namesz; /* * The name field is required to be nul-terminated, and * n_namesz includes the terminating nul in observed @@ -3763,12 +3767,8 @@ dump_notes_content(struct readelf *re, const char *buf printf(" %-13s %#010jx", name, (uintmax_t) note->n_descsz); printf(" %s\n", note_type(name, re->ehdr.e_type, note->n_type)); - if (buf + roundup2(note->n_descsz, 4) > end) { - warnx("invalid note header desc"); - return; - } dump_notes_data(re, name, note->n_type, buf, note->n_descsz); - buf += roundup2(note->n_descsz, 4); + buf += descsz; } } From owner-svn-src-all@freebsd.org Wed Mar 4 20:43:32 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 0B335250A65; Wed, 4 Mar 2020 20:43:32 +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 48Xm775lskz4LXK; Wed, 4 Mar 2020 20:43:31 +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 0B07423E88; Wed, 4 Mar 2020 20:43:31 +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 024KhUt5011651; Wed, 4 Mar 2020 20:43:30 GMT (envelope-from manu@FreeBSD.org) Received: (from manu@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 024KhU6l011646; Wed, 4 Mar 2020 20:43:30 GMT (envelope-from manu@FreeBSD.org) Message-Id: <202003042043.024KhU6l011646@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: manu set sender to manu@FreeBSD.org using -f From: Emmanuel Vadot Date: Wed, 4 Mar 2020 20:43:30 +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: r358640 - in stable/12/sys: arm64/conf arm64/rockchip conf X-SVN-Group: stable-12 X-SVN-Commit-Author: manu X-SVN-Commit-Paths: in stable/12/sys: arm64/conf arm64/rockchip conf X-SVN-Commit-Revision: 358640 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages 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, 04 Mar 2020 20:43:32 -0000 Author: manu Date: Wed Mar 4 20:43:29 2020 New Revision: 358640 URL: https://svnweb.freebsd.org/changeset/base/358640 Log: MFC r349638, r350161, r351186 r349638 by ganbold: Subclass Rockchip's General Register Files driver from Simple MFD driver. r350161 by ganbold: Add driver for Rockchip RK3399 eMMC PHY. Tested on NanoPC-T4 board. Reviewed by: manu Differential Revision: https://reviews.freebsd.org/D20840 r351186 by mmel: Improve rk_i2c driver: - Properly handle IIC_M_NOSTOP and IIC_M_NOSTART flags. - add polling mode, so driver can be used even if interrupts are not enabled (this is necessary for proper support of PMICs). - add support for RK3288 Added: stable/12/sys/arm64/rockchip/rk3399_emmcphy.c - copied unchanged from r350161, head/sys/arm64/rockchip/rk3399_emmcphy.c Modified: stable/12/sys/arm64/conf/GENERIC stable/12/sys/arm64/rockchip/rk_grf.c stable/12/sys/arm64/rockchip/rk_i2c.c stable/12/sys/conf/files.arm64 Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/arm64/conf/GENERIC ============================================================================== --- stable/12/sys/arm64/conf/GENERIC Wed Mar 4 20:41:45 2020 (r358639) +++ stable/12/sys/arm64/conf/GENERIC Wed Mar 4 20:43:29 2020 (r358640) @@ -166,6 +166,7 @@ device aw_mmc # Allwinner SD/MMC controller device mmc # mmc/sd bus device mmcsd # mmc/sd flash cards device dwmmc +device rk_emmcphy # Serial (COM) ports device uart # Generic UART driver Copied: stable/12/sys/arm64/rockchip/rk3399_emmcphy.c (from r350161, head/sys/arm64/rockchip/rk3399_emmcphy.c) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/12/sys/arm64/rockchip/rk3399_emmcphy.c Wed Mar 4 20:43:29 2020 (r358640, copy of r350161, head/sys/arm64/rockchip/rk3399_emmcphy.c) @@ -0,0 +1,341 @@ +/*- + * SPDX-License-Identifier: BSD-2-Clause-FreeBSD + * + * Copyright (c) 2019 Ganbold Tsagaankhuu + * 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. + */ + +/* + * Rockchip RK3399 eMMC PHY + */ + +#include +__FBSDID("$FreeBSD$"); + +#include +#include +#include +#include +#include +#include +#include +#include + +#include +#include +#include + +#include +#include +#include + +#include "syscon_if.h" + +#define GRF_EMMCPHY_BASE 0xf780 +#define GRF_EMMCPHY_CON0 (GRF_EMMCPHY_BASE + 0x00) +#define PHYCTRL_FRQSEL (1 << 13) | (1 << 12) +#define PHYCTRL_FRQSEL_200M 0 +#define PHYCTRL_FRQSEL_50M 1 +#define PHYCTRL_FRQSEL_100M 2 +#define PHYCTRL_FRQSEL_150M 3 +#define PHYCTRL_OTAPDLYENA (1 << 11) +#define PHYCTRL_OTAPDLYSEL (1 << 10) | (1 << 9) | (1 << 8) | (1 << 7) +#define PHYCTRL_ITAPCHGWIN (1 << 6) +#define PHYCTRL_ITAPDLYSEL (1 << 5) | (1 << 4) | (1 << 3) | (1 << 2) | \ + (1 << 1) +#define PHYCTRL_ITAPDLYENA (1 << 0) +#define GRF_EMMCPHY_CON1 (GRF_EMMCPHY_BASE + 0x04) +#define PHYCTRL_CLKBUFSEL (1 << 8) | (1 << 7) | (1 << 6) +#define PHYCTRL_SELDLYTXCLK (1 << 5) +#define PHYCTRL_SELDLYRXCLK (1 << 4) +#define PHYCTRL_STRBSEL 0xf +#define GRF_EMMCPHY_CON2 (GRF_EMMCPHY_BASE + 0x08) +#define PHYCTRL_REN_STRB (1 << 9) +#define PHYCTRL_REN_CMD (1 << 8) +#define PHYCTRL_REN_DAT 0xff +#define GRF_EMMCPHY_CON3 (GRF_EMMCPHY_BASE + 0x0c) +#define PHYCTRL_PU_STRB (1 << 9) +#define PHYCTRL_PU_CMD (1 << 8) +#define PHYCTRL_PU_DAT 0xff +#define GRF_EMMCPHY_CON4 (GRF_EMMCPHY_BASE + 0x10) +#define PHYCTRL_OD_RELEASE_CMD (1 << 9) +#define PHYCTRL_OD_RELEASE_STRB (1 << 8) +#define PHYCTRL_OD_RELEASE_DAT 0xff +#define GRF_EMMCPHY_CON5 (GRF_EMMCPHY_BASE + 0x14) +#define PHYCTRL_ODEN_STRB (1 << 9) +#define PHYCTRL_ODEN_CMD (1 << 8) +#define PHYCTRL_ODEN_DAT 0xff +#define GRF_EMMCPHY_CON6 (GRF_EMMCPHY_BASE + 0x18) +#define PHYCTRL_DLL_TRM_ICP (1 << 12) | (1 << 11) | (1 << 10) | (1 << 9) +#define PHYCTRL_EN_RTRIM (1 << 8) +#define PHYCTRL_RETRIM (1 << 7) +#define PHYCTRL_DR_TY (1 << 6) | (1 << 5) | (1 << 4) +#define PHYCTRL_RETENB (1 << 3) +#define PHYCTRL_RETEN (1 << 2) +#define PHYCTRL_ENDLL (1 << 1) +#define PHYCTRL_PDB (1 << 0) +#define GRF_EMMCPHY_STATUS (GRF_EMMCPHY_BASE + 0x20) +#define PHYCTRL_CALDONE (1 << 6) +#define PHYCTRL_DLLRDY (1 << 5) +#define PHYCTRL_RTRIM (1 << 4) | (1 << 3) | (1 << 2) | (1 << 1) +#define PHYCTRL_EXR_NINST (1 << 0) + +static struct ofw_compat_data compat_data[] = { + { "rockchip,rk3399-emmc-phy", 1 }, + { NULL, 0 } +}; + +struct rk_emmcphy_softc { + struct syscon *syscon; + struct rk_emmcphy_conf *phy_conf; + clk_t clk; +}; + +#define LOWEST_SET_BIT(mask) ((((mask) - 1) & (mask)) ^ (mask)) +#define SHIFTIN(x, mask) ((x) * LOWEST_SET_BIT(mask)) + +/* Phy class and methods. */ +static int rk_emmcphy_enable(struct phynode *phynode, bool enable); +static phynode_method_t rk_emmcphy_phynode_methods[] = { + PHYNODEMETHOD(phynode_enable, rk_emmcphy_enable), + PHYNODEMETHOD_END +}; + +DEFINE_CLASS_1(rk_emmcphy_phynode, rk_emmcphy_phynode_class, + rk_emmcphy_phynode_methods, 0, phynode_class); + +static int +rk_emmcphy_enable(struct phynode *phynode, bool enable) +{ + struct rk_emmcphy_softc *sc; + device_t dev; + intptr_t phy; + uint64_t rate, frqsel; + uint32_t mask, val; + int error; + + dev = phynode_get_device(phynode); + phy = phynode_get_id(phynode); + sc = device_get_softc(dev); + + if (bootverbose) + device_printf(dev, "Phy id: %ld\n", phy); + + if (phy != 0) { + device_printf(dev, "Unknown phy: %ld\n", phy); + return (ERANGE); + } + if (enable) { + /* Drive strength */ + mask = PHYCTRL_DR_TY; + val = SHIFTIN(0, PHYCTRL_DR_TY); + SYSCON_WRITE_4(sc->syscon, GRF_EMMCPHY_CON6, + (mask << 16) | val); + + /* Enable output tap delay */ + mask = PHYCTRL_OTAPDLYENA | PHYCTRL_OTAPDLYSEL; + val = PHYCTRL_OTAPDLYENA | SHIFTIN(4, PHYCTRL_OTAPDLYSEL); + SYSCON_WRITE_4(sc->syscon, GRF_EMMCPHY_CON0, + (mask << 16) | val); + } + + /* Power down PHY and disable DLL before making changes */ + mask = PHYCTRL_ENDLL | PHYCTRL_PDB; + val = 0; + SYSCON_WRITE_4(sc->syscon, GRF_EMMCPHY_CON6, (mask << 16) | val); + + if (enable == false) + return (0); + + sc->phy_conf = (struct rk_emmcphy_conf *)ofw_bus_search_compatible(dev, + compat_data)->ocd_data; + + /* Get clock */ + error = clk_get_by_ofw_name(dev, 0, "emmcclk", &sc->clk); + if (error != 0) { + device_printf(dev, "cannot get emmcclk clock, continue\n"); + sc->clk = NULL; + } else + device_printf(dev, "got emmcclk clock\n"); + + if (sc->clk) { + error = clk_get_freq(sc->clk, &rate); + if (error != 0) { + device_printf(dev, "cannot get clock frequency\n"); + return (ENXIO); + } + } else + rate = 0; + + if (rate != 0) { + if (rate < 75000000) + frqsel = PHYCTRL_FRQSEL_50M; + else if (rate < 125000000) + frqsel = PHYCTRL_FRQSEL_100M; + else if (rate < 175000000) + frqsel = PHYCTRL_FRQSEL_150M; + else + frqsel = PHYCTRL_FRQSEL_200M; + } else + frqsel = PHYCTRL_FRQSEL_200M; + + DELAY(3); + + /* Power up PHY */ + mask = PHYCTRL_PDB; + val = PHYCTRL_PDB; + SYSCON_WRITE_4(sc->syscon, GRF_EMMCPHY_CON6, (mask << 16) | val); + + /* Wait for calibration */ + DELAY(10); + val = SYSCON_READ_4(sc->syscon, GRF_EMMCPHY_STATUS); + if ((val & PHYCTRL_CALDONE) == 0) { + device_printf(dev, "PHY calibration did not complete\n"); + return (ENXIO); + } + + /* Set DLL frequency */ + mask = PHYCTRL_FRQSEL; + val = SHIFTIN(frqsel, PHYCTRL_FRQSEL); + SYSCON_WRITE_4(sc->syscon, GRF_EMMCPHY_CON0, (mask << 16) | val); + + /* Enable DLL */ + mask = PHYCTRL_ENDLL; + val = PHYCTRL_ENDLL; + SYSCON_WRITE_4(sc->syscon, GRF_EMMCPHY_CON6, (mask << 16) | val); + + if (rate != 0) { + /* + * Rockchip RK3399 TRM V1.3 Part2.pdf says in page 698: + * After the DLL control loop reaches steady state a DLL + * ready signal is generated by the DLL circuits + * 'phyctrl_dllrdy'. + * The time from 'phyctrl_endll' to DLL ready signal + * 'phyctrl_dllrdy' varies with the clock frequency. + * At 200MHz clock frequency the DLL ready delay is 2.56us, + * at 100MHz clock frequency the DLL ready delay is 5.112us and + * at 50 MHz clock frequency the DLL ready delay is 10.231us. + * We could use safe values for wait, 12us, 8us, 6us and 4us + * respectively. + * However due to some unknown reason it is not working and + * DLL seems to take extra long time to lock. + * So we will use more safe value 50ms here. + */ + + /* Wait for DLL ready */ + DELAY(50000); + val = SYSCON_READ_4(sc->syscon, GRF_EMMCPHY_STATUS); + if ((val & PHYCTRL_DLLRDY) == 0) { + device_printf(dev, "DLL loop failed to lock\n"); + return (ENXIO); + } + } + + return (0); +} + +static int +rk_emmcphy_probe(device_t dev) +{ + + if (!ofw_bus_status_okay(dev)) + return (ENXIO); + + if (ofw_bus_search_compatible(dev, compat_data)->ocd_data == 0) + return (ENXIO); + + device_set_desc(dev, "Rockchip RK3399 eMMC PHY"); + return (BUS_PROBE_DEFAULT); +} + +static int +rk_emmcphy_attach(device_t dev) +{ + struct phynode_init_def phy_init; + struct phynode *phynode; + struct rk_emmcphy_softc *sc; + phandle_t node; + phandle_t xnode; + pcell_t handle; + intptr_t phy; + + sc = device_get_softc(dev); + node = ofw_bus_get_node(dev); + + if (OF_getencprop(node, "clocks", (void *)&handle, + sizeof(handle)) <= 0) { + device_printf(dev, "cannot get clocks handle\n"); + return (ENXIO); + } + xnode = OF_node_from_xref(handle); + if (OF_hasprop(xnode, "arasan,soc-ctl-syscon") && + syscon_get_by_ofw_property(dev, xnode, + "arasan,soc-ctl-syscon", &sc->syscon) != 0) { + device_printf(dev, "cannot get grf driver handle\n"); + return (ENXIO); + } + + if (sc->syscon == NULL) { + device_printf(dev, "failed to get syscon\n"); + return (ENXIO); + } + + /* Create and register phy */ + bzero(&phy_init, sizeof(phy_init)); + phy_init.id = 0; + phy_init.ofw_node = ofw_bus_get_node(dev); + phynode = phynode_create(dev, &rk_emmcphy_phynode_class, &phy_init); + if (phynode == NULL) { + device_printf(dev, "failed to create eMMC PHY\n"); + return (ENXIO); + } + if (phynode_register(phynode) == NULL) { + device_printf(dev, "failed to register eMMC PHY\n"); + return (ENXIO); + } + if (bootverbose) { + phy = phynode_get_id(phynode); + device_printf(dev, "Attached phy id: %ld\n", phy); + } + return (0); +} + +static device_method_t rk_emmcphy_methods[] = { + /* Device interface */ + DEVMETHOD(device_probe, rk_emmcphy_probe), + DEVMETHOD(device_attach, rk_emmcphy_attach), + + DEVMETHOD_END +}; + +static driver_t rk_emmcphy_driver = { + "rk_emmcphy", + rk_emmcphy_methods, + sizeof(struct rk_emmcphy_softc) +}; + +static devclass_t rk_emmcphy_devclass; +EARLY_DRIVER_MODULE(rk_emmcphy, simplebus, rk_emmcphy_driver, + rk_emmcphy_devclass, 0, 0, BUS_PASS_SUPPORTDEV + BUS_PASS_ORDER_MIDDLE); +MODULE_VERSION(rk_emmcphy, 1); Modified: stable/12/sys/arm64/rockchip/rk_grf.c ============================================================================== --- stable/12/sys/arm64/rockchip/rk_grf.c Wed Mar 4 20:41:45 2020 (r358639) +++ stable/12/sys/arm64/rockchip/rk_grf.c Wed Mar 4 20:43:29 2020 (r358640) @@ -42,7 +42,7 @@ __FBSDID("$FreeBSD$"); #include #include -#include +#include #include "opt_soc.h" @@ -77,7 +77,7 @@ static device_method_t rk_grf_methods[] = { }; DEFINE_CLASS_1(rk_grf, rk_grf_driver, rk_grf_methods, - sizeof(struct syscon_generic_softc), syscon_generic_driver); + sizeof(struct simple_mfd_softc), simple_mfd_driver); static devclass_t rk_grf_devclass; EARLY_DRIVER_MODULE(rk_grf, simplebus, rk_grf_driver, rk_grf_devclass, Modified: stable/12/sys/arm64/rockchip/rk_i2c.c ============================================================================== --- stable/12/sys/arm64/rockchip/rk_i2c.c Wed Mar 4 20:41:45 2020 (r358639) +++ stable/12/sys/arm64/rockchip/rk_i2c.c Wed Mar 4 20:43:29 2020 (r358640) @@ -46,9 +46,7 @@ __FBSDID("$FreeBSD$"); #include "iicbus_if.h" -#include "opt_soc.h" - #define RK_I2C_CON 0x00 #define RK_I2C_CON_EN (1 << 0) #define RK_I2C_CON_MODE_SHIFT 1 @@ -61,6 +59,7 @@ __FBSDID("$FreeBSD$"); #define RK_I2C_CON_STOP (1 << 4) #define RK_I2C_CON_LASTACK (1 << 5) #define RK_I2C_CON_NAKSTOP (1 << 6) +#define RK_I2C_CON_CTRL_MASK 0xFF #define RK_I2C_CLKDIV 0x04 #define RK_I2C_CLKDIVL_MASK 0xFFFF @@ -91,8 +90,7 @@ __FBSDID("$FreeBSD$"); #define RK_I2C_IEN_STARTIEN (1 << 4) #define RK_I2C_IEN_STOPIEN (1 << 5) #define RK_I2C_IEN_NAKRCVIEN (1 << 6) -#define RK_I2C_IEN_ALL (RK_I2C_IEN_BTFIEN | \ - RK_I2C_IEN_BRFIEN | RK_I2C_IEN_MBTFIEN | RK_I2C_IEN_MBRFIEN | \ +#define RK_I2C_IEN_ALL (RK_I2C_IEN_MBTFIEN | RK_I2C_IEN_MBRFIEN | \ RK_I2C_IEN_STARTIEN | RK_I2C_IEN_STOPIEN | RK_I2C_IEN_NAKRCVIEN) #define RK_I2C_IPD 0x1C @@ -103,8 +101,7 @@ __FBSDID("$FreeBSD$"); #define RK_I2C_IPD_STARTIPD (1 << 4) #define RK_I2C_IPD_STOPIPD (1 << 5) #define RK_I2C_IPD_NAKRCVIPD (1 << 6) -#define RK_I2C_IPD_ALL (RK_I2C_IPD_BTFIPD | \ - RK_I2C_IPD_BRFIPD | RK_I2C_IPD_MBTFIPD | RK_I2C_IPD_MBRFIPD | \ +#define RK_I2C_IPD_ALL (RK_I2C_IPD_MBTFIPD | RK_I2C_IPD_MBRFIPD | \ RK_I2C_IPD_STARTIPD | RK_I2C_IPD_STOPIPD | RK_I2C_IPD_NAKRCVIPD) #define RK_I2C_FNCT 0x20 @@ -134,8 +131,10 @@ struct rk_i2c_softc { uint32_t ipd; struct iic_msg *msg; size_t cnt; - int transfer_done; - int nak_recv; + int msg_len; + bool transfer_done; + bool nak_recv; + bool tx_slave_addr; uint8_t mode; uint8_t state; @@ -143,12 +142,9 @@ struct rk_i2c_softc { }; static struct ofw_compat_data compat_data[] = { -#ifdef SOC_ROCKCHIP_RK3328 + {"rockchip,rk3288-i2c", 1}, {"rockchip,rk3328-i2c", 1}, -#endif -#ifdef SOC_ROCKCHIP_RK3399 {"rockchip,rk3399-i2c", 1}, -#endif {NULL, 0} }; @@ -169,7 +165,7 @@ static int rk_i2c_detach(device_t dev); #define RK_I2C_WRITE(sc, reg, val) bus_write_4((sc)->res[0], (reg), (val)) static uint32_t -rk_i2c_get_clkdiv(struct rk_i2c_softc *sc, uint64_t speed) +rk_i2c_get_clkdiv(struct rk_i2c_softc *sc, uint32_t speed) { uint64_t sclk_freq; uint32_t clkdiv; @@ -213,7 +209,7 @@ rk_i2c_reset(device_t dev, u_char speed, u_char addr, return (0); } -static void +static uint8_t rk_i2c_fill_tx(struct rk_i2c_softc *sc) { uint32_t buf32; @@ -221,7 +217,7 @@ rk_i2c_fill_tx(struct rk_i2c_softc *sc) int i, j, len; if (sc->msg == NULL || sc->msg->len == sc->cnt) - return; + return (0); len = sc->msg->len - sc->cnt; if (len > 8) @@ -234,22 +230,23 @@ rk_i2c_fill_tx(struct rk_i2c_softc *sc) break; /* Fill the addr if needed */ - if (sc->cnt == 0) { + if (sc->cnt == 0 && sc->tx_slave_addr) { buf = sc->msg->slave; + sc->tx_slave_addr = false; + } else { + buf = sc->msg->buf[sc->cnt]; + sc->cnt++; } - else - buf = sc->msg->buf[sc->cnt - 1]; - buf32 |= buf << (j * 8); - sc->cnt++; } - RK_I2C_WRITE(sc, RK_I2C_TXDATA_BASE + 4 * i, buf32); if (sc->cnt == sc->msg->len) break; } + + return (uint8_t)len; } static void @@ -274,29 +271,11 @@ rk_i2c_drain_rx(struct rk_i2c_softc *sc) buf32 = RK_I2C_READ(sc, RK_I2C_RXDATA_BASE + (i / 4) * 4); buf8 = (buf32 >> ((i % 4) * 8)) & 0xFF; - sc->msg->buf[sc->cnt++] = buf8; } } static void -rk_i2c_send_start(struct rk_i2c_softc *sc) -{ - uint32_t reg; - - RK_I2C_WRITE(sc, RK_I2C_IEN, RK_I2C_IEN_STARTIEN); - - sc->state = STATE_START; - - reg = RK_I2C_READ(sc, RK_I2C_CON); - reg |= RK_I2C_CON_START; - reg |= RK_I2C_CON_EN; - reg &= ~RK_I2C_CON_MODE_MASK; - reg |= sc->mode << RK_I2C_CON_MODE_SHIFT; - RK_I2C_WRITE(sc, RK_I2C_CON, reg); -} - -static void rk_i2c_send_stop(struct rk_i2c_softc *sc) { uint32_t reg; @@ -311,18 +290,29 @@ rk_i2c_send_stop(struct rk_i2c_softc *sc) } static void -rk_i2c_intr(void *arg) +rk_i2c_intr_locked(struct rk_i2c_softc *sc) { - struct rk_i2c_softc *sc; uint32_t reg; - sc = (struct rk_i2c_softc *)arg; + sc->ipd = RK_I2C_READ(sc, RK_I2C_IPD); - RK_I2C_LOCK(sc); + /* Something to handle? */ + if ((sc->ipd & RK_I2C_IPD_ALL) == 0) + return; - sc->ipd = RK_I2C_READ(sc, RK_I2C_IPD); RK_I2C_WRITE(sc, RK_I2C_IPD, sc->ipd); + sc->ipd &= RK_I2C_IPD_ALL; + if (sc->ipd & RK_I2C_IPD_NAKRCVIPD) { + /* NACK received */ + sc->ipd &= ~RK_I2C_IPD_NAKRCVIPD; + sc->nak_recv = 1; + /* XXXX last byte !!!, signal error !!! */ + sc->transfer_done = 1; + sc->state = STATE_IDLE; + goto err; + } + switch (sc->state) { case STATE_START: /* Disable start bit */ @@ -359,10 +349,12 @@ rk_i2c_intr(void *arg) break; case STATE_WRITE: - if (sc->cnt == sc->msg->len) + if (sc->cnt == sc->msg->len && + !(sc->msg->flags & IIC_M_NOSTOP)) { rk_i2c_send_stop(sc); - - break; + break; + } + /* passthru */ case STATE_STOP: /* Disable stop bit */ reg = RK_I2C_READ(sc, RK_I2C_CON); @@ -376,77 +368,177 @@ rk_i2c_intr(void *arg) break; } +err: wakeup(sc); +} + +static void +rk_i2c_intr(void *arg) +{ + struct rk_i2c_softc *sc; + + sc = (struct rk_i2c_softc *)arg; + + RK_I2C_LOCK(sc); + rk_i2c_intr_locked(sc); RK_I2C_UNLOCK(sc); } +static void +rk_i2c_start_xfer(struct rk_i2c_softc *sc, struct iic_msg *msg, boolean_t last) +{ + uint32_t reg; + uint8_t len; + + sc->transfer_done = false; + sc->nak_recv = false; + sc->tx_slave_addr = false; + sc->cnt = 0; + sc->state = STATE_IDLE; + sc->msg = msg; + sc->msg_len = sc->msg->len; + + reg = RK_I2C_READ(sc, RK_I2C_CON) & ~RK_I2C_CON_CTRL_MASK; + if (!(sc->msg->flags & IIC_M_NOSTART)) { + /* Stadard message */ + if (sc->mode == RK_I2C_CON_MODE_TX) { + sc->msg_len++; /* Take slave address in account. */ + sc->tx_slave_addr = true; + } + sc->state = STATE_START; + reg |= RK_I2C_CON_START; + + RK_I2C_WRITE(sc, RK_I2C_IEN, RK_I2C_IEN_STARTIEN); + } else { + /* Continuation message */ + if (sc->mode == RK_I2C_CON_MODE_RX) { + sc->state = STATE_READ; + if (last) + reg |= RK_I2C_CON_LASTACK; + + RK_I2C_WRITE(sc, RK_I2C_MRXCNT, sc->msg->len); + RK_I2C_WRITE(sc, RK_I2C_IEN, RK_I2C_IEN_MBRFIEN | + RK_I2C_IEN_NAKRCVIEN); + } else { + sc->state = STATE_WRITE; + len = rk_i2c_fill_tx(sc); + + RK_I2C_WRITE(sc, RK_I2C_MTXCNT, len); + + RK_I2C_WRITE(sc, RK_I2C_IEN, RK_I2C_IEN_MBTFIEN | + RK_I2C_IEN_NAKRCVIEN); + } + } + reg |= sc->mode << RK_I2C_CON_MODE_SHIFT; + reg |= RK_I2C_CON_EN; + RK_I2C_WRITE(sc, RK_I2C_CON, reg); +} + static int rk_i2c_transfer(device_t dev, struct iic_msg *msgs, uint32_t nmsgs) { struct rk_i2c_softc *sc; uint32_t reg; - int i, j, msgskip, err = 0; + bool last_msg; + int i, j, timeout, err; sc = device_get_softc(dev); + RK_I2C_LOCK(sc); + while (sc->busy) mtx_sleep(sc, &sc->mtx, 0, "i2cbuswait", 0); - sc->busy = 1; - err = clk_enable(sc->pclk); - if (err != 0) { - device_printf(dev, "cannot enable pclk clock\n"); - goto out; - } - err = clk_enable(sc->sclk); - if (err != 0) { - device_printf(dev, "cannot enable i2c clock\n"); - goto out; - } + /* Disable the module and interrupts */ + RK_I2C_WRITE(sc, RK_I2C_CON, 0); + RK_I2C_WRITE(sc, RK_I2C_IEN, 0); - RK_I2C_LOCK(sc); - /* Clean stale interrupts */ RK_I2C_WRITE(sc, RK_I2C_IPD, RK_I2C_IPD_ALL); - for (i = 0; i < nmsgs; i += msgskip) { - if (nmsgs - i >= 2 && !(msgs[i].flags & IIC_M_RD) && - msgs[i + 1].flags & IIC_M_RD && msgs[i].len <= 4) { + err = 0; + for (i = 0; i < nmsgs; i++) { + /* Validate parameters. */ + if (msgs == NULL || msgs[i].buf == NULL || + msgs[i].len == 0) { + err = EINVAL; + break; + } + /* + * If next message have NOSTART flag, then they both + * should be same type (read/write) and same address. + */ + if (i < nmsgs - 1) { + if ((msgs[i + 1].flags & IIC_M_NOSTART) && + ((msgs[i].flags & IIC_M_RD) != + (msgs[i + 1].flags & IIC_M_RD) || + (msgs[i].slave != msgs[i + 1].slave))) { + err = EINVAL; + break; + } + } + /* + * Detect simple register read case. + * The first message should be IIC_M_WR | IIC_M_NOSTOP, + * next pure IIC_M_RD (no other flags allowed). Both + * messages should have same slave address. + */ + + if (nmsgs - i >= 2 && msgs[i].len < 4 && + msgs[i].flags == (IIC_M_WR | IIC_M_NOSTOP) && + msgs[i + 1].flags == IIC_M_RD && + (msgs[i].slave & ~LSB) == (msgs[i + 1].slave & ~LSB)) { sc->mode = RK_I2C_CON_MODE_RRX; - msgskip = 2; - sc->msg = &msgs[i + 1]; /* Write slave address */ - reg = msgs[i].slave | RK_I2C_MRXADDR_VALID(0); + reg = msgs[i].slave & ~LSB; + reg |= RK_I2C_MRXADDR_VALID(0); RK_I2C_WRITE(sc, RK_I2C_MRXADDR, reg); + /* Write slave register address */ - for (j = 0, reg = 0; j < msgs[i].len; j++) { + reg = 0; + for (j = 0; j < msgs[i].len ; j++) { reg |= (msgs[i].buf[j] & 0xff) << (j * 8); reg |= RK_I2C_MRXADDR_VALID(j); } - RK_I2C_WRITE(sc, RK_I2C_MRXRADDR, reg); + + i++; } else { if (msgs[i].flags & IIC_M_RD) { - sc->mode = RK_I2C_CON_MODE_RX; - msgs[i].slave |= LSB; - } - else { + if (msgs[i].flags & IIC_M_NOSTART) { + sc->mode = RK_I2C_CON_MODE_RX; + } else { + sc->mode = RK_I2C_CON_MODE_RRX; + reg = msgs[i].slave & LSB; + reg |= RK_I2C_MRXADDR_VALID(0); + RK_I2C_WRITE(sc, RK_I2C_MRXADDR, reg); + RK_I2C_WRITE(sc, RK_I2C_MRXRADDR, 0); + } + } else { sc->mode = RK_I2C_CON_MODE_TX; - msgs[i].slave &= ~LSB; } - msgskip = 1; - sc->msg = &msgs[i]; } + /* last message ? */ + last_msg = (i > nmsgs - 1) || + !(msgs[i + 1].flags & IIC_M_NOSTART); + rk_i2c_start_xfer(sc, msgs + i, last_msg); - sc->transfer_done = 0; - sc->cnt = 0; - sc->state = STATE_IDLE; - rk_i2c_send_start(sc); - - while (err == 0 && sc->transfer_done != 1) { - err = msleep(sc, &sc->mtx, 0, "rk_i2c", 10 * hz); + if (cold) { + for(timeout = 10000; timeout > 0; timeout--) { + rk_i2c_intr_locked(sc); + if (sc->transfer_done != 0) + break; + DELAY(100); + } + if (timeout <= 0) + err = ETIMEDOUT; + } else { + while (err == 0 && sc->transfer_done != 1) { + err = msleep(sc, &sc->mtx, PZERO, "rk_i2c", + 10 * hz); + } } } @@ -457,19 +549,6 @@ rk_i2c_transfer(device_t dev, struct iic_msg *msgs, ui sc->busy = 0; RK_I2C_UNLOCK(sc); - - err = clk_disable(sc->pclk); - if (err != 0) { - device_printf(dev, "cannot enable pclk clock\n"); - goto out; - } - err = clk_disable(sc->sclk); - if (err != 0) { - device_printf(dev, "cannot enable i2c clock\n"); - goto out; - } - -out: return (err); } @@ -519,10 +598,23 @@ rk_i2c_attach(device_t dev) device_printf(dev, "cannot get i2c clock\n"); goto fail; } - error = clk_get_by_ofw_name(dev, 0, "pclk", &sc->pclk); + error = clk_enable(sc->sclk); if (error != 0) { + device_printf(dev, "cannot enable i2c clock\n"); + goto fail; + } + /* pclk clock is optional. */ + error = clk_get_by_ofw_name(dev, 0, "pclk", &sc->pclk); + if (error != 0 && error != ENOENT) { device_printf(dev, "cannot get pclk clock\n"); goto fail; + } + if (sc->sclk != NULL) { + error = clk_enable(sc->sclk); + if (error != 0) { + device_printf(dev, "cannot enable pclk clock\n"); + goto fail; + } } sc->iicbus = device_add_child(dev, "iicbus", -1); Modified: stable/12/sys/conf/files.arm64 ============================================================================== --- stable/12/sys/conf/files.arm64 Wed Mar 4 20:41:45 2020 (r358639) +++ stable/12/sys/conf/files.arm64 Wed Mar 4 20:43:29 2020 (r358640) @@ -278,6 +278,7 @@ cddl/dev/dtrace/aarch64/dtrace_subr.c optional dtrac cddl/dev/fbt/aarch64/fbt_isa.c optional dtrace_fbt | dtraceall compile-with "${FBT_C}" # RockChip Drivers +arm64/rockchip/rk3399_emmcphy.c optional fdt rk_emmcphy soc_rockchip_rk3399 arm64/rockchip/rk_i2c.c optional fdt rk_i2c soc_rockchip_rk3328 | fdt rk_i2c soc_rockchip_rk3399 arm64/rockchip/rk805.c optional fdt rk805 soc_rockchip_rk3328 | fdt rk805 soc_rockchip_rk3399 arm64/rockchip/rk_grf.c optional fdt soc_rockchip_rk3328 | fdt soc_rockchip_rk3399 From owner-svn-src-all@freebsd.org Wed Mar 4 20:48:32 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 77F85250BE7; Wed, 4 Mar 2020 20:48:32 +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 48XmDv6TD3z4S5R; Wed, 4 Mar 2020 20:48:31 +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 58BFC23E9C; Wed, 4 Mar 2020 20:48:31 +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 024KmVXs011993; Wed, 4 Mar 2020 20:48:31 GMT (envelope-from manu@FreeBSD.org) Received: (from manu@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 024KmUrT011985; Wed, 4 Mar 2020 20:48:30 GMT (envelope-from manu@FreeBSD.org) Message-Id: <202003042048.024KmUrT011985@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: manu set sender to manu@FreeBSD.org using -f From: Emmanuel Vadot Date: Wed, 4 Mar 2020 20:48:30 +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: r358641 - in stable/12/sys: arm64/conf arm64/rockchip arm64/rockchip/clk conf X-SVN-Group: stable-12 X-SVN-Commit-Author: manu X-SVN-Commit-Paths: in stable/12/sys: arm64/conf arm64/rockchip arm64/rockchip/clk conf X-SVN-Commit-Revision: 358641 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages 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, 04 Mar 2020 20:48:32 -0000 Author: manu Date: Wed Mar 4 20:48:29 2020 New Revision: 358641 URL: https://svnweb.freebsd.org/changeset/base/358641 Log: MFC r354087, r354089, r354094, r354100, r354103, r354152 r354087: arm64: rk3399: Add clock and gate for usb3 clocks r354089: arm64: rockchip: Add RK3399 TypeC phy driver This is a driver for the USB3 PHY present in the RK3399. While the phy support DP (Display Port) the driver doesn't has we have no driver to test this with for now. All the lane and pll configuration is just magic values from rockchip. While the manual have some info on those registers it's really hard to understand how to calculate those values (if there is a way). r354094 by peterj: Fix use of uninitialised variable. The RK805 regs array was being allocated before it's required size was known, causing the driver to use memory it didn't own. That memory was subsequently allocated and used elsewhere causing later fatal data aborts in rk805_map(). Whilst I'm here, add a sanity check to catch unsupported PMICs (this shouldn't ever get hit because the probe should have failed). Reviewed by: manu Sponsored by: Google r354100 by gonzo: arm64: rk3399: Add clock and gate for SPI clocks r354103 by gonzo: arm64: rk3399: add SPI driver and include it in GENERIC config SPI driver for Rockchip's RK3399 SoC. Implements PIO mode, CS selection, SPI mode and frequency configuration. Reviewed by: manu Differential Revision: https://reviews.freebsd.org/D22148 r354152: arm64: rockchip: typec_phy: Rename timeout to retry Declare retry in the function scope. Rename it to retry as there is a timeout function which was causing to code to compile. Reported by: jhibbits X-MFC-WITH: r354089 Added: stable/12/sys/arm64/rockchip/rk_spi.c - copied unchanged from r354103, head/sys/arm64/rockchip/rk_spi.c stable/12/sys/arm64/rockchip/rk_typec_phy.c - copied, changed from r354089, head/sys/arm64/rockchip/rk_typec_phy.c Modified: stable/12/sys/arm64/conf/GENERIC stable/12/sys/arm64/rockchip/clk/rk3399_cru.c stable/12/sys/arm64/rockchip/rk805.c stable/12/sys/conf/files.arm64 Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/arm64/conf/GENERIC ============================================================================== --- stable/12/sys/arm64/conf/GENERIC Wed Mar 4 20:43:29 2020 (r358640) +++ stable/12/sys/arm64/conf/GENERIC Wed Mar 4 20:48:29 2020 (r358641) @@ -180,6 +180,7 @@ device pl011 # USB support device aw_usbphy # Allwinner USB PHY device rk_usb2phy # Rockchip USB2PHY +device rk_typec_phy # Rockchip TypeC PHY device dwcotg # DWC OTG controller device ohci # OHCI USB interface device ehci # EHCI USB interface (USB 2.0) @@ -251,6 +252,7 @@ device mv_thermal # Marvell Thermal Sensor Controller # SPI device spibus device bcm2835_spi # Broadcom BCM283x SPI bus +device rk_spi # RockChip SPI controller # PWM device pwm Modified: stable/12/sys/arm64/rockchip/clk/rk3399_cru.c ============================================================================== --- stable/12/sys/arm64/rockchip/clk/rk3399_cru.c Wed Mar 4 20:43:29 2020 (r358640) +++ stable/12/sys/arm64/rockchip/clk/rk3399_cru.c Wed Mar 4 20:48:29 2020 (r358641) @@ -54,9 +54,18 @@ __FBSDID("$FreeBSD$"); #define SCLK_USB2PHY0_REF 123 #define SCLK_USB2PHY1_REF 124 +#define SCLK_USB3OTG0_REF 129 +#define SCLK_USB3OTG1_REF 130 +#define SCLK_USB3OTG0_SUSPEND 131 +#define SCLK_USB3OTG1_SUSPEND 132 #define ACLK_EMMC_CORE 241 #define ACLK_EMMC_NOC 242 #define ACLK_EMMC_GRF 243 +#define ACLK_USB3_NOC 245 +#define ACLK_USB3OTG0 246 +#define ACLK_USB3OTG1 247 +#define ACLK_USB3_RKSOC_AXI_PERF 248 +#define ACLK_USB3_GRF 249 #define PCLK_GPIO2 336 #define PCLK_GPIO3 337 #define PCLK_GPIO4 338 @@ -66,6 +75,11 @@ __FBSDID("$FreeBSD$"); #define PCLK_I2C5 344 #define PCLK_I2C6 345 #define PCLK_I2C7 346 +#define PCLK_SPI0 347 +#define PCLK_SPI1 348 +#define PCLK_SPI2 349 +#define PCLK_SPI4 350 +#define PCLK_SPI5 351 #define HCLK_HOST0 456 #define HCLK_HOST0_ARB 457 #define HCLK_HOST1 458 @@ -103,6 +117,12 @@ static struct rk_cru_gate rk3399_gates[] = { CRU_GATE(0, "hclk_perilp1_cpll_src", "cpll", 0x320, 1) CRU_GATE(0, "hclk_perilp1_gpll_src", "gpll", 0x320, 0) + /* CRU_CLKGATE_CON12 */ + CRU_GATE(SCLK_USB3OTG0_REF, "sclk_usb3otg0_ref", "xin24m", 0x330, 1) + CRU_GATE(SCLK_USB3OTG1_REF, "sclk_usb3otg1_ref", "xin24m", 0x330, 2) + CRU_GATE(SCLK_USB3OTG0_SUSPEND, "sclk_usb3otg0_suspend", "xin24m", 0x330, 3) + CRU_GATE(SCLK_USB3OTG1_SUSPEND, "sclk_usb3otg1_suspend", "xin24m", 0x330, 4) + /* CRU_CLKGATE_CON20 */ CRU_GATE(HCLK_HOST0, "hclk_host0", "hclk_perihp", 0x350, 5) CRU_GATE(HCLK_HOST0_ARB, "hclk_host0_arb", "hclk_perihp", 0x350, 6) @@ -117,6 +137,19 @@ static struct rk_cru_gate rk3399_gates[] = { CRU_GATE(PCLK_I2C2, "pclk_rki2c2", "pclk_perilp1", 0x358, 9) CRU_GATE(PCLK_I2C3, "pclk_rki2c3", "pclk_perilp1", 0x358, 10) + /* CRU_CLKGATE_CON23 */ + CRU_GATE(PCLK_SPI0, "pclk_spi0", "pclk_perilp1", 0x35C, 10) + CRU_GATE(PCLK_SPI1, "pclk_spi1", "pclk_perilp1", 0x35C, 11) + CRU_GATE(PCLK_SPI2, "pclk_spi2", "pclk_perilp1", 0x35C, 12) + CRU_GATE(PCLK_SPI4, "pclk_spi4", "pclk_perilp1", 0x35C, 13) + + /* CRU_CLKGATE_CON30 */ + CRU_GATE(ACLK_USB3_NOC, "aclk_usb3_noc", "aclk_usb3", 0x378, 0) + CRU_GATE(ACLK_USB3OTG0, "aclk_usb3otg0", "aclk_usb3", 0x378, 1) + CRU_GATE(ACLK_USB3OTG1, "aclk_usb3otg1", "aclk_usb3", 0x378, 2) + CRU_GATE(ACLK_USB3_RKSOC_AXI_PERF, "aclk_usb3_rksoc_axi_perf", "aclk_usb3", 0x378, 3) + CRU_GATE(ACLK_USB3_GRF, "aclk_usb3_grf", "aclk_usb3", 0x378, 4) + /* CRU_CLKGATE_CON31 */ CRU_GATE(PCLK_GPIO2, "pclk_gpio2", "pclk_alive", 0x37c, 3) CRU_GATE(PCLK_GPIO3, "pclk_gpio3", "pclk_alive", 0x37c, 4) @@ -129,6 +162,9 @@ static struct rk_cru_gate rk3399_gates[] = { /* CRU_CLKGATE_CON33 */ CRU_GATE(HCLK_SDMMC, "hclk_sdmmc", "hclk_sd", 0x384, 8) + + /* CRU_CLKGATE_CON34 */ + CRU_GATE(PCLK_SPI4, "pclk_spi5", "pclk_perilp1", 0x388, 5) }; @@ -1066,6 +1102,32 @@ static struct rk_clk_composite_def pclk_perilp1 = { .flags = RK_CLK_COMPOSITE_HAVE_GATE, }; +/* USB3 clock */ + +#define ACLK_USB3 244 +static const char *aclk_usb3_parents[] = {"cpll", "gpll", "npll", "npll"}; +static struct rk_clk_composite_def aclk_usb3 = { + .clkdef = { + .id = ACLK_USB3, + .name = "aclk_usb3", + .parent_names = aclk_usb3_parents, + .parent_cnt = nitems(aclk_usb3_parents), + }, + /* CRU_CLKSET_CON39 */ + .muxdiv_offset = 0x19C, + .mux_shift = 6, + .mux_width = 2, + + .div_shift = 0, + .div_width = 5, + + /* CRU_CLKGATE_CON12 */ + .gate_offset = 0x330, + .gate_shift = 0, + + .flags = RK_CLK_COMPOSITE_HAVE_GATE, +}; + /* * i2c */ @@ -1210,7 +1272,236 @@ static struct rk_clk_composite_def i2c7 = { .flags = RK_CLK_COMPOSITE_HAVE_MUX | RK_CLK_COMPOSITE_HAVE_GATE, }; +/* USB3 */ + +#define SCLK_UPHY0_TCPDPHY_REF 125 +#define SCLK_UPHY0_TCPDCORE 126 + +/* Missing xin32k exported by rk808 */ +static const char *uphy0_tcpdphy_ref_parents[] = {"xin24m"}; + +static struct rk_clk_composite_def uphy0_tcpdphy_ref = { + .clkdef = { + .id = SCLK_UPHY0_TCPDPHY_REF, + .name = "uphy0_tcpdphy_ref", + .parent_names = uphy0_tcpdphy_ref_parents, + .parent_cnt = nitems(uphy0_tcpdphy_ref_parents), + }, + /* CRU_CLKSET_CON64 */ + .muxdiv_offset = 0x0200, + .mux_shift = 15, + .mux_width = 1, + + .div_shift = 8, + .div_width = 5, + + /* CRU_CLKGATE_CON13 */ + .gate_offset = 0x0334, + .gate_shift = 4, + + .flags = RK_CLK_COMPOSITE_HAVE_MUX | RK_CLK_COMPOSITE_HAVE_GATE, +}; + +/* Missing xin32k exported by rk808 */ +static const char *uphy0_tcpdcore_parents[] = {"xin24m", "xin24m", "cpll", "gpll"}; + +static struct rk_clk_composite_def uphy0_tcpdcore = { + .clkdef = { + .id = SCLK_UPHY0_TCPDCORE, + .name = "uphy0_tcpdcore", + .parent_names = uphy0_tcpdcore_parents, + .parent_cnt = nitems(uphy0_tcpdcore_parents), + }, + /* CRU_CLKSET_CON64 */ + .muxdiv_offset = 0x0200, + .mux_shift = 6, + .mux_width = 2, + + .div_shift = 0, + .div_width = 5, + + /* CRU_CLKGATE_CON13 */ + .gate_offset = 0x0334, + .gate_shift = 5, + + .flags = RK_CLK_COMPOSITE_HAVE_MUX | RK_CLK_COMPOSITE_HAVE_GATE, +}; + +#define SCLK_UPHY1_TCPDPHY_REF 127 +#define SCLK_UPHY1_TCPDCORE 128 + +/* Missing xin32k exported by rk808 */ +static const char *uphy1_tcpdphy_ref_parents[] = {"xin24m"}; + +static struct rk_clk_composite_def uphy1_tcpdphy_ref = { + .clkdef = { + .id = SCLK_UPHY1_TCPDPHY_REF, + .name = "uphy1_tcpdphy_ref", + .parent_names = uphy1_tcpdphy_ref_parents, + .parent_cnt = nitems(uphy1_tcpdphy_ref_parents), + }, + /* CRU_CLKSET_CON65 */ + .muxdiv_offset = 0x0204, + .mux_shift = 15, + .mux_width = 1, + + .div_shift = 8, + .div_width = 5, + + /* CRU_CLKGATE_CON13 */ + .gate_offset = 0x0334, + .gate_shift = 6, + + .flags = RK_CLK_COMPOSITE_HAVE_MUX | RK_CLK_COMPOSITE_HAVE_GATE, +}; + +/* Missing xin32k exported by rk808 */ +static const char *uphy1_tcpdcore_parents[] = {"xin24m", "xin24m", "cpll", "gpll"}; + +static struct rk_clk_composite_def uphy1_tcpdcore = { + .clkdef = { + .id = SCLK_UPHY1_TCPDCORE, + .name = "uphy1_tcpdcore", + .parent_names = uphy1_tcpdcore_parents, + .parent_cnt = nitems(uphy1_tcpdcore_parents), + }, + /* CRU_CLKSET_CON65 */ + .muxdiv_offset = 0x0204, + .mux_shift = 6, + .mux_width = 2, + + .div_shift = 0, + .div_width = 5, + + /* CRU_CLKGATE_CON13 */ + .gate_offset = 0x0334, + .gate_shift = 7, + + .flags = RK_CLK_COMPOSITE_HAVE_MUX | RK_CLK_COMPOSITE_HAVE_GATE, +}; + /* + * spi + */ +static const char *spi_parents[] = {"cpll", "gpll"}; + +#define SCLK_SPI0 71 +#define SCLK_SPI1 72 +#define SCLK_SPI2 73 +#define SCLK_SPI4 74 +#define SCLK_SPI5 75 + +static struct rk_clk_composite_def spi0 = { + .clkdef = { + .id = SCLK_SPI0, + .name = "clk_spi0", + .parent_names = spi_parents, + .parent_cnt = nitems(spi_parents), + }, + /* CRU_CLKSEL_CON59 */ + .muxdiv_offset = 0x01ec, + .mux_shift = 7, + .mux_width = 1, + + .div_shift = 0, + .div_width = 7, + + /* CRU_CLKGATE_CON9 */ + .gate_offset = 0x0324, + .gate_shift = 12, + + .flags = RK_CLK_COMPOSITE_HAVE_MUX | RK_CLK_COMPOSITE_HAVE_GATE, +}; + +static struct rk_clk_composite_def spi1 = { + .clkdef = { + .id = SCLK_SPI1, + .name = "clk_spi1", + .parent_names = spi_parents, + .parent_cnt = nitems(spi_parents), + }, + /* CRU_CLKSEL_CON59 */ + .muxdiv_offset = 0x01ec, + .mux_shift = 15, + .mux_width = 1, + + .div_shift = 8, + .div_width = 7, + + /* CRU_CLKGATE_CON9 */ + .gate_offset = 0x0324, + .gate_shift = 13, + + .flags = RK_CLK_COMPOSITE_HAVE_MUX | RK_CLK_COMPOSITE_HAVE_GATE, +}; + +static struct rk_clk_composite_def spi2 = { + .clkdef = { + .id = SCLK_SPI2, + .name = "clk_spi2", + .parent_names = spi_parents, + .parent_cnt = nitems(spi_parents), + }, + /* CRU_CLKSEL_CON60 */ + .muxdiv_offset = 0x01f0, + .mux_shift = 7, + .mux_width = 1, + + .div_shift = 0, + .div_width = 7, + + /* CRU_CLKGATE_CON9 */ + .gate_offset = 0x0324, + .gate_shift = 14, + + .flags = RK_CLK_COMPOSITE_HAVE_MUX | RK_CLK_COMPOSITE_HAVE_GATE, +}; + +static struct rk_clk_composite_def spi4 = { + .clkdef = { + .id = SCLK_SPI4, + .name = "clk_spi4", + .parent_names = spi_parents, + .parent_cnt = nitems(spi_parents), + }, + /* CRU_CLKSEL_CON60 */ + .muxdiv_offset = 0x01f0, + .mux_shift = 15, + .mux_width = 1, + + .div_shift = 8, + .div_width = 7, + + /* CRU_CLKGATE_CON9 */ + .gate_offset = 0x0324, + .gate_shift = 15, + + .flags = RK_CLK_COMPOSITE_HAVE_MUX | RK_CLK_COMPOSITE_HAVE_GATE, +}; + +static struct rk_clk_composite_def spi5 = { + .clkdef = { + .id = SCLK_SPI5, + .name = "clk_spi5", + .parent_names = spi_parents, + .parent_cnt = nitems(spi_parents), + }, + /* CRU_CLKSEL_CON58 */ + .muxdiv_offset = 0x01e8, + .mux_shift = 15, + .mux_width = 1, + + .div_shift = 8, + .div_width = 7, + + /* CRU_CLKGATE_CON13 */ + .gate_offset = 0x0334, + .gate_shift = 13, + + .flags = RK_CLK_COMPOSITE_HAVE_MUX | RK_CLK_COMPOSITE_HAVE_GATE, +}; + +/* * ARM CPU clocks (LITTLE and big) */ #define ARMCLKL 8 @@ -1593,6 +1884,10 @@ static struct rk_clk rk3399_clks[] = { }, { .type = RK_CLK_COMPOSITE, + .clk.composite = &aclk_usb3, + }, + { + .type = RK_CLK_COMPOSITE, .clk.composite = &i2c1, }, { @@ -1614,6 +1909,43 @@ static struct rk_clk rk3399_clks[] = { { .type = RK_CLK_COMPOSITE, .clk.composite = &i2c7, + }, + { + .type = RK_CLK_COMPOSITE, + .clk.composite = &uphy0_tcpdphy_ref, + }, + { + .type = RK_CLK_COMPOSITE, + .clk.composite = &uphy0_tcpdcore, + }, + { + .type = RK_CLK_COMPOSITE, + .clk.composite = &uphy1_tcpdphy_ref, + }, + { + .type = RK_CLK_COMPOSITE, + .clk.composite = &uphy1_tcpdcore, + }, + + { + .type = RK_CLK_COMPOSITE, + .clk.composite = &spi0, + }, + { + .type = RK_CLK_COMPOSITE, + .clk.composite = &spi1, + }, + { + .type = RK_CLK_COMPOSITE, + .clk.composite = &spi2, + }, + { + .type = RK_CLK_COMPOSITE, + .clk.composite = &spi4, + }, + { + .type = RK_CLK_COMPOSITE, + .clk.composite = &spi5, }, { Modified: stable/12/sys/arm64/rockchip/rk805.c ============================================================================== --- stable/12/sys/arm64/rockchip/rk805.c Wed Mar 4 20:43:29 2020 (r358640) +++ stable/12/sys/arm64/rockchip/rk805.c Wed Mar 4 20:48:29 2020 (r358641) @@ -468,9 +468,6 @@ rk805_attach(device_t dev) if (config_intrhook_establish(&sc->intr_hook) != 0) return (ENOMEM); - sc->regs = malloc(sizeof(struct rk805_reg_sc *) * sc->nregs, - M_RK805_REG, M_WAITOK | M_ZERO); - sc->type = ofw_bus_search_compatible(dev, compat_data)->ocd_data; switch (sc->type) { case RK805: @@ -481,7 +478,13 @@ rk805_attach(device_t dev) regdefs = rk808_regdefs; sc->nregs = nitems(rk808_regdefs); break; + default: + device_printf(dev, "Unknown type %d\n", sc->type); + return (ENXIO); } + + sc->regs = malloc(sizeof(struct rk805_reg_sc *) * sc->nregs, + M_RK805_REG, M_WAITOK | M_ZERO); rnode = ofw_bus_find_child(ofw_bus_get_node(dev), "regulators"); if (rnode > 0) { Copied: stable/12/sys/arm64/rockchip/rk_spi.c (from r354103, head/sys/arm64/rockchip/rk_spi.c) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/12/sys/arm64/rockchip/rk_spi.c Wed Mar 4 20:48:29 2020 (r358641, copy of r354103, head/sys/arm64/rockchip/rk_spi.c) @@ -0,0 +1,483 @@ +/*- + * SPDX-License-Identifier: BSD-2-Clause-FreeBSD + * + * Copyright (c) 2019 Oleksandr Tymoshenko + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, + * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED + * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, + * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + * + * $FreeBSD$ + */ + +#include +__FBSDID("$FreeBSD$"); + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include +#include + +#include +#include + +#include +#include + +#include "spibus_if.h" + +#define RK_SPI_CTRLR0 0x0000 +#define CTRLR0_OPM_MASTER (0 << 20) +#define CTRLR0_XFM_TR (0 << 18) +#define CTRLR0_FRF_MOTO (0 << 16) +#define CTRLR0_BHT_8BIT (1 << 13) +#define CTRLR0_EM_BIG (1 << 11) +#define CTRLR0_SSD_ONE (1 << 10) +#define CTRLR0_SCPOL (1 << 7) +#define CTRLR0_SCPH (1 << 6) +#define CTRLR0_DFS_8BIT (1 << 0) +#define RK_SPI_CTRLR1 0x0004 +#define RK_SPI_ENR 0x0008 +#define RK_SPI_SER 0x000c +#define RK_SPI_BAUDR 0x0010 +#define RK_SPI_TXFTLR 0x0014 +#define RK_SPI_RXFTLR 0x0018 +#define RK_SPI_TXFLR 0x001c +#define RK_SPI_RXFLR 0x0020 +#define RK_SPI_SR 0x0024 +#define SR_BUSY (1 << 0) +#define RK_SPI_IPR 0x0028 +#define RK_SPI_IMR 0x002c +#define IMR_RFFIM (1 << 4) +#define IMR_TFEIM (1 << 0) +#define RK_SPI_ISR 0x0030 +#define ISR_RFFIS (1 << 4) +#define ISR_TFEIS (1 << 0) +#define RK_SPI_RISR 0x0034 +#define RK_SPI_ICR 0x0038 +#define RK_SPI_DMACR 0x003c +#define RK_SPI_DMATDLR 0x0040 +#define RK_SPI_DMARDLR 0x0044 +#define RK_SPI_TXDR 0x0400 +#define RK_SPI_RXDR 0x0800 + +#define CS_MAX 1 + +static struct ofw_compat_data compat_data[] = { + { "rockchip,rk3399-spi", 1 }, + { NULL, 0 } +}; + +static struct resource_spec rk_spi_spec[] = { + { SYS_RES_MEMORY, 0, RF_ACTIVE }, + { SYS_RES_IRQ, 0, RF_ACTIVE | RF_SHAREABLE }, + { -1, 0 } +}; + +struct rk_spi_softc { + device_t dev; + device_t spibus; + struct resource *res[2]; + struct mtx mtx; + clk_t clk_apb; + clk_t clk_spi; + void * intrhand; + int transfer; + uint32_t fifo_size; + uint64_t max_freq; + + uint32_t intreg; + uint8_t *rxbuf; + uint32_t rxidx; + uint8_t *txbuf; + uint32_t txidx; + uint32_t txlen; + uint32_t rxlen; +}; + +#define RK_SPI_LOCK(sc) mtx_lock(&(sc)->mtx) +#define RK_SPI_UNLOCK(sc) mtx_unlock(&(sc)->mtx) +#define RK_SPI_READ_4(sc, reg) bus_read_4((sc)->res[0], (reg)) +#define RK_SPI_WRITE_4(sc, reg, val) bus_write_4((sc)->res[0], (reg), (val)) + +static int rk_spi_probe(device_t dev); +static int rk_spi_attach(device_t dev); +static int rk_spi_detach(device_t dev); +static void rk_spi_intr(void *arg); + +static void +rk_spi_enable_chip(struct rk_spi_softc *sc, int enable) +{ + + RK_SPI_WRITE_4(sc, RK_SPI_ENR, enable ? 1 : 0); +} + +static int +rk_spi_set_cs(struct rk_spi_softc *sc, uint32_t cs, bool active) +{ + uint32_t reg; + + if (cs & SPIBUS_CS_HIGH) { + device_printf(sc->dev, "SPIBUS_CS_HIGH is not supported\n"); + return (EINVAL); + } + + if (cs > CS_MAX) + return (EINVAL); + + reg = RK_SPI_READ_4(sc, RK_SPI_SER); + if (active) + reg |= (1 << cs); + else + reg &= ~(1 << cs); + RK_SPI_WRITE_4(sc, RK_SPI_SER, reg); + + return (0); +} + +static void +rk_spi_hw_setup(struct rk_spi_softc *sc, uint32_t mode, uint32_t freq) +{ + uint32_t cr0; + uint32_t div; + + cr0 = CTRLR0_OPM_MASTER | CTRLR0_XFM_TR | CTRLR0_FRF_MOTO | + CTRLR0_BHT_8BIT | CTRLR0_EM_BIG | CTRLR0_SSD_ONE | + CTRLR0_DFS_8BIT; + + if (mode & SPIBUS_MODE_CPHA) + cr0 |= CTRLR0_SCPH; + if (mode & SPIBUS_MODE_CPOL) + cr0 |= CTRLR0_SCPOL; + + /* minimum divider is 2 */ + if (sc->max_freq < freq*2) { + clk_set_freq(sc->clk_spi, 2 * freq, CLK_SET_ROUND_DOWN); + clk_get_freq(sc->clk_spi, &sc->max_freq); + } + + div = ((sc->max_freq + freq - 1) / freq); + div = (div + 1) & 0xfffe; + RK_SPI_WRITE_4(sc, RK_SPI_BAUDR, div); + + RK_SPI_WRITE_4(sc, RK_SPI_CTRLR0, cr0); +} + +static uint32_t +rk_spi_fifo_size(struct rk_spi_softc *sc) +{ + uint32_t txftlr, reg; + + for (txftlr = 2; txftlr < 32; txftlr++) { + RK_SPI_WRITE_4(sc, RK_SPI_TXFTLR, txftlr); + reg = RK_SPI_READ_4(sc, RK_SPI_TXFTLR); + if (reg != txftlr) + break; + } + RK_SPI_WRITE_4(sc, RK_SPI_TXFTLR, 0); + + if (txftlr == 31) + return 0; + + return txftlr; +} + +static void +rk_spi_empty_rxfifo(struct rk_spi_softc *sc) +{ + uint32_t rxlevel; + rxlevel = RK_SPI_READ_4(sc, RK_SPI_RXFLR); + while (sc->rxidx < sc->rxlen && + (rxlevel-- > 0)) { + sc->rxbuf[sc->rxidx++] = (uint8_t)RK_SPI_READ_4(sc, RK_SPI_RXDR); + } +} + +static void +rk_spi_fill_txfifo(struct rk_spi_softc *sc) +{ + uint32_t txlevel; + txlevel = RK_SPI_READ_4(sc, RK_SPI_TXFLR); + int cnt = 0; + + while (sc->txidx < sc->txlen && txlevel < sc->fifo_size) { + RK_SPI_WRITE_4(sc, RK_SPI_TXDR, sc->txbuf[sc->txidx++]); + txlevel++; + cnt++; + } + + if (sc->txidx != sc->txlen) + sc->intreg |= (IMR_TFEIM | IMR_RFFIM); +} + +static int +rk_spi_xfer_buf(struct rk_spi_softc *sc, void *rxbuf, void *txbuf, uint32_t len) +{ + int err; + + if (len == 0) + return (0); + + sc->rxbuf = rxbuf; + sc->rxlen = len; + sc->rxidx = 0; + sc->txbuf = txbuf; + sc->txlen = len; + sc->txidx = 0; + sc->intreg = 0; + rk_spi_fill_txfifo(sc); + + RK_SPI_WRITE_4(sc, RK_SPI_IMR, sc->intreg); + + err = 0; + while (err == 0 && sc->intreg != 0) + err = msleep(sc, &sc->mtx, 0, "rk_spi", 10 * hz); + + while (err == 0 && sc->rxidx != sc->txidx) { + /* read residual data from RX fifo */ + rk_spi_empty_rxfifo(sc); + } + + if (sc->rxidx != sc->rxlen || sc->txidx != sc->txlen) + err = EIO; + + return (err); +} + +static int +rk_spi_probe(device_t dev) +{ + if (!ofw_bus_status_okay(dev)) + return (ENXIO); + + if (!ofw_bus_search_compatible(dev, compat_data)->ocd_data) + return (ENXIO); + + device_set_desc(dev, "Rockchip SPI"); + return (BUS_PROBE_DEFAULT); +} + +static int +rk_spi_attach(device_t dev) +{ + struct rk_spi_softc *sc; + int error; + + sc = device_get_softc(dev); + sc->dev = dev; + + mtx_init(&sc->mtx, device_get_nameunit(dev), NULL, MTX_DEF); + + if (bus_alloc_resources(dev, rk_spi_spec, sc->res) != 0) { + device_printf(dev, "cannot allocate resources for device\n"); + error = ENXIO; + goto fail; + } + + if (bus_setup_intr(dev, sc->res[1], + INTR_TYPE_MISC | INTR_MPSAFE, NULL, rk_spi_intr, sc, + &sc->intrhand)) { + bus_release_resources(dev, rk_spi_spec, sc->res); + device_printf(dev, "cannot setup interrupt handler\n"); + return (ENXIO); + } + + /* Activate the module clock. */ + error = clk_get_by_ofw_name(dev, 0, "apb_pclk", &sc->clk_apb); + if (error != 0) { + device_printf(dev, "cannot get apb_pclk clock\n"); + goto fail; + } + error = clk_get_by_ofw_name(dev, 0, "spiclk", &sc->clk_spi); + if (error != 0) { + device_printf(dev, "cannot get spiclk clock\n"); + goto fail; + } + error = clk_enable(sc->clk_apb); + if (error != 0) { + device_printf(dev, "cannot enable ahb clock\n"); + goto fail; + } + error = clk_enable(sc->clk_spi); + if (error != 0) { + device_printf(dev, "cannot enable spiclk clock\n"); + goto fail; + } + clk_get_freq(sc->clk_spi, &sc->max_freq); + + sc->fifo_size = rk_spi_fifo_size(sc); + if (sc->fifo_size == 0) { + device_printf(dev, "failed to get fifo size\n"); + goto fail; + } + + sc->spibus = device_add_child(dev, "spibus", -1); + + RK_SPI_WRITE_4(sc, RK_SPI_IMR, 0); + RK_SPI_WRITE_4(sc, RK_SPI_TXFTLR, sc->fifo_size/2 - 1); + RK_SPI_WRITE_4(sc, RK_SPI_RXFTLR, sc->fifo_size/2 - 1); + + return (bus_generic_attach(dev)); + +fail: + rk_spi_detach(dev); + return (error); +} + +static int +rk_spi_detach(device_t dev) +{ + struct rk_spi_softc *sc; + + sc = device_get_softc(dev); + + bus_generic_detach(sc->dev); + if (sc->spibus != NULL) + device_delete_child(dev, sc->spibus); + + if (sc->clk_spi != NULL) + clk_release(sc->clk_spi); + if (sc->clk_apb) + clk_release(sc->clk_apb); + + if (sc->intrhand != NULL) + bus_teardown_intr(sc->dev, sc->res[1], sc->intrhand); + + bus_release_resources(dev, rk_spi_spec, sc->res); + mtx_destroy(&sc->mtx); + + return (0); +} + +static void +rk_spi_intr(void *arg) +{ + struct rk_spi_softc *sc; + uint32_t intreg, isr; + + sc = arg; + + RK_SPI_LOCK(sc); + intreg = RK_SPI_READ_4(sc, RK_SPI_IMR); + isr = RK_SPI_READ_4(sc, RK_SPI_ISR); + RK_SPI_WRITE_4(sc, RK_SPI_ICR, isr); + + if (isr & ISR_RFFIS) + rk_spi_empty_rxfifo(sc); + + if (isr & ISR_TFEIS) + rk_spi_fill_txfifo(sc); + + /* no bytes left, disable interrupt */ + if (sc->txidx == sc->txlen) { + sc->intreg = 0; + wakeup(sc); + } + + if (sc->intreg != intreg) { + (void)RK_SPI_WRITE_4(sc, RK_SPI_IMR, sc->intreg); + (void)RK_SPI_READ_4(sc, RK_SPI_IMR); + } + + RK_SPI_UNLOCK(sc); +} + +static phandle_t +rk_spi_get_node(device_t bus, device_t dev) +{ + + return ofw_bus_get_node(bus); +} + +static int +rk_spi_transfer(device_t dev, device_t child, struct spi_command *cmd) +{ + struct rk_spi_softc *sc; + uint32_t cs, mode, clock; + int err = 0; + + sc = device_get_softc(dev); + + spibus_get_cs(child, &cs); + spibus_get_clock(child, &clock); + spibus_get_mode(child, &mode); + + RK_SPI_LOCK(sc); + rk_spi_hw_setup(sc, mode, clock); + rk_spi_enable_chip(sc, 1); + err = rk_spi_set_cs(sc, cs, true); + if (err != 0) { + rk_spi_enable_chip(sc, 0); + RK_SPI_UNLOCK(sc); + return (err); + } + + /* Transfer command then data bytes. */ + err = 0; + if (cmd->tx_cmd_sz > 0) + err = rk_spi_xfer_buf(sc, cmd->rx_cmd, cmd->tx_cmd, + cmd->tx_cmd_sz); + if (cmd->tx_data_sz > 0 && err == 0) + err = rk_spi_xfer_buf(sc, cmd->rx_data, cmd->tx_data, + cmd->tx_data_sz); + + rk_spi_set_cs(sc, cs, false); + rk_spi_enable_chip(sc, 0); + RK_SPI_UNLOCK(sc); + + return (err); +} + +static device_method_t rk_spi_methods[] = { + /* Device interface */ + DEVMETHOD(device_probe, rk_spi_probe), + DEVMETHOD(device_attach, rk_spi_attach), + DEVMETHOD(device_detach, rk_spi_detach), + + /* spibus_if */ + DEVMETHOD(spibus_transfer, rk_spi_transfer), + + /* ofw_bus_if */ + DEVMETHOD(ofw_bus_get_node, rk_spi_get_node), + + DEVMETHOD_END +}; + +static driver_t rk_spi_driver = { + "spi", + rk_spi_methods, + sizeof(struct rk_spi_softc), +}; + +static devclass_t rk_spi_devclass; + +DRIVER_MODULE(rk_spi, simplebus, rk_spi_driver, rk_spi_devclass, 0, 0); +DRIVER_MODULE(ofw_spibus, rk_spi, ofw_spibus_driver, ofw_spibus_devclass, 0, 0); +MODULE_DEPEND(rk_spi, ofw_spibus, 1, 1, 1); +SIMPLEBUS_PNP_INFO(compat_data); Copied and modified: stable/12/sys/arm64/rockchip/rk_typec_phy.c (from r354089, head/sys/arm64/rockchip/rk_typec_phy.c) ============================================================================== --- head/sys/arm64/rockchip/rk_typec_phy.c Fri Oct 25 18:10:02 2019 (r354089, copy source) +++ stable/12/sys/arm64/rockchip/rk_typec_phy.c Wed Mar 4 20:48:29 2020 (r358641) @@ -191,7 +191,7 @@ rk_typec_phy_enable(struct phynode *phynode, bool enab device_t dev; intptr_t phy; uint32_t reg; - int err; + int err, retry; dev = phynode_get_device(phynode); phy = phynode_get_id(phynode); @@ -271,13 +271,13 @@ rk_typec_phy_enable(struct phynode *phynode, bool enab hwreset_deassert(sc->rst_uphy); - for (int timeout = 10000; timeout > 0; timeout--) { + for (retry = 10000; retry > 0; retry--) { reg = RK_TYPEC_PHY_READ(sc, PMA_CMN_CTRL1); if (reg & PMA_CMN_CTRL1_READY) break; DELAY(10); } - if (timeout == 0) { + if (retry == 0) { device_printf(sc->dev, "Timeout waiting for PMA\n"); return (ENXIO); } Modified: stable/12/sys/conf/files.arm64 ============================================================================== --- stable/12/sys/conf/files.arm64 Wed Mar 4 20:43:29 2020 (r358640) +++ stable/12/sys/conf/files.arm64 Wed Mar 4 20:48:29 2020 (r358641) @@ -284,7 +284,9 @@ arm64/rockchip/rk805.c optional fdt rk805 soc_rockch arm64/rockchip/rk_grf.c optional fdt soc_rockchip_rk3328 | fdt soc_rockchip_rk3399 arm64/rockchip/rk_pinctrl.c optional fdt rk_pinctrl soc_rockchip_rk3328 | fdt rk_pinctrl soc_rockchip_rk3399 arm64/rockchip/rk_gpio.c optional fdt rk_gpio soc_rockchip_rk3328 | fdt rk_gpio soc_rockchip_rk3399 +arm64/rockchip/rk_spi.c optional fdt rk_spi arm64/rockchip/rk_usb2phy.c optional fdt rk_usb2phy soc_rockchip_rk3328 | soc_rockchip_rk3399 +arm64/rockchip/rk_typec_phy.c optional fdt rk_typec_phy soc_rockchip_rk3399 arm64/rockchip/if_dwc_rk.c optional fdt dwc_rk soc_rockchip_rk3328 | fdt dwc_rk soc_rockchip_rk3399 dev/dwc/if_dwc.c optional fdt dwc_rk soc_rockchip_rk3328 | fdt dwc_rk soc_rockchip_rk3399 dev/dwc/if_dwc_if.m optional fdt dwc_rk soc_rockchip_rk3328 | fdt dwc_rk soc_rockchip_rk3399 From owner-svn-src-all@freebsd.org Wed Mar 4 20:53:01 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 3D67E250EAB; Wed, 4 Mar 2020 20:53:01 +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 48XmL40CtYz4YgW; Wed, 4 Mar 2020 20:52:59 +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 D9A432406A; Wed, 4 Mar 2020 20:52:59 +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 024Kqx93017786; Wed, 4 Mar 2020 20:52:59 GMT (envelope-from manu@FreeBSD.org) Received: (from manu@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 024KqxAd017783; Wed, 4 Mar 2020 20:52:59 GMT (envelope-from manu@FreeBSD.org) Message-Id: <202003042052.024KqxAd017783@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: manu set sender to manu@FreeBSD.org using -f From: Emmanuel Vadot Date: Wed, 4 Mar 2020 20:52:59 +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: r358642 - in stable/12/sys: arm64/conf arm64/rockchip conf X-SVN-Group: stable-12 X-SVN-Commit-Author: manu X-SVN-Commit-Paths: in stable/12/sys: arm64/conf arm64/rockchip conf X-SVN-Commit-Revision: 358642 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages 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, 04 Mar 2020 20:53:01 -0000 Author: manu Date: Wed Mar 4 20:52:59 2020 New Revision: 358642 URL: https://svnweb.freebsd.org/changeset/base/358642 Log: MFC r354088: arm64: rockchip: Add rk_dwc3 driver This is a simplebus like driver that attaches the dwc3 child node and enable the clocks needed for the module. Added: stable/12/sys/arm64/rockchip/rk_dwc3.c - copied unchanged from r354088, head/sys/arm64/rockchip/rk_dwc3.c Modified: stable/12/sys/arm64/conf/GENERIC stable/12/sys/conf/files.arm64 Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/arm64/conf/GENERIC ============================================================================== --- stable/12/sys/arm64/conf/GENERIC Wed Mar 4 20:48:29 2020 (r358641) +++ stable/12/sys/arm64/conf/GENERIC Wed Mar 4 20:52:59 2020 (r358642) @@ -186,6 +186,7 @@ device ohci # OHCI USB interface device ehci # EHCI USB interface (USB 2.0) device ehci_mv # Marvell EHCI USB interface device xhci # XHCI PCI->USB interface (USB 3.0) +device rk_dwc3 # Rockchip DWC3 controller device usb # USB Bus (required) device ukbd # Keyboard device umass # Disks/Mass storage - Requires scbus and da Copied: stable/12/sys/arm64/rockchip/rk_dwc3.c (from r354088, head/sys/arm64/rockchip/rk_dwc3.c) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/12/sys/arm64/rockchip/rk_dwc3.c Wed Mar 4 20:52:59 2020 (r358642, copy of r354088, head/sys/arm64/rockchip/rk_dwc3.c) @@ -0,0 +1,201 @@ +/*- + * SPDX-License-Identifier: BSD-2-Clause-FreeBSD + * + * Copyright (c) 2019 Emmanuel Vadot + * + * 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. + */ + +/* + * Rockchip DWC3 glue + */ + +#include +__FBSDID("$FreeBSD$"); + +#include +#include +#include +#include +#include +#include +#include +#include + + +#include + +#include +#include +#include +#include + +#include +#include +#include +#include + +static struct ofw_compat_data compat_data[] = { + { "rockchip,rk3399-dwc3", 1 }, + { NULL, 0 } +}; + +struct rk_dwc3_softc { + struct simplebus_softc sc; + device_t dev; + clk_t clk_ref; + clk_t clk_suspend; + clk_t clk_bus; + clk_t clk_axi_perf; + clk_t clk_usb3; + clk_t clk_grf; + hwreset_t rst_usb3; +}; + +static int +rk_dwc3_probe(device_t dev) +{ + phandle_t node; + + if (!ofw_bus_status_okay(dev)) + return (ENXIO); + + if (ofw_bus_search_compatible(dev, compat_data)->ocd_data == 0) + return (ENXIO); + + /* Binding says that we need a child node for the actual dwc3 controller */ + node = ofw_bus_get_node(dev); + if (OF_child(node) <= 0) + return (ENXIO); + + device_set_desc(dev, "Rockchip RK3399 DWC3"); + return (BUS_PROBE_DEFAULT); +} + +static int +rk_dwc3_attach(device_t dev) +{ + struct rk_dwc3_softc *sc; + device_t cdev; + phandle_t node, child; + int err; + + sc = device_get_softc(dev); + sc->dev = dev; + node = ofw_bus_get_node(dev); + + /* Mandatory clocks */ + if (clk_get_by_ofw_name(dev, 0, "ref_clk", &sc->clk_ref) != 0) { + device_printf(dev, "Cannot get ref_clk clock\n"); + return (ENXIO); + } + err = clk_enable(sc->clk_ref); + if (err != 0) { + device_printf(dev, "Could not enable clock %s\n", + clk_get_name(sc->clk_ref)); + return (ENXIO); + } + if (clk_get_by_ofw_name(dev, 0, "suspend_clk", &sc->clk_suspend) != 0) { + device_printf(dev, "Cannot get suspend_clk clock\n"); + return (ENXIO); + } + err = clk_enable(sc->clk_suspend); + if (err != 0) { + device_printf(dev, "Could not enable clock %s\n", + clk_get_name(sc->clk_suspend)); + return (ENXIO); + } + if (clk_get_by_ofw_name(dev, 0, "bus_clk", &sc->clk_bus) != 0) { + device_printf(dev, "Cannot get bus_clk clock\n"); + return (ENXIO); + } + err = clk_enable(sc->clk_bus); + if (err != 0) { + device_printf(dev, "Could not enable clock %s\n", + clk_get_name(sc->clk_bus)); + return (ENXIO); + } + if (clk_get_by_ofw_name(dev, 0, "grf_clk", &sc->clk_grf) != 0) { + device_printf(dev, "Cannot get grf_clk clock\n"); + return (ENXIO); + } + err = clk_enable(sc->clk_grf); + if (err != 0) { + device_printf(dev, "Could not enable clock %s\n", + clk_get_name(sc->clk_grf)); + return (ENXIO); + } + + /* Optional clocks */ + if (clk_get_by_ofw_name(dev, 0, "aclk_usb3_rksoc_axi_perf", &sc->clk_axi_perf) == 0) { + err = clk_enable(sc->clk_axi_perf); + if (err != 0) { + device_printf(dev, "Could not enable clock %s\n", + clk_get_name(sc->clk_axi_perf)); + return (ENXIO); + } + } + if (clk_get_by_ofw_name(dev, 0, "aclk_usb3", &sc->clk_usb3) == 0) { + err = clk_enable(sc->clk_usb3); + if (err != 0) { + device_printf(dev, "Could not enable clock %s\n", + clk_get_name(sc->clk_usb3)); + return (ENXIO); + } + } + + /* Put module out of reset */ + if (hwreset_get_by_ofw_name(dev, node, "usb3-otg", &sc->rst_usb3) == 0) { + if (hwreset_deassert(sc->rst_usb3) != 0) { + device_printf(dev, "Cannot deassert reset\n"); + return (ENXIO); + } + } + + simplebus_init(dev, node); + if (simplebus_fill_ranges(node, &sc->sc) < 0) { + device_printf(dev, "could not get ranges\n"); + return (ENXIO); + } + + for (child = OF_child(node); child > 0; child = OF_peer(child)) { + cdev = simplebus_add_device(dev, child, 0, NULL, -1, NULL); + if (cdev != NULL) + device_probe_and_attach(cdev); + } + + return (bus_generic_attach(dev)); +} + +static device_method_t rk_dwc3_methods[] = { + /* Device interface */ + DEVMETHOD(device_probe, rk_dwc3_probe), + DEVMETHOD(device_attach, rk_dwc3_attach), + + DEVMETHOD_END +}; + +static devclass_t rk_dwc3_devclass; + +DEFINE_CLASS_1(rk_dwc3, rk_dwc3_driver, rk_dwc3_methods, + sizeof(struct rk_dwc3_softc), simplebus_driver); +DRIVER_MODULE(rk_dwc3, simplebus, rk_dwc3_driver, rk_dwc3_devclass, 0, 0); Modified: stable/12/sys/conf/files.arm64 ============================================================================== --- stable/12/sys/conf/files.arm64 Wed Mar 4 20:48:29 2020 (r358641) +++ stable/12/sys/conf/files.arm64 Wed Mar 4 20:52:59 2020 (r358642) @@ -279,6 +279,7 @@ cddl/dev/fbt/aarch64/fbt_isa.c optional dtrace_fbt # RockChip Drivers arm64/rockchip/rk3399_emmcphy.c optional fdt rk_emmcphy soc_rockchip_rk3399 +arm64/rockchip/rk_dwc3.c optional fdt rk_dwc3 soc_rockchip_rk3399 arm64/rockchip/rk_i2c.c optional fdt rk_i2c soc_rockchip_rk3328 | fdt rk_i2c soc_rockchip_rk3399 arm64/rockchip/rk805.c optional fdt rk805 soc_rockchip_rk3328 | fdt rk805 soc_rockchip_rk3399 arm64/rockchip/rk_grf.c optional fdt soc_rockchip_rk3328 | fdt soc_rockchip_rk3399 From owner-svn-src-all@freebsd.org Wed Mar 4 21:01:24 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id A48302510BD; Wed, 4 Mar 2020 21:01:24 +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 48XmWm3wj0z3Pnq; Wed, 4 Mar 2020 21:01:24 +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 8201E241EA; Wed, 4 Mar 2020 21:01:24 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 024L1Os7019805; Wed, 4 Mar 2020 21:01:24 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 024L1Mxd019795; Wed, 4 Mar 2020 21:01:22 GMT (envelope-from dim@FreeBSD.org) Message-Id: <202003042101.024L1Mxd019795@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Wed, 4 Mar 2020 21:01:22 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r358643 - in head/stand/i386: . boot2 gptboot gptzfsboot isoboot loader zfsboot X-SVN-Group: head X-SVN-Commit-Author: dim X-SVN-Commit-Paths: in head/stand/i386: . boot2 gptboot gptzfsboot isoboot loader zfsboot X-SVN-Commit-Revision: 358643 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages 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, 04 Mar 2020 21:01:24 -0000 Author: dim Date: Wed Mar 4 21:01:22 2020 New Revision: 358643 URL: https://svnweb.freebsd.org/changeset/base/358643 Log: Link stand/i386 components using a linker script LLD 10.0.0 changed the behavior of the -Ttext option, so that using -Ttext=0x0 now causes linking of the loaders to fail with: ld: error: output file too large: 18446744073707016908 bytes I reported this in https://bugs.llvm.org/show_bug.cgi?id=44715, and initially reverted the upstream change in r357259 to work around it. However, after some discussion with Fangrui Song in the upstream ticket, I think we can classify this as an unfortunate interaction between using -Ttext=0 in combination with --no-rosegment. (We added the latter in r332090, because btxld does not correctly handle input with more than 2 PT_LOAD segments.) Fangrui suggested to use a linker script instead, and Warner was already attempting this in r305353, but had to revert it due to "crypto-using boot problems" (not sure what those were :). This review updates the stand/i386/boot.ldscript to handle more sections, inserts some symbols like _edata and such that we use in libsa, and also discards any .interp section. It uses ORG which is defined on the linker command line using --defsym ORG=value to set the start of all the sections. Reviewed by: imp MFC after: 2 weeks Differential Revision: https://reviews.freebsd.org/D23952 Modified: head/stand/i386/Makefile.inc head/stand/i386/boot.ldscript head/stand/i386/boot2/Makefile head/stand/i386/gptboot/Makefile head/stand/i386/gptzfsboot/Makefile head/stand/i386/isoboot/Makefile head/stand/i386/loader/Makefile head/stand/i386/zfsboot/Makefile Modified: head/stand/i386/Makefile.inc ============================================================================== --- head/stand/i386/Makefile.inc Wed Mar 4 20:52:59 2020 (r358642) +++ head/stand/i386/Makefile.inc Wed Mar 4 21:01:22 2020 (r358643) @@ -22,13 +22,12 @@ CFLAGS+= -I${BTXLIB} # compact binary with no padding between text, data, bss LDSCRIPT= ${BOOTSRC}/i386/boot.ldscript -# LDFLAGS_BIN=-e start -Ttext ${ORG} -Wl,-T,${LDSCRIPT},-S,--oformat,binary -# LD_FLAGS_BIN=-static -T ${LDSCRIPT} --gc-sections -LDFLAGS_BIN=-e start -Ttext ${ORG} -Wl,-N,-S,--oformat,binary +LDFLAGS_ORG= -Wl,--defsym,ORG=${ORG},-T,${LDSCRIPT} +LDFLAGS_BIN= -e start ${LDFLAGS_ORG} -Wl,-N,-S,--oformat,binary .if ${LINKER_FEATURES:Mbuild-id} != "" -LDFLAGS_BIN+=-Wl,--build-id=none +LDFLAGS_BIN+= -Wl,--build-id=none .endif -LD_FLAGS_BIN=-static -N --gc-sections +LD_FLAGS_BIN= -static -N --gc-sections .if ${MACHINE_CPUARCH} == "amd64" DO32=1 Modified: head/stand/i386/boot.ldscript ============================================================================== --- head/stand/i386/boot.ldscript Wed Mar 4 20:52:59 2020 (r358642) +++ head/stand/i386/boot.ldscript Wed Mar 4 21:01:22 2020 (r358643) @@ -1,11 +1,17 @@ /* $FreeBSD$ */ -/* Merge text, data and bss together almost no padding */ +/* Simplified linker script for the boot loaders. */ OUTPUT_FORMAT("elf32-i386-freebsd") OUTPUT_ARCH(i386) ENTRY(_start) SECTIONS { - . = 0x08048000 + SIZEOF_HEADERS; - .text : { *(.text) } =0x90909090 /* Pad with nops, if needed */ - .data : { *(.data) } _edata = .; - .bss : { *(.bss) } _end = .; + . = ORG; + .text : { *(.text .text.*) } =0xcccccccc /* Pad with int3, if needed */ + .rodata : { *(.rodata .rodata.*) } + .got : { *(.got) *(.igot) } + .got.plt : { *(.got.plt) *(.igot.plt) } + .data : { *(.data .data.*) } + _edata = .; PROVIDE (edata = .); + .bss : { *(.bss .bss.*) } + _end = .; PROVIDE (end = .); + /DISCARD/ : { *(.interp) } } Modified: head/stand/i386/boot2/Makefile ============================================================================== --- head/stand/i386/boot2/Makefile Wed Mar 4 20:52:59 2020 (r358642) +++ head/stand/i386/boot2/Makefile Wed Mar 4 21:01:22 2020 (r358643) @@ -56,7 +56,7 @@ boot1: boot1.out ${OBJCOPY} -S -O binary boot1.out ${.TARGET} boot1.out: boot1.o - ${LD} ${LD_FLAGS} -e start -Ttext ${ORG1} -o ${.TARGET} boot1.o + ${LD} ${LD_FLAGS} -e start --defsym ORG=${ORG1} -T ${LDSCRIPT} -o ${.TARGET} boot1.o CLEANFILES+= boot2 boot2.ld boot2.ldr boot2.bin boot2.out boot2.o \ boot2.h sio.o @@ -84,7 +84,7 @@ CFLAGS.ashldi3.c= -Wno-missing-prototypes -Wno-missing CLEANFILES+= ashldi3.o boot2.out: ${BTXCRT} boot2.o sio.o ashldi3.o - ${LD} ${LD_FLAGS} -Ttext ${ORG2} -o ${.TARGET} ${.ALLSRC} + ${LD} ${LD_FLAGS} --defsym ORG=${ORG2} -T ${LDSCRIPT} -o ${.TARGET} ${.ALLSRC} SRCS= boot2.c boot2.h Modified: head/stand/i386/gptboot/Makefile ============================================================================== --- head/stand/i386/gptboot/Makefile Wed Mar 4 20:52:59 2020 (r358642) +++ head/stand/i386/gptboot/Makefile Wed Mar 4 21:01:22 2020 (r358643) @@ -51,7 +51,7 @@ gptldr.bin: gptldr.out ${OBJCOPY} -S -O binary gptldr.out ${.TARGET} gptldr.out: gptldr.o - ${LD} ${LD_FLAGS} -e start -Ttext ${ORG1} -o ${.TARGET} gptldr.o + ${LD} ${LD_FLAGS} -e start --defsym ORG=${ORG1} -T ${LDSCRIPT} -o ${.TARGET} gptldr.o CLEANFILES+= gptboot.bin gptboot.out gptboot.o sio.o drv.o \ cons.o ${OPENCRYPTO_XTS} @@ -60,6 +60,6 @@ gptboot.bin: gptboot.out ${OBJCOPY} -S -O binary gptboot.out ${.TARGET} gptboot.out: ${BTXCRT} gptboot.o sio.o drv.o cons.o ${OPENCRYPTO_XTS} - ${LD} ${LD_FLAGS} -Ttext ${ORG2} -o ${.TARGET} ${.ALLSRC} ${LIBSA32} + ${LD} ${LD_FLAGS} --defsym ORG=${ORG2} -T ${LDSCRIPT} -o ${.TARGET} ${.ALLSRC} ${LIBSA32} .include Modified: head/stand/i386/gptzfsboot/Makefile ============================================================================== --- head/stand/i386/gptzfsboot/Makefile Wed Mar 4 20:52:59 2020 (r358642) +++ head/stand/i386/gptzfsboot/Makefile Wed Mar 4 21:01:22 2020 (r358643) @@ -57,7 +57,7 @@ gptldr.bin: gptldr.out ${OBJCOPY} -S -O binary gptldr.out ${.TARGET} gptldr.out: gptldr.o - ${LD} ${LD_FLAGS} -e start -Ttext ${ORG1} -o ${.TARGET} gptldr.o + ${LD} ${LD_FLAGS} -e start --defsym ORG=${ORG1} -T ${LDSCRIPT} -o ${.TARGET} gptldr.o CLEANFILES+= gptzfsboot.bin gptzfsboot.out zfsboot.o sio.o cons.o \ drv.o gpt.o ${OPENCRYPTO_XTS} @@ -67,7 +67,7 @@ gptzfsboot.bin: gptzfsboot.out gptzfsboot.out: ${BTXCRT} zfsboot.o sio.o gpt.o drv.o cons.o \ ${OPENCRYPTO_XTS} - ${LD} ${LD_FLAGS} -Ttext ${ORG2} -o ${.TARGET} ${.ALLSRC} ${LIBSA32} + ${LD} ${LD_FLAGS} --defsym ORG=${ORG2} -T ${LDSCRIPT} -o ${.TARGET} ${.ALLSRC} ${LIBSA32} zfsboot.o: ${ZFSSRC}/zfsimpl.c Modified: head/stand/i386/isoboot/Makefile ============================================================================== --- head/stand/i386/isoboot/Makefile Wed Mar 4 20:52:59 2020 (r358642) +++ head/stand/i386/isoboot/Makefile Wed Mar 4 21:01:22 2020 (r358643) @@ -53,7 +53,7 @@ gptldr.bin: gptldr.out ${OBJCOPY} -S -O binary gptldr.out ${.TARGET} gptldr.out: gptldr.o - ${LD} ${LD_FLAGS} -e start -Ttext ${ORG1} -o ${.TARGET} gptldr.o + ${LD} ${LD_FLAGS} -e start --defsym ORG=${ORG1} -T ${LDSCRIPT} -o ${.TARGET} gptldr.o CLEANFILES+= isoboot.bin isoboot.out isoboot.o sio.o drv.o \ cons.o ${OPENCRYPTO_XTS} @@ -62,6 +62,6 @@ isoboot.bin: isoboot.out ${OBJCOPY} -S -O binary isoboot.out ${.TARGET} isoboot.out: ${BTXCRT} isoboot.o sio.o drv.o cons.o ${OPENCRYPTO_XTS} - ${LD} ${LD_FLAGS} -Ttext ${ORG2} -o ${.TARGET} ${.ALLSRC} ${LIBSA32} + ${LD} ${LD_FLAGS} --defsym ORG=${ORG2} -T ${LDSCRIPT} -o ${.TARGET} ${.ALLSRC} ${LIBSA32} .include Modified: head/stand/i386/loader/Makefile ============================================================================== --- head/stand/i386/loader/Makefile Wed Mar 4 20:52:59 2020 (r358642) +++ head/stand/i386/loader/Makefile Wed Mar 4 21:01:22 2020 (r358643) @@ -46,8 +46,10 @@ HELP_FILES= ${.CURDIR}/help.i386 CLEANFILES+= ${LOADER} ${LOADER}.bin +ORG= 0x0 + CFLAGS+= -Wall -LDFLAGS+= -static -Ttext 0x0 -Wl,--gc-sections +LDFLAGS+= -static ${LDFLAGS_ORG} -Wl,--gc-sections # i386 standalone support library LIBI386= ${BOOTOBJ}/i386/libi386/libi386.a Modified: head/stand/i386/zfsboot/Makefile ============================================================================== --- head/stand/i386/zfsboot/Makefile Wed Mar 4 20:52:59 2020 (r358642) +++ head/stand/i386/zfsboot/Makefile Wed Mar 4 21:01:22 2020 (r358643) @@ -49,7 +49,7 @@ zfsboot1: zfsldr.out ${OBJCOPY} -S -O binary zfsldr.out ${.TARGET} zfsldr.out: zfsldr.o - ${LD} ${LD_FLAGS} -e start -Ttext ${ORG1} -o ${.TARGET} zfsldr.o + ${LD} ${LD_FLAGS} -e start --defsym ORG=${ORG1} -T ${LDSCRIPT} -o ${.TARGET} zfsldr.o CLEANFILES+= zfsboot2 zfsboot.ld zfsboot.ldr zfsboot.bin zfsboot.out \ zfsboot.o zfsboot.s zfsboot.s.tmp sio.o cons.o drv.o @@ -75,7 +75,7 @@ zfsboot.bin: zfsboot.out ${OBJCOPY} -S -O binary zfsboot.out ${.TARGET} zfsboot.out: ${BTXCRT} zfsboot.o sio.o drv.o cons.o - ${LD} ${LD_FLAGS} -Ttext ${ORG2} -o ${.TARGET} ${.ALLSRC} ${LIBSA32} + ${LD} ${LD_FLAGS} --defsym ORG=${ORG2} -T ${LDSCRIPT} -o ${.TARGET} ${.ALLSRC} ${LIBSA32} SRCS= zfsboot.c From owner-svn-src-all@freebsd.org Wed Mar 4 21:01:25 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id E969A2510CA; Wed, 4 Mar 2020 21:01:25 +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 48XmWn460sz3PpD; Wed, 4 Mar 2020 21:01:25 +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 6F50C241ED; Wed, 4 Mar 2020 21:01:25 +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 024L1PTD019850; Wed, 4 Mar 2020 21:01:25 GMT (envelope-from manu@FreeBSD.org) Received: (from manu@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 024L1PSW019848; Wed, 4 Mar 2020 21:01:25 GMT (envelope-from manu@FreeBSD.org) Message-Id: <202003042101.024L1PSW019848@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: manu set sender to manu@FreeBSD.org using -f From: Emmanuel Vadot Date: Wed, 4 Mar 2020 21:01: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: r358644 - in stable/12/sys: arm64/rockchip/clk conf dev/extres/clk X-SVN-Group: stable-12 X-SVN-Commit-Author: manu X-SVN-Commit-Paths: in stable/12/sys: arm64/rockchip/clk conf dev/extres/clk X-SVN-Commit-Revision: 358644 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages 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, 04 Mar 2020 21:01:26 -0000 Author: manu Date: Wed Mar 4 21:01:25 2020 New Revision: 358644 URL: https://svnweb.freebsd.org/changeset/base/358644 Log: MFC r354554-r354558, r355115 r354554 by mmel: Implement support for (soft)linked clocks. This kind of clock nodes represent temporary placeholder for clocks defined later in boot process. Also, these are necessary to break circular dependencies occasionally occurring in complex clock graphs. r354555 by mmel: Cleanup Rockchip clocks implementation. - style - unify dprinf defines - make dprinf's 32-bit compatible Not a functional change. Reviewed by: manu, imp Differential Revision: https://reviews.freebsd.org/D22281 r354556 by mmel: Enhance Rockchip clocks implementation. - add support for fractional dividers - allow to declare fixed and linked clock Reviewed by: manu Differential Revision: https://reviews.freebsd.org/D22282 r354557 by mmel: Tidy up Rockchip composite clock. - add support for log2 based dividers - use proper write mask when writing to divider register Reviewed by: manu Differential Revision: https://reviews.freebsd.org/D22283 r354558 by mmel: Remove explicit declaration of rk_clk_fract_set_freq() function forgotten in r354556. MFC with: r354556 Noticed by: manu r355115 by mmel: Finish implementation of RK3299 clocks. - implement of all but mmc clocks. MMC clocks will be added later by own commit. - use 'link' clock type for external clocks. - use macros for initialization of structure's named members. Reviewed by: manu Differential Revision: https://reviews.freebsd.org/D22441 Added: stable/12/sys/arm64/rockchip/clk/rk3399_cru_dt.h - copied unchanged from r355115, head/sys/arm64/rockchip/clk/rk3399_cru_dt.h stable/12/sys/arm64/rockchip/clk/rk_clk_fract.c - copied unchanged from r354558, head/sys/arm64/rockchip/clk/rk_clk_fract.c stable/12/sys/arm64/rockchip/clk/rk_clk_fract.h - copied unchanged from r354558, head/sys/arm64/rockchip/clk/rk_clk_fract.h stable/12/sys/dev/extres/clk/clk_link.c - copied unchanged from r354558, head/sys/dev/extres/clk/clk_link.c stable/12/sys/dev/extres/clk/clk_link.h - copied unchanged from r354558, head/sys/dev/extres/clk/clk_link.h Modified: stable/12/sys/arm64/rockchip/clk/rk3399_cru.c stable/12/sys/arm64/rockchip/clk/rk_clk_armclk.c stable/12/sys/arm64/rockchip/clk/rk_clk_composite.c stable/12/sys/arm64/rockchip/clk/rk_clk_composite.h stable/12/sys/arm64/rockchip/clk/rk_clk_gate.c stable/12/sys/arm64/rockchip/clk/rk_clk_mux.c stable/12/sys/arm64/rockchip/clk/rk_clk_pll.c stable/12/sys/arm64/rockchip/clk/rk_cru.c stable/12/sys/arm64/rockchip/clk/rk_cru.h stable/12/sys/conf/files stable/12/sys/conf/files.arm64 stable/12/sys/dev/extres/clk/clk.c stable/12/sys/dev/extres/clk/clk.h Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/arm64/rockchip/clk/rk3399_cru.c ============================================================================== --- stable/12/sys/arm64/rockchip/clk/rk3399_cru.c Wed Mar 4 21:01:22 2020 (r358643) +++ stable/12/sys/arm64/rockchip/clk/rk3399_cru.c Wed Mar 4 21:01:25 2020 (r358644) @@ -50,1930 +50,1188 @@ __FBSDID("$FreeBSD$"); #include -/* GATES */ +#include -#define SCLK_USB2PHY0_REF 123 -#define SCLK_USB2PHY1_REF 124 -#define SCLK_USB3OTG0_REF 129 -#define SCLK_USB3OTG1_REF 130 -#define SCLK_USB3OTG0_SUSPEND 131 -#define SCLK_USB3OTG1_SUSPEND 132 -#define ACLK_EMMC_CORE 241 -#define ACLK_EMMC_NOC 242 -#define ACLK_EMMC_GRF 243 -#define ACLK_USB3_NOC 245 -#define ACLK_USB3OTG0 246 -#define ACLK_USB3OTG1 247 -#define ACLK_USB3_RKSOC_AXI_PERF 248 -#define ACLK_USB3_GRF 249 -#define PCLK_GPIO2 336 -#define PCLK_GPIO3 337 -#define PCLK_GPIO4 338 -#define PCLK_I2C1 341 -#define PCLK_I2C2 342 -#define PCLK_I2C3 343 -#define PCLK_I2C5 344 -#define PCLK_I2C6 345 -#define PCLK_I2C7 346 -#define PCLK_SPI0 347 -#define PCLK_SPI1 348 -#define PCLK_SPI2 349 -#define PCLK_SPI4 350 -#define PCLK_SPI5 351 -#define HCLK_HOST0 456 -#define HCLK_HOST0_ARB 457 -#define HCLK_HOST1 458 -#define HCLK_HOST1_ARB 459 -#define HCLK_SDMMC 462 +#define CRU_CLKSEL_CON(x) (0x100 + (x) * 0x4) +#define CRU_CLKGATE_CON(x) (0x300 + (x) * 0x4) + +/* GATES */ + static struct rk_cru_gate rk3399_gates[] = { /* CRU_CLKGATE_CON0 */ - CRU_GATE(0, "clk_core_l_lpll_src", "lpll", 0x300, 0) - CRU_GATE(0, "clk_core_l_bpll_src", "bpll", 0x300, 1) - CRU_GATE(0, "clk_core_l_dpll_src", "dpll", 0x300, 2) - CRU_GATE(0, "clk_core_l_gpll_src", "gpll", 0x300, 3) + /* 15-8 unused */ + GATE(SCLK_PVTM_CORE_L, "clk_pvtm_core_l", "xin24m", 0, 7), + GATE(0, "pclk_dbg_core_l", "pclk_dbg_core_l_c", 0, 6), + GATE(0, "atclk_core_l", "atclk_core_l_c", 0, 5), + GATE(0, "aclkm_core_l", "aclkm_core_l_c", 0, 4), + GATE(0, "clk_core_l_gpll_src", "gpll", 0, 3), + GATE(0, "clk_core_l_dpll_src", "dpll", 0, 2), + GATE(0, "clk_core_l_bpll_src", "bpll", 0, 1), + GATE(0, "clk_core_l_lpll_src", "lpll", 0, 0), /* CRU_CLKGATE_CON1 */ - CRU_GATE(0, "clk_core_b_lpll_src", "lpll", 0x304, 0) - CRU_GATE(0, "clk_core_b_bpll_src", "bpll", 0x304, 1) - CRU_GATE(0, "clk_core_b_dpll_src", "dpll", 0x304, 2) - CRU_GATE(0, "clk_core_b_gpll_src", "gpll", 0x304, 3) + /* 15 - 8 unused */ + GATE(SCLK_PVTM_CORE_B, "clk_pvtm_core_b", "xin24m", 1, 7), + GATE(0, "pclk_dbg_core_b","pclk_dbg_core_b_c", 1, 6), + GATE(0, "atclk_core_b", "atclk_core_b_c", 1, 5), + GATE(0, "aclkm_core_b", "aclkm_core_b_c", 1, 4), + GATE(0, "clk_core_b_gpll_src", "gpll", 1, 3), + GATE(0, "clk_core_b_dpll_src", "dpll", 1, 2), + GATE(0, "clk_core_b_bpll_src", "bpll", 1, 1), + GATE(0, "clk_core_b_lpll_src", "lpll", 1, 0), + /* CRU_CLKGATE_CON2 */ + /* 15 - 11 unused */ + GATE(0, "npll_cs", "npll", 2, 10), + GATE(0, "gpll_cs", "gpll", 2, 9), + GATE(0, "cpll_cs", "cpll", 2, 8), + GATE(SCLK_CCI_TRACE, "clk_cci_trace", "clk_cci_trace_c", 2, 7), + GATE(0, "gpll_cci_trace", "gpll", 2, 6), + GATE(0, "cpll_cci_trace", "cpll", 2, 5), + GATE(0, "aclk_cci_pre", "aclk_cci_pre_c", 2, 4), + GATE(0, "vpll_aclk_cci_src", "vpll", 2, 3), + GATE(0, "npll_aclk_cci_src", "npll", 2, 2), + GATE(0, "gpll_aclk_cci_src", "gpll", 2, 1), + GATE(0, "cpll_aclk_cci_src", "cpll", 2, 0), + + /* CRU_CLKGATE_CON3 */ + /* 15 - 8 unused */ + GATE(0, "aclk_center", "aclk_center_c", 3, 7), + /* 6 unused */ + /* 5 unused */ + GATE(PCLK_DDR, "pclk_ddr", "pclk_ddr_c", 3, 4), + GATE(0, "clk_ddrc_gpll_src", "gpll", 3, 3), + GATE(0, "clk_ddrc_dpll_src", "dpll", 3, 2), + GATE(0, "clk_ddrc_bpll_src", "bpll", 3, 1), + GATE(0, "clk_ddrc_lpll_src", "lpll", 3, 0), + + + /* CRU_CLKGATE_CON4 */ + /* 15 - 12 unused */ + GATE(SCLK_PVTM_DDR, "clk_pvtm_ddr", "xin24m", 4, 11), + GATE(0, "clk_rga_core", "clk_rga_core_c", 4, 10), + GATE(0, "hclk_rga_pre", "hclk_rga_pre_c", 4, 9), + GATE(0, "aclk_rga_pre", "aclk_rga_pre_c", 4, 8), + GATE(0, "hclk_iep_pre", "hclk_iep_pre_c", 4, 7), + GATE(0, "aclk_iep_pre", "aclk_iep_pre_c", 4, 6), + GATE(SCLK_VDU_CA, "clk_vdu_ca", "clk_vdu_ca_c", 4, 5), + GATE(SCLK_VDU_CORE, "clk_vdu_core", "clk_vdu_core_c", 4, 4), + GATE(0, "hclk_vdu_pre", "hclk_vdu_pre_c", 4, 3), + GATE(0, "aclk_vdu_pre", "aclk_vdu_pre_c", 4, 2), + GATE(0, "hclk_vcodec_pre", "hclk_vcodec_pre_c", 4, 1), + GATE(0, "aclk_vcodec_pre", "aclk_vcodec_pre_c", 4, 0), + /* CRU_CLKGATE_CON5 */ - CRU_GATE(0, "cpll_aclk_perihp_src", "cpll", 0x314, 0) - CRU_GATE(0, "gpll_aclk_perihp_src", "gpll", 0x314, 1) + /* 15 - 10 unused */ + GATE(SCLK_MAC_TX, "clk_rmii_tx", "clk_rmii_src", 5, 9), + GATE(SCLK_MAC_RX, "clk_rmii_rx", "clk_rmii_src", 5, 8), + GATE(SCLK_MACREF, "clk_mac_ref", "clk_rmii_src", 5, 7), + GATE(SCLK_MACREF_OUT, "clk_mac_refout", "clk_rmii_src", 5, 6), + GATE(SCLK_MAC, "clk_gmac", "clk_gmac_c", 5, 5), + GATE(PCLK_PERIHP, "pclk_perihp", "pclk_perihp_c", 5, 4), + GATE(HCLK_PERIHP, "hclk_perihp", "hclk_perihp_c", 5, 3), + GATE(ACLK_PERIHP, "aclk_perihp", "aclk_perihp_c", 5, 2), + GATE(0, "cpll_aclk_perihp_src", "cpll", 5, 1), + GATE(0, "gpll_aclk_perihp_src", "gpll", 5, 0), /* CRU_CLKGATE_CON6 */ - CRU_GATE(0, "gpll_aclk_emmc_src", "gpll", 0x318, 12) - CRU_GATE(0, "cpll_aclk_emmc_src", "cpll", 0x318, 13) - CRU_GATE(SCLK_USB2PHY0_REF, "clk_usb2phy0_ref", "xin24m", 0x318, 5) - CRU_GATE(SCLK_USB2PHY1_REF, "clk_usb2phy1_ref", "xin24m", 0x318, 6) + /* 15 unused */ + GATE(SCLK_EMMC, "clk_emmc", "clk_emmc_c", 6, 14), + GATE(0, "cpll_aclk_emmc_src", "cpll", 6, 13), + GATE(0, "gpll_aclk_emmc_src", "gpll", 6, 12), + GATE(0, "pclk_gmac_pre", "pclk_gmac_pre_c", 6, 11), + GATE(0, "aclk_gmac_pre", "aclk_gmac_pre_c", 6, 10), + GATE(0, "cpll_aclk_gmac_src", "cpll", 6, 9), + GATE(0, "gpll_aclk_gmac_src", "gpll", 6, 8), + /* 7 unused */ + GATE(SCLK_USB2PHY1_REF, "clk_usb2phy1_ref", "xin24m", 6, 6), + GATE(SCLK_USB2PHY0_REF, "clk_usb2phy0_ref", "xin24m", 6, 5), + GATE(SCLK_HSICPHY, "clk_hsicphy", "clk_hsicphy_c", 6, 4), + GATE(0, "clk_pcie_core_cru", "clk_pcie_core_cru_c", 6, 3), + GATE(SCLK_PCIE_PM, "clk_pcie_pm", "clk_pcie_pm_c", 6, 2), + GATE(SCLK_SDMMC, "clk_sdmmc", "clk_sdmmc_c", 6, 1), + GATE(SCLK_SDIO, "clk_sdio", "clk_sdio_c", 6, 0), /* CRU_CLKGATE_CON7 */ - CRU_GATE(0, "gpll_aclk_perilp0_src", "gpll", 0x31C, 0) - CRU_GATE(0, "cpll_aclk_perilp0_src", "cpll", 0x31C, 1) + /* 15 - 10 unused */ + GATE(FCLK_CM0S, "fclk_cm0s", "fclk_cm0s_c", 7, 9), + GATE(SCLK_CRYPTO1, "clk_crypto1", "clk_crypto1_c", 7, 8), + GATE(SCLK_CRYPTO0, "clk_crypto0", "clk_crypto0_c", 7, 7), + GATE(0, "cpll_fclk_cm0s_src", "cpll", 7, 6), + GATE(0, "gpll_fclk_cm0s_src", "gpll", 7, 5), + GATE(PCLK_PERILP0, "pclk_perilp0", "pclk_perilp0_c", 7, 4), + GATE(HCLK_PERILP0, "hclk_perilp0", "hclk_perilp0_c", 7, 3), + GATE(ACLK_PERILP0, "aclk_perilp0", "aclk_perilp0_c", 7, 2), + GATE(0, "cpll_aclk_perilp0_src", "cpll", 7, 1), + GATE(0, "gpll_aclk_perilp0_src", "gpll", 7, 0), /* CRU_CLKGATE_CON8 */ - CRU_GATE(0, "hclk_perilp1_cpll_src", "cpll", 0x320, 1) - CRU_GATE(0, "hclk_perilp1_gpll_src", "gpll", 0x320, 0) + GATE(SCLK_SPDIF_8CH, "clk_spdif", "clk_spdif_mux", 8, 15), + GATE(0, "clk_spdif_frac", "clk_spdif_frac_c", 8, 14), + GATE(0, "clk_spdif_div", "clk_spdif_div_c", 8, 13), + GATE(SCLK_I2S_8CH_OUT, "clk_i2sout", "clk_i2sout_c", 8, 12), + GATE(SCLK_I2S2_8CH, "clk_i2s2", "clk_i2s2_mux", 8, 11), + GATE(0, "clk_i2s2_frac", "clk_i2s2_frac_c", 8, 10), + GATE(0, "clk_i2s2_div", "clk_i2s2_div_c", 8, 9), + GATE(SCLK_I2S1_8CH, "clk_i2s1", "clk_i2s1_mux", 8, 8), + GATE(0, "clk_i2s1_frac", "clk_i2s1_frac_c", 8, 7), + GATE(0, "clk_i2s1_div", "clk_i2s1_div_c", 8, 6), + GATE(SCLK_I2S0_8CH, "clk_i2s0", "clk_i2s0_mux", 8, 5), + GATE(0, "clk_i2s0_frac","clk_i2s0_frac_c", 8, 4), + GATE(0, "clk_i2s0_div","clk_i2s0_div_c", 8, 3), + GATE(PCLK_PERILP1, "pclk_perilp1", "pclk_perilp1_c", 8, 2), + GATE(HCLK_PERILP1, "cpll_hclk_perilp1_src", "cpll", 8, 1), + GATE(0, "gpll_hclk_perilp1_src", "gpll", 8, 0), - /* CRU_CLKGATE_CON12 */ - CRU_GATE(SCLK_USB3OTG0_REF, "sclk_usb3otg0_ref", "xin24m", 0x330, 1) - CRU_GATE(SCLK_USB3OTG1_REF, "sclk_usb3otg1_ref", "xin24m", 0x330, 2) - CRU_GATE(SCLK_USB3OTG0_SUSPEND, "sclk_usb3otg0_suspend", "xin24m", 0x330, 3) - CRU_GATE(SCLK_USB3OTG1_SUSPEND, "sclk_usb3otg1_suspend", "xin24m", 0x330, 4) + /* CRU_CLKGATE_CON9 */ + GATE(SCLK_SPI4, "clk_spi4", "clk_spi4_c", 9, 15), + GATE(SCLK_SPI2, "clk_spi2", "clk_spi2_c", 9, 14), + GATE(SCLK_SPI1, "clk_spi1", "clk_spi1_c", 9, 13), + GATE(SCLK_SPI0, "clk_spi0", "clk_spi0_c", 9, 12), + GATE(SCLK_SARADC, "clk_saradc", "clk_saradc_c", 9, 11), + GATE(SCLK_TSADC, "clk_tsadc", "clk_tsadc_c", 9, 10), + /* 9 - 8 unused */ + GATE(0, "clk_uart3_frac", "clk_uart3_frac_c", 9, 7), + GATE(0, "clk_uart3_div", "clk_uart3_div_c", 9, 6), + GATE(0, "clk_uart2_frac", "clk_uart2_frac_c", 9, 5), + GATE(0, "clk_uart2_div", "clk_uart2_div_c", 9, 4), + GATE(0, "clk_uart1_frac", "clk_uart1_frac_c", 9, 3), + GATE(0, "clk_uart1_div", "clk_uart1_div_c", 9, 2), + GATE(0, "clk_uart0_frac", "clk_uart0_frac_c", 9, 1), + GATE(0, "clk_uart0_div", "clk_uart0_div_c", 9, 0), - /* CRU_CLKGATE_CON20 */ - CRU_GATE(HCLK_HOST0, "hclk_host0", "hclk_perihp", 0x350, 5) - CRU_GATE(HCLK_HOST0_ARB, "hclk_host0_arb", "hclk_perihp", 0x350, 6) - CRU_GATE(HCLK_HOST1, "hclk_host1", "hclk_perihp", 0x350, 7) - CRU_GATE(HCLK_HOST1_ARB, "hclk_host1_arb", "hclk_perihp", 0x350, 8) + /* CRU_CLKGATE_CON10 */ + GATE(SCLK_VOP1_PWM, "clk_vop1_pwm", "clk_vop1_pwm_c", 10, 15), + GATE(SCLK_VOP0_PWM, "clk_vop0_pwm", "clk_vop0_pwm_c", 10, 14), + GATE(DCLK_VOP0_DIV, "dclk_vop0_div", "dclk_vop0_div_c", 10, 12), + GATE(DCLK_VOP1_DIV, "dclk_vop1_div", "dclk_vop1_div_c", 10, 13), + GATE(0, "hclk_vop1_pre", "hclk_vop1_pre_c", 10, 11), + GATE(ACLK_VOP1_PRE, "aclk_vop1_pre", "aclk_vop1_pre_c", 10, 10), + GATE(0, "hclk_vop0_pre", "hclk_vop0_pre_c", 10, 9), + GATE(ACLK_VOP0_PRE, "aclk_vop0_pre", "aclk_vop0_pre_c", 10, 8), + GATE(0, "clk_cifout_src", "clk_cifout_src_c", 10, 7), + GATE(SCLK_SPDIF_REC_DPTX, "clk_spdif_rec_dptx", "clk_spdif_rec_dptx_c", 10, 6), + GATE(SCLK_I2C7, "clk_i2c7", "clk_i2c7_c", 10, 5), + GATE(SCLK_I2C3, "clk_i2c3", "clk_i2c3_c", 10, 4), + GATE(SCLK_I2C6, "clk_i2c6", "clk_i2c6_c", 10, 3), + GATE(SCLK_I2C2, "clk_i2c2", "clk_i2c2_c", 10, 2), + GATE(SCLK_I2C5, "clk_i2c5", "clk_i2c5_c", 10, 1), + GATE(SCLK_I2C1, "clk_i2c1", "clk_i2c1_c", 10, 0), - /* CRU_CLKGATE_CON22 */ - CRU_GATE(PCLK_I2C7, "pclk_rki2c7", "pclk_perilp1", 0x358, 5) - CRU_GATE(PCLK_I2C1, "pclk_rki2c1", "pclk_perilp1", 0x358, 6) - CRU_GATE(PCLK_I2C5, "pclk_rki2c5", "pclk_perilp1", 0x358, 7) - CRU_GATE(PCLK_I2C6, "pclk_rki2c6", "pclk_perilp1", 0x358, 8) - CRU_GATE(PCLK_I2C2, "pclk_rki2c2", "pclk_perilp1", 0x358, 9) - CRU_GATE(PCLK_I2C3, "pclk_rki2c3", "pclk_perilp1", 0x358, 10) - /* CRU_CLKGATE_CON23 */ - CRU_GATE(PCLK_SPI0, "pclk_spi0", "pclk_perilp1", 0x35C, 10) - CRU_GATE(PCLK_SPI1, "pclk_spi1", "pclk_perilp1", 0x35C, 11) - CRU_GATE(PCLK_SPI2, "pclk_spi2", "pclk_perilp1", 0x35C, 12) - CRU_GATE(PCLK_SPI4, "pclk_spi4", "pclk_perilp1", 0x35C, 13) + /* CRU_CLKGATE_CON11 */ + GATE(SCLK_MIPIDPHY_CFG, "clk_mipidphy_cfg", "xin24m", 11, 15), + GATE(SCLK_MIPIDPHY_REF, "clk_mipidphy_ref", "xin24m", 11, 14), + /* 13-12 unused */ + GATE(PCLK_EDP, "pclk_edp", "pclk_edp_c", 11, 11), + GATE(PCLK_HDCP, "pclk_hdcp", "pclk_hdcp_c", 11, 10), + /* 9 unuwsed */ + GATE(SCLK_DP_CORE, "clk_dp_core", "clk_dp_core_c", 11, 8), + GATE(SCLK_HDMI_CEC, "clk_hdmi_cec", "clk_hdmi_cec_c", 11, 7), + GATE(SCLK_HDMI_SFR, "clk_hdmi_sfr", "xin24m", 11, 6), + GATE(SCLK_ISP1, "clk_isp1", "clk_isp1_c", 11, 5), + GATE(SCLK_ISP0, "clk_isp0", "clk_isp0_c", 11, 4), + GATE(HCLK_HDCP, "hclk_hdcp", "hclk_hdcp_c", 11, 3), + GATE(ACLK_HDCP, "aclk_hdcp", "aclk_hdcp_c", 11, 2), + GATE(PCLK_VIO, "pclk_vio", "pclk_vio_c", 11, 1), + GATE(ACLK_VIO, "aclk_vio", "aclk_vio_c", 11, 0), - /* CRU_CLKGATE_CON30 */ - CRU_GATE(ACLK_USB3_NOC, "aclk_usb3_noc", "aclk_usb3", 0x378, 0) - CRU_GATE(ACLK_USB3OTG0, "aclk_usb3otg0", "aclk_usb3", 0x378, 1) - CRU_GATE(ACLK_USB3OTG1, "aclk_usb3otg1", "aclk_usb3", 0x378, 2) - CRU_GATE(ACLK_USB3_RKSOC_AXI_PERF, "aclk_usb3_rksoc_axi_perf", "aclk_usb3", 0x378, 3) - CRU_GATE(ACLK_USB3_GRF, "aclk_usb3_grf", "aclk_usb3", 0x378, 4) + /* CRU_CLKGATE_CON12 */ + /* 15 - 14 unused */ + GATE(HCLK_SD, "hclk_sd", "hclk_sd_c", 12, 13), + GATE(ACLK_GIC_PRE, "aclk_gic_pre", "aclk_gic_pre_c", 12, 12), + GATE(HCLK_ISP1, "hclk_isp1", "hclk_isp1_c", 12, 11), + GATE(ACLK_ISP1, "aclk_isp1", "aclk_isp1_c", 12, 10), + GATE(HCLK_ISP0, "hclk_isp0", "hclk_isp0_c", 12, 9), + GATE(ACLK_ISP0, "aclk_isp0", "aclk_isp0_c", 12, 8), + /* 7 unused */ + GATE(SCLK_PCIEPHY_REF100M, "clk_pciephy_ref100m", "clk_pciephy_ref100m_c", 12, 6), + /* 5 unused */ + GATE(SCLK_USB3OTG1_SUSPEND, "clk_usb3otg1_suspend", "clk_usb3otg1_suspend_c", 12, 4), + GATE(SCLK_USB3OTG0_SUSPEND, "clk_usb3otg0_suspend", "clk_usb3otg0_suspend_c", 12, 3), + GATE(SCLK_USB3OTG1_REF, "clk_usb3otg1_ref", "xin24m", 12, 2), + GATE(SCLK_USB3OTG0_REF, "clk_usb3otg0_ref", "xin24m", 12, 1), + GATE(ACLK_USB3, "aclk_usb3", "aclk_usb3_c", 12, 0), - /* CRU_CLKGATE_CON31 */ - CRU_GATE(PCLK_GPIO2, "pclk_gpio2", "pclk_alive", 0x37c, 3) - CRU_GATE(PCLK_GPIO3, "pclk_gpio3", "pclk_alive", 0x37c, 4) - CRU_GATE(PCLK_GPIO4, "pclk_gpio4", "pclk_alive", 0x37c, 5) + /* CRU_CLKGATE_CON13 */ + GATE(SCLK_TESTCLKOUT2, "clk_testout2", "clk_testout2_c", 13, 15), + GATE(SCLK_TESTCLKOUT1, "clk_testout1", "clk_testout1_c", 13, 14), + GATE(SCLK_SPI5, "clk_spi5", "clk_spi5_c", 13, 13), + GATE(0, "clk_usbphy0_480m_src", "clk_usbphy0_480m", 13, 12), + GATE(0, "clk_usbphy1_480m_src", "clk_usbphy1_480m", 13, 12), + GATE(0, "clk_test", "clk_test_c", 13, 11), + /* 10 unused */ + GATE(0, "clk_test_frac", "clk_test_frac_c", 13, 9), + /* 8 unused */ + GATE(SCLK_UPHY1_TCPDCORE, "clk_uphy1_tcpdcore", "clk_uphy1_tcpdcore_c", 13, 7), + GATE(SCLK_UPHY1_TCPDPHY_REF, "clk_uphy1_tcpdphy_ref", "clk_uphy1_tcpdphy_ref_c", 13, 6), + GATE(SCLK_UPHY0_TCPDCORE, "clk_uphy0_tcpdcore", "clk_uphy0_tcpdcore_c", 13, 5), + GATE(SCLK_UPHY0_TCPDPHY_REF, "clk_uphy0_tcpdphy_ref", "clk_uphy0_tcpdphy_ref_c", 13, 4), + /* 3 - 2 unused */ + GATE(SCLK_PVTM_GPU, "aclk_pvtm_gpu", "xin24m", 13, 1), + GATE(0, "aclk_gpu_pre", "aclk_gpu_pre_c", 13, 0), - /* CRU_CLKGATE_CON32 */ - CRU_GATE(ACLK_EMMC_CORE, "aclk_emmccore", "aclk_emmc", 0x380, 8) - CRU_GATE(ACLK_EMMC_NOC, "aclk_emmc_noc", "aclk_emmc", 0x380, 9) - CRU_GATE(ACLK_EMMC_GRF, "aclk_emmcgrf", "aclk_emmc", 0x380, 10) + /* CRU_CLKGATE_CON14 */ + /* 15 - 14 unused */ + GATE(ACLK_PERF_CORE_L, "aclk_perf_core_l", "aclkm_core_l", 14, 13), + GATE(ACLK_CORE_ADB400_CORE_L_2_CCI500, "aclk_core_adb400_core_l_2_cci500", "aclkm_core_l", 14, 12), + GATE(ACLK_GIC_ADB400_CORE_L_2_GIC, "aclk_core_adb400_core_l_2_gic", "armclkl", 14, 11), + GATE(ACLK_GIC_ADB400_GIC_2_CORE_L, "aclk_core_adb400_gic_2_core_l", "armclkl", 14, 10), + GATE(0, "clk_dbg_pd_core_l", "armclkl", 14, 9), + /* 8 - 7 unused */ + GATE(ACLK_PERF_CORE_B, "aclk_perf_core_b", "aclkm_core_b", 14, 6), + GATE(ACLK_CORE_ADB400_CORE_B_2_CCI500, "aclk_core_adb400_core_b_2_cci500", "aclkm_core_b", 14, 5), + GATE(ACLK_GIC_ADB400_CORE_B_2_GIC, "aclk_core_adb400_core_b_2_gic", "armclkb", 14, 4), + GATE(ACLK_GIC_ADB400_GIC_2_CORE_B, "aclk_core_adb400_gic_2_core_b", "armclkb", 14, 3), + GATE(0, "pclk_dbg_cxcs_pd_core_b", "pclk_dbg_core_b", 14, 2), + GATE(0, "clk_dbg_pd_core_b", "armclkb", 14, 1), + /* 0 unused */ - /* CRU_CLKGATE_CON33 */ - CRU_GATE(HCLK_SDMMC, "hclk_sdmmc", "hclk_sd", 0x384, 8) + /* CRU_CLKGATE_CON15 */ + /* 15 - 8 unused */ + GATE(ACLK_CCI_GRF, "aclk_cci_grf", "aclk_cci_pre", 15, 7), + GATE(0, "clk_dbg_noc", "clk_cs", 15, 6), + GATE(0, "clk_dbg_cxcs", "clk_cs", 15, 5), + GATE(ACLK_CCI_NOC1, "aclk_cci_noc1", "aclk_cci_pre", 15, 4), + GATE(ACLK_CCI_NOC0, "aclk_cci_noc0", "aclk_cci_pre", 15, 3), + GATE(ACLK_CCI, "aclk_cci", "aclk_cci_pre", 15, 2), + GATE(ACLK_ADB400M_PD_CORE_B, "aclk_adb400m_pd_core_b", "aclk_cci_pre", 15, 1), + GATE(ACLK_ADB400M_PD_CORE_L, "aclk_adb400m_pd_core_l", "aclk_cci_pre", 15, 0), - /* CRU_CLKGATE_CON34 */ - CRU_GATE(PCLK_SPI4, "pclk_spi5", "pclk_perilp1", 0x388, 5) -}; + /* CRU_CLKGATE_CON16 */ + /* 15 - 12 unused */ + GATE(HCLK_RGA_NOC, "hclk_rga_noc", "hclk_rga_pre", 16, 11), + GATE(HCLK_RGA, "hclk_rga", "hclk_rga_pre", 16, 10), + GATE(ACLK_RGA_NOC, "aclk_rga_noc", "aclk_rga_pre", 16, 9), + GATE(ACLK_RGA, "aclk_rga", "aclk_rga_pre", 16, 8), + /* 7 - 4 unused */ + GATE(HCLK_IEP_NOC, "hclk_iep_noc", "hclk_iep_pre", 16, 3), + GATE(HCLK_IEP, "hclk_iep", "hclk_iep_pre", 16, 2), + GATE(ACLK_IEP_NOC, "aclk_iep_noc", "aclk_iep_pre", 16, 1), + GATE(ACLK_IEP, "aclk_iep", "aclk_iep_pre", 16, 0), -/* - * PLLs - */ + /* CRU_CLKGATE_CON17 */ + /* 15 - 12 unused */ + GATE(HCLK_VDU_NOC, "hclk_vdu_noc", "hclk_vdu_pre", 17, 11), + GATE(HCLK_VDU, "hclk_vdu", "hclk_vdu_pre", 17, 10), + GATE(ACLK_VDU_NOC, "aclk_vdu_noc", "aclk_vdu_pre", 17, 9), + GATE(ACLK_VDU, "aclk_vdu", "aclk_vdu_pre", 17, 8), + GATE(0, "hclk_vcodec_noc", "hclk_vcodec_pre", 17, 3), + GATE(HCLK_VCODEC, "hclk_vcodec", "hclk_vcodec_pre", 17, 2), + GATE(0, "aclk_vcodec_noc", "aclk_vcodec_pre", 17, 1), + GATE(ACLK_VCODEC, "aclk_vcodec", "aclk_vcodec_pre", 17, 0), -#define PLL_APLLL 1 -#define PLL_APLLB 2 -#define PLL_DPLL 3 -#define PLL_CPLL 4 -#define PLL_GPLL 5 -#define PLL_NPLL 6 -#define PLL_VPLL 7 + /* CRU_CLKGATE_CON18 */ + GATE(PCLK_CIC, "pclk_cic", "pclk_ddr", 18, 15), + GATE(0, "clk_ddr_mon_timer", "xin24m", 18, 14), + GATE(0, "clk_ddr_mon", "clk_ddrc_div2", 18, 13), + GATE(PCLK_DDR_MON, "pclk_ddr_mon", "pclk_ddr", 18, 12), + GATE(0, "clk_ddr_cic", "clk_ddrc_div2", 18, 11), + GATE(PCLK_CENTER_MAIN_NOC, "pclk_center_main_noc", "pclk_ddr", 18, 10), + GATE(0, "clk_ddrcfg_msch1", "clk_ddrc_div2", 18, 9), + GATE(0, "clk_ddrphy1", "clk_ddrc_div2", 18, 8), + GATE(0, "clk_ddrphy_ctrl1", "clk_ddrc_div2", 18, 7), + GATE(0, "clk_ddrc1", "clk_ddrc_div2", 18, 6), + GATE(0, "clk_ddr1_msch", "clk_ddrc_div2", 18, 5), + GATE(0, "clk_ddrcfg_msch0", "clk_ddrc_div2", 18, 4), + GATE(0, "clk_ddrphy0", "clk_ddrc_div2", 18, 3), + GATE(0, "clk_ddrphy_ctrl0", "clk_ddrc_div2", 18, 2), + GATE(0, "clk_ddrc0", "clk_ddrc_div2", 18, 1), -static struct rk_clk_pll_rate rk3399_pll_rates[] = { - { - .freq = 2208000000, - .refdiv = 1, - .fbdiv = 92, - .postdiv1 = 1, - .postdiv2 = 1, - .dsmpd = 1, - }, - { - .freq = 2184000000, - .refdiv = 1, - .fbdiv = 91, - .postdiv1 = 1, - .postdiv2 = 1, - .dsmpd = 1, - }, - { - .freq = 2160000000, - .refdiv = 1, - .fbdiv = 90, - .postdiv1 = 1, - .postdiv2 = 1, - .dsmpd = 1, - }, - { - .freq = 2136000000, - .refdiv = 1, - .fbdiv = 89, - .postdiv1 = 1, - .postdiv2 = 1, - .dsmpd = 1, - }, - { - .freq = 2112000000, - .refdiv = 1, - .fbdiv = 88, - .postdiv1 = 1, - .postdiv2 = 1, - .dsmpd = 1, - }, - { - .freq = 2088000000, - .refdiv = 1, - .fbdiv = 87, - .postdiv1 = 1, - .postdiv2 = 1, - .dsmpd = 1, - }, - { - .freq = 2064000000, - .refdiv = 1, - .fbdiv = 86, - .postdiv1 = 1, - .postdiv2 = 1, - .dsmpd = 1, - }, - { - .freq = 2040000000, - .refdiv = 1, - .fbdiv = 85, - .postdiv1 = 1, - .postdiv2 = 1, - .dsmpd = 1, - }, - { - .freq = 2016000000, - .refdiv = 1, - .fbdiv = 84, - .postdiv1 = 1, - .postdiv2 = 1, - .dsmpd = 1, - }, - { - .freq = 1992000000, - .refdiv = 1, - .fbdiv = 83, - .postdiv1 = 1, - .postdiv2 = 1, - .dsmpd = 1, - }, - { - .freq = 1968000000, - .refdiv = 1, - .fbdiv = 82, - .postdiv1 = 1, - .postdiv2 = 1, - .dsmpd = 1, - }, - { - .freq = 1944000000, - .refdiv = 1, - .fbdiv = 81, - .postdiv1 = 1, - .postdiv2 = 1, - .dsmpd = 1, - }, - { - .freq = 1920000000, - .refdiv = 1, - .fbdiv = 80, - .postdiv1 = 1, - .postdiv2 = 1, - .dsmpd = 1, - }, - { - .freq = 1896000000, - .refdiv = 1, - .fbdiv = 79, - .postdiv1 = 1, - .postdiv2 = 1, - .dsmpd = 1, - }, - { - .freq = 1872000000, - .refdiv = 1, - .fbdiv = 78, - .postdiv1 = 1, - .postdiv2 = 1, - .dsmpd = 1, - }, - { - .freq = 1848000000, - .refdiv = 1, - .fbdiv = 77, - .postdiv1 = 1, - .postdiv2 = 1, - .dsmpd = 1, - }, - { - .freq = 1824000000, - .refdiv = 1, - .fbdiv = 76, - .postdiv1 = 1, - .postdiv2 = 1, - .dsmpd = 1, - }, - { - .freq = 1800000000, - .refdiv = 1, - .fbdiv = 75, - .postdiv1 = 1, - .postdiv2 = 1, - .dsmpd = 1, - }, - { - .freq = 1776000000, - .refdiv = 1, - .fbdiv = 74, - .postdiv1 = 1, - .postdiv2 = 1, - .dsmpd = 1, - }, - { - .freq = 1752000000, - .refdiv = 1, - .fbdiv = 73, - .postdiv1 = 1, - .postdiv2 = 1, - .dsmpd = 1, - }, - { - .freq = 1728000000, - .refdiv = 1, - .fbdiv = 72, - .postdiv1 = 1, - .postdiv2 = 1, - .dsmpd = 1, - }, - { - .freq = 1704000000, - .refdiv = 1, - .fbdiv = 71, - .postdiv1 = 1, - .postdiv2 = 1, - .dsmpd = 1, - }, - { - .freq = 1680000000, - .refdiv = 1, - .fbdiv = 70, - .postdiv1 = 1, - .postdiv2 = 1, - .dsmpd = 1, - }, - { - .freq = 1656000000, - .refdiv = 1, - .fbdiv = 69, - .postdiv1 = 1, - .postdiv2 = 1, - .dsmpd = 1, - }, - { - .freq = 1632000000, - .refdiv = 1, - .fbdiv = 68, - .postdiv1 = 1, - .postdiv2 = 1, - .dsmpd = 1, - }, - { - .freq = 1608000000, - .refdiv = 1, - .fbdiv = 67, - .postdiv1 = 1, - .postdiv2 = 1, - .dsmpd = 1, - }, - { - .freq = 1600000000, - .refdiv = 3, - .fbdiv = 200, - .postdiv1 = 1, - .postdiv2 = 1, - .dsmpd = 1, - }, - { - .freq = 1584000000, - .refdiv = 1, - .fbdiv = 66, - .postdiv1 = 1, - .postdiv2 = 1, - .dsmpd = 1, - }, - { - .freq = 1560000000, - .refdiv = 1, - .fbdiv = 65, - .postdiv1 = 1, - .postdiv2 = 1, - .dsmpd = 1, - }, - { - .freq = 1536000000, - .refdiv = 1, - .fbdiv = 64, - .postdiv1 = 1, - .postdiv2 = 1, - .dsmpd = 1, - }, - { - .freq = 1512000000, - .refdiv = 1, - .fbdiv = 63, - .postdiv1 = 1, - .postdiv2 = 1, - .dsmpd = 1, - }, - { - .freq = 1488000000, - .refdiv = 1, - .fbdiv = 62, - .postdiv1 = 1, - .postdiv2 = 1, - .dsmpd = 1, - }, - { - .freq = 1464000000, - .refdiv = 1, - .fbdiv = 61, - .postdiv1 = 1, - .postdiv2 = 1, - .dsmpd = 1, - }, - { - .freq = 1440000000, - .refdiv = 1, - .fbdiv = 60, - .postdiv1 = 1, - .postdiv2 = 1, - .dsmpd = 1, - }, - { - .freq = 1416000000, - .refdiv = 1, - .fbdiv = 59, - .postdiv1 = 1, - .postdiv2 = 1, - .dsmpd = 1, - }, - { - .freq = 1392000000, - .refdiv = 1, - .fbdiv = 58, - .postdiv1 = 1, - .postdiv2 = 1, - .dsmpd = 1, - }, - { - .freq = 1368000000, - .refdiv = 1, - .fbdiv = 57, - .postdiv1 = 1, - .postdiv2 = 1, - .dsmpd = 1, - }, - { - .freq = 1344000000, - .refdiv = 1, - .fbdiv = 56, - .postdiv1 = 1, - .postdiv2 = 1, - .dsmpd = 1, - }, - { - .freq = 1320000000, - .refdiv = 1, - .fbdiv = 55, - .postdiv1 = 1, - .postdiv2 = 1, - .dsmpd = 1, - }, - { - .freq = 1296000000, - .refdiv = 1, - .fbdiv = 54, - .postdiv1 = 1, - .postdiv2 = 1, - .dsmpd = 1, - }, - { - .freq = 1272000000, - .refdiv = 1, - .fbdiv = 53, - .postdiv1 = 1, - .postdiv2 = 1, - .dsmpd = 1, - }, - { - .freq = 1248000000, - .refdiv = 1, - .fbdiv = 52, - .postdiv1 = 1, - .postdiv2 = 1, - .dsmpd = 1, - }, - { - .freq = 1200000000, - .refdiv = 1, - .fbdiv = 50, - .postdiv1 = 1, - .postdiv2 = 1, - .dsmpd = 1, - }, - { - .freq = 1188000000, - .refdiv = 2, - .fbdiv = 99, - .postdiv1 = 1, - .postdiv2 = 1, - .dsmpd = 1, - }, - { - .freq = 1104000000, - .refdiv = 1, - .fbdiv = 46, - .postdiv1 = 1, - .postdiv2 = 1, - .dsmpd = 1, - }, - { - .freq = 1100000000, - .refdiv = 12, - .fbdiv = 550, - .postdiv1 = 1, - .postdiv2 = 1, - .dsmpd = 1, - }, - { - .freq = 1008000000, - .refdiv = 1, - .fbdiv = 84, - .postdiv1 = 2, - .postdiv2 = 1, - .dsmpd = 1, - }, - { - .freq = 1000000000, - .refdiv = 1, - .fbdiv = 125, - .postdiv1 = 3, - .postdiv2 = 1, - .dsmpd = 1, - }, - { - .freq = 984000000, - .refdiv = 1, - .fbdiv = 82, - .postdiv1 = 2, - .postdiv2 = 1, - .dsmpd = 1, - }, - { - .freq = 960000000, - .refdiv = 1, - .fbdiv = 80, - .postdiv1 = 2, - .postdiv2 = 1, - .dsmpd = 1, - }, - { - .freq = 936000000, - .refdiv = 1, - .fbdiv = 78, - .postdiv1 = 2, - .postdiv2 = 1, - .dsmpd = 1, - }, - { - .freq = 912000000, - .refdiv = 1, - .fbdiv = 76, - .postdiv1 = 2, - .postdiv2 = 1, - .dsmpd = 1, - }, - { - .freq = 900000000, - .refdiv = 4, - .fbdiv = 300, - .postdiv1 = 2, - .postdiv2 = 1, - .dsmpd = 1, - }, - { - .freq = 888000000, - .refdiv = 1, - .fbdiv = 74, - .postdiv1 = 2, - .postdiv2 = 1, - .dsmpd = 1, - }, - { - .freq = 864000000, - .refdiv = 1, - .fbdiv = 72, - .postdiv1 = 2, - .postdiv2 = 1, - .dsmpd = 1, - }, - { - .freq = 840000000, - .refdiv = 1, - .fbdiv = 70, - .postdiv1 = 2, - .postdiv2 = 1, - .dsmpd = 1, - }, - { - .freq = 816000000, - .refdiv = 1, - .fbdiv = 68, - .postdiv1 = 2, - .postdiv2 = 1, - .dsmpd = 1, - }, - { - .freq = 800000000, - .refdiv = 1, - .fbdiv = 100, - .postdiv1 = 3, - .postdiv2 = 1, - .dsmpd = 1, - }, - { - .freq = 700000000, - .refdiv = 6, - .fbdiv = 350, - .postdiv1 = 2, - .postdiv2 = 1, - .dsmpd = 1, - }, - { - .freq = 696000000, - .refdiv = 1, - .fbdiv = 58, - .postdiv1 = 2, - .postdiv2 = 1, - .dsmpd = 1, - }, - { - .freq = 676000000, - .refdiv = 3, - .fbdiv = 169, - .postdiv1 = 2, - .postdiv2 = 1, - .dsmpd = 1, - }, - { - .freq = 600000000, - .refdiv = 1, - .fbdiv = 75, - .postdiv1 = 3, - .postdiv2 = 1, - .dsmpd = 1, - }, - { - .freq = 594000000, - .refdiv = 1, - .fbdiv = 99, - .postdiv1 = 4, - .postdiv2 = 1, - .dsmpd = 1, - }, - { - .freq = 533250000, - .refdiv = 8, - .fbdiv = 711, - .postdiv1 = 4, - .postdiv2 = 1, - .dsmpd = 1, - }, - { - .freq = 504000000, - .refdiv = 1, - .fbdiv = 63, - .postdiv1 = 3, - .postdiv2 = 1, - .dsmpd = 1, - }, - { - .freq = 500000000, - .refdiv = 6, - .fbdiv = 250, - .postdiv1 = 2, - .postdiv2 = 1, - .dsmpd = 1, - }, - { - .freq = 408000000, - .refdiv = 1, - .fbdiv = 68, - .postdiv1 = 2, - .postdiv2 = 2, - .dsmpd = 1, - }, - { - .freq = 312000000, - .refdiv = 1, - .fbdiv = 52, - .postdiv1 = 2, - .postdiv2 = 2, - .dsmpd = 1, - }, - { - .freq = 297000000, - .refdiv = 1, - .fbdiv = 99, - .postdiv1 = 4, - .postdiv2 = 2, - .dsmpd = 1, - }, - { - .freq = 216000000, - .refdiv = 1, - .fbdiv = 72, - .postdiv1 = 4, - .postdiv2 = 2, - .dsmpd = 1, - }, - { - .freq = 148500000, - .refdiv = 1, - .fbdiv = 99, - .postdiv1 = 4, - .postdiv2 = 4, - .dsmpd = 1, - }, - { - .freq = 106500000, - .refdiv = 1, - .fbdiv = 71, - .postdiv1 = 4, - .postdiv2 = 4, - .dsmpd = 1, - }, - { - .freq = 96000000, - .refdiv = 1, - .fbdiv = 64, - .postdiv1 = 4, - .postdiv2 = 4, - .dsmpd = 1, - }, - { - .freq = 74250000, - .refdiv = 2, - .fbdiv = 99, - .postdiv1 = 4, - .postdiv2 = 4, - .dsmpd = 1, - }, - { - .freq = 65000000, - .refdiv = 1, - .fbdiv = 65, - .postdiv1 = 6, - .postdiv2 = 4, - .dsmpd = 1, - }, *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@freebsd.org Wed Mar 4 21:04:59 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 6472B25141A; Wed, 4 Mar 2020 21:04:59 +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 48Xmbv0nZ1z3wfG; Wed, 4 Mar 2020 21:04:59 +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 164C124256; Wed, 4 Mar 2020 21:04:59 +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 024L4w3s023876; Wed, 4 Mar 2020 21:04:58 GMT (envelope-from manu@FreeBSD.org) Received: (from manu@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 024L4wKb023872; Wed, 4 Mar 2020 21:04:58 GMT (envelope-from manu@FreeBSD.org) Message-Id: <202003042104.024L4wKb023872@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: manu set sender to manu@FreeBSD.org using -f From: Emmanuel Vadot Date: Wed, 4 Mar 2020 21:04: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: r358645 - in stable/12/sys: arm64/rockchip arm64/rockchip/clk conf X-SVN-Group: stable-12 X-SVN-Commit-Author: manu X-SVN-Commit-Paths: in stable/12/sys: arm64/rockchip arm64/rockchip/clk conf X-SVN-Commit-Revision: 358645 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages 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, 04 Mar 2020 21:04:59 -0000 Author: manu Date: Wed Mar 4 21:04:57 2020 New Revision: 358645 URL: https://svnweb.freebsd.org/changeset/base/358645 Log: MFC r355173, r355190-r355191 r355173 by mmel: Add driver for temperature sensors found in RK32898, RK3328 and RK3399 SoC's. Reviewed by: manu Differential Revision: https://reviews.freebsd.org/D22442 r355190: arm64: rockchip: tsadc: Do not free the sysctl context is it wasn't created X-MFC-With: r355173 r355191: arm64: rockchip: rk3328: Add TSADC clocks Add the clocks so we can use the rk_tsadc driver to monitor the cpu temperature. Added: stable/12/sys/arm64/rockchip/rk_tsadc.c - copied, changed from r355173, head/sys/arm64/rockchip/rk_tsadc.c stable/12/sys/arm64/rockchip/rk_tsadc_if.m - copied unchanged from r355173, head/sys/arm64/rockchip/rk_tsadc_if.m Modified: stable/12/sys/arm64/rockchip/clk/rk3328_cru.c stable/12/sys/conf/files.arm64 Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/arm64/rockchip/clk/rk3328_cru.c ============================================================================== --- stable/12/sys/arm64/rockchip/clk/rk3328_cru.c Wed Mar 4 21:01:25 2020 (r358644) +++ stable/12/sys/arm64/rockchip/clk/rk3328_cru.c Wed Mar 4 21:04:57 2020 (r358645) @@ -61,6 +61,7 @@ __FBSDID("$FreeBSD$"); #define PCLK_I2C1 206 #define PCLK_I2C2 207 #define PCLK_I2C3 208 +#define PCLK_TSADC 213 #define HCLK_SDMMC 317 #define HCLK_SDIO 318 #define HCLK_EMMC 319 @@ -91,6 +92,8 @@ static struct rk_cru_gate rk3328_gates[] = { CRU_GATE(PCLK_I2C1, "pclk_i2c1", "pclk_bus", 0x23C, 0) CRU_GATE(PCLK_I2C2, "pclk_i2c2", "pclk_bus", 0x23C, 1) CRU_GATE(PCLK_I2C3, "pclk_i2c3", "pclk_bus", 0x23C, 2) + CRU_GATE(PCLK_TSADC, "pclk_tsadc", "pclk_bus", 0x23C, 14) + CRU_GATE(PCLK_GPIO0, "pclk_gpio0", "pclk_bus", 0x240, 7) CRU_GATE(PCLK_GPIO1, "pclk_gpio1", "pclk_bus", 0x240, 8) CRU_GATE(PCLK_GPIO2, "pclk_gpio2", "pclk_bus", 0x240, 9) @@ -731,6 +734,22 @@ static struct rk_clk_composite_def pclk_bus_pre = { .flags = RK_CLK_COMPOSITE_HAVE_GATE, }; +/* CRU_CLKSEL_CON22 */ + +#define SCLK_TSADC 36 + +static const char *clk_tsadc_parents[] = {"xin24m"}; +static struct rk_clk_composite_def clk_tsadc = { + .clkdef = { + .id = SCLK_TSADC, + .name = "clk_tsadc", + .parent_names = clk_tsadc_parents, + .parent_cnt = nitems(clk_tsadc_parents), + }, + .div_shift = 0, + .div_width = 9, +}; + /* CRU_CLKSEL_CON28 */ #define ACLK_PERI_PRE 137 @@ -1011,6 +1030,10 @@ static struct rk_clk rk3328_clks[] = { .clk.armclk = &armclk, }, + { + .type = RK_CLK_COMPOSITE, + .clk.composite = &clk_tsadc, + }, { .type = RK_CLK_COMPOSITE, .clk.composite = &aclk_peri_pre, Copied and modified: stable/12/sys/arm64/rockchip/rk_tsadc.c (from r355173, head/sys/arm64/rockchip/rk_tsadc.c) ============================================================================== --- head/sys/arm64/rockchip/rk_tsadc.c Thu Nov 28 17:01:31 2019 (r355173, copy source) +++ stable/12/sys/arm64/rockchip/rk_tsadc.c Wed Mar 4 21:04:57 2020 (r358645) @@ -728,16 +728,17 @@ tsadc_attach(device_t dev) rv = tsadc_init_sysctl(sc); if (rv != 0) { device_printf(sc->dev, "Cannot initialize sysctls\n"); - goto fail; + goto fail_sysctl; } OF_device_register_xref(OF_xref_from_node(node), dev); return (bus_generic_attach(dev)); +fail_sysctl: + sysctl_ctx_free(&tsadc_sysctl_ctx); fail: if (sc->irq_ih != NULL) bus_teardown_intr(dev, sc->irq_res, sc->irq_ih); - sysctl_ctx_free(&tsadc_sysctl_ctx); if (sc->tsadc_clk != NULL) clk_release(sc->tsadc_clk); if (sc->apb_pclk_clk != NULL) Copied: stable/12/sys/arm64/rockchip/rk_tsadc_if.m (from r355173, head/sys/arm64/rockchip/rk_tsadc_if.m) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/12/sys/arm64/rockchip/rk_tsadc_if.m Wed Mar 4 21:04:57 2020 (r358645, copy of r355173, head/sys/arm64/rockchip/rk_tsadc_if.m) @@ -0,0 +1,43 @@ +#- +# SPDX-License-Identifier: BSD-2-Clause-FreeBSD +# +# Copyright (c) 2019 Michal Meloun +# +# 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$ +# + +#include + +INTERFACE rk_tsadc; + + +/** + * Read temperature + */ +METHOD int get_temperature{ + device_t dev; + device_t consumer; + uintptr_t id; + int *val; +}; Modified: stable/12/sys/conf/files.arm64 ============================================================================== --- stable/12/sys/conf/files.arm64 Wed Mar 4 21:01:25 2020 (r358644) +++ stable/12/sys/conf/files.arm64 Wed Mar 4 21:04:57 2020 (r358645) @@ -289,6 +289,8 @@ arm64/rockchip/rk_spi.c optional fdt rk_spi arm64/rockchip/rk_usb2phy.c optional fdt rk_usb2phy soc_rockchip_rk3328 | soc_rockchip_rk3399 arm64/rockchip/rk_typec_phy.c optional fdt rk_typec_phy soc_rockchip_rk3399 arm64/rockchip/if_dwc_rk.c optional fdt dwc_rk soc_rockchip_rk3328 | fdt dwc_rk soc_rockchip_rk3399 +arm64/rockchip/rk_tsadc_if.m optional fdt soc_rockchip_rk3399 +arm64/rockchip/rk_tsadc.c optional fdt soc_rockchip_rk3399 dev/dwc/if_dwc.c optional fdt dwc_rk soc_rockchip_rk3328 | fdt dwc_rk soc_rockchip_rk3399 dev/dwc/if_dwc_if.m optional fdt dwc_rk soc_rockchip_rk3328 | fdt dwc_rk soc_rockchip_rk3399 From owner-svn-src-all@freebsd.org Wed Mar 4 21:06:30 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 17CD32514FC; Wed, 4 Mar 2020 21:06:30 +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 48Xmdd6yzsz3xJh; Wed, 4 Mar 2020 21:06:29 +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 D230E24266; Wed, 4 Mar 2020 21:06:29 +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 024L6Txm024146; Wed, 4 Mar 2020 21:06:29 GMT (envelope-from manu@FreeBSD.org) Received: (from manu@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 024L6TYQ024143; Wed, 4 Mar 2020 21:06:29 GMT (envelope-from manu@FreeBSD.org) Message-Id: <202003042106.024L6TYQ024143@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: manu set sender to manu@FreeBSD.org using -f From: Emmanuel Vadot Date: Wed, 4 Mar 2020 21:06:29 +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: r358646 - stable/12/sys/arm64/rockchip/clk X-SVN-Group: stable-12 X-SVN-Commit-Author: manu X-SVN-Commit-Paths: stable/12/sys/arm64/rockchip/clk X-SVN-Commit-Revision: 358646 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages 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, 04 Mar 2020 21:06:30 -0000 Author: manu Date: Wed Mar 4 21:06:29 2020 New Revision: 358646 URL: https://svnweb.freebsd.org/changeset/base/358646 Log: MFC r355356: arm64: rockchip: rl3399: Remove the ability to put the PLL in normal mode at boot RK3399 PLLs have three modes : - Normal, where they behave normally and their freq is calculated based on the registers values. - Slow, where the PLL freq is 24Mhz (well, the external oscillator). - Deep Slow, used for suspend where the freq is 32Khz. We used to put every CPU related PLL in normal mode but it can cause problem if the firmware didn't setup the clocks register correctly. And even if it did but left the pll in slow or deep slow mode that might be because the PMIC suppling voltage for the CPU haven't been configured yet and we cannot do that at this point. So remove the ability to set PLLs to normal mode at boot to avoid any problems. Modified: stable/12/sys/arm64/rockchip/clk/rk3399_cru.c stable/12/sys/arm64/rockchip/clk/rk_clk_pll.c stable/12/sys/arm64/rockchip/clk/rk_clk_pll.h Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/arm64/rockchip/clk/rk3399_cru.c ============================================================================== --- stable/12/sys/arm64/rockchip/clk/rk3399_cru.c Wed Mar 4 21:04:57 2020 (r358645) +++ stable/12/sys/arm64/rockchip/clk/rk3399_cru.c Wed Mar 4 21:06:29 2020 (r358646) @@ -692,7 +692,7 @@ static struct rk_clk_armclk_rates rk3399_cpu_b_rates[] /* Standard PLL. */ -#define PLL(_id, _name, _base, _nm) \ +#define PLL(_id, _name, _base) \ { \ .type = RK3399_CLK_PLL, \ .clk.pll = &(struct rk_clk_pll_def) { \ @@ -703,7 +703,6 @@ static struct rk_clk_armclk_rates rk3399_cpu_b_rates[] .clkdef.flags = CLK_NODE_STATIC_STRINGS, \ .base_offset = _base, \ .rates = rk3399_pll_rates, \ - .normal_mode = _nm \ }, \ } @@ -796,13 +795,13 @@ static struct rk_clk rk3399_clks[] = { FFACT(0, "clk_ddrc_div2", "clk_ddrc", 1, 2), /* PLLs */ - PLL(PLL_APLLL, "lpll", 0x00, false), - PLL(PLL_APLLB, "bpll", 0x20, true), - PLL(PLL_DPLL, "dpll", 0x40, false), - PLL(PLL_CPLL, "cpll", 0x60, false), - PLL(PLL_GPLL, "gpll", 0x80, false), - PLL(PLL_NPLL, "npll", 0xA0, false), - PLL(PLL_VPLL, "vpll", 0xC0, false), + PLL(PLL_APLLL, "lpll", 0x00), + PLL(PLL_APLLB, "bpll", 0x20), + PLL(PLL_DPLL, "dpll", 0x40), + PLL(PLL_CPLL, "cpll", 0x60), + PLL(PLL_GPLL, "gpll", 0x80), + PLL(PLL_NPLL, "npll", 0xA0), + PLL(PLL_VPLL, "vpll", 0xC0), /* CRU_CLKSEL_CON0 */ CDIV(0, "aclkm_core_l_c", "armclkl", 0, Modified: stable/12/sys/arm64/rockchip/clk/rk_clk_pll.c ============================================================================== --- stable/12/sys/arm64/rockchip/clk/rk_clk_pll.c Wed Mar 4 21:04:57 2020 (r358645) +++ stable/12/sys/arm64/rockchip/clk/rk_clk_pll.c Wed Mar 4 21:06:29 2020 (r358646) @@ -54,8 +54,6 @@ struct rk_clk_pll_sc { struct rk_clk_pll_rate *rates; struct rk_clk_pll_rate *frac_rates; - - bool normal_mode; }; #define WRITE4(_clk, off, val) \ @@ -346,18 +344,8 @@ static int rk3399_clk_pll_init(struct clknode *clk, device_t dev) { struct rk_clk_pll_sc *sc; - uint32_t reg; sc = clknode_get_softc(clk); - - if (sc->normal_mode) { - /* Setting to normal mode */ - reg = RK3399_CLK_PLL_MODE_NORMAL << RK3399_CLK_PLL_MODE_SHIFT; - reg |= RK3399_CLK_PLL_MODE_MASK << RK_CLK_PLL_MASK_SHIFT; - WRITE4(clk, sc->base_offset + RK3399_CLK_PLL_MODE_OFFSET, - reg | RK3399_CLK_PLL_WRITE_MASK); - } - clknode_init_parent_idx(clk, 0); return (0); @@ -549,7 +537,6 @@ rk3399_clk_pll_register(struct clkdom *clkdom, struct sc->flags = clkdef->flags; sc->rates = clkdef->rates; sc->frac_rates = clkdef->frac_rates; - sc->normal_mode = clkdef->normal_mode; clknode_register(clkdom, clk); Modified: stable/12/sys/arm64/rockchip/clk/rk_clk_pll.h ============================================================================== --- stable/12/sys/arm64/rockchip/clk/rk_clk_pll.h Wed Mar 4 21:04:57 2020 (r358645) +++ stable/12/sys/arm64/rockchip/clk/rk_clk_pll.h Wed Mar 4 21:06:29 2020 (r358646) @@ -57,8 +57,6 @@ struct rk_clk_pll_def { struct rk_clk_pll_rate *rates; struct rk_clk_pll_rate *frac_rates; - - bool normal_mode; }; #define RK_CLK_PLL_HAVE_GATE 0x1 From owner-svn-src-all@freebsd.org Wed Mar 4 21:12:09 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id C901B25190F; Wed, 4 Mar 2020 21:12:09 +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 48Xmm93dPTz4C5y; Wed, 4 Mar 2020 21:12:09 +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 5EE2F24425; Wed, 4 Mar 2020 21:12:09 +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 024LC9kA029930; Wed, 4 Mar 2020 21:12:09 GMT (envelope-from manu@FreeBSD.org) Received: (from manu@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 024LC8sn029928; Wed, 4 Mar 2020 21:12:08 GMT (envelope-from manu@FreeBSD.org) Message-Id: <202003042112.024LC8sn029928@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: manu set sender to manu@FreeBSD.org using -f From: Emmanuel Vadot Date: Wed, 4 Mar 2020 21:12:08 +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: r358647 - in stable/12/sys/arm64/rockchip: . clk X-SVN-Group: stable-12 X-SVN-Commit-Author: manu X-SVN-Commit-Paths: in stable/12/sys/arm64/rockchip: . clk X-SVN-Commit-Revision: 358647 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages 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, 04 Mar 2020 21:12:09 -0000 Author: manu Date: Wed Mar 4 21:12:08 2020 New Revision: 358647 URL: https://svnweb.freebsd.org/changeset/base/358647 Log: MFC r355624, r355852-r355853 r355624: arm64: rk3328: Add the *clk_peri_niu clocks Those clocks are always enable by default and are not really explained in the TRM but the reason we had them is that they have the periph clock as a parent and those parent should never be disable which can happen if we disable all the childs. The current childs are the sd/emmc/sdio clocks so the board will hang if we disable them. r355852: arm64: rockchip: rk_pinctrl: Fix clear bits in SYSCON_MODIFY r351187 change the SYSCON_WRITE to SYSCON_MODIFY but didn't changed the mask variable that used to hold the bitmask in the upper 16 bits of the register that control which bits are changed. So we ended up clearing bit from the upper 16bits half which are always 0 after a read. Use the correct bit mask for bits that we want to clear. r355853: arm64: rockchip: rk_gpio: Fix pin number The maxpin counter starts at 0, fix one by one error. This is still not totally correct for some banks in some SoC that have fewer pins but this will be dealt with in another commit. Modified: stable/12/sys/arm64/rockchip/clk/rk3328_cru.c stable/12/sys/arm64/rockchip/rk_gpio.c stable/12/sys/arm64/rockchip/rk_pinctrl.c Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/arm64/rockchip/clk/rk3328_cru.c ============================================================================== --- stable/12/sys/arm64/rockchip/clk/rk3328_cru.c Wed Mar 4 21:06:29 2020 (r358646) +++ stable/12/sys/arm64/rockchip/clk/rk3328_cru.c Wed Mar 4 21:12:08 2020 (r358647) @@ -103,6 +103,8 @@ static struct rk_cru_gate rk3328_gates[] = { CRU_GATE(HCLK_SDMMC, "hclk_sdmmc", "hclk_peri", 0x24C, 0) CRU_GATE(HCLK_SDIO, "hclk_sdio", "hclk_peri", 0x24C, 1) CRU_GATE(HCLK_EMMC, "hclk_emmc", "hclk_peri", 0x24C, 2) + CRU_GATE(0, "hclk_peri_niu", "hclk_peri", 0x24C, 12) + CRU_GATE(0, "pclk_peri_niu", "hclk_peri", 0x24C, 13) CRU_GATE(HCLK_SDMMC_EXT, "hclk_sdmmc_ext", "hclk_peri", 0x24C, 15) }; Modified: stable/12/sys/arm64/rockchip/rk_gpio.c ============================================================================== --- stable/12/sys/arm64/rockchip/rk_gpio.c Wed Mar 4 21:06:29 2020 (r358646) +++ stable/12/sys/arm64/rockchip/rk_gpio.c Wed Mar 4 21:12:08 2020 (r358647) @@ -196,7 +196,7 @@ rk_gpio_pin_max(device_t dev, int *maxpin) { /* Each bank have always 32 pins */ - *maxpin = 32; + *maxpin = 31; return (0); } Modified: stable/12/sys/arm64/rockchip/rk_pinctrl.c ============================================================================== --- stable/12/sys/arm64/rockchip/rk_pinctrl.c Wed Mar 4 21:06:29 2020 (r358646) +++ stable/12/sys/arm64/rockchip/rk_pinctrl.c Wed Mar 4 21:12:08 2020 (r358647) @@ -883,7 +883,7 @@ rk_pinctrl_configure_pin(struct rk_pinctrl_softc *sc, reg += bank * 0x10 + ((pin / 8) * 0x4); bit = (pin % 8) * 2; - mask = (0x3 << bit) << 16; + mask = (0x3 << bit); SYSCON_MODIFY_4(syscon, reg, mask, bias << bit | (mask << 16)); } @@ -891,7 +891,7 @@ rk_pinctrl_configure_pin(struct rk_pinctrl_softc *sc, rv = rk_pinctrl_parse_drive(sc, pin_conf, bank, subbank, &drive, ®); if (rv == 0) { bit = (pin % 8) * 2; - mask = (0x3 << bit) << 16; + mask = (0x3 << bit); SYSCON_MODIFY_4(syscon, reg, mask, drive << bit | (mask << 16)); } From owner-svn-src-all@freebsd.org Wed Mar 4 21:16:15 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id A91C7251B32 for ; Wed, 4 Mar 2020 21:16:15 +0000 (UTC) (envelope-from erj@erj.cc) Received: from mail-lf1-x12a.google.com (mail-lf1-x12a.google.com [IPv6:2a00:1450:4864:20::12a]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1O1" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 48Xmrs2Mp0z4NH1 for ; Wed, 4 Mar 2020 21:16:13 +0000 (UTC) (envelope-from erj@erj.cc) Received: by mail-lf1-x12a.google.com with SMTP id v6so2698237lfo.13 for ; Wed, 04 Mar 2020 13:16:13 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=erj.cc; s=ericroxx; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=+t20QXt4GMxgdz6YkBuYHay4Tw5sqwCXfrblnHKKy8U=; b=h/fOPh96W0tT6d99OGLrhk7qa0x57t6pTzkW/Mtirapj78cpWVj1kbrELJh3y2cMWe Yypf4RBVqngEEX+uBjGCu0jEr8uGenwlx9g/OKituPaSmAIajMwGk+bE0zTz2MawV3qk qIMLW9IalMsifN8P0acYmnhwau+q6sQzVCNuQ= 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=+t20QXt4GMxgdz6YkBuYHay4Tw5sqwCXfrblnHKKy8U=; b=Hd1NRUmOpaTb+3XSMqv2ElZUOmHbHYg3eUJ9rqB1EI+kZ5EvPc9cDoYBMBxRqA7Izn i9sb1OpSpxpSW0jnoqPj82FhM6GOE6X80vQzQYKwPfQRv6D68BpcThfrPRM1wb7EGmLW YIY/pGTxj30OUCpHGJUdLAd1uc4V3/cgyFBWNjy1NmI8qlgaEaoDRSmDSdQgZQUhvfej vgh/o+0Dq52OD+l3cihd/0rOo02bap7pdoqOamnivR35tl2tsiys9yTMAAzrPXEalwxw XXd5XI+bs290vCLM0o+06G+dIICkw1tgx3wYznvzz2HWdNAy6wlEUcbb9RnQmXEX9EGu 4HoA== X-Gm-Message-State: ANhLgQ08mdcrFo0KkScDqnvhfKCzMgDaPew3BmAOXTOe5zbVK8nqs1O6 tRC4Ab8WIanS09IvyuQEBs3eWV0ZzOHM6wpvvtkO8o3N X-Google-Smtp-Source: ADFU+vsgj/q2j8NUe/BZgHVgIUgeyjp+quIWcKNpaMpPGtNCn3r1FjyX24HvQuomomhFGw5Ust4cnJFslBj1detiN04= X-Received: by 2002:a05:6512:304c:: with SMTP id b12mr3112980lfb.196.1583356571132; Wed, 04 Mar 2020 13:16:11 -0800 (PST) MIME-Version: 1.0 References: <202002281605.01SG5Iox077824@repo.freebsd.org> In-Reply-To: <202002281605.01SG5Iox077824@repo.freebsd.org> From: Eric Joyner Date: Wed, 4 Mar 2020 13:15:59 -0800 Message-ID: Subject: Re: svn commit: r358432 - in head/sys: kern sys vm To: Mark Johnston Cc: src-committers , svn-src-all , svn-src-head X-Rspamd-Queue-Id: 48Xmrs2Mp0z4NH1 X-Spamd-Bar: ----- Authentication-Results: mx1.freebsd.org; dkim=pass header.d=erj.cc header.s=ericroxx header.b=h/fOPh96; dmarc=none; spf=pass (mx1.freebsd.org: domain of erj@erj.cc designates 2a00:1450:4864:20::12a as permitted sender) smtp.mailfrom=erj@erj.cc X-Spamd-Result: default: False [-5.19 / 15.00]; ARC_NA(0.00)[]; NEURAL_HAM_MEDIUM(-1.00)[-1.000,0]; R_DKIM_ALLOW(-0.20)[erj.cc:s=ericroxx]; FROM_HAS_DN(0.00)[]; RCPT_COUNT_THREE(0.00)[4]; R_SPF_ALLOW(-0.20)[+ip6:2a00:1450:4000::/36]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; MIME_GOOD(-0.10)[multipart/alternative,text/plain]; PREVIOUSLY_DELIVERED(0.00)[svn-src-all@freebsd.org]; DMARC_NA(0.00)[erj.cc]; TO_MATCH_ENVRCPT_SOME(0.00)[]; TO_DN_ALL(0.00)[]; DKIM_TRACE(0.00)[erj.cc:+]; RCVD_IN_DNSWL_NONE(0.00)[a.2.1.0.0.0.0.0.0.0.0.0.0.0.0.0.0.2.0.0.4.6.8.4.0.5.4.1.0.0.a.2.list.dnswl.org : 127.0.5.0]; FROM_EQ_ENVFROM(0.00)[]; MIME_TRACE(0.00)[0:+,1:+,2:~]; IP_SCORE(-2.69)[ip: (-9.34), ipnet: 2a00:1450::/32(-2.40), asn: 15169(-1.66), country: US(-0.05)]; ASN(0.00)[asn:15169, ipnet:2a00:1450::/32, country:US]; RCVD_COUNT_TWO(0.00)[2]; RCVD_TLS_ALL(0.00)[] 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: Wed, 04 Mar 2020 21:16:15 -0000 Hi Mark, Is the addition of #include in sys/sys/refcount.h actually necessary? I don't see anything in there used in refcount.h, and the kernel appears to compile without it, at least on amd64. - Eric On Fri, Feb 28, 2020 at 8:05 AM Mark Johnston wrote: > Author: markj > Date: Fri Feb 28 16:05:18 2020 > New Revision: 358432 > URL: https://svnweb.freebsd.org/changeset/base/358432 > > Log: > Add a blocking counter KPI. > > refcount(9) was recently extended to support waiting on a refcount to > drop to zero, as this was needed for a lockless VM object > paging-in-progress counter. However, this adds overhead to all uses of > refcount(9) and doesn't really match traditional refcounting semantics: > once a counter has dropped to zero, the protected object may be freed at > any point and it is not safe to dereference the counter. > > This change removes that extension and instead adds a new set of KPIs, > blockcount_*, for use by VM object PIP and busy. > > Reviewed by: jeff, kib, mjg > Tested by: pho > Sponsored by: The FreeBSD Foundation > Differential Revision: https://reviews.freebsd.org/D23723 > > Added: > head/sys/sys/_blockcount.h (contents, props changed) > head/sys/sys/blockcount.h (contents, props changed) > Modified: > head/sys/kern/kern_synch.c > head/sys/kern/vfs_bio.c > head/sys/sys/refcount.h > head/sys/vm/vm_fault.c > head/sys/vm/vm_object.c > head/sys/vm/vm_object.h > head/sys/vm/vm_pager.h > head/sys/vm/vm_swapout.c > > Modified: head/sys/kern/kern_synch.c > > ============================================================================== > --- head/sys/kern/kern_synch.c Fri Feb 28 15:59:35 2020 (r358431) > +++ head/sys/kern/kern_synch.c Fri Feb 28 16:05:18 2020 (r358432) > @@ -44,6 +44,7 @@ __FBSDID("$FreeBSD$"); > > #include > #include > +#include > #include > #include > #include > @@ -52,7 +53,6 @@ __FBSDID("$FreeBSD$"); > #include > #include > #include > -#include > #include > #include > #include > @@ -337,81 +337,6 @@ pause_sbt(const char *wmesg, sbintime_t sbt, sbintime_ > } > > /* > - * Potentially release the last reference for refcount. Check for > - * unlikely conditions and signal the caller as to whether it was > - * the final ref. > - */ > -bool > -refcount_release_last(volatile u_int *count, u_int n, u_int old) > -{ > - u_int waiter; > - > - waiter = old & REFCOUNT_WAITER; > - old = REFCOUNT_COUNT(old); > - if (__predict_false(n > old || REFCOUNT_SATURATED(old))) { > - /* > - * Avoid multiple destructor invocations if underflow > occurred. > - * This is not perfect since the memory backing the > containing > - * object may already have been reallocated. > - */ > - _refcount_update_saturated(count); > - return (false); > - } > - > - /* > - * Attempt to atomically clear the waiter bit. Wakeup waiters > - * if we are successful. > - */ > - if (waiter != 0 && atomic_cmpset_int(count, REFCOUNT_WAITER, 0)) > - wakeup(__DEVOLATILE(u_int *, count)); > - > - /* > - * Last reference. Signal the user to call the destructor. > - * > - * Ensure that the destructor sees all updates. This synchronizes > - * with release fences from all routines which drop the count. > - */ > - atomic_thread_fence_acq(); > - return (true); > -} > - > -/* > - * Wait for a refcount wakeup. This does not guarantee that the ref is > still > - * zero on return and may be subject to transient wakeups. Callers > wanting > - * a precise answer should use refcount_wait(). > - */ > -void > -_refcount_sleep(volatile u_int *count, struct lock_object *lock, > - const char *wmesg, int pri) > -{ > - void *wchan; > - u_int old; > - > - if (REFCOUNT_COUNT(*count) == 0) { > - if (lock != NULL) > - LOCK_CLASS(lock)->lc_unlock(lock); > - return; > - } > - wchan = __DEVOLATILE(void *, count); > - sleepq_lock(wchan); > - if (lock != NULL) > - LOCK_CLASS(lock)->lc_unlock(lock); > - old = *count; > - for (;;) { > - if (REFCOUNT_COUNT(old) == 0) { > - sleepq_release(wchan); > - return; > - } > - if (old & REFCOUNT_WAITER) > - break; > - if (atomic_fcmpset_int(count, &old, old | REFCOUNT_WAITER)) > - break; > - } > - sleepq_add(wchan, NULL, wmesg, 0, 0); > - sleepq_wait(wchan, pri); > -} > - > -/* > * Make all threads sleeping on the specified identifier runnable. > */ > void > @@ -457,6 +382,82 @@ wakeup_any(const void *ident) > sleepq_release(ident); > if (wakeup_swapper) > kick_proc0(); > +} > + > +/* > + * Signal sleeping waiters after the counter has reached zero. > + */ > +void > +_blockcount_wakeup(blockcount_t *bc, u_int old) > +{ > + > + KASSERT(_BLOCKCOUNT_WAITERS(old), > + ("%s: no waiters on %p", __func__, bc)); > + > + if (atomic_cmpset_int(&bc->__count, _BLOCKCOUNT_WAITERS_FLAG, 0)) > + wakeup(bc); > +} > + > +/* > + * Wait for a wakeup. This does not guarantee that the count is still > zero on > + * return and may be subject to transient wakeups. Callers wanting a > precise > + * answer should use blockcount_wait() with an interlock. > + * > + * Return 0 if there is no work to wait for, and 1 if we slept waiting > for work > + * to complete. In the latter case the counter value must be re-read. > + */ > +int > +_blockcount_sleep(blockcount_t *bc, struct lock_object *lock, const char > *wmesg, > + int prio) > +{ > + void *wchan; > + uintptr_t lock_state; > + u_int old; > + int ret; > + > + KASSERT(lock != &Giant.lock_object, > + ("%s: cannot use Giant as the interlock", __func__)); > + > + /* > + * Synchronize with the fence in blockcount_release(). If we end > up > + * waiting, the sleepqueue lock acquisition will provide the > required > + * side effects. > + * > + * If there is no work to wait for, but waiters are present, try > to put > + * ourselves to sleep to avoid jumping ahead. > + */ > + if (atomic_load_acq_int(&bc->__count) == 0) { > + if (lock != NULL && (prio & PDROP) != 0) > + LOCK_CLASS(lock)->lc_unlock(lock); > + return (0); > + } > + lock_state = 0; > + wchan = bc; > + sleepq_lock(wchan); > + DROP_GIANT(); > + if (lock != NULL) > + lock_state = LOCK_CLASS(lock)->lc_unlock(lock); > + old = blockcount_read(bc); > + do { > + if (_BLOCKCOUNT_COUNT(old) == 0) { > + sleepq_release(wchan); > + ret = 0; > + goto out; > + } > + if (_BLOCKCOUNT_WAITERS(old)) > + break; > + } while (!atomic_fcmpset_int(&bc->__count, &old, > + old | _BLOCKCOUNT_WAITERS_FLAG)); > + sleepq_add(wchan, NULL, wmesg, 0, 0); > + sleepq_wait(wchan, prio); > + ret = 1; > + > +out: > + PICKUP_GIANT(); > + if (lock != NULL && (prio & PDROP) == 0) > + LOCK_CLASS(lock)->lc_lock(lock, lock_state); > + > + return (ret); > } > > static void > > Modified: head/sys/kern/vfs_bio.c > > ============================================================================== > --- head/sys/kern/vfs_bio.c Fri Feb 28 15:59:35 2020 (r358431) > +++ head/sys/kern/vfs_bio.c Fri Feb 28 16:05:18 2020 (r358432) > @@ -2854,9 +2854,9 @@ vfs_vmio_iodone(struct buf *bp) > bool bogus; > > obj = bp->b_bufobj->bo_object; > - KASSERT(REFCOUNT_COUNT(obj->paging_in_progress) >= bp->b_npages, > + KASSERT(blockcount_read(&obj->paging_in_progress) >= bp->b_npages, > ("vfs_vmio_iodone: paging in progress(%d) < b_npages(%d)", > - REFCOUNT_COUNT(obj->paging_in_progress), bp->b_npages)); > + blockcount_read(&obj->paging_in_progress), bp->b_npages)); > > vp = bp->b_vp; > VNPASS(vp->v_holdcnt > 0, vp); > > Added: head/sys/sys/_blockcount.h > > ============================================================================== > --- /dev/null 00:00:00 1970 (empty, because file is newly added) > +++ head/sys/sys/_blockcount.h Fri Feb 28 16:05:18 2020 (r358432) > @@ -0,0 +1,52 @@ > +/*- > + * SPDX-License-Identifier: BSD-2-Clause-FreeBSD > + * > + * Copyright (c) 2020 The FreeBSD Foundation > + * > + * This software was developed by Mark Johnston 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: > + * 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$ > + */ > + > +#ifndef __SYS__BLOCKCOUNT_H__ > +#define __SYS__BLOCKCOUNT_H__ > + > +#include > + > +typedef struct _blockcount { > + unsigned int __count; > +} blockcount_t; > + > +#define _BLOCKCOUNT_WAITERS_FLAG (1U << 31) > +#define _BLOCKCOUNT_COUNT(c) ((c) & > ~_BLOCKCOUNT_WAITERS_FLAG) > +#define _BLOCKCOUNT_WAITERS(c) (((c) & > _BLOCKCOUNT_WAITERS_FLAG) != 0) > + > +static inline unsigned int > +blockcount_read(blockcount_t *count) > +{ > + return (_BLOCKCOUNT_COUNT(atomic_load_int(&count->__count))); > +} > + > +#endif /* !__SYS__BLOCKCOUNT_H__ */ > > Added: head/sys/sys/blockcount.h > > ============================================================================== > --- /dev/null 00:00:00 1970 (empty, because file is newly added) > +++ head/sys/sys/blockcount.h Fri Feb 28 16:05:18 2020 (r358432) > @@ -0,0 +1,95 @@ > +/*- > + * SPDX-License-Identifier: BSD-2-Clause-FreeBSD > + * > + * Copyright (c) 2005 John Baldwin > + * Copyright (c) 2020 The FreeBSD Foundation > + * > + * Portions of this software were developed by Mark Johnston 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: > + * 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$ > + */ > + > +#ifndef __SYS_BLOCKCOUNT_H__ > +#define __SYS_BLOCKCOUNT_H__ > + > +#ifdef _KERNEL > + > +#include > +#include > + > +struct lock_object; > + > +int _blockcount_sleep(blockcount_t *bc, struct lock_object *, const char > *wmesg, > + int prio); > +void _blockcount_wakeup(blockcount_t *bc, u_int old); > + > +static __inline void > +blockcount_init(blockcount_t *bc) > +{ > + atomic_store_int(&bc->__count, 0); > +} > + > +static __inline void > +blockcount_acquire(blockcount_t *bc, u_int n) > +{ > +#ifdef INVARIANTS > + u_int old; > + > + old = atomic_fetchadd_int(&bc->__count, n); > + KASSERT(old + n > old, ("%s: counter overflow %p", __func__, bc)); > +#else > + atomic_add_int(&bc->__count, n); > +#endif > +} > + > +static __inline void > +blockcount_release(blockcount_t *bc, u_int n) > +{ > + u_int old; > + > + atomic_thread_fence_rel(); > + old = atomic_fetchadd_int(&bc->__count, -n); > + KASSERT(old >= n, ("%s: counter underflow %p", __func__, bc)); > + if (_BLOCKCOUNT_COUNT(old) == n && _BLOCKCOUNT_WAITERS(old)) > + _blockcount_wakeup(bc, old); > +} > + > +static __inline void > +_blockcount_wait(blockcount_t *bc, struct lock_object *lo, const char > *wmesg, > + int prio) > +{ > + KASSERT((prio & PDROP) == 0, ("%s: invalid prio %x", __func__, > prio)); > + > + while (_blockcount_sleep(bc, lo, wmesg, prio) != 0) > + ; > +} > + > +#define blockcount_sleep(bc, lo, wmesg, prio) \ > + _blockcount_sleep((bc), (struct lock_object *)(lo), (wmesg), > (prio)) > +#define blockcount_wait(bc, lo, wmesg, prio) \ > + _blockcount_wait((bc), (struct lock_object *)(lo), (wmesg), (prio)) > + > +#endif /* _KERNEL */ > +#endif /* !__SYS_BLOCKCOUNT_H__ */ > > Modified: head/sys/sys/refcount.h > > ============================================================================== > --- head/sys/sys/refcount.h Fri Feb 28 15:59:35 2020 (r358431) > +++ head/sys/sys/refcount.h Fri Feb 28 16:05:18 2020 (r358432) > @@ -34,19 +34,15 @@ > > #ifdef _KERNEL > #include > +#include > #else > #include > #define KASSERT(exp, msg) /* */ > #endif > > -#define REFCOUNT_WAITER (1U << 31) /* Refcount has > waiter. */ > -#define REFCOUNT_SATURATION_VALUE (3U << 29) > +#define REFCOUNT_SATURATED(val) (((val) & (1U << 31)) != 0) > +#define REFCOUNT_SATURATION_VALUE (3U << 30) > > -#define REFCOUNT_SATURATED(val) (((val) & (1U << 30)) != 0) > -#define REFCOUNT_COUNT(x) ((x) & ~REFCOUNT_WAITER) > - > -bool refcount_release_last(volatile u_int *count, u_int n, u_int old); > - > /* > * Attempt to handle reference count overflow and underflow. Force the > counter > * to stay at the saturation value so that a counter overflow cannot > trigger > @@ -111,56 +107,6 @@ refcount_acquire_checked(volatile u_int *count) > } > } > > -static __inline bool > -refcount_releasen(volatile u_int *count, u_int n) > -{ > - u_int old; > - > - KASSERT(n < REFCOUNT_SATURATION_VALUE / 2, > - ("refcount_releasen: n=%u too large", n)); > - > - /* > - * Paired with acquire fence in refcount_release_last. > - */ > - atomic_thread_fence_rel(); > - old = atomic_fetchadd_int(count, -n); > - if (__predict_false(n >= REFCOUNT_COUNT(old) || > - REFCOUNT_SATURATED(old))) > - return (refcount_release_last(count, n, old)); > - return (false); > -} > - > -static __inline bool > -refcount_release(volatile u_int *count) > -{ > - > - return (refcount_releasen(count, 1)); > -} > - > -#ifdef _KERNEL > -struct lock_object; > -void _refcount_sleep(volatile u_int *count, struct lock_object *, > - const char *wmesg, int prio); > - > -static __inline void > -refcount_sleep(volatile u_int *count, const char *wmesg, int prio) > -{ > - > - _refcount_sleep(count, NULL, wmesg, prio); > -} > - > -#define refcount_sleep_interlock(count, lock, wmesg, prio) > \ > - _refcount_sleep((count), (struct lock_object *)(lock), (wmesg), > (prio)) > - > -static __inline void > -refcount_wait(volatile u_int *count, const char *wmesg, int prio) > -{ > - > - while (*count != 0) > - refcount_sleep(count, wmesg, prio); > -} > -#endif > - > /* > * This functions returns non-zero if the refcount was > * incremented. Else zero is returned. > @@ -172,7 +118,7 @@ refcount_acquire_if_gt(volatile u_int *count, u_int n) > > old = *count; > for (;;) { > - if (REFCOUNT_COUNT(old) <= n) > + if (old <= n) > return (false); > if (__predict_false(REFCOUNT_SATURATED(old))) > return (true); > @@ -185,9 +131,43 @@ static __inline __result_use_check bool > refcount_acquire_if_not_zero(volatile u_int *count) > { > > - return refcount_acquire_if_gt(count, 0); > + return (refcount_acquire_if_gt(count, 0)); > } > > +static __inline bool > +refcount_releasen(volatile u_int *count, u_int n) > +{ > + u_int old; > + > + KASSERT(n < REFCOUNT_SATURATION_VALUE / 2, > + ("refcount_releasen: n=%u too large", n)); > + > + atomic_thread_fence_rel(); > + old = atomic_fetchadd_int(count, -n); > + if (__predict_false(old < n || REFCOUNT_SATURATED(old))) { > + _refcount_update_saturated(count); > + return (false); > + } > + if (old > n) > + return (false); > + > + /* > + * Last reference. Signal the user to call the destructor. > + * > + * Ensure that the destructor sees all updates. This synchronizes > with > + * release fences from all routines which drop the count. > + */ > + atomic_thread_fence_acq(); > + return (true); > +} > + > +static __inline bool > +refcount_release(volatile u_int *count) > +{ > + > + return (refcount_releasen(count, 1)); > +} > + > static __inline __result_use_check bool > refcount_release_if_gt(volatile u_int *count, u_int n) > { > @@ -197,12 +177,12 @@ refcount_release_if_gt(volatile u_int *count, u_int > n) > ("refcount_release_if_gt: Use refcount_release for final > ref")); > old = *count; > for (;;) { > - if (REFCOUNT_COUNT(old) <= n) > + if (old <= n) > return (false); > if (__predict_false(REFCOUNT_SATURATED(old))) > return (true); > /* > - * Paired with acquire fence in refcount_release_last. > + * Paired with acquire fence in refcount_releasen(). > */ > if (atomic_fcmpset_rel_int(count, &old, old - 1)) > return (true); > @@ -213,6 +193,7 @@ static __inline __result_use_check bool > refcount_release_if_not_last(volatile u_int *count) > { > > - return refcount_release_if_gt(count, 1); > + return (refcount_release_if_gt(count, 1)); > } > -#endif /* ! __SYS_REFCOUNT_H__ */ > + > +#endif /* !__SYS_REFCOUNT_H__ */ > > Modified: head/sys/vm/vm_fault.c > > ============================================================================== > --- head/sys/vm/vm_fault.c Fri Feb 28 15:59:35 2020 (r358431) > +++ head/sys/vm/vm_fault.c Fri Feb 28 16:05:18 2020 (r358432) > @@ -377,7 +377,7 @@ vm_fault_restore_map_lock(struct faultstate *fs) > { > > VM_OBJECT_ASSERT_WLOCKED(fs->first_object); > - MPASS(REFCOUNT_COUNT(fs->first_object->paging_in_progress) > 0); > + MPASS(blockcount_read(&fs->first_object->paging_in_progress) > 0); > > if (!vm_map_trylock_read(fs->map)) { > VM_OBJECT_WUNLOCK(fs->first_object); > @@ -428,7 +428,7 @@ vm_fault_populate(struct faultstate *fs) > > MPASS(fs->object == fs->first_object); > VM_OBJECT_ASSERT_WLOCKED(fs->first_object); > - MPASS(REFCOUNT_COUNT(fs->first_object->paging_in_progress) > 0); > + MPASS(blockcount_read(&fs->first_object->paging_in_progress) > 0); > MPASS(fs->first_object->backing_object == NULL); > MPASS(fs->lookup_still_valid); > > > Modified: head/sys/vm/vm_object.c > > ============================================================================== > --- head/sys/vm/vm_object.c Fri Feb 28 15:59:35 2020 (r358431) > +++ head/sys/vm/vm_object.c Fri Feb 28 16:05:18 2020 (r358432) > @@ -71,6 +71,7 @@ __FBSDID("$FreeBSD$"); > > #include > #include > +#include > #include > #include > #include > @@ -201,12 +202,11 @@ vm_object_zdtor(void *mem, int size, void *arg) > ("object %p has reservations", > object)); > #endif > - KASSERT(REFCOUNT_COUNT(object->paging_in_progress) == 0, > + KASSERT(blockcount_read(&object->paging_in_progress) == 0, > ("object %p paging_in_progress = %d", > - object, REFCOUNT_COUNT(object->paging_in_progress))); > - KASSERT(object->busy == 0, > - ("object %p busy = %d", > - object, object->busy)); > + object, blockcount_read(&object->paging_in_progress))); > + KASSERT(!vm_object_busied(object), > + ("object %p busy = %d", object, > blockcount_read(&object->busy))); > KASSERT(object->resident_page_count == 0, > ("object %p resident_page_count = %d", > object, object->resident_page_count)); > @@ -231,8 +231,8 @@ vm_object_zinit(void *mem, int size, int flags) > object->type = OBJT_DEAD; > vm_radix_init(&object->rtree); > refcount_init(&object->ref_count, 0); > - refcount_init(&object->paging_in_progress, 0); > - refcount_init(&object->busy, 0); > + blockcount_init(&object->paging_in_progress); > + blockcount_init(&object->busy); > object->resident_page_count = 0; > object->shadow_count = 0; > object->flags = OBJ_DEAD; > @@ -363,34 +363,36 @@ void > vm_object_pip_add(vm_object_t object, short i) > { > > - refcount_acquiren(&object->paging_in_progress, i); > + if (i > 0) > + blockcount_acquire(&object->paging_in_progress, i); > } > > void > vm_object_pip_wakeup(vm_object_t object) > { > > - refcount_release(&object->paging_in_progress); > + vm_object_pip_wakeupn(object, 1); > } > > void > vm_object_pip_wakeupn(vm_object_t object, short i) > { > > - refcount_releasen(&object->paging_in_progress, i); > + if (i > 0) > + blockcount_release(&object->paging_in_progress, i); > } > > /* > - * Atomically drop the interlock and wait for pip to drain. This protects > - * from sleep/wakeup races due to identity changes. The lock is not > - * re-acquired on return. > + * Atomically drop the object lock and wait for pip to drain. This > protects > + * from sleep/wakeup races due to identity changes. The lock is not > re-acquired > + * on return. > */ > static void > vm_object_pip_sleep(vm_object_t object, const char *waitid) > { > > - refcount_sleep_interlock(&object->paging_in_progress, > - &object->lock, waitid, PVM); > + (void)blockcount_sleep(&object->paging_in_progress, &object->lock, > + waitid, PVM | PDROP); > } > > void > @@ -399,10 +401,8 @@ vm_object_pip_wait(vm_object_t object, const char *wai > > VM_OBJECT_ASSERT_WLOCKED(object); > > - while (REFCOUNT_COUNT(object->paging_in_progress) > 0) { > - vm_object_pip_sleep(object, waitid); > - VM_OBJECT_WLOCK(object); > - } > + blockcount_wait(&object->paging_in_progress, &object->lock, waitid, > + PVM); > } > > void > @@ -411,8 +411,7 @@ vm_object_pip_wait_unlocked(vm_object_t object, const > > VM_OBJECT_ASSERT_UNLOCKED(object); > > - while (REFCOUNT_COUNT(object->paging_in_progress) > 0) > - refcount_wait(&object->paging_in_progress, waitid, PVM); > + blockcount_wait(&object->paging_in_progress, NULL, waitid, PVM); > } > > /* > @@ -955,7 +954,7 @@ vm_object_terminate(vm_object_t object) > */ > vm_object_pip_wait(object, "objtrm"); > > - KASSERT(!REFCOUNT_COUNT(object->paging_in_progress), > + KASSERT(!blockcount_read(&object->paging_in_progress), > ("vm_object_terminate: pageout in progress")); > > KASSERT(object->ref_count == 0, > @@ -2458,7 +2457,7 @@ vm_object_busy(vm_object_t obj) > > VM_OBJECT_ASSERT_LOCKED(obj); > > - refcount_acquire(&obj->busy); > + blockcount_acquire(&obj->busy, 1); > /* The fence is required to order loads of page busy. */ > atomic_thread_fence_acq_rel(); > } > @@ -2467,8 +2466,7 @@ void > vm_object_unbusy(vm_object_t obj) > { > > - > - refcount_release(&obj->busy); > + blockcount_release(&obj->busy, 1); > } > > void > @@ -2477,8 +2475,7 @@ vm_object_busy_wait(vm_object_t obj, const char > *wmesg > > VM_OBJECT_ASSERT_UNLOCKED(obj); > > - if (obj->busy) > - refcount_sleep(&obj->busy, wmesg, PVM); > + (void)blockcount_sleep(&obj->busy, NULL, wmesg, PVM); > } > > /* > > Modified: head/sys/vm/vm_object.h > > ============================================================================== > --- head/sys/vm/vm_object.h Fri Feb 28 15:59:35 2020 (r358431) > +++ head/sys/vm/vm_object.h Fri Feb 28 16:05:18 2020 (r358432) > @@ -70,6 +70,7 @@ > #define _VM_OBJECT_ > > #include > +#include > #include > #include > #include > @@ -113,8 +114,8 @@ struct vm_object { > objtype_t type; /* type of pager */ > u_short flags; /* see below */ > u_short pg_color; /* (c) color of first page in obj > */ > - volatile u_int paging_in_progress; /* Paging (in or out) so don't > collapse or destroy */ > - volatile u_int busy; /* (a) object is busy, disallow > page busy. */ > + blockcount_t paging_in_progress; /* (a) Paging (in or out) so > don't collapse or destroy */ > + blockcount_t busy; /* (a) object is busy, disallow > page busy. */ > int resident_page_count; /* number of resident pages */ > struct vm_object *backing_object; /* object that I'm a shadow of */ > vm_ooffset_t backing_object_offset;/* Offset in backing object */ > @@ -265,7 +266,7 @@ extern struct vm_object kernel_object_store; > lock_class_rw.lc_lock(&(object)->lock.lock_object, (state)) > > #define VM_OBJECT_ASSERT_PAGING(object) > \ > - KASSERT((object)->paging_in_progress != 0, \ > + KASSERT(blockcount_read(&(object)->paging_in_progress) != 0, \ > ("vm_object %p is not paging", object)) > #define VM_OBJECT_ASSERT_REFERENCE(object) > \ > KASSERT((object)->reference_count != 0, \ > @@ -348,7 +349,7 @@ static inline bool > vm_object_busied(vm_object_t object) > { > > - return (object->busy != 0); > + return (blockcount_read(&object->busy) != 0); > } > #define VM_OBJECT_ASSERT_BUSY(object) > MPASS(vm_object_busied((object))) > > > Modified: head/sys/vm/vm_pager.h > > ============================================================================== > --- head/sys/vm/vm_pager.h Fri Feb 28 15:59:35 2020 (r358431) > +++ head/sys/vm/vm_pager.h Fri Feb 28 16:05:18 2020 (r358432) > @@ -168,7 +168,7 @@ vm_pager_populate(vm_object_t object, vm_pindex_t pidx > > MPASS((object->flags & OBJ_POPULATE) != 0); > MPASS(pidx < object->size); > - MPASS(object->paging_in_progress > 0); > + MPASS(blockcount_read(&object->paging_in_progress) > 0); > return ((*pagertab[object->type]->pgo_populate)(object, pidx, > fault_type, max_prot, first, last)); > } > > Modified: head/sys/vm/vm_swapout.c > > ============================================================================== > --- head/sys/vm/vm_swapout.c Fri Feb 28 15:59:35 2020 (r358431) > +++ head/sys/vm/vm_swapout.c Fri Feb 28 16:05:18 2020 (r358432) > @@ -218,7 +218,7 @@ vm_swapout_object_deactivate(pmap_t pmap, vm_object_t > goto unlock_return; > VM_OBJECT_ASSERT_LOCKED(object); > if ((object->flags & OBJ_UNMANAGED) != 0 || > - REFCOUNT_COUNT(object->paging_in_progress) > 0) > + blockcount_read(&object->paging_in_progress) > 0) > goto unlock_return; > > unmap = true; > From owner-svn-src-all@freebsd.org Wed Mar 4 21:20:17 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id BD26B251EC3; Wed, 4 Mar 2020 21:20:17 +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 48XmxY3V2sz4YG9; Wed, 4 Mar 2020 21:20:17 +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 5247E24496; Wed, 4 Mar 2020 21:20:17 +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 024LKHNZ030539; Wed, 4 Mar 2020 21:20:17 GMT (envelope-from manu@FreeBSD.org) Received: (from manu@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 024LKFXd030527; Wed, 4 Mar 2020 21:20:15 GMT (envelope-from manu@FreeBSD.org) Message-Id: <202003042120.024LKFXd030527@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: manu set sender to manu@FreeBSD.org using -f From: Emmanuel Vadot Date: Wed, 4 Mar 2020 21:20:15 +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: r358648 - in stable/12/sys: arm64/conf arm64/rockchip conf modules/rockchip modules/rockchip/rk_spi X-SVN-Group: stable-12 X-SVN-Commit-Author: manu X-SVN-Commit-Paths: in stable/12/sys: arm64/conf arm64/rockchip conf modules/rockchip modules/rockchip/rk_spi X-SVN-Commit-Revision: 358648 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages 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, 04 Mar 2020 21:20:17 -0000 Author: manu Date: Wed Mar 4 21:20:15 2020 New Revision: 358648 URL: https://svnweb.freebsd.org/changeset/base/358648 Log: MFC r356148-r356149, r356277 r356148: arm64: rockchip: rk808: Add remaining regulators The RK808 driver was missing the LDO and switch regulators. Add support for them. Reviewed by: mmel Differential Revision: https://reviews.freebsd.org/D22852 r356149: arm64: rockchip: Add driver for the io domain This driver configure the registers in the GRF according to the value of the regulators for the platform. Some IP can run with either 3.0V or 1.8V, if we don't configure them correctly according to the external voltage used they will not work. It's only done at boot time for now and might be needed at runtime for IP like sdmmc. Reviewed by: mmel Tested On: RockPro64, Firefly-RK3399 (gonzo), AIO-3288 (mmel) Differential Revision: https://reviews.freebsd.org/D22854 r356277: arm64: rockchip: Add a module for rk_spi The spi node doesn't lives under a simple-bus compatible node so we need OFWBUS_PNP_INFO instead of SIMPLEBUS_PNP_INFO. Added: stable/12/sys/arm64/rockchip/rk_iodomain.c - copied unchanged from r356149, head/sys/arm64/rockchip/rk_iodomain.c stable/12/sys/modules/rockchip/rk_spi/ - copied from r356277, head/sys/modules/rockchip/rk_spi/ Modified: stable/12/sys/arm64/conf/GENERIC stable/12/sys/arm64/rockchip/rk805.c stable/12/sys/arm64/rockchip/rk805reg.h stable/12/sys/arm64/rockchip/rk_spi.c stable/12/sys/conf/files.arm64 stable/12/sys/modules/rockchip/Makefile Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/arm64/conf/GENERIC ============================================================================== --- stable/12/sys/arm64/conf/GENERIC Wed Mar 4 21:12:08 2020 (r358647) +++ stable/12/sys/arm64/conf/GENERIC Wed Mar 4 21:20:15 2020 (r358648) @@ -292,6 +292,9 @@ device regulator device syscon device aw_syscon +# IO Domains +device rk_iodomain + # The `bpf' device enables the Berkeley Packet Filter. # Be aware of the administrative consequences of enabling this! # Note that 'bpf' is required for DHCP. Modified: stable/12/sys/arm64/rockchip/rk805.c ============================================================================== --- stable/12/sys/arm64/rockchip/rk805.c Wed Mar 4 21:12:08 2020 (r358647) +++ stable/12/sys/arm64/rockchip/rk805.c Wed Mar 4 21:20:15 2020 (r358648) @@ -222,6 +222,114 @@ static struct rk805_regdef rk808_regdefs[] = { .voltage_step = 100000, .voltage_nstep = 16, }, + { + .id = RK808_LDO1, + .name = "LDO_REG1", + .enable_reg = RK808_LDO_EN, + .enable_mask = 0x1, + .voltage_reg = RK805_LDO1_ON_VSEL, + .voltage_mask = 0x1F, + .voltage_min = 1800000, + .voltage_max = 3400000, + .voltage_step = 100000, + .voltage_nstep = 17, + }, + { + .id = RK808_LDO2, + .name = "LDO_REG2", + .enable_reg = RK808_LDO_EN, + .enable_mask = 0x2, + .voltage_reg = RK805_LDO2_ON_VSEL, + .voltage_mask = 0x1F, + .voltage_min = 1800000, + .voltage_max = 3400000, + .voltage_step = 100000, + .voltage_nstep = 17, + }, + { + .id = RK808_LDO3, + .name = "LDO_REG3", + .enable_reg = RK808_LDO_EN, + .enable_mask = 0x4, + .voltage_reg = RK805_LDO3_ON_VSEL, + .voltage_mask = 0xF, + .voltage_min = 800000, + .voltage_max = 2500000, + .voltage_step = 100000, + .voltage_nstep = 18, + }, + { + .id = RK808_LDO4, + .name = "LDO_REG4", + .enable_reg = RK808_LDO_EN, + .enable_mask = 0x8, + .voltage_reg = RK808_LDO4_ON_VSEL, + .voltage_mask = 0x1F, + .voltage_min = 1800000, + .voltage_max = 3400000, + .voltage_step = 100000, + .voltage_nstep = 17, + }, + { + .id = RK808_LDO5, + .name = "LDO_REG5", + .enable_reg = RK808_LDO_EN, + .enable_mask = 0x10, + .voltage_reg = RK808_LDO5_ON_VSEL, + .voltage_mask = 0x1F, + .voltage_min = 1800000, + .voltage_max = 3400000, + .voltage_step = 100000, + .voltage_nstep = 17, + }, + { + .id = RK808_LDO6, + .name = "LDO_REG6", + .enable_reg = RK808_LDO_EN, + .enable_mask = 0x20, + .voltage_reg = RK808_LDO6_ON_VSEL, + .voltage_mask = 0x1F, + .voltage_min = 800000, + .voltage_max = 2500000, + .voltage_step = 100000, + .voltage_nstep = 18, + }, + { + .id = RK808_LDO7, + .name = "LDO_REG7", + .enable_reg = RK808_LDO_EN, + .enable_mask = 0x40, + .voltage_reg = RK808_LDO7_ON_VSEL, + .voltage_mask = 0x1F, + .voltage_min = 800000, + .voltage_max = 2500000, + .voltage_step = 100000, + .voltage_nstep = 18, + }, + { + .id = RK808_LDO8, + .name = "LDO_REG8", + .enable_reg = RK808_LDO_EN, + .enable_mask = 0x80, + .voltage_reg = RK808_LDO8_ON_VSEL, + .voltage_mask = 0x1F, + .voltage_min = 1800000, + .voltage_max = 3400000, + .voltage_step = 100000, + .voltage_nstep = 17, + }, + { + .id = RK808_SWITCH1, + .name = "SWITCH_REG1", + .enable_reg = RK805_DCDC_EN, + .enable_mask = 0x20, + }, + { + .id = RK808_SWITCH2, + .name = "SWITCH_REG2", + .enable_reg = RK805_DCDC_EN, + .enable_mask = 0x40, + }, }; static int Modified: stable/12/sys/arm64/rockchip/rk805reg.h ============================================================================== --- stable/12/sys/arm64/rockchip/rk805reg.h Wed Mar 4 21:12:08 2020 (r358647) +++ stable/12/sys/arm64/rockchip/rk805reg.h Wed Mar 4 21:20:15 2020 (r358648) @@ -59,6 +59,16 @@ #define RK805_LDO2_SLEEP_VSEL 0x3E #define RK805_LDO3_ON_VSEL 0x3F #define RK805_LDO3_SLEEP_VSEL 0x40 +#define RK808_LDO4_ON_VSEL 0x41 +#define RK808_LDO4_SLEEP_VSEL 0x42 +#define RK808_LDO5_ON_VSEL 0x43 +#define RK808_LDO5_SLEEP_VSEL 0x44 +#define RK808_LDO6_ON_VSEL 0x45 +#define RK808_LDO6_SLEEP_VSEL 0x46 +#define RK808_LDO7_ON_VSEL 0x47 +#define RK808_LDO7_SLEEP_VSEL 0x48 +#define RK808_LDO8_ON_VSEL 0x49 +#define RK808_LDO8_SLEEP_VSEL 0x4A enum rk805_regulator { RK805_DCDC1 = 0, Copied: stable/12/sys/arm64/rockchip/rk_iodomain.c (from r356149, head/sys/arm64/rockchip/rk_iodomain.c) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/12/sys/arm64/rockchip/rk_iodomain.c Wed Mar 4 21:20:15 2020 (r358648, copy of r356149, head/sys/arm64/rockchip/rk_iodomain.c) @@ -0,0 +1,207 @@ +/*- + * SPDX-License-Identifier: BSD-2-Clause-FreeBSD + * + * Copyright (c) 2019 Emmanuel Vadot + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + * + */ + +#include +__FBSDID("$FreeBSD$"); + +#include +#include +#include +#include +#include + +#include +#include + +#include +#include + +#include "syscon_if.h" + +#define RK3288_GRF_IO_VSEL 0x380 +#define RK3399_GRF_IO_VSEL 0xe640 +#define RK3399_PMUGRF_IO_VSEL 0x180 + +struct rk_iodomain_supply { + char *name; + uint32_t bit; +}; + +struct rk_iodomain_conf { + struct rk_iodomain_supply *supply; + int nsupply; + uint32_t grf_reg; +}; + +struct rk_iodomain_softc { + device_t dev; + struct syscon *grf; + phandle_t node; + struct rk_iodomain_conf *conf; +}; + +static struct rk_iodomain_supply rk3288_supply[] = { + {"lcdc-supply", 0}, + {"dvp-supply", 1}, + {"flash0-supply", 2}, + {"flash1-supply", 3}, + {"wifi-supply", 4}, + {"bb-supply", 5}, + {"audio-supply", 6}, + {"sdcard-supply", 7}, + {"gpio30-supply", 8}, + {"gpio1830-supply", 9}, +}; + +static struct rk_iodomain_conf rk3288_conf = { + .supply = rk3288_supply, + .nsupply = nitems(rk3288_supply), + .grf_reg = RK3288_GRF_IO_VSEL, +}; + +static struct rk_iodomain_supply rk3399_supply[] = { + {"bt656-supply", 0}, + {"audio-supply", 1}, + {"sdmmc-supply", 2}, + {"gpio1830-supply", 3}, +}; + +static struct rk_iodomain_conf rk3399_conf = { + .supply = rk3399_supply, + .nsupply = nitems(rk3399_supply), + .grf_reg = RK3399_GRF_IO_VSEL, +}; + +static struct rk_iodomain_supply rk3399_pmu_supply[] = { + {"pmu1830-supply", 9}, +}; + +static struct rk_iodomain_conf rk3399_pmu_conf = { + .supply = rk3399_pmu_supply, + .nsupply = nitems(rk3399_pmu_supply), + .grf_reg = RK3399_PMUGRF_IO_VSEL, +}; + +static struct ofw_compat_data compat_data[] = { + {"rockchip,rk3288-io-voltage-domain", (uintptr_t)&rk3288_conf}, + {"rockchip,rk3399-io-voltage-domain", (uintptr_t)&rk3399_conf}, + {"rockchip,rk3399-pmu-io-voltage-domain", (uintptr_t)&rk3399_pmu_conf}, + {NULL, 0} +}; + +static void +rk_iodomain_set(struct rk_iodomain_softc *sc) +{ + regulator_t supply; + uint32_t reg = 0; + uint32_t mask = 0; + int uvolt, i; + + for (i = 0; i < sc->conf->nsupply; i++) { + mask |= (1 << sc->conf->supply[i].bit) << 16; + if (regulator_get_by_ofw_property(sc->dev, sc->node, + sc->conf->supply[i].name, &supply) == 0) { + if (regulator_get_voltage(supply, &uvolt) == 0) { + if (uvolt == 1800000) + reg |= (1 << sc->conf->supply[i].bit); + else if (uvolt != 3000000) + device_printf(sc->dev, + "%s regulator is at %duV, ignoring\n", + sc->conf->supply[i].name, uvolt); + } else + device_printf(sc->dev, "Cannot get current " + "voltage for regulator %s\n", + sc->conf->supply[i].name); + } + } + + SYSCON_WRITE_4(sc->grf, sc->conf->grf_reg, reg | mask); +} + +static int +rk_iodomain_probe(device_t dev) +{ + + if (!ofw_bus_status_okay(dev)) + return (ENXIO); + + if (ofw_bus_search_compatible(dev, compat_data)->ocd_data == 0) + return (ENXIO); + + device_set_desc(dev, "RockChip IO Voltage Domain"); + return (BUS_PROBE_DEFAULT); +} + +static int +rk_iodomain_attach(device_t dev) +{ + struct rk_iodomain_softc *sc; + int rv; + + sc = device_get_softc(dev); + sc->dev = dev; + sc->node = ofw_bus_get_node(dev); + + rv = syscon_get_handle_default(dev, &sc->grf); + if (rv != 0) { + device_printf(dev, "Cannot get grf handle\n"); + return (ENXIO); + } + + sc->conf = (struct rk_iodomain_conf *)ofw_bus_search_compatible(dev, compat_data)->ocd_data; + rk_iodomain_set(sc); + + return (0); +} + +static int +rk_iodomain_detach(device_t dev) +{ + + return (0); +} + +static device_method_t rk_iodomain_methods[] = { + /* Device interface */ + DEVMETHOD(device_probe, rk_iodomain_probe), + DEVMETHOD(device_attach, rk_iodomain_attach), + DEVMETHOD(device_detach, rk_iodomain_detach), + + DEVMETHOD_END +}; + +static driver_t rk_iodomain_driver = { + "rk_iodomain", + rk_iodomain_methods, + sizeof(struct rk_iodomain_softc), +}; + +static devclass_t rk_iodomain_devclass; + +EARLY_DRIVER_MODULE(rk_iodomain, simplebus, rk_iodomain_driver, + rk_iodomain_devclass, 0, 0, BUS_PASS_SUPPORTDEV + BUS_PASS_ORDER_MIDDLE); Modified: stable/12/sys/arm64/rockchip/rk_spi.c ============================================================================== --- stable/12/sys/arm64/rockchip/rk_spi.c Wed Mar 4 21:12:08 2020 (r358647) +++ stable/12/sys/arm64/rockchip/rk_spi.c Wed Mar 4 21:20:15 2020 (r358648) @@ -480,4 +480,4 @@ static devclass_t rk_spi_devclass; DRIVER_MODULE(rk_spi, simplebus, rk_spi_driver, rk_spi_devclass, 0, 0); DRIVER_MODULE(ofw_spibus, rk_spi, ofw_spibus_driver, ofw_spibus_devclass, 0, 0); MODULE_DEPEND(rk_spi, ofw_spibus, 1, 1, 1); -SIMPLEBUS_PNP_INFO(compat_data); +OFWBUS_PNP_INFO(compat_data); Modified: stable/12/sys/conf/files.arm64 ============================================================================== --- stable/12/sys/conf/files.arm64 Wed Mar 4 21:12:08 2020 (r358647) +++ stable/12/sys/conf/files.arm64 Wed Mar 4 21:20:15 2020 (r358648) @@ -285,6 +285,7 @@ arm64/rockchip/rk805.c optional fdt rk805 soc_rockch arm64/rockchip/rk_grf.c optional fdt soc_rockchip_rk3328 | fdt soc_rockchip_rk3399 arm64/rockchip/rk_pinctrl.c optional fdt rk_pinctrl soc_rockchip_rk3328 | fdt rk_pinctrl soc_rockchip_rk3399 arm64/rockchip/rk_gpio.c optional fdt rk_gpio soc_rockchip_rk3328 | fdt rk_gpio soc_rockchip_rk3399 +arm64/rockchip/rk_iodomain.c optional fdt rk_iodomain arm64/rockchip/rk_spi.c optional fdt rk_spi arm64/rockchip/rk_usb2phy.c optional fdt rk_usb2phy soc_rockchip_rk3328 | soc_rockchip_rk3399 arm64/rockchip/rk_typec_phy.c optional fdt rk_typec_phy soc_rockchip_rk3399 Modified: stable/12/sys/modules/rockchip/Makefile ============================================================================== --- stable/12/sys/modules/rockchip/Makefile Wed Mar 4 21:12:08 2020 (r358647) +++ stable/12/sys/modules/rockchip/Makefile Wed Mar 4 21:20:15 2020 (r358648) @@ -3,6 +3,8 @@ SUBDIR = \ rk_i2c \ - rk805 + rk805 \ + rk_dwmmc \ + rk_spi .include From owner-svn-src-all@freebsd.org Wed Mar 4 21:25:50 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 21B2E2521D1; Wed, 4 Mar 2020 21:25:50 +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 48Xn3x4vgrz3Ktp; Wed, 4 Mar 2020 21:25:49 +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 7A707246BE; Wed, 4 Mar 2020 21:25:49 +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 024LPnqL036607; Wed, 4 Mar 2020 21:25:49 GMT (envelope-from manu@FreeBSD.org) Received: (from manu@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 024LPncD036605; Wed, 4 Mar 2020 21:25:49 GMT (envelope-from manu@FreeBSD.org) Message-Id: <202003042125.024LPncD036605@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: manu set sender to manu@FreeBSD.org using -f From: Emmanuel Vadot Date: Wed, 4 Mar 2020 21:25: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: r358649 - stable/12/sys/arm64/rockchip X-SVN-Group: stable-12 X-SVN-Commit-Author: manu X-SVN-Commit-Paths: stable/12/sys/arm64/rockchip X-SVN-Commit-Revision: 358649 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages 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, 04 Mar 2020 21:25:50 -0000 Author: manu Date: Wed Mar 4 21:25:48 2020 New Revision: 358649 URL: https://svnweb.freebsd.org/changeset/base/358649 Log: MFC r356485-r356486, r356893, r358278-r358279 r356485: rk808: Add min/max for the switch regulators The two switch regulator are always 3.0V. Add a special case in get_voltage that if min=max we directly return the value without calculating it. Reviewed by: mmel Differential Revision: https://reviews.freebsd.org/D23004 r356486: rk805: Add regnode_status method This allow consumers to check if the regulator is enable or not. Reviewed by: mmel Differential Revision: https://reviews.freebsd.org/D23005 r356893: rk805: Add a regnode_init method This method will set the desired voltaged based on values in the DTS. It will not enable the regulator, this is the job of either a consumer or regnode_set_constraint SYSINIT if the regulator is boot_on or always_on. Reviewed by: mmel Differential Revision: https://reviews.freebsd.org/D23216 r358278: arm64: rockchip: rk_i2c: Bump to DELAY to 1000 In polling mode with use DELAY to wait for interrupts. The value was too low for RK3328. r358279: arm64: rockchip: rk808: Only init regulator not enabled If a regulator is already enabled, do not set its value to the minimum supported on the board. This fixes booting on rock64 where we set some regulator to the minimal value while the IPs needs more based on what the bootloader configured. Modified: stable/12/sys/arm64/rockchip/rk805.c stable/12/sys/arm64/rockchip/rk_i2c.c Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/arm64/rockchip/rk805.c ============================================================================== --- stable/12/sys/arm64/rockchip/rk805.c Wed Mar 4 21:20:15 2020 (r358648) +++ stable/12/sys/arm64/rockchip/rk805.c Wed Mar 4 21:25:48 2020 (r358649) @@ -98,6 +98,10 @@ struct rk805_softc { int nregs; }; +static int rk805_regnode_status(struct regnode *regnode, int *status); +static int rk805_regnode_set_voltage(struct regnode *regnode, int min_uvolt, + int max_uvolt, int *udelay); + static struct rk805_regdef rk805_regdefs[] = { { .id = RK805_DCDC1, @@ -205,6 +209,7 @@ static struct rk805_regdef rk808_regdefs[] = { .voltage_nstep = 64, }, { + /* BUCK3 voltage is calculated based on external resistor */ .id = RK805_DCDC3, .name = "DCDC_REG3", .enable_reg = RK805_DCDC_EN, @@ -323,12 +328,16 @@ static struct rk805_regdef rk808_regdefs[] = { .name = "SWITCH_REG1", .enable_reg = RK805_DCDC_EN, .enable_mask = 0x20, + .voltage_min = 3000000, + .voltage_max = 3000000, }, { .id = RK808_SWITCH2, .name = "SWITCH_REG2", .enable_reg = RK805_DCDC_EN, .enable_mask = 0x40, + .voltage_min = 3000000, + .voltage_max = 3000000, }, }; @@ -344,13 +353,37 @@ rk805_read(device_t dev, uint8_t reg, uint8_t *data, u static int rk805_write(device_t dev, uint8_t reg, uint8_t data) { + return (iicdev_writeto(dev, reg, &data, 1, IIC_INTRWAIT)); } static int rk805_regnode_init(struct regnode *regnode) { - return (0); + struct rk805_reg_sc *sc; + struct regnode_std_param *param; + int rv, udelay, status; + + sc = regnode_get_softc(regnode); + param = regnode_get_stdparam(regnode); + if (param->min_uvolt == 0) + return (0); + + /* + * Set the regulator at the correct voltage if it is not enabled. + * Do not enable it, this is will be done either by a + * consumer or by regnode_set_constraint if boot_on is true + */ + rv = rk805_regnode_status(regnode, &status); + if (rv != 0 || status == REGULATOR_STATUS_ENABLED) + return (rv); + + rv = rk805_regnode_set_voltage(regnode, param->min_uvolt, + param->max_uvolt, &udelay); + if (udelay != 0) + DELAY(udelay); + + return (rv); } static int @@ -409,6 +442,22 @@ rk805_regnode_voltage_to_reg(struct rk805_reg_sc *sc, } static int +rk805_regnode_status(struct regnode *regnode, int *status) +{ + struct rk805_reg_sc *sc; + uint8_t val; + + sc = regnode_get_softc(regnode); + + *status = 0; + rk805_read(sc->base_dev, sc->def->enable_reg, &val, 1); + if (val & sc->def->enable_mask) + *status = REGULATOR_STATUS_ENABLED; + + return (0); +} + +static int rk805_regnode_set_voltage(struct regnode *regnode, int min_uvolt, int max_uvolt, int *udelay) { @@ -451,6 +500,11 @@ rk805_regnode_get_voltage(struct regnode *regnode, int sc = regnode_get_softc(regnode); + if (sc->def->voltage_min == sc->def->voltage_max) { + *uvolt = sc->def->voltage_min; + return (0); + } + if (!sc->def->voltage_step) return (ENXIO); @@ -468,6 +522,7 @@ static regnode_method_t rk805_regnode_methods[] = { /* Regulator interface */ REGNODEMETHOD(regnode_init, rk805_regnode_init), REGNODEMETHOD(regnode_enable, rk805_regnode_enable), + REGNODEMETHOD(regnode_status, rk805_regnode_status), REGNODEMETHOD(regnode_set_voltage, rk805_regnode_set_voltage), REGNODEMETHOD(regnode_get_voltage, rk805_regnode_get_voltage), REGNODEMETHOD(regnode_check_voltage, regnode_method_check_voltage), Modified: stable/12/sys/arm64/rockchip/rk_i2c.c ============================================================================== --- stable/12/sys/arm64/rockchip/rk_i2c.c Wed Mar 4 21:20:15 2020 (r358648) +++ stable/12/sys/arm64/rockchip/rk_i2c.c Wed Mar 4 21:25:48 2020 (r358649) @@ -530,7 +530,7 @@ rk_i2c_transfer(device_t dev, struct iic_msg *msgs, ui rk_i2c_intr_locked(sc); if (sc->transfer_done != 0) break; - DELAY(100); + DELAY(1000); } if (timeout <= 0) err = ETIMEDOUT; @@ -609,8 +609,8 @@ rk_i2c_attach(device_t dev) device_printf(dev, "cannot get pclk clock\n"); goto fail; } - if (sc->sclk != NULL) { - error = clk_enable(sc->sclk); + if (sc->pclk != NULL) { + error = clk_enable(sc->pclk); if (error != 0) { device_printf(dev, "cannot enable pclk clock\n"); goto fail; From owner-svn-src-all@freebsd.org Wed Mar 4 21:27:14 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id B4E7D252278; Wed, 4 Mar 2020 21:27:14 +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 48Xn5Y6R3cz3P8c; Wed, 4 Mar 2020 21:27:13 +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 98E73246C3; Wed, 4 Mar 2020 21:27:13 +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 024LRDEm036747; Wed, 4 Mar 2020 21:27:13 GMT (envelope-from brooks@FreeBSD.org) Received: (from brooks@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 024LRCBw036744; Wed, 4 Mar 2020 21:27:12 GMT (envelope-from brooks@FreeBSD.org) Message-Id: <202003042127.024LRCBw036744@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: brooks set sender to brooks@FreeBSD.org using -f From: Brooks Davis Date: Wed, 4 Mar 2020 21:27:12 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r358650 - in head/sys: compat/linux sys vm X-SVN-Group: head X-SVN-Commit-Author: brooks X-SVN-Commit-Paths: in head/sys: compat/linux sys vm X-SVN-Commit-Revision: 358650 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages 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, 04 Mar 2020 21:27:14 -0000 Author: brooks Date: Wed Mar 4 21:27:12 2020 New Revision: 358650 URL: https://svnweb.freebsd.org/changeset/base/358650 Log: Introduce kern_mmap_req(). This presents an extensible interface to the generic mmap(2) implementation via a struct pointer intended to use a designated initializer or compount literal. We take advantage of the mandatory zeroing of fields not listed in the initializer. Remove kern_mmap_fpcheck() and use kern_mmap_req(). The motivation for this change is a desire to keep the core implementation from growing an ever-increasing number of arguments that must be specified in the correct order for the lowest-level implementations. In CheriBSD we have already added two more arguments. Reviewed by: kib Discussed with: kevans Obtained from: CheriBSD Sponsored by: DARPA, AFRL Differential Revision: https://reviews.freebsd.org/D23164 Modified: head/sys/compat/linux/linux_mmap.c head/sys/sys/syscallsubr.h head/sys/vm/vm_mmap.c Modified: head/sys/compat/linux/linux_mmap.c ============================================================================== --- head/sys/compat/linux/linux_mmap.c Wed Mar 4 21:25:48 2020 (r358649) +++ head/sys/compat/linux/linux_mmap.c Wed Mar 4 21:27:12 2020 (r358650) @@ -77,6 +77,7 @@ int linux_mmap_common(struct thread *td, uintptr_t addr, size_t len, int prot, int flags, int fd, off_t pos) { + struct mmap_req mr, mr_fixed; struct proc *p = td->td_proc; struct vmspace *vms = td->td_proc->p_vmspace; int bsd_flags, error; @@ -201,17 +202,25 @@ linux_mmap_common(struct thread *td, uintptr_t addr, s * address is not zero, try with MAP_FIXED and MAP_EXCL first, * and fall back to the normal behaviour if that fails. */ + mr = (struct mmap_req) { + .mr_hint = addr, + .mr_len = len, + .mr_prot = prot, + .mr_flags = bsd_flags, + .mr_fd = fd, + .mr_pos = pos, + .mr_check_fp_fn = linux_mmap_check_fp, + }; if (addr != 0 && (bsd_flags & MAP_FIXED) == 0 && (bsd_flags & MAP_EXCL) == 0) { - error = kern_mmap_fpcheck(td, addr, len, prot, - bsd_flags | MAP_FIXED | MAP_EXCL, fd, pos, - linux_mmap_check_fp); + mr_fixed = mr; + mr_fixed.mr_flags |= MAP_FIXED | MAP_EXCL; + error = kern_mmap_req(td, &mr_fixed); if (error == 0) goto out; } - error = kern_mmap_fpcheck(td, addr, len, prot, bsd_flags, fd, pos, - linux_mmap_check_fp); + error = kern_mmap_req(td, &mr); out: LINUX_CTR2(mmap2, "return: %d (%p)", error, td->td_retval[0]); Modified: head/sys/sys/syscallsubr.h ============================================================================== --- head/sys/sys/syscallsubr.h Wed Mar 4 21:25:48 2020 (r358649) +++ head/sys/sys/syscallsubr.h Wed Mar 4 21:27:12 2020 (r358650) @@ -65,6 +65,18 @@ struct uio; typedef int (*mmap_check_fp_fn)(struct file *, int, int, int); +struct mmap_req { + vm_offset_t mr_hint; + vm_size_t mr_len; + int mr_prot; + int mr_flags; + int mr_fd; + off_t mr_pos; + mmap_check_fp_fn mr_check_fp_fn; +}; + +int kern___getcwd(struct thread *td, char *buf, enum uio_seg bufseg, + size_t buflen, size_t path_max); int kern_accept(struct thread *td, int s, struct sockaddr **name, socklen_t *namelen, struct file **fp); int kern_accept4(struct thread *td, int s, struct sockaddr **name, @@ -182,9 +194,7 @@ int kern_mlock(struct proc *proc, struct ucred *cred, size_t len); int kern_mmap(struct thread *td, uintptr_t addr, size_t len, int prot, int flags, int fd, off_t pos); -int kern_mmap_fpcheck(struct thread *td, uintptr_t addr, size_t len, - int prot, int flags, int fd, off_t pos, - mmap_check_fp_fn check_fp_fn); +int kern_mmap_req(struct thread *td, const struct mmap_req *mrp); int kern_mmap_maxprot(struct proc *p, int prot); int kern_mprotect(struct thread *td, uintptr_t addr, size_t size, int prot); int kern_msgctl(struct thread *, int, int, struct msqid_ds *); Modified: head/sys/vm/vm_mmap.c ============================================================================== --- head/sys/vm/vm_mmap.c Wed Mar 4 21:25:48 2020 (r358649) +++ head/sys/vm/vm_mmap.c Wed Mar 4 21:27:12 2020 (r358650) @@ -199,27 +199,40 @@ int kern_mmap(struct thread *td, uintptr_t addr0, size_t len, int prot, int flags, int fd, off_t pos) { + struct mmap_req mr = { + .mr_hint = addr0, + .mr_len = len, + .mr_prot = prot, + .mr_flags = flags, + .mr_fd = fd, + .mr_pos = pos + }; - return (kern_mmap_fpcheck(td, addr0, len, prot, flags, fd, pos, NULL)); + return (kern_mmap_req(td, &mr)); } -/* - * When mmap'ing a file, check_fp_fn may be used for the caller to do any - * last-minute validation based on the referenced file in a non-racy way. - */ int -kern_mmap_fpcheck(struct thread *td, uintptr_t addr0, size_t len, int prot, - int flags, int fd, off_t pos, mmap_check_fp_fn check_fp_fn) +kern_mmap_req(struct thread *td, const struct mmap_req *mrp) { struct vmspace *vms; struct file *fp; struct proc *p; + off_t pos; vm_offset_t addr; - vm_size_t pageoff, size; + vm_size_t len, pageoff, size; vm_prot_t cap_maxprot; - int align, error, max_prot; + int align, error, fd, flags, max_prot, prot; cap_rights_t rights; + mmap_check_fp_fn check_fp_fn; + addr = mrp->mr_hint; + len = mrp->mr_len; + prot = mrp->mr_prot; + flags = mrp->mr_flags; + fd = mrp->mr_fd; + pos = mrp->mr_pos; + check_fp_fn = mrp->mr_check_fp_fn; + if ((prot & ~(_PROT_ALL | PROT_MAX(_PROT_ALL))) != 0) return (EINVAL); max_prot = PROT_MAX_EXTRACT(prot); @@ -239,7 +252,6 @@ kern_mmap_fpcheck(struct thread *td, uintptr_t addr0, vms = p->p_vmspace; fp = NULL; AUDIT_ARG_FD(fd); - addr = addr0; /* * Ignore old flags that used to be defined but did not do anything. From owner-svn-src-all@freebsd.org Wed Mar 4 21:30:57 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 92F962524BB; Wed, 4 Mar 2020 21:30:57 +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 48Xn9s1HZlz43L5; Wed, 4 Mar 2020 21:30:57 +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 C87B8246F9; Wed, 4 Mar 2020 21:30:56 +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 024LUu5C037755; Wed, 4 Mar 2020 21:30:56 GMT (envelope-from manu@FreeBSD.org) Received: (from manu@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 024LUtqm037751; Wed, 4 Mar 2020 21:30:55 GMT (envelope-from manu@FreeBSD.org) Message-Id: <202003042130.024LUtqm037751@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: manu set sender to manu@FreeBSD.org using -f From: Emmanuel Vadot Date: Wed, 4 Mar 2020 21:30: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: r358651 - in stable/12/sys: arm64/conf arm64/rockchip arm64/rockchip/clk conf X-SVN-Group: stable-12 X-SVN-Commit-Author: manu X-SVN-Commit-Paths: in stable/12/sys: arm64/conf arm64/rockchip arm64/rockchip/clk conf X-SVN-Commit-Revision: 358651 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages 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, 04 Mar 2020 21:30:57 -0000 Author: manu Date: Wed Mar 4 21:30:55 2020 New Revision: 358651 URL: https://svnweb.freebsd.org/changeset/base/358651 Log: MFC r356808: arm64: rockchip: Add RK3399 PWM driver Add a driver for the pwm controller in the RK3399 SoC Submitted by: bdragon (original version) Reviewed by: ganbold (previous version) Differential Revision: https://reviews.freebsd.org/D19046 Added: stable/12/sys/arm64/rockchip/rk_pwm.c - copied unchanged from r356808, head/sys/arm64/rockchip/rk_pwm.c Modified: stable/12/sys/arm64/conf/GENERIC stable/12/sys/arm64/rockchip/clk/rk3399_pmucru.c stable/12/sys/conf/files.arm64 Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/arm64/conf/GENERIC ============================================================================== --- stable/12/sys/arm64/conf/GENERIC Wed Mar 4 21:27:12 2020 (r358650) +++ stable/12/sys/arm64/conf/GENERIC Wed Mar 4 21:30:55 2020 (r358651) @@ -258,6 +258,7 @@ device rk_spi # RockChip SPI controller # PWM device pwm device aw_pwm +device rk_pwm # Console device vt Modified: stable/12/sys/arm64/rockchip/clk/rk3399_pmucru.c ============================================================================== --- stable/12/sys/arm64/rockchip/clk/rk3399_pmucru.c Wed Mar 4 21:27:12 2020 (r358650) +++ stable/12/sys/arm64/rockchip/clk/rk3399_pmucru.c Wed Mar 4 21:30:55 2020 (r358651) @@ -58,6 +58,7 @@ __FBSDID("$FreeBSD$"); #define PCLK_I2C0_PMU 27 #define PCLK_I2C4_PMU 28 #define PCLK_I2C8_PMU 29 +#define PCLK_RKPWM_PMU 30 static struct rk_cru_gate rk3399_pmu_gates[] = { /* PMUCRU_CLKGATE_CON1 */ @@ -67,8 +68,8 @@ static struct rk_cru_gate rk3399_pmu_gates[] = { CRU_GATE(PCLK_I2C0_PMU, "pclk_i2c0_pmu", "pclk_pmu_src", 0x104, 7) CRU_GATE(PCLK_I2C4_PMU, "pclk_i2c4_pmu", "pclk_pmu_src", 0x104, 8) CRU_GATE(PCLK_I2C8_PMU, "pclk_i2c8_pmu", "pclk_pmu_src", 0x104, 9) + CRU_GATE(PCLK_RKPWM_PMU, "pclk_rkpwm_pmu", "pclk_pmu_src", 0x104, 10) }; - /* * PLLs Copied: stable/12/sys/arm64/rockchip/rk_pwm.c (from r356808, head/sys/arm64/rockchip/rk_pwm.c) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/12/sys/arm64/rockchip/rk_pwm.c Wed Mar 4 21:30:55 2020 (r358651, copy of r356808, head/sys/arm64/rockchip/rk_pwm.c) @@ -0,0 +1,403 @@ +/*- + * SPDX-License-Identifier: BSD-2-Clause-FreeBSD + * + * Copyright (c) 2018 Emmanuel Vadot + * Copyright (c) 2019 Brandon Bergren + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, + * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED + * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, + * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + * + * $FreeBSD$ + */ + +#include +__FBSDID("$FreeBSD$"); + +#include +#include +#include +#include +#include +#include +#include +#include + +#include +#include + +#include + +#include "pwmbus_if.h" + +/* Register offsets. */ +#define RK_PWM_COUNTER 0x00 +#define RK_PWM_PERIOD 0x04 +#define RK_PWM_DUTY 0x08 +#define RK_PWM_CTRL 0x0c + +#define SET(reg,mask,val) reg = ((reg & ~mask) | val) + +#define RK_PWM_CTRL_ENABLE_MASK (1 << 0) +#define RK_PWM_CTRL_ENABLED (1 << 0) +#define RK_PWM_CTRL_DISABLED (0) + +#define RK_PWM_CTRL_MODE_MASK (3 << 1) +#define RK_PWM_CTRL_MODE_ONESHOT (0) +#define RK_PWM_CTRL_MODE_CONTINUOUS (1 << 1) +#define RK_PWM_CTRL_MODE_CAPTURE (1 << 2) + +#define RK_PWM_CTRL_DUTY_MASK (1 << 3) +#define RK_PWM_CTRL_DUTY_POSITIVE (1 << 3) +#define RK_PWM_CTRL_DUTY_NEGATIVE (0) + +#define RK_PWM_CTRL_INACTIVE_MASK (1 << 4) +#define RK_PWM_CTRL_INACTIVE_POSITIVE (1 << 4) +#define RK_PWM_CTRL_INACTIVE_NEGATIVE (0) + +/* PWM Output Alignment */ +#define RK_PWM_CTRL_ALIGN_MASK (1 << 5) +#define RK_PWM_CTRL_ALIGN_CENTER (1 << 5) +#define RK_PWM_CTRL_ALIGN_LEFT (0) + +/* Low power mode: disable prescaler when inactive */ +#define RK_PWM_CTRL_LP_MASK (1 << 8) +#define RK_PWM_CTRL_LP_ENABLE (1 << 8) +#define RK_PWM_CTRL_LP_DISABLE (0) + +/* Clock source: bypass the scaler or not */ +#define RK_PWM_CTRL_CLOCKSRC_MASK (1 << 9) +#define RK_PWM_CTRL_CLOCKSRC_NONSCALED (0) +#define RK_PWM_CTRL_CLOCKSRC_SCALED (1 << 9) + +#define RK_PWM_CTRL_PRESCALE_MASK (7 << 12) +#define RK_PWM_CTRL_PRESCALE_SHIFT 12 + +#define RK_PWM_CTRL_SCALE_MASK (0xFF << 16) +#define RK_PWM_CTRL_SCALE_SHIFT 16 + +#define RK_PWM_CTRL_REPEAT_MASK (0xFF << 24) +#define RK_PWM_CTRL_REPEAT_SHIFT 24 + +#define NS_PER_SEC 1000000000 + +static struct ofw_compat_data compat_data[] = { + { "rockchip,rk3399-pwm", 1 }, + { NULL, 0 } +}; + +static struct resource_spec rk_pwm_spec[] = { + { SYS_RES_MEMORY, 0, RF_ACTIVE }, + { -1, 0 } +}; + +struct rk_pwm_softc { + device_t dev; + device_t busdev; + clk_t clk; + struct resource *res; + + uint64_t clk_freq; + unsigned int period; + unsigned int duty; + uint32_t flags; + uint8_t prescaler; + uint8_t scaler; + bool using_scaler; + bool enabled; +}; + +#define RK_PWM_READ(sc, reg) bus_read_4((sc)->res, (reg)) +#define RK_PWM_WRITE(sc, reg, val) bus_write_4((sc)->res, (reg), (val)) + +static int rk_pwm_probe(device_t dev); +static int rk_pwm_attach(device_t dev); +static int rk_pwm_detach(device_t dev); + +static int +rk_pwm_probe(device_t dev) +{ + if (!ofw_bus_status_okay(dev)) + return (ENXIO); + + if (!ofw_bus_search_compatible(dev, compat_data)->ocd_data) + return (ENXIO); + + device_set_desc(dev, "Rockchip PWM"); + return (BUS_PROBE_DEFAULT); +} + +static int +rk_pwm_attach(device_t dev) +{ + struct rk_pwm_softc *sc; + phandle_t node; + uint64_t clk_freq; + uint32_t reg; + int error; + + sc = device_get_softc(dev); + sc->dev = dev; + + error = clk_get_by_ofw_index(dev, 0, 0, &sc->clk); + if (error != 0) { + device_printf(dev, "cannot get clock\n"); + goto fail; + } + error = clk_enable(sc->clk); + if (error != 0) { + device_printf(dev, "cannot enable clock\n"); + goto fail; + } + error = clk_get_freq(sc->clk, &sc->clk_freq); + if (error != 0) { + device_printf(dev, "cannot get base frequency\n"); + goto fail; + } + + if (bus_alloc_resources(dev, rk_pwm_spec, &sc->res) != 0) { + device_printf(dev, "cannot allocate resources for device\n"); + error = ENXIO; + goto fail; + } + + /* Read the configuration left by U-Boot */ + reg = RK_PWM_READ(sc, RK_PWM_CTRL); + if ((reg & RK_PWM_CTRL_ENABLE_MASK) == RK_PWM_CTRL_ENABLED) + sc->enabled = true; + + reg = RK_PWM_READ(sc, RK_PWM_CTRL); + reg &= RK_PWM_CTRL_PRESCALE_MASK; + sc->prescaler = reg >> RK_PWM_CTRL_PRESCALE_SHIFT; + + reg = RK_PWM_READ(sc, RK_PWM_CTRL); + reg &= RK_PWM_CTRL_SCALE_MASK; + sc->scaler = reg >> RK_PWM_CTRL_SCALE_SHIFT; + + reg = RK_PWM_READ(sc, RK_PWM_CTRL); + if ((reg & RK_PWM_CTRL_CLOCKSRC_MASK) == RK_PWM_CTRL_CLOCKSRC_SCALED) + sc->using_scaler = true; + else + sc->using_scaler = false; + + clk_freq = sc->clk_freq / (2 ^ sc->prescaler); + + if (sc->using_scaler) { + if (sc->scaler == 0) + clk_freq /= 512; + else + clk_freq /= (sc->scaler * 2); + } + + reg = RK_PWM_READ(sc, RK_PWM_PERIOD); + sc->period = NS_PER_SEC / + (clk_freq / reg); + reg = RK_PWM_READ(sc, RK_PWM_DUTY); + sc->duty = NS_PER_SEC / + (clk_freq / reg); + + node = ofw_bus_get_node(dev); + OF_device_register_xref(OF_xref_from_node(node), dev); + + sc->busdev = device_add_child(dev, "pwmbus", -1); + + return (bus_generic_attach(dev)); + +fail: + rk_pwm_detach(dev); + return (error); +} + +static int +rk_pwm_detach(device_t dev) +{ + struct rk_pwm_softc *sc; + + sc = device_get_softc(dev); + + bus_generic_detach(sc->dev); + + bus_release_resources(dev, rk_pwm_spec, &sc->res); + + return (0); +} + +static phandle_t +aw_pwm_get_node(device_t bus, device_t dev) +{ + + /* + * Share our controller node with our pwmbus child; it instantiates + * devices by walking the children contained within our node. + */ + return ofw_bus_get_node(bus); +} + +static int +rk_pwm_channel_count(device_t dev, u_int *nchannel) +{ + /* The device supports 4 channels, but attaches multiple times in the + * device tree. This interferes with advanced usage though, as + * the interrupt capability and channel 3 FIFO register offsets + * don't work right in this situation. + * But since we don't support those yet, pretend we are singlechannel. + */ + *nchannel = 1; + + return (0); +} + +static int +rk_pwm_channel_config(device_t dev, u_int channel, u_int period, u_int duty) +{ + struct rk_pwm_softc *sc; + uint64_t period_freq, duty_freq; + uint32_t reg; + uint32_t period_out; + uint32_t duty_out; + uint8_t prescaler; + uint8_t scaler; + bool using_scaler; + + sc = device_get_softc(dev); + + period_freq = NS_PER_SEC / period; + /* Datasheet doesn't define, so use Nyquist frequency. */ + if (period_freq > (sc->clk_freq / 2)) + return (EINVAL); + duty_freq = NS_PER_SEC / duty; + if (duty_freq < period_freq) { + device_printf(sc->dev, "duty < period\n"); + return (EINVAL); + } + + /* Assuming 24 MHz reference, we should never actually have + to use the divider due to pwm API limitations. */ + prescaler = 0; + scaler = 0; + using_scaler = false; + + /* XXX Expand API to allow for 64 bit period/duty. */ + period_out = (sc->clk_freq * period) / NS_PER_SEC; + duty_out = (sc->clk_freq * duty) / NS_PER_SEC; + + reg = RK_PWM_READ(sc, RK_PWM_CTRL); + + if ((reg & RK_PWM_CTRL_MODE_MASK) != RK_PWM_CTRL_MODE_CONTINUOUS) { + /* Switching modes, disable just in case. */ + SET(reg, RK_PWM_CTRL_ENABLE_MASK, RK_PWM_CTRL_DISABLED); + RK_PWM_WRITE(sc, RK_PWM_CTRL, reg); + } + + RK_PWM_WRITE(sc, RK_PWM_PERIOD, period_out); + RK_PWM_WRITE(sc, RK_PWM_DUTY, duty_out); + + SET(reg, RK_PWM_CTRL_ENABLE_MASK, RK_PWM_CTRL_ENABLED); + SET(reg, RK_PWM_CTRL_MODE_MASK, RK_PWM_CTRL_MODE_CONTINUOUS); + SET(reg, RK_PWM_CTRL_ALIGN_MASK, RK_PWM_CTRL_ALIGN_LEFT); + SET(reg, RK_PWM_CTRL_CLOCKSRC_MASK, using_scaler); + SET(reg, RK_PWM_CTRL_PRESCALE_MASK, + prescaler << RK_PWM_CTRL_PRESCALE_SHIFT); + SET(reg, RK_PWM_CTRL_SCALE_MASK, + scaler << RK_PWM_CTRL_SCALE_SHIFT); + + RK_PWM_WRITE(sc, RK_PWM_CTRL, reg); + + sc->period = period; + sc->duty = duty; + + return (0); +} + +static int +rk_pwm_channel_get_config(device_t dev, u_int channel, u_int *period, u_int *duty) +{ + struct rk_pwm_softc *sc; + + sc = device_get_softc(dev); + + *period = sc->period; + *duty = sc->duty; + + return (0); +} + +static int +rk_pwm_channel_enable(device_t dev, u_int channel, bool enable) +{ + struct rk_pwm_softc *sc; + uint32_t reg; + + sc = device_get_softc(dev); + + if (enable && sc->enabled) + return (0); + + reg = RK_PWM_READ(sc, RK_PWM_CTRL); + SET(reg, RK_PWM_CTRL_ENABLE_MASK, enable); + + RK_PWM_WRITE(sc, RK_PWM_CTRL, reg); + + sc->enabled = enable; + + return (0); +} + +static int +rk_pwm_channel_is_enabled(device_t dev, u_int channel, bool *enabled) +{ + struct rk_pwm_softc *sc; + + sc = device_get_softc(dev); + + *enabled = sc->enabled; + + return (0); +} + +static device_method_t rk_pwm_methods[] = { + /* Device interface */ + DEVMETHOD(device_probe, rk_pwm_probe), + DEVMETHOD(device_attach, rk_pwm_attach), + DEVMETHOD(device_detach, rk_pwm_detach), + + /* ofw_bus interface */ + DEVMETHOD(ofw_bus_get_node, aw_pwm_get_node), + + /* pwm interface */ + DEVMETHOD(pwmbus_channel_count, rk_pwm_channel_count), + DEVMETHOD(pwmbus_channel_config, rk_pwm_channel_config), + DEVMETHOD(pwmbus_channel_get_config, rk_pwm_channel_get_config), + DEVMETHOD(pwmbus_channel_enable, rk_pwm_channel_enable), + DEVMETHOD(pwmbus_channel_is_enabled, rk_pwm_channel_is_enabled), + + DEVMETHOD_END +}; + +static driver_t rk_pwm_driver = { + "pwm", + rk_pwm_methods, + sizeof(struct rk_pwm_softc), +}; + +static devclass_t rk_pwm_devclass; + +DRIVER_MODULE(rk_pwm, simplebus, rk_pwm_driver, rk_pwm_devclass, 0, 0); +SIMPLEBUS_PNP_INFO(compat_data); Modified: stable/12/sys/conf/files.arm64 ============================================================================== --- stable/12/sys/conf/files.arm64 Wed Mar 4 21:27:12 2020 (r358650) +++ stable/12/sys/conf/files.arm64 Wed Mar 4 21:30:55 2020 (r358651) @@ -292,6 +292,7 @@ arm64/rockchip/rk_typec_phy.c optional fdt rk_typec_p arm64/rockchip/if_dwc_rk.c optional fdt dwc_rk soc_rockchip_rk3328 | fdt dwc_rk soc_rockchip_rk3399 arm64/rockchip/rk_tsadc_if.m optional fdt soc_rockchip_rk3399 arm64/rockchip/rk_tsadc.c optional fdt soc_rockchip_rk3399 +arm64/rockchip/rk_pwm.c optional fdt rk_pwm dev/dwc/if_dwc.c optional fdt dwc_rk soc_rockchip_rk3328 | fdt dwc_rk soc_rockchip_rk3399 dev/dwc/if_dwc_if.m optional fdt dwc_rk soc_rockchip_rk3328 | fdt dwc_rk soc_rockchip_rk3399 From owner-svn-src-all@freebsd.org Wed Mar 4 21:47:38 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id A758F252EE9; Wed, 4 Mar 2020 21:47:38 +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 48XnY61jFKz3Fqy; Wed, 4 Mar 2020 21:47:38 +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 BAC6B24A89; Wed, 4 Mar 2020 21:47:37 +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 024LlbFe048576; Wed, 4 Mar 2020 21:47:37 GMT (envelope-from cy@FreeBSD.org) Received: (from cy@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 024LjDMp048460; Wed, 4 Mar 2020 21:45:13 GMT (envelope-from cy@FreeBSD.org) Message-Id: <202003042145.024LjDMp048460@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: cy set sender to cy@FreeBSD.org using -f From: Cy Schubert Date: Wed, 4 Mar 2020 21:45:13 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r358652 - in head: contrib/ntp contrib/ntp/html contrib/ntp/html/drivers contrib/ntp/include contrib/ntp/libntp contrib/ntp/libparse contrib/ntp/ntpd contrib/ntp/ntpdate contrib/ntp/ntp... X-SVN-Group: head X-SVN-Commit-Author: cy X-SVN-Commit-Paths: in head: contrib/ntp contrib/ntp/html contrib/ntp/html/drivers contrib/ntp/include contrib/ntp/libntp contrib/ntp/libparse contrib/ntp/ntpd contrib/ntp/ntpdate contrib/ntp/ntpdc contrib/ntp/ntpq contr... X-SVN-Commit-Revision: 358652 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages 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, 04 Mar 2020 21:47:38 -0000 Author: cy Date: Wed Mar 4 21:45:12 2020 New Revision: 358652 URL: https://svnweb.freebsd.org/changeset/base/358652 Log: MFV r358616: Update ntp-4.2.8p13 --> 4.2.8p14. The advisory can be found at: http://support.ntp.org/bin/view/Main/SecurityNotice#\ March_2020_ntp_4_2_8p14_NTP_Rele No CVEs have been documented yet. MFC after: now Security: http://support.ntp.org/bin/view/Main/NtpBug3610 http://support.ntp.org/bin/view/Main/NtpBug3596 http://support.ntp.org/bin/view/Main/NtpBug3592 Added: head/contrib/ntp/include/ntp_calgps.h - copied unchanged from r358616, vendor/ntp/dist/include/ntp_calgps.h head/contrib/ntp/include/ntp_psl.h - copied unchanged from r358616, vendor/ntp/dist/include/ntp_psl.h head/contrib/ntp/include/timexsup.h - copied unchanged from r358616, vendor/ntp/dist/include/timexsup.h head/contrib/ntp/libntp/ntp_calgps.c - copied unchanged from r358616, vendor/ntp/dist/libntp/ntp_calgps.c head/contrib/ntp/libntp/timespecops.c - copied unchanged from r358616, vendor/ntp/dist/libntp/timespecops.c head/contrib/ntp/libntp/timexsup.c - copied unchanged from r358616, vendor/ntp/dist/libntp/timexsup.c head/contrib/ntp/ntpd/psl0.conf - copied unchanged from r358616, vendor/ntp/dist/ntpd/psl0.conf head/contrib/ntp/ntpd/psl1.conf - copied unchanged from r358616, vendor/ntp/dist/ntpd/psl1.conf head/contrib/ntp/ntpd/psl2.conf - copied unchanged from r358616, vendor/ntp/dist/ntpd/psl2.conf Modified: head/contrib/ntp/COPYRIGHT head/contrib/ntp/ChangeLog head/contrib/ntp/CommitLog head/contrib/ntp/NEWS head/contrib/ntp/config.h.in head/contrib/ntp/configure head/contrib/ntp/configure.ac head/contrib/ntp/html/accopt.html head/contrib/ntp/html/clockopt.html head/contrib/ntp/html/confopt.html head/contrib/ntp/html/copyright.html head/contrib/ntp/html/discipline.html head/contrib/ntp/html/drivers/driver20.html head/contrib/ntp/html/drivers/driver29.html head/contrib/ntp/html/miscopt.html head/contrib/ntp/include/Makefile.am head/contrib/ntp/include/Makefile.in head/contrib/ntp/include/ntp.h head/contrib/ntp/include/ntp_calendar.h head/contrib/ntp/include/ntp_config.h head/contrib/ntp/include/ntp_control.h head/contrib/ntp/include/ntp_fp.h head/contrib/ntp/include/ntp_io.h head/contrib/ntp/include/ntp_refclock.h head/contrib/ntp/include/ntp_request.h head/contrib/ntp/include/ntp_stdlib.h head/contrib/ntp/include/ntp_syslog.h head/contrib/ntp/include/ntpd.h head/contrib/ntp/include/timespecops.h head/contrib/ntp/libntp/Makefile.am head/contrib/ntp/libntp/Makefile.in head/contrib/ntp/libntp/decodenetnum.c head/contrib/ntp/libntp/dofptoa.c head/contrib/ntp/libntp/dolfptoa.c head/contrib/ntp/libntp/mstolfp.c head/contrib/ntp/libntp/msyslog.c head/contrib/ntp/libntp/ntp_calendar.c head/contrib/ntp/libntp/recvbuff.c head/contrib/ntp/libntp/statestr.c head/contrib/ntp/libntp/systime.c head/contrib/ntp/libparse/Makefile.am head/contrib/ntp/libparse/Makefile.in head/contrib/ntp/libparse/clk_rawdcf.c head/contrib/ntp/ntpd/Makefile.am head/contrib/ntp/ntpd/Makefile.in head/contrib/ntp/ntpd/cmd_args.c head/contrib/ntp/ntpd/complete.conf.in head/contrib/ntp/ntpd/invoke-ntp.conf.texi head/contrib/ntp/ntpd/invoke-ntp.keys.texi head/contrib/ntp/ntpd/invoke-ntpd.texi head/contrib/ntp/ntpd/keyword-gen-utd head/contrib/ntp/ntpd/keyword-gen.c head/contrib/ntp/ntpd/ntp.conf.5man head/contrib/ntp/ntpd/ntp.conf.5mdoc head/contrib/ntp/ntpd/ntp.conf.def head/contrib/ntp/ntpd/ntp.conf.html head/contrib/ntp/ntpd/ntp.conf.man.in head/contrib/ntp/ntpd/ntp.conf.mdoc.in head/contrib/ntp/ntpd/ntp.keys.5man head/contrib/ntp/ntpd/ntp.keys.5mdoc head/contrib/ntp/ntpd/ntp.keys.html head/contrib/ntp/ntpd/ntp.keys.man.in head/contrib/ntp/ntpd/ntp.keys.mdoc.in head/contrib/ntp/ntpd/ntp_config.c head/contrib/ntp/ntpd/ntp_control.c head/contrib/ntp/ntpd/ntp_io.c head/contrib/ntp/ntpd/ntp_keyword.h head/contrib/ntp/ntpd/ntp_leapsec.c head/contrib/ntp/ntpd/ntp_leapsec.h head/contrib/ntp/ntpd/ntp_loopfilter.c head/contrib/ntp/ntpd/ntp_parser.c head/contrib/ntp/ntpd/ntp_parser.h head/contrib/ntp/ntpd/ntp_peer.c head/contrib/ntp/ntpd/ntp_proto.c head/contrib/ntp/ntpd/ntp_refclock.c head/contrib/ntp/ntpd/ntp_request.c head/contrib/ntp/ntpd/ntp_restrict.c head/contrib/ntp/ntpd/ntp_scanner.c head/contrib/ntp/ntpd/ntp_util.c head/contrib/ntp/ntpd/ntpd-opts.c head/contrib/ntp/ntpd/ntpd-opts.h head/contrib/ntp/ntpd/ntpd.1ntpdman head/contrib/ntp/ntpd/ntpd.1ntpdmdoc head/contrib/ntp/ntpd/ntpd.c head/contrib/ntp/ntpd/ntpd.html head/contrib/ntp/ntpd/ntpd.man.in head/contrib/ntp/ntpd/ntpd.mdoc.in head/contrib/ntp/ntpd/refclock_gpsdjson.c head/contrib/ntp/ntpd/refclock_jupiter.c head/contrib/ntp/ntpd/refclock_nmea.c head/contrib/ntp/ntpd/refclock_oncore.c head/contrib/ntp/ntpd/refclock_palisade.c head/contrib/ntp/ntpd/refclock_palisade.h head/contrib/ntp/ntpd/refclock_parse.c head/contrib/ntp/ntpd/refclock_zyfer.c head/contrib/ntp/ntpdate/ntpdate.c head/contrib/ntp/ntpdc/invoke-ntpdc.texi head/contrib/ntp/ntpdc/layout.std head/contrib/ntp/ntpdc/ntpdc-opts.c head/contrib/ntp/ntpdc/ntpdc-opts.h head/contrib/ntp/ntpdc/ntpdc.1ntpdcman head/contrib/ntp/ntpdc/ntpdc.1ntpdcmdoc head/contrib/ntp/ntpdc/ntpdc.c head/contrib/ntp/ntpdc/ntpdc.html head/contrib/ntp/ntpdc/ntpdc.man.in head/contrib/ntp/ntpdc/ntpdc.mdoc.in head/contrib/ntp/ntpdc/ntpdc_ops.c head/contrib/ntp/ntpq/Makefile.am head/contrib/ntp/ntpq/Makefile.in head/contrib/ntp/ntpq/invoke-ntpq.texi head/contrib/ntp/ntpq/ntpq-opts.c head/contrib/ntp/ntpq/ntpq-opts.h head/contrib/ntp/ntpq/ntpq-subs.c head/contrib/ntp/ntpq/ntpq.1ntpqman head/contrib/ntp/ntpq/ntpq.1ntpqmdoc head/contrib/ntp/ntpq/ntpq.c head/contrib/ntp/ntpq/ntpq.h head/contrib/ntp/ntpq/ntpq.html head/contrib/ntp/ntpq/ntpq.man.in head/contrib/ntp/ntpq/ntpq.mdoc.in head/contrib/ntp/ntpsnmpd/invoke-ntpsnmpd.texi head/contrib/ntp/ntpsnmpd/ntpsnmpd-opts.c head/contrib/ntp/ntpsnmpd/ntpsnmpd-opts.h head/contrib/ntp/ntpsnmpd/ntpsnmpd.1ntpsnmpdman head/contrib/ntp/ntpsnmpd/ntpsnmpd.1ntpsnmpdmdoc head/contrib/ntp/ntpsnmpd/ntpsnmpd.html head/contrib/ntp/ntpsnmpd/ntpsnmpd.man.in head/contrib/ntp/ntpsnmpd/ntpsnmpd.mdoc.in head/contrib/ntp/packageinfo.sh head/contrib/ntp/parseutil/dcfd.c head/contrib/ntp/scripts/build/mkver.in head/contrib/ntp/scripts/calc_tickadj/calc_tickadj-opts head/contrib/ntp/scripts/calc_tickadj/calc_tickadj.1calc_tickadjman head/contrib/ntp/scripts/calc_tickadj/calc_tickadj.1calc_tickadjmdoc head/contrib/ntp/scripts/calc_tickadj/calc_tickadj.html head/contrib/ntp/scripts/calc_tickadj/calc_tickadj.man.in head/contrib/ntp/scripts/calc_tickadj/calc_tickadj.mdoc.in head/contrib/ntp/scripts/calc_tickadj/invoke-calc_tickadj.texi head/contrib/ntp/scripts/invoke-plot_summary.texi head/contrib/ntp/scripts/invoke-summary.texi head/contrib/ntp/scripts/ntp-wait/invoke-ntp-wait.texi head/contrib/ntp/scripts/ntp-wait/ntp-wait-opts head/contrib/ntp/scripts/ntp-wait/ntp-wait.1ntp-waitman head/contrib/ntp/scripts/ntp-wait/ntp-wait.1ntp-waitmdoc head/contrib/ntp/scripts/ntp-wait/ntp-wait.html head/contrib/ntp/scripts/ntp-wait/ntp-wait.man.in head/contrib/ntp/scripts/ntp-wait/ntp-wait.mdoc.in head/contrib/ntp/scripts/ntpsweep/invoke-ntpsweep.texi head/contrib/ntp/scripts/ntpsweep/ntpsweep-opts head/contrib/ntp/scripts/ntpsweep/ntpsweep.1ntpsweepman head/contrib/ntp/scripts/ntpsweep/ntpsweep.1ntpsweepmdoc head/contrib/ntp/scripts/ntpsweep/ntpsweep.html head/contrib/ntp/scripts/ntpsweep/ntpsweep.man.in head/contrib/ntp/scripts/ntpsweep/ntpsweep.mdoc.in head/contrib/ntp/scripts/ntptrace/invoke-ntptrace.texi head/contrib/ntp/scripts/ntptrace/ntptrace-opts head/contrib/ntp/scripts/ntptrace/ntptrace.1ntptraceman head/contrib/ntp/scripts/ntptrace/ntptrace.1ntptracemdoc head/contrib/ntp/scripts/ntptrace/ntptrace.html head/contrib/ntp/scripts/ntptrace/ntptrace.man.in head/contrib/ntp/scripts/ntptrace/ntptrace.mdoc.in head/contrib/ntp/scripts/plot_summary-opts head/contrib/ntp/scripts/plot_summary.1plot_summaryman head/contrib/ntp/scripts/plot_summary.1plot_summarymdoc head/contrib/ntp/scripts/plot_summary.html head/contrib/ntp/scripts/plot_summary.man.in head/contrib/ntp/scripts/plot_summary.mdoc.in head/contrib/ntp/scripts/summary-opts head/contrib/ntp/scripts/summary.1summaryman head/contrib/ntp/scripts/summary.1summarymdoc head/contrib/ntp/scripts/summary.html head/contrib/ntp/scripts/summary.man.in head/contrib/ntp/scripts/summary.mdoc.in head/contrib/ntp/scripts/update-leap/invoke-update-leap.texi head/contrib/ntp/scripts/update-leap/update-leap-opts head/contrib/ntp/scripts/update-leap/update-leap.1update-leapman head/contrib/ntp/scripts/update-leap/update-leap.1update-leapmdoc head/contrib/ntp/scripts/update-leap/update-leap.html head/contrib/ntp/scripts/update-leap/update-leap.man.in head/contrib/ntp/scripts/update-leap/update-leap.mdoc.in head/contrib/ntp/sntp/COPYRIGHT head/contrib/ntp/sntp/configure head/contrib/ntp/sntp/configure.ac head/contrib/ntp/sntp/crypto.c head/contrib/ntp/sntp/include/copyright.def head/contrib/ntp/sntp/include/version.def head/contrib/ntp/sntp/include/version.texi head/contrib/ntp/sntp/invoke-sntp.texi head/contrib/ntp/sntp/libevent/build-aux/ar-lib head/contrib/ntp/sntp/libevent/build-aux/compile head/contrib/ntp/sntp/libevent/build-aux/config.guess head/contrib/ntp/sntp/libevent/build-aux/config.sub head/contrib/ntp/sntp/libevent/build-aux/depcomp head/contrib/ntp/sntp/libevent/build-aux/install-sh head/contrib/ntp/sntp/libevent/build-aux/missing head/contrib/ntp/sntp/libevent/build-aux/test-driver head/contrib/ntp/sntp/libevent/build-aux/ylwrap head/contrib/ntp/sntp/libevent/test/regress.gen.c head/contrib/ntp/sntp/libevent/test/regress.gen.h head/contrib/ntp/sntp/libopts/m4/libopts.m4 head/contrib/ntp/sntp/m4/ntp_problemtests.m4 head/contrib/ntp/sntp/m4/version.m4 head/contrib/ntp/sntp/main.c head/contrib/ntp/sntp/networking.c head/contrib/ntp/sntp/scm-rev head/contrib/ntp/sntp/sntp-opts.c head/contrib/ntp/sntp/sntp-opts.h head/contrib/ntp/sntp/sntp.1sntpman head/contrib/ntp/sntp/sntp.1sntpmdoc head/contrib/ntp/sntp/sntp.html head/contrib/ntp/sntp/sntp.man.in head/contrib/ntp/sntp/sntp.mdoc.in head/contrib/ntp/sntp/tests/run-crypto.c head/contrib/ntp/sntp/tests/run-keyFile.c head/contrib/ntp/sntp/tests/run-kodDatabase.c head/contrib/ntp/sntp/tests/run-kodFile.c head/contrib/ntp/sntp/tests/run-networking.c head/contrib/ntp/sntp/tests/run-packetHandling.c head/contrib/ntp/sntp/tests/run-packetProcessing.c head/contrib/ntp/sntp/tests/run-t-log.c head/contrib/ntp/sntp/tests/run-utilities.c head/contrib/ntp/sntp/tests/testconf.yml head/contrib/ntp/sntp/version.c head/contrib/ntp/util/invoke-ntp-keygen.texi head/contrib/ntp/util/ntp-keygen-opts.c head/contrib/ntp/util/ntp-keygen-opts.h head/contrib/ntp/util/ntp-keygen.1ntp-keygenman head/contrib/ntp/util/ntp-keygen.1ntp-keygenmdoc head/contrib/ntp/util/ntp-keygen.html head/contrib/ntp/util/ntp-keygen.man.in head/contrib/ntp/util/ntp-keygen.mdoc.in head/contrib/ntp/util/ntptime.c head/usr.sbin/ntp/config.h head/usr.sbin/ntp/libntp/Makefile Directory Properties: head/contrib/ntp/ (props changed) Modified: head/contrib/ntp/COPYRIGHT ============================================================================== --- head/contrib/ntp/COPYRIGHT Wed Mar 4 21:30:55 2020 (r358651) +++ head/contrib/ntp/COPYRIGHT Wed Mar 4 21:45:12 2020 (r358652) @@ -3,7 +3,7 @@ This file is automatically generated from html/copyrig jpg "Clone me," says Dolly sheepishly. - Last update: 2-Jan-2017 11:58 UTC + Last update: 4-Feb-2020 23:47 UTC __________________________________________________________________ The following copyright notice applies to all files collectively called @@ -32,7 +32,7 @@ This file is automatically generated from html/copyrig Burnicki is: *********************************************************************** * * -* Copyright (c) Network Time Foundation 2011-2017 * +* Copyright (c) Network Time Foundation 2011-2020 * * * * All Rights Reserved * * * Modified: head/contrib/ntp/ChangeLog ============================================================================== --- head/contrib/ntp/ChangeLog Wed Mar 4 21:30:55 2020 (r358651) +++ head/contrib/ntp/ChangeLog Wed Mar 4 21:45:12 2020 (r358652) @@ -1,4 +1,100 @@ --- +(4.2.8p14) 2020/03/03 Released by Harlan Stenn + +* [Sec 3610] process_control() should bail earlier on short packets. stenn@ + - Reported by Philippe Antoine +* [Sec 3596] Highly predictable timestamp attack. + - Reported by Miroslav Lichvar +* [Sec 3592] DoS attack on client ntpd + - Reported by Miroslav Lichvar +* [Bug 3637] Emit the version of ntpd in saveconfig. stenn@ +* [Bug 3636] NMEA: combine time/date from multiple sentences +* [Bug 3635] Make leapsecond file hash check optional +* [Bug 3634] Typo in discipline.html, reported by Jason Harrison. stenn@ +* [Bug 3628] raw DCF decoding - improve robustness with Zeller's congruence + - implement Zeller's congruence in libparse and libntp +* [Bug 3627] SIGSEGV on FreeBSD-12 with stack limit and stack gap + - integrated patch by Cy Schubert +* [Bug 3620] memory leak in ntpq sysinfo + - applied patch by Gerry Garvey +* [Bug 3619] Honour drefid setting in cooked mode and sysinfo + - applied patch by Gerry Garvey +* [Bug 3617] Add support for ACE III and Copernicus II receivers + - integrated patch by Richard Steedman +* [Bug 3615] accelerate refclock startup +* [Bug 3613] Propagate noselect to mobilized pool servers + - Reported by Martin Burnicki +* [Bug 3612] Use-of-uninitialized-value in receive function + - Reported by Philippe Antoine +* [Bug 3611] NMEA time interpreted incorrectly + - officially document new "trust date" mode bit for NMEA driver + - restore the (previously undocumented) "trust date" feature lost with [bug 3577] +* [Bug 3609] Fixing wrong falseticker in case of non-statistic jitter + - mostly based on a patch by Michael Haardt, implementing 'fudge minjitter' +* [Bug 3608] libparse fails to compile on S11.4SRU13 and later + - removed ffs() and fls() prototypes as per Brian Utterback +* [Bug 3604] Wrong param byte order passing into record_raw_stats() in + ntp_io.c + - fixed byte and paramter order as suggested by wei6410@sina.com +* [Bug 3601] Tests fail to link on platforms with ntp_cv_gc_sections_runs=no +* [Bug 3599] Build fails on linux-m68k due to alignment issues + - added padding as suggested by John Paul Adrian Glaubitz +* [Bug 3594] ntpd discards messages coming through nmead +* [Bug 3593] ntpd discards silently nmea messages after the 5th string +* [Bug 3590] Update refclock_oncore.c to the new GPS date API +* [Bug 3585] Unity tests mix buffered and unbuffered output + - stdout+stderr are set to line buffered during test setup now +* [Bug 3583] synchronization error + - set clock to base date if system time is before that limit +* [Bug 3582] gpsdjson refclock fudgetime1 adjustment is doubled +* [Bug 3580] Possible bug ntpq-subs (NULL dereference in dogetassoc) + - Reported by Paulo Neves +* [Bug 3577] Update refclock_zyfer.c to the new GPS date API + - also updates for refclock_nmea.c and refclock_jupiter.c +* [Bug 3576] New GPS date function API +* [Bug 3573] nptdate: missleading error message +* [Bug 3570] NMEA driver docs: talker ID not mentioned, typo +* [Bug 3569] cleanup MOD_NANO/STA_NANO handling for 'ntpadjtimex()' + - sidekick: service port resolution in 'ntpdate' +* [Bug 3550] Reproducible build: Respect SOURCE_DATE_EPOCH + - applied patch by Douglas Royds +* [Bug 3542] ntpdc monlist parameters cannot be set +* [Bug 3533] ntpdc peer_info ipv6 issues + - applied patch by Gerry Garvey +* [Bug 3531] make check: test-decodenetnum fails + - try to harden 'decodenetnum()' against 'getaddrinfo()' errors + - fix wrong cond-compile tests in unit tests +* [Bug 3517] Reducing build noise +* [Bug 3516] Require tooling from this decade + - patch by Philipp Prindeville +* [Bug 3515] Refactor ntpdmain() dispatcher loop and group common code + - patch by Philipp Prindeville +* [Bug 3511] Get rid of AC_LANG_SOURCE() warnings + - patch by Philipp Prindeville +* [Bug 3510] Flatten out the #ifdef nesting in ntpdmain() + - partial application of patch by Philipp Prindeville +* [Bug 3491] Signed values of LFP datatypes should always display a sign + - applied patch by Gerry Garvey & fixed unit tests +* [Bug 3490] Patch to support Trimble Resolution Receivers + - applied (modified) patch by Richard Steedman +* [Bug 3473] RefID of refclocks should always be text format + - applied patch by Gerry Garvey (with minor formatting changes) +* [Bug 3132] Building 4.2.8p8 with disabled local libopts fails + - applied patch by Miroslav Lichvar +* [Bug 3094] ntpd trying to listen for broadcasts on a completely ipv6 network + +* [Bug 2420] ntpd doesn't run and exits with retval 0 when invalid user + is specified with -u + - monitor daemon child startup & propagate exit codes +* [Bug 1433] runtime check whether the kernel really supports capabilities + - (modified) patch by Kurt Roeckx +* Clean up sntp/networking.c:sendpkt() error message. +* Provide more detail on unrecognized config file parser tokens. +* Startup log improvements. +* Update the copyright year. +* html/confopt.html: cleanup. + +--- (4.2.8p13) 2019/03/07 Released by Harlan Stenn * [Sec 3565] Crafted null dereference attack in authenticated Modified: head/contrib/ntp/CommitLog ============================================================================== --- head/contrib/ntp/CommitLog Wed Mar 4 21:30:55 2020 (r358651) +++ head/contrib/ntp/CommitLog Wed Mar 4 21:45:12 2020 (r358652) @@ -1,10 +1,3065 @@ -ChangeSet@1.3849, 2019-02-20 17:13:36-08:00, harlan@ntp-build.tal1.ntfo.org +ChangeSet@1.3896, 2020-03-03 17:42:43-08:00, ntpreleng@ntp-build.tal1.ntfo.org + NTP_4_2_8P14 + TAG: NTP_4_2_8P14 + + ChangeLog@1.1974 +1 -1 + NTP_4_2_8P14 + + ntpd/invoke-ntp.conf.texi@1.221 +1 -1 + NTP_4_2_8P14 + + ntpd/invoke-ntp.keys.texi@1.206 +1 -1 + NTP_4_2_8P14 + + ntpd/invoke-ntpd.texi@1.520 +2 -2 + NTP_4_2_8P14 + + ntpd/ntp.conf.5man@1.255 +2 -2 + NTP_4_2_8P14 + + ntpd/ntp.conf.5mdoc@1.255 +1 -1 + NTP_4_2_8P14 + + ntpd/ntp.conf.html@1.203 +1 -1 + NTP_4_2_8P14 + + ntpd/ntp.conf.man.in@1.255 +2 -2 + NTP_4_2_8P14 + + ntpd/ntp.conf.mdoc.in@1.255 +1 -1 + NTP_4_2_8P14 + + ntpd/ntp.keys.5man@1.240 +2 -2 + NTP_4_2_8P14 + + ntpd/ntp.keys.5mdoc@1.240 +1 -1 + NTP_4_2_8P14 + + ntpd/ntp.keys.html@1.201 +1 -1 + NTP_4_2_8P14 + + ntpd/ntp.keys.man.in@1.240 +2 -2 + NTP_4_2_8P14 + + ntpd/ntp.keys.mdoc.in@1.240 +1 -1 + NTP_4_2_8P14 + + ntpd/ntpd-opts.c@1.543 +7 -7 + NTP_4_2_8P14 + + ntpd/ntpd-opts.h@1.542 +3 -3 + NTP_4_2_8P14 + + ntpd/ntpd.1ntpdman@1.349 +2 -2 + NTP_4_2_8P14 + + ntpd/ntpd.1ntpdmdoc@1.349 +1 -1 + NTP_4_2_8P14 + + ntpd/ntpd.html@1.194 +2 -2 + NTP_4_2_8P14 + + ntpd/ntpd.man.in@1.349 +2 -2 + NTP_4_2_8P14 + + ntpd/ntpd.mdoc.in@1.349 +1 -1 + NTP_4_2_8P14 + + ntpdc/invoke-ntpdc.texi@1.517 +2 -2 + NTP_4_2_8P14 + + ntpdc/ntpdc-opts.c@1.536 +7 -7 + NTP_4_2_8P14 + + ntpdc/ntpdc-opts.h@1.535 +3 -3 + NTP_4_2_8P14 + + ntpdc/ntpdc.1ntpdcman@1.348 +2 -2 + NTP_4_2_8P14 + + ntpdc/ntpdc.1ntpdcmdoc@1.348 +1 -1 + NTP_4_2_8P14 + + ntpdc/ntpdc.html@1.363 +2 -2 + NTP_4_2_8P14 + + ntpdc/ntpdc.man.in@1.348 +2 -2 + NTP_4_2_8P14 + + ntpdc/ntpdc.mdoc.in@1.348 +1 -1 + NTP_4_2_8P14 + + ntpq/invoke-ntpq.texi@1.527 +2 -2 + NTP_4_2_8P14 + + ntpq/ntpq-opts.c@1.545 +7 -7 + NTP_4_2_8P14 + + ntpq/ntpq-opts.h@1.543 +3 -3 + NTP_4_2_8P14 + + ntpq/ntpq.1ntpqman@1.355 +2 -2 + NTP_4_2_8P14 + + ntpq/ntpq.1ntpqmdoc@1.355 +1 -1 + NTP_4_2_8P14 + + ntpq/ntpq.html@1.194 +2 -2 + NTP_4_2_8P14 + + ntpq/ntpq.man.in@1.355 +2 -2 + NTP_4_2_8P14 + + ntpq/ntpq.mdoc.in@1.355 +1 -1 + NTP_4_2_8P14 + + ntpsnmpd/invoke-ntpsnmpd.texi@1.519 +1 -1 + NTP_4_2_8P14 + + ntpsnmpd/ntpsnmpd-opts.c@1.538 +7 -7 + NTP_4_2_8P14 + + ntpsnmpd/ntpsnmpd-opts.h@1.537 +3 -3 + NTP_4_2_8P14 + + ntpsnmpd/ntpsnmpd.1ntpsnmpdman@1.348 +2 -2 + NTP_4_2_8P14 + + ntpsnmpd/ntpsnmpd.1ntpsnmpdmdoc@1.348 +1 -1 + NTP_4_2_8P14 + + ntpsnmpd/ntpsnmpd.html@1.187 +1 -1 + NTP_4_2_8P14 + + ntpsnmpd/ntpsnmpd.man.in@1.348 +2 -2 + NTP_4_2_8P14 + + ntpsnmpd/ntpsnmpd.mdoc.in@1.348 +1 -1 + NTP_4_2_8P14 + + packageinfo.sh@1.544 +1 -1 + NTP_4_2_8P14 + + scripts/calc_tickadj/calc_tickadj.1calc_tickadjman@1.109 +2 -2 + NTP_4_2_8P14 + + scripts/calc_tickadj/calc_tickadj.1calc_tickadjmdoc@1.110 +1 -1 + NTP_4_2_8P14 + + scripts/calc_tickadj/calc_tickadj.html@1.110 +1 -1 + NTP_4_2_8P14 + + scripts/calc_tickadj/calc_tickadj.man.in@1.108 +2 -2 + NTP_4_2_8P14 + + scripts/calc_tickadj/calc_tickadj.mdoc.in@1.110 +1 -1 + NTP_4_2_8P14 + + scripts/calc_tickadj/invoke-calc_tickadj.texi@1.113 +1 -1 + NTP_4_2_8P14 + + scripts/invoke-plot_summary.texi@1.131 +2 -2 + NTP_4_2_8P14 + + scripts/invoke-summary.texi@1.130 +2 -2 + NTP_4_2_8P14 + + scripts/ntp-wait/invoke-ntp-wait.texi@1.341 +2 -2 + NTP_4_2_8P14 + + scripts/ntp-wait/ntp-wait-opts@1.77 +2 -2 + NTP_4_2_8P14 + + scripts/ntp-wait/ntp-wait.1ntp-waitman@1.337 +2 -2 + NTP_4_2_8P14 + + scripts/ntp-wait/ntp-wait.1ntp-waitmdoc@1.338 +1 -1 + NTP_4_2_8P14 + + scripts/ntp-wait/ntp-wait.html@1.359 +2 -2 + NTP_4_2_8P14 + + scripts/ntp-wait/ntp-wait.man.in@1.337 +2 -2 + NTP_4_2_8P14 + + scripts/ntp-wait/ntp-wait.mdoc.in@1.338 +1 -1 + NTP_4_2_8P14 + + scripts/ntpsweep/invoke-ntpsweep.texi@1.128 +2 -2 + NTP_4_2_8P14 + + scripts/ntpsweep/ntpsweep-opts@1.79 +2 -2 + NTP_4_2_8P14 + + scripts/ntpsweep/ntpsweep.1ntpsweepman@1.116 +2 -2 + NTP_4_2_8P14 + + scripts/ntpsweep/ntpsweep.1ntpsweepmdoc@1.116 +1 -1 + NTP_4_2_8P14 + + scripts/ntpsweep/ntpsweep.html@1.131 +2 -2 + NTP_4_2_8P14 + + scripts/ntpsweep/ntpsweep.man.in@1.116 +2 -2 + NTP_4_2_8P14 + + scripts/ntpsweep/ntpsweep.mdoc.in@1.117 +1 -1 + NTP_4_2_8P14 + + scripts/ntptrace/invoke-ntptrace.texi@1.130 +2 -2 + NTP_4_2_8P14 + + scripts/ntptrace/ntptrace-opts@1.79 +2 -2 + NTP_4_2_8P14 + + scripts/ntptrace/ntptrace.1ntptraceman@1.116 +2 -2 + NTP_4_2_8P14 + + scripts/ntptrace/ntptrace.1ntptracemdoc@1.117 +1 -1 + NTP_4_2_8P14 + + scripts/ntptrace/ntptrace.html@1.132 +2 -2 + NTP_4_2_8P14 + + scripts/ntptrace/ntptrace.man.in@1.116 +2 -2 + NTP_4_2_8P14 + + scripts/ntptrace/ntptrace.mdoc.in@1.118 +1 -1 + NTP_4_2_8P14 + + scripts/plot_summary-opts@1.80 +2 -2 + NTP_4_2_8P14 + + scripts/plot_summary.1plot_summaryman@1.129 +2 -2 + NTP_4_2_8P14 + + scripts/plot_summary.1plot_summarymdoc@1.129 +1 -1 + NTP_4_2_8P14 + + scripts/plot_summary.html@1.134 +2 -2 + NTP_4_2_8P14 + + scripts/plot_summary.man.in@1.129 +2 -2 + NTP_4_2_8P14 + + scripts/plot_summary.mdoc.in@1.129 +1 -1 + NTP_4_2_8P14 + + scripts/summary-opts@1.79 +2 -2 + NTP_4_2_8P14 + + scripts/summary.1summaryman@1.128 +2 -2 + NTP_4_2_8P14 + + scripts/summary.1summarymdoc@1.128 +1 -1 + NTP_4_2_8P14 + + scripts/summary.html@1.133 +2 -2 + NTP_4_2_8P14 + + scripts/summary.man.in@1.128 +2 -2 + NTP_4_2_8P14 + + scripts/summary.mdoc.in@1.128 +1 -1 + NTP_4_2_8P14 + + scripts/update-leap/invoke-update-leap.texi@1.29 +1 -1 + NTP_4_2_8P14 + + scripts/update-leap/update-leap-opts@1.30 +2 -2 + NTP_4_2_8P14 + + scripts/update-leap/update-leap.1update-leapman@1.29 +2 -2 + NTP_4_2_8P14 + + scripts/update-leap/update-leap.1update-leapmdoc@1.29 +1 -1 + NTP_4_2_8P14 + + scripts/update-leap/update-leap.html@1.30 +1 -1 + NTP_4_2_8P14 + + scripts/update-leap/update-leap.man.in@1.29 +2 -2 + NTP_4_2_8P14 + + scripts/update-leap/update-leap.mdoc.in@1.29 +1 -1 + NTP_4_2_8P14 + + sntp/invoke-sntp.texi@1.519 +2 -2 + NTP_4_2_8P14 + + sntp/sntp-opts.c@1.539 +7 -7 + NTP_4_2_8P14 + + sntp/sntp-opts.h@1.537 +3 -3 + NTP_4_2_8P14 + + sntp/sntp.1sntpman@1.354 +2 -2 + NTP_4_2_8P14 + + sntp/sntp.1sntpmdoc@1.354 +1 -1 + NTP_4_2_8P14 + + sntp/sntp.html@1.535 +2 -2 + NTP_4_2_8P14 + + sntp/sntp.man.in@1.354 +2 -2 + NTP_4_2_8P14 + + sntp/sntp.mdoc.in@1.354 +1 -1 + NTP_4_2_8P14 + + util/invoke-ntp-keygen.texi@1.522 +2 -2 + NTP_4_2_8P14 + + util/ntp-keygen-opts.c@1.541 +7 -7 + NTP_4_2_8P14 + + util/ntp-keygen-opts.h@1.539 +3 -3 + NTP_4_2_8P14 + + util/ntp-keygen.1ntp-keygenman@1.350 +2 -2 + NTP_4_2_8P14 + + util/ntp-keygen.1ntp-keygenmdoc@1.350 +1 -1 + NTP_4_2_8P14 + + util/ntp-keygen.html@1.195 +2 -2 + NTP_4_2_8P14 + + util/ntp-keygen.man.in@1.350 +2 -2 + NTP_4_2_8P14 + + util/ntp-keygen.mdoc.in@1.350 +1 -1 + NTP_4_2_8P14 + +ChangeSet@1.3895, 2020-03-03 17:09:57-08:00, ntpreleng@ntp-build.tal1.ntfo.org + quiet some debug messages + + ntpd/ntp_config.c@1.375 +0 -2 + quiet some debug messages + + ntpd/ntp_peer.c@1.166 +2 -0 + quiet some debug messages + +ChangeSet@1.3894, 2020-03-03 16:49:54-08:00, ntpreleng@ntp-build.tal1.ntfo.org + NTP_4_2_8P13 + TAG: NTP_4_2_8P13 + + ChangeLog@1.1973 +1 -0 + NTP_4_2_8P13 + + ntpd/invoke-ntp.conf.texi@1.220 +31 -7 + NTP_4_2_8P13 + + ntpd/invoke-ntp.keys.texi@1.205 +1 -1 + NTP_4_2_8P13 + + ntpd/invoke-ntpd.texi@1.519 +3 -3 + NTP_4_2_8P13 + + ntpd/ntp.conf.5man@1.254 +34 -9 + NTP_4_2_8P13 + + ntpd/ntp.conf.5mdoc@1.254 +41 -6 + NTP_4_2_8P13 + + ntpd/ntp.conf.html@1.202 +33 -7 + NTP_4_2_8P13 + + ntpd/ntp.conf.man.in@1.254 +34 -9 + NTP_4_2_8P13 + + ntpd/ntp.conf.mdoc.in@1.254 +41 -6 + NTP_4_2_8P13 + + ntpd/ntp.keys.5man@1.239 +2 -2 + NTP_4_2_8P13 + + ntpd/ntp.keys.5mdoc@1.239 +3 -3 + NTP_4_2_8P13 + + ntpd/ntp.keys.man.in@1.239 +2 -2 + NTP_4_2_8P13 + + ntpd/ntp.keys.mdoc.in@1.239 +3 -3 + NTP_4_2_8P13 + + ntpd/ntpd-opts.c@1.542 +2 -2 + NTP_4_2_8P13 + + ntpd/ntpd-opts.h@1.541 +3 -3 + NTP_4_2_8P13 + + ntpd/ntpd.1ntpdman@1.348 +2 -2 + NTP_4_2_8P13 + + ntpd/ntpd.1ntpdmdoc@1.348 +2 -2 + NTP_4_2_8P13 + + ntpd/ntpd.man.in@1.348 +2 -2 + NTP_4_2_8P13 + + ntpd/ntpd.mdoc.in@1.348 +2 -2 + NTP_4_2_8P13 + + ntpdc/invoke-ntpdc.texi@1.516 +1 -1 + NTP_4_2_8P13 + + ntpdc/ntpdc-opts.c@1.535 +2 -2 + NTP_4_2_8P13 + + ntpdc/ntpdc-opts.h@1.534 +3 -3 + NTP_4_2_8P13 + + ntpdc/ntpdc.1ntpdcman@1.347 +2 -2 + NTP_4_2_8P13 + + ntpdc/ntpdc.1ntpdcmdoc@1.347 +2 -2 + NTP_4_2_8P13 + + ntpdc/ntpdc.html@1.362 +408 -353 + NTP_4_2_8P13 + + ntpdc/ntpdc.man.in@1.347 +2 -2 + NTP_4_2_8P13 + + ntpdc/ntpdc.mdoc.in@1.347 +2 -2 + NTP_4_2_8P13 + + ntpq/invoke-ntpq.texi@1.526 +1 -1 + NTP_4_2_8P13 + + ntpq/ntpq-opts.c@1.544 +2 -2 + NTP_4_2_8P13 + + ntpq/ntpq-opts.h@1.542 +3 -3 + NTP_4_2_8P13 + + ntpq/ntpq.1ntpqman@1.354 +2 -2 + NTP_4_2_8P13 + + ntpq/ntpq.1ntpqmdoc@1.354 +2 -2 + NTP_4_2_8P13 + + ntpq/ntpq.html@1.193 +1 -1 + NTP_4_2_8P13 + + ntpq/ntpq.man.in@1.354 +2 -2 + NTP_4_2_8P13 + + ntpq/ntpq.mdoc.in@1.354 +2 -2 + NTP_4_2_8P13 + + ntpsnmpd/invoke-ntpsnmpd.texi@1.518 +1 -1 + NTP_4_2_8P13 + + ntpsnmpd/ntpsnmpd-opts.c@1.537 +2 -2 + NTP_4_2_8P13 + + ntpsnmpd/ntpsnmpd-opts.h@1.536 +3 -3 + NTP_4_2_8P13 + + ntpsnmpd/ntpsnmpd.1ntpsnmpdman@1.347 +2 -2 + NTP_4_2_8P13 + + ntpsnmpd/ntpsnmpd.1ntpsnmpdmdoc@1.347 +2 -2 + NTP_4_2_8P13 + + ntpsnmpd/ntpsnmpd.man.in@1.347 +2 -2 + NTP_4_2_8P13 + + ntpsnmpd/ntpsnmpd.mdoc.in@1.347 +2 -2 + NTP_4_2_8P13 + + scripts/calc_tickadj/calc_tickadj.1calc_tickadjman@1.108 +2 -2 + NTP_4_2_8P13 + + scripts/calc_tickadj/calc_tickadj.1calc_tickadjmdoc@1.109 +2 -2 + NTP_4_2_8P13 + + scripts/calc_tickadj/calc_tickadj.html@1.109 +172 -128 + NTP_4_2_8P13 + + scripts/calc_tickadj/calc_tickadj.man.in@1.107 +2 -2 + NTP_4_2_8P13 + + scripts/calc_tickadj/calc_tickadj.mdoc.in@1.109 +2 -2 + NTP_4_2_8P13 + + scripts/calc_tickadj/invoke-calc_tickadj.texi@1.112 +2 -2 + NTP_4_2_8P13 + + scripts/invoke-plot_summary.texi@1.130 +2 -2 + NTP_4_2_8P13 + + scripts/invoke-summary.texi@1.129 +2 -2 + NTP_4_2_8P13 + + scripts/ntp-wait/invoke-ntp-wait.texi@1.340 +2 -2 + NTP_4_2_8P13 + + scripts/ntp-wait/ntp-wait-opts@1.76 +2 -2 + NTP_4_2_8P13 + + scripts/ntp-wait/ntp-wait.1ntp-waitman@1.336 +2 -2 + NTP_4_2_8P13 + + scripts/ntp-wait/ntp-wait.1ntp-waitmdoc@1.337 +2 -2 + NTP_4_2_8P13 + + scripts/ntp-wait/ntp-wait.html@1.358 +181 -152 + NTP_4_2_8P13 + + scripts/ntp-wait/ntp-wait.man.in@1.336 +2 -2 + NTP_4_2_8P13 + + scripts/ntp-wait/ntp-wait.mdoc.in@1.337 +2 -2 + NTP_4_2_8P13 + + scripts/ntpsweep/invoke-ntpsweep.texi@1.127 +2 -2 + NTP_4_2_8P13 + + scripts/ntpsweep/ntpsweep-opts@1.78 +2 -2 + NTP_4_2_8P13 + + scripts/ntpsweep/ntpsweep.1ntpsweepman@1.115 +2 -2 + NTP_4_2_8P13 + + scripts/ntpsweep/ntpsweep.1ntpsweepmdoc@1.115 +2 -2 + NTP_4_2_8P13 + + scripts/ntpsweep/ntpsweep.html@1.130 +188 -152 + NTP_4_2_8P13 + + scripts/ntpsweep/ntpsweep.man.in@1.115 +2 -2 + NTP_4_2_8P13 + + scripts/ntpsweep/ntpsweep.mdoc.in@1.116 +2 -2 + NTP_4_2_8P13 + + scripts/ntptrace/invoke-ntptrace.texi@1.129 +2 -2 + NTP_4_2_8P13 + + scripts/ntptrace/ntptrace-opts@1.78 +2 -2 + NTP_4_2_8P13 + + scripts/ntptrace/ntptrace.1ntptraceman@1.115 +2 -2 + NTP_4_2_8P13 + + scripts/ntptrace/ntptrace.1ntptracemdoc@1.116 +2 -2 + NTP_4_2_8P13 + + scripts/ntptrace/ntptrace.html@1.131 +179 -129 + NTP_4_2_8P13 + + scripts/ntptrace/ntptrace.man.in@1.115 +2 -2 + NTP_4_2_8P13 + + scripts/ntptrace/ntptrace.mdoc.in@1.117 +2 -2 + NTP_4_2_8P13 + + scripts/plot_summary-opts@1.79 +2 -2 + NTP_4_2_8P13 + + scripts/plot_summary.1plot_summaryman@1.128 +2 -2 + NTP_4_2_8P13 + + scripts/plot_summary.1plot_summarymdoc@1.128 +2 -2 + NTP_4_2_8P13 + + scripts/plot_summary.html@1.133 +203 -161 + NTP_4_2_8P13 + + scripts/plot_summary.man.in@1.128 +2 -2 + NTP_4_2_8P13 + + scripts/plot_summary.mdoc.in@1.128 +2 -2 + NTP_4_2_8P13 + + scripts/summary-opts@1.78 +2 -2 + NTP_4_2_8P13 + + scripts/summary.1summaryman@1.127 +2 -2 + NTP_4_2_8P13 + + scripts/summary.1summarymdoc@1.127 +2 -2 + NTP_4_2_8P13 + + scripts/summary.html@1.132 +184 -136 + NTP_4_2_8P13 + + scripts/summary.man.in@1.127 +2 -2 + NTP_4_2_8P13 + + scripts/summary.mdoc.in@1.127 +2 -2 + NTP_4_2_8P13 + + scripts/update-leap/invoke-update-leap.texi@1.28 +1 -1 + NTP_4_2_8P13 + + scripts/update-leap/update-leap-opts@1.29 +2 -2 + NTP_4_2_8P13 + + scripts/update-leap/update-leap.1update-leapman@1.28 +2 -2 + NTP_4_2_8P13 + + scripts/update-leap/update-leap.1update-leapmdoc@1.28 +2 -2 + NTP_4_2_8P13 + + scripts/update-leap/update-leap.html@1.29 +1 -1 + NTP_4_2_8P13 + + scripts/update-leap/update-leap.man.in@1.28 +2 -2 + NTP_4_2_8P13 + + scripts/update-leap/update-leap.mdoc.in@1.28 +2 -2 + NTP_4_2_8P13 + + sntp/invoke-sntp.texi@1.518 +1 -1 + NTP_4_2_8P13 + + sntp/sntp-opts.c@1.538 +2 -2 + NTP_4_2_8P13 + + sntp/sntp-opts.h@1.536 +3 -3 + NTP_4_2_8P13 + + sntp/sntp.1sntpman@1.353 +2 -2 + NTP_4_2_8P13 + + sntp/sntp.1sntpmdoc@1.353 +2 -2 + NTP_4_2_8P13 + + sntp/sntp.html@1.534 +472 -418 + NTP_4_2_8P13 + + sntp/sntp.man.in@1.353 +2 -2 + NTP_4_2_8P13 + + sntp/sntp.mdoc.in@1.353 +2 -2 + NTP_4_2_8P13 + + util/invoke-ntp-keygen.texi@1.521 +1 -1 + NTP_4_2_8P13 + + util/ntp-keygen-opts.c@1.540 +2 -2 + NTP_4_2_8P13 + + util/ntp-keygen-opts.h@1.538 +3 -3 + NTP_4_2_8P13 + + util/ntp-keygen.1ntp-keygenman@1.349 +2 -2 + NTP_4_2_8P13 + + util/ntp-keygen.1ntp-keygenmdoc@1.349 +2 -2 + NTP_4_2_8P13 + + util/ntp-keygen.html@1.194 +1 -1 + NTP_4_2_8P13 + + util/ntp-keygen.man.in@1.349 +2 -2 + NTP_4_2_8P13 + + util/ntp-keygen.mdoc.in@1.349 +2 -2 + NTP_4_2_8P13 + +ChangeSet@1.3893, 2020-03-03 16:25:14-08:00, ntpreleng@ntp-build.tal1.ntfo.org + Replace line with head -1 + + scripts/build/addChangeLogTag@1.6 +1 -1 + Replace line with head -1 + +ChangeSet@1.3892, 2020-03-03 16:05:38-08:00, ntpreleng@ntp-build.tal1.ntfo.org + provide get_pollskew() for simulator + + ntpd/ntp_config.c@1.374 +2 -2 + provide get_pollskew() for simulator + +ChangeSet@1.3844.24.1, 2020-03-03 03:30:13-08:00, ntpreleng@ntp-build.tal1.ntfo.org + NTP_4_2_8P13 + TAG: NTP_4_2_8P13 (currently on 1.3894) + + BitKeeper/triggers/2mirrors@1.11 +6 -2 + NTP_4_2_8P13 + + ntpd/ntpd-opts.c@1.539.1.1 +1 -1 + NTP_4_2_8P13 + + ntpd/ntpd-opts.h@1.538.1.1 +1 -1 + NTP_4_2_8P13 + + ntpd/ntpd.html@1.193 +3 -3 + NTP_4_2_8P13 + + ntpd/ntpdsim-opts.c@1.29 +372 -340 + NTP_4_2_8P13 + + ntpd/ntpdsim-opts.h@1.29 +44 -37 + NTP_4_2_8P13 + + ntpdc/ntpdc-opts.c@1.532.1.1 +1 -1 + NTP_4_2_8P13 + + ntpdc/ntpdc-opts.h@1.531.1.1 +1 -1 + NTP_4_2_8P13 + + ntpq/ntpq-opts.c@1.541.1.1 +1 -1 + NTP_4_2_8P13 + + ntpq/ntpq-opts.h@1.539.1.1 +1 -1 + NTP_4_2_8P13 + + ntpq/ntpq.html@1.192 +1 -1 + NTP_4_2_8P13 + + ntpsnmpd/ntpsnmpd-opts.c@1.534.1.1 +1 -1 + NTP_4_2_8P13 + + ntpsnmpd/ntpsnmpd-opts.h@1.533.1.1 +1 -1 + NTP_4_2_8P13 + + scripts/calc_tickadj/calc_tickadj-opts@1.10 +2 -2 + NTP_4_2_8P13 + + scripts/ntp-wait/invoke-ntp-wait.texi@1.337.1.1 +1 -1 + NTP_4_2_8P13 + + scripts/ntp-wait/ntp-wait-opts@1.73.1.1 +1 -1 + NTP_4_2_8P13 + + scripts/ntpsweep/ntpsweep-opts@1.75.1.1 +1 -1 + NTP_4_2_8P13 + + scripts/ntptrace/invoke-ntptrace.texi@1.126.1.1 +1 -1 + NTP_4_2_8P13 + + scripts/ntptrace/ntptrace-opts@1.75.1.1 +1 -1 + NTP_4_2_8P13 + + scripts/plot_summary-opts@1.76.1.1 +1 -1 + NTP_4_2_8P13 + + scripts/summary-opts@1.75.1.1 +1 -1 + NTP_4_2_8P13 + + scripts/update-leap/update-leap-opts@1.26.1.1 +1 -1 + NTP_4_2_8P13 + + sntp/sntp-opts.c@1.535.1.1 +1 -1 + NTP_4_2_8P13 + + sntp/sntp-opts.h@1.533.1.1 +1 -1 + NTP_4_2_8P13 + + util/ntp-keygen-opts.c@1.537.1.1 +1 -1 + NTP_4_2_8P13 + + util/ntp-keygen-opts.h@1.535.1.1 +1 -1 + NTP_4_2_8P13 + + util/ntp-keygen.html@1.193 +1 -1 + NTP_4_2_8P13 + +ChangeSet@1.3888, 2020-03-03 07:26:56+00:00, stenn@psp-deb1.ntp.org + cleanup + + NEWS@1.197.1.3 +3 -2 + cleanup + +ChangeSet@1.3887, 2020-02-18 05:11:26+00:00, stenn@psp-deb1.ntp.org + Cleanup distcheck psl* files + + ntpd/Makefile.am@1.138 +11 -0 + Cleanup distcheck psl* files + +ChangeSet@1.3886, 2020-02-18 05:10:35+00:00, stenn@psp-deb1.ntp.org + Distribute ntp_calgps.h + + include/Makefile.am@1.58 +1 -0 + Distribute ntp_calgps.h + +ChangeSet@1.3885, 2020-02-18 03:32:51+00:00, stenn@psp-deb1.ntp.org + Update the NEWS file for p14 + + NEWS@1.197.1.2 +107 -0 + Update the NEWS file for p14 + +ChangeSet@1.3884, 2020-02-17 11:05:46+00:00, stenn@psp-deb1.ntp.org + merge cleanup + + ntpd/ntp_proto.c@1.432 +1 -1 + merge cleanup + +ChangeSet@1.3881, 2020-02-17 08:50:00+00:00, stenn@psp-deb1.ntp.org + update + + ntpd/ntp_keyword.h@1.38 +545 -539 + update + +ChangeSet@1.3880, 2020-02-17 08:48:45+00:00, stenn@psp-deb1.ntp.org + Startp logging improvements. + Bug3596. + + html/accopt.html@1.48 +7 -2 + cleanup. + bug3596: document 'serverresponse fuzz' + + html/confopt.html@1.64.1.1 +22 -9 + Cleanup. + + Bug 3596: document xmtnonce + + html/miscopt.html@1.93 +19 -1 + Cleanup. + + bug3596: document pollskewlist + + include/Makefile.am@1.57 +1 -0 + pollskew upodates + + include/ntp.h@1.232 +8 -2 + bug3596 chagnes: + - srvfuzrft patches + - pollskew updates + - xmtnonce + + include/ntp_config.h@1.89 +27 -20 + bug3596 updates: + - pollskewlist + - srvfuzrft patches + + include/ntp_psl.h@1.1 +17 -0 + BitKeeper file include/ntp_psl.h + --- + bug3596 + + include/ntp_psl.h@1.0 +0 -0 + + include/ntp_request.h@1.54 +2 -1 + srvfuzrft patches + + include/ntp_stdlib.h@1.88 +1 -1 + randomizepoll/server response fuzz reftime fixes + + include/ntpd.h@1.207 +1 -1 + bug3596 cleanup + + libntp/statestr.c@1.31 +12 -5 + bug3596 srvrspfuz fixes + + ntpd/Makefile.am@1.137 +37 -7 + bug3596 pollskewlist changes + + ntpd/complete.conf.in@1.37 +4 -2 + bug3596: randompoll, pollskew xmtnonce + + ntpd/keyword-gen-utd@1.35 +1 -1 + Keyword table updates + + ntpd/keyword-gen.c@1.42 +3 -3 + bug3596: serverresponse fuzz, pollskewlist, xmtnonce + + ntpd/ntp.conf.def@1.34 +40 -4 + Cleanup. + bug3596: xmtnonce, serverresponse fuzz, pollskewlist, + + ntpd/ntp_config.c@1.373 +250 -26 + bug3596: serverresponse fuzz, pollskewlist, xmtnonce + + ntpd/ntp_loopfilter.c@1.195 +1 -1 + pollskew upodates + + ntpd/ntp_parser.c@1.117 +1298 -1283 + bug3596 *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@freebsd.org Wed Mar 4 21:53:56 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 95E4A253477; Wed, 4 Mar 2020 21:53:56 +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 48XnhN36Bwz3MyG; Wed, 4 Mar 2020 21:53:56 +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 3921824C73; Wed, 4 Mar 2020 21:53:56 +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 024LrtGc054291; Wed, 4 Mar 2020 21:53:55 GMT (envelope-from manu@FreeBSD.org) Received: (from manu@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 024LrsRC054283; Wed, 4 Mar 2020 21:53:54 GMT (envelope-from manu@FreeBSD.org) Message-Id: <202003042153.024LrsRC054283@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: manu set sender to manu@FreeBSD.org using -f From: Emmanuel Vadot Date: Wed, 4 Mar 2020 21:53: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: r358653 - in stable/12: share/man/man9 sys/arm/allwinner sys/arm/broadcom/bcm2835 sys/arm64/rockchip sys/dev/fdt X-SVN-Group: stable-12 X-SVN-Commit-Author: manu X-SVN-Commit-Paths: in stable/12: share/man/man9 sys/arm/allwinner sys/arm/broadcom/bcm2835 sys/arm64/rockchip sys/dev/fdt X-SVN-Commit-Revision: 358653 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages 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, 04 Mar 2020 21:53:56 -0000 Author: manu Date: Wed Mar 4 21:53:54 2020 New Revision: 358653 URL: https://svnweb.freebsd.org/changeset/base/358653 Log: MFC r348885, r351543, r356806-r356807 r348885 by bz: A bit of code hygiene (no functional changes). Hide unused code under #ifdef notyet (in one case the only caller is under that same ifdef), or if it is arm (not arm64) specific code under the __arm__ ifdef to not yield -Wunused-function warnings during the arm64 kernel compile. r351543 by mmel: Add support for RK3288 into existing RockChip drivers. This patch ensures only minimal level of compatibility necessary to boot on RK3288 based boards. GPIO and pinctrl interaction, missing in current implementation, will be improved by own patch in the near future. MFC with: r351452 r356806: fdt_pinctrl: Add new methods for gpios Most of the gpio controller cannot configure or get the configuration of the pin muxing as it's usually handled in the pinctrl driver. But they can know what is the pinmuxing driver either because they are child of it or via the gpio-range property. Add some new methods to fdt_pinctrl that a pin controller can implement. Some methods are : fdt_pinctrl_is_gpio: Use to know if the pin in the gpio mode fdt_pinctrl_set_flags: Set the flags of the pin (pullup/pulldown etc ...) fdt_pinctrl_get_flags: Get the flags of the pin (pullup/pulldown etc ...) The defaults method returns EOPNOTSUPP. Reviewed by: ian, bcr (manpages) Differential Revision: https://reviews.freebsd.org/D23093 r356807: arm64: rockchip: Add new interface for rk_pinctrl The gpio controller in rockchips SoC in a child of the pinctrl driver and cannot control pullups and pulldowns. Use the new fdt_pinctrl interface for accessing pin capabilities and setting them. We can now report that every pins is capable of being IN or OUT function and PULLUP PULLDOWN. If the pin isn't in gpio mode no changes will be allowed. Reviewed by: ganbold (previous version) Differential Revision: https://reviews.freebsd.org/D22849 Modified: stable/12/share/man/man9/fdt_pinctrl.9 stable/12/sys/arm/allwinner/a10_timer.c stable/12/sys/arm/broadcom/bcm2835/bcm2835_sdhost.c stable/12/sys/arm64/rockchip/if_dwc_rk.c stable/12/sys/arm64/rockchip/rk_gpio.c stable/12/sys/arm64/rockchip/rk_grf.c stable/12/sys/arm64/rockchip/rk_pinctrl.c stable/12/sys/dev/fdt/fdt_pinctrl_if.m Directory Properties: stable/12/ (props changed) Modified: stable/12/share/man/man9/fdt_pinctrl.9 ============================================================================== --- stable/12/share/man/man9/fdt_pinctrl.9 Wed Mar 4 21:45:12 2020 (r358652) +++ stable/12/share/man/man9/fdt_pinctrl.9 Wed Mar 4 21:53:54 2020 (r358653) @@ -125,6 +125,36 @@ foo_configure_pins(device_t dev, phandle_t cfgxref) } static int +foo_is_gpio(device_t dev, device_t gpiodev, bool *is_gpio) +{ + return (foo_is_pin_func_gpio(is_gpio)); +} + +static int +foo_set_flags(device_t dev, device_t gpiodev, uint32_t pin, uint32_t flags) +{ + int rv; + + rv = foo_is_pin_func_gpio(is_gpio); + if (rv != 0) + return (rv); + foo_set_flags(pin, flags); + return (0); +} + +static int +foo_get_flags(device_t dev, device_t gpiodev, uint32_t pin, uint32_t *flags) +{ + int rv; + + rv = foo_is_pin_func_gpio(is_gpio); + if (rv != 0) + return (rv); + foo_get_flags(pin, flags); + return (0); +} + +static int foo_attach(device_t dev) { ... @@ -144,6 +174,9 @@ static device_method_t foo_methods[] = { /* fdt_pinctrl interface */ DEVMETHOD(fdt_pinctrl_configure, foo_configure_pins), + DEVMETHOD(fdt_pinctrl_is_gpio, foo_is_gpio), + DEVMETHOD(fdt_pinctrl_set_flags, foo_set_flags), + DEVMETHOD(fdt_pinctrl_get_flags, foo_get_flags), /* Terminate method list */ DEVMETHOD_END Modified: stable/12/sys/arm/allwinner/a10_timer.c ============================================================================== --- stable/12/sys/arm/allwinner/a10_timer.c Wed Mar 4 21:45:12 2020 (r358652) +++ stable/12/sys/arm/allwinner/a10_timer.c Wed Mar 4 21:53:54 2020 (r358653) @@ -108,12 +108,16 @@ struct a10_timer_softc { bus_write_4(sc->res[A10_TIMER_MEMRES], reg, val) static u_int a10_timer_get_timecount(struct timecounter *); +#if defined(__arm__) static int a10_timer_timer_start(struct eventtimer *, sbintime_t first, sbintime_t period); static int a10_timer_timer_stop(struct eventtimer *); +#endif static uint64_t timer_read_counter64(struct a10_timer_softc *sc); +#if defined(__arm__) static void a10_timer_eventtimer_setup(struct a10_timer_softc *sc); +#endif static void a23_timer_timecounter_setup(struct a10_timer_softc *sc); static u_int a23_timer_get_timecount(struct timecounter *tc); @@ -279,6 +283,7 @@ a10_timer_irq(void *arg) * Event timer function for A10 and A13 */ +#if defined(__arm__) static void a10_timer_eventtimer_setup(struct a10_timer_softc *sc) { @@ -363,6 +368,7 @@ a10_timer_timer_stop(struct eventtimer *et) return (0); } +#endif /* * Timecounter functions for A23 and above Modified: stable/12/sys/arm/broadcom/bcm2835/bcm2835_sdhost.c ============================================================================== --- stable/12/sys/arm/broadcom/bcm2835/bcm2835_sdhost.c Wed Mar 4 21:45:12 2020 (r358652) +++ stable/12/sys/arm/broadcom/bcm2835/bcm2835_sdhost.c Wed Mar 4 21:53:54 2020 (r358653) @@ -251,6 +251,7 @@ WR4(struct bcm_sdhost_softc *sc, bus_size_t off, uint3 bus_space_write_4(sc->sc_bst, sc->sc_bsh, off, val); } +#ifdef notyet static inline uint16_t RD2(struct bcm_sdhost_softc *sc, bus_size_t off) { @@ -260,6 +261,7 @@ RD2(struct bcm_sdhost_softc *sc, bus_size_t off) return ((val >> (off & 3)*8) & 0xffff); } +#endif static inline uint8_t RD1(struct bcm_sdhost_softc *sc, bus_size_t off) Modified: stable/12/sys/arm64/rockchip/if_dwc_rk.c ============================================================================== --- stable/12/sys/arm64/rockchip/if_dwc_rk.c Wed Mar 4 21:45:12 2020 (r358652) +++ stable/12/sys/arm64/rockchip/if_dwc_rk.c Wed Mar 4 21:53:54 2020 (r358653) @@ -65,6 +65,14 @@ __FBSDID("$FreeBSD$"); #define RK3328_GRF_MACPHY_CON3 0x0B0C #define RK3328_GRF_MACPHY_STATUS 0x0B10 +static struct ofw_compat_data compat_data[] = { + {"rockchip,rk3288-gmac", 1}, + {"rockchip,rk3328-gmac", 1}, + {"rockchip,rk3399-gmac", 1}, + {NULL, 0} +}; + +#ifdef notyet static void rk3328_set_delays(struct syscon *grf, phandle_t node) { @@ -82,6 +90,7 @@ rk3328_set_delays(struct syscon *grf, phandle_t node) SYSCON_WRITE_4(grf, RK3328_GRF_MAC_CON0, tx | rx | 0xFFFF0000); } +#endif #define RK3399_GRF_SOC_CON6 0xc218 #define RK3399_GRF_SOC_CON6_TX_MASK 0x7F @@ -89,6 +98,7 @@ rk3328_set_delays(struct syscon *grf, phandle_t node) #define RK3399_GRF_SOC_CON6_RX_MASK 0x7F #define RK3399_GRF_SOC_CON6_RX_SHIFT 8 +#ifdef notyet static void rk3399_set_delays(struct syscon *grf, phandle_t node) { @@ -106,6 +116,7 @@ rk3399_set_delays(struct syscon *grf, phandle_t node) SYSCON_WRITE_4(grf, RK3399_GRF_SOC_CON6, tx | rx | 0xFFFF0000); } +#endif static int if_dwc_rk_probe(device_t dev) @@ -113,8 +124,7 @@ if_dwc_rk_probe(device_t dev) if (!ofw_bus_status_okay(dev)) return (ENXIO); - if (!(ofw_bus_is_compatible(dev, "rockchip,rk3328-gmac") || - ofw_bus_is_compatible(dev, "rockchip,rk3399-gmac"))) + if (ofw_bus_search_compatible(dev, compat_data)->ocd_data == 0) return (ENXIO); device_set_desc(dev, "Rockchip Gigabit Ethernet Controller"); Modified: stable/12/sys/arm64/rockchip/rk_gpio.c ============================================================================== --- stable/12/sys/arm64/rockchip/rk_gpio.c Wed Mar 4 21:45:12 2020 (r358652) +++ stable/12/sys/arm64/rockchip/rk_gpio.c Wed Mar 4 21:53:54 2020 (r358653) @@ -50,10 +50,10 @@ __FBSDID("$FreeBSD$"); #include #include -#include "opt_soc.h" - #include "gpio_if.h" +#include "fdt_pinctrl_if.h" + #define RK_GPIO_SWPORTA_DR 0x00 /* Data register */ #define RK_GPIO_SWPORTA_DDR 0x04 /* Data direction register */ @@ -71,6 +71,9 @@ __FBSDID("$FreeBSD$"); #define RK_GPIO_LS_SYNC 0x60 /* Level sensitive syncronization enable register */ +#define RK_GPIO_DEFAULT_CAPS (GPIO_PIN_INPUT | GPIO_PIN_OUTPUT | \ + GPIO_PIN_PULLUP | GPIO_PIN_PULLDOWN) + struct rk_gpio_softc { device_t sc_dev; device_t sc_busdev; @@ -79,6 +82,7 @@ struct rk_gpio_softc { bus_space_tag_t sc_bst; bus_space_handle_t sc_bsh; clk_t clk; + device_t pinctrl; }; static struct ofw_compat_data compat_data[] = { @@ -126,6 +130,7 @@ rk_gpio_attach(device_t dev) sc = device_get_softc(dev); sc->sc_dev = dev; + sc->pinctrl = device_get_parent(dev); node = ofw_bus_get_node(sc->sc_dev); if (!OF_hasprop(node, "gpio-controller")) @@ -196,6 +201,7 @@ rk_gpio_pin_max(device_t dev, int *maxpin) { /* Each bank have always 32 pins */ + /* XXX not true*/ *maxpin = 31; return (0); } @@ -222,17 +228,30 @@ rk_gpio_pin_getflags(device_t dev, uint32_t pin, uint3 { struct rk_gpio_softc *sc; uint32_t reg; + int rv; + bool is_gpio; sc = device_get_softc(dev); + rv = FDT_PINCTRL_IS_GPIO(sc->pinctrl, dev, pin, &is_gpio); + if (rv != 0) + return (rv); + if (!is_gpio) + return (EINVAL); + + *flags = 0; + rv = FDT_PINCTRL_GET_FLAGS(sc->pinctrl, dev, pin, flags); + if (rv != 0) + return (rv); + RK_GPIO_LOCK(sc); reg = RK_GPIO_READ(sc, RK_GPIO_SWPORTA_DDR); RK_GPIO_UNLOCK(sc); if (reg & (1 << pin)) - *flags = GPIO_PIN_OUTPUT; + *flags |= GPIO_PIN_OUTPUT; else - *flags = GPIO_PIN_INPUT; + *flags |= GPIO_PIN_INPUT; return (0); } @@ -241,8 +260,7 @@ static int rk_gpio_pin_getcaps(device_t dev, uint32_t pin, uint32_t *caps) { - /* Caps are managed by the pinctrl device */ - *caps = 0; + *caps = RK_GPIO_DEFAULT_CAPS; return (0); } @@ -251,9 +269,21 @@ rk_gpio_pin_setflags(device_t dev, uint32_t pin, uint3 { struct rk_gpio_softc *sc; uint32_t reg; + int rv; + bool is_gpio; sc = device_get_softc(dev); + rv = FDT_PINCTRL_IS_GPIO(sc->pinctrl, dev, pin, &is_gpio); + if (rv != 0) + return (rv); + if (!is_gpio) + return (EINVAL); + + rv = FDT_PINCTRL_SET_FLAGS(sc->pinctrl, dev, pin, flags); + if (rv != 0) + return (rv); + RK_GPIO_LOCK(sc); reg = RK_GPIO_READ(sc, RK_GPIO_SWPORTA_DDR); @@ -394,6 +424,14 @@ rk_gpio_map_gpios(device_t bus, phandle_t dev, phandle return (0); } +static phandle_t +rk_gpio_get_node(device_t bus, device_t dev) +{ + + /* We only have one child, the GPIO bus, which needs our own node. */ + return (ofw_bus_get_node(bus)); +} + static device_method_t rk_gpio_methods[] = { /* Device interface */ DEVMETHOD(device_probe, rk_gpio_probe), @@ -414,6 +452,9 @@ static device_method_t rk_gpio_methods[] = { DEVMETHOD(gpio_pin_config_32, rk_gpio_pin_config_32), DEVMETHOD(gpio_map_gpios, rk_gpio_map_gpios), + /* ofw_bus interface */ + DEVMETHOD(ofw_bus_get_node, rk_gpio_get_node), + DEVMETHOD_END }; @@ -425,5 +466,10 @@ static driver_t rk_gpio_driver = { static devclass_t rk_gpio_devclass; +/* + * GPIO driver is always a child of rk_pinctrl driver and should be probed + * and attached within rk_pinctrl_attach function. Due to this, bus pass order + * must be same as bus pass order of rk_pinctrl driver. + */ EARLY_DRIVER_MODULE(rk_gpio, simplebus, rk_gpio_driver, - rk_gpio_devclass, 0, 0, BUS_PASS_INTERRUPT + BUS_PASS_ORDER_LATE); + rk_gpio_devclass, 0, 0, BUS_PASS_INTERRUPT + BUS_PASS_ORDER_MIDDLE); Modified: stable/12/sys/arm64/rockchip/rk_grf.c ============================================================================== --- stable/12/sys/arm64/rockchip/rk_grf.c Wed Mar 4 21:45:12 2020 (r358652) +++ stable/12/sys/arm64/rockchip/rk_grf.c Wed Mar 4 21:53:54 2020 (r358653) @@ -44,16 +44,11 @@ __FBSDID("$FreeBSD$"); #include #include -#include "opt_soc.h" - static struct ofw_compat_data compat_data[] = { -#ifdef SOC_ROCKCHIP_RK3328 + {"rockchip,rk3288-grf", 1}, {"rockchip,rk3328-grf", 1}, -#endif -#ifdef SOC_ROCKCHIP_RK3399 {"rockchip,rk3399-grf", 1}, {"rockchip,rk3399-pmugrf", 1}, -#endif {NULL, 0} }; Modified: stable/12/sys/arm64/rockchip/rk_pinctrl.c ============================================================================== --- stable/12/sys/arm64/rockchip/rk_pinctrl.c Wed Mar 4 21:45:12 2020 (r358652) +++ stable/12/sys/arm64/rockchip/rk_pinctrl.c Wed Mar 4 21:53:54 2020 (r358653) @@ -56,6 +56,7 @@ __FBSDID("$FreeBSD$"); #include "gpio_if.h" #include "syscon_if.h" +#include "fdt_pinctrl_if.h" struct rk_pinctrl_pin_drive { uint32_t bank; @@ -102,6 +103,8 @@ struct rk_pinctrl_conf { uint32_t (*get_pd_offset)(struct rk_pinctrl_softc *, uint32_t); struct syscon *(*get_syscon)(struct rk_pinctrl_softc *, uint32_t); int (*parse_bias)(phandle_t, int); + int (*resolv_bias_value)(int, int); + int (*get_bias_value)(int, int); }; struct rk_pinctrl_softc { @@ -110,8 +113,13 @@ struct rk_pinctrl_softc { struct syscon *grf; struct syscon *pmu; struct rk_pinctrl_conf *conf; + struct mtx mtx; }; +#define RK_PINCTRL_LOCK(_sc) mtx_lock_spin(&(_sc)->mtx) +#define RK_PINCTRL_UNLOCK(_sc) mtx_unlock_spin(&(_sc)->mtx) +#define RK_PINCTRL_LOCK_ASSERT(_sc) mtx_assert(&(_sc)->mtx, MA_OWNED) + #define RK_IOMUX(_bank, _subbank, _offset, _nbits) \ { \ .bank = _bank, \ @@ -385,6 +393,32 @@ rk3288_parse_bias(phandle_t node, int bank) return (-1); } +static int +rk3288_resolv_bias_value(int bank, int bias) +{ + int rv = 0; + + if (bias == 1) + rv = GPIO_PIN_PULLUP; + else if (bias == 2) + rv = GPIO_PIN_PULLDOWN; + + return (rv); +} + +static int +rk3288_get_bias_value(int bank, int bias) +{ + int rv = 0; + + if (bias & GPIO_PIN_PULLUP) + rv = 1; + else if (bias & GPIO_PIN_PULLDOWN) + rv = 2; + + return (rv); +} + struct rk_pinctrl_conf rk3288_conf = { .iomux_conf = rk3288_iomux_bank, .iomux_nbanks = nitems(rk3288_iomux_bank), @@ -397,6 +431,8 @@ struct rk_pinctrl_conf rk3288_conf = { .get_pd_offset = rk3288_get_pd_offset, .get_syscon = rk3288_get_syscon, .parse_bias = rk3288_parse_bias, + .resolv_bias_value = rk3288_resolv_bias_value, + .get_bias_value = rk3288_get_bias_value, }; static struct rk_pinctrl_gpio rk3328_gpio_bank[] = { @@ -541,6 +577,8 @@ struct rk_pinctrl_conf rk3328_conf = { .get_pd_offset = rk3328_get_pd_offset, .get_syscon = rk3328_get_syscon, .parse_bias = rk3288_parse_bias, + .resolv_bias_value = rk3288_resolv_bias_value, + .get_bias_value = rk3288_get_bias_value, }; static struct rk_pinctrl_gpio rk3399_gpio_bank[] = { @@ -664,6 +702,58 @@ rk3399_parse_bias(phandle_t node, int bank) return (-1); } +static int +rk3399_resolv_bias_value(int bank, int bias) +{ + int rv = 0; + + switch (bank) { + case 0: + case 2: + if (bias == 3) + rv = GPIO_PIN_PULLUP; + else if (bias == 1) + rv = GPIO_PIN_PULLDOWN; + break; + case 1: + case 3: + case 4: + if (bias == 1) + rv = GPIO_PIN_PULLUP; + else if (bias == 2) + rv = GPIO_PIN_PULLDOWN; + break; + } + + return (rv); +} + +static int +rk3399_get_bias_value(int bank, int bias) +{ + int rv = 0; + + switch (bank) { + case 0: + case 2: + if (bias & GPIO_PIN_PULLUP) + rv = 3; + else if (bias & GPIO_PIN_PULLDOWN) + rv = 1; + break; + case 1: + case 3: + case 4: + if (bias & GPIO_PIN_PULLUP) + rv = 1; + else if (bias & GPIO_PIN_PULLDOWN) + rv = 2; + break; + } + + return (rv); +} + struct rk_pinctrl_conf rk3399_conf = { .iomux_conf = rk3399_iomux_bank, .iomux_nbanks = nitems(rk3399_iomux_bank), @@ -676,6 +766,8 @@ struct rk_pinctrl_conf rk3399_conf = { .get_pd_offset = rk3399_get_pd_offset, .get_syscon = rk3399_get_syscon, .parse_bias = rk3399_parse_bias, + .resolv_bias_value = rk3399_resolv_bias_value, + .get_bias_value = rk3399_get_bias_value, }; static struct ofw_compat_data compat_data[] = { @@ -921,8 +1013,189 @@ rk_pinctrl_configure_pins(device_t dev, phandle_t cfgx return (0); } +static int +rk_pinctrl_is_gpio_locked(struct rk_pinctrl_softc *sc, struct syscon *syscon, + int bank, uint32_t pin, bool *is_gpio) +{ + uint32_t subbank, bit, mask, reg; + uint32_t pinfunc; + int i; + RK_PINCTRL_LOCK_ASSERT(sc); + + subbank = pin / 8; + *is_gpio = false; + + for (i = 0; i < sc->conf->iomux_nbanks; i++) + if (sc->conf->iomux_conf[i].bank == bank && + sc->conf->iomux_conf[i].subbank == subbank) + break; + + if (i == sc->conf->iomux_nbanks) { + device_printf(sc->dev, "Unknown pin %d in bank %d\n", pin, + bank); + return (EINVAL); + } + + syscon = sc->conf->get_syscon(sc, bank); + + /* Parse pin function */ + reg = sc->conf->iomux_conf[i].offset; + switch (sc->conf->iomux_conf[i].nbits) { + case 4: + if ((pin % 8) >= 4) + reg += 0x4; + bit = (pin % 4) * 4; + mask = (0xF << bit); + break; + case 3: + if ((pin % 8) >= 5) + reg += 4; + bit = (pin % 8 % 5) * 3; + mask = (0x7 << bit); + break; + case 2: + bit = (pin % 8) * 2; + mask = (0x3 << bit); + break; + default: + device_printf(sc->dev, + "Unknown pin stride width %d in bank %d\n", + sc->conf->iomux_conf[i].nbits, bank); + return (EINVAL); + } + rk_pinctrl_get_fixup(sc, bank, pin, ®, &mask, &bit); + + reg = SYSCON_READ_4(syscon, reg); + pinfunc = (reg & mask) >> bit; + + /* Test if the pin is in gpio mode */ + if (pinfunc == 0) + *is_gpio = true; + + return (0); +} + static int +rk_pinctrl_get_bank(struct rk_pinctrl_softc *sc, device_t gpio, int *bank) +{ + int i; + + for (i = 0; i < sc->conf->ngpio_bank; i++) { + if (sc->conf->gpio_bank[i].gpio_dev == gpio) + break; + } + if (i == sc->conf->ngpio_bank) + return (EINVAL); + + *bank = i; + return (0); +} + +static int +rk_pinctrl_is_gpio(device_t pinctrl, device_t gpio, uint32_t pin, bool *is_gpio) +{ + struct rk_pinctrl_softc *sc; + struct syscon *syscon; + int bank; + int rv; + + sc = device_get_softc(pinctrl); + RK_PINCTRL_LOCK(sc); + + rv = rk_pinctrl_get_bank(sc, gpio, &bank); + if (rv != 0) + goto done; + syscon = sc->conf->get_syscon(sc, bank); + rv = rk_pinctrl_is_gpio_locked(sc, syscon, bank, pin, is_gpio); + +done: + RK_PINCTRL_UNLOCK(sc); + + return (rv); +} + +static int +rk_pinctrl_get_flags(device_t pinctrl, device_t gpio, uint32_t pin, + uint32_t *flags) +{ + struct rk_pinctrl_softc *sc; + struct syscon *syscon; + uint32_t reg, mask, bit; + uint32_t bias; + int bank; + int rv = 0; + bool is_gpio; + + sc = device_get_softc(pinctrl); + RK_PINCTRL_LOCK(sc); + + rv = rk_pinctrl_get_bank(sc, gpio, &bank); + if (rv != 0) + goto done; + syscon = sc->conf->get_syscon(sc, bank); + rv = rk_pinctrl_is_gpio_locked(sc, syscon, bank, pin, &is_gpio); + if (rv != 0) + goto done; + if (!is_gpio) { + rv = EINVAL; + goto done; + } + /* Get the pullup/pulldown configuration */ + reg = sc->conf->get_pd_offset(sc, bank); + reg += bank * 0x10 + ((pin / 8) * 0x4); + bit = (pin % 8) * 2; + mask = (0x3 << bit) << 16; + reg = SYSCON_READ_4(syscon, reg); + reg = (reg >> bit) & 0x3; + bias = sc->conf->resolv_bias_value(bank, reg); + *flags = bias; + +done: + RK_PINCTRL_UNLOCK(sc); + return (rv); +} + +static int +rk_pinctrl_set_flags(device_t pinctrl, device_t gpio, uint32_t pin, + uint32_t flags) +{ + struct rk_pinctrl_softc *sc; + struct syscon *syscon; + uint32_t bit, mask, reg; + uint32_t bias; + int bank; + int rv = 0; + bool is_gpio; + + sc = device_get_softc(pinctrl); + RK_PINCTRL_LOCK(sc); + + rv = rk_pinctrl_get_bank(sc, gpio, &bank); + if (rv != 0) + goto done; + syscon = sc->conf->get_syscon(sc, bank); + rv = rk_pinctrl_is_gpio_locked(sc, syscon, bank, pin, &is_gpio); + if (rv != 0) + goto done; + if (!is_gpio) { + rv = EINVAL; + goto done; + } + /* Get the pullup/pulldown configuration */ + reg = sc->conf->get_pd_offset(sc, bank); + reg += bank * 0x10 + ((pin / 8) * 0x4); + bit = (pin % 8) * 2; + mask = (0x3 << bit); + bias = sc->conf->get_bias_value(bank, flags); + SYSCON_MODIFY_4(syscon, reg, mask, bias << bit | (mask << 16)); + +done: + RK_PINCTRL_UNLOCK(sc); + return (rv); +} + +static int rk_pinctrl_register_gpio(struct rk_pinctrl_softc *sc, char *gpio_name, device_t gpio_dev) { @@ -983,6 +1256,8 @@ rk_pinctrl_attach(device_t dev) } } + mtx_init(&sc->mtx, "rk pinctrl", "pinctrl", MTX_SPIN); + sc->conf = (struct rk_pinctrl_conf *)ofw_bus_search_compatible(dev, compat_data)->ocd_data; @@ -1060,6 +1335,9 @@ static device_method_t rk_pinctrl_methods[] = { /* fdt_pinctrl interface */ DEVMETHOD(fdt_pinctrl_configure, rk_pinctrl_configure_pins), + DEVMETHOD(fdt_pinctrl_is_gpio, rk_pinctrl_is_gpio), + DEVMETHOD(fdt_pinctrl_get_flags, rk_pinctrl_get_flags), + DEVMETHOD(fdt_pinctrl_set_flags, rk_pinctrl_set_flags), DEVMETHOD_END }; Modified: stable/12/sys/dev/fdt/fdt_pinctrl_if.m ============================================================================== --- stable/12/sys/dev/fdt/fdt_pinctrl_if.m Wed Mar 4 21:45:12 2020 (r358652) +++ stable/12/sys/dev/fdt/fdt_pinctrl_if.m Wed Mar 4 21:53:54 2020 (r358653) @@ -36,6 +36,31 @@ INTERFACE fdt_pinctrl; +CODE { + static int + fdt_pinctrl_default_is_gpio(device_t pinctrl, device_t gpio, bool *is_gpio) + { + + return (EOPNOTSUPP); + } + + static int + fdt_pinctrl_default_set_flags(device_t pinctrl, device_t gpio, uint32_t pin, + uint32_t flags) + { + + return (EOPNOTSUPP); + } + + static int + fdt_pinctrl_default_get_flags(device_t pinctrl, device_t gpio, uint32_t pin, + uint32_t *flags) + { + + return (EOPNOTSUPP); + } +}; + # Needed for timestamping device probe/attach calls HEADER { #include @@ -57,3 +82,36 @@ METHOD int configure { phandle_t cfgxref; }; + +# +# Test if the pin is in gpio mode +# Called from a gpio device +# +METHOD int is_gpio { + device_t pinctrl; + device_t gpio; + uint32_t pin; + bool *is_gpio; +} DEFAULT fdt_pinctrl_default_is_gpio; + +# +# Set the flags of a pin +# Called from a gpio device +# +METHOD int set_flags { + device_t pinctrl; + device_t gpio; + uint32_t pin; + uint32_t flags; +} DEFAULT fdt_pinctrl_default_set_flags; + +# +# Get the flags of a pin +# Called from a gpio device +# +METHOD int get_flags { + device_t pinctrl; + device_t gpio; + uint32_t pin; + uint32_t *flags; +} DEFAULT fdt_pinctrl_default_get_flags; From owner-svn-src-all@freebsd.org Wed Mar 4 22:22:01 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 633AA253C1C; Wed, 4 Mar 2020 22:22:01 +0000 (UTC) (envelope-from markjdb@gmail.com) Received: from mail-qv1-xf44.google.com (mail-qv1-xf44.google.com [IPv6:2607:f8b0:4864:20::f44]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1O1" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 48XpJm0kQkz3Hgn; Wed, 4 Mar 2020 22:21:59 +0000 (UTC) (envelope-from markjdb@gmail.com) Received: by mail-qv1-xf44.google.com with SMTP id r15so1558078qve.3; Wed, 04 Mar 2020 14:21:59 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=LccLuqP9Qtee+rC3EDJMYP7apsF9sTWKY5BOEUG1IvQ=; b=FB9lWCXqpf7w4+KozCUZ5unNl/nLiSQ0a3sfFARAgjU3qQdSUEfuvIwodoYgN2Fr+d 8jiEutHK/m+0lzmIXq1FN7EHpknpIsNVRgqrvtzCyoA6v6MTHjhXwXMl4coecQE+uOi1 VyVc1VELrSkpcm7wrgdaWJtTugMss2ojOdJXgNNvy7wdNynVLSG8ESvJ2zNSIty8RHhj 0XrXpWG7ZCHn+AtC5DnHGe08cC88A8kTG1nRewKXC3KmCE9v7ey0xmXawK3fyYHtq/MW RqDsQv7V9D0uMI+/GboTEiwi/7x/3zfoC7bY5pBnbiDhbI41NrdQXt8EH87wEqsPteWi XzIw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:date:from:to:cc:subject:message-id :references:mime-version:content-disposition:in-reply-to; bh=LccLuqP9Qtee+rC3EDJMYP7apsF9sTWKY5BOEUG1IvQ=; b=Y94FBJNJ/8MmlvS4qD7DhyFG9DocpuZAyFutneFkAtximFfcb+f0D6Kk7X+OY4L5BT 8XnxiJ1IKLBjPfDYKwf+/pRqtYf2evaFBWNAsyAFzvsFwnXKHJV9W//F0XLwBnxzEU2f p3qHkRni/drQFlnbOJSOqSYBXZY5Nd5q4Te5plB7ePPDbirwlRz2vuqMK8lkG7vNfjAl nBZC5NaKFgMDZLSW2BkR2Y0vq9SxPMQGxbERAqiKgPP7Xx6DemPFfFvatwo8nLoufNYi uRMNloXnFoygsSlLWb1Ve9PQW092LHTlK3hJyxraJRrPchiW/J6VTTEPg7eRcF1styTV y7ug== X-Gm-Message-State: ANhLgQ0YSvPe8TtFyY7Eq0ffXBobfQGUzCB5W6/ify6xnvmZLUg8fiOj u6bPwP/2Jycz5vEOkjXdLwTWOxef X-Google-Smtp-Source: ADFU+vsMGTi8kCukC9TmkaKkxcnS3mMvBJpOBVQsjVJkPzHjruUJ+Nw7RLUknHuwmEsJrExvj+hR2A== X-Received: by 2002:a0c:fc46:: with SMTP id w6mr3825507qvp.46.1583360518737; Wed, 04 Mar 2020 14:21:58 -0800 (PST) Received: from raichu (toroon0560w-lp130-11-70-50-21-248.dsl.bell.ca. [70.50.21.248]) by smtp.gmail.com with ESMTPSA id h9sm14813575qtq.61.2020.03.04.14.21.57 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 04 Mar 2020 14:21:57 -0800 (PST) Sender: Mark Johnston Date: Wed, 4 Mar 2020 17:21:53 -0500 From: Mark Johnston To: Eric Joyner Cc: src-committers , svn-src-all , svn-src-head Subject: Re: svn commit: r358432 - in head/sys: kern sys vm Message-ID: <20200304222153.GA58468@raichu> References: <202002281605.01SG5Iox077824@repo.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Rspamd-Queue-Id: 48XpJm0kQkz3Hgn X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org; dkim=pass header.d=gmail.com header.s=20161025 header.b=FB9lWCXq; dmarc=none; spf=pass (mx1.freebsd.org: domain of markjdb@gmail.com designates 2607:f8b0:4864:20::f44 as permitted sender) smtp.mailfrom=markjdb@gmail.com X-Spamd-Result: default: False [-2.28 / 15.00]; ARC_NA(0.00)[]; RCVD_VIA_SMTP_AUTH(0.00)[]; R_DKIM_ALLOW(-0.20)[gmail.com:s=20161025]; NEURAL_HAM_MEDIUM(-0.99)[-0.989,0]; FROM_HAS_DN(0.00)[]; RCPT_COUNT_THREE(0.00)[4]; R_SPF_ALLOW(-0.20)[+ip6:2607:f8b0:4000::/36]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; MIME_GOOD(-0.10)[text/plain]; MIME_TRACE(0.00)[0:+]; DMARC_NA(0.00)[freebsd.org]; RCVD_COUNT_THREE(0.00)[3]; TO_MATCH_ENVRCPT_SOME(0.00)[]; TO_DN_ALL(0.00)[]; DKIM_TRACE(0.00)[gmail.com:+]; RCVD_IN_DNSWL_NONE(0.00)[4.4.f.0.0.0.0.0.0.0.0.0.0.0.0.0.0.2.0.0.4.6.8.4.0.b.8.f.7.0.6.2.list.dnswl.org : 127.0.5.0]; IP_SCORE(-0.59)[ip: (0.60), ipnet: 2607:f8b0::/32(-1.86), asn: 15169(-1.66), country: US(-0.05)]; FORGED_SENDER(0.30)[markj@freebsd.org,markjdb@gmail.com]; MID_RHS_NOT_FQDN(0.50)[]; FREEMAIL_ENVFROM(0.00)[gmail.com]; ASN(0.00)[asn:15169, ipnet:2607:f8b0::/32, country:US]; FROM_NEQ_ENVFROM(0.00)[markj@freebsd.org,markjdb@gmail.com]; RCVD_TLS_ALL(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: Wed, 04 Mar 2020 22:22:01 -0000 On Wed, Mar 04, 2020 at 01:15:59PM -0800, Eric Joyner wrote: > Hi Mark, > > Is the addition of #include in sys/sys/refcount.h > actually necessary? I don't see anything in there used in refcount.h, and > the kernel appears to compile without it, at least on amd64. No, it is left over from an earlier iteration of the patch. I will remove it. Thanks. > On Fri, Feb 28, 2020 at 8:05 AM Mark Johnston wrote: > > > Author: markj > > Date: Fri Feb 28 16:05:18 2020 > > New Revision: 358432 > > URL: https://svnweb.freebsd.org/changeset/base/358432 > > > > Log: > > Add a blocking counter KPI. > > > > refcount(9) was recently extended to support waiting on a refcount to > > drop to zero, as this was needed for a lockless VM object > > paging-in-progress counter. However, this adds overhead to all uses of > > refcount(9) and doesn't really match traditional refcounting semantics: > > once a counter has dropped to zero, the protected object may be freed at > > any point and it is not safe to dereference the counter. > > > > This change removes that extension and instead adds a new set of KPIs, > > blockcount_*, for use by VM object PIP and busy. From owner-svn-src-all@freebsd.org Wed Mar 4 22:23:25 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 329C1253CCB; Wed, 4 Mar 2020 22:23:25 +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 48XpLN6XrBz3M00; Wed, 4 Mar 2020 22:23:24 +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 CF89D25205; Wed, 4 Mar 2020 22:23:24 +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 024MNOZB072220; Wed, 4 Mar 2020 22:23:24 GMT (envelope-from markj@FreeBSD.org) Received: (from markj@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 024MNOA2072219; Wed, 4 Mar 2020 22:23:24 GMT (envelope-from markj@FreeBSD.org) Message-Id: <202003042223.024MNOA2072219@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: markj set sender to markj@FreeBSD.org using -f From: Mark Johnston Date: Wed, 4 Mar 2020 22:23:24 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r358654 - head/sys/sys X-SVN-Group: head X-SVN-Commit-Author: markj X-SVN-Commit-Paths: head/sys/sys X-SVN-Commit-Revision: 358654 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages 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, 04 Mar 2020 22:23:25 -0000 Author: markj Date: Wed Mar 4 22:23:24 2020 New Revision: 358654 URL: https://svnweb.freebsd.org/changeset/base/358654 Log: Remove an #include erroneously added in r358432. Reported by: erj Modified: head/sys/sys/refcount.h Modified: head/sys/sys/refcount.h ============================================================================== --- head/sys/sys/refcount.h Wed Mar 4 21:53:54 2020 (r358653) +++ head/sys/sys/refcount.h Wed Mar 4 22:23:24 2020 (r358654) @@ -34,7 +34,6 @@ #ifdef _KERNEL #include -#include #else #include #define KASSERT(exp, msg) /* */ From owner-svn-src-all@freebsd.org Wed Mar 4 22:27:17 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id A3A76253DA3; Wed, 4 Mar 2020 22:27: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 48XpQs1rPnz41w0; Wed, 4 Mar 2020 22:27: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 17C0E2520D; Wed, 4 Mar 2020 22:27: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 024MRGhm072614; Wed, 4 Mar 2020 22:27:16 GMT (envelope-from glebius@FreeBSD.org) Received: (from glebius@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 024MRGsW072613; Wed, 4 Mar 2020 22:27:16 GMT (envelope-from glebius@FreeBSD.org) Message-Id: <202003042227.024MRGsW072613@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: glebius set sender to glebius@FreeBSD.org using -f From: Gleb Smirnoff Date: Wed, 4 Mar 2020 22:27:16 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r358655 - head/sbin/mount_nfs X-SVN-Group: head X-SVN-Commit-Author: glebius X-SVN-Commit-Paths: head/sbin/mount_nfs X-SVN-Commit-Revision: 358655 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages 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, 04 Mar 2020 22:27:17 -0000 Author: glebius Date: Wed Mar 4 22:27:16 2020 New Revision: 358655 URL: https://svnweb.freebsd.org/changeset/base/358655 Log: When a machine boots the NFS mounting script is executed after interfaces are configured, but for many interfaces (e.g. all Intel) ifconfig causes link renegotiation, so the first attempt to mount NFS always fails. After that mount_nfs sleeps for 30 seconds, while only a couple seconds are actually required for interface to get up. Instead of sleeping, do select(2) on routing socket and check if some interface became UP and in this case retry immediately. Reviewed by: rmacklem Differential Revision: https://reviews.freebsd.org/D23934 Modified: head/sbin/mount_nfs/mount_nfs.c Modified: head/sbin/mount_nfs/mount_nfs.c ============================================================================== --- head/sbin/mount_nfs/mount_nfs.c Wed Mar 4 22:23:24 2020 (r358654) +++ head/sbin/mount_nfs/mount_nfs.c Wed Mar 4 22:27:16 2020 (r358655) @@ -65,6 +65,8 @@ __FBSDID("$FreeBSD$"); #include #include +#include +#include #include #include @@ -505,6 +507,59 @@ sec_num_to_name(int flavor) return (NULL); } +/* + * Wait for RTM_IFINFO message with interface that is IFF_UP and with + * link on, or until timeout expires. Returns seconds left. + */ +static time_t +rtm_ifinfo_sleep(time_t sec) +{ + char buf[2048]; + fd_set rfds; + struct timeval tv, start; + ssize_t nread; + int n, s; + + s = socket(PF_ROUTE, SOCK_RAW, 0); + if (s < 0) + err(EX_OSERR, "socket"); + (void)gettimeofday(&start, NULL); + + for (tv.tv_sec = sec, tv.tv_usec = 0; + tv.tv_sec > 0; + (void)gettimeofday(&tv, NULL), + tv.tv_sec = sec - (tv.tv_sec - start.tv_sec)) { + FD_ZERO(&rfds); + FD_SET(s, &rfds); + n = select(s + 1, &rfds, NULL, NULL, &tv); + if (n == 0) + continue; + if (n == -1) { + if (errno == EINTR) + continue; + else + err(EX_SOFTWARE, "select"); + } + nread = read(s, buf, 2048); + if (nread < 0) + err(EX_OSERR, "read"); + if ((size_t)nread >= sizeof(struct if_msghdr)) { + struct if_msghdr *ifm; + + ifm = (struct if_msghdr *)buf; + if (ifm->ifm_version == RTM_VERSION && + ifm->ifm_type == RTM_IFINFO && + (ifm->ifm_flags & IFF_UP) && + ifm->ifm_data.ifi_link_state != LINK_STATE_DOWN) + break; + } + } + + close(s); + + return (tv.tv_sec); +} + static int getnfsargs(char *spec, struct iovec **iov, int *iovlen) { @@ -638,7 +693,12 @@ getnfsargs(char *spec, struct iovec **iov, int *iovlen if (daemon(0, 0) != 0) err(1, "daemon"); } - sleep(60); + /* + * If rtm_ifinfo_sleep() returns non-zero, don't count + * that as a retry attempt. + */ + if (rtm_ifinfo_sleep(60) && retrycnt != 0) + retrycnt++; } freeaddrinfo(ai_nfs); From owner-svn-src-all@freebsd.org Wed Mar 4 22:31:42 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id CA3F625405F; Wed, 4 Mar 2020 22:31:42 +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 48XpWy3Ccdz4DBr; Wed, 4 Mar 2020 22:31:42 +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 D779E253CA; Wed, 4 Mar 2020 22:31:41 +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 024MVfuo077670; Wed, 4 Mar 2020 22:31:41 GMT (envelope-from glebius@FreeBSD.org) Received: (from glebius@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 024MVfga077668; Wed, 4 Mar 2020 22:31:41 GMT (envelope-from glebius@FreeBSD.org) Message-Id: <202003042231.024MVfga077668@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: glebius set sender to glebius@FreeBSD.org using -f From: Gleb Smirnoff Date: Wed, 4 Mar 2020 22:31:41 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r358656 - head/sys/dev/wtap X-SVN-Group: head X-SVN-Commit-Author: glebius X-SVN-Commit-Paths: head/sys/dev/wtap X-SVN-Commit-Revision: 358656 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages 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, 04 Mar 2020 22:31:42 -0000 Author: glebius Date: Wed Mar 4 22:31:41 2020 New Revision: 358656 URL: https://svnweb.freebsd.org/changeset/base/358656 Log: Remove unused function. Modified: head/sys/dev/wtap/if_wtap.c head/sys/dev/wtap/if_wtapvar.h Modified: head/sys/dev/wtap/if_wtap.c ============================================================================== --- head/sys/dev/wtap/if_wtap.c Wed Mar 4 22:27:16 2020 (r358655) +++ head/sys/dev/wtap/if_wtap.c Wed Mar 4 22:31:41 2020 (r358656) @@ -448,44 +448,6 @@ wtap_inject(struct wtap_softc *sc, struct mbuf *m) mtx_unlock(&sc->sc_mtx); } -void -wtap_rx_deliver(struct wtap_softc *sc, struct mbuf *m) -{ - struct epoch_tracker et; - struct ieee80211com *ic = &sc->sc_ic; - struct ieee80211_node *ni; - int type; -#if 0 - DWTAP_PRINTF("%s\n", __func__); -#endif - - DWTAP_PRINTF("[%d] receiving m=%p\n", sc->id, m); - if (m == NULL) { /* NB: shouldn't happen */ - ic_printf(ic, "%s: no mbuf!\n", __func__); - } - - ieee80211_dump_pkt(ic, mtod(m, caddr_t), 0,0,0); - - /* - * Locate the node for sender, track state, and then - * pass the (referenced) node up to the 802.11 layer - * for its use. - */ - ni = ieee80211_find_rxnode_withkey(ic, - mtod(m, const struct ieee80211_frame_min *),IEEE80211_KEYIX_NONE); - NET_EPOCH_ENTER(et); - if (ni != NULL) { - /* - * Sending station is known, dispatch directly. - */ - type = ieee80211_input(ni, m, 1<<7, 10); - ieee80211_free_node(ni); - } else { - type = ieee80211_input_all(ic, m, 1<<7, 10); - } - NET_EPOCH_EXIT(et); -} - static void wtap_rx_proc(void *arg, int npending) { Modified: head/sys/dev/wtap/if_wtapvar.h ============================================================================== --- head/sys/dev/wtap/if_wtapvar.h Wed Mar 4 22:27:16 2020 (r358655) +++ head/sys/dev/wtap/if_wtapvar.h Wed Mar 4 22:31:41 2020 (r358656) @@ -154,6 +154,5 @@ void wtap_suspend(struct wtap_softc *); void wtap_shutdown(struct wtap_softc *); void wtap_intr(struct wtap_softc *); void wtap_inject(struct wtap_softc *, struct mbuf *); -void wtap_rx_deliver(struct wtap_softc *, struct mbuf *); #endif From owner-svn-src-all@freebsd.org Wed Mar 4 22:32:41 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id D6352254151; Wed, 4 Mar 2020 22:32:41 +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 48XpY54PXKz4GX2; Wed, 4 Mar 2020 22:32:41 +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 0CD4A2541B; Wed, 4 Mar 2020 22:32:41 +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 024MWeIA078432; Wed, 4 Mar 2020 22:32:40 GMT (envelope-from glebius@FreeBSD.org) Received: (from glebius@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 024MWeW6078429; Wed, 4 Mar 2020 22:32:40 GMT (envelope-from glebius@FreeBSD.org) Message-Id: <202003042232.024MWeW6078429@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: glebius set sender to glebius@FreeBSD.org using -f From: Gleb Smirnoff Date: Wed, 4 Mar 2020 22:32:40 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r358657 - in head: share/man/man4 sys/netgraph X-SVN-Group: head X-SVN-Commit-Author: glebius X-SVN-Commit-Paths: in head: share/man/man4 sys/netgraph X-SVN-Commit-Revision: 358657 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages 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, 04 Mar 2020 22:32:42 -0000 Author: glebius Date: Wed Mar 4 22:32:40 2020 New Revision: 358657 URL: https://svnweb.freebsd.org/changeset/base/358657 Log: Fix spelling of "dropped". Submitted by: Lutz Donnerhacke Differential Revision: https://reviews.freebsd.org/D23954 Modified: head/share/man/man4/ng_car.4 head/sys/netgraph/ng_car.c head/sys/netgraph/ng_car.h Modified: head/share/man/man4/ng_car.4 ============================================================================== --- head/share/man/man4/ng_car.4 Wed Mar 4 22:31:41 2020 (r358656) +++ head/share/man/man4/ng_car.4 Wed Mar 4 22:32:40 2020 (r358657) @@ -163,7 +163,7 @@ Return node statistics as .Bd -literal struct ng_car_hookstats { uint64_t passed_pkts; /* Counter for passed packets */ - uint64_t droped_pkts; /* Counter for dropped packets */ + uint64_t dropped_pkts; /* Counter for dropped packets */ uint64_t green_pkts; /* Counter for green packets */ uint64_t yellow_pkts; /* Counter for yellow packets */ uint64_t red_pkts; /* Counter for red packets */ Modified: head/sys/netgraph/ng_car.c ============================================================================== --- head/sys/netgraph/ng_car.c Wed Mar 4 22:31:41 2020 (r358656) +++ head/sys/netgraph/ng_car.c Wed Mar 4 22:32:40 2020 (r358657) @@ -286,7 +286,7 @@ ng_car_rcvdata(hook_p hook, item_p item ) default: \ /* Drop packet and return. */ \ NG_FREE_ITEM(item); \ - ++hinfo->stats.droped_pkts; \ + ++hinfo->stats.dropped_pkts; \ return (0); \ } \ } while (0) @@ -730,7 +730,7 @@ ng_car_enqueue(struct hookinfo *hinfo, item_p item) (hinfo->te + len >= NG_CAR_QUEUE_SIZE)) { /* Drop packet. */ ++hinfo->stats.red_pkts; - ++hinfo->stats.droped_pkts; + ++hinfo->stats.dropped_pkts; NG_FREE_M(m); hinfo->te = 0; Modified: head/sys/netgraph/ng_car.h ============================================================================== --- head/sys/netgraph/ng_car.h Wed Mar 4 22:31:41 2020 (r358656) +++ head/sys/netgraph/ng_car.h Wed Mar 4 22:32:40 2020 (r358657) @@ -42,7 +42,7 @@ /* Per hook statistics counters */ struct ng_car_hookstats { u_int64_t passed_pkts; /* Counter for passed packets */ - u_int64_t droped_pkts; /* Counter for droped packets */ + u_int64_t dropped_pkts; /* Counter for dropped packets */ u_int64_t green_pkts; /* Counter for green packets */ u_int64_t yellow_pkts; /* Counter for yellow packets */ u_int64_t red_pkts; /* Counter for red packets */ @@ -50,7 +50,7 @@ struct ng_car_hookstats { }; #define NG_CAR_HOOKSTATS { \ { "passed", &ng_parse_uint64_type }, \ - { "droped", &ng_parse_uint64_type }, \ + { "dropped", &ng_parse_uint64_type }, \ { "green", &ng_parse_uint64_type }, \ { "yellow", &ng_parse_uint64_type }, \ { "red", &ng_parse_uint64_type }, \ From owner-svn-src-all@freebsd.org Wed Mar 4 23:49:21 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id DD89E255837; Wed, 4 Mar 2020 23:49: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 48XrFY0PFXz4t8D; Wed, 4 Mar 2020 23:49: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 F21AA2610A; Wed, 4 Mar 2020 23:49: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 024NnKQv020437; Wed, 4 Mar 2020 23:49:20 GMT (envelope-from glebius@FreeBSD.org) Received: (from glebius@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 024NnKrS020436; Wed, 4 Mar 2020 23:49:20 GMT (envelope-from glebius@FreeBSD.org) Message-Id: <202003042349.024NnKrS020436@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: glebius set sender to glebius@FreeBSD.org using -f From: Gleb Smirnoff Date: Wed, 4 Mar 2020 23:49:20 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r358658 - head X-SVN-Group: head X-SVN-Commit-Author: glebius X-SVN-Commit-Paths: head X-SVN-Commit-Revision: 358658 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages 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, 04 Mar 2020 23:49:22 -0000 Author: glebius Date: Wed Mar 4 23:49:20 2020 New Revision: 358658 URL: https://svnweb.freebsd.org/changeset/base/358658 Log: Add a missing bktr header. Modified: head/ObsoleteFiles.inc Modified: head/ObsoleteFiles.inc ============================================================================== --- head/ObsoleteFiles.inc Wed Mar 4 22:32:40 2020 (r358657) +++ head/ObsoleteFiles.inc Wed Mar 4 23:49:20 2020 (r358658) @@ -39,6 +39,7 @@ # 20200301: bktr removed OLD_DIRS+=usr/include/dev/bktr OLD_FILES+=usr/include/dev/bktr/ioctl_bktr.h +OLD_FILES+=usr/include/dev/bktr/ioctl_bt848.h OLD_FILES+=usr/include/dev/bktr/ioctl_meteor.h .if ${TARGET_ARCH} == "i386" OLD_FILES+=usr/include/machine/ioctl_bktr.h From owner-svn-src-all@freebsd.org Wed Mar 4 23:56:39 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 7AABA255B32; Wed, 4 Mar 2020 23:56:39 +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 48XrPz1C7Qz40ZT; Wed, 4 Mar 2020 23:56:39 +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 ABADE262F2; Wed, 4 Mar 2020 23:56:38 +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 024NucsQ026065; Wed, 4 Mar 2020 23:56:38 GMT (envelope-from cy@FreeBSD.org) Received: (from cy@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 024NsE8g025917; Wed, 4 Mar 2020 23:54:14 GMT (envelope-from cy@FreeBSD.org) Message-Id: <202003042354.024NsE8g025917@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: cy set sender to cy@FreeBSD.org using -f From: Cy Schubert Date: Wed, 4 Mar 2020 23:54: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: r358659 - in stable: 11/contrib/ntp 11/contrib/ntp/html 11/contrib/ntp/html/drivers 11/contrib/ntp/include 11/contrib/ntp/libntp 11/contrib/ntp/libparse 11/contrib/ntp/ntpd 11/contrib/n... X-SVN-Group: stable-11 X-SVN-Commit-Author: cy X-SVN-Commit-Paths: in stable: 11/contrib/ntp 11/contrib/ntp/html 11/contrib/ntp/html/drivers 11/contrib/ntp/include 11/contrib/ntp/libntp 11/contrib/ntp/libparse 11/contrib/ntp/ntpd 11/contrib/ntp/ntpdate 11/contrib/ntp... X-SVN-Commit-Revision: 358659 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages 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, 04 Mar 2020 23:56:39 -0000 Author: cy Date: Wed Mar 4 23:54:13 2020 New Revision: 358659 URL: https://svnweb.freebsd.org/changeset/base/358659 Log: MFC r358652: MFV r358616: Update ntp-4.2.8p13 --> 4.2.8p14. The advisory can be found at: http://support.ntp.org/bin/view/Main/SecurityNotice#\ March_2020_ntp_4_2_8p14_NTP_Rele No CVEs have been documented yet. Security: http://support.ntp.org/bin/view/Main/NtpBug3610 http://support.ntp.org/bin/view/Main/NtpBug3596 http://support.ntp.org/bin/view/Main/NtpBug3592 Added: stable/11/contrib/ntp/include/ntp_calgps.h - copied unchanged from r358652, head/contrib/ntp/include/ntp_calgps.h stable/11/contrib/ntp/include/ntp_psl.h - copied unchanged from r358652, head/contrib/ntp/include/ntp_psl.h stable/11/contrib/ntp/include/timexsup.h - copied unchanged from r358652, head/contrib/ntp/include/timexsup.h stable/11/contrib/ntp/libntp/ntp_calgps.c - copied unchanged from r358652, head/contrib/ntp/libntp/ntp_calgps.c stable/11/contrib/ntp/libntp/timespecops.c - copied unchanged from r358652, head/contrib/ntp/libntp/timespecops.c stable/11/contrib/ntp/libntp/timexsup.c - copied unchanged from r358652, head/contrib/ntp/libntp/timexsup.c stable/11/contrib/ntp/ntpd/psl0.conf - copied unchanged from r358652, head/contrib/ntp/ntpd/psl0.conf stable/11/contrib/ntp/ntpd/psl1.conf - copied unchanged from r358652, head/contrib/ntp/ntpd/psl1.conf stable/11/contrib/ntp/ntpd/psl2.conf - copied unchanged from r358652, head/contrib/ntp/ntpd/psl2.conf Modified: stable/11/contrib/ntp/COPYRIGHT stable/11/contrib/ntp/ChangeLog stable/11/contrib/ntp/CommitLog stable/11/contrib/ntp/NEWS stable/11/contrib/ntp/config.h.in stable/11/contrib/ntp/configure stable/11/contrib/ntp/configure.ac stable/11/contrib/ntp/html/accopt.html stable/11/contrib/ntp/html/clockopt.html stable/11/contrib/ntp/html/confopt.html stable/11/contrib/ntp/html/copyright.html stable/11/contrib/ntp/html/discipline.html stable/11/contrib/ntp/html/drivers/driver20.html stable/11/contrib/ntp/html/drivers/driver29.html stable/11/contrib/ntp/html/miscopt.html stable/11/contrib/ntp/include/Makefile.am stable/11/contrib/ntp/include/Makefile.in stable/11/contrib/ntp/include/ntp.h stable/11/contrib/ntp/include/ntp_calendar.h stable/11/contrib/ntp/include/ntp_config.h stable/11/contrib/ntp/include/ntp_control.h stable/11/contrib/ntp/include/ntp_fp.h stable/11/contrib/ntp/include/ntp_io.h stable/11/contrib/ntp/include/ntp_refclock.h stable/11/contrib/ntp/include/ntp_request.h stable/11/contrib/ntp/include/ntp_stdlib.h stable/11/contrib/ntp/include/ntp_syslog.h stable/11/contrib/ntp/include/ntpd.h stable/11/contrib/ntp/include/timespecops.h stable/11/contrib/ntp/libntp/Makefile.am stable/11/contrib/ntp/libntp/Makefile.in stable/11/contrib/ntp/libntp/decodenetnum.c stable/11/contrib/ntp/libntp/dofptoa.c stable/11/contrib/ntp/libntp/dolfptoa.c stable/11/contrib/ntp/libntp/mstolfp.c stable/11/contrib/ntp/libntp/msyslog.c stable/11/contrib/ntp/libntp/ntp_calendar.c stable/11/contrib/ntp/libntp/recvbuff.c stable/11/contrib/ntp/libntp/statestr.c stable/11/contrib/ntp/libntp/systime.c stable/11/contrib/ntp/libparse/Makefile.am stable/11/contrib/ntp/libparse/Makefile.in stable/11/contrib/ntp/libparse/clk_rawdcf.c stable/11/contrib/ntp/ntpd/Makefile.am stable/11/contrib/ntp/ntpd/Makefile.in stable/11/contrib/ntp/ntpd/cmd_args.c stable/11/contrib/ntp/ntpd/complete.conf.in stable/11/contrib/ntp/ntpd/invoke-ntp.conf.texi stable/11/contrib/ntp/ntpd/invoke-ntp.keys.texi stable/11/contrib/ntp/ntpd/invoke-ntpd.texi stable/11/contrib/ntp/ntpd/keyword-gen-utd stable/11/contrib/ntp/ntpd/keyword-gen.c stable/11/contrib/ntp/ntpd/ntp.conf.5man stable/11/contrib/ntp/ntpd/ntp.conf.5mdoc stable/11/contrib/ntp/ntpd/ntp.conf.def stable/11/contrib/ntp/ntpd/ntp.conf.html stable/11/contrib/ntp/ntpd/ntp.conf.man.in stable/11/contrib/ntp/ntpd/ntp.conf.mdoc.in stable/11/contrib/ntp/ntpd/ntp.keys.5man stable/11/contrib/ntp/ntpd/ntp.keys.5mdoc stable/11/contrib/ntp/ntpd/ntp.keys.html stable/11/contrib/ntp/ntpd/ntp.keys.man.in stable/11/contrib/ntp/ntpd/ntp.keys.mdoc.in stable/11/contrib/ntp/ntpd/ntp_config.c stable/11/contrib/ntp/ntpd/ntp_control.c stable/11/contrib/ntp/ntpd/ntp_io.c stable/11/contrib/ntp/ntpd/ntp_keyword.h stable/11/contrib/ntp/ntpd/ntp_leapsec.c stable/11/contrib/ntp/ntpd/ntp_leapsec.h stable/11/contrib/ntp/ntpd/ntp_loopfilter.c stable/11/contrib/ntp/ntpd/ntp_parser.c stable/11/contrib/ntp/ntpd/ntp_parser.h stable/11/contrib/ntp/ntpd/ntp_peer.c stable/11/contrib/ntp/ntpd/ntp_proto.c stable/11/contrib/ntp/ntpd/ntp_refclock.c stable/11/contrib/ntp/ntpd/ntp_request.c stable/11/contrib/ntp/ntpd/ntp_restrict.c stable/11/contrib/ntp/ntpd/ntp_scanner.c stable/11/contrib/ntp/ntpd/ntp_util.c stable/11/contrib/ntp/ntpd/ntpd-opts.c stable/11/contrib/ntp/ntpd/ntpd-opts.h stable/11/contrib/ntp/ntpd/ntpd.1ntpdman stable/11/contrib/ntp/ntpd/ntpd.1ntpdmdoc stable/11/contrib/ntp/ntpd/ntpd.c stable/11/contrib/ntp/ntpd/ntpd.html stable/11/contrib/ntp/ntpd/ntpd.man.in stable/11/contrib/ntp/ntpd/ntpd.mdoc.in stable/11/contrib/ntp/ntpd/refclock_gpsdjson.c stable/11/contrib/ntp/ntpd/refclock_jupiter.c stable/11/contrib/ntp/ntpd/refclock_nmea.c stable/11/contrib/ntp/ntpd/refclock_oncore.c stable/11/contrib/ntp/ntpd/refclock_palisade.c stable/11/contrib/ntp/ntpd/refclock_palisade.h stable/11/contrib/ntp/ntpd/refclock_parse.c stable/11/contrib/ntp/ntpd/refclock_zyfer.c stable/11/contrib/ntp/ntpdate/ntpdate.c stable/11/contrib/ntp/ntpdc/invoke-ntpdc.texi stable/11/contrib/ntp/ntpdc/layout.std stable/11/contrib/ntp/ntpdc/ntpdc-opts.c stable/11/contrib/ntp/ntpdc/ntpdc-opts.h stable/11/contrib/ntp/ntpdc/ntpdc.1ntpdcman stable/11/contrib/ntp/ntpdc/ntpdc.1ntpdcmdoc stable/11/contrib/ntp/ntpdc/ntpdc.c stable/11/contrib/ntp/ntpdc/ntpdc.html stable/11/contrib/ntp/ntpdc/ntpdc.man.in stable/11/contrib/ntp/ntpdc/ntpdc.mdoc.in stable/11/contrib/ntp/ntpdc/ntpdc_ops.c stable/11/contrib/ntp/ntpq/Makefile.am stable/11/contrib/ntp/ntpq/Makefile.in stable/11/contrib/ntp/ntpq/invoke-ntpq.texi stable/11/contrib/ntp/ntpq/ntpq-opts.c stable/11/contrib/ntp/ntpq/ntpq-opts.h stable/11/contrib/ntp/ntpq/ntpq-subs.c stable/11/contrib/ntp/ntpq/ntpq.1ntpqman stable/11/contrib/ntp/ntpq/ntpq.1ntpqmdoc stable/11/contrib/ntp/ntpq/ntpq.c stable/11/contrib/ntp/ntpq/ntpq.h stable/11/contrib/ntp/ntpq/ntpq.html stable/11/contrib/ntp/ntpq/ntpq.man.in stable/11/contrib/ntp/ntpq/ntpq.mdoc.in stable/11/contrib/ntp/ntpsnmpd/invoke-ntpsnmpd.texi stable/11/contrib/ntp/ntpsnmpd/ntpsnmpd-opts.c stable/11/contrib/ntp/ntpsnmpd/ntpsnmpd-opts.h stable/11/contrib/ntp/ntpsnmpd/ntpsnmpd.1ntpsnmpdman stable/11/contrib/ntp/ntpsnmpd/ntpsnmpd.1ntpsnmpdmdoc stable/11/contrib/ntp/ntpsnmpd/ntpsnmpd.html stable/11/contrib/ntp/ntpsnmpd/ntpsnmpd.man.in stable/11/contrib/ntp/ntpsnmpd/ntpsnmpd.mdoc.in stable/11/contrib/ntp/packageinfo.sh stable/11/contrib/ntp/parseutil/dcfd.c stable/11/contrib/ntp/scripts/build/mkver.in stable/11/contrib/ntp/scripts/calc_tickadj/calc_tickadj-opts stable/11/contrib/ntp/scripts/calc_tickadj/calc_tickadj.1calc_tickadjman stable/11/contrib/ntp/scripts/calc_tickadj/calc_tickadj.1calc_tickadjmdoc stable/11/contrib/ntp/scripts/calc_tickadj/calc_tickadj.html stable/11/contrib/ntp/scripts/calc_tickadj/calc_tickadj.man.in stable/11/contrib/ntp/scripts/calc_tickadj/calc_tickadj.mdoc.in stable/11/contrib/ntp/scripts/calc_tickadj/invoke-calc_tickadj.texi stable/11/contrib/ntp/scripts/invoke-plot_summary.texi stable/11/contrib/ntp/scripts/invoke-summary.texi stable/11/contrib/ntp/scripts/ntp-wait/invoke-ntp-wait.texi stable/11/contrib/ntp/scripts/ntp-wait/ntp-wait-opts stable/11/contrib/ntp/scripts/ntp-wait/ntp-wait.1ntp-waitman stable/11/contrib/ntp/scripts/ntp-wait/ntp-wait.1ntp-waitmdoc stable/11/contrib/ntp/scripts/ntp-wait/ntp-wait.html stable/11/contrib/ntp/scripts/ntp-wait/ntp-wait.man.in stable/11/contrib/ntp/scripts/ntp-wait/ntp-wait.mdoc.in stable/11/contrib/ntp/scripts/ntpsweep/invoke-ntpsweep.texi stable/11/contrib/ntp/scripts/ntpsweep/ntpsweep-opts stable/11/contrib/ntp/scripts/ntpsweep/ntpsweep.1ntpsweepman stable/11/contrib/ntp/scripts/ntpsweep/ntpsweep.1ntpsweepmdoc stable/11/contrib/ntp/scripts/ntpsweep/ntpsweep.html stable/11/contrib/ntp/scripts/ntpsweep/ntpsweep.man.in stable/11/contrib/ntp/scripts/ntpsweep/ntpsweep.mdoc.in stable/11/contrib/ntp/scripts/ntptrace/invoke-ntptrace.texi stable/11/contrib/ntp/scripts/ntptrace/ntptrace-opts stable/11/contrib/ntp/scripts/ntptrace/ntptrace.1ntptraceman stable/11/contrib/ntp/scripts/ntptrace/ntptrace.1ntptracemdoc stable/11/contrib/ntp/scripts/ntptrace/ntptrace.html stable/11/contrib/ntp/scripts/ntptrace/ntptrace.man.in stable/11/contrib/ntp/scripts/ntptrace/ntptrace.mdoc.in stable/11/contrib/ntp/scripts/plot_summary-opts stable/11/contrib/ntp/scripts/plot_summary.1plot_summaryman stable/11/contrib/ntp/scripts/plot_summary.1plot_summarymdoc stable/11/contrib/ntp/scripts/plot_summary.html stable/11/contrib/ntp/scripts/plot_summary.man.in stable/11/contrib/ntp/scripts/plot_summary.mdoc.in stable/11/contrib/ntp/scripts/summary-opts stable/11/contrib/ntp/scripts/summary.1summaryman stable/11/contrib/ntp/scripts/summary.1summarymdoc stable/11/contrib/ntp/scripts/summary.html stable/11/contrib/ntp/scripts/summary.man.in stable/11/contrib/ntp/scripts/summary.mdoc.in stable/11/contrib/ntp/scripts/update-leap/invoke-update-leap.texi stable/11/contrib/ntp/scripts/update-leap/update-leap-opts stable/11/contrib/ntp/scripts/update-leap/update-leap.1update-leapman stable/11/contrib/ntp/scripts/update-leap/update-leap.1update-leapmdoc stable/11/contrib/ntp/scripts/update-leap/update-leap.html stable/11/contrib/ntp/scripts/update-leap/update-leap.man.in stable/11/contrib/ntp/scripts/update-leap/update-leap.mdoc.in stable/11/contrib/ntp/sntp/COPYRIGHT stable/11/contrib/ntp/sntp/configure stable/11/contrib/ntp/sntp/configure.ac stable/11/contrib/ntp/sntp/crypto.c stable/11/contrib/ntp/sntp/include/copyright.def stable/11/contrib/ntp/sntp/include/version.def stable/11/contrib/ntp/sntp/include/version.texi stable/11/contrib/ntp/sntp/invoke-sntp.texi stable/11/contrib/ntp/sntp/libevent/build-aux/ar-lib stable/11/contrib/ntp/sntp/libevent/build-aux/compile stable/11/contrib/ntp/sntp/libevent/build-aux/config.guess stable/11/contrib/ntp/sntp/libevent/build-aux/config.sub stable/11/contrib/ntp/sntp/libevent/build-aux/depcomp stable/11/contrib/ntp/sntp/libevent/build-aux/install-sh stable/11/contrib/ntp/sntp/libevent/build-aux/missing stable/11/contrib/ntp/sntp/libevent/build-aux/test-driver stable/11/contrib/ntp/sntp/libevent/build-aux/ylwrap stable/11/contrib/ntp/sntp/libevent/test/regress.gen.c stable/11/contrib/ntp/sntp/libevent/test/regress.gen.h stable/11/contrib/ntp/sntp/libopts/m4/libopts.m4 stable/11/contrib/ntp/sntp/m4/ntp_problemtests.m4 stable/11/contrib/ntp/sntp/m4/version.m4 stable/11/contrib/ntp/sntp/main.c stable/11/contrib/ntp/sntp/networking.c stable/11/contrib/ntp/sntp/scm-rev stable/11/contrib/ntp/sntp/sntp-opts.c stable/11/contrib/ntp/sntp/sntp-opts.h stable/11/contrib/ntp/sntp/sntp.1sntpman stable/11/contrib/ntp/sntp/sntp.1sntpmdoc stable/11/contrib/ntp/sntp/sntp.html stable/11/contrib/ntp/sntp/sntp.man.in stable/11/contrib/ntp/sntp/sntp.mdoc.in stable/11/contrib/ntp/sntp/tests/run-crypto.c stable/11/contrib/ntp/sntp/tests/run-keyFile.c stable/11/contrib/ntp/sntp/tests/run-kodDatabase.c stable/11/contrib/ntp/sntp/tests/run-kodFile.c stable/11/contrib/ntp/sntp/tests/run-networking.c stable/11/contrib/ntp/sntp/tests/run-packetHandling.c stable/11/contrib/ntp/sntp/tests/run-packetProcessing.c stable/11/contrib/ntp/sntp/tests/run-t-log.c stable/11/contrib/ntp/sntp/tests/run-utilities.c stable/11/contrib/ntp/sntp/tests/testconf.yml stable/11/contrib/ntp/sntp/version.c stable/11/contrib/ntp/util/invoke-ntp-keygen.texi stable/11/contrib/ntp/util/ntp-keygen-opts.c stable/11/contrib/ntp/util/ntp-keygen-opts.h stable/11/contrib/ntp/util/ntp-keygen.1ntp-keygenman stable/11/contrib/ntp/util/ntp-keygen.1ntp-keygenmdoc stable/11/contrib/ntp/util/ntp-keygen.html stable/11/contrib/ntp/util/ntp-keygen.man.in stable/11/contrib/ntp/util/ntp-keygen.mdoc.in stable/11/contrib/ntp/util/ntptime.c stable/11/usr.sbin/ntp/config.h stable/11/usr.sbin/ntp/libntp/Makefile Directory Properties: stable/11/ (props changed) Changes in other areas also in this revision: Added: stable/12/contrib/ntp/include/ntp_calgps.h - copied unchanged from r358652, head/contrib/ntp/include/ntp_calgps.h stable/12/contrib/ntp/include/ntp_psl.h - copied unchanged from r358652, head/contrib/ntp/include/ntp_psl.h stable/12/contrib/ntp/include/timexsup.h - copied unchanged from r358652, head/contrib/ntp/include/timexsup.h stable/12/contrib/ntp/libntp/ntp_calgps.c - copied unchanged from r358652, head/contrib/ntp/libntp/ntp_calgps.c stable/12/contrib/ntp/libntp/timespecops.c - copied unchanged from r358652, head/contrib/ntp/libntp/timespecops.c stable/12/contrib/ntp/libntp/timexsup.c - copied unchanged from r358652, head/contrib/ntp/libntp/timexsup.c stable/12/contrib/ntp/ntpd/psl0.conf - copied unchanged from r358652, head/contrib/ntp/ntpd/psl0.conf stable/12/contrib/ntp/ntpd/psl1.conf - copied unchanged from r358652, head/contrib/ntp/ntpd/psl1.conf stable/12/contrib/ntp/ntpd/psl2.conf - copied unchanged from r358652, head/contrib/ntp/ntpd/psl2.conf Modified: stable/12/contrib/ntp/COPYRIGHT stable/12/contrib/ntp/ChangeLog stable/12/contrib/ntp/CommitLog stable/12/contrib/ntp/NEWS stable/12/contrib/ntp/config.h.in stable/12/contrib/ntp/configure stable/12/contrib/ntp/configure.ac stable/12/contrib/ntp/html/accopt.html stable/12/contrib/ntp/html/clockopt.html stable/12/contrib/ntp/html/confopt.html stable/12/contrib/ntp/html/copyright.html stable/12/contrib/ntp/html/discipline.html stable/12/contrib/ntp/html/drivers/driver20.html stable/12/contrib/ntp/html/drivers/driver29.html stable/12/contrib/ntp/html/miscopt.html stable/12/contrib/ntp/include/Makefile.am stable/12/contrib/ntp/include/Makefile.in stable/12/contrib/ntp/include/ntp.h stable/12/contrib/ntp/include/ntp_calendar.h stable/12/contrib/ntp/include/ntp_config.h stable/12/contrib/ntp/include/ntp_control.h stable/12/contrib/ntp/include/ntp_fp.h stable/12/contrib/ntp/include/ntp_io.h stable/12/contrib/ntp/include/ntp_refclock.h stable/12/contrib/ntp/include/ntp_request.h stable/12/contrib/ntp/include/ntp_stdlib.h stable/12/contrib/ntp/include/ntp_syslog.h stable/12/contrib/ntp/include/ntpd.h stable/12/contrib/ntp/include/timespecops.h stable/12/contrib/ntp/libntp/Makefile.am stable/12/contrib/ntp/libntp/Makefile.in stable/12/contrib/ntp/libntp/decodenetnum.c stable/12/contrib/ntp/libntp/dofptoa.c stable/12/contrib/ntp/libntp/dolfptoa.c stable/12/contrib/ntp/libntp/mstolfp.c stable/12/contrib/ntp/libntp/msyslog.c stable/12/contrib/ntp/libntp/ntp_calendar.c stable/12/contrib/ntp/libntp/recvbuff.c stable/12/contrib/ntp/libntp/statestr.c stable/12/contrib/ntp/libntp/systime.c stable/12/contrib/ntp/libparse/Makefile.am stable/12/contrib/ntp/libparse/Makefile.in stable/12/contrib/ntp/libparse/clk_rawdcf.c stable/12/contrib/ntp/ntpd/Makefile.am stable/12/contrib/ntp/ntpd/Makefile.in stable/12/contrib/ntp/ntpd/cmd_args.c stable/12/contrib/ntp/ntpd/complete.conf.in stable/12/contrib/ntp/ntpd/invoke-ntp.conf.texi stable/12/contrib/ntp/ntpd/invoke-ntp.keys.texi stable/12/contrib/ntp/ntpd/invoke-ntpd.texi stable/12/contrib/ntp/ntpd/keyword-gen-utd stable/12/contrib/ntp/ntpd/keyword-gen.c stable/12/contrib/ntp/ntpd/ntp.conf.5man stable/12/contrib/ntp/ntpd/ntp.conf.5mdoc stable/12/contrib/ntp/ntpd/ntp.conf.def stable/12/contrib/ntp/ntpd/ntp.conf.html stable/12/contrib/ntp/ntpd/ntp.conf.man.in stable/12/contrib/ntp/ntpd/ntp.conf.mdoc.in stable/12/contrib/ntp/ntpd/ntp.keys.5man stable/12/contrib/ntp/ntpd/ntp.keys.5mdoc stable/12/contrib/ntp/ntpd/ntp.keys.html stable/12/contrib/ntp/ntpd/ntp.keys.man.in stable/12/contrib/ntp/ntpd/ntp.keys.mdoc.in stable/12/contrib/ntp/ntpd/ntp_config.c stable/12/contrib/ntp/ntpd/ntp_control.c stable/12/contrib/ntp/ntpd/ntp_io.c stable/12/contrib/ntp/ntpd/ntp_keyword.h stable/12/contrib/ntp/ntpd/ntp_leapsec.c stable/12/contrib/ntp/ntpd/ntp_leapsec.h stable/12/contrib/ntp/ntpd/ntp_loopfilter.c stable/12/contrib/ntp/ntpd/ntp_parser.c stable/12/contrib/ntp/ntpd/ntp_parser.h stable/12/contrib/ntp/ntpd/ntp_peer.c stable/12/contrib/ntp/ntpd/ntp_proto.c stable/12/contrib/ntp/ntpd/ntp_refclock.c stable/12/contrib/ntp/ntpd/ntp_request.c stable/12/contrib/ntp/ntpd/ntp_restrict.c stable/12/contrib/ntp/ntpd/ntp_scanner.c stable/12/contrib/ntp/ntpd/ntp_util.c stable/12/contrib/ntp/ntpd/ntpd-opts.c stable/12/contrib/ntp/ntpd/ntpd-opts.h stable/12/contrib/ntp/ntpd/ntpd.1ntpdman stable/12/contrib/ntp/ntpd/ntpd.1ntpdmdoc stable/12/contrib/ntp/ntpd/ntpd.c stable/12/contrib/ntp/ntpd/ntpd.html stable/12/contrib/ntp/ntpd/ntpd.man.in stable/12/contrib/ntp/ntpd/ntpd.mdoc.in stable/12/contrib/ntp/ntpd/refclock_gpsdjson.c stable/12/contrib/ntp/ntpd/refclock_jupiter.c stable/12/contrib/ntp/ntpd/refclock_nmea.c stable/12/contrib/ntp/ntpd/refclock_oncore.c stable/12/contrib/ntp/ntpd/refclock_palisade.c stable/12/contrib/ntp/ntpd/refclock_palisade.h stable/12/contrib/ntp/ntpd/refclock_parse.c stable/12/contrib/ntp/ntpd/refclock_zyfer.c stable/12/contrib/ntp/ntpdate/ntpdate.c stable/12/contrib/ntp/ntpdc/invoke-ntpdc.texi stable/12/contrib/ntp/ntpdc/layout.std stable/12/contrib/ntp/ntpdc/ntpdc-opts.c stable/12/contrib/ntp/ntpdc/ntpdc-opts.h stable/12/contrib/ntp/ntpdc/ntpdc.1ntpdcman stable/12/contrib/ntp/ntpdc/ntpdc.1ntpdcmdoc stable/12/contrib/ntp/ntpdc/ntpdc.c stable/12/contrib/ntp/ntpdc/ntpdc.html stable/12/contrib/ntp/ntpdc/ntpdc.man.in stable/12/contrib/ntp/ntpdc/ntpdc.mdoc.in stable/12/contrib/ntp/ntpdc/ntpdc_ops.c stable/12/contrib/ntp/ntpq/Makefile.am stable/12/contrib/ntp/ntpq/Makefile.in stable/12/contrib/ntp/ntpq/invoke-ntpq.texi stable/12/contrib/ntp/ntpq/ntpq-opts.c stable/12/contrib/ntp/ntpq/ntpq-opts.h stable/12/contrib/ntp/ntpq/ntpq-subs.c stable/12/contrib/ntp/ntpq/ntpq.1ntpqman stable/12/contrib/ntp/ntpq/ntpq.1ntpqmdoc stable/12/contrib/ntp/ntpq/ntpq.c stable/12/contrib/ntp/ntpq/ntpq.h stable/12/contrib/ntp/ntpq/ntpq.html stable/12/contrib/ntp/ntpq/ntpq.man.in stable/12/contrib/ntp/ntpq/ntpq.mdoc.in stable/12/contrib/ntp/ntpsnmpd/invoke-ntpsnmpd.texi stable/12/contrib/ntp/ntpsnmpd/ntpsnmpd-opts.c stable/12/contrib/ntp/ntpsnmpd/ntpsnmpd-opts.h stable/12/contrib/ntp/ntpsnmpd/ntpsnmpd.1ntpsnmpdman stable/12/contrib/ntp/ntpsnmpd/ntpsnmpd.1ntpsnmpdmdoc stable/12/contrib/ntp/ntpsnmpd/ntpsnmpd.html stable/12/contrib/ntp/ntpsnmpd/ntpsnmpd.man.in stable/12/contrib/ntp/ntpsnmpd/ntpsnmpd.mdoc.in stable/12/contrib/ntp/packageinfo.sh stable/12/contrib/ntp/parseutil/dcfd.c stable/12/contrib/ntp/scripts/build/mkver.in stable/12/contrib/ntp/scripts/calc_tickadj/calc_tickadj-opts stable/12/contrib/ntp/scripts/calc_tickadj/calc_tickadj.1calc_tickadjman stable/12/contrib/ntp/scripts/calc_tickadj/calc_tickadj.1calc_tickadjmdoc stable/12/contrib/ntp/scripts/calc_tickadj/calc_tickadj.html stable/12/contrib/ntp/scripts/calc_tickadj/calc_tickadj.man.in stable/12/contrib/ntp/scripts/calc_tickadj/calc_tickadj.mdoc.in stable/12/contrib/ntp/scripts/calc_tickadj/invoke-calc_tickadj.texi stable/12/contrib/ntp/scripts/invoke-plot_summary.texi stable/12/contrib/ntp/scripts/invoke-summary.texi stable/12/contrib/ntp/scripts/ntp-wait/invoke-ntp-wait.texi stable/12/contrib/ntp/scripts/ntp-wait/ntp-wait-opts stable/12/contrib/ntp/scripts/ntp-wait/ntp-wait.1ntp-waitman stable/12/contrib/ntp/scripts/ntp-wait/ntp-wait.1ntp-waitmdoc stable/12/contrib/ntp/scripts/ntp-wait/ntp-wait.html stable/12/contrib/ntp/scripts/ntp-wait/ntp-wait.man.in stable/12/contrib/ntp/scripts/ntp-wait/ntp-wait.mdoc.in stable/12/contrib/ntp/scripts/ntpsweep/invoke-ntpsweep.texi stable/12/contrib/ntp/scripts/ntpsweep/ntpsweep-opts stable/12/contrib/ntp/scripts/ntpsweep/ntpsweep.1ntpsweepman stable/12/contrib/ntp/scripts/ntpsweep/ntpsweep.1ntpsweepmdoc stable/12/contrib/ntp/scripts/ntpsweep/ntpsweep.html stable/12/contrib/ntp/scripts/ntpsweep/ntpsweep.man.in stable/12/contrib/ntp/scripts/ntpsweep/ntpsweep.mdoc.in stable/12/contrib/ntp/scripts/ntptrace/invoke-ntptrace.texi stable/12/contrib/ntp/scripts/ntptrace/ntptrace-opts stable/12/contrib/ntp/scripts/ntptrace/ntptrace.1ntptraceman stable/12/contrib/ntp/scripts/ntptrace/ntptrace.1ntptracemdoc stable/12/contrib/ntp/scripts/ntptrace/ntptrace.html stable/12/contrib/ntp/scripts/ntptrace/ntptrace.man.in stable/12/contrib/ntp/scripts/ntptrace/ntptrace.mdoc.in stable/12/contrib/ntp/scripts/plot_summary-opts stable/12/contrib/ntp/scripts/plot_summary.1plot_summaryman stable/12/contrib/ntp/scripts/plot_summary.1plot_summarymdoc stable/12/contrib/ntp/scripts/plot_summary.html stable/12/contrib/ntp/scripts/plot_summary.man.in stable/12/contrib/ntp/scripts/plot_summary.mdoc.in stable/12/contrib/ntp/scripts/summary-opts stable/12/contrib/ntp/scripts/summary.1summaryman stable/12/contrib/ntp/scripts/summary.1summarymdoc stable/12/contrib/ntp/scripts/summary.html stable/12/contrib/ntp/scripts/summary.man.in stable/12/contrib/ntp/scripts/summary.mdoc.in stable/12/contrib/ntp/scripts/update-leap/invoke-update-leap.texi stable/12/contrib/ntp/scripts/update-leap/update-leap-opts stable/12/contrib/ntp/scripts/update-leap/update-leap.1update-leapman stable/12/contrib/ntp/scripts/update-leap/update-leap.1update-leapmdoc stable/12/contrib/ntp/scripts/update-leap/update-leap.html stable/12/contrib/ntp/scripts/update-leap/update-leap.man.in stable/12/contrib/ntp/scripts/update-leap/update-leap.mdoc.in stable/12/contrib/ntp/sntp/COPYRIGHT stable/12/contrib/ntp/sntp/configure stable/12/contrib/ntp/sntp/configure.ac stable/12/contrib/ntp/sntp/crypto.c stable/12/contrib/ntp/sntp/include/copyright.def stable/12/contrib/ntp/sntp/include/version.def stable/12/contrib/ntp/sntp/include/version.texi stable/12/contrib/ntp/sntp/invoke-sntp.texi stable/12/contrib/ntp/sntp/libevent/build-aux/ar-lib stable/12/contrib/ntp/sntp/libevent/build-aux/compile stable/12/contrib/ntp/sntp/libevent/build-aux/config.guess stable/12/contrib/ntp/sntp/libevent/build-aux/config.sub stable/12/contrib/ntp/sntp/libevent/build-aux/depcomp stable/12/contrib/ntp/sntp/libevent/build-aux/install-sh stable/12/contrib/ntp/sntp/libevent/build-aux/missing stable/12/contrib/ntp/sntp/libevent/build-aux/test-driver stable/12/contrib/ntp/sntp/libevent/build-aux/ylwrap stable/12/contrib/ntp/sntp/libevent/test/regress.gen.c stable/12/contrib/ntp/sntp/libevent/test/regress.gen.h stable/12/contrib/ntp/sntp/libopts/m4/libopts.m4 stable/12/contrib/ntp/sntp/m4/ntp_problemtests.m4 stable/12/contrib/ntp/sntp/m4/version.m4 stable/12/contrib/ntp/sntp/main.c stable/12/contrib/ntp/sntp/networking.c stable/12/contrib/ntp/sntp/scm-rev stable/12/contrib/ntp/sntp/sntp-opts.c stable/12/contrib/ntp/sntp/sntp-opts.h stable/12/contrib/ntp/sntp/sntp.1sntpman stable/12/contrib/ntp/sntp/sntp.1sntpmdoc stable/12/contrib/ntp/sntp/sntp.html stable/12/contrib/ntp/sntp/sntp.man.in stable/12/contrib/ntp/sntp/sntp.mdoc.in stable/12/contrib/ntp/sntp/tests/run-crypto.c stable/12/contrib/ntp/sntp/tests/run-keyFile.c stable/12/contrib/ntp/sntp/tests/run-kodDatabase.c stable/12/contrib/ntp/sntp/tests/run-kodFile.c stable/12/contrib/ntp/sntp/tests/run-networking.c stable/12/contrib/ntp/sntp/tests/run-packetHandling.c stable/12/contrib/ntp/sntp/tests/run-packetProcessing.c stable/12/contrib/ntp/sntp/tests/run-t-log.c stable/12/contrib/ntp/sntp/tests/run-utilities.c stable/12/contrib/ntp/sntp/tests/testconf.yml stable/12/contrib/ntp/sntp/version.c stable/12/contrib/ntp/util/invoke-ntp-keygen.texi stable/12/contrib/ntp/util/ntp-keygen-opts.c stable/12/contrib/ntp/util/ntp-keygen-opts.h stable/12/contrib/ntp/util/ntp-keygen.1ntp-keygenman stable/12/contrib/ntp/util/ntp-keygen.1ntp-keygenmdoc stable/12/contrib/ntp/util/ntp-keygen.html stable/12/contrib/ntp/util/ntp-keygen.man.in stable/12/contrib/ntp/util/ntp-keygen.mdoc.in stable/12/contrib/ntp/util/ntptime.c stable/12/usr.sbin/ntp/config.h stable/12/usr.sbin/ntp/libntp/Makefile Directory Properties: stable/12/ (props changed) Modified: stable/11/contrib/ntp/COPYRIGHT ============================================================================== --- stable/11/contrib/ntp/COPYRIGHT Wed Mar 4 23:49:20 2020 (r358658) +++ stable/11/contrib/ntp/COPYRIGHT Wed Mar 4 23:54:13 2020 (r358659) @@ -3,7 +3,7 @@ This file is automatically generated from html/copyrig jpg "Clone me," says Dolly sheepishly. - Last update: 2-Jan-2017 11:58 UTC + Last update: 4-Feb-2020 23:47 UTC __________________________________________________________________ The following copyright notice applies to all files collectively called @@ -32,7 +32,7 @@ This file is automatically generated from html/copyrig Burnicki is: *********************************************************************** * * -* Copyright (c) Network Time Foundation 2011-2017 * +* Copyright (c) Network Time Foundation 2011-2020 * * * * All Rights Reserved * * * Modified: stable/11/contrib/ntp/ChangeLog ============================================================================== --- stable/11/contrib/ntp/ChangeLog Wed Mar 4 23:49:20 2020 (r358658) +++ stable/11/contrib/ntp/ChangeLog Wed Mar 4 23:54:13 2020 (r358659) @@ -1,4 +1,100 @@ --- +(4.2.8p14) 2020/03/03 Released by Harlan Stenn + +* [Sec 3610] process_control() should bail earlier on short packets. stenn@ + - Reported by Philippe Antoine +* [Sec 3596] Highly predictable timestamp attack. + - Reported by Miroslav Lichvar +* [Sec 3592] DoS attack on client ntpd + - Reported by Miroslav Lichvar +* [Bug 3637] Emit the version of ntpd in saveconfig. stenn@ +* [Bug 3636] NMEA: combine time/date from multiple sentences +* [Bug 3635] Make leapsecond file hash check optional +* [Bug 3634] Typo in discipline.html, reported by Jason Harrison. stenn@ +* [Bug 3628] raw DCF decoding - improve robustness with Zeller's congruence + - implement Zeller's congruence in libparse and libntp +* [Bug 3627] SIGSEGV on FreeBSD-12 with stack limit and stack gap + - integrated patch by Cy Schubert +* [Bug 3620] memory leak in ntpq sysinfo + - applied patch by Gerry Garvey +* [Bug 3619] Honour drefid setting in cooked mode and sysinfo + - applied patch by Gerry Garvey +* [Bug 3617] Add support for ACE III and Copernicus II receivers + - integrated patch by Richard Steedman +* [Bug 3615] accelerate refclock startup +* [Bug 3613] Propagate noselect to mobilized pool servers + - Reported by Martin Burnicki +* [Bug 3612] Use-of-uninitialized-value in receive function + - Reported by Philippe Antoine +* [Bug 3611] NMEA time interpreted incorrectly + - officially document new "trust date" mode bit for NMEA driver + - restore the (previously undocumented) "trust date" feature lost with [bug 3577] +* [Bug 3609] Fixing wrong falseticker in case of non-statistic jitter + - mostly based on a patch by Michael Haardt, implementing 'fudge minjitter' +* [Bug 3608] libparse fails to compile on S11.4SRU13 and later + - removed ffs() and fls() prototypes as per Brian Utterback +* [Bug 3604] Wrong param byte order passing into record_raw_stats() in + ntp_io.c + - fixed byte and paramter order as suggested by wei6410@sina.com +* [Bug 3601] Tests fail to link on platforms with ntp_cv_gc_sections_runs=no +* [Bug 3599] Build fails on linux-m68k due to alignment issues + - added padding as suggested by John Paul Adrian Glaubitz +* [Bug 3594] ntpd discards messages coming through nmead +* [Bug 3593] ntpd discards silently nmea messages after the 5th string +* [Bug 3590] Update refclock_oncore.c to the new GPS date API +* [Bug 3585] Unity tests mix buffered and unbuffered output + - stdout+stderr are set to line buffered during test setup now +* [Bug 3583] synchronization error + - set clock to base date if system time is before that limit +* [Bug 3582] gpsdjson refclock fudgetime1 adjustment is doubled +* [Bug 3580] Possible bug ntpq-subs (NULL dereference in dogetassoc) + - Reported by Paulo Neves +* [Bug 3577] Update refclock_zyfer.c to the new GPS date API + - also updates for refclock_nmea.c and refclock_jupiter.c +* [Bug 3576] New GPS date function API +* [Bug 3573] nptdate: missleading error message +* [Bug 3570] NMEA driver docs: talker ID not mentioned, typo +* [Bug 3569] cleanup MOD_NANO/STA_NANO handling for 'ntpadjtimex()' + - sidekick: service port resolution in 'ntpdate' +* [Bug 3550] Reproducible build: Respect SOURCE_DATE_EPOCH + - applied patch by Douglas Royds +* [Bug 3542] ntpdc monlist parameters cannot be set +* [Bug 3533] ntpdc peer_info ipv6 issues + - applied patch by Gerry Garvey +* [Bug 3531] make check: test-decodenetnum fails + - try to harden 'decodenetnum()' against 'getaddrinfo()' errors + - fix wrong cond-compile tests in unit tests +* [Bug 3517] Reducing build noise +* [Bug 3516] Require tooling from this decade + - patch by Philipp Prindeville +* [Bug 3515] Refactor ntpdmain() dispatcher loop and group common code + - patch by Philipp Prindeville +* [Bug 3511] Get rid of AC_LANG_SOURCE() warnings + - patch by Philipp Prindeville +* [Bug 3510] Flatten out the #ifdef nesting in ntpdmain() + - partial application of patch by Philipp Prindeville +* [Bug 3491] Signed values of LFP datatypes should always display a sign + - applied patch by Gerry Garvey & fixed unit tests +* [Bug 3490] Patch to support Trimble Resolution Receivers + - applied (modified) patch by Richard Steedman +* [Bug 3473] RefID of refclocks should always be text format + - applied patch by Gerry Garvey (with minor formatting changes) +* [Bug 3132] Building 4.2.8p8 with disabled local libopts fails + - applied patch by Miroslav Lichvar +* [Bug 3094] ntpd trying to listen for broadcasts on a completely ipv6 network + +* [Bug 2420] ntpd doesn't run and exits with retval 0 when invalid user + is specified with -u + - monitor daemon child startup & propagate exit codes +* [Bug 1433] runtime check whether the kernel really supports capabilities + - (modified) patch by Kurt Roeckx +* Clean up sntp/networking.c:sendpkt() error message. +* Provide more detail on unrecognized config file parser tokens. +* Startup log improvements. +* Update the copyright year. +* html/confopt.html: cleanup. + +--- (4.2.8p13) 2019/03/07 Released by Harlan Stenn * [Sec 3565] Crafted null dereference attack in authenticated Modified: stable/11/contrib/ntp/CommitLog ============================================================================== --- stable/11/contrib/ntp/CommitLog Wed Mar 4 23:49:20 2020 (r358658) +++ stable/11/contrib/ntp/CommitLog Wed Mar 4 23:54:13 2020 (r358659) @@ -1,10 +1,3065 @@ -ChangeSet@1.3849, 2019-02-20 17:13:36-08:00, harlan@ntp-build.tal1.ntfo.org +ChangeSet@1.3896, 2020-03-03 17:42:43-08:00, ntpreleng@ntp-build.tal1.ntfo.org + NTP_4_2_8P14 + TAG: NTP_4_2_8P14 + + ChangeLog@1.1974 +1 -1 + NTP_4_2_8P14 + + ntpd/invoke-ntp.conf.texi@1.221 +1 -1 + NTP_4_2_8P14 + + ntpd/invoke-ntp.keys.texi@1.206 +1 -1 + NTP_4_2_8P14 + + ntpd/invoke-ntpd.texi@1.520 +2 -2 + NTP_4_2_8P14 + + ntpd/ntp.conf.5man@1.255 +2 -2 + NTP_4_2_8P14 + + ntpd/ntp.conf.5mdoc@1.255 +1 -1 + NTP_4_2_8P14 + + ntpd/ntp.conf.html@1.203 +1 -1 + NTP_4_2_8P14 + + ntpd/ntp.conf.man.in@1.255 +2 -2 + NTP_4_2_8P14 + + ntpd/ntp.conf.mdoc.in@1.255 +1 -1 + NTP_4_2_8P14 + + ntpd/ntp.keys.5man@1.240 +2 -2 + NTP_4_2_8P14 + + ntpd/ntp.keys.5mdoc@1.240 +1 -1 + NTP_4_2_8P14 + + ntpd/ntp.keys.html@1.201 +1 -1 + NTP_4_2_8P14 + + ntpd/ntp.keys.man.in@1.240 +2 -2 + NTP_4_2_8P14 + + ntpd/ntp.keys.mdoc.in@1.240 +1 -1 + NTP_4_2_8P14 + + ntpd/ntpd-opts.c@1.543 +7 -7 + NTP_4_2_8P14 + + ntpd/ntpd-opts.h@1.542 +3 -3 + NTP_4_2_8P14 + + ntpd/ntpd.1ntpdman@1.349 +2 -2 + NTP_4_2_8P14 + + ntpd/ntpd.1ntpdmdoc@1.349 +1 -1 + NTP_4_2_8P14 + + ntpd/ntpd.html@1.194 +2 -2 + NTP_4_2_8P14 + + ntpd/ntpd.man.in@1.349 +2 -2 + NTP_4_2_8P14 + + ntpd/ntpd.mdoc.in@1.349 +1 -1 + NTP_4_2_8P14 + + ntpdc/invoke-ntpdc.texi@1.517 +2 -2 + NTP_4_2_8P14 + + ntpdc/ntpdc-opts.c@1.536 +7 -7 + NTP_4_2_8P14 + + ntpdc/ntpdc-opts.h@1.535 +3 -3 + NTP_4_2_8P14 + + ntpdc/ntpdc.1ntpdcman@1.348 +2 -2 + NTP_4_2_8P14 + + ntpdc/ntpdc.1ntpdcmdoc@1.348 +1 -1 + NTP_4_2_8P14 + + ntpdc/ntpdc.html@1.363 +2 -2 + NTP_4_2_8P14 + + ntpdc/ntpdc.man.in@1.348 +2 -2 + NTP_4_2_8P14 + + ntpdc/ntpdc.mdoc.in@1.348 +1 -1 + NTP_4_2_8P14 + + ntpq/invoke-ntpq.texi@1.527 +2 -2 + NTP_4_2_8P14 + + ntpq/ntpq-opts.c@1.545 +7 -7 + NTP_4_2_8P14 + + ntpq/ntpq-opts.h@1.543 +3 -3 + NTP_4_2_8P14 + + ntpq/ntpq.1ntpqman@1.355 +2 -2 + NTP_4_2_8P14 + + ntpq/ntpq.1ntpqmdoc@1.355 +1 -1 + NTP_4_2_8P14 + + ntpq/ntpq.html@1.194 +2 -2 + NTP_4_2_8P14 + + ntpq/ntpq.man.in@1.355 +2 -2 + NTP_4_2_8P14 + + ntpq/ntpq.mdoc.in@1.355 +1 -1 + NTP_4_2_8P14 + + ntpsnmpd/invoke-ntpsnmpd.texi@1.519 +1 -1 + NTP_4_2_8P14 + + ntpsnmpd/ntpsnmpd-opts.c@1.538 +7 -7 + NTP_4_2_8P14 + + ntpsnmpd/ntpsnmpd-opts.h@1.537 +3 -3 + NTP_4_2_8P14 + + ntpsnmpd/ntpsnmpd.1ntpsnmpdman@1.348 +2 -2 + NTP_4_2_8P14 + + ntpsnmpd/ntpsnmpd.1ntpsnmpdmdoc@1.348 +1 -1 + NTP_4_2_8P14 + + ntpsnmpd/ntpsnmpd.html@1.187 +1 -1 + NTP_4_2_8P14 + + ntpsnmpd/ntpsnmpd.man.in@1.348 +2 -2 + NTP_4_2_8P14 + + ntpsnmpd/ntpsnmpd.mdoc.in@1.348 +1 -1 + NTP_4_2_8P14 + + packageinfo.sh@1.544 +1 -1 + NTP_4_2_8P14 + + scripts/calc_tickadj/calc_tickadj.1calc_tickadjman@1.109 +2 -2 + NTP_4_2_8P14 + + scripts/calc_tickadj/calc_tickadj.1calc_tickadjmdoc@1.110 +1 -1 + NTP_4_2_8P14 + + scripts/calc_tickadj/calc_tickadj.html@1.110 +1 -1 + NTP_4_2_8P14 + + scripts/calc_tickadj/calc_tickadj.man.in@1.108 +2 -2 + NTP_4_2_8P14 + + scripts/calc_tickadj/calc_tickadj.mdoc.in@1.110 +1 -1 + NTP_4_2_8P14 + + scripts/calc_tickadj/invoke-calc_tickadj.texi@1.113 +1 -1 + NTP_4_2_8P14 + + scripts/invoke-plot_summary.texi@1.131 +2 -2 + NTP_4_2_8P14 + + scripts/invoke-summary.texi@1.130 +2 -2 + NTP_4_2_8P14 + + scripts/ntp-wait/invoke-ntp-wait.texi@1.341 +2 -2 + NTP_4_2_8P14 + + scripts/ntp-wait/ntp-wait-opts@1.77 +2 -2 + NTP_4_2_8P14 + + scripts/ntp-wait/ntp-wait.1ntp-waitman@1.337 +2 -2 + NTP_4_2_8P14 + + scripts/ntp-wait/ntp-wait.1ntp-waitmdoc@1.338 +1 -1 + NTP_4_2_8P14 + + scripts/ntp-wait/ntp-wait.html@1.359 +2 -2 + NTP_4_2_8P14 + + scripts/ntp-wait/ntp-wait.man.in@1.337 +2 -2 + NTP_4_2_8P14 + + scripts/ntp-wait/ntp-wait.mdoc.in@1.338 +1 -1 + NTP_4_2_8P14 + + scripts/ntpsweep/invoke-ntpsweep.texi@1.128 +2 -2 + NTP_4_2_8P14 + + scripts/ntpsweep/ntpsweep-opts@1.79 +2 -2 + NTP_4_2_8P14 + + scripts/ntpsweep/ntpsweep.1ntpsweepman@1.116 +2 -2 + NTP_4_2_8P14 + + scripts/ntpsweep/ntpsweep.1ntpsweepmdoc@1.116 +1 -1 + NTP_4_2_8P14 + + scripts/ntpsweep/ntpsweep.html@1.131 +2 -2 + NTP_4_2_8P14 + + scripts/ntpsweep/ntpsweep.man.in@1.116 +2 -2 + NTP_4_2_8P14 + + scripts/ntpsweep/ntpsweep.mdoc.in@1.117 +1 -1 + NTP_4_2_8P14 + + scripts/ntptrace/invoke-ntptrace.texi@1.130 +2 -2 + NTP_4_2_8P14 + + scripts/ntptrace/ntptrace-opts@1.79 +2 -2 + NTP_4_2_8P14 + + scripts/ntptrace/ntptrace.1ntptraceman@1.116 +2 -2 + NTP_4_2_8P14 + + scripts/ntptrace/ntptrace.1ntptracemdoc@1.117 +1 -1 + NTP_4_2_8P14 + + scripts/ntptrace/ntptrace.html@1.132 +2 -2 + NTP_4_2_8P14 + + scripts/ntptrace/ntptrace.man.in@1.116 +2 -2 + NTP_4_2_8P14 + + scripts/ntptrace/ntptrace.mdoc.in@1.118 +1 -1 + NTP_4_2_8P14 + + scripts/plot_summary-opts@1.80 +2 -2 + NTP_4_2_8P14 + + scripts/plot_summary.1plot_summaryman@1.129 +2 -2 + NTP_4_2_8P14 + + scripts/plot_summary.1plot_summarymdoc@1.129 +1 -1 + NTP_4_2_8P14 + + scripts/plot_summary.html@1.134 +2 -2 + NTP_4_2_8P14 + + scripts/plot_summary.man.in@1.129 +2 -2 + NTP_4_2_8P14 + + scripts/plot_summary.mdoc.in@1.129 +1 -1 + NTP_4_2_8P14 + + scripts/summary-opts@1.79 +2 -2 + NTP_4_2_8P14 + + scripts/summary.1summaryman@1.128 +2 -2 + NTP_4_2_8P14 + + scripts/summary.1summarymdoc@1.128 +1 -1 + NTP_4_2_8P14 + + scripts/summary.html@1.133 +2 -2 + NTP_4_2_8P14 + + scripts/summary.man.in@1.128 +2 -2 + NTP_4_2_8P14 + + scripts/summary.mdoc.in@1.128 +1 -1 + NTP_4_2_8P14 + + scripts/update-leap/invoke-update-leap.texi@1.29 +1 -1 + NTP_4_2_8P14 + + scripts/update-leap/update-leap-opts@1.30 +2 -2 + NTP_4_2_8P14 + + scripts/update-leap/update-leap.1update-leapman@1.29 +2 -2 + NTP_4_2_8P14 + + scripts/update-leap/update-leap.1update-leapmdoc@1.29 +1 -1 + NTP_4_2_8P14 + + scripts/update-leap/update-leap.html@1.30 +1 -1 + NTP_4_2_8P14 + + scripts/update-leap/update-leap.man.in@1.29 +2 -2 + NTP_4_2_8P14 + + scripts/update-leap/update-leap.mdoc.in@1.29 +1 -1 + NTP_4_2_8P14 + + sntp/invoke-sntp.texi@1.519 +2 -2 + NTP_4_2_8P14 + + sntp/sntp-opts.c@1.539 +7 -7 + NTP_4_2_8P14 + + sntp/sntp-opts.h@1.537 +3 -3 + NTP_4_2_8P14 + + sntp/sntp.1sntpman@1.354 +2 -2 + NTP_4_2_8P14 + + sntp/sntp.1sntpmdoc@1.354 +1 -1 + NTP_4_2_8P14 + + sntp/sntp.html@1.535 +2 -2 + NTP_4_2_8P14 + + sntp/sntp.man.in@1.354 +2 -2 + NTP_4_2_8P14 + + sntp/sntp.mdoc.in@1.354 +1 -1 + NTP_4_2_8P14 + + util/invoke-ntp-keygen.texi@1.522 +2 -2 + NTP_4_2_8P14 + + util/ntp-keygen-opts.c@1.541 +7 -7 + NTP_4_2_8P14 + + util/ntp-keygen-opts.h@1.539 +3 -3 + NTP_4_2_8P14 + + util/ntp-keygen.1ntp-keygenman@1.350 +2 -2 + NTP_4_2_8P14 + + util/ntp-keygen.1ntp-keygenmdoc@1.350 +1 -1 + NTP_4_2_8P14 + + util/ntp-keygen.html@1.195 +2 -2 + NTP_4_2_8P14 + + util/ntp-keygen.man.in@1.350 +2 -2 + NTP_4_2_8P14 + + util/ntp-keygen.mdoc.in@1.350 +1 -1 + NTP_4_2_8P14 + +ChangeSet@1.3895, 2020-03-03 17:09:57-08:00, ntpreleng@ntp-build.tal1.ntfo.org + quiet some debug messages + + ntpd/ntp_config.c@1.375 +0 -2 + quiet some debug messages + + ntpd/ntp_peer.c@1.166 +2 -0 + quiet some debug messages + +ChangeSet@1.3894, 2020-03-03 16:49:54-08:00, ntpreleng@ntp-build.tal1.ntfo.org + NTP_4_2_8P13 + TAG: NTP_4_2_8P13 + + ChangeLog@1.1973 +1 -0 + NTP_4_2_8P13 + + ntpd/invoke-ntp.conf.texi@1.220 +31 -7 + NTP_4_2_8P13 + + ntpd/invoke-ntp.keys.texi@1.205 +1 -1 + NTP_4_2_8P13 + + ntpd/invoke-ntpd.texi@1.519 +3 -3 + NTP_4_2_8P13 + + ntpd/ntp.conf.5man@1.254 +34 -9 + NTP_4_2_8P13 + + ntpd/ntp.conf.5mdoc@1.254 +41 -6 + NTP_4_2_8P13 + + ntpd/ntp.conf.html@1.202 +33 -7 + NTP_4_2_8P13 + + ntpd/ntp.conf.man.in@1.254 +34 -9 + NTP_4_2_8P13 + + ntpd/ntp.conf.mdoc.in@1.254 +41 -6 + NTP_4_2_8P13 + + ntpd/ntp.keys.5man@1.239 +2 -2 + NTP_4_2_8P13 + + ntpd/ntp.keys.5mdoc@1.239 +3 -3 + NTP_4_2_8P13 + + ntpd/ntp.keys.man.in@1.239 +2 -2 + NTP_4_2_8P13 + + ntpd/ntp.keys.mdoc.in@1.239 +3 -3 + NTP_4_2_8P13 + + ntpd/ntpd-opts.c@1.542 +2 -2 + NTP_4_2_8P13 + + ntpd/ntpd-opts.h@1.541 +3 -3 + NTP_4_2_8P13 + + ntpd/ntpd.1ntpdman@1.348 +2 -2 + NTP_4_2_8P13 + + ntpd/ntpd.1ntpdmdoc@1.348 +2 -2 + NTP_4_2_8P13 + + ntpd/ntpd.man.in@1.348 +2 -2 + NTP_4_2_8P13 + + ntpd/ntpd.mdoc.in@1.348 +2 -2 + NTP_4_2_8P13 + + ntpdc/invoke-ntpdc.texi@1.516 +1 -1 + NTP_4_2_8P13 + + ntpdc/ntpdc-opts.c@1.535 +2 -2 + NTP_4_2_8P13 + + ntpdc/ntpdc-opts.h@1.534 +3 -3 + NTP_4_2_8P13 + + ntpdc/ntpdc.1ntpdcman@1.347 +2 -2 + NTP_4_2_8P13 + + ntpdc/ntpdc.1ntpdcmdoc@1.347 +2 -2 + NTP_4_2_8P13 + + ntpdc/ntpdc.html@1.362 +408 -353 + NTP_4_2_8P13 + + ntpdc/ntpdc.man.in@1.347 +2 -2 + NTP_4_2_8P13 + + ntpdc/ntpdc.mdoc.in@1.347 +2 -2 + NTP_4_2_8P13 + + ntpq/invoke-ntpq.texi@1.526 +1 -1 + NTP_4_2_8P13 + + ntpq/ntpq-opts.c@1.544 +2 -2 + NTP_4_2_8P13 + + ntpq/ntpq-opts.h@1.542 +3 -3 + NTP_4_2_8P13 + + ntpq/ntpq.1ntpqman@1.354 +2 -2 + NTP_4_2_8P13 + + ntpq/ntpq.1ntpqmdoc@1.354 +2 -2 + NTP_4_2_8P13 + + ntpq/ntpq.html@1.193 +1 -1 + NTP_4_2_8P13 + + ntpq/ntpq.man.in@1.354 +2 -2 + NTP_4_2_8P13 + + ntpq/ntpq.mdoc.in@1.354 +2 -2 + NTP_4_2_8P13 + + ntpsnmpd/invoke-ntpsnmpd.texi@1.518 +1 -1 + NTP_4_2_8P13 + + ntpsnmpd/ntpsnmpd-opts.c@1.537 +2 -2 + NTP_4_2_8P13 + + ntpsnmpd/ntpsnmpd-opts.h@1.536 +3 -3 + NTP_4_2_8P13 + + ntpsnmpd/ntpsnmpd.1ntpsnmpdman@1.347 +2 -2 + NTP_4_2_8P13 + + ntpsnmpd/ntpsnmpd.1ntpsnmpdmdoc@1.347 +2 -2 + NTP_4_2_8P13 + + ntpsnmpd/ntpsnmpd.man.in@1.347 +2 -2 + NTP_4_2_8P13 + + ntpsnmpd/ntpsnmpd.mdoc.in@1.347 +2 -2 + NTP_4_2_8P13 + + scripts/calc_tickadj/calc_tickadj.1calc_tickadjman@1.108 +2 -2 + NTP_4_2_8P13 + + scripts/calc_tickadj/calc_tickadj.1calc_tickadjmdoc@1.109 +2 -2 + NTP_4_2_8P13 + + scripts/calc_tickadj/calc_tickadj.html@1.109 +172 -128 + NTP_4_2_8P13 + + scripts/calc_tickadj/calc_tickadj.man.in@1.107 +2 -2 + NTP_4_2_8P13 + + scripts/calc_tickadj/calc_tickadj.mdoc.in@1.109 +2 -2 + NTP_4_2_8P13 + + scripts/calc_tickadj/invoke-calc_tickadj.texi@1.112 +2 -2 + NTP_4_2_8P13 + + scripts/invoke-plot_summary.texi@1.130 +2 -2 + NTP_4_2_8P13 + + scripts/invoke-summary.texi@1.129 +2 -2 + NTP_4_2_8P13 + + scripts/ntp-wait/invoke-ntp-wait.texi@1.340 +2 -2 + NTP_4_2_8P13 + + scripts/ntp-wait/ntp-wait-opts@1.76 +2 -2 + NTP_4_2_8P13 + + scripts/ntp-wait/ntp-wait.1ntp-waitman@1.336 +2 -2 + NTP_4_2_8P13 + + scripts/ntp-wait/ntp-wait.1ntp-waitmdoc@1.337 +2 -2 + NTP_4_2_8P13 + + scripts/ntp-wait/ntp-wait.html@1.358 +181 -152 + NTP_4_2_8P13 + + scripts/ntp-wait/ntp-wait.man.in@1.336 +2 -2 + NTP_4_2_8P13 + + scripts/ntp-wait/ntp-wait.mdoc.in@1.337 +2 -2 + NTP_4_2_8P13 + + scripts/ntpsweep/invoke-ntpsweep.texi@1.127 +2 -2 + NTP_4_2_8P13 + + scripts/ntpsweep/ntpsweep-opts@1.78 +2 -2 + NTP_4_2_8P13 + + scripts/ntpsweep/ntpsweep.1ntpsweepman@1.115 +2 -2 + NTP_4_2_8P13 + + scripts/ntpsweep/ntpsweep.1ntpsweepmdoc@1.115 +2 -2 + NTP_4_2_8P13 + + scripts/ntpsweep/ntpsweep.html@1.130 +188 -152 + NTP_4_2_8P13 + + scripts/ntpsweep/ntpsweep.man.in@1.115 +2 -2 + NTP_4_2_8P13 + + scripts/ntpsweep/ntpsweep.mdoc.in@1.116 +2 -2 + NTP_4_2_8P13 + + scripts/ntptrace/invoke-ntptrace.texi@1.129 +2 -2 + NTP_4_2_8P13 + + scripts/ntptrace/ntptrace-opts@1.78 +2 -2 + NTP_4_2_8P13 + + scripts/ntptrace/ntptrace.1ntptraceman@1.115 +2 -2 + NTP_4_2_8P13 + + scripts/ntptrace/ntptrace.1ntptracemdoc@1.116 +2 -2 + NTP_4_2_8P13 + + scripts/ntptrace/ntptrace.html@1.131 +179 -129 + NTP_4_2_8P13 + + scripts/ntptrace/ntptrace.man.in@1.115 +2 -2 + NTP_4_2_8P13 + + scripts/ntptrace/ntptrace.mdoc.in@1.117 +2 -2 + NTP_4_2_8P13 + + scripts/plot_summary-opts@1.79 +2 -2 + NTP_4_2_8P13 + + scripts/plot_summary.1plot_summaryman@1.128 +2 -2 + NTP_4_2_8P13 + + scripts/plot_summary.1plot_summarymdoc@1.128 +2 -2 + NTP_4_2_8P13 + + scripts/plot_summary.html@1.133 +203 -161 + NTP_4_2_8P13 + + scripts/plot_summary.man.in@1.128 +2 -2 + NTP_4_2_8P13 + + scripts/plot_summary.mdoc.in@1.128 +2 -2 + NTP_4_2_8P13 + + scripts/summary-opts@1.78 +2 -2 + NTP_4_2_8P13 + + scripts/summary.1summaryman@1.127 +2 -2 + NTP_4_2_8P13 + + scripts/summary.1summarymdoc@1.127 +2 -2 + NTP_4_2_8P13 + + scripts/summary.html@1.132 +184 -136 + NTP_4_2_8P13 + + scripts/summary.man.in@1.127 +2 -2 + NTP_4_2_8P13 + + scripts/summary.mdoc.in@1.127 +2 -2 + NTP_4_2_8P13 + + scripts/update-leap/invoke-update-leap.texi@1.28 +1 -1 + NTP_4_2_8P13 + + scripts/update-leap/update-leap-opts@1.29 +2 -2 + NTP_4_2_8P13 + + scripts/update-leap/update-leap.1update-leapman@1.28 +2 -2 + NTP_4_2_8P13 + + scripts/update-leap/update-leap.1update-leapmdoc@1.28 +2 -2 + NTP_4_2_8P13 + + scripts/update-leap/update-leap.html@1.29 +1 -1 + NTP_4_2_8P13 + + scripts/update-leap/update-leap.man.in@1.28 +2 -2 + NTP_4_2_8P13 + + scripts/update-leap/update-leap.mdoc.in@1.28 +2 -2 + NTP_4_2_8P13 + + sntp/invoke-sntp.texi@1.518 +1 -1 + NTP_4_2_8P13 + + sntp/sntp-opts.c@1.538 +2 -2 + NTP_4_2_8P13 + + sntp/sntp-opts.h@1.536 +3 -3 + NTP_4_2_8P13 + + sntp/sntp.1sntpman@1.353 +2 -2 + NTP_4_2_8P13 + + sntp/sntp.1sntpmdoc@1.353 +2 -2 + NTP_4_2_8P13 + + sntp/sntp.html@1.534 +472 -418 + NTP_4_2_8P13 + + sntp/sntp.man.in@1.353 +2 -2 + NTP_4_2_8P13 + + sntp/sntp.mdoc.in@1.353 +2 -2 + NTP_4_2_8P13 + + util/invoke-ntp-keygen.texi@1.521 +1 -1 + NTP_4_2_8P13 + + util/ntp-keygen-opts.c@1.540 +2 -2 + NTP_4_2_8P13 + + util/ntp-keygen-opts.h@1.538 +3 -3 + NTP_4_2_8P13 + + util/ntp-keygen.1ntp-keygenman@1.349 +2 -2 + NTP_4_2_8P13 + + util/ntp-keygen.1ntp-keygenmdoc@1.349 +2 -2 + NTP_4_2_8P13 + + util/ntp-keygen.html@1.194 +1 -1 + NTP_4_2_8P13 + + util/ntp-keygen.man.in@1.349 +2 -2 + NTP_4_2_8P13 + + util/ntp-keygen.mdoc.in@1.349 +2 -2 + NTP_4_2_8P13 + +ChangeSet@1.3893, 2020-03-03 16:25:14-08:00, ntpreleng@ntp-build.tal1.ntfo.org + Replace line with head -1 + + scripts/build/addChangeLogTag@1.6 +1 -1 + Replace line with head -1 + +ChangeSet@1.3892, 2020-03-03 16:05:38-08:00, ntpreleng@ntp-build.tal1.ntfo.org + provide get_pollskew() for simulator + + ntpd/ntp_config.c@1.374 +2 -2 + provide get_pollskew() for simulator + +ChangeSet@1.3844.24.1, 2020-03-03 03:30:13-08:00, ntpreleng@ntp-build.tal1.ntfo.org + NTP_4_2_8P13 + TAG: NTP_4_2_8P13 (currently on 1.3894) + + BitKeeper/triggers/2mirrors@1.11 +6 -2 + NTP_4_2_8P13 + + ntpd/ntpd-opts.c@1.539.1.1 +1 -1 + NTP_4_2_8P13 + + ntpd/ntpd-opts.h@1.538.1.1 +1 -1 + NTP_4_2_8P13 + + ntpd/ntpd.html@1.193 +3 -3 + NTP_4_2_8P13 + + ntpd/ntpdsim-opts.c@1.29 +372 -340 + NTP_4_2_8P13 + + ntpd/ntpdsim-opts.h@1.29 +44 -37 + NTP_4_2_8P13 + + ntpdc/ntpdc-opts.c@1.532.1.1 +1 -1 + NTP_4_2_8P13 + + ntpdc/ntpdc-opts.h@1.531.1.1 +1 -1 + NTP_4_2_8P13 + + ntpq/ntpq-opts.c@1.541.1.1 +1 -1 + NTP_4_2_8P13 + + ntpq/ntpq-opts.h@1.539.1.1 +1 -1 + NTP_4_2_8P13 + + ntpq/ntpq.html@1.192 +1 -1 + NTP_4_2_8P13 + + ntpsnmpd/ntpsnmpd-opts.c@1.534.1.1 +1 -1 + NTP_4_2_8P13 + + ntpsnmpd/ntpsnmpd-opts.h@1.533.1.1 +1 -1 + NTP_4_2_8P13 + + scripts/calc_tickadj/calc_tickadj-opts@1.10 +2 -2 + NTP_4_2_8P13 + + scripts/ntp-wait/invoke-ntp-wait.texi@1.337.1.1 +1 -1 + NTP_4_2_8P13 + + scripts/ntp-wait/ntp-wait-opts@1.73.1.1 +1 -1 + NTP_4_2_8P13 + + scripts/ntpsweep/ntpsweep-opts@1.75.1.1 +1 -1 + NTP_4_2_8P13 + + scripts/ntptrace/invoke-ntptrace.texi@1.126.1.1 +1 -1 + NTP_4_2_8P13 + + scripts/ntptrace/ntptrace-opts@1.75.1.1 +1 -1 + NTP_4_2_8P13 + + scripts/plot_summary-opts@1.76.1.1 +1 -1 + NTP_4_2_8P13 + + scripts/summary-opts@1.75.1.1 +1 -1 + NTP_4_2_8P13 + + scripts/update-leap/update-leap-opts@1.26.1.1 +1 -1 + NTP_4_2_8P13 + + sntp/sntp-opts.c@1.535.1.1 +1 -1 + NTP_4_2_8P13 + + sntp/sntp-opts.h@1.533.1.1 +1 -1 + NTP_4_2_8P13 + + util/ntp-keygen-opts.c@1.537.1.1 +1 -1 + NTP_4_2_8P13 + + util/ntp-keygen-opts.h@1.535.1.1 +1 -1 + NTP_4_2_8P13 + + util/ntp-keygen.html@1.193 +1 -1 + NTP_4_2_8P13 + +ChangeSet@1.3888, 2020-03-03 07:26:56+00:00, stenn@psp-deb1.ntp.org + cleanup + + NEWS@1.197.1.3 +3 -2 + cleanup + +ChangeSet@1.3887, 2020-02-18 05:11:26+00:00, stenn@psp-deb1.ntp.org + Cleanup distcheck psl* files + + ntpd/Makefile.am@1.138 +11 -0 + Cleanup distcheck psl* files + +ChangeSet@1.3886, 2020-02-18 05:10:35+00:00, stenn@psp-deb1.ntp.org + Distribute ntp_calgps.h + + include/Makefile.am@1.58 +1 -0 + Distribute ntp_calgps.h + +ChangeSet@1.3885, 2020-02-18 03:32:51+00:00, stenn@psp-deb1.ntp.org + Update the NEWS file for p14 + + NEWS@1.197.1.2 +107 -0 + Update the NEWS file for p14 + +ChangeSet@1.3884, 2020-02-17 11:05:46+00:00, stenn@psp-deb1.ntp.org + merge cleanup + + ntpd/ntp_proto.c@1.432 +1 -1 + merge cleanup + +ChangeSet@1.3881, 2020-02-17 08:50:00+00:00, stenn@psp-deb1.ntp.org + update + + ntpd/ntp_keyword.h@1.38 +545 -539 + update + +ChangeSet@1.3880, 2020-02-17 08:48:45+00:00, stenn@psp-deb1.ntp.org + Startp logging improvements. + Bug3596. + + html/accopt.html@1.48 +7 -2 + cleanup. + bug3596: document 'serverresponse fuzz' + + html/confopt.html@1.64.1.1 +22 -9 + Cleanup. + + Bug 3596: document xmtnonce + + html/miscopt.html@1.93 +19 -1 + Cleanup. + + bug3596: document pollskewlist + + include/Makefile.am@1.57 +1 -0 + pollskew upodates + + include/ntp.h@1.232 +8 -2 + bug3596 chagnes: + - srvfuzrft patches + - pollskew updates + - xmtnonce + + include/ntp_config.h@1.89 +27 -20 + bug3596 updates: + - pollskewlist + - srvfuzrft patches + + include/ntp_psl.h@1.1 +17 -0 + BitKeeper file include/ntp_psl.h + --- + bug3596 + + include/ntp_psl.h@1.0 +0 -0 + + include/ntp_request.h@1.54 +2 -1 + srvfuzrft patches + + include/ntp_stdlib.h@1.88 +1 -1 + randomizepoll/server response fuzz reftime fixes + + include/ntpd.h@1.207 +1 -1 + bug3596 cleanup + + libntp/statestr.c@1.31 +12 -5 + bug3596 srvrspfuz fixes + + ntpd/Makefile.am@1.137 +37 -7 + bug3596 pollskewlist changes + + ntpd/complete.conf.in@1.37 +4 -2 + bug3596: randompoll, pollskew xmtnonce + + ntpd/keyword-gen-utd@1.35 +1 -1 + Keyword table updates + + ntpd/keyword-gen.c@1.42 +3 -3 + bug3596: serverresponse fuzz, pollskewlist, xmtnonce + + ntpd/ntp.conf.def@1.34 +40 -4 + Cleanup. + bug3596: xmtnonce, serverresponse fuzz, pollskewlist, + + ntpd/ntp_config.c@1.373 +250 -26 + bug3596: serverresponse fuzz, pollskewlist, xmtnonce + + ntpd/ntp_loopfilter.c@1.195 +1 -1 + pollskew upodates + + ntpd/ntp_parser.c@1.117 +1298 -1283 + bug3596 *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@freebsd.org Wed Mar 4 23:59:03 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id B9E89255E1F; Wed, 4 Mar 2020 23:59:03 +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 48XrSl4bMbz44qf; Wed, 4 Mar 2020 23:59:03 +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 47803262F8; Wed, 4 Mar 2020 23:59:03 +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 024Nx3aO026178; Wed, 4 Mar 2020 23:59:03 GMT (envelope-from cy@FreeBSD.org) Received: (from cy@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 024Nucka026071; Wed, 4 Mar 2020 23:56:38 GMT (envelope-from cy@FreeBSD.org) Message-Id: <202003042356.024Nucka026071@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: cy set sender to cy@FreeBSD.org using -f From: Cy Schubert Date: Wed, 4 Mar 2020 23:56:38 +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: r358659 - in stable: 11/contrib/ntp 11/contrib/ntp/html 11/contrib/ntp/html/drivers 11/contrib/ntp/include 11/contrib/ntp/libntp 11/contrib/ntp/libparse 11/contrib/ntp/ntpd 11/contrib/n... X-SVN-Group: stable-12 X-SVN-Commit-Author: cy X-SVN-Commit-Paths: in stable: 11/contrib/ntp 11/contrib/ntp/html 11/contrib/ntp/html/drivers 11/contrib/ntp/include 11/contrib/ntp/libntp 11/contrib/ntp/libparse 11/contrib/ntp/ntpd 11/contrib/ntp/ntpdate 11/contrib/ntp... X-SVN-Commit-Revision: 358659 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages 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, 04 Mar 2020 23:59:03 -0000 Author: cy Date: Wed Mar 4 23:54:13 2020 New Revision: 358659 URL: https://svnweb.freebsd.org/changeset/base/358659 Log: MFC r358652: MFV r358616: Update ntp-4.2.8p13 --> 4.2.8p14. The advisory can be found at: http://support.ntp.org/bin/view/Main/SecurityNotice#\ March_2020_ntp_4_2_8p14_NTP_Rele No CVEs have been documented yet. Security: http://support.ntp.org/bin/view/Main/NtpBug3610 http://support.ntp.org/bin/view/Main/NtpBug3596 http://support.ntp.org/bin/view/Main/NtpBug3592 Added: stable/12/contrib/ntp/include/ntp_calgps.h - copied unchanged from r358652, head/contrib/ntp/include/ntp_calgps.h stable/12/contrib/ntp/include/ntp_psl.h - copied unchanged from r358652, head/contrib/ntp/include/ntp_psl.h stable/12/contrib/ntp/include/timexsup.h - copied unchanged from r358652, head/contrib/ntp/include/timexsup.h stable/12/contrib/ntp/libntp/ntp_calgps.c - copied unchanged from r358652, head/contrib/ntp/libntp/ntp_calgps.c stable/12/contrib/ntp/libntp/timespecops.c - copied unchanged from r358652, head/contrib/ntp/libntp/timespecops.c stable/12/contrib/ntp/libntp/timexsup.c - copied unchanged from r358652, head/contrib/ntp/libntp/timexsup.c stable/12/contrib/ntp/ntpd/psl0.conf - copied unchanged from r358652, head/contrib/ntp/ntpd/psl0.conf stable/12/contrib/ntp/ntpd/psl1.conf - copied unchanged from r358652, head/contrib/ntp/ntpd/psl1.conf stable/12/contrib/ntp/ntpd/psl2.conf - copied unchanged from r358652, head/contrib/ntp/ntpd/psl2.conf Modified: stable/12/contrib/ntp/COPYRIGHT stable/12/contrib/ntp/ChangeLog stable/12/contrib/ntp/CommitLog stable/12/contrib/ntp/NEWS stable/12/contrib/ntp/config.h.in stable/12/contrib/ntp/configure stable/12/contrib/ntp/configure.ac stable/12/contrib/ntp/html/accopt.html stable/12/contrib/ntp/html/clockopt.html stable/12/contrib/ntp/html/confopt.html stable/12/contrib/ntp/html/copyright.html stable/12/contrib/ntp/html/discipline.html stable/12/contrib/ntp/html/drivers/driver20.html stable/12/contrib/ntp/html/drivers/driver29.html stable/12/contrib/ntp/html/miscopt.html stable/12/contrib/ntp/include/Makefile.am stable/12/contrib/ntp/include/Makefile.in stable/12/contrib/ntp/include/ntp.h stable/12/contrib/ntp/include/ntp_calendar.h stable/12/contrib/ntp/include/ntp_config.h stable/12/contrib/ntp/include/ntp_control.h stable/12/contrib/ntp/include/ntp_fp.h stable/12/contrib/ntp/include/ntp_io.h stable/12/contrib/ntp/include/ntp_refclock.h stable/12/contrib/ntp/include/ntp_request.h stable/12/contrib/ntp/include/ntp_stdlib.h stable/12/contrib/ntp/include/ntp_syslog.h stable/12/contrib/ntp/include/ntpd.h stable/12/contrib/ntp/include/timespecops.h stable/12/contrib/ntp/libntp/Makefile.am stable/12/contrib/ntp/libntp/Makefile.in stable/12/contrib/ntp/libntp/decodenetnum.c stable/12/contrib/ntp/libntp/dofptoa.c stable/12/contrib/ntp/libntp/dolfptoa.c stable/12/contrib/ntp/libntp/mstolfp.c stable/12/contrib/ntp/libntp/msyslog.c stable/12/contrib/ntp/libntp/ntp_calendar.c stable/12/contrib/ntp/libntp/recvbuff.c stable/12/contrib/ntp/libntp/statestr.c stable/12/contrib/ntp/libntp/systime.c stable/12/contrib/ntp/libparse/Makefile.am stable/12/contrib/ntp/libparse/Makefile.in stable/12/contrib/ntp/libparse/clk_rawdcf.c stable/12/contrib/ntp/ntpd/Makefile.am stable/12/contrib/ntp/ntpd/Makefile.in stable/12/contrib/ntp/ntpd/cmd_args.c stable/12/contrib/ntp/ntpd/complete.conf.in stable/12/contrib/ntp/ntpd/invoke-ntp.conf.texi stable/12/contrib/ntp/ntpd/invoke-ntp.keys.texi stable/12/contrib/ntp/ntpd/invoke-ntpd.texi stable/12/contrib/ntp/ntpd/keyword-gen-utd stable/12/contrib/ntp/ntpd/keyword-gen.c stable/12/contrib/ntp/ntpd/ntp.conf.5man stable/12/contrib/ntp/ntpd/ntp.conf.5mdoc stable/12/contrib/ntp/ntpd/ntp.conf.def stable/12/contrib/ntp/ntpd/ntp.conf.html stable/12/contrib/ntp/ntpd/ntp.conf.man.in stable/12/contrib/ntp/ntpd/ntp.conf.mdoc.in stable/12/contrib/ntp/ntpd/ntp.keys.5man stable/12/contrib/ntp/ntpd/ntp.keys.5mdoc stable/12/contrib/ntp/ntpd/ntp.keys.html stable/12/contrib/ntp/ntpd/ntp.keys.man.in stable/12/contrib/ntp/ntpd/ntp.keys.mdoc.in stable/12/contrib/ntp/ntpd/ntp_config.c stable/12/contrib/ntp/ntpd/ntp_control.c stable/12/contrib/ntp/ntpd/ntp_io.c stable/12/contrib/ntp/ntpd/ntp_keyword.h stable/12/contrib/ntp/ntpd/ntp_leapsec.c stable/12/contrib/ntp/ntpd/ntp_leapsec.h stable/12/contrib/ntp/ntpd/ntp_loopfilter.c stable/12/contrib/ntp/ntpd/ntp_parser.c stable/12/contrib/ntp/ntpd/ntp_parser.h stable/12/contrib/ntp/ntpd/ntp_peer.c stable/12/contrib/ntp/ntpd/ntp_proto.c stable/12/contrib/ntp/ntpd/ntp_refclock.c stable/12/contrib/ntp/ntpd/ntp_request.c stable/12/contrib/ntp/ntpd/ntp_restrict.c stable/12/contrib/ntp/ntpd/ntp_scanner.c stable/12/contrib/ntp/ntpd/ntp_util.c stable/12/contrib/ntp/ntpd/ntpd-opts.c stable/12/contrib/ntp/ntpd/ntpd-opts.h stable/12/contrib/ntp/ntpd/ntpd.1ntpdman stable/12/contrib/ntp/ntpd/ntpd.1ntpdmdoc stable/12/contrib/ntp/ntpd/ntpd.c stable/12/contrib/ntp/ntpd/ntpd.html stable/12/contrib/ntp/ntpd/ntpd.man.in stable/12/contrib/ntp/ntpd/ntpd.mdoc.in stable/12/contrib/ntp/ntpd/refclock_gpsdjson.c stable/12/contrib/ntp/ntpd/refclock_jupiter.c stable/12/contrib/ntp/ntpd/refclock_nmea.c stable/12/contrib/ntp/ntpd/refclock_oncore.c stable/12/contrib/ntp/ntpd/refclock_palisade.c stable/12/contrib/ntp/ntpd/refclock_palisade.h stable/12/contrib/ntp/ntpd/refclock_parse.c stable/12/contrib/ntp/ntpd/refclock_zyfer.c stable/12/contrib/ntp/ntpdate/ntpdate.c stable/12/contrib/ntp/ntpdc/invoke-ntpdc.texi stable/12/contrib/ntp/ntpdc/layout.std stable/12/contrib/ntp/ntpdc/ntpdc-opts.c stable/12/contrib/ntp/ntpdc/ntpdc-opts.h stable/12/contrib/ntp/ntpdc/ntpdc.1ntpdcman stable/12/contrib/ntp/ntpdc/ntpdc.1ntpdcmdoc stable/12/contrib/ntp/ntpdc/ntpdc.c stable/12/contrib/ntp/ntpdc/ntpdc.html stable/12/contrib/ntp/ntpdc/ntpdc.man.in stable/12/contrib/ntp/ntpdc/ntpdc.mdoc.in stable/12/contrib/ntp/ntpdc/ntpdc_ops.c stable/12/contrib/ntp/ntpq/Makefile.am stable/12/contrib/ntp/ntpq/Makefile.in stable/12/contrib/ntp/ntpq/invoke-ntpq.texi stable/12/contrib/ntp/ntpq/ntpq-opts.c stable/12/contrib/ntp/ntpq/ntpq-opts.h stable/12/contrib/ntp/ntpq/ntpq-subs.c stable/12/contrib/ntp/ntpq/ntpq.1ntpqman stable/12/contrib/ntp/ntpq/ntpq.1ntpqmdoc stable/12/contrib/ntp/ntpq/ntpq.c stable/12/contrib/ntp/ntpq/ntpq.h stable/12/contrib/ntp/ntpq/ntpq.html stable/12/contrib/ntp/ntpq/ntpq.man.in stable/12/contrib/ntp/ntpq/ntpq.mdoc.in stable/12/contrib/ntp/ntpsnmpd/invoke-ntpsnmpd.texi stable/12/contrib/ntp/ntpsnmpd/ntpsnmpd-opts.c stable/12/contrib/ntp/ntpsnmpd/ntpsnmpd-opts.h stable/12/contrib/ntp/ntpsnmpd/ntpsnmpd.1ntpsnmpdman stable/12/contrib/ntp/ntpsnmpd/ntpsnmpd.1ntpsnmpdmdoc stable/12/contrib/ntp/ntpsnmpd/ntpsnmpd.html stable/12/contrib/ntp/ntpsnmpd/ntpsnmpd.man.in stable/12/contrib/ntp/ntpsnmpd/ntpsnmpd.mdoc.in stable/12/contrib/ntp/packageinfo.sh stable/12/contrib/ntp/parseutil/dcfd.c stable/12/contrib/ntp/scripts/build/mkver.in stable/12/contrib/ntp/scripts/calc_tickadj/calc_tickadj-opts stable/12/contrib/ntp/scripts/calc_tickadj/calc_tickadj.1calc_tickadjman stable/12/contrib/ntp/scripts/calc_tickadj/calc_tickadj.1calc_tickadjmdoc stable/12/contrib/ntp/scripts/calc_tickadj/calc_tickadj.html stable/12/contrib/ntp/scripts/calc_tickadj/calc_tickadj.man.in stable/12/contrib/ntp/scripts/calc_tickadj/calc_tickadj.mdoc.in stable/12/contrib/ntp/scripts/calc_tickadj/invoke-calc_tickadj.texi stable/12/contrib/ntp/scripts/invoke-plot_summary.texi stable/12/contrib/ntp/scripts/invoke-summary.texi stable/12/contrib/ntp/scripts/ntp-wait/invoke-ntp-wait.texi stable/12/contrib/ntp/scripts/ntp-wait/ntp-wait-opts stable/12/contrib/ntp/scripts/ntp-wait/ntp-wait.1ntp-waitman stable/12/contrib/ntp/scripts/ntp-wait/ntp-wait.1ntp-waitmdoc stable/12/contrib/ntp/scripts/ntp-wait/ntp-wait.html stable/12/contrib/ntp/scripts/ntp-wait/ntp-wait.man.in stable/12/contrib/ntp/scripts/ntp-wait/ntp-wait.mdoc.in stable/12/contrib/ntp/scripts/ntpsweep/invoke-ntpsweep.texi stable/12/contrib/ntp/scripts/ntpsweep/ntpsweep-opts stable/12/contrib/ntp/scripts/ntpsweep/ntpsweep.1ntpsweepman stable/12/contrib/ntp/scripts/ntpsweep/ntpsweep.1ntpsweepmdoc stable/12/contrib/ntp/scripts/ntpsweep/ntpsweep.html stable/12/contrib/ntp/scripts/ntpsweep/ntpsweep.man.in stable/12/contrib/ntp/scripts/ntpsweep/ntpsweep.mdoc.in stable/12/contrib/ntp/scripts/ntptrace/invoke-ntptrace.texi stable/12/contrib/ntp/scripts/ntptrace/ntptrace-opts stable/12/contrib/ntp/scripts/ntptrace/ntptrace.1ntptraceman stable/12/contrib/ntp/scripts/ntptrace/ntptrace.1ntptracemdoc stable/12/contrib/ntp/scripts/ntptrace/ntptrace.html stable/12/contrib/ntp/scripts/ntptrace/ntptrace.man.in stable/12/contrib/ntp/scripts/ntptrace/ntptrace.mdoc.in stable/12/contrib/ntp/scripts/plot_summary-opts stable/12/contrib/ntp/scripts/plot_summary.1plot_summaryman stable/12/contrib/ntp/scripts/plot_summary.1plot_summarymdoc stable/12/contrib/ntp/scripts/plot_summary.html stable/12/contrib/ntp/scripts/plot_summary.man.in stable/12/contrib/ntp/scripts/plot_summary.mdoc.in stable/12/contrib/ntp/scripts/summary-opts stable/12/contrib/ntp/scripts/summary.1summaryman stable/12/contrib/ntp/scripts/summary.1summarymdoc stable/12/contrib/ntp/scripts/summary.html stable/12/contrib/ntp/scripts/summary.man.in stable/12/contrib/ntp/scripts/summary.mdoc.in stable/12/contrib/ntp/scripts/update-leap/invoke-update-leap.texi stable/12/contrib/ntp/scripts/update-leap/update-leap-opts stable/12/contrib/ntp/scripts/update-leap/update-leap.1update-leapman stable/12/contrib/ntp/scripts/update-leap/update-leap.1update-leapmdoc stable/12/contrib/ntp/scripts/update-leap/update-leap.html stable/12/contrib/ntp/scripts/update-leap/update-leap.man.in stable/12/contrib/ntp/scripts/update-leap/update-leap.mdoc.in stable/12/contrib/ntp/sntp/COPYRIGHT stable/12/contrib/ntp/sntp/configure stable/12/contrib/ntp/sntp/configure.ac stable/12/contrib/ntp/sntp/crypto.c stable/12/contrib/ntp/sntp/include/copyright.def stable/12/contrib/ntp/sntp/include/version.def stable/12/contrib/ntp/sntp/include/version.texi stable/12/contrib/ntp/sntp/invoke-sntp.texi stable/12/contrib/ntp/sntp/libevent/build-aux/ar-lib stable/12/contrib/ntp/sntp/libevent/build-aux/compile stable/12/contrib/ntp/sntp/libevent/build-aux/config.guess stable/12/contrib/ntp/sntp/libevent/build-aux/config.sub stable/12/contrib/ntp/sntp/libevent/build-aux/depcomp stable/12/contrib/ntp/sntp/libevent/build-aux/install-sh stable/12/contrib/ntp/sntp/libevent/build-aux/missing stable/12/contrib/ntp/sntp/libevent/build-aux/test-driver stable/12/contrib/ntp/sntp/libevent/build-aux/ylwrap stable/12/contrib/ntp/sntp/libevent/test/regress.gen.c stable/12/contrib/ntp/sntp/libevent/test/regress.gen.h stable/12/contrib/ntp/sntp/libopts/m4/libopts.m4 stable/12/contrib/ntp/sntp/m4/ntp_problemtests.m4 stable/12/contrib/ntp/sntp/m4/version.m4 stable/12/contrib/ntp/sntp/main.c stable/12/contrib/ntp/sntp/networking.c stable/12/contrib/ntp/sntp/scm-rev stable/12/contrib/ntp/sntp/sntp-opts.c stable/12/contrib/ntp/sntp/sntp-opts.h stable/12/contrib/ntp/sntp/sntp.1sntpman stable/12/contrib/ntp/sntp/sntp.1sntpmdoc stable/12/contrib/ntp/sntp/sntp.html stable/12/contrib/ntp/sntp/sntp.man.in stable/12/contrib/ntp/sntp/sntp.mdoc.in stable/12/contrib/ntp/sntp/tests/run-crypto.c stable/12/contrib/ntp/sntp/tests/run-keyFile.c stable/12/contrib/ntp/sntp/tests/run-kodDatabase.c stable/12/contrib/ntp/sntp/tests/run-kodFile.c stable/12/contrib/ntp/sntp/tests/run-networking.c stable/12/contrib/ntp/sntp/tests/run-packetHandling.c stable/12/contrib/ntp/sntp/tests/run-packetProcessing.c stable/12/contrib/ntp/sntp/tests/run-t-log.c stable/12/contrib/ntp/sntp/tests/run-utilities.c stable/12/contrib/ntp/sntp/tests/testconf.yml stable/12/contrib/ntp/sntp/version.c stable/12/contrib/ntp/util/invoke-ntp-keygen.texi stable/12/contrib/ntp/util/ntp-keygen-opts.c stable/12/contrib/ntp/util/ntp-keygen-opts.h stable/12/contrib/ntp/util/ntp-keygen.1ntp-keygenman stable/12/contrib/ntp/util/ntp-keygen.1ntp-keygenmdoc stable/12/contrib/ntp/util/ntp-keygen.html stable/12/contrib/ntp/util/ntp-keygen.man.in stable/12/contrib/ntp/util/ntp-keygen.mdoc.in stable/12/contrib/ntp/util/ntptime.c stable/12/usr.sbin/ntp/config.h stable/12/usr.sbin/ntp/libntp/Makefile Directory Properties: stable/12/ (props changed) Changes in other areas also in this revision: Added: stable/11/contrib/ntp/include/ntp_calgps.h - copied unchanged from r358652, head/contrib/ntp/include/ntp_calgps.h stable/11/contrib/ntp/include/ntp_psl.h - copied unchanged from r358652, head/contrib/ntp/include/ntp_psl.h stable/11/contrib/ntp/include/timexsup.h - copied unchanged from r358652, head/contrib/ntp/include/timexsup.h stable/11/contrib/ntp/libntp/ntp_calgps.c - copied unchanged from r358652, head/contrib/ntp/libntp/ntp_calgps.c stable/11/contrib/ntp/libntp/timespecops.c - copied unchanged from r358652, head/contrib/ntp/libntp/timespecops.c stable/11/contrib/ntp/libntp/timexsup.c - copied unchanged from r358652, head/contrib/ntp/libntp/timexsup.c stable/11/contrib/ntp/ntpd/psl0.conf - copied unchanged from r358652, head/contrib/ntp/ntpd/psl0.conf stable/11/contrib/ntp/ntpd/psl1.conf - copied unchanged from r358652, head/contrib/ntp/ntpd/psl1.conf stable/11/contrib/ntp/ntpd/psl2.conf - copied unchanged from r358652, head/contrib/ntp/ntpd/psl2.conf Modified: stable/11/contrib/ntp/COPYRIGHT stable/11/contrib/ntp/ChangeLog stable/11/contrib/ntp/CommitLog stable/11/contrib/ntp/NEWS stable/11/contrib/ntp/config.h.in stable/11/contrib/ntp/configure stable/11/contrib/ntp/configure.ac stable/11/contrib/ntp/html/accopt.html stable/11/contrib/ntp/html/clockopt.html stable/11/contrib/ntp/html/confopt.html stable/11/contrib/ntp/html/copyright.html stable/11/contrib/ntp/html/discipline.html stable/11/contrib/ntp/html/drivers/driver20.html stable/11/contrib/ntp/html/drivers/driver29.html stable/11/contrib/ntp/html/miscopt.html stable/11/contrib/ntp/include/Makefile.am stable/11/contrib/ntp/include/Makefile.in stable/11/contrib/ntp/include/ntp.h stable/11/contrib/ntp/include/ntp_calendar.h stable/11/contrib/ntp/include/ntp_config.h stable/11/contrib/ntp/include/ntp_control.h stable/11/contrib/ntp/include/ntp_fp.h stable/11/contrib/ntp/include/ntp_io.h stable/11/contrib/ntp/include/ntp_refclock.h stable/11/contrib/ntp/include/ntp_request.h stable/11/contrib/ntp/include/ntp_stdlib.h stable/11/contrib/ntp/include/ntp_syslog.h stable/11/contrib/ntp/include/ntpd.h stable/11/contrib/ntp/include/timespecops.h stable/11/contrib/ntp/libntp/Makefile.am stable/11/contrib/ntp/libntp/Makefile.in stable/11/contrib/ntp/libntp/decodenetnum.c stable/11/contrib/ntp/libntp/dofptoa.c stable/11/contrib/ntp/libntp/dolfptoa.c stable/11/contrib/ntp/libntp/mstolfp.c stable/11/contrib/ntp/libntp/msyslog.c stable/11/contrib/ntp/libntp/ntp_calendar.c stable/11/contrib/ntp/libntp/recvbuff.c stable/11/contrib/ntp/libntp/statestr.c stable/11/contrib/ntp/libntp/systime.c stable/11/contrib/ntp/libparse/Makefile.am stable/11/contrib/ntp/libparse/Makefile.in stable/11/contrib/ntp/libparse/clk_rawdcf.c stable/11/contrib/ntp/ntpd/Makefile.am stable/11/contrib/ntp/ntpd/Makefile.in stable/11/contrib/ntp/ntpd/cmd_args.c stable/11/contrib/ntp/ntpd/complete.conf.in stable/11/contrib/ntp/ntpd/invoke-ntp.conf.texi stable/11/contrib/ntp/ntpd/invoke-ntp.keys.texi stable/11/contrib/ntp/ntpd/invoke-ntpd.texi stable/11/contrib/ntp/ntpd/keyword-gen-utd stable/11/contrib/ntp/ntpd/keyword-gen.c stable/11/contrib/ntp/ntpd/ntp.conf.5man stable/11/contrib/ntp/ntpd/ntp.conf.5mdoc stable/11/contrib/ntp/ntpd/ntp.conf.def stable/11/contrib/ntp/ntpd/ntp.conf.html stable/11/contrib/ntp/ntpd/ntp.conf.man.in stable/11/contrib/ntp/ntpd/ntp.conf.mdoc.in stable/11/contrib/ntp/ntpd/ntp.keys.5man stable/11/contrib/ntp/ntpd/ntp.keys.5mdoc stable/11/contrib/ntp/ntpd/ntp.keys.html stable/11/contrib/ntp/ntpd/ntp.keys.man.in stable/11/contrib/ntp/ntpd/ntp.keys.mdoc.in stable/11/contrib/ntp/ntpd/ntp_config.c stable/11/contrib/ntp/ntpd/ntp_control.c stable/11/contrib/ntp/ntpd/ntp_io.c stable/11/contrib/ntp/ntpd/ntp_keyword.h stable/11/contrib/ntp/ntpd/ntp_leapsec.c stable/11/contrib/ntp/ntpd/ntp_leapsec.h stable/11/contrib/ntp/ntpd/ntp_loopfilter.c stable/11/contrib/ntp/ntpd/ntp_parser.c stable/11/contrib/ntp/ntpd/ntp_parser.h stable/11/contrib/ntp/ntpd/ntp_peer.c stable/11/contrib/ntp/ntpd/ntp_proto.c stable/11/contrib/ntp/ntpd/ntp_refclock.c stable/11/contrib/ntp/ntpd/ntp_request.c stable/11/contrib/ntp/ntpd/ntp_restrict.c stable/11/contrib/ntp/ntpd/ntp_scanner.c stable/11/contrib/ntp/ntpd/ntp_util.c stable/11/contrib/ntp/ntpd/ntpd-opts.c stable/11/contrib/ntp/ntpd/ntpd-opts.h stable/11/contrib/ntp/ntpd/ntpd.1ntpdman stable/11/contrib/ntp/ntpd/ntpd.1ntpdmdoc stable/11/contrib/ntp/ntpd/ntpd.c stable/11/contrib/ntp/ntpd/ntpd.html stable/11/contrib/ntp/ntpd/ntpd.man.in stable/11/contrib/ntp/ntpd/ntpd.mdoc.in stable/11/contrib/ntp/ntpd/refclock_gpsdjson.c stable/11/contrib/ntp/ntpd/refclock_jupiter.c stable/11/contrib/ntp/ntpd/refclock_nmea.c stable/11/contrib/ntp/ntpd/refclock_oncore.c stable/11/contrib/ntp/ntpd/refclock_palisade.c stable/11/contrib/ntp/ntpd/refclock_palisade.h stable/11/contrib/ntp/ntpd/refclock_parse.c stable/11/contrib/ntp/ntpd/refclock_zyfer.c stable/11/contrib/ntp/ntpdate/ntpdate.c stable/11/contrib/ntp/ntpdc/invoke-ntpdc.texi stable/11/contrib/ntp/ntpdc/layout.std stable/11/contrib/ntp/ntpdc/ntpdc-opts.c stable/11/contrib/ntp/ntpdc/ntpdc-opts.h stable/11/contrib/ntp/ntpdc/ntpdc.1ntpdcman stable/11/contrib/ntp/ntpdc/ntpdc.1ntpdcmdoc stable/11/contrib/ntp/ntpdc/ntpdc.c stable/11/contrib/ntp/ntpdc/ntpdc.html stable/11/contrib/ntp/ntpdc/ntpdc.man.in stable/11/contrib/ntp/ntpdc/ntpdc.mdoc.in stable/11/contrib/ntp/ntpdc/ntpdc_ops.c stable/11/contrib/ntp/ntpq/Makefile.am stable/11/contrib/ntp/ntpq/Makefile.in stable/11/contrib/ntp/ntpq/invoke-ntpq.texi stable/11/contrib/ntp/ntpq/ntpq-opts.c stable/11/contrib/ntp/ntpq/ntpq-opts.h stable/11/contrib/ntp/ntpq/ntpq-subs.c stable/11/contrib/ntp/ntpq/ntpq.1ntpqman stable/11/contrib/ntp/ntpq/ntpq.1ntpqmdoc stable/11/contrib/ntp/ntpq/ntpq.c stable/11/contrib/ntp/ntpq/ntpq.h stable/11/contrib/ntp/ntpq/ntpq.html stable/11/contrib/ntp/ntpq/ntpq.man.in stable/11/contrib/ntp/ntpq/ntpq.mdoc.in stable/11/contrib/ntp/ntpsnmpd/invoke-ntpsnmpd.texi stable/11/contrib/ntp/ntpsnmpd/ntpsnmpd-opts.c stable/11/contrib/ntp/ntpsnmpd/ntpsnmpd-opts.h stable/11/contrib/ntp/ntpsnmpd/ntpsnmpd.1ntpsnmpdman stable/11/contrib/ntp/ntpsnmpd/ntpsnmpd.1ntpsnmpdmdoc stable/11/contrib/ntp/ntpsnmpd/ntpsnmpd.html stable/11/contrib/ntp/ntpsnmpd/ntpsnmpd.man.in stable/11/contrib/ntp/ntpsnmpd/ntpsnmpd.mdoc.in stable/11/contrib/ntp/packageinfo.sh stable/11/contrib/ntp/parseutil/dcfd.c stable/11/contrib/ntp/scripts/build/mkver.in stable/11/contrib/ntp/scripts/calc_tickadj/calc_tickadj-opts stable/11/contrib/ntp/scripts/calc_tickadj/calc_tickadj.1calc_tickadjman stable/11/contrib/ntp/scripts/calc_tickadj/calc_tickadj.1calc_tickadjmdoc stable/11/contrib/ntp/scripts/calc_tickadj/calc_tickadj.html stable/11/contrib/ntp/scripts/calc_tickadj/calc_tickadj.man.in stable/11/contrib/ntp/scripts/calc_tickadj/calc_tickadj.mdoc.in stable/11/contrib/ntp/scripts/calc_tickadj/invoke-calc_tickadj.texi stable/11/contrib/ntp/scripts/invoke-plot_summary.texi stable/11/contrib/ntp/scripts/invoke-summary.texi stable/11/contrib/ntp/scripts/ntp-wait/invoke-ntp-wait.texi stable/11/contrib/ntp/scripts/ntp-wait/ntp-wait-opts stable/11/contrib/ntp/scripts/ntp-wait/ntp-wait.1ntp-waitman stable/11/contrib/ntp/scripts/ntp-wait/ntp-wait.1ntp-waitmdoc stable/11/contrib/ntp/scripts/ntp-wait/ntp-wait.html stable/11/contrib/ntp/scripts/ntp-wait/ntp-wait.man.in stable/11/contrib/ntp/scripts/ntp-wait/ntp-wait.mdoc.in stable/11/contrib/ntp/scripts/ntpsweep/invoke-ntpsweep.texi stable/11/contrib/ntp/scripts/ntpsweep/ntpsweep-opts stable/11/contrib/ntp/scripts/ntpsweep/ntpsweep.1ntpsweepman stable/11/contrib/ntp/scripts/ntpsweep/ntpsweep.1ntpsweepmdoc stable/11/contrib/ntp/scripts/ntpsweep/ntpsweep.html stable/11/contrib/ntp/scripts/ntpsweep/ntpsweep.man.in stable/11/contrib/ntp/scripts/ntpsweep/ntpsweep.mdoc.in stable/11/contrib/ntp/scripts/ntptrace/invoke-ntptrace.texi stable/11/contrib/ntp/scripts/ntptrace/ntptrace-opts stable/11/contrib/ntp/scripts/ntptrace/ntptrace.1ntptraceman stable/11/contrib/ntp/scripts/ntptrace/ntptrace.1ntptracemdoc stable/11/contrib/ntp/scripts/ntptrace/ntptrace.html stable/11/contrib/ntp/scripts/ntptrace/ntptrace.man.in stable/11/contrib/ntp/scripts/ntptrace/ntptrace.mdoc.in stable/11/contrib/ntp/scripts/plot_summary-opts stable/11/contrib/ntp/scripts/plot_summary.1plot_summaryman stable/11/contrib/ntp/scripts/plot_summary.1plot_summarymdoc stable/11/contrib/ntp/scripts/plot_summary.html stable/11/contrib/ntp/scripts/plot_summary.man.in stable/11/contrib/ntp/scripts/plot_summary.mdoc.in stable/11/contrib/ntp/scripts/summary-opts stable/11/contrib/ntp/scripts/summary.1summaryman stable/11/contrib/ntp/scripts/summary.1summarymdoc stable/11/contrib/ntp/scripts/summary.html stable/11/contrib/ntp/scripts/summary.man.in stable/11/contrib/ntp/scripts/summary.mdoc.in stable/11/contrib/ntp/scripts/update-leap/invoke-update-leap.texi stable/11/contrib/ntp/scripts/update-leap/update-leap-opts stable/11/contrib/ntp/scripts/update-leap/update-leap.1update-leapman stable/11/contrib/ntp/scripts/update-leap/update-leap.1update-leapmdoc stable/11/contrib/ntp/scripts/update-leap/update-leap.html stable/11/contrib/ntp/scripts/update-leap/update-leap.man.in stable/11/contrib/ntp/scripts/update-leap/update-leap.mdoc.in stable/11/contrib/ntp/sntp/COPYRIGHT stable/11/contrib/ntp/sntp/configure stable/11/contrib/ntp/sntp/configure.ac stable/11/contrib/ntp/sntp/crypto.c stable/11/contrib/ntp/sntp/include/copyright.def stable/11/contrib/ntp/sntp/include/version.def stable/11/contrib/ntp/sntp/include/version.texi stable/11/contrib/ntp/sntp/invoke-sntp.texi stable/11/contrib/ntp/sntp/libevent/build-aux/ar-lib stable/11/contrib/ntp/sntp/libevent/build-aux/compile stable/11/contrib/ntp/sntp/libevent/build-aux/config.guess stable/11/contrib/ntp/sntp/libevent/build-aux/config.sub stable/11/contrib/ntp/sntp/libevent/build-aux/depcomp stable/11/contrib/ntp/sntp/libevent/build-aux/install-sh stable/11/contrib/ntp/sntp/libevent/build-aux/missing stable/11/contrib/ntp/sntp/libevent/build-aux/test-driver stable/11/contrib/ntp/sntp/libevent/build-aux/ylwrap stable/11/contrib/ntp/sntp/libevent/test/regress.gen.c stable/11/contrib/ntp/sntp/libevent/test/regress.gen.h stable/11/contrib/ntp/sntp/libopts/m4/libopts.m4 stable/11/contrib/ntp/sntp/m4/ntp_problemtests.m4 stable/11/contrib/ntp/sntp/m4/version.m4 stable/11/contrib/ntp/sntp/main.c stable/11/contrib/ntp/sntp/networking.c stable/11/contrib/ntp/sntp/scm-rev stable/11/contrib/ntp/sntp/sntp-opts.c stable/11/contrib/ntp/sntp/sntp-opts.h stable/11/contrib/ntp/sntp/sntp.1sntpman stable/11/contrib/ntp/sntp/sntp.1sntpmdoc stable/11/contrib/ntp/sntp/sntp.html stable/11/contrib/ntp/sntp/sntp.man.in stable/11/contrib/ntp/sntp/sntp.mdoc.in stable/11/contrib/ntp/sntp/tests/run-crypto.c stable/11/contrib/ntp/sntp/tests/run-keyFile.c stable/11/contrib/ntp/sntp/tests/run-kodDatabase.c stable/11/contrib/ntp/sntp/tests/run-kodFile.c stable/11/contrib/ntp/sntp/tests/run-networking.c stable/11/contrib/ntp/sntp/tests/run-packetHandling.c stable/11/contrib/ntp/sntp/tests/run-packetProcessing.c stable/11/contrib/ntp/sntp/tests/run-t-log.c stable/11/contrib/ntp/sntp/tests/run-utilities.c stable/11/contrib/ntp/sntp/tests/testconf.yml stable/11/contrib/ntp/sntp/version.c stable/11/contrib/ntp/util/invoke-ntp-keygen.texi stable/11/contrib/ntp/util/ntp-keygen-opts.c stable/11/contrib/ntp/util/ntp-keygen-opts.h stable/11/contrib/ntp/util/ntp-keygen.1ntp-keygenman stable/11/contrib/ntp/util/ntp-keygen.1ntp-keygenmdoc stable/11/contrib/ntp/util/ntp-keygen.html stable/11/contrib/ntp/util/ntp-keygen.man.in stable/11/contrib/ntp/util/ntp-keygen.mdoc.in stable/11/contrib/ntp/util/ntptime.c stable/11/usr.sbin/ntp/config.h stable/11/usr.sbin/ntp/libntp/Makefile Directory Properties: stable/11/ (props changed) Modified: stable/12/contrib/ntp/COPYRIGHT ============================================================================== --- stable/12/contrib/ntp/COPYRIGHT Wed Mar 4 23:49:20 2020 (r358658) +++ stable/12/contrib/ntp/COPYRIGHT Wed Mar 4 23:54:13 2020 (r358659) @@ -3,7 +3,7 @@ This file is automatically generated from html/copyrig jpg "Clone me," says Dolly sheepishly. - Last update: 2-Jan-2017 11:58 UTC + Last update: 4-Feb-2020 23:47 UTC __________________________________________________________________ The following copyright notice applies to all files collectively called @@ -32,7 +32,7 @@ This file is automatically generated from html/copyrig Burnicki is: *********************************************************************** * * -* Copyright (c) Network Time Foundation 2011-2017 * +* Copyright (c) Network Time Foundation 2011-2020 * * * * All Rights Reserved * * * Modified: stable/12/contrib/ntp/ChangeLog ============================================================================== --- stable/12/contrib/ntp/ChangeLog Wed Mar 4 23:49:20 2020 (r358658) +++ stable/12/contrib/ntp/ChangeLog Wed Mar 4 23:54:13 2020 (r358659) @@ -1,4 +1,100 @@ --- +(4.2.8p14) 2020/03/03 Released by Harlan Stenn + +* [Sec 3610] process_control() should bail earlier on short packets. stenn@ + - Reported by Philippe Antoine +* [Sec 3596] Highly predictable timestamp attack. + - Reported by Miroslav Lichvar +* [Sec 3592] DoS attack on client ntpd + - Reported by Miroslav Lichvar +* [Bug 3637] Emit the version of ntpd in saveconfig. stenn@ +* [Bug 3636] NMEA: combine time/date from multiple sentences +* [Bug 3635] Make leapsecond file hash check optional +* [Bug 3634] Typo in discipline.html, reported by Jason Harrison. stenn@ +* [Bug 3628] raw DCF decoding - improve robustness with Zeller's congruence + - implement Zeller's congruence in libparse and libntp +* [Bug 3627] SIGSEGV on FreeBSD-12 with stack limit and stack gap + - integrated patch by Cy Schubert +* [Bug 3620] memory leak in ntpq sysinfo + - applied patch by Gerry Garvey +* [Bug 3619] Honour drefid setting in cooked mode and sysinfo + - applied patch by Gerry Garvey +* [Bug 3617] Add support for ACE III and Copernicus II receivers + - integrated patch by Richard Steedman +* [Bug 3615] accelerate refclock startup +* [Bug 3613] Propagate noselect to mobilized pool servers + - Reported by Martin Burnicki +* [Bug 3612] Use-of-uninitialized-value in receive function + - Reported by Philippe Antoine +* [Bug 3611] NMEA time interpreted incorrectly + - officially document new "trust date" mode bit for NMEA driver + - restore the (previously undocumented) "trust date" feature lost with [bug 3577] +* [Bug 3609] Fixing wrong falseticker in case of non-statistic jitter + - mostly based on a patch by Michael Haardt, implementing 'fudge minjitter' +* [Bug 3608] libparse fails to compile on S11.4SRU13 and later + - removed ffs() and fls() prototypes as per Brian Utterback +* [Bug 3604] Wrong param byte order passing into record_raw_stats() in + ntp_io.c + - fixed byte and paramter order as suggested by wei6410@sina.com +* [Bug 3601] Tests fail to link on platforms with ntp_cv_gc_sections_runs=no +* [Bug 3599] Build fails on linux-m68k due to alignment issues + - added padding as suggested by John Paul Adrian Glaubitz +* [Bug 3594] ntpd discards messages coming through nmead +* [Bug 3593] ntpd discards silently nmea messages after the 5th string +* [Bug 3590] Update refclock_oncore.c to the new GPS date API +* [Bug 3585] Unity tests mix buffered and unbuffered output + - stdout+stderr are set to line buffered during test setup now +* [Bug 3583] synchronization error + - set clock to base date if system time is before that limit +* [Bug 3582] gpsdjson refclock fudgetime1 adjustment is doubled +* [Bug 3580] Possible bug ntpq-subs (NULL dereference in dogetassoc) + - Reported by Paulo Neves +* [Bug 3577] Update refclock_zyfer.c to the new GPS date API + - also updates for refclock_nmea.c and refclock_jupiter.c +* [Bug 3576] New GPS date function API +* [Bug 3573] nptdate: missleading error message +* [Bug 3570] NMEA driver docs: talker ID not mentioned, typo +* [Bug 3569] cleanup MOD_NANO/STA_NANO handling for 'ntpadjtimex()' + - sidekick: service port resolution in 'ntpdate' +* [Bug 3550] Reproducible build: Respect SOURCE_DATE_EPOCH + - applied patch by Douglas Royds +* [Bug 3542] ntpdc monlist parameters cannot be set +* [Bug 3533] ntpdc peer_info ipv6 issues + - applied patch by Gerry Garvey +* [Bug 3531] make check: test-decodenetnum fails + - try to harden 'decodenetnum()' against 'getaddrinfo()' errors + - fix wrong cond-compile tests in unit tests +* [Bug 3517] Reducing build noise +* [Bug 3516] Require tooling from this decade + - patch by Philipp Prindeville +* [Bug 3515] Refactor ntpdmain() dispatcher loop and group common code + - patch by Philipp Prindeville +* [Bug 3511] Get rid of AC_LANG_SOURCE() warnings + - patch by Philipp Prindeville +* [Bug 3510] Flatten out the #ifdef nesting in ntpdmain() + - partial application of patch by Philipp Prindeville +* [Bug 3491] Signed values of LFP datatypes should always display a sign + - applied patch by Gerry Garvey & fixed unit tests +* [Bug 3490] Patch to support Trimble Resolution Receivers + - applied (modified) patch by Richard Steedman +* [Bug 3473] RefID of refclocks should always be text format + - applied patch by Gerry Garvey (with minor formatting changes) +* [Bug 3132] Building 4.2.8p8 with disabled local libopts fails + - applied patch by Miroslav Lichvar +* [Bug 3094] ntpd trying to listen for broadcasts on a completely ipv6 network + +* [Bug 2420] ntpd doesn't run and exits with retval 0 when invalid user + is specified with -u + - monitor daemon child startup & propagate exit codes +* [Bug 1433] runtime check whether the kernel really supports capabilities + - (modified) patch by Kurt Roeckx +* Clean up sntp/networking.c:sendpkt() error message. +* Provide more detail on unrecognized config file parser tokens. +* Startup log improvements. +* Update the copyright year. +* html/confopt.html: cleanup. + +--- (4.2.8p13) 2019/03/07 Released by Harlan Stenn * [Sec 3565] Crafted null dereference attack in authenticated Modified: stable/12/contrib/ntp/CommitLog ============================================================================== --- stable/12/contrib/ntp/CommitLog Wed Mar 4 23:49:20 2020 (r358658) +++ stable/12/contrib/ntp/CommitLog Wed Mar 4 23:54:13 2020 (r358659) @@ -1,10 +1,3065 @@ -ChangeSet@1.3849, 2019-02-20 17:13:36-08:00, harlan@ntp-build.tal1.ntfo.org +ChangeSet@1.3896, 2020-03-03 17:42:43-08:00, ntpreleng@ntp-build.tal1.ntfo.org + NTP_4_2_8P14 + TAG: NTP_4_2_8P14 + + ChangeLog@1.1974 +1 -1 + NTP_4_2_8P14 + + ntpd/invoke-ntp.conf.texi@1.221 +1 -1 + NTP_4_2_8P14 + + ntpd/invoke-ntp.keys.texi@1.206 +1 -1 + NTP_4_2_8P14 + + ntpd/invoke-ntpd.texi@1.520 +2 -2 + NTP_4_2_8P14 + + ntpd/ntp.conf.5man@1.255 +2 -2 + NTP_4_2_8P14 + + ntpd/ntp.conf.5mdoc@1.255 +1 -1 + NTP_4_2_8P14 + + ntpd/ntp.conf.html@1.203 +1 -1 + NTP_4_2_8P14 + + ntpd/ntp.conf.man.in@1.255 +2 -2 + NTP_4_2_8P14 + + ntpd/ntp.conf.mdoc.in@1.255 +1 -1 + NTP_4_2_8P14 + + ntpd/ntp.keys.5man@1.240 +2 -2 + NTP_4_2_8P14 + + ntpd/ntp.keys.5mdoc@1.240 +1 -1 + NTP_4_2_8P14 + + ntpd/ntp.keys.html@1.201 +1 -1 + NTP_4_2_8P14 + + ntpd/ntp.keys.man.in@1.240 +2 -2 + NTP_4_2_8P14 + + ntpd/ntp.keys.mdoc.in@1.240 +1 -1 + NTP_4_2_8P14 + + ntpd/ntpd-opts.c@1.543 +7 -7 + NTP_4_2_8P14 + + ntpd/ntpd-opts.h@1.542 +3 -3 + NTP_4_2_8P14 + + ntpd/ntpd.1ntpdman@1.349 +2 -2 + NTP_4_2_8P14 + + ntpd/ntpd.1ntpdmdoc@1.349 +1 -1 + NTP_4_2_8P14 + + ntpd/ntpd.html@1.194 +2 -2 + NTP_4_2_8P14 + + ntpd/ntpd.man.in@1.349 +2 -2 + NTP_4_2_8P14 + + ntpd/ntpd.mdoc.in@1.349 +1 -1 + NTP_4_2_8P14 + + ntpdc/invoke-ntpdc.texi@1.517 +2 -2 + NTP_4_2_8P14 + + ntpdc/ntpdc-opts.c@1.536 +7 -7 + NTP_4_2_8P14 + + ntpdc/ntpdc-opts.h@1.535 +3 -3 + NTP_4_2_8P14 + + ntpdc/ntpdc.1ntpdcman@1.348 +2 -2 + NTP_4_2_8P14 + + ntpdc/ntpdc.1ntpdcmdoc@1.348 +1 -1 + NTP_4_2_8P14 + + ntpdc/ntpdc.html@1.363 +2 -2 + NTP_4_2_8P14 + + ntpdc/ntpdc.man.in@1.348 +2 -2 + NTP_4_2_8P14 + + ntpdc/ntpdc.mdoc.in@1.348 +1 -1 + NTP_4_2_8P14 + + ntpq/invoke-ntpq.texi@1.527 +2 -2 + NTP_4_2_8P14 + + ntpq/ntpq-opts.c@1.545 +7 -7 + NTP_4_2_8P14 + + ntpq/ntpq-opts.h@1.543 +3 -3 + NTP_4_2_8P14 + + ntpq/ntpq.1ntpqman@1.355 +2 -2 + NTP_4_2_8P14 + + ntpq/ntpq.1ntpqmdoc@1.355 +1 -1 + NTP_4_2_8P14 + + ntpq/ntpq.html@1.194 +2 -2 + NTP_4_2_8P14 + + ntpq/ntpq.man.in@1.355 +2 -2 + NTP_4_2_8P14 + + ntpq/ntpq.mdoc.in@1.355 +1 -1 + NTP_4_2_8P14 + + ntpsnmpd/invoke-ntpsnmpd.texi@1.519 +1 -1 + NTP_4_2_8P14 + + ntpsnmpd/ntpsnmpd-opts.c@1.538 +7 -7 + NTP_4_2_8P14 + + ntpsnmpd/ntpsnmpd-opts.h@1.537 +3 -3 + NTP_4_2_8P14 + + ntpsnmpd/ntpsnmpd.1ntpsnmpdman@1.348 +2 -2 + NTP_4_2_8P14 + + ntpsnmpd/ntpsnmpd.1ntpsnmpdmdoc@1.348 +1 -1 + NTP_4_2_8P14 + + ntpsnmpd/ntpsnmpd.html@1.187 +1 -1 + NTP_4_2_8P14 + + ntpsnmpd/ntpsnmpd.man.in@1.348 +2 -2 + NTP_4_2_8P14 + + ntpsnmpd/ntpsnmpd.mdoc.in@1.348 +1 -1 + NTP_4_2_8P14 + + packageinfo.sh@1.544 +1 -1 + NTP_4_2_8P14 + + scripts/calc_tickadj/calc_tickadj.1calc_tickadjman@1.109 +2 -2 + NTP_4_2_8P14 + + scripts/calc_tickadj/calc_tickadj.1calc_tickadjmdoc@1.110 +1 -1 + NTP_4_2_8P14 + + scripts/calc_tickadj/calc_tickadj.html@1.110 +1 -1 + NTP_4_2_8P14 + + scripts/calc_tickadj/calc_tickadj.man.in@1.108 +2 -2 + NTP_4_2_8P14 + + scripts/calc_tickadj/calc_tickadj.mdoc.in@1.110 +1 -1 + NTP_4_2_8P14 + + scripts/calc_tickadj/invoke-calc_tickadj.texi@1.113 +1 -1 + NTP_4_2_8P14 + + scripts/invoke-plot_summary.texi@1.131 +2 -2 + NTP_4_2_8P14 + + scripts/invoke-summary.texi@1.130 +2 -2 + NTP_4_2_8P14 + + scripts/ntp-wait/invoke-ntp-wait.texi@1.341 +2 -2 + NTP_4_2_8P14 + + scripts/ntp-wait/ntp-wait-opts@1.77 +2 -2 + NTP_4_2_8P14 + + scripts/ntp-wait/ntp-wait.1ntp-waitman@1.337 +2 -2 + NTP_4_2_8P14 + + scripts/ntp-wait/ntp-wait.1ntp-waitmdoc@1.338 +1 -1 + NTP_4_2_8P14 + + scripts/ntp-wait/ntp-wait.html@1.359 +2 -2 + NTP_4_2_8P14 + + scripts/ntp-wait/ntp-wait.man.in@1.337 +2 -2 + NTP_4_2_8P14 + + scripts/ntp-wait/ntp-wait.mdoc.in@1.338 +1 -1 + NTP_4_2_8P14 + + scripts/ntpsweep/invoke-ntpsweep.texi@1.128 +2 -2 + NTP_4_2_8P14 + + scripts/ntpsweep/ntpsweep-opts@1.79 +2 -2 + NTP_4_2_8P14 + + scripts/ntpsweep/ntpsweep.1ntpsweepman@1.116 +2 -2 + NTP_4_2_8P14 + + scripts/ntpsweep/ntpsweep.1ntpsweepmdoc@1.116 +1 -1 + NTP_4_2_8P14 + + scripts/ntpsweep/ntpsweep.html@1.131 +2 -2 + NTP_4_2_8P14 + + scripts/ntpsweep/ntpsweep.man.in@1.116 +2 -2 + NTP_4_2_8P14 + + scripts/ntpsweep/ntpsweep.mdoc.in@1.117 +1 -1 + NTP_4_2_8P14 + + scripts/ntptrace/invoke-ntptrace.texi@1.130 +2 -2 + NTP_4_2_8P14 + + scripts/ntptrace/ntptrace-opts@1.79 +2 -2 + NTP_4_2_8P14 + + scripts/ntptrace/ntptrace.1ntptraceman@1.116 +2 -2 + NTP_4_2_8P14 + + scripts/ntptrace/ntptrace.1ntptracemdoc@1.117 +1 -1 + NTP_4_2_8P14 + + scripts/ntptrace/ntptrace.html@1.132 +2 -2 + NTP_4_2_8P14 + + scripts/ntptrace/ntptrace.man.in@1.116 +2 -2 + NTP_4_2_8P14 + + scripts/ntptrace/ntptrace.mdoc.in@1.118 +1 -1 + NTP_4_2_8P14 + + scripts/plot_summary-opts@1.80 +2 -2 + NTP_4_2_8P14 + + scripts/plot_summary.1plot_summaryman@1.129 +2 -2 + NTP_4_2_8P14 + + scripts/plot_summary.1plot_summarymdoc@1.129 +1 -1 + NTP_4_2_8P14 + + scripts/plot_summary.html@1.134 +2 -2 + NTP_4_2_8P14 + + scripts/plot_summary.man.in@1.129 +2 -2 + NTP_4_2_8P14 + + scripts/plot_summary.mdoc.in@1.129 +1 -1 + NTP_4_2_8P14 + + scripts/summary-opts@1.79 +2 -2 + NTP_4_2_8P14 + + scripts/summary.1summaryman@1.128 +2 -2 + NTP_4_2_8P14 + + scripts/summary.1summarymdoc@1.128 +1 -1 + NTP_4_2_8P14 + + scripts/summary.html@1.133 +2 -2 + NTP_4_2_8P14 + + scripts/summary.man.in@1.128 +2 -2 + NTP_4_2_8P14 + + scripts/summary.mdoc.in@1.128 +1 -1 + NTP_4_2_8P14 + + scripts/update-leap/invoke-update-leap.texi@1.29 +1 -1 + NTP_4_2_8P14 + + scripts/update-leap/update-leap-opts@1.30 +2 -2 + NTP_4_2_8P14 + + scripts/update-leap/update-leap.1update-leapman@1.29 +2 -2 + NTP_4_2_8P14 + + scripts/update-leap/update-leap.1update-leapmdoc@1.29 +1 -1 + NTP_4_2_8P14 + + scripts/update-leap/update-leap.html@1.30 +1 -1 + NTP_4_2_8P14 + + scripts/update-leap/update-leap.man.in@1.29 +2 -2 + NTP_4_2_8P14 + + scripts/update-leap/update-leap.mdoc.in@1.29 +1 -1 + NTP_4_2_8P14 + + sntp/invoke-sntp.texi@1.519 +2 -2 + NTP_4_2_8P14 + + sntp/sntp-opts.c@1.539 +7 -7 + NTP_4_2_8P14 + + sntp/sntp-opts.h@1.537 +3 -3 + NTP_4_2_8P14 + + sntp/sntp.1sntpman@1.354 +2 -2 + NTP_4_2_8P14 + + sntp/sntp.1sntpmdoc@1.354 +1 -1 + NTP_4_2_8P14 + + sntp/sntp.html@1.535 +2 -2 + NTP_4_2_8P14 + + sntp/sntp.man.in@1.354 +2 -2 + NTP_4_2_8P14 + + sntp/sntp.mdoc.in@1.354 +1 -1 + NTP_4_2_8P14 + + util/invoke-ntp-keygen.texi@1.522 +2 -2 + NTP_4_2_8P14 + + util/ntp-keygen-opts.c@1.541 +7 -7 + NTP_4_2_8P14 + + util/ntp-keygen-opts.h@1.539 +3 -3 + NTP_4_2_8P14 + + util/ntp-keygen.1ntp-keygenman@1.350 +2 -2 + NTP_4_2_8P14 + + util/ntp-keygen.1ntp-keygenmdoc@1.350 +1 -1 + NTP_4_2_8P14 + + util/ntp-keygen.html@1.195 +2 -2 + NTP_4_2_8P14 + + util/ntp-keygen.man.in@1.350 +2 -2 + NTP_4_2_8P14 + + util/ntp-keygen.mdoc.in@1.350 +1 -1 + NTP_4_2_8P14 + +ChangeSet@1.3895, 2020-03-03 17:09:57-08:00, ntpreleng@ntp-build.tal1.ntfo.org + quiet some debug messages + + ntpd/ntp_config.c@1.375 +0 -2 + quiet some debug messages + + ntpd/ntp_peer.c@1.166 +2 -0 + quiet some debug messages + +ChangeSet@1.3894, 2020-03-03 16:49:54-08:00, ntpreleng@ntp-build.tal1.ntfo.org + NTP_4_2_8P13 + TAG: NTP_4_2_8P13 + + ChangeLog@1.1973 +1 -0 + NTP_4_2_8P13 + + ntpd/invoke-ntp.conf.texi@1.220 +31 -7 + NTP_4_2_8P13 + + ntpd/invoke-ntp.keys.texi@1.205 +1 -1 + NTP_4_2_8P13 + + ntpd/invoke-ntpd.texi@1.519 +3 -3 + NTP_4_2_8P13 + + ntpd/ntp.conf.5man@1.254 +34 -9 + NTP_4_2_8P13 + + ntpd/ntp.conf.5mdoc@1.254 +41 -6 + NTP_4_2_8P13 + + ntpd/ntp.conf.html@1.202 +33 -7 + NTP_4_2_8P13 + + ntpd/ntp.conf.man.in@1.254 +34 -9 + NTP_4_2_8P13 + + ntpd/ntp.conf.mdoc.in@1.254 +41 -6 + NTP_4_2_8P13 + + ntpd/ntp.keys.5man@1.239 +2 -2 + NTP_4_2_8P13 + + ntpd/ntp.keys.5mdoc@1.239 +3 -3 + NTP_4_2_8P13 + + ntpd/ntp.keys.man.in@1.239 +2 -2 + NTP_4_2_8P13 + + ntpd/ntp.keys.mdoc.in@1.239 +3 -3 + NTP_4_2_8P13 + + ntpd/ntpd-opts.c@1.542 +2 -2 + NTP_4_2_8P13 + + ntpd/ntpd-opts.h@1.541 +3 -3 + NTP_4_2_8P13 + + ntpd/ntpd.1ntpdman@1.348 +2 -2 + NTP_4_2_8P13 + + ntpd/ntpd.1ntpdmdoc@1.348 +2 -2 + NTP_4_2_8P13 + + ntpd/ntpd.man.in@1.348 +2 -2 + NTP_4_2_8P13 + + ntpd/ntpd.mdoc.in@1.348 +2 -2 + NTP_4_2_8P13 + + ntpdc/invoke-ntpdc.texi@1.516 +1 -1 + NTP_4_2_8P13 + + ntpdc/ntpdc-opts.c@1.535 +2 -2 + NTP_4_2_8P13 + + ntpdc/ntpdc-opts.h@1.534 +3 -3 + NTP_4_2_8P13 + + ntpdc/ntpdc.1ntpdcman@1.347 +2 -2 + NTP_4_2_8P13 + + ntpdc/ntpdc.1ntpdcmdoc@1.347 +2 -2 + NTP_4_2_8P13 + + ntpdc/ntpdc.html@1.362 +408 -353 + NTP_4_2_8P13 + + ntpdc/ntpdc.man.in@1.347 +2 -2 + NTP_4_2_8P13 + + ntpdc/ntpdc.mdoc.in@1.347 +2 -2 + NTP_4_2_8P13 + + ntpq/invoke-ntpq.texi@1.526 +1 -1 + NTP_4_2_8P13 + + ntpq/ntpq-opts.c@1.544 +2 -2 + NTP_4_2_8P13 + + ntpq/ntpq-opts.h@1.542 +3 -3 + NTP_4_2_8P13 + + ntpq/ntpq.1ntpqman@1.354 +2 -2 + NTP_4_2_8P13 + + ntpq/ntpq.1ntpqmdoc@1.354 +2 -2 + NTP_4_2_8P13 + + ntpq/ntpq.html@1.193 +1 -1 + NTP_4_2_8P13 + + ntpq/ntpq.man.in@1.354 +2 -2 + NTP_4_2_8P13 + + ntpq/ntpq.mdoc.in@1.354 +2 -2 + NTP_4_2_8P13 + + ntpsnmpd/invoke-ntpsnmpd.texi@1.518 +1 -1 + NTP_4_2_8P13 + + ntpsnmpd/ntpsnmpd-opts.c@1.537 +2 -2 + NTP_4_2_8P13 + + ntpsnmpd/ntpsnmpd-opts.h@1.536 +3 -3 + NTP_4_2_8P13 + + ntpsnmpd/ntpsnmpd.1ntpsnmpdman@1.347 +2 -2 + NTP_4_2_8P13 + + ntpsnmpd/ntpsnmpd.1ntpsnmpdmdoc@1.347 +2 -2 + NTP_4_2_8P13 + + ntpsnmpd/ntpsnmpd.man.in@1.347 +2 -2 + NTP_4_2_8P13 + + ntpsnmpd/ntpsnmpd.mdoc.in@1.347 +2 -2 + NTP_4_2_8P13 + + scripts/calc_tickadj/calc_tickadj.1calc_tickadjman@1.108 +2 -2 + NTP_4_2_8P13 + + scripts/calc_tickadj/calc_tickadj.1calc_tickadjmdoc@1.109 +2 -2 + NTP_4_2_8P13 + + scripts/calc_tickadj/calc_tickadj.html@1.109 +172 -128 + NTP_4_2_8P13 + + scripts/calc_tickadj/calc_tickadj.man.in@1.107 +2 -2 + NTP_4_2_8P13 + + scripts/calc_tickadj/calc_tickadj.mdoc.in@1.109 +2 -2 + NTP_4_2_8P13 + + scripts/calc_tickadj/invoke-calc_tickadj.texi@1.112 +2 -2 + NTP_4_2_8P13 + + scripts/invoke-plot_summary.texi@1.130 +2 -2 + NTP_4_2_8P13 + + scripts/invoke-summary.texi@1.129 +2 -2 + NTP_4_2_8P13 + + scripts/ntp-wait/invoke-ntp-wait.texi@1.340 +2 -2 + NTP_4_2_8P13 + + scripts/ntp-wait/ntp-wait-opts@1.76 +2 -2 + NTP_4_2_8P13 + + scripts/ntp-wait/ntp-wait.1ntp-waitman@1.336 +2 -2 + NTP_4_2_8P13 + + scripts/ntp-wait/ntp-wait.1ntp-waitmdoc@1.337 +2 -2 + NTP_4_2_8P13 + + scripts/ntp-wait/ntp-wait.html@1.358 +181 -152 + NTP_4_2_8P13 + + scripts/ntp-wait/ntp-wait.man.in@1.336 +2 -2 + NTP_4_2_8P13 + + scripts/ntp-wait/ntp-wait.mdoc.in@1.337 +2 -2 + NTP_4_2_8P13 + + scripts/ntpsweep/invoke-ntpsweep.texi@1.127 +2 -2 + NTP_4_2_8P13 + + scripts/ntpsweep/ntpsweep-opts@1.78 +2 -2 + NTP_4_2_8P13 + + scripts/ntpsweep/ntpsweep.1ntpsweepman@1.115 +2 -2 + NTP_4_2_8P13 + + scripts/ntpsweep/ntpsweep.1ntpsweepmdoc@1.115 +2 -2 + NTP_4_2_8P13 + + scripts/ntpsweep/ntpsweep.html@1.130 +188 -152 + NTP_4_2_8P13 + + scripts/ntpsweep/ntpsweep.man.in@1.115 +2 -2 + NTP_4_2_8P13 + + scripts/ntpsweep/ntpsweep.mdoc.in@1.116 +2 -2 + NTP_4_2_8P13 + + scripts/ntptrace/invoke-ntptrace.texi@1.129 +2 -2 + NTP_4_2_8P13 + + scripts/ntptrace/ntptrace-opts@1.78 +2 -2 + NTP_4_2_8P13 + + scripts/ntptrace/ntptrace.1ntptraceman@1.115 +2 -2 + NTP_4_2_8P13 + + scripts/ntptrace/ntptrace.1ntptracemdoc@1.116 +2 -2 + NTP_4_2_8P13 + + scripts/ntptrace/ntptrace.html@1.131 +179 -129 + NTP_4_2_8P13 + + scripts/ntptrace/ntptrace.man.in@1.115 +2 -2 + NTP_4_2_8P13 + + scripts/ntptrace/ntptrace.mdoc.in@1.117 +2 -2 + NTP_4_2_8P13 + + scripts/plot_summary-opts@1.79 +2 -2 + NTP_4_2_8P13 + + scripts/plot_summary.1plot_summaryman@1.128 +2 -2 + NTP_4_2_8P13 + + scripts/plot_summary.1plot_summarymdoc@1.128 +2 -2 + NTP_4_2_8P13 + + scripts/plot_summary.html@1.133 +203 -161 + NTP_4_2_8P13 + + scripts/plot_summary.man.in@1.128 +2 -2 + NTP_4_2_8P13 + + scripts/plot_summary.mdoc.in@1.128 +2 -2 + NTP_4_2_8P13 + + scripts/summary-opts@1.78 +2 -2 + NTP_4_2_8P13 + + scripts/summary.1summaryman@1.127 +2 -2 + NTP_4_2_8P13 + + scripts/summary.1summarymdoc@1.127 +2 -2 + NTP_4_2_8P13 + + scripts/summary.html@1.132 +184 -136 + NTP_4_2_8P13 + + scripts/summary.man.in@1.127 +2 -2 + NTP_4_2_8P13 + + scripts/summary.mdoc.in@1.127 +2 -2 + NTP_4_2_8P13 + + scripts/update-leap/invoke-update-leap.texi@1.28 +1 -1 + NTP_4_2_8P13 + + scripts/update-leap/update-leap-opts@1.29 +2 -2 + NTP_4_2_8P13 + + scripts/update-leap/update-leap.1update-leapman@1.28 +2 -2 + NTP_4_2_8P13 + + scripts/update-leap/update-leap.1update-leapmdoc@1.28 +2 -2 + NTP_4_2_8P13 + + scripts/update-leap/update-leap.html@1.29 +1 -1 + NTP_4_2_8P13 + + scripts/update-leap/update-leap.man.in@1.28 +2 -2 + NTP_4_2_8P13 + + scripts/update-leap/update-leap.mdoc.in@1.28 +2 -2 + NTP_4_2_8P13 + + sntp/invoke-sntp.texi@1.518 +1 -1 + NTP_4_2_8P13 + + sntp/sntp-opts.c@1.538 +2 -2 + NTP_4_2_8P13 + + sntp/sntp-opts.h@1.536 +3 -3 + NTP_4_2_8P13 + + sntp/sntp.1sntpman@1.353 +2 -2 + NTP_4_2_8P13 + + sntp/sntp.1sntpmdoc@1.353 +2 -2 + NTP_4_2_8P13 + + sntp/sntp.html@1.534 +472 -418 + NTP_4_2_8P13 + + sntp/sntp.man.in@1.353 +2 -2 + NTP_4_2_8P13 + + sntp/sntp.mdoc.in@1.353 +2 -2 + NTP_4_2_8P13 + + util/invoke-ntp-keygen.texi@1.521 +1 -1 + NTP_4_2_8P13 + + util/ntp-keygen-opts.c@1.540 +2 -2 + NTP_4_2_8P13 + + util/ntp-keygen-opts.h@1.538 +3 -3 + NTP_4_2_8P13 + + util/ntp-keygen.1ntp-keygenman@1.349 +2 -2 + NTP_4_2_8P13 + + util/ntp-keygen.1ntp-keygenmdoc@1.349 +2 -2 + NTP_4_2_8P13 + + util/ntp-keygen.html@1.194 +1 -1 + NTP_4_2_8P13 + + util/ntp-keygen.man.in@1.349 +2 -2 + NTP_4_2_8P13 + + util/ntp-keygen.mdoc.in@1.349 +2 -2 + NTP_4_2_8P13 + +ChangeSet@1.3893, 2020-03-03 16:25:14-08:00, ntpreleng@ntp-build.tal1.ntfo.org + Replace line with head -1 + + scripts/build/addChangeLogTag@1.6 +1 -1 + Replace line with head -1 + +ChangeSet@1.3892, 2020-03-03 16:05:38-08:00, ntpreleng@ntp-build.tal1.ntfo.org + provide get_pollskew() for simulator + + ntpd/ntp_config.c@1.374 +2 -2 + provide get_pollskew() for simulator + +ChangeSet@1.3844.24.1, 2020-03-03 03:30:13-08:00, ntpreleng@ntp-build.tal1.ntfo.org + NTP_4_2_8P13 + TAG: NTP_4_2_8P13 (currently on 1.3894) + + BitKeeper/triggers/2mirrors@1.11 +6 -2 + NTP_4_2_8P13 + + ntpd/ntpd-opts.c@1.539.1.1 +1 -1 + NTP_4_2_8P13 + + ntpd/ntpd-opts.h@1.538.1.1 +1 -1 + NTP_4_2_8P13 + + ntpd/ntpd.html@1.193 +3 -3 + NTP_4_2_8P13 + + ntpd/ntpdsim-opts.c@1.29 +372 -340 + NTP_4_2_8P13 + + ntpd/ntpdsim-opts.h@1.29 +44 -37 + NTP_4_2_8P13 + + ntpdc/ntpdc-opts.c@1.532.1.1 +1 -1 + NTP_4_2_8P13 + + ntpdc/ntpdc-opts.h@1.531.1.1 +1 -1 + NTP_4_2_8P13 + + ntpq/ntpq-opts.c@1.541.1.1 +1 -1 + NTP_4_2_8P13 + + ntpq/ntpq-opts.h@1.539.1.1 +1 -1 + NTP_4_2_8P13 + + ntpq/ntpq.html@1.192 +1 -1 + NTP_4_2_8P13 + + ntpsnmpd/ntpsnmpd-opts.c@1.534.1.1 +1 -1 + NTP_4_2_8P13 + + ntpsnmpd/ntpsnmpd-opts.h@1.533.1.1 +1 -1 + NTP_4_2_8P13 + + scripts/calc_tickadj/calc_tickadj-opts@1.10 +2 -2 + NTP_4_2_8P13 + + scripts/ntp-wait/invoke-ntp-wait.texi@1.337.1.1 +1 -1 + NTP_4_2_8P13 + + scripts/ntp-wait/ntp-wait-opts@1.73.1.1 +1 -1 + NTP_4_2_8P13 + + scripts/ntpsweep/ntpsweep-opts@1.75.1.1 +1 -1 + NTP_4_2_8P13 + + scripts/ntptrace/invoke-ntptrace.texi@1.126.1.1 +1 -1 + NTP_4_2_8P13 + + scripts/ntptrace/ntptrace-opts@1.75.1.1 +1 -1 + NTP_4_2_8P13 + + scripts/plot_summary-opts@1.76.1.1 +1 -1 + NTP_4_2_8P13 + + scripts/summary-opts@1.75.1.1 +1 -1 + NTP_4_2_8P13 + + scripts/update-leap/update-leap-opts@1.26.1.1 +1 -1 + NTP_4_2_8P13 + + sntp/sntp-opts.c@1.535.1.1 +1 -1 + NTP_4_2_8P13 + + sntp/sntp-opts.h@1.533.1.1 +1 -1 + NTP_4_2_8P13 + + util/ntp-keygen-opts.c@1.537.1.1 +1 -1 + NTP_4_2_8P13 + + util/ntp-keygen-opts.h@1.535.1.1 +1 -1 + NTP_4_2_8P13 + + util/ntp-keygen.html@1.193 +1 -1 + NTP_4_2_8P13 + +ChangeSet@1.3888, 2020-03-03 07:26:56+00:00, stenn@psp-deb1.ntp.org + cleanup + + NEWS@1.197.1.3 +3 -2 + cleanup + +ChangeSet@1.3887, 2020-02-18 05:11:26+00:00, stenn@psp-deb1.ntp.org + Cleanup distcheck psl* files + + ntpd/Makefile.am@1.138 +11 -0 + Cleanup distcheck psl* files + +ChangeSet@1.3886, 2020-02-18 05:10:35+00:00, stenn@psp-deb1.ntp.org + Distribute ntp_calgps.h + + include/Makefile.am@1.58 +1 -0 + Distribute ntp_calgps.h + +ChangeSet@1.3885, 2020-02-18 03:32:51+00:00, stenn@psp-deb1.ntp.org + Update the NEWS file for p14 + + NEWS@1.197.1.2 +107 -0 + Update the NEWS file for p14 + +ChangeSet@1.3884, 2020-02-17 11:05:46+00:00, stenn@psp-deb1.ntp.org + merge cleanup + + ntpd/ntp_proto.c@1.432 +1 -1 + merge cleanup + +ChangeSet@1.3881, 2020-02-17 08:50:00+00:00, stenn@psp-deb1.ntp.org + update + + ntpd/ntp_keyword.h@1.38 +545 -539 + update + +ChangeSet@1.3880, 2020-02-17 08:48:45+00:00, stenn@psp-deb1.ntp.org + Startp logging improvements. + Bug3596. + + html/accopt.html@1.48 +7 -2 + cleanup. + bug3596: document 'serverresponse fuzz' + + html/confopt.html@1.64.1.1 +22 -9 + Cleanup. + + Bug 3596: document xmtnonce + + html/miscopt.html@1.93 +19 -1 + Cleanup. + + bug3596: document pollskewlist + + include/Makefile.am@1.57 +1 -0 + pollskew upodates + + include/ntp.h@1.232 +8 -2 + bug3596 chagnes: + - srvfuzrft patches + - pollskew updates + - xmtnonce + + include/ntp_config.h@1.89 +27 -20 + bug3596 updates: + - pollskewlist + - srvfuzrft patches + + include/ntp_psl.h@1.1 +17 -0 + BitKeeper file include/ntp_psl.h + --- + bug3596 + + include/ntp_psl.h@1.0 +0 -0 + + include/ntp_request.h@1.54 +2 -1 + srvfuzrft patches + + include/ntp_stdlib.h@1.88 +1 -1 + randomizepoll/server response fuzz reftime fixes + + include/ntpd.h@1.207 +1 -1 + bug3596 cleanup + + libntp/statestr.c@1.31 +12 -5 + bug3596 srvrspfuz fixes + + ntpd/Makefile.am@1.137 +37 -7 + bug3596 pollskewlist changes + + ntpd/complete.conf.in@1.37 +4 -2 + bug3596: randompoll, pollskew xmtnonce + + ntpd/keyword-gen-utd@1.35 +1 -1 + Keyword table updates + + ntpd/keyword-gen.c@1.42 +3 -3 + bug3596: serverresponse fuzz, pollskewlist, xmtnonce + + ntpd/ntp.conf.def@1.34 +40 -4 + Cleanup. + bug3596: xmtnonce, serverresponse fuzz, pollskewlist, + + ntpd/ntp_config.c@1.373 +250 -26 + bug3596: serverresponse fuzz, pollskewlist, xmtnonce + + ntpd/ntp_loopfilter.c@1.195 +1 -1 + pollskew upodates + + ntpd/ntp_parser.c@1.117 +1298 -1283 + bug3596 *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@freebsd.org Thu Mar 5 00:18:09 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id EE77B2565F7; Thu, 5 Mar 2020 00:18:09 +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 48Xrtn5z5Gz4Mm0; Thu, 5 Mar 2020 00:18:09 +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 C376D26693; Thu, 5 Mar 2020 00:18:09 +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 0250I9pC038144; Thu, 5 Mar 2020 00:18:09 GMT (envelope-from cy@FreeBSD.org) Received: (from cy@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 0250I9pT038143; Thu, 5 Mar 2020 00:18:09 GMT (envelope-from cy@FreeBSD.org) Message-Id: <202003050018.0250I9pT038143@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: cy set sender to cy@FreeBSD.org using -f From: Cy Schubert Date: Thu, 5 Mar 2020 00:18:09 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r358660 - stable/11/contrib/ntp/ntpd X-SVN-Group: stable-11 X-SVN-Commit-Author: cy X-SVN-Commit-Paths: stable/11/contrib/ntp/ntpd X-SVN-Commit-Revision: 358660 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages 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, 05 Mar 2020 00:18:10 -0000 Author: cy Date: Thu Mar 5 00:18:09 2020 New Revision: 358660 URL: https://svnweb.freebsd.org/changeset/base/358660 Log: This is a direct commit to stable/11: Stack gap is not supported on stable/11. Modified: stable/11/contrib/ntp/ntpd/ntpd.c Modified: stable/11/contrib/ntp/ntpd/ntpd.c ============================================================================== --- stable/11/contrib/ntp/ntpd/ntpd.c Wed Mar 4 23:54:13 2020 (r358659) +++ stable/11/contrib/ntp/ntpd/ntpd.c Thu Mar 5 00:18:09 2020 (r358660) @@ -424,18 +424,6 @@ main( char *argv[] ) { -# ifdef __FreeBSD__ - { - /* - * We Must disable ASLR stack gap on FreeBSD to avoid a - * segfault. See PR/241421 and PR/241960. - */ - int aslr_var = PROC_STACKGAP_DISABLE; - - pid_t my_pid = getpid(); - procctl(P_PID, my_pid, PROC_STACKGAP_CTL, &aslr_var); - } -# endif return ntpdmain(argc, argv); } #endif /* !SYS_WINNT */ From owner-svn-src-all@freebsd.org Thu Mar 5 00:36:39 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 995CE256D0A; Thu, 5 Mar 2020 00:36:39 +0000 (UTC) (envelope-from glebius@freebsd.org) Received: from cell.glebi.us (glebi.us [162.251.186.162]) (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 48XsJ53MNmz44Cn; Thu, 5 Mar 2020 00:36:37 +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 0250aSdk029387 (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384 bits=256 verify=NO); Wed, 4 Mar 2020 16:36:28 -0800 (PST) (envelope-from glebius@freebsd.org) Received: (from glebius@localhost) by cell.glebi.us (8.15.2/8.15.2/Submit) id 0250aSxs029386; Wed, 4 Mar 2020 16:36:28 -0800 (PST) (envelope-from glebius@freebsd.org) X-Authentication-Warning: cell.glebi.us: glebius set sender to glebius@freebsd.org using -f Date: Wed, 4 Mar 2020 16:36:28 -0800 From: Gleb Smirnoff To: Jeff Roberson Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r358451 - in head/sys: kern vm Message-ID: <20200305003628.GS5741@FreeBSD.org> References: <202002282142.01SLgmnN089938@repo.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <202002282142.01SLgmnN089938@repo.freebsd.org> X-Rspamd-Queue-Id: 48XsJ53MNmz44Cn X-Spamd-Bar: / Authentication-Results: mx1.freebsd.org; none X-Spamd-Result: default: False [-0.07 / 15.00]; local_wl_from(0.00)[freebsd.org]; NEURAL_SPAM_MEDIUM(0.92)[0.922,0]; ASN(0.00)[asn:27348, ipnet:162.251.186.0/24, country:US]; NEURAL_HAM_LONG(-0.99)[-0.990,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, 05 Mar 2020 00:36:39 -0000 Hi Jeff, may be I'm missing something, but from a quick review this change doesn't seem to be correct for sendfile with INVARIANTS on. sendfile_swapin does immediate vm_page_xunbusy() for all valid pages that are substituted to bogus one. With this change KASSERT in vm_page_relookup() would fire: KASSERT(m != NULL && vm_page_busied(m) && On Fri, Feb 28, 2020 at 09:42:48PM +0000, Jeff Roberson wrote: J> Author: jeff J> Date: Fri Feb 28 21:42:48 2020 J> New Revision: 358451 J> URL: https://svnweb.freebsd.org/changeset/base/358451 J> J> Log: J> Provide a lock free alternative to resolve bogus pages. This is not likely J> to be much of a perf win, just a nice code simplification. J> J> Reviewed by: markj, kib J> Differential Revision: https://reviews.freebsd.org/D23866 J> J> Modified: J> head/sys/kern/kern_sendfile.c J> head/sys/kern/vfs_bio.c J> head/sys/vm/vm_page.c J> head/sys/vm/vm_page.h J> J> Modified: head/sys/kern/kern_sendfile.c J> ============================================================================== J> --- head/sys/kern/kern_sendfile.c Fri Feb 28 21:31:40 2020 (r358450) J> +++ head/sys/kern/kern_sendfile.c Fri Feb 28 21:42:48 2020 (r358451) J> @@ -350,7 +350,6 @@ sendfile_swapin(vm_object_t obj, struct sf_io *sfio, i J> { J> vm_page_t *pa = sfio->pa; J> int grabbed; J> - bool locked; J> J> *nios = 0; J> flags = (flags & SF_NODISKIO) ? VM_ALLOC_NOWAIT : 0; J> @@ -359,8 +358,6 @@ sendfile_swapin(vm_object_t obj, struct sf_io *sfio, i J> * First grab all the pages and wire them. Note that we grab J> * only required pages. Readahead pages are dealt with later. J> */ J> - locked = false; J> - J> grabbed = vm_page_grab_pages_unlocked(obj, OFF_TO_IDX(off), J> VM_ALLOC_NORMAL | VM_ALLOC_WIRED | flags, pa, npages); J> if (grabbed < npages) { J> @@ -381,10 +378,6 @@ sendfile_swapin(vm_object_t obj, struct sf_io *sfio, i J> i++; J> continue; J> } J> - if (!locked) { J> - VM_OBJECT_WLOCK(obj); J> - locked = true; J> - } J> J> /* J> * Next page is invalid. Check if it belongs to pager. It J> @@ -396,8 +389,10 @@ sendfile_swapin(vm_object_t obj, struct sf_io *sfio, i J> * stored in 'a', about how many pages we can pagein after J> * this page in a single I/O. J> */ J> + VM_OBJECT_RLOCK(obj); J> if (!vm_pager_has_page(obj, OFF_TO_IDX(vmoff(i, off)), NULL, J> &a)) { J> + VM_OBJECT_RUNLOCK(obj); J> pmap_zero_page(pa[i]); J> vm_page_valid(pa[i]); J> MPASS(pa[i]->dirty == 0); J> @@ -405,6 +400,7 @@ sendfile_swapin(vm_object_t obj, struct sf_io *sfio, i J> i++; J> continue; J> } J> + VM_OBJECT_RUNLOCK(obj); J> J> /* J> * We want to pagein as many pages as possible, limited only J> @@ -435,11 +431,9 @@ sendfile_swapin(vm_object_t obj, struct sf_io *sfio, i J> } J> J> refcount_acquire(&sfio->nios); J> - VM_OBJECT_WUNLOCK(obj); J> rv = vm_pager_get_pages_async(obj, pa + i, count, NULL, J> i + count == npages ? &rhpages : NULL, J> &sendfile_iodone, sfio); J> - VM_OBJECT_WLOCK(obj); J> if (__predict_false(rv != VM_PAGER_OK)) { J> /* J> * Perform full pages recovery before returning EIO. J> @@ -451,7 +445,7 @@ sendfile_swapin(vm_object_t obj, struct sf_io *sfio, i J> for (j = 0; j < npages; j++) { J> if (j > i && j < i + count - 1 && J> pa[j] == bogus_page) J> - pa[j] = vm_page_lookup(obj, J> + pa[j] = vm_page_relookup(obj, J> OFF_TO_IDX(vmoff(j, off))); J> else if (j >= i) J> vm_page_xunbusy(pa[j]); J> @@ -460,7 +454,6 @@ sendfile_swapin(vm_object_t obj, struct sf_io *sfio, i J> __func__, pa, j)); J> vm_page_unwire(pa[j], PQ_INACTIVE); J> } J> - VM_OBJECT_WUNLOCK(obj); J> return (EIO); J> } J> J> @@ -475,7 +468,7 @@ sendfile_swapin(vm_object_t obj, struct sf_io *sfio, i J> */ J> for (j = i + 1; j < i + count - 1; j++) J> if (pa[j] == bogus_page) { J> - pa[j] = vm_page_lookup(obj, J> + pa[j] = vm_page_relookup(obj, J> OFF_TO_IDX(vmoff(j, off))); J> KASSERT(pa[j], ("%s: page %p[%d] disappeared", J> __func__, pa, j)); J> @@ -484,9 +477,6 @@ sendfile_swapin(vm_object_t obj, struct sf_io *sfio, i J> i += count; J> (*nios)++; J> } J> - J> - if (locked) J> - VM_OBJECT_WUNLOCK(obj); J> J> if (*nios == 0 && npages != 0) J> SFSTAT_INC(sf_noiocnt); J> J> Modified: head/sys/kern/vfs_bio.c J> ============================================================================== J> --- head/sys/kern/vfs_bio.c Fri Feb 28 21:31:40 2020 (r358450) J> +++ head/sys/kern/vfs_bio.c Fri Feb 28 21:42:48 2020 (r358451) J> @@ -2878,11 +2878,8 @@ vfs_vmio_iodone(struct buf *bp) J> */ J> m = bp->b_pages[i]; J> if (m == bogus_page) { J> - if (bogus == false) { J> - bogus = true; J> - VM_OBJECT_RLOCK(obj); J> - } J> - m = vm_page_lookup(obj, OFF_TO_IDX(foff)); J> + bogus = true; J> + m = vm_page_relookup(obj, OFF_TO_IDX(foff)); J> if (m == NULL) J> panic("biodone: page disappeared!"); J> bp->b_pages[i] = m; J> @@ -2905,8 +2902,6 @@ vfs_vmio_iodone(struct buf *bp) J> foff = (foff + PAGE_SIZE) & ~(off_t)PAGE_MASK; J> iosize -= resid; J> } J> - if (bogus) J> - VM_OBJECT_RUNLOCK(obj); J> vm_object_pip_wakeupn(obj, bp->b_npages); J> if (bogus && buf_mapped(bp)) { J> BUF_CHECK_MAPPED(bp); J> @@ -4470,22 +4465,16 @@ vfs_unbusy_pages(struct buf *bp) J> int i; J> vm_object_t obj; J> vm_page_t m; J> - bool bogus; J> J> runningbufwakeup(bp); J> if (!(bp->b_flags & B_VMIO)) J> return; J> J> obj = bp->b_bufobj->bo_object; J> - bogus = false; J> for (i = 0; i < bp->b_npages; i++) { J> m = bp->b_pages[i]; J> if (m == bogus_page) { J> - if (bogus == false) { J> - bogus = true; J> - VM_OBJECT_RLOCK(obj); J> - } J> - m = vm_page_lookup(obj, OFF_TO_IDX(bp->b_offset) + i); J> + m = vm_page_relookup(obj, OFF_TO_IDX(bp->b_offset) + i); J> if (!m) J> panic("vfs_unbusy_pages: page missing\n"); J> bp->b_pages[i] = m; J> @@ -4498,8 +4487,6 @@ vfs_unbusy_pages(struct buf *bp) J> } J> vm_page_sunbusy(m); J> } J> - if (bogus) J> - VM_OBJECT_RUNLOCK(obj); J> vm_object_pip_wakeupn(obj, bp->b_npages); J> } J> J> J> Modified: head/sys/vm/vm_page.c J> ============================================================================== J> --- head/sys/vm/vm_page.c Fri Feb 28 21:31:40 2020 (r358450) J> +++ head/sys/vm/vm_page.c Fri Feb 28 21:42:48 2020 (r358451) J> @@ -1671,6 +1671,24 @@ vm_page_lookup(vm_object_t object, vm_pindex_t pindex) J> } J> J> /* J> + * vm_page_relookup: J> + * J> + * Returns a page that must already have been busied by J> + * the caller. Used for bogus page replacement. J> + */ J> +vm_page_t J> +vm_page_relookup(vm_object_t object, vm_pindex_t pindex) J> +{ J> + vm_page_t m; J> + J> + m = vm_radix_lookup_unlocked(&object->rtree, pindex); J> + KASSERT(m != NULL && vm_page_busied(m) && J> + m->object == object && m->pindex == pindex, J> + ("vm_page_relookup: Invalid page %p", m)); J> + return (m); J> +} J> + J> +/* J> * This should only be used by lockless functions for releasing transient J> * incorrect acquires. The page may have been freed after we acquired a J> * busy lock. In this case busy_lock == VPB_FREED and we have nothing J> J> Modified: head/sys/vm/vm_page.h J> ============================================================================== J> --- head/sys/vm/vm_page.h Fri Feb 28 21:31:40 2020 (r358450) J> +++ head/sys/vm/vm_page.h Fri Feb 28 21:42:48 2020 (r358451) J> @@ -653,6 +653,7 @@ void vm_page_reference(vm_page_t m); J> #define VPR_NOREUSE 0x02 J> void vm_page_release(vm_page_t m, int flags); J> void vm_page_release_locked(vm_page_t m, int flags); J> +vm_page_t vm_page_relookup(vm_object_t, vm_pindex_t); J> bool vm_page_remove(vm_page_t); J> bool vm_page_remove_xbusy(vm_page_t); J> int vm_page_rename(vm_page_t, vm_object_t, vm_pindex_t); J> _______________________________________________ J> svn-src-all@freebsd.org mailing list J> https://lists.freebsd.org/mailman/listinfo/svn-src-all J> To unsubscribe, send any mail to "svn-src-all-unsubscribe@freebsd.org" -- Gleb Smirnoff From owner-svn-src-all@freebsd.org Thu Mar 5 04:36:15 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 1997925C6EB; Thu, 5 Mar 2020 04:36:15 +0000 (UTC) (envelope-from byond.lenox@gmail.com) Received: from mail-qk1-f195.google.com (mail-qk1-f195.google.com [209.85.222.195]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1O1" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 48XycZ5VZxz4CGM; Thu, 5 Mar 2020 04:36:13 +0000 (UTC) (envelope-from byond.lenox@gmail.com) Received: by mail-qk1-f195.google.com with SMTP id b5so4064072qkh.8; Wed, 04 Mar 2020 20:36:13 -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=QxTH7SoTW7Bxd/V+l+WqupzNN2yTXkA7EPQ2Im1yWZ0=; b=PgYqNZNHpMfLyo+yzFm6GGXeID1V4GPw1ZLXoG2tCJ3PjroRw/GIfVLLtIbTxwFwCy ufwpClp6+qNbz4624dOUgLlMfphOaoKWGbp+EfLlgQxwRkJU3CqKNlUsxj/WZ4At0toR T5wQJ/GNt9KZc8Zgyjd/7TgEVosPr5/nDpF+qrIhV9tb/Pdwkm8MZDV5AJ7rDs8NSuiX f4549C7yAok34CW3dWdTZQ5zoKXnZnk9IC5kJC71DN34gDH7liqU3xZkiBgYmhLwME+8 BUkJmL3gIeF4jfIrvUiQXRQed8dXbDKW30K1NpBGPSxVuCgX3jkYV/KrmrIpsfIz7kjN +GUw== X-Gm-Message-State: ANhLgQ0z92UQu0JvZohr98DwlkiKvwuyGW6AEYLb15j0U1s5hAKEEAiU uvC7qBXdKnZ+pl//xIJtOLI/qfic X-Google-Smtp-Source: ADFU+vsEeEAavYl2fRZV7Vwo+780kc2J+v4Xk8EEhEaFMQ5t45ShgkVJX12HLVIHY3jI+JN4aGlvIg== X-Received: by 2002:a05:620a:142b:: with SMTP id k11mr6123664qkj.322.1583382972702; Wed, 04 Mar 2020 20:36:12 -0800 (PST) Received: from mail-qt1-f169.google.com (mail-qt1-f169.google.com. [209.85.160.169]) by smtp.gmail.com with ESMTPSA id y38sm15653351qth.18.2020.03.04.20.36.12 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 04 Mar 2020 20:36:12 -0800 (PST) Received: by mail-qt1-f169.google.com with SMTP id 59so3231557qtb.1; Wed, 04 Mar 2020 20:36:12 -0800 (PST) X-Received: by 2002:ac8:6048:: with SMTP id k8mr5674292qtm.53.1583382971888; Wed, 04 Mar 2020 20:36:11 -0800 (PST) MIME-Version: 1.0 References: <202002281832.01SIWaEL071685@repo.freebsd.org> <5767791583138727@sas1-c7aad230fe87.qloud-c.yandex.net> <3d54ebc3-a511-a239-136d-c0f638a69351@FreeBSD.org> In-Reply-To: From: Kyle Evans Date: Wed, 4 Mar 2020 22:36:00 -0600 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: svn commit: r358439 - head/sys/amd64/include To: Ryan Libby Cc: Guido Falsi , "Alexander V. Chernikov" , "svn-src-head@freebsd.org" , "svn-src-all@freebsd.org" , "src-committers@freebsd.org" , vbox@freebsd.org Content-Type: text/plain; charset="UTF-8" X-Rspamd-Queue-Id: 48XycZ5VZxz4CGM X-Spamd-Bar: ----- Authentication-Results: mx1.freebsd.org; none X-Spamd-Result: default: False [-5.78 / 15.00]; NEURAL_HAM_MEDIUM(-0.78)[-0.779,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; REPLY(-4.00)[]; 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, 05 Mar 2020 04:36:15 -0000 On Wed, Mar 4, 2020 at 11:27 AM Ryan Libby wrote: > > On Wed, Mar 4, 2020 at 3:27 AM Guido Falsi wrote: > > > > On 02/03/20 18:13, Ryan Libby wrote: > > > On Mon, Mar 2, 2020 at 12:45 AM Alexander V. Chernikov wrote: > > >> > > >> 28.02.2020, 18:32, "Ryan Libby" : > > >>> Author: rlibby > > >>> Date: Fri Feb 28 18:32:36 2020 > > >>> New Revision: 358439 > > >>> URL: https://svnweb.freebsd.org/changeset/base/358439 > > >>> > > >>> Log: > > >>> amd64 atomic.h: minor codegen optimization in flag access > > >>> > > >>> Previously the pattern to extract status flags from inline assembly > > >>> blocks was to use setcc in the block to write the flag to a register. > > >>> This was suboptimal in a few ways: > > >>> - It would lead to code like: sete %cl; test %cl; jne, i.e. a flag > > >>> would just be loaded into a register and then reloaded to a flag. > > >>> - The setcc would force the block to use an additional register. > > >>> - If the client code didn't care for the flag value then the setcc > > >>> would be entirely pointless but could not be eliminated by the > > >>> optimizer. > > >>> > > >>> A more modern inline asm construct (since gcc 6 and clang 9) allows for > > >> This effectively restricts kernel builds by all older compilers. > > >> Is there any chance of making it conditional depending on the compiler version/features? > > > > > > Yes, it is possible to test for __GCC_ASM_FLAG_OUTPUTS__. It is more > > > maintenance effort going forward. If building current with an old cross > > > compiler is an important scenario, we can either revert this and the > > > following revision or work up a patch to make it conditional. I'll see > > > what that might look like. > > > > > > > Actually this causes emulators/virtualbox-ose port to fail to build: > > > > In file included from /usr/src/sys/sys/systm.h:44: > > /usr/include/machine/atomic.h:230:1: error: invalid output constraint > > '=@cce' in asm > > ATOMIC_CMPSET(char); > > ^ > > /usr/include/machine/atomic.h:205:4: note: expanded from macro > > 'ATOMIC_CMPSET' > > : "=@cce" (res), /* 0 */ \ > > ^ > > /usr/include/machine/atomic.h:230:1: error: invalid output constraint > > '=@cce' in asm > > > > (and so on) > > > > > > the virtualbox-ose port is forced to use an older clang version due to > > crashes when compiled with newer ones. > > > > Not sure whose responsibility is to fix this. > > > > Should I file a bug report on bugzilla? > > > > -- > > Guido Falsi > > We've discussed whether to provide compatibility code for older compilers here: > https://reviews.freebsd.org/D23937 > > There's a bug tracking virtualbox-ose being pinned to an old compiler here: > https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=236616 > > I see you have commented on that bug. I've opened https://reviews.freebsd.org/D23967 and PR 244603 specifically for coercing the port to use GCC9 instead, which does indeed fix the breakage. Once that lands, I'll investigate 236616 some more to see if newer llvm (including 10) is still broken here. Thanks, Kyle Evans From owner-svn-src-all@freebsd.org Thu Mar 5 05:27:21 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id F2C6F25D532; Thu, 5 Mar 2020 05:27:21 +0000 (UTC) (envelope-from asomers@gmail.com) Received: from mail-oi1-f181.google.com (mail-oi1-f181.google.com [209.85.167.181]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1O1" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 48XzlW5fcmz41yZ; Thu, 5 Mar 2020 05:27:19 +0000 (UTC) (envelope-from asomers@gmail.com) Received: by mail-oi1-f181.google.com with SMTP id g6so4753393oiy.1; Wed, 04 Mar 2020 21:27: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:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=cIWcTTCwsrGBXgoCxygzKbDWSySCEqGqvDGIo04qgCY=; b=jDWLjtI+zai3HfjI8Z3fHCUZ5xDrgFCOHpQf2aHCfZ0ZDjFqFkry8RcapoSdC9w3Za oXNnbK1rmXh8/HiE4icJhXJDbLDISpM/bHaE5KwcIMHxyKvsoqZ7WUZyoq2TPudLs75E DfE0sFkVXXDkiWNDdtDKqmfj5z3CH+LbvtDc07LybyUdzrOQxKl4pRnOytEOSpXTU+Ge OO25XxgzktnwsAnfv2JO3mCPFjboZvIC1FvLi+neX2VHsZsXg/FLjG20vucgJegnHRoe Ny/jJMs6fLZbsV8GkSamEbPZfUMC0DddaJFd2mZdSX5f+RS/t8thzvqeHIv8j+SGqEFc 6ZAg== X-Gm-Message-State: ANhLgQ0xP2oLsUo6Dstk23wuYBBjmKe8XIqlSApuMrjn3X1SJ2fDhUCX ZFxwzXWBZKuTYR+S28UbGYpgrsE0dGjMTvW0wKT9vjGp X-Google-Smtp-Source: ADFU+vuqJHBhNWwAPylfnMDX2lrJNFS1xOSYhyFPxfEkH4W8rfLEQUJCSKjV201yCYxygKFG+hKvQ0ypLZ24acCeyPc= X-Received: by 2002:aca:c256:: with SMTP id s83mr4524912oif.57.1583386037288; Wed, 04 Mar 2020 21:27:17 -0800 (PST) MIME-Version: 1.0 References: <201904071839.x37IduPO002007@repo.freebsd.org> In-Reply-To: <201904071839.x37IduPO002007@repo.freebsd.org> From: Alan Somers Date: Wed, 4 Mar 2020 22:27:06 -0700 Message-ID: Subject: Re: svn commit: r346018 - head/sys/conf To: Warner Losh Cc: src-committers , svn-src-all , svn-src-head X-Rspamd-Queue-Id: 48XzlW5fcmz41yZ X-Spamd-Bar: --- Authentication-Results: mx1.freebsd.org; dkim=none; dmarc=none; spf=pass (mx1.freebsd.org: domain of asomers@gmail.com designates 209.85.167.181 as permitted sender) smtp.mailfrom=asomers@gmail.com X-Spamd-Result: default: False [-3.04 / 15.00]; ARC_NA(0.00)[]; NEURAL_HAM_MEDIUM(-1.00)[-1.000,0]; RCVD_TLS_ALL(0.00)[]; FROM_HAS_DN(0.00)[]; RCPT_COUNT_THREE(0.00)[4]; R_SPF_ALLOW(-0.20)[+ip4:209.85.128.0/17:c]; TO_MATCH_ENVRCPT_ALL(0.00)[]; MIME_GOOD(-0.10)[multipart/alternative,text/plain]; DMARC_NA(0.00)[freebsd.org]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; IP_SCORE(-1.04)[ip: (-0.51), ipnet: 209.85.128.0/17(-2.98), asn: 15169(-1.66), country: US(-0.05)]; TO_DN_ALL(0.00)[]; RCVD_IN_DNSWL_NONE(0.00)[181.167.85.209.list.dnswl.org : 127.0.5.0]; FORGED_SENDER(0.30)[asomers@freebsd.org,asomers@gmail.com]; RWL_MAILSPIKE_POSSIBLE(0.00)[181.167.85.209.rep.mailspike.net : 127.0.0.17]; MIME_TRACE(0.00)[0:+,1:+,2:~]; 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)[asomers@freebsd.org,asomers@gmail.com]; 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: Thu, 05 Mar 2020 05:27:22 -0000 On Sun, Apr 7, 2019 at 12:40 PM Warner Losh wrote: > Author: imp > Date: Sun Apr 7 18:39:55 2019 > New Revision: 346018 > URL: https://svnweb.freebsd.org/changeset/base/346018 > > Log: > Use default shell assignment rather more complicated if then > construct. > > Discussed with: emaste@, allanjude@ (changes (or not) based on their > feedback) > Differential Revision: https://reviews.freebsd.org/D19797 > Can we MFC this to stable/12? Before this change, setting BRANCH_OVERRIDE during "make release" would have no effect. From owner-svn-src-all@freebsd.org Thu Mar 5 06:19:22 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 6808725E8A6; Thu, 5 Mar 2020 06:19:22 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.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 48Y0vZ12j6z4X6h; Thu, 5 Mar 2020 06:19:22 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id D6E432A6C; Thu, 5 Mar 2020 06:19:21 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 0256JLVX053210; Thu, 5 Mar 2020 06:19:21 GMT (envelope-from imp@FreeBSD.org) Received: (from imp@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 0256JLS4053209; Thu, 5 Mar 2020 06:19:21 GMT (envelope-from imp@FreeBSD.org) Message-Id: <202003050619.0256JLS4053209@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: imp set sender to imp@FreeBSD.org using -f From: Warner Losh Date: Thu, 5 Mar 2020 06:19:21 +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: r358661 - stable/12/sys/conf X-SVN-Group: stable-12 X-SVN-Commit-Author: imp X-SVN-Commit-Paths: stable/12/sys/conf X-SVN-Commit-Revision: 358661 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages 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, 05 Mar 2020 06:19:22 -0000 Author: imp Date: Thu Mar 5 06:19:21 2020 New Revision: 358661 URL: https://svnweb.freebsd.org/changeset/base/358661 Log: MFC: r346018 | imp | 2019-04-07 12:39:55 -0600 (Sun, 07 Apr 2019) | 6 lines Use default shell assignment rather more complicated if then construct. Discussed with: emaste@, allanjude@ (changes (or not) based on their feedback) Differential Revision: https://reviews.freebsd.org/D19797 Modified: stable/12/sys/conf/newvers.sh Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/conf/newvers.sh ============================================================================== --- stable/12/sys/conf/newvers.sh Thu Mar 5 00:18:09 2020 (r358660) +++ stable/12/sys/conf/newvers.sh Thu Mar 5 06:19:21 2020 (r358661) @@ -46,10 +46,7 @@ TYPE="FreeBSD" REVISION="12.1" -BRANCH="STABLE" -if [ -n "${BRANCH_OVERRIDE}" ]; then - BRANCH=${BRANCH_OVERRIDE} -fi +BRANCH=${BRANCH_OVERRIDE:-STABLE} RELEASE="${REVISION}-${BRANCH}" VERSION="${TYPE} ${RELEASE}" @@ -80,21 +77,16 @@ if [ -z "${SYSDIR}" ]; then SYSDIR=$(dirname $0)/.. fi -if [ -n "${PARAMFILE}" ]; then - RELDATE=$(awk '/__FreeBSD_version.*propagated to newvers/ {print $3}' \ - ${PARAMFILE}) -else - RELDATE=$(awk '/__FreeBSD_version.*propagated to newvers/ {print $3}' \ - ${SYSDIR}/sys/param.h) -fi +RELDATE=$(awk '/__FreeBSD_version.*propagated to newvers/ {print $3}' \ + ${PARAMFILE:-${SYSDIR}/sys/param.h}) -b=share/examples/etc/bsd-style-copyright if [ -r "${SYSDIR}/../COPYRIGHT" ]; then year=$(sed -Ee '/^Copyright .* The FreeBSD Project/!d;s/^.*1992-([0-9]*) .*$/\1/g' ${SYSDIR}/../COPYRIGHT) else year=$(date +%Y) fi # look for copyright template +b=share/examples/etc/bsd-style-copyright for bsd_copyright in ../$b ../../$b ../../../$b /usr/src/$b /usr/$b do if [ -r "$bsd_copyright" ]; then @@ -123,9 +115,7 @@ COPYRIGHT="$COPYRIGHT # VARS_ONLY means no files should be generated, this is just being # included. -if [ -n "$VARS_ONLY" ]; then - return 0 -fi +[ -n "$VARS_ONLY" ] && return 0 LC_ALL=C; export LC_ALL if [ ! -r version ] From owner-svn-src-all@freebsd.org Thu Mar 5 06:20:18 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id EBC1325E965; Thu, 5 Mar 2020 06:20:18 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.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 48Y0wf4Cq0z4ZGn; Thu, 5 Mar 2020 06:20:18 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 14A7A2A73; Thu, 5 Mar 2020 06:20:18 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 0256KHc8053352; Thu, 5 Mar 2020 06:20:17 GMT (envelope-from imp@FreeBSD.org) Received: (from imp@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 0256KHrR053351; Thu, 5 Mar 2020 06:20:17 GMT (envelope-from imp@FreeBSD.org) Message-Id: <202003050620.0256KHrR053351@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: imp set sender to imp@FreeBSD.org using -f From: Warner Losh Date: Thu, 5 Mar 2020 06:20:17 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r358662 - head/sys/cam X-SVN-Group: head X-SVN-Commit-Author: imp X-SVN-Commit-Paths: head/sys/cam X-SVN-Commit-Revision: 358662 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages 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, 05 Mar 2020 06:20:19 -0000 Author: imp Date: Thu Mar 5 06:20:17 2020 New Revision: 358662 URL: https://svnweb.freebsd.org/changeset/base/358662 Log: xpt_async is submitting a CCB, not finishing it up, so use xpt_action() instead of xpt_done(). Add the missing XPT_ASYNC case to xpt_action_default. xpt_async wants to use the side-effect of the xpt_done() routine to queue this to the camisr thread so it can be done in that context. However, this breaks the symmetry that you create a ccb and call xpt_action() for it to be dispatched. Restore that symmetry by having it go through that path. As far as I can tell, this is the only CCB that we create and call xpt_done() on directly. Modified: head/sys/cam/cam_xpt.c Modified: head/sys/cam/cam_xpt.c ============================================================================== --- head/sys/cam/cam_xpt.c Thu Mar 5 06:19:21 2020 (r358661) +++ head/sys/cam/cam_xpt.c Thu Mar 5 06:20:17 2020 (r358662) @@ -3156,6 +3156,10 @@ call_sim: start_ccb->ccb_h.status = CAM_REQ_CMP; xpt_done(start_ccb); break; + case XPT_ASYNC: + start_ccb->ccb_h.status = CAM_REQ_CMP; + xpt_done(start_ccb); + break; default: case XPT_SDEV_TYPE: case XPT_TERM_IO: @@ -4447,7 +4451,7 @@ xpt_async(u_int32_t async_code, struct cam_path *path, xpt_freeze_devq(path, 1); else xpt_freeze_simq(path->bus->sim, 1); - xpt_done(ccb); + xpt_action(ccb); } static void From owner-svn-src-all@freebsd.org Thu Mar 5 06:21:01 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 6637925E9E7; Thu, 5 Mar 2020 06:21:01 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.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 48Y0xT1hmpz4bsT; Thu, 5 Mar 2020 06:21:01 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 153702A96; Thu, 5 Mar 2020 06:21:01 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 0256L0vE054166; Thu, 5 Mar 2020 06:21:00 GMT (envelope-from imp@FreeBSD.org) Received: (from imp@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 0256L0av054165; Thu, 5 Mar 2020 06:21:00 GMT (envelope-from imp@FreeBSD.org) Message-Id: <202003050621.0256L0av054165@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: imp set sender to imp@FreeBSD.org using -f From: Warner Losh Date: Thu, 5 Mar 2020 06:21:00 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r358663 - head/sys/cam X-SVN-Group: head X-SVN-Commit-Author: imp X-SVN-Commit-Paths: head/sys/cam X-SVN-Commit-Revision: 358663 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages 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, 05 Mar 2020 06:21:01 -0000 Author: imp Date: Thu Mar 5 06:21:00 2020 New Revision: 358663 URL: https://svnweb.freebsd.org/changeset/base/358663 Log: All paths lead to xpt_done, so move it after the switch. Modified: head/sys/cam/cam_xpt.c Modified: head/sys/cam/cam_xpt.c ============================================================================== --- head/sys/cam/cam_xpt.c Thu Mar 5 06:20:17 2020 (r358662) +++ head/sys/cam/cam_xpt.c Thu Mar 5 06:21:00 2020 (r358663) @@ -5326,14 +5326,13 @@ xptaction(struct cam_sim *sim, union ccb *work_ccb) cpi->transport = XPORT_UNSPECIFIED; cpi->transport_version = XPORT_VERSION_UNSPECIFIED; cpi->ccb_h.status = CAM_REQ_CMP; - xpt_done(work_ccb); break; } default: work_ccb->ccb_h.status = CAM_REQ_INVALID; - xpt_done(work_ccb); break; } + xpt_done(work_ccb); } /* From owner-svn-src-all@freebsd.org Thu Mar 5 06:22:25 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 2C81A25EC48 for ; Thu, 5 Mar 2020 06:22:25 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: from mail-qv1-xf2a.google.com (mail-qv1-xf2a.google.com [IPv6:2607:f8b0:4864:20::f2a]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1O1" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 48Y0z30Xsjz4g1B for ; Thu, 5 Mar 2020 06:22:22 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: by mail-qv1-xf2a.google.com with SMTP id u10so1957873qvi.2 for ; Wed, 04 Mar 2020 22:22:22 -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=prz+FsTWzjW2Rgv/cVl0SSuw13Q6XGThwggNKEcv9Jw=; b=gqPpHjtoL3SmvNHQeVWd6dbeFx5/Rdf/5UkbMLO7dgAd8YTfuBSNf+gKJm3/327vuq 3EOwqOsSFw2aNhWSepHvcyYffY2BWoNcxZ4uFM/NiC3iQrSDrdvTQyItut5+sGiJ4psP tGh1uLkFOp78it8RpS46p0HK8/jJAAHV1RP+OdZtCOZXVIFX8x87pbSOUJozpeNHCsne oEHHWFTbm+NiTHlidYUBOyvNXZVb8xS5sdSWtQwMytqzVjsNlLuRB5LDlRfSQUkJoOPb OoeGtQAzntnNX8TuYYB0jrqA2Pu9l2gzqrV7cP97A12hwD5i50eHkLkLKwNkJdi2mkfS GebQ== 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=prz+FsTWzjW2Rgv/cVl0SSuw13Q6XGThwggNKEcv9Jw=; b=cmDxgPdhVyD7uSUVRLTmT2k9ALJ5DiC2/a7G2fPkKUDZ+Bs/slaL57OFW3gxl08II/ QYtopnOXp7CwlDRIkhyh4lY+DPPoEr+Yan/TtnWxgB1jiOPESb7HjYbMlYsGN2DfaZFZ P2K9ThQdAy91jzDmZg9BNgwSE5y0X0XRDbWm9KykU5yaqQ4hEsn7BMK7BsJCGB+LFFEN RraCUxF0r3kNuXNhhagGIj611mqXLxHYqAxVbRocGpVazV52+tIf52IjrVxYhSNRbNMd r0timfBIzO1J8bcw6sU64S+OG6nUMF2yZIML3WGsGa6gNk1YFS6Kn2Mdvu8tmJdN2zy/ UclA== X-Gm-Message-State: ANhLgQ2A2OLUSkuIpl8zscE69fmjZxVjTKzEe26ynqLRdodVZE3ZcWrv wcBRHGiiflHMxk+Wvs4wIKXzO/DbgDngbCM/gDglRWxB X-Google-Smtp-Source: ADFU+vtpfob1gM0l8mFuZyBm+/CPVTPPXEVxu2UL3jvYqfn7H4BBXuJKKgyCYBovDADr6DIVwtZ2FkpKOVav6jaYZjs= X-Received: by 2002:a0c:e982:: with SMTP id z2mr5026603qvn.22.1583389340803; Wed, 04 Mar 2020 22:22:20 -0800 (PST) MIME-Version: 1.0 References: <201904071839.x37IduPO002007@repo.freebsd.org> In-Reply-To: From: Warner Losh Date: Wed, 4 Mar 2020 23:22:10 -0700 Message-ID: Subject: Re: svn commit: r346018 - head/sys/conf To: Alan Somers Cc: Warner Losh , src-committers , svn-src-all , svn-src-head X-Rspamd-Queue-Id: 48Y0z30Xsjz4g1B X-Spamd-Bar: --- Authentication-Results: mx1.freebsd.org; dkim=pass header.d=bsdimp-com.20150623.gappssmtp.com header.s=20150623 header.b=gqPpHjto; dmarc=none; spf=none (mx1.freebsd.org: domain of wlosh@bsdimp.com has no SPF policy when checking 2607:f8b0:4864:20::f2a) smtp.mailfrom=wlosh@bsdimp.com X-Spamd-Result: default: False [-3.67 / 15.00]; ARC_NA(0.00)[]; NEURAL_HAM_MEDIUM(-1.00)[-1.000,0]; R_DKIM_ALLOW(-0.20)[bsdimp-com.20150623.gappssmtp.com:s=20150623]; FROM_HAS_DN(0.00)[]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; MIME_GOOD(-0.10)[multipart/alternative,text/plain]; PREVIOUSLY_DELIVERED(0.00)[svn-src-all@freebsd.org]; DMARC_NA(0.00)[bsdimp.com]; RCPT_COUNT_FIVE(0.00)[5]; TO_MATCH_ENVRCPT_SOME(0.00)[]; TO_DN_ALL(0.00)[]; DKIM_TRACE(0.00)[bsdimp-com.20150623.gappssmtp.com:+]; RCVD_IN_DNSWL_NONE(0.00)[a.2.f.0.0.0.0.0.0.0.0.0.0.0.0.0.0.2.0.0.4.6.8.4.0.b.8.f.7.0.6.2.list.dnswl.org : 127.0.5.0]; R_SPF_NA(0.00)[]; FORGED_SENDER(0.30)[imp@bsdimp.com,wlosh@bsdimp.com]; MIME_TRACE(0.00)[0:+,1:+,2:~]; IP_SCORE(-1.67)[ip: (-4.77), ipnet: 2607:f8b0::/32(-1.86), asn: 15169(-1.66), country: US(-0.05)]; ASN(0.00)[asn:15169, ipnet:2607:f8b0::/32, country:US]; FROM_NEQ_ENVFROM(0.00)[imp@bsdimp.com,wlosh@bsdimp.com]; RCVD_TLS_ALL(0.00)[]; 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: Thu, 05 Mar 2020 06:22:25 -0000 On Wed, Mar 4, 2020 at 10:27 PM Alan Somers wrote: > On Sun, Apr 7, 2019 at 12:40 PM Warner Losh wrote: > >> Author: imp >> Date: Sun Apr 7 18:39:55 2019 >> New Revision: 346018 >> URL: https://svnweb.freebsd.org/changeset/base/346018 >> >> Log: >> Use default shell assignment rather more complicated if then >> construct. >> >> Discussed with: emaste@, allanjude@ (changes (or not) based on their >> feedback) >> Differential Revision: https://reviews.freebsd.org/D19797 >> > > Can we MFC this to stable/12? Before this change, setting BRANCH_OVERRIDE > during "make release" would have no effect. > Sure thing. There was a merge conflict, which makes sense, but I think I resolved it correctly. Warner From owner-svn-src-all@freebsd.org Thu Mar 5 06:35:09 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 091CF25F554; Thu, 5 Mar 2020 06:35:09 +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 48Y1Fm50jmz4Ff5; Thu, 5 Mar 2020 06:35:08 +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 311682E56; Thu, 5 Mar 2020 06:35:08 +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 0256Z8q8064901; Thu, 5 Mar 2020 06:35:08 GMT (envelope-from cy@FreeBSD.org) Received: (from cy@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 0256Z779064895; Thu, 5 Mar 2020 06:35:07 GMT (envelope-from cy@FreeBSD.org) Message-Id: <202003050635.0256Z779064895@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: cy set sender to cy@FreeBSD.org using -f From: Cy Schubert Date: Thu, 5 Mar 2020 06:35: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: r358664 - in stable: 11/sys/contrib/ipfilter/netinet 12/sys/contrib/ipfilter/netinet X-SVN-Group: stable-12 X-SVN-Commit-Author: cy X-SVN-Commit-Paths: in stable: 11/sys/contrib/ipfilter/netinet 12/sys/contrib/ipfilter/netinet X-SVN-Commit-Revision: 358664 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages 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, 05 Mar 2020 06:35:09 -0000 Author: cy Date: Thu Mar 5 06:35:05 2020 New Revision: 358664 URL: https://svnweb.freebsd.org/changeset/base/358664 Log: MFC r358558: Continuing the effort started in r343701, #ifdef cleanup, checking for __FreeBSD_version > 3.0 and 5.0 is redundant. Modified: stable/12/sys/contrib/ipfilter/netinet/ip_compat.h stable/12/sys/contrib/ipfilter/netinet/ip_fil.h stable/12/sys/contrib/ipfilter/netinet/ip_proxy.c stable/12/sys/contrib/ipfilter/netinet/ip_state.c stable/12/sys/contrib/ipfilter/netinet/ip_sync.c Directory Properties: stable/12/ (props changed) Changes in other areas also in this revision: Modified: stable/11/sys/contrib/ipfilter/netinet/ip_compat.h stable/11/sys/contrib/ipfilter/netinet/ip_fil.h stable/11/sys/contrib/ipfilter/netinet/ip_proxy.c stable/11/sys/contrib/ipfilter/netinet/ip_state.c stable/11/sys/contrib/ipfilter/netinet/ip_sync.c Directory Properties: stable/11/ (props changed) Modified: stable/12/sys/contrib/ipfilter/netinet/ip_compat.h ============================================================================== --- stable/12/sys/contrib/ipfilter/netinet/ip_compat.h Thu Mar 5 06:21:00 2020 (r358663) +++ stable/12/sys/contrib/ipfilter/netinet/ip_compat.h Thu Mar 5 06:35:05 2020 (r358664) @@ -126,7 +126,7 @@ * There may be other, safe, kernels but this is not extensively tested yet. */ # define HAVE_M_PULLDOWN -# if !defined(IPFILTER_LKM) && (__FreeBSD_version >= 300000) +# if !defined(IPFILTER_LKM) && defined(__FreeBSD_version) # include "opt_ipfilter.h" # endif # define COPYIN(a,b,c) copyin((caddr_t)(a), (caddr_t)(b), (c)) Modified: stable/12/sys/contrib/ipfilter/netinet/ip_fil.h ============================================================================== --- stable/12/sys/contrib/ipfilter/netinet/ip_fil.h Thu Mar 5 06:21:00 2020 (r358663) +++ stable/12/sys/contrib/ipfilter/netinet/ip_fil.h Thu Mar 5 06:35:05 2020 (r358664) @@ -1420,8 +1420,7 @@ typedef struct ipftune { ** HPUX Port */ -#if !defined(CDEV_MAJOR) && defined (__FreeBSD_version) && \ - (__FreeBSD_version >= 220000) +#if !defined(CDEV_MAJOR) && defined (__FreeBSD_version) # define CDEV_MAJOR 79 #endif Modified: stable/12/sys/contrib/ipfilter/netinet/ip_proxy.c ============================================================================== --- stable/12/sys/contrib/ipfilter/netinet/ip_proxy.c Thu Mar 5 06:21:00 2020 (r358663) +++ stable/12/sys/contrib/ipfilter/netinet/ip_proxy.c Thu Mar 5 06:35:05 2020 (r358664) @@ -51,7 +51,7 @@ # include # include #endif -#if __FreeBSD_version >= 300000 +#ifdef __FreeBSD_version # include #endif #include Modified: stable/12/sys/contrib/ipfilter/netinet/ip_state.c ============================================================================== --- stable/12/sys/contrib/ipfilter/netinet/ip_state.c Thu Mar 5 06:21:00 2020 (r358663) +++ stable/12/sys/contrib/ipfilter/netinet/ip_state.c Thu Mar 5 06:35:05 2020 (r358664) @@ -82,7 +82,7 @@ #ifdef USE_INET6 #include #endif -#if FREEBSD_GE_REV(300000) +#ifdef __FreeBSD_version # include # if defined(_KERNEL) && !defined(IPFILTER_LKM) # include @@ -307,7 +307,7 @@ ipf_state_seed_alloc(u_int state_size, u_int state_max /* * XXX - ipf_state_seed[X] should be a random number of sorts. */ -#if FREEBSD_GE_REV(400000) +#ifdef __FreeBSD_version state_seed[i] = arc4random(); #else state_seed[i] = ((u_long)state_seed + i) * state_size; Modified: stable/12/sys/contrib/ipfilter/netinet/ip_sync.c ============================================================================== --- stable/12/sys/contrib/ipfilter/netinet/ip_sync.c Thu Mar 5 06:21:00 2020 (r358663) +++ stable/12/sys/contrib/ipfilter/netinet/ip_sync.c Thu Mar 5 06:35:05 2020 (r358664) @@ -30,7 +30,7 @@ # include # endif # include -# if __FreeBSD_version >= 500000 +# ifdef __FreeBSD_version # include # endif #endif From owner-svn-src-all@freebsd.org Thu Mar 5 06:35:07 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 7853C25F52B; Thu, 5 Mar 2020 06:35:07 +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 48Y1Fl1lCDz4Fbg; Thu, 5 Mar 2020 06:35:07 +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 114522E55; Thu, 5 Mar 2020 06:35:07 +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 0256Z6LK064890; Thu, 5 Mar 2020 06:35:06 GMT (envelope-from cy@FreeBSD.org) Received: (from cy@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 0256Z5gW064885; Thu, 5 Mar 2020 06:35:05 GMT (envelope-from cy@FreeBSD.org) Message-Id: <202003050635.0256Z5gW064885@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: cy set sender to cy@FreeBSD.org using -f From: Cy Schubert Date: Thu, 5 Mar 2020 06:35:05 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r358664 - in stable: 11/sys/contrib/ipfilter/netinet 12/sys/contrib/ipfilter/netinet X-SVN-Group: stable-11 X-SVN-Commit-Author: cy X-SVN-Commit-Paths: in stable: 11/sys/contrib/ipfilter/netinet 12/sys/contrib/ipfilter/netinet X-SVN-Commit-Revision: 358664 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages 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, 05 Mar 2020 06:35:07 -0000 Author: cy Date: Thu Mar 5 06:35:05 2020 New Revision: 358664 URL: https://svnweb.freebsd.org/changeset/base/358664 Log: MFC r358558: Continuing the effort started in r343701, #ifdef cleanup, checking for __FreeBSD_version > 3.0 and 5.0 is redundant. Modified: stable/11/sys/contrib/ipfilter/netinet/ip_compat.h stable/11/sys/contrib/ipfilter/netinet/ip_fil.h stable/11/sys/contrib/ipfilter/netinet/ip_proxy.c stable/11/sys/contrib/ipfilter/netinet/ip_state.c stable/11/sys/contrib/ipfilter/netinet/ip_sync.c Directory Properties: stable/11/ (props changed) Changes in other areas also in this revision: Modified: stable/12/sys/contrib/ipfilter/netinet/ip_compat.h stable/12/sys/contrib/ipfilter/netinet/ip_fil.h stable/12/sys/contrib/ipfilter/netinet/ip_proxy.c stable/12/sys/contrib/ipfilter/netinet/ip_state.c stable/12/sys/contrib/ipfilter/netinet/ip_sync.c Directory Properties: stable/12/ (props changed) Modified: stable/11/sys/contrib/ipfilter/netinet/ip_compat.h ============================================================================== --- stable/11/sys/contrib/ipfilter/netinet/ip_compat.h Thu Mar 5 06:21:00 2020 (r358663) +++ stable/11/sys/contrib/ipfilter/netinet/ip_compat.h Thu Mar 5 06:35:05 2020 (r358664) @@ -126,7 +126,7 @@ * There may be other, safe, kernels but this is not extensively tested yet. */ # define HAVE_M_PULLDOWN -# if !defined(IPFILTER_LKM) && (__FreeBSD_version >= 300000) +# if !defined(IPFILTER_LKM) && defined(__FreeBSD_version) # include "opt_ipfilter.h" # endif # define COPYIN(a,b,c) copyin((caddr_t)(a), (caddr_t)(b), (c)) Modified: stable/11/sys/contrib/ipfilter/netinet/ip_fil.h ============================================================================== --- stable/11/sys/contrib/ipfilter/netinet/ip_fil.h Thu Mar 5 06:21:00 2020 (r358663) +++ stable/11/sys/contrib/ipfilter/netinet/ip_fil.h Thu Mar 5 06:35:05 2020 (r358664) @@ -1420,8 +1420,7 @@ typedef struct ipftune { ** HPUX Port */ -#if !defined(CDEV_MAJOR) && defined (__FreeBSD_version) && \ - (__FreeBSD_version >= 220000) +#if !defined(CDEV_MAJOR) && defined (__FreeBSD_version) # define CDEV_MAJOR 79 #endif Modified: stable/11/sys/contrib/ipfilter/netinet/ip_proxy.c ============================================================================== --- stable/11/sys/contrib/ipfilter/netinet/ip_proxy.c Thu Mar 5 06:21:00 2020 (r358663) +++ stable/11/sys/contrib/ipfilter/netinet/ip_proxy.c Thu Mar 5 06:35:05 2020 (r358664) @@ -51,7 +51,7 @@ # include # include #endif -#if __FreeBSD_version >= 300000 +#ifdef __FreeBSD_version # include #endif #include Modified: stable/11/sys/contrib/ipfilter/netinet/ip_state.c ============================================================================== --- stable/11/sys/contrib/ipfilter/netinet/ip_state.c Thu Mar 5 06:21:00 2020 (r358663) +++ stable/11/sys/contrib/ipfilter/netinet/ip_state.c Thu Mar 5 06:35:05 2020 (r358664) @@ -82,7 +82,7 @@ #ifdef USE_INET6 #include #endif -#if FREEBSD_GE_REV(300000) +#ifdef __FreeBSD_version # include # if defined(_KERNEL) && !defined(IPFILTER_LKM) # include @@ -307,7 +307,7 @@ ipf_state_seed_alloc(u_int state_size, u_int state_max /* * XXX - ipf_state_seed[X] should be a random number of sorts. */ -#if FREEBSD_GE_REV(400000) +#ifdef __FreeBSD_version state_seed[i] = arc4random(); #else state_seed[i] = ((u_long)state_seed + i) * state_size; Modified: stable/11/sys/contrib/ipfilter/netinet/ip_sync.c ============================================================================== --- stable/11/sys/contrib/ipfilter/netinet/ip_sync.c Thu Mar 5 06:21:00 2020 (r358663) +++ stable/11/sys/contrib/ipfilter/netinet/ip_sync.c Thu Mar 5 06:35:05 2020 (r358664) @@ -30,7 +30,7 @@ # include # endif # include -# if __FreeBSD_version >= 500000 +# ifdef __FreeBSD_version # include # endif #endif From owner-svn-src-all@freebsd.org Thu Mar 5 06:36:24 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 626F025F68B; Thu, 5 Mar 2020 06:36:24 +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 48Y1HD0xbCz4J5H; Thu, 5 Mar 2020 06:36:24 +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 E89F02E58; Thu, 5 Mar 2020 06:36:23 +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 0256aNVP065003; Thu, 5 Mar 2020 06:36:23 GMT (envelope-from cy@FreeBSD.org) Received: (from cy@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 0256aNJP065002; Thu, 5 Mar 2020 06:36:23 GMT (envelope-from cy@FreeBSD.org) Message-Id: <202003050636.0256aNJP065002@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: cy set sender to cy@FreeBSD.org using -f From: Cy Schubert Date: Thu, 5 Mar 2020 06:36: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: r358665 - in stable: 11/sys/contrib/ipfilter/netinet 12/sys/contrib/ipfilter/netinet X-SVN-Group: stable-11 X-SVN-Commit-Author: cy X-SVN-Commit-Paths: in stable: 11/sys/contrib/ipfilter/netinet 12/sys/contrib/ipfilter/netinet X-SVN-Commit-Revision: 358665 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages 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, 05 Mar 2020 06:36:24 -0000 Author: cy Date: Thu Mar 5 06:36:23 2020 New Revision: 358665 URL: https://svnweb.freebsd.org/changeset/base/358665 Log: MFC r358559: Remove the now unused FREEBSD_GE_REV, FREEBSD_GT_REV, and FREEBSD_LT_REV macros. Modified: stable/11/sys/contrib/ipfilter/netinet/ip_compat.h Directory Properties: stable/11/ (props changed) Changes in other areas also in this revision: Modified: stable/12/sys/contrib/ipfilter/netinet/ip_compat.h Directory Properties: stable/12/ (props changed) Modified: stable/11/sys/contrib/ipfilter/netinet/ip_compat.h ============================================================================== --- stable/11/sys/contrib/ipfilter/netinet/ip_compat.h Thu Mar 5 06:35:05 2020 (r358664) +++ stable/11/sys/contrib/ipfilter/netinet/ip_compat.h Thu Mar 5 06:36:23 2020 (r358665) @@ -89,12 +89,6 @@ (__NetBSD_Version__ > (x))) #define NETBSD_LT_REV(x) (defined(__NetBSD_Version__) && \ (__NetBSD_Version__ < (x))) -#define FREEBSD_GE_REV(x) (defined(__FreeBSD_version) && \ - (__FreeBSD_version >= (x))) -#define FREEBSD_GT_REV(x) (defined(__FreeBSD_version) && \ - (__FreeBSD_version > (x))) -#define FREEBSD_LT_REV(x) (defined(__FreeBSD_version) && \ - (__FreeBSD_version < (x))) #define BSD_GE_YEAR(x) (defined(BSD) && (BSD >= (x))) #define BSD_GT_YEAR(x) (defined(BSD) && (BSD > (x))) #define BSD_LT_YEAR(x) (defined(BSD) && (BSD < (x))) From owner-svn-src-all@freebsd.org Thu Mar 5 06:36:25 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 49CBB25F69D; Thu, 5 Mar 2020 06:36:25 +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 48Y1HD5Vbqz4J63; Thu, 5 Mar 2020 06:36:24 +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 516182E59; Thu, 5 Mar 2020 06:36:24 +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 0256aO50065009; Thu, 5 Mar 2020 06:36:24 GMT (envelope-from cy@FreeBSD.org) Received: (from cy@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 0256aOYc065008; Thu, 5 Mar 2020 06:36:24 GMT (envelope-from cy@FreeBSD.org) Message-Id: <202003050636.0256aOYc065008@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: cy set sender to cy@FreeBSD.org using -f From: Cy Schubert Date: Thu, 5 Mar 2020 06:36: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: r358665 - in stable: 11/sys/contrib/ipfilter/netinet 12/sys/contrib/ipfilter/netinet X-SVN-Group: stable-12 X-SVN-Commit-Author: cy X-SVN-Commit-Paths: in stable: 11/sys/contrib/ipfilter/netinet 12/sys/contrib/ipfilter/netinet X-SVN-Commit-Revision: 358665 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages 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, 05 Mar 2020 06:36:25 -0000 Author: cy Date: Thu Mar 5 06:36:23 2020 New Revision: 358665 URL: https://svnweb.freebsd.org/changeset/base/358665 Log: MFC r358559: Remove the now unused FREEBSD_GE_REV, FREEBSD_GT_REV, and FREEBSD_LT_REV macros. Modified: stable/12/sys/contrib/ipfilter/netinet/ip_compat.h Directory Properties: stable/12/ (props changed) Changes in other areas also in this revision: Modified: stable/11/sys/contrib/ipfilter/netinet/ip_compat.h Directory Properties: stable/11/ (props changed) Modified: stable/12/sys/contrib/ipfilter/netinet/ip_compat.h ============================================================================== --- stable/12/sys/contrib/ipfilter/netinet/ip_compat.h Thu Mar 5 06:35:05 2020 (r358664) +++ stable/12/sys/contrib/ipfilter/netinet/ip_compat.h Thu Mar 5 06:36:23 2020 (r358665) @@ -89,12 +89,6 @@ (__NetBSD_Version__ > (x))) #define NETBSD_LT_REV(x) (defined(__NetBSD_Version__) && \ (__NetBSD_Version__ < (x))) -#define FREEBSD_GE_REV(x) (defined(__FreeBSD_version) && \ - (__FreeBSD_version >= (x))) -#define FREEBSD_GT_REV(x) (defined(__FreeBSD_version) && \ - (__FreeBSD_version > (x))) -#define FREEBSD_LT_REV(x) (defined(__FreeBSD_version) && \ - (__FreeBSD_version < (x))) #define BSD_GE_YEAR(x) (defined(BSD) && (BSD >= (x))) #define BSD_GT_YEAR(x) (defined(BSD) && (BSD > (x))) #define BSD_LT_YEAR(x) (defined(BSD) && (BSD < (x))) From owner-svn-src-all@freebsd.org Thu Mar 5 06:38:06 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 2E95525F83C; Thu, 5 Mar 2020 06:38:06 +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 48Y1K93LSbz4LJw; Thu, 5 Mar 2020 06:38:05 +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 83EE12E5D; Thu, 5 Mar 2020 06:38:04 +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 0256c4Ox065130; Thu, 5 Mar 2020 06:38:04 GMT (envelope-from cy@FreeBSD.org) Received: (from cy@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 0256c4F5065128; Thu, 5 Mar 2020 06:38:04 GMT (envelope-from cy@FreeBSD.org) Message-Id: <202003050638.0256c4F5065128@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: cy set sender to cy@FreeBSD.org using -f From: Cy Schubert Date: Thu, 5 Mar 2020 06:38: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: r358666 - in stable: 11/sys/contrib/ipfilter/netinet 12/sys/contrib/ipfilter/netinet X-SVN-Group: stable-11 X-SVN-Commit-Author: cy X-SVN-Commit-Paths: in stable: 11/sys/contrib/ipfilter/netinet 12/sys/contrib/ipfilter/netinet X-SVN-Commit-Revision: 358666 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages 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, 05 Mar 2020 06:38:06 -0000 Author: cy Date: Thu Mar 5 06:38:03 2020 New Revision: 358666 URL: https://svnweb.freebsd.org/changeset/base/358666 Log: MFC r358560: Retire macros: BSD_GE_YEAR BSD_GT_YEAR BSD_LT_YEAR Modified: stable/11/sys/contrib/ipfilter/netinet/ip_compat.h stable/11/sys/contrib/ipfilter/netinet/ip_nat.c stable/11/sys/contrib/ipfilter/netinet/ip_sync.c Directory Properties: stable/11/ (props changed) Changes in other areas also in this revision: Modified: stable/12/sys/contrib/ipfilter/netinet/ip_compat.h stable/12/sys/contrib/ipfilter/netinet/ip_nat.c stable/12/sys/contrib/ipfilter/netinet/ip_sync.c Directory Properties: stable/12/ (props changed) Modified: stable/11/sys/contrib/ipfilter/netinet/ip_compat.h ============================================================================== --- stable/11/sys/contrib/ipfilter/netinet/ip_compat.h Thu Mar 5 06:36:23 2020 (r358665) +++ stable/11/sys/contrib/ipfilter/netinet/ip_compat.h Thu Mar 5 06:38:03 2020 (r358666) @@ -89,9 +89,6 @@ (__NetBSD_Version__ > (x))) #define NETBSD_LT_REV(x) (defined(__NetBSD_Version__) && \ (__NetBSD_Version__ < (x))) -#define BSD_GE_YEAR(x) (defined(BSD) && (BSD >= (x))) -#define BSD_GT_YEAR(x) (defined(BSD) && (BSD > (x))) -#define BSD_LT_YEAR(x) (defined(BSD) && (BSD < (x))) /* ----------------------------------------------------------------------- */ @@ -438,7 +435,7 @@ extern mb_t *allocmbt(size_t); * On BSD's use quad_t as a guarantee for getting at least a 64bit sized * object. */ -#if !defined(__amd64__) && BSD_GT_YEAR(199306) +#if !defined(__amd64__) && !SOLARIS # define USE_QUAD_T # define U_QUAD_T unsigned long long # define QUAD_T long long @@ -732,7 +729,7 @@ typedef struct tcpiphdr tcpiphdr_t; #define TCPF_ALL (TH_FIN|TH_SYN|TH_RST|TH_PUSH|TH_ACK|TH_URG|\ TH_ECN|TH_CWR) -#if BSD_GE_YEAR(199306) && !defined(m_act) +#if !SOLARIS && !defined(m_act) # define m_act m_nextpkt #endif Modified: stable/11/sys/contrib/ipfilter/netinet/ip_nat.c ============================================================================== --- stable/11/sys/contrib/ipfilter/netinet/ip_nat.c Thu Mar 5 06:36:23 2020 (r358665) +++ stable/11/sys/contrib/ipfilter/netinet/ip_nat.c Thu Mar 5 06:38:03 2020 (r358666) @@ -1010,7 +1010,7 @@ ipf_nat_ioctl(softc, data, cmd, mode, uid, ctx) ipnat_t natd; SPL_INT(s); -#if BSD_GE_YEAR(199306) && defined(_KERNEL) +#if !SOLARIS && defined(_KERNEL) # if NETBSD_GE_REV(399002000) if ((mode & FWRITE) && kauth_authorize_network(curlwp->l_cred, KAUTH_NETWORK_FIREWALL, Modified: stable/11/sys/contrib/ipfilter/netinet/ip_sync.c ============================================================================== --- stable/11/sys/contrib/ipfilter/netinet/ip_sync.c Thu Mar 5 06:36:23 2020 (r358665) +++ stable/11/sys/contrib/ipfilter/netinet/ip_sync.c Thu Mar 5 06:38:03 2020 (r358666) @@ -437,7 +437,7 @@ ipf_sync_write(softc, uio) int err = 0; -# if BSD_GE_YEAR(199306) || defined(__FreeBSD__) +# if defined(__NetBSD__) || defined(__FreeBSD__) uio->uio_rw = UIO_WRITE; # endif @@ -585,7 +585,7 @@ ipf_sync_read(softc, uio) return EINVAL; } -# if BSD_GE_YEAR(199306) || defined(__FreeBSD__) +# if defined(__NetBSD__) || defined(__FreeBSD__) uio->uio_rw = UIO_READ; # endif From owner-svn-src-all@freebsd.org Thu Mar 5 06:38:06 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 499A225F83D; Thu, 5 Mar 2020 06:38:06 +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 48Y1K95tCvz4LKQ; Thu, 5 Mar 2020 06:38:05 +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 5FC992E5E; Thu, 5 Mar 2020 06:38:05 +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 0256c5As065138; Thu, 5 Mar 2020 06:38:05 GMT (envelope-from cy@FreeBSD.org) Received: (from cy@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 0256c4jV065135; Thu, 5 Mar 2020 06:38:04 GMT (envelope-from cy@FreeBSD.org) Message-Id: <202003050638.0256c4jV065135@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: cy set sender to cy@FreeBSD.org using -f From: Cy Schubert Date: Thu, 5 Mar 2020 06:38: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: r358666 - in stable: 11/sys/contrib/ipfilter/netinet 12/sys/contrib/ipfilter/netinet X-SVN-Group: stable-12 X-SVN-Commit-Author: cy X-SVN-Commit-Paths: in stable: 11/sys/contrib/ipfilter/netinet 12/sys/contrib/ipfilter/netinet X-SVN-Commit-Revision: 358666 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages 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, 05 Mar 2020 06:38:06 -0000 Author: cy Date: Thu Mar 5 06:38:03 2020 New Revision: 358666 URL: https://svnweb.freebsd.org/changeset/base/358666 Log: MFC r358560: Retire macros: BSD_GE_YEAR BSD_GT_YEAR BSD_LT_YEAR Modified: stable/12/sys/contrib/ipfilter/netinet/ip_compat.h stable/12/sys/contrib/ipfilter/netinet/ip_nat.c stable/12/sys/contrib/ipfilter/netinet/ip_sync.c Directory Properties: stable/12/ (props changed) Changes in other areas also in this revision: Modified: stable/11/sys/contrib/ipfilter/netinet/ip_compat.h stable/11/sys/contrib/ipfilter/netinet/ip_nat.c stable/11/sys/contrib/ipfilter/netinet/ip_sync.c Directory Properties: stable/11/ (props changed) Modified: stable/12/sys/contrib/ipfilter/netinet/ip_compat.h ============================================================================== --- stable/12/sys/contrib/ipfilter/netinet/ip_compat.h Thu Mar 5 06:36:23 2020 (r358665) +++ stable/12/sys/contrib/ipfilter/netinet/ip_compat.h Thu Mar 5 06:38:03 2020 (r358666) @@ -89,9 +89,6 @@ (__NetBSD_Version__ > (x))) #define NETBSD_LT_REV(x) (defined(__NetBSD_Version__) && \ (__NetBSD_Version__ < (x))) -#define BSD_GE_YEAR(x) (defined(BSD) && (BSD >= (x))) -#define BSD_GT_YEAR(x) (defined(BSD) && (BSD > (x))) -#define BSD_LT_YEAR(x) (defined(BSD) && (BSD < (x))) /* ----------------------------------------------------------------------- */ @@ -439,7 +436,7 @@ extern mb_t *allocmbt(size_t); * On BSD's use quad_t as a guarantee for getting at least a 64bit sized * object. */ -#if !defined(__amd64__) && BSD_GT_YEAR(199306) +#if !defined(__amd64__) && !SOLARIS # define USE_QUAD_T # define U_QUAD_T unsigned long long # define QUAD_T long long @@ -733,7 +730,7 @@ typedef struct tcpiphdr tcpiphdr_t; #define TCPF_ALL (TH_FIN|TH_SYN|TH_RST|TH_PUSH|TH_ACK|TH_URG|\ TH_ECN|TH_CWR) -#if BSD_GE_YEAR(199306) && !defined(m_act) +#if !SOLARIS && !defined(m_act) # define m_act m_nextpkt #endif Modified: stable/12/sys/contrib/ipfilter/netinet/ip_nat.c ============================================================================== --- stable/12/sys/contrib/ipfilter/netinet/ip_nat.c Thu Mar 5 06:36:23 2020 (r358665) +++ stable/12/sys/contrib/ipfilter/netinet/ip_nat.c Thu Mar 5 06:38:03 2020 (r358666) @@ -1010,7 +1010,7 @@ ipf_nat_ioctl(softc, data, cmd, mode, uid, ctx) ipnat_t natd; SPL_INT(s); -#if BSD_GE_YEAR(199306) && defined(_KERNEL) +#if !SOLARIS && defined(_KERNEL) # if NETBSD_GE_REV(399002000) if ((mode & FWRITE) && kauth_authorize_network(curlwp->l_cred, KAUTH_NETWORK_FIREWALL, Modified: stable/12/sys/contrib/ipfilter/netinet/ip_sync.c ============================================================================== --- stable/12/sys/contrib/ipfilter/netinet/ip_sync.c Thu Mar 5 06:36:23 2020 (r358665) +++ stable/12/sys/contrib/ipfilter/netinet/ip_sync.c Thu Mar 5 06:38:03 2020 (r358666) @@ -437,7 +437,7 @@ ipf_sync_write(softc, uio) int err = 0; -# if BSD_GE_YEAR(199306) || defined(__FreeBSD__) +# if defined(__NetBSD__) || defined(__FreeBSD__) uio->uio_rw = UIO_WRITE; # endif @@ -585,7 +585,7 @@ ipf_sync_read(softc, uio) return EINVAL; } -# if BSD_GE_YEAR(199306) || defined(__FreeBSD__) +# if defined(__NetBSD__) || defined(__FreeBSD__) uio->uio_rw = UIO_READ; # endif From owner-svn-src-all@freebsd.org Thu Mar 5 10:52:18 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 1658A2652F0; Thu, 5 Mar 2020 10:52:18 +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 48Y6yT2gTdz3RD3; Thu, 5 Mar 2020 10:52:17 +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 390CB6050; Thu, 5 Mar 2020 10:52:17 +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 025AqH0N018108; Thu, 5 Mar 2020 10:52:17 GMT (envelope-from andrew@FreeBSD.org) Received: (from andrew@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 025AqHt4018107; Thu, 5 Mar 2020 10:52:17 GMT (envelope-from andrew@FreeBSD.org) Message-Id: <202003051052.025AqHt4018107@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: andrew set sender to andrew@FreeBSD.org using -f From: Andrew Turner Date: Thu, 5 Mar 2020 10:52:17 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r358669 - head/sys/arm64/include X-SVN-Group: head X-SVN-Commit-Author: andrew X-SVN-Commit-Paths: head/sys/arm64/include X-SVN-Commit-Revision: 358669 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages 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, 05 Mar 2020 10:52:18 -0000 Author: andrew Date: Thu Mar 5 10:52:16 2020 New Revision: 358669 URL: https://svnweb.freebsd.org/changeset/base/358669 Log: Mark the arm64 machdep.h as kernel only None of this is useful for userspace. Sponsored by: Innovate UK Modified: head/sys/arm64/include/machdep.h Modified: head/sys/arm64/include/machdep.h ============================================================================== --- head/sys/arm64/include/machdep.h Thu Mar 5 09:20:32 2020 (r358668) +++ head/sys/arm64/include/machdep.h Thu Mar 5 10:52:16 2020 (r358669) @@ -29,6 +29,8 @@ #ifndef _MACHINE_MACHDEP_H_ #define _MACHINE_MACHDEP_H_ +#ifdef _KERNEL + struct arm64_bootparams { vm_offset_t modulep; vm_offset_t kern_l1pt; /* L1 page table for the kernel */ @@ -55,5 +57,7 @@ vm_offset_t parse_boot_param(struct arm64_bootparams * void parse_fdt_bootargs(void); #endif extern void (*pagezero)(void *); + +#endif /* _KERNEL */ #endif /* _MACHINE_MACHDEP_H_ */ From owner-svn-src-all@freebsd.org Thu Mar 5 12:24:49 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 77C52267E1D; Thu, 5 Mar 2020 12:24:49 +0000 (UTC) (envelope-from alfredo@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 48Y91F212Zz40gH; Thu, 5 Mar 2020 12:24:49 +0000 (UTC) (envelope-from alfredo@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id B3F9471DA; Thu, 5 Mar 2020 12:24:48 +0000 (UTC) (envelope-from alfredo@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 025COmDT074870; Thu, 5 Mar 2020 12:24:48 GMT (envelope-from alfredo@FreeBSD.org) Received: (from alfredo@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 025COmDv074869; Thu, 5 Mar 2020 12:24:48 GMT (envelope-from alfredo@FreeBSD.org) Message-Id: <202003051224.025COmDv074869@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: alfredo set sender to alfredo@FreeBSD.org using -f From: "Alfredo Dal'Ava Junior" Date: Thu, 5 Mar 2020 12:24:48 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r358670 - head/sys/powerpc/powerpc X-SVN-Group: head X-SVN-Commit-Author: alfredo X-SVN-Commit-Paths: head/sys/powerpc/powerpc X-SVN-Commit-Revision: 358670 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages 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, 05 Mar 2020 12:24:49 -0000 Author: alfredo Date: Thu Mar 5 12:24:48 2020 New Revision: 358670 URL: https://svnweb.freebsd.org/changeset/base/358670 Log: [PowerPC64] fix uma_small_free panic Fix panic "Freeing UMA block at 0xn with no associated page". Also replaces pmap_remove call by pmap_kremove, for symmetry. Reviewed by: jhibbits Approved by: jhibbits (mentor) Differential Revision: https://reviews.freebsd.org/D23931 Modified: head/sys/powerpc/powerpc/uma_machdep.c Modified: head/sys/powerpc/powerpc/uma_machdep.c ============================================================================== --- head/sys/powerpc/powerpc/uma_machdep.c Thu Mar 5 10:52:16 2020 (r358669) +++ head/sys/powerpc/powerpc/uma_machdep.c Thu Mar 5 12:24:48 2020 (r358670) @@ -95,14 +95,13 @@ uma_small_free(void *mem, vm_size_t size, u_int8_t fla { vm_page_t m; - if (!hw_direct_map) - pmap_remove(kernel_pmap,(vm_offset_t)mem, - (vm_offset_t)mem + PAGE_SIZE); - if (hw_direct_map) m = PHYS_TO_VM_PAGE(DMAP_TO_PHYS((vm_offset_t)mem)); - else - m = PHYS_TO_VM_PAGE((vm_offset_t)mem); + else { + m = PHYS_TO_VM_PAGE(pmap_kextract((vm_offset_t)mem)); + pmap_kremove((vm_offset_t)mem); + } + KASSERT(m != NULL, ("Freeing UMA block at %p with no associated page", mem)); #ifdef __powerpc64__ From owner-svn-src-all@freebsd.org Thu Mar 5 13:15:17 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id E71C2269602; Thu, 5 Mar 2020 13:15:17 +0000 (UTC) (envelope-from ypankov@fastmail.com) Received: from wnew2-smtp.messagingengine.com (wnew2-smtp.messagingengine.com [64.147.123.27]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 48YB7R2jyxz4dXx; Thu, 5 Mar 2020 13:15:15 +0000 (UTC) (envelope-from ypankov@fastmail.com) Received: from compute4.internal (compute4.nyi.internal [10.202.2.44]) by mailnew.west.internal (Postfix) with ESMTP id 73F307BD; Thu, 5 Mar 2020 08:15:13 -0500 (EST) Received: from mailfrontend2 ([10.202.2.163]) by compute4.internal (MEProxy); Thu, 05 Mar 2020 08:15:13 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=fastmail.com; h= subject:to:references:from:message-id:date:mime-version :in-reply-to:content-type:content-transfer-encoding; s=fm2; bh=G 3RLCM3ca/b9Gzw2kTccvTnHdLVIKCm7YZZV/Ezbw0I=; b=xM6fYNga/pGicliWQ 9qMABz0QcmKSrUqH7JuKdC/lIwafGHO8ftXZ+HeKzczN9WP3meK80yzQjJA7xI6A pRunlo3w1CtiRwmLNQk6J7gq6eCagfiH8TQBMwcDFAZVqJZKb5Cy58fR38mbYeS7 QaFtoQWWACfcbLowgRxAjgjQbH3cljq9L0BB64WtqqHjKMQBcq6R5SqTymmOx5Gt 42pnfZYq/dAw2rshP+YYb+OZgVrtLkDFLecoIWYNo8VR9j0LPZQvfYT8zkI0JK+S QAIW+At/4JasUX+bwKo4rNKtuEHBEw5OIeUSaDtOqLY/LhhNc58038VzMlJV3FJQ YQ65g== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=content-transfer-encoding:content-type :date:from:in-reply-to:message-id:mime-version:references :subject:to:x-me-proxy:x-me-proxy:x-me-sender:x-me-sender :x-sasl-enc; s=fm2; bh=G3RLCM3ca/b9Gzw2kTccvTnHdLVIKCm7YZZV/Ezbw 0I=; b=sOrp2tBus6DIT7fbiyQ9Cg4jDoNqa6VnKK8tzn2hu+H1AP2KbPeD3Ahc3 q3jOfuC8VANTi+DeK+ALCStuIYaVdkmf8xMZUx5+YfeXXNJwRdb4Kz5TiJOIyAKZ vYMt4tzAEKy2NvWpTDSK8KJdET6uj5Ji8NZ0BP9yr2F6y0+WTZnsGu5YcjJOVne/ tpMbQBYc3ojZNwAKHxejRGqI4JF5czbEI1zRsky+GtyrW1EUnaLjpqEVVADqL7dH d0c4zlBNOZc3OtWZ0eSrwUCL+JtuC+DF4J3/TgYWSO1OzaRyCZ3YFFIz/H07cm4p wpvosP5PwSdVT9hRrk061jDoMlwfw== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedugedruddutddghedvucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhepuffvfhfhkffffgggjggtgfesthejredttdefjeenucfhrhhomhepjghurhhi ucfrrghnkhhovhcuoeihphgrnhhkohhvsehfrghsthhmrghilhdrtghomheqnecuffhomh grihhnpehfrhgvvggsshgurdhorhhgpdhlihhnuhigrdhmrghpnecukfhppeehrddufeel rdduledtrddukeeinecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmrghilh hfrhhomhephihprghnkhhovhesfhgrshhtmhgrihhlrdgtohhm X-ME-Proxy: Received: from mercury.lan (unknown [5.139.190.186]) by mail.messagingengine.com (Postfix) with ESMTPA id 120DA30612AF; Thu, 5 Mar 2020 08:15:11 -0500 (EST) Subject: Re: svn commit: r358483 - head/sys/compat/linux To: Tijl Coosemans , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org References: <202003011312.021DC4vh022404@repo.freebsd.org> From: Yuri Pankov Message-ID: Date: Thu, 5 Mar 2020 16:15:10 +0300 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:68.0) Gecko/20100101 Thunderbird/68.5.0 MIME-Version: 1.0 In-Reply-To: <202003011312.021DC4vh022404@repo.freebsd.org> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-Rspamd-Queue-Id: 48YB7R2jyxz4dXx X-Spamd-Bar: --- Authentication-Results: mx1.freebsd.org; dkim=pass header.d=fastmail.com header.s=fm2 header.b=xM6fYNga; dkim=pass header.d=messagingengine.com header.s=fm2 header.b=sOrp2tBu; dmarc=pass (policy=none) header.from=fastmail.com; spf=pass (mx1.freebsd.org: domain of ypankov@fastmail.com designates 64.147.123.27 as permitted sender) smtp.mailfrom=ypankov@fastmail.com X-Spamd-Result: default: False [-3.09 / 15.00]; ARC_NA(0.00)[]; RCVD_VIA_SMTP_AUTH(0.00)[]; R_DKIM_ALLOW(-0.20)[fastmail.com:s=fm2,messagingengine.com:s=fm2]; NEURAL_HAM_MEDIUM(-0.99)[-0.991,0]; FROM_HAS_DN(0.00)[]; RCPT_COUNT_THREE(0.00)[4]; R_SPF_ALLOW(-0.20)[+ip4:64.147.123.27]; FREEMAIL_FROM(0.00)[fastmail.com]; MIME_GOOD(-0.10)[text/plain]; MIME_TRACE(0.00)[0:+]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; TO_DN_SOME(0.00)[]; TO_MATCH_ENVRCPT_ALL(0.00)[]; RCVD_COUNT_THREE(0.00)[4]; RCVD_TLS_LAST(0.00)[]; DKIM_TRACE(0.00)[fastmail.com:+,messagingengine.com:+]; DMARC_POLICY_ALLOW(-0.50)[fastmail.com,none]; IP_SCORE(0.00)[ip: (-9.71), ipnet: 64.147.123.0/24(-4.92), asn: 11403(-2.69), country: US(-0.05)]; IP_SCORE_FREEMAIL(0.00)[]; RCVD_IN_DNSWL_LOW(-0.10)[27.123.147.64.list.dnswl.org : 127.0.5.1]; FROM_EQ_ENVFROM(0.00)[]; FREEMAIL_ENVFROM(0.00)[fastmail.com]; ASN(0.00)[asn:11403, ipnet:64.147.123.0/24, country:US]; MID_RHS_MATCH_FROM(0.00)[]; RECEIVED_SPAMHAUS_PBL(0.00)[186.190.139.5.khpj7ygk5idzvmvt5x4ziurxhy.zen.dq.spamhaus.net : 127.0.0.11] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages 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, 05 Mar 2020 13:15:18 -0000 Tijl Coosemans wrote: > Author: tijl > Date: Sun Mar 1 13:12:04 2020 > New Revision: 358483 > URL: https://svnweb.freebsd.org/changeset/base/358483 > > Log: > linuxulator: Map scheduler priorities to Linux priorities. > > On Linux the valid range of priorities for the SCHED_FIFO and SCHED_RR > scheduling policies is [1,99]. For SCHED_OTHER the single valid priority is > 0. On FreeBSD it is [0,31] for all policies. Programs are supposed to > query the valid range using sched_get_priority_(min|max), but of course some > programs assume the Linux values are valid. > > This commit adds a tunable compat.linux.map_sched_prio. When enabled > sched_get_priority_(min|max) return the Linux values and sched_setscheduler > and sched_(get|set)param translate between FreeBSD and Linux values. > > Because there are more Linux levels than FreeBSD levels, multiple Linux > levels map to a single FreeBSD level, which means pre-emption might not > happen as it does on Linux, so the tunable allows to disable this behaviour. > It is enabled by default because I think it is unlikely that anyone runs > real-time software under Linux emulation on FreeBSD that critically relies > on correct pre-emption. > > This fixes FMOD, a commercial sound library used by several games. > > PR: 240043 > Tested by: Alex S > Reviewed by: dchagin > MFC after: 2 weeks > Differential Revision: https://reviews.freebsd.org/D23790 > > Modified: > head/sys/compat/linux/linux_misc.c > head/sys/compat/linux/linux_misc.h > > Modified: head/sys/compat/linux/linux_misc.c > ============================================================================== > --- head/sys/compat/linux/linux_misc.c Sun Mar 1 12:34:27 2020 (r358482) > +++ head/sys/compat/linux/linux_misc.c Sun Mar 1 13:12:04 2020 (r358483) > @@ -144,6 +144,11 @@ struct l_pselect6arg { > l_size_t ss_len; > }; > > +static bool map_sched_prio = true; > +SYSCTL_BOOL(_compat_linux, OID_AUTO, map_sched_prio, CTLFLAG_RDTUN, > + &map_sched_prio, 0, "Map scheduler priorities to Linux priorities " > + "(not POSIX compliant)"); I'm seeing the following in the log: sysctl_warn_reuse: can't re-use a leaf (compat.linux.map_sched_prio)! Should this be done for both linux and linux32 (when one exists) or made to install one time only? From owner-svn-src-all@freebsd.org Thu Mar 5 14:05:23 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 46E2226A9BA; Thu, 5 Mar 2020 14:05:23 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.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 48YCFH12S6z4B6C; Thu, 5 Mar 2020 14:05:23 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 1E99E8489; Thu, 5 Mar 2020 14:05:23 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 025E5NPi034712; Thu, 5 Mar 2020 14:05:23 GMT (envelope-from imp@FreeBSD.org) Received: (from imp@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 025E5M0B034711; Thu, 5 Mar 2020 14:05:23 GMT (envelope-from imp@FreeBSD.org) Message-Id: <202003051405.025E5M0B034711@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: imp set sender to imp@FreeBSD.org using -f From: Warner Losh Date: Thu, 5 Mar 2020 14:05:22 +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: r358671 - stable/12/sys/conf X-SVN-Group: stable-12 X-SVN-Commit-Author: imp X-SVN-Commit-Paths: stable/12/sys/conf X-SVN-Commit-Revision: 358671 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages 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, 05 Mar 2020 14:05:23 -0000 Author: imp Date: Thu Mar 5 14:05:22 2020 New Revision: 358671 URL: https://svnweb.freebsd.org/changeset/base/358671 Log: MFC r346022: r346022 | imp | 2019-04-07 15:01:02 -0600 (Sun, 07 Apr 2019) | 23 lines Make RELDATE be on a single line. All variable assignments that start in column 1 have to be on a single line for amd to build due to as weird dependency there (most likely it can be fixed to use the new VARS_ONLY feature, but it isn't today). usr.sbin/amd/include/Makefile calls usr.sbin/amd/include/newvers.sh which does: eval `LC_ALL=C egrep '^[A-Z]+=' $1 | grep -v COPYRIGHT` which is where that requirement comes from. It handles COPYRIGHT since that's an exception. Rather than add additional exceptions, cope with the long line in newvers.sh instead. Note: it no longer needs to filter COPYRIGHT because the assignment doesn't start in column 1 anymore. I had done a universe when I had an earlier version of r346018 that had it as one line. When I changed it to multi-line as suggested in the review, I only built kernels on a couple of architectures to make sure it didn't break anything. Add comment to newvers.sh noting this. Obviously, this unbreaks the amd build. Modified: stable/12/sys/conf/newvers.sh Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/conf/newvers.sh ============================================================================== --- stable/12/sys/conf/newvers.sh Thu Mar 5 12:24:48 2020 (r358670) +++ stable/12/sys/conf/newvers.sh Thu Mar 5 14:05:22 2020 (r358671) @@ -44,6 +44,9 @@ # checkout from a version control system. Metadata is # included if the tree is modified. +# Note: usr.sbin/amd/include/newvers.sh assumes all variable assignments of +# upper case variables starting in column 1 are on one line w/o continuation. + TYPE="FreeBSD" REVISION="12.1" BRANCH=${BRANCH_OVERRIDE:-STABLE} @@ -77,8 +80,7 @@ if [ -z "${SYSDIR}" ]; then SYSDIR=$(dirname $0)/.. fi -RELDATE=$(awk '/__FreeBSD_version.*propagated to newvers/ {print $3}' \ - ${PARAMFILE:-${SYSDIR}/sys/param.h}) +RELDATE=$(awk '/__FreeBSD_version.*propagated to newvers/ {print $3}' ${PARAMFILE:-${SYSDIR}/sys/param.h}) if [ -r "${SYSDIR}/../COPYRIGHT" ]; then year=$(sed -Ee '/^Copyright .* The FreeBSD Project/!d;s/^.*1992-([0-9]*) .*$/\1/g' ${SYSDIR}/../COPYRIGHT) From owner-svn-src-all@freebsd.org Thu Mar 5 14:13:22 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id E3E0526AC4E; Thu, 5 Mar 2020 14:13:22 +0000 (UTC) (envelope-from alfredo@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 48YCQV4GhCz4TbX; Thu, 5 Mar 2020 14:13:22 +0000 (UTC) (envelope-from alfredo@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 826658659; Thu, 5 Mar 2020 14:13:22 +0000 (UTC) (envelope-from alfredo@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 025EDMjm040458; Thu, 5 Mar 2020 14:13:22 GMT (envelope-from alfredo@FreeBSD.org) Received: (from alfredo@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 025EDMC9040457; Thu, 5 Mar 2020 14:13:22 GMT (envelope-from alfredo@FreeBSD.org) Message-Id: <202003051413.025EDMC9040457@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: alfredo set sender to alfredo@FreeBSD.org using -f From: "Alfredo Dal'Ava Junior" Date: Thu, 5 Mar 2020 14:13:22 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r358672 - head/lib/libc/powerpc64/string X-SVN-Group: head X-SVN-Commit-Author: alfredo X-SVN-Commit-Paths: head/lib/libc/powerpc64/string X-SVN-Commit-Revision: 358672 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages 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, 05 Mar 2020 14:13:23 -0000 Author: alfredo Date: Thu Mar 5 14:13:22 2020 New Revision: 358672 URL: https://svnweb.freebsd.org/changeset/base/358672 Log: [PowerPC64] restrict memcpy/bcopy optimization to POWER ISA >=V2.07 VSX instructions were added in POWER ISA V2.06 (POWER7), but it requires data to be word-aligned. Such requirement was removed in ISA V2.07B (POWER8). Since current memcpy/bcopy optimization relies on VSX instructions handling misalignment transparently, and kernel doesn't currently implement an alignment error handler, this optimzation should be restrict to ISA V2.07 onwards. SIGBUS on stxvd2x instruction was reproduced in POWER7+ CPU. Reviewed by: luporl, jhibbits, bdragon Approved by: jhibbits (mentor) Differential Revision: https://reviews.freebsd.org/D23958 Modified: head/lib/libc/powerpc64/string/bcopy_resolver.c Modified: head/lib/libc/powerpc64/string/bcopy_resolver.c ============================================================================== --- head/lib/libc/powerpc64/string/bcopy_resolver.c Thu Mar 5 14:05:22 2020 (r358671) +++ head/lib/libc/powerpc64/string/bcopy_resolver.c Thu Mar 5 14:13:22 2020 (r358672) @@ -61,7 +61,12 @@ FN_RET FN_NAME_VSX FN_PARAMS; DEFINE_UIFUNC(, FN_RET, FN_NAME, FN_PARAMS) { - if (cpu_features & PPC_FEATURE_HAS_VSX) + /* VSX instructions were added in POWER ISA 2.06, + * however it requires data to be word-aligned. + * Since POWER ISA 2.07B this is solved transparently + * by the hardware + */ + if (cpu_features2 & PPC_FEATURE2_ARCH_2_07) return (FN_NAME_VSX); else return (FN_NAME_NOVSX); From owner-svn-src-all@freebsd.org Thu Mar 5 14:29:26 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id B7A3026B10E; Thu, 5 Mar 2020 14:29:26 +0000 (UTC) (envelope-from dim@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 48YCn22hjJz3ykZ; Thu, 5 Mar 2020 14:29:26 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from tensor.andric.com (tensor.andric.com [87.251.56.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "tensor.andric.com", Issuer "Let's Encrypt Authority X3" (verified OK)) (Authenticated sender: dim) by smtp.freebsd.org (Postfix) with ESMTPSA id 0489C1E96C; Thu, 5 Mar 2020 14:29:26 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from [IPv6:2001:470:7a58:0:6406:8b05:ca3a:6fd6] (unknown [IPv6:2001:470:7a58:0:6406:8b05:ca3a:6fd6]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by tensor.andric.com (Postfix) with ESMTPSA id 2979E2D03C; Thu, 5 Mar 2020 15:29:24 +0100 (CET) Subject: Re: svn commit: r358655 - head/sbin/mount_nfs To: Gleb Smirnoff , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org References: <202003042227.024MRGsW072613@repo.freebsd.org> From: Dimitry Andric Message-ID: <244e28ea-1217-cefc-354e-02ecb201637a@FreeBSD.org> Date: Thu, 5 Mar 2020 15:29:23 +0100 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:68.0) Gecko/20100101 Thunderbird/68.5.0 MIME-Version: 1.0 In-Reply-To: <202003042227.024MRGsW072613@repo.freebsd.org> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages 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, 05 Mar 2020 14:29:26 -0000 On 2020-03-04 23:27, Gleb Smirnoff wrote: > Author: glebius > Date: Wed Mar 4 22:27:16 2020 > New Revision: 358655 > URL: https://svnweb.freebsd.org/changeset/base/358655 > > Log: > When a machine boots the NFS mounting script is executed after > interfaces are configured, but for many interfaces (e.g. all Intel) > ifconfig causes link renegotiation, so the first attempt to mount > NFS always fails. After that mount_nfs sleeps for 30 seconds, while > only a couple seconds are actually required for interface to get up. > > Instead of sleeping, do select(2) on routing socket and check if > some interface became UP and in this case retry immediately. At least on i386, this causes a -Werror warning: sbin/mount_nfs/mount_nfs.c:549:10: error: cast from 'char *' to 'struct if_msghdr *' increases required alignment from 1 to 4 [-Werror,-Wcast-align] ifm = (struct if_msghdr *)buf; ^~~~~~~~~~~~~~~~~~~~~~~ 1 error generated. In practice I don't think the buffer can ever get misaligned, so can you please add a NO_WCAST_ALIGN= to the Makefile? -Dimitry From owner-svn-src-all@freebsd.org Thu Mar 5 14:41:29 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 0B76626B573; Thu, 5 Mar 2020 14:41:29 +0000 (UTC) (envelope-from tijl@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 48YD2w5qCyz4WQX; Thu, 5 Mar 2020 14:41:28 +0000 (UTC) (envelope-from tijl@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id B9D3F8A9A; Thu, 5 Mar 2020 14:41:28 +0000 (UTC) (envelope-from tijl@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 025EfSSd056216; Thu, 5 Mar 2020 14:41:28 GMT (envelope-from tijl@FreeBSD.org) Received: (from tijl@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 025EfSPn056214; Thu, 5 Mar 2020 14:41:28 GMT (envelope-from tijl@FreeBSD.org) Message-Id: <202003051441.025EfSPn056214@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: tijl set sender to tijl@FreeBSD.org using -f From: Tijl Coosemans Date: Thu, 5 Mar 2020 14:41:28 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r358673 - head/sys/compat/linux X-SVN-Group: head X-SVN-Commit-Author: tijl X-SVN-Commit-Paths: head/sys/compat/linux X-SVN-Commit-Revision: 358673 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages 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, 05 Mar 2020 14:41:29 -0000 Author: tijl Date: Thu Mar 5 14:41:27 2020 New Revision: 358673 URL: https://svnweb.freebsd.org/changeset/base/358673 Log: Move compat.linux.map_sched_prio sysctl definition to linux_mib.c so it is only defined by linux_common kernel module and not both linux and linux64 modules. Reported by: Yuri Pankov Modified: head/sys/compat/linux/linux_mib.c head/sys/compat/linux/linux_mib.h head/sys/compat/linux/linux_misc.c Modified: head/sys/compat/linux/linux_mib.c ============================================================================== --- head/sys/compat/linux/linux_mib.c Thu Mar 5 14:13:22 2020 (r358672) +++ head/sys/compat/linux/linux_mib.c Thu Mar 5 14:41:27 2020 (r358673) @@ -71,6 +71,11 @@ int linux_preserve_vstatus = 0; SYSCTL_INT(_compat_linux, OID_AUTO, preserve_vstatus, CTLFLAG_RWTUN, &linux_preserve_vstatus, 0, "Preserve VSTATUS termios(4) flag"); +bool linux_map_sched_prio = true; +SYSCTL_BOOL(_compat_linux, OID_AUTO, map_sched_prio, CTLFLAG_RDTUN, + &linux_map_sched_prio, 0, "Map scheduler priorities to Linux priorities " + "(not POSIX compliant)"); + static int linux_set_osname(struct thread *td, char *osname); static int linux_set_osrelease(struct thread *td, char *osrelease); static int linux_set_oss_version(struct thread *td, int oss_version); Modified: head/sys/compat/linux/linux_mib.h ============================================================================== --- head/sys/compat/linux/linux_mib.h Thu Mar 5 14:13:22 2020 (r358672) +++ head/sys/compat/linux/linux_mib.h Thu Mar 5 14:41:27 2020 (r358673) @@ -64,5 +64,6 @@ int linux_kernver(struct thread *td); extern int linux_ignore_ip_recverr; extern int linux_preserve_vstatus; +extern bool linux_map_sched_prio; #endif /* _LINUX_MIB_H_ */ Modified: head/sys/compat/linux/linux_misc.c ============================================================================== --- head/sys/compat/linux/linux_misc.c Thu Mar 5 14:13:22 2020 (r358672) +++ head/sys/compat/linux/linux_misc.c Thu Mar 5 14:41:27 2020 (r358673) @@ -144,11 +144,6 @@ struct l_pselect6arg { l_size_t ss_len; }; -static bool map_sched_prio = true; -SYSCTL_BOOL(_compat_linux, OID_AUTO, map_sched_prio, CTLFLAG_RDTUN, - &map_sched_prio, 0, "Map scheduler priorities to Linux priorities " - "(not POSIX compliant)"); - static int linux_utimensat_nsec_valid(l_long); @@ -1424,7 +1419,7 @@ linux_sched_setscheduler(struct thread *td, if (error) return (error); - if (map_sched_prio) { + if (linux_map_sched_prio) { switch (policy) { case SCHED_OTHER: if (sched_param.sched_priority != 0) @@ -1494,7 +1489,7 @@ linux_sched_get_priority_max(struct thread *td, { struct sched_get_priority_max_args bsd; - if (map_sched_prio) { + if (linux_map_sched_prio) { switch (args->policy) { case LINUX_SCHED_OTHER: td->td_retval[0] = 0; @@ -1530,7 +1525,7 @@ linux_sched_get_priority_min(struct thread *td, { struct sched_get_priority_min_args bsd; - if (map_sched_prio) { + if (linux_map_sched_prio) { switch (args->policy) { case LINUX_SCHED_OTHER: td->td_retval[0] = 0; @@ -1934,7 +1929,7 @@ linux_sched_setparam(struct thread *td, if (tdt == NULL) return (ESRCH); - if( map_sched_prio ) { + if (linux_map_sched_prio) { error = kern_sched_getscheduler(td, tdt, &policy); if (error) goto out; @@ -1990,7 +1985,7 @@ linux_sched_getparam(struct thread *td, return (error); } - if (map_sched_prio) { + if (linux_map_sched_prio) { error = kern_sched_getscheduler(td, tdt, &policy); PROC_UNLOCK(tdt->td_proc); if (error) From owner-svn-src-all@freebsd.org Thu Mar 5 14:45:37 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 1C1DC26B70A; Thu, 5 Mar 2020 14:45:37 +0000 (UTC) (envelope-from tijl@freebsd.org) Received: from mailrelay103.isp.belgacom.be (mailrelay103.isp.belgacom.be [195.238.20.130]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "relay.skynet.be", Issuer "GlobalSign RSA OV SSL CA 2018" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 48YD7h2HTZz3CjZ; Thu, 5 Mar 2020 14:45:36 +0000 (UTC) (envelope-from tijl@freebsd.org) IronPort-SDR: w7SpOBJDBGbdTO9EGjDn+FdBxolappx+dQd9AkqiXr0i46ntIBK3KKS9DVEc8h9ZqxbyOGb9Zh 2itXC97mYtVlC4ZSw1TLuIRxG/GwhPjIcuDMt6VkNItAcCLZHlccwIKV56KtxlxXv+4M+3ldrL g5ncYN4wva6KsVwtQXpRxmd2QwsMqmI6a0wsqN6JLLldiVBczccyWjA1JzjJ4uV/AryO5bglo6 bR9rmTFRHbpnUP2eACPkyHYSrsgaEEZH7gjwuOuTCi1U5XFI5FxA+X8Cxr4hVqQB4lm/Vi5sVd pbw= X-Belgacom-Dynamic: yes IronPort-PHdr: =?us-ascii?q?9a23=3ANRPBVRy5WKW1vHHXCy+O+j09IxM/srCxBDY+r6?= =?us-ascii?q?Qd2uIVIJqq85mqBkHD//Il1AaPAdyHrasd06GI4+jJYi8p39WoiDg6aptCVh?= =?us-ascii?q?sI2409vjcLJ4q7M3D9N+PgdCcgHc5PBxdP9nC/NlVJSo6lPwWB6nK94iQPFR?= =?us-ascii?q?rhKAF7Ovr6GpLIj8Swyuu+54Dfbx9HiTagbr5+Ngi6oRjNusUZgIZvKbs6xw?= =?us-ascii?q?fUrHdPZ+lZymRkKE6JkR3h/Mmw5plj8ypRu/Il6cFNVLjxcro7Q7JFEjkoKn?= =?us-ascii?q?g568L3uxbNSwuP/WYcXX4NkhVUGQjF7Qr1UYn3vyDnq+dywiiaPcnxTbApRT?= =?us-ascii?q?Sv6rpgRRH0hCsbMTMy7XragdJsgq1FvB2hpgR/w4/Kb4GTKPp+Zb7WcdcDSW?= =?us-ascii?q?ZcQspdSylND4WhZIUNEuUBJ/5VoYf9qVUQsBWwBgujBO3gxTBUiXH7xrE63u?= =?us-ascii?q?Y7HA3awAAsA8wCvXLJp9v1LqcSVuW1wbHWwzfGa/NdxCnw6I/PchA6v/6MWK?= =?us-ascii?q?h/cczKyUIyEA7FklSQqY7hPz6O1uoNqXaU4PR9WOyyhWArsQZxoiKgxso1jI?= =?us-ascii?q?TCm4wbylfB9SpjwYY1I8W1SEBhYdG6DpRfrDqaOJZsTsMlWWFotz42yrkHuZ?= =?us-ascii?q?69YSgLx44rxxvFZPyfdYWD/xHtVP6JLDp7mX5pYqyzihm9/ES61OHxVNO43E?= =?us-ascii?q?tOoydHlNTHq2oD2AbJ6sedT/tw5kKh2TGS2A/N8uxEOkU0lbbDK54m374wio?= =?us-ascii?q?IfsUTdES/yn0X7lKyWeV8g+uip7uTofK/mppiGO49oiwH+MKAultajDuQ/NQ?= =?us-ascii?q?gORHaU+eGm273l5k31WrJKjuc5kqXBsZDaI9oUprKhDgJWz4ov8QizAjip3d?= =?us-ascii?q?gCg3UKLkhJdA+DgoXrI13OJer3Dfa7g1SiijdrwPXGM6X9ApXMLHjDlKzsfb?= =?us-ascii?q?hn60FC1gU81stf6I9OBrEGOvLzVVf9tMbEAR8hLwy03+HnBc1m1oMAX2KDG7?= =?us-ascii?q?SZMLnOvlOR5uIgPfODa5IOtTbzMfgq+eDhgmQimVAAZ6Wp2oEXaH+gFPR8P0?= =?us-ascii?q?qZeWbsgssGEWoSpQo+UurqhESZUT5Je3m+Rrgz5jU/CI+9A4fDXJ6ij6Ka0y?= =?us-ascii?q?egA5JafGdGCkqDEX3wbYWLR+8MaD6OIs9mijEETqKhRJM42R6ysw/6zr9nLu?= =?us-ascii?q?vI+i0Eq53jzsN16vbdlREo6zN7Ed+S03qQQG1umWMIXTA2j+hDphlM102CmZ?= =?us-ascii?q?Bxhf9fC5QH9utAVAQ9K7bSxvdmDtnzXkTKedLfG3i8RdDzPdY1Bvk2xMQDZk?= =?us-ascii?q?97AJ32khHB2wKEGbIYvYenQpsu/fSPjDDKO89hxiOeh+EahF48T54KbDX+iw?= =?us-ascii?q?=3D=3D?= X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: =?us-ascii?q?A2BGAQBdD2Fe/8Ub9FFmHAEBAQEBBwE?= =?us-ascii?q?BEQEEBAEBgWkFAQELAQGBeyxZE1QBIBIqjRiFfwGCEIg9gSZ8jmSBewkBAQE?= =?us-ascii?q?BAQEBAQErDAQBAYFPgnQCggsnNgcOAgMBAQEDAgUBAQYBAQEBAQEEBAFsBAE?= =?us-ascii?q?BBwoCAYROIQEDAQEFCgE3DEIBEAGBZykBgn8BBTocIxALDgYECSUPEjYGE4M?= =?us-ascii?q?ngkoDMguvGYQ1AQsBgQiCWg2BG38GgTgBjECCAIERgxQ+ghuCMIVvBJdgl31?= =?us-ascii?q?EgkaHUopehCoomzSER5MqgjCSIgMvgVhNMAiDJ1AYDY9EAQMEh1iFQkADMII?= =?us-ascii?q?kjGEBAQ?= X-IPAS-Result: =?us-ascii?q?A2BGAQBdD2Fe/8Ub9FFmHAEBAQEBBwEBEQEEBAEBgWkFA?= =?us-ascii?q?QELAQGBeyxZE1QBIBIqjRiFfwGCEIg9gSZ8jmSBewkBAQEBAQEBAQErDAQBA?= =?us-ascii?q?YFPgnQCggsnNgcOAgMBAQEDAgUBAQYBAQEBAQEEBAFsBAEBBwoCAYROIQEDA?= =?us-ascii?q?QEFCgE3DEIBEAGBZykBgn8BBTocIxALDgYECSUPEjYGE4MngkoDMguvGYQ1A?= =?us-ascii?q?QsBgQiCWg2BG38GgTgBjECCAIERgxQ+ghuCMIVvBJdgl31EgkaHUopehCoom?= =?us-ascii?q?zSER5MqgjCSIgMvgVhNMAiDJ1AYDY9EAQMEh1iFQkADMIIkjGEBAQ?= Received: from 197.27-244-81.adsl-dyn.isp.belgacom.be (HELO kalimero.tijl.coosemans.org) ([81.244.27.197]) by relay.skynet.be with ESMTP; 05 Mar 2020 15:45:33 +0100 Received: from localhost (localhost [127.0.0.1]) by kalimero.tijl.coosemans.org (8.15.2/8.15.2) with ESMTP id 025EjWNM027963; Thu, 5 Mar 2020 15:45:32 +0100 (CET) (envelope-from tijl@FreeBSD.org) Date: Thu, 5 Mar 2020 15:45:31 +0100 From: =?UTF-8?B?VMSzbA==?= Coosemans To: Yuri Pankov Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r358483 - head/sys/compat/linux Message-ID: <20200305154531.35af1599@FreeBSD.org> In-Reply-To: References: <202003011312.021DC4vh022404@repo.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Rspamd-Queue-Id: 48YD7h2HTZz3CjZ X-Spamd-Bar: / Authentication-Results: mx1.freebsd.org; none X-Spamd-Result: default: False [-0.54 / 15.00]; local_wl_from(0.00)[freebsd.org]; NEURAL_SPAM_MEDIUM(0.44)[0.437,0]; ASN(0.00)[asn:5432, ipnet:195.238.0.0/19, country:BE]; NEURAL_HAM_LONG(-0.97)[-0.973,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, 05 Mar 2020 14:45:37 -0000 On Thu, 5 Mar 2020 16:15:10 +0300 Yuri Pankov wrote: > Tijl Coosemans wrote: >> Author: tijl >> Date: Sun Mar 1 13:12:04 2020 >> New Revision: 358483 >> URL: https://svnweb.freebsd.org/changeset/base/358483 >> >> Log: >> linuxulator: Map scheduler priorities to Linux priorities. >> >> On Linux the valid range of priorities for the SCHED_FIFO and SCHED_RR >> scheduling policies is [1,99]. For SCHED_OTHER the single valid priority is >> 0. On FreeBSD it is [0,31] for all policies. Programs are supposed to >> query the valid range using sched_get_priority_(min|max), but of course some >> programs assume the Linux values are valid. >> >> This commit adds a tunable compat.linux.map_sched_prio. When enabled >> sched_get_priority_(min|max) return the Linux values and sched_setscheduler >> and sched_(get|set)param translate between FreeBSD and Linux values. >> >> Because there are more Linux levels than FreeBSD levels, multiple Linux >> levels map to a single FreeBSD level, which means pre-emption might not >> happen as it does on Linux, so the tunable allows to disable this behaviour. >> It is enabled by default because I think it is unlikely that anyone runs >> real-time software under Linux emulation on FreeBSD that critically relies >> on correct pre-emption. >> >> This fixes FMOD, a commercial sound library used by several games. >> >> PR: 240043 >> Tested by: Alex S >> Reviewed by: dchagin >> MFC after: 2 weeks >> Differential Revision: https://reviews.freebsd.org/D23790 >> >> Modified: >> head/sys/compat/linux/linux_misc.c >> head/sys/compat/linux/linux_misc.h >> >> Modified: head/sys/compat/linux/linux_misc.c >> ============================================================================== >> --- head/sys/compat/linux/linux_misc.c Sun Mar 1 12:34:27 2020 (r358482) >> +++ head/sys/compat/linux/linux_misc.c Sun Mar 1 13:12:04 2020 (r358483) >> @@ -144,6 +144,11 @@ struct l_pselect6arg { >> l_size_t ss_len; >> }; >> >> +static bool map_sched_prio = true; >> +SYSCTL_BOOL(_compat_linux, OID_AUTO, map_sched_prio, CTLFLAG_RDTUN, >> + &map_sched_prio, 0, "Map scheduler priorities to Linux priorities " >> + "(not POSIX compliant)"); > > I'm seeing the following in the log: > > sysctl_warn_reuse: can't re-use a leaf (compat.linux.map_sched_prio)! > > Should this be done for both linux and linux32 (when one exists) or made > to install one time only? Ah, thanks for the report, I've moved it to linux_common in r358673. From owner-svn-src-all@freebsd.org Thu Mar 5 14:52:27 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 0A14D26BAF8; Thu, 5 Mar 2020 14:52:27 +0000 (UTC) (envelope-from 0mp@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 48YDHY1cXyz3PY6; Thu, 5 Mar 2020 14:52:25 +0000 (UTC) (envelope-from 0mp@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 03E3F8DDF; Thu, 5 Mar 2020 14:52:25 +0000 (UTC) (envelope-from 0mp@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 025EqO2p062363; Thu, 5 Mar 2020 14:52:24 GMT (envelope-from 0mp@FreeBSD.org) Received: (from 0mp@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 025EqOVb062362; Thu, 5 Mar 2020 14:52:24 GMT (envelope-from 0mp@FreeBSD.org) Message-Id: <202003051452.025EqOVb062362@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: 0mp set sender to 0mp@FreeBSD.org using -f From: Mateusz Piotrowski <0mp@FreeBSD.org> Date: Thu, 5 Mar 2020 14:52:24 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r358674 - head/lib/libc/gen X-SVN-Group: head X-SVN-Commit-Author: 0mp X-SVN-Commit-Paths: head/lib/libc/gen X-SVN-Commit-Revision: 358674 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages 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, 05 Mar 2020 14:52:27 -0000 Author: 0mp (doc,ports committer) Date: Thu Mar 5 14:52:24 2020 New Revision: 358674 URL: https://svnweb.freebsd.org/changeset/base/358674 Log: ftw.3: Add examples PR: 173448 [1] Submitted by: fernape@ (previous version) [1] Reviewed by: jilles Approved by: bcr (mentor) MFC after: 2 weeks Differential Revision: https://reviews.freebsd.org/D21750 Modified: head/lib/libc/gen/ftw.3 Modified: head/lib/libc/gen/ftw.3 ============================================================================== --- head/lib/libc/gen/ftw.3 Thu Mar 5 14:41:27 2020 (r358673) +++ head/lib/libc/gen/ftw.3 Thu Mar 5 14:52:24 2020 (r358674) @@ -20,7 +20,7 @@ .\" .\" $FreeBSD$ .\" -.Dd July 5, 2004 +.Dd March 5, 2020 .Dt FTW 3 .Os .Sh NAME @@ -157,6 +157,65 @@ and will stop processing the tree and return the value from .Fa fn . Both functions return \-1 if an error is detected. +.Sh EXAMPLES +Following there is an example that shows how +.Nm nftw +can be used. +It traverses the file tree starting at the directory pointed +by the only program argument and shows the complete path and a brief +indicator about the file type. +.Bd -literal -offset 2n +#include +#include +#include + +int +nftw_callback(const char *path, const struct stat *sb, int typeflag, struct FTW *ftw) +{ + char type; + + switch(typeflag) { + case FTW_F: + type = 'F'; + break; + case FTW_D: + type = 'D'; + break; + case FTW_DNR: + type = '-'; + break; + case FTW_DP: + type = 'd'; + break; + case FTW_NS: + type = 'X'; + break; + case FTW_SL: + type = 'S'; + break; + case FTW_SLN: + type = 's'; + break; + default: + type = '?'; + break; + } + + printf("[%c] %s\\n", type, path); + + return (0); +} + +int +main(int argc, char **argv) +{ + if (argc != 2) { + printf("Usage %s \\n", argv[0]); + return (EX_USAGE); + } else + return (nftw(argv[1], nftw_callback, /* UNUSED */ 1, 0)); +} +.Ed .Sh ERRORS The .Fn ftw From owner-svn-src-all@freebsd.org Thu Mar 5 15:48:55 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id DD19A26CDB0; Thu, 5 Mar 2020 15:48:55 +0000 (UTC) (envelope-from asomers@gmail.com) Received: from mail-oi1-f172.google.com (mail-oi1-f172.google.com [209.85.167.172]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1O1" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 48YFXk1Nnfz3M4V; Thu, 5 Mar 2020 15:48:54 +0000 (UTC) (envelope-from asomers@gmail.com) Received: by mail-oi1-f172.google.com with SMTP id p125so6390066oif.10; Thu, 05 Mar 2020 07:48:54 -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=WeVsfl2cjhoys8QVfINw25s0M3FVi9ynV5OJydpuFhs=; b=OYxCgWfakOkK1ObwBwwLxrdQwTendVwnITydXMaevKRhQc85/5U0BR8sJpyIXNVjWY zYgo4yWhpYsEOGVar/+nYW4DFFVNDIKWbECxR8JLT2yWAMmY3fgR+qvL59b3n2o2NN7R u40wJmNQV2jLE0P6L9N2Q558uWigdomqPBGEBxzIBndiXrefYf6VBaRQm8iLfruteWfZ C3l4Zs2Xy1U1tlXAXffDCTwSvZkfcpGZONyXdcG311PIprh5Sf0bMOFXHBGfokmtfQ1z XOvGVeSraftiB6S0f/qGjVagSDN4V2z8RADykeRFBsxYdL5RaokFQsAhOdxrdIUNusQ2 4wQw== X-Gm-Message-State: ANhLgQ3NIji/u9D3WjwV1NFO4Bq3AsIlOeUhkm3QPmooNJtOosf49imj Ss/aBkFPqOV9zypvO5zo3gJixe869JyWfqkhdMwz3f+4 X-Google-Smtp-Source: ADFU+vvKFY32iGADmmct0JjaafZHdQigVj9BsnNCqT1Z00oHBHtb9hn/Das23mpWIUPkRnFS5GMilBeOM2ihTLZbG84= X-Received: by 2002:aca:c40f:: with SMTP id u15mr5862443oif.55.1583423332828; Thu, 05 Mar 2020 07:48:52 -0800 (PST) MIME-Version: 1.0 References: <201904071839.x37IduPO002007@repo.freebsd.org> In-Reply-To: From: Alan Somers Date: Thu, 5 Mar 2020 08:48:41 -0700 Message-ID: Subject: Re: svn commit: r346018 - head/sys/conf To: Warner Losh Cc: Warner Losh , src-committers , svn-src-all , svn-src-head X-Rspamd-Queue-Id: 48YFXk1Nnfz3M4V X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org; dkim=none; dmarc=none; spf=pass (mx1.freebsd.org: domain of asomers@gmail.com designates 209.85.167.172 as permitted sender) smtp.mailfrom=asomers@gmail.com X-Spamd-Result: default: False [-2.99 / 15.00]; ARC_NA(0.00)[]; NEURAL_HAM_MEDIUM(-1.00)[-1.000,0]; RCVD_TLS_ALL(0.00)[]; FROM_HAS_DN(0.00)[]; R_SPF_ALLOW(-0.20)[+ip4:209.85.128.0/17:c]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; MIME_GOOD(-0.10)[multipart/alternative,text/plain]; DMARC_NA(0.00)[freebsd.org]; RCPT_COUNT_FIVE(0.00)[5]; TO_MATCH_ENVRCPT_SOME(0.00)[]; TO_DN_ALL(0.00)[]; RCVD_IN_DNSWL_NONE(0.00)[172.167.85.209.list.dnswl.org : 127.0.5.0]; IP_SCORE(-0.99)[ip: (-0.25), ipnet: 209.85.128.0/17(-2.98), asn: 15169(-1.65), country: US(-0.05)]; FORGED_SENDER(0.30)[asomers@freebsd.org,asomers@gmail.com]; RWL_MAILSPIKE_POSSIBLE(0.00)[172.167.85.209.rep.mailspike.net : 127.0.0.17]; MIME_TRACE(0.00)[0:+,1:+,2:~]; 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)[asomers@freebsd.org,asomers@gmail.com]; 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: Thu, 05 Mar 2020 15:48:56 -0000 Wow, what a speedy response, and so late at night! Thanks! On Wed, Mar 4, 2020 at 11:22 PM Warner Losh wrote: > > > On Wed, Mar 4, 2020 at 10:27 PM Alan Somers wrote: > >> On Sun, Apr 7, 2019 at 12:40 PM Warner Losh wrote: >> >>> Author: imp >>> Date: Sun Apr 7 18:39:55 2019 >>> New Revision: 346018 >>> URL: https://svnweb.freebsd.org/changeset/base/346018 >>> >>> Log: >>> Use default shell assignment rather more complicated if then >>> construct. >>> >>> Discussed with: emaste@, allanjude@ (changes (or not) based on their >>> feedback) >>> Differential Revision: https://reviews.freebsd.org/D19797 >>> >> >> Can we MFC this to stable/12? Before this change, setting >> BRANCH_OVERRIDE during "make release" would have no effect. >> > > Sure thing. There was a merge conflict, which makes sense, but I think I > resolved it correctly. > > Warner > From owner-svn-src-all@freebsd.org Thu Mar 5 15:51:44 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id EC20026D00B; Thu, 5 Mar 2020 15:51:44 +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 48YFc0551Xz3yD8; Thu, 5 Mar 2020 15:51:44 +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 8474D97C1; Thu, 5 Mar 2020 15:51:44 +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 025FpikT098812; Thu, 5 Mar 2020 15:51:44 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 025Fpin4098811; Thu, 5 Mar 2020 15:51:44 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <202003051551.025Fpin4098811@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Thu, 5 Mar 2020 15:51:44 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r358675 - head/lib/libc/sys X-SVN-Group: head X-SVN-Commit-Author: emaste X-SVN-Commit-Paths: head/lib/libc/sys X-SVN-Commit-Revision: 358675 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages 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, 05 Mar 2020 15:51:45 -0000 Author: emaste Date: Thu Mar 5 15:51:44 2020 New Revision: 358675 URL: https://svnweb.freebsd.org/changeset/base/358675 Log: umtx_op.2: correct typo PR: 244611 Submitted by: John F. Carr MFC after: 3 days Modified: head/lib/libc/sys/_umtx_op.2 Modified: head/lib/libc/sys/_umtx_op.2 ============================================================================== --- head/lib/libc/sys/_umtx_op.2 Thu Mar 5 14:52:24 2020 (r358674) +++ head/lib/libc/sys/_umtx_op.2 Thu Mar 5 15:51:44 2020 (r358675) @@ -99,7 +99,7 @@ The constants are defined for special values: .It Dv UMUTEX_UNOWNED Zero, the value stored in the unowned lock. .It Dv UMUTEX_CONTESTED -The contenion indicator. +The contention indicator. .It Dv UMUTEX_RB_OWNERDEAD A thread owning the robust mutex terminated. The mutex is in unlocked state. From owner-svn-src-all@freebsd.org Thu Mar 5 15:52:35 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 502D226D13C; Thu, 5 Mar 2020 15:52:35 +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 48YFcz0GC2z415Q; Thu, 5 Mar 2020 15:52:35 +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 C13BE991C; Thu, 5 Mar 2020 15:52:34 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 025FqYoS000437; Thu, 5 Mar 2020 15:52:34 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 025FqYXc000436; Thu, 5 Mar 2020 15:52:34 GMT (envelope-from kib@FreeBSD.org) Message-Id: <202003051552.025FqYXc000436@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Thu, 5 Mar 2020 15:52:34 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r358676 - head/sys/kern X-SVN-Group: head X-SVN-Commit-Author: kib X-SVN-Commit-Paths: head/sys/kern X-SVN-Commit-Revision: 358676 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages 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, 05 Mar 2020 15:52:35 -0000 Author: kib Date: Thu Mar 5 15:52:34 2020 New Revision: 358676 URL: https://svnweb.freebsd.org/changeset/base/358676 Log: buffer pager: deref ucred immediately after read. Ucred is passed to bread(9) so that non-local filesystems use proper credentials. But, since clean buffer might be cached unless buf_pager_relbuf is not enabled, it makes credentials to have extra reference until buffer is reclaimed. Ucred reference would prevent jail from destroying if creds are jailed. Dereferencing the read credentials on the valid buffer avoid that, and should be fine because the buffer is valid and does not need re-read. PR: 238032 Reported by: bz Reproduced and tested by: pho Sponsored by: The FreeBSD Foundation MFC after: 1 week Differential revision: https://reviews.freebsd.org/D23775 Modified: head/sys/kern/vfs_bio.c Modified: head/sys/kern/vfs_bio.c ============================================================================== --- head/sys/kern/vfs_bio.c Thu Mar 5 15:51:44 2020 (r358675) +++ head/sys/kern/vfs_bio.c Thu Mar 5 15:52:34 2020 (r358676) @@ -5187,6 +5187,10 @@ again: br_flags, &bp); if (error != 0) goto end_pages; + if (bp->b_rcred == curthread->td_ucred) { + crfree(bp->b_rcred); + bp->b_rcred = NOCRED; + } if (LIST_EMPTY(&bp->b_dep)) { /* * Invalidation clears m->valid, but From owner-svn-src-all@freebsd.org Thu Mar 5 16:33:54 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id CB62926DF43; Thu, 5 Mar 2020 16:33:54 +0000 (UTC) (envelope-from glebius@freebsd.org) Received: from cell.glebi.us (glebi.us [162.251.186.162]) (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 48YGXd2hH6z46nf; Thu, 5 Mar 2020 16:33:53 +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 025GXou3033311 (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384 bits=256 verify=NO); Thu, 5 Mar 2020 08:33:50 -0800 (PST) (envelope-from glebius@freebsd.org) Received: (from glebius@localhost) by cell.glebi.us (8.15.2/8.15.2/Submit) id 025GXoE5033310; Thu, 5 Mar 2020 08:33:50 -0800 (PST) (envelope-from glebius@freebsd.org) X-Authentication-Warning: cell.glebi.us: glebius set sender to glebius@freebsd.org using -f Date: Thu, 5 Mar 2020 08:33:50 -0800 From: Gleb Smirnoff To: Dimitry Andric Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r358655 - head/sbin/mount_nfs Message-ID: <20200305163350.GU5741@FreeBSD.org> References: <202003042227.024MRGsW072613@repo.freebsd.org> <244e28ea-1217-cefc-354e-02ecb201637a@FreeBSD.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <244e28ea-1217-cefc-354e-02ecb201637a@FreeBSD.org> X-Rspamd-Queue-Id: 48YGXd2hH6z46nf X-Spamd-Bar: / Authentication-Results: mx1.freebsd.org; none X-Spamd-Result: default: False [-0.07 / 15.00]; local_wl_from(0.00)[freebsd.org]; NEURAL_HAM_LONG(-0.99)[-0.989,0]; NEURAL_SPAM_MEDIUM(0.92)[0.917,0]; ASN(0.00)[asn:27348, ipnet:162.251.186.0/24, 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, 05 Mar 2020 16:33:54 -0000 On Thu, Mar 05, 2020 at 03:29:23PM +0100, Dimitry Andric wrote: D> On 2020-03-04 23:27, Gleb Smirnoff wrote: D> > Author: glebius D> > Date: Wed Mar 4 22:27:16 2020 D> > New Revision: 358655 D> > URL: https://svnweb.freebsd.org/changeset/base/358655 D> > D> > Log: D> > When a machine boots the NFS mounting script is executed after D> > interfaces are configured, but for many interfaces (e.g. all Intel) D> > ifconfig causes link renegotiation, so the first attempt to mount D> > NFS always fails. After that mount_nfs sleeps for 30 seconds, while D> > only a couple seconds are actually required for interface to get up. D> > Instead of sleeping, do select(2) on routing socket and check if D> > some interface became UP and in this case retry immediately. D> D> At least on i386, this causes a -Werror warning: D> D> sbin/mount_nfs/mount_nfs.c:549:10: error: cast from 'char *' to 'struct D> if_msghdr *' increases required alignment from 1 to 4 D> [-Werror,-Wcast-align] D> ifm = (struct if_msghdr *)buf; D> ^~~~~~~~~~~~~~~~~~~~~~~ D> 1 error generated. D> D> In practice I don't think the buffer can ever get misaligned, so can you D> please add a NO_WCAST_ALIGN= to the Makefile? route(8) handles the same problem via intermediate (void *) cast. What is preferred way to solve the problem? Change compiler flags file wide, or just through (void *) cast? -- Gleb Smirnoff From owner-svn-src-all@freebsd.org Thu Mar 5 17:25:06 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 284FC26EE21; Thu, 5 Mar 2020 17:25:06 +0000 (UTC) (envelope-from slw@zxy.spb.ru) Received: from zxy.spb.ru (zxy.spb.ru [195.70.199.98]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 48YHgh15Rjz3FWh; Thu, 5 Mar 2020 17:25:03 +0000 (UTC) (envelope-from slw@zxy.spb.ru) Received: from slw by zxy.spb.ru with local (Exim 4.86 (FreeBSD)) (envelope-from ) id 1j9uEw-0003ZG-7Y; Thu, 05 Mar 2020 20:24:54 +0300 Date: Thu, 5 Mar 2020 20:24:54 +0300 From: Slawa Olhovchenkov To: Gleb Smirnoff Cc: Dimitry Andric , svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r358655 - head/sbin/mount_nfs Message-ID: <20200305172454.GJ8028@zxy.spb.ru> References: <202003042227.024MRGsW072613@repo.freebsd.org> <244e28ea-1217-cefc-354e-02ecb201637a@FreeBSD.org> <20200305163350.GU5741@FreeBSD.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20200305163350.GU5741@FreeBSD.org> User-Agent: Mutt/1.5.24 (2015-08-30) X-SA-Exim-Connect-IP: X-SA-Exim-Mail-From: slw@zxy.spb.ru X-SA-Exim-Scanned: No (on zxy.spb.ru); SAEximRunCond expanded to false X-Rspamd-Queue-Id: 48YHgh15Rjz3FWh X-Spamd-Bar: ---- Authentication-Results: mx1.freebsd.org; none X-Spamd-Result: default: False [-4.20 / 15.00]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; REPLY(-4.00)[]; NEURAL_SPAM_MEDIUM(0.80)[0.800,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, 05 Mar 2020 17:25:06 -0000 On Thu, Mar 05, 2020 at 08:33:50AM -0800, Gleb Smirnoff wrote: > On Thu, Mar 05, 2020 at 03:29:23PM +0100, Dimitry Andric wrote: > D> On 2020-03-04 23:27, Gleb Smirnoff wrote: > D> > Author: glebius > D> > Date: Wed Mar 4 22:27:16 2020 > D> > New Revision: 358655 > D> > URL: https://svnweb.freebsd.org/changeset/base/358655 > D> > > D> > Log: > D> > When a machine boots the NFS mounting script is executed after > D> > interfaces are configured, but for many interfaces (e.g. all Intel) > D> > ifconfig causes link renegotiation, so the first attempt to mount > D> > NFS always fails. After that mount_nfs sleeps for 30 seconds, while > D> > only a couple seconds are actually required for interface to get up. > D> > Instead of sleeping, do select(2) on routing socket and check if > D> > some interface became UP and in this case retry immediately. > D> > D> At least on i386, this causes a -Werror warning: > D> > D> sbin/mount_nfs/mount_nfs.c:549:10: error: cast from 'char *' to 'struct > D> if_msghdr *' increases required alignment from 1 to 4 > D> [-Werror,-Wcast-align] > D> ifm = (struct if_msghdr *)buf; > D> ^~~~~~~~~~~~~~~~~~~~~~~ > D> 1 error generated. > D> > D> In practice I don't think the buffer can ever get misaligned, so can you > D> please add a NO_WCAST_ALIGN= to the Makefile? > > route(8) handles the same problem via intermediate (void *) cast. What is > preferred way to solve the problem? Change compiler flags file wide, or > just through (void *) cast? Copy to aligned buffer or got SIGBUS on some architectures? From owner-svn-src-all@freebsd.org Thu Mar 5 17:35:19 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id BAD1026F0C8; Thu, 5 Mar 2020 17:35:19 +0000 (UTC) (envelope-from slw@zxy.spb.ru) Received: from zxy.spb.ru (zxy.spb.ru [195.70.199.98]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 48YHvV2Dxtz44XS; Thu, 5 Mar 2020 17:35:18 +0000 (UTC) (envelope-from slw@zxy.spb.ru) Received: from slw by zxy.spb.ru with local (Exim 4.86 (FreeBSD)) (envelope-from ) id 1j9uOx-0003d6-EJ; Thu, 05 Mar 2020 20:35:15 +0300 Date: Thu, 5 Mar 2020 20:35:15 +0300 From: Slawa Olhovchenkov To: Gleb Smirnoff Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, Dimitry Andric Subject: Re: svn commit: r358655 - head/sbin/mount_nfs Message-ID: <20200305173515.GK8028@zxy.spb.ru> References: <202003042227.024MRGsW072613@repo.freebsd.org> <244e28ea-1217-cefc-354e-02ecb201637a@FreeBSD.org> <20200305163350.GU5741@FreeBSD.org> <20200305172454.GJ8028@zxy.spb.ru> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20200305172454.GJ8028@zxy.spb.ru> User-Agent: Mutt/1.5.24 (2015-08-30) X-SA-Exim-Connect-IP: X-SA-Exim-Mail-From: slw@zxy.spb.ru X-SA-Exim-Scanned: No (on zxy.spb.ru); SAEximRunCond expanded to false X-Rspamd-Queue-Id: 48YHvV2Dxtz44XS X-Spamd-Bar: / Authentication-Results: mx1.freebsd.org; dkim=none; dmarc=none; spf=none (mx1.freebsd.org: domain of slw@zxy.spb.ru has no SPF policy when checking 195.70.199.98) smtp.mailfrom=slw@zxy.spb.ru X-Spamd-Result: default: False [0.88 / 15.00]; ARC_NA(0.00)[]; NEURAL_HAM_MEDIUM(-0.60)[-0.596,0]; FROM_HAS_DN(0.00)[]; TO_DN_SOME(0.00)[]; TO_MATCH_ENVRCPT_ALL(0.00)[]; MIME_GOOD(-0.10)[text/plain]; RCVD_TLS_LAST(0.00)[]; DMARC_NA(0.00)[zxy.spb.ru]; AUTH_NA(1.00)[]; RCPT_COUNT_FIVE(0.00)[5]; IP_SCORE(0.08)[asn: 5495(0.38), country: RU(0.01)]; NEURAL_SPAM_LONG(0.49)[0.494,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:5495, ipnet:195.70.192.0/19, country:RU]; MID_RHS_MATCH_FROM(0.00)[]; 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: Thu, 05 Mar 2020 17:35:19 -0000 On Thu, Mar 05, 2020 at 08:24:54PM +0300, Slawa Olhovchenkov wrote: > On Thu, Mar 05, 2020 at 08:33:50AM -0800, Gleb Smirnoff wrote: > > > On Thu, Mar 05, 2020 at 03:29:23PM +0100, Dimitry Andric wrote: > > D> On 2020-03-04 23:27, Gleb Smirnoff wrote: > > D> > Author: glebius > > D> > Date: Wed Mar 4 22:27:16 2020 > > D> > New Revision: 358655 > > D> > URL: https://svnweb.freebsd.org/changeset/base/358655 > > D> > > > D> > Log: > > D> > When a machine boots the NFS mounting script is executed after > > D> > interfaces are configured, but for many interfaces (e.g. all Intel) > > D> > ifconfig causes link renegotiation, so the first attempt to mount > > D> > NFS always fails. After that mount_nfs sleeps for 30 seconds, while > > D> > only a couple seconds are actually required for interface to get up. > > D> > Instead of sleeping, do select(2) on routing socket and check if > > D> > some interface became UP and in this case retry immediately. > > D> > > D> At least on i386, this causes a -Werror warning: > > D> > > D> sbin/mount_nfs/mount_nfs.c:549:10: error: cast from 'char *' to 'struct > > D> if_msghdr *' increases required alignment from 1 to 4 > > D> [-Werror,-Wcast-align] > > D> ifm = (struct if_msghdr *)buf; > > D> ^~~~~~~~~~~~~~~~~~~~~~~ > > D> 1 error generated. > > D> > > D> In practice I don't think the buffer can ever get misaligned, so can you > > D> please add a NO_WCAST_ALIGN= to the Makefile? > > > > route(8) handles the same problem via intermediate (void *) cast. What is > > preferred way to solve the problem? Change compiler flags file wide, or > > just through (void *) cast? > > Copy to aligned buffer or got SIGBUS on some architectures? char buf[2048] __aligned(__alignof(struct if_msghdr)); resolve this watning. From owner-svn-src-all@freebsd.org Thu Mar 5 17:44:15 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 569C526F3AC; Thu, 5 Mar 2020 17:44:15 +0000 (UTC) (envelope-from glebius@freebsd.org) Received: from cell.glebi.us (glebi.us [162.251.186.162]) (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 48YJ5p5dMKz4TXR; Thu, 5 Mar 2020 17:44:14 +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 025HiB55033740 (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384 bits=256 verify=NO); Thu, 5 Mar 2020 09:44:11 -0800 (PST) (envelope-from glebius@freebsd.org) Received: (from glebius@localhost) by cell.glebi.us (8.15.2/8.15.2/Submit) id 025HiBb0033739; Thu, 5 Mar 2020 09:44:11 -0800 (PST) (envelope-from glebius@freebsd.org) X-Authentication-Warning: cell.glebi.us: glebius set sender to glebius@freebsd.org using -f Date: Thu, 5 Mar 2020 09:44:11 -0800 From: Gleb Smirnoff To: Slawa Olhovchenkov Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, Dimitry Andric Subject: Re: svn commit: r358655 - head/sbin/mount_nfs Message-ID: <20200305174411.GV5741@FreeBSD.org> References: <202003042227.024MRGsW072613@repo.freebsd.org> <244e28ea-1217-cefc-354e-02ecb201637a@FreeBSD.org> <20200305163350.GU5741@FreeBSD.org> <20200305172454.GJ8028@zxy.spb.ru> <20200305173515.GK8028@zxy.spb.ru> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20200305173515.GK8028@zxy.spb.ru> X-Rspamd-Queue-Id: 48YJ5p5dMKz4TXR X-Spamd-Bar: / Authentication-Results: mx1.freebsd.org; none X-Spamd-Result: default: False [-0.09 / 15.00]; local_wl_from(0.00)[freebsd.org]; NEURAL_SPAM_MEDIUM(0.90)[0.902,0]; ASN(0.00)[asn:27348, ipnet:162.251.186.0/24, country:US]; NEURAL_HAM_LONG(-0.99)[-0.988,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, 05 Mar 2020 17:44:15 -0000 On Thu, Mar 05, 2020 at 08:35:15PM +0300, Slawa Olhovchenkov wrote: S> > > D> sbin/mount_nfs/mount_nfs.c:549:10: error: cast from 'char *' to 'struct S> > > D> if_msghdr *' increases required alignment from 1 to 4 S> > > D> [-Werror,-Wcast-align] S> > > D> ifm = (struct if_msghdr *)buf; S> > > D> ^~~~~~~~~~~~~~~~~~~~~~~ S> > > D> 1 error generated. S> > > D> S> > > D> In practice I don't think the buffer can ever get misaligned, so can you S> > > D> please add a NO_WCAST_ALIGN= to the Makefile? S> > > S> > > route(8) handles the same problem via intermediate (void *) cast. What is S> > > preferred way to solve the problem? Change compiler flags file wide, or S> > > just through (void *) cast? S> > S> > Copy to aligned buffer or got SIGBUS on some architectures? S> S> char buf[2048] __aligned(__alignof(struct if_msghdr)); S> S> resolve this watning. Thanks, Slawa! I think this is the most elegant solution. -- Gleb Smirnoff From owner-svn-src-all@freebsd.org Thu Mar 5 17:53:39 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id A498B26F629; Thu, 5 Mar 2020 17:53: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 48YJJg0MF9z3QZD; Thu, 5 Mar 2020 17:53: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 80876B044; Thu, 5 Mar 2020 17:53: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 025Hrcum072047; Thu, 5 Mar 2020 17:53:38 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 025HrcRp072046; Thu, 5 Mar 2020 17:53:38 GMT (envelope-from dim@FreeBSD.org) Message-Id: <202003051753.025HrcRp072046@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Thu, 5 Mar 2020 17:53:38 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r358677 - head X-SVN-Group: head X-SVN-Commit-Author: dim X-SVN-Commit-Paths: head X-SVN-Commit-Revision: 358677 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages 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, 05 Mar 2020 17:53:39 -0000 Author: dim Date: Thu Mar 5 17:53:38 2020 New Revision: 358677 URL: https://svnweb.freebsd.org/changeset/base/358677 Log: Remove duplicate usr/libexec/cc1plus entry from ObsoleteFiles.inc. Modified: head/ObsoleteFiles.inc Modified: head/ObsoleteFiles.inc ============================================================================== --- head/ObsoleteFiles.inc Thu Mar 5 15:52:34 2020 (r358676) +++ head/ObsoleteFiles.inc Thu Mar 5 17:53:38 2020 (r358677) @@ -648,7 +648,6 @@ OLD_FILES+=usr/lib32/libsupc++.so OLD_LIBS+=usr/lib32/libsupc++.so.1 OLD_FILES+=usr/lib32/libsupc++_p.a .endif -OLD_FILES+=usr/libexec/cc1plus OLD_LIBS+=usr/lib/libgomp.so.1 OLD_FILES+=usr/lib/libgomp_p.a OLD_FILES+=usr/lib32/libgcov.a From owner-svn-src-all@freebsd.org Thu Mar 5 18:05:45 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 68CFA26F9EF; Thu, 5 Mar 2020 18:05:45 +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 48YJZd2t9gz4GFq; Thu, 5 Mar 2020 18:05:45 +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 5C239B22E; Thu, 5 Mar 2020 18:05:45 +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 025I5j0K078224; Thu, 5 Mar 2020 18:05:45 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 025I5cRl078190; Thu, 5 Mar 2020 18:05:38 GMT (envelope-from dim@FreeBSD.org) Message-Id: <202003051805.025I5cRl078190@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Thu, 5 Mar 2020 18:05:38 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r358679 - in vendor/llvm-project/release-10.x: clang/include/clang/AST clang/include/clang/Sema clang/lib/AST clang/lib/Format clang/lib/Parse clang/lib/Sema lld/docs lldb/source/Plugin... X-SVN-Group: vendor X-SVN-Commit-Author: dim X-SVN-Commit-Paths: in vendor/llvm-project/release-10.x: clang/include/clang/AST clang/include/clang/Sema clang/lib/AST clang/lib/Format clang/lib/Parse clang/lib/Sema lld/docs lldb/source/Plugins/Process/gdb-remote llvm... X-SVN-Commit-Revision: 358679 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages 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, 05 Mar 2020 18:05:45 -0000 Author: dim Date: Thu Mar 5 18:05:37 2020 New Revision: 358679 URL: https://svnweb.freebsd.org/changeset/base/358679 Log: Vendor import of llvm-project branch release/10.x llvmorg-10.0.0-rc3-1-gc290cb61fdc. Added: vendor/llvm-project/release-10.x/llvm/include/llvm/Support/Windows/ vendor/llvm-project/release-10.x/llvm/include/llvm/Support/Windows/WindowsSupport.h (contents, props changed) Deleted: vendor/llvm-project/release-10.x/llvm/lib/Support/Windows/WindowsSupport.h Modified: vendor/llvm-project/release-10.x/clang/include/clang/AST/Expr.h vendor/llvm-project/release-10.x/clang/include/clang/Sema/Sema.h vendor/llvm-project/release-10.x/clang/lib/AST/ASTImporter.cpp vendor/llvm-project/release-10.x/clang/lib/Format/TokenAnnotator.cpp vendor/llvm-project/release-10.x/clang/lib/Parse/ParseExpr.cpp vendor/llvm-project/release-10.x/clang/lib/Sema/SemaExpr.cpp vendor/llvm-project/release-10.x/clang/lib/Sema/SemaExprCXX.cpp vendor/llvm-project/release-10.x/clang/lib/Sema/TreeTransform.h vendor/llvm-project/release-10.x/lld/docs/ReleaseNotes.rst vendor/llvm-project/release-10.x/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunication.cpp vendor/llvm-project/release-10.x/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationClient.cpp vendor/llvm-project/release-10.x/llvm/include/llvm/module.modulemap vendor/llvm-project/release-10.x/llvm/lib/Analysis/TargetLibraryInfo.cpp vendor/llvm-project/release-10.x/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp vendor/llvm-project/release-10.x/llvm/lib/Support/CRC.cpp vendor/llvm-project/release-10.x/llvm/lib/Support/Compression.cpp vendor/llvm-project/release-10.x/llvm/lib/Support/CrashRecoveryContext.cpp vendor/llvm-project/release-10.x/llvm/lib/Support/InitLLVM.cpp vendor/llvm-project/release-10.x/llvm/lib/Support/RandomNumberGenerator.cpp vendor/llvm-project/release-10.x/llvm/lib/Support/Windows/DynamicLibrary.inc vendor/llvm-project/release-10.x/llvm/lib/Support/Windows/Host.inc vendor/llvm-project/release-10.x/llvm/lib/Support/Windows/Memory.inc vendor/llvm-project/release-10.x/llvm/lib/Support/Windows/Path.inc vendor/llvm-project/release-10.x/llvm/lib/Support/Windows/Process.inc vendor/llvm-project/release-10.x/llvm/lib/Support/Windows/Program.inc vendor/llvm-project/release-10.x/llvm/lib/Support/Windows/Signals.inc vendor/llvm-project/release-10.x/llvm/lib/Support/Windows/ThreadLocal.inc vendor/llvm-project/release-10.x/llvm/lib/Support/Windows/Threading.inc vendor/llvm-project/release-10.x/llvm/lib/Support/raw_ostream.cpp vendor/llvm-project/release-10.x/llvm/lib/Transforms/InstCombine/InstCombinePHI.cpp vendor/llvm-project/release-10.x/llvm/lib/Transforms/Scalar/SROA.cpp vendor/llvm-project/release-10.x/llvm/tools/llvm-ar/llvm-ar.cpp Modified: vendor/llvm-project/release-10.x/clang/include/clang/AST/Expr.h ============================================================================== --- vendor/llvm-project/release-10.x/clang/include/clang/AST/Expr.h Thu Mar 5 17:55:36 2020 (r358678) +++ vendor/llvm-project/release-10.x/clang/include/clang/AST/Expr.h Thu Mar 5 18:05:37 2020 (r358679) @@ -3955,14 +3955,14 @@ class StmtExpr : public Expr { Stmt *SubStmt; SourceLocation LParenLoc, RParenLoc; public: - // FIXME: Does type-dependence need to be computed differently? - // FIXME: Do we need to compute instantiation instantiation-dependence for - // statements? (ugh!) StmtExpr(CompoundStmt *substmt, QualType T, - SourceLocation lp, SourceLocation rp) : + SourceLocation lp, SourceLocation rp, bool InDependentContext) : + // Note: we treat a statement-expression in a dependent context as always + // being value- and instantiation-dependent. This matches the behavior of + // lambda-expressions and GCC. Expr(StmtExprClass, T, VK_RValue, OK_Ordinary, - T->isDependentType(), false, false, false), - SubStmt(substmt), LParenLoc(lp), RParenLoc(rp) { } + T->isDependentType(), InDependentContext, InDependentContext, false), + SubStmt(substmt), LParenLoc(lp), RParenLoc(rp) {} /// Build an empty statement expression. explicit StmtExpr(EmptyShell Empty) : Expr(StmtExprClass, Empty) { } Modified: vendor/llvm-project/release-10.x/clang/include/clang/Sema/Sema.h ============================================================================== --- vendor/llvm-project/release-10.x/clang/include/clang/Sema/Sema.h Thu Mar 5 17:55:36 2020 (r358678) +++ vendor/llvm-project/release-10.x/clang/include/clang/Sema/Sema.h Thu Mar 5 18:05:37 2020 (r358679) @@ -4923,7 +4923,7 @@ class Sema final { (public) LabelDecl *TheDecl); void ActOnStartStmtExpr(); - ExprResult ActOnStmtExpr(SourceLocation LPLoc, Stmt *SubStmt, + ExprResult ActOnStmtExpr(Scope *S, SourceLocation LPLoc, Stmt *SubStmt, SourceLocation RPLoc); // "({..})" // Handle the final expression in a statement expression. ExprResult ActOnStmtExprResult(ExprResult E); Modified: vendor/llvm-project/release-10.x/clang/lib/AST/ASTImporter.cpp ============================================================================== --- vendor/llvm-project/release-10.x/clang/lib/AST/ASTImporter.cpp Thu Mar 5 17:55:36 2020 (r358678) +++ vendor/llvm-project/release-10.x/clang/lib/AST/ASTImporter.cpp Thu Mar 5 18:05:37 2020 (r358679) @@ -6724,8 +6724,9 @@ ExpectedStmt ASTNodeImporter::VisitStmtExpr(StmtExpr * SourceLocation ToLParenLoc, ToRParenLoc; std::tie(ToSubStmt, ToType, ToLParenLoc, ToRParenLoc) = *Imp; - return new (Importer.getToContext()) StmtExpr( - ToSubStmt, ToType, ToLParenLoc, ToRParenLoc); + return new (Importer.getToContext()) + StmtExpr(ToSubStmt, ToType, ToLParenLoc, ToRParenLoc, + E->isInstantiationDependent()); } ExpectedStmt ASTNodeImporter::VisitUnaryOperator(UnaryOperator *E) { Modified: vendor/llvm-project/release-10.x/clang/lib/Format/TokenAnnotator.cpp ============================================================================== --- vendor/llvm-project/release-10.x/clang/lib/Format/TokenAnnotator.cpp Thu Mar 5 17:55:36 2020 (r358678) +++ vendor/llvm-project/release-10.x/clang/lib/Format/TokenAnnotator.cpp Thu Mar 5 18:05:37 2020 (r358679) @@ -2707,10 +2707,17 @@ bool TokenAnnotator::spaceRequiredBetween(const Annota return false; if (Right.isOneOf(tok::star, tok::amp, tok::ampamp) && (Left.is(tok::identifier) || Left.isSimpleTypeSpecifier()) && - Left.Previous && Left.Previous->is(tok::kw_operator)) - // Space between the type and the * - // operator void*(), operator char*(), operator Foo*() dependant - // on PointerAlignment style. + // Space between the type and the * in: + // operator void*() + // operator char*() + // operator /*comment*/ const char*() + // operator volatile /*comment*/ char*() + // operator Foo*() + // dependent on PointerAlignment style. + Left.Previous && + (Left.Previous->endsSequence(tok::kw_operator) || + Left.Previous->endsSequence(tok::kw_const, tok::kw_operator) || + Left.Previous->endsSequence(tok::kw_volatile, tok::kw_operator))) return (Style.PointerAlignment != FormatStyle::PAS_Left); const auto SpaceRequiredForArrayInitializerLSquare = [](const FormatToken &LSquareTok, const FormatStyle &Style) { Modified: vendor/llvm-project/release-10.x/clang/lib/Parse/ParseExpr.cpp ============================================================================== --- vendor/llvm-project/release-10.x/clang/lib/Parse/ParseExpr.cpp Thu Mar 5 17:55:36 2020 (r358678) +++ vendor/llvm-project/release-10.x/clang/lib/Parse/ParseExpr.cpp Thu Mar 5 18:05:37 2020 (r358679) @@ -2655,7 +2655,8 @@ Parser::ParseParenExpression(ParenParseOption &ExprTyp // If the substmt parsed correctly, build the AST node. if (!Stmt.isInvalid()) { - Result = Actions.ActOnStmtExpr(OpenLoc, Stmt.get(), Tok.getLocation()); + Result = Actions.ActOnStmtExpr(getCurScope(), OpenLoc, Stmt.get(), + Tok.getLocation()); } else { Actions.ActOnStmtExprError(); } Modified: vendor/llvm-project/release-10.x/clang/lib/Sema/SemaExpr.cpp ============================================================================== --- vendor/llvm-project/release-10.x/clang/lib/Sema/SemaExpr.cpp Thu Mar 5 17:55:36 2020 (r358678) +++ vendor/llvm-project/release-10.x/clang/lib/Sema/SemaExpr.cpp Thu Mar 5 18:05:37 2020 (r358679) @@ -13908,9 +13908,8 @@ void Sema::ActOnStmtExprError() { PopExpressionEvaluationContext(); } -ExprResult -Sema::ActOnStmtExpr(SourceLocation LPLoc, Stmt *SubStmt, - SourceLocation RPLoc) { // "({..})" +ExprResult Sema::ActOnStmtExpr(Scope *S, SourceLocation LPLoc, Stmt *SubStmt, + SourceLocation RPLoc) { // "({..})" assert(SubStmt && isa(SubStmt) && "Invalid action invocation!"); CompoundStmt *Compound = cast(SubStmt); @@ -13939,9 +13938,18 @@ Sema::ActOnStmtExpr(SourceLocation LPLoc, Stmt *SubStm } } + bool IsDependentContext = false; + if (S) + IsDependentContext = S->getTemplateParamParent() != nullptr; + else + // FIXME: This is not correct when substituting inside a templated + // context that isn't a DeclContext (such as a variable template). + IsDependentContext = CurContext->isDependentContext(); + // FIXME: Check that expression type is complete/non-abstract; statement // expressions are not lvalues. - Expr *ResStmtExpr = new (Context) StmtExpr(Compound, Ty, LPLoc, RPLoc); + Expr *ResStmtExpr = + new (Context) StmtExpr(Compound, Ty, LPLoc, RPLoc, IsDependentContext); if (StmtExprMayBindToTemp) return MaybeBindToTemporary(ResStmtExpr); return ResStmtExpr; Modified: vendor/llvm-project/release-10.x/clang/lib/Sema/SemaExprCXX.cpp ============================================================================== --- vendor/llvm-project/release-10.x/clang/lib/Sema/SemaExprCXX.cpp Thu Mar 5 17:55:36 2020 (r358678) +++ vendor/llvm-project/release-10.x/clang/lib/Sema/SemaExprCXX.cpp Thu Mar 5 18:05:37 2020 (r358679) @@ -6800,8 +6800,9 @@ Stmt *Sema::MaybeCreateStmtWithCleanups(Stmt *SubStmt) // a new AsmStmtWithTemporaries. CompoundStmt *CompStmt = CompoundStmt::Create( Context, SubStmt, SourceLocation(), SourceLocation()); - Expr *E = new (Context) StmtExpr(CompStmt, Context.VoidTy, SourceLocation(), - SourceLocation()); + Expr *E = new (Context) + StmtExpr(CompStmt, Context.VoidTy, SourceLocation(), SourceLocation(), + CurContext->isDependentContext()); return MaybeCreateExprWithCleanups(E); } Modified: vendor/llvm-project/release-10.x/clang/lib/Sema/TreeTransform.h ============================================================================== --- vendor/llvm-project/release-10.x/clang/lib/Sema/TreeTransform.h Thu Mar 5 17:55:36 2020 (r358678) +++ vendor/llvm-project/release-10.x/clang/lib/Sema/TreeTransform.h Thu Mar 5 18:05:37 2020 (r358679) @@ -2526,10 +2526,9 @@ class TreeTransform { (public) /// /// By default, performs semantic analysis to build the new expression. /// Subclasses may override this routine to provide different behavior. - ExprResult RebuildStmtExpr(SourceLocation LParenLoc, - Stmt *SubStmt, - SourceLocation RParenLoc) { - return getSema().ActOnStmtExpr(LParenLoc, SubStmt, RParenLoc); + ExprResult RebuildStmtExpr(SourceLocation LParenLoc, Stmt *SubStmt, + SourceLocation RParenLoc) { + return getSema().ActOnStmtExpr(nullptr, LParenLoc, SubStmt, RParenLoc); } /// Build a new __builtin_choose_expr expression. @@ -11801,6 +11800,8 @@ TreeTransform::TransformLambdaExpr(LambdaExpr NewTrailingRequiresClause = getDerived().TransformExpr(TRC); // Create the local class that will describe the lambda. + // FIXME: KnownDependent below is wrong when substituting inside a templated + // context that isn't a DeclContext (such as a variable template). CXXRecordDecl *OldClass = E->getLambdaClass(); CXXRecordDecl *Class = getSema().createLambdaClosureType(E->getIntroducerRange(), Modified: vendor/llvm-project/release-10.x/lld/docs/ReleaseNotes.rst ============================================================================== --- vendor/llvm-project/release-10.x/lld/docs/ReleaseNotes.rst Thu Mar 5 17:55:36 2020 (r358678) +++ vendor/llvm-project/release-10.x/lld/docs/ReleaseNotes.rst Thu Mar 5 18:05:37 2020 (r358679) @@ -5,10 +5,6 @@ lld 10.0.0 Release Notes .. contents:: :local: -.. warning:: - These are in-progress notes for the upcoming LLVM 10.0.0 release. - Release notes for previous releases can be found on - `the Download Page `_. Introduction ============ @@ -33,51 +29,95 @@ ELF Improvements * New ``elf32btsmipn32_fbsd`` and ``elf32ltsmipn32_fbsd`` emulations are supported. -* Relax MIPS ``jalr``and ``jr`` instructions marked by the ``R_MIPS_JALR`` +* Relax MIPS ``jalr`` and ``jr`` instructions marked by the ``R_MIPS_JALR`` relocation. +* For certain "undefined symbol" errors, a definition with a close spelling will be suggested. + (`D67039 `_) +* ``extern "C"`` is suggested if an undefined reference is mangled(unmangled) while there + is a likely unmangled(mangled) definition. + (`D69592 `_ `D69650 `_) +* New ``-z noseparate-code``, ``-z separate-code`` and ``-z separate-loadable-segments``. + ``-z noseparate-code`` is the default, which can reduce sizes of linked binaries by up to + 3 times maxpagesize. + (`D64903 `_ `D67481 `_) +* ``-z force-bti`` and ``-z pac-plt`` are added for AArch64 Branch Target Identification and Pointer Authentication. + (`D62609 `_) +* ``--fix-cortex-a8`` is added to fix erratum 657417. + (`D67284 `_) +* ``-z force-ibt`` and ``-z shstk`` are added for Intel Control-flow Enforcement Technology. + (`D59780 `_) +* ``PT_GNU_PROPERTY`` is added to help loaders locate the ``.note.gnu.property`` section. + It may be used by a future Linux kernel. + (`D70961 `_) +* For ``--compress-debug-sections=zlib``, ``-O0`` and ``-O1`` enable compression level 1 + while ``-O2`` enables compression level 6. ``-O1`` (default) is faster than before. + (`D70658 `_) +* Range extension thunks with addends are implemented for AArch64, PowerPC32 and PowerPC64. + (`D70637 `_ `D70937 `_ + `D73424 `_) +* ``R_RISCV_ALIGN`` will be errored because linker relaxation for RISC-V is not supported. + Pass ``-mno-relax`` to disable ``R_RISCV_ALIGN``. + (`D71820 `_) +* The ARM port will no longer insert interworking thunks for non STT_FUNC symbols. + (`D73474 `_) +* The quality of PowerPC32 port has been greatly improved (canonical PLT, copy + relocations, non-preemptible IFUNC, range extension thunks with addends). + It can link FreeBSD 13.0 userland. +* The PowerPC64 port supports non-preemptible IFUNC. + (`D71509 `_) +* lld creates a RO PT_LOAD and a RX PT_LOAD without a linker script. + lld creates a unified RX PT_LOAD with a linker script. + A future release will eliminate this difference and use a RO PT_LOAD and a RX PT_LOAD by default. + The linker script case will require ``--no-rosegment`` to restore the current behavior. +* GNU style compressed debug sections ``.zdebug`` (obsoleted by ``SHF_COMPRESSED``) + are supported for input files, but not for the output. + A future release may drop ``.zdebug`` support. -* Reduced size of linked MIPS binaries. +Breaking changes +---------------- -COFF Improvements ------------------ +* ``-Ttext=$base`` (base is usually 0) is no longer supported. + If PT_PHDR is needed, use ``--image-base=$base`` instead. + If PT_PHDR is not needed, use a linker script with `.text 0 : { *(.text*) }` as the first + output section description. + See https://bugs.llvm.org/show_bug.cgi?id=44715 for more information. + (`D67325 `_) +* ``-Ttext-segment`` is no longer supported. Its meaning was different from GNU ld's and + could cause subtle bugs. + (`D70468 `_) -* ... MinGW Improvements ------------------ * Allow using custom .edata sections from input object files (for use by Wine) - (`dadc6f248868 `) + (`dadc6f248868 `_) * Don't implicitly create import libraries unless requested - (`6540e55067e3 `) + (`6540e55067e3 `_) * Support merging multiple resource object files - (`3d3a9b3b413d `) + (`3d3a9b3b413d `_) and properly handle the default manifest object files that GCC can pass - (`d581dd501381 `) + (`d581dd501381 `_) * Demangle itanium symbol names in warnings/error messages - (`a66fc1c99f3e `) + (`a66fc1c99f3e `_) * Print source locations for undefined references and duplicate symbols, if possible - (`1d06d48bb346 `) + (`1d06d48bb346 `_) and - (`b38f577c015c `) + (`b38f577c015c `_) * Look for more filename patterns when resolving ``-l`` options - (`0226c35262df `) + (`0226c35262df `_) * Don't error out on duplicate absolute symbols with the same value (which can happen for the default-null symbol for weak symbols) - (`1737cc750c46 `) + (`1737cc750c46 `_) -MachO Improvements ------------------- - -* Item 1. WebAssembly Improvements ------------------------ Modified: vendor/llvm-project/release-10.x/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunication.cpp ============================================================================== --- vendor/llvm-project/release-10.x/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunication.cpp Thu Mar 5 17:55:36 2020 (r358678) +++ vendor/llvm-project/release-10.x/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunication.cpp Thu Mar 5 18:05:37 2020 (r358679) @@ -50,7 +50,7 @@ #include #endif -#if LLVM_ENABLE_ZLIB +#if defined(HAVE_LIBZ) #include #endif @@ -582,7 +582,7 @@ bool GDBRemoteCommunication::DecompressPacket() { } #endif -#if LLVM_ENABLE_ZLIB +#if defined(HAVE_LIBZ) if (decompressed_bytes == 0 && decompressed_bufsize != ULONG_MAX && decompressed_buffer != nullptr && m_compression_type == CompressionType::ZlibDeflate) { Modified: vendor/llvm-project/release-10.x/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationClient.cpp ============================================================================== --- vendor/llvm-project/release-10.x/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationClient.cpp Thu Mar 5 17:55:36 2020 (r358678) +++ vendor/llvm-project/release-10.x/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationClient.cpp Thu Mar 5 18:05:37 2020 (r358679) @@ -1045,7 +1045,7 @@ void GDBRemoteCommunicationClient::MaybeEnableCompress } #endif -#if LLVM_ENABLE_ZLIB +#if defined(HAVE_LIBZ) if (avail_type == CompressionType::None) { for (auto compression : supported_compressions) { if (compression == "zlib-deflate") { Added: vendor/llvm-project/release-10.x/llvm/include/llvm/Support/Windows/WindowsSupport.h ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ vendor/llvm-project/release-10.x/llvm/include/llvm/Support/Windows/WindowsSupport.h Thu Mar 5 18:05:37 2020 (r358679) @@ -0,0 +1,243 @@ +//===- WindowsSupport.h - Common Windows Include File -----------*- C++ -*-===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// +//===----------------------------------------------------------------------===// +// +// This file defines things specific to Windows implementations. In addition to +// providing some helpers for working with win32 APIs, this header wraps +// with some portability macros. Always include WindowsSupport.h +// instead of including directly. +// +//===----------------------------------------------------------------------===// + +//===----------------------------------------------------------------------===// +//=== WARNING: Implementation here must contain only generic Win32 code that +//=== is guaranteed to work on *all* Win32 variants. +//===----------------------------------------------------------------------===// + +#ifndef LLVM_SUPPORT_WINDOWSSUPPORT_H +#define LLVM_SUPPORT_WINDOWSSUPPORT_H + +// mingw-w64 tends to define it as 0x0502 in its headers. +#undef _WIN32_WINNT +#undef _WIN32_IE + +// Require at least Windows 7 API. +#define _WIN32_WINNT 0x0601 +#define _WIN32_IE 0x0800 // MinGW at it again. FIXME: verify if still needed. +#define WIN32_LEAN_AND_MEAN +#ifndef NOMINMAX +#define NOMINMAX +#endif + +#include "llvm/ADT/SmallVector.h" +#include "llvm/ADT/StringExtras.h" +#include "llvm/ADT/StringRef.h" +#include "llvm/ADT/Twine.h" +#include "llvm/Config/config.h" // Get build system configuration settings +#include "llvm/Support/Allocator.h" +#include "llvm/Support/Chrono.h" +#include "llvm/Support/Compiler.h" +#include "llvm/Support/ErrorHandling.h" +#include "llvm/Support/VersionTuple.h" +#include +#include +#include +#include + +// Must be included after windows.h +#include + +namespace llvm { + +/// Determines if the program is running on Windows 8 or newer. This +/// reimplements one of the helpers in the Windows 8.1 SDK, which are intended +/// to supercede raw calls to GetVersionEx. Old SDKs, Cygwin, and MinGW don't +/// yet have VersionHelpers.h, so we have our own helper. +bool RunningWindows8OrGreater(); + +/// Returns the Windows version as Major.Minor.0.BuildNumber. Uses +/// RtlGetVersion or GetVersionEx under the hood depending on what is available. +/// GetVersionEx is deprecated, but this API exposes the build number which can +/// be useful for working around certain kernel bugs. +llvm::VersionTuple GetWindowsOSVersion(); + +bool MakeErrMsg(std::string *ErrMsg, const std::string &prefix); + +// Include GetLastError() in a fatal error message. +LLVM_ATTRIBUTE_NORETURN inline void ReportLastErrorFatal(const char *Msg) { + std::string ErrMsg; + MakeErrMsg(&ErrMsg, Msg); + llvm::report_fatal_error(ErrMsg); +} + +template +class ScopedHandle { + typedef typename HandleTraits::handle_type handle_type; + handle_type Handle; + + ScopedHandle(const ScopedHandle &other) = delete; + void operator=(const ScopedHandle &other) = delete; +public: + ScopedHandle() + : Handle(HandleTraits::GetInvalid()) {} + + explicit ScopedHandle(handle_type h) + : Handle(h) {} + + ~ScopedHandle() { + if (HandleTraits::IsValid(Handle)) + HandleTraits::Close(Handle); + } + + handle_type take() { + handle_type t = Handle; + Handle = HandleTraits::GetInvalid(); + return t; + } + + ScopedHandle &operator=(handle_type h) { + if (HandleTraits::IsValid(Handle)) + HandleTraits::Close(Handle); + Handle = h; + return *this; + } + + // True if Handle is valid. + explicit operator bool() const { + return HandleTraits::IsValid(Handle) ? true : false; + } + + operator handle_type() const { + return Handle; + } +}; + +struct CommonHandleTraits { + typedef HANDLE handle_type; + + static handle_type GetInvalid() { + return INVALID_HANDLE_VALUE; + } + + static void Close(handle_type h) { + ::CloseHandle(h); + } + + static bool IsValid(handle_type h) { + return h != GetInvalid(); + } +}; + +struct JobHandleTraits : CommonHandleTraits { + static handle_type GetInvalid() { + return NULL; + } +}; + +struct CryptContextTraits : CommonHandleTraits { + typedef HCRYPTPROV handle_type; + + static handle_type GetInvalid() { + return 0; + } + + static void Close(handle_type h) { + ::CryptReleaseContext(h, 0); + } + + static bool IsValid(handle_type h) { + return h != GetInvalid(); + } +}; + +struct RegTraits : CommonHandleTraits { + typedef HKEY handle_type; + + static handle_type GetInvalid() { + return NULL; + } + + static void Close(handle_type h) { + ::RegCloseKey(h); + } + + static bool IsValid(handle_type h) { + return h != GetInvalid(); + } +}; + +struct FindHandleTraits : CommonHandleTraits { + static void Close(handle_type h) { + ::FindClose(h); + } +}; + +struct FileHandleTraits : CommonHandleTraits {}; + +typedef ScopedHandle ScopedCommonHandle; +typedef ScopedHandle ScopedFileHandle; +typedef ScopedHandle ScopedCryptContext; +typedef ScopedHandle ScopedRegHandle; +typedef ScopedHandle ScopedFindHandle; +typedef ScopedHandle ScopedJobHandle; + +template +class SmallVectorImpl; + +template +typename SmallVectorImpl::const_pointer +c_str(SmallVectorImpl &str) { + str.push_back(0); + str.pop_back(); + return str.data(); +} + +namespace sys { + +inline std::chrono::nanoseconds toDuration(FILETIME Time) { + ULARGE_INTEGER TimeInteger; + TimeInteger.LowPart = Time.dwLowDateTime; + TimeInteger.HighPart = Time.dwHighDateTime; + + // FILETIME's are # of 100 nanosecond ticks (1/10th of a microsecond) + return std::chrono::nanoseconds(100 * TimeInteger.QuadPart); +} + +inline TimePoint<> toTimePoint(FILETIME Time) { + ULARGE_INTEGER TimeInteger; + TimeInteger.LowPart = Time.dwLowDateTime; + TimeInteger.HighPart = Time.dwHighDateTime; + + // Adjust for different epoch + TimeInteger.QuadPart -= 11644473600ll * 10000000; + + // FILETIME's are # of 100 nanosecond ticks (1/10th of a microsecond) + return TimePoint<>(std::chrono::nanoseconds(100 * TimeInteger.QuadPart)); +} + +inline FILETIME toFILETIME(TimePoint<> TP) { + ULARGE_INTEGER TimeInteger; + TimeInteger.QuadPart = TP.time_since_epoch().count() / 100; + TimeInteger.QuadPart += 11644473600ll * 10000000; + + FILETIME Time; + Time.dwLowDateTime = TimeInteger.LowPart; + Time.dwHighDateTime = TimeInteger.HighPart; + return Time; +} + +namespace windows { +// Returns command line arguments. Unlike arguments given to main(), +// this function guarantees that the returned arguments are encoded in +// UTF-8 regardless of the current code page setting. +std::error_code GetCommandLineArguments(SmallVectorImpl &Args, + BumpPtrAllocator &Alloc); +} // end namespace windows +} // end namespace sys +} // end namespace llvm. + +#endif Modified: vendor/llvm-project/release-10.x/llvm/include/llvm/module.modulemap ============================================================================== --- vendor/llvm-project/release-10.x/llvm/include/llvm/module.modulemap Thu Mar 5 17:55:36 2020 (r358678) +++ vendor/llvm-project/release-10.x/llvm/include/llvm/module.modulemap Thu Mar 5 18:05:37 2020 (r358679) @@ -380,6 +380,9 @@ module LLVM_Utils { umbrella "Support" module * { export * } + + // Exclude this; it should only be used on Windows. + exclude header "Support/Windows/WindowsSupport.h" // Exclude these; they are fundamentally non-modular. exclude header "Support/PluginLoader.h" Modified: vendor/llvm-project/release-10.x/llvm/lib/Analysis/TargetLibraryInfo.cpp ============================================================================== --- vendor/llvm-project/release-10.x/llvm/lib/Analysis/TargetLibraryInfo.cpp Thu Mar 5 17:55:36 2020 (r358678) +++ vendor/llvm-project/release-10.x/llvm/lib/Analysis/TargetLibraryInfo.cpp Thu Mar 5 18:05:37 2020 (r358679) @@ -470,6 +470,9 @@ static void initialize(TargetLibraryInfoImpl &TLI, con TLI.setUnavailable(LibFunc_tmpfile64); // Relaxed math functions are included in math-finite.h on Linux (GLIBC). + // Note that math-finite.h is no longer supported by top-of-tree GLIBC, + // so we keep these functions around just so that they're recognized by + // the ConstantFolder. TLI.setUnavailable(LibFunc_acos_finite); TLI.setUnavailable(LibFunc_acosf_finite); TLI.setUnavailable(LibFunc_acosl_finite); Modified: vendor/llvm-project/release-10.x/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp ============================================================================== --- vendor/llvm-project/release-10.x/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp Thu Mar 5 17:55:36 2020 (r358678) +++ vendor/llvm-project/release-10.x/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp Thu Mar 5 18:05:37 2020 (r358679) @@ -3867,7 +3867,6 @@ void SelectionDAGLegalize::ConvertNodeToLibcall(SDNode SmallVector Results; SDLoc dl(Node); // FIXME: Check flags on the node to see if we can use a finite call. - bool CanUseFiniteLibCall = TM.Options.NoInfsFPMath && TM.Options.NoNaNsFPMath; unsigned Opc = Node->getOpcode(); switch (Opc) { case ISD::ATOMIC_FENCE: { @@ -3976,68 +3975,28 @@ void SelectionDAGLegalize::ConvertNodeToLibcall(SDNode break; case ISD::FLOG: case ISD::STRICT_FLOG: - if (CanUseFiniteLibCall && DAG.getLibInfo().has(LibFunc_log_finite)) - ExpandFPLibCall(Node, RTLIB::LOG_FINITE_F32, - RTLIB::LOG_FINITE_F64, - RTLIB::LOG_FINITE_F80, - RTLIB::LOG_FINITE_F128, - RTLIB::LOG_FINITE_PPCF128, Results); - else - ExpandFPLibCall(Node, RTLIB::LOG_F32, RTLIB::LOG_F64, - RTLIB::LOG_F80, RTLIB::LOG_F128, - RTLIB::LOG_PPCF128, Results); + ExpandFPLibCall(Node, RTLIB::LOG_F32, RTLIB::LOG_F64, RTLIB::LOG_F80, + RTLIB::LOG_F128, RTLIB::LOG_PPCF128, Results); break; case ISD::FLOG2: case ISD::STRICT_FLOG2: - if (CanUseFiniteLibCall && DAG.getLibInfo().has(LibFunc_log2_finite)) - ExpandFPLibCall(Node, RTLIB::LOG2_FINITE_F32, - RTLIB::LOG2_FINITE_F64, - RTLIB::LOG2_FINITE_F80, - RTLIB::LOG2_FINITE_F128, - RTLIB::LOG2_FINITE_PPCF128, Results); - else - ExpandFPLibCall(Node, RTLIB::LOG2_F32, RTLIB::LOG2_F64, - RTLIB::LOG2_F80, RTLIB::LOG2_F128, - RTLIB::LOG2_PPCF128, Results); + ExpandFPLibCall(Node, RTLIB::LOG2_F32, RTLIB::LOG2_F64, RTLIB::LOG2_F80, + RTLIB::LOG2_F128, RTLIB::LOG2_PPCF128, Results); break; case ISD::FLOG10: case ISD::STRICT_FLOG10: - if (CanUseFiniteLibCall && DAG.getLibInfo().has(LibFunc_log10_finite)) - ExpandFPLibCall(Node, RTLIB::LOG10_FINITE_F32, - RTLIB::LOG10_FINITE_F64, - RTLIB::LOG10_FINITE_F80, - RTLIB::LOG10_FINITE_F128, - RTLIB::LOG10_FINITE_PPCF128, Results); - else - ExpandFPLibCall(Node, RTLIB::LOG10_F32, RTLIB::LOG10_F64, - RTLIB::LOG10_F80, RTLIB::LOG10_F128, - RTLIB::LOG10_PPCF128, Results); + ExpandFPLibCall(Node, RTLIB::LOG10_F32, RTLIB::LOG10_F64, RTLIB::LOG10_F80, + RTLIB::LOG10_F128, RTLIB::LOG10_PPCF128, Results); break; case ISD::FEXP: case ISD::STRICT_FEXP: - if (CanUseFiniteLibCall && DAG.getLibInfo().has(LibFunc_exp_finite)) - ExpandFPLibCall(Node, RTLIB::EXP_FINITE_F32, - RTLIB::EXP_FINITE_F64, - RTLIB::EXP_FINITE_F80, - RTLIB::EXP_FINITE_F128, - RTLIB::EXP_FINITE_PPCF128, Results); - else - ExpandFPLibCall(Node, RTLIB::EXP_F32, RTLIB::EXP_F64, - RTLIB::EXP_F80, RTLIB::EXP_F128, - RTLIB::EXP_PPCF128, Results); + ExpandFPLibCall(Node, RTLIB::EXP_F32, RTLIB::EXP_F64, RTLIB::EXP_F80, + RTLIB::EXP_F128, RTLIB::EXP_PPCF128, Results); break; case ISD::FEXP2: case ISD::STRICT_FEXP2: - if (CanUseFiniteLibCall && DAG.getLibInfo().has(LibFunc_exp2_finite)) - ExpandFPLibCall(Node, RTLIB::EXP2_FINITE_F32, - RTLIB::EXP2_FINITE_F64, - RTLIB::EXP2_FINITE_F80, - RTLIB::EXP2_FINITE_F128, - RTLIB::EXP2_FINITE_PPCF128, Results); - else - ExpandFPLibCall(Node, RTLIB::EXP2_F32, RTLIB::EXP2_F64, - RTLIB::EXP2_F80, RTLIB::EXP2_F128, - RTLIB::EXP2_PPCF128, Results); + ExpandFPLibCall(Node, RTLIB::EXP2_F32, RTLIB::EXP2_F64, RTLIB::EXP2_F80, + RTLIB::EXP2_F128, RTLIB::EXP2_PPCF128, Results); break; case ISD::FTRUNC: case ISD::STRICT_FTRUNC: @@ -4107,16 +4066,8 @@ void SelectionDAGLegalize::ConvertNodeToLibcall(SDNode } case ISD::FPOW: case ISD::STRICT_FPOW: - if (CanUseFiniteLibCall && DAG.getLibInfo().has(LibFunc_pow_finite)) - ExpandFPLibCall(Node, RTLIB::POW_FINITE_F32, - RTLIB::POW_FINITE_F64, - RTLIB::POW_FINITE_F80, - RTLIB::POW_FINITE_F128, - RTLIB::POW_FINITE_PPCF128, Results); - else - ExpandFPLibCall(Node, RTLIB::POW_F32, RTLIB::POW_F64, - RTLIB::POW_F80, RTLIB::POW_F128, - RTLIB::POW_PPCF128, Results); + ExpandFPLibCall(Node, RTLIB::POW_F32, RTLIB::POW_F64, RTLIB::POW_F80, + RTLIB::POW_F128, RTLIB::POW_PPCF128, Results); break; case ISD::LROUND: case ISD::STRICT_LROUND: Modified: vendor/llvm-project/release-10.x/llvm/lib/Support/CRC.cpp ============================================================================== --- vendor/llvm-project/release-10.x/llvm/lib/Support/CRC.cpp Thu Mar 5 17:55:36 2020 (r358678) +++ vendor/llvm-project/release-10.x/llvm/lib/Support/CRC.cpp Thu Mar 5 18:05:37 2020 (r358679) @@ -25,7 +25,7 @@ using namespace llvm; -#if !LLVM_ENABLE_ZLIB +#if LLVM_ENABLE_ZLIB == 0 || !HAVE_ZLIB_H static const uint32_t CRCTable[256] = { 0x00000000, 0x77073096, 0xee0e612c, 0x990951ba, 0x076dc419, 0x706af48f, Modified: vendor/llvm-project/release-10.x/llvm/lib/Support/Compression.cpp ============================================================================== --- vendor/llvm-project/release-10.x/llvm/lib/Support/Compression.cpp Thu Mar 5 17:55:36 2020 (r358678) +++ vendor/llvm-project/release-10.x/llvm/lib/Support/Compression.cpp Thu Mar 5 18:05:37 2020 (r358679) @@ -17,13 +17,13 @@ #include "llvm/Support/Compiler.h" #include "llvm/Support/Error.h" #include "llvm/Support/ErrorHandling.h" -#if LLVM_ENABLE_ZLIB +#if LLVM_ENABLE_ZLIB == 1 && HAVE_ZLIB_H #include #endif using namespace llvm; -#if LLVM_ENABLE_ZLIB +#if LLVM_ENABLE_ZLIB == 1 && HAVE_LIBZ static Error createError(StringRef Err) { return make_error(Err, inconvertibleErrorCode()); } Modified: vendor/llvm-project/release-10.x/llvm/lib/Support/CrashRecoveryContext.cpp ============================================================================== --- vendor/llvm-project/release-10.x/llvm/lib/Support/CrashRecoveryContext.cpp Thu Mar 5 17:55:36 2020 (r358678) +++ vendor/llvm-project/release-10.x/llvm/lib/Support/CrashRecoveryContext.cpp Thu Mar 5 18:05:37 2020 (r358679) @@ -254,7 +254,7 @@ bool CrashRecoveryContext::RunSafely(function_ref #ifdef _WIN32 -#include "Windows/WindowsSupport.h" +#include "llvm/Support/Windows/WindowsSupport.h" #endif using namespace llvm; Modified: vendor/llvm-project/release-10.x/llvm/lib/Support/RandomNumberGenerator.cpp ============================================================================== --- vendor/llvm-project/release-10.x/llvm/lib/Support/RandomNumberGenerator.cpp Thu Mar 5 17:55:36 2020 (r358678) +++ vendor/llvm-project/release-10.x/llvm/lib/Support/RandomNumberGenerator.cpp Thu Mar 5 18:05:37 2020 (r358679) @@ -17,7 +17,7 @@ #include "llvm/Support/Debug.h" #include "llvm/Support/raw_ostream.h" #ifdef _WIN32 -#include "Windows/WindowsSupport.h" +#include "llvm/Support/Windows/WindowsSupport.h" #else #include "Unix/Unix.h" #endif Modified: vendor/llvm-project/release-10.x/llvm/lib/Support/Windows/DynamicLibrary.inc ============================================================================== --- vendor/llvm-project/release-10.x/llvm/lib/Support/Windows/DynamicLibrary.inc Thu Mar 5 17:55:36 2020 (r358678) +++ vendor/llvm-project/release-10.x/llvm/lib/Support/Windows/DynamicLibrary.inc Thu Mar 5 18:05:37 2020 (r358679) @@ -10,7 +10,7 @@ // //===----------------------------------------------------------------------===// -#include "WindowsSupport.h" +#include "llvm/Support/Windows/WindowsSupport.h" #include "llvm/Support/ConvertUTF.h" #include "llvm/Support/raw_ostream.h" Modified: vendor/llvm-project/release-10.x/llvm/lib/Support/Windows/Host.inc ============================================================================== --- vendor/llvm-project/release-10.x/llvm/lib/Support/Windows/Host.inc Thu Mar 5 17:55:36 2020 (r358678) +++ vendor/llvm-project/release-10.x/llvm/lib/Support/Windows/Host.inc Thu Mar 5 18:05:37 2020 (r358679) @@ -10,7 +10,7 @@ // //===----------------------------------------------------------------------===// -#include "WindowsSupport.h" +#include "llvm/Support/Windows/WindowsSupport.h" #include #include Modified: vendor/llvm-project/release-10.x/llvm/lib/Support/Windows/Memory.inc ============================================================================== --- vendor/llvm-project/release-10.x/llvm/lib/Support/Windows/Memory.inc Thu Mar 5 17:55:36 2020 (r358678) +++ vendor/llvm-project/release-10.x/llvm/lib/Support/Windows/Memory.inc Thu Mar 5 18:05:37 2020 (r358679) @@ -17,7 +17,7 @@ #include "llvm/Support/WindowsError.h" // The Windows.h header must be the last one included. -#include "WindowsSupport.h" +#include "llvm/Support/Windows/WindowsSupport.h" static DWORD getWindowsProtectionFlags(unsigned Flags) { switch (Flags & llvm::sys::Memory::MF_RWE_MASK) { Modified: vendor/llvm-project/release-10.x/llvm/lib/Support/Windows/Path.inc ============================================================================== --- vendor/llvm-project/release-10.x/llvm/lib/Support/Windows/Path.inc Thu Mar 5 17:55:36 2020 (r358678) +++ vendor/llvm-project/release-10.x/llvm/lib/Support/Windows/Path.inc Thu Mar 5 18:05:37 2020 (r358679) @@ -25,7 +25,7 @@ // These two headers must be included last, and make sure shlobj is required // after Windows.h to make sure it picks up our definition of _WIN32_WINNT -#include "WindowsSupport.h" +#include "llvm/Support/Windows/WindowsSupport.h" #include #include Modified: vendor/llvm-project/release-10.x/llvm/lib/Support/Windows/Process.inc ============================================================================== --- vendor/llvm-project/release-10.x/llvm/lib/Support/Windows/Process.inc Thu Mar 5 17:55:36 2020 (r358678) +++ vendor/llvm-project/release-10.x/llvm/lib/Support/Windows/Process.inc Thu Mar 5 18:05:37 2020 (r358679) @@ -19,7 +19,7 @@ #include // The Windows.h header must be after LLVM and standard headers. -#include "WindowsSupport.h" +#include "llvm/Support/Windows/WindowsSupport.h" #include #include Modified: vendor/llvm-project/release-10.x/llvm/lib/Support/Windows/Program.inc ============================================================================== --- vendor/llvm-project/release-10.x/llvm/lib/Support/Windows/Program.inc Thu Mar 5 17:55:36 2020 (r358678) +++ vendor/llvm-project/release-10.x/llvm/lib/Support/Windows/Program.inc Thu Mar 5 18:05:37 2020 (r358679) @@ -10,7 +10,7 @@ // //===----------------------------------------------------------------------===// -#include "WindowsSupport.h" +#include "llvm/Support/Windows/WindowsSupport.h" #include "llvm/ADT/StringExtras.h" #include "llvm/Support/ConvertUTF.h" #include "llvm/Support/Errc.h" Modified: vendor/llvm-project/release-10.x/llvm/lib/Support/Windows/Signals.inc ============================================================================== --- vendor/llvm-project/release-10.x/llvm/lib/Support/Windows/Signals.inc Thu Mar 5 17:55:36 2020 (r358678) +++ vendor/llvm-project/release-10.x/llvm/lib/Support/Windows/Signals.inc Thu Mar 5 18:05:37 2020 (r358679) @@ -23,7 +23,7 @@ #include "llvm/Support/raw_ostream.h" // The Windows.h header must be after LLVM and standard headers. -#include "WindowsSupport.h" +#include "llvm/Support/Windows/WindowsSupport.h" #ifdef __MINGW32__ #include Modified: vendor/llvm-project/release-10.x/llvm/lib/Support/Windows/ThreadLocal.inc ============================================================================== --- vendor/llvm-project/release-10.x/llvm/lib/Support/Windows/ThreadLocal.inc Thu Mar 5 17:55:36 2020 (r358678) +++ vendor/llvm-project/release-10.x/llvm/lib/Support/Windows/ThreadLocal.inc Thu Mar 5 18:05:37 2020 (r358679) @@ -15,7 +15,7 @@ //=== is guaranteed to work on *all* Win32 variants. //===----------------------------------------------------------------------===// -#include "WindowsSupport.h" +#include "llvm/Support/Windows/WindowsSupport.h" #include "llvm/Support/ThreadLocal.h" namespace llvm { Modified: vendor/llvm-project/release-10.x/llvm/lib/Support/Windows/Threading.inc ============================================================================== --- vendor/llvm-project/release-10.x/llvm/lib/Support/Windows/Threading.inc Thu Mar 5 17:55:36 2020 (r358678) +++ vendor/llvm-project/release-10.x/llvm/lib/Support/Windows/Threading.inc Thu Mar 5 18:05:37 2020 (r358679) @@ -13,7 +13,7 @@ #include "llvm/ADT/SmallString.h" #include "llvm/ADT/Twine.h" -#include "WindowsSupport.h" +#include "llvm/Support/Windows/WindowsSupport.h" #include // Windows will at times define MemoryFence. Modified: vendor/llvm-project/release-10.x/llvm/lib/Support/raw_ostream.cpp ============================================================================== --- vendor/llvm-project/release-10.x/llvm/lib/Support/raw_ostream.cpp Thu Mar 5 17:55:36 2020 (r358678) +++ vendor/llvm-project/release-10.x/llvm/lib/Support/raw_ostream.cpp Thu Mar 5 18:05:37 2020 (r358679) @@ -60,7 +60,7 @@ #ifdef _WIN32 #include "llvm/Support/ConvertUTF.h" -#include "Windows/WindowsSupport.h" +#include "llvm/Support/Windows/WindowsSupport.h" #endif using namespace llvm; Modified: vendor/llvm-project/release-10.x/llvm/lib/Transforms/InstCombine/InstCombinePHI.cpp ============================================================================== --- vendor/llvm-project/release-10.x/llvm/lib/Transforms/InstCombine/InstCombinePHI.cpp Thu Mar 5 17:55:36 2020 (r358678) +++ vendor/llvm-project/release-10.x/llvm/lib/Transforms/InstCombine/InstCombinePHI.cpp Thu Mar 5 18:05:37 2020 (r358679) @@ -218,13 +218,21 @@ Instruction *InstCombiner::FoldIntegerTypedPHI(PHINode return nullptr; // If any of the operand that requires casting is a terminator - // instruction, do not do it. + // instruction, do not do it. Similarly, do not do the transform if the value + // is PHI in a block with no insertion point, for example, a catchswitch + // block, since we will not be able to insert a cast after the PHI. if (any_of(AvailablePtrVals, [&](Value *V) { if (V->getType() == IntToPtr->getType()) return false; - auto *Inst = dyn_cast(V); - return Inst && Inst->isTerminator(); + if (!Inst) + return false; + if (Inst->isTerminator()) + return true; + auto *BB = Inst->getParent(); + if (isa(Inst) && BB->getFirstInsertionPt() == BB->end()) + return true; + return false; })) return nullptr; @@ -264,8 +272,10 @@ Instruction *InstCombiner::FoldIntegerTypedPHI(PHINode if (auto *IncomingI = dyn_cast(IncomingVal)) { BasicBlock::iterator InsertPos(IncomingI); InsertPos++; + BasicBlock *BB = IncomingI->getParent(); if (isa(IncomingI)) - InsertPos = IncomingI->getParent()->getFirstInsertionPt(); + InsertPos = BB->getFirstInsertionPt(); + assert(InsertPos != BB->end() && "should have checked above"); InsertNewInstBefore(CI, *InsertPos); } else { auto *InsertBB = &IncomingBB->getParent()->getEntryBlock(); Modified: vendor/llvm-project/release-10.x/llvm/lib/Transforms/Scalar/SROA.cpp ============================================================================== --- vendor/llvm-project/release-10.x/llvm/lib/Transforms/Scalar/SROA.cpp Thu Mar 5 17:55:36 2020 (r358678) +++ vendor/llvm-project/release-10.x/llvm/lib/Transforms/Scalar/SROA.cpp Thu Mar 5 18:05:37 2020 (r358679) @@ -2519,6 +2519,8 @@ class llvm::sroa::AllocaSliceRewriter (private) NewLI->setAAMetadata(AATags); if (LI.isVolatile()) NewLI->setAtomic(LI.getOrdering(), LI.getSyncScopeID()); + if (NewLI->isAtomic()) + NewLI->setAlignment(LI.getAlign()); // Any !nonnull metadata or !range metadata on the old load is also valid // on the new load. This is even true in some cases even when the loads @@ -2709,6 +2711,8 @@ class llvm::sroa::AllocaSliceRewriter (private) NewSI->setAAMetadata(AATags); if (SI.isVolatile()) NewSI->setAtomic(SI.getOrdering(), SI.getSyncScopeID()); + if (NewSI->isAtomic()) + NewSI->setAlignment(SI.getAlign()); Pass.DeadInsts.insert(&SI); deleteIfTriviallyDead(OldOp); Modified: vendor/llvm-project/release-10.x/llvm/tools/llvm-ar/llvm-ar.cpp ============================================================================== --- vendor/llvm-project/release-10.x/llvm/tools/llvm-ar/llvm-ar.cpp Thu Mar 5 17:55:36 2020 (r358678) +++ vendor/llvm-project/release-10.x/llvm/tools/llvm-ar/llvm-ar.cpp Thu Mar 5 18:05:37 2020 (r358679) @@ -45,8 +45,7 @@ #endif #ifdef _WIN32 -#define WIN32_LEAN_AND_MEAN -#include +#include "llvm/Support/Windows/WindowsSupport.h" #endif using namespace llvm; From owner-svn-src-all@freebsd.org Thu Mar 5 18:06:29 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id D120726FAB3; Thu, 5 Mar 2020 18:06:29 +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 48YJbT5GkWz4GYW; Thu, 5 Mar 2020 18:06:29 +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 94CE2B230; Thu, 5 Mar 2020 18:06:29 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 025I6TIV078297; Thu, 5 Mar 2020 18:06:29 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 025I6Twg078296; Thu, 5 Mar 2020 18:06:29 GMT (envelope-from dim@FreeBSD.org) Message-Id: <202003051806.025I6Twg078296@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Thu, 5 Mar 2020 18:06:29 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r358680 - vendor/llvm-project/llvmorg-10.0.0-rc3-1-gc290cb61fdc X-SVN-Group: vendor X-SVN-Commit-Author: dim X-SVN-Commit-Paths: vendor/llvm-project/llvmorg-10.0.0-rc3-1-gc290cb61fdc X-SVN-Commit-Revision: 358680 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages 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, 05 Mar 2020 18:06:29 -0000 Author: dim Date: Thu Mar 5 18:06:29 2020 New Revision: 358680 URL: https://svnweb.freebsd.org/changeset/base/358680 Log: Tag llvm-project branch release/10.x llvmorg-10.0.0-rc3-1-gc290cb61fdc. Added: vendor/llvm-project/llvmorg-10.0.0-rc3-1-gc290cb61fdc/ - copied from r358679, vendor/llvm-project/release-10.x/ From owner-svn-src-all@freebsd.org Thu Mar 5 18:09:44 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 99F2E26FB8E; Thu, 5 Mar 2020 18:09:44 +0000 (UTC) (envelope-from mhorne@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 48YJgD04j5z4Mxv; Thu, 5 Mar 2020 18:09:43 +0000 (UTC) (envelope-from mhorne@freebsd.org) Received: from mail-oi1-f171.google.com (mail-oi1-f171.google.com [209.85.167.171]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "GTS CA 1O1" (verified OK)) (Authenticated sender: mhorne) by smtp.freebsd.org (Postfix) with ESMTPSA id C245B6FE; Thu, 5 Mar 2020 18:09:43 +0000 (UTC) (envelope-from mhorne@freebsd.org) Received: by mail-oi1-f171.google.com with SMTP id c1so6947686oiy.2; Thu, 05 Mar 2020 10:09:43 -0800 (PST) X-Gm-Message-State: ANhLgQ1IDQHFragg+ULNQdCfn6iHz6wP/xbTJGBoAd4dmGoo/QCtoF2T PCRig3B2oqFFYFYI8FIdi2cX8R2X7LMWs5ZodaA= X-Google-Smtp-Source: ADFU+vsT1F65QzrKoYfjkaXM16AyV+S7C8WVZ1qCwLHIZZZOFGHXuNF6ib6d2Bmoc5O78+XapKV/O1+Dlom2W8uWWKU= X-Received: by 2002:aca:4843:: with SMTP id v64mr222694oia.13.1583431782491; Thu, 05 Mar 2020 10:09:42 -0800 (PST) MIME-Version: 1.0 References: <202003022219.022MJUOk030293@repo.freebsd.org> In-Reply-To: <202003022219.022MJUOk030293@repo.freebsd.org> From: Mitchell Horne Date: Thu, 5 Mar 2020 13:09:30 -0500 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: svn commit: r358556 - in head: libexec/tftpd libexec/tftpd/tests usr.bin/tftp To: John Baldwin Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Content-Type: text/plain; charset="UTF-8" X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages 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, 05 Mar 2020 18:09:44 -0000 On Mon, Mar 2, 2020 at 5:19 PM John Baldwin wrote: > > Author: jhb > Date: Mon Mar 2 22:19:30 2020 > New Revision: 358556 > URL: https://svnweb.freebsd.org/changeset/base/358556 > > Log: > Add support for the TFTP windowsize option described in RFC 7440. > > The windowsize option permits multiple blocks to be transmitted > before the receiver sends an ACK improving throughput for larger > files. > > Reviewed by: asomers > MFC after: 2 weeks > Sponsored by: DARPA > Differential Revision: https://reviews.freebsd.org/D23836 > > Modified: > head/libexec/tftpd/tests/functional.c > head/libexec/tftpd/tftp-file.c > head/libexec/tftpd/tftp-file.h > head/libexec/tftpd/tftp-options.c > head/libexec/tftpd/tftp-options.h > head/libexec/tftpd/tftp-transfer.c > head/libexec/tftpd/tftp-utils.c > head/libexec/tftpd/tftp-utils.h > head/libexec/tftpd/tftpd.8 > head/usr.bin/tftp/main.c > head/usr.bin/tftp/tftp.1 > > Modified: head/libexec/tftpd/tests/functional.c > ============================================================================== > --- head/libexec/tftpd/tests/functional.c Mon Mar 2 21:19:51 2020 (r358555) > +++ head/libexec/tftpd/tests/functional.c Mon Mar 2 22:19:30 2020 (r358556) > @@ -38,6 +38,7 @@ __FBSDID("$FreeBSD$"); > #include > #include > #include > +#include > #include > #include > > @@ -89,6 +90,13 @@ recv_ack(uint16_t blocknum) > RECV(hdr, NULL, 0); > } > > +static void > +recv_oack(const char *options, size_t options_len) > +{ > + char hdr[] = {0, 6}; > + RECV(hdr, options, options_len); > +} > + > /* > * Receive a data packet from tftpd > * @param blocknum Expected block number to be received > @@ -159,6 +167,11 @@ send_ack(uint16_t blocknum) > > } > > +/* > + * build an option string > + */ > +#define OPTION_STR(name, value) name "\000" value "\000" > + > /* > * send a read request to tftpd. > * @param filename filename as a string, absolute or relative > @@ -166,6 +179,11 @@ send_ack(uint16_t blocknum) > */ > #define SEND_RRQ(filename, mode) SEND_STR("\0\001" filename "\0" mode "\0") > > +/* > + * send a read request with options > + */ > +#define SEND_RRQ_OPT(filename, mode, options) SEND_STR("\0\001" filename "\0" mode "\000" options) > + > /* > * send a write request to tftpd. > * @param filename filename as a string, absolute or relative > @@ -173,6 +191,11 @@ send_ack(uint16_t blocknum) > */ > #define SEND_WRQ(filename, mode) SEND_STR("\0\002" filename "\0" mode "\0") > > +/* > + * send a write request with options > + */ > +#define SEND_WRQ_OPT(filename, mode, options) SEND_STR("\0\002" filename "\0" mode "\000" options) > + > /* Define a test case, for both IPv4 and IPv6 */ > #define TFTPD_TC_DEFINE(name, head, ...) \ > static void \ > @@ -573,6 +596,32 @@ TFTPD_TC_DEFINE(rrq_medium,) > } > > /* > + * Read a medium file with a window size of 2. > + */ > +TFTPD_TC_DEFINE(rrq_medium_window,) > +{ > + int fd; > + size_t i; > + uint32_t contents[192]; > + char options[] = OPTION_STR("windowsize", "2"); > + > + for (i = 0; i < nitems(contents); i++) > + contents[i] = i; > + > + fd = open("medium.txt", O_RDWR | O_CREAT, 0644); > + ATF_REQUIRE(fd >= 0); > + write_all(fd, contents, sizeof(contents)); > + close(fd); > + > + SEND_RRQ_OPT("medium.txt", "octet", OPTION_STR("windowsize", "2")); > + recv_oack(options, sizeof(options) - 1); > + send_ack(0); > + recv_data(1, (const char*)&contents[0], 512); > + recv_data(2, (const char*)&contents[128], 256); > + send_ack(2); > +} > + > +/* > * Read a file in netascii format > */ > TFTPD_TC_DEFINE(rrq_netascii,) > @@ -652,6 +701,59 @@ TFTPD_TC_DEFINE(rrq_small,) > } > > /* > + * Read a file following the example in RFC 7440. > + */ > +TFTPD_TC_DEFINE(rrq_window_rfc7440,) > +{ > + int fd; > + size_t i; > + char options[] = OPTION_STR("windowsize", "4"); > + alignas(uint32_t) char contents[13 * 512 - 4]; > + uint32_t *u32p; > + > + u32p = (uint32_t *)contents; > + for (i = 0; i < sizeof(contents) / sizeof(uint32_t); i++) > + u32p[i] = i; > + > + fd = open("rfc7440.txt", O_RDWR | O_CREAT, 0644); > + ATF_REQUIRE(fd >= 0); > + write_all(fd, contents, sizeof(contents)); > + close(fd); > + > + SEND_RRQ_OPT("rfc7440.txt", "octet", OPTION_STR("windowsize", "4")); > + recv_oack(options, sizeof(options) - 1); > + send_ack(0); > + recv_data(1, &contents[0 * 512], 512); > + recv_data(2, &contents[1 * 512], 512); > + recv_data(3, &contents[2 * 512], 512); > + recv_data(4, &contents[3 * 512], 512); > + send_ack(4); > + recv_data(5, &contents[4 * 512], 512); > + recv_data(6, &contents[5 * 512], 512); > + recv_data(7, &contents[6 * 512], 512); > + recv_data(8, &contents[7 * 512], 512); > + > + /* ACK 5 as if 6-8 were dropped. */ > + send_ack(5); > + recv_data(6, &contents[5 * 512], 512); > + recv_data(7, &contents[6 * 512], 512); > + recv_data(8, &contents[7 * 512], 512); > + recv_data(9, &contents[8 * 512], 512); > + send_ack(9); > + recv_data(10, &contents[9 * 512], 512); > + recv_data(11, &contents[10 * 512], 512); > + recv_data(12, &contents[11 * 512], 512); > + recv_data(13, &contents[12 * 512], 508); > + > + /* Drop ACK and after timeout receive 10-13. */ > + recv_data(10, &contents[9 * 512], 512); > + recv_data(11, &contents[10 * 512], 512); > + recv_data(12, &contents[11 * 512], 512); > + recv_data(13, &contents[12 * 512], 508); > + send_ack(13); > +} > + > +/* > * Try to transfer a file with an unknown mode. > */ > TFTPD_TC_DEFINE(unknown_modes,) > @@ -872,6 +974,38 @@ TFTPD_TC_DEFINE(wrq_medium,) > } > > /* > + * Write a medium file with a window size of 2. > + */ > +TFTPD_TC_DEFINE(wrq_medium_window,) > +{ > + int fd; > + size_t i; > + ssize_t r; > + uint32_t contents[192]; > + char buffer[1024]; > + char options[] = OPTION_STR("windowsize", "2"); > + > + for (i = 0; i < nitems(contents); i++) > + contents[i] = i; > + > + fd = open("medium.txt", O_RDWR | O_CREAT, 0666); > + ATF_REQUIRE(fd >= 0); > + close(fd); > + > + SEND_WRQ_OPT("medium.txt", "octet", OPTION_STR("windowsize", "2")); > + recv_oack(options, sizeof(options) - 1); > + send_data(1, (const char*)&contents[0], 512); > + send_data(2, (const char*)&contents[128], 256); > + recv_ack(2); > + > + fd = open("medium.txt", O_RDONLY); > + ATF_REQUIRE(fd >= 0); > + r = read(fd, buffer, sizeof(buffer)); > + close(fd); > + require_bufeq((const char*)contents, 768, buffer, r); > +} > + > +/* > * Write a file in netascii format > */ > TFTPD_TC_DEFINE(wrq_netascii,) > @@ -965,7 +1099,71 @@ TFTPD_TC_DEFINE(wrq_truncate,) > ATF_REQUIRE_EQ(sb.st_size, 0); > } > > +/* > + * Write a file following the example in RFC 7440. > + */ > +TFTPD_TC_DEFINE(wrq_window_rfc7440,) > +{ > + int fd; > + size_t i; > + ssize_t r; > + char options[] = OPTION_STR("windowsize", "4"); > + alignas(uint32_t) char contents[13 * 512 - 4]; Hey John, This alignas directive seems to break builds with GCC. Mitchell > + char buffer[sizeof(contents)]; > + uint32_t *u32p; > > + u32p = (uint32_t *)contents; > + for (i = 0; i < sizeof(contents) / sizeof(uint32_t); i++) > + u32p[i] = i; > + > + fd = open("rfc7440.txt", O_RDWR | O_CREAT, 0666); > + ATF_REQUIRE(fd >= 0); > + close(fd); > + > + SEND_WRQ_OPT("rfc7440.txt", "octet", OPTION_STR("windowsize", "4")); > + recv_oack(options, sizeof(options) - 1); > + send_data(1, &contents[0 * 512], 512); > + send_data(2, &contents[1 * 512], 512); > + send_data(3, &contents[2 * 512], 512); > + send_data(4, &contents[3 * 512], 512); > + recv_ack(4); > + send_data(5, &contents[4 * 512], 512); > + > + /* Drop 6-8. */ > + recv_ack(5); > + send_data(6, &contents[5 * 512], 512); > + send_data(7, &contents[6 * 512], 512); > + send_data(8, &contents[7 * 512], 512); > + send_data(9, &contents[8 * 512], 512); > + recv_ack(9); > + > + /* Drop 11. */ > + send_data(10, &contents[9 * 512], 512); > + send_data(12, &contents[11 * 512], 512); > + > + /* > + * We can't send 13 here as tftpd has probably already seen 12 > + * and sent the ACK of 10 if running locally. While it would > + * recover by sending another ACK of 10, our state machine > + * would be out of sync. > + */ > + > + /* Ignore ACK for 10 and resend 10-13. */ > + recv_ack(10); > + send_data(10, &contents[9 * 512], 512); > + send_data(11, &contents[10 * 512], 512); > + send_data(12, &contents[11 * 512], 512); > + send_data(13, &contents[12 * 512], 508); > + recv_ack(13); > + > + fd = open("rfc7440.txt", O_RDONLY); > + ATF_REQUIRE(fd >= 0); > + r = read(fd, buffer, sizeof(buffer)); > + close(fd); > + require_bufeq(contents, sizeof(contents), buffer, r); > +} > + > + > /* > * Main > */ > @@ -981,10 +1179,12 @@ ATF_TP_ADD_TCS(tp) > TFTPD_TC_ADD(tp, rrq_eaccess); > TFTPD_TC_ADD(tp, rrq_empty); > TFTPD_TC_ADD(tp, rrq_medium); > + TFTPD_TC_ADD(tp, rrq_medium_window); > TFTPD_TC_ADD(tp, rrq_netascii); > TFTPD_TC_ADD(tp, rrq_nonexistent); > TFTPD_TC_ADD(tp, rrq_path_max); > TFTPD_TC_ADD(tp, rrq_small); > + TFTPD_TC_ADD(tp, rrq_window_rfc7440); > TFTPD_TC_ADD(tp, unknown_modes); > TFTPD_TC_ADD(tp, unknown_opcode); > TFTPD_TC_ADD(tp, w_flag); > @@ -994,10 +1194,12 @@ ATF_TP_ADD_TCS(tp) > TFTPD_TC_ADD(tp, wrq_eaccess); > TFTPD_TC_ADD(tp, wrq_eaccess_world_readable); > TFTPD_TC_ADD(tp, wrq_medium); > + TFTPD_TC_ADD(tp, wrq_medium_window); > TFTPD_TC_ADD(tp, wrq_netascii); > TFTPD_TC_ADD(tp, wrq_nonexistent); > TFTPD_TC_ADD(tp, wrq_small); > TFTPD_TC_ADD(tp, wrq_truncate); > + TFTPD_TC_ADD(tp, wrq_window_rfc7440); > > return (atf_no_error()); > } > > Modified: head/libexec/tftpd/tftp-file.c > ============================================================================== > --- head/libexec/tftpd/tftp-file.c Mon Mar 2 21:19:51 2020 (r358555) > +++ head/libexec/tftpd/tftp-file.c Mon Mar 2 22:19:30 2020 (r358556) > @@ -214,6 +214,20 @@ write_close(void) > return 0; > } > > +off_t > +tell_file(void) > +{ > + > + return ftello(file); > +} > + > +int > +seek_file(off_t offset) > +{ > + > + return fseeko(file, offset, SEEK_SET); > +} > + > int > read_init(int fd, FILE *f, const char *mode) > { > > Modified: head/libexec/tftpd/tftp-file.h > ============================================================================== > --- head/libexec/tftpd/tftp-file.h Mon Mar 2 21:19:51 2020 (r358555) > +++ head/libexec/tftpd/tftp-file.h Mon Mar 2 22:19:30 2020 (r358556) > @@ -36,4 +36,7 @@ int read_init(int fd, FILE *f, const char *mode); > size_t read_file(char *buffer, int count); > int read_close(void); > > +int seek_file(off_t offset); > +off_t tell_file(void); > + > int synchnet(int peer); > > Modified: head/libexec/tftpd/tftp-options.c > ============================================================================== > --- head/libexec/tftpd/tftp-options.c Mon Mar 2 21:19:51 2020 (r358555) > +++ head/libexec/tftpd/tftp-options.c Mon Mar 2 22:19:30 2020 (r358556) > @@ -56,6 +56,7 @@ struct options options[] = { > { "blksize", NULL, NULL, option_blksize, 1 }, > { "blksize2", NULL, NULL, option_blksize2, 0 }, > { "rollover", NULL, NULL, option_rollover, 0 }, > + { "windowsize", NULL, NULL, option_windowsize, 1 }, > { NULL, NULL, NULL, NULL, 0 } > }; > > @@ -271,6 +272,41 @@ option_blksize2(int peer __unused) > if (debug&DEBUG_OPTIONS) > tftp_log(LOG_DEBUG, "Setting blksize2 to '%s'", > options[OPT_BLKSIZE2].o_reply); > + > + return (0); > +} > + > +int > +option_windowsize(int peer) > +{ > + int size; > + > + if (options[OPT_WINDOWSIZE].o_request == NULL) > + return (0); > + > + size = atoi(options[OPT_WINDOWSIZE].o_request); > + if (size < WINDOWSIZE_MIN || size > WINDOWSIZE_MAX) { > + if (acting_as_client) { > + tftp_log(LOG_ERR, > + "Invalid windowsize (%d blocks), aborting", > + size); > + send_error(peer, EBADOP); > + return (1); > + } else { > + tftp_log(LOG_WARNING, > + "Invalid windowsize (%d blocks), ignoring request", > + size); > + return (0); > + } > + } > + > + /* XXX: Should force a windowsize of 1 for non-seekable files. */ > + asprintf(&options[OPT_WINDOWSIZE].o_reply, "%d", size); > + windowsize = size; > + > + if (debug&DEBUG_OPTIONS) > + tftp_log(LOG_DEBUG, "Setting windowsize to '%s'", > + options[OPT_WINDOWSIZE].o_reply); > > return (0); > } > > Modified: head/libexec/tftpd/tftp-options.h > ============================================================================== > --- head/libexec/tftpd/tftp-options.h Mon Mar 2 21:19:51 2020 (r358555) > +++ head/libexec/tftpd/tftp-options.h Mon Mar 2 22:19:30 2020 (r358556) > @@ -42,6 +42,7 @@ int option_timeout(int peer); > int option_blksize(int peer); > int option_blksize2(int peer); > int option_rollover(int peer); > +int option_windowsize(int peer); > > extern int options_extra_enabled; > extern int options_rfc_enabled; > @@ -61,4 +62,5 @@ enum opt_enum { > OPT_BLKSIZE, > OPT_BLKSIZE2, > OPT_ROLLOVER, > + OPT_WINDOWSIZE, > }; > > Modified: head/libexec/tftpd/tftp-transfer.c > ============================================================================== > --- head/libexec/tftpd/tftp-transfer.c Mon Mar 2 21:19:51 2020 (r358555) > +++ head/libexec/tftpd/tftp-transfer.c Mon Mar 2 22:19:30 2020 (r358556) > @@ -48,6 +48,12 @@ __FBSDID("$FreeBSD$"); > #include "tftp-options.h" > #include "tftp-transfer.h" > > +struct block_data { > + off_t offset; > + uint16_t block; > + int size; > +}; > + > /* > * Send a file via the TFTP data session. > */ > @@ -55,54 +61,73 @@ void > tftp_send(int peer, uint16_t *block, struct tftp_stats *ts) > { > struct tftphdr *rp; > - int size, n_data, n_ack, try; > - uint16_t oldblock; > + int size, n_data, n_ack, sendtry, acktry; > + u_int i, j; > + uint16_t oldblock, windowblock; > char sendbuffer[MAXPKTSIZE]; > char recvbuffer[MAXPKTSIZE]; > + struct block_data window[WINDOWSIZE_MAX]; > > rp = (struct tftphdr *)recvbuffer; > *block = 1; > ts->amount = 0; > + windowblock = 0; > + acktry = 0; > do { > +read_block: > if (debug&DEBUG_SIMPLE) > - tftp_log(LOG_DEBUG, "Sending block %d", *block); > + tftp_log(LOG_DEBUG, "Sending block %d (window block %d)", > + *block, windowblock); > > + window[windowblock].offset = tell_file(); > + window[windowblock].block = *block; > size = read_file(sendbuffer, segsize); > if (size < 0) { > tftp_log(LOG_ERR, "read_file returned %d", size); > send_error(peer, errno + 100); > goto abort; > } > + window[windowblock].size = size; > + windowblock++; > > - for (try = 0; ; try++) { > + for (sendtry = 0; ; sendtry++) { > n_data = send_data(peer, *block, sendbuffer, size); > - if (n_data > 0) { > - if (try == maxtimeouts) { > - tftp_log(LOG_ERR, > - "Cannot send DATA packet #%d, " > - "giving up", *block); > - return; > - } > + if (n_data == 0) > + break; > + > + if (sendtry == maxtimeouts) { > tftp_log(LOG_ERR, > - "Cannot send DATA packet #%d, trying again", > - *block); > - continue; > + "Cannot send DATA packet #%d, " > + "giving up", *block); > + return; > } > + tftp_log(LOG_ERR, > + "Cannot send DATA packet #%d, trying again", > + *block); > + } > > + /* Only check for ACK for last block in window. */ > + if (windowblock == windowsize || size != segsize) { > n_ack = receive_packet(peer, recvbuffer, > MAXPKTSIZE, NULL, timeoutpacket); > if (n_ack < 0) { > if (n_ack == RP_TIMEOUT) { > - if (try == maxtimeouts) { > + if (acktry == maxtimeouts) { > tftp_log(LOG_ERR, > "Timeout #%d send ACK %d " > - "giving up", try, *block); > + "giving up", acktry, *block); > return; > } > tftp_log(LOG_WARNING, > "Timeout #%d on ACK %d", > - try, *block); > - continue; > + acktry, *block); > + > + acktry++; > + ts->retries++; > + seek_file(window[0].offset); > + *block = window[0].block; > + windowblock = 0; > + goto read_block; > } > > /* Either read failure or ERROR packet */ > @@ -112,18 +137,60 @@ tftp_send(int peer, uint16_t *block, struct tftp_stats > goto abort; > } > if (rp->th_opcode == ACK) { > - ts->blocks++; > - if (rp->th_block == *block) { > - ts->amount += size; > - break; > + /* > + * Look for the ACKed block in our open > + * window. > + */ > + for (i = 0; i < windowblock; i++) { > + if (rp->th_block == window[i].block) > + break; > } > > - /* Re-synchronize with the other side */ > - (void) synchnet(peer); > - if (rp->th_block == (*block - 1)) { > + if (i == windowblock) { > + /* Did not recognize ACK. */ > + if (debug&DEBUG_SIMPLE) > + tftp_log(LOG_DEBUG, > + "ACK %d out of window", > + rp->th_block); > + > + /* Re-synchronize with the other side */ > + (void) synchnet(peer); > + > + /* Resend the current window. */ > ts->retries++; > - continue; > + seek_file(window[0].offset); > + *block = window[0].block; > + windowblock = 0; > + goto read_block; > } > + > + /* ACKed at least some data. */ > + acktry = 0; > + for (j = 0; j <= i; j++) { > + if (debug&DEBUG_SIMPLE) > + tftp_log(LOG_DEBUG, > + "ACKed block %d", > + window[j].block); > + ts->blocks++; > + ts->amount += window[j].size; > + } > + > + /* > + * Partial ACK. Rewind state to first > + * un-ACKed block. > + */ > + if (i + 1 != windowblock) { > + if (debug&DEBUG_SIMPLE) > + tftp_log(LOG_DEBUG, > + "Partial ACK"); > + seek_file(window[i + 1].offset); > + *block = window[i + 1].block; > + windowblock = 0; > + ts->retries++; > + goto read_block; > + } > + > + windowblock = 0; > } > > } > @@ -161,31 +228,35 @@ tftp_receive(int peer, uint16_t *block, struct tftp_st > struct tftphdr *firstblock, size_t fb_size) > { > struct tftphdr *rp; > - uint16_t oldblock; > - int n_data, n_ack, writesize, i, retry; > + uint16_t oldblock, windowstart; > + int n_data, n_ack, writesize, i, retry, windowblock; > char recvbuffer[MAXPKTSIZE]; > > ts->amount = 0; > + windowblock = 0; > > if (firstblock != NULL) { > writesize = write_file(firstblock->th_data, fb_size); > ts->amount += writesize; > - for (i = 0; ; i++) { > - n_ack = send_ack(peer, *block); > - if (n_ack > 0) { > - if (i == maxtimeouts) { > + windowblock++; > + if (windowsize == 1 || fb_size != segsize) { > + for (i = 0; ; i++) { > + n_ack = send_ack(peer, *block); > + if (n_ack > 0) { > + if (i == maxtimeouts) { > + tftp_log(LOG_ERR, > + "Cannot send ACK packet #%d, " > + "giving up", *block); > + return; > + } > tftp_log(LOG_ERR, > - "Cannot send ACK packet #%d, " > - "giving up", *block); > - return; > + "Cannot send ACK packet #%d, trying again", > + *block); > + continue; > } > - tftp_log(LOG_ERR, > - "Cannot send ACK packet #%d, trying again", > - *block); > - continue; > - } > > - break; > + break; > + } > } > > if (fb_size != segsize) { > @@ -216,7 +287,8 @@ tftp_receive(int peer, uint16_t *block, struct tftp_st > for (retry = 0; ; retry++) { > if (debug&DEBUG_SIMPLE) > tftp_log(LOG_DEBUG, > - "Receiving DATA block %d", *block); > + "Receiving DATA block %d (window block %d)", > + *block, windowblock); > > n_data = receive_packet(peer, recvbuffer, > MAXPKTSIZE, NULL, timeoutpacket); > @@ -232,6 +304,7 @@ tftp_receive(int peer, uint16_t *block, struct tftp_st > "Timeout #%d on DATA block %d", > retry, *block); > send_ack(peer, oldblock); > + windowblock = 0; > continue; > } > > @@ -247,19 +320,42 @@ tftp_receive(int peer, uint16_t *block, struct tftp_st > if (rp->th_block == *block) > break; > > + /* > + * Ignore duplicate blocks within the > + * window. > + * > + * This does not handle duplicate > + * blocks during a rollover as > + * gracefully, but that should still > + * recover eventually. > + */ > + if (*block > windowsize) > + windowstart = *block - windowsize; > + else > + windowstart = 0; > + if (rp->th_block > windowstart && > + rp->th_block < *block) { > + if (debug&DEBUG_SIMPLE) > + tftp_log(LOG_DEBUG, > + "Ignoring duplicate DATA block %d", > + rp->th_block); > + windowblock++; > + retry = 0; > + continue; > + } > + > tftp_log(LOG_WARNING, > "Expected DATA block %d, got block %d", > *block, rp->th_block); > > /* Re-synchronize with the other side */ > (void) synchnet(peer); > - if (rp->th_block == (*block-1)) { > - tftp_log(LOG_INFO, "Trying to sync"); > - *block = oldblock; > - ts->retries++; > - goto send_ack; /* rexmit */ > - } > > + tftp_log(LOG_INFO, "Trying to sync"); > + *block = oldblock; > + ts->retries++; > + goto send_ack; /* rexmit */ > + > } else { > tftp_log(LOG_WARNING, > "Expected DATA block, got %s block", > @@ -282,7 +378,11 @@ tftp_receive(int peer, uint16_t *block, struct tftp_st > if (n_data != segsize) > write_close(); > } > + windowblock++; > > + /* Only send ACKs for the last block in the window. */ > + if (windowblock < windowsize && n_data == segsize) > + continue; > send_ack: > for (i = 0; ; i++) { > n_ack = send_ack(peer, *block); > @@ -301,6 +401,9 @@ send_ack: > continue; > } > > + if (debug&DEBUG_SIMPLE) > + tftp_log(LOG_DEBUG, "Sent ACK for %d", *block); > + windowblock = 0; > break; > } > gettimeofday(&(ts->tstop), NULL); > > Modified: head/libexec/tftpd/tftp-utils.c > ============================================================================== > --- head/libexec/tftpd/tftp-utils.c Mon Mar 2 21:19:51 2020 (r358555) > +++ head/libexec/tftpd/tftp-utils.c Mon Mar 2 22:19:30 2020 (r358556) > @@ -51,6 +51,7 @@ int timeoutnetwork = MAX_TIMEOUTS * TIMEOUT; > int maxtimeouts = MAX_TIMEOUTS; > uint16_t segsize = SEGSIZE; > uint16_t pktsize = SEGSIZE + 4; > +uint16_t windowsize = WINDOWSIZE; > > int acting_as_client; > > > Modified: head/libexec/tftpd/tftp-utils.h > ============================================================================== > --- head/libexec/tftpd/tftp-utils.h Mon Mar 2 21:19:51 2020 (r358555) > +++ head/libexec/tftpd/tftp-utils.h Mon Mar 2 22:19:30 2020 (r358556) > @@ -46,6 +46,11 @@ __FBSDID("$FreeBSD$"); > #define TIMEOUT_MAX 255 /* Maximum timeout value */ > #define MIN_TIMEOUTS 3 > > +/* For the windowsize option */ > +#define WINDOWSIZE 1 > +#define WINDOWSIZE_MIN 1 > +#define WINDOWSIZE_MAX 65535 > + > extern int timeoutpacket; > extern int timeoutnetwork; > extern int maxtimeouts; > @@ -53,6 +58,7 @@ int settimeouts(int timeoutpacket, int timeoutnetwork, > > extern uint16_t segsize; > extern uint16_t pktsize; > +extern uint16_t windowsize; > > extern int acting_as_client; > > > Modified: head/libexec/tftpd/tftpd.8 > ============================================================================== > --- head/libexec/tftpd/tftpd.8 Mon Mar 2 21:19:51 2020 (r358555) > +++ head/libexec/tftpd/tftpd.8 Mon Mar 2 22:19:30 2020 (r358556) > @@ -28,7 +28,7 @@ > .\" @(#)tftpd.8 8.1 (Berkeley) 6/4/93 > .\" $FreeBSD$ > .\" > -.Dd June 22, 2011 > +.Dd March 2, 2020 > .Dt TFTPD 8 > .Os > .Sh NAME > @@ -245,6 +245,9 @@ The following RFC's are supported: > .Rs > .%T RFC 2349: TFTP Timeout Interval and Transfer Size Options > .Re > +.Rs > +.%T RFC 7440: TFTP Windowsize Option > +.Re > .Pp > The non-standard > .Cm rollover > @@ -291,6 +294,9 @@ Edwin Groothuis performed a major > and > .Xr tftp 1 > code to support RFC2348. > +.Pp > +Support for the windowsize option (RFC7440) was introduced in > +.Fx 13.0 . > .Sh NOTES > Files larger than 33,553,919 octets (65535 blocks, last one <512 > octets) cannot be correctly transferred without client and server > > Modified: head/usr.bin/tftp/main.c > ============================================================================== > --- head/usr.bin/tftp/main.c Mon Mar 2 21:19:51 2020 (r358555) > +++ head/usr.bin/tftp/main.c Mon Mar 2 22:19:30 2020 (r358556) > @@ -114,6 +114,7 @@ static void setblocksize2(int, char **); > static void setoptions(int, char **); > static void setrollover(int, char **); > static void setpacketdrop(int, char **); > +static void setwindowsize(int, char **); > > static void command(bool, EditLine *, History *, HistEvent *) __dead2; > static const char *command_prompt(void); > @@ -158,6 +159,7 @@ static struct cmd cmdtab[] = { > "enable or disable RFC2347 style options" }, > { "help", help, "print help information" }, > { "packetdrop", setpacketdrop, "artificial packetloss feature" }, > + { "windowsize", setwindowsize, "set windowsize[*]" }, > { "?", help, "print help information" }, > { NULL, NULL, NULL } > }; > @@ -1068,4 +1070,28 @@ setpacketdrop(int argc, char *argv[]) > > printf("Randomly %d in 100 packets will be dropped\n", > packetdroppercentage); > +} > + > +static void > +setwindowsize(int argc, char *argv[]) > +{ > + > + if (!options_rfc_enabled) > + printf("RFC2347 style options are not enabled " > + "(but proceeding anyway)\n"); > + > + if (argc != 1) { > + int size = atoi(argv[1]); > + > + if (size < WINDOWSIZE_MIN || size > WINDOWSIZE_MAX) { > + printf("Windowsize should be between %d and %d " > + "blocks.\n", WINDOWSIZE_MIN, WINDOWSIZE_MAX); > + return; > + } else { > + asprintf(&options[OPT_WINDOWSIZE].o_request, "%d", > + size); > + } > + } > + printf("Windowsize is now %s blocks.\n", > + options[OPT_WINDOWSIZE].o_request); > } > > Modified: head/usr.bin/tftp/tftp.1 > ============================================================================== > --- head/usr.bin/tftp/tftp.1 Mon Mar 2 21:19:51 2020 (r358555) > +++ head/usr.bin/tftp/tftp.1 Mon Mar 2 22:19:30 2020 (r358556) > @@ -28,7 +28,7 @@ > .\" @(#)tftp.1 8.2 (Berkeley) 4/18/94 > .\" $FreeBSD$ > .\" > -.Dd Aug 22, 2018 > +.Dd March 2, 2020 > .Dt TFTP 1 > .Os > .Sh NAME > @@ -216,6 +216,14 @@ Toggle packet tracing. > .Pp > .It Cm verbose > Toggle verbose mode. > +.Pp > +.It Cm windowsize Op Ar size > +Sets the TFTP windowsize option in TFTP Read Request or Write Request packets to > +.Op Ar size > +blocks as specified in RFC 7440. > +Valid values are between 1 and 65535. > +If no windowsize is specified, > +then the default windowsize of 1 block will be used. > .El > .Sh SEE ALSO > .Xr tftpd 8 > @@ -235,6 +243,9 @@ The following RFC's are supported: > .Re > .Rs > .%T RFC 3617: Uniform Resource Identifier (URI) Scheme and Applicability Statement for the Trivial File Transfer Protocol (TFTP) > +.Re > +.Rs > +.%T RFC 7440: TFTP Windowsize Option > .Re > .Pp > The non-standard From owner-svn-src-all@freebsd.org Thu Mar 5 18:20:16 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 8B14126FEBB; Thu, 5 Mar 2020 18:20:16 +0000 (UTC) (envelope-from dim@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 48YJvM2YH6z3GCY; Thu, 5 Mar 2020 18:20:15 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from tensor.andric.com (tensor.andric.com [IPv6:2001:470:7a58:1::1]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "tensor.andric.com", Issuer "Let's Encrypt Authority X3" (verified OK)) (Authenticated sender: dim) by smtp.freebsd.org (Postfix) with ESMTPSA id 93643847; Thu, 5 Mar 2020 18:20:14 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from [IPv6:2001:470:7a58::44b2:892b:3322:a46d] (unknown [IPv6:2001:470:7a58:0:44b2:892b:3322:a46d]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by tensor.andric.com (Postfix) with ESMTPSA id B89A62D14E; Thu, 5 Mar 2020 19:20:11 +0100 (CET) From: Dimitry Andric Message-Id: <1A13B93C-7D87-4210-AD3D-2B198C166CE1@FreeBSD.org> Content-Type: multipart/signed; boundary="Apple-Mail=_9C327041-3969-41C0-B571-F25708D80573"; protocol="application/pgp-signature"; micalg=pgp-sha1 Mime-Version: 1.0 (Mac OS X Mail 12.4 \(3445.104.11\)) Subject: Re: svn commit: r358655 - head/sbin/mount_nfs Date: Thu, 5 Mar 2020 19:19:59 +0100 In-Reply-To: <20200305174411.GV5741@FreeBSD.org> Cc: Slawa Olhovchenkov , svn-src-head , svn-src-all , src-committers@freebsd.org To: Gleb Smirnoff References: <202003042227.024MRGsW072613@repo.freebsd.org> <244e28ea-1217-cefc-354e-02ecb201637a@FreeBSD.org> <20200305163350.GU5741@FreeBSD.org> <20200305172454.GJ8028@zxy.spb.ru> <20200305173515.GK8028@zxy.spb.ru> <20200305174411.GV5741@FreeBSD.org> X-Mailer: Apple Mail (2.3445.104.11) X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages 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, 05 Mar 2020 18:20:16 -0000 --Apple-Mail=_9C327041-3969-41C0-B571-F25708D80573 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=us-ascii On 5 Mar 2020, at 18:44, Gleb Smirnoff wrote: >=20 > On Thu, Mar 05, 2020 at 08:35:15PM +0300, Slawa Olhovchenkov wrote: > S> > > D> sbin/mount_nfs/mount_nfs.c:549:10: error: cast from 'char *' = to 'struct > S> > > D> if_msghdr *' increases required alignment from 1 to 4 > S> > > D> [-Werror,-Wcast-align] > S> > > D> ifm =3D (struct if_msghdr *)buf; > S> > > D> ^~~~~~~~~~~~~~~~~~~~~~~ > S> > > D> 1 error generated. > S> > > D> > S> > > D> In practice I don't think the buffer can ever get = misaligned, so can you > S> > > D> please add a NO_WCAST_ALIGN=3D to the Makefile? > S> > > > S> > > route(8) handles the same problem via intermediate (void *) = cast. What is > S> > > preferred way to solve the problem? Change compiler flags file = wide, or > S> > > just through (void *) cast? > S> > > S> > Copy to aligned buffer or got SIGBUS on some architectures? > S> > S> char buf[2048] __aligned(__alignof(struct if_msghdr)); > S> > S> resolve this watning. >=20 > Thanks, Slawa! I think this is the most elegant solution. Why don't just declare the buffer as: struct if_msghdr buf; and then do: nread =3D read(s, &buf, sizeof buf); ? You are never reading more than one if_msghdr anyway, and then there is no need to cast anything. -Dimitry --Apple-Mail=_9C327041-3969-41C0-B571-F25708D80573 Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename=signature.asc Content-Type: application/pgp-signature; name=signature.asc Content-Description: Message signed with OpenPGP -----BEGIN PGP SIGNATURE----- Version: GnuPG/MacGPG2 v2.2 iF0EARECAB0WIQR6tGLSzjX8bUI5T82wXqMKLiCWowUCXmFCzwAKCRCwXqMKLiCW o+ZEAJwLg7kEAdqiUVSNjAK2vAzAeqZ1CACeOlYaTkNlVV9/9u4Hz8rthtlJdm8= =jHHx -----END PGP SIGNATURE----- --Apple-Mail=_9C327041-3969-41C0-B571-F25708D80573-- From owner-svn-src-all@freebsd.org Thu Mar 5 18:30:47 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id EF74D248425; Thu, 5 Mar 2020 18:30:47 +0000 (UTC) (envelope-from slw@zxy.spb.ru) Received: from zxy.spb.ru (zxy.spb.ru [195.70.199.98]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 48YK7T5cTdz3y5q; Thu, 5 Mar 2020 18:30:45 +0000 (UTC) (envelope-from slw@zxy.spb.ru) Received: from slw by zxy.spb.ru with local (Exim 4.86 (FreeBSD)) (envelope-from ) id 1j9vGb-0003xr-DL; Thu, 05 Mar 2020 21:30:41 +0300 Date: Thu, 5 Mar 2020 21:30:41 +0300 From: Slawa Olhovchenkov To: Dimitry Andric Cc: Gleb Smirnoff , svn-src-head , svn-src-all , src-committers@freebsd.org Subject: Re: svn commit: r358655 - head/sbin/mount_nfs Message-ID: <20200305183041.GU8012@zxy.spb.ru> References: <202003042227.024MRGsW072613@repo.freebsd.org> <244e28ea-1217-cefc-354e-02ecb201637a@FreeBSD.org> <20200305163350.GU5741@FreeBSD.org> <20200305172454.GJ8028@zxy.spb.ru> <20200305173515.GK8028@zxy.spb.ru> <20200305174411.GV5741@FreeBSD.org> <1A13B93C-7D87-4210-AD3D-2B198C166CE1@FreeBSD.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1A13B93C-7D87-4210-AD3D-2B198C166CE1@FreeBSD.org> User-Agent: Mutt/1.5.24 (2015-08-30) X-SA-Exim-Connect-IP: X-SA-Exim-Mail-From: slw@zxy.spb.ru X-SA-Exim-Scanned: No (on zxy.spb.ru); SAEximRunCond expanded to false X-Rspamd-Queue-Id: 48YK7T5cTdz3y5q X-Spamd-Bar: ---- Authentication-Results: mx1.freebsd.org; none X-Spamd-Result: default: False [-4.20 / 15.00]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; REPLY(-4.00)[]; NEURAL_SPAM_MEDIUM(0.80)[0.800,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, 05 Mar 2020 18:30:48 -0000 On Thu, Mar 05, 2020 at 07:19:59PM +0100, Dimitry Andric wrote: > On 5 Mar 2020, at 18:44, Gleb Smirnoff wrote: > > > > On Thu, Mar 05, 2020 at 08:35:15PM +0300, Slawa Olhovchenkov wrote: > > S> > > D> sbin/mount_nfs/mount_nfs.c:549:10: error: cast from 'char *' to 'struct > > S> > > D> if_msghdr *' increases required alignment from 1 to 4 > > S> > > D> [-Werror,-Wcast-align] > > S> > > D> ifm = (struct if_msghdr *)buf; > > S> > > D> ^~~~~~~~~~~~~~~~~~~~~~~ > > S> > > D> 1 error generated. > > S> > > D> > > S> > > D> In practice I don't think the buffer can ever get misaligned, so can you > > S> > > D> please add a NO_WCAST_ALIGN= to the Makefile? > > S> > > > > S> > > route(8) handles the same problem via intermediate (void *) cast. What is > > S> > > preferred way to solve the problem? Change compiler flags file wide, or > > S> > > just through (void *) cast? > > S> > > > S> > Copy to aligned buffer or got SIGBUS on some architectures? > > S> > > S> char buf[2048] __aligned(__alignof(struct if_msghdr)); > > S> > > S> resolve this watning. > > > > Thanks, Slawa! I think this is the most elegant solution. > > Why don't just declare the buffer as: > > struct if_msghdr buf; > > and then do: > > nread = read(s, &buf, sizeof buf); > > ? You are never reading more than one if_msghdr anyway, and then there > is no need to cast anything. My inspiration: route socket can return other messages (man 4 route) From owner-svn-src-all@freebsd.org Thu Mar 5 19:43:45 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 03014249F34; Thu, 5 Mar 2020 19:43:44 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 48YLlh4N2Dz4CZP; Thu, 5 Mar 2020 19:43:44 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4D7EAC630; Thu, 5 Mar 2020 19:43:44 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 025Jhhmt037710; Thu, 5 Mar 2020 19:43:43 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 025JhhW1037709; Thu, 5 Mar 2020 19:43:43 GMT (envelope-from mav@FreeBSD.org) Message-Id: <202003051943.025JhhW1037709@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Thu, 5 Mar 2020 19:43:43 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r358683 - head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs X-SVN-Group: head X-SVN-Commit-Author: mav X-SVN-Commit-Paths: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs X-SVN-Commit-Revision: 358683 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages 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, 05 Mar 2020 19:43:45 -0000 Author: mav Date: Thu Mar 5 19:43:43 2020 New Revision: 358683 URL: https://svnweb.freebsd.org/changeset/base/358683 Log: Remove vfs.zfs.top_maxinflight tunable/sysctl. It is dead since sorted scrub import at r334844. MFC after: 1 week Sponsored by: iXsystems, Inc. Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_scan.c Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_scan.c ============================================================================== --- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_scan.c Thu Mar 5 18:11:47 2020 (r358682) +++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_scan.c Thu Mar 5 19:43:43 2020 (r358683) @@ -137,12 +137,6 @@ extern int zfs_vdev_async_write_active_min_dirty_perce */ int zfs_scan_strict_mem_lim = B_FALSE; -/* - * Maximum number of parallelly executing I/Os per top-level vdev. - * Tune with care. Very high settings (hundreds) are known to trigger - * some firmware bugs and resets on certain SSDs. - */ -int zfs_top_maxinflight = 32; /* maximum I/Os per top-level */ unsigned int zfs_resilver_delay = 2; /* number of ticks to delay resilver -- 2 is a good number */ unsigned int zfs_scrub_delay = 4; /* number of ticks to delay scrub -- 4 is a good number */ unsigned int zfs_scan_idle = 50; /* idle window in clock ticks */ @@ -186,8 +180,6 @@ boolean_t zfs_no_scrub_io = B_FALSE; /* set to disable boolean_t zfs_no_scrub_prefetch = B_FALSE; /* set to disable scrub prefetch */ SYSCTL_DECL(_vfs_zfs); -SYSCTL_UINT(_vfs_zfs, OID_AUTO, top_maxinflight, CTLFLAG_RWTUN, - &zfs_top_maxinflight, 0, "Maximum I/Os per top-level vdev"); SYSCTL_UINT(_vfs_zfs, OID_AUTO, resilver_delay, CTLFLAG_RWTUN, &zfs_resilver_delay, 0, "Number of ticks to delay resilver"); SYSCTL_UINT(_vfs_zfs, OID_AUTO, scrub_delay, CTLFLAG_RWTUN, @@ -1538,7 +1530,6 @@ dsl_scan_prefetch_thread(void *arg) dsl_scan_t *scn = arg; spa_t *spa = scn->scn_dp->dp_spa; vdev_t *rvd = spa->spa_root_vdev; - uint64_t maxinflight = rvd->vdev_children * zfs_top_maxinflight; scan_prefetch_issue_ctx_t *spic; /* loop until we are told to stop */ From owner-svn-src-all@freebsd.org Thu Mar 5 20:04:42 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id C794C24B200; Thu, 5 Mar 2020 20:04:42 +0000 (UTC) (envelope-from luporl@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 48YMCt5hnkz3Qrt; Thu, 5 Mar 2020 20:04:42 +0000 (UTC) (envelope-from luporl@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id BE6E6CA27; Thu, 5 Mar 2020 20:04:42 +0000 (UTC) (envelope-from luporl@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 025K4g8J049492; Thu, 5 Mar 2020 20:04:42 GMT (envelope-from luporl@FreeBSD.org) Received: (from luporl@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 025K4f14049485; Thu, 5 Mar 2020 20:04:41 GMT (envelope-from luporl@FreeBSD.org) Message-Id: <202003052004.025K4f14049485@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: luporl set sender to luporl@FreeBSD.org using -f From: Leandro Lupori Date: Thu, 5 Mar 2020 20:04:41 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r358684 - in head/sys: amd64/conf conf dev/aacraid modules modules/aacraid powerpc/conf X-SVN-Group: head X-SVN-Commit-Author: luporl X-SVN-Commit-Paths: in head/sys: amd64/conf conf dev/aacraid modules modules/aacraid powerpc/conf X-SVN-Commit-Revision: 358684 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages 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, 05 Mar 2020 20:04:42 -0000 Author: luporl Date: Thu Mar 5 20:04:41 2020 New Revision: 358684 URL: https://svnweb.freebsd.org/changeset/base/358684 Log: [aacraid] Port driver to big-endian Port aacraid driver to big-endian (BE) hosts. The immediate goal of this change is to make it possible to use the aacraid driver on PowerPC64 machines that have Adaptec Series 8 SAS controllers. Adapters supported by this driver expect FIB contents in little-endian (LE) byte order. All FIBs have a fixed header part as well as a data part that depends on the command being issued to the controller. In this way, on BE hosts, the FIB header and all FIB data structures used in aacraid.c and aacraid_cam.c need to be converted to LE before being sent to the adapter and converted to BE when coming from it. The functions to convert each struct are on aacraid_endian.c. For little-endian (LE) targets, they are macros that expand to nothing. In some cases, when only a few fields of a large structure are used, the fields are converted inline, by the code using them. PR: 237463 Reviewed by: jhibbits Sponsored by: Eldorado Research Institute (eldorado.org.br) Differential Revision: https://reviews.freebsd.org/D23887 Added: head/sys/dev/aacraid/aacraid_endian.c (contents, props changed) head/sys/dev/aacraid/aacraid_endian.h (contents, props changed) Modified: head/sys/amd64/conf/NOTES head/sys/conf/NOTES head/sys/conf/files.powerpc head/sys/dev/aacraid/aacraid.c head/sys/dev/aacraid/aacraid_cam.c head/sys/modules/Makefile head/sys/modules/aacraid/Makefile head/sys/powerpc/conf/GENERIC64 Modified: head/sys/amd64/conf/NOTES ============================================================================== --- head/sys/amd64/conf/NOTES Thu Mar 5 19:43:43 2020 (r358683) +++ head/sys/amd64/conf/NOTES Thu Mar 5 20:04:41 2020 (r358684) @@ -417,10 +417,6 @@ device aac device aacp # SCSI Passthrough interface (optional, CAM required) # -# Adaptec by PMC RAID controllers, Series 6/7/8 and upcoming families -device aacraid # Container interface, CAM required - -# # Highpoint RocketRAID 27xx. device hpt27xx Modified: head/sys/conf/NOTES ============================================================================== --- head/sys/conf/NOTES Thu Mar 5 19:43:43 2020 (r358683) +++ head/sys/conf/NOTES Thu Mar 5 20:04:41 2020 (r358684) @@ -1490,6 +1490,8 @@ options TERMINAL_KERN_ATTR=(FG_LIGHTRED|BG_BLACK) # # SCSI host adapters: # +# aacraid: Adaptec by PMC RAID controllers, Series 6/7/8 and upcoming +# families. Container interface, CAM required. # ahc: Adaptec 274x/284x/2910/293x/294x/394x/3950x/3960x/398X/4944/ # 19160x/29160x, aic7770/aic78xx # ahd: Adaptec 29320/39320 Controllers. @@ -1512,6 +1514,7 @@ options TERMINAL_KERN_ATTR=(FG_LIGHTRED|BG_BLACK) # 53C876, 53C885, 53C895, 53C895A, 53C896, 53C897, 53C1510D, # 53C1010-33, 53C1010-66. +device aacraid device ahc device ahd device esp Modified: head/sys/conf/files.powerpc ============================================================================== --- head/sys/conf/files.powerpc Thu Mar 5 19:43:43 2020 (r358683) +++ head/sys/conf/files.powerpc Thu Mar 5 20:04:41 2020 (r358684) @@ -16,6 +16,7 @@ cddl/dev/dtrace/powerpc/dtrace_subr.c optional dtrace cddl/dev/fbt/powerpc/fbt_isa.c optional dtrace_fbt | dtraceall compile-with "${FBT_C}" crypto/blowfish/bf_enc.c optional crypto | ipsec | ipsec_support crypto/des/des_enc.c optional crypto | ipsec | ipsec_support | netsmb +dev/aacraid/aacraid_endian.c optional aacraid dev/adb/adb_bus.c optional adb dev/adb/adb_kbd.c optional adb dev/adb/adb_mouse.c optional adb Modified: head/sys/dev/aacraid/aacraid.c ============================================================================== --- head/sys/dev/aacraid/aacraid.c Thu Mar 5 19:43:43 2020 (r358683) +++ head/sys/dev/aacraid/aacraid.c Thu Mar 5 20:04:41 2020 (r358684) @@ -69,6 +69,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #ifndef FILTER_HANDLED #define FILTER_HANDLED 0x02 @@ -386,7 +387,7 @@ aac_daemon(void *arg) AAC_FIBSTATE_ASYNC | AAC_FIBSTATE_FAST_RESPONSE; fib->Header.Command = SendHostTime; - *(uint32_t *)fib->data = tv.tv_sec; + *(uint32_t *)fib->data = htole32(tv.tv_sec); aacraid_map_command_sg(cm, NULL, 0, 0); aacraid_release_command(cm); @@ -446,6 +447,7 @@ aac_get_container_info(struct aac_softc *sc, struct aa mi->Command = VM_NameServe; mi->MntType = FT_FILESYS; mi->MntCount = cid; + aac_mntinfo_tole(mi); if (sync_fib) { if (aac_sync_fib(sc, ContainerCommand, 0, fib, @@ -476,6 +478,7 @@ aac_get_container_info(struct aac_softc *sc, struct aa } } bcopy(&fib->data[0], mir, sizeof(struct aac_mntinforesp)); + aac_mntinforesp_toh(mir); /* UID */ *uid = cid; @@ -490,10 +493,12 @@ aac_get_container_info(struct aac_softc *sc, struct aa ccfg->Command = VM_ContainerConfig; ccfg->CTCommand.command = CT_CID_TO_32BITS_UID; ccfg->CTCommand.param[0] = cid; + aac_cnt_config_tole(ccfg); if (sync_fib) { rval = aac_sync_fib(sc, ContainerCommand, 0, fib, sizeof(struct aac_cnt_config)); + aac_cnt_config_toh(ccfg); if (rval == 0 && ccfg->Command == ST_OK && ccfg->CTCommand.param[0] == CT_OK && mir->MntTable[0].VolType != CT_PASSTHRU) @@ -512,6 +517,7 @@ aac_get_container_info(struct aac_softc *sc, struct aa AAC_FIBSTATE_FAST_RESPONSE; fib->Header.Command = ContainerCommand; rval = aacraid_wait_command(cm); + aac_cnt_config_toh(ccfg); if (rval == 0 && ccfg->Command == ST_OK && ccfg->CTCommand.param[0] == CT_OK && mir->MntTable[0].VolType != CT_PASSTHRU) @@ -804,8 +810,8 @@ aacraid_shutdown(device_t dev) cc = (struct aac_close_command *)&fib->data[0]; bzero(cc, sizeof(struct aac_close_command)); - cc->Command = VM_CloseAll; - cc->ContainerId = 0xfffffffe; + cc->Command = htole32(VM_CloseAll); + cc->ContainerId = htole32(0xfffffffe); if (aac_sync_fib(sc, ContainerCommand, 0, fib, sizeof(struct aac_close_command))) printf("FAILED.\n"); @@ -905,6 +911,8 @@ aacraid_new_intr_type1(void *arg) cm = sc->aac_sync_cm; aac_unmap_command(cm); cm->cm_flags |= AAC_CMD_COMPLETED; + aac_fib_header_toh(&cm->cm_fib->Header); + /* is there a completion handler? */ if (cm->cm_complete != NULL) { cm->cm_complete(cm); @@ -931,7 +939,8 @@ aacraid_new_intr_type1(void *arg) for (;;) { isFastResponse = isAif = noMoreAif = 0; /* remove toggle bit (31) */ - handle = (sc->aac_common->ac_host_rrq[index] & 0x7fffffff); + handle = (le32toh(sc->aac_common->ac_host_rrq[index]) & + 0x7fffffff); /* check fast response bit (30) */ if (handle & 0x40000000) isFastResponse = 1; @@ -944,6 +953,7 @@ aacraid_new_intr_type1(void *arg) cm = sc->aac_commands + (handle - 1); fib = cm->cm_fib; + aac_fib_header_toh(&fib->Header); sc->aac_rrq_outstanding[vector_no]--; if (isAif) { noMoreAif = (fib->Header.XferState & AAC_FIBSTATE_NOMOREAIF) ? 1:0; @@ -954,7 +964,7 @@ aacraid_new_intr_type1(void *arg) } else { if (isFastResponse) { fib->Header.XferState |= AAC_FIBSTATE_DONEADAP; - *((u_int32_t *)(fib->data)) = ST_OK; + *((u_int32_t *)(fib->data)) = htole32(ST_OK); cm->cm_flags |= AAC_CMD_FASTRESP; } aac_remove_busy(cm); @@ -1342,6 +1352,10 @@ aacraid_map_command_sg(void *arg, bus_dma_segment_t *s raw->flags |= RIO2_SGL_CONFORMANT; } + for (i = 0; i < nseg; i++) + aac_sge_ieee1212_tole(sg + i); + aac_raw_io2_tole(raw); + /* update the FIB size for the s/g count */ fib->Header.Size += nseg * sizeof(struct aac_sge_ieee1212); @@ -1349,33 +1363,37 @@ aacraid_map_command_sg(void *arg, bus_dma_segment_t *s } else if (fib->Header.Command == RawIo) { struct aac_sg_tableraw *sg; sg = (struct aac_sg_tableraw *)cm->cm_sgtable; - sg->SgCount = nseg; + sg->SgCount = htole32(nseg); for (i = 0; i < nseg; i++) { sg->SgEntryRaw[i].SgAddress = segs[i].ds_addr; sg->SgEntryRaw[i].SgByteCount = segs[i].ds_len; sg->SgEntryRaw[i].Next = 0; sg->SgEntryRaw[i].Prev = 0; sg->SgEntryRaw[i].Flags = 0; + aac_sg_entryraw_tole(&sg->SgEntryRaw[i]); } + aac_raw_io_tole((struct aac_raw_io *)&fib->data[0]); /* update the FIB size for the s/g count */ fib->Header.Size += nseg*sizeof(struct aac_sg_entryraw); } else if ((cm->cm_sc->flags & AAC_FLAGS_SG_64BIT) == 0) { struct aac_sg_table *sg; sg = cm->cm_sgtable; - sg->SgCount = nseg; + sg->SgCount = htole32(nseg); for (i = 0; i < nseg; i++) { sg->SgEntry[i].SgAddress = segs[i].ds_addr; sg->SgEntry[i].SgByteCount = segs[i].ds_len; + aac_sg_entry_tole(&sg->SgEntry[i]); } /* update the FIB size for the s/g count */ fib->Header.Size += nseg*sizeof(struct aac_sg_entry); } else { struct aac_sg_table64 *sg; sg = (struct aac_sg_table64 *)cm->cm_sgtable; - sg->SgCount = nseg; + sg->SgCount = htole32(nseg); for (i = 0; i < nseg; i++) { sg->SgEntry64[i].SgAddress = segs[i].ds_addr; sg->SgEntry64[i].SgByteCount = segs[i].ds_len; + aac_sg_entry64_tole(&sg->SgEntry64[i]); } /* update the FIB size for the s/g count */ fib->Header.Size += nseg*sizeof(struct aac_sg_entry64); @@ -1405,11 +1423,13 @@ aacraid_map_command_sg(void *arg, bus_dma_segment_t *s cm->cm_flags |= AAC_CMD_MAPPED; if (cm->cm_flags & AAC_CMD_WAIT) { + aac_fib_header_tole(&fib->Header); aacraid_sync_command(sc, AAC_MONKER_SYNCFIB, cm->cm_fibphys, 0, 0, 0, NULL, NULL); } else if (sc->flags & AAC_FLAGS_SYNC_MODE) { u_int32_t wait = 0; sc->aac_sync_cm = cm; + aac_fib_header_tole(&fib->Header); aacraid_sync_command(sc, AAC_MONKER_SYNCFIB, cm->cm_fibphys, 0, 0, 0, &wait, NULL); } else { @@ -1788,6 +1808,8 @@ aac_init(struct aac_softc *sc) ip->MaxIoSize = sc->aac_max_sectors << 9; ip->MaxFibSize = sc->aac_max_fib_size; + aac_adapter_init_tole(ip); + /* * Do controller-type-specific initialisation */ @@ -1996,18 +2018,24 @@ aac_check_config(struct aac_softc *sc) ccfg->CTCommand.command = CT_GET_CONFIG_STATUS; ccfg->CTCommand.param[CNT_SIZE] = sizeof(struct aac_cf_status_hdr); + aac_cnt_config_tole(ccfg); rval = aac_sync_fib(sc, ContainerCommand, 0, fib, sizeof (struct aac_cnt_config)); + aac_cnt_config_toh(ccfg); + cf_shdr = (struct aac_cf_status_hdr *)ccfg->CTCommand.data; if (rval == 0 && ccfg->Command == ST_OK && ccfg->CTCommand.param[0] == CT_OK) { - if (cf_shdr->action <= CFACT_PAUSE) { + if (le32toh(cf_shdr->action) <= CFACT_PAUSE) { bzero(ccfg, sizeof (*ccfg) - CT_PACKET_SIZE); ccfg->Command = VM_ContainerConfig; ccfg->CTCommand.command = CT_COMMIT_CONFIG; + aac_cnt_config_tole(ccfg); rval = aac_sync_fib(sc, ContainerCommand, 0, fib, sizeof (struct aac_cnt_config)); + aac_cnt_config_toh(ccfg); + if (rval == 0 && ccfg->Command == ST_OK && ccfg->CTCommand.param[0] == CT_OK) { /* successful completion */ @@ -2087,6 +2115,8 @@ static int aac_sync_fib(struct aac_softc *sc, u_int32_t command, u_int32_t xferstate, struct aac_fib *fib, u_int16_t datasize) { + uint32_t ReceiverFibAddress; + fwprintf(sc, HBA_FLAGS_DBG_FUNCTION_ENTRY_B, ""); mtx_assert(&sc->aac_io_lock, MA_OWNED); @@ -2105,18 +2135,22 @@ aac_sync_fib(struct aac_softc *sc, u_int32_t command, fib->Header.Size = sizeof(struct aac_fib_header) + datasize; fib->Header.SenderSize = sizeof(struct aac_fib); fib->Header.SenderFibAddress = 0; /* Not needed */ - fib->Header.u.ReceiverFibAddress = sc->aac_common_busaddr + + ReceiverFibAddress = sc->aac_common_busaddr + offsetof(struct aac_common, ac_sync_fib); + fib->Header.u.ReceiverFibAddress = ReceiverFibAddress; + aac_fib_header_tole(&fib->Header); /* * Give the FIB to the controller, wait for a response. */ if (aacraid_sync_command(sc, AAC_MONKER_SYNCFIB, - fib->Header.u.ReceiverFibAddress, 0, 0, 0, NULL, NULL)) { + ReceiverFibAddress, 0, 0, 0, NULL, NULL)) { fwprintf(sc, HBA_FLAGS_DBG_ERROR_B, "IO error"); + aac_fib_header_toh(&fib->Header); return(EIO); } + aac_fib_header_toh(&fib->Header); return (0); } @@ -2407,10 +2441,13 @@ aac_src_send_command(struct aac_softc *sc, struct aac_ pFibX->Handle = cm->cm_fib->Header.Handle; pFibX->HostAddress = cm->cm_fibphys; pFibX->Size = cm->cm_fib->Header.Size; + aac_fib_xporthdr_tole(pFibX); address = cm->cm_fibphys - sizeof(struct aac_fib_xporthdr); high_addr = (u_int32_t)(address >> 32); } + aac_fib_header_tole(&cm->cm_fib->Header); + if (fibsize > 31) fibsize = 31; aac_enqueue_busy(cm); @@ -2468,8 +2505,8 @@ aac_describe_controller(struct aac_softc *sc) supp_info = ((struct aac_supplement_adapter_info *)&fib->data[0]); adapter_type = (char *)supp_info->AdapterTypeText; - sc->aac_feature_bits = supp_info->FeatureBits; - sc->aac_support_opt2 = supp_info->SupportedOptions2; + sc->aac_feature_bits = le32toh(supp_info->FeatureBits); + sc->aac_support_opt2 = le32toh(supp_info->SupportedOptions2); } } device_printf(sc->aac_dev, "%s, aacraid driver %d.%d.%d-%d\n", @@ -2487,6 +2524,7 @@ aac_describe_controller(struct aac_softc *sc) /* save the kernel revision structure for later use */ info = (struct aac_adapter_info *)&fib->data[0]; + aac_adapter_info_toh(info); sc->aac_revision = info->KernelRevision; if (bootverbose) { @@ -2720,6 +2758,18 @@ aac_ioctl_event(struct aac_softc *sc, struct aac_event /* * Send a FIB supplied from userspace + * + * Currently, sending a FIB from userspace in BE hosts is not supported. + * There are several things that need to be considered in order to + * support this, such as: + * - At least the FIB data part from userspace should already be in LE, + * or else the kernel would need to know all FIB types to be able to + * correctly convert it to BE. + * - SG tables are converted to BE by aacraid_map_command_sg(). This + * conversion should be supressed if the FIB comes from userspace. + * - aacraid_wait_command() calls functions that convert the FIB header + * to LE. But if the header is already in LE, the conversion should not + * be performed. */ static int aac_ioctl_sendfib(struct aac_softc *sc, caddr_t ufib) @@ -2961,6 +3011,8 @@ aac_ioctl_send_raw_srb(struct aac_softc *sc, caddr_t a ScsiPortCommandU64 : ScsiPortCommand; cm->cm_sgtable = (struct aac_sg_table *)&srbcmd->sg_map; + aac_srb_tole(srbcmd); + /* send command */ if (transfer_data) { bus_dmamap_load(cm->cm_passthr_dmat, @@ -2978,7 +3030,7 @@ aac_ioctl_send_raw_srb(struct aac_softc *sc, caddr_t a mtx_unlock(&sc->aac_io_lock); /* copy data */ - if (transfer_data && (srbcmd->flags & AAC_SRB_FLAGS_DATA_IN)) { + if (transfer_data && (le32toh(srbcmd->flags) & AAC_SRB_FLAGS_DATA_IN)) { if ((error = copyout(cm->cm_data, (void *)(uintptr_t)srb_sg_address, cm->cm_datalen)) != 0) @@ -2989,6 +3041,7 @@ aac_ioctl_send_raw_srb(struct aac_softc *sc, caddr_t a } /* status */ + aac_srb_response_toh((struct aac_srb_response *)fib->data); error = copyout(fib->data, user_reply, sizeof(struct aac_srb_response)); out: @@ -3039,7 +3092,7 @@ aac_request_aif(struct aac_softc *sc) /* set AIF marker */ fib->Header.Handle = 0x00800000; fib->Header.Command = AifRequest; - ((struct aac_aif_command *)fib->data)->command = AifReqEvent; + ((struct aac_aif_command *)fib->data)->command = htole32(AifReqEvent); aacraid_map_command_sg(cm, NULL, 0, 0); } @@ -3080,9 +3133,9 @@ aac_handle_aif(struct aac_softc *sc, struct aac_fib *f aacraid_print_aif(sc, aif); /* Is it an event that we should care about? */ - switch (aif->command) { + switch (le32toh(aif->command)) { case AifCmdEventNotify: - switch (aif->data.EN.type) { + switch (le32toh(aif->data.EN.type)) { case AifEnAddContainer: case AifEnDeleteContainer: /* @@ -3174,10 +3227,10 @@ aac_handle_aif(struct aac_softc *sc, struct aac_fib *f break; case AifEnEnclosureManagement: - switch (aif->data.EN.data.EEE.eventType) { + switch (le32toh(aif->data.EN.data.EEE.eventType)) { case AIF_EM_DRIVE_INSERTION: case AIF_EM_DRIVE_REMOVAL: - channel = aif->data.EN.data.EEE.unitID; + channel = le32toh(aif->data.EN.data.EEE.unitID); if (sc->cam_rescan_cb != NULL) sc->cam_rescan_cb(sc, ((channel>>24) & 0xF) + 1, @@ -3189,7 +3242,7 @@ aac_handle_aif(struct aac_softc *sc, struct aac_fib *f case AifEnAddJBOD: case AifEnDeleteJBOD: case AifRawDeviceRemove: - channel = aif->data.EN.data.ECE.container; + channel = le32toh(aif->data.EN.data.ECE.container); if (sc->cam_rescan_cb != NULL) sc->cam_rescan_cb(sc, ((channel>>24) & 0xF) + 1, AAC_CAM_TARGET_WILDCARD); @@ -3209,6 +3262,8 @@ aac_handle_aif(struct aac_softc *sc, struct aac_fib *f if (next == 0) sc->aifq_filled = 1; bcopy(fib, &sc->aac_aifq[current], sizeof(struct aac_fib)); + /* Make aifq's FIB header and data LE */ + aac_fib_header_tole(&sc->aac_aifq[current].Header); /* modify AIF contexts */ if (sc->aifq_filled) { for (ctx = sc->fibctx; ctx; ctx = ctx->next) { @@ -3602,6 +3657,7 @@ aac_get_bus_info(struct aac_softc *sc) c_cmd->cmd = CT_GET_SCSI_METHOD; c_cmd->param = 0; + aac_ctcfg_tole(c_cmd); error = aac_sync_fib(sc, ContainerCommand, 0, fib, sizeof(struct aac_ctcfg)); if (error) { @@ -3613,6 +3669,7 @@ aac_get_bus_info(struct aac_softc *sc) } c_resp = (struct aac_ctcfg_resp *)&fib->data[0]; + aac_ctcfg_resp_toh(c_resp); if (c_resp->Status != ST_OK) { device_printf(sc->aac_dev, "VM_ContainerConfig returned 0x%x\n", c_resp->Status); @@ -3632,6 +3689,7 @@ aac_get_bus_info(struct aac_softc *sc) vmi->ObjId = 0; vmi->IoctlCmd = GetBusInfo; + aac_vmioctl_tole(vmi); error = aac_sync_fib(sc, ContainerCommand, 0, fib, sizeof(struct aac_vmi_businf_resp)); if (error) { @@ -3643,6 +3701,7 @@ aac_get_bus_info(struct aac_softc *sc) } vmi_resp = (struct aac_vmi_businf_resp *)&fib->data[0]; + aac_vmi_businf_resp_toh(vmi_resp); if (vmi_resp->Status != ST_OK) { device_printf(sc->aac_dev, "VM_Ioctl returned %d\n", vmi_resp->Status); @@ -3814,6 +3873,7 @@ aac_reset_adapter(struct aac_softc *sc) pc->Min = 1; pc->NoRescan = 1; + aac_pause_command_tole(pc); (void) aac_sync_fib(sc, ContainerCommand, 0, fib, sizeof (struct aac_pause_command)); aac_release_sync_fib(sc); Modified: head/sys/dev/aacraid/aacraid_cam.c ============================================================================== --- head/sys/dev/aacraid/aacraid_cam.c Thu Mar 5 19:43:43 2020 (r358683) +++ head/sys/dev/aacraid/aacraid_cam.c Thu Mar 5 20:04:41 2020 (r358684) @@ -69,6 +69,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #ifndef CAM_NEW_TRAN_CODE #define CAM_NEW_TRAN_CODE 1 @@ -417,6 +418,7 @@ aac_container_rw_command(struct cam_sim *sim, union cc if (sc->flags & AAC_FLAGS_NEW_COMM_TYPE2) { struct aac_raw_io2 *raw; + /* NOTE: LE conversion handled at aacraid_map_command_sg() */ raw = (struct aac_raw_io2 *)&fib->data[0]; bzero(raw, sizeof(struct aac_raw_io2)); fib->Header.Command = RawIo2; @@ -432,6 +434,7 @@ aac_container_rw_command(struct cam_sim *sim, union cc raw->flags = RIO2_IO_TYPE_WRITE | RIO2_SG_FORMAT_IEEE1212; } else if (sc->flags & AAC_FLAGS_RAW_IO) { struct aac_raw_io *raw; + /* NOTE: LE conversion handled at aacraid_map_command_sg() */ raw = (struct aac_raw_io *)&fib->data[0]; bzero(raw, sizeof(struct aac_raw_io)); fib->Header.Command = RawIo; @@ -452,6 +455,7 @@ aac_container_rw_command(struct cam_sim *sim, union cc br->ContainerId = ccb->ccb_h.target_id; br->BlockNumber = blockno; br->ByteCount = cm->cm_datalen; + aac_blockread_tole(br); fib->Header.Size += sizeof(struct aac_blockread); cm->cm_sgtable = &br->SgMap; } else { @@ -462,6 +466,7 @@ aac_container_rw_command(struct cam_sim *sim, union cc bw->BlockNumber = blockno; bw->ByteCount = cm->cm_datalen; bw->Stable = CUNSTABLE; + aac_blockwrite_tole(bw); fib->Header.Size += sizeof(struct aac_blockwrite); cm->cm_sgtable = &bw->SgMap; } @@ -476,6 +481,7 @@ aac_container_rw_command(struct cam_sim *sim, union cc br->BlockNumber = blockno; br->Pad = 0; br->Flags = 0; + aac_blockread64_tole(br); fib->Header.Size += sizeof(struct aac_blockread64); cm->cm_sgtable = (struct aac_sg_table *)&br->SgMap64; } else { @@ -487,6 +493,7 @@ aac_container_rw_command(struct cam_sim *sim, union cc bw->BlockNumber = blockno; bw->Pad = 0; bw->Flags = 0; + aac_blockwrite64_tole(bw); fib->Header.Size += sizeof(struct aac_blockwrite64); cm->cm_sgtable = (struct aac_sg_table *)&bw->SgMap64; } @@ -656,9 +663,10 @@ aac_container_special_command(struct cam_sim *sim, uni AAC_PM_DRIVERSUP_STOP_UNIT); ccfg->CTCommand.param[1] = co->co_mntobj.ObjectId; ccfg->CTCommand.param[2] = 0; /* 1 - immediate */ + aac_cnt_config_tole(ccfg); if (aacraid_wait_command(cm) != 0 || - *(u_int32_t *)&fib->data[0] != 0) { + le32toh(*(u_int32_t *)&fib->data[0]) != 0) { printf("Power Management: Error start/stop container %d\n", co->co_mntobj.ObjectId); } @@ -930,6 +938,7 @@ aac_passthrough_command(struct cam_sim *sim, union ccb srb->lun = ccb->ccb_h.target_lun; srb->timeout = ccb->ccb_h.timeout; /* XXX */ srb->retry_limit = 0; + aac_srb_tole(srb); cm->cm_complete = aac_cam_complete; cm->cm_ccb = ccb; @@ -1119,7 +1128,7 @@ aac_container_complete(struct aac_command *cm) fwprintf(cm->cm_sc, HBA_FLAGS_DBG_FUNCTION_ENTRY_B, ""); ccb = cm->cm_ccb; - status = ((u_int32_t *)cm->cm_fib->data)[0]; + status = le32toh(((u_int32_t *)cm->cm_fib->data)[0]); if (cm->cm_flags & AAC_CMD_RESET) { ccb->ccb_h.status = CAM_SCSI_BUS_RESET; @@ -1146,6 +1155,7 @@ aac_cam_complete(struct aac_command *cm) fwprintf(sc, HBA_FLAGS_DBG_FUNCTION_ENTRY_B, ""); ccb = cm->cm_ccb; srbr = (struct aac_srb_response *)&cm->cm_fib->data[0]; + aac_srb_response_toh(srbr); if (cm->cm_flags & AAC_CMD_FASTRESP) { /* fast response */ @@ -1297,6 +1307,7 @@ aac_cam_reset_bus(struct cam_sim *sim, union ccb *ccb) rbc = (struct aac_resetbus *)&vmi->IoctlBuf[0]; rbc->BusNumber = camsc->inf->BusNumber - 1; + aac_vmioctl_tole(vmi); if (aacraid_wait_command(cm) != 0) { device_printf(sc->aac_dev,"Error sending ResetBus command\n"); Added: head/sys/dev/aacraid/aacraid_endian.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/dev/aacraid/aacraid_endian.c Thu Mar 5 20:04:41 2020 (r358684) @@ -0,0 +1,389 @@ +/*- + * SPDX-License-Identifier: BSD-2-Clause-FreeBSD + * + * Copyright (c) 2019 Leandro Lupori + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + */ + +#include +__FBSDID("$FreeBSD$"); + +#include +#include + +#include +#include + +#if _BYTE_ORDER != _LITTLE_ENDIAN + +#define TOH2(field, bits) field = le##bits##toh(field) +#define TOH(field, bits) TOH2(field, bits) + +#define TOLE2(field, bits) field = htole##bits(field) +#define TOLE(field, bits) TOLE2(field, bits) + +/* Convert from Little-Endian to host order (TOH) */ + +void +aac_fib_header_toh(struct aac_fib_header *ptr) +{ + TOH(ptr->XferState, 32); + TOH(ptr->Command, 16); + TOH(ptr->Size, 16); + TOH(ptr->SenderSize, 16); + TOH(ptr->SenderFibAddress, 32); + TOH(ptr->u.ReceiverFibAddress, 32); + TOH(ptr->Handle, 32); + TOH(ptr->Previous, 32); + TOH(ptr->Next, 32); +} + +void +aac_adapter_info_toh(struct aac_adapter_info *ptr) +{ + TOH(ptr->PlatformBase, 32); + TOH(ptr->CpuArchitecture, 32); + TOH(ptr->CpuVariant, 32); + TOH(ptr->ClockSpeed, 32); + TOH(ptr->ExecutionMem, 32); + TOH(ptr->BufferMem, 32); + TOH(ptr->TotalMem, 32); + + TOH(ptr->KernelRevision.buildNumber, 32); + TOH(ptr->MonitorRevision.buildNumber, 32); + TOH(ptr->HardwareRevision.buildNumber, 32); + TOH(ptr->BIOSRevision.buildNumber, 32); + + TOH(ptr->ClusteringEnabled, 32); + TOH(ptr->ClusterChannelMask, 32); + TOH(ptr->SerialNumber, 64); + TOH(ptr->batteryPlatform, 32); + TOH(ptr->SupportedOptions, 32); + TOH(ptr->OemVariant, 32); +} + +void +aac_container_creation_toh(struct aac_container_creation *ptr) +{ + u_int32_t *date = (u_int32_t *)ptr + 1; + + *date = le32toh(*date); + TOH(ptr->ViaAdapterSerialNumber, 64); +} + +void +aac_mntobj_toh(struct aac_mntobj *ptr) +{ + TOH(ptr->ObjectId, 32); + aac_container_creation_toh(&ptr->CreateInfo); + TOH(ptr->Capacity, 32); + TOH(ptr->VolType, 32); + TOH(ptr->ObjType, 32); + TOH(ptr->ContentState, 32); + TOH(ptr->ObjExtension.BlockDevice.BlockSize, 32); + TOH(ptr->ObjExtension.BlockDevice.bdLgclPhysMap, 32); + TOH(ptr->AlterEgoId, 32); + TOH(ptr->CapacityHigh, 32); +} + +void +aac_mntinforesp_toh(struct aac_mntinforesp *ptr) +{ + TOH(ptr->Status, 32); + TOH(ptr->MntType, 32); + TOH(ptr->MntRespCount, 32); + aac_mntobj_toh(&ptr->MntTable[0]); +} + +void +aac_fsa_ctm_toh(struct aac_fsa_ctm *ptr) +{ + int i; + + TOH(ptr->command, 32); + for (i = 0; i < CT_FIB_PARAMS; i++) + TOH(ptr->param[i], 32); +} + +void +aac_cnt_config_toh(struct aac_cnt_config *ptr) +{ + TOH(ptr->Command, 32); + aac_fsa_ctm_toh(&ptr->CTCommand); +} + +void +aac_ctcfg_resp_toh(struct aac_ctcfg_resp *ptr) +{ + TOH(ptr->Status, 32); + TOH(ptr->resp, 32); + TOH(ptr->param, 32); +} + +void +aac_getbusinf_toh(struct aac_getbusinf *ptr) +{ + TOH(ptr->ProbeComplete, 32); + TOH(ptr->BusCount, 32); + TOH(ptr->TargetsPerBus, 32); +} + +void +aac_vmi_businf_resp_toh(struct aac_vmi_businf_resp *ptr) +{ + TOH(ptr->Status, 32); + TOH(ptr->ObjType, 32); + TOH(ptr->MethId, 32); + TOH(ptr->ObjId, 32); + TOH(ptr->IoctlCmd, 32); + aac_getbusinf_toh(&ptr->BusInf); +} + +void +aac_srb_response_toh(struct aac_srb_response *ptr) +{ + TOH(ptr->fib_status, 32); + TOH(ptr->srb_status, 32); + TOH(ptr->scsi_status, 32); + TOH(ptr->data_len, 32); + TOH(ptr->sense_len, 32); +} + +/* Convert from host order to Little-Endian (TOLE) */ + +void +aac_adapter_init_tole(struct aac_adapter_init *ptr) +{ + TOLE(ptr->InitStructRevision, 32); + TOLE(ptr->NoOfMSIXVectors, 32); + TOLE(ptr->FilesystemRevision, 32); + TOLE(ptr->CommHeaderAddress, 32); + TOLE(ptr->FastIoCommAreaAddress, 32); + TOLE(ptr->AdapterFibsPhysicalAddress, 32); + TOLE(ptr->AdapterFibsVirtualAddress, 32); + TOLE(ptr->AdapterFibsSize, 32); + TOLE(ptr->AdapterFibAlign, 32); + TOLE(ptr->PrintfBufferAddress, 32); + TOLE(ptr->PrintfBufferSize, 32); + TOLE(ptr->HostPhysMemPages, 32); + TOLE(ptr->HostElapsedSeconds, 32); + TOLE(ptr->InitFlags, 32); + TOLE(ptr->MaxIoCommands, 32); + TOLE(ptr->MaxIoSize, 32); + TOLE(ptr->MaxFibSize, 32); + TOLE(ptr->MaxNumAif, 32); + TOLE(ptr->HostRRQ_AddrLow, 32); + TOLE(ptr->HostRRQ_AddrHigh, 32); +} + +void +aac_fib_header_tole(struct aac_fib_header *ptr) +{ + TOLE(ptr->XferState, 32); + TOLE(ptr->Command, 16); + TOLE(ptr->Size, 16); + TOLE(ptr->SenderSize, 16); + TOLE(ptr->SenderFibAddress, 32); + TOLE(ptr->u.ReceiverFibAddress, 32); + TOLE(ptr->Handle, 32); + TOLE(ptr->Previous, 32); + TOLE(ptr->Next, 32); +} + +void +aac_mntinfo_tole(struct aac_mntinfo *ptr) +{ + TOLE(ptr->Command, 32); + TOLE(ptr->MntType, 32); + TOLE(ptr->MntCount, 32); +} + +void +aac_fsa_ctm_tole(struct aac_fsa_ctm *ptr) +{ + int i; + + TOLE(ptr->command, 32); + for (i = 0; i < CT_FIB_PARAMS; i++) + TOLE(ptr->param[i], 32); +} + +void +aac_cnt_config_tole(struct aac_cnt_config *ptr) +{ + TOLE(ptr->Command, 32); + aac_fsa_ctm_tole(&ptr->CTCommand); +} + +void +aac_raw_io_tole(struct aac_raw_io *ptr) +{ + TOLE(ptr->BlockNumber, 64); + TOLE(ptr->ByteCount, 32); + TOLE(ptr->ContainerId, 16); + TOLE(ptr->Flags, 16); + TOLE(ptr->BpTotal, 16); + TOLE(ptr->BpComplete, 16); +} + +void +aac_raw_io2_tole(struct aac_raw_io2 *ptr) +{ + TOLE(ptr->strtBlkLow, 32); + TOLE(ptr->strtBlkHigh, 32); + TOLE(ptr->byteCnt, 32); + TOLE(ptr->ldNum, 16); + TOLE(ptr->flags, 16); + TOLE(ptr->sgeFirstSize, 32); + TOLE(ptr->sgeNominalSize, 32); +} + +void +aac_fib_xporthdr_tole(struct aac_fib_xporthdr *ptr) +{ + TOLE(ptr->HostAddress, 64); + TOLE(ptr->Size, 32); + TOLE(ptr->Handle, 32); +} + +void +aac_ctcfg_tole(struct aac_ctcfg *ptr) +{ + TOLE(ptr->Command, 32); + TOLE(ptr->cmd, 32); + TOLE(ptr->param, 32); +} + +void +aac_vmioctl_tole(struct aac_vmioctl *ptr) +{ + TOLE(ptr->Command, 32); + TOLE(ptr->ObjType, 32); + TOLE(ptr->MethId, 32); + TOLE(ptr->ObjId, 32); + TOLE(ptr->IoctlCmd, 32); + TOLE(ptr->IoctlBuf[0], 32); +} + +void +aac_pause_command_tole(struct aac_pause_command *ptr) +{ + TOLE(ptr->Command, 32); + TOLE(ptr->Type, 32); + TOLE(ptr->Timeout, 32); + TOLE(ptr->Min, 32); + TOLE(ptr->NoRescan, 32); + TOLE(ptr->Parm3, 32); + TOLE(ptr->Parm4, 32); + TOLE(ptr->Count, 32); +} + +void +aac_srb_tole(struct aac_srb *ptr) +{ + TOLE(ptr->function, 32); + TOLE(ptr->bus, 32); + TOLE(ptr->target, 32); + TOLE(ptr->lun, 32); + TOLE(ptr->timeout, 32); + TOLE(ptr->flags, 32); + TOLE(ptr->data_len, 32); + TOLE(ptr->retry_limit, 32); + TOLE(ptr->cdb_len, 32); +} + +void +aac_sge_ieee1212_tole(struct aac_sge_ieee1212 *ptr) +{ + TOLE(ptr->addrLow, 32); + TOLE(ptr->addrHigh, 32); + TOLE(ptr->length, 32); + TOLE(ptr->flags, 32); +} + +void +aac_sg_entryraw_tole(struct aac_sg_entryraw *ptr) +{ + TOLE(ptr->Next, 32); + TOLE(ptr->Prev, 32); + TOLE(ptr->SgAddress, 64); + TOLE(ptr->SgByteCount, 32); + TOLE(ptr->Flags, 32); +} + +void +aac_sg_entry_tole(struct aac_sg_entry *ptr) +{ + TOLE(ptr->SgAddress, 32); + TOLE(ptr->SgByteCount, 32); +} + +void +aac_sg_entry64_tole(struct aac_sg_entry64 *ptr) +{ + TOLE(ptr->SgAddress, 64); + TOLE(ptr->SgByteCount, 32); +} + +void +aac_blockread_tole(struct aac_blockread *ptr) +{ + TOLE(ptr->Command, 32); + TOLE(ptr->ContainerId, 32); + TOLE(ptr->BlockNumber, 32); + TOLE(ptr->ByteCount, 32); +} + +void +aac_blockwrite_tole(struct aac_blockwrite *ptr) +{ + TOLE(ptr->Command, 32); + TOLE(ptr->ContainerId, 32); + TOLE(ptr->BlockNumber, 32); + TOLE(ptr->ByteCount, 32); + TOLE(ptr->Stable, 32); +} + +void +aac_blockread64_tole(struct aac_blockread64 *ptr) +{ + TOLE(ptr->Command, 32); + TOLE(ptr->ContainerId, 16); + TOLE(ptr->SectorCount, 16); + TOLE(ptr->BlockNumber, 32); + TOLE(ptr->Pad, 16); + TOLE(ptr->Flags, 16); +} + +void +aac_blockwrite64_tole(struct aac_blockwrite64 *ptr) +{ + TOLE(ptr->Command, 32); + TOLE(ptr->ContainerId, 16); + TOLE(ptr->SectorCount, 16); + TOLE(ptr->BlockNumber, 32); + TOLE(ptr->Pad, 16); + TOLE(ptr->Flags, 16); +} + +#endif Added: head/sys/dev/aacraid/aacraid_endian.h ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/dev/aacraid/aacraid_endian.h Thu Mar 5 20:04:41 2020 (r358684) @@ -0,0 +1,114 @@ +/*- + * SPDX-License-Identifier: BSD-2-Clause-FreeBSD + * + * Copyright (c) 2019 Leandro Lupori + * + * 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$ + */ + +#ifndef AACRAID_ENDIAN_H +#define AACRAID_ENDIAN_H + +#include + +#if _BYTE_ORDER == _LITTLE_ENDIAN + +/* On Little-Endian (LE) hosts, make all FIB data conversion functions empty. */ + +/* Convert from Little-Endian to host order (TOH) */ +#define aac_fib_header_toh(ptr) +#define aac_adapter_info_toh(ptr) +#define aac_container_creation_toh(ptr) +#define aac_mntobj_toh(ptr) +#define aac_mntinforesp_toh(ptr) +#define aac_fsa_ctm_toh(ptr) +#define aac_cnt_config_toh(ptr) +#define aac_ctcfg_resp_toh(ptr) +#define aac_getbusinf_toh(ptr) +#define aac_vmi_businf_resp_toh(ptr) +#define aac_srb_response_toh(ptr) + +/* Convert from host order to Little-Endian (TOLE) */ *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@freebsd.org Thu Mar 5 20:53:44 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id C07DF24C53A; Thu, 5 Mar 2020 20:53:44 +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 48YNJS1K2Sz4f26; Thu, 5 Mar 2020 20:53:44 +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 CE466D42E; Thu, 5 Mar 2020 20:53:43 +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 025KrhaX080334; Thu, 5 Mar 2020 20:53:43 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 025KrhMs080333; Thu, 5 Mar 2020 20:53:43 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <202003052053.025KrhMs080333@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Thu, 5 Mar 2020 20:53:43 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r358685 - head/contrib/elftoolchain/libelf X-SVN-Group: head X-SVN-Commit-Author: emaste X-SVN-Commit-Paths: head/contrib/elftoolchain/libelf X-SVN-Commit-Revision: 358685 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages 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, 05 Mar 2020 20:53:44 -0000 Author: emaste Date: Thu Mar 5 20:53:43 2020 New Revision: 358685 URL: https://svnweb.freebsd.org/changeset/base/358685 Log: libelf: rationalize error handling in ELF note conversion Previously _libelf_cvt_NOTE_tom (to host) returned false if a note's namesz + descsz exceeded the buffer size, while _libelf_cvt_NOTE_tof (to file) silently truncated. Return false in the latter case too. Sponsored by: The FreeBSD Foundation Modified: head/contrib/elftoolchain/libelf/libelf_convert.m4 Modified: head/contrib/elftoolchain/libelf/libelf_convert.m4 ============================================================================== --- head/contrib/elftoolchain/libelf/libelf_convert.m4 Thu Mar 5 20:04:41 2020 (r358684) +++ head/contrib/elftoolchain/libelf/libelf_convert.m4 Thu Mar 5 20:53:43 2020 (r358685) @@ -1022,7 +1022,7 @@ _libelf_cvt_NOTE_tof(unsigned char *dst, size_t dsz, u count -= sizeof(Elf_Note); if (count < sz) - sz = count; + return (0); (void) memcpy(dst, src, sz); From owner-svn-src-all@freebsd.org Thu Mar 5 21:01:20 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 1D96224C696; Thu, 5 Mar 2020 21:01:20 +0000 (UTC) (envelope-from glebius@freebsd.org) Received: from cell.glebi.us (glebi.us [162.251.186.162]) (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 48YNTC4YG2z3MVY; Thu, 5 Mar 2020 21:01: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 025L1FDG034727 (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384 bits=256 verify=NO); Thu, 5 Mar 2020 13:01:15 -0800 (PST) (envelope-from glebius@freebsd.org) Received: (from glebius@localhost) by cell.glebi.us (8.15.2/8.15.2/Submit) id 025L1EYZ034726; Thu, 5 Mar 2020 13:01:14 -0800 (PST) (envelope-from glebius@freebsd.org) X-Authentication-Warning: cell.glebi.us: glebius set sender to glebius@freebsd.org using -f Date: Thu, 5 Mar 2020 13:01:14 -0800 From: Gleb Smirnoff To: Slawa Olhovchenkov Cc: Dimitry Andric , svn-src-head , svn-src-all , src-committers@freebsd.org Subject: Re: svn commit: r358655 - head/sbin/mount_nfs Message-ID: <20200305210114.GX5741@FreeBSD.org> References: <202003042227.024MRGsW072613@repo.freebsd.org> <244e28ea-1217-cefc-354e-02ecb201637a@FreeBSD.org> <20200305163350.GU5741@FreeBSD.org> <20200305172454.GJ8028@zxy.spb.ru> <20200305173515.GK8028@zxy.spb.ru> <20200305174411.GV5741@FreeBSD.org> <1A13B93C-7D87-4210-AD3D-2B198C166CE1@FreeBSD.org> <20200305183041.GU8012@zxy.spb.ru> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20200305183041.GU8012@zxy.spb.ru> X-Rspamd-Queue-Id: 48YNTC4YG2z3MVY X-Spamd-Bar: / Authentication-Results: mx1.freebsd.org; none X-Spamd-Result: default: False [-0.09 / 15.00]; local_wl_from(0.00)[freebsd.org]; NEURAL_HAM_LONG(-0.99)[-0.988,0]; NEURAL_SPAM_MEDIUM(0.90)[0.902,0]; ASN(0.00)[asn:27348, ipnet:162.251.186.0/24, 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, 05 Mar 2020 21:01:20 -0000 On Thu, Mar 05, 2020 at 09:30:41PM +0300, Slawa Olhovchenkov wrote: S> > > On Thu, Mar 05, 2020 at 08:35:15PM +0300, Slawa Olhovchenkov wrote: S> > > S> > > D> sbin/mount_nfs/mount_nfs.c:549:10: error: cast from 'char *' to 'struct S> > > S> > > D> if_msghdr *' increases required alignment from 1 to 4 S> > > S> > > D> [-Werror,-Wcast-align] S> > > S> > > D> ifm = (struct if_msghdr *)buf; S> > > S> > > D> ^~~~~~~~~~~~~~~~~~~~~~~ S> > > S> > > D> 1 error generated. S> > > S> > > D> S> > > S> > > D> In practice I don't think the buffer can ever get misaligned, so can you S> > > S> > > D> please add a NO_WCAST_ALIGN= to the Makefile? S> > > S> > > S> > > S> > > route(8) handles the same problem via intermediate (void *) cast. What is S> > > S> > > preferred way to solve the problem? Change compiler flags file wide, or S> > > S> > > just through (void *) cast? S> > > S> > S> > > S> > Copy to aligned buffer or got SIGBUS on some architectures? S> > > S> S> > > S> char buf[2048] __aligned(__alignof(struct if_msghdr)); S> > > S> S> > > S> resolve this watning. S> > > S> > > Thanks, Slawa! I think this is the most elegant solution. S> > S> > Why don't just declare the buffer as: S> > S> > struct if_msghdr buf; S> > S> > and then do: S> > S> > nread = read(s, &buf, sizeof buf); S> > S> > ? You are never reading more than one if_msghdr anyway, and then there S> > is no need to cast anything. S> S> My inspiration: route socket can return other messages (man 4 route) Yes, exactly. We don't know what size next datagram is going to be. -- Gleb Smirnoff From owner-svn-src-all@freebsd.org Thu Mar 5 21:01:48 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 0DBA824C88F; Thu, 5 Mar 2020 21:01: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 48YNTl6fftz3Mks; Thu, 5 Mar 2020 21:01:47 +0000 (UTC) (envelope-from glebius@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id DFA7DD4CC; Thu, 5 Mar 2020 21:01: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 025L1lEU082270; Thu, 5 Mar 2020 21:01:47 GMT (envelope-from glebius@FreeBSD.org) Received: (from glebius@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 025L1lUA082269; Thu, 5 Mar 2020 21:01:47 GMT (envelope-from glebius@FreeBSD.org) Message-Id: <202003052101.025L1lUA082269@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: glebius set sender to glebius@FreeBSD.org using -f From: Gleb Smirnoff Date: Thu, 5 Mar 2020 21:01:47 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r358686 - head/sbin/mount_nfs X-SVN-Group: head X-SVN-Commit-Author: glebius X-SVN-Commit-Paths: head/sbin/mount_nfs X-SVN-Commit-Revision: 358686 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages 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, 05 Mar 2020 21:01:48 -0000 Author: glebius Date: Thu Mar 5 21:01:47 2020 New Revision: 358686 URL: https://svnweb.freebsd.org/changeset/base/358686 Log: Align the buffer to the alignment of the structure we expect. Submitted by: Slawa Olhovchenkov Modified: head/sbin/mount_nfs/mount_nfs.c Modified: head/sbin/mount_nfs/mount_nfs.c ============================================================================== --- head/sbin/mount_nfs/mount_nfs.c Thu Mar 5 20:53:43 2020 (r358685) +++ head/sbin/mount_nfs/mount_nfs.c Thu Mar 5 21:01:47 2020 (r358686) @@ -514,7 +514,7 @@ sec_num_to_name(int flavor) static time_t rtm_ifinfo_sleep(time_t sec) { - char buf[2048]; + char buf[2048] __aligned(__alignof(struct if_msghdr)); fd_set rfds; struct timeval tv, start; ssize_t nread; From owner-svn-src-all@freebsd.org Thu Mar 5 22:15:14 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id E2F5524E75D; Thu, 5 Mar 2020 22:15:14 +0000 (UTC) (envelope-from dim@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 48YQ6V3Lcwz4K6h; Thu, 5 Mar 2020 22:15:14 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from tensor.andric.com (tensor.andric.com [IPv6:2001:470:7a58:1::1]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "tensor.andric.com", Issuer "Let's Encrypt Authority X3" (verified OK)) (Authenticated sender: dim) by smtp.freebsd.org (Postfix) with ESMTPSA id 1904524C1; Thu, 5 Mar 2020 22:15:14 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from [IPv6:2001:470:7a58::44b2:892b:3322:a46d] (unknown [IPv6:2001:470:7a58:0:44b2:892b:3322:a46d]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by tensor.andric.com (Postfix) with ESMTPSA id 46A1F2D03E; Thu, 5 Mar 2020 23:15:12 +0100 (CET) From: Dimitry Andric Message-Id: Content-Type: multipart/signed; boundary="Apple-Mail=_06DCACBE-2866-4643-AE54-B08F4BA952F8"; protocol="application/pgp-signature"; micalg=pgp-sha1 Mime-Version: 1.0 (Mac OS X Mail 12.4 \(3445.104.11\)) Subject: Re: svn commit: r358655 - head/sbin/mount_nfs Date: Thu, 5 Mar 2020 23:15:04 +0100 In-Reply-To: <20200305210114.GX5741@FreeBSD.org> Cc: Slawa Olhovchenkov , svn-src-head , svn-src-all , src-committers@freebsd.org To: Gleb Smirnoff References: <202003042227.024MRGsW072613@repo.freebsd.org> <244e28ea-1217-cefc-354e-02ecb201637a@FreeBSD.org> <20200305163350.GU5741@FreeBSD.org> <20200305172454.GJ8028@zxy.spb.ru> <20200305173515.GK8028@zxy.spb.ru> <20200305174411.GV5741@FreeBSD.org> <1A13B93C-7D87-4210-AD3D-2B198C166CE1@FreeBSD.org> <20200305183041.GU8012@zxy.spb.ru> <20200305210114.GX5741@FreeBSD.org> X-Mailer: Apple Mail (2.3445.104.11) X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages 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, 05 Mar 2020 22:15:15 -0000 --Apple-Mail=_06DCACBE-2866-4643-AE54-B08F4BA952F8 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=us-ascii On 5 Mar 2020, at 22:01, Gleb Smirnoff wrote: >=20 > On Thu, Mar 05, 2020 at 09:30:41PM +0300, Slawa Olhovchenkov wrote: > S> > > On Thu, Mar 05, 2020 at 08:35:15PM +0300, Slawa Olhovchenkov = wrote: > S> > > S> > > D> sbin/mount_nfs/mount_nfs.c:549:10: error: cast from = 'char *' to 'struct > S> > > S> > > D> if_msghdr *' increases required alignment from 1 to 4 > S> > > S> > > D> [-Werror,-Wcast-align] > S> > > S> > > D> ifm =3D (struct if_msghdr = *)buf; > S> > > S> > > D> ^~~~~~~~~~~~~~~~~~~~~~~ > S> > > S> > > D> 1 error generated. > S> > > S> > > D> > S> > > S> > > D> In practice I don't think the buffer can ever get = misaligned, so can you > S> > > S> > > D> please add a NO_WCAST_ALIGN=3D to the Makefile? > S> > > S> > > > S> > > S> > > route(8) handles the same problem via intermediate (void = *) cast. What is > S> > > S> > > preferred way to solve the problem? Change compiler = flags file wide, or > S> > > S> > > just through (void *) cast? > S> > > S> > > S> > > S> > Copy to aligned buffer or got SIGBUS on some = architectures? > S> > > S> > S> > > S> char buf[2048] __aligned(__alignof(struct if_msghdr)); > S> > > S> > S> > > S> resolve this watning. > S> > > > S> > > Thanks, Slawa! I think this is the most elegant solution. > S> > > S> > Why don't just declare the buffer as: > S> > > S> > struct if_msghdr buf; > S> > > S> > and then do: > S> > > S> > nread =3D read(s, &buf, sizeof buf); > S> > > S> > ? You are never reading more than one if_msghdr anyway, and then = there > S> > is no need to cast anything. > S> > S> My inspiration: route socket can return other messages (man 4 = route) >=20 > Yes, exactly. We don't know what size next datagram is going to be. Oh, in that case this code seems completely wrong. How do you know the full datagram will be delivered with one read() call? If it always is, then there is no need to read more than the size of struct if_msghdr, since you are not using any data beyond it. So in that case, you can suffice with read(..., sizeof(if_msghdr)). If the read() call will return partial results, you must repeatedly call it in a loop, until you either reach EOF, or have enough data. In that case, a buffer with the size of if_msghdr is also enough, since you never need to read beyond that. -Dimitry --Apple-Mail=_06DCACBE-2866-4643-AE54-B08F4BA952F8 Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename=signature.asc Content-Type: application/pgp-signature; name=signature.asc Content-Description: Message signed with OpenPGP -----BEGIN PGP SIGNATURE----- Version: GnuPG/MacGPG2 v2.2 iF0EARECAB0WIQR6tGLSzjX8bUI5T82wXqMKLiCWowUCXmF56AAKCRCwXqMKLiCW o8u/AJ4gMCatiYthXVdvDYPlt+MuNcHd4QCfWsm9p65HeS1zqopZ0sysOH9eatc= =4Ny0 -----END PGP SIGNATURE----- --Apple-Mail=_06DCACBE-2866-4643-AE54-B08F4BA952F8-- From owner-svn-src-all@freebsd.org Thu Mar 5 22:45:17 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id D092D24F0C6; Thu, 5 Mar 2020 22:45: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 48YQn93gV5z4flN; Thu, 5 Mar 2020 22:45: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 3BFBEE990; Thu, 5 Mar 2020 22:45: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 025MjHvp046509; Thu, 5 Mar 2020 22:45:17 GMT (envelope-from kevans@FreeBSD.org) Received: (from kevans@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 025MjHZG046508; Thu, 5 Mar 2020 22:45:17 GMT (envelope-from kevans@FreeBSD.org) Message-Id: <202003052245.025MjHZG046508@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kevans set sender to kevans@FreeBSD.org using -f From: Kyle Evans Date: Thu, 5 Mar 2020 22:45:16 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r358687 - head/libexec/tftpd/tests X-SVN-Group: head X-SVN-Commit-Author: kevans X-SVN-Commit-Paths: head/libexec/tftpd/tests X-SVN-Commit-Revision: 358687 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages 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, 05 Mar 2020 22:45:18 -0000 Author: kevans Date: Thu Mar 5 22:45:16 2020 New Revision: 358687 URL: https://svnweb.freebsd.org/changeset/base/358687 Log: tftpd: tests: raise targeted cstd to c11 r358556 added alignas() use to the functional tests, which isn't defined until C11. Raise the -std to C11 to fix the build under freebsd-gcc{6,9}. Reported by: mhorne, Jenkins/CI Modified: head/libexec/tftpd/tests/Makefile Modified: head/libexec/tftpd/tests/Makefile ============================================================================== --- head/libexec/tftpd/tests/Makefile Thu Mar 5 21:01:47 2020 (r358686) +++ head/libexec/tftpd/tests/Makefile Thu Mar 5 22:45:16 2020 (r358687) @@ -10,5 +10,6 @@ TEST_METADATA.functional+= timeout=15 LIBADD= util WARNS?= 6 +CSTD= c11 .include From owner-svn-src-all@freebsd.org Fri Mar 6 00:00:25 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 305FE250C69; Fri, 6 Mar 2020 00:00:25 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from smtp.freebsd.org (smtp.freebsd.org [IPv6:2610:1c1:1:606c::24b:4]) (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 48YSRr6z7fz4C4w; Fri, 6 Mar 2020 00:00:24 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from John-Baldwins-MacBook-Pro-7.local (ralph.baldwin.cx [66.234.199.215]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client did not present a certificate) (Authenticated sender: jhb) by smtp.freebsd.org (Postfix) with ESMTPSA id 6EB0E30FE; Fri, 6 Mar 2020 00:00:24 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Subject: Re: svn commit: r358687 - head/libexec/tftpd/tests To: Kyle Evans , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org References: <202003052245.025MjHZG046508@repo.freebsd.org> From: John Baldwin 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: <69c45761-b697-0809-9ba5-e16dd111d35b@FreeBSD.org> Date: Thu, 5 Mar 2020 16:00:24 -0800 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.12; rv:68.0) Gecko/20100101 Thunderbird/68.5.0 MIME-Version: 1.0 In-Reply-To: <202003052245.025MjHZG046508@repo.freebsd.org> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages 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, 06 Mar 2020 00:00:25 -0000 On 3/5/20 2:45 PM, Kyle Evans wrote: > Author: kevans > Date: Thu Mar 5 22:45:16 2020 > New Revision: 358687 > URL: https://svnweb.freebsd.org/changeset/base/358687 > > Log: > tftpd: tests: raise targeted cstd to c11 > > r358556 added alignas() use to the functional tests, which isn't defined > until C11. Raise the -std to C11 to fix the build under freebsd-gcc{6,9}. > > Reported by: mhorne, Jenkins/CI Thanks for fixing! -- John Baldwin From owner-svn-src-all@freebsd.org Fri Mar 6 01:45:04 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 9C568252A7D; Fri, 6 Mar 2020 01:45:04 +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 48YVmc2wLKz3CLr; Fri, 6 Mar 2020 01:45:04 +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 3067B18B26; Fri, 6 Mar 2020 01:45:04 +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 0261j3wE053285; Fri, 6 Mar 2020 01:45:03 GMT (envelope-from jhibbits@FreeBSD.org) Received: (from jhibbits@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 0261j3vl053282; Fri, 6 Mar 2020 01:45:03 GMT (envelope-from jhibbits@FreeBSD.org) Message-Id: <202003060145.0261j3vl053282@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jhibbits set sender to jhibbits@FreeBSD.org using -f From: Justin Hibbits Date: Fri, 6 Mar 2020 01:45:03 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r358688 - head/lib/libc/powerpc64/string X-SVN-Group: head X-SVN-Commit-Author: jhibbits X-SVN-Commit-Paths: head/lib/libc/powerpc64/string X-SVN-Commit-Revision: 358688 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages 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, 06 Mar 2020 01:45:04 -0000 Author: jhibbits Date: Fri Mar 6 01:45:03 2020 New Revision: 358688 URL: https://svnweb.freebsd.org/changeset/base/358688 Log: powerpc/powerpc64: Enforce natural alignment in memcpy Summary: POWER architecture CPUs (Book-S) require natural alignment for cache-inhibited storage accesses. Since we can't know the caching model for a page ahead of time, always enforce natural alignment in memcpy. This fixes a SIGBUS in X with acceleration enabled on POWER9. As part of this, revert r358672, it's no longer necessary with this fix. Regression tested by alfredo. Reviewed by: alfredo Differential Revision: https://reviews.freebsd.org/D23969 Modified: head/lib/libc/powerpc64/string/bcopy_resolver.c head/lib/libc/powerpc64/string/memcpy.S head/lib/libc/powerpc64/string/memcpy_vsx.S Modified: head/lib/libc/powerpc64/string/bcopy_resolver.c ============================================================================== --- head/lib/libc/powerpc64/string/bcopy_resolver.c Thu Mar 5 22:45:16 2020 (r358687) +++ head/lib/libc/powerpc64/string/bcopy_resolver.c Fri Mar 6 01:45:03 2020 (r358688) @@ -66,7 +66,7 @@ DEFINE_UIFUNC(, FN_RET, FN_NAME, FN_PARAMS) * Since POWER ISA 2.07B this is solved transparently * by the hardware */ - if (cpu_features2 & PPC_FEATURE2_ARCH_2_07) + if (cpu_features2 & PPC_FEATURE_HAS_VSX) return (FN_NAME_VSX); else return (FN_NAME_NOVSX); Modified: head/lib/libc/powerpc64/string/memcpy.S ============================================================================== --- head/lib/libc/powerpc64/string/memcpy.S Thu Mar 5 22:45:16 2020 (r358687) +++ head/lib/libc/powerpc64/string/memcpy.S Fri Mar 6 01:45:03 2020 (r358688) @@ -39,6 +39,11 @@ WEAK_REFERENCE(__memcpy, memcpy); #define BLOCK_BYTES (1 << BLOCK_BITS) #define BLOCK_MASK (BLOCK_BYTES - 1) +/* Minimum 8 byte alignment, to avoid cache-inhibited alignment faults. */ +#ifndef ALIGN_MASK +#define ALIGN_MASK 0x7 +#endif + /* * r3: dst * r4: src @@ -48,6 +53,12 @@ ENTRY(FN_NAME) cmpdi %r5, 0 /* len == 0? nothing to do */ beqlr- + /* If src and dst are relatively misaligned, do byte copies. */ + andi. %r8, %r3, ALIGN_MASK + andi. %r7, %r4, ALIGN_MASK + cmpd %r8, %r7 + mr %r7, %r5 + bne+ .Lcopy_remaining_fix_index_byte mr %r8, %r3 /* save dst */ /* align src */ Modified: head/lib/libc/powerpc64/string/memcpy_vsx.S ============================================================================== --- head/lib/libc/powerpc64/string/memcpy_vsx.S Thu Mar 5 22:45:16 2020 (r358687) +++ head/lib/libc/powerpc64/string/memcpy_vsx.S Fri Mar 6 01:45:03 2020 (r358688) @@ -30,6 +30,7 @@ #define FN_NAME __memcpy_vsx #define BLOCK_BITS 6 +#define ALIGN_MASK 0xf /* * r5: bytes to copy (multiple of BLOCK_BYTES) From owner-svn-src-all@freebsd.org Fri Mar 6 01:50:16 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id AD7C7252BF1; Fri, 6 Mar 2020 01:50:16 +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 48YVtc2G9cz3PtY; Fri, 6 Mar 2020 01:50:16 +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 121A118B32; Fri, 6 Mar 2020 01:50:16 +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 0261oFjN053593; Fri, 6 Mar 2020 01:50:15 GMT (envelope-from jhibbits@FreeBSD.org) Received: (from jhibbits@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 0261oFT3053592; Fri, 6 Mar 2020 01:50:15 GMT (envelope-from jhibbits@FreeBSD.org) Message-Id: <202003060150.0261oFT3053592@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jhibbits set sender to jhibbits@FreeBSD.org using -f From: Justin Hibbits Date: Fri, 6 Mar 2020 01:50:15 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r358689 - head/sys/dev/mfi X-SVN-Group: head X-SVN-Commit-Author: jhibbits X-SVN-Commit-Paths: head/sys/dev/mfi X-SVN-Commit-Revision: 358689 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages 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, 06 Mar 2020 01:50:16 -0000 Author: jhibbits Date: Fri Mar 6 01:50:15 2020 New Revision: 358689 URL: https://svnweb.freebsd.org/changeset/base/358689 Log: Fix a mistaken conditional in mfi_tbolt_send_frame() As written, the condition of (cdb[0] != 0x28 || cdb[0] != 0x2A) will always be true, since if it's one, it's obviously not the other. Reading the code, the intent appears to be that it should only perform the operation if it's neither, otherwise the conditional can be elided. Found by clang 10. Modified: head/sys/dev/mfi/mfi_tbolt.c Modified: head/sys/dev/mfi/mfi_tbolt.c ============================================================================== --- head/sys/dev/mfi/mfi_tbolt.c Fri Mar 6 01:45:03 2020 (r358688) +++ head/sys/dev/mfi/mfi_tbolt.c Fri Mar 6 01:50:15 2020 (r358689) @@ -1109,7 +1109,7 @@ mfi_tbolt_send_frame(struct mfi_softc *sc, struct mfi_ if (hdr->cmd == MFI_CMD_PD_SCSI_IO) { /* check for inquiry commands coming from CLI */ - if (cdb[0] != 0x28 || cdb[0] != 0x2A) { + if (cdb[0] != 0x28 && cdb[0] != 0x2A) { if ((req_desc = mfi_tbolt_build_mpt_cmd(sc, cm)) == NULL) { device_printf(sc->mfi_dev, "Mapping from MFI " From owner-svn-src-all@freebsd.org Fri Mar 6 02:30:04 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id EE8AE253C67; Fri, 6 Mar 2020 02:30:04 +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 48YWmX5xTvz4HJX; Fri, 6 Mar 2020 02:30:04 +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 BFC64192CB; Fri, 6 Mar 2020 02:30:04 +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 0262U4nd077305; Fri, 6 Mar 2020 02:30:04 GMT (envelope-from jhibbits@FreeBSD.org) Received: (from jhibbits@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 0262U49L077304; Fri, 6 Mar 2020 02:30:04 GMT (envelope-from jhibbits@FreeBSD.org) Message-Id: <202003060230.0262U49L077304@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jhibbits set sender to jhibbits@FreeBSD.org using -f From: Justin Hibbits Date: Fri, 6 Mar 2020 02:30:04 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r358690 - head/lib/libc/powerpc64/string X-SVN-Group: head X-SVN-Commit-Author: jhibbits X-SVN-Commit-Paths: head/lib/libc/powerpc64/string X-SVN-Commit-Revision: 358690 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages 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, 06 Mar 2020 02:30:05 -0000 Author: jhibbits Date: Fri Mar 6 02:30:04 2020 New Revision: 358690 URL: https://svnweb.freebsd.org/changeset/base/358690 Log: Finish revert of r358672, missed in r358688. Manual reverts never succeed correctly. Reported by: luporl Modified: head/lib/libc/powerpc64/string/bcopy_resolver.c Modified: head/lib/libc/powerpc64/string/bcopy_resolver.c ============================================================================== --- head/lib/libc/powerpc64/string/bcopy_resolver.c Fri Mar 6 01:50:15 2020 (r358689) +++ head/lib/libc/powerpc64/string/bcopy_resolver.c Fri Mar 6 02:30:04 2020 (r358690) @@ -66,7 +66,7 @@ DEFINE_UIFUNC(, FN_RET, FN_NAME, FN_PARAMS) * Since POWER ISA 2.07B this is solved transparently * by the hardware */ - if (cpu_features2 & PPC_FEATURE_HAS_VSX) + if (cpu_features & PPC_FEATURE_HAS_VSX) return (FN_NAME_VSX); else return (FN_NAME_NOVSX); From owner-svn-src-all@freebsd.org Fri Mar 6 03:46:48 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id E8876255012; Fri, 6 Mar 2020 03:46:48 +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 48YYT45042z3xJq; Fri, 6 Mar 2020 03:46:48 +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 A668C1A1F8; Fri, 6 Mar 2020 03:46:48 +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 0263km0i025793; Fri, 6 Mar 2020 03:46:48 GMT (envelope-from jhibbits@FreeBSD.org) Received: (from jhibbits@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 0263kmXJ025792; Fri, 6 Mar 2020 03:46:48 GMT (envelope-from jhibbits@FreeBSD.org) Message-Id: <202003060346.0263kmXJ025792@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jhibbits set sender to jhibbits@FreeBSD.org using -f From: Justin Hibbits Date: Fri, 6 Mar 2020 03:46:48 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r358691 - head/lib/libc/powerpc64/string X-SVN-Group: head X-SVN-Commit-Author: jhibbits X-SVN-Commit-Paths: head/lib/libc/powerpc64/string X-SVN-Commit-Revision: 358691 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages 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, 06 Mar 2020 03:46:49 -0000 Author: jhibbits Date: Fri Mar 6 03:46:48 2020 New Revision: 358691 URL: https://svnweb.freebsd.org/changeset/base/358691 Log: powerpc/memcpy: Don't predict the src and dst will be misaligned Predicting misalignment will pessimize the expected common case. Don't predict true or false in thise case. Modified: head/lib/libc/powerpc64/string/memcpy.S Modified: head/lib/libc/powerpc64/string/memcpy.S ============================================================================== --- head/lib/libc/powerpc64/string/memcpy.S Fri Mar 6 02:30:04 2020 (r358690) +++ head/lib/libc/powerpc64/string/memcpy.S Fri Mar 6 03:46:48 2020 (r358691) @@ -58,7 +58,7 @@ ENTRY(FN_NAME) andi. %r7, %r4, ALIGN_MASK cmpd %r8, %r7 mr %r7, %r5 - bne+ .Lcopy_remaining_fix_index_byte + bne .Lcopy_remaining_fix_index_byte mr %r8, %r3 /* save dst */ /* align src */ From owner-svn-src-all@freebsd.org Fri Mar 6 08:50:19 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 62FD02631E8; Fri, 6 Mar 2020 08:50:19 +0000 (UTC) (envelope-from sgalabov@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 48YhCH1NV5z4ZZ1; Fri, 6 Mar 2020 08:50:19 +0000 (UTC) (envelope-from sgalabov@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 0B2DD1D8D7; Fri, 6 Mar 2020 08:50:19 +0000 (UTC) (envelope-from sgalabov@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 0268oIbP006109; Fri, 6 Mar 2020 08:50:18 GMT (envelope-from sgalabov@FreeBSD.org) Received: (from sgalabov@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 0268oImB006108; Fri, 6 Mar 2020 08:50:18 GMT (envelope-from sgalabov@FreeBSD.org) Message-Id: <202003060850.0268oImB006108@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: sgalabov set sender to sgalabov@FreeBSD.org using -f From: Stanislav Galabov Date: Fri, 6 Mar 2020 08:50:18 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r358693 - head/sys/dev/rt X-SVN-Group: head X-SVN-Commit-Author: sgalabov X-SVN-Commit-Paths: head/sys/dev/rt X-SVN-Commit-Revision: 358693 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages 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, 06 Mar 2020 08:50:19 -0000 Author: sgalabov Date: Fri Mar 6 08:50:18 2020 New Revision: 358693 URL: https://svnweb.freebsd.org/changeset/base/358693 Log: Add Gigabit Ethernet support for RT3883 and RT2880 Ralink/Mediatek SoCs Submitted by: yamori813@yahoo.co.jp Reported by: yamori813@yahoo.co.jp Reviewed by: sgalabov, ray Obtained from: yamori813@yahoo.co.jp Differential Revision: https://reviews.freebsd.org/D22618 Modified: head/sys/dev/rt/if_rt.c Modified: head/sys/dev/rt/if_rt.c ============================================================================== --- head/sys/dev/rt/if_rt.c Fri Mar 6 07:07:25 2020 (r358692) +++ head/sys/dev/rt/if_rt.c Fri Mar 6 08:50:18 2020 (r358693) @@ -101,6 +101,7 @@ __FBSDID("$FreeBSD$"); #define RT_CHIPID_RT2880 0x2880 #define RT_CHIPID_RT3050 0x3050 +#define RT_CHIPID_RT3883 0x3883 #define RT_CHIPID_RT5350 0x5350 #define RT_CHIPID_MT7620 0x7620 #define RT_CHIPID_MT7621 0x7621 @@ -111,7 +112,7 @@ static const struct ofw_compat_data rt_compat_data[] = { "ralink,rt2880-eth", RT_CHIPID_RT2880 }, { "ralink,rt3050-eth", RT_CHIPID_RT3050 }, { "ralink,rt3352-eth", RT_CHIPID_RT3050 }, - { "ralink,rt3883-eth", RT_CHIPID_RT3050 }, + { "ralink,rt3883-eth", RT_CHIPID_RT3883 }, { "ralink,rt5350-eth", RT_CHIPID_RT5350 }, { "ralink,mt7620a-eth", RT_CHIPID_MT7620 }, { "mediatek,mt7620-eth", RT_CHIPID_MT7620 }, @@ -355,10 +356,18 @@ rt_attach(device_t dev) struct rt_softc *sc; struct ifnet *ifp; int error, i; +#ifdef FDT + phandle_t node; + char fdtval[32]; +#endif sc = device_get_softc(dev); sc->dev = dev; +#ifdef FDT + node = ofw_bus_get_node(sc->dev); +#endif + mtx_init(&sc->lock, device_get_nameunit(dev), MTX_NETWORK_LOCK, MTX_DEF | MTX_RECURSE); @@ -480,8 +489,16 @@ rt_attach(device_t dev) GDM_DST_PORT_CPU << GDM_OFRC_P_SHIFT /* fwd Other to CPU */ )); - if (sc->rt_chipid == RT_CHIPID_RT2880) - RT_WRITE(sc, MDIO_CFG, MDIO_2880_100T_INIT); +#ifdef FDT + if (sc->rt_chipid == RT_CHIPID_RT2880 || + sc->rt_chipid == RT_CHIPID_RT3883) { + if (OF_getprop(node, "port-mode", fdtval, sizeof(fdtval)) > 0 && + strcmp(fdtval, "gigasw") == 0) + RT_WRITE(sc, MDIO_CFG, MDIO_2880_GIGA_INIT); + else + RT_WRITE(sc, MDIO_CFG, MDIO_2880_100T_INIT); + } +#endif /* allocate Tx and Rx rings */ for (i = 0; i < RT_SOFTC_TX_RING_COUNT; i++) { @@ -2912,7 +2929,7 @@ rtmdio_probe(device_t dev) if (!ofw_bus_is_compatible(dev, "ralink,rt2880-mdio")) return (ENXIO); - device_set_desc(dev, "FV built-in ethernet interface, MDIO controller"); + device_set_desc(dev, "RT built-in ethernet interface, MDIO controller"); return(0); } From owner-svn-src-all@freebsd.org Fri Mar 6 09:59:09 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 4420B264556; Fri, 6 Mar 2020 09:59:09 +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 48Yjkh5d5wz4Cw7; Fri, 6 Mar 2020 09:59:08 +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 53F2E1E5AC; Fri, 6 Mar 2020 09:59:08 +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 0269x8IW047557; Fri, 6 Mar 2020 09:59:08 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 0269x8Za047556; Fri, 6 Mar 2020 09:59:08 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <202003060959.0269x8Za047556@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Fri, 6 Mar 2020 09:59:08 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r358694 - head/sys/ofed/drivers/infiniband/ulp/ipoib X-SVN-Group: head X-SVN-Commit-Author: hselasky X-SVN-Commit-Paths: head/sys/ofed/drivers/infiniband/ulp/ipoib X-SVN-Commit-Revision: 358694 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages 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, 06 Mar 2020 09:59:09 -0000 Author: hselasky Date: Fri Mar 6 09:59:07 2020 New Revision: 358694 URL: https://svnweb.freebsd.org/changeset/base/358694 Log: Fix some whitespace issues in ipoib. MFC after: 1 week Sponsored by: Mellanox Technologies Modified: head/sys/ofed/drivers/infiniband/ulp/ipoib/ipoib_main.c Modified: head/sys/ofed/drivers/infiniband/ulp/ipoib/ipoib_main.c ============================================================================== --- head/sys/ofed/drivers/infiniband/ulp/ipoib/ipoib_main.c Fri Mar 6 08:50:18 2020 (r358693) +++ head/sys/ofed/drivers/infiniband/ulp/ipoib/ipoib_main.c Fri Mar 6 09:59:07 2020 (r358694) @@ -1760,12 +1760,12 @@ module_exit(ipoib_cleanup_module); static int ipoib_evhand(module_t mod, int event, void *arg) { - return (0); + return (0); } static moduledata_t ipoib_mod = { - .name = "ipoib", - .evhand = ipoib_evhand, + .name = "ipoib", + .evhand = ipoib_evhand, }; DECLARE_MODULE(ipoib, ipoib_mod, SI_SUB_LAST, SI_ORDER_ANY); From owner-svn-src-all@freebsd.org Fri Mar 6 11:26:17 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 99EC6265B38; Fri, 6 Mar 2020 11:26:17 +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 48YlgF2dJWz4cYS; Fri, 6 Mar 2020 11:26:17 +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 ED0A91F5CD; Fri, 6 Mar 2020 11:26:16 +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 026BQG2X001805; Fri, 6 Mar 2020 11:26:16 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 026BQGNg001804; Fri, 6 Mar 2020 11:26:16 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <202003061126.026BQGNg001804@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Fri, 6 Mar 2020 11:26:16 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r358695 - head/sys/sys X-SVN-Group: head X-SVN-Commit-Author: hselasky X-SVN-Commit-Paths: head/sys/sys X-SVN-Commit-Revision: 358695 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages 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, 06 Mar 2020 11:26:17 -0000 Author: hselasky Date: Fri Mar 6 11:26:16 2020 New Revision: 358695 URL: https://svnweb.freebsd.org/changeset/base/358695 Log: Define more subsystem orders. Intended for use with module_init_order() in the LinuxKPI. MFC after: 1 week Sponsored by: Mellanox Technologies Modified: head/sys/sys/kernel.h Modified: head/sys/sys/kernel.h ============================================================================== --- head/sys/sys/kernel.h Fri Mar 6 09:59:07 2020 (r358694) +++ head/sys/sys/kernel.h Fri Mar 6 11:26:16 2020 (r358695) @@ -183,6 +183,10 @@ enum sysinit_elem_order { SI_ORDER_SECOND = 0x0000001, /* second*/ SI_ORDER_THIRD = 0x0000002, /* third*/ SI_ORDER_FOURTH = 0x0000003, /* fourth*/ + SI_ORDER_FIFTH = 0x0000004, /* fifth*/ + SI_ORDER_SIXTH = 0x0000005, /* sixth*/ + SI_ORDER_SEVENTH = 0x0000006, /* seventh*/ + SI_ORDER_EIGHTH = 0x0000007, /* eighth*/ SI_ORDER_MIDDLE = 0x1000000, /* somewhere in the middle */ SI_ORDER_ANY = 0xfffffff /* last*/ }; From owner-svn-src-all@freebsd.org Fri Mar 6 12:01:59 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 6483D267173; Fri, 6 Mar 2020 12:01:59 +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 48YmSQ52Qpz44hy; Fri, 6 Mar 2020 12:01:58 +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 A7A531FBBC; Fri, 6 Mar 2020 12:01:58 +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 026C1wdM025716; Fri, 6 Mar 2020 12:01:58 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 026C1woW025715; Fri, 6 Mar 2020 12:01:58 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <202003061201.026C1woW025715@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Fri, 6 Mar 2020 12:01: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: r358696 - stable/12/sys/dev/usb/input X-SVN-Group: stable-12 X-SVN-Commit-Author: hselasky X-SVN-Commit-Paths: stable/12/sys/dev/usb/input X-SVN-Commit-Revision: 358696 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages 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, 06 Mar 2020 12:01:59 -0000 Author: hselasky Date: Fri Mar 6 12:01:58 2020 New Revision: 358696 URL: https://svnweb.freebsd.org/changeset/base/358696 Log: MFC r358609: Restart the USB keyboard repeat timer at every valid key-press. This fixes a regression issue after r357861. Reported by: James Wright PR: 224592 PR: 233884 Sponsored by: Mellanox Technologies Modified: stable/12/sys/dev/usb/input/ukbd.c Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/dev/usb/input/ukbd.c ============================================================================== --- stable/12/sys/dev/usb/input/ukbd.c Fri Mar 6 11:26:16 2020 (r358695) +++ stable/12/sys/dev/usb/input/ukbd.c Fri Mar 6 12:01:58 2020 (r358696) @@ -521,15 +521,9 @@ ukbd_interrupt(struct ukbd_softc *sc) if (ukbd_is_modifier_key(key)) continue; - /* - * Check for first new key and set - * initial delay and [re]start timer: - */ - if (sc->sc_repeat_key == 0) { - sc->sc_co_basetime = sbinuptime(); - sc->sc_delay = sc->sc_kbd.kb_delay1; - ukbd_start_timer(sc); - } + sc->sc_co_basetime = sbinuptime(); + sc->sc_delay = sc->sc_kbd.kb_delay1; + ukbd_start_timer(sc); /* set repeat time for last key */ sc->sc_repeat_time = now + sc->sc_kbd.kb_delay1; From owner-svn-src-all@freebsd.org Fri Mar 6 12:02:43 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 508B32672B4; Fri, 6 Mar 2020 12:02: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 48YmTH1W5Cz457j; Fri, 6 Mar 2020 12:02: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 2EEE31FCF8; Fri, 6 Mar 2020 12:02: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 026C2hIO025838; Fri, 6 Mar 2020 12:02:43 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 026C2hFJ025837; Fri, 6 Mar 2020 12:02:43 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <202003061202.026C2hFJ025837@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Fri, 6 Mar 2020 12:02:43 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r358697 - stable/11/sys/dev/usb/input X-SVN-Group: stable-11 X-SVN-Commit-Author: hselasky X-SVN-Commit-Paths: stable/11/sys/dev/usb/input X-SVN-Commit-Revision: 358697 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages 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, 06 Mar 2020 12:02:43 -0000 Author: hselasky Date: Fri Mar 6 12:02:42 2020 New Revision: 358697 URL: https://svnweb.freebsd.org/changeset/base/358697 Log: MFC r358609: Restart the USB keyboard repeat timer at every valid key-press. This fixes a regression issue after r357861. Reported by: James Wright PR: 224592 PR: 233884 Sponsored by: Mellanox Technologies Modified: stable/11/sys/dev/usb/input/ukbd.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/dev/usb/input/ukbd.c ============================================================================== --- stable/11/sys/dev/usb/input/ukbd.c Fri Mar 6 12:01:58 2020 (r358696) +++ stable/11/sys/dev/usb/input/ukbd.c Fri Mar 6 12:02:42 2020 (r358697) @@ -543,15 +543,9 @@ ukbd_interrupt(struct ukbd_softc *sc) if (ukbd_is_modifier_key(key)) continue; - /* - * Check for first new key and set - * initial delay and [re]start timer: - */ - if (sc->sc_repeat_key == 0) { - sc->sc_co_basetime = sbinuptime(); - sc->sc_delay = sc->sc_kbd.kb_delay1; - ukbd_start_timer(sc); - } + sc->sc_co_basetime = sbinuptime(); + sc->sc_delay = sc->sc_kbd.kb_delay1; + ukbd_start_timer(sc); /* set repeat time for last key */ sc->sc_repeat_time = now + sc->sc_kbd.kb_delay1; From owner-svn-src-all@freebsd.org Fri Mar 6 12:37:05 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 8CE1C267D52; Fri, 6 Mar 2020 12:37:05 +0000 (UTC) (envelope-from luporl@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 48YnDx2NFjz4BJk; Fri, 6 Mar 2020 12:37:05 +0000 (UTC) (envelope-from luporl@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 3B57D202CA; Fri, 6 Mar 2020 12:37:05 +0000 (UTC) (envelope-from luporl@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 026Cb5os043978; Fri, 6 Mar 2020 12:37:05 GMT (envelope-from luporl@FreeBSD.org) Received: (from luporl@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 026Cb4rj043977; Fri, 6 Mar 2020 12:37:04 GMT (envelope-from luporl@FreeBSD.org) Message-Id: <202003061237.026Cb4rj043977@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: luporl set sender to luporl@FreeBSD.org using -f From: Leandro Lupori Date: Fri, 6 Mar 2020 12:37:04 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r358698 - head/sys/dev/ixl X-SVN-Group: head X-SVN-Commit-Author: luporl X-SVN-Commit-Paths: head/sys/dev/ixl X-SVN-Commit-Revision: 358698 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages 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, 06 Mar 2020 12:37:05 -0000 Author: luporl Date: Fri Mar 6 12:37:04 2020 New Revision: 358698 URL: https://svnweb.freebsd.org/changeset/base/358698 Log: ixl: Add missing conversions from/to LE16 This fixes some errors on PPC64, during attach and when trying to assign an IP to an interface. With this change, basic operation of X710 NICs is now possible. This also fixes builds with IXL_DEBUG enabled Reviewed by: erj Sponsored by: Eldorado Research Institute (eldorado.org.br) Differential Revision: https://reviews.freebsd.org/D23975 Modified: head/sys/dev/ixl/if_ixl.c head/sys/dev/ixl/ixl_pf_main.c Modified: head/sys/dev/ixl/if_ixl.c ============================================================================== --- head/sys/dev/ixl/if_ixl.c Fri Mar 6 12:02:42 2020 (r358697) +++ head/sys/dev/ixl/if_ixl.c Fri Mar 6 12:37:04 2020 (r358698) @@ -398,11 +398,11 @@ ixl_if_attach_pre(if_ctx_t ctx) enum i40e_status_code status; int error = 0; - INIT_DBG_DEV(dev, "begin"); - dev = iflib_get_dev(ctx); pf = iflib_get_softc(ctx); + INIT_DBG_DEV(dev, "begin"); + vsi = &pf->vsi; vsi->back = pf; pf->dev = dev; @@ -588,10 +588,11 @@ ixl_if_attach_post(if_ctx_t ctx) int error = 0; enum i40e_status_code status; - INIT_DBG_DEV(dev, "begin"); - dev = iflib_get_dev(ctx); pf = iflib_get_softc(ctx); + + INIT_DBG_DEV(dev, "begin"); + vsi = &pf->vsi; vsi->ifp = iflib_get_ifp(ctx); hw = &pf->hw; Modified: head/sys/dev/ixl/ixl_pf_main.c ============================================================================== --- head/sys/dev/ixl/ixl_pf_main.c Fri Mar 6 12:02:42 2020 (r358697) +++ head/sys/dev/ixl/ixl_pf_main.c Fri Mar 6 12:37:04 2020 (r358698) @@ -1123,20 +1123,22 @@ ixl_switch_config(struct ixl_pf *pf) if (pf->dbg_mask & IXL_DBG_SWITCH_INFO) { device_printf(dev, "Switch config: header reported: %d in structure, %d total\n", - sw_config->header.num_reported, sw_config->header.num_total); - for (int i = 0; i < sw_config->header.num_reported; i++) { + LE16_TO_CPU(sw_config->header.num_reported), + LE16_TO_CPU(sw_config->header.num_total)); + for (int i = 0; + i < LE16_TO_CPU(sw_config->header.num_reported); i++) { device_printf(dev, "-> %d: type=%d seid=%d uplink=%d downlink=%d\n", i, sw_config->element[i].element_type, - sw_config->element[i].seid, - sw_config->element[i].uplink_seid, - sw_config->element[i].downlink_seid); + LE16_TO_CPU(sw_config->element[i].seid), + LE16_TO_CPU(sw_config->element[i].uplink_seid), + LE16_TO_CPU(sw_config->element[i].downlink_seid)); } } /* Simplified due to a single VSI */ - vsi->uplink_seid = sw_config->element[0].uplink_seid; - vsi->downlink_seid = sw_config->element[0].downlink_seid; - vsi->seid = sw_config->element[0].seid; + vsi->uplink_seid = LE16_TO_CPU(sw_config->element[0].uplink_seid); + vsi->downlink_seid = LE16_TO_CPU(sw_config->element[0].downlink_seid); + vsi->seid = LE16_TO_CPU(sw_config->element[0].seid); return (ret); } @@ -2058,12 +2060,14 @@ ixl_add_hw_filters(struct ixl_vsi *vsi, int flags, int bcopy(f->macaddr, b->mac_addr, ETHER_ADDR_LEN); if (f->vlan == IXL_VLAN_ANY) { b->vlan_tag = 0; - b->flags = I40E_AQC_MACVLAN_ADD_IGNORE_VLAN; + b->flags = CPU_TO_LE16( + I40E_AQC_MACVLAN_ADD_IGNORE_VLAN); } else { - b->vlan_tag = f->vlan; + b->vlan_tag = CPU_TO_LE16(f->vlan); b->flags = 0; } - b->flags |= I40E_AQC_MACVLAN_ADD_PERFECT_MATCH; + b->flags |= CPU_TO_LE16( + I40E_AQC_MACVLAN_ADD_PERFECT_MATCH); f->flags &= ~IXL_FILTER_ADD; j++; From owner-svn-src-all@freebsd.org Fri Mar 6 13:57:01 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id DF1B9269209; Fri, 6 Mar 2020 13:57: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 48Yq190f87z4B4D; Fri, 6 Mar 2020 13:57: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 A35A32117C; Fri, 6 Mar 2020 13:57: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 026Dv0BW091770; Fri, 6 Mar 2020 13:57:00 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 026Dv03v091769; Fri, 6 Mar 2020 13:57:00 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <202003061357.026Dv03v091769@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Fri, 6 Mar 2020 13:57: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: r358699 - in stable/12/sys/compat/linuxkpi/common: include/linux src X-SVN-Group: stable-12 X-SVN-Commit-Author: hselasky X-SVN-Commit-Paths: in stable/12/sys/compat/linuxkpi/common: include/linux src X-SVN-Commit-Revision: 358699 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages 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, 06 Mar 2020 13:57:02 -0000 Author: hselasky Date: Fri Mar 6 13:57:00 2020 New Revision: 358699 URL: https://svnweb.freebsd.org/changeset/base/358699 Log: MFC r358387: Extend the range of the return value from nsecs_to_jiffies64() to support Mesa's drm_syncobj usage, in the LinuxKPI. While at it optimise the jiffies conversion functions to avoid repeated and constant calculations. Submitted by: Greg V Differential Revision: https://reviews.freebsd.org/D23846 Sponsored by: Mellanox Technologies Modified: stable/12/sys/compat/linuxkpi/common/include/linux/jiffies.h stable/12/sys/compat/linuxkpi/common/src/linux_compat.c Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/compat/linuxkpi/common/include/linux/jiffies.h ============================================================================== --- stable/12/sys/compat/linuxkpi/common/include/linux/jiffies.h Fri Mar 6 12:37:04 2020 (r358698) +++ stable/12/sys/compat/linuxkpi/common/include/linux/jiffies.h Fri Mar 6 13:57:00 2020 (r358699) @@ -54,6 +54,18 @@ #define HZ hz +extern uint64_t lkpi_nsec2hz_rem; +extern uint64_t lkpi_nsec2hz_div; +extern uint64_t lkpi_nsec2hz_max; + +extern uint64_t lkpi_usec2hz_rem; +extern uint64_t lkpi_usec2hz_div; +extern uint64_t lkpi_usec2hz_max; + +extern uint64_t lkpi_msec2hz_rem; +extern uint64_t lkpi_msec2hz_div; +extern uint64_t lkpi_msec2hz_max; + static inline int timespec_to_jiffies(const struct timespec *ts) { @@ -70,12 +82,11 @@ timespec_to_jiffies(const struct timespec *ts) static inline int msecs_to_jiffies(uint64_t msec) { - uint64_t msec_max, result; + uint64_t result; - msec_max = -1ULL / (uint64_t)hz; - if (msec > msec_max) - msec = msec_max; - result = howmany(msec * (uint64_t)hz, 1000ULL); + if (msec > lkpi_msec2hz_max) + msec = lkpi_msec2hz_max; + result = howmany(msec * lkpi_msec2hz_rem, lkpi_msec2hz_div); if (result > MAX_JIFFY_OFFSET) result = MAX_JIFFY_OFFSET; @@ -85,12 +96,11 @@ msecs_to_jiffies(uint64_t msec) static inline int usecs_to_jiffies(uint64_t usec) { - uint64_t usec_max, result; + uint64_t result; - usec_max = -1ULL / (uint64_t)hz; - if (usec > usec_max) - usec = usec_max; - result = howmany(usec * (uint64_t)hz, 1000000ULL); + if (usec > lkpi_usec2hz_max) + usec = lkpi_usec2hz_max; + result = howmany(usec * lkpi_usec2hz_rem, lkpi_usec2hz_div); if (result > MAX_JIFFY_OFFSET) result = MAX_JIFFY_OFFSET; @@ -100,23 +110,24 @@ usecs_to_jiffies(uint64_t usec) static inline uint64_t nsecs_to_jiffies64(uint64_t nsec) { - uint64_t nsec_max, result; - nsec_max = -1ULL / (uint64_t)hz; - if (nsec > nsec_max) - nsec = nsec_max; - result = howmany(nsec * (uint64_t)hz, 1000000000ULL); - if (result > MAX_JIFFY_OFFSET) - result = MAX_JIFFY_OFFSET; - - return (result); + if (nsec > lkpi_nsec2hz_max) + nsec = lkpi_nsec2hz_max; + return (howmany(nsec * lkpi_nsec2hz_rem, lkpi_nsec2hz_div)); } -static inline uint64_t -nsecs_to_jiffies(uint64_t n) +static inline unsigned long +nsecs_to_jiffies(uint64_t nsec) { - return (usecs_to_jiffies(howmany(n, 1000ULL))); + if (sizeof(unsigned long) >= sizeof(uint64_t)) { + if (nsec > lkpi_nsec2hz_max) + nsec = lkpi_nsec2hz_max; + } else { + if (nsec > (lkpi_nsec2hz_max >> 32)) + nsec = (lkpi_nsec2hz_max >> 32); + } + return (howmany(nsec * lkpi_nsec2hz_rem, lkpi_nsec2hz_div)); } static inline uint64_t Modified: stable/12/sys/compat/linuxkpi/common/src/linux_compat.c ============================================================================== --- stable/12/sys/compat/linuxkpi/common/src/linux_compat.c Fri Mar 6 12:37:04 2020 (r358698) +++ stable/12/sys/compat/linuxkpi/common/src/linux_compat.c Fri Mar 6 13:57:00 2020 (r358699) @@ -1934,9 +1934,38 @@ del_timer(struct timer_list *timer) return (1); } +/* greatest common divisor, Euclid equation */ +static uint64_t +lkpi_gcd_64(uint64_t a, uint64_t b) +{ + uint64_t an; + uint64_t bn; + + while (b != 0) { + an = b; + bn = a % b; + a = an; + b = bn; + } + return (a); +} + +uint64_t lkpi_nsec2hz_rem; +uint64_t lkpi_nsec2hz_div = 1000000000ULL; +uint64_t lkpi_nsec2hz_max; + +uint64_t lkpi_usec2hz_rem; +uint64_t lkpi_usec2hz_div = 1000000ULL; +uint64_t lkpi_usec2hz_max; + +uint64_t lkpi_msec2hz_rem; +uint64_t lkpi_msec2hz_div = 1000ULL; +uint64_t lkpi_msec2hz_max; + static void linux_timer_init(void *arg) { + uint64_t gcd; /* * Compute an internal HZ value which can divide 2**32 to @@ -1947,6 +1976,27 @@ linux_timer_init(void *arg) while (linux_timer_hz_mask < (unsigned long)hz) linux_timer_hz_mask *= 2; linux_timer_hz_mask--; + + /* compute some internal constants */ + + lkpi_nsec2hz_rem = hz; + lkpi_usec2hz_rem = hz; + lkpi_msec2hz_rem = hz; + + gcd = lkpi_gcd_64(lkpi_nsec2hz_rem, lkpi_nsec2hz_div); + lkpi_nsec2hz_rem /= gcd; + lkpi_nsec2hz_div /= gcd; + lkpi_nsec2hz_max = -1ULL / lkpi_nsec2hz_rem; + + gcd = lkpi_gcd_64(lkpi_usec2hz_rem, lkpi_usec2hz_div); + lkpi_usec2hz_rem /= gcd; + lkpi_usec2hz_div /= gcd; + lkpi_usec2hz_max = -1ULL / lkpi_usec2hz_rem; + + gcd = lkpi_gcd_64(lkpi_msec2hz_rem, lkpi_msec2hz_div); + lkpi_msec2hz_rem /= gcd; + lkpi_msec2hz_div /= gcd; + lkpi_msec2hz_max = -1ULL / lkpi_msec2hz_rem; } SYSINIT(linux_timer, SI_SUB_DRIVERS, SI_ORDER_FIRST, linux_timer_init, NULL); From owner-svn-src-all@freebsd.org Fri Mar 6 13:58:10 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 1D6AE26927C; Fri, 6 Mar 2020 13:58:10 +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 48Yq2T3H4Mz4Dby; Fri, 6 Mar 2020 13:58:08 +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 D72692117D; Fri, 6 Mar 2020 13:58:08 +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 026Dw8OE091885; Fri, 6 Mar 2020 13:58:08 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 026Dw8PG091883; Fri, 6 Mar 2020 13:58:08 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <202003061358.026Dw8PG091883@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Fri, 6 Mar 2020 13:58: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: r358700 - in stable/11/sys/compat/linuxkpi/common: include/linux src X-SVN-Group: stable-11 X-SVN-Commit-Author: hselasky X-SVN-Commit-Paths: in stable/11/sys/compat/linuxkpi/common: include/linux src X-SVN-Commit-Revision: 358700 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages 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, 06 Mar 2020 13:58:10 -0000 Author: hselasky Date: Fri Mar 6 13:58:08 2020 New Revision: 358700 URL: https://svnweb.freebsd.org/changeset/base/358700 Log: MFC r358387: Extend the range of the return value from nsecs_to_jiffies64() to support Mesa's drm_syncobj usage, in the LinuxKPI. While at it optimise the jiffies conversion functions to avoid repeated and constant calculations. Submitted by: Greg V Differential Revision: https://reviews.freebsd.org/D23846 Sponsored by: Mellanox Technologies Modified: stable/11/sys/compat/linuxkpi/common/include/linux/jiffies.h stable/11/sys/compat/linuxkpi/common/src/linux_compat.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/compat/linuxkpi/common/include/linux/jiffies.h ============================================================================== --- stable/11/sys/compat/linuxkpi/common/include/linux/jiffies.h Fri Mar 6 13:57:00 2020 (r358699) +++ stable/11/sys/compat/linuxkpi/common/include/linux/jiffies.h Fri Mar 6 13:58:08 2020 (r358700) @@ -54,6 +54,18 @@ #define HZ hz +extern uint64_t lkpi_nsec2hz_rem; +extern uint64_t lkpi_nsec2hz_div; +extern uint64_t lkpi_nsec2hz_max; + +extern uint64_t lkpi_usec2hz_rem; +extern uint64_t lkpi_usec2hz_div; +extern uint64_t lkpi_usec2hz_max; + +extern uint64_t lkpi_msec2hz_rem; +extern uint64_t lkpi_msec2hz_div; +extern uint64_t lkpi_msec2hz_max; + static inline int timespec_to_jiffies(const struct timespec *ts) { @@ -70,12 +82,11 @@ timespec_to_jiffies(const struct timespec *ts) static inline int msecs_to_jiffies(uint64_t msec) { - uint64_t msec_max, result; + uint64_t result; - msec_max = -1ULL / (uint64_t)hz; - if (msec > msec_max) - msec = msec_max; - result = howmany(msec * (uint64_t)hz, 1000ULL); + if (msec > lkpi_msec2hz_max) + msec = lkpi_msec2hz_max; + result = howmany(msec * lkpi_msec2hz_rem, lkpi_msec2hz_div); if (result > MAX_JIFFY_OFFSET) result = MAX_JIFFY_OFFSET; @@ -85,12 +96,11 @@ msecs_to_jiffies(uint64_t msec) static inline int usecs_to_jiffies(uint64_t usec) { - uint64_t usec_max, result; + uint64_t result; - usec_max = -1ULL / (uint64_t)hz; - if (usec > usec_max) - usec = usec_max; - result = howmany(usec * (uint64_t)hz, 1000000ULL); + if (usec > lkpi_usec2hz_max) + usec = lkpi_usec2hz_max; + result = howmany(usec * lkpi_usec2hz_rem, lkpi_usec2hz_div); if (result > MAX_JIFFY_OFFSET) result = MAX_JIFFY_OFFSET; @@ -100,23 +110,24 @@ usecs_to_jiffies(uint64_t usec) static inline uint64_t nsecs_to_jiffies64(uint64_t nsec) { - uint64_t nsec_max, result; - nsec_max = -1ULL / (uint64_t)hz; - if (nsec > nsec_max) - nsec = nsec_max; - result = howmany(nsec * (uint64_t)hz, 1000000000ULL); - if (result > MAX_JIFFY_OFFSET) - result = MAX_JIFFY_OFFSET; - - return (result); + if (nsec > lkpi_nsec2hz_max) + nsec = lkpi_nsec2hz_max; + return (howmany(nsec * lkpi_nsec2hz_rem, lkpi_nsec2hz_div)); } -static inline uint64_t -nsecs_to_jiffies(uint64_t n) +static inline unsigned long +nsecs_to_jiffies(uint64_t nsec) { - return (usecs_to_jiffies(howmany(n, 1000ULL))); + if (sizeof(unsigned long) >= sizeof(uint64_t)) { + if (nsec > lkpi_nsec2hz_max) + nsec = lkpi_nsec2hz_max; + } else { + if (nsec > (lkpi_nsec2hz_max >> 32)) + nsec = (lkpi_nsec2hz_max >> 32); + } + return (howmany(nsec * lkpi_nsec2hz_rem, lkpi_nsec2hz_div)); } static inline uint64_t Modified: stable/11/sys/compat/linuxkpi/common/src/linux_compat.c ============================================================================== --- stable/11/sys/compat/linuxkpi/common/src/linux_compat.c Fri Mar 6 13:57:00 2020 (r358699) +++ stable/11/sys/compat/linuxkpi/common/src/linux_compat.c Fri Mar 6 13:58:08 2020 (r358700) @@ -1925,9 +1925,38 @@ add_timer_on(struct timer_list *timer, int cpu) &linux_timer_callback_wrapper, timer, cpu); } +/* greatest common divisor, Euclid equation */ +static uint64_t +lkpi_gcd_64(uint64_t a, uint64_t b) +{ + uint64_t an; + uint64_t bn; + + while (b != 0) { + an = b; + bn = a % b; + a = an; + b = bn; + } + return (a); +} + +uint64_t lkpi_nsec2hz_rem; +uint64_t lkpi_nsec2hz_div = 1000000000ULL; +uint64_t lkpi_nsec2hz_max; + +uint64_t lkpi_usec2hz_rem; +uint64_t lkpi_usec2hz_div = 1000000ULL; +uint64_t lkpi_usec2hz_max; + +uint64_t lkpi_msec2hz_rem; +uint64_t lkpi_msec2hz_div = 1000ULL; +uint64_t lkpi_msec2hz_max; + static void linux_timer_init(void *arg) { + uint64_t gcd; /* * Compute an internal HZ value which can divide 2**32 to @@ -1938,6 +1967,27 @@ linux_timer_init(void *arg) while (linux_timer_hz_mask < (unsigned long)hz) linux_timer_hz_mask *= 2; linux_timer_hz_mask--; + + /* compute some internal constants */ + + lkpi_nsec2hz_rem = hz; + lkpi_usec2hz_rem = hz; + lkpi_msec2hz_rem = hz; + + gcd = lkpi_gcd_64(lkpi_nsec2hz_rem, lkpi_nsec2hz_div); + lkpi_nsec2hz_rem /= gcd; + lkpi_nsec2hz_div /= gcd; + lkpi_nsec2hz_max = -1ULL / lkpi_nsec2hz_rem; + + gcd = lkpi_gcd_64(lkpi_usec2hz_rem, lkpi_usec2hz_div); + lkpi_usec2hz_rem /= gcd; + lkpi_usec2hz_div /= gcd; + lkpi_usec2hz_max = -1ULL / lkpi_usec2hz_rem; + + gcd = lkpi_gcd_64(lkpi_msec2hz_rem, lkpi_msec2hz_div); + lkpi_msec2hz_rem /= gcd; + lkpi_msec2hz_div /= gcd; + lkpi_msec2hz_max = -1ULL / lkpi_msec2hz_rem; } SYSINIT(linux_timer, SI_SUB_DRIVERS, SI_ORDER_FIRST, linux_timer_init, NULL); From owner-svn-src-all@freebsd.org Fri Mar 6 14:24:11 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 624F32699E4; Fri, 6 Mar 2020 14:24:11 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 48YqcW1RFzz49GZ; Fri, 6 Mar 2020 14:24:11 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id DFC57216DB; Fri, 6 Mar 2020 14:24:10 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 026EOAEW010169; Fri, 6 Mar 2020 14:24:10 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 026EOAYF010168; Fri, 6 Mar 2020 14:24:10 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <202003061424.026EOAYF010168@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Fri, 6 Mar 2020 14:24: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: r358701 - stable/12/sys/modules/rockchip/rk_dwmmc X-SVN-Group: stable-12 X-SVN-Commit-Author: gjb X-SVN-Commit-Paths: stable/12/sys/modules/rockchip/rk_dwmmc X-SVN-Commit-Revision: 358701 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages 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, 06 Mar 2020 14:24:11 -0000 Author: gjb Date: Fri Mar 6 14:24:10 2020 New Revision: 358701 URL: https://svnweb.freebsd.org/changeset/base/358701 Log: MFC r355626 (manu): arm64: rockchip: Add a module for rk_dwmmc This is mostly needed for dev/debug as most users will have their root on the sdcard or emmc. * This should fix the stable/12 aarch64 build after r358648. Sponsored by: Rubicon Communications, LLC (netgate.com) Added: stable/12/sys/modules/rockchip/rk_dwmmc/ - copied from r355626, head/sys/modules/rockchip/rk_dwmmc/ Modified: Directory Properties: stable/12/ (props changed) From owner-svn-src-all@freebsd.org Fri Mar 6 14:43:14 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 493F8269F9C; Fri, 6 Mar 2020 14:43:14 +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 48Yr2V00SBz3wpd; Fri, 6 Mar 2020 14:43: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 E868121AB3; Fri, 6 Mar 2020 14:43:13 +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 026EhDiQ022379; Fri, 6 Mar 2020 14:43:13 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 026EhDXr022378; Fri, 6 Mar 2020 14:43:13 GMT (envelope-from kib@FreeBSD.org) Message-Id: <202003061443.026EhDXr022378@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Fri, 6 Mar 2020 14:43:13 +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: r358702 - stable/12/sys/kern X-SVN-Group: stable-12 X-SVN-Commit-Author: kib X-SVN-Commit-Paths: stable/12/sys/kern X-SVN-Commit-Revision: 358702 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages 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, 06 Mar 2020 14:43:14 -0000 Author: kib Date: Fri Mar 6 14:43:13 2020 New Revision: 358702 URL: https://svnweb.freebsd.org/changeset/base/358702 Log: MFC r357948: Consolidate read code for timecounters and fix possible overflow in bintime()/binuptime(). Modified: stable/12/sys/kern/kern_tc.c Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/kern/kern_tc.c ============================================================================== --- stable/12/sys/kern/kern_tc.c Fri Mar 6 14:24:10 2020 (r358701) +++ stable/12/sys/kern/kern_tc.c Fri Mar 6 14:43:13 2020 (r358702) @@ -72,6 +72,7 @@ struct timehands { struct timecounter *th_counter; int64_t th_adjustment; uint64_t th_scale; + u_int th_large_delta; u_int th_offset_count; struct bintime th_offset; struct bintime th_bintime; @@ -87,6 +88,7 @@ static struct timehands ths[16] = { [0] = { .th_counter = &dummy_timecounter, .th_scale = (uint64_t)-1 / 1000000, + .th_large_delta = 1000000, .th_offset = { .sec = 1 }, .th_generation = 1, }, @@ -201,23 +203,75 @@ tc_delta(struct timehands *th) * the comment in for a description of these 12 functions. */ -#ifdef FFCLOCK -void -fbclock_binuptime(struct bintime *bt) +static __inline void +bintime_off(struct bintime *bt, u_int off) { struct timehands *th; - unsigned int gen; + struct bintime *btp; + uint64_t scale, x; + u_int delta, gen, large_delta; do { th = timehands; gen = atomic_load_acq_int(&th->th_generation); - *bt = th->th_offset; - bintime_addx(bt, th->th_scale * tc_delta(th)); + btp = (struct bintime *)((vm_offset_t)th + off); + *bt = *btp; + scale = th->th_scale; + delta = tc_delta(th); + large_delta = th->th_large_delta; atomic_thread_fence_acq(); } while (gen == 0 || gen != th->th_generation); + + if (__predict_false(delta >= large_delta)) { + /* Avoid overflow for scale * delta. */ + x = (scale >> 32) * delta; + bt->sec += x >> 32; + bintime_addx(bt, x << 32); + bintime_addx(bt, (scale & 0xffffffff) * delta); + } else { + bintime_addx(bt, scale * delta); + } } +#define GETTHBINTIME(dst, member) \ +do { \ + _Static_assert(_Generic(((struct timehands *)NULL)->member, \ + struct bintime: 1, default: 0) == 1, \ + "struct timehands member is not of struct bintime type"); \ + bintime_off(dst, __offsetof(struct timehands, member)); \ +} while (0) +static __inline void +getthmember(void *out, size_t out_size, u_int off) +{ + struct timehands *th; + u_int gen; + + do { + th = timehands; + gen = atomic_load_acq_int(&th->th_generation); + memcpy(out, (char *)th + off, out_size); + atomic_thread_fence_acq(); + } while (gen == 0 || gen != th->th_generation); +} +#define GETTHMEMBER(dst, member) \ +do { \ + _Static_assert(_Generic(*dst, \ + __typeof(((struct timehands *)NULL)->member): 1, \ + default: 0) == 1, \ + "*dst and struct timehands member have different types"); \ + getthmember(dst, sizeof(*dst), __offsetof(struct timehands, \ + member)); \ +} while (0) + +#ifdef FFCLOCK void +fbclock_binuptime(struct bintime *bt) +{ + + GETTHBINTIME(bt, th_offset); +} + +void fbclock_nanouptime(struct timespec *tsp) { struct bintime bt; @@ -238,16 +292,8 @@ fbclock_microuptime(struct timeval *tvp) void fbclock_bintime(struct bintime *bt) { - struct timehands *th; - unsigned int gen; - do { - th = timehands; - gen = atomic_load_acq_int(&th->th_generation); - *bt = th->th_bintime; - bintime_addx(bt, th->th_scale * tc_delta(th)); - atomic_thread_fence_acq(); - } while (gen == 0 || gen != th->th_generation); + GETTHBINTIME(bt, th_bintime); } void @@ -271,100 +317,55 @@ fbclock_microtime(struct timeval *tvp) void fbclock_getbinuptime(struct bintime *bt) { - struct timehands *th; - unsigned int gen; - do { - th = timehands; - gen = atomic_load_acq_int(&th->th_generation); - *bt = th->th_offset; - atomic_thread_fence_acq(); - } while (gen == 0 || gen != th->th_generation); + GETTHMEMBER(bt, th_offset); } void fbclock_getnanouptime(struct timespec *tsp) { - struct timehands *th; - unsigned int gen; + struct bintime bt; - do { - th = timehands; - gen = atomic_load_acq_int(&th->th_generation); - bintime2timespec(&th->th_offset, tsp); - atomic_thread_fence_acq(); - } while (gen == 0 || gen != th->th_generation); + GETTHMEMBER(&bt, th_offset); + bintime2timespec(&bt, tsp); } void fbclock_getmicrouptime(struct timeval *tvp) { - struct timehands *th; - unsigned int gen; + struct bintime bt; - do { - th = timehands; - gen = atomic_load_acq_int(&th->th_generation); - bintime2timeval(&th->th_offset, tvp); - atomic_thread_fence_acq(); - } while (gen == 0 || gen != th->th_generation); + GETTHMEMBER(&bt, th_offset); + bintime2timeval(&bt, tvp); } void fbclock_getbintime(struct bintime *bt) { - struct timehands *th; - unsigned int gen; - do { - th = timehands; - gen = atomic_load_acq_int(&th->th_generation); - *bt = th->th_bintime; - atomic_thread_fence_acq(); - } while (gen == 0 || gen != th->th_generation); + GETTHMEMBER(bt, th_bintime); } void fbclock_getnanotime(struct timespec *tsp) { - struct timehands *th; - unsigned int gen; - do { - th = timehands; - gen = atomic_load_acq_int(&th->th_generation); - *tsp = th->th_nanotime; - atomic_thread_fence_acq(); - } while (gen == 0 || gen != th->th_generation); + GETTHMEMBER(tsp, th_nanotime); } void fbclock_getmicrotime(struct timeval *tvp) { - struct timehands *th; - unsigned int gen; - do { - th = timehands; - gen = atomic_load_acq_int(&th->th_generation); - *tvp = th->th_microtime; - atomic_thread_fence_acq(); - } while (gen == 0 || gen != th->th_generation); + GETTHMEMBER(tvp, th_microtime); } #else /* !FFCLOCK */ + void binuptime(struct bintime *bt) { - struct timehands *th; - u_int gen; - do { - th = timehands; - gen = atomic_load_acq_int(&th->th_generation); - *bt = th->th_offset; - bintime_addx(bt, th->th_scale * tc_delta(th)); - atomic_thread_fence_acq(); - } while (gen == 0 || gen != th->th_generation); + GETTHBINTIME(bt, th_offset); } void @@ -388,16 +389,8 @@ microuptime(struct timeval *tvp) void bintime(struct bintime *bt) { - struct timehands *th; - u_int gen; - do { - th = timehands; - gen = atomic_load_acq_int(&th->th_generation); - *bt = th->th_bintime; - bintime_addx(bt, th->th_scale * tc_delta(th)); - atomic_thread_fence_acq(); - } while (gen == 0 || gen != th->th_generation); + GETTHBINTIME(bt, th_bintime); } void @@ -421,85 +414,47 @@ microtime(struct timeval *tvp) void getbinuptime(struct bintime *bt) { - struct timehands *th; - u_int gen; - do { - th = timehands; - gen = atomic_load_acq_int(&th->th_generation); - *bt = th->th_offset; - atomic_thread_fence_acq(); - } while (gen == 0 || gen != th->th_generation); + GETTHMEMBER(bt, th_offset); } void getnanouptime(struct timespec *tsp) { - struct timehands *th; - u_int gen; + struct bintime bt; - do { - th = timehands; - gen = atomic_load_acq_int(&th->th_generation); - bintime2timespec(&th->th_offset, tsp); - atomic_thread_fence_acq(); - } while (gen == 0 || gen != th->th_generation); + GETTHMEMBER(&bt, th_offset); + bintime2timespec(&bt, tsp); } void getmicrouptime(struct timeval *tvp) { - struct timehands *th; - u_int gen; + struct bintime bt; - do { - th = timehands; - gen = atomic_load_acq_int(&th->th_generation); - bintime2timeval(&th->th_offset, tvp); - atomic_thread_fence_acq(); - } while (gen == 0 || gen != th->th_generation); + GETTHMEMBER(&bt, th_offset); + bintime2timeval(&bt, tvp); } void getbintime(struct bintime *bt) { - struct timehands *th; - u_int gen; - do { - th = timehands; - gen = atomic_load_acq_int(&th->th_generation); - *bt = th->th_bintime; - atomic_thread_fence_acq(); - } while (gen == 0 || gen != th->th_generation); + GETTHMEMBER(bt, th_bintime); } void getnanotime(struct timespec *tsp) { - struct timehands *th; - u_int gen; - do { - th = timehands; - gen = atomic_load_acq_int(&th->th_generation); - *tsp = th->th_nanotime; - atomic_thread_fence_acq(); - } while (gen == 0 || gen != th->th_generation); + GETTHMEMBER(tsp, th_nanotime); } void getmicrotime(struct timeval *tvp) { - struct timehands *th; - u_int gen; - do { - th = timehands; - gen = atomic_load_acq_int(&th->th_generation); - *tvp = th->th_microtime; - atomic_thread_fence_acq(); - } while (gen == 0 || gen != th->th_generation); + GETTHMEMBER(tvp, th_microtime); } #endif /* FFCLOCK */ @@ -515,15 +470,8 @@ getboottime(struct timeval *boottime) void getboottimebin(struct bintime *boottimebin) { - struct timehands *th; - u_int gen; - do { - th = timehands; - gen = atomic_load_acq_int(&th->th_generation); - *boottimebin = th->th_boottime; - atomic_thread_fence_acq(); - } while (gen == 0 || gen != th->th_generation); + GETTHMEMBER(boottimebin, th_boottime); } #ifdef FFCLOCK @@ -1039,15 +987,8 @@ getmicrotime(struct timeval *tvp) void dtrace_getnanotime(struct timespec *tsp) { - struct timehands *th; - u_int gen; - do { - th = timehands; - gen = atomic_load_acq_int(&th->th_generation); - *tsp = th->th_nanotime; - atomic_thread_fence_acq(); - } while (gen == 0 || gen != th->th_generation); + GETTHMEMBER(tsp, th_nanotime); } /* @@ -1465,6 +1406,7 @@ tc_windup(struct bintime *new_boottimebin) scale += (th->th_adjustment / 1024) * 2199; scale /= th->th_counter->tc_frequency; th->th_scale = scale * 2; + th->th_large_delta = MIN(((uint64_t)1 << 63) / scale, UINT_MAX); /* * Now that the struct timehands is again consistent, set the new From owner-svn-src-all@freebsd.org Fri Mar 6 14:46:52 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 2DA5326A055; Fri, 6 Mar 2020 14:46:52 +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 48Yr6g3VMcz461x; Fri, 6 Mar 2020 14:46:51 +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 2E75221AB7; Fri, 6 Mar 2020 14:46:51 +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 026EkoJ2022625; Fri, 6 Mar 2020 14:46:50 GMT (envelope-from andrew@FreeBSD.org) Received: (from andrew@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 026EkoVH022624; Fri, 6 Mar 2020 14:46:50 GMT (envelope-from andrew@FreeBSD.org) Message-Id: <202003061446.026EkoVH022624@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: andrew set sender to andrew@FreeBSD.org using -f From: Andrew Turner Date: Fri, 6 Mar 2020 14:46:50 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r358703 - head/sys/arm64/include X-SVN-Group: head X-SVN-Commit-Author: andrew X-SVN-Commit-Paths: head/sys/arm64/include X-SVN-Commit-Revision: 358703 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages 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, 06 Mar 2020 14:46:52 -0000 Author: andrew Date: Fri Mar 6 14:46:50 2020 New Revision: 358703 URL: https://svnweb.freebsd.org/changeset/base/358703 Log: Update the hypervisor registers - Add more registers needed by bhyve [1] - Move EL2 registers from armreg.h to hypervisor.h - Add the register name to hypervisor.h Obtained from: https://github.com/FreeBSD-UPB/freebsd [1] Modified: head/sys/arm64/include/armreg.h head/sys/arm64/include/hypervisor.h Modified: head/sys/arm64/include/armreg.h ============================================================================== --- head/sys/arm64/include/armreg.h Fri Mar 6 14:43:13 2020 (r358702) +++ head/sys/arm64/include/armreg.h Fri Mar 6 14:46:50 2020 (r358703) @@ -66,13 +66,6 @@ #define UL(x) UINT64_C(x) -/* CNTHCTL_EL2 - Counter-timer Hypervisor Control register */ -#define CNTHCTL_EVNTI_MASK (0xf << 4) /* Bit to trigger event stream */ -#define CNTHCTL_EVNTDIR (1 << 3) /* Control transition trigger bit */ -#define CNTHCTL_EVNTEN (1 << 2) /* Enable event stream */ -#define CNTHCTL_EL1PCEN (1 << 1) /* Allow EL0/1 physical timer access */ -#define CNTHCTL_EL1PCTEN (1 << 0) /*Allow EL0/1 physical counter access*/ - /* CPACR_EL1 */ #define CPACR_FPEN_MASK (0x3 << 20) #define CPACR_FPEN_TRAP_ALL1 (0x0 << 20) /* Traps from EL0 and EL1 */ @@ -219,10 +212,6 @@ /* ICC_SRE_EL1 */ #define ICC_SRE_EL1_SRE (1U << 0) - -/* ICC_SRE_EL2 */ -#define ICC_SRE_EL2_SRE (1U << 0) -#define ICC_SRE_EL2_EN (1U << 3) /* ID_AA64DFR0_EL1 */ #define ID_AA64DFR0_EL1 MRS_REG(3, 0, 0, 5, 0) Modified: head/sys/arm64/include/hypervisor.h ============================================================================== --- head/sys/arm64/include/hypervisor.h Fri Mar 6 14:43:13 2020 (r358702) +++ head/sys/arm64/include/hypervisor.h Fri Mar 6 14:46:50 2020 (r358703) @@ -34,19 +34,21 @@ * e.g. specific to EL2, or controlling the hypervisor. */ -/* - * Architecture feature trap register - */ +/* CNTHCTL_EL2 - Counter-timer Hypervisor Control register */ +#define CNTHCTL_EVNTI_MASK (0xf << 4) /* Bit to trigger event stream */ +#define CNTHCTL_EVNTDIR (1 << 3) /* Control transition trigger bit */ +#define CNTHCTL_EVNTEN (1 << 2) /* Enable event stream */ +#define CNTHCTL_EL1PCEN (1 << 1) /* Allow EL0/1 physical timer access */ +#define CNTHCTL_EL1PCTEN (1 << 0) /*Allow EL0/1 physical counter access*/ + +/* CPTR_EL2 - Architecture feature trap register */ #define CPTR_RES0 0x7fefc800 #define CPTR_RES1 0x000033ff #define CPTR_TFP 0x00000400 #define CPTR_TTA 0x00100000 #define CPTR_TCPAC 0x80000000 -/* - * Hypervisor Config Register - */ - +/* HCR_EL2 - Hypervisor Config Register */ #define HCR_VM 0x0000000000000001 #define HCR_SWIO 0x0000000000000002 #define HCR_PTW 0x0000000000000004 @@ -58,6 +60,9 @@ #define HCR_VSE 0x0000000000000100 #define HCR_FB 0x0000000000000200 #define HCR_BSU_MASK 0x0000000000000c00 +#define HCR_BSU_IS 0x0000000000000400 +#define HCR_BSU_OS 0x0000000000000800 +#define HCR_BSU_FS 0x0000000000000c00 #define HCR_DC 0x0000000000001000 #define HCR_TWI 0x0000000000002000 #define HCR_TWE 0x0000000000004000 @@ -69,7 +74,7 @@ #define HCR_TIDCP 0x0000000000100000 #define HCR_TACR 0x0000000000200000 #define HCR_TSW 0x0000000000400000 -#define HCR_TPC 0x0000000000800000 +#define HCR_TPCP 0x0000000000800000 #define HCR_TPU 0x0000000001000000 #define HCR_TTLB 0x0000000002000000 #define HCR_TVM 0x0000000004000000 @@ -92,5 +97,89 @@ #define HCR_NV1 0x0000080000000000 #define HCR_AT 0x0000100000000000 -#endif +/* HPFAR_EL2 - Hypervisor IPA Fault Address Register */ +#define HPFAR_EL2_FIPA_SHIFT 4 +#define HPFAR_EL2_FIPA_MASK 0xfffffffff0 +/* ICC_SRE_EL2 */ +#define ICC_SRE_EL2_SRE (1U << 0) +#define ICC_SRE_EL2_EN (1U << 3) + +/* SCTLR_EL2 - System Control Register */ +#define SCTLR_EL2_RES1 0x30c50830 +#define SCTLR_EL2_M_SHIFT 0 +#define SCTLR_EL2_M (0x1 << SCTLR_EL2_M_SHIFT) +#define SCTLR_EL2_A_SHIFT 1 +#define SCTLR_EL2_A (0x1 << SCTLR_EL2_A_SHIFT) +#define SCTLR_EL2_C_SHIFT 2 +#define SCTLR_EL2_C (0x1 << SCTLR_EL2_C_SHIFT) +#define SCTLR_EL2_SA_SHIFT 3 +#define SCTLR_EL2_SA (0x1 << SCTLR_EL2_SA_SHIFT) +#define SCTLR_EL2_I_SHIFT 12 +#define SCTLR_EL2_I (0x1 << SCTLR_EL2_I_SHIFT) +#define SCTLR_EL2_WXN_SHIFT 19 +#define SCTLR_EL2_WXN (0x1 << SCTLR_EL2_WXN_SHIFT) +#define SCTLR_EL2_EE_SHIFT 25 +#define SCTLR_EL2_EE (0x1 << SCTLR_EL2_EE_SHIFT) + +/* TCR_EL2 - Translation Control Register */ +#define TCR_EL2_RES1 ((0x1UL << 31) | (0x1UL << 23)) +#define TCR_EL2_T0SZ_SHIFT 0 +#define TCR_EL2_T0SZ_MASK (0x3f << TCR_EL2_T0SZ_SHIFT) +#define TCR_EL2_T0SZ(x) ((x) << TCR_EL2_T0SZ_SHIFT) +/* Bits 7:6 are reserved */ +#define TCR_EL2_IRGN0_SHIFT 8 +#define TCR_EL2_IRGN0_MASK (0x3 << TCR_EL2_IRGN0_SHIFT) +#define TCR_EL2_ORGN0_SHIFT 10 +#define TCR_EL2_ORGN0_MASK (0x3 << TCR_EL2_ORGN0_SHIFT) +#define TCR_EL2_SH0_SHIFT 12 +#define TCR_EL2_SH0_MASK (0x3 << TCR_EL2_SH0_SHIFT) +#define TCR_EL2_TG0_SHIFT 14 +#define TCR_EL2_TG0_MASK (0x3 << TCR_EL2_TG0_SHIFT) +#define TCR_EL2_PS_SHIFT 16 +#define TCR_EL2_PS_32BITS (0 << TCR_EL2_PS_SHIFT) +#define TCR_EL2_PS_36BITS (1 << TCR_EL2_PS_SHIFT) +#define TCR_EL2_PS_40BITS (2 << TCR_EL2_PS_SHIFT) +#define TCR_EL2_PS_42BITS (3 << TCR_EL2_PS_SHIFT) +#define TCR_EL2_PS_44BITS (4 << TCR_EL2_PS_SHIFT) +#define TCR_EL2_PS_48BITS (5 << TCR_EL2_PS_SHIFT) +#define TCR_EL2_PS_52BITS (6 << TCR_EL2_PS_SHIFT) /* ARMv8.2-LPA */ + +/* VMPDIR_EL2 - Virtualization Multiprocessor ID Register */ +#define VMPIDR_EL2_U 0x0000000040000000 +#define VMPIDR_EL2_MT 0x0000000001000000 +#define VMPIDR_EL2_RES1 0x0000000080000000 + +/* VTCR_EL2 - Virtualization Translation Control Register */ +#define VTCR_EL2_RES1 (0x1 << 31) +#define VTCR_EL2_T0SZ_MASK 0x3f +#define VTCR_EL2_SL0_SHIFT 6 +#define VTCR_EL2_SL0_4K_LVL2 (0x0 << VTCR_EL2_SL0_SHIFT) +#define VTCR_EL2_SL0_4K_LVL1 (0x1 << VTCR_EL2_SL0_SHIFT) +#define VTCR_EL2_SL0_4K_LVL0 (0x2 << VTCR_EL2_SL0_SHIFT) +#define VTCR_EL2_IRGN0_SHIFT 8 +#define VTCR_EL2_IRGN0_WBWA (0x1 << VTCR_EL2_IRGN0_SHIFT) +#define VTCR_EL2_ORGN0_SHIFT 10 +#define VTCR_EL2_ORGN0_WBWA (0x1 << VTCR_EL2_ORGN0_SHIFT) +#define VTCR_EL2_SH0_SHIFT 12 +#define VTCR_EL2_SH0_NS (0x0 << VTCR_EL2_SH0_SHIFT) +#define VTCR_EL2_SH0_OS (0x2 << VTCR_EL2_SH0_SHIFT) +#define VTCR_EL2_SH0_IS (0x3 << VTCR_EL2_SH0_SHIFT) +#define VTCR_EL2_TG0_SHIFT 14 +#define VTCR_EL2_TG0_4K (0x0 << VTCR_EL2_TG0_SHIFT) +#define VTCR_EL2_TG0_64K (0x1 << VTCR_EL2_TG0_SHIFT) +#define VTCR_EL2_TG0_16K (0x2 << VTCR_EL2_TG0_SHIFT) +#define VTCR_EL2_PS_SHIFT 16 +#define VTCR_EL2_PS_32BIT (0x0 << VTCR_EL2_PS_SHIFT) +#define VTCR_EL2_PS_36BIT (0x1 << VTCR_EL2_PS_SHIFT) +#define VTCR_EL2_PS_40BIT (0x2 << VTCR_EL2_PS_SHIFT) +#define VTCR_EL2_PS_42BIT (0x3 << VTCR_EL2_PS_SHIFT) +#define VTCR_EL2_PS_44BIT (0x4 << VTCR_EL2_PS_SHIFT) +#define VTCR_EL2_PS_48BIT (0x5 << VTCR_EL2_PS_SHIFT) + +/* VTTBR_EL2 - Virtualization Translation Table Base Register */ +#define VTTBR_VMID_MASK 0xffff000000000000 +#define VTTBR_VMID_SHIFT 48 +#define VTTBR_HOST 0x0000000000000000 + +#endif /* !_MACHINE_HYPERVISOR_H_ */ From owner-svn-src-all@freebsd.org Fri Mar 6 14:56:03 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id D594226A29B; Fri, 6 Mar 2020 14:56:03 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 48YrKH1kpFz4T1N; Fri, 6 Mar 2020 14:56:03 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id A8B7021C96; Fri, 6 Mar 2020 14:56:02 +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 026Eu2lZ028559; Fri, 6 Mar 2020 14:56:02 GMT (envelope-from markj@FreeBSD.org) Received: (from markj@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 026Eu2Ke028558; Fri, 6 Mar 2020 14:56:02 GMT (envelope-from markj@FreeBSD.org) Message-Id: <202003061456.026Eu2Ke028558@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: markj set sender to markj@FreeBSD.org using -f From: Mark Johnston Date: Fri, 6 Mar 2020 14:56: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: r358704 - stable/12/sys/cddl/dev/systrace X-SVN-Group: stable-12 X-SVN-Commit-Author: markj X-SVN-Commit-Paths: stable/12/sys/cddl/dev/systrace X-SVN-Commit-Revision: 358704 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages 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, 06 Mar 2020 14:56:04 -0000 Author: markj Date: Fri Mar 6 14:56:02 2020 New Revision: 358704 URL: https://svnweb.freebsd.org/changeset/base/358704 Log: MFC r358433: Clear systrace_args_func when systrace probes are disabled. Modified: stable/12/sys/cddl/dev/systrace/systrace.c Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/cddl/dev/systrace/systrace.c ============================================================================== --- stable/12/sys/cddl/dev/systrace/systrace.c Fri Mar 6 14:46:50 2020 (r358703) +++ stable/12/sys/cddl/dev/systrace/systrace.c Fri Mar 6 14:56:02 2020 (r358704) @@ -298,9 +298,9 @@ systrace_destroy(void *arg, dtrace_id_t id, void *parg * disabled. */ if (SYSTRACE_ISENTRY((uintptr_t)parg)) { - ASSERT(sysent[sysnum].sy_entry == 0); + ASSERT(sysent[sysnum].sy_entry == DTRACE_IDNONE); } else { - ASSERT(sysent[sysnum].sy_return == 0); + ASSERT(sysent[sysnum].sy_return == DTRACE_IDNONE); } #endif } @@ -310,8 +310,7 @@ systrace_enable(void *arg, dtrace_id_t id, void *parg) { int sysnum = SYSTRACE_SYSNUM((uintptr_t)parg); - if (SYSENT[sysnum].sy_systrace_args_func == NULL) - SYSENT[sysnum].sy_systrace_args_func = systrace_args; + SYSENT[sysnum].sy_systrace_args_func = systrace_args; if (SYSTRACE_ISENTRY((uintptr_t)parg)) SYSENT[sysnum].sy_entry = id; @@ -327,8 +326,9 @@ systrace_disable(void *arg, dtrace_id_t id, void *parg { int sysnum = SYSTRACE_SYSNUM((uintptr_t)parg); - SYSENT[sysnum].sy_entry = 0; - SYSENT[sysnum].sy_return = 0; + SYSENT[sysnum].sy_systrace_args_func = NULL; + SYSENT[sysnum].sy_entry = DTRACE_IDNONE; + SYSENT[sysnum].sy_return = DTRACE_IDNONE; systrace_enabled_count--; if (systrace_enabled_count == 0) systrace_enabled = false; From owner-svn-src-all@freebsd.org Fri Mar 6 14:56:48 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id C300026A316; Fri, 6 Mar 2020 14:56:48 +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 48YrL82fVqz4VgT; Fri, 6 Mar 2020 14:56:48 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 34FFE21C9D; Fri, 6 Mar 2020 14:56:48 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 026EumMg028644; Fri, 6 Mar 2020 14:56:48 GMT (envelope-from markj@FreeBSD.org) Received: (from markj@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 026EumQp028643; Fri, 6 Mar 2020 14:56:48 GMT (envelope-from markj@FreeBSD.org) Message-Id: <202003061456.026EumQp028643@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: markj set sender to markj@FreeBSD.org using -f From: Mark Johnston Date: Fri, 6 Mar 2020 14:56: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: r358705 - stable/12/cddl/contrib/opensolaris/lib/libdtrace/common X-SVN-Group: stable-12 X-SVN-Commit-Author: markj X-SVN-Commit-Paths: stable/12/cddl/contrib/opensolaris/lib/libdtrace/common X-SVN-Commit-Revision: 358705 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages 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, 06 Mar 2020 14:56:48 -0000 Author: markj Date: Fri Mar 6 14:56:47 2020 New Revision: 358705 URL: https://svnweb.freebsd.org/changeset/base/358705 Log: MFC r358435: Do not load dtraceall.ko if dtrace.ko is already loaded. Modified: stable/12/cddl/contrib/opensolaris/lib/libdtrace/common/dt_open.c Directory Properties: stable/12/ (props changed) Modified: stable/12/cddl/contrib/opensolaris/lib/libdtrace/common/dt_open.c ============================================================================== --- stable/12/cddl/contrib/opensolaris/lib/libdtrace/common/dt_open.c Fri Mar 6 14:56:02 2020 (r358704) +++ stable/12/cddl/contrib/opensolaris/lib/libdtrace/common/dt_open.c Fri Mar 6 14:56:47 2020 (r358705) @@ -1105,7 +1105,7 @@ dt_vopen(int version, int flags, int *errp, dt_provmod_open(&provmod, &df); dtfd = open("/dev/dtrace/dtrace", O_RDWR | O_CLOEXEC); - err = errno; /* save errno from opening dtfd */ + err = dtfd == -1 ? errno : 0; /* save errno from opening dtfd */ #if defined(__FreeBSD__) /* * Automatically load the 'dtraceall' module if we couldn't open the From owner-svn-src-all@freebsd.org Fri Mar 6 15:26:16 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 7872326AAC5; Fri, 6 Mar 2020 15:26:16 +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 48Ys080tB0z4YjL; Fri, 6 Mar 2020 15:26:15 +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 BAF09222A1; Fri, 6 Mar 2020 15:26:15 +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 026FQFtD046427; Fri, 6 Mar 2020 15:26:15 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 026FQFBN046426; Fri, 6 Mar 2020 15:26:15 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <202003061526.026FQFBN046426@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Fri, 6 Mar 2020 15:26:15 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r358706 - head/contrib/elftoolchain/readelf X-SVN-Group: head X-SVN-Commit-Author: emaste X-SVN-Commit-Paths: head/contrib/elftoolchain/readelf X-SVN-Commit-Revision: 358706 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages 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, 06 Mar 2020 15:26:16 -0000 Author: emaste Date: Fri Mar 6 15:26:15 2020 New Revision: 358706 URL: https://svnweb.freebsd.org/changeset/base/358706 Log: readelf: add XEN_ELFNOTE_PHYS32_ENTRY note See r336469 for details. Sponsored by: The FreeBSD Foundation Modified: head/contrib/elftoolchain/readelf/readelf.c Modified: head/contrib/elftoolchain/readelf/readelf.c ============================================================================== --- head/contrib/elftoolchain/readelf/readelf.c Fri Mar 6 14:56:47 2020 (r358705) +++ head/contrib/elftoolchain/readelf/readelf.c Fri Mar 6 15:26:15 2020 (r358706) @@ -1283,6 +1283,7 @@ note_type_xen(unsigned int nt) case 15: return "XEN_ELFNOTE_INIT_P2M"; case 16: return "XEN_ELFNOTE_MOD_START_PFN"; case 17: return "XEN_ELFNOTE_SUPPORTED_FEATURES"; + case 18: return "XEN_ELFNOTE_PHYS32_ENTRY"; default: return (note_type_unknown(nt)); } } From owner-svn-src-all@freebsd.org Fri Mar 6 15:57:23 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 3921E26B1F8; Fri, 6 Mar 2020 15:57:23 +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 48Ysh2670Xz3QSC; Fri, 6 Mar 2020 15:57:22 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 2E4752287D; Fri, 6 Mar 2020 15:57:22 +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 026FvMl4064320; Fri, 6 Mar 2020 15:57:22 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 026FvM1e064319; Fri, 6 Mar 2020 15:57:22 GMT (envelope-from kib@FreeBSD.org) Message-Id: <202003061557.026FvM1e064319@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Fri, 6 Mar 2020 15:57:22 +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: r358707 - stable/12/sys/kern X-SVN-Group: stable-12 X-SVN-Commit-Author: kib X-SVN-Commit-Paths: stable/12/sys/kern X-SVN-Commit-Revision: 358707 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages 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, 06 Mar 2020 15:57:23 -0000 Author: kib Date: Fri Mar 6 15:57:21 2020 New Revision: 358707 URL: https://svnweb.freebsd.org/changeset/base/358707 Log: Adjust r358702 by dropping type asserts. They depend on the C11 Generic feature that is not supported by gcc 4.2.1 used on stable/12 for some arches. This is a direct commit to the branch. Reported by: gjb Sponsored by: The FreeBSD Foundation Modified: stable/12/sys/kern/kern_tc.c Modified: stable/12/sys/kern/kern_tc.c ============================================================================== --- stable/12/sys/kern/kern_tc.c Fri Mar 6 15:26:15 2020 (r358706) +++ stable/12/sys/kern/kern_tc.c Fri Mar 6 15:57:21 2020 (r358707) @@ -234,9 +234,11 @@ bintime_off(struct bintime *bt, u_int off) } #define GETTHBINTIME(dst, member) \ do { \ +/* \ _Static_assert(_Generic(((struct timehands *)NULL)->member, \ struct bintime: 1, default: 0) == 1, \ "struct timehands member is not of struct bintime type"); \ +*/ \ bintime_off(dst, __offsetof(struct timehands, member)); \ } while (0) @@ -255,10 +257,12 @@ getthmember(void *out, size_t out_size, u_int off) } #define GETTHMEMBER(dst, member) \ do { \ +/* \ _Static_assert(_Generic(*dst, \ __typeof(((struct timehands *)NULL)->member): 1, \ default: 0) == 1, \ "*dst and struct timehands member have different types"); \ +*/ \ getthmember(dst, sizeof(*dst), __offsetof(struct timehands, \ member)); \ } while (0) From owner-svn-src-all@freebsd.org Fri Mar 6 15:58:53 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 99C4D26B291; Fri, 6 Mar 2020 15:58:53 +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 48Ysjn2FtPz3yk5; Fri, 6 Mar 2020 15:58:53 +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 0D3172287E; Fri, 6 Mar 2020 15:58:53 +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 026FwqKJ064420; Fri, 6 Mar 2020 15:58:52 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 026FwqlB064419; Fri, 6 Mar 2020 15:58:52 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <202003061558.026FwqlB064419@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Fri, 6 Mar 2020 15:58:52 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r358708 - head/contrib/elftoolchain/readelf X-SVN-Group: head X-SVN-Commit-Author: emaste X-SVN-Commit-Paths: head/contrib/elftoolchain/readelf X-SVN-Commit-Revision: 358708 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages 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, 06 Mar 2020 15:58:53 -0000 Author: emaste Date: Fri Mar 6 15:58:52 2020 New Revision: 358708 URL: https://svnweb.freebsd.org/changeset/base/358708 Log: readelf: decode and print Xen ELF note strings Sponsored by: The FreeBSD Foundation Modified: head/contrib/elftoolchain/readelf/readelf.c Modified: head/contrib/elftoolchain/readelf/readelf.c ============================================================================== --- head/contrib/elftoolchain/readelf/readelf.c Fri Mar 6 15:57:21 2020 (r358707) +++ head/contrib/elftoolchain/readelf/readelf.c Fri Mar 6 15:58:52 2020 (r358708) @@ -3677,6 +3677,33 @@ static struct flag_desc note_feature_ctl_flags[] = { }; static void +dump_note_string(const char *description, const char *s, size_t len) +{ + size_t i; + int printable = 1; + + if (len == 0 || s[--len] != '\0') { + printable = 0; + } else { + for (i = 0; i < len; i++) { + if (!isprint(s[i])) { + printable = 0; + break; + } + } + } + + if (printable) { + printf(" %s: %s\n", description, s); + } else { + printf(" description data:"); + for (i = 0; i < len; i++) + printf(" %02x", (unsigned char)s[i]); + printf("\n"); + } +} + +static void dump_notes_data(struct readelf *re, const char *name, uint32_t type, const char *buf, size_t sz) { @@ -3714,6 +3741,30 @@ dump_notes_data(struct readelf *re, const char *name, switch (type) { case NT_GNU_PROPERTY_TYPE_0: dump_gnu_property_type_0(re, buf, sz); + return; + } + } else if (strcmp(name, "Xen") == 0) { + switch (type) { + case 5: + dump_note_string("Xen version", buf, sz); + return; + case 6: + dump_note_string("Guest OS", buf, sz); + return; + case 7: + dump_note_string("Guest version", buf, sz); + return; + case 8: + dump_note_string("Loader", buf, sz); + return; + case 9: + dump_note_string("PAE mode", buf, sz); + return; + case 10: + dump_note_string("Features", buf, sz); + return; + case 11: + dump_note_string("BSD symtab", buf, sz); return; } } From owner-svn-src-all@freebsd.org Fri Mar 6 16:00:36 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 7304626B32A; Fri, 6 Mar 2020 16:00:36 +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 48Yslm2Qp9z42Py; Fri, 6 Mar 2020 16:00:36 +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 4E93D22887; Fri, 6 Mar 2020 16:00:36 +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 026G0ad2065436; Fri, 6 Mar 2020 16:00:36 GMT (envelope-from andrew@FreeBSD.org) Received: (from andrew@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 026G0aqC065435; Fri, 6 Mar 2020 16:00:36 GMT (envelope-from andrew@FreeBSD.org) Message-Id: <202003061600.026G0aqC065435@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: andrew set sender to andrew@FreeBSD.org using -f From: Andrew Turner Date: Fri, 6 Mar 2020 16:00:36 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r358709 - head/sys/arm64/include X-SVN-Group: head X-SVN-Commit-Author: andrew X-SVN-Commit-Paths: head/sys/arm64/include X-SVN-Commit-Revision: 358709 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages 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, 06 Mar 2020 16:00:36 -0000 Author: andrew Date: Fri Mar 6 16:00:35 2020 New Revision: 358709 URL: https://svnweb.freebsd.org/changeset/base/358709 Log: Add more are64 special register fields Obtained from: https://github.com/FreeBSD-UPB/freebsd Modified: head/sys/arm64/include/armreg.h Modified: head/sys/arm64/include/armreg.h ============================================================================== --- head/sys/arm64/include/armreg.h Fri Mar 6 15:58:52 2020 (r358708) +++ head/sys/arm64/include/armreg.h Fri Mar 6 16:00:35 2020 (r358709) @@ -66,6 +66,18 @@ #define UL(x) UINT64_C(x) +/* CNTHCTL_EL2 - Counter-timer Hypervisor Control register */ +#define CNTHCTL_EVNTI_MASK (0xf << 4) /* Bit to trigger event stream */ +#define CNTHCTL_EVNTDIR (1 << 3) /* Control transition trigger bit */ +#define CNTHCTL_EVNTEN (1 << 2) /* Enable event stream */ +#define CNTHCTL_EL1PCEN (1 << 1) /* Allow EL0/1 physical timer access */ +#define CNTHCTL_EL1PCTEN (1 << 0) /*Allow EL0/1 physical counter access*/ + +/* CNTP_CTL_EL0 - Counter-timer Physical Timer Control register */ +#define CNTP_CTL_ENABLE (1 << 0) +#define CNTP_CTL_IMASK (1 << 1) +#define CNTP_CTL_ISTATUS (1 << 2) + /* CPACR_EL1 */ #define CPACR_FPEN_MASK (0x3 << 20) #define CPACR_FPEN_TRAP_ALL1 (0x0 << 20) /* Traps from EL0 and EL1 */ @@ -122,22 +134,53 @@ #define DCZID_BS_SIZE(reg) (((reg) & DCZID_BS_MASK) >> DCZID_BS_SHIFT) /* ESR_ELx */ -#define ESR_ELx_ISS_MASK 0x00ffffff +#define ESR_ELx_ISS_MASK 0x01ffffff #define ISS_INSN_FnV (0x01 << 10) #define ISS_INSN_EA (0x01 << 9) #define ISS_INSN_S1PTW (0x01 << 7) #define ISS_INSN_IFSC_MASK (0x1f << 0) -#define ISS_DATA_ISV (0x01 << 24) -#define ISS_DATA_SAS_MASK (0x03 << 22) -#define ISS_DATA_SSE (0x01 << 21) -#define ISS_DATA_SRT_MASK (0x1f << 16) + +#define ISS_MSR_DIR_SHIFT 0 +#define ISS_MSR_DIR (0x01 << ISS_MSR_DIR_SHIFT) +#define ISS_MSR_Rt_SHIFT 5 +#define ISS_MSR_Rt_MASK (0x1f << ISS_MSR_Rt_SHIFT) +#define ISS_MSR_Rt(x) (((x) & ISS_MSR_Rt_MASK) >> ISS_MSR_Rt_SHIFT) +#define ISS_MSR_CRm_SHIFT 1 +#define ISS_MSR_CRm_MASK (0xf << ISS_MSR_CRm_SHIFT) +#define ISS_MSR_CRm(x) (((x) & ISS_MSR_CRm_MASK) >> ISS_MSR_CRm_SHIFT) +#define ISS_MSR_CRn_SHIFT 10 +#define ISS_MSR_CRn_MASK (0xf << ISS_MSR_CRn_SHIFT) +#define ISS_MSR_CRn(x) (((x) & ISS_MSR_CRn_MASK) >> ISS_MSR_CRn_SHIFT) +#define ISS_MSR_OP1_SHIFT 14 +#define ISS_MSR_OP1_MASK (0x7 << ISS_MSR_OP1_SHIFT) +#define ISS_MSR_OP1(x) (((x) & ISS_MSR_OP1_MASK) >> ISS_MSR_OP1_SHIFT) +#define ISS_MSR_OP2_SHIFT 17 +#define ISS_MSR_OP2_MASK (0x7 << ISS_MSR_OP2_SHIFT) +#define ISS_MSR_OP2(x) (((x) & ISS_MSR_OP2_MASK) >> ISS_MSR_OP2_SHIFT) +#define ISS_MSR_OP0_SHIFT 20 +#define ISS_MSR_OP0_MASK (0x3 << ISS_MSR_OP0_SHIFT) +#define ISS_MSR_OP0(x) (((x) & ISS_MSR_OP0_MASK) >> ISS_MSR_OP0_SHIFT) +#define ISS_MSR_REG_MASK \ + (ISS_MSR_OP0_MASK | ISS_MSR_OP2_MASK | ISS_MSR_OP1_MASK | \ + ISS_MSR_CRn_MASK | ISS_MSR_CRm_MASK) + + +#define ISS_DATA_ISV_SHIFT 24 +#define ISS_DATA_ISV (0x01 << ISS_DATA_ISV_SHIFT) +#define ISS_DATA_SAS_SHIFT 22 +#define ISS_DATA_SAS_MASK (0x03 << ISS_DATA_SAS_SHIFT) +#define ISS_DATA_SSE_SHIFT 21 +#define ISS_DATA_SSE (0x01 << ISS_DATA_SSE_SHIFT) +#define ISS_DATA_SRT_SHIFT 16 +#define ISS_DATA_SRT_MASK (0x1f << ISS_DATA_SRT_SHIFT) #define ISS_DATA_SF (0x01 << 15) #define ISS_DATA_AR (0x01 << 14) #define ISS_DATA_FnV (0x01 << 10) #define ISS_DATA_EA (0x01 << 9) #define ISS_DATA_CM (0x01 << 8) #define ISS_DATA_S1PTW (0x01 << 7) -#define ISS_DATA_WnR (0x01 << 6) +#define ISS_DATA_WnR_SHIFT 6 +#define ISS_DATA_WnR (0x01 << ISS_DATA_WnR_SHIFT) #define ISS_DATA_DFSC_MASK (0x3f << 0) #define ISS_DATA_DFSC_ASF_L0 (0x00 << 0) #define ISS_DATA_DFSC_ASF_L1 (0x01 << 0) @@ -170,10 +213,12 @@ #define ESR_ELx_EC_MASK (0x3f << 26) #define ESR_ELx_EXCEPTION(esr) (((esr) & ESR_ELx_EC_MASK) >> ESR_ELx_EC_SHIFT) #define EXCP_UNKNOWN 0x00 /* Unkwn exception */ +#define EXCP_TRAP_WFI_WFE 0x01 /* Trapped WFI or WFE */ #define EXCP_FP_SIMD 0x07 /* VFP/SIMD trap */ #define EXCP_ILL_STATE 0x0e /* Illegal execution state */ #define EXCP_SVC32 0x11 /* SVC trap for AArch32 */ #define EXCP_SVC64 0x15 /* SVC trap for AArch64 */ +#define EXCP_HVC 0x16 /* HVC trap */ #define EXCP_MSR 0x18 /* MSR/MRS trap */ #define EXCP_INSN_ABORT_L 0x20 /* Instruction abort, from lower EL */ #define EXCP_INSN_ABORT 0x21 /* Instruction abort, from same EL */ @@ -714,6 +759,8 @@ #define TCR_TG1_4K (2 << TCR_TG1_SHIFT) #define TCR_TG1_64K (3 << TCR_TG1_SHIFT) +#define TCR_TG0_MASK 0x000000000000c000 + #define TCR_SH1_SHIFT 28 #define TCR_SH1_IS (0x3UL << TCR_SH1_SHIFT) #define TCR_ORGN1_SHIFT 26 @@ -740,6 +787,7 @@ #define TCR_T1SZ_SHIFT 16 #define TCR_T0SZ_SHIFT 0 +#define TCR_T0SZ_MASK 0x3f #define TCR_T1SZ(x) ((x) << TCR_T1SZ_SHIFT) #define TCR_T0SZ(x) ((x) << TCR_T0SZ_SHIFT) #define TCR_TxSZ(x) (TCR_T1SZ(x) | TCR_T0SZ(x)) From owner-svn-src-all@freebsd.org Fri Mar 6 16:52:21 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id DEAD826C004; Fri, 6 Mar 2020 16:52: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 48YtvT1WNPz4BhX; Fri, 6 Mar 2020 16:52: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 F2D1223337; Fri, 6 Mar 2020 16:52:20 +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 026GqKKA096753; Fri, 6 Mar 2020 16:52:20 GMT (envelope-from jhibbits@FreeBSD.org) Received: (from jhibbits@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 026GqKoN096749; Fri, 6 Mar 2020 16:52:20 GMT (envelope-from jhibbits@FreeBSD.org) Message-Id: <202003061652.026GqKoN096749@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jhibbits set sender to jhibbits@FreeBSD.org using -f From: Justin Hibbits Date: Fri, 6 Mar 2020 16:52:20 +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: r358710 - in stable: 11/share/man/man4 11/sys/dev/ismt 12/share/man/man4 12/sys/dev/ismt X-SVN-Group: stable-11 X-SVN-Commit-Author: jhibbits X-SVN-Commit-Paths: in stable: 11/share/man/man4 11/sys/dev/ismt 12/share/man/man4 12/sys/dev/ismt X-SVN-Commit-Revision: 358710 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages 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, 06 Mar 2020 16:52:22 -0000 Author: jhibbits Date: Fri Mar 6 16:52:20 2020 New Revision: 358710 URL: https://svnweb.freebsd.org/changeset/base/358710 Log: MFC r358595,r358619: Add Atom C3000 (Denverton) SMT PCI ID. Update ismt(4) man page. Sponsored by: Juniper Networks, Inc Modified: stable/11/share/man/man4/ismt.4 stable/11/sys/dev/ismt/ismt.c Directory Properties: stable/11/ (props changed) Changes in other areas also in this revision: Modified: stable/12/share/man/man4/ismt.4 stable/12/sys/dev/ismt/ismt.c Directory Properties: stable/12/ (props changed) Modified: stable/11/share/man/man4/ismt.4 ============================================================================== --- stable/11/share/man/man4/ismt.4 Fri Mar 6 16:00:35 2020 (r358709) +++ stable/11/share/man/man4/ismt.4 Fri Mar 6 16:52:20 2020 (r358710) @@ -33,7 +33,7 @@ .\" .\" $FreeBSD$ .\" -.Dd January 11, 2016 +.Dd March 4, 2020 .Dt ISMT 4 .Os .Sh NAME @@ -46,7 +46,7 @@ .Cd device ismt .Sh DESCRIPTION This driver provides access to the SMBus 2.0 controller device contained -in the Intel Atom S1200 and C2000 CPUs. +in the Intel Atom S1200, C2000 and C3000 CPUs. .Sh SEE ALSO .Xr ichsmb 4 , .Xr smb 4 , Modified: stable/11/sys/dev/ismt/ismt.c ============================================================================== --- stable/11/sys/dev/ismt/ismt.c Fri Mar 6 16:00:35 2020 (r358709) +++ stable/11/sys/dev/ismt/ismt.c Fri Mar 6 16:52:20 2020 (r358710) @@ -717,6 +717,7 @@ fail: #define ID_INTEL_S1200_SMT0 0x0c598086 #define ID_INTEL_S1200_SMT1 0x0c5a8086 #define ID_INTEL_C2000_SMT 0x1f158086 +#define ID_INTEL_C3000_SMT 0x19ac8086 static int ismt_probe(device_t dev) @@ -732,6 +733,9 @@ ismt_probe(device_t dev) break; case ID_INTEL_C2000_SMT: desc = "Atom Processor C2000 SMBus 2.0"; + break; + case ID_INTEL_C3000_SMT: + desc = "Atom Processor C3000 SMBus 2.0"; break; default: return (ENXIO); From owner-svn-src-all@freebsd.org Fri Mar 6 16:52:21 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id DF29C26C005; Fri, 6 Mar 2020 16:52: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 48YtvT4QjDz4Bjx; Fri, 6 Mar 2020 16:52: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 73D4323339; Fri, 6 Mar 2020 16:52: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 026GqLdV096762; Fri, 6 Mar 2020 16:52:21 GMT (envelope-from jhibbits@FreeBSD.org) Received: (from jhibbits@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 026GqL1B096760; Fri, 6 Mar 2020 16:52:21 GMT (envelope-from jhibbits@FreeBSD.org) Message-Id: <202003061652.026GqL1B096760@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jhibbits set sender to jhibbits@FreeBSD.org using -f From: Justin Hibbits Date: Fri, 6 Mar 2020 16:52:21 +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: r358710 - in stable: 11/share/man/man4 11/sys/dev/ismt 12/share/man/man4 12/sys/dev/ismt X-SVN-Group: stable-12 X-SVN-Commit-Author: jhibbits X-SVN-Commit-Paths: in stable: 11/share/man/man4 11/sys/dev/ismt 12/share/man/man4 12/sys/dev/ismt X-SVN-Commit-Revision: 358710 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages 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, 06 Mar 2020 16:52:22 -0000 Author: jhibbits Date: Fri Mar 6 16:52:20 2020 New Revision: 358710 URL: https://svnweb.freebsd.org/changeset/base/358710 Log: MFC r358595,r358619: Add Atom C3000 (Denverton) SMT PCI ID. Update ismt(4) man page. Sponsored by: Juniper Networks, Inc Modified: stable/12/share/man/man4/ismt.4 stable/12/sys/dev/ismt/ismt.c Directory Properties: stable/12/ (props changed) Changes in other areas also in this revision: Modified: stable/11/share/man/man4/ismt.4 stable/11/sys/dev/ismt/ismt.c Directory Properties: stable/11/ (props changed) Modified: stable/12/share/man/man4/ismt.4 ============================================================================== --- stable/12/share/man/man4/ismt.4 Fri Mar 6 16:00:35 2020 (r358709) +++ stable/12/share/man/man4/ismt.4 Fri Mar 6 16:52:20 2020 (r358710) @@ -33,7 +33,7 @@ .\" .\" $FreeBSD$ .\" -.Dd January 11, 2016 +.Dd March 4, 2020 .Dt ISMT 4 .Os .Sh NAME @@ -46,7 +46,7 @@ .Cd device ismt .Sh DESCRIPTION This driver provides access to the SMBus 2.0 controller device contained -in the Intel Atom S1200 and C2000 CPUs. +in the Intel Atom S1200, C2000 and C3000 CPUs. .Sh SEE ALSO .Xr ichsmb 4 , .Xr smb 4 , Modified: stable/12/sys/dev/ismt/ismt.c ============================================================================== --- stable/12/sys/dev/ismt/ismt.c Fri Mar 6 16:00:35 2020 (r358709) +++ stable/12/sys/dev/ismt/ismt.c Fri Mar 6 16:52:20 2020 (r358710) @@ -717,6 +717,7 @@ fail: #define ID_INTEL_S1200_SMT0 0x0c598086 #define ID_INTEL_S1200_SMT1 0x0c5a8086 #define ID_INTEL_C2000_SMT 0x1f158086 +#define ID_INTEL_C3000_SMT 0x19ac8086 static int ismt_probe(device_t dev) @@ -732,6 +733,9 @@ ismt_probe(device_t dev) break; case ID_INTEL_C2000_SMT: desc = "Atom Processor C2000 SMBus 2.0"; + break; + case ID_INTEL_C3000_SMT: + desc = "Atom Processor C3000 SMBus 2.0"; break; default: return (ENXIO); From owner-svn-src-all@freebsd.org Fri Mar 6 17:02:16 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id CF56226C324; Fri, 6 Mar 2020 17:02:16 +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 48Yv6w1X4Mz4WnM; Fri, 6 Mar 2020 17:02:16 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 16DBA233F1; Fri, 6 Mar 2020 17:02:16 +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 026H2F5X005891; Fri, 6 Mar 2020 17:02:15 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 026H2EGD005883; Fri, 6 Mar 2020 17:02:14 GMT (envelope-from dim@FreeBSD.org) Message-Id: <202003061702.026H2EGD005883@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Fri, 6 Mar 2020 17:02:14 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r358711 - in head/contrib/llvm-project/clang: include/clang/Basic lib/CodeGen lib/Sema X-SVN-Group: head X-SVN-Commit-Author: dim X-SVN-Commit-Paths: in head/contrib/llvm-project/clang: include/clang/Basic lib/CodeGen lib/Sema X-SVN-Commit-Revision: 358711 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages 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, 06 Mar 2020 17:02:16 -0000 Author: dim Date: Fri Mar 6 17:02:14 2020 New Revision: 358711 URL: https://svnweb.freebsd.org/changeset/base/358711 Log: Merge commit f75939599 from llvm git (by Erich Keane): Reland r374450 with Richard Smith's comments and test fixed. The behavior from the original patch has changed, since we're no longer allowing LLVM to just ignore the alignment. Instead, we're just assuming the maximum possible alignment. Differential Revision: https://reviews.llvm.org/D68824 llvm-svn: 374562 This fixes 'Assertion failed: (Alignment != 0 && "Invalid Alignment"), function CreateAlignmentAssumption', when building recent versions of v8, which invoke __builtin_assume_aligned() with its alignment argument set to 4GiB or more. Clang will now report a warning, and show the maximum possible alignment instead, e.g.: huge-align.cpp:1:27: warning: requested alignment must be 536870912 bytes or smaller; maximum alignment assumed [-Wbuiltin-assume-aligned-alignment] void *f(void *g) { return __builtin_assume_aligned(g, 4294967296); } ^ ~~~~~~~~~~ Upstream PR: https://bugs.llvm.org/show_bug.cgi?id=43839 Reported by: cem MFC after: 3 days Modified: head/contrib/llvm-project/clang/include/clang/Basic/DiagnosticSemaKinds.td head/contrib/llvm-project/clang/lib/CodeGen/CGBuiltin.cpp head/contrib/llvm-project/clang/lib/CodeGen/CGCall.cpp head/contrib/llvm-project/clang/lib/CodeGen/CGExprScalar.cpp head/contrib/llvm-project/clang/lib/CodeGen/CGStmtOpenMP.cpp head/contrib/llvm-project/clang/lib/CodeGen/CodeGenFunction.cpp head/contrib/llvm-project/clang/lib/CodeGen/CodeGenFunction.h head/contrib/llvm-project/clang/lib/Sema/SemaChecking.cpp Modified: head/contrib/llvm-project/clang/include/clang/Basic/DiagnosticSemaKinds.td ============================================================================== --- head/contrib/llvm-project/clang/include/clang/Basic/DiagnosticSemaKinds.td Fri Mar 6 16:52:20 2020 (r358710) +++ head/contrib/llvm-project/clang/include/clang/Basic/DiagnosticSemaKinds.td Fri Mar 6 17:02:14 2020 (r358711) @@ -2797,6 +2797,10 @@ def err_alignment_dependent_typedef_name : Error< def err_attribute_aligned_too_great : Error< "requested alignment must be %0 bytes or smaller">; +def warn_assume_aligned_too_great + : Warning<"requested alignment must be %0 bytes or smaller; maximum " + "alignment assumed">, + InGroup>; def warn_redeclaration_without_attribute_prev_attribute_ignored : Warning< "%q0 redeclared without %1 attribute: previous %1 ignored">, InGroup; Modified: head/contrib/llvm-project/clang/lib/CodeGen/CGBuiltin.cpp ============================================================================== --- head/contrib/llvm-project/clang/lib/CodeGen/CGBuiltin.cpp Fri Mar 6 16:52:20 2020 (r358710) +++ head/contrib/llvm-project/clang/lib/CodeGen/CGBuiltin.cpp Fri Mar 6 17:02:14 2020 (r358711) @@ -2026,11 +2026,13 @@ RValue CodeGenFunction::EmitBuiltinExpr(const GlobalDe Value *AlignmentValue = EmitScalarExpr(E->getArg(1)); ConstantInt *AlignmentCI = cast(AlignmentValue); - unsigned Alignment = (unsigned)AlignmentCI->getZExtValue(); + if (AlignmentCI->getValue().ugt(llvm::Value::MaximumAlignment)) + AlignmentCI = ConstantInt::get(AlignmentCI->getType(), + llvm::Value::MaximumAlignment); EmitAlignmentAssumption(PtrValue, Ptr, /*The expr loc is sufficient.*/ SourceLocation(), - Alignment, OffsetValue); + AlignmentCI, OffsetValue); return RValue::get(PtrValue); } case Builtin::BI__assume: Modified: head/contrib/llvm-project/clang/lib/CodeGen/CGCall.cpp ============================================================================== --- head/contrib/llvm-project/clang/lib/CodeGen/CGCall.cpp Fri Mar 6 16:52:20 2020 (r358710) +++ head/contrib/llvm-project/clang/lib/CodeGen/CGCall.cpp Fri Mar 6 17:02:14 2020 (r358711) @@ -4548,7 +4548,7 @@ RValue CodeGenFunction::EmitCall(const CGFunctionInfo llvm::Value *Alignment = EmitScalarExpr(AA->getAlignment()); llvm::ConstantInt *AlignmentCI = cast(Alignment); EmitAlignmentAssumption(Ret.getScalarVal(), RetTy, Loc, AA->getLocation(), - AlignmentCI->getZExtValue(), OffsetValue); + AlignmentCI, OffsetValue); } else if (const auto *AA = TargetDecl->getAttr()) { llvm::Value *AlignmentVal = CallArgs[AA->getParamIndex().getLLVMIndex()] .getRValue(*this) Modified: head/contrib/llvm-project/clang/lib/CodeGen/CGExprScalar.cpp ============================================================================== --- head/contrib/llvm-project/clang/lib/CodeGen/CGExprScalar.cpp Fri Mar 6 16:52:20 2020 (r358710) +++ head/contrib/llvm-project/clang/lib/CodeGen/CGExprScalar.cpp Fri Mar 6 17:02:14 2020 (r358711) @@ -294,8 +294,7 @@ class ScalarExprEmitter (public) Value *AlignmentValue = CGF.EmitScalarExpr(AVAttr->getAlignment()); llvm::ConstantInt *AlignmentCI = cast(AlignmentValue); - CGF.EmitAlignmentAssumption(V, E, AVAttr->getLocation(), - AlignmentCI->getZExtValue()); + CGF.EmitAlignmentAssumption(V, E, AVAttr->getLocation(), AlignmentCI); } /// EmitLoadOfLValue - Given an expression with complex type that represents a Modified: head/contrib/llvm-project/clang/lib/CodeGen/CGStmtOpenMP.cpp ============================================================================== --- head/contrib/llvm-project/clang/lib/CodeGen/CGStmtOpenMP.cpp Fri Mar 6 16:52:20 2020 (r358710) +++ head/contrib/llvm-project/clang/lib/CodeGen/CGStmtOpenMP.cpp Fri Mar 6 17:02:14 2020 (r358711) @@ -1460,14 +1460,14 @@ static void emitAlignedClause(CodeGenFunction &CGF, if (!CGF.HaveInsertPoint()) return; for (const auto *Clause : D.getClausesOfKind()) { - unsigned ClauseAlignment = 0; + llvm::APInt ClauseAlignment(64, 0); if (const Expr *AlignmentExpr = Clause->getAlignment()) { auto *AlignmentCI = cast(CGF.EmitScalarExpr(AlignmentExpr)); - ClauseAlignment = static_cast(AlignmentCI->getZExtValue()); + ClauseAlignment = AlignmentCI->getValue(); } for (const Expr *E : Clause->varlists()) { - unsigned Alignment = ClauseAlignment; + llvm::APInt Alignment(ClauseAlignment); if (Alignment == 0) { // OpenMP [2.8.1, Description] // If no optional parameter is specified, implementation-defined default @@ -1478,12 +1478,13 @@ static void emitAlignedClause(CodeGenFunction &CGF, E->getType()->getPointeeType())) .getQuantity(); } - assert((Alignment == 0 || llvm::isPowerOf2_32(Alignment)) && + assert((Alignment == 0 || Alignment.isPowerOf2()) && "alignment is not power of 2"); if (Alignment != 0) { llvm::Value *PtrValue = CGF.EmitScalarExpr(E); CGF.EmitAlignmentAssumption( - PtrValue, E, /*No second loc needed*/ SourceLocation(), Alignment); + PtrValue, E, /*No second loc needed*/ SourceLocation(), + llvm::ConstantInt::get(CGF.getLLVMContext(), Alignment)); } } } Modified: head/contrib/llvm-project/clang/lib/CodeGen/CodeGenFunction.cpp ============================================================================== --- head/contrib/llvm-project/clang/lib/CodeGen/CodeGenFunction.cpp Fri Mar 6 16:52:20 2020 (r358710) +++ head/contrib/llvm-project/clang/lib/CodeGen/CodeGenFunction.cpp Fri Mar 6 17:02:14 2020 (r358711) @@ -2048,24 +2048,9 @@ void CodeGenFunction::EmitAlignmentAssumption(llvm::Va } void CodeGenFunction::EmitAlignmentAssumption(llvm::Value *PtrValue, - QualType Ty, SourceLocation Loc, - SourceLocation AssumptionLoc, - unsigned Alignment, - llvm::Value *OffsetValue) { - llvm::Value *TheCheck; - llvm::Instruction *Assumption = Builder.CreateAlignmentAssumption( - CGM.getDataLayout(), PtrValue, Alignment, OffsetValue, &TheCheck); - if (SanOpts.has(SanitizerKind::Alignment)) { - llvm::Value *AlignmentVal = llvm::ConstantInt::get(IntPtrTy, Alignment); - EmitAlignmentAssumptionCheck(PtrValue, Ty, Loc, AssumptionLoc, AlignmentVal, - OffsetValue, TheCheck, Assumption); - } -} - -void CodeGenFunction::EmitAlignmentAssumption(llvm::Value *PtrValue, const Expr *E, SourceLocation AssumptionLoc, - unsigned Alignment, + llvm::Value *Alignment, llvm::Value *OffsetValue) { if (auto *CE = dyn_cast(E)) E = CE->getSubExprAsWritten(); Modified: head/contrib/llvm-project/clang/lib/CodeGen/CodeGenFunction.h ============================================================================== --- head/contrib/llvm-project/clang/lib/CodeGen/CodeGenFunction.h Fri Mar 6 16:52:20 2020 (r358710) +++ head/contrib/llvm-project/clang/lib/CodeGen/CodeGenFunction.h Fri Mar 6 17:02:14 2020 (r358711) @@ -2829,13 +2829,8 @@ class CodeGenFunction : public CodeGenTypeCache { (pub llvm::Value *Alignment, llvm::Value *OffsetValue = nullptr); - void EmitAlignmentAssumption(llvm::Value *PtrValue, QualType Ty, - SourceLocation Loc, SourceLocation AssumptionLoc, - unsigned Alignment, - llvm::Value *OffsetValue = nullptr); - void EmitAlignmentAssumption(llvm::Value *PtrValue, const Expr *E, - SourceLocation AssumptionLoc, unsigned Alignment, + SourceLocation AssumptionLoc, llvm::Value *Alignment, llvm::Value *OffsetValue = nullptr); //===--------------------------------------------------------------------===// Modified: head/contrib/llvm-project/clang/lib/Sema/SemaChecking.cpp ============================================================================== --- head/contrib/llvm-project/clang/lib/Sema/SemaChecking.cpp Fri Mar 6 16:52:20 2020 (r358710) +++ head/contrib/llvm-project/clang/lib/Sema/SemaChecking.cpp Fri Mar 6 17:02:14 2020 (r358711) @@ -5961,6 +5961,12 @@ bool Sema::SemaBuiltinAssumeAligned(CallExpr *TheCall) if (!Result.isPowerOf2()) return Diag(TheCall->getBeginLoc(), diag::err_alignment_not_power_of_two) << Arg->getSourceRange(); + + // Alignment calculations can wrap around if it's greater than 2**29. + unsigned MaximumAlignment = 536870912; + if (Result > MaximumAlignment) + Diag(TheCall->getBeginLoc(), diag::warn_assume_aligned_too_great) + << Arg->getSourceRange() << MaximumAlignment; } if (NumArgs > 2) { From owner-svn-src-all@freebsd.org Fri Mar 6 17:24:52 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 6CE8526CC7C; Fri, 6 Mar 2020 17:24:52 +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 48Yvd01Y2wz4NXn; Fri, 6 Mar 2020 17:24:52 +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 D8285238CF; Fri, 6 Mar 2020 17:24:51 +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 026HOpAL021598; Fri, 6 Mar 2020 17:24:51 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 026HOp0x021597; Fri, 6 Mar 2020 17:24:51 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <202003061724.026HOp0x021597@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Fri, 6 Mar 2020 17:24:51 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r358713 - head/contrib/elftoolchain/readelf X-SVN-Group: head X-SVN-Commit-Author: emaste X-SVN-Commit-Paths: head/contrib/elftoolchain/readelf X-SVN-Commit-Revision: 358713 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages 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, 06 Mar 2020 17:24:52 -0000 Author: emaste Date: Fri Mar 6 17:24:51 2020 New Revision: 358713 URL: https://svnweb.freebsd.org/changeset/base/358713 Log: readelf: print GNU Build-ID Sponsored by: The FreeBSD Foundation Modified: head/contrib/elftoolchain/readelf/readelf.c Modified: head/contrib/elftoolchain/readelf/readelf.c ============================================================================== --- head/contrib/elftoolchain/readelf/readelf.c Fri Mar 6 17:11:29 2020 (r358712) +++ head/contrib/elftoolchain/readelf/readelf.c Fri Mar 6 17:24:51 2020 (r358713) @@ -3742,6 +3742,12 @@ dump_notes_data(struct readelf *re, const char *name, case NT_GNU_PROPERTY_TYPE_0: dump_gnu_property_type_0(re, buf, sz); return; + case NT_GNU_BUILD_ID: + printf(" Build ID: "); + for (i = 0; i < sz; i++) + printf("%02x", (unsigned char)buf[i]); + printf("\n"); + return; } } else if (strcmp(name, "Xen") == 0) { switch (type) { From owner-svn-src-all@freebsd.org Fri Mar 6 18:41:39 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id B5A4E26E434; Fri, 6 Mar 2020 18:41:39 +0000 (UTC) (envelope-from chs@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 48YxKb39L0z4J3F; Fri, 6 Mar 2020 18:41:39 +0000 (UTC) (envelope-from chs@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 5B7E524753; Fri, 6 Mar 2020 18:41:39 +0000 (UTC) (envelope-from chs@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 026Ifdju068329; Fri, 6 Mar 2020 18:41:39 GMT (envelope-from chs@FreeBSD.org) Received: (from chs@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 026IfbhP068321; Fri, 6 Mar 2020 18:41:37 GMT (envelope-from chs@FreeBSD.org) Message-Id: <202003061841.026IfbhP068321@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: chs set sender to chs@FreeBSD.org using -f From: Chuck Silvers Date: Fri, 6 Mar 2020 18:41:37 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r358714 - in head/sys: conf fs/mntfs kern sys ufs/ffs ufs/ufs X-SVN-Group: head X-SVN-Commit-Author: chs X-SVN-Commit-Paths: in head/sys: conf fs/mntfs kern sys ufs/ffs ufs/ufs X-SVN-Commit-Revision: 358714 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages 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, 06 Mar 2020 18:41:39 -0000 Author: chs Date: Fri Mar 6 18:41:37 2020 New Revision: 358714 URL: https://svnweb.freebsd.org/changeset/base/358714 Log: Add a new "mntfs" pseudo file system which provides private device vnodes for file systems to safely access their disk devices, and adapt FFS to use it. Also add a new BO_NOBUFS flag to allow enforcing that file systems using mntfs vnodes do not accidentally use the original devfs vnode to create buffers. Reviewed by: kib, mckusick Approved by: imp (mentor) Sponsored by: Netflix Differential Revision: https://reviews.freebsd.org/D23787 Added: head/sys/fs/mntfs/ head/sys/fs/mntfs/mntfs_vnops.c (contents, props changed) Modified: head/sys/conf/files head/sys/kern/vfs_subr.c head/sys/sys/bufobj.h head/sys/sys/mount.h head/sys/ufs/ffs/ffs_alloc.c head/sys/ufs/ffs/ffs_vfsops.c head/sys/ufs/ufs/ufsmount.h Modified: head/sys/conf/files ============================================================================== --- head/sys/conf/files Fri Mar 6 17:24:51 2020 (r358713) +++ head/sys/conf/files Fri Mar 6 18:41:37 2020 (r358714) @@ -3479,6 +3479,7 @@ fs/fuse/fuse_main.c optional fusefs fs/fuse/fuse_node.c optional fusefs fs/fuse/fuse_vfsops.c optional fusefs fs/fuse/fuse_vnops.c optional fusefs +fs/mntfs/mntfs_vnops.c standard fs/msdosfs/msdosfs_conv.c optional msdosfs fs/msdosfs/msdosfs_denode.c optional msdosfs fs/msdosfs/msdosfs_fat.c optional msdosfs Added: head/sys/fs/mntfs/mntfs_vnops.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/fs/mntfs/mntfs_vnops.c Fri Mar 6 18:41:37 2020 (r358714) @@ -0,0 +1,95 @@ +/*- + * SPDX-License-Identifier: BSD-2-Clause-FreeBSD + * + * Copyright (c) 2020 Netflix, Inc. + * + * 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 AUTHORS ``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 AUTHORS 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$ + */ + +#include +#include +#include +#include + +/* + * The "mntfs" VCHR vnodes implemented here provide a safe way for file systems + * to access their disk devices. Using the normal devfs vnode has the problem + * that if the device disappears, the devfs vnode is vgone'd as part of + * removing it from the application-visible namespace, and some file systems + * (notably FFS with softdep) get very unhappy if their dirty buffers are + * invalidated out from under them. By using a separate, private vnode, + * file systems are able to clean up their buffer state in a controlled fashion + * when the underlying device disappears. + */ + +static int +mntfs_reclaim(struct vop_reclaim_args *ap) +{ + struct vnode *vp = ap->a_vp; + + dev_rel(vp->v_rdev); + return (0); +} + +struct vop_vector mntfs_vnodeops = { + .vop_default = &default_vnodeops, + + .vop_fsync = vop_stdfsync, + .vop_strategy = VOP_PANIC, + .vop_reclaim = mntfs_reclaim, +}; +VFS_VOP_VECTOR_REGISTER(mntfs_vnodeops); + +/* + * Allocate a private VCHR vnode for use by a mounted fs. + * The underlying device will be the same as for the given vnode. + * This mntfs vnode must be freed with mntfs_freevp() rather than just + * releasing the reference. + */ +struct vnode * +mntfs_allocvp(struct mount *mp, struct vnode *ovp) +{ + struct vnode *vp; + struct cdev *dev; + + ASSERT_VOP_ELOCKED(ovp, __func__); + + dev = ovp->v_rdev; + + getnewvnode("mntfs", mp, &mntfs_vnodeops, &vp); + vp->v_type = VCHR; + vp->v_data = NULL; + dev_ref(dev); + vp->v_rdev = dev; + + return (vp); +} + +void +mntfs_freevp(struct vnode *vp) +{ + + vgone(vp); + vrele(vp); +} Modified: head/sys/kern/vfs_subr.c ============================================================================== --- head/sys/kern/vfs_subr.c Fri Mar 6 17:24:51 2020 (r358713) +++ head/sys/kern/vfs_subr.c Fri Mar 6 18:41:37 2020 (r358714) @@ -2289,6 +2289,8 @@ buf_vlist_add(struct buf *bp, struct bufobj *bo, b_xfl int error; ASSERT_BO_WLOCKED(bo); + KASSERT((bo->bo_flag & BO_NOBUFS) == 0, + ("buf_vlist_add: bo %p does not allow bufs", bo)); KASSERT((xflags & BX_VNDIRTY) == 0 || (bo->bo_flag & BO_DEAD) == 0, ("dead bo %p", bo)); KASSERT((bp->b_xflags & (BX_VNDIRTY|BX_VNCLEAN)) == 0, Modified: head/sys/sys/bufobj.h ============================================================================== --- head/sys/sys/bufobj.h Fri Mar 6 17:24:51 2020 (r358713) +++ head/sys/sys/bufobj.h Fri Mar 6 18:41:37 2020 (r358714) @@ -117,6 +117,7 @@ struct bufobj { #define BO_ONWORKLST (1 << 0) /* On syncer work-list */ #define BO_WWAIT (1 << 1) /* Wait for output to complete */ #define BO_DEAD (1 << 2) /* Dead; only with INVARIANTS */ +#define BO_NOBUFS (1 << 3) /* No bufs allowed */ #define BO_LOCKPTR(bo) (&(bo)->bo_lock) #define BO_LOCK(bo) rw_wlock(BO_LOCKPTR((bo))) Modified: head/sys/sys/mount.h ============================================================================== --- head/sys/sys/mount.h Fri Mar 6 17:24:51 2020 (r358713) +++ head/sys/sys/mount.h Fri Mar 6 18:41:37 2020 (r358714) @@ -940,6 +940,8 @@ extern struct sx vfsconf_sx; #define vfsconf_unlock() sx_xunlock(&vfsconf_sx) #define vfsconf_slock() sx_slock(&vfsconf_sx) #define vfsconf_sunlock() sx_sunlock(&vfsconf_sx) +struct vnode *mntfs_allocvp(struct mount *, struct vnode *); +void mntfs_freevp(struct vnode *); /* * Declarations for these vfs default operations are located in Modified: head/sys/ufs/ffs/ffs_alloc.c ============================================================================== --- head/sys/ufs/ffs/ffs_alloc.c Fri Mar 6 17:24:51 2020 (r358713) +++ head/sys/ufs/ffs/ffs_alloc.c Fri Mar 6 18:41:37 2020 (r358714) @@ -3594,6 +3594,7 @@ buffered_write(fp, uio, active_cred, flags, td) struct inode *ip; struct buf *bp; struct fs *fs; + struct ufsmount *ump; struct filedesc *fdp; int error; daddr_t lbn; @@ -3622,10 +3623,12 @@ buffered_write(fp, uio, active_cred, flags, td) return (EINVAL); } ip = VTOI(vp); - if (ITODEVVP(ip) != devvp) { + ump = ip->i_ump; + if (ump->um_odevvp != devvp) { vput(vp); return (EINVAL); } + devvp = ump->um_devvp; fs = ITOFS(ip); vput(vp); foffset_lock_uio(fp, uio, flags); Modified: head/sys/ufs/ffs/ffs_vfsops.c ============================================================================== --- head/sys/ufs/ffs/ffs_vfsops.c Fri Mar 6 17:24:51 2020 (r358713) +++ head/sys/ufs/ffs/ffs_vfsops.c Fri Mar 6 18:41:37 2020 (r358714) @@ -151,7 +151,7 @@ static const char *ffs_opts[] = { "acls", "async", "no static int ffs_mount(struct mount *mp) { - struct vnode *devvp; + struct vnode *devvp, *odevvp; struct thread *td; struct ufsmount *ump = NULL; struct fs *fs; @@ -246,6 +246,7 @@ ffs_mount(struct mount *mp) if (mp->mnt_flag & MNT_UPDATE) { ump = VFSTOUFS(mp); fs = ump->um_fs; + odevvp = ump->um_odevvp; devvp = ump->um_devvp; if (fsckpid == -1 && ump->um_fsckpid > 0) { if ((error = ffs_flushfiles(mp, WRITECLOSE, td)) != 0 || @@ -337,16 +338,15 @@ ffs_mount(struct mount *mp) * If upgrade to read-write by non-root, then verify * that user has necessary permissions on the device. */ - vn_lock(devvp, LK_EXCLUSIVE | LK_RETRY); - error = VOP_ACCESS(devvp, VREAD | VWRITE, + vn_lock(odevvp, LK_EXCLUSIVE | LK_RETRY); + error = VOP_ACCESS(odevvp, VREAD | VWRITE, td->td_ucred, td); if (error) error = priv_check(td, PRIV_VFS_MOUNT_PERM); + VOP_UNLOCK(odevvp); if (error) { - VOP_UNLOCK(devvp); return (error); } - VOP_UNLOCK(devvp); fs->fs_flags &= ~FS_UNCLEAN; if (fs->fs_clean == 0) { fs->fs_flags |= FS_UNCLEAN; @@ -782,8 +782,8 @@ loop: * Common code for mount and mountroot */ static int -ffs_mountfs(devvp, mp, td) - struct vnode *devvp; +ffs_mountfs(odevvp, mp, td) + struct vnode *odevvp; struct mount *mp; struct thread *td; { @@ -794,6 +794,7 @@ ffs_mountfs(devvp, mp, td) struct ucred *cred; struct g_consumer *cp; struct mount *nmp; + struct vnode *devvp; int candelete, canspeedup; off_t loc; @@ -802,11 +803,13 @@ ffs_mountfs(devvp, mp, td) cred = td ? td->td_ucred : NOCRED; ronly = (mp->mnt_flag & MNT_RDONLY) != 0; + devvp = mntfs_allocvp(mp, odevvp); + VOP_UNLOCK(odevvp); KASSERT(devvp->v_type == VCHR, ("reclaimed devvp")); dev = devvp->v_rdev; if (atomic_cmpset_acq_ptr((uintptr_t *)&dev->si_mountpt, 0, (uintptr_t)mp) == 0) { - VOP_UNLOCK(devvp); + mntfs_freevp(devvp); return (EBUSY); } g_topology_lock(); @@ -814,12 +817,14 @@ ffs_mountfs(devvp, mp, td) g_topology_unlock(); if (error != 0) { atomic_store_rel_ptr((uintptr_t *)&dev->si_mountpt, 0); - VOP_UNLOCK(devvp); + mntfs_freevp(devvp); return (error); } dev_ref(dev); devvp->v_bufobj.bo_ops = &ffs_ops; - VOP_UNLOCK(devvp); + BO_LOCK(&odevvp->v_bufobj); + odevvp->v_bufobj.bo_flag |= BO_NOBUFS; + BO_UNLOCK(&odevvp->v_bufobj); if (dev->si_iosize_max != 0) mp->mnt_iosize_max = dev->si_iosize_max; if (mp->mnt_iosize_max > MAXPHYS) @@ -1020,6 +1025,7 @@ ffs_mountfs(devvp, mp, td) ump->um_mountp = mp; ump->um_dev = dev; ump->um_devvp = devvp; + ump->um_odevvp = odevvp; ump->um_nindir = fs->fs_nindir; ump->um_bptrtodb = fs->fs_fsbtodb; ump->um_seqinc = fs->fs_frag; @@ -1099,7 +1105,11 @@ out: free(ump, M_UFSMNT); mp->mnt_data = NULL; } + BO_LOCK(&odevvp->v_bufobj); + odevvp->v_bufobj.bo_flag &= ~BO_NOBUFS; + BO_UNLOCK(&odevvp->v_bufobj); atomic_store_rel_ptr((uintptr_t *)&dev->si_mountpt, 0); + mntfs_freevp(devvp); dev_rel(dev); return (error); } @@ -1304,8 +1314,12 @@ ffs_unmount(mp, mntflags) } g_vfs_close(ump->um_cp); g_topology_unlock(); + BO_LOCK(&ump->um_odevvp->v_bufobj); + ump->um_odevvp->v_bufobj.bo_flag &= ~BO_NOBUFS; + BO_UNLOCK(&ump->um_odevvp->v_bufobj); atomic_store_rel_ptr((uintptr_t *)&ump->um_dev->si_mountpt, 0); - vrele(ump->um_devvp); + mntfs_freevp(ump->um_devvp); + vrele(ump->um_odevvp); dev_rel(ump->um_dev); mtx_destroy(UFS_MTX(ump)); if (mp->mnt_gjprovider != NULL) { @@ -2293,7 +2307,19 @@ ffs_geom_strategy(struct bufobj *bo, struct buf *bp) struct buf *tbp; int error, nocopy; + /* + * This is the bufobj strategy for the private VCHR vnodes + * used by FFS to access the underlying storage device. + * We override the default bufobj strategy and thus bypass + * VOP_STRATEGY() for these vnodes. + */ vp = bo2vnode(bo); + KASSERT(bp->b_vp == NULL || bp->b_vp->v_type != VCHR || + bp->b_vp->v_rdev == NULL || + bp->b_vp->v_rdev->si_mountpt == NULL || + VFSTOUFS(bp->b_vp->v_rdev->si_mountpt) == NULL || + vp == VFSTOUFS(bp->b_vp->v_rdev->si_mountpt)->um_devvp, + ("ffs_geom_strategy() with wrong vp")); if (bp->b_iocmd == BIO_WRITE) { if ((bp->b_flags & B_VALIDSUSPWRT) == 0 && bp->b_vp != NULL && bp->b_vp->v_mount != NULL && Modified: head/sys/ufs/ufs/ufsmount.h ============================================================================== --- head/sys/ufs/ufs/ufsmount.h Fri Mar 6 17:24:51 2020 (r358713) +++ head/sys/ufs/ufs/ufsmount.h Fri Mar 6 18:41:37 2020 (r358714) @@ -83,7 +83,8 @@ struct ufsmount { struct cdev *um_dev; /* (r) device mounted */ struct g_consumer *um_cp; /* (r) GEOM access point */ struct bufobj *um_bo; /* (r) Buffer cache object */ - struct vnode *um_devvp; /* (r) blk dev mounted vnode */ + struct vnode *um_odevvp; /* (r) devfs dev vnode */ + struct vnode *um_devvp; /* (r) mntfs private vnode */ u_long um_fstype; /* (c) type of filesystem */ struct fs *um_fs; /* (r) pointer to superblock */ struct ufs_extattr_per_mount um_extattr; /* (c) extended attrs */ From owner-svn-src-all@freebsd.org Fri Mar 6 19:09:03 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 92B4526ECBD; Fri, 6 Mar 2020 19:09:03 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 48YxxC1pvWz4GD4; Fri, 6 Mar 2020 19:09:03 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id DF01C24B8C; Fri, 6 Mar 2020 19:09:02 +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 026J92jJ084719; Fri, 6 Mar 2020 19:09:02 GMT (envelope-from markj@FreeBSD.org) Received: (from markj@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 026J91qp084715; Fri, 6 Mar 2020 19:09:01 GMT (envelope-from markj@FreeBSD.org) Message-Id: <202003061909.026J91qp084715@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: markj set sender to markj@FreeBSD.org using -f From: Mark Johnston Date: Fri, 6 Mar 2020 19:09:01 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r358715 - in head: share/man/man9 sys/kern sys/sys X-SVN-Group: head X-SVN-Commit-Author: markj X-SVN-Commit-Paths: in head: share/man/man9 sys/kern sys/sys X-SVN-Commit-Revision: 358715 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages 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, 06 Mar 2020 19:09:03 -0000 Author: markj Date: Fri Mar 6 19:09:01 2020 New Revision: 358715 URL: https://svnweb.freebsd.org/changeset/base/358715 Log: Add COUNTER_U64_SYSINIT() and COUNTER_U64_DEFINE_EARLY(). The aim is to reduce the boilerplate needed today to define and initialize global counters. Also add SI_SUB_COUNTER to the sysinit ordering. Reviewed by: kib MFC after: 1 week Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D23977 Modified: head/share/man/man9/counter.9 head/sys/kern/subr_counter.c head/sys/kern/subr_pcpu.c head/sys/sys/counter.h head/sys/sys/kernel.h Modified: head/share/man/man9/counter.9 ============================================================================== --- head/share/man/man9/counter.9 Fri Mar 6 18:41:37 2020 (r358714) +++ head/share/man/man9/counter.9 Fri Mar 6 19:09:01 2020 (r358715) @@ -25,7 +25,7 @@ .\" .\" $FreeBSD$ .\" -.Dd March 22, 2017 +.Dd March 6, 2020 .Dt COUNTER 9 .Os .Sh NAME @@ -53,6 +53,8 @@ .Fn counter_u64_zero "counter_u64_t c" .Ft int64_t .Fn counter_ratecheck "struct counter_rate *cr" "int64_t limit" +.Fn COUNTER_U64_SYSINIT "counter_u64_t c" +.Fn COUNTER_U64_DEFINE_EARLY "counter_u64_t c" .In sys/sysctl.h .Fn SYSCTL_COUNTER_U64 parent nbr name access ptr descr .Fn SYSCTL_ADD_COUNTER_U64 ctx parent nbr name access ptr descr @@ -142,6 +144,20 @@ If the limit was reached on previous second, but was j then .Fn counter_ratecheck returns number of events since previous reset. +.It Fn COUNTER_U64_SYSINIT c +Define a +.Xr SYSINIT 9 +initializer for the global counter +.Fa c . +.It Fn COUNTER_U64_DEFINE_EARLY c +Define and initialize a global counter +.Fa c . +It is always safe to increment +.Fa c , +though updates prior to the +.Dv SI_SUB_COUNTER +.Xr SYSINIT 9 +event are lost. .It Fn SYSCTL_COUNTER_U64 parent nbr name access ptr descr Declare a static .Xr sysctl 9 @@ -245,6 +261,7 @@ SYSCTL_COUNTER_U64_ARRAY(_debug, OID_AUTO, counter_arr .Xr malloc 9 , .Xr ratecheck 9 , .Xr sysctl 9 , +.Xr SYSINIT 9 , .Xr uma 9 .Sh HISTORY The Modified: head/sys/kern/subr_counter.c ============================================================================== --- head/sys/kern/subr_counter.c Fri Mar 6 18:41:37 2020 (r358714) +++ head/sys/kern/subr_counter.c Fri Mar 6 19:09:01 2020 (r358715) @@ -172,3 +172,21 @@ counter_ratecheck(struct counter_rate *cr, int64_t lim return (val); } + +void +counter_u64_sysinit(void *arg) +{ + counter_u64_t *cp; + + cp = arg; + *cp = counter_u64_alloc(M_WAITOK); +} + +void +counter_u64_sysuninit(void *arg) +{ + counter_u64_t *cp; + + cp = arg; + counter_u64_free(*cp); +} Modified: head/sys/kern/subr_pcpu.c ============================================================================== --- head/sys/kern/subr_pcpu.c Fri Mar 6 18:41:37 2020 (r358714) +++ head/sys/kern/subr_pcpu.c Fri Mar 6 19:09:01 2020 (r358715) @@ -148,7 +148,7 @@ pcpu_zones_startup(void) pcpu_zone_64 = uma_zcreate("64 pcpu", sizeof(uint64_t), NULL, NULL, NULL, NULL, UMA_ALIGN_PTR, UMA_ZONE_PCPU); } -SYSINIT(pcpu_zones, SI_SUB_VM, SI_ORDER_ANY, pcpu_zones_startup, NULL); +SYSINIT(pcpu_zones, SI_SUB_COUNTER, SI_ORDER_FIRST, pcpu_zones_startup, NULL); /* * First-fit extent based allocator for allocating space in the per-cpu Modified: head/sys/sys/counter.h ============================================================================== --- head/sys/sys/counter.h Fri Mar 6 18:41:37 2020 (r358714) +++ head/sys/sys/counter.h Fri Mar 6 19:09:01 2020 (r358715) @@ -74,5 +74,18 @@ struct counter_rate { int64_t counter_ratecheck(struct counter_rate *, int64_t); +#define COUNTER_U64_SYSINIT(c) \ + SYSINIT(c##_counter_sysinit, SI_SUB_COUNTER, \ + SI_ORDER_ANY, counter_u64_sysinit, &c); \ + SYSUNINIT(c##_counter_sysuninit, SI_SUB_COUNTER, \ + SI_ORDER_ANY, counter_u64_sysuninit, &c) + +#define COUNTER_U64_DEFINE_EARLY(c) \ + counter_u64_t __read_mostly c = EARLY_COUNTER; \ + COUNTER_U64_SYSINIT(c) + +void counter_u64_sysinit(void *); +void counter_u64_sysuninit(void *); + #endif /* _KERNEL */ #endif /* ! __SYS_COUNTER_H__ */ Modified: head/sys/sys/kernel.h ============================================================================== --- head/sys/sys/kernel.h Fri Mar 6 18:41:37 2020 (r358714) +++ head/sys/sys/kernel.h Fri Mar 6 19:09:01 2020 (r358715) @@ -91,7 +91,8 @@ enum sysinit_sub_id { SI_SUB_DONE = 0x0000001, /* processed*/ SI_SUB_TUNABLES = 0x0700000, /* establish tunable values */ SI_SUB_COPYRIGHT = 0x0800001, /* first use of console*/ - SI_SUB_VM = 0x1000000, /* virtual memory system init*/ + SI_SUB_VM = 0x1000000, /* virtual memory system init */ + SI_SUB_COUNTER = 0x1100000, /* counter(9) is initialized */ SI_SUB_KMEM = 0x1800000, /* kernel memory*/ SI_SUB_HYPERVISOR = 0x1A40000, /* * Hypervisor detection and From owner-svn-src-all@freebsd.org Fri Mar 6 19:10:03 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 79C2F26ED3E; Fri, 6 Mar 2020 19:10:03 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 48YxyL1f2Kz4J6M; Fri, 6 Mar 2020 19:10:02 +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 E6A9024BA1; Fri, 6 Mar 2020 19:10:01 +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 026JA1RP084847; Fri, 6 Mar 2020 19:10:01 GMT (envelope-from markj@FreeBSD.org) Received: (from markj@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 026JA0J4084842; Fri, 6 Mar 2020 19:10:00 GMT (envelope-from markj@FreeBSD.org) Message-Id: <202003061910.026JA0J4084842@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: markj set sender to markj@FreeBSD.org using -f From: Mark Johnston Date: Fri, 6 Mar 2020 19:10:00 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r358716 - in head/sys: kern vm X-SVN-Group: head X-SVN-Commit-Author: markj X-SVN-Commit-Paths: in head/sys: kern vm X-SVN-Commit-Revision: 358716 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages 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, 06 Mar 2020 19:10:03 -0000 Author: markj Date: Fri Mar 6 19:10:00 2020 New Revision: 358716 URL: https://svnweb.freebsd.org/changeset/base/358716 Log: Use COUNTER_U64_DEFINE_EARLY() in places where it simplifies things. Reviewed by: kib Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D23978 Modified: head/sys/kern/subr_smr.c head/sys/kern/vfs_cache.c head/sys/vm/swap_pager.c head/sys/vm/vm_object.c head/sys/vm/vm_page.c head/sys/vm/vm_reserv.c Modified: head/sys/kern/subr_smr.c ============================================================================== --- head/sys/kern/subr_smr.c Fri Mar 6 19:09:01 2020 (r358715) +++ head/sys/kern/subr_smr.c Fri Mar 6 19:10:00 2020 (r358716) @@ -198,15 +198,15 @@ static uma_zone_t smr_zone; static SYSCTL_NODE(_debug, OID_AUTO, smr, CTLFLAG_RW | CTLFLAG_MPSAFE, NULL, "SMR Stats"); -static counter_u64_t advance = EARLY_COUNTER; +static COUNTER_U64_DEFINE_EARLY(advance); SYSCTL_COUNTER_U64(_debug_smr, OID_AUTO, advance, CTLFLAG_RW, &advance, ""); -static counter_u64_t advance_wait = EARLY_COUNTER; +static COUNTER_U64_DEFINE_EARLY(advance_wait); SYSCTL_COUNTER_U64(_debug_smr, OID_AUTO, advance_wait, CTLFLAG_RW, &advance_wait, ""); -static counter_u64_t poll = EARLY_COUNTER; +static COUNTER_U64_DEFINE_EARLY(poll); SYSCTL_COUNTER_U64(_debug_smr, OID_AUTO, poll, CTLFLAG_RW, &poll, ""); -static counter_u64_t poll_scan = EARLY_COUNTER; +static COUNTER_U64_DEFINE_EARLY(poll_scan); SYSCTL_COUNTER_U64(_debug_smr, OID_AUTO, poll_scan, CTLFLAG_RW, &poll_scan, ""); -static counter_u64_t poll_fail = EARLY_COUNTER; +static COUNTER_U64_DEFINE_EARLY(poll_fail); SYSCTL_COUNTER_U64(_debug_smr, OID_AUTO, poll_fail, CTLFLAG_RW, &poll_fail, ""); /* @@ -631,15 +631,3 @@ smr_init(void) smr_zone = uma_zcreate("SMR CPU", sizeof(struct smr), NULL, NULL, NULL, NULL, (CACHE_LINE_SIZE * 2) - 1, UMA_ZONE_PCPU); } - -static void -smr_init_counters(void *unused) -{ - - advance = counter_u64_alloc(M_WAITOK); - advance_wait = counter_u64_alloc(M_WAITOK); - poll = counter_u64_alloc(M_WAITOK); - poll_scan = counter_u64_alloc(M_WAITOK); - poll_fail = counter_u64_alloc(M_WAITOK); -} -SYSINIT(smr_counters, SI_SUB_CPU, SI_ORDER_ANY, smr_init_counters, NULL); Modified: head/sys/kern/vfs_cache.c ============================================================================== --- head/sys/kern/vfs_cache.c Fri Mar 6 19:09:01 2020 (r358715) +++ head/sys/kern/vfs_cache.c Fri Mar 6 19:10:00 2020 (r358716) @@ -345,11 +345,12 @@ SYSCTL_INT(_debug_sizeof, OID_AUTO, namecache, CTLFLAG */ static SYSCTL_NODE(_vfs, OID_AUTO, cache, CTLFLAG_RW | CTLFLAG_MPSAFE, 0, "Name cache statistics"); -#define STATNODE_ULONG(name, descr) \ +#define STATNODE_ULONG(name, descr) \ SYSCTL_ULONG(_vfs_cache, OID_AUTO, name, CTLFLAG_RD, &name, 0, descr); -#define STATNODE_COUNTER(name, descr) \ - static counter_u64_t __read_mostly name; \ - SYSCTL_COUNTER_U64(_vfs_cache, OID_AUTO, name, CTLFLAG_RD, &name, descr); +#define STATNODE_COUNTER(name, descr) \ + static COUNTER_U64_DEFINE_EARLY(name); \ + SYSCTL_COUNTER_U64(_vfs_cache, OID_AUTO, name, CTLFLAG_RD, &name, \ + descr); STATNODE_ULONG(numneg, "Number of negative cache entries"); STATNODE_ULONG(numcache, "Number of cache entries"); STATNODE_COUNTER(numcachehv, "Number of namecache entries with vnodes held"); @@ -1936,26 +1937,6 @@ nchinit(void *dummy __unused) TAILQ_INIT(&ncneg_hot.nl_list); mtx_init(&ncneg_shrink_lock, "ncnegs", NULL, MTX_DEF); - - numcachehv = counter_u64_alloc(M_WAITOK); - numcalls = counter_u64_alloc(M_WAITOK); - dothits = counter_u64_alloc(M_WAITOK); - dotdothits = counter_u64_alloc(M_WAITOK); - numchecks = counter_u64_alloc(M_WAITOK); - nummiss = counter_u64_alloc(M_WAITOK); - nummisszap = counter_u64_alloc(M_WAITOK); - numposzaps = counter_u64_alloc(M_WAITOK); - numposhits = counter_u64_alloc(M_WAITOK); - numnegzaps = counter_u64_alloc(M_WAITOK); - numneghits = counter_u64_alloc(M_WAITOK); - numfullpathcalls = counter_u64_alloc(M_WAITOK); - numfullpathfail1 = counter_u64_alloc(M_WAITOK); - numfullpathfail2 = counter_u64_alloc(M_WAITOK); - numfullpathfail4 = counter_u64_alloc(M_WAITOK); - numfullpathfound = counter_u64_alloc(M_WAITOK); - zap_and_exit_bucket_relock_success = counter_u64_alloc(M_WAITOK); - numneg_evicted = counter_u64_alloc(M_WAITOK); - shrinking_skipped = counter_u64_alloc(M_WAITOK); } SYSINIT(vfs, SI_SUB_VFS, SI_ORDER_SECOND, nchinit, NULL); Modified: head/sys/vm/swap_pager.c ============================================================================== --- head/sys/vm/swap_pager.c Fri Mar 6 19:09:01 2020 (r358715) +++ head/sys/vm/swap_pager.c Fri Mar 6 19:10:00 2020 (r358716) @@ -177,12 +177,12 @@ static unsigned long swap_maxpages; SYSCTL_ULONG(_vm, OID_AUTO, swap_maxpages, CTLFLAG_RD, &swap_maxpages, 0, "Maximum amount of swap supported"); -static counter_u64_t swap_free_deferred; +static COUNTER_U64_DEFINE_EARLY(swap_free_deferred); SYSCTL_COUNTER_U64(_vm_stats_swap, OID_AUTO, free_deferred, CTLFLAG_RD, &swap_free_deferred, "Number of pages that deferred freeing swap space"); -static counter_u64_t swap_free_completed; +static COUNTER_U64_DEFINE_EARLY(swap_free_completed); SYSCTL_COUNTER_U64(_vm_stats_swap, OID_AUTO, free_completed, CTLFLAG_RD, &swap_free_completed, "Number of deferred frees completed"); @@ -526,15 +526,6 @@ swap_pager_init(void) sx_init(&sw_alloc_sx, "swspsx"); sx_init(&swdev_syscall_lock, "swsysc"); } - -static void -swap_pager_counters(void) -{ - - swap_free_deferred = counter_u64_alloc(M_WAITOK); - swap_free_completed = counter_u64_alloc(M_WAITOK); -} -SYSINIT(swap_counters, SI_SUB_CPU, SI_ORDER_ANY, swap_pager_counters, NULL); /* * SWAP_PAGER_SWAP_INIT() - swap pager initialization from pageout process Modified: head/sys/vm/vm_object.c ============================================================================== --- head/sys/vm/vm_object.c Fri Mar 6 19:09:01 2020 (r358715) +++ head/sys/vm/vm_object.c Fri Mar 6 19:10:00 2020 (r358716) @@ -153,30 +153,20 @@ struct vm_object kernel_object_store; static SYSCTL_NODE(_vm_stats, OID_AUTO, object, CTLFLAG_RD | CTLFLAG_MPSAFE, 0, "VM object stats"); -static counter_u64_t object_collapses = EARLY_COUNTER; +static COUNTER_U64_DEFINE_EARLY(object_collapses); SYSCTL_COUNTER_U64(_vm_stats_object, OID_AUTO, collapses, CTLFLAG_RD, &object_collapses, "VM object collapses"); -static counter_u64_t object_bypasses = EARLY_COUNTER; +static COUNTER_U64_DEFINE_EARLY(object_bypasses); SYSCTL_COUNTER_U64(_vm_stats_object, OID_AUTO, bypasses, CTLFLAG_RD, &object_bypasses, "VM object bypasses"); -static counter_u64_t object_collapse_waits = EARLY_COUNTER; +static COUNTER_U64_DEFINE_EARLY(object_collapse_waits); SYSCTL_COUNTER_U64(_vm_stats_object, OID_AUTO, collapse_waits, CTLFLAG_RD, &object_collapse_waits, "Number of sleeps for collapse"); - -static void -counter_startup(void) -{ - - object_collapses = counter_u64_alloc(M_WAITOK); - object_bypasses = counter_u64_alloc(M_WAITOK); - object_collapse_waits = counter_u64_alloc(M_WAITOK); -} -SYSINIT(object_counters, SI_SUB_CPU, SI_ORDER_ANY, counter_startup, NULL); static uma_zone_t obj_zone; Modified: head/sys/vm/vm_page.c ============================================================================== --- head/sys/vm/vm_page.c Fri Mar 6 19:09:01 2020 (r358715) +++ head/sys/vm/vm_page.c Fri Mar 6 19:10:00 2020 (r358716) @@ -130,30 +130,20 @@ static int vm_pageproc_waiters; static SYSCTL_NODE(_vm_stats, OID_AUTO, page, CTLFLAG_RD | CTLFLAG_MPSAFE, 0, "VM page statistics"); -static counter_u64_t pqstate_commit_retries = EARLY_COUNTER; +static COUNTER_U64_DEFINE_EARLY(pqstate_commit_retries); SYSCTL_COUNTER_U64(_vm_stats_page, OID_AUTO, pqstate_commit_retries, CTLFLAG_RD, &pqstate_commit_retries, "Number of failed per-page atomic queue state updates"); -static counter_u64_t queue_ops = EARLY_COUNTER; +static COUNTER_U64_DEFINE_EARLY(queue_ops); SYSCTL_COUNTER_U64(_vm_stats_page, OID_AUTO, queue_ops, CTLFLAG_RD, &queue_ops, "Number of batched queue operations"); -static counter_u64_t queue_nops = EARLY_COUNTER; +static COUNTER_U64_DEFINE_EARLY(queue_nops); SYSCTL_COUNTER_U64(_vm_stats_page, OID_AUTO, queue_nops, CTLFLAG_RD, &queue_nops, "Number of batched queue operations with no effects"); - -static void -counter_startup(void) -{ - - pqstate_commit_retries = counter_u64_alloc(M_WAITOK); - queue_ops = counter_u64_alloc(M_WAITOK); - queue_nops = counter_u64_alloc(M_WAITOK); -} -SYSINIT(page_counters, SI_SUB_CPU, SI_ORDER_ANY, counter_startup, NULL); /* * bogus page -- for I/O to/from partially complete buffers, Modified: head/sys/vm/vm_reserv.c ============================================================================== --- head/sys/vm/vm_reserv.c Fri Mar 6 19:09:01 2020 (r358715) +++ head/sys/vm/vm_reserv.c Fri Mar 6 19:10:00 2020 (r358716) @@ -264,11 +264,11 @@ static struct vm_reserv_domain vm_rvd[MAXMEMDOM]; static SYSCTL_NODE(_vm, OID_AUTO, reserv, CTLFLAG_RD | CTLFLAG_MPSAFE, 0, "Reservation Info"); -static counter_u64_t vm_reserv_broken = EARLY_COUNTER; +static COUNTER_U64_DEFINE_EARLY(vm_reserv_broken); SYSCTL_COUNTER_U64(_vm_reserv, OID_AUTO, broken, CTLFLAG_RD, &vm_reserv_broken, "Cumulative number of broken reservations"); -static counter_u64_t vm_reserv_freed = EARLY_COUNTER; +static COUNTER_U64_DEFINE_EARLY(vm_reserv_freed); SYSCTL_COUNTER_U64(_vm_reserv, OID_AUTO, freed, CTLFLAG_RD, &vm_reserv_freed, "Cumulative number of freed reservations"); @@ -284,7 +284,7 @@ SYSCTL_OID(_vm_reserv, OID_AUTO, partpopq, sysctl_vm_reserv_partpopq, "A", "Partially populated reservation queues"); -static counter_u64_t vm_reserv_reclaimed = EARLY_COUNTER; +static COUNTER_U64_DEFINE_EARLY(vm_reserv_reclaimed); SYSCTL_COUNTER_U64(_vm_reserv, OID_AUTO, reclaimed, CTLFLAG_RD, &vm_reserv_reclaimed, "Cumulative number of reclaimed reservations"); @@ -1439,21 +1439,6 @@ vm_reserv_startup(vm_offset_t *vaddr, vm_paddr_t end) */ return (new_end); } - -/* - * Initializes the reservation management system. Specifically, initializes - * the reservation counters. - */ -static void -vm_reserv_counter_init(void *unused) -{ - - vm_reserv_freed = counter_u64_alloc(M_WAITOK); - vm_reserv_broken = counter_u64_alloc(M_WAITOK); - vm_reserv_reclaimed = counter_u64_alloc(M_WAITOK); -} -SYSINIT(vm_reserv_counter_init, SI_SUB_CPU, SI_ORDER_ANY, - vm_reserv_counter_init, NULL); /* * Returns the superpage containing the given page. From owner-svn-src-all@freebsd.org Fri Mar 6 19:56:14 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 142D926FBC3; Fri, 6 Mar 2020 19:56:14 +0000 (UTC) (envelope-from np@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 48Yyzd587Gz4LXC; Fri, 6 Mar 2020 19:56:13 +0000 (UTC) (envelope-from np@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 6E0CC25513; Fri, 6 Mar 2020 19:56:13 +0000 (UTC) (envelope-from np@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 026JuDCN014945; Fri, 6 Mar 2020 19:56:13 GMT (envelope-from np@FreeBSD.org) Received: (from np@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 026JuDe6014943; Fri, 6 Mar 2020 19:56:13 GMT (envelope-from np@FreeBSD.org) Message-Id: <202003061956.026JuDe6014943@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: np set sender to np@FreeBSD.org using -f From: Navdeep Parhar Date: Fri, 6 Mar 2020 19:56:13 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r358717 - head/sys/dev/cxgbe/tom X-SVN-Group: head X-SVN-Commit-Author: np X-SVN-Commit-Paths: head/sys/dev/cxgbe/tom X-SVN-Commit-Revision: 358717 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages 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, 06 Mar 2020 19:56:14 -0000 Author: np Date: Fri Mar 6 19:56:12 2020 New Revision: 358717 URL: https://svnweb.freebsd.org/changeset/base/358717 Log: cxgbe/t4_tom: Do not uninitialize a toepcb that has not been initialized. This fixes the following panic: --- trap 0xc, rip = 0xffffffff80c00411, rsp = 0xfffffe0025192840, rbp = 0xfffffe0025192860 --- vmem_xfree() at vmem_xfree+0xd1/frame 0xfffffe0025192860 tls_uninit_toep() at tls_uninit_toep+0x78/frame 0xfffffe0025192880 free_toepcb() at free_toepcb+0x32/frame 0xfffffe00251928a0 t4_connect() at t4_connect+0x3be/frame 0xfffffe0025192950 tcp_offload_connect() at tcp_offload_connect+0xa4/frame 0xfffffe0025192990 tcp_usr_connect() at tcp_usr_connect+0xec/frame 0xfffffe00251929f0 soconnect() at soconnect+0xae/frame 0xfffffe0025192a30 kern_connectat() at kern_connectat+0xe2/frame 0xfffffe0025192a90 sys_connect() at sys_connect+0x75/frame 0xfffffe0025192ad0 amd64_syscall() at amd64_syscall+0x137/frame 0xfffffe0025192bf0 fast_syscall_common() at fast_syscall_common+0x101/frame 0xfffffe0025192bf0 --- syscall (98, FreeBSD ELF64, sys_connect), rip = 0x8008e9d8a, rsp = 0x7fffffffc0f8, rbp = 0x7fffffffc130 --- Reviewed by: jhb@ MFC after: 3 days Sponsored by: Chelsio Communications Differential Revision: https://reviews.freebsd.org/D23989 Modified: head/sys/dev/cxgbe/tom/t4_tom.c head/sys/dev/cxgbe/tom/t4_tom.h Modified: head/sys/dev/cxgbe/tom/t4_tom.c ============================================================================== --- head/sys/dev/cxgbe/tom/t4_tom.c Fri Mar 6 19:10:00 2020 (r358716) +++ head/sys/dev/cxgbe/tom/t4_tom.c Fri Mar 6 19:56:12 2020 (r358717) @@ -187,6 +187,8 @@ init_toepcb(struct vi_info *vi, struct toepcb *toep) if (ulp_mode(toep) == ULP_MODE_TCPDDP) ddp_init_toep(toep); + toep->flags |= TPF_INITIALIZED; + return (0); } @@ -210,9 +212,11 @@ free_toepcb(struct toepcb *toep) KASSERT(!(toep->flags & TPF_CPL_PENDING), ("%s: CPL pending", __func__)); - if (ulp_mode(toep) == ULP_MODE_TCPDDP) - ddp_uninit_toep(toep); - tls_uninit_toep(toep); + if (toep->flags & TPF_INITIALIZED) { + if (ulp_mode(toep) == ULP_MODE_TCPDDP) + ddp_uninit_toep(toep); + tls_uninit_toep(toep); + } free(toep, M_CXGBE); } Modified: head/sys/dev/cxgbe/tom/t4_tom.h ============================================================================== --- head/sys/dev/cxgbe/tom/t4_tom.h Fri Mar 6 19:10:00 2020 (r358716) +++ head/sys/dev/cxgbe/tom/t4_tom.h Fri Mar 6 19:56:12 2020 (r358717) @@ -73,6 +73,7 @@ enum { TPF_SYNQE_EXPANDED = (1 << 9), /* toepcb ready, tid context updated */ TPF_FORCE_CREDITS = (1 << 10), /* always send credits */ TPF_KTLS = (1 << 11), /* send TLS records from KTLS */ + TPF_INITIALIZED = (1 << 12), /* init_toepcb has been called */ }; enum { From owner-svn-src-all@freebsd.org Fri Mar 6 20:44:23 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 05D10250762; Fri, 6 Mar 2020 20:44:23 +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 48Z03B5hbxz4Cnw; Fri, 6 Mar 2020 20:44:22 +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 8952F25E54; Fri, 6 Mar 2020 20:44:22 +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 026KiMSS044533; Fri, 6 Mar 2020 20:44:22 GMT (envelope-from markj@FreeBSD.org) Received: (from markj@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 026KiM4F044532; Fri, 6 Mar 2020 20:44:22 GMT (envelope-from markj@FreeBSD.org) Message-Id: <202003062044.026KiM4F044532@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: markj set sender to markj@FreeBSD.org using -f From: Mark Johnston Date: Fri, 6 Mar 2020 20:44:22 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r358718 - head/sys/powerpc/powerpc X-SVN-Group: head X-SVN-Commit-Author: markj X-SVN-Commit-Paths: head/sys/powerpc/powerpc X-SVN-Commit-Revision: 358718 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages 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, 06 Mar 2020 20:44:23 -0000 Author: markj Date: Fri Mar 6 20:44:22 2020 New Revision: 358718 URL: https://svnweb.freebsd.org/changeset/base/358718 Log: Remove dead code from the powerpc uma_small_alloc(). 32-bit Book-E doesn't set UMA_MD_SMALL_ALLOC, and 32-bit OEA platforms have a 32-bit vm_paddr_t. Moreover, this code was wrong in that it leaked the page if the check failed. Reviewed by: jhibbits MFC after: 1 week Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D23991 Modified: head/sys/powerpc/powerpc/uma_machdep.c Modified: head/sys/powerpc/powerpc/uma_machdep.c ============================================================================== --- head/sys/powerpc/powerpc/uma_machdep.c Fri Mar 6 19:56:12 2020 (r358717) +++ head/sys/powerpc/powerpc/uma_machdep.c Fri Mar 6 20:44:22 2020 (r358718) @@ -66,11 +66,6 @@ uma_small_alloc(uma_zone_t zone, vm_size_t bytes, int return (NULL); pa = VM_PAGE_TO_PHYS(m); - - /* On book-e sizeof(void *) < sizeof(vm_paddr_t) */ - if ((vm_offset_t)pa != pa) - return (NULL); - #ifdef __powerpc64__ if ((wait & M_NODUMP) == 0) dump_add_page(pa); From owner-svn-src-all@freebsd.org Fri Mar 6 21:15:26 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id AFEF4250EE6; Fri, 6 Mar 2020 21: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 48Z0l22z4Vz4P6s; Fri, 6 Mar 2020 21: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 3216A263D7; Fri, 6 Mar 2020 21:15:26 +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 026LFQ2n062339; Fri, 6 Mar 2020 21:15:26 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 026LFQcg062338; Fri, 6 Mar 2020 21:15:26 GMT (envelope-from kib@FreeBSD.org) Message-Id: <202003062115.026LFQcg062338@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Fri, 6 Mar 2020 21:15:26 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r358719 - head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs X-SVN-Group: head X-SVN-Commit-Author: kib X-SVN-Commit-Paths: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs X-SVN-Commit-Revision: 358719 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages 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, 06 Mar 2020 21:15:26 -0000 Author: kib Date: Fri Mar 6 21:15:25 2020 New Revision: 358719 URL: https://svnweb.freebsd.org/changeset/base/358719 Log: zfs dmu_read: loosen the assertion. Since switch to the lockless grab, shared busy for ahead/behind pages allows other threads to validate and map the pages readonly. Reviewed by: avg, jeff, markj Sponsored by: The FreeBSD Foundation Differential revision: https://reviews.freebsd.org/D23986 Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu.c Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu.c ============================================================================== --- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu.c Fri Mar 6 20:44:22 2020 (r358718) +++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu.c Fri Mar 6 21:15:25 2020 (r358719) @@ -1752,7 +1752,7 @@ dmu_read_pages(objset_t *os, uint64_t object, vm_page_ break; } ASSERT(m->dirty == 0); - ASSERT(!pmap_page_is_mapped(m)); + ASSERT(!pmap_page_is_write_mapped(m)); ASSERT(db->db_size > PAGE_SIZE); bufoff = IDX_TO_OFF(m->pindex) % db->db_size; @@ -1867,7 +1867,7 @@ dmu_read_pages(objset_t *os, uint64_t object, vm_page_ break; } ASSERT(m->dirty == 0); - ASSERT(!pmap_page_is_mapped(m)); + ASSERT(!pmap_page_is_write_mapped(m)); ASSERT(db->db_size > PAGE_SIZE); bufoff = IDX_TO_OFF(m->pindex) % db->db_size; From owner-svn-src-all@freebsd.org Fri Mar 6 21:21:02 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 36377250FE2; Fri, 6 Mar 2020 21:21:02 +0000 (UTC) (envelope-from andreast@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 48Z0sT6ZvTz4dRQ; Fri, 6 Mar 2020 21:21:01 +0000 (UTC) (envelope-from andreast@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id CBCA626413; Fri, 6 Mar 2020 21:21:01 +0000 (UTC) (envelope-from andreast@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 026LL1PU064747; Fri, 6 Mar 2020 21:21:01 GMT (envelope-from andreast@FreeBSD.org) Received: (from andreast@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 026LL180064742; Fri, 6 Mar 2020 21:21:01 GMT (envelope-from andreast@FreeBSD.org) Message-Id: <202003062121.026LL180064742@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: andreast set sender to andreast@FreeBSD.org using -f From: Andreas Tobler Date: Fri, 6 Mar 2020 21:21:01 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r358720 - head/sys/dev/iicbus X-SVN-Group: head X-SVN-Commit-Author: andreast X-SVN-Commit-Paths: head/sys/dev/iicbus X-SVN-Commit-Revision: 358720 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages 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, 06 Mar 2020 21:21:02 -0000 Author: andreast Date: Fri Mar 6 21:21:01 2020 New Revision: 358720 URL: https://svnweb.freebsd.org/changeset/base/358720 Log: - Drop 'All rights reserved' - Replace hardcoded size by nitems Modified: head/sys/dev/iicbus/max6690.c Modified: head/sys/dev/iicbus/max6690.c ============================================================================== --- head/sys/dev/iicbus/max6690.c Fri Mar 6 21:15:25 2020 (r358719) +++ head/sys/dev/iicbus/max6690.c Fri Mar 6 21:21:01 2020 (r358720) @@ -2,7 +2,6 @@ * SPDX-License-Identifier: BSD-2-Clause-FreeBSD * * Copyright (c) 2010 Andreas Tobler - * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -124,7 +123,7 @@ max6690_read(device_t dev, uint32_t addr, uint8_t reg, for (;;) { - err = iicbus_transfer(dev, msg, 4); + err = iicbus_transfer(dev, msg, nitems(msg)); if (err != 0) goto retry; if (busy[0] & 0x80) @@ -302,8 +301,9 @@ max6690_start(void *xdev) "Sensor Information"); /* I use i to pass the sensor id. */ SYSCTL_ADD_PROC(ctx, SYSCTL_CHILDREN(oid), OID_AUTO, "temp", - CTLTYPE_INT | CTLFLAG_RD | CTLFLAG_NEEDGIANT, dev, i % 2, - max6690_sensor_sysctl, "IK", sysctl_desc); + CTLTYPE_INT | CTLFLAG_RD | CTLFLAG_MPSAFE, + dev, i % 2, + max6690_sensor_sysctl, "IK", sysctl_desc); } /* Dump sensor location & ID. */ From owner-svn-src-all@freebsd.org Fri Mar 6 21:24:10 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 56527251222; Fri, 6 Mar 2020 21:24:10 +0000 (UTC) (envelope-from andreast@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 48Z0x60dXdz3JL4; Fri, 6 Mar 2020 21:24:10 +0000 (UTC) (envelope-from andreast@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 06CEF265A2; Fri, 6 Mar 2020 21:24:10 +0000 (UTC) (envelope-from andreast@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 026LO91f068225; Fri, 6 Mar 2020 21:24:09 GMT (envelope-from andreast@FreeBSD.org) Received: (from andreast@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 026LO9xn068224; Fri, 6 Mar 2020 21:24:09 GMT (envelope-from andreast@FreeBSD.org) Message-Id: <202003062124.026LO9xn068224@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: andreast set sender to andreast@FreeBSD.org using -f From: Andreas Tobler Date: Fri, 6 Mar 2020 21:24:09 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r358721 - head/sys/dev/iicbus X-SVN-Group: head X-SVN-Commit-Author: andreast X-SVN-Commit-Paths: head/sys/dev/iicbus X-SVN-Commit-Revision: 358721 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages 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, 06 Mar 2020 21:24:10 -0000 Author: andreast Date: Fri Mar 6 21:24:09 2020 New Revision: 358721 URL: https://svnweb.freebsd.org/changeset/base/358721 Log: Drop 'All rights reserved' Replace hardcoded sizes by nitems and sizeof Modified: head/sys/dev/iicbus/ds1631.c Modified: head/sys/dev/iicbus/ds1631.c ============================================================================== --- head/sys/dev/iicbus/ds1631.c Fri Mar 6 21:21:01 2020 (r358720) +++ head/sys/dev/iicbus/ds1631.c Fri Mar 6 21:24:09 2020 (r358721) @@ -2,7 +2,6 @@ * SPDX-License-Identifier: BSD-2-Clause-FreeBSD * * Copyright (c) 2012 Andreas Tobler - * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -135,7 +134,7 @@ ds1631_write(device_t dev, uint32_t addr, uint8_t reg, for (;;) { - if (iicbus_transfer(dev, msg, 1) == 0) + if (iicbus_transfer(dev, msg, nitems(msg)) == 0) return (0); if (++try > 5) { device_printf(dev, "iicbus write failed\n"); @@ -158,7 +157,7 @@ ds1631_read_1(device_t dev, uint32_t addr, uint8_t reg for (;;) { - err = iicbus_transfer(dev, msg, 2); + err = iicbus_transfer(dev, msg, nitems(msg)); if (err != 0) goto retry; @@ -186,7 +185,7 @@ ds1631_read_2(device_t dev, uint32_t addr, uint8_t reg for (;;) { - err = iicbus_transfer(dev, msg, 2); + err = iicbus_transfer(dev, msg, nitems(msg)); if (err != 0) goto retry; @@ -275,7 +274,7 @@ ds1631_init(device_t dev, uint32_t addr) */ conf = DS1631_CONTROL_10BIT; - err = ds1631_write(dev, addr, DS1631_CONTROL, &conf, 1); + err = ds1631_write(dev, addr, DS1631_CONTROL, &conf, sizeof(conf)); if (err < 0) { device_printf(dev, "ds1631 write config failed: %x\n", err); return (-1); From owner-svn-src-all@freebsd.org Fri Mar 6 21:25:31 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 8A6FB251313; Fri, 6 Mar 2020 21:25:31 +0000 (UTC) (envelope-from andreast@FreeBSD.org) Received: from smtp.imp.ch (smtp.imp.ch [157.161.13.198]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 48Z0yf5TYxz3MPQ; Fri, 6 Mar 2020 21:25:30 +0000 (UTC) (envelope-from andreast@FreeBSD.org) Received: from [192.168.225.14] (dhclient-94.100.156.244.flashcable.ch [94.100.156.244]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by fgznet.ch (Postfix) with ESMTPSA id 2D44CC0DBB; Fri, 6 Mar 2020 22:25:28 +0100 (CET) Subject: Re: svn commit: r358720 - head/sys/dev/iicbus From: Andreas Tobler To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org References: <202003062121.026LL180064742@repo.freebsd.org> Message-ID: <4901a173-c961-208a-5e94-d22be9867aac@FreeBSD.org> Date: Fri, 6 Mar 2020 22:25:27 +0100 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.13; rv:68.0) Gecko/20100101 Thunderbird/68.5.0 MIME-Version: 1.0 In-Reply-To: <202003062121.026LL180064742@repo.freebsd.org> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-Scanned-By: Idefix Submit on 127.0.1.1 X-Rspamd-Queue-Id: 48Z0yf5TYxz3MPQ X-Spamd-Bar: / Authentication-Results: mx1.freebsd.org; none X-Spamd-Result: default: False [0.01 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_LONG(-0.92)[-0.922,0]; NEURAL_SPAM_MEDIUM(0.93)[0.935,0]; ASN(0.00)[asn:6772, ipnet:157.161.0.0/16, country:CH] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages 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, 06 Mar 2020 21:25:31 -0000 On 06.03.20 22:21, Andreas Tobler wrote: > Author: andreast > Date: Fri Mar 6 21:21:01 2020 > New Revision: 358720 > URL: https://svnweb.freebsd.org/changeset/base/358720 > > Log: > - Drop 'All rights reserved' > - Replace hardcoded size by nitems The CTLFLAG_MPSAFE I forgot to mention since I have it since years in my tree. Sorry. Andreas > > Modified: > head/sys/dev/iicbus/max6690.c > > Modified: head/sys/dev/iicbus/max6690.c > ============================================================================== > --- head/sys/dev/iicbus/max6690.c Fri Mar 6 21:15:25 2020 (r358719) > +++ head/sys/dev/iicbus/max6690.c Fri Mar 6 21:21:01 2020 (r358720) > @@ -2,7 +2,6 @@ > * SPDX-License-Identifier: BSD-2-Clause-FreeBSD > * > * Copyright (c) 2010 Andreas Tobler > - * All rights reserved. > * > * Redistribution and use in source and binary forms, with or without > * modification, are permitted provided that the following conditions > @@ -124,7 +123,7 @@ max6690_read(device_t dev, uint32_t addr, uint8_t reg, > > for (;;) > { > - err = iicbus_transfer(dev, msg, 4); > + err = iicbus_transfer(dev, msg, nitems(msg)); > if (err != 0) > goto retry; > if (busy[0] & 0x80) > @@ -302,8 +301,9 @@ max6690_start(void *xdev) > "Sensor Information"); > /* I use i to pass the sensor id. */ > SYSCTL_ADD_PROC(ctx, SYSCTL_CHILDREN(oid), OID_AUTO, "temp", > - CTLTYPE_INT | CTLFLAG_RD | CTLFLAG_NEEDGIANT, dev, i % 2, > - max6690_sensor_sysctl, "IK", sysctl_desc); > + CTLTYPE_INT | CTLFLAG_RD | CTLFLAG_MPSAFE, > + dev, i % 2, > + max6690_sensor_sysctl, "IK", sysctl_desc); > > } > /* Dump sensor location & ID. */ > From owner-svn-src-all@freebsd.org Fri Mar 6 21:26:36 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 4A1A52513AA; Fri, 6 Mar 2020 21:26:36 +0000 (UTC) (envelope-from andreast@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 48Z0zw0QG2z3Pq3; Fri, 6 Mar 2020 21:26:36 +0000 (UTC) (envelope-from andreast@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id D57D6265A3; Fri, 6 Mar 2020 21:26:35 +0000 (UTC) (envelope-from andreast@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 026LQZK5068402; Fri, 6 Mar 2020 21:26:35 GMT (envelope-from andreast@FreeBSD.org) Received: (from andreast@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 026LQZKK068401; Fri, 6 Mar 2020 21:26:35 GMT (envelope-from andreast@FreeBSD.org) Message-Id: <202003062126.026LQZKK068401@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: andreast set sender to andreast@FreeBSD.org using -f From: Andreas Tobler Date: Fri, 6 Mar 2020 21:26:35 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r358722 - head/sys/dev/iicbus X-SVN-Group: head X-SVN-Commit-Author: andreast X-SVN-Commit-Paths: head/sys/dev/iicbus X-SVN-Commit-Revision: 358722 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages 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, 06 Mar 2020 21:26:36 -0000 Author: andreast Date: Fri Mar 6 21:26:35 2020 New Revision: 358722 URL: https://svnweb.freebsd.org/changeset/base/358722 Log: Drop 'All rights reserved' Replace hardcoded size by nitems Modified: head/sys/dev/iicbus/ds1775.c Modified: head/sys/dev/iicbus/ds1775.c ============================================================================== --- head/sys/dev/iicbus/ds1775.c Fri Mar 6 21:24:09 2020 (r358721) +++ head/sys/dev/iicbus/ds1775.c Fri Mar 6 21:26:35 2020 (r358722) @@ -2,7 +2,6 @@ * SPDX-License-Identifier: BSD-2-Clause-FreeBSD * * Copyright (c) 2010 Andreas Tobler - * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -104,7 +103,7 @@ ds1775_read_2(device_t dev, uint32_t addr, uint8_t reg for (;;) { - err = iicbus_transfer(dev, msg, 2); + err = iicbus_transfer(dev, msg, nitems(msg)); if (err != 0) goto retry; From owner-svn-src-all@freebsd.org Fri Mar 6 21:32:43 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id EFB682517C8; Fri, 6 Mar 2020 21:32:43 +0000 (UTC) (envelope-from andreast@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 48Z16z3Xspz444C; Fri, 6 Mar 2020 21:32:43 +0000 (UTC) (envelope-from andreast@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 7407D2674E; Fri, 6 Mar 2020 21:32:42 +0000 (UTC) (envelope-from andreast@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 026LWglc074428; Fri, 6 Mar 2020 21:32:42 GMT (envelope-from andreast@FreeBSD.org) Received: (from andreast@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 026LWgGA074427; Fri, 6 Mar 2020 21:32:42 GMT (envelope-from andreast@FreeBSD.org) Message-Id: <202003062132.026LWgGA074427@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: andreast set sender to andreast@FreeBSD.org using -f From: Andreas Tobler Date: Fri, 6 Mar 2020 21:32:42 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r358723 - head/sys/dev/iicbus X-SVN-Group: head X-SVN-Commit-Author: andreast X-SVN-Commit-Paths: head/sys/dev/iicbus X-SVN-Commit-Revision: 358723 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages 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, 06 Mar 2020 21:32:44 -0000 Author: andreast Date: Fri Mar 6 21:32:42 2020 New Revision: 358723 URL: https://svnweb.freebsd.org/changeset/base/358723 Log: Drop 'All rights reserved' Replace hardcoded sizes by nitems and sizeof Replace CTLFLAG_NEEDGIANT with CTLFLAG_MPSAFE, I run this driver since a few years with CTLFLAG_MPSAFE w/o issues. Add a HACK to handle a special case for a sensor location. Modified: head/sys/dev/iicbus/ad7417.c Modified: head/sys/dev/iicbus/ad7417.c ============================================================================== --- head/sys/dev/iicbus/ad7417.c Fri Mar 6 21:26:35 2020 (r358722) +++ head/sys/dev/iicbus/ad7417.c Fri Mar 6 21:32:42 2020 (r358723) @@ -2,7 +2,6 @@ * SPDX-License-Identifier: BSD-2-Clause-FreeBSD * * Copyright (c) 2010 Andreas Tobler - * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -143,7 +142,7 @@ ad7417_write(device_t dev, uint32_t addr, uint8_t reg, for (;;) { - if (iicbus_transfer(dev, msg, 1) == 0) + if (iicbus_transfer(dev, msg, nitems(msg)) == 0) return (0); if (++try > 5) { @@ -167,7 +166,7 @@ ad7417_read_1(device_t dev, uint32_t addr, uint8_t reg for (;;) { - err = iicbus_transfer(dev, msg, 2); + err = iicbus_transfer(dev, msg, nitems(msg)); if (err != 0) goto retry; @@ -195,7 +194,7 @@ ad7417_read_2(device_t dev, uint32_t addr, uint8_t reg for (;;) { - err = iicbus_transfer(dev, msg, 2); + err = iicbus_transfer(dev, msg, nitems(msg)); if (err != 0) goto retry; @@ -230,7 +229,7 @@ ad7417_write_read(device_t dev, uint32_t addr, struct for (;;) { - err = iicbus_transfer(dev, msg, 3); + err = iicbus_transfer(dev, msg, nitems(msg)); if (err != 0) goto retry; @@ -258,18 +257,18 @@ ad7417_init_adc(device_t dev, uint32_t addr) /* Clear Config2 */ buf = 0; - err = ad7417_write(dev, addr, AD7417_CONFIG2, &buf, 1); + err = ad7417_write(dev, addr, AD7417_CONFIG2, &buf, sizeof(buf)); /* Read & cache Config1 */ buf = 0; - err = ad7417_write(dev, addr, AD7417_CONFIG, &buf, 1); + err = ad7417_write(dev, addr, AD7417_CONFIG, &buf, sizeof(buf)); err = ad7417_read_1(dev, addr, AD7417_CONFIG, &buf); adc741x_config = (uint8_t)buf; /* Disable shutdown mode */ adc741x_config &= 0xfe; buf = adc741x_config; - err = ad7417_write(dev, addr, AD7417_CONFIG, &buf, 1); + err = ad7417_write(dev, addr, AD7417_CONFIG, &buf, sizeof(buf)); if (err < 0) return (-1); @@ -310,7 +309,7 @@ ad7417_probe(device_t dev) static int ad7417_fill_sensor_prop(device_t dev) { - phandle_t child; + phandle_t child, node; struct ad7417_softc *sc; u_int id[10]; char location[96]; @@ -359,13 +358,27 @@ ad7417_fill_sensor_prop(device_t dev) for (j = 0; j < i; j++) sc->sc_sensors[j].therm.zone = id[j]; + /* Some PowerMac's have the real location of the sensors on + child nodes of the hwsensor-location node. Check for and + fix the name if needed. + This is needed to apply the below HACK with the diode. + */ + j = 0; + for (node = OF_child(child); node != 0; node = OF_peer(node)) { + + OF_getprop(node, "location", location, sizeof(location)); + strcpy(sc->sc_sensors[i].therm.name, location); + j++; + } + /* Finish setting up sensor properties */ for (j = 0; j < i; j++) { sc->sc_sensors[j].dev = dev; /* HACK: Apple wired a random diode to the ADC line */ - if (strstr(sc->sc_sensors[j].therm.name, "DIODE TEMP") - != NULL) { + if ((strstr(sc->sc_sensors[j].therm.name, "DIODE TEMP") + != NULL) + || (strstr(sc->sc_sensors[j].therm.name, "AD1") != NULL)) { sc->sc_sensors[j].type = ADC7417_TEMP_SENSOR; sc->sc_sensors[j].therm.read = (int (*)(struct pmac_therm *))(ad7417_diode_read); @@ -444,10 +457,10 @@ ad7417_attach(device_t dev) } /* I use i to pass the sensor id. */ SYSCTL_ADD_PROC(ctx, SYSCTL_CHILDREN(oid), OID_AUTO, - unit, CTLTYPE_INT | CTLFLAG_RD | CTLFLAG_NEEDGIANT, dev, - i, ad7417_sensor_sysctl, - sc->sc_sensors[i].type == ADC7417_TEMP_SENSOR ? "IK" : "I", - desc); + unit, CTLTYPE_INT | CTLFLAG_RD | CTLFLAG_MPSAFE, + dev, i, ad7417_sensor_sysctl, + sc->sc_sensors[i].type == ADC7417_TEMP_SENSOR ? + "IK" : "I", desc); } /* Dump sensor location, ID & type. */ if (bootverbose) { From owner-svn-src-all@freebsd.org Fri Mar 6 21:51:29 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 91FC7251F97; Fri, 6 Mar 2020 21:51:29 +0000 (UTC) (envelope-from andreast@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 48Z1Xc5k7Hz4qHM; Fri, 6 Mar 2020 21:51:28 +0000 (UTC) (envelope-from andreast@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 8614326ABB; Fri, 6 Mar 2020 21:51:28 +0000 (UTC) (envelope-from andreast@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 026LpSOl082572; Fri, 6 Mar 2020 21:51:28 GMT (envelope-from andreast@FreeBSD.org) Received: (from andreast@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 026LpSfe082571; Fri, 6 Mar 2020 21:51:28 GMT (envelope-from andreast@FreeBSD.org) Message-Id: <202003062151.026LpSfe082571@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: andreast set sender to andreast@FreeBSD.org using -f From: Andreas Tobler Date: Fri, 6 Mar 2020 21:51:28 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r358724 - head/sys/powerpc/powermac X-SVN-Group: head X-SVN-Commit-Author: andreast X-SVN-Commit-Paths: head/sys/powerpc/powermac X-SVN-Commit-Revision: 358724 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages 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, 06 Mar 2020 21:51:29 -0000 Author: andreast Date: Fri Mar 6 21:51:28 2020 New Revision: 358724 URL: https://svnweb.freebsd.org/changeset/base/358724 Log: Drop 'All rights reserved' Replace hardcoded sizes by nitems and sizeof Replace CTLFLAG_NEEDGIANT with CTLFLAG_MPSAFE, I run this driver since a few years with CTLFLAG_MPSAFE w/o issues. Modified: head/sys/powerpc/powermac/fcu.c Modified: head/sys/powerpc/powermac/fcu.c ============================================================================== --- head/sys/powerpc/powermac/fcu.c Fri Mar 6 21:32:42 2020 (r358723) +++ head/sys/powerpc/powermac/fcu.c Fri Mar 6 21:51:28 2020 (r358724) @@ -2,7 +2,6 @@ * SPDX-License-Identifier: BSD-2-Clause-FreeBSD * * Copyright (c) 2010 Andreas Tobler - * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -152,7 +151,7 @@ fcu_write(device_t dev, uint32_t addr, uint8_t reg, ui for (;;) { - if (iicbus_transfer(dev, msg, 1) == 0) + if (iicbus_transfer(dev, msg, nitems(msg)) == 0) return (0); if (++try > 5) { @@ -176,7 +175,7 @@ fcu_read_1(device_t dev, uint32_t addr, uint8_t reg, u for (;;) { - err = iicbus_transfer(dev, msg, 2); + err = iicbus_transfer(dev, msg, nitems(msg)); if (err != 0) goto retry; @@ -250,8 +249,8 @@ fcu_start(void *xdev) sc = device_get_softc(dev); /* Start the fcu device. */ - fcu_write(sc->sc_dev, sc->sc_addr, 0xe, buf, 1); - fcu_write(sc->sc_dev, sc->sc_addr, 0x2e, buf, 1); + fcu_write(sc->sc_dev, sc->sc_addr, 0xe, buf, sizeof(buf)); + fcu_write(sc->sc_dev, sc->sc_addr, 0x2e, buf, sizeof(buf)); fcu_read_1(sc->sc_dev, sc->sc_addr, 0, buf); fcu_rpm_shift = (buf[0] == 1) ? 2 : 3; @@ -290,7 +289,7 @@ fcu_fan_set_rpm(struct fcu_fan *fan, int rpm) buf[0] = rpm >> (8 - fcu_rpm_shift); buf[1] = rpm << fcu_rpm_shift; - if (fcu_write(sc->sc_dev, sc->sc_addr, reg, buf, 2) < 0) + if (fcu_write(sc->sc_dev, sc->sc_addr, reg, buf, sizeof(buf)) < 0) return (EIO); return (0); @@ -323,7 +322,7 @@ fcu_fan_get_rpm(struct fcu_fan *fan) return (-1); if ((fail & (1 << fan->id)) != 0) { device_printf(fan->dev, - "RPM Fan failed ID: %d\n", fan->id); + "RPM Fan failed ID: %d %#x\n", fan->id, fail); return (-1); } /* Check if fan is active. */ @@ -356,7 +355,7 @@ fcu_fan_set_pwm(struct fcu_fan *fan, int pwm) { uint8_t reg; struct fcu_softc *sc; - uint8_t buf[2]; + uint8_t buf[1]; sc = device_get_softc(fan->dev); @@ -378,7 +377,7 @@ fcu_fan_set_pwm(struct fcu_fan *fan, int pwm) buf[0] = (pwm * 2550) / 1000; - if (fcu_write(sc->sc_dev, sc->sc_addr, reg, buf, 1) < 0) + if (fcu_write(sc->sc_dev, sc->sc_addr, reg, buf, sizeof(buf)) < 0) return (EIO); return (0); } @@ -632,8 +631,9 @@ fcu_attach_fans(device_t dev) "Maximum allowed RPM"); /* I use i to pass the fan id. */ SYSCTL_ADD_PROC(ctx, SYSCTL_CHILDREN(oid), OID_AUTO, - "rpm", CTLTYPE_INT | CTLFLAG_RW | CTLFLAG_NEEDGIANT, - dev, i, fcu_fanrpm_sysctl, "I", "Fan RPM"); + "rpm", CTLTYPE_INT | CTLFLAG_RW | + CTLFLAG_MPSAFE, dev, i, + fcu_fanrpm_sysctl, "I", "Fan RPM"); } else { fcu_fan_get_pwm(dev, &sc->sc_fans[i], &sc->sc_fans[i].setpoint, @@ -654,13 +654,14 @@ fcu_attach_fans(device_t dev) * of info I want to display/modify. */ SYSCTL_ADD_PROC(ctx, SYSCTL_CHILDREN(oid), OID_AUTO, - "pwm", CTLTYPE_INT | CTLFLAG_RW | CTLFLAG_NEEDGIANT, - dev, FCU_PWM_SYSCTL_PWM | i, fcu_fanrpm_sysctl, "I", - "Fan PWM in %"); - SYSCTL_ADD_PROC(ctx, SYSCTL_CHILDREN(oid), OID_AUTO, - "rpm", CTLTYPE_INT | CTLFLAG_RD | CTLFLAG_NEEDGIANT, - dev, FCU_PWM_SYSCTL_RPM | i, fcu_fanrpm_sysctl, "I", - "Fan RPM"); + "pwm", CTLTYPE_INT | CTLFLAG_RW | + CTLFLAG_MPSAFE, dev, + FCU_PWM_SYSCTL_PWM | i, + fcu_fanrpm_sysctl, "I", "Fan PWM in %"); + "rpm", CTLTYPE_INT | CTLFLAG_RD | + CTLFLAG_MPSAFE, dev, + FCU_PWM_SYSCTL_RPM | i, + fcu_fanrpm_sysctl, "I", "Fan RPM"); } } From owner-svn-src-all@freebsd.org Fri Mar 6 23:01:50 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 2033D253625; Fri, 6 Mar 2020 23:01:50 +0000 (UTC) (envelope-from andreast@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 48Z35p069Qz45lM; Fri, 6 Mar 2020 23:01:50 +0000 (UTC) (envelope-from andreast@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id F2E64277A5; Fri, 6 Mar 2020 23:01:49 +0000 (UTC) (envelope-from andreast@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 026N1nqm030566; Fri, 6 Mar 2020 23:01:49 GMT (envelope-from andreast@FreeBSD.org) Received: (from andreast@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 026N1nFl030549; Fri, 6 Mar 2020 23:01:49 GMT (envelope-from andreast@FreeBSD.org) Message-Id: <202003062301.026N1nFl030549@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: andreast set sender to andreast@FreeBSD.org using -f From: Andreas Tobler Date: Fri, 6 Mar 2020 23:01:49 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r358725 - head/sys/powerpc/powermac X-SVN-Group: head X-SVN-Commit-Author: andreast X-SVN-Commit-Paths: head/sys/powerpc/powermac X-SVN-Commit-Revision: 358725 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages 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, 06 Mar 2020 23:01:50 -0000 Author: andreast Date: Fri Mar 6 23:01:49 2020 New Revision: 358725 URL: https://svnweb.freebsd.org/changeset/base/358725 Log: Revert Modified: head/sys/powerpc/powermac/fcu.c Modified: head/sys/powerpc/powermac/fcu.c ============================================================================== --- head/sys/powerpc/powermac/fcu.c Fri Mar 6 21:51:28 2020 (r358724) +++ head/sys/powerpc/powermac/fcu.c Fri Mar 6 23:01:49 2020 (r358725) @@ -2,6 +2,7 @@ * SPDX-License-Identifier: BSD-2-Clause-FreeBSD * * Copyright (c) 2010 Andreas Tobler + * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -151,7 +152,7 @@ fcu_write(device_t dev, uint32_t addr, uint8_t reg, ui for (;;) { - if (iicbus_transfer(dev, msg, nitems(msg)) == 0) + if (iicbus_transfer(dev, msg, 1) == 0) return (0); if (++try > 5) { @@ -175,7 +176,7 @@ fcu_read_1(device_t dev, uint32_t addr, uint8_t reg, u for (;;) { - err = iicbus_transfer(dev, msg, nitems(msg)); + err = iicbus_transfer(dev, msg, 2); if (err != 0) goto retry; @@ -249,8 +250,8 @@ fcu_start(void *xdev) sc = device_get_softc(dev); /* Start the fcu device. */ - fcu_write(sc->sc_dev, sc->sc_addr, 0xe, buf, sizeof(buf)); - fcu_write(sc->sc_dev, sc->sc_addr, 0x2e, buf, sizeof(buf)); + fcu_write(sc->sc_dev, sc->sc_addr, 0xe, buf, 1); + fcu_write(sc->sc_dev, sc->sc_addr, 0x2e, buf, 1); fcu_read_1(sc->sc_dev, sc->sc_addr, 0, buf); fcu_rpm_shift = (buf[0] == 1) ? 2 : 3; @@ -289,7 +290,7 @@ fcu_fan_set_rpm(struct fcu_fan *fan, int rpm) buf[0] = rpm >> (8 - fcu_rpm_shift); buf[1] = rpm << fcu_rpm_shift; - if (fcu_write(sc->sc_dev, sc->sc_addr, reg, buf, sizeof(buf)) < 0) + if (fcu_write(sc->sc_dev, sc->sc_addr, reg, buf, 2) < 0) return (EIO); return (0); @@ -322,7 +323,7 @@ fcu_fan_get_rpm(struct fcu_fan *fan) return (-1); if ((fail & (1 << fan->id)) != 0) { device_printf(fan->dev, - "RPM Fan failed ID: %d %#x\n", fan->id, fail); + "RPM Fan failed ID: %d\n", fan->id); return (-1); } /* Check if fan is active. */ @@ -355,7 +356,7 @@ fcu_fan_set_pwm(struct fcu_fan *fan, int pwm) { uint8_t reg; struct fcu_softc *sc; - uint8_t buf[1]; + uint8_t buf[2]; sc = device_get_softc(fan->dev); @@ -377,7 +378,7 @@ fcu_fan_set_pwm(struct fcu_fan *fan, int pwm) buf[0] = (pwm * 2550) / 1000; - if (fcu_write(sc->sc_dev, sc->sc_addr, reg, buf, sizeof(buf)) < 0) + if (fcu_write(sc->sc_dev, sc->sc_addr, reg, buf, 1) < 0) return (EIO); return (0); } @@ -631,9 +632,8 @@ fcu_attach_fans(device_t dev) "Maximum allowed RPM"); /* I use i to pass the fan id. */ SYSCTL_ADD_PROC(ctx, SYSCTL_CHILDREN(oid), OID_AUTO, - "rpm", CTLTYPE_INT | CTLFLAG_RW | - CTLFLAG_MPSAFE, dev, i, - fcu_fanrpm_sysctl, "I", "Fan RPM"); + "rpm", CTLTYPE_INT | CTLFLAG_RW | CTLFLAG_NEEDGIANT, + dev, i, fcu_fanrpm_sysctl, "I", "Fan RPM"); } else { fcu_fan_get_pwm(dev, &sc->sc_fans[i], &sc->sc_fans[i].setpoint, @@ -654,14 +654,13 @@ fcu_attach_fans(device_t dev) * of info I want to display/modify. */ SYSCTL_ADD_PROC(ctx, SYSCTL_CHILDREN(oid), OID_AUTO, - "pwm", CTLTYPE_INT | CTLFLAG_RW | - CTLFLAG_MPSAFE, dev, - FCU_PWM_SYSCTL_PWM | i, - fcu_fanrpm_sysctl, "I", "Fan PWM in %"); - "rpm", CTLTYPE_INT | CTLFLAG_RD | - CTLFLAG_MPSAFE, dev, - FCU_PWM_SYSCTL_RPM | i, - fcu_fanrpm_sysctl, "I", "Fan RPM"); + "pwm", CTLTYPE_INT | CTLFLAG_RW | CTLFLAG_NEEDGIANT, + dev, FCU_PWM_SYSCTL_PWM | i, fcu_fanrpm_sysctl, "I", + "Fan PWM in %"); + SYSCTL_ADD_PROC(ctx, SYSCTL_CHILDREN(oid), OID_AUTO, + "rpm", CTLTYPE_INT | CTLFLAG_RD | CTLFLAG_NEEDGIANT, + dev, FCU_PWM_SYSCTL_RPM | i, fcu_fanrpm_sysctl, "I", + "Fan RPM"); } } From owner-svn-src-all@freebsd.org Fri Mar 6 23:31:10 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 52659253E9B; Fri, 6 Mar 2020 23:31:10 +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 48Z3ld4yGKz4H3f; Fri, 6 Mar 2020 23:31:09 +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 7789C27BC0; Fri, 6 Mar 2020 23:31:09 +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 026NV9Tb045941; Fri, 6 Mar 2020 23:31:09 GMT (envelope-from brooks@FreeBSD.org) Received: (from brooks@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 026NV9k4045928; Fri, 6 Mar 2020 23:31:09 GMT (envelope-from brooks@FreeBSD.org) Message-Id: <202003062331.026NV9k4045928@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: brooks set sender to brooks@FreeBSD.org using -f From: Brooks Davis Date: Fri, 6 Mar 2020 23:31:09 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r358726 - head/sys/vm X-SVN-Group: head X-SVN-Commit-Author: brooks X-SVN-Commit-Paths: head/sys/vm X-SVN-Commit-Revision: 358726 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages 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, 06 Mar 2020 23:31:10 -0000 Author: brooks Date: Fri Mar 6 23:31:09 2020 New Revision: 358726 URL: https://svnweb.freebsd.org/changeset/base/358726 Log: Remove an apparently incorrect assertion. Without this change mips64 fails to boot. Discussed with: markj Sponsored by: DARPA Modified: head/sys/vm/uma_core.c Modified: head/sys/vm/uma_core.c ============================================================================== --- head/sys/vm/uma_core.c Fri Mar 6 23:01:49 2020 (r358725) +++ head/sys/vm/uma_core.c Fri Mar 6 23:31:09 2020 (r358726) @@ -716,9 +716,6 @@ zone_put_bucket(uma_zone_t zone, int domain, uma_bucke goto out; zdom = zone_domain_lock(zone, domain); - KASSERT(!ws || zdom->uzd_nitems < zone->uz_bucket_max, - ("%s: zone %p overflow", __func__, zone)); - /* * Conditionally set the maximum number of items. */ From owner-svn-src-all@freebsd.org Sat Mar 7 00:29:15 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 67D9025513D; Sat, 7 Mar 2020 00:29:15 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.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 48Z52g1NzFz4J8X; Sat, 7 Mar 2020 00:29:15 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id EA7026F6; Sat, 7 Mar 2020 00:29:13 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 0270TCDV081784; Sat, 7 Mar 2020 00:29:12 GMT (envelope-from imp@FreeBSD.org) Received: (from imp@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 0270TCrd081783; Sat, 7 Mar 2020 00:29:12 GMT (envelope-from imp@FreeBSD.org) Message-Id: <202003070029.0270TCrd081783@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: imp set sender to imp@FreeBSD.org using -f From: Warner Losh Date: Sat, 7 Mar 2020 00:29:12 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r358727 - head/sys/cam X-SVN-Group: head X-SVN-Commit-Author: imp X-SVN-Commit-Paths: head/sys/cam X-SVN-Commit-Revision: 358727 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages 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, 07 Mar 2020 00:29:15 -0000 Author: imp Date: Sat Mar 7 00:29:12 2020 New Revision: 358727 URL: https://svnweb.freebsd.org/changeset/base/358727 Log: Reword a comment to describe what's actually going on. We can call invalidate several times potentially. We just don't do anything on the second and subsequent calls. Modified: head/sys/cam/cam_periph.c Modified: head/sys/cam/cam_periph.c ============================================================================== --- head/sys/cam/cam_periph.c Fri Mar 6 23:31:09 2020 (r358726) +++ head/sys/cam/cam_periph.c Sat Mar 7 00:29:12 2020 (r358727) @@ -649,7 +649,7 @@ cam_periph_invalidate(struct cam_periph *periph) cam_periph_assert(periph, MA_OWNED); /* - * We only call this routine the first time a peripheral is + * We only tear down the device the first time a peripheral is * invalidated. */ if ((periph->flags & CAM_PERIPH_INVALID) != 0) From owner-svn-src-all@freebsd.org Sat Mar 7 00:55:48 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id CB8EC256657; Sat, 7 Mar 2020 00:55:48 +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 48Z5dH5QgWz4MgH; Sat, 7 Mar 2020 00:55:47 +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 99F13C7F; Sat, 7 Mar 2020 00:55:47 +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 0270tl48000552; Sat, 7 Mar 2020 00:55:47 GMT (envelope-from markj@FreeBSD.org) Received: (from markj@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 0270tkMf000549; Sat, 7 Mar 2020 00:55:46 GMT (envelope-from markj@FreeBSD.org) Message-Id: <202003070055.0270tkMf000549@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: markj set sender to markj@FreeBSD.org using -f From: Mark Johnston Date: Sat, 7 Mar 2020 00:55:46 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r358728 - in head/sys: sys vm X-SVN-Group: head X-SVN-Commit-Author: markj X-SVN-Commit-Paths: in head/sys: sys vm X-SVN-Commit-Revision: 358728 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages 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, 07 Mar 2020 00:55:48 -0000 Author: markj Date: Sat Mar 7 00:55:46 2020 New Revision: 358728 URL: https://svnweb.freebsd.org/changeset/base/358728 Log: Move SMR pointer type definition and access macros to smr_types.h. The intent is to provide a header that can be included by other headers without introducing too much pollution. smr.h depends on various headers and will likely grow over time, but is less likely to be required by system headers. Rename SMR_TYPE_DECLARE() to SMR_POINTER(): - One might use SMR to protect more than just pointers; it could be used for resizeable arrays, for example, so TYPE seems too generic. - It is useful to be able to define anonymous SMR-protected pointer types and the _DECLARE suffix makes that look wrong. Reviewed by: jeff, mjg, rlibby Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D23988 Added: head/sys/sys/smr_types.h (contents, props changed) Modified: head/sys/sys/_smr.h head/sys/sys/smr.h head/sys/vm/vm_radix.c Modified: head/sys/sys/_smr.h ============================================================================== --- head/sys/sys/_smr.h Sat Mar 7 00:29:12 2020 (r358727) +++ head/sys/sys/_smr.h Sat Mar 7 00:55:46 2020 (r358728) @@ -35,4 +35,16 @@ typedef uint32_t smr_seq_t; typedef int32_t smr_delta_t; typedef struct smr *smr_t; +#define SMR_ENTERED(smr) \ + (curthread->td_critnest != 0 && zpcpu_get((smr))->c_seq != SMR_SEQ_INVALID) + +#define SMR_ASSERT_ENTERED(smr) \ + KASSERT(SMR_ENTERED(smr), ("Not in smr section")) + +#define SMR_ASSERT_NOT_ENTERED(smr) \ + KASSERT(!SMR_ENTERED(smr), ("In smr section.")); + +#define SMR_ASSERT(ex, fn) \ + KASSERT((ex), (fn ": Assertion " #ex " failed at %s:%d", __FILE__, __LINE__)) + #endif /* __SYS_SMR_H_ */ Modified: head/sys/sys/smr.h ============================================================================== --- head/sys/sys/smr.h Sat Mar 7 00:29:12 2020 (r358727) +++ head/sys/sys/smr.h Sat Mar 7 00:55:46 2020 (r358728) @@ -35,7 +35,8 @@ /* * Safe memory reclamation. See subr_smr.c for a description of the - * algorithm. + * algorithm, and smr_types.h for macros to define and access SMR-protected + * data structures. * * Readers synchronize with smr_enter()/exit() and writers may either * free directly to a SMR UMA zone or use smr_synchronize or wait. @@ -81,112 +82,6 @@ struct smr { #define SMR_LAZY 0x0001 /* Higher latency write, fast read. */ #define SMR_DEFERRED 0x0002 /* Aggregate updates to wr_seq. */ - -#define SMR_ENTERED(smr) \ - (curthread->td_critnest != 0 && zpcpu_get((smr))->c_seq != SMR_SEQ_INVALID) - -#define SMR_ASSERT_ENTERED(smr) \ - KASSERT(SMR_ENTERED(smr), ("Not in smr section")) - -#define SMR_ASSERT_NOT_ENTERED(smr) \ - KASSERT(!SMR_ENTERED(smr), ("In smr section.")); - -#define SMR_ASSERT(ex, fn) \ - KASSERT((ex), (fn ": Assertion " #ex " failed at %s:%d", __FILE__, __LINE__)) - -/* - * SMR Accessors are meant to provide safe access to SMR protected - * pointers and prevent misuse and accidental access. - * - * Accessors are grouped by type: - * entered - Use while in a read section (between smr_enter/smr_exit()) - * serialized - Use while holding a lock that serializes writers. Updates - * are synchronized with readers via included barriers. - * unserialized - Use after the memory is out of scope and not visible to - * readers. - * - * All acceses include a parameter for an assert to verify the required - * synchronization. For example, a writer might use: - * - * smr_serialized_store(pointer, value, mtx_owned(&writelock)); - * - * These are only enabled in INVARIANTS kernels. - */ - -/* Type restricting pointer access to force smr accessors. */ -#define SMR_TYPE_DECLARE(smrtype, type) \ -typedef struct { \ - type __ptr; /* Do not access directly */ \ -} smrtype - -/* - * Read from an SMR protected pointer while in a read section. - */ -#define smr_entered_load(p, smr) ({ \ - SMR_ASSERT(SMR_ENTERED((smr)), "smr_entered_load"); \ - (__typeof((p)->__ptr))atomic_load_acq_ptr((uintptr_t *)&(p)->__ptr); \ -}) - -/* - * Read from an SMR protected pointer while serialized by an - * external mechanism. 'ex' should contain an assert that the - * external mechanism is held. i.e. mtx_owned() - */ -#define smr_serialized_load(p, ex) ({ \ - SMR_ASSERT(ex, "smr_serialized_load"); \ - (__typeof((p)->__ptr))atomic_load_ptr(&(p)->__ptr); \ -}) - -/* - * Store 'v' to an SMR protected pointer while serialized by an - * external mechanism. 'ex' should contain an assert that the - * external mechanism is held. i.e. mtx_owned() - * - * Writers that are serialized with mutual exclusion or on a single - * thread should use smr_serialized_store() rather than swap. - */ -#define smr_serialized_store(p, v, ex) do { \ - SMR_ASSERT(ex, "smr_serialized_store"); \ - __typeof((p)->__ptr) _v = (v); \ - atomic_store_rel_ptr((uintptr_t *)&(p)->__ptr, (uintptr_t)_v); \ -} while (0) - -/* - * swap 'v' with an SMR protected pointer and return the old value - * while serialized by an external mechanism. 'ex' should contain - * an assert that the external mechanism is provided. i.e. mtx_owned() - * - * Swap permits multiple writers to update a pointer concurrently. - */ -#define smr_serialized_swap(p, v, ex) ({ \ - SMR_ASSERT(ex, "smr_serialized_swap"); \ - __typeof((p)->__ptr) _v = (v); \ - /* Release barrier guarantees contents are visible to reader */ \ - atomic_thread_fence_rel(); \ - (__typeof((p)->__ptr))atomic_swap_ptr( \ - (uintptr_t *)&(p)->__ptr, (uintptr_t)_v); \ -}) - -/* - * Read from an SMR protected pointer when no serialization is required - * such as in the destructor callback or when the caller guarantees other - * synchronization. - */ -#define smr_unserialized_load(p, ex) ({ \ - SMR_ASSERT(ex, "smr_unserialized_load"); \ - (__typeof((p)->__ptr))atomic_load_ptr(&(p)->__ptr); \ -}) - -/* - * Store to an SMR protected pointer when no serialiation is required - * such as in the destructor callback or when the caller guarantees other - * synchronization. - */ -#define smr_unserialized_store(p, v, ex) do { \ - SMR_ASSERT(ex, "smr_unserialized_store"); \ - __typeof((p)->__ptr) _v = (v); \ - atomic_store_ptr((uintptr_t *)&(p)->__ptr, (uintptr_t)_v); \ -} while (0) /* * Return the current write sequence number. This is not the same as the Added: head/sys/sys/smr_types.h ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/sys/smr_types.h Sat Mar 7 00:55:46 2020 (r358728) @@ -0,0 +1,138 @@ +/*- + * SPDX-License-Identifier: BSD-2-Clause-FreeBSD + * + * Copyright (c) 2019, 2020 Jeffrey Roberson + * + * 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 unmodified, this list of conditions, and the following + * disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * $FreeBSD$ + */ + +#ifndef _SYS_SMR_TYPES_H_ +#define _SYS_SMR_TYPES_H_ + +#include + +/* + * SMR Accessors are meant to provide safe access to SMR protected + * pointers and prevent misuse and accidental access. + * + * Accessors are grouped by type: + * entered - Use while in a read section (between smr_enter/smr_exit()) + * serialized - Use while holding a lock that serializes writers. Updates + * are synchronized with readers via included barriers. + * unserialized - Use after the memory is out of scope and not visible to + * readers. + * + * All acceses include a parameter for an assert to verify the required + * synchronization. For example, a writer might use: + * + * smr_serialized_store(pointer, value, mtx_owned(&writelock)); + * + * These are only enabled in INVARIANTS kernels. + */ + +/* Type restricting pointer access to force smr accessors. */ +#define SMR_POINTER(type) \ +struct { \ + type __ptr; /* Do not access directly */ \ +} + +/* + * Read from an SMR protected pointer while in a read section. + */ +#define smr_entered_load(p, smr) ({ \ + SMR_ASSERT(SMR_ENTERED((smr)), "smr_entered_load"); \ + (__typeof((p)->__ptr))atomic_load_acq_ptr((uintptr_t *)&(p)->__ptr); \ +}) + +/* + * Read from an SMR protected pointer while serialized by an + * external mechanism. 'ex' should contain an assert that the + * external mechanism is held. i.e. mtx_owned() + */ +#define smr_serialized_load(p, ex) ({ \ + SMR_ASSERT(ex, "smr_serialized_load"); \ + (__typeof((p)->__ptr))atomic_load_ptr(&(p)->__ptr); \ +}) + +/* + * Store 'v' to an SMR protected pointer while serialized by an + * external mechanism. 'ex' should contain an assert that the + * external mechanism is held. i.e. mtx_owned() + * + * Writers that are serialized with mutual exclusion or on a single + * thread should use smr_serialized_store() rather than swap. + */ +#define smr_serialized_store(p, v, ex) do { \ + SMR_ASSERT(ex, "smr_serialized_store"); \ + __typeof((p)->__ptr) _v = (v); \ + atomic_store_rel_ptr((uintptr_t *)&(p)->__ptr, (uintptr_t)_v); \ +} while (0) + +/* + * swap 'v' with an SMR protected pointer and return the old value + * while serialized by an external mechanism. 'ex' should contain + * an assert that the external mechanism is provided. i.e. mtx_owned() + * + * Swap permits multiple writers to update a pointer concurrently. + */ +#define smr_serialized_swap(p, v, ex) ({ \ + SMR_ASSERT(ex, "smr_serialized_swap"); \ + __typeof((p)->__ptr) _v = (v); \ + /* Release barrier guarantees contents are visible to reader */ \ + atomic_thread_fence_rel(); \ + (__typeof((p)->__ptr))atomic_swap_ptr( \ + (uintptr_t *)&(p)->__ptr, (uintptr_t)_v); \ +}) + +/* + * Read from an SMR protected pointer when no serialization is required + * such as in the destructor callback or when the caller guarantees other + * synchronization. + */ +#define smr_unserialized_load(p, ex) ({ \ + SMR_ASSERT(ex, "smr_unserialized_load"); \ + (__typeof((p)->__ptr))atomic_load_ptr(&(p)->__ptr); \ +}) + +/* + * Store to an SMR protected pointer when no serialiation is required + * such as in the destructor callback or when the caller guarantees other + * synchronization. + */ +#define smr_unserialized_store(p, v, ex) do { \ + SMR_ASSERT(ex, "smr_unserialized_store"); \ + __typeof((p)->__ptr) _v = (v); \ + atomic_store_ptr((uintptr_t *)&(p)->__ptr, (uintptr_t)_v); \ +} while (0) + +#ifndef _KERNEL + +/* + * Load an SMR protected pointer when accessing kernel data structures through + * libkvm. + */ +#define smr_kvm_load(p) ((p)->__ptr) + +#endif /* !_KERNEL */ +#endif /* !_SYS_SMR_TYPES_H_ */ Modified: head/sys/vm/vm_radix.c ============================================================================== --- head/sys/vm/vm_radix.c Sat Mar 7 00:29:12 2020 (r358727) +++ head/sys/vm/vm_radix.c Sat Mar 7 00:55:46 2020 (r358728) @@ -61,6 +61,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include @@ -101,7 +102,7 @@ __FBSDID("$FreeBSD$"); enum vm_radix_access { SMR, LOCKED, UNSERIALIZED }; struct vm_radix_node; -SMR_TYPE_DECLARE(smrnode_t, struct vm_radix_node *); +typedef SMR_POINTER(struct vm_radix_node *) smrnode_t; struct vm_radix_node { vm_pindex_t rn_owner; /* Owner of record. */ From owner-svn-src-all@freebsd.org Sat Mar 7 03:58:59 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 5F04D25A4FB; Sat, 7 Mar 2020 03:58:59 +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 48Z9hg0Gprz3Fc4; Sat, 7 Mar 2020 03:58:59 +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 B501A2E10; Sat, 7 Mar 2020 03:58:58 +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 0273ww0e009494; Sat, 7 Mar 2020 03:58:58 GMT (envelope-from jhibbits@FreeBSD.org) Received: (from jhibbits@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 0273wwPI009493; Sat, 7 Mar 2020 03:58:58 GMT (envelope-from jhibbits@FreeBSD.org) Message-Id: <202003070358.0273wwPI009493@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jhibbits set sender to jhibbits@FreeBSD.org using -f From: Justin Hibbits Date: Sat, 7 Mar 2020 03:58:58 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r358729 - head/share/mk X-SVN-Group: head X-SVN-Commit-Author: jhibbits X-SVN-Commit-Paths: head/share/mk X-SVN-Commit-Revision: 358729 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages 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, 07 Mar 2020 03:58:59 -0000 Author: jhibbits Date: Sat Mar 7 03:58:58 2020 New Revision: 358729 URL: https://svnweb.freebsd.org/changeset/base/358729 Log: compat: Allow explicit overriding of COMPAT_ARCH and COMPAT_CPUTYPE Summary: Allow src.conf to override the inferred COMPAT_ARCH and COMPAT_CPUTYPE variables, such that a different CPU target can be specified explicitly for the general target vs the compat target. Reviewed by: imp Differential Revision: https://reviews.freebsd.org/D23992 Modified: head/share/mk/bsd.compat.mk Modified: head/share/mk/bsd.compat.mk ============================================================================== --- head/share/mk/bsd.compat.mk Sat Mar 7 00:55:46 2020 (r358728) +++ head/share/mk/bsd.compat.mk Sat Mar 7 03:58:58 2020 (r358729) @@ -4,8 +4,8 @@ __<${_this:T}>__: .if defined(_LIBCOMPAT) -COMPAT_ARCH= ${TARGET_ARCH} -COMPAT_CPUTYPE= ${TARGET_CPUTYPE} +COMPAT_ARCH?= ${TARGET_ARCH} +COMPAT_CPUTYPE?= ${CPUTYPE_${_LIBCOMPAT}} .if (defined(WANT_COMPILER_TYPE) && ${WANT_COMPILER_TYPE} == gcc) || \ (defined(X_COMPILER_TYPE) && ${X_COMPILER_TYPE} == gcc) COMPAT_COMPILER_TYPE= gcc From owner-svn-src-all@freebsd.org Sat Mar 7 08:41:11 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id AC79C25F044; Sat, 7 Mar 2020 08:41:11 +0000 (UTC) (envelope-from hrs@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 48ZHyH2ZyYz3LK0; Sat, 7 Mar 2020 08:41:11 +0000 (UTC) (envelope-from hrs@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 25DE0651D; Sat, 7 Mar 2020 08:41:11 +0000 (UTC) (envelope-from hrs@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 0278fBRp077262; Sat, 7 Mar 2020 08:41:11 GMT (envelope-from hrs@FreeBSD.org) Received: (from hrs@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 0278fAUl077260; Sat, 7 Mar 2020 08:41:10 GMT (envelope-from hrs@FreeBSD.org) Message-Id: <202003070841.0278fAUl077260@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hrs set sender to hrs@FreeBSD.org using -f From: Hiroki Sato Date: Sat, 7 Mar 2020 08:41:10 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r358730 - in head: sys/netinet usr.bin/netstat X-SVN-Group: head X-SVN-Commit-Author: hrs X-SVN-Commit-Paths: in head: sys/netinet usr.bin/netstat X-SVN-Commit-Revision: 358730 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages 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, 07 Mar 2020 08:41:11 -0000 Author: hrs Date: Sat Mar 7 08:41:10 2020 New Revision: 358730 URL: https://svnweb.freebsd.org/changeset/base/358730 Log: Fix an issue of net.inet.igmp.stats handler. The header of (struct igmpstat) could be cleared by sysctl(3). This can be reproduced by "netstat -s -z -p igmp". PR: 244584 MFC after: 1 week Modified: head/sys/netinet/igmp.c head/usr.bin/netstat/inet.c Modified: head/sys/netinet/igmp.c ============================================================================== --- head/sys/netinet/igmp.c Sat Mar 7 03:58:58 2020 (r358729) +++ head/sys/netinet/igmp.c Sat Mar 7 08:41:10 2020 (r358730) @@ -145,6 +145,7 @@ static void igmp_v3_suppress_group_record(struct in_mu static int sysctl_igmp_default_version(SYSCTL_HANDLER_ARGS); static int sysctl_igmp_gsr(SYSCTL_HANDLER_ARGS); static int sysctl_igmp_ifinfo(SYSCTL_HANDLER_ARGS); +static int sysctl_igmp_stat(SYSCTL_HANDLER_ARGS); static const struct netisr_handler igmp_nh = { .nh_name = "igmp", @@ -260,8 +261,9 @@ VNET_DEFINE_STATIC(int, igmp_default_version) = IGMP_V /* * Virtualized sysctls. */ -SYSCTL_STRUCT(_net_inet_igmp, IGMPCTL_STATS, stats, CTLFLAG_VNET | CTLFLAG_RW, - &VNET_NAME(igmpstat), igmpstat, ""); +SYSCTL_PROC(_net_inet_igmp, IGMPCTL_STATS, stats, + CTLFLAG_VNET | CTLTYPE_STRUCT | CTLFLAG_RW | CTLFLAG_MPSAFE, + &VNET_NAME(igmpstat), 0, sysctl_igmp_stat, "S,igmpstat", ""); SYSCTL_INT(_net_inet_igmp, OID_AUTO, recvifkludge, CTLFLAG_VNET | CTLFLAG_RW, &VNET_NAME(igmp_recvifkludge), 0, "Rewrite IGMPv1/v2 reports from 0.0.0.0 to contain subnet address"); @@ -333,6 +335,59 @@ igmp_restore_context(struct mbuf *m) #endif #endif return (m->m_pkthdr.flowid); +} + +/* + * IGMP statistics. + */ +static int +sysctl_igmp_stat(SYSCTL_HANDLER_ARGS) +{ + struct igmpstat igps0; + int error; + char *p; + + error = sysctl_wire_old_buffer(req, sizeof(V_igmpstat)); + if (error) + return (error); + + if (req->oldptr != NULL) { + if (req->oldlen < sizeof(V_igmpstat)) + error = ENOMEM; + else + error = SYSCTL_OUT(req, &V_igmpstat, + sizeof(V_igmpstat)); + } else + req->validlen = sizeof(V_igmpstat); + if (error) + goto out; + if (req->newptr != NULL) { + if (req->newlen < sizeof(V_igmpstat)) + error = ENOMEM; + else + error = SYSCTL_IN(req, &igps0, + sizeof(igps0)); + if (error) + goto out; + /* + * igps0 must be "all zero". + */ + p = (char *)&igps0; + while (*p == '\0' && p < (char *)&igps0 + sizeof(igps0)) + p++; + if (p != (char *)&igps0 + sizeof(igps0)) { + error = EINVAL; + goto out; + } + /* + * Avoid overwrite of the version and length field. + */ + igps0.igps_version = V_igmpstat.igps_version; + igps0.igps_len = V_igmpstat.igps_len; + bcopy(&igps0, &V_igmpstat, sizeof(V_igmpstat)); + } +out: + return (error); } /* Modified: head/usr.bin/netstat/inet.c ============================================================================== --- head/usr.bin/netstat/inet.c Sat Mar 7 03:58:58 2020 (r358729) +++ head/usr.bin/netstat/inet.c Sat Mar 7 08:41:10 2020 (r358730) @@ -1222,10 +1222,26 @@ void igmp_stats(u_long off, const char *name, int af1 __unused, int proto __unused) { struct igmpstat igmpstat; + int error, zflag0; if (fetch_stats("net.inet.igmp.stats", 0, &igmpstat, sizeof(igmpstat), kread) != 0) return; + /* + * Reread net.inet.igmp.stats when zflag == 1. + * This is because this MIB contains version number and + * length of the structure which are not set when clearing + * the counters. + */ + zflag0 = zflag; + if (zflag) { + zflag = 0; + error = fetch_stats("net.inet.igmp.stats", 0, &igmpstat, + sizeof(igmpstat), kread); + zflag = zflag0; + if (error) + return; + } if (igmpstat.igps_version != IGPS_VERSION_3) { xo_warnx("%s: version mismatch (%d != %d)", __func__, From owner-svn-src-all@freebsd.org Sat Mar 7 15:37:25 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 2EB93269248; Sat, 7 Mar 2020 15:37:25 +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 48ZTBX4tm8z3yr9; Sat, 7 Mar 2020 15:37:24 +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 51CC9B152; Sat, 7 Mar 2020 15:37:24 +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 027FbOSr036911; Sat, 7 Mar 2020 15:37:24 GMT (envelope-from markj@FreeBSD.org) Received: (from markj@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 027FbOYh036910; Sat, 7 Mar 2020 15:37:24 GMT (envelope-from markj@FreeBSD.org) Message-Id: <202003071537.027FbOYh036910@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: markj set sender to markj@FreeBSD.org using -f From: Mark Johnston Date: Sat, 7 Mar 2020 15:37:24 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r358732 - head/sys/vm X-SVN-Group: head X-SVN-Commit-Author: markj X-SVN-Commit-Paths: head/sys/vm X-SVN-Commit-Revision: 358732 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages 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, 07 Mar 2020 15:37:25 -0000 Author: markj Date: Sat Mar 7 15:37:23 2020 New Revision: 358732 URL: https://svnweb.freebsd.org/changeset/base/358732 Log: Clean up uma_int.h a bit. This makes it easier to write libkvm programs that access UMA data structures. - Remove a couple of unused slab functions and make others local to uma_core.c. Similarly move SLAB_BITSETS, which affects the layout of slab structures, to uma_core.c. - Stop defining the slab structures under _KERNEL. There's no real reason they can't be visible to userspace like the rest of UMA's structures are. - Group KEG_ASSERT_COLD with other keg macros. - Convert an assertion about MAXMEMDOM to use _Static_assert. No functional change intended. Discussed with: jeff Reviewed by: rlibby Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D23980 Modified: head/sys/vm/uma_core.c head/sys/vm/uma_int.h Modified: head/sys/vm/uma_core.c ============================================================================== --- head/sys/vm/uma_core.c Sat Mar 7 15:09:45 2020 (r358731) +++ head/sys/vm/uma_core.c Sat Mar 7 15:37:23 2020 (r358732) @@ -117,6 +117,16 @@ static uma_zone_t kegs; static uma_zone_t zones; /* + * On INVARIANTS builds, the slab contains a second bitset of the same size, + * "dbg_bits", which is laid out immediately after us_free. + */ +#ifdef INVARIANTS +#define SLAB_BITSETS 2 +#else +#define SLAB_BITSETS 1 +#endif + +/* * These are the two zones from which all offpage uma_slab_ts are allocated. * * One zone is for slab headers that can represent a larger number of items, @@ -1898,7 +1908,7 @@ zero_init(void *mem, int size, int flags) } #ifdef INVARIANTS -struct noslabbits * +static struct noslabbits * slab_dbg_bits(uma_slab_t slab, uma_keg_t keg) { @@ -1909,7 +1919,7 @@ slab_dbg_bits(uma_slab_t slab, uma_keg_t keg) /* * Actual size of embedded struct slab (!OFFPAGE). */ -size_t +static size_t slab_sizeof(int nitems) { size_t s; @@ -1918,15 +1928,6 @@ slab_sizeof(int nitems) return (roundup(s, UMA_ALIGN_PTR + 1)); } -/* - * Size of memory for embedded slabs (!OFFPAGE). - */ -size_t -slab_space(int nitems) -{ - return (UMA_SLAB_SIZE - slab_sizeof(nitems)); -} - #define UMA_FIXPT_SHIFT 31 #define UMA_FRAC_FIXPT(n, d) \ ((uint32_t)(((uint64_t)(n) << UMA_FIXPT_SHIFT) / (d))) @@ -1965,18 +1966,6 @@ slab_ipers_hdr(u_int size, u_int rsize, u_int slabsize } return (ipers); -} - -/* - * Compute the number of items that will fit in a slab for a startup zone. - */ -int -slab_ipers(size_t size, int align) -{ - int rsize; - - rsize = roundup(size, align + 1); /* Assume no CACHESPREAD */ - return (slab_ipers_hdr(size, rsize, UMA_SLAB_SIZE, true)); } struct keg_layout_result { Modified: head/sys/vm/uma_int.h ============================================================================== --- head/sys/vm/uma_int.h Sat Mar 7 15:09:45 2020 (r358731) +++ head/sys/vm/uma_int.h Sat Mar 7 15:37:23 2020 (r358732) @@ -368,11 +368,6 @@ struct uma_keg { }; typedef struct uma_keg * uma_keg_t; -#ifdef _KERNEL -#define KEG_ASSERT_COLD(k) \ - KASSERT(uma_keg_get_allocs((k)) == 0, \ - ("keg %s initialization after use.", (k)->uk_name)) - /* * Free bits per-slab. */ @@ -391,30 +386,14 @@ struct uma_slab { uint8_t us_domain; /* Backing NUMA domain. */ struct noslabbits us_free; /* Free bitmask, flexible. */ }; -_Static_assert(sizeof(struct uma_slab) == offsetof(struct uma_slab, us_free), +_Static_assert(sizeof(struct uma_slab) == __offsetof(struct uma_slab, us_free), "us_free field must be last"); -#if MAXMEMDOM >= 255 -#error "Slab domain type insufficient" -#endif +_Static_assert(MAXMEMDOM < 255, + "us_domain field is not wide enough"); typedef struct uma_slab * uma_slab_t; /* - * On INVARIANTS builds, the slab contains a second bitset of the same size, - * "dbg_bits", which is laid out immediately after us_free. - */ -#ifdef INVARIANTS -#define SLAB_BITSETS 2 -#else -#define SLAB_BITSETS 1 -#endif - -/* These three functions are for embedded (!OFFPAGE) use only. */ -size_t slab_sizeof(int nitems); -size_t slab_space(int nitems); -int slab_ipers(size_t size, int align); - -/* * Slab structure with a full sized bitset and hash link for both * HASH and OFFPAGE zones. */ @@ -460,7 +439,6 @@ slab_item_index(uma_slab_t slab, uma_keg_t keg, void * data = (uintptr_t)slab_data(slab, keg); return (((uintptr_t)item - data) / keg->uk_rsize); } -#endif /* _KERNEL */ STAILQ_HEAD(uma_bucketlist, uma_bucket); @@ -578,6 +556,10 @@ static __inline uma_slab_t hash_sfind(struct uma_hash KASSERT((void *)(keg) != NULL, \ ("%s: Invalid zone %p type", __func__, (zone))); \ } while (0) + +#define KEG_ASSERT_COLD(k) \ + KASSERT(uma_keg_get_allocs((k)) == 0, \ + ("keg %s initialization after use.", (k)->uk_name)) /* Domains are contiguous after the last CPU */ #define ZDOM_GET(z, n) \